import{c as appState,t as ranges,h as T3000_Data,w as appStateV2,n as library,i as isBuiltInEdge,x as savedNotify,l as lodash,o as rulersGridVisible,g as globalMsg,y as localSettings,z as linkT3EntryDialogV2,N as NewTool,A as AdjustVlScrollHeight,B as globalNav,u as user,q as T3_Types,e as deviceModel,C as deviceAppState,a as locked,f as undoHistory,r as redoHistory,m as moveable,b as grpNav,j as viewportMargins,k as linkT3EntryDialog,s as selectPanelOptions,T as T3Data,D as emptyProject,p as documentAreaPosition,v as viewport}from"./T3Data.889a220d.js";import{t as toRaw,aE as LogUtil,d as defineComponent,h as ref$1,o as onMounted,az as useCssVars,X as openBlock,Y as createElementBlock,Z as createBaseVNode,aD as normalizeClass,bA as createStaticVNode,$ as toDisplayString,aG as normalizeStyle$1,a0 as createCommentVNode,a as computed,a3 as createBlock,ao as QBtn,s as shallowRef,z as toRefs,g as getCurrentInstance$1,w as watch,j as watchEffect,f as onBeforeUnmount,Q as h,i as inject,n as nextTick,S as isRef,u as unref,e as onUnmounted,a5 as resolveComponent,a4 as withCtx,c as createVNode,C as createTextVNode,aw as QIcon,aB as mergeProps,F as Fragment,ar as renderList,W as withModifiers,bB as HvConstant,bC as Dialog,bD as safeNodeAccess,bE as ErrorHandler,bF as __vitePreload,N as triggerRef}from"./index.9313841a.js";import{c as commonjsGlobal}from"./_commonjsHelpers.a5007c1f.js";import{n as ctxMenuConfig,o as objectConfigShow,p as globalMsgShow,q as commonMsg,u as selectedTool,v as isDrawing,w as lastAction,x as selecto,y as clipboardFull,z as topContextToggleVisible,A as toggleValueShow,B as toggleNumberShow,C as toggleModeValue,D as toggleValueDisable,E as toggleNumberDisable,F as toggleValueValue,G as toggleNumberValue,H as showSettingMenu,I as importJsonDialog,J as gaugeSettingsDialog,K as insertCount,L as keepRatio,M as cursorIconPos,N as continuesObjectTypes,O as startTransform,P as objectsRef,Q as showRulers,R as showGrid,S as zoomScale,b as topNavVisible,l as leftNavVisible,r as rightNavVisible}from"./RefConstant.60485b5b.js";import{am as notification,al as message}from"./index.b9a1e371.js";import{l as liveApi}from"./api.c096d0cb.js";import{s as switchIcons,t as tools}from"./common.356e5c35.js";import{_ as _export_sfc}from"./plugin-vue_export-helper.21dcd24c.js";import{A as AntdIcon}from"./AntdIcon.111f44e5.js";import{L as ATooltip}from"./index.0b39d519.js";import{Q as QTooltip}from"./QTooltip.fa4abc75.js";function prefixNames(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.map((function(e){return e.split(" ").map((function(e){return e?""+t+e:""})).join(" ")})).join(" ")}function prefixCSS(t,e){return e.replace(/([^}{]*){/gm,(function(e,i){return i.replace(/\.([^{,\s\d.]+)/g,"."+t+"$1")+"{"}))}function ref(t,e){return function(i){i&&(t[e]=i)}}function refs(t,e,i){return function(n){n&&(t[e][i]=n)}}function Properties(t,e){return function(i){var n=i.prototype;t.forEach((function(t){e(n,t)}))}}function withMethods(t,e){return void 0===e&&(e={}),function(i,n){t.forEach((function(t){var s=e[t]||t;s in i||(i[s]=function(){for(var e,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var a=(e=this[n])[t].apply(e,i);return a===this[n]?this:a})}))}}var FUNCTION="function",OBJECT="object",STRING="string",NUMBER="number",UNDEFINED$1="undefined",IS_WINDOW=typeof window!==UNDEFINED$1,doc=typeof document!==UNDEFINED$1&&document,OPEN_CLOSED_CHARACTERS=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],TINY_NUM$1=1e-7,DEFAULT_UNIT_PRESETS={cm:function(t){return 96*t/2.54},mm:function(t){return 96*t/254},in:function(t){return 96*t},pt:function(t){return 96*t/72},pc:function(t){return 96*t/6},"%":function(t,e){return t*e/100},vw:function(t,e){return void 0===e&&(e=window.innerWidth),t/100*e},vh:function(t,e){return void 0===e&&(e=window.innerHeight),t/100*e},vmax:function(t,e){return void 0===e&&(e=Math.max(window.innerWidth,window.innerHeight)),t/100*e},vmin:function(t,e){return void 0===e&&(e=Math.min(window.innerWidth,window.innerHeight)),t/100*e}};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __spreadArrays$2(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,r=a.length;o<r;o++,s++)n[s]=a[o];return n}function dot(t,e,i,n){return(t*n+e*i)/(i+n)}function isUndefined(t){return typeof t===UNDEFINED$1}function isObject$3(t){return t&&typeof t===OBJECT}function isArray$1(t){return Array.isArray(t)}function isString$1(t){return typeof t===STRING}function isNumber$2(t){return typeof t===NUMBER}function isFunction$1(t){return typeof t===FUNCTION}function isEqualSeparator(t,e){return(""===e||" "==e)&&(""===t||" "==t)||t===e}function findOpen(t,e,i,n,s){return findIgnore(t,e,i)?i:findClose(t,e,i+1,n,s)}function findIgnore(t,e,i){if(!t.ignore)return null;var n=e.slice(Math.max(i-3,0),i+3).join("");return new RegExp(t.ignore).exec(n)}function findClose(t,e,i,n,s){for(var a,o=function(i){var o=e[i].trim();if(o===t.close&&!findIgnore(t,e,i))return{value:i};var r=i,l=find$2(s,(function(t){return t.open===o}));if(l&&(r=findOpen(l,e,i,n,s)),-1===r)return a=i,"break";a=i=r},r=i;r<n;++r){var l=o(r);if(r=a,"object"==typeof l)return l.value;if("break"===l)break}return-1}function splitText(t,e){var i=isString$1(e)?{separator:e}:e,n=i.separator,s=void 0===n?",":n,a=i.isSeparateFirst,o=i.isSeparateOnlyOpenClose,r=i.isSeparateOpenClose,l=void 0===r?o:r,h=i.openCloseCharacters,c=void 0===h?OPEN_CLOSED_CHARACTERS:h,u=c.map((function(t){var e=t.open,i=t.close;return e===i?e:e+"|"+i})).join("|"),d=new RegExp("(\\s*"+s+"\\s*|"+u+"|\\s+)","g"),p=t.split(d).filter((function(t){return t&&"undefined"!==t})),g=p.length,f=[],m=[];function v(){return!!m.length&&(f.push(m.join("")),m=[],!0)}for(var b,y=function(e){var i=p[e].trim(),n=e,r=find$2(c,(function(t){return t.open===i})),h=find$2(c,(function(t){return t.close===i}));if(r){if(-1!==(n=findOpen(r,p,e,g,c))&&l)return v()&&a?(b=e,"break"):(f.push(p.slice(e,n+1).join("")),e=n,a?(b=e,"break"):(b=e,"continue"))}else{if(h&&!findIgnore(h,p,e)){var u=__spreadArrays$2(c);return u.splice(c.indexOf(h),1),{value:splitText(t,{separator:s,isSeparateFirst:a,isSeparateOnlyOpenClose:o,isSeparateOpenClose:l,openCloseCharacters:u})}}if(isEqualSeparator(i,s)&&!o)return v(),a?(b=e,"break"):(b=e,"continue")}-1===n&&(n=g-1),m.push(p.slice(e,n+1).join("")),b=e=n},S=0;S<g;++S){var x=y(S);if(S=b,"object"==typeof x)return x.value;if("break"===x)break}return m.length&&f.push(m.join("")),f}function splitSpace(t){return splitText(t,"")}function splitComma(t){return splitText(t,",")}function splitBracket(t){var e=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(t);return!e||e.length<4?{}:{prefix:e[1],value:e[2],suffix:e[3]}}function splitUnit(t){var e=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(t);if(!e)return{prefix:"",unit:"",value:NaN};var i=e[1],n=e[2];return{prefix:i,unit:e[3],value:parseFloat(n)}}function camelize(t){return t.replace(/[\s-_]+([^\s-_])/g,(function(t,e){return e.toUpperCase()}))}function decamelize(t,e){return void 0===e&&(e="-"),t.replace(/([a-z])([A-Z])/g,(function(t,i,n){return""+i+e+n.toLowerCase()}))}function now(){return Date.now?Date.now():(new Date).getTime()}function findIndex(t,e,i){void 0===i&&(i=-1);for(var n=t.length,s=0;s<n;++s)if(e(t[s],s,t))return s;return i}function find$2(t,e,i){var n=findIndex(t,e);return n>-1?t[n]:i}var requestAnimationFrame$4=function(){var t=now(),e=IS_WINDOW&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return e?e.bind(window):function(e){var i=now();return setTimeout((function(){e(i-t)}),1e3/60)}}(),cancelAnimationFrame$2=function(){var t=IS_WINDOW&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return t?t.bind(window):function(t){clearTimeout(t)}}();function getKeys(t){return Object.keys(t)}function getValues(t){return getKeys(t).map((function(e){return t[e]}))}function convertUnitSize(t,e){var i=splitUnit(t),n=i.value,s=i.unit;if(isObject$3(e)){var a=e[s];if(a){if(isFunction$1(a))return a(n);if(DEFAULT_UNIT_PRESETS[s])return DEFAULT_UNIT_PRESETS[s](n,a)}}else if("%"===s)return n*e/100;return DEFAULT_UNIT_PRESETS[s]?DEFAULT_UNIT_PRESETS[s](n):n}function between(t,e,i){return Math.max(e,Math.min(t,i))}function checkBoundSize(t,e,i,n){return void 0===n&&(n=t[0]/t[1]),[[throttle$1(e[0],TINY_NUM$1),throttle$1(e[0]/n,TINY_NUM$1)],[throttle$1(e[1]*n,TINY_NUM$1),throttle$1(e[1],TINY_NUM$1)]].filter((function(t){return t.every((function(t,n){var s=e[n],a=throttle$1(s,TINY_NUM$1);return i?t<=s||t<=a:t>=s||t>=a}))}))[0]||t}function calculateBoundSize(t,e,i,n){if(!n)return t.map((function(t,n){return between(t,e[n],i[n])}));var s=t[0],a=t[1],o=!0===n?s/a:n,r=checkBoundSize(t,e,!1,o),l=r[0],h=r[1],c=checkBoundSize(t,i,!0,o),u=c[0],d=c[1];return s<l||a<h?(s=l,a=h):(s>u||a>d)&&(s=u,a=d),[s,a]}function sum(t){for(var e=0,i=t.length-1;i>=0;--i)e+=t[i];return e}function average(t){for(var e=t.length,i=0,n=e-1;n>=0;--n)i+=t[n];return e?i/e:0}function getRad$1(t,e){var i=e[0]-t[0],n=e[1]-t[1],s=Math.atan2(n,i);return s>=0?s:s+2*Math.PI}function getCenterPoint(t){return[0,1].map((function(e){return average(t.map((function(t){return t[e]})))}))}function getShapeDirection(t){var e=getCenterPoint(t),i=getRad$1(e,t[0]),n=getRad$1(e,t[1]);return i<n&&n-i<Math.PI||i>n&&n-i<-Math.PI?1:-1}function getDist$2(t,e){return Math.sqrt(Math.pow((e?e[0]:0)-t[0],2)+Math.pow((e?e[1]:0)-t[1],2))}function throttle$1(t,e){if(!e)return t;var i=1/e;return Math.round(t/e)/i}function throttleArray(t,e){return t.forEach((function(i,n){t[n]=throttle$1(t[n],e)})),t}function counter(t){for(var e=[],i=0;i<t;++i)e.push(i);return e}function flat$2(t){return t.reduce((function(t,e){return t.concat(e)}),[])}function pushSet(t,e){-1===t.indexOf(e)&&t.push(e)}function hasClass(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function addClass(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function removeClass(t,e){if(t.classList)t.classList.remove(e);else{var i=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(i," ")}}function addEvent(t,e,i,n){t.addEventListener(e,i,n)}function removeEvent(t,e,i,n){t.removeEventListener(e,i,n)}function getDocument(t){return(null==t?void 0:t.ownerDocument)||doc}function getDocumentElement(t){return getDocument(t).documentElement}function getDocumentBody(t){return getDocument(t).body}function getWindow(t){var e;return(null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView)||window}function isWindow(t){return t&&"postMessage"in t&&"blur"in t&&"self"in t}function isNode(t){return isObject$3(t)&&t.nodeName&&t.nodeType&&"ownerDocument"in t}var PolyMap=function(){function t(){this.keys=[],this.values=[]}var e=t.prototype;return e.get=function(t){return this.values[this.keys.indexOf(t)]},e.set=function(t,e){var i=this.keys,n=this.values,s=i.indexOf(t),a=-1===s?i.length:s;i[a]=t,n[a]=e},t}(),HashMap$1=function(){function t(){this.object={}}var e=t.prototype;return e.get=function(t){return this.object[t]},e.set=function(t,e){this.object[t]=e},t}(),SUPPORT_MAP="function"==typeof Map,Link$1=function(){function t(){}var e=t.prototype;return e.connect=function(t,e){this.prev=t,this.next=e,t&&(t.next=this),e&&(e.prev=this)},e.disconnect=function(){var t=this.prev,e=this.next;t&&(t.next=e),e&&(e.prev=t)},e.getIndex=function(){for(var t=this,e=-1;t;)t=t.prev,++e;return e},t}();function orderChanged(t,e){var i=[],n=[];return t.forEach((function(t){var e=t[0],s=t[1],a=new Link$1;i[e]=a,n[s]=a})),i.forEach((function(t,e){t.connect(i[e-1])})),t.filter((function(t,i){return!e[i]})).map((function(t,e){var s=t[0],a=t[1];if(s===a)return[0,0];var o=i[s],r=n[a-1],l=o.getIndex();return o.disconnect(),r?o.connect(r,r.next):o.connect(void 0,i[0]),[l,o.getIndex()]}))}var Result=function(){function t(t,e,i,n,s,a,o,r){this.prevList=t,this.list=e,this.added=i,this.removed=n,this.changed=s,this.maintained=a,this.changedBeforeAdded=o,this.fixed=r}var e=t.prototype;return Object.defineProperty(e,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(e,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),e.caculateOrdered=function(){var t=orderChanged(this.changedBeforeAdded,this.fixed),e=this.changed,i=[];this.cacheOrdered=t.filter((function(t,n){var s=t[0],a=t[1],o=e[n],r=o[0],l=o[1];if(s!==a)return i.push([r,l]),!0})),this.cachePureChanged=i},t}();function diff$1(t,e,i){var n=SUPPORT_MAP?Map:i?HashMap$1:PolyMap,s=i||function(t){return t},a=[],o=[],r=[],l=t.map(s),h=e.map(s),c=new n,u=new n,d=[],p=[],g={},f=[],m=0,v=0;return l.forEach((function(t,e){c.set(t,e)})),h.forEach((function(t,e){u.set(t,e)})),l.forEach((function(t,e){var i=u.get(t);void 0===i?(++v,o.push(e)):g[i]=v})),h.forEach((function(t,e){var i=c.get(t);void 0===i?(a.push(e),++m):(r.push([i,e]),v=g[e]||0,d.push([i-v,e-m]),p.push(e===i),i!==e&&f.push([i,e]))})),o.reverse(),new Result(t,e,a,o,f,r,d,p)}var ListDiffer=function(){function t(t,e){void 0===t&&(t=[]),this.findKeyCallback=e,this.list=[].slice.call(t)}return t.prototype.update=function(t){var e=[].slice.call(t),i=diff$1(this.list,e,this.findKeyCallback);return this.list=e,i},t}(),extendStatics$6=function(t,e){return(extendStatics$6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function __extends$6(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics$6(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$8=function(){return __assign$8=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$8.apply(this,arguments)};function __rest$2(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}function __spreadArray$2(t,e,i){if(i||2===arguments.length)for(var n,s=0,a=e.length;s<a;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}function fillKeys(t){var e=0;return t.map((function(t){return null==t?"$compat".concat(++e):"".concat(t)}))}function flat$1(t){var e=[];return t.forEach((function(t){e=e.concat(isArray$1(t)?flat$1(t):t)})),e}function fillProps(t,e){if(!e)return t;for(var i in e)isUndefined(t[i])&&(t[i]=e[i]);return t}function isDiff(t,e){if(t===e)return!1;for(var i in t)if(!(i in e))return!0;for(var i in e)if(t[i]!==e[i])return!0;return!1}function getAttributes(t){var e=t.className,i=__rest$2(t,["className"]);return null!=e&&(i.class=e),delete i.style,delete i.children,i}function splitProps(t){var e={},i={};for(var n in t)0===n.indexOf("on")?i[n]=t[n]:e[n]=t[n];return[e,i]}function findContainerNode(t){if(!t)return null;var e=t.b;return isNode(e)?e:findContainerNode(t.c)}function removeNode(t){var e=t.parentNode;e&&e.removeChild(t)}function executeHooks(t){t.forEach((function(t){t()}))}function renderFunctionComponent(){return this.constructor(this.props,this.context)}var hooksIndex=0,Provider=function(){function t(t,e,i,n,s,a,o){void 0===o&&(o={}),this.t=t,this.d=e,this.k=i,this.i=n,this.c=s,this.ref=a,this.ps=o,this.typ="prov",this._ps=[],this._cs={},this._hyd=null,this._sel=!1}var e=t.prototype;return e.s=function(){return!0},e.u=function(t,e,i,n,s){var a=this,o=a.d,r=flat$1(getValues(e).filter((function(t){return t.$_req})).map((function(t){return t.$_subs}))),l=find$2(r,(function(t){return t.d===o}));if(a.b&&!isString$1(i)&&!s&&!a.s(i.props,n)&&!l)return r.reduce((function(t,e){var i=e.d;return t[0]?t[0].d===i&&t.push(e):i>o&&t.push(e),t}),[]).forEach((function(i){renderProviders(i,i._ps,[i.o],t,e,!0)})),!1;a.o=i,a.ss(n);var h=a.ps;return isString$1(i)||(a.ps=i.props,a.ref=i.ref),setCurrentInstance(this),a.r(t,e,a.b?h:{},n),!0},e.md=function(){this.rr()},e.ss=function(){},e.ud=function(){this.rr()},e.rr=function(){var t=this,e=t.ref,i=t.fr;e&&e(i?i.current:t.b)},t}();function getCurrentInstance(){return Object.__CROACT_CURRENT_INSTNACE__}function getHooksIndex(){return hooksIndex}function setHooksInex(t){hooksIndex=t}function setCurrentInstance(t){return Object.__CROACT_CURRENT_INSTNACE__=t,hooksIndex=0,t}var Component=function(){function t(t,e){void 0===t&&(t={}),this.props=t,this.context=e,this.state={},this.$_timer=0,this.$_state={},this.$_subs=[],this.$_cs={}}var e=t.prototype;return e.render=function(){return null},e.shouldComponentUpdate=function(t,e){return this.props!==t||this.state!==e},e.setState=function(t,e,i){var n=this;n.$_timer||(n.$_state={}),clearTimeout(n.$_timer),n.$_timer=0,n.$_state=__assign$8(__assign$8({},n.$_state),t),i?n.$_setState(e,i):n.$_timer=window.setTimeout((function(){n.$_timer=0,n.$_setState(e,i)}))},e.forceUpdate=function(t){this.setState({},t,!0)},e.componentDidMount=function(){},e.componentDidUpdate=function(t,e){},e.componentWillUnmount=function(){},e.$_setState=function(t,e){var i=[],n=this.$_p;renderProviders(n.c,[n],[n.o],i,n._cs,__assign$8(__assign$8({},this.state),this.$_state),e)&&(t&&i.push(t),executeHooks(i),setCurrentInstance(null))},t}(),PureComponent=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$6(e,t),e.prototype.shouldComponentUpdate=function(t,e){return isDiff(this.props,t)||isDiff(this.state,e)},e}(Component);function createRef(t){var e=function(t){e.current=t};return e.current=t,e}function forwardRef(t){return t._fr=!0,t}function createComponent(t,e,i,n){var s,a;return(null===(s=null==t?void 0:t.prototype)||void 0===s?void 0:s.render)?a=new t(e,i):((a=new Component(e,i)).constructor=t,t._fr?(n.fr=createRef(),a.render=function(){return this.constructor(this.props,n.fr)}):a.render=renderFunctionComponent),a.$_p=n,a}var ComponentProvider=function(t){function e(e,i,n,s,a,o,r){void 0===r&&(r={});var l=t.call(this,e,i,n,s,a,o,fillProps(r,e.defaultProps))||this;return l.typ="comp",l._usefs=[],l._uefs=[],l._defs=[],l}__extends$6(e,t);var i=e.prototype;return i.s=function(t,e){var i=this.b;return!1!==i.shouldComponentUpdate(fillProps(t,this.t.defaultProps),e||i.state)},i.r=function(t,e,i){var n,s,a=this,o=a.t;a.ps=fillProps(a.ps,a.t.defaultProps);var r=a.ps,l=!a.b,h=o.contextType,c=a.b,u=null==h?void 0:h.get(a);a._cs=e,l?(c=createComponent(o,r,u,a),a.b=c):(c.props=r,c.context=u);var d=c.state;a._usefs=[],a._uefs=[];var p=c.render();0===(null===(s=null===(n=null==p?void 0:p.props)||void 0===n?void 0:n.children)||void 0===s?void 0:s.length)&&(p.props.children=a.ps.children);var g=__assign$8(__assign$8({},e),c.$_cs);renderProviders(a,a._ps,p?[p]:[],t,g),l?a._uefs.push((function(){null==h||h.register(a),c.componentDidMount()})):a._uefs.push((function(){c.componentDidUpdate(i,d)})),t.push((function(){a._usefs.forEach((function(t){t()})),l?a.md():a.ud(),a._defs=a._uefs.map((function(t){return t()}))}))},i.ss=function(t){var e=this.b;e&&t&&(e.state=t)},i.un=function(){var t,e=this;e._ps.forEach((function(t){t.un()})),null===(t=e.t.contextType)||void 0===t||t.unregister(e),clearTimeout(e.b.$_timer),e._defs.forEach((function(t){t&&t()})),e.b.componentWillUnmount()},e}(Provider);function diffAttributes(t,e,i){var n=diffObject(getAttributes(t),getAttributes(e)),s=n.added,a=n.removed,o=n.changed;for(var r in s)i.setAttribute(r,s[r]);for(var l in o)i.setAttribute(l,o[l][1]);for(var h in a)i.removeAttribute(h)}function diffEvents(t,e,i){var n=diffObject(t,e),s=n.added,a=n.removed;for(var o in a)i.e(o,!0);for(var r in s)i.e(r)}function diffObject(t,e){var i=getKeys(t),n=getKeys(e),s=diff$1(i,n,(function(t){return t})),a={},o={},r={};return s.added.forEach((function(t){var i=n[t];a[i]=e[i]})),s.removed.forEach((function(e){var n=i[e];o[n]=t[n]})),s.maintained.forEach((function(n){var s=n[0],a=i[s],o=[t[a],e[a]];t[a]!==e[a]&&(r[a]=o)})),{added:a,removed:o,changed:r}}function diffStyle(t,e,i){var n=i.style,s=diffObject(t,e),a=s.added,o=s.removed,r=s.changed;for(var l in a){var h=decamelize(l,"-");n.setProperty(h,a[l])}for(var l in r){var c=decamelize(l,"-");n.setProperty(c,r[l][1])}for(var l in o){var u=decamelize(l,"-");n.removeProperty(u)}}function getNativeEventName(t){return t.replace(/^on/g,"").toLowerCase()}var ElementProvider=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.typ="elem",e._es={},e._svg=!1,e}__extends$6(e,t);var i=e.prototype;return i.e=function(t,e){var i=this,n=i._es,s=i.b,a=getNativeEventName(t);e?(removeEvent(s,a,n[t]),delete n[t]):(n[t]=function(e){var n,s;null===(s=(n=i.ps)[t])||void 0===s||s.call(n,e)},addEvent(s,a,n[t]))},i.s=function(t){return isDiff(this.ps,t)},i.r=function(t,e,i){var n,s=this,a=!s.b,o=s.ps;if(a){var r=findContainerNode(s.c),l=!1;l=!(!s._svg&&"svg"!==s.t)||r&&r.ownerSVGElement,s._svg=l;var h=null===(n=s._hyd)||void 0===n?void 0:n.splice(0,1)[0],c=s.t;if(h)s._hyd=[].slice.call(h.children||[]);else{var u=getDocument(r);h=l?u.createElementNS("http://www.w3.org/2000/svg",c):u.createElement(c)}s.b=h}renderProviders(s,s._ps,o.children,t,e);var d=s.b,p=splitProps(i),g=p[0],f=p[1],m=splitProps(o),v=m[0],b=m[1];return diffAttributes(g,v,d),diffEvents(f,b,s),diffStyle(i.style||{},o.style||{},d),t.push((function(){a?s.md():s.ud()})),!0},i.un=function(){var t=this,e=t._es,i=t.b;for(var n in e)removeEvent(i,n,e[n]);t._ps.forEach((function(t){t.un()})),t._es={},t._sel||removeNode(i)},e}(Provider);function findDOMNode(t){if(!t||isNode(t))return t;var e=t.$_p._ps;return e.length?findDOMNode(e[0].b):null}function findNodeProvider(t){if(t){if(t.b&&isNode(t.b))return t;var e=t._ps;return e.length?findNodeProvider(e[0]):null}}function createElement$1(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=e||{},a=s.key,o=s.ref,r=__rest$2(s,["key","ref"]);return{type:t,key:a,ref:o,props:__assign$8(__assign$8({},r),{children:flat$2(i).filter((function(t){return null!=t&&!1!==t}))})}}var ContainerProvider=function(t){function e(e,i){void 0===i&&(i=0);var n=t.call(this,"container",i,"container",0,null)||this;return n.typ="container",n.b=e,n}__extends$6(e,t);var i=e.prototype;return i.r=function(){return!0},i.un=function(){},e}(Provider),TextProvider=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.typ="text",e}__extends$6(e,t);var i=e.prototype;return i.r=function(t){var e,i=this,n=!i.b;if(n){var s=findContainerNode(i.c),a=null===(e=i._hyd)||void 0===e?void 0:e.splice(0,1)[0];i.b=a||getDocument(s).createTextNode(i.t.replace("text_",""))}return t.push((function(){n?i.md():i.ud()})),!0},i.un=function(){removeNode(this.b)},e}(Provider);function diffProviders(t,e,i){var n=i.map((function(t){return isString$1(t)?null:t.key})),s=diff$1(fillKeys(e.map((function(t){return t.k}))),fillKeys(n),(function(t){return t}));s.removed.forEach((function(t){e.splice(t,1)[0].un()})),s.ordered.forEach((function(t){var i=t[0],n=t[1],s=e.splice(i,1)[0];e.splice(n,0,s);var a=findDOMNode(s.b),o=findDOMNode(e[n+1]&&e[n+1].b);a&&a.parentNode.insertBefore(a,o)})),s.added.forEach((function(s){e.splice(s,0,createProvider(i[s],n[s],s,t))}));var a=s.maintained.filter((function(s){s[0];var a=s[1],o=i[a],r=e[a];return(isString$1(o)?"text_".concat(o):o.type)!==r.t?(r.un(),e.splice(a,1,createProvider(o,n[a],a,t)),!0):(r.i=a,!1)}));return __spreadArray$2(__spreadArray$2([],s.added,!0),a.map((function(t){return t[0],t[1]})),!0)}function getNextSibiling(t,e){for(var i=t._ps,n=i.length,s=e.i+1;s<n;++s){var a=findDOMNode(i[s].b);if(a)return a}return null}function createProvider(t,e,i,n){var s=n.d+1;if(isString$1(t)||isNumber$2(t))return new TextProvider("text_".concat(t),s,e,i,n,null,{});var a=t.type;return new("string"==typeof a?ElementProvider:ComponentProvider)(a,s,e,i,n,t.ref,t.props)}function renderProviders(t,e,i,n,s,a,o){var r=diffProviders(t,e,i),l=t._hyd,h=e.filter((function(t,e){return t._hyd=l,t.u(n,s,i[e],a,o)}));"container"===t.typ&&t._sel&&e.forEach((function(t){var e=findNodeProvider(t);e&&(e._sel=!0)})),t._hyd=null;var c=findContainerNode(t);return c&&r.reverse().forEach((function(i){var n=e[i],s=findDOMNode(n.b);if(s&&c!==s&&!s.parentNode){var a=getNextSibiling(t,n);c.insertBefore(s,a)}})),h.length>0}function renderProvider(t,e,i,n){void 0===i&&(i=e.__CROACT__),void 0===n&&(n={});var s=!!i;i||(i=new ContainerProvider(e));var a=[];return renderProviders(i,i._ps,t?[t]:[],a,n,void 0,void 0),executeHooks(a),setCurrentInstance(null),s||(e.__CROACT__=i),i}function renderSelf(t,e,i){return!i&&t&&((i=new ContainerProvider(e.parentElement))._hyd=[e],i._sel=!0),renderProvider(t,e,i),i}function checkHookInfo(t){var e=getCurrentInstance(),i=e._hs||(e._hs=[]),n=getHooksIndex(),s=i[n];if(setHooksInex(n+1),s){if(!isDiff(s.deps,t.deps))return s.updated=!1,s;i[n]=t}else i.push(t);return t.value=t.func(),t.updated=!0,t}function useMemo(t,e){return checkHookInfo({func:t,deps:e}).value}function useRef(t){return useMemo((function(){return createRef(t)}),[])}function useEffect(t,e,i){var n=getCurrentInstance(),s=checkHookInfo({func:function(){return t},deps:e}),a=i?n._usefs:n._uefs;s.updated?a.push((function(){return s.effect&&s.effect(),s.effect=t(),s.effect})):a.push((function(){return s.effect}))}function useImperativeHandle(t,e,i){useEffect((function(){null==t||t(e())}),i,!0)}function some(t,e){for(var i=t.length,n=0;n<i;++n)if(e(t[n],n))return!0;return!1}function find$1(t,e){for(var i=t.length,n=0;n<i;++n)if(e(t[n],n))return t[n];return null}function getUserAgentString(t){var e=t;if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}function execRegExp(t,e){try{return new RegExp(t,"g").exec(e)}catch(i){return null}}function hasUserAgentData(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var t=navigator.userAgentData,e=t.brands||t.uaList;return!(!e||!e.length)}function findVersion(t,e){var i=execRegExp("("+t+")((?:\\/|\\s|:)([0-9|\\.|_]+))",e);return i?i[3]:""}function convertVersion(t){return t.replace(/_/g,".")}function findPreset(t,e){var i=null,n="-1";return some(t,(function(t){var s=execRegExp("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",e);return!(!s||t.brand)&&(i=t,n=s[3]||"-1",t.versionAlias?n=t.versionAlias:t.versionTest&&(n=findVersion(t.versionTest.toLowerCase(),e)||n),n=convertVersion(n),!0)})),{preset:i,version:n}}function findPresetBrand(t,e){var i={brand:"",version:"-1"};return some(t,(function(t){var n=findBrand(e,t);return!!n&&(i.brand=t.id,i.version=t.versionAlias||n.version,"-1"!==i.version)})),i}function findBrand(t,e){return find$1(t,(function(t){var i=t.brand;return execRegExp(""+e.test,i.toLowerCase())}))}var BROWSER_PRESETS=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],CHROMIUM_PRESETS=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],WEBKIT_PRESETS=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],WEBVIEW_PRESETS=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],OS_PRESETS=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function isWebView(t){return!!findPreset(WEBVIEW_PRESETS,t).preset}function getLegacyAgent(t){var e=getUserAgentString(t),i=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:isWebView(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},s={name:"unknown",version:"-1",majorVersion:-1},a=findPreset(BROWSER_PRESETS,e),o=a.preset,r=a.version,l=findPreset(OS_PRESETS,e),h=l.preset,c=l.version,u=findPreset(CHROMIUM_PRESETS,e);if(n.chromium=!!u.preset,n.chromiumVersion=u.version,!n.chromium){var d=findPreset(WEBKIT_PRESETS,e);n.webkit=!!d.preset,n.webkitVersion=d.version}return h&&(s.name=h.id,s.version=c,s.majorVersion=parseInt(c,10)),o&&(n.name=o.id,n.version=r,n.webview&&"ios"===s.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:s,isMobile:i,isHints:!1}}function getClientHintsAgent(t){var e=navigator.userAgentData,i=(e.uaList||e.brands).slice(),n=t&&t.fullVersionList,s=e.mobile||!1,a=i[0],o=(t&&t.platform||e.platform||navigator.platform).toLowerCase(),r={name:a.brand,version:a.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!findPresetBrand(WEBVIEW_PRESETS,i).brand||isWebView(getUserAgentString())},l={name:"unknown",version:"-1",majorVersion:-1};r.webkit=!r.chromium&&some(WEBKIT_PRESETS,(function(t){return findBrand(i,t)}));var h=findPresetBrand(CHROMIUM_PRESETS,i);if(r.chromium=!!h.brand,r.chromiumVersion=h.version||"-1",!r.chromium){var c=findPresetBrand(WEBKIT_PRESETS,i);r.webkit=!!c.brand,r.webkitVersion=c.version||"-1"}var u=find$1(OS_PRESETS,(function(t){return new RegExp(""+t.test,"g").exec(o)}));if(l.name=u?u.id:"",t&&(l.version=t.platformVersion||"-1"),n&&n.length){var d=findPresetBrand(BROWSER_PRESETS,n);r.name=d.brand||r.name,r.version=d.version||r.version}else{var p=findPresetBrand(BROWSER_PRESETS,i);r.name=p.brand||r.name,r.version=p.brand&&t?t.uaFullVersion:p.version}return r.webkit&&(l.name=s?"ios":"mac"),"ios"===l.name&&r.webview&&(r.version="-1"),l.version=convertVersion(l.version),r.version=convertVersion(r.version),l.majorVersion=parseInt(l.version,10),r.majorVersion=parseInt(r.version,10),{browser:r,os:l,isMobile:s,isHints:!0}}function agent$1(t){return void 0===t&&hasUserAgentData()?getClientHintsAgent():getLegacyAgent(t)}function add$1(t,e,i,n,s,a){for(var o=0;o<s;++o){var r=i+o*s,l=n+o*s;t[r]+=t[l]*a,e[r]+=e[l]*a}}function swap(t,e,i,n,s){for(var a=0;a<s;++a){var o=i+a*s,r=n+a*s,l=t[o],h=e[o];t[o]=t[r],t[r]=l,e[o]=e[r],e[r]=h}}function divide(t,e,i,n,s){for(var a=0;a<n;++a){var o=i+a*n;t[o]/=s,e[o]/=s}}function ignoreDimension(t,e,i){void 0===i&&(i=Math.sqrt(t.length));for(var n=t.slice(),s=0;s<i;++s)n[s*i+e-1]=0,n[(e-1)*i+s]=0;return n[(e-1)*(i+1)]=1,n}function invert$1(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var i=t.slice(),n=createIdentityMatrix(e),s=0;s<e;++s){var a=e*s+s;if(!throttle$1(i[a],TINY_NUM$1))for(var o=s+1;o<e;++o)if(i[e*s+o]){swap(i,n,s,o,e);break}if(!throttle$1(i[a],TINY_NUM$1))return[];divide(i,n,s,e,i[a]);for(o=0;o<e;++o){var r=o,l=i[o+s*e];throttle$1(l,TINY_NUM$1)&&s!==o&&add$1(i,n,r,s,e,-l)}}return n}function transpose(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var i=[],n=0;n<e;++n)for(var s=0;s<e;++s)i[s*e+n]=t[e*n+s];return i}function getOrigin(t,e){void 0===e&&(e=Math.sqrt(t.length));for(var i=[],n=t[e*e-1],s=0;s<e-1;++s)i[s]=t[e*(e-1)+s]/n;return i[e-1]=0,i}function fromTranslation(t,e){for(var i=createIdentityMatrix(e),n=0;n<e-1;++n)i[e*(e-1)+n]=t[n]||0;return i}function convertPositionMatrix(t,e){for(var i=t.slice(),n=t.length;n<e-1;++n)i[n]=0;return i[e-1]=1,i}function convertDimension(t,e,i){if(void 0===e&&(e=Math.sqrt(t.length)),e===i)return t;for(var n=createIdentityMatrix(i),s=Math.min(e,i),a=0;a<s-1;++a){for(var o=0;o<s-1;++o)n[a*i+o]=t[a*e+o];n[(a+1)*i-1]=t[(a+1)*e-1],n[(i-1)*i+a]=t[(e-1)*e+a]}return n[i*i-1]=t[e*e-1],n}function multiplies(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=createIdentityMatrix(t);return e.forEach((function(e){n=multiply(n,e,t)})),n}function multiply(t,e,i){void 0===i&&(i=Math.sqrt(t.length));var n=[],s=t.length/i,a=e.length/s;if(!s)return e;if(!a)return t;for(var o=0;o<i;++o)for(var r=0;r<a;++r){n[r*i+o]=0;for(var l=0;l<s;++l)n[r*i+o]+=t[l*i+o]*e[r*s+l]}return n}function plus(t,e){for(var i=Math.min(t.length,e.length),n=t.slice(),s=0;s<i;++s)n[s]=n[s]+e[s];return n}function minus(t,e){for(var i=Math.min(t.length,e.length),n=t.slice(),s=0;s<i;++s)n[s]=n[s]-e[s];return n}function convertCSStoMatrix(t,e){return void 0===e&&(e=6===t.length),e?[t[0],t[1],0,t[2],t[3],0,t[4],t[5],1]:t}function convertMatrixtoCSS(t,e){return void 0===e&&(e=9===t.length),e?[t[0],t[1],t[3],t[4],t[6],t[7]]:t}function calculate(t,e,i){void 0===i&&(i=e.length);var n=multiply(t,e,i),s=n[i-1];return n.map((function(t){return t/s}))}function rotateX3d(t,e){return multiply(t,[1,0,0,0,0,Math.cos(e),Math.sin(e),0,0,-Math.sin(e),Math.cos(e),0,0,0,0,1],4)}function rotateY3d(t,e){return multiply(t,[Math.cos(e),0,-Math.sin(e),0,0,1,0,0,Math.sin(e),0,Math.cos(e),0,0,0,0,1],4)}function rotateZ3d(t,e){return multiply(t,createRotateMatrix(e,4))}function scale3d(t,e){var i=e[0],n=void 0===i?1:i,s=e[1],a=void 0===s?1:s,o=e[2];return multiply(t,[n,0,0,0,0,a,0,0,0,0,void 0===o?1:o,0,0,0,0,1],4)}function rotate$1(t,e){return calculate(createRotateMatrix(e,3),convertPositionMatrix(t,3))}function translate3d(t,e){var i=e[0],n=void 0===i?0:i,s=e[1],a=void 0===s?0:s,o=e[2];return multiply(t,[1,0,0,0,0,1,0,0,0,0,1,0,n,a,void 0===o?0:o,1],4)}function matrix3d(t,e){return multiply(t,e,4)}function createRotateMatrix(t,e){var i=Math.cos(t),n=Math.sin(t),s=createIdentityMatrix(e);return s[0]=i,s[1]=n,s[e]=-n,s[e+1]=i,s}function createIdentityMatrix(t){for(var e=t*t,i=[],n=0;n<e;++n)i[n]=n%(t+1)?0:1;return i}function createScaleMatrix(t,e){for(var i=createIdentityMatrix(e),n=Math.min(t.length,e-1),s=0;s<n;++s)i[(e+1)*s]=t[s];return i}function createOriginMatrix(t,e){for(var i=createIdentityMatrix(e),n=Math.min(t.length,e-1),s=0;s<n;++s)i[e*(e-1)+s]=t[s];return i}function createWarpMatrix(t,e,i,n,s,a,o,r){var l=t[0],h=t[1],c=e[0],u=e[1],d=i[0],p=i[1],g=n[0],f=n[1],m=s[0],v=s[1],b=a[0],y=a[1],S=o[0],x=o[1],w=r[0],C=r[1],T=invert$1([l,0,c,0,d,0,g,0,h,0,u,0,p,0,f,0,1,0,1,0,1,0,1,0,0,l,0,c,0,d,0,g,0,h,0,u,0,p,0,f,0,1,0,1,0,1,0,1,-m*l,-v*l,-b*c,-y*c,-S*d,-x*d,-w*g,-C*g,-m*h,-v*h,-b*u,-y*u,-S*p,-x*p,-w*f,-C*f],8);if(!T.length)return[];var D=multiply(T,[m,v,b,y,S,x,w,C],8);return D[8]=1,convertDimension(transpose(D),3,4)}var __assign$7=function(){return __assign$7=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$7.apply(this,arguments)};function createMatrix(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function parseMat(t,e){return void 0===e&&(e=0),toMat(parse$1(t,e))}function calculateMatrixDist(t,e){var i=calculate(t,[e[0],e[1]||0,e[2]||0,1],4),n=i[3]||1;return[i[0]/n,i[1]/n,i[2]/n]}function getDistElementMatrix(t,e){void 0===e&&(e=document.body);for(var i=t,n=createMatrix();i;){if(n=matrix3d(parseMat(getComputedStyle(i).transform),n),i===e)break;i=i.parentElement}return(n=invert$1(n,4))[12]=0,n[13]=0,n[14]=0,n}function toMat(t){var e=createMatrix();return t.forEach((function(t){var i=t.matrixFunction,n=t.functionValue;i&&(e=i(e,n))})),e}function parse$1(t,e){return void 0===e&&(e=0),(isArray$1(t)?t:splitSpace(t)).map((function(t){var i=splitBracket(t),n=i.prefix,s=i.value,a=null,o=n,r="";if("translate"===n||"translateX"===n||"translate3d"===n){var l=isObject$3(e)?__assign$7(__assign$7({},e),{"o%":e["%"]}):{"%":e,"o%":e},h=splitComma(s).map((function(t,i){return l["%"]=0===i&&"x%"in l?e["x%"]:1===i&&"y%"in l?e["y%"]:e["o%"],convertUnitSize(t,l)})),c=h[0],u=h[1],d=void 0===u?0:u,p=h[2];a=translate3d,r=[c,d,void 0===p?0:p]}else if("translateY"===n){a=translate3d,r=[0,d=convertUnitSize(s,isObject$3(e)?__assign$7({"%":e["y%"]},e):{"%":e}),0]}else if("translateZ"===n){a=translate3d,r=[0,0,parseFloat(s)]}else if("scale"===n||"scale3d"===n){var g=splitComma(s).map((function(t){return parseFloat(t)})),f=g[0],m=g[1],v=void 0===m?f:m,b=g[2];a=scale3d,r=[f,v,void 0===b?1:b]}else if("scaleX"===n){a=scale3d,r=[f=parseFloat(s),1,1]}else if("scaleY"===n){a=scale3d,r=[1,v=parseFloat(s),1]}else if("scaleZ"===n){a=scale3d,r=[1,1,parseFloat(s)]}else if("rotate"===n||"rotateZ"===n||"rotateX"===n||"rotateY"===n){var y=splitUnit(s),S=y.unit,x=y.value;"rotate"===n||"rotateZ"===n?(o="rotateZ",a=rotateZ3d):"rotateX"===n?a=rotateX3d:"rotateY"===n&&(a=rotateY3d),r="rad"===S?x:x*Math.PI/180}else if("matrix3d"===n)a=matrix3d,r=splitComma(s).map((function(t){return parseFloat(t)}));else if("matrix"===n){var w=splitComma(s).map((function(t){return parseFloat(t)}));a=matrix3d,r=[w[0],w[1],0,0,w[2],w[3],0,0,0,0,1,0,w[4],w[5],0,1]}else o="";return{name:n,functionName:o,value:s,matrixFunction:a,functionValue:r}}))}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var extendStatics$5=function(t,e){return(extendStatics$5=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])})(t,e)};function __extends$5(t,e){function i(){this.constructor=t}extendStatics$5(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var findKeyCallback="function"==typeof Map?void 0:(childrenCount=0,function(t){return t.__DIFF_KEY__||(t.__DIFF_KEY__=++childrenCount)}),childrenCount,ChildrenDiffer=function(t){function e(e){return void 0===e&&(e=[]),t.call(this,e,findKeyCallback)||this}return __extends$5(e,t),e}(ListDiffer);function diff(t,e){return diff$1(t,e,findKeyCallback)}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var __assign$6=function(){return __assign$6=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$6.apply(this,arguments)};function __spreadArrays$1(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,r=a.length;o<r;o++,s++)n[s]=a[o];return n}var EventEmitter=function(){function t(){this._events={}}var e=t.prototype;return e.on=function(t,e){if(isObject$3(t))for(var i in t)this.on(i,t[i]);else this._addEvent(t,e,{});return this},e.off=function(t,e){if(t)if(isObject$3(t))for(var i in t)this.off(i);else if(e){var n=this._events[t];if(n){var s=findIndex(n,(function(t){return t.listener===e}));s>-1&&n.splice(s,1)}}else this._events[t]=[];else this._events={};return this},e.once=function(t,e){var i=this;return e&&this._addEvent(t,e,{once:!0}),new Promise((function(e){i._addEvent(t,e,{once:!0})}))},e.emit=function(t,e){var i=this;void 0===e&&(e={});var n=this._events[t];if(!t||!n)return!0;var s=!1;return e.eventType=t,e.stop=function(){s=!0},e.currentTarget=this,__spreadArrays$1(n).forEach((function(n){n.listener(e),n.once&&i.off(t,n.listener)})),!s},e.trigger=function(t,e){return void 0===e&&(e={}),this.emit(t,e)},e._addEvent=function(t,e,i){var n=this._events;n[t]=n[t]||[],n[t].push(__assign$6({listener:e},i))},t}(),EventEmitter$1=EventEmitter,extendStatics$4=function(t,e){return(extendStatics$4=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])})(t,e)};function __extends$4(t,e){function i(){this.constructor=t}extendStatics$4(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$5=function(){return __assign$5=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$5.apply(this,arguments)};function getDefaultScrollPosition$1(t){var e=t.container;return e===document.body?[e.scrollLeft||document.documentElement.scrollLeft,e.scrollTop||document.documentElement.scrollTop]:[e.scrollLeft,e.scrollTop]}function checkDefaultScrollEvent(t,e){return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}function getContainerElement(t){return t?isString$1(t)?document.querySelector(t):isFunction$1(t)?t():t instanceof Element?t:"current"in t?t.current:"value"in t?t.value:void 0:null}var DragScroll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._startRect=null,e._startPos=[],e._prevTime=0,e._timer=0,e._prevScrollPos=[0,0],e._isWait=!1,e._flag=!1,e._currentOptions=null,e._lock=!1,e._unregister=null,e._onScroll=function(){var t=e._currentOptions;!e._lock&&t&&e.emit("scrollDrag",{next:function(i){e.checkScroll({container:t.container,inputEvent:i})}})},e}__extends$4(e,t);var i=e.prototype;return i.dragStart=function(t,e){var i=getContainerElement(e.container);if(i){var n=0,s=0,a=0,o=0;if(i===document.body)a=window.innerWidth,o=window.innerHeight;else{var r=i.getBoundingClientRect();n=r.top,s=r.left,a=r.width,o=r.height}this._flag=!0,this._startPos=[t.clientX,t.clientY],this._startRect={top:n,left:s,width:a,height:o},this._prevScrollPos=this._getScrollPosition([0,0],e),this._currentOptions=e,this._registerScrollEvent(e)}else this._flag=!1},i.drag=function(t,e){if(clearTimeout(this._timer),this._flag){var i=t.clientX,n=t.clientY,s=e.threshold,a=void 0===s?0:s,o=this._startRect,r=this._startPos;this._currentOptions=e;var l=[0,0];return o.top>n-a?(r[1]>o.top||n<r[1])&&(l[1]=-1):o.top+o.height<n+a&&(r[1]<o.top+o.height||n>r[1])&&(l[1]=1),o.left>i-a?(r[0]>o.left||i<r[0])&&(l[0]=-1):o.left+o.width<i+a&&(r[0]<o.left+o.width||i>r[0])&&(l[0]=1),!(!l[0]&&!l[1])&&this._continueDrag(__assign$5(__assign$5({},e),{direction:l,inputEvent:t,isDrag:!0}))}},i.checkScroll=function(t){var e=this;if(this._isWait)return!1;var i=t.prevScrollPos,n=void 0===i?this._prevScrollPos:i,s=t.direction,a=t.throttleTime,o=void 0===a?0:a,r=t.inputEvent,l=t.isDrag,h=this._getScrollPosition(s||[0,0],t),c=h[0]-n[0],u=h[1]-n[1],d=s||[c?Math.abs(c)/c:0,u?Math.abs(u)/u:0];return this._prevScrollPos=h,this._lock=!1,!(!c&&!u)&&(this.emit("move",{offsetX:d[0]?c:0,offsetY:d[1]?u:0,inputEvent:r}),o&&l&&(clearTimeout(this._timer),this._timer=window.setTimeout((function(){e._continueDrag(t)}),o)),!0)},i.dragEnd=function(){this._flag=!1,this._lock=!1,clearTimeout(this._timer),this._unregisterScrollEvent()},i._getScrollPosition=function(t,e){var i=e.container,n=e.getScrollPosition;return(void 0===n?getDefaultScrollPosition$1:n)({container:getContainerElement(i),direction:t})},i._continueDrag=function(t){var e,i=this,n=t.container,s=t.direction,a=t.throttleTime,o=t.useScroll,r=t.isDrag,l=t.inputEvent;if(!(!this._flag||r&&this._isWait)){var h=now(),c=Math.max(a+this._prevTime-h,0);if(c>0)return clearTimeout(this._timer),this._timer=window.setTimeout((function(){i._continueDrag(t)}),c),!1;this._prevTime=h;var u=this._getScrollPosition(s,t);this._prevScrollPos=u,r&&(this._isWait=!0),o||(this._lock=!0);var d={container:getContainerElement(n),direction:s,inputEvent:l};return null===(e=t.requestScroll)||void 0===e||e.call(t,d),this.emit("scroll",d),this._isWait=!1,o||this.checkScroll(__assign$5(__assign$5({},t),{prevScrollPos:u,direction:s,inputEvent:l}))}},i._registerScrollEvent=function(t){this._unregisterScrollEvent();var e=t.checkScrollEvent;if(e){var i=!0===e?checkDefaultScrollEvent:e,n=getContainerElement(t.container);!0!==e||n!==document.body&&n!==document.documentElement?this._unregister=i(n,this._onScroll):this._unregister=checkDefaultScrollEvent(window,this._onScroll)}},i._unregisterScrollEvent=function(){var t;null===(t=this._unregister)||void 0===t||t.call(this),this._unregister=null},e}(EventEmitter$1),DragScroll$1=DragScroll;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __spreadArrays(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,r=a.length;o<r;o++,s++)n[s]=a[o];return n}function tinyThrottle(t){return throttle$1(t,TINY_NUM$1)}function isSameConstants(t,e){return t.every((function(t,i){return 0===tinyThrottle(t-e[i])}))}function isSamePoint(t,e){return!tinyThrottle(t[0]-e[0])&&!tinyThrottle(t[1]-e[1])}function getAreaSize(t){return t.length<3?0:Math.abs(sum(t.map((function(e,i){var n=t[i+1]||t[0];return e[0]*n[1]-n[0]*e[1]}))))/2}function fitPoints(t,e){var i=e.width,n=e.height,s=e.left,a=e.top,o=getMinMaxs(t),r=o.minX,l=o.minY,h=o.maxX,c=o.maxY,u=i/(h-r),d=n/(c-l);return t.map((function(t){return[s+(t[0]-r)*u,a+(t[1]-l)*d]}))}function getMinMaxs(t){var e=t.map((function(t){return t[0]})),i=t.map((function(t){return t[1]}));return{minX:Math.min.apply(Math,e),minY:Math.min.apply(Math,i),maxX:Math.max.apply(Math,e),maxY:Math.max.apply(Math,i)}}function isInside(t,e,i){var n=t[0],s=t[1],a=getMinMaxs(e),o=a.minX,r=a.maxX,l=[[o,s],[r,s]],h=getLinearConstants(l[0],l[1]),c=convertLines(e),u=[];if(c.forEach((function(e){var i=getLinearConstants(e[0],e[1]),n=e[0];isSameConstants(h,i)?u.push({pos:t,line:e,type:"line"}):getPointsOnLines(getIntersectionPointsByConstants(h,i),[l,e]).forEach((function(t){e.some((function(e){return isSamePoint(e,t)}))?u.push({pos:t,line:e,type:"point"}):0!==tinyThrottle(n[1]-s)&&u.push({pos:t,line:e,type:"intersection"})}))})),!i&&find$2(u,(function(t){return t[0]===n})))return!0;var d=0,p={};return u.forEach((function(t){var e=t.pos,i=t.type,a=t.line;if(!(e[0]>n))if("intersection"===i)++d;else{if("line"===i)return;if("point"===i){var o=find$2(a,(function(t){return t[1]!==s})),r=p[e[0]],l=o[1]>s?1:-1;r?r!==l&&++d:p[e[0]]=l}}})),d%2==1}function getLinearConstants(t,e){var i=t[0],n=t[1],s=e[0]-i,a=e[1]-n;Math.abs(s)<TINY_NUM$1&&(s=0),Math.abs(a)<TINY_NUM$1&&(a=0);var o=0,r=0,l=0;return s?a?(r=1,l=-(o=-a/s)*i-n):(r=1,l=-n):a&&(o=-1,l=i),[o,r,l]}function getIntersectionPointsByConstants(t,e){var i=t[0],n=t[1],s=t[2],a=e[0],o=e[1],r=e[2],l=0===i&&0===a,h=0===n&&0===o,c=[];if(l&&h)return[];if(l){var u=-s/n;return u!==-r/o?[]:[[-1/0,u],[1/0,u]]}if(h){var d=-s/i;return d!==-r/a?[]:[[d,-1/0],[d,1/0]]}if(0===i)c=[[p=-(o*(g=-s/n)+r)/a,g]];else if(0===a){c=[[p=-(n*(g=-r/o)+s)/i,g]]}else if(0===n){c=[[p=-s/i,g=-(a*p+r)/o]]}else if(0===o){c=[[p=-r/a,g=-(i*p+s)/n]]}else{var p,g;c=[[p=(n*r-o*s)/(o*i-n*a),g=-(i*p+s)/n]]}return c.map((function(t){return[t[0],t[1]]}))}function getPointsOnLines(t,e){var i=e.map((function(t){return[0,1].map((function(e){return[Math.min(t[0][e],t[1][e]),Math.max(t[0][e],t[1][e])]}))})),n=[];if(2===t.length){var s=t[0],a=s[0],o=s[1];if(tinyThrottle(a-t[1][0])){if(!tinyThrottle(o-t[1][1])){var r=Math.max.apply(Math,i.map((function(t){return t[0][0]}))),l=Math.min.apply(Math,i.map((function(t){return t[0][1]})));if(tinyThrottle(r-l)>0)return[];n=[[r,o],[l,o]]}}else{var h=Math.max.apply(Math,i.map((function(t){return t[1][0]}))),c=Math.min.apply(Math,i.map((function(t){return t[1][1]})));if(tinyThrottle(h-c)>0)return[];n=[[a,h],[a,c]]}}return n.length||(n=t.filter((function(t){var e=t[0],n=t[1];return i.every((function(t){return 0<=tinyThrottle(e-t[0][0])&&0<=tinyThrottle(t[0][1]-e)&&0<=tinyThrottle(n-t[1][0])&&0<=tinyThrottle(t[1][1]-n)}))}))),n.map((function(t){return[tinyThrottle(t[0]),tinyThrottle(t[1])]}))}function convertLines(t){return __spreadArrays(t.slice(1),[t[0]]).map((function(e,i){return[t[i],e]}))}function getOverlapPointInfos(t,e){var i=t.slice(),n=e.slice();-1===getShapeDirection(i)&&i.reverse(),-1===getShapeDirection(n)&&n.reverse();var s=convertLines(i),a=convertLines(n),o=s.map((function(t){return getLinearConstants(t[0],t[1])})),r=a.map((function(t){return getLinearConstants(t[0],t[1])})),l=[];o.forEach((function(t,e){var i=s[e],o=[];r.forEach((function(n,s){var r=getPointsOnLines(getIntersectionPointsByConstants(t,n),[i,a[s]]);o.push.apply(o,r.map((function(t){return{index1:e,index2:s,pos:t,type:"intersection"}})))})),o.sort((function(t,e){return getDist$2(i[0],t.pos)-getDist$2(i[0],e.pos)})),l.push.apply(l,o),isInside(i[1],n)&&l.push({index1:e,index2:-1,pos:i[1],type:"inside"})})),a.forEach((function(t,e){if(isInside(t[1],i)){var n=!1,s=findIndex(l,(function(t){return t.index2===e?(n=!0,!1):!!n}));-1===s&&(n=!1,s=findIndex(l,(function(t){var i=t.index1,s=t.index2;return-1===i&&s+1===e?(n=!0,!1):!!n}))),-1===s?l.push({index1:-1,index2:e,pos:t[1],type:"inside"}):l.splice(s,0,{index1:-1,index2:e,pos:t[1],type:"inside"})}}));var h={};return l.filter((function(t){var e=t.pos,i=e[0]+"x"+e[1];return!h[i]&&(h[i]=!0,!0)}))}function getOverlapPoints(t,e){return getOverlapPointInfos(t,e).map((function(t){return t.pos}))}function getOverlapSize$1(t,e){return getAreaSize(getOverlapPoints(t,e))}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var extendStatics$3=function(t,e){return(extendStatics$3=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])})(t,e)};function __extends$3(t,e){function i(){this.constructor=t}extendStatics$3(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$4=function(){return __assign$4=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$4.apply(this,arguments)};function getRad(t,e){var i=e[0]-t[0],n=e[1]-t[1],s=Math.atan2(n,i);return s>=0?s:s+2*Math.PI}function getRotatiion(t){return getRad([t[0].clientX,t[0].clientY],[t[1].clientX,t[1].clientY])/Math.PI*180}function isMultiTouch(t){return t.touches&&t.touches.length>=2}function getEventClients(t){return t?t.touches?getClients(t.touches):[getClient(t)]:[]}function isMouseEvent(t){return t&&(t.type.indexOf("mouse")>-1||"button"in t)}function getPosition(t,e,i){var n=i.length,s=getAverageClient(t,n),a=s.clientX,o=s.clientY,r=s.originalClientX,l=s.originalClientY,h=getAverageClient(e,n),c=h.clientX,u=h.clientY,d=getAverageClient(i,n);return{clientX:r,clientY:l,deltaX:a-c,deltaY:o-u,distX:a-d.clientX,distY:o-d.clientY}}function getDist$1(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}function getClients(t){for(var e=Math.min(t.length,2),i=[],n=0;n<e;++n)i.push(getClient(t[n]));return i}function getClient(t){return{clientX:t.clientX,clientY:t.clientY}}function getAverageClient(t,e){void 0===e&&(e=t.length);for(var i={clientX:0,clientY:0,originalClientX:0,originalClientY:0},n=Math.min(t.length,e),s=0;s<n;++s){var a=t[s];i.originalClientX+="originalClientX"in a?a.originalClientX:a.clientX,i.originalClientY+="originalClientY"in a?a.originalClientY:a.clientY,i.clientX+=a.clientX,i.clientY+=a.clientY}return e?{clientX:i.clientX/e,clientY:i.clientY/e,originalClientX:i.originalClientX/e,originalClientY:i.originalClientY/e}:i}var ClientStore=function(){function t(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return t.prototype.getAngle=function(t){return void 0===t&&(t=this.prevClients),getRotatiion(t)},t.prototype.getRotation=function(t){return void 0===t&&(t=this.prevClients),getRotatiion(t)-getRotatiion(this.startClients)},t.prototype.getPosition=function(t,e){void 0===t&&(t=this.prevClients);var i=getPosition(t||this.prevClients,this.prevClients,this.startClients),n=i.deltaX,s=i.deltaY;return this.movement+=Math.sqrt(n*n+s*s),this.prevClients=t,i},t.prototype.getPositions=function(t){void 0===t&&(t=this.prevClients);for(var e=this.prevClients,i=this.startClients,n=Math.min(this.length,e.length),s=[],a=0;a<n;++a)s[a]=getPosition([t[a]],[e[a]],[i[a]]);return s},t.prototype.getMovement=function(t){var e=this.movement;if(!t)return e;var i=getAverageClient(t,this.length),n=getAverageClient(this.prevClients,this.length),s=i.clientX-n.clientX,a=i.clientY-n.clientY;return Math.sqrt(s*s+a*a)+e},t.prototype.getDistance=function(t){return void 0===t&&(t=this.prevClients),getDist$1(t)},t.prototype.getScale=function(t){return void 0===t&&(t=this.prevClients),getDist$1(t)/getDist$1(this.startClients)},t.prototype.move=function(t,e){this.startClients.forEach((function(i){i.clientX-=t,i.clientY-=e})),this.prevClients.forEach((function(i){i.clientX-=t,i.clientY-=e}))},t}(),INPUT_TAGNAMES=["textarea","input"],Gesto=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this)||this;n.options={},n.flag=!1,n.pinchFlag=!1,n.data={},n.isDrag=!1,n.isPinch=!1,n.clientStores=[],n.targets=[],n.prevTime=0,n.doubleFlag=!1,n._useMouse=!1,n._useTouch=!1,n._useDrag=!1,n._dragFlag=!1,n._isTrusted=!1,n._isMouseEvent=!1,n._isSecondaryButton=!1,n._preventMouseEvent=!1,n._prevInputEvent=null,n._isDragAPI=!1,n._isIdle=!0,n._preventMouseEventId=0,n._window=window,n.onDragStart=function(t,e){if(void 0===e&&(e=!0),n.flag||!1!==t.cancelable){var i=t.type.indexOf("drag")>=-1;if(!n.flag||!i){n._isDragAPI=!0;var s=n.options,a=s.container,o=s.pinchOutside,r=s.preventWheelClick,l=s.preventRightClick,h=s.preventDefault,c=s.checkInput,u=s.dragFocusedInput,d=s.preventClickEventOnDragStart,p=s.preventClickEventOnDrag,g=s.preventClickEventByCondition,f=n._useTouch,m=!n.flag;if(n._isSecondaryButton=3===t.which||2===t.button,r&&(2===t.which||1===t.button)||l&&(3===t.which||2===t.button))return n.stop(),!1;if(m){var v=n._window.document.activeElement,b=t.target;if(b){var y=b.tagName.toLowerCase(),S=INPUT_TAGNAMES.indexOf(y)>-1,x=b.isContentEditable;if(S||x){if(c||!u&&v===b)return!1;if(v&&(v===b||x&&v.isContentEditable&&v.contains(b))){if(!u)return!1;b.blur()}}else if((h||"touchstart"===t.type)&&v){var w=v.tagName.toLowerCase();(v.isContentEditable||INPUT_TAGNAMES.indexOf(w)>-1)&&v.blur()}(d||p||g)&&addEvent(n._window,"click",n._onClick,!0)}n.clientStores=[new ClientStore(getEventClients(t))],n._isIdle=!1,n.flag=!0,n.isDrag=!1,n._isTrusted=e,n._dragFlag=!0,n._prevInputEvent=t,n.data={},n.doubleFlag=now()-n.prevTime<200,n._isMouseEvent=isMouseEvent(t),!n._isMouseEvent&&n._preventMouseEvent&&n._allowMouseEvent(),!1===(n._preventMouseEvent||n.emit("dragStart",__assign$4(__assign$4({data:n.data,datas:n.data,inputEvent:t,isMouseEvent:n._isMouseEvent,isSecondaryButton:n._isSecondaryButton,isTrusted:e,isDouble:n.doubleFlag},n.getCurrentStore().getPosition()),{preventDefault:function(){t.preventDefault()},preventDrag:function(){n._dragFlag=!1}})))&&n.stop(),n._isMouseEvent&&n.flag&&h&&t.preventDefault()}if(!n.flag)return!1;var C=0;if(m?(n._attchDragEvent(),f&&o&&(C=setTimeout((function(){addEvent(a,"touchstart",n.onDragStart,{passive:!1})})))):f&&o&&removeEvent(a,"touchstart",n.onDragStart),n.flag&&isMultiTouch(t)){if(clearTimeout(C),m&&t.touches.length!==t.changedTouches.length)return;n.pinchFlag||n.onPinchStart(t)}}}},n.onDrag=function(t,e){if(n.flag){var i=n.options.preventDefault;!n._isMouseEvent&&i&&t.preventDefault(),n._prevInputEvent=t;var s=getEventClients(t),a=n.moveClients(s,t,!1);if(n._dragFlag){if(n.pinchFlag||a.deltaX||a.deltaY)if(!1===(n._preventMouseEvent||n.emit("drag",__assign$4(__assign$4({},a),{isScroll:!!e,inputEvent:t}))))return void n.stop();n.pinchFlag&&n.onPinch(t,s)}n.getCurrentStore().getPosition(s,!0)}},n.onDragEnd=function(t){if(n.flag){var e=n.options,i=e.pinchOutside,s=e.container,a=e.preventClickEventOnDrag,o=e.preventClickEventOnDragStart,r=e.preventClickEventByCondition,l=n.isDrag;(a||o||r)&&requestAnimationFrame((function(){n._allowClickEvent()})),r||o||!a||l||n._allowClickEvent(),n._useTouch&&i&&removeEvent(s,"touchstart",n.onDragStart),n.pinchFlag&&n.onPinchEnd(t);var h=(null==t?void 0:t.touches)?getEventClients(t):[];0!==h.length&&n.options.keepDragging?n._addStore(new ClientStore(h)):n.flag=!1;var c=n._getPosition(),u=now(),d=!l&&n.doubleFlag;n._prevInputEvent=null,n.prevTime=l||d?0:u,n.flag||(n._dettachDragEvent(),n._preventMouseEvent||n.emit("dragEnd",__assign$4({data:n.data,datas:n.data,isDouble:d,isDrag:l,isClick:!l,isMouseEvent:n._isMouseEvent,isSecondaryButton:n._isSecondaryButton,inputEvent:t,isTrusted:n._isTrusted},c)),n.clientStores=[],n._isMouseEvent||(n._preventMouseEvent=!0,clearTimeout(n._preventMouseEventId),n._preventMouseEventId=setTimeout((function(){n._preventMouseEvent=!1}),200)),n._isIdle=!0)}},n.onBlur=function(){n.onDragEnd()},n._allowClickEvent=function(){removeEvent(n._window,"click",n._onClick,!0)},n._onClick=function(t){n._allowClickEvent(),n._allowMouseEvent();var e=n.options.preventClickEventByCondition;(null==e?void 0:e(t))||(t.stopPropagation(),t.preventDefault())},n._onContextMenu=function(t){n.options.preventRightClick?n.onDragEnd(t):t.preventDefault()},n._passCallback=function(){};var s=[].concat(e),a=s[0];n._window=isWindow(a)?a:getWindow(a),n.options=__assign$4({checkInput:!1,container:a&&!("document"in a)?getWindow(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},i);var o=n.options,r=o.container,l=o.events,h=o.checkWindowBlur;if(n._useDrag=l.indexOf("drag")>-1,n._useTouch=l.indexOf("touch")>-1,n._useMouse=l.indexOf("mouse")>-1,n.targets=s,n._useDrag&&s.forEach((function(t){addEvent(t,"dragstart",n.onDragStart)})),n._useMouse&&(s.forEach((function(t){addEvent(t,"mousedown",n.onDragStart),addEvent(t,"mousemove",n._passCallback)})),addEvent(r,"contextmenu",n._onContextMenu)),h&&addEvent(getWindow(),"blur",n.onBlur),n._useTouch){var c={passive:!1};s.forEach((function(t){addEvent(t,"touchstart",n.onDragStart,c),addEvent(t,"touchmove",n._passCallback,c)}))}return n}return __extends$3(e,t),e.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},e.prototype.getMovement=function(t){return this.getCurrentStore().getMovement(t)+this.clientStores.slice(1).reduce((function(t,e){return t+e.movement}),0)},e.prototype.isDragging=function(){return this.isDrag},e.prototype.isIdle=function(){return this._isIdle},e.prototype.isFlag=function(){return this.flag},e.prototype.isPinchFlag=function(){return this.pinchFlag},e.prototype.isDoubleFlag=function(){return this.doubleFlag},e.prototype.isPinching=function(){return this.isPinch},e.prototype.scrollBy=function(t,e,i,n){void 0===n&&(n=!0),this.flag&&(this.clientStores[0].move(t,e),n&&this.onDrag(i,!0))},e.prototype.move=function(t,e){var i=t[0],n=t[1],s=this.getCurrentStore().prevClients;return this.moveClients(s.map((function(t){var e=t.clientX,s=t.clientY;return{clientX:e+i,clientY:s+n,originalClientX:e,originalClientY:s}})),e,!0)},e.prototype.triggerDragStart=function(t){this.onDragStart(t,!1)},e.prototype.setEventData=function(t){var e=this.data;for(var i in t)e[i]=t[i];return this},e.prototype.setEventDatas=function(t){return this.setEventData(t)},e.prototype.getCurrentEvent=function(t){return void 0===t&&(t=this._prevInputEvent),__assign$4(__assign$4({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:t})},e.prototype.getEventData=function(){return this.data},e.prototype.getEventDatas=function(){return this.data},e.prototype.unset=function(){var t=this,e=this.targets,i=this.options.container;this.off(),removeEvent(this._window,"blur",this.onBlur),this._useDrag&&e.forEach((function(e){removeEvent(e,"dragstart",t.onDragStart)})),this._useMouse&&(e.forEach((function(e){removeEvent(e,"mousedown",t.onDragStart)})),removeEvent(i,"contextmenu",this._onContextMenu)),this._useTouch&&(e.forEach((function(e){removeEvent(e,"touchstart",t.onDragStart)})),removeEvent(i,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},e.prototype.onPinchStart=function(t){var e=this,i=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>i)){var n=new ClientStore(getEventClients(t));this.pinchFlag=!0,this._addStore(n),!1===this.emit("pinchStart",__assign$4(__assign$4({data:this.data,datas:this.data,angle:n.getAngle(),touches:this.getCurrentStore().getPositions()},n.getPosition()),{inputEvent:t,isTrusted:this._isTrusted,preventDefault:function(){t.preventDefault()},preventDrag:function(){e._dragFlag=!1}}))&&(this.pinchFlag=!1)}},e.prototype.onPinch=function(t,e){if(this.flag&&this.pinchFlag&&!(e.length<2)){var i=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",__assign$4(__assign$4({data:this.data,datas:this.data,movement:this.getMovement(e),angle:i.getAngle(e),rotation:i.getRotation(e),touches:i.getPositions(e),scale:i.getScale(e),distance:i.getDistance(e)},i.getPosition(e)),{inputEvent:t,isTrusted:this._isTrusted}))}},e.prototype.onPinchEnd=function(t){if(this.pinchFlag){var e=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var i=this.getCurrentStore();this.emit("pinchEnd",__assign$4(__assign$4({data:this.data,datas:this.data,isPinch:e,touches:i.getPositions()},i.getPosition()),{inputEvent:t}))}},e.prototype.getCurrentStore=function(){return this.clientStores[0]},e.prototype.moveClients=function(t,e,i){var n=this._getPosition(t,i),s=this.isDrag;(n.deltaX||n.deltaY)&&(this.isDrag=!0);var a=!1;return!s&&this.isDrag&&(a=!0),__assign$4(__assign$4({data:this.data,datas:this.data},n),{movement:this.getMovement(t),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:e,isTrusted:this._isTrusted,isFirstDrag:a})},e.prototype._addStore=function(t){this.clientStores.splice(0,0,t)},e.prototype._getPosition=function(t,e){var i=this.getCurrentStore().getPosition(t,e),n=this.clientStores.slice(1).reduce((function(t,e){var i=e.getPosition();return t.distX+=i.distX,t.distY+=i.distY,t}),i),s=n.distX,a=n.distY;return __assign$4(__assign$4({},i),{distX:s,distY:a})},e.prototype._attchDragEvent=function(){var t=this._window,e=this.options.container,i={passive:!1};this._isDragAPI&&(addEvent(e,"dragover",this.onDrag,i),addEvent(t,"dragend",this.onDragEnd)),this._useMouse&&(addEvent(e,"mousemove",this.onDrag),addEvent(t,"mouseup",this.onDragEnd)),this._useTouch&&(addEvent(e,"touchmove",this.onDrag,i),addEvent(t,"touchend",this.onDragEnd,i),addEvent(t,"touchcancel",this.onDragEnd,i))},e.prototype._dettachDragEvent=function(){var t=this._window,e=this.options.container;this._isDragAPI&&(removeEvent(e,"dragover",this.onDrag),removeEvent(t,"dragend",this.onDragEnd)),this._useMouse&&(removeEvent(e,"mousemove",this.onDrag),removeEvent(t,"mouseup",this.onDragEnd)),this._useTouch&&(removeEvent(e,"touchstart",this.onDragStart),removeEvent(e,"touchmove",this.onDrag),removeEvent(t,"touchend",this.onDragEnd),removeEvent(t,"touchcancel",this.onDragEnd))},e.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},e}(EventEmitter$1);function hash(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return e>>>0}var stringHash=hash;function getHash(t){return stringHash(t).toString(36)}function getShadowRoot$1(t){if(t&&t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e}}function replaceStyle(t,e,i){return i.original?e:e.replace(/([^};{\s}][^};{]*|^\s*){/gm,(function(e,i){var n=i.trim();return(n?splitComma(n):[""]).map((function(e){var i=e.trim();return 0===i.indexOf("@")?i:i.indexOf(":global")>-1?i.replace(/\:global/g,""):i.indexOf(":host")>-1?"".concat(i.replace(/\:host/g,".".concat(t))):i?".".concat(t," ").concat(i):".".concat(t)})).join(", ")+" {"}))}function injectStyle(t,e,i,n,s){var a=getDocument(n),o=a.createElement("style");return o.setAttribute("type","text/css"),o.setAttribute("data-styled-id",t),o.setAttribute("data-styled-count","1"),i.nonce&&o.setAttribute("nonce",i.nonce),o.innerHTML=replaceStyle(t,e,i),(s||a.head||a.body).appendChild(o),o}function styled$1(t){var e="rCS"+getHash(t);return{className:e,inject:function(i,n){void 0===n&&(n={});var s=getShadowRoot$1(i),a=(s||i.ownerDocument||document).querySelector('style[data-styled-id="'.concat(e,'"]'));if(a){var o=parseFloat(a.getAttribute("data-styled-count"))||0;a.setAttribute("data-styled-count","".concat(o+1))}else a=injectStyle(e,t,n,i,s);return{destroy:function(){var t,e=parseFloat(a.getAttribute("data-styled-count"))||0;e<=1?(a.remove?a.remove():null===(t=a.parentNode)||void 0===t||t.removeChild(a),a=null):a.setAttribute("data-styled-count","".concat(e-1))}}}}}var __assign$3=function(){return __assign$3=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$3.apply(this,arguments)};function __rest$1(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}function styled(t,e){var i=styled$1(e),n=i.className;return forwardRef((function(e,s){var a=e.className,o=void 0===a?"":a;e.cspNonce;var r=__rest$1(e,["className","cspNonce"]),l=useRef();return useImperativeHandle(s,(function(){return l.current}),[]),useEffect((function(){var t=i.inject(l.current,{nonce:e.cspNonce});return function(){t.destroy()}}),[]),createElement$1(t,__assign$3({ref:l,"data-styled-id":n,className:"".concat(o," ").concat(n)},r))}))}var extendStatics$2=function(t,e){return(extendStatics$2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function __extends$2(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics$2(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$2=function(){return __assign$2=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$2.apply(this,arguments)};function __rest(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}function __decorate$1(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}function __values(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,s,a=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(r){s={error:r}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(s)throw s.error}}return o}function __spreadArray$1(t,e,i){if(i||2===arguments.length)for(var n,s=0,a=e.length;s<a;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}function makeAble(t,e){return __assign$2({events:[],props:[],name:t},e)}var DIRECTIONS4=["n","w","s","e"],DIRECTIONS=["n","w","s","e","nw","ne","sw","se"];function getSVGCursor(t,e){return'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(32*t,'px" height="').concat(32*t,'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(').concat(e,'deg);transform-origin: 16px 16px"></path></svg>')}function getCursorCSS(t){var e=getSVGCursor(1,t),i=45*Math.round(t/45)%180,n="ns-resize";return 135===i?n="nwse-resize":45===i?n="nesw-resize":90===i&&(n="ew-resize"),"cursor:".concat(n,";cursor: url('").concat(e,"') 16 16, ").concat(n,";")}var agent=agent$1(),IS_WEBKIT=agent.browser.webkit,IS_WEBKIT605=IS_WEBKIT&&(navi="undefined"==typeof window?{userAgent:""}:window.navigator,res=/applewebkit\/([^\s]+)/g.exec(navi.userAgent.toLowerCase()),!!res&&parseFloat(res[1])<605),navi,res,browserName=agent.browser.name,browserVersion=parseInt(agent.browser.version,10),IS_CHROME="chrome"===browserName,IS_CHROMIUM=agent.browser.chromium,chromiumVersion=parseInt(agent.browser.chromiumVersion,10)||0,IS_CHROMIUM109=IS_CHROME&&browserVersion>=109||IS_CHROMIUM&&chromiumVersion>=109,IS_FIREFOX="firefox"===browserName,IS_SAFARI_ABOVE15=parseInt(agent.browser.webkitVersion,10)>=612||browserVersion>=15,PREFIX="moveable-",directionCSS=DIRECTIONS.map((function(t){var e="",i="",n="center",s="center",a="calc(var(--moveable-control-padding, 20) * -1px)";return t.indexOf("n")>-1&&(e="top: ".concat(a,";"),s="bottom"),t.indexOf("s")>-1&&(e="top: 0px;",s="top"),t.indexOf("w")>-1&&(i="left: ".concat(a,";"),n="right"),t.indexOf("e")>-1&&(i="left: 0px;",n="left"),'.around-control[data-direction*="'.concat(t,'"] {\n        ').concat(i).concat(e,"\n        transform-origin: ").concat(n," ").concat(s,";\n    }")})).join("\n"),MOVEABLE_CSS="\n{\nposition: absolute;\nwidth: 1px;\nheight: 1px;\nleft: 0;\ntop: 0;\nz-index: 3000;\n--moveable-color: #4af;\n--zoom: 1;\n--zoompx: 1px;\n--moveable-line-padding: 0;\n--moveable-control-padding: 0;\nwill-change: transform;\noutline: 1px solid transparent;\n}\n.control-box {\nz-index: 0;\n}\n.line, .control {\nposition: absolute;\nleft: 0;\ntop: 0;\nwill-change: transform;\n}\n.control {\nwidth: 14px;\nheight: 14px;\nborder-radius: 50%;\nborder: 2px solid #fff;\nbox-sizing: border-box;\nbackground: #4af;\nbackground: var(--moveable-color);\nmargin-top: -7px;\nmargin-left: -7px;\nborder: 2px solid #fff;\nz-index: 10;\n}\n.around-control {\nposition: absolute;\nwill-change: transform;\nwidth: calc(var(--moveable-control-padding, 20) * 1px);\nheight: calc(var(--moveable-control-padding, 20) * 1px);\nleft: calc(var(--moveable-control-padding, 20) * -0.5px);\ntop: calc(var(--moveable-control-padding, 20) * -0.5px);\nbox-sizing: border-box;\nbackground: transparent;\nz-index: 8;\ncursor: alias;\ntransform-origin: center center;\n}\n".concat(directionCSS,"\n.padding {\nposition: absolute;\ntop: 0px;\nleft: 0px;\nwidth: 100px;\nheight: 100px;\ntransform-origin: 0 0;\n}\n.line {\nwidth: 1px;\nheight: 1px;\nbackground: #4af;\nbackground: var(--moveable-color);\ntransform-origin: 0px 50%;\n}\n.line.edge {\nz-index: 1;\nbackground: transparent;\n}\n.line.dashed {\nbox-sizing: border-box;\nbackground: transparent;\n}\n.line.dashed.horizontal {\nborder-top: 1px dashed #4af;\nborder-top-color: #4af;\nborder-top-color: var(--moveable-color);\n}\n.line.dashed.vertical {\nborder-left: 1px dashed #4af;\nborder-left-color: #4af;\nborder-left-color: var(--moveable-color);\n}\n.line.vertical {\ntransform: translateX(-50%);\n}\n.line.horizontal {\ntransform: translateY(-50%);\n}\n.line.vertical.bold {\nwidth: 2px;\n}\n.line.horizontal.bold {\nheight: 2px;\n}\n\n.control.origin {\nborder-color: #f55;\nbackground: #fff;\nwidth: 12px;\nheight: 12px;\nmargin-top: -6px;\nmargin-left: -6px;\npointer-events: none;\n}\n").concat([0,15,30,45,60,75,90,105,120,135,150,165].map((function(t){return'\n.direction[data-rotation="'.concat(t,'"], :global .view-control-rotation').concat(t," {\n").concat(getCursorCSS(t),"\n}\n")})).join("\n"),'\n\n.line.direction:before {\ncontent: "";\nposition: absolute;\nwidth: 100%;\nheight: calc(var(--moveable-line-padding, 0) * 1px);\nbottom: 0;\nleft: 0;\n}\n.group {\nz-index: -1;\n}\n.area {\nposition: absolute;\n}\n.area-pieces {\nposition: absolute;\ntop: 0;\nleft: 0;\ndisplay: none;\n}\n.area.avoid, .area.pass {\npointer-events: none;\n}\n.area.avoid+.area-pieces {\ndisplay: block;\n}\n.area-piece {\nposition: absolute;\n}\n\n').concat(IS_WEBKIT605?':global svg *:before {\ncontent:"";\ntransform-origin: inherit;\n}':"","\n"),NEARBY_POS=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],FLOAT_POINT_NUM=1e-4,TINY_NUM=1e-7,MIN_SCALE=1e-9,MAX_NUM=Math.pow(10,10),MIN_NUM=-MAX_NUM,DIRECTION_REGION_TO_DIRECTION={n:[0,-1],e:[1,0],s:[0,1],w:[-1,0],nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]},DIRECTION_INDEXES={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},DIRECTION_ROTATIONS={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},MOVEABLE_METHODS=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors","getTargets","stopDrag","getControlBoxElement","getMoveables","getDragElement"];function setCustomDrag(t,e,i,n,s,a){var o,r;void 0===a&&(a="draggable");var l=null!==(r=null===(o=e.gestos[a])||void 0===o?void 0:o.move(i,t.inputEvent))&&void 0!==r?r:{},h=l.originalDatas||l.datas,c=h[a]||(h[a]={});return __assign$2(__assign$2({},s?convertDragDist(e,l):l),{isPinch:!!n,parentEvent:!0,datas:c,originalDatas:t.originalDatas})}var CustomGesto=function(){function t(t){var e;void 0===t&&(t="draggable"),this.ableName=t,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=((e={})[t]={},e)}return t.prototype.dragStart=function(t,e){this.isDrag=!1,this.isFlag=!1;var i=e.originalDatas;return this.datas=i,i[this.ableName]||(i[this.ableName]={}),__assign$2(__assign$2({},this.move(t,e.inputEvent)),{type:"dragstart"})},t.prototype.drag=function(t,e){return this.move([t[0]-this.prevX,t[1]-this.prevY],e)},t.prototype.move=function(t,e){var i,n,s=!1;if(this.isFlag){var a=this.isDrag;i=this.prevX+t[0],n=this.prevY+t[1],(t[0]||t[1])&&(this.isDrag=!0),!a&&this.isDrag&&(s=!0)}else this.prevX=t[0],this.prevY=t[1],this.startX=t[0],this.startY=t[1],i=t[0],n=t[1],this.isFlag=!0;return this.prevX=i,this.prevY=n,{type:"drag",clientX:i,clientY:n,inputEvent:e,isFirstDrag:s,isDrag:this.isDrag,distX:i-this.startX,distY:n-this.startY,deltaX:t[0],deltaY:t[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},t}();function calculateElementPosition(t,e,i,n){var s=16===t.length?4:3,a=__read(calculatePoses(t,i,n,s),4),o=__read(a[0],2),r=o[0],l=o[1],h=__read(a[1],2),c=h[0],u=h[1],d=__read(a[2],2),p=d[0],g=d[1],f=__read(a[3],2),m=f[0],v=f[1],b=__read(calculatePosition(t,e,s),2),y=b[0],S=b[1],x=Math.min(r,c,p,m),w=Math.min(l,u,g,v),C=Math.max(r,c,p,m);return r=r-x||0,{left:x,top:w,right:C,bottom:Math.max(l,u,g,v),origin:[y=y-x||0,S=S-w||0],pos1:[r,l=l-w||0],pos2:[c=c-x||0,u=u-w||0],pos3:[p=p-x||0,g=g-w||0],pos4:[m=m-x||0,v=v-w||0],direction:sign(t[0]*t[s+1])}}function calculatePointerDist(t,e){var i=e.clientX,n=e.clientY,s=e.datas,a=t.state,o=a.moveableClientRect,r=a.rootMatrix,l=a.is3d,h=a.pos1,c=__read(minus(calculateInversePosition(r,[i-o.left,n-o.top],l?4:3),h),2),u=__read(getDragDist({datas:s,distX:c[0],distY:c[1]}),2);return[u[0],u[1]]}function setDragStart(t,e){var i=e.datas,n=t.state,s=n.allMatrix,a=n.beforeMatrix,o=n.is3d,r=n.left,l=n.top,h=n.origin,c=n.offsetMatrix,u=n.targetMatrix,d=n.transformOrigin,p=o?4:3;i.is3d=o,i.matrix=s,i.targetMatrix=u,i.beforeMatrix=a,i.offsetMatrix=c,i.transformOrigin=d,i.inverseMatrix=invert$1(s,p),i.inverseBeforeMatrix=invert$1(a,p),i.absoluteOrigin=convertPositionMatrix(plus([r,l],h),p),i.startDragBeforeDist=calculate(i.inverseBeforeMatrix,i.absoluteOrigin,p),i.startDragDist=calculate(i.inverseMatrix,i.absoluteOrigin,p)}function getTransformDirection(t){return calculateElementPosition(t.datas.beforeTransform,[50,50],100,100).direction}function resolveTransformEvent(t,e,i){var n=e.datas,s=e.originalDatas.beforeRenderable,a=n.transformIndex,o=s.nextTransforms,r=o.length,l=s.nextTransformAppendedIndexes,h=-1;-1===a?("translate"===i?h=0:"rotate"===i&&(h=findIndex(o,(function(t){return t.match(/scale\(/g)}))),-1===h&&(h=o.length),n.transformIndex=h):h=find$2(l,(function(t){return t.index===a&&t.functionName===i}))?a:a+l.filter((function(t){return t.index<a})).length;var c=convertTransformInfo(o,t.state,h),u=c.targetFunction,d="rotate"===i?"rotateZ":i;n.beforeFunctionTexts=c.beforeFunctionTexts,n.afterFunctionTexts=c.afterFunctionTexts,n.beforeTransform=c.beforeFunctionMatrix,n.beforeTransform2=c.beforeFunctionMatrix2,n.targetTansform=c.targetFunctionMatrix,n.afterTransform=c.afterFunctionMatrix,n.afterTransform2=c.afterFunctionMatrix2,n.targetAllTransform=c.allFunctionMatrix,u.functionName===d?(n.afterFunctionTexts.splice(0,1),n.isAppendTransform=!1):r>h&&(n.isAppendTransform=!0,s.nextTransformAppendedIndexes=__spreadArray$1(__spreadArray$1([],__read(l),!1),[{functionName:i,index:h,isAppend:!0}],!1))}function convertTransformFormat(t,e,i){return"".concat(t.beforeFunctionTexts.join(" ")," ").concat(t.isAppendTransform?i:e," ").concat(t.afterFunctionTexts.join(" "))}function getTransformDist(t){var e=t.datas,i=__read(getBeforeDragDist({datas:e,distX:t.distX,distY:t.distY}),2);return calculate(getTransfromMatrix(e,fromTranslation([i[0],i[1]],4)),convertPositionMatrix([0,0,0],4),4)}function getTransfromMatrix(t,e,i){var n=t.beforeTransform,s=t.afterTransform,a=t.beforeTransform2,o=t.afterTransform2,r=t.targetAllTransform,l=i?multiply(r,e,4):multiply(e,r,4),h=multiply(invert$1(i?a:n,4),l,4);return multiply(h,invert$1(i?o:s,4),4)}function getBeforeDragDist(t){var e=t.datas,i=t.distX,n=t.distY,s=e.inverseBeforeMatrix,a=e.is3d,o=e.startDragBeforeDist,r=a?4:3;return minus(calculate(s,plus(e.absoluteOrigin,[i,n]),r),o)}function getDragDist(t,e){var i=t.datas,n=t.distX,s=t.distY,a=i.inverseBeforeMatrix,o=i.inverseMatrix,r=i.is3d,l=i.startDragBeforeDist,h=i.startDragDist,c=r?4:3;return minus(calculate(e?a:o,plus(i.absoluteOrigin,[n,s]),c),e?l:h)}function getInverseDragDist(t,e){var i=t.datas,n=t.distX,s=t.distY,a=i.beforeMatrix,o=i.matrix,r=i.is3d,l=i.startDragBeforeDist,h=i.startDragDist,c=i.absoluteOrigin,u=r?4:3;return minus(calculate(e?a:o,plus(e?l:h,[n,s]),u),c)}function calculateTransformOrigin(t,e,i,n,s,a){return void 0===n&&(n=e),void 0===s&&(s=i),void 0===a&&(a=[0,0]),t?t.map((function(t,o){var r=splitUnit(t),l=r.value,h=r.unit,c=o?s:n,u=o?i:e;return"%"===t||isNaN(l)?u*(c?a[o]/c:0):"%"!==h?l:u*l/100})):a}function getPosIndexesByDirection(t){var e=[];return t[1]>=0&&(t[0]>=0&&e.push(3),t[0]<=0&&e.push(2)),t[1]<=0&&(t[0]>=0&&e.push(1),t[0]<=0&&e.push(0)),e}function getPosesByDirection(t,e){return getPosIndexesByDirection(e).map((function(e){return t[e]}))}function getPosBySingleDirection(t,e){var i=(e+1)/2;return[dot(t[0][0],t[1][0],i,1-i),dot(t[0][1],t[1][1],i,1-i)]}function getPosByDirection(t,e){var i=getPosBySingleDirection([t[0],t[1]],e[0]),n=getPosBySingleDirection([t[2],t[3]],e[0]);return getPosBySingleDirection([i,n],e[1])}function getDist(t,e,i,n,s,a){var o=getPosByDirection(calculatePoses(e,i,n,s),a);return[t[0]-o[0],t[1]-o[1]]}function getNextMatrix(t,e,i,n){return multiply(t,getAbsoluteMatrix(e,n,i),n)}function getNextTransformMatrix(t,e,i,n){var s,a=t.transformOrigin,o=t.offsetMatrix,r=t.is3d?4:3;if(isString$1(i)){var l=e.beforeTransform,h=e.afterTransform;s=convertDimension(n?parseMat(i):multiply(multiply(l,parseMat([i]),4),h,4),4,r)}else s=i;return getNextMatrix(o,s,a,r)}function scaleMatrix(t,e){var i=t.transformOrigin,n=t.offsetMatrix,s=t.is3d,a=t.targetMatrix,o=s?4:3;return getNextMatrix(n,multiply(t.targetAllTransform||a,createScaleMatrix(e,o),o),i,o)}function fillTransformStartEvent(t,e){var i=getBeforeRenderableDatas(e);return{setTransform:function(n,s){void 0===s&&(s=-1),i.startTransforms=isArray$1(n)?n:splitSpace(n),setTransformIndex(t,e,s)},setTransformIndex:function(i){setTransformIndex(t,e,i)}}}function setDefaultTransformIndex(t,e,i){setTransformIndex(t,e,findIndex(getBeforeRenderableDatas(e).startTransforms,(function(t){return 0===t.indexOf("".concat(i,"("))})))}function setTransformIndex(t,e,i){var n=getBeforeRenderableDatas(e),s=e.datas;if(s.transformIndex=i,-1!==i){var a=n.startTransforms[i];if(a){var o=t.state,r=parse$1([a],{"x%":function(t){return t/100*o.offsetWidth},"y%":function(t){return t/100*o.offsetHeight}});s.startValue=r[0].functionValue}}}function fillOriginalTransform(t,e){getBeforeRenderableDatas(t).nextTransforms=splitSpace(e)}function getBeforeRenderableDatas(t){return t.originalDatas.beforeRenderable}function getNextTransforms(t){return t.originalDatas.beforeRenderable.nextTransforms}function getNextTransformText(t){return(getNextTransforms(t)||[]).join(" ")}function getNextStyle(t){return getBeforeRenderableDatas(t).nextStyle}function fillTransformEvent(t,e,i,n,s){fillOriginalTransform(s,e);var a=Draggable$2.drag(t,setCustomDrag(s,t.state,i,n,!1)),o=a?a.transform:e;return __assign$2(__assign$2({transform:e,drag:a},fillCSSObject({transform:o},s)),{afterTransform:o})}function getTranslateFixedPosition(t,e,i,n,s,a){return getDirectionOffset(t,i,n,getNextTransformMatrix(t.state,s,e,a))}function getTranslateDist(t,e,i,n,s,a,o){var r=getTranslateFixedPosition(t,e,i,s,a,o),l=t.state,h=l.left,c=l.top,u=t.props.groupable,d=u?h:0,p=u?c:0,g=minus(n,r);return minus(g,[d,p])}function getScaleDist(t,e,i,n,s,a,o){return getTranslateDist(t,e,i,n,s,a,o)}function getDirectionByPos(t,e,i){return[e?t[0]/(e/2)-1:0,i?t[1]/(i/2)-1:0]}function getDirectionOffset(t,e,i,n){void 0===n&&(n=t.state.allMatrix);var s=t.state,a=s.width,o=s.height,r=s.is3d?4:3;return calculatePosition(n,[a/2*(1+e[0])+i[0],o/2*(1+e[1])+i[1]],r)}function getRotateDist(t,e,i){var n=i.fixedDirection,s=i.fixedPosition,a=i.fixedOffset;return getTranslateDist(t,"rotate(".concat(e,"deg)"),n,s,a,i)}function getResizeDist(t,e,i,n,s,a){var o=t.props.groupable,r=t.state,l=r.transformOrigin,h=r.offsetMatrix,c=r.is3d,u=r.width,d=r.height,p=r.left,g=r.top,f=a.fixedDirection,m=c?4:3,v=o?p:0,b=o?g:0;return minus(getDist(n,getNextMatrix(h,a.nextTargetMatrix||r.targetMatrix,calculateTransformOrigin(s,e,i,u,d,l),m),e,i,m,f),[v,b])}function getAbsolutePosition(t,e){return getPosByDirection(getAbsolutePosesByState(t.state),e)}function getGestoData(t,e){var i,n=t.targetGesto,s=t.controlGesto;return(null==n?void 0:n.isFlag())&&(i=n.getEventData()[e]),!i&&(null==s?void 0:s.isFlag())&&(i=s.getEventData()[e]),i||{}}function getShadowRoot(t){if(t&&t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e}}function getIndividualTransforms(t){var e=t("scale"),i=t("rotate"),n=t("translate"),s=[];return n&&"0px"!==n&&"none"!==n&&s.push("translate(".concat(n.split(/\s+/).join(","),")")),i&&"1"!==i&&"none"!==i&&s.push("rotate(".concat(i,")")),e&&"1"!==e&&"none"!==e&&s.push("scale(".concat(e.split(/\s+/).join(","),")")),s}function getMatrixStackInfo(t,e,i){for(var n,s,a,o=t,r=[],l=getDocumentElement(t)||getDocumentBody(t),h=!i&&t===e||t===l,c=h,u=!1,d=3,p=!1,g=getOffsetInfo(e,e,!0).offsetParent,f=1;o&&!c;){c=h;var m=getCachedStyle(o),v=m("position"),b=getElementTransform(o),y="fixed"===v,S=getIndividualTransforms(m),x=convertCSStoMatrix(getTransformMatrix(b)),w=void 0,C=!1,T=!1,D=0,k=0,$=0,O=0,P={hasTransform:!1,fixedContainer:null};y&&(p=!0,g=(P=getPositionFixedInfo(o)).fixedContainer);var L=x.length;u||16!==L&&!S.length||(u=!0,d=4,convert3DMatrixes(r),a&&(a=convertDimension(a,3,4))),u&&9===L&&(x=convertDimension(x,3,4));var I=getOffsetPosInfo(o,t),A=I.tagName,E=I.hasOffset,G=I.isSVG,U=I.origin,F=I.targetOrigin,M=__read(I.offset,2),_=M[0],N=M[1];"svg"===A&&!o.ownerSVGElement&&a&&(r.push({type:"target",target:o,matrix:getSVGMatrix(o,d)}),r.push({type:"offset",target:o,matrix:createIdentityMatrix(d)}));var R=parseFloat(m("zoom"))||1;if(y)w=P.fixedContainer,C=!0;else{var j=getOffsetInfo(o,e,!1,!0,m),B=j.offsetZoom;if(w=j.offsetParent,C=j.isEnd,T=j.isStatic,f*=B,(j.isCustomElement||1!==B)&&T)_-=w.offsetLeft,N-=w.offsetTop;else if(IS_FIREFOX||IS_CHROMIUM109){if(j.parentSlotElement){for(var H=w,z=0,V=0;H&&getShadowRoot(H);)z+=H.offsetLeft,V+=H.offsetTop,H=H.offsetParent;_-=z,N-=V}}}if(!IS_WEBKIT||IS_SAFARI_ABOVE15||!E||G||!T||"relative"!==v&&"static"!==v||(_-=w.offsetLeft,N-=w.offsetTop,h=h||C),y)E&&P.hasTransform&&($=w.clientLeft,O=w.clientTop);else if(E&&g!==w&&(D=w.clientLeft,k=w.clientTop),E&&w===l){var q=getBodyOffset(o,!1);_+=q[0],N+=q[1]}if(r.push({type:"target",target:o,matrix:getAbsoluteMatrix(x,d,U)}),S.length&&(r.push({type:"offset",target:o,matrix:createIdentityMatrix(d)}),r.push({type:"target",target:o,matrix:getAbsoluteMatrix(parseMat(S),d,U)})),E){var W=o===t,Y=W?0:o.scrollLeft,K=W?0:o.scrollTop;r.push({type:"offset",target:o,matrix:createOriginMatrix([_-Y+D-$,N-K+k-O],d)})}else r.push({type:"offset",target:o,origin:U});if(1!==R&&r.push({type:"zoom",target:o,matrix:getAbsoluteMatrix(createScaleMatrix([R,R],d),d,[0,0])}),a||(a=x),n||(n=U),s||(s=F),c||y)break;o=w,h=C,i&&o!==l||(c=h)}return a||(a=createIdentityMatrix(d)),n||(n=[0,0]),s||(s=[0,0]),{zoom:f,offsetContainer:g,matrixes:r,targetMatrix:a,transformOrigin:n,targetOrigin:s,is3d:u,hasFixed:p}}var cacheStyleMap=null,clientRectStyleMap=null,matrixContainerInfos=null;function setStoreCache(t){t?(window.Map&&(cacheStyleMap=new Map,clientRectStyleMap=new Map),matrixContainerInfos=[]):(cacheStyleMap=null,matrixContainerInfos=null,clientRectStyleMap=null)}function getCachedClientRect(t){var e=null==clientRectStyleMap?void 0:clientRectStyleMap.get(t);if(e)return e;var i=getClientRect(t,!0);return clientRectStyleMap&&clientRectStyleMap.set(t,i),i}function getCachedMatrixContainerInfo(t,e){if(matrixContainerInfos){var i=find$2(matrixContainerInfos,(function(i){return i[0][0]==t&&i[0][1]==e}));if(i)return i[1]}var n=getMatrixStackInfo(t,e,!0);return matrixContainerInfos&&matrixContainerInfos.push([[t,e],n]),n}function getCachedStyle(t){var e=null==cacheStyleMap?void 0:cacheStyleMap.get(t);if(!e){var i=getWindow(t).getComputedStyle(t);if(!cacheStyleMap)return function(t){return i[t]};e={style:i,cached:{}},cacheStyleMap.set(t,e)}var n=e.cached,s=e.style;return function(t){return t in n||(n[t]=s[t]),n[t]}}function fillChildEvents(t,e,i){var n=i.originalDatas;n.groupable=n.groupable||{};var s=n.groupable;s.childDatas=s.childDatas||[];var a=s.childDatas;return t.moveables.map((function(t,n){return a[n]=a[n]||{},a[n][e]=a[n][e]||{},__assign$2(__assign$2({},i),{isRequestChild:!0,datas:a[n][e],originalDatas:a[n]})}))}function triggerChildGesto(t,e,i,n,s,a,o){var r=!!i.match(/Start$/g),l=!!i.match(/End$/g),h=s.isPinch,c=s.datas,u=fillChildEvents(t,e.name,s),d=t.moveables,p=[],g=u.map((function(t,s){var u=d[s],g=u.state,f=g.gestos,m=t;if(r)m=new CustomGesto(o).dragStart(n,t),p.push(m);else{if(f[o]||(f[o]=c.childGestos[s]),!f[o])return;m=setCustomDrag(t,g,n,h,a,o),p.push(m)}var v=e[i](u,__assign$2(__assign$2({},m),{parentFlag:!0}));return l&&(f[o]=null),v}));return r&&(c.childGestos=d.map((function(t){return t.state.gestos[o]}))),{eventParams:g,childEvents:p}}function triggerChildAbles(t,e,i,n,s,a){void 0===s&&(s=function(t,e){return e});var o=!!i.match(/End$/g),r=fillChildEvents(t,e.name,n),l=t.moveables;return r.map((function(t,n){var r,h=l[n];r=s(h,t);var c=e[i](h,__assign$2(__assign$2({},r),{parentFlag:!0}));return c&&a&&a(h,t,c,n),o&&(h.state.gestos={}),c}))}function startChildDist(t,e,i,n){var s=i.fixedDirection,a=i.fixedPosition,o=getPosByDirection(n.datas.startPositions||getAbsolutePosesByState(e.state),s),r=__read(calculate(createRotateMatrix(-t.rotation/180*Math.PI,3),[o[0]-a[0],o[1]-a[1],1],3),2),l=r[0],h=r[1];return n.datas.originalX=l,n.datas.originalY=h,n}function renderDirectionControlsByInfos(t,e,i,n){var s=t.getState(),a=s.renderPoses,o=s.rotation,r=s.direction,l=getProps(t.props,e).zoom,h=absDegree(o/Math.PI*180),c={},u=t.renderState;u.renderDirectionMap||(u.renderDirectionMap={});var d=u.renderDirectionMap;i.forEach((function(t){var e=t.dir;c[e]=!0}));var p=sign(r);return i.map((function(t){var i=t.data,s=t.classNames,r=t.dir,u=DIRECTION_INDEXES[r];if(!u||!c[r])return null;d[r]=!0;var g=(throttle$1(h,15)+p*DIRECTION_ROTATIONS[r]+720)%180,f={};return getKeys(i).forEach((function(t){f["data-".concat(t)]=i[t]})),n.createElement("div",__assign$2({className:prefix.apply(void 0,__spreadArray$1(["control","direction",r,e],__read(s),!1)),"data-rotation":g,"data-direction":r},f,{key:"direction-".concat(r),style:getControlTransform.apply(void 0,__spreadArray$1([o,l],__read(u.map((function(t){return a[t]}))),!1))}))}))}function renderDirectionControls(t,e,i,n){var s=getProps(t.props,i),a=s.renderDirections,o=void 0===a?e:a,r=s.displayAroundControls;if(!o)return[];var l=!0===o?DIRECTIONS:o;return __spreadArray$1(__spreadArray$1([],__read(r?renderAroundControls(t,n,i,l):[]),!1),__read(renderDirectionControlsByInfos(t,i,l.map((function(t){return{data:{},classNames:[],dir:t}})),n)),!1)}function renderLine(t,e,i,n,s,a){for(var o=[],r=6;r<arguments.length;r++)o[r-6]=arguments[r];var l=getRad$1(i,n),h=e?throttle$1(l/Math.PI*180,15)%180:-1;return t.createElement("div",{key:"line-".concat(a),className:prefix.apply(void 0,__spreadArray$1(["line","direction",e?"edge":"",e],__read(o),!1)),"data-rotation":h,"data-line-key":a,"data-direction":e,style:getLineStyle$1(i,n,s,l)})}function renderEdgeLines(t,e,i,n,s){return(!0===i?DIRECTIONS4:i).map((function(i,a){var o=__read(DIRECTION_INDEXES[i],2),r=o[0],l=o[1];if(null!=l)return renderLine(t,i,n[r],n[l],s,"".concat(e,"Edge").concat(a),e)})).filter(Boolean)}function getRenderDirections(t){return function(e,i){var n=getProps(e.props,t).edge;return n&&(!0===n||n.length)?__spreadArray$1(__spreadArray$1([],__read(renderEdgeLines(i,t,n,e.getState().renderPoses,e.props.zoom)),!1),__read(renderDiagonalDirections(e,t,i)),!1):renderAllDirections(e,t,i)}}function renderAllDirections(t,e,i){return renderDirectionControls(t,DIRECTIONS,e,i)}function renderDiagonalDirections(t,e,i){return renderDirectionControls(t,["nw","ne","sw","se"],e,i)}function renderAroundControls(t,e,i,n){var s=t.renderState;s.renderDirectionMap||(s.renderDirectionMap={});var a=t.getState(),o=a.renderPoses,r=a.rotation,l=a.direction,h=s.renderDirectionMap,c=t.props.zoom,u=sign(l),d=r/Math.PI*180;return(n||getKeys(h)).map((function(t){var n=DIRECTION_INDEXES[t];if(!n)return null;var s=(throttle$1(d,15)+u*DIRECTION_ROTATIONS[t]+720)%180,a=["around-control"];return i&&a.push("direction",i),e.createElement("div",{className:prefix.apply(void 0,__spreadArray$1([],__read(a),!1)),"data-rotation":s,"data-direction":t,key:"direction-around-".concat(t),style:getControlTransform.apply(void 0,__spreadArray$1([r,c],__read(n.map((function(t){return o[t]}))),!1))})}))}function checkBoundPoses(t,e,i){var n=t||{},s=n.position,a=void 0===s?"client":s,o=n.left,r=void 0===o?-1/0:o,l=n.top,h=void 0===l?-1/0:l,c=n.right,u=void 0===c?1/0:c,d=n.bottom,p={position:a,left:r,top:h,right:u,bottom:void 0===d?1/0:d};return{vertical:checkBounds(p,e,!0),horizontal:checkBounds(p,i,!1)}}function getBounds(t,e){var i=t.state,n=i.containerClientRect,s=n.clientHeight,a=n.clientWidth,o=n.clientLeft,r=n.clientTop,l=i.snapOffset,h=l.left,c=l.top,u=l.right,d=l.bottom,p=e||t.props.bounds||{},g="css"===(p.position||"client"),f=p.left,m=void 0===f?-1/0:f,v=p.top,b=void 0===v?-1/0:v,y=p.right,S=void 0===y?g?-1/0:1/0:y,x=p.bottom,w=void 0===x?g?-1/0:1/0:x;return g&&(S=a+u-h-S,w=s+d-c-w),{left:m+h-o,right:S+h-o,top:b+c-r,bottom:w+c-r}}function checkBoundKeepRatio(t,e,i){var n=getBounds(t),s=n.left,a=n.top,o=n.right,r=n.bottom,l=__read(i,2),h=l[0],c=l[1],u=__read(minus(i,e),2),d=u[0],p=u[1];abs$1(d)<TINY_NUM&&(d=0),abs$1(p)<TINY_NUM&&(p=0);var g=p>0,f=d>0,m={isBound:!1,offset:0,pos:0},v={isBound:!1,offset:0,pos:0};if(0===d&&0===p)return{vertical:m,horizontal:v};if(0===d)g?r<c&&(v.pos=r,v.offset=c-r):a>c&&(v.pos=a,v.offset=c-a);else if(0===p)f?o<h&&(m.pos=o,m.offset=h-o):s>h&&(m.pos=s,m.offset=h-s);else{var b=p/d,y=i[1]-b*h,S=0,x=0,w=!1;f&&o<=h?(S=b*o+y,x=o,w=!0):!f&&h<=s&&(S=b*s+y,x=s,w=!0),w&&(S<a||S>r)&&(w=!1),w||(g&&r<=c?(x=((S=r)-y)/b,w=!0):!g&&c<=a&&(x=((S=a)-y)/b,w=!0)),w&&(m.isBound=!0,m.pos=x,m.offset=h-x,v.isBound=!0,v.pos=S,v.offset=c-S)}return{vertical:m,horizontal:v}}function checkBounds(t,e,i){var n=t[i?"left":"top"],s=t[i?"right":"bottom"],a=Math.min.apply(Math,__spreadArray$1([],__read(e),!1)),o=Math.max.apply(Math,__spreadArray$1([],__read(e),!1)),r=[];return n+1>a&&r.push({direction:"start",isBound:!0,offset:a-n,pos:n}),s-1<o&&r.push({direction:"end",isBound:!0,offset:o-s,pos:s}),r.length||r.push({isBound:!1,offset:0,pos:0}),r.sort((function(t,e){return abs$1(e.offset)-abs$1(t.offset)}))}function isBoundRotate$1(t,e,i){return(i?t.map((function(t){return rotate$1(t,i)})):t).some((function(t){return t[0]<e.left&&abs$1(t[0]-e.left)>.1||t[0]>e.right&&abs$1(t[0]-e.right)>.1||t[1]<e.top&&abs$1(t[1]-e.top)>.1||t[1]>e.bottom&&abs$1(t[1]-e.bottom)>.1}))}function boundRotate(t,e,i){var n=getDistSize(t),s=Math.sqrt(n*n-e*e)||0;return[s,-s].sort((function(e,n){return abs$1(e-t[i?0:1])-abs$1(n-t[i?0:1])})).map((function(t){return getRad$1([0,0],i?[t,e]:[e,t])}))}function checkRotateBounds(t,e,i,n,s){if(!t.props.bounds)return[];var a=s*Math.PI/180,o=getBounds(t),r=o.left,l=o.top,h=o.right,c=o.bottom,u=r-n[0],d=h-n[0],p=l-n[1],g=c-n[1],f={left:u,top:p,right:d,bottom:g};if(!isBoundRotate$1(i,f,0))return[];var m=[];return[[u,0],[d,0],[p,1],[g,1]].forEach((function(t){var n=__read(t,2),s=n[0],o=n[1];i.forEach((function(t){var i=getRad$1([0,0],t);m.push.apply(m,__spreadArray$1([],__read(boundRotate(t,s,o).map((function(t){return a+t-i})).filter((function(t){return!isBoundRotate$1(e,f,t)})).map((function(t){return throttle$1(180*t/Math.PI,TINY_NUM)}))),!1))}))})),m}var VERTICAL_NAMES=["left","right","center"],HORIZONTAL_NAMES=["top","bottom","middle"],SNAP_SKIP_NAMES_MAP={left:"start",right:"end",center:"center",top:"start",bottom:"end",middle:"center"},VERTICAL_NAMES_MAP={start:"left",end:"right",center:"center"},HORIZONTAL_NAMES_MAP={start:"top",end:"bottom",center:"middle"};function getInitialBounds(){return{left:!1,top:!1,right:!1,bottom:!1}}function hasGuidelines(t,e){var i=t.props,n=i.snappable,s=i.bounds,a=i.innerBounds,o=i.verticalGuidelines,r=i.horizontalGuidelines,l=i.snapGridWidth,h=i.snapGridHeight,c=t.state,u=c.guidelines,d=c.enableSnap;return!(!n||!d||e&&!0!==n&&n.indexOf(e)<0)&&!!(l||h||s||a||u&&u.length||o&&o.length||r&&r.length)}function getSnapDirections(t){return!1===t?{}:!0!==t&&t?t:{left:!0,right:!0,top:!0,bottom:!0}}function mapSnapDirectionPoses(t,e){var i=getSnapDirections(t),n={};for(var s in i)s in e&&i[s]&&(n[s]=e[s]);return n}function splitSnapDirectionPoses(t,e){var i=mapSnapDirectionPoses(t,e),n=HORIZONTAL_NAMES.filter((function(t){return t in i})),s=VERTICAL_NAMES.filter((function(t){return t in i}));return{horizontalNames:n,verticalNames:s,horizontal:n.map((function(t){return i[t]})),vertical:s.map((function(t){return i[t]}))}}function calculateContainerPos(t,e,i){var n=calculatePosition(t,[e.clientLeft,e.clientTop],i);return[e.left+n[0],e.top+n[1]]}function solveLineConstants(t){var e=__read(t,2),i=e[0],n=e[1],s=n[0]-i[0],a=n[1]-i[1];Math.abs(s)<TINY_NUM$1&&(s=0),Math.abs(a)<TINY_NUM$1&&(a=0);var o=0,r=0,l=0;return s?a?(r=1,l=(o=-a/s)*i[0]-i[1]):(r=1,l=-i[1]):(o=-1,l=i[0]),[o,r,l].map((function(t){return throttle$1(t,TINY_NUM$1)}))}var NAME_snapRotationThreshold="snapRotationThreshold",NAME_snapRotationDegrees="snapRotationDegrees",NAME_snapHorizontalThreshold="snapHorizontalThreshold",NAME_snapVerticalThreshold="snapVerticalThreshold";function checkMoveableSnapPoses(t,e,i,n,s,a,o){var r;void 0===n&&(n=[]),void 0===s&&(s=[]);var l=t.props,h=(null===(r=t.state.snapThresholdInfo)||void 0===r?void 0:r.multiples)||[1,1],c=selectValue(o,l[NAME_snapHorizontalThreshold],5),u=selectValue(a,l[NAME_snapVerticalThreshold],5);return checkSnapPoses(t.state.guidelines,e,i,n,s,c,u,h)}function checkSnapPoses(t,e,i,n,s,a,o,r){return{vertical:checkSnap(t,"vertical",e,o*r[0],n),horizontal:checkSnap(t,"horizontal",i,a*r[1],s)}}function checkSnapKeepRatio(t,e,i){var n=__read(i,2),s=n[0],a=n[1],o=__read(e,2),r=o[0],l=o[1],h=__read(minus(i,e),2),c=h[0],u=h[1],d=u>0,p=c>0;c=getTinyDist(c),u=getTinyDist(u);var g={isSnap:!1,offset:0,pos:0},f={isSnap:!1,offset:0,pos:0};if(0===c&&0===u)return{vertical:g,horizontal:f};var m=checkMoveableSnapPoses(t,c?[s]:[],u?[a]:[],[],[],void 0,void 0),v=m.vertical,b=m.horizontal;v.posInfos.filter((function(t){var e=t.pos;return p?e>=r:e<=r})),b.posInfos.filter((function(t){var e=t.pos;return d?e>=l:e<=l})),v.isSnap=v.posInfos.length>0,b.isSnap=b.posInfos.length>0;var y=getNearestSnapGuidelineInfo(v),S=y.isSnap,x=y.guideline,w=getNearestSnapGuidelineInfo(b),C=w.isSnap,T=w.guideline,D=C?T.pos[1]:0,k=S?x.pos[0]:0;if(0===c)C&&(f.isSnap=!0,f.pos=T.pos[1],f.offset=a-f.pos);else if(0===u)S&&(g.isSnap=!0,g.pos=k,g.offset=s-k);else{var $=u/c,O=i[1]-$*s,P=0,L=0,I=!1;S?(P=$*(L=k)+O,I=!0):C&&(L=((P=D)-O)/$,I=!0),I&&(g.isSnap=!0,g.pos=L,g.offset=s-L,f.isSnap=!0,f.pos=P,f.offset=a-P)}return{vertical:g,horizontal:f}}function getStringDirection(t){var e="";return-1===t||"top"===t||"left"===t?e="start":0===t||"center"===t||"middle"===t?e="center":1!==t&&"right"!==t&&"bottom"!==t||(e="end"),e}function checkSnaps(t,e,i,n){var s=splitSnapDirectionPoses(t.props.snapDirections,e),a=checkMoveableSnapPoses(t,s.vertical,s.horizontal,s.verticalNames.map((function(t){return getStringDirection(t)})),s.horizontalNames.map((function(t){return getStringDirection(t)})),i,n),o=getStringDirection(s.horizontalNames[a.horizontal.index]),r=getStringDirection(s.verticalNames[a.vertical.index]);return{vertical:__assign$2(__assign$2({},a.vertical),{direction:r}),horizontal:__assign$2(__assign$2({},a.horizontal),{direction:o})}}function getNearestSnapGuidelineInfo(t){var e=t.isSnap;if(!e)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var i=t.posInfos[0],n=i.guidelineInfos[0],s=n.offset,a=n.dist,o=n.guideline;return{isSnap:e,offset:s,dist:a,pos:i.pos,guideline:o}}function checkSnap(t,e,i,n,s){var a,o;if(void 0===s&&(s=[]),!t||!t.length)return{isSnap:!1,index:-1,direction:"",posInfos:[]};var r="vertical"===e?0:1,l=i.map((function(i,a){var o=s[a]||"",l=t.map((function(t){var e=t.pos,n=i-e[r];return{offset:n,dist:abs$1(n),guideline:t,direction:o}})).filter((function(t){var i=t.guideline,s=t.dist;return!(i.type!==e||s>n)})).sort((function(t,e){return t.dist-e.dist}));return{pos:i,index:a,guidelineInfos:l,direction:o}})).filter((function(t){return t.guidelineInfos.length>0})).sort((function(t,e){return t.guidelineInfos[0].dist-e.guidelineInfos[0].dist})),h=l.length>0;return{isSnap:h,index:h?l[0].index:-1,direction:null!==(o=null===(a=l[0])||void 0===a?void 0:a.direction)&&void 0!==o?o:"",posInfos:l}}function getSnapInfosByDirection(t,e,i,n,s){var a=[];i[0]&&i[1]?a=[i,[-i[0],i[1]],[i[0],-i[1]]]:i[0]||i[1]?t.props.keepRatio?a.push([-1,-1],[-1,1],[1,-1],[1,1],i):(a.push.apply(a,__spreadArray$1([],__read(getPosesByDirection([[-1,-1],[1,-1],[-1,-1],[1,1]],i)),!1)),a.length>1&&a.push([(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2])):[[-1,-1],[1,-1],[1,1],[-1,1]].forEach((function(t,e,i){var n=i[e+1]||i[0];a.push(t),a.push([(t[0]+n[0])/2,(t[1]+n[1])/2])}));var o=a.map((function(t){return getPosByDirection(e,t)})),r=checkMoveableSnapPoses(t,o.map((function(t){return t[0]})),o.map((function(t){return t[1]})),a.map((function(t){return getStringDirection(t[0])})),a.map((function(t){return getStringDirection(t[1])})),n,s),l=getStringDirection(a.map((function(t){return t[0]}))[r.vertical.index]),h=getStringDirection(a.map((function(t){return t[1]}))[r.horizontal.index]);return{vertical:__assign$2(__assign$2({},r.vertical),{direction:l}),horizontal:__assign$2(__assign$2({},r.horizontal),{direction:h})}}function checkSnapBoundPriority(t,e){var i=abs$1(t.offset),n=abs$1(e.offset);return t.isBound&&e.isBound?n-i:t.isBound?-1:e.isBound?1:t.isSnap&&e.isSnap?n-i:t.isSnap?-1:e.isSnap||i<TINY_NUM?1:n<TINY_NUM?-1:i-n}function getNearOffsetInfo(t,e){return t.slice().sort((function(t,i){var n=t.sign[e],s=i.sign[e],a=t.offset[e],o=i.offset[e];return n?s?checkSnapBoundPriority({isBound:t.isBound,isSnap:t.isSnap,offset:a},{isBound:i.isBound,isSnap:i.isSnap,offset:o}):-1:1}))[0]}function getCheckSnapDirections(t,e,i){var n=[];if(i)1!==abs$1(e[0])||1!==abs$1(e[1])?n.push([e,[-1,-1]],[e,[-1,1]],[e,[1,-1]],[e,[1,1]]):n.push([e,[t[0],-t[1]]],[e,[-t[0],t[1]]]),n.push([e,t]);else if(t[0]&&t[1]||!t[0]&&!t[1]){var s=t[0]?t:[1,1];[1,-1].forEach((function(t){[1,-1].forEach((function(i){var a=[t*s[0],i*s[1]];e[0]===a[0]&&e[1]===a[1]||n.push([e,a])}))}))}else if(t[0]){(1===abs$1(e[0])?[1]:[1,-1]).forEach((function(i){n.push([[e[0],-1],[i*t[0],-1]],[[e[0],0],[i*t[0],0]],[[e[0],1],[i*t[0],1]])}))}else if(t[1]){(1===abs$1(e[1])?[1]:[1,-1]).forEach((function(i){n.push([[-1,e[1]],[-1,i*t[1]]],[[0,e[1]],[0,i*t[1]]],[[1,e[1]],[1,i*t[1]]])}))}return n}function isStartLine(t,e){var i=average([e[0][0],e[1][0]]),n=average([e[0][1],e[1][1]]);return{vertical:i<=t[0],horizontal:n<=t[1]}}function hitTestLine(t,e){var i,n,s=__read(e,2),a=s[0],o=s[1],r=o[0]-a[0],l=o[1]-a[1];if(abs$1(r)<TINY_NUM&&(r=0),abs$1(l)<TINY_NUM&&(l=0),r)if(l){i=l/r*(t[0]-a[0])+a[1],n=t[1]}else i=a[1],n=t[1];else i=a[0],n=t[0];return i-n}function isSameStartLine(t,e,i,n){return void 0===n&&(n=TINY_NUM),t.every((function(t){var s=hitTestLine(t,e);return s<=0===i||abs$1(s)<=n}))}function checkInnerBoundDot(t,e,i,n,s){return void 0===s&&(s=0),n&&e-s<=t||!n&&t<=i+s?{isBound:!0,offset:n?e-t:i-t}:{isBound:!1,offset:0}}function checkInnerBound(t,e){var i=e.line,n=e.centerSign,s=e.verticalSign,a=e.horizontalSign,o=e.lineConstants,r=t.props.innerBounds;if(!r)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var l=r.left,h=r.top,c=r.width,u=r.height,d=[[l,h],[l,h+u]],p=[[l,h],[l+c,h]],g=[[l+c,h],[l+c,h+u]],f=[[l,h+u],[l+c,h+u]];if(isSameStartLine([[l,h],[l+c,h],[l,h+u],[l+c,h+u]],i,n))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var m=checkLineBoundCollision(i,o,p,s),v=checkLineBoundCollision(i,o,f,s),b=checkLineBoundCollision(i,o,d,a),y=checkLineBoundCollision(i,o,g,a),S=m.isBound&&v.isBound,x=m.isBound||v.isBound,w=b.isBound&&y.isBound,C=b.isBound||y.isBound,T=maxOffset(m.offset,v.offset),D=maxOffset(b.offset,y.offset),k=[0,0],$=!1,O=!1;return abs$1(D)<abs$1(T)?(k=[T,0],$=x,O=S):(k=[0,D],$=C,O=w),{isAllBound:O,isVerticalBound:x,isHorizontalBound:C,isBound:$,offset:k}}function checkLineBoundCollision(t,e,i,n,s,a){var o,r,l=__read(e,2),h=l[0],c=l[1],u=t[0],d=i[0],p=i[1],g=getTinyDist(p[1]-d[1]),f=c,m=h,v=-h/c;return getTinyDist(p[0]-d[0])?g||a&&!f?{isBound:!1,offset:0}:m?checkInnerBoundDot((d[1]-u[1])/v+u[0],d[0],p[0],n,s):{isBound:r=abs$1(o=d[1]-u[1])<=(s||0),offset:r?o:0}:a&&!m?{isBound:!1,offset:0}:f?checkInnerBoundDot(v*(d[0]-u[0])+u[1],d[1],p[1],n,s):{isBound:r=abs$1(o=d[0]-u[0])<=(s||0),offset:r?o:0}}function getInnerBoundInfo(t,e,i){return e.map((function(e){var n=checkInnerBound(t,e),s=n.isBound,a=n.offset,o=n.isVerticalBound,r=n.isHorizontalBound,l=e.multiple,h=getDragDist({datas:i,distX:a[0],distY:a[1]}).map((function(t,e){return t*(l[e]?2/l[e]:0)}));return{sign:l,isBound:s,isVerticalBound:o,isHorizontalBound:r,isSnap:!1,offset:h}}))}function getInnerBoundDragInfo(t,e,i){var n,s=getInnerBoundInfo(t,getCheckInnerBoundLineInfos(t,e,[0,0],!1).map((function(t){return __assign$2(__assign$2({},t),{multiple:t.multiple.map((function(t){return 2*abs$1(t)}))})})),i),a=getNearOffsetInfo(s,0),o=getNearOffsetInfo(s,1),r=0,l=0,h=a.isVerticalBound||o.isVerticalBound,c=a.isHorizontalBound||o.isHorizontalBound;return(h||c)&&(r=(n=__read(getInverseDragDist({datas:i,distX:-a.offset[0],distY:-o.offset[1]}),2))[0],l=n[1]),{vertical:{isBound:h,offset:r},horizontal:{isBound:c,offset:l}}}function getCheckSnapLineDirections(t,e){var i=[],n=t[0],s=t[1];return n&&s?i.push([[0,2*s],t,[-n,s]],[[2*n,0],t,[n,-s]]):n?(i.push([[2*n,0],[n,1],[n,-1]]),e&&i.push([[0,-1],[n,-1],[-n,-1]],[[0,1],[n,1],[-n,1]])):s?(i.push([[0,2*s],[1,s],[-1,s]]),e&&i.push([[-1,0],[-1,s],[-1,-s]],[[1,0],[1,s],[1,-s]])):i.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),i}function getCheckInnerBoundLineInfos(t,e,i,n){var s=t.state,a=calculatePoses(s.allMatrix,100,100,s.is3d?4:3),o=getPosByDirection(a,[0,0]);return getCheckSnapLineDirections(i,n).map((function(t){var i=__read(t,3),n=i[0],s=i[1],r=i[2],l=[getPosByDirection(a,s),getPosByDirection(a,r)],h=solveLineConstants(l),c=isStartLine(o,l),u=c.vertical,d=c.horizontal;return{multiple:n,centerSign:hitTestLine(o,l)<=0,verticalSign:u,horizontalSign:d,lineConstants:h,line:[getPosByDirection(e,s),getPosByDirection(e,r)]}}))}function isBoundRotate(t,e,i,n){var s=n?t.map((function(t){return rotate$1(t,n)})):t;return[[s[0],s[1]],[s[1],s[3]],[s[3],s[2]],[s[2],s[0]]].some((function(t){var n=hitTestLine(i,t)<=0;return!isSameStartLine(e,t,n)}))}function getDistPointLine(t){var e=__read(t,2),i=e[0],n=e[1],s=n[0]-i[0],a=n[1]-i[1];if(!s)return abs$1(i[0]);if(!a)return abs$1(i[1]);var o=a/s;return abs$1((-o*i[0]+i[1])/Math.sqrt(Math.pow(o,2)+1))}function solveReverseLine(t){var e=__read(t,2),i=e[0],n=e[1],s=n[0]-i[0],a=n[1]-i[1];if(!s)return[i[0],0];if(!a)return[0,i[1]];var o=a/s,r=-o*i[0]+i[1];return[-r/(o+1/o),r/(o*o+1)]}function checkRotateInnerBounds(t,e,i,n,s){var a=t.props.innerBounds,o=s*Math.PI/180;if(!a)return[];var r=a.left,l=a.top,h=a.width,c=a.height,u=r-n[0],d=r+h-n[0],p=l-n[1],g=l+c-n[1],f=[[u,p],[d,p],[u,g],[d,g]],m=getPosByDirection(i,[0,0]);if(!isBoundRotate(i,f,m,0))return[];var v=[],b=f.map((function(t){return[getDistSize(t),getRad$1([0,0],t)]}));return[[i[0],i[1]],[i[1],i[3]],[i[3],i[2]],[i[2],i[0]]].forEach((function(t){var i=getRad$1([0,0],solveReverseLine(t)),n=getDistPointLine(t);v.push.apply(v,__spreadArray$1([],__read(b.filter((function(t){var e=__read(t,1)[0];return e&&n<=e})).map((function(t){var e=__read(t,2),s=e[0],a=e[1],r=Math.acos(s?n/s:0);return[o+(a+r)-i,o+(a-r)-i]})).reduce((function(t,e){return t.push.apply(t,__spreadArray$1([],__read(e),!1)),t}),[]).filter((function(t){return!isBoundRotate(e,f,m,t)})).map((function(t){return throttle$1(180*t/Math.PI,TINY_NUM)}))),!1))})),v}function checkInnerBoundPoses(t){var e=t.props.innerBounds,i=getInitialBounds();if(!e)return{boundMap:i,vertical:[],horizontal:[]};var n=t.getRect(),s=[n.pos1,n.pos2,n.pos3,n.pos4],a=getPosByDirection(s,[0,0]),o=e.left,r=e.top,l=e.width,h=e.height,c=[[o,r],[o,r+h]],u=[[o,r],[o+l,r]],d=[[o+l,r],[o+l,r+h]],p=[[o,r+h],[o+l,r+h]],g=getCheckInnerBoundLineInfos(t,s,[0,0],!1),f=[],m=[];return g.forEach((function(t){var e=t.line,n=t.lineConstants,s=isStartLine(a,e),g=s.horizontal,v=s.vertical,b=checkLineBoundCollision(e,n,u,v,1,!0),y=checkLineBoundCollision(e,n,p,v,1,!0),S=checkLineBoundCollision(e,n,c,g,1,!0),x=checkLineBoundCollision(e,n,d,g,1,!0);b.isBound&&!i.top&&(f.push(r),i.top=!0),y.isBound&&!i.bottom&&(f.push(r+h),i.bottom=!0),S.isBound&&!i.left&&(m.push(o),i.left=!0),x.isBound&&!i.right&&(m.push(o+l),i.right=!0)})),{boundMap:i,horizontal:f,vertical:m}}function solveEquation(t,e,i,n){var s=e[0]-t[0],a=e[1]-t[1];if(abs$1(s)<TINY_NUM$1&&(s=0),abs$1(a)<TINY_NUM$1&&(a=0),!s)return n?[0,0]:[0,i];if(!a)return n?[i,0]:[0,0];var o=a/s,r=t[1]-o*t[0];return n?[i,o*(e[0]+i)+r-e[1]]:[(e[1]+i-r)/o-e[0],i]}function solveNextOffset(t,e,i,n,s){var a=solveEquation(t,e,i,n);if(!a)return{isOutside:!1,offset:[0,0]};var o=getDist$2(t,e),r=getDist$2(a,t),l=getDist$2(a,e),h=r>o||l>o,c=__read(getDragDist({datas:s,distX:a[0],distY:a[1]}),2);return{offset:[c[0],c[1]],isOutside:h}}function getSnapBound(t,e){return t.isBound?t.offset:e.isSnap?getNearestSnapGuidelineInfo(e).offset:0}function checkThrottleDragRotate(t,e,i,n,s){var a=__read(e,2),o=a[0],r=a[1],l=__read(i,2),h=l[0],c=l[1],u=__read(n,2),d=u[0],p=u[1],g=__read(s,2),f=g[0],m=g[1],v=-f,b=-m;if(t&&o&&r){v=0,b=0;var y=[];if(h&&c?y.push([0,m],[f,0]):h?y.push([f,0]):c?y.push([0,m]):d&&p?y.push([0,m],[f,0]):d?y.push([f,0]):p&&y.push([0,m]),y.length){y.sort((function(t,e){return getDistSize(minus([o,r],t))-getDistSize(minus([o,r],e))}));var S=y[0];if(S[0]&&abs$1(o)>TINY_NUM$1)v=-S[0],b=r*abs$1(o+v)/abs$1(o)-r;else if(S[1]&&abs$1(r)>TINY_NUM$1){var x=r;b=-S[1],v=o*abs$1(r+b)/abs$1(x)-o}if(t&&c&&h)if(abs$1(v)>TINY_NUM$1&&abs$1(v)<abs$1(f))v*=w=abs$1(f)/abs$1(v),b*=w;else if(abs$1(b)>TINY_NUM$1&&abs$1(b)<abs$1(m)){var w;v*=w=abs$1(m)/abs$1(b),b*=w}else v=maxOffset(-f,v),b=maxOffset(-m,b)}}else v=o||h?-f:0,b=r||c?-m:0;return[v,b]}function checkSnapBoundsDrag(t,e,i,n,s,a){if(!hasGuidelines(t,"draggable"))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var o=getAbsolutePoses(a.absolutePoses,[e,i]),r=getRect(o),l=r.left,h=r.right,c=r.top,u=r.bottom,d={horizontal:o.map((function(t){return t[1]})),vertical:o.map((function(t){return t[0]}))},p=checkMoveableSnapBounds(t,s,splitSnapDirectionPoses(getSnapDirections(t.props.snapDirections),{left:l,right:h,top:c,bottom:u,center:(l+h)/2,middle:(c+u)/2}),d),g=p.vertical,f=p.horizontal,m=getInnerBoundDragInfo(t,o,a),v=m.vertical,b=m.horizontal,y=g.isSnap,S=f.isSnap,x=g.isBound||v.isBound,w=f.isBound||b.isBound,C=__read(checkThrottleDragRotate(n,[e,i],[x,w],[y,S],[maxOffset(g.offset,v.offset),maxOffset(f.offset,b.offset)]),2);return[{isBound:x,isSnap:y,offset:C[0]},{isBound:w,isSnap:S,offset:C[1]}]}function checkMoveableSnapBounds(t,e,i,n){void 0===n&&(n=i);var s=checkBoundPoses(getBounds(t),n.vertical,n.horizontal),a=s.horizontal,o=s.vertical,r=e?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:checkMoveableSnapPoses(t,i.vertical,i.horizontal,void 0,void 0,void 0,void 0),l=r.horizontal,h=r.vertical,c=getSnapBound(a[0],l),u=getSnapBound(o[0],h),d=abs$1(c),p=abs$1(u);return{horizontal:{isBound:a[0].isBound,isSnap:l.isSnap,snapIndex:l.index,offset:c,dist:d,bounds:a,snap:l},vertical:{isBound:o[0].isBound,isSnap:h.isSnap,snapIndex:h.index,offset:u,dist:p,bounds:o,snap:h}}}function checkSnapBounds(t,e,i,n,s,a,o){void 0===o&&(o=[1,1]);var r=checkBoundPoses(e,i,n),l=r.horizontal,h=r.vertical,c=checkSnapPoses(t,i,n,[],[],s,a,o),u=c.horizontal,d=c.vertical,p=getSnapBound(l[0],u),g=getSnapBound(h[0],d),f=abs$1(p),m=abs$1(g);return{horizontal:{isBound:l[0].isBound,isSnap:u.isSnap,snapIndex:u.index,offset:p,dist:f,bounds:l,snap:u},vertical:{isBound:h[0].isBound,isSnap:d.isSnap,snapIndex:d.index,offset:g,dist:m,bounds:h,snap:d}}}function checkSnapRightLine(t,e,i,n){var s=getRad$1(t,e)/Math.PI*180,a=i.vertical,o=a.isBound,r=a.isSnap,l=a.dist,h=i.horizontal,c=h.isBound,u=h.isSnap,d=s%180,p=d<3||d>177,g=d>87&&d<93;return h.dist<l&&(o||r&&!g&&(!n||!p))?"vertical":!c&&(!u||p||n&&g)?"":"horizontal"}function getSnapBoundInfo(t,e,i,n,s,a){return i.map((function(i){var o=__read(i,2),r=o[0],l=o[1],h=getPosByDirection(e,r),c=getPosByDirection(e,l),u=n?checkSnapBoundsKeepRatio(t,h,c,s):checkMoveableSnapBounds(t,s,{vertical:[c[0]],horizontal:[c[1]]}),d=u.horizontal,p=d.offset,g=d.isBound,f=d.isSnap,m=u.vertical,v=m.offset,b=m.isBound,y=m.isSnap,S=minus(l,r);if(!v&&!p)return{isBound:b||g,isSnap:y||f,sign:S,offset:[0,0]};var x=checkSnapRightLine(h,c,u,n);if(!x)return{sign:S,isBound:!1,isSnap:!1,offset:[0,0]};var w="vertical"===x,C=[0,0];return C=(C=n||1!==abs$1(l[0])||1!==abs$1(l[1])||r[0]===l[0]||r[1]===l[1]?solveNextOffset(h,c,-(w?v:p),w,a).offset:getDragDist({datas:a,distX:-v,distY:-p})).map((function(t,e){return t*(S[e]?2/S[e]:0)})),{sign:S,isBound:w?b:g,isSnap:w?y:f,offset:C}}))}function getSnapBoundOffset(t,e){return t.isBound?t.offset:e.isSnap?e.offset:0}function checkSnapBoundsKeepRatio(t,e,i,n){var s=checkBoundKeepRatio(t,e,i),a=s.horizontal,o=s.vertical,r=n?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:checkSnapKeepRatio(t,e,i),l=r.horizontal,h=r.vertical,c=getSnapBoundOffset(a,l),u=getSnapBoundOffset(o,h),d=abs$1(c),p=abs$1(u);return{horizontal:{isBound:a.isBound,isSnap:l.isSnap,offset:c,dist:d},vertical:{isBound:o.isBound,isSnap:h.isSnap,offset:u,dist:p}}}function checkMaxBounds(t,e,i,n,s){var a=[-i[0],-i[1]],o=t.state,r=o.width,l=o.height,h=t.props.bounds,c=1/0,u=1/0;if(h){var d=[[i[0],-i[1]],[-i[0],i[1]]],p=h.left,g=void 0===p?-1/0:p,f=h.top,m=void 0===f?-1/0:f,v=h.right,b=void 0===v?1/0:v,y=h.bottom,S=void 0===y?1/0:y;d.forEach((function(t){var i=t[0]!==a[0],o=t[1]!==a[1],h=getPosByDirection(e,t),d=360*getRad$1(n,h)/Math.PI;if(o){var p=h.slice();(abs$1(d-360)<2||abs$1(d-180)<2)&&(p[1]=n[1]);var f=solveNextOffset(n,p,(n[1]<h[1]?S:m)-h[1],!1,s),v=__read(f.offset,2)[1],y=f.isOutside;isNaN(v)||(u=l+(y?1:-1)*abs$1(v))}if(i){p=h.slice();(abs$1(d-90)<2||abs$1(d-270)<2)&&(p[0]=n[0]);var x=solveNextOffset(n,p,(n[0]<h[0]?b:g)-h[0],!0,s),w=__read(x.offset,1)[0],C=x.isOutside;isNaN(w)||(c=r+(C?1:-1)*abs$1(w))}}))}return{maxWidth:c,maxHeight:u}}var Draggable$2={name:"draggable",props:["draggable","throttleDrag","throttleDragRotate","hideThrottleDragRotateLine","startDragRotate","edgeDraggable"],events:["dragStart","drag","dragEnd","dragGroupStart","dragGroup","dragGroupEnd"],requestStyle:function(){return["left","top","right","bottom"]},requestChildStyle:function(){return["left","top","right","bottom"]},render:function(t,e){var i=t.props,n=i.hideThrottleDragRotateLine,s=i.throttleDragRotate,a=i.zoom,o=t.getState(),r=o.dragInfo,l=o.beforeOrigin;if(n||!s||!r)return[];var h=r.dist;if(!h[0]&&!h[1])return[];var c=getDistSize(h),u=getRad$1(h,[0,0]);return[e.createElement("div",{className:prefix("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:"".concat(c,"px"),transform:"translate(".concat(l[0],"px, ").concat(l[1],"px) rotate(").concat(u,"rad) scaleY(").concat(a,")")}})]},dragStart:function(t,e){var i=e.datas,n=e.parentEvent,s=e.parentGesto,a=t.state,o=a.gestos,r=a.style;if(o.draggable)return!1;o.draggable=s||t.targetGesto,i.datas={},i.left=parseFloat(r.left||"")||0,i.top=parseFloat(r.top||"")||0,i.bottom=parseFloat(r.bottom||"")||0,i.right=parseFloat(r.right||"")||0,i.startValue=[0,0],setDragStart(t,e),setDefaultTransformIndex(t,e,"translate"),startCheckSnapDrag(t,i),i.prevDist=[0,0],i.prevBeforeDist=[0,0],i.isDrag=!1,i.deltaOffset=[0,0];var l=fillParams(t,e,__assign$2({set:function(t){i.startValue=t}},fillTransformStartEvent(t,e)));return!1!==(n||triggerEvent(t,"onDragStart",l))?(i.isDrag=!0,t.state.dragInfo={startRect:t.getRect(),dist:[0,0]}):(o.draggable=null,i.isPinch=!1),!!i.isDrag&&l},drag:function(t,e){if(e){resolveTransformEvent(t,e,"translate");var i=e.datas,n=e.parentEvent,s=e.parentFlag,a=e.isPinch,o=e.deltaOffset,r=e.useSnap,l=e.isRequest,h=e.isGroup,c=e.parentThrottleDrag,u=e.distX,d=e.distY,p=i.isDrag,g=i.prevDist,f=i.prevBeforeDist,m=i.startValue;if(p){o&&(u+=o[0],d+=o[1]);var v=t.props,b=v.parentMoveable,y=h?0:v.throttleDrag||c||0,S=n?0:v.throttleDragRotate||0,x=0,w=!1,C=!1,T=!1,D=!1;if(!n&&S>0&&(u||d)){var k=v.startDragRotate||0,$=throttle$1(k+180*getRad$1([0,0],[u,d])/Math.PI,S)-k,O=d*Math.abs(Math.cos(($-90)/180*Math.PI)),P=getDistSize([u*Math.abs(Math.cos($/180*Math.PI)),O]);x=$*Math.PI/180,u=P*Math.cos(x),d=P*Math.sin(x)}if(!a&&!n&&!s){var L=__read(checkSnapBoundsDrag(t,u,d,S,!r&&l||o,i),2),I=L[0],A=L[1];w=I.isSnap,C=I.isBound,T=A.isSnap,D=A.isBound,u+=I.offset,d+=A.offset}var E=plus(getBeforeDragDist({datas:i,distX:u,distY:d}),m),G=plus(getTransformDist({datas:i,distX:u,distY:d}),m);throttleArray(G,TINY_NUM),throttleArray(E,TINY_NUM),S||(w||C||(G[0]=throttle$1(G[0],y),E[0]=throttle$1(E[0],y)),T||D||(G[1]=throttle$1(G[1],y),E[1]=throttle$1(E[1],y)));var U=minus(E,m),F=minus(G,m),M=minus(F,g),_=minus(U,f);i.prevDist=F,i.prevBeforeDist=U,i.passDelta=M,i.passDist=F;var N=i.left+U[0],R=i.top+U[1],j=i.right-U[0],B=i.bottom-U[1],H=convertTransformFormat(i,"translate(".concat(G[0],"px, ").concat(G[1],"px)"),"translate(".concat(F[0],"px, ").concat(F[1],"px)"));if(fillOriginalTransform(e,H),t.state.dragInfo.dist=n?[0,0]:F,n||b||!M.every((function(t){return!t}))||!_.some((function(t){return!t}))){var z=t.state,V=z.width,q=z.height,W=fillParams(t,e,__assign$2({transform:H,dist:F,delta:M,translate:G,beforeDist:U,beforeDelta:_,beforeTranslate:E,left:N,top:R,right:j,bottom:B,width:V,height:q,isPinch:a},fillCSSObject({transform:H},e)));return!n&&triggerEvent(t,"onDrag",W),W}}}},dragAfter:function(t,e){var i=e.datas,n=i.deltaOffset;return!(!n[0]&&!n[1])&&(i.deltaOffset=[0,0],this.drag(t,__assign$2(__assign$2({},e),{deltaOffset:n})))},dragEnd:function(t,e){var i=e.parentEvent,n=e.datas;if(t.state.dragInfo=null,n.isDrag){n.isDrag=!1;var s=fillEndParams(t,e,{});return!i&&triggerEvent(t,"onDragEnd",s),s}},dragGroupStart:function(t,e){var i,n,s=e.datas,a=e.clientX,o=e.clientY,r=this.dragStart(t,e);if(!r)return!1;var l=triggerChildGesto(t,this,"dragStart",[a||0,o||0],e,!1,"draggable"),h=l.childEvents,c=l.eventParams,u=triggerEvent(t,"onDragGroupStart",__assign$2(__assign$2({},r),{targets:t.props.targets,events:c}));s.isDrag=!1!==u;var d=null!==(n=null===(i=h[0])||void 0===i?void 0:i.datas.startValue)&&void 0!==n?n:[0,0];return s.throttleOffset=[d[0]%1,d[1]%1],!!s.isDrag&&r},dragGroup:function(t,e){if(e.datas.isDrag){var i=this.drag(t,__assign$2(__assign$2({},e),{parentThrottleDrag:t.props.throttleDrag})),n=triggerChildGesto(t,this,"drag",e.datas.passDelta,e,!1,"draggable").eventParams;if(i){var s=__assign$2({targets:t.props.targets,events:n},i);return triggerEvent(t,"onDragGroup",s),s}}},dragGroupEnd:function(t,e){var i=e.isDrag;if(e.datas.isDrag){this.dragEnd(t,e);var n=triggerChildGesto(t,this,"dragEnd",[0,0],e,!1,"draggable").eventParams;return triggerEvent(t,"onDragGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(t){var e={},i=t.getRect(),n=0,s=0,a=!1;return{isControl:!1,requestStart:function(t){return a=t.useSnap,{datas:e,useSnap:a}},request:function(t){return"x"in t?n=t.x-i.left:"deltaX"in t&&(n+=t.deltaX),"y"in t?s=t.y-i.top:"deltaY"in t&&(s+=t.deltaY),{datas:e,distX:n,distY:s,useSnap:a}},requestEnd:function(){return{datas:e,isDrag:!0,useSnap:a}}}},unset:function(t){t.state.gestos.draggable=null,t.state.dragInfo=null}};function getFixedDirectionInfo(t,e){return{fixedPosition:getPosByDirection(t,e),fixedDirection:e,fixedOffset:[0,0]}}function getOffsetFixedDirectionInfo(t,e){var i=t.allMatrix,n=t.is3d,s=t.width,a=t.height,o=n?4:3;return{fixedPosition:calculatePosition(i,[s/2*(1+e[0]),a/2*(1+e[1])],o),fixedDirection:e,fixedOffset:[0,0]}}function getOffsetFixedPositionInfo(t,e){var i=t.allMatrix,n=t.is3d,s=t.width,a=t.height,o=n?4:3,r=getDirectionByPos(e,s,a);return{fixedPosition:calculatePosition(i,e,o),fixedDirection:r,fixedOffset:[s?0:e[0],a?0:e[1]]}}var directionCondition$2=getDirectionCondition("resizable"),Resizable={name:"resizable",ableGroup:"size",canPinch:!0,props:["resizable","throttleResize","renderDirections","displayAroundControls","keepRatio","resizeFormat","keepRatioFinally","edge","checkResizableError"],events:["resizeStart","beforeResize","resize","resizeEnd","resizeGroupStart","beforeResizeGroup","resizeGroup","resizeGroupEnd"],render:getRenderDirections("resizable"),dragControlCondition:directionCondition$2,viewClassName:getDirectionViewClassName("resizable"),dragControlStart:function(t,e){var i,n=e.inputEvent,s=e.isPinch,a=e.isGroup,o=e.parentDirection,r=e.parentGesto,l=e.datas,h=e.parentFixedDirection,c=e.parentEvent,u=getTotalDirection(o,s,n,l),d=t.state,p=d.target,g=d.width,f=d.height,m=d.gestos;if(!u||!p)return!1;if(m.resizable)return!1;m.resizable=r||t.controlGesto,!s&&setDragStart(t,e),l.datas={},l.direction=u,l.startOffsetWidth=g,l.startOffsetHeight=f,l.prevWidth=0,l.prevHeight=0,l.minSize=[0,0],l.startWidth=d.inlineCSSWidth||d.cssWidth,l.startHeight=d.inlineCSSHeight||d.cssHeight,l.maxSize=[1/0,1/0],a||(l.minSize=[d.minOffsetWidth,d.minOffsetHeight],l.maxSize=[d.maxOffsetWidth,d.maxOffsetHeight]);var v=t.props.transformOrigin||"% %";function b(t){l.ratio=t&&isFinite(t)?t:0}function y(t){var e=getFixedDirectionInfo(l.startPositions,t);l.fixedDirection=e.fixedDirection,l.fixedPosition=e.fixedPosition,l.fixedOffset=e.fixedOffset}function S(e){var i=getOffsetFixedPositionInfo(t.state,e);l.fixedDirection=i.fixedDirection,l.fixedPosition=i.fixedPosition,l.fixedOffset=i.fixedOffset}function x(t){l.minSize=[convertUnitSize("".concat(t[0]),0)||0,convertUnitSize("".concat(t[1]),0)||0]}function w(t){var e=[t[0]||1/0,t[1]||1/0];isNumber$2(e[0])&&!isFinite(e[0])||(e[0]=convertUnitSize("".concat(e[0]),0)||1/0),isNumber$2(e[1])&&!isFinite(e[1])||(e[1]=convertUnitSize("".concat(e[1]),0)||1/0),l.maxSize=e}l.transformOrigin=v&&isString$1(v)?v.split(" "):v,l.startOffsetMatrix=d.offsetMatrix,l.startTransformOrigin=d.transformOrigin,l.isWidth=null!==(i=null==e?void 0:e.parentIsWidth)&&void 0!==i?i:!u[0]&&!u[1]||u[0]||!u[1],l.startPositions=getAbsolutePosesByState(t.state),b(g/f),y(h||[-u[0],-u[1]]),l.setFixedDirection=y,l.setFixedPosition=S,l.setMin=x,l.setMax=w;var C=fillParams(t,e,{direction:u,startRatio:l.ratio,set:function(t){var e=__read(t,2),i=e[0],n=e[1];l.startWidth=i,l.startHeight=n},setMin:x,setMax:w,setRatio:b,setFixedDirection:y,setFixedPosition:S,setOrigin:function(t){l.transformOrigin=t},dragStart:Draggable$2.dragStart(t,(new CustomGesto).dragStart([0,0],e))}),T=c||triggerEvent(t,"onResizeStart",C);return l.startFixedDirection=l.fixedDirection,l.startFixedPosition=l.fixedPosition,!1!==T&&(l.isResize=!0,t.state.snapRenderInfo={request:e.isRequest,direction:u}),!!l.isResize&&C},dragControl:function(t,e){var i,n=e.datas,s=e.parentFlag,a=e.isPinch,o=e.parentKeepRatio,r=e.dragClient,l=e.parentDist,h=e.useSnap,c=e.isRequest,u=e.isGroup,d=e.parentEvent,p=e.resolveMatrix,g=n.isResize,f=n.transformOrigin,m=n.startWidth,v=n.startHeight,b=n.prevWidth,y=n.prevHeight,S=n.minSize,x=n.maxSize,w=n.ratio,C=n.startOffsetWidth,T=n.startOffsetHeight,D=n.isWidth;if(g){if(p){var k=t.state.is3d,$=n.startOffsetMatrix,O=n.startTransformOrigin,P=k?4:3,L=parseMat(getNextTransforms(e)),I=Math.sqrt(L.length);P!==I&&(L=convertDimension(L,I,P));var A=getNextMatrix($,L,O,P),E=calculatePoses(A,C,T,P);n.startPositions=E,n.nextTargetMatrix=L,n.nextAllMatrix=A}var G=getProps(t.props,"resizable"),U=G.resizeFormat,F=G.throttleResize,M=void 0===F?s?0:1:F,_=G.parentMoveable,N=G.keepRatioFinally,R=n.direction,j=R,B=0,H=0;R[0]||R[1]||(j=[1,1]);var z=w&&(null!=o?o:G.keepRatio)||!1,V=__read(st(),2),q=V[0],W=V[1];d||(n.setFixedDirection(n.fixedDirection),triggerEvent(t,"onBeforeResize",fillParams(t,e,{startFixedDirection:n.startFixedDirection,startFixedPosition:n.startFixedPosition,setFixedDirection:function(t){var e;return n.setFixedDirection(t),e=__read(st(),2),q=e[0],W=e[1],[q,W]},setFixedPosition:function(t){var e;return n.setFixedPosition(t),e=__read(st(),2),q=e[0],W=e[1],[q,W]},boundingWidth:q,boundingHeight:W,setSize:function(t){var e;e=__read(t,2),q=e[0],W=e[1]}},!0)));var Y=r;r||(Y=!s&&a?getAbsolutePosition(t,[0,0]):n.fixedPosition);var K=[0,0];if(a||(K=checkSnapResize(t,q,W,R,Y,!h&&c,n)),l&&(!l[0]&&(K[0]=0),!l[1]&&(K[1]=0)),z){j[0]&&j[1]&&K[0]&&K[1]&&(abs$1(K[0])>abs$1(K[1])?K[1]=0:K[0]=0);var X=!K[0]&&!K[1];X&&at(),j[0]&&!j[1]||K[0]&&!K[1]||X&&D?(q+=K[0],W=q/w):(!j[0]&&j[1]||!K[0]&&K[1]||X&&!D)&&(W+=K[1],q=W*w)}else q+=K[0],W+=K[1],q=Math.max(0,q),W=Math.max(0,W);i=__read(calculateBoundSize([q,W],S,x,!!z&&w),2),q=i[0],W=i[1],at(),z&&(u||N)&&(D?W=q/w:q=W*w);var J=[(B=q-C)-b,(H=W-T)-y];n.prevWidth=B,n.prevHeight=H;var Z=getResizeDist(t,q,W,Y,f,n);if(_||!J.every((function(t){return!t}))||!Z.every((function(t){return!t}))){var Q=Draggable$2.drag(t,setCustomDrag(e,t.state,Z,!!a,!1,"draggable")),tt=Q.transform,et=m+B,it=v+H,nt=fillParams(t,e,__assign$2({width:et,height:it,offsetWidth:Math.round(q),offsetHeight:Math.round(W),startRatio:w,boundingWidth:q,boundingHeight:W,direction:R,dist:[B,H],delta:J,isPinch:!!a,drag:Q},fillAfterTransform({style:{width:"".concat(et,"px"),height:"".concat(it,"px")},transform:tt},Q,e)));return!d&&triggerEvent(t,"onResize",nt),nt}}function st(){var t=n.fixedDirection,i=getOffsetSizeDist(j,z,n,e);B=i.distWidth,H=i.distHeight;var s=j[0]-t[0]||z?Math.max(C+B,TINY_NUM):C,a=j[1]-t[1]||z?Math.max(T+H,TINY_NUM):T;return z&&C&&T&&(D?a=s/w:s=a*w),[s,a]}function at(){var t;U&&(t=__read(U([q,W]),2),q=t[0],W=t[1]),q=throttle$1(q,M),W=throttle$1(W,M)}},dragControlAfter:function(t,e){var i=e.datas,n=i.isResize,s=i.startOffsetWidth,a=i.startOffsetHeight,o=i.prevWidth,r=i.prevHeight;if(n&&!1!==t.props.checkResizableError){var l=t.state,h=l.width-(s+o),c=l.height-(a+r),u=abs$1(h)>3,d=abs$1(c)>3;return u&&(i.startWidth+=h,i.startOffsetWidth+=h,i.prevWidth+=h),d&&(i.startHeight+=c,i.startOffsetHeight+=c,i.prevHeight+=c),u||d?this.dragControl(t,e):void 0}},dragControlEnd:function(t,e){var i=e.datas,n=e.parentEvent;if(i.isResize){i.isResize=!1;var s=fillEndParams(t,e,{});return!n&&triggerEvent(t,"onResizeEnd",s),s}},dragGroupControlCondition:directionCondition$2,dragGroupControlStart:function(t,e){var i=e.datas,n=this.dragControlStart(t,__assign$2(__assign$2({},e),{isGroup:!0}));if(!n)return!1;var s=fillChildEvents(t,"resizable",e),a=i.startOffsetWidth,o=i.startOffsetHeight;function r(){var t=i.minSize;s.forEach((function(e){var i=e.datas,n=i.minSize,s=i.startOffsetWidth,r=i.startOffsetHeight,l=a*(s?n[0]/s:0),h=o*(r?n[1]/r:0);t[0]=Math.max(t[0],l),t[1]=Math.max(t[1],h)}))}function l(){var t=i.maxSize;s.forEach((function(e){var i=e.datas,n=i.maxSize,s=i.startOffsetWidth,r=i.startOffsetHeight,l=a*(s?n[0]/s:0),h=o*(r?n[1]/r:0);t[0]=Math.min(t[0],l),t[1]=Math.min(t[1],h)}))}var h=triggerChildAbles(t,this,"dragControlStart",e,(function(e,n){return startChildDist(t,e,i,n)}));r(),l();var c=function(e){n.setFixedDirection(e),h.forEach((function(n,a){n.setFixedDirection(e),startChildDist(t,n.moveable,i,s[a])}))};i.setFixedDirection=c;var u=__assign$2(__assign$2({},n),{targets:t.props.targets,events:h.map((function(t){return __assign$2(__assign$2({},t),{setMin:function(e){t.setMin(e),r()},setMax:function(e){t.setMax(e),l()}})})),setFixedDirection:c,setMin:function(t){n.setMin(t),r()},setMax:function(t){n.setMax(t),l()}}),d=triggerEvent(t,"onResizeGroupStart",u);return i.isResize=!1!==d,!!i.isResize&&n},dragGroupControl:function(t,e){var i=e.datas;if(i.isResize){var n=getProps(t.props,"resizable");catchEvent(t,"onBeforeResize",(function(i){triggerEvent(t,"onBeforeResizeGroup",fillParams(t,e,__assign$2(__assign$2({},i),{targets:n.targets}),!0))}));var s=this.dragControl(t,__assign$2(__assign$2({},e),{isGroup:!0}));if(s){var a=s.boundingWidth,o=s.boundingHeight,r=s.dist,l=n.keepRatio,h=[a/(a-r[0]),o/(o-r[1])],c=i.fixedPosition,u=triggerChildAbles(t,this,"dragControl",e,(function(e,i){var n=__read(calculate(createRotateMatrix(t.rotation/180*Math.PI,3),[i.datas.originalX*h[0],i.datas.originalY*h[1],1],3),2),s=n[0],a=n[1];return __assign$2(__assign$2({},i),{parentDist:null,parentScale:h,dragClient:plus(c,[s,a]),parentKeepRatio:l})})),d=__assign$2({targets:n.targets,events:u},s);return triggerEvent(t,"onResizeGroup",d),d}}},dragGroupControlEnd:function(t,e){var i=e.isDrag;if(e.datas.isResize){this.dragControlEnd(t,e);var n=triggerChildAbles(t,this,"dragControlEnd",e);return triggerEvent(t,"onResizeGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(t){var e={},i=0,n=0,s=!1,a=t.getRect();return{isControl:!0,requestStart:function(t){var i;return s=t.useSnap,{datas:e,parentDirection:t.direction||[1,1],parentIsWidth:null===(i=null==t?void 0:t.horizontal)||void 0===i||i,useSnap:s}},request:function(t){return"offsetWidth"in t?i=t.offsetWidth-a.offsetWidth:"deltaWidth"in t&&(i+=t.deltaWidth),"offsetHeight"in t?n=t.offsetHeight-a.offsetHeight:"deltaHeight"in t&&(n+=t.deltaHeight),{datas:e,parentDist:[i,n],parentKeepRatio:t.keepRatio,useSnap:s}},requestEnd:function(){return{datas:e,isDrag:!0,useSnap:s}}}},unset:function(t){t.state.gestos.resizable=null}};function setRotateStartInfo(t,e,i,n,s){var a=t.props.groupable,o=t.state,r=o.is3d?4:3,l=e.origin,h=calculatePosition(t.state.rootMatrix,minus([l[0],l[1]],a?[0,0]:[o.left,o.top]),r),c=plus([s.left,s.top],h);e.startAbsoluteOrigin=c,e.prevDeg=getRad$1(c,[i,n])/Math.PI*180,e.defaultDeg=e.prevDeg,e.prevSnapDeg=0,e.loop=0,e.startDist=getDist$2(c,[i,n])}function getAbsoluteDist(t,e,i){var n=i.defaultDeg,s=i.prevDeg,a=s%360,o=Math.floor(s/360);a<0&&(a+=360),a>t&&a>270&&t<90?++o:a<t&&a<90&&t>270&&--o;var r=e*(360*o+t-n);return i.prevDeg=n+r,r}function getAbsoluteDistByClient(t,e,i,n){return getAbsoluteDist(getRad$1(n.startAbsoluteOrigin,[t,e])/Math.PI*180,i,n)}function getRotateInfo(t,e,i,n,s,a){var o=t.props.throttleRotate,r=void 0===o?0:o,l=i.prevSnapDeg,h=0,c=!1;if(a){var u=checkSnapRotate(t,e,n,s+n);c=u.isSnap,h=s+u.dist}c||(h=throttle$1(s+n,r));var d=h-s;return i.prevSnapDeg=d,[d-l,d,h]}function getRotationPositions(t,e,i){var n=__read(e,4),s=n[0],a=n[1],o=n[2],r=n[3];if("none"===t)return[];if(isArray$1(t))return t.map((function(t){return getRotationPositions(t,[s,a,o,r],i)[0]}));var l=__read((t||"top").split("-"),2),h=l[0],c=l[1],u=[s,a];"left"===h?u=[o,s]:"right"===h?u=[a,r]:"bottom"===h&&(u=[r,o]);var d=[(u[0][0]+u[1][0])/2,(u[0][1]+u[1][1])/2],p=getRotationRad(u,i);if(c){var g="top"===c||"left"===c,f="bottom"===h||"left"===h;d=u[g&&!f||!g&&f?0:1]}return[[d,p]]}function dragControlCondition(t,e){if(e.isRequest)return"rotatable"===e.requestAble;var i=e.inputEvent.target;if(hasClass(i,prefix("rotation-control"))||t.props.rotateAroundControls&&hasClass(i,prefix("around-control"))||hasClass(i,prefix("control"))&&hasClass(i,prefix("rotatable")))return!0;var n=t.props.rotationTarget;return!!n&&getRefTargets(n,!0).some((function(t){return!!t&&(i===t||i.contains(t))}))}var css=".rotation {\nposition: absolute;\nheight: 40px;\nwidth: 1px;\ntransform-origin: 50% 100%;\nheight: calc(40px * var(--zoom));\ntop: auto;\nleft: 0;\nbottom: 100%;\nwill-change: transform;\n}\n.rotation .rotation-line {\ndisplay: block;\nwidth: 100%;\nheight: 100%;\ntransform-origin: 50% 50%;\n}\n.rotation .rotation-control {\nborder-color: #4af;\nborder-color: var(--moveable-color);\nbackground:#fff;\ncursor: alias;\n}\n:global .view-rotation-dragging, .rotatable.direction.control {\ncursor: alias;\n}\n.rotatable.direction.control.move {\ncursor: move;\n}\n",Rotatable={name:"rotatable",canPinch:!0,props:["rotatable","rotationPosition","throttleRotate","renderDirections","rotationTarget","rotateAroundControls","edge","resolveAblesWithRotatable","displayAroundControls"],events:["rotateStart","beforeRotate","rotate","rotateEnd","rotateGroupStart","beforeRotateGroup","rotateGroup","rotateGroupEnd"],css:[css],viewClassName:function(t){return t.isDragging("rotatable")?prefix("view-rotation-dragging"):""},render:function(t,e){var i=getProps(t.props,"rotatable"),n=i.rotatable,s=i.rotationPosition,a=i.zoom,o=i.renderDirections,r=i.rotateAroundControls,l=i.resolveAblesWithRotatable,h=t.getState(),c=h.renderPoses,u=h.direction;if(!n)return null;var d=getRotationPositions(s,c,u),p=[];if(d.forEach((function(t,i){var n=__read(t,2),s=n[0],o=n[1];p.push(e.createElement("div",{key:"rotation".concat(i),className:prefix("rotation"),style:{transform:"translate(-50%) translate(".concat(s[0],"px, ").concat(s[1],"px) rotate(").concat(o,"rad)")}},e.createElement("div",{className:prefix("line rotation-line"),style:{transform:"scaleX(".concat(a,")")}}),e.createElement("div",{className:prefix("control rotation-control"),style:{transform:"translate(0.5px) scale(".concat(a,")")}})))})),o){var g=getKeys(l||{}),f={};g.forEach((function(t){l[t].forEach((function(e){f[e]=t}))}));var m=[];isArray$1(o)&&(m=o.map((function(t){var e=f[t];return{data:e?{resolve:e}:{},classNames:e?["move"]:[],dir:t}}))),p.push.apply(p,__spreadArray$1([],__read(renderDirectionControlsByInfos(t,"rotatable",m,e)),!1))}return r&&p.push.apply(p,__spreadArray$1([],__read(renderAroundControls(t,e)),!1)),p},dragControlCondition:dragControlCondition,dragControlStart:function(t,e){var i,n,s=e.datas,a=e.clientX,o=e.clientY,r=e.parentRotate,l=e.parentFlag,h=e.isPinch,c=e.isRequest,u=t.state,d=u.target,p=u.left,g=u.top,f=u.direction,m=u.beforeDirection,v=u.targetTransform,b=u.moveableClientRect,y=u.offsetMatrix,S=u.targetMatrix,x=u.allMatrix,w=u.width,C=u.height;if(!c&&!d)return!1;var T=t.getRect();s.rect=T,s.transform=v,s.left=p,s.top=g;var D=function(e){var i=getOffsetFixedPositionInfo(t.state,e);s.fixedDirection=i.fixedDirection,s.fixedOffset=i.fixedOffset,s.fixedPosition=i.fixedPosition,F&&F.setFixedPosition(e)},k=function(e){var i=getOffsetFixedDirectionInfo(t.state,e);s.fixedDirection=i.fixedDirection,s.fixedOffset=i.fixedOffset,s.fixedPosition=i.fixedPosition,F&&F.setFixedDirection(e)},$=a,O=o;if(c||h||l){var P=r||0;s.beforeInfo={origin:T.beforeOrigin,prevDeg:P,defaultDeg:P,prevSnapDeg:0,startDist:0},s.afterInfo=__assign$2(__assign$2({},s.beforeInfo),{origin:T.origin}),s.absoluteInfo=__assign$2(__assign$2({},s.beforeInfo),{origin:T.origin,startValue:P})}else{var L=null===(n=e.inputEvent)||void 0===n?void 0:n.target;if(L){var I=L.getAttribute("data-direction")||"",A=DIRECTION_REGION_TO_DIRECTION[I];if(A){s.isControl=!0,s.isAroundControl=hasClass(L,prefix("around-control")),s.controlDirection=A;var E=L.getAttribute("data-resolve");E&&(s.resolveAble=E),i=__read(getPosByDirection(calculateMoveableClientPositions(u.rootMatrix,u.renderPoses,b),A),2),$=i[0],O=i[1]}}s.beforeInfo={origin:T.beforeOrigin},s.afterInfo={origin:T.origin},s.absoluteInfo={origin:T.origin,startValue:T.rotation};var G=D;D=function(e){var i=u.is3d?4:3,n=__read(plus(getOrigin(S,i),e),2),a=n[0],o=n[1],r=calculate(y,convertPositionMatrix([a,o],i)),l=calculate(x,convertPositionMatrix([e[0],e[1]],i));G(e);var h=u.posDelta;s.beforeInfo.origin=minus(r,h),s.afterInfo.origin=minus(l,h),s.absoluteInfo.origin=minus(l,h),setRotateStartInfo(t,s.beforeInfo,$,O,b),setRotateStartInfo(t,s.afterInfo,$,O,b),setRotateStartInfo(t,s.absoluteInfo,$,O,b)},k=function(t){var e=getPosByDirection([[0,0],[w,0],[0,C],[w,C]],t);D(e)}}s.startClientX=$,s.startClientY=O,s.direction=f,s.beforeDirection=m,s.startValue=0,s.datas={},setDefaultTransformIndex(t,e,"rotate");var U=!1,F=!1;s.isControl&&s.resolveAble&&("resizable"===s.resolveAble&&(F=Resizable.dragControlStart(t,__assign$2(__assign$2({},new CustomGesto("resizable").dragStart([0,0],e)),{parentPosition:s.controlPosition,parentFixedPosition:s.fixedPosition}))));F||(U=Draggable$2.dragStart(t,(new CustomGesto).dragStart([0,0],e))),D(getTotalOrigin(t));var M=fillParams(t,e,__assign$2(__assign$2({set:function(t){s.startValue=t*Math.PI/180},setFixedDirection:k,setFixedPosition:D},fillTransformStartEvent(t,e)),{dragStart:U,resizeStart:F})),_=triggerEvent(t,"onRotateStart",M);return s.isRotate=!1!==_,u.snapRenderInfo={request:e.isRequest},!!s.isRotate&&M},dragControl:function(t,e){var i,n,s,a=e.datas,o=e.clientDistX,r=e.clientDistY,l=e.parentRotate,h=e.parentFlag,c=e.isPinch,u=e.groupDelta,d=e.resolveMatrix,p=a.beforeDirection,g=a.beforeInfo,f=a.afterInfo,m=a.absoluteInfo,v=a.isRotate,b=a.startValue,y=a.rect,S=a.startClientX,x=a.startClientY;if(v){resolveTransformEvent(t,e,"rotate");var w,C,T,D,k,$,O,P,L,I=p*getTransformDirection(e),A=t.props.parentMoveable,E=180/Math.PI*b,G=m.startValue,U=!1,F=S+o,M=x+r;if(!h&&"parentDist"in e){var _=e.parentDist;C=_,k=_,P=_}else c||h?(C=getAbsoluteDist(l,p,g),k=getAbsoluteDist(l,I,f),P=getAbsoluteDist(l,I,m)):(C=getAbsoluteDistByClient(F,M,p,g),k=getAbsoluteDistByClient(F,M,I,f),P=getAbsoluteDistByClient(F,M,I,m),U=!0);if(triggerEvent(t,"onBeforeRotate",fillParams(t,e,{beforeRotation:T=E+C,rotation:$=E+k,absoluteRotation:L=G+P,setRotation:function(t){C=k=t-E,P=k}},!0)),w=(i=__read(getRotateInfo(t,y,g,C,E,U),3))[0],C=i[1],T=i[2],D=(n=__read(getRotateInfo(t,y,f,k,E,U),3))[0],k=n[1],$=n[2],O=(s=__read(getRotateInfo(t,y,m,P,G,U),3))[0],P=s[1],L=s[2],O||D||w||A||d){var N=convertTransformFormat(a,"rotate(".concat($,"deg)"),"rotate(".concat(k,"deg)"));d&&(a.fixedPosition=getTranslateFixedPosition(t,a.targetAllTransform,a.fixedDirection,a.fixedOffset,a));var R=getRotateDist(t,k,a),j=minus(plus(u||[0,0],R),a.prevInverseDist||[0,0]);a.prevInverseDist=R,a.requestValue=null;var B=fillTransformEvent(t,N,j,c,e),H=B,z=getDist$2([F,M],m.startAbsoluteOrigin)-m.startDist,V=void 0;if("resizable"===a.resolveAble){var q=Resizable.dragControl(t,__assign$2(__assign$2({},setCustomDrag(e,t.state,[e.deltaX,e.deltaY],!!c,!1,"resizable")),{resolveMatrix:!0,parentDistance:z}));q&&(V=q,H=fillAfterTransform(H,q,e))}var W=fillParams(t,e,__assign$2(__assign$2({delta:D,dist:k,rotate:$,rotation:$,beforeDist:C,beforeDelta:w,beforeRotate:T,beforeRotation:T,absoluteDist:P,absoluteDelta:O,absoluteRotate:L,absoluteRotation:L,isPinch:!!c,resize:V},B),H));return triggerEvent(t,"onRotate",W),W}}},dragControlEnd:function(t,e){var i=e.datas;if(i.isRotate){i.isRotate=!1;var n=fillEndParams(t,e,{});return triggerEvent(t,"onRotateEnd",n),n}},dragGroupControlCondition:dragControlCondition,dragGroupControlStart:function(t,e){var i=e.datas,n=t.state,s=n.left,a=n.top,o=n.beforeOrigin,r=this.dragControlStart(t,e);if(!r)return!1;r.set(i.beforeDirection*t.rotation);var l=triggerChildAbles(t,this,"dragControlStart",e,(function(t,e){var i=t.state,n=i.left,r=i.top,l=i.beforeOrigin,h=plus(minus([n,r],[s,a]),minus(l,o));return e.datas.startGroupClient=h,e.datas.groupClient=h,__assign$2(__assign$2({},e),{parentRotate:0})})),h=triggerEvent(t,"onRotateGroupStart",__assign$2(__assign$2({},r),{targets:t.props.targets,events:l}));return i.isRotate=!1!==h,!!i.isRotate&&r},dragGroupControl:function(t,e){var i=e.datas;if(i.isRotate){catchEvent(t,"onBeforeRotate",(function(i){triggerEvent(t,"onBeforeRotateGroup",fillParams(t,e,__assign$2(__assign$2({},i),{targets:t.props.targets}),!0))}));var n=this.dragControl(t,e);if(n){var s=i.beforeDirection,a=n.beforeDist,o=a/180*Math.PI,r=triggerChildAbles(t,this,"dragControl",e,(function(t,e){var i=e.datas.startGroupClient,n=__read(e.datas.groupClient,2),r=n[0],l=n[1],h=__read(rotate$1(i,o*s),2),c=h[0],u=h[1],d=[c-r,u-l];return e.datas.groupClient=[c,u],__assign$2(__assign$2({},e),{parentRotate:a,groupDelta:d})}));t.rotation=s*n.beforeRotation;var l=__assign$2({targets:t.props.targets,events:r,set:function(e){t.rotation=e},setGroupRotation:function(e){t.rotation=e}},n);return triggerEvent(t,"onRotateGroup",l),l}}},dragGroupControlEnd:function(t,e){var i=e.isDrag;if(e.datas.isRotate){this.dragControlEnd(t,e);var n=triggerChildAbles(t,this,"dragControlEnd",e);return triggerEvent(t,"onRotateGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(t){var e={},i=0,n=t.getRotation();return{isControl:!0,requestStart:function(){return{datas:e}},request:function(t){return"deltaRotate"in t?i+=t.deltaRotate:"rotate"in t&&(i=t.rotate-n),{datas:e,parentDist:i}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function renderGuideline(t,e){var i,n=t.direction,s=t.classNames,a=t.size,o=t.pos,r=t.zoom,l=t.key,h="horizontal"===n,c=h?"Y":"X";return e.createElement("div",{key:l,className:s.join(" "),style:(i={},i[h?"width":"height"]="".concat(a),i.transform="translate(".concat(o[0],", ").concat(o[1],") translate").concat(c,"(-50%) scale").concat(c,"(").concat(r,")"),i)})}function renderInnerGuideline(t,e){return renderGuideline(__assign$2(__assign$2({},t),{classNames:__spreadArray$1([prefix("line","guideline",t.direction)],__read(t.classNames),!1).filter((function(t){return t})),size:t.size||"".concat(t.sizeValue,"px"),pos:t.pos||t.posValue.map((function(t){return"".concat(throttle$1(t,.1),"px")}))}),e)}function renderSnapPoses(t,e,i,n,s,a,o,r){var l=t.props.zoom;return i.map((function(t,i){var h=t.type,c=t.pos,u=[0,0];return u[o]=n,u[o?0:1]=-s+c,renderInnerGuideline({key:"".concat(e,"TargetGuideline").concat(i),classNames:[prefix("target","bold",h)],posValue:u,sizeValue:a,zoom:l,direction:e},r)}))}function renderGuidelines(t,e,i,n,s,a){var o=t.props,r=o.zoom,l=o.isDisplayInnerSnapDigit,h="horizontal"===e?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,c=s[h.start],u=s[h.end];return i.filter((function(t){var e=t.hide,i=t.elementRect;if(e)return!1;if(l&&i){var n=i.rect;if(n[h.start]<=c&&u<=n[h.end])return!1}return!0})).map((function(t,i){var s=t.pos,o=t.size,l=t.element,h=t.className,c=[-n[0]+s[0],-n[1]+s[1]];return renderInnerGuideline({key:"".concat(e,"-default-guideline-").concat(i),classNames:l?[prefix("bold"),h]:[prefix("normal"),h],direction:e,posValue:c,sizeValue:o,zoom:r},a)}))}function renderDigitLine(t,e,i,n,s,a,o,r){var l,h=t.props,c=h.snapDigit,u=void 0===c?0:c,d=h.isDisplaySnapDigit,p=void 0===d||d,g=h.snapDistFormat,f=void 0===g?function(t,e){return t}:g,m=h.zoom,v="horizontal"===e?"X":"Y",b="vertical"===e?"height":"width",y=Math.abs(s),S=p?parseFloat(y.toFixed(u)):0;return r.createElement("div",{key:"".concat(e,"-").concat(i,"-guideline-").concat(n),className:prefix("guideline-group",e),style:(l={left:"".concat(a[0],"px"),top:"".concat(a[1],"px")},l[b]="".concat(y,"px"),l)},renderInnerGuideline({direction:e,classNames:[prefix(i),o],size:"100%",posValue:[0,0],sizeValue:y,zoom:m},r),r.createElement("div",{className:prefix("size-value","gap"),style:{transform:"translate".concat(v,"(-50%) scale(").concat(m,")")}},S>0?f(S,e):""))}function groupByElementGuidelines(t,e,i,n){var s="vertical"===t?0:1,a="vertical"===t?1:0,o=s?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,r=i[o.start],l=i[o.end];return groupBy(e,(function(t){return t.pos[s]})).map((function(e){var i=[],h=[];return e.forEach((function(e){var c,u,d=e.element,p=e.elementRect.rect;if(p[o.end]<r)i.push(e);else if(l<p[o.start])h.push(e);else if(p[o.start]<=r&&l<=p[o.end]&&n){var g=e.pos,f={element:d,rect:__assign$2(__assign$2({},p),(c={},c[o.end]=p[o.start],c))},m={element:d,rect:__assign$2(__assign$2({},p),(u={},u[o.start]=p[o.end],u))},v=[0,0],b=[0,0];v[s]=g[s],v[a]=g[a],b[s]=g[s],b[a]=g[a]+e.size,i.push({type:t,pos:v,size:0,elementRect:f,direction:"",elementDirection:"end"}),h.push({type:t,pos:b,size:0,elementRect:m,direction:"",elementDirection:"start"})}})),i.sort((function(t,e){return e.pos[a]-t.pos[a]})),h.sort((function(t,e){return t.pos[a]-e.pos[a]})),{total:e,start:i,end:h,inner:[]}}))}function renderDashedGuidelines(t,e,i,n,s){var a=t.props.isDisplayInnerSnapDigit,o=[];return["vertical","horizontal"].forEach((function(r){var l=e.filter((function(t){return t.type===r})),h="vertical"===r?1:0,c=h?0:1,u=groupByElementGuidelines(r,l,n,a),d=h?HORIZONTAL_NAMES_MAP:VERTICAL_NAMES_MAP,p=h?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,g=n[d.start],f=n[d.end];u.forEach((function(e){var a=e.total,l=e.start,u=e.end,m=e.inner,v=i[c]+a[0].pos[c]-n[p.start],b=n;l.forEach((function(e){var n=e.elementRect.rect,a=b[d.start]-n[d.end];if(a>0){var l=[0,0];l[h]=i[h]+b[d.start]-g-a,l[c]=v,o.push(renderDigitLine(t,r,"dashed",o.length,a,l,e.className,s))}b=n})),b=n,u.forEach((function(e){var n=e.elementRect.rect,a=n[d.start]-b[d.end];if(a>0){var l=[0,0];l[h]=i[h]+b[d.end]-g,l[c]=v,o.push(renderDigitLine(t,r,"dashed",o.length,a,l,e.className,s))}b=n})),m.forEach((function(e){var n=e.elementRect.rect,a=g-n[d.start],l=n[d.end]-f,u=[0,0],p=[0,0];u[h]=i[h]-a,u[c]=v,p[h]=i[h]+f-g,p[c]=v,o.push(renderDigitLine(t,r,"dashed",o.length,a,u,e.className,s)),o.push(renderDigitLine(t,r,"dashed",o.length,l,p,e.className,s))}))}))})),o}function renderGapGuidelines(t,e,i,n,s){var a=[];return["horizontal","vertical"].forEach((function(o){var r=e.filter((function(t){return t.type===o})).slice(0,1),l="vertical"===o?0:1,h=l?0:1,c=l?HORIZONTAL_NAMES_MAP:VERTICAL_NAMES_MAP,u=l?VERTICAL_NAMES_MAP:HORIZONTAL_NAMES_MAP,d=n[c.start],p=n[c.end],g=n[u.start],f=n[u.end];r.forEach((function(e){var n=e.gap,o=e.gapRects,r=Math.max.apply(Math,__spreadArray$1([g],__read(o.map((function(t){return t.rect[u.start]}))),!1)),m=Math.min.apply(Math,__spreadArray$1([f],__read(o.map((function(t){return t.rect[u.end]}))),!1)),v=(r+m)/2;r!==m&&v!==(g+f)/2&&o.forEach((function(e){var o=e.rect,r=e.className,u=[i[0],i[1]];if(o[c.end]<d)u[l]+=o[c.end]-d;else{if(!(p<o[c.start]))return;u[l]+=o[c.start]-d-n}u[h]+=v-g,a.push(renderDigitLine(t,l?"vertical":"horizontal","gap",a.length,n,u,r,s))}))}))})),a}function getTotalGuidelines(t){var e,i,n=t.state,s=n.containerClientRect,a=n.hasFixed,o=s.overflow,r=s.scrollHeight,l=s.scrollWidth,h=s.clientHeight,c=s.clientWidth,u=s.clientLeft,d=s.clientTop,p=t.props,g=p.snapGap,f=void 0===g||g,m=p.verticalGuidelines,v=p.horizontalGuidelines,b=p.snapThreshold,y=void 0===b?5:b,S=p.maxSnapElementGuidelineDistance,x=void 0===S?1/0:S,w=p.isDisplayGridGuidelines,C=getRect(getAbsolutePosesByState(t.state)),T=C.top,D=C.left,k=C.bottom,$=C.right,O={top:T,left:D,bottom:k,right:$,center:(D+$)/2,middle:(T+k)/2},P=__spreadArray$1([],__read(getElementGuidelines(t)),!1),L=(null!==(i=null===(e=n.snapThresholdInfo)||void 0===e?void 0:e.multiples)&&void 0!==i?i:[1,1]).map((function(t){return t*y}));f&&P.push.apply(P,__spreadArray$1([],__read(getGapGuidelines(t,O,L)),!1));var I=__assign$2({},n.snapOffset||{left:0,top:0,bottom:0,right:0});if(P.push.apply(P,__spreadArray$1([],__read(getGridGuidelines(t,o?l:c,o?r:h,u,d,I,w)),!1)),a){var A=s.left,E=s.top;I.left+=A,I.top+=E,I.right+=A,I.bottom+=E}return P.push.apply(P,__spreadArray$1([],__read(getDefaultGuidelines(v||!1,m||!1,o?l:c,o?r:h,u,d,I)),!1)),P=P.filter((function(t){var e=t.element,i=t.elementRect,n=t.type;if(!e||!i)return!0;var s=i.rect;return checkBetweenRects(O,s,n,x)}))}function getGapGuidelines(t,e,i){var n=t.props,s=n.maxSnapElementGuidelineDistance,a=void 0===s?1/0:s,o=n.maxSnapElementGapDistance,r=void 0===o?1/0:o,l=t.state.elementRects,h=[];return[["vertical",VERTICAL_NAMES_MAP,HORIZONTAL_NAMES_MAP],["horizontal",HORIZONTAL_NAMES_MAP,VERTICAL_NAMES_MAP]].forEach((function(t){var n=__read(t,3),s=n[0],o=n[1],c=n[2],u=e[o.start],d=e[o.end],p=e[o.center],g=e[c.start],f=e[c.end],m={left:i[0],top:i[1]};function v(t){var e=t.rect,i=m[o.start];return e[o.end]<u+i?u-e[o.end]:d-i<e[o.start]?e[o.start]-d:-1}var b=l.filter((function(t){var e=t.rect;return!(e[c.start]>f||e[c.end]<g)&&v(t)>0})).sort((function(t,e){return v(t)-v(e)})),y=[];b.forEach((function(t){b.forEach((function(e){if(t!==e){var i=t.rect,n=e.rect,s=i[c.start],a=i[c.end],o=n[c.start];s>n[c.end]||o>a||y.push([t,e])}}))})),y.forEach((function(t){var i=__read(t,2),n=i[0],l=i[1],c=n.rect,g=l.rect,f=c[o.start],v=c[o.end],b=g[o.start],y=g[o.end],S=m[o.start],x=0,w=0,C=!1,T=!1,D=!1;if(v<=u&&d<=b){if(T=!0,abs$1((w=v+(x=(b-v-(d-u))/2)+(d-u)/2)-p)>S)return}else if(v<b&&y<u+S){if(C=!0,abs$1((w=y+(x=b-v))-u)>S)return}else{if(!(v<b&&d-S<f))return;if(D=!0,abs$1((w=f-(x=b-v))-d)>S)return}x&&checkBetweenRects(e,g,s,a)&&(x>r||h.push({type:s,pos:"vertical"===s?[w,0]:[0,w],element:l.element,size:0,className:l.className,isStart:C,isCenter:T,isEnd:D,gap:x,hide:!0,gapRects:[n,l],direction:"",elementDirection:""}))}))})),h}function startGridGroupGuidelines(t,e,i,n){var s,a,o=t.props,r=t.state,l=o.snapGridAll,h=o.snapGridWidth,c=void 0===h?0:h,u=o.snapGridHeight,d=void 0===u?0:u,p=r.snapRenderInfo,g=p&&((null===(s=p.direction)||void 0===s?void 0:s[0])||(null===(a=p.direction)||void 0===a?void 0:a[1])),f=t.moveables;if(l&&f&&g&&(c||d)){if(r.snapThresholdInfo)return;r.snapThresholdInfo={multiples:[1,1],offset:[0,0]};var m=t.getRect(),v=m.children,b=p.direction;if(v){var y=b.map((function(t,s){var a=0===s?{snapSize:c,posName:"left",sizeName:"width",clientOffset:n.left-e}:{snapSize:d,posName:"top",sizeName:"height",clientOffset:n.top-i},o=a.snapSize,r=a.posName,l=a.sizeName,h=a.clientOffset;if(!o)return{dir:t,multiple:1,snapSize:o,snapOffset:0};var u=m[l],p=m[r],g=flat$2(v.map((function(t){return[t[r]-p,t[l],u-t[l]-t[r]+p]}))).filter((function(t){return t})).sort((function(t,e){return t-e})),f=g[0],b=g.map((function(t){return throttle$1(t/f,.1)*o})),y=1,S=throttle$1(u/f,.1);for(y=1;y<=10&&!b.every((function(t){return t*y%1==0}));++y);var x=(1-t)/2,w=dot(p-h,p-h+u,x,1-x);return{multiple:S*y,dir:t,snapSize:o,snapOffset:Math.round(w/o)}})),S=y.map((function(t){return t.multiple||1}));r.snapThresholdInfo.multiples=S,r.snapThresholdInfo.offset=y.map((function(t){return t.snapOffset})),y.forEach((function(t,e){t.snapSize}))}}else r.snapThresholdInfo=null}function getGridGuidelines(t,e,i,n,s,a,o){void 0===n&&(n=0),void 0===s&&(s=0);var r=t.props,l=t.state,h=r.snapGridWidth,c=void 0===h?0:h,u=r.snapGridHeight,d=void 0===u?0:u,p=[],g=a.left,f=a.top,m=[0,0];startGridGroupGuidelines(t,n,s,a);var v=l.snapThresholdInfo,b=c,y=d;if(v&&(c*=v.multiples[0]||1,d*=v.multiples[1]||1,m=v.offset),d){for(var S=function(t){p.push({type:"horizontal",pos:[g,throttle$1(m[1]*y+t-s+f,.1)],className:prefix("grid-guideline"),size:e,hide:!o,direction:"",grid:!0})},x=0;x<=2*i;x+=d)S(x);for(x=-d;x>=-i;x-=d)S(x)}if(c){for(S=function(t){p.push({type:"vertical",pos:[throttle$1(m[0]*b+t-n+g,.1),f],className:prefix("grid-guideline"),size:i,hide:!o,direction:"",grid:!0})},x=0;x<=2*e;x+=c)S(x);for(x=-c;x>=-e;x-=c)S(x)}return p}function checkBetweenRects(t,e,i,n){return"horizontal"===i?abs$1(t.right-e.left)<=n||abs$1(t.left-e.right)<=n||t.left<=e.right&&e.left<=t.right:"vertical"!==i||(abs$1(t.bottom-e.top)<=n||abs$1(t.top-e.bottom)<=n||t.top<=e.bottom&&e.top<=t.bottom)}function getElementGuidelines(t){var e=t.state,i=t.props.elementGuidelines,n=void 0===i?[]:i;if(!n.length)return e.elementRects=[],[];var s=(e.elementRects||[]).filter((function(t){return!t.refresh})),a=n.map((function(t){return isObject$3(t)&&"element"in t?__assign$2(__assign$2({},t),{element:getRefTarget(t.element,!0)}):{element:getRefTarget(t,!0)}})).filter((function(t){return t.element})),o=diff(s.map((function(t){return t.element})),a.map((function(t){return t.element}))),r=o.maintained,l=o.added,h=[];r.forEach((function(t){var e=__read(t,2),i=e[0],n=e[1];h[n]=s[i]})),getSnapElementRects(t,l.map((function(t){return a[t]}))).map((function(t,e){h[l[e]]=t})),e.elementRects=h;var c=getSnapDirections(t.props.elementSnapDirections),u=[];return h.forEach((function(t){var e=t.element,i=t.top,n=void 0===i?c.top:i,s=t.left,a=void 0===s?c.left:s,o=t.right,r=void 0===o?c.right:o,l=t.bottom,h=void 0===l?c.bottom:l,d=t.center,p=void 0===d?c.center:d,g=t.middle,f=void 0===g?c.middle:g,m=t.className,v=t.rect,b=splitSnapDirectionPoses({top:n,right:r,left:a,bottom:h,center:p,middle:f},v),y=b.horizontal,S=b.vertical,x=b.horizontalNames,w=b.verticalNames,C=v.top,T=v.left,D=v.right-T,k=v.bottom-C,$=[D,k];S.forEach((function(i,n){u.push({type:"vertical",element:e,pos:[throttle$1(i,.1),C],size:k,sizes:$,className:m,elementRect:t,elementDirection:SNAP_SKIP_NAMES_MAP[w[n]]||w[n],direction:""})})),y.forEach((function(i,n){u.push({type:"horizontal",element:e,pos:[T,throttle$1(i,.1)],size:D,sizes:$,className:m,elementRect:t,elementDirection:SNAP_SKIP_NAMES_MAP[x[n]]||x[n],direction:""})}))})),u}function getObjectGuidelines(t,e){return t?t.map((function(t){var i=isObject$3(t)?t:{pos:t},n=i.pos;return isNumber$2(n)?i:__assign$2(__assign$2({},i),{pos:convertUnitSize(n,e)})})):[]}function getDefaultGuidelines(t,e,i,n,s,a,o){void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o={left:0,top:0,right:0,bottom:0});var r=[],l=o.left,h=o.top,c=o.bottom,u=i+o.right-l,d=n+c-h;return getObjectGuidelines(t,d).forEach((function(t){r.push({type:"horizontal",pos:[l,throttle$1(t.pos-a+h,.1)],size:u,className:t.className,direction:""})})),getObjectGuidelines(e,u).forEach((function(t){r.push({type:"vertical",pos:[throttle$1(t.pos-s+l,.1),h],size:d,className:t.className,direction:""})})),r}function getSnapElementRects(t,e){if(!e.length)return[];var i=t.props.groupable,n=t.state,s=n.containerClientRect,a=n.rootMatrix,o=n.is3d,r=n.offsetDelta,l=o?4:3,h=__read(calculateContainerPos(a,s,l),2),c=h[0],u=h[1],d=i?0:r[0],p=i?0:r[1];return e.map((function(t){var e=t.element.getBoundingClientRect(),i=e.left-c-d,n=e.top-u-p,s=n+e.height,o=i+e.width,r=__read(calculateInversePosition(a,[i,n],l),2),h=r[0],g=r[1],f=__read(calculateInversePosition(a,[o,s],l),2),m=f[0],v=f[1];return __assign$2(__assign$2({},t),{rect:{left:h,right:m,top:g,bottom:v,center:(h+m)/2,middle:(g+v)/2}})}))}function checkSnapInfo(t){var e=t.state,i=e.container,n=t.props.snapContainer||i;if(e.snapContainer===n&&e.guidelines&&e.guidelines.length)return!1;var s=e.containerClientRect,a={left:0,top:0,bottom:0,right:0};if(i!==n){var o=getRefTarget(n,!0);if(o){var r=getClientRect(o),l=getDragDistByState(e,[r.left-s.left,r.top-s.top]),h=getDragDistByState(e,[r.right-s.right,r.bottom-s.bottom]);a.left=throttle$1(l[0],1e-5),a.top=throttle$1(l[1],1e-5),a.right=throttle$1(h[0],1e-5),a.bottom=throttle$1(h[1],1e-5)}}return e.snapContainer=n,e.snapOffset=a,e.guidelines=getTotalGuidelines(t),e.enableSnap=!0,!0}function getNextFixedPoses(t,e,i,n,s,a){var o=calculatePoses(t,e,i,a?4:3);return getAbsolutePoses(o,minus(s,getPosByDirection(o,n)))}function normalized(t){return t?t/abs$1(t):0}function getSizeOffsetInfo(t,e,i,n,s,a){var o=getCheckSnapDirections(i,a.fixedDirection,n),r=getCheckInnerBoundLineInfos(t,e,i,n),l=__spreadArray$1(__spreadArray$1([],__read(getSnapBoundInfo(t,e,o,n,s,a)),!1),__read(getInnerBoundInfo(t,r,a)),!1),h=getNearOffsetInfo(l,0),c=getNearOffsetInfo(l,1);return{width:{isBound:h.isBound,offset:h.offset[0]},height:{isBound:c.isBound,offset:c.offset[1]}}}function recheckSizeByTwoDirection(t,e,i,n,s,a,o,r,l){var h=getPosByDirection(e,o),c=checkMoveableSnapBounds(t,r,{vertical:[h[0]],horizontal:[h[1]]}),u=c.horizontal.offset,d=c.vertical.offset;if(throttle$1(d,FLOAT_POINT_NUM)||throttle$1(u,FLOAT_POINT_NUM)){var p=__read(getDragDist({datas:l,distX:-d,distY:-u}),2),g=p[0],f=p[1];return[Math.min(s||1/0,i+o[0]*g)-i,Math.min(a||1/0,n+o[1]*f)-n]}return[0,0]}function checkSizeDist(t,e,i,n,s,a,o,r){for(var l=getAbsolutePosesByState(t.state),h=t.props.keepRatio,c=0,u=0,d=0;d<2;++d){var p=getSizeOffsetInfo(t,e(c,u),s,h,o,r),g=p.width,f=p.height,m=g.isBound,v=f.isBound,b=g.offset,y=f.offset;if(1===d&&(m||(b=0),v||(y=0)),0===d&&o&&!m&&!v)return[0,0];if(h){var S=abs$1(b)*(i?1/i:1),x=abs$1(y)*(n?1/n:1);(m&&v?S<x:v||!m&&S<x)?b=i*y/n:y=n*b/i}c+=b,u+=y}if(!h&&s[0]&&s[1]){var w=checkMaxBounds(t,l,s,a,r),C=w.maxWidth,T=w.maxHeight,D=__read(recheckSizeByTwoDirection(t,e(c,u).map((function(t){return t.map((function(t){return throttle$1(t,FLOAT_POINT_NUM)}))})),i+c,n+u,C,T,s,o,r),2);c+=b=D[0],u+=y=D[1]}return[c,u]}function absDegree(t){return t<0&&(t=t%360+360),t%=360}function bumpDegree(t,e){e=absDegree(e);var i=Math.floor(t/360),n=360*i+360-e,s=360*i+e;return abs$1(t-n)<abs$1(t-s)?n:s}function getMinDegreeDistance(t,e){t=absDegree(t),e=absDegree(e);var i=absDegree(t-e);return Math.min(i,360-i)}function checkSnapRotate(t,e,i,n){var s,a=t.props,o=null!==(s=a[NAME_snapRotationThreshold])&&void 0!==s?s:5,r=a[NAME_snapRotationDegrees];if(hasGuidelines(t,"rotatable")){var l=e.pos1,h=e.pos2,c=e.pos3,u=e.pos4,d=e.origin,p=i*Math.PI/180,g=[l,h,c,u].map((function(t){return minus(t,d)})),f=g.map((function(t){return rotate$1(t,p)})),m=__spreadArray$1(__spreadArray$1([],__read(checkRotateBounds(t,g,f,d,i)),!1),__read(checkRotateInnerBounds(t,g,f,d,i)),!1);m.sort((function(t,e){return abs$1(t-i)-abs$1(e-i)}));var v=m.length>0;if(v)return{isSnap:v,dist:v?m[0]:i}}if((null==r?void 0:r.length)&&o){var b=r.slice().sort((function(t,e){return getMinDegreeDistance(t,n)-getMinDegreeDistance(e,n)}))[0];if(getMinDegreeDistance(b,n)<=o)return{isSnap:!0,dist:i+bumpDegree(n,b)-n}}return{isSnap:!1,dist:i}}function checkSnapResize(t,e,i,n,s,a,o){if(!hasGuidelines(t,"resizable"))return[0,0];var r=o.fixedDirection,l=o.nextAllMatrix,h=t.state,c=h.allMatrix,u=h.is3d;return checkSizeDist(t,(function(t,n){return getNextFixedPoses(l||c,e+t,i+n,r,s,u)}),e,i,n,s,a,o)}function checkSnapScale(t,e,i,n,s){if(!hasGuidelines(t,"scalable"))return[0,0];var a=s.startOffsetWidth,o=s.startOffsetHeight,r=s.fixedPosition,l=s.fixedDirection,h=s.is3d,c=checkSizeDist(t,(function(t,i){return getNextFixedPoses(scaleMatrix(s,plus(e,[t/a,i/o])),a,o,l,r,h)}),a,o,i,r,n,s);return[c[0]/a,c[1]/o]}function startCheckSnapDrag(t,e){e.absolutePoses=getAbsolutePosesByState(t.state)}function getSnapGuidelines(t){var e=[];return t.forEach((function(t){t.guidelineInfos.forEach((function(i){var n=i.guideline;find$2(e,(function(t){return t.guideline===n}))||(n.direction="",e.push({guideline:n,posInfo:t}))}))})),e.map((function(t){var e=t.guideline,i=t.posInfo;return __assign$2(__assign$2({},e),{direction:i.direction})}))}function addBoundGuidelines(t,e,i,n,s,a){var o=checkBoundPoses(getBounds(t,a),e,i),r=o.vertical,l=o.horizontal,h=getInitialBounds();r.forEach((function(t){t.isBound&&("start"===t.direction&&(h.left=!0),"end"===t.direction&&(h.right=!0),n.push({type:"bounds",pos:t.pos}))})),l.forEach((function(t){t.isBound&&("start"===t.direction&&(h.top=!0),"end"===t.direction&&(h.bottom=!0),s.push({type:"bounds",pos:t.pos}))}));var c=checkInnerBoundPoses(t),u=c.boundMap,d=c.vertical,p=c.horizontal;return d.forEach((function(t){findIndex(n,(function(e){var i=e.type,n=e.pos;return"bounds"===i&&n===t}))>=0||n.push({type:"bounds",pos:t})})),p.forEach((function(t){findIndex(s,(function(e){var i=e.type,n=e.pos;return"bounds"===i&&n===t}))>=0||s.push({type:"bounds",pos:t})})),{boundMap:h,innerBoundMap:u}}var directionCondition$1=getDirectionCondition("",["resizable","scalable"]),Snappable={name:"snappable",dragRelation:"strong",props:["snappable","snapContainer","snapDirections","elementSnapDirections","snapGap","snapGridWidth","snapGridHeight","isDisplaySnapDigit","isDisplayInnerSnapDigit","isDisplayGridGuidelines","snapDigit","snapThreshold","snapRenderThreshold","snapGridAll",NAME_snapRotationThreshold,NAME_snapRotationDegrees,NAME_snapHorizontalThreshold,NAME_snapVerticalThreshold,"horizontalGuidelines","verticalGuidelines","elementGuidelines","bounds","innerBounds","snapDistFormat","maxSnapElementGuidelineDistance","maxSnapElementGapDistance"],events:["snap","bound"],css:[":host {\n--bounds-color: #d66;\n}\n.guideline {\npointer-events: none;\nz-index: 2;\n}\n.guideline.bounds {\nbackground: #d66;\nbackground: var(--bounds-color);\n}\n.guideline-group {\nposition: absolute;\ntop: 0;\nleft: 0;\n}\n.guideline-group .size-value {\nposition: absolute;\ncolor: #f55;\nfont-size: 12px;\nfont-size: calc(12px * var(--zoom));\nfont-weight: bold;\n}\n.guideline-group.horizontal .size-value {\ntransform-origin: 50% 100%;\ntransform: translateX(-50%);\nleft: 50%;\nbottom: 5px;\nbottom: calc(2px + 3px * var(--zoom));\n}\n.guideline-group.vertical .size-value {\ntransform-origin: 0% 50%;\ntop: 50%;\ntransform: translateY(-50%);\nleft: 5px;\nleft: calc(2px + 3px * var(--zoom));\n}\n.guideline.gap {\nbackground: #f55;\n}\n.size-value.gap {\ncolor: #f55;\n}\n"],render:function(t,e){var i=t.state,n=i.top,s=i.left,a=i.pos1,o=i.pos2,r=i.pos3,l=i.pos4,h=i.snapRenderInfo,c=t.props.snapRenderThreshold,u=void 0===c?1:c;if(!h||!h.render||!hasGuidelines(t,""))return watchValue(t,"boundMap",getInitialBounds(),(function(t){return JSON.stringify(t)})),watchValue(t,"innerBoundMap",getInitialBounds(),(function(t){return JSON.stringify(t)})),[];i.guidelines=getTotalGuidelines(t);var d=Math.min(a[0],o[0],r[0],l[0]),p=Math.min(a[1],o[1],r[1],l[1]),g=h.externalPoses||[],f=getAbsolutePosesByState(t.state),m=[],v=[],b=[],y=[],S=[],x=getRect(f),w=x.width,C=x.height,T=x.top,D=x.left,k=x.bottom,$=x.right,O={left:D,right:$,top:T,bottom:k,center:(D+$)/2,middle:(T+k)/2},P=g.length>0,L=P?getRect(g):{};if(!h.request){if(h.direction&&S.push(getSnapInfosByDirection(t,f,h.direction,u,u)),h.snap){var I=getRect(f);h.center&&(I.middle=(I.top+I.bottom)/2,I.center=(I.left+I.right)/2),S.push(checkSnaps(t,I,u,u))}P&&(h.center&&(L.middle=(L.top+L.bottom)/2,L.center=(L.left+L.right)/2),S.push(checkSnaps(t,L,u,u))),S.forEach((function(t){var e=t.vertical.posInfos,i=t.horizontal.posInfos;m.push.apply(m,__spreadArray$1([],__read(e.filter((function(t){return t.guidelineInfos.some((function(t){return!t.guideline.hide}))})).map((function(t){return{type:"snap",pos:t.pos}}))),!1)),v.push.apply(v,__spreadArray$1([],__read(i.filter((function(t){return t.guidelineInfos.some((function(t){return!t.guideline.hide}))})).map((function(t){return{type:"snap",pos:t.pos}}))),!1)),b.push.apply(b,__spreadArray$1([],__read(getSnapGuidelines(e)),!1)),y.push.apply(y,__spreadArray$1([],__read(getSnapGuidelines(i)),!1))}))}var A=addBoundGuidelines(t,[D,$],[T,k],m,v),E=A.boundMap,G=A.innerBoundMap;P&&addBoundGuidelines(t,[L.left,L.right],[L.top,L.bottom],m,v,h.externalBounds);var U=__spreadArray$1(__spreadArray$1([],__read(b),!1),__read(y),!1),F=U.filter((function(t){return t.element&&!t.gapRects})),M=U.filter((function(t){return t.gapRects})).sort((function(t,e){return t.gap-e.gap}));triggerEvent(t,"onSnap",{guidelines:U.filter((function(t){return!t.element})),elements:F,gaps:M},!0);var _=watchValue(t,"boundMap",E,(function(t){return JSON.stringify(t)}),getInitialBounds()),N=watchValue(t,"innerBoundMap",G,(function(t){return JSON.stringify(t)}),getInitialBounds());return E!==_&&G!==N||triggerEvent(t,"onBound",{bounds:E,innerBounds:G},!0),__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1([],__read(renderDashedGuidelines(t,F,[d,p],O,e)),!1),__read(renderGapGuidelines(t,M,[d,p],O,e)),!1),__read(renderGuidelines(t,"horizontal",y,[s,n],O,e)),!1),__read(renderGuidelines(t,"vertical",b,[s,n],O,e)),!1),__read(renderSnapPoses(t,"horizontal",v,d,n,w,0,e)),!1),__read(renderSnapPoses(t,"vertical",m,p,s,C,1,e)),!1)},dragStart:function(t,e){t.state.snapRenderInfo={request:e.isRequest,snap:!0,center:!0},checkSnapInfo(t)},drag:function(t){var e=t.state;checkSnapInfo(t)||(e.guidelines=getTotalGuidelines(t)),e.snapRenderInfo&&(e.snapRenderInfo.render=!0)},pinchStart:function(t){this.unset(t)},dragEnd:function(t){this.unset(t)},dragControlCondition:function(t,e){return!(!directionCondition$1(t,e)&&!dragControlCondition(t,e))||(!e.isRequest&&e.inputEvent?hasClass(e.inputEvent.target,prefix("snap-control")):void 0)},dragControlStart:function(t){t.state.snapRenderInfo=null,checkSnapInfo(t)},dragControl:function(t){this.drag(t)},dragControlEnd:function(t){this.unset(t)},dragGroupStart:function(t,e){this.dragStart(t,e)},dragGroup:function(t){this.drag(t)},dragGroupEnd:function(t){this.unset(t)},dragGroupControlStart:function(t){t.state.snapRenderInfo=null,checkSnapInfo(t)},dragGroupControl:function(t){this.drag(t)},dragGroupControlEnd:function(t){this.unset(t)},unset:function(t){var e=t.state;e.enableSnap=!1,e.guidelines=[],e.snapRenderInfo=null,e.elementRects=[]}};function multiply2(t,e){return[t[0]*e[0],t[1]*e[1]]}function prefix(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return prefixNames.apply(void 0,__spreadArray$1([PREFIX],__read(t),!1))}function defaultSync(t){t()}function getTransformMatrix(t){return t&&"none"!==t?isObject$3(t)?t:parseMat(t):[1,0,0,1,0,0]}function getAbsoluteMatrix(t,e,i){return multiplies(e,createOriginMatrix(i,e),t,createOriginMatrix(i.map((function(t){return-t})),e))}function measureSVGSize(t,e,i){return"%"===e?getSVGViewBox(t.ownerSVGElement)[i?"width":"height"]/100:1}function getBeforeTransformOrigin(t){return getTransformOrigin(getComputedStyle$3(t,":before")).map((function(e,i){var n=splitUnit(e),s=n.value,a=n.unit;return s*measureSVGSize(t,a,0===i)}))}function getTransformOriginArray(t){return t?t.split(" "):["0","0"]}function getTransformOrigin(t){return getTransformOriginArray(t.transformOrigin)}function getElementTransform(t){var e=getCachedStyle(t)("transform");if(e&&"none"!==e)return e;if("transform"in t){var i=t.transform.baseVal;if(!i)return"";var n=i.length;if(!n)return"";for(var s=[],a=function(t){var e=i[t].matrix;s.push("matrix(".concat(["a","b","c","d","e","f"].map((function(t){return e[t]})).join(", "),")"))},o=0;o<n;++o)a(o);return s.join(" ")}return""}function getOffsetInfo(t,e,i,n,s){var a,o,r,l,h=getDocumentElement(t)||getDocumentBody(t),c=!1;if(!t||i)r=t;else{var u=null===(a=null==t?void 0:t.assignedSlot)||void 0===a?void 0:a.parentElement,d=t.parentElement;u?(c=!0,l=d,r=u):r=d}for(var p=!1,g=t===e||r===e,f="relative",m=1,v=parseFloat(null==s?void 0:s("zoom"))||1,b=null==s?void 0:s("position");r&&r!==h;){e===r&&(g=!0);var y=getCachedStyle(r),S=r.tagName.toLowerCase(),x=getElementTransform(r),w=y("willChange"),C=parseFloat(y("zoom"))||1;if(f=y("position"),n&&1!==C){m=C;break}if(!i&&n&&1!==v&&b&&"absolute"!==b||"svg"===S||"foreignobject"===S||"static"!==f||x&&"none"!==x||"transform"===w)break;var T=null===(o=null==t?void 0:t.assignedSlot)||void 0===o?void 0:o.parentNode,D=r.parentNode;T&&(c=!0,l=D);var k=D;if(k&&11===k.nodeType){p=!0,f=getCachedStyle(r=k.host)("position");break}r=k,f="relative"}return{offsetZoom:m,hasSlot:c,parentSlotElement:l,isCustomElement:p,isStatic:"static"===f,isEnd:g||!r||r===h,offsetParent:r||h}}function getOffsetPosInfo(t,e){var i,n,s,a=t.tagName.toLowerCase(),o=t.offsetLeft,r=t.offsetTop,l=getCachedStyle(t),h=isUndefined(o),c=!h;return c||"svg"===a&&!t.ownerSVGElement?s=(n=getTransformOriginArray(l("transformOrigin")).map((function(t){return parseFloat(t)}))).slice():(s=(n=IS_WEBKIT605?getBeforeTransformOrigin(t):getTransformOriginArray(l("transformOrigin")).map((function(t){return parseFloat(t)}))).slice(),c=!0,"svg"===a?(o=0,r=0):(o=(i=__read(getSVGGraphicsOffset(t,n,t===e&&"g"===e.tagName.toLowerCase()),4))[0],r=i[1],n[0]=i[2],n[1]=i[3])),{tagName:a,isSVG:h,hasOffset:c,offset:[o||0,r||0],origin:n,targetOrigin:s}}function getBodyOffset(t,e){var i=getCachedStyle(t),n=getCachedStyle(getDocumentBody(t)),s=n("position");if(!(e||s&&"static"!==s))return[0,0];var a=parseInt(n("marginLeft"),10),o=parseInt(n("marginTop"),10);return"absolute"===i("position")&&("auto"===i("top")&&"auto"===i("bottom")||(o=0),"auto"===i("left")&&"auto"===i("right")||(a=0)),[a,o]}function convert3DMatrixes(t){t.forEach((function(t){var e=t.matrix;e&&(t.matrix=convertDimension(e,3,4))}))}function getPositionFixedInfo(t){for(var e=t.parentElement,i=!1,n=getDocumentBody(t);e;){var s=getComputedStyle$3(e).transform;if(s&&"none"!==s){i=!0;break}if(e===n)break;e=e.parentElement}return{fixedContainer:e||n,hasTransform:i}}function makeMatrixCSS(t,e){return void 0===e&&(e=t.length>9),"".concat(e?"matrix3d":"matrix","(").concat(convertMatrixtoCSS(t,!e).join(","),")")}function getSVGViewBox(t){var e=t.clientWidth,i=t.clientHeight;if(!t)return{x:0,y:0,width:0,height:0,clientWidth:e,clientHeight:i};var n=t.viewBox,s=n&&n.baseVal||{x:0,y:0,width:0,height:0};return{x:s.x,y:s.y,width:s.width||e,height:s.height||i,clientWidth:e,clientHeight:i}}function getSVGMatrix(t,e){var i,n=getSVGViewBox(t),s=n.width,a=n.height,o=n.clientWidth,r=n.clientHeight,l=o/s,h=r/a,c=t.preserveAspectRatio.baseVal,u=c.align,d=c.meetOrSlice,p=[0,0],g=[l,h],f=[0,0];if(1!==u){var m=(u-2)%3,v=Math.floor((u-2)/3);p[0]=s*m/2,p[1]=a*v/2;var b=2===d?Math.max(h,l):Math.min(l,h);g[0]=b,g[1]=b,f[0]=(o-s)/2*m,f[1]=(r-a)/2*v}var y=createScaleMatrix(g,e);return i=__read(f,2),y[e*(e-1)]=i[0],y[e*(e-1)+1]=i[1],getAbsoluteMatrix(y,e,p)}function getSVGGraphicsOffset(t,e,i){var n=t.tagName.toLowerCase();if(!t.getBBox||!i&&"g"===n)return[0,0,0,0];var s="fill-box"===getCachedStyle(t)("transform-box"),a=t.getBBox(),o=getSVGViewBox(t.ownerSVGElement),r=a.x,l=a.y;"foreignobject"!==n||r||l||(r=parseFloat(t.getAttribute("x"))||0,l=parseFloat(t.getAttribute("y"))||0);var h=r-o.x,c=l-o.y;return[h,c,s?e[0]:e[0]-h,s?e[1]:e[1]-c]}function calculatePosition(t,e,i){return calculate(t,convertPositionMatrix(e,i),i)}function calculatePoses(t,e,i,n){return[[0,0],[e,0],[0,i],[e,i]].map((function(e){return calculatePosition(t,e,n)}))}function getRect(t){var e=t.map((function(t){return t[0]})),i=t.map((function(t){return t[1]})),n=Math.min.apply(Math,__spreadArray$1([],__read(e),!1)),s=Math.min.apply(Math,__spreadArray$1([],__read(i),!1)),a=Math.max.apply(Math,__spreadArray$1([],__read(e),!1)),o=Math.max.apply(Math,__spreadArray$1([],__read(i),!1));return{left:n,top:s,right:a,bottom:o,width:a-n,height:o-s}}function calculateRect(t,e,i,n){return getRect(calculatePoses(t,e,i,n))}function getSVGOffset(t,e,i,n,s){var a,o=t.target,r=t.origin,l=e.matrix,h=getSize$1(o),c=h.offsetWidth,u=h.offsetHeight,d=i.getBoundingClientRect(),p=[0,0];i===getDocumentBody(i)&&(p=getBodyOffset(o,!0));for(var g=o.getBoundingClientRect(),f=g.left-d.left+i.scrollLeft-(i.clientLeft||0)+p[0],m=g.top-d.top+i.scrollTop-(i.clientTop||0)+p[1],v=g.width,b=g.height,y=multiplies(n,s,l),S=calculateRect(y,c,u,n),x=S.left,w=S.top,C=S.width,T=S.height,D=calculatePosition(y,r,n),k=minus(D,[x,w]),$=[f+k[0]*v/C,m+k[1]*b/T],O=[0,0],P=0;++P<10;){var L=invert$1(s,n);a=__read(minus(calculatePosition(L,$,n),calculatePosition(L,D,n)),2),O[0]=a[0],O[1]=a[1];var I=calculateRect(multiplies(n,s,createOriginMatrix(O,n),l),c,u,n),A=I.left-f,E=I.top-m;if(abs$1(A)<2&&abs$1(E)<2)break;$[0]-=A,$[1]-=E}return O.map((function(t){return Math.round(t)}))}function calculateMoveableClientPositions(t,e,i){var n=16===t.length?4:3,s=e.map((function(e){return calculatePosition(t,e,n)})),a=i.left,o=i.top;return s.map((function(t){return[t[0]+a,t[1]+o]}))}function getDistSize(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function getDiagonalSize(t,e){return getDistSize([e[0]-t[0],e[1]-t[1]])}function getLineStyle$1(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n=getRad$1(t,e));var s=getDiagonalSize(t,e);return{transform:"translateY(-50%) translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(n,"rad) scaleY(").concat(i,")"),width:"".concat(s,"px")}}function getControlTransform(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var s=i.length,a=i.reduce((function(t,e){return t+e[0]}),0)/s,o=i.reduce((function(t,e){return t+e[1]}),0)/s;return{transform:"translateZ(0px) translate(".concat(a,"px, ").concat(o,"px) rotate(").concat(t,"rad) scale(").concat(e,")")}}function getProps(t,e){var i=t[e];return isObject$3(i)?__assign$2(__assign$2({},t),i):t}function getSize$1(t){var e=t&&!isUndefined(t.offsetWidth),i=0,n=0,s=0,a=0,o=0,r=0,l=0,h=0,c=0,u=0,d=0,p=0,g=1/0,f=1/0,m=1/0,v=1/0,b=0,y=0,S=!1;if(t)if(!e&&t.ownerSVGElement){var x=t.getBBox();S=!0,o=i=x.width,r=n=x.height,l=i,h=n,s=i,a=n}else{var w=getCachedStyle(t),C=t.style,T="border-box"===w("boxSizing"),D=parseFloat(w("borderLeftWidth"))||0,k=parseFloat(w("borderRightWidth"))||0,$=parseFloat(w("borderTopWidth"))||0,O=parseFloat(w("borderBottomWidth"))||0,P=(parseFloat(w("paddingLeft"))||0)+(parseFloat(w("paddingRight"))||0),L=(parseFloat(w("paddingTop"))||0)+(parseFloat(w("paddingBottom"))||0),I=P+(D+k),A=L+($+O),E=w("position"),G=0,U=0;if("clientLeft"in t){var F=null;if("absolute"===E)F=getOffsetInfo(t,getDocumentBody(t)).offsetParent;else F=t.parentElement;if(F){var M=getCachedStyle(F);G=parseFloat(M("width")),U=parseFloat(M("height"))}}c=Math.max(P,convertUnitSize(w("minWidth"),G)||0),u=Math.max(L,convertUnitSize(w("minHeight"),U)||0),g=convertUnitSize(w("maxWidth"),G),f=convertUnitSize(w("maxHeight"),U),isNaN(g)&&(g=1/0),isNaN(f)&&(f=1/0),b=convertUnitSize(C.width,0)||0,y=convertUnitSize(C.height,0)||0,o=parseFloat(w("width"))||0,r=parseFloat(w("height"))||0,i=l=abs$1(o-b)<1?between(c,b||o,g):o,n=h=abs$1(r-y)<1?between(u,y||r,f):r,s=l,a=h,T?(m=g,v=f,d=c,p=u,l=i-I,h=n-A):(m=g+I,v=f+A,d=c+I,p=u+A,i=l+I,n=h+A),s=l+P,a=h+L}return{svg:S,offsetWidth:i,offsetHeight:n,clientWidth:s,clientHeight:a,contentWidth:l,contentHeight:h,inlineCSSWidth:b,inlineCSSHeight:y,cssWidth:o,cssHeight:r,minWidth:c,minHeight:u,maxWidth:g,maxHeight:f,minOffsetWidth:d,minOffsetHeight:p,maxOffsetWidth:m,maxOffsetHeight:v}}function getRotationRad(t,e){return getRad$1(e>0?t[0]:t[1],e>0?t[1]:t[0])}function resetClientRect(){return{left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0}}function getExtendsRect(t,e){var i=t===getDocumentBody(t)||t===getDocumentElement(t),n={clientLeft:t.clientLeft,clientTop:t.clientTop,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,overflow:!1};return i&&(n.clientHeight=Math.max(e.height,n.clientHeight),n.scrollHeight=Math.max(e.height,n.scrollHeight)),n.overflow="visible"!==getCachedStyle(t)("overflow"),__assign$2(__assign$2({},e),n)}function getClientRectByPosition(t,e,i,n){var s=t.left,a=t.right,o=t.top,r=t.bottom,l=e.top,h=e.left,c={left:h+s,top:l+o,right:h+a,bottom:l+r,width:a-s,height:r-o};return i&&n?getExtendsRect(i,c):c}function getClientRect(t,e){var i=0,n=0,s=0,a=0;if(t){var o=t.getBoundingClientRect();i=o.left,n=o.top,s=o.width,a=o.height}var r={left:i,top:n,width:s,height:a,right:i+s,bottom:n+a};return t&&e?getExtendsRect(t,r):r}function getTotalOrigin(t){var e=t.props,i=e.groupable,n=e.svgOrigin,s=t.getState(),a=s.offsetWidth,o=s.offsetHeight,r=s.svg,l=s.transformOrigin;return!i&&r&&n?convertTransformOriginArray(n,a,o):l}function getTotalDirection(t,e,i,n){var s;if(t)s=t;else if(e)s=[0,0];else{s=getDirection(i.target,n)}return s}function getDirection(t,e){if(t){var i=t.getAttribute("data-rotation")||"",n=t.getAttribute("data-direction");if(e.deg=i,n){var s=[0,0];return n.indexOf("w")>-1&&(s[0]=-1),n.indexOf("e")>-1&&(s[0]=1),n.indexOf("n")>-1&&(s[1]=-1),n.indexOf("s")>-1&&(s[1]=1),s}}}function getAbsolutePoses(t,e){return[plus(e,t[0]),plus(e,t[1]),plus(e,t[2]),plus(e,t[3])]}function getAbsolutePosesByState(t){var e=t.left,i=t.top;return getAbsolutePoses([t.pos1,t.pos2,t.pos3,t.pos4],[e,i])}function unsetAbles(t,e){t[e?"controlAbles":"targetAbles"].forEach((function(e){e.unset&&e.unset(t)}))}function unsetGesto(t,e){var i=e?"controlGesto":"targetGesto",n=t[i];!1===(null==n?void 0:n.isIdle())&&unsetAbles(t,e),null==n||n.unset(),t[i]=null}function fillCSSObject(t,e){if(e){var i=getBeforeRenderableDatas(e);i.nextStyle=__assign$2(__assign$2({},i.nextStyle),t)}return{style:t,cssText:getKeys(t).map((function(e){return"".concat(decamelize(e,"-"),": ").concat(t[e],";")})).join("")}}function fillAfterTransform(t,e,i){var n=e.afterTransform||e.transform;return __assign$2(__assign$2({},fillCSSObject(__assign$2(__assign$2(__assign$2({},t.style),e.style),{transform:n}),i)),{afterTransform:n,transform:t.transform})}function fillParams(t,e,i,n){var s=e.datas;s.datas||(s.datas={});var a=__assign$2(__assign$2({},i),{target:t.state.target,clientX:e.clientX,clientY:e.clientY,inputEvent:e.inputEvent,currentTarget:t,moveable:t,datas:s.datas,isRequest:e.isRequest,isRequestChild:e.isRequestChild,isFirstDrag:!!e.isFirstDrag,isTrusted:!1!==e.isTrusted,stopAble:function(){s.isEventStart=!1},stopDrag:function(){var t;null===(t=e.stop)||void 0===t||t.call(e)}});return s.isStartEvent?n||(s.lastEvent=a):s.isStartEvent=!0,a}function fillEndParams(t,e,i){var n=e.datas,s="isDrag"in i?i.isDrag:e.isDrag;return n.datas||(n.datas={}),__assign$2(__assign$2({isDrag:s},i),{moveable:t,target:t.state.target,clientX:e.clientX,clientY:e.clientY,inputEvent:e.inputEvent,currentTarget:t,lastEvent:n.lastEvent,isDouble:e.isDouble,datas:n.datas,isFirstDrag:!!e.isFirstDrag})}function catchEvent(t,e,i){t._emitter.on(e,i)}function triggerEvent(t,e,i,n,s){return t.triggerEvent(e,i,n,s)}function getComputedStyle$3(t,e){return getWindow(t).getComputedStyle(t,e)}function filterAbles(t,e,i){var n={},s={};return t.filter((function(t){var a=t.name;if(n[a]||!e.some((function(e){return t[e]})))return!1;if(!i&&t.ableGroup){if(s[t.ableGroup])return!1;s[t.ableGroup]=!0}return n[a]=!0,!0}))}function equals(t,e){return t===e||null==t&&null==e}function selectValue(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=t.length-1,n=0;n<i;++n){var s=t[n];if(!isUndefined(s))return s}return t[i]}function groupBy(t,e){var i=[],n=[];return t.forEach((function(s,a){var o=e(s,a,t),r=n.indexOf(o),l=i[r]||[];-1===r&&(n.push(o),i.push(l)),l.push(s)})),i}function groupByMap(t,e){var i=[],n={};return t.forEach((function(s,a){var o=e(s,a,t),r=n[o];r||(r=[],n[o]=r,i.push(r)),r.push(s)})),i}function flat(t){return t.reduce((function(t,e){return t.concat(e)}),[])}function maxOffset(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.sort((function(t,e){return abs$1(e)-abs$1(t)})),t[0]}function calculateInversePosition(t,e,i){return calculate(invert$1(t,i),convertPositionMatrix(e,i),i)}function convertDragDist(t,e){var i,n=t.is3d?4:3;return i=__read(calculateInversePosition(t.rootMatrix,[e.distX,e.distY],n),2),e.distX=i[0],e.distY=i[1],e}function calculatePadding(t,e,i,n){if(!i[0]&&!i[1])return e;var s=calculatePosition(t,[normalized(i[0]||1),0],n),a=calculatePosition(t,[0,normalized(i[1]||1)],n);return plus(e,calculatePosition(t,[i[0]/getDistSize(s),i[1]/getDistSize(a)],n))}function convertCSSSize(t,e,i){return i?"".concat(t/e*100,"%"):"".concat(t,"px")}function getTinyDist(t){return abs$1(t)<=TINY_NUM?0:t}function getDirectionViewClassName(t){return function(e){if(!e.isDragging(t))return"";var i=getGestoData(e,t).deg;return i?prefix("view-control-rotation".concat(i)):""}}function getDirectionCondition(t,e){return void 0===e&&(e=[t]),function(i,n){if(n.isRequest)return!!e.some((function(t){return n.requestAble===t}))&&n.parentDirection;var s=n.inputEvent.target;return hasClass(s,prefix("direction"))&&(!t||hasClass(s,prefix(t)))}}function convertTransformInfo(t,e,i){var n,s=parse$1(t,{"x%":function(t){return t/100*e.offsetWidth},"y%":function(t){return t/100*e.offsetHeight}}),a=t.slice(0,i<0?void 0:i),o=t.slice(0,i<0?void 0:i+1),r=t[i]||"",l=i<0?[]:t.slice(i),h=i<0?[]:t.slice(i+1),c=s.slice(0,i<0?void 0:i),u=s.slice(0,i<0?void 0:i+1),d=null!==(n=s[i])&&void 0!==n?n:parse$1([""])[0],p=i<0?[]:s.slice(i),g=i<0?[]:s.slice(i+1),f=d?[d]:[],m=toMat(c),v=toMat(u),b=toMat(p),y=toMat(g),S=multiply(m,b,4);return{transforms:t,beforeFunctionMatrix:m,beforeFunctionMatrix2:v,targetFunctionMatrix:toMat(f),afterFunctionMatrix:b,afterFunctionMatrix2:y,allFunctionMatrix:S,beforeFunctions:c,beforeFunctions2:u,targetFunction:f[0],afterFunctions:p,afterFunctions2:g,beforeFunctionTexts:a,beforeFunctionTexts2:o,targetFunctionText:r,afterFunctionTexts:l,afterFunctionTexts2:h}}function isArrayFormat(t){return!(!t||!isObject$3(t))&&(!isNode(t)&&(isArray$1(t)||"length"in t))}function getRefTarget(t,e){return t?isNode(t)?t:isString$1(t)?e?document.querySelector(t):t:isFunction$1(t)?t():isWindow(t)?t:"current"in t?t.current:t:null}function getRefTargets(t,e){return t?(isArrayFormat(t)?[].slice.call(t):[t]).reduce((function(t,i){return isString$1(i)&&e?__spreadArray$1(__spreadArray$1([],__read(t),!1),__read([].slice.call(document.querySelectorAll(i))),!1):(isArray$1(i)?t.push(getRefTargets(i,e)):t.push(getRefTarget(i,e)),t)}),[]):[]}function getAbsoluteRotation(t,e,i){var n=getRad$1(t,e)/Math.PI*180;return n=(n=i>=0?n:180-n)>=0?n:360+n}function getDragDistByState(t,e){var i=t.rootMatrix,n=t.is3d,s=invert$1(i,n?4:3);return n||(s=convertDimension(s,3,4)),s[12]=0,s[13]=0,s[14]=0,calculateMatrixDist(s,e)}function getSizeDistByDist(t,e,i,n,s){var a=__read(t,2),o=a[0],r=a[1],l=0,h=0;if(s&&o&&r){var c=getRad$1([0,0],e),u=getRad$1([0,0],n),d=getDistSize(e),p=Math.cos(c-u)*d;if(n[0])if(n[1]){var g=n[0]*o,f=n[1]*r,m=Math.atan2(g+e[0],f+e[1]),v=Math.atan2(g,f);m<0&&(m+=2*Math.PI),v<0&&(v+=2*Math.PI);var b=0;(b=abs$1(m-v)<Math.PI/2||abs$1(m-v)>Math.PI/2*3?m-v:m-(v+=Math.PI))>2*Math.PI?b-=2*Math.PI:b>Math.PI?b=2*Math.PI-b:b<-Math.PI&&(b=-2*Math.PI-b);var y=getDistSize([g+e[0],f+e[1]])*Math.cos(b);l=y*Math.sin(v)-g,h=y*Math.cos(v)-f,n[0]<0&&(l*=-1),n[1]<0&&(h*=-1)}else h=(l=p)/i;else l=(h=p)*i}else l=n[0]*e[0],h=n[1]*e[1];return[l,h]}function getOffsetSizeDist(t,e,i,n){var s,a=i.ratio,o=i.startOffsetWidth,r=i.startOffsetHeight,l=0,h=0,c=n.distX,u=n.distY,d=n.pinchScale,p=n.parentDistance,g=n.parentDist,f=n.parentScale,m=i.fixedDirection,v=[0,1].map((function(e){return abs$1(t[e]-m[e])})),b=[0,1].map((function(t){var e=v[t];return 0!==e&&(e=2/e),e}));if(g)l=g[0],h=g[1],e&&(l?h||(h=l/a):l=h*a);else if(isNumber$2(d))l=(d-1)*o,h=(d-1)*r;else if(f)l=(f[0]-1)*o,h=(f[1]-1)*r;else if(p){var y=o*v[0],S=r*v[1],x=getDistSize([y,S]);l=p/x*y*b[0],h=p/x*S*b[1]}else{var w=getDragDist({datas:i,distX:c,distY:u});l=(s=__read(getSizeDistByDist([o,r],w=b.map((function(t,e){return w[e]*t})),a,t,e),2))[0],h=s[1]}return{distWidth:l,distHeight:h}}function convertTransformUnit(t,e){if(e){if("left"===t)return{x:"0%",y:"50%"};if("top"===t)return{x:"50%",y:"50%"};if("center"===t)return{x:"50%",y:"50%"};if("right"===t)return{x:"100%",y:"50%"};if("bottom"===t)return{x:"50%",y:"100%"};var i=__read(t.split(" "),2),n=i[0],s=i[1],a=convertTransformUnit(n||""),o=convertTransformUnit(s||""),r=__assign$2(__assign$2({},a),o),l={x:"50%",y:"50%"};return r.x&&(l.x=r.x),r.y&&(l.y=r.y),r.value&&(r.x&&!r.y&&(l.y=r.value),!r.x&&r.y&&(l.x=r.value)),l}return"left"===t?{x:"0%"}:"right"===t?{x:"100%"}:"top"===t?{y:"0%"}:"bottom"===t?{y:"100%"}:t?"center"===t?{value:"50%"}:{value:t}:{}}function convertTransformOriginArray(t,e,i){var n=convertTransformUnit(t,!0),s=n.x,a=n.y;return[convertUnitSize(s,e)||0,convertUnitSize(a,i)||0]}function rotatePosesInfo(t,e,i){var n=t.map((function(t){return minus(t,e)})),s=n.map((function(t){return rotate$1(t,i)}));return{prev:n,next:s,result:s.map((function(t){return plus(t,e)}))}}function isDeepArrayEquals(t,e){return t.length===e.length&&t.every((function(t,i){var n=e[i],s=isArray$1(t),a=isArray$1(n);return s&&a?isDeepArrayEquals(t,n):!s&&!a&&t===n}))}function watchValue(t,e,i,n,s){var a=t._store,o=a[e];if(!(e in a)){if(null==s)return a[e]=i,i;a[e]=s,o=s}return o===i||n(o)===n(i)?o:(a[e]=i,i)}function sign(t){return t>=0?1:-1}function abs$1(t){return Math.abs(t)}function countEach(t,e){return counter(t).map((function(t){return e(t)}))}function getPaddingBox(t){return isNumber$2(t)?{top:t,left:t,right:t,bottom:t}:{left:t.left||0,top:t.top||0,right:t.right||0,bottom:t.bottom||0}}var Pinchable=makeAble("pinchable",{props:["pinchable"],events:["pinchStart","pinch","pinchEnd","pinchGroupStart","pinchGroup","pinchGroupEnd"],dragStart:function(){return!0},pinchStart:function(t,e){var i=e.datas,n=e.targets,s=e.angle,a=e.originalDatas,o=t.props,r=o.pinchable,l=o.ables;if(!r)return!1;var h="onPinch".concat(n?"Group":"","Start"),c="drag".concat(n?"Group":"","ControlStart"),u=(!0===r?t.controlAbles:l.filter((function(t){return r.indexOf(t.name)>-1}))).filter((function(t){return t.canPinch&&t[c]})),d=fillParams(t,e,{});n&&(d.targets=n);var p=triggerEvent(t,h,d);i.isPinch=!1!==p,i.ables=u;var g=i.isPinch;return!!g&&(u.forEach((function(i){if(a[i.name]=a[i.name]||{},i[c]){var n=__assign$2(__assign$2({},e),{datas:a[i.name],parentRotate:s,isPinch:!0});i[c](t,n)}})),t.state.snapRenderInfo={request:e.isRequest,direction:[0,0]},g)},pinch:function(t,e){var i=e.datas,n=e.scale,s=e.distance,a=e.originalDatas,o=e.inputEvent,r=e.targets,l=e.angle;if(i.isPinch){var h=s*(1-1/n),c=fillParams(t,e,{});r&&(c.targets=r);var u="onPinch".concat(r?"Group":"");triggerEvent(t,u,c);var d=i.ables,p="drag".concat(r?"Group":"","Control");return d.forEach((function(i){i[p]&&i[p](t,__assign$2(__assign$2({},e),{datas:a[i.name],inputEvent:o,resolveMatrix:!0,pinchScale:n,parentDistance:h,parentRotate:l,isPinch:!0}))})),c}},pinchEnd:function(t,e){var i=e.datas,n=e.isPinch,s=e.inputEvent,a=e.targets,o=e.originalDatas;if(i.isPinch){var r="onPinch".concat(a?"Group":"","End"),l=fillEndParams(t,e,{isDrag:n});a&&(l.targets=a),triggerEvent(t,r,l);var h=i.ables,c="drag".concat(a?"Group":"","ControlEnd");return h.forEach((function(i){i[c]&&i[c](t,__assign$2(__assign$2({},e),{isDrag:n,datas:o[i.name],inputEvent:s,isPinch:!0}))})),n}},pinchGroupStart:function(t,e){return this.pinchStart(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},pinchGroup:function(t,e){return this.pinch(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},pinchGroupEnd:function(t,e){return this.pinchEnd(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))}}),directionCondition=getDirectionCondition("scalable"),Scalable={name:"scalable",ableGroup:"size",canPinch:!0,props:["scalable","throttleScale","renderDirections","keepRatio","edge","displayAroundControls"],events:["scaleStart","beforeScale","scale","scaleEnd","scaleGroupStart","beforeScaleGroup","scaleGroup","scaleGroupEnd"],render:getRenderDirections("scalable"),dragControlCondition:directionCondition,viewClassName:getDirectionViewClassName("scalable"),dragControlStart:function(t,e){var i=e.datas,n=e.isPinch,s=e.inputEvent,a=getTotalDirection(e.parentDirection,n,s,i),o=t.state,r=o.width,l=o.height,h=o.targetTransform,c=o.target,u=o.pos1,d=o.pos2,p=o.pos4;if(!a||!c)return!1;n||setDragStart(t,e),i.datas={},i.transform=h,i.prevDist=[1,1],i.direction=a,i.startOffsetWidth=r,i.startOffsetHeight=l,i.startValue=[1,1];var g=!a[0]&&!a[1]||a[0]||!a[1];function f(t){i.ratio=t&&isFinite(t)?t:0}function m(t){var e=getFixedDirectionInfo(i.startPositions,t);i.fixedDirection=e.fixedDirection,i.fixedPosition=e.fixedPosition,i.fixedOffset=e.fixedOffset}setDefaultTransformIndex(t,e,"scale"),i.isWidth=g,i.startPositions=getAbsolutePosesByState(t.state),i.setFixedDirection=m,f(getDist$2(u,d)/getDist$2(d,p)),m([-a[0],-a[1]]);var v=function(t){i.minScaleSize=t},b=function(t){i.maxScaleSize=t};v([-1/0,-1/0]),b([1/0,1/0]);var y=fillParams(t,e,__assign$2(__assign$2({direction:a,set:function(t){i.startValue=t},setRatio:f,setFixedDirection:m,setMinScaleSize:v,setMaxScaleSize:b},fillTransformStartEvent(t,e)),{dragStart:Draggable$2.dragStart(t,(new CustomGesto).dragStart([0,0],e))})),S=triggerEvent(t,"onScaleStart",y);return i.startFixedDirection=i.fixedDirection,!1!==S&&(i.isScale=!0,t.state.snapRenderInfo={request:e.isRequest,direction:a}),!!i.isScale&&y},dragControl:function(t,e){resolveTransformEvent(t,e,"scale");var i=e.datas,n=e.parentKeepRatio,s=e.parentFlag,a=e.isPinch,o=e.dragClient,r=e.isRequest,l=e.useSnap,h=e.resolveMatrix,c=i.prevDist,u=i.direction,d=i.startOffsetWidth,p=i.startOffsetHeight,g=i.isScale,f=i.startValue,m=i.isWidth,v=i.ratio;if(!g)return!1;var b=t.props,y=b.throttleScale,S=b.parentMoveable,x=u;u[0]||u[1]||(x=[1,1]);var w=v&&(null!=n?n:b.keepRatio)||!1,C=t.state,T=[f[0],f[1]];function D(){var t=getOffsetSizeDist(x,w,i,e),n=t.distWidth,s=t.distHeight,a=d?(d+n)/d:1,o=p?(p+s)/p:1;f[0]||(T[0]=n/d),f[1]||(T[1]=s/p);var r=(x[0]||w?a:1)*T[0],l=(x[1]||w?o:1)*T[1];return 0===r&&(r=sign(c[0])*MIN_SCALE),0===l&&(l=sign(c[1])*MIN_SCALE),[r,l]}var k=D();if(!a&&t.props.groupable){var $=(C.snapRenderInfo||{}).direction;isArray$1($)&&($[0]||$[1])&&(C.snapRenderInfo={direction:u,request:e.isRequest})}triggerEvent(t,"onBeforeScale",fillParams(t,e,{scale:k,setFixedDirection:function(t){return i.setFixedDirection(t),k=D()},startFixedDirection:i.startFixedDirection,setScale:function(t){k=t}},!0));var O=[k[0]/T[0],k[1]/T[1]],P=o,L=[0,0],I=sign(O[0]*O[1]),A=!o&&!s&&a;if(A||h?P=getTranslateFixedPosition(t,i.targetAllTransform,[0,0],[0,0],i):o||(P=i.fixedPosition),a||(L=checkSnapScale(t,O,u,!l&&r,i)),w){x[0]&&x[1]&&L[0]&&L[1]&&(Math.abs(L[0]*d)>Math.abs(L[1]*p)?L[1]=0:L[0]=0);var E=!L[0]&&!L[1];if(E&&(m?O[0]=throttle$1(O[0]*T[0],y)/T[0]:O[1]=throttle$1(O[1]*T[1],y)/T[1]),x[0]&&!x[1]||L[0]&&!L[1]||E&&m){O[0]+=L[0];var G=d*O[0]*T[0]/v;O[1]=sign(I*O[0])*abs$1(G/p/T[1])}else if(!x[0]&&x[1]||!L[0]&&L[1]||E&&!m){O[1]+=L[1];var U=p*O[1]*T[1]*v;O[0]=sign(I*O[1])*abs$1(U/d/T[0])}}else O[0]+=L[0],O[1]+=L[1],L[0]||(O[0]=throttle$1(O[0]*T[0],y)/T[0]),L[1]||(O[1]=throttle$1(O[1]*T[1],y)/T[1]);0===O[0]&&(O[0]=sign(c[0])*MIN_SCALE),0===O[1]&&(O[1]=sign(c[1])*MIN_SCALE),k=multiply2(O,[T[0],T[1]]);var F=[d,p],M=[d*k[0],p*k[1]];M=calculateBoundSize(M,i.minScaleSize,i.maxScaleSize,!!w&&v),k=countEach(2,(function(t){return F[t]?M[t]/F[t]:M[t]})),O=countEach(2,(function(t){return k[t]/T[t]}));var _=countEach(2,(function(t){return c[t]?O[t]/c[t]:O[t]})),N="scale(".concat(O.join(", "),")"),R="scale(".concat(k.join(", "),")"),j=convertTransformFormat(i,R,N),B=!f[0]||!f[1],H=getScaleDist(t,B?R:N,i.fixedDirection,P,i.fixedOffset,i,B),z=A?H:minus(H,i.prevInverseDist||[0,0]);if(i.prevDist=O,i.prevInverseDist=H,k[0]===c[0]&&k[1]===c[1]&&z.every((function(t){return!t}))&&!S&&!A)return!1;var V=fillParams(t,e,__assign$2({offsetWidth:d,offsetHeight:p,direction:u,scale:k,dist:O,delta:_,isPinch:!!a},fillTransformEvent(t,j,z,a,e)));return triggerEvent(t,"onScale",V),V},dragControlEnd:function(t,e){var i=e.datas;if(!i.isScale)return!1;i.isScale=!1;var n=fillEndParams(t,e,{});return triggerEvent(t,"onScaleEnd",n),n},dragGroupControlCondition:directionCondition,dragGroupControlStart:function(t,e){var i=e.datas,n=this.dragControlStart(t,e);if(!n)return!1;var s=fillChildEvents(t,"resizable",e);i.moveableScale=t.scale;var a=triggerChildAbles(t,this,"dragControlStart",e,(function(e,n){return startChildDist(t,e,i,n)})),o=function(e){n.setFixedDirection(e),a.forEach((function(n,a){n.setFixedDirection(e),startChildDist(t,n.moveable,i,s[a])}))};i.setFixedDirection=o;var r=__assign$2(__assign$2({},n),{targets:t.props.targets,events:a,setFixedDirection:o}),l=triggerEvent(t,"onScaleGroupStart",r);return i.isScale=!1!==l,!!i.isScale&&r},dragGroupControl:function(t,e){var i=e.datas;if(i.isScale){catchEvent(t,"onBeforeScale",(function(i){triggerEvent(t,"onBeforeScaleGroup",fillParams(t,e,__assign$2(__assign$2({},i),{targets:t.props.targets}),!0))}));var n=this.dragControl(t,e);if(n){var s=n.dist,a=i.moveableScale;t.scale=[s[0]*a[0],s[1]*a[1]];var o=t.props.keepRatio,r=i.fixedPosition,l=triggerChildAbles(t,this,"dragControl",e,(function(e,i){var n=__read(calculate(createRotateMatrix(t.rotation/180*Math.PI,3),[i.datas.originalX*s[0],i.datas.originalY*s[1],1],3),2),a=n[0],l=n[1];return __assign$2(__assign$2({},i),{parentDist:null,parentScale:s,parentKeepRatio:o,dragClient:plus(r,[a,l])})})),h=__assign$2({targets:t.props.targets,events:l},n);return triggerEvent(t,"onScaleGroup",h),h}}},dragGroupControlEnd:function(t,e){var i=e.isDrag;if(e.datas.isScale){this.dragControlEnd(t,e);var n=triggerChildAbles(t,this,"dragControlEnd",e);return triggerEvent(t,"onScaleGroupEnd",fillEndParams(t,e,{targets:t.props.targets,events:n})),i}},request:function(){var t={},e=0,i=0,n=!1;return{isControl:!0,requestStart:function(e){return n=e.useSnap,{datas:t,parentDirection:e.direction||[1,1],useSnap:n}},request:function(s){return e+=s.deltaWidth,i+=s.deltaHeight,{datas:t,parentDist:[e,i],parentKeepRatio:s.keepRatio,useSnap:n}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:n}}}}};function getMiddleLinePos(t,e){return t.map((function(t,i){return dot(t,e[i],1,2)}))}function getTriangleRad(t,e,i){var n=getRad$1(t,e),s=getRad$1(t,i)-n;return s>=0?s:s+2*Math.PI}function isValidPos(t,e){var i=getTriangleRad(t[0],t[1],t[2]),n=getTriangleRad(e[0],e[1],e[2]),s=Math.PI;return!(i>=s&&n<=s||i<=s&&n>=s)}var Warpable={name:"warpable",ableGroup:"size",props:["warpable","renderDirections","edge","displayAroundControls"],events:["warpStart","warp","warpEnd"],viewClassName:getDirectionViewClassName("warpable"),render:function(t,e){var i=t.props,n=i.resizable,s=i.scalable,a=i.warpable,o=i.zoom;if(n||s||!a)return[];var r=t.state,l=r.pos1,h=r.pos2,c=r.pos3,u=r.pos4,d=getMiddleLinePos(l,h),p=getMiddleLinePos(h,l),g=getMiddleLinePos(l,c),f=getMiddleLinePos(c,l),m=getMiddleLinePos(c,u),v=getMiddleLinePos(u,c),b=getMiddleLinePos(h,u),y=getMiddleLinePos(u,h);return __spreadArray$1([e.createElement("div",{className:prefix("line"),key:"middeLine1",style:getLineStyle$1(d,m,o)}),e.createElement("div",{className:prefix("line"),key:"middeLine2",style:getLineStyle$1(p,v,o)}),e.createElement("div",{className:prefix("line"),key:"middeLine3",style:getLineStyle$1(g,b,o)}),e.createElement("div",{className:prefix("line"),key:"middeLine4",style:getLineStyle$1(f,y,o)})],__read(renderAllDirections(t,"warpable",e)),!1)},dragControlCondition:function(t,e){if(e.isRequest)return!1;var i=e.inputEvent.target;return hasClass(i,prefix("direction"))&&hasClass(i,prefix("warpable"))},dragControlStart:function(t,e){var i=e.datas,n=e.inputEvent,s=t.props.target,a=getDirection(n.target,i);if(!a||!s)return!1;var o=t.state,r=o.transformOrigin,l=o.is3d,h=o.targetTransform,c=o.targetMatrix,u=o.width,d=o.height,p=o.left,g=o.top;return i.datas={},i.targetTransform=h,i.warpTargetMatrix=l?c:convertDimension(c,3,4),i.targetInverseMatrix=ignoreDimension(invert$1(i.warpTargetMatrix,4),3,4),i.direction=a,i.left=p,i.top=g,i.poses=[[0,0],[u,0],[0,d],[u,d]].map((function(t){return minus(t,r)})),i.nextPoses=i.poses.map((function(t){var e=__read(t,2),n=e[0],s=e[1];return calculate(i.warpTargetMatrix,[n,s,0,1],4)})),i.startValue=createIdentityMatrix(4),i.prevMatrix=createIdentityMatrix(4),i.absolutePoses=getAbsolutePosesByState(o),i.posIndexes=getPosIndexesByDirection(a),setDragStart(t,e),setDefaultTransformIndex(t,e,"matrix3d"),o.snapRenderInfo={request:e.isRequest,direction:a},!1!==triggerEvent(t,"onWarpStart",fillParams(t,e,__assign$2({set:function(t){i.startValue=t}},fillTransformStartEvent(t,e))))&&(i.isWarp=!0),i.isWarp},dragControl:function(t,e){var i=e.datas,n=e.isRequest,s=e.distX,a=e.distY,o=i.targetInverseMatrix,r=i.prevMatrix,l=i.isWarp,h=i.startValue,c=i.poses,u=i.posIndexes,d=i.absolutePoses;if(!l)return!1;if(resolveTransformEvent(t,e,"matrix3d"),hasGuidelines(t,"warpable")){var p=u.map((function(t){return d[t]}));p.length>1&&p.push([(p[0][0]+p[1][0])/2,(p[0][1]+p[1][1])/2]);var g=checkMoveableSnapBounds(t,n,{horizontal:p.map((function(t){return t[1]+a})),vertical:p.map((function(t){return t[0]+s}))}),f=g.horizontal,m=g.vertical;a-=f.offset,s-=m.offset}var v=getDragDist({datas:i,distX:s,distY:a},!0),b=i.nextPoses.slice();if(u.forEach((function(t){b[t]=plus(b[t],v)})),!NEARBY_POS.every((function(t){return isValidPos(t.map((function(t){return c[t]})),t.map((function(t){return b[t]})))})))return!1;var y=createWarpMatrix(c[0],c[2],c[1],c[3],b[0],b[2],b[1],b[3]);if(!y.length)return!1;var S=getTransfromMatrix(i,multiply(o,y,4),!0),x=multiply(invert$1(r,4),S,4);i.prevMatrix=S;var w=multiply(h,S,4),C=convertTransformFormat(i,"matrix3d(".concat(w.join(", "),")"),"matrix3d(".concat(S.join(", "),")"));return fillOriginalTransform(e,C),triggerEvent(t,"onWarp",fillParams(t,e,__assign$2({delta:x,matrix:w,dist:S,multiply:multiply,transform:C},fillCSSObject({transform:C},e)))),!0},dragControlEnd:function(t,e){var i=e.datas,n=e.isDrag;return!!i.isWarp&&(i.isWarp=!1,triggerEvent(t,"onWarpEnd",fillEndParams(t,e,{})),n)}},AREA_PIECES=prefix("area-pieces"),AREA_PIECE=prefix("area-piece"),AVOID=prefix("avoid"),VIEW_DRAGGING=prefix("view-dragging");function restoreStyle(t){var e=t.areaElement;if(e){var i=t.state,n=i.width,s=i.height;removeClass(e,AVOID),e.style.cssText+="left: 0px; top: 0px; width: ".concat(n,"px; height: ").concat(s,"px")}}function renderPieces(t){return t.createElement("div",{key:"area_pieces",className:AREA_PIECES},t.createElement("div",{className:AREA_PIECE}),t.createElement("div",{className:AREA_PIECE}),t.createElement("div",{className:AREA_PIECE}),t.createElement("div",{className:AREA_PIECE}))}var DragArea={name:"dragArea",props:["dragArea","passDragArea"],events:["click","clickGroup"],render:function(t,e){var i=t.props,n=i.target,s=i.dragArea,a=i.groupable,o=i.passDragArea,r=t.getState(),l=r.width,h=r.height,c=r.renderPoses,u=o?prefix("area","pass"):prefix("area");if(a)return[e.createElement("div",{key:"area",ref:ref(t,"areaElement"),className:u}),renderPieces(e)];if(!n||!s)return[];var d=createWarpMatrix([0,0],[l,0],[0,h],[l,h],c[0],c[1],c[2],c[3]),p=d.length?makeMatrixCSS(d,!0):"none";return[e.createElement("div",{key:"area",ref:ref(t,"areaElement"),className:u,style:{top:"0px",left:"0px",width:"".concat(l,"px"),height:"".concat(h,"px"),transformOrigin:"0 0",transform:p}}),renderPieces(e)]},dragStart:function(t,e){var i=e.datas,n=e.clientX,s=e.clientY;if(!e.inputEvent)return!1;i.isDragArea=!1;var a=t.areaElement,o=t.state,r=o.moveableClientRect,l=o.renderPoses,h=o.rootMatrix,c=o.is3d,u=r.left,d=r.top,p=getRect(l),g=p.left,f=p.top,m=p.width,v=p.height,b=__read(calculateInversePosition(h,[n-u,s-d],c?4:3),2),y=b[0],S=b[1],x=[{left:g,top:f,width:m,height:(S-=f)-10},{left:g,top:f,width:(y-=g)-10,height:v},{left:g,top:f+S+10,width:m,height:v-S-10},{left:g+y+10,top:f,width:m-y-10,height:v}],w=[].slice.call(a.nextElementSibling.children);x.forEach((function(t,e){w[e].style.cssText="left: ".concat(t.left,"px;top: ").concat(t.top,"px; width: ").concat(t.width,"px; height: ").concat(t.height,"px;")})),addClass(a,AVOID),o.disableNativeEvent=!0},drag:function(t,e){var i=e.datas,n=e.inputEvent;if(this.enableNativeEvent(t),!n)return!1;i.isDragArea||(i.isDragArea=!0,restoreStyle(t))},dragEnd:function(t,e){this.enableNativeEvent(t);var i=e.inputEvent,n=e.datas;if(!i)return!1;n.isDragArea||restoreStyle(t)},dragGroupStart:function(t,e){return this.dragStart(t,e)},dragGroup:function(t,e){return this.drag(t,e)},dragGroupEnd:function(t,e){return this.dragEnd(t,e)},unset:function(t){restoreStyle(t),t.state.disableNativeEvent=!1},enableNativeEvent:function(t){var e=t.state;e.disableNativeEvent&&requestAnimationFrame$4((function(){e.disableNativeEvent=!1}))}},Origin=makeAble("origin",{props:["origin","svgOrigin"],render:function(t,e){var i,n=t.props,s=n.zoom,a=n.svgOrigin,o=n.groupable,r=t.getState(),l=r.beforeOrigin,h=r.rotation,c=r.svg,u=r.allMatrix,d=r.is3d,p=r.left,g=r.top,f=r.offsetWidth,m=r.offsetHeight;if(!o&&c&&a){var v=__read(convertTransformOriginArray(a,f,m),2);i=getControlTransform(h,s,minus(calculatePosition(u,[v[0],v[1]],d?4:3),[p,g]))}else i=getControlTransform(h,s,l);return[e.createElement("div",{className:prefix("control","origin"),style:i,key:"beforeOrigin"})]}});function getDefaultScrollPosition(t){var e=t.scrollContainer;return[e.scrollLeft,e.scrollTop]}var Scrollable={name:"scrollable",canPinch:!0,props:["scrollable","scrollContainer","scrollThreshold","scrollThrottleTime","getScrollPosition","scrollOptions"],events:["scroll","scrollGroup"],dragRelation:"strong",dragStart:function(t,e){var i=t.props,n=i.scrollContainer,s=void 0===n?t.getContainer():n,a=i.scrollOptions,o=new DragScroll$1,r=getRefTarget(s,!0);e.datas.dragScroll=o,t.state.dragScroll=o;var l=e.isControl?"controlGesto":"targetGesto",h=e.targets;o.on("scroll",(function(i){var n=i.container,s=i.direction,a=fillParams(t,e,{scrollContainer:n,direction:s}),o=h?"onScrollGroup":"onScroll";h&&(a.targets=h),triggerEvent(t,o,a)})).on("move",(function(e){var i=e.offsetX,n=e.offsetY,s=e.inputEvent;t[l].scrollBy(i,n,s.inputEvent,!1)})).on("scrollDrag",(function(e){(0,e.next)(t[l].getCurrentEvent())})),o.dragStart(e,__assign$2({container:r},a))},checkScroll:function(t,e){var i=e.datas.dragScroll;if(i){var n=t.props,s=n.scrollContainer,a=void 0===s?t.getContainer():s,o=n.scrollThreshold,r=void 0===o?0:o,l=n.scrollThrottleTime,h=void 0===l?0:l,c=n.getScrollPosition,u=void 0===c?getDefaultScrollPosition:c,d=n.scrollOptions;return i.drag(e,__assign$2({container:a,threshold:r,throttleTime:h,getScrollPosition:function(t){return u({scrollContainer:t.container,direction:t.direction})}},d)),!0}},drag:function(t,e){return this.checkScroll(t,e)},dragEnd:function(t,e){e.datas.dragScroll.dragEnd(),e.datas.dragScroll=null},dragControlStart:function(t,e){return this.dragStart(t,__assign$2(__assign$2({},e),{isControl:!0}))},dragControl:function(t,e){return this.drag(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupStart:function(t,e){return this.dragStart(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},dragGroup:function(t,e){return this.drag(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},dragGroupEnd:function(t,e){return this.dragEnd(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},dragGroupControlStart:function(t,e){return this.dragStart(t,__assign$2(__assign$2({},e),{targets:t.props.targets,isControl:!0}))},dragGroupControl:function(t,e){return this.drag(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},dragGroupControEnd:function(t,e){return this.dragEnd(t,__assign$2(__assign$2({},e),{targets:t.props.targets}))},unset:function(t){var e,i=t.state;null===(e=i.dragScroll)||void 0===e||e.dragEnd(),i.dragScroll=null}},Default={name:"",props:["target","dragTargetSelf","dragTarget","dragContainer","container","warpSelf","rootContainer","useResizeObserver","useMutationObserver","zoom","dragFocusedInput","transformOrigin","ables","className","pinchThreshold","pinchOutside","triggerAblesSimultaneously","checkInput","cspNonce","translateZ","hideDefaultLines","props","flushSync","stopPropagation","preventClickEventOnDrag","preventClickDefault","viewContainer","persistData","useAccuratePosition","firstRenderState","linePadding","controlPadding","preventDefault","preventRightClick","preventWheelClick","requestStyles"],events:["changeTargets"]},Padding=makeAble("padding",{props:["padding"],render:function(t,e){var i=t.props;if(i.dragArea)return[];var n=getPaddingBox(i.padding||{}),s=n.left,a=n.top,o=n.right,r=n.bottom,l=t.getState(),h=l.renderPoses,c=[l.pos1,l.pos2,l.pos3,l.pos4],u=[];return s>0&&u.push([0,2]),a>0&&u.push([0,1]),o>0&&u.push([1,3]),r>0&&u.push([2,3]),u.map((function(t,i){var n=__read(t,2),s=n[0],a=n[1],o=createWarpMatrix([0,0],[100,0],[0,100],[100,100],c[s],c[a],h[s],h[a]);if(o.length)return e.createElement("div",{key:"padding".concat(i),className:prefix("padding"),style:{transform:makeMatrixCSS(o,!0)}})}))}}),RADIUS_DIRECTIONS=["nw","ne","se","sw"];function calculateRatio(t,e){var i=t[0]+t[1],n=i>e?e/i:1;return t[0]*=n,t[1]=e-t[1]*n,t}var HORIZONTAL_RADIUS_ORDER=[1,2,5,6],VERTICAL_RADIUS_ORDER=[0,3,4,7],HORIZONTAL_RADIUS_DIRECTIONS=[1,-1,-1,1],VERTICAL_RADIUS_DIRECTIONS=[1,1,-1,-1];function getRadiusStyles(t,e,i,n,s,a,o,r){void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o=i),void 0===r&&(r=n);var l=[],h=!1,c=t.filter((function(t){return!t.virtual})),u=c.map((function(t){var c=t.horizontal,u=t.vertical,d=t.pos;if(u&&!h&&(h=!0,l.push("/")),h){var p=Math.max(0,1===u?d[1]-a:r-d[1]);return l.push(convertCSSSize(p,n,e)),p}p=Math.max(0,1===c?d[0]-s:o-d[0]);return l.push(convertCSSSize(p,i,e)),p}));return{radiusPoses:c,styles:l,raws:u}}function getRadiusRange(t){for(var e=[0,0],i=[0,0],n=t.length,s=0;s<n;++s){var a=t[s];a.sub&&(a.horizontal&&(0===e[1]&&(e[0]=s),e[1]=s-e[0]+1,i[0]=s+1),a.vertical&&(0===i[1]&&(i[0]=s),i[1]=s-i[0]+1))}return{horizontalRange:e,verticalRange:i}}function getRadiusValues(t,e,i,n,s,a,o){var r,l,h,c;void 0===a&&(a=[0,0]),void 0===o&&(o=!1);var u=t.indexOf("/"),d=(u>-1?t.slice(0,u):t).length,p=t.slice(0,d),g=t.slice(d+1),f=p.length,m=g.length,v=m>0,b=__read(p,4),y=b[0],S=void 0===y?"0px":y,x=b[1],w=void 0===x?S:x,C=b[2],T=void 0===C?S:C,D=b[3],k=void 0===D?w:D,$=__read(g,4),O=$[0],P=void 0===O?S:O,L=$[1],I=void 0===L?v?P:w:L,A=$[2],E=void 0===A?v?P:T:A,G=$[3],U=void 0===G?v?I:k:G,F=[S,w,T,k].map((function(t){return convertUnitSize(t,e)})),M=[P,I,E,U].map((function(t){return convertUnitSize(t,i)})),_=F.slice(),N=M.slice();r=__read(calculateRatio([_[0],_[1]],e),2),_[0]=r[0],_[1]=r[1],l=__read(calculateRatio([_[3],_[2]],e),2),_[3]=l[0],_[2]=l[1],h=__read(calculateRatio([N[0],N[3]],i),2),N[0]=h[0],N[3]=h[1],c=__read(calculateRatio([N[1],N[2]],i),2),N[1]=c[0],N[2]=c[1];var R=o?_:_.slice(0,Math.max(a[0],f)),j=o?N:N.slice(0,Math.max(a[1],m));return __spreadArray$1(__spreadArray$1([],__read(R.map((function(t,e){var a=RADIUS_DIRECTIONS[e];return{virtual:e>=f,horizontal:HORIZONTAL_RADIUS_DIRECTIONS[e],vertical:0,pos:[n+t,s+(-1===VERTICAL_RADIUS_DIRECTIONS[e]?i:0)],sub:!0,raw:F[e],direction:a}}))),!1),__read(j.map((function(t,i){var a=RADIUS_DIRECTIONS[i];return{virtual:i>=m,horizontal:0,vertical:VERTICAL_RADIUS_DIRECTIONS[i],pos:[n+(-1===HORIZONTAL_RADIUS_DIRECTIONS[i]?e:0),s+t],sub:!0,raw:M[i],direction:a}}))),!1)}function removeRadiusPos(t,e,i,n,s){void 0===s&&(s=e.length);var a=getRadiusRange(t.slice(n)),o=a.horizontalRange,r=a.verticalRange,l=i-n,h=0;if(0===l)h=s;else if(l>0&&l<o[1])h=o[1]-l;else{if(!(l>=r[0]))return;h=r[0]+r[1]-l}t.splice(i,h),e.splice(i,h)}function addRadiusPos(t,e,i,n,s,a,o,r,l,h,c){void 0===h&&(h=0),void 0===c&&(c=0);var u=getRadiusRange(t.slice(i)),d=u.horizontalRange,p=u.verticalRange;if(n>-1)for(var g=1===HORIZONTAL_RADIUS_DIRECTIONS[n]?a-h:r-a,f=d[1];f<=n;++f){var m=1===VERTICAL_RADIUS_DIRECTIONS[f]?c:l,v=0;if(n===f?v=a:0===f?v=h+g:-1===HORIZONTAL_RADIUS_DIRECTIONS[f]&&(v=r-(e[i][0]-h)),t.splice(i+f,0,{horizontal:HORIZONTAL_RADIUS_DIRECTIONS[f],vertical:0,pos:[v,m]}),e.splice(i+f,0,[v,m]),0===f)break}else if(s>-1){var b=1===VERTICAL_RADIUS_DIRECTIONS[s]?o-c:l-o;if(0===d[1]&&0===p[1]){var y=[h+b,c];t.push({horizontal:HORIZONTAL_RADIUS_DIRECTIONS[0],vertical:0,pos:y}),e.push(y)}var S=p[0];for(f=p[1];f<=s;++f){v=1===HORIZONTAL_RADIUS_DIRECTIONS[f]?h:r,m=0;if(s===f?m=o:0===f?m=c+b:1===VERTICAL_RADIUS_DIRECTIONS[f]?m=e[i+S][1]:-1===VERTICAL_RADIUS_DIRECTIONS[f]&&(m=l-(e[i+S][1]-c)),t.push({horizontal:0,vertical:VERTICAL_RADIUS_DIRECTIONS[f],pos:[v,m]}),e.push([v,m]),0===f)break}}}function splitRadiusPoses(t,e){return void 0===e&&(e=t.map((function(t){return t.raw}))),{horizontals:t.map((function(t,i){return t.horizontal?e[i]:null})).filter((function(t){return null!=t})),verticals:t.map((function(t,i){return t.vertical?e[i]:null})).filter((function(t){return null!=t}))}}var CLIP_DIRECTIONS=[[0,-1,"n"],[1,0,"e"]],CLIP_RECT_DIRECTIONS=[[-1,-1,"nw"],[0,-1,"n"],[1,-1,"ne"],[1,0,"e"],[1,1,"se"],[0,1,"s"],[-1,1,"sw"],[-1,0,"w"]];function getClipStyles(t,e,i){var n=t.props.clipRelative,s=t.state,a=s.width,o=s.height,r=e,l=r.type,h=r.poses,c="rect"===l,u="circle"===l;if("polygon"===l)return i.map((function(t){return"".concat(convertCSSSize(t[0],a,n)," ").concat(convertCSSSize(t[1],o,n))}));if(c||"inset"===l){var d=i[1][1],p=i[3][0],g=i[7][0],f=i[5][1];if(c)return[d,p,f,g].map((function(t){return"".concat(t,"px")}));var m=[d,a-p,o-f,g].map((function(t,e){return convertCSSSize(t,e%2?a:o,n)}));if(i.length>8){var v=__read(minus(i[4],i[0]),2),b=v[0],y=v[1];m.push.apply(m,__spreadArray$1(["round"],__read(getRadiusStyles(h.slice(8).map((function(t,e){return __assign$2(__assign$2({},t),{pos:i[e]})})),n,b,y,g,d,p,f).styles),!1))}return m}if(u||"ellipse"===l){var S=i[0],x=convertCSSSize(abs$1(i[1][1]-S[1]),u?Math.sqrt((a*a+o*o)/2):o,n);return(m=u?[x]:[convertCSSSize(abs$1(i[2][0]-S[0]),a,n),x]).push("at",convertCSSSize(S[0],a,n),convertCSSSize(S[1],o,n)),m}}function getRectPoses(t,e,i,n){var s=[n,(n+e)/2,e],a=[t,(t+i)/2,i];return CLIP_RECT_DIRECTIONS.map((function(t){var e=__read(t,3),i=e[0],n=e[1],o=e[2],r=s[i+1],l=a[n+1];return{vertical:abs$1(n),horizontal:abs$1(i),direction:o,pos:[r,l]}}))}function getControlSize(t){var e=[1/0,-1/0],i=[1/0,-1/0];return t.forEach((function(t){var n=t.pos;e[0]=Math.min(e[0],n[0]),e[1]=Math.max(e[1],n[0]),i[0]=Math.min(i[0],n[1]),i[1]=Math.max(i[1],n[1])})),[abs$1(e[1]-e[0]),abs$1(i[1]-i[0])]}function getClipPath(t,e,i,n,s){var a,o,r,l,h,c,u,d,p;if(t){var g=s;if(!g){var f=getCachedStyle(t),m=f("clipPath");g="none"!==m?m:f("clip")}if(g&&"none"!==g&&"auto"!==g||(g=n)){var v=splitBracket(g),b=v.prefix,y=void 0===b?g:b,S=v.value,x=void 0===S?"":S,w="circle"===y,C=" ";if("polygon"===y){C=",";var T=getMinMaxs((G=(P=splitComma(x||"0% 0%, 100% 0%, 100% 100%, 0% 100%")).map((function(t){var n=__read(t.split(" "),2),s=n[0],a=n[1];return{vertical:1,horizontal:1,pos:[convertUnitSize(s,e),convertUnitSize(a,i)]}}))).map((function(t){return t.pos})));return{type:y,clipText:g,poses:G,splitter:C,left:T.minX,right:T.maxX,top:T.minY,bottom:T.maxY}}if(w||"ellipse"===y){var D="",k="",$=0,O=0,P=splitSpace(x);if(w){var L;L=void 0===(o=(a=__read(P,4))[0])?"50%":o,D=void 0===(r=a[2])?"50%":r,k=void 0===(l=a[3])?"50%":l,$=convertUnitSize(L,Math.sqrt((e*e+i*i)/2)),O=$}else{var I,A;I=void 0===(c=(h=__read(P,5))[0])?"50%":c,A=void 0===(u=h[1])?"50%":u,D=void 0===(d=h[3])?"50%":d,k=void 0===(p=h[4])?"50%":p,$=convertUnitSize(I,e),O=convertUnitSize(A,i)}var E=[convertUnitSize(D,e),convertUnitSize(k,i)],G=__spreadArray$1([{vertical:1,horizontal:1,pos:E,direction:"nesw"}],__read(CLIP_DIRECTIONS.slice(0,w?1:2).map((function(t){return{vertical:abs$1(t[1]),horizontal:t[0],direction:t[2],sub:!0,pos:[E[0]+t[0]*$,E[1]+t[1]*O]}}))),!1);return{type:y,clipText:g,radiusX:$,radiusY:O,left:E[0]-$,top:E[1]-O,right:E[0]+$,bottom:E[1]+O,poses:G,splitter:C}}if("inset"===y){var U=(P=splitSpace(x||"0 0 0 0")).indexOf("round"),F=(U>-1?P.slice(0,U):P).length,M=P.slice(F+1),_=__read(P.slice(0,F),4),N=_[0],R=_[1],j=void 0===R?N:R,B=_[2],H=void 0===B?N:B,z=_[3],V=void 0===z?j:z,q=__read([N,H].map((function(t){return convertUnitSize(t,i)})),2),W=q[0],Y=q[1],K=__read([V,j].map((function(t){return convertUnitSize(t,e)})),2),X=K[0],J=K[1],Z=e-J,Q=i-Y,tt=getRadiusValues(M,Z-X,Q-W,X,W);return{type:"inset",clipText:g,poses:G=__spreadArray$1(__spreadArray$1([],__read(getRectPoses(W,Z,Q,X)),!1),__read(tt),!1),top:W,left:X,right:Z,bottom:Q,radius:M,splitter:C}}if("rect"===y){C=",";var et=__read((P=splitComma(x||"0px, ".concat(e,"px, ").concat(i,"px, 0px"))).map((function(t){return splitUnit(t).value})),4),it=et[0];return{type:"rect",clipText:g,poses:G=getRectPoses(it,J=et[1],Y=et[2],X=et[3]),top:it,right:J,bottom:Y,left:X,values:P,splitter:C}}}}}function moveControlPos(t,e,i,n,s){var a=t[e],o=a.direction,r=a.sub,l=t.map((function(){return[0,0]})),h=o?o.split(""):[];if(n&&e<8){var c=h.filter((function(t){return"w"===t||"e"===t})),u=h.filter((function(t){return"n"===t||"s"===t})),d=c[0],p=u[0];l[e]=i;var g=__read(getControlSize(t),2),f=g[0],m=g[1],v=f&&m?f/m:0;if(v&&s){var b=t[(e+4)%8].pos,y=[0,0];o.indexOf("w")>-1?y[0]=-1:o.indexOf("e")>-1&&(y[0]=1),o.indexOf("n")>-1?y[1]=-1:o.indexOf("s")>-1&&(y[1]=1);var S=getSizeDistByDist([f,m],i,v,y,!0),x=f+S[0],w=m+S[1],C=b[1],T=b[1],D=b[0],k=b[0];-1===y[0]?D=k-x:1===y[0]?k=D+x:(D-=x/2,k+=x/2),-1===y[1]?C=T-w:T=1===y[1]?C+w:(C=T-w/2)+w;var $=getRectPoses(C,k,T,D);t.forEach((function(t,e){l[e][0]=$[e].pos[0]-t.pos[0],l[e][1]=$[e].pos[1]-t.pos[1]}))}else t.forEach((function(t,e){var n=t.direction;n&&(n.indexOf(d)>-1&&(l[e][0]=i[0]),n.indexOf(p)>-1&&(l[e][1]=i[1]))})),d&&(l[1][0]=i[0]/2,l[5][0]=i[0]/2),p&&(l[3][1]=i[1]/2,l[7][1]=i[1]/2)}else o&&!r?h.forEach((function(e){var n="n"===e||"s"===e;t.forEach((function(t,s){var a=t.direction,o=t.horizontal,r=t.vertical;a&&-1!==a.indexOf(e)&&(l[s]=[n||!o?0:i[0],n&&r?i[1]:0])}))})):l[e]=i;return l}function addClipPath(t,e){var i=__read(calculatePointerDist(t,e),2),n=i[0],s=i[1],a=e.datas,o=a.clipPath,r=a.clipIndex,l=o,h=l.type,c=l.poses,u=l.splitter,d=c.map((function(t){return t.pos}));if("polygon"===h)d.splice(r,0,[n,s]);else{if("inset"!==h)return;var p=HORIZONTAL_RADIUS_ORDER.indexOf(r),g=VERTICAL_RADIUS_ORDER.indexOf(r),f=c.length;if(addRadiusPos(c,d,8,p,g,n,s,d[4][0],d[4][1],d[0][0],d[0][1]),f===c.length)return}var m=getClipStyles(t,o,d),v="".concat(h,"(").concat(m.join(u),")");triggerEvent(t,"onClip",fillParams(t,e,__assign$2({clipEventType:"added",clipType:h,poses:d,clipStyles:m,clipStyle:v,distX:0,distY:0},fillCSSObject({clipPath:v},e))))}function removeClipPath(t,e){var i=e.datas,n=i.clipPath,s=i.clipIndex,a=n,o=a.type,r=a.poses,l=a.splitter,h=r.map((function(t){return t.pos})),c=h.length;if("polygon"===o)r.splice(s,1),h.splice(s,1);else{if("inset"!==o)return;if(s<8)return;if(removeRadiusPos(r,h,s,8,c),c===r.length)return}var u=getClipStyles(t,n,h),d="".concat(o,"(").concat(u.join(l),")");triggerEvent(t,"onClip",fillParams(t,e,__assign$2({clipEventType:"removed",clipType:o,poses:h,clipStyles:u,clipStyle:d,distX:0,distY:0},fillCSSObject({clipPath:d},e))))}var Clippable={name:"clippable",props:["clippable","defaultClipPath","customClipPath","keepRatio","clipRelative","clipArea","dragWithClip","clipTargetBounds","clipVerticalGuidelines","clipHorizontalGuidelines","clipSnapThreshold"],events:["clipStart","clip","clipEnd"],css:[".control.clip-control {\nbackground: #6d6;\ncursor: pointer;\n}\n.control.clip-control.clip-radius {\nbackground: #d66;\n}\n.line.clip-line {\nbackground: #6e6;\ncursor: move;\nz-index: 1;\n}\n.clip-area {\nposition: absolute;\ntop: 0;\nleft: 0;\n}\n.clip-ellipse {\nposition: absolute;\ncursor: move;\nborder: 1px solid #6d6;\nborder: var(--zoompx) solid #6d6;\nborder-radius: 50%;\ntransform-origin: 0px 0px;\n}",":host {\n--bounds-color: #d66;\n}",".guideline {\npointer-events: none;\nz-index: 2;\n}",".line.guideline.bounds {\nbackground: #d66;\nbackground: var(--bounds-color);\n}"],render:function(t,e){var i=t.props,n=i.customClipPath,s=i.defaultClipPath,a=i.clipArea,o=i.zoom,r=i.groupable,l=t.getState(),h=l.target,c=l.width,u=l.height,d=l.allMatrix,p=l.is3d,g=l.left,f=l.top,m=l.pos1,v=l.pos2,b=l.pos3,y=l.pos4,S=l.clipPathState,x=l.snapBoundInfos,w=l.rotation;if(!h||r)return[];var C=getClipPath(h,c,u,s||"inset",S||n);if(!C)return[];var T=p?4:3,D=C.type,k=C.poses.map((function(t){var e=calculatePosition(d,t.pos,T);return[e[0]-g,e[1]-f]})),$=[],O=[],P="rect"===D,L="inset"===D,I="polygon"===D;if(P||L||I){var A=L?k.slice(0,8):k;O=A.map((function(t,i){var n=0===i?A[A.length-1]:A[i-1],s=getRad$1(n,t),a=getDiagonalSize(n,t);return e.createElement("div",{key:"clipLine".concat(i),className:prefix("line","clip-line","snap-control"),"data-clip-index":i,style:{width:"".concat(a,"px"),transform:"translate(".concat(n[0],"px, ").concat(n[1],"px) rotate(").concat(s,"rad) scaleY(").concat(o,")")}})}))}if($=k.map((function(t,i){return e.createElement("div",{key:"clipControl".concat(i),className:prefix("control","clip-control","snap-control"),"data-clip-index":i,style:{transform:"translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(w,"rad) scale(").concat(o,")")}})})),L&&$.push.apply($,__spreadArray$1([],__read(k.slice(8).map((function(t,i){return e.createElement("div",{key:"clipRadiusControl".concat(i),className:prefix("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+i,style:{transform:"translate(".concat(t[0],"px, ").concat(t[1],"px) rotate(").concat(w,"rad) scale(").concat(o,")")}})}))),!1)),"circle"===D||"ellipse"===D){var E=C.left,G=C.top,U=C.radiusX,F=C.radiusY,M=__read(minus(calculatePosition(d,[E,G],T),calculatePosition(d,[0,0],T)),2),_=M[0],N=M[1],R="none";if(!a){for(var j=Math.max(10,U/5,F/5),B=[],H=0;H<=j;++H){var z=2*Math.PI/j*H;B.push([U+(U-o)*Math.cos(z),F+(F-o)*Math.sin(z)])}B.push([U,-2]),B.push([-2,-2]),B.push([-2,2*F+2]),B.push([2*U+2,2*F+2]),B.push([2*U+2,-2]),B.push([U,-2]),R="polygon(".concat(B.map((function(t){return"".concat(t[0],"px ").concat(t[1],"px")})).join(", "),")")}$.push(e.createElement("div",{key:"clipEllipse",className:prefix("clip-ellipse","snap-control"),style:{width:"".concat(2*U,"px"),height:"".concat(2*F,"px"),clipPath:R,transform:"translate(".concat(-g+_,"px, ").concat(-f+N,"px) ").concat(makeMatrixCSS(d))}}))}if(a){var V=getRect(__spreadArray$1([m,v,b,y],__read(k),!1)),q=V.width,W=V.height,Y=V.left,K=V.top;if(I||P||L){B=L?k.slice(0,8):k;$.push(e.createElement("div",{key:"clipArea",className:prefix("clip-area","snap-control"),style:{width:"".concat(q,"px"),height:"".concat(W,"px"),transform:"translate(".concat(Y,"px, ").concat(K,"px)"),clipPath:"polygon(".concat(B.map((function(t){return"".concat(t[0]-Y,"px ").concat(t[1]-K,"px")})).join(", "),")")}}))}}return x&&["vertical","horizontal"].forEach((function(t){var i=x[t],n="horizontal"===t;i.isSnap&&O.push.apply(O,__spreadArray$1([],__read(i.snap.posInfos.map((function(i,s){var a=i.pos,r=minus(calculatePosition(d,n?[0,a]:[a,0],T),[g,f]),l=minus(calculatePosition(d,n?[c,a]:[a,u],T),[g,f]);return renderLine(e,"",r,l,o,"clip".concat(t,"snap").concat(s),"guideline")}))),!1)),i.isBound&&O.push.apply(O,__spreadArray$1([],__read(i.bounds.map((function(i,s){var a=i.pos,r=minus(calculatePosition(d,n?[0,a]:[a,0],T),[g,f]),l=minus(calculatePosition(d,n?[c,a]:[a,u],T),[g,f]);return renderLine(e,"",r,l,o,"clip".concat(t,"bounds").concat(s),"guideline","bounds","bold")}))),!1))})),__spreadArray$1(__spreadArray$1([],__read($),!1),__read(O),!1)},dragControlCondition:function(t,e){return e.inputEvent&&(e.inputEvent.target.getAttribute("class")||"").indexOf("clip")>-1},dragStart:function(t,e){var i=t.props.dragWithClip;return!(void 0===i||i)&&this.dragControlStart(t,e)},drag:function(t,e){return this.dragControl(t,__assign$2(__assign$2({},e),{isDragTarget:!0}))},dragEnd:function(t,e){return this.dragControlEnd(t,e)},dragControlStart:function(t,e){var i=t.state,n=t.props,s=n.defaultClipPath,a=n.customClipPath,o=i.target,r=i.width,l=i.height,h=e.inputEvent?e.inputEvent.target:null,c=h&&h.getAttribute("class")||"",u=e.datas,d=getClipPath(o,r,l,s||"inset",a);if(!d)return!1;var p=d.clipText;return!1===triggerEvent(t,"onClipStart",fillParams(t,e,{clipType:d.type,clipStyle:p,poses:d.poses.map((function(t){return t.pos}))}))?(u.isClipStart=!1,!1):(u.isControl=c&&c.indexOf("clip-control")>-1,u.isLine=c.indexOf("clip-line")>-1,u.isArea=c.indexOf("clip-area")>-1||c.indexOf("clip-ellipse")>-1,u.clipIndex=h?parseInt(h.getAttribute("data-clip-index"),10):-1,u.clipPath=d,u.isClipStart=!0,i.clipPathState=p,setDragStart(t,e),!0)},dragControl:function(t,e){var i,n,s,a=e.datas,o=e.originalDatas,r=e.isDragTarget;if(!a.isClipStart)return!1;var l=a,h=l.isControl,c=l.isLine,u=l.isArea,d=l.clipIndex,p=l.clipPath;if(!p)return!1;var g=getProps(t.props,"clippable"),f=g.keepRatio,m=0,v=0,b=o.draggable,y=getDragDist(e);r&&b?(i=__read(b.prevBeforeDist,2),m=i[0],v=i[1]):(n=__read(y,2),m=n[0],v=n[1]);var S=[m,v],x=t.state,w=x.width,C=x.height,T=!u&&!h&&!c,D=p.type,k=p.poses,$=p.splitter,O=k.map((function(t){return t.pos}));T&&(m=-m,v=-v);var P=!h||"nesw"===k[d].direction,L="inset"===D||"rect"===D,I=k.map((function(){return[0,0]}));if(h&&!P){var A=k[d],E=A.horizontal,G=A.vertical,U=[m*abs$1(E),v*abs$1(G)];I=moveControlPos(k,d,U,L,f)}else P&&(I=O.map((function(){return[m,v]})));var F=O.map((function(t,e){return plus(t,I[e])})),M=__spreadArray$1([],__read(F),!1);x.snapBoundInfos=null;var _="circle"===p.type,N="ellipse"===p.type;if(_||N){var R=abs$1((it=getRect(F)).bottom-it.top),j=abs$1(N?it.right-it.left:R),B=F[0][1]+R,H=F[0][0]-j,z=F[0][0]+j;_&&(M.push([z,it.bottom]),I.push([1,0])),M.push([it.left,B]),I.push([0,1]),M.push([H,it.bottom]),I.push([1,0])}var V=getDefaultGuidelines((g.clipHorizontalGuidelines||[]).map((function(t){return convertUnitSize("".concat(t),C)})),(g.clipVerticalGuidelines||[]).map((function(t){return convertUnitSize("".concat(t),w)})),w,C),q=[],W=[];if(_||N)q=[M[4][0],M[2][0]],W=[M[1][1],M[3][1]];else if(L){var Y=[M[0],M[2],M[4],M[6]],K=[I[0],I[2],I[4],I[6]];q=Y.filter((function(t,e){return K[e][0]})).map((function(t){return t[0]})),W=Y.filter((function(t,e){return K[e][1]})).map((function(t){return t[1]}))}else q=M.filter((function(t,e){return I[e][0]})).map((function(t){return t[0]})),W=M.filter((function(t,e){return I[e][1]})).map((function(t){return t[1]}));var X=[0,0],J=checkSnapBounds(V,g.clipTargetBounds&&{left:0,top:0,right:w,bottom:C},q,W,5,5),Z=J.horizontal,Q=J.vertical,tt=Z.offset,et=Q.offset;if(Z.isBound&&(X[1]+=tt),Q.isBound&&(X[0]+=et),(N||_)&&0===I[0][0]&&0===I[0][1]){var it,nt=(it=getRect(F)).bottom-it.top,st=N?it.right-it.left:nt;st-=Q.isBound?abs$1(et):0===Q.snapIndex?-et:et,nt-=Z.isBound?abs$1(tt):0===Z.snapIndex?-tt:tt,_&&(st=nt=checkSnapBoundPriority(Q,Z)>0?nt:st);var at=M[0];M[1][1]=at[1]-nt,M[2][0]=at[0]+st,M[3][1]=at[1]+nt,M[4][0]=at[0]-st}else if(L&&f&&h){var ot=__read(getControlSize(k),2),rt=ot[0],lt=ot[1],ht=rt&&lt?rt/lt:0,ct=k[d].direction||"",ut=M[1][1];B=M[5][1],H=M[7][0],z=M[3][0];abs$1(tt)<=abs$1(et)?tt=sign(tt)*abs$1(et)/ht:et=sign(et)*abs$1(tt)*ht,ct.indexOf("w")>-1?H-=et:ct.indexOf("e")>-1?z-=et:(H+=et/2,z-=et/2),ct.indexOf("n")>-1?ut-=tt:ct.indexOf("s")>-1?B-=tt:(ut+=tt/2,B-=tt/2);var dt=getRectPoses(ut,z,B,H);M.forEach((function(t,e){var i;i=__read(dt[e].pos,2),t[0]=i[0],t[1]=i[1]}))}else M.forEach((function(t,e){var i=I[e];i[0]&&(t[0]-=et),i[1]&&(t[1]-=tt)}));var pt=getClipStyles(t,p,F),gt="".concat(D,"(").concat(pt.join($),")");if(x.clipPathState=gt,_||N)q=[M[4][0],M[2][0]],W=[M[1][1],M[3][1]];else if(L){q=(Y=[M[0],M[2],M[4],M[6]]).map((function(t){return t[0]})),W=Y.map((function(t){return t[1]}))}else q=M.map((function(t){return t[0]})),W=M.map((function(t){return t[1]}));if(x.snapBoundInfos=checkSnapBounds(V,g.clipTargetBounds&&{left:0,top:0,right:w,bottom:C},q,W,1,1),b){var ft=x.is3d,mt=x.allMatrix,vt=ft?4:3,bt=X;r&&(bt=[S[0]+X[0]-y[0],S[1]+X[1]-y[1]]),b.deltaOffset=multiply(mt,[bt[0],bt[1],0,0],vt)}return triggerEvent(t,"onClip",fillParams(t,e,__assign$2({clipEventType:"changed",clipType:D,poses:F,clipStyle:gt,clipStyles:pt,distX:m,distY:v},fillCSSObject(((s={})["rect"===D?"clip":"clipPath"]=gt,s),e)))),!0},dragControlEnd:function(t,e){this.unset(t);var i=e.isDrag,n=e.datas,s=e.isDouble,a=n.isLine,o=n.isClipStart,r=n.isControl;return!!o&&(triggerEvent(t,"onClipEnd",fillEndParams(t,e,{})),s&&(r?removeClipPath(t,e):a&&addClipPath(t,e)),s||i)},unset:function(t){t.state.clipPathState="",t.state.snapBoundInfos=null}},OriginDraggable={name:"originDraggable",props:["originDraggable","originRelative"],events:["dragOriginStart","dragOrigin","dragOriginEnd"],css:[":host[data-able-origindraggable] .control.origin {\npointer-events: auto;\n}"],dragControlCondition:function(t,e){return e.isRequest?"originDraggable"===e.requestAble:hasClass(e.inputEvent.target,prefix("origin"))},dragControlStart:function(t,e){var i=e.datas;setDragStart(t,e);var n=fillParams(t,e,{dragStart:Draggable$2.dragStart(t,(new CustomGesto).dragStart([0,0],e))}),s=triggerEvent(t,"onDragOriginStart",n);return i.startOrigin=t.state.transformOrigin,i.startTargetOrigin=t.state.targetOrigin,i.prevOrigin=[0,0],i.isDragOrigin=!0,!1===s?(i.isDragOrigin=!1,!1):n},dragControl:function(t,e){var i=e.datas,n=e.isPinch,s=e.isRequest;if(!i.isDragOrigin)return!1;var a=__read(getDragDist(e),2),o=a[0],r=a[1],l=t.state,h=l.width,c=l.height,u=l.offsetMatrix,d=l.targetMatrix,p=l.is3d,g=t.props.originRelative,f=void 0===g||g,m=p?4:3,v=[o,r];if(s){var b=e.distOrigin;(b[0]||b[1])&&(v=b)}var y=plus(i.startOrigin,v),S=plus(i.startTargetOrigin,v),x=minus(v,i.prevOrigin),w=getNextMatrix(u,d,y,m),C=t.getRect(),T=getRect(calculatePoses(w,h,c,m)),D=[C.left-T.left,C.top-T.top];i.prevOrigin=v;var k=[convertCSSSize(S[0],h,f),convertCSSSize(S[1],c,f)].join(" "),$=Draggable$2.drag(t,setCustomDrag(e,t.state,D,!!n,!1)),O=fillParams(t,e,__assign$2(__assign$2({width:h,height:c,origin:y,dist:v,delta:x,transformOrigin:k,drag:$},fillCSSObject({transformOrigin:k,transform:$.transform},e)),{afterTransform:$.transform}));return triggerEvent(t,"onDragOrigin",O),O},dragControlEnd:function(t,e){return!!e.datas.isDragOrigin&&(triggerEvent(t,"onDragOriginEnd",fillEndParams(t,e,{})),!0)},dragGroupControlCondition:function(t,e){return this.dragControlCondition(t,e)},dragGroupControlStart:function(t,e){return!!this.dragControlStart(t,e)},dragGroupControl:function(t,e){var i=this.dragControl(t,e);return!!i&&(t.transformOrigin=i.transformOrigin,!0)},request:function(t){var e={},i=t.getRect(),n=0,s=0,a=i.transformOrigin,o=[0,0];return{isControl:!0,requestStart:function(){return{datas:e}},request:function(t){return"deltaOrigin"in t?(o[0]+=t.deltaOrigin[0],o[1]+=t.deltaOrigin[1]):"origin"in t?(o[0]=t.origin[0]-a[0],o[1]=t.origin[1]-a[1]):("x"in t?n=t.x-i.left:"deltaX"in t&&(n+=t.deltaX),"y"in t?s=t.y-i.top:"deltaY"in t&&(s+=t.deltaY)),{datas:e,distX:n,distY:s,distOrigin:o}},requestEnd:function(){return{datas:e,isDrag:!0}}}}};function addBorderRadiusByLine(t,e,i,n){var s=t.filter((function(t){var e=t.virtual;return t.horizontal&&!e})).length,a=t.filter((function(t){var e=t.virtual;return t.vertical&&!e})).length,o=-1;if(0===e&&(0===s?o=0:1===s&&(o=1)),2===e&&(s<=2?o=2:s<=3&&(o=3)),3===e&&(0===a?o=4:a<4&&(o=7)),1===e&&(a<=1?o=5:a<=2&&(o=6)),-1!==o&&t[o].virtual){var r=t[o];addBorderRadius(t,o),o<4?r.pos[0]=i:r.pos[1]=n}}function addBorderRadius(t,e){e<4?t.slice(0,e+1).forEach((function(t){t.virtual=!1})):(t[0].virtual&&(t[0].virtual=!1),t.slice(4,e+1).forEach((function(t){t.virtual=!1})))}function removeBorderRadius(t,e){e<4?t.slice(e,4).forEach((function(t){t.virtual=!0})):t.slice(e).forEach((function(t){t.virtual=!0}))}function getBorderRadius(t,e,i,n,s){void 0===n&&(n=[0,0]);return getRadiusValues(t&&"0px"!==t?splitSpace(t):[],e,i,0,0,n,s)}function triggerRoundEvent(t,e,i,n,s){var a=t.state,o=a.width,r=a.height,l=getRadiusStyles(s,t.props.roundRelative,o,r),h=l.raws,c=l.styles,u=splitRadiusPoses(l.radiusPoses,h),d=u.horizontals,p=u.verticals,g=c.join(" ");a.borderRadiusState=g;var f=fillParams(t,e,__assign$2({horizontals:d,verticals:p,borderRadius:g,width:o,height:r,delta:n,dist:i},fillCSSObject({borderRadius:g},e)));return triggerEvent(t,"onRound",f),f}function getStyleBorderRadius(t){var e,i,n=t.getState().style,s=n.borderRadius||"";if(!s&&t.props.groupable){var a=t.moveables[0],o=t.getTargets()[0];o&&((null==a?void 0:a.props.target)===o?(s=null!==(i=null===(e=t.moveables[0])||void 0===e?void 0:e.state.style.borderRadius)&&void 0!==i?i:"",n.borderRadius=s):(s=getComputedStyle$3(o).borderRadius,n.borderRadius=s))}return s}var Roundable={name:"roundable",props:["roundable","roundRelative","minRoundControls","maxRoundControls","roundClickable","roundPadding","isDisplayShadowRoundControls"],events:["roundStart","round","roundEnd","roundGroupStart","roundGroup","roundGroupEnd"],css:[".control.border-radius {\nbackground: #d66;\ncursor: pointer;\nz-index: 3;\n}",".control.border-radius.vertical {\nbackground: #d6d;\nz-index: 2;\n}",".control.border-radius.virtual {\nopacity: 0.5;\nz-index: 1;\n}",":host.round-line-clickable .line.direction {\ncursor: pointer;\n}"],className:function(t){var e=t.props.roundClickable;return!0===e||"line"===e?prefix("round-line-clickable"):""},requestStyle:function(){return["borderRadius"]},requestChildStyle:function(){return["borderRadius"]},render:function(t,e){var i=t.getState(),n=i.target,s=i.width,a=i.height,o=i.allMatrix,r=i.is3d,l=i.left,h=i.top,c=i.borderRadiusState,u=t.props,d=u.minRoundControls,p=void 0===d?[0,0]:d,g=u.maxRoundControls,f=void 0===g?[4,4]:g,m=u.zoom,v=u.roundPadding,b=void 0===v?0:v,y=u.isDisplayShadowRoundControls,S=u.groupable;if(!n)return null;var x=c||getStyleBorderRadius(t),w=r?4:3,C=getBorderRadius(x,s,a,p,!0);if(!C)return null;var T=0,D=0,k=S?[0,0]:[l,h];return C.map((function(t,i){var n=t.horizontal,s=t.vertical,a=t.direction||"",r=__spreadArray$1([],__read(t.pos),!1);D+=Math.abs(n),T+=Math.abs(s),n&&a.indexOf("n")>-1&&(r[1]-=b),s&&a.indexOf("w")>-1&&(r[0]-=b),n&&a.indexOf("s")>-1&&(r[1]+=b),s&&a.indexOf("e")>-1&&(r[0]+=b);var l=minus(calculatePosition(o,r,w),k),h=y&&"horizontal"!==y,c=t.vertical?T<=f[1]&&(h||!t.virtual):D<=f[0]&&(y||!t.virtual);return e.createElement("div",{key:"borderRadiusControl".concat(i),className:prefix("control","border-radius",t.vertical?"vertical":"",t.virtual?"virtual":""),"data-radius-index":i,style:{display:c?"block":"none",transform:"translate(".concat(l[0],"px, ").concat(l[1],"px) scale(").concat(m,")")}})}))},dragControlCondition:function(t,e){if(!e.inputEvent||e.isRequest)return!1;var i=e.inputEvent.target.getAttribute("class")||"";return i.indexOf("border-radius")>-1||i.indexOf("moveable-line")>-1&&i.indexOf("moveable-direction")>-1},dragGroupControlCondition:function(t,e){return this.dragControlCondition(t,e)},dragControlStart:function(t,e){var i=e.inputEvent,n=e.datas,s=i.target,a=s.getAttribute("class")||"",o=a.indexOf("border-radius")>-1,r=a.indexOf("moveable-line")>-1&&a.indexOf("moveable-direction")>-1,l=o?parseInt(s.getAttribute("data-radius-index"),10):-1,h=-1;if(r){var c=s.getAttribute("data-line-key")||"";c&&(h=parseInt(c.replace(/render-line-/g,""),10),isNaN(h)&&(h=-1))}if(!o&&!r)return!1;var u=fillParams(t,e,{});if(!1===triggerEvent(t,"onRoundStart",u))return!1;n.lineIndex=h,n.controlIndex=l,n.isControl=o,n.isLine=r,setDragStart(t,e);var d=t.props,p=d.roundRelative,g=d.minRoundControls,f=void 0===g?[0,0]:g,m=t.state,v=m.width,b=m.height;n.isRound=!0,n.prevDist=[0,0];var y=getBorderRadius(getStyleBorderRadius(t)||"",v,b,f,!0)||[];return n.controlPoses=y,m.borderRadiusState=getRadiusStyles(y,p,v,b).styles.join(" "),u},dragControl:function(t,e){var i=e.datas,n=i.controlPoses;if(!i.isRound||!i.isControl||!n.length)return!1;var s=i.controlIndex,a=__read(getDragDist(e),2),o=a[0],r=a[1],l=[o,r],h=minus(l,i.prevDist),c=t.props.maxRoundControls,u=void 0===c?[4,4]:c,d=t.state,p=d.width,g=d.height,f=n[s],m=f.vertical,v=f.horizontal,b=n.map((function(t){var e=t.horizontal,i=t.vertical,n=[e*v*l[0],i*m*l[1]];if(e){if(1===u[0])return n;if(u[0]<4&&e!==v)return n}else{if(0===u[1])return n[1]=i*v*l[0]/p*g,n;if(m){if(1===u[1])return n;if(u[1]<4&&i!==m)return n}}return[0,0]}));b[s]=l;var y=n.map((function(t,e){return __assign$2(__assign$2({},t),{pos:plus(t.pos,b[e])})}));return s<4?y.slice(0,s+1).forEach((function(t){t.virtual=!1})):y.slice(4,s+1).forEach((function(t){t.virtual=!1})),i.prevDist=[o,r],triggerRoundEvent(t,e,l,h,y)},dragControlEnd:function(t,e){var i=t.state;i.borderRadiusState="";var n=e.datas,s=e.isDouble;if(!n.isRound)return!1;var a=n.isControl,o=n.controlIndex,r=n.isLine,l=n.lineIndex,h=n.controlPoses,c=h.filter((function(t){return t.virtual})).length,u=t.props.roundClickable,d=void 0===u||u;if(s&&d){if(!a||!0!==d&&"control"!==d){if(r&&(!0===d||"line"===d)){var p=__read(calculatePointerDist(t,e),2);addBorderRadiusByLine(h,l,p[0],p[1])}}else removeBorderRadius(h,o);c!==h.filter((function(t){return t.virtual})).length&&triggerRoundEvent(t,e,[0,0],[0,0],h)}var g=fillEndParams(t,e,{});return triggerEvent(t,"onRoundEnd",g),i.borderRadiusState="",g},dragGroupControlStart:function(t,e){var i=this.dragControlStart(t,e);if(!i)return!1;var n=t.moveables,s=t.props.targets,a=fillChildEvents(t,"roundable",e);return triggerEvent(t,"onRoundGroupStart",__assign$2({targets:t.props.targets,events:a.map((function(t,e){return __assign$2(__assign$2({},t),{target:s[e],moveable:n[e],currentTarget:n[e]})}))},i)),i},dragGroupControl:function(t,e){var i=this.dragControl(t,e);if(!i)return!1;var n=t.moveables,s=t.props.targets,a=fillChildEvents(t,"roundable",e),o=__assign$2({targets:t.props.targets,events:a.map((function(t,e){return __assign$2(__assign$2(__assign$2({},t),{target:s[e],moveable:n[e],currentTarget:n[e]}),fillCSSObject({borderRadius:i.borderRadius},t))}))},i);return triggerEvent(t,"onRoundGroup",o),o},dragGroupControlEnd:function(t,e){var i=t.moveables,n=t.props.targets,s=fillChildEvents(t,"roundable",e);catchEvent(t,"onRound",(function(e){var a=__assign$2({targets:t.props.targets,events:s.map((function(t,s){return __assign$2(__assign$2(__assign$2({},t),{target:n[s],moveable:i[s],currentTarget:i[s]}),fillCSSObject({borderRadius:e.borderRadius},t))}))},e);triggerEvent(t,"onRoundGroup",a)}));var a=this.dragControlEnd(t,e);if(!a)return!1;var o=__assign$2({targets:t.props.targets,events:s.map((function(t,e){var s;return __assign$2(__assign$2({},t),{target:n[e],moveable:i[e],currentTarget:i[e],lastEvent:null===(s=t.datas)||void 0===s?void 0:s.lastEvent})}))},a);return triggerEvent(t,"onRoundGroupEnd",o),o},unset:function(t){t.state.borderRadiusState=""}};function isIdentityMatrix(t,e){var i=createIdentityMatrix(e?4:3);return t==="matrix".concat(e?"3d":"","(").concat(i.join(","),")")||"matrix(1,0,0,1,0,0)"===t}var BeforeRenderable={isPinch:!0,name:"beforeRenderable",props:[],events:["beforeRenderStart","beforeRender","beforeRenderEnd","beforeRenderGroupStart","beforeRenderGroup","beforeRenderGroupEnd"],dragRelation:"weak",setTransform:function(t,e){var i=t.state,n=i.is3d,s=i.targetMatrix,a=i.inlineTransform,o=n?"matrix3d(".concat(s.join(","),")"):"matrix(".concat(convertMatrixtoCSS(s,!0),")"),r=a&&"none"!==a?a:o;e.datas.startTransforms=isIdentityMatrix(r,n)?[]:splitSpace(r)},resetStyle:function(t){var e=t.datas;e.nextStyle={},e.nextTransforms=t.datas.startTransforms,e.nextTransformAppendedIndexes=[]},fillDragStartParams:function(t,e){return fillParams(t,e,{setTransform:function(t){e.datas.startTransforms=isArray$1(t)?t:splitSpace(t)},isPinch:!!e.isPinch})},fillDragParams:function(t,e){return fillParams(t,e,{isPinch:!!e.isPinch})},dragStart:function(t,e){this.setTransform(t,e),this.resetStyle(e),triggerEvent(t,"onBeforeRenderStart",this.fillDragStartParams(t,e))},drag:function(t,e){e.datas.startTransforms||this.setTransform(t,e),this.resetStyle(e),triggerEvent(t,"onBeforeRender",fillParams(t,e,{isPinch:!!e.isPinch}))},dragEnd:function(t,e){e.datas.startTransforms||(this.setTransform(t,e),this.resetStyle(e)),triggerEvent(t,"onBeforeRenderEnd",fillParams(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag}))},dragGroupStart:function(t,e){var i=this;this.dragStart(t,e);var n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.setTransform(n,t),i.resetStyle(t),i.fillDragStartParams(n,t)}));triggerEvent(t,"onBeforeRenderGroupStart",fillParams(t,e,{isPinch:!!e.isPinch,targets:t.props.targets,setTransform:function(){},events:a}))},dragGroup:function(t,e){var i=this;this.drag(t,e);var n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.resetStyle(t),i.fillDragParams(n,t)}));triggerEvent(t,"onBeforeRenderGroup",fillParams(t,e,{isPinch:!!e.isPinch,targets:t.props.targets,events:a}))},dragGroupEnd:function(t,e){this.dragEnd(t,e),triggerEvent(t,"onBeforeRenderGroupEnd",fillParams(t,e,{isPinch:!!e.isPinch,isDrag:e.isDrag,targets:t.props.targets}))},dragControlStart:function(t,e){return this.dragStart(t,e)},dragControl:function(t,e){return this.drag(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupControlStart:function(t,e){return this.dragGroupStart(t,e)},dragGroupControl:function(t,e){return this.dragGroup(t,e)},dragGroupControlEnd:function(t,e){return this.dragGroupEnd(t,e)}},Renderable={name:"renderable",props:[],events:["renderStart","render","renderEnd","renderGroupStart","renderGroup","renderGroupEnd"],dragRelation:"weak",dragStart:function(t,e){triggerEvent(t,"onRenderStart",fillParams(t,e,{isPinch:!!e.isPinch}))},drag:function(t,e){triggerEvent(t,"onRender",this.fillDragParams(t,e))},dragAfter:function(t,e){return this.drag(t,e)},dragEnd:function(t,e){triggerEvent(t,"onRenderEnd",this.fillDragEndParams(t,e))},dragGroupStart:function(t,e){triggerEvent(t,"onRenderGroupStart",fillParams(t,e,{isPinch:!!e.isPinch,targets:t.props.targets}))},dragGroup:function(t,e){var i=this,n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.fillDragParams(n,t)}));triggerEvent(t,"onRenderGroup",fillParams(t,e,__assign$2(__assign$2({isPinch:!!e.isPinch,targets:t.props.targets,transform:getNextTransformText(e),transformObject:{}},fillCSSObject(getNextStyle(e))),{events:a})))},dragGroupEnd:function(t,e){var i=this,n=fillChildEvents(t,"beforeRenderable",e),s=t.moveables,a=n.map((function(t,e){var n=s[e];return i.fillDragEndParams(n,t)}));triggerEvent(t,"onRenderGroupEnd",fillParams(t,e,__assign$2({isPinch:!!e.isPinch,isDrag:e.isDrag,targets:t.props.targets,events:a,transformObject:{},transform:getNextTransformText(e)},fillCSSObject(getNextStyle(e)))))},dragControlStart:function(t,e){return this.dragStart(t,e)},dragControl:function(t,e){return this.drag(t,e)},dragControlAfter:function(t,e){return this.dragAfter(t,e)},dragControlEnd:function(t,e){return this.dragEnd(t,e)},dragGroupControlStart:function(t,e){return this.dragGroupStart(t,e)},dragGroupControl:function(t,e){return this.dragGroup(t,e)},dragGroupControlEnd:function(t,e){return this.dragGroupEnd(t,e)},fillDragParams:function(t,e){var i={};return parse$1(getNextTransforms(e)||[]).forEach((function(t){i[t.name]=t.functionValue})),fillParams(t,e,__assign$2({isPinch:!!e.isPinch,transformObject:i,transform:getNextTransformText(e)},fillCSSObject(getNextStyle(e))))},fillDragEndParams:function(t,e){var i={};return parse$1(getNextTransforms(e)||[]).forEach((function(t){i[t.name]=t.functionValue})),fillParams(t,e,__assign$2({isPinch:!!e.isPinch,isDrag:e.isDrag,transformObject:i,transform:getNextTransformText(e)},fillCSSObject(getNextStyle(e))))}};function triggerAble(t,e,i,n,s,a,o){a.clientDistX=a.distX,a.clientDistY=a.distY;var r="Start"===s,l="End"===s,h="After"===s,c=t.state.target,u=a.isRequest,d=n.indexOf("Control")>-1;if(!c||r&&d&&!u&&t.areaElement===a.inputEvent.target)return!1;var p=__spreadArray$1([],__read(e),!1);if(u){var g=a.requestAble;p.some((function(t){return t.name===g}))||p.push.apply(p,__spreadArray$1([],__read(t.props.ables.filter((function(t){return t.name===g}))),!1))}if(!p.length||p.every((function(t){return t.dragRelation})))return!1;var f,m=a.inputEvent;l&&m&&(f=document.elementFromPoint(a.clientX,a.clientY)||m.target);var v=!1,b=function(){var t;v=!0,null===(t=a.stop)||void 0===t||t.call(a)},y=r&&(!t.targetGesto||!t.controlGesto||!t.targetGesto.isFlag()||!t.controlGesto.isFlag());y&&t.updateRect(s,!0,!1);var S=a.datas,x=d?"controlGesto":"targetGesto",w=t[x],C=function(e,i,n){if(!(i in e)||w!==t[x])return!1;var s=e.name,o=S[s]||(S[s]={});if(r&&(o.isEventStart=!n||!e[n]||e[n](t,a)),!o.isEventStart)return!1;var l=e[i](t,__assign$2(__assign$2({},a),{stop:b,datas:o,originalDatas:S,inputTarget:f}));return t._emitter.off(),r&&!1===l&&(o.isEventStart=!1),l};y&&p.forEach((function(e){e.unset&&e.unset(t)})),C(BeforeRenderable,"drag".concat(n).concat(s));var T=0,D=0;i.forEach((function(e){if(v)return!1;var i="".concat(e).concat(n).concat(s),o="".concat(e).concat(n,"Condition");""!==s||u||convertDragDist(t.state,a);var l=p.filter((function(t){return t[i]})),h=(l=l.filter((function(t,e){return t.name&&l.indexOf(t)===e}))).filter((function(t){return C(t,i,o)})).length;v&&++T,h&&++D,!v&&r&&l.length&&!h&&(T+=l.filter((function(t){var e=t.name;return!!S[e].isEventStart&&"strong"!==t.dragRelation})).length?1:0)})),h&&!D||C(Renderable,"drag".concat(n).concat(s));var k=w!==t[x]||T===i.length;if((l||v||k)&&(t.state.gestos={},t.moveables&&t.moveables.forEach((function(t){t.state.gestos={}})),p.forEach((function(e){e.unset&&e.unset(t)}))),r&&!k&&!u&&D&&t.props.preventDefault&&(null==a||a.preventDefault()),t.isUnmounted||k)return!1;(!r&&D&&!o||l)&&(t.props.flushSync||defaultSync)((function(){t.updateRect(l?s:"",!0,!1),t.forceUpdate()}));return r||l||h||!D||o||triggerAble(t,e,i,n,s+"After",a),!0}function checkMoveableTarget(t,e){return function(i,n){var s;void 0===n&&(n=i.inputEvent.target);var a=n,o=t.areaElement,r=t._dragTarget;return!(!r||!e&&(null===(s=t.controlGesto)||void 0===s?void 0:s.isFlag()))&&(a===r||r.contains(a)||a===o||!t.isMoveableElement(a)&&!t.controlBox.contains(a)||hasClass(a,"moveable-area")||hasClass(a,"moveable-padding")||hasClass(a,"moveable-edgeDraggable"))}}function getTargetAbleGesto(t,e,i){var n=t.controlBox,s=[],a=t.props,o=a.dragArea,r=t.state.target,l=a.dragTarget;s.push(n),o&&!l||s.push(e),!o&&l&&r&&e!==r&&a.dragTargetSelf&&s.push(r);var h=checkMoveableTarget(t);return getAbleGesto(t,s,"targetAbles",i,{dragStart:h,pinchStart:h})}function getControlAbleGesto(t,e){var i=t.controlBox,n=[];n.push(i);var s=checkMoveableTarget(t,!0),a=function(t,e){return void 0===e&&(e=t.inputEvent.target),e===i||!s(t,e)};return getAbleGesto(t,n,"controlAbles",e,{dragStart:a,pinchStart:a})}function getAbleGesto(t,e,i,n,s){void 0===s&&(s={});var a="targetAbles"===i,o=t.props,r=o.pinchOutside,l=o.pinchThreshold,h=o.preventClickEventOnDrag,c=o.preventClickDefault,u=o.checkInput,d=o.dragFocusedInput,p=o.preventDefault,g=void 0===p||p,f=o.preventRightClick,m=void 0===f||f,v=o.preventWheelClick,b={preventDefault:g,preventRightClick:m,preventWheelClick:void 0===v||v,container:getRefTarget(o.dragContainer,!0)||getWindow(t.getControlBoxElement()),pinchThreshold:l,pinchOutside:r,preventClickEventOnDrag:!!a&&h,preventClickEventOnDragStart:!!a&&c,preventClickEventByCondition:a?null:function(e){return t.controlBox.contains(e.target)},checkInput:!!a&&u,dragFocusedInput:d},y=new Gesto(e,b),S="Control"===n;return["drag","pinch"].forEach((function(e){["Start","","End"].forEach((function(a){y.on("".concat(e).concat(a),(function(o){var r,l=o.eventType,h="drag"===e&&o.isPinch;if(!s[l]||s[l](o)){if(!h){var c="drag"===e?[e]:["drag",e],u=__spreadArray$1([],__read(t[i]),!1);triggerAble(t,u,c,n,a,o)?(t.props.stopPropagation||"Start"===a&&S)&&(null===(r=null==o?void 0:o.inputEvent)||void 0===r||r.stopPropagation()):o.stop()}}else o.stop()}))}))})),y}var EventManager=function(){function t(t,e,i){var n=this;this.target=t,this.moveable=e,this.eventName=i,this.ables=[],this._onEvent=function(t){var e=n.eventName,i=n.moveable;i.state.disableNativeEvent||n.ables.forEach((function(n){n[e](i,{inputEvent:t})}))},t.addEventListener(i.toLowerCase(),this._onEvent)}return t.prototype.setAbles=function(t){this.ables=t},t.prototype.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},t}();function calculateMatrixStack(t,e,i,n){var s;void 0===i&&(i=e);var a=getMatrixStackInfo(t,e),o=a.matrixes,r=a.is3d,l=a.targetMatrix,h=a.transformOrigin,c=a.targetOrigin,u=a.offsetContainer,d=a.hasFixed,p=a.zoom,g=getCachedMatrixContainerInfo(u,i),f=g.matrixes,m=g.is3d,v=g.offsetContainer,b=g.zoom,y=n||m||r,S=y?4:3,x="svg"!==t.tagName.toLowerCase()&&"ownerSVGElement"in t,w=l,C=createIdentityMatrix(S),T=createIdentityMatrix(S),D=createIdentityMatrix(S),k=createIdentityMatrix(S),$=o.length,O=f.map((function(t){return __assign$2(__assign$2({},t),{matrix:t.matrix?__spreadArray$1([],__read(t.matrix),!1):void 0})})).reverse();o.reverse(),!r&&y&&(w=convertDimension(w,3,4),convert3DMatrixes(o)),!m&&y&&convert3DMatrixes(O),O.forEach((function(t){T=multiply(T,t.matrix,S)}));var P=i||getDocumentBody(t),L=(null===(s=O[0])||void 0===s?void 0:s.target)||getOffsetInfo(P,P,!0).offsetParent,I=O.slice(1).reduce((function(t,e){return multiply(t,e.matrix,S)}),createIdentityMatrix(S));o.forEach((function(t,e){if($-2===e&&(D=C.slice()),$-1===e&&(k=C.slice()),!t.matrix){var i=getSVGOffset(t,o[e+1],L,S,multiply(I,C,S));t.matrix=createOriginMatrix(i,S)}C=multiply(C,t.matrix,S)}));var A=!x&&r;w||(w=createIdentityMatrix(A?4:3));var E=makeMatrixCSS(x&&16===w.length?convertDimension(w,4,3):w,A),G=T;return T=ignoreDimension(T,S,S),{hasZoom:1!==p||1!==b,hasFixed:d,matrixes:o,rootMatrix:T,originalRootMatrix:G,beforeMatrix:D,offsetMatrix:k,allMatrix:C,targetMatrix:w,targetTransform:E,inlineTransform:t.style.transform,transformOrigin:h,targetOrigin:c,is3d:y,offsetContainer:u,offsetRootContainer:v}}function calculateElementInfo(t,e,i,n){void 0===i&&(i=e);var s=0,a=0,o=0,r={},l=getSize$1(t);if(t&&(s=l.offsetWidth,a=l.offsetHeight),t){var h=calculateMatrixStack(t,e,i,n),c=calculateElementPosition(h.allMatrix,h.transformOrigin,s,a);r=__assign$2(__assign$2({},h),c);var u=calculateElementPosition(h.allMatrix,[50,50],100,100);o=getRotationRad([u.pos1,u.pos2],u.direction)}var d=n?4:3;return __assign$2(__assign$2(__assign$2({hasZoom:!1,width:s,height:a,rotation:o},l),{originalRootMatrix:createIdentityMatrix(d),rootMatrix:createIdentityMatrix(d),beforeMatrix:createIdentityMatrix(d),offsetMatrix:createIdentityMatrix(d),allMatrix:createIdentityMatrix(d),targetMatrix:createIdentityMatrix(d),targetTransform:"",inlineTransform:"",transformOrigin:[0,0],targetOrigin:[0,0],is3d:!!n,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1,hasFixed:!1,offsetContainer:null,offsetRootContainer:null,matrixes:[]}),r)}function getElementInfo$2(t,e,i){return void 0===i&&(i=e),calculateElementInfo(t,e,i,!0)}function getMoveableTargetInfo(t,e,i,n,s,a){void 0===a&&(a=[]);var o=1,r=[0,0],l=resetClientRect(),h=resetClientRect(),c=resetClientRect(),u=resetClientRect(),d=[0,0],p={},g=calculateElementInfo(e,i,s,!0);if(e){var f=getCachedStyle(e);a.forEach((function(t){p[t]=f(t)}));var m=g.is3d?4:3,v=calculateElementPosition(g.offsetMatrix,plus(g.transformOrigin,getOrigin(g.targetMatrix,m)),g.width,g.height);o=v.direction,r=plus(v.origin,[v.left-g.left,v.top-g.top]),u=getClientRect(g.offsetRootContainer);var b=getOffsetInfo(n,n,!0).offsetParent||g.offsetRootContainer;if(g.hasZoom){var y=calculateElementPosition(multiply(g.originalRootMatrix,g.allMatrix),g.transformOrigin,g.width,g.height),S=calculateElementPosition(g.originalRootMatrix,getTransformOriginArray(getCachedStyle(b)("transformOrigin")).map((function(t){return parseFloat(t)})),b.offsetWidth,b.offsetHeight);if(l=getClientRectByPosition(y,u),c=getClientRectByPosition(S,u,b,!0),t){var x=y.left,w=y.top;h=getClientRectByPosition({left:x,top:w,bottom:w,right:w},u)}}else{l=getClientRect(e),c=getCachedClientRect(b),t&&(h=getClientRect(t));var C=c.left,T=c.top,D=c.clientLeft,k=c.clientTop,$=[l.left-C,l.top-T];d=minus(calculateInversePosition(g.rootMatrix,$,4),[D+g.left,k+g.top])}}return __assign$2({targetClientRect:l,containerClientRect:c,moveableClientRect:h,rootContainerClientRect:u,beforeDirection:o,beforeOrigin:r,originalBeforeOrigin:r,target:e,style:p,offsetDelta:d},g)}function getPersistState(t){var e=t.pos1,i=t.pos2,n=t.pos3,s=t.pos4;if(!(e&&i&&n&&s))return null;var a=getMinMaxs([e,i,n,s]),o=[a.minX,a.minY],r=minus(t.origin,o);return e=minus(e,o),i=minus(i,o),n=minus(n,o),s=minus(s,o),__assign$2(__assign$2({},t),{left:t.left,top:t.top,posDelta:o,pos1:e,pos2:i,pos3:n,pos4:s,origin:r,beforeOrigin:r,isPersisted:!0})}var MoveableManager$1=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state=__assign$2({container:null,gestos:{},renderLines:[[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]],[[0,0],[0,0]]],renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1,posDelta:[0,0]},getMoveableTargetInfo(null)),e.renderState={},e.enabledAbles=[],e.targetAbles=[],e.controlAbles=[],e.rotation=0,e.scale=[1,1],e.isMoveableMounted=!1,e.isUnmounted=!1,e.events={mouseEnter:null,mouseLeave:null},e._emitter=new EventEmitter$1,e._prevOriginalDragTarget=null,e._originalDragTarget=null,e._prevDragTarget=null,e._dragTarget=null,e._prevPropTarget=null,e._propTarget=null,e._prevDragArea=!1,e._isPropTargetChanged=!1,e._hasFirstTarget=!1,e._reiszeObserver=null,e._observerId=0,e._mutationObserver=null,e._rootContainer=null,e._viewContainer=null,e._viewClassNames=[],e._store={},e.checkUpdateRect=function(){if(!e.isDragging()){var t=e.props.parentMoveable;t?t.checkUpdateRect():(cancelAnimationFrame$2(e._observerId),e._observerId=requestAnimationFrame$4((function(){e.isDragging()||e.updateRect()})))}},e._onPreventClick=function(t){t.stopPropagation(),t.preventDefault()},e}return __extends$2(e,t),e.prototype.render=function(){var t=this.props,e=this.getState(),i=t.parentPosition,n=t.className,s=t.target,a=t.zoom,o=t.cspNonce,r=t.translateZ,l=t.cssStyled,h=t.groupable,c=t.linePadding,u=t.controlPadding;this._checkUpdateRootContainer(),this.checkUpdate(),this.updateRenderPoses();var d=__read(i||[0,0],2),p=d[0],g=d[1],f=e.left,m=e.top,v=e.target,b=e.direction,y=e.hasFixed,S=e.offsetDelta,x=t.targets,w=this.isDragging(),C={};this.getEnabledAbles().forEach((function(t){C["data-able-".concat(t.name.toLowerCase())]=!0}));var T=this._getAbleClassName(),D=x&&x.length&&(v||h)||s||!this._hasFirstTarget&&this.state.isPersisted,k=this.controlBox||this.props.firstRenderState||this.props.persistData,$=[f-p,m-g];!h&&t.useAccuratePosition&&($[0]+=S[0],$[1]+=S[1]);var O={position:y?"fixed":"absolute",display:D?"block":"none",visibility:k?"visible":"hidden",transform:"translate3d(".concat($[0],"px, ").concat($[1],"px, ").concat(r,")"),"--zoom":a,"--zoompx":"".concat(a,"px")};return c&&(O["--moveable-line-padding"]=c),u&&(O["--moveable-control-padding"]=u),createElement$1(l,__assign$2({cspNonce:o,ref:ref(this,"controlBox"),className:"".concat(prefix("control-box",-1===b?"reverse":"",w?"dragging":"")," ").concat(T," ").concat(n)},C,{onClick:this._onPreventClick,style:O}),this.renderAbles(),this._renderLines())},e.prototype.componentDidMount=function(){this.isMoveableMounted=!0,this.isUnmounted=!1;var t=this.props,e=t.parentMoveable,i=t.container;this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(this.props),i||e||this.state.isPersisted||(this.updateRect("",!1,!1),this.forceUpdate())},e.prototype.componentDidUpdate=function(t){this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateNativeEvents(),this._updateTargets(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(t)},e.prototype.componentWillUnmount=function(){var t,e;this.isMoveableMounted=!1,this.isUnmounted=!0,this._emitter.off(),null===(t=this._reiszeObserver)||void 0===t||t.disconnect(),null===(e=this._mutationObserver)||void 0===e||e.disconnect(),this._viewContainer&&this._changeAbleViewClassNames([]),unsetGesto(this,!1),unsetGesto(this,!0);var i=this.events;for(var n in i){var s=i[n];s&&s.destroy()}},e.prototype.getTargets=function(){var t=this.props.target;return t?[t]:[]},e.prototype.getAble=function(t){return find$2(this.props.ables||[],(function(e){return e.name===t}))},e.prototype.getContainer=function(){var t=this.props,e=t.parentMoveable,i=t.wrapperMoveable;return t.container||i&&i.getContainer()||e&&e.getContainer()||this.controlBox.parentElement},e.prototype.getControlBoxElement=function(){return this.controlBox},e.prototype.getDragElement=function(){return this._dragTarget},e.prototype.isMoveableElement=function(t){var e;return t&&((null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"class"))||"").indexOf(PREFIX)>-1},e.prototype.dragStart=function(t,e){void 0===e&&(e=t.target);var i=this.targetGesto,n=this.controlGesto;return i&&checkMoveableTarget(this)({inputEvent:t},e)?i.isFlag()||i.triggerDragStart(t):n&&this.isMoveableElement(e)&&(n.isFlag()||n.triggerDragStart(t)),this},e.prototype.hitTest=function(t){var e,i=this.state,n=i.target,s=i.pos1,a=i.pos2,o=i.pos3,r=i.pos4,l=i.targetClientRect;if(!n)return 0;if(isNode(t)){var h=t.getBoundingClientRect();e={left:h.left,top:h.top,width:h.width,height:h.height}}else e=__assign$2({width:0,height:0},t);var c=e.left,u=e.top,d=e.width,p=e.height,g=fitPoints([s,a,r,o],l),f=getOverlapSize$1(g,[[c,u],[c+d,u],[c+d,u+p],[c,u+p]]),m=getAreaSize(g);return f&&m?Math.min(100,f/m*100):0},e.prototype.isInside=function(t,e){var i=this.state,n=i.target,s=i.pos1,a=i.pos2,o=i.pos3,r=i.pos4,l=i.targetClientRect;return!!n&&isInside([t,e],fitPoints([s,a,r,o],l))},e.prototype.updateRect=function(t,e,i){void 0===i&&(i=!0);var n=this.props,s=!n.parentPosition&&!n.wrapperMoveable;s&&setStoreCache(!0);var a=n.parentMoveable,o=this.state.target||n.target,r=this.getContainer(),l=a?a._rootContainer:this._rootContainer,h=getMoveableTargetInfo(this.controlBox,o,r,r,l||r,this._getRequestStyles());if(!o&&this._hasFirstTarget&&n.persistData){var c=getPersistState(n.persistData);for(var u in c)h[u]=c[u]}s&&setStoreCache(),this.updateState(h,!a&&i)},e.prototype.isDragging=function(t){var e,i,n=this.targetGesto,s=this.controlGesto;return(null==n?void 0:n.isFlag())?!t||!!(null===(e=n.getEventData()[t])||void 0===e?void 0:e.isEventStart):!!(null==s?void 0:s.isFlag())&&(!t||!!(null===(i=s.getEventData()[t])||void 0===i?void 0:i.isEventStart))},e.prototype.updateTarget=function(t){this.updateRect(t,!0)},e.prototype.getRect=function(){var t=this.state,e=getAbsolutePosesByState(this.state),i=__read(e,4),n=i[0],s=i[1],a=i[2],o=i[3],r=getRect(e),l=t.width,h=t.height,c=r.width,u=r.height,d=r.left,p=r.top,g=[t.left,t.top],f=plus(g,t.origin);return{width:c,height:u,left:d,top:p,pos1:n,pos2:s,pos3:a,pos4:o,offsetWidth:l,offsetHeight:h,beforeOrigin:plus(g,t.beforeOrigin),origin:f,transformOrigin:t.transformOrigin,rotation:this.getRotation()}},e.prototype.getManager=function(){return this},e.prototype.stopDrag=function(t){var e;t&&"target"!==t||(!1===(null==(e=this.targetGesto)?void 0:e.isIdle())&&unsetAbles(this,!1),null==e||e.stop());t&&"control"!==t||(!1===(null==(e=this.controlGesto)?void 0:e.isIdle())&&unsetAbles(this,!0),null==e||e.stop())},e.prototype.getRotation=function(){var t=this.state;return getAbsoluteRotation(t.pos1,t.pos2,t.direction)},e.prototype.request=function(t,e,i){void 0===e&&(e={});var n=this,s=n.props,a=s.parentMoveable||s.wrapperMoveable||n,o=a.props.ables,r=s.groupable,l=find$2(o,(function(e){return e.name===t}));if(this.isDragging()||!l||!l.request)return{request:function(){return this},requestEnd:function(){return this}};var h=l.request(n),c=i||e.isInstant,u=h.isControl?"controlAbles":"targetAbles",d="".concat(r?"Group":"").concat(h.isControl?"Control":""),p=__spreadArray$1([],__read(a[u]),!1),g={request:function(e){return triggerAble(n,p,["drag"],d,"",__assign$2(__assign$2({},h.request(e)),{requestAble:t,isRequest:!0}),c),g},requestEnd:function(){return triggerAble(n,p,["drag"],d,"End",__assign$2(__assign$2({},h.requestEnd()),{requestAble:t,isRequest:!0}),c),g}};return triggerAble(n,p,["drag"],d,"Start",__assign$2(__assign$2({},h.requestStart(e)),{requestAble:t,isRequest:!0}),c),c?g.request(e).requestEnd():g},e.prototype.getMoveables=function(){return[this]},e.prototype.destroy=function(){this.componentWillUnmount()},e.prototype.updateRenderPoses=function(){var t=this.getState(),e=this.props,i=e.padding,n=t.originalBeforeOrigin,s=t.transformOrigin,a=t.allMatrix,o=t.is3d,r=t.pos1,l=t.pos2,h=t.pos3,c=t.pos4,u=t.left,d=t.top,p=t.isPersisted,g=e.zoom||1;if(!i&&g<=1)return t.renderPoses=[r,l,h,c],void(t.renderLines=[[r,l],[l,c],[c,h],[h,r]]);var f=getPaddingBox(i||{}),m=f.left,v=f.top,b=f.bottom,y=f.right,S=o?4:3,x=multiplies(S,createOriginMatrix((p?s:this.controlBox&&e.groupable?n:plus(n,[u,d])).map((function(t){return-t})),S),a,createOriginMatrix(s,S)),w=calculatePadding(x,r,[-m,-v],S),C=calculatePadding(x,l,[y,-v],S),T=calculatePadding(x,h,[-m,b],S),D=calculatePadding(x,c,[y,b],S);if(t.renderPoses=[w,C,T,D],t.renderLines=[[w,C],[C,D],[D,T],[T,w]],g){var k=g/2;t.renderLines=[[calculatePadding(x,r,[-m-k,-v],S),calculatePadding(x,l,[y+k,-v],S)],[calculatePadding(x,l,[y,-v-k],S),calculatePadding(x,c,[y,b+k],S)],[calculatePadding(x,c,[y+k,b],S),calculatePadding(x,h,[-m-k,b],S)],[calculatePadding(x,h,[-m,b+k],S),calculatePadding(x,r,[-m,-v-k],S)]]}},e.prototype.checkUpdate=function(){this._isPropTargetChanged=!1;var t=this.props,e=t.target,i=t.container,n=t.parentMoveable,s=this.state,a=s.target,o=s.container;if(a||e){this.updateAbles();var r=!equals(a,e);if(r||!equals(o,i)){var l=i||this.controlBox;l&&this.unsetAbles(),this.updateState({target:e,container:i}),!n&&l&&this.updateRect("End",!1,!1),this._isPropTargetChanged=r}}},e.prototype.waitToChangeTarget=function(){return new Promise((function(){}))},e.prototype.triggerEvent=function(t,e){var i=this.props;if(this._emitter.trigger(t,e),i.parentMoveable&&e.isRequest&&!e.isRequestChild)return i.parentMoveable.triggerEvent(t,e,!0);var n=i[t];return n&&n(e)},e.prototype.useCSS=function(t,e){var i=this.props.customStyledMap,n=t+e;return i[n]||(i[n]=styled(t,e)),i[n]},e.prototype.getState=function(){var t,e=this.props;(e.target||(null===(t=e.targets)||void 0===t?void 0:t.length))&&(this._hasFirstTarget=!0);var i=this.controlBox,n=e.persistData,s=e.firstRenderState;if(s&&!i)return s;if(!this._hasFirstTarget&&n){var a=getPersistState(n);if(a)return this.updateState(a,!1),this.state}return this.state.isPersisted=!1,this.state},e.prototype.updateSelectors=function(){},e.prototype.unsetAbles=function(){var t=this;this.targetAbles.forEach((function(e){e.unset&&e.unset(t)}))},e.prototype.updateAbles=function(t,e){void 0===t&&(t=this.props.ables),void 0===e&&(e="");var i=this.props.triggerAblesSimultaneously,n=this.getEnabledAbles(t),s="drag".concat(e,"Start"),a="pinch".concat(e,"Start"),o="drag".concat(e,"ControlStart"),r=filterAbles(n,[s,a],i),l=filterAbles(n,[o],i);this.enabledAbles=n,this.targetAbles=r,this.controlAbles=l},e.prototype.updateState=function(t,e){if(e){if(this.isUnmounted)return;this.setState(t)}else{var i=this.state;for(var n in t)i[n]=t[n]}},e.prototype.getEnabledAbles=function(t){void 0===t&&(t=this.props.ables);var e=this.props;return t.filter((function(t){return t&&(t.always&&!1!==e[t.name]||e[t.name])}))},e.prototype.renderAbles=function(){var t=this,e=this.props.triggerAblesSimultaneously,i={createElement:createElement$1};return this.renderState={},groupByMap(flat(filterAbles(this.getEnabledAbles(),["render"],e).map((function(e){return(0,e.render)(t,i)||[]}))).filter((function(t){return t})),(function(t){return t.key})).map((function(t){return t[0]}))},e.prototype.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},e.prototype._getRequestStyles=function(){return this.getEnabledAbles().reduce((function(t,e){var i,n,s=null!==(n=null===(i=e.requestStyle)||void 0===i?void 0:i.call(e))&&void 0!==n?n:[];return __spreadArray$1(__spreadArray$1([],__read(t),!1),__read(s),!1)}),__spreadArray$1([],__read(this.props.requestStyles||[]),!1))},e.prototype._updateObserver=function(t){this._updateResizeObserver(t),this._updateMutationObserver(t)},e.prototype._updateEvents=function(){var t=this.targetAbles.length,e=this.controlAbles.length,i=this._dragTarget;(!t&&this.targetGesto||this._isTargetChanged(!0))&&(unsetGesto(this,!1),this.updateState({gestos:{}})),e||unsetGesto(this,!0),i&&t&&!this.targetGesto&&(this.targetGesto=getTargetAbleGesto(this,i,"")),!this.controlGesto&&e&&(this.controlGesto=getControlAbleGesto(this,"Control"))},e.prototype._updateTargets=function(){var t=this.props;this._prevPropTarget=this._propTarget,this._prevDragTarget=this._dragTarget,this._prevOriginalDragTarget=this._originalDragTarget,this._prevDragArea=t.dragArea,this._propTarget=t.target,this._originalDragTarget=t.dragTarget||t.target,this._dragTarget=getRefTarget(this._originalDragTarget,!0)},e.prototype._renderLines=function(){var t=this.props,e=t.zoom,i=t.hideDefaultLines,n=t.hideChildMoveableDefaultLines,s=t.parentMoveable;if(i||s&&n)return[];var a=this.getState(),o={createElement:createElement$1};return a.renderLines.map((function(t,i){return renderLine(o,"",t[0],t[1],e,"render-line-".concat(i))}))},e.prototype._isTargetChanged=function(t){var e=this.props,i=e.dragTarget||e.target,n=this._prevOriginalDragTarget,s=this._prevDragArea,a=e.dragArea;return!a&&n!==i||(t||a)&&s!==a||this._prevPropTarget!=this._propTarget},e.prototype._updateNativeEvents=function(){var t=this,e=this.props.dragArea?this.areaElement:this.state.target,i=this.events,n=getKeys(i);if(this._isTargetChanged())for(var s in i){var a=i[s];a&&a.destroy(),i[s]=null}if(e){var o=this.enabledAbles;n.forEach((function(n){var s=filterAbles(o,[n]),a=s.length>0,r=i[n];a?(r||(r=new EventManager(e,t,n),i[n]=r),r.setAbles(s)):r&&(r.destroy(),i[n]=null)}))}},e.prototype._checkUpdateRootContainer=function(){var t=this.props.rootContainer;!this._rootContainer&&t&&(this._rootContainer=getRefTarget(t,!0))},e.prototype._checkUpdateViewContainer=function(){var t=this.props.viewContainer;!this._viewContainer&&t&&(this._viewContainer=getRefTarget(t,!0)),this._viewContainer&&this._changeAbleViewClassNames(__spreadArray$1(__spreadArray$1([],__read(this._getAbleViewClassNames()),!1),[this.isDragging()?VIEW_DRAGGING:""],!1))},e.prototype._changeAbleViewClassNames=function(t){var e=this._viewContainer,i=groupBy(t.filter(Boolean),(function(t){return t})).map((function(t){return __read(t,1)[0]})),n=this._viewClassNames,s=diff$1(n,i),a=s.removed,o=s.added;a.forEach((function(t){removeClass(e,n[t])})),o.forEach((function(t){addClass(e,i[t])})),this._viewClassNames=i},e.prototype._getAbleViewClassNames=function(){var t=this;return(this.getEnabledAbles().map((function(e){var i;return(null===(i=e.viewClassName)||void 0===i?void 0:i.call(e,t))||""})).join(" ")+" ".concat(this._getAbleClassName("-view"))).split(/\s+/g)},e.prototype._getAbleClassName=function(t){var e=this;void 0===t&&(t="");var i=this.getEnabledAbles(),n=this.targetGesto,s=this.controlGesto,a=(null==n?void 0:n.isFlag())?n.getEventData():{},o=(null==s?void 0:s.isFlag())?s.getEventData():{};return i.map((function(i){var n,s,r,l=i.name,h=(null===(n=i.className)||void 0===n?void 0:n.call(i,e))||"";return((null===(s=a[l])||void 0===s?void 0:s.isEventStart)||(null===(r=o[l])||void 0===r?void 0:r.isEventStart))&&(h+=" ".concat(prefix("".concat(l).concat(t,"-dragging")))),h.trim()})).filter(Boolean).join(" ")},e.prototype._updateResizeObserver=function(t){var e,i=this.props,n=i.target,s=getWindow(this.getControlBoxElement());if(s.ResizeObserver&&n&&i.useResizeObserver){if(t.target!==n||!this._reiszeObserver){var a=new s.ResizeObserver(this.checkUpdateRect);a.observe(n,{box:"border-box"}),this._reiszeObserver=a}}else null===(e=this._reiszeObserver)||void 0===e||e.disconnect()},e.prototype._updateMutationObserver=function(t){var e,i=this,n=this.props,s=n.target,a=getWindow(this.getControlBoxElement());if(a.MutationObserver&&s&&n.useMutationObserver){if(t.target!==s||!this._mutationObserver){var o=new a.MutationObserver((function(t){var e,n;try{for(var s=__values(t),a=s.next();!a.done;a=s.next()){var o=a.value;"attributes"===o.type&&"style"===o.attributeName&&i.checkUpdateRect()}}catch(r){e={error:r}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}}));o.observe(s,{attributes:!0}),this._mutationObserver=o}}else null===(e=this._mutationObserver)||void 0===e||e.disconnect()},e.defaultProps={dragTargetSelf:!1,target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,parentMoveable:null,wrapperMoveable:null,isWrapperMounted:!1,parentPosition:null,warpSelf:!1,svgOrigin:"",dragContainer:null,useResizeObserver:!1,useMutationObserver:!1,preventDefault:!0,preventRightClick:!0,preventWheelClick:!0,linePadding:0,controlPadding:0,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,dragFocusedInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{},stopPropagation:!1,preventClickDefault:!1,preventClickEventOnDrag:!0,flushSync:defaultSync,firstRenderState:null,persistData:null,viewContainer:null,requestStyles:[],useAccuratePosition:!1},e}(PureComponent),Groupable={name:"groupable",props:["defaultGroupRotate","useDefaultGroupRotate","defaultGroupOrigin","groupable","groupableProps","targetGroups","hideChildMoveableDefaultLines"],events:[],render:function(t,e){var i,n=t.props,s=n.targets||[],a=t.getState(),o=a.left,r=a.top,l=a.isPersisted,h=n.zoom||1,c=t.renderGroupRects,u=(null===(i=n.persistData)||void 0===i?void 0:i.children)||[];l?s=u.map((function(){return null})):u=[];var d=watchValue(t,"parentPosition",[o,r],(function(t){return t.join(",")})),p=watchValue(t,"requestStyles",t.getRequestChildStyles(),(function(t){return t.join(",")}));return t.moveables=t.moveables.slice(0,s.length),__spreadArray$1(__spreadArray$1([],__read(s.map((function(i,s){return e.createElement(MoveableManager$1,{key:"moveable"+s,ref:refs(t,"moveables",s),target:i,origin:!1,requestStyles:p,cssStyled:n.cssStyled,customStyledMap:n.customStyledMap,useResizeObserver:n.useResizeObserver,useMutationObserver:n.useMutationObserver,hideChildMoveableDefaultLines:n.hideChildMoveableDefaultLines,parentMoveable:t,parentPosition:[o,r],persistData:u[s],zoom:h})}))),!1),__read(flat(c.map((function(t,i){var n=[t.pos1,t.pos2,t.pos3,t.pos4];return[[0,1],[1,3],[3,2],[2,0]].map((function(t,s){var a=__read(t,2),o=a[0],r=a[1];return renderLine(e,"",minus(n[o],d),minus(n[r],d),h,"group-rect-".concat(i,"-").concat(s))}))})))),!1)}},Clickable=makeAble("clickable",{props:["clickable"],events:["click","clickGroup"],always:!0,dragRelation:"weak",dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(t,e){e.datas.inputTarget=e.inputEvent&&e.inputEvent.target},dragEnd:function(t,e){var i=t.props.target,n=e.inputEvent,s=e.inputTarget,a=!t.isMoveableElement(s)&&t.controlBox.contains(s);if(n&&s&&!e.isDrag&&!t.isMoveableElement(s)&&!a){var o=i.contains(s);triggerEvent(t,"onClick",fillParams(t,e,{isDouble:e.isDouble,inputTarget:s,isTarget:i===s,moveableTarget:t.props.target,containsTarget:o}))}},dragGroupEnd:function(t,e){var i=e.inputEvent,n=e.inputTarget;if(i&&n&&!e.isDrag&&!t.isMoveableElement(n)&&e.datas.inputTarget!==n){var s=t.props.targets,a=s.indexOf(n),o=a>-1,r=!1;-1===a&&(r=(a=findIndex(s,(function(t){return t.contains(n)})))>-1),triggerEvent(t,"onClickGroup",fillParams(t,e,{isDouble:e.isDouble,targets:s,inputTarget:n,targetIndex:a,isTarget:o,containsTarget:r,moveableTarget:s[a]}))}},dragControlEnd:function(t,e){this.dragEnd(t,e)},dragGroupControlEnd:function(t,e){this.dragEnd(t,e)}});function getDraggableEvent(t){var e=t.originalDatas.draggable;return e||(t.originalDatas.draggable={},e=t.originalDatas.draggable),__assign$2(__assign$2({},t),{datas:e})}var edgeDraggable=makeAble("edgeDraggable",{css:[".edge.edgeDraggable.line {\ncursor: move;\n}"],render:function(t,e){var i=t.props,n=i.edgeDraggable;return n?renderEdgeLines(e,"edgeDraggable",n,t.getState().renderPoses,i.zoom):[]},dragCondition:function(t,e){var i,n=t.props,s=null===(i=e.inputEvent)||void 0===i?void 0:i.target;return!(!n.edgeDraggable||!s)&&(!n.draggable&&hasClass(s,prefix("direction"))&&hasClass(s,prefix("edge"))&&hasClass(s,prefix("edgeDraggable")))},dragStart:function(t,e){return Draggable$2.dragStart(t,getDraggableEvent(e))},drag:function(t,e){return Draggable$2.drag(t,getDraggableEvent(e))},dragEnd:function(t,e){return Draggable$2.dragEnd(t,getDraggableEvent(e))},dragGroupCondition:function(t,e){var i,n=t.props,s=null===(i=e.inputEvent)||void 0===i?void 0:i.target;return!(!n.edgeDraggable||!s)&&(!n.draggable&&hasClass(s,prefix("direction"))&&hasClass(s,prefix("line")))},dragGroupStart:function(t,e){return Draggable$2.dragGroupStart(t,getDraggableEvent(e))},dragGroup:function(t,e){return Draggable$2.dragGroup(t,getDraggableEvent(e))},dragGroupEnd:function(t,e){return Draggable$2.dragGroupEnd(t,getDraggableEvent(e))},unset:function(t){return Draggable$2.unset(t)}}),IndividualGroupable={name:"individualGroupable",props:["individualGroupable","individualGroupableProps"],events:[]},MOVEABLE_ABLES=[BeforeRenderable,Default,Snappable,Pinchable,Draggable$2,edgeDraggable,Resizable,Scalable,Warpable,Rotatable,Scrollable,Padding,Origin,OriginDraggable,Clippable,Roundable,Groupable,IndividualGroupable,Clickable,DragArea,Renderable],MOVEABLE_EVENTS=MOVEABLE_ABLES.reduce((function(t,e){return(e.events||[]).forEach((function(e){pushSet(t,e)})),t}),[]),MOVEABLE_PROPS=MOVEABLE_ABLES.reduce((function(t,e){return(e.props||[]).forEach((function(e){pushSet(t,e)})),t}),[]);function solveConstantsDistance(t,e){var i=__read(t,3),n=i[0],s=i[1],a=i[2];return(n*e[0]+s*e[1]+a)/Math.sqrt(n*n+s*s)}function solveC(t,e){var i=__read(t,2),n=i[0],s=i[1];return-n*e[0]-s*e[1]}function getMaxPos(t,e){return Math.max.apply(Math,__spreadArray$1([],__read(t.map((function(t){var i=__read(t,4),n=i[0],s=i[1],a=i[2],o=i[3];return Math.max(n[e],s[e],a[e],o[e])}))),!1))}function getMinPos(t,e){return Math.min.apply(Math,__spreadArray$1([],__read(t.map((function(t){var i=__read(t,4),n=i[0],s=i[1],a=i[2],o=i[3];return Math.min(n[e],s[e],a[e],o[e])}))),!1))}function getGroupRect(t,e){var i,n,s,a=[0,0],o=[0,0],r=[0,0],l=[0,0],h=0,c=0;if(!t.length)return{pos1:a,pos2:o,pos3:r,pos4:l,minX:0,minY:0,maxX:0,maxY:0,width:h,height:c,rotation:e};var u=throttle$1(e,TINY_NUM);if(u%90){var d=u/180*Math.PI,p=Math.tan(d),g=-1/p,f=[MAX_NUM,MIN_NUM],m=[[0,0],[0,0]],v=[MAX_NUM,MIN_NUM],b=[[0,0],[0,0]];t.forEach((function(t){t.forEach((function(t){var e=solveConstantsDistance([-p,1,0],t),i=solveConstantsDistance([-g,1,0],t);f[0]>e&&(m[0]=t,f[0]=e),f[1]<e&&(m[1]=t,f[1]=e),v[0]>i&&(b[0]=t,v[0]=i),v[1]<i&&(b[1]=t,v[1]=i)}))}));var y=__read(m,2),S=y[0],x=y[1],w=__read(b,2),C=w[0],T=w[1],D=[-p,1,solveC([-p,1],S)],k=[-p,1,solveC([-p,1],x)],$=[-g,1,solveC([-g,1],C)],O=[-g,1,solveC([-g,1],T)];a=(i=__read([[D,$],[D,O],[k,$],[k,O]].map((function(t){var e=__read(t,2);return getIntersectionPointsByConstants(e[0],e[1])[0]})),4))[0],o=i[1],r=i[2],l=i[3],h=v[1]-v[0],c=f[1]-f[0]}else{var P=getMinPos(t,0),L=getMinPos(t,1),I=getMaxPos(t,0),A=getMaxPos(t,1);if(a=[P,L],o=[I,L],r=[P,A],l=[I,A],h=I-P,c=A-L,u%180)a=(n=__read([r,a,l,o],4))[0],o=n[1],r=n[2],l=n[3],h=A-L,c=I-P}u%360>180&&(a=(s=__read([l,r,o,a],4))[0],o=s[1],r=s[2],l=s[3]);var E=getMinMaxs([a,o,r,l]);return{pos1:a,pos2:o,pos3:r,pos4:l,width:h,height:c,minX:E.minX,minY:E.minY,maxX:E.maxX,maxY:E.maxY,rotation:e}}function findMoveableGroups(t,e){var i=e.map((function(e){if(isArray$1(e)){var i=findMoveableGroups(t,e),n=i.length;return n>1?i:1===n?i[0]:null}var s=find$2(t,(function(t){return t.manager.props.target===e}));return s?(s.finded=!0,s.manager):null})).filter(Boolean);return 1===i.length&&isArray$1(i[0])?i[0]:i}var MoveableGroup=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.differ=new ChildrenDiffer,e.moveables=[],e.transformOrigin="50% 50%",e.renderGroupRects=[],e._targetGroups=[],e._hasFirstTargets=!1,e}return __extends$2(e,t),e.prototype.componentDidMount=function(){t.prototype.componentDidMount.call(this)},e.prototype.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},e.prototype.getTargets=function(){return this.props.targets},e.prototype.updateRect=function(t,e,i){var n;void 0===i&&(i=!0);var s=this.state;if(this.controlBox&&!s.isPersisted){setStoreCache(!0),this.moveables.forEach((function(e){e.updateRect(t,!1,!1)}));var a=this.props,o=this.moveables,r=s.target||a.target,l=o.map((function(t){return{finded:!1,manager:t}})),h=this.props.targetGroups||[],c=findMoveableGroups(l,h),u=a.useDefaultGroupRotate;c.push.apply(c,__spreadArray$1([],__read(l.filter((function(t){return!t.finded})).map((function(t){return t.manager}))),!1));var d=[],p=!e||""!==t&&a.updateGroup,g=a.defaultGroupRotate||0;if(!this._hasFirstTargets){var f=null===(n=a.persistData)||void 0===n?void 0:n.rotation;null!=f&&(g=f)}var m=function t(e,i,n){var s=e.map((function(e){if(isArray$1(e)){var n=t(e,i),s=[n.pos1,n.pos2,n.pos3,n.pos4];return d.push(n),{poses:s,rotation:n.rotation}}return{poses:getAbsolutePosesByState(e.state),rotation:e.getRotation()}})),a=s.map((function(t){return t.rotation})),o=0,r=a[0],l=a.every((function(t){return Math.abs(r-t)<.1}));return o=p?!u&&l?r:g:u||n||!l?i:r,getGroupRect(s.map((function(t){return t.poses})),o)}(c,this.rotation,!0);p&&(this.rotation=m.rotation,this.transformOrigin=a.defaultGroupOrigin||"50% 50%",this.scale=[1,1]),this._targetGroups=h,this.renderGroupRects=d;var v=this.transformOrigin,b=this.rotation,y=this.scale,S=m.width,x=m.height,w=m.minX,C=m.minY,T=getMinMaxs(rotatePosesInfo([[0,0],[S,0],[0,x],[S,x]],convertTransformOriginArray(v,S,x),this.rotation/180*Math.PI).result),D=T.minX,k=T.minY,$=" rotate(".concat(b,"deg)")+" scale(".concat(sign(y[0]),", ").concat(sign(y[1]),")"),O="translate(".concat(-D,"px, ").concat(-k,"px)").concat($);this.controlBox.style.transform="translate3d(".concat(w,"px, ").concat(C,"px, ").concat(this.props.translateZ||0,")"),r.style.cssText+="left:0px;top:0px;"+"transform-origin:".concat(v,";")+"width:".concat(S,"px;height:").concat(x,"px;")+"transform: ".concat(O),s.width=S,s.height=x;var P=this.getContainer(),L=getMoveableTargetInfo(this.controlBox,r,this.controlBox,this.getContainer(),this._rootContainer||P,[]),I=[L.left,L.top],A=__read(getAbsolutePosesByState(L),4),E=A[0],G=A[1],U=A[2],F=A[3],M=getMinMaxs([E,G,U,F]),_=[M.minX,M.minY],N=sign(y[0]*y[1]);L.pos1=minus(E,_),L.pos2=minus(G,_),L.pos3=minus(U,_),L.pos4=minus(F,_),L.left=w-L.left+_[0],L.top=C-L.top+_[1],L.origin=minus(plus(I,L.origin),_),L.beforeOrigin=minus(plus(I,L.beforeOrigin),_),L.originalBeforeOrigin=plus(I,L.originalBeforeOrigin),L.transformOrigin=minus(plus(I,L.transformOrigin),_),r.style.transform="translate(".concat(-D-_[0],"px, ").concat(-k-_[1],"px)")+$,setStoreCache(),this.updateState(__assign$2(__assign$2({},L),{posDelta:_,direction:N,beforeDirection:N}),i)}},e.prototype.getRect=function(){return __assign$2(__assign$2({},t.prototype.getRect.call(this)),{children:this.moveables.map((function(t){return t.getRect()}))})},e.prototype.triggerEvent=function(e,i,n){if(n||e.indexOf("Group")>-1)return t.prototype.triggerEvent.call(this,e,i);this._emitter.trigger(e,i)},e.prototype.getRequestChildStyles=function(){return this.getEnabledAbles().reduce((function(t,e){var i,n,s=null!==(n=null===(i=e.requestChildStyle)||void 0===i?void 0:i.call(e))&&void 0!==n?n:[];return __spreadArray$1(__spreadArray$1([],__read(t),!1),__read(s),!1)}),[])},e.prototype.getMoveables=function(){return __spreadArray$1([],__read(this.moveables),!1)},e.prototype.updateAbles=function(){t.prototype.updateAbles.call(this,__spreadArray$1(__spreadArray$1([],__read(this.props.ables),!1),[Groupable],!1),"Group")},e.prototype._updateTargets=function(){t.prototype._updateTargets.call(this),this._originalDragTarget=this.props.dragTarget||this.areaElement,this._dragTarget=getRefTarget(this._originalDragTarget,!0)},e.prototype._updateEvents=function(){var t=this.state,e=this.props,i=this._prevDragTarget,n=e.dragTarget||this.areaElement,s=e.targets,a=this.differ.update(s),o=a.added,r=a.changed,l=a.removed,h=o.length||l.length;(h||this._prevOriginalDragTarget!==this._originalDragTarget)&&(unsetGesto(this,!1),unsetGesto(this,!0),this.updateState({gestos:{}})),i!==n&&(t.target=null),t.target||(t.target=this.areaElement,this.controlBox.style.display="block"),t.target&&(this.targetGesto||(this.targetGesto=getTargetAbleGesto(this,this._dragTarget,"Group")),this.controlGesto||(this.controlGesto=getControlAbleGesto(this,"GroupControl")));var c=!equals(t.container,e.container);c&&(t.container=e.container),(c||h||this.transformOrigin!==(e.defaultGroupOrigin||"50% 50%")||r.length||s.length&&!isDeepArrayEquals(this._targetGroups,e.targetGroups||[]))&&(this.updateRect(),this._hasFirstTargets=!0),this._isPropTargetChanged=!!h},e.prototype._updateObserver=function(){},e.defaultProps=__assign$2(__assign$2({},MoveableManager$1.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),e}(MoveableManager$1),MoveableIndividualGroup=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.moveables=[],e}return __extends$2(e,t),e.prototype.render=function(){var t,e=this,i=this.props,n=i.cspNonce,s=i.cssStyled,a=i.persistData,o=i.targets||[],r=o.length,l=this.isUnmounted||!r,h=null!==(t=null==a?void 0:a.children)&&void 0!==t?t:[];return l&&!r&&h.length?o=h.map((function(){return null})):l||(h=[]),createElement$1(s,{cspNonce:n,ref:ref(this,"controlBox"),className:prefix("control-box")},o.map((function(t,n){var s,a,o=null!==(a=null===(s=i.individualGroupableProps)||void 0===s?void 0:s.call(i,t,n))&&void 0!==a?a:{};return createElement$1(MoveableManager$1,__assign$2({key:"moveable"+n,ref:refs(e,"moveables",n)},i,o,{target:t,wrapperMoveable:e,isWrapperMounted:e.isMoveableMounted,persistData:h[n]}))})))},e.prototype.componentDidMount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.getTargets=function(){return this.props.targets},e.prototype.updateRect=function(t,e,i){void 0===i&&(i=!0),setStoreCache(!0),this.moveables.forEach((function(n){n.updateRect(t,e,i)})),setStoreCache()},e.prototype.getRect=function(){return __assign$2(__assign$2({},t.prototype.getRect.call(this)),{children:this.moveables.map((function(t){return t.getRect()}))})},e.prototype.request=function(t,e,i){void 0===e&&(e={});var n=this.moveables.map((function(i){return i.request(t,__assign$2(__assign$2({},e),{isInstant:!1}),!1)})),s={request:function(t){return n.forEach((function(e){return e.request(t)})),this},requestEnd:function(){return n.forEach((function(t){return t.requestEnd()})),this}};return i||e.isInstant?s.request(e).requestEnd():s},e.prototype.dragStart=function(t,e){void 0===e&&(e=t.target);var i=e,n=find$2(this.moveables,(function(t){var e=t.getTargets()[0],n=t.getControlBoxElement(),s=t.getDragElement();return!(!e||!s)&&(s===i||s.contains(i)||s!==e&&e===i||e.contains(i)||n===i||n.contains(i))}));return n&&n.dragStart(t,e),this},e.prototype.hitTest=function(){return 0},e.prototype.isInside=function(){return!1},e.prototype.isDragging=function(){return!1},e.prototype.getDragElement=function(){return null},e.prototype.getMoveables=function(){return __spreadArray$1([],__read(this.moveables),!1)},e.prototype.updateRenderPoses=function(){},e.prototype.checkUpdate=function(){},e.prototype.triggerEvent=function(){},e.prototype.updateAbles=function(){},e.prototype._updateEvents=function(){},e.prototype._updateObserver=function(){},e}(MoveableManager$1);function getElementTargets(t,e){var i=[];return t.forEach((function(t){t&&(isString$1(t)?e[t]&&i.push.apply(i,__spreadArray$1([],__read(e[t]),!1)):isArray$1(t)?i.push.apply(i,__spreadArray$1([],__read(getElementTargets(t,e)),!1)):i.push(t))})),i}function getTargetGroups(t,e){var i=[];return t.forEach((function(t){t&&(isString$1(t)?e[t]&&i.push.apply(i,__spreadArray$1([],__read(e[t]),!1)):isArray$1(t)?i.push(getTargetGroups(t,e)):i.push(t))})),i}function compareRefTargets(t,e){return t.length!==e.length||t.some((function(t,i){var n=e[i];return!(!t&&!n)&&(t!=n&&(!isArray$1(t)||!isArray$1(n)||compareRefTargets(t,n)))}))}var InitialMoveable=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.refTargets=[],e.selectorMap={},e._differ=new ChildrenDiffer,e._elementTargets=[],e._tmpRefTargets=[],e._tmpSelectorMap={},e._onChangeTargets=null,e}return __extends$2(e,t),e.makeStyled=function(){var t={};this.getTotalAbles().forEach((function(e){var i=e.css;i&&i.forEach((function(e){t[e]=!0}))}));var e=getKeys(t).join("\n");this.defaultStyled=styled("div",prefixCSS(PREFIX,MOVEABLE_CSS+e))},e.getTotalAbles=function(){return __spreadArray$1([Default,Groupable,IndividualGroupable,DragArea],__read(this.defaultAbles),!1)},e.prototype.render=function(){var t,e=this.constructor;e.defaultStyled||e.makeStyled();var i=this.props,n=i.ables,s=i.props,a=__rest(i,["ables","props"]),o=__read(this._updateRefs(!0),2),r=o[0],l=o[1],h=getElementTargets(r,l),c=h.length>1,u=__spreadArray$1(__spreadArray$1([],__read(e.getTotalAbles()),!1),__read(n||[]),!1),d=__assign$2(__assign$2(__assign$2({},a),s||{}),{ables:u,cssStyled:e.defaultStyled,customStyledMap:e.customStyledMap});this._elementTargets=h;var p=null,g=this.moveable,f=a.persistData;if((null==f?void 0:f.children)&&(c=!0),a.individualGroupable)return createElement$1(MoveableIndividualGroup,__assign$2({key:"individual-group",ref:ref(this,"moveable")},d,{target:null,targets:h}));if(c){var m=getTargetGroups(r,l);if(g&&!g.props.groupable&&!g.props.individualGroupable){var v=g.props.target;v&&h.indexOf(v)>-1&&(p=__assign$2({},g.state))}return createElement$1(MoveableGroup,__assign$2({key:"group",ref:ref(this,"moveable")},d,null!==(t=a.groupableProps)&&void 0!==t?t:{},{target:null,targets:h,targetGroups:m,firstRenderState:p}))}var b=h[0];if(g&&(g.props.groupable||g.props.individualGroupable)){var y=find$2(g.moveables||[],(function(t){return t.props.target===b}));y&&(p=__assign$2({},y.state))}return createElement$1(MoveableManager$1,__assign$2({key:"single",ref:ref(this,"moveable")},d,{target:b,firstRenderState:p}))},e.prototype.componentDidMount=function(){this._checkChangeTargets()},e.prototype.componentDidUpdate=function(){this._checkChangeTargets()},e.prototype.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},e.prototype.getTargets=function(){var t,e;return null!==(e=null===(t=this.moveable)||void 0===t?void 0:t.getTargets())&&void 0!==e?e:[]},e.prototype.updateSelectors=function(){this.selectorMap={},this._updateRefs(),this.forceUpdate()},e.prototype.waitToChangeTarget=function(){var t,e=this;return this._onChangeTargets=function(){e._onChangeTargets=null,t()},new Promise((function(e){t=e}))},e.prototype.waitToChangeTargets=function(){return this.waitToChangeTarget()},e.prototype.getManager=function(){return this.moveable},e.prototype.getMoveables=function(){return this.moveable.getMoveables()},e.prototype.getDragElement=function(){return this.moveable.getDragElement()},e.prototype._updateRefs=function(t){var e=this.refTargets,i=getRefTargets(this.props.target||this.props.targets),n="undefined"!=typeof document,s=compareRefTargets(e,i),a=this.selectorMap,o={};return this.refTargets.forEach((function t(e){isString$1(e)?a[e]?o[e]=a[e]:n&&(s=!0,o[e]=[].slice.call(document.querySelectorAll(e))):isArray$1(e)&&e.forEach(t)})),this._tmpRefTargets=i,this._tmpSelectorMap=o,[i,o,!t&&s]},e.prototype._checkChangeTargets=function(){var t,e,i;this.refTargets=this._tmpRefTargets,this.selectorMap=this._tmpSelectorMap;var n=this._differ.update(this._elementTargets),s=n.added,a=n.removed;(s.length||a.length)&&(null===(e=(t=this.props).onChangeTargets)||void 0===e||e.call(t,{moveable:this.moveable,targets:this._elementTargets}),null===(i=this._onChangeTargets)||void 0===i||i.call(this));var o=__read(this._updateRefs(),3),r=o[0],l=o[1],h=o[2];this.refTargets=r,this.selectorMap=l,h&&this.forceUpdate()},e.defaultAbles=[],e.customStyledMap={},e.defaultStyled=null,__decorate$1([withMethods(MOVEABLE_METHODS)],e.prototype,"moveable",void 0),e}(PureComponent),Moveable$1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$2(e,t),e.defaultAbles=MOVEABLE_ABLES,e}(InitialMoveable),extendStatics$1=function(t,e){return(extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function __extends$1(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics$1(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var __assign$1=function(){return __assign$1=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign$1.apply(this,arguments)};function __decorate(t,e,i,n){var s,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(o=(a<3?s(o):a>3?s(e,i,o):s(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}var InnerMoveable=function(t){function e(e){var i=t.call(this,e)||this;return i.state={},i.state=i.props,i}return __extends$1(e,t),e.prototype.render=function(){return createElement$1(Moveable$1,__assign$1({ref:ref(this,"moveable")},this.state))},e}(Component),PROPERTIES=MOVEABLE_PROPS,METHODS=MOVEABLE_METHODS,EVENTS=MOVEABLE_EVENTS,MoveableManager=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this)||this;n.containerProvider=null,n.selfElement=null,n._warp=!1;var s,a=__assign$1({},i),o={};EVENTS.forEach((function(t){o[camelize("on ".concat(t))]=function(e){return n.trigger(t,e)}})),i.warpSelf?(delete i.warpSelf,n._warp=!0,s=e):(s=getDocument(e).createElement("div"),e.appendChild(s)),n.containerProvider=renderSelf(createElement$1(InnerMoveable,__assign$1({ref:ref(n,"innerMoveable")},a,o)),s),n.selfElement=s;var r=a.target;return isArray$1(r)&&r.length>1&&n.updateRect(),n}__extends$1(e,t);var i=e.prototype;return i.setState=function(t,e){this.innerMoveable.setState(t,e)},i.forceUpdate=function(t){this.innerMoveable.forceUpdate(t)},i.dragStart=function(t,e){void 0===e&&(e=t.target),this.innerMoveable.$_timer&&this.forceUpdate(),this.getMoveable().dragStart(t,e)},i.destroy=function(){var t,e=this.selfElement;renderSelf(null,e,this.containerProvider),this._warp||null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(e),this.containerProvider=null,this.off(),this.selfElement=null,this.innerMoveable=null},i.getMoveable=function(){return this.innerMoveable.moveable},e=__decorate([Properties(METHODS,(function(t,e){t[e]||(t[e]=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=this.getMoveable();if(n&&n[e])return n[e].apply(n,t)})})),Properties(PROPERTIES,(function(t,e){Object.defineProperty(t,e,{get:function(){return this.getMoveable().props[e]},set:function(t){var i;this.setState(((i={})[e]=t,i))},enumerable:!0,configurable:!0})}))],e),e}(EventEmitter$1),Moveable=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends$1(e,t),e}(MoveableManager);function getElementInfo$1(t,e,i){return getElementInfo$2(t,e,i)}class IdxUtils{static setDependencies(t,e,i){IdxUtils.webClient=t,IdxUtils.deviceOpt=e,IdxUtils.wsClient=i}static getLinkedEntries(){return 0===appState.value.items.length?[]:toRaw(appState.value).items.filter((t=>t.t3Entry))}static refreshMoveableGuides(){appState.value.elementGuidelines=[];const t=document.querySelectorAll(`.moveable-item-wrapper:not(moveable-item-index-${appState.value.activeItemIndex}) .moveable-item`);Array.from(t).forEach((function(t){appState.value.elementGuidelines.push(t)}))}static getEntryRange(t){if(null==t?void 0:t.range){const e=t.type.toLowerCase();let i=t.digital_analog?ranges.analog[e].find((e=>e.id===t.range)):ranges.digital.find((e=>e.id===t.range));if(!i){const e=T3000_Data.value.panelsRanges.filter((e=>e.pid===t.pid));i=t.digital_analog?e.find((e=>"analog"===e.type&&e.index===t.range)):e.find((e=>"digital"===e.type&&e.index===t.range)),!i&&t.range>100&&(i=e.find((e=>"MSV"===e.type&&e.index===t.range)))}if(i)return i}return{label:"Unused",unit:""}}static getObjectActiveValue(t){var e,i,n,s;let a=!1;if(!t.t3Entry||void 0===(null==(e=t.settings)?void 0:e.active))return!1;if("OUTPUT"===t.t3Entry.type&&1===t.t3Entry.hw_switch_status)a=!!t.t3Entry.hw_switch_status;else if(t.t3Entry.range){const e=t.t3Entry.digital_analog,o=IdxUtils.getEntryRange(t.t3Entry);o&&(a=!!(!e&&(1===(null==(i=t.t3Entry)?void 0:i.control)&&!o.direct||0===(null==(n=t.t3Entry)?void 0:n.control)&&o.direct)||e&&(null==(s=t.t3Entry)?void 0:s.value)>0))}else"PROGRAM"===t.t3Entry.type?a=!!t.t3Entry.status:"SCHEDULE"===t.t3Entry.type?a=!!t.t3Entry.output:"HOLIDAY"===t.t3Entry.type&&(a=!!t.t3Entry.value);return a}static refreshLinkedEntries(t){t.find((t=>"TRL11111"===t.label)),appState.value.items.filter((t=>{var e;return null==(e=t.t3Entry)?void 0:e.type})).forEach(((e,i)=>{const n=t.find((t=>t.index===e.t3Entry.index&&t.type===e.t3Entry.type&&t.pid===e.t3Entry.pid));if(n&&n.id){n.value;let t=n.value>=1e3?n.value/1e3:n.value;n.value=t,e.t3Entry=n,IdxUtils.refreshObjectStatus(e)}}))}static refreshLinkedEntries2(t){appStateV2.value.items.filter((t=>{var e;return null==(e=t.t3Entry)?void 0:e.type})).forEach((e=>{const i=t.find((t=>t.index===e.t3Entry.index&&t.type===e.t3Entry.type&&t.pid===e.t3Entry.pid));if(i&&i.id){let t=i.value>=1e3?i.value/1e3:i.value;i.value=t,e.t3Entry=i,IdxUtils.refreshObjectStatus(e)}}))}static refreshObjectStatus(t){var e,i;t.t3Entry&&void 0!==(null==(e=t.settings)?void 0:e.active)&&(t.settings.active=IdxUtils.getObjectActiveValue(t)),t.t3Entry&&void 0!==t.t3Entry.decom&&void 0!==(null==(i=t.settings)?void 0:i.inAlarm)&&(t.settings.inAlarm=!!t.t3Entry.decom)}static saveLib(){const t=toRaw(library.value.images.filter((t=>!t.online))),e=toRaw(library.value.objLib.filter((t=>!t.online)));if(isBuiltInEdge.value)IdxUtils.webClient.SaveLibraryData(null,null,{...toRaw(library.value),images:t,objLib:e});else{const i=IdxUtils.deviceOpt.getCurrentDevice(),n=null==i?void 0:i.panelId,s=null==i?void 0:i.graphicId;IdxUtils.wsClient.SaveLibraryData(n,s,{...toRaw(library.value),images:t,objLib:e})}}static saveNewLib(){const t=toRaw(library.value.images.filter((t=>!t.online))),e=toRaw(library.value.objLib.filter((t=>!t.online)));if(isBuiltInEdge.value)IdxUtils.webClient.SaveNewLibraryData(null,null,{...toRaw(library.value),images:t,objLib:e});else{const i=IdxUtils.deviceOpt.getCurrentDevice(),n=null==i?void 0:i.panelId,s=null==i?void 0:i.graphicId;IdxUtils.wsClient.SaveNewLibraryData(n,s,{...toRaw(library.value),images:t,objLib:e})}}static saveGraphicData(t,e){var i;if(!0===(null==(i=t.data)?void 0:i.status)){if(!savedNotify.value)return;LogUtil.Debug("= IdxUtils Saved successfully."),Hvac.DeviceOpt.refreshCurrentDevice(),Hvac.DeviceOpt.refreshCurrentDeviceCount()}else e.notify({message:"Error, not saved!",color:"negative",icon:"error",actions:[{label:"Dismiss",color:"white",handler:()=>{}}]})}static getUnitText(t){var e;const i=IdxUtils.getEntryRange(t);let n="";if(t.range>100){const s=null==(e=i.options)?void 0:e.find((e=>e.value===t.value));n=(null==s?void 0:s.name)||""}else 1===t.digital_analog?n=(null==i?void 0:i.unit)||"":0===t.digital_analog&&(n=t.control?(null==i?void 0:i.on)||"":(null==i?void 0:i.off)||"");return n}}var Duct_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$v=defineComponent({name:"DuctEl",props:{bgColor:{type:String,default:"#808080"}},setup(){const t=ref$1(null),e=ref$1(null),i=ref$1(!0),n=ref$1(!0);function s(t){const{left:e,top:i,pos1:n,pos2:s,pos3:a,pos4:o}=t;return[n,s,o,a].map((t=>[e+t[0],i+t[1]]))}function a(t){const e=t.closest(".moveable-item.Duct"),i=getElementInfo$1(t),n=document.querySelectorAll(".moveable-item.Duct");for(const a of Array.from(n)){if(e.isSameNode(a))continue;const t=getElementInfo$1(a);if(getOverlapSize$1(s(i),s(t))>0)return!0}return!1}function o(){t.value&&e.value&&(i.value=!a(t.value),n.value=!a(e.value))}return onMounted((()=>{o()})),{startElRef:t,endElRef:e,isOverlap:a,showStart:i,showEnd:n,refresh:o}}}),__injectCSSVars__$v=()=>{useCssVars((t=>({"73d6a12b":t.bgColor})))},__setup__$v=__default__$v.setup;__default__$v.setup=__setup__$v?(t,e)=>(__injectCSSVars__$v(),__setup__$v(t,e)):__injectCSSVars__$v;const _sfc_main$A=__default__$v,_hoisted_1$m={class:"duct flex flex-nowrap w-full h-full"},_hoisted_2$7={key:0,viewBox:"0 0 50 100",preserveAspectRatio:"none",width:"100%",height:"100%"},_hoisted_3$4={key:1,class:"w-full h-full"},_hoisted_4$3={key:0,viewBox:"0 0 50 100",preserveAspectRatio:"none",width:"100%",height:"100%"},_hoisted_5$2={key:1,class:"w-full h-full"};function _sfc_render$y(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$m,[createBaseVNode("div",{class:normalizeClass(["duct-start",{shown:t.showStart}]),ref:"startElRef"},[t.showStart?(openBlock(),createElementBlock("svg",_hoisted_2$7,[...e[0]||(e[0]=[createBaseVNode("path",{d:"M 0 0 L 0 100 L 50 100 L 1 50 L 50 0 L 0 0 Z",transform:"matrix(-1,0,0,1,50,0)"},null,-1)])])):(openBlock(),createElementBlock("div",_hoisted_3$4))],2),e[2]||(e[2]=createBaseVNode("div",{class:"duct-body grow"},null,-1)),createBaseVNode("div",{class:normalizeClass(["duct-end",{shown:t.showEnd}]),ref:"endElRef"},[t.showEnd?(openBlock(),createElementBlock("svg",_hoisted_4$3,[...e[1]||(e[1]=[createBaseVNode("polygon",{points:"50 0, 50 100, 0 50",transform:"matrix(-1,0,0,1,50,0)"},null,-1)])])):(openBlock(),createElementBlock("div",_hoisted_5$2))],2)])}var DuctEl=_export_sfc(_sfc_main$A,[["render",_sfc_render$y],["__scopeId","data-v-a6036fa6"]]),Fan_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$u=defineComponent({name:"FanEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$u=()=>{useCssVars((t=>({fcd46a10:t.fillColor})))},__setup__$u=__default__$u.setup;__default__$u.setup=__setup__$u?(t,e)=>(__injectCSSVars__$u(),__setup__$u(t,e)):__injectCSSVars__$u;const _sfc_main$z=__default__$u;function _sfc_render$x(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{height:"100%",width:"100%",viewBox:"0 0 32 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g fill="currentColor" transform="matrix(1, 0, 0, 1, -0.231, -4.151388)" data-v-7aa1460f><g class="fan" data-v-7aa1460f><g id="g8" data-v-7aa1460f><path class="fan-background" d="m12.297 5.154c-6.117 0-11.066 4.9492-11.066 11.066 0 6.117 4.9492 11.066 11.066 11.066 5.7137 0 10.408-4.3091 11.003-9.8647h7.525v-12.268h-18.148c-0.12601-0.0043-0.25236 0-0.37941 0z" fill-rule="evenodd" stroke="#000" stroke-width="1px" fill="inherit" data-v-7aa1460f></path></g><g id="g4148" transform="translate(12.464 16.395)" data-v-7aa1460f><g id="g4162" stroke="#000" stroke-width="1.5" fill="none" class="rotating-middle" data-v-7aa1460f><path id="use3009" d="m-1.8112-3.9787 3.6227-4.4971" data-v-7aa1460f></path><path id="use3011" d="m0.87376-4.2835 5.5741-1.5089" data-v-7aa1460f></path><path id="use3013" d="m3.2243-2.9521 5.3965 2.0557" data-v-7aa1460f></path><path id="use3015" d="m4.3433-0.4935 3.1575 4.835" data-v-7aa1460f></path><path id="use3017" d="m3.8043 2.1547-0.28747 5.7676" data-v-7aa1460f></path><path id="use3019" d="m1.8113 3.9787-3.6227 4.4971" data-v-7aa1460f></path><path id="use3021" d="m-0.87324 4.2837-5.5741 1.5089" data-v-7aa1460f></path><path id="use3023" d="m-3.2242 2.9527-5.3965-2.0559" data-v-7aa1460f></path><path id="use3025" d="m-4.3432 0.4935-3.158-4.8353" data-v-7aa1460f></path><path id="use3027" d="m-3.8032-2.1541 0.2875-5.7676" data-v-7aa1460f></path></g></g></g></g>',1)])],2)}var FanEl=_export_sfc(_sfc_main$z,[["render",_sfc_render$x],["__scopeId","data-v-7aa1460f"]]),CoolingCoil_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$t=defineComponent({name:"CoolingCoil",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$t=()=>{useCssVars((t=>({"2abd0c01":t.fillColor})))},__setup__$t=__default__$t.setup;__default__$t.setup=__setup__$t?(t,e)=>(__injectCSSVars__$t(),__setup__$t(t,e)):__injectCSSVars__$t;const _sfc_main$y=__default__$t;function _sfc_render$w(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 20 29",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g stroke="#000" transform="matrix(1, 0, 0, 1, -6.058399, -1.3729)" data-v-6c5692ce><rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="currentColor" data-v-6c5692ce></rect><g transform="translate(24.9334,29.6232) rotate(180)" data-v-6c5692ce><rect id="rect4367" class="cooling-coil" height="27.246" width="17.875" x="0" y="0" fill="currentColor" stroke="none" data-v-6c5692ce></rect></g><rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="none" data-v-6c5692ce></rect><path id="path3001" d="m7.322 2.3729 17.424 27.254" stroke-width="1px" fill="none" data-v-6c5692ce></path><path id="path3003" d="m24.929 2.3734-17.642 27.182" stroke-width="1px" fill="none" data-v-6c5692ce></path></g>',1)])],2)}var CoolingCoil=_export_sfc(_sfc_main$y,[["render",_sfc_render$w],["__scopeId","data-v-6c5692ce"]]),HeatingCoil_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$s=defineComponent({name:"HeatingCoil",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$s=()=>{useCssVars((t=>({"0ffcafe5":t.fillColor})))},__setup__$s=__default__$s.setup;__default__$s.setup=__setup__$s?(t,e)=>(__injectCSSVars__$s(),__setup__$s(t,e)):__injectCSSVars__$s;const _sfc_main$x=__default__$s;function _sfc_render$v(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 19.526541 28.758413",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<defs id="defs3" data-v-56639afe><rect id="heating-coil-rect" height="27.246" width="17.868" x="0" y="0" data-v-56639afe></rect></defs><g stroke="#000000" id="g15" transform="translate(-6.129206,-1.5327875)" data-v-56639afe><use xlink:href="#heating-coil-rect" fill="currentColor" stroke="none" x="7.066" y="2.3771999" id="use6" data-v-56639afe></use><g transform="rotate(180,12.4667,14.8116)" id="g10" data-v-56639afe><use xlink:href="#heating-coil-rect" class="heating-coil" x="0" y="0" fill="currentColor" stroke="none" id="use8" data-v-56639afe></use></g><use xlink:href="#heating-coil-rect" stroke-width="1" fill="none" x="7.066" y="2.3771999" id="use12" data-v-56639afe></use><path id="path3003" stroke-linejoin="miter" d="M 24.929,2.3734 7.2868,29.555" stroke="#000000" stroke-linecap="butt" stroke-width="1px" fill="none" data-v-56639afe></path></g>',2)])],2)}var HeatingCoil=_export_sfc(_sfc_main$x,[["render",_sfc_render$v],["__scopeId","data-v-56639afe"]]),Filter_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$r=defineComponent({name:"FilterEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$r=()=>{useCssVars((t=>({"5b055973":t.fillColor})))},__setup__$r=__default__$r.setup;__default__$r.setup=__setup__$r?(t,e)=>(__injectCSSVars__$r(),__setup__$r(t,e)):__injectCSSVars__$r;const _sfc_main$w=__default__$r,_hoisted_1$l={viewBox:"0 0 13 29",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:"object-svg"};function _sfc_render$u(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$l,[...e[0]||(e[0]=[createBaseVNode("g",{stroke:"#000","stroke-width":"1",transform:"matrix(1, 0, 0, 1, -9.37, -1.3252)"},[createBaseVNode("rect",{id:"rect4367",height:"27.35",width:"11.26",y:"2.3252",x:"10.37",fill:"currentColor"}),createBaseVNode("path",{id:"path3756","stroke-linejoin":"miter",d:"m11.892,2.6997,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334","stroke-linecap":"round","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-width":"1.2694304",fill:"none"})],-1)])])}var FilterEl=_export_sfc(_sfc_main$w,[["render",_sfc_render$u],["__scopeId","data-v-7a65e036"]]),Humidifier_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$q=defineComponent({name:"HumidifierEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$q=()=>{useCssVars((t=>({"060de3b0":t.fillColor})))},__setup__$q=__default__$q.setup;__default__$q.setup=__setup__$q?(t,e)=>(__injectCSSVars__$q(),__setup__$q(t,e)):__injectCSSVars__$q;const _sfc_main$v=__default__$q;function _sfc_render$t(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 18 25",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com",class:normalizeClass(["object-svg",{inactive:!t.active,active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g class="duct-humidifier" transform="matrix(1, 0, 0, 1, -3.324199, -7.877)" data-v-73e63c16><g id="g11" transform="translate(0 5.1505)" data-v-73e63c16><g id="g13" stroke="#000" stroke-width=".5" class="water-drops" fill="#00f0ff" data-v-73e63c16><path id="path4150" d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-73e63c16></path><g id="g4236" transform="translate(0 .17167)" data-v-73e63c16><path id="path4150-7" d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-73e63c16></path><path id="path4150-7-1" d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-73e63c16></path></g></g><g id="g19" transform="translate(0,8)" data-v-73e63c16><g id="g21" stroke="#000" stroke-width=".5" class="water-drops water-drops-2" fill="#00f0ff" data-v-73e63c16><path id="path23" d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-73e63c16></path><g id="g25" transform="translate(0 .17167)" data-v-73e63c16><path id="path27" d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-73e63c16></path><path id="path29" d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" data-v-73e63c16></path></g></g></g></g><path id="rect4136-6" class="humidifier-body" d="m4.3242 8.877v22.586h4.0059v-9.883h4.3789v-2.617h-4.3789v-5.721h4.3789v-2.617h-4.3789v-1.748h-4.0059z" stroke="#000" fill="currentColor" data-v-73e63c16></path></g>',1)])],2)}var HumidifierEl=_export_sfc(_sfc_main$v,[["render",_sfc_render$t],["__scopeId","data-v-73e63c16"]]),Damper_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$p=defineComponent({name:"DamperEl",props:{item:{type:Object,required:!1},active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$p=()=>{useCssVars((t=>({"50bc3bab":t.fillColor})))},__setup__$p=__default__$p.setup;__default__$p.setup=__setup__$p?(t,e)=>(__injectCSSVars__$p(),__setup__$p(t,e)):__injectCSSVars__$p;const _sfc_main$u=__default__$p;function _sfc_render$s(t,e,i,n,s,a){var o,r,l,h,c;return openBlock(),createElementBlock("svg",{viewBox:"0 0 13.431694 28.950886",height:"100%",width:"100%",version:"1.1",xmlns:"http://www.w3.org/2000/svg",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm,"range-analog":null==(r=null==(o=t.item)?void 0:o.t3Entry)?void 0:r.digital_analog,"range-digital":(null==(l=t.item)?void 0:l.t3Entry)&&!(null==(c=null==(h=t.item)?void 0:h.t3Entry)?void 0:c.digital_analog)}])},[...e[0]||(e[0]=[createStaticVNode('<rect class="damper" height="27.5" width="12" stroke="#000000" stroke-miterlimit="4" x="0.69481522" y="0.67645228" stroke-dasharray="none" stroke-width="1" fill="currentColor" data-v-0213ed95></rect><g stroke="#000000" stroke-width="1.5px" transform="translate(-9.3051848,-1.5735477)" data-v-0213ed95><g transform="translate(16,7)" data-v-0213ed95><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-0213ed95></line></g><g transform="translate(16,13)" data-v-0213ed95><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-0213ed95></line></g><g transform="translate(16,19)" data-v-0213ed95><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-0213ed95></line></g><g transform="translate(16,25)" data-v-0213ed95><line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" data-v-0213ed95></line></g></g><g stroke-linejoin="miter" transform="matrix(1.2268237,0,0,0.94845469,-13.299764,-1.1862851)" stroke="#000000" stroke-linecap="butt" fill="none" data-v-0213ed95><path stroke-width="1.06273px" d="m 16.298,2.2402 v 28.442" data-v-0213ed95></path></g>',3)])],2)}var Damper=_export_sfc(_sfc_main$u,[["render",_sfc_render$s],["__scopeId","data-v-0213ed95"]]),Text_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$t=defineComponent({name:"TextEl",props:{text:{type:String,default:"Text element"},fontSize:{type:Number,default:16},textColor:{type:String,default:"black"},textAlign:{type:String,default:"left"}},setup:()=>({})});function _sfc_render$r(t,e,i,n,s,a){return openBlock(),createElementBlock("div",{class:"text-el",style:normalizeStyle$1(`font-size: ${t.fontSize}px; color: ${t.textColor}; text-align: ${t.textAlign} ; white-space: pre-wrap;`)},toDisplayString(t.text),5)}var TextEl=_export_sfc(_sfc_main$t,[["render",_sfc_render$r],["__scopeId","data-v-43785680"]]),Box_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$o=defineComponent({name:"BoxEl",props:{bgColor:{type:String,default:"black"}},setup:()=>({})}),__injectCSSVars__$o=()=>{useCssVars((t=>({"3b0a3304":t.bgColor})))},__setup__$o=__default__$o.setup;__default__$o.setup=__setup__$o?(t,e)=>(__injectCSSVars__$o(),__setup__$o(t,e)):__injectCSSVars__$o;const _sfc_main$s=__default__$o,_hoisted_1$k={class:"box-element"};function _sfc_render$q(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$k)}var BoxEl=_export_sfc(_sfc_main$s,[["render",_sfc_render$q],["__scopeId","data-v-de1a47b2"]]),IconBasic_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$n=defineComponent({name:"IconValue",props:{item:{type:Object},active:{type:Boolean,default:!1},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"image"},textAlign:{type:String,default:"left"}},setup:()=>({})}),__injectCSSVars__$n=()=>{useCssVars((t=>({d8cb71c8:t.offColor,"39dabfdc":t.onColor})))},__setup__$n=__default__$n.setup;__default__$n.setup=__setup__$n?(t,e)=>(__injectCSSVars__$n(),__setup__$n(t,e)):__injectCSSVars__$n;const _sfc_main$r=__default__$n,_hoisted_1$j=["xlink:href"];function _sfc_render$p(t,e,i,n,s,a){return t.icon?(openBlock(),createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",height:"100%",viewBox:"0 0 24 24",width:"100%",class:normalizeClass([{active:t.active},"icon-svg"])},[createBaseVNode("use",{class:"icon","xlink:href":`icons.svg#${t.icon}`},null,8,_hoisted_1$j)],2)):createCommentVNode("",!0)}var IconBasic=_export_sfc(_sfc_main$r,[["render",_sfc_render$p],["__scopeId","data-v-98426270"]]),IconValue_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$m=defineComponent({name:"IconValue",props:{item:{type:Object},active:{type:Boolean,default:!1},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"image"},textAlign:{type:String,default:"left"}},setup:()=>({})}),__injectCSSVars__$m=()=>{useCssVars((t=>({eddd0144:t.offColor,d74b114c:t.onColor})))},__setup__$m=__default__$m.setup;__default__$m.setup=__setup__$m?(t,e)=>(__injectCSSVars__$m(),__setup__$m(t,e)):__injectCSSVars__$m;const _sfc_main$q=__default__$m,_hoisted_1$i=["xlink:href"];function _sfc_render$o(t,e,i,n,s,a){return t.icon?(openBlock(),createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",height:"100%",viewBox:"0 0 24 24",width:"100%",class:normalizeClass([{active:t.active},"icon-svg"])},[createBaseVNode("use",{class:"icon","xlink:href":`icons.svg#${t.icon}`},null,8,_hoisted_1$i)],2)):createCommentVNode("",!0)}var IconValue=_export_sfc(_sfc_main$q,[["render",_sfc_render$o],["__scopeId","data-v-53716365"]]),IconSwitch_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$l=defineComponent({name:"IconSwitch",props:{item:{type:Object},active:{type:Boolean,default:!1},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"toggle_off"},textAlign:{type:String,default:"left"}},setup:t=>({switchIcon:computed((()=>{const e=switchIcons.find((e=>e.value===t.icon));return e?t.active?e.icon.on:e.icon.off:{}}))})}),__injectCSSVars__$l=()=>{useCssVars((t=>({"107fa257":t.offColor,"18e0dd7e":t.onColor})))},__setup__$l=__default__$l.setup;__default__$l.setup=__setup__$l?(t,e)=>(__injectCSSVars__$l(),__setup__$l(t,e)):__injectCSSVars__$l;const _sfc_main$p=__default__$l,_hoisted_1$h=["xlink:href"];function _sfc_render$n(t,e,i,n,s,a){return t.switchIcon?(openBlock(),createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",height:"100%",viewBox:"0 0 24 24",width:"100%",class:normalizeClass([{active:t.active},"icon-svg"])},[createBaseVNode("use",{class:"icon","xlink:href":`icons.svg#${t.switchIcon}`},null,8,_hoisted_1$h)],2)):createCommentVNode("",!0)}var IconSwitch=_export_sfc(_sfc_main$p,[["render",_sfc_render$n],["__scopeId","data-v-28ab506a"]]),Value_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$k=defineComponent({name:"ValueEl",props:{item:{type:Object,required:!0},textAlign:{type:String,default:"left"},showArrows:{type:Boolean,default:!1}},setup:t=>({dispalyText:computed((()=>{var e,i,n;if(!t.item.t3Entry||void 0===(null==(e=t.item.t3Entry)?void 0:e.value))return"";const s=IdxUtils.getEntryRange(null==(i=t.item)?void 0:i.t3Entry);if(t.item.t3Entry.range>100){const e=null==(n=s.options)?void 0:n.find((e=>e.value===t.item.t3Entry.value));return null==e?void 0:e.name}return 1===t.item.t3Entry.digital_analog?t.item.t3Entry.value+" "+s.unit:0===t.item.t3Entry.digital_analog?t.item.t3Entry.control?s.on:s.off:t.item.t3Entry.value||""}))})}),__injectCSSVars__$k=()=>{useCssVars((t=>({"0e95461e":t.textAlign})))},__setup__$k=__default__$k.setup;__default__$k.setup=__setup__$k?(t,e)=>(__injectCSSVars__$k(),__setup__$k(t,e)):__injectCSSVars__$k;const _sfc_main$o=__default__$k,_hoisted_1$g={class:"value-element relative flex flex-col flex-nowrap items-center"},_hoisted_2$6={class:"w-full"};function _sfc_render$m(t,e,i,n,s,a){var o,r;return openBlock(),createElementBlock("div",_hoisted_1$g,[t.showArrows?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(o=t.item.t3Entry)?void 0:o.auto_manual),onClick:e[0]||(e[0]=e=>t.$emit("changeValue","increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",_hoisted_2$6,toDisplayString(t.dispalyText),1),t.showArrows?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(r=t.item.t3Entry)?void 0:r.auto_manual),onClick:e[1]||(e[1]=e=>t.$emit("changeValue","decrease"))},null,8,["disable"])):createCommentVNode("",!0)])}var ValueEl=_export_sfc(_sfc_main$o,[["render",_sfc_render$m],["__scopeId","data-v-37db0ac4"]]),Temperature_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$j=defineComponent({name:"TemperatureEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$j=()=>{useCssVars((t=>({"46cf3850":t.fillColor})))},__setup__$j=__default__$j.setup;__default__$j.setup=__setup__$j?(t,e)=>(__injectCSSVars__$j(),__setup__$j(t,e)):__injectCSSVars__$j;const _sfc_main$n=__default__$j,_hoisted_1$f={height:"100%",width:"100%",version:"1.1",viewBox:"0 0 10.423067 22.852614",xmlns:"http://www.w3.org/2000/svg",class:"object-svg"};function _sfc_render$l(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$f,[...e[0]||(e[0]=[createStaticVNode('<g id="layer1" stroke="#000000" stroke-width="1px" transform="translate(-10.804626,-9.2243756)" data-v-d7d143fa><rect id="rect3012" height="14.505" width="2.901" y="9.9127998" x="14.557" fill="#ffff00" data-v-d7d143fa></rect><path id="path3010" stroke-width="1.2px" transform="matrix(0.74098,0,0,0.74098,7.3047,15.679)" fill="currentColor" d="m 17.949,15.898 -3.1021,5.373 H 8.6427 L 5.5406,15.898 8.6427,10.525 h 6.2042 z" data-v-d7d143fa></path></g><g id="g4141" transform="translate(-1.2033861,-8.1217684)" data-v-d7d143fa><circle r="0.77312505" cy="28.129852" cx="6.4061227" id="path4137" style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-d7d143fa></circle><path id="path4139" d="M 6.4061205,27.157211 V 23.65349" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-d7d143fa></path></g>',2)])])}var Temperature=_export_sfc(_sfc_main$n,[["render",_sfc_render$l],["__scopeId","data-v-d7d143fa"]]),extendStatics=function(t,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function __extends(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var Browser=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Env=function(){this.browser=new Browser,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window},env=new Env;function detect(t,e){var i=e.browser,n=t.match(/Firefox\/([\d.]+)/),s=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]),s&&(i.ie=!0,i.version=s[1]),a&&(i.edge=!0,i.version=a[1],i.newEdge=+a[1].split(".")[0]>18),o&&(i.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,e.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&+i.version>=11),e.domSupported="undefined"!=typeof document;var r=document.documentElement.style;e.transform3dSupported=(i.ie&&"transition"in r||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in r)&&!("OTransition"in r),e.transformSupported=e.transform3dSupported||i.ie&&+i.version>=9}"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(env.wxa=!0,env.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?env.worker=!0:!env.hasGlobalWindow||"Deno"in window?(env.node=!0,env.svgSupported=!0):detect(navigator.userAgent,env);var env$1=env,DEFAULT_FONT_SIZE=12,DEFAULT_FONT_FAMILY="sans-serif",DEFAULT_FONT=DEFAULT_FONT_SIZE+"px "+DEFAULT_FONT_FAMILY,OFFSET=20,SCALE=100,defaultWidthMapStr="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function getTextWidthMap(t){var e={};if("undefined"==typeof JSON)return e;for(var i=0;i<t.length;i++){var n=String.fromCharCode(i+32),s=(t.charCodeAt(i)-OFFSET)/SCALE;e[n]=s}return e}var DEFAULT_TEXT_WIDTH_MAP=getTextWidthMap(defaultWidthMapStr),platformApi={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){if(!_ctx){var i=platformApi.createCanvas();_ctx=i&&i.getContext("2d")}if(_ctx)return _cachedFont!==e&&(_cachedFont=_ctx.font=e||DEFAULT_FONT),_ctx.measureText(t);t=t||"";var n=/((?:\d+)?\.?\d*)px/.exec(e=e||DEFAULT_FONT),s=n&&+n[1]||DEFAULT_FONT_SIZE,a=0;if(e.indexOf("mono")>=0)a=s*t.length;else for(var o=0;o<t.length;o++){var r=DEFAULT_TEXT_WIDTH_MAP[t[o]];a+=null==r?s:r*s}return{width:a}},loadImage:function(t,e,i){var n=new Image;return n.onload=e,n.onerror=i,n.src=t,n}},_ctx,_cachedFont,BUILTIN_OBJECT=reduce(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),TYPED_ARRAY=reduce(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),objToString=Object.prototype.toString,arrayProto=Array.prototype,nativeForEach=arrayProto.forEach,nativeFilter=arrayProto.filter,nativeSlice=arrayProto.slice,nativeMap=arrayProto.map,ctorFunction=function(){}.constructor,protoFunction=ctorFunction?ctorFunction.prototype:null,protoKey="__proto__",idStart=2311;function guid(){return idStart++}function logError(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function clone$3(t){if(null==t||"object"!=typeof t)return t;var e=t,i=objToString.call(t);if("[object Array]"===i){if(!isPrimitive(t)){e=[];for(var n=0,s=t.length;n<s;n++)e[n]=clone$3(t[n])}}else if(TYPED_ARRAY[i]){if(!isPrimitive(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(n=0,s=t.length;n<s;n++)e[n]=t[n]}}}else if(!BUILTIN_OBJECT[i]&&!isPrimitive(t)&&!isDom(t))for(var o in e={},t)t.hasOwnProperty(o)&&o!==protoKey&&(e[o]=clone$3(t[o]));return e}function merge(t,e,i){if(!isObject$2(e)||!isObject$2(t))return i?clone$3(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==protoKey){var s=t[n],a=e[n];!isObject$2(a)||!isObject$2(s)||isArray(a)||isArray(s)||isDom(a)||isDom(s)||isBuiltInObject(a)||isBuiltInObject(s)||isPrimitive(a)||isPrimitive(s)?!i&&n in t||(t[n]=clone$3(e[n])):merge(s,a,i)}return t}function mergeAll(t,e){for(var i=t[0],n=1,s=t.length;n<s;n++)i=merge(i,t[n],e);return i}function extend(t,e){if(Object.assign)Object.assign(t,e);else for(var i in e)e.hasOwnProperty(i)&&i!==protoKey&&(t[i]=e[i]);return t}function defaults(t,e,i){for(var n=keys(e),s=0,a=n.length;s<a;s++){var o=n[s];(i?null!=e[o]:null==t[o])&&(t[o]=e[o])}return t}function indexOf(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function inherits(t,e){var i=t.prototype;function n(){}for(var s in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(s)&&(t.prototype[s]=i[s]);t.prototype.constructor=t,t.superClass=e}function mixin(t,e,i){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),s=0;s<n.length;s++){var a=n[s];"constructor"!==a&&(i?null!=e[a]:null==t[a])&&(t[a]=e[a])}else defaults(t,e,i)}function isArrayLike(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function each$4(t,e,i){if(t&&e)if(t.forEach&&t.forEach===nativeForEach)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,s=t.length;n<s;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function map$1(t,e,i){if(!t)return[];if(!e)return slice(t);if(t.map&&t.map===nativeMap)return t.map(e,i);for(var n=[],s=0,a=t.length;s<a;s++)n.push(e.call(i,t[s],s,t));return n}function reduce(t,e,i,n){if(t&&e){for(var s=0,a=t.length;s<a;s++)i=e.call(n,i,t[s],s,t);return i}}function filter(t,e,i){if(!t)return[];if(!e)return slice(t);if(t.filter&&t.filter===nativeFilter)return t.filter(e,i);for(var n=[],s=0,a=t.length;s<a;s++)e.call(i,t[s],s,t)&&n.push(t[s]);return n}function find(t,e,i){if(t&&e)for(var n=0,s=t.length;n<s;n++)if(e.call(i,t[n],n,t))return t[n]}function keys(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}function bindPolyfill(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return function(){return t.apply(e,i.concat(nativeSlice.call(arguments)))}}platformApi.createCanvas;var bind$1=protoFunction&&isFunction(protoFunction.bind)?protoFunction.call.bind(protoFunction.bind):bindPolyfill;function curry$1(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return function(){return t.apply(this,e.concat(nativeSlice.call(arguments)))}}function isArray(t){return Array.isArray?Array.isArray(t):"[object Array]"===objToString.call(t)}function isFunction(t){return"function"==typeof t}function isString(t){return"string"==typeof t}function isStringSafe(t){return"[object String]"===objToString.call(t)}function isNumber$1(t){return"number"==typeof t}function isObject$2(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function isBuiltInObject(t){return!!BUILTIN_OBJECT[objToString.call(t)]}function isTypedArray(t){return!!TYPED_ARRAY[objToString.call(t)]}function isDom(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function isGradientObject(t){return null!=t.colorStops}function isImagePatternObject(t){return null!=t.image}function isRegExp(t){return"[object RegExp]"===objToString.call(t)}function eqNaN(t){return t!=t}function retrieve(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,n=t.length;i<n;i++)if(null!=t[i])return t[i]}function retrieve2(t,e){return null!=t?t:e}function retrieve3(t,e,i){return null!=t?t:null!=e?e:i}function slice(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return nativeSlice.apply(t,e)}function normalizeCssArray$1(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function assert(t,e){if(!t)throw new Error(e)}function trim(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var primitiveKey="__ec_primitive__";function setAsPrimitive(t){t[primitiveKey]=!0}function isPrimitive(t){return t[primitiveKey]}var MapPolyfill=function(){function t(){this.data={}}return t.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e,this},t.prototype.keys=function(){return keys(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},t}(),isNativeMapSupported="function"==typeof Map;function maybeNativeMap(){return isNativeMapSupported?new Map:new MapPolyfill}var HashMap=function(){function t(e){var i=isArray(e);this.data=maybeNativeMap();var n=this;function s(t,e){i?n.set(t,e):n.set(e,t)}e instanceof t?e.each(s):e&&each$4(e,s)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,e){return this.data.set(t,e),e},t.prototype.each=function(t,e){this.data.forEach((function(i,n){t.call(e,i,n)}))},t.prototype.keys=function(){var t=this.data.keys();return isNativeMapSupported?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function createHashMap(t){return new HashMap(t)}function concatArray(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var s=t.length;for(n=0;n<e.length;n++)i[n+s]=e[n];return i}function createObject(t,e){var i;if(Object.create)i=Object.create(t);else{var n=function(){};n.prototype=t,i=new n}return e&&extend(i,e),i}function disableUserSelect(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function hasOwn(t,e){return t.hasOwnProperty(e)}function noop$3(){}var RADIAN_TO_DEGREE=180/Math.PI;function create$1(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function copy$1(t,e){return t[0]=e[0],t[1]=e[1],t}function clone$2(t){return[t[0],t[1]]}function set$1(t,e,i){return t[0]=e,t[1]=i,t}function add(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function scaleAndAdd(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function sub(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function len$1(t){return Math.sqrt(lenSquare(t))}function lenSquare(t){return t[0]*t[0]+t[1]*t[1]}function scale$2(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function normalize$1(t,e){var i=len$1(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function distance(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var dist$1=distance;function distanceSquare(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var distSquare=distanceSquare;function lerp$1(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function applyTransform$1(t,e,i){var n=e[0],s=e[1];return t[0]=i[0]*n+i[2]*s+i[4],t[1]=i[1]*n+i[3]*s+i[5],t}function min$1(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function max$1(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var Param=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},Draggable=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Param(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,s=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(s,a,t),this.handler.dispatchToElement(new Param(e,t),"drag",t.event);var o=this.handler.findHover(i,n,e).target,r=this._dropTarget;this._dropTarget=o,e!==o&&(r&&o!==r&&this.handler.dispatchToElement(new Param(r,t),"dragleave",t.event),o&&o!==r&&this.handler.dispatchToElement(new Param(o,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Param(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Param(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),Draggable$1=Draggable,Eventful=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var s=this._$handlers;if("function"==typeof e&&(n=i,i=e,e=null),!i||!t)return this;var a=this._$eventProcessor;null!=e&&a&&a.normalizeQuery&&(e=a.normalizeQuery(e)),s[t]||(s[t]=[]);for(var o=0;o<s[t].length;o++)if(s[t][o].h===i)return this;var r={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},l=s[t].length-1,h=s[t][l];return h&&h.callAtLast?s[t].splice(l,0,r):s[t].push(r),this},t.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},t.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],s=0,a=i[t].length;s<a;s++)i[t][s].h!==e&&n.push(i[t][s]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},t.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],s=this._$eventProcessor;if(n)for(var a=e.length,o=n.length,r=0;r<o;r++){var l=n[r];if(!s||!s.filter||null==l.query||s.filter(t,l.query))switch(a){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return s&&s.afterTrigger&&s.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],s=this._$eventProcessor;if(n)for(var a=e.length,o=e[a-1],r=n.length,l=0;l<r;l++){var h=n[l];if(!s||!s.filter||null==h.query||s.filter(t,h.query))switch(a){case 0:h.h.call(o);break;case 1:h.h.call(o,e[0]);break;case 2:h.h.call(o,e[0],e[1]);break;default:h.h.apply(o,e.slice(1,a-1))}}return s&&s.afterTrigger&&s.afterTrigger(t),this},t}(),Eventful$1=Eventful,LN2=Math.log(2);function determinant(t,e,i,n,s,a){var o=n+"-"+s,r=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var l=Math.round(Math.log((1<<r)-1&~s)/LN2);return t[i][l]}for(var h=n|1<<i,c=i+1;n&1<<c;)c++;for(var u=0,d=0,p=0;d<r;d++){var g=1<<d;g&s||(u+=(p%2?-1:1)*t[i][d]*determinant(t,e-1,c,h,s|g,a),p++)}return a[o]=u,u}function buildTransformer(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},s=determinant(i,8,0,0,0,n);if(0!==s){for(var a=[],o=0;o<8;o++)for(var r=0;r<8;r++)null==a[r]&&(a[r]=0),a[r]+=((o+r)%2?-1:1)*determinant(i,7,0===o?1:0,1<<o,1<<r,n)/s*e[o];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}var EVENT_SAVED_PROP="___zrEVENTSAVED",_calcOut$1=[];function transformLocalCoord(t,e,i,n,s){return transformCoordWithViewport(_calcOut$1,e,n,s,!0)&&transformCoordWithViewport(t,i,_calcOut$1[0],_calcOut$1[1])}function transformCoordWithViewport(t,e,i,n,s){if(e.getBoundingClientRect&&env$1.domSupported&&!isCanvasEl(e)){var a=e[EVENT_SAVED_PROP]||(e[EVENT_SAVED_PROP]={}),o=preparePointerTransformer(prepareCoordMarkers(e,a),a,s);if(o)return o(t,i,n),!0}return!1}function prepareCoordMarkers(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],s=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),r=a%2,l=(a>>1)%2;o.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[r]+":0",s[l]+":0",n[1-r]+":auto",s[1-l]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}function preparePointerTransformer(t,e,i){for(var n=i?"invTrans":"trans",s=e[n],a=e.srcCoords,o=[],r=[],l=!0,h=0;h<4;h++){var c=t[h].getBoundingClientRect(),u=2*h,d=c.left,p=c.top;o.push(d,p),l=l&&a&&d===a[u]&&p===a[u+1],r.push(t[h].offsetLeft,t[h].offsetTop)}return l&&s?s:(e.srcCoords=o,e[n]=i?buildTransformer(r,o):buildTransformer(o,r))}function isCanvasEl(t){return"CANVAS"===t.nodeName.toUpperCase()}var replaceReg=/([&<>"'])/g,replaceMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function encodeHTML(t){return null==t?"":(t+"").replace(replaceReg,(function(t,e){return replaceMap[e]}))}var MOUSE_EVENT_REG=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_calcOut=[],firefoxNotSupportOffsetXY=env$1.browser.firefox&&+env$1.browser.version.split(".")[0]<39;function clientToLocal(t,e,i,n){return i=i||{},n?calculateZrXY(t,e,i):firefoxNotSupportOffsetXY&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):calculateZrXY(t,e,i),i}function calculateZrXY(t,e,i){if(env$1.domSupported&&t.getBoundingClientRect){var n=e.clientX,s=e.clientY;if(isCanvasEl(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=s-a.top)}if(transformCoordWithViewport(_calcOut,t,n,s))return i.zrX=_calcOut[0],void(i.zrY=_calcOut[1])}i.zrX=i.zrY=0}function getNativeEvent(t){return t||window.event}function normalizeEvent(t,e,i){if(null!=(e=getNativeEvent(e)).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var s="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];s&&clientToLocal(t,s,e,i)}else{clientToLocal(t,e,e,i);var a=getWheelDeltaMayPolyfill(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var o=e.button;return null==e.which&&void 0!==o&&MOUSE_EVENT_REG.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function getWheelDeltaMayPolyfill(t){var e=t.wheelDelta;if(e)return e;var i=t.deltaX,n=t.deltaY;return null==i||null==n?e:3*(0!==n?Math.abs(n):Math.abs(i))*(n>0?-1:n<0?1:i>0?-1:1)}function addEventListener(t,e,i,n){t.addEventListener(e,i,n)}function removeEventListener(t,e,i,n){t.removeEventListener(e,i,n)}var stop=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function isMiddleOrRightButtonOnMouseUpDown(t){return 2===t.which||3===t.which}var GestureMgr=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var s={points:[],touches:[],target:e,event:t},a=0,o=n.length;a<o;a++){var r=n[a],l=clientToLocal(i,r,{});s.points.push([l.zrX,l.zrY]),s.touches.push(r)}this._track.push(s)}},t.prototype._recognize=function(t){for(var e in recognizers)if(recognizers.hasOwnProperty(e)){var i=recognizers[e](this._track,t);if(i)return i}},t}();function dist(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function center(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var recognizers={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,s=(t[i-2]||{}).points||n;if(s&&s.length>1&&n&&n.length>1){var a=dist(n)/dist(s);!isFinite(a)&&(a=1),e.pinchScale=a;var o=center(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function create(){return[1,0,0,1,0,0]}function identity(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function copy(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function mul(t,e,i){var n=e[0]*i[0]+e[2]*i[1],s=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],r=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=s,t[2]=a,t[3]=o,t[4]=r,t[5]=l,t}function translate(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function rotate(t,e,i,n){void 0===n&&(n=[0,0]);var s=e[0],a=e[2],o=e[4],r=e[1],l=e[3],h=e[5],c=Math.sin(i),u=Math.cos(i);return t[0]=s*u+r*c,t[1]=-s*c+r*u,t[2]=a*u+l*c,t[3]=-a*c+u*l,t[4]=u*(o-n[0])+c*(h-n[1])+n[0],t[5]=u*(h-n[1])-c*(o-n[0])+n[1],t}function scale$1(t,e,i){var n=i[0],s=i[1];return t[0]=e[0]*n,t[1]=e[1]*s,t[2]=e[2]*n,t[3]=e[3]*s,t[4]=e[4]*n,t[5]=e[5]*s,t}function invert(t,e){var i=e[0],n=e[2],s=e[4],a=e[1],o=e[3],r=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*r-o*s)*l,t[5]=(a*s-i*r)*l,t):null}function clone$1(t){var e=create();return copy(e,t),e}var Point$2=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,i){t.x=e,t.y=i},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},t.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},t.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},t.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},t.lerp=function(t,e,i,n){var s=1-n;t.x=s*e.x+n*i.x,t.y=s*e.y+n*i.y},t}(),Point$3=Point$2,mathMin$4=Math.min,mathMax$4=Math.max,lt=new Point$3,rb=new Point$3,lb=new Point$3,rt=new Point$3,minTv$1=new Point$3,maxTv$1=new Point$3,BoundingRect=function(){function t(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return t.prototype.union=function(t){var e=mathMin$4(t.x,this.x),i=mathMin$4(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=mathMax$4(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=mathMax$4(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,s=create();return translate(s,s,[-e.x,-e.y]),scale$1(s,s,[i,n]),translate(s,s,[t.x,t.y]),s},t.prototype.intersect=function(e,i){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,s=n.x,a=n.x+n.width,o=n.y,r=n.y+n.height,l=e.x,h=e.x+e.width,c=e.y,u=e.y+e.height,d=!(a<l||h<s||r<c||u<o);if(i){var p=1/0,g=0,f=Math.abs(a-l),m=Math.abs(h-s),v=Math.abs(r-c),b=Math.abs(u-o),y=Math.min(f,m),S=Math.min(v,b);a<l||h<s?y>g&&(g=y,f<m?Point$3.set(maxTv$1,-f,0):Point$3.set(maxTv$1,m,0)):y<p&&(p=y,f<m?Point$3.set(minTv$1,f,0):Point$3.set(minTv$1,-m,0)),r<c||u<o?S>g&&(g=S,v<b?Point$3.set(maxTv$1,0,-v):Point$3.set(maxTv$1,0,b)):y<p&&(p=y,v<b?Point$3.set(minTv$1,0,v):Point$3.set(minTv$1,0,-b))}return i&&Point$3.copy(i,d?minTv$1:maxTv$1),d},t.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,i,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var s=n[0],a=n[3],o=n[4],r=n[5];return e.x=i.x*s+o,e.y=i.y*a+r,e.width=i.width*s,e.height=i.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}lt.x=lb.x=i.x,lt.y=rt.y=i.y,rb.x=rt.x=i.x+i.width,rb.y=lb.y=i.y+i.height,lt.transform(n),rt.transform(n),rb.transform(n),lb.transform(n),e.x=mathMin$4(lt.x,rb.x,lb.x,rt.x),e.y=mathMin$4(lt.y,rb.y,lb.y,rt.y);var l=mathMax$4(lt.x,rb.x,lb.x,rt.x),h=mathMax$4(lt.y,rb.y,lb.y,rt.y);e.width=l-e.x,e.height=h-e.y}else e!==i&&t.copy(e,i)},t}(),BoundingRect$1=BoundingRect,SILENT="silent";function makeEventPacket(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:stopEvent}}function stopEvent(){stop(this.event)}var EmptyProxy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return __extends(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Eventful$1),HoveredResult=function(t,e){this.x=t,this.y=e},handlerNames=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],tmpRect$1=new BoundingRect$1(0,0,0,0),Handler=function(t){function e(e,i,n,s,a){var o=t.call(this)||this;return o._hovered=new HoveredResult(0,0),o.storage=e,o.painter=i,o.painterRoot=s,o._pointerSize=a,n=n||new EmptyProxy,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new Draggable$1(o),o}return __extends(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(each$4(handlerNames,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,i=t.zrY,n=isOutsideBoundary(this,e,i),s=this._hovered,a=s.target;a&&!a.__zr&&(a=(s=this.findHover(s.x,s.y)).target);var o=this._hovered=n?new HoveredResult(e,i):this.findHover(e,i),r=o.target,l=this.proxy;l.setCursor&&l.setCursor(r?r.cursor:"default"),a&&r!==a&&this.dispatchToElement(s,"mouseout",t),this.dispatchToElement(o,"mousemove",t),r&&r!==a&&this.dispatchToElement(o,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new HoveredResult(0,0)},e.prototype.dispatch=function(t,e){var i=this[t];i&&i.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var s="on"+e,a=makeEventPacket(e,t,i);n&&(n[s]&&(a.cancelBubble=!!n[s].call(n,a)),n.trigger(e,a),n=n.__hostTarget?n.__hostTarget:n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[s]&&t[s].call(t,a),t.trigger&&t.trigger(e,a)})))}},e.prototype.findHover=function(t,e,i){var n=this.storage.getDisplayList(),s=new HoveredResult(t,e);if(setHoverTarget(n,s,t,e,i),this._pointerSize&&!s.target){for(var a=[],o=this._pointerSize,r=o/2,l=new BoundingRect$1(t-r,e-r,o,o),h=n.length-1;h>=0;h--){var c=n[h];c===i||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(tmpRect$1.copy(c.getBoundingRect()),c.transform&&tmpRect$1.applyTransform(c.transform),tmpRect$1.intersect(l)&&a.push(c))}if(a.length)for(var u=Math.PI/12,d=2*Math.PI,p=0;p<r;p+=4)for(var g=0;g<d;g+=u){if(setHoverTarget(a,s,t+p*Math.cos(g),e+p*Math.sin(g),i),s.target)return s}}return s},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new GestureMgr);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var s=n.type;t.gestureEvent=s;var a=new HoveredResult;a.target=n.target,this.dispatchToElement(a,s,n.event)}},e}(Eventful$1);function isHover(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n=t,s=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,i))return!1}n.silent&&(s=!0);var r=n.__hostTarget;n=r||n.parent}return!s||SILENT}return!1}function setHoverTarget(t,e,i,n,s){for(var a=t.length-1;a>=0;a--){var o=t[a],r=void 0;if(o!==s&&!o.ignore&&(r=isHover(o,i,n))&&(!e.topTarget&&(e.topTarget=o),r!==SILENT)){e.target=o;break}}}function isOutsideBoundary(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}each$4(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Handler.prototype[t]=function(e){var i,n,s=e.zrX,a=e.zrY,o=isOutsideBoundary(this,s,a);if("mouseup"===t&&o||(n=(i=this.findHover(s,a)).target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||dist$1(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}));var Handler$1=Handler,DEFAULT_MIN_MERGE=32,DEFAULT_MIN_GALLOPING=7;function minRunLength(t){for(var e=0;t>=DEFAULT_MIN_MERGE;)e|=1&t,t>>=1;return t+e}function makeAscendingRun(t,e,i,n){var s=e+1;if(s===i)return 1;if(n(t[s++],t[e])<0){for(;s<i&&n(t[s],t[s-1])<0;)s++;reverseRun(t,e,s)}else for(;s<i&&n(t[s],t[s-1])>=0;)s++;return s-e}function reverseRun(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}function binaryInsertionSort(t,e,i,n,s){for(n===e&&n++;n<i;n++){for(var a,o=t[n],r=e,l=n;r<l;)s(o,t[a=r+l>>>1])<0?l=a:r=a+1;var h=n-r;switch(h){case 3:t[r+3]=t[r+2];case 2:t[r+2]=t[r+1];case 1:t[r+1]=t[r];break;default:for(;h>0;)t[r+h]=t[r+h-1],h--}t[r]=o}}function gallopLeft(t,e,i,n,s,a){var o=0,r=0,l=1;if(a(t,e[i+s])>0){for(r=n-s;l<r&&a(t,e[i+s+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=r);l>r&&(l=r),o+=s,l+=s}else{for(r=s+1;l<r&&a(t,e[i+s-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=r);l>r&&(l=r);var h=o;o=s-l,l=s-h}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[i+c])>0?o=c+1:l=c}return l}function gallopRight(t,e,i,n,s,a){var o=0,r=0,l=1;if(a(t,e[i+s])<0){for(r=s+1;l<r&&a(t,e[i+s-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=r);l>r&&(l=r);var h=o;o=s-l,l=s-h}else{for(r=n-s;l<r&&a(t,e[i+s+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=r);l>r&&(l=r),o+=s,l+=s}for(o++;o<l;){var c=o+(l-o>>>1);a(t,e[i+c])<0?l=c:o=c+1}return l}function TimSort(t,e){var i,n,s=DEFAULT_MIN_GALLOPING,a=0,o=[];function r(r){var l=i[r],h=n[r],c=i[r+1],u=n[r+1];n[r]=h+u,r===a-3&&(i[r+1]=i[r+2],n[r+1]=n[r+2]),a--;var d=gallopRight(t[c],t,l,h,0,e);l+=d,0!==(h-=d)&&0!==(u=gallopLeft(t[l+h-1],t,c,u,u-1,e))&&(h<=u?function(i,n,a,r){var l=0;for(l=0;l<n;l++)o[l]=t[i+l];var h=0,c=a,u=i;if(t[u++]=t[c++],0==--r){for(l=0;l<n;l++)t[u+l]=o[h+l];return}if(1===n){for(l=0;l<r;l++)t[u+l]=t[c+l];return void(t[u+r]=o[h])}var d,p,g,f=s;for(;;){d=0,p=0,g=!1;do{if(e(t[c],o[h])<0){if(t[u++]=t[c++],p++,d=0,0==--r){g=!0;break}}else if(t[u++]=o[h++],d++,p=0,1==--n){g=!0;break}}while((d|p)<f);if(g)break;do{if(0!==(d=gallopRight(t[c],o,h,n,0,e))){for(l=0;l<d;l++)t[u+l]=o[h+l];if(u+=d,h+=d,(n-=d)<=1){g=!0;break}}if(t[u++]=t[c++],0==--r){g=!0;break}if(0!==(p=gallopLeft(o[h],t,c,r,0,e))){for(l=0;l<p;l++)t[u+l]=t[c+l];if(u+=p,c+=p,0===(r-=p)){g=!0;break}}if(t[u++]=o[h++],1==--n){g=!0;break}f--}while(d>=DEFAULT_MIN_GALLOPING||p>=DEFAULT_MIN_GALLOPING);if(g)break;f<0&&(f=0),f+=2}if((s=f)<1&&(s=1),1===n){for(l=0;l<r;l++)t[u+l]=t[c+l];t[u+r]=o[h]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[u+l]=o[h+l]}}(l,h,c,u):function(i,n,a,r){var l=0;for(l=0;l<r;l++)o[l]=t[a+l];var h=i+n-1,c=r-1,u=a+r-1,d=0,p=0;if(t[u--]=t[h--],0==--n){for(d=u-(r-1),l=0;l<r;l++)t[d+l]=o[l];return}if(1===r){for(p=(u-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];return void(t[u]=o[c])}var g=s;for(;;){var f=0,m=0,v=!1;do{if(e(o[c],t[h])<0){if(t[u--]=t[h--],f++,m=0,0==--n){v=!0;break}}else if(t[u--]=o[c--],m++,f=0,1==--r){v=!0;break}}while((f|m)<g);if(v)break;do{if(0!==(f=n-gallopRight(o[c],t,i,n,n-1,e))){for(n-=f,p=(u-=f)+1,d=(h-=f)+1,l=f-1;l>=0;l--)t[p+l]=t[d+l];if(0===n){v=!0;break}}if(t[u--]=o[c--],1==--r){v=!0;break}if(0!==(m=r-gallopLeft(t[h],o,0,r,r-1,e))){for(r-=m,p=(u-=m)+1,d=(c-=m)+1,l=0;l<m;l++)t[p+l]=o[d+l];if(r<=1){v=!0;break}}if(t[u--]=t[h--],0==--n){v=!0;break}g--}while(f>=DEFAULT_MIN_GALLOPING||m>=DEFAULT_MIN_GALLOPING);if(v)break;g<0&&(g=0),g+=2}(s=g)<1&&(s=1);if(1===r){for(p=(u-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];t[u]=o[c]}else{if(0===r)throw new Error;for(d=u-(r-1),l=0;l<r;l++)t[d+l]=o[l]}}(l,h,c,u))}return i=[],n=[],{mergeRuns:function(){for(;a>1;){var t=a-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;r(t)}},forceMergeRuns:function(){for(;a>1;){var t=a-2;t>0&&n[t-1]<n[t+1]&&t--,r(t)}},pushRun:function(t,e){i[a]=t,n[a]=e,a+=1}}}function sort(t,e,i,n){i||(i=0),n||(n=t.length);var s=n-i;if(!(s<2)){var a=0;if(s<DEFAULT_MIN_MERGE)binaryInsertionSort(t,i,n,i+(a=makeAscendingRun(t,i,n,e)),e);else{var o=TimSort(t,e),r=minRunLength(s);do{if((a=makeAscendingRun(t,i,n,e))<r){var l=s;l>r&&(l=r),binaryInsertionSort(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),s-=a,i+=a}while(0!==s);o.forceMergeRuns()}}}var REDRAW_BIT=1,STYLE_CHANGED_BIT=2,SHAPE_CHANGED_BIT=4,invalidZErrorLogged=!1;function logInvalidZError(){invalidZErrorLogged||(invalidZErrorLogged=!0)}function shapeCompareFunc(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Storage=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=shapeCompareFunc}return t.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},t.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(e),i},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,s=e.length;n<s;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,sort(i,shapeCompareFunc)},t.prototype._updateAndAddDisplayable=function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)e=null;else if(n){e=e?e.slice():[];for(var s=n,a=t;s;)s.parent=a,s.updateTransform(),e.push(s),a=s,s=s.getClipPath()}if(t.childrenRef){for(var o=t.childrenRef(),r=0;r<o.length;r++){var l=o[r];t.__dirty&&(l.__dirty|=REDRAW_BIT),this._updateAndAddDisplayable(l,e,i)}t.__dirty=0}else{var h=t;e&&e.length?h.__clipPaths=e:h.__clipPaths&&h.__clipPaths.length>0&&(h.__clipPaths=[]),isNaN(h.z)&&(logInvalidZError(),h.z=0),isNaN(h.z2)&&(logInvalidZError(),h.z2=0),isNaN(h.zlevel)&&(logInvalidZError(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,i);var u=t.getTextGuideLine();u&&this._updateAndAddDisplayable(u,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);else{var n=indexOf(this._roots,t);n>=0&&this._roots.splice(n,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Storage$1=Storage,requestAnimationFrame$2;requestAnimationFrame$2=env$1.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var requestAnimationFrame$3=requestAnimationFrame$2,easingFuncs={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-easingFuncs.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*easingFuncs.bounceIn(2*t):.5*easingFuncs.bounceOut(2*t-1)+.5}},easingFuncs$1=easingFuncs,mathPow$1=Math.pow,mathSqrt$3=Math.sqrt,EPSILON$3=1e-8,EPSILON_NUMERIC=1e-4,THREE_SQRT=mathSqrt$3(3),ONE_THIRD=1/3,_v0=create$1(),_v1=create$1(),_v2=create$1();function isAroundZero$1(t){return t>-EPSILON$3&&t<EPSILON$3}function isNotAroundZero$1(t){return t>EPSILON$3||t<-EPSILON$3}function cubicAt(t,e,i,n,s){var a=1-s;return a*a*(a*t+3*s*e)+s*s*(s*n+3*a*i)}function cubicDerivativeAt(t,e,i,n,s){var a=1-s;return 3*(((e-t)*a+2*(i-e)*s)*a+(n-i)*s*s)}function cubicRootAt(t,e,i,n,s,a){var o=n+3*(e-i)-t,r=3*(i-2*e+t),l=3*(e-t),h=t-s,c=r*r-3*o*l,u=r*l-9*o*h,d=l*l-3*r*h,p=0;if(isAroundZero$1(c)&&isAroundZero$1(u)){if(isAroundZero$1(r))a[0]=0;else(T=-l/r)>=0&&T<=1&&(a[p++]=T)}else{var g=u*u-4*c*d;if(isAroundZero$1(g)){var f=u/c,m=-f/2;(T=-r/o+f)>=0&&T<=1&&(a[p++]=T),m>=0&&m<=1&&(a[p++]=m)}else if(g>0){var v=mathSqrt$3(g),b=c*r+1.5*o*(-u+v),y=c*r+1.5*o*(-u-v);(T=(-r-((b=b<0?-mathPow$1(-b,ONE_THIRD):mathPow$1(b,ONE_THIRD))+(y=y<0?-mathPow$1(-y,ONE_THIRD):mathPow$1(y,ONE_THIRD))))/(3*o))>=0&&T<=1&&(a[p++]=T)}else{var S=(2*c*r-3*o*u)/(2*mathSqrt$3(c*c*c)),x=Math.acos(S)/3,w=mathSqrt$3(c),C=Math.cos(x),T=(-r-2*w*C)/(3*o),D=(m=(-r+w*(C+THREE_SQRT*Math.sin(x)))/(3*o),(-r+w*(C-THREE_SQRT*Math.sin(x)))/(3*o));T>=0&&T<=1&&(a[p++]=T),m>=0&&m<=1&&(a[p++]=m),D>=0&&D<=1&&(a[p++]=D)}}return p}function cubicExtrema(t,e,i,n,s){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,r=3*e-3*t,l=0;if(isAroundZero$1(o)){if(isNotAroundZero$1(a))(c=-r/a)>=0&&c<=1&&(s[l++]=c)}else{var h=a*a-4*o*r;if(isAroundZero$1(h))s[0]=-a/(2*o);else if(h>0){var c,u=mathSqrt$3(h),d=(-a-u)/(2*o);(c=(-a+u)/(2*o))>=0&&c<=1&&(s[l++]=c),d>=0&&d<=1&&(s[l++]=d)}}return l}function cubicSubdivide(t,e,i,n,s,a){var o=(e-t)*s+t,r=(i-e)*s+e,l=(n-i)*s+i,h=(r-o)*s+o,c=(l-r)*s+r,u=(c-h)*s+h;a[0]=t,a[1]=o,a[2]=h,a[3]=u,a[4]=u,a[5]=c,a[6]=l,a[7]=n}function cubicProjectPoint(t,e,i,n,s,a,o,r,l,h,c){var u,d,p,g,f,m=.005,v=1/0;_v0[0]=l,_v0[1]=h;for(var b=0;b<1;b+=.05)_v1[0]=cubicAt(t,i,s,o,b),_v1[1]=cubicAt(e,n,a,r,b),(g=distSquare(_v0,_v1))<v&&(u=b,v=g);v=1/0;for(var y=0;y<32&&!(m<EPSILON_NUMERIC);y++)d=u-m,p=u+m,_v1[0]=cubicAt(t,i,s,o,d),_v1[1]=cubicAt(e,n,a,r,d),g=distSquare(_v1,_v0),d>=0&&g<v?(u=d,v=g):(_v2[0]=cubicAt(t,i,s,o,p),_v2[1]=cubicAt(e,n,a,r,p),f=distSquare(_v2,_v0),p<=1&&f<v?(u=p,v=f):m*=.5);return c&&(c[0]=cubicAt(t,i,s,o,u),c[1]=cubicAt(e,n,a,r,u)),mathSqrt$3(v)}function cubicLength(t,e,i,n,s,a,o,r,l){for(var h=t,c=e,u=0,d=1/l,p=1;p<=l;p++){var g=p*d,f=cubicAt(t,i,s,o,g),m=cubicAt(e,n,a,r,g),v=f-h,b=m-c;u+=Math.sqrt(v*v+b*b),h=f,c=m}return u}function quadraticAt(t,e,i,n){var s=1-n;return s*(s*t+2*n*e)+n*n*i}function quadraticDerivativeAt(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function quadraticRootAt(t,e,i,n,s){var a=t-2*e+i,o=2*(e-t),r=t-n,l=0;if(isAroundZero$1(a)){if(isNotAroundZero$1(o))(c=-r/o)>=0&&c<=1&&(s[l++]=c)}else{var h=o*o-4*a*r;if(isAroundZero$1(h))(c=-o/(2*a))>=0&&c<=1&&(s[l++]=c);else if(h>0){var c,u=mathSqrt$3(h),d=(-o-u)/(2*a);(c=(-o+u)/(2*a))>=0&&c<=1&&(s[l++]=c),d>=0&&d<=1&&(s[l++]=d)}}return l}function quadraticExtremum(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function quadraticSubdivide(t,e,i,n,s){var a=(e-t)*n+t,o=(i-e)*n+e,r=(o-a)*n+a;s[0]=t,s[1]=a,s[2]=r,s[3]=r,s[4]=o,s[5]=i}function quadraticProjectPoint(t,e,i,n,s,a,o,r,l){var h,c=.005,u=1/0;_v0[0]=o,_v0[1]=r;for(var d=0;d<1;d+=.05){_v1[0]=quadraticAt(t,i,s,d),_v1[1]=quadraticAt(e,n,a,d),(m=distSquare(_v0,_v1))<u&&(h=d,u=m)}u=1/0;for(var p=0;p<32&&!(c<EPSILON_NUMERIC);p++){var g=h-c,f=h+c;_v1[0]=quadraticAt(t,i,s,g),_v1[1]=quadraticAt(e,n,a,g);var m=distSquare(_v1,_v0);if(g>=0&&m<u)h=g,u=m;else{_v2[0]=quadraticAt(t,i,s,f),_v2[1]=quadraticAt(e,n,a,f);var v=distSquare(_v2,_v0);f<=1&&v<u?(h=f,u=v):c*=.5}}return l&&(l[0]=quadraticAt(t,i,s,h),l[1]=quadraticAt(e,n,a,h)),mathSqrt$3(u)}function quadraticLength(t,e,i,n,s,a,o){for(var r=t,l=e,h=0,c=1/o,u=1;u<=o;u++){var d=u*c,p=quadraticAt(t,i,s,d),g=quadraticAt(e,n,a,d),f=p-r,m=g-l;h+=Math.sqrt(f*f+m*m),r=p,l=g}return h}var regexp=/cubic-bezier\(([0-9,\.e ]+)\)/;function createCubicEasingFunc(t){var e=t&&regexp.exec(t);if(e){var i=e[1].split(","),n=+trim(i[0]),s=+trim(i[1]),a=+trim(i[2]),o=+trim(i[3]);if(isNaN(n+s+a+o))return;var r=[];return function(t){return t<=0?0:t>=1?1:cubicRootAt(0,n,a,1,t,r)&&cubicAt(0,s,o,1,r[0])}}}var Clip=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||noop$3,this.ondestroy=t.ondestroy||noop$3,this.onrestart=t.onrestart||noop$3,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,n=t-this._startTime-this._pausedTime,s=n/i;s<0&&(s=0),s=Math.min(s,1);var a=this.easingFunc,o=a?a(s):s;if(this.onframe(o),1===s){if(!this.loop)return!0;var r=n%i;this._startTime=t-r,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=isFunction(t)?t:easingFuncs$1[t]||createCubicEasingFunc(t)},t}(),Clip$1=Clip,Entry=function(t){this.value=t},LinkedList=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Entry(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),LRU=function(){function t(t){this._list=new LinkedList,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var i=this._list,n=this._map,s=null;if(null==n[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var r=i.head;i.remove(r),delete n[r.key],s=r.value,this._lastRemovedEntry=r}o?o.value=e:o=new Entry(e),o.key=t,i.insertEntry(o),n[t]=o}return s},t.prototype.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),LRU$1=LRU,kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function clampCssByte(t){return(t=Math.round(t))<0?0:t>255?255:t}function clampCssAngle(t){return(t=Math.round(t))<0?0:t>360?360:t}function clampCssFloat(t){return t<0?0:t>1?1:t}function parseCssInt(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?clampCssByte(parseFloat(e)/100*255):clampCssByte(parseInt(e,10))}function parseCssFloat(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?clampCssFloat(parseFloat(e)/100):clampCssFloat(parseFloat(e))}function cssHueToRgb(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function lerpNumber(t,e,i){return t+(e-t)*i}function setRgba(t,e,i,n,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=s,t}function copyRgba(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var colorCache=new LRU$1(20),lastRemovedArr=null;function putToCache(t,e){lastRemovedArr&&copyRgba(lastRemovedArr,e),lastRemovedArr=colorCache.put(t,lastRemovedArr||e.slice())}function parse(t,e){if(t){e=e||[];var i=colorCache.get(t);if(i)return copyRgba(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in kCSSColorTable)return copyRgba(e,kCSSColorTable[n]),putToCache(t,e),e;var s,a=n.length;if("#"===n.charAt(0))return 4===a||5===a?(s=parseInt(n.slice(1,4),16))>=0&&s<=4095?(setRgba(e,(3840&s)>>4|(3840&s)>>8,240&s|(240&s)>>4,15&s|(15&s)<<4,5===a?parseInt(n.slice(4),16)/15:1),putToCache(t,e),e):void setRgba(e,0,0,0,1):7===a||9===a?(s=parseInt(n.slice(1,7),16))>=0&&s<=16777215?(setRgba(e,(16711680&s)>>16,(65280&s)>>8,255&s,9===a?parseInt(n.slice(7),16)/255:1),putToCache(t,e),e):void setRgba(e,0,0,0,1):void 0;var o=n.indexOf("("),r=n.indexOf(")");if(-1!==o&&r+1===a){var l=n.substr(0,o),h=n.substr(o+1,r-(o+1)).split(","),c=1;switch(l){case"rgba":if(4!==h.length)return 3===h.length?setRgba(e,+h[0],+h[1],+h[2],1):setRgba(e,0,0,0,1);c=parseCssFloat(h.pop());case"rgb":return h.length>=3?(setRgba(e,parseCssInt(h[0]),parseCssInt(h[1]),parseCssInt(h[2]),3===h.length?c:parseCssFloat(h[3])),putToCache(t,e),e):void setRgba(e,0,0,0,1);case"hsla":return 4!==h.length?void setRgba(e,0,0,0,1):(h[3]=parseCssFloat(h[3]),hsla2rgba(h,e),putToCache(t,e),e);case"hsl":return 3!==h.length?void setRgba(e,0,0,0,1):(hsla2rgba(h,e),putToCache(t,e),e);default:return}}setRgba(e,0,0,0,1)}}function hsla2rgba(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=parseCssFloat(t[1]),s=parseCssFloat(t[2]),a=s<=.5?s*(n+1):s+n-s*n,o=2*s-a;return setRgba(e=e||[],clampCssByte(255*cssHueToRgb(o,a,i+1/3)),clampCssByte(255*cssHueToRgb(o,a,i)),clampCssByte(255*cssHueToRgb(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function rgba2hsla(t){if(t){var e,i,n=t[0]/255,s=t[1]/255,a=t[2]/255,o=Math.min(n,s,a),r=Math.max(n,s,a),l=r-o,h=(r+o)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(r+o):l/(2-r-o);var c=((r-n)/6+l/2)/l,u=((r-s)/6+l/2)/l,d=((r-a)/6+l/2)/l;n===r?e=d-u:s===r?e=1/3+c-d:a===r&&(e=2/3+u-c),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,i,h];return null!=t[3]&&p.push(t[3]),p}}function lift(t,e){var i=parse(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:i[n]<0&&(i[n]=0);return stringify(i,4===i.length?"rgba":"rgb")}}function fastLerp(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),s=Math.floor(n),a=Math.ceil(n),o=e[s],r=e[a],l=n-s;return i[0]=clampCssByte(lerpNumber(o[0],r[0],l)),i[1]=clampCssByte(lerpNumber(o[1],r[1],l)),i[2]=clampCssByte(lerpNumber(o[2],r[2],l)),i[3]=clampCssFloat(lerpNumber(o[3],r[3],l)),i}}function lerp(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),s=Math.floor(n),a=Math.ceil(n),o=parse(e[s]),r=parse(e[a]),l=n-s,h=stringify([clampCssByte(lerpNumber(o[0],r[0],l)),clampCssByte(lerpNumber(o[1],r[1],l)),clampCssByte(lerpNumber(o[2],r[2],l)),clampCssFloat(lerpNumber(o[3],r[3],l))],"rgba");return i?{color:h,leftIndex:s,rightIndex:a,value:n}:h}}function modifyHSL(t,e,i,n){var s=parse(t);if(t)return s=rgba2hsla(s),null!=e&&(s[0]=clampCssAngle(e)),null!=i&&(s[1]=parseCssFloat(i)),null!=n&&(s[2]=parseCssFloat(n)),stringify(hsla2rgba(s),"rgba")}function modifyAlpha(t,e){var i=parse(t);if(i&&null!=e)return i[3]=clampCssFloat(e),stringify(i,"rgba")}function stringify(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function lum(t,e){var i=parse(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*e:0}var liftedColorCache=new LRU$1(100);function liftColor(t){if(isString(t)){var e=liftedColorCache.get(t);return e||(e=lift(t,-.1),liftedColorCache.put(t,e)),e}if(isGradientObject(t)){var i=extend({},t);return i.colorStops=map$1(t.colorStops,(function(t){return{offset:t.offset,color:lift(t.color,-.1)}})),i}return t}var mathRound=Math.round;function normalizeColor(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var i=parse(t);i&&(t="rgb("+i[0]+","+i[1]+","+i[2]+")",e=i[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var EPSILON$2=1e-4;function isAroundZero(t){return t<EPSILON$2&&t>-EPSILON$2}function round3(t){return mathRound(1e3*t)/1e3}function round4(t){return mathRound(1e4*t)/1e4}function getMatrixStr(t){return"matrix("+round3(t[0])+","+round3(t[1])+","+round3(t[2])+","+round3(t[3])+","+round4(t[4])+","+round4(t[5])+")"}var TEXT_ALIGN_TO_ANCHOR={left:"start",right:"end",center:"middle",middle:"middle"};function adjustTextY$1(t,e,i){return"top"===i?t+=e/2:"bottom"===i&&(t-=e/2),t}function hasShadow(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function getShadowKey(t){var e=t.style,i=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(",")}function isImagePattern(t){return t&&!!t.image}function isSVGPattern(t){return t&&!!t.svgElement}function isPattern(t){return isImagePattern(t)||isSVGPattern(t)}function isLinearGradient(t){return"linear"===t.type}function isRadialGradient(t){return"radial"===t.type}function isGradient(t){return t&&("linear"===t.type||"radial"===t.type)}function getIdURL(t){return"url(#"+t+")"}function getPathPrecision(t){var e=t.getGlobalScale(),i=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(i)/Math.log(10)),1)}function getSRTTransformString(t){var e=t.x||0,i=t.y||0,n=(t.rotation||0)*RADIAN_TO_DEGREE,s=retrieve2(t.scaleX,1),a=retrieve2(t.scaleY,1),o=t.skewX||0,r=t.skewY||0,l=[];return(e||i)&&l.push("translate("+e+"px,"+i+"px)"),n&&l.push("rotate("+n+")"),1===s&&1===a||l.push("scale("+s+","+a+")"),(o||r)&&l.push("skew("+mathRound(o*RADIAN_TO_DEGREE)+"deg, "+mathRound(r*RADIAN_TO_DEGREE)+"deg)"),l.join(" ")}var encodeBase64=env$1.hasGlobalWindow&&isFunction(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},arraySlice=Array.prototype.slice;function interpolateNumber$1(t,e,i){return(e-t)*i+t}function interpolate1DArray(t,e,i,n){for(var s=e.length,a=0;a<s;a++)t[a]=interpolateNumber$1(e[a],i[a],n);return t}function interpolate2DArray(t,e,i,n){for(var s=e.length,a=s&&e[0].length,o=0;o<s;o++){t[o]||(t[o]=[]);for(var r=0;r<a;r++)t[o][r]=interpolateNumber$1(e[o][r],i[o][r],n)}return t}function add1DArray(t,e,i,n){for(var s=e.length,a=0;a<s;a++)t[a]=e[a]+i[a]*n;return t}function add2DArray(t,e,i,n){for(var s=e.length,a=s&&e[0].length,o=0;o<s;o++){t[o]||(t[o]=[]);for(var r=0;r<a;r++)t[o][r]=e[o][r]+i[o][r]*n}return t}function fillColorStops(t,e){for(var i=t.length,n=e.length,s=i>n?e:t,a=Math.min(i,n),o=s[a-1]||{color:[0,0,0,0],offset:0},r=a;r<Math.max(i,n);r++)s.push({offset:o.offset,color:o.color.slice()})}function fillArray(t,e,i){var n=t,s=e;if(n.push&&s.push){var a=n.length,o=s.length;if(a!==o)if(a>o)n.length=o;else for(var r=a;r<o;r++)n.push(1===i?s[r]:arraySlice.call(s[r]));var l=n[0]&&n[0].length;for(r=0;r<n.length;r++)if(1===i)isNaN(n[r])&&(n[r]=s[r]);else for(var h=0;h<l;h++)isNaN(n[r][h])&&(n[r][h]=s[r][h])}}function cloneValue(t){if(isArrayLike(t)){var e=t.length;if(isArrayLike(t[0])){for(var i=[],n=0;n<e;n++)i.push(arraySlice.call(t[n]));return i}return arraySlice.call(t)}return t}function rgba2String(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function guessArrayDim(t){return isArrayLike(t&&t[0])?2:1}var VALUE_TYPE_NUMBER=0,VALUE_TYPE_1D_ARRAY=1,VALUE_TYPE_2D_ARRAY=2,VALUE_TYPE_COLOR=3,VALUE_TYPE_LINEAR_GRADIENT=4,VALUE_TYPE_RADIAL_GRADIENT=5,VALUE_TYPE_UNKOWN=6;function isGradientValueType(t){return t===VALUE_TYPE_LINEAR_GRADIENT||t===VALUE_TYPE_RADIAL_GRADIENT}function isArrayValueType(t){return t===VALUE_TYPE_1D_ARRAY||t===VALUE_TYPE_2D_ARRAY}var tmpRgba=[0,0,0,0],Track=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,s=n.length,a=!1,o=VALUE_TYPE_UNKOWN,r=e;if(isArrayLike(e)){var l=guessArrayDim(e);o=l,(1===l&&!isNumber$1(e[0])||2===l&&!isNumber$1(e[0][0]))&&(a=!0)}else if(isNumber$1(e)&&!eqNaN(e))o=VALUE_TYPE_NUMBER;else if(isString(e))if(isNaN(+e)){var h=parse(e);h&&(r=h,o=VALUE_TYPE_COLOR)}else o=VALUE_TYPE_NUMBER;else if(isGradientObject(e)){var c=extend({},r);c.colorStops=map$1(e.colorStops,(function(t){return{offset:t.offset,color:parse(t.color)}})),isLinearGradient(e)?o=VALUE_TYPE_LINEAR_GRADIENT:isRadialGradient(e)&&(o=VALUE_TYPE_RADIAL_GRADIENT),r=c}0===s?this.valType=o:o===this.valType&&o!==VALUE_TYPE_UNKOWN||(a=!0),this.discrete=this.discrete||a;var u={time:t,value:r,rawValue:e,percent:0};return i&&(u.easing=i,u.easingFunc=isFunction(i)?i:easingFuncs$1[i]||createCubicEasingFunc(i)),n.push(u),u},t.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort((function(t,e){return t.time-e.time}));for(var n=this.valType,s=i.length,a=i[s-1],o=this.discrete,r=isArrayValueType(n),l=isGradientValueType(n),h=0;h<s;h++){var c=i[h],u=c.value,d=a.value;c.percent=c.time/t,o||(r&&h!==s-1?fillArray(u,d,n):l&&fillColorStops(u.colorStops,d.colorStops))}if(!o&&n!==VALUE_TYPE_RADIAL_GRADIENT&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;var p=i[0].value;for(h=0;h<s;h++)n===VALUE_TYPE_NUMBER?i[h].additiveValue=i[h].value-p:n===VALUE_TYPE_COLOR?i[h].additiveValue=add1DArray([],i[h].value,p,-1):isArrayValueType(n)&&(i[h].additiveValue=n===VALUE_TYPE_1D_ARRAY?add1DArray([],i[h].value,p,-1):add2DArray([],i[h].value,p,-1))}},t.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i,n,s,a=null!=this._additiveTrack,o=a?"additiveValue":"value",r=this.valType,l=this.keyframes,h=l.length,c=this.propName,u=r===VALUE_TYPE_COLOR,d=this._lastFr,p=Math.min;if(1===h)n=s=l[0];else{if(e<0)i=0;else if(e<this._lastFrP){for(i=p(d+1,h-1);i>=0&&!(l[i].percent<=e);i--);i=p(i,h-2)}else{for(i=d;i<h&&!(l[i].percent>e);i++);i=p(i-1,h-2)}s=l[i+1],n=l[i]}if(n&&s){this._lastFr=i,this._lastFrP=e;var g=s.percent-n.percent,f=0===g?1:p((e-n.percent)/g,1);s.easingFunc&&(f=s.easingFunc(f));var m=a?this._additiveValue:u?tmpRgba:t[c];if(!isArrayValueType(r)&&!u||m||(m=this._additiveValue=[]),this.discrete)t[c]=f<1?n.rawValue:s.rawValue;else if(isArrayValueType(r))r===VALUE_TYPE_1D_ARRAY?interpolate1DArray(m,n[o],s[o],f):interpolate2DArray(m,n[o],s[o],f);else if(isGradientValueType(r)){var v=n[o],b=s[o],y=r===VALUE_TYPE_LINEAR_GRADIENT;t[c]={type:y?"linear":"radial",x:interpolateNumber$1(v.x,b.x,f),y:interpolateNumber$1(v.y,b.y,f),colorStops:map$1(v.colorStops,(function(t,e){var i=b.colorStops[e];return{offset:interpolateNumber$1(t.offset,i.offset,f),color:rgba2String(interpolate1DArray([],t.color,i.color,f))}})),global:b.global},y?(t[c].x2=interpolateNumber$1(v.x2,b.x2,f),t[c].y2=interpolateNumber$1(v.y2,b.y2,f)):t[c].r=interpolateNumber$1(v.r,b.r,f)}else if(u)interpolate1DArray(m,n[o],s[o],f),a||(t[c]=rgba2String(m));else{var S=interpolateNumber$1(n[o],s[o],f);a?this._additiveValue=S:t[c]=S}a&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===VALUE_TYPE_NUMBER?t[i]=t[i]+n:e===VALUE_TYPE_COLOR?(parse(t[i],tmpRgba),add1DArray(tmpRgba,tmpRgba,n,1),t[i]=rgba2String(tmpRgba)):e===VALUE_TYPE_1D_ARRAY?add1DArray(t[i],t[i],n,1):e===VALUE_TYPE_2D_ARRAY&&add2DArray(t[i],t[i],n,1)},t}(),Animator=function(){function t(t,e,i,n){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?logError("Can' use additive animation on looped animation."):(this._additiveAnimators=n,this._allowDiscrete=i)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,keys(e),i)},t.prototype.whenWithKeys=function(t,e,i,n){for(var s=this._tracks,a=0;a<i.length;a++){var o=i[a],r=s[o];if(!r){r=s[o]=new Track(o);var l=void 0,h=this._getAdditiveTrack(o);if(h){var c=h.keyframes,u=c[c.length-1];l=u&&u.value,h.valType===VALUE_TYPE_COLOR&&l&&(l=rgba2String(l))}else l=this._target[o];if(null==l)continue;t>0&&r.addKeyframe(0,cloneValue(l),n),this._trackKeys.push(o)}r.addKeyframe(t,cloneValue(e[o]),n)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},t.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var s=i[n].getTrack(t);s&&(e=s)}return e},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,s=0;s<this._trackKeys.length;s++){var a=this._trackKeys[s],o=this._tracks[a],r=this._getAdditiveTrack(a),l=o.keyframes,h=l.length;if(o.prepare(n,r),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var c=l[h-1];c&&(e._target[o.propName]=c.rawValue),o.setFinished()}else i.push(o)}if(i.length||this._force){var u=new Clip$1({life:n,loop:this._loop,delay:this._delay||0,onframe:function(t){e._started=2;var n=e._additiveAnimators;if(n){for(var s=!1,a=0;a<n.length;a++)if(n[a]._clip){s=!0;break}s||(e._additiveAnimators=null)}for(a=0;a<i.length;a++)i[a].step(e._target,t);var o=e._onframeCbs;if(o)for(a=0;a<o.length;a++)o[a](e._target,t)},ondestroy:function(){e._doneCallback()}});this._clip=u,this.animation&&this.animation.addClip(u),t&&u.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return map$1(this._trackKeys,(function(e){return t._tracks[e]}))},t.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,s=0;s<t.length;s++){var a=i[t[s]];a&&!a.isFinished()&&(e?a.step(this._target,1):1===this._started&&a.step(this._target,0),a.setFinished())}var o=!0;for(s=0;s<n.length;s++)if(!i[n[s]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},t.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var s=e[n],a=this._tracks[s];if(a&&!a.isFinished()){var o=a.keyframes,r=o[i?0:o.length-1];r&&(t[s]=cloneValue(r.rawValue))}}}},t.prototype.__changeFinalValue=function(t,e){e=e||keys(t);for(var i=0;i<e.length;i++){var n=e[i],s=this._tracks[n];if(s){var a=s.keyframes;if(a.length>1){var o=a.pop();s.addKeyframe(o.time,t[n]),s.prepare(this._maxTime,s.getAdditiveTrack())}}}},t}();function getTime(){return(new Date).getTime()}var Animation=function(t){function e(e){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return __extends(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,i=t.next;e?e.next=i:this._head=i,i?i.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=getTime()-this._pausedTime,i=e-this._time,n=this._head;n;){var s=n.next;n.step(e,i)?(n.ondestroy(),this.removeClip(n),n=s):n=s}this._time=e,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,requestAnimationFrame$3((function e(){t._running&&(requestAnimationFrame$3(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var i=new Animator(t,e.loop);return this.addAnimator(i),i},e}(Eventful$1),Animation$1=Animation,TOUCH_CLICK_DELAY=300,globalEventSupported=env$1.domSupported,localNativeListenerNames=(mouseHandlerNames=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],pointerEventNameMap={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:mouseHandlerNames,touch:["touchstart","touchend","touchmove"],pointer:map$1(mouseHandlerNames,(function(t){var e=t.replace("mouse","pointer");return pointerEventNameMap.hasOwnProperty(e)?e:t}))}),mouseHandlerNames,pointerEventNameMap,globalNativeListenerNames={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},wheelEventSupported=!1;function isPointerFromTouch(t){var e=t.pointerType;return"pen"===e||"touch"===e}function setTouchTimer(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}function markTouch(t){t&&(t.zrByTouch=!0)}function normalizeGlobalEvent(t,e){return normalizeEvent(t.dom,new FakeGlobalEvent(t,e),!0)}function isLocalEl(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}var FakeGlobalEvent=function(t,e){this.stopPropagation=noop$3,this.stopImmediatePropagation=noop$3,this.preventDefault=noop$3,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},localDOMHandlers={mousedown:function(t){t=normalizeEvent(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=normalizeEvent(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=normalizeEvent(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){isLocalEl(this,(t=normalizeEvent(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){wheelEventSupported=!0,t=normalizeEvent(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){wheelEventSupported||(t=normalizeEvent(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){markTouch(t=normalizeEvent(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),localDOMHandlers.mousemove.call(this,t),localDOMHandlers.mousedown.call(this,t)},touchmove:function(t){markTouch(t=normalizeEvent(this.dom,t)),this.handler.processGesture(t,"change"),localDOMHandlers.mousemove.call(this,t)},touchend:function(t){markTouch(t=normalizeEvent(this.dom,t)),this.handler.processGesture(t,"end"),localDOMHandlers.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<TOUCH_CLICK_DELAY&&localDOMHandlers.click.call(this,t)},pointerdown:function(t){localDOMHandlers.mousedown.call(this,t)},pointermove:function(t){isPointerFromTouch(t)||localDOMHandlers.mousemove.call(this,t)},pointerup:function(t){localDOMHandlers.mouseup.call(this,t)},pointerout:function(t){isPointerFromTouch(t)||localDOMHandlers.mouseout.call(this,t)}};each$4(["click","dblclick","contextmenu"],(function(t){localDOMHandlers[t]=function(e){e=normalizeEvent(this.dom,e),this.trigger(t,e)}}));var globalDOMHandlers={pointermove:function(t){isPointerFromTouch(t)||globalDOMHandlers.mousemove.call(this,t)},pointerup:function(t){globalDOMHandlers.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function mountLocalDOMEventListeners(t,e){var i=e.domHandlers;env$1.pointerEventsSupported?each$4(localNativeListenerNames.pointer,(function(n){mountSingleDOMEventListener(e,n,(function(e){i[n].call(t,e)}))})):(env$1.touchEventsSupported&&each$4(localNativeListenerNames.touch,(function(n){mountSingleDOMEventListener(e,n,(function(s){i[n].call(t,s),setTouchTimer(e)}))})),each$4(localNativeListenerNames.mouse,(function(n){mountSingleDOMEventListener(e,n,(function(s){s=getNativeEvent(s),e.touching||i[n].call(t,s)}))})))}function mountGlobalDOMEventListeners(t,e){function i(i){mountSingleDOMEventListener(e,i,(function(n){n=getNativeEvent(n),isLocalEl(t,n.target)||(n=normalizeGlobalEvent(t,n),e.domHandlers[i].call(t,n))}),{capture:!0})}env$1.pointerEventsSupported?each$4(globalNativeListenerNames.pointer,i):env$1.touchEventsSupported||each$4(globalNativeListenerNames.mouse,i)}function mountSingleDOMEventListener(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,addEventListener(t.domTarget,e,i,n)}function unmountDOMEventListeners(t){var e=t.mounted;for(var i in e)e.hasOwnProperty(i)&&removeEventListener(t.domTarget,i,e[i],t.listenerOpts[i]);t.mounted={}}var DOMHandlerScope=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},HandlerDomProxy=function(t){function e(e,i){var n=t.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new DOMHandlerScope(e,localDOMHandlers),globalEventSupported&&(n._globalHandlerScope=new DOMHandlerScope(document,globalDOMHandlers)),mountLocalDOMEventListeners(n,n._localHandlerScope),n}return __extends(e,t),e.prototype.dispose=function(){unmountDOMEventListeners(this._localHandlerScope),globalEventSupported&&unmountDOMEventListeners(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,globalEventSupported&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?mountGlobalDOMEventListeners(this,e):unmountDOMEventListeners(e)}},e}(Eventful$1),HandlerProxy=HandlerDomProxy,dpr=1;env$1.hasGlobalWindow&&(dpr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var devicePixelRatio=dpr,DARK_MODE_THRESHOLD=.4,DARK_LABEL_COLOR="#333",LIGHT_LABEL_COLOR="#ccc",LIGHTER_LABEL_COLOR="#eee",mIdentity=identity,EPSILON$1=5e-5;function isNotAroundZero(t){return t>EPSILON$1||t<-EPSILON$1}var scaleTmp=[],tmpTransform=[],originTransform=create(),abs=Math.abs,Transformable=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return isNotAroundZero(this.rotation)||isNotAroundZero(this.x)||isNotAroundZero(this.y)||isNotAroundZero(this.scaleX-1)||isNotAroundZero(this.scaleY-1)||isNotAroundZero(this.skewX)||isNotAroundZero(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;e||t?(i=i||create(),e?this.getLocalTransform(i):mIdentity(i),t&&(e?mul(i,t,i):copy(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&(mIdentity(i),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(scaleTmp);var i=scaleTmp[0]<0?-1:1,n=scaleTmp[1]<0?-1:1,s=((scaleTmp[0]-i)*e+i)/scaleTmp[0]||0,a=((scaleTmp[1]-n)*e+n)/scaleTmp[1]||0;t[0]*=s,t[1]*=s,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||create(),invert(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),s=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(s),e=Math.sqrt(e),this.skewX=s,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||create(),mul(tmpTransform,t.invTransform,e),e=tmpTransform);var i=this.originX,n=this.originY;(i||n)&&(originTransform[4]=i,originTransform[5]=n,mul(tmpTransform,e,originTransform),tmpTransform[4]-=i,tmpTransform[5]-=n,e=tmpTransform),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&applyTransform$1(i,i,n),i},t.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&applyTransform$1(i,i,n),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&abs(t[0]-1)>1e-10&&abs(t[3]-1)>1e-10?Math.sqrt(abs(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){copyTransform(this,t)},t.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,s=t.scaleX,a=t.scaleY,o=t.anchorX,r=t.anchorY,l=t.rotation||0,h=t.x,c=t.y,u=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(i||n||o||r){var p=i+o,g=n+r;e[4]=-p*s-u*g*a,e[5]=-g*a-d*p*s}else e[4]=e[5]=0;return e[0]=s,e[3]=a,e[1]=d*s,e[2]=u*a,l&&rotate(e,e,l),e[4]+=i+h,e[5]+=n+c,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),TRANSFORMABLE_PROPS=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function copyTransform(t,e){for(var i=0;i<TRANSFORMABLE_PROPS.length;i++){var n=TRANSFORMABLE_PROPS[i];t[n]=e[n]}}var Transformable$1=Transformable,textWidthCache={};function getWidth(t,e){var i=textWidthCache[e=e||DEFAULT_FONT];i||(i=textWidthCache[e]=new LRU$1(500));var n=i.get(t);return null==n&&(n=platformApi.measureText(t,e).width,i.put(t,n)),n}function innerGetBoundingRect(t,e,i,n){var s=getWidth(t,e),a=getLineHeight(e),o=adjustTextX(0,s,i),r=adjustTextY(0,a,n);return new BoundingRect$1(o,r,s,a)}function getBoundingRect(t,e,i,n){var s=((t||"")+"").split("\n");if(1===s.length)return innerGetBoundingRect(s[0],e,i,n);for(var a=new BoundingRect$1(0,0,0,0),o=0;o<s.length;o++){var r=innerGetBoundingRect(s[o],e,i,n);0===o?a.copy(r):a.union(r)}return a}function adjustTextX(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function adjustTextY(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function getLineHeight(t){return getWidth("国",t)}function parsePercent$1(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function calculateTextPosition(t,e,i){var n=e.position||"inside",s=null!=e.distance?e.distance:5,a=i.height,o=i.width,r=a/2,l=i.x,h=i.y,c="left",u="top";if(n instanceof Array)l+=parsePercent$1(n[0],i.width),h+=parsePercent$1(n[1],i.height),c=null,u=null;else switch(n){case"left":l-=s,h+=r,c="right",u="middle";break;case"right":l+=s+o,h+=r,u="middle";break;case"top":l+=o/2,h-=s,c="center",u="bottom";break;case"bottom":l+=o/2,h+=a+s,c="center";break;case"inside":l+=o/2,h+=r,c="center",u="middle";break;case"insideLeft":l+=s,h+=r,u="middle";break;case"insideRight":l+=o-s,h+=r,c="right",u="middle";break;case"insideTop":l+=o/2,h+=s,c="center";break;case"insideBottom":l+=o/2,h+=a-s,c="center",u="bottom";break;case"insideTopLeft":l+=s,h+=s;break;case"insideTopRight":l+=o-s,h+=s,c="right";break;case"insideBottomLeft":l+=s,h+=a-s,u="bottom";break;case"insideBottomRight":l+=o-s,h+=a-s,c="right",u="bottom"}return(t=t||{}).x=l,t.y=h,t.align=c,t.verticalAlign=u,t}var PRESERVED_NORMAL_STATE="__zr_normal__",PRIMARY_STATES_KEYS$1=TRANSFORMABLE_PROPS.concat(["ignore"]),DEFAULT_ANIMATABLE_MAP=reduce(TRANSFORMABLE_PROPS,(function(t,e){return t[e]=!0,t}),{ignore:!1}),tmpTextPosCalcRes={},tmpBoundingRect=new BoundingRect$1(0,0,0,0),Element$2=function(){function t(t){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,s=e.innerTransformable,a=void 0,o=void 0,r=!1;s.parent=n?this:null;var l=!1;if(s.copyTransform(e),null!=i.position){var h=tmpBoundingRect;i.layoutRect?h.copy(i.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(tmpTextPosCalcRes,i,h):calculateTextPosition(tmpTextPosCalcRes,i,h),s.x=tmpTextPosCalcRes.x,s.y=tmpTextPosCalcRes.y,a=tmpTextPosCalcRes.align,o=tmpTextPosCalcRes.verticalAlign;var c=i.origin;if(c&&null!=i.rotation){var u=void 0,d=void 0;"center"===c?(u=.5*h.width,d=.5*h.height):(u=parsePercent$1(c[0],h.width),d=parsePercent$1(c[1],h.height)),l=!0,s.originX=-s.x+u+(n?0:h.x),s.originY=-s.y+d+(n?0:h.y)}}null!=i.rotation&&(s.rotation=i.rotation);var p=i.offset;p&&(s.x+=p[0],s.y+=p[1],l||(s.originX=-p[0],s.originY=-p[1]));var g=null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside,f=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,b=void 0;g&&this.canBeInsideText()?(m=i.insideFill,v=i.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),b=!0)):(m=i.outsideFill,v=i.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),b=!0)),(m=m||"#000")===f.fill&&v===f.stroke&&b===f.autoStroke&&a===f.align&&o===f.verticalAlign||(r=!0,f.fill=m,f.stroke=v,f.autoStroke=b,f.align=a,f.verticalAlign=o,e.setDefaultTextStyle(f)),e.__dirty|=REDRAW_BIT,r&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?LIGHT_LABEL_COLOR:DARK_LABEL_COLOR},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i="string"==typeof e&&parse(e);i||(i=[255,255,255,1]);for(var n=i[3],s=this.__zr.isDarkMode(),a=0;a<3;a++)i[a]=i[a]*n+(s?0:255)*(1-n);return i[3]=1,stringify(i,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},extend(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(isObject$2(t))for(var i=keys(t),n=0;n<i.length;n++){var s=i[n];this.attrKV(s,t[s])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],s=n.__fromStateTransition;if(!(n.getLoop()||s&&s!==PRESERVED_NORMAL_STATE)){var a=n.targetName,o=a?e[a]:e;n.saveTo(o)}}},t.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,PRIMARY_STATES_KEYS$1)},t.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var s=i[n];null==t[s]||s in e||(e[s]=this[s])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(PRESERVED_NORMAL_STATE,!1,t)},t.prototype.useState=function(t,e,i,n){var s=t===PRESERVED_NORMAL_STATE;if(this.hasState()||!s){var a=this.currentStates,o=this.stateTransition;if(!(indexOf(a,t)>=0)||!e&&1!==a.length){var r;if(this.stateProxy&&!s&&(r=this.stateProxy(t)),r||(r=this.states&&this.states[t]),r||s){s||this.saveCurrentToNormalState(r);var l=!!(r&&r.hoverLayer||n);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,r,this._normalState,e,!i&&!this.__inHover&&o&&o.duration>0,o);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,l),c&&c.useState(t,e,i,l),s?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT),r}logError("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,i){if(t.length){var n=[],s=this.currentStates,a=t.length,o=a===s.length;if(o)for(var r=0;r<a;r++)if(t[r]!==s[r]){o=!1;break}if(o)return;for(r=0;r<a;r++){var l=t[r],h=void 0;this.stateProxy&&(h=this.stateProxy(l,t)),h||(h=this.states[l]),h&&n.push(h)}var c=n[a-1],u=!!(c&&c.hoverLayer||i);u&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(n),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var g=this._textContent,f=this._textGuide;g&&g.useStates(t,e,u),f&&f.useStates(t,e,u),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},t.prototype.removeState=function(t){var e=indexOf(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},t.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),s=indexOf(n,t),a=indexOf(n,e)>=0;s>=0?a?n.splice(s,1):n[s]=e:i&&!a&&n.push(e),this.useStates(n)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,i={},n=0;n<t.length;n++){var s=t[n];extend(i,s),s.textConfig&&extend(e=e||{},s.textConfig)}return e&&(i.textConfig=e),i},t.prototype._applyStateObj=function(t,e,i,n,s,a){var o=!(e&&n);e&&e.textConfig?(this.textConfig=extend({},n?this.textConfig:i.textConfig),extend(this.textConfig,e.textConfig)):o&&i.textConfig&&(this.textConfig=i.textConfig);for(var r={},l=!1,h=0;h<PRIMARY_STATES_KEYS$1.length;h++){var c=PRIMARY_STATES_KEYS$1[h],u=s&&DEFAULT_ANIMATABLE_MAP[c];e&&null!=e[c]?u?(l=!0,r[c]=e[c]):this[c]=e[c]:o&&null!=i[c]&&(u?(l=!0,r[c]=i[c]):this[c]=i[c])}if(!s)for(h=0;h<this.animators.length;h++){var d=this.animators[h],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(e||i)[p]:e||i)}l&&this._transitionState(t,r,a)},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new Transformable$1,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),extend(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=REDRAW_BIT;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,e,i){var n=t?this[t]:this,s=new Animator(n,e,i);return t&&(s.targetName=t),this.addAnimator(s,t),s},t.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during((function(){n.updateDuringAnimation(e)})).done((function(){var e=n.animators,i=indexOf(e,t);i>=0&&e.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,s=[],a=0;a<n;a++){var o=i[a];t&&t!==o.scope?s.push(o):o.stop(e)}return this.animators=s,this},t.prototype.animateTo=function(t,e,i){animateTo(this,t,e,i)},t.prototype.animateFrom=function(t,e,i){animateTo(this,t,e,i,!0)},t.prototype._transitionState=function(t,e,i,n){for(var s=animateTo(this,e,i,n),a=0;a<s.length;a++)s[a].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;function i(t,i,n,s){function a(t,e){Object.defineProperty(e,0,{get:function(){return t[n]},set:function(e){t[n]=e}}),Object.defineProperty(e,1,{get:function(){return t[s]},set:function(e){t[s]=e}})}Object.defineProperty(e,t,{get:function(){this[i]||a(this,this[i]=[]);return this[i]},set:function(t){this[n]=t[0],this[s]=t[1],this[i]=t,a(this,t)}})}e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=REDRAW_BIT,Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();function animateTo(t,e,i,n,s){var a=[];animateToShallow(t,"",t,e,i=i||{},n,a,s);var o=a.length,r=!1,l=i.done,h=i.aborted,c=function(){r=!0,--o<=0&&(r?l&&l():h&&h())},u=function(){--o<=0&&(r?l&&l():h&&h())};o||l&&l(),a.length>0&&i.during&&a[0].during((function(t,e){i.during(e)}));for(var d=0;d<a.length;d++){var p=a[d];c&&p.done(c),u&&p.aborted(u),i.force&&p.duration(i.duration),p.start(i.easing)}return a}function copyArrShallow(t,e,i){for(var n=0;n<i;n++)t[n]=e[n]}function is2DArray(t){return isArrayLike(t[0])}function copyValue(t,e,i){if(isArrayLike(e[i]))if(isArrayLike(t[i])||(t[i]=[]),isTypedArray(e[i])){var n=e[i].length;t[i].length!==n&&(t[i]=new e[i].constructor(n),copyArrShallow(t[i],e[i],n))}else{var s=e[i],a=t[i],o=s.length;if(is2DArray(s))for(var r=s[0].length,l=0;l<o;l++)a[l]?copyArrShallow(a[l],s[l],r):a[l]=Array.prototype.slice.call(s[l]);else copyArrShallow(a,s,o);a.length=s.length}else t[i]=e[i]}function isValueSame(t,e){return t===e||isArrayLike(t)&&isArrayLike(e)&&is1DArraySame(t,e)}function is1DArraySame(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function animateToShallow(t,e,i,n,s,a,o,r){for(var l=keys(n),h=s.duration,c=s.delay,u=s.additive,d=s.setToFinal,p=!isObject$2(a),g=t.animators,f=[],m=0;m<l.length;m++){var v=l[m],b=n[v];if(null!=b&&null!=i[v]&&(p||a[v]))if(!isObject$2(b)||isArrayLike(b)||isGradientObject(b))f.push(v);else{if(e){r||(i[v]=b,t.updateDuringAnimation(e));continue}animateToShallow(t,v,i[v],b,s,a&&a[v],o,r)}else r||(i[v]=b,t.updateDuringAnimation(e),f.push(v))}var y=f.length;if(!u&&y)for(var S=0;S<g.length;S++){if((w=g[S]).targetName===e)if(w.stopTracks(f)){var x=indexOf(g,w);g.splice(x,1)}}if(s.force||(y=(f=filter(f,(function(t){return!isValueSame(n[t],i[t])}))).length),y>0||s.force&&!o.length){var w,C=void 0,T=void 0,D=void 0;if(r){T={},d&&(C={});for(S=0;S<y;S++){T[v=f[S]]=i[v],d?C[v]=n[v]:i[v]=n[v]}}else if(d){D={};for(S=0;S<y;S++){D[v=f[S]]=cloneValue(i[v]),copyValue(i,n,v)}}(w=new Animator(i,!1,!1,u?filter(g,(function(t){return t.targetName===e})):null)).targetName=e,s.scope&&(w.scope=s.scope),d&&C&&w.whenWithKeys(0,C,f),D&&w.whenWithKeys(0,D,f),w.whenWithKeys(null==h?500:h,r?T:n,f).delay(c||0),t.addAnimator(w,e),o.push(w)}}mixin(Element$2,Eventful$1),mixin(Element$2,Transformable$1);var Element$3=Element$2,Group$3=function(t){function e(e){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return __extends(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var i=indexOf(this._children,t);return i>=0&&this.replaceAt(e,i),this},e.prototype.replaceAt=function(t,e){var i=this._children,n=i[e];if(t&&t!==this&&t.parent!==this&&t!==n){i[e]=t,n.parent=null;var s=this.__zr;s&&n.removeSelfFromZr(s),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,i=this._children,n=indexOf(i,t);return n<0||(i.splice(n,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,i=0;i<t.length;i++){var n=t[i];e&&n.removeSelfFromZr(e),n.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,e){for(var i=this._children,n=0;n<i.length;n++){var s=i[n];t.call(e,s,n)}return this},e.prototype.traverse=function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i],s=t.call(e,n);n.isGroup&&!s&&n.traverse(t,e)}return this},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++){this._children[i].addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++){this._children[i].removeSelfFromZr(e)}},e.prototype.getBoundingRect=function(t){for(var e=new BoundingRect$1(0,0,0,0),i=t||this._children,n=[],s=null,a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var r=o.getBoundingRect(),l=o.getLocalTransform(n);l?(BoundingRect$1.applyTransform(e,r,l),(s=s||e.clone()).union(e)):(s=s||r.clone()).union(r)}}return s||e},e}(Element$3);Group$3.prototype.type="group";var Group$4=Group$3,painterCtors={},instances$1={};
/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/function delInstance(t){delete instances$1[t]}function isDarkMode(t){if(!t)return!1;if("string"==typeof t)return lum(t,1)<DARK_MODE_THRESHOLD;if(t.colorStops){for(var e=t.colorStops,i=0,n=e.length,s=0;s<n;s++)i+=lum(e[s].color,1);return(i/=n)<DARK_MODE_THRESHOLD}return!1}var ZRender=function(){function t(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var s=new Storage$1,a=i.renderer||"canvas";painterCtors[a]||(a=keys(painterCtors)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var o=new painterCtors[a](e,s,i,t),r=i.ssr||o.ssrOnly;this.storage=s,this.painter=o;var l,h=env$1.node||env$1.worker||r?null:new HandlerProxy(o.getViewportRoot(),o.root),c=i.useCoarsePointer;(null==c||"auto"===c?env$1.touchEventsSupported:!!c)&&(l=retrieve2(i.pointerSize,44)),this.handler=new Handler$1(s,o,h,o.root,l),this.animation=new Animation$1({stage:{update:r?null:function(){return n._flush(!0)}}}),r||this.animation.start()}return t.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},t.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=isDarkMode(t))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(t){var e,i=getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Group$4&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,delInstance(this.id))},t}(),ssrDataGetter;function init$1(t,e){var i=new ZRender(guid(),t,e);return instances$1[i.id]=i,i}function registerPainter(t,e){painterCtors[t]=e}function getElementSSRData(t){if("function"==typeof ssrDataGetter)return ssrDataGetter(t)}function registerSSRDataGetter(t){ssrDataGetter=t}var RADIAN_EPSILON=1e-4,ROUND_SUPPORTED_PRECISION_MAX=20;function _trim(t){return t.replace(/^\s+|\s+$/g,"")}function linearMap(t,e,i,n){var s=e[0],a=e[1],o=i[0],r=i[1],l=a-s,h=r-o;if(0===l)return 0===h?o:(o+r)/2;if(n)if(l>0){if(t<=s)return o;if(t>=a)return r}else{if(t>=s)return o;if(t<=a)return r}else{if(t===s)return o;if(t===a)return r}return(t-s)/l*h+o}function parsePercent(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return isString(t)?_trim(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function round$1(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),ROUND_SUPPORTED_PRECISION_MAX),t=(+t).toFixed(e),i?t:+t}function asc(t){return t.sort((function(t,e){return t-e})),t}function getPrecision(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,i=0;i<15;i++,e*=10)if(Math.round(t*e)/e===t)return i;return getPrecisionSafe(t)}function getPrecisionSafe(t){var e=t.toString().toLowerCase(),i=e.indexOf("e"),n=i>0?+e.slice(i+1):0,s=i>0?i:e.length,a=e.indexOf("."),o=a<0?0:s-1-a;return Math.max(0,o-n)}function getPixelPrecision(t,e){var i=Math.log,n=Math.LN10,s=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-s+a,0),20);return isFinite(o)?o:20}function getPercentSeats(t,e){var i=reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return[];for(var n=Math.pow(10,e),s=map$1(t,(function(t){return(isNaN(t)?0:t)/i*n*100})),a=100*n,o=map$1(s,(function(t){return Math.floor(t)})),r=reduce(o,(function(t,e){return t+e}),0),l=map$1(s,(function(t,e){return t-o[e]}));r<a;){for(var h=Number.NEGATIVE_INFINITY,c=null,u=0,d=l.length;u<d;++u)l[u]>h&&(h=l[u],c=u);++o[c],l[c]=0,++r}return map$1(o,(function(t){return t/n}))}function addSafe(t,e){var i=Math.max(getPrecision(t),getPrecision(e)),n=t+e;return i>ROUND_SUPPORTED_PRECISION_MAX?n:round$1(n,i)}var MAX_SAFE_INTEGER=9007199254740991;function remRadian(t){var e=2*Math.PI;return(t%e+e)%e}function isRadianAroundZero(t){return t>-RADIAN_EPSILON&&t<RADIAN_EPSILON}var TIME_REG=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function parseDate(t){if(t instanceof Date)return t;if(isString(t)){var e=TIME_REG.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(Math.round(t))}function quantity(t){return Math.pow(10,quantityExponent(t))}function quantityExponent(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function nice(t,e){var i=quantityExponent(t),n=Math.pow(10,i),s=t/n;return t=(e?s<1.5?1:s<2.5?2:s<4?3:s<7?5:10:s<1?1:s<2?2:s<3?3:s<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t}function quantile(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),s=+t[n-1],a=i-n;return a?s+a*(t[n]-s):s}function reformIntervals(t){t.sort((function(t,e){return r(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var s=t[n].interval,a=t[n].close,o=0;o<2;o++)s[o]<=e&&(s[o]=e,a[o]=o?1:1-i),e=s[o],i=a[o];s[0]===s[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t;function r(t,e,i){return t.interval[i]<e.interval[i]||t.interval[i]===e.interval[i]&&(t.close[i]-e.close[i]==(i?-1:1)||!i&&r(t,e,1))}}function numericToNumber(t){var e=parseFloat(t);return e==t&&(0!==e||!isString(t)||t.indexOf("x")<=0)?e:NaN}function isNumeric(t){return!isNaN(numericToNumber(t))}function getRandomIdBase(){return Math.round(9*Math.random())}function getGreatestCommonDividor(t,e){return 0===e?t:getGreatestCommonDividor(e,t%e)}function getLeastCommonMultiple(t,e){return null==t?e:null==e?t:t*e/getGreatestCommonDividor(t,e)}var ECHARTS_PREFIX="[ECharts] ",storedLogs={},hasConsole="undefined"!=typeof console&&console.warn&&console.log;function outputLog(t,e,i){if(hasConsole&&i){if(storedLogs[e])return;storedLogs[e]=!0}}function warn(t,e){outputLog("warn",t,e)}function throwError(t){throw new Error(t)}function interpolateNumber(t,e,i){return(e-t)*i+t}var DUMMY_COMPONENT_NAME_PREFIX="series\0",INTERNAL_COMPONENT_ID_PREFIX="\0_ec_\0";function normalizeToArray(t){return t instanceof Array?t:null==t?[]:[t]}function defaultEmphasis(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,s=i.length;n<s;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function getDataItemValue(t){return!isObject$2(t)||isArray(t)||t instanceof Date?t:t.value}function isDataItemOption(t){return isObject$2(t)&&!(t instanceof Array)}function mappingToExists(t,e,i){var n="normalMerge"===i,s="replaceMerge"===i,a="replaceAll"===i;t=t||[],e=(e||[]).slice();var o=createHashMap();each$4(e,(function(t,i){isObject$2(t)||(e[i]=null)}));var r=prepareResult(t,o,i);return(n||s)&&mappingById(r,t,o,e),n&&mappingByName(r,e),n||s?mappingByIndex(r,e,s):a&&mappingInReplaceAllMode(r,e),makeIdAndName(r),r}function prepareResult(t,e,i){var n=[];if("replaceAll"===i)return n;for(var s=0;s<t.length;s++){var a=t[s];a&&null!=a.id&&e.set(a.id,s),n.push({existing:"replaceMerge"===i||isComponentIdInternal(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function mappingById(t,e,i,n){each$4(n,(function(s,a){if(s&&null!=s.id){var o=makeComparableKey(s.id),r=i.get(o);if(null!=r){var l=t[r];assert(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=s,l.existing=e[r],n[a]=null}}}))}function mappingByName(t,e){each$4(e,(function(i,n){if(i&&null!=i.name)for(var s=0;s<t.length;s++){var a=t[s].existing;if(!t[s].newOption&&a&&(null==a.id||null==i.id)&&!isComponentIdInternal(i)&&!isComponentIdInternal(a)&&keyExistAndEqual("name",a,i))return t[s].newOption=i,void(e[n]=null)}}))}function mappingByIndex(t,e,i){each$4(e,(function(e){if(e){for(var n,s=0;(n=t[s])&&(n.newOption||isComponentIdInternal(n.existing)||n.existing&&null!=e.id&&!keyExistAndEqual("id",e,n.existing));)s++;n?(n.newOption=e,n.brandNew=i):t.push({newOption:e,brandNew:i,existing:null,keyInfo:null}),s++}}))}function mappingInReplaceAllMode(t,e){each$4(e,(function(e){t.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})}))}function makeIdAndName(t){var e=createHashMap();each$4(t,(function(t){var i=t.existing;i&&e.set(i.id,t)})),each$4(t,(function(t){var i=t.newOption;assert(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})})),each$4(t,(function(t,i){var n=t.existing,s=t.newOption,a=t.keyInfo;if(isObject$2(s)){if(a.name=null!=s.name?makeComparableKey(s.name):n?n.name:DUMMY_COMPONENT_NAME_PREFIX+i,n)a.id=makeComparableKey(n.id);else if(null!=s.id)a.id=makeComparableKey(s.id);else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}}))}function keyExistAndEqual(t,e,i){var n=convertOptionIdName(e[t],null),s=convertOptionIdName(i[t],null);return null!=n&&null!=s&&n===s}function makeComparableKey(t){return convertOptionIdName(t,"")}function convertOptionIdName(t,e){return null==t?e:isString(t)?t:isNumber$1(t)||isStringSafe(t)?t+"":e}function isNameSpecified(t){var e=t.name;return!(!e||!e.indexOf(DUMMY_COMPONENT_NAME_PREFIX))}function isComponentIdInternal(t){return t&&null!=t.id&&0===makeComparableKey(t.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX)}function makeInternalComponentId(t){return INTERNAL_COMPONENT_ID_PREFIX+t}function setComponentTypeToKeyInfo(t,e,i){each$4(t,(function(t){var n=t.newOption;isObject$2(n)&&(t.keyInfo.mainType=e,t.keyInfo.subType=determineSubType(e,n,t.existing,i))}))}function determineSubType(t,e,i,n){return e.type?e.type:i?i.subType:n.determineSubType(t,e)}function compressBatches(t,e){var i={},n={};return s(t||[],i),s(e||[],n,i),[a(i),a(n)];function s(t,e,i){for(var n=0,s=t.length;n<s;n++){var a=convertOptionIdName(t[n].seriesId,null);if(null==a)return;for(var o=normalizeToArray(t[n].dataIndex),r=i&&i[a],l=0,h=o.length;l<h;l++){var c=o[l];r&&r[c]?r[c]=null:(e[a]||(e[a]={}))[c]=1}}}function a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var s=a(t[n],!0);s.length&&i.push({seriesId:n,dataIndex:s})}return i}}function queryDataIndex(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?isArray(e.dataIndex)?map$1(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?isArray(e.name)?map$1(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0}function makeInner(){var t="__ec_inner_"+innerUniqueIndex++;return function(e){return e[t]||(e[t]={})}}var innerUniqueIndex=getRandomIdBase();function parseFinder(t,e,i){var n=preParseFinder(e,i),s=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,r=i?i.defaultMainType:null;return!s&&r&&a.set(r,{}),a.each((function(e,n){var s=queryReferringComponents(t,n,e,{useDefault:r===n,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});o[n+"Models"]=s.models,o[n+"Model"]=s.models[0]})),o}function preParseFinder(t,e){var i;if(isString(t)){var n={};n[t+"Index"]=0,i=n}else i=t;var s=createHashMap(),a={},o=!1;return each$4(i,(function(t,i){if("dataIndex"!==i&&"dataIndexInside"!==i){var n=i.match(/^(\w+)(Index|Id|Name)$/)||[],r=n[1],l=(n[2]||"").toLowerCase();if(r&&l&&!(e&&e.includeMainTypes&&indexOf(e.includeMainTypes,r)<0))o=o||!!r,(s.get(r)||s.set(r,{}))[l]=t}else a[i]=t})),{mainTypeSpecified:o,queryOptionMap:s,others:a}}var SINGLE_REFERRING={useDefault:!0,enableAll:!1,enableNone:!1},MULTIPLE_REFERRING={useDefault:!1,enableAll:!0,enableNone:!0};function queryReferringComponents(t,e,i,n){n=n||SINGLE_REFERRING;var s=i.index,a=i.id,o=i.name,r={models:null,specified:null!=s||null!=a||null!=o};if(!r.specified){var l=void 0;return r.models=n.useDefault&&(l=t.getComponent(e))?[l]:[],r}return"none"===s||!1===s?(assert(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),r.models=[],r):("all"===s&&(assert(n.enableAll,'`"all"` is not a valid value on index option.'),s=a=o=null),r.models=t.queryComponents({mainType:e,index:s,id:a,name:o}),r)}function setAttribute(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function getAttribute(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function getTooltipRenderMode(t){return"auto"===t?env$1.domSupported?"html":"richText":t||"html"}function groupData(t,e){var i=createHashMap(),n=[];return each$4(t,(function(t){var s=e(t);(i.get(s)||(n.push(s),i.set(s,[]))).push(t)})),{keys:n,buckets:i}}function interpolateRawValues(t,e,i,n,s){var a=null==e||"auto"===e;if(null==n)return n;if(isNumber$1(n))return round$1(g=interpolateNumber(i||0,n,s),a?Math.max(getPrecision(i||0),getPrecision(n)):e);if(isString(n))return s<1?i:n;for(var o=[],r=i,l=n,h=Math.max(r?r.length:0,l.length),c=0;c<h;++c){var u=t.getDimensionInfo(c);if(u&&"ordinal"===u.type)o[c]=(s<1&&r?r:l)[c];else{var d=r&&r[c]?r[c]:0,p=l[c],g=interpolateNumber(d,p,s);o[c]=round$1(g,a?Math.max(getPrecision(d),getPrecision(p)):e)}}return o}var TYPE_DELIMITER=".",IS_CONTAINER="___EC__COMPONENT__CONTAINER___",IS_EXTENDED_CLASS="___EC__EXTENDED_CLASS___";function parseClassType(t){var e={main:"",sub:""};if(t){var i=t.split(TYPE_DELIMITER);e.main=i[0]||"",e.sub=i[1]||""}return e}function checkClassType(t){assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function isExtendedClass(t){return!(!t||!t[IS_EXTENDED_CLASS])}function enableClassExtend(t,e){t.$constructor=t,t.extend=function(t){var e,i=this;return isESClass(i)?e=function(t){function e(){return t.apply(this,arguments)||this}return __extends(e,t),e}(i):(e=function(){(t.$constructor||i).apply(this,arguments)},inherits(e,this)),extend(e.prototype,t),e[IS_EXTENDED_CLASS]=!0,e.extend=this.extend,e.superCall=superCall,e.superApply=superApply,e.superClass=i,e}}function isESClass(t){return isFunction(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function mountExtend(t,e){t.extend=e.extend}var classBase=Math.round(10*Math.random());function enableClassCheck(t){var e=["__\0is_clz",classBase++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function superCall(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,i)}function superApply(t,e,i){return this.superClass.prototype[e].apply(t,i)}function enableClassManagement(t){var e={};t.registerClass=function(t){var i=t.type||t.prototype.type;if(i){checkClassType(i),t.prototype.type=i;var n=parseClassType(i);if(n.sub){if(n.sub!==IS_CONTAINER){var s=function(t){var i=e[t.main];i&&i[IS_CONTAINER]||((i=e[t.main]={})[IS_CONTAINER]=!0);return i}(n);s[n.sub]=t}}else e[n.main]=t}return t},t.getClass=function(t,i,n){var s=e[t];if(s&&s[IS_CONTAINER]&&(s=i?s[i]:null),n&&!s)throw new Error(i?"Component "+t+"."+(i||"")+" is used but not imported.":t+".type should be specified.");return s},t.getClassesByMainType=function(t){var i=parseClassType(t),n=[],s=e[i.main];return s&&s[IS_CONTAINER]?each$4(s,(function(t,e){e!==IS_CONTAINER&&n.push(t)})):n.push(s),n},t.hasClass=function(t){var i=parseClassType(t);return!!e[i.main]},t.getAllClassMainTypes=function(){var t=[];return each$4(e,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){var i=parseClassType(t),n=e[i.main];return n&&n[IS_CONTAINER]}}function makeStyleMapper(t,e){for(var i=0;i<t.length;i++)t[i][1]||(t[i][1]=t[i][0]);return e=e||!1,function(i,n,s){for(var a={},o=0;o<t.length;o++){var r=t[o][1];if(!(n&&indexOf(n,r)>=0||s&&indexOf(s,r)<0)){var l=i.getShallow(r,e);null!=l&&(a[t[o][0]]=l)}}return a}}var AREA_STYLE_KEY_MAP=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],getAreaStyle=makeStyleMapper(AREA_STYLE_KEY_MAP),AreaStyleMixin=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return getAreaStyle(this,t,e)},t}(),globalImageCache=new LRU$1(50);function findExistImage(t){if("string"==typeof t){var e=globalImageCache.get(t);return e&&e.image}return t}function createOrUpdateImage(t,e,i,n,s){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=globalImageCache.get(t),o={hostEl:i,cb:n,cbPayload:s};return a?!isImageReady(e=a.image)&&a.pending.push(o):((e=platformApi.loadImage(t,imageOnLoad,imageOnLoad)).__zrImageSrc=t,globalImageCache.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}return t}return e}function imageOnLoad(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function isImageReady(t){return t&&t.width&&t.height}var STYLE_REG=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function truncateText2(t,e,i,n,s,a){if(!i)return t.text="",void(t.isTruncated=!1);var o=(e+"").split("\n");a=prepareTruncateOptions(i,n,s,a);for(var r=!1,l={},h=0,c=o.length;h<c;h++)truncateSingleLine(l,o[h],a),o[h]=l.textLine,r=r||l.isTruncated;t.text=o.join("\n"),t.isTruncated=r}function prepareTruncateOptions(t,e,i,n){var s=extend({},n=n||{});s.font=e,i=retrieve2(i,"..."),s.maxIterations=retrieve2(n.maxIterations,2);var a=s.minChar=retrieve2(n.minChar,0);s.cnCharWidth=getWidth("国",e);var o=s.ascCharWidth=getWidth("a",e);s.placeholder=retrieve2(n.placeholder,"");for(var r=t=Math.max(0,t-1),l=0;l<a&&r>=o;l++)r-=o;var h=getWidth(i,e);return h>r&&(i="",h=0),r=t-h,s.ellipsis=i,s.ellipsisWidth=h,s.contentWidth=r,s.containerWidth=t,s}function truncateSingleLine(t,e,i){var n=i.containerWidth,s=i.font,a=i.contentWidth;if(!n)return t.textLine="",void(t.isTruncated=!1);var o=getWidth(e,s);if(o<=n)return t.textLine=e,void(t.isTruncated=!1);for(var r=0;;r++){if(o<=a||r>=i.maxIterations){e+=i.ellipsis;break}var l=0===r?estimateLength(e,a,i.ascCharWidth,i.cnCharWidth):o>0?Math.floor(e.length*a/o):0;o=getWidth(e=e.substr(0,l),s)}""===e&&(e=i.placeholder),t.textLine=e,t.isTruncated=!0}function estimateLength(t,e,i,n){for(var s=0,a=0,o=t.length;a<o&&s<e;a++){var r=t.charCodeAt(a);s+=0<=r&&r<=127?i:n}return a}function parsePlainText(t,e){null!=t&&(t+="");var i,n=e.overflow,s=e.padding,a=e.font,o="truncate"===n,r=getLineHeight(a),l=retrieve2(e.lineHeight,r),h=!!e.backgroundColor,c="truncate"===e.lineOverflow,u=!1,d=e.width,p=(i=null==d||"break"!==n&&"breakAll"!==n?t?t.split("\n"):[]:t?wrapText(t,e.font,d,"breakAll"===n,0).lines:[]).length*l,g=retrieve2(e.height,p);if(p>g&&c){var f=Math.floor(g/l);u=u||i.length>f,i=i.slice(0,f)}if(t&&o&&null!=d)for(var m=prepareTruncateOptions(d,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v={},b=0;b<i.length;b++)truncateSingleLine(v,i[b],m),i[b]=v.textLine,u=u||v.isTruncated;var y=g,S=0;for(b=0;b<i.length;b++)S=Math.max(getWidth(i[b],a),S);null==d&&(d=S);var x=S;return s&&(y+=s[0]+s[2],x+=s[1]+s[3],d+=s[1]+s[3]),h&&(x=d),{lines:i,height:g,outerWidth:x,outerHeight:y,lineHeight:l,calculatedLineHeight:r,contentWidth:S,contentHeight:p,width:d,isTruncated:u}}var RichTextToken=function(){},RichTextLine=function(t){this.tokens=[],t&&(this.tokens=t)},RichTextContentBlock=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function parseRichText(t,e){var i=new RichTextContentBlock;if(null!=t&&(t+=""),!t)return i;for(var n,s=e.width,a=e.height,o=e.overflow,r="break"!==o&&"breakAll"!==o||null==s?null:{width:s,accumWidth:0,breakAll:"breakAll"===o},l=STYLE_REG.lastIndex=0;null!=(n=STYLE_REG.exec(t));){var h=n.index;h>l&&pushTokens(i,t.substring(l,h),e,r),pushTokens(i,n[2],e,r,n[1]),l=STYLE_REG.lastIndex}l<t.length&&pushTokens(i,t.substring(l,t.length),e,r);var c=[],u=0,d=0,p=e.padding,g="truncate"===o,f="truncate"===e.lineOverflow,m={};function v(t,e,i){t.width=e,t.lineHeight=i,u+=i,d=Math.max(d,e)}t:for(var b=0;b<i.lines.length;b++){for(var y=i.lines[b],S=0,x=0,w=0;w<y.tokens.length;w++){var C=(G=y.tokens[w]).styleName&&e.rich[G.styleName]||{},T=G.textPadding=C.padding,D=T?T[1]+T[3]:0,k=G.font=C.font||e.font;G.contentHeight=getLineHeight(k);var $=retrieve2(C.height,G.contentHeight);if(G.innerHeight=$,T&&($+=T[0]+T[2]),G.height=$,G.lineHeight=retrieve3(C.lineHeight,e.lineHeight,$),G.align=C&&C.align||e.align,G.verticalAlign=C&&C.verticalAlign||"middle",f&&null!=a&&u+G.lineHeight>a){var O=i.lines.length;w>0?(y.tokens=y.tokens.slice(0,w),v(y,x,S),i.lines=i.lines.slice(0,b+1)):i.lines=i.lines.slice(0,b),i.isTruncated=i.isTruncated||i.lines.length<O;break t}var P=C.width,L=null==P||"auto"===P;if("string"==typeof P&&"%"===P.charAt(P.length-1))G.percentWidth=P,c.push(G),G.contentWidth=getWidth(G.text,k);else{if(L){var I=C.backgroundColor,A=I&&I.image;A&&isImageReady(A=findExistImage(A))&&(G.width=Math.max(G.width,A.width*$/A.height))}var E=g&&null!=s?s-x:null;null!=E&&E<G.width?!L||E<D?(G.text="",G.width=G.contentWidth=0):(truncateText2(m,G.text,E-D,k,e.ellipsis,{minChar:e.truncateMinChar}),G.text=m.text,i.isTruncated=i.isTruncated||m.isTruncated,G.width=G.contentWidth=getWidth(G.text,k)):G.contentWidth=getWidth(G.text,k)}G.width+=D,x+=G.width,C&&(S=Math.max(S,G.lineHeight))}v(y,x,S)}i.outerWidth=i.width=retrieve2(s,d),i.outerHeight=i.height=retrieve2(a,u),i.contentHeight=u,i.contentWidth=d,p&&(i.outerWidth+=p[1]+p[3],i.outerHeight+=p[0]+p[2]);for(b=0;b<c.length;b++){var G,U=(G=c[b]).percentWidth;G.width=parseInt(U,10)/100*i.width}return i}function pushTokens(t,e,i,n,s){var a,o,r=""===e,l=s&&i.rich[s]||{},h=t.lines,c=l.font||i.font,u=!1;if(n){var d=l.padding,p=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var g=parsePercent$1(l.width,n.width)+p;h.length>0&&g+n.accumWidth>n.width&&(a=e.split("\n"),u=!0),n.accumWidth=g}else{var f=wrapText(e,c,n.width,n.breakAll,n.accumWidth);n.accumWidth=f.accumWidth+p,o=f.linesWidths,a=f.lines}}else a=e.split("\n");for(var m=0;m<a.length;m++){var v=a[m],b=new RichTextToken;if(b.styleName=s,b.text=v,b.isLineHolder=!v&&!r,"number"==typeof l.width?b.width=l.width:b.width=o?o[m]:getWidth(v,c),m||u)h.push(new RichTextLine([b]));else{var y=(h[h.length-1]||(h[0]=new RichTextLine)).tokens,S=y.length;1===S&&y[0].isLineHolder?y[0]=b:(v||!S||r)&&y.push(b)}}}function isAlphabeticLetter(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var breakCharMap=reduce(",&?/;] ".split(""),(function(t,e){return t[e]=!0,t}),{});function isWordBreakChar(t){return!isAlphabeticLetter(t)||!!breakCharMap[t]}function wrapText(t,e,i,n,s){for(var a=[],o=[],r="",l="",h=0,c=0,u=0;u<t.length;u++){var d=t.charAt(u);if("\n"!==d){var p=getWidth(d,e),g=!n&&!isWordBreakChar(d);(a.length?c+p>i:s+c+p>i)?c?(r||l)&&(g?(r||(r=l,l="",c=h=0),a.push(r),o.push(c-h),l+=d,r="",c=h+=p):(l&&(r+=l,l="",h=0),a.push(r),o.push(c),r=d,c=p)):g?(a.push(l),o.push(h),l=d,h=p):(a.push(d),o.push(p)):(c+=p,g?(l+=d,h+=p):(l&&(r+=l,l="",h=0),r+=d))}else l&&(r+=l,c+=h),a.push(r),o.push(c),r="",l="",h=0,c=0}return a.length||r||(r=t,l="",h=0),l&&(r+=l),r&&(a.push(r),o.push(c)),1===a.length&&(c+=s),{accumWidth:c,lines:a,linesWidths:o}}var STYLE_MAGIC_KEY="__zr_style_"+Math.round(10*Math.random()),DEFAULT_COMMON_STYLE={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},DEFAULT_COMMON_ANIMATION_PROPS={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};DEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY]=!0;var PRIMARY_STATES_KEYS=["z","z2","invisible"],PRIMARY_STATES_KEYS_IN_HOVER_LAYER=["invisible"],Displayable=function(t){function e(e){return t.call(this,e)||this}var i;return __extends(e,t),e.prototype._init=function(e){for(var i=keys(e),n=0;n<i.length;n++){var s=i[n];"style"===s?this.useStyle(e[s]):t.prototype.attrKV.call(this,s,e[s])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,e,i,n){var s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&isDisplayableCulled(this,t,e)||s&&!s[0]&&!s[3])return!1;if(i&&this.__clipPaths)for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1;if(n&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},e.prototype.contain=function(t,e){return this.rectContain(t,e)},e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.rectContain=function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var e=this.transform,i=this.getBoundingRect(),n=this.style,s=n.shadowBlur||0,a=n.shadowOffsetX||0,o=n.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new BoundingRect$1(0,0,0,0)),e?BoundingRect$1.applyTransform(t,i,e):t.copy(i),(s||a||o)&&(t.width+=2*s+Math.abs(a),t.height+=2*s+Math.abs(o),t.x=Math.min(t.x,t.x+a-s),t.y=Math.min(t.y,t.y+o-s));var r=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-r),t.y=Math.floor(t.y-r),t.width=Math.ceil(t.width+1+2*r),t.height=Math.ceil(t.height+1+2*r))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new BoundingRect$1(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(e,i){"style"!==e?t.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:extend(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&STYLE_CHANGED_BIT)},e.prototype.styleUpdated=function(){this.__dirty&=~STYLE_CHANGED_BIT},e.prototype.createStyle=function(t){return createObject(DEFAULT_COMMON_STYLE,t)},e.prototype.useStyle=function(t){t[STYLE_MAGIC_KEY]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[STYLE_MAGIC_KEY]},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,PRIMARY_STATES_KEYS)},e.prototype._applyStateObj=function(e,i,n,s,a,o){t.prototype._applyStateObj.call(this,e,i,n,s,a,o);var r,l=!(i&&s);if(i&&i.style?a?s?r=i.style:(r=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(r,i.style)):(r=this._mergeStyle(this.createStyle(),s?this.style:n.style),this._mergeStyle(r,i.style)):l&&(r=n.style),r)if(a){var h=this.style;if(this.style=this.createStyle(l?{}:h),l)for(var c=keys(h),u=0;u<c.length;u++){(p=c[u])in r&&(r[p]=r[p],this.style[p]=h[p])}var d=keys(r);for(u=0;u<d.length;u++){var p=d[u];this.style[p]=this.style[p]}this._transitionState(e,{style:r},o,this.getAnimationStyleProps())}else this.useStyle(r);var g=this.__inHover?PRIMARY_STATES_KEYS_IN_HOVER_LAYER:PRIMARY_STATES_KEYS;for(u=0;u<g.length;u++){p=g[u];i&&null!=i[p]?this[p]=i[p]:l&&null!=n[p]&&(this[p]=n[p])}},e.prototype._mergeStates=function(e){for(var i,n=t.prototype._mergeStates.call(this,e),s=0;s<e.length;s++){var a=e[s];a.style&&(i=i||{},this._mergeStyle(i,a.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(t,e){return extend(t,e),t},e.prototype.getAnimationStyleProps=function(){return DEFAULT_COMMON_ANIMATION_PROPS},e.initDefaultProps=((i=e.prototype).type="displayable",i.invisible=!1,i.z=0,i.z2=0,i.zlevel=0,i.culling=!1,i.cursor="pointer",i.rectHover=!1,i.incremental=!1,i._rect=null,i.dirtyRectTolerance=0,void(i.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT)),e}(Element$3),tmpRect=new BoundingRect$1(0,0,0,0),viewRect=new BoundingRect$1(0,0,0,0);function isDisplayableCulled(t,e,i){return tmpRect.copy(t.getBoundingRect()),t.transform&&tmpRect.applyTransform(t.transform),viewRect.width=e,viewRect.height=i,!tmpRect.intersect(viewRect)}var Displayable$1=Displayable,mathMin$3=Math.min,mathMax$3=Math.max,mathSin$3=Math.sin,mathCos$3=Math.cos,PI2$5=2*Math.PI,start=create$1(),end=create$1(),extremity=create$1();function fromPoints(t,e,i){if(0!==t.length){for(var n=t[0],s=n[0],a=n[0],o=n[1],r=n[1],l=1;l<t.length;l++)n=t[l],s=mathMin$3(s,n[0]),a=mathMax$3(a,n[0]),o=mathMin$3(o,n[1]),r=mathMax$3(r,n[1]);e[0]=s,e[1]=o,i[0]=a,i[1]=r}}function fromLine(t,e,i,n,s,a){s[0]=mathMin$3(t,i),s[1]=mathMin$3(e,n),a[0]=mathMax$3(t,i),a[1]=mathMax$3(e,n)}var xDim=[],yDim=[];function fromCubic(t,e,i,n,s,a,o,r,l,h){var c=cubicExtrema,u=cubicAt,d=c(t,i,s,o,xDim);l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0;for(var p=0;p<d;p++){var g=u(t,i,s,o,xDim[p]);l[0]=mathMin$3(g,l[0]),h[0]=mathMax$3(g,h[0])}d=c(e,n,a,r,yDim);for(p=0;p<d;p++){var f=u(e,n,a,r,yDim[p]);l[1]=mathMin$3(f,l[1]),h[1]=mathMax$3(f,h[1])}l[0]=mathMin$3(t,l[0]),h[0]=mathMax$3(t,h[0]),l[0]=mathMin$3(o,l[0]),h[0]=mathMax$3(o,h[0]),l[1]=mathMin$3(e,l[1]),h[1]=mathMax$3(e,h[1]),l[1]=mathMin$3(r,l[1]),h[1]=mathMax$3(r,h[1])}function fromQuadratic(t,e,i,n,s,a,o,r){var l=quadraticExtremum,h=quadraticAt,c=mathMax$3(mathMin$3(l(t,i,s),1),0),u=mathMax$3(mathMin$3(l(e,n,a),1),0),d=h(t,i,s,c),p=h(e,n,a,u);o[0]=mathMin$3(t,s,d),o[1]=mathMin$3(e,a,p),r[0]=mathMax$3(t,s,d),r[1]=mathMax$3(e,a,p)}function fromArc(t,e,i,n,s,a,o,r,l){var h=min$1,c=max$1,u=Math.abs(s-a);if(u%PI2$5<1e-4&&u>1e-4)return r[0]=t-i,r[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(start[0]=mathCos$3(s)*i+t,start[1]=mathSin$3(s)*n+e,end[0]=mathCos$3(a)*i+t,end[1]=mathSin$3(a)*n+e,h(r,start,end),c(l,start,end),(s%=PI2$5)<0&&(s+=PI2$5),(a%=PI2$5)<0&&(a+=PI2$5),s>a&&!o?a+=PI2$5:s<a&&o&&(s+=PI2$5),o){var d=a;a=s,s=d}for(var p=0;p<a;p+=Math.PI/2)p>s&&(extremity[0]=mathCos$3(p)*i+t,extremity[1]=mathSin$3(p)*n+e,h(r,extremity,r),c(l,extremity,l))}var CMD$2={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},tmpOutX=[],tmpOutY=[],min=[],max=[],min2=[],max2=[],mathMin$2=Math.min,mathMax$2=Math.max,mathCos$2=Math.cos,mathSin$2=Math.sin,mathAbs$1=Math.abs,PI$4=Math.PI,PI2$4=2*PI$4,hasTypedArray="undefined"!=typeof Float32Array,tmpAngles=[];function modPI2(t){return Math.round(t/PI$4*1e8)/1e8%2*PI$4}function normalizeArcAngles(t,e){var i=modPI2(t[0]);i<0&&(i+=PI2$4);var n=i-t[0],s=t[1];s+=n,!e&&s-i>=PI2$4?s=i+PI2$4:e&&i-s>=PI2$4?s=i-PI2$4:!e&&i>s?s=i+(PI2$4-modPI2(i-s)):e&&i<s&&(s=i-(PI2$4-modPI2(s-i))),t[0]=i,t[1]=s}var PathProxy=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var e;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,e,i){(i=i||0)>0&&(this._ux=mathAbs$1(i/devicePixelRatio/t)||0,this._uy=mathAbs$1(i/devicePixelRatio/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(CMD$2.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var i=mathAbs$1(t-this._xi),n=mathAbs$1(e-this._yi),s=i>this._ux||n>this._uy;if(this.addData(CMD$2.L,t,e),this._ctx&&s&&this._ctx.lineTo(t,e),s)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var a=i*i+n*n;a>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=a)}return this},t.prototype.bezierCurveTo=function(t,e,i,n,s,a){return this._drawPendingPt(),this.addData(CMD$2.C,t,e,i,n,s,a),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,s,a),this._xi=s,this._yi=a,this},t.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(CMD$2.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},t.prototype.arc=function(t,e,i,n,s,a){this._drawPendingPt(),tmpAngles[0]=n,tmpAngles[1]=s,normalizeArcAngles(tmpAngles,a),n=tmpAngles[0];var o=(s=tmpAngles[1])-n;return this.addData(CMD$2.A,t,e,i,i,n,o,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,s,a),this._xi=mathCos$2(s)*i+t,this._yi=mathSin$2(s)*i+e,this},t.prototype.arcTo=function(t,e,i,n,s){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,s),this},t.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(CMD$2.R,t,e,i,n),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(CMD$2.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!hasTypedArray||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},t.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,s=0;s<e;s++)i+=t[s].len();hasTypedArray&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(s=0;s<e;s++)for(var a=t[s].data,o=0;o<a.length;o++)this.data[n++]=a[o];this._len=n},t.prototype.addData=function(t,e,i,n,s,a,o,r,l){if(this._saveData){var h=this.data;this._len+arguments.length>h.length&&(this._expandData(),h=this.data);for(var c=0;c<arguments.length;c++)h[this._len++]=arguments[c]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,hasTypedArray&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){min[0]=min[1]=min2[0]=min2[1]=Number.MAX_VALUE,max[0]=max[1]=max2[0]=max2[1]=-Number.MAX_VALUE;var t,e=this.data,i=0,n=0,s=0,a=0;for(t=0;t<this._len;){var o=e[t++],r=1===t;switch(r&&(s=i=e[t],a=n=e[t+1]),o){case CMD$2.M:i=s=e[t++],n=a=e[t++],min2[0]=s,min2[1]=a,max2[0]=s,max2[1]=a;break;case CMD$2.L:fromLine(i,n,e[t],e[t+1],min2,max2),i=e[t++],n=e[t++];break;case CMD$2.C:fromCubic(i,n,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],min2,max2),i=e[t++],n=e[t++];break;case CMD$2.Q:fromQuadratic(i,n,e[t++],e[t++],e[t],e[t+1],min2,max2),i=e[t++],n=e[t++];break;case CMD$2.A:var l=e[t++],h=e[t++],c=e[t++],u=e[t++],d=e[t++],p=e[t++]+d;t+=1;var g=!e[t++];r&&(s=mathCos$2(d)*c+l,a=mathSin$2(d)*u+h),fromArc(l,h,c,u,d,p,g,min2,max2),i=mathCos$2(p)*c+l,n=mathSin$2(p)*u+h;break;case CMD$2.R:fromLine(s=i=e[t++],a=n=e[t++],s+e[t++],a+e[t++],min2,max2);break;case CMD$2.Z:i=s,n=a}min$1(min,min,min2),max$1(max,max,max2)}return 0===t&&(min[0]=min[1]=max[0]=max[1]=0),new BoundingRect$1(min[0],min[1],max[0]-min[0],max[1]-min[1])},t.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,s=0,a=0,o=0,r=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,h=0,c=0,u=0;u<e;){var d=t[u++],p=1===u;p&&(o=s=t[u],r=a=t[u+1]);var g=-1;switch(d){case CMD$2.M:s=o=t[u++],a=r=t[u++];break;case CMD$2.L:var f=t[u++],m=(y=t[u++])-a;(mathAbs$1(P=f-s)>i||mathAbs$1(m)>n||u===e-1)&&(g=Math.sqrt(P*P+m*m),s=f,a=y);break;case CMD$2.C:var v=t[u++],b=t[u++],y=(f=t[u++],t[u++]),S=t[u++],x=t[u++];g=cubicLength(s,a,v,b,f,y,S,x,10),s=S,a=x;break;case CMD$2.Q:g=quadraticLength(s,a,v=t[u++],b=t[u++],f=t[u++],y=t[u++],10),s=f,a=y;break;case CMD$2.A:var w=t[u++],C=t[u++],T=t[u++],D=t[u++],k=t[u++],$=t[u++],O=$+k;u+=1,p&&(o=mathCos$2(k)*T+w,r=mathSin$2(k)*D+C),g=mathMax$2(T,D)*mathMin$2(PI2$4,Math.abs($)),s=mathCos$2(O)*T+w,a=mathSin$2(O)*D+C;break;case CMD$2.R:o=s=t[u++],r=a=t[u++],g=2*t[u++]+2*t[u++];break;case CMD$2.Z:var P=o-s;m=r-a;g=Math.sqrt(P*P+m*m),s=o,a=r}g>=0&&(l[c++]=g,h+=g)}return this._pathLen=h,h},t.prototype.rebuildPath=function(t,e){var i,n,s,a,o,r,l,h,c,u,d=this.data,p=this._ux,g=this._uy,f=this._len,m=e<1,v=0,b=0,y=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,h=e*this._pathLen))t:for(var S=0;S<f;){var x=d[S++],w=1===S;switch(w&&(i=s=d[S],n=a=d[S+1]),x!==CMD$2.L&&y>0&&(t.lineTo(c,u),y=0),x){case CMD$2.M:i=s=d[S++],n=a=d[S++],t.moveTo(s,a);break;case CMD$2.L:o=d[S++],r=d[S++];var C=mathAbs$1(o-s),T=mathAbs$1(r-a);if(C>p||T>g){if(m){if(v+(Y=l[b++])>h){var D=(h-v)/Y;t.lineTo(s*(1-D)+o*D,a*(1-D)+r*D);break t}v+=Y}t.lineTo(o,r),s=o,a=r,y=0}else{var k=C*C+T*T;k>y&&(c=o,u=r,y=k)}break;case CMD$2.C:var $=d[S++],O=d[S++],P=d[S++],L=d[S++],I=d[S++],A=d[S++];if(m){if(v+(Y=l[b++])>h){cubicSubdivide(s,$,P,I,D=(h-v)/Y,tmpOutX),cubicSubdivide(a,O,L,A,D,tmpOutY),t.bezierCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2],tmpOutX[3],tmpOutY[3]);break t}v+=Y}t.bezierCurveTo($,O,P,L,I,A),s=I,a=A;break;case CMD$2.Q:$=d[S++],O=d[S++],P=d[S++],L=d[S++];if(m){if(v+(Y=l[b++])>h){quadraticSubdivide(s,$,P,D=(h-v)/Y,tmpOutX),quadraticSubdivide(a,O,L,D,tmpOutY),t.quadraticCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2]);break t}v+=Y}t.quadraticCurveTo($,O,P,L),s=P,a=L;break;case CMD$2.A:var E=d[S++],G=d[S++],U=d[S++],F=d[S++],M=d[S++],_=d[S++],N=d[S++],R=!d[S++],j=U>F?U:F,B=mathAbs$1(U-F)>.001,H=M+_,z=!1;if(m)v+(Y=l[b++])>h&&(H=M+_*(h-v)/Y,z=!0),v+=Y;if(B&&t.ellipse?t.ellipse(E,G,U,F,N,M,H,R):t.arc(E,G,j,M,H,R),z)break t;w&&(i=mathCos$2(M)*U+E,n=mathSin$2(M)*F+G),s=mathCos$2(H)*U+E,a=mathSin$2(H)*F+G;break;case CMD$2.R:i=s=d[S],n=a=d[S+1],o=d[S++],r=d[S++];var V=d[S++],q=d[S++];if(m){if(v+(Y=l[b++])>h){var W=h-v;t.moveTo(o,r),t.lineTo(o+mathMin$2(W,V),r),(W-=V)>0&&t.lineTo(o+V,r+mathMin$2(W,q)),(W-=q)>0&&t.lineTo(o+mathMax$2(V-W,0),r+q),(W-=V)>0&&t.lineTo(o,r+mathMax$2(q-W,0));break t}v+=Y}t.rect(o,r,V,q);break;case CMD$2.Z:if(m){var Y;if(v+(Y=l[b++])>h){D=(h-v)/Y;t.lineTo(s*(1-D)+i*D,a*(1-D)+n*D);break t}v+=Y}t.closePath(),s=i,a=n}}},t.prototype.clone=function(){var e=new t,i=this.data;return e.data=i.slice?i.slice():Array.prototype.slice.call(i),e._len=this._len,e},t.CMD=CMD$2,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}(),PathProxy$1=PathProxy;function containStroke$4(t,e,i,n,s,a,o){if(0===s)return!1;var r=s,l=0;if(o>e+r&&o>n+r||o<e-r&&o<n-r||a>t+r&&a>i+r||a<t-r&&a<i-r)return!1;if(t===i)return Math.abs(a-t)<=r/2;var h=(l=(e-n)/(t-i))*a-o+(t*n-i*e)/(t-i);return h*h/(l*l+1)<=r/2*r/2}function containStroke$3(t,e,i,n,s,a,o,r,l,h,c){if(0===l)return!1;var u=l;return!(c>e+u&&c>n+u&&c>a+u&&c>r+u||c<e-u&&c<n-u&&c<a-u&&c<r-u||h>t+u&&h>i+u&&h>s+u&&h>o+u||h<t-u&&h<i-u&&h<s-u&&h<o-u)&&cubicProjectPoint(t,e,i,n,s,a,o,r,h,c,null)<=u/2}function containStroke$2(t,e,i,n,s,a,o,r,l){if(0===o)return!1;var h=o;return!(l>e+h&&l>n+h&&l>a+h||l<e-h&&l<n-h&&l<a-h||r>t+h&&r>i+h&&r>s+h||r<t-h&&r<i-h&&r<s-h)&&quadraticProjectPoint(t,e,i,n,s,a,r,l,null)<=h/2}var PI2$3=2*Math.PI;function normalizeRadian(t){return(t%=PI2$3)<0&&(t+=PI2$3),t}var PI2$2=2*Math.PI;function containStroke$1(t,e,i,n,s,a,o,r,l){if(0===o)return!1;var h=o;r-=t,l-=e;var c=Math.sqrt(r*r+l*l);if(c-h>i||c+h<i)return!1;if(Math.abs(n-s)%PI2$2<1e-4)return!0;if(a){var u=n;n=normalizeRadian(s),s=normalizeRadian(u)}else n=normalizeRadian(n),s=normalizeRadian(s);n>s&&(s+=PI2$2);var d=Math.atan2(l,r);return d<0&&(d+=PI2$2),d>=n&&d<=s||d+PI2$2>=n&&d+PI2$2<=s}function windingLine(t,e,i,n,s,a){if(a>e&&a>n||a<e&&a<n)return 0;if(n===e)return 0;var o=(a-e)/(n-e),r=n<e?1:-1;1!==o&&0!==o||(r=n<e?.5:-.5);var l=o*(i-t)+t;return l===s?1/0:l>s?r:0}var CMD$1=PathProxy$1.CMD,PI2$1=2*Math.PI,EPSILON=1e-4;function isAroundEqual(t,e){return Math.abs(t-e)<EPSILON}var roots=[-1,-1,-1],extrema=[-1,-1];function swapExtrema(){var t=extrema[0];extrema[0]=extrema[1],extrema[1]=t}function windingCubic(t,e,i,n,s,a,o,r,l,h){if(h>e&&h>n&&h>a&&h>r||h<e&&h<n&&h<a&&h<r)return 0;var c=cubicRootAt(e,n,a,r,h,roots);if(0===c)return 0;for(var u=0,d=-1,p=void 0,g=void 0,f=0;f<c;f++){var m=roots[f],v=0===m||1===m?.5:1;cubicAt(t,i,s,o,m)<l||(d<0&&(d=cubicExtrema(e,n,a,r,extrema),extrema[1]<extrema[0]&&d>1&&swapExtrema(),p=cubicAt(e,n,a,r,extrema[0]),d>1&&(g=cubicAt(e,n,a,r,extrema[1]))),2===d?m<extrema[0]?u+=p<e?v:-v:m<extrema[1]?u+=g<p?v:-v:u+=r<g?v:-v:m<extrema[0]?u+=p<e?v:-v:u+=r<p?v:-v)}return u}function windingQuadratic(t,e,i,n,s,a,o,r){if(r>e&&r>n&&r>a||r<e&&r<n&&r<a)return 0;var l=quadraticRootAt(e,n,a,r,roots);if(0===l)return 0;var h=quadraticExtremum(e,n,a);if(h>=0&&h<=1){for(var c=0,u=quadraticAt(e,n,a,h),d=0;d<l;d++){var p=0===roots[d]||1===roots[d]?.5:1;quadraticAt(t,i,s,roots[d])<o||(roots[d]<h?c+=u<e?p:-p:c+=a<u?p:-p)}return c}p=0===roots[0]||1===roots[0]?.5:1;return quadraticAt(t,i,s,roots[0])<o?0:a<e?p:-p}function windingArc(t,e,i,n,s,a,o,r){if((r-=e)>i||r<-i)return 0;var l=Math.sqrt(i*i-r*r);roots[0]=-l,roots[1]=l;var h=Math.abs(n-s);if(h<1e-4)return 0;if(h>=PI2$1-1e-4){n=0,s=PI2$1;var c=a?1:-1;return o>=roots[0]+t&&o<=roots[1]+t?c:0}if(n>s){var u=n;n=s,s=u}n<0&&(n+=PI2$1,s+=PI2$1);for(var d=0,p=0;p<2;p++){var g=roots[p];if(g+t>o){var f=Math.atan2(r,g);c=a?1:-1;f<0&&(f=PI2$1+f),(f>=n&&f<=s||f+PI2$1>=n&&f+PI2$1<=s)&&(f>Math.PI/2&&f<1.5*Math.PI&&(c=-c),d+=c)}}return d}function containPath(t,e,i,n,s){for(var a,o,r=t.data,l=t.len(),h=0,c=0,u=0,d=0,p=0,g=0;g<l;){var f=r[g++],m=1===g;switch(f===CMD$1.M&&g>1&&(i||(h+=windingLine(c,u,d,p,n,s))),m&&(d=c=r[g],p=u=r[g+1]),f){case CMD$1.M:c=d=r[g++],u=p=r[g++];break;case CMD$1.L:if(i){if(containStroke$4(c,u,r[g],r[g+1],e,n,s))return!0}else h+=windingLine(c,u,r[g],r[g+1],n,s)||0;c=r[g++],u=r[g++];break;case CMD$1.C:if(i){if(containStroke$3(c,u,r[g++],r[g++],r[g++],r[g++],r[g],r[g+1],e,n,s))return!0}else h+=windingCubic(c,u,r[g++],r[g++],r[g++],r[g++],r[g],r[g+1],n,s)||0;c=r[g++],u=r[g++];break;case CMD$1.Q:if(i){if(containStroke$2(c,u,r[g++],r[g++],r[g],r[g+1],e,n,s))return!0}else h+=windingQuadratic(c,u,r[g++],r[g++],r[g],r[g+1],n,s)||0;c=r[g++],u=r[g++];break;case CMD$1.A:var v=r[g++],b=r[g++],y=r[g++],S=r[g++],x=r[g++],w=r[g++];g+=1;var C=!!(1-r[g++]);a=Math.cos(x)*y+v,o=Math.sin(x)*S+b,m?(d=a,p=o):h+=windingLine(c,u,a,o,n,s);var T=(n-v)*S/y+v;if(i){if(containStroke$1(v,b,S,x,x+w,C,e,T,s))return!0}else h+=windingArc(v,b,S,x,x+w,C,T,s);c=Math.cos(x+w)*y+v,u=Math.sin(x+w)*S+b;break;case CMD$1.R:if(d=c=r[g++],p=u=r[g++],a=d+r[g++],o=p+r[g++],i){if(containStroke$4(d,p,a,p,e,n,s)||containStroke$4(a,p,a,o,e,n,s)||containStroke$4(a,o,d,o,e,n,s)||containStroke$4(d,o,d,p,e,n,s))return!0}else h+=windingLine(a,p,a,o,n,s),h+=windingLine(d,o,d,p,n,s);break;case CMD$1.Z:if(i){if(containStroke$4(c,u,d,p,e,n,s))return!0}else h+=windingLine(c,u,d,p,n,s);c=d,u=p}}return i||isAroundEqual(u,p)||(h+=windingLine(c,u,d,p,n,s)||0),0!==h}function contain$1(t,e,i){return containPath(t,0,!1,e,i)}function containStroke(t,e,i,n){return containPath(t,e,!0,i,n)}var DEFAULT_PATH_STYLE=defaults({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},DEFAULT_COMMON_STYLE),DEFAULT_PATH_ANIMATION_PROPS={style:defaults({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)},pathCopyParams=TRANSFORMABLE_PROPS.concat(["invisible","culling","z","z2","zlevel","parent"]),Path$1=function(t){function e(e){return t.call(this,e)||this}var i;return __extends(e,t),e.prototype.update=function(){var i=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var s=this._decalEl=this._decalEl||new e;s.buildPath===e.prototype.buildPath&&(s.buildPath=function(t){i.buildPath(t,i.shape)}),s.silent=!0;var a=s.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var r=0;r<pathCopyParams.length;++r)s[pathCopyParams[r]]=this[pathCopyParams[r]];s.__dirty|=REDRAW_BIT}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(e){var i=keys(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var s=0;s<i.length;s++){var a=i[s],o=e[a];"style"===a?this.style?extend(this.style,o):this.useStyle(o):"shape"===a?extend(this.shape,o):t.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(isString(t)){var e=lum(t,0);return e>.5?DARK_LABEL_COLOR:e>.2?LIGHTER_LABEL_COLOR:LIGHT_LABEL_COLOR}if(t)return LIGHT_LABEL_COLOR}return DARK_LABEL_COLOR},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(isString(e)){var i=this.__zr;if(!(!i||!i.isDarkMode())===lum(t,0)<DARK_MODE_THRESHOLD)return e}},e.prototype.buildPath=function(t,e,i){},e.prototype.pathUpdated=function(){this.__dirty&=~SHAPE_CHANGED_BIT},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new PathProxy$1(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var s=this.path;(n||this.__dirty&SHAPE_CHANGED_BIT)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),t=s.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.strokeNoScale?this.getLineScale():1,r=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;r=Math.max(r,null==l?4:l)}o>1e-10&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return t},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),s=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path;if(this.hasStroke()){var o=s.lineWidth,r=s.strokeNoScale?this.getLineScale():1;if(r>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),containStroke(a,o/r,t,e)))return!0}if(this.hasFill())return contain$1(a,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,i){"shape"===e?this.setShape(i):t.prototype.attrKV.call(this,e,i)},e.prototype.setShape=function(t,e){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=e:extend(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return createObject(DEFAULT_PATH_STYLE,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=extend({},this.shape))},e.prototype._applyStateObj=function(e,i,n,s,a,o){t.prototype._applyStateObj.call(this,e,i,n,s,a,o);var r,l=!(i&&s);if(i&&i.shape?a?s?r=i.shape:(r=extend({},n.shape),extend(r,i.shape)):(r=extend({},s?this.shape:n.shape),extend(r,i.shape)):l&&(r=n.shape),r)if(a){this.shape=extend({},this.shape);for(var h={},c=keys(r),u=0;u<c.length;u++){var d=c[u];"object"==typeof r[d]?this.shape[d]=r[d]:h[d]=r[d]}this._transitionState(e,{shape:h},o)}else this.shape=r,this.dirtyShape()},e.prototype._mergeStates=function(e){for(var i,n=t.prototype._mergeStates.call(this,e),s=0;s<e.length;s++){var a=e[s];a.shape&&(i=i||{},this._mergeStyle(i,a.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return DEFAULT_PATH_ANIMATION_PROPS},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var i=function(e){function i(i){var n=e.call(this,i)||this;return t.init&&t.init.call(n,i),n}return __extends(i,e),i.prototype.getDefaultStyle=function(){return clone$3(t.style)},i.prototype.getDefaultShape=function(){return clone$3(t.shape)},i}(e);for(var n in t)"function"==typeof t[n]&&(i.prototype[n]=t[n]);return i},e.initDefaultProps=((i=e.prototype).type="path",i.strokeContainThreshold=5,i.segmentIgnoreThreshold=0,i.subPixelOptimize=!1,i.autoBatch=!1,void(i.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT|SHAPE_CHANGED_BIT)),e}(Displayable$1),Path$2=Path$1,DEFAULT_TSPAN_STYLE=defaults({strokeFirst:!0,font:DEFAULT_FONT,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},DEFAULT_PATH_STYLE),TSpan=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return createObject(DEFAULT_TSPAN_STYLE,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var i=getBoundingRect(e,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var n=t.lineWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Displayable$1);TSpan.prototype.type="tspan";var TSpan$1=TSpan,DEFAULT_IMAGE_STYLE=defaults({x:0,y:0},DEFAULT_COMMON_STYLE),DEFAULT_IMAGE_ANIMATION_PROPS={style:defaults({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)};function isImageLike(t){return!!(t&&"string"!=typeof t&&t.width&&t.height)}var ZRImage=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.createStyle=function(t){return createObject(DEFAULT_IMAGE_STYLE,t)},e.prototype._getSize=function(t){var e=this.style,i=e[t];if(null!=i)return i;var n=isImageLike(e.image)?e.image:this.__image;if(!n)return 0;var s="width"===t?"height":"width",a=e[s];return null==a?n[t]:n[t]/n[s]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return DEFAULT_IMAGE_ANIMATION_PROPS},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new BoundingRect$1(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Displayable$1);ZRImage.prototype.type="image";var ZRImage$1=ZRImage;function buildPath$2(t,e){var i,n,s,a,o,r=e.x,l=e.y,h=e.width,c=e.height,u=e.r;h<0&&(r+=h,h=-h),c<0&&(l+=c,c=-c),"number"==typeof u?i=n=s=a=u:u instanceof Array?1===u.length?i=n=s=a=u[0]:2===u.length?(i=s=u[0],n=a=u[1]):3===u.length?(i=u[0],n=a=u[1],s=u[2]):(i=u[0],n=u[1],s=u[2],a=u[3]):i=n=s=a=0,i+n>h&&(i*=h/(o=i+n),n*=h/o),s+a>h&&(s*=h/(o=s+a),a*=h/o),n+s>c&&(n*=c/(o=n+s),s*=c/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),t.moveTo(r+i,l),t.lineTo(r+h-n,l),0!==n&&t.arc(r+h-n,l+n,n,-Math.PI/2,0),t.lineTo(r+h,l+c-s),0!==s&&t.arc(r+h-s,l+c-s,s,0,Math.PI/2),t.lineTo(r+a,l+c),0!==a&&t.arc(r+a,l+c-a,a,Math.PI/2,Math.PI),t.lineTo(r,l+i),0!==i&&t.arc(r+i,l+i,i,Math.PI,1.5*Math.PI)}var round=Math.round;function subPixelOptimizeLine$1(t,e,i){if(e){var n=e.x1,s=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=s,t.y1=a,t.y2=o;var r=i&&i.lineWidth;return r?(round(2*n)===round(2*s)&&(t.x1=t.x2=subPixelOptimize$1(n,r,!0)),round(2*a)===round(2*o)&&(t.y1=t.y2=subPixelOptimize$1(a,r,!0)),t):t}}function subPixelOptimizeRect$1(t,e,i){if(e){var n=e.x,s=e.y,a=e.width,o=e.height;t.x=n,t.y=s,t.width=a,t.height=o;var r=i&&i.lineWidth;return r?(t.x=subPixelOptimize$1(n,r,!0),t.y=subPixelOptimize$1(s,r,!0),t.width=Math.max(subPixelOptimize$1(n+a,r,!1)-t.x,0===a?0:1),t.height=Math.max(subPixelOptimize$1(s+o,r,!1)-t.y,0===o?0:1),t):t}}function subPixelOptimize$1(t,e,i){if(!e)return t;var n=round(2*t);return(n+round(e))%2==0?n/2:(n+(i?1:-1))/2}var RectShape=function(){this.x=0,this.y=0,this.width=0,this.height=0},subPixelOptimizeOutputShape$1={},Rect$2=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultShape=function(){return new RectShape},e.prototype.buildPath=function(t,e){var i,n,s,a;if(this.subPixelOptimize){var o=subPixelOptimizeRect$1(subPixelOptimizeOutputShape$1,e,this.style);i=o.x,n=o.y,s=o.width,a=o.height,o.r=e.r,e=o}else i=e.x,n=e.y,s=e.width,a=e.height;e.r?buildPath$2(t,e):t.rect(i,n,s,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Path$2);Rect$2.prototype.type="rect";var Rect$3=Rect$2,DEFAULT_RICH_TEXT_COLOR={fill:"#000"},DEFAULT_STROKE_LINE_WIDTH=2,DEFAULT_TEXT_ANIMATION_PROPS={style:defaults({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)},ZRText=function(t){function e(e){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=DEFAULT_RICH_TEXT_COLOR,i.attr(e),i}return __extends(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):t.prototype.getLocalTransform.call(this,e)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,normalizeTextStyle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(e){t.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},e.prototype.removeSelfFromZr=function(e){t.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new BoundingRect$1(0,0,0,0),e=this._children,i=[],n=null,s=0;s<e.length;s++){var a=e[s],o=a.getBoundingRect(),r=a.getLocalTransform(i);r?(t.copy(o),t.applyTransform(r),(n=n||t.clone()).union(t)):(n=n||o.clone()).union(o)}this._rect=n||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||DEFAULT_RICH_TEXT_COLOR},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,e){if(!e)return t;var i=e.rich,n=t.rich||i&&{};return extend(t,e),i&&n?(this._mergeRich(n,i),t.rich=n):n&&(t.rich=n),t},e.prototype._mergeRich=function(t,e){for(var i=keys(e),n=0;n<i.length;n++){var s=i[n];t[s]=t[s]||{},extend(t[s],e[s])}},e.prototype.getAnimationStyleProps=function(){return DEFAULT_TEXT_ANIMATION_PROPS},e.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),this._children[this._childCursor++]=e,e.__zr=this.__zr,e.parent=this,e},e.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||DEFAULT_FONT,i=t.padding,n=parsePlainText(getStyleText(t),t),s=needDrawBackground(t),a=!!t.backgroundColor,o=n.outerHeight,r=n.outerWidth,l=n.contentWidth,h=n.lines,c=n.lineHeight,u=this._defaultStyle;this.isTruncated=!!n.isTruncated;var d=t.x||0,p=t.y||0,g=t.align||u.align||"left",f=t.verticalAlign||u.verticalAlign||"top",m=d,v=adjustTextY(p,n.contentHeight,f);if(s||i){var b=adjustTextX(d,r,g),y=adjustTextY(p,o,f);s&&this._renderBackground(t,t,b,y,r,o)}v+=c/2,i&&(m=getTextXForPadding(d,g,i),"top"===f?v+=i[0]:"bottom"===f&&(v-=i[2]));for(var S=0,x=!1,w=(getFill("fill"in t?t.fill:(x=!0,u.fill))),C=(getStroke("stroke"in t?t.stroke:a||u.autoStroke&&!x?null:(S=DEFAULT_STROKE_LINE_WIDTH,u.stroke))),T=t.textShadowBlur>0,D=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),k=n.calculatedLineHeight,$=0;$<h.length;$++){var O=this._getOrCreateChild(TSpan$1),P=O.createStyle();O.useStyle(P),P.text=h[$],P.x=m,P.y=v,g&&(P.textAlign=g),P.textBaseline="middle",P.opacity=t.opacity,P.strokeFirst=!0,T&&(P.shadowBlur=t.textShadowBlur||0,P.shadowColor=t.textShadowColor||"transparent",P.shadowOffsetX=t.textShadowOffsetX||0,P.shadowOffsetY=t.textShadowOffsetY||0),P.stroke=C,P.fill=w,C&&(P.lineWidth=t.lineWidth||S,P.lineDash=t.lineDash,P.lineDashOffset=t.lineDashOffset||0),P.font=e,setSeparateFont(P,t),v+=c,D&&O.setBoundingRect(new BoundingRect$1(adjustTextX(P.x,l,P.textAlign),adjustTextY(P.y,k,P.textBaseline),l,k))}},e.prototype._updateRichTexts=function(){var t=this.style,e=parseRichText(getStyleText(t),t),i=e.width,n=e.outerWidth,s=e.outerHeight,a=t.padding,o=t.x||0,r=t.y||0,l=this._defaultStyle,h=t.align||l.align,c=t.verticalAlign||l.verticalAlign;this.isTruncated=!!e.isTruncated;var u=adjustTextX(o,n,h),d=adjustTextY(r,s,c),p=u,g=d;a&&(p+=a[3],g+=a[0]);var f=p+i;needDrawBackground(t)&&this._renderBackground(t,t,u,d,n,s);for(var m=!!t.backgroundColor,v=0;v<e.lines.length;v++){for(var b=e.lines[v],y=b.tokens,S=y.length,x=b.lineHeight,w=b.width,C=0,T=p,D=f,k=S-1,$=void 0;C<S&&(!($=y[C]).align||"left"===$.align);)this._placeToken($,t,x,g,T,"left",m),w-=$.width,T+=$.width,C++;for(;k>=0&&"right"===($=y[k]).align;)this._placeToken($,t,x,g,D,"right",m),w-=$.width,D-=$.width,k--;for(T+=(i-(T-p)-(f-D)-w)/2;C<=k;)$=y[C],this._placeToken($,t,x,g,T+$.width/2,"center",m),T+=$.width,C++;g+=x}},e.prototype._placeToken=function(t,e,i,n,s,a,o){var r=e.rich[t.styleName]||{};r.text=t.text;var l=t.verticalAlign,h=n+i/2;"top"===l?h=n+t.height/2:"bottom"===l&&(h=n+i-t.height/2),!t.isLineHolder&&needDrawBackground(r)&&this._renderBackground(r,e,"right"===a?s-t.width:"center"===a?s-t.width/2:s,h-t.height/2,t.width,t.height);var c=!!r.backgroundColor,u=t.textPadding;u&&(s=getTextXForPadding(s,a,u),h-=t.height/2-u[0]-t.innerHeight/2);var d=this._getOrCreateChild(TSpan$1),p=d.createStyle();d.useStyle(p);var g=this._defaultStyle,f=!1,m=0,v=getFill("fill"in r?r.fill:"fill"in e?e.fill:(f=!0,g.fill)),b=getStroke("stroke"in r?r.stroke:"stroke"in e?e.stroke:c||o||g.autoStroke&&!f?null:(m=DEFAULT_STROKE_LINE_WIDTH,g.stroke)),y=r.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=s,p.y=h,y&&(p.shadowBlur=r.textShadowBlur||e.textShadowBlur||0,p.shadowColor=r.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=r.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=r.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=a,p.textBaseline="middle",p.font=t.font||DEFAULT_FONT,p.opacity=retrieve3(r.opacity,e.opacity,1),setSeparateFont(p,r),b&&(p.lineWidth=retrieve3(r.lineWidth,e.lineWidth,m),p.lineDash=retrieve2(r.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=b),v&&(p.fill=v);var S=t.contentWidth,x=t.contentHeight;d.setBoundingRect(new BoundingRect$1(adjustTextX(p.x,S,p.textAlign),adjustTextY(p.y,x,p.textBaseline),S,x))},e.prototype._renderBackground=function(t,e,i,n,s,a){var o,r,l,h=t.backgroundColor,c=t.borderWidth,u=t.borderColor,d=h&&h.image,p=h&&!d,g=t.borderRadius,f=this;if(p||t.lineHeight||c&&u){(o=this._getOrCreateChild(Rect$3)).useStyle(o.createStyle()),o.style.fill=null;var m=o.shape;m.x=i,m.y=n,m.width=s,m.height=a,m.r=g,o.dirtyShape()}if(p)(l=o.style).fill=h||null,l.fillOpacity=retrieve2(t.fillOpacity,1);else if(d){(r=this._getOrCreateChild(ZRImage$1)).onload=function(){f.dirtyStyle()};var v=r.style;v.image=h.image,v.x=i,v.y=n,v.width=s,v.height=a}c&&u&&((l=o.style).lineWidth=c,l.stroke=u,l.strokeOpacity=retrieve2(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,o.strokeContainThreshold=0,o.hasFill()&&o.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var b=(o||r).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=retrieve3(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return hasSeparateFont(t)&&(e=[t.fontStyle,t.fontWeight,parseFontSize(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&trim(e)||t.textFont||t.font},e}(Displayable$1),VALID_TEXT_ALIGN={left:!0,right:1,center:1},VALID_TEXT_VERTICAL_ALIGN={top:1,bottom:1,middle:1},FONT_PARTS=["fontStyle","fontWeight","fontSize","fontFamily"];function parseFontSize(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?DEFAULT_FONT_SIZE+"px":t+"px":t}function setSeparateFont(t,e){for(var i=0;i<FONT_PARTS.length;i++){var n=FONT_PARTS[i],s=e[n];null!=s&&(t[n]=s)}}function hasSeparateFont(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}function normalizeTextStyle(t){return normalizeStyle(t),each$4(t.rich,normalizeStyle),t}function normalizeStyle(t){if(t){t.font=ZRText.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||VALID_TEXT_ALIGN[e]?e:"left";var i=t.verticalAlign;"center"===i&&(i="middle"),t.verticalAlign=null==i||VALID_TEXT_VERTICAL_ALIGN[i]?i:"top",t.padding&&(t.padding=normalizeCssArray$1(t.padding))}}function getStroke(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function getFill(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function getTextXForPadding(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function getStyleText(t){var e=t.text;return null!=e&&(e+=""),e}function needDrawBackground(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var ZRText$1=ZRText,getECData=makeInner(),setCommonECData=function(t,e,i,n){if(n){var s=getECData(n);s.dataIndex=i,s.dataType=e,s.seriesIndex=t,s.ssrType="chart","group"===n.type&&n.traverse((function(n){var s=getECData(n);s.seriesIndex=t,s.dataIndex=i,s.dataType=e,s.ssrType="chart"}))}},_highlightNextDigit=1,_highlightKeyMap={},getSavedStates=makeInner(),getComponentStates=makeInner(),HOVER_STATE_NORMAL=0,HOVER_STATE_BLUR=1,HOVER_STATE_EMPHASIS=2,SPECIAL_STATES=["emphasis","blur","select"],DISPLAY_STATES=["normal","emphasis","blur","select"],Z2_EMPHASIS_LIFT=10,Z2_SELECT_LIFT=9,HIGHLIGHT_ACTION_TYPE="highlight",DOWNPLAY_ACTION_TYPE="downplay",SELECT_ACTION_TYPE="select",UNSELECT_ACTION_TYPE="unselect",TOGGLE_SELECT_ACTION_TYPE="toggleSelect";function hasFillOrStroke(t){return null!=t&&"none"!==t}function doChangeHoverState(t,e,i){t.onHoverStateChange&&(t.hoverState||0)!==i&&t.onHoverStateChange(e),t.hoverState=i}function singleEnterEmphasis(t){doChangeHoverState(t,"emphasis",HOVER_STATE_EMPHASIS)}function singleLeaveEmphasis(t){t.hoverState===HOVER_STATE_EMPHASIS&&doChangeHoverState(t,"normal",HOVER_STATE_NORMAL)}function singleEnterBlur(t){doChangeHoverState(t,"blur",HOVER_STATE_BLUR)}function singleLeaveBlur(t){t.hoverState===HOVER_STATE_BLUR&&doChangeHoverState(t,"normal",HOVER_STATE_NORMAL)}function singleEnterSelect(t){t.selected=!0}function singleLeaveSelect(t){t.selected=!1}function updateElementState(t,e,i){e(t,i)}function traverseUpdateState(t,e,i){updateElementState(t,e,i),t.isGroup&&t.traverse((function(t){updateElementState(t,e,i)}))}function setStatesFlag(t,e){switch(e){case"emphasis":t.hoverState=HOVER_STATE_EMPHASIS;break;case"normal":t.hoverState=HOVER_STATE_NORMAL;break;case"blur":t.hoverState=HOVER_STATE_BLUR;break;case"select":t.selected=!0}}function getFromStateStyle(t,e,i,n){for(var s=t.style,a={},o=0;o<e.length;o++){var r=e[o],l=s[r];a[r]=null==l?n&&n[r]:l}for(o=0;o<t.animators.length;o++){var h=t.animators[o];h.__fromStateTransition&&h.__fromStateTransition.indexOf(i)<0&&"style"===h.targetName&&h.saveTo(a,e)}return a}function createEmphasisDefaultState(t,e,i,n){var s=i&&indexOf(i,"select")>=0,a=!1;if(t instanceof Path$2){var o=getSavedStates(t),r=s&&o.selectFill||o.normalFill,l=s&&o.selectStroke||o.normalStroke;if(hasFillOrStroke(r)||hasFillOrStroke(l)){var h=(n=n||{}).style||{};"inherit"===h.fill?(a=!0,n=extend({},n),(h=extend({},h)).fill=r):!hasFillOrStroke(h.fill)&&hasFillOrStroke(r)?(a=!0,n=extend({},n),(h=extend({},h)).fill=liftColor(r)):!hasFillOrStroke(h.stroke)&&hasFillOrStroke(l)&&(a||(n=extend({},n),h=extend({},h)),h.stroke=liftColor(l)),n.style=h}}if(n&&null==n.z2){a||(n=extend({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(null!=c?c:Z2_EMPHASIS_LIFT)}return n}function createSelectDefaultState(t,e,i){if(i&&null==i.z2){i=extend({},i);var n=t.z2SelectLift;i.z2=t.z2+(null!=n?n:Z2_SELECT_LIFT)}return i}function createBlurDefaultState(t,e,i){var n=indexOf(t.currentStates,e)>=0,s=t.style.opacity,a=n?null:getFromStateStyle(t,["opacity"],e,{opacity:1}),o=(i=i||{}).style||{};return null==o.opacity&&(i=extend({},i),o=extend({opacity:n?s:.1*a.opacity},o),i.style=o),i}function elementStateProxy(t,e){var i=this.states[t];if(this.style){if("emphasis"===t)return createEmphasisDefaultState(this,t,e,i);if("blur"===t)return createBlurDefaultState(this,t,i);if("select"===t)return createSelectDefaultState(this,t,i)}return i}function setDefaultStateProxy(t){t.stateProxy=elementStateProxy;var e=t.getTextContent(),i=t.getTextGuideLine();e&&(e.stateProxy=elementStateProxy),i&&(i.stateProxy=elementStateProxy)}function enterEmphasisWhenMouseOver(t,e){!shouldSilent(t,e)&&!t.__highByOuter&&traverseUpdateState(t,singleEnterEmphasis)}function leaveEmphasisWhenMouseOut(t,e){!shouldSilent(t,e)&&!t.__highByOuter&&traverseUpdateState(t,singleLeaveEmphasis)}function enterEmphasis(t,e){t.__highByOuter|=1<<(e||0),traverseUpdateState(t,singleEnterEmphasis)}function leaveEmphasis(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&traverseUpdateState(t,singleLeaveEmphasis)}function enterBlur(t){traverseUpdateState(t,singleEnterBlur)}function leaveBlur(t){traverseUpdateState(t,singleLeaveBlur)}function enterSelect(t){traverseUpdateState(t,singleEnterSelect)}function leaveSelect(t){traverseUpdateState(t,singleLeaveSelect)}function shouldSilent(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function allLeaveBlur(t){var e=t.getModel(),i=[],n=[];e.eachComponent((function(e,s){var a=getComponentStates(s),o="series"===e,r=o?t.getViewOfSeriesModel(s):t.getViewOfComponentModel(s);!o&&n.push(r),a.isBlured&&(r.group.traverse((function(t){singleLeaveBlur(t)})),o&&i.push(s)),a.isBlured=!1})),each$4(n,(function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(i,!1,e)}))}function blurSeries(t,e,i,n){var s=n.getModel();function a(t,e){for(var i=0;i<e.length;i++){var n=t.getItemGraphicEl(e[i]);n&&leaveBlur(n)}}if(i=i||"coordinateSystem",null!=t&&e&&"none"!==e){var o=s.getSeriesByIndex(t),r=o.coordinateSystem;r&&r.master&&(r=r.master);var l=[];s.eachSeries((function(t){var s=o===t,h=t.coordinateSystem;if(h&&h.master&&(h=h.master),!("series"===i&&!s||"coordinateSystem"===i&&!(h&&r?h===r:s)||"series"===e&&s)){if(n.getViewOfSeriesModel(t).group.traverse((function(t){t.__highByOuter&&s&&"self"===e||singleEnterBlur(t)})),isArrayLike(e))a(t.getData(),e);else if(isObject$2(e))for(var c=keys(e),u=0;u<c.length;u++)a(t.getData(c[u]),e[c[u]]);l.push(t),getComponentStates(t).isBlured=!0}})),s.eachComponent((function(t,e){if("series"!==t){var i=n.getViewOfComponentModel(e);i&&i.toggleBlurSeries&&i.toggleBlurSeries(l,!0,s)}}))}}function blurComponent(t,e,i){if(null!=t&&null!=e){var n=i.getModel().getComponent(t,e);if(n){getComponentStates(n).isBlured=!0;var s=i.getViewOfComponentModel(n);s&&s.focusBlurEnabled&&s.group.traverse((function(t){singleEnterBlur(t)}))}}}function blurSeriesFromHighlightPayload(t,e,i){var n=t.seriesIndex,s=t.getData(e.dataType);if(s){var a=queryDataIndex(s,e);a=(isArray(a)?a[0]:a)||0;var o=s.getItemGraphicEl(a);if(!o)for(var r=s.count(),l=0;!o&&l<r;)o=s.getItemGraphicEl(l++);if(o){var h=getECData(o);blurSeries(n,h.focus,h.blurScope,i)}else{var c=t.get(["emphasis","focus"]),u=t.get(["emphasis","blurScope"]);null!=c&&blurSeries(n,c,u,i)}}}function findComponentHighDownDispatchers(t,e,i,n){var s={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==i)return s;var a=n.getModel().getComponent(t,e);if(!a)return s;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return s;for(var r,l=o.findHighDownDispatchers(i),h=0;h<l.length;h++)if("self"===getECData(l[h]).focus){r=!0;break}return{focusSelf:r,dispatchers:l}}function handleGlobalMouseOverForHighDown(t,e,i){var n=getECData(t),s=findComponentHighDownDispatchers(n.componentMainType,n.componentIndex,n.componentHighDownName,i),a=s.dispatchers,o=s.focusSelf;a?(o&&blurComponent(n.componentMainType,n.componentIndex,i),each$4(a,(function(t){return enterEmphasisWhenMouseOver(t,e)}))):(blurSeries(n.seriesIndex,n.focus,n.blurScope,i),"self"===n.focus&&blurComponent(n.componentMainType,n.componentIndex,i),enterEmphasisWhenMouseOver(t,e))}function handleGlobalMouseOutForHighDown(t,e,i){allLeaveBlur(i);var n=getECData(t),s=findComponentHighDownDispatchers(n.componentMainType,n.componentIndex,n.componentHighDownName,i).dispatchers;s?each$4(s,(function(t){return leaveEmphasisWhenMouseOut(t,e)})):leaveEmphasisWhenMouseOut(t,e)}function toggleSelectionFromPayload(t,e,i){if(isSelectChangePayload(e)){var n=e.dataType,s=queryDataIndex(t.getData(n),e);isArray(s)||(s=[s]),t[e.type===TOGGLE_SELECT_ACTION_TYPE?"toggleSelect":e.type===SELECT_ACTION_TYPE?"select":"unselect"](s,n)}}function updateSeriesElementSelection(t){each$4(t.getAllData(),(function(e){var i=e.data,n=e.type;i.eachItemGraphicEl((function(e,i){t.isSelected(i,n)?enterSelect(e):leaveSelect(e)}))}))}function getAllSelectedIndices(t){var e=[];return t.eachSeries((function(t){each$4(t.getAllData(),(function(i){i.data;var n=i.type,s=t.getSelectedDataIndices();if(s.length>0){var a={dataIndex:s,seriesIndex:t.seriesIndex};null!=n&&(a.dataType=n),e.push(a)}}))})),e}function enableHoverEmphasis(t,e,i){setAsHighDownDispatcher(t,!0),traverseUpdateState(t,setDefaultStateProxy),enableHoverFocus(t,e,i)}function disableHoverEmphasis(t){setAsHighDownDispatcher(t,!1)}function toggleHoverEmphasis(t,e,i,n){n?disableHoverEmphasis(t):enableHoverEmphasis(t,e,i)}function enableHoverFocus(t,e,i){var n=getECData(t);null!=e?(n.focus=e,n.blurScope=i):n.focus&&(n.focus=null)}var OTHER_STATES=["emphasis","blur","select"],defaultStyleGetterMap={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function setStatesStylesFromModel(t,e,i,n){i=i||"itemStyle";for(var s=0;s<OTHER_STATES.length;s++){var a=OTHER_STATES[s],o=e.getModel([a,i]);t.ensureState(a).style=n?n(o):o[defaultStyleGetterMap[i]]()}}function setAsHighDownDispatcher(t,e){var i=!1===e,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),i&&!n.__highDownDispatcher||(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!i)}function isHighDownDispatcher(t){return!(!t||!t.__highDownDispatcher)}function enableComponentHighDownFeatures(t,e,i){var n=getECData(t);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=i}function getHighlightDigit(t){var e=_highlightKeyMap[t];return null==e&&_highlightNextDigit<=32&&(e=_highlightKeyMap[t]=_highlightNextDigit++),e}function isSelectChangePayload(t){var e=t.type;return e===SELECT_ACTION_TYPE||e===UNSELECT_ACTION_TYPE||e===TOGGLE_SELECT_ACTION_TYPE}function isHighDownPayload(t){var e=t.type;return e===HIGHLIGHT_ACTION_TYPE||e===DOWNPLAY_ACTION_TYPE}function savePathStates(t){var e=getSavedStates(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var i=t.states.select||{};e.selectFill=i.style&&i.style.fill||null,e.selectStroke=i.style&&i.style.stroke||null}var CMD=PathProxy$1.CMD,points=[[],[],[]],mathSqrt$2=Math.sqrt,mathAtan2=Math.atan2;function transformPath(t,e){if(e){var i,n,s,a,o,r,l=t.data,h=t.len(),c=CMD.M,u=CMD.C,d=CMD.L,p=CMD.R,g=CMD.A,f=CMD.Q;for(s=0,a=0;s<h;){switch(i=l[s++],a=s,n=0,i){case c:case d:n=1;break;case u:n=3;break;case f:n=2;break;case g:var m=e[4],v=e[5],b=mathSqrt$2(e[0]*e[0]+e[1]*e[1]),y=mathSqrt$2(e[2]*e[2]+e[3]*e[3]),S=mathAtan2(-e[1]/y,e[0]/b);l[s]*=b,l[s++]+=m,l[s]*=y,l[s++]+=v,l[s++]*=b,l[s++]*=y,l[s++]+=S,l[s++]+=S,a=s+=2;break;case p:r[0]=l[s++],r[1]=l[s++],applyTransform$1(r,r,e),l[a++]=r[0],l[a++]=r[1],r[0]+=l[s++],r[1]+=l[s++],applyTransform$1(r,r,e),l[a++]=r[0],l[a++]=r[1]}for(o=0;o<n;o++){var x=points[o];x[0]=l[s++],x[1]=l[s++],applyTransform$1(x,x,e),l[a++]=x[0],l[a++]=x[1]}}t.increaseVersion()}}var mathSqrt$1=Math.sqrt,mathSin$1=Math.sin,mathCos$1=Math.cos,PI$3=Math.PI;function vMag(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function vRatio(t,e){return(t[0]*e[0]+t[1]*e[1])/(vMag(t)*vMag(e))}function vAngle(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(vRatio(t,e))}function processArc(t,e,i,n,s,a,o,r,l,h,c){var u=l*(PI$3/180),d=mathCos$1(u)*(t-i)/2+mathSin$1(u)*(e-n)/2,p=-1*mathSin$1(u)*(t-i)/2+mathCos$1(u)*(e-n)/2,g=d*d/(o*o)+p*p/(r*r);g>1&&(o*=mathSqrt$1(g),r*=mathSqrt$1(g));var f=(s===a?-1:1)*mathSqrt$1((o*o*(r*r)-o*o*(p*p)-r*r*(d*d))/(o*o*(p*p)+r*r*(d*d)))||0,m=f*o*p/r,v=f*-r*d/o,b=(t+i)/2+mathCos$1(u)*m-mathSin$1(u)*v,y=(e+n)/2+mathSin$1(u)*m+mathCos$1(u)*v,S=vAngle([1,0],[(d-m)/o,(p-v)/r]),x=[(d-m)/o,(p-v)/r],w=[(-1*d-m)/o,(-1*p-v)/r],C=vAngle(x,w);if(vRatio(x,w)<=-1&&(C=PI$3),vRatio(x,w)>=1&&(C=0),C<0){var T=Math.round(C/PI$3*1e6)/1e6;C=2*PI$3+T%2*PI$3}c.addData(h,b,y,o,r,S,C,u,a)}var commandReg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,numberReg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function createPathProxyFromString(t){var e=new PathProxy$1;if(!t)return e;var i,n=0,s=0,a=n,o=s,r=PathProxy$1.CMD,l=t.match(commandReg);if(!l)return e;for(var h=0;h<l.length;h++){for(var c=l[h],u=c.charAt(0),d=void 0,p=c.match(numberReg)||[],g=p.length,f=0;f<g;f++)p[f]=parseFloat(p[f]);for(var m=0;m<g;){var v=void 0,b=void 0,y=void 0,S=void 0,x=void 0,w=void 0,C=void 0,T=n,D=s,k=void 0,$=void 0;switch(u){case"l":n+=p[m++],s+=p[m++],d=r.L,e.addData(d,n,s);break;case"L":n=p[m++],s=p[m++],d=r.L,e.addData(d,n,s);break;case"m":n+=p[m++],s+=p[m++],d=r.M,e.addData(d,n,s),a=n,o=s,u="l";break;case"M":n=p[m++],s=p[m++],d=r.M,e.addData(d,n,s),a=n,o=s,u="L";break;case"h":n+=p[m++],d=r.L,e.addData(d,n,s);break;case"H":n=p[m++],d=r.L,e.addData(d,n,s);break;case"v":s+=p[m++],d=r.L,e.addData(d,n,s);break;case"V":s=p[m++],d=r.L,e.addData(d,n,s);break;case"C":d=r.C,e.addData(d,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),n=p[m-2],s=p[m-1];break;case"c":d=r.C,e.addData(d,p[m++]+n,p[m++]+s,p[m++]+n,p[m++]+s,p[m++]+n,p[m++]+s),n+=p[m-2],s+=p[m-1];break;case"S":v=n,b=s,k=e.len(),$=e.data,i===r.C&&(v+=n-$[k-4],b+=s-$[k-3]),d=r.C,T=p[m++],D=p[m++],n=p[m++],s=p[m++],e.addData(d,v,b,T,D,n,s);break;case"s":v=n,b=s,k=e.len(),$=e.data,i===r.C&&(v+=n-$[k-4],b+=s-$[k-3]),d=r.C,T=n+p[m++],D=s+p[m++],n+=p[m++],s+=p[m++],e.addData(d,v,b,T,D,n,s);break;case"Q":T=p[m++],D=p[m++],n=p[m++],s=p[m++],d=r.Q,e.addData(d,T,D,n,s);break;case"q":T=p[m++]+n,D=p[m++]+s,n+=p[m++],s+=p[m++],d=r.Q,e.addData(d,T,D,n,s);break;case"T":v=n,b=s,k=e.len(),$=e.data,i===r.Q&&(v+=n-$[k-4],b+=s-$[k-3]),n=p[m++],s=p[m++],d=r.Q,e.addData(d,v,b,n,s);break;case"t":v=n,b=s,k=e.len(),$=e.data,i===r.Q&&(v+=n-$[k-4],b+=s-$[k-3]),n+=p[m++],s+=p[m++],d=r.Q,e.addData(d,v,b,n,s);break;case"A":y=p[m++],S=p[m++],x=p[m++],w=p[m++],C=p[m++],processArc(T=n,D=s,n=p[m++],s=p[m++],w,C,y,S,x,d=r.A,e);break;case"a":y=p[m++],S=p[m++],x=p[m++],w=p[m++],C=p[m++],processArc(T=n,D=s,n+=p[m++],s+=p[m++],w,C,y,S,x,d=r.A,e)}}"z"!==u&&"Z"!==u||(d=r.Z,e.addData(d),n=a,s=o),i=d}return e.toStatic(),e}var SVGPath=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.applyTransform=function(t){},e}(Path$2);function isPathProxy(t){return null!=t.setData}function createPathOptions(t,e){var i=createPathProxyFromString(t),n=extend({},e);return n.buildPath=function(t){if(isPathProxy(t)){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e,1)}else{var e=t;i.rebuildPath(e,1)}},n.applyTransform=function(t){transformPath(i,t),this.dirtyShape()},n}function createFromString(t,e){return new SVGPath(createPathOptions(t,e))}function extendFromString(t,e){var i=createPathOptions(t,e);return function(t){function e(e){var n=t.call(this,e)||this;return n.applyTransform=i.applyTransform,n.buildPath=i.buildPath,n}return __extends(e,t),e}(SVGPath)}function mergePath$1(t,e){for(var i=[],n=t.length,s=0;s<n;s++){var a=t[s];i.push(a.getUpdatedPathProxy(!0))}var o=new Path$2(e);return o.createPathProxy(),o.buildPath=function(t){if(isPathProxy(t)){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e,1)}},o}function clonePath(t,e){e=e||{};var i=new Path$2;return t.shape&&i.setShape(t.shape),i.setStyle(t.style),e.bakeTransform?transformPath(i.path,t.getComputedTransform()):e.toLocal?i.setLocalTransform(t.getComputedTransform()):i.copyTransform(t),i.buildPath=t.buildPath,i.applyTransform=i.applyTransform,i.z=t.z,i.z2=t.z2,i.zlevel=t.zlevel,i}var CircleShape=function(){this.cx=0,this.cy=0,this.r=0},Circle=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultShape=function(){return new CircleShape},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(Path$2);Circle.prototype.type="circle";var Circle$1=Circle,EllipseShape=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Ellipse=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultShape=function(){return new EllipseShape},e.prototype.buildPath=function(t,e){var i=.5522848,n=e.cx,s=e.cy,a=e.rx,o=e.ry,r=a*i,l=o*i;t.moveTo(n-a,s),t.bezierCurveTo(n-a,s-l,n-r,s-o,n,s-o),t.bezierCurveTo(n+r,s-o,n+a,s-l,n+a,s),t.bezierCurveTo(n+a,s+l,n+r,s+o,n,s+o),t.bezierCurveTo(n-r,s+o,n-a,s+l,n-a,s),t.closePath()},e}(Path$2);Ellipse.prototype.type="ellipse";var Ellipse$1=Ellipse,PI$2=Math.PI,PI2=2*PI$2,mathSin=Math.sin,mathCos=Math.cos,mathACos=Math.acos,mathATan2=Math.atan2,mathAbs=Math.abs,mathSqrt=Math.sqrt,mathMax$1=Math.max,mathMin$1=Math.min,e=1e-4;function intersect(t,i,n,s,a,o,r,l){var h=n-t,c=s-i,u=r-a,d=l-o,p=d*h-u*c;if(!(p*p<e))return[t+(p=(u*(i-o)-d*(t-a))/p)*h,i+p*c]}function computeCornerTangents(t,e,i,n,s,a,o){var r=t-i,l=e-n,h=(o?a:-a)/mathSqrt(r*r+l*l),c=h*l,u=-h*r,d=t+c,p=e+u,g=i+c,f=n+u,m=(d+g)/2,v=(p+f)/2,b=g-d,y=f-p,S=b*b+y*y,x=s-a,w=d*f-g*p,C=(y<0?-1:1)*mathSqrt(mathMax$1(0,x*x*S-w*w)),T=(w*y-b*C)/S,D=(-w*b-y*C)/S,k=(w*y+b*C)/S,$=(-w*b+y*C)/S,O=T-m,P=D-v,L=k-m,I=$-v;return O*O+P*P>L*L+I*I&&(T=k,D=$),{cx:T,cy:D,x0:-c,y0:-u,x1:T*(s/x-1),y1:D*(s/x-1)}}function normalizeCornerRadius(t){var e;if(isArray(t)){var i=t.length;if(!i)return t;e=1===i?[t[0],t[0],0,0]:2===i?[t[0],t[0],t[1],t[1]]:3===i?t.concat(t[2]):t}else e=[t,t,t,t];return e}function buildPath$1(t,i){var n,s=mathMax$1(i.r,0),a=mathMax$1(i.r0||0,0),o=s>0;if(o||a>0){if(o||(s=a,a=0),a>s){var r=s;s=a,a=r}var l=i.startAngle,h=i.endAngle;if(!isNaN(l)&&!isNaN(h)){var c=i.cx,u=i.cy,d=!!i.clockwise,p=mathAbs(h-l),g=p>PI2&&p%PI2;if(g>e&&(p=g),s>e)if(p>PI2-e)t.moveTo(c+s*mathCos(l),u+s*mathSin(l)),t.arc(c,u,s,l,h,!d),a>e&&(t.moveTo(c+a*mathCos(h),u+a*mathSin(h)),t.arc(c,u,a,h,l,d));else{var f=void 0,m=void 0,v=void 0,b=void 0,y=void 0,S=void 0,x=void 0,w=void 0,C=void 0,T=void 0,D=void 0,k=void 0,$=void 0,O=void 0,P=void 0,L=void 0,I=s*mathCos(l),A=s*mathSin(l),E=a*mathCos(h),G=a*mathSin(h),U=p>e;if(U){var F=i.cornerRadius;F&&(f=(n=normalizeCornerRadius(F))[0],m=n[1],v=n[2],b=n[3]);var M=mathAbs(s-a)/2;if(y=mathMin$1(M,v),S=mathMin$1(M,b),x=mathMin$1(M,f),w=mathMin$1(M,m),D=C=mathMax$1(y,S),k=T=mathMax$1(x,w),(C>e||T>e)&&($=s*mathCos(h),O=s*mathSin(h),P=a*mathCos(l),L=a*mathSin(l),p<PI$2)){var _=intersect(I,A,P,L,$,O,E,G);if(_){var N=I-_[0],R=A-_[1],j=$-_[0],B=O-_[1],H=1/mathSin(mathACos((N*j+R*B)/(mathSqrt(N*N+R*R)*mathSqrt(j*j+B*B)))/2),z=mathSqrt(_[0]*_[0]+_[1]*_[1]);D=mathMin$1(C,(s-z)/(H+1)),k=mathMin$1(T,(a-z)/(H-1))}}}if(U)if(D>e){var V=mathMin$1(v,D),q=mathMin$1(b,D),W=computeCornerTangents(P,L,I,A,s,V,d),Y=computeCornerTangents($,O,E,G,s,q,d);t.moveTo(c+W.cx+W.x0,u+W.cy+W.y0),D<C&&V===q?t.arc(c+W.cx,u+W.cy,D,mathATan2(W.y0,W.x0),mathATan2(Y.y0,Y.x0),!d):(V>0&&t.arc(c+W.cx,u+W.cy,V,mathATan2(W.y0,W.x0),mathATan2(W.y1,W.x1),!d),t.arc(c,u,s,mathATan2(W.cy+W.y1,W.cx+W.x1),mathATan2(Y.cy+Y.y1,Y.cx+Y.x1),!d),q>0&&t.arc(c+Y.cx,u+Y.cy,q,mathATan2(Y.y1,Y.x1),mathATan2(Y.y0,Y.x0),!d))}else t.moveTo(c+I,u+A),t.arc(c,u,s,l,h,!d);else t.moveTo(c+I,u+A);if(a>e&&U)if(k>e){V=mathMin$1(f,k),W=computeCornerTangents(E,G,$,O,a,-(q=mathMin$1(m,k)),d),Y=computeCornerTangents(I,A,P,L,a,-V,d);t.lineTo(c+W.cx+W.x0,u+W.cy+W.y0),k<T&&V===q?t.arc(c+W.cx,u+W.cy,k,mathATan2(W.y0,W.x0),mathATan2(Y.y0,Y.x0),!d):(q>0&&t.arc(c+W.cx,u+W.cy,q,mathATan2(W.y0,W.x0),mathATan2(W.y1,W.x1),!d),t.arc(c,u,a,mathATan2(W.cy+W.y1,W.cx+W.x1),mathATan2(Y.cy+Y.y1,Y.cx+Y.x1),d),V>0&&t.arc(c+Y.cx,u+Y.cy,V,mathATan2(Y.y1,Y.x1),mathATan2(Y.y0,Y.x0),!d))}else t.lineTo(c+E,u+G),t.arc(c,u,a,h,l,d);else t.lineTo(c+E,u+G)}else t.moveTo(c,u);t.closePath()}}}var SectorShape=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Sector=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultShape=function(){return new SectorShape},e.prototype.buildPath=function(t,e){buildPath$1(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Path$2);Sector.prototype.type="sector";var Sector$1=Sector,RingShape=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Ring=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultShape=function(){return new RingShape},e.prototype.buildPath=function(t,e){var i=e.cx,n=e.cy,s=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,s,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,s,!0)},e}(Path$2);Ring.prototype.type="ring";var Ring$1=Ring;function smoothBezier(t,e,i,n){var s,a,o,r,l=[],h=[],c=[],u=[];if(n){o=[1/0,1/0],r=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)min$1(o,o,t[d]),max$1(r,r,t[d]);min$1(o,o,n[0]),max$1(r,r,n[1])}for(d=0,p=t.length;d<p;d++){var g=t[d];if(i)s=t[d?d-1:p-1],a=t[(d+1)%p];else{if(0===d||d===p-1){l.push(clone$2(t[d]));continue}s=t[d-1],a=t[d+1]}sub(h,a,s),scale$2(h,h,e);var f=distance(g,s),m=distance(g,a),v=f+m;0!==v&&(f/=v,m/=v),scale$2(c,h,-f),scale$2(u,h,m);var b=add([],g,c),y=add([],g,u);n&&(max$1(b,b,o),min$1(b,b,r),max$1(y,y,o),min$1(y,y,r)),l.push(b),l.push(y)}return i&&l.push(l.shift()),l}function buildPath(t,e,i){var n=e.smooth,s=e.points;if(s&&s.length>=2){if(n){var a=smoothBezier(s,n,i,e.smoothConstraint);t.moveTo(s[0][0],s[0][1]);for(var o=s.length,r=0;r<(i?o:o-1);r++){var l=a[2*r],h=a[2*r+1],c=s[(r+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],c[0],c[1])}}else{t.moveTo(s[0][0],s[0][1]);r=1;for(var u=s.length;r<u;r++)t.lineTo(s[r][0],s[r][1])}i&&t.closePath()}}var PolygonShape=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Polygon$2=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultShape=function(){return new PolygonShape},e.prototype.buildPath=function(t,e){buildPath(t,e,!0)},e}(Path$2);Polygon$2.prototype.type="polygon";var Polygon$3=Polygon$2,PolylineShape=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Polyline=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PolylineShape},e.prototype.buildPath=function(t,e){buildPath(t,e,!1)},e}(Path$2);Polyline.prototype.type="polyline";var Polyline$1=Polyline,subPixelOptimizeOutputShape={},LineShape=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Line$2=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new LineShape},e.prototype.buildPath=function(t,e){var i,n,s,a;if(this.subPixelOptimize){var o=subPixelOptimizeLine$1(subPixelOptimizeOutputShape,e,this.style);i=o.x1,n=o.y1,s=o.x2,a=o.y2}else i=e.x1,n=e.y1,s=e.x2,a=e.y2;var r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(s=i*(1-r)+s*r,a=n*(1-r)+a*r),t.lineTo(s,a))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(Path$2);Line$2.prototype.type="line";var Line$3=Line$2,out=[],BezierCurveShape=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function someVectorAt(t,e,i){var n=t.cpx2,s=t.cpy2;return null!=n||null!=s?[(i?cubicDerivativeAt:cubicAt)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?cubicDerivativeAt:cubicAt)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?quadraticDerivativeAt:quadraticAt)(t.x1,t.cpx1,t.x2,e),(i?quadraticDerivativeAt:quadraticAt)(t.y1,t.cpy1,t.y2,e)]}var BezierCurve=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new BezierCurveShape},e.prototype.buildPath=function(t,e){var i=e.x1,n=e.y1,s=e.x2,a=e.y2,o=e.cpx1,r=e.cpy1,l=e.cpx2,h=e.cpy2,c=e.percent;0!==c&&(t.moveTo(i,n),null==l||null==h?(c<1&&(quadraticSubdivide(i,o,s,c,out),o=out[1],s=out[2],quadraticSubdivide(n,r,a,c,out),r=out[1],a=out[2]),t.quadraticCurveTo(o,r,s,a)):(c<1&&(cubicSubdivide(i,o,l,s,c,out),o=out[1],l=out[2],s=out[3],cubicSubdivide(n,r,h,a,c,out),r=out[1],h=out[2],a=out[3]),t.bezierCurveTo(o,r,l,h,s,a)))},e.prototype.pointAt=function(t){return someVectorAt(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=someVectorAt(this.shape,t,!0);return normalize$1(e,e)},e}(Path$2);BezierCurve.prototype.type="bezier-curve";var BezierCurve$1=BezierCurve,ArcShape=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Arc=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ArcShape},e.prototype.buildPath=function(t,e){var i=e.cx,n=e.cy,s=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,r=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*s+i,h*s+n),t.arc(i,n,s,a,o,!r)},e}(Path$2);Arc.prototype.type="arc";var Arc$1=Arc,CompoundPath=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return __extends(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),i=0;i<t.length;i++)e=e||t[i].shapeChanged();e&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Path$2.prototype.getBoundingRect.call(this)},e}(Path$2),CompoundPath$1=CompoundPath,Gradient=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}(),Gradient$1=Gradient,LinearGradient=function(t){function e(e,i,n,s,a,o){var r=t.call(this,a)||this;return r.x=null==e?0:e,r.y=null==i?0:i,r.x2=null==n?1:n,r.y2=null==s?0:s,r.type="linear",r.global=o||!1,r}return __extends(e,t),e}(Gradient$1),LinearGradient$1=LinearGradient,RadialGradient=function(t){function e(e,i,n,s,a){var o=t.call(this,s)||this;return o.x=null==e?.5:e,o.y=null==i?.5:i,o.r=null==n?.5:n,o.type="radial",o.global=a||!1,o}return __extends(e,t),e}(Gradient$1),RadialGradient$1=RadialGradient,extent=[0,0],extent2=[0,0],minTv=new Point$3,maxTv=new Point$3,OrientedBoundingRect=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new Point$3;for(i=0;i<2;i++)this._axes[i]=new Point$3;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,s=t.x,a=t.y,o=s+t.width,r=a+t.height;if(i[0].set(s,a),i[1].set(o,a),i[2].set(o,r),i[3].set(s,r),e)for(var l=0;l<4;l++)i[l].transform(e);Point$3.sub(n[0],i[1],i[0]),Point$3.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(l=0;l<2;l++)this._origin[l]=n[l].dot(i[0])},t.prototype.intersect=function(t,e){var i=!0,n=!e;return minTv.set(1/0,1/0),maxTv.set(0,0),!this._intersectCheckOneSide(this,t,minTv,maxTv,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,minTv,maxTv,n,-1)&&(i=!1,n)||n||Point$3.copy(e,i?minTv:maxTv),i},t.prototype._intersectCheckOneSide=function(t,e,i,n,s,a){for(var o=!0,r=0;r<2;r++){var l=this._axes[r];if(this._getProjMinMaxOnAxis(r,t._corners,extent),this._getProjMinMaxOnAxis(r,e._corners,extent2),extent[1]<extent2[0]||extent[0]>extent2[1]){if(o=!1,s)return o;var h=Math.abs(extent2[0]-extent[1]),c=Math.abs(extent[0]-extent2[1]);Math.min(h,c)>n.len()&&(h<c?Point$3.scale(n,l,-h*a):Point$3.scale(n,l,c*a))}else if(i){h=Math.abs(extent2[0]-extent[1]),c=Math.abs(extent[0]-extent2[1]);Math.min(h,c)<i.len()&&(h<c?Point$3.scale(i,l,h*a):Point$3.scale(i,l,-c*a))}}return o},t.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],s=this._origin,a=e[0].dot(n)+s[t],o=a,r=a,l=1;l<e.length;l++){var h=e[l].dot(n)+s[t];o=Math.min(h,o),r=Math.max(h,r)}i[0]=o,i[1]=r},t}(),OrientedBoundingRect$1=OrientedBoundingRect,m=[],IncrementalDisplayable=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return __extends(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new BoundingRect$1(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(m)),t.union(n)}this._rect=t}return this._rect},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},e}(Displayable$1),IncrementalDisplayable$1=IncrementalDisplayable,transitionStore=makeInner();function getAnimationConfig(t,e,i,n,s){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var r="update"===t;if(e&&e.isAnimationEnabled()){var l=void 0,h=void 0,c=void 0;return n?(l=retrieve2(n.duration,200),h=retrieve2(n.easing,"cubicOut"),c=0):(l=e.getShallow(r?"animationDurationUpdate":"animationDuration"),h=e.getShallow(r?"animationEasingUpdate":"animationEasing"),c=e.getShallow(r?"animationDelayUpdate":"animationDelay")),a&&(null!=a.duration&&(l=a.duration),null!=a.easing&&(h=a.easing),null!=a.delay&&(c=a.delay)),isFunction(c)&&(c=c(i,s)),isFunction(l)&&(l=l(i)),{duration:l||0,delay:c,easing:h}}return null}function animateOrSetProps(t,e,i,n,s,a,o){var r,l=!1;isFunction(s)?(o=a,a=s,s=null):isObject$2(s)&&(a=s.cb,o=s.during,l=s.isFrom,r=s.removeOpt,s=s.dataIndex);var h="leave"===t;h||e.stopAnimation("leave");var c=getAnimationConfig(t,n,s,h?r||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,s):null);if(c&&c.duration>0){var u={duration:c.duration,delay:c.delay||0,easing:c.easing,done:a,force:!!a||!!o,setToFinal:!h,scope:t,during:o};l?e.animateFrom(i,u):e.animateTo(i,u)}else e.stopAnimation(),!l&&e.attr(i),o&&o(1),a&&a()}function updateProps$1(t,e,i,n,s,a){animateOrSetProps("update",t,e,i,n,s,a)}function initProps(t,e,i,n,s,a){animateOrSetProps("enter",t,e,i,n,s,a)}function isElementRemoved(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){if("leave"===t.animators[e].scope)return!0}return!1}function removeElement(t,e,i,n,s,a){isElementRemoved(t)||animateOrSetProps("leave",t,e,i,n,s,a)}function fadeOutDisplayable(t,e,i,n){t.removeTextContent(),t.removeTextGuideLine(),removeElement(t,{style:{opacity:0}},e,i,n)}function removeElementWithFadeOut(t,e,i){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||fadeOutDisplayable(t,e,i,n)})):fadeOutDisplayable(t,e,i,n)}function saveOldStyle(t){transitionStore(t).oldStyle=t.style}function getOldStyle(t){return transitionStore(t).oldStyle}var mathMax=Math.max,mathMin=Math.min,_customShapeMap={};function extendShape(t){return Path$2.extend(t)}var extendPathFromString=extendFromString;function extendPath(t,e){return extendPathFromString(t,e)}function registerShape(t,e){_customShapeMap[t]=e}function getShapeClass(t){if(_customShapeMap.hasOwnProperty(t))return _customShapeMap[t]}function makePath(t,e,i,n){var s=createFromString(t,e);return i&&("center"===n&&(i=centerGraphic(i,s.getBoundingRect())),resizePath(s,i)),s}function makeImage(t,e,i){var n=new ZRImage$1({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var s={width:t.width,height:t.height};n.setStyle(centerGraphic(e,s))}}});return n}function centerGraphic(t,e){var i,n=e.width/e.height,s=t.height*n;return i=s<=t.width?t.height:(s=t.width)/n,{x:t.x+t.width/2-s/2,y:t.y+t.height/2-i/2,width:s,height:i}}var mergePath=mergePath$1;function resizePath(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function subPixelOptimizeLine(t,e){return subPixelOptimizeLine$1(t,t,{lineWidth:e}),t}function subPixelOptimizeRect(t){return subPixelOptimizeRect$1(t.shape,t.shape,t.style),t}var subPixelOptimize=subPixelOptimize$1;function getTransform(t,e){for(var i=identity([]);t&&t!==e;)mul(i,t.getLocalTransform(),i),t=t.parent;return i}function applyTransform(t,e,i){return e&&!isArrayLike(e)&&(e=Transformable$1.getLocalTransform(e)),i&&(e=invert([],e)),applyTransform$1([],t,e)}function transformDirection(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),s=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-s:"bottom"===t?s:0];return a=applyTransform(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function isNotGroup(t){return!t.isGroup}function isPath(t){return null!=t.shape}function groupTransition(t,e,i){if(t&&e){var n,s=(n={},t.traverse((function(t){isNotGroup(t)&&t.anid&&(n[t.anid]=t)})),n);e.traverse((function(t){if(isNotGroup(t)&&t.anid){var e=s[t.anid];if(e){var n=a(t);t.attr(a(e)),updateProps$1(t,n,i,getECData(t).dataIndex)}}}))}function a(t){var e={x:t.x,y:t.y,rotation:t.rotation};return isPath(t)&&(e.shape=extend({},t.shape)),e}}function clipPointsByRect(t,e){return map$1(t,(function(t){var i=t[0];i=mathMax(i,e.x),i=mathMin(i,e.x+e.width);var n=t[1];return n=mathMax(n,e.y),[i,n=mathMin(n,e.y+e.height)]}))}function clipRectByRect(t,e){var i=mathMax(t.x,e.x),n=mathMin(t.x+t.width,e.x+e.width),s=mathMax(t.y,e.y),a=mathMin(t.y+t.height,e.y+e.height);if(n>=i&&a>=s)return{x:i,y:s,width:n-i,height:a-s}}function createIcon(t,e,i){var n=extend({rectHover:!0},e),s=n.style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(s.image=t.slice(8),defaults(s,i),new ZRImage$1(n)):makePath(t.replace("path://",""),n,i,"center")}function linePolygonIntersect(t,e,i,n,s){for(var a=0,o=s[s.length-1];a<s.length;a++){var r=s[a];if(lineLineIntersect(t,e,i,n,r[0],r[1],o[0],o[1]))return!0;o=r}}function lineLineIntersect(t,e,i,n,s,a,o,r){var l=i-t,h=n-e,c=o-s,u=r-a,d=crossProduct2d(c,u,l,h);if(nearZero(d))return!1;var p=t-s,g=e-a,f=crossProduct2d(p,g,l,h)/d;if(f<0||f>1)return!1;var m=crossProduct2d(p,g,c,u)/d;return!(m<0||m>1)}function crossProduct2d(t,e,i,n){return t*n-i*e}function nearZero(t){return t<=1e-6&&t>=-1e-6}function setTooltipConfig(t){var e=t.itemTooltipOption,i=t.componentModel,n=t.itemName,s=isString(e)?{formatter:e}:e,a=i.mainType,o=i.componentIndex,r={componentType:a,name:n,$vars:["name"]};r[a+"Index"]=o;var l=t.formatterParamsExtra;l&&each$4(keys(l),(function(t){hasOwn(r,t)||(r[t]=l[t],r.$vars.push(t))}));var h=getECData(t.el);h.componentMainType=a,h.componentIndex=o,h.tooltipConfig={name:n,option:defaults({content:n,encodeHTMLContent:!0,formatterParams:r},s)}}function traverseElement(t,e){var i;t.isGroup&&(i=e(t)),i||t.traverse(e)}function traverseElements(t,e){if(t)if(isArray(t))for(var i=0;i<t.length;i++)traverseElement(t[i],e);else traverseElement(t,e)}registerShape("circle",Circle$1),registerShape("ellipse",Ellipse$1),registerShape("sector",Sector$1),registerShape("ring",Ring$1),registerShape("polygon",Polygon$3),registerShape("polyline",Polyline$1),registerShape("rect",Rect$3),registerShape("line",Line$3),registerShape("bezierCurve",BezierCurve$1),registerShape("arc",Arc$1);var graphic=Object.freeze(Object.defineProperty({__proto__:null,updateProps:updateProps$1,initProps:initProps,removeElement:removeElement,removeElementWithFadeOut:removeElementWithFadeOut,isElementRemoved:isElementRemoved,extendShape:extendShape,extendPath:extendPath,registerShape:registerShape,getShapeClass:getShapeClass,makePath:makePath,makeImage:makeImage,mergePath:mergePath,resizePath:resizePath,subPixelOptimizeLine:subPixelOptimizeLine,subPixelOptimizeRect:subPixelOptimizeRect,subPixelOptimize:subPixelOptimize,getTransform:getTransform,applyTransform:applyTransform,transformDirection:transformDirection,groupTransition:groupTransition,clipPointsByRect:clipPointsByRect,clipRectByRect:clipRectByRect,createIcon:createIcon,linePolygonIntersect:linePolygonIntersect,lineLineIntersect:lineLineIntersect,setTooltipConfig:setTooltipConfig,traverseElements:traverseElements,Group:Group$4,Image:ZRImage$1,Text:ZRText$1,Circle:Circle$1,Ellipse:Ellipse$1,Sector:Sector$1,Ring:Ring$1,Polygon:Polygon$3,Polyline:Polyline$1,Rect:Rect$3,Line:Line$3,BezierCurve:BezierCurve$1,Arc:Arc$1,IncrementalDisplayable:IncrementalDisplayable$1,CompoundPath:CompoundPath$1,LinearGradient:LinearGradient$1,RadialGradient:RadialGradient$1,BoundingRect:BoundingRect$1,OrientedBoundingRect:OrientedBoundingRect$1,Point:Point$3,Path:Path$2},Symbol.toStringTag,{value:"Module"})),EMPTY_OBJ={};function setLabelText(t,e){for(var i=0;i<SPECIAL_STATES.length;i++){var n=SPECIAL_STATES[i],s=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=s}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function getLabelText(t,e,i){var n,s=t.labelFetcher,a=t.labelDataIndex,o=t.labelDimIndex,r=e.normal;s&&(n=s.getFormattedLabel(a,"normal",null,o,r&&r.get("formatter"),null!=i?{interpolatedValue:i}:null)),null==n&&(n=isFunction(t.defaultText)?t.defaultText(a,t,i):t.defaultText);for(var l={normal:n},h=0;h<SPECIAL_STATES.length;h++){var c=SPECIAL_STATES[h],u=e[c];l[c]=retrieve2(s?s.getFormattedLabel(a,c,null,o,u&&u.get("formatter")):null,n)}return l}function setLabelStyle(t,e,i,n){i=i||EMPTY_OBJ;for(var s=t instanceof ZRText$1,a=!1,o=0;o<DISPLAY_STATES.length;o++){if((d=e[DISPLAY_STATES[o]])&&d.getShallow("show")){a=!0;break}}var r=s?t:t.getTextContent();if(a){s||(r||(r=new ZRText$1,t.setTextContent(r)),t.stateProxy&&(r.stateProxy=t.stateProxy));var l=getLabelText(i,e),h=e.normal,c=!!h.getShallow("show"),u=createTextStyle(h,n&&n.normal,i,!1,!s);u.text=l.normal,s||t.setTextConfig(createTextConfig(h,i,!1));for(o=0;o<SPECIAL_STATES.length;o++){var d,p=SPECIAL_STATES[o];if(d=e[p]){var g=r.ensureState(p),f=!!retrieve2(d.getShallow("show"),c);if(f!==c&&(g.ignore=!f),g.style=createTextStyle(d,n&&n[p],i,!0,!s),g.style.text=l[p],!s)t.ensureState(p).textConfig=createTextConfig(d,i,!0)}}r.silent=!!h.getShallow("silent"),null!=r.style.x&&(u.x=r.style.x),null!=r.style.y&&(u.y=r.style.y),r.ignore=!c,r.useStyle(u),r.dirty(),i.enableTextSetter&&(labelInner(r).setLabelText=function(t){var n=getLabelText(i,e,t);setLabelText(r,n)})}else r&&(r.ignore=!0);t.dirty()}function getLabelStatesModels(t,e){e=e||"label";for(var i={normal:t.getModel(e)},n=0;n<SPECIAL_STATES.length;n++){var s=SPECIAL_STATES[n];i[s]=t.getModel([s,e])}return i}function createTextStyle(t,e,i,n,s){var a={};return setTextStyleCommon(a,t,i,n,s),e&&extend(a,e),a}function createTextConfig(t,e,i){e=e||{};var n,s={},a=t.getShallow("rotate"),o=retrieve2(t.getShallow("distance"),i?null:5),r=t.getShallow("offset");return"outside"===(n=t.getShallow("position")||(i?null:"inside"))&&(n=e.defaultOutsidePosition||"top"),null!=n&&(s.position=n),null!=r&&(s.offset=r),null!=a&&(a*=Math.PI/180,s.rotation=a),null!=o&&(s.distance=o),s.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",s}function setTextStyleCommon(t,e,i,n,s){i=i||EMPTY_OBJ;var a,o=e.ecModel,r=o&&o.option.textStyle,l=getRichItemNames(e);if(l)for(var h in a={},l)if(l.hasOwnProperty(h)){var c=e.getModel(["rich",h]);setTokenTextStyle(a[h]={},c,r,i,n,s,!1,!0)}a&&(t.rich=a);var u=e.get("overflow");u&&(t.overflow=u);var d=e.get("minMargin");null!=d&&(t.margin=d),setTokenTextStyle(t,e,r,i,n,s,!0,!1)}function getRichItemNames(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||EMPTY_OBJ).rich;if(i){e=e||{};for(var n=keys(i),s=0;s<n.length;s++){e[n[s]]=1}}t=t.parentModel}return e}var TEXT_PROPS_WITH_GLOBAL=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],TEXT_PROPS_SELF=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],TEXT_PROPS_BOX=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function setTokenTextStyle(t,e,i,n,s,a,o,r){i=!s&&i||EMPTY_OBJ;var l=n&&n.inheritColor,h=e.getShallow("color"),c=e.getShallow("textBorderColor"),u=retrieve2(e.getShallow("opacity"),i.opacity);"inherit"!==h&&"auto"!==h||(h=l||null),"inherit"!==c&&"auto"!==c||(c=l||null),a||(h=h||i.color,c=c||i.textBorderColor),null!=h&&(t.fill=h),null!=c&&(t.stroke=c);var d=retrieve2(e.getShallow("textBorderWidth"),i.textBorderWidth);null!=d&&(t.lineWidth=d);var p=retrieve2(e.getShallow("textBorderType"),i.textBorderType);null!=p&&(t.lineDash=p);var g=retrieve2(e.getShallow("textBorderDashOffset"),i.textBorderDashOffset);null!=g&&(t.lineDashOffset=g),s||null!=u||r||(u=n&&n.defaultOpacity),null!=u&&(t.opacity=u),s||a||null==t.fill&&n.inheritColor&&(t.fill=n.inheritColor);for(var f=0;f<TEXT_PROPS_WITH_GLOBAL.length;f++){var m=TEXT_PROPS_WITH_GLOBAL[f];null!=(b=retrieve2(e.getShallow(m),i[m]))&&(t[m]=b)}for(f=0;f<TEXT_PROPS_SELF.length;f++){m=TEXT_PROPS_SELF[f];null!=(b=e.getShallow(m))&&(t[m]=b)}if(null==t.verticalAlign){var v=e.getShallow("baseline");null!=v&&(t.verticalAlign=v)}if(!o||!n.disableBox){for(f=0;f<TEXT_PROPS_BOX.length;f++){var b;m=TEXT_PROPS_BOX[f];null!=(b=e.getShallow(m))&&(t[m]=b)}var y=e.getShallow("borderType");null!=y&&(t.borderDash=y),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}function getFont(t,e){var i=e&&e.getModel("textStyle");return trim([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}var labelInner=makeInner();function setLabelValueAnimation(t,e,i,n){if(t){var s=labelInner(t);s.prevValue=s.value,s.value=i;var a=e.normal;s.valueAnimation=a.get("valueAnimation"),s.valueAnimation&&(s.precision=a.get("precision"),s.defaultInterpolatedText=n,s.statesModels=e)}}function animateLabelValue(t,e,i,n,s){var a=labelInner(t);if(a.valueAnimation&&a.prevValue!==a.value){var o=a.defaultInterpolatedText,r=retrieve2(a.interpolatedValue,a.prevValue),l=a.value;t.percent=0,(null==a.prevValue?initProps:updateProps$1)(t,{percent:1},n,e,null,(function(n){var h=interpolateRawValues(i,a.precision,r,l,n);a.interpolatedValue=1===n?null:h;var c=getLabelText({labelDataIndex:e,labelFetcher:s,defaultText:o?o(h):h+""},a.statesModels,h);setLabelText(t,c)}))}}var PATH_COLOR=["textStyle","color"],textStyleParams=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],tmpText=new ZRText$1,TextStyleMixin=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(PATH_COLOR):null)},t.prototype.getFont=function(){return getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<textStyleParams.length;i++)e[textStyleParams[i]]=this.getShallow(textStyleParams[i]);return tmpText.useStyle(e),tmpText.update(),tmpText.getBoundingRect()},t}(),TextStyleMixin$1=TextStyleMixin,LINE_STYLE_KEY_MAP=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],getLineStyle=makeStyleMapper(LINE_STYLE_KEY_MAP),LineStyleMixin=function(){function t(){}return t.prototype.getLineStyle=function(t){return getLineStyle(this,t)},t}(),ITEM_STYLE_KEY_MAP=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],getItemStyle=makeStyleMapper(ITEM_STYLE_KEY_MAP),ItemStyleMixin=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return getItemStyle(this,t,e)},t}(),Model=function(){function t(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return t.prototype.init=function(t,e,i){},t.prototype.mergeOption=function(t,e){merge(this.option,t,!0)},t.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},t.prototype.getShallow=function(t,e){var i=this.option,n=null==i?i:i[t];if(null==n&&!e){var s=this.parentModel;s&&(n=s.getShallow(t))}return n},t.prototype.getModel=function(e,i){var n=null!=e,s=n?this.parsePath(e):null;return new t(n?this._doGet(s):this.option,i=i||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(s)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(clone$3(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!env$1.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&(!t[n]||null!=(i=i&&"object"==typeof i?i[t[n]]:null));n++);return null==i&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},t}();enableClassExtend(Model),enableClassCheck(Model),mixin(Model,LineStyleMixin),mixin(Model,ItemStyleMixin),mixin(Model,AreaStyleMixin),mixin(Model,TextStyleMixin$1);var Model$1=Model,base=Math.round(10*Math.random());function getUID(t){return[t||"",base++].join("_")}function enableSubTypeDefaulter(t){var e={};t.registerSubTypeDefaulter=function(t,i){var n=parseClassType(t);e[n.main]=i},t.determineSubType=function(i,n){var s=n.type;if(!s){var a=parseClassType(i).main;t.hasSubTypes(i)&&e[a]&&(s=e[a](n))}return s}}function enableTopologicalTravel(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,n,s,a){if(t.length){var o=function(t){var n={},s=[];return each$4(t,(function(a){var o=i(n,a),r=function(t,e){var i=[];return each$4(t,(function(t){indexOf(e,t)>=0&&i.push(t)})),i}(o.originalDeps=e(a),t);o.entryCount=r.length,0===o.entryCount&&s.push(a),each$4(r,(function(t){indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:n,noEntryList:s}}(n),r=o.graph,l=o.noEntryList,h={};for(each$4(t,(function(t){h[t]=!0}));l.length;){var c=l.pop(),u=r[c],d=!!h[c];d&&(s.call(a,c,u.originalDeps.slice()),delete h[c]),each$4(u.successor,d?g:p)}each$4(h,(function(){throw new Error("")}))}function p(t){r[t].entryCount--,0===r[t].entryCount&&l.push(t)}function g(t){h[t]=!0,p(t)}}}function inheritDefaultOption(t,e){return merge(merge({},t,!0),e,!0)}var langEN={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},langZH={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}},LOCALE_ZH="ZH",LOCALE_EN="EN",DEFAULT_LOCALE=LOCALE_EN,localeStorage={},localeModels={},SYSTEM_LANG=env$1.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||DEFAULT_LOCALE).toUpperCase().indexOf(LOCALE_ZH)>-1?LOCALE_ZH:DEFAULT_LOCALE;function registerLocale(t,e){t=t.toUpperCase(),localeModels[t]=new Model$1(e),localeStorage[t]=e}function createLocaleObject(t){if(isString(t)){var e=localeStorage[t.toUpperCase()]||{};return t===LOCALE_ZH||t===LOCALE_EN?clone$3(e):merge(clone$3(e),clone$3(localeStorage[DEFAULT_LOCALE]),!1)}return merge(clone$3(t),clone$3(localeStorage[DEFAULT_LOCALE]),!1)}function getLocaleModel(t){return localeModels[t]}function getDefaultLocaleModel(){return localeModels[DEFAULT_LOCALE]}registerLocale(LOCALE_EN,langEN),registerLocale(LOCALE_ZH,langZH);var ONE_SECOND=1e3,ONE_MINUTE=60*ONE_SECOND,ONE_HOUR=60*ONE_MINUTE,ONE_DAY=24*ONE_HOUR,ONE_YEAR=365*ONE_DAY,defaultLeveledFormatter={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},fullDayFormatter="{yyyy}-{MM}-{dd}",fullLeveledFormatter={year:"{yyyy}",month:"{yyyy}-{MM}",day:fullDayFormatter,hour:fullDayFormatter+" "+defaultLeveledFormatter.hour,minute:fullDayFormatter+" "+defaultLeveledFormatter.minute,second:fullDayFormatter+" "+defaultLeveledFormatter.second,millisecond:defaultLeveledFormatter.none},primaryTimeUnits=["year","month","day","hour","minute","second","millisecond"],timeUnits=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function pad(t,e){return"0000".substr(0,e-(t+="").length)+t}function getPrimaryTimeUnit(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function isPrimaryTimeUnit(t){return t===getPrimaryTimeUnit(t)}function getDefaultFormatPrecisionOfInterval(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function format(t,e,i,n){var s=parseDate(t),a=s[fullYearGetterName(i)](),o=s[monthGetterName(i)]()+1,r=Math.floor((o-1)/3)+1,l=s[dateGetterName(i)](),h=s["get"+(i?"UTC":"")+"Day"](),c=s[hoursGetterName(i)](),u=(c-1)%12+1,d=s[minutesGetterName(i)](),p=s[secondsGetterName(i)](),g=s[millisecondsGetterName(i)](),f=c>=12?"pm":"am",m=f.toUpperCase(),v=(n instanceof Model$1?n:getLocaleModel(n||SYSTEM_LANG)||getDefaultLocaleModel()).getModel("time"),b=v.get("month"),y=v.get("monthAbbr"),S=v.get("dayOfWeek"),x=v.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,f+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,pad(a%100+"",2)).replace(/{Q}/g,r+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,pad(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,pad(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[h]).replace(/{ee}/g,x[h]).replace(/{e}/g,h+"").replace(/{HH}/g,pad(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,pad(u+"",2)).replace(/{h}/g,u+"").replace(/{mm}/g,pad(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,pad(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,pad(g,3)).replace(/{S}/g,g+"")}function leveledFormat(t,e,i,n,s){var a=null;if(isString(i))a=i;else if(isFunction(i))a=i(t.value,e,{level:t.level});else{var o=extend({},defaultLeveledFormatter);if(t.level>0)for(var r=0;r<primaryTimeUnits.length;++r)o[primaryTimeUnits[r]]="{primary|"+o[primaryTimeUnits[r]]+"}";var l=i?!1===i.inherit?i:defaults(i,o):o,h=getUnitFromValue(t.value,s);if(l[h])a=l[h];else if(l.inherit){for(r=timeUnits.indexOf(h)-1;r>=0;--r)if(l[h]){a=l[h];break}a=a||o.none}if(isArray(a)){var c=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[c=Math.min(c,a.length-1)]}}return format(new Date(t.value),a,s,n)}function getUnitFromValue(t,e){var i=parseDate(t),n=i[monthGetterName(e)]()+1,s=i[dateGetterName(e)](),a=i[hoursGetterName(e)](),o=i[minutesGetterName(e)](),r=i[secondsGetterName(e)](),l=0===i[millisecondsGetterName(e)](),h=l&&0===r,c=h&&0===o,u=c&&0===a,d=u&&1===s;return d&&1===n?"year":d?"month":u?"day":c?"hour":h?"minute":l?"second":"millisecond"}function getUnitValue(t,e,i){var n=isNumber$1(t)?parseDate(t):t;switch(e=e||getUnitFromValue(t,i)){case"year":return n[fullYearGetterName(i)]();case"half-year":return n[monthGetterName(i)]()>=6?1:0;case"quarter":return Math.floor((n[monthGetterName(i)]()+1)/4);case"month":return n[monthGetterName(i)]();case"day":return n[dateGetterName(i)]();case"half-day":return n[hoursGetterName(i)]()/24;case"hour":return n[hoursGetterName(i)]();case"minute":return n[minutesGetterName(i)]();case"second":return n[secondsGetterName(i)]();case"millisecond":return n[millisecondsGetterName(i)]()}}function fullYearGetterName(t){return t?"getUTCFullYear":"getFullYear"}function monthGetterName(t){return t?"getUTCMonth":"getMonth"}function dateGetterName(t){return t?"getUTCDate":"getDate"}function hoursGetterName(t){return t?"getUTCHours":"getHours"}function minutesGetterName(t){return t?"getUTCMinutes":"getMinutes"}function secondsGetterName(t){return t?"getUTCSeconds":"getSeconds"}function millisecondsGetterName(t){return t?"getUTCMilliseconds":"getMilliseconds"}function fullYearSetterName(t){return t?"setUTCFullYear":"setFullYear"}function monthSetterName(t){return t?"setUTCMonth":"setMonth"}function dateSetterName(t){return t?"setUTCDate":"setDate"}function hoursSetterName(t){return t?"setUTCHours":"setHours"}function minutesSetterName(t){return t?"setUTCMinutes":"setMinutes"}function secondsSetterName(t){return t?"setUTCSeconds":"setSeconds"}function millisecondsSetterName(t){return t?"setUTCMilliseconds":"setMilliseconds"}function addCommas(t){if(!isNumeric(t))return isString(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function toCamelCase(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var normalizeCssArray=normalizeCssArray$1;function makeValueReadable(t,e,i){function n(t){return t&&trim(t)?t:"-"}function s(t){return!(null==t||isNaN(t)||!isFinite(t))}var a="time"===e,o=t instanceof Date;if(a||o){var r=a?parseDate(t):t;if(!isNaN(+r))return format(r,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",i);if(o)return"-"}if("ordinal"===e)return isStringSafe(t)?n(t):isNumber$1(t)&&s(t)?t+"":"-";var l=numericToNumber(t);return s(l)?addCommas(l):isStringSafe(t)?n(t):"boolean"==typeof t?t+"":"-"}var TPL_VAR_ALIAS=["a","b","c","d","e","f","g"],wrapVar=function(t,e){return"{"+t+(null==e?"":e)+"}"};function formatTpl(t,e,i){isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var s=e[0].$vars||[],a=0;a<s.length;a++){var o=TPL_VAR_ALIAS[a];t=t.replace(wrapVar(o),wrapVar(o,0))}for(var r=0;r<n;r++)for(var l=0;l<s.length;l++){var h=e[r][s[l]];t=t.replace(wrapVar(TPL_VAR_ALIAS[l],r),i?encodeHTML(h):h)}return t}function formatTplSimple(t,e,i){return each$4(e,(function(e,n){t=t.replace("{"+n+"}",i?encodeHTML(e):e)})),t}function getTooltipMarker(t,e){var i=isString(t)?{color:t,extraCssText:e}:t||{},n=i.color,s=i.type;e=i.extraCssText;var a=i.renderMode||"html";return n?"html"===a?"subItem"===s?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+encodeHTML(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+encodeHTML(n)+";"+(e||"")+'"></span>':{renderMode:a,content:"{"+(i.markerId||"markerX")+"|}  ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}function convertToColorString(t,e){return e=e||"transparent",isString(t)?t:isObject$2(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function windowOpen(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location.href=t}else window.open(t,e)}var each$3=each$4,LOCATION_PARAMS=["left","right","top","bottom","width","height"],HV_NAMES=[["width","left","right"],["height","top","bottom"]];function boxLayout(t,e,i,n,s){var a=0,o=0;null==n&&(n=1/0),null==s&&(s=1/0);var r=0;e.eachChild((function(l,h){var c,u,d=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var f=d.width+(g?-g.x+d.x:0);(c=a+f)>n||l.newline?(a=0,c=f,o+=r+i,r=d.height):r=Math.max(r,d.height)}else{var m=d.height+(g?-g.y+d.y:0);(u=o+m)>s||l.newline?(a+=r+i,o=0,u=m,r=d.width):r=Math.max(r,d.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),"horizontal"===t?a=c+i:o=u+i)}))}var box=boxLayout;function getAvailableSize(t,e,i){var n=e.width,s=e.height,a=parsePercent(t.left,n),o=parsePercent(t.top,s),r=parsePercent(t.right,n),l=parsePercent(t.bottom,s);return(isNaN(a)||isNaN(parseFloat(t.left)))&&(a=0),(isNaN(r)||isNaN(parseFloat(t.right)))&&(r=n),(isNaN(o)||isNaN(parseFloat(t.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.bottom)))&&(l=s),i=normalizeCssArray(i||0),{width:Math.max(r-a-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}}function getLayoutRect(t,e,i){i=normalizeCssArray(i||0);var n=e.width,s=e.height,a=parsePercent(t.left,n),o=parsePercent(t.top,s),r=parsePercent(t.right,n),l=parsePercent(t.bottom,s),h=parsePercent(t.width,n),c=parsePercent(t.height,s),u=i[2]+i[0],d=i[1]+i[3],p=t.aspect;switch(isNaN(h)&&(h=n-r-d-a),isNaN(c)&&(c=s-l-u-o),null!=p&&(isNaN(h)&&isNaN(c)&&(p>n/s?h=.8*n:c=.8*s),isNaN(h)&&(h=p*c),isNaN(c)&&(c=h/p)),isNaN(a)&&(a=n-r-h-d),isNaN(o)&&(o=s-l-c-u),t.left||t.right){case"center":a=n/2-h/2-i[3];break;case"right":a=n-h-d}switch(t.top||t.bottom){case"middle":case"center":o=s/2-c/2-i[0];break;case"bottom":o=s-c-u}a=a||0,o=o||0,isNaN(h)&&(h=n-d-a-(r||0)),isNaN(c)&&(c=s-u-o-(l||0));var g=new BoundingRect$1(a+i[3],o+i[0],h,c);return g.margin=i,g}function positionElement(t,e,i,n,s,a){var o,r=!s||!s.hv||s.hv[0],l=!s||!s.hv||s.hv[1],h=s&&s.boundingMode||"all";if((a=a||t).x=t.x,a.y=t.y,!r&&!l)return!1;if("raw"===h)o="group"===t.type?new BoundingRect$1(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(o=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(o=o.clone()).applyTransform(c)}var u=getLayoutRect(defaults({width:o.width,height:o.height},e),i,n),d=r?u.x-o.x:0,p=l?u.y-o.y:0;return"raw"===h?(a.x=d,a.y=p):(a.x+=d,a.y+=p),a===t&&t.markRedraw(),!0}function sizeCalculable(t,e){return null!=t[HV_NAMES[e][0]]||null!=t[HV_NAMES[e][1]]&&null!=t[HV_NAMES[e][2]]}function fetchLayoutMode(t){var e=t.layoutMode||t.constructor.layoutMode;return isObject$2(e)?e:e?{type:e}:null}function mergeLayoutParam(t,e,i){var n=i&&i.ignoreSize;!isArray(n)&&(n=[n,n]);var s=o(HV_NAMES[0],0),a=o(HV_NAMES[1],1);function o(i,s){var a={},o=0,h={},c=0;if(each$3(i,(function(e){h[e]=t[e]})),each$3(i,(function(t){r(e,t)&&(a[t]=h[t]=e[t]),l(a,t)&&o++,l(h,t)&&c++})),n[s])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==c&&o){if(o>=2)return a;for(var u=0;u<i.length;u++){var d=i[u];if(!r(a,d)&&r(t,d)){a[d]=t[d];break}}return a}return h}function r(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function h(t,e,i){each$3(t,(function(t){e[t]=i[t]}))}h(HV_NAMES[0],t,s),h(HV_NAMES[1],t,a)}function getLayoutParams(t){return copyLayoutParams({},t)}function copyLayoutParams(t,e){return e&&t&&each$3(LOCATION_PARAMS,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}curry$1(boxLayout,"vertical"),curry$1(boxLayout,"horizontal");var inner$7=makeInner(),ComponentModel=function(t){function e(e,i,n){var s=t.call(this,e,i,n)||this;return s.uid=getUID("ec_cpt_model"),s}var i;return __extends(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,e){var i=fetchLayoutMode(this),n=i?getLayoutParams(t):{};merge(t,e.getTheme().get(this.mainType)),merge(t,this.getDefaultOption()),i&&mergeLayoutParam(t,n,i)},e.prototype.mergeOption=function(t,e){merge(this.option,t,!0);var i=fetchLayoutMode(this);i&&mergeLayoutParam(this.option,t,i)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!isExtendedClass(t))return t.defaultOption;var e=inner$7(this);if(!e.defaultOption){for(var i=[],n=t;n;){var s=n.prototype.defaultOption;s&&i.push(s),n=n.superClass}for(var a={},o=i.length-1;o>=0;o--)a=merge(a,i[o],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var i=t+"Index",n=t+"Id";return queryReferringComponents(this.ecModel,t,{index:this.get(i,!0),id:this.get(n,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((i=e.prototype).type="component",i.id="",i.name="",i.mainType="",i.subType="",void(i.componentIndex=0)),e}(Model$1);function getDependencies(t){var e=[];return each$4(ComponentModel.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=map$1(e,(function(t){return parseClassType(t).main})),"dataset"!==t&&indexOf(e,"dataset")<=0&&e.unshift("dataset"),e}mountExtend(ComponentModel,Model$1),enableClassManagement(ComponentModel),enableSubTypeDefaulter(ComponentModel),enableTopologicalTravel(ComponentModel,getDependencies);var ComponentModel$1=ComponentModel,platform="";"undefined"!=typeof navigator&&(platform=navigator.platform||"");var decalColor="rgba(0, 0, 0, 0.2)",globalDefault={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:decalColor,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:decalColor,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:decalColor,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:decalColor,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:decalColor,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:decalColor,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:platform.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},VISUAL_DIMENSIONS=createHashMap(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),SOURCE_FORMAT_ORIGINAL="original",SOURCE_FORMAT_ARRAY_ROWS="arrayRows",SOURCE_FORMAT_OBJECT_ROWS="objectRows",SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",SOURCE_FORMAT_TYPED_ARRAY="typedArray",SOURCE_FORMAT_UNKNOWN="unknown",SERIES_LAYOUT_BY_COLUMN="column",SERIES_LAYOUT_BY_ROW="row",BE_ORDINAL={Must:1,Might:2,Not:3},innerGlobalModel=makeInner();function resetSourceDefaulter(t){innerGlobalModel(t).datasetMap=createHashMap()}function makeSeriesEncodeForAxisCoordSys(t,e,i){var n={},s=querySeriesUpstreamDatasetModel(e);if(!s||!t)return n;var a,o,r=[],l=[],h=e.ecModel,c=innerGlobalModel(h).datasetMap,u=s.uid+"_"+i.seriesLayoutBy;each$4(t=t.slice(),(function(e,i){var s=isObject$2(e)?e:t[i]={name:e};"ordinal"===s.type&&null==a&&(a=i,o=g(s)),n[s.name]=[]}));var d=c.get(u)||c.set(u,{categoryWayDim:o,valueWayDim:0});function p(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function g(t){var e=t.dimsDef;return e?e.length:1}return each$4(t,(function(t,e){var i=t.name,s=g(t);if(null==a){var o=d.valueWayDim;p(n[i],o,s),p(l,o,s),d.valueWayDim+=s}else if(a===e)p(n[i],0,s),p(r,0,s);else{o=d.categoryWayDim;p(n[i],o,s),p(l,o,s),d.categoryWayDim+=s}})),r.length&&(n.itemName=r),l.length&&(n.seriesName=l),n}function makeSeriesEncodeForNameBased(t,e,i){var n={};if(!querySeriesUpstreamDatasetModel(t))return n;var s,a=e.sourceFormat,o=e.dimensionsDefine;a!==SOURCE_FORMAT_OBJECT_ROWS&&a!==SOURCE_FORMAT_KEYED_COLUMNS||each$4(o,(function(t,e){"name"===(isObject$2(t)?t.name:t)&&(s=e)}));var r=function(){for(var t={},n={},r=[],l=0,h=Math.min(5,i);l<h;l++){var c=doGuessOrdinal(e.data,a,e.seriesLayoutBy,o,e.startIndex,l);r.push(c);var u=c===BE_ORDINAL.Not;if(u&&null==t.v&&l!==s&&(t.v=l),(null==t.n||t.n===t.v||!u&&r[t.n]===BE_ORDINAL.Not)&&(t.n=l),d(t)&&r[t.n]!==BE_ORDINAL.Not)return t;u||(c===BE_ORDINAL.Might&&null==n.v&&l!==s&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(t){return null!=t.v&&null!=t.n}return d(t)?t:d(n)?n:null}();if(r){n.value=[r.v];var l=null!=s?s:r.n;n.itemName=[l],n.seriesName=[l]}return n}function querySeriesUpstreamDatasetModel(t){if(!t.get("data",!0))return queryReferringComponents(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},SINGLE_REFERRING).models[0]}function queryDatasetUpstreamDatasetModels(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?queryReferringComponents(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},SINGLE_REFERRING).models:[]}function guessOrdinal(t,e){return doGuessOrdinal(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function doGuessOrdinal(t,e,i,n,s,a){var o,r,l;if(isTypedArray(t))return BE_ORDINAL.Not;if(n){var h=n[a];isObject$2(h)?(r=h.name,l=h.type):isString(h)&&(r=h)}if(null!=l)return"ordinal"===l?BE_ORDINAL.Must:BE_ORDINAL.Not;if(e===SOURCE_FORMAT_ARRAY_ROWS){var c=t;if(i===SERIES_LAYOUT_BY_ROW){for(var u=c[a],d=0;d<(u||[]).length&&d<5;d++)if(null!=(o=y(u[s+d])))return o}else for(d=0;d<c.length&&d<5;d++){var p=c[s+d];if(p&&null!=(o=y(p[a])))return o}}else if(e===SOURCE_FORMAT_OBJECT_ROWS){var g=t;if(!r)return BE_ORDINAL.Not;for(d=0;d<g.length&&d<5;d++){if((v=g[d])&&null!=(o=y(v[r])))return o}}else if(e===SOURCE_FORMAT_KEYED_COLUMNS){var f=t;if(!r)return BE_ORDINAL.Not;if(!(u=f[r])||isTypedArray(u))return BE_ORDINAL.Not;for(d=0;d<u.length&&d<5;d++)if(null!=(o=y(u[d])))return o}else if(e===SOURCE_FORMAT_ORIGINAL){var m=t;for(d=0;d<m.length&&d<5;d++){var v,b=getDataItemValue(v=m[d]);if(!isArray(b))return BE_ORDINAL.Not;if(null!=(o=y(b[a])))return o}}function y(t){var e=isString(t);return null!=t&&Number.isFinite(Number(t))&&""!==t?e?BE_ORDINAL.Might:BE_ORDINAL.Not:e&&"-"!==t?BE_ORDINAL.Must:void 0}return BE_ORDINAL.Not}var internalOptionCreatorMap=createHashMap();function registerInternalOptionCreator(t,e){assert(null==internalOptionCreatorMap.get(t)&&e),internalOptionCreatorMap.set(t,e)}function concatInternalOptions(t,e,i){var n=internalOptionCreatorMap.get(e);if(!n)return i;var s=n(t);return s?i.concat(s):i}var innerColor=makeInner(),innerDecal=makeInner(),PaletteMixin=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,i){var n=normalizeToArray(this.get("color",!0)),s=this.get("colorLayer",!0);return getFromPalette(this,innerColor,n,s,t,e,i)},t.prototype.clearColorPalette=function(){clearPalette(this,innerColor)},t}(),reCreateSeriesIndices,assertSeriesInitialized,initBase;function getDecalFromPalette(t,e,i,n){var s=normalizeToArray(t.get(["aria","decal","decals"]));return getFromPalette(t,innerDecal,s,null,e,i,n)}function getNearestPalette(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}function getFromPalette(t,e,i,n,s,a,o){var r=e(a=a||t),l=r.paletteIdx||0,h=r.paletteNameMap=r.paletteNameMap||{};if(h.hasOwnProperty(s))return h[s];var c=null!=o&&n?getNearestPalette(n,o):i;if((c=c||i)&&c.length){var u=c[l];return s&&(h[s]=u),r.paletteIdx=(l+1)%c.length,u}}function clearPalette(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var OPTION_INNER_KEY="\0_ec_inner",OPTION_INNER_VALUE=1,GlobalModel=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.init=function(t,e,i,n,s,a){n=n||{},this.option=null,this._theme=new Model$1(n),this._locale=new Model$1(s),this._optionManager=a},e.prototype.setOption=function(t,e,i){var n=normalizeSetOptionInput(e);this._optionManager.setOption(t,i,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,e){return this._resetOption(t,normalizeSetOptionInput(e))},e.prototype._resetOption=function(t,e){var i=!1,n=this._optionManager;if(!t||"recreate"===t){var s=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(s,e)):initBase(this,s),i=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=n.getTimelineOption(this);a&&(i=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var o=n.getMediaOption(this);o.length&&each$4(o,(function(t){i=!0,this._mergeOption(t,e)}),this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var i=this.option,n=this._componentsMap,s=this._componentsCount,a=[],o=createHashMap(),r=e&&e.replaceMergeMainTypeMap;resetSourceDefaulter(this),each$4(t,(function(t,e){null!=t&&(ComponentModel$1.hasClass(e)?e&&(a.push(e),o.set(e,!0)):i[e]=null==i[e]?clone$3(t):merge(i[e],t,!0))})),r&&r.each((function(t,e){ComponentModel$1.hasClass(e)&&!o.get(e)&&(a.push(e),o.set(e,!0))})),ComponentModel$1.topologicalTravel(a,ComponentModel$1.getAllClassMainTypes(),(function(e){var a=concatInternalOptions(this,e,normalizeToArray(t[e])),o=n.get(e),l=o?r&&r.get(e)?"replaceMerge":"normalMerge":"replaceAll",h=mappingToExists(o,a,l);setComponentTypeToKeyInfo(h,e,ComponentModel$1),i[e]=null,n.set(e,null),s.set(e,0);var c,u=[],d=[],p=0;each$4(h,(function(t,i){var n=t.existing,s=t.newOption;if(s){var a="series"===e,o=ComponentModel$1.getClass(e,t.keyInfo.subType,!a);if(!o)return;if("tooltip"===e){if(c)return;c=!0}if(n&&n.constructor===o)n.name=t.keyInfo.name,n.mergeOption(s,this),n.optionUpdated(s,!1);else{var r=extend({componentIndex:i},t.keyInfo);extend(n=new o(s,this,this,r),r),t.brandNew&&(n.__requireNewView=!0),n.init(s,this,this),n.optionUpdated(null,!0)}}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(u.push(n.option),d.push(n),p++):(u.push(void 0),d.push(void 0))}),this),i[e]=u,n.set(e,d),s.set(e,p),"series"===e&&reCreateSeriesIndices(this)}),this),this._seriesIndices||reCreateSeriesIndices(this)},e.prototype.getOption=function(){var t=clone$3(this.option);return each$4(t,(function(e,i){if(ComponentModel$1.hasClass(i)){for(var n=normalizeToArray(e),s=n.length,a=!1,o=s-1;o>=0;o--)n[o]&&!isComponentIdInternal(n[o])?a=!0:(n[o]=null,!a&&s--);n.length=s,t[i]=n}})),delete t[OPTION_INNER_KEY],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var i=this._componentsMap.get(t);if(i){var n=i[e||0];if(n)return n;if(null==e)for(var s=0;s<i.length;s++)if(i[s])return i[s]}},e.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,s=t.id,a=t.name,o=this._componentsMap.get(e);return o&&o.length?(null!=n?(i=[],each$4(normalizeToArray(n),(function(t){o[t]&&i.push(o[t])}))):i=null!=s?queryByIdOrName("id",s,o):null!=a?queryByIdOrName("name",a,o):filter(o,(function(t){return!!t})),filterBySubType(i,t)):[]},e.prototype.findComponents=function(t){var e,i,n,s,a=t.query,o=t.mainType,r=(i=o+"Index",n=o+"Id",s=o+"Name",!(e=a)||null==e[i]&&null==e[n]&&null==e[s]?null:{mainType:o,index:e[i],id:e[n],name:e[s]});return function(e){return t.filter?filter(e,t.filter):e}(filterBySubType(r?this.queryComponents(r):filter(this._componentsMap.get(o),(function(t){return!!t})),t))},e.prototype.eachComponent=function(t,e,i){var n=this._componentsMap;if(isFunction(t)){var s=e,a=t;n.each((function(t,e){for(var i=0;t&&i<t.length;i++){var n=t[i];n&&a.call(s,e,n,n.componentIndex)}}))}else for(var o=isString(t)?n.get(t):isObject$2(t)?this.findComponents(t):null,r=0;o&&r<o.length;r++){var l=o[r];l&&e.call(i,l,l.componentIndex)}},e.prototype.getSeriesByName=function(t){var e=convertOptionIdName(t,null);return filter(this._componentsMap.get("series"),(function(t){return!!t&&null!=e&&t.name===e}))},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return filter(this._componentsMap.get("series"),(function(e){return!!e&&e.subType===t}))},e.prototype.getSeries=function(){return filter(this._componentsMap.get("series"),(function(t){return!!t}))},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,e){assertSeriesInitialized(this),each$4(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},e.prototype.eachRawSeries=function(t,e){each$4(this._componentsMap.get("series"),(function(i){i&&t.call(e,i,i.componentIndex)}))},e.prototype.eachSeriesByType=function(t,e,i){assertSeriesInitialized(this),each$4(this._seriesIndices,(function(n){var s=this._componentsMap.get("series")[n];s.subType===t&&e.call(i,s,n)}),this)},e.prototype.eachRawSeriesByType=function(t,e,i){return each$4(this.getSeriesByType(t),e,i)},e.prototype.isSeriesFiltered=function(t){return assertSeriesInitialized(this),null==this._seriesIndicesMap.get(t.componentIndex)},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,e){assertSeriesInitialized(this);var i=[];each$4(this._seriesIndices,(function(n){var s=this._componentsMap.get("series")[n];t.call(e,s,n)&&i.push(n)}),this),this._seriesIndices=i,this._seriesIndicesMap=createHashMap(i)},e.prototype.restoreData=function(t){reCreateSeriesIndices(this);var e=this._componentsMap,i=[];e.each((function(t,e){ComponentModel$1.hasClass(e)&&i.push(e)})),ComponentModel$1.topologicalTravel(i,ComponentModel$1.getAllClassMainTypes(),(function(i){each$4(e.get(i),(function(e){!e||"series"===i&&isNotTargetSeries(e,t)||e.restoreData()}))}))},e.internalField=(reCreateSeriesIndices=function(t){var e=t._seriesIndices=[];each$4(t._componentsMap.get("series"),(function(t){t&&e.push(t.componentIndex)})),t._seriesIndicesMap=createHashMap(e)},assertSeriesInitialized=function(t){},void(initBase=function(t,e){t.option={},t.option[OPTION_INNER_KEY]=OPTION_INNER_VALUE,t._componentsMap=createHashMap({series:[]}),t._componentsCount=createHashMap();var i=e.aria;isObject$2(i)&&null==i.enabled&&(i.enabled=!0),mergeTheme(e,t._theme.option),merge(e,globalDefault,!1),t._mergeOption(e,null)})),e}(Model$1);function isNotTargetSeries(t,e){if(e){var i=e.seriesIndex,n=e.seriesId,s=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=s&&t.name!==s}}function mergeTheme(t,e){var i=t.color&&!t.colorLayer;each$4(e,(function(e,n){"colorLayer"===n&&i||ComponentModel$1.hasClass(n)||("object"==typeof e?t[n]=t[n]?merge(t[n],e,!1):clone$3(e):null==t[n]&&(t[n]=e))}))}function queryByIdOrName(t,e,i){if(isArray(e)){var n=createHashMap();return each$4(e,(function(t){null!=t&&(null!=convertOptionIdName(t,null)&&n.set(t,!0))})),filter(i,(function(e){return e&&n.get(e[t])}))}var s=convertOptionIdName(e,null);return filter(i,(function(e){return e&&null!=s&&e[t]===s}))}function filterBySubType(t,e){return e.hasOwnProperty("subType")?filter(t,(function(t){return t&&t.subType===e.subType})):t}function normalizeSetOptionInput(t){var e=createHashMap();return t&&each$4(normalizeToArray(t.replaceMerge),(function(t){e.set(t,!0)})),{replaceMergeMainTypeMap:e}}mixin(GlobalModel,PaletteMixin);var GlobalModel$1=GlobalModel,availableMethods=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],ExtensionAPI=function(t){each$4(availableMethods,(function(e){this[e]=bind$1(t[e],t)}),this)},ExtensionAPI$1=ExtensionAPI,coordinateSystemCreators={},CoordinateSystemManager=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var i=[];each$4(coordinateSystemCreators,(function(n,s){var a=n.create(t,e);i=i.concat(a||[])})),this._coordinateSystems=i},t.prototype.update=function(t,e){each$4(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){coordinateSystemCreators[t]=e},t.get=function(t){return coordinateSystemCreators[t]},t}(),CoordinateSystem=CoordinateSystemManager,QUERY_REG=/^(min|max)?(.+)$/,OptionManager=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,i){t&&(each$4(normalizeToArray(t.series),(function(t){t&&t.data&&isTypedArray(t.data)&&setAsPrimitive(t.data)})),each$4(normalizeToArray(t.dataset),(function(t){t&&t.source&&isTypedArray(t.source)&&setAsPrimitive(t.source)}))),t=clone$3(t);var n=this._optionBackup,s=parseRawOption(t,e,!n);this._newBaseOption=s.baseOption,n?(s.timelineOptions.length&&(n.timelineOptions=s.timelineOptions),s.mediaList.length&&(n.mediaList=s.mediaList),s.mediaDefault&&(n.mediaDefault=s.mediaDefault)):this._optionBackup=s},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],clone$3(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=clone$3(i[n.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,s=this._mediaDefault,a=[],o=[];if(!n.length&&!s)return o;for(var r=0,l=n.length;r<l;r++)applyMediaQuery(n[r].query,e,i)&&a.push(r);return!a.length&&s&&(a=[-1]),a.length&&!indicesEquals(a,this._currentMediaIndices)&&(o=map$1(a,(function(t){return clone$3(-1===t?s.option:n[t].option)}))),this._currentMediaIndices=a,o},t}();function parseRawOption(t,e,i){var n,s,a=[],o=t.baseOption,r=t.timeline,l=t.options,h=t.media,c=!!t.media,u=!!(l||r||o&&o.timeline);function d(t){each$4(e,(function(e){e(t,i)}))}return o?(s=o).timeline||(s.timeline=r):((u||c)&&(t.options=t.media=null),s=t),c&&isArray(h)&&each$4(h,(function(t){t&&t.option&&(t.query?a.push(t):n||(n=t))})),d(s),each$4(l,(function(t){return d(t)})),each$4(a,(function(t){return d(t.option)})),{baseOption:s,timelineOptions:l||[],mediaDefault:n,mediaList:a}}function applyMediaQuery(t,e,i){var n={width:e,height:i,aspectratio:e/i},s=!0;return each$4(t,(function(t,e){var i=e.match(QUERY_REG);if(i&&i[1]&&i[2]){var a=i[1],o=i[2].toLowerCase();compare(n[o],t,a)||(s=!1)}})),s}function compare(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e}function indicesEquals(t,e){return t.join(",")===e.join(",")}var OptionManager$1=OptionManager,each$2=each$4,isObject$1=isObject$2,POSSIBLE_STYLES=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function compatEC2ItemStyle(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=POSSIBLE_STYLES.length;i<n;i++){var s=POSSIBLE_STYLES[i],a=e.normal,o=e.emphasis;a&&a[s]&&(t[s]=t[s]||{},t[s].normal?merge(t[s].normal,a[s]):t[s].normal=a[s],a[s]=null),o&&o[s]&&(t[s]=t[s]||{},t[s].emphasis?merge(t[s].emphasis,o[s]):t[s].emphasis=o[s],o[s]=null)}}function convertNormalEmphasis(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,s=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,defaults(t[e],n)):t[e]=n),s&&(t.emphasis=t.emphasis||{},t.emphasis[e]=s,s.focus&&(t.emphasis.focus=s.focus),s.blurScope&&(t.emphasis.blurScope=s.blurScope))}}function removeEC3NormalStatus(t){convertNormalEmphasis(t,"itemStyle"),convertNormalEmphasis(t,"lineStyle"),convertNormalEmphasis(t,"areaStyle"),convertNormalEmphasis(t,"label"),convertNormalEmphasis(t,"labelLine"),convertNormalEmphasis(t,"upperLabel"),convertNormalEmphasis(t,"edgeLabel")}function compatTextStyle(t,e){var i=isObject$1(t)&&t[e],n=isObject$1(i)&&i.textStyle;if(n)for(var s=0,a=TEXT_STYLE_OPTIONS.length;s<a;s++){var o=TEXT_STYLE_OPTIONS[s];n.hasOwnProperty(o)&&(i[o]=n[o])}}function compatEC3CommonStyles(t){t&&(removeEC3NormalStatus(t),compatTextStyle(t,"label"),t.emphasis&&compatTextStyle(t.emphasis,"label"))}function processSeries(t){if(isObject$1(t)){compatEC2ItemStyle(t),removeEC3NormalStatus(t),compatTextStyle(t,"label"),compatTextStyle(t,"upperLabel"),compatTextStyle(t,"edgeLabel"),t.emphasis&&(compatTextStyle(t.emphasis,"label"),compatTextStyle(t.emphasis,"upperLabel"),compatTextStyle(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(compatEC2ItemStyle(e),compatEC3CommonStyles(e));var i=t.markLine;i&&(compatEC2ItemStyle(i),compatEC3CommonStyles(i));var n=t.markArea;n&&compatEC3CommonStyles(n);var s=t.data;if("graph"===t.type){s=s||t.nodes;var a=t.links||t.edges;if(a&&!isTypedArray(a))for(var o=0;o<a.length;o++)compatEC3CommonStyles(a[o]);each$4(t.categories,(function(t){removeEC3NormalStatus(t)}))}if(s&&!isTypedArray(s))for(o=0;o<s.length;o++)compatEC3CommonStyles(s[o]);if((e=t.markPoint)&&e.data){var r=e.data;for(o=0;o<r.length;o++)compatEC3CommonStyles(r[o])}if((i=t.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)isArray(l[o])?(compatEC3CommonStyles(l[o][0]),compatEC3CommonStyles(l[o][1])):compatEC3CommonStyles(l[o])}"gauge"===t.type?(compatTextStyle(t,"axisLabel"),compatTextStyle(t,"title"),compatTextStyle(t,"detail")):"treemap"===t.type?(convertNormalEmphasis(t.breadcrumb,"itemStyle"),each$4(t.levels,(function(t){removeEC3NormalStatus(t)}))):"tree"===t.type&&removeEC3NormalStatus(t.leaves)}}function toArr(t){return isArray(t)?t:t?[t]:[]}function toObj(t){return(isArray(t)?t[0]:t)||{}}function globalCompatStyle(t,e){each$2(toArr(t.series),(function(t){isObject$1(t)&&processSeries(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),each$2(i,(function(e){each$2(toArr(t[e]),(function(t){t&&(compatTextStyle(t,"axisLabel"),compatTextStyle(t.axisPointer,"label"))}))})),each$2(toArr(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;compatTextStyle(e,"axisLabel"),compatTextStyle(e&&e.axisPointer,"label")})),each$2(toArr(t.calendar),(function(t){convertNormalEmphasis(t,"itemStyle"),compatTextStyle(t,"dayLabel"),compatTextStyle(t,"monthLabel"),compatTextStyle(t,"yearLabel")})),each$2(toArr(t.radar),(function(t){compatTextStyle(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)})),each$2(toArr(t.geo),(function(t){isObject$1(t)&&(compatEC3CommonStyles(t),each$2(toArr(t.regions),(function(t){compatEC3CommonStyles(t)})))})),each$2(toArr(t.timeline),(function(t){compatEC3CommonStyles(t),convertNormalEmphasis(t,"label"),convertNormalEmphasis(t,"itemStyle"),convertNormalEmphasis(t,"controlStyle",!0);var e=t.data;isArray(e)&&each$4(e,(function(t){isObject$2(t)&&(convertNormalEmphasis(t,"label"),convertNormalEmphasis(t,"itemStyle"))}))})),each$2(toArr(t.toolbox),(function(t){convertNormalEmphasis(t,"iconStyle"),each$2(t.feature,(function(t){convertNormalEmphasis(t,"iconStyle")}))})),compatTextStyle(toObj(t.axisPointer),"label"),compatTextStyle(toObj(t.tooltip).axisPointer,"label")}function get(t,e){for(var i=e.split(","),n=t,s=0;s<i.length&&null!=(n=n&&n[i[s]]);s++);return n}function set(t,e,i,n){for(var s,a=e.split(","),o=t,r=0;r<a.length-1;r++)null==o[s=a[r]]&&(o[s]={}),o=o[s];(n||null==o[a[r]])&&(o[a[r]]=i)}function compatLayoutProperties(t){t&&each$4(LAYOUT_PROPERTIES,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var LAYOUT_PROPERTIES=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],COMPATITABLE_COMPONENTS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],BAR_ITEM_STYLE_MAP=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function compatBarItemStyle(t){var e=t&&t.itemStyle;if(e)for(var i=0;i<BAR_ITEM_STYLE_MAP.length;i++){var n=BAR_ITEM_STYLE_MAP[i][1],s=BAR_ITEM_STYLE_MAP[i][0];null!=e[n]&&(e[s]=e[n])}}function compatPieLabel(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function compatSunburstState(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function compatGraphFocus(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}function traverseTree(t,e){if(t)for(var i=0;i<t.length;i++)e(t[i]),t[i]&&traverseTree(t[i].children,e)}function globalBackwardCompat(t,e){globalCompatStyle(t,e),t.series=normalizeToArray(t.series),each$4(t.series,(function(t){if(isObject$2(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e){if(null!=t.clockWise&&(t.clockwise=t.clockWise),compatPieLabel(t.label),(s=t.data)&&!isTypedArray(s))for(var i=0;i<s.length;i++)compatPieLabel(s[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===e){var n=get(t,"pointer.color");null!=n&&set(t,"itemStyle.color",n)}else if("bar"===e){var s;if(compatBarItemStyle(t),compatBarItemStyle(t.backgroundStyle),compatBarItemStyle(t.emphasis),(s=t.data)&&!isTypedArray(s))for(i=0;i<s.length;i++)"object"==typeof s[i]&&(compatBarItemStyle(s[i]),compatBarItemStyle(s[i]&&s[i].emphasis))}else if("sunburst"===e){var a=t.highlightPolicy;a&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=a)),compatSunburstState(t),traverseTree(t.data,compatSunburstState)}else"graph"===e||"sankey"===e?compatGraphFocus(t):"map"===e&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&defaults(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),compatLayoutProperties(t)}})),t.dataRange&&(t.visualMap=t.dataRange),each$4(COMPATITABLE_COMPONENTS,(function(e){var i=t[e];i&&(isArray(i)||(i=[i]),each$4(i,(function(t){compatLayoutProperties(t)})))}))}function dataStack(t){var e=createHashMap();t.eachSeries((function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),s=t.getData(),a={stackResultDimension:s.getCalculationInfo("stackResultDimension"),stackedOverDimension:s.getCalculationInfo("stackedOverDimension"),stackedDimension:s.getCalculationInfo("stackedDimension"),stackedByDimension:s.getCalculationInfo("stackedByDimension"),isStackedByIndex:s.getCalculationInfo("isStackedByIndex"),data:s,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&s.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),e.each(calculateStack)}function calculateStack(t){each$4(t,(function(e,i){var n=[],s=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,r=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,(function(a,h,c){var u,d,p=o.get(e.stackedDimension,c);if(isNaN(p))return s;r?d=o.getRawIndex(c):u=o.get(e.stackedByDimension,c);for(var g=NaN,f=i-1;f>=0;f--){var m=t[f];if(r||(d=m.data.rawIndexOf(m.stackedByDimension,u)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=addSafe(p,v),g=v;break}}}return n[0]=p,n[1]=g,n}))}))}var SourceImpl=function(t){this.data=t.data||(t.sourceFormat===SOURCE_FORMAT_KEYED_COLUMNS?{}:[]),this.sourceFormat=t.sourceFormat||SOURCE_FORMAT_UNKNOWN,this.seriesLayoutBy=t.seriesLayoutBy||SERIES_LAYOUT_BY_COLUMN,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];null==n.type&&guessOrdinal(this,i)===BE_ORDINAL.Must&&(n.type="ordinal")}},_a,_b,_c,providerMethods,mountMethods;function isSourceInstance(t){return t instanceof SourceImpl}function createSource(t,e,i){i=i||detectSourceFormat(t);var n=e.seriesLayoutBy,s=determineSourceDimensions(t,i,n,e.sourceHeader,e.dimensions);return new SourceImpl({data:t,sourceFormat:i,seriesLayoutBy:n,dimensionsDefine:s.dimensionsDefine,startIndex:s.startIndex,dimensionsDetectedCount:s.dimensionsDetectedCount,metaRawOption:clone$3(e)})}function createSourceFromSeriesDataOption(t){return new SourceImpl({data:t,sourceFormat:isTypedArray(t)?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL})}function cloneSourceShallow(t){return new SourceImpl({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:clone$3(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function detectSourceFormat(t){var e=SOURCE_FORMAT_UNKNOWN;if(isTypedArray(t))e=SOURCE_FORMAT_TYPED_ARRAY;else if(isArray(t)){0===t.length&&(e=SOURCE_FORMAT_ARRAY_ROWS);for(var i=0,n=t.length;i<n;i++){var s=t[i];if(null!=s){if(isArray(s)||isTypedArray(s)){e=SOURCE_FORMAT_ARRAY_ROWS;break}if(isObject$2(s)){e=SOURCE_FORMAT_OBJECT_ROWS;break}}}}else if(isObject$2(t))for(var a in t)if(hasOwn(t,a)&&isArrayLike(t[a])){e=SOURCE_FORMAT_KEYED_COLUMNS;break}return e}function determineSourceDimensions(t,e,i,n,s){var a,o;if(!t)return{dimensionsDefine:normalizeDimensionsOption(s),startIndex:o,dimensionsDetectedCount:a};if(e===SOURCE_FORMAT_ARRAY_ROWS){var r=t;"auto"===n||null==n?arrayRowsTravelFirst((function(t){null!=t&&"-"!==t&&(isString(t)?null==o&&(o=1):o=0)}),i,r,10):o=isNumber$1(n)?n:n?1:0,s||1!==o||(s=[],arrayRowsTravelFirst((function(t,e){s[e]=null!=t?t+"":""}),i,r,1/0)),a=s?s.length:i===SERIES_LAYOUT_BY_ROW?r.length:r[0]?r[0].length:null}else if(e===SOURCE_FORMAT_OBJECT_ROWS)s||(s=objectRowsCollectDimensions(t));else if(e===SOURCE_FORMAT_KEYED_COLUMNS)s||(s=[],each$4(t,(function(t,e){s.push(e)})));else if(e===SOURCE_FORMAT_ORIGINAL){var l=getDataItemValue(t[0]);a=isArray(l)&&l.length||1}return{startIndex:o,dimensionsDefine:normalizeDimensionsOption(s),dimensionsDetectedCount:a}}function objectRowsCollectDimensions(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e)return keys(e)}function normalizeDimensionsOption(t){if(t){var e=createHashMap();return map$1(t,(function(t,i){var n={name:(t=isObject$2(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==n.name)return n;n.name+="",null==n.displayName&&(n.displayName=n.name);var s=e.get(n.name);return s?n.name+="-"+s.count++:e.set(n.name,{count:1}),n}))}}function arrayRowsTravelFirst(t,e,i,n){if(e===SERIES_LAYOUT_BY_ROW)for(var s=0;s<i.length&&s<n;s++)t(i[s]?i[s][0]:null,s);else{var a=i[0]||[];for(s=0;s<a.length&&s<n;s++)t(a[s],s)}}function shouldRetrieveDataByName(t){var e=t.sourceFormat;return e===SOURCE_FORMAT_OBJECT_ROWS||e===SOURCE_FORMAT_KEYED_COLUMNS}var DefaultDataProvider=function(){function t(t,e){var i=isSourceInstance(t)?t:createSourceFromSeriesDataOption(t);this._source=i;var n=this._data=i.data;i.sourceFormat===SOURCE_FORMAT_TYPED_ARRAY&&(this._offset=0,this._dimSize=e,this._data=n),mountMethods(this,n,i)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;mountMethods=function(t,s,a){var o=a.sourceFormat,r=a.seriesLayoutBy,l=a.startIndex,h=a.dimensionsDefine;if(extend(t,providerMethods[getMethodMapKey(o,r)]),o===SOURCE_FORMAT_TYPED_ARRAY)t.getItem=e,t.count=n,t.fillStorage=i;else{var c=getRawSourceItemGetter(o,r);t.getItem=bind$1(c,null,s,l,h);var u=getRawSourceDataCounter(o,r);t.count=bind$1(u,null,s,l,h)}};var e=function(t,e){t-=this._offset,e=e||[];for(var i=this._data,n=this._dimSize,s=n*t,a=0;a<n;a++)e[a]=i[s+a];return e},i=function(t,e,i,n){for(var s=this._data,a=this._dimSize,o=0;o<a;o++){for(var r=n[o],l=null==r[0]?1/0:r[0],h=null==r[1]?-1/0:r[1],c=e-t,u=i[o],d=0;d<c;d++){var p=s[d*a+o];u[t+d]=p,p<l&&(l=p),p>h&&(h=p)}r[0]=l,r[1]=h}},n=function(){return this._data?this._data.length/this._dimSize:0};function s(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]={pure:!0,appendData:s},t[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[SOURCE_FORMAT_OBJECT_ROWS]={pure:!0,appendData:s},t[SOURCE_FORMAT_KEYED_COLUMNS]={pure:!0,appendData:function(t){var e=this._data;each$4(t,(function(t,i){for(var n=e[i]||(e[i]=[]),s=0;s<(t||[]).length;s++)n.push(t[s])}))}},t[SOURCE_FORMAT_ORIGINAL]={appendData:s},t[SOURCE_FORMAT_TYPED_ARRAY]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},providerMethods=t}(),t}(),getItemSimply=function(t,e,i,n){return t[n]},rawSourceItemGetterMap=(_a={},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(t,e,i,n){return t[n+e]},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(t,e,i,n,s){n+=e;for(var a=s||[],o=t,r=0;r<o.length;r++){var l=o[r];a[r]=l?l[n]:null}return a},_a[SOURCE_FORMAT_OBJECT_ROWS]=getItemSimply,_a[SOURCE_FORMAT_KEYED_COLUMNS]=function(t,e,i,n,s){for(var a=s||[],o=0;o<i.length;o++){var r=t[i[o].name];a[o]=r?r[n]:null}return a},_a[SOURCE_FORMAT_ORIGINAL]=getItemSimply,_a);function getRawSourceItemGetter(t,e){return rawSourceItemGetterMap[getMethodMapKey(t,e)]}var countSimply=function(t,e,i){return t.length},rawSourceDataCounterMap=(_b={},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(t,e,i){return Math.max(0,t.length-e)},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(t,e,i){var n=t[0];return n?Math.max(0,n.length-e):0},_b[SOURCE_FORMAT_OBJECT_ROWS]=countSimply,_b[SOURCE_FORMAT_KEYED_COLUMNS]=function(t,e,i){var n=t[i[0].name];return n?n.length:0},_b[SOURCE_FORMAT_ORIGINAL]=countSimply,_b);function getRawSourceDataCounter(t,e){return rawSourceDataCounterMap[getMethodMapKey(t,e)]}var getRawValueSimply=function(t,e,i){return t[e]},rawSourceValueGetterMap=(_c={},_c[SOURCE_FORMAT_ARRAY_ROWS]=getRawValueSimply,_c[SOURCE_FORMAT_OBJECT_ROWS]=function(t,e,i){return t[i]},_c[SOURCE_FORMAT_KEYED_COLUMNS]=getRawValueSimply,_c[SOURCE_FORMAT_ORIGINAL]=function(t,e,i){var n=getDataItemValue(t);return n instanceof Array?n[e]:n},_c[SOURCE_FORMAT_TYPED_ARRAY]=getRawValueSimply,_c);function getRawSourceValueGetter(t){return rawSourceValueGetterMap[t]}function getMethodMapKey(t,e){return t===SOURCE_FORMAT_ARRAY_ROWS?t+"_"+e:t}function retrieveRawValue(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var s=t.getStore(),a=s.getSource().sourceFormat;if(null!=i){var o=t.getDimensionIndex(i),r=s.getDimensionProperty(o);return getRawSourceValueGetter(a)(n,o,r)}var l=n;return a===SOURCE_FORMAT_ORIGINAL&&(l=getDataItemValue(n)),l}}}var DIMENSION_LABEL_REG=/\{@(.+?)\}/g,DataFormatMixin=function(){function t(){}return t.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),s=i.getRawIndex(t),a=i.getName(t),o=i.getRawDataItem(t),r=i.getItemVisual(t,"style"),l=r&&r[i.getItemVisual(t,"drawType")||"fill"],h=r&&r.stroke,c=this.mainType,u="series"===c,d=i.userOutput&&i.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:u?this.subType:null,seriesIndex:this.seriesIndex,seriesId:u?this.id:null,seriesName:u?this.name:null,name:a,dataIndex:s,data:o,dataType:e,value:n,color:l,borderColor:h,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,i,n,s,a){e=e||"normal";var o=this.getData(i),r=this.getDataParams(t,i);(a&&(r.value=a.interpolatedValue),null!=n&&isArray(r.value)&&(r.value=r.value[n]),s)||(s=o.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"]));return isFunction(s)?(r.status=e,r.dimensionIndex=n,s(r)):isString(s)?formatTpl(s,r).replace(DIMENSION_LABEL_REG,(function(e,i){var n=i.length,s=i;"["===s.charAt(0)&&"]"===s.charAt(n-1)&&(s=+s.slice(1,n-1));var r=retrieveRawValue(o,t,s);if(a&&isArray(a.interpolatedValue)){var l=o.getDimensionIndex(s);l>=0&&(r=a.interpolatedValue[l])}return null!=r?r+"":""})):void 0},t.prototype.getRawValue=function(t,e){return retrieveRawValue(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,i){},t}();function normalizeTooltipFormatResult(t){var e,i;return isObject$2(t)?t.type&&(i=t):e=t,{text:e,frag:i}}function createTask(t){return new Task(t)}var Task=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var s=this.context;s.data=s.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var a,o=c(this._modBy),r=this._modDataCount||0,l=c(t&&t.modBy),h=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}o===l&&r===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(n)),this._modBy=l,this._modDataCount=h;var u=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=u?this._dueIndex+u:1/0,this._dueEnd);if(!n&&(a||d<p)){var g=this._progress;if(isArray(g))for(var f=0;f<g.length;f++)this._doProgress(g[f],d,p,l,h);else this._doProgress(g,d,p,l,h)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,e,i,n,s){iterator.reset(e,i,n,s),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:iterator.next},this.context)},t.prototype._doReset=function(t){var e,i;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(i=e.forceFirstProgress,e=e.progress),isArray(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),iterator=function(){var t,e,i,n,s,a={reset:function(l,h,c,u){e=l,t=h,i=c,n=u,s=Math.ceil(n/i),a.next=i>1&&n>0?r:o}};return a;function o(){return e<t?e++:null}function r(){var a=e%s*i+Math.ceil(e/s),o=e>=t?null:a<n?a:e;return e++,o}}();function parseDataValue(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"!==i||isNumber$1(t)||null==t||"-"===t||(t=+parseDate(t)),null==t||""===t?NaN:Number(t))}var valueParserMap=createHashMap({number:function(t){return parseFloat(t)},time:function(t){return+parseDate(t)},trim:function(t){return isString(t)?trim(t):t}});function getRawValueParser(t){return valueParserMap.get(t)}var ORDER_COMPARISON_OP_MAP={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},FilterOrderComparator=function(){function t(t,e){if(!isNumber$1(e)){throwError("")}this._opFn=ORDER_COMPARISON_OP_MAP[t],this._rvalFloat=numericToNumber(e)}return t.prototype.evaluate=function(t){return isNumber$1(t)?this._opFn(t,this._rvalFloat):this._opFn(numericToNumber(t),this._rvalFloat)},t}(),SortOrderComparator=function(){function t(t,e){var i="desc"===t;this._resultLT=i?1:-1,null==e&&(e=i?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var i=isNumber$1(t)?t:numericToNumber(t),n=isNumber$1(e)?e:numericToNumber(e),s=isNaN(i),a=isNaN(n);if(s&&(i=this._incomparable),a&&(n=this._incomparable),s&&a){var o=isString(t),r=isString(e);o&&(i=r?t:0),r&&(n=o?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},t}(),FilterEqualityComparator=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=numericToNumber(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var i=typeof t;i===this._rvalTypeof||"number"!==i&&"number"!==this._rvalTypeof||(e=numericToNumber(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function createFilterComparator(t,e){return"eq"===t||"ne"===t?new FilterEqualityComparator("eq"===t,e):hasOwn(ORDER_COMPARISON_OP_MAP,t)?new FilterOrderComparator(t,e):null}var ExternalSource=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return parseDataValue(t,e)},t}();function createExternalSource(t,e){var i=new ExternalSource,n=t.data,s=i.sourceFormat=t.sourceFormat,a=t.startIndex;t.seriesLayoutBy!==SERIES_LAYOUT_BY_COLUMN&&throwError("");var o=[],r={},l=t.dimensionsDefine;if(l)each$4(l,(function(t,e){var i=t.name,n={index:e,name:i,displayName:t.displayName};if(o.push(n),null!=i){hasOwn(r,i)&&throwError(""),r[i]=n}}));else for(var h=0;h<t.dimensionsDetectedCount;h++)o.push({index:h});var c=getRawSourceItemGetter(s,SERIES_LAYOUT_BY_COLUMN);e.__isBuiltIn&&(i.getRawDataItem=function(t){return c(n,a,o,t)},i.getRawData=bind$1(getRawData,null,t)),i.cloneRawData=bind$1(cloneRawData,null,t);var u=getRawSourceDataCounter(s,SERIES_LAYOUT_BY_COLUMN);i.count=bind$1(u,null,n,a,o);var d=getRawSourceValueGetter(s);i.retrieveValue=function(t,e){var i=c(n,a,o,t);return p(i,e)};var p=i.retrieveValueFromItem=function(t,e){if(null!=t){var i=o[e];return i?d(t,e,i.name):void 0}};return i.getDimensionInfo=bind$1(getDimensionInfo,null,o,r),i.cloneAllDimensionInfo=bind$1(cloneAllDimensionInfo,null,o),i}function getRawData(t){if(!isSupportedSourceFormat(t.sourceFormat)){throwError("")}return t.data}function cloneRawData(t){var e=t.sourceFormat,i=t.data;if(!isSupportedSourceFormat(e)){throwError("")}if(e===SOURCE_FORMAT_ARRAY_ROWS){for(var n=[],s=0,a=i.length;s<a;s++)n.push(i[s].slice());return n}if(e===SOURCE_FORMAT_OBJECT_ROWS){for(n=[],s=0,a=i.length;s<a;s++)n.push(extend({},i[s]));return n}}function getDimensionInfo(t,e,i){if(null!=i)return isNumber$1(i)||!isNaN(i)&&!hasOwn(e,i)?t[i]:hasOwn(e,i)?e[i]:void 0}function cloneAllDimensionInfo(t){return clone$3(t)}var externalTransformMap=createHashMap();function registerExternalTransform(t){var e=(t=clone$3(t)).type;e||throwError("");var i=e.split(":");2!==i.length&&throwError("");var n=!1;"echarts"===i[0]&&(e=i[1],n=!0),t.__isBuiltIn=n,externalTransformMap.set(e,t)}function applyDataTransform(t,e,i){var n=normalizeToArray(t),s=n.length;s||throwError("");for(var a=0,o=s;a<o;a++){e=applySingleDataTransform(n[a],e),a!==o-1&&(e.length=Math.max(e.length,1))}return e}function applySingleDataTransform(t,e,i,n){e.length||throwError(""),isObject$2(t)||throwError("");var s=t.type,a=externalTransformMap.get(s);a||throwError("");var o=map$1(e,(function(t){return createExternalSource(t,a)}));return map$1(normalizeToArray(a.transform({upstream:o[0],upstreamList:o,config:clone$3(t.config)})),(function(t,i){var n;isObject$2(t)||throwError(""),t.data||throwError(""),isSupportedSourceFormat(detectSourceFormat(t.data))||throwError("");var s=e[0];if(s&&0===i&&!t.dimensions){var a=s.startIndex;a&&(t.data=s.data.slice(0,a).concat(t.data)),n={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:a,dimensions:s.metaRawOption.dimensions}}else n={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:0,dimensions:t.dimensions};return createSource(t.data,n,null)}))}function isSupportedSourceFormat(t){return t===SOURCE_FORMAT_ARRAY_ROWS||t===SOURCE_FORMAT_OBJECT_ROWS}var UNDEFINED="undefined",CtorUint32Array=typeof Uint32Array===UNDEFINED?Array:Uint32Array,CtorUint16Array=typeof Uint16Array===UNDEFINED?Array:Uint16Array,CtorInt32Array$1=typeof Int32Array===UNDEFINED?Array:Int32Array,CtorFloat64Array=typeof Float64Array===UNDEFINED?Array:Float64Array,dataCtors={float:CtorFloat64Array,int:CtorInt32Array$1,ordinal:Array,number:Array,time:CtorFloat64Array},defaultDimValueGetters;function getIndicesCtor(t){return t>65535?CtorUint32Array:CtorUint16Array}function getInitialExtent(){return[1/0,-1/0]}function cloneChunk(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function prepareStore(t,e,i,n,s){var a=dataCtors[i||"float"];if(s){var o=t[e],r=o&&o.length;if(r!==n){for(var l=new a(n),h=0;h<r;h++)l[h]=o[h];t[e]=l}}else t[e]=new a(n)}var DataStore$1=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=createHashMap()}return t.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),s=this.defaultDimValueGetter=defaultDimValueGetters[n.sourceFormat];this._dimValueGetter=i||s,this._rawExtent=[],shouldRetrieveDataByName(n),this._dimensions=map$1(e,(function(t){return{type:t.type,property:t.property}})),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,s=i.get(t);if(null!=s){if(n[s].type===e)return s}else s=n.length;return n[s]={type:e},i.set(t,s),this._chunks[s]=new dataCtors[e||"float"](this._rawCount),this._rawExtent[s]=getInitialExtent(),s},t.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],s=this._rawExtent,a=n.ordinalOffset||0,o=i.length;0===a&&(s[t]=getInitialExtent());for(var r=s[t],l=a;l<o;l++){var h=i[l]=e.parseAndCollect(i[l]);isNaN(h)||(r[0]=Math.min(h,r[0]),r[1]=Math.max(h,r[1]))}n.ordinalMeta=e,n.ordinalOffset=o,n.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},t.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},t.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,s=n.length,a=this._rawExtent,o=this.count(),r=o+Math.max(t.length,e||0),l=0;l<s;l++){prepareStore(i,l,(p=n[l]).type,r,!0)}for(var h=[],c=o;c<r;c++)for(var u=c-o,d=0;d<s;d++){var p=n[d],g=defaultDimValueGetters.arrayRows.call(this,t[u]||h,p.property,u,d);i[d][c]=g;var f=a[d];g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g)}return this._rawCount=this._count=r,{start:o,end:r}},t.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,s=this._chunks,a=this._dimensions,o=a.length,r=this._rawExtent,l=map$1(a,(function(t){return t.property})),h=0;h<o;h++){var c=a[h];r[h]||(r[h]=getInitialExtent()),prepareStore(s,h,c.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,s,r);else for(var u=[],d=t;d<e;d++){u=n.getItem(d,u);for(var p=0;p<o;p++){var g=s[p],f=this._dimValueGetter(u,l[p],d,p);g[d]=f;var m=r[p];f<m[0]&&(m[0]=f),f>m[1]&&(m[1]=f)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},t.prototype.getValues=function(t,e){var i=[],n=[];if(null==e){e=t,t=[];for(var s=0;s<this._dimensions.length;s++)n.push(s)}else n=t;s=0;for(var a=n.length;s<a;s++)i.push(this.get(n[s],e));return i},t.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},t.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var i=0,n=this.count();i<n;i++){var s=this.get(t,i);isNaN(s)||(e+=s)}return e},t.prototype.getMedian=function(t){var e=[];this.each([t],(function(t){isNaN(t)||e.push(t)}));var i=e.sort((function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,s=this._count-1;n<=s;){var a=(n+s)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;s=a-1}}return-1},t.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks[t],s=[];if(!n)return s;null==i&&(i=1/0);for(var a=1/0,o=-1,r=0,l=0,h=this.count();l<h;l++){var c=e-n[this.getRawIndex(l)],u=Math.abs(c);u<=i&&((u<a||u===a&&c>=0&&o<0)&&(a=u,o=c,r=0),c===o&&(s[r++]=l))}return s.length=r,s},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var s=0;s<n;s++)t[s]=e[s]}else t=new i(e.buffer,0,n)}else{t=new(i=getIndicesCtor(this._rawCount))(this.count());for(s=0;s<t.length;s++)t[s]=s}return t},t.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),s=new(getIndicesCtor(i._rawCount))(n),a=[],o=t.length,r=0,l=t[0],h=i._chunks,c=0;c<n;c++){var u=void 0,d=i.getRawIndex(c);if(0===o)u=e(c);else if(1===o){u=e(h[l][d],c)}else{for(var p=0;p<o;p++)a[p]=h[t[p]][d];a[p]=c,u=e.apply(null,a)}u&&(s[r++]=d)}return r<n&&(i._indices=s),i._count=r,i._extent=[],i._updateGetRawIdx(),i},t.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=keys(t),s=n.length;if(!s)return this;var a=e.count(),o=new(getIndicesCtor(e._rawCount))(a),r=0,l=n[0],h=t[l][0],c=t[l][1],u=e._chunks,d=!1;if(!e._indices){var p=0;if(1===s){for(var g=u[n[0]],f=0;f<i;f++){((y=g[f])>=h&&y<=c||isNaN(y))&&(o[r++]=p),p++}d=!0}else if(2===s){g=u[n[0]];var m=u[n[1]],v=t[n[1]][0],b=t[n[1]][1];for(f=0;f<i;f++){var y=g[f],S=m[f];(y>=h&&y<=c||isNaN(y))&&(S>=v&&S<=b||isNaN(S))&&(o[r++]=p),p++}d=!0}}if(!d)if(1===s)for(f=0;f<a;f++){var x=e.getRawIndex(f);((y=u[n[0]][x])>=h&&y<=c||isNaN(y))&&(o[r++]=x)}else for(f=0;f<a;f++){for(var w=!0,C=(x=e.getRawIndex(f),0);C<s;C++){var T=n[C];((y=u[T][x])<t[T][0]||y>t[T][1])&&(w=!1)}w&&(o[r++]=e.getRawIndex(f))}return r<a&&(e._indices=o),e._count=r,e._extent=[],e._updateGetRawIdx(),e},t.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},t.prototype.modify=function(t,e){this._updateDims(this,t,e)},t.prototype._updateDims=function(t,e,i){for(var n=t._chunks,s=[],a=e.length,o=t.count(),r=[],l=t._rawExtent,h=0;h<e.length;h++)l[e[h]]=getInitialExtent();for(var c=0;c<o;c++){for(var u=t.getRawIndex(c),d=0;d<a;d++)r[d]=n[e[d]][u];r[a]=c;var p=i&&i.apply(null,r);if(null!=p){"object"!=typeof p&&(s[0]=p,p=s);for(h=0;h<p.length;h++){var g=e[h],f=p[h],m=l[g],v=n[g];v&&(v[u]=f),f<m[0]&&(m[0]=f),f>m[1]&&(m[1]=f)}}}},t.prototype.lttbDownSample=function(t,e){var i,n,s,a=this.clone([t],!0),o=a._chunks[t],r=this.count(),l=0,h=Math.floor(1/e),c=this.getRawIndex(0),u=new(getIndicesCtor(this._rawCount))(Math.min(2*(Math.ceil(r/h)+2),r));u[l++]=c;for(var d=1;d<r-1;d+=h){for(var p=Math.min(d+h,r-1),g=Math.min(d+2*h,r),f=(g+p)/2,m=0,v=p;v<g;v++){var b=o[D=this.getRawIndex(v)];isNaN(b)||(m+=b)}m/=g-p;var y=d,S=Math.min(d+h,r),x=d-1,w=o[c];i=-1,s=y;var C=-1,T=0;for(v=y;v<S;v++){var D;b=o[D=this.getRawIndex(v)];isNaN(b)?(T++,C<0&&(C=D)):(n=Math.abs((x-f)*(b-w)-(x-v)*(m-w)))>i&&(i=n,s=D)}T>0&&T<S-y&&(u[l++]=Math.min(C,s),s=Math.max(C,s)),u[l++]=s,c=s}return u[l++]=this.getRawIndex(r-1),a._count=l,a._indices=u,a.getRawIndex=this._getRawIdx,a},t.prototype.minmaxDownSample=function(t,e){for(var i=this.clone([t],!0),n=i._chunks,s=Math.floor(1/e),a=n[t],o=this.count(),r=new(getIndicesCtor(this._rawCount))(2*Math.ceil(o/s)),l=0,h=0;h<o;h+=s){var c=h,u=a[this.getRawIndex(c)],d=h,p=a[this.getRawIndex(d)],g=s;h+s>o&&(g=o-h);for(var f=0;f<g;f++){var m=a[this.getRawIndex(h+f)];m<u&&(u=m,c=h+f),m>p&&(p=m,d=h+f)}var v=this.getRawIndex(c),b=this.getRawIndex(d);c<d?(r[l++]=v,r[l++]=b):(r[l++]=b,r[l++]=v)}return i._count=l,i._indices=r,i._updateGetRawIdx(),i},t.prototype.downSample=function(t,e,i,n){for(var s=this.clone([t],!0),a=s._chunks,o=[],r=Math.floor(1/e),l=a[t],h=this.count(),c=s._rawExtent[t]=getInitialExtent(),u=new(getIndicesCtor(this._rawCount))(Math.ceil(h/r)),d=0,p=0;p<h;p+=r){r>h-p&&(r=h-p,o.length=r);for(var g=0;g<r;g++){var f=this.getRawIndex(p+g);o[g]=l[f]}var m=i(o),v=this.getRawIndex(Math.min(p+n(o,m)||0,h-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),u[d++]=v}return s._count=d,s._indices=u,s._updateGetRawIdx(),s},t.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,s=0,a=this.count();s<a;s++){var o=this.getRawIndex(s);switch(i){case 0:e(s);break;case 1:e(n[t[0]][o],s);break;case 2:e(n[t[0]][o],n[t[1]][o],s);break;default:for(var r=0,l=[];r<i;r++)l[r]=n[t[r]][o];l[r]=s,e.apply(null,l)}}},t.prototype.getDataExtent=function(t){var e=this._chunks[t],i=getInitialExtent();if(!e)return i;var n,s=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],o=n[1],r=0;r<s;r++){var l=e[this.getRawIndex(r)];l<a&&(a=l),l>o&&(o=l)}return n=[a,o],this._extent[t]=n,n},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,s=0;s<n.length;s++)i.push(n[s][e]);return i},t.prototype.clone=function(e,i){var n=new t,s=this._chunks,a=e&&reduce(e,(function(t,e){return t[e]=!0,t}),{});if(a)for(var o=0;o<s.length;o++)n._chunks[o]=a[o]?cloneChunk(s[o]):s[o];else n._chunks=s;return this._copyCommonProps(n),i||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=clone$3(this._extent),t._rawExtent=clone$3(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,i,n){return parseDataValue(t[n],this._dimensions[n])}defaultDimValueGetters={arrayRows:t,objectRows:function(t,e,i,n){return parseDataValue(t[e],this._dimensions[n])},keyedColumns:t,original:function(t,e,i,n){var s=t&&(null==t.value?t:t.value);return parseDataValue(s instanceof Array?s[n]:s,this._dimensions[n])},typedArray:function(t,e,i,n){return t[n]}}}(),t}(),SourceManager=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,i=this._sourceHost,n=this._getUpstreamSourceManagers(),s=!!n.length;if(isSeries(i)){var a=i,o=void 0,r=void 0,l=void 0;if(s){var h=n[0];h.prepareSource(),o=(l=h.getSource()).data,r=l.sourceFormat,e=[h._getVersionSign()]}else r=isTypedArray(o=a.get("data",!0))?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL,e=[];var c=this._getSourceMetaRawOption()||{},u=l&&l.metaRawOption||{},d=retrieve2(c.seriesLayoutBy,u.seriesLayoutBy)||null,p=retrieve2(c.sourceHeader,u.sourceHeader),g=retrieve2(c.dimensions,u.dimensions);t=d!==u.seriesLayoutBy||!!p!=!!u.sourceHeader||g?[createSource(o,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},r)]:[]}else{var f=i;if(s){var m=this._applyTransform(n);t=m.sourceList,e=m.upstreamSignList}else{t=[createSource(f.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,i=this._sourceHost,n=i.get("transform",!0),s=i.get("fromTransformResult",!0);if(null!=s){1!==t.length&&doThrow("")}var a=[],o=[];return each$4(t,(function(t){t.prepareSource();var e=t.getSource(s||0);null==s||e||doThrow(""),a.push(e),o.push(t._getVersionSign())})),n?e=applyDataTransform(n,a,{datasetIndex:i.componentIndex}):null!=s&&(e=[cloneSourceShallow(a[0])]),{sourceList:e,upstreamSignList:o}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},t.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},t.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},t.prototype._innerGetDataStore=function(t,e,i){var n=this._storeList,s=n[0];s||(s=n[0]={});var a=s[i];if(!a){var o=this._getUpstreamSourceManagers()[0];isSeries(this._sourceHost)&&o?a=o._innerGetDataStore(t,e,i):(a=new DataStore$1).initData(new DefaultDataProvider(e,t.length),t),s[i]=a}return a},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(isSeries(t)){var e=querySeriesUpstreamDatasetModel(t);return e?[e.getSourceManager()]:[]}return map$1(queryDatasetUpstreamDatasetModels(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,e,i,n=this._sourceHost;if(isSeries(n))t=n.get("seriesLayoutBy",!0),e=n.get("sourceHeader",!0),i=n.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var s=n;t=s.get("seriesLayoutBy",!0),e=s.get("sourceHeader",!0),i=s.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:i}},t}();function disableTransformOptionMerge(t){t.option.transform&&setAsPrimitive(t.option.transform)}function isSeries(t){return"series"===t.mainType}function doThrow(t){throw new Error(t)}var TOOLTIP_LINE_HEIGHT_CSS="line-height:1";function getTooltipLineHeight(t){var e=t.lineHeight;return null==e?TOOLTIP_LINE_HEIGHT_CSS:"line-height:"+encodeHTML(e+"")+"px"}function getTooltipTextStyle(t,e){var i=t.color||"#6e7079",n=t.fontSize||12,s=t.fontWeight||"400",a=t.color||"#464646",o=t.fontSize||14,r=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+encodeHTML(n+"")+"px;color:"+encodeHTML(i)+";font-weight:"+encodeHTML(s+""),valueStyle:"font-size:"+encodeHTML(o+"")+"px;color:"+encodeHTML(a)+";font-weight:"+encodeHTML(r+"")}:{nameStyle:{fontSize:n,fill:i,fontWeight:s},valueStyle:{fontSize:o,fill:a,fontWeight:r}}}var HTML_GAPS=[0,10,20,30],RICH_TEXT_GAPS=["","\n","\n\n","\n\n\n"];function createTooltipMarkup(t,e){return e.type=t,e}function isSectionFragment(t){return"section"===t.type}function getBuilder(t){return isSectionFragment(t)?buildSection:buildNameValue}function getBlockGapLevel(t){if(isSectionFragment(t)){var e=0,i=t.blocks.length,n=i>1||i>0&&!t.noHeader;return each$4(t.blocks,(function(t){var i=getBlockGapLevel(t);i>=e&&(e=i+ +(n&&(!i||isSectionFragment(t)&&!t.noHeader)))})),e}return 0}function buildSection(t,e,i,n){var s=e.noHeader,a=getGap(getBlockGapLevel(e)),o=[],r=e.blocks||[];assert(!r||isArray(r)),r=r||[];var l=t.orderMode;if(e.sortBlocks&&l){r=r.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(hasOwn(h,l)){var c=new SortOrderComparator(h[l],null);r.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===l&&r.reverse()}each$4(r,(function(i,s){var r=e.valueFormatter,l=getBuilder(i)(r?extend(extend({},t),{valueFormatter:r}):t,i,s>0?a.html:0,n);null!=l&&o.push(l)}));var u="richText"===t.renderMode?o.join(a.richText):wrapBlockHTML(n,o.join(""),s?i:a.html);if(s)return u;var d=makeValueReadable(e.header,"ordinal",t.useUTC),p=getTooltipTextStyle(n,t.renderMode).nameStyle,g=getTooltipLineHeight(n);return"richText"===t.renderMode?wrapInlineNameRichText(t,d,p)+a.richText+u:wrapBlockHTML(n,'<div style="'+p+";"+g+';">'+encodeHTML(d)+"</div>"+u,i)}function buildNameValue(t,e,i,n){var s=t.renderMode,a=e.noName,o=e.noValue,r=!e.markerType,l=e.name,h=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(t){return map$1(t=isArray(t)?t:[t],(function(t,e){return makeValueReadable(t,isArray(p)?p[e]:p,h)}))};if(!a||!o){var u=r?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",s),d=a?"":makeValueReadable(l,"ordinal",h),p=e.valueType,g=o?[]:c(e.value,e.dataIndex),f=!r||!a,m=!r&&a,v=getTooltipTextStyle(n,s),b=v.nameStyle,y=v.valueStyle;return"richText"===s?(r?"":u)+(a?"":wrapInlineNameRichText(t,d,b))+(o?"":wrapInlineValueRichText(t,g,f,m,y)):wrapBlockHTML(n,(r?"":u)+(a?"":wrapInlineNameHTML(d,!r,b))+(o?"":wrapInlineValueHTML(g,f,m,y)),i)}}function buildTooltipMarkup(t,e,i,n,s,a){if(t)return getBuilder(t)({useUTC:s,renderMode:i,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,a)}function getGap(t){return{html:HTML_GAPS[t],richText:RICH_TEXT_GAPS[t]}}function wrapBlockHTML(t,e,i){return'<div style="'+("margin: "+i+"px 0 0")+";"+getTooltipLineHeight(t)+';">'+e+'<div style="clear:both"></div></div>'}function wrapInlineNameHTML(t,e,i){return'<span style="'+i+";"+(e?"margin-left:2px":"")+'">'+encodeHTML(t)+"</span>"}function wrapInlineValueHTML(t,e,i,n){return'<span style="'+(e?"float:right;margin-left:"+(i?"10px":"20px"):"")+";"+n+'">'+map$1(t=isArray(t)?t:[t],(function(t){return encodeHTML(t)})).join("&nbsp;&nbsp;")+"</span>"}function wrapInlineNameRichText(t,e,i){return t.markupStyleCreator.wrapRichTextStyle(e,i)}function wrapInlineValueRichText(t,e,i,n,s){var a=[s],o=n?10:20;return i&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(isArray(e)?e.join("  "):e,a)}function retrieveVisualColorForTooltipMarker(t,e){return convertToColorString(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function getPaddingFromTooltipModel(t,e){var i=t.get("padding");return null!=i?i:"richText"===e?[8,10]:10}var TooltipMarkupStyleCreator=function(){function t(){this.richTextStyles={},this._nextStyleNameId=getRandomIdBase()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,i){var n="richText"===i?this._generateStyleName():null,s=getTooltipMarker({color:e,type:t,renderMode:i,markerId:n});return isString(s)?s:(this.richTextStyles[n]=s.style,s.content)},t.prototype.wrapRichTextStyle=function(t,e){var i={};isArray(e)?each$4(e,(function(t){return extend(i,t)})):extend(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},t}();function defaultSeriesFormatTooltip(t){var e,i,n,s,a=t.series,o=t.dataIndex,r=t.multipleSeries,l=a.getData(),h=l.mapDimensionsAll("defaultedTooltip"),c=h.length,u=a.getRawValue(o),d=isArray(u),p=retrieveVisualColorForTooltipMarker(a,o);if(c>1||d&&!c){var g=formatTooltipArrayValue(u,a,o,h,p);e=g.inlineValues,i=g.inlineValueTypes,n=g.blocks,s=g.inlineValues[0]}else if(c){var f=l.getDimensionInfo(h[0]);s=e=retrieveRawValue(l,o,h[0]),i=f.type}else s=e=d?u[0]:u;var m=isNameSpecified(a),v=m&&a.name||"",b=l.getName(o),y=r?v:b;return createTooltipMarkup("section",{header:v,noHeader:r||!m,sortParam:s,blocks:[createTooltipMarkup("nameValue",{markerType:"item",markerColor:p,name:y,noName:!trim(y),value:e,valueType:i,dataIndex:o})].concat(n||[])})}function formatTooltipArrayValue(t,e,i,n,s){var a=e.getData(),o=reduce(t,(function(t,e,i){var n=a.getDimensionInfo(i);return t||n&&!1!==n.tooltip&&null!=n.displayName}),!1),r=[],l=[],h=[];function c(t,e){var i=a.getDimensionInfo(e);i&&!1!==i.otherDims.tooltip&&(o?h.push(createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:s,name:i.displayName,value:t,valueType:i.type})):(r.push(t),l.push(i.type)))}return n.length?each$4(n,(function(t){c(retrieveRawValue(a,i,t),t)})):each$4(t,c),{inlineValues:r,inlineValueTypes:l,blocks:h}}var inner$6=makeInner();function getSelectionKey(t,e){return t.getName(e)||t.getId(e)}var SERIES_UNIVERSAL_TRANSITION_PROP="__universalTransitionEnabled",SeriesModel=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var i;return __extends(e,t),e.prototype.init=function(t,e,i){this.seriesIndex=this.componentIndex,this.dataTask=createTask({count:dataTaskCount,reset:dataTaskReset}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),(inner$6(this).sourceManager=new SourceManager(this)).prepareSource();var n=this.getInitialData(t,i);wrapData(n,this),this.dataTask.context.data=n,inner$6(this).dataBeforeProcessed=n,autoSeriesName(this),this._initSelectedMapFromData(n)},e.prototype.mergeDefaultAndTheme=function(t,e){var i=fetchLayoutMode(this),n=i?getLayoutParams(t):{},s=this.subType;ComponentModel$1.hasClass(s)&&(s+="Series"),merge(t,e.getTheme().get(this.subType)),merge(t,this.getDefaultOption()),defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&mergeLayoutParam(t,n,i)},e.prototype.mergeOption=function(t,e){t=merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=fetchLayoutMode(this);i&&mergeLayoutParam(this.option,t,i);var n=inner$6(this).sourceManager;n.dirty(),n.prepareSource();var s=this.getInitialData(t,e);wrapData(s,this),this.dataTask.dirty(),this.dataTask.context.data=s,inner$6(this).dataBeforeProcessed=s,autoSeriesName(this),this._initSelectedMapFromData(s)},e.prototype.fillDataTextStyle=function(t){if(t&&!isTypedArray(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&defaultEmphasis(t[i],"label",e)},e.prototype.getInitialData=function(t,e){},e.prototype.appendData=function(t){this.getRawData().appendData(t.data)},e.prototype.getData=function(t){var e=getCurrentTask(this);if(e){var i=e.context.data;return null!=t&&i.getLinkedData?i.getLinkedData(t):i}return inner$6(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var e=getCurrentTask(this);if(e){var i=e.context;i.outputData=t,e!==this.dataTask&&(i.data=t)}inner$6(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return createHashMap(t)},e.prototype.getSourceManager=function(){return inner$6(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return inner$6(this).dataBeforeProcessed},e.prototype.getColorBy=function(){return this.get("colorBy")||"series"},e.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,e,i){return defaultSeriesFormatTooltip({series:this,dataIndex:t,multipleSeries:e})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(env$1.node&&(!t||!t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,i){var n=this.ecModel,s=PaletteMixin.prototype.getColorFromPalette.call(this,t,e,i);return s||(s=n.getColorFromPalette(t,e,i)),s},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var i=this.option.selectedMap;if(i){var n=this.option.selectedMode,s=this.getData(e);if("series"===n||"all"===i)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var a=0;a<t.length;a++){var o=getSelectionKey(s,t[a]);i[o]=!1,this._selectedDataIndicesMap[o]=-1}}},e.prototype.toggleSelect=function(t,e){for(var i=[],n=0;n<t.length;n++)i[0]=t[n],this.isSelected(t[n],e)?this.unselect(i,e):this.select(i,e)},e.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,e=keys(t),i=[],n=0;n<e.length;n++){var s=t[e[n]];s>=0&&i.push(s)}return i},e.prototype.isSelected=function(t,e){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(e);return("all"===i||i[getSelectionKey(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[SERIES_UNIVERSAL_TRANSITION_PROP])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var i,n,s=this.option,a=s.selectedMode,o=e.length;if(a&&o)if("series"===a)s.selectedMap="all";else if("multiple"===a){isObject$2(s.selectedMap)||(s.selectedMap={});for(var r=s.selectedMap,l=0;l<o;l++){var h=e[l];r[u=getSelectionKey(t,h)]=!0,this._selectedDataIndicesMap[u]=t.getRawIndex(h)}}else if("single"===a||!0===a){var c=e[o-1],u=getSelectionKey(t,c);s.selectedMap=((i={})[u]=!0,i),this._selectedDataIndicesMap=((n={})[u]=t.getRawIndex(c),n)}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var e=[];t.hasItemOption&&t.each((function(i){var n=t.getRawDataItem(i);n&&n.selected&&e.push(i)})),e.length>0&&this._innerSelect(t,e)}},e.registerClass=function(t){return ComponentModel$1.registerClass(t)},e.protoInitialize=((i=e.prototype).type="series.__base__",i.seriesIndex=0,i.ignoreStyleOnData=!1,i.hasSymbolVisual=!1,i.defaultSymbol="circle",i.visualStyleAccessPath="itemStyle",void(i.visualDrawType="fill")),e}(ComponentModel$1);function autoSeriesName(t){var e=t.name;isNameSpecified(t)||(t.name=getSeriesAutoName(t)||e)}function getSeriesAutoName(t){var e=t.getRawData(),i=e.mapDimensionsAll("seriesName"),n=[];return each$4(i,(function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)})),n.join(" ")}function dataTaskCount(t){return t.model.getRawData().count()}function dataTaskReset(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),dataTaskProgress}function dataTaskProgress(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function wrapData(t,e){each$4(concatArray(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(i){t.wrapMethod(i,curry$1(onDataChange,e))}))}function onDataChange(t,e){var i=getCurrentTask(t);return i&&i.setOutputEnd((e||this).count()),e}function getCurrentTask(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var s=n.agentStubMap;s&&(n=s.get(t.uid))}return n}}mixin(SeriesModel,DataFormatMixin),mixin(SeriesModel,PaletteMixin),mountExtend(SeriesModel,ComponentModel$1);var SeriesModel$1=SeriesModel,ComponentView=function(){function t(){this.group=new Group$4,this.uid=getUID("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,i,n){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,i,n){},t.prototype.updateLayout=function(t,e,i,n){},t.prototype.updateVisual=function(t,e,i,n){},t.prototype.toggleBlurSeries=function(t,e,i){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();enableClassExtend(ComponentView),enableClassManagement(ComponentView);var ComponentView$1=ComponentView;function createRenderPlanner(){var t=makeInner();return function(e){var i=t(e),n=e.pipelineContext,s=!!i.large,a=!!i.progressiveRender,o=i.large=!(!n||!n.large),r=i.progressiveRender=!(!n||!n.progressiveRender);return!(s===o&&a===r)&&"reset"}}var inner$5=makeInner(),renderPlanner=createRenderPlanner(),ChartView=function(){function t(){this.group=new Group$4,this.uid=getUID("viewChart"),this.renderTask=createTask({plan:renderTaskPlan,reset:renderTaskReset}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,i,n){},t.prototype.highlight=function(t,e,i,n){var s=t.getData(n&&n.dataType);s&&toggleHighlight(s,n,"emphasis")},t.prototype.downplay=function(t,e,i,n){var s=t.getData(n&&n.dataType);s&&toggleHighlight(s,n,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},t.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},t.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},t.prototype.eachRendered=function(t){traverseElements(this.group,t)},t.markUpdateMethod=function(t,e){inner$5(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function elSetState(t,e,i){t&&isHighDownDispatcher(t)&&("emphasis"===e?enterEmphasis:leaveEmphasis)(t,i)}function toggleHighlight(t,e,i){var n=queryDataIndex(t,e),s=e&&null!=e.highlightKey?getHighlightDigit(e.highlightKey):null;null!=n?each$4(normalizeToArray(n),(function(e){elSetState(t.getItemGraphicEl(e),i,s)})):t.eachItemGraphicEl((function(t){elSetState(t,i,s)}))}function renderTaskPlan(t){return renderPlanner(t.model)}function renderTaskReset(t){var e=t.model,i=t.ecModel,n=t.api,s=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,r=s&&inner$5(s).updateMethod,l=a?"incrementalPrepareRender":r&&o[r]?r:"render";return"render"!==l&&o[l](e,i,n,s),progressMethodMap[l]}enableClassExtend(ChartView),enableClassManagement(ChartView);var progressMethodMap={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},ChartView$1=ChartView,ORIGIN_METHOD="\0__throttleOriginMethod",RATE="\0__throttleRate",THROTTLE_TYPE="\0__throttleType";function throttle(t,e,i){var n,s,a,o,r,l=0,h=0,c=null;function u(){h=(new Date).getTime(),c=null,t.apply(a,o||[])}e=e||0;var d=function(){for(var t=[],d=0;d<arguments.length;d++)t[d]=arguments[d];n=(new Date).getTime(),a=this,o=t;var p=r||e,g=r||i;r=null,s=n-(g?l:h)-p,clearTimeout(c),g?c=setTimeout(u,p):s>=0?u():c=setTimeout(u,-s),l=n};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){r=t},d}function createOrUpdate(t,e,i,n){var s=t[e];if(s){var a=s[ORIGIN_METHOD]||s,o=s[THROTTLE_TYPE];if(s[RATE]!==i||o!==n){if(null==i||!n)return t[e]=a;(s=t[e]=throttle(a,i,"debounce"===n))[ORIGIN_METHOD]=a,s[THROTTLE_TYPE]=n,s[RATE]=i}return s}}function clear(t,e){var i=t[e];i&&i[ORIGIN_METHOD]&&(i.clear&&i.clear(),t[e]=i[ORIGIN_METHOD])}var inner$4=makeInner(),defaultStyleMappers={itemStyle:makeStyleMapper(ITEM_STYLE_KEY_MAP,!0),lineStyle:makeStyleMapper(LINE_STYLE_KEY_MAP,!0)},defaultColorKey={lineStyle:"stroke",itemStyle:"fill"};function getStyleMapper(t,e){var i=t.visualStyleMapper||defaultStyleMappers[e];return i||defaultStyleMappers.itemStyle}function getDefaultColorKey(t,e){var i=t.visualDrawType||defaultColorKey[e];return i||"fill"}var seriesStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=t.visualStyleAccessPath||"itemStyle",s=t.getModel(n),a=getStyleMapper(t,n)(s),o=s.getShallow("decal");o&&(i.setVisual("decal",o),o.dirty=!0);var r=getDefaultColorKey(t,n),l=a[r],h=isFunction(l)?l:null,c="auto"===a.fill||"auto"===a.stroke;if(!a[r]||h||c){var u=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[r]||(a[r]=u,i.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||isFunction(a.fill)?u:a.fill,a.stroke="auto"===a.stroke||isFunction(a.stroke)?u:a.stroke}if(i.setVisual("style",a),i.setVisual("drawType",r),!e.isSeriesFiltered(t)&&h)return i.setVisual("colorFromPalette",!1),{dataEach:function(e,i){var n=t.getDataParams(i),s=extend({},a);s[r]=h(n),e.setItemVisual(i,"style",s)}}}},sharedModel=new Model$1,dataStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var i=t.getData(),n=t.visualStyleAccessPath||"itemStyle",s=getStyleMapper(t,n),a=i.getVisual("drawType");return{dataEach:i.hasItemOption?function(t,e){var i=t.getRawDataItem(e);if(i&&i[n]){sharedModel.option=i[n];var o=s(sharedModel);extend(t.ensureUniqueItemVisual(e,"style"),o),sharedModel.option.decal&&(t.setItemVisual(e,"decal",sharedModel.option.decal),sharedModel.option.decal.dirty=!0),a in o&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},dataColorPaletteTask={performRawSeries:!0,overallReset:function(t){var e=createHashMap();t.eachSeries((function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,s=e.get(n);s||(s={},e.set(n,s)),inner$4(t).scope=s}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var i=e.getRawData(),n={},s=e.getData(),a=inner$4(e).scope,o=e.visualStyleAccessPath||"itemStyle",r=getDefaultColorKey(e,o);s.each((function(t){var e=s.getRawIndex(t);n[e]=t})),i.each((function(t){var o=n[t];if(s.getItemVisual(o,"colorFromPalette")){var l=s.ensureUniqueItemVisual(o,"style"),h=i.getName(t)||t+"",c=i.count();l[r]=e.getColorFromPalette(h,a,c)}}))}}))}},PI$1=Math.PI;function defaultLoading(t,e){defaults(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new Group$4,n=new Rect$3({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var s,a=new ZRText$1({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),o=new Rect$3({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return i.add(o),e.showSpinner&&((s=new Arc$1({shape:{startAngle:-PI$1/2,endAngle:-PI$1/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*PI$1/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:3*PI$1/2}).delay(300).start("circularInOut"),i.add(s)),i.resize=function(){var i=a.getBoundingRect().width,r=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*r-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner&&i?0:5+i/2)+(e.showSpinner?0:i/2)+(i?0:r),h=t.getHeight()/2;e.showSpinner&&s.setShape({cx:l,cy:h}),o.setShape({x:l-r,y:h-r,width:2*r,height:2*r}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i}var Scheduler=function(){function t(t,e,i,n){this._stageTaskMap=createHashMap(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,s=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:s,modBy:null!=a?Math.ceil(a/s):null,modDataCount:a}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),s=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:s,modDataCount:o,large:a}},t.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=createHashMap();t.eachSeries((function(t){var n=t.getProgressive(),s=t.uid;i.set(s,{id:s,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;each$4(this._allHandlers,(function(n){var s=t.get(n.uid)||t.set(n.uid,{});assert(!(n.reset&&n.overallReset),""),n.reset&&this._createSeriesStageTask(n,s,e,i),n.overallReset&&this._createOverallStageTask(n,s,e,i)}),this)},t.prototype.prepareView=function(t,e,i,n){var s=t.renderTask,a=s.context;a.model=e,a.ecModel=i,a.api=n,s.__block=!t.incrementalPrepareRender,this._pipe(e,s)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},t.prototype._performStageTasks=function(t,e,i,n){n=n||{};var s=!1,a=this;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}each$4(t,(function(t,r){if(!n.visualType||n.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),h=l.seriesTaskMap,c=l.overallTask;if(c){var u,d=c.agentStubMap;d.each((function(t){o(n,t)&&(t.dirty(),u=!0)})),u&&c.dirty(),a.updatePayload(c,i);var p=a.getPerformArgs(c,n.block);d.each((function(t){t.perform(p)})),c.perform(p)&&(s=!0)}else h&&h.each((function(r,l){o(n,r)&&r.dirty();var h=a.getPerformArgs(r,n.block);h.skip=!t.performRawSeries&&e.isSeriesFiltered(r.context.model),a.updatePayload(r,i),r.perform(h)&&(s=!0)}))}})),this.unfinished=s||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,i,n){var s=this,a=e.seriesTaskMap,o=e.seriesTaskMap=createHashMap(),r=t.seriesType,l=t.getTargetSeries;function h(e){var r=e.uid,l=o.set(r,a&&a.get(r)||createTask({plan:seriesTaskPlan,reset:seriesTaskReset,count:seriesTaskCount}));l.context={model:e,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:s},s._pipe(e,l)}t.createOnAllSeries?i.eachRawSeries(h):r?i.eachRawSeriesByType(r,h):l&&l(i,n).each(h)},t.prototype._createOverallStageTask=function(t,e,i,n){var s=this,a=e.overallTask=e.overallTask||createTask({reset:overallTaskReset});a.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:s};var o=a.agentStubMap,r=a.agentStubMap=createHashMap(),l=t.seriesType,h=t.getTargetSeries,c=!0,u=!1;function d(t){var e=t.uid,i=r.set(e,o&&o.get(e)||(u=!0,createTask({reset:stubReset,onDirty:stubOnDirty})));i.context={model:t,overallProgress:c},i.agent=a,i.__block=c,s._pipe(t,i)}assert(!t.createOnAllSeries,""),l?i.eachRawSeriesByType(l,d):h?h(i,n).each(d):(c=!1,each$4(i.getSeries(),d)),u&&a.dirty()},t.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},t.wrapStageHandler=function(t,e){return isFunction(t)&&(t={overallReset:t,seriesType:detectSeriseType(t)}),t.uid=getUID("stageHandler"),e&&(t.visualType=e),t},t}();function overallTaskReset(t){t.overallReset(t.ecModel,t.api,t.payload)}function stubReset(t){return t.overallProgress&&stubProgress}function stubProgress(){this.agent.dirty(),this.getDownstream().dirty()}function stubOnDirty(){this.agent&&this.agent.dirty()}function seriesTaskPlan(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function seriesTaskReset(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=normalizeToArray(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?map$1(e,(function(t,e){return makeSeriesTaskProgress(e)})):singleSeriesTaskProgress}var singleSeriesTaskProgress=makeSeriesTaskProgress(0);function makeSeriesTaskProgress(t){return function(e,i){var n=i.data,s=i.resetDefines[t];if(s&&s.dataEach)for(var a=e.start;a<e.end;a++)s.dataEach(n,a);else s&&s.progress&&s.progress(e,n)}}function seriesTaskCount(t){return t.data.count()}function detectSeriseType(t){seriesType=null;try{t(ecModelMock,apiMock)}catch(e){}return seriesType}var ecModelMock={},apiMock={},seriesType;function mockMethods(t,e){for(var i in e.prototype)t[i]=noop$3}mockMethods(ecModelMock,GlobalModel$1),mockMethods(apiMock,ExtensionAPI$1),ecModelMock.eachSeriesByType=ecModelMock.eachRawSeriesByType=function(t){seriesType=t},ecModelMock.eachComponent=function(t){"series"===t.mainType&&t.subType&&(seriesType=t.subType)};var Scheduler$1=Scheduler,colorAll=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],lightTheme={color:colorAll,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],colorAll]},contrastColor="#B9B8CE",backgroundColor="#100C2A",axisCommon=function(){return{axisLine:{lineStyle:{color:contrastColor}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},colorPalette=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],theme={darkMode:!0,color:colorPalette,backgroundColor:backgroundColor,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:contrastColor},pageTextStyle:{color:contrastColor}},textStyle:{color:contrastColor},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:contrastColor}},dataZoom:{borderColor:"#71708A",textStyle:{color:contrastColor},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:contrastColor}},timeline:{lineStyle:{color:contrastColor},label:{color:contrastColor},controlStyle:{color:contrastColor,borderColor:contrastColor}},calendar:{itemStyle:{color:backgroundColor},dayLabel:{color:contrastColor},monthLabel:{color:contrastColor},yearLabel:{color:contrastColor}},timeAxis:axisCommon(),logAxis:axisCommon(),valueAxis:axisCommon(),categoryAxis:axisCommon(),line:{symbol:"circle"},graph:{color:colorPalette},gauge:{title:{color:contrastColor},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:contrastColor},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};theme.categoryAxis.splitLine.show=!1;var darkTheme=theme,ECEventProcessor=function(){function t(){}return t.prototype.normalizeQuery=function(t){var e={},i={},n={};if(isString(t)){var s=parseClassType(t);e.mainType=s.main||null,e.subType=s.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};each$4(t,(function(t,s){for(var r=!1,l=0;l<a.length;l++){var h=a[l],c=s.lastIndexOf(h);if(c>0&&c===s.length-h.length){var u=s.slice(0,c);"data"!==u&&(e.mainType=u,e[h.toLowerCase()]=t,r=!0)}}o.hasOwnProperty(s)&&(i[s]=t,r=!0),r||(n[s]=t)}))}return{cptQuery:e,dataQuery:i,otherQuery:n}},t.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,s=i.packedEvent,a=i.model,o=i.view;if(!a||!o)return!0;var r=e.cptQuery,l=e.dataQuery;return h(r,a,"mainType")&&h(r,a,"subType")&&h(r,a,"index","componentIndex")&&h(r,a,"name")&&h(r,a,"id")&&h(l,s,"name")&&h(l,s,"dataIndex")&&h(l,s,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(t,e.otherQuery,n,s));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),SYMBOL_PROPS_WITH_CB=["symbol","symbolSize","symbolRotate","symbolOffset"],SYMBOL_PROPS=SYMBOL_PROPS_WITH_CB.concat(["symbolKeepAspect"]),seriesSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData();if(t.legendIcon&&i.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var n={},s={},a=!1,o=0;o<SYMBOL_PROPS_WITH_CB.length;o++){var r=SYMBOL_PROPS_WITH_CB[o],l=t.get(r);isFunction(l)?(a=!0,s[r]=l):n[r]=l}if(n.symbol=n.symbol||t.defaultSymbol,i.setVisual(extend({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),!e.isSeriesFiltered(t)){var h=keys(s);return{dataEach:a?function(e,i){for(var n=t.getRawValue(i),a=t.getDataParams(i),o=0;o<h.length;o++){var r=h[o];e.setItemVisual(i,r,s[r](n,a))}}:null}}}}},dataSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){for(var i=t.getItemModel(e),n=0;n<SYMBOL_PROPS.length;n++){var s=SYMBOL_PROPS[n],a=i.getShallow(s,!0);null!=a&&t.setItemVisual(e,s,a)}}:null}}};function getItemVisualFromData(t,e,i){switch(i){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,i)}}function getVisualFromData(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function setItemVisualFromData(t,e,i,n){switch(i){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=n,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,i,n)}}function createLegacyDataSelectAction(t,e){function i(e,i){var n=[];return e.eachComponent({mainType:"series",subType:t,query:i},(function(t){n.push(t.seriesIndex)})),n}each$4([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,n,s){e=extend({},e),s.dispatchAction(extend(e,{type:t[1],seriesIndex:i(n,e)}))}))}))}function handleSeriesLegacySelectEvents(t,e,i,n,s){var a=t+e;i.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,n=t.option.selectedMap,o=s.selected,r=0;r<o.length;r++)if(o[r].seriesIndex===e){var l=t.getData(),h=queryDataIndex(l,s.fromActionPayload);i.trigger(a,{type:a,seriesId:t.id,name:isArray(h)?l.getName(h[0]):l.getName(h),selected:isString(n)?n:extend({},n)})}}))}function handleLegacySelectEvents(t,e,i){t.on("selectchanged",(function(t){var n=i.getModel();t.isFromClick?(handleSeriesLegacySelectEvents("map","selectchanged",e,n,t),handleSeriesLegacySelectEvents("pie","selectchanged",e,n,t)):"select"===t.fromAction?(handleSeriesLegacySelectEvents("map","selected",e,n,t),handleSeriesLegacySelectEvents("pie","selected",e,n,t)):"unselect"===t.fromAction&&(handleSeriesLegacySelectEvents("map","unselected",e,n,t),handleSeriesLegacySelectEvents("pie","unselected",e,n,t))}))}function findEventDispatcher(t,e,i){for(var n;t&&(!e(t)||(n=t,!i));)t=t.__hostTarget||t.parent;return n}var wmUniqueIndex=Math.round(9*Math.random()),supportDefineProperty="function"==typeof Object.defineProperty,WeakMap$1=function(){function t(){this._id="__ec_inner_"+wmUniqueIndex++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var i=this._guard(t);return supportDefineProperty?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}(),WeakMap$2=WeakMap$1,Triangle=Path$2.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,s=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+s,n+a),t.lineTo(i-s,n+a),t.closePath()}}),Diamond=Path$2.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,s=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+s,n),t.lineTo(i,n+a),t.lineTo(i-s,n),t.closePath()}}),Pin=Path$2.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,s=e.width/5*3,a=Math.max(s,e.height),o=s/2,r=o*o/(a-o),l=n-a+o+r,h=Math.asin(r/o),c=Math.cos(h)*o,u=Math.sin(h),d=Math.cos(h),p=.6*o,g=.7*o;t.moveTo(i-c,l+r),t.arc(i,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+c-u*p,l+r+d*p,i,n-g,i,n),t.bezierCurveTo(i,n-g,i-c+u*p,l+r+d*p,i-c,l+r),t.closePath()}}),Arrow=Path$2.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,s=e.x,a=e.y,o=n/3*2;t.moveTo(s,a),t.lineTo(s+o,a+i),t.lineTo(s,a+i/4*3),t.lineTo(s-o,a+i),t.lineTo(s,a),t.closePath()}}),symbolCtors={line:Line$3,rect:Rect$3,roundRect:Rect$3,square:Rect$3,circle:Circle$1,diamond:Diamond,pin:Pin,arrow:Arrow,triangle:Triangle},symbolShapeMakers={line:function(t,e,i,n,s){s.x1=t,s.y1=e+n/2,s.x2=t+i,s.y2=e+n/2},rect:function(t,e,i,n,s){s.x=t,s.y=e,s.width=i,s.height=n},roundRect:function(t,e,i,n,s){s.x=t,s.y=e,s.width=i,s.height=n,s.r=Math.min(i,n)/4},square:function(t,e,i,n,s){var a=Math.min(i,n);s.x=t,s.y=e,s.width=a,s.height=a},circle:function(t,e,i,n,s){s.cx=t+i/2,s.cy=e+n/2,s.r=Math.min(i,n)/2},diamond:function(t,e,i,n,s){s.cx=t+i/2,s.cy=e+n/2,s.width=i,s.height=n},pin:function(t,e,i,n,s){s.x=t+i/2,s.y=e+n/2,s.width=i,s.height=n},arrow:function(t,e,i,n,s){s.x=t+i/2,s.y=e+n/2,s.width=i,s.height=n},triangle:function(t,e,i,n,s){s.cx=t+i/2,s.cy=e+n/2,s.width=i,s.height=n}},symbolBuildProxies={};each$4(symbolCtors,(function(t,e){symbolBuildProxies[e]=new t}));var SymbolClz=Path$2.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=calculateTextPosition(t,e,i),s=this.shape;return s&&"pin"===s.symbolType&&"inside"===e.position&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var s=symbolBuildProxies[n];s||(s=symbolBuildProxies[n="rect"]),symbolShapeMakers[n](e.x,e.y,e.width,e.height,s.shape),s.buildPath(t,s.shape,i)}}});function symbolPathSetColor(t,e){if("image"!==this.type){var i=this.style;this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff",i.lineWidth=2):"line"===this.shape.symbolType?i.stroke=t:i.fill=t,this.markRedraw()}}function createSymbol(t,e,i,n,s,a,o){var r,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(r=0===t.indexOf("image://")?makeImage(t.slice(8),new BoundingRect$1(e,i,n,s),o?"center":"cover"):0===t.indexOf("path://")?makePath(t.slice(7),{},new BoundingRect$1(e,i,n,s),o?"center":"cover"):new SymbolClz({shape:{symbolType:t,x:e,y:i,width:n,height:s}})).__isEmptyBrush=l,r.setColor=symbolPathSetColor,a&&r.setColor(a),r}function normalizeSymbolSize(t){return isArray(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function normalizeSymbolOffset(t,e){if(null!=t)return isArray(t)||(t=[t,t]),[parsePercent(t[0],e[0])||0,parsePercent(retrieve2(t[1],t[0]),e[1])||0]}function isSafeNum(t){return isFinite(t)}function createLinearGradient(t,e,i){var n=null==e.x?0:e.x,s=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,s=s*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isSafeNum(n)?n:0,s=isSafeNum(s)?s:1,a=isSafeNum(a)?a:0,o=isSafeNum(o)?o:0,t.createLinearGradient(n,a,s,o)}function createRadialGradient(t,e,i){var n=i.width,s=i.height,a=Math.min(n,s),o=null==e.x?.5:e.x,r=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*n+i.x,r=r*s+i.y,l*=a),o=isSafeNum(o)?o:.5,r=isSafeNum(r)?r:.5,l=l>=0&&isSafeNum(l)?l:.5,t.createRadialGradient(o,r,0,o,r,l)}function getCanvasGradient(t,e,i){for(var n="radial"===e.type?createRadialGradient(t,e,i):createLinearGradient(t,e,i),s=e.colorStops,a=0;a<s.length;a++)n.addColorStop(s[a].offset,s[a].color);return n}function isClipPathChanged(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}function parseInt10(t){return parseInt(t,10)}function getSize(t,e,i){var n=["width","height"][e],s=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(null!=i[n]&&"auto"!==i[n])return parseFloat(i[n]);var r=document.defaultView.getComputedStyle(t);return(t[s]||parseInt10(r[n])||parseInt10(t.style[n]))-(parseInt10(r[a])||0)-(parseInt10(r[o])||0)|0}function normalizeLineDash(t,e){return t&&"solid"!==t&&e>0?"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:isNumber$1(t)?[t]:isArray(t)?t:null:null}function getLineDash(t){var e=t.style,i=e.lineDash&&e.lineWidth>0&&normalizeLineDash(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(i){var s=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;s&&1!==s&&(i=map$1(i,(function(t){return t/s})),n/=s)}return[i,n]}var pathProxyForDraw=new PathProxy$1(!0);function styleHasStroke(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function isValidStrokeFillStyle(t){return"string"==typeof t&&"none"!==t}function styleHasFill(t){var e=t.fill;return null!=e&&"none"!==e}function doFillPath(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var i=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=i}else t.fill()}function doStrokePath(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var i=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=i}else t.stroke()}function createCanvasPattern(t,e,i){var n=createOrUpdateImage(e.image,e.__image,i);if(isImageReady(n)){var s=t.createPattern(n,e.repeat||"repeat");if("function"==typeof DOMMatrix&&s&&s.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*RADIAN_TO_DEGREE),a.scaleSelf(e.scaleX||1,e.scaleY||1),s.setTransform(a)}return s}}function brushPath(t,e,i,n){var s,a=styleHasStroke(i),o=styleHasFill(i),r=i.strokePercent,l=r<1,h=!e.path;e.silent&&!l||!h||e.createPathProxy();var c=e.path||pathProxyForDraw,u=e.__dirty;if(!n){var d=i.fill,p=i.stroke,g=o&&!!d.colorStops,f=a&&!!p.colorStops,m=o&&!!d.image,v=a&&!!p.image,b=void 0,y=void 0,S=void 0,x=void 0,w=void 0;(g||f)&&(w=e.getBoundingRect()),g&&(b=u?getCanvasGradient(t,d,w):e.__canvasFillGradient,e.__canvasFillGradient=b),f&&(y=u?getCanvasGradient(t,p,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=y),m&&(S=u||!e.__canvasFillPattern?createCanvasPattern(t,d,e):e.__canvasFillPattern,e.__canvasFillPattern=S),v&&(x=u||!e.__canvasStrokePattern?createCanvasPattern(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),g?t.fillStyle=b:m&&(S?t.fillStyle=S:o=!1),f?t.strokeStyle=y:v&&(x?t.strokeStyle=x:a=!1)}var C,T,D=e.getGlobalScale();c.setScale(D[0],D[1],e.segmentIgnoreThreshold),t.setLineDash&&i.lineDash&&(C=(s=getLineDash(e))[0],T=s[1]);var k=!0;(h||u&SHAPE_CHANGED_BIT)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?r:1),C&&(t.setLineDash(C),t.lineDashOffset=T),n||(i.strokeFirst?(a&&doStrokePath(t,i),o&&doFillPath(t,i)):(o&&doFillPath(t,i),a&&doStrokePath(t,i))),C&&t.setLineDash([])}function brushImage(t,e,i){var n=e.__image=createOrUpdateImage(i.image,e.__image,e,e.onload);if(n&&isImageReady(n)){var s=i.x||0,a=i.y||0,o=e.getWidth(),r=e.getHeight(),l=n.width/n.height;if(null==o&&null!=r?o=r*l:null==r&&null!=o?r=o/l:null==o&&null==r&&(o=n.width,r=n.height),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(n,h,c,i.sWidth,i.sHeight,s,a,o,r)}else if(i.sx&&i.sy){var u=o-(h=i.sx),d=r-(c=i.sy);t.drawImage(n,h,c,u,d,s,a,o,r)}else t.drawImage(n,s,a,o,r)}}function brushText(t,e,i){var n,s=i.text;if(null!=s&&(s+=""),s){t.font=i.font||DEFAULT_FONT,t.textAlign=i.textAlign,t.textBaseline=i.textBaseline;var a=void 0,o=void 0;t.setLineDash&&i.lineDash&&(a=(n=getLineDash(e))[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),i.strokeFirst?(styleHasStroke(i)&&t.strokeText(s,i.x,i.y),styleHasFill(i)&&t.fillText(s,i.x,i.y)):(styleHasFill(i)&&t.fillText(s,i.x,i.y),styleHasStroke(i)&&t.strokeText(s,i.x,i.y)),a&&t.setLineDash([])}}var SHADOW_NUMBER_PROPS=["shadowBlur","shadowOffsetX","shadowOffsetY"],STROKE_PROPS=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function bindCommonProps(t,e,i,n,s){var a=!1;if(!n&&e===(i=i||{}))return!1;if(n||e.opacity!==i.opacity){flushPathDrawn(t,s),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?DEFAULT_COMMON_STYLE.opacity:o}(n||e.blend!==i.blend)&&(a||(flushPathDrawn(t,s),a=!0),t.globalCompositeOperation=e.blend||DEFAULT_COMMON_STYLE.blend);for(var r=0;r<SHADOW_NUMBER_PROPS.length;r++){var l=SHADOW_NUMBER_PROPS[r];(n||e[l]!==i[l])&&(a||(flushPathDrawn(t,s),a=!0),t[l]=t.dpr*(e[l]||0))}return(n||e.shadowColor!==i.shadowColor)&&(a||(flushPathDrawn(t,s),a=!0),t.shadowColor=e.shadowColor||DEFAULT_COMMON_STYLE.shadowColor),a}function bindPathAndTextCommonStyle(t,e,i,n,s){var a=getStyle(e,s.inHover),o=n?null:i&&getStyle(i,s.inHover)||{};if(a===o)return!1;var r=bindCommonProps(t,a,o,n,s);if((n||a.fill!==o.fill)&&(r||(flushPathDrawn(t,s),r=!0),isValidStrokeFillStyle(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(r||(flushPathDrawn(t,s),r=!0),isValidStrokeFillStyle(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(r||(flushPathDrawn(t,s),r=!0),t.globalAlpha=null==a.opacity?1:a.opacity),e.hasStroke()){var l=a.lineWidth/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(r||(flushPathDrawn(t,s),r=!0),t.lineWidth=l)}for(var h=0;h<STROKE_PROPS.length;h++){var c=STROKE_PROPS[h],u=c[0];(n||a[u]!==o[u])&&(r||(flushPathDrawn(t,s),r=!0),t[u]=a[u]||c[1])}return r}function bindImageStyle(t,e,i,n,s){return bindCommonProps(t,getStyle(e,s.inHover),i&&getStyle(i,s.inHover),n,s)}function setContextTransform(t,e){var i=e.transform,n=t.dpr||1;i?t.setTransform(n*i[0],n*i[1],n*i[2],n*i[3],n*i[4],n*i[5]):t.setTransform(n,0,0,n,0,0)}function updateClipStatus(t,e,i){for(var n=!1,s=0;s<t.length;s++){var a=t[s];n=n||a.isZeroArea(),setContextTransform(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}i.allClipped=n}function isTransformChanged(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var DRAW_TYPE_PATH=1,DRAW_TYPE_IMAGE=2,DRAW_TYPE_TEXT=3,DRAW_TYPE_INCREMENTAL=4;function canPathBatch(t){var e=styleHasFill(t),i=styleHasStroke(t);return!(t.lineDash||!(+e^+i)||e&&"string"!=typeof t.fill||i&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function flushPathDrawn(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function getStyle(t,e){return e&&t.__hoverStyle||t.style}function brushSingle(t,e){brush(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function brush(t,e,i,n){var s=e.transform;if(!e.shouldBePainted(i.viewWidth,i.viewHeight,!1,!1))return e.__dirty&=~REDRAW_BIT,void(e.__isRendered=!1);var a=e.__clipPaths,o=i.prevElClipPaths,r=!1,l=!1;if(o&&!isClipPathChanged(a,o)||(o&&o.length&&(flushPathDrawn(t,i),t.restore(),l=r=!0,i.prevElClipPaths=null,i.allClipped=!1,i.prevEl=null),a&&a.length&&(flushPathDrawn(t,i),t.save(),updateClipStatus(a,t,i),r=!0),i.prevElClipPaths=a),i.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var h=i.prevEl;h||(l=r=!0);var c=e instanceof Path$2&&e.autoBatch&&canPathBatch(e.style);r||isTransformChanged(s,h.transform)?(flushPathDrawn(t,i),setContextTransform(t,e)):c||flushPathDrawn(t,i);var u=getStyle(e,i.inHover);e instanceof Path$2?(i.lastDrawType!==DRAW_TYPE_PATH&&(l=!0,i.lastDrawType=DRAW_TYPE_PATH),bindPathAndTextCommonStyle(t,e,h,l,i),c&&(i.batchFill||i.batchStroke)||t.beginPath(),brushPath(t,e,u,c),c&&(i.batchFill=u.fill||"",i.batchStroke=u.stroke||"")):e instanceof TSpan$1?(i.lastDrawType!==DRAW_TYPE_TEXT&&(l=!0,i.lastDrawType=DRAW_TYPE_TEXT),bindPathAndTextCommonStyle(t,e,h,l,i),brushText(t,e,u)):e instanceof ZRImage$1?(i.lastDrawType!==DRAW_TYPE_IMAGE&&(l=!0,i.lastDrawType=DRAW_TYPE_IMAGE),bindImageStyle(t,e,h,l,i),brushImage(t,e,u)):e.getTemporalDisplayables&&(i.lastDrawType!==DRAW_TYPE_INCREMENTAL&&(l=!0,i.lastDrawType=DRAW_TYPE_INCREMENTAL),brushIncremental(t,e,i)),c&&n&&flushPathDrawn(t,i),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),i.prevEl=e,e.__dirty=0,e.__isRendered=!0}}function brushIncremental(t,e,i){var n=e.getDisplayables(),s=e.getTemporalDisplayables();t.save();var a,o,r={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:i.viewWidth,viewHeight:i.viewHeight,inHover:i.inHover};for(a=e.getCursor(),o=n.length;a<o;a++){(c=n[a]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),brush(t,c,r,a===o-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),r.prevEl=c}for(var l=0,h=s.length;l<h;l++){var c;(c=s[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),brush(t,c,r,l===h-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),r.prevEl=c}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var decalMap=new WeakMap$2,decalCache=new LRU$1(100),decalKeys=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function createOrUpdatePatternFromDecal(t,e){if("none"===t)return null;var i=e.getDevicePixelRatio(),n=e.getZr(),s="svg"===n.painter.type;t.dirty&&decalMap.delete(t);var a=decalMap.get(t);if(a)return a;var o=defaults(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===o.backgroundColor&&(o.backgroundColor=null);var r={repeat:"repeat"};return function(t){for(var e,a=[i],r=!0,l=0;l<decalKeys.length;++l){var h=o[decalKeys[l]];if(null!=h&&!isArray(h)&&!isString(h)&&!isNumber$1(h)&&"boolean"!=typeof h){r=!1;break}a.push(h)}if(r){e=a.join(",")+(s?"-svg":"");var c=decalCache.get(e);c&&(s?t.svgElement=c:t.image=c)}var u,d=normalizeDashArrayX(o.dashArrayX),p=normalizeDashArrayY(o.dashArrayY),g=normalizeSymbolArray(o.symbol),f=getLineBlockLengthX(d),m=getLineBlockLengthY(p),v=!s&&platformApi.createCanvas(),b=s&&{tag:"g",attrs:{},key:"dcl",children:[]},y=function(){for(var t=1,e=0,i=f.length;e<i;++e)t=getLeastCommonMultiple(t,f[e]);var n=1;for(e=0,i=g.length;e<i;++e)n=getLeastCommonMultiple(n,g[e].length);t*=n;var s=m*f.length*g.length;return{width:Math.max(1,Math.min(t,o.maxTileWidth)),height:Math.max(1,Math.min(s,o.maxTileHeight))}}();v&&(v.width=y.width*i,v.height=y.height*i,u=v.getContext("2d"));(function(){u&&(u.clearRect(0,0,v.width,v.height),o.backgroundColor&&(u.fillStyle=o.backgroundColor,u.fillRect(0,0,v.width,v.height)));for(var t=0,e=0;e<p.length;++e)t+=p[e];if(t<=0)return;var a=-m,r=0,l=0,h=0;for(;a<y.height;){if(r%2==0){for(var c=l/2%g.length,f=0,S=0,x=0;f<2*y.width;){var w=0;for(e=0;e<d[h].length;++e)w+=d[h][e];if(w<=0)break;if(S%2==0){var C=.5*(1-o.symbolSize),T=f+d[h][S]*C,D=a+p[r]*C,k=d[h][S]*o.symbolSize,$=p[r]*o.symbolSize,O=x/2%g[c].length;P(T,D,k,$,g[c][O])}f+=d[h][S],++x,++S===d[h].length&&(S=0)}++h===d.length&&(h=0)}a+=p[r],++l,++r===p.length&&(r=0)}function P(t,e,a,r,l){var h=s?1:i,c=createSymbol(l,t*h,e*h,a*h,r*h,o.color,o.symbolKeepAspect);if(s){var d=n.painter.renderOneToVNode(c);d&&b.children.push(d)}else brushSingle(u,c)}})(),r&&decalCache.put(e,v||b);t.image=v,t.svgElement=b,t.svgWidth=y.width,t.svgHeight=y.height}(r),r.rotation=o.rotation,r.scaleX=r.scaleY=s?1:1/i,decalMap.set(t,r),t.dirty=!1,r}function normalizeSymbolArray(t){if(!t||0===t.length)return[["rect"]];if(isString(t))return[[t]];for(var e=!0,i=0;i<t.length;++i)if(!isString(t[i])){e=!1;break}if(e)return normalizeSymbolArray([t]);var n=[];for(i=0;i<t.length;++i)isString(t[i])?n.push([t[i]]):n.push(t[i]);return n}function normalizeDashArrayX(t){if(!t||0===t.length)return[[0,0]];if(isNumber$1(t))return[[s=Math.ceil(t),s]];for(var e=!0,i=0;i<t.length;++i)if(!isNumber$1(t[i])){e=!1;break}if(e)return normalizeDashArrayX([t]);var n=[];for(i=0;i<t.length;++i)if(isNumber$1(t[i])){var s=Math.ceil(t[i]);n.push([s,s])}else{(s=map$1(t[i],(function(t){return Math.ceil(t)}))).length%2==1?n.push(s.concat(s)):n.push(s)}return n}function normalizeDashArrayY(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(isNumber$1(t)){var e=Math.ceil(t);return[e,e]}var i=map$1(t,(function(t){return Math.ceil(t)}));return t.length%2?i.concat(i):i}function getLineBlockLengthX(t){return map$1(t,(function(t){return getLineBlockLengthY(t)}))}function getLineBlockLengthY(t){for(var e=0,i=0;i<t.length;++i)e+=t[i];return t.length%2==1?2*e:e}function decalVisual(t,e){t.eachRawSeries((function(i){if(!t.isSeriesFiltered(i)){var n=i.getData();n.hasItemVisual()&&n.each((function(t){var i=n.getItemVisual(t,"decal");i&&(n.ensureUniqueItemVisual(t,"style").decal=createOrUpdatePatternFromDecal(i,e))}));var s=n.getVisual("decal");if(s)n.getVisual("style").decal=createOrUpdatePatternFromDecal(s,e)}}))}var lifecycle=new Eventful$1,lifecycle$1=lifecycle,implsStore={};function registerImpl(t,e){implsStore[t]=e}function getImpl(t){return implsStore[t]}var TEST_FRAME_REMAIN_TIME=1,PRIORITY_PROCESSOR_SERIES_FILTER=800,PRIORITY_PROCESSOR_DATASTACK=900,PRIORITY_PROCESSOR_FILTER=1e3,PRIORITY_PROCESSOR_DEFAULT=2e3,PRIORITY_PROCESSOR_STATISTIC=5e3,PRIORITY_VISUAL_LAYOUT=1e3,PRIORITY_VISUAL_PROGRESSIVE_LAYOUT=1100,PRIORITY_VISUAL_GLOBAL=2e3,PRIORITY_VISUAL_CHART=3e3,PRIORITY_VISUAL_COMPONENT=4e3,PRIORITY_VISUAL_CHART_DATA_CUSTOM=4500,PRIORITY_VISUAL_POST_CHART_LAYOUT=4600,PRIORITY_VISUAL_BRUSH=5e3,PRIORITY_VISUAL_ARIA=6e3,PRIORITY_VISUAL_DECAL=7e3,PRIORITY={PROCESSOR:{FILTER:PRIORITY_PROCESSOR_FILTER,SERIES_FILTER:PRIORITY_PROCESSOR_SERIES_FILTER,STATISTIC:PRIORITY_PROCESSOR_STATISTIC},VISUAL:{LAYOUT:PRIORITY_VISUAL_LAYOUT,PROGRESSIVE_LAYOUT:PRIORITY_VISUAL_PROGRESSIVE_LAYOUT,GLOBAL:PRIORITY_VISUAL_GLOBAL,CHART:PRIORITY_VISUAL_CHART,POST_CHART_LAYOUT:PRIORITY_VISUAL_POST_CHART_LAYOUT,COMPONENT:PRIORITY_VISUAL_COMPONENT,BRUSH:PRIORITY_VISUAL_BRUSH,CHART_ITEM:PRIORITY_VISUAL_CHART_DATA_CUSTOM,ARIA:PRIORITY_VISUAL_ARIA,DECAL:PRIORITY_VISUAL_DECAL}},IN_MAIN_PROCESS_KEY="__flagInMainProcess",PENDING_UPDATE="__pendingUpdate",STATUS_NEEDS_UPDATE_KEY="__needsUpdateStatus",ACTION_REG=/^[a-zA-Z0-9_]+$/,CONNECT_STATUS_KEY="__connectUpdateStatus",CONNECT_STATUS_PENDING=0,CONNECT_STATUS_UPDATING=1,CONNECT_STATUS_UPDATED=2;function createRegisterEventWithLowercaseECharts(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if(!this.isDisposed())return toLowercaseNameAndCallEventful(this,t,e);disposedWarning(this.id)}}function createRegisterEventWithLowercaseMessageCenter(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return toLowercaseNameAndCallEventful(this,t,e)}}function toLowercaseNameAndCallEventful(t,e,i){return i[0]=i[0]&&i[0].toLowerCase(),Eventful$1.prototype[e].apply(t,i)}var MessageCenter=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(Eventful$1),messageCenterProto=MessageCenter.prototype,prepare,prepareView,updateDirectly,updateMethods,doConvertPixel,updateStreamModes,doDispatchAction,flushPendingActions,triggerUpdatedEvent,bindRenderedEvent,bindMouseEvent,render,renderComponents,renderSeries,createExtensionAPI,enableConnect,markStatusToUpdate,applyChangedStates;messageCenterProto.on=createRegisterEventWithLowercaseMessageCenter("on"),messageCenterProto.off=createRegisterEventWithLowercaseMessageCenter("off");var ECharts=function(t){function e(e,i,n){var s=t.call(this,new ECEventProcessor)||this;s._chartsViews=[],s._chartsMap={},s._componentsViews=[],s._componentsMap={},s._pendingActions=[],n=n||{},isString(i)&&(i=themeStorage[i]),s._dom=e;n.ssr&&registerSSRDataGetter((function(t){var e=getECData(t),i=e.dataIndex;if(null!=i){var n=createHashMap();return n.set("series_index",e.seriesIndex),n.set("data_index",i),e.ssrType&&n.set("ssr_type",e.ssrType),n}}));var a=s._zr=init$1(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:retrieve2(n.useDirtyRect,!1),useCoarsePointer:retrieve2(n.useCoarsePointer,"auto"),pointerSize:n.pointerSize});s._ssr=n.ssr,s._throttledZrFlush=throttle(bind$1(a.flush,a),17),(i=clone$3(i))&&globalBackwardCompat(i,!0),s._theme=i,s._locale=createLocaleObject(n.locale||SYSTEM_LANG),s._coordSysMgr=new CoordinateSystem;var o=s._api=createExtensionAPI(s);function r(t,e){return t.__prio-e.__prio}return sort(visualFuncs,r),sort(dataProcessorFuncs,r),s._scheduler=new Scheduler$1(s,o,dataProcessorFuncs,visualFuncs),s._messageCenter=new MessageCenter,s._initEvents(),s.resize=bind$1(s.resize,s),a.animation.on("frame",s._onframe,s),bindRenderedEvent(a,s),bindMouseEvent(a,s),setAsPrimitive(s),s}return __extends(e,t),e.prototype._onframe=function(){if(!this._disposed){applyChangedStates(this);var t=this._scheduler;if(this[PENDING_UPDATE]){var e=this[PENDING_UPDATE].silent;this[IN_MAIN_PROCESS_KEY]=!0;try{prepare(this),updateMethods.update.call(this,null,this[PENDING_UPDATE].updateParams)}catch(o){throw this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,o}this._zr.flush(),this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,flushPendingActions.call(this,e),triggerUpdatedEvent.call(this,e)}else if(t.unfinished){var i=TEST_FRAME_REMAIN_TIME,n=this._model,s=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),updateStreamModes(this,n),t.performVisualTasks(n),renderSeries(this,this._model,s,"remain",{}),i-=+new Date-a}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,i){if(!this[IN_MAIN_PROCESS_KEY])if(this._disposed)disposedWarning(this.id);else{var n,s,a;if(isObject$2(e)&&(i=e.lazyUpdate,n=e.silent,s=e.replaceMerge,a=e.transition,e=e.notMerge),this[IN_MAIN_PROCESS_KEY]=!0,!this._model||e){var o=new OptionManager$1(this._api),r=this._theme,l=this._model=new GlobalModel$1;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,r,this._locale,o)}this._model.setOption(t,{replaceMerge:s},optionPreprocessorFuncs);var h={seriesTransition:a,optionChanged:!0};if(i)this[PENDING_UPDATE]={silent:n,updateParams:h},this[IN_MAIN_PROCESS_KEY]=!1,this.getZr().wakeUp();else{try{prepare(this),updateMethods.update.call(this,null,h)}catch(c){throw this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,c}this._ssr||this._zr.flush(),this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,n),triggerUpdatedEvent.call(this,n)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||env$1.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(env$1.svgSupported){var t=this._zr;return each$4(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],s=this;each$4(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=s._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return each$4(n,(function(t){t.group.ignore=!1})),a}disposedWarning(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,i=this.group,n=Math.min,s=Math.max,a=1/0;if(connectedGroups[i]){var o=a,r=a,l=-1/0,h=-1/0,c=[],u=t&&t.pixelRatio||this.getDevicePixelRatio();each$4(instances,(function(a,u){if(a.group===i){var d=e?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(clone$3(t)),p=a.getDom().getBoundingClientRect();o=n(p.left,o),r=n(p.top,r),l=s(p.right,l),h=s(p.bottom,h),c.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=u)-(o*=u),p=(h*=u)-(r*=u),g=platformApi.createCanvas(),f=init$1(g,{renderer:e?"svg":"canvas"});if(f.resize({width:d,height:p}),e){var m="";return each$4(c,(function(t){var e=t.left-o,i=t.top-r;m+='<g transform="translate('+e+","+i+')">'+t.dom+"</g>"})),f.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&f.painter.setBackgroundColor(t.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()}return t.connectedBackgroundColor&&f.add(new Rect$3({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),each$4(c,(function(t){var e=new ZRImage$1({style:{x:t.left*u-o,y:t.top*u-r,image:t.dom}});f.add(e)})),f.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}disposedWarning(this.id)},e.prototype.convertToPixel=function(t,e){return doConvertPixel(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return doConvertPixel(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var i;if(!this._disposed)return each$4(parseFinder(this._model,t),(function(t,n){n.indexOf("Models")>=0&&each$4(t,(function(t){var s=t.coordinateSystem;if(s&&s.containPoint)i=i||!!s.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i=i||a.containPoint(e,t))}}),this)}),this),!!i;disposedWarning(this.id)},e.prototype.getVisual=function(t,e){var i=parseFinder(this._model,t,{defaultMainType:"series"}),n=i.seriesModel.getData(),s=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?n.indexOfRawIndex(i.dataIndex):null;return null!=s?getItemVisualFromData(n,s,e):getVisualFromData(n,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;each$4(MOUSE_EVENT_NAMES,(function(e){var i=function(i){var n,s=t.getModel(),a=i.target;if("globalout"===e?n={}:a&&findEventDispatcher(a,(function(t){var e=getECData(t);if(e&&null!=e.dataIndex){var i=e.dataModel||s.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,a)||{},!0}if(e.eventData)return n=extend({},e.eventData),!0}),!0),n){var o=n.componentType,r=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",r=n.seriesIndex);var l=o&&null!=r&&s.getComponent(o,r),h=l&&t["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=i,n.type=e,t._$eventProcessor.eventInfo={targetEl:a,packedEvent:n,model:l,view:h},t.trigger(e,n)}};i.zrEventfulCallAtLast=!0,t._zr.on(e,i,t)})),each$4(eventActionMap,(function(e,i){t._messageCenter.on(i,(function(t){this.trigger(i,t)}),t)})),each$4(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),handleLegacySelectEvents(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?disposedWarning(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)disposedWarning(this.id);else{this._disposed=!0,this.getDom()&&setAttribute(this.getDom(),DOM_ATTRIBUTE_KEY,"");var t=this,e=t._api,i=t._model;each$4(t._componentsViews,(function(t){t.dispose(i,e)})),each$4(t._chartsViews,(function(t){t.dispose(i,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete instances[t.id]}},e.prototype.resize=function(t){if(!this[IN_MAIN_PROCESS_KEY])if(this._disposed)disposedWarning(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[PENDING_UPDATE]&&(null==n&&(n=this[PENDING_UPDATE].silent),i=!0,this[PENDING_UPDATE]=null),this[IN_MAIN_PROCESS_KEY]=!0;try{i&&prepare(this),updateMethods.update.call(this,{type:"resize",animation:extend({duration:0},t&&t.animation)})}catch(s){throw this[IN_MAIN_PROCESS_KEY]=!1,s}this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,n),triggerUpdatedEvent.call(this,n)}}},e.prototype.showLoading=function(t,e){if(this._disposed)disposedWarning(this.id);else if(isObject$2(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),loadingEffects[t]){var i=loadingEffects[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},e.prototype.hideLoading=function(){this._disposed?disposedWarning(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=extend({},t);return e.type=eventActionMap[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)disposedWarning(this.id);else if(isObject$2(e)||(e={silent:!!e}),actions[t.type]&&this._model)if(this[IN_MAIN_PROCESS_KEY])this._pendingActions.push(t);else{var i=e.silent;doDispatchAction.call(this,t,i);var n=e.flush;n?this._zr.flush():!1!==n&&env$1.browser.weChat&&this._throttledZrFlush(),flushPendingActions.call(this,i),triggerUpdatedEvent.call(this,i)}},e.prototype.updateLabelLayout=function(){lifecycle$1.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)disposedWarning(this.id);else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],i=t.currentStates,n=0;n<i.length;n++){var s=i[n];"emphasis"!==s&&"blur"!==s&&"select"!==s&&e.push(s)}t.selected&&t.states.select&&e.push("select"),t.hoverState===HOVER_STATE_EMPHASIS&&t.states.emphasis?e.push("emphasis"):t.hoverState===HOVER_STATE_BLUR&&t.states.blur&&e.push("blur"),t.useStates(e)}function i(t,e){if(!t.preventAutoZ){var i=t.get("z")||0,s=t.get("zlevel")||0;e.eachRendered((function(t){return n(t,i,s,-1/0),!0}))}}function n(t,e,i,s){var a=t.getTextContent(),o=t.getTextGuideLine();if(t.isGroup)for(var r=t.childrenRef(),l=0;l<r.length;l++)s=Math.max(n(r[l],e,i,s),s);else t.z=e,t.zlevel=i,s=Math.max(t.z2,s);if(a&&(a.z=e,a.zlevel=i,isFinite(s)&&(a.z2=s+2)),o){var h=t.textGuideLineConfig;o.z=e,o.zlevel=i,isFinite(s)&&(o.z2=s+(h&&h.showAbove?1:-1))}return s}function s(t,e){e.eachRendered((function(t){if(!isElementRemoved(t)){var e=t.getTextContent(),i=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),i&&i.stateTransition&&(i.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function a(t,i){var n=t.getModel("stateAnimation"),s=t.isAnimationEnabled(),a=n.get("duration"),o=a>0?{duration:a,delay:n.get("delay"),easing:n.get("easing")}:null;i.eachRendered((function(t){if(t.states&&t.states.emphasis){if(isElementRemoved(t))return;if(t instanceof Path$2&&savePathStates(t),t.__dirty){var i=t.prevStates;i&&t.useStates(i)}if(s){t.stateTransition=o;var n=t.getTextContent(),a=t.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}t.__dirty&&e(t)}}))}prepare=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),prepareView(t,!0),prepareView(t,!1),e.plan()},prepareView=function(t,e){for(var i=t._model,n=t._scheduler,s=e?t._componentsViews:t._chartsViews,a=e?t._componentsMap:t._chartsMap,o=t._zr,r=t._api,l=0;l<s.length;l++)s[l].__alive=!1;function h(t){var l=t.__requireNewView;t.__requireNewView=!1;var h="_ec_"+t.id+"_"+t.type,c=!l&&a[h];if(!c){var u=parseClassType(t.type);(c=new(e?ComponentView$1.getClass(u.main,u.sub):ChartView$1.getClass(u.sub))).init(i,r),a[h]=c,s.push(c),o.add(c.group)}t.__viewId=c.__id=h,c.__alive=!0,c.__model=t,c.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!e&&n.prepareView(c,t,i,r)}e?i.eachComponent((function(t,e){"series"!==t&&h(e)})):i.eachSeries(h);for(l=0;l<s.length;){var c=s[l];c.__alive?l++:(!e&&c.renderTask.dispose(),o.remove(c.group),c.dispose(i,r),s.splice(l,1),a[c.__id]===c&&delete a[c.__id],c.__id=c.group.__ecComponentInfo=null)}},updateDirectly=function(t,e,i,n,s){var a=t._model;if(a.setUpdatePayload(i),n){var o={};o[n+"Id"]=i[n+"Id"],o[n+"Index"]=i[n+"Index"],o[n+"Name"]=i[n+"Name"];var r={mainType:n,query:o};s&&(r.subType=s);var l,h=i.excludeSeriesId;null!=h&&(l=createHashMap(),each$4(normalizeToArray(h),(function(t){var e=convertOptionIdName(t,null);null!=e&&l.set(e,!0)}))),a&&a.eachComponent(r,(function(e){if(!(l&&null!=l.get(e.id)))if(isHighDownPayload(i))if(e instanceof SeriesModel$1)i.type!==HIGHLIGHT_ACTION_TYPE||i.notBlur||e.get(["emphasis","disabled"])||blurSeriesFromHighlightPayload(e,i,t._api);else{var n=findComponentHighDownDispatchers(e.mainType,e.componentIndex,i.name,t._api),s=n.focusSelf,a=n.dispatchers;i.type===HIGHLIGHT_ACTION_TYPE&&s&&!i.notBlur&&blurComponent(e.mainType,e.componentIndex,t._api),a&&each$4(a,(function(t){i.type===HIGHLIGHT_ACTION_TYPE?enterEmphasis(t):leaveEmphasis(t)}))}else isSelectChangePayload(i)&&e instanceof SeriesModel$1&&(toggleSelectionFromPayload(e,i,t._api),updateSeriesElementSelection(e),markStatusToUpdate(t))}),t),a&&a.eachComponent(r,(function(e){l&&null!=l.get(e.id)||c(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else each$4([].concat(t._componentsViews).concat(t._chartsViews),c);function c(n){n&&n.__alive&&n[e]&&n[e](n.__model,a,t._api,i)}},updateMethods={prepareAndUpdate:function(t){prepare(this),updateMethods.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(e,i){var n=this._model,s=this._api,a=this._zr,o=this._coordSysMgr,r=this._scheduler;if(n){n.setUpdatePayload(e),r.restoreData(n,e),r.performSeriesTasks(n),o.create(n,s),r.performDataProcessorTasks(n,e),updateStreamModes(this,n),o.update(n,s),t(n),r.performVisualTasks(n,e),render(this,n,s,e,i);var l=n.get("backgroundColor")||"transparent",h=n.get("darkMode");a.setBackgroundColor(l),null!=h&&"auto"!==h&&a.setDarkMode(h),lifecycle$1.trigger("afterupdate",n,s)}},updateTransform:function(e){var i=this,n=this._model,s=this._api;if(n){n.setUpdatePayload(e);var a=[];n.eachComponent((function(t,o){if("series"!==t){var r=i.getViewOfComponentModel(o);if(r&&r.__alive)if(r.updateTransform){var l=r.updateTransform(o,n,s,e);l&&l.update&&a.push(r)}else a.push(r)}}));var o=createHashMap();n.eachSeries((function(t){var a=i._chartsMap[t.__viewId];if(a.updateTransform){var r=a.updateTransform(t,n,s,e);r&&r.update&&o.set(t.uid,1)}else o.set(t.uid,1)})),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:o}),renderSeries(this,n,s,e,{},o),lifecycle$1.trigger("afterupdate",n,s)}},updateView:function(e){var i=this._model;i&&(i.setUpdatePayload(e),ChartView$1.markUpdateMethod(e,"updateView"),t(i),this._scheduler.performVisualTasks(i,e,{setDirty:!0}),render(this,i,this._api,e,{}),lifecycle$1.trigger("afterupdate",i,this._api))},updateVisual:function(e){var i=this,n=this._model;n&&(n.setUpdatePayload(e),n.eachSeries((function(t){t.getData().clearAllVisual()})),ChartView$1.markUpdateMethod(e,"updateVisual"),t(n),this._scheduler.performVisualTasks(n,e,{visualType:"visual",setDirty:!0}),n.eachComponent((function(t,s){if("series"!==t){var a=i.getViewOfComponentModel(s);a&&a.__alive&&a.updateVisual(s,n,i._api,e)}})),n.eachSeries((function(t){i._chartsMap[t.__viewId].updateVisual(t,n,i._api,e)})),lifecycle$1.trigger("afterupdate",n,this._api))},updateLayout:function(t){updateMethods.update.call(this,t)}},doConvertPixel=function(t,e,i,n){if(t._disposed)disposedWarning(t.id);else for(var s,a=t._model,o=t._coordSysMgr.getCoordinateSystems(),r=parseFinder(a,i),l=0;l<o.length;l++){var h=o[l];if(h[e]&&null!=(s=h[e](a,r,n)))return s}},updateStreamModes=function(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries((function(t){n.updateStreamModes(t,i[t.__viewId])}))},doDispatchAction=function(t,e){var i=this,n=this.getModel(),s=t.type,a=t.escapeConnect,o=actions[s],r=o.actionInfo,l=(r.update||"update").split(":"),h=l.pop(),c=null!=l[0]&&parseClassType(l[0]);this[IN_MAIN_PROCESS_KEY]=!0;var u=[t],d=!1;t.batch&&(d=!0,u=map$1(t.batch,(function(e){return(e=defaults(extend({},e),t)).batch=null,e})));var p,g=[],f=isSelectChangePayload(t),m=isHighDownPayload(t);if(m&&allLeaveBlur(this._api),each$4(u,(function(e){if((p=(p=o.action(e,i._model,i._api))||extend({},e)).type=r.event||p.type,g.push(p),m){var n=preParseFinder(t),s=n.queryOptionMap,a=n.mainTypeSpecified?s.keys()[0]:"series";updateDirectly(i,h,e,a),markStatusToUpdate(i)}else f?(updateDirectly(i,h,e,"series"),markStatusToUpdate(i)):c&&updateDirectly(i,h,e,c.main,c.sub)})),"none"!==h&&!m&&!f&&!c)try{this[PENDING_UPDATE]?(prepare(this),updateMethods.update.call(this,t),this[PENDING_UPDATE]=null):updateMethods[h].call(this,t)}catch(y){throw this[IN_MAIN_PROCESS_KEY]=!1,y}if(p=d?{type:r.event||s,escapeConnect:a,batch:g}:g[0],this[IN_MAIN_PROCESS_KEY]=!1,!e){var v=this._messageCenter;if(v.trigger(p.type,p),f){var b={type:"selectchanged",escapeConnect:a,selected:getAllSelectedIndices(n),isFromClick:t.isFromClick||!1,fromAction:t.type,fromActionPayload:t};v.trigger(b.type,b)}}},flushPendingActions=function(t){for(var e=this._pendingActions;e.length;){var i=e.shift();doDispatchAction.call(this,i,t)}},triggerUpdatedEvent=function(t){!t&&this.trigger("updated")},bindRenderedEvent=function(t,e){t.on("rendered",(function(i){e.trigger("rendered",i),!t.animation.isFinished()||e[PENDING_UPDATE]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")}))},bindMouseEvent=function(t,e){t.on("mouseover",(function(t){var i=findEventDispatcher(t.target,isHighDownDispatcher);i&&(handleGlobalMouseOverForHighDown(i,t,e._api),markStatusToUpdate(e))})).on("mouseout",(function(t){var i=findEventDispatcher(t.target,isHighDownDispatcher);i&&(handleGlobalMouseOutForHighDown(i,t,e._api),markStatusToUpdate(e))})).on("click",(function(t){var i=findEventDispatcher(t.target,(function(t){return null!=getECData(t).dataIndex}),!0);if(i){var n=i.selected?"unselect":"select",s=getECData(i);e._api.dispatchAction({type:n,dataType:s.dataType,dataIndexInside:s.dataIndex,seriesIndex:s.seriesIndex,isFromClick:!0})}}))},render=function(t,e,i,n,s){!function(t){var e=[],i=[],n=!1;if(t.eachComponent((function(t,s){var a=s.get("zlevel")||0,o=s.get("z")||0,r=s.getZLevelKey();n=n||!!r,("series"===t?i:e).push({zlevel:a,z:o,idx:s.componentIndex,type:t,key:r})})),n){var s,a,o=e.concat(i);sort(o,(function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel})),each$4(o,(function(e){var i=t.getComponent(e.type,e.idx),n=e.zlevel,o=e.key;null!=s&&(n=Math.max(s,n)),o?(n===s&&o!==a&&n++,a=o):a&&(n===s&&n++,a=""),s=n,i.setZLevel(n)}))}}(e),renderComponents(t,e,i,n,s),each$4(t._chartsViews,(function(t){t.__alive=!1})),renderSeries(t,e,i,n,s),each$4(t._chartsViews,(function(t){t.__alive||t.remove(e,i)}))},renderComponents=function(t,e,n,o,r,l){each$4(l||t._componentsViews,(function(t){var r=t.__model;s(r,t),t.render(r,e,n,o),i(r,t),a(r,t)}))},renderSeries=function(t,e,n,o,r,l){var h=t._scheduler;r=extend(r||{},{updatedSeries:e.getSeries()}),lifecycle$1.trigger("series:beforeupdate",e,n,r);var c=!1;e.eachSeries((function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var n=i.renderTask;h.updatePayload(n,o),s(e,i),l&&l.get(e.uid)&&n.dirty(),n.perform(h.getPerformArgs(n))&&(c=!0),i.group.silent=!!e.get("silent"),function(t,e){var i=t.get("blendMode")||null;e.eachRendered((function(t){t.isGroup||(t.style.blend=i)}))}(e,i),updateSeriesElementSelection(e)})),h.unfinished=c||h.unfinished,lifecycle$1.trigger("series:layoutlabels",e,n,r),lifecycle$1.trigger("series:transition",e,n,r),e.eachSeries((function(e){var n=t._chartsMap[e.__viewId];i(e,n),a(e,n)})),function(t,e){var i=t._zr.storage,n=0;i.traverse((function(t){t.isGroup||n++})),n>e.get("hoverLayerThreshold")&&!env$1.node&&!env$1.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),lifecycle$1.trigger("series:afterupdate",e,n,r)},markStatusToUpdate=function(t){t[STATUS_NEEDS_UPDATE_KEY]=!0,t.getZr().wakeUp()},applyChangedStates=function(t){t[STATUS_NEEDS_UPDATE_KEY]&&(t.getZr().storage.traverse((function(t){isElementRemoved(t)||e(t)})),t[STATUS_NEEDS_UPDATE_KEY]=!1)},createExtensionAPI=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return __extends(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}},i.prototype.enterEmphasis=function(e,i){enterEmphasis(e,i),markStatusToUpdate(t)},i.prototype.leaveEmphasis=function(e,i){leaveEmphasis(e,i),markStatusToUpdate(t)},i.prototype.enterBlur=function(e){enterBlur(e),markStatusToUpdate(t)},i.prototype.leaveBlur=function(e){leaveBlur(e),markStatusToUpdate(t)},i.prototype.enterSelect=function(e){enterSelect(e),markStatusToUpdate(t)},i.prototype.leaveSelect=function(e){leaveSelect(e),markStatusToUpdate(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(ExtensionAPI$1))(t)},enableConnect=function(t){function e(t,e){for(var i=0;i<t.length;i++){t[i][CONNECT_STATUS_KEY]=e}}each$4(eventActionMap,(function(i,n){t._messageCenter.on(n,(function(i){if(connectedGroups[t.group]&&t[CONNECT_STATUS_KEY]!==CONNECT_STATUS_PENDING){if(i&&i.escapeConnect)return;var n=t.makeActionFromEvent(i),s=[];each$4(instances,(function(e){e!==t&&e.group===t.group&&s.push(e)})),e(s,CONNECT_STATUS_PENDING),each$4(s,(function(t){t[CONNECT_STATUS_KEY]!==CONNECT_STATUS_UPDATING&&t.dispatchAction(n)})),e(s,CONNECT_STATUS_UPDATED)}}))}))}}(),e}(Eventful$1),echartsProto=ECharts.prototype;echartsProto.on=createRegisterEventWithLowercaseECharts("on"),echartsProto.off=createRegisterEventWithLowercaseECharts("off"),echartsProto.one=function(t,e,i){var n=this;this.on.call(this,t,(function i(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];e&&e.apply&&e.apply(this,s),n.off(t,i)}),i)};var MOUSE_EVENT_NAMES=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function disposedWarning(t){}var actions={},eventActionMap={},dataProcessorFuncs=[],optionPreprocessorFuncs=[],visualFuncs=[],themeStorage={},loadingEffects={},instances={},connectedGroups={},idBase=+new Date-0,DOM_ATTRIBUTE_KEY="_echarts_instance_";function init(t,e,i){var n=!(i&&i.ssr);if(n){var s=getInstanceByDom(t);if(s)return s}var a=new ECharts(t,e,i);return a.id="ec_"+idBase++,instances[a.id]=a,n&&setAttribute(t,DOM_ATTRIBUTE_KEY,a.id),enableConnect(a),lifecycle$1.trigger("afterinit",a),a}function getInstanceByDom(t){return instances[getAttribute(t,DOM_ATTRIBUTE_KEY)]}function registerTheme(t,e){themeStorage[t]=e}function registerPreprocessor(t){indexOf(optionPreprocessorFuncs,t)<0&&optionPreprocessorFuncs.push(t)}function registerProcessor(t,e){normalizeRegister(dataProcessorFuncs,t,e,PRIORITY_PROCESSOR_DEFAULT)}function registerPostInit(t){registerUpdateLifecycle("afterinit",t)}function registerPostUpdate(t){registerUpdateLifecycle("afterupdate",t)}function registerUpdateLifecycle(t,e){lifecycle$1.on(t,e)}function registerAction(t,e,i){isFunction(e)&&(i=e,e="");var n=isObject$2(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,eventActionMap[e]||(assert(ACTION_REG.test(n)&&ACTION_REG.test(e)),actions[n]||(actions[n]={action:i,actionInfo:t}),eventActionMap[e]=n)}function registerCoordinateSystem(t,e){CoordinateSystem.register(t,e)}function registerLayout(t,e){normalizeRegister(visualFuncs,t,e,PRIORITY_VISUAL_LAYOUT,"layout")}function registerVisual(t,e){normalizeRegister(visualFuncs,t,e,PRIORITY_VISUAL_CHART,"visual")}var registeredTasks=[];function normalizeRegister(t,e,i,n,s){if((isFunction(e)||isObject$2(e))&&(i=e,e=n),!(indexOf(registeredTasks,i)>=0)){registeredTasks.push(i);var a=Scheduler$1.wrapStageHandler(i,s);a.__prio=e,a.__raw=i,t.push(a)}}function registerLoading(t,e){loadingEffects[t]=e}function registerMap(t,e,i){var n=getImpl("registerMap");n&&n(t,e,i)}var registerTransform=registerExternalTransform;function dataIndexMapValueLength(t){return null==t?0:t.length||1}function defaultKeyGetter(t){return t}registerVisual(PRIORITY_VISUAL_GLOBAL,seriesStyleTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataStyleTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataColorPaletteTask),registerVisual(PRIORITY_VISUAL_GLOBAL,seriesSymbolTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataSymbolTask),registerVisual(PRIORITY_VISUAL_DECAL,decalVisual),registerPreprocessor(globalBackwardCompat),registerProcessor(PRIORITY_PROCESSOR_DATASTACK,dataStack),registerLoading("default",defaultLoading),registerAction({type:HIGHLIGHT_ACTION_TYPE,event:HIGHLIGHT_ACTION_TYPE,update:HIGHLIGHT_ACTION_TYPE},noop$3),registerAction({type:DOWNPLAY_ACTION_TYPE,event:DOWNPLAY_ACTION_TYPE,update:DOWNPLAY_ACTION_TYPE},noop$3),registerAction({type:SELECT_ACTION_TYPE,event:SELECT_ACTION_TYPE,update:SELECT_ACTION_TYPE},noop$3),registerAction({type:UNSELECT_ACTION_TYPE,event:UNSELECT_ACTION_TYPE,update:UNSELECT_ACTION_TYPE},noop$3),registerAction({type:TOGGLE_SELECT_ACTION_TYPE,event:TOGGLE_SELECT_ACTION_TYPE,update:TOGGLE_SELECT_ACTION_TYPE},noop$3),registerTheme("light",lightTheme),registerTheme("dark",darkTheme);var DataDiffer=function(){function t(t,e,i,n,s,a){this._old=t,this._new=e,this._oldKeyGetter=i||defaultKeyGetter,this._newKeyGetter=n||defaultKeyGetter,this.context=s,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),s=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,s,"_newKeyGetter");for(var a=0;a<t.length;a++){var o=n[a],r=i[o],l=dataIndexMapValueLength(r);if(l>1){var h=r.shift();1===r.length&&(i[o]=r[0]),this._update&&this._update(h,a)}else 1===l?(i[o]=null,this._update&&this._update(r,a)):this._remove&&this._remove(a)}this._performRestAdd(s,i)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},s=[],a=[];this._initIndexMap(t,i,s,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o<s.length;o++){var r=s[o],l=i[r],h=n[r],c=dataIndexMapValueLength(l),u=dataIndexMapValueLength(h);if(c>1&&1===u)this._updateManyToOne&&this._updateManyToOne(h,l),n[r]=null;else if(1===c&&u>1)this._updateOneToMany&&this._updateOneToMany(h,l),n[r]=null;else if(1===c&&1===u)this._update&&this._update(h,l),n[r]=null;else if(c>1&&u>1)this._updateManyToMany&&this._updateManyToMany(h,l),n[r]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(a,n)},t.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],s=e[n],a=dataIndexMapValueLength(s);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(s[o]);else 1===a&&this._add&&this._add(s);e[n]=null}},t.prototype._initIndexMap=function(t,e,i,n){for(var s=this._diffModeMultiple,a=0;a<t.length;a++){var o="_ec_"+this[n](t[a],a);if(s||(i[a]=o),e){var r=e[o],l=dataIndexMapValueLength(r);0===l?(e[o]=a,s&&i.push(o)):1===l?e[o]=[r,a]:r.push(a)}}},t}(),DataDiffer$1=DataDiffer,DimensionUserOuput=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function summarizeDimensions(t,e){var i={},n=i.encode={},s=createHashMap(),a=[],o=[],r={};each$4(t.dimensions,(function(e){var i=t.getDimensionInfo(e),l=i.coordDim;if(l){var h=i.coordDimIndex;getOrCreateEncodeArr(n,l)[h]=e,i.isExtraCoord||(s.set(l,1),mayLabelDimType(i.type)&&(a[0]=e),getOrCreateEncodeArr(r,l)[h]=t.getDimensionIndex(i.name)),i.defaultTooltip&&o.push(e)}VISUAL_DIMENSIONS.each((function(t,e){var s=getOrCreateEncodeArr(n,e),a=i.otherDims[e];null!=a&&!1!==a&&(s[a]=i.name)}))}));var l=[],h={};s.each((function(t,e){var i=n[e];h[e]=i[0],l=l.concat(i)})),i.dataDimsOnCoord=l,i.dataDimIndicesOnCoord=map$1(l,(function(e){return t.getDimensionInfo(e).storeDimIndex})),i.encodeFirstDimNotExtra=h;var c=n.label;c&&c.length&&(a=c.slice());var u=n.tooltip;return u&&u.length?o=u.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,i.userOutput=new DimensionUserOuput(r,e),i}function getOrCreateEncodeArr(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function getDimensionTypeByAxis(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function mayLabelDimType(t){return!("ordinal"===t||"time"===t)}var SeriesDimensionDefine=function(t){this.otherDims={},null!=t&&extend(this,t)},SeriesDimensionDefine$1=SeriesDimensionDefine,inner$3=makeInner(),dimTypeShort={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SeriesDataSchema=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=ensureSourceDimNameMap(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return retrieve2(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=shouldRetrieveDataByName(this.source),i=!shouldOmitUnusedDimensions(t),n="",s=[],a=0,o=0;a<t;a++){var r=void 0,l=void 0,h=void 0,c=this.dimensions[o];if(c&&c.storeDimIndex===a)r=e?c.name:null,l=c.type,h=c.ordinalMeta,o++;else{var u=this.getSourceDimension(a);u&&(r=e?u.name:null,l=u.type)}s.push({property:r,type:l,ordinalMeta:h}),!e||null==r||c&&c.isCalculationCoord||(n+=i?r.replace(/\`/g,"`1").replace(/\$/g,"`2"):r),n+="$",n+=dimTypeShort[l]||"f",h&&(n+=h.uid),n+="$"}var d=this.source;return{dimensions:s,hash:[d.seriesLayoutBy,d.startIndex,n].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,s=this.dimensions[i];if(s&&s.storeDimIndex===e)s.isCalculationCoord||(n=s.name),i++;else{var a=this.getSourceDimension(e);a&&(n=a.name)}t.push(n)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function isSeriesDataSchema(t){return t instanceof SeriesDataSchema}function createDimNameMap(t){for(var e=createHashMap(),i=0;i<(t||[]).length;i++){var n=t[i],s=isObject$2(n)?n.name:n;null!=s&&null==e.get(s)&&e.set(s,i)}return e}function ensureSourceDimNameMap(t){var e=inner$3(t);return e.dimNameMap||(e.dimNameMap=createDimNameMap(t.dimensionsDefine))}function shouldOmitUnusedDimensions(t){return t>30}var isObject=isObject$2,map=map$1,CtorInt32Array="undefined"==typeof Int32Array?Array:Int32Array,ID_PREFIX="e\0\0",INDEX_NOT_FOUND=-1,TRANSFERABLE_PROPERTIES=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],CLONE_PROPERTIES=["_approximateExtent"],prepareInvertedIndex,getId,getIdNameFromStore,normalizeDimensions,transferProperties,cloneListForMapAndSample,makeIdFromName,SeriesData=function(){function t(t,e){var i;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n=!1;isSeriesDataSchema(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var s={},a=[],o={},r=!1,l={},h=0;h<i.length;h++){var c=i[h],u=isString(c)?new SeriesDimensionDefine$1({name:c}):c instanceof SeriesDimensionDefine$1?c:new SeriesDimensionDefine$1(c),d=u.name;u.type=u.type||"float",u.coordDim||(u.coordDim=d,u.coordDimIndex=0);var p=u.otherDims=u.otherDims||{};a.push(d),s[d]=u,null!=l[d]&&(r=!0),u.createInvertedIndices&&(o[d]=[]),0===p.itemName&&(this._nameDimIdx=h),0===p.itemId&&(this._idDimIdx=h),n&&(u.storeDimIndex=h)}if(this.dimensions=a,this._dimInfos=s,this._initGetDimensionInfo(r),this.hostModel=e,this._invertedIndicesMap=o,this._dimOmitted){var g=this._dimIdxToName=createHashMap();each$4(a,(function(t){g.set(s[t].storeDimIndex,t)}))}}return t.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(null==e)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(null!=i)return i;var n=this._schema.getSourceDimension(e);return n?n.name:void 0},t.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(null!=e)return e;if(null==t)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(isNumber$1(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,e,i){var n,s=this;if(t instanceof DataStore$1&&(n=t),!n){var a=this.dimensions,o=isSourceInstance(t)||isArrayLike(t)?new DefaultDataProvider(t,a.length):t;n=new DataStore$1;var r=map(a,(function(t){return{type:s._dimInfos[t].type,property:t}}));n.initData(o,r,i)}this._store=n,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,n.count()),this._dimSummary=summarizeDimensions(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},t.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e&&e.length),n=i.start,s=i.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var o=n;o<s;o++){var r=o-n;this._nameList[o]=e[r],a&&makeIdFromName(this,o)}},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==SOURCE_FORMAT_TYPED_ARRAY&&!t.fillStorage},t.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store.getProvider();this._updateOrdinalMeta();var n=this._nameList,s=this._idList;if(i.getSource().sourceFormat===SOURCE_FORMAT_ORIGINAL&&!i.pure)for(var a=[],o=t;o<e;o++){var r=i.getItem(o,a);if(!this.hasItemOption&&isDataItemOption(r)&&(this.hasItemOption=!0),r){var l=r.name;null==n[o]&&null!=l&&(n[o]=convertOptionIdName(l,null));var h=r.id;null==s[o]&&null!=h&&(s[o]=convertOptionIdName(h,null))}}if(this._shouldMakeIdFromName())for(o=t;o<e;o++)makeIdFromName(this,o);prepareInvertedIndex(this)}},t.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){isObject(t)?extend(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return null==i&&null!=this._nameDimIdx&&(i=getIdNameFromStore(this,this._nameDimIdx,e)),null==i&&(i=""),i},t.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},t.prototype.getId=function(t){return getId(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},t.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,e){var i=this,n=this._store;return isArray(t)?n.getValues(map(t,(function(t){return i._getStoreDimIndex(t)})),e):n.getValues(t)},t.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i&&i[e];return null==n||isNaN(n)?INDEX_NOT_FOUND:n},t.prototype.indicesOfNearest=function(t,e,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,i)},t.prototype.each=function(t,e,i){isFunction(t)&&(i=e,e=t,t=[]);var n=i||this,s=map(normalizeDimensions(t),this._getStoreDimIndex,this);this._store.each(s,n?bind$1(e,n):e)},t.prototype.filterSelf=function(t,e,i){isFunction(t)&&(i=e,e=t,t=[]);var n=i||this,s=map(normalizeDimensions(t),this._getStoreDimIndex,this);return this._store=this._store.filter(s,n?bind$1(e,n):e),this},t.prototype.selectRange=function(t){var e=this,i={};return each$4(keys(t),(function(n){var s=e._getStoreDimIndex(n);i[s]=t[n]})),this._store=this._store.selectRange(i),this},t.prototype.mapArray=function(t,e,i){isFunction(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,(function(){n.push(e&&e.apply(this,arguments))}),i),n},t.prototype.map=function(t,e,i,n){var s=i||n||this,a=map(normalizeDimensions(t),this._getStoreDimIndex,this),o=cloneListForMapAndSample(this);return o._store=this._store.map(a,s?bind$1(e,s):e),o},t.prototype.modify=function(t,e,i,n){var s=i||n||this,a=map(normalizeDimensions(t),this._getStoreDimIndex,this);this._store.modify(a,s?bind$1(e,s):e)},t.prototype.downSample=function(t,e,i,n){var s=cloneListForMapAndSample(this);return s._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),s},t.prototype.minmaxDownSample=function(t,e){var i=cloneListForMapAndSample(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),i},t.prototype.lttbDownSample=function(t,e){var i=cloneListForMapAndSample(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new Model$1(i,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new DataDiffer$1(t?t.getStore().getIndices():[],this.getStore().getIndices(),(function(e){return getId(t,e)}),(function(t){return getId(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},isObject(t)?extend(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return null==n?this.getVisual(e):n},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var s=n[e];return null==s&&(isArray(s=this.getVisual(e))?s=s.slice():isObject(s)&&(s=extend({},s)),n[e]=s),s},t.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,isObject(e)?extend(n,e):n[e]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){isObject(t)?extend(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?extend(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;setCommonECData(i,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){each$4(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:map(this.dimensions,this._getDimInfo,this),this.hostModel)),transferProperties(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var i=this[t];isFunction(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(slice(arguments)))})},t.internalField=(prepareInvertedIndex=function(t){var e=t._invertedIndicesMap;each$4(e,(function(i,n){var s=t._dimInfos[n],a=s.ordinalMeta,o=t._store;if(a){i=e[n]=new CtorInt32Array(a.categories.length);for(var r=0;r<i.length;r++)i[r]=INDEX_NOT_FOUND;for(r=0;r<o.count();r++)i[o.get(s.storeDimIndex,r)]=r}}))},getIdNameFromStore=function(t,e,i){return convertOptionIdName(t._getCategory(e,i),null)},getId=function(t,e){var i=t._idList[e];return null==i&&null!=t._idDimIdx&&(i=getIdNameFromStore(t,t._idDimIdx,e)),null==i&&(i=ID_PREFIX+e),i},normalizeDimensions=function(t){return isArray(t)||(t=null!=t?[t]:[]),t},cloneListForMapAndSample=function(e){var i=new t(e._schema?e._schema:map(e.dimensions,e._getDimInfo,e),e.hostModel);return transferProperties(i,e),i},transferProperties=function(t,e){each$4(TRANSFERABLE_PROPERTIES.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods,each$4(CLONE_PROPERTIES,(function(i){t[i]=clone$3(e[i])})),t._calculationInfo=extend({},e._calculationInfo)},void(makeIdFromName=function(t,e){var i=t._nameList,n=t._idList,s=t._nameDimIdx,a=t._idDimIdx,o=i[e],r=n[e];if(null==o&&null!=s&&(i[e]=o=getIdNameFromStore(t,s,e)),null==r&&null!=a&&(n[e]=r=getIdNameFromStore(t,a,e)),null==r&&null!=o){var l=t._nameRepeatCount,h=l[o]=(l[o]||0)+1;r=o,h>1&&(r+="__ec__"+h),n[e]=r}})),t}(),SeriesData$1=SeriesData;function prepareSeriesDataSchema(t,e){isSourceInstance(t)||(t=createSourceFromSeriesDataOption(t));var i=(e=e||{}).coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],s=createHashMap(),a=[],o=getDimCount(t,i,n,e.dimensionsCount),r=e.canOmitUnusedDimensions&&shouldOmitUnusedDimensions(o),l=n===t.dimensionsDefine,h=l?ensureSourceDimNameMap(t):createDimNameMap(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var u=createHashMap(c),d=new CtorInt32Array$1(o),p=0;p<d.length;p++)d[p]=-1;function g(t){var e=d[t];if(e<0){var i=n[t],s=isObject$2(i)?i:{name:i},o=new SeriesDimensionDefine$1,r=s.name;null!=r&&null!=h.get(r)&&(o.name=o.displayName=r),null!=s.type&&(o.type=s.type),null!=s.displayName&&(o.displayName=s.displayName);var l=a.length;return d[t]=l,o.storeDimIndex=t,a.push(o),o}return a[e]}if(!r)for(p=0;p<o;p++)g(p);u.each((function(t,e){var i=normalizeToArray(t).slice();if(1===i.length&&!isString(i[0])&&i[0]<0)u.set(e,!1);else{var n=u.set(e,[]);each$4(i,(function(t,i){var s=isString(t)?h.get(t):t;null!=s&&s<o&&(n[i]=s,m(g(s),e,i))}))}}));var f=0;function m(t,e,i){null!=VISUAL_DIMENSIONS.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,s.set(e,!0))}each$4(i,(function(t){var e,i,n,s;if(isString(t))e=t,s={};else{e=(s=t).name;var a=s.ordinalMeta;s.ordinalMeta=null,(s=extend({},s)).ordinalMeta=a,i=s.dimsDef,n=s.otherDims,s.name=s.coordDim=s.coordDimIndex=s.dimsDef=s.otherDims=null}var r=u.get(e);if(!1!==r){if(!(r=normalizeToArray(r)).length)for(var h=0;h<(i&&i.length||1);h++){for(;f<o&&null!=g(f).coordDim;)f++;f<o&&r.push(f++)}each$4(r,(function(t,a){var o=g(t);if(l&&null!=s.type&&(o.type=s.type),m(defaults(o,s),e,a),null==o.name&&i){var r=i[a];!isObject$2(r)&&(r={name:r}),o.name=o.displayName=r.name,o.defaultTooltip=r.defaultTooltip}n&&defaults(o.otherDims,n)}))}}));var v=e.generateCoord,b=e.generateCoordCount,y=null!=b;b=v?b||1:0;var S=v||"value";function x(t){null==t.name&&(t.name=t.coordDim)}if(r)each$4(a,(function(t){x(t)})),a.sort((function(t,e){return t.storeDimIndex-e.storeDimIndex}));else for(var w=0;w<o;w++){var C=g(w);null==C.coordDim&&(C.coordDim=genCoordDimName(S,s,y),C.coordDimIndex=0,(!v||b<=0)&&(C.isExtraCoord=!0),b--),x(C),null!=C.type||guessOrdinal(t,w)!==BE_ORDINAL.Must&&(!C.isExtraCoord||null==C.otherDims.itemName&&null==C.otherDims.seriesName)||(C.type="ordinal")}return removeDuplication(a),new SeriesDataSchema({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:r})}function removeDuplication(t){for(var e=createHashMap(),i=0;i<t.length;i++){var n=t[i],s=n.name,a=e.get(s)||0;a>0&&(n.name=s+(a-1)),a++,e.set(s,a)}}function getDimCount(t,e,i,n){var s=Math.max(t.dimensionsDetectedCount||1,e.length,i.length,n||0);return each$4(e,(function(t){var e;isObject$2(t)&&(e=t.dimsDef)&&(s=Math.max(s,e.length))})),s}function genCoordDimName(t,e,i){if(i||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}function enableDataStack(t,e,i){var n,s,a,o=(i=i||{}).byIndex,r=i.stackedCoordDimension;isLegacyDimensionsInput(e)?n=e:(s=e.schema,n=s.dimensions,a=e.store);var l,h,c,u,d=!(!t||!t.get("stack"));if(each$4(n,(function(t,e){isString(t)&&(n[e]=t={name:t}),d&&!t.isExtraCoord&&(o||l||!t.ordinalMeta||(l=t),h||"ordinal"===t.type||"time"===t.type||r&&r!==t.coordDim||(h=t))})),!h||o||l||(o=!0),h){c="__\0ecstackresult_"+t.id,u="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=h.coordDim,g=h.type,f=0;each$4(n,(function(t){t.coordDim===p&&f++}));var m={name:c,coordDim:p,coordDimIndex:f,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},v={name:u,coordDim:u,coordDimIndex:f+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};s?(a&&(m.storeDimIndex=a.ensureCalculationDimension(u,g),v.storeDimIndex=a.ensureCalculationDimension(c,g)),s.appendCalculationDimension(m),s.appendCalculationDimension(v)):(n.push(m),n.push(v))}return{stackedDimension:h&&h.name,stackedByDimension:l&&l.name,isStackedByIndex:o,stackedOverDimension:u,stackResultDimension:c}}function isLegacyDimensionsInput(t){return!isSeriesDataSchema(t.schema)}function isDimensionStacked(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function getStackedDimension(t,e){return isDimensionStacked(t,e)?t.getCalculationInfo("stackResultDimension"):e}var Scale=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();enableClassManagement(Scale);var Scale$1=Scale,uidBase=0,OrdinalMeta=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++uidBase}return t.createByAxisModel=function(e){var i=e.option,n=i.data,s=n&&map$1(n,getName);return new t({categories:s,needCollect:!s,deduplication:!1!==i.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!isString(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=createHashMap(this.categories))},t}();function getName(t){return isObject$2(t)&&null!=t.value?t.value:t+""}var OrdinalMeta$1=OrdinalMeta;function isIntervalOrLogScale(t){return"interval"===t.type||"log"===t.type}function intervalScaleNiceTicks(t,e,i,n){var s={},a=t[1]-t[0],o=s.interval=nice(a/e,!0);null!=i&&o<i&&(o=s.interval=i),null!=n&&o>n&&(o=s.interval=n);var r=s.intervalPrecision=getIntervalPrecision(o);return fixExtent(s.niceTickExtent=[round$1(Math.ceil(t[0]/o)*o,r),round$1(Math.floor(t[1]/o)*o,r)],t),s}function increaseInterval(t){var e=Math.pow(10,quantityExponent(t)),i=t/e;return i?2===i?i=3:3===i?i=5:i*=2:i=1,round$1(i*e)}function getIntervalPrecision(t){return getPrecision(t)+2}function clamp(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function fixExtent(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),clamp(t,0,e),clamp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function contain(t,e){return t>=e[0]&&t<=e[1]}function normalize(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function scale(t,e){return t*(e[1]-e[0])+e[0]}var OrdinalScale=function(t){function e(e){var i=t.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new OrdinalMeta$1({})),isArray(n)&&(n=new OrdinalMeta$1({categories:map$1(n,(function(t){return isObject$2(t)?t.value:t}))})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return __extends(e,t),e.prototype.parse=function(t){return null==t?NaN:isString(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return contain(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return normalize(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(scale(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],s=0,a=this._ordinalMeta.categories.length,o=Math.min(a,e.length);s<o;++s){var r=e[s];i[s]=r,n[r]=s}for(var l=0;s<a;++s){for(;null!=n[l];)l++;i.push(l),n[l]=s}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},e.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&t>=0&&t<e.length?e[t]:t},e.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&t>=0&&t<e.length?e[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var e=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[e];return null==i?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Scale$1);Scale$1.registerClass(OrdinalScale);var OrdinalScale$1=OrdinalScale,roundNumber=round$1,IntervalScale=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return __extends(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return contain(t,this._extent)},e.prototype.normalize=function(t){return normalize(t,this._extent)},e.prototype.scale=function(t){return scale(t,this._extent)},e.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=getIntervalPrecision(t)},e.prototype.getTicks=function(t){var e=this._interval,i=this._extent,n=this._niceExtent,s=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push({value:roundNumber(n[0]-e,s)}):a.push({value:i[0]}));for(var o=n[0];o<=n[1]&&(a.push({value:o}),(o=roundNumber(o+e,s))!==a[a.length-1].value);)if(a.length>1e4)return[];var r=a.length?a[a.length-1].value:n[1];return i[1]>r&&(t?a.push({value:roundNumber(r+e,s)}):a.push({value:i[1]})),a},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),s=1;s<e.length;s++){for(var a=e[s],o=e[s-1],r=0,l=[],h=(a.value-o.value)/t;r<t-1;){var c=roundNumber(o.value+(r+1)*h);c>n[0]&&c<n[1]&&l.push(c),r++}i.push(l)}return i},e.prototype.getLabel=function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=getPrecision(t.value)||0:"auto"===i&&(i=this._intervalPrecision),addCommas(roundNumber(t.value,i,!0))},e.prototype.calcNiceTicks=function(t,e,i){t=t||5;var n=this._extent,s=n[1]-n[0];if(isFinite(s)){s<0&&(s=-s,n.reverse());var a=intervalScaleNiceTicks(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=Math.abs(e[0]);t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var s=this._interval;t.fixMin||(e[0]=roundNumber(Math.floor(e[0]/s)*s)),t.fixMax||(e[1]=roundNumber(Math.ceil(e[1]/s)*s))},e.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},e.type="interval",e}(Scale$1);Scale$1.registerClass(IntervalScale);var IntervalScale$1=IntervalScale,supportFloat32Array="undefined"!=typeof Float32Array,Float32ArrayCtor=supportFloat32Array?Float32Array:Array;function createFloat32Array(t){return isArray(t)?supportFloat32Array?new Float32Array(t):t:new Float32ArrayCtor(t)}var STACK_PREFIX="__ec_stack_";function getSeriesStackId(t){return t.get("stack")||STACK_PREFIX+t.seriesIndex}function getAxisKey(t){return t.dim+t.index}function getLayoutOnAxis(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var s=i.getBandWidth(),a=0;a<t.count;a++)e.push(defaults({bandWidth:s,axisKey:n,stackId:STACK_PREFIX+a},t));var o=doCalBarWidthAndOffset(e),r=[];for(a=0;a<t.count;a++){var l=o.axis0[STACK_PREFIX+a];l.offsetCenter=l.offset+l.width/2,r.push(l)}return r}}function prepareLayoutBarSeries(t,e){var i=[];return e.eachSeriesByType(t,(function(t){isOnCartesian(t)&&i.push(t)})),i}function getValueAxesMinGaps(t){var e={};each$4(t,(function(t){var i=t.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=t.getData(),s=i.dim+"_"+i.index,a=n.getDimensionIndex(n.mapDimension(i.dim)),o=n.getStore(),r=0,l=o.count();r<l;++r){var h=o.get(a,r);e[s]?e[s].push(h):e[s]=[h]}}));var i={};for(var n in e)if(e.hasOwnProperty(n)){var s=e[n];if(s){s.sort((function(t,e){return t-e}));for(var a=null,o=1;o<s.length;++o){var r=s[o]-s[o-1];r>0&&(a=null===a?r:Math.min(a,r))}i[n]=a}}return i}function makeColumnLayout(t){var e=getValueAxesMinGaps(t),i=[];return each$4(t,(function(t){var n,s=t.coordinateSystem.getBaseAxis(),a=s.getExtent();if("category"===s.type)n=s.getBandWidth();else if("value"===s.type||"time"===s.type){var o=s.dim+"_"+s.index,r=e[o],l=Math.abs(a[1]-a[0]),h=s.scale.getExtent(),c=Math.abs(h[1]-h[0]);n=r?l/c*r:l}else{var u=t.getData();n=Math.abs(a[1]-a[0])/u.count()}var d=parsePercent(t.get("barWidth"),n),p=parsePercent(t.get("barMaxWidth"),n),g=parsePercent(t.get("barMinWidth")||(isInLargeMode(t)?.5:1),n),f=t.get("barGap"),m=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:f,barCategoryGap:m,axisKey:getAxisKey(s),stackId:getSeriesStackId(t)})})),doCalBarWidthAndOffset(i)}function doCalBarWidthAndOffset(t){var e={};each$4(t,(function(t,i){var n=t.axisKey,s=t.bandWidth,a=e[n]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=a.stacks;e[n]=a;var r=t.stackId;o[r]||a.autoWidthCount++,o[r]=o[r]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[r].width&&(o[r].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var h=t.barMaxWidth;h&&(o[r].maxWidth=h);var c=t.barMinWidth;c&&(o[r].minWidth=c);var u=t.barGap;null!=u&&(a.gap=u);var d=t.barCategoryGap;null!=d&&(a.categoryGap=d)}));var i={};return each$4(e,(function(t,e){i[e]={};var n=t.stacks,s=t.bandWidth,a=t.categoryGap;if(null==a){var o=keys(n).length;a=Math.max(35-4*o,15)+"%"}var r=parsePercent(a,s),l=parsePercent(t.gap,1),h=t.remainedWidth,c=t.autoWidthCount,u=(h-r)/(c+(c-1)*l);u=Math.max(u,0),each$4(n,(function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,h-=n+l*n,c--}else{var n=u;e&&e<n&&(n=Math.min(e,h)),i&&i>n&&(n=i),n!==u&&(t.width=n,h-=n+l*n,c--)}})),u=(h-r)/(c+(c-1)*l),u=Math.max(u,0);var d,p=0;each$4(n,(function(t,e){t.width||(t.width=u),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var g=-p/2;each$4(n,(function(t,n){i[e][n]=i[e][n]||{bandWidth:s,offset:g,width:t.width},g+=t.width*(1+l)}))})),i}function retrieveColumnLayout(t,e,i){if(t&&e){var n=t[getAxisKey(e)];return null!=n&&null!=i?n[getSeriesStackId(i)]:n}}function layout$2(t,e){var i=prepareLayoutBarSeries(t,e),n=makeColumnLayout(i);each$4(i,(function(t){var e=t.getData(),i=t.coordinateSystem.getBaseAxis(),s=getSeriesStackId(t),a=n[getAxisKey(i)][s],o=a.offset,r=a.width;e.setLayout({bandWidth:a.bandWidth,offset:o,size:r})}))}function createProgressiveLayout(t){return{seriesType:t,plan:createRenderPlanner(),reset:function(t){if(isOnCartesian(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),s=i.getOtherAxis(n),a=e.getDimensionIndex(e.mapDimension(s.dim)),o=e.getDimensionIndex(e.mapDimension(n.dim)),r=t.get("showBackground",!0),l=e.mapDimension(s.dim),h=e.getCalculationInfo("stackResultDimension"),c=isDimensionStacked(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),u=s.isHorizontal(),d=getValueAxisStart(n,s),p=isInLargeMode(t),g=t.get("barMinHeight")||0,f=h&&e.getDimensionIndex(h),m=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var n,s=t.count,l=p&&createFloat32Array(3*s),h=p&&r&&createFloat32Array(3*s),b=p&&createFloat32Array(s),y=i.master.getRect(),S=u?y.width:y.height,x=e.getStore(),w=0;null!=(n=t.next());){var C=x.get(c?f:a,n),T=x.get(o,n),D=d,k=void 0;c&&(k=+C-x.get(a,n));var $=void 0,O=void 0,P=void 0,L=void 0;if(u){var I=i.dataToPoint([C,T]);if(c)D=i.dataToPoint([k,T])[0];$=D,O=I[1]+v,P=I[0]-D,L=m,Math.abs(P)<g&&(P=(P<0?-1:1)*g)}else{I=i.dataToPoint([T,C]);if(c)D=i.dataToPoint([T,k])[1];$=I[0]+v,O=D,P=m,L=I[1]-D,Math.abs(L)<g&&(L=(L<=0?-1:1)*g)}p?(l[w]=$,l[w+1]=O,l[w+2]=u?P:L,h&&(h[w]=u?y.x:$,h[w+1]=u?O:y.y,h[w+2]=S),b[n]=n):e.setItemLayout(n,{x:$,y:O,width:P,height:L}),w+=3}p&&e.setLayout({largePoints:l,largeDataIndices:b,largeBackgroundPoints:h,valueAxisHorizontal:u})}}}}}}function isOnCartesian(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function isInLargeMode(t){return t.pipelineContext&&t.pipelineContext.large}function getValueAxisStart(t,e){var i=e.model.get("startValue");return i||(i=0),e.toGlobalCoord(e.dataToCoord("log"===e.type?i>0?i:1:i))}var bisect=function(t,e,i,n){for(;i<n;){var s=i+n>>>1;t[s][1]<e?i=s+1:n=s}return i},TimeScale=function(t){function e(e){var i=t.call(this,e)||this;return i.type="time",i}return __extends(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return format(t.value,fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))]||fullLeveledFormatter.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,i){var n=this.getSetting("useUTC");return leveledFormat(t,e,i,this.getSetting("locale"),n)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,i=[];if(!t)return i;i.push({value:e[0],level:0});var n=this.getSetting("useUTC"),s=getIntervalTicks(this._minLevelUnit,this._approxInterval,n,e);return(i=i.concat(s)).push({value:e[1],level:0}),i},e.prototype.calcNiceExtent=function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=ONE_DAY,e[1]+=ONE_DAY),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-ONE_DAY}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,e,i){t=t||10;var n=this._extent,s=n[1]-n[0];this._approxInterval=s/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=i&&this._approxInterval>i&&(this._approxInterval=i);var a=scaleIntervals.length,o=Math.min(bisect(scaleIntervals,this._approxInterval,0,a),a-1);this._interval=scaleIntervals[o][1],this._minLevelUnit=scaleIntervals[Math.max(o-1,0)][0]},e.prototype.parse=function(t){return isNumber$1(t)?t:+parseDate(t)},e.prototype.contain=function(t){return contain(this.parse(t),this._extent)},e.prototype.normalize=function(t){return normalize(this.parse(t),this._extent)},e.prototype.scale=function(t){return scale(t,this._extent)},e.type="time",e}(IntervalScale$1),scaleIntervals=[["second",ONE_SECOND],["minute",ONE_MINUTE],["hour",ONE_HOUR],["quarter-day",6*ONE_HOUR],["half-day",12*ONE_HOUR],["day",1.2*ONE_DAY],["half-week",3.5*ONE_DAY],["week",7*ONE_DAY],["month",31*ONE_DAY],["quarter",95*ONE_DAY],["half-year",ONE_YEAR/2],["year",ONE_YEAR]];function isUnitValueSame(t,e,i,n){var s=parseDate(e),a=parseDate(i),o=function(t){return getUnitValue(s,t,n)===getUnitValue(a,t,n)},r=function(){return o("year")},l=function(){return r()&&o("month")},h=function(){return l()&&o("day")},c=function(){return h()&&o("hour")},u=function(){return c()&&o("minute")},d=function(){return u()&&o("second")};switch(t){case"year":return r();case"month":return l();case"day":return h();case"hour":return c();case"minute":return u();case"second":return d();case"millisecond":return d()&&o("millisecond")}}function getDateInterval(t,e){return(t/=ONE_DAY)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function getMonthInterval(t){return(t/=30*ONE_DAY)>6?6:t>3?3:t>2?2:1}function getHourInterval(t){return(t/=ONE_HOUR)>12?12:t>6?6:t>3.5?4:t>2?2:1}function getMinutesAndSecondsInterval(t,e){return(t/=e?ONE_MINUTE:ONE_SECOND)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function getMillisecondsInterval(t){return nice(t,!0)}function getFirstTimestampOfUnit(t,e,i){var n=new Date(t);switch(getPrimaryTimeUnit(e)){case"year":case"month":n[monthSetterName(i)](0);case"day":n[dateSetterName(i)](1);case"hour":n[hoursSetterName(i)](0);case"minute":n[minutesSetterName(i)](0);case"second":n[secondsSetterName(i)](0),n[millisecondsSetterName(i)](0)}return n.getTime()}function getIntervalTicks(t,e,i,n){var s=timeUnits,a=0;function o(t,e,i,s,a,o,r){for(var l=new Date(e),h=e,c=l[s]();h<i&&h<=n[1];)r.push({value:h}),c+=t,l[a](c),h=l.getTime();r.push({value:h,notAdd:!0})}function r(t,s,a){var r=[],l=!s.length;if(!isUnitValueSame(getPrimaryTimeUnit(t),n[0],n[1],i)){l&&(s=[{value:getFirstTimestampOfUnit(new Date(n[0]),t,i)},{value:n[1]}]);for(var h=0;h<s.length-1;h++){var c=s[h].value,u=s[h+1].value;if(c!==u){var d=void 0,p=void 0,g=void 0;switch(t){case"year":d=Math.max(1,Math.round(e/ONE_DAY/365)),p=fullYearGetterName(i),g=fullYearSetterName(i);break;case"half-year":case"quarter":case"month":d=getMonthInterval(e),p=monthGetterName(i),g=monthSetterName(i);break;case"week":case"half-week":case"day":d=getDateInterval(e),p=dateGetterName(i),g=dateSetterName(i),!0;break;case"half-day":case"quarter-day":case"hour":d=getHourInterval(e),p=hoursGetterName(i),g=hoursSetterName(i);break;case"minute":d=getMinutesAndSecondsInterval(e,!0),p=minutesGetterName(i),g=minutesSetterName(i);break;case"second":d=getMinutesAndSecondsInterval(e,!1),p=secondsGetterName(i),g=secondsSetterName(i);break;case"millisecond":d=getMillisecondsInterval(e),p=millisecondsGetterName(i),g=millisecondsSetterName(i)}o(d,c,u,p,g,0,r),"year"===t&&a.length>1&&0===h&&a.unshift({value:a[0].value-d})}}for(h=0;h<r.length;h++)a.push(r[h]);return r}}for(var l=[],h=[],c=0,u=0,d=0;d<s.length&&a++<1e4;++d){var p=getPrimaryTimeUnit(s[d]);if(isPrimaryTimeUnit(s[d]))if(r(s[d],l[l.length-1]||[],h),p!==(s[d+1]?getPrimaryTimeUnit(s[d+1]):null)){if(h.length){u=c,h.sort((function(t,e){return t.value-e.value}));for(var g=[],f=0;f<h.length;++f){var m=h[f].value;0!==f&&h[f-1].value===m||(g.push(h[f]),m>=n[0]&&m<=n[1]&&c++)}var v=(n[1]-n[0])/e;if(c>1.5*v&&u>v/1.5)break;if(l.push(g),c>v||t===s[d])break}h=[]}}var b=filter(map$1(l,(function(t){return filter(t,(function(t){return t.value>=n[0]&&t.value<=n[1]&&!t.notAdd}))})),(function(t){return t.length>0})),y=[],S=b.length-1;for(d=0;d<b.length;++d)for(var x=b[d],w=0;w<x.length;++w)y.push({value:x[w].value,level:S-d});y.sort((function(t,e){return t.value-e.value}));var C=[];for(d=0;d<y.length;++d)0!==d&&y[d].value===y[d-1].value||C.push(y[d]);return C}Scale$1.registerClass(TimeScale);var TimeScale$1=TimeScale,scaleProto=Scale$1.prototype,intervalScaleProto=IntervalScale$1.prototype,roundingErrorFix=round$1,mathFloor=Math.floor,mathCeil=Math.ceil,mathPow=Math.pow,mathLog=Math.log,LogScale=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new IntervalScale$1,e._interval=0,e}return __extends(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return map$1(intervalScaleProto.getTicks.call(this,t),(function(t){var e=t.value,s=round$1(mathPow(this.base,e));return s=e===i[0]&&this._fixMin?fixRoundingError(s,n[0]):s,{value:s=e===i[1]&&this._fixMax?fixRoundingError(s,n[1]):s}}),this)},e.prototype.setExtent=function(t,e){var i=mathLog(this.base);t=mathLog(Math.max(0,t))/i,e=mathLog(Math.max(0,e))/i,intervalScaleProto.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=scaleProto.getExtent.call(this);e[0]=mathPow(t,e[0]),e[1]=mathPow(t,e[1]);var i=this._originalScale.getExtent();return this._fixMin&&(e[0]=fixRoundingError(e[0],i[0])),this._fixMax&&(e[1]=fixRoundingError(e[1],i[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=mathLog(t[0])/mathLog(e),t[1]=mathLog(t[1])/mathLog(e),scaleProto.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var s=[round$1(mathCeil(e[0]/n)*n),round$1(mathFloor(e[1]/n)*n)];this._interval=n,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){intervalScaleProto.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return contain(t=mathLog(t)/mathLog(this.base),this._extent)},e.prototype.normalize=function(t){return normalize(t=mathLog(t)/mathLog(this.base),this._extent)},e.prototype.scale=function(t){return t=scale(t,this._extent),mathPow(this.base,t)},e.type="log",e}(Scale$1),proto=LogScale.prototype;function fixRoundingError(t,e){return roundingErrorFix(t,getPrecision(e))}proto.getMinorTicks=intervalScaleProto.getMinorTicks,proto.getLabel=intervalScaleProto.getLabel,Scale$1.registerClass(LogScale);var LogScale$1=LogScale,ScaleRawExtentInfo=function(){function t(t,e,i){this._prepareParams(t,e,i)}return t.prototype._prepareParams=function(t,e,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal="ordinal"===t.type;this._needCrossZero="interval"===t.type&&e.getNeedCrossZero&&e.getNeedCrossZero();var s=e.get("min",!0);null==s&&(s=e.get("startValue",!0));var a=this._modelMinRaw=s;isFunction(a)?this._modelMinNum=parseAxisModelMinMax(t,a({min:i[0],max:i[1]})):"dataMin"!==a&&(this._modelMinNum=parseAxisModelMinMax(t,a));var o=this._modelMaxRaw=e.get("max",!0);if(isFunction(o)?this._modelMaxNum=parseAxisModelMinMax(t,o({min:i[0],max:i[1]})):"dataMax"!==o&&(this._modelMaxNum=parseAxisModelMinMax(t,o)),n)this._axisDataLen=e.getCategories().length;else{var r=e.get("boundaryGap"),l=isArray(r)?r:[r||0,r||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[parsePercent$1(l[0],1),parsePercent$1(l[1],1)]}},t.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,i=this._dataMax,n=this._axisDataLen,s=this._boundaryGapInner,a=t?null:i-e||Math.abs(e),o="dataMin"===this._modelMinRaw?e:this._modelMinNum,r="dataMax"===this._modelMaxRaw?i:this._modelMaxNum,l=null!=o,h=null!=r;null==o&&(o=t?n?0:NaN:e-s[0]*a),null==r&&(r=t?n?n-1:NaN:i+s[1]*a),(null==o||!isFinite(o))&&(o=NaN),(null==r||!isFinite(r))&&(r=NaN);var c=eqNaN(o)||eqNaN(r)||t&&!n;this._needCrossZero&&(o>0&&r>0&&!l&&(o=0),o<0&&r<0&&!h&&(r=0));var u=this._determinedMin,d=this._determinedMax;return null!=u&&(o=u,l=!0),null!=d&&(r=d,h=!0),{min:o,max:r,minFixed:l,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[DATA_MIN_MAX_ATTR[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[DETERMINED_MIN_MAX_ATTR[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),DETERMINED_MIN_MAX_ATTR={min:"_determinedMin",max:"_determinedMax"},DATA_MIN_MAX_ATTR={min:"_dataMin",max:"_dataMax"};function ensureScaleRawExtentInfo(t,e,i){var n=t.rawExtentInfo;return n||(n=new ScaleRawExtentInfo(t,e,i),t.rawExtentInfo=n,n)}function parseAxisModelMinMax(t,e){return null==e?null:eqNaN(e)?NaN:t.parse(e)}function getScaleExtent(t,e){var i=t.type,n=ensureScaleRawExtentInfo(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var s=n.min,a=n.max,o=e.ecModel;if(o&&"time"===i){var r=prepareLayoutBarSeries("bar",o),l=!1;if(each$4(r,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var h=makeColumnLayout(r),c=adjustScaleForOverflow(s,a,e,h);s=c.min,a=c.max}}return{extent:[s,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function adjustScaleForOverflow(t,e,i,n){var s=i.axis.getExtent(),a=Math.abs(s[1]-s[0]),o=retrieveColumnLayout(n,i.axis);if(void 0===o)return{min:t,max:e};var r=1/0;each$4(o,(function(t){r=Math.min(t.offset,r)}));var l=-1/0;each$4(o,(function(t){l=Math.max(t.offset+t.width,l)})),r=Math.abs(r),l=Math.abs(l);var h=r+l,c=e-t,u=c/(1-(r+l)/a)-c;return{min:t-=u*(r/h),max:e+=u*(l/h)}}function niceScaleExtent(t,e){var i=e,n=getScaleExtent(t,i),s=n.extent,a=i.get("splitNumber");t instanceof LogScale$1&&(t.base=i.get("logBase"));var o=t.type,r=i.get("interval"),l="interval"===o||"time"===o;t.setExtent(s[0],s[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?i.get("minInterval"):null,maxInterval:l?i.get("maxInterval"):null}),null!=r&&t.setInterval&&t.setInterval(r)}function createScaleByModel(t,e){if(e=e||t.get("type"))switch(e){case"category":return new OrdinalScale$1({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale$1({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Scale$1.getClass(e)||IntervalScale$1)}}function ifAxisCrossZero(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}function makeLabelFormatter(t){var e,i,n=t.getLabelModel().get("formatter"),s="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(i=n,function(e,n){return t.scale.getFormattedLabel(e,n,i)}):isString(n)?function(e){return function(i){var n=t.scale.getLabel(i);return e.replace("{value}",null!=n?n:"")}}(n):isFunction(n)?(e=n,function(i,n){return null!=s&&(n=i.value-s),e(getAxisRawValue(t,i),n,null!=i.level?{level:i.level}:null)}):function(e){return t.scale.getLabel(e)}}function getAxisRawValue(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function estimateLabelUnionRect(t){var e=t.model,i=t.scale;if(e.get(["axisLabel","show"])&&!i.isBlank()){var n,s,a=i.getExtent();s=i instanceof OrdinalScale$1?i.count():(n=i.getTicks()).length;var o,r=t.getLabelModel(),l=makeLabelFormatter(t),h=1;s>40&&(h=Math.ceil(s/40));for(var c=0;c<s;c+=h){var u=l(n?n[c]:{value:a[0]+c},c),d=rotateTextRect(r.getTextRect(u),r.get("rotate")||0);o?o.union(d):o=d}return o}}function rotateTextRect(t,e){var i=e*Math.PI/180,n=t.width,s=t.height,a=n*Math.abs(Math.cos(i))+Math.abs(s*Math.sin(i)),o=n*Math.abs(Math.sin(i))+Math.abs(s*Math.cos(i));return new BoundingRect$1(t.x,t.y,a,o)}function getOptionCategoryInterval(t){var e=t.get("interval");return null==e?"auto":e}function shouldShowAllLabels(t){return"category"===t.type&&0===getOptionCategoryInterval(t.getLabelModel())}function getDataDimensionsOnAxis(t,e){var i={};return each$4(t.mapDimensionsAll(e),(function(e){i[getStackedDimension(t,e)]=!0})),keys(i)}function unionAxisExtentFromData(t,e,i){e&&each$4(getDataDimensionsOnAxis(e,i),(function(i){var n=e.getApproximateExtent(i);n[0]<t[0]&&(t[0]=n[0]),n[1]>t[1]&&(t[1]=n[1])}))}var extensions=[],extensionRegisters={registerPreprocessor:registerPreprocessor,registerProcessor:registerProcessor,registerPostInit:registerPostInit,registerPostUpdate:registerPostUpdate,registerUpdateLifecycle:registerUpdateLifecycle,registerAction:registerAction,registerCoordinateSystem:registerCoordinateSystem,registerLayout:registerLayout,registerVisual:registerVisual,registerTransform:registerTransform,registerLoading:registerLoading,registerMap:registerMap,registerImpl:registerImpl,PRIORITY:PRIORITY,ComponentModel:ComponentModel$1,ComponentView:ComponentView$1,SeriesModel:SeriesModel$1,ChartView:ChartView$1,registerComponentModel:function(t){ComponentModel$1.registerClass(t)},registerComponentView:function(t){ComponentView$1.registerClass(t)},registerSeriesModel:function(t){SeriesModel$1.registerClass(t)},registerChartView:function(t){ChartView$1.registerClass(t)},registerSubTypeDefaulter:function(t,e){ComponentModel$1.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){registerPainter(t,e)}};function use(t){isArray(t)?each$4(t,(function(t){use(t)})):indexOf(extensions,t)>=0||(extensions.push(t),isFunction(t)&&(t={install:t}),t.install(extensionRegisters))}function prepareLayoutList(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];if(!n.defaultAttr.ignore){var s=n.label,a=s.getComputedTransform(),o=s.getBoundingRect(),r=!a||a[1]<1e-5&&a[2]<1e-5,l=s.style.margin||0,h=o.clone();h.applyTransform(a),h.x-=l/2,h.y-=l/2,h.width+=l,h.height+=l;var c=r?new OrientedBoundingRect$1(o,a):null;e.push({label:s,labelLine:n.labelLine,rect:h,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:r,transform:a})}}return e}function shiftLayout(t,e,i,n,s,a){var o=t.length;if(!(o<2)){t.sort((function(t,i){return t.rect[e]-i.rect[e]}));for(var r,l=0,h=!1,c=0,u=0;u<o;u++){var d=t[u],p=d.rect;(r=p[e]-l)<0&&(p[e]-=r,d.label[e]-=r,h=!0),c+=Math.max(-r,0),l=p[e]+p[i]}c>0&&a&&S(-c/o,0,o);var g,f,m=t[0],v=t[o-1];return b(),g<0&&x(-g,.8),f<0&&x(f,.8),b(),y(g,f,1),y(f,g,-1),b(),g<0&&w(-g),f<0&&w(f),h}function b(){g=m.rect[e]-n,f=s-v.rect[e]-v.rect[i]}function y(t,e,i){if(t<0){var n=Math.min(e,-t);if(n>0){S(n*i,0,o);var s=n+t;s<0&&x(-s*i,1)}else x(-t*i,1)}}function S(i,n,s){0!==i&&(h=!0);for(var a=n;a<s;a++){var o=t[a];o.rect[e]+=i,o.label[e]+=i}}function x(n,s){for(var a=[],r=0,l=1;l<o;l++){var h=t[l-1].rect,c=Math.max(t[l].rect[e]-h[e]-h[i],0);a.push(c),r+=c}if(r){var u=Math.min(Math.abs(n)/r,s);if(n>0)for(l=0;l<o-1;l++){S(a[l]*u,0,l+1)}else for(l=o-1;l>0;l--){S(-(a[l-1]*u),l,o)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var i=Math.ceil(t/(o-1)),n=0;n<o-1;n++)if(e>0?S(i,0,n+1):S(-i,o-n-1,o),(t-=i)<=0)return}}function shiftLayoutOnX(t,e,i,n){return shiftLayout(t,"x","width",e,i,n)}function shiftLayoutOnY(t,e,i,n){return shiftLayout(t,"y","height",e,i,n)}function hideOverlap(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var i=new BoundingRect$1(0,0,0,0);function n(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var s=0;s<t.length;s++){var a=t[s],o=a.axisAligned,r=a.localRect,l=a.transform,h=a.label,c=a.labelLine;i.copy(a.rect),i.width-=.1,i.height-=.1,i.x+=.05,i.y+=.05;for(var u=a.obb,d=!1,p=0;p<e.length;p++){var g=e[p];if(i.intersect(g.rect)){if(o&&g.axisAligned){d=!0;break}if(g.obb||(g.obb=new OrientedBoundingRect$1(g.localRect,g.transform)),u||(u=new OrientedBoundingRect$1(r,l)),u.intersect(g.obb)){d=!0;break}}}d?(n(h),c&&n(c)):(h.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function createDom(t,e,i){var n=platformApi.createCanvas(),s=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=s+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=s*i,n.height=a*i,n}var Layer$2=function(t){function e(e,i,n){var s,a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null,n=n||devicePixelRatio,"string"==typeof e?s=createDom(e,i,n):isObject$2(e)&&(e=(s=e).id),a.id=e,a.dom=s;var o=s.style;return o&&(disableUserSelect(s),s.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),a.painter=i,a.dpr=n,a}return __extends(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=createDom("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,i,n){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s,a=[],o=this.maxRepaintRectCount,r=!1,l=new BoundingRect$1(0,0,0,0);function h(t){if(t.isFinite()&&!t.isZero())if(0===a.length){(e=new BoundingRect$1(0,0,0,0)).copy(t),a.push(e)}else{for(var e,i=!1,n=1/0,s=0,h=0;h<a.length;++h){var c=a[h];if(c.intersect(t)){var u=new BoundingRect$1(0,0,0,0);u.copy(c),u.union(t),a[h]=u,i=!0;break}if(r){l.copy(t),l.union(c);var d=t.width*t.height,p=c.width*c.height,g=l.width*l.height-d-p;g<n&&(n=g,s=h)}}if(r&&(a[s].union(t),i=!0),!i)(e=new BoundingRect$1(0,0,0,0)).copy(t),a.push(e);r||(r=a.length>=o)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(p=t[c]){var u=p.shouldBePainted(i,n,!0,!0);(g=p.__isRendered&&(p.__dirty&REDRAW_BIT||!u)?p.getPrevPaintRect():null)&&h(g);var d=u&&(p.__dirty&REDRAW_BIT||!p.__isRendered)?p.getPaintRect():null;d&&h(d)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p,g;u=(p=e[c])&&p.shouldBePainted(i,n,!0,!0);if(p&&(!u||!p.__zr)&&p.__isRendered)(g=p.getPrevPaintRect())&&h(g)}do{s=!1;for(c=0;c<a.length;)if(a[c].isZero())a.splice(c,1);else{for(var f=c+1;f<a.length;)a[c].intersect(a[f])?(s=!0,a[c].union(a[f]),a.splice(f,1)):f++;c++}}while(s);return this._paintRects=a,a},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,e){var i=this.dpr,n=this.dom,s=n.style,a=this.domBack;s&&(s.width=t+"px",s.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,e,i){var n=this.dom,s=this.ctx,a=n.width,o=n.height;e=e||this.clearColor;var r=this.motionBlur&&!t,l=this.lastFrameAlpha,h=this.dpr,c=this;r&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/h,o/h));var u=this.domBack;function d(t,i,n,a){if(s.clearRect(t,i,n,a),e&&"transparent"!==e){var o=void 0;if(isGradientObject(e))o=(e.global||e.__width===n&&e.__height===a)&&e.__canvasGradient||getCanvasGradient(s,e,{x:0,y:0,width:n,height:a}),e.__canvasGradient=o,e.__width=n,e.__height=a;else isImagePatternObject(e)&&(e.scaleX=e.scaleX||h,e.scaleY=e.scaleY||h,o=createCanvasPattern(s,e,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));s.save(),s.fillStyle=o||e,s.fillRect(t,i,n,a),s.restore()}r&&(s.save(),s.globalAlpha=l,s.drawImage(u,t,i,n,a),s.restore())}!i||r?d(0,0,a,o):i.length&&each$4(i,(function(t){d(t.x*h,t.y*h,t.width*h,t.height*h)}))},e}(Eventful$1),Layer$3=Layer$2,HOVER_LAYER_ZLEVEL=1e5,CANVAS_ZLEVEL=314159,EL_AFTER_INCREMENTAL_INC=.01,INCREMENTAL_INC=.001;function isLayerValid(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function createRoot(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}var CanvasPainter=function(){function t(t,e,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var s=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=extend({},i||{}),this.dpr=i.devicePixelRatio||devicePixelRatio,this._singleCanvas=s,this.root=t,t.style&&(disableUserSelect(t),t.innerHTML=""),this.storage=e;var a=this._zlevelList;this._prevDisplayList=[];var o=this._layers;if(s){var r=t,l=r.width,h=r.height;null!=i.width&&(l=i.width),null!=i.height&&(h=i.height),this.dpr=i.devicePixelRatio||1,r.width=l*this.dpr,r.height=h*this.dpr,this._width=l,this._height=h;var c=new Layer$3(r,this,this.dpr);c.__builtin__=!0,c.initContext(),o[CANVAS_ZLEVEL]=c,c.zlevel=CANVAS_ZLEVEL,a.push(CANVAS_ZLEVEL),this._domRoot=t}else{this._width=getSize(t,0,i),this._height=getSize(t,1,i);var u=this._domRoot=createRoot(this._width,this._height);t.appendChild(u)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,i,t,this._redrawId);for(var s=0;s<n.length;s++){var a=n[s],o=this._layers[a];if(!o.__builtin__&&o.refresh){var r=0===s?this._backgroundColor:null;o.refresh(r)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(t){var e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){for(var n,s={inHover:!0,viewWidth:this._width,viewHeight:this._height},a=0;a<e;a++){var o=t[a];o.__inHover&&(i||(i=this._hoverlayer=this.getLayer(HOVER_LAYER_ZLEVEL)),n||(n=i.ctx).save(),brush(n,o,s,a===e-1))}n&&n.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(HOVER_LAYER_ZLEVEL)},t.prototype.paintOne=function(t,e){brushSingle(t,e)},t.prototype._paintList=function(t,e,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(t);var s=this._doPaintList(t,e,i),a=s.finished,o=s.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(t),a)this.eachLayer((function(t){t.afterBrush&&t.afterBrush()}));else{var r=this;requestAnimationFrame$3((function(){r._paintList(t,e,i,n)}))}}},t.prototype._compositeManually=function(){var t=this.getLayer(CANVAS_ZLEVEL).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer((function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)}))},t.prototype._doPaintList=function(t,e,i){for(var n=this,s=[],a=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var r=this._zlevelList[o],l=this._layers[r];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||i)&&s.push(l)}for(var h=!0,c=!1,u=function(o){var r,l=s[o],u=l.ctx,p=a&&l.createRepaintRects(t,e,d._width,d._height),g=i?l.__startIndex:l.__drawIndex,f=!i&&l.incremental&&Date.now,m=f&&Date.now(),v=l.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,p);else if(g===l.__startIndex){var b=t[g];b.incremental&&b.notClear&&!i||l.clear(!1,v,p)}-1===g&&(g=l.__startIndex);var y=function(e){var i={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(r=g;r<l.__endIndex;r++){var s=t[r];if(s.__inHover&&(c=!0),n._doPaintEl(s,l,a,e,i,r===l.__endIndex-1),f)if(Date.now()-m>15)break}i.prevElClipPaths&&u.restore()};if(p)if(0===p.length)r=l.__endIndex;else for(var S=d.dpr,x=0;x<p.length;++x){var w=p[x];u.save(),u.beginPath(),u.rect(w.x*S,w.y*S,w.width*S,w.height*S),u.clip(),y(w),u.restore()}else u.save(),y(),u.restore();l.__drawIndex=r,l.__drawIndex<l.__endIndex&&(h=!1)},d=this,p=0;p<s.length;p++)u(p);return env$1.wxa&&each$4(this._layers,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),{finished:h,needsRefreshHover:c}},t.prototype._doPaintEl=function(t,e,i,n,s,a){var o=e.ctx;if(i){var r=t.getPaintRect();(!n||r&&r.intersect(n))&&(brush(o,t,s,a),t.setPrevPaintRect(r))}else brush(o,t,s,a)},t.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=CANVAS_ZLEVEL);var i=this._layers[t];return i||((i=new Layer$3("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?merge(i,this._layerConfig[t],!0):this._layerConfig[t-EL_AFTER_INCREMENTAL_INC]&&merge(i,this._layerConfig[t-EL_AFTER_INCREMENTAL_INC],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},t.prototype.insertLayer=function(t,e){var i=this._layers,n=this._zlevelList,s=n.length,a=this._domRoot,o=null,r=-1;if(!i[t]&&isLayerValid(e)){if(s>0&&t>n[0]){for(r=0;r<s-1&&!(n[r]<t&&n[r+1]>t);r++);o=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?a.insertBefore(e.dom,l.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var s=i[n];t.call(e,this._layers[s],s)}},t.prototype.eachBuiltinLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var s=i[n],a=this._layers[s];a.__builtin__&&t.call(e,a,s)}},t.prototype.eachOtherLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var s=i[n],a=this._layers[s];a.__builtin__||t.call(e,a,s)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(t){function e(t){a&&(a.__endIndex!==t&&(a.__dirty=!0),a.__endIndex=t)}if(this.eachBuiltinLayer((function(t,e){t.__dirty=t.__used=!1})),this._singleCanvas)for(var i=1;i<t.length;i++){if((r=t[i]).zlevel!==t[i-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var n,s,a=null,o=0;for(s=0;s<t.length;s++){var r,l=(r=t[s]).zlevel,h=void 0;n!==l&&(n=l,o=0),r.incremental?((h=this.getLayer(l+INCREMENTAL_INC,this._needsManuallyCompositing)).incremental=!0,o=1):h=this.getLayer(l+(o>0?EL_AFTER_INCREMENTAL_INC:0),this._needsManuallyCompositing),h.__builtin__||logError("ZLevel "+l+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==s&&(h.__dirty=!0),h.__startIndex=s,h.incremental?h.__drawIndex=-1:h.__drawIndex=s,e(s),a=h),r.__dirty&REDRAW_BIT&&!r.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=s))}e(s),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,each$4(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?merge(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var s=this._zlevelList[n];if(s===t||s===t+EL_AFTER_INCREMENTAL_INC)merge(this._layers[s],i[t],!0)}}},t.prototype.delLayer=function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(indexOf(i,t),1))},t.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,s=this.root;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=getSize(s,0,n),e=getSize(s,1,n),i.style.display="",this._width!==t||e!==this._height){for(var a in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(CANVAS_ZLEVEL).resize(t,e)}return this},t.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[CANVAS_ZLEVEL].dom;var e=new Layer$3("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,s=e.dom.height;this.eachLayer((function(t){t.__builtin__?i.drawImage(t.dom,0,0,n,s):t.renderToCanvas&&(i.save(),t.renderToCanvas(i),i.restore())}))}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},o=this.storage.getDisplayList(!0),r=0,l=o.length;r<l;r++){var h=o[r];brush(i,h,a,r===l-1)}return e.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}(),CanvasPainter$1=CanvasPainter;function install$7(t){t.registerPainter("canvas",CanvasPainter$1)}var SausageShape=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},SausagePath=function(t){function e(e){var i=t.call(this,e)||this;return i.type="sausage",i}return __extends(e,t),e.prototype.getDefaultShape=function(){return new SausageShape},e.prototype.buildPath=function(t,e){var i=e.cx,n=e.cy,s=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=.5*(a-s),r=s+o,l=e.startAngle,h=e.endAngle,c=e.clockwise,u=2*Math.PI,d=c?h-l<u:l-h<u;d||(l=h-(c?u:-u));var p=Math.cos(l),g=Math.sin(l),f=Math.cos(h),m=Math.sin(h);d?(t.moveTo(p*s+i,g*s+n),t.arc(p*r+i,g*r+n,o,-Math.PI+l,l,!c)):t.moveTo(p*a+i,g*a+n),t.arc(i,n,a,l,h,!c),t.arc(f*r+i,m*r+n,o,h-2*Math.PI,h-Math.PI,!c),0!==s&&t.arc(i,n,s,h,l,c)},e}(Path$2),Sausage=SausagePath;function createSeriesDataSimply(t,e,i){e=isArray(e)&&{coordDimensions:e}||extend({encodeDefine:t.getEncode()},e);var n=t.getSource(),s=prepareSeriesDataSchema(n,e).dimensions,a=new SeriesData$1(s,t);return a.initData(n,i),a}function layout$1(t,e,i){i=i||{};var n=t.coordinateSystem,s=e.axis,a={},o=s.getAxesOnZeroOf()[0],r=s.position,l=o?"onZero":r,h=s.dim,c=n.getRect(),u=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,g="x"===h?[u[2]-p,u[3]+p]:[u[0]-p,u[1]+p];if(o){var f=o.toGlobalCoord(o.dataToCoord(0));g[d.onZero]=Math.max(Math.min(f,g[1]),g[0])}a.position=["y"===h?g[d[l]]:u[0],"x"===h?g[d[l]]:u[3]],a.rotation=Math.PI/2*("x"===h?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[r],a.labelOffset=o?g[d[r]]-g[d.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),retrieve(i.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===l?-m:m,a.z2=1,a}function isCartesian2DSeries(t){return"cartesian2d"===t.get("coordinateSystem")}function findAxisModels(t){var e={xAxisModel:null,yAxisModel:null};return each$4(e,(function(i,n){var s=n.replace(/Model$/,""),a=t.getReferringComponents(s,SINGLE_REFERRING).models[0];e[n]=a})),e}var PI=Math.PI,AxisBuilder=function(){function t(t,e){this.group=new Group$4,this.opt=e,this.axisModel=t,defaults(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new Group$4({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return t.prototype.hasBuilder=function(t){return!!builders[t]},t.prototype.add=function(t){builders[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,i){var n,s,a=remRadian(e-t);return isRadianAroundZero(a)?(s=i>0?"top":"bottom",n="center"):isRadianAroundZero(a-PI)?(s=i>0?"bottom":"top",n="center"):(s="middle",n=a>0&&a<PI?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:s}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),builders={axisLine:function(t,e,i,n){var s=e.get(["axisLine","show"]);if("auto"===s&&t.handleAutoShown&&(s=t.handleAutoShown("axisLine")),s){var a=e.axis.getExtent(),o=n.transform,r=[a[0],0],l=[a[1],0],h=r[0]>l[0];o&&(applyTransform$1(r,r,o),applyTransform$1(l,l,o));var c=extend({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),u=new Line$3({shape:{x1:r[0],y1:r[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});subPixelOptimizeLine(u.shape,u.style.lineWidth),u.anid="line",i.add(u);var d=e.get(["axisLine","symbol"]);if(null!=d){var p=e.get(["axisLine","symbolSize"]);isString(d)&&(d=[d,d]),(isString(p)||isNumber$1(p))&&(p=[p,p]);var g=normalizeSymbolOffset(e.get(["axisLine","symbolOffset"])||0,p),f=p[0],m=p[1];each$4([{rotate:t.rotation+Math.PI/2,offset:g[0],r:0},{rotate:t.rotation-Math.PI/2,offset:g[1],r:Math.sqrt((r[0]-l[0])*(r[0]-l[0])+(r[1]-l[1])*(r[1]-l[1]))}],(function(e,n){if("none"!==d[n]&&null!=d[n]){var s=createSymbol(d[n],-f/2,-m/2,f,m,c.stroke,!0),a=e.r+e.offset,o=h?l:r;s.attr({rotation:e.rotate,x:o[0]+a*Math.cos(t.rotation),y:o[1]-a*Math.sin(t.rotation),silent:!0,z2:11}),i.add(s)}}))}}},axisTickLabel:function(t,e,i,n){var s=buildAxisMajorTicks(i,n,e,t),a=buildAxisLabel(i,n,e,t);(fixMinMaxLabelShow(e,a,s),buildAxisMinorTicks(i,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"]))&&hideOverlap(prepareLayoutList(map$1(a,(function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}}))))},axisName:function(t,e,i,n){var s=retrieve(t.axisName,e.get("name"));if(s){var a,o,r=e.get("nameLocation"),l=t.nameDirection,h=e.getModel("nameTextStyle"),c=e.get("nameGap")||0,u=e.axis.getExtent(),d=u[0]>u[1]?-1:1,p=["start"===r?u[0]-d*c:"end"===r?u[1]+d*c:(u[0]+u[1])/2,isNameLocationCenter(r)?t.labelOffset+l*c:0],g=e.get("nameRotate");null!=g&&(g=g*PI/180),isNameLocationCenter(r)?a=AxisBuilder.innerTextLayout(t.rotation,null!=g?g:t.rotation,l):(a=endTextLayout(t.rotation,r,g||0,u),null!=(o=t.axisNameAvailableWidth)&&(o=Math.abs(o/Math.sin(a.rotation)),!isFinite(o)&&(o=null)));var f=h.getFont(),m=e.get("nameTruncate",!0)||{},v=m.ellipsis,b=retrieve(t.nameTruncateMaxWidth,m.maxWidth,o),y=new ZRText$1({x:p[0],y:p[1],rotation:a.rotation,silent:AxisBuilder.isLabelSilent(e),style:createTextStyle(h,{text:s,font:f,overflow:"truncate",width:b,ellipsis:v,fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:h.get("align")||a.textAlign,verticalAlign:h.get("verticalAlign")||a.textVerticalAlign}),z2:1});if(setTooltipConfig({el:y,componentModel:e,itemName:s}),y.__fullText=s,y.anid="name",e.get("triggerEvent")){var S=AxisBuilder.makeAxisEventDataBase(e);S.targetType="axisName",S.name=s,getECData(y).eventData=S}n.add(y),y.updateTransform(),i.add(y),y.decomposeTransform()}}};function endTextLayout(t,e,i,n){var s,a,o=remRadian(i-t),r=n[0]>n[1],l="start"===e&&!r||"start"!==e&&r;return isRadianAroundZero(o-PI/2)?(a=l?"bottom":"top",s="center"):isRadianAroundZero(o-1.5*PI)?(a=l?"top":"bottom",s="center"):(a="middle",s=o<1.5*PI&&o>PI/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:s,textVerticalAlign:a}}function fixMinMaxLabelShow(t,e,i){if(!shouldShowAllLabels(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),s=t.get(["axisLabel","showMaxLabel"]);i=i||[];var a=(e=e||[])[0],o=e[1],r=e[e.length-1],l=e[e.length-2],h=i[0],c=i[1],u=i[i.length-1],d=i[i.length-2];!1===n?(ignoreEl(a),ignoreEl(h)):isTwoLabelOverlapped(a,o)&&(n?(ignoreEl(o),ignoreEl(c)):(ignoreEl(a),ignoreEl(h))),!1===s?(ignoreEl(r),ignoreEl(u)):isTwoLabelOverlapped(l,r)&&(s?(ignoreEl(l),ignoreEl(d)):(ignoreEl(r),ignoreEl(u)))}}function ignoreEl(t){t&&(t.ignore=!0)}function isTwoLabelOverlapped(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var s=identity([]);return rotate(s,s,-t.rotation),i.applyTransform(mul([],s,t.getLocalTransform())),n.applyTransform(mul([],s,e.getLocalTransform())),i.intersect(n)}}function isNameLocationCenter(t){return"middle"===t||"center"===t}function createTicks(t,e,i,n,s){for(var a=[],o=[],r=[],l=0;l<t.length;l++){var h=t[l].coord;o[0]=h,o[1]=0,r[0]=h,r[1]=i,e&&(applyTransform$1(o,o,e),applyTransform$1(r,r,e));var c=new Line$3({shape:{x1:o[0],y1:o[1],x2:r[0],y2:r[1]},style:n,z2:2,autoBatch:!0,silent:!0});subPixelOptimizeLine(c.shape,c.style.lineWidth),c.anid=s+"_"+t[l].tickValue,a.push(c)}return a}function buildAxisMajorTicks(t,e,i,n){var s=i.axis,a=i.getModel("axisTick"),o=a.get("show");if("auto"===o&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),o&&!s.scale.isBlank()){for(var r=a.getModel("lineStyle"),l=n.tickDirection*a.get("length"),h=createTicks(s.getTicksCoords(),e.transform,l,defaults(r.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<h.length;c++)t.add(h[c]);return h}}function buildAxisMinorTicks(t,e,i,n){var s=i.axis,a=i.getModel("minorTick");if(a.get("show")&&!s.scale.isBlank()){var o=s.getMinorTicksCoords();if(o.length)for(var r=a.getModel("lineStyle"),l=n*a.get("length"),h=defaults(r.getLineStyle(),defaults(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var u=createTicks(o[c],e.transform,l,h,"minorticks_"+c),d=0;d<u.length;d++)t.add(u[d])}}function buildAxisLabel(t,e,i,n){var s=i.axis;if(retrieve(n.axisLabelShow,i.get(["axisLabel","show"]))&&!s.scale.isBlank()){var a=i.getModel("axisLabel"),o=a.get("margin"),r=s.getViewLabels(),l=(retrieve(n.labelRotate,a.get("rotate"))||0)*PI/180,h=AxisBuilder.innerTextLayout(n.rotation,l,n.labelDirection),c=i.getCategories&&i.getCategories(!0),u=[],d=AxisBuilder.isLabelSilent(i),p=i.get("triggerEvent");return each$4(r,(function(l,g){var f="ordinal"===s.scale.type?s.scale.getRawOrdinalNumber(l.tickValue):l.tickValue,m=l.formattedLabel,v=l.rawLabel,b=a;if(c&&c[f]){var y=c[f];isObject$2(y)&&y.textStyle&&(b=new Model$1(y.textStyle,a,i.ecModel))}var S=b.getTextColor()||i.get(["axisLine","lineStyle","color"]),x=s.dataToCoord(f),w=b.getShallow("align",!0)||h.textAlign,C=retrieve2(b.getShallow("alignMinLabel",!0),w),T=retrieve2(b.getShallow("alignMaxLabel",!0),w),D=b.getShallow("verticalAlign",!0)||b.getShallow("baseline",!0)||h.textVerticalAlign,k=retrieve2(b.getShallow("verticalAlignMinLabel",!0),D),$=retrieve2(b.getShallow("verticalAlignMaxLabel",!0),D),O=new ZRText$1({x:x,y:n.labelOffset+n.labelDirection*o,rotation:h.rotation,silent:d,z2:10+(l.level||0),style:createTextStyle(b,{text:m,align:0===g?C:g===r.length-1?T:w,verticalAlign:0===g?k:g===r.length-1?$:D,fill:isFunction(S)?S("category"===s.type?v:"value"===s.type?f+"":f,g):S})});if(O.anid="label_"+f,setTooltipConfig({el:O,componentModel:i,itemName:m,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:v,tickIndex:g}}),p){var P=AxisBuilder.makeAxisEventDataBase(i);P.targetType="axisLabel",P.value=v,P.tickIndex=g,"category"===s.type&&(P.dataIndex=f),getECData(O).eventData=P}e.add(O),O.updateTransform(),u.push(O),t.add(O),O.decomposeTransform()})),u}}var AxisBuilder$1=AxisBuilder;function collect(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return collectAxesInfo(i,t,e),i.seriesInvolved&&collectSeriesInfo(i,t),i}function collectAxesInfo(t,e,i){var n=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),a=s.get("link",!0)||[],o=[];each$4(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var r=makeKey(i.model),l=t.coordSysAxesInfo[r]={};t.coordSysMap[r]=i;var h=i.model.getModel("tooltip",n);if(each$4(i.getAxes(),curry$1(p,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var c="axis"===h.get("trigger"),u="cross"===h.get(["axisPointer","type"]),d=i.getTooltipAxes(h.get(["axisPointer","axis"]));(c||u)&&each$4(d.baseAxes,curry$1(p,!u||"cross",c)),u&&each$4(d.otherAxes,curry$1(p,"cross",!1))}}function p(n,r,c){var u=c.model.getModel("axisPointer",s),d=u.get("show");if(d&&("auto"!==d||n||isHandleTrigger(u))){null==r&&(r=u.get("triggerTooltip"));var p=(u=n?makeAxisPointerModel(c,h,s,e,n,r):u).get("snap"),g=u.get("triggerEmphasis"),f=makeKey(c.model),m=r||p||"category"===c.type,v=t.axesInfo[f]={key:f,axis:c,coordSys:i,axisPointerModel:u,triggerTooltip:r,triggerEmphasis:g,involveSeries:m,snap:p,useHandle:isHandleTrigger(u),seriesModels:[],linkGroup:null};l[f]=v,t.seriesInvolved=t.seriesInvolved||m;var b=getLinkGroupIndex(a,c);if(null!=b){var y=o[b]||(o[b]={axesInfo:{}});y.axesInfo[f]=v,y.mapper=a[b].mapper,v.linkGroup=y}}}}))}function makeAxisPointerModel(t,e,i,n,s,a){var o=e.getModel("axisPointer"),r={};each$4(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){r[t]=clone$3(o.get(t))})),r.snap="category"!==t.type&&!!a,"cross"===o.get("type")&&(r.type="line");var l=r.label||(r.label={});if(null==l.show&&(l.show=!1),"cross"===s){var h=o.get(["label","show"]);if(l.show=null==h||h,!a){var c=r.lineStyle=o.get("crossStyle");c&&defaults(l,c.textStyle)}}return t.model.getModel("axisPointer",new Model$1(r,i,n))}function collectSeriesInfo(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),s=e.get(["tooltip","show"],!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==s&&!1!==e.get(["axisPointer","show"],!0)&&each$4(t.coordSysAxesInfo[makeKey(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}))}function getLinkGroupIndex(t,e){for(var i=e.model,n=e.dim,s=0;s<t.length;s++){var a=t[s]||{};if(checkPropInLink(a[n+"AxisId"],i.id)||checkPropInLink(a[n+"AxisIndex"],i.componentIndex)||checkPropInLink(a[n+"AxisName"],i.name))return s}}function checkPropInLink(t,e){return"all"===t||isArray(t)&&indexOf(t,e)>=0||t===e}function fixValue(t){var e=getAxisInfo(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,s=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var r=isHandleTrigger(i);null==a&&(s.status=r?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),s.value=o,r&&(s.status=e.axis.scale.isBlank()?"hide":"show")}}function getAxisInfo(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[makeKey(t)]}function getAxisPointerModel(t){var e=getAxisInfo(t);return e&&e.axisPointerModel}function isHandleTrigger(t){return!!t.get(["handle","show"])}function makeKey(t){return t.type+"||"+t.id}var axisPointerClazz={},AxisView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.prototype.render=function(e,i,n,s){this.axisPointerClass&&fixValue(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},e.prototype.updateAxisPointer=function(t,e,i,n){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,e){var i=this._axisPointer;i&&i.remove(e)},e.prototype.dispose=function(e,i){this._disposeAxisPointer(i),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,i,n){var s=e.getAxisPointerClass(this.axisPointerClass);if(s){var a=getAxisPointerModel(t);a?(this._axisPointer||(this._axisPointer=new s)).render(t,a,i,n):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){axisPointerClazz[t]=e},e.getAxisPointerClass=function(t){return t&&axisPointerClazz[t]},e.type="axis",e}(ComponentView$1),AxisView$1=AxisView,PointerShape=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},PointerPath=function(t){function e(e){var i=t.call(this,e)||this;return i.type="pointer",i}return __extends(e,t),e.prototype.getDefaultShape=function(){return new PointerShape},e.prototype.buildPath=function(t,e){var i=Math.cos,n=Math.sin,s=e.r,a=e.width,o=e.angle,r=e.x-i(o)*a*(a>=s/3?1:2),l=e.y-n(o)*a*(a>=s/3?1:2);o=e.angle-Math.PI/2,t.moveTo(r,l),t.lineTo(e.x+i(o)*a,e.y+n(o)*a),t.lineTo(e.x+i(e.angle)*s,e.y+n(e.angle)*s),t.lineTo(e.x-i(o)*a,e.y-n(o)*a),t.lineTo(r,l)},e}(Path$2),PointerPath$1=PointerPath;function parsePosition(t,e){var i=t.get("center"),n=e.getWidth(),s=e.getHeight(),a=Math.min(n,s);return{cx:parsePercent(i[0],e.getWidth()),cy:parsePercent(i[1],e.getHeight()),r:parsePercent(t.get("radius"),a/2)}}function formatLabel(t,e){var i=null==t?"":t+"";return e&&(isString(e)?i=e.replace("{value}",i):isFunction(e)&&(i=e(t))),i}var GaugeView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.prototype.render=function(t,e,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),s=parsePosition(t,i);this._renderMain(t,e,i,n,s),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,i,n,s){var a=this.group,o=t.get("clockwise"),r=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),c=h.get("roundCap")?Sausage:Sector$1,u=h.get("show"),d=h.getModel("lineStyle"),p=d.get("width"),g=[r,l];normalizeArcAngles(g,!o);for(var f=(l=g[1])-(r=g[0]),m=r,v=[],b=0;u&&b<n.length;b++){var y=new c({shape:{startAngle:m,endAngle:l=r+f*Math.min(Math.max(n[b][0],0),1),cx:s.cx,cy:s.cy,clockwise:o,r0:s.r-p,r:s.r},silent:!0});y.setStyle({fill:n[b][1]}),y.setStyle(d.getLineStyle(["color","width"])),v.push(y),m=l}v.reverse(),each$4(v,(function(t){return a.add(t)}));var S=function(t){if(t<=0)return n[0][1];var e;for(e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};this._renderTicks(t,e,i,S,s,r,l,o,p),this._renderTitleAndDetail(t,e,i,S,s),this._renderAnchor(t,s),this._renderPointer(t,e,i,S,s,r,l,o,p)},e.prototype._renderTicks=function(t,e,i,n,s,a,o,r,l){for(var h,c,u=this.group,d=s.cx,p=s.cy,g=s.r,f=+t.get("min"),m=+t.get("max"),v=t.getModel("splitLine"),b=t.getModel("axisTick"),y=t.getModel("axisLabel"),S=t.get("splitNumber"),x=b.get("splitNumber"),w=parsePercent(v.get("length"),g),C=parsePercent(b.get("length"),g),T=a,D=(o-a)/S,k=D/x,$=v.getModel("lineStyle").getLineStyle(),O=b.getModel("lineStyle").getLineStyle(),P=v.get("distance"),L=0;L<=S;L++){if(h=Math.cos(T),c=Math.sin(T),v.get("show")){var I=new Line$3({shape:{x1:h*(g-(A=P?P+l:l))+d,y1:c*(g-A)+p,x2:h*(g-w-A)+d,y2:c*(g-w-A)+p},style:$,silent:!0});"auto"===$.stroke&&I.setStyle({stroke:n(L/S)}),u.add(I)}if(y.get("show")){var A=y.get("distance")+P,E=formatLabel(round$1(L/S*(m-f)+f),y.get("formatter")),G=n(L/S),U=h*(g-w-A)+d,F=c*(g-w-A)+p,M=y.get("rotate"),_=0;"radial"===M?(_=-T+2*Math.PI)>Math.PI/2&&(_+=Math.PI):"tangential"===M?_=-T-Math.PI/2:isNumber$1(M)&&(_=M*Math.PI/180),0===_?u.add(new ZRText$1({style:createTextStyle(y,{text:E,x:U,y:F,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:h<-.4?"left":h>.4?"right":"center"},{inheritColor:G}),silent:!0})):u.add(new ZRText$1({style:createTextStyle(y,{text:E,x:U,y:F,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:U,originY:F,rotation:_}))}if(b.get("show")&&L!==S){A=(A=b.get("distance"))?A+l:l;for(var N=0;N<=x;N++){h=Math.cos(T),c=Math.sin(T);var R=new Line$3({shape:{x1:h*(g-A)+d,y1:c*(g-A)+p,x2:h*(g-C-A)+d,y2:c*(g-C-A)+p},silent:!0,style:O});"auto"===O.stroke&&R.setStyle({stroke:n((L+N/x)/S)}),u.add(R),T+=k}T-=k}else T+=D}},e.prototype._renderPointer=function(t,e,i,n,s,a,o,r,l){var h=this.group,c=this._data,u=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),f=g.get("show"),m=t.getData(),v=m.mapDimension("value"),b=+t.get("min"),y=+t.get("max"),S=[b,y],x=[a,o];function w(e,i){var n,a=m.getItemModel(e).getModel("pointer"),o=parsePercent(a.get("width"),s.r),r=parsePercent(a.get("length"),s.r),l=t.get(["pointer","icon"]),h=a.get("offsetCenter"),c=parsePercent(h[0],s.r),u=parsePercent(h[1],s.r),d=a.get("keepAspect");return(n=l?createSymbol(l,c-o/2,u-r,o,r,null,d):new PointerPath$1({shape:{angle:-Math.PI/2,width:o,r:r,x:c,y:u}})).rotation=-(i+Math.PI/2),n.x=s.cx,n.y=s.cy,n}function C(t,e){var i=g.get("roundCap")?Sausage:Sector$1,n=g.get("overlap"),o=n?g.get("width"):l/m.count(),h=n?s.r-o:s.r-(t+1)*o,c=n?s.r:s.r-t*o,u=new i({shape:{startAngle:a,endAngle:e,cx:s.cx,cy:s.cy,clockwise:r,r0:h,r:c}});return n&&(u.z2=linearMap(m.get(v,t),[b,y],[100,0],!0)),u}(f||p)&&(m.diff(c).add((function(e){var i=m.get(v,e);if(p){var n=w(e,a);initProps(n,{rotation:-((isNaN(+i)?x[0]:linearMap(i,S,x,!0))+Math.PI/2)},t),h.add(n),m.setItemGraphicEl(e,n)}if(f){var s=C(e,a),o=g.get("clip");initProps(s,{shape:{endAngle:linearMap(i,S,x,o)}},t),h.add(s),setCommonECData(t.seriesIndex,m.dataType,e,s),d[e]=s}})).update((function(e,i){var n=m.get(v,e);if(p){var s=c.getItemGraphicEl(i),o=s?s.rotation:a,r=w(e,o);r.rotation=o,updateProps$1(r,{rotation:-((isNaN(+n)?x[0]:linearMap(n,S,x,!0))+Math.PI/2)},t),h.add(r),m.setItemGraphicEl(e,r)}if(f){var l=u[i],b=C(e,l?l.shape.endAngle:a),y=g.get("clip");updateProps$1(b,{shape:{endAngle:linearMap(n,S,x,y)}},t),h.add(b),setCommonECData(t.seriesIndex,m.dataType,e,b),d[e]=b}})).execute(),m.each((function(t){var e=m.getItemModel(t),i=e.getModel("emphasis"),s=i.get("focus"),a=i.get("blurScope"),o=i.get("disabled");if(p){var r=m.getItemGraphicEl(t),l=m.getItemVisual(t,"style"),h=l.fill;if(r instanceof ZRImage$1){var c=r.style;r.useStyle(extend({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else r.useStyle(l),"pointer"!==r.type&&r.setColor(h);r.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===r.style.fill&&r.setStyle("fill",n(linearMap(m.get(v,t),S,[0,1],!0))),r.z2EmphasisLift=0,setStatesStylesFromModel(r,e),toggleHoverEmphasis(r,s,a,o)}if(f){var u=d[t];u.useStyle(m.getItemVisual(t,"style")),u.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),u.z2EmphasisLift=0,setStatesStylesFromModel(u,e),toggleHoverEmphasis(u,s,a,o)}})),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var i=t.getModel("anchor");if(i.get("show")){var n=i.get("size"),s=i.get("icon"),a=i.get("offsetCenter"),o=i.get("keepAspect"),r=createSymbol(s,e.cx-n/2+parsePercent(a[0],e.r),e.cy-n/2+parsePercent(a[1],e.r),n,n,null,o);r.z2=i.get("showAbove")?1:0,r.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(r)}},e.prototype._renderTitleAndDetail=function(t,e,i,n,s){var a=this,o=t.getData(),r=o.mapDimension("value"),l=+t.get("min"),h=+t.get("max"),c=new Group$4,u=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);o.diff(this._data).add((function(t){u[t]=new ZRText$1({silent:!0}),d[t]=new ZRText$1({silent:!0})})).update((function(t,e){u[t]=a._titleEls[e],d[t]=a._detailEls[e]})).execute(),o.each((function(e){var i=o.getItemModel(e),a=o.get(r,e),f=new Group$4,m=n(linearMap(a,[l,h],[0,1],!0)),v=i.getModel("title");if(v.get("show")){var b=v.get("offsetCenter"),y=s.cx+parsePercent(b[0],s.r),S=s.cy+parsePercent(b[1],s.r);(O=u[e]).attr({z2:g?0:2,style:createTextStyle(v,{x:y,y:S,text:o.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:m})}),f.add(O)}var x=i.getModel("detail");if(x.get("show")){var w=x.get("offsetCenter"),C=s.cx+parsePercent(w[0],s.r),T=s.cy+parsePercent(w[1],s.r),D=parsePercent(x.get("width"),s.r),k=parsePercent(x.get("height"),s.r),$=t.get(["progress","show"])?o.getItemVisual(e,"style").fill:m,O=d[e],P=x.get("formatter");O.attr({z2:g?0:2,style:createTextStyle(x,{x:C,y:T,text:formatLabel(a,P),width:isNaN(D)?null:D,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:$})}),setLabelValueAnimation(O,{normal:x},a,(function(t){return formatLabel(t,P)})),p&&animateLabelValue(O,e,o,t,{getFormattedLabel:function(t,e,i,n,s,o){return formatLabel(o?o.interpolatedValue:a,P)}}),f.add(O)}c.add(f)})),this.group.add(c),this._titleEls=u,this._detailEls=d},e.type="gauge",e}(ChartView$1),GaugeView$1=GaugeView,GaugeSeriesModel=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="itemStyle",i}return __extends(e,t),e.prototype.getInitialData=function(t,e){return createSeriesDataSimply(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(SeriesModel$1),GaugeSeriesModel$1=GaugeSeriesModel;function install$6(t){t.registerChartView(GaugeView$1),t.registerSeriesModel(GaugeSeriesModel$1)}var inner$2=makeInner(),clone=clone$3,bind=bind$1,BaseAxisPointer=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,i,n){var s=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==s||this._lastStatus!==a){this._lastValue=s,this._lastStatus=a;var o=this._group,r=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(r&&r.hide());o&&o.show(),r&&r.show();var l={};this.makeElOption(l,s,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(t,e);if(o){var u=curry$1(updateProps,e,c);this.updatePointerEl(o,l,u),this.updateLabelEl(o,l,u,e)}else o=this._group=new Group$4,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);updateMandatoryProps(o,e,!0),this._renderHandle(s)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,s="category"===n.type,a=e.get("snap");if(!a&&!s)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(s&&n.getBandWidth()>o)return!0;if(a){var r=getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/r>o}return!1}return!0===i},t.prototype.makeElOption=function(t,e,i,n,s){},t.prototype.createPointerEl=function(t,e,i,n){var s=e.pointer;if(s){var a=inner$2(t).pointerEl=new graphic[s.type](clone(e.pointer));t.add(a)}},t.prototype.createLabelEl=function(t,e,i,n){if(e.label){var s=inner$2(t).labelEl=new ZRText$1(clone(e.label));t.add(s),updateLabelShowHide(s,n)}},t.prototype.updatePointerEl=function(t,e,i){var n=inner$2(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,i,n){var s=inner$2(t).labelEl;s&&(s.setStyle(e.label.style),i(s,{x:e.label.x,y:e.label.y}),updateLabelShowHide(s,n))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),s=this._handle,a=i.getModel("handle"),o=i.get("status");if(!a.get("show")||!o||"hide"===o)return s&&n.remove(s),void(this._handle=null);this._handle||(e=!0,s=this._handle=createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){stop(t.event)},onmousedown:bind(this._onHandleDragMove,this,0,0),drift:bind(this._onHandleDragMove,this),ondragend:bind(this._onHandleDragEnd,this)}),n.add(s)),updateMandatoryProps(s,i,!1),s.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var r=a.get("size");isArray(r)||(r=[r,r]),s.scaleX=r[0]/2,s.scaleY=r[1]/2,createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){updateProps(this._axisPointerModel,!e&&this._moveAnimation,this._handle,getHandleTransProps(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(getHandleTransProps(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(getHandleTransProps(n)),inner$2(i).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),clear(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},t}();function updateProps(t,e,i,n){propsEqual(inner$2(i).lastProp,n)||(inner$2(i).lastProp=n,e?updateProps$1(i,n,t):(i.stopAnimation(),i.attr(n)))}function propsEqual(t,e){if(isObject$2(t)&&isObject$2(e)){var i=!0;return each$4(e,(function(e,n){i=i&&propsEqual(t[n],e)})),!!i}return t===e}function updateLabelShowHide(t,e){t[e.get(["label","show"])?"show":"hide"]()}function getHandleTransProps(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function updateMandatoryProps(t,e,i){var n=e.get("z"),s=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=s&&(t.zlevel=s),t.silent=i)}))}var BaseAxisPointer$1=BaseAxisPointer;function buildElStyle(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function buildLabelElOption(t,e,i,n,s){var a=getValueLabel(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),o=i.getModel("label"),r=normalizeCssArray(o.get("padding")||0),l=o.getFont(),h=getBoundingRect(a,l),c=s.position,u=h.width+r[1]+r[3],d=h.height+r[0]+r[2],p=s.align;"right"===p&&(c[0]-=u),"center"===p&&(c[0]-=u/2);var g=s.verticalAlign;"bottom"===g&&(c[1]-=d),"middle"===g&&(c[1]-=d/2),confineInContainer(c,u,d,n);var f=o.get("backgroundColor");f&&"auto"!==f||(f=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:createTextStyle(o,{text:a,font:l,fill:o.getTextColor(),padding:r,backgroundColor:f}),z2:10}}function confineInContainer(t,e,i,n){var s=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,s)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function getValueLabel(t,e,i,n,s){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:s.precision}),o=s.formatter;if(o){var r={value:getAxisRawValue(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};each$4(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,s=e&&e.getDataParams(n);s&&r.seriesData.push(s)})),isString(o)?a=o.replace("{value}",a):isFunction(o)&&(a=o(r))}return a}function getTransformedPosition(t,e,i){var n=create();return rotate(n,n,i.rotation),translate(n,n,i.position),applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function buildCartesianSingleLabelElOption(t,e,i,n,s,a){var o=AxisBuilder$1.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=s.get(["label","margin"]),buildLabelElOption(e,n,s,a,{position:getTransformedPosition(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function makeLineShape(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function makeRectShape(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function makeSectorShape(t,e,i,n,s,a){return{cx:t,cy:e,r0:i,r:n,startAngle:s,endAngle:a,clockwise:!0}}var CartesianAxisPointer=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.makeElOption=function(t,e,i,n,s){var a=i.axis,o=a.grid,r=n.get("type"),l=getCartesian(o,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(r&&"none"!==r){var c=buildElStyle(n),u=pointerShapeBuilder[r](a,h,l);u.style=c,t.graphicKey=u.type,t.pointer=u}buildCartesianSingleLabelElOption(e,t,layout$1(o.model,i),i,n,s)},e.prototype.getHandleTransform=function(t,e,i){var n=layout$1(e.axis.grid.model,e,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var s=getTransformedPosition(e.axis,t,n);return{x:s[0],y:s[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,i,n){var s=i.axis,a=s.grid,o=s.getGlobalExtent(!0),r=getCartesian(a,s).getOtherAxis(s).getGlobalExtent(),l="x"===s.dim?0:1,h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(o[1],h[l]),h[l]=Math.max(o[0],h[l]);var c=(r[1]+r[0])/2,u=[c,c];u[l]=h[l];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:u,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(BaseAxisPointer$1);function getCartesian(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var pointerShapeBuilder={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:makeLineShape([e,i[0]],[e,i[1]],getAxisDimIndex(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),s=i[1]-i[0];return{type:"Rect",shape:makeRectShape([e-n/2,i[0]],[n,s],getAxisDimIndex(t))}}};function getAxisDimIndex(t){return"x"===t.dim?0:1}var CartesianAxisPointer$1=CartesianAxisPointer,AxisPointerModel=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(ComponentModel$1),AxisPointerModel$1=AxisPointerModel,inner$1=makeInner(),each$1=each$4;function register(t,e,i){if(!env$1.node){var n=e.getZr();inner$1(n).records||(inner$1(n).records={}),initGlobalListeners(n,e),(inner$1(n).records[t]||(inner$1(n).records[t]={})).handler=i}}function initGlobalListeners(t,e){function i(i,n){t.on(i,(function(i){var s=makeDispatchAction$1(e);each$1(inner$1(t).records,(function(t){t&&n(t,i,s.dispatchAction)})),dispatchTooltipFinally(s.pendings,e)}))}inner$1(t).initialized||(inner$1(t).initialized=!0,i("click",curry$1(doEnter,"click")),i("mousemove",curry$1(doEnter,"mousemove")),i("globalout",onLeave))}function dispatchTooltipFinally(t,e){var i,n=t.showTip.length,s=t.hideTip.length;n?i=t.showTip[n-1]:s&&(i=t.hideTip[s-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function onLeave(t,e,i){t.handler("leave",null,i)}function doEnter(t,e,i,n){e.handler(t,i,n)}function makeDispatchAction$1(t){var e={showTip:[],hideTip:[]},i=function(n){var s=e[n.type];s?s.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function unregister(t,e){if(!env$1.node){var i=e.getZr();(inner$1(i).records||{})[t]&&(inner$1(i).records[t]=null)}}var AxisPointerView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.prototype.render=function(t,e,i){var n=e.getComponent("tooltip"),s=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";register("axisPointer",i,(function(t,e,i){"none"!==s&&("leave"===t||s.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){unregister("axisPointer",e)},e.prototype.dispose=function(t,e){unregister("axisPointer",e)},e.type="axisPointer",e}(ComponentView$1),AxisPointerView$1=AxisPointerView;function findPointFromSeries(t,e){var i,n=[],s=t.seriesIndex;if(null==s||!(i=e.getSeriesByIndex(s)))return{point:[]};var a=i.getData(),o=queryDataIndex(a,t);if(null==o||o<0||isArray(o))return{point:[]};var r=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var h=l.getBaseAxis(),c=l.getOtherAxis(h).dim,u=h.dim,d="x"===c||"radius"===c?1:0,p=a.mapDimension(u),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),n=l.dataToPoint(g)||[]}else n=l.dataToPoint(a.getValues(map$1(l.dimensions,(function(t){return a.mapDimension(t)})),o))||[];else if(r){var f=r.getBoundingRect().clone();f.applyTransform(r.transform),n=[f.x+f.width/2,f.y+f.height/2]}return{point:n,el:r}}var inner=makeInner();function axisTrigger(t,e,i){var n=t.currTrigger,s=[t.x,t.y],a=t,o=t.dispatchAction||bind$1(i.dispatchAction,i),r=e.getComponent("axisPointer").coordSysAxesInfo;if(r){illegalPoint(s)&&(s=findPointFromSeries({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=illegalPoint(s),h=a.axesInfo,c=r.axesInfo,u="leave"===n||illegalPoint(s),d={},p={},g={list:[],map:{}},f={showPointer:curry$1(showPointer,p),showTooltip:curry$1(showTooltip,g)};each$4(r.coordSysMap,(function(t,e){var i=l||t.containPoint(s);each$4(r.coordSysAxesInfo[e],(function(t,e){var n=t.axis,a=findInputAxisInfo(h,t);if(!u&&i&&(!h||a)){var o=a&&a.value;null!=o||l||(o=n.pointToData(s)),null!=o&&processOnAxis(t,o,f,!1,d)}}))}));var m={};return each$4(c,(function(t,e){var i=t.linkGroup;i&&!p[e]&&each$4(i.axesInfo,(function(e,n){var s=p[n];if(e!==t&&s){var a=s.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,makeMapperParam(e),makeMapperParam(t)))),m[t.key]=a}}))})),each$4(m,(function(t,e){processOnAxis(c[e],t,f,!0,d)})),updateModelActually(p,c,d),dispatchTooltipActually(g,s,t,o),dispatchHighDownActually(c,o,i),d}}function processOnAxis(t,e,i,n,s){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var o=buildPayloadsBySeries(e,t),r=o.payloadBatch,l=o.snapToValue;r[0]&&null==s.seriesIndex&&extend(s,r[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,r),i.showTooltip(t,o,l)}else i.showPointer(t,e)}function buildPayloadsBySeries(t,e){var i=e.axis,n=i.dim,s=t,a=[],o=Number.MAX_VALUE,r=-1;return each$4(e.seriesModels,(function(e,l){var h,c,u=e.getData().mapDimensionsAll(n);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(u,t,i);c=d.dataIndices,h=d.nestestValue}else{if(!(c=e.getData().indicesOfNearest(u[0],t,"category"===i.type?.5:null)).length)return;h=e.getData().get(u[0],c[0])}if(null!=h&&isFinite(h)){var p=t-h,g=Math.abs(p);g<=o&&((g<o||p>=0&&r<0)&&(o=g,r=p,s=h,a.length=0),each$4(c,(function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:a,snapToValue:s}}function showPointer(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function showTooltip(t,e,i,n){var s=i.payloadBatch,a=e.axis,o=a.model,r=e.axisPointerModel;if(e.triggerTooltip&&s.length){var l=e.coordSys.model,h=makeKey(l),c=t.map[h];c||(c=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])},seriesDataIndices:s.slice()})}}function updateModelActually(t,e,i){var n=i.axesInfo=[];each$4(e,(function(e,i){var s=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(s.status="show"),s.value=a.value,s.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(s.status="hide"),"show"===s.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:s.value})}))}function dispatchTooltipActually(t,e,i,n){if(!illegalPoint(e)&&t.list.length){var s=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:s.dataIndexInside,dataIndex:s.dataIndex,seriesIndex:s.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function dispatchHighDownActually(t,e,i){var n=i.getZr(),s="axisPointerLastHighlights",a=inner(n)[s]||{},o=inner(n)[s]={};each$4(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&t.triggerEmphasis&&each$4(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var r=[],l=[];each$4(a,(function(t,e){!o[e]&&l.push(t)})),each$4(o,(function(t,e){!a[e]&&r.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:r})}function findInputAxisInfo(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function makeMapperParam(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function illegalPoint(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function install$5(t){AxisView$1.registerAxisPointerClass("CartesianAxisPointer",CartesianAxisPointer$1),t.registerComponentModel(AxisPointerModel$1),t.registerComponentView(AxisPointerView$1),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!isArray(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=collect(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},axisTrigger)}function layout(t,e,i){var n=e.getBoxLayoutParams(),s=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},o=getLayoutRect(n,a,s);box(e.get("orient"),t,e.get("itemGap"),o.width,o.height),positionElement(t,n,a,s)}function makeBackground(t,e){var i=normalizeCssArray(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new Rect$3({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}var TooltipModel=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(ComponentModel$1),TooltipModel$1=TooltipModel;function shouldTooltipConfine(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function testStyle(t){if(env$1.domSupported)for(var e=document.documentElement.style,i=0,n=t.length;i<n;i++)if(t[i]in e)return t[i]}var TRANSFORM_VENDOR=testStyle(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),TRANSITION_VENDOR=testStyle(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function toCSSVendorPrefix(t,e){if(!t)return e;e=toCamelCase(e,!0);var i=t.indexOf(e);return(t=-1===i?e:"-"+t.slice(0,i)+"-"+e).toLowerCase()}function getComputedStyle$2(t,e){var i=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return i?e?i[e]:i:null}var CSS_TRANSITION_VENDOR=toCSSVendorPrefix(TRANSITION_VENDOR,"transition"),CSS_TRANSFORM_VENDOR=toCSSVendorPrefix(TRANSFORM_VENDOR,"transform"),gCssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(env$1.transform3dSupported?"will-change:transform;":"");function mirrorPos(t){return t="left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function assembleArrow(t,e,i){if(!isString(i)||"inside"===i)return"";var n=t.get("backgroundColor"),s=t.get("borderWidth");e=convertToColorString(e);var a,o=mirrorPos(i),r=Math.max(1.5*Math.round(s),6),l="",h=CSS_TRANSFORM_VENDOR+":";indexOf(["left","right"],o)>-1?(l+="top:50%",h+="translateY(-50%) rotate("+(a="left"===o?-225:-45)+"deg)"):(l+="left:50%",h+="translateX(-50%) rotate("+(a="top"===o?225:45)+"deg)");var c=a*Math.PI/180,u=r+s,d=u*Math.abs(Math.cos(c))+u*Math.abs(Math.sin(c)),p=e+" solid "+s+"px;";return'<div style="'+["position:absolute;width:"+r+"px;height:"+r+"px;z-index:-1;",(l+=";"+o+":-"+Math.round(100*((d-Math.SQRT2*s)/2+Math.SQRT2*s-(d-u)/2))/100+"px")+";"+h+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"].join("")+'"></div>'}function assembleTransition(t,e){var i="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+i,s="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+i,s+=env$1.transformSupported?","+CSS_TRANSFORM_VENDOR+n:",left"+n+",top"+n),CSS_TRANSITION_VENDOR+":"+s}function assembleTransform(t,e,i){var n=t.toFixed(0)+"px",s=e.toFixed(0)+"px";if(!env$1.transformSupported)return i?"top:"+s+";left:"+n+";":[["top",s],["left",n]];var a=env$1.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+s+(a?",0":"")+")";return i?"top:0;left:0;"+CSS_TRANSFORM_VENDOR+":"+o+";":[["top",0],["left",0],[TRANSFORM_VENDOR,o]]}function assembleFont(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var s=retrieve2(t.get("lineHeight"),Math.round(3*i/2));i&&e.push("line-height:"+s+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,r=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+r+"px "+l+"px "+o+"px "+a),each$4(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}function assembleCssText(t,e,i){var n=[],s=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),r=t.get("shadowColor"),l=t.get("shadowOffsetX"),h=t.get("shadowOffsetY"),c=t.getModel("textStyle"),u=getPaddingFromTooltipModel(t,"html"),d=l+"px "+h+"px "+o+"px "+r;return n.push("box-shadow:"+d),e&&s&&n.push(assembleTransition(s,i)),a&&n.push("background-color:"+a),each$4(["width","color","radius"],(function(e){var i="border-"+e,s=toCamelCase(i),a=t.get(s);null!=a&&n.push(i+":"+a+("color"===e?"":"px"))})),n.push(assembleFont(c)),null!=u&&n.push("padding:"+normalizeCssArray(u).join("px ")+"px"),n.join(";")+";"}function makeStyleCoord$1(t,e,i,n,s){var a=e&&e.painter;if(i){var o=a&&a.getViewportRoot();o&&transformLocalCoord(t,o,i,n,s)}else{t[0]=n,t[1]=s;var r=a&&a.getViewportRootOffset();r&&(t[0]+=r.offsetLeft,t[1]+=r.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var TooltipHTMLContent=function(){function t(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,env$1.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),s=e.appendTo,a=s&&(isString(s)?document.querySelector(s):isDom(s)?s:isFunction(s)&&s(t.getDom()));makeStyleCoord$1(this._styleCoord,n,a,t.getWidth()/2,t.getHeight()/2),(a||t.getDom()).appendChild(i),this._api=t,this._container=a;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!o._enterable){var e=n.handler;normalizeEvent(n.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return t.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=getComputedStyle$2(e,"position"),n=e.style;"absolute"!==n.position&&"absolute"!==i&&(n.position="relative")}var s=t.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,s=this._styleCoord;i.innerHTML?n.cssText=gCssText+assembleCssText(t,!this._firstShow,this._longHide)+assembleTransform(s[0],s[1],!0)+"border-color:"+convertToColorString(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,i,n,s){var a=this.el;if(null!=t){var o="";if(isString(s)&&"item"===i.get("trigger")&&!shouldTooltipConfine(i)&&(o=assembleArrow(i,n,s)),isString(t))a.innerHTML=t+o;else if(t){a.innerHTML="",isArray(t)||(t=[t]);for(var r=0;r<t.length;r++)isDom(t[r])&&t[r].parentNode!==a&&a.appendChild(t[r]);if(o&&a.childNodes.length){var l=document.createElement("div");l.innerHTML=o,a.appendChild(l)}}}else a.innerHTML=""},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},t.prototype.moveTo=function(t,e){if(this.el){var i=this._styleCoord;if(makeStyleCoord$1(i,this._zr,this._container,t,e),null!=i[0]&&null!=i[1]){var n=this.el.style;each$4(assembleTransform(i[0],i[1]),(function(t){n[t[0]]=t[1]}))}}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",env$1.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},t}(),TooltipHTMLContent$1=TooltipHTMLContent,TooltipRichContent=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),makeStyleCoord(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,e,i,n,s){var a=this;isObject$2(t)&&throwError(""),this.el&&this._zr.remove(this.el);var o=i.getModel("textStyle");this.el=new ZRText$1({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:o.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:getPaddingFromTooltipModel(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),each$4(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(t){a.el.style[t]=i.get(t)})),each$4(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(t){a.el.style[t]=o.get(t)||0})),this._zr.add(this.el);var r=this;this.el.on("mouseover",(function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0})),this.el.on("mouseout",(function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=calcShadowOuterSize(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},t.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;makeStyleCoord(n,this._zr,t,e),t=n[0],e=n[1];var s=i.style,a=mathMaxWith0(s.borderWidth||0),o=calcShadowOuterSize(s);i.x=t+a+o.left,i.y=e+a+o.top,i.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function mathMaxWith0(t){return Math.max(0,t)}function calcShadowOuterSize(t){var e=mathMaxWith0(t.shadowBlur||0),i=mathMaxWith0(t.shadowOffsetX||0),n=mathMaxWith0(t.shadowOffsetY||0);return{left:mathMaxWith0(e-i),right:mathMaxWith0(e+i),top:mathMaxWith0(e-n),bottom:mathMaxWith0(e+n)}}function makeStyleCoord(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var TooltipRichContent$1=TooltipRichContent,proxyRect=new Rect$3({shape:{x:-1,y:-1,width:2,height:2}}),TooltipView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.prototype.init=function(t,e){if(!env$1.node&&e.getDom()){var i=t.getComponent("tooltip"),n=this._renderMode=getTooltipRenderMode(i.get("renderMode"));this._tooltipContent="richText"===n?new TooltipRichContent$1(e):new TooltipHTMLContent$1(e,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,e,i){if(!env$1.node&&i.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i;var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?createOrUpdate(this,"_updatePosition",50,"fixRate"):clear(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");register("itemTooltip",this._api,bind$1((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,i=this._api,n=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==n&&"click"!==n){var s=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&s.manuallyShowTip(t,e,i,{x:s._lastX,y:s._lastY,dataByCoordSys:s._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,i,n){if(n.from!==this.uid&&!env$1.node&&i.getDom()){var s=makeDispatchAction(n,i);this._ticket="";var a=n.dataByCoordSys,o=findComponentReference(n,e,i);if(o){var r=o.el.getBoundingRect().clone();r.applyTransform(o.el.transform),this._tryShow({offsetX:r.x+r.width/2,offsetY:r.y+r.height/2,target:o.el,position:n.position,positionDefault:"bottom"},s)}else if(n.tooltip&&null!=n.x&&null!=n.y){var l=proxyRect;l.x=n.x,l.y=n.y,l.update(),getECData(l).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:l},s)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:a,tooltipOption:n.tooltipOption},s);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var h=findPointFromSeries(n,e),c=h.point[0],u=h.point[1];null!=c&&null!=u&&this._tryShow({offsetX:c,offsetY:u,target:h.el,position:n.position,positionDefault:"bottom"},s)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},s))}},e.prototype.manuallyHideTip=function(t,e,i,n){var s=this._tooltipContent;this._tooltipModel&&s.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(makeDispatchAction(n,i))},e.prototype._manuallyAxisShowTip=function(t,e,i,n){var s=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=s&&null!=a&&null!=o){var r=e.getSeriesByIndex(s);if(r)if("axis"===buildTooltipModel([r.getData().getItemModel(a),r,(r.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:s,dataIndex:a,position:n.position}),!0}},e.prototype._tryShow=function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;if(n&&n.length)this._showAxisTooltip(n,t);else if(i){var s,a;if("legend"===getECData(i).ssrType)return;this._lastDataByCoordSys=null,findEventDispatcher(i,(function(t){return null!=getECData(t).dataIndex?(s=t,!0):null!=getECData(t).tooltipConfig?(a=t,!0):void 0}),!0),s?this._showSeriesItemTooltip(t,s,e):a?this._showComponentItemTooltip(t,a,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var i=t.get("showDelay");e=bind$1(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},e.prototype._showAxisTooltip=function(t,e){var i=this._ecModel,n=this._tooltipModel,s=[e.offsetX,e.offsetY],a=buildTooltipModel([e.tooltipOption],n),o=this._renderMode,r=[],l=createTooltipMarkup("section",{blocks:[],noHeader:!0}),h=[],c=new TooltipMarkupStyleCreator;each$4(t,(function(t){each$4(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),s=t.value;if(e&&null!=s){var a=getValueLabel(s,e.axis,i,t.seriesDataIndices,t.valueLabelOpt),u=createTooltipMarkup("section",{header:a,noHeader:!trim(a),sortBlocks:!0,blocks:[]});l.blocks.push(u),each$4(t.seriesDataIndices,(function(l){var d=i.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,g=d.getDataParams(p);if(!(g.dataIndex<0)){g.axisDim=t.axisDim,g.axisIndex=t.axisIndex,g.axisType=t.axisType,g.axisId=t.axisId,g.axisValue=getAxisRawValue(e.axis,{value:s}),g.axisValueLabel=a,g.marker=c.makeTooltipMarker("item",convertToColorString(g.color),o);var f=normalizeTooltipFormatResult(d.formatTooltip(p,!0,null)),m=f.frag;if(m){var v=buildTooltipModel([d],n).get("valueFormatter");u.blocks.push(v?extend({valueFormatter:v},m):m)}f.text&&h.push(f.text),r.push(g)}}))}}))})),l.blocks.reverse(),h.reverse();var u=e.position,d=a.get("order"),p=buildTooltipMarkup(l,c,o,d,i.get("useUTC"),a.get("textStyle"));p&&h.unshift(p);var g="richText"===o?"\n\n":"<br/>",f=h.join(g);this._showOrMove(a,(function(){this._updateContentNotChangedOnAxis(t,r)?this._updatePosition(a,u,s[0],s[1],this._tooltipContent,r):this._showTooltipContent(a,f,r,Math.random()+"",s[0],s[1],u,null,c)}))},e.prototype._showSeriesItemTooltip=function(t,e,i){var n=this._ecModel,s=getECData(e),a=s.seriesIndex,o=n.getSeriesByIndex(a),r=s.dataModel||o,l=s.dataIndex,h=s.dataType,c=r.getData(h),u=this._renderMode,d=t.positionDefault,p=buildTooltipModel([c.getItemModel(l),r,o&&(o.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(null==g||"item"===g){var f=r.getDataParams(l,h),m=new TooltipMarkupStyleCreator;f.marker=m.makeTooltipMarker("item",convertToColorString(f.color),u);var v=normalizeTooltipFormatResult(r.formatTooltip(l,!1,h)),b=p.get("order"),y=p.get("valueFormatter"),S=v.frag,x=S?buildTooltipMarkup(y?extend({valueFormatter:y},S):S,m,u,b,n.get("useUTC"),p.get("textStyle")):v.text,w="item_"+r.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,x,f,w,t.offsetX,t.offsetY,t.position,t.target,m)})),i({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,i){var n="html"===this._renderMode,s=getECData(e),a=s.tooltipConfig.option||{},o=a.encodeHTMLContent;if(isString(a)){a={content:a,formatter:a},o=!0}o&&n&&a.content&&((a=clone$3(a)).content=encodeHTML(a.content));var r=[a],l=this._ecModel.getComponent(s.componentMainType,s.componentIndex);l&&r.push(l),r.push({formatter:a.content});var h=t.positionDefault,c=buildTooltipModel(r,this._tooltipModel,h?{position:h}:null),u=c.get("content"),d=Math.random()+"",p=new TooltipMarkupStyleCreator;this._showOrMove(c,(function(){var i=clone$3(c.get("formatterParams")||{});this._showTooltipContent(c,u,i,d,t.offsetX,t.offsetY,t.position,e,p)})),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,i,n,s,a,o,r,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var c=t.get("formatter");o=o||t.get("position");var u=e,d=this._getNearestPoint([s,a],i,t.get("trigger"),t.get("borderColor")).color;if(c)if(isString(c)){var p=t.ecModel.get("useUTC"),g=isArray(i)?i[0]:i;u=c,g&&g.axisType&&g.axisType.indexOf("time")>=0&&(u=format(g.axisValue,u,p)),u=formatTpl(u,i,!0)}else if(isFunction(c)){var f=bind$1((function(e,n){e===this._ticket&&(h.setContent(n,l,t,d,o),this._updatePosition(t,o,s,a,h,i,r))}),this);this._ticket=n,u=c(i,n,f)}else u=c;h.setContent(u,l,t,d,o),h.show(t,d),this._updatePosition(t,o,s,a,h,i,r)}},e.prototype._getNearestPoint=function(t,e,i,n){return"axis"===i||isArray(e)?{color:n||("html"===this._renderMode?"#fff":"none")}:isArray(e)?void 0:{color:n||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,i,n,s,a,o){var r=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=s.getSize(),c=t.get("align"),u=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),isFunction(e)&&(e=e([i,n],a,s.el,d,{viewSize:[r,l],contentSize:h.slice()})),isArray(e))i=parsePercent(e[0],r),n=parsePercent(e[1],l);else if(isObject$2(e)){var p=e;p.width=h[0],p.height=h[1];var g=getLayoutRect(p,{width:r,height:l});i=g.x,n=g.y,c=null,u=null}else if(isString(e)&&o){i=(f=calcTooltipPosition(e,d,h,t.get("borderWidth")))[0],n=f[1]}else{var f;i=(f=refixTooltipPosition(i,n,s,r,l,c?null:20,u?null:20))[0],n=f[1]}(c&&(i-=isCenterAlign(c)?h[0]/2:"right"===c?h[0]:0),u&&(n-=isCenterAlign(u)?h[1]/2:"bottom"===u?h[1]:0),shouldTooltipConfine(t))&&(i=(f=confineTooltipPosition(i,n,s,r,l))[0],n=f[1]);s.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var i=this._lastDataByCoordSys,n=this._cbParamsList,s=!!i&&i.length===t.length;return s&&each$4(i,(function(i,a){var o=i.dataByAxis||[],r=(t[a]||{}).dataByAxis||[];(s=s&&o.length===r.length)&&each$4(o,(function(t,i){var a=r[i]||{},o=t.seriesDataIndices||[],l=a.seriesDataIndices||[];(s=s&&t.value===a.value&&t.axisType===a.axisType&&t.axisId===a.axisId&&o.length===l.length)&&each$4(o,(function(t,e){var i=l[e];s=s&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})),n&&each$4(t.seriesDataIndices,(function(t){var i=t.seriesIndex,a=e[i],o=n[i];a&&o&&o.data!==a.data&&(s=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!s},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!env$1.node&&e.getDom()&&(clear(this,"_updatePosition"),this._tooltipContent.dispose(),unregister("itemTooltip",e))},e.type="tooltip",e}(ComponentView$1);function buildTooltipModel(t,e,i){var n,s=e.ecModel;i?(n=new Model$1(i,s,s),n=new Model$1(e.option,n,s)):n=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof Model$1&&(o=o.get("tooltip",!0)),isString(o)&&(o={formatter:o}),o&&(n=new Model$1(o,n,s)))}return n}function makeDispatchAction(t,e){return t.dispatchAction||bind$1(e.dispatchAction,e)}function refixTooltipPosition(t,e,i,n,s,a,o){var r=i.getSize(),l=r[0],h=r[1];return null!=a&&(t+l+a+2>n?t-=l+a:t+=a),null!=o&&(e+h+o>s?e-=h+o:e+=o),[t,e]}function confineTooltipPosition(t,e,i,n,s){var a=i.getSize(),o=a[0],r=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+r,s)-r,[t=Math.max(t,0),e=Math.max(e,0)]}function calcTooltipPosition(t,e,i,n){var s=i[0],a=i[1],o=Math.ceil(Math.SQRT2*n)+8,r=0,l=0,h=e.width,c=e.height;switch(t){case"inside":r=e.x+h/2-s/2,l=e.y+c/2-a/2;break;case"top":r=e.x+h/2-s/2,l=e.y-a-o;break;case"bottom":r=e.x+h/2-s/2,l=e.y+c+o;break;case"left":r=e.x-s-o,l=e.y+c/2-a/2;break;case"right":r=e.x+h+o,l=e.y+c/2-a/2}return[r,l]}function isCenterAlign(t){return"center"===t||"middle"===t}function findComponentReference(t,e,i){var n=preParseFinder(t).queryOptionMap,s=n.keys()[0];if(s&&"series"!==s){var a,o=queryReferringComponents(e,s,n.get(s),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(o)return i.getViewOfComponentModel(o).group.traverse((function(e){var i=getECData(e).tooltipConfig;if(i&&i.name===t.name)return a=e,!0})),a?{componentMainType:s,componentIndex:o.componentIndex,el:a}:void 0}}var TooltipView$1=TooltipView;function install$4(t){use(install$5),t.registerComponentModel(TooltipModel$1),t.registerComponentView(TooltipView$1),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},noop$3),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},noop$3)}var TitleModel=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode={type:"box",ignoreSize:!0},i}return __extends(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(ComponentModel$1),TitleView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.prototype.render=function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,s=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),r=retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),l=new ZRText$1({style:createTextStyle(s,{text:t.get("text"),fill:s.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),c=t.get("subtext"),u=new ZRText$1({style:createTextStyle(a,{text:c,fill:a.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);l.silent=!d&&!g,u.silent=!p&&!g,d&&l.on("click",(function(){windowOpen(d,"_"+t.get("target"))})),p&&u.on("click",(function(){windowOpen(p,"_"+t.get("subtarget"))})),getECData(l).eventData=getECData(u).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),c&&n.add(u);var f=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=f.width,m.height=f.height;var v=getLayoutRect(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));o||("middle"===(o=t.get("left")||t.get("right"))&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),r||("center"===(r=t.get("top")||t.get("bottom"))&&(r="middle"),"bottom"===r?v.y+=v.height:"middle"===r&&(v.y+=v.height/2),r=r||"top"),n.x=v.x,n.y=v.y,n.markRedraw();var b={align:o,verticalAlign:r};l.setStyle(b),u.setStyle(b),f=n.getBoundingRect();var y=v.margin,S=t.getItemStyle(["color","opacity"]);S.fill=t.get("backgroundColor");var x=new Rect$3({shape:{x:f.x-y[3],y:f.y-y[0],width:f.width+y[1]+y[3],height:f.height+y[0]+y[2],r:t.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});n.add(x)}},e.type="title",e}(ComponentView$1);function install$3(t){t.registerComponentModel(TitleModel),t.registerComponentView(TitleView)}var getDefaultSelectorOptions=function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0},LegendModel=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode={type:"box",ignoreSize:!0},i}return __extends(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,i){t.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,i=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),isArray(e)&&each$4(e,(function(t,n){isString(t)&&(t={type:t}),e[n]=merge(t,getDefaultSelectorOptions(i,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var e=[],i=[];t.eachRawSeries((function(n){var s,a=n.name;if(i.push(a),n.legendVisualProvider){var o=n.legendVisualProvider.getAllNames();t.isSeriesFiltered(n)||(i=i.concat(o)),o.length?e=e.concat(o):s=!0}else s=!0;s&&isNameSpecified(n)&&e.push(n.name)})),this._availableNames=i;var n=this.get("data")||e,s=createHashMap(),a=map$1(n,(function(t){return(isString(t)||isNumber$1(t))&&(t={name:t}),s.get(t.name)?null:(s.set(t.name,!0),new Model$1(t,this,this.ecModel))}),this);this._data=filter(a,(function(t){return!!t}))},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&each$4(this._data,(function(t){e[t.get("name")]=!1}));e[t]=!0},e.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,e=this.option.selected;each$4(t,(function(t){e[t.get("name",!0)]=!0}))},e.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;each$4(t,(function(t){var i=t.get("name",!0);e.hasOwnProperty(i)||(e[i]=!0),e[i]=!e[i]}))},e.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&indexOf(this._availableNames,t)>=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(ComponentModel$1),LegendModel$1=LegendModel,curry=curry$1,each=each$4,Group$2=Group$4,LegendView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.newlineDisabled=!1,i}return __extends(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new Group$2),this.group.add(this._selectorGroup=new Group$2),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var s=t.get("align"),a=t.get("orient");s&&"auto"!==s||(s="right"===t.get("left")&&"vertical"===a?"right":"left");var o=t.get("selector",!0),r=t.get("selectorPosition",!0);!o||r&&"auto"!==r||(r="horizontal"===a?"end":"start"),this.renderInner(s,t,e,i,o,a,r);var l=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),u=getLayoutRect(l,h,c),d=this.layoutInner(t,s,u,n,o,r),p=getLayoutRect(defaults({width:d.width,height:d.height},l),h,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=makeBackground(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,i,n,s,a,o){var r=this.getContentGroup(),l=createHashMap(),h=e.get("selectedMode"),c=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&c.push(t.id)})),each(e.getData(),(function(s,a){var o=s.get("name");if(!this.newlineDisabled&&(""===o||"\n"===o)){var u=new Group$2;return u.newline=!0,void r.add(u)}var d=i.getSeriesByName(o)[0];if(!l.get(o))if(d){var p=d.getData(),g=p.getVisual("legendLineStyle")||{},f=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(d,o,a,s,e,t,g,m,f,h,n);v.on("click",curry(dispatchSelectAction,o,null,n,c)).on("mouseover",curry(dispatchHighlightAction,d.name,null,n,c)).on("mouseout",curry(dispatchDownplayAction,d.name,null,n,c)),i.ssr&&v.eachChild((function(t){var e=getECData(t);e.seriesIndex=d.seriesIndex,e.dataIndex=a,e.ssrType="legend"})),l.set(o,!0)}else i.eachRawSeries((function(r){if(!l.get(o)&&r.legendVisualProvider){var u=r.legendVisualProvider;if(!u.containName(o))return;var d=u.indexOfName(o),p=u.getItemVisual(d,"style"),g=u.getItemVisual(d,"legendIcon"),f=parse(p.fill);f&&0===f[3]&&(f[3]=.2,p=extend(extend({},p),{fill:stringify(f,"rgba")}));var m=this._createItem(r,o,a,s,e,t,{},p,g,h,n);m.on("click",curry(dispatchSelectAction,null,o,n,c)).on("mouseover",curry(dispatchHighlightAction,null,o,n,c)).on("mouseout",curry(dispatchDownplayAction,null,o,n,c)),i.ssr&&m.eachChild((function(t){var e=getECData(t);e.seriesIndex=r.seriesIndex,e.dataIndex=a,e.ssrType="legend"})),l.set(o,!0)}}),this)}),this),s&&this._createSelector(s,e,n,a,o)},e.prototype._createSelector=function(t,e,i,n,s){var a=this.getSelectorGroup();each(t,(function(t){var n=t.type,s=new ZRText$1({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect",legendId:e.id})}});a.add(s),setLabelStyle(s,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),enableHoverEmphasis(s)}))},e.prototype._createItem=function(t,e,i,n,s,a,o,r,l,h,c){var u=t.visualDrawType,d=s.get("itemWidth"),p=s.get("itemHeight"),g=s.isSelected(e),f=n.get("symbolRotate"),m=n.get("symbolKeepAspect"),v=n.get("icon"),b=getLegendStyle(l=v||l||"roundRect",n,o,r,u,g,c),y=new Group$2,S=n.getModel("textStyle");if(!isFunction(t.getLegendIcon)||v&&"inherit"!==v){var x="inherit"===v&&t.getData().getVisual("symbol")?"inherit"===f?t.getData().getVisual("symbolRotate"):f:0;y.add(getDefaultLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:x,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:m}))}else y.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:f,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:m}));var w="left"===a?d+5:-5,C=a,T=s.get("formatter"),D=e;isString(T)&&T?D=T.replace("{name}",null!=e?e:""):isFunction(T)&&(D=T(e));var k=g?S.getTextColor():n.get("inactiveColor");y.add(new ZRText$1({style:createTextStyle(S,{text:D,x:w,y:p/2,fill:k,align:C,verticalAlign:"middle"},{inheritColor:k})}));var $=new Rect$3({shape:y.getBoundingRect(),style:{fill:"transparent"}}),O=n.getModel("tooltip");return O.get("show")&&setTooltipConfig({el:$,componentModel:s,itemName:e,itemTooltipOption:O.option}),y.add($),y.eachChild((function(t){t.silent=!0})),$.silent=!h,this.getContentGroup().add(y),enableHoverEmphasis(y),y.__legendDataIndex=i,y},e.prototype.layoutInner=function(t,e,i,n,s,a){var o=this.getContentGroup(),r=this.getSelectorGroup();box(t.get("orient"),o,t.get("itemGap"),i.width,i.height);var l=o.getBoundingRect(),h=[-l.x,-l.y];if(r.markRedraw(),o.markRedraw(),s){box("horizontal",r,t.get("selectorItemGap",!0));var c=r.getBoundingRect(),u=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=0===p?"width":"height",f=0===p?"height":"width",m=0===p?"y":"x";"end"===a?u[p]+=l[g]+d:h[p]+=c[g]+d,u[1-p]+=l[f]/2-c[f]/2,r.x=u[0],r.y=u[1],o.x=h[0],o.y=h[1];var v={x:0,y:0};return v[g]=l[g]+d+c[g],v[f]=Math.max(l[f],c[f]),v[m]=Math.min(0,c[m]+u[1-p]),v}return o.x=h[0],o.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(ComponentView$1);function getLegendStyle(t,e,i,n,s,a,o){function r(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),each(t,(function(i,n){"inherit"===t[n]&&(t[n]=e[n])}))}var l=e.getModel("itemStyle"),h=l.getItemStyle(),c=0===t.lastIndexOf("empty",0)?"fill":"stroke",u=l.getShallow("decal");h.decal=u&&"inherit"!==u?createOrUpdatePatternFromDecal(u,o):n.decal,"inherit"===h.fill&&(h.fill=n[s]),"inherit"===h.stroke&&(h.stroke=n[c]),"inherit"===h.opacity&&(h.opacity=("fill"===s?n:i).opacity),r(h,n);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(r(p,i),"auto"===h.fill&&(h.fill=n.fill),"auto"===h.stroke&&(h.stroke=n.fill),"auto"===p.stroke&&(p.stroke=n.fill),!a){var g=e.get("inactiveBorderWidth"),f=h[c];h.lineWidth="auto"===g?n.lineWidth>0&&f?2:0:h.lineWidth,h.fill=e.get("inactiveColor"),h.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:h,lineStyle:p}}function getDefaultLegendIcon(t){var e=t.icon||"roundRect",i=createSymbol(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return i.setStyle(t.itemStyle),i.rotation=(t.iconRotate||0)*Math.PI/180,i.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i}function dispatchSelectAction(t,e,i,n){dispatchDownplayAction(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),dispatchHighlightAction(t,e,i,n)}function isUseHoverLayer(t){for(var e,i=t.getZr().storage.getDisplayList(),n=0,s=i.length;n<s&&!(e=i[n].states.emphasis);)n++;return e&&e.hoverLayer}function dispatchHighlightAction(t,e,i,n){isUseHoverLayer(i)||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function dispatchDownplayAction(t,e,i,n){isUseHoverLayer(i)||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}var LegendView$1=LegendView;function legendFilter(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0}))}function legendSelectActionHandler(t,e,i){var n="allSelect"===t||"inverseSelect"===t,s={},a=[];i.eachComponent({mainType:"legend",query:e},(function(i){n?i[t]():i[t](e.name),makeSelectedMap(i,s),a.push(i.componentIndex)}));var o={};return i.eachComponent("legend",(function(t){each$4(s,(function(e,i){t[e?"select":"unSelect"](i)})),makeSelectedMap(t,o)})),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function makeSelectedMap(t,e){var i=e||{};return each$4(t.getData(),(function(e){var n=e.get("name");if("\n"!==n&&""!==n){var s=t.isSelected(n);hasOwn(i,n)?i[n]=i[n]&&s:i[n]=s}})),i}function installLegendAction(t){t.registerAction("legendToggleSelect","legendselectchanged",curry$1(legendSelectActionHandler,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",curry$1(legendSelectActionHandler,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",curry$1(legendSelectActionHandler,"inverseSelect")),t.registerAction("legendSelect","legendselected",curry$1(legendSelectActionHandler,"select")),t.registerAction("legendUnSelect","legendunselected",curry$1(legendSelectActionHandler,"unSelect"))}function install$2(t){t.registerComponentModel(LegendModel$1),t.registerComponentView(LegendView$1),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,legendFilter),t.registerSubTypeDefaulter("legend",(function(){return"plain"})),installLegendAction(t)}var ScrollableLegendModel=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return __extends(e,t),e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(e,i,n){var s=getLayoutParams(e);t.prototype.init.call(this,e,i,n),mergeAndNormalizeLayoutParams(this,e,s)},e.prototype.mergeOption=function(e,i){t.prototype.mergeOption.call(this,e,i),mergeAndNormalizeLayoutParams(this,this.option,e)},e.type="legend.scroll",e.defaultOption=inheritDefaultOption(LegendModel$1.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(LegendModel$1);function mergeAndNormalizeLayoutParams(t,e,i){var n=[1,1];n[t.getOrient().index]=0,mergeLayoutParam(e,i,{type:"box",ignoreSize:!!n})}var ScrollableLegendModel$1=ScrollableLegendModel,Group$1=Group$4,WH=["width","height"],XY=["x","y"],ScrollableLegendView=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.newlineDisabled=!0,i._currentIndex=0,i}return __extends(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new Group$1),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Group$1)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(e,i,n,s,a,o,r){var l=this;t.prototype.renderInner.call(this,e,i,n,s,a,o,r);var h=this._controllerGroup,c=i.get("pageIconSize",!0),u=isArray(c)?c:[c,c];p("pagePrev",0);var d=i.getModel("pageTextStyle");function p(t,e){var n=t+"DataIndex",a=createIcon(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:bind$1(l._pageGo,l,n,i,s)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});a.name=t,h.add(a)}h.add(new ZRText$1({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},e.prototype.layoutInner=function(t,e,i,n,s,a){var o=this.getSelectorGroup(),r=t.getOrient().index,l=WH[r],h=XY[r],c=WH[1-r],u=XY[1-r];s&&box("horizontal",o,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=o.getBoundingRect(),g=[-p.x,-p.y],f=clone$3(i);s&&(f[l]=i[l]-p[l]-d);var m=this._layoutContentAndController(t,n,f,r,l,c,u,h);if(s){if("end"===a)g[r]+=m[l]+d;else{var v=p[l]+d;g[r]-=v,m[h]-=v}m[l]+=p[l]+d,g[1-r]+=m[u]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[u]=Math.min(m[u],p[u]+g[1-r]),o.x=g[0],o.y=g[1],o.markRedraw()}return m},e.prototype._layoutContentAndController=function(t,e,i,n,s,a,o,r){var l=this.getContentGroup(),h=this._containerGroup,c=this._controllerGroup;box(t.get("orient"),l,t.get("itemGap"),n?i.width:null,n?null:i.height),box("horizontal",c,t.get("pageButtonItemGap",!0));var u=l.getBoundingRect(),d=c.getBoundingRect(),p=this._showController=u[s]>i[s],g=[-u.x,-u.y];e||(g[n]=l[r]);var f=[0,0],m=[-d.x,-d.y],v=retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?m[n]+=i[s]-d[s]:f[n]+=d[s]+v);m[1-n]+=u[a]/2-d[a]/2,l.setPosition(g),h.setPosition(f),c.setPosition(m);var b={x:0,y:0};if(b[s]=p?i[s]:u[s],b[a]=Math.max(u[a],d[a]),b[o]=Math.min(0,d[o]+m[1-n]),h.__rectSize=i[s],p){var y={x:0,y:0};y[s]=Math.max(i[s]-d[s]-v,0),y[a]=b[a],h.setClipPath(new Rect$3({shape:y})),h.__rectSize=y[s]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(t);return null!=S.pageIndex&&updateProps$1(l,{x:S.contentPosition[0],y:S.contentPosition[1]},p?t:null),this._updatePageInfoView(t,S),b},e.prototype._pageGo=function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var i=this._controllerGroup;each$4(["pagePrev","pageNext"],(function(n){var s=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",s?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=s?"pointer":"default")}));var n=i.childOfName("pageText"),s=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,r=e.pageCount;n&&s&&n.setStyle("text",isString(s)?s.replace("{current}",null==o?"":o+"").replace("{total}",null==r?"":r+""):s({current:o,total:r}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,s=t.getOrient().index,a=WH[s],o=XY[s],r=this._findTargetItemIndex(e),l=i.children(),h=l[r],c=l.length,u=c?1:0,d={contentPosition:[i.x,i.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=b(h);d.contentPosition[s]=-p.s;for(var g=r+1,f=p,m=p,v=null;g<=c;++g)(!(v=b(l[g]))&&m.e>f.s+n||v&&!y(v,f.s))&&(f=m.i>f.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=f.i),++d.pageCount),m=v;for(g=r-1,f=p,m=p,v=null;g>=-1;--g)(v=b(l[g]))&&y(m,v.s)||!(f.i<m.i)||(m=f,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=f.i),++d.pageCount,++d.pageIndex),f=v;return d;function b(t){if(t){var e=t.getBoundingRect(),i=e[o]+t[o];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function y(t,e){return t.e>=e&&t.s<=e+n}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(n,s){var a=n.__legendDataIndex;null==i&&null!=a&&(i=s),a===t&&(e=s)})),null!=e?e:i):0;var e,i},e.type="legend.scroll",e}(LegendView$1),ScrollableLegendView$1=ScrollableLegendView;function installScrollableLegendAction(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))}function install$1(t){use(install$2),t.registerComponentModel(ScrollableLegendModel$1),t.registerComponentView(ScrollableLegendView$1),installScrollableLegendAction(t)}function install(t){use(install$2),use(install$1)}var raf=null;function requestAnimationFrame$1(t){return raf||(raf=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),raf(t)}var caf=null;function cancelAnimationFrame$1(t){caf||(caf=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),caf(t)}function createStyles(t){var e=document.createElement("style");return e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),(document.querySelector("head")||document.body).appendChild(e),e}function createElement(t,e){void 0===e&&(e={});var i=document.createElement(t);return Object.keys(e).forEach((function(t){i[t]=e[t]})),i}function getComputedStyle$1(t,e,i){return(window.getComputedStyle(t,i||null)||{display:"none"})[e]}function getRenderInfo(t){if(!document.documentElement.contains(t))return{detached:!0,rendered:!1};for(var e=t;e!==document;){if("none"===getComputedStyle$1(e,"display"))return{detached:!1,rendered:!1};e=e.parentNode}return{detached:!1,rendered:!0}}var css_248z='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',total=0,style=null;function addListener(t,e){if(t.__resize_mutation_handler__||(t.__resize_mutation_handler__=handleMutation.bind(t)),!t.__resize_listeners__)if(t.__resize_listeners__=[],window.ResizeObserver){var i=t.offsetWidth,n=t.offsetHeight,s=new ResizeObserver((function(){(t.__resize_observer_triggered__||(t.__resize_observer_triggered__=!0,t.offsetWidth!==i||t.offsetHeight!==n))&&runCallbacks(t)})),a=getRenderInfo(t),o=a.detached,r=a.rendered;t.__resize_observer_triggered__=!1===o&&!1===r,t.__resize_observer__=s,s.observe(t)}else if(t.attachEvent&&t.addEventListener)t.__resize_legacy_resize_handler__=function(){runCallbacks(t)},t.attachEvent("onresize",t.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",t.__resize_mutation_handler__);else if(total||(style=createStyles(css_248z)),initTriggers(t),t.__resize_rendered__=getRenderInfo(t).rendered,window.MutationObserver){var l=new MutationObserver(t.__resize_mutation_handler__);l.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),t.__resize_mutation_observer__=l}t.__resize_listeners__.push(e),total++}function removeListener(t,e){var i=t.__resize_listeners__;if(i){if(e&&i.splice(i.indexOf(e),1),!i.length||!e){if(t.detachEvent&&t.removeEventListener)return t.detachEvent("onresize",t.__resize_legacy_resize_handler__),void document.removeEventListener("DOMSubtreeModified",t.__resize_mutation_handler__);t.__resize_observer__?(t.__resize_observer__.unobserve(t),t.__resize_observer__.disconnect(),t.__resize_observer__=null):(t.__resize_mutation_observer__&&(t.__resize_mutation_observer__.disconnect(),t.__resize_mutation_observer__=null),t.removeEventListener("scroll",handleScroll),t.removeChild(t.__resize_triggers__.triggers),t.__resize_triggers__=null),t.__resize_listeners__=null}!--total&&style&&style.parentNode.removeChild(style)}}function getUpdatedSize(t){var e=t.__resize_last__,i=e.width,n=e.height,s=t.offsetWidth,a=t.offsetHeight;return s!==i||a!==n?{width:s,height:a}:null}function handleMutation(){var t=getRenderInfo(this),e=t.rendered,i=t.detached;e!==this.__resize_rendered__&&(!i&&this.__resize_triggers__&&(resetTriggers(this),this.addEventListener("scroll",handleScroll,!0)),this.__resize_rendered__=e,runCallbacks(this))}function handleScroll(){var t=this;resetTriggers(this),this.__resize_raf__&&cancelAnimationFrame$1(this.__resize_raf__),this.__resize_raf__=requestAnimationFrame$1((function(){var e=getUpdatedSize(t);e&&(t.__resize_last__=e,runCallbacks(t))}))}function runCallbacks(t){t&&t.__resize_listeners__&&t.__resize_listeners__.forEach((function(e){e.call(t,t)}))}function initTriggers(t){var e=getComputedStyle$1(t,"position");e&&"static"!==e||(t.style.position="relative"),t.__resize_old_position__=e,t.__resize_last__={};var i=createElement("div",{className:"resize-triggers"}),n=createElement("div",{className:"resize-expand-trigger"}),s=createElement("div"),a=createElement("div",{className:"resize-contract-trigger"});n.appendChild(s),i.appendChild(n),i.appendChild(a),t.appendChild(i),t.__resize_triggers__={triggers:i,expand:n,expandChild:s,contract:a},resetTriggers(t),t.addEventListener("scroll",handleScroll,!0),t.__resize_last__={width:t.offsetWidth,height:t.offsetHeight}}function resetTriggers(t){var e=t.__resize_triggers__,i=e.expand,n=e.expandChild,s=e.contract,a=s.scrollWidth,o=s.scrollHeight,r=i.offsetWidth,l=i.offsetHeight,h=i.scrollWidth,c=i.scrollHeight;s.scrollLeft=a,s.scrollTop=o,n.style.width=r+1+"px",n.style.height=l+1+"px",i.scrollLeft=h,i.scrollTop=c}var b=function(){return b=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},b.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var y=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function E(t){return e=Object.create(null),y.forEach((function(i){var n;e[i]=(n=i,function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];if(!t.value)throw new Error("ECharts is not initialized yet.");return t.value[n].apply(t.value,e)})})),e;var e}var _={autoresize:[Boolean,Object]},x=/^on[^a-z]/,j=function(t){return x.test(t)};function w(t,e){var i=isRef(t)?unref(t):t;return i&&"object"==typeof i&&"value"in i?i.value||e:i||e}var A$1="ecLoadingOptions",L={loading:Boolean,loadingOptions:Object},z=null,C$1="x-vue-echarts",T$1=[],S=[];!function(t,e){if(t&&"undefined"!=typeof document){var i,n=!0===e.prepend?"prepend":"append",s=!0===e.singleTag,a="string"==typeof e.container?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(s){var o=T$1.indexOf(a);-1===o&&(o=T$1.push(a)-1,S[o]={}),i=S[o]&&S[o][n]?S[o][n]:S[o][n]=r()}else i=r();65279===t.charCodeAt(0)&&(t=t.substring(1)),i.styleSheet?i.styleSheet.cssText+=t:i.appendChild(document.createTextNode(t))}function r(){var t=document.createElement("style");if(t.setAttribute("type","text/css"),e.attributes)for(var i=Object.keys(e.attributes),s=0;s<i.length;s++)t.setAttribute(i[s],e.attributes[i[s]]);var o="prepend"===n?"afterbegin":"beforeend";return a.insertAdjacentElement(o,t),t}}("x-vue-echarts{display:flex;flex-direction:column;width:100%;height:100%;min-width:0}\n.vue-echarts-inner{flex-grow:1;min-width:0;width:auto!important;height:auto!important}\n",{});var U=function(){if(null!=z)return z;if("undefined"==typeof HTMLElement||"undefined"==typeof customElements)return z=!1;try{new Function("tag","class EChartsElement extends HTMLElement {\n  __dispose = null;\n\n  disconnectedCallback() {\n    if (this.__dispose) {\n      this.__dispose();\n      this.__dispose = null;\n    }\n  }\n}\n\nif (customElements.get(tag) == null) {\n  customElements.define(tag, EChartsElement);\n}\n")(C$1)}catch(t){return z=!1}return z=!0}(),D$1="ecTheme",k="ecInitOptions",B$1="ecUpdateOptions",P=/(^&?~?!?)native:/,H=defineComponent({name:"echarts",props:b(b({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},_),L),emits:{},inheritAttrs:!1,setup:function(t,e){var i=e.attrs,n=shallowRef(),s=shallowRef(),a=shallowRef(),o=shallowRef(),r=inject(D$1,null),l=inject(k,null),h=inject(B$1,null),c=toRefs(t),u=c.autoresize,d=c.manualUpdate,p=c.loading,g=c.loadingOptions,f=computed((function(){return o.value||t.option||null})),m=computed((function(){return t.theme||w(r,{})})),v=computed((function(){return t.initOptions||w(l,{})})),y=computed((function(){return t.updateOptions||w(h,{})})),S=computed((function(){return function(t){var e={};for(var i in t)j(i)||(e[i]=t[i]);return e}(i)})),x={},C=getCurrentInstance$1().proxy.$listeners,T={};function D(e){if(s.value){var i=a.value=init(s.value,m.value,v.value);t.group&&(i.group=t.group),Object.keys(T).forEach((function(t){var e=T[t];if(e){var n=t.toLowerCase();"~"===n.charAt(0)&&(n=n.substring(1),e.__once__=!0);var s=i;if(0===n.indexOf("zr:")&&(s=i.getZr(),n=n.substring(3)),e.__once__){delete e.__once__;var a=e;e=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];a.apply(void 0,t),s.off(n,e)}}s.on(n,e)}})),u.value?nextTick((function(){i&&!i.isDisposed()&&i.resize(),n()})):n()}function n(){var t=e||f.value;t&&i.setOption(t,y.value)}}function $(){a.value&&(a.value.dispose(),a.value=void 0)}C?Object.keys(C).forEach((function(t){P.test(t)?x[t.replace(P,"$1")]=C[t]:T[t]=C[t]})):Object.keys(i).filter((function(t){return j(t)})).forEach((function(t){var e=t.charAt(2).toLowerCase()+t.slice(3);if(0!==e.indexOf("native:"))"Once"===e.substring(e.length-4)&&(e="~".concat(e.substring(0,e.length-4))),T[e]=i[t];else{var n="on".concat(e.charAt(7).toUpperCase()).concat(e.slice(8));x[n]=i[t]}}));var O=null;watch(d,(function(e){"function"==typeof O&&(O(),O=null),e||(O=watch((function(){return t.option}),(function(t,e){t&&(a.value?a.value.setOption(t,b({notMerge:t!==e},y.value)):D())}),{deep:!0}))}),{immediate:!0}),watch([m,v],(function(){$(),D()}),{deep:!0}),watchEffect((function(){t.group&&a.value&&(a.value.group=t.group)}));var L,I,A,G,F,M=E(a);return L=a,I=p,A=g,G=inject(A$1,{}),F=computed((function(){return b(b({},w(G,{})),null==A?void 0:A.value)})),watchEffect((function(){var t=L.value;t&&(I.value?t.showLoading(F.value):t.hideLoading())})),function(t,e,i){var n=null;watch([i,t,e],(function(t,e,i){var s=t[0],a=t[1],o=t[2];if(s&&a&&o){var r=!0===o?{}:o,l=r.throttle,h=void 0===l?100:l,c=r.onResize,u=function(){a.resize(),null==c||c()};n=h?throttle(u,h):u,addListener(s,n)}i((function(){s&&n&&removeListener(s,n)}))}))}(a,u,s),onMounted((function(){D()})),onBeforeUnmount((function(){U&&n.value?n.value.__dispose=$:$()})),b({chart:a,root:n,inner:s,setOption:function(e,i){t.manualUpdate&&(o.value=e),a.value?a.value.setOption(e,i||{}):D(e)},nonEventAttrs:S,nativeListeners:x},M)},render:function(){var t=b(b({},this.nonEventAttrs),this.nativeListeners);return t.ref="root",t.class=t.class?["echarts"].concat(t.class):"echarts",h(C$1,t,[h("div",{ref:"inner",class:"vue-echarts-inner"})])}}),EchartsGauge_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$m={__name:"EchartsGauge",props:{title:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:100},value:{type:Number,default:0},splitNumber:{type:Number,default:10},ticks:{type:Number,default:10},minorTicks:{type:Number,default:5},thickness:{type:Number,default:30},unit:{type:String,default:""},colors:{type:Array,default:()=>[[.3,"#14BE64"],[.7,"#FFB100"],[1,"#fd666d"]]}},setup(t){use([install$7,install$6,install$3,install$4,install]);const e=t,i=computed((()=>({series:[{type:"gauge",radius:"85%",center:["50%","55%"],min:e.min,max:e.max,splitNumber:e.ticks,axisLine:{lineStyle:{width:e.thickness,color:e.colors}},pointer:{itemStyle:{color:"inherit"}},axisTick:{splitNumber:e.minorTicks,distance:-e.thickness/3.5,length:e.thickness/3.5,lineStyle:{color:"#fff",width:1}},splitLine:{distance:-e.thickness,length:e.thickness,lineStyle:{color:"#fff",width:2}},axisLabel:{lineHeight:25,color:"inherit",distance:-25,fontSize:13},detail:{valueAnimation:!0,formatter:`{value} ${e.unit}`,color:"inherit",fontSize:18},data:[{value:e.value}]}]})));return(t,e)=>(openBlock(),createBlock(unref(H),{class:"chart",option:i.value,autoresize:""},null,8,["option"]))}};var GaugeChart=_export_sfc(_sfc_main$m,[["__scopeId","data-v-6e9d3742"]]),anychartBundle_min={exports:{}};(function(module){var global2,factory,wrapper;global2="undefined"!=typeof window?window:commonjsGlobal,factory=function(window,document,opt_noGlobal){var $,_,$_=this.anychart;$_&&(_=$_._)?$=$_.$:($={},_={}),_.core||(_.core=1,function($){var ba,baa,caa,ta,Ea,daa,La,eaa,Sa,faa,Ya,gaa,ub,yb,Gb,Lb,Pb,Nb,Ob,bc,ic,sc,tc,wc,yc,Vb,paa,Tc,Vc,Wc,Xc,Yc,raa,$c,wd,zd,Cd,xaa,Gd,Hd,Id,Jd,Nd,yaa,Kd,Zd,Vd,de,Aaa,Od,Md,Le,Ne,Ue,ef,kf,se,nf,of,pf,tf,Ef,Bf,Tf,Xf,Zf,$f,cg,eg,dg,fg,lg,ng,og,qg,tg,vg,xg,wg,ug,Cg,Bg,Eg,Hg,Haa,Ig,Mg,Og,Vg,Xg,Yg,Zg,Ug,Wg,Ng,bh,ch,dh,fh,nh,ih,hh,th,vh,yh,Bh,Dh,Eh,Fh,Gh,Hh,Ih,Kh,Lh,Mh,Rh,Sh,Th,Uh,Vh,Wh,Xh,gi,hi,ii,ji,ki,li,mi,ni,oi,pi,qi,ri,si,ti,ui,vi,Zh,ai,xi,yi,zi,Ai,Gi,Hi,Kaa,Laa,Maa,Ii,Ki,Ni,Oi,Pi,Ti,Ui,Vi,Wi,Xi,Saa,Taa,bj,pj,rj,sj,wj,Vaa,vj,tj,uj,Aj,Uaa,xj,Mi,Oaa,Naa,Waa,Vj,Wj,Xj,ak,bk,ck,dk,fk,ek,Uj,ik,rk,Xb,Li,xk,Ck,Fk,eba,hba,Qk,pba,tba,gl,Cba,Dba,ql,rl,tl,ul,xl,zl,Gl,Dl,Jl,Ml,Ol,Jba,jm,mm,om,km,rm,lm,tm,vm,Xa,Km,Mm,Nm,Om,Qm,Ym,Zm,$m,an,dn,fn,pn,qn,rn,tn,sn,un,vn,wn,xn,Fn,Gn,Hn,Kn,Lba,Pn,Qn,Sn,Rn,Tn,Yn,Wn,Vn,$n,ao,Nba,Oba,Pba,co,bo,eo,fo,oo,ro,Tba,Co,To,Uba,Wo,ap,Vba,bp,Pm,fp,hp,pp,op,Xba,Wba,Zba,wp,Ap,Bp,Cp,Ip,Fp,Gp,aca,Kp,Rp,Yp,Zp,sl,gq,hq,kq,lq,nq,pq,qq,Xq,Yq,$q,dr,yq,Wq,Vq,Uq,lr,vr,Ar,Fr,Gr,Hr,bca,Nr,Pr,Qr,dca,Tr,Ur,Vr,Yr,Wr,Xr,fca,$r,as,bs,ds,es,gs,js,ls,ns,ws,os,Fs,Ps,Qs,Rs,Us,Vs,Ws,Xs,Ys,Zs,$s,mt,pt,ot,qt,tt,wt,xt,rt,Bt,Ct,nca,Jt,Kt,Lt,Nt,Ut,Vt,Wt,Xt,gu,hu,iu,ju,ku,bu,lu,fu,mu,nu,pu,uu,vu,zu,Au,Bu,Cu,Du,Eu,Gu,Iu,Ju,oca,Qu,Ru,qca,av,cv,dv,ev,Vu,rca,fv,sca,Su,jv,kv,lv,mv,qv,rv,sv,tv,uv,vv,wv,yv,zv,Bv,tca,Cv,Dv,Ev,Av,uca,vca,xca,wca,Fv,Iv,Kv,Lv,Sv,Tv,Nv,Uv,Vv,Wv,Xv,Yv,Pv,Ov,Qv,Rv,yca,zca,Zv,$v,bw,cw,fw,gw,hw,iw,jw,kw,lw,mw,nw,pw,qw,ow,rw,yw,Bw,Aca,Dw,Jw,Gw,Ew,Lw,Hw,xw,Rw,Sw,Mw,Tw,zw,Iw,Pw,Uw,Xw,Yw,Cca,Dca,Eca,Fca,Gca,$w,Hca,ax,bx,dx,ex,fx,gx,ox,Ica,wx,yx,zx,Cx,Fx,Gx,Jx,Nx,Lx,Ox,Sx,Tx,Ux,Xx,Vx,hy,iy,jy,ky,ly,Kca,Lca,Mca,Nca,vy,wy,Ky,Vy,Xy,Pca,Uy,Yy,az,cz,hz,Rca,lz,nz,pz,qz,sz,wz,Sca,yz,zz,Az,Bz,Cz,Dz,Fz,Gz,Hz,Iz,Sz,Uca,Vca,Vz,Xz,bA,eA,gA,hA,lA,mA,rA,sA,tA,uA,vA,xA,yA,zA,AA,Wca,CA,DA,GA,KA,Uz,LA,OA,NA,MA,TA,VA,SA,YA,ZA,$A,aB,bB,gB,hB,Xca,oB,pB,rB,Yca,Zca,qB,$ca,sB,uB,wB,zB,ada,DB,HB,JB,KB,LB,MB,OB,NB,PB,QB,RB,SB,UB,VB,XB,YB,fC,gC,hC,jC,kC,mC,nC,rC,sC,uC,vC,zC,AC,BC,CC,wC,xC,yC,DC,EC,FC,GC,HC,IC,JC,KC,LC,MC,NC,OC,PC,QC,TC,eda,dda,XC,YC,UC,ZC,$C,aD,fD,wD,tD,AD,DD,zD,ED,yD,GD,MD,aa,na,aaa;ba=function(t){return function(){return aa[t].apply(this,arguments)}},$.ca=function(t,e){return aa[t]=e},$.p=function(t){return void 0!==t},$.z=function(t){return"string"==typeof t},$.da=function(t){return"boolean"==typeof t},$.ea=function(t){return"number"==typeof t},$.ha=function(t){t=t.split(".");for(var e=$.fa,i=0;i<t.length;i++)if(null==(e=e[t[i]]))return null;return e},$.ia=function(){},$.ja=function(t){t.pV=void 0,t.Id=function(){return t.pV?t.pV:t.pV=new t}},$.ka=function(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var i=Object.prototype.toString.call(t);if("[object Window]"==i)return"object";if("[object Array]"==i||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==i||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e},$.A=function(t){return"array"==$.ka(t)},$.la=function(t){var e=$.ka(t);return"array"==e||"object"==e&&"number"==typeof t.length},$.ma=function(t){return $.C(t)&&"function"==typeof t.getFullYear},$.D=function(t){return"function"==$.ka(t)},$.C=function(t){var e=typeof t;return"object"==e&&null!=t||"function"==e},$.oa=function(t){return t[na]||(t[na]=++aaa)},baa=function(t,e,i){return t.call.apply(t.bind,arguments)},caa=function(t,e,i){if(!t)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,n),t.apply(e,i)}}return function(){return t.apply(e,arguments)}},$.pa=function(t,e,i){return Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?$.pa=baa:$.pa=caa,$.pa.apply(null,arguments)},$.qa=function(t,e){var i=Array.prototype.slice.call(arguments,1);return function(){var e=i.slice();return e.push.apply(e,arguments),t.apply(this,e)}},$.ra=function(t,e){for(var i in e)t[i]=e[i]},$.E=function(t,e){var i,n=t.split("."),s=$.fa;n[0]in s||void 0===s.execScript||s.execScript("var "+n[0]);for(;n.length&&(i=n.shift());)!n.length&&$.p(e)?s[i]=e:s=s[i]&&s[i]!==Object.prototype[i]?s[i]:s[i]={}},$.H=function(t,e){function i(){}i.prototype=e.prototype,t.u=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.XF=function(t,i,n){for(var s=Array(arguments.length-2),a=2;a<arguments.length;a++)s[a-2]=arguments[a];return e.prototype[i].apply(t,s)}},ta=function(t){if(Error.captureStackTrace)Error.captureStackTrace(this,ta);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))},$.ua=function(t){return t[t.length-1]},$.va=function(t,e,i){var n=t.length,s=$.z(t)?t.split(""):t;for(--n;0<=n;--n)n in s&&e.call(i,s[n],n,t)},$.ya=function(t,e,i){return 0>(e=$.xa(t,e,i))?null:$.z(t)?t.charAt(e):t[e]},$.xa=function(t,e,i){for(var n=t.length,s=$.z(t)?t.split(""):t,a=0;a<n;a++)if(a in s&&e.call(i,s[a],a,t))return a;return-1},$.Aa=function(t,e){return 0<=(0,$.za)(t,e)},$.Ba=function(t,e){$.Aa(t,e)||t.push(e)},$.Da=function(t,e,i){$.Ca(t,i,0,e)},$.Fa=function(t,e){var i,n=(0,$.za)(t,e);return(i=0<=n)&&Ea(t,n),i},Ea=function(t,e){return 1==Array.prototype.splice.call(t,e,1).length},$.Ga=function(t){return Array.prototype.concat.apply([],arguments)},daa=function(t){return Array.prototype.concat.apply([],arguments)},$.Ha=function(t){var e=t.length;if(0<e){for(var i=Array(e),n=0;n<e;n++)i[n]=t[n];return i}return[]},$.Ia=function(t,e){for(var i=1;i<arguments.length;i++){var n=arguments[i];if($.la(n)){var s=t.length||0,a=n.length||0;t.length=s+a;for(var o=0;o<a;o++)t[s+o]=n[o]}else t.push(n)}},$.Ca=function(t,e,i,n){return Array.prototype.splice.apply(t,$.Ja(arguments,1))},$.Ja=function(t,e,i){return 2>=arguments.length?Array.prototype.slice.call(t,e):Array.prototype.slice.call(t,e,i)},$.Ka=function(t,e,i){e=e||t,i=i||function(t){return $.C(t)?"o"+$.oa(t):(typeof t).charAt(0)+t};for(var n={},s=0,a=0;a<t.length;){var o=t[a++],r=i(o);Object.prototype.hasOwnProperty.call(n,r)||(n[r]=!0,e[s++]=o)}e.length=s},$.Na=function(t,e,i){return La(t,i||$.Ma,!1,e)},$.Oa=function(t,e,i){return La(t,e,!0,void 0,i)},La=function(t,e,i,n,s){for(var a,o=0,r=t.length;o<r;){var l,h=o+r>>1;0<(l=i?e.call(s,t[h],h,t):e(n,t[h]))?o=h+1:(r=h,a=!l)}return a?o:~o},$.Pa=function(t,e){t.sort(e||$.Ma)},$.Ra=function(t,e){for(var i=Array(t.length),n=0;n<t.length;n++)i[n]={index:n,value:t[n]};var s=e||$.Ma;for($.Pa(i,(function(t,e){return s(t.value,e.value)||t.index-e.index})),n=0;n<t.length;n++)t[n]=i[n].value},eaa=function(t,e){var i=$.Ma;$.Pa(t,(function(t,n){return i(e(t),e(n))}))},Sa=function(t){eaa(t,(function(t){return t.offset}))},$.Ta=function(t,e){if(!$.la(t)||!$.la(e)||t.length!=e.length)return!1;for(var i=t.length,n=faa,s=0;s<i;s++)if(!n(t[s],e[s]))return!1;return!0},$.Ma=function(t,e){return t>e?1:t<e?-1:0},faa=function(t,e){return t===e},$.Ua=function(t,e,i){return 0>(i=$.Na(t,e,i))&&($.Da(t,e,-(i+1)),!0)},$.Va=function(t,e){var i=[],n=0,s=t;if(void 0!==e&&(n=t,s=e),0>s-n)return[];for(;n<s;n+=1)i.push(n);return i},Ya=function(t){return $.Ga.apply([],(0,$.Wa)(t,Xa,void 0))},$.Za=function(t,e,i){return Math.min(Math.max(t,e),i)},$.$a=function(t,e){var i=t%e;return 0>i*e?i+e:i},$.ab=function(t){return $.$a(t,360)},$.bb=function(t){return t*Math.PI/180},$.cb=function(t){return 180*t/Math.PI},$.db=function(t,e){return e*Math.cos($.bb(t))},$.eb=function(t,e){return e*Math.sin($.bb(t))},$.fb=function(t){return 0<t?1:0>t?-1:t},$.gb=function(t,e){this.x=$.p(t)?t:0,this.y=$.p(e)?e:0},$.ib=function(t,e){return t==e||!(!t||!e)&&t.x==e.x&&t.y==e.y},$.jb=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},$.kb=function(t,e,i,n){this.top=t,this.right=e,this.bottom=i,this.left=n},$.lb=function(t,e){this.width=t,this.height=e},$.mb=function(t,e){return t==e||!(!t||!e)&&t.width==e.width&&t.height==e.height},$.I=function(t,e,i,n){this.left=t,this.top=e,this.width=i,this.height=n},$.nb=function(t,e){return t==e||!(!t||!e)&&t.left==e.left&&t.width==e.width&&t.top==e.top&&t.height==e.height},$.ob=function(t,e){var i=Math.max(t.left,e.left),n=Math.min(t.left+t.width,e.left+e.width);if(i<=n){var s=Math.max(t.top,e.top),a=Math.min(t.top+t.height,e.top+e.height);if(s<=a)return new $.I(i,s,n-i,a-s)}return null},gaa=function(t,e){var i;if((i=$.ob(t,e))&&i.height&&i.width){i=[];var n=t.top,s=t.height,a=t.left+t.width,o=t.top+t.height,r=e.left+e.width,l=e.top+e.height;e.top>t.top&&(i.push(new $.I(t.left,t.top,t.width,e.top-t.top)),n=e.top,s-=e.top-t.top),l<o&&(i.push(new $.I(t.left,l,t.width,o-l)),s=l-n),e.left>t.left&&i.push(new $.I(t.left,n,e.left-t.left,s)),r<a&&i.push(new $.I(r,n,a-r,s))}else i=[t.clone()];return i},$.pb=function(t,e){var i=Math.max(t.left+t.width,e.left+e.width),n=Math.max(t.top+t.height,e.top+e.height);t.left=Math.min(t.left,e.left),t.top=Math.min(t.top,e.top),t.width=i-t.left,t.height=n-t.top},$.qb=function(t,e){return e instanceof $.gb?e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height:t.left<=e.left&&t.left+t.width>=e.left+e.width&&t.top<=e.top&&t.top+t.height>=e.top+e.height},$.rb=function(t,e){var i=e.x<t.left?t.left-e.x:Math.max(e.x-(t.left+t.width),0),n=e.y<t.top?t.top-e.y:Math.max(e.y-(t.top+t.height),0);return i*i+n*n},$.sb=function(t){return new $.gb(t.left+t.width/2,t.top+t.height/2)},$.tb=function(t,e,i,n,s,a,o){var r=$.bb(a);r/=a=Math.ceil(Math.abs(r)/Math.PI*2);var l=$.bb(s);for(s=o?[t+$.db(s,i),e+$.eb(s,n)]:[],o=0;o<a;o++){var h=Math.cos(l),c=Math.sin(l),u=4/3*Math.sin(r/2)/(1+Math.cos(r/2)),d=t+(h-u*c)*i,p=e+(c+u*h)*n;l+=r,h=Math.cos(l),c=Math.sin(l),s.push(d,p,t+(h+u*c)*i,e+(c-u*h)*n,t+h*i,e+c*n)}return s},ub=function(t){function e(t,e,i,n,s){var a=1-s;return a*a*a*t+3*a*a*s*e+3*a*s*s*i+s*s*s*n}for(var i=[[arguments[0]],[arguments[1]]],n=2,s=arguments.length;n<s;n+=6){var a=[arguments[n-2],arguments[n-1]],o=[arguments[n],arguments[n+1]],r=[arguments[n+2],arguments[n+3]],l=[arguments[n+4],arguments[n+5]];i[0].push(l[0]),i[1].push(l[1]);for(var h,c=0;2>c;c++){var u=-3*a[c]+9*o[c]-9*r[c]+3*l[c],d=6*a[c]-12*o[c]+6*r[c];if(h=3*o[c]-3*a[c],0==u)0!=d&&0<(h=-h/d)&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h));else{var p=d*d-4*h*u;0<p?(0<(h=(-d+Math.sqrt(p))/(2*u))&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h)),0<(h=(-d-Math.sqrt(p))/(2*u))&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h))):0==p&&0<(h=-d/(2*u))&&1>h&&i[c].push(e(a[c],o[c],r[c],l[c],h))}}}return(n=new $.I(Math.min.apply(null,i[0]),Math.min.apply(null,i[1]),0,0)).width=Math.max.apply(null,i[0])-n.left,n.height=Math.max.apply(null,i[1])-n.top,n},yb=function(t){if(0==arguments.length)return null;for(var e=null,i=!1,n=0,s=arguments.length;n<s;n++)arguments[n]&&(e?(i||(i=!!(e=e.clone())),$.wb(e,arguments[n])):e=arguments[n]);return e},$.Ab=function(t,e){if(!e||$.zb(e))return t;var i=t.left,n=t.top,s=i+t.width,a=n+t.height;return a=[i,n,i,a,s,n,s,a],e.transform(a,0,a,0,4),i=Math.min(a[0],a[2],a[4],a[6]),n=Math.min(a[1],a[3],a[5],a[7]),s=Math.max(a[0],a[2],a[4],a[6]),a=Math.max(a[1],a[3],a[5],a[7]),new $.I(i,n,s-i,a-n)},$.Bb=function(t,e,i,n){var s=(t*i+e*n)/(Math.sqrt(t*t+e*e)*Math.sqrt(i*i+n*n));return s=$.Za(s,-1,1),s=$.cb(Math.acos(s)),0<t*n-e*i?s:-s},$.Cb=function(t){return t?$.cb(Math.atan2(t.We,t.Le)):0},$.Db=function(t,e,i,n,s,a){if(6==arguments.length)this.setTransform(t,e,i,n,s,a);else{if(0!=arguments.length)throw Error("Insufficient matrix parameters");this.od=this.Le=1,this.We=this.gf=this.Jd=this.Fd=0}},$.zb=function(t){return 1==t.od&&0==t.We&&0==t.gf&&1==t.Le&&0==t.Jd&&0==t.Fd},$.Eb=function(t,e,i){t.od*=e,t.gf*=e,t.Jd*=e,t.We*=i,t.Le*=i,t.Fd*=i},$.Fb=function(t,e,i){t.Jd+=e,t.Fd+=i},Gb=function(t,e,i){var n=t.od,s=t.We;t.od+=i*t.gf,t.We+=i*t.Le,t.gf+=e*n,t.Le+=e*s},$.wb=function(t,e){var i=t.od,n=t.gf;return t.od=e.od*i+e.We*n,t.gf=e.gf*i+e.Le*n,t.Jd+=e.Jd*i+e.Fd*n,i=t.We,n=t.Le,t.We=e.od*i+e.We*n,t.Le=e.gf*i+e.Le*n,t.Fd+=e.Jd*i+e.Fd*n,t},$.Hb=function(t,e){var i=t.od,n=t.We;t.od=e.od*i+e.gf*n,t.We=e.We*i+e.Le*n,i=t.gf,n=t.Le,t.gf=e.od*i+e.gf*n,t.Le=e.We*i+e.Le*n,i=t.Jd,n=t.Fd,t.Jd=e.od*i+e.gf*n+e.Jd,t.Fd=e.We*i+e.Le*n+e.Fd},$.Jb=function(t){var e=t.od*t.Le-t.gf*t.We;return new $.Db(t.Le/e,-t.We/e,-t.gf/e,t.od/e,(t.gf*t.Fd-t.Le*t.Jd)/e,(t.We*t.Jd-t.od*t.Fd)/e)},$.Kb=function(t,e,i){var n=new $.Db,s=Math.cos(t);return t=Math.sin(t),n.setTransform(s,t,-t,s,e-e*s+i*t,i-e*t-i*s)},Lb=function(t,e){var i=t.left,n=t.top;switch(e=e.toLowerCase()){case"left-center":n+=t.height/2;break;case"left-bottom":n+=t.height;break;case"center-top":i+=t.width/2;break;case"center":i+=t.width/2,n+=t.height/2;break;case"center-bottom":i+=t.width/2,n+=t.height;break;case"right-top":i+=t.width;break;case"right-center":i+=t.width,n+=t.height/2;break;case"right-bottom":i+=t.width,n+=t.height}return[i,n]},$.Mb=function(t){var e,i,n=t.trim().replace(/\(\s+/gi,"(").replace(/\s+\)/gi,")").replace(/(\s+,\s+)|(\s+)/gi,",").replace(/(\)),*(\w)/gi,"$1 $2").split(" "),s=new $.Db;for(t=0,i=n.length;t<i;t++){var a=/^(matrix|translate|rotate|scale|skewX|skewY)\(([e\d.,-]+)\)/i.exec(n[t]),o=a[1],r=a[2].split(",");for(a=0,e=r.length;a<e;a++)r[a]=(0,window.parseFloat)(r[a]);switch(o){case"matrix":o=new $.Db(r[0],r[1],r[2],r[3],r[4],r[5]),$.wb(s,o);break;case"translate":s.translate(r[0],r[1]||0);break;case"rotate":s.rotate($.bb(r[0]),r[1]||0,r[2]||0);break;case"scale":s.scale(r[0],r[1]||0);break;case"skewX":Gb(s,Math.tan($.bb(r[0])),0);break;case"skewY":Gb(s,0,Math.tan($.bb(r[0])))}}return s},$.Ub=function(t,e,i,n,s,a,o){var r,l;if($.z(t)){var h=Nb(t,!1);$.z(h)&&$.p(e)&&(n=(0,window.parseFloat)(e),h={color:t,opacity:(0,window.isNaN)(n)?1:$.Za(n,0,1)})}else if($.A(t)){var c=$.Ja(t,0);for(r=c.length;r--;){var u=c[r];$.z(u)&&(u=Ob(u)),(0,window.isNaN)(u.offset)&&(u.offset=r/(c.length-1||1)),c[r]=u}if((u=$.Ja(c,0)).sort((function(t,e){return t.offset-e.offset})),0!=u[0].offset){var d={offset:0,color:c[0].color};$.p(c[0].opacity)&&!(0,window.isNaN)(c[0].opacity)&&(d.opacity=$.Za(c[0].opacity,0,1)),c.unshift(d)}1!=u[u.length-1].offset&&(d={offset:1,color:c[c.length-1].color},$.p(c[c.length-1].opacity)&&!(0,window.isNaN)(c[c.length-1].opacity)&&(d.opacity=$.Za(c[c.length-1].opacity,0,1)),c.push(d)),h=$.ea(e)&&!(0,window.isNaN)(e)&&$.ea(i)&&!(0,window.isNaN)(i)?{keys:c,cx:e=e||0,cy:i=i||0,mode:Pb(n),fx:(0,window.isNaN)(a)?e:+a,fy:(0,window.isNaN)(o)?i:+o,opacity:$.Za($.p(s)?s:1,0,1)}:{keys:c,angle:+e||0,mode:Pb(i)||!!i,opacity:$.Za((0,window.isNaN)(+n)?1:+n,0,1)}}else if($.C(t))if($.J(t,$.Qb))h=t;else if("pattern"==t.type)delete t.id,h=t.bounds,h=new $.I(h.left,h.top,h.width,h.height),(h=$.Sb(h)).pe(t);else if("keys"in t){for(r=(c=$.Ja(t.keys,0)).length;r--;)u=c[r],$.z(u)?d=Ob(u):(l=$.z(u.color)?u.color:$.A(u.color)?$.Tb(u.color):"black",d={offset:u.offset,color:l},(0,window.isNaN)(u.opacity)||(d.opacity=$.Za(u.opacity,0,1))),(0,window.isNaN)(d.offset)&&(d.offset=r/(c.length-1||1)),c[r]=d;(u=$.Ja(c,0)).sort((function(t,e){return t.offset-e.offset})),0!=u[0].offset&&(d={offset:0,color:c[0].color},$.p(c[0].opacity)&&!(0,window.isNaN)(c[0].opacity)&&(d.opacity=$.Za(c[0].opacity,0,1)),c.unshift(d)),1!=u[u.length-1].offset&&(d={offset:1,color:c[c.length-1].color},$.p(c[c.length-1].opacity)&&!(0,window.isNaN)(c[c.length-1].opacity)&&(d.opacity=$.Za(c[c.length-1].opacity,0,1)),c.push(d)),n=$.Za($.p(t.opacity)?t.opacity:1,0,1),s=Pb(t.mode),e=t.cx,i=t.cy,h=$.ea(e)&&!(0,window.isNaN)(e)&&$.ea(i)&&!(0,window.isNaN)(i)?{keys:c,cx:+e,cy:+i,mode:s,fx:(0,window.isNaN)(t.fx)?+t.cx:+t.fx,fy:(0,window.isNaN)(t.fy)?+t.cy:+t.fy,opacity:n}:{keys:c,angle:+t.angle||0,mode:s||!!t.mode,opacity:n},null!=(t=t.transform)&&($.J(t,$.Db)?h.transform=t:$.C(t)?(h.transform=new $.Db,h.transform.setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12)):$.z(t)&&(h.transform=$.Mb(t)))}else"src"in t?h={src:t.src,mode:$.p(t.mode)?t.mode:"stretch",opacity:$.Za($.p(t.opacity)?t.opacity:1,0,1)}:(l=$.z(t.color)?t.color:"black",h=(0,window.isNaN)(t.opacity)?l:{color:l,opacity:$.Za(t.opacity,0,1)});else h="none";return h},$.Wb=function(t,e,i,n,s){if(null===t)var a="none";else{if($.z(t)){a=Vb(t,1);var o=(0,window.parseFloat)(a[0]);(0,window.isNaN)(o)||(t=a[1],e=o)}if(a=$.C(t),e=(0,window.parseFloat)(a&&"thickness"in t?t.thickness:e),!(0,window.isNaN)(e)&&!e)return"none";o=a&&"dash"in t;var r=a&&"lineJoin"in t,l=a&&"lineCap"in t;if("none"==(a=$.Ub(t)))return a;a=$.J(a,$.Qb)?"black":a,(!(0,window.isNaN)(e)||o||r||l||$.p(i)||$.p(n)||$.p(s))&&($.z(a)&&(a={color:a}),(0,window.isNaN)(e)||(a.thickness=e),o?a.dash=t.dash||"none":null!=i&&(a.dash=i||"none"),r?a.lineJoin=t.lineJoin||"none":null!=n&&(a.lineJoin=n||"none"),l?a.lineCap=t.lineCap||"none":null!=s&&(a.lineCap=s||"none"))}return a},$.Yb=function(t,e,i,n){return $.z(t)&&"none"==t.toLowerCase()?null:($.z(t)||$.ea(t)?e=Xb(t,e,$.p(i)?(0,window.parseFloat)(i):void 0,$.p(n)?(0,window.parseFloat)(n):void 0):$.J(t,$.Qb)?e=t:$.C(t)?"pattern"==t.type?(delete t.id,e=t.bounds,e=new $.I(e.left,e.top,e.width,e.height),(e=$.Sb(e)).pe(t)):e=Xb(t.type,t.color,t.thickness,t.size):e=null,e)},Pb=function(t){if(null!=t){if($.J(t,$.I))return t;if($.C(t)&&!(0,window.isNaN)(t.left)&&!(0,window.isNaN)(t.top)&&!(0,window.isNaN)(t.width)&&!(0,window.isNaN)(t.height))return new $.I(t.left,t.top,t.width,t.height)}return null},$.Zb=function(t){return"object"===$.ka(t)&&"offsetX"in t&&"offsetY"in t?t.offsetX+" "+t.offsetY+" "+(t.blurRadius||"0")+" "+(t.color||""):$.z(t)?t:"none"},Nb=function(t,e){var i=t.split(" "),n=1<i.length?$.Za(+i[i.length-1],0,1):window.NaN;if((0,window.isNaN)(n)){if(e)return{color:t};n=1}else i.pop(),t=i.join(" ");return e||1!=n?{color:t,opacity:n}:t},Ob=function(t){var e=Vb(t,1),i=window.NaN;return 1<e.length&&(i=(0,window.parseFloat)(e[0]),t=(0,window.isNaN)(i)?t:e[1]),t=Nb(t,!0),(0,window.isNaN)(i)||(t.offset=$.Za(i,0,1)),t},$.$b=function(t){var e;return t&&"none"!=t?(0,window.isNaN)(e=t.thickness)||null===e?1:e:0},$.ac=function(){},$.cc=function(t,e,i){return e[t.b]||(e[t.b]=bc(t,e,i))},bc=function(t,e,i){return["ac",$.p(i)?i:e.Sm?e.Sm():"",t.i,(t.f++).toString(36)].join("_")},$.ec=function(t,e){return 0==t.lastIndexOf(e,0)},$.fc=function(t,e){var i=t.length-e.length;return 0<=i&&t.indexOf(e,i)==i},$.gc=function(t,e){for(var i=t.split("%s"),n="",s=Array.prototype.slice.call(arguments,1);s.length&&1<i.length;)n+=i.shift()+s.shift();return n+i.join("%s")},$.hc=function(t){return t.replace(/(\r\n|\r|\n)/g,"\n")},ic=function(t){return t.replace(/\xa0|[ \t]+/g," ")},$.lc=function(t){return t.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},$.nc=function(t){return t.replace(/^[\s\xa0]+/,"")},$.oc=function(t,e){return t.replace(/(\r\n|\r|\n)/g,e?"<br />":"<br>")},$.pc=function(t){return haa.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(iaa,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(jaa,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(kaa,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(laa,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(maa,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(naa,"&#0;")),t):t},sc=function(t){for(var e=[],i=0;i<t.length;i++){var n=i,s=t.charAt(i);if(s in qc)s=qc[s];else if(s in rc)s=qc[s]=rc[s];else{var a=s.charCodeAt(0);if(31<a&&127>a)var o=s;else 256>a?(o="\\x",(16>a||256<a)&&(o+="0")):(o="\\u",4096>a&&(o+="0")),o+=a.toString(16).toUpperCase();s=qc[s]=o}e[n]=s}return e.join("")},tc=function(t){return String(t).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},$.uc=function(t,e){var i=$.p(void 0)?t.toFixed(void 0):String(t),n=i.indexOf(".");return-1==n&&(n=i.length),oaa("0",Math.max(0,e-n))+i},$.xc=function(t,e){for(var i=0,n=(0,$.vc)(String(t)).split("."),s=(0,$.vc)(String(e)).split("."),a=Math.max(n.length,s.length),o=0;0==i&&o<a;o++){var r=n[o]||"",l=s[o]||"";do{if(r=/(\d*)(\D*)(.*)/.exec(r)||["","","",""],l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],0==r[0].length&&0==l[0].length)break;i=wc(0==r[1].length?0:(0,window.parseInt)(r[1],10),0==l[1].length?0:(0,window.parseInt)(l[1],10))||wc(0==r[2].length,0==l[2].length)||wc(r[2],l[2]),r=r[3],l=l[3]}while(0==i)}return i},wc=function(t,e){return t<e?-1:t>e?1:0},yc=function(t){return String(t).replace(/\-([a-z])/g,(function(t,e){return e.toUpperCase()}))},$.zc=function(t){var e=$.z(void 0)?tc(void 0):"\\s";return t.replace(new RegExp("(^"+(e?"|["+e+"]+":"")+")([a-z])","g"),(function(t,e,i){return e+i.toUpperCase()}))},Vb=function(t,e){for(var i=t.split(" "),n=[];0<e&&i.length;)n.push(i.shift()),e--;return i.length&&n.push(i.join(" ")),n},$.Cc=function(t){return-1!=Bc.indexOf(t)},$.Dc=function(t,e,i){for(var n in t)e.call(i,t[n],n,t)},paa=function(t,e){var i,n={};for(i in t)e.call(void 0,t[i],i,t)&&(n[i]=t[i]);return n},$.Ec=function(t){var e,i=[],n=0;for(e in t)i[n++]=t[e];return i},$.Fc=function(t){var e,i=[],n=0;for(e in t)i[n++]=e;return i},$.Gc=function(t,e){return null!==t&&e in t},$.Hc=function(t,e,i){for(var n in t)if(e.call(i,t[n],n,t))return n},$.Ic=function(t,e){var i=$.Hc(t,e,void 0);return i&&t[i]},$.Jc=function(t){for(var e in t)return!1;return!0},$.Kc=function(t){for(var e in t)delete t[e]},$.Lc=function(t,e){e in t&&delete t[e]},$.Mc=function(t,e,i){if(null!==t&&e in t)throw Error('The object already contains the key "'+e+'"');t[e]=i},$.Pc=function(t,e){for(var i in t)if(!(i in e)||t[i]!==e[i])return!1;for(i in e)if(!(i in t))return!1;return!0},$.Qc=function(t){var e,i={};for(e in t)i[e]=t[e];return i},$.Sc=function(t,e){for(var i,n,s=1;s<arguments.length;s++){for(i in n=arguments[s])t[i]=n[i];for(var a=0;a<Rc.length;a++)i=Rc[a],Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}},Tc=function(t){var e=arguments.length;if(1==e&&$.A(arguments[0]))return Tc.apply(null,arguments[0]);for(var i={},n=0;n<e;n++)i[arguments[n]]=!0;return i},$.Uc=function(){return $.Cc("Trident")||$.Cc("MSIE")},Vc=function(){return($.Cc("Chrome")||$.Cc("CriOS"))&&!$.Cc("Edge")},Wc=function(){return $.Cc("iPhone")&&!$.Cc("iPod")&&!$.Cc("iPad")},Xc=function(){return Wc()||$.Cc("iPad")||$.Cc("iPod")},Yc=function(t){return Yc[" "](t),t},$.Zc=function(t,e){try{return Yc(t[e]),!0}catch(i){}return!1},raa=function(t,e){var i=qaa;return Object.prototype.hasOwnProperty.call(i,t)?i[t]:i[t]=e(t)},$c=function(){var t=$.fa.document;return t?t.documentMode:void 0},$.bd=function(t){return raa(t,(function(){return 0<=$.xc($.ad,t)}))},$.dd=function(t){return Number(cd)>=t},$.fd=function(t){var e=$.ka(t);if("array"==e){e=[];for(var i=0;i<t.length;i++)i in t&&(e[i]=$.fd(t[i]))}else{if("object"!=e)return t;for(i in e={},t)t.hasOwnProperty(i)&&(e[i]=$.fd(t[i]))}return e},$.kd=function(t,e,i){if($.gd||$.hd)t.apply(i,e);else for(var n=0,s=5e4,a=Math.ceil(e.length/5e4),o=0;o<a;o++)t.apply(i,e.slice(n,s)),n+=5e4,s+=5e4},$.J=function(t,e){return!!t&&t instanceof e},$.ld=function(t){return saa[t]||"Unknown error happened"},$.od=function(){0!=md&&(nd[$.oa(this)]=this),this.md=this.md,this.bv=this.bv},$.rd=function(t,e){$.pd(t,$.qa($.qd,e))},$.pd=function(t,e,i){t.md?$.p(i)?e.call(i):e():(t.bv||(t.bv=[]),t.bv.push($.p(i)?(0,$.pa)(e,i):e))},$.qd=function(t){t&&"function"==typeof t.ld&&t.ld()},$.sd=function(t){for(var e=0,i=arguments.length;e<i;++e){var n=arguments[e];$.la(n)?$.sd.apply(null,n):$.qd(n)}},wd=function(t,e){this.type=t,this.currentTarget=this.target=e,this.defaultPrevented=this.b=!1,this.q5=!0},zd=function(t){return $.xd?"webkit"+t:$.yd?"o"+t.toLowerCase():t.toLowerCase()},$.Bd=function(t,e){if(wd.call(this,t?t.type:""),this.relatedTarget=this.currentTarget=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0,this.key="",this.f=this.keyCode=0,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.i=!1,this.pointerId=0,this.pointerType="",this.kf=null,t){var i=this.type=t.type,n=t.changedTouches?t.changedTouches[0]:null;this.target=t.target||t.srcElement,this.currentTarget=e;var s=t.relatedTarget;s?$.gd&&($.Zc(s,"nodeName")||(s=null)):"mouseover"==i?s=t.fromElement:"mouseout"==i&&(s=t.toElement),this.relatedTarget=s,null===n?(this.offsetX=$.xd||void 0!==t.offsetX?t.offsetX:t.layerX,this.offsetY=$.xd||void 0!==t.offsetY?t.offsetY:t.layerY,this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0),this.button=t.button,this.keyCode=t.keyCode||0,this.key=t.key||"",this.f=t.charCode||("keypress"==i?t.keyCode:0),this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.i=$.Ad?t.metaKey:t.ctrlKey,this.pointerId=t.pointerId||0,this.pointerType=$.z(t.pointerType)?t.pointerType:taa[t.pointerType]||"",this.state=t.state,this.kf=t,t.defaultPrevented&&this.preventDefault()}},Cd=function(t,e){return uaa?t.kf.button==e:"click"==t.type?0==e:!!(t.kf.button&vaa[e])},$.Ed=function(t){return!(!t||!t[Dd])},xaa=function(t,e,i,n,s){this.listener=t,this.proxy=null,this.src=e,this.type=i,this.capture=!!n,this.zy=s,this.key=++waa,this.uE=this.gL=!1},Gd=function(t){t.uE=!0,t.listener=null,t.proxy=null,t.src=null,t.zy=null},Hd=function(t){this.src=t,this.b={},this.f=0},Id=function(t,e){var i=e.type;if(!(i in t.b))return!1;var n=$.Fa(t.b[i],e);return n&&(Gd(e),0==t.b[i].length&&(delete t.b[i],t.f--)),n},Jd=function(t,e,i,n){for(var s=0;s<t.length;++s){var a=t[s];if(!a.uE&&a.listener==e&&a.capture==!!i&&a.zy==n)return s}return-1},$.Ld=function(t,e,i,n,s){if(n&&n.once)return Kd(t,e,i,n,s);if($.A(e)){for(var a=0;a<e.length;a++)$.Ld(t,e[a],i,n,s);return null}return i=Md(i),$.Ed(t)?t.wa(e,i,$.C(n)?!!n.capture:!!n,s):Nd(t,e,i,!1,n,s)},Nd=function(t,e,i,n,s,a){if(!e)throw Error("Invalid event type");var o=$.C(s)?!!s.capture:!!s,r=Od(t);if(r||(t[Ud]=r=new Hd(t)),(i=r.add(e,i,n,o,a)).proxy)return i;if(n=yaa(),i.proxy=n,n.src=t,n.listener=i,t.addEventListener)zaa||(s=o),void 0===s&&(s=!1),t.addEventListener(e.toString(),n,s);else if(t.attachEvent)t.attachEvent(Vd(e.toString()),n);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(n)}return i},yaa=function(){var t=Aaa,e=Xd?function(i){return t.call(e.src,e.listener,i)}:function(i){if(!(i=t.call(e.src,e.listener,i)))return i};return e},Kd=function(t,e,i,n,s){if($.A(e)){for(var a=0;a<e.length;a++)Kd(t,e[a],i,n,s);return null}return i=Md(i),$.Ed(t)?t.Ce(e,i,$.C(n)?!!n.capture:!!n,s):Nd(t,e,i,!0,n,s)},$.Yd=function(t,e,i,n,s){if($.A(e)){for(var a=0;a<e.length;a++)$.Yd(t,e[a],i,n,s);return null}return n=$.C(n)?!!n.capture:!!n,i=Md(i),$.Ed(t)?t.gc(e,i,n,s):!!t&&!(!(t=Od(t))||!(e=t.fH(e,i,n,s)))&&Zd(e)},Zd=function(t){if($.ea(t)||!t||t.uE)return!1;var e=t.src;if($.Ed(e))return e.TB(t);var i=t.type,n=t.proxy;return e.removeEventListener?e.removeEventListener(i,n,t.capture):e.detachEvent?e.detachEvent(Vd(i),n):e.addListener&&e.removeListener&&e.removeListener(n),(i=Od(e))?(Id(i,t),0==i.f&&(i.src=null,e[Ud]=null)):Gd(t),!0},$.$d=function(t,e){if(!t)return 0;if($.Ed(t))return t.Bl(e);var i=Od(t);if(!i)return 0;var n,s=0,a=e&&e.toString();for(n in i.b)if(!a||n==a)for(var o=i.b[n].concat(),r=0;r<o.length;++r)Zd(o[r])&&++s;return s},$.be=function(t,e,i,n,s){return i=Md(i),n=!!n,$.Ed(t)||t&&(t=Od(t))?t.fH(e,i,n,s):null},Vd=function(t){return t in ce?ce[t]:ce[t]="on"+t},$.ee=function(t,e,i,n){var s=!0;if((t=Od(t))&&(e=t.b[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var a=e[t];a&&a.capture==i&&!a.uE&&(a=de(a,n),s=s&&!1!==a)}return s},de=function(t,e){var i=t.listener,n=t.zy||t.src;return t.gL&&Zd(t),i.call(n,e)},Aaa=function(t,e){if(t.uE)return!0;if(!Xd){var i=e||$.ha("window.event"),n=new $.Bd(i,this),s=!0;if(!(0>i.keyCode||null!=i.returnValue)){t:{var a=!1;if(0==i.keyCode)try{i.keyCode=-1;break t}catch(l){a=!0}(a||null==i.returnValue)&&(i.returnValue=!0)}for(i=[],a=n.currentTarget;a;a=a.parentNode)i.push(a);a=t.type;for(var o=i.length-1;!n.b&&0<=o;o--){n.currentTarget=i[o];var r=$.ee(i[o],a,!0,n);s=s&&r}for(o=0;!n.b&&o<i.length;o++)n.currentTarget=i[o],r=$.ee(i[o],a,!1,n),s=s&&r}return s}return de(t,new $.Bd(e,this))},Od=function(t){return(t=t[Ud])instanceof Hd?t:null},Md=function(t){return $.D(t)?t:(t[fe]||(t[fe]=function(e){return t.handleEvent(e)}),t[fe])},$.he=function(){this.b="",this.f=$.ge},$.ie=function(t){var e=new $.he;return e.b=t,e},$.ke=function(){this.f="",this.i=$.je},$.le=function(t){var e=new $.ke;return e.f=t,e},$.ne=function(){this.b="",this.f=$.me},$.oe=function(t){var e=new $.ne;return e.b=t,e},$.qe=function(){this.f="",this.o=$.pe,this.i=null},$.re=function(t,e){var i=new $.qe;return i.f=t,i.i=e,i},$.ye=function(t){return t?new se($.te(t)):ue||(ue=new se)},$.ze=function(t,e){return $.z(e)?t.getElementById(e):e},$.Ae=function(t,e,i,n){if(t=n||t,e=e&&"*"!=e?String(e).toUpperCase():"",t.querySelectorAll&&t.querySelector&&(e||i))return t.querySelectorAll(e+(i?"."+i:""));if(i&&t.getElementsByClassName){if(t=t.getElementsByClassName(i),e){n={};for(var s,a=0,o=0;s=t[o];o++)e==s.nodeName&&(n[a++]=s);return n.length=a,n}return t}if(t=t.getElementsByTagName(e||"*"),i){for(n={},o=a=0;s=t[o];o++)"function"==typeof(e=s.className).split&&$.Aa(e.split(/\s+/),i)&&(n[a++]=s);return n.length=a,n}return t},$.Ce=function(t,e){$.Dc(e,(function(e,i){e&&e.By&&(e=e.cu()),"style"==i?t.style.cssText=e:"class"==i?t.className=e:"for"==i?t.htmlFor=e:Be.hasOwnProperty(i)?t.setAttribute(Be[i],e):$.ec(i,"aria-")||$.ec(i,"data-")?t.setAttribute(i,e):t[i]=e}))},$.Ee=function(t){return t=t.document,t=$.De(t)?t.documentElement:t.body,new $.lb(t.clientWidth,t.clientHeight)},$.He=function(t){var e=$.Fe(t);return t=$.Ge(t),$.hd&&$.bd("10")&&t.pageYOffset!=e.scrollTop?new $.gb(e.scrollLeft,e.scrollTop):new $.gb(t.pageXOffset||e.scrollLeft,t.pageYOffset||e.scrollTop)},$.Fe=function(t){return t.scrollingElement?t.scrollingElement:!$.xd&&$.De(t)?t.documentElement:t.body||t.documentElement},$.Ge=function(t){return t.parentWindow||t.defaultView},$.Me=function(t,e,i){return Le(window.document,arguments)},Le=function(t,e){var i=String(e[0]),n=e[1];if(!Baa&&n&&(n.name||n.type)){if(i=["<",i],n.name&&i.push(' name="',$.pc(n.name),'"'),n.type){i.push(' type="',$.pc(n.type),'"');var s={};$.Sc(s,n),delete s.type,n=s}i.push(">"),i=i.join("")}return i=t.createElement(i),n&&($.z(n)?i.className=n:$.A(n)?i.className=n.join(" "):$.Ce(i,n)),2<e.length&&Ne(t,i,e,2),i},Ne=function(t,e,i,n){function s(i){i&&e.appendChild($.z(i)?t.createTextNode(i):i)}for(;n<i.length;n++){var a=i[n];$.la(a)&&!$.Oe(a)?(0,$.Pe)($.Qe(a)?$.Ha(a):a,s):s(a)}},$.Re=function(t,e){return t.createElement(String(e))},$.De=function(t){return"CSS1Compat"==t.compatMode},$.Se=function(t,e){t.appendChild(e)},Ue=function(t,e){Ne($.te(t),t,arguments,1)},$.Ve=function(t){for(var e;e=t.firstChild;)t.removeChild(e)},$.We=function(t,e,i){t.insertBefore(e,t.childNodes[i]||null)},$.Xe=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},$.Ze=function(t){return Caa&&null!=t.children?t.children:(0,$.Ye)(t.childNodes,(function(t){return 1==t.nodeType}))},$.$e=function(t){if($.p(t.firstElementChild))t=t.firstElementChild;else for(t=t.firstChild;t&&1!=t.nodeType;)t=t.nextSibling;return t},$.Oe=function(t){return $.C(t)&&0<t.nodeType},$.af=function(t){return $.C(t)&&1==t.nodeType},$.bf=function(t){var e;return!Daa||$.hd&&$.bd("9")&&!$.bd("10")&&$.fa.SVGElement&&t instanceof $.fa.SVGElement||!(e=t.parentElement)?(e=t.parentNode,$.af(e)?e:null):e},$.cf=function(t,e){if(!t||!e)return!1;if(t.contains&&1==e.nodeType)return t==e||t.contains(e);if(void 0!==t.compareDocumentPosition)return t==e||!!(16&t.compareDocumentPosition(e));for(;e&&t!=e;)e=e.parentNode;return e==t},$.te=function(t){return 9==t.nodeType?t:t.ownerDocument||t.document},$.df=function(t,e){if("textContent"in t)t.textContent=e;else if(3==t.nodeType)t.data=String(e);else if(t.firstChild&&3==t.firstChild.nodeType){for(;t.lastChild!=t.firstChild;)t.removeChild(t.lastChild);t.firstChild.data=String(e)}else $.Ve(t),t.appendChild($.te(t).createTextNode(String(e)))},ef=function(t){if("outerHTML"in t)return t.outerHTML;var e=$.Re($.te(t),"DIV");return e.appendChild(t.cloneNode(!0)),e.innerHTML},$.ff=function(t,e){e?t.tabIndex=0:(t.tabIndex=-1,t.removeAttribute("tabIndex"))},$.gf=function(t){return $.hd&&!$.bd("9")?null!=(t=t.getAttributeNode("tabindex"))&&t.specified:t.hasAttribute("tabindex")},$.jf=function(t){return t=t.tabIndex,$.ea(t)&&0<=t&&32768>t},$.lf=function(t){var e=[];return kf(t,e,!1),e.join("")},kf=function(t,e,i){if(!(t.nodeName in Eaa))if(3==t.nodeType)i?e.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(t.nodeValue);else if(t.nodeName in mf)e.push(mf[t.nodeName]);else for(t=t.firstChild;t;)kf(t,e,i),t=t.nextSibling},$.Qe=function(t){if(t&&"number"==typeof t.length){if($.C(t))return"function"==typeof t.item||"string"==typeof t.item;if($.D(t))return"function"==typeof t.item}return!1},se=function(t){this.b=t||$.fa.document||window.document},nf=function(t){$.od.call(this),this.qo=t,this.b={}},of=function(t,e,i,n,s,a){if($.A(i))for(var o=0;o<i.length;o++)of(t,e,i[o],n,s,a);else{if(!(e=Kd(e,i,n||t.handleEvent,s,a||t.qo||t)))return t;t.b[e.key]=e}return t},pf=function(t){$.Dc(t.b,(function(t,e){this.b.hasOwnProperty(e)&&Zd(t)}),t),t.b={}},$.qf=function(){$.od.call(this),this.gy=new Hd(this),this.N$=this,this.TW=null},$.sf=function(t,e,i,n){if(!(e=t.gy.b[String(e)]))return!0;e=e.concat();for(var s=!0,a=0;a<e.length;++a){var o=e[a];if(o&&!o.uE&&o.capture==i){var r=o.listener,l=o.zy||o.src;o.gL&&t.TB(o),s=!1!==r.call(l,n)&&s}}return s&&0!=n.q5},$.uf=function(t,e,i){if($.z(e))(e=tf(t,e))&&(t.style[e]=i);else for(var n in e){i=t;var s=e[n],a=tf(i,n);a&&(i.style[a]=s)}},tf=function(t,e){var i=vf[e];if(!i){var n=yc(e);i=n,void 0===t.style[n]&&(n=($.xd?"Webkit":$.gd?"Moz":$.hd?"ms":$.yd?"O":null)+$.zc(n),void 0!==t.style[n]&&(i=n)),vf[e]=i}return i},$.yf=function(t,e){var i=t.style[yc(e)];return void 0!==i?i:t.style[tf(t,e)]||""},$.zf=function(t,e){var i=$.te(t);return i.defaultView&&i.defaultView.getComputedStyle&&(i=i.defaultView.getComputedStyle(t,null))&&(i[e]||i.getPropertyValue(e))||""},$.Af=function(t,e){return $.zf(t,e)||(t.currentStyle?t.currentStyle[e]:null)||t.style&&t.style[e]},$.Cf=function(t,e,i){if(e instanceof $.gb){var n=e.x;e=e.y}else n=e,e=i;t.style.left=Bf(n,!1),t.style.top=Bf(e,!1)},$.Df=function(t){return t=t?$.te(t):window.document,!$.hd||$.dd(9)||$.De($.ye(t).b)?t.documentElement:t.body},Ef=function(t){try{var e=t.getBoundingClientRect()}catch(i){return{left:0,top:0,right:0,bottom:0}}return $.hd&&t.ownerDocument.body&&(t=t.ownerDocument,e.left-=t.documentElement.clientLeft+t.body.clientLeft,e.top-=t.documentElement.clientTop+t.body.clientTop),e},$.Ff=function(t){var e=$.te(t),i=new $.gb(0,0);return t==$.Df(e)||(t=Ef(t),e=$.He($.ye(e).b),i.x=t.left+e.x,i.y=t.top+e.y),i},$.Gf=function(t){return t=Ef(t),new $.gb(t.left,t.top)},$.Hf=function(t){return 1==t.nodeType?$.Gf(t):(t=t.changedTouches?t.changedTouches[0]:t,new $.gb(t.clientX,t.clientY))},$.If=function(t,e,i){if(e instanceof $.lb)i=e.height,e=e.width;else if(null==i)throw Error("missing height argument");t.style.width=Bf(e,!0),t.style.height=Bf(i,!0)},Bf=function(t,e){return"number"==typeof t&&(t=(e?Math.round(t):t)+"px"),t},$.Lf=function(t){var e=$.Jf;if("none"!=$.Af(t,"display"))return e(t);var i=t.style,n=i.display,s=i.visibility,a=i.position;return i.visibility="hidden",i.position="absolute",i.display="inline",t=e(t),i.display=n,i.position=a,i.visibility=s,t},$.Jf=function(t){var e=t.offsetWidth,i=t.offsetHeight,n=$.xd&&!e&&!i;return $.p(e)&&!n||!t.getBoundingClientRect?new $.lb(e,i):(t=Ef(t),new $.lb(t.right-t.left,t.bottom-t.top))},$.Of=function(t){var e=$.Ff(t);return t=$.Lf(t),new $.I(e.x,e.y,t.width,t.height)},$.Pf=function(t,e){t.style.display=e?"":"none"},$.Qf=function(t){return"rtl"==$.Af(t,"direction")},$.Sf=function(t,e,i){if(i=i?null:t.getElementsByTagName("*"),Rf){if(e=e?"none":"",t.style&&(t.style[Rf]=e),i){t=0;for(var n;n=i[t];t++)n.style&&(n.style[Rf]=e)}}else if(($.hd||$.yd)&&(e=e?"on":"",t.setAttribute("unselectable",e),i))for(t=0;n=i[t];t++)n.setAttribute("unselectable",e)},$.Wf=function(t){var e=$.te(t),i=$.hd&&t.currentStyle;return i&&$.De($.ye(e).b)&&"auto"!=i.width&&"auto"!=i.height&&!i.boxSizing?(e=Tf(t,i.width,"width","pixelWidth"),t=Tf(t,i.height,"height","pixelHeight"),new $.lb(e,t)):(i=new $.lb(t.offsetWidth,t.offsetHeight),e=$.Uf(t,"padding"),t=$.Vf(t),new $.lb(i.width-t.left-e.left-e.right-t.right,i.height-t.top-e.top-e.bottom-t.bottom))},Tf=function(t,e,i,n){if(/^\d+px?$/.test(e))return(0,window.parseInt)(e,10);var s=t.style[i],a=t.runtimeStyle[i];return t.runtimeStyle[i]=t.currentStyle[i],t.style[i]=e,e=t.style[n],t.style[i]=s,t.runtimeStyle[i]=a,+e},Xf=function(t,e){var i=t.currentStyle?t.currentStyle[e]:null;return i?Tf(t,i,"left","pixelLeft"):0},$.Uf=function(t,e){if($.hd){var i=Xf(t,e+"Left"),n=Xf(t,e+"Right"),s=Xf(t,e+"Top"),a=Xf(t,e+"Bottom");return new $.kb(s,n,a,i)}return i=$.zf(t,e+"Left"),n=$.zf(t,e+"Right"),s=$.zf(t,e+"Top"),a=$.zf(t,e+"Bottom"),new $.kb((0,window.parseFloat)(s),(0,window.parseFloat)(n),(0,window.parseFloat)(a),(0,window.parseFloat)(i))},Zf=function(t,e){if("none"==(t.currentStyle?t.currentStyle[e+"Style"]:null))return 0;var i=t.currentStyle?t.currentStyle[e+"Width"]:null;return i in Yf?Yf[i]:Tf(t,i,"left","pixelLeft")},$.Vf=function(t){if($.hd&&!$.dd(9)){var e=Zf(t,"borderLeft"),i=Zf(t,"borderRight"),n=Zf(t,"borderTop");return t=Zf(t,"borderBottom"),new $.kb(n,i,t,e)}return e=$.zf(t,"borderLeftWidth"),i=$.zf(t,"borderRightWidth"),n=$.zf(t,"borderTopWidth"),t=$.zf(t,"borderBottomWidth"),new $.kb((0,window.parseFloat)(n),(0,window.parseFloat)(i),(0,window.parseFloat)(t),(0,window.parseFloat)(e))},$f=function(t){return(t=t.exec(Bc))?t[1]:""},$.ag=function(t,e,i){$.qf.call(this),this.target=t,this.D=e||t,this.f=i||new $.I(window.NaN,window.NaN,window.NaN,window.NaN),this.o=$.te(t),this.Qg=new nf(this),$.rd(this,this.Qg),this.deltaY=this.deltaX=this.Ba=this.na=this.screenY=this.screenX=this.clientY=this.clientX=0,this.K=!0,this.lp=!1,this.P=0,$.Ld(this.D,["touchstart","mousedown"],this.lk,!1,this),this.G=Faa},$.bg=function(t){t.P=Math.pow(3,2)},cg=function(t,e,i){var n=$.He($.ye(t.o).b);return e+=n.x-t.aa.x,i+=n.y-t.aa.y,t.aa=n,t.deltaX+=e,t.deltaY+=i,e=t.VA(t.deltaX),t=t.xw(t.deltaY),new $.gb(e,t)},eg=function(t,e,i,n){t.ls(i,n),t.dispatchEvent(new dg("drag",t,e.clientX,e.clientY,e,i,n))},dg=function(t,e,i,n,s,a,o,r){wd.call(this,t),this.clientX=i,this.clientY=n,this.EC=s,this.left=$.p(a)?a:e.deltaX,this.top=$.p(o)?o:e.deltaY,this.f=e,this.o=!!r},fg=function(t){$.ag.call(this,t.ia()),this.i=t,this.b=[window.NaN,window.NaN],this.wa("earlycancel",this.Vja,!1,this),this.wa("start",this.LO,!1,this),this.wa("beforedrag",this.LO,!1,this),this.wa("drag",this.LO,!1,this),this.wa("end",this.LO,!1,this)},$.ig=function(){$.qf.call(this),this.BC={},this.IV=!1,this.FP=0,this.Pb(gg)},$.jg=function(t,e){t.XC&=~e},lg=function(t,e){t.lB&&(e&&t.lB.UI(t),t.lB=null),t.md&&t.gD()},ng=function(t){$.mg().zW()&&(t.ti?(t.Y&&t.Y.cG(),t.Pb(512)):t.Y&&t.Y.cG())},og=function(t){if(!t.vV){var e=t.Ig();t.vV=e?$.Jb(e):null}return t.vV},$.pg=function(){this.G="none",this.i="black",this.ec=0,$.ig.call(this)},qg=function(t,e,i,n){this.f=new $.gb(t||0,e||0),this.b=i||0,this.o=n||0,$.pg.call(this)},$.rg=function(t,e,i){qg.call(this,t,e,i,i)},$.sg=function(){this.o=[],this.f=[],this.D=[],$.pg.call(this)},tg=function(t,e,i,n,s,a){var o=0;s=s||null;for(var r=0,l=e.length;r<l;r++){var h=e[r],c=Gaa[h]*i[r];a&&1!=h?t.call(s,h,n.slice(o-2,o+c)):t.call(s,h,n.slice(o,o+c)),o+=c}},vg=function(t){return t.Uj()||(ug(t),t.Pb(32)),t},xg=function(t,e,i,n,s,a,o){if(0==n||0==s)return t.Ns(e,i);if(0==t.o.length)throw $.ld(9);var r=t.ag[0],l=t.ag[1];if(r==e&&l==i)return t;i=(l-i)/2;var h=(n=Math.abs(n))*n,c=(s=Math.abs(s))*s,u=(l=(e=(r-e)/2)*e)/h+(r=i*i)/c;return 1<u&&(h=(n*=u=Math.sqrt(u))*n,c=(s*=u)*s),0>(l=(h*c-h*r-c*l)/(h*r+c*l))&&(l=0),l=Math.sqrt(l),a==o&&(l=-l),a=l*n*i/s,r=-l*s*e/n,l=$.Bb(1,0,(e-a)/n,(i-r)/s),e=$.Bb((e-a)/n,(i-r)/s,(-e-a)/n,(-i-r)/s)%360,!o&&0<e?e-=360:o&&0>e&&(e+=360),wg(t,n,s,l,e)},wg=function(t,e,i,n,s){if(0==t.o.length)throw $.ld(9);if(0==s)return t;for(var a=t.ag[0]-$.db(n,e),o=t.ag[1]-$.eb(n,i),r=Math.ceil(Math.abs(s)/359.999-2e-15),l=s/r,h=0;h<r;h++){s=n+l;var c=a+$.db(s,e),u=o+$.eb(s,i);t.D.push(e,i,n,l,c,u),t.o.push(4),t.f.push(1),n=s}return t.$X=!1,t.ag=[c,u],t.ae(),t.pt=null,t.Pb(32),t},$.yg=function(t,e){var i=e||{};return i.closePoint=t.vv?t.vv.slice():[],i.currentPoint=t.ag?t.ag.slice():[],i.segments=t.o.slice(),i.count=t.f.slice(),i.arguments=t.D.slice(),i},ug=function(t){t.o.length=0,t.f.length=0,t.D.length=0,t.ae(),t.pt=null,delete t.vv,delete t.ag,delete t.$X},$.Ag=function(){$.sg.call(this)},Cg=function(t,e,i,n){this.b=new $.I(t||0,e||0,i||0,n||0),this.K=[],this.P=[0,0,0,0],$.sg.call(this),Bg(this)},Bg=function(t){var e=!t.Ja()||t.Ja().yf();e||t.Ja().suspend(),vg(t);var i=t.P[0];if(t.YN(t.b.left+i,t.b.top),i=t.P[1],t.Ns(t.b.left+t.b.width-t.P[1],t.b.top),t.K[1])switch(t.K[1]){case"round":xg(t,t.b.left+t.b.width,t.b.top+i,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left+t.b.width,t.b.top+i,i,i,!1,!1);break;case"cut":t.Ns(t.b.left+t.b.width,t.b.top+i)}if(i=t.P[2],t.Ns(t.b.left+t.b.width,t.b.top+t.b.height-i),t.K[2])switch(t.K[2]){case"round":xg(t,t.b.left+t.b.width-i,t.b.top+t.b.height,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left+t.b.width-i,t.b.top+t.b.height,i,i,!1,!1);break;case"cut":t.Ns(t.b.left+t.b.width-i,t.b.top+t.b.height)}if(i=t.P[3],t.Ns(t.b.left+i,t.b.top+t.b.height),t.K[3])switch(t.K[3]){case"round":xg(t,t.b.left,t.b.top+t.b.height-i,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left,t.b.top+t.b.height-i,i,i,!1,!1);break;case"cut":t.Ns(t.b.left,t.b.top+t.b.height-i)}if(i=t.P[0],t.Ns(t.b.left,t.b.top+i),t.K[0])switch(t.K[0]){case"round":xg(t,t.b.left+i,t.b.top,i,i,!1,!0);break;case"round-inner":xg(t,t.b.left+i,t.b.top,i,i,!1,!1)}t.mS(),e||t.Ja().resume()},$.Dg=function(t,e,i,n,s){$.od.call(this),this.f=t,this.i=!1,this.elements=[],this.b=this.he=null,this.shape.apply(this,$.Ja(arguments,1))},Eg=function(t){if(!t.i&&(t.i=!0,t.f)){var e=t.f;e.yf()?e.Qx.push(t):t.Sd()}},$.Fg=function(){this.children=[],this.ir=[],$.ig.call(this)},Hg=function(t){(0,$.Gg)(t.children,(function(t,e){return e.yr()&&e.Sd(),t||e.yr()}),!1)||$.jg(t,64)},Haa=function(t,e){function i(t){var e=t.ia();e&&($.Xe(e),r++),lg(t,!1),d.push(f)}function n(t){var e=t.ia();return e?(o.appendChild(e),r++,u.push(l),lg(t,!0)):c=!1,!!o}var s,a,o=t.ia(),r=0;if(!t.nM){t.nM={};var l=0;for(s=t.children.length;l<s;l++)t.nM[$.oa(t.children[l])]=!0}var h=!1,c=!0,u=[],d=[],p=!0;for(l=0,s=t.children.length-1;l<s;l++)if(t.children[l+1].zIndex()<t.children[l].zIndex()){p=!1;break}if(p)var g=t.children;else g=$.Ha(t.children),$.Ra(g,(function(t,e){return t.zIndex()-e.zIndex()}));l=0,s=g.length;var f=0;for(a=t.ir.length;l<s&&f<a&&r<e;f++){p=g[l];var m=t.ir[f];if($.oa(m)in t.nM){if(m!=p||h){if(!n(p))break;h=!0}l++}else i(m)}if(r>=e&&(c=!1),c){for(;l<s&&r<e&&n(g[l]);l++);for(;f<a&&r<e;f++)i(t.ir[f]);(l<s||f<a)&&(c=!1)}if(c)t.ir=$.Ja(g,0),t.nM=null,$.jg(t,128);else{for(l=d.length;l--;)$.Ca(t.ir,d[l],1);for(l=0;l<u.length;l++)t.ir.push(g[u[l]])}return r},Ig=function(t){for(var e=t.children.length;e--;)t.children[e].Uy()},$.Qb=function(t){this.Ta=t,this.Bo=!1,$.Fg.call(this)},Mg=function(t,e,i,n){t:{for(s in t=(t||"").toLowerCase(),Jg)if(Jg[s].toLowerCase()==t||Jg[s].toLowerCase().replace(/-/g,"")==t){var s=Jg[s];break t}s="backward-diagonal"}this.type=s,this.color=String(null!=e?e:"black 0.5"),this.Ef=null!=i?i:1,this.size=null!=n?n:10,$.Qb.call(this,new $.I(0,0,this.size,this.size)),(e=Iaa[this.type])&&e.call(this)},Og=function(t,e,i){this.Ta=new $.I(0,0,t,e),Ng(this,i)},Vg=function(t,e,i){this.Ta=new $.I(0,0,t,e),Ug(this,t,e),Ng(this,i,"white")},Xg=function(t,e,i,n){for(t=Wg(t,n),n=0;n<e.length;n++){var s=e[n];t.moveTo(s[0],s[1]);for(var a=2;a<s.length;a+=2)t.lineTo(s[a],s[a+1])}i&&t.close()},Yg=function(t,e,i){for(var n=Wg(t),s=0;s<e.length;s+=5){var a=n,o=e[s],r=e[s+1],l=e[s+2],h=e[s+3],c=e[s+4];o===l&&(o=l=Math.round(o)+c%2/2),r===h&&(r=h=Math.round(r)+c%2/2),a.moveTo(o,r).lineTo(l,h)}i&&t.rotate(i)},Zg=function(t,e){for(var i=0;i<e.length;i+=3){var n=e[i+2];Ug(t,n,n,e[i],e[i+1])}},Ug=function(t,e,i,n,s){t.rect(n||0,s||0,e,i).fill(t.color).stroke("none")},Wg=function(t,e){return e?t.path().fill(t.color).stroke("none"):t.path().fill("none").stroke(t.color,t.Ef)},Ng=function(t,e,i){for(t=t.path().fill(i||t.color).stroke("none"),i=0;i<e.length;i+=2){var n=e[i],s=e[i+1];t.moveTo(n,s).lineTo(n,s+1,n+1,s+1,n+1,s).close()}},bh=function(t,e,i,n,s,a,o){this.o=t||null,this.b=a||$.$g,this.f=o||$.ah,this.Bb=new $.I(e||0,i||0,n||0,s||0),this.i=1,$.ig.call(this)},ch=function(t){$.qf.call(this),this.f={},this.b={},this.qo=new nf(this),this.Y=t},dh=function(t,e,i){(i=$.z(i)?i:i.src)&&(t.f[e]={src:i,C0:$.p(void 0)?void 0:null})},fh=function(t,e){delete t.f[e];var i=t.b[e];i&&(delete t.b[e],t.qo.gc(i,eh,t.i),$.Jc(t.b)&&$.Jc(t.f)&&t.dispatchEvent("complete"))},$.gh=function(){this.G={},this.o="fontStyle fontVariant fontFamily fontSize fontWeight letterSpacing decoration".split(" ")},$.jh=function(t,e){if(hh(t," ",e))var i=ih(t," ",e);else{i=t.measure("a a",e);var n=t.measure("aa",e);i=new $.I(0,i.top,i.width-n.width,i.height),ih(t," ",e,i)}return i},nh=function(t,e){for(var i="",n=0,s=t.o.length;n<s;n++){var a=e[t.o[n]];$.p(a)&&(i+=a+"|")}return i},ih=function(t,e,i,n){var s=t.G,a=nh(t,i),o=s[a];return o||(o=s[a]={}),(s=o[e])?s:o[e]=n||t.measure(e,i)},hh=function(t,e,i){return!(!(t=t.G[nh(t,i)])||!t[e])},$.oh=function(t,e){if(t=$.ab(t),e.height==e.width)return t;if(e.height<e.width){var i=e.width,n=e.height;n/=i}else n=(i=e.height)/(n=e.width);return i/=2,i=$.cb(Math.atan(Math.tan($.bb(t))*i/i*n)),90<t&&270>=t?i=180+i:270<t&&360>=t&&(i=360+i),i%360},$.ph=function(t,e,i){for(var n in i)t.lc(e,n,i[n])},$.qh=function(t,e,i){e&&(i?t.lc(e,"id",i):e.removeAttribute("id"))},$.rh=function(t,e,i){if(e.Uj())return null;var n=[],s=t.D4;return(i?e.mfa:e.OT).call(e,(function(t,e){var i=s[t];i&&(n.push(i),4==t?this.W4(n,e):5!=t&&this.c5(n,e))}),t),n.join(" ")},th=function(t){return t.iu&&!t.iu.md||(t.iu=new ch($.sh.document.body)),t.iu},$.uh=function(){this.Ta=new $.I(0,0,0,0),$.ig.call(this)},vh=function(){},yh=function(t){t.style||(t.style=t.D.length?$.Qc(t.D[t.D.length-1]):{})},Bh=function(t,e){switch(e){case"b":case"strong":yh(t),t.style.fontWeight="bold";break;case"i":case"em":yh(t),t.style.fontStyle="italic"}},Dh=function(t,e,i){switch(e){case"font-style":yh(t),t.style.fontStyle=i||"normal";break;case"font-variant":yh(t),t.style.fontVariant=i||"normal";break;case"font-family":yh(t),t.style.fontFamily=i||$.Ch.fontFamily;break;case"font-size":yh(t),t.style.fontSize=i||$.Ch.fontSize;break;case"font-weight":yh(t),t.style.fontWeight=i||"normal";break;case"color":yh(t),t.style.color=i||$.Ch.color;break;case"letter-spacing":yh(t),t.style.letterSpacing=i||"normal";break;case"text-decoration":yh(t),t.style.er=i||"none";break;case"opacity":yh(t),t.style.opacity=null!=i?(0,window.parseFloat)(i):1}},Eh=function(t){""!=t.b&&(t.xb.nK(t.b,t.D.length?t.D[t.D.length-1]:null),t.b="",t.ea=!1)},Fh=function(t){t.K==(t.P.length?t.P[t.P.length-1]:null)&&(Eh(t),t.D.pop(),t.P.pop(),t.tagName=""),t.K="",t.state=1},Gh=function(t,e){Bh(t,t.tagName),t.P.push(t.tagName),t.D.push(t.style),e&&(t.f=""),t.tagName="",t.style=null,t.state=1},Hh=function(t,e,i){Dh(t,t.o,t.G||""),t.o="",t.G="",i&&(t.f=""),t.state=e},Ih=function(t){Bh(t,t.tagName),Dh(t,t.o,t.G||""),t.P.push(t.tagName),t.D.push(t.style),t.tagName="",t.style=null,t.f="",t.o="",t.G="",t.state=1},Kh=function(t,e,i){var n;if(t.aa){var s=Jh[t.i];$.p(s)?n=s:t.b+="&"+t.i+i}else t.i?n=(0,window.parseInt)(t.i,10):t.b+="&#"+i;n&&(t.b+=String.fromCharCode(n)+(";"==i?"":i)),t.state=e,t.i="",t.aa=!0},Lh=function(t){var e=vh.Id();e.D=[],e.P=[],e.tagName="",e.K="",e.f="",e.ba="'",e.o="",e.G="",e.b="",e.style=null,e.xb=null,e.state=1,e.ea=!1,e.i="",e.aa=!0,e.na=!1,e.xb=t;for(var i,n,s,a=(t=t.text()).length,o=-1,r=!1;++o<a;)switch(i=t.charAt(o),n=/\xa0|\s/.test(i),s=/[^a-zA-Z]/.test(i),e.state){case 1:if("<"==i){e.state=2;break}if(e.ea&&n)break;if("&"==i){e.state=14;break}if(e.na&&(e.na=!1,";"==i))break;e.b+=i,e.ea=n;break;case 14:if(e.aa&&!e.i&&"#"==i){e.aa=!1;break}if("&"==i){Kh(e,14,"");break}if(/(_|\W)/.test(i)){Kh(e,(n="<"==i)?2:1,n?"":i);break}if(n=/\d/.test(i),!e.aa&&!n){Kh(e,1,i);break}e.i+=i,Jh[e.i]&&(e.na=!0,Kh(e,1,""));break;case 2:if(r){if(">"!=i)break;"br"==e.tagName&&e.xb.mK(),e.tagName="",r=!1,e.state=1;break}if(!e.tagName&&"<"==i){e.b+="<";break}if(!e.tagName&&s&&"/"!=i){e.b+="<"+i,e.state=1;break}if(!e.tagName&&"/"==i){e.state=3;break}if("br"==e.tagName&&">"==i){e.xb.mK(),e.tagName="",e.state=1;break}if("br"==e.tagName&&("/"==i||n)){r=!0;break}if(e.tagName&&Eh(e),e.tagName&&n){e.state=4;break}if(">"==i){Gh(e);break}e.tagName+=i.toLowerCase();break;case 3:if(r){if(">"!=i)break;Fh(e),r=!1;break}if(!e.K&&s){e.b+="</"+i,e.state=1;break}if(e.K&&n){r=!0;break}if(">"==i){Fh(e),r=!1;break}e.K+=i.toLowerCase();break;case 4:if(r){if(">"!=i)break;Gh(e,!0),r=!1;break}if(">"==i){Gh(e,!0);break}if(n){e.state=5;break}if("="==i){e.f&&(e.state="style"==e.f?6:8);break}e.f+=i.toLowerCase();break;case 5:if(">"==i){Gh(e,!0);break}if(n)break;if(e.f&&!s){e.f=i,e.state=4;break}if("="==i){e.f&&(e.state="style"==e.f?6:8);break}e.f+=i,e.state=4;break;case 6:if(n)break;if(">"==i){Gh(e,!0);break}if("'"==i||'"'==i){e.ba=i,e.state=9;break}e.o=i,e.state=10;break;case 8:if(n)break;if(">"==i){e.f="",e.tagName="",e.state=1;break}if("'"==i||'"'==i){e.ba=i,e.state=7;break}e.state=11;break;case 9:if(n)break;if(i==e.ba){r=!0,Hh(e,4,!0);break}if(":"==i){e.state=12;break}e.o+=i.toLowerCase();break;case 12:if(n)break;if(i==e.ba){r=!0,Hh(e,4,!0);break}if(";"==i){Hh(e,9);break}e.G+=i.toLowerCase();break;case 7:i==e.ba&&(e.f="",e.state=4);break;case 10:if(n){r=!0,Hh(e,4,!0);break}if(">"==i){Ih(e);break}if(":"==i){e.state=13;break}e.o+=i;break;case 11:if(n){Hh(e,4,!0);break}">"==i&&Gh(e);break;case 13:if(n){r=!0,Hh(e,4,!0);break}if(">"==i){Ih(e);break}if(";"==i){Hh(e,10);break}e.G+=i.toLowerCase();break;default:throw"Error while parsing HTML: Symbol '"+i+"', position: "+(o-1)}Eh(e),e.xb.pM()},Mh=function(t,e){$.od.call(this),this.b=e||{},this.text=t,this.i=!1,this.y=this.x=this.um=this.mo=this.height=this.width=this.f=0},$.Qh=function(t,e){this.ba=!1,this.No=t||0,this.Oo=e||0,this.Ta=new $.I(this.No,this.Oo,0,0),this.$a=this.aa=this.Od=this.D=0,this.Hd=!1,this.b=[],this.f=[],this.Ba=this.bg=this.P=0,this.ud=!0,this.fh=this.na=this.Sb=this.me=0,this.ea=[],this.sb=1,this.fb=Nh,this.o=0,this.qc=this.K=!1,this.yc=this.Dk={fontSize:$.Ch.fontSize,color:$.Ch.fontColor,fontFamily:$.Ch.fontFamily,direction:$.Ch.textDirection,textOverflow:Nh,wordBreak:Jaa,wordWrap:Oh,selectable:!0,hAlign:$.Ph},this.Ka=null,$.pg.call(this),this.i=this.G=null},Rh=function(t,e,i){if($.p(i)){if(i!==t.yc[e]){var n=!t.Ja()||t.Ja().yf();n||t.Ja().suspend(),t.yc[e]=i,t.ba=!1,t.Pb(1024),t.Pb(32),t.Pb(16384),t.sx(),n||t.Ja().resume()}return t}return t.yc[e]},Sh=function(t){var e=(0,window.parseFloat)(t);return(0,window.isNaN)(e)||0>e?1:$.z(t)&&$.fc(t,"%")?1+(0,window.parseFloat)(t)/100:t},Th=function(t,e,i,n,s,a,o){var r,l=Math.floor((s-n)/(a.width/e.length)),h=e.substring(0,l);for(r=t.Vm(h,i);n+r.width<s&&1<l;)l++,h=e.substring(0,l),r=t.Vm(h,i);for(;n+r.width>s&&1<l;)l--,h=e.substring(0,l),r=t.Vm(h,i);return n=t.X3(t.yc,i),i=e.substring(l,e.length),r=a.width-r.width,(a=a.clone()).width=r,ih($.mg(),i,n,a),a=t.yc.wordWrap!=Oh,r="keep-all"==t.yc.wordBreak,"break-all"==t.yc.wordBreak||o||(t=/\s+/g,o=/\S+/g,s=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uffef\u4e00-\u9faf\uAC00-\uD7A3\u1100–\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]+/g,n=h[h.length-1],i=i[0],r=!r&&(s.test(n)||s.test(i)),t.test(n)||t.test(i)||r||(t.test(h)?(l=h.match(o),l=h.lastIndexOf(l[l.length-1])):(h=o.exec(e)[0],a||(l=h.length)))),l},Uh=function(t,e,i,n,s){return(i=new Mh(e,i)).f=-n.top,i.height=n.height,i.width=n.width,t.o&&0==t.b.length&&(s=s||0,t.o=t.Yf&&t.o+n.width+s>t.Yf?t.Yf-n.width-s:t.o,0>t.o&&(t.o=0)),t.Ba=Math.max(t.Ba,n.height),t.P+=n.width,0==t.b.length&&(t.P+=t.o),t.na=Math.max(t.na,i.f),t.ud=t.f.length?t.ud&&0==e.length:0==e.length,t.f.push(i),t.b.push(i),i.parent(t),i},Vh=function(t,e){var i,n=e||$.ua(t.ea),s=$.ua(n),a=t.Vm(t.fb,s.b),o=t.fb,r=1<n.length&&n[n.length-2];if(r&&r.Vea){var l=(0,$.za)(t.b,s)+1;$.Ca(t.b,l,t.b.length-l)}else{if(a.width>t.Za){var h=Th(t,t.fb,s.b,0,t.Za,a,!0);o=t.fb.substring(0,h)}h=t.bg;var c=t.Za;if(""==o)l=(0,$.za)(t.b,s)+1,$.Ca(t.b,l,t.b.length-l);else if(c-h>=a.width){t.f=n,l=(0,$.za)(t.b,s)+1,$.Ca(t.b,l,t.b.length-l);var u=Uh(t,o,s.b,a);2==t.f.length&&""==t.f[0].text&&(u.um=t.Sb-t.f[0].height,u.i=!0)}else{for(r=n.length-1;!i&&0<=r;)s=n[r],a=t.Vm(o,s.b),h-(l=t.Vm(s.text,s.b)).width+a.width<=t.Za&&(i=s),h-=l.width,r--;i||1!=t.ea.length||(i=n[0],h-=l.width),i&&(t.f=n,r=t.f[0].um,c-=a.width,l=(0,$.za)(n,i),$.Ca(n,l,n.length-l),l=(0,$.za)(t.b,i),$.Ca(t.b,l,t.b.length-l),t.Ba=0,t.P=0,t.na=0,l=t.Vm(i.text,i.b),1>(h=Th(t,i.text,i.b,h,c,l,!0))&&(h=1),l=i.text.substring(0,h),n=t.Vm(l,i.b),(l=Uh(t,l,i.b,n,a.width)).x=i.x,l.y=i.y,l.Vea=!0,n.width+a.width>t.Za&&(h=Th(t,t.fb,s.b,n.width,t.Za,a,!0),o=t.fb.substring(0,h)),0<h&&((u=Uh(t,o,i.b,a)).x=l.x+n.width,u.y=l.y),t.f[0].i=!0,t.f[0].um=r)}t.K&&u&&(i=t.f[0],u.i=i.i,u.x=i.x,u.um=i.um,i.um=0,i.x=0,i.i=!1,$.Fa(t.b,u),l=(0,$.za)(t.b,i),$.Da(t.b,u,l))}},Wh=function(t){t.aa=t.No,t.yc.hAlign==$.Ph?t.aa+=t.K?t.Yf:0:"center"==t.yc.hAlign?t.aa+=t.Yf/2:"end"==t.yc.hAlign?t.aa+=t.K?0:t.Yf:"right"==t.yc.hAlign&&(t.aa+=t.Yf)},Xh=function(t){if(t.path()){if(t.yc.vAlign){var e=t.b[0];"middle"==t.yc.vAlign?e.um+=e.f-t.D/2:"bottom"==t.yc.vAlign?e.um+=e.f-t.D:"top"==t.yc.vAlign&&(e.um+=e.f)}}else t.$a=t.Oo+(0==t.b.length?0:t.b[0].f),t.yc.vAlign&&t.D<t.yc.height&&("middle"==t.yc.vAlign?t.$a+=t.Jf/2-t.D/2:"bottom"==t.yc.vAlign&&(t.$a+=t.Jf-t.D))},$.Yh=function(t){$.ig.call(this),this.Qd=$.p(t)?t:""},gi=function(t,e,i,n,s,a,o,r){if(t=t.path?t.path():t,2>a)return t;o=o||0;var l,h=$.db(o,n),c=$.eb(o,n),u=360/(2*a);if(t.moveTo(h+e,c+i),r)for(l=0;l<a;l++){var d=o;o+=u;var p=h,g=c,f=$.db(d,s),m=$.eb(d,s),v=$.db(o,n),b=$.eb(o,n);h=$.db(o,s),c=$.eb(o,s);var y=(v-f)*(g-m)-(b-m)*(p-f);p=Zh(s,n,d,o,r,1-(y/=(b-m)*(h-p)-(v-f)*(c-g))),d=ai(s,n,d,o,r,1-y),t.lK(e+p,i+d,e+h,i+c),d=o,o+=u,p=h,g=c,f=$.db(o,s),m=$.eb(o,s),v=$.db(d,n),b=$.eb(d,n),h=$.db(o,n),c=$.eb(o,n),y=(v-f)*(g-m)-(b-m)*(p-f),p=Zh(s,n,o,d,r,y/=(b-m)*(h-p)-(v-f)*(c-g)),d=ai(s,n,o,d,r,y),t.lK(e+p,i+d,e+h,i+c)}else for(l=0;l<a;l++)o+=u,h=$.db(o,s),c=$.eb(o,s),t.lineTo(e+h,i+c),o+=u,h=$.db(o,n),c=$.eb(o,n),t.lineTo(e+h,i+c);return t.close(),t},hi=function(t,e,i,n){return gi(t,e,i,n,n/2,4)},ii=function(t,e,i,n){return gi(t,e,i,n,n/2,5,-90)},ji=function(t,e,i,n){return gi(t,e,i,n,.5773502691896258*n,6,-90)},ki=function(t,e,i,n){return gi(t,e,i,n,n/2,7,-90)},li=function(t,e,i,n){return gi(t,e,i,n,.8506508083520399*n,10)},mi=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,-90)},ni=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,90)},oi=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,0)},pi=function(t,e,i,n){return gi(t,e,i,n,.5*n,3,180)},qi=function(t,e,i,n){return gi(t,e,i,n,n*Math.SQRT1_2,4)},ri=function(t,e,i,n){var s=n/4,a=e-n,o=e+n,r=i-n;return n=i+n,(t=t.path?t.path():t).moveTo(e-s,r).lineTo(e-s,i-s).lineTo(a,i-s).lineTo(a,i+s).lineTo(e-s,i+s).lineTo(e-s,n).lineTo(e+s,n).lineTo(e+s,i+s).lineTo(o,i+s).lineTo(o,i-s).lineTo(e+s,i-s).lineTo(e+s,r).close(),t},si=function(t,e,i,n){t=t.path?t.path():t;var s=n*Math.SQRT1_2/2,a=e-n,o=e+n,r=i-n;return n=i+n,t.moveTo(a+s,r).lineTo(e,i-s).lineTo(o-s,r).lineTo(o,r+s).lineTo(e+s,i).lineTo(o,n-s).lineTo(o-s,n).lineTo(e,i+s).lineTo(a+s,n).lineTo(a,n-s).lineTo(e-s,i).lineTo(a,r+s).close(),t},ti=function(t,e,i,n){var s=n/4,a=e-n;return e+=n,(t=t.path?t.path():t).moveTo(e,i-s).lineTo(e,i+s).lineTo(a,i+s).lineTo(a,i-s).close(),t},ui=function(t,e,i,n){var s=n/4,a=i-n;return i+=n,(t=t.path?t.path():t).moveTo(e-s,a).lineTo(e+s,a).lineTo(e+s,i).lineTo(e-s,i).close(),t},vi=function(t,e,i,n,s,a){return t=t.path?t.path():t,a=$.Za(a,-360,360),360==Math.abs(a)?t.Fe(e,i,n,n,s,a,!1):t.moveTo(e,i).Fe(e,i,n,n,s,a,!0).close(),t},$.wi=function(t,e,i,n,s,a,o){if(0>n&&(n=0),0>s&&(s=0),n<s){var r=n;n=s,s=r}return 0>=s?vi(t,e,i,n,a,o):(t=t.path?t.path():t,o=$.Za(o,-360,360),r=360>Math.abs(o),t.Fe(e,i,n,n,a,o).Fe(e,i,s,s,a+o,-o,r),r&&t.close(),t)},Zh=function(t,e,i,n,s,a){return t=$.db(i,t),e=$.db(n,e)-t,0<=s?t+e*(a+s-a*s):t+e*a*(s+1)},ai=function(t,e,i,n,s,a){return t=$.eb(i,t),e=$.eb(n,e)-t,0<=s?t+e*(a+s-a*s):t+e*a*(s+1)},xi=function(t){var e,i;switch(t.length){case 1:var n=e=i=t[0];t.push(n,e,i);break;case 2:e=t[0],i=t[1],t.push(e,i);break;case 3:i=t[1],t.push(i);break;case 4:break;default:t.push(5,5,5,5)}},yi=function(t,e,i){var n=t.path?t.path():t;if(6==arguments.length){var s=arguments[2],a=arguments[3],o=arguments[4],r=arguments[5];n.moveTo(e.left+s,e.top).lineTo(e.left+e.width-a,e.top).lineTo(e.left+e.width,e.top+a).lineTo(e.left+e.width,e.top+e.height-o).lineTo(e.left+e.width-o,e.top+e.height).lineTo(e.left+r,e.top+e.height).lineTo(e.left,e.top+e.height-r).lineTo(e.left,e.top+s).close()}else r=$.Ja(arguments,2,6),xi(r),s=r[0],a=r[1],o=r[2],r=r[3],yi(n,e,s,a,o,r);return n},zi=function(t,e,i){var n=t.path?t.path():t;if(6==arguments.length){var s=arguments[2],a=arguments[3],o=arguments[4],r=arguments[5];n.moveTo(e.left+s,e.top).lineTo(e.left+e.width-a,e.top).Ff(e.left+e.width,e.top+a,a,a,!1,!0).lineTo(e.left+e.width,e.top+e.height-o).Ff(e.left+e.width-o,e.top+e.height,o,o,!1,!0).lineTo(e.left+r,e.top+e.height).Ff(e.left,e.top+e.height-r,r,r,!1,!0),0!=s&&(n.lineTo(e.left,e.top+s),n.Ff(e.left+s,e.top,s,s,!1,!0)),n.close()}else r=$.Ja(arguments,2,6),xi(r),s=r[0],a=r[1],o=r[2],r=r[3],zi(n,e,s,a,o,r);return n},Ai=function(t,e,i){var n=t.path?t.path():t;if(6==arguments.length){var s=arguments[2],a=arguments[3],o=arguments[4],r=arguments[5];n.moveTo(e.left+s,e.top).lineTo(e.left+e.width-a,e.top).Ff(e.left+e.width,e.top+a,a,a,!1,!1).lineTo(e.left+e.width,e.top+e.height-o).Ff(e.left+e.width-o,e.top+e.height,o,o,!1,!1).lineTo(e.left+r,e.top+e.height).Ff(e.left,e.top+e.height-r,r,r,!1,!1),0!=s&&n.lineTo(e.left,e.top+s).Ff(e.left+s,e.top,s,s,!1,!1),n.close()}else r=$.Ja(arguments,2,6),xi(r),s=r[0],a=r[1],o=r[2],r=r[3],Ai(n,e,s,a,o,r);return n},$.Fi=function(t,e,i,n){this.Hj=t,this.ze=e,this.mi=i,this.Pe=n},Gi=function(){$.gh.call(this)},Hi=function(t){return $.sh.document.createElementNS("http://www.w3.org/2000/svg",t)},Kaa=function(){var t=$.mg();$.Xe(t.Mk),$.Xe(t.$D),$.Xe(t.f),$.Xe(t.i),$.Xe(t.yp),$.Xe(t.Op),t.Mk=null,t.$D=null,t.f=null,t.i=null,t.yp=null,t.Op=null},Laa=function(t){var e=$.bb(t),i=Math.tan(e);return t=1/(2*i),i/=2,.5>=Math.abs(i)?(t=-.5,e=0>Math.cos(e)):(i=-.5,e=0<Math.sin(e)),e&&(t=-t,i=-i),new $.Fi(.5+t,.5+i,.5-t,.5-i)},Maa=function(t,e){var i=t%90,n=$.bb(t),s=1,a=e.left+e.width/2,o=e.top+e.height/2,r=0>Math.sin(n)||180==t||360==t;return 90!=t&&270!=t||(i+=1e-6),180!=t&&(0>Math.tan(n)||90==t||270==t)&&(s=-1,i=90-i),i=$.bb(i),n=Math.sin(i)*(e.height/2-Math.tan(i)*e.width/2)+e.width/2/Math.cos(i),s*=Math.cos(i)*n,i=Math.sin(i)*n,r&&(s=-s,i=-i),new $.Fi(Math.round(a-s),Math.round(o+i),Math.round(a+s),Math.round(o-i))},Ii=function(t,e,i){var n=Naa(i,e.keys,e.cx,e.cy,e.fx,e.fy,e.opacity,e.mode,e.transform);if(!n.Bo){var s=Hi("radialGradient");$.qh(t,s,n.id()),$.Se(i.ia(),s),n.vF=i,n.Bo=!0,(0,$.Pe)(n.keys,(function(t){var e=Hi("stop");$.ph(this,e,{offset:t.offset,style:"stop-color:"+t.color+";stop-opacity:"+((0,window.isNaN)(t.opacity)?n.opacity:t.opacity)}),s.appendChild(e)}),t),n.Ta?$.ph(t,s,{cx:n.Dc*n.Ta.width+n.Ta.left,cy:n.uc*n.Ta.height+n.Ta.top,fx:n.Se*n.Ta.width+n.Ta.left,fy:n.i*n.Ta.height+n.Ta.top,r:Math.min(n.Ta.width,n.Ta.height)/2,spreadMethod:"pad",gradientUnits:"userSpaceOnUse"}):$.ph(t,s,{cx:n.Dc,cy:n.uc,fx:n.Se,fy:n.i,gradientUnits:"objectBoundingBox"}),n.transform&&t.lc(s,"gradientTransform",n.transform.toString())}return n.id()},Ki=function(t,e,i,n){var s=$.Ji(i,e.keys,e.opacity,!0===e.mode?$.oh(e.angle,n):e.angle,e.mode,e.transform);if(!s.Bo){var a=t.K0();$.qh(t,a,s.id()),$.Se(i.ia(),a),s.uF=i,s.Bo=!0,(0,$.Pe)(s.keys,(function(t){var e=Hi("stop");$.ph(this,e,{offset:t.offset,style:"stop-color:"+t.color+";stop-opacity:"+((0,window.isNaN)(t.opacity)?s.opacity:t.opacity)}),a.appendChild(e)}),t),s.Ta?(e=Maa(s.angle,s.Ta),$.ph(t,a,{x1:e.Hj,y1:e.ze,x2:e.mi,y2:e.Pe,spreadMethod:"pad",gradientUnits:"userSpaceOnUse"})):(e=Laa(s.angle),$.ph(t,a,{x1:e.Hj,y1:e.ze,x2:e.mi,y2:e.Pe,gradientUnits:"objectBoundingBox"})),s.transform&&t.lc(a,"gradientTransform",s.transform.toString())}return s.id()},Ni=function(t,e){var i=e.fill();if(i){var n=e.Ja().vn,s='url("'+Li()+"#";if(i&&i.opacity&&1e-4>=i.opacity&&$.hd&&$.bd("9")&&(i.opacity=1e-4),$.z(i))t.lc(e.ia(),"fill",i),e.ia().removeAttribute("fill-opacity");else if($.A(i.keys)&&i.cx&&i.cy)t.lc(e.ia(),"fill",s+Ii(t,i,n)+'")'),t.lc(e.ia(),"fill-opacity",$.p(i.opacity)?i.opacity:1);else if($.A(i.keys))e.rb()&&(t.lc(e.ia(),"fill",s+Ki(t,i,n,e.rb())+'")'),t.lc(e.ia(),"fill-opacity",$.p(i.opacity)?i.opacity:1));else if(i.src){var a=e.ck();a?(a.width=a.width||0,a.height=a.height||0,a.left=a.left||0,a.top=a.top||0):a=new $.I(0,0,0,0),"tile"==i.mode?Mi(n,i.src,a,i.mode,i.opacity,(function(t){t.id(),t.parent(e.Ja()).Sd(),$.mg().lc(e.ia(),"fill",s+t.id()+'")')})):((n=Mi(n,i.src,a,i.mode,i.opacity)).id(),n.parent(e.Ja()).Sd(),t.lc(e.ia(),"fill",s+n.id()+'")'),t.lc(e.ia(),"fill-opacity",$.p(i.opacity)?i.opacity:1))}else $.J(i,Mg)?((i=Oaa(n,i.type,i.color,i.Ef,i.size)).id(),i.parent(e.Ja()).Sd(),t.lc(e.ia(),"fill",s+i.id()+'")')):$.J(i,$.Qb)?(i.id(),i.parent(e.Ja()).Sd(),t.lc(e.ia(),"fill",s+i.id()+'")')):$.ph(t,e.ia(),{fill:i.color,"fill-opacity":i.opacity})}},Oi=function(t,e){var i=e.stroke();if(i){var n=e.Ja().vn,s=e.ia(),a='url("'+Li()+"#";if($.z(i))t.lc(s,"stroke",i);else if($.A(i.keys)&&i.cx&&i.cy)t.lc(s,"stroke",a+Ii(t,i,n)+'")');else if($.A(i.keys)){if(!e.rb())return;t.lc(s,"stroke",a+Ki(t,i,n,e.rb())+'")')}else t.lc(s,"stroke",i.color);i.lineJoin?t.lc(s,"stroke-linejoin",i.lineJoin):s.removeAttribute("stroke-linejoin"),i.lineCap?t.lc(s,"stroke-linecap",i.lineCap):s.removeAttribute("stroke-linecap"),i.opacity?t.lc(s,"stroke-opacity",i.opacity):s.removeAttribute("stroke-opacity"),i.thickness?t.lc(s,"stroke-width",i.thickness):s.removeAttribute("stroke-width"),i.dash?t.lc(s,"stroke-dasharray",i.dash):s.removeAttribute("stroke-dasharray")}},Pi=function(t){t.ia().removeAttribute("clip-path"),t.ia().removeAttribute("clipPathUnits")},$.Si=function(t,e){wd.call(this,t.type),this.target=$.Qi(t.target,e)||t.target,this.relatedTarget=$.Qi(t.relatedTarget||null,e)||t.relatedTarget,this.offsetX=t.offsetX,this.offsetY=t.offsetY,this.clientX=t.clientX,this.clientY=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,this.button=Cd(t,0)?$.Ri:Cd(t,1)?Paa:Cd(t,2)?Qaa:Raa,this.actionButton=t.OA(),this.keyCode=t.keyCode,this.charCode=t.f,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.platformModifierKey=t.i,this.kf=t},Ti=function(t,e){this.i=t,this.o=e,this.f=0,this.b=null},Ui=function(t,e){t.o(e),100>t.f&&(t.f++,e.next=t.b,t.b=e)},Vi=function(){this.f=this.b=null},Wi=function(){this.next=this.f=this.b=null},Xi=function(t){$.fa.setTimeout((function(){throw t}),0)},Saa=function(){var t=$.fa.MessageChannel;if(void 0===t&&void 0!==window&&window.postMessage&&window.addEventListener&&!$.Cc("Presto")&&(t=function(){var t=window.document.createElement("IFRAME");t.style.display="none",t.src="",window.document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var i="callImmediate"+Math.random(),n="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=(0,$.pa)((function(t){"*"!=n&&t.origin!=n||t.data!=i||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(i,n)}}}),void 0!==t&&!$.Uc()){var e=new t,i={},n=i;return e.port1.onmessage=function(){if($.p(i.next)){var t=(i=i.next).r0;i.r0=null,t()}},function(t){n.next={r0:t},n=n.next,e.port2.postMessage(0)}}return void 0!==window.document&&"onreadystatechange"in window.document.createElement("SCRIPT")?function(t){var e=window.document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},window.document.documentElement.appendChild(e)}:function(t){$.fa.setTimeout(t,0)}},$.aj=function(t,e){Yi||Taa(),Zi||(Yi(),Zi=!0),$i.add(t,e)},Taa=function(){if($.fa.Promise&&$.fa.Promise.resolve){var t=$.fa.Promise.resolve(void 0);Yi=function(){t.then(bj)}}else Yi=function(){var t=bj;!$.D($.fa.setImmediate)||$.fa.Window&&$.fa.Window.prototype&&!$.Cc("Edge")&&$.fa.Window.prototype.setImmediate==$.fa.setImmediate?(ij||(ij=Saa()),ij(t)):$.fa.setImmediate(t)}},bj=function(){for(var t;t=$i.remove();){try{t.b.call(t.f)}catch(e){Xi(e)}Ui(jj,t)}Zi=!1},$.oj=function(t){if(this.dc=kj,this.D=void 0,this.f=this.b=this.Y=null,this.i=this.o=!1,t!=$.ia)try{var e=this;t.call(void 0,(function(t){$.lj(e,$.mj,t)}),(function(t){$.lj(e,nj,t)}))}catch(i){$.lj(this,nj,i)}},pj=function(){this.next=this.context=this.f=this.i=this.b=null,this.o=!1},rj=function(t,e,i){var n=qj.get();return n.i=t,n.f=e,n.context=i,n},sj=function(t,e){if(t.dc==kj)if(t.Y){var i=t.Y;if(i.b){for(var n=0,s=null,a=null,o=i.b;o&&(o.o||(n++,o.b==t&&(s=o),!(s&&1<n)));o=o.next)s||(a=o);s&&(i.dc==kj&&1==n?sj(i,e):(a?((n=a).next==i.f&&(i.f=n),n.next=n.next.next):tj(i),uj(i,s,nj,e)))}t.Y=null}else $.lj(t,nj,e)},wj=function(t,e){t.b||t.dc!=$.mj&&t.dc!=nj||vj(t),t.f?t.f.next=e:t.b=e,t.f=e},$.yj=function(t,e,i,n){var s=rj(null,null,null);return s.b=new $.oj((function(t,a){s.i=e?function(i){try{var s=e.call(n,i);t(s)}catch(o){a(o)}}:t,s.f=i?function(e){try{var s=i.call(n,e);!$.p(s)&&e instanceof xj?a(e):t(s)}catch(o){a(o)}}:a})),s.b.Y=t,wj(t,s),s.b},$.lj=function(t,e,i){t.dc==kj&&(t===i&&(e=nj,i=new TypeError("Promise cannot resolve to itself")),t.dc=1,$.zj(i,t.K,t.P,t)||(t.D=i,t.dc=e,t.Y=null,vj(t),e!=nj||i instanceof xj||Uaa(t,i)))},$.zj=function(t,e,i,n){if(t instanceof $.oj)return wj(t,rj(e||$.ia,i||null,n)),!0;if(t)try{var s=!!t.$goog_Thenable}catch(o){s=!1}else s=!1;if(s)return t.then(e,i,n),!0;if($.C(t))try{var a=t.then;if($.D(a))return Vaa(t,a,e,i,n),!0}catch(o){return i.call(n,o),!0}return!1},Vaa=function(t,e,i,n,s){function a(t){o||(o=!0,n.call(s,t))}var o=!1;try{e.call(t,(function(t){o||(o=!0,i.call(s,t))}),a)}catch(r){a(r)}},vj=function(t){t.o||(t.o=!0,$.aj(t.G,t))},tj=function(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e},uj=function(t,e,i,n){if(i==nj&&e.f&&!e.o)for(;t&&t.i;t=t.Y)t.i=!1;if(e.b)e.b.Y=null,Aj(e,i,n);else try{e.o?e.i.call(e.context):Aj(e,i,n)}catch(s){Bj.call(null,s)}Ui(qj,e)},Aj=function(t,e,i){e==$.mj?t.i.call(t.context,i):t.f&&t.f.call(t.context,i)},Uaa=function(t,e){t.i=!0,$.aj((function(){t.i&&Bj.call(null,e)}))},xj=function(t){ta.call(this,t)},$.Dj=function(t,e,i){if($.D(t))i&&(t=(0,$.pa)(t,i));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=(0,$.pa)(t.handleEvent,t)}return 2147483647<Number(e)?-1:$.Cj.setTimeout(t,e||0)},$.Ej=function(t){$.Cj.clearTimeout(t)},$.Fj=function(t,e,i,n,s){$.od.call(this),this.keys=t,this.opacity=null!=e?$.Za(e,0,1):1,this.angle=null!=i?$.ab(i):0,this.mode=null!=n&&n,this.Ta=n&&$.J(n,$.I)?n:null,this.transform=null!=s?s:null},$.Gj=function(t,e,i,n,s){i=null!=i?$.ab(i):0,e=null!=e?$.Za(e,0,1):1;var a=!!n;n=null!=n&&$.J(n,$.I)?n:null;var o=[];return(0,$.Pe)(t,(function(t){o.push(String(t.offset)+t.color+(t.opacity?t.opacity:null))})),o.join("")+e+i+a+(n?String(n.left)+n.top+n.width+n.height:"")+(s?s.toString():"")},$.Hj=function(t,e,i,n,s,a,o,r){$.od.call(this),this.Dc=e,this.uc=i,this.Se=n,this.i=s,this.keys=t,this.opacity=null!=a?$.Za(a,0,1):1,this.Ta=null!=o?o:null,this.transform=null!=r?r:null},$.Ij=function(t,e,i,n,s,a,o,r){a=null!=a?$.Za(a,0,1):1;var l=[];return(0,$.Pe)(t,(function(t){l.push(String(t.offset)+t.color+(t.opacity?t.opacity:1))})),l.join("")+a+e+i+n+s+(o?String(o.left)+o.top+o.width+o.height:"")+(r?r.toString():"")},$.Jj=function(t){$.od.call(this),this.ru={},this.D={},this.i={},this.b={},this.o=t},Mi=function(t,e,i,n,s,a){s=$.p(s)?s:1,n=null!=n?n:"stretch";var o=[e,i.left,i.top,i.width,i.height,n,s].join(),r=null,l=$.ia;if("tile"==n)l=function(n,r){if($.Gc(t.b,o))var l=t.b[o];else(l=new $.Qb(new $.I(i.left,i.top,n,r))).wk().src(e).opacity(s).width(n).height(r),t.b[o]=l;a&&a.call(this,l)};else{if($.Gc(t.b,o))return t.b[o];switch(r=new $.Qb(i),n){case"stretch":r.wk().src(e).opacity(s).width(i.width).height(i.height);break;case"fit-max":r.wk().src(e).opacity(s).width(i.width).height(i.height).align("x-mid-y-mid").jD("slice");break;case"fit":r.wk().src(e).opacity(s).width(i.width).height(i.height).align("x-mid-y-mid")}t.b[o]=r}return $.mg().TN(e,l),l=null,t.b[o]},Oaa=function(t,e,i,n,s){var a=[e=null!=e?e:"backward-diagonal",i=null!=i?i:"black",n=null!=n?n:1,s=null!=s?s:10].join();return $.Gc(t.i,a)?t.i[a]:t.i[a]=new Mg(e,i,n,s)},$.Ji=function(t,e,i,n,s,a){var o=$.Gj(e,i,n,s,a);return $.Gc(t.ru,o)?t.ru[o]:t.ru[o]=new $.Fj(e,i,n,s,a)},Naa=function(t,e,i,n,s,a,o,r,l){var h=$.Ij(e,i,n,s,a,o,r,l);return $.Gc(t.D,h)?t.D[h]:t.D[h]=new $.Hj(e,i,n,s,a,o,r,l)},$.Kj=function(t){return t.classList?t.classList:(t=t.className,$.z(t)&&t.match(/\S+/g)||[])},$.Lj=function(t,e){return t.classList?t.classList.contains(e):$.Aa($.Kj(t),e)},$.Qj=function(t,e){t.classList?t.classList.add(e):$.Lj(t,e)||(t.className+=0<t.className.length?" "+e:e)},$.Rj=function(t,e){if(t.classList)(0,$.Pe)(e,(function(e){$.Qj(t,e)}));else{var i={};for(var n in(0,$.Pe)($.Kj(t),(function(t){i[t]=!0})),(0,$.Pe)(e,(function(t){i[t]=!0})),t.className="",i)t.className+=0<t.className.length?" "+n:n}},$.Sj=function(t,e){t.classList?t.classList.remove(e):$.Lj(t,e)&&(t.className=(0,$.Ye)($.Kj(t),(function(t){return t!=e})).join(" "))},Waa=function(t,e){t.classList?(0,$.Pe)(e,(function(e){$.Sj(t,e)})):t.className=(0,$.Ye)($.Kj(t),(function(t){return!$.Aa(e,t)})).join(" ")},$.Tj=function(){var t=$.ye().b,e=t.body;return!!(e.webkitRequestFullscreen||e.mozRequestFullScreen&&t.mozFullScreenEnabled||e.msRequestFullscreen&&t.msFullscreenEnabled||e.requestFullscreen&&t.fullscreenEnabled)},$.Yj=function(t,e,i){$.qf.call(this),this.NO=(0,$.pa)(this.NO,this),this.Dt=(0,$.pa)(this.Dt,this);var n=$.sh.document;$.Ch.sP||($.Ch.sP={});var s=$.cc($.ac.Id(),this,"stage");$.Ch.sP[s]=this,this.s0={},this.Qg=new nf(this),this.qp=n.createElement("DIV"),$.uf(this.qp,{position:"relative",left:0,top:0,overflow:"hidden"}),this.Ud=$.mg().P0(),Uj(this),$.mg().hP(this.Ud,"100%","100%"),$.uf(this.Ud,"display","block"),$.Qj(this.Ud,"anychart-ui-support"),this.qp.appendChild(this.Ud),this.Ud.setAttribute("ac-id",s),this.Qx=[],this.vn=this.F0(),this.vn.Sd(),this.Oa=new $.Fg,this.Oa.fl(this).Sd(),s=this.Oa.ia(),this.Ud.appendChild(s),$.mg().Xp(),this.Qg.wa(this.ia(),"mousedown mouseover mouseout click dblclick touchstart touchend touchcancel MSPointerDown MSPointerUp pointerdown pointerup contextmenu".split(" "),this.sq,!1),Vj(this,e||"100%"),Wj(this,i||"100%"),(this.Jc=$.z(t)?n.getElementById(t):t)&&Xj(this),this.Dt(!0,!0),this.resume()},Vj=function(t,e){if(t.BL!=e){var i=(0,window.parseFloat)(e);if(!(0,window.isNaN)(i))return t.BL=$.ea(e)?e:String(e),t.uM=$.z(e)&&$.fc(e,"%")?window.NaN:i,t.qp.style.width=Bf(t.BL,!0),!0}return!1},Wj=function(t,e){if(t.AL!=e){var i=(0,window.parseFloat)(e);if(!(0,window.isNaN)(i))return t.AL=$.ea(e)?e:String(e),t.tM=$.z(e)&&$.fc(e,"%")?window.NaN:i,t.qp.style.height=Bf(t.AL,!0),!0}return!1},$.Zj=function(t){return t.qp?$.Hf(t.qp):new $.gb(0,0)},Xj=function(t){t.Jc?t.qp.parentNode!=t.Jc&&t.Jc.appendChild(t.qp):$.Xe(t.qp)},ak=function(t){t.rw=!1,t.dispatchEvent("renderfinish");var e=th($.mg()),i=$.mg().n3();e&&i?t.X2||(t.X2=!0,Kd(e,"complete",(function(){this.X2=!1,this.rw||this.dispatchEvent("stagerendered")}),!1,t)):t.dispatchEvent("stagerendered")},bk=function(t){$.Jj.call(this,t),this.f={}},ck=function(t,e){var i=$.cc($.ac.Id(),e),n=t.f[i];if(!n){n=t.f,$.mg();var s=Hi("clipPath");n[i]=n=s}return n},dk=function(t,e,i){$.Yj.call(this,t,e,i)},$.gk=function(){for(var t=window.document.styleSheets,e=[],i=ek(t),n=0;t=i[n];n++){var s=fk(t);if(s&&s.length)for(var a,o=0,r=0,l=s.length;r<l;r++)(a=s[r]).href||(a.style&&(a.parentStyleSheet||(a.style["-closure-parent-stylesheet"]=t),a.style["-closure-rule-index"]=o),e.push(a)),o++}return e},fk=function(t){var e=null;try{e=t.cssRules||t.rules}catch(i){if(15==i.code)throw i.styleSheet=t,i}return e},ek=function(t){var e=[];t=t||window.document.styleSheets;var i=!!$.p(void 0)&&void 0;if(t.imports&&t.imports.length)for(var n=0,s=t.imports.length;n<s;n++)$.Ia(e,ek(t.imports[n]));else if(t.length)for(n=0,s=t.length;n<s;n++)$.Ia(e,ek(t[n]));else{var a=fk(t);if(a&&a.length){n=0,s=a.length;for(var o;n<s;n++)(o=a[n]).styleSheet&&$.Ia(e,ek(o.styleSheet))}}return!(t.type||t.rules||t.cssRules)||t.disabled&&!i||e.push(t),e},Uj=function(t){var e=t.ia();if(e){var i=String($.oa(t));hk[i]=t,e.setAttribute("data-ac-wrapper-id",i)}},ik=function(t){delete hk[String($.oa(t))],(t=t.ia())&&t.removeAttribute("data-ac-wrapper-id")},$.Qi=function(t,e){for(var i,n=e.ia().parentNode;t&&t!=n&&null==(i=t.getAttribute&&t.getAttribute("data-ac-wrapper-id")||null);)t=t.parentNode;return(i=hk[i||""]||null)&&i.ia()==t?i:null},$.mg=function(){if(!jk)if("vml"==$.kk){var t=$.Ch.vml;if(!t)throw Error("VML module should be included to render AnyChart in IE8-");jk=t.getRenderer()}else jk=Gi.Id();return jk},$.lk=function(t,e,i){if("vml"==$.kk){var n=$.Ch.vml;if(!n)throw Error("VML module should be included to render AnyChart in IE8-");t=new n.Stage(t,e,i)}else t=new dk(t,e,i);return t},$.mk=function(t,e,i,n){return new Cg(t,e,i,n)},$.nk=function(t,e,i){return new $.rg(t,e,i)},$.ok=function(){return new $.Fg},$.pk=function(t,e,i,n){return new qg(t,e,i,n)},$.qk=function(){return new $.Ag},rk=function(t,e,i,n,s){return new bh(t,e,i,n,s)},$.sk=function(t,e,i,n){if("vml"==$.kk){var s=$.Ch.vml;if(!s)throw Error("VML module should be included to render AnyChart in IE8-");t=new s.Text(t,e)}else t=new $.Qh(t,e);return n&&t.style(n),i&&t.text(i),t},Xb=function(t,e,i,n){return new Mg(t,e,i,n)},$.Sb=function(t){return new $.Qb(t)},$.tk=function(t,e,i,n){if("vml"==$.kk){var s=$.Ch.vml;if(s)return new s.Clip(null,t,e,i,n);throw Error("VML module should be included to render AnyChart in IE8-")}return new $.Dg(null,t,e,i,n)},$.uk=function(t){return new $.Yh(t)},Li=function(){return $.p(vk)?vk:vk=$.hd&&$.bd("9")&&!$.bd("10")?"":wk||null===wk&&$.Ae(window.document,"base",void 0,void 0).length?$.sh.location.origin+$.sh.location.pathname+$.sh.location.search:""},xk=function(){return $.Cc("iPad")||$.Cc("Android")&&!$.Cc("Mobile")||$.Cc("Silk")},$.yk=function(){return!(!xk()&&($.Cc("iPod")||$.Cc("iPhone")||$.Cc("Android")||$.Cc("IEMobile"))||xk())},$.zk=function(t,e,i){if(!t.GZ){var n,s={};for(n in t){var a=t[n],o=a.toLowerCase();s[o]=a,s[o.replace(/-/g,"")]=a}t.GZ=s}return t.GZ[String(e).toLowerCase()]||i},$.Ak=function(t,e){return $.zk(Xaa,t,e||"by-x")},$.Bk=function(t,e){return $.zk(Yaa,t,e||"none")},Ck=function(t,e){return $.zk(Zaa,t,e||"default")},$.Dk=function(t,e){return $.zk($aa,t,$.p(e)?e:"left-top")},$.Ek=function(t,e){return $.zk(aba,t,e)},Fk=function(t,e){return $.zk(bba,t,e||"center")},$.Gk=function(t,e){return $.zk(cba,t,e||"vertical")},eba=function(t,e){return $.zk(dba,t,e||"vertical")},$.Lk=function(t,e){return $.zk(fba,t,e||"top")},hba=function(t,e){return $.zk(gba,t,e||"outside")},$.Mk=function(t,e){return $.zk(iba,t,e||"none")},$.Ok=function(t,e){return $.zk(Nk,t,e||"star5")},Qk=function(t){return $.zk(Nk,t,null)||$.zk($.Pk,t,null)},$.Rk=function(t,e){return $.zk(jba,t,e||"circle")},$.Sk=function(t,e){return $.zk(kba,t,e||"auto")},$.Tk=function(t,e){return $.zk(lba,t,e||"axis")},$.Uk=function(t,e,i){return e="auto-width"!=String(t).toLowerCase()||i?e:void 0,t="auto-width"!=String(t).toLowerCase()||i?t:e,$.zk(mba,t,e||"allow-overlap")},$.Vk=function(t){return $.zk(nba,t,"square")},pba=function(t,e){return $.zk(oba,t,e||"default")},$.Wk=function(t,e){return $.zk(qba,t,e||"inside")},$.Yk=function(t){return $.zk(rba,t,null)||$.Xk(t)},$.Zk=function(t,e,i){switch(t=String(t).toLowerCase()){case"years":case"year":case"yyyy":case"yy":case"y":return"year";case"semesters":case"semester":case"sem":return"semester";case"quarters":case"quarter":case"q":return"quarter";case"months":case"month":case"mm":case"m":return"month";case"thirdofmonths":case"third-of-month":case"thirdofmonth":case"decades":case"decade":case"tom":case"dec":return"third-of-month";case"weeks":case"week":case"w":return"week";case"days":case"day":case"dd":case"d":return"day";case"hours":case"hour":case"hh":case"h":return i?"day":"hour";case"minutes":case"minute":case"min":case"n":return i?"day":"minute";case"seconds":case"second":case"secs":case"sec":case"s":return i?"day":"second";case"milliseconds":case"millisecond":case"millis":case"milli":case"ms":return i?"day":"millisecond"}return $.p(e)?e:"year"},tba=function(t){return $.C(t)&&(t=t.mode),$.zk(sba,t,"csv")},$.$k=function(t){return $.zk(uba,t,"start")},$.al=function(t){return $.zk(vba,t,"top")},$.bl=function(t){return $.zk(wba,t,"none")},$.cl=function(t){return $.zk(xba,t,"normal")},$.dl=function(t){return $.zk(yba,t,"normal")},$.el=function(t){return $.zk(zba,t,"ltr")},$.fl=function(t){return $.zk(Aba,t,$.p(void 0)?void 0:"last-date")},gl=function(t){return $.zk(Bba,t,"none")},$.il=function(t,e,i){$.hl("error","Error: "+t+"\nDescription: "+Cba(t,i),e||"")},Cba=function(t,e){switch(t){case 1:return"Container is not set or can not be properly recognized. Use container() method to set it.";case 2:return"Scale is not set. Use scale() method to set it.";case 3:return"Table.contents() accepts only an Array of Arrays as it's first argument.";case 4:return'Feature "'+e[0]+'" is not supported in this module. See modules list at https://docs.anychart.com/Quick_Start/Modules for details.';case 5:return e[0]+" should be only "+e[1]+" type"+(e[2]?" ("+e[2]+").":".");case 7:return"Empty config passed to anychart.fromJson() or anychart.fromXml() method.";case 8:return"Bullet, Sparkline, Sankey and Circular Gauge charts do not support Legend. Please use anychart.standalones.Legend component for a group of charts instead.";case 51:return"Stock chart itself doesn't support legend - stock plots do. So use stock.plot().legend() instead.";case 9:return"Bullet and Sparkline charts do not support Credits.";case 10:return"Invalid GeoJSON object:";case 100:return"Double quotes in separator are not allowed.";case 101:return"CSV parsing failed.";case 200:return"Cannot create a computer on the table with the mapping of another table.";case 201:return'Cannot create computed field "'+e[0]+'" - field name should be unique for the table';case 202:return'Cannot create output field "'+e[0]+'" on the computer - field with this name already exists';case 300:var i,n=e[2],s=[];for(i in n)s.push(i+" ("+n[i]+")");return['Series "',e[0],'" of type "',e[1],'" cannot be drawn, because it requires ',n.length," shapes with the following names: ",s.join(", ")].join("");case 400:return"Surface chart data is malformed.";default:return"Unknown error occurred. Please, contact support team at http://support.anychart.com/.\nWe will be very grateful for your report."}},$.kl=function(t,e,i,n){var s;n&&!jl[s=Dba(t,i)]&&(jl[s]=!0,$.hl("warn","Warning: "+t+"\nDescription: "+s,e||""))},Dba=function(t,e){switch(t){case 1:return"Data item with ID='"+e[0]+"' already exists in the tree and will be used as the parent for all related data items.";case 2:return"Data item with ID='"+e[0]+"' is not unique. First met object will be used.";case 3:return"One of the data items was looking for the parent with ID='"+e[0]+"', but did not find it. Please check the data.\nPLEASE NOTE: this data item will be added as the root to avoid loss of information.";case 4:return"Data item {ID='"+e[0]+"', PARENT='"+e[1]+"'} belongs to a cycle and will not be added to the tree.";case 5:return"Can not set value for the '"+e[0]+"' field to an array row if it is not mapped.";case 6:return"Setting complex value to the default '"+e[0]+"' field changes row behaviour.";case 7:return"Can not set value for the '"+e[0]+"' field to a row that is not an object or an array.";case 8:return"We can not serialize '"+e[0]+"' function, please reset it manually.";case 9:return"Data grid incorrect method '"+e[0]+"()' usage: You use not standalone data grid. Perform all operations on data grid using the controller, but not directly. In current case, use '"+e[1]+"()' instead. "+e[2];case 404:return e[0]+" with id='"+e[1]+"' is not found in data tree. Please check what you are looking for.";case 11:return"Can not fit gantt chart timeline to task with id '"+e[0]+"' because both fields 'actualStart' and 'actualEnd' must be correctly specified in data item.";case 12:return'Series type "'+e[0]+'" does not support error settings - only Area, Bar, Column, Line, Marker, Spline, SplineArea, StepLine and StepLineArea do.';case 13:return"Toolbar container is not specified. Please set a container using toolbar.container() method.";case 14:return"Target chart has not method "+e[0]+"(). PLease make sure that you use correct instance of chart.";case 15:return"No chart is assigned for toolbar. Please set a target chart using toolbar.target() method.";case 405:return(e[3]||"Method")+" "+e[0]+" is deprecated. Use "+e[1]+" instead"+(e[2]?e[2]+".":".");case 407:return(e[3]||"Method")+" "+e[0]+" is deprecated.";case 19:return"The projection that used cannot work correctly without Proj4. Please include Proj4 binary (https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15/proj4.js) into your page, or use another projection";case 17:return"Incorrect arguments passed to treeDataItem.set() method. You try to set a value by path in complex structure, but path contains errors (It can be not string and not numeric values, or invalid path in existing structure, or incorrect number of path's elements etc). Please, see the documentation for treeDataItem.set() method and carefully check your data.";case 101:return"Table is already in transaction mode. Calling startTransaction() multiple times does nothing.";case 201:return"Wrong mapping passed to "+e[0]+' series - required "'+e[1]+"' field is missing.";case 406:return'Could not parse date time value "'+e[0]+'".'+(e[1]?"Symbols parsed: "+e[1]:"");case 500:return"Scale is immutable for this type of axis marker and scale will not be set.";case 501:return"Layout is immutable for this type of axis marker and layout will not be set.";case 18:return"There should be only one root in tree map data. First node has been taken as root.";case 301:return'Feature with id "'+e[0]+'" not found';case 20:var i=e[1];return"Current scale ticks settings resulted in too many ticks: trying to generate about "+e[0]/i+" ticks with interval "+i;case 21:return"Data item with ID='"+e[0]+"' already exists. You should use another key.";case 22:return"Area "+e[0]+" not represented on screen.";case 700:return"Can't add state. All states for store '"+e[0]+"' has been used.";case 701:return"Last state for store '"+e[0]+"' has been used.";case 702:return"State '"+e[1]+"' already exists in '"+e[0]+"' store.";case 800:return"Surface chart has "+e[0]+" points now. If more than 3000 points are drawn on surface chart you may experience instability and poor performance.";case 900:return'Nodes with id "'+e[0]+'" and "'+e[1]+'" already connected. Supports only one connection between nodes now.';case 901:return'Node with id "'+e[0]+'" has\'t "'+e[1]+'" coordinate. Set '+e[1]+" = 0.";case 902:return'Node with id "'+e[0]+'" already exist.';case 903:return"Can't connect edge with id: \""+e[0]+'" to node with id "'+e[1]+'", node not exists.';case 904:return'You try make edge with id "'+e[0]+'" on one node with id "'+e[1]+'".';case 905:return'No group with id "'+e[0]+'". At first set groups for nodes then use groups method.';case 906:return'Data must contain "nodes" and "edges" fields';case 907:return'Nodes data must has "id" field';case 1e3:return"Offline export failed. Using server export fallback.";case 1001:return"Both client side export and export server fallback are disabled. Nothing will be exported.";case 1002:return"Offline export failed. Fallback to server disabled.";default:return"Unknown error. Please, contact support team at http://support.anychart.com/.\nWe will be very grateful for your report!"}},$.hl=function(t,e,i){var n=$.ll.console;n&&"object"!=typeof(t=n[t]||n.log)&&t.call(n,e,i||"")},ql=function(t,e){$.od.call(this),this.f=t,this.K=e,this.na=Eba.test($.ll.location.hostname),this.G=!(this.K||this.na),this.dc=ml|nl|ol|pl},rl=function(){return("https:"==$.ll.location.protocol?"https://":"http://")+"static.anychart.com/logo.png"},tl=function(t){return sl()||t.na},ul=function(){this.b={},this.i=$.mg(),this.f=null},$.wl=function(t){var e=$.vl,i="m"+$.oa(t);i in e.b||($.K(t,e.o,e),e.b[i]={FO:t,oS:[],FV:!0})},xl=function(t){return t.f||(t.f=t.i.Wo(),t.i.Xp().appendChild(t.f)),t.f},$.Bl=function(t){var e={},i="#"==(t=String(t)).charAt(0)?t:"#"+t;if(yl.test(i))return e.vk=zl(i),e.type="hex",e;t:{var n=t.match(Fba);if(n){i=Number(n[1]);var s=Number(n[2]);if(n=Number(n[3]),0<=i&&255>=i&&0<=s&&255>=s&&0<=n&&255>=n){i=[i,s,n];break t}}i=[]}if(i.length)return e.vk=$.Tb(i),e.type="rgb",e;if(Al&&(i=Al[t.toLowerCase()]))return e.vk=i,e.type="named",e;throw Error(t+" is not a valid color string")},zl=function(t){if(!yl.test(t))throw Error("'"+t+"' is not a valid hex color");return 4==t.length&&(t=t.replace(Gba,"#$1$1$2$2$3$3")),t.toLowerCase()},$.Cl=function(t){return t=zl(t),[(0,window.parseInt)(t.substr(1,2),16),(0,window.parseInt)(t.substr(3,2),16),(0,window.parseInt)(t.substr(5,2),16)]},$.Tb=function(t){var e=t[0],i=t[1];if(t=t[2],e=Number(e),i=Number(i),t=Number(t),e!=(255&e)||i!=(255&i)||t!=(255&t))throw Error('"('+e+","+i+","+t+'") is not a valid RGB color');return"#"+(e=Dl(e.toString(16)))+(i=Dl(i.toString(16)))+(t=Dl(t.toString(16)))},Gl=function(t,e,i){return 0>i?i+=1:1<i&&--i,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t},Dl=function(t){return 1==t.length?"0"+t:t},$.Hl=function(t,e,i){return i=$.Za(i,0,1),[Math.round(i*t[0]+(1-i)*e[0]),Math.round(i*t[1]+(1-i)*e[1]),Math.round(i*t[2]+(1-i)*e[2])]},$.Il=function(t,e){return $.Hl([0,0,0],t,e)},$.Kl=function(t,e,i){t=Jl(t),e=Jl(e);var n=(t.opacity+e.opacity)/2;return{color:$.Tb($.Hl(t.r5,e.r5,$.p(i)?i:.5)),opacity:n}},Jl=function(t){var e=t,i=1;return $.A(t)||($.z(t)?e=t:(e=t.color||"#000",i=$.p(t.opacity)?t.opacity:1),t=$.Ll(e).vk,e=$.Cl(t)),{r5:e,opacity:i}},Ml=function(t,e,i,n){e=null==e||(0,window.isNaN)(+e)?7:+e,n=null!=n?$.Za(n,0,1):window.NaN,t=$.Ll(t||"#000").vk;var s=$.Cl(t);t=s[0]/255;var a=s[1]/255;s=s[2]/255;var o=Math.max(t,a,s),r=Math.min(t,a,s),l=0,h=0,c=.5*(o+r);for(o!=r&&(o==t?l=60*(a-s)/(o-r):o==a?l=60*(s-t)/(o-r)+120:o==s&&(l=60*(t-a)/(o-r)+240),h=0<c&&.5>=c?(o-r)/(2*c):(o-r)/(2-2*c)),t=(s=[Math.round(l+360)%360,h,c])[0],a=s[1],s=s[2],(0,window.isNaN)(n)?(n=s,i=null!=i?$.Za(i,0,1):.95):i=null!=i?$.Za(i,0,1):s,s=1<e?Math.abs(n-i)/(e-1):0,o=[],n=i<n?1:-1,r=0;r<e;r++){h=i+n*s*r;var u=t/360;if(0==a)c=h=l=255*h;else{var d=2*h-(l=.5>h?h*(1+a):h+a-a*h);c=255*Gl(d,l,u+1/3),h=255*Gl(d,l,u),l=255*Gl(d,l,u-1/3)}o.push($.Tb([Math.round(c),Math.round(h),Math.round(l)]))}return o},$.Nl=function(t,e,i){i=$.p(i)?i:7,t=$.Ll(t||"yellow").vk,e=$.Ll(e||"brown").vk;for(var n=[t],s=1/i,a=1;a<i-1;a++){var o=$.Kl(e,t,s*a);n.push(o.color)}return n.push(e),n},Ol=function(t){if($.C(t)){if(!t.color)return null;t=t.color}if($.z(t))try{return $.Bl(t).vk}catch(e){}return null},$.Pl=function(t,e){if($.C(t)){if($.p(t.color)||$.p(t.keys)){var i=$.Qc(t);if($.p(t.keys)){for(var n=i.keys,s=[],a=0,o=n.length;a<o;a++){var r=$.Qc(n[a]);r.color=$.Pl(r.color,e),s.push(r)}i.keys=s}return $.p(i.color)&&(i.color=$.Pl(i.color,e)),i}return t}return null===(i=Ol(t))?t:(i=$.Cl(i),null!=e||(e=.3),$.Tb($.Hl([255,255,255],i,+e)))},$.Ql=function(t,e){if($.C(t)){if($.p(t.color)||$.p(t.keys)){var i=$.Qc(t);if($.p(t.keys)){for(var n=i.keys,s=[],a=0,o=n.length;a<o;a++){var r=$.Qc(n[a]);r.color=$.Ql(r.color,e),s.push(r)}i.keys=s}return $.p(i.color)&&(i.color=$.Ql(i.color,e)),i}return t}return null===(i=Ol(t))?t:(i=$.Cl(i),null!=e||(e=.3),$.Tb($.Il(i,+e)))},$.Rl=function(t){return $.J(t,Mg)?{type:t.type,color:$.Rl(t.color),thickness:t.Ef,size:t.size}:$.J(t,$.Qb)?t.F():$.C(t)?$.Sl(t):$.da(t)?t:String(t||"none")},$.Tl=function(t){return $.C(t)?t.F?JSON.stringify(t.F()):JSON.stringify(t):(typeof t).charAt(0)+t},$.Ll=function(t){var e={},i="#"==(t=String(t)).charAt(0)?t:"#"+t;if(Hba.test(i))return e.vk=zl(i),e.type="hex",e;t:{var n=t.match(Iba);if(n){i=Number(n[1]);var s=Number(n[2]);if(n=Number(n[3]),0<=i&&255>=i&&0<=s&&255>=s&&0<=n&&255>=n){i=[i,s,n];break t}}i=[]}return i.length?(e.vk=$.Tb(i),e.type="rgb",e):Al&&(t=Al[t.toLowerCase()])?(e.vk=t,e.type="named",e):null},$.Ul=function(t,e,i){var n;return n=i?$.Ub(t):$.Wb(t),$.z(n)?n={color:n,opacity:e}:$.C(n)&&(n.opacity=e),n},$.Vl=function(t){var e=1;return $.z(t)?e="none"==t?0:1:$.C(t)&&(e=$.ea(t.opacity)?t.opacity:1),e},$.Wl=function(t,e,i){return t=$.Wb(t),$.z(t)?t={color:t,thickness:e}:$.C(t)&&(t.thickness=e),i&&(t.opacity=i),t},$.cm=function(t,e,i,n){if(!t)return $.Xl;if($.z(t)){var s=e+"|"+t+"|"+i+(n?"|"+n:""),a=Yl[s];if(!a){switch(e){case 2:a=$.Zl;break;case 3:a=$.$l;break;default:a=$.am}Yl[s]=a=$.qa(Jba,t,a,3==e,i,!!n)}}else(a=Yl.transparent)||(a=Yl.transparent=function(){return $.bm});return a},$.Xl=function(){return"none"},$.dm=function(t){return!!t&&($.C(t)?!t.color||"none"!=t.color:"none"!=t)},Jba=function(t,e,i,n,s,a,o,r,l,h){o=$.em(o),l=l||a.check($.fm);var c=a.$();if(n&&o!=$.gm){var u=a.sc(t,o,c,e,s,void 0,r);if(i&&!0===u&&(u=e(a.Eh())),$.p(u)){if(!$.D(u))return u;if(i)return t=a.Yi(r),e(u.call(t,t))}}if(n=a.sc(t,0,c,e,s,void 0,r),i&&!0===n&&(n=e(a.Eh())),h&&!i&&t!=h){var d=a.sc(h,0,c,e,s,void 0,r);$.D(d)&&(t=a.Ge(void 0,r,l),d=e(d.call(t,t)))}return $.D(n)&&(t=i?a.Yi(r):a.Ge(d,r,l),n=e(n.call(t,t))),u&&(t=a.Ge(n,r,l),n=e(u.call(t,t))),n},$.hm=function(t,e){return t&&(e=e.charAt(0).toUpperCase()+e.substr(1)),t?(t?1==t?"hover":"select":"")+e:e},jm=function(t,e,i){var n=e.split(".");if(!(e=im[n[0]]))return im[n[0]]={wE:[],LC:i,DI:0},!0;if(n=e.LC<=i){e.LC=i+1;for(var s=e.wE,a=0;a<s.length;a++){var o=s[a];jm(t,o.Tb,i);var r=o.Rb;o=o.Tb.split(".");for(var l=0;l<r.length;l++){var h=r[l].split(".");km(t,h,lm(mm(t,h),mm(t,o)))}}}return n||e.DI<i},mm=function(t,e){for(var i=t,n=0;n<e.length;n++){if(!$.C(i))return;i=i[e[n]]}return i},$.qm=function(t,e,i){if(i=$.nm(i),e=mm(i,["scales",e]),t=om(t),e){i=t.type;var n=e.type;$.p(i)&&$.p(n)&&"ordinal"==n^"ordinal"==i||(t=lm(t,e))}var s;return"ordinal-color"==(i=t.type||"linear")?$.nm("defaultOrdinalColorScale"):"linear-color"==i?$.nm("defaultLinearColorScale"):s=mm($.nm("defaultScaleSettings"),[$.pm(i)]),lm(t,s)},om=function(t){if("object"==$.ka(t)){var e,i={};for(e in t)t.hasOwnProperty(e)&&(i[e]=om(t[e]));return i}return t},km=function(t,e,i){if($.p(i)){t=$.C(t)?t:{};for(var n=0;n<e.length-1;n++){var s=e[n];$.C(t[s])||(t[s]={}),t=t[s]}t[e[e.length-1]]=i}},rm=function(t,e){for(var i=t=$.C(t)?t:{},n=[i],s=e.length-1,a=0;a<s;a++){var o=e[a];if(!$.C(i[o]))return t;i=i[o],n.push(i)}for(a=s+1;a--;){for(var r in delete(i=n.pop())[e[a]],s=!1,i){s=!0;break}if(s)break}return t},lm=function(t,e){if($.p(t)){if("object"==$.ka(t)){if("object"==$.ka(e))for(var i in e)i in t&&i in sm||(t[i]=lm(t[i],e[i]))}else if(($.da(t)||null===t)&&"object"==$.ka(e))return lm({enabled:!!t},e);return t}return $.Sl(e)},$.Bm=function(t,e){var i,n,s=t=tm(t,e);for(n in um){var a=n.split("."),o=mm(s,a);if($.A(o)){var r=o.length,l=mm(e,a),h=mm(e,um[n].split(".")),c=!0,u=$.A(l)?l.length:0;if(u==r)for(i=0;i<r;i++){var d=$.Sl(l[i]);if(d=lm(d,h),!vm(o[i],d)){c=!1;break}}else c=!1;if(c)s=rm(s,a);else for(i=0;i<r;i++)i<u?(d=$.Sl(l[i]),d=lm(d,h)):d=h,o[i]=tm(o[i],d)||{}}}for(n=0;n<wm.length;n++)if(a=wm[n].split("."),o=mm(s,a),$.A(o)){for(r=(l=mm(e,a)).length,i=0;i<r;i++)h=l[i].type,h=mm($.nm("defaultScaleSettings"),[h]),l[i]=lm(l[i],h);if(r=o.length,h=!0,$.A(l)&&l.length==r){for(i=0;i<r;i++)if(!vm(o[i],l[i])){h=!1;break}}else h=!1;if(h)s=rm(s,a);else for(i=0;i<r;i++)o[i]=tm(o[i],l[i])||{}}t:{if(s){if(!(i=s.chart||s.gauge||s.gantt||s.map)){t=s;break t}r=$.ka(i.credits),n=$.ka($.zm("stageCredits")),"object"==r&&"object"==n&&(r=$.zm("stageCredits"),r=tm(i.credits,r),$.p(r)&&(i.credits=r))}t=s}for(var p in s=t,Am)if(i=Am[p],r=p.split("."),a=mm(s,r),o=mm(e,i.OL.split(".")),$.A(a)&&$.p(o))for(n=a.length,r=0;r<n;r++)l=mm(a,[r,i.TP]),$.p(l)&&(a[r]=tm(a[r],mm(o,[l]))||{});return s},tm=function(t,e,i){var n,s=$.ka(t),a=$.ka(e);if("object"==s&&"object"==a){for(var o in s=!0,t)if(o in e){if(a=e[o],o in sm){var r=sm[o];switch(r){case Cm:a=$.D(a)?void 0:$.Ub(a);break;case Dm:a=$.D(a)?void 0:$.Rl($.Yb(a));break;case Em:a=$.D(a)?void 0:$.Wb(a);break;case Fm:a=$.Gm(a)}}else r=Hm;n=r!=Hm?vm(t[o],a,r)?void 0:t[o]:tm(t[o],a,r||i),$.p(n)?(t[o]=n,s=!1):"xScale"==o||"yScale"==o||"colorScale"==o?s=!1:"enabled"!=o&&delete t[o]}else $.p(t[o])&&(s=!1);if(s)return}else{if($.p(i)&&"array"==s&&"array"==a)return vm(t,e,i)?void 0:t;if(t==e)return}return t},vm=function(t,e,i){var n=$.ka(t),s=$.ka(e);if(n==s){if("object"==n)for(var a in t){if(n=e[a],a in sm)switch(sm[a]){case Cm:n=$.D(n)?void 0:$.Ub(n);break;case Dm:n=$.D(n)?void 0:$.Rl($.Yb(n));break;case Em:n=$.D(n)?void 0:$.Wb(n)}if(!vm(t[a],n,i))return!1}else{if("array"!=n)return t===e;if((a=t.length)!=e.length)return!1;for(s=0;s<a;s++){switch(n=e[s],i){case Im:n=$.Ub(n);break;case Jm:n=$.Rl($.Yb(n))}if(!vm(t[s],n))return!1}}return!0}return!1},Xa=function(t){if($.z(t))var e=[t];else{e=[];var i=t[0];t=t[1],i=$.z(i)?[i]:Ya(i),t=$.z(t)?[t]:Ya(t);for(var n=0;n<i.length;n++)for(var s=0;s<t.length;s++)e.push(i[n]+t[s])}return e},Km=function(){},$.Lm=function(){$.od.call(this),this.kJ=this.uB.length-1,this.gG=this.Uz.length-1,this.DO=(0,$.pa)(this.DO,this)},Mm=function(t){for(var e=t.length,i=Array(e),n=i[0]=-1,s=1;s<e;s++){var a=t.charAt(s);if('"'==a)throw $.il(100),Error("Double quotes in separator are not allowed");for(;0<n&&t.charAt(n+1)!=a;)n=i[n];t.charAt(n+1)==a&&n++,i[s]=n}return i},Nm=function(t,e){for(;-1<t.Zo&&t.Uz.charAt(t.Zo+1)!=e;)t.Zo=t.f[t.Zo];return t.Uz.charAt(t.Zo+1)==e&&t.Zo++,t.Zo==t.gG},Om=function(t,e){for(;-1<t.$o&&t.uB.charAt(t.$o+1)!=e;)t.$o=t.i[t.$o];return t.uB.charAt(t.$o+1)==e&&t.$o++,t.$o==t.kJ},Qm=function(t){if(t.rM)return!1;var e=0,i=t.ah-1;t.$o=-1,t.Zo=-1;for(var n=0,s="",a=0;++i<t.Yz;){var o=t.Qd.charAt(i);switch(n){case 0:if('"'==o){++i<t.Yz?o=t.Qd.charAt(i):i--,t.ah=i,'"'==o?n=1:(n=2,i--);break}if(Nm(t,o)){t.b(e++,null),s="",t.Zo=-1,t.$o=-1,t.ah=i+1;break}if(Om(t,o)){if(t.Zo=-1,t.$o=-1,t.ah=i+1,0<e)return t.b(e,null),!0;s="";break}(!t.mw||" "!=o&&"\t"!=o)&&(t.ah=i,n=1);break;case 1:if(Nm(t,o)){o=i-t.ah-t.gG,0<t.gG&&t.mw?(s=Pm(t.Qd.substr(t.ah,o)))||(s=null):(t.mw&&(o-=a),s=0<o?t.Qd.substr(t.ah,o):null),t.b(e++,s),s="",t.Zo=-1,t.$o=-1,t.ah=i+1,n=a=0;break}if(Om(t,o)){if(o=i-t.ah-t.kJ,!e&&0>=o){s="",n=0,t.Zo=-1,t.$o=-1,t.ah=i+1,a=0;break}return 0<t.kJ&&t.mw?(s=Pm(t.Qd.substr(t.ah,o)))||(s=null):(t.mw&&(o-=a),s=0<o?t.Qd.substr(t.ah,o):null),t.b(e,s),t.ah=i+1,!0}!t.mw||" "!=o&&"\t"!=o?a=0:a++;break;case 2:if('"'==o){if(!(++i<t.Yz))return s+=t.Qd.substr(t.ah,i-t.ah-1),t.b(e,s.length?s:null),t.ah=i,t.rM=!0;'"'==(o=t.Qd.charAt(i))?(s+=t.Qd.substr(t.ah,i-t.ah),t.ah=i+1):(t.Zo=-1,t.$o=-1,n=3,s+=t.Qd.substr(t.ah,i-t.ah-1),t.b(e++,s||null),s="",i--)}break;case 3:if(Nm(t,o))s="",t.Zo=-1,t.$o=-1,t.ah=i+1,n=a=0;else if(Om(t,o))return t.ah=i+1,!0}}return o=t.Yz-t.ah,2!=n&&1!=n||!o||(s+=t.Qd.substr(t.ah,o),t.mw&&(s=Pm(t.Qd.substr(t.ah,o))),t.b(e++,s||null),t.ah=t.Yz),t.rM=!0,0<e},$.Rm=function(){return new $.Lm},$.Sm=function(t){return $.J(t,$.gb)?t:$.A(t)?new $.gb(t[0],t[1]):$.C(t)?new $.gb(t.x,t.y):new $.gb(0,0)},$.Tm=function(t,e){var i=Math.pow(10,Math.min(e||0,14-Math.floor(Math.log(Math.abs(t))*Math.LOG10E)));return Math.round(t*i)/i||0},$.Vm=function(t,e){var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E);return i=0>i?Math.min($.Um(t),14):13-Math.max(i,7),$.Tm(t,e||i)},$.Um=function(t){if(!(0,window.isFinite)(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},$.Wm=function(t,e,i){return Math.abs(t-e)<(i||.01)},$.Xm=function(t,e){var i=Math.log(Math.max(1e-7,t));return e?$.Vm(i/Math.log(e),14):i},Ym=function(t,e){return $.Tm(Math.pow(t,e),7)},Zm=function(t){t=$.Ha(t),$.Pa(t);var e=Math.floor(t.length/2);return t.length%2?t[e]:(t[e-1]+t[e])/2},$m=function(t){for(var e={},i=t[0],n=1,s=0;s<t.length;s++){var a=t[s];$.p(e[a])?e[a]++:e[a]=1,e[a]>n&&(i=a,n=e[a])}return i},$.bn=function(t,e){var i,n=!1;if(!t||!e)return!1;var s=0;for(i=t.length;s<i-1;s+=2){var a=s==i-2?0:s+2,o=s==i-2?1:s+3;n=n||an(t[s],t[s+1],t[a],t[o],e)}for(s=0,i=e.length;s<i-1;s+=2)a=s==i-2?0:s+2,o=s==i-2?1:s+3,n=n||an(e[s],e[s+1],e[a],e[o],t);return!n},an=function(t,e,i,n,s){for(var a=!0,o=0,r=s.length;o<r-1;o+=2)a=a&&0>=$.cn(t,e,i,n,s[o],s[o+1]);return a},$.cn=function(t,e,i,n,s,a){return(t=(e-n)*s+(i-t)*a+(t*n-i*e))?0<t?1:-1:0},dn=function(t,e,i,n){if(t>e){var s=t;t=e,e=s}return i>n&&(s=i,i=n,n=s),Math.max(t,i)<=Math.min(e,n)},$.en=function(t,e,i,n,s,a,o,r){return dn(t,i,s,o)&&dn(e,n,a,r)&&0>=((i-t)*(a-e)-(n-e)*(s-t))*((i-t)*(r-e)-(n-e)*(o-t))&&0>=((o-s)*(e-a)-(r-a)*(t-s))*((o-s)*(n-a)-(r-a)*(i-s))},fn=function(t,e,i,n,s,a,o,r){var l=window.NaN;return 0!=t-2*i+s?(l=(t-i+Math.sqrt((t-2*i+s)*o+i*i-t*s))/(t-2*i+s),t=(t-i-Math.sqrt((t-2*i+s)*o+i*i-t*s))/(t-2*i+s),i=(e-n+Math.sqrt((e-2*n+a)*r+n*n-e*a))/(e-2*n+a),e=(e-n-Math.sqrt((e-2*n+a)*r+n*n-e*a))/(e-2*n+a),l=0<l&&1>l?l:0<t&&1>t?t:0<i&&1>i?i:0<e&&1>e?e:window.NaN):t!=i?l=(o-t)/(2*(i-t)):t==i&&i!=s&&(l=Math.sqrt((o-t)/(s-i))),l},$.gn=function(t,e,i,n){return t=i-t,e=n-e,Math.sqrt(t*t+e*e)},$.hn=function(t,e,i){return(i||0)+e*$.Tm(Math.cos(t),8)},$.jn=function(t,e,i){return(i||0)+e*$.Tm(Math.sin(t),8)},$.kn=function(t,e,i,n){return new $.I(t,e,i,n)},$.ln=function(t){return[t.left,t.top,t.left+t.width,t.top,t.left+t.width,t.top+t.height,t.left,t.top+t.height]},$.mn=function(t){for(var e=new $.I(0,0,0,0),i=new $.I(t[0],t[1],0,0),n=2,s=t.length;n<s;n+=2)e.left=t[n],e.top=t[n+1],$.pb(i,e);return i},$.nn=function(t){return new $.I(+t.left||0,+t.top||0,+t.width||0,+t.height||0)},$.on=function(t,e){0<arguments.length&&(this.x=t,this.y=e)},pn=function(t,e){return new $.on(t.x*e,t.y*e)},qn=function(t,e,i){return new $.on(t.x+(e.x-t.x)*i,t.y+(e.y-t.y)*i)},rn=function(t){var e=arguments;this.b=[];for(var i=e.length-1;0<=i;i--)this.b.push(e[i])},tn=function(t){switch(t.tJ(),t.b.length-1){case 0:var e=[];break;case 1:e=[];var i=t.b[1];0!=i&&e.push(-t.b[0]/i);break;case 2:if(e=[],2==t.b.length-1){var n=t.b[2];0<(n=(i=t.b[1]/n)*i-t.b[0]/n*4)?(n=Math.sqrt(n),e.push(.5*(-i+n)),e.push(.5*(-i-n))):0==n&&e.push(.5*-i)}break;case 3:e=sn(t);break;case 4:if(e=[],4==t.b.length-1){var s=t.b[4];i=t.b[3]/s,n=t.b[2]/s;var a=t.b[1]/s;t=t.b[0]/s;var o=i*i/4-n+(s=sn(new rn(1,-n,i*a-4*t,-i*i*t+4*n*t-a*a))[0]);1e-6>=Math.abs(o)&&(o=0),0<o?(n=(s=3*i*i/4-(t=Math.sqrt(o))*t-2*n)+(a=(4*i*n-8*a-i*i*i)/(4*t)),a=s-a,1e-6>=Math.abs(n)&&(n=0),1e-6>=Math.abs(a)&&(a=0),0<=n&&(n=Math.sqrt(n),e.push(-i/4+(t+n)/2),e.push(-i/4+(t-n)/2)),0<=a&&(n=Math.sqrt(a),e.push(-i/4+(n-t)/2),e.push(-i/4-(n+t)/2))):0>o||-1e-6<=(a=s*s-4*t)&&(0>a&&(a=0),1e-6<=(s=3*i*i/4-2*n)+(a=2*Math.sqrt(a))&&(n=Math.sqrt(s+a),e.push(-i/4+n/2),e.push(-i/4-n/2)),1e-6<=s-a&&(n=Math.sqrt(s-a),e.push(-i/4+n/2),e.push(-i/4-n/2)))}break;default:e=[]}return e},sn=function(t){var e=[];if(3==t.b.length-1){var i=t.b[3],n=t.b[2]/i,s=t.b[1]/i,a=(3*s-n*n)/3;t=(2*n*n*n-9*s*n+t.b[0]/i*27)/27,n/=3,i=t*t/4+a*a*a/27,t/=2,0<i?(s=0<=(i=-t+(a=Math.sqrt(i)))?Math.pow(i,1/3):-Math.pow(-i,1/3),s=0<=(i=-t-a)?s+Math.pow(i,1/3):s-Math.pow(-i,1/3),e.push(s-n)):0>i?(a=Math.sqrt(-a/3),i=Math.atan2(Math.sqrt(-i),-t)/3,t=Math.cos(i),i=Math.sin(i),s=Math.sqrt(3),e.push(2*a*t-n),e.push(-a*(t+s*i)-n),e.push(-a*(t-s*i)-n)):(i=0<=t?-Math.pow(t,1/3):Math.pow(-t,1/3),e.push(2*i-n),e.push(-i-n))}return e},un=function(t,e,i,n,s,a,o,r,l,h,c,u){if(t=new $.on(t,e),i=new $.on(i,n),s=new $.on(s,a),o=new $.on(o,r),h=new $.on(l,h),l=new $.on(c,u),c=[],r=pn(i,-2),u=t.add(r.add(s)),r=pn(t,-2),s=pn(i,2),i=r.add(s),t=new $.on(t.x,t.y),r=pn(h,-2),l=o.add(r.add(l)),r=pn(o,-2),s=pn(h,2),h=r.add(s),o=new $.on(o.x,o.y),0==u.y)s=(r=u.x*(t.y-o.y))-i.x*i.y,a=i.y*i.y,r=new rn(u.x*l.y*l.y,2*u.x*h.y*l.y,u.x*h.y*h.y-l.x*a-l.y*r-l.y*s,-h.x*a-h.y*r-h.y*s,(t.x-o.x)*a+(t.y-o.y)*s);else{r=u.x*l.y-u.y*l.x,s=u.x*h.y-h.x*u.y;var d=i.x*u.y-i.y*u.x;a=t.y-o.y,n=u.y*(t.x-o.x)-u.x*a,e=-i.y*d+u.y*n,d*=d,r=new rn(r*r,2*r*s,(-l.y*d+u.y*s*s+u.y*r*n+r*e)/u.y,(-h.y*d+u.y*s*n+s*e)/u.y,(a*d+n*e)/u.y)}for(r=tn(r),s=0;s<r.length;s++)if(0<=(a=r[s])&&1>=a&&(n=tn(new rn(u.x,i.x,t.x-o.x-a*h.x-a*a*l.x)),e=tn(new rn(u.y,i.y,t.y-o.y-a*h.y-a*a*l.y)),0<n.length&&0<e.length))t:for(d=0;d<n.length;d++){var p=n[d];if(0<=p&&1>=p)for(var g=0;g<e.length;g++)if(1e-4>Math.abs(p-e[g])){c.push(pn(l,a*a).add(pn(h,a).add(o)));break t}}return c},vn=function(t,e,i,n,s,a,o,r){var l,h=(r-a)*(i-t)-(o-s)*(n-e);return 0!=h?(o=((o-s)*(e-a)-(r-a)*(t-s))/h,s=((i-t)*(e-a)-(n-e)*(t-s))/h,l=0<=o&&1>=o&&0<=s&&1>=s?new $.on(t+o*(i-t),e+o*(n-e)):null):l=null,l},wn=function(t,e){switch(e){case 1:return 0!=t%4||0==t%100&&0!=t%400?28:29;case 5:case 8:case 10:case 3:return 30}return 31},xn=function(t,e,i,n,s){return t=new Date(t,e,i),n=$.p(n)?n:3,s=s||0,e=((t.getDay()+6)%7-s+7)%7,t.valueOf()+864e5*((n-s+7)%7-e)},$.En=function(t,e,i,n,s,a){$.z(t)?(this.ai=t==yn?e:0,this.pg=t==zn?e:0,this.xg=t==An?e:0,this.Th=t==Bn?e:0,this.Bj=t==Cn?e:0,this.wh=t==Dn?e:0):(this.ai=t||0,this.pg=e||0,this.xg=i||0,this.Th=n||0,this.Bj=s||0,this.wh=a||0)},Fn=function(t){if(!(t=t.match(Kba)))return null;var e=!(t[6]||t[7]||t[8]);if(e&&!(t[2]||t[3]||t[4])||e&&t[5])return null;e=(0,window.parseInt)(t[2],10)||0;var i=(0,window.parseInt)(t[3],10)||0,n=(0,window.parseInt)(t[4],10)||0,s=(0,window.parseInt)(t[6],10)||0,a=(0,window.parseInt)(t[7],10)||0,o=(0,window.parseFloat)(t[8])||0;return t[1]?new $.En(-e,-i,-n,-s,-a,-o):new $.En(e,i,n,s,a,o)},Gn=function(t,e){var i=Math.min(t.ai,t.pg,t.xg,t.Th,t.Bj,t.wh),n=Math.max(t.ai,t.pg,t.xg,t.Th,t.Bj,t.wh);return 0>i&&0<n?null:e||0!=i||0!=n?(n=[],0>i&&n.push("-"),n.push("P"),(t.ai||e)&&n.push(Math.abs(t.ai)+"Y"),(t.pg||e)&&n.push(Math.abs(t.pg)+"M"),(t.xg||e)&&n.push(Math.abs(t.xg)+"D"),(t.Th||t.Bj||t.wh||e)&&(n.push("T"),(t.Th||e)&&n.push(Math.abs(t.Th)+"H"),(t.Bj||e)&&n.push(Math.abs(t.Bj)+"M"),(t.wh||e)&&n.push(Math.abs(t.wh)+"S")),n.join("")):"PT0S"},$.Mn=function(t,e,i){$.ea(t)?(this.b=Hn(t,e||0,i||1),Kn(this,i||1)):$.C(t)?(this.b=Hn(t.getFullYear(),t.getMonth(),t.getDate()),Kn(this,t.getDate())):(this.b=new Date((0,$.Ln)()),t=this.b.getDate(),this.b.setHours(0),this.b.setMinutes(0),this.b.setSeconds(0),this.b.setMilliseconds(0),Kn(this,t))},Hn=function(t,e,i){return e=new Date(t,e,i),0<=t&&100>t&&e.setFullYear(e.getFullYear()-1900),e},Kn=function(t,e){if(t.getDate()!=e){var i=t.getDate()<e?1:-1;t.b.setUTCHours(t.b.getUTCHours()+i)}},$.Nn=function(t,e,i,n,s,a,o){this.b=$.ea(t)?new Date(t,e||0,i||1,n||0,s||0,a||0,o||0):new Date(t&&t.getTime?t.getTime():(0,$.Ln)())},$.On=function(t,e,i,n,s,a,o){t=$.ea(t)?Date.UTC(t,e||0,i||1,n||0,s||0,a||0,o||0):t?t.getTime():(0,$.Ln)(),this.b=new Date(t)},Lba=function(){if(!$.hd)return!1;try{return new window.ActiveXObject("MSXML2.DOMDocument"),!0}catch(a2){return!1}},Pn=function(){var t=new window.ActiveXObject("MSXML2.DOMDocument");t.resolveExternals=!1,t.validateOnParse=!1;try{t.setProperty("ProhibitDTD",!0),t.setProperty("MaxXMLSize",2048),t.setProperty("MaxElementDepth",256)}catch(e){}return t},Qn=function(){},Sn=function(t){if("number"==typeof t){var e=new Qn;e.D=t;var i=t;if(0==i)i="Etc/GMT";else{var n=["Etc/GMT",0>i?"-":"+"];i=Math.abs(i),n.push(Math.floor(i/60)%100),0!=(i%=60)&&n.push(":",$.uc(i,2)),i=n.join("")}return e.i=i,0==(i=t)?i="UTC":(n=["UTC",0>i?"+":"-"],i=Math.abs(i),n.push(Math.floor(i/60)%100),0!=(i%=60)&&n.push(":",i),i=n.join("")),t=Rn(t),e.o=[i,i],e.b={ksa:t,BZ:t},e.f=[],e}return(e=new Qn).i=t.id,e.D=-t.std_offset,e.o=t.names,e.b=t.names_ext,e.f=t.transitions,e},Rn=function(t){var e=["GMT"];return e.push(0>=t?"+":"-"),t=Math.abs(t),e.push($.uc(Math.floor(t/60)%100,2),":",$.uc(t%60,2)),e.join("")},Tn=function(t,e){for(var i=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes())/36e5,n=0;n<t.f.length&&i>=t.f[n];)n+=2;return 0==n?0:t.f[n-1]},$.Xn=function(t,e){this.f=[],this.b=e||Un,"number"==typeof t?Vn(this,t):Wn(this,t)},Yn=function(t){return t.getHours?t.getHours():0},Wn=function(t,e){for(Mba&&(e=e.replace(/\u200f/g,""));e;){for(var i=e,n=0;n<Zn.length;++n){var s=e.match(Zn[n]);if(s){var a=s[0];e=e.substring(a.length),0==n&&(a="''"==a?"'":(a=a.substring(1,"'"==s[1]?a.length-1:a.length)).replace(/''/g,"'")),t.f.push({text:a,type:n});break}}if(i===e)throw Error("Malformed pattern part: "+e)}},Vn=function(t,e){if(4>e)var i=t.b.mF[e];else if(8>e)i=t.b.rF[e-4];else{if(!(12>e))return void Vn(t,10);i=(i=(i=t.b.sQ[e-8]).replace("{1}",t.b.mF[e-8])).replace("{0}",t.b.rF[e-8])}Wn(t,i)},$n=function(t,e){var i=String(e),n=t.b||Un;if(void 0!==n.SQ){for(var s=[],a=0;a<i.length;a++){var o=i.charCodeAt(a);s.push(48<=o&&57>=o?String.fromCharCode(n.SQ+o-48):i.charAt(a))}i=s.join("")}return i},ao=function(t){if(!(t.getHours&&t.getSeconds&&t.getMinutes))throw Error("The date to format has no time (probably a goog.date.Date). Use Date or goog.date.DateTime, or use a pattern without time fields.")},Nba=function(t,e,i,n,s,a){var o=e.length;switch(e.charAt(0)){case"G":return i=0<n.getFullYear()?1:0,4<=o?t.b.eZ[i]:t.b.wQ[i];case"y":return 0>(i=n.getFullYear())&&(i=-i),2==o&&(i%=100),$n(t,$.uc(i,o));case"Y":return i=n.getFullYear(),s=n.getMonth(),n=n.getDate(),i=xn(i,s,n,t.b.gK,t.b.fK),0>(i=new Date(i).getFullYear())&&(i=-i),2==o&&(i%=100),$n(t,$.uc(i,o));case"M":t:switch(i=n.getMonth(),o){case 5:o=t.b.iZ[i];break t;case 4:o=t.b.BQ[i];break t;case 3:o=t.b.IQ[i];break t;default:o=$n(t,$.uc(i+1,o))}return o;case"k":return ao(s),i=Yn(s)||24,$n(t,$.uc(i,o));case"S":return i=s.getMilliseconds()/1e3,$n(t,i.toFixed(Math.min(3,o)).substr(2)+(3<o?$.uc(0,o-3):""));case"E":return i=n.getDay(),4<=o?t.b.RQ[i]:t.b.KQ[i];case"a":return ao(s),o=Yn(s),t.b.oQ[12<=o&&24>o?1:0];case"h":return ao(s),i=Yn(s)%12||12,$n(t,$.uc(i,o));case"K":return ao(s),i=Yn(s)%12,$n(t,$.uc(i,o));case"H":return ao(s),i=Yn(s),$n(t,$.uc(i,o));case"c":t:switch(i=n.getDay(),o){case 5:o=t.b.yZ[i];break t;case 4:o=t.b.AZ[i];break t;case 3:o=t.b.zZ[i];break t;default:o=$n(t,$.uc(i,1))}return o;case"L":t:switch(i=n.getMonth(),o){case 5:o=t.b.xZ[i];break t;case 4:o=t.b.MQ[i];break t;case 3:o=t.b.NQ[i];break t;default:o=$n(t,$.uc(i+1,o))}return o;case"Q":return i=Math.floor(n.getMonth()/3),4>o?t.b.JQ[i]:t.b.EQ[i];case"d":return $n(t,$.uc(n.getDate(),o));case"m":return ao(s),$n(t,$.uc(s.getMinutes(),o));case"s":return ao(s),$n(t,$.uc(s.getSeconds(),o));case"v":return(o=a||Sn(i.getTimezoneOffset())).i;case"V":return t=a||Sn(i.getTimezoneOffset()),2>=o?t.i:0<Tn(t,i)?$.p(t.b.g8)?t.b.g8:t.b.DST_GENERIC_LOCATION:$.p(t.b.BZ)?t.b.BZ:t.b.STD_GENERIC_LOCATION;case"w":return i=s.getFullYear(),n=s.getMonth(),s=s.getDate(),i=xn(i,n,s,t.b.gK,t.b.fK),n=new Date(new Date(i).getFullYear(),0,1).valueOf(),$n(t,$.uc(Math.floor(Math.round((i-n)/864e5)/7)+1,o));case"z":return t=a||Sn(i.getTimezoneOffset()),4>o?t.o[0<Tn(t,i)?2:0]:t.o[0<Tn(t,i)?3:1];case"Z":return n=a||Sn(i.getTimezoneOffset()),4>o?(t=[0>(o=-n.rD(i))?"-":"+"],o=Math.abs(o),t.push($.uc(Math.floor(o/60)%100,2),$.uc(o%60,2)),o=t.join("")):o=$n(t,Rn(n.rD(i))),o;default:return""}},Oba=function(t){return!/^\s*$/.test(t)&&/^[\],:{}\s\u2028\u2029]*$/.test(t.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},Pba=function(a){if(a=String(a),Oba(a))try{return eval("("+a+")")}catch(b2){}throw Error("Invalid JSON string: "+a)},co=function(t){return(new bo).F(t)},bo=function(){},eo=function(t,e,i){if(null==e)i.push("null");else{if("object"==typeof e){if($.A(e)){var n=e;e=n.length,i.push("[");for(var s="",a=0;a<e;a++)i.push(s),eo(t,n[a],i),s=",";return void i.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(n in i.push("{"),s="",e)Object.prototype.hasOwnProperty.call(e,n)&&"function"!=typeof(a=e[n])&&(i.push(s),fo(n,i),i.push(":"),eo(t,a,i),s=",");return void i.push("}")}e=e.valueOf()}switch(typeof e){case"string":fo(e,i);break;case"number":i.push((0,window.isFinite)(e)&&!(0,window.isNaN)(e)?String(e):"null");break;case"boolean":i.push(String(e));break;case"function":i.push("null");break;default:throw Error("Unknown type: "+typeof e)}}},fo=function(t,e){e.push('"',t.replace(Qba,(function(t){var e=go[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),go[t]=e),e})),'"')},$.ho=function(t){if($.fa.JSON)try{return $.fa.JSON.stringify(t)}catch(e){}return co(t)},$.io=function(t){if($.fa.JSON)try{return $.fa.JSON.parse(t)}catch(e){}return Pba(t)},$.no=function(t,e){for(var i=[],n=0;n<t.length;n+=2){var s=t[n],a=void 0,o=t[n+1];if(o==Rba)a=s;else if(s){switch(o){case $.jo:s=s.Pa;break;case $.ko:s=s.oa;break;case $.lo:s=s.Nd}e?o==Sba?a=s.get(e):(a=s[e],o==mo&&(a=a?a.call(s):void 0)):a=s}i.push(a)}return i},oo=function(t,e,i,n){if(i)for(var s=0;s<i.length;s++){var a=i[s];if(a in t){e=a;break}}return 3<arguments.length?(s=t[e],t[e]=n,s):t[e]},ro=function(t,e){return"number"==typeof t&&"number"==typeof e?$.po(t,e):(t=$.qo(t))>(e=$.qo(e))?1:t==e?0:-1},Tba=function(t,e){return-ro(t,e)},$.po=function(t,e){return(0,window.isNaN)(t)?(0,window.isNaN)(e)?0:1:(0,window.isNaN)(e)?-1:t-e},$.so=function(t){for(var e;$.J(t,$.ig);){if(e=t.tag,$.p(e))return e;t=t.parent()}},$.to=function(t,e){if(!t)return!1;for(;$.J(e,$.qf)&&e!=t;)e=e.Zi();return e==t},$.qo=function(t){return $.C(t)?"o"+$.oa(t):(typeof t).charAt(0)+t},$.L=function(t,e,i){return t=$.ea(t)?t:!(0,window.isNaN)(e)&&$.uo(t)?e*(0,window.parseFloat)(t)/100:(0,window.parseFloat)(t),i&&!(0,window.isNaN)(e)?e-t:t},$.xo=function(t){switch(t){case $.vo:return"hovered";case $.wo:return"selected";default:return"normal"}},$.uo=function(t){return $.z(t)&&$.fc(t,"%")&&!(0,window.isNaN)((0,window.parseFloat)(t))},$.yo=function(t,e){if(null===t)return null;t=$.p(t)?t:0,e=$.p(e)?e:0;var i=$.uo(t),n=(0,window.parseFloat)(t);return(0,window.isNaN)(n)?e:i?t:n},$.zo=function(t,e){return $.uo(t)?t:($.ea(t)||(t=(0,window.parseFloat)(t)),(0,window.isNaN)(t)?e?window.NaN:"0%":t+"%")},$.Ao=function(t){return $.uo(t)?(0,window.parseFloat)(t)/100:+t},$.N=function(t){return null==t||$.da(t)?window.NaN:+t},$.Bo=function(t){return $.z(t)?t:$.N(t)},Co=function(t){return $.ea(t)&&!(0,window.isNaN)(t)||$.z(t)&&""!=(0,$.vc)(t)?t:null},$.Do=function(t){return(0,window.isNaN)($.N(t))},$.P=function(t,e,i){return $.ea(t)||(t=(0,window.parseFloat)(t)),t=Math.round(t),!(0,window.isNaN)(t)&&(0<t||i&&!t)?t:$.p(e)?e:i?0:1},$.Xk=function(t){if($.ea(t))var e=t;else $.z(t)?(e=+new Date(t),(0,window.isNaN)(e)&&(e=+t)):e=null!=t?Number(t):window.NaN;return e},$.Eo=function(t,e){var i=t.left,n=t.top;switch($.Dk(e)){case"left-center":n+=t.height/2;break;case"left-bottom":n+=t.height;break;case"center-top":i+=t.width/2;break;case"center":i+=t.width/2,n+=t.height/2;break;case"center-bottom":i+=t.width/2,n+=t.height;break;case"right-top":i+=t.width;break;case"right-center":i+=t.width,n+=t.height/2;break;case"right-bottom":i+=t.width,n+=t.height}return{x:i,y:n}},$.Go=function(t){return t=$.ab(t),(t/=90)!=~~t&&(t=Math.round(t-.5)+.5),$.Fo[(t+t+6)%8]},$.Ho=function(t){return"outside"==t||"byPath"==t?1:"inside"==t?-1:0},$.Io=function(t,e){var i=0,n=$.p(e)?e:window.NaN;if(t.enabled()){var s=t.g("position"),a=t.g("length");"outside"==s?i=0>=n?0:a:"center"==s?i=n*a/2:"inside"==s&&(i=0<=n?0:-a)}return i},$.Jo=function(t,e){var i=$.ab(-e)/90;if(i){var n=(0,$.za)($.Fo,t);0<=n&&(i!=~~i&&(i=Math.round(i-.5)+.5),t=$.Fo[(n+(i+i))%$.Fo.length])}return t},$.Ko=function(t){return"left-top"==t||"center-top"==t||"right-top"==t},$.Lo=function(t){return"left-bottom"==t||"center-bottom"==t||"right-bottom"==t},$.Mo=function(t){return"left-top"==t||"left-center"==t||"left-bottom"==t},$.No=function(t){return"right-top"==t||"right-center"==t||"right-bottom"==t},$.Oo=function(t,e,i,n){return i=i||0,n=7<=n?n:7,$.Tm(e*Math.floor($.Tm((t-i)/e,n))+i,n)},$.Po=function(t,e,i,n){return i=i||0,n=7<=n?n:7,$.Tm(e*Math.ceil($.Tm((t-i)/e,n))+i,n)},$.So=function(t,e,i){var n=new Date(t),s=n.getUTCFullYear(),a=n.getUTCMonth(),o=n.getUTCDate(),r=n.getUTCHours(),l=n.getUTCMinutes(),h=n.getUTCSeconds(),c=n.getUTCMilliseconds();return e.ai?(s=$.Oo(s,e.ai,new Date(i).getUTCFullYear()),Date.UTC(s,0)):e.pg?(a=$.Oo(a,e.pg),Date.UTC(s,a)):e.xg&&0==e.xg%7?(t=$.Qo($.Ro()),$.Oo(n.getTime(),864e5*e.xg,Date.UTC(2e3,0,2+(t?t.firstDayOfWeek:0)))):e.xg?(o=$.Oo(o,e.xg),Date.UTC(s,a,o)):e.Th?(r=$.Oo(r,e.Th),Date.UTC(s,a,o,r)):e.Bj?(l=$.Oo(l,e.Bj),Date.UTC(s,a,o,r,l)):1<=e.wh?(h=$.Oo(h,e.wh),Date.UTC(s,a,o,r,l,h)):e.wh?(c=$.Oo(c,1e3*e.wh),Date.UTC(s,a,o,r,l,h,c)):t},To=function(t){return $.p(t)?$.uc(t,2):t},Uba=function(t,e,i,n,s,a,o){var r=$.p(e)?e+1:e,l=$.uc(t,4)||"2000";r=To(r)||"01";var h=To(i)||"01",c=To(n)||"00",u=To(s)||"00",d=To(a)||"00",p=To(o)||"0";switch(arguments.length){case 2:l=l+"-"+r;break;case 3:l=l+"-"+r+"-"+h;break;case 4:case 5:l=l+"-"+r+"-"+h+"T"+c+":"+u;break;case 6:l=l+"-"+r+"-"+h+"T"+c+":"+u+":"+d;break;case 7:l=l+"-"+r+"-"+h+"T"+c+":"+u+":"+d+"."+p}return new Date(l).getTime()},$.Uo=function(t,e,i,n){var s=new Date(t),a=s.getUTCFullYear(),o=s.getUTCMonth(),r=s.getUTCDate(),l=s.getUTCHours(),h=s.getUTCMinutes(),c=s.getUTCSeconds(),u=s.getUTCMilliseconds(),d=100>a&&-1<a?Uba:Date.UTC;switch(e){case"year":return d(a=$.Oo(a,i,new Date(String(n)).getUTCFullYear()),0);case"semester":return d(a,o=$.Oo(o,6*i));case"quarter":return d(a,o=$.Oo(o,3*i));case"month":return d(a,o=$.Oo(o,i));case"third-of-month":return $.Oo(s.getTime(),864e6*i,Date.UTC(2e3,0,2));case"week":return t=$.Qo($.Ro()),$.Oo(s.getTime(),6048e5*i,Date.UTC(2e3,0,2+(t?t.firstDayOfWeek:0)));case"day":return $.Oo(s.getTime(),864e5*i,Date.UTC(2e3,0,2));case"hour":return d(a,o,r,l=$.Oo(l,i));case"minute":return d(a,o,r,l,h=$.Oo(h,i));case"second":return d(a,o,r,l,h,c=$.Oo(c,i));case"millisecond":return d(a,o,r,l,h,c,u=$.Oo(u,i))}return t},$.Vo=function(t,e){switch(t){case"year":var i=yn,n=e;break;case"semester":i=zn,n=6*e;break;case"quarter":i=zn,n=3*e;break;case"month":i=zn,n=e;break;case"third-of-month":i=An,n=10*e;break;case"week":i=An,n=7*e;break;case"day":i=An,n=e;break;case"hour":i=Bn,n=e;break;case"minute":i=Cn,n=e;break;case"second":i=Dn,n=e;break;case"millisecond":i=Dn,n=e/1e3;break;default:i=yn,n=e}return new $.En(i,n)},$.R=function(t,e,i){return e=(1&e)/2,.5<=t%1?Math.ceil(t)-(i?-e:e):Math.floor(t)+(i?-e:e)},Wo=function(t){return t=$.R(t,1),$.p(void 0)&&void 0>t?Math.floor(t):Math.ceil(t)},$.Xo=function(t,e){var i=t.left+t.width,n=t.top+t.height;return t.left=$.R(t.left,e),t.top=$.R(t.top,e),t.width=$.R(i,e)-t.left,t.height=$.R(n,e)-t.top,t},$.Yo=function(t,e,i,n){switch(e){case"left-top":case"left-center":case"center-top":case"center":t.x+=i,t.y+=n;break;case"left-bottom":case"center-bottom":t.x+=i,t.y-=n;break;case"right-center":case"right-top":t.x-=i,t.y+=n;break;case"right-bottom":t.x-=i,t.y-=n}},$.Zo=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if($.p(n))return n}},$.$o=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if(null!=n)return n}},ap=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if($.A(n)&&(n=ap.apply(null,n)),null!=n)return n}},Vba=function(t){for(var e=0,i=arguments.length;e<i;e++){var n=arguments[e];if($.A(n)&&(n=ap.apply(null,n)),null!=n)return n}},$.Sl=function(t){var e=$.ka(t);if("array"==e){e=[];for(var i=0;i<t.length;i++)i in t&&(e[i]=$.Sl(t[i]))}else{if("object"!=e)return t;for(i in e={},t)t.hasOwnProperty(i)&&(e[i]=$.Sl(t[i]))}return e},bp=function(t,e){var i=$.ka(t);if("array"==i){var n="array"==$.ka(e)?e:[];i=[];for(var s=Math.max(t.length,n.length),a=0;a<s;a++)i[a]=bp(t[a],n[a])}else{if("object"!=i)return $.p(e)?e:t;for(s in n="object"==$.ka(e)?e:{},i={},t)t.hasOwnProperty(s)&&!$.ec(s,"closure_uid")&&(i[s]=bp(t[s],n[s]));for(s in n)!n.hasOwnProperty(s)||s in i||$.ec(s,"closure_uid")||(i[s]=$.Sl(n[s]))}return i},$.cp=function(t){return null===t||$.z(t)&&"none"==t.toLowerCase()},$.dp=function(t){return t=$.Wb(t),$.cp(t)?0:$.C(t)?$.$b(t):1},$.ep=function(){return this.value},Pm=function(t){return t.replace(/[\s\xa0]+$/,"")},fp=function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},$.gp=function(t){var e=!0;return-1!=t.indexOf('"')&&($.il(100),e=!1),e},hp=function(t,e,i,n,s,a){for(var o=0;o<n;o++){var r=t[o],l=s?s[o]:void 0;a&&l&&($.D(a)?r=a(l,r):"object"==$.ka(a)&&(l=a[l])&&(r=l(r))),null!=r?($.z(r)||(r=String(r)),(-1!=r.indexOf(e)||-1!=r.indexOf(i))&&(r='"'+(r=r.split('"').join('""'))+'"')):r="",t[o]=r}return t.join(e)},$.kp=function(t,e,i){var n=i&&i.rowsSeparator||"\n",s=i&&i.columnsSeparator||",",a=i&&i.ignoreFirstRow||!1,o=i&&i.formats||void 0,r=i&&i.headers||void 0;if(!e.length||!$.gp(n)||!$.gp(s))return"";for(i=[],a||i.push(hp(t,s,n,t.length,t,r)),a=0;a<e.length;a++)i.push(hp(e[a],s,n,t.length,t,o));return i.join(n)},$.np=function(t){if($.z(t))if(void 0!==window.DOMParser)t=(new window.DOMParser).parseFromString(t,"application/xml");else{if(!lp)throw Error("Your browser does not support loading xml documents");var e=Pn();e.loadXML(t),t=e}if(!t)return null;switch(t.nodeType){case 1:e={};var i=!!t.getAttribute(mp);i&&(e=[]);var n,s={},a=!0,o=t.childNodes.length,r="";for(n=0;n<o;n++){var l=t.childNodes[n],h=$.np(l);if("#"==(l=l.nodeName).charAt(0))r+=h;else if(i&&"item"==l)a=!1,""==h?e.push(h):$.A(h)||(0,window.isNaN)(+h)?"true"==h?e.push(!0):"false"==h?e.push(!1):"null"==h?e.push(null):e.push(h):e.push(+h);else if((null!==h||"point"==l)&&!i){var c;a=!1,l=$.pm(l,!0),(c=Wba(l))?(l=h[c[1]],$.A(l)||(l=$.p(l)?[l]:[]),e[c[0]]=l):l in e?s[l]?e[l].push(h):(e[l]=[e[l],h],s[l]=!0):"data"===t.nodeName&&1===o&&$.A(h)?e[l]=[h]:e[l]=h}}for(o=null==t.attributes?0:t.attributes.length,n=0;n<o;n++)i=t.attributes[n],"xmlns"!=(l=String(i.nodeName).toLowerCase())&&l!=mp&&((l=$.pm(i.nodeName,!0))in e||(h=op(i.value),e[l]=""==h?h:(0,window.isNaN)(+h)?"true"==h||"false"!=h&&("null"==h?null:h):1<h.length&&"0"==h.charAt(0)&&(0>=+h||1<=+h)?h:+h,a=!1));return a?0<r.length?op(r):{}:e;case 3:return""==(t=fp(t.nodeValue))?null:t;case 4:return t.nodeValue;case 9:return $.np(t.documentElement);default:return null}},$.qp=function(t,e,i){$.z(t)&&(t=$.io(t));t:{if(!window.document.implementation||!window.document.implementation.createDocument){if(lp&&(n=Pn()))break t;throw Error("Your browser does not support creating new documents")}var n=window.document.implementation.createDocument("","",null)}if((t=pp(t,e||"anychart",n))&&(e||t.setAttribute("xmlns","http://anychart.com/schemas/8.13.1/xml-schema.xsd"),n.appendChild(t)),i)e=n;else if(i=(e=n).xml)e=i;else{if(void 0===window.XMLSerializer)throw Error("Your browser does not support serializing XML documents");e=(new window.XMLSerializer).serializeToString(e)}return e},pp=function(t,e,i){var n,s;if(e=String(e).replace(/([A-Z])/g,"_$1").toLowerCase(),e=i.createElement(e),$.z(t)||$.ea(t))e.appendChild(i.createCDATASection(sc(String(t))));else if($.A(t))for(e.setAttribute(mp,"true"),n=0;n<t.length;n++)$.p(t[n])&&e.appendChild(pp(t[n],"item",i));else if(null!=t)for(n in t)if(t.hasOwnProperty(n)){var a,o=t[n];if($.A(o)&&(a=Xba(n))){var r=i.createElement(a[0]);e.appendChild(r);var l=a[1];for(s=0;s<o.length;s++)r.appendChild(pp(o[s],l,i))}else $.p(o)&&($.C(o)||!Yba.test(o)?e.appendChild(pp(o,n,i)):($.z(o)&&(o=sc(String(o))),e.setAttribute(String(n).replace(/([A-Z])/g,"_$1").toLowerCase(),o)))}return e},op=function(t){return t.replace(/\\([0bfnrt"'\\]|x([0-9a-fA-F]{2})|u([0-9a-fA-F]{4}))/g,(function(t,e,i,n){switch(e.charAt(0)){case"0":return"\0";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case'"':return'"';case"'":return"'";case"\\":return"\\";case"x":return String.fromCharCode((0,window.parseInt)(i,16));case"u":return String.fromCharCode((0,window.parseInt)(n,16))}}))},Xba=function(t){switch(t){case"series":return["series_list","series"];case"annotationsList":return["annotations_list","annotation"];case"keys":return["keys","key"];case"data":return["data","point"];case"lineAxesMarkers":return["line_axes_markers","line_axes_marker"];case"rangeAxesMarkers":return["range_axes_markers","range_axes_marker"];case"textAxesMarkers":return["text_axes_markers","text_axes_marker"];case"xGrids":return["x_grids","grid"];case"yGrids":return["y_grids","grid"];case"xMinorGrids":return["x_minor_grids","grid"];case"yMinorGrids":return["y_minor_grids","grid"];case"xAxes":return["x_axes","axis"];case"yAxes":return["y_axes","axis"];case"axes":return["axes","axis"];case"bars":return["bar_pointers","pointer"];case"markers":return["marker_pointers","pointer"];case"needles":return["needle_pointers","pointer"];case"knobs":return["knob_pointers","pointer"];case"pointers":return["pointers","pointer"];case"scaleBars":return["scale_bars","scale_bar"];case"points":return["points","point"];case"scales":return["scales","scale"];case"colorScales":return["color_scales","scale"];case"explicit":return["explicit","tick"];case"values":return["values","value"];case"names":return["names","name"];case"ranges":return["ranges","range"];case"chartLabels":return["chart_labels","label"];case"items":return["items","item"];case"columns":return["columns","column"];case"colors":return["colors","color"];case"children":return["children","data_item"];case"index":return["index","key"];case"outliers":return["outliers","outlier"];case"inverted":return["inverted_list","inverted"];case"drillTo":return["drill_to","item"];case"extraClassNames":return["extra_class_names","class_name"];case"dependsOn":return["depends_on","item"];case"precision":return["precision_list","precision"];case"labels":return["quarter_labels","label"];case"weights":return["weights","weight"];case"angles":return["angles","angle"];case"levels":return["levels","level"];case"xLabels":return["x_labels","item"];case"yLabels":return["y_labels","item"]}return null},Wba=function(t){switch(t){case"seriesList":return["series","series"];case"annotationsList":return["annotationsList","annotation"];case"keys":return["keys","key"];case"data":return["data","point"];case"lineAxesMarkers":return["lineAxesMarkers","lineAxesMarker"];case"rangeAxesMarkers":return["rangeAxesMarkers","rangeAxesMarker"];case"textAxesMarkers":return["textAxesMarkers","textAxesMarker"];case"xGrids":return["xGrids","grid"];case"yGrids":return["yGrids","grid"];case"xMinorGrids":return["xMinorGrids","grid"];case"yMinorGrids":return["yMinorGrids","grid"];case"xAxes":return["xAxes","axis"];case"yAxes":return["yAxes","axis"];case"axes":return["axes","axis"];case"barPointers":return["bars","pointer"];case"markerPointers":return["markers","pointer"];case"needlePointers":return["needles","pointer"];case"knobPointers":return["knobs","pointer"];case"pointers":return["pointers","pointer"];case"scaleBars":return["scaleBars","scaleBar"];case"points":return["points","point"];case"scales":return["scales","scale"];case"explicit":return["explicit","tick"];case"values":return["values","value"];case"names":return["names","name"];case"ranges":return["ranges","range"];case"chartLabels":return["chartLabels","label"];case"items":return["items","item"];case"columns":return["columns","column"];case"colors":return["colors","color"];case"children":return["children","dataItem"];case"index":return["index","key"];case"outliers":return["outliers","outlier"];case"invertedList":return["inverted","inverted"];case"colorScales":return["colorScales","scale"];case"drillTo":return["drillTo","item"];case"extraClassNames":return["extraClassNames","className"];case"dependsOn":return["dependsOn","item"];case"precisionList":return["precision","precision"];case"quarterLabels":return["labels","label"];case"weights":return["weights","weight"];case"angles":return["angles","angle"];case"levels":return["levels","level"];case"xLabels":return["xLabels","item"];case"yLabels":return["yLabels","item"]}return null},$.pm=function(t,e){return String(t).replace(e?/[_]([a-z])/g:/[-_]([a-z|\d])/g,(function(t,e){return e.toUpperCase()}))},Zba=function(){if(rp)return rp;var t=sp.length,e=0==t%2?t/2:t+.5;return rp=(0,$.Wa)((0,$.Wa)(sp,(function(t,i){return t+i%e*(i%2?-1:1)})),(function(t){return String.fromCharCode(t)})).join("")},$.tp=function(t,e){switch(t){case"year":return 315576e5*e;case"semester":return 315576e5*e/2;case"quarter":return 315576e5*e/4;case"month":return 315576e5*e/12;case"third-of-month":return 315576e5*e/36;case"week":return 6048e5*e;case"day":return 864e5*e;case"hour":return 36e5*e;case"minute":return 6e4*e;case"second":return 1e3*e;default:return e}},$.vp=function(t,e){for(var i=0;i<$.up.length&&$.up[i].Dg!=t;i++);return $.up[$.Za(i-(e||1),0,$.up.length)].Dg},wp=function(t){var e=t.ai;return 1e3*(e=60*(e=60*(e=24*(e=365.25*(e=365.25*e+t.pg)/12+t.xg)+t.Th)+t.Bj)+t.wh)},$.zp=function(t){switch(t=String(t).toLowerCase()){case"arrowhead":return function(t,e,i,n){var s=e-n/2,a=i-n/3,o=e-n/2,r=i+n/3;return t.moveTo(e+n/2,i).lineTo(s,a).lineTo(o,r).close(),t};case"star4":return hi;case"star6":return ji;case"star7":return ki;case"star10":return li;case"diamond":return qi;case"triangle-up":return mi;case"triangle-down":return ni;case"triangle-right":return oi;case"triangle-left":return pi;case"cross":return ri;case"diagonal-cross":return si;case"circle":return function(t,e,i,n){return vi(t,e,i,n,0,360)};case"trapezium":return function(t,e,i,n){var s=n/3;return e-=n/2,i-=n/2,t.moveTo(e+s,i+n),t.lineTo(e+n-s,i+n),t.lineTo(e+n,i),t.lineTo(e,i),t.close(),t};case"pentagon":return function(t,e,i,n){e-=n,i-=n,t.moveTo(e+n*xp[0],i+n*yp[0]);for(var s=1;5>s;s++)t.lineTo(e+n*xp[s],i+n*yp[s]);return t.lineTo(e+n*xp[0],i+n*yp[0]),t.close(),t};case"square":return function(t,e,i,n,s){var a=e-n,o=i-n;return e+=n,i+=n,$.p(s)&&(s=s||0,a=$.R(a,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(a,o).lineTo(e,o).lineTo(e,i).lineTo(a,i).lineTo(a,o).close(),t};case"v-line":case"line":return function(t,e,i,n,s){var a=(n*=2)/2;return a=(e-=a/2)+a,n=(i-=n/2)+n,$.p(s)&&(s=s||0,e=$.R(e,s),i=$.R(i,s),a=$.R(a,s),n=$.R(n,s)),t.moveTo(e,i).lineTo(a,i).lineTo(a,n).lineTo(e,n).lineTo(e,i).close(),t};case"arrow-up":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=e+o;return o=e-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(e,a),t.lineTo(n,i,h,i,h,l,o,l,o,i,r,i),t.close(),t};case"arrow-down":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=e+o;return o=e-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(e,l),t.lineTo(n,i,h,i,h,a,o,a,o,i,r,i),t.close(),t};case"arrow-left":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=i+o;return o=i-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(r,i),t.lineTo(e,l,e,h,n,h,n,o,e,o,e,a),t.close(),t};case"arrow-right":return function(t,e,i,n,s){var a=n/2,o=a/2;n=e+a;var r=e-a,l=i+a;a=i-a;var h=i+o;return o=i-o,$.p(s)&&(s=s||0,n=$.R(n,s),r=$.R(r,s),l=$.R(l,s),a=$.R(a,s),h=$.R(h,s),o=$.R(o,s),e=$.R(e,s),i=$.R(i,s)),t.moveTo(n,i),t.lineTo(e,l,e,h,r,h,r,o,e,o,e,a),t.close(),t};default:return ii}},Ap=function(t,e,i,n){var s=new $.Lm;if(i=!0,$.C(n)&&(s.lJ(n.rowsSeparator),s.hG(n.columnsSeparator),s.OH(n.ignoreTrailingSpaces),i=!n.ignoreFirstRow,s.MH(i)),t=s.pC(t)){if(n=$.Me("table"),e&&(s=$.Me("caption"),Ue(s,e),n.appendChild(s)),i){var a=$.Me("thead"),o=$.Me("tr");a.appendChild(o)}for(e=$.Me("tbody"),s=0;s<t.length;s++){var r,l=t[s];if(s||!i){var h=$.Me("tr");for(r=0;r<l.length;r++){var c=l[r],u=$.Me(r?"td":"th");Ue(u,c),h.appendChild(u)}e.appendChild(h)}else if(i)for(r=0;r<l.length;r++)c=l[r],h=$.Me("th"),Ue(h,c),o.appendChild(h)}return i&&n.appendChild(a),n.appendChild(e),n}return null},Bp=function(t){var e="";"..."==t.textOverflow&&(t.textOverflow="ellipsis");var i=t.fontSize;for(var n in $.ea(i)&&(t.fontSize=i.toString()+"px"),t)e+=($ba[n]||String(n).replace(/([A-Z])/g,"-$1").toLowerCase())+": "+t[n]+";";return e},Cp=function(t,e,i){return[{offset:0,color:i,opacity:e},{offset:Math.max(t-.05,0),color:i,opacity:e},{offset:t,color:i,opacity:0},{offset:1,color:i,opacity:0}]},$.Dp=function(t,e){var i=(0,window.setTimeout)((function(){t.md||t.dispatchEvent(e),(0,window.clearTimeout)(i)}),0)},$.Ep=function(t,e,i){var n=(0,window.setTimeout)((function(){t.call(i),e&&e.call(i),(0,window.clearTimeout)(n),i=e=t=null}),1);return n},Ip=function(t,e,i,n,s,a){if($.xd&&!$.bd("525"))return!0;if($.Ad&&s)return Fp(t);if(s&&!n)return!1;if(!$.gd){$.ea(e)&&(e=Gp(e));var o=17==e||18==e||$.Ad&&91==e;if((!i||$.Ad)&&o||$.Ad&&16==e&&(n||a))return!1}if(($.xd||$.Hp)&&n&&i)switch(t){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if($.hd&&n&&e==t)return!1;switch(t){case 13:return!($.gd&&(a||s||i&&n));case 27:return!($.xd||$.Hp||$.gd)}return(!$.gd||!(n||s||a))&&Fp(t)},Fp=function(t){if(48<=t&&57>=t||96<=t&&106>=t||65<=t&&90>=t||($.xd||$.Hp)&&0==t)return!0;switch(t){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}},Gp=function(t){return $.gd?t=aca(t):$.Ad&&$.xd&&93===t&&(t=91),t},aca=function(t){switch(t){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return t}},$.Jp=function(t,e){$.qf.call(this),t&&this.WM(t,e)},Kp=function(t,e,i,n){$.Bd.call(this,n),this.type="key",this.keyCode=t,this.f=e,this.repeat=i},$.Mp=function(t){return $.p(t)&&($.ll=$.fa=t,$.Lp=t.document),$.fa},$.Op=function(t){return $.p(t)&&(Np=t),Np},Rp=function(t,e){$.Pp?Qp.push((0,$.pa)(t,e)):t.apply(e)},$.Sp=function(){if($.Pp--,!$.Pp)for(var t=Qp.slice(0),e=Qp.length=0;e<t.length;e++)t[e]()},$.Xp=function(t){var e;if($.z(t)?e=$.io(t):$.C(t)&&!$.D(t)&&(e=t),t=null,e){var i=e.chart,n=e.gauge,s=e.gantt,a=e.map;if(i){if(e=i.type,!(t=$.Tp[e]))throw"Unknown chart type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}else if(n){if(e=n.type,!(t=$.Up[e]))throw"Unknown gauge type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}else if(s){if("project"==s.type?s.type="gantt-project":"resource"==s.type&&(s.type="gantt-resource"),e=s.type,!(t=$.Vp[e]))throw"Unknown gantt type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}else if(a){if(e=a.type,!(t=$.Wp[e]))throw"Unknown map type: "+e+"\nProbably it is in some other module, see module list for details.";t=t()}}return t?t.ga(!1,i||n||s||a):$.il(7),t},Yp=function(t){var e=$.Lp;(e.addEventListener||"load"===$.ll.event.type||"complete"===e.readyState)&&(e=$.ll,$.Yd($.Lp,["DOMContentLoaded","readystatechange"],Yp,!1),$.Yd(e,"load",Yp,!1),Zp(t))},Zp=function(t){if(!$p){if(!$.Lp.body)return(0,window.setTimeout)((function(){Zp(t)}),1);$p=!0;for(var e=0,i=aq.length;e<i;e++){var n=aq[e];n[0].apply(n[1],[t])}}},sl=function(){if(null==bq||!$.z(bq))return!1;var t=bq.lastIndexOf("-"),e=bq.substr(t+1);if(t=bq.substr(0,t)+Zba(),!cq){for(var i,n=[],s=0;256>s;s++){i=s;for(var a=0;8>a;a++)i=1&i?3988292384^i>>>1:i>>>1;n[s]=i}cq=n}for(i=-1,n=0;n<t.length;)i=i>>>8^cq[255&(i^t.charCodeAt(n++))];return e==(t=((-1^i)>>>0).toString(16))},gq=function(){return dq.length||(dq=[$.eq.themes.defaultTheme||{}],fq.length&&(dq=$.Ga(dq,fq))),dq},hq=function(t){t=$.z(t)?$.Sl($.eq.themes[t]):t,fq.push(t),dq.length=0},$.zm=function(t,e,i){e=$.p(e)?e:{},t=t.split(".");for(var n,s=gq(),a=0;a<s.length;a++){for(var o=s[a],r=0;r<t.length;r++)o&&(o=o[n=t[r]]);$.p(o)&&("object"==$.ka(o)?(n=o,$.p(n.padding)&&(n.padding=$.Gm(n.padding)),$.p(n.margin)&&(n.margin=$.Gm(n.margin))):o=$.D(i)?i(o):$.da(o)?{enabled:o}:null,o&&$.ra(e,o))}return e},$.nm=function(t){var e;for(t=$.pm(t),iq.length||(iq.push($.eq.themes.defaultTheme||{}),jq.push(iq[0])),e=iq.length-1;e<fq.length;e++){var i=fq[e];i=$.Sl($.z(i)?$.eq.themes[i]:i),iq.push($.C(i)?i:{}),jq.push({})}for(i=window.Infinity,e=0;e<iq.length;e++)jm(iq[e],t,e)&&(i=Math.min(i,e));for(e=Math.max(1,i);e<jq.length;e++){i=t.split("."),km(jq[e],[i[0]],lm($.Sl(mm(iq[e],i[0].split("."))),mm(jq[e-1],i[0].split(".")))),i=e;var n=t.split("."),s=im[n[0]];s||(im[n[0]]={wE:[],DI:0,LC:0}),s.DI=i}return mm(jq[jq.length-1],t.split("."))},kq=function(t,e){return function(i){e&&i||$.il(4,null,[t])}},lq=function(t,e,i){t=t.split(".");for(var n=$.ll,s=0;s<t.length;s++)if(!(n=n[t[s]]))return kq(e,i);return n},nq=function(t){return(t=mq[t])?t:kq("Exporting")},pq=function(t,e){oq[e]&&oq[e]==t&&delete oq[e]},qq=function(t,e){return t!==e},$.rq=function(t,e,i,n,s){return $.A(e)?$.rq.apply(null,$.Ga(t,e)):(e={zy:e,hX:i,Fr:n},$.p(s)&&(i=e.lea=s),t[i]=e)},$.sq=function(t,e){for(var i={},n=0;n<e.length;n++)i[e[n][1]]=$.rq.apply(null,$.Ga(t,e[n]));return i},$.tq=function(t,e,i,n,s,a,o,r){i={ho:i,Aka:n},$.p(s)&&(i.Cb=s),$.p(a)&&$.D(a)&&(i.g0=a,i.context=o),i.aha=r,t[e]=i},$.T=function(t,e){for(var i=0;i<e.length;i++)$.tq.apply(null,$.Ga(t,e[i]))},$.vq=function(){return $.sq({},$.uq())},$.uq=function(){return[[0,"minFontSize",$.wq],[0,"maxFontSize",$.wq],[0,"maxLength",$.xq],[1,"adjustFontSize",yq],[0,"fontSize",$.wq],[0,"fontFamily",$.zq],[0,"fontColor",$.Aq],[0,"fontOpacity",$.Bq],[0,"fontDecoration",$.bl],[0,"fontStyle",$.cl],[0,"fontVariant",$.dl],[0,"fontWeight",$.wq],[0,"letterSpacing",$.wq],[0,"textDirection",$.el],[0,"textShadow",$.Zb],[0,"lineHeight",$.wq],[0,"textIndent",$.Bq],[0,"vAlign",$.al],[0,"hAlign",$.$k],[0,"wordWrap",$.Cq],[0,"wordBreak",$.Cq],[0,"textOverflow",$.zq],[0,"selectable",$.Dq],[0,"disablePointerEvents",$.Dq],[0,"useHtml",$.Dq]]},$.Eq=function(t,e,i,n,s,a){$.T(t,[["minFontSize",e,n,void 0,a],["maxFontSize",e,n,void 0,a],["maxLength",e,n,void 0,a],["adjustFontSize",e,n,void 0,a],["fontSize",e,n,void 0,a],["fontFamily",e,n,void 0,a],["fontColor",i,s],["fontOpacity",i,s],["fontDecoration",e,n,void 0,a],["fontStyle",e,n,void 0,a],["fontVariant",e,n,void 0,a],["fontWeight",e,n,void 0,a],["letterSpacing",e,n,void 0,a],["textDirection",e,n,void 0,a],["textShadow",i,s],["lineHeight",e,n,void 0,a],["textIndent",e,n,void 0,a],["vAlign",e,n,void 0,a],["hAlign",e,n,void 0,a],["wordWrap",e,n,void 0,a],["wordBreak",e,n,void 0,a],["textOverflow",e,n,void 0,a],["selectable",i,s],["disablePointerEvents",i,s],["useHtml",e,n,void 0,a]])},$.U=function(t,e,i){for(var n in i||(t=t.prototype),e)i=e[n],t[n]=$.qa(Fq[i.zy],i.hX,i.lea,i.Fr)},$.Gq=function(t,e,i){for(var n=0;n<e.length;n++){var s=e[n];t.prototype[s]=function(t){return function(e){var n=this[i]();return $.p(arguments[0])?(n[t].apply(n,arguments),this):n[t]()}}(s)}},$.Iq=function(t,e,i,n){if(n&&t.oa)$.Hq(t.oa,e,i);else for(var s in e)e=i[s],$.p(e)&&(t.g?t[s](e):t[s]=e)},$.Tq=function(t,e,i,n,s,a){var o;for(o in s=$.p(s)?s:e){s=void 0;var r=e[o];t.ph(o)&&(s=t.nd(o),$.D(s)&&$.kl(8,null,[(n?n+" ":"")+o])),r&&($.p(s)||a||!t.check(t.getCapabilities(o))||(s=t.vf(o)),$.p(s)&&!$.D(s)&&(r.Fr==$.Jq||r.Fr==$.Nq||r.Fr==$.Oq||r.Fr==$.Pq||r.Fr==$.Qq||r.Fr==$.Rq?s=$.Rl(r.Fr([s])):r.Fr!=$.Sq||null===s?r.Fr==yq&&(s=r.Fr([s])):s=$.Rl(r.Fr(s)),i[o]=s))}},$.Hq=function(t,e,i){for(var n in e)e=i[n],$.p(e)&&(t[n]=e)},Xq=function(t,e,i,n){return $.p(n)?(n=i.call(this,n),Uq(this,t).call(this,this.nd(t),n)&&(this.ta(t,n),this.check(this.getCapabilities(t))&&(Vq(this,t).call(Wq(this,t)),e=this.ys(t),(t=this.CM(t))?this.B(t,e):this.va(e))),this):this.g(t)},Yq=function(t,e,i,n,s){if($.p(n)){for(var a=[],o=3;o<arguments.length;o++)a.push(arguments[o]);return n=i.call(this,a),Uq(this,t).call(this,this.nd(t),n)&&(this.ta(t,n),this.check(this.getCapabilities(t))&&(Vq(this,t).call(Wq(this,t)),a=this.ys(t),(o=this.CM(t))?this.B(o,a):this.va(a))),this}return this.g(t)},$.Cq=function(t){return t},$.Sq=function(t){return null===t?t:$.Ub(t)},$.Pq=function(t){return $.Wb.apply(null,t)},$.Jq=function(t){return $.D(t[0])?t[0]:$.Wb.apply(null,t)},$.Zl=function(t){return $.D(t)?t:$.Wb(t)},$.Qq=function(t){return $.Ub.apply(null,t)},$.Nq=function(t){return $.D(t[0])?t[0]:$.Ub.apply(null,t)},$.am=function(t){return $.D(t)?t:$.Ub(t)},$.Oq=function(t){return $.D(t[0])||!0===t[0]?t[0]:$.Yb.apply(null,t)},$.$l=function(t){return $.D(t)||!0===t?t:$.Yb(t)},$.Rq=function(t){return $.Yb.apply(null,t)},$.Dq=function(t){return!!t},$.Zq=function(t){return null===t?t:!!t},$.Bq=function(t){return Number(t)},$.xq=function(t){return null===t?t:Number(t)},$q=function(t){return Co(t)||0},$.zq=function(t){return String(t)},$.Aq=function(t){return null===t?t:String(t)},$.ar=function(t){return $.D(t)?t:String(t)},$.br=function(t){return $.yo(t,null)},$.cr=function(t){return $.D(t)?t:$.Ok(t)},dr=function(t){return null===t?t:$.Lk(t)},yq=function(t){var e=t[0];return 1==t.length?$.A(e)?{width:0<e.length?e[0]:void 0,height:1<e.length?e[1]:e[0]}:$.C(e)?{width:e.width,height:e.height}:{width:!!e,height:!!e}:{width:!!e,height:!!t[1]}},$.wq=function(t){return $.Bo(t)},$.er=function(t){return $.Za($.N(t),0,1)},$.fr=function(t){return $.A(t[0])?t[0]:t},$.gr=function(t){return $.D(t)?t:null},$.hr=function(){var t=this.jg();return t||(t=$.Ga(this.Wd(),this.Xd()),this.jg(t)),t},$.ir=function(t){for(var e=this.bh(),i=0;i<e.length;i++){var n=e[i];if(n&&(n=n[t],$.p(n)))return n}},$.V=function(){$.qf.call(this),this.Pa={},this.oa={},this.ua={},this.n4=!1,this.QB=[],this.WC=[],this.Nm={},this.Nl={},$.jr(this)},Wq=function(t,e){var i=t.ua[e];return i&&i.context||t},Vq=function(t,e){var i=t.ua[e];return i&&i.g0||$.ia},Uq=function(t,e){var i=t.ua[e];return i&&i.aha||qq},$.K=function(t,e,i){t.wa("signal",e,!1,i)},$.kr=function(t,e,i){t.gc("signal",e,!1,i)},lr=function(t,e){return t|(this.DJ[e]||0)},$.mr=function(t,e){return e in t.js&&e in t.Nl},$.nr=function(t,e,i,n){$.mr(t,e)&&(i=(t.js[e].DJ[i]||0)&~t.Nl[e],t.Nl[e]|=i,(i||t.Wj())&&t.va(n||0))},$.or=function(t,e,i,n){$.mr(t,e)&&(i=(0,$.Gg)(i,lr,0,t.js[e])&~t.Nl[e],t.Nl[e]|=i,(i||t.Wj())&&t.va(n||0))},$.jr=function(t){for(var e in t.js)t.Nl[e]=t.js[e].Ku},$.pr=function(t,e,i){$.mr(t,e)&&(t.Nl[e]&=~(t.js[e].DJ[i]||0))},$.qr=function(t,e,i){$.mr(t,e)&&(i=(0,$.Gg)(i,lr,0,t.js[e]),t.Nl[e]&=~i)},$.rr=function(t,e,i){return!!$.mr(t,e)&&!!(t.Nl[e]&(t.js[e].DJ[i]||0))},$.sr=function(t){return t.QB.length?t.QB:[t.oa]},$.tr=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n];s&&($.z(s)?i.push(s+"."+e):$.p(s[e])&&i.push($.Qc(s[e])))}return i},$.wr=function(t,e,i,n){if($.p(t.Nm[e])||(t.Nm[e]={A6:$.ur[e]}),t.Nm[e].JD)return t.Nm[e].JD;if($.p(t.Nm[e].enabled))return t.Nm[e].enabled;var s=t.Nm[e].A6?$.Ha(t.Nm[e].A6):[],a=$.tr($.sr(t),e);if(s.push.apply(s,a),i)return vr(t,e,n),t.Nm[e].JD;for(i=gq(),a=s.length;a--;){var o=s[a];if($.z(o))for(var r=o.split("."),l=i.length;l--;){o=i[l];for(var h=0;h<r.length;h++)o&&(o=o[r[h]]);if($.p(o)&&(($.da(o)||null===o)&&(o={enabled:!!o}),$.p(o.enabled)))return o.enabled?vr(t,e,n):t.Nm[e].enabled=!1,t.Nm[e].JD?t.Nm[e].JD:null}}return null},vr=function(t,e,i){t.Nm[e].enabled=!0,i=(i=$.D(i)?i:t[e]).call(t),t.Nm[e].JD||$.W(t,e,i)},$.W=function(t,e,i){var n=$.tr($.sr(t),e);i.Ga(n),$.p(t.Nm[e])||(t.Nm[e]={}),t.Nm[e].JD=i},$.xr=function(t){for(var e=arguments.length;e--;){var i=arguments[e];$.A(i)?$.xr.apply(null,i):$.J(i,$.V)&&i.ka()}},$.yr=function(t){for(var e=arguments.length;e--;){var i=arguments[e];$.A(i)?$.yr.apply(null,i):$.J(i,$.V)&&i.da(!0)}},$.zr=function(t){for(var e=arguments.length;e--;){var i=arguments[e];$.A(i)?$.zr.apply(null,i):$.J(i,$.V)&&i.da(!1)}},Ar=function(t,e,i){wd.call(this,"signal",t),this.f=e,i&&$.ra(this,i)},$.X=function(t,e){return!!(t.f&e)},$.Br=function(t){this.view=t,this.reset()},$.Cr=function(t){$.V.call(this),this.ee=t,t.wa("signal",this.XI,!1,this),this.B(1)},$.Dr=function(t){t.pf()||(t.aE&&(t.aE.length=0),t.Aw=null,t.wo=t.FC(),t.I(1))},$.Er=function(t,e,i){$.Dr(t);var n=[];if($.p(e)){t=t.$();var s=window.Infinity;for(i||(e=$.N(e)),t.reset();t.advance();){var a=t.ma(),o=t.get("x");if(i)o==e&&n.push(a);else if(o=$.N(o),!(0,window.isNaN)(o)){var r=Math.abs(o-e);if(r<s){s=r;var l=o;n.length=0}o==l&&n.push(a)}}}return n},Fr=function(t,e){var i,n=t.Af(e);if($.A(n)){var s=t.Ul(e);if(s.o){var a={};for(r in s=s.pr()){var o=s[r];for(i=0;i<o.length;i++)if(o[i]in n){o=t.fP(n[o[i]]),a[r]=o;break}}}else a=(0,$.Wa)(n,t.fP)}else if($.C(n))if((s=t.Ul(e)).o){for(r in a={},s=s.pr())for(o=s[r],i=0;i<o.length;i++)if(o[i]in n){o=n[o[i]],$.J(o,Date)&&(o=o.getTime()),(!$.p(o)||$.ea(o)&&(0,window.isNaN)(o))&&(o=null),a[r]=o;break}for(r in n)!n.hasOwnProperty(r)||r in s&&r in a||(o=t.fP(n[r]),a[r]=o)}else{var r=t.fP;for(a in s={},n)s[a]=r.call(void 0,n[a],a,n);a=s}else(!$.p(n)||$.ea(n)&&(0,window.isNaN)(n))&&(n=null),a=n;return a},Gr=function(t,e){$.Cr.call(this,t),this.b=e,e.wa("signal",this.XI,!1,this)},Hr=function(t,e,i){$.Cr.call(this,t),this.b=e,this.f=i},$.Jr=function(t,e){$.Cr.call(this,t),$.Ir(this,e)},bca=function(t,e,i,n){var s=$.ka(e);if("array"==s){if(t=t.Zc[i]){for(i=t[0],s=0;s<t.length;s++){if(t[s]<e.length)return e[t[s]]=n,e;t[s]<i&&(i=t[s])}return e[i]=n,e}$.kl(5,null,[i])}else"object"==s?void 0===oo(e,i,t.Zc[i],n)&&e.hasOwnProperty(i)&&((n=t.ee).At||(n.At={}),n.At[i]=!0):-1<(0,$.za)(Kr,i)?e=n:$.kl(7,null,[i]);return e},$.Ir=function(t,e){var i;if($.C(e))for(i in e)$.A(e[i])||(e[i]=[e[i]]);else e=void 0;t.o=!!e,t.Zc=e||Lr},$.Mr=function(t,e){$.V.call(this),this.data(t||null,e)},Nr=function(t,e){for(var i=[],n=0;n<e.length;n++){var s=e[n];if($.A(s)){var a=s.length;t.zK<a&&(t.zK=a),a=$.Ja(s,0)}else if($.C(s))for(var o in t.At||(t.At={}),a={},s)a[o]=s[o],t.At[o]=!0;else t.ZX=!0,a=s;i.push(a)}return i},$.Or=function(t,e){return new $.Mr(t,e)},Pr=function(t,e,i){$.Cr.call(this,t),this.b=e;var n=$.D(i)?i:"desc"==$.Mk(i,"asc")?Tba:ro;this.f=function(t,e){return n(t.value,e.value)||t.index-e.index}},Qr=function(t,e,i,n,s){i={x:s?s[0]:0};for(var a=0,o=n.length;a<o;a++)i[n[a]]=s?s[e]:e,e++;return t.Yd(i)},$.Sr=function(t,e){var i=tba(e);if("csv"==i)try{var n=new $.Lm;$.C(e)&&(n.lJ(e.rowsSeparator),n.hG(e.columnsSeparator),n.OH(e.ignoreTrailingSpaces),n.MH(e.ignoreFirstRow));var s=n.pC(t)}catch(d){s=null,$.il(101)}else{var a,o={},r=0,l=window.NaN,h=window.NaN;if(n=window.NaN,e&&((a=e.ignoreItems)&&(a=new RegExp("^("+a.join("|")+")$")),e.minLength&&(r=e.minLength),e.maxLength&&(l=e.maxLength),e.cutLength&&(h=e.cutLength),e.maxItems&&(n=e.maxItems)),"by-word"==i)t.split(Rr).forEach((function(t){var e=(t=t.replace(cca,"")).length;a&&a.test(t.toLowerCase())||e>l||e<r||((0,window.isNaN)(h)||(t=t.substr(0,h)),o[t=t.toLowerCase()]=(o[t]||0)+1)}));else{i=0;for(var c=(t=t.replace(Rr,"")).length;i<c;i++){var u=t[i];a&&a.test(u.toLowerCase())||(o[u=u.toLowerCase()]=(o[u]||0)+1)}}s=[],$.Dc(o,(function(t,e){s.push([e,t])})),(s=s.sort((function(t,e){return e[1]-t[1]}))).length=Math.min(s.length,n||window.Infinity)}return s},dca=function(t,e){if(this.b=[],this.f=e||Un,"number"==typeof t){var i=t;if(11<i&&(i=10),4>i)var n=this.f.mF[i];else n=8>i?this.f.rF[i-4]:(n=(n=this.f.sQ[i-8]).replace("{1}",this.f.mF[i-8])).replace("{0}",this.f.rF[i-8]);Tr(this,n)}else Tr(this,t)},Tr=function(t,e){for(var i=!1,n="",s=0;s<e.length;s++){var a=e.charAt(s);if(" "==a)for(0<n.length&&(t.b.push({text:n,count:0,gC:!1}),n=""),t.b.push({text:" ",count:0,gC:!1});s<e.length-1&&" "==e.charAt(s+1);)s++;else if(i)"'"==a?s+1<e.length&&"'"==e.charAt(s+1)?(n+="'",s++):i=!1:n+=a;else if(0<=eca.indexOf(a)){0<n.length&&(t.b.push({text:n,count:0,gC:!1}),n="");for(var o=e.charAt(s),r=s+1;r<e.length&&e.charAt(r)==o;)r++;o=r-s,t.b.push({text:a,count:o,gC:!1}),s+=o-1}else"'"==a?s+1<e.length&&"'"==e.charAt(s+1)?(n+="'",s++):i=!0:n+=a}for(0<n.length&&t.b.push({text:n,count:0,gC:!1}),i=!1,n=0;n<t.b.length;n++)Ur(t.b[n])?!i&&n+1<t.b.length&&Ur(t.b[n+1])&&(i=!0,t.b[n].gC=!0):i=!1},Ur=function(t){if(0>=t.count)return!1;var e="MydhHmsSDkK".indexOf(t.text.charAt(0));return 0<e||0==e&&3>t.count},Vr=function(t,e){var i=t.substring(e[0]).match(/^\s+/);i&&(e[0]+=i[0].length)},Yr=function(t,e,i,n,s,a){Vr(e,i);var o=i[0],r=n.text.charAt(0),l=-1;if(Ur(n))if(0<s){if(o+s>e.length)return!1;l=Wr(t,e.substring(0,o+s),i)}else l=Wr(t,e,i);switch(r){case"G":return 0<=(l=Xr(e,i,t.f.wQ))&&(a.era=l),!0;case"M":case"L":t:{if(0>(n=l)){if(t=t.f.BQ.concat(t.f.MQ).concat(t.f.IQ).concat(t.f.NQ),0>(n=Xr(e,i,t))){a=!1;break t}a.month=n%12}else a.month=n-1;a=!0}return a;case"E":return 0>(n=Xr(e,i,t.f.RQ))&&(n=Xr(e,i,t.f.KQ)),0>n?a=!1:(a.b=n,a=!0),a;case"a":return 0<=(l=Xr(e,i,t.f.oQ))&&(a.i=l),!0;case"y":t:{if(0>l){var h=e.charAt(i[0]);if("+"!=h&&"-"!=h){a=!1;break t}if(i[0]++,0>(l=Wr(t,e,i))){a=!1;break t}"-"==h&&(l=-l)}h||2!=i[0]-o||2!=n.count?a.year=l:(e=l,t=(i=(new Date).getFullYear()-80)%100,a.D=e==t,e+=100*Math.floor(i/100)+(e<t?100:0),a.year=e),a=!0}return a;case"Q":return 0>l?(0>(n=Xr(e,i,t.f.EQ))&&(n=Xr(e,i,t.f.JQ)),0>n?a=!1:(a.month=3*n,a.day=1,a=!0)):a=!1,a;case"d":return 0<=l&&(a.day=l),!0;case"S":return e=i[0]-o,a.o=3>e?l*Math.pow(10,3-e):Math.round(l/Math.pow(10,e-3)),!0;case"h":12==l&&(l=0);case"K":case"H":case"k":return 0<=l&&(a.Th=l),!0;case"m":return 0<=l&&(a.Bj=l),!0;case"s":return 0<=l&&(a.wh=l),!0;case"z":case"Z":case"v":e.indexOf("GMT",i[0])==i[0]&&(i[0]+=3);t:if(i[0]>=e.length)a.f=0,a=!0;else{switch(n=1,e.charAt(i[0])){case"-":n=-1;case"+":i[0]++}if(o=i[0],0>(l=Wr(t,e,i)))a=!1;else{if(i[0]<e.length&&":"==e.charAt(i[0])){if(h=60*l,i[0]++,0>(l=Wr(t,e,i))){a=!1;break t}h+=l}else h=24>(h=l)&&2>=i[0]-o?60*h:h%100+h/100*60;a.f=-h*n,a=!0}}return a;default:return!1}},Wr=function(t,e,i){if(t.f.SQ){for(var n=[],s=i[0];s<e.length;s++){var a=e.charCodeAt(s)-t.f.SQ;n.push(0<=a&&9>=a?String.fromCharCode(a+48):e.charAt(s))}e=n.join("")}else e=e.substring(i[0]);return(t=e.match(/^\d+/))?(i[0]+=t[0].length,(0,window.parseInt)(t[0],10)):-1},Xr=function(t,e,i){var n=0,s=-1;t=t.substring(e[0]).toLowerCase();for(var a=0;a<i.length;a++){var o=i[a].length;o>n&&0==t.indexOf(i[a].toLowerCase())&&(s=a,n=o)}return 0<=s&&(e[0]+=n),s},fca=function(){},$r=function(t){return $.C(t)||(t=String(t),t=Zr[t]||$.eq.format.locales[t]),t||null},$.Qo=function(t){return(t=$r(t))&&t.dateTimeLocale||null},as=function(t){return(t=$r(t))&&t.numberLocale||null},bs=function(t,e){var i=$.Qo(t);return i&&i[e||"dateTimeFormat"]||null},ds=function(t){if(!t)return Un;var e=$.oa(t);return e in cs||(cs[e]={wQ:t.eras,eZ:t.eraNames,iZ:t.narrowMonths,xZ:t.standaloneNarrowMonths,BQ:t.months,MQ:t.standaloneMonths,IQ:t.shortMonths,NQ:t.standaloneShortMonths,RQ:t.weekdays,AZ:t.standaloneWeekdays,KQ:t.shortWeekdays,zZ:t.standaloneShortWeekdays,g9:t.narrowWeekdays,yZ:t.standaloneNarrowWeekdays,JQ:t.shortQuarters,EQ:t.quarters,oQ:t.ampms||t.amPmS,mF:t.dateFormats||[],rF:t.timeFormats||[],sQ:t.dateTimeFormats||[],fK:t.firstDayOfWeek,w$:t.weekendRange,gK:t.firstWeekCutOffDay||t.firstWeekCutOfDay}),cs[e]},es=function(t,e){var i=$r(t);if(i){var n="object"==$.ka(t);Zr[n?e:t]=bp($.eq.format.locales.default,i)}},gs=function(t){return $.p(t)&&(fs=$.ma(t)?t.getTime():$.N(t)),(0,window.isNaN)(fs)?((t=new Date).setTime(Date.UTC(t.getUTCFullYear(),t.getUTCMonth())),t):new Date(fs)},$.Ro=function(t){if($.p(t)){var e=$.z(t),i="object"==$.ka(t);e||i?(es(t,i=i?"output":t),hs=e?i:Zr[i]||Zr.output||t):hs="default"}return hs},js=function(t){return $.p(t)&&(is=$.z(t)?t:null),is||bs(hs)||bs("output")||bs("default")||"yyyy.MM.dd"},ls=function(t){return $.p(t)&&(ks=$.z(t)?t:null),ks||bs(hs,"dateFormat")||bs("output","dateFormat")||bs("default","dateFormat")||"yyyy.MM.dd"},ns=function(t){return $.p(t)&&(ms=$.z(t)?t:null),ms||bs(hs,"timeFormat")||bs("output","timeFormat")||bs("default","timeFormat")||"HH:mm:ss"},$.ps=function(t,e,i,n){return $.ma(t)?t:$.ea(t)?(0,window.isNaN)(t)?null:new Date(t):$.z(t)?os(t,e,i,n):null},$.qs=function(t){var e=$r(hs);return(e=e&&e.messages)&&t in e?e[t]:t},$.rs=function(t,e,i){return e=$.Zk(e),((i?i+"_":"")+((t=$.Zk(t))==e?t:e+"_"+t)).replace(/-/g,"_")},$.ss=function(t,e,i){return t=(i=$.Qo(i)||$.Qo(hs)||$.Qo("output")||$.Qo("default"))&&i.formats&&i.formats[t],($.A(t)?t[Math.min(t.length-1,e||0)]:$.z(t)?t:"")||"yyyy/MM/dd'T'HH:mm:ss.SSS"},$.ts=function(t,e){var i=$.Qo(e)||$.Qo(hs)||$.Qo("output")||$.Qo("default");return i=i&&i.formats&&i.formats[t],$.A(i)?i:$.z(i)?[i]:[]},$.vs=function(t,e,i){return $.us(t,ls(),e,i)},ws=function(t,e,i){return $.us(t,ns(),e,i)},$.us=function(t,e,i,n){if(t=$.J(t,Date)?t:new Date(t),(0,window.isNaN)(t.getTime()))return String(t);n=$.Qo(n)||$.Qo(hs)||$.Qo("output")||$.Qo("default");var s=(e=e||is||js()||"yyyy.MM.dd")+$.oa(n);return s in xs||(n=ds(n),xs[s]=new $.Xn(e,n)),n=xs[s],(i=i||ys)in zs||(zs[i]=Sn(i)),n.format(t,zs[i])},$.Bs=function(t,e,i,n,s,a,o,r){var l;$.z(e)?l=as(e):$.C(e)&&(l=e);var h=as(hs)||as("default");if(e=$.ea(e)?e:l&&$.ea(l.decimalsCount)?l.decimalsCount:h.decimalsCount,i=$.z(i)?i:l&&$.z(l.decimalPoint)?l.decimalPoint:h.decimalPoint,n=$.z(n)?n:l&&$.z(l.groupsSeparator)?l.groupsSeparator:h.groupsSeparator,s=$.C(s)||$.da(s)?s:l&&($.C(l.scale)||$.da(l.scale))?l.scale:h.scale,a=$.da(a)?a:l&&$.da(l.zeroFillDecimals)?l.zeroFillDecimals:h.zeroFillDecimals,o=$.z(o)?o:l&&$.z(l.scaleSuffixSeparator)?l.scaleSuffixSeparator:h.scaleSuffixSeparator,r=$.da(r)?r:l&&$.da(l.useBracketsForNegative)?l.useBracketsForNegative:h.useBracketsForNegative,!0===s&&(s=As),(l=0>(t=Number(t)))&&(t=-t),h="",$.C(s)&&$.A(s.factors)&&$.A(s.suffixes)){var c=1,u=s.factors;s=s.suffixes;for(var d=Math.min(u.length,s.length),p=0;p<d;p++)if(t>=(c=u[p])||1>=c&&t>.1*c){h=s[p];break}h?h=o+h:c=1,t/=c}if(a=a?t.toFixed(e):$.Tm(t,e).toString(),t="",/(e+|e-)/.test(a)&&(e=a.split("e"),a=e[0],t="e"+e[1]),e=a.split("."),n){for(a=e[0],o=[];0<(s=a.substr(0,a.length-3)).length;)o.unshift(a.substr(-3)),a=s;a&&o.unshift(a),e[0]=o.join(n)}return n=l?"-":"",i=e.join(i)+t+h,l&&r&&(i=["(",i,")"].join(""),n=""),n+i},os=function(t,e,i,n){if(e=($.p(e)?e:Cs)||null){n=$.Qo(n)||$.Qo(Ds)||$.Qo("input")||$.Qo("default");var s=$.oa(n);(s=e+s)in Es||(n=ds(n),Es[s]=new dca(e,n));var a=Es[s];i=$.ma(i)?i:gs(),(e=-1==e.replace(/'.+?'/g,"").search(/z+/i))&&i.setTime(i.getTime()+6e4*i.getTimezoneOffset()),n=t.length;t:{var o=new fca;s=[0];for(var r=-1,l=0,h=0,c=0;c<a.b.length;c++){if(!(0<a.b[c].count)){if(r=-1," "==a.b[c].text.charAt(0)){if(u=s[0],Vr(t,s),s[0]>u)continue}else if(t.indexOf(a.b[c].text,s[0])==s[0]){s[0]+=a.b[c].text.length;continue}t=0;break t}if(0>r&&a.b[c].gC&&(r=c,h=l=0),0<=r){var u=a.b[c].count;if(c==r&&(u-=h,h++,0==u)){t=0;break t}Yr(a,t,s,a.b[c],u,o)||(c=r-1,s[0]=l)}else if(r=-1,!Yr(a,t,s,a.b[c],0,o)){t=0;break t}}e:{if(null==i)throw Error("Parameter 'date' should not be null.");if(null!=o.era&&null!=o.year&&0==o.era&&0<o.year&&(o.year=-(o.year-1)),null!=o.year&&i.setFullYear(o.year),t=i.getDate(),i.setDate(1),null!=o.month&&i.setMonth(o.month),null!=o.day?i.setDate(o.day):(a=wn(i.getFullYear(),i.getMonth()),i.setDate(t>a?a:t)),$.D(i.setHours)&&(null==o.Th&&(o.Th=i.getHours()),null!=o.i&&0<o.i&&12>o.Th&&(o.Th+=12),i.setHours(o.Th)),$.D(i.setMinutes)&&null!=o.Bj&&i.setMinutes(o.Bj),$.D(i.setSeconds)&&null!=o.wh&&i.setSeconds(o.wh),$.D(i.setMilliseconds)&&null!=o.o&&i.setMilliseconds(o.o),null!=o.f&&i.setTime(i.getTime()+6e4*(o.f-i.getTimezoneOffset())),o.D&&((t=new Date).setFullYear(t.getFullYear()-80),i.getTime()<t.getTime()&&i.setFullYear(t.getFullYear()+100)),null!=o.b)if(null==o.day)3<(t=(7+o.b-i.getDay())%7)&&(t-=7),o=i.getMonth(),i.setDate(i.getDate()+t),i.getMonth()!=o&&i.setDate(i.getDate()+(0<t?-7:7));else if(o.b!=i.getDay()){t=!1;break e}t=!0}t=t?s[0]-0:0}return n==t?(e&&i.setTime(i.getTime()-6e4*i.getTimezoneOffset()),i):null}return i=Number(t),t=new Date((0,window.isNaN)(i)?t:i),(0,window.isNaN)(t.getTime())?null:t},Fs=function(t){return $.z(t)&&(t=os(t)),Number(t)},$.Gs=function(){$.V.call(this),this.Ga("palette"),this.Xe=null,this.Gp(!0)},$.Hs=function(){$.V.call(this),this.Ga("hatchFillPalette")},$.Ls=function(){$.V.call(this),this.Ga("markerPalette")},$.Ms=function(){$.V.call(this),this.Xe=null,this.b=window.NaN,this.f=[],this.i=window.NaN,this.Gp(!0)},$.Ns=function(t,e){t.i!=e&&(t.i=e,((0,window.isNaN)(t.b)||null===t.b)&&t.B(16))},Ps=function(){this.G=[0,1],this.i=[0,1],this.D=[],this.o=Os,this.b=this.f=null},Qs=function(t,e){$.p(e)&&(t.G=$.Ja(e,0),t.f=t.b=null)},Rs=function(t,e){$.p(e)&&($.A(e)?(t.D=$.Ja(e,0),t.o=Os):(t.D=[],t.o=Number(e)||gca),t.f=t.b=null)},Us=function(t,e,i,n,s,a){var o=Math.min(t.length,e.length)-1;t[0]>t[o]&&(t=$.Ja(t,0).reverse(),e=$.Ja(e,0).reverse());for(var r=[],l=[],h=0;h<o;h++)r.push(Ss[i[h]||n](t[h],t[h+1])),l.push(Ts[s[h]||a](e[h],e[h+1]));return 1==o?function(t){return t=r[0](t),l[0](t)}:function(e){var i=$.Na(t,e,void 0);return 0>i&&(i=~i),i=$.Za(i,1,o)-1,e=r[i](e),l[i](e)}};Vs=function(t){$.V.call(this),this.scale=t,this.o=hca,this.i=ica,this.f=jca},Ws=function(t,e,i,n){e=Math.abs(i-e)/t.qn,i=t.f.length;for(var s=0;s<i;s++)if(e<=t.f[s])return n?t.o[s].clone():t.i[s].clone();return n?new $.En(yn,Math.ceil(e/31536e6)/4):new $.En(yn,Math.ceil(e/31536e6))},Xs=function(){$.V.call(this),this.Ga("defaultScaleSettings.linear"),this.cs=0,this.PD=!1,this.$B=1,this.cK=0,this.jY="none",this.iY="direct"},Ys=function(t,e,i){t.$B==e&&t.cK==i||(t.$B=e,t.cK=i,t.oN(),t.va(2))},Zs=function(t,e){return t.PD&&(e=1-e),e/t.$B+t.cK},$.dt=function(t,e){return $s(at[t],e?$.bt:ct)},$s=function(t,e){et||((et={})[ct]=$.ft,et[2]=$.gt,et[4]=$.ht,et[$.bt]=$.it,et[32]=function(){var t;return(t=$.eq.scales.linearColor)?t():$.il(4,null,["Color scales"])},et[16]=function(){var t;return(t=$.eq.scales.ordinalColor)?t():$.il(4,null,["Color scales"])});var i=et[t]||et[e]||null;return i&&i()||null},$.jt=function(t,e,i,n,s,a,o){var r=null;if(t!=e){n=n||15;var l,h=t?t.Ma():null,c=l=null;if($.z(e))var u=e||h;else $.J(e,Xs)?(u=e.Ma(),l=e):$.C(e)&&(u=e.type||h||i,c=e);(e=at[u])&n?(l||u==h||(l=$s(e,at[i]||null)),l&&(l.ka(),a&&(t&&$.kr(t,a,o),$.K(l,a,o)),l.va(4),r=t=l),t&&c&&(l||t.ka(),t.U(c),r=t)):s&&$.il(5,void 0,s)}return r},$.kt=function(){Xs.call(this),this.cl=window.NaN,this.dA=0,this.cA=1,this.Nn=this.Pn=this.DX=!0,this.BI=this.HI=.1,this.Lq=this.jt=this.max=this.min=window.NaN,this.Oq=null,this.GJ=this.Kc=!1},mt=function(t,e,i,n,s){return e=t+s*e,i&&0>=t*e?0:(n&&(t=$.Vm(e),i=+("1e-"+(Math.min($.Um(t),$.Um(e))+1)),t>e&&(t+=s*i),e=t),e)},$.nt=function(){$.kt.call(this),this.Ga("defaultScaleSettings.dateTime"),this.Di=this.xh=null},$.ht=function(){var t=new $.nt;return t.N(t.oa),t},pt=function(){$.V.call(this),this.f=this.b=null,this.i={UY:{},MS:{}};var t=$.Qo($.Ro());this.G=$.Ha(t.weekendRange),this.o=ot(this.G),this.D={}},ot=function(t){var e=t[1],i={};for(t=t[0];t<=e;t++)i[String((t+1)%7)]=!0;return i},qt=function(t,e,i,n){return i=kca.b(i),e.add(i),e=e.getTime(),n.push({from:t,to:e-1}),e},$.st=function(){$.V.call(this),this.Jo=this.Ko=this.Zm=this.$m=this.P6=this.Q6=this.Oh=this.Ph=this.Fj=this.Gj=this.Ze=this.$e=window.NaN,this.bm={value:.01,isPixels:!1},this.am={value:.01,isPixels:!1},this.LS=window.NaN,this.Kc=!1,this.sT=this.lM=window.NaN,this.jd=rt(lca),this.Qv=1,this.XG=0,this.cl=mca,this.Xq=this.je=null,this.eQ=this.gF=!1},tt=function(t){var e=new Date;return(0,window.isNaN)(t.lM)&&(t.lM=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),(0,window.isNaN)(t.sT)&&(t.sT=t.lM+864e5),{min:t.lM,max:t.sT}},$.ut=function(t,e,i){e=$.Xk(e),i=$.Xk(i),t.Ph==e&&t.Oh==i||(t.Ph=e,t.Oh=i,t.Gj=window.NaN,t.Fj=window.NaN,t.Kc=!1,t.pb(),t.va(4))},wt=function(t){var e=t.Xq.ob().width,i=$.vt(t.bm.value,e),n=$.vt(t.am.value,e),s=t.Oh-t.Ph;t.Gj=(0,window.isNaN)(t.$m)?(0,window.isNaN)(t.Ko)?Math.round(t.Ph-(Math.max(s*i/(e-i-n),0)||0)):Math.min(t.Ko,t.Ph):t.$m,t.Fj=(0,window.isNaN)(t.Zm)?(0,window.isNaN)(t.Jo)?Math.round(t.Oh+(Math.max(s*n/(e-i-n),0)||0)):Math.max(t.Jo,t.Oh):t.Zm},xt=function(t,e){var i=e?t.bm:t.am,n=e?t.am:t.bm,s=t.Xq.ob().width,a=t.Oh-t.Ph;n=a*n.value,s=(i=$.vt(i.value,s))*(a+n)/(s-i)||0,t.Gj=(0,window.isNaN)(t.$m)?(0,window.isNaN)(t.Ko)?e?t.Ph-s:t.Ph-n:Math.min(t.Ko,t.Ph):t.$m,t.Fj=(0,window.isNaN)(t.Zm)?(0,window.isNaN)(t.Jo)?e?t.Oh+n:t.Oh+s:Math.max(t.Jo,t.Oh):t.Zm},$.yt=function(t){if(t.Uj())return!0;var e=t.uj();return t.$e<=e.min},$.zt=function(t){if(t.Uj())return!0;var e=t.uj();return t.Ze>=e.max},rt=function(t){var e=[];if($.A(t)){for(var i=0;i<t.length;i++){var n=t[i];if($.A(n)){for(var s=[],a=0;a<n.length;a++){var o=n[a],r=null;if($.z(o)){r=$.Zk(o,null);var l=1}else $.C(o)&&(r=$.Zk(o.unit,null),l=$.P(o.count));r&&s.push({unit:r,count:l})}s.length&&e.push({range:$.tp(s[0].unit,s[0].count),levels:s})}}e.sort((function(t,e){return t.range-e.range}))}return e},$.vt=function(t,e){return 0<e?Math.max(Math.min(Math.floor(e/2)-1,t),0):0},$.At=function(t,e,i){var n=i.value;return i.isPixels?(i=t.Ze-t.$e,(0,window.isNaN)(i)?(t.BW=!0,.01*e):(t=t.Xq.ob().width,Math.round($.vt(n,t)*i/t)||0)):e*n},Bt=function(t,e){var i={value:0,isPixels:!!e};return $.p(t)&&("object"===$.ka(t)?(i.value=+t.value||0,i.isPixels=!!t.isPixels):i.value=+t||0),i},Ct=function(t,e){return t.value===e.value&&t.isPixels===e.isPixels},$.Dt=function(t){return!(!t.bm.isPixels&&!t.am.isPixels)},$.Et=function(t){$.Dt(t)&&!t.Uj()&&(t.Gj=window.NaN,t.Fj=window.NaN,t.Kc=!1)},$.Ft=function(t,e){if(t.pb(),$.z(e)){switch(e.toLowerCase()){case"current":(0,window.isNaN)(t.LS)&&(t.LS=(0,$.Ln)());var i=t.LS;break;case"start":i=t.Q6;break;case"end":i=t.P6}$.p(i)||(i=$.ps(e))}i=null!=i?i:$.Xk(e);var n=t.sj(),s=n.min;return(i-s)/(n.max-s)},$.Gt=function(t,e){var i=t.sj(),n=i.min;return Math.round(e*(i.max-n)+n)},$.Ht=function(t){t.pb();var e=t.sj();e=(e.max-e.min)/20;for(var i,n=t.jd.length-1,s=0;s<n;s++)if(e<=t.jd[s].range){i=t.jd[s];break}return i||(i=t.jd[n]),i.levels},$.It=function(t){$.V.call(this),this.qa=t},nca=function(t,e,i,n,s,a,o){function r(t){return 0>t?-l(-t+s-1):t?l(t+s-1):0}function l(t){return Ym(n,t)}var h=$.Xm(Math.abs(e),n),c=$.Xm(Math.abs(i),n),u=e*i,d=!1;return 0<u?0<e?(t=Jt(t,h,c,a,o),r=l,s=t.result[0]):(t=Jt(t,c,h,a,o),r=function(t){return-l(t)},d=!0,s=t.result[1]):t=0>u?Jt(t,-(h-(s-1)),c-(s-1),a,o):i?Jt(t,0,c-(s-1),a,o):Jt(t,-(h-(s-1)),0,a,o),t.Xa=(0,$.Wa)(t.Xa,r),t.result=(0,$.Wa)(t.result,r),d&&(t.Xa.reverse(),d=t.result[0],t.result[0]=t.result[1],t.result[1]=d,d=t.result[2],t.result[2]=t.result[3],t.result[3]=d),t.result[4]=s,t},Jt=function(t,e,i,n,s,a,o){o=o||0;var r=t.Jl,l=t.lh,h=t.qm,c=i-e;if(!(0,window.isNaN)(r)&&c/r>t.qa.an()&&($.kl(20,null,[c,r]),r=window.NaN,l=4,h=6),(0,window.isNaN)(r)){var u=window.NaN;for(t=window.NaN;l<=h;l++){var d=l-1;0==(u=$.Vm(c/d))&&(u=$.Vm(c/d,10));var p=Math.log(u);d=Math.pow(10,Math.floor(p*Math.LOG10E)),p=Math.pow(10,Math.ceil(p*Math.LOG10E));var g=$.Xm(u/p,2);d=[d,p,u<d+d?d/2:window.Infinity,Math.pow(2,Math.floor(g))*p,Math.pow(2,Math.ceil(g))*p],d=(0,$.Wa)(d,(function(t){return $.Po(u,t,0,10)||window.Infinity})),a||(d=(0,$.Wa)(d,(function(t){return(0,window.isFinite)(t)&&~~t==t?t:window.Infinity}))),(d=Math.min.apply(null,d))&&(0,window.isFinite)(d)?u=d:a||(u=Math.round(u)||1),d=$.Vm($.Oo(e,u,o))-e,d*=d,p=$.Vm($.Po(i,u,o))-i,d+=p*=p,((0,window.isNaN)(t)||d<t)&&(t=d,r=u)}}for((0,window.isNaN)(r)&&(r=.5),a=[e,i],h=[],c=$.Um(r),t=$.Vm($.Oo(e,r,o,c),c),n?a[0]=e=t:1e-7<e-t&&(h.push(e),a[2]=t),n=$.Vm($.Po(i,r,o,c),c),s?a[1]=i=n:1e-7<n-i&&(a[3]=n),e=$.Vm($.Po(e,r,o,c),c);e<=i;e=$.Vm(e+r,c))h.push(e);return 3 in a&&h.push(i),{Xa:h,result:a}},Kt=function(t,e,i,n,s,a,o){a=a||[],i=$.Tm(i,7);var r=0;if(o&&i<=t.Vc)for(o=t=$.Tm(i,7);o>=e&&(s!=o&&$.Da(a,o),!r||t!=o);o=$.Tm(o-n,7))r++;else for(o=t=$.Tm(e,7);o<=i&&(s!=o&&a.push(o),!r||t!=o);o=$.Tm(o+n,7))r++;return a},Lt=function(t,e,i,n){return t=t.Jl,(0,window.isNaN)(t)&&(t=(i-e)/(n-1)),Math.max(t,1e-7)},$.Mt=function(){$.kt.call(this),this.Ga("defaultScaleSettings.linear"),this.Di=this.xh=null,this.gS=!0,this.yw=10,this.GJ=!0,this.SK=this.L3},$.ft=function(){var t=new $.Mt;return t.N(t.oa),t},Nt=function(){$.Mt.call(this),this.Ga("defaultScaleSettings.log")},$.gt=function(){var t=new Nt;return t.N(t.oa),t.Xa().N(t.Xa().oa),t.yb().N(t.yb().oa),t},$.Ot=function(t){$.V.call(this),this.scale=t},$.Pt=function(t){t.Iz=null,t.Dx=null,t.Ok=null},$.Qt=function(){this.ih=[],this.Wf=[],this.Or=[],this.Ww=[],this.oz=[],this.WR=!0,this.XB={},this.s4=null,this.UF=!0,this.mb=null,Xs.call(this),this.Ga("defaultScaleSettings.ordinal")},$.Rt=function(t,e){null===e?t.Or.length=0:$.A(e)&&(t.Or=$.Ha(e)),t.Px()||(t.Or.length=0),t.Ww.length=0,t.oz.length=0,$.Pt(t.Xa()),t.va(2)},$.St=function(t){if(!t.oz||t.oz.length!=t.ih.length){var e,i=t.MY(),n=0;for(e in i)n+=i[e];for(t.oz=i.map((function(t){return t/n})),t.YJ=[0],i=0;i<t.oz.length;i++)t.YJ.push(t.oz[i]+t.YJ[i])}return t.oz},$.Tt=function(t){return $.A(t.Wf)?null:t.Wf},$.it=function(){var t=new $.Qt;return t.N(t.oa),t},Ut=function(){this.Zc=[]},Vt=function(t){this.Ld=t,this.f=[-1],this.b=void 0,this.D=this.V0,this.i=this.Y0,this.o=-1},Wt=function(t,e){if(!e.length||!t.f.length)return null;var i=e[++t.f[t.f.length-1]];if(!i)return t.f.pop(),Wt(t,Xt(t));var n=e;return i.bc()&&t.i(i)&&(t.f.push(-1),n=i.Uv()),t.D(i)?i:Wt(t,n)},Xt=function(t){var e=t.Ld.Uv();if(t.o=0,1<t.f.length)for(var i=0;i<t.f.length-1;i++)e=e[t.f[i]],t.o=i+1,e=e.Uv();return e},$.Yt=function(t,e){$.V.call(this),this.Ld=t,this.Zc=e,this.Ld.wa("treeItemMove",this.oO,!1,this),this.Ld.wa("treeItemUpdate",this.oO,!1,this),this.Ld.wa("treeItemCreate",this.oO,!1,this),this.Ld.wa("treeItemRemove",this.oO,!1,this),$.K(this.Ld,this.oja,this)},$.$t=function(t,e,i){this.Su=t,this.ee=i,this.Tk=e,this.Ci={},this.uid=++Zt},$.au=function(t,e,i,n){$.V.call(this),this.Zc=n||{},this.Iq=[],this.Ad={},this.dI={},this.QH={},this.WS=this.aw(),this.Ru=null,this.$C=!0,this.DS("id",!0),t&&this.Yr(t,e,i)},$.cu=function(t){var e=new $.au;if(e.ka(),"rootMapping"in t&&(e.Zc=t.rootMapping),"index"in t)for(var i=t.index,n=0,s=i.length;n<s;n++)e.DS(i[n]);if("children"in t)for(n=0,s=(i=t.children).length;n<s;n++)e.hc(bu(e,i[n]));return e.da(!1),"mapping"in t?e.Yd(t.mapping):e},gu=function(t,e){var i=new $.du(t,e),n=e[t.Zc[eu.yx]||eu.yx];if(n)for(var s=0,a=n.length;s<a;s++)fu(i,gu(t,n[s]));return i},hu=function(t,e,i,n){if(i){if(n)for(var s=e.bc();s--;)hu(t,e.xd(s),i,n);(n=t.Ad[i])&&(s=e.get(i),t.dI[i]&&(s=String(s)),t=$.Na(n,s,t.QH[i]),i={key:s,value:e},0>t?$.Da(n,i,~t):(t=n[t],$.A(t.value)?$.Ba(t.value,e):t.value!=e&&(t.value=[t.value],t.value.push(e))))}else for(s in t.Ad)hu(t,e,s,n)},iu=function(t,e,i,n){if(i){if(n)for(var s=e.bc();s--;)iu(t,e.xd(s),i,n);(n=t.Ad[i])&&(s=e.get(i),t.dI[i]&&(s=String(s)),e.get(i),(n=n[s=$.Na(n,s,t.QH[i])])&&($.A(n.value)&&1<n.value.length?$.Fa(n.value,e):Ea(t.Ad[i],s)))}else for(s in t.Ad)iu(t,e,s,n)},ju=function(t,e){hu(t,e),e.j("nc",!0);for(var i=0;i<e.bc();i++)ju(t,e.xd(i))},ku=function(t){return function(e,i){return t(e,i.key)}},$.du=function(t,e){this.Ld=t,this.Y=null,this.b=[],this.Ci={};var i=$.Qc(e);delete i[this.Ld.Zc[eu.yx]||eu.yx],delete i[this.Ld.Zc[eu.eC]||eu.eC],this.la=i,this.f={},this.uid=++Zt},bu=function(t,e){var i=new $.du(t,"treeDataItemData"in e?e.treeDataItemData:{});if("treeDataItemMeta"in e){var n,s=e.treeDataItemMeta;for(n in s)i.j(n,s[n])}if(s=e[t.Zc[eu.yx]||eu.yx],$.A(s))for(n=0;n<s.length;n++){var a=bu(t,s[n]);i.hc(a)}return i},lu=function(t){null!=t.Y&&(t.Y=null,t.Ld.va(16))},fu=function(t,e){$.Da(t.b,e,t.bc()),e.Y=t},mu=function(t,e){t.Ld=e;for(var i=0,n=t.bc();i<n;i++)mu(t.b[i],e)},nu=function(t,e){var i=String($.oa(e));if(i in t.f)return t.f[i][1];var n=null===t.getParent()?null:nu(t.getParent(),e);return n=new $.$t(e,t,n),t.f[i]=[e,n],n},$.ou=function(t,e,i,n){return new $.au(t,e,i,n)},pu=function(t,e,i,n,s,a,o){var r=$.Qc(e.treeDataItemData);for(var l in $.p(r.id)||(t.uW++,t.LH=-1),r.parent=[t.Py,a,o],a=t.Py++,i.push(r),r)l in n||(n[l]=s++);if((e=e.children)&&e.length)for(o=0,l=e.length;o<l;o++)pu(t,e[o],i,n,s,a,r.id)},$.qu=function(t,e){if(!t)return"";var i,n=t.F().children,s=[],a={},o={LH:1,uW:0,Py:0};for(a.id=0,a.parent=1,i=0;i<n.length;i++)pu(o,n[i],s,a,2,null,null);for(r in o.uW===o.Py?o.LH=0:0===o.uW&&(o.LH=1),n=[],a)n[a[r]]=r;var r=[];for(0>o.LH&&(a.__original_id__=n.length,a.__original_parent__=n.length+1,n.push("__original_id__","__original_parent__")),i=0;i<s.length;i++){var l=Array(n.length),h=s[i],c=h.parent;if(0>=o.LH)var u=c[0],d=c[1];else u=h.id,d=c[2];for(a=0;a<n.length;a++){var p=n[a],g=$.C(h[p])?co(h[p]):h[p];l[a]="id"===p?u:"parent"===p?null===d?void 0:d:"__original_parent__"===p?c[2]:"__original_id__"===p?h.id:g}r.push(l)}return $.kp(n,r,e)},$.Y=function(){$.V.call(this),this.wc=new nf(this),this.WE=this.oa.enabled=!0,this.B(4294967295)},$.ru=function(t,e,i,n,s,a,o,r){e.tag=t,t.wc.wa(e,"click",s||t.oh),t.wc.wa(e,"dblclick",t.oh),t.wc.wa(e,"mouseover",i||t.oh),t.wc.wa(e,"mouseout",n||t.oh),t.wc.wa(e,"mousedown",o||t.oh),t.wc.wa(e,"mouseup",r||t.oh),t.wc.wa(e,"mousemove",a||t.oh),t.wc.wa(e,"touchstart",t.oh),t.wc.wa(e,"touchend",t.oh),t.wc.wa(e,"touchcancel",t.oh),t.wc.wa(e,"touchmove",t.oh),t.wc.wa(e,"contextmenu",t.oh)},$.su=function(t,e,i,n,s,a,o,r){t.wc.wa(e,"click",s||o||t.Ih),t.wc.wa(e,"dblclick",o||t.Ih),t.wc.wa(e,"mouseover",i||o||t.Ih),t.wc.wa(e,"mouseout",n||o||t.Ih),t.wc.wa(e,"mousedown",r||o||t.Ih),t.wc.wa(e,"mouseup",o||t.Ih),t.wc.wa(e,"mousemove",a||o||t.Ih),t.wc.wa(e,"touchstart",o||t.Ih),t.wc.wa(e,"touchend",o||t.Ih),t.wc.wa(e,"touchcancel",o||t.Ih),t.wc.wa(e,"touchmove",o||t.Ih),t.wc.wa(e,"contextmenu",o||t.Ih)},$.tu=function(t,e,i,n){$.V.call(this),arguments.length&&this.set.apply(this,arguments)},uu=function(t,e,i){return null===t.Ew||(e=Math.max(e,$.L(t.Ew,i))),null===t.Bw||(e=Math.min(e,$.L(t.Bw,i))),e},vu=function(t,e,i){return null===t.Fw||(e=Math.max(e,$.L(t.Fw,i))),null===t.Dw||(e=Math.min(e,$.L(t.Dw,i))),e},$.wu=function(){$.Y.call(this)},$.xu=function(t,e){function i(){this.uo()}function n(){Rp(this.W,this)}t.prototype.W=function(){e.prototype.W.call(this);var t=this.O();return(t=t?t.Ja():null)&&(this.gr()?t.wa("stageresize",i,!1,this):t.gc("stageresize",i,!1,this)),$.K(this,n,this),this}},$.yu=function(){$.Y.call(this),this.WC=this.Ga($.ur.background),this.P=!0,this.Xb=this.Y=null,$.T(this.ua,[["fill",16],["stroke",20],["topStroke",20],["rightStroke",20],["bottomStroke",20],["leftStroke",20],["disablePointerEvents",64],["cornerType",4]])},zu=function(t,e,i,n){return t=t.xS(),$.L(4>t.length?t[0]:t[e],Math.min(n,i))||0},Au=function(t,e,i,n,s,a,o){switch(t.g("cornerType")){case"round":e.Ff(s,a,o,o,!1,!0);break;case"round-inner":e.Ff(s,a,o,o,!1,!1);break;case"cut":e.lineTo(s,a);break;default:e.lineTo(i,n).lineTo(s,a)}},Bu=function(){$.yu.call(this)},Cu=function(){this.P=$.mg(),this.kc="",this.f={},this.b=0},Du=function(t,e){return null!=e&&t.length>e?t.slice(0,e)+"...":t},Eu=function(t,e,i,n){$.V.call(this),this.Xb=this.Y=null,($.p(t)||$.p(e)||$.p(i)||$.p(n))&&this.set.apply(this,arguments),$.T(this.ua,[["left"],["top"],["bottom"],["right"]])},$.Gm=function(t){var e=arguments[0],i=arguments[1],n=arguments[2],s=arguments[3];if($.A(e)){var a=e;e=a[0],i=a[1],n=a[2],s=a[3],a=a.length}else a=arguments.length;if(!a)return{};if("object"==$.ka(e))var o=e.top||0,r=e.right||0,l=e.bottom||0,h=e.left||0;else 1==a?h=l=r=o=e||0:2==a?(l=o=e||0,h=r=i||0):3==a?(o=e||0,h=r=i||0,l=n||0):4<=a&&(o=e||0,r=i||0,l=n||0,h=s||0);return{top:o,left:h,bottom:l,right:r}},Gu=function(t,e){for(var i in Fu){var n=e[i];$.p(n)&&(t.oa[i]=n)}},$.Hu=function(t,e,i,n){Eu.call(this,t,e,i,n)},$.Ku=function(t,e){var i=e.top||0,n=e.left||0,s=Iu(t.height,i,e.bottom||0),a=Ju(t.width,n,e.right||0);return n=$.L(n,a),i=$.L(i,s),new $.I(t.left-n,t.top-i,a,s)},Iu=function(t,e,i){var n=1;return $.uo(e)?n-=(0,window.parseFloat)(e)/100:t+=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n-=(0,window.parseFloat)(i)/100:t+=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},Ju=function(t,e,i){var n=1;return $.uo(e)?n-=(0,window.parseFloat)(e)/100:t+=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n-=(0,window.parseFloat)(i)/100:t+=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},$.Lu=function(){this.b={}},oca=function(t){function e(t,e,i){if("%_message"==t)return $.qs(e&&e.key||"");var n="%"==t.charAt(0)?t.substr(1):t,s=n.toLowerCase(),a=i.pc.Im[t],o=i.pc.Dl[a]||i.pc.values[a]||i.pc.Dl[t]||i.pc.values[t]||i.pc.Dl[n]||i.pc.values[n];if(o)s=o.value;else{t:{for(var r in i.pc.Dl)if(i.pc.Dl.hasOwnProperty(r)&&r.toLowerCase()==s){o=i.pc.Dl[r].value;break t}for(r in i.pc.values)if(i.pc.values.hasOwnProperty(r)&&r.toLowerCase()==s){o=i.pc.values[r].value;break t}o=void 0}$.p(o)?s=o:(n=a&&i.getData(a)||i.getData(n),s=$.p(n)?n:i.Rg(s))}if(e&&"true"===e.localized&&(s=$.qs(s)),!$.p(s))return"";if(e=e||{},n=$.p(e.dateTimeFormat)||$.p(e.timeZone),e.type&&(e.type=fp(e.type)),!(a=g[String(e.type).toLowerCase()])){if(n)i="date-time";else{if(n=(a="%"==t.charAt(0)?t.substr(1):t).toLowerCase(),o=i.pc.Im[t],a=(t=i.pc.Dl[o]||i.pc.values[o]||i.pc.Dl[t]||i.pc.values[t]||i.pc.Dl[a]||i.pc.values[a]||i.pc.Dl[n]||i.pc.values[n])&&$.p(t.type)?t.type:"string",!t&&i.pc.Li.length)switch(n){case Mu.woa:case Mu.Hoa:case Mu.Y7:case Mu.Z7:case Mu.c8:case Mu.D9:case Mu.E9:case Mu.H9:case Mu.I9:case Mu.Q9:case Mu.C9:case Mu.M9:case Mu.O9:case Mu.x9:case Mu.y9:case Mu.L9:case Mu.z9:case Mu.T9:case Mu.N9:case Mu.A9:case Mu.V9:case Mu.P9:case Mu.B9:case Mu.W9:case Mu.X9:case Mu.Y9:case Mu.A7:case Mu.s7:case Mu.t7:case Mu.u7:case Mu.w7:case Mu.x7:case Mu.z7:case Mu.U7:case Mu.O7:case Mu.S7:case Mu.T7:case Mu.L7:case Mu.M7:case Mu.R7:case Mu.N7:case Mu.QQ:case Mu.H$:case Mu.K8:case Mu.X8:case Mu.OPEN:case Mu.E7:case Mu.D$:case Mu.n7:case Mu.P8:case Mu.o9:case Mu.n9:case Mu.oZ:case Mu.Z9:case Mu.S9:case Mu.U9:case Mu.R9:case Mu.K9:case Mu.J9:case Mu.d8:case Mu.W7:case Mu.X7:case Mu.V7:case Mu.P7:case Mu.Q7:case Mu.o7:case Mu.p7:case Mu.q7:case Mu.v7:case Mu.y7:case Mu.E$:case Mu.F$:case Mu.G$:case Mu.B$:case Mu.C$:case Mu.l9:a="number"}i=a}a=i}switch(a){case"":return"";case"string":return String(s);case"date-time":return $.us(s,e.dateTimeFormat,e.timeZone);case"date":return $.vs(s,e.timeZone);case"time":return ws(s,e.timeZone);case"number":return $.Bs(s,e.decimalsCount,e.decimalPoint,e.groupsSeparator,e.scale,e.zeroFillDecimals,e.scaleSuffixSeparator,e.useBracketsForNegative);case"percent":return $.zo($.Tm(100*s,2))}}function i(t){return t}function n(t,i){var n,s=h,a=[];for(n in s)if(s.hasOwnProperty(n)){var o=fp(n);o!=n&&(s[o]=s[n],a.push(n))}for(n=a.length;n--;)delete s[a[n]];!function(t){var e,i,n=[];for(i in t)if(t.hasOwnProperty(i)){var s=t[i];if(i in d){var a=d[i];if("number"==a&&(s=$.N(s)),"boolean"==a&&(s=u[fp(s).toLowerCase()],s="useNegativeSign"==i?!s:s),"scale"==a){var o=fp(s);if(o in u)s=u[o];else{s={},o=o.split("|");var r=function(t,e){return 0!=e%2};a=(0,$.Ye)(o[0].split(/\(([ \w\+\-]*)\)/),r),o=(0,$.Ye)(o[1].split(/\(([^\)]*)\)/),r);var l=(a=(0,$.Wa)(a,(function(t){return+t})))[0];for(r=[l],e=1;e<a.length;e++)l*=a[e],r.push(l);r.length!=o.length&&(a=Math.min(r.length,o.length),r.length=a,o.length=a),r.reverse(),o.reverse(),s.factors=r,s.suffixes=o}}}a=i,i in p&&p[i]&&(a=p[i])!=i&&n.push(i),t[a]=s}for(e=n.length;e--;)delete t[n[e]]}(h),c.push($.qa(e,t,i))}function s(t){c.push($.qa(i,t))}for(var a,o,r,l,h,c=[],u={true:!0,false:!1},d={numDecimals:"number",decimalsCount:"number",useNegativeSign:"boolean",useBracketsForNegative:"boolean",leadingZeros:"number",trailingZeros:"boolean",zeroFillDecimals:"boolean",scale:"scale"},p={numDecimals:"decimalsCount",decimalSeparator:"decimalPoint",thousandsSeparator:"groupsSeparator",useNegativeSign:"useBracketsForNegative",trailingZeros:"zeroFillDecimals"},g={number:"number",string:"string",datetime:"date-time",date:"date",time:"time",percent:"percent"},f=t.length,m=0,v="",b=!1,y=0;y<f;y++)switch(a=t.charAt(y),m){case 0:"{"==a?m=1:v+=a;break;case 1:"%"==a?(0<v.length&&s(v),v="%",m=2):(v+="{"+a,m=0);break;case 2:"}"==a?1<v.length?(o=v,v="",m=3):(v="{%}",m=0):v+=a;break;case 3:"{"==a?m=4:(n(o,null),v=a,m=0);break;case 4:"%"==a?(n(o,null),v="%",m=2):(r="{"+a,v=a,m=l="",h={},b="\\"==a,m=5);break;case 5:r+=a,b?(v+=a,b=!1):"\\"==a?b=!0:":"==a?(l=v,v="",m=6):"}"==a?(l=fp(v),h[l]="",n(o,h),r=v=m=l="",m=0):v+=a;break;case 6:r+=a,b?(v+=a,b=!1):"\\"==a?b=!0:","==a?(m=v,h[l]=m,m=l=v="",m=5):"}"==a?(m=v,h[l]=m,n(o,h),r=v=m=l="",m=0):v+=a}switch(m){case 0:0<v.length&&s(v);break;case 1:s("{");break;case 2:s("{"+v);break;case 3:n(o,null);break;case 4:n(o,null),s("{");break;case 5:case 6:s(r)}return c},$.Nu=function(t,e){if(!t.b[e]){var i=oca(e);t.b[e]=function(t){return(0,$.Wa)(i,(function(e){return e(t)})).join("")}}return t.b[e]},$.Pu=function(t){this.ka(),$.Y.call(this),t||(this.WC=this.Ga($.ur.labelsFactory)),delete this.oa.enabled,this.wb=null,this.TX="background padding height width offsetY offsetX position anchor rotation format positionFormatter minFontSize maxFontSize maxLength clip connectorStroke adjustFontSize useHtml fontSize fontWeight fontFamily fontColor textDirection textShadow wordWrap wordBreak fontOpacity fontDecoration fontStyle fontVariant letterSpacing lineHeight textIndent vAlign hAlign textOverflow selectable disablePointerEvents".split(" "),this.Nd={},$.Ou(this,"different"),this.da(!1),$.Eq(this.ua,20,20,9,1),$.T(this.ua,[["format",20,9],["positionFormatter",4,9],["position",20,9],["anchor",4,9],["offsetX",4,9],["offsetY",4,9],["connectorStroke",512,1],["rotation",4,9],["width",4,9],["height",4,9],["clip",256,1]])},Qu=function(t){return"auto"==(t=$.Dk(t,"auto"))&&(t=void 0),t},$.Ou=function(t,e){return $.p(e)?(e=$.zk(pca,e,"different"),t.aa!=e&&(t.aa=e,t.jC()&&t.B(4,9)),t):t.aa},Ru=function(t){t.Ia&&(t.Pa.background=t.Ia.Pa),t.Wa&&(t.Pa.padding=t.Wa.Pa)},qca=function(t){(0,$.Pe)(t.Da,(function(t){t&&t.xb&&!Su(t)&&t.xb.rb()}),t)},$.Xu=function(t,e,i,n,s){var a=new $.I(0,0,0,0),o=t.ja();if(o)var r=o.width,l=o.height;if($.J(e,$.Tu)&&!n){var h=e,c=h.Rh(),u=h.Hf();e=i||h.jc()||{value:{x:0,y:0}};var d=$.Uu(h);(o=Vu(h,(function(t,e){var i=$.J(e,$.Pu)?e.ja():e.ja;if(i)return i})))&&(r=o.width,l=o.height);var p=d.useHtml,g=d.width,f=d.height;n=d.offsetY,i=d.offsetX;var m=d.anchor,v=d.format,b=d.padding;c.style(d)}else t.b?t.b.clear():(t.b=t.vL(),t.b.hp=t),t.K||(t.K=$.sk(),t.K.Cd("aria-hidden","true")),h=t.b,c=t.K,$.J(e,$.Tu)?(t.b.N($.Uu(e)),u=e.Hf(),e=i||e.jc()||{value:{x:0,y:0}}):(u=e,e=i||{value:{x:0,y:0}}),t.b.N(n),p=$.p(h.g("useHtml"))?h.g("useHtml"):t.g("useHtml"),b=($.Jc(h.Pa.padding)&&$.Jc(h.oa.padding)?void 0:h.padding())||t.Wa||null,g=$.p(h.g("width"))?h.g("width"):t.g("width"),f=$.p(h.g("height"))?h.g("height"):t.g("height"),n=h.g("offsetY")||t.g("offsetY")||0,i=h.g("offsetX")||t.g("offsetX")||0,m=h.g("anchor")||t.g("anchor"),v=h.g("format")||t.g("format"),h.bi(c,!0,t.oa),h.bi.call(t,c,!1),h.bi(c,!1);if($.J(b,$.Hu)||(b=t.padding()),s=$.Wu(t,v,u,s),s=h.VK(s),c.width(null),c.height(null),p?c.htmlText(null!=s?String(s):null):c.text(null!=s?String(s):null),u=null!==g,h=null!==f,s=c.rb(),u){r=Math.ceil($.L(g,r));var y=b?b.Ng(r):r;a.width=r}else r=s.width,a.width=b?b.Lk(r):r;if($.p(y)&&c.width(y),s=c.rb(),h){y=Math.ceil($.L(f,l));var S=b?b.Yh(y):y;a.height=y}else y=s.height,a.height=b?b.$j(y):y;return $.p(S)&&c.height(S),S=$.Qc(t.g("positionFormatter").call(e,e)),t.S1(a,S,o,i,n,m)},$.Wu=function(t,e,i,n){if($.z(e)&&(e=$.Nu($.Lu.Id(),e)),t.i||(t.i={}),null!=n){if(!$.p(t.i[n])){if($.p(i)&&i.series){var s=i.series.$();$.D(s.select)&&s.select($.p(i.index)?i.index:n)}t.i[n]=e.call(i,i)}return t.i[n]}return e.call(i,i)},$.Yu=function(t,e){$.p(e)?t.i&&$.p(t.i[e])&&delete t.i[e]:t.i={}},$.Tu=function(){$.Y.call(this),delete this.oa.enabled,this.lx={},this.Nd={},this.ea="pointState seriesState chartState pointNormal seriesNormal chartNormal seriesStateTheme chartStateTheme auto seriesNormalTheme chartNormalTheme".split(" "),this.P=$.Ja(this.ea,0),this.xr=!0,this.Hi(),this.I(1024),$.Eq(this.ua,20,20,9,1),$.T(this.ua,[["format",1044,9],["positionFormatter",4,9],["position",4,9],["anchor",4,9],["offsetX",4,9],["offsetY",4,9],["connectorStroke",512,1],["rotation",4,9],["width",4,9],["height",4,9],["clip",256,1],["enabled",1,9]])},$.Zu=function(t,e){return null!=e?(t.state("seriesNormal")!=e&&(t.hp=e,t.state("seriesNormal",e),t.state("seriesNormalTheme",e?e.oa:null),t.B(16,1)),t):t.state("seriesNormal")},$.$u=function(t,e){return $.p(e)?(t.state("seriesState")!=e&&(t.state("seriesState",e),t.state("seriesStateTheme",e?e.oa:null),t.B(16,1)),t):t.state("seriesState")},av=function(t){return t.P||(t.P=$.Ja(t.ea,0))},$.bv=function(t,e,i){var n=!1,s=av(t);$.p(i)&&$.z(e)?(i=$.N(i),(t=(0,$.za)(s,e))!=i&&(i=(0,window.isNaN)(i)?s.length-1:i,s.length<=i&&(s.length=i+1),-1!=t&&delete s[t],s[i]=e)):($.A(e)?(t.P=$.Ja(e,0),n=!0):null===e&&(t.P=$.Ja(t.ea,0),n=!0),n&&t.B(17,9))},cv=function(t,e){return Vu(t,(function(t,i){if(($.J(i,$.Tu)||$.J(i,$.Pu))&&i.J(e))return!0}))||t.J(e)},dv=function(t,e){if($.p(e)){var i=!!e;return t.Nd.vertical!==i&&(t.Nd.vertical=i,$.p(t.Nd.vertical)||t.B(16,8)),t}return t.Nd.vertical},ev=function(t){t.Ia&&(t.Pa.background=t.Ia.Pa),t.Wa&&(t.Pa.padding=t.Wa.Pa)},Vu=function(t,e,i,n){var s=void 0,a=av(t);return $.va(a,(function(t,a){var o=$.z(t)?"auto"==t?this.Nd:this.lx[t]:t;o&&(o=e.call(this,t,o,a,i,n),$.p(o)&&("object"==$.ka(o)?null!=s?$.Sc(s,o):s=$.Qc(o):s=o))}),t),s},rca=function(t,e,i,n,s){if($.J(e,$.Tu)||$.J(e,$.Pu))if("enabled"==n)var a=null===(t=e[n]())?void 0:t;else a=e.xA(n);else"object"==$.ka(e)&&("adjustFontSize"==n?(e=e[n],$.p(e)?$.A(e)?(t=e[0],e=e[1]):$.C(e)?(t=e.width,e=e.height):(t=!!e,e=!!e):e=t=void 0,a={width:t,height:e}):"padding"==n&&$.ea(e[n])?a=$.Gm(e[n]):(a=e[n],"enabled"==n&&null===a&&(a=void 0)));return a&&$.D(a.F)&&(a=a.F()),s&&$.p(a)&&(a=s(a)),a},fv=function(t,e,i){return Vu(t,rca,e,i)},$.Uu=function(t){var e=av(t);if(1==e.length&&(e=e[0],t.b=$.z(e)?t.lx[e]:e),t.b)return $.Qc(t.b);for(var i={},n=0,s=(e=t.hp.TX).length;n<s;n++){var a=e[n],o=t.ic(a);"adjustFontSize"==a?(i.adjustByWidth=o.width,i.adjustByHeight=o.height):i[a]=o}return t.b=i,$.Qc(t.b)},$.iv=function(t,e,i,n,s,a,o){var r=sca(t);return t=$.Va(n,s+1),0>(n=$.Oa(t,(function(t){r.fontSize(t);var n=r.rb();return t=n.width,n=n.height,a&&t>e||o&&n>i?-1:a&&t==e||o&&n==i?0:1})))&&(n=~n-1),t[$.Za(n,0,t.length)]},sca=function(t){var e=$.Uu(t),i=e.useHtml,n=t.Hf();return t.J(1024)&&($.Yu(t.hp,t.ma()),t.I(1024)),e=t.tk(e.format,n,t.ma()),t.Rv||(t.Rv=$.sk(),t.Rv.Cd("aria-hidden","true")),i?t.Rv.htmlText($.p(e)?String(e):""):t.Rv.text($.p(e)?String(e):""),Vu(t,(function(t,e,i){t=0==i,$.J(e,$.Pu)||$.J(e,$.Tu)?this.bi.call(e,this.Rv,t):this.bi(this.Rv,t,e)})),t.Rv},Su=function(t){if($.da(t.xr))return t.xr;var e=$.Uu(t),i=null!==e.width,n=null!==e.height,s=e.useHtml,a=!!t.xb&&!!t.xb.path();return t=String(t.tk(e.format,t.Hf(),t.ma())),1!=(t=$.hc(ic(t))).split(/\n/g).length||i||n||s||a},jv=function(t){var e=Su(t),i=$.J(t.xb,Cu),n=$.J(t.xb,$.Qh);return!t.xb||e&&i||!e&&n},kv=function(){$.Pu.call(this)},lv=function(){$.Tu.call(this)},mv=function(t,e,i){this.pc={values:t||{},lg:e||null,Li:i||[],Im:{},Dl:{}},this.pc.Im["%Value"]="value",this.pc.Im["%YValue"]="value",this.pc.Im["%Index"]="index"},$.nv=function(t){return $.p(void 0)?(t.pc.values=void 0,t):t.pc.values},$.ov=function(t,e){var i;if($.p(e)){for(i in t)t.hasOwnProperty(i)&&!$.D(t[i])&&t[i]!=t.pc&&delete t[i];t.pc.values=e}for(i in t.pc.values)t[i]=t.pc.values[i].value;return t},$.pv=function(t){$.V.call(this),this.b=t},qv=function(t){this.pa=t,$.V.call(this)},rv=function(t,e,i){var n=t.pa.O()?t.pa.O().Ja().Xo():null;return n?$.p(i)?(n[e](i),t):n[e]():$.p(i)?(t[e+"_"]!==i&&(t[e+"_"]=i),t.B(16,2),t):t[e+"_"]},sv=function(t){var e={},i=t.text_,n=t.url_,s=t.alt_,a=t.imgAlt_,o=t.logoSrc_;return t=t.enabled_,$.p(i)&&(e.text=i),$.p(n)&&(e.url=n),$.p(s)&&(e.alt=s),$.p(a)&&(e.imgAlt=a),$.p(o)&&(e.logoSrc=o),$.p(t)&&(e.enabled=t),e},tv=function(){$.Y.call(this),this.Y=null,this.Uc={},this.Xb=null,$.T(this.ua,[["fontSize",20,9],["fontFamily",20,9],["fontColor",16,1],["fontOpacity",16,1],["fontDecoration",20,9],["fontStyle",20,9],["fontVariant",20,9],["fontWeight",20,9],["letterSpacing",20,9],["textDirection",20,9],["lineHeight",20,9],["textIndent",20,9],["textShadow",16,1],["vAlign",20,9],["hAlign",20,9],["wordWrap",20,9],["wordBreak",20,9],["textOverflow",20,9],["selectable",16,1],["disablePointerEvents",16,1],["useHtml",20,9]])},uv=function(){tv.call(this),this.Ia=null,this.K=void 0,this.xb=this.Wa=null,this.Oa=$.ok(),$.ru(this,this.Oa),$.T(this.ua,[["text",20,9],["position",4,9],["width",4,9],["height",4,9],["anchor",4,9],["offsetX",4,9],["offsetY",4,9],["rotation",4,9],["adjustFontSize",4,9],["minFontSize",0,0,0,this.ea],["maxFontSize",0,0,0,this.ea]]),this.ua.disablePointerEvents.g0=function(){this.background().disablePointerEvents(this.nd("disablePointerEvents"))}},vv=function(t){var e,i=t.ja(),n=t.g("width"),s=t.g("height"),a=t.Z1();i&&a?(null!=n?(t.Oi=n=$.L(n,a.width),i=!1):(n=0,i=!0),null!=s?(t.Ni=e=$.L(s,a.height),a=!1):(e=0,a=!0)):($.Do(n)?(i=!0,n=0):(i=!1,t.Oi=n=$.N(n)),$.Do(s)?(a=!0,e=0):(a=!1,t.Ni=e=$.N(s))),s=t.padding(),t.xb.width(null),t.xb.height(null),i?(n+=t.xb.rb().width,t.nn=n,t.Oi=s.Lk(n)):n=t.nn=s.Ng(n),t.xb.width(t.nn),a?(e+=t.xb.rb().height,t.ln=e,t.Ni=s.$j(e)):e=t.ln=s.Yh(e),t.xb.height(t.ln);var o=!i,r=!a,l=t.g("adjustFontSize");o=l&&(o&&l.width||r&&l.height),t.ka(),o?(n=t.dS(n,e),t.fontSize(n),t.xb.fontSize(n),i&&(t.xb.width(null),t.nn=t.xb.rb().width,t.xb.width(t.nn),t.Oi=s.Lk(t.nn)),a&&(t.xb.height(null),t.ln=t.xb.rb().height,t.xb.height(t.ln),t.Ni=s.$j(t.ln))):l&&(l.width||l.height)&&(t.fontSize(t.g("minFontSize")),t.xb.fontSize(t.g("minFontSize")),i&&(t.xb.width(null),t.nn=t.xb.rb().width,t.xb.width(t.nn),t.Oi=s.Lk(t.nn)),a&&(t.xb.height(null),t.ln=t.xb.rb().height,t.xb.height(t.ln),t.Ni=s.$j(t.ln))),t.da(!1),t.Lg=$.L(s.g("left"),t.Oi),t.Mg=$.L(s.g("top"),t.Ni)},wv=function(t){var e;return(e=!t.xb)&&(t.xb=$.sk(),t.xb.Cd("aria-hidden","true")),e},$.xv=function(){uv.call(this),$.T(this.ua,[["visible",128,1]]),this.oa.visible=!0},yv=function(){$.xv.call(this)},zv=function(){function t(){this.Zy=!0}function e(){this.$b=null}tv.call(this),this.Ga($.ur.legendItem),this.wb=$.ok(),this.ad=this.wb.text(),this.ad.Cd("aria-hidden","true"),this.YW=this.ZW=null,this.SF=window.NaN,this.p4={line:"black",spline:"black","step-line":"black",ohlc:"black",candlestick:"black"},this.xka={line:!0,spline:!0,"step-line":!0,ohlc:!0},this.ZC={iconStroke:"#999",iconFill:"#999",iconHatchFill:"none",iconMarkerStroke:"#999",iconMarkerFill:"#999",fontColor:"#999"},$.T(this.ua,[["text",20,9],["x",4,9,0,e],["y",4,9,0,e],["iconType",16,1,0,t],["iconTextSpacing",4,9,0,e],["maxWidth",4,9,0,e],["maxHeight",4,9,0,e],["iconFill",17,0,t],["iconStroke",16,1,0,t],["iconHatchFill",16,1,0,t]]),this.UK()},Bv=function(t,e,i){t.$l?t.$l.clear():t.$l=e.parent().path(),t.jw&&(Av(t,t.za),e=t.jw,($.z(e)?$.zp(e):e).call(t,t.$l,i/2,i/2,i/6))},tca=function(t){switch(t){case"step-area":t=function(t,e){t.moveTo(0,.6*e).lineTo(.5*e,.6*e).lineTo(.5*e,.1*e).lineTo(e,.1*e).lineTo(e,e).lineTo(0,e).lineTo(0,.6*e).close()};break;case"area":t=function(t,e){t.moveTo(0,.7*e).lineTo(.35*e,.3*e).lineTo(.5*e,.5*e).lineTo(e,0).lineTo(e,e).lineTo(0,e).lineTo(0,.7*e).close()};break;case"range-step-area":case"range-spline-area":case"range-area":t=function(t,e){t.moveTo(0,.2*e).lineTo(.5*e,.4*e).lineTo(e,.2*e).lineTo(e,.8*e).lineTo(.5*e,.6*e).lineTo(0,.8*e).close()};break;case"spline-area":t=function(t,e){var i=e/2;t.moveTo(e,.6*i).lineTo(e,e).lineTo(0,e).lineTo(0,1.3*i).Fe(0,i,i,.3*i,90,-90).Fe(e,i,i,.4*i,180,90).moveTo(0,0).close()};break;case"range-bar":t=function(t,e){t.moveTo(.35*e,0).lineTo(.65*e,0).lineTo(.65*e,.15*e).lineTo(.35*e,.15*e).close().moveTo(.1*e,.4*e).lineTo(.9*e,.4*e).lineTo(.9*e,.55*e).lineTo(.1*e,.55*e).close().moveTo(.25*e,.8*e).lineTo(.75*e,.8*e).lineTo(.75*e,.95*e).lineTo(.25*e,.95*e).close()};break;case"range-column":t=function(t,e){t.moveTo(0,.6*e).lineTo(0,.4*e).lineTo(.15*e,.4*e).lineTo(.15*e,.6*e).lineTo(0,.6*e).close().moveTo(.4*e,.9*e).lineTo(.4*e,.1*e).lineTo(.55*e,.1*e).lineTo(.55*e,.9*e).lineTo(.4*e,.9*e).close().moveTo(.8*e,.7*e).lineTo(.8*e,.3*e).lineTo(.95*e,.3*e).lineTo(.95*e,.7*e).lineTo(.8*e,.7*e).close()};break;case"bar":t=function(t,e){t.moveTo(0,0).lineTo(.6*e,0).lineTo(.6*e,.15*e).lineTo(0,.15*e).close().moveTo(0,.4*e).lineTo(e,.4*e).lineTo(e,.55*e).lineTo(0,.55*e).close().moveTo(0,.8*e).lineTo(.8*e,.8*e).lineTo(.8*e,.95*e).lineTo(0,.95*e).close()};break;case"column":t=function(t,e){t.moveTo(0,e).lineTo(0,.4*e).lineTo(.15*e,.4*e).lineTo(.15*e,e).close().moveTo(.4*e,e).lineTo(.4*e,0).lineTo(.55*e,0).lineTo(.55*e,e).close().moveTo(.8*e,e).lineTo(.8*e,.2*e).lineTo(.95*e,.2*e).lineTo(.95*e,e).close()};break;case"step-line":t=function(t,e){t.moveTo(0,.8*e).lineTo(.5*e,.8*e).lineTo(.5*e,.2*e).lineTo(e,.2*e).moveTo(0,0).close(),Bv(this,t,e)};break;case"line":t=function(t,e){t.moveTo(0,.5*e).lineTo(e,.5*e).close(),Bv(this,t,e)};break;case"spline":t=function(t,e){var i=e/2;t.Fe(0,i,i,.8*i,90,-90).Fe(e,i,i,.6*i,180,90).moveTo(0,0).close(),Bv(this,t,e)};break;case"bubble":case"circle":t=function(t,e){var i=e/2;t.Fe(i,i,i,i,0,360).close()};break;case"candlestick":t=function(t,e){t.moveTo(.5*e,0).lineTo(.5*e,e).moveTo(0,.3*e).lineTo(e,.3*e).lineTo(e,.7*e).lineTo(0,.7*e).lineTo(0,.3*e).close()};break;case"ohlc":t=function(t,e){t.moveTo(0,.2*e).lineTo(.5*e,.2*e).moveTo(.5*e,0).lineTo(.5*e,e).moveTo(.5*e,.8*e).lineTo(e,.8*e).close()};break;case"triangle-up":case"triangle-down":case"triangle-right":case"triangle-left":case"diamond":case"cross":case"diagonal-cross":case"star4":case"star5":case"star6":case"star7":case"star10":case"pentagon":case"trapezium":case"arrowhead":case"v-line":t=$.Ok(t);var e=$.zp(t);t=function(t,i){return e(t,i/2,i/2,i/2)};break;default:t=function(t,e){t.moveTo(0,0).lineTo(e,0).lineTo(e,e).lineTo(0,e).close()}}return t},Cv=function(t,e){t.$l&&t.$l.clear(),t.Fs?(e.call(t,t.lw.clear(),t.pp),t.Es&&e.call(t,t.Es.clear(),t.pp)):(t.lw.clear(),t.Es&&t.Es.clear())},Dv=function(t,e,i){t.bi(t.ad,!!i),i=t.g("fontColor"),e=t.fq?t.ZC.fontColor:e?$.Pl(i):i,(0,window.isNaN)(t.SF)?(t.ad.color(e),t.ad.fill(e)):(i=t.g("fontOpacity"),i=$.p(i)?i:1,e={keys:Cp(t.SF,i,e)},t.Rh().fill(e))},Ev=function(t,e){t.lw.stroke(uca(t,e)),t.lw.fill(vca(t,e)),t.Es&&t.Es.fill(t.fq?t.ZC.iconHatchFill:t.g("iconHatchFill"))},Av=function(t,e){t.$l&&(t.$l.fill(wca(t,e)),t.$l.stroke(xca(t,e)))},uca=function(t,e){if(t.fq)return t.ZC.iconStroke;var i=t.g("iconType");return $.cp(t.g("iconStroke"))&&i in t.p4?t.p4[i]:e?$.Pl(t.g("iconStroke")):t.g("iconStroke")},vca=function(t,e){return t.g("iconType")in t.xka?null:t.fq?t.ZC.iconFill:e?$.Pl(t.g("iconFill")):t.g("iconFill")},xca=function(t,e){return t.fq?t.ZC.iconMarkerStroke:e?$.Pl(t.hw):t.hw},wca=function(t,e){return t.fq?t.ZC.iconMarkerFill:e?$.Pl(t.gw):t.gw},Fv=function(t,e){return $.p(e)?(t.ZW=e,t):t.ZW},$.Hv=function(){tv.call(this),this.Jf=this.Yf=null,this.dc=Gv,this.qE=this.lL=!1,this.TH(),$.T(this.ua,[["text",20,9]]),this.B(4294967295)},Iv=function(t){var e=t.ja();if(e)var i=e.width,n=e.height;else i=n=void 0;var s=!!t.xb;if(s)var a=t.xb.rb(),o=a.width,r=a.height;var l=null!=t.Yf,h=null!=t.Jf;a=t.padding(),l?(o=$.uo(t.Yf)&&!$.p(i)?s?o:0:$.L(t.Yf,i),s&&(t.Lg=$.L(a.g("left"),o))):(o=s?o:0,s&&(t.Lg=$.L(a.g("left"),o)),o=a.Lk(o)),e&&i<o&&(o=i),h?(r=$.uo(t.Jf)&&!$.p(n)?s?r:0:$.L(t.Jf,n),s&&(t.Mg=$.L(a.g("top"),r))):(r=s?r:0,s&&(t.Mg=$.L(a.g("top"),r)),r=a.$j(r)),e&&n<r&&(r=n),s&&(t.xb.width(o),t.xb.height(r)),(e=$.Sm(t.af)).x=i?$.L(e.x,i):0,e.y=n?$.L(e.y,n):0,t.GC=new $.I(e.x,e.y,o,r)},$.Jv=function(t,e){$.p(e)&&(t.hO=e)},Kv=function(){$.Hv.call(this),this.Ga("defaultLegend.paginator.buttonsSettings"),this.b=$.ia,this.Ku(16,!1),this.TH()},Lv=function(t,e){$.p(e)&&t.b!=e&&(t.b=e,t.B(64,1))},$.Mv=function(t,e,i,n){Eu.apply(this,arguments)},Sv=function(){tv.call(this),this.Ga($.ur.paginator),this.ba=this.kc=null,Nv(this,1),this.UC(1),this.o=new Kv,this.o.padding(null),this.o.enabled(!0),$.Jv(this.o,(0,$.pa)(Ov,this)),$.K(this.o,Pv,this.o),this.i=new Kv,this.i.padding(null),this.i.enabled(!0),$.Jv(this.i,(0,$.pa)(Ov,this)),$.K(this.i,Pv,this.i);var t=this;Lv(this.o,Qv),Lv(this.i,Rv),$.T(this.ua,[["text",20,9],["orientation",4,9],["layout",4,9,0,function(){"horizontal"==this.g("layout")?(Lv(t.o,Qv),Lv(t.i,Rv)):(Lv(t.o,yca),Lv(t.i,zca))}]])},Tv=function(t,e){return $.p(e)?(t.ba||(t.ba=e),t):t.ba},Nv=function(t,e){if($.p(e)&&(e=Math.ceil((0,window.isNaN)((0,window.parseFloat)(e))?1:+e),t.P!=e)){if($.p(t.P)){if(!(0<e))throw Error("incorrect pageCount value!! Should be more than 0");e<t.aa+1&&(t.aa=e-1),t.P=e}else t.P=e;t.B(20,9)}},Uv=function(t){return((0,window.isNaN)(t.aa)?"-":String(t.aa+1))+" / "+((0,window.isNaN)(t.P)?"-":String(t.P))},Vv=function(t,e){return $.p(e)?(t.ea!=e&&(t.ea=e,t.B(1,t.mr())),t):t.ea},Wv=function(t){return!!t.enabled()&&Vv(t)},Xv=function(t,e){var i=t.padding(),n=t.margin(),s=t.ja();if(s)var a=s.width,o=s.height;t.K||(t.K={});var r=$.p(e)?e:t.P,l=r+t.g("layout").substr(0,1);if(t.K[l])r=t.K[l];else{var h=$.sk();h.Cd("aria-hidden","true"),t.bi(h,!0),h.text(r+" / "+r),r=h.rb(),$.qd(h);var c=r.height;"horizontal"==t.g("layout")?(h=2*c+20+r.width,r=r.height):(h=Math.max(c,r.width),r=2*c+20+r.height),r=t.K[l]=[h,r]}if(l=r[0],r=r[1],t.f=i.Lk(l),t.b=i.$j(r),s&&a<t.f&&(t.f=n.Ng(t.f)),s&&o<t.b&&(t.b=n.Yh(t.b)),i=n.Lk(t.f),l=n.$j(t.b),r=s?$.L(n.g("left"),t.f):0,n=s?$.L(n.g("top"),t.b):0,s){switch(t.g("orientation")){case"top":t.D=s.tb()+(a-i)/2+r,t.G=s.Vb()+n;break;case"right":t.D=s.cb()-i+r,t.G=s.Vb()+(o-l)/2+n;break;case"bottom":t.D=s.tb()+(a-i)/2+r,t.G=s.Va()-l+n;break;case"left":t.D=s.tb()+r,t.G=s.Vb()+(o-l)/2+n}t.$b=new $.I(t.D-r,t.G-n,i,l)}else t.D=r,t.G=n,t.$b=new $.I(0,0,i,l)},Yv=function(t,e){return t.$b&&!t.J(4)||Xv(t,e),t.$b},Pv=function(t){$.X(t,1)&&this.W()},Ov=function(t){var e=this.UC(),i=this.i2();switch(t){case this.o:0<e&&this.UC(e-1);break;case this.i:e<i&&this.UC(e+1);break;default:throw Error("Something wrong with onClickListener!")}},Qv=function(t,e){t.moveTo(e.cb(),e.Vb()).lineTo(e.cb(),e.Va()).lineTo(e.tb(),e.Vb()+e.height/2).close()},Rv=function(t,e){t.moveTo(e.tb(),e.Vb()).lineTo(e.cb(),e.Vb()+e.height/2).lineTo(e.tb(),e.Va()).close()},yca=function(t,e){t.moveTo(e.tb()+e.width/2,e.Vb()).lineTo(e.cb(),e.Va()).lineTo(e.tb(),e.Va()).close()},zca=function(t,e){t.moveTo(e.tb(),e.Vb()).lineTo(e.cb(),e.Vb()).lineTo(e.tb()+e.width/2,e.Va()).close()},Zv=function(){$.Y.call(this),this.Ga($.ur.separator),delete this.oa.enabled,this.Sc=null,this.G=this.D=window.NaN,this.Xb=this.Y=this.$b=null;var t=(0,$.pa)((function(t,e){if(e=e.clone().round(),!this.Nb()){var i=1==e.width?.5:0;e.left-=i,e.width+=2*i}t.moveTo(e.left,e.top).lineTo(e.left+e.width,e.top).lineTo(e.left+e.width,e.top+e.height).lineTo(e.left,e.top+e.height).close()}),this);this.bf(t),this.B(4294967295),$.T(this.ua,[["fill",16,1],["stroke",16,1],["width",20,9],["height",20,9],["orientation",20,9]])},$v=function(t){var e=t.margin(),i=t.ja();if(i)if(t.Nb())var n=i.width,s=i.height;else n=i.height,s=i.width;else n=s=void 0;var a=t.g("width"),o=t.g("height");o=$.cp(o)||!$.p(o)?"100%":o,a=$.L($.cp(a)||!$.p(a)?"100%":a,n),i&&n<e.Lk(a)&&(a=e.Ng(n)),o=$.L(o,s),i&&s<e.$j(o)&&(o=e.Yh(s));var r=e.Lk(a),l=e.$j(o);if(n=$.L(e.g("left"),n),e=$.L(e.g("top"),s),s=t.g("orientation")||"top",i)switch(s){case"top":t.D=i.tb()+n,t.G=i.Vb()+e,t.f=a,t.b=o,t.$b=new $.I(i.tb(),i.Vb(),r,l);break;case"bottom":t.D=i.tb()+n,t.G=i.Va()-l+e,t.f=a,t.b=o,t.$b=new $.I(i.tb(),i.Va()-l,r,l);break;case"left":t.D=i.tb()+e,t.G=i.Va()-n-a,t.f=o,t.b=a,t.$b=new $.I(i.tb(),i.Vb(),l,r);break;case"right":t.D=i.cb()-e-o,t.G=i.Vb()+n,t.f=o,t.b=a,t.$b=new $.I(i.cb()-l,i.Vb(),l,r)}else t.D=n,t.G=e,t.Nb()?t.$b=new $.I(0,0,r,l):t.$b=new $.I(0,0,l,r)},$.aw=function(){$.Y.call(this),delete this.oa.enabled,this.Ga($.ur.title),this.P=this.ba=this.wb=this.Ia=null,this.D=this.G=this.b=this.f=window.NaN,this.i=this.Wa=this.Qc=this.$b=null,this.Nd={},this.Nd.orientation="top",this.Xb=this.Y=null,this.r3=!1,$.Eq(this.ua,20,16,9,1),$.T(this.ua,[["width",4],["height",4],["align",4],["orientation",4],["rotation",4],["maxLength",20],["text",20]])},bw=function(t){var e=[t.oa];return t.Y&&(e=$.Ga(e,bw(t.Y))),e},cw=function(t,e){t.ba=0>e?null:e,$.p(t.width())||t.B(4)},$.dw=function(t,e){if($.p(e)){var i=t.g("orientation")!=e;return t.Nd.orientation=e,i&&t.B(4),t}return t.Nd.orientation},$.ew=function(t,e){if($.p(e)){var i=null==e?"":String(e);return t.aa!=i&&(t.aa=i,t.B(20,9)),t}return t.aa},fw=function(t){var e=!1;return t.wb||(e=!0,t.wb=$.ok(),t.background().O(t.wb),t.kc=t.wb.text(),t.kc.zIndex(.1),t.kc.Cd("aria-hidden","true"),$.ru(t,t.wb)),e},gw=function(t){var e=t.padding(),i=t.margin(),n=t.ja(),s=t.g("orientation"),a=0==t.AA()%180,o=0==(t.AA()+90)%180;if(n)if(o){var r=n.height;o=n.width}else r=n.width,o=n.height;else r=o=void 0;var l=fw(t);(l||t.J(16))&&(t.bi(l),t.I(16)),t.kc.width(null),t.kc.height(null),t.kc.oc(1,0,0,1,0,0),l=t.kc.rb();var h=t.ph("width")?t.nd("width"):t.ba||null;null===h?(t.G=l.width,t.f=e.Lk(t.G)):(t.f=$.L(h,r),t.G=e.Ng(t.f)),n&&r<i.Lk(t.f)?(t.f=i.Ng(r),t.G=e.Ng(t.f),t.kc.width(t.G)):null===h||t.kc.width(t.G),t.kc.oc(1,0,0,1,0,0),l=t.kc.rb(),null===(r=t.ph("height")?t.nd("height"):t.P||null)?(t.D=l.height,t.b=e.$j(t.D)):(t.b=$.L(r,o),t.D=e.Yh(t.b)),n&&o<i.$j(t.b)?(t.b=i.Yh(o),t.D=e.Yh(t.b),t.kc.height(t.D)):null===r||t.kc.height(t.D),t.$b=new $.I(-t.f/2,-t.b/2,t.f,t.b),e=$.Kb($.bb(t.AA()),0,0);var c=$.Ab(t.$b,e);o=$.L(i.g("left"),t.f),r=$.L(i.g("right"),t.f),l=$.L(i.g("top"),t.b),i=$.L(i.g("bottom"),t.b);var u=o+(h=c.width/2),d=l+(c=c.height/2),p="top"==s||"bottom"==s;if(n)if(p||a)if(p){switch(t.g("align")){case"left":u=n.tb()+o+h;break;case"right":u=n.cb()-r-h;break;default:u=(n.tb()+n.cb()+o-r)/2}"top"==s?d=n.Vb()+l+c:"bottom"==s&&(d=n.Va()-i-c)}else switch("right"==s?u=n.cb()-r-h:"left"==s&&(u=n.tb()+o+h),t.g("align")){case"top":case"left":d=n.Vb()+l+c;break;case"bottom":case"right":d=n.Va()-i-c;break;default:d=(n.Vb()+n.Va()+l-i)/2}else if("left"==s){switch(t.g("align")){case"top":case"right":d=n.Vb()+r+c;break;case"bottom":case"left":d=n.Va()-o-c;break;default:d=(n.Vb()+n.Va()-o+r)/2}u=n.tb()+l+h}else{switch(t.g("align")){case"top":case"left":d=n.Vb()+o+c;break;case"bottom":case"right":d=n.Va()-r-c;break;default:d=(n.Vb()+n.Va()+o-r)/2}u=n.cb()-l-h}n=[u,d,0,0],$.Jb(e).transform(n,0,n,0,2),t.i=e.translate(n[0]-n[2],n[1]-n[3]),t.$b=$.Ab(t.$b,t.i),t.i.translate(-t.f/2,-t.b/2),"top"==s||"bottom"==s||a?(t.$b.left-=o,t.$b.top-=l,t.$b.width+=o+r,t.$b.height+=l+i):(t.$b.left-=l,t.$b.top-=r,t.$b.width+=l+i,t.$b.height+=o+r)},hw=function(){$.aw.call(this)},iw=function(t){$.od.call(this),this.gb=t,this.i=this.f=this.o=this.b=this.Jc=null,this.D=this.G=""},jw=function(){return $.Me("DIV",{})},kw=function(t){if(!t.b){t.b=jw(t.gb.background()),t.b.className="anychart-tooltip";var e=t.gb.title();(e=jw(e.background())).className="anychart-tooltip-title",t.o=e,t.f=$.Me("HR"),t.f.setAttribute("noshade",!0),t.f.className="anychart-tooltip-separator",t.i=$.Me("DIV"),t.b.appendChild(t.o),t.b.appendChild(t.f),t.b.appendChild(t.i),e=t.getContext(),t=t.gb.g("onDomReady"),$.D(t)&&t.call(e)}},lw=function(t){kw(t);var e=$.ew(t.gb.title());if($.p(e)&&t.G!=e){kw(t),t.G=e,e=t.getContext();var i=t.gb.g("onBeforeTitleChange");$.D(i)&&!i.call(e)||(t.o.innerHTML=t.G,i=t.gb.g("onTitleChanged"),$.D(i)&&i.call(e))}$.Pf(t.o,t.gb.title().enabled()),$.Pf(t.f,t.gb.$r().enabled()),e=t.gb.Ri().text(),$.p(e)&&t.D!=e&&(kw(t),t.D=e,e=t.getContext(),i=t.gb.g("onBeforeContentChange"),!$.D(i)||i.call(e))&&(t.i.innerHTML=t.D,i=t.gb.g("onContentChanged"),$.D(i)&&i.call(e)),$.Pf(t.i,t.gb.Ri().enabled())},mw=function(){$.od.call(this),this.o=!1,this.Ir=$.Me("div"),this.b=$.hd&&!$.bd("9")?$.lk(null,1,1):$.lk(),this.b.Ax=!0,this.b.O(this.Ir),this.b.Pta=!0,this.Jc=null},nw=function(t,e,i){$.od.call(this),this.b=t,this.i=e||0,this.qo=i,this.f=(0,$.pa)(this.Ofa,this)},pw=function(t,e){$.qf.call(this),this.i=t,this.b=ow(this.i),this.K=e||100,this.o=$.Ld(t,"resize",this.D,!1,this)},qw=function(t){$.qf.call(this),this.f=t||window,this.i=$.Ld(this.f,"resize",this.o,!1,this),this.b=$.Ee(this.f||window)},ow=function(t){return t.b?t.b.clone():null},rw=function(){mw.call(this),this.i=new qw,this.f=new pw(this.i),$.Ld(this.f,"resize",this.D,!1,this)},$.ww=function(t){$.Y.call(this),this.Ga($.ur.tooltip),delete this.oa.enabled,this.fb=t,this.fa=new $.I(0,0,0,0),this.Y=null,this.o={},this.i=this.f=this.Xb=this.Ba=this.b=null,this.Za=!1,this.Ha={format:void 0,titleFormat:void 0},sw[String($.oa(this))]=this,$.Eq(this.ua,tw,640,1,1,this.xE),$.T(this.ua,[["useHtml",2|tw,16385,void 0,this.bL],["width",tw,9],["height",tw,9],["titleFormat",tw,1],["format",tw,1],["unionFormat",tw,1],["valuePrefix",tw,1],["valuePostfix",tw,1],["position",64,1],["anchor",64,1],["offsetX",64,1],["offsetY",64,1],["x",64,1],["y",64,1],["allowLeaveScreen",2,1],["allowLeaveChart",2,1],["allowLeaveStage",2,1],["displayMode",4096,1,uw],["positionMode",64,1,vw],["onDomReady",0,0],["onBeforeTitleChange",0,0],["onTitleChanged",0,0],["onBeforeContentChange",0,0],["onContentChanged",0,0],["hideDelay",0,0,0,this.uL]])},yw=function(t,e,i,n,s,a){if(t.enabled()){var o=t.g("allowLeaveStage"),r=t.g("allowLeaveScreen"),l=t.g("allowLeaveChart"),h=t.g("useHtml"),c=xw(t),u=h?0:t.g("offsetX");if(h=h?0:t.g("offsetY"),!r){t.x(e),t.y(i),r=c?0:n.x,c=c?0:n.y,n=t.ob();var d=$.Ee($.ll||window);0>n.left-u+r&&(e-=n.left-u+r),0>n.top-h+c&&(i-=n.top-h+c),n.cb()-u+r>d.width&&(e-=n.cb()-u+r-d.width),n.Va()-h+c>d.height&&(i-=n.Va()-h+c-d.height)}o||(t.x(e),t.y(i),(n=t.ob()).left<u&&(e-=n.left-u),n.top<h&&(i-=n.top-h),n.cb()>s.width+u&&(e-=n.cb()-s.width-u),n.Va()>s.height+h&&(i-=n.Va()-s.height-h)),l||(t.x(e),t.y(i),(n=t.ob()).left<a.left+u&&(e-=n.left-u-a.left),n.top<a.top+h&&(i-=n.top-h-a.top),n.cb()>a.cb()+u&&(e-=n.cb()-u-a.cb()),n.Va()>a.Va()+h&&(i-=n.Va()-h-a.Va())),t.x(e),t.y(i)}},Bw=function(t,e,i,n,s){var a=e.parent()?zw(e):t,o=a.g("positionMode")||"float";t=(a=a.ya()||$.Aw(t)).ob();var r=a.O().Ja();a=$.Zj(r),r=r.rb();var l=xw(e),h=e.g("position");switch(o){case"float":var c=l?i:i-a.x,u=l?n:n-a.y;break;case"point":var d;d=s&&s.Bh?s.Bh(h,!0).value:{x:i,y:n},c=l?d.x+a.x:d.x,u=l?d.y+a.y:d.y;break;case"chart":c=(i=$.Eo(t,h)).x+(l?a.x:0),u=i.y+(l?a.y:0)}yw(e,c,u,a,r,t)},Aca=function(t,e,i,n,s,a){if(t.check(uw|vw)&&(t.b=s?s.Ua():t,$.Cw(t,[t.b]),t.b.enabled())){for(var o={clientX:{value:i,type:"number"},clientY:{value:n,type:"number"},formattedValues:{value:[],type:""},points:{value:[],type:""}},r=[],l=0;l<e.length;l++){var h=e[l];if(h){var c=h.series;if(!$.p(c.Rk))return;var u=c.Ua();if(c.enabled()&&!Dw(u,h)){var d=c.Rk();o.formattedValues.value.push(Ew(u,d)),o.points.value.push(d),l||(o.x={value:d.lg().Gh(),type:"string"},o.name={value:d.getData("name"),type:"string"}),$.A(h.points)&&r.push({series:c,points:(0,$.Wa)(h.points,(function(t){return c.$().select(t),c.Rk(!0)}))})}}}r.length==e.length&&(o.allPoints={value:r,type:""}),o.formattedValues.value.length&&(r=t.b.g("useHtml")?"<br/>":"\n",o.joinedFormattedValues={value:o.formattedValues.value.join(r),type:"string"},a&&$.Sc(o,a),r=s&&s.xc&&s.xc()||e[0]&&e[0].series&&e[0].series.xc&&e[0].series.xc()||void 0,a=[],!s&&e[0]&&e[0].series&&a.push(e[0].series),s&&a.push(s),r&&a.push(r),(e=new $.Fw(o)).Li(a),s&&e.lg(s.$()),$.ov(e),t.b.Ri().text(Ew(t,e,!0)),$.ew(t.b.title(),Gw(t,e)),$.Cw(t.b),t.b.g("useHtml")&&lw(t.b.i),Hw(t.b).parent()||t.b.B(2),Iw(t,t.b),Bw(t,t.b,i,n,s),Jw(t.b,i,n))}},Dw=function(t,e){return!t.enabled()||e.nearestPointToCursor&&!(0,window.isFinite)(e.nearestPointToCursor.distance)},$.Nw=function(t,e,i,n,s,a,o){if(!t.f||t.f.NA()||!t.f.Hm()||t.check(uw)||e.length){$.Kw(t);var r=t.g("displayMode");if("single"==r)e=(s=e[0]).series,t.b=a?t:e.Ua(),!Dw(t.b,s)&&$.p(e.Rk)&&(a=e.Rk(),o&&($.Sc($.nv(a),o),$.ov(a)),a.clientX=i,a.clientY=n,$.ew(t.b.title(),Gw(t.b,a)),t.b.Ri().text(Ew(t.b,a)),t.b==t?$.Cw(t):(Lw(t),$.Cw(t,[t.b])),((o=t.g("useHtml"))&&!t.b.i.O()||!Hw(t.b).parent())&&t.b.B(2),o&&lw(t.b.i),Iw(t,t.b),Bw(t,t.b,i,n,e),Jw(t.b,i,n));else if("union"==r)Aca(t,e,i,n,s,o);else if("separated"==r)for(Lw(t),o=0;o<e.length&&(a=(r=e[o]).series,$.p(a.Rk));o++)s=a.Ua(),Dw(s,r)||((r=a.Rk()).clientX=i,r.clientY=n,$.ew(s.title(),Gw(s,r)),s.Ri().text(Ew(s,r)),Hw(s).parent()||s.B(2),s.g("useHtml")&&lw(s.i),Iw(t,s),Mw(t,s,i,n,a),Jw(s,i,n))}},Jw=function(t,e,i){if(t.enabled()){$.Kw(t),Hw(t).parent()||t.B(2),Iw(t,t),t.D&&t.D.uq()&&t.D.stop(),t.W();var n=Hw(t),s=n.ia();if(t.g("selectable")&&s){n.Dd(!1);t:{if(e<(n=t.ob()).tb())if(i<n.Vb()){s=n.cb();var a=n.tb(),o=n.Vb(),r=n.Va();i-=2}else i>n.Va()?(s=n.tb(),a=n.cb(),o=n.Vb(),r=n.Va(),i+=2):(s=a=n.tb()+2,o=n.Vb(),r=n.Va(),e-=2);else if(e>n.cb())i<n.Vb()?(s=n.cb(),a=n.tb(),o=n.Va(),r=n.Vb(),i-=2):i>n.Va()?(s=n.tb(),a=n.cb(),o=n.Va(),r=n.Vb(),i+=2):(s=a=n.cb()-2,o=n.Vb(),r=n.Va(),e+=2);else if(i<n.Vb())o=r=n.Vb()+2,s=n.cb(),a=n.tb(),i-=2;else{if(!(i>n.Va()))break t;o=r=n.Va()-2,s=n.tb(),a=n.cb(),i+=2}t.K=[s,o,a,r,e,i]}$.Yd(window.document,"mousemove",t.ZN,!1,t)}else s&&n.Dd(!0)}},$.Ow=function(t,e,i,n){$.Kw(t),t.b=t,n&&(n.clientX=e,n.clientY=i,$.ew(t.title(),Gw(t,n)),t.Ri().text(Ew(t,n))),t.g("useHtml")&&!t.b.i.O()&&t.b.B(2),Iw(t,t),Bw(t,t,e,i),Jw(t,e,i)},Gw=function(t,e){$.nv(e).titleText={value:t.jb.g("text"),type:"string"},$.ov(e);var i=t.g("titleFormat");return $.z(i)&&(i=$.Nu($.Lu.Id(),i)),i.call(e,e)},Ew=function(t,e,i){return $.nv(e).valuePrefix={value:t.g("valuePrefix")||"",type:"string"},$.nv(e).valuePostfix={value:t.g("valuePostfix")||"",type:"string"},$.ov(e),i=i?t.g("unionFormat"):t.g("format"),$.z(i)&&(i=$.Nu($.Lu.Id(),i)),t=t.g("maxLength"),e=i.call(e,e),Du(e,t)},Lw=function(t,e,i){if(e)return t.D&&t.D.stop(),t.remove(),!0;if(t.g("selectable")&&i){e=i.originalEvent.clientX,i=i.originalEvent.clientY;var n=t.ob().Tf(new $.gb(e,i)),s=Hw(t).ia();if(s&&!n)return $.Ld(s,"mouseleave",t.fN,!1,t),t.K=null,!1;if(Pw(t,e,i))return $.Ld(window.document,"mousemove",t.ZN,!1,t),s&&($.Ld(Hw(t).ia(),"mouseenter",t.xY,!1,t),$.Ld(Hw(t).ia(),"mouseleave",t.yY,!1,t)),!1;t.K=null}return t.g("hideDelay")?(t.uL(),t.D.uq()||t.D.start(),!1):(t.remove(),!0)},$.Kw=function(t){var e=t.Wj();t.title().Wj(e),t.$r().Wj(e),t.background().Wj(e),t.padding().Wj(e)},Hw=function(t){if(!t.Oa){t.Oa=$.ok(),$.ru(t,t.Oa);var e=t.background(),i=t.title(),n=t.$r(),s=t.Ri();e.O(t.Oa),i.O(t.Oa),n.O(t.Oa),s.O(t.Oa)}return t.Oa},$.Aw=function(t,e){return $.p(e)?(t.Ba=e,t):t.Ba},xw=function(t){return Bca&&t.g("allowLeaveStage")&&t.g("allowLeaveChart")},$.Cw=function(t,e){for(var i in e=e||[],t.o)(0,$.Qw)(e,(function(t){return String($.oa(t))==i}))||t.o[i].Lc(!0)},Rw=function(t){if(t.g("useHtml"))t.P=t.i.rb();else if(!t.P){t.Ri().ka(),t.bi(),t.Ri().da(!1);var e=t.g("width"),i=t.g("height"),n=(t.pa||$.Aw(t)).ob();e=$.L(e,n.width),i=$.L(i,n.height),n=!(0,window.isNaN)(e);var s=!(0,window.isNaN)(i),a=new $.I(0,0,0,0),o=null,r=null,l=t.title(),h=t.$r(),c=t.Ri();if(l.ka(),h.ka(),c.ka(),!n||!s){if(l.enabled()){"svg"==$.kk?l.ja(null):l.ja(t.pa&&t.pa.O()?t.pa.O().Ja().rb():null);var u=l.g("width"),d=null!=l.nd("width"),p=l.g("height"),g=null!=l.nd("height");$.uo(u)&&(o=u,n?(u=t.padding().Ng(e),l.width(u)):l.width(null)),$.uo(p)&&(r=p,s?(u=t.padding().Yh(i),l.height(u)):l.height(null)),p=l.yi(),a.width=e||Math.max(a.width,p.width),d?l.width(o):delete l.Pa.width,g?l.height(r):delete l.Pa.height,r=o=null,s||(a.height+=p.height)}if(c.enabled()){var f=(d=t.Y?t.Y.Ri():null)?d.width():void 0;d=d?d.height():void 0,c.ja(null),f=c.width()||f,d=c.height()||d,$.uo(f)&&(o=f,n?(u=t.padding().Ng(e),c.width(u)):c.width(null)),$.uo(d)&&(r=d,s?(u=t.padding().Yh(i),c.height(u)):c.height(null)),f=c.yi(),a.width=e||Math.max(a.width,f.width),o&&c.width(o),r&&c.height(r),s||(a.height+=f.height)}l.enabled()&&l.ja(new $.I(0,0,a.width,p.height)),c.enabled()&&c.ja(new $.I(0,0,a.width,f.height)),h.enabled()&&(h.ja(l.enabled()||c.enabled()?a:null),p=h.yi(),a.width=e||Math.max(a.width,p.width),s||(a.height+=p.height))}a=t.padding().NY(a),n&&(a.width=e),s&&(a.height=i),a.left=0,a.top=0,t.P=a,l.da(!1),h.da(!1),c.da(!1)}},Sw=function(t){if(Rw(t),!t.G){var e=t.g("anchor"),i=t.g("useHtml"),n=i?0:t.g("offsetX"),s=i?0:t.g("offsetY");i=i?$.Uf(t.i.Ya(),"margin"):new $.kb(0,0,0,0);var a=t.g("x"),o=t.g("y");a=new $.gb(a,o),$.Yo(a,e,n+i.left,s+i.top),e=$.Eo(t.P,e),a.x-=e.x,a.y-=e.y,t.G=a}},Mw=function(t,e,i,n,s){var a=i,o=n,r=t.g("positionMode")||"float",l=t.g("displayMode"),h=(t.ya()||$.Aw(t)).ob(),c=t.Ba.O().Ja(),u=c.rb();c=$.Zj(c);var d=xw(e);"float"==r?(a=d?i:i-c.x,o=d?n:n-c.y):"point"==r?(t="union"==l?t.g("position"):e.g("position"),t=s.Bh(t,!0).value,a=d?t.x+c.x:t.x,o=d?t.y+c.y:t.y):"chart"==r&&(a=t.ya().ob(),t="union"==l?t.g("position"):e.g("position"),a=(t=$.Eo(a,t)).x+(d?c.x:0),o=t.y+(d?c.y:0)),yw(e,a,o,c,u,h)},Tw=function(t){var e=null;return $.Aw(t)?e=$.Aw(t).O():t.ya()?e=t.ya().O():t.parent()&&(t=zw(t),$.Aw(t)?e=$.Aw(t).O():t.ya()&&(e=t.ya().O())),e},zw=function(t){for(;t.parent();)t=t.parent();return t},Iw=function(t,e){if(e.J(2))if(xw(e)||"vml"==$.kk){if(e.g("useHtml"))e.i.O($.Lp.body);else{var i=rw.Id();t.f&&t.f.NA()&&e.f.O(null),e.f=i,e.f.O(window.document.body),e.O(i.b),Hw(e).parent(e.O())}e.I(2)}else if(i=Tw(e)){var n=i.Ja().Tl();if(e.g("useHtml"))e.i.O(n);else{var s=Uw(e);(i=Vw[s])||(i=new mw,Vw[s]=i),e.f=i,Hw(e).parent(e.O()),i.O(n),e.O(i.b)}e.I(2)}},Pw=function(t,e,i){if(!t.K)return!1;var n=t.K[0],s=t.K[1],a=t.K[2],o=t.K[3],r=t.K[4],l=t.K[5];return t=$.cn(a,o,r,l,e,i),r=$.cn(r,l,n,s,e,i),$.cn(n,s,a,o,e,i)==t&&t==r},Uw=function(t){return t=Tw(t).Ja(),"stg"+$.oa(t)},$.Ww=function(){tv.call(this),this.Ga($.ur.legend),this.ba=this.Ub=null,this.Za=window.NaN,this.$a=!0,this.B(4294967295),$.su(this,this,null,null,null,null,this.Eaa,null),$.T(this.ua,[["inverted",16,1],["itemsLayout",4,9],["iconSize",4,9,0,function(){if(null!=this.Ub)for(var t=0,e=this.Ub.length;t<e;t++)this.Ub[t].kw(this.g("iconSize"))}],["width",68,9],["height",68,9],["maxWidth",68,9],["maxHeight",68,9],["position",0,0,0,function(){var t=this.g("position");$.C(t)?this.T5(t):(this.EW=!1,this.DW=null,this.FG=!1),this.B(4,9)}],["positionMode",0,0,0,function(){this.FG=!1,this.g("drag")?this.B(2048,9):this.va(8)}],["align",4,9,0,function(){this.FG=!1}],["drag",2048,1],["itemsFormat",1040,1],["titleFormat",132,9],["itemsSpacing",4,9],["itemsHAlign",16,1],["itemsSourceMode",1040,1],["hoverCursor",16,1,0,function(){if(null!=this.Ub)for(var t=0,e=this.Ub.length;t<e;t++)this.Ub[t].dV(this.V2)}],["iconTextSpacing",4,9,0,function(){if(null!=this.Ub)for(var t=0,e=this.Ub.length;t<e;t++)this.Ub[t].iconTextSpacing(this.g("iconTextSpacing"))}]])},Xw=function(t,e){if(!t.f||!e||t.f.length!=e.length)return!1;for(var i=0;i<e.length;i++)if(t.f[i]!=e[i])return!1;return!0},Yw=function(t,e){var i=t.Ua();if(i.enabled()){var n=e.itemIndex,s=t.Ub[n];s&&e&&(n={value:{value:s.g("text"),type:"string"},iconType:{value:s.g("iconType"),type:"string"},iconStroke:{value:s.g("iconStroke"),type:""},iconFill:{value:s.g("iconFill"),type:""},iconHatchFill:{value:s.g("iconHatchFill"),type:""},iconMarkerType:{value:s.iw(),type:"string"},iconMarkerStroke:{value:s.hu(),type:""},iconMarkerFill:{value:s.gu(),type:""},meta:{value:t.ud[n],type:""}},n=new $.Fw(n),$.Ow(i,e.clientX,e.clientY,$.ov(n)))}},Cca=function(t,e,i){if(null==t.Ub)return $.kn(0,0,0,0);for(var n,s,a=0,o=-Number.MAX_VALUE,r=0,l=-Number.MAX_VALUE,h=0,c=0,u=0,d=0,p=1,g=0,f=0,m=t.g("itemsLayout"),v=t.g("itemsSpacing"),b=0,y=t.Ub.length;b<y;b++)b in t.G||(a+=(n=(s=t.Ub[b].ob()).width)+v,o=Math.max(o,n),r+=(s=s.height)+v,l=Math.max(l,s),"horizontal-expandable"==m?c+n>e?(g=Math.max(g,c),f+=h,c=n+v,h=s+v):(c+=n+v,h=Math.max(h,s+v)):"vertical-expandable"==m&&(u+s>i?(f=Math.max(f,u),g+=d,p++,d=n+v,u=s+v):(u+=s+v,d=Math.max(d,n+v))));return!a||0>o?o=a=0:a-=v,!r||0>l?l=r=0:r-=v,t.me=p,"vertical"==m?$.kn(0,0,Math.max(0,o),Math.max(0,r)):"horizontal"==m?$.kn(0,0,Math.max(0,a),Math.max(0,l)):"vertical-expandable"==m?(f=Math.max(f,u)-v,$.kn(0,0,Math.max(0,g+(d-v)),Math.max(0,f))):"horizontal-expandable"==m?(g=Math.max(g,c)-v,$.kn(0,0,Math.max(0,g),Math.max(0,f+(h-v)))):$.kn(0,0,0,0)},Dca=function(t){if($.A(t.Ka))return t.Ka;if(null!=t.f){for(var e,i=[],n=0;n<t.f.length;n++)if(null!==(e=t.f[n])&&$.D(e.Ol)){var s=t.g("itemsFormat");$.z(s)&&(s=$.Nu($.Lu.Id(),s)),i=$.Ga(i,e.Ol(t.g("itemsSourceMode"),s))}return i}return[]},Eca=function(t,e){if(!$.A(e))return[];for(var i,n=[],s=t.$d(),a=0;a<e.length;a++)(0,window.isNaN)(e[a].iconSize)&&(e[a].iconSize=t.g("iconSize")),i={iconTextSpacing:t.g("iconTextSpacing"),iconSize:t.g("iconSize"),hoverCursor:t.g("hoverCursor")},$.Sc(i,s,e[a]),n.push(i);return n},Fca=function(t,e){var i;if(t.Ub||(t.o=[],t.Ub=[]),t.G={},!t.$a&&t.Ub){var n=0;for(i=e.length;n<i;n++){$.p(e[n].enabled)&&!e[n].enabled&&(t.G[n]=!0);for(var s=0;s<t.Ub.length;s++){var a=t.Ub[s],o=a.vJ(),r=a.Ki();if($.p(o)&&$.p(r)&&o==e[n].sourceUid&&r==e[n].sourceKey){a.clear(),a.N(e[n]),Dv(a,a.za,void 0),s=t.g("inverted")?e.length-1-n:n,a.wb.tag={index:s};break}}}}else if(e&&0<e.length)for($.Zw(t),t.ud=[],n=0;n<e.length;n++){$.p(e[n].enabled)&&!e[n].enabled&&(t.G[n]=!0);t:{for(a=t,i=e[n],s=0,o=a.o.length;s<o;s++)if((r=a.o[s]).Mja==i.sourceUid&&r.Lja==i.sourceKey){$.Ca(a.o,s,1),a=r;break t}(i=a.o.pop())||(i=new zv).Ga(a.oa,"defaultFontSettings"),a=i}a.O(t.ba),e[n].enabled=!1,a.N(e[n]),a.ph("text")||(a.Pa.text="Legend Item"),a.bi(a.Rh(),!0),i=t.g("inverted")?e.length-1-n:n,a.wb.tag={index:i},t.Ub.push(a),t.ud.push(e[n].meta?e[n].meta:{})}else $.Zw(t);for(n=0;n<t.Ub.length;n++)i=(a=t.Ub[n]).$d(),i=Bp(i),(s=Fv(a))||(s=t.P.Vx(),t.D.appendChild(s),Fv(a,s)),s.style.cssText=i,s.textContent=a.text();for((n=Tv(t.WI()))||(n=t.P.Vx(),t.D.appendChild(n),Tv(t.K,n)),i=t.WI().$d(),i=Bp(i),n.style.cssText=i,n=0;n<t.Ub.length;n++)a=t.Ub[n],i=(s=Fv(a)).getBBox(),i=new $.I(i.x,i.y,i.width,i.height),$.p(i)&&(a.YW=i);t.$a=!1,t.B(4)},$.Zw=function(t){for(var e=0,i=t.Ub.length;e<i;e++)t.o.push(t.Ub[e].clear());t.Ub.length=0},Gca=function(t){if(null!=t.Za&&!(0,window.isNaN)(t.Za)&&(t=t.b[t.Za]))for(var e=0;e<t.length;e++)t[e].enabled(!1).W()},$w=function(t,e,i,n){t.B(4),t.ka().ja(n).x(e).y(i).enabled(!0).da(!1).W()},Hca=function(t,e,i){if(null!=t.Ub){t.ba.oc(1,0,0,1,0,0);var n=t.b[e],s=t.g("itemsLayout");if(n)switch(s){case"horizontal":switch(t.g("itemsHAlign")){case"left":case"start":s=0;for(var a=t.g("itemsSpacing"),o=0;o<n.length;o++){var r=n[o];$w(r,s,0,i),s+=r.ob().zd()+a}break;case"right":case"end":for(s=t.g("itemsSpacing"),a=i.width,o=n.length-1;0<=o;o--)a-=(r=n[o]).ob().zd()+s,$w(r,a,0,i);break;case"center":for(s=t.g("itemsSpacing"),a=o=0;a<n.length;a++)o+=n[a].ob().zd()+s;for(r=(i.width-(o-s))/2,a=0;a<n.length;a++)o=n[a],$w(o,r,0,i),r+=o.ob().zd()+s}break;case"vertical":for(s=0,a=t.g("itemsSpacing"),o=0;o<n.length;o++)r=n[o],$w(r,0,s,i),s+=r.ob().qd()+a;break;case"horizontal-expandable":o=a=s=0,r=t.g("itemsSpacing");for(var l=0;l<n.length;l++){var h=n[l],c=h.ob();s+c.zd()>i.width&&(a+=o,o=s=0),$w(h,s,a,i),s+=h.ob().zd()+r,o=Math.max(o,c.qd()+r)}break;case"vertical-expandable":for(o=a=s=0,r=t.g("itemsSpacing"),l=0;l<n.length;l++)a+(c=(h=n[l]).ob()).qd()>i.height&&(s+=o,o=a=0),$w(h,s,a,i),a+=h.ob().qd()+r,o=Math.max(o,c.zd()+r)}(i=$.wr(t,"title"))&&i.enabled()&&"top"!=(i=i.g("orientation")||$.dw(i))&&"bottom"!=i&&(n=i=0,(s=t.Na.Pd)&&(i=s.Jd,n=s.Fd),(s=t.jb.yi()).top+=n,s.left+=i)}t.Za=e},ax=function(t,e){var i=$.N(e.itemIndex);if((0,window.isNaN)(i))return null;var n=e.type;switch(n){case"mouseout":n="legenditemmouseout";break;case"mouseover":n="legenditemmouseover";break;case"mousemove":n="legenditemmousemove";break;case"mousedown":n="legenditemmousedown";break;case"mouseup":n="legenditemmouseup";break;case"click":n="legenditemclick";break;case"dblclick":n="legenditemdblclick";break;default:return null}i=t.g("inverted")?t.Ub.length-1-i:i;var s=null,a=window.NaN,o=t.Ub[i];if(o&&t.f)for(var r=0;r<t.f.length;r++){var l=t.f[r];if($.oa(l)==o.vJ()&&$.D(l.Ms)&&l.Ms(t.g("itemsSourceMode"))){s=l,a=o.Ki();break}}return{type:n,itemIndex:i,itemSource:s,itemIndexInSource:a,target:t,originalEvent:e}},bx=function(){$.Ww.call(this)},$.cx=function(){$.V.call(this),$.T(this.ua,[["enabled",0,2],["duration",0,2]])},dx=function(t){$.V.call(this),this.ya=t,this.Us=null,$.T(this.ua,[["enabled",0,10],["titleFormat",0,2]])},ex=function(t,e){return $.p(e)?(t.Us!=e&&(t.Us&&$.kr(t.Us,t.PW,t),t.Us=e,$.K(t.Us,t.PW,t)),t):t.Us},fx=function(t){dx.call(this,t),this.tE=null,$.T(this.ua,[["mode",0,2]])},gx=function(t){dx.call(this,t.xc()),this.Sa=t,this.b=null},$.hx=function(t){$.V.call(this),this.Y=t,this.ua={},$.T(this.ua,[["spotRadius",0,0],["multiSelectOnClick",0,0],["unselectOnClickOutOfPoint",0,0],["hoverMode",0,2],["selectionMode",0,0],["zoomOnMouseWheel",0,0],["scrollOnMouseWheel",0,0]])},$.ix=function(t){this.target=t,this.f=[],this.b=[],this.Gc=$.gm},$.lx=function(t,e,i,n,s){if((0,window.isNaN)(i))return s;var a=$.Na(t.f,i);if(e==$.gm)0<a&&(s=$.jx(t,e,a,s));else{var o=!0,r=$.kx(t,window.NaN);0>a?($.Da(t.f,i,~a),$.Da(t.b,e,~a)):(o=!(t.b[a]&e))?t.b[a]|=e:$.p(n)&&(t.b[a]=n),t.target.enabled()&&t.target.$().select(i)&&(t.target.eh()||"single"!=t.target.Xl()||(r?t.target.ml(e):$.p(n)&&!r&&$.kx(t,window.NaN)&&t.target.ml(n)),o?s=t.target.pk(e,s):$.p(n)&&(s=t.target.pk(n,s)))}return s},$.kx=function(t,e){if($.p(e)){if((0,window.isNaN)(e))return!($.mx(t,$.wo)||t.Gc&$.wo);var i=$.nx(t,+e)}else i=t.Gc;return!(i&$.wo)},ox=function(t,e,i,n){if(!t.target.$().select(i))return n;var s=$.Na(t.f,i);return e!=$.gm&&(0>s?($.Da(t.f,i,~s),$.Da(t.b,e,~s),t.Gc==$.gm&&(n=t.target.pk(e,n)),$.kx(t,window.NaN)&&!t.target.eh()&&"single"==t.target.Xl()&&t.target.ml(e)):t.b[s]|=e),n},$.qx=function(t,e){var i,n=$.vo;if($.p(e)){if(!(e>=t.target.$().Hb())){var s=t.target.pq();if($.A(e))for($.Pa(e),i=e.length;i--;)s=ox(t,n,+e[i],s);else s=ox(t,n,+e,s);t.target.wm(s)}}else if(t.Gc&n)if(n==$.vo){for(i=t.b.length;i--;)$.px(t,n,i)&&($.Ca(t.b,i,1),$.Ca(t.f,i,1));t.Gc=$.gm}else n==$.wo&&(t.b.length=0,t.f.length=0,t.Gc=$.gm);else{for(i=t.b.length;i--;)$.px(t,n,i)&&($.Ca(t.b,i,1),$.Ca(t.f,i,1));t.Gc=n}},$.px=function(t,e,i){return!(t.b[i]&=~e)},$.jx=function(t,e,i,n){var s=t.f[i];return $.px(t,e,i)?($.Ca(t.f,i,1),$.Ca(t.b,i,1),t.target.enabled()&&t.target.$().select(s)&&t.Gc==$.gm&&(n=t.target.pk($.gm,n))):t.target.enabled()&&t.target.$().select(s)&&t.Gc==$.gm&&(n=t.target.pk(t.b[i],n)),n},$.rx=function(t,e,i,n){return(0,window.isNaN)(i)||0<=(i=$.Na(t.f,i))&&(n=$.jx(t,e,i,n)),n},$.sx=function(t,e){for(var i=[],n=0,s=t.b.length;n<s;n++)e&t.b[n]&&i.push(t.f[n]);return i},$.nx=function(t,e){var i=+e;return(0,window.isNaN)(i)?$.gm:0<=(i=$.Na(t.f,i))?t.b[i]:$.gm},$.tx=function(t,e,i){return i=$.Na(t.f,i),!!(e&t.b[i])},$.mx=function(t,e){return 0<=$.xa(t.b,(function(t){return!!(t&e)}))},$.em=function(t){return Math.min(t&($.vo|$.wo),$.wo)},$.ux=function(){this.ka(),$.Y.call(this),this.Ga("chart"),this.Wa=this.jb=this.Qc=this.lP=this.Ia=this.Na=null,this.sv=[],this.Jx=!0,this.jl=this.iL=this.fv=null,this.VR=!1,this.Mh=this.oi=0,this.kn={},this.sm=null,this.Ax=!1,this.Hn=this.Ts=this.Js=null,this.nB=!1,this.he=null,this.B(4294967295),$.T(this.ua,[["selectRectangleMarqueeFill",0,0,0,function(){this.jN()&&this.Hn.fill(this.g("selectRectangleMarqueeFill"))}],["selectRectangleMarqueeStroke",0,0,0,function(){this.jN()&&this.Hn.stroke(this.g("selectRectangleMarqueeStroke"))}]]),this.da(!1)},Ica=function(t){switch(t.Ma().toLowerCase()){case"map":return"map";case"gantt-resource":case"gantt-project":return"gantt";case"circular-gauge":case"linear-gauge":case"thermometer":case"tank":case"led":return"gauge";default:return"chart"}},$.vx=function(t,e){e?(t.Ts||(t.Ts=$.mk(0,0,0,0),t.Ts.zIndex(1e4)),t.Ts.Dd(!1),t.Ts.cursor("wait"),t.Ts.fill($.bm),t.Ts.stroke(null),t.Ts.Qf(t.ob()),t.Ts.parent(t.O())):t.Ts&&t.Ts.remove()},$.xx=function(t,e,i,n,s,a,o,r,l,h){return!!t.Na&&(wx(t),t.qN=!!h,t.yV=!1,t.Js=s?$.Ga(s):[t.dg()],t.g3=!1,t.DV=e,t.BV=i,t.CV=n,t.i3=!!o,t.Hn||(t.Hn=$.mk(0,0,0,0),t.Hn.zIndex(10001),t.Hn.Dd(!0)),t.Hn.stroke(r||"3 red"),t.Hn.fill(l||"red 0.5"),e=t.Na,t.AV=e,t.zV=a||null,t.lu=new nf(t),t.zV&&(t.lu.wa(e,"mouseover",t.rN,!0),t.lu.wa(window.document,"mousemove",t.rN,!0),t.lu.wa(window.document,"touchmove",t.rN,!0),t.lu.wa(e,"mouseout",t.rN,!0)),t.lu.wa(e,"touchstart",t.h3,!0),t.lu.wa(e,"mousedown",t.h3,!0),!0)},wx=function(t){t.Js&&(t.qN=!1,t.i3=!1,t.yV=!1,t.g3&&$.vx(t,!1),t.g3=!1,t.DV=t.BV=t.CV=null,t.Hn&&t.Hn.parent(null),t.zV=null,$.sd(t.Hy,t.lu),t.Js=t.Hy=t.lu=null,t.AV.cursor(null),t.AV=null)},yx=function(t,e,i){if(t.Js&&t.O()){var n=$.Zj(t.O().Ja());for(e-=n.x,i-=n.y,n=0;n<t.Js.length;n++){var s=t.Js[n];if(s&&s.left<e&&e<s.left+s.width&&s.top<i&&i<s.top+s.height)return n+1}}return 0},zx=function(t){$.ag.call(this,t.ia()),$.Yd(this.D,["touchstart","mousedown"],this.lk,!1,this)},$.Ax=function(t){var e,i=t.m2(),n={},s=0,a=1<i.length;for(a&&(n["#"]=s++),e=0;e<i.length;e++)s=i[e].wO(n,s);var o=[];for(r in n)o[n[r]]=r;var r=[];for(e=0;e<i.length;e++)for(var l=i[e],h=0,c=l.Hb();h<c;h++){var u=Array(s);t.VW(u,l.En(h),n),a&&(u[0]=e),r.push(u)}return{headers:o,data:r}},$.Bx=function(){this.Bi=null,$.ux.call(this),this.DP()&&$.su(this,this,this.If,this.hg,null,this.If,null,this.Sj)},Cx=function(t,e){var i=t.eg();i.ka(),!i.O()&&i.enabled()&&i.O(t.Na),i.ja(e),i.RA()||i.RA(t),i.da(!1),i.B(16),t.J(512)&&i.B(1024),i.W(),i=i.yd(),$.nb(t.qha,i)||$.nb(e,i)||(t.qha=i,t.B(4)),t.I(512)},$.Dx=function(){$.qf.call(this),this.state=this.mL=this.Jj=null},$.Ex=function(t,e){$.qf.call(this),this.Ed=t;var i=$.af(this.Ed)?this.Ed:this.Ed?this.Ed.body:null;this.D=!!i&&$.Qf(i),this.f=$.Ld(this.Ed,$.gd?"DOMMouseScroll":"mousewheel",this,e)},Fx=function(t){return $.xd&&($.Ad||Jca)&&0!=t%40?t:t/40},Gx=function(t,e,i,n){$.Bd.call(this,e),this.type="mousewheel",this.detail=t,this.deltaX=i,this.deltaY=n},$.Hx=function(t){$.V.call(this),this.Ia=this.Wa=this.Y=this.Xb=this.b=null,$.oa(this),this.f=0,$.T(this.ua,[["format",0,8,0,this.Ug],["maxLength",0,8,0,this.Ug],["adjustFontSize",0,0],["fontVariant",0,8,0,this.Ug],["letterSpacing",0,8,0,this.Ug],["textDirection",0,0],["textIndent",0,8,0,this.Ug],["textOverflow",0,1,0,this.Ug],["useHtml",0,8,0,this.Ug],["wordBreak",0,8,0,this.Ug],["wordWrap",0,8,0,this.Ug],["fontColor",0,1,0,this.Ug],["fontDecoration",0,8,0,this.Ug],["fontFamily",0,8,0,this.Ug],["fontOpacity",0,1,0,this.Ug],["fontSize",0,8,0,this.Ug],["fontStyle",0,8,0,this.Ug],["fontWeight",0,8,0,this.Ug],["hAlign",0,8,0,this.Ug],["lineHeight",0,8,0,this.Ug],["maxFontSize",0,0],["minFontSize",0,0],["vAlign",0,1,0,this.Ug],["textShadow",0,1,0,this.Ug],["anchor",0,1,0,this.Ug],["height",0,8,0,this.Ug],["offsetX",0,2,0],["offsetY",0,2,0],["position",0,3,0,this.Ug],["rotation",0,8,0,this.Ug],["width",0,8,0,this.Ug],["allowMultiline",0,8,0,this.Ug],["zIndex",0,0],["clip",0,0],["enabled",0,32768,0,this.Ug],["selectable",0,1,0,this.Ug],["disablePointerEvents",0,1,0,this.Ug],["autoRotate",0,1,0,this.Ug]]),t||this.Ga("defaultSimpleLabelsSettings")},$.Ix=function(){this.P=$.mg(),this.kc="",this.f={},this.aa=11,this.ho={style:!1,text:!1,MC:!1},this.O=null,this.b=[],this.i=[],this.$a=this.ba=this.ea=this.na=!1,this.G=this.K=null,this.Ha=this.fb=0,this.Ka=null,this.Ba=""},$.Kx=function(t){t.ho.MC=!1;for(var e=0;e<t.i.length;e++){var i=t.i[e];if(i)for(var n=0;n<i.length;n++)i[n].ld();i.length=0}t.i.length=0,t.K&&(t.K.ld(),t.K=null),t.G&&(t.G.ld(),t.G=null),Jx(t),t.na=!1,t.ea=!1,t.ba=!1},Jx=function(t,e){var i,n;if(e){for(i=0;i<t.b.length;i++)(n=t.b[i])&&n.ld();t.b.length=0}else for(i=t.b.length-1;0<=i;i--)(n=t.b[i])&&(n.ho.text?(n.ld(),--t.b.length):n.style(t.f))},$.Mx=function(t){t.ho.MC||(t.ho.MC=!0,t.f.useHtml?$.Uc()?Lh(t):t.$a=!0:Lx(t))},Nx=function(t){t.D||(t.D=Hi("foreignObject"),t.Za=$.Me("div"),t.Za.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.D.appendChild(t.Za)),t.Za.innerHTML=t.kc||""},Lx=function(t){t.$a=!1;var e=t.kc.split(/\n/g),i=t.f.width,n=t.f.wordBreak,s=t.f.wordWrap;if(n&&null!=i){if("break-all"==n){if(t.ea=!0,!t.i.length)for(s=0;s<e.length;s++){i=e[s],n=[];for(var a="",o=0;o<i.length;o++)a+=i[o],n.push(Ox(t,a));t.i.push(n)}}else if(t.na=!0,!t.i.length)for(t.K=Ox(t,"W W",t.K),t.G=Ox(t,"W",t.G),i=0;i<e.length;i++){for(s=(n=e[i]).split(" "),a="",n=[],o=0;o<s.length;o++)a+=s[o],n.push(Ox(t,a)),a+=o==s.length-1?"":" ";t.i.push(n)}Jx(t,!0)}else if(null==s&&1<e.length){for(t.ba=!0,i=0;i<e.length;i++)n=e[i],t.b[i]?Ox(t,n,t.b[i]):t.b.push(Ox(t,n));for(;i<t.b.length;i++)t.b[i].ld();t.b.length=e.length}},$.Qx=function(t){if(t.$a)$.Kx(t),Jx(t,!0),$.Xe(t.Vd());else if(t.ho.MC){var e;if(t.ho.MC=!1,t.D&&($.Xe(t.D),t.D=null,t.Za=null),t.na||t.ea){for(e=0;e<t.b.length;e++){var i=t.b[e];i.Ij(),$.Px(i,t.O)}t.ia&&($.Xe(t.ia),t.O=null)}else if(t.ba){for(e=0;e<t.b.length;e++)(i=t.b[e]).Ij(),$.Px(i,t.O);t.ia&&($.Xe(t.ia),t.O=null)}}},Ox=function(t,e,i){return(i=i||new $.Ix).style(t.f),i.text(e),i.Ij(),i},$.Rx=function(t){if(t.o){for(var e=0;e<t.b.length;e++)$.Rx(t.b[e]);e=t.o.vn,t.Ka&&e&&(e.qX(t.sb),$.Lc(e.ru,t.Ka),$.Xe($.ze(window.document,t.Ka)),t.Ka=null)}},Sx=function(t,e){if(t.o){var i=t.Vd();if(t.f.textOverflow){$.Rx(t),t.sb=$.Ji(t.o.vn,Cp(1,t.f.fontOpacity,t.f.fontColor||"black"),void 0,void 0,e);var n="url("+Li()+"#";t.Ka=Ki(t.P,t.sb,t.o.vn,e),i.setAttribute("fill",n+t.Ka+")")}else i.setAttribute("fill",t.f.fontColor)}},$.Px=function(t,e,i){var n,s;if(t.$a)t.O!=e&&((t.O=e)?(Nx(t),e.appendChild(t.D)):t.D&&$.Xe(t.D));else if(t.na||t.ea){var a=xl($.vl);for(t.O=e,t.G&&$.Px(t.G,a),t.K&&$.Px(t.K,a),n=0;n<t.i.length;n++)if(s=t.i[n])for(var o=0;o<s.length;o++)$.Px(s[o],a,i);for(n=0;n<t.b.length;n++)(s=t.b[n])&&$.Px(s,e,i)}else if(t.ba)for(t.O=e,n=0;n<t.b.length;n++)(s=t.b[n])&&$.Px(s,e,i);else t.O!=e&&(t.O=e,t=t.Vd(),e?e.appendChild(t):$.Xe(t))},$.Wx=function(t,e,i){if($.p(i)&&(t.o=i),t.$a){Nx(t),t.D.setAttribute("x",e.left),t.D.setAttribute("y",e.top),t.D.setAttribute("width",e.width),t.D.setAttribute("height",e.height),i=e.width,e=e.height;var n=t.f,s="display: table-cell; ";if("fontStyle"in n&&(s+="font-style: "+n.fontStyle+"; "),"fontVariant"in n&&(s+="font-variant: "+n.fontVariant+"; "),"fontFamily"in n&&(s+="font-family: "+n.fontFamily+"; "),"fontSize"in n){var a=(0,window.parseFloat)(n.fontSize);s+="font-size: "+(a=(0,window.isNaN)(a)?13:a)+"px; "}"fontWeight"in n&&(s+="font-weight: "+n.fontWeight+"; "),"letterSpacing"in n&&(s+="letter-spacing: "+n.letterSpacing+"; "),"fontDecoration"in n&&(s+="text-decoration: "+n.fontDecoration+"; "),"fontColor"in n&&(s+="color: "+n.fontColor+"; "),"vAlign"in n&&(s+="vertical-align: "+n.vAlign+"; "),"hAlign"in n&&(s+="text-align: "+n.hAlign+"; "),"wordBreak"in n&&n.wordBreak&&(s+="word-break: "+n.wordBreak+"; "),"textShadow"in n&&"none"!=n.textShadow&&(s+="text-shadow: "+n.textShadow+"; "),t.Za.setAttribute("style",s+"width: "+i+"px; height: "+e+"px; max-width: "+i+"px; max-height: "+e+"px;")}else if(!t.f.textOverflow||t.f.textOverflow&&1<=e.width)if(t.ea)Tx(t,e);else if(t.na)Tx(t,e,!0);else if(t.ba)Ux(t,e);else{Jx(t,!0),i=t.Vd(),a=null!=t.f.height;var o=null!=t.f.width,r=t.height(),l=t.f.anchor,h=t.f.position;switch(n="top",s="left",o&&t.f.hAlign&&(s=t.f.hAlign),a&&t.f.vAlign&&(n=t.f.vAlign),a=(o=Vx(e,r,h,l)).left,o=o.top,o+=t.aa,n){case"middle":o=Math.max(o,e.top+e.height/2+t.aa/2);break;case"bottom":o=Math.max(o,e.top+e.height-t.Ha+t.aa)}switch(s){case"right":a=Math.max(a,a+e.width-t.Ta.width);break;case"center":a=Math.max(a,a+e.width/2-t.Ta.width/2)}Sx(t,e),i.setAttribute("x",a),i.setAttribute("y",o)}else $.Px(t,null)},Tx=function(t,e,i){var n=$.L(t.f.width,e.width);Jx(t,!0),t.ho.MC=!0,t.Ta.width=0,t.Ta.height=0;for(var s,a,o=i?t.fb:0,r=0;r<t.i.length;r++){for(var l,h=t.i[r],c=0,u=0,d="",p=0;p<h.length;p++)if((a=(s=h[p]).Ta).width-u-o>n){l=p?h[p-1]:s,s=new $.Ix;var g=l.kc.replace(d,"");d=l.kc+(i?" ":""),s.text(g),s.style(t.f),u=l.width(),g=new $.I(a.left,a.top,u-c,a.height),c=u+=+o,s.Ta=g,s.fb=o,s.o=t.o,t.b.push(s),t.Ta.width=Math.max(t.Ta.width,g.width),t.Ta.height+=g.height}(s=h[h.length-1])&&1<=h.length&&s!=l&&(g=s.kc.replace(d,""),a=s.Ta,h=new $.I(a.left,a.top,a.width-u,a.height),t.Ta.width=Math.max(t.Ta.width,h.width),t.Ta.height+=h.height,(s=new $.Ix).text(g),s.Ta=h,s.style(t.f),s.o=t.o,t.b.push(s))}Ux(t,e)},Ux=function(t,e){var i,n=0;for(i=0;i<t.b.length;i++){var s=t.b[i];s.o=t.o,n+=s.height()}var a=null!=t.f.height,o="top";i="left",null!=t.f.width&&t.f.hAlign&&(i=t.f.hAlign),a&&t.f.vAlign&&(o=t.f.vAlign),s=Vx(e,n,t.f.position,t.f.anchor);var r=a?$.L(t.f.height,e.height):e.height,l=s.top;switch("middle"==o?l=Math.max(l,e.top+r/2-n/2):"bottom"==o&&(l=Math.max(l,e.top+r-n)),n=l,o=s.left,i){case $.Ph:case"left":for(i=0;i<t.b.length;i++)s=t.b[i],n=Xx(s,o,r=n-l,e,a,!i,n);break;case"center":for(i=0;i<t.b.length;i++)s=t.b[i],r=n-l,o=Math.max(e.left,e.left+e.width/2-s.Ta.width/2),n=Xx(s,o,r,e,a,!i,n);break;case"end":case"right":for(i=0;i<t.b.length;i++)s=t.b[i],r=n-l,o=Math.max(e.left,e.left+e.width-s.Ta.width),n=Xx(s,o,r,e,a,!i,n)}},Xx=function(t,e,i,n,s,a,o){var r=t.Vd(),l=t.height();return i+=l,Sx(t,n),s&&i<=n.height||!s||a?(r.setAttribute("x",e+"px"),r.setAttribute("y",o+t.aa),o+=l):(r.setAttribute("x","-99999px"),r.setAttribute("y","-99999px")),o},$.Yx=function(t){var e,i;if(t.Ta=new $.I(0,0,0,0),t.ea)for(e=0;e<t.i.length;e++){var n=t.i[e];for(i=0;i<n.length;i++)$.Yx(n[i])}else if(t.na)for($.Yx(t.K),$.Yx(t.G),t.fb=t.K.Ta.width-2*t.G.Ta.width,e=0;e<t.i.length;e++)for(n=t.i[e],i=0;i<n.length;i++)$.Yx(n[i]);else if(t.ba)for(e=0;e<t.b.length;e++)i=t.b[e],$.Yx(i),t.Ta.width=Math.max(t.Ta.width,i.Ta.width),t.Ta.height+=i.height();else e=t.Vd().getBBox(),t.Ta.left=e.x,t.Ta.top=-e.y,t.Ta.width=e.width,t.Ta.height=t.Ha},Vx=function(t,e,i,n){return $.fc(n,"center")?t.top-=e/2:$.fc(n,"bottom")&&(t.top-=e),{left:(t=$.Eo(t,i)).x,top:t.y}},$.Zx=function(t){$.Pu.call(this,t),$.Aa(this.TX,"autoRotate")||this.TX.push("autoRotate"),$.T(this.ua,[["autoRotate",4,9]])},$.$x=function(){$.Tu.call(this),$.T(this.ua,[["autoRotate",16,9]])},$.dy=function(t,e,i){this.ka(),$.Y.call(this),i||(this.WC=this.Ga($.ur.markersFactory)),delete this.oa.enabled,this.wv=!!e,this.K=!t,this.o=this.wb=null,this.b={},$.T(this.ua,[["position",4,9],["offsetY",4,9],["offsetX",4,9],["fill",16,1],["stroke",16,1,0],["positionFormatter",4,9],["anchor",4,9],["size",4,9],["rotation",4,9],["type",4,9]]),this.B(4294967295),this.da(!0)},$.ey=function(){$.Y.call(this),delete this.oa.enabled,this.f={},$.T(this.ua,[["position",4,9],["offsetY",4,9],["offsetX",4,9],["fill",16,1],["stroke",16,1],["positionFormatter",4,9],["anchor",4,9],["size",4,9],["rotation",4,9],["type",16,1]]),this.Hi()},$.fy=function(t,e){return null!=e?(t.i!=e&&(t.i=e,t.B(16,1)),t):t.i},$.gy=function(t,e){return $.p(e)?(t.K!=e&&(t.K=e,t.B(16,1)),t):t.K},hy=function(t,e,i,n,s,a){return $.gy(t)&&$.fy(t)!=$.gy(t)?$.p(i)?i:a?s:$.p(e)?e:n:$.p(e)?e:n},iy=function(){$.dy.call(this)},jy=function(){$.ey.call(this)},ky=function(){$.V.call(this),this.Xb=this.Y=null,this.I(4294967295),$.T(this.ua,[["stroke",0,1],["fill",0,1],["width",0,1],["offset",0,1],["enabled",0,1]])},ly=function(){$.V.call(this),$.T(this.ua,[["stroke",16,1],["length",16,1]])},$.my=function(t,e,i,n){if($.V.call(this),this.Yj=t,this.ua=e,this.aa=i,$.p(n)){for(var s in t={},this.fC)t[s]=this.fC[s];n=$.sq(t,n),this.fC=t,$.U(this,n,!0)}},$.ny=function(){return new $.Pu},$.oy=function(){return new $.Pu(!0)},$.py=function(){return new $.Zx(!0)},$.qy=function(){return new $.dy},$.ry=function(){return new $.dy(void 0,void 0,!0)},Kca=function(){return new ky},$.sy=function(t){$.K(t,this.de,this),t.kb(this)},Lca=function(t){$.K(t,this.Nga,this),t.kb(this)},$.ty=function(t){$.K(t,this.Mn,this),t.kb(this)},Mca=function(t){$.K(t,this.tja,this),t.kb(this)},Nca=function(t){$.K(t,this.vg,this)},$.uy=function(t,e){for(var i=0;i<e.length;i++)$.tq.apply(null,$.Ga(t.ua,e[i]))},vy=function(t){"object"!=$.ka(t)||"enabled"in t||(t.enabled=!0)},wy=function(t){var e,i={labels:t.Da,minLabels:t.o,maxLabels:t.f,headers:t.i,lowerLabels:t.K,markers:t.Bc,outlierMarkers:t.D,outline:t.G,connector:t.b,background:t.Ia};for(e in i){var n=i[e];n&&n.df&&(n.df(),n.WC.length&&n.Ga.apply(n,n.WC),$.W(t,e,n))}},$.xy=function(t,e){e?t.setAttribute("role",e):t.removeAttribute("role")},$.zy=function(t,e,i){$.A(i)&&(i=i.join(" "));var n="aria-"+e;""===i||null==i?(yy||(yy={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"}),e in(i=yy)?t.setAttribute(n,i[e]):t.removeAttribute(n)):t.setAttribute(n,i)},$.Ay=function(){},$.By=function(t){$.qf.call(this),this.f=t||$.ye(),this.$a=Oca,this.he=null,this.xf=!1,this.Ed=null,this.G=void 0,this.D=this.o=this.Y=this.dh=null,this.fb=!1},$.Cy=function(t,e){switch(t){case 1:return e?"disable":"enable";case 2:return e?"highlight":"unhighlight";case 4:return e?"activate":"deactivate";case 8:return e?"select":"unselect";case 16:return e?"check":"uncheck";case 32:return e?"focus":"blur";case 64:return e?"open":"close"}throw Error("Invalid component state")},$.Dy=function(t){return t.G||(t.G=new nf(t)),t.G},$.Ey=function(t){return null==t.$a&&(t.$a=$.Qf(t.xf?t.Ed:t.f.b.body)),t.$a},$.Fy=function(t){return t.o?t.o.length:0},$.Gy=function(t,e){if(t.D&&e){var i=t.D;i=(null!==i&&e in i?i[e]:void 0)||null}else i=null;return i},$.Hy=function(t,e){$.By.call(this,e),this.i=t||""},$.Jy=function(){return null!=Iy||(Iy="placeholder"in $.Re(window.document,"INPUT")),Iy},Ky=function(t){!t.K&&t.Qg&&t.Ya().form&&(t.Qg.wa(t.Ya().form,"submit",t.tga),t.K=!0)},$.Ly=function(t){return!!t.Ya()&&""!=t.Ya().value&&t.Ya().value!=t.i},$.My=function(t,e){null!=t.Ut&&(t.Ut=e),t.Ya().value=e,t.fo()},$.Ny=function(){$.Y.call(this),this.pa=this.b=this.o=null,this.i=!1,$.su(this,this),$.T(this.ua,[["scaleRangeMode",4,4]])},$.Py=function(t){var e=t.scale();if(e){var i=$.Oy(t);i.clear();var n=t.g("to"),s=t.g("from"),a=e.transform(s),o=e.transform(n);a>o&&(n=t.g("from"),s=t.g("to")),a=e.transform(s,0),e=e.transform(n,1),s=Math.min(e,a);var r=Math.max(e,a);(0,window.isNaN)(s)||(0,window.isNaN)(r)||!(0<=r&&1>=s||t.i)||(t.i||(s=$.Za(s,0,1),r=$.Za(r,0,1)),e=t.ja(),n=t.Qp(),t.Nb()?(a=Math.floor(e.Va()-e.height*r),s=Math.ceil(e.Va()-e.height*s),o=e.tb(),r=e.cb(),i.moveTo(o,a).lineTo(r,a).lineTo(r,s).lineTo(o,s).close()):(a=e.Va(),o=e.Vb(),s=Math.floor(e.tb()+e.width*s),r=Math.ceil(e.tb()+e.width*r),i.moveTo(s,a).lineTo(s,o).lineTo(r,o).lineTo(r,a).close()),t.i||i.clip(n.Ej(e)))}else $.il(2)},$.Oy=function(t){return t.D||(t.D=$.qk(),$.ru(t,t.D)),t.D},$.Qy=function(){$.Y.call(this),$.T(this.ua,[["stroke",0,1],["length",0,9],["position",0,9]]),this.path=$.qk(),$.ru(this,this.path)},$.Ry=function(t){if(!t.ep)switch(t.vh){case"top":t.ep=t.h1;break;case"right":t.ep=t.nT;break;case"bottom":t.ep=t.hT;break;case"left":t.ep=t.lT}return t.ep},$.Sy=function(){this.ka(),$.Y.call(this),this.Ga($.ur.axis),this.ci=[],this.Fk=[],this.Nd={},this.Nd.orientation="top",this.se=980,$.T(this.ua,[["width",this.se,9],["drawFirstLabel",this.se,9,0,function(){this.ae(),this.ns()},this],["drawLastLabel",this.se,9,0,function(){this.ae(),this.ns()},this],["staggerMode",this.se,9,0,this.ae,this],["overlapMode",this.se,9],["staggerMaxLines",0,0,0,function(){this.ae(),this.ns(),this.g("staggerMode")&&this.B(this.se,9)},this],["staggerLines",0,0,0,function(){this.ae(),this.ns(),this.g("staggerMode")&&this.B(this.se,9)},this],["orientation",this.se,9,0,this.ns,this],["stroke",this.se,9],["value",this.se,9,void 0,function(){null===this.g("value")?this.zh=void 0:this.zh=25,this.B(8)},this]]),this.da(!1)},$.Ty=function(t,e){if($.p(e)){var i=t.g("orientation")!=e;t.Nd.orientation=e,i&&t.B(t.se)}},Vy=function(t,e){var i=t.labels().enabled(),n=t.qb().enabled(),s=t.g("staggerMode");if(i||n)if(s)if(t.na)i=t.na;else if(s=t.labels(),(i=t.scale())&&s.enabled()){t.AJ=1,t.G=1,n=(i=i.Xa().get()).length;for(var a,o,r,l,h=0;h<n;h++)t.be(h,!0,i,e);s=s.g("position");var c=t.UH&&0>$.Ho(s)?t.UH:null,u=t.g("staggerMaxLines"),d=t.g("staggerLines"),p=t.g("drawFirstLabel"),g=t.g("drawLastLabel");for(s=[],h=0;h<n;h++)!h&&!p||h==n-1&&!g?s[h]=!1:(o=t.rd(h,!0,i,e),s[h]=!c||!Uy(t,c,o));if(null===d){var f=!1;for(h=1;!f&&h<=n;)for(f=!0,o=0;o<h;o++){for(a=o;a<n-h;a+=h){r=t.rd(a,!0,i,e);var m=t.rd(a+h,!0,i,e);if(s[a]&&$.bn(r,m)){f=!1,h++;break}}if(!f)break}t.AJ=f?h:n,t.G=null!==u&&t.AJ>u?u:t.AJ}else t.G=d;if((null!==d||null!==u&&t.AJ>u)&&"no-overlap"==t.g("overlapMode")){for(a=0;a<t.G;a++)for(u=-1,h=a;h<n;h+=t.G)r=t.rd(h,!0,i,e),m=-1!=u?t.rd(u,!0,i,e):null,l=h!=n-1&&t.g("drawLastLabel")?t.rd(n-1,!0,i,e):null,o=!c||!Uy(t,c,r),h?h==n-1?g&&o?(u=h,s[h]=!0):s[h]=!1:!o||$.bn(r,m)||$.bn(r,l)?s[h]=!1:(u=h,s[h]=!0):p&&o?(u=h,s[h]=!0):s[h]=!1;p||(s[0]=!1),g||(s[s.length-1]=!1)}for(m={labels:s,qb:!1},t.aa=[],t.ba=[],t.o||(t.o=[]),h=o=0;h<n;h++)(!s||s&&s[h])&&(t.o[h]?l=t.o[h]:(l=t.rd(h,!0,i,e),t.o[h]=l=$.mn(l)),l=t.Nb()?l.height:l.width,(!t.aa[o]||t.aa[o]<l)&&(t.aa[o]=l),t.ba[o]||(t.ba[o]=[]),t.ba[o].push(h),(o+1)%t.G?o++:o=0);i=t.na=m}else i=t.na={labels:!1,qb:!1};else i=t.sy(e);else i=!0;return i},$.Wy=function(t,e,i,n){var s=0,a=0,o=0,r=t.title(),l=t.labels(),h=t.qb(),c=t.g("orientation");r.enabled()&&(r.O()||r.O(t.O()),r.ka(),r.ja(e),$.dw(r,c),o=t.Nb()?r.yi().height:r.yi().width,r.da(!1)),r=t.scale(),l=l.enabled()&&$.p(r),h=h.enabled()&&$.p(r)&&$.J(r,$.kt);var u=t.Nb()?i:0;i=t.Nb()?0:i;var d=e?e.left:0,p=e?e.top:0,g=t.padding(),f=$.L(g.g("top"),e.height),m=$.L(g.g("right"),e.width),v=$.L(g.g("bottom"),e.height);switch(e=$.L(g.g("left"),e.width),c){case"top":case"left":d+=e,p+=f;break;case"right":d+=u-m,p+=f;break;case"bottom":d+=e,p+=i-v}if(c=new $.I(d,p,u,i),u=Vy(t,c),d=t.g("staggerMode"),l&&r)if(i=r.Xa().get(),f=$.C(u)?u.labels:!u,d)for(l=0;l<t.aa.length;l++)s+=t.aa[l];else for(l=0,e=i.length;l<e;l++)($.A(f)?f[l]:f)&&(p=$.mn(t.rd(l,!0,i,c)),(p=t.Nb()?p.height:p.width)>s&&(s=p));if(h&&!d)for(h=$.C(u)?u.qb:!u,i=r.yb().get(),l=0,e=h.length;l<e;l++)($.A(h)?h[l]:h)&&(p=$.mn(t.rd(l,!1,i,c)),(p=t.Nb()?p.height:p.width)>a&&(a=p));return t.l0(s,a,n)+o},Xy=function(t,e){var i=t.scale();return $.A(e)?(i.transform(e[0],0)+i.transform(e[1],1))/2:i.transform(e,.5)},Pca=function(t,e,i,n,s){var a=$.p(s)?s:t.ob();s=$.p(s)?s:t.line.rb();var o=i?t.Xa():t.yb(),r=i?t.labels():t.qb();return i=t.g("stroke"),i=$.dp(i),e=Xy(t,n[e]),n=r.g("position"),o=$.Io(o,$.Ho(n)),{value:{x:(t=t.HM(a,e,i,o,s)).x,y:t.y}}},Uy=function(t,e,i){var n=!1;switch(t.g("orientation")){case"top":case"bottom":n=e.left>i[0]||e.cb()<i[2];break;case"right":case"left":n=e.top>i[1]||e.Va()<i[7]}return n},Yy=function(){$.Sy.call(this)},$.Zy=function(){uv.call(this),this.pa=this.b=this.o=null,this.D="horizontal",this.i=null,this.G=!1,$.su(this,this),$.T(this.ua,[["align",4,9],["scaleRangeMode",4,4]])},$.$y=function(t,e){var i=!t.f&&t.D!=e;t.D=e,i&&t.B(4)},az=function(t){return $.p(void 0)?(void 0!==t.g("value")&&t.value(void 0),t):t.g("value")},$.bz=function(t){$.V.call(this),this.b=t||null,this.Da=null,this.pA={},this.f=[],this.ye=[],this.i=!1},$.dz=function(t){if(t.i=!1,t.b)var e=$.A(t.b)?t.b:[t.b];else{var i=$.Qo($.Ro()),n=$.Qo("default");n=(i=i||n)&&i.formats||n.formats}if(e)for(i=0;i<e.length;i++){var s=e[i];s in t.pA||cz(t,s)}else if(n){for(var a in n)if(e=n[a],$.ec(a,"timeline_"))for(i=0;i<e.length;i++)(s=e[i])in t.pA||cz(t,s)}else"yyyy/MM/dd'T'HH:mm:ss.SSS"in t.pA||cz(t,"yyyy/MM/dd'T'HH:mm:ss.SSS")},$.ez=function(t){if(!t.i){for(var e=0;e<t.ye.length;e++){var i=t.ye[e],n=t.f[e];n.width=i.Ta.width,n.height=i.Ta.height}t.i=!0}},cz=function(t,e){var i={index:t.f.length,width:window.NaN,height:window.NaN,format:e};t.pA[e]=i,t.f.push(i),(i=new $.Ix).text($.us(Qca,e,0)),i.style(t.labels().flatten()),i.Ij(),t.ye.push(i)},$.fz=function(){$.kt.call(this),this.Ga("defaultLinearColorScale"),this.BI=this.HI=0,this.yw=10},$.gz=function(t){var e=new $.fz;return e.N(e.oa),e.Jj.apply(e,arguments),e},hz=function(t){$.Ot.call(this,t)},$.iz=function(){Xs.call(this),this.df().Ga("defaultScaleSettings.ordinalColor","defaultOrdinalColorScale"),this.Wf=this.Xe=null,this.jd=[],this.bo=this.xk=null,this.la=[],this.eW=!1},Rca=function(t){$.Pa(t,(function(t,e){var i=t.start>e.start?1:t.start<e.start?-1:0;return i||(i=t.end>e.end?1:t.end<e.end?-1:0),(t.gp&&e.gp?Math.max(t.start,e.start)<=Math.min(t.end,e.end):Math.max(t.start,e.start)<Math.min(t.end,e.end))&&(t.start>e.start?t.sourceIndex>e.sourceIndex?e.end=t.start:(t.start=e.end,t.start>=t.end&&(t.enabled=!1)):t.start<e.start?t.sourceIndex>e.sourceIndex?(e.start=t.end,e.start>=e.end&&(e.enabled=!1)):t.end=e.start:t.sourceIndex>e.sourceIndex?(e.start=t.end,e.start>=e.end&&(e.enabled=!1)):(t.end=e.start,t.start>=t.end&&(t.enabled=!1))),i}))},$.jz=function(t){var e=new $.iz;return e.N(e.oa),e.Yy(t),e},$.kz=function(){$.Y.call(this),this.Ga("defaultGridSettings"),this.o=null,this.HL="horizontal",this.Fa=this.Xb=this.Y=null,this.D={},this.aa=null,$.T(this.ua,[["stroke",16],["fill",4],["drawFirstLine",64],["drawLastLine",64],["isMinor",80,9]])},lz=function(t,e){$.J(e,$.Ms)||$.C(e)&&"range"==e.type?t.Hc($.Ms):($.J(e,$.Gs)||$.C(e)||null==t.Fa)&&t.Hc($.Gs)},$.mz=function(t,e){var i=!t.f&&t.HL!=e;t.HL=e,i&&t.B(64)},nz=function(t,e,i){var n=e?t.aa:t.qa;if($.p(i)){var s=i&&$.D(i.Ma)&&i.Ma(),a=(s="stock-scatter-date-time"==s||"stock-ordinal-date-time"==s)?i==n?null:i:$.jt(n,i,null,15,null,t.zg,t);(a||null===i&&n)&&(i=n==a,a||$.kr(n,t.zg,t),n=a,e?t.aa=n:t.qa=n,a&&!s&&a.da(i),i||t.B(20,9))}},$.oz=function(t,e){var i=t.g("fill");if($.D(i)){var n={index:e,grid:t,palette:t.cc()||t.Y.cc()};i=i.call(n)}return(n=e in t.D?t.D[e.toString()]:t.D[e.toString()]=t.d_()).fill(i),n},pz=function(){$.kz.call(this)},qz=function(){$.kz.call(this)},sz=function(){$.qf.call(this),this.dc=$.rz,this.D=this.o=null},$.vz=function(t){t=$.oa(t),delete tz[t],$.Jc(tz)&&uz&&uz.stop()},wz=function(){uz||(uz=new nw((function(){Sca()}),20));var t=uz;t.uq()||t.start()},Sca=function(){var t=(0,$.Ln)();$.Dc(tz,(function(e){e.uG(t)})),$.Jc(tz)||wz()},$.xz=function(t,e,i,n){if(sz.call(this),!$.A(t)||!$.A(e))throw Error("Start and end parameters must be arrays");if(t.length!=e.length)throw Error("Start and end points must be the same length");this.b=t,this.f=e,this.duration=i,this.K=n,this.coords=[],this.Kd=0},yz=function(t,e){$.D(t.K)&&(e=t.K(e)),t.coords=Array(t.b.length);for(var i=0;i<t.b.length;i++)t.coords[i]=(t.f[i]-t.b[i])*e+t.b[i]},zz=function(t,e){wd.call(this,t),this.coords=e.coords,this.x=e.coords[0],this.y=e.coords[1],this.duration=e.duration,this.Kd=e.Kd,this.state=e.dc},Az=function(){sz.call(this),this.Wb=[]},Bz=function(){Az.call(this),this.b=0},Cz=function(){Az.call(this),this.b=0},Dz=function(){Bz.call(this)},$.Ez=function(t,e,i,n,s){$.xz.call(this,e,i,n,s),this.X=t},Fz=function(t,e,i){$.Ez.call(this,t,[],[],e,i)},Gz=function(t,e,i){$.Ez.call(this,t,[0,0],[0,0],e,i),this.G=window.NaN},Hz=function(t,e,i){$.Ez.call(this,t,[],[],e,i)},$.Jz=function(t,e,i){var n;if(n=t.prototype.js?$.Qc(t.prototype.js):{},$.A(i))for(var s=0;s<i.length;s++)Iz(n,e,i[s]);else Iz(n,e,i);t.prototype.js=n},Iz=function(t,e,i){t[e]||(t[e]={Ku:0,B3:-1,DJ:{}});var n=(t=t[e]).DJ;if(n[i])$.kl(702,void 0,[e,i]);else if(31==t.B3)$.kl(700,void 0,[e]);else{var s=++t.B3;n[i]=1<<s,t.Ku|=n[i],31==s&&$.kl(701,void 0,[e])}},$.Kz=function(){$.V.call(this),this.uY=[{kk:"area splineArea stepArea rangeArea rangeSplineArea rangeStepArea polygon".split(" "),JP:"areaLike"},{kk:"bar column box rangeBar rangeColumn candlestick waterfall".split(" "),JP:"barLike"},{kk:"hilo line spline stepLine jumpLine ohlc stick polyline".split(" "),JP:"lineLike"},{kk:"rangeBar rangeColumn rangeArea rangeSplineArea rangeStepArea hilo".split(" "),JP:"rangeLike"}],this.PB={}},$.Lz=function(){$.Y.call(this)},$.Mz=function(){$.Bx.call(this),this.hb=[],this.fc=this.fd=this.He=this.Fa=null;var t={};$.T(t,[["labels",0,0],["minLabels",0,0],["maxLabels",0,0]]),this.ca=new $.my(this,t,$.gm),this.ca.ta("labelsFactoryConstructor",$.oy),this.ca.ta("labelsAfterInitCallback",(function(t){t.I(4294967295),$.K(t,this.Kn,this)})),t={},$.T(t,[["labels",0,0],["minLabels",0,0],["maxLabels",0,0]]),this.za=new $.my(this,t,$.vo),this.za.ta("labelsFactoryConstructor",$.oy),$.T(t,[["labels",0,0],["minLabels",0,0],["maxLabels",0,0]]),this.Ea=new $.my(this,t,$.wo),this.Ea.ta("labelsFactoryConstructor",$.oy),$.T(this.ua,[["defaultSeriesType",0,0],["maxBubbleSize",32768,1,0,this.e3],["minBubbleSize",32768,1,0,this.e3],["pointWidth",32768,1,0,this.Ey],["maxPointWidth",32768,1,0,this.Ey],["minPointLength",32768,1,0,this.rB],["baseline",32768,1,0,this.Yja]])},$.Nz=function(t,e){function i(t){return function(e,i){return this.Ae(t,e,i)}}var n,s=t.prototype;for(n in e)s[$.pm(n)]=i(n)},$.Oz=function(t){var e,i=[Number.MAX_VALUE,-Number.MAX_VALUE];for(e=t.hb.length;e--;)if(t.hb[e].Ak()){var n=t.hb[e],s=i;if(n.J(512)){n.cP=Number.POSITIVE_INFINITY,n.bP=Number.NEGATIVE_INFINITY;for(var a=n.cg();a.advance();){var o=Number(a.get("size"));!(0,window.isNaN)(o)&&(0<=o||n.g("displayNegative"))&&((o=Math.abs(o))>n.bP&&(n.bP=o),o<n.cP&&(n.cP=o))}}s[0]=Math.min(s[0],n.cP),s[1]=Math.max(s[1],n.bP)}for(e=t.hb.length;e--;)t.hb[e].Ak()&&(n=t.hb[e],s=i[1],a=t.g("minBubbleSize"),o=t.g("maxBubbleSize"),n.sW=i[0],n.V3=s,n.Vha=a,n.Oha=o)},$.Pz=function(t,e,i,n,s){var a;if(t.J(32768)){$.xr(t.hb);var o=0;for(a=t.hb.length;o<a;o++){var r=t.hb[o];r.O(t.Na),r.ja(t.fc),t.Z5(r,e,i,n,s)}t.aL(),t.g1(),t.rB(!0),t.I(32768),$.zr(t.hb)}},$.Qz=function(t){function e(){this.Ey()}$.Mz.call(this),this.yX=this.ax=null,this.Ks=void 0,this.So=t,this.Fc=this.eb=null,this.FD=!1,this.pn={},this.mm={},this.Re=[],this.xn={},$.T(this.ua,[["barGroupsPadding",32772,9,0,e],["barsPadding",32772,9,0,e]])},$.Rz=function(t,e){for(var i=0,n=0;n<t.hb.length;n++){var s=t.hb[n];!s||!s.enabled()||e&&s.tl()!=e&&s.bb()!=e||(i|=s.B(1024))}i&&t.uV()},Sz=function(t){if(t.J(131072)){$.xr(t.hb);var e,i,n=t.hb.length,s=!n,a={},o={};for(e=0;e<n;e++)if(i=t.hb[e]){var r=i.Ra(),l=$.oa(r);a[l]=r,l in t.mm||(s=!0),r=i.bb(),o[l=$.oa(r)]=r,l in t.pn||(s=!0)}t.pn=o,t.mm=a,s&&(t.MA(),t.B(302350336)),$.zr(t.hb),t.I(131072)}},Uca=function(t){for(var e={},i=0;i<t.length;i++)for(var n=t[i],s=n.X.vm||[],a=0;a<s.length;a++){var o=s[a];e[o]=!0,n.data[o].j.missing=(Number(n.data[o].j.missing)||0)|(Number(Tz)||0)}return paa(e,(function(e,i){for(var n=0;n<t.length;n++)if(!Uz(t[n].data[+i].j.missing,Tca))return!1;return!0}))},Vca=function(t,e){var i=t[0].data,n=i.length,s=e.Mc(0),a=e.Mc(1);if(n){var o=function(t,e){return t-e.data.x};0>(s=$.Na(i,s,o))&&(s=~s-1),s=$.Za(s,0,n-1),0>(i=$.Na(i,a,o))&&(i=~i),i=$.Za(i,0,n-1),e.inverted()&&(n=s,s=i,i=n)}else s=i=window.NaN;return[s,i,s,i]},Vz=function(t){var e,i=[];for(e in t)i.push(t[e]);return i},Xz=function(t,e,i){var n=t.fc||$.kn(0,0,0,0),s=n.left,a=n.top,o=n.width,r=n.height;if(e-=(n=$.Zj(t.O().Ja())).x,i-=n.y,n=t.Ks?(r-(i-a))/r:(e-s)/o,e<s||e>s+o||i<a||i>a+r)return null;s=[];var l=t.qU();for(a=0,o=l.length;a<o;a++)if((r=l[a])&&r.enabled()){var h=r.Ra().Mc(n);if(t.So)var c=0<=(h=$.Wz(r,h))?[h]:$.A(h)?h:[];else c=$.Er(r.data(),h,$.J(r.Ra(),$.Qt));h=r.$();var u=window.Infinity;if(c.length){for(var d=0;d<c.length;d++)if(h.select(c[d]))for(var p=h.j("x"),g=r.Be(),f=0;f<g.length;f++){var m=h.j(g[f]);if((m=$.gn(p,m,e,i))<u){u=m;var v=c[d]}}s.push({X:r,vd:c,Ln:c[c.length-1],De:{index:v,Tf:u}})}}return s},$.Yz=function(t,e,i,n,s,a,o,r){for(var l=[],h=0;h<n.length;h++){var c=n[h];c&&l.push(s.call(t,c,a,o,r))}l.length&&(e[i]=l)},$.Zz=function(t,e,i,n,s){if(i){var a=$.oa(i);a in s||(s[a]=n.length,n.push(i.F())),t[e]=s[a]}},$.$z=function(){$.Ny.call(this),this.Ga("defaultLineMarkerSettings"),this.G="horizontal",$.T(this.ua,[["stroke",16,1],["value",0,0,0,function(){this.B(4,this.uD())}]])},$.aA=function(t,e){var i=!t.f&&t.G!=e;t.G=e,i&&t.B(4)},bA=function(){$.$z.call(this),this.Ga("standalones.lineAxisMarker")},$.cA=function(){function t(){this.B(4,this.uD())}$.Ny.call(this),this.Ga("defaultRangeMarkerSettings"),this.G="horizontal",$.T(this.ua,[["fill",16,1],["from",0,0,0,t],["to",0,0,0,t]])},$.dA=function(t,e){var i=!t.f&&t.G!=e;t.G=e,i&&t.B(4)},eA=function(){$.cA.call(this),this.Ga("standalones.rangeAxisMarker")},$.fA=function(){$.Zy.call(this),this.Ga("defaultFontSettings","defaultLabelSettings","defaultTextMarkerSettings"),$.T(this.ua,[["value",0,0,0,function(){this.B(4,this.uD())}]])},gA=function(){$.fA.call(this),this.Ga("standalones.textAxisMarker")},hA=function(){uv.call(this),this.aa=0,this.Oo=this.No=window.NaN,$.T(this.ua,[["format",20,9],["axisIndex",0,2]])},$.iA=function(){$.Y.call(this),this.mc=this.Yl=null,this.Pr=$.qk(),this.Sr=$.qk(),this.Pr.Dd(!0),this.Sr.Dd(!0),this.SY=!0,this.Y=this.Xb=null,this.nL={},$.T(this.ua,[["xStroke",16,1],["yStroke",16,1],["displayMode",0,0]])},lA=function(t,e,i){for(t=i?$.jA(t):$.kA(t),i=0;i<e.length;i++)e[i]&&t[i]&&t[i].df().parent(e[i])},mA=function(t,e,i,n){var s;for(s in t.nL){var a=t.nL[s],o=n?$.jA(a):$.kA(a);(o=o[i])||(o=n?a.YB(i):a.ZB(i)),o.df().parent(e)}t.Y&&((s=(o=n?$.jA(t.Y):$.kA(t.Y))[i])||(s=n?t.Y.YB(i):t.Y.ZB(i)),e.df().parent(s))},$.nA=function(t){switch(t.orientation()){case"left":return"right-center";case"top":return"center-bottom";case"right":return"left-center";case"bottom":return"center-top";default:return"left-top"}},$.jA=function(t){if(!t.hQ){t.hQ=[];var e,i=t.oa.xLabels;if($.A(i))for(e=0;e<i.length;e++)t.YB(e,i[e]);else"xLabel"in t.oa&&t.YB(0,t.oa.xLabel)}return t.hQ},$.kA=function(t){if(!t.kQ){t.kQ=[];var e,i=t.oa.yLabels;if($.A(i))for(e=0;e<i.length;e++)t.ZB(e,i[e]);else"yLabel"in t.oa&&t.ZB(0,t.oa.yLabel)}return t.kQ},$.oA=function(t,e){for(var i=t.length,n=0;n<i;n++){var s=t[n];s&&s.O(e)}},$.pA=function(t,e){for(var i=t.length,n=0;n<i;n++){var s=t[n];s&&s.ja(e)}},$.qA=function(t,e){return $.p(e)?(t.Yl!=e&&(t.Yl&&(t.Yl.gc("mouseover",t.If,!1,t),t.Yl.gc("mousemove",t.If,!1,t),t.Yl.gc("mouseout",t.hg,!1,t)),t.Yl=e,t.Yl&&(t.Yl.wa("mouseover",t.If,!1,t),t.Yl.wa("mousemove",t.If,!1,t),t.Yl.wa("mouseout",t.hg,!1,t))),t):t.Yl},rA=function(t,e){if($.p(e))e.O(null),e.remove();else for(var i=$.jA(t),n=0;n<i.length;n++){var s=i[n];s&&(s.O(null),s.remove())}},sA=function(t){return"left-top"==(t=t.vA())||"center-top"==t||"right-top"==t},tA=function(){$.V.call(this),$.tq(this.ua,"stroke",0,1)},uA=function(){$.yu.call(this),this.Ga("chart.defaultQuarterSettings"),this.Wa=this.Qc=this.jb=null,this.Da=[]},vA=function(t){$.V.call(this),this.Ga("chart.defaultQuarterSettings"),this.pa=t,this.i=this.b=this.f=this.o=null,this.D=[]},$.wA=function(t){$.Qz.call(this,t),this.$f=null,this.b=[],this.qf=[],this.og=[],this.rg=[],this.tg=[],this.Yg=[],this.Zg=[],this.jh=[],this.kh=[],this.na=null,this.aa=$.eq.annotations},xA=function(t,e){var i=e.Nb()^t.xa()?t.bb():t.Ra();$.J(e,$.kz)?nz(e,!0,i):e.WK(i)},yA=function(t,e){var i=e.dF();return $.J(i,$.Sy)?i:$.Aa(t.b,e)?t.qf[i]:$.Aa(t.qf,e)?t.b[i]:e},zA=function(t,e,i){t.pb(),e=$.Qc(e);var n,s,a=$.Ga(t.og,t.rg,t.tg,t.Yg,t.Zg,t.jh,t.kh);for(s=0;s<a.length;s++)if(n=a[s]){var o=!!(n.Nb()^t.xa());i^o&&(o=n.scale())&&((n=String($.oa(o)))in e||(e[n]=o))}for(t=i?t.b:t.qf,s=0;s<t.length;s++)(o=t[s]&&t[s].scale())&&((n=String($.oa(o)))in e||(e[n]=o));return e},AA=function(t,e){for(var i=Vz(e),n=$.Ga(t.og,t.rg,t.tg),s=0;s<n.length;s++){var a=n[s];if(a&&a.enabled()){var o=a.Nb()^t.xa()?t.bb():t.Ra();if(o=a.scale()?a.scale():o)for(var r=0;r<i.length;r++){var l=i[r];l===o&&"consider"==a.g("scaleRangeMode")&&l.Xc.apply(l,a.xs())}}}},Wca=function(t,e){var i=e.g("value"),n=yA(t,e);if(!n)return!0;var s=n.scale();return n=null===i,i=s.transform(i),s=s.sD()/2,n||!(0,window.isNaN)(i)&&i>=-s&&i<=1-s},$.BA=function(t,e){var i=t.bu(),n=$.p(e)?e:t.oa,s=$.p(e);t.im(n.xGrids,t.lm,i,s),t.im(n.yGrids,t.nm,i,s),t.im(n.xMinorGrids,t.Qr,i,s),t.im(n.yMinorGrids,t.Tr,i,s)},CA=function(t,e){for(var i=0;i<e.length;i++){var n=t[i];null!=n&&n.dF(e[i])}},DA=function(t,e){for(var i=[],n=0;n<t.length;n++){var s=t[n];s?(s=s.dF(),i[n]=$.ea(s)?s:(0,$.za)(e,s)):i[n]=null}return i},$.EA=function(t,e){this.ya=t,this.index=$.P(e,0,!0),this.kn={}},$.FA=function(t,e){$.EA.call(this,t.xc(),e),this.X=t},GA=function(t,e){$.FA.call(this,t,e)},$.HA=function(t,e,i,n){e?t.moveTo(n,i):t.moveTo(i,n)},$.IA=function(t,e,i){if(e)var n=1,s=0;else n=0,s=1;for(var a=2;a<arguments.length;a+=2)t.lineTo(arguments[a+n],arguments[a+s])},$.JA=function(t){$.od.call(this),this.X=t},KA=function(t,e){return 0>(t.prevValue-t.aa||1)*(e-t.aa||1)},Uz=function(t,e){return!!((Number(t)||0)&(e||255))},LA=function(t){$.V.call(this),this.Sa=t,this.b=null,$.T(this.ua,[["start",0,1],["point",0,1],["updatePoint",0,1],["finish",0,1],["needsZero",0,4],["needsWidth",0,4],["yValues",0,4]])},OA=function(t,e,i,n,s){if(t){var a=void 0;if(s&&!(a=i.j("shapes")))return;e=i?new MA(e,i,n||$.gm,a):new NA(e),t.call(e,e)}},NA=function(t){this.series=t,this.seriesState=t.fk()},MA=function(t,e,i,n){NA.call(this,t),this.b=e;for(var s=t.Be(),a=0;a<s.length;a++){var o=s[a];this[o]=e.j(o)}t.check(2)&&(this.size=e.j("size")),this.x=e.j("x"),this.pointState=i,this.missing=!!e.j("missing"),this.categoryWidth=t.q0,t.sp()&&(this.pointWidth=t.yu),$.PA(t)&&(this.zero=e.j("zero")),n&&(this.shapes=n)},$.QA=function(t,e,i,n,s,a){for($.od.call(this),this.P=n||"shapes",this.Jb=s||$.ia,this.X=t,this.Bd=null,this.aa=i,this.i={},this.D={},this.G={},this.f={},this.YC=!!a,t=0;t<e.length;t++){switch(i=e[t],n=$.cm(i.Yb,i.Ib?3:1,i.ac,i.Ik),s=$.cm(i.Zb,2,i.ac,i.Ik),a=i.Qb,String(a).toLowerCase()){case"none":var o=null;break;case"rect":o=$.mk;break;case"circle":o=$.nk;break;case"ellipse":o=$.pk;break;default:o=$.qk}this.i[a]||(this.i[a]=[],this.D[a]=[],this.G[a]=0),this.f[i.name]={fill:n,stroke:s,zIndex:+i.zIndex,Ib:i.Ib,nS:o,Qb:a,Yb:i.Yb,Zb:i.Zb}}},$.RA=function(t,e){if(t.Bd!=e)for(var i in t.Bd=e,t.i)for(var n=t.i[i],s=0;s<n.length;s++)n[s].parent(e)},TA=function(t,e,i,n,s,a,o){var r=(e=t.f[e]).fill(t.X,i),l=e.stroke(t.X,i);return a.fill(r),a.stroke(l),a.eq(t.YC),a.zIndex(e.zIndex+s),t.aa&&t.jP(a,e.Ib,n),e.Ib||SA(t,r,l),i=!(r||i!=$.gm&&e.fill(t.X,$.gm)||i!=$.vo&&e.fill(t.X,$.vo)||i!=$.wo&&e.fill(t.X,$.wo)),(o?e.Ib&&i:e.Ib)?i?a.parent(null):a.parent(t.Bd):o&&a.parent(t.Bd),a},$.UA=function(t,e,i,n,s){var a,o={};for(var r in i=i||t.f,a=!t.X.eh()||t.X.$().ma(),i)if("none"==i[r].Qb&&s)$.J(s,$.pg)&&(o[r]=TA(t,r,e,a,n||0,s));else{var l=r,h=void 0,c=t,u=r,d=e,p=a,g=n||0,f=c.f[u],m=f.Qb;c.D[m].length>c.G[m]?h=c.D[m][c.G[m]]:c.D[m].push(h=f.nS()),c.G[m]++,c.i[m].push(h),h=TA(c,u,d,p,g,h,!0),o[l]=h}return t.Jb(t.X,o,e),o},VA=function(t,e,i){for(var n in i){var s=t.f[n],a=i[n],o=s.fill(t.X,e),r=s.stroke(t.X,e);a.fill(o),a.stroke(r),s.Ib&&("none"==a.fill()&&"none"==a.stroke()?a.visible(!1):a.visible(!0)),s.Ib||SA(t,o,r)}t.Jb(t.X,i,e)},SA=function(t,e,i){t=t.X.$(),$.p(e)&&t.j("fill",e),$.p(i)&&t.j("stroke",i)},$.WA=function(t,e,i,n,s,a){$.QA.call(this,t,e,i,n,s,a)},$.XA=function(t,e,i,n,s,a){$.QA.call(this,t,e,i,n,s,a),this.o={}},YA=function(t,e,i,n,s){var a=void 0;if(n){var o=t.X.$();a=$.xo(i);var r=o.get(a);(o=r?r[n]:o.get($.hm(i,n)))?a=o:(r=t.X.kd(),o=t.X[a]()[n](),$.D(o)||r?o!=$.eq.themes.defaultTheme.chart.defaultSeriesSettings.base[a][n]||r?a=s?e.fill(t.X,i):e.stroke(t.X,i):(t={sourceColor:t.X.g("color")},a=o.call(t)):a=o)}return a},ZA=function(t,e,i){i=i||t.f;var n,s,a,o=t.X.$(),r="";for(a in i){var l=t.f[a],h=l.Zb,c=YA(t,l,e,l.Yb,!0);h=YA(t,l,e,h),l.Ib||(c&&$.dm(c)&&(n=c),h&&$.dm(h)&&(s=h)),r+=a+$.Tl(c)+$.Tl(h)}return SA(t,n,s),o.j("shapeNames",i),r},$A=function(t){$.V.call(this),this.Sa=t,this.Fm="both",this.ba=null,this.i=this.o=void 0,this.K=null,this.b=this.f=void 0,this.G=this.aa=10,this.D=this.P="#1D8BD1"},aB=function(t){return $.J(t,$.kt)&&!$.J(t,$.nt)&&"none"==t.jn()},bB=function(t){var e=t.hF(),i=t.iF(),n=t.jF(),s=t.bF(),a=t.cF();return t=t.fF(),s=$.p(a)||$.p(t)||$.uo(s)||!$.Do(s),$.p(i)||$.p(n)||$.uo(e)||!$.Do(e)||s},$.cB=function(){tv.call(this),this.Pa={},$.T(this.ua,[["text",20,9]])},$.eB=function(t,e,i,n){$.Y.call(this),this.ya=t,this.jf=e,this.Nd={},this.Nd.pointWidth="90%",this.Nd.isVertical=this.ya.xa(),this.Nd.minPointLength=0,this.gg=!1,this.kn={},this.eD=this.nA=null,this.re=i,this.ti=null,this.Rx=0,this.jl=null,this.Vj=[],this.eq=!1,this.Cu=new LA(this),$.K(this.Cu,this.Xja,this),$.T(this.ua,[["color",2048,65,4294967295],["xPointPosition",1024,1,4294967295],["pointWidth",1024,1,1024],["maxPointWidth",1024,1,1024],["minPointLength",1024,5,1024,this.yE],["connectMissingPoints",1024,1,$.dB],["displayNegative",1024,5,2],["stepDirection",1024,1,131072],["isVertical",1024,5,4294967295]]),this.TH(),this.Mz(n,!0)},$.fB=function(t){var e=1e-5*t.Wq;e=t.jf.zM(t)+e,t.zh=e},gB=function(){return[["fill",0,0,4294967295],["negativeFill",0,0,4294967295],["risingFill",0,0,4294967295],["fallingFill",0,0,4294967295],["stroke",0,0,4294967295],["lowStroke",0,0,4294967295],["highStroke",0,0,4294967295],["lowFill",0,0,4294967295],["highFill",0,0,4294967295],["negativeStroke",0,0,4294967295],["risingStroke",0,0,4294967295],["fallingStroke",0,0,4294967295],["medianStroke",0,0,4294967295],["stemStroke",0,0,4294967295],["whiskerStroke",0,0,4294967295],["hatchFill",0,0,4294967295],["negativeHatchFill",0,0,4294967295],["risingHatchFill",0,0,4294967295],["fallingHatchFill",0,0,4294967295],["highHatchFill",0,0,4294967295],["lowHatchFill",0,0,4294967295],["whiskerWidth",0,0,256],["type",0,0,8192],["size",0,0,8192],["labels",0,0],["minLabels",0,0],["maxLabels",0,0],["markers",0,0],["outlierMarkers",0,0]]},hB=function(t){return t.check(128)&&t.check(2097152)},$.PA=function(t){return!!t.Cu.g("needsZero")},$.iB=function(t,e){t.Nd.pointWidth=String(100*e)+"%"},$.jB=function(t,e){t.Nd.xPointPosition=e},$.kB=function(t,e){t.Nd.type=e,t.ca.Db().WF=e,t.check(8192)&&t.B(1024)},$.lB=function(t){return t.oe||(t.oe=new $.Fw),t.oe},$.nB=function(t,e,i,n){if(!t)return Xca;var s=$.oa(e)+"|"+t+"|"+i+(n?"|"+n:"");n=n||t;var a=mB[s];return a||(mB[s]=a=function(s,a,o){return(o=$.em(o))!=$.gm&&i&&(o=s.sc(t,o,a,e,!1,n),$.p(o))?o:s.sc(t,0,a,e,!1,n)}),a},Xca=function(){},oB=function(t,e,i,n,s,a){if(e.ka(),t.check(s)&&(!1!==e.enabled()||i||n)){if(e.O(t.U1()),t.J(a))return e.clear(),e.ja(t.fa),!0}else e.clear(),e.O(null);return e.W(),e.da(!1),!1},pB=function(t,e){var i=e[0],n=e[1]||i;return i.pH()[t]||n.pH()[t]||e[2]&&$.p(e[2][t])||e[3]&&$.p(e[3][t])},rB=function(t,e,i,n){var s=e[0],a=s.jp(i);a||(a=s.add(void 0,i)),a.jc(n),a.Hi(),i=e[1]||s;var o=(n=t.$()).j($.J(t.Rf,$.WA)?"shapes":"shapeNames"),r=t.rr(n.ma());return t.Rf.VB(r,o),n=n.j(t.check(8)?"markerStroke":"markerFill"),$.p(n)&&(t=s==t.ca.dl()?qB(t,n):t.Zv(n),!pB("fill",e)&&$.dm(t)&&(a.oJ(t),t=$.Ql(t),!pB("stroke",e)&&$.dm(t)&&a.pJ(t))),$.gy(a,i),a.td(e[2],e[3]),a},Yca=function(t,e){(0,$.Pe)(e,(function(t){$.J(t,$.Pu)?this.kT(t):t.W(),t.da(!1)}),t)},Zca=function(t,e,i,n,s,a,o){return i=rB(t,e,i,s),t=rB(t,e,n,a),o&&(i.W(),t.W()),[i,t]},qB=function(t,e){return $.p(e)?e:$.cm("fill",1,!1)(t,$.gm,!0)},$ca=function(t,e){return+$.Hc(t.RH,(function(t){return(0,$.Qw)(t,(function(t){return t==e}))}))},sB=function(t){t&&(t=t.j("shared"))&&(t.jB=window.NaN,t.dB=window.NaN)},uB=function(t){var e=t.gg;if($.da(e)){e=t.Mx.clone();var i=(e=$.Xo(e,1)).top,n=e.Va();i=Math.floor(i),n=Math.ceil(n),e.top=i,e.height=n-i,i=e.left,n=e.cb(),i=Math.floor(i),n=Math.ceil(n),e.left=i,e.width=n-i,t.check($.tB)&&(e=e.clone(),i=(t=t.ya).Mh,e.top-=i,e.height+=i,e.width+=t.oi)}return e},$.vB=function(t,e,i){return i=i||t.$(),e.Li(t.GS(i)).lg(i).Im(t.sF).Dl(t.aU(i)),$.ov(e,t.ym(e,i))},wB=function(t){this.Sa=t,$.Br.call(this,t.data())},$.xB=function(t,e,i,n,s){$.eB.call(this,t,e,i,n),this.state=new $.ix(this),this.Dka=s,$.tq(this.ua,"xMode",1024,5,4294967295),this.data(null)},$.yB=function(t,e,i){if(e){var n={},s=-window.Infinity;e=function(t,e){var i=e.data.x;if(i in n){var o=t[n[i]];t[n[i]]=e}else n[i]=t.length,t.push(e),i<s&&(a=!0),s=i;return o||null}}else e=function(t,e){return t.push(e),null};var a=!1;return t=t.bU([],e,i?function(t){return(t=$.ps(t))?t.getTime():window.NaN}:function(t){return t},window.isNaN),a&&$.Pa(t.data,ada),t},$.AB=function(t,e,i,n,s){var a="scatter"==t.g("xMode"),o=!1;for(n?n=a?function(t,i){var n=$.qo(i.data.x);return t.push(n in e?i:null),null}:function(t,i){var n=$.qo(i.data.x);if(n in e){var s=t[e[n]];t[e[n]]=i}return s||null}:s?n=function(t,e){return t.push(e),null}:a?(o=!0,n=function(t,n){var s=n.data.x,a=$.qo(s);return a in e||(e[a]=i.length,i.push(s)),t.push(n),null}):n=function(t,n){var s=n.data.x,a=$.qo(s);if(a in e){var o=t[e[a]];t[e[a]]=n}else e[a]=i.length,i.push(s),t.push(n);return o||null},o=(t=t.bU(o?[]:Array(i.length),n,(function(t){return t}),(function(t){return void 0===t}))).data,n=0;n<o.length;n++)o[n]||(o[n]=zB(i[n]));return t.Lp=e,t.qt=i,t},zB=function(t){var e={};return e.missing=BB,{data:{x:t},j:e}},ada=function(t,e){return $.po(t.data.x,e.data.x)},$.Wz=function(t,e){if(t.pd){if(t.pd.Lp){var i=t.pd.Lp[$.qo(e)];if((0,window.isNaN)(i))return-1;if("scatter"==t.g("xMode")){i=[];for(var n=t.pd.data,s=0;s<n.length;s++){var a=n[s];a.data.x==e&&i.push(a.j.rawIndex)}}return i}return t.pd.data.length?(0>(i=$.Oa(t.pd.data,(function(t){return e-t.data.x})))&&0<(i=~i)&&(i==t.pd.data.length||t.pd.data[i].data.x-e>e-t.pd.data[i-1].data.x)&&i--,i):-1}return t.wG.find("x",e)},$.CB=function(t,e,i,n,s){var a=t.$();a.reset();for(var o=[];a.advance();){var r=void 0,l=t,h=a,c=e,u=i,d=n,p=s;if($.J(l.Rf,$.WA)&&(r=h.j(l.Rf.P)))t:{var g=void 0,f=r,m=c;l=u;var v=d,b=p;for(g in f){var y=f[g];if($.J(y,$.ig)&&(y=y.rb()).left<=m+v&&m<=y.left+y.width&&y.top<=l+b&&l<=y.top+y.height){g=!0;break t}}g=!1}else g=h.j(l.Ah.zb+"X"),f=h.j(l.Ah.zb),l.Ah.zb==l.Ah.Ab?g=c<=g&&g<=c+d&&u<=f&&f<=u+p:(m=h.j(l.Ah.Ab+"X"),l=h.j(l.Ah.Ab),g=$.bn([g,f,m,l],[c,u,c+d,u,c+d,u+p,c,u+p]));!g&&(r=h.j("marker"))&&(g=r.Vd().rb().so(new $.I(c,u,d,p))),g&&o.push(a.ma())}return o},DB=function(t,e){return $.p(e)?(t.rka=!!e,t):t.rka||!1},$.EB=function(t,e,i){return t.enabled()?($.A(e)?(i||t.ie(),t.state.Lh($.wo,e,i?void 0:$.vo)):$.ea(e)&&t.state.Lh($.wo,e,i?void 0:$.vo),t):t},$.GB=function(t){$.Y.call(this),this.Ga($.ur.scroller),this.Ka=!1,this.vB=this.dO=this.G=this.ba=this.P=this.b=this.f=this.Aa=null,this.D=0,this.o=FB,this.fa=new $.I(0,0,0,0),this.i=new $.I(0,0,0,0),this.na=this.ea=this.Ba=null,this.Ha=0,this.Za=this.fb=this.$a=!1,this.Wa=this.aa=null,this.sb=!!t,$.T(this.ua,[["height",4,9],["minHeight",4,9],["maxHeight",4,9],["orientation",196,9],["inverted",16,1],["autoHide",256,9],["fill",16,1],["selectedFill",16,1],["outlineStroke",16,1],["allowRangeChange",0,0]])},HB=function(t){return t.Nb()?"ew-resize":"ns-resize"},$.IB=function(t,e,i){if((e=$.Za(Math.round(e*FB),0,FB))>(i=$.Za(Math.round(i*FB),0,FB))){var n=e;e=i,i=n}e==t.D&&i==t.o||(t.D=e,t.o=i,t.B(16,1))},JB=function(t){t.Ka||(t.Aa.hc(t.f),t.Aa.hc(t.b),t.Ka=!0)},KB=function(t){t.Ka&&t.K().g("autoHide")&&!t.Ha&&!t.$a&&(t.Aa.removeChild(t.f),t.Aa.removeChild(t.b),t.Ka=!1)},LB=function(t,e,i){(t=t.K()).g("enabled")?i?(i=t.lb().g("fill"),t=t.lb().g("stroke")):(i=t.Qa().g("fill"),t=t.Qa().g("stroke")):(i=$.bm,t="none"),e.fill(i),e.stroke(t)},MB=function(t,e,i,n,s){return t.dispatchEvent(t.N3(i,($.p(n)?n:t.D)/FB,($.p(s)?s:t.o)/FB,e))},OB=function(t,e,i){i=NB(t,e,i);var n=t.fa;switch(t.g("orientation")){case"right":case"left":n=(n.top+n.height-i)/n.height;break;default:n=(i-n.left)/n.width}if(t.g("inverted")&&(n=1-n),(i=t.g("allowRangeChange"))&&e==t.f)i=n,n=t.o/FB,e="thumb-drag";else if(i&&e==t.b)i=t.D/FB,e="thumb-drag";else{var s=(t.o-t.D)/FB/2;i=n-s,n+=s,e=!0===e?"selected-range-drag":"background-click"}(i=$.Za(Math.round(i*FB),0,FB))==(n=$.Za(Math.round(n*FB),0,FB))&&(n+=n<FB?1:-1),i>n&&(s=t.f,t.f=t.b,t.b=s,s=t.Ba,t.Ba=t.ea,t.ea=s,s=i,i=n,n=s),i==t.D&&n==t.o||!MB(t,e,"scrollerchange",i,n)||(t.D=i,t.o=n,t.B(16,1))},NB=function(t,e,i){var n=t.fa,s=t.Nb();return t=$.da(e)||!t.g("allowRangeChange")?(t.o-t.D)/FB*(s?n.width:n.height)/2:0,s?$.Za(i,n.left+t,n.left+n.width-t):$.Za(i,n.top+t,n.top+n.height-t)},PB=function(t,e){var i=(i=t.g("allowRangeChange"))&&e==t.f?t.D:i&&e==t.b?t.o:(t.D+t.o)/2;i/=FB,t.g("inverted")&&(i=1-i);var n=t.fa;return t.Nb()?n.left+n.width*i:n.top+n.height*(1-i)},QB=function(t,e,i){$.ag.call(this,e.ia()),this.i=t,this.b=i?e:null,this.Qj=void 0,this.rs=(0,$.pa)((function(){this.Qj=void 0,OB(this.i,this.b||!0,this.ba)}),this),$.bg(this),this.wa("end",this.Faa)},RB=function(t){$.V.call(this),this.Ga($.ur.thumbs),this.i=t,$.T(this.ua,[["enabled",80,1],["autoHide",16,1]]),t={},$.T(t,[["fill",16,1],["stroke",16,1]]),this.ca=new $.my(this,t,$.gm),$.W(this,"normal",this.ca),this.za=new $.my(this,t,$.vo),$.W(this,"hovered",this.za)},SB=function(){$.GB.call(this)},$.TB=function(){$.GB.call(this,!0),this.af="after-axes",$.tq(this.ua,"position",20,9)},UB=function(t,e){this.D=e,this.pa=t,this.i=0,this.b=1,this.o=!0,this.f=null},VB=function(t){var e=t.pa;if(Sz(e),e.J(65536)&&(e.Tq().f||e.Uq().f)&&e.pb(),t.f)if((e=t.f.scale)||(e=t.pa,e=t.D?e.Ra():e.bb()),t.f.count&&$.J(e,$.Qt))e=t.f.count/e.values().length,t.f.qfa?t.BB(1-e,1):t.BB(0,e);else if($.p(t.f.start)&&$.p(t.f.end)&&e){var i=Zs(e,e.transform(t.f.start,0)),n=Zs(e,e.transform(t.f.end,1));i>n&&(i=Zs(e,e.transform(t.f.end,0)),n=Zs(e,e.transform(t.f.start,1))),t.BB(i,n)}else t.f=null},$.WB=function(t){$.wA.call(this,!$.p(t)||t),this.Ga("cartesianBase"),this.Uc=new UB(this,!0),this.bg=new UB(this,!1),$.T(this.ua,[["zAngle",4,9],["zAspect",4,9],["zDistribution",131076,9],["zPadding",4,9]])},XB=function(t,e){var i="before-axes"==t.g("position");t.padding(0),t.ja(e);var n=t.Nb(),s=window.NaN;return i?s=n?e.height-t.yd().height:e.width-t.yd().width:e=t.yd(),{A0:e,E5:s}},YB=function(t,e,i,n){if("before-axes"==i.g("position"))switch(i.g("orientation")){case"top":i.padding().top(e[0]+(t.fb||0)),i.padding().bottom(0),e[0]+=n;break;case"bottom":i.padding().top(0),i.padding().bottom(e[2]+(t.Ha||0)),e[2]+=n;break;case"left":i.padding().left(e[3]+(t.Ka||0)),i.padding().right(0),e[3]+=n;break;case"right":i.padding().left(0),i.padding().right(e[1]+(t.$a||0)),e[1]+=n}return i.Nb()?(i.padding().left(e[3]),i.padding().right(e[1])):(i.padding().top(e[0]),i.padding().bottom(e[2])),e},$.ZB=function(t,e){this.f={},this.b=[],this.i=0;var i=arguments.length;if(1<i){if(i%2)throw Error("Uneven number of arguments");for(var n=0;n<i;n+=2)this.set(arguments[n],arguments[n+1])}else if(t)if(t instanceof $.ZB)for(i=t.Yt(),n=0;n<i.length;n++)this.set(i[n],t.get(i[n]));else for(n in t)this.set(n,t[n])},$.aC=function(t){if(t.i!=t.b.length){for(var e=0,i=0;e<t.b.length;){var n=t.b[e];$.$B(t.f,n)&&(t.b[i++]=n),e++}t.b.length=i}if(t.i!=t.b.length){var s={};for(i=e=0;e<t.b.length;)n=t.b[e],$.$B(s,n)||(t.b[i++]=n,s[n]=1),e++;t.b.length=i}},$.$B=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},$.bC=function(){Cz.call(this)},$.cC=function(t){$.V.call(this),this.ya=t,this.Xb=this.Y=null,this.I(4294967295),$.T(this.ua,[["stroke",0,1],["fill",0,1]])},$.dC=function(t,e,i,n){$.Fg.call(this),this.o=t,this.i=e||$.ia,this.f=$.p(n)?n:this,this.b=[]},$.eC=function(t){var e=t.b.pop();return e?t.i.call(t.f,e):e=t.o.call(t.f),t.hc(e),e},fC=function(t){$.JA.call(this,t)},gC=function(t,e,i,n,s,a,o){a=(a=$.R(a,1))<n?Math.floor(a):Math.ceil(a),$.HA(e[o.fill],t.xa,s,a),$.IA(e[o.fill],t.xa,i,n),$.HA(e[o.qe],t.xa,s,a),$.IA(e[o.qe],t.xa,i,n),$.HA(e[o.stroke],t.xa,i,n)},hC=function(t,e,i,n,s,a){var o=t.nh(a,t.prevValue);if(e!=t.b){var r=t.na,l=t.P,h=t.K;a=KA(t,a),t.ba&&a?(l=s,r=(i-t.na)*(l-t.P)/(n-t.P)+t.na):t.Ha&&!t.ba||(r+=(i-r)/2,l+=(n-l)/2),$.IA(t.b[h.fill],t.xa,r,l),$.IA(t.b[h.qe],t.xa,r,l),$.IA(t.b[h.stroke],t.xa,r,l),t.i=r,t.Km(),t.X.gh()&&(t.f=[r,l]),t.b=e,$.HA(t.b[o.fill],t.xa,r,s),$.IA(t.b[o.fill],t.xa,r,l),$.HA(t.b[o.qe],t.xa,r,s),$.IA(t.b[o.qe],t.xa,r,l),$.HA(t.b[o.stroke],t.xa,r,l)}$.IA(t.b[o.fill],t.xa,i,n),$.IA(t.b[o.qe],t.xa,i,n),$.IA(t.b[o.stroke],t.xa,i,n)},$.iC=function(t){$.JA.call(this,t)},jC=function(t,e,i){var n=e.j("x"),s=e.j("value");for(var a in e=e.j("size"),e=Math.abs(e),t.xa&&(t=n,n=s,s=t),i){(t=i[a]).To(n).Uo(s).Eb(e);var o=t.Pd;o&&!$.zb(o)&&t.oc(1,0,0,1,0,0)}},kC=function(t){$.JA.call(this,t)},$.lC=function(t){$.JA.call(this,t)},mC=function(t){$.JA.call(this,t)},nC=function(t,e,i,n){var s=e.j("x");e=e.j("value");var a=(s-=t.o/2)+t.o,o=$.$b(i[n.stroke].stroke());s=$.R(s,o),a=$.R(a,o),e=$.R(e,o),i=i[n.stroke],$.HA(i,t.xa,s,e),$.IA(i,t.xa,a,e)},$.oC=function(t){$.JA.call(this,t)},$.pC=function(t){$.JA.call(this,t),this.f=$.nB("type",$.cr,!0),this.b=$.nB("markerSize",$.Bq,!0,"size")},$.qC=function(t,e,i,n,s){var a=e.j("x"),o=e.j("value"),r=t.f(t.X,e,i);e=t.b(t.X,e,i),r=$.D(r)?r:$.zp(r),t.xa&&(t=a,a=o,o=t),r(n[s.path],a,o,e),r(n[s.qe],a,o,e)},rC=function(t){$.JA.call(this,t)},sC=function(t){$.JA.call(this,t)},$.tC=function(t){$.JA.call(this,t)},uC=function(){this.dc=0,this.G=this.D=this.Ba=this.na=window.NaN,this.Ha=this.K=!1,this.Za=[],this.$a=[],this.o=[],this.ea=[],this.ba=1,this.Wh=[]},vC=function(t){t.Ca=t.P,t.P=null},zC=function(t,e,i){var n=null;switch(t.dc){case 3:if(t.D==e&&t.G==i)break;n=t.na;var s=t.Ba,a=t.D,o=t.G;wC(t,n,s,a,o,e,i);var r,l=[],h=n+t.ea[0],c=s+t.ea[1],u=a-t.o[0]*t.ba,d=o-t.o[1]*t.ba,p=(h+u)/2,g=(c+d)/2;if(t.P){"middle"==t.b&&(t.b=g);var f=!1;if($.A(t.b))for(r=0;r<t.b.length&&!(f=!!un(n,s,h,c,p,g,t.b[r],t.b[r+1],t.b[r+2],t.b[r+3],t.b[r+4],t.b[r+5])[0]);r+=6);else f=s<=t.b&&g>=t.b||s>=t.b&&g<=t.b;f?(r=(f=xC(t,n,s,h,c,p,g)).dP,t.f("c",r[2],r[3],r[4],r[5],"bc",r[4],t.i),yC(t,f),vC(t),t.f("bs",r[4],t.i,r[4],r[5],"c",r[6],r[7],r[8],r[9],"c",u,d,a,o),l.push(r[0],r[1],r[2],r[3],r[4],r[5]),l.push(r[4],r[5],r[6],r[7],r[8],r[9]),l.push(p,g,u,d,a,o)):(r=(f=xC(t,p,g,u,d,a,o)).dP,t.f("c",h,c,p,g,"c",r[2],r[3],r[4],r[5],"bc",r[4],t.i),yC(t,f),vC(t),t.f("bs",r[4],t.i,r[4],r[5],"c",r[6],r[7],r[8],r[9]),l.push(n,s,h,c,p,g),l.push(r[0],r[1],r[2],r[3],r[4],r[5]),l.push(r[4],r[5],r[6],r[7],r[8],r[9]))}else t.f("c",h,c,p,g,"c",u,d,a,o),l.push(n,s,h,c,p,g,p,g,u,d,a,o);t.ba=(e-a)*t.Ka,t.ea[0]=t.o[0]*t.ba,t.ea[1]=t.o[1]*t.ba,n=l,t.na=t.D,t.Ba=t.G,t.D=e,t.G=i;break;case 2:if(t.D==e&&t.G==i)break;a=t.na,o=t.Ba,n=t.D,l=t.G,wC(t,a,o,n,l,e,i),s=[],c=(n-a)*t.Ka,h=n-t.o[0]*c,c=l-t.o[1]*c,t.P?(o=(a=xC(t,a,o,h,c,n,l)).dP,t.f("bs",o[0],t.i,o[0],o[1],"c",o[2],o[3],o[4],o[5],"bc",o[4],t.i),yC(t,a),vC(t),t.f("bs",o[4],t.i,o[4],o[5],"c",o[6],o[7],o[8],o[9]),s.push(o[0],o[1],o[2],o[3],o[4],o[5]),s.push(o[4],o[5],o[6],o[7],o[8],o[9])):(t.f("bs",a,t.i,a,o,"c",h,c,n,l),s.push(a,o,h,c,n,l)),t.ba=(e-n)*t.Ka,t.ea[0]=t.o[0]*t.ba,t.ea[1]=t.o[1]*t.ba,n=s,t.na=t.D,t.Ba=t.G,t.D=e,t.G=i,t.dc=3;break;case 1:if(t.na==e&&t.Ba==i)break;t.D=e,t.G=i,t.dc=2;break;case 0:t.na=e,t.Ba=i,t.dc=1}return n},AC=function(t){var e=null;switch(t.dc){case 3:var i=t.na,n=t.Ba,s=t.D,a=t.G;e=[];var o=i+t.ea[0],r=n+t.ea[1];if(t.P?(n=(i=xC(t,i,n,o,r,s,a)).dP,t.f("c",n[2],n[3],n[4],n[5],"bc",n[4],t.i),yC(t,i),vC(t),t.f("bs",n[4],t.i,n[4],n[5],"c",n[6],n[7],n[8],n[9],"bc",n[8],t.i),e.push(n[0],n[1],n[2],n[3],n[4],n[5]),e.push(n[4],n[5],n[6],n[7],n[8],n[9])):(t.f("c",o,r,s,a,"bc",s,t.i),e.push(i,n,o,r,s,a)),t.Wh.length){for(i=0;i<t.Wh.length;i+=6)0==i&&t.f("l",t.Wh[i],t.Wh[i+1]),t.f("c",t.Wh[i+2],t.Wh[i+3],t.Wh[i+4],t.Wh[i+5]);t.Wh.length=0}break;case 2:if(i=t.na,n=t.Ba,s=t.D,a=t.G,e=[],t.P){if(r=$.A(t.b)){var l=vn(i,n,s,a,t.b[0],t.b[1],t.b[4],t.b[5]);o=l.x,l=l.y}else o=(s-i)*((l="middle"==t.b?(n+a)/2:t.b)-n)/(a-n)+i;t.f("bs",i,t.i,i,n,"l",o,l,"bc",o,t.i),r&&t.f("l",t.b[4],t.b[5]),vC(t),t.f("bs",o,t.i,o,l,"l",s,a,"bc",s,t.i),r&&t.f("l",t.b[0],t.b[1]),e.push(i,n,i,n,o,l),e.push(o,l,s,a,s,a)}else t.f("bs",i,t.i,i,n,"l",s,a,"bc",s,t.i),e.push(i,n,i,n,s,a);if(t.Wh.length){for(i=0;i<t.Wh.length;i+=2)t.f("l",t.Wh[i],t.Wh[i+1]);t.Wh.length=0}break;case 1:e=null}return t.dc=0,e},BC=function(t,e){t.Ha^t.K&&(e=!e),t.Ka=e?-.25:.25},CC=function(t,e,i,n,s){t[0]=n-e,t[1]=s-i,e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),t[0]/=e,t[1]/=e},wC=function(t,e,i,n,s,a,o){CC(t.Za,n,s,e,i),CC(t.$a,n,s,a,o),0<=t.Za[1]*t.$a[1]?(t.o[0]=0>t.Ka?-1:1,t.o[1]=0):CC(t.o,t.Za[0],t.Za[1],t.$a[0],t.$a[1])},xC=function(t,e,i,n,s,a,o){var r=0,l=0,h=0,c=0,u=0,d=0,p={};if($.A(t.b)){for(var g=[],f=!1,m=t.b.length-1;0<m;m-=6){var v=$.Tm(t.b[m-5],3),b=$.Tm(t.b[m-4],3),y=$.Tm(t.b[m-3],3),S=$.Tm(t.b[m-2],3),x=$.Tm(t.b[m-1],3),w=$.Tm(t.b[m],3);if(C)p.Wh||(p.Wh=[]),p.Wh.push(v,b,y,S,x,w);else var C=un(e,i,n,s,a,o,v,b,y,S,x,w)[0];C?f||(r=v,l=b,h=y,c=S,u=x,d=w,f=!0):g.push(v,b,y,S,x,w)}C?(S=fn(e,i,n,s,a,o,C.x,C.y)||0,f=fn(r,l,h,c,u,d,C.x,C.y)||1):(C=new $.on(e,i),r=v,l=b,h=y,c=S,u=x,d=w,S=0,f=1)}else if("middle"==t.b)x=1-(S=.5),C=new $.on(x*x*e+2*S*x*n+S*S*a,x*x*i+2*S*x*s+S*S*o);else if($.Wm(i,t.b))C=new $.on(e,i),S=0;else if($.Wm(o,t.b))C=new $.on(a,o),S=1;else{C=new $.on(e,i),v=new $.on(n,s),b=new $.on(a,o),y=new $.on(e,t.b),S=new $.on(a,t.b),x=y.min(S),w=y.max(S),m=[];var T=pn(v,-2),D=C.add(T.add(b));T=(T=pn(C,-2)).add(pn(v,2));var k=new $.on(C.x,C.y),O=new $.on(y.y-S.y,S.x-y.x);for(D=tn(new rn(O.x*D.x+O.y*D.y,O.x*T.x+O.y*T.y,O.x*k.x+O.y*k.y+(y.x*S.y-S.x*y.y))),T=0;T<D.length;T++)0<=(k=D[T])&&1>=k&&(k=qn(qn(C,v,k),qn(v,b,k),k),y.x==S.x?x.y<=k.y&&k.y<=w.y&&m.push(k):y.y==S.y?x.x<=k.x&&k.x<=w.x&&m.push(k):k.x>=x.x&&k.y>=x.y&&k.x<=w.x&&k.y<=w.y&&m.push(k));S=(C=m[0])?fn(e,i,n,s,a,o,C.x,C.y):.5}return v=e*(x=1-S)+n*S,b=i*x+s*S,y=n*x+a*S,S=s*x+o*S,C?(n=C.x,s=C.y):s=n=window.NaN,p.dP=[e,i,v,b,n,s,y,S,a,o],$.A(t.b)&&(v=r*(x=1-f)+h*f,b=l*x+c*f,C?(n=C.x,s=C.y):s=n=window.NaN,g.push(n,s,h*x+u*f,c*x+d*f,u,d),p.bea=g,p.Wh||(p.Wh=[]),p.Wh.push(r,l,v,b,n,s)),p},yC=function(t,e){var i=e.bea,n=e.Wh;if(i)for(var s=i.length-1;0<s;s-=6)t.f("c",i[s-3],i[s-2],i[s-1],i[s]);t.Wh&&t.Wh.length&&t.f("c",t.Wh[2],t.Wh[3],t.Wh[4],t.Wh[5]),n&&(t.Wh=n)},DC=function(t){$.JA.call(this,t),this.i=new uC,this.D=new uC},EC=function(t){$.JA.call(this,t)},FC=function(t){$.JA.call(this,t)},GC=function(t,e,i,n){var s=e.j("x"),a=e.j("high");e=e.j("low");var o=$.$b(i[n].stroke());t.wv&&(s=$.R(s,o)),a=$.R(a,o),e=$.R(e,o),i=i[n],$.HA(i,t.xa,s,e),$.IA(i,t.xa,s,a)},HC=function(t){$.JA.call(this,t),this.f=new uC},IC=function(t){$.JA.call(this,t),this.i=new uC},JC=function(t){$.JA.call(this,t)},KC=function(t,e,i,n,s){var a=t.b[e.fill],o=t.b[e.stroke];switch(e=t.b[e.qe],t.P){case"forward":break;case"backward":i=t.D;break;default:i=(i+t.D)/2}return $.IA(a,t.xa,i,n,i,s),$.IA(e,t.xa,i,n,i,s),$.IA(o,t.xa,i,n,i,s),i},LC=function(t,e,i,n,s,a){$.HA(e[i.fill],t.xa,n,a),$.IA(e[i.fill],t.xa,n,s),$.HA(e[i.qe],t.xa,n,a),$.IA(e[i.qe],t.xa,n,s),$.HA(e[i.stroke],t.xa,n,s)},MC=function(t,e,i,n,s,a,o){var r=t.i;if(e!=t.b){var l=t.b[t.K.fill],h=t.b[t.K.qe];n=KA(t,n),t.ba&&n?(r=o,n=KC(t,t.K,s,t.i,r)):(n=KC(t,t.K,s,t.i,r),$.IA(l,t.xa,n,o),$.IA(h,t.xa,n,o)),l.close(),h.close(),t.b=e,l=t.b[i.fill],e=t.b[i.stroke],h=t.b[i.qe],$.HA(l,t.xa,n,o),$.IA(l,t.xa,n,r),$.HA(h,t.xa,n,o),$.IA(h,t.xa,n,r),$.HA(e,t.xa,n,r)}KC(t,i,s,r,a),$.IA(t.b[i.fill],t.xa,s,a),$.IA(t.b[i.qe],t.xa,s,a),$.IA(t.b[i.stroke],t.xa,s,a)},NC=function(t){$.JA.call(this,t)},OC=function(t,e,i,n,s){switch(e=t.b[e.stroke],t.P){case"forward":break;case"backward":i=t.D;break;default:i=(i+t.D)/2}return $.IA(e,t.xa,i,n,i,s),i},PC=function(t){$.JA.call(this,t)},QC=function(t,e,i,n){var s=e.j("x"),a=e.j("zero");e=e.j("value");var o=$.$b(i[n.stroke].stroke());t.wv&&(s=$.R(s,o)),a=(a=$.R(a,1))<e?Math.floor(a):Math.ceil(a),i=i[n.stroke],$.HA(i,t.xa,s,e),$.IA(i,t.xa,s,a)},$.SC=function(t){$.qf.call(this),this.f=this.i={},this.o=0,this.ea=Tc(bda),this.na=Tc(cda),this.K=!0,this.G=this.P=!1,this.aa=!0,this.D=null,this.b=t,$.Ld(this.b,"keydown",this.IU,void 0,this),$.RC&&$.Ld(this.b,"keypress",this.J2,void 0,this),$.Ld(this.b,"keyup",this.E2,void 0,this)},TC=function(t){this.b=t||null,this.next=t?null:{}},eda=function(t){if($.z(t[1]))t=(0,$.Wa)(dda(t[1]),(function(t){return UC(t.key||"",t.keyCode,t.$ha)}));else{var e=t,i=1;for($.A(t[1])&&(e=t[1],i=0),t=[];i<e.length;i+=2)t.push(UC("",e[i],e[i+1]))}return t},dda=function(t){t=(t=t.replace(/[ +]*\+[ +]*/g,"+").replace(/[ ]+/g," ").toLowerCase()).split(" ");for(var e,i=[],n=0;e=t[n];n++){var s=e.split("+"),a=null,o=null;e=0;for(var r,l=0;r=s[l];l++){switch(r){case"shift":e|=1;continue;case"ctrl":e|=2;continue;case"alt":e|=4;continue;case"meta":e|=8;continue}if(s=void 0,a=r,!VC){for(s in o={},WC)o[WC[s]]=Gp((0,window.parseInt)(s,10));VC=o}o=VC[a],a=r;break}i.push({key:a,keyCode:o,$ha:e})}return i},XC=function(t,e,i){var n=e.shift();(0,$.Pe)(n,(function(i){if((i=t[i])&&(0==e.length||i.b))throw Error("Keyboard shortcut conflicts with existing shortcut")})),e.length?(0,$.Pe)(n,(function(n){n=n.toString();var s=new TC;n=n in t?t[n]:t[n]=s,XC(n.next,e.slice(0),i)})):(0,$.Pe)(n,(function(e){t[e]=new TC(i)}))},YC=function(t,e){for(var i=0;i<e.length;i++){var n=t[e[i]];if(n)return n}},UC=function(t,e,i){return e=["c_"+e+"_"+(i=i||0)],""!=t&&e.push("n_"+t+"_"+i),e},ZC=function(t,e,i){wd.call(this,t,i),this.identifier=e},$C=function(t){this.b=t,this.reset()},aD=function(t,e){$.EA.call(this,t,e.j("index")),this.node=e},$.bD=function(t,e){$.Bx.call(this),this.Hr=["x","value"],this.fh=0,this.ba=[],this.Uc=[],this.data(t,e)},$.cD=function(t,e){var i=[];if(e){for(var n=e;n=n.getParent();)i.unshift(t.ce(n.j("index")));i.push(t.ce(e.j("index")))}return i},$.dD=function(){},fD=function(t,e,i){if(t=t.Ya?t.Ya():t){var n=[e];$.hd&&!$.bd("7")&&(n=$.eD($.Kj(t),e)).push(e),(i?$.Rj:Waa)(t,n)}},$.gD=function(t,e,i){(t=i||t.zH())&&t!=(i=e.getAttribute("role")||null)&&$.xy(e,t)},$.jD=function(t,e,i){e.Oe()||$.zy(i,"hidden",!e.Oe()),e.isEnabled()||t.Tu(i,1,!e.isEnabled()),$.hD(e,8)&&t.Tu(i,8,e.Ve()),$.hD(e,16)&&t.Tu(i,16,$.iD(e,16)),$.hD(e,64)&&t.Tu(i,64,$.iD(e,64))},$.kD=function(t,e){var i=t.Hh(),n=[i],s=t.Hh();for(s!=i&&n.push(s),i=e.dc,s=[];i;){var a=i&-i;s.push(t.$G(a)),i&=~a}return n.push.apply(n,s),(i=e.Cs)&&n.push.apply(n,i),$.hd&&!$.bd("7")&&n.push.apply(n,$.eD(n)),n},$.eD=function(t,e){var i=[];return e&&(t=$.Ga(t,[e])),(0,$.Pe)([],(function(n){!(0,$.lD)(n,$.qa($.Aa,t))||e&&!$.Aa(n,e)||i.push(n.join("_"))})),i},$.mD=function(t){var e=t.Hh();t.b={1:e+"-disabled",2:e+"-hover",4:e+"-active",8:e+"-selected",16:e+"-checked",32:e+"-focused",64:e+"-open"}},$.nD=function(){},$.oD=function(t,e){t&&(e?t.title=e:t.removeAttribute("title"))},$.qD=function(t,e){if(!t)throw Error("Invalid class name "+t);if(!$.D(e))throw Error("Invalid decorator function "+e);$.pD[t]=e},$.sD=function(t,e,i){if($.By.call(this,i),!e){e=this.constructor;for(var n;e&&(n=$.oa(e),!(n=rD[n]));)e=e.u?e.u.constructor:null;e=n?$.D(n.Id)?n.Id():new n:null}this.i=e,this.Qd=$.p(t)?t:null},$.uD=function(t,e){t.xf&&e!=t.WU&&tD(t,e),t.WU=e},$.vD=function(t,e){e&&(t.Cs?$.Aa(t.Cs,e)||t.Cs.push(e):t.Cs=[e],fD(t,e,!0))},wD=function(t,e,i){i?$.vD(t,e):e&&t.Cs&&$.Fa(t.Cs,e)&&(0==t.Cs.length&&(t.Cs=null),fD(t,e,!1))},tD=function(t,e){var i=$.Dy(t),n=t.Ya();e?(i.wa(n,$.xD.oF,t.Sj).wa(n,[$.xD.pF,$.xD.nF],t.tr).wa(n,"mouseover",t.po).wa(n,"mouseout",t.hg),t.BH!=$.ia&&i.wa(n,"contextmenu",t.BH),$.hd&&($.bd(9)||i.wa(n,"dblclick",t.D2),t.K||(t.K=new yD(t),$.rd(t,t.K)))):(i.gc(n,$.xD.oF,t.Sj).gc(n,[$.xD.pF,$.xD.nF],t.tr).gc(n,"mouseover",t.po).gc(n,"mouseout",t.hg),t.BH!=$.ia&&i.gc(n,"contextmenu",t.BH),$.hd&&($.bd(9)||i.gc(n,"dblclick",t.D2),$.qd(t.K),t.K=null))},$.BD=function(t,e){zD(t,4,e)&&AD(t,4,e)},$.CD=function(t,e){zD(t,16,e)&&AD(t,16,e)},$.iD=function(t,e){return!!(t.dc&e)},AD=function(t,e,i,n){n||1!=e?$.hD(t,e)&&i!=$.iD(t,e)&&(t.i.HU(t,e,i),t.dc=i?t.dc|e:t.dc&~e):t.Dj(!i)},$.hD=function(t,e){return!!(t.Lu&e)},DD=function(t,e){return!!(t.mv&e)&&$.hD(t,e)},zD=function(t,e,i){return $.hD(t,e)&&$.iD(t,e)!=i&&(!(t.EJ&e)||t.dispatchEvent($.Cy(e,i)))&&!t.md},ED=function(t,e){return!!t.relatedTarget&&$.cf(e,t.relatedTarget)},yD=function(t){$.od.call(this),this.f=t,this.b=!1,this.qo=new nf(this),$.rd(this,this.qo),t=this.f.Ed,this.qo.wa(t,"mousedown",this.i).wa(t,"mouseup",this.o).wa(t,"click",this.D)},GD=function(t,e){if(!FD)return t.button=0,t.type=e,t;var i=window.document.createEvent("MouseEvents");return i.initMouseEvent(e,t.bubbles,t.cancelable,t.view||null,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,t.relatedTarget||null),i},$.HD=function(){},$.ID=function(t,e,i){$.sD.call(this,t,e||$.HD.Id(),i)},$.JD=function(t,e){t.gb=e,$.oD(t.Ya(),e)},$.KD=function(t,e){var i=t.i,n=$.Ey(t),s=i.Hh()+"-collapse-left";i=i.Hh()+"-collapse-right",wD(t,n?i:s,!!(1&e)),wD(t,n?s:i,!!(2&e))},$.LD=function(t,e,i){$.ID.call(this,t||"",e,i),this.b=null,this.aa=0,this.P=null},$.ND=function(t,e){t.b=e,$.p(void 0)&&(t.aa=void 0),t.xf&&MD(t)},MD=function(t){var e=t.Ya();e=t.i.Gn(e);var i=$.Ae(window.document,"I",null,e)[0];t.b?i?(i.className=t.b,$.Pf(i,!0)):(i=$.Me("I",t.b),$.zy(i,"hidden",!0),$.We(e,i,t.aa),t.P&&(i=$.Me("SPAN","ac-fallback-symbol",t.P),$.We(e,i,t.aa+1))):i&&$.Pf(i,!1)},aa=[],$.OD=$.OD||{},$.fa=this,na="closure_uid_"+(1e9*Math.random()>>>0),aaa=0,$.Ln=Date.now||function(){return+new Date};var jk,wk=null,ue;$.H(ta,Error),ta.prototype.name="CustomError",$.za=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if($.z(t))return $.z(e)&&1==e.length?t.indexOf(e,0):-1;for(var i=0;i<t.length;i++)if(i in t&&t[i]===e)return i;return-1},$.fda=Array.prototype.lastIndexOf?function(t,e){return Array.prototype.lastIndexOf.call(t,e,t.length-1)}:function(t,e){var i=t.length-1;if(0>i&&(i=Math.max(0,t.length+i)),$.z(t))return $.z(e)&&1==e.length?t.lastIndexOf(e,i):-1;for(;0<=i;i--)if(i in t&&t[i]===e)return i;return-1},$.Pe=Array.prototype.forEach?function(t,e,i){Array.prototype.forEach.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=$.z(t)?t.split(""):t,a=0;a<n;a++)a in s&&e.call(i,s[a],a,t)},$.Ye=Array.prototype.filter?function(t,e,i){return Array.prototype.filter.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=[],a=0,o=$.z(t)?t.split(""):t,r=0;r<n;r++)if(r in o){var l=o[r];e.call(i,l,r,t)&&(s[a++]=l)}return s},$.Wa=Array.prototype.map?function(t,e,i){return Array.prototype.map.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=Array(n),a=$.z(t)?t.split(""):t,o=0;o<n;o++)o in a&&(s[o]=e.call(i,a[o],o,t));return s},$.Gg=Array.prototype.reduce?function(t,e,i,n){return n&&(e=(0,$.pa)(e,n)),Array.prototype.reduce.call(t,e,i)}:function(t,e,i,n){var s=i;return(0,$.Pe)(t,(function(i,a){s=e.call(n,s,i,a,t)})),s},$.Qw=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var i=t.length,n=$.z(t)?t.split(""):t,s=0;s<i;s++)if(s in n&&e.call(void 0,n[s],s,t))return!0;return!1},$.lD=Array.prototype.every?function(t,e,i){return Array.prototype.every.call(t,e,i)}:function(t,e,i){for(var n=t.length,s=$.z(t)?t.split(""):t,a=0;a<n;a++)if(a in s&&!e.call(i,s[a],a,t))return!1;return!0},$.g=$.gb.prototype,$.g.clone=function(){return new $.gb(this.x,this.y)},$.g.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},$.g.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},$.g.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},$.g.translate=function(t,e){return t instanceof $.gb?(this.x+=t.x,this.y+=t.y):(this.x+=Number(t),$.ea(e)&&(this.y+=e)),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.x*=t,this.y*=i,this},$.g=$.kb.prototype,$.g.zd=function(){return this.right-this.left},$.g.qd=function(){return this.bottom-this.top},$.g.clone=function(){return new $.kb(this.top,this.right,this.bottom,this.left)},$.g.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},$.g.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},$.g.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this},$.g.translate=function(t,e){return t instanceof $.gb?(this.left+=t.x,this.right+=t.x,this.top+=t.y,this.bottom+=t.y):(this.left+=t,this.right+=t,$.ea(e)&&(this.top+=e,this.bottom+=e)),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.left*=t,this.right*=t,this.top*=i,this.bottom*=i,this},$.g=$.lb.prototype,$.g.clone=function(){return new $.lb(this.width,this.height)},$.g.zC=function(){return this.width*this.height},$.g.aspectRatio=function(){return this.width/this.height},$.g.Uj=function(){return!this.zC()},$.g.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},$.g.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},$.g.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.width*=t,this.height*=i,this},$.g=$.I.prototype,$.g.clone=function(){return new $.I(this.left,this.top,this.width,this.height)},$.g.so=function(t){return this.left<=t.left+t.width&&t.left<=this.left+this.width&&this.top<=t.top+t.height&&t.top<=this.top+this.height},$.g.Tf=function(t){return Math.sqrt($.rb(this,t))},$.g.ceil=function(){return this.left=Math.ceil(this.left),this.top=Math.ceil(this.top),this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},$.g.floor=function(){return this.left=Math.floor(this.left),this.top=Math.floor(this.top),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},$.g.round=function(){return this.left=Math.round(this.left),this.top=Math.round(this.top),this.width=Math.round(this.width),this.height=Math.round(this.height),this},$.g.translate=function(t,e){return t instanceof $.gb?(this.left+=t.x,this.top+=t.y):(this.left+=t,$.ea(e)&&(this.top+=e)),this},$.g.scale=function(t,e){var i=$.ea(e)?e:t;return this.left*=t,this.width*=t,this.top*=i,this.height*=i,this},$.gb.prototype.Gh=function(){return this.x},$.gb.prototype.As=function(){return this.y},$.g=$.I.prototype,$.g.tb=function(){return this.left},$.g.Vb=function(){return this.top},$.g.zd=function(){return this.width},$.g.qd=function(){return this.height},$.g.cb=function(){return this.left+this.width},$.g.Va=function(){return this.top+this.height},$.lb.prototype.zd=function(){return this.width},$.lb.prototype.qd=function(){return this.height},$.E("acgraph.math.Size",$.lb),$.E("acgraph.math.coordinate",(function(t,e){return new $.gb(t,e)})),$.E("acgraph.math.rect",(function(t,e,i,n){return new $.I(t,e,i,n)})),$.E("acgraph.math.Rect",$.I);var PD=$.gb.prototype,iaa,jaa,kaa,laa,maa,naa,haa,rc,qc,oaa,Bc;PD.getX=PD.Gh,PD.getY=PD.As,PD=$.I.prototype,PD.getWidth=PD.zd,PD.getHeight=PD.qd,PD.getLeft=PD.tb,PD.getTop=PD.Vb,PD.getWidth=PD.zd,PD.getHeight=PD.qd,PD.getRight=PD.cb,PD.getBottom=PD.Va,$.g=$.Db.prototype,$.g.clone=function(){return new $.Db(this.od,this.We,this.gf,this.Le,this.Jd,this.Fd)},$.g.setTransform=function(t,e,i,n,s,a){if(!($.ea(t)&&$.ea(e)&&$.ea(i)&&$.ea(n)&&$.ea(s)&&$.ea(a)))throw Error("Invalid transform parameters");return this.od=t,this.We=e,this.gf=i,this.Le=n,this.Jd=s,this.Fd=a,this},$.g.scale=function(t,e){return this.od*=t,this.We*=t,this.gf*=e,this.Le*=e,this},$.g.translate=function(t,e){return this.Jd+=t*this.od+e*this.gf,this.Fd+=t*this.We+e*this.Le,this},$.g.rotate=function(t,e,i){return $.wb(this,$.Kb(t,e,i))},$.g.toString=function(){return"matrix("+[this.od,this.We,this.gf,this.Le,this.Jd,this.Fd].join()+")"},$.g.transform=function(t,e,i,n,s){var a=e;for(e+=2*s;a<e;){s=t[a++];var o=t[a++];i[n++]=s*this.od+o*this.gf+this.Jd,i[n++]=s*this.We+o*this.Le+this.Fd}},$.E("acgraph.vector.normalizeFill",$.Ub),$.E("acgraph.vector.normalizeStroke",$.Wb),$.E("acgraph.vector.normalizeHatchFill",$.Yb),$.E("acgraph.vector.normalizeTextShadow",$.Zb),$.ja($.ac),$.ac.prototype.f=0,$.ac.prototype.i=(1e9*Math.random()>>>0).toString(16),$.ac.prototype.b="ac_uid_"+(1e9*Math.random()>>>0),$.vc=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},iaa=/&/g,jaa=/</g,kaa=/>/g,laa=/"/g,maa=/'/g,naa=/\x00/g,haa=/[\x00&<>"']/,rc={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"},qc={"'":"\\'"},oaa=String.prototype.repeat?function(t,e){return t.repeat(e)}:function(t,e){return Array(e+1).join(t)};t:{var QD=$.fa.navigator;if(QD){var RD=QD.userAgent;if(RD){Bc=RD;break t}}Bc=""}var Rc="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Jca,hda,ida,jda,kda,a2;Yc[" "]=$.ia,$.yd=$.Cc("Opera"),$.hd=$.Uc(),$.Hp=$.Cc("Edge"),$.gda=$.Hp||$.hd,$.gd=$.Cc("Gecko")&&!(-1!=Bc.toLowerCase().indexOf("webkit")&&!$.Cc("Edge"))&&!($.Cc("Trident")||$.Cc("MSIE"))&&!$.Cc("Edge"),$.xd=-1!=Bc.toLowerCase().indexOf("webkit")&&!$.Cc("Edge"),$.Ad=$.Cc("Macintosh"),$.RC=$.Cc("Windows"),Jca=$.Cc("Linux")||$.Cc("CrOS"),hda=$.Cc("Android"),ida=Wc(),jda=$.Cc("iPad"),kda=$.Cc("iPod"),$.lda=Xc();t:{var SD="",TD=(a2=Bc,$.gd?/rv:([^\);]+)(\)|;)/.exec(a2):$.Hp?/Edge\/([\d\.]+)/.exec(a2):$.hd?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a2):$.xd?/WebKit\/(\S+)/.exec(a2):$.yd?/(?:Version)[ \/]?(\S+)/.exec(a2):void 0);if(TD&&(SD=TD?TD[1]:""),$.hd){var UD=$c();if(null!=UD&&UD>(0,window.parseFloat)(SD)){$.ad=String(UD);break t}}$.ad=SD}var qaa={},VD,WD=$.fa.document;VD=WD&&$.hd?$c()||("CSS1Compat"==WD.compatMode?(0,window.parseInt)($.ad,10):5):void 0;var cd=VD,saa={0:"Can't find an error message that corresponds to the specified error code",1:"Requested stage type is not supported",2:"Container should be defined to render stage",3:"Stage should have a DOM element",4:"Unable to set the parent component",5:"Trying to perform an operation with the disposed element",6:"Synchronous rendering didn't clean up all dirty states",7:"Can't add an element constructed by another Stage",8:"Wrong arguments passed to swapChildren",9:"Path must start with moveTo command",10:"Method must be implemented",11:"Missing required parameter",12:"Parameter type mismatch",13:"Required parameter is null or undefined",14:"Invalid number of parameters",15:"Sorry, this feature in not supported in VML oriented browsers"},uaa=!$.hd||$.dd(9),Xd=!$.hd||$.dd(9),mda=$.hd&&!$.bd("9"),zaa=function(){if(!$.fa.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return $.fa.addEventListener("test",$.ia,e),$.fa.removeEventListener("test",$.ia,e),t}(),md=0,nd={};$.od.prototype.md=!1,$.od.prototype.ld=function(){if(!this.md&&(this.md=!0,this.R(),0!=md)){var t=$.oa(this);delete nd[t]}},$.od.prototype.R=function(){if(this.bv)for(;this.bv.length;)this.bv.shift()()},wd.prototype.stopPropagation=function(){this.b=!0},wd.prototype.preventDefault=function(){this.defaultPrevented=!0,this.q5=!1},$.xD={pna:"click",wra:"rightclick",Una:"dblclick",oF:"mousedown",pF:"mouseup",Mpa:"mouseover",Lpa:"mouseout",Kpa:"mousemove",Ipa:"mouseenter",Jpa:"mouseleave",nF:"mousecancel",Jra:"selectionchange",Kra:"selectstart",$sa:"wheel",lpa:"keypress",kpa:"keydown",mpa:"keyup",Jma:"blur",Roa:"focus",Vna:"deactivate",Soa:"focusin",Toa:"focusout",kna:"change",rra:"reset",Hra:"select",nsa:"submit",hpa:"input",kra:"propertychange",toa:"dragstart",ooa:"drag",qoa:"dragenter",soa:"dragover",roa:"dragleave",f8:"drop",poa:"dragend",zsa:"touchstart",ysa:"touchmove",xsa:"touchend",wsa:"touchcancel",Gma:"beforeunload",yna:"consolemessage",zna:"contextmenu",Xna:"devicechange",Yna:"devicemotion",Zna:"deviceorientation",hoa:"DOMContentLoaded",Aoa:"error",J8:"help",upa:"load",Cpa:"losecapture",tqa:"orientationchange",qra:"readystatechange",sra:"resize",Era:"scroll",Gsa:"unload",Qma:"canplay",Rma:"canplaythrough",voa:"durationchange",yoa:"emptied",zoa:"ended",xpa:"loadeddata",ypa:"loadedmetadata",Cqa:"pause",Uqa:"play",Vqa:"playing",nra:"ratechange",Fra:"seeked",Gra:"seeking",isa:"stalled",psa:"suspend",vsa:"timeupdate",Vsa:"volumechange",Xsa:"waiting",gsa:"sourceopen",fsa:"sourceended",esa:"sourceclosed",Ula:"abort",Jsa:"update",Msa:"updatestart",Ksa:"updateend",$oa:"hashchange",zqa:"pagehide",Aqa:"pageshow",jra:"popstate",Cna:"copy",Bqa:"paste",J7:"cut",Ama:"beforecopy",Bma:"beforecut",Ema:"beforepaste",rqa:"online",qqa:"offline",Fpa:"message",vna:"connect",ipa:"install",Wla:"activate",Ioa:"fetch",Voa:"foreignfetch",Gpa:"messageerror",jsa:"statechange",Lsa:"updatefound",Bna:"controllerchange",ima:zd("AnimationStart"),gma:zd("AnimationEnd"),hma:zd("AnimationIteration"),Asa:zd("TransitionEnd"),Zqa:"pointerdown",fra:"pointerup",Yqa:"pointercancel",bra:"pointermove",dra:"pointerover",cra:"pointerout",$qa:"pointerenter",ara:"pointerleave",Yoa:"gotpointercapture",Dpa:"lostpointercapture",Opa:"MSGestureChange",Ppa:"MSGestureEnd",Qpa:"MSGestureHold",Rpa:"MSGestureStart",Spa:"MSGestureTap",Tpa:"MSGotPointerCapture",Upa:"MSInertiaStart",Vpa:"MSLostPointerCapture",Wpa:"MSPointerCancel",Xpa:"MSPointerDown",Ypa:"MSPointerEnter",Zpa:"MSPointerHover",$pa:"MSPointerLeave",aqa:"MSPointerMove",bqa:"MSPointerOut",cqa:"MSPointerOver",dqa:"MSPointerUp",n$:"text",tsa:$.hd?"textinput":"textInput",sna:"compositionstart",tna:"compositionupdate",rna:"compositionend",Cma:"beforeinput",Foa:"exit",vpa:"loadabort",wpa:"loadcommit",zpa:"loadredirect",Apa:"loadstart",Bpa:"loadstop",tra:"responsive",asa:"sizechanged",Hsa:"unresponsive",Usa:"visibilitychange",msa:"storage",moa:"DOMSubtreeModified",ioa:"DOMNodeInserted",koa:"DOMNodeRemoved",loa:"DOMNodeRemovedFromDocument",joa:"DOMNodeInsertedIntoDocument",foa:"DOMAttrModified",goa:"DOMCharacterDataModified",Fma:"beforeprint",Zla:"afterprint",Dma:"beforeinstallprompt",jma:"appinstalled"},$.H($.Bd,wd);var vaa=[1,4,2],taa={2:"touch",3:"pen",4:"mouse"};$.Bd.prototype.OA=function(){return Cd(this,0)&&!($.xd&&$.Ad&&this.ctrlKey)},$.Bd.prototype.stopPropagation=function(){$.Bd.u.stopPropagation.call(this),this.kf.stopPropagation?this.kf.stopPropagation():this.kf.cancelBubble=!0},$.Bd.prototype.preventDefault=function(){$.Bd.u.preventDefault.call(this);var t=this.kf;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,mda)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}},$.Bd.prototype.J1=ba(0);var Dd="closure_listenable_"+(1e6*Math.random()|0),waa=0;Hd.prototype.add=function(t,e,i,n,s){var a=t.toString();(t=this.b[a])||(t=this.b[a]=[],this.f++);var o=Jd(t,e,n,s);return-1<o?(e=t[o],i||(e.gL=!1)):((e=new xaa(e,this.src,a,!!n,s)).gL=i,t.push(e)),e},Hd.prototype.remove=function(t,e,i,n){if(!((t=t.toString())in this.b))return!1;var s=this.b[t];return-1<(e=Jd(s,e,i,n))&&(Gd(s[e]),Ea(s,e),0==s.length&&(delete this.b[t],this.f--),!0)},Hd.prototype.fH=function(t,e,i,n){var s=-1;return(t=this.b[t.toString()])&&(s=Jd(t,e,i,n)),-1<s?t[s]:null};var Ud="closure_lm_"+(1e6*Math.random()|0),ce={},fe="__closure_events_fn_"+(1e9*Math.random()>>>0);$.E("acgraph.events.listen",$.Ld),$.E("acgraph.events.listenOnce",Kd),$.E("acgraph.events.unlisten",$.Yd),$.E("acgraph.events.unlistenByKey",Zd),$.E("acgraph.events.removeAll",$.$d);var Baa=!$.hd||$.dd(9),Caa=!$.gd&&!$.hd||$.hd&&$.dd(9)||$.gd&&$.bd("1.9.1"),XD=$.hd&&!$.bd("9"),Daa=$.hd||$.yd||$.xd;$.he.prototype.By=!0,$.he.prototype.cu=function(){return this.b},$.he.prototype.toString=function(){return"Const{"+this.b+"}"},$.ge={},$.ie(""),$.ke.prototype.By=!0,$.ke.prototype.cu=function(){return this.f},$.ke.prototype.jV=!0,$.ke.prototype.b=ba(2),$.je={},$.le("about:blank"),$.ne.prototype.By=!0,$.me={},$.ne.prototype.cu=function(){return this.b},$.nda=$.oe(""),$.YD=RegExp("\\b(url\\([ \t\n]*)('[ -&(-\\[\\]-~]*'|\"[ !#-\\[\\]-~]*\"|[!#-&*-\\[\\]-~]*)([ \t\n]*\\))","g"),$.oda=RegExp("\\b(hsl|hsla|rgb|rgba|matrix|(rotate|scale|translate)(X|Y|Z|3d)?)\\([-0-9a-z.%, ]+\\)","g"),$.qe.prototype.jV=!0,$.qe.prototype.b=ba(1),$.qe.prototype.By=!0,$.qe.prototype.cu=function(){return this.f},$.pe={},$.re("<!DOCTYPE html>",0),$.re("",0),$.re("<br>",0);var Be={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Eaa={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},mf={IMG:" ",BR:"\n"};$.g=se.prototype,$.g.Ya=function(t){return $.ze(this.b,t)},$.g.getElementsByTagName=function(t,e){return(e||this.b).getElementsByTagName(String(t))},$.g.Ac=function(t,e,i){return Le(this.b,arguments)},$.g.createElement=function(t){return $.Re(this.b,t)},$.g.appendChild=$.Se,$.g.canHaveChildren=function(t){if(1!=t.nodeType)return!1;switch(t.tagName){case"APPLET":case"AREA":case"BASE":case"BR":case"COL":case"COMMAND":case"EMBED":case"FRAME":case"HR":case"IMG":case"INPUT":case"IFRAME":case"ISINDEX":case"KEYGEN":case"LINK":case"NOFRAMES":case"NOSCRIPT":case"META":case"OBJECT":case"PARAM":case"SCRIPT":case"SOURCE":case"STYLE":case"TRACK":case"WBR":return!1}return!0},$.g.Gi=$.Ve,$.g.Yga=$.We,$.g.Sl=$.Ze,$.g.W1=$.$e,$.g.$H=$.af,$.H(nf,$.od);var ZD=[];$.g=nf.prototype,$.g.wa=function(t,e,i,n){$.A(e)||(e&&(ZD[0]=e.toString()),e=ZD);for(var s=0;s<e.length;s++){var a=$.Ld(t,e[s],i||this.handleEvent,n||!1,this.qo||this);if(!a)break;this.b[a.key]=a}return this},$.g.Ce=function(t,e,i,n){return of(this,t,e,i,n)},$.g.gc=function(t,e,i,n,s){if($.A(e))for(var a=0;a<e.length;a++)this.gc(t,e[a],i,n,s);else(t=$.be(t,e,i||this.handleEvent,$.C(n)?!!n.capture:!!n,s||this.qo||this))&&(Zd(t),delete this.b[t.key]);return this},$.g.R=function(){nf.u.R.call(this),pf(this)},$.g.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},$.H($.qf,$.od),$.qf.prototype[Dd]=!0,$.g=$.qf.prototype,$.g.Zi=function(){return this.TW},$.g.kb=function(t){this.TW=t},$.g.addEventListener=function(t,e,i,n){$.Ld(this,t,e,i,n)},$.g.removeEventListener=function(t,e,i,n){$.Yd(this,t,e,i,n)},$.g.dispatchEvent=function(t){var e,i=this.Zi();if(i)for(e=[];i;i=i.Zi())e.push(i);i=this.N$;var n=t.type||t;if($.z(t))t=new wd(t,i);else if(t instanceof wd)t.target=t.target||i;else{var s=t;t=new wd(n,i),$.Sc(t,s)}if(s=!0,e)for(var a=e.length-1;!t.b&&0<=a;a--){var o=t.currentTarget=e[a];s=$.sf(o,n,!0,t)&&s}if(t.b||(o=t.currentTarget=i,s=$.sf(o,n,!0,t)&&s,t.b||(s=$.sf(o,n,!1,t)&&s)),e)for(a=0;!t.b&&a<e.length;a++)o=t.currentTarget=e[a],s=$.sf(o,n,!1,t)&&s;return s},$.g.R=function(){$.qf.u.R.call(this),this.Bl(),this.TW=null},$.g.wa=function(t,e,i,n){return this.gy.add(String(t),e,!1,i,n)},$.g.Ce=function(t,e,i,n){return this.gy.add(String(t),e,!0,i,n)},$.g.gc=function(t,e,i,n){return this.gy.remove(String(t),e,i,n)},$.g.TB=function(t){return Id(this.gy,t)},$.g.Bl=function(t){if(this.gy){var e=this.gy;t=t&&t.toString();var i,n=0;for(i in e.b)if(!t||i==t){for(var s=e.b[i],a=0;a<s.length;a++)++n,Gd(s[a]);delete e.b[i],e.f--}e=n}else e=0;return e},$.g.fH=function(t,e,i,n){return this.gy.fH(String(t),e,i,n)};var vf={},Rf=$.gd?"MozUserSelect":$.xd||$.Hp?"WebkitUserSelect":null,Yf={thin:2,medium:4,thick:6},qda,rda,sda;$.pda=function(){if($.RC){var t=/Windows NT ([0-9.]+)/;return(t=t.exec(Bc))?t[1]:"0"}return $.Ad?(t=(t=/10[_.][0-9_.]+/).exec(Bc))?t[0].replace(/_/g,"."):"10":hda?(t=(t=/Android\s+([^\);]+)(\)|;)/).exec(Bc))?t[1]:"":(ida||jda||kda)&&(t=(t=/(?:iPhone|CPU)\s+OS\s+(\S+)/).exec(Bc))?t[1].replace(/_/g,"."):""}(),qda=$.Cc("Firefox"),$.$D=Wc()||$.Cc("iPod"),$.aE=$.Cc("iPad"),rda=$.Cc("Android")&&!(Vc()||$.Cc("Firefox")||$.Cc("Opera")||$.Cc("Silk")),sda=Vc(),$.bE=$.Cc("Safari")&&!(Vc()||$.Cc("Coast")||$.Cc("Opera")||$.Cc("Edge")||$.Cc("Silk")||$.Cc("Android"))&&!Xc(),$.tda=function(){if(qda)return $f(/Firefox\/([0-9.]+)/);if($.hd||$.Hp||$.yd)return $.ad;if(sda)return Xc()?$f(/CriOS\/([0-9.]+)/):$f(/Chrome\/([0-9.]+)/);if($.bE&&!Xc())return $f(/Version\/([0-9.]+)/);if($.$D||$.aE){var t=/Version\/(\S+).*Mobile\/(\S+)/.exec(Bc);if(t)return t[1]+"."+t[2]}else if(rda)return(t=$f(/Android\s+([0-9.]+)/))?t:$f(/Version\/([0-9.]+)/);return""}(),$.H($.ag,$.qf);var Faa=$.fa.document&&$.fa.document.documentElement&&!!$.fa.document.documentElement.setCapture&&!!$.fa.document.releaseCapture;$.g=$.ag.prototype,$.g.NX=function(t){this.f=t||new $.I(window.NaN,window.NaN,window.NaN,window.NaN)},$.g.Dj=function(t){this.K=t},$.g.R=function(){$.ag.u.R.call(this),$.Yd(this.D,["touchstart","mousedown"],this.lk,!1,this),pf(this.Qg),this.G&&this.o.releaseCapture(),this.D=this.target=null},$.g.lk=function(t){var e="mousedown"==t.type;if(!this.K||this.lp||e&&!t.OA())this.dispatchEvent("earlycancel");else{if(0==this.P){if(!this.dispatchEvent(new dg("start",this,t.clientX,t.clientY,t)))return;this.lp=!0,e&&t.preventDefault()}else e&&t.preventDefault();var i=(e=this.o).documentElement,n=!this.G;this.Qg.wa(e,["touchmove","mousemove"],this.Aga,{capture:n,passive:!1}),this.Qg.wa(e,["touchend","mouseup"],this.ey,n),this.G?(i.setCapture(!1),this.Qg.wa(i,"losecapture",this.ey)):this.Qg.wa(e?$.Ge(e):window,"blur",this.ey),this.D5&&this.Qg.wa(this.D5,"scroll",this.eja,n),this.clientX=this.na=t.clientX,this.clientY=this.Ba=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,this.ar(),this.aa=$.He($.ye(this.o).b)}},$.g.ey=function(t,e){if(pf(this.Qg),this.G&&this.o.releaseCapture(),this.lp){this.lp=!1;var i=this.VA(this.deltaX),n=this.xw(this.deltaY);this.dispatchEvent(new dg("end",this,t.clientX,t.clientY,t,i,n,e||"touchcancel"==t.type))}else this.dispatchEvent("earlycancel")},$.g.Aga=function(t){if(this.K){var e=t.clientX-this.clientX,i=t.clientY-this.clientY;if(this.clientX=t.clientX,this.clientY=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,!this.lp){var n=this.na-this.clientX,s=this.Ba-this.clientY;if(n*n+s*s>this.P){if(!this.dispatchEvent(new dg("start",this,t.clientX,t.clientY,t)))return void(this.md||this.ey(t));this.lp=!0}}e=(i=cg(this,e,i)).x,i=i.y,this.lp&&this.dispatchEvent(new dg("beforedrag",this,t.clientX,t.clientY,t,e,i))&&(eg(this,t,e,i),t.preventDefault())}},$.g.eja=function(t){var e=cg(this,0,0);t.clientX=this.clientX,t.clientY=this.clientY,eg(this,t,e.x,e.y)},$.g.VA=function(t){var e=this.f,i=(0,window.isNaN)(e.left)?null:e.left;return e=(0,window.isNaN)(e.width)?0:e.width,Math.min(null!=i?i+e:window.Infinity,Math.max(null!=i?i:-window.Infinity,t))},$.g.xw=function(t){var e=this.f,i=(0,window.isNaN)(e.top)?null:e.top;return e=(0,window.isNaN)(e.height)?0:e.height,Math.min(null!=i?i+e:window.Infinity,Math.max(null!=i?i:-window.Infinity,t))},$.g.ar=function(){this.deltaX=this.target.offsetLeft,this.deltaY=this.target.offsetTop},$.g.ls=function(t,e){this.target.style.left=t+"px",this.target.style.top=e+"px"},$.H(dg,wd),$.H(fg,$.ag),$.g=fg.prototype,$.g.Vja=function(){return this.i.dispatchEvent("earlycancel")},$.g.LO=function(t){return this.i.dispatchEvent(new dg(t.type,this,t.clientX,t.clientY,t.EC,t.left,t.top,t.o))},$.g.NX=function(t){this.f=t||new $.I(window.NaN,window.NaN,window.NaN,window.NaN)},$.g.ar=function(){this.deltaX=this.i.H1(),this.deltaY=this.i.I1()},$.g.VA=function(){if(this.b[0]=this.deltaX,this.b[1]=this.deltaY,!(0,window.isNaN)(this.f.left)||!(0,window.isNaN)(this.f.top)){var t=this.i.parent().Ig();t&&og(this.i.parent()).transform(this.b,0,this.b,0,1);var e=this.f,i=(0,window.isNaN)(e.left)?null:e.left,n=(0,window.isNaN)(e.width)?0:e.width,s=(0,window.isNaN)(e.top)?null:e.top;e=(0,window.isNaN)(e.height)?0:e.height,n-=this.i.zd(),e-=this.i.qd(),e=null!=s?s+e:window.Infinity,s=null!=s?s:-window.Infinity,this.b[0]=Math.min(null!=i?i+n:window.Infinity,Math.max(null!=i?i:-window.Infinity,this.b[0])),this.b[1]=Math.min(e,Math.max(s,this.b[1])),t&&t.transform(this.b,0,this.b,0,1)}return this.b[0]},$.g.xw=function(){return this.b[1]},$.g.ls=function(t,e){var i=og(this.i.parent());if(i){var n=[t,e];i.transform(n,0,n,0,1),t=n[0],e=n[1]}this.i.setPosition(t,e)},$.H($.ig,$.qf);var gg=4294967295;$.g=$.ig.prototype,$.g.EG=!1,$.g.YC=!1,$.g.nx=null,$.g.ox=null,$.g.zv=null,$.g.Av=null,$.g.rw=!1,$.g.VC=null,$.g.iE=null,$.g.Ud=null,$.g.Y=null,$.g.lB=null,$.g.hj=!0,$.g.ti=null,$.g.RL=!1,$.g.Pd=null,$.g.YG=null,$.g.WY=0,$.g.il=506631,$.g.XC=0,$.g.id=function(t){return $.p(t)?(t=t||"",this.he!=t&&(this.he=t,this.Pb(2048)),this):($.p(this.he)||this.id(bc($.ac.Id(),this)),this.he)},$.g.Ja=function(){var t=this.parent();return t?t.Ja():null},$.g.ia=function(){return this.Ud},$.g.parent=function(t){if($.p(t)){if(t){if(t!=this.Y){var e=this.Ja();e=e&&e!=t.Ja(),t.hc(this),e&&this.EO()}}else this.remove();return this}return this.Y},$.g.EO=function(){var t=this.clip();t&&t.id(null),this.Pb(536)},$.g.eN=function(){return!!this.Y},$.g.remove=function(){return this.Y&&this.Y.removeChild(this),this},$.g.title=function(t){return $.p(t)?(this.ox!=t&&(this.ox=t,this.Pb(65536)),this):this.ox},$.g.bT=function(t){return $.p(t)?(this.Av!=t&&(this.Av=t,this.Pb(131072)),this):this.Av},$.g.Cd=function(t,e){return $.p(e)?(this.BC[t]!==e&&(this.BC[t]=e,this.Pb(262144)),this):t in this.BC?this.BC[t]:$.mg().getAttribute(this.Ud,t)},$.g.cursor=function(t){return $.p(t)?(this.VC=t,this.tG(),this):this.VC},$.g.tG=function(){this.Pb(4096)},$.g.yr=function(){return!!this.XC},$.g.Vf=function(t){return!!(this.XC&t)},$.g.suspend=function(){this.IV=!0},$.g.resume=function(){this.IV=!1,this.Pb(this.FP),this.FP=0},$.g.Pb=function(t){(t&=this.il)&&(this.IV?this.FP|=t:(this.XC|=t,this.Y&&this.Y.Pb(64),!(t=this.Ja())||t.yf()||t.wN()||this.wN()||this.Sd()))},$.g.fl=function(t){return this.Y&&this.Y==t||(this.lB?this.lB==t&&(this.lB=null):this.lB=this.Y,this.Y=t,this.kb(t)),this},$.g.qv=$.ia,$.g.Mr=function(){this.vV=this.YG=null,this.ae(),this.Pb(4),ng(this)},$.g.Uy=function(){this.YG=null,this.ae(),$.mg().OI()&&this.Pb(256),ng(this)},$.g.Ig=function(){if(!this.YG){var t=this.Y?this.Y.Ig():null;this.YG=yb(t,this.Pd)}return this.YG},$.g.rotate=function(t,e,i){return this.qv(),t=$.Kb($.bb(t),e||0,i||0),this.Pd?$.Hb(this.Pd,t):this.Pd=t,this.Mr(),this},$.g.Du=function(t,e){var i=Lb(this.rb(),e||"center");return this.rotate(t,i[0],i[1])},$.g.JE=function(t,e,i){return this.rotate(t-this.tD(),e,i)},$.g.gP=function(t,e){return this.Du(t-this.tD(),e)},$.g.translate=function(t,e){return this.qv(),this.Pd?this.Pd.translate(t,e):this.Pd=(new $.Db).setTransform(1,0,0,1,t,e),this.Mr(),this},$.g.setPosition=function(t,e){var i=[t,e,this.Gh(),this.As()];return this.Pd&&$.Jb(this.Pd).transform(i,0,i,0,2),this.translate(i[0]-i[2],i[1]-i[3])},$.g.wka=function(t,e){if(this.qv(),this.Pd){var i=this.Pd.Jd,n=this.Pd.Fd;if(t==i&&e==n)return this;$.Fb(this.Pd,t-i,e-n)}else this.Pd=(new $.Db).setTransform(1,0,0,1,t,e);return this.Mr(),this},$.g.scale=function(t,e,i,n){return this.qv(),this.Pd||(this.Pd=new $.Db),$.Eb(this.Pd,t,e),$.Fb(this.Pd,(i||0)*(1-t),(n||0)*(1-e)),this.Mr(),this},$.g.XO=function(t,e,i){return i=Lb(this.rb(),i||"center"),this.scale(t,e,i[0],i[1])},$.g.RF=function(t,e,i,n,s,a){return this.qv(),this.Pd?$.wb(this.Pd,new $.Db(t,e,i,n,s,a)):this.Pd=new $.Db(t,e,i,n,s,a),this.Mr(),this},$.g.oc=function(t,e,i,n,s,a){return this.qv(),this.Pd?this.Pd.setTransform(t,e,i,n,s,a):this.Pd=new $.Db(t,e,i,n,s,a),this.Mr(),this},$.g.tD=function(){return $.Cb(this.Pd)},$.g.kp=function(){return this.Pd?[this.Pd.od,this.Pd.We,this.Pd.gf,this.Pd.Le,this.Pd.Jd,this.Pd.Fd]:[1,0,0,1,0,0]},$.g.Ac=function(t){var e,i=this.Ja();(e=i)&&(e=(e=cE)!=cE&&2!=e&&3!=e||0<i.xF(1)),(e||t)&&(this.Ud=this.Ft(),Uj(this),$.jg(this,1))},$.g.Ft=function(){return null},$.g.wN=function(){return this.rw},$.g.Sd=function(){if(this.rw=!0,this.md||!this.Ja())return this;if(this.Vf(1)){if(this.Ac(),this.Vf(1))return this;this.EG&&this.Om(this.EG)}return this.h0(),this.jk(),this.rw=!1,this},$.g.h0=function(){},$.g.jk=function(){if(this.Vf(262144)){var t=$.mg(),e=this.BC,i=this.ia();if(i&&$.C(e))for(var n in e){var s=e[n];null===s?i.removeAttribute(n):t.lc(i,n,s)}this.BC={},$.jg(this,262144)}this.Vf(2)&&($.mg().Ji(this),$.jg(this,2)),this.Vf(4096)&&this.k5(),this.Vf(8192)&&($.mg().S5(this),$.jg(this,8192)),(this.Vf(4)||this.Vf(256))&&this.Vw(),this.Vf(512)&&($.mg().HX(this),$.jg(this,512)),this.Vf(32768)&&($.mg().J5(this,this.YC),$.jg(this,32768)),this.Vf(65536)&&($.mg().RX(this,this.ox),$.jg(this,65536)),this.Vf(131072)&&($.mg().JX(this,this.Av),$.jg(this,131072)),this.Vf(2048)&&(t=$.mg(),$.qh(t,this.ia(),this.id()),$.jg(this,2048))},$.g.Vw=function(){$.mg().CB(this),$.jg(this,4),$.jg(this,256)},$.g.k5=function(){$.mg().I5(this,this.VC||this.iE),$.jg(this,4096)},$.g.Dd=function(t){return $.p(t)?(this.RL=!!t,this.Pb(8192),this):this.RL},$.g.dispatchEvent=function(t){return $.z(t)?t=t.toLowerCase():"type"in t&&(t.type=String(t.type).toLowerCase()),$.ig.u.dispatchEvent.call(this,t)},$.g.wa=function(t,e,i,n){return $.ig.u.wa.call(this,String(t).toLowerCase(),e,i,n)},$.g.Ce=function(t,e,i,n){return $.ig.u.Ce.call(this,String(t).toLowerCase(),e,i,n)},$.g.gc=function(t,e,i,n){return $.ig.u.gc.call(this,String(t).toLowerCase(),e,i,n)},$.g.Bl=function(t){return $.p(t)&&(t=String(t).toLowerCase()),$.ig.u.Bl.call(this,t)},$.g.zIndex=function(t){return $.p(t)?(t=+t||0,this.WY!=t&&(this.WY=t,this.Y&&this.Y.Pb(128)),this):this.WY||0},$.g.visible=function(t){return $.p(t)?(t=!!t,this.hj!=t&&(this.hj=t,this.Pb(2)),this):this.hj},$.g.eq=function(t){return $.p(t)?(t=!!t,this.YC!=t&&(this.YC=null==t||t,this.Pb(32768)),this):this.YC},$.g.clip=function(t){if(0==arguments.length)return this.ti;var e="none"==t?null:t;return!this.ti&&!e||this.ti&&this.ti===e||(e&&!$.J(e,$.Dg)?$.J(e,$.pg)&&e.eN()&&$.J(e.parent(),$.Dg)?(this.ti&&!this.ti.md&&$.Fa(this.ti.elements,this),this.ti=e.parent(),$.Ba(this.ti.elements,this)):this.ti?this.ti.shape(e):(this.ti=$.tk(e),$.Ba(this.ti.elements,this)):this.ti=e||null,this.Y&&this.Y.cG(),this.Pb(512)),this},$.g.nl=null,$.g.Gh=function(){return this.rb().left},$.g.As=function(){return this.rb().top},$.g.zd=function(){return this.rb().width},$.g.qd=function(){return this.rb().height},$.g.rb=function(){return this.nl||this.Xt(this.Pd)},$.g.tF=null,$.g.H1=function(){return this.kr().left},$.g.I1=function(){return this.kr().top},$.g.VT=function(){return this.kr().width},$.g.UT=function(){return this.kr().height},$.g.kr=function(){return this.tF||this.Xt(this.Ig())},$.g.Xt=function(t){var e=t==this.Pd;if(this.nl&&e)t=this.nl.clone();else{var i=t==this.Ig();this.tF&&i?t=this.tF.clone():(t=this.HC(t),e&&(this.nl=t.clone()),i&&(this.tF=t.clone()))}return t},$.g.HC=function(t){return $.Ab(this.ck(),t)},$.g.ck=function(){return this.Xt(null)},$.g.ae=function(){this.tF=this.nl=null},$.g.Om=function(t){return null!=t?((this.EG=t)&&!this.Vf(1)?(t=$.J(t,$.I)?this.EG:null,this.mf||(this.mf=new fg(this)),this.mf.Dj(!0),this.mf.NX(t)):this.mf&&this.mf.Dj(!1),this):this.EG},$.g.pe=function(t){if("id"in t&&this.id(t.id),"clip"in t){var e=$.tk();e.pe(t.clip),this.clip(e)}"drag"in t&&(e=t.drag,this.Om($.da(e)?e:new $.I(e.left,e.top,e.width,e.height))),"cursor"in t&&this.cursor(t.cursor),"transformation"in t&&this.oc.apply(this,t.transformation)},$.g.F=function(){var t={};this.he&&(t.id=this.he);var e=this.clip();return e&&(t.clip=e.F()),(e=this.cursor())&&(t.cursor=e),(e=this.Om())&&(t.drag=e),(e=this.Pd)&&(t.transformation=[e.od,e.We,e.gf,e.od,e.Jd,e.Fd]),t},$.g.ld=function(){$.ig.u.ld.call(this)},$.g.R=function(){this.eN()?this.remove():this.gD(),$.ig.u.R.call(this)},$.g.gD=function(){$.sd(this.qo,this.ti,this.mf),this.mf=this.ti=this.qo=null,this.fl(null),ik(this),this.Pd=this.IB=this.Ud=null};var dE=$.ig.prototype;dE.id=dE.id,dE.visible=dE.visible,dE.disableStrokeScaling=dE.eq,dE.domElement=dE.ia,dE.parent=dE.parent,dE.hasParent=dE.eN,dE.remove=dE.remove,dE.attr=dE.Cd,dE.title=dE.title,dE.desc=dE.bT,dE.getStage=dE.Ja,dE.cursor=dE.cursor,dE.disablePointerEvents=dE.Dd,dE.rotate=dE.rotate,dE.rotateByAnchor=dE.Du,dE.setRotation=dE.JE,dE.setRotationByAnchor=dE.gP,dE.translate=dE.translate,dE.setTranslation=dE.wka,dE.setPosition=dE.setPosition,dE.scale=dE.scale,dE.scaleByAnchor=dE.XO,dE.appendTransformationMatrix=dE.RF,dE.setTransformationMatrix=dE.oc,dE.getRotationAngle=dE.tD,dE.getTransformationMatrix=dE.kp,dE.clip=dE.clip,dE.zIndex=dE.zIndex,dE.getX=dE.Gh,dE.getY=dE.As,dE.getWidth=dE.zd,dE.getHeight=dE.qd,dE.getBounds=dE.rb,dE.getAbsoluteX=dE.H1,dE.getAbsoluteY=dE.I1,dE.getAbsoluteWidth=dE.VT,dE.getAbsoluteHeight=dE.UT,dE.getAbsoluteBounds=dE.kr,dE.listen=dE.wa,dE.listenOnce=dE.Ce,dE.unlisten=dE.gc,dE.unlistenByKey=dE.TB,dE.removeAllListeners=dE.Bl,dE.drag=dE.Om,dE.dispose=dE.ld,$.H($.pg,$.ig),$.g=$.pg.prototype,$.g.il=24|$.ig.prototype.il,$.g.fill=function(t,e,i,n,s,a,o){if(!$.p(t))return this.G;var r=$.Ub.apply(this,arguments);return this.G!=r&&(this.G=r,this.ec=2&this.ec|!(!r.mode&&!r.src),this.Pb(8)),this},$.g.stroke=function(t,e,i,n,s){if(!$.p(t))return this.i;var a=$.Wb.apply(this,arguments);return this.i!=a&&(this.i=a,this.ec=1&this.ec|a.mode<<1,this.Pb(16)),this},$.g.gl=function(t){return $.p(t)?($.z(this.i)?this.i={color:this.i,thickness:(0,window.isNaN)(t)?1:+t}:this.i.thickness=(0,window.isNaN)(t)?1:+t,this.Pb(16),this):$.z(this.i)?1:$.$b(this.i)},$.g.h0=function(){this.ec&&this.Vf(32)&&(1&this.ec&&this.Pb(8),2&this.ec&&this.Pb(16))},$.g.jk=function(){$.pg.u.jk.call(this),(this.Vf(8)||this.Vf(16))&&($.mg().R_(this),$.jg(this,8),$.jg(this,16))},$.g.pe=function(t){if("fill"in t){var e=t.fill,i=e.type;"pattern"==i?(i=e.bounds,(i=$.Sb(new $.I(i.left,i.top,i.width,i.height))).pe(e)):"hatchFill"==i?i=Xb(e.hatchType,e.color,e.thickness,e.size):($.C(e)&&"type"in e&&delete e.type,i=e),this.fill(i)}"stroke"in t&&this.stroke(t.stroke),$.pg.u.pe.call(this,t)},$.g.F=function(){var t=$.pg.u.F.call(this);if(this.G){if($.J(this.G,Mg))var e={type:"hatchFill",hatchType:this.G.type,color:this.G.color,thickness:this.G.Ef,size:this.G.size};else $.J(this.G,$.Qb)?e=this.G.F():$.C(this.G)&&"keys"in this.G?"cx"in this.G&&"cy"in this.G?(e=$.fd(this.G)).type="RadialGradientFill":(e=$.fd(this.G)).type="LinearGradientFill":e=this.G;e&&(t.fill=e)}return this.i?t.stroke=this.i:$.C(this.i)&&"keys"in this.i&&("cx"in this.i&&"cy"in this.i?(e=$.fd(this.i)).type="RadialGradientFill":(e=$.fd(this.i)).type="LinearGradientFill",t.stroke=e),t},$.g.R=function(){delete this.G,delete this.i,$.pg.u.R.call(this)};var eE=$.pg.prototype;eE.stroke=eE.stroke,eE.strokeThickness=eE.gl,eE.fill=eE.fill,eE.attr=eE.Cd,$.H(qg,$.pg),$.g=qg.prototype,$.g.il=32|$.pg.prototype.il,$.g.Sm=function(){return"ellipse"},$.g.To=function(t){return $.p(t)?(this.f.x!=t&&(this.f.x=t,this.ae(),this.Pb(32)),this):this.f.x},$.g.Uo=function(t){return $.p(t)?(this.f.y!=t&&(this.f.y=t,this.ae(),this.Pb(32)),this):this.f.y},$.g.Tp=function(t){return $.p(t)?($.ib(this.f,t)||(this.f.x=t.x,this.f.y=t.y,this.ae(),this.Pb(32)),this):this.f.clone()},$.g.Xr=function(t){return $.p(t)?(this.b!=t&&(this.b=t,this.ae(),this.Pb(32)),this):this.b},$.g.zx=function(t){return $.p(t)?(this.o!=t&&(this.o=t,this.ae(),this.Pb(32)),this):this.o},$.g.vka=function(t,e){return this.Xr(t),this.zx(e),this},$.g.ck=function(){return new $.I(this.f.x-this.b,this.f.y-this.o,this.b+this.b,this.o+this.o)},$.g.HC=function(t){if(t){var e=$.tb(this.f.x,this.f.y,this.b,this.o,0,360,!0);t.transform(e,0,e,0,e.length/2),t=ub.apply(null,e)}else t=this.ck();return t},$.g.Ft=function(){return $.mg().H0()},$.g.jk=function(){this.Vf(32)&&(this.Ep(),this.fill()&&this.fill().src&&this.Pb(8)),qg.u.jk.call(this)},$.g.Vw=function(){$.mg().K5(this),$.jg(this,4),$.jg(this,256)},$.g.Ep=function(){$.mg().KX(this),$.jg(this,32)},$.g.pe=function(t){this.To(t.cx).Uo(t.cy),"rx"in t&&this.Xr(t.rx),"ry"in t&&this.zx(t.ry),qg.u.pe.call(this,t)},$.g.F=function(){var t=qg.u.F.call(this);return t.type="ellipse",t.cx=this.To(),t.cy=this.Uo(),t.rx=this.Xr(),t.ry=this.zx(),t},$.g.R=function(){this.ae(),this.f=null,qg.u.R.call(this)},$.E("acgraph.vector.Ellipse",qg);var fE=qg.prototype;fE.center=fE.Tp,fE.centerX=fE.To,fE.centerY=fE.Uo,fE.radiusX=fE.Xr,fE.radiusY=fE.zx,fE.setRadius=fE.vka,$.H($.rg,qg),$.g=$.rg.prototype,$.g.Sm=function(){return"circle"},$.g.Eb=function(t){return null!=t?(this.Xr(t),this.zx(t),this):this.Xr()},$.g.Ft=function(){return $.mg().D0()},$.g.Ep=function(){$.mg().H5(this),$.jg(this,32)},$.g.pe=function(t){this.Xr(t.radius),$.rg.u.pe.call(this,t)},$.g.F=function(){var t=$.rg.u.F.call(this);return t.type="circle",delete t.rx,delete t.ry,t.radius=this.Xr(),t},$.E("acgraph.vector.Circle",$.rg);var gE=$.rg.prototype;gE.radius=gE.Eb,$.H($.sg,$.pg);var Gaa=[,2,2,6,6,2];$.g=$.sg.prototype,$.g.OT=function(t,e,i){tg(t,this.o,this.f,this.D,e,i)},$.g.mfa=function(t,e,i){if(this.pt)var n=this.pt;else{var s=this.Ig();s&&!$.zb(s)?(n=[],this.tJ(),s.transform(this.D,0,n,0,this.D.length/2)):n=this.D}tg(t,this.o,this.f,n,e,i)},$.g.il=32|$.pg.prototype.il,$.g.vv=null,$.g.ag=null,$.g.$X=!0,$.g.pt=null,$.g.Sm=function(){return"path"},$.g.Uj=function(){return 0==this.o.length},$.g.tJ=function(){if(!this.$X){var t=this.D,e=this.o,i=this.f;this.D=[],this.o=[],this.f=[],ug(this),tg((0,$.pa)((function(t,e){hE[t].apply(this,e)}),this),e,i,t),this.Pb(32)}},$.g.YN=function(t,e){return 1==$.ua(this.o)?this.D.length-=2:(this.o.push(1),this.f.push(1)),this.D.push(t,e),this.ag=this.vv=[t,e],this.pt=null,this.Pb(32),this},$.g.Ns=function(t,e,i){var n=$.ua(this.o);if(null==n)throw $.ld(9);for(2!=n&&(this.o.push(2),this.f.push(0)),n=0;n<arguments.length;n+=2)t=arguments[n],e=arguments[n+1],this.D.push(t,e);return this.f[this.f.length-1]+=n/2,this.ag=[t,e],this.ae(),this.pt=null,this.Pb(32),this},$.g.CL=function(t,e,i,n,s,a,o){var r=$.ua(this.o);if(null==r)throw $.ld(9);for(3!=r&&(this.o.push(3),this.f.push(0)),r=0;r<arguments.length;r+=6){var l=arguments[r+4],h=arguments[r+5];this.D.push(arguments[r],arguments[r+1],arguments[r+2],arguments[r+3],l,h)}return this.f[this.f.length-1]+=r/6,this.ag=[l,h],this.ae(),this.pt=null,this.Pb(32),this},$.g.Sja=function(t,e,i,n,s){if(0==this.o.length)throw $.ld(9);for(var a=this.ag[0],o=this.ag[1],r=0;r<arguments.length;r+=4){t=arguments[r],e=arguments[r+1];var l=arguments[r+2],h=arguments[r+3];this.CL(a+2*(t-a)/3,o+2*(e-o)/3,t+(l-t)/3,e+(h-e)/3,l,h),a=l,o=h}return this},$.g.U_=function(t,e,i,n){return t=$.tb(this.ag[0]-$.db(i,t),this.ag[1]-$.eb(i,e),t,e,i,n),this.CL.apply(this,t),this.ae(),this.pt=null,this.Pb(32),this},$.g.mS=function(){var t=$.ua(this.o);if(null==t)throw $.ld(9);return 5!=t&&(this.D.push(this.vv[0],this.vv[1]),this.o.push(5),this.f.push(1),this.ag=this.vv,this.Pb(32)),this},$.g.HC=function(t){if(this.ag){if(t&&!$.zb(t)){var e=[this.ag[0],this.ag[1]];t.transform(e,0,e,0,1),e=new $.I(e[0],e[1],0,0),this.tJ()}else e=new $.I(this.ag[0],this.ag[1],0,0);this.OT((function(t,e){$.kd(iE[t],e,this)}),{rect:e,transform:t},!0)}else e=new $.I(window.NaN,window.NaN,window.NaN,window.NaN);return e},$.g.Mr=function(){$.sg.u.Mr.call(this),this.pt=null},$.g.Uy=function(){$.sg.u.Uy.call(this),this.pt=null},$.g.Vw=function(){$.mg().Q5(this),$.jg(this,4),$.jg(this,256)},$.g.Ft=function(){return $.mg().M0()},$.g.jk=function(){$.sg.u.jk.call(this),this.Vf(32)&&($.mg().OX(this),$.jg(this,32))};var hE,jE=[];jE[1]=$.sg.prototype.YN,jE[2]=$.sg.prototype.Ns,jE[5]=$.sg.prototype.mS,jE[3]=$.sg.prototype.CL,jE[4]=$.sg.prototype.U_,hE=jE;var iE,kE=[];kE[1]=$.ia,kE[2]=function(t){var e=new $.I(0,0,0,0);if(this.transform){var i=arguments;this.transform.transform(i,0,i,0,Math.floor(arguments.length/2))}i=0;for(var n=arguments.length;i<n;i+=2)e.left=arguments[i],e.top=arguments[i+1],$.pb(this.rect,e)},kE[5]=$.ia,kE[3]=function(t){if(this.transform){var e=arguments;this.transform.transform(e,0,e,0,Math.floor(arguments.length/2))}$.pb(this.rect,ub.apply(null,arguments))},kE[4]=function(t,e,i,n,s,a,o,r){var l=new $.I(0,0,0,0);o=[t,o],r=[e,r],t-=$.db(s,i),e-=$.eb(s,n);var h=0<a?90:-90,c=90*(0<a?Math.ceil(s/90):Math.floor(s/90));for(s+=a;c<s^0>a;c+=h)switch((Math.floor(c/90)+4)%4){case 0:o.push(t+i);break;case 1:r.push(e+n);break;case 2:o.push(t-i);break;case 3:r.push(e-n)}l.left=Math.min.apply(null,o),l.width=Math.max.apply(null,o)-l.left,l.top=Math.min.apply(null,r),l.height=Math.max.apply(null,r)-l.top,$.pb(this.rect,l)},iE=kE,$.sg.prototype.Jg=function(){var t=0;if(this.Uj())return t;var e=[];return this.OT((function(i,n){if(1!=i){var s=$.Ja(e,e.length-2);if(4==i){var a=6;n=$.tb(s[0]-$.db(n[2],n[0]),s[1]-$.eb(n[2],n[1]),n[0],n[1],n[2],n[3])}else 2==i?a=2:3==i&&(a=6);for(var o=0,r=n.length-(a-1);o<r;o+=a){Array.prototype.push.apply(s,$.Ja(n,o,o+a));var l,h=t,c=s,u=c.length,d=u/2-1,p=[];for(l=0;l<u;l+=2)p.push({x:c[l],y:c[l+1]});for(c=[],u=0;100>=u;u++){var g={x:0,y:0};if(0==(l=u/100))c.push(p[0]);else if(1===l)c.push(p[d]);else{var f=p,m=1-l;if(1===d)l={x:m*f[0].x+l*f[1].x,y:m*f[0].y+l*f[1].y},c.push(l);else if(4>d){var v=m*m,b=l*l,y=0;if(2===d){f=[f[0],f[1],f[2],g];var S=v,x=m*l*2,w=b}else 3===d&&(S=v*m,x=v*l*3,w=m*b*3,y=l*b);l={x:S*f[0].x+x*f[1].x+w*f[2].x+y*f[3].x,y:S*f[0].y+x*f[1].y+w*f[2].y+y*f[3].y},c.push(l)}else{for(f=JSON.parse(JSON.stringify(p));1<f.length;){for(g=0;g<f.length-1;g++)f[g]={x:f[g].x+(f[g+1].x-f[g].x)*l,y:f[g].y+(f[g+1].y-f[g].y)*l};f.splice(f.length-1,1)}c.push(f[0])}}}for(g=p=0;g<c.length-1;g++)l=c[g],d=(u=c[g+1]).x-l.x,u=u.y-l.y,p+=Math.sqrt(d*d+u*u);t=h+(100*p|0)/100,s=$.Ja(s,s.length-2)}}$.kd(Array.prototype.push,n,e)})),t},$.sg.prototype.pe=function(t){this.vv=t.closePoint,this.ag=t.currentPoint,this.o=t.segments,this.f=t.count,this.D=t.arguments,this.Pb(32),$.sg.u.pe.call(this,t)},$.sg.prototype.F=function(){var t=$.sg.u.F.call(this);return t.type="path",$.yg(this,t)},$.sg.prototype.R=function(){this.ag=this.vv=null,this.ae(),this.pt=null,delete this.o,delete this.f,delete this.D,$.sg.u.R.call(this)},$.H($.Ag,$.sg),$.g=$.Ag.prototype,$.g.clear=function(){return vg(this)},$.g.moveTo=function(t,e){return this.YN(t,e)},$.g.lineTo=function(t,e,i){return $.sg.prototype.Ns.apply(this,arguments)},$.g.Sk=function(t,e,i,n,s,a,o){return $.sg.prototype.CL.apply(this,arguments)},$.g.lK=function(t,e,i,n,s){return $.sg.prototype.Sja.apply(this,arguments)},$.g.Fe=function(t,e,i,n,s,a,o){return t+=$.db(s,i),e+=$.eb(s,n),this.ag&&this.ag[0]==t&&this.ag[1]==e||(o?this.Ns(t,e):this.YN(t,e)),wg(this,i,n,s,a)},$.g.Ff=function(t,e,i,n,s,a){return xg(this,t,e,i,n,s,a)},$.g.arcTo=function(t,e,i,n){return wg(this,t,e,i,n)},$.g.MR=function(t,e,i,n){return this.U_(t,e,i,n)},$.g.close=function(){return this.mS()},$.g.HZ=function(){return this.ag?new $.gb(this.ag[0],this.ag[1]):null};var lE=$.Ag.prototype;$.E("acgraph.vector.Path",$.Ag),lE.moveTo=lE.moveTo,lE.lineTo=lE.lineTo,lE.curveTo=lE.Sk,lE.quadraticCurveTo=lE.lK,lE.arcTo=lE.arcTo,lE.arcToByEndPoint=lE.Ff,lE.arcToAsCurves=lE.MR,lE.circularArc=lE.Fe,lE.close=lE.close,lE.clear=lE.clear,lE.getCurrentPoint=lE.HZ,lE.getLength=lE.Jg,$.H(Cg,$.sg),$.g=Cg.prototype,$.g.il=32|$.pg.prototype.il,$.g.Sm=function(){return"rect"},$.g.Ho=function(t){return t!=this.b.left&&(this.b.left=t,Bg(this)),this},$.g.Io=function(t){return t!=this.b.top&&(this.b.top=t,Bg(this)),this},$.g.Go=function(t){return this.b.width!=t&&(this.b.width=t,Bg(this)),this},$.g.Fo=function(t){return this.b.height!=t&&(this.b.height=t,Bg(this)),this},$.g.Qf=function(t){return $.nb(this.b,t)||(this.b.left=t.left,this.b.top=t.top,this.b.width=t.width,this.b.height=t.height,Bg(this)),this},$.g.IX=function(t,e){var i,n,s=$.Ja(arguments,1),a=s[0];4>(n=$.z(a)?Vb(a,4):s).length?n=i=a=s=(0,window.parseFloat)(n[0]):(s=(0,window.parseFloat)(n[0]),a=(0,window.parseFloat)(n[1]),i=(0,window.parseFloat)(n[2]),n=(0,window.parseFloat)(n[3])),this.P[0]=s||0,this.K[0]=s?t:void 0,this.P[1]=a||0,this.K[1]=a?t:void 0,this.P[2]=i||0,this.K[2]=i?t:void 0,this.P[3]=n||0,this.K[3]=n?t:void 0},$.g.round=function(t,e,i,n){return $.Ca(arguments,0,0,"round"),this.IX.apply(this,arguments),Bg(this),this},$.g.gka=function(t,e,i,n){return $.Ca(arguments,0,0,"round-inner"),this.IX.apply(this,arguments),Bg(this),this},$.g.dea=function(t,e,i,n){return $.Ca(arguments,0,0,"cut"),this.IX.apply(this,arguments),Bg(this),this},$.g.pe=function(t){Cg.u.pe.call(this,t),this.Ho(t.x).Io(t.y).Go(t.width).Fo(t.height),t.cornerTypes&&(this.K=Vb(t.cornerTypes,4),t=Vb(t.cornerSizes,4),(0,$.Pe)(t,(function(t,e,i){i[e]=(0,window.parseFloat)(t)})),this.P=t,Bg(this))},$.g.F=function(){var t=Cg.u.F.call(this);return t.type="rect",t.x=this.b.left,t.y=this.b.top,t.width=this.b.width,t.height=this.b.height,t.cornerTypes=this.K.join(" "),t.cornerSizes=this.P.join(" "),t},$.g.R=function(){this.b=this.K=this.P=null,this.ae(),Cg.u.R.call(this)};var mE=Cg.prototype;$.E("acgraph.vector.Rect",Cg),mE.setX=mE.Ho,mE.setY=mE.Io,mE.setWidth=mE.Go,mE.setHeight=mE.Fo,mE.setBounds=mE.Qf,mE.cut=mE.dea,mE.round=mE.round,mE.roundInner=mE.gka,$.H($.Dg,$.od),$.Dg.prototype.o=function(t){return $.p(t)?(this.f=t,this.i&&((t=this.f).yf()?t.Qx.push(this):this.Sd()),this):this.f};var nE={rect:Cg,circle:$.rg,ellipse:qg,path:$.Ag};$.g=$.Dg.prototype,$.g.shape=function(t,e,i,n){if(arguments.length){if($.J(t,$.pg))if(this.b){var s=!1;for(o in nE){var a=nE[o];if($.J(this.b,a)&&$.J(t,a)){s=!0;break}}s?this.b.pe(t.F()):(this.b.parent(null),this.b=t,this.b.parent(this))}else this.b=t,this.b.parent(this);else{if($.J(t,$.I)){s=t.left;var o=t.top;a=t.width;var r=t.height}else $.A(t)?(s=null!=t[0]?t[0]:0,o=null!=t[1]?t[1]:0,a=null!=t[2]?t[2]:0,r=null!=t[3]?t[3]:0):$.C(t)?(s=null!=t.left?t.left:0,o=null!=t.top?t.top:0,a=null!=t.width?t.width:0,r=null!=t.height?t.height:0):(s=null!=t?t:0,o=null!=e?e:0,a=null!=i?i:0,r=null!=n?n:0);this.b?$.J(this.b,Cg)?this.b.Ho(s).Io(o).Go(a).Fo(r):(this.b.parent(null),this.b=$.mk(s,o,a,r),this.b.parent(this)):(this.b=$.mk(s,o,a,r),this.b.parent(this))}return this}return this.b},$.g.yr=function(){return this.i},$.g.id=function(t){return $.p(t)?(this.he=t,this):this.he},$.g.Sd=function(){if(this.i=!1,this.he){$.mg();var t=this.shape();if(t.ia())this.shape().Sd();else{var e=ck(this.Ja().vn,this);t.Sd(),t=t.ia(),e.appendChild(t)}}},$.g.F=function(){return this.b.F()},$.g.pe=function(t){var e=nE[t.type];e&&((e=new e).pe(t),this.shape(e))},$.g.hc=function(t){return t.remove(),t.fl(this),Eg(this),lg(t,!0),this},$.g.removeChild=function(t){t.fl(null);var e=t.ia();return e&&$.Xe(e),Eg(this),lg(t,!1),t},$.g.Ig=function(){return null},$.g.UI=function(){},$.g.Ja=function(){return this.o()},$.g.Pb=function(){Eg(this)},$.g.ld=function(){$.Dg.u.ld.call(this)},$.g.R=function(){this.f&&$.Fa(this.f.Qx,this),$.mg().Z0(this),this.b.ld(),delete this.f,delete this.he,delete this.elements,delete this.i,delete this.b,$.Dg.u.R.call(this)};var oE=$.Dg.prototype;oE.shape=oE.shape,oE.dispose=oE.ld,$.H($.Fg,$.ig),$.g=$.Fg.prototype,$.g.Sm=function(){return"layer"},$.g.il=224|$.ig.prototype.il,$.g.EO=function(){for(var t=0;t<this.children.length;t++)this.children[t].EO();$.Fg.u.EO.call(this)},$.g.Pb=function(t){$.Fg.u.Pb.call(this,t),192&t&&this.ae()},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){t.remove(),e=$.Za(e,0,this.bc()),$.Da(this.children,t,e),t.fl(this),t.yr()&&this.Pb(64),this.Pb(128),t.Uy();var i=this.cursor()||this.iE;return t.iE!=i&&(t.iE=i,t.tG()),this},$.g.xd=function(t){return this.children[t]||null},$.g.Kf=function(t){return(0,$.za)(this.children,t)},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){var e=null;return 0<=t&&t<this.bc()&&((e=this.md?this.children[t]:$.Ca(this.children,t,1)[0]).fl(null),this.Pb(128)),e},$.g.Gi=function(){for(var t=0;t<this.bc();t++)this.children[t].fl(null);return t=this.children,this.md||(this.children=[]),this.Pb(128),t},$.g.HP=function(t,e){return this.KJ(this.Kf(t),this.Kf(e))},$.g.KJ=function(t,e){if(0>t||t>=this.bc()||0>e||e>=this.bc())throw $.ld(8);if(t!=e){var i=this.children[t];this.children[t]=this.children[e],this.children[e]=i,this.Pb(128)}return this},$.g.cN=function(t){return!!t&&$.Aa(this.children,t)},$.g.bc=function(){return this.children.length},$.g.Pj=function(t,e){return $.p(e)||(e=this),(0,$.Pe)(this.children,t,e),this},$.g.Bd=function(){var t=$.ok();return t.parent(this),t},$.g.UP=function(){var t=$.uk();return t.parent(this),t},$.g.text=function(t,e,i,n){return t=$.sk(t,e),n&&t.style(n),i&&t.text(i),t.parent(this),t},$.g.iN=function(t,e,i,n){return t=$.sk(t,e),n&&t.style(n),i&&t.htmlText(i),t.parent(this),t},$.g.rect=function(t,e,i,n){return(t=$.mk(t,e,i,n)).parent(this),t},$.g.wk=function(t,e,i,n,s){return(t=rk(t,e,i,n,s)).parent(this),t},$.g.RO=function(t,e){return $.Da(arguments,this.path(),0),zi.apply(this,arguments).parent(this)},$.g.QO=function(t,e){return $.Da(arguments,this.path(),0),Ai.apply(this,arguments).parent(this)},$.g.SP=function(t,e){return $.Da(arguments,this.path(),0),yi.apply(this,arguments).parent(this)},$.g.rn=function(t,e,i){return(t=$.nk(t,e,i)).parent(this),t},$.g.ellipse=function(t,e,i,n){return(t=$.pk(t,e,i,n)).parent(this),t},$.g.path=function(){return $.qk().parent(this)},$.g.tP=function(t,e,i,n,s,a,o){return gi(this.path(),t,e,i,n,s,a,o).parent(this)},$.g.vP=function(t,e,i){return hi(this.path(),t,e,i).parent(this)},$.g.wP=function(t,e,i){return ii(this.path(),t,e,i).parent(this)},$.g.xP=function(t,e,i){return ji(this.path(),t,e,i).parent(this)},$.g.yP=function(t,e,i){return ki(this.path(),t,e,i).parent(this)},$.g.uP=function(t,e,i){return li(this.path(),t,e,i).parent(this)},$.g.RP=function(t,e,i){return mi(this.path(),t,e,i).parent(this)},$.g.OP=function(t,e,i){return ni(this.path(),t,e,i).parent(this)},$.g.QP=function(t,e,i){return oi(this.path(),t,e,i).parent(this)},$.g.PP=function(t,e,i){return pi(this.path(),t,e,i).parent(this)},$.g.QL=function(t,e,i){return qi(this.path(),t,e,i).parent(this)},$.g.yL=function(t,e,i){return ri(this.path(),t,e,i).parent(this)},$.g.PL=function(t,e,i){return si(this.path(),t,e,i).parent(this)},$.g.aN=function(t,e,i){return ti(this.path(),t,e,i).parent(this)},$.g.YP=function(t,e,i){return ui(this.path(),t,e,i).parent(this)},$.g.qg=function(t,e,i,n,s){return vi(this.path(),t,e,i,n,s).parent(this)},$.g.VL=function(t,e,i,n,s,a){return $.wi(this.path(),t,e,i,n,s,a).parent(this)},$.g.Ft=function(){return $.mg().Wo()},$.g.jk=function(){this.Vf(32)&&this.Ep();var t=this.Ja();t=t.xF(Math.floor(Math.max(500-t.ks,0)/3)),this.Vf(64)&&Hg(this);var e=this.Ja();e.ks-=t,this.Vf(128)&&(t=this.Ja().xF(this.children.length+this.ir.length+1),(e=Haa(this,t))<t)&&(this.Ja().ks-=t-e),this.Vf(64)&&Hg(this),$.Fg.u.jk.call(this)},$.g.tG=function(){$.Fg.u.tG.call(this);for(var t=this.children.length;t--;)this.children[t].iE=this.cursor()||this.iE,this.children[t].tG()},$.g.k5=function(){$.jg(this,4096)},$.g.UI=function(t){this.md||0<=(t=(0,$.za)(this.ir,t))&&$.Ca(this.ir,t,1)},$.g.Ep=function(){$.mg().O5(this),$.jg(this,32)},$.g.Vw=function(){this.Vf(4)&&$.mg().P5(this),$.jg(this,4),$.jg(this,256)},$.g.HC=function(t){for(var e=null,i=0,n=this.children.length;i<n;i++){var s=this.children[i];s=s.Xt(yb(t,s.Pd)),(0,window.isNaN)(s.left)||(0,window.isNaN)(s.top)||(0,window.isNaN)(s.width)||(0,window.isNaN)(s.height)||(e?$.pb(e,s):e=s)}return e||(e=$.Ab(new $.I(0,0,0,0),t)),e},$.g.qv=function(){for(var t=this.children.length;t--;)this.children[t].qv()},$.g.Mr=function(){$.Fg.u.Mr.call(this),Ig(this)},$.g.Uy=function(){$.Fg.u.Uy.call(this),Ig(this)},$.g.cG=function(){$.mg().zW()&&(this.Pb(512),this.eN()&&this.parent().cG())},$.g.pe=function(t){(0,$.Pe)(t.children,(function(t){switch(t.type){case"rect":var e=this.rect();break;case"circle":e=this.rn();break;case"ellipse":e=this.ellipse();break;case"image":e=this.wk();break;case"text":e=this.text();break;case"path":e=this.path();break;case"layer":e=this.Bd();break;default:e=null}e&&e.pe(t)}),this),$.Fg.u.pe.call(this,t)},$.g.F=function(){var t=$.Fg.u.F.call(this),e=[];return this.Pj((function(t){e.push(t.F())})),t.type="layer",t.children=e,t},$.g.R=function(){this.children&&$.sd.apply(null,this.children),this.ir&&delete this.ir,this.ae(),$.Fg.u.R.call(this)},$.g.gD=function(){this.children&&(0,$.Pe)(this.children,(function(t){t.gD()})),delete this.ir,delete this.children,$.Fg.u.gD.call(this)};var pE=$.Fg.prototype;$.E("acgraph.vector.Layer",$.Fg),pE.addChild=pE.hc,pE.addChildAt=pE.Eg,pE.removeChild=pE.removeChild,pE.removeChildAt=pE.Cj,pE.removeChildren=pE.Gi,pE.swapChildren=pE.HP,pE.swapChildrenAt=pE.KJ,pE.getChildAt=pE.xd,pE.hasChild=pE.cN,pE.forEachChild=pE.Pj,pE.indexOfChild=pE.Kf,pE.numChildren=pE.bc,pE.circle=pE.rn,pE.layer=pE.Bd,pE.unmanagedLayer=pE.UP,pE.ellipse=pE.ellipse,pE.rect=pE.rect,pE.truncatedRect=pE.SP,pE.roundedRect=pE.RO,pE.roundedInnerRect=pE.QO,pE.path=pE.path,pE.star=pE.tP,$.Fg.prototype.star4=$.Fg.prototype.vP,$.Fg.prototype.star5=$.Fg.prototype.wP,$.Fg.prototype.star6=$.Fg.prototype.xP,$.Fg.prototype.star7=$.Fg.prototype.yP,$.Fg.prototype.star10=$.Fg.prototype.uP,pE.diamond=pE.QL,pE.triangleUp=pE.RP,pE.triangleDown=pE.OP,pE.triangleRight=pE.QP,pE.triangleLeft=pE.PP,pE.cross=pE.yL,pE.diagonalCross=pE.PL,pE.hLine=pE.aN,pE.vLine=pE.YP,pE.pie=pE.qg,pE.donut=pE.VL,pE.text=pE.text,pE.html=pE.iN,pE.image=pE.wk,$.H($.Qb,$.Fg),$.g=$.Qb.prototype,$.g.il=2277,$.g.Sm=function(){return"fill-pattern"},$.g.parent=function(t){return $.p(t)?(t?this.fl(t):this.remove(),this):$.Qb.u.parent.call(this)},$.g.ck=function(){return this.Ta.clone()},$.g.Ft=function(){return $.mg().I0()},$.g.Ep=function(){$.mg().L5(this),$.jg(this,32)},$.g.jk=function(){if(!this.Bo){var t=this.Ja().vn.ia(),e=this.ia();t.appendChild(e)}this.Bo=!0,$.Qb.u.jk.call(this)},$.g.Vw=function(){this.Vf(4)&&$.mg().R5(this),$.jg(this,4)},$.g.pe=function(t){$.Qb.u.pe.call(this,t)},$.g.F=function(){var t=$.Qb.u.F.call(this),e=this.ck();return t.type="pattern",t.bounds=e,t},$.g.R=function(){$.Xe(this.ia()),this.Bb=null,$.Qb.u.R.call(this)};var qE=$.Qb.prototype;$.E("acgraph.vector.PatternFill",$.Qb),qE.addChild=qE.hc,qE.dispose=qE.ld,$.H(Mg,$.Qb);var Jg={zma:"backward-diagonal",Xoa:"forward-diagonal",hZ:"horizontal",FZ:"vertical",Gna:"dashed-backward-diagonal",fZ:"grid",Hna:"dashed-forward-diagonal",Ina:"dashed-horizontal",Jna:"dashed-vertical",cZ:"diagonal-cross",$na:"diagonal-brick",eoa:"divot",cpa:"horizontal-brick",Qsa:"vertical-brick",mna:"checker-board",una:"confetti",Tqa:"plaid",dsa:"solid-diamond",kta:"zig-zag",Ysa:"weave",Eqa:"percent-05",Fqa:"percent-10",Gqa:"percent-20",Hqa:"percent-25",Iqa:"percent-30",Jqa:"percent-40",Kqa:"percent-50",Lqa:"percent-60",Mqa:"percent-70",Nqa:"percent-75",Oqa:"percent-80",Pqa:"percent-90"},Iaa=function(){var t={"backward-diagonal":function(){Yg(this,[-1,0,this.size+1,0,this.Ef],-45)},"forward-diagonal":function(){Yg(this,[-1,0,this.size+1,0,this.Ef],45)},horizontal:function(){Yg(this,[-1,this.size/2,this.size+1,this.size/2,this.Ef])},vertical:function(){Yg(this,[this.size/2,-1,this.size/2,this.size+1,this.Ef])},"diagonal-cross":function(){Yg(this,[0,this.size/2,this.size,this.size/2,this.Ef,this.size/2,0,this.size/2,this.size,this.Ef],45)},grid:function(){Yg(this,[-1,this.size/2,this.size+1,this.size/2,this.Ef,this.size/2,-1,this.size/2,this.size+1,this.Ef])},"horizontal-brick":function(){Yg(this,[0,0,0,this.size/2-1,this.Ef,0,this.size/2-1,this.size,this.size/2-1,this.Ef,this.size/2,this.size/2-1,this.size/2,this.size-1,this.Ef,0,this.size-1,this.size,this.size-1,this.Ef])},"vertical-brick":function(){Yg(this,[0,0,0,this.size/2-1,this.Ef,0,this.size/2-1,this.size,this.size/2-1,this.Ef,this.size/2,this.size/2-1,this.size/2,this.size-1,this.Ef,0,this.size-1,this.size,this.size-1,this.Ef],90)},"diagonal-brick":function(){Yg(this,[0,0,0,this.size/2-1,this.Ef,0,this.size/2-1,this.size,this.size/2-1,this.Ef,this.size/2,this.size/2-1,this.size/2,this.size-1,this.Ef,0,this.size-1,this.size,this.size-1,this.Ef],45)},"checker-board":function(){Zg(this,[0,0,this.size/2,this.size/2,this.size/2,this.size])},confetti:function(){var t=this.size/8,e=this.size/4;Zg(this,[0,2*t,e,t,5*t,e,2*t,0,e,4*t,4*t,e,5*t,t,e,6*t,6*t,e])},plaid:function(){Ug(this,this.size/2,this.size/2);for(var t,e=this.size/8,i=0;2>i;i++){t=!1;for(var n=0;4>n;n++){t=!t;for(var s=0;4>s;s++)t&&Ug(this,e,e,n*e+i*this.size/2,s*e+this.size/2),t=!t}}},"solid-diamond":function(){Xg(this,[[this.size/2,0,0,this.size/2,this.size/2,this.size,this.size,this.size/2,this.size/2,0]],!0,!0)},"dashed-forward-diagonal":function(){Yg(this,[0,0,this.size/2,this.size/2,this.Ef])},"dashed-backward-diagonal":function(){Yg(this,[this.size/2,0,0,this.size/2,this.Ef])},"dashed-horizontal":function(){Yg(this,[0,0,this.size/2,0,this.Ef,this.size/2,this.size/2,this.size,this.size/2,this.Ef])},"dashed-vertical":function(){Yg(this,[0,0,0,this.size/2,this.Ef,this.size/2,this.size/2,this.size/2,this.size,this.Ef])},divot:function(){var t=.1*this.size,e=this.size*(.8-.2)/2;Xg(this,[[t+e,t,t,t+e/2,t+e,t+e],[this.size-t-e,this.size-t-e,this.size-t,this.size-t-e/2,this.size-t-e,this.size-t]])},"zig-zag":function(){Xg(this,[[0,0,this.size/2,this.size/2,this.size,0],[0,this.size/2,this.size/2,this.size,this.size,this.size/2]])},weave:function(){Xg(this,[[0,0,this.size/2,this.size/2,this.size,0],[0,this.size/2,this.size/2,this.size,this.size,this.size/2],[this.size/2,this.size/2,3*this.size/4,3*this.size/4],[this.size,this.size/2,3*this.size/4,this.size/4]])}};return t["percent-05"]=$.qa(Og,8,8,[0,0,4,4]),t["percent-10"]=$.qa(Og,8,4,[0,0,4,2]),t["percent-20"]=$.qa(Og,4,4,[0,0,2,2]),t["percent-25"]=$.qa(Og,4,2,[0,0,2,1]),t["percent-30"]=$.qa(Og,4,4,[0,0,2,0,3,1,0,2,2,2,1,3]),t["percent-40"]=$.qa(Og,4,8,[0,0,2,0,3,1,0,2,2,2,1,3,3,3,0,4,2,4,1,5,3,5,0,6,2,6,1,7,3,7]),t["percent-50"]=$.qa(Og,2,2,[0,0,1,1]),t["percent-60"]=$.qa(Og,4,4,[0,0,2,0,0,1,1,1,3,1,0,2,2,2,1,3,2,3,3,3]),t["percent-70"]=$.qa(Og,4,4,[0,0,2,0,3,0,0,1,1,1,2,1,0,2,2,2,3,2,0,3,1,3,2,3]),t["percent-75"]=$.qa(Vg,4,4,[0,0,2,2]),t["percent-80"]=$.qa(Vg,8,4,[0,0,4,2]),t["percent-90"]=$.qa(Vg,8,8,[7,7,4,3]),t}();Mg.prototype.Sm=function(){return"hatch-fill"},Mg.prototype.R=function(){if(this.Ja()){var t=this.Ja().vn,e=[this.type,this.color,this.Ef,this.size].join();$.Gc(t.i,e)&&$.Lc(t.i,e),t=$.ze(window.document,this.id()),$.Xe(t)}Mg.u.R.call(this)};var rE=Mg.prototype;rE.dispose=rE.ld,$.H(bh,$.ig),$.ah="meet",$.$g="none",$.g=bh.prototype,$.g.il=32|$.ig.prototype.il,$.g.Sm=function(){return"image"},$.g.jD=function(t){return null!=t?(t!=this.f&&(this.f=t,this.Pb(32)),this):this.f},$.g.align=function(t){return null!=t?(t!=this.b&&(this.b=t,this.Pb(32)),this):this.b},$.g.x=function(t){return null!=t?(t!=this.Bb.left&&(this.Bb.left=t,this.Pb(32),this.ae()),this):this.Bb.left},$.g.y=function(t){return null!=t?(t!=this.Bb.top&&(this.Bb.top=t,this.Pb(32),this.ae()),this):this.Bb.top},$.g.width=function(t){return null!=t?(t!=this.Bb.width&&(this.Bb.width=t,this.Pb(32),this.ae()),this):this.Bb.width},$.g.height=function(t){return null!=t?(t!=this.Bb.height&&(this.Bb.height=t,this.Pb(32),this.ae()),this):this.Bb.height},$.g.src=function(t){return $.p(t)?(t!=this.o&&(this.o=t,this.Pb(32)),this):this.o},$.g.opacity=function(t){return $.p(t)?(t!=this.i&&(this.i=t,this.Pb(32)),this):this.i},$.g.ck=function(){return this.Bb.clone()},$.g.Ft=function(){return $.mg().J0()},$.g.jk=function(){this.Vf(32)&&($.mg().OI()&&this.Pb(4),this.Ep()),bh.u.jk.call(this)},$.g.Vw=function(){$.mg().N5(this),$.jg(this,4),$.jg(this,256)},$.g.Ep=function(){$.mg().M5(this),$.jg(this,32)},$.g.pe=function(t){var e=t.bounds;this.x(e.left).y(e.top).width(e.width).height(e.height).src(t.src).align(t.align).jD(t.fittingMode),bh.u.pe.call(this,t)},$.g.F=function(){var t=bh.u.F.call(this);return t.type="image",t.bounds=this.ck(),t.src=this.src(),t.align=this.align(),t.fittingMode=this.jD(),t},$.g.R=function(){this.Bb=null,this.ae(),bh.u.R.call(this)},$.E("acgraph.vector.Image",bh);var sE=bh.prototype;sE.fittingMode=sE.jD,sE.align=sE.align,sE.x=sE.x,sE.y=sE.y,sE.width=sE.width,sE.height=sE.height,sE.src=sE.src,$.H(ch,$.qf);var eh=[$.hd&&!$.bd("11")?"readystatechange":"load","abort","error"];ch.prototype.start=function(){var t=this.f;(0,$.Pe)($.Fc(t),(function(e){var i,n=t[e];n&&(delete t[e],!this.md)&&(i=this.Y?$.ye(this.Y).Ac("IMG"):new window.Image,n.C0&&(i.crossOrigin=n.C0),this.qo.wa(i,eh,this.i),this.b[e]=i,i.id=e,i.src=n.src)}),this)},ch.prototype.i=function(t){var e=t.currentTarget;if(e){if("readystatechange"==t.type){if("complete"!=e.readyState)return;t.type="load"}void 0===e.naturalWidth&&("load"==t.type?(e.naturalWidth=e.width,e.naturalHeight=e.height):(e.naturalWidth=0,e.naturalHeight=0)),this.dispatchEvent({type:t.type,target:e}),this.md||fh(this,e.id)}},ch.prototype.R=function(){delete this.f,delete this.b,$.qd(this.qo),ch.u.R.call(this)},$.ja($.gh),$.g=$.gh.prototype,$.g.J5=$.ia,$.g.RX=$.ia,$.g.JX=$.ia,$.g.getAttribute=function(t,e){return t?t.getAttribute(e):void 0},$.g.lc=function(t,e,i){t.setAttribute(e,i)},$.g.W4=function(t,e){var i=e[3];t.push(e[0],e[1],0,180<Math.abs(i)?1:0,0<i?1:0,e[4],e[5])},$.g.c5=function(t,e){$.kd(Array.prototype.push,e,t)},$.g.Q0=function(){return null},$.g.l4=function(){return!1},$.g.n3=function(){return!1},$.g.OI=function(){return!1},$.g.zW=function(){return!1},$.H($.uh,$.ig),$.g=$.uh.prototype,$.g.kc=null,$.g.il=32|$.ig.prototype.il,$.g.Sm=function(){return"simple-text"},$.g.ck=function(){return this.Ta.clone()},$.g.text=function(t){return $.p(t)?(t!=this.kc&&(this.kc=String(t),(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.Pb(32),t||this.Ja().resume()),this):this.kc},$.g.Ft=function(){return $.mg().Vx()},$.g.jk=function(){this.Vf(32)&&($.mg(),this.ia().textContent=this.text(),$.jg(this,32)),$.uh.u.jk.call(this)},$.g.Vw=function(){$.jg(this,4),$.jg(this,256)};var tE=$.uh.prototype;tE.text=tE.text,$.E("acgraph.vector.SimpleText",$.uh),$.ja(vh);var Jh={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Jaa,Oh,Nh,uE,vE;vh.prototype.xb=null,$.H(Mh,$.od),$.g=Mh.prototype,$.g.Ud=null,$.g.Y=null,$.g.parent=function(t){return $.p(t)?(this.Y=t,this):this.Y},$.g.ia=function(){return this.Ud},$.g.Sm=function(){return"t-segment"},$.g.Ep=function(){""!=this.text&&(this.Ud=$.mg().IS())&&$.mg().JZ(this)},$.g.R=function(){$.Xe(this.Ud),this.Ud=null,Mh.u.R.call(this)},$.H($.Qh,$.pg),Jaa="normal",Oh="normal",Nh="",$.Ph="start",uE={AQ:"left",i$:$.Ph,xz:"center",m8:"end",GQ:"right"},vE={PQ:"top",f9:"middle",pQ:"bottom"},$.g=$.Qh.prototype,$.g.il=17504|$.pg.prototype.il,$.g.yc=null,$.g.kc=null,$.g.x=function(t){return null!=t?(this.No!=t&&(this.No=t,this.ba&&Wh(this),this.Ta.left=t,this.Pb(16384),this.ae()),this):this.No},$.g.y=function(t){return null!=t?(this.Oo!=t&&(this.Oo=t,this.ba&&Xh(this),this.Ta.top=t,this.Pb(16384),this.ae()),this):this.Oo},$.g.sx=function(){if($.mg().OI()){var t=this.Ig();t&&!$.zb(t)&&this.Pb(4)}},$.g.width=function(t){return $.p(t)&&Rh(this,"width")!=t&&(null===t||(t=Math.max((0,window.parseFloat)(t),0)||0),this.Yf=t),Rh(this,"width",t)},$.g.height=function(t){return $.p(t)&&(Rh(this,"height")==t||null!==t&&(t=Math.max((0,window.parseFloat)(t),0)||0),this.Jf=t),Rh(this,"height",t)},$.g.opacity=function(t){return null!=t?(this.yc.opacity=t,this.Pb(1024),this):this.yc.opacity},$.g.color=function(t){return null!=t?(this.yc.color=t,this.Pb(1024),this):this.yc.color},$.g.fontSize=function(t){return Rh(this,"fontSize",t)},$.g.fontFamily=function(t){return Rh(this,"fontFamily",t)},$.g.direction=function(t){return Rh(this,"direction",t)},$.g.fontStyle=function(t){return Rh(this,"fontStyle",t)},$.g.fontVariant=function(t){return Rh(this,"fontVariant",t)},$.g.fontWeight=function(t){return Rh(this,"fontWeight",t)},$.g.letterSpacing=function(t){return Rh(this,"letterSpacing",t)},$.g.er=function(t){return Rh(this,"decoration",t)},$.g.lineHeight=function(t){return null!=t&&(this.sb=Sh(t)),Rh(this,"lineHeight",t)},$.g.textIndent=function(t){return null!=t&&(this.o=t),Rh(this,"textIndent",t)},$.g.textShadow=function(t){return $.p(t)?Rh(this,"textShadow",$.Zb(t)):this.yc.textShadow},$.g.vAlign=function(t){if($.p(t))if("center"==t)t="middle";else{var e=!1;$.Dc(vE,(function(i){t==i&&(e=!0)})),e||(t="top")}return Rh(this,"vAlign",t)},$.g.Bm=function(t){if($.p(t))if("middle"==t)t="center";else{var e=!1;$.Dc(uE,(function(i){t==i&&(e=!0)})),e||(t=$.Ph)}return Rh(this,"hAlign",t)},$.g.Xu=function(t){return Rh(this,"wordBreak",t)},$.g.wordWrap=function(t){return Rh(this,"wordWrap",t)},$.g.textOverflow=function(t){return null!=t&&(this.fb=t),Rh(this,"textOverflow",t)},$.g.Hm=function(t){return Rh(this,"selectable",t)},$.g.path=function(t){return $.p(t)?(this.Sc=t,this.Ja()&&this.Sc.parent(this.Ja().vn),(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(17504),this.sx(),t||this.Ja().resume(),this):this.Sc},$.g.style=function(t){if(null!=t){$.Dc(t,(function(t,e){var i=e;switch(e){case"fontDecoration":case"textDecoration":i="decoration";break;case"fontColor":i="color";break;case"fontOpacity":i="opacity"}this.yc[i]=t}),this),this.Yf=(0,window.parseFloat)(this.yc.width)||0,this.Jf=(0,window.parseFloat)(this.yc.height)||0,this.yc.lineHeight&&(this.sb=Sh(this.yc.lineHeight));var e=this.yc.vAlign;if(null!=e)if("center"==e)this.yc.vAlign="middle";else{var i=!1;$.Dc(vE,(function(t){e==t&&(i=!0)})),i||(this.yc.vAlign="top")}var n=this.yc.hAlign;return null!=n&&("middle"==n?this.yc.hAlign="center":(i=!1,$.Dc(uE,(function(t){n==t&&(i=!0)})),i||(this.yc.hAlign=$.Ph))),null!=this.yc.direction&&(this.K="rtl"==this.yc.direction),null!=this.yc.textOverflow&&(this.fb=this.yc.textOverflow),null!=this.yc.textIndent&&(this.o=this.yc.textIndent),this.K&&(this.o=0),(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),t||this.Ja().resume(),this}return this.yc},$.g.htmlText=function(t){return $.p(t)?(t!=this.kc&&(this.kc=String(t),this.Hd=!0,(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.sx(),t||this.Ja().resume()),this):this.kc},$.g.Sm=function(){return"text"},$.g.ck=function(){return this.Ta.clone()},$.g.Xt=function(t){return this.ba||this.MB(),t?$.Qh.u.Xt.call(this,t):this.HC(null)},$.g.HC=function(t){if(this.path())if(this.yg)var e=this.yg;else{(e=$.mg()).Xp(),this.ba||this.MB();var i=this.path();i.ia()||i.Ac(!0),e.OX(i);var n=i.ia().parentNode,s=i.ia();e.f.appendChild(s),n||(n=$.cc($.ac.Id(),i.ia(),"path"),$.qh(e,i.ia(),n)),this.ia()||this.Ac(!0),this.rX(),this.Ep(),$.mg().QX(this),$.jg(this,1024),this.OO(),this.Vw(),n=$.cc($.ac.Id(),i.ia(),"path"),i=Li(),this.Ka.setAttributeNS("http://www.w3.org/1999/xlink","href",i+"#"+n),n=(i=this.ia()).parentNode,e.Op.appendChild(i),e=this.ia().getBBox(),n&&n.appendChild(i),e=new $.I(e.x,e.y,e.width,e.height)}else e=this.Ta.clone();return $.Ab(e,t)},$.g.hH=ba(4),$.g.ae=function(){$.Qh.u.ae.call(this),this.yg=null},$.g.X3=function(t){for(var e=$.mg().o,i=arguments,n={},s=0,a=e.length;s<a;s++)for(var o=i.length;o--;){var r=i[o];if(r&&(r=r[e[s]],$.p(r))){n[e[s]]=r;break}}return n},$.g.Vm=function(t,e){var i=this.X3(this.yc,e);return ih($.mg(),t,i)},$.g.vU=function(){return this.ba||this.MB(),this.Od},$.g.rH=function(){return this.ba||this.MB(),this.D},$.g.mK=function(){this.pM(),this.me++,this.nK("",null,!0);var t=this.f[0]?this.f[0].height:0;this.Sb+=$.z(this.sb)?(0,window.parseInt)(this.sb,0)+t:this.sb*t},$.g.nK=function(t,e,i){if(!this.qc){e=e||{};var n=this.Vm(t,e),s=0==this.b.length?this.o:0;if(this.bj)for(;this.P+n.width+s>this.Za&&!this.qc;){var a=Th(this,t,e,s+this.P,this.Za,n);1>a&&0==this.f.length&&(a=1),0!=a&&(s=$.nc(t.substring(0,a)),n=this.Vm(s,e),Uh(this,s,e,n)),this.pM(),1==t.length&&(this.qc=!0),s=0,t=$.nc(t.substring(a,t.length)),n=this.Vm(t,e)}this.qc||!t.length&&!i||Uh(this,t,e,n)}},$.g.pM=function(){if(!this.qc&&0!=this.f.length){var t=0==this.ea.length;if(this.Jf&&this.D+this.Ba>this.Jf&&0!=this.ea.length)Vh(this),this.qc=!0;else{if(this.Ba=$.z(this.sb)?(0,window.parseInt)(this.sb,0)+this.Ba:this.sb*this.Ba,$.mg().l4()){var e,i=this.K&&this.yc.hAlign==$.Ph||!this.K&&"end"==this.yc.hAlign||"right"==this.yc.hAlign,n="center"==this.yc.hAlign;if(this.K&&"end"==this.yc.hAlign||!this.K&&this.yc.hAlign==$.Ph||"left"==this.yc.hAlign){n=this.K?0:this.o&&t?this.o:0;var s=0;for(e=this.f.length;s<e;s++)(i=this.f[s]).x=n,i.y=this.D+this.na+i.height-1.5*i.f,n+=i.width}else if(n)for(n=-this.P/2,!this.K&&this.o&&t&&(n+=this.o),s=0,e=this.f.length;s<e;s++)(i=this.f[s]).x=n+i.width/2,i.y=this.D+this.na+i.height-1.5*i.f,n+=i.width;else if(i)for(n=this.K&&this.o&&t?-this.o:0,s=this.f.length-1;0<=s;s--)(i=this.f[s]).x=n,i.y=this.D+this.na+i.height-1.5*i.f,n-=i.width}if(t){var a=this.f[0];a.f=this.na,a.i=!0,this.o&&"center"==this.yc.hAlign&&(a.mo=this.K?-this.o/2:this.o/2)}else{for(s=0;s<this.f.length;s++)if(""!=this.f[s].text){a=this.f[s];break}a&&(a.i=!0,this.ud||(a.um=this.Sb&&1<this.me?this.Sb:this.fh+this.na))}this.bj&&this.yc.wordWrap==Oh&&this.P>this.Za&&(1<this.f.length&&!this.f[0].text.length&&(i=(0,$.za)(this.b,this.f[0]),Ea(this.f,0),Ea(this.b,i)),i=$.ua(this.f),t=this.Vm(i.text,i.b),t=Th(this,i.text,i.b,0,this.Za-(this.P-t.width),t,!0),n=i.text.substring(0,t),t=this.Vm(n,i.b),i.text=n,this.bg=this.P=i.width=t.width,Vh(this,this.f)),this.path()&&(a.mo="start"==this.align?0:"middle"==this.align?this.path().Jg()/2-this.P/2:this.path().Jg()-this.P),this.D+=this.Ba,this.Od=Math.max(this.Od,this.P),this.fh=this.Ba-this.na,this.bg=this.P,this.ud||(this.me=this.Sb=0),this.ud=!0,this.na=this.P=this.Ba=0,this.ea.push(this.f),this.f=[]}}},$.g.text=function(t){return $.p(t)?(t!=this.kc&&(this.kc=String(t),this.Hd=!1,(t=!this.Ja()||this.Ja().yf())||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.sx(),t||this.Ja().resume()),this):this.kc},$.g.MB=function(){0!=this.b.length&&($.sd(this.b,this.ea),this.ea=[],this.b=[]),null!=this.yc.direction&&(this.K="rtl"==this.yc.direction),null!=this.yc.textIndent&&(this.o=this.yc.textIndent),this.K&&(this.o=0),this.Yf=(0,window.parseFloat)(this.yc.width)||0,this.Jf=(0,window.parseFloat)(this.yc.height)||0,this.qc=!1,this.na=this.P=this.Ba=this.me=this.Sb=this.D=this.Od=this.fh=this.bg=0,this.f=[],this.$a=this.aa=0,this.yg=null,this.align="start",this.yc.hAlign&&(this.align="rtl"==this.yc.direction?$.gd||$.hd?"end"==this.yc.hAlign||"left"==this.yc.hAlign?$.Ph:this.yc.hAlign==$.Ph||"right"==this.yc.hAlign?"end":"middle":"end"==this.yc.hAlign||"left"==this.yc.hAlign?"end":this.yc.hAlign==$.Ph||"right"==this.yc.hAlign?$.Ph:"middle":"end"==this.yc.hAlign||"right"==this.yc.hAlign?"end":this.yc.hAlign==$.Ph||"left"==this.yc.hAlign?$.Ph:"middle");var t,e=null!=this.yc.width;if(this.bj=this.path()||e,e=e?(0,window.parseFloat)(this.yc.width):Number.POSITIVE_INFINITY,this.Za=Math.max(this.path()?Math.min(this.path().Jg(),e):this.Yf,0),null!=this.kc){if(this.Hd)Lh(this);else{this.kc=$.hc(ic(this.kc));var i=this.kc.split(/\n/g);for(t=0;t<i.length;t++)null!=(e=$.nc(i[t]))&&(""!=e&&this.nK(e),this.mK())}this.o&&0<this.ea.length&&(e=this.ea[0][0],this.K?this.yc.hAlign&&this.yc.hAlign!=$.Ph&&"right"!=this.yc.hAlign||(e.mo-=this.o):this.yc.hAlign&&this.yc.hAlign!=$.Ph&&"left"!=this.yc.hAlign||(e.mo+=this.o)),this.yc.width||(this.Yf=this.Od),this.yc.height||(this.Jf=this.D),Wh(this),Xh(this),this.Ta=new $.I(this.No,this.Oo,this.Yf,this.Jf),this.ba=!0}},$.g.Ft=function(){return $.mg().Vx()},$.g.jk=function(){this.ba||this.MB(),this.Vf(64)&&this.rX(),this.Vf(1024)&&($.mg().QX(this),$.jg(this,1024)),this.Vf(32)&&this.Ep(),this.Vf(16384)&&this.OO(),$.Qh.u.jk.call(this)},$.g.rX=function(){this.Sc&&!this.Ka?this.Ka=$.mg().Q0():this.Sc||($.Xe(this.Ka),this.Ka=null),$.jg(this,64)},$.g.OO=function(){for(var t=0,e=this.b.length;t<e;t++){var i=this.b[t];i.Ud&&$.mg().IZ(i)}$.mg().PX(this),$.jg(this,16384)},$.g.Ep=function(){this.ia()&&$.Ve(this.ia()),this.Ka&&($.Ve(this.Ka),this.ia().appendChild(this.Ka));for(var t=0,e=this.b.length;t<e;t++)this.b[t].Ep();$.jg(this,32)},$.g.Vw=function(){$.mg().U5(this),$.jg(this,4),$.jg(this,256)},$.g.pe=function(t){this.x(t.x).y(t.y).style(t.style),t.html?this.htmlText(t.text):this.text(t.text),$.Qh.u.pe.call(this,t)},$.g.F=function(){var t=$.Qh.u.F.call(this);return t.type="text",t.x=this.x(),t.y=this.y(),t.html=this.Hd,t.text=this.text(),t.style=this.style(),t},$.g.R=function(){$.sd(this.b,this.f),this.b.length=0,this.f.length=0,delete this.ea,delete this.Ta,$.Qh.u.R.call(this)};var wE=$.Qh.prototype;$.E("acgraph.vector.Text",$.Qh),wE.text=wE.text,wE.style=wE.style,wE.htmlText=wE.htmlText,wE.path=wE.path,wE.x=wE.x,wE.y=wE.y,wE.fontSize=wE.fontSize,wE.color=wE.color,wE.fontFamily=wE.fontFamily,wE.direction=wE.direction,wE.fontStyle=wE.fontStyle,wE.fontVariant=wE.fontVariant,wE.fontWeight=wE.fontWeight,wE.letterSpacing=wE.letterSpacing,wE.decoration=wE.er,wE.opacity=wE.opacity,wE.lineHeight=wE.lineHeight,wE.textIndent=wE.textIndent,wE.vAlign=wE.vAlign,wE.hAlign=wE.Bm,wE.width=wE.width,wE.height=wE.height,wE.getTextHeight=wE.rH,wE.getTextWidth=wE.vU,wE.wordWrap=wE.wordWrap,wE.wordBreak=wE.Xu,wE.textOverflow=wE.textOverflow,wE.selectable=wE.Hm,$.H($.Yh,$.ig),$.g=$.Yh.prototype,$.g.Sm=function(){return"unmanageable-layer"},$.g.il=32|$.ig.prototype.il,$.g.content=function(t){return $.p(t)?(t!=this.Qd&&(this.Qd=t,this.Pb(32)),this):this.Qd},$.g.Ft=function(){return $.mg().Wo()},$.g.jk=function(){if($.Yh.u.jk.call(this),this.Vf(32)){var t=this.ia();$.Ve(t),$.z(this.Qd)?t.innerHTML=this.Qd:t.appendChild(this.Qd),$.jg(this,32)}},$.g.ck=function(){return $.mg().kW(this.Qd)},$.g.pe=function(t){"content"in t&&this.content(t.content),$.Yh.u.pe.call(this,t)},$.g.F=function(){var t=$.Yh.u.F.call(this);return t.content=$.z(this.Qd)?this.Qd:this.Qd.outerHTML,t};var xE=$.Yh.prototype,Paa,Qaa,Raa;xE.content=xE.content,$.E("acgraph.vector.primitives.star",gi),$.E("acgraph.vector.primitives.star4",hi),$.E("acgraph.vector.primitives.star5",ii),$.E("acgraph.vector.primitives.star6",ji),$.E("acgraph.vector.primitives.star7",ki),$.E("acgraph.vector.primitives.star10",li),$.E("acgraph.vector.primitives.diamond",qi),$.E("acgraph.vector.primitives.triangleUp",mi),$.E("acgraph.vector.primitives.triangleDown",ni),$.E("acgraph.vector.primitives.triangleRight",oi),$.E("acgraph.vector.primitives.triangleLeft",pi),$.E("acgraph.vector.primitives.cross",ri),$.E("acgraph.vector.primitives.diagonalCross",si),$.E("acgraph.vector.primitives.hLine",ti),$.E("acgraph.vector.primitives.vLine",ui),$.E("acgraph.vector.primitives.pie",vi),$.E("acgraph.vector.primitives.donut",$.wi),$.E("acgraph.vector.primitives.truncatedRect",yi),$.E("acgraph.vector.primitives.roundedRect",zi),$.E("acgraph.vector.primitives.roundedInnerRect",Ai),$.Fi.prototype.clone=function(){return new $.Fi(this.Hj,this.ze,this.mi,this.Pe)},$.H(Gi,$.gh),$.ja(Gi),$.g=Gi.prototype,$.g.Op=null,$.g.Mk=null,$.g.$D=null,$.g.yp=null,$.g.iu=null,$.g.Xp=function(){return this.Op||(this.Op=Hi("svg"),this.Mk=this.Vx(),this.$D=this.wF(""),this.f=this.AS(),this.Mk.appendChild(this.$D),this.Op.appendChild(this.Mk),this.Op.appendChild(this.f),this.i=this.Wo(),this.Op.appendChild(this.i),$.ph(this,this.Op,{width:0,height:0}),this.Op.style.cssText="position: absolute; left: -99999px; top: -99999px",this.yp=this.Wo(),this.Op.appendChild(this.yp),$.sh.document.body.appendChild(this.Op)),this.Op},$.g.measure=function(t,e){this.Xp();var i=null,n=0;return 0==t.length?(hh(this,"",e)?n=ih(this,"",e):(n=this.measure("a",e),n=new $.I(0,n.top,0,n.height),ih(this,"",e,n)),n):" "==t?$.jh(this,e):($.ec(t," ")&&(n+=i=$.jh(this,e).width),$.fc(t," ")&&(n+=i||$.jh(this,e).width),e.fontStyle?this.lc(this.Mk,"font-style",e.fontStyle):this.Mk.removeAttribute("font-style"),e.fontVariant?this.lc(this.Mk,"font-variant",e.fontVariant):this.Mk.removeAttribute("font-variant"),e.fontFamily?this.lc(this.Mk,"font-family",e.fontFamily):this.Mk.removeAttribute("font-family"),e.fontSize?this.lc(this.Mk,"font-size",e.fontSize):this.Mk.removeAttribute("font-size"),e.fontWeight?this.lc(this.Mk,"font-weight",e.fontWeight):this.Mk.removeAttribute("font-weight"),e.letterSpacing?this.lc(this.Mk,"letter-spacing",e.letterSpacing):this.Mk.removeAttribute("letter-spacing"),e.decoration?this.lc(this.Mk,"text-decoration",e.decoration):this.Mk.removeAttribute("text-decoration"),this.$D.nodeValue=t,i=this.Mk.getBBox(),e.fontVariant&&$.yd&&(this.$D.nodeValue=t.charAt(0).toUpperCase(),i.height=this.Mk.getBBox().height),new $.I(i.x,i.y,i.width+n,i.height))},$.g.kW=function(t){return this.Xp(),$.z(t)?this.yp.innerHTML=t:(t=t.cloneNode(!0),this.yp.appendChild(t)),t=this.yp.getBBox(),$.Ve(this.yp),new $.I(t.x,t.y,t.width,t.height)},$.g.TN=function(t,e){this.b||(th(this),this.b={},$.Ld(this.iu,"complete",(function(){this.D=!1}),!1,this),$.Ld(this.iu,"load",this.L$,!1,this)),this.b[$.oa(e)]=[t,e],this.D=!0,dh(this.iu,t,t),this.iu.start()},$.g.L$=function(t){var e=t.target;$.Dc(this.b,(function(t,i){t[0]==e.id&&(t[1].call(this,e.naturalWidth,e.naturalHeight),delete this.b[i])}),this)},$.g.n3=function(){return this.D},$.g.D4={1:"M",2:"L",3:"C",4:"A",5:"Z"},$.g.P0=function(){var t=Hi("svg");return $.hd||this.lc(t,"xmlns","http://www.w3.org/2000/svg"),this.lc(t,"border","0"),t},$.g.K0=function(){return Hi("linearGradient")},$.g.I0=function(){return Hi("pattern")},$.g.J0=function(){return Hi("image")},$.g.Wo=function(){return Hi("g")},$.g.D0=function(){return Hi("circle")},$.g.M0=function(){return Hi("path")},$.g.H0=function(){return Hi("ellipse")},$.g.AS=function(){return Hi("defs")},$.g.Vx=function(){return Hi("text")},$.g.Q0=function(){return Hi("textPath")},$.g.IS=function(){return Hi("tspan")},$.g.wF=function(t){return window.document.createTextNode(String(t))},$.g.L5=function(t){var e=t.ck();$.ph(this,t.ia(),{x:e.left,y:e.top,width:e.width,height:e.height,patternUnits:"userSpaceOnUse"})},$.g.M5=function(t){var e=t.ck();this.TN(t.src(),$.ia);var i=t.src()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n=t.ia(),s=e.left,a=e.top,o=e.width;switch(e=e.height,t.align()){case"x-min-y-min":var r="xMinYMin";break;case"x-mid-y-min":r="xMidYMin";break;case"x-max-y-min":r="xMaxYMin";break;case"x-min-y-mid":r="xMinYMid";break;case"x-mid-y-mid":r="xMidYMid";break;case"x-max-y-mid":r="xMaxYMid";break;case"x-min-y-max":r="xMinYMax";break;case"x-mid-y-max":r="xMidYMax";break;case"x-max-y-max":r="xMaxYMax";break;default:r="none"}r=r+" "+t.jD(),$.ph(this,n,{x:s,y:a,width:o,height:e,"image-rendering":"optimizeQuality",preserveAspectRatio:r,opacity:t.opacity()}),n.setAttributeNS("http://www.w3.org/1999/xlink","href",i)},$.g.I5=function(t,e){var i=t.ia();i&&(i.style.cursor=e||"")},$.g.PX=function(t){var e=t.ia();this.lc(e,"x",t.aa),this.lc(e,"y",t.$a)},$.g.QX=function(t){var e=t.style(),i=t.path(),n=t.ia();if(i&&t.Ja()){var s=t.Ja().vn;i.parent(s),i.Sd(),$.jg(i,gg);var a=i.ia();s.ia().appendChild(a),s=$.cc($.ac.Id(),a,"path"),$.qh(this,a,s),a=Li(),t.Ka.setAttributeNS("http://www.w3.org/1999/xlink","href",a+"#"+s)}t.Hm()?(n.style["-webkit-touch-callout"]="",n.style["-webkit-user-select"]="",n.style["-khtml-user-select"]="",n.style["-moz-user-select"]="",n.style["-ms-user-select"]="",n.style["-o-user-select"]="",n.style["user-select"]="",($.hd&&9==cd||$.yd)&&(n.removeAttribute("unselectable"),n.removeAttribute("onselectstart"))):(n.style["-webkit-touch-callout"]="none",n.style["-webkit-user-select"]="none",n.style["-khtml-user-select"]="none",n.style["-moz-user-select"]="moz-none",n.style["-ms-user-select"]="none",n.style["-o-user-select"]="none",n.style["user-select"]="none",($.hd&&9==cd||$.yd)&&(this.lc(n,"unselectable","on"),this.lc(n,"onselectstart","return false;"))),e.fontStyle?this.lc(n,"font-style",e.fontStyle):n.removeAttribute("font-style"),e.fontVariant?$.gd?n.style["font-variant"]=e.fontVariant:this.lc(n,"font-variant",e.fontVariant):$.gd?n.style["font-variant"]="":n.removeAttribute("font-variant"),e.fontFamily?(this.lc(n,"font-family",e.fontFamily),n.style.fontFamily=e.fontFamily):(n.removeAttribute("font-family"),n.style.fontFamily=""),e.fontSize?this.lc(n,"font-size",e.fontSize):n.removeAttribute("font-size"),e.fontWeight?this.lc(n,"font-weight",e.fontWeight):n.removeAttribute("font-weight"),e.color?this.lc(n,"fill",e.color):n.removeAttribute("fill"),e.letterSpacing?this.lc(n,"letter-spacing",e.letterSpacing):n.removeAttribute("letter-spacing"),e.decoration?this.lc(n,"text-decoration",e.decoration):n.removeAttribute("text-decoration"),e.direction?this.lc(n,"direction",e.direction):n.removeAttribute("direction"),e.hAlign&&!i?this.lc(n,"text-anchor","rtl"==e.direction?$.gd||$.hd?"end"==e.hAlign||"left"==e.hAlign?$.Ph:e.hAlign==$.Ph||"right"==e.hAlign?"end":"middle":"end"==e.hAlign||"left"==e.hAlign?"end":e.hAlign==$.Ph||"right"==e.hAlign?$.Ph:"middle":"end"==e.hAlign||"right"==e.hAlign?"end":e.hAlign==$.Ph||"left"==e.hAlign?$.Ph:"middle"):n.removeAttribute("text-anchor"),n.style.opacity=e.opacity?e.opacity:"1",t=e.textShadow,n.style.textShadow=t&&"none"!=t?t:""},$.g.IZ=function(t){var e=t.ia(),i=t.parent();(t.i||t.mo)&&this.lc(e,"x",i.path()?t.mo:i.aa+t.mo),this.lc(e,"dy",t.um)},$.g.JZ=function(t){var e=t.b,i=t.ia(),n=t.parent(),s=this.wF(t.text);i.appendChild(s),($.hd&&9==cd||$.yd)&&(n.Hm()?(i.removeAttribute("onselectstart"),i.removeAttribute("unselectable")):(this.lc(i,"onselectstart","return false;"),this.lc(i,"unselectable","on"))),e.fontStyle&&this.lc(i,"font-style",e.fontStyle),e.fontVariant&&this.lc(i,"font-variant",e.fontVariant),e.fontFamily&&this.lc(i,"font-family",e.fontFamily),e.fontSize&&this.lc(i,"font-size",e.fontSize),e.fontWeight&&this.lc(i,"font-weight",e.fontWeight),e.color&&this.lc(i,"fill",e.color),e.letterSpacing&&this.lc(i,"letter-spacing",e.letterSpacing),e.er&&this.lc(i,"text-decoration",e.er),(t.parent().path()?t.parent().Ka:t.parent().ia()).appendChild(i)},$.g.R_=function(t){Ni(this,t),Oi(this,t)},$.g.Ji=function(t){t.visible()?t.ia().removeAttribute("visibility"):this.lc(t.ia(),"visibility","hidden")},$.g.CB=function(t){var e=t.Pd;e&&!$.zb(e)?this.lc(t.ia(),"transform",e.toString()):t.ia().removeAttribute("transform")},$.g.R5=function(t){var e=t.Pd;e&&!$.zb(e)?this.lc(t.ia(),"patternTransform",e.toString()):t.ia().removeAttribute("patternTransform")},$.g.Q5=Gi.prototype.CB,$.g.N5=Gi.prototype.CB,$.g.P5=Gi.prototype.CB,$.g.U5=Gi.prototype.CB,$.g.K5=Gi.prototype.CB,$.g.hP=function(t,e,i){$.ph(this,t,{width:e,height:i})},$.g.RX=function(t,e){var i=t.ia();i&&(null!=e?(t.nx||(t.nx=Hi("title"),this.lc(t.nx,"aria-label","")),$.bf(t.nx)||$.We(i,t.nx,0),t.nx.innerHTML=e):t.nx&&i.removeChild(t.nx))},$.g.JX=function(t,e){var i=t.ia();i&&(null!=e?(t.zv||(t.zv=Hi("desc"),this.lc(t.zv,"aria-label","")),$.bf(t.zv)||$.We(i,t.zv,0),t.zv.innerHTML=e):t.zv&&i.removeChild(t.zv))},$.g.J5=function(t,e){var i=t.ia();i&&(e?this.lc(i,"vector-effect","non-scaling-stroke"):i.removeAttribute("vector-effect"))},$.g.O5=$.ia,$.g.H5=function(t){$.ph(this,t.ia(),{cx:t.To(),cy:t.Uo(),r:t.Eb()})},$.g.KX=function(t){$.ph(this,t.ia(),{cx:t.To(),cy:t.Uo(),rx:t.Xr(),ry:t.zx()})},$.g.OX=function(t){var e=$.rh(this,t,!1);e?this.lc(t.ia(),"d",e):this.lc(t.ia(),"d","M 0,0")},$.g.Z0=function(t){for(var e=t.elements,i=0;i<e.length;i++)e[i].ia()&&Pi(e[i]),e[i].clip(null);t=t.id(),(t=$.ze(window.document,t))&&($.Xe($.$e(t)),$.Xe(t))},$.g.HX=function(t){var e=t.clip();if(e){var i;if($.J(e,$.Dg)&&(i=e.id()),!i){i=t.Ja().vn;var n=ck(i,e),s=$.cc($.ac.Id(),n,"clip");$.bf(n)!=i.ia()&&(this.lc(n,"clip-rule","nonzero"),$.qh(this,n,s)),e.o(t.Ja()),e.id(s),(e=e.shape()).Sd(),(e=e.ia())&&(n.appendChild(e),i.ia().appendChild(n)),i=s}n=Li(),$.ph(this,t.ia(),{"clip-path":'url("'+n+"#"+i+'")',clipPathUnits:"userSpaceOnUse"})}else Pi(t)},$.g.S5=function(t){t.Dd()?this.lc(t.ia(),"pointer-events","none"):t.ia().removeAttribute("pointer-events")},$.H($.Si,wd),$.Ri="left",Paa="middle",Qaa="right",Raa="none",$.Si.prototype.preventDefault=function(){$.Si.u.preventDefault.call(this),this.kf.preventDefault()},$.Si.prototype.stopPropagation=function(){$.Si.u.stopPropagation.call(this),this.kf.stopPropagation()},$.Si.prototype.Ju=function(){wd.prototype.stopPropagation.call(this)},$.Si.prototype.OA=function(){return this.kf.OA()};var yE=$.Si.prototype;yE.stopPropagation=yE.stopPropagation,yE.stopWrapperPropagation=yE.Ju,yE.preventDefault=yE.preventDefault,Ti.prototype.get=function(){if(0<this.f){this.f--;var t=this.b;this.b=t.next,t.next=null}else t=this.i();return t};var jj=new Ti((function(){return new Wi}),(function(t){t.reset()})),ij;Vi.prototype.add=function(t,e){var i=jj.get();i.set(t,e),this.f?this.f.next=i:this.b=i,this.f=i},Vi.prototype.remove=function(){var t=null;return this.b&&(t=this.b,this.b=this.b.next,this.b||(this.f=null),t.next=null),t},Wi.prototype.set=function(t,e){this.b=t,this.f=e,this.next=null},Wi.prototype.reset=function(){this.next=this.f=this.b=null};var Yi,Zi=!1,$i=new Vi,kj,nj;kj=0,$.mj=2,nj=3,pj.prototype.reset=function(){this.context=this.f=this.i=this.b=null,this.o=!1};var qj=new Ti((function(){return new pj}),(function(t){t.reset()}));$.oj.prototype.then=function(t,e,i){return $.yj(this,$.D(t)?t:null,$.D(e)?e:null,i)},$.oj.prototype.then=$.oj.prototype.then,$.oj.prototype.$goog_Thenable=!0,$.oj.prototype.cancel=function(t){this.dc==kj&&$.aj((function(){var e=new xj(t);sj(this,e)}),this)},$.oj.prototype.K=function(t){this.dc=kj,$.lj(this,$.mj,t)},$.oj.prototype.P=function(t){this.dc=kj,$.lj(this,nj,t)},$.oj.prototype.G=function(){for(var t;t=tj(this);)uj(this,t,this.dc,this.D);this.o=!1};var Bj=Xi;$.H(xj,ta),xj.prototype.name="cancel",$.Cj=$.fa,$.H($.Fj,$.od),$.g=$.Fj.prototype,$.g.Bo=!1,$.g.uF=null,$.g.id=function(){return this.he||(this.he=bc($.ac.Id(),this))},$.g.Sm=function(){return"linear-gradient"},$.g.ld=function(){$.Fj.u.ld.call(this)},$.g.R=function(){this.uF&&(this.uF.qX(this),this.uF=null),this.transform=this.Ta=null,delete this.keys,this.mode=!1,$.Fj.u.R.call(this)};var zE=$.Fj.prototype;zE.dispose=zE.ld,$.H($.Hj,$.od),$.g=$.Hj.prototype,$.g.Bo=!1,$.g.vF=null,$.g.id=function(){return this.he||(this.he=bc($.ac.Id(),this))},$.g.Sm=function(){return"radial-gradient"},$.g.ld=function(){$.Hj.u.ld.call(this)},$.g.R=function(){this.vF&&(this.vF.j5(this),this.vF=null),this.transform=this.Ta=null,delete this.keys,$.Hj.u.R.call(this)};var AE=$.Hj.prototype;AE.dispose=AE.ld,$.H($.Jj,$.od),$.g=$.Jj.prototype,$.g.Ud=null,$.g.ia=function(){return this.Ud},$.g.Ac=function(){this.Ud=$.mg().AS()},$.g.clear=function(){$.Kc(this.ru),$.Kc(this.D),$.Kc(this.i),$.Kc(this.b),$.Ve(this.Ud)},$.g.qX=function(t){var e=$.Gj(t.keys,t.opacity,t.angle,t.mode,t.transform);$.Gc(this.ru,e)&&$.Lc(this.ru,e),t=$.ze(window.document,t.id()),$.Xe(t)},$.g.j5=function(t){var e=$.Ij(t.keys,t.Dc,t.uc,t.Se,t.i,t.opacity,t.Ta,t.transform);$.Gc(this.D,e)&&$.Lc(this.D,e),t=$.ze(window.document,t.id()),$.Xe(t)},$.g.Sd=function(){this.Ac();var t=this.o.ia(),e=this.ia();t.appendChild(e)},$.g.hc=function(t){return t.remove(),t.fl(this),this},$.g.removeChild=function(t){return t.fl(null),$.Xe(t.ia()),t},$.g.Ig=function(){return null},$.g.UI=$.ia,$.g.Ja=function(){return this.o},$.g.Pb=$.ia,$.g.R=function(){$.Xe(this.Ud),this.Ud=null,$.Dc(this.ru,(function(t){$.qd(t)})),$.Dc(this.D,(function(t){$.qd(t)})),$.Dc(this.b,(function(t){$.qd(t)})),$.Dc(this.i,(function(t){$.qd(t)})),this.i=this.b=this.D=this.ru=null,delete this.o},$.H($.Yj,$.qf);var cE=1;$.g=$.Yj.prototype,$.g.Yf=window.NaN,$.g.Jf=window.NaN,$.g.uM=window.NaN,$.g.tM=window.NaN,$.g.BL=window.NaN,$.g.AL=window.NaN,$.g.RN=100,$.g.JC=window.NaN,$.g.ks=0,$.Yj.prototype.pathToRadialGradientImage="RadialGradient.png",$.g=$.Yj.prototype,$.g.he=void 0,$.g.JJ=1,$.g.Jc=null,$.g.nx=null,$.g.ox=void 0,$.g.zv=null,$.g.Av=void 0,$.g.QR=!1,$.g.rw=!1,$.g.X6=!0,$.g.id=function(t){return $.p(t)?(t=t||"",this.he!=t&&(this.he=t,$.qh($.mg(),this.Ud,this.he)),this):($.p(this.he)||this.id(bc($.ac.Id(),this)),this.he)},$.g.Ja=function(){return this},$.g.parent=function(){return this},$.g.ia=function(){return this.Ud},$.g.width=function(t){return $.p(t)?(Vj(this,t)&&this.Dt(!0),this):this.Yf||0},$.g.height=function(t){return $.p(t)?(Wj(this,t)&&this.Dt(!0),this):this.Jf||0},$.g.resize=function(t,e){var i=Vj(this,t),n=Wj(this,e);(i||n)&&this.Dt(!0)},$.g.Nha=function(t){return $.p(t)?(0<=(t=(0,window.parseFloat)(t))&&(this.RN>t&&!(0,window.isNaN)(this.JC)&&(0,window.clearTimeout)(this.JC),this.RN=t,this.Dt(!0)),this):this.RN},$.g.O=function(t){return $.p(t)?(t=$.ze(window.document,t||null),this.Jc!=t&&(this.Jc=t,Xj(this),this.Dt(!0),this.Sd()),this):this.Jc?this.qp:null},$.g.Cfa=function(){return this.Jc},$.g.Tl=function(){return this.qp},$.g.suspend=function(){return this.JJ++,this},$.g.resume=function(t){return this.JJ=t?0:Math.max(this.JJ-1,0),this.Sd(),this},$.g.wda=function(t){return $.p(t)?(this.QR=!!t,this):this.QR},$.g.yf=function(){return!!this.JJ},$.g.wN=function(){return this.rw},$.g.title=function(t){return $.p(t)?(this.ox!=t&&(this.ox=t,$.mg().RX(this,this.ox)),this):this.ox},$.g.bT=function(t){return $.p(t)?(this.Av!=t&&(this.Av=t,$.mg().JX(this,this.Av)),this):this.Av},$.g.visible=function(t){return 0==arguments.length?this.Oa.visible():(this.Oa.visible(t),this)},$.g.data=function(t){if(0==arguments.length)return this.F();var e=t.type;if(e)switch(e){case"rect":var i=this.rect();break;case"circle":i=this.rn();break;case"ellipse":i=this.ellipse();break;case"image":i=this.wk();break;case"text":i=this.text();break;case"path":i=this.path();break;case"layer":i=this.Bd();break;default:i=null}else this.pe(t);return i&&i.pe(t),this},$.g.remove=function(){return this.O(null)},$.g.Gh=function(){return 0},$.g.As=function(){return 0},$.g.rb=function(){return new $.I(0,0,this.width(),this.height())},$.g.clip=function(t){return this.Oa.clip(t)},$.g.BM=function(){return this.s0},$.g.fullScreen=function(t){var e=this.Tl();if($.p(t))return e&&this.Ky()&&(t=!!t,this.fullScreen()!=t&&(t?e.mozRequestFullScreenWithKeys?e.mozRequestFullScreenWithKeys():e.webkitRequestFullscreen||e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.requestFullscreen&&e.requestFullscreen():(e=$.ye().b).webkitCancelFullScreen?e.webkitCancelFullScreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen?e.msExitFullscreen():e.exitFullscreen&&e.exitFullscreen())),this;if(!(t=!e)){t:{t=[(t=$.ye().b).webkitFullscreenElement,t.mozFullScreenElement,t.msFullscreenElement,t.fullscreenElement];for(var i=0;i<t.length;i++)if(null!=t[i]){t=t[i];break t}t=null}t=t!=e}return!t},$.g.Ky=function(){return $.Tj()},$.g.EY=function(t){return $.p(t)?(this.X6=!!t,this):this.X6},$.g.Sm=function(){return"stage"},$.g.sl=function(){return this.Oa},$.g.UI=function(t){this.Oa.UI(t)},$.g.cG=$.ia,$.g.Dt=function(t,e){t&&!(0,window.isNaN)(this.JC)&&(0,window.clearTimeout)(this.JC),this.JC=window.NaN;var i=(0,window.isNaN)(this.uM),n=(0,window.isNaN)(this.tM),s=i||n;if(s){var a=this.fullScreen()?$.Wf(this.qp):this.Jc?$.Wf(this.Jc):new $.lb(window.NaN,window.NaN);a.width=Math.max(a.width||0,0),a.height=Math.max(a.height||0,0);var o=!a.width&&!a.height;i=i?a.width:this.uM,n=n?a.height:this.tM}else i=this.uM,n=this.tM,o=!1;i==this.Yf&&n==this.Jf||o||(this.Yf=i,this.Jf=n,e||this.dispatchEvent("stageresize")),this.Jc&&s&&!$.Ch.isNodeJS&&(this.JC=(0,window.setTimeout)(this.Dt,this.RN))},$.g.Lda=function(){this.vn.clear()},$.g.pe=function(t){this.width(t.width),this.height(t.height),t.type="layer",this.sl().pe(t),this.sl().id(""),"id"in t&&this.id(t.id)},$.g.F=function(){var t=this.sl().F();return this.he&&(t.id=this.he),t.width=this.BL,t.height=this.AL,delete t.type,t},$.g.KZ=function(t){return this.ks+=t,t},$.g.M$=function(t){return t=Math.min(500-this.ks,t),this.ks+=t,t},$.g.xF=$.Yj.prototype.KZ,$.g.Sd=function(){if(!this.JJ&&this.Jc&&!this.rw)if(this.rw=!0,this.dispatchEvent("renderstart"),this.ks=0,this.QR)this.xF=this.M$,(0,window.setTimeout)(this.NO,0);else{if(this.xF=this.KZ,this.jk(),this.yr())throw $.ld(6);ak(this)}},$.g.NO=function(){this.jk(),this.yr()?(0,window.setTimeout)(this.NO,0):ak(this)},$.g.jk=function(){if(this.Qx&&this.Qx.length){for(var t=0;t<this.Qx.length;t++){var e=this.Qx[t];e.yr()&&e.Sd()}this.Qx.length=0}this.Oa.yr()&&this.Oa.Sd(),this.Xo&&this.Xo().Sd()},$.g.Pb=function(){},$.g.yr=function(){return this.Oa.yr()},$.g.Vf=function(t){return this.Oa.Vf(t)},$.g.Bd=$.Fg.prototype.Bd,$.g.UP=$.Fg.prototype.UP,$.g.text=$.Fg.prototype.text,$.g.iN=$.Fg.prototype.iN,$.g.rect=$.Fg.prototype.rect,$.g.wk=$.Fg.prototype.wk,$.g.RO=$.Fg.prototype.RO,$.g.QO=$.Fg.prototype.QO,$.g.SP=$.Fg.prototype.SP,$.g.rn=$.Fg.prototype.rn,$.g.ellipse=$.Fg.prototype.ellipse,$.g.path=$.Fg.prototype.path,$.g.tP=$.Fg.prototype.tP,$.g.vP=$.Fg.prototype.vP,$.g.wP=$.Fg.prototype.wP,$.g.xP=$.Fg.prototype.xP,$.g.yP=$.Fg.prototype.yP,$.g.uP=$.Fg.prototype.uP,$.g.RP=$.Fg.prototype.RP,$.g.OP=$.Fg.prototype.OP,$.g.QP=$.Fg.prototype.QP,$.g.PP=$.Fg.prototype.PP,$.g.QL=$.Fg.prototype.QL,$.g.yL=$.Fg.prototype.yL,$.g.PL=$.Fg.prototype.PL,$.g.aN=$.Fg.prototype.aN,$.g.YP=$.Fg.prototype.YP,$.g.qg=$.Fg.prototype.qg,$.g.VL=$.Fg.prototype.VL,$.g.E0=function(t,e,i,n){return new $.Dg(this,t,e,i,n)},$.g.pattern=function(t){return new $.Qb(t)},$.g.qe=function(t,e,i,n){return Xb(t,e,i,n)},$.g.bc=function(){return this.Oa.bc()},$.g.hc=function(t){return this.Oa.hc(t),this},$.g.Eg=function(t,e){return this.Oa.Eg(t,e),this},$.g.xd=function(t){return this.Oa.xd(t)},$.g.removeChild=function(t){return this.Oa.removeChild(t)},$.g.Cj=function(t){return this.Oa.Cj(t)},$.g.Gi=function(){return this.Oa.Gi()},$.g.cN=function(t){return this.Oa.cN(t)},$.g.Kf=function(t){return this.Oa.Kf(t)},$.g.HP=function(t,e){return this.Oa.HP(t,e),this},$.g.KJ=function(t,e){return this.Oa.KJ(t,e),this},$.g.Pj=function(t,e){return this.Oa.Pj(t,e),this},$.g.rotate=function(t,e,i){return this.Oa.rotate(t,e,i),this},$.g.Du=function(t,e){return this.Oa.Du(t,e),this},$.g.JE=function(t,e,i){return this.Oa.JE(t,e,i),this},$.g.gP=function(t,e){return this.Oa.gP(t,e),this},$.g.translate=function(t,e){return this.Oa.translate(t,e),this},$.g.setPosition=function(t,e){return this.Oa.setPosition(t,e),this},$.g.scale=function(t,e,i,n){return this.Oa.scale(t,e,i,n),this},$.g.XO=function(t,e,i){return this.Oa.XO(t,e,i),this},$.g.RF=function(t,e,i,n,s,a){return this.Oa.RF(t,e,i,n,s,a),this},$.g.oc=function(t,e,i,n,s,a){return this.Oa.oc(t,e,i,n,s,a),this},$.g.tD=function(){return this.Oa.tD()},$.g.kp=function(){return this.Oa.kp()},$.g.Ig=function(){return null},$.g.dispatchEvent=function(t){return $.z(t)?t=t.toLowerCase():"type"in t&&(t.type=String(t.type).toLowerCase()),$.Yj.u.dispatchEvent.call(this,t)},$.g.wa=function(t,e,i,n){return $.Yj.u.wa.call(this,String(t).toLowerCase(),e,i,n)},$.g.Ce=function(t,e,i,n){return $.Yj.u.Ce.call(this,String(t).toLowerCase(),e,i,n)},$.g.gc=function(t,e,i,n){return $.Yj.u.gc.call(this,String(t).toLowerCase(),e,i,n)},$.g.Bl=function(t){return $.p(t)&&(t=String(t).toLowerCase()),$.Yj.u.Bl.call(this,t)},$.g.sq=function(t){var e=new $.Si(t,this);if($.J(e.target,$.ig)){e.target.dispatchEvent(e);var i=e.type;switch(e.defaultPrevented&&t.preventDefault(),$.J(e.relatedTarget,$.ig)&&e.relatedTarget.Ja()==this||("mouseover"==i?this.Qg.wa(window.document,"mousemove",this.sq,!1):"mouseout"==i&&this.Qg.gc(window.document,"mousemove",this.sq,!1)),i){case"mousedown":this.Qg.wa(window.document,"mouseup",this.sq,!1);break;case"mouseup":this.Qg.gc(window.document,"mouseup",this.sq,!1);break;case"touchstart":this.Qg.wa(window.document,"touchmove",this.sq,{capture:!1,passive:!1});break;case"touchend":this.Qg.gc(window.document,"touchmove",this.sq,{capture:!1,passive:!1});break;case"pointerdown":this.Qg.wa(window.document,"pointermove",this.sq,!1);break;case"pointerup":this.Qg.gc(window.document,"pointermove",this.sq,!1)}}},$.g.ld=function(){$.Yj.u.ld.call(this)},$.g.R=function(){$.Yj.u.R.call(this),$.Dc(this.s0,(function(t,e,i){t.remove(),delete i[t]})),$.qd(this.Qg),this.Qg=null,$.qd(this.vn),delete this.vn,$.qd(this.Oa),this.jk(),this.Oa.gD(),delete this.Oa;var t=$.cc($.ac.Id(),this,"stage");delete $.Ch.sP[t],ik(this),$.Xe(this.qp),this.Jc=null,delete this.qp,this.Ud=null,$.Jc(hk)&&Kaa(),this.sm&&(this.sm.ld(),this.sm=null)};var BE=$.Yj.prototype,hk;$.E("acgraph.vector.Stage",$.Yj),BE.id=BE.id,BE.container=BE.O,BE.getContainerElement=BE.Cfa,BE.getDomWrapper=BE.Tl,BE.maxResizeDelay=BE.Nha,BE.dispose=BE.ld,BE.getBounds=BE.rb,BE.layer=BE.Bd,BE.unmanagedLayer=BE.UP,BE.circle=BE.rn,BE.ellipse=BE.ellipse,BE.rect=BE.rect,BE.truncatedRect=BE.SP,BE.roundedRect=BE.RO,BE.roundedInnerRect=BE.QO,BE.path=BE.path,BE.star=BE.tP,BE.star4=BE.vP,BE.star5=BE.wP,BE.star6=BE.xP,BE.star7=BE.yP,BE.star10=BE.uP,BE.diamond=BE.QL,BE.triangleUp=BE.RP,BE.triangleDown=BE.OP,BE.triangleRight=BE.QP,BE.triangleLeft=BE.PP,BE.cross=BE.yL,BE.diagonalCross=BE.PL,BE.hLine=BE.aN,BE.vLine=BE.YP,BE.pie=BE.qg,BE.donut=BE.VL,BE.text=BE.text,BE.html=BE.iN,BE.image=BE.wk,BE.data=BE.data,BE.pattern=BE.pattern,BE.hatchFill=BE.qe,BE.clearDefs=BE.Lda,BE.numChildren=BE.bc,BE.addChild=BE.hc,BE.addChildAt=BE.Eg,BE.removeChild=BE.removeChild,BE.removeChildAt=BE.Cj,BE.removeChildren=BE.Gi,BE.swapChildren=BE.HP,BE.swapChildrenAt=BE.KJ,BE.getChildAt=BE.xd,BE.hasChild=BE.cN,BE.forEachChild=BE.Pj,BE.indexOfChild=BE.Kf,BE.getX=BE.Gh,BE.getY=BE.As,BE.width=BE.width,BE.height=BE.height,BE.getBounds=BE.rb,BE.resize=BE.resize,BE.asyncMode=BE.wda,BE.resume=BE.resume,BE.suspend=BE.suspend,BE.isRendering=BE.wN,BE.isSuspended=BE.yf,BE.remove=BE.remove,BE.domElement=BE.ia,BE.visible=BE.visible,BE.rotate=BE.rotate,BE.rotateByAnchor=BE.Du,BE.setRotation=BE.JE,BE.setRotationByAnchor=BE.gP,BE.translate=BE.translate,BE.setPosition=BE.setPosition,BE.scale=BE.scale,BE.scaleByAnchor=BE.XO,BE.appendTransformationMatrix=BE.RF,BE.setTransformationMatrix=BE.oc,BE.getRotationAngle=BE.tD,BE.getTransformationMatrix=BE.kp,BE.clip=BE.clip,BE.createClip=BE.E0,BE.parent=BE.parent,BE.getStage=BE.Ja,BE.listen=BE.wa,BE.listenOnce=BE.Ce,BE.unlisten=BE.gc,BE.unlistenByKey=BE.TB,BE.removeAllListeners=BE.Bl,BE.title=BE.title,BE.desc=BE.bT,BE.getCharts=BE.BM,BE.fullScreen=BE.fullScreen,BE.isFullScreenAvailable=BE.Ky,BE.usePrintingFontFaces=BE.EY,$.H(bk,$.Jj),bk.prototype.clear=function(){$.Kc(this.f),bk.u.clear.call(this)},bk.prototype.R=function(){for(var t in bk.u.R.call(this),this.f)delete this.f[t];delete this.f},$.H(dk,$.Yj),dk.prototype.F0=function(){return new bk(this)},hk={},$.Ch=$.fa.acgraph,$.fa.IS_ANYCHART_AMD?$.sh=window:($.sh=$.fa,$.sh.acgraph=$.sh.acgraph||{}),$.kk=null,$.kk=$.hd&&!$.bd("9")?"vml":"svg",$.Ch.fontSize="10px",$.Ch.fontColor="#000",$.Ch.textDirection="ltr",$.Ch.fontFamily="Verdana";var vk=void 0,CE,aq,Xaa,Yaa,Zaa,$aa,aba,uda,bba,cba,dba,fba,gba,iba,Nk,jba,kba,lba,mba,vda,nba,oba,qba,EE,rba,wda,xda,eu,yda,zda,Ada,sba,uba,vba,wba,xba,yba,zba,Aba,Bda,Cda,Dda,pca,Eda,GE,Mu,HE;for(HE in $.E("acgraph.create",$.lk),$.E("acgraph.getStage",(function(t){return $.Ch.sP[t]})),$.E("acgraph.type",(function(){return $.kk})),$.E("acgraph.rect",$.mk),$.E("acgraph.circle",$.nk),$.E("acgraph.ellipse",$.pk),$.E("acgraph.path",$.qk),$.E("acgraph.text",$.sk),$.E("acgraph.layer",$.ok),$.E("acgraph.image",rk),$.E("acgraph.hatchFill",Xb),$.E("acgraph.patternFill",$.Sb),$.E("acgraph.clip",$.tk),$.E("acgraph.useAbsoluteReferences",(function(t){if(!$.p(t))return!!Li();wk=t})),$.E("acgraph.updateReferences",(function(){var t=vk;if(vk=void 0,$.p(t)&&Li()!=t){var e,i=$.mg();for(e in hk)if(hk.hasOwnProperty(e)){var n=(t=hk[e]).Ja();n&&($.J(t,$.ig)&&(n.yf()?t.Pb(512):t.Vf(512)||i.HX(t)),$.J(t,$.pg)&&(n.yf()?t.Pb(24):(t.Vf(8)||Ni(i,t),t.Vf(16)||Oi(i,t))))}}})),$.fa.IS_ANYCHART_AMD?($.eq=$.fa,$.ll=window):($.ll=$.fa,$.ll.anychart=$.ll.anychart||{},$.eq=$.ll.anychart),$.Ch.anychart=$.eq,$.Cj=$.ll||$.fa,$.Lp=$.ll.document,$.E("anychart.VERSION","8.13.1.1939"),$.E("anychart.DEVELOP",!1),$.E("anychart.DEFAULT_THEME","defaultTheme"),$.E("anychart.PERFORMANCE_MONITORING",!1),Xaa={Nma:"by-spot",Pma:"by-x",b$:"single"},Yaa={NONE:"none",$ra:"single-select",fqa:"multi-select",uoa:"drill-down"},Zaa={bZ:"default",Ena:"crosshair",Xqa:"pointer",Npa:"move",n$:"text",Wsa:"wait",J8:"help",nqa:"n-resize",jqa:"ne-resize",Goa:"e-resize",Zra:"se-resize",rsa:"s-resize",qsa:"sw-resize",cta:"w-resize",mqa:"nw-resize",kqa:"ns-resize",Boa:"ew-resize",lqa:"nwse-resize",iqa:"nesw-resize"},$aa={V8:"left-top",U8:"left-center",T8:"left-bottom",C7:"center-top",xz:"center",B7:"center-bottom",t9:"right-top",s9:"right-center",r9:"right-bottom",$Y:"auto"},aba={V8:"left-top",U8:"left-center",T8:"left-bottom",C7:"center-top",xz:"center",B7:"center-bottom",t9:"right-top",s9:"right-center",r9:"right-bottom",$Y:"auto"},uda={Hma:"before-axes",$la:"after-axes"},bba={xz:"center",AQ:"left",GQ:"right",PQ:"top",pQ:"bottom"},cba={FZ:"vertical",hZ:"horizontal"},dba={FZ:"vertical",hZ:"horizontal",Rsa:"vertical-expandable",dpa:"horizontal-expandable"},fba={AQ:"left",GQ:"right",PQ:"top",pQ:"bottom"},gba={yQ:"inside",mZ:"outside"},iba={pma:"asc",Wna:"desc",NONE:"none"},Nk={rQ:"circle",c$:"square",e8:"diamond",u$:"triangle-up",r$:"triangle-down",t$:"triangle-right",s$:"triangle-left",H7:"cross",cZ:"diagonal-cross",e$:"star4",f$:"star5",g$:"star6",h$:"star7",d$:"star10",k9:"pentagon",p$:"trapezium",tt:"line",v$:"v-line",l7:"arrowhead",oma:"arrow-up",nma:"arrow-right",kma:"arrow-down",lma:"arrow-left"},jba={rQ:"circle",p9:"rect",Sqa:"pin",Qoa:"flag"},kba={Isa:"up",noa:"down",$Y:"auto",pqa:"odd-even"},lba={Mra:"series",Tra:"series-positive",Sra:"series-negative",ZERO:"zero",xma:"axis"},mba={j9:"no-overlap",k7:"allow-overlap",rma:"auto-width"},vda={NONE:"none",zra:"round",J7:"cut",Ara:"round-inner"},nba={bC:"area",kF:"bar",qQ:"bubble",aZ:"candlestick",lF:"column",tt:"line",lZ:"ohlc",pZ:"range-area",qZ:"range-bar",FQ:"range-column",rZ:"range-spline-area",sZ:"range-step-area",vZ:"spline",wZ:"spline-area",DZ:"step-line",CZ:"step-area",rQ:"circle",c$:"square",u$:"triangle-up",r$:"triangle-down",t$:"triangle-right",s$:"triangle-left",e8:"diamond",H7:"cross",cZ:"diagonal-cross",e$:"star4",f$:"star5",g$:"star6",h$:"star7",d$:"star10",k9:"pentagon",p$:"trapezium",l7:"arrowhead",v$:"v-line",av:"marker",xra:"rising-falling"},oba={bZ:"default",Sma:"categories"},$.Pk={A$:"x",tt:"line",j8:"ellipse",kF:"bar"},qba={yQ:"inside",xz:"center",mZ:"outside"},EE={NONE:"none",QQ:"value",Dqa:"percent"},rba={Ura:"series-start",Ooa:"first-visible",Ora:"series-end",ppa:"last-visible"},wda={coa:"direct",ura:"reverse"},xda={bC:"area",kF:"bar",Lma:"box",qQ:"bubble",aZ:"candlestick",lF:"column",Q8:"jump-line",tt:"line",av:"marker",lZ:"ohlc",pZ:"range-area",qZ:"range-bar",FQ:"range-column",rZ:"range-spline-area",sZ:"range-step-area",vZ:"spline",wZ:"spline-area",CZ:"step-area",DZ:"step-line",k$:"stick",O8:"hilo"},eu={yx:"children",eC:"parent"},yda={v8:"first-date",w8:"first-visible-date",S8:"last-visible-date",R8:"last-date"},zda={bZ:"default",ora:"raw",Ira:"selected",Zoa:"grouped"},Ada={NONE:"none",A$:"x",QQ:"value",Kma:"both"},sba={Fna:"csv",Oma:"by-word",Mma:"by-char"},uba={AQ:"left",i$:"start",xz:"center",m8:"end",GQ:"right"},vba={PQ:"top",f9:"middle",pQ:"bottom"},wba={Ima:"blink",tpa:"line-through",yqa:"overline",Dsa:"underline",NONE:"none"},xba={i9:"normal",jpa:"italic",oqa:"oblique"},yba={i9:"normal",csa:"small-caps"},zba={Epa:"ltr",Bra:"rtl"},$.FE={Fsa:"unit",POINTS:"points",oZ:"range",hta:"ytd",lra:"qtd",eqa:"mtd",d9:"max"},Aba={v8:"first-date",w8:"first-visible-date",S8:"last-visible-date",R8:"last-date"},Bda={Esa:"union",Lra:"separated",b$:"single"},Cda={FLOAT:"float",Wqa:"point",lna:"chart"},Dda={FLOAT:"float",lsa:"sticky"},pca={Cra:"same",boa:"different"},Eda={xz:"center",Woa:"forward",yma:"backward"},GE={vma:"average",n7:"bubbleSize",o7:"bubbleSizePercentOfCategory",p7:"bubbleSizePercentOfSeries",q7:"bubbleSizePercentOfTotal",Tma:"categoryName",s7:"categoryYAverage",Vma:"categoryYMax",t7:"categoryYMedian",Yma:"categoryYMin",u7:"categoryYMode",v7:"categoryYPercentOfTotal",ana:"categoryYRangeAverage",w7:"categoryYRangeMax",dna:"categoryYRangeMedian",x7:"categoryYRangeMin",gna:"categoryYRangeMode",y7:"categoryYRangePercentOfTotal",z7:"categoryYRangeSum",A7:"categoryYSum",D7:"chartElements",E7:"close",Dna:"count",L7:"dataPlotBubbleMaxSize",M7:"dataPlotBubbleMinSize",N7:"dataPlotBubbleSizeAverage",O7:"dataPlotBubbleSizeSum",Kna:"dataPlotMaxXSumSeriesName",Mna:"dataPlotMaxYSumSeriesName",Lna:"dataPlotMaxXValuePointSeriesName",Nna:"dataPlotMaxYValuePointSeriesName",Ona:"dataPlotMinXSumSeriesName",Qna:"dataPlotMinYSumSeriesName",Pna:"dataPlotMinXValuePointSeriesName",Rna:"dataPlotMinYValuePointSeriesName",P7:"dataPlotPointCount",Q7:"dataPlotSeriesCount",R7:"dataPlotXAverage",S7:"dataPlotXMax",T7:"dataPlotXMin",U7:"dataPlotXSum",V7:"dataPlotYAverage",W7:"dataPlotYMax",X7:"dataPlotYMin",Y7:"dataPlotYRangeMax",Z7:"dataPlotYRangeMin",c8:"dataPlotYRangeSum",d8:"dataPlotYSum",K8:"high",P8:"index",X8:"low",d9:"max",Hpa:"min",gqa:"name",OPEN:"open",gra:"pointsCount",Qqa:"pertChartCriticalPathStandardDeviation",Rqa:"pertChartProjectDuration",oZ:"range",n9:"rangeEnd",o9:"rangeStart",Nra:"seriesAverage",x9:"seriesBubbleMaxSize",y9:"seriesBubbleMinSize",z9:"seriesBubbleSizeAverage",A9:"seriesBubbleSizeMedian",B9:"seriesBubbleSizeMode",C9:"seriesBubbleSizeSum",D9:"seriesFirstXValue",E9:"seriesFirstYValue",H9:"seriesLastXValue",I9:"seriesLastYValue",Pra:"seriesMax",Qra:"seriesMin",Rra:"seriesName",K9:"seriesPointCount",J9:"seriesPointsCount",Vra:"seriesSum",L9:"seriesXAverage",M9:"seriesXMax",N9:"seriesXMedian",O9:"seriesXMin",P9:"seriesXMode",Q9:"seriesXSum",R9:"seriesYAverage",S9:"seriesYMax",T9:"seriesYMedian",U9:"seriesYMin",V9:"seriesYMode",Wra:"seriesYRangeAverage",W9:"seriesYRangeMax",Xra:"seriesYRangeMedian",X9:"seriesYRangeMin",Yra:"seriesYRangeMode",Y9:"seriesYRangeSum",Z9:"seriesYSum",osa:"sum",QQ:"value",l9:"percentValue",B$:"xPercentOfSeries",C$:"xPercentOfTotal",D$:"xValue",E$:"yPercentOfCategory",F$:"yPercentOfSeries",G$:"yPercentOfTotal",H$:"yValue",fta:"xScalesMin",dta:"xScalesMax",jta:"yScalesMin",ita:"yScalesMax",jna:"catYSumArr_",Zma:"catYMinArr_",Wma:"catYMaxArr_",Uma:"catYAvgArr_",Xma:"catYMedianArr_",$ma:"catYModeArr_",ina:"catYRangeSumArr_",fna:"catYRangeMinArr_",cna:"catYRangeMaxArr_",bna:"catYRangeAvgArr_",ena:"catYRangeMedianArr_",hna:"catYRangeModeArr_"},Mu={},GE)GE.hasOwnProperty(HE)&&(Mu[HE]=GE[HE].toLowerCase());var Fda={D7:"chart-elements",Sna:"data-table"},Bba={NONE:"none",xna:"consider"},Gda={sqa:"ordinal",Dra:"scatter"},Hda={doa:"discrete",Ana:"continuous"},jl={};$.H(ql,$.od);var Eba=/^(.*\.)?anychart\.(com|stg|dev)$/i,IE=!1,ml=1,nl=2,ol=4,pl=8;$.g=ql.prototype,$.g.pf=function(){return!this.dc},$.g.J=function(t){return!!(this.dc&t)},$.g.I=function(t){this.dc&=~t},$.g.B=function(t,e){var i=t&~this.dc;this.dc|=i,!this.md&&!this.f.yf()&&i&&e&&this.f.Sd()},$.g.enabled=function(t){return $.p(t)?(this.G!=t&&(this.G=t,(tl(this)||this.K)&&this.B(ml,!0)),this):this.G},$.g.text=function(t){return $.p(t)?(this.kc!=t&&(this.kc=t,tl(this)&&this.B(ol,!0)),this):this.kc},$.g.yK=function(t){return $.p(t)?(this.Ha!=t&&(this.Ha=t,tl(this)&&this.B(nl,!0)),this):this.Ha},$.g.wK=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,tl(this)&&this.B(nl,!0)),this):this.aa},$.g.xK=function(t){return $.p(t)?(this.ba!=t&&(this.ba=t,tl(this)&&this.B(nl,!0)),this):this.ba},$.g.FF=function(t){return $.p(t)?(this.ea!=t&&(this.ea=t,tl(this)&&this.B(pl,!0)),this):this.ea},$.g.Ja=function(){return this.f},$.g.ia=function(){return this.Ud},$.g.Sd=function(){var t=tl(this);if(t&&$.p(this.Ba)&&!this.Ba&&this.B(ml,!1),this.Ba=t,this.pf()||this.md||!this.f||this.f.yf())return this;if(!this.enabled()&&(this.K||t))return this.J(ml)&&($.Xe(this.Ud),this.I(ml)),this;if(!IE){var e="",i=$.Me("STYLE");i.type="text/css",e+='.anychart-credits{position:absolute;overflow:hidden;right:9px;bottom:6px;height:10px;}.anychart-credits a {text-decoration:none;}.anychart-credits-logo{border:none;margin-right:2px;height:10px;width:10px;display:inline-block;vertical-align:top;}.anychart-credits-text{font-size:10px;line-height:9px;display:inline-block;vertical-align:top;text-decoration:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#929292;height:10px;}',i.styleSheet?i.styleSheet.cssText=e:i.appendChild(window.document.createTextNode(String(e))),$.We($.Ae(window.document,"head",void 0,void 0)[0],i,0),IE=!0}return this.Ud||(this.Ud=$.Me("DIV","anychart-credits")),this.i||(this.i=$.Me("A"),this.D=$.Me("SPAN","anychart-credits-text"),this.b=$.Me("IMG","anychart-credits-logo"),Ue(this.i,this.D),this.Ud.appendChild(this.i)),e=this.f.Tl(),this.J(ml)&&(e&&e.appendChild(this.Ud),this.I(ml)),this.J(nl)&&(e=$.gc.apply(null,[", v%s.%s.%s.%s"].concat(["8","13","1","1939"])),i=t?this.wK():"AnyChart - JavaScript Charts designed to be embedded and integrated{{anychart-version}}",$.Ce(this.i,{href:t?this.yK():"https://www.anychart.com/?utm_source=trial",title:i.replace("{{anychart-version}}",e),target:"_blank"}),$.Ce(this.b,{alt:t?this.xK():"AnyChart - JavaScript Charts"}),this.I(nl)),this.J(ol)&&(t=t?this.text():"AnyChart Trial Version",$.df(this.D,t),this.I(ol)),this.J(pl)&&((t=tl(this)?this.FF():rl())?(this.P=t,(e=th($.mg()))&&($.Ld(e,"complete",this.u4,!1,this),$.Ld(e,"load",this.g_,!1,this),$.Ld(e,"error",this.v4,!1,this),this.o&&(fh(e,t),this.o=!1),dh(e,t,t),this.o=!0,e.start())):$.Xe(this.b),this.I(pl)),this},$.g.g_=function(t){var e=this.P;t.target.id==e&&(this.md||(tl(this)?this.FF():rl())!=e||this.b.parentNode||$.We(this.i,this.b,0),$.Ce(this.b,{src:e}),this.o=!1)},$.g.u4=function(t){t.target.id==this.P&&(this.o=!1)},$.g.v4=function(t){t.target.id==this.P&&$.Xe(this.b)},$.g.N=function(t){this.f.suspend(),$.z(t)?(this.text(t),this.enabled(!0)):$.da(t)||null===t?this.enabled(!!t):$.C(t)&&(this.yK(t.url),this.text(t.text),this.wK(t.alt),this.xK(t.imgAlt),this.FF(t.logoSrc),this.enabled(t.enabled)),this.f.resume()},$.g.F=function(){var t={};return t.url=this.yK(),t.alt=this.wK(),t.imgAlt=this.xK(),t.text=this.text(),t.logoSrc=this.FF(),t.enabled=this.enabled(),t},$.g.R=function(){var t=$.mg();t.iu&&!t.iu.md&&(t=th($.mg()),$.Yd(t,"load",this.g_,!1,this),$.Yd(t,"complete",this.u4,!1,this),$.Yd(t,"error",this.v4,!1,this)),$.Xe(this.D),$.Xe(this.b),$.Xe(this.i),$.Xe(this.Ud),this.f=this.Ud=this.i=this.b=this.D=null,ql.u.R.call(this)};var JE=ql.prototype;JE.text=JE.text,JE.url=JE.yK,JE.alt=JE.wK,JE.imgAlt=JE.xK,JE.logoSrc=JE.FF,JE.enabled=JE.enabled,$.ll.performance&&$.D($.ll.performance.now)&&(0,$.pa)($.ll.performance.now,$.ll.performance),ul.prototype.measure=function(){xl(this);var t,e=[];for(t in this.b){var i=this.b[t];if(!i.FV){for(var n=0;n<i.oS.length;n++){var s=i.oS[n];s&&((s.ea?s.i[0]&&s.i[0][0]&&s.i[0][0].O:s.na?s.G.O:s.ba?s.b[0].O:s.O)||$.Px(s,this.f),e.push(s))}i.FV=!0}}for(t=0;t<e.length;t++)$.Yx(e[t])},ul.prototype.o=function(t){var e=t.target,i=$.X(t,$.KE);t=$.X(t,$.LE),(i||t)&&(e="m"+$.oa(e),(e=this.b[e]).FV=!t,i&&(e.oS=e.FO.Uw()))};var Al={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Gba=/#(.)(.)(.)/,yl=/^#(?:[0-9a-f]{3}){1,2}$/i,Fba=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,Hba,Iba,Yl,im,Hm,Cm,Em,Dm,Im,Jm,Fm,sm,um,wm,Am;$.bm={color:"#fff",opacity:1e-5},Hba=/^#(?:[0-9a-f]{3}){1,2}$/i,Iba=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,Yl={},$.E("anychart.color.blend",$.Kl),$.E("anychart.color.lighten",$.Pl),$.E("anychart.color.darken",$.Ql),$.E("anychart.color.setThickness",$.Wl),$.E("anychart.color.setOpacity",$.Ul),$.E("anychart.color.singleHueProgression",Ml),$.E("anychart.color.bipolarHueProgression",(function(t,e,i){return i=$.p(i)?i:7,t=Ml(t||"blue",Math.floor(i/2)+1,null,1),e=Ml(e||"red",Math.floor(i/2)+1,1),0==i%2&&$.Ca(t,t.length-1,1),$.Ca(e,0,1),t.concat(e)})),$.E("anychart.color.blendedHueProgression",$.Nl);for(var ME=[{Tb:"defaultScaleSettings.linear",Rb:[["defaultScaleSettings.",["log","dateTime"]]]},{Tb:"defaultOrdinalColorScale",Rb:["defaultScaleSettings.ordinalColor"]},{Tb:"defaultLinearColorScale",Rb:["defaultScaleSettings.linearColor"]},{Tb:"defaultFontSettings",Rb:[["default",["Title","CrosshairLabel","ButtonSettings.normal",["Tooltip",["",".contentInternal"]],["Legend",["",".paginator"]],["Label",["Factory","Settings"]]]],[["cartesianBase","scatter","mekko"],".defaultTextMarkerSettings"],["standalones.",["label","table","textAxisMarker"]],[["standalones","resource"],".resourceList.baseSettings"],"stock.eventMarkers.normal","chart.defaultAnnotationSettings.label"]},{Tb:"defaultLabelSettings",Rb:[["chart.",[[["","defaultQuarterSettings."],"defaultLabelSettings"]]],"defaultTextMarkerSettings"]},{Tb:"defaultBackground",Rb:[[[["default",["Title","Timeline.header","TextMarkerSettings","ButtonSettings.normal",["Tooltip",["",".contentInternal"]],"LabelFactory","CrosshairLabel",["Legend",["",".paginator"]]]],["chart",["",".defaultAnnotationSettings.label",[["",".defaultQuarterSettings"],".defaultLabelSettings"],".dataArea"]],["stock.",[[["defaultPlotSettings","scroller"],".xAxis"],"defaultPlotSettings.dataArea"]],["resource.",["grid","timeLine","resourceList"]],["standalones",["",".label",".resourceList"]]],".background"],"chart.defaultQuarterSettings"]},{Tb:"chart.defaultLabelSettings",Rb:["defaultNoDataLabel"]},{Tb:"defaultLabelFactory",Rb:[["default",[["Axis.",[[["minorL","l"],"abels"]]],["Timeline.",["header","labels"]]]],"standalones.labelsFactory",["map.axesSettings.",[[["l","minorL"],"abels"]]],[["pert.milestones",["resource.",["activities","conflicts"]]],".labels"],["pert.tasks.",[[["upper","lower"],"Labels"]]],"stock.defaultPlotSettings.defaultPriceIndicatorSettings.label","treeMap.normal.headers",[["venn","pieFunnelPyramidBase","sunburst",["sankey.",["node","flow","dropoff"]],[["heat","tree"],"Map"],[["chart.defaultAnnotation","linearGauge.defaultPointer",[["chart","map"],".defaultSeries"]],"Settings.base"]],".normal.labels"]]},{Tb:"chart.normal.labels",Rb:["chart.defaultSeriesSettings.base.normal.labels"]},{Tb:"defaultCrosshairLabel",Rb:[[["cartesianBase","mekko","scatter","map","stock"],".crosshair.defaultLabelSettings"]]},{Tb:"defaultMarkerFactory",Rb:["defaultTimeline.markers","standalones.markersFactory",[["venn","pieFunnelPyramidBase",[["heat","tree"],"Map"],[["chart.defaultAnnotation",[["chart","map"],".defaultSeries"]],"Settings.base"]],".normal.markers"]]},{Tb:"defaultTitle",Rb:[[[["default",["Tooltip","Axis","Legend","DataGrid.defaultColumnSettings"]],["chart",["",".defaultQuarterSettings"]],"stock.defaultPlotSettings","standalones","map.axesSettings"],".title"]]},{Tb:"defaultSeparator",Rb:[["default",[[["Tooltip.s","Legend.titleS"],"eparator"]]]]},{Tb:"defaultTooltip",Rb:[[[["default",["Legend","DataGrid","Timeline"]],"chart","pieFunnelPyramidBase",["pert.",["milestones","tasks"]],"stock.eventMarkers"],".tooltip"]]},{Tb:"defaultLegend",Rb:[[["chart","standalones"],".legend"]]},{Tb:"palette",Rb:[[["chart","stock.scroller",["default",["DataGrid","Timeline"]]],".palette"]]},{Tb:"hatchFillPalette",Rb:[[["chart","stock.scroller"],".hatchFillPalette"]]},{Tb:"hatchFillPaletteFor3D",Rb:["cartesian3dBase.hatchFillPalette"]},{Tb:"markerPalette",Rb:[[["chart","stock.defaultPlotSettings"],".markerPalette"]]},{Tb:"defaultGridSettings",Rb:[[["defaultMinor",["cartesianBase scatter polar radar heatMap stock.defaultPlotSettings".split(" "),".default"]],"GridSettings"],"map.gridsSettings",["standalones.",[[["linear","radar","polar"],"Grid"]]]]},{Tb:"defaultMinorGridSettings",Rb:[[["cartesianBase","scatter","polar","radar","stock.defaultPlotSettings"],".defaultMinorGridSettings"]]},{Tb:"defaultLineMarkerSettings",Rb:[["cartesianBase scatter mekko sparkline defaultTimeline stock.defaultPlotSettings".split(" "),".defaultLineMarkerSettings"],"standalones.lineAxisMarker"]},{Tb:"defaultTextMarkerSettings",Rb:[["cartesianBase scatter mekko sparkline defaultTimeline stock.defaultPlotSettings".split(" "),".defaultTextMarkerSettings"],"standalones.textAxisMarker"]},{Tb:"defaultRangeMarkerSettings",Rb:[["cartesianBase scatter mekko sparkline defaultTimeline stock.defaultPlotSettings".split(" "),".defaultRangeMarkerSettings"],"standalones.rangeAxisMarker"]},{Tb:"defaultAxis",Rb:[[[[["cartesianBase","heatMap","scatter","mekko"],[[".default",["X","Y"]]]],[["circular","linear"],"Gauge.default"]],"AxisSettings"],[["radar.","polar."],[[["x","y"],"Axis"]]],["stock.",[["defaultPlotSettings.",["defaultYAxisSettings","xAxis"]],"scroller.xAxis"]],"bullet.axis","defaultColorRange",["standalones.",[[["linear","polar","radar","radial"],"Axis"]]]]},{Tb:"defaultColorRange",Rb:[[["map","treeMap","calendar","standalones","tagCloud"],".colorRange"]]},{Tb:"defaultCallout",Rb:["map.defaultCalloutSettings"]},{Tb:"defaultScroller",Rb:[[[["cartesianBase.",["x","y"]]],"Scroller"],[["stock","standalones"],".scroller"],["resource.",[[["horizontal","vertical"],"ScrollBar"]]]]},{Tb:"defaultNoDataLabel",Rb:[[["chart","stock.defaultPlotSettings"],".noDataLabel"]]},{Tb:"defaultButtonSettings",Rb:["defaultDataGrid.buttons"]},{Tb:"chart",Rb:["tagCloud","scatter","radar","polar","bullet","map","sparkline",[[["cartesian",["","3d"]],"pieFunnelPyramid","gantt"],"Base"],["stock",["",".defaultPlotSettings"]],[["heat","tree"],"Map"],[["circular","linear"],"Gauge"],"pert","resource","mekko","venn","sunburst","sankey","calendar"]},{Tb:"chart.defaultSeriesSettings",Rb:["stock.scroller.defaultSeriesSettings"]},{Tb:"pieFunnelPyramidBase",Rb:["pie","pyramid","funnel"]},{Tb:"pie",Rb:["pie3d"]},{Tb:"cartesianBase.defaultAnnotationSettings.base",Rb:[["cartesianBase.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"cartesianBase.defaultSeriesSettings.rangeLike",Rb:[["cartesianBase.defaultSeriesSettings.",[["range",["Bar","Column",[["","Spline","Step"],"Area"]]],"hilo"]]]},{Tb:"cartesianBase.defaultSeriesSettings.base",Rb:[["cartesianBase.defaultSeriesSettings.",[[["area","bar","line"],"Like"],"marker","bubble"]]]},{Tb:"cartesianBase.defaultSeriesSettings.areaLike",Rb:[["cartesianBase.defaultSeriesSettings.",[[["a","splineA","stepA"],"rea"],["range",[[["","Spline","Step"],"Area"]]]]]]},{Tb:"cartesianBase.defaultSeriesSettings.barLike",Rb:[["cartesianBase.defaultSeriesSettings.",["bar","column","box",["range",["Bar","Column"]],"candlestick"]]]},{Tb:"cartesianBase.defaultSeriesSettings.lineLike",Rb:[["cartesianBase.defaultSeriesSettings.",[[["","sp"],"line"],[["step","jump"],"Line"],"ohlc","stick","hilo"]]]},{Tb:"cartesianBase",Rb:["cartesian","area",["vertical",["Area","Line"]],"bar","box","column","financial","line","jumpLine","stick","pareto","waterfall"]},{Tb:"waterfall.defaultSeriesSettings.barLike",Rb:["waterfall.defaultSeriesSettings.waterfall"]},{Tb:"cartesian3dBase.defaultSeriesSettings.base",Rb:[["cartesian3dBase.defaultSeriesSettings.",["bar","column","area","line","line2d"]]]},{Tb:"cartesian3dBase",Rb:[[["area","bar","column","line","cartesian"],"3d"]]},{Tb:"cartesian",Rb:["cartesian3d"]},{Tb:"bar",Rb:["bar3d"]},{Tb:"column",Rb:["column3d"]},{Tb:"area",Rb:[[["area","line"],"3d"]]},{Tb:"mekko.defaultSeriesSettings.base",Rb:[["mekko.defaultSeriesSettings.",["mosaic",[["","bar"],"mekko"]]]]},{Tb:"scatter.defaultAnnotationSettings.base",Rb:[["scatter.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"scatter.defaultSeriesSettings.base",Rb:[["scatter.defaultSeriesSettings.",["bubble","lineLike","marker"]]]},{Tb:"scatter.defaultSeriesSettings.lineLike",Rb:["scatter.defaultSeriesSettings.line"]},{Tb:"scatter",Rb:["marker","bubble","quadrant"]},{Tb:"radar.defaultSeriesSettings.base",Rb:[["radar.defaultSeriesSettings.",[[["area","line"],"Like"],"marker"]]]},{Tb:"radar.defaultSeriesSettings.areaLike",Rb:["radar.defaultSeriesSettings.area"]},{Tb:"radar.defaultSeriesSettings.lineLike",Rb:["radar.defaultSeriesSettings.line"]},{Tb:"polar.defaultSeriesSettings.base",Rb:[["polar.defaultSeriesSettings.",[[["area","line","bar"],"Like"],"marker"]]]},{Tb:"polar.defaultSeriesSettings.rangeLike",Rb:["polar.defaultSeriesSettings.rangeColumn"]},{Tb:"polar.defaultSeriesSettings.areaLike",Rb:[["polar.defaultSeriesSettings.",["area","polygon"]]]},{Tb:"polar.defaultSeriesSettings.lineLike",Rb:[["polar.defaultSeriesSettings.",[[["","poly"],"line"]]]]},{Tb:"polar.defaultSeriesSettings.barLike",Rb:[["polar.defaultSeriesSettings.",[[["c","rangeC"],"olumn"]]]]},{Tb:"chart.normal.labels",Rb:["sparkline.labels"]},{Tb:"chart.normal.markers",Rb:["sparkline.markers"]},{Tb:"chart.defaultSeriesSettings.base.normal",Rb:["sparkline.defaultSeriesSettings.base"]},{Tb:"chart.defaultSeriesSettings.area.normal",Rb:["sparkline.defaultSeriesSettings.area"]},{Tb:"chart.defaultSeriesSettings.line.normal",Rb:["sparkline.defaultSeriesSettings.line"]},{Tb:"chart.defaultSeriesSettings.column.normal",Rb:["sparkline.defaultSeriesSettings.column"]},{Tb:"sparkline.defaultSeriesSettings.base",Rb:[["sparkline.defaultSeriesSettings.",["area","line","column","winLoss"]]]},{Tb:"circularGauge.defaultPointerSettings.base",Rb:[["circularGauge.defaultPointerSettings.",["bar","marker","needle","knob"]]]},{Tb:"map.defaultSeriesSettings.base",Rb:[["map.defaultSeriesSettings.",["choropleth","bubble","marker","connector"]]]},{Tb:"heatMap.defaultAnnotationSettings.base",Rb:[["heatMap.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"stock.defaultAnnotationSettings.base",Rb:[["stock.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.base",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[[["area","bar","line"],"Like"],"marker"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.rangeLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[["range",["Column",[["","Spline","Step"],"Area"]]],"hilo"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.areaLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[[["a","splineA","stepA"],"rea"],["range",[[["","Spline","Step"],"Area"]]]]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.barLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",["column","rangeColumn","candlestick"]]]},{Tb:"stock.defaultPlotSettings.defaultSeriesSettings.lineLike",Rb:[["stock.defaultPlotSettings.defaultSeriesSettings.",[[["","sp"],"line"],[["step","jump"],"Line"],"ohlc","stick","hilo"]]]},{Tb:"stock.scroller.defaultSeriesSettings.base",Rb:[["stock.scroller.defaultSeriesSettings.",[[["area","bar","line"],"Like"],"marker"]]]},{Tb:"stock.scroller.defaultSeriesSettings.areaLike",Rb:[["stock.scroller.defaultSeriesSettings.",[[["a","splineA","stepA"],"rea"],["range",[[["","Spline","Step"],"Area"]]]]]]},{Tb:"stock.scroller.defaultSeriesSettings.barLike",Rb:[["stock.scroller.defaultSeriesSettings.",["column","rangeColumn","candlestick"]]]},{Tb:"stock.scroller.defaultSeriesSettings.lineLike",Rb:[["stock.scroller.defaultSeriesSettings.",[[["","sp"],"line"],[["step","jump"],"Line"],"ohlc","stick","hilo"]]]},{Tb:"stock.scroller.defaultSeriesSettings.rangeLike",Rb:[["stock.scroller.defaultSeriesSettings.",[["range",["Column",[["","Spline","Step"],"Area"]]],"hilo"]]]},{Tb:"defaultScrollBar",Rb:[[[["default",["DataGrid","Timeline"]],"standalones.timeline"],[[[".horizontal",".vertical"],"ScrollBar"]]]]},{Tb:"defaultDataGrid",Rb:[[["ganttBase","standalones"],".dataGrid"]]},{Tb:"defaultTimeline",Rb:[[["ganttBase.t",["standalones.",["projectT","resourceT"]]],"imeline"]]},{Tb:"defaultTimeline.elements",Rb:[["defaultTimeline.",["tasks","baselines","milestones","periods"]]]},{Tb:"defaultTimeline.elements.milestones",Rb:["defaultTimeline.elements.milestones.preview"]},{Tb:"defaultTimeline.tasks",Rb:[["defaultTimeline.",["groupingTasks"]]]},{Tb:"ganttBase",Rb:[["gantt",["Resource","Project"]]]},{Tb:"defaultGroupingSettings",Rb:[["stock.",[[["g","scrollerG"],"rouping"]]]]},{Tb:"linearGauge.defaultPointerSettings.base",Rb:[["linearGauge.defaultPointerSettings.","bar rangeBar marker tank thermometer led".split(" ")]]},{Tb:"linearGauge",Rb:["thermometer","tank","led"]},{Tb:"standalones.resourceList.baseSettings",Rb:[[["standalones.resourceList."],["names","types","descriptions","tags"]]]},{Tb:"resource.resourceList.baseSettings",Rb:[[["resource.resourceList."],["names","types","descriptions","tags"]]]},{Tb:"chart.defaultQuarterSettings",Rb:[["chart.quarters.",[[["right","left"],"Top"],[["right","left"],"Bottom"]]]]},{Tb:"mekko",Rb:["mosaic","barmekko"]},{Tb:"mekko.defaultAnnotationSettings.base",Rb:[["mekko.defaultAnnotationSettings.",["ray","line",[["infinite","vertical","horizontal"],"Line"],"rectangle","ellipse","triangle","trendChannel","andrewsPitchfork",["fibonacci",["Fan","Arc","Retracement","Timezones"]],"marker","label"]]]}],NE=0;NE<ME.length;NE++)ME[NE].Rb=Ya(ME[NE].Rb);for(var OE={},PE=0;PE<ME.length;PE++)for(var QE=ME[PE].Tb,RE=ME[PE].Rb,SE=0;SE<RE.length;SE++){var TE=RE[SE],UE=TE.split(".")[0],VE=OE[UE];VE||(OE[UE]=VE={wE:[],LC:0,DI:0});var WE=VE.wE[VE.wE.length-1];WE&&WE.Tb==QE?WE.Rb.push(TE):VE.wE.push({Tb:QE,Rb:[TE]})}im=OE,Hm=0,Cm=1,Em=2,Dm=3,Im=4,Jm=5,Fm=8,sm=function(){function t(t,i){for(var n=Xa(t),s=0;s<n.length;s++)e[n[s]]=i}var e={padding:Fm,margin:Fm,scale:7,palette:Im,fill:Cm,stroke:Em,hatchFill:Dm,hatchFillPalette:Jm,shapes:9};return t([["x","y","color"],"Scale"],7),t([["range","marker"],"Palette"],Im),t([["negative","first","last","max","min","rising","falling","background","progress","milestone","parent","connector","odd","even","title","slider","cell",["row",["","Odd","Even","Hover","Selected"]],["base",["","line"]],["icon",["","Marker"]],["drag",["Preview","Area"]],["hover",["","Negative","Rising","Falling"]],["select"," ed edElement Negative Rising Falling Marquee".split(" ")]],"Fill"],Cm),t([["negative","first","last","max","min","rising","falling","icon",["hover",["","Negative","Rising","Falling"]],["select",["","ed","Negative","Rising","Falling"]]],"HatchFill"],Dm),t([["column","row","connector","median","stem","whisker","negative","high","low","rising","falling","progress","milestone","parent","slider","background",[["","line"],"base"],["hover"," Median Stem Whisker Negative High Low Rising Falling".split(" ")],["icon",["","Marker"]],["drag",["Preview","Area"]],[["x","value"],"Error"],["select"," ed edElement Low High Negative Rising Falling edRising edFalling Median Stem Whisker Marquee".split(" ")]],"Stroke"],Em),e}(),um={"chart.chartLabels":"chart.defaultLabelSettings","chart.grids":"chart.defaultGridSettings","chart.minorGrids":"chart.defaultMinorGridSettings","chart.xAxes":"chart.defaultXAxisSettings","chart.yAxes":"chart.defaultYAxisSettings","chart.axes":"chart.defaultAxisSettings","chart.lineAxesMarkers":"chart.defaultLineMarkerSettings","chart.rangeAxesMarkers":"chart.defaultRangeMarkerSettings","chart.textAxesMarkers":"chart.defaultTextMarkerSettings","plot.lineAxesMarkers":"plot.defaultLineMarkerSettings","plot.rangeAxesMarkers":"plot.defaultRangeMarkerSettings","plot.textAxesMarkers":"plot.defaultTextMarkerSettings","chart.ranges":"chart.defaultRangeSettings","gauge.bars":"gauge.defaultPointerSettings","gauge.markers":"gauge.defaultPointerSettings","gauge.needles":"gauge.defaultPointerSettings","gauge.knobs":"gauge.defaultPointerSettings","gauge.ranges":"gauge.defaultRangeSettings","gauge.axes":"gauge.defaultAxisSettings","gauge.scaleBars":"gauge.defaultScaleBarSettings","map.callouts":"map.defaultCalloutSettings","chart.quarters.rightTop.labels":"chart.defaultQuarterSettings.defaultLabelSettings","chart.quarters.leftTop.labels":"chart.defaultQuarterSettings.defaultLabelSettings","chart.quarters.leftBottom.labels":"chart.defaultQuarterSettings.defaultLabelSettings","chart.quarters.rightBottom.labels":"chart.defaultQuarterSettings.defaultLabelSettings"},wm=["chart.scales","gauge.scales"],Am={"chart.series":{OL:"chart.defaultSeriesSettings",TP:"seriesType"},"map.series":{OL:"map.defaultSeriesSettings",TP:"seriesType"},"gauge.pointers":{OL:"gauge.defaultPointerSettings",TP:"pointerType"},annotationsList:{OL:"defaultAnnotationSettings",TP:"type"}},$.ur={title:["defaultFontSettings","defaultTitle"],background:["defaultBackground"],legend:["defaultFontSettings","defaultLegend"],legendItem:["defaultFontSettings"],paginator:["defaultFontSettings"],separator:["defaultSeparator"],titleSeparator:["defaultSeparator"],tooltip:["defaultFontSettings","defaultTooltip"],labelsFactory:["defaultFontSettings","defaultLabelFactory"],markersFactory:["defaultMarkerFactory"],axis:["defaultAxis"],scroller:["defaultScroller"],thumbs:["defaultScroller.thumbs"]},$.ur.xScroller=$.ur.scroller,$.ur.yScroller=$.ur.scroller,$.ur.titleSeparator=$.ur.separator,$.g=Km.prototype,$.g.getData=function(){return this.la},$.g.Tw=function(){this.la.push(this.f||[]),this.f=[]},$.g.fX=function(t,e){this.f.push(e)},$.g.start=function(){this.la=[],this.f=[]},$.g.Kd=$.ia,$.g.AK=function(){this.f&&this.f.length&&this.Tw()},$.H($.Lm,$.od),$.g=$.Lm.prototype,$.g.tp=null,$.g.uB="\n",$.g.Uz=",",$.g.kJ=window.NaN,$.g.gG=window.NaN,$.g.Yz=window.NaN,$.g.mw=!1,$.g.NH=!1,$.g.ah=window.NaN,$.g.$o=-1,$.g.Zo=-1,$.g.rM=!1,$.g.gX=window.NaN,$.g.lJ=function(t){return $.p(t)?(this.uB=t,this.kJ=this.uB.length-1,this):this.uB},$.g.hG=function(t){return $.p(t)?(this.Uz=t,this.gG=this.Uz.length-1,this):this.Uz},$.g.MH=function(t){return $.p(t)?(this.NH=!!t,this):this.NH},$.g.OH=function(t){return $.p(t)?(this.mw=!!t,this):this.mw},$.g.pC=function(t,e,i){if(this.tp=e||new Km,i=!!i,this.Qd=t||"",this.Yz=t.length,this.i=Mm(this.uB),this.f=Mm(this.Uz),this.ah=0,this.rM=this.ah==this.Yz,this.b=this.NH?this.Pja:this.T4,this.tp.start(),Qm(this)&&(this.NH?this.b=this.T4:this.tp.Tw()),this.NH=!1,i)this.DO();else{for(;Qm(this);)this.tp.Tw();if(this.tp.Kd(this.ah),this.tp.AK(),$.J(this.tp,Km))return this.tp.getData()}return null},$.g.DO=function(){(0,window.clearTimeout)(this.gX);for(var t=0,e=Qm(this);e&&500>t++;){if(this.md)return;this.tp.Tw(),e=Qm(this)}e&&this.tp.Tw(),this.md||(e?(this.tp.Kd(this.ah),this.gX=(0,window.setTimeout)(this.DO,0)):this.tp.AK())},$.g.T4=function(t,e){this.tp.fX(t,e)},$.g.Pja=$.ia,$.g.R=function(){(0,window.clearTimeout)(this.gX),this.f=this.i=this.tp=null,$.Lm.u.R.call(this)};var XE=$.Lm.prototype;$.E("anychart.data.csv.parser",$.Rm),XE.parse=XE.pC,XE.rowsSeparator=XE.lJ,XE.columnsSeparator=XE.hG,XE.ignoreTrailingSpaces=XE.OH,XE.ignoreFirstRow=XE.MH,$.I.prototype.F=function(){return{left:this.left,top:this.top,width:this.width,height:this.height}},$.on.prototype.add=function(t){return new $.on(this.x+t.x,this.y+t.y)},$.on.prototype.min=function(t){return new $.on(Math.min(this.x,t.x),Math.min(this.y,t.y))},$.on.prototype.max=function(t){return new $.on(Math.max(this.x,t.x),Math.max(this.y,t.y))},rn.prototype.tJ=function(){for(var t=this.b.length-1;0<=t&&1e-6>=Math.abs(this.b[t]);t--)this.b.pop()},$.E("anychart.math.rect",$.kn);var YE={wQ:["BC","AD"],eZ:["Before Christ","Anno Domini"],iZ:"JFMAMJJASOND".split(""),xZ:"JFMAMJJASOND".split(""),BQ:"January February March April May June July August September October November December".split(" "),MQ:"January February March April May June July August September October November December".split(" "),IQ:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),NQ:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),RQ:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),AZ:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),KQ:"Sun Mon Tue Wed Thu Fri Sat".split(" "),zZ:"Sun Mon Tue Wed Thu Fri Sat".split(" "),g9:"SMTWTFS".split(""),yZ:"SMTWTFS".split(""),JQ:["Q1","Q2","Q3","Q4"],EQ:["1st quarter","2nd quarter","3rd quarter","4th quarter"],oQ:["AM","PM"],mF:["EEEE, MMMM d, y","MMMM d, y","MMM d, y","M/d/yy"],rF:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],sQ:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],fK:6,w$:[5,6],gK:5},Un=YE;Un=YE;var Kba=/^(-)?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;$.En.prototype.clone=function(){return new $.En(this.ai,this.pg,this.xg,this.Th,this.Bj,this.wh)};var yn="y",zn="m",An="d",Bn="h",Cn="n",Dn="s";$.En.prototype.b=function(t){return new $.En(this.ai*t,this.pg*t,this.xg*t,this.Th*t,this.Bj*t,this.wh*t)},$.En.prototype.add=function(t){this.ai+=t.ai,this.pg+=t.pg,this.xg+=t.xg,this.Th+=t.Th,this.Bj+=t.Bj,this.wh+=t.wh},$.g=$.Mn.prototype,$.g.hD=Un.fK,$.g.iD=Un.gK,$.g.clone=function(){var t=new $.Mn(this.b);return t.hD=this.hD,t.iD=this.iD,t},$.g.getFullYear=function(){return this.b.getFullYear()},$.g.getMonth=function(){return this.b.getMonth()},$.g.getDate=function(){return this.b.getDate()},$.g.getTime=function(){return this.b.getTime()},$.g.getDay=function(){return this.b.getDay()},$.g.getUTCFullYear=function(){return this.b.getUTCFullYear()},$.g.getUTCMonth=function(){return this.b.getUTCMonth()},$.g.getUTCDate=function(){return this.b.getUTCDate()},$.g.UM=function(){return this.b.getDay()},$.g.getUTCHours=function(){return this.b.getUTCHours()},$.g.getUTCMinutes=function(){return this.b.getUTCMinutes()},$.g.getTimezoneOffset=function(){return this.b.getTimezoneOffset()},$.g.set=function(t){this.b=new Date(t.getFullYear(),t.getMonth(),t.getDate())},$.g.setFullYear=function(t){this.b.setFullYear(t)},$.g.setMonth=function(t){this.b.setMonth(t)},$.g.setDate=function(t){this.b.setDate(t)},$.g.setTime=function(t){this.b.setTime(t)},$.g.CU=function(t){this.b.setUTCFullYear(t)},$.g.Sfa=function(t){this.b.setUTCMonth(t)},$.g.Rfa=function(t){this.b.setUTCDate(t)},$.g.add=function(t){if(t.ai||t.pg){var e=this.getMonth()+t.pg+12*t.ai,i=this.getFullYear()+Math.floor(e/12);0>(e%=12)&&(e+=12);var n=Math.min(wn(i,e),this.getDate());this.setDate(1),this.setFullYear(i),this.setMonth(e),this.setDate(n)}t.xg&&(e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),12),t=new Date(e.getTime()+864e5*t.xg),this.setDate(1),this.setFullYear(t.getFullYear()),this.setMonth(t.getMonth()),this.setDate(t.getDate()),Kn(this,t.getDate()))},$.g.VM=function(t){return[this.getFullYear(),$.uc(this.getMonth()+1,2),$.uc(this.getDate(),2)].join(t?"-":"")},$.g.NJ=ba(6),$.g.toString=function(){return this.VM()},$.g.valueOf=function(){return this.b.valueOf()},$.H($.Nn,$.Mn),$.g=$.Nn.prototype,$.g.getHours=function(){return this.b.getHours()},$.g.getMinutes=function(){return this.b.getMinutes()},$.g.getSeconds=function(){return this.b.getSeconds()},$.g.getMilliseconds=function(){return this.b.getMilliseconds()},$.g.UM=function(){return this.b.getUTCDay()},$.g.getUTCHours=function(){return this.b.getUTCHours()},$.g.getUTCMinutes=function(){return this.b.getUTCMinutes()},$.g.BU=function(){return this.b.getUTCSeconds()},$.g.Pfa=function(){return this.b.getUTCMilliseconds()},$.g.setHours=function(t){this.b.setHours(t)},$.g.setMinutes=function(t){this.b.setMinutes(t)},$.g.setSeconds=function(t){this.b.setSeconds(t)},$.g.setMilliseconds=function(t){this.b.setMilliseconds(t)},$.g.s2=function(t){this.b.setUTCHours(t)},$.g.t2=function(t){this.b.setUTCMinutes(t)},$.g.u2=function(t){this.b.setUTCSeconds(t)},$.g.Qfa=function(t){this.b.setUTCMilliseconds(t)},$.g.add=function(t){$.Mn.prototype.add.call(this,t),t.Th&&this.s2(this.b.getUTCHours()+t.Th),t.Bj&&this.t2(this.b.getUTCMinutes()+t.Bj),t.wh&&this.u2(this.b.getUTCSeconds()+t.wh)},$.g.VM=function(t){var e=$.Mn.prototype.VM.call(this,t);return t?e+" "+$.uc(this.getHours(),2)+":"+$.uc(this.getMinutes(),2)+":"+$.uc(this.getSeconds(),2):e+"T"+$.uc(this.getHours(),2)+$.uc(this.getMinutes(),2)+$.uc(this.getSeconds(),2)},$.g.NJ=ba(5),$.g.toString=function(){return this.VM()},$.g.clone=function(){var t=new $.Nn(this.b);return t.hD=this.hD,t.iD=this.iD,t},$.H($.On,$.Nn),$.g=$.On.prototype,$.g.clone=function(){var t=new $.On(this.b);return t.hD=this.hD,t.iD=this.iD,t},$.g.add=function(t){(t.ai||t.pg)&&$.Mn.prototype.add.call(this,new $.En(t.ai,t.pg)),this.b=new Date(this.b.getTime()+1e3*(t.wh+60*(t.Bj+60*(t.Th+24*t.xg))))},$.g.getTimezoneOffset=function(){return 0},$.g.getFullYear=$.Nn.prototype.getUTCFullYear,$.g.getMonth=$.Nn.prototype.getUTCMonth,$.g.getDate=$.Nn.prototype.getUTCDate,$.g.getHours=$.Nn.prototype.getUTCHours,$.g.getMinutes=$.Nn.prototype.getUTCMinutes,$.g.getSeconds=$.Nn.prototype.BU,$.g.getMilliseconds=$.Nn.prototype.Pfa,$.g.getDay=$.Nn.prototype.UM,$.g.setFullYear=$.Nn.prototype.CU,$.g.setMonth=$.Nn.prototype.Sfa,$.g.setDate=$.Nn.prototype.Rfa,$.g.setHours=$.Nn.prototype.s2,$.g.setMinutes=$.Nn.prototype.t2,$.g.setSeconds=$.Nn.prototype.u2,$.g.setMilliseconds=$.Nn.prototype.Qfa;var lp=$.hd&&Lba();Qn.prototype.rD=function(t){return this.D-Tn(this,t)};var Zn=[/^'(?:[^']|'')*('|$)/,/^(?:G+|y+|Y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|m+|s+|v+|V+|w+|z+|Z+)/,/^[^'GyYMkSEahKHcLQdmsvVwzZ]+/];$.Xn.prototype.format=function(t,e){if(!t)throw Error("The date to format must be non-null.");var i=e?6e4*(t.getTimezoneOffset()-e.rD(t)):0,n=i?new Date(t.getTime()+i):t,s=n;e&&n.getTimezoneOffset()!=t.getTimezoneOffset()&&(n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-t.getTimezoneOffset())),s=new Date(t.getTime()+(i+(0<i?-864e5:864e5)))),i=[];for(var a=0;a<this.f.length;++a){var o=this.f[a].text;1==this.f[a].type?i.push(Nba(this,o,t,n,s,e)):i.push(o)}return i.join("")};var Mba=!1;bo.prototype.F=function(t){var e=[];return eo(this,t,e),e.join("")};var go={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Qba=/\uffff/.test("")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,ZE,Zt,mo,Sba,Rba,Yba,mp,cq,sp,rp,sw,Vw,xp,yp,$ba;Zt=0,$.jo=1,$.ko=2,$.lo=3,mo=4,Sba=5,Rba=6,$.Fo="center-top right-top right-center right-bottom center-bottom left-bottom left-center left-top".split(" "),Yba=/^[^<&"\n\r–]*$/,mp="treat_as_array",cq=null,sp=[45,113,99,117,108,106,110,124,109,118,35,120,99,111,91,123,85],rp=null,sw={},Vw={},$.up=[{Dg:"year",xe:31536e6,ds:!0},{Dg:"semester",xe:15768e6,ds:!1},{Dg:"quarter",xe:7884e6,ds:!1},{Dg:"month",xe:24192e5,ds:!0},{Dg:"third-of-month",xe:876e6,ds:!1},{Dg:"week",xe:6048e5,ds:!1},{Dg:"day",xe:864e5,ds:!0},{Dg:"hour",xe:36e5,ds:!0},{Dg:"minute",xe:6e4,ds:!0},{Dg:"second",xe:1e3,ds:!0},{Dg:"millisecond",xe:1,ds:!0}],xp=[1+Math.cos((.4-.5)*Math.PI),1+Math.cos((.8-.5)*Math.PI),1+Math.cos(.7*Math.PI),1+Math.cos(1.1*Math.PI),1+Math.cos(1.5*Math.PI)],yp=[1+Math.sin((.4-.5)*Math.PI),1+Math.sin((.8-.5)*Math.PI),1+Math.sin(.7*Math.PI),1+Math.sin(1.1*Math.PI),1+Math.sin(1.5*Math.PI)],$ba={decoration:"text-decoration",hAlign:"text-anchor",color:"fill",fontColor:"fill"},$.E("anychart.utils.printUtilsBoolean",(function(){return sl()})),$.E("anychart.utils.xml2json",$.np),$.E("anychart.utils.json2xml",$.qp),$.E("anychart.utils.hideTooltips",(function(t){for(var e in sw)if(sw.hasOwnProperty(e)){var i=sw[e];i.md||i.Lc(t)}})),$.E("anychart.utils.htmlTableFromCsv",Ap),$.E("anychart.utils.schedule",$.Ep),$.H($.Jp,$.qf),$.g=$.Jp.prototype,$.g.Ed=null,$.g.HN=null,$.g.MV=null,$.g.IN=null,$.g.qq=-1,$.g.SA=-1,$.g.$Q=!1;var $E={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},aF={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},bF=!$.xd||$.bd("525"),cF=$.Ad&&$.gd,Np,Qp,$p,bq,dq,fq,iq,jq,oq;$.g=$.Jp.prototype,$.g.Tfa=function(t){($.xd||$.Hp)&&(17==this.qq&&!t.ctrlKey||18==this.qq&&!t.altKey||$.Ad&&91==this.qq&&!t.metaKey)&&this.zE(),-1==this.qq&&(t.ctrlKey&&17!=t.keyCode?this.qq=17:t.altKey&&18!=t.keyCode?this.qq=18:t.metaKey&&91!=t.keyCode&&(this.qq=91)),bF&&!Ip(t.keyCode,this.qq,t.shiftKey,t.ctrlKey,t.altKey,t.metaKey)?this.handleEvent(t):(this.SA=Gp(t.keyCode),cF&&(this.$Q=t.altKey))},$.g.zE=function(){this.SA=this.qq=-1},$.g.wga=function(t){this.zE(),this.$Q=t.altKey},$.g.handleEvent=function(t){var e=t.kf,i=e.altKey;if($.hd&&"keypress"==t.type)var n=this.SA,s=13!=n&&27!=n?e.keyCode:0;else($.xd||$.Hp)&&"keypress"==t.type?(n=this.SA,s=0<=e.charCode&&63232>e.charCode&&Fp(n)?e.charCode:0):$.yd&&!$.xd?(n=this.SA,s=Fp(n)?e.keyCode:0):(n=e.keyCode||this.SA,s=e.charCode||0,cF&&"keypress"==t.type&&(i=this.$Q),$.Ad&&63==s&&224==n&&(n=191));var a=n=Gp(n);n?63232<=n&&n in $E?a=$E[n]:25==n&&t.shiftKey&&(a=9):e.keyIdentifier&&e.keyIdentifier in aF&&(a=aF[e.keyIdentifier]),$.gd&&bF&&"keypress"==t.type&&!Ip(a,this.qq,t.shiftKey,t.ctrlKey,i,t.metaKey)||(t=a==this.qq,this.qq=a,(e=new Kp(a,s,t,e)).altKey=i,this.dispatchEvent(e))},$.g.Ya=function(){return this.Ed},$.g.WM=function(t,e){this.IN&&this.wH(),this.Ed=t,this.HN=$.Ld(this.Ed,"keypress",this,e),this.MV=$.Ld(this.Ed,"keydown",this.Tfa,e,this),this.IN=$.Ld(this.Ed,"keyup",this.wga,e,this)},$.g.wH=function(){this.HN&&(Zd(this.HN),Zd(this.MV),Zd(this.IN),this.IN=this.MV=this.HN=null),this.Ed=null,this.SA=this.qq=-1},$.g.R=function(){$.Jp.u.R.call(this),this.wH()},$.H(Kp,$.Bd),$.dF=$.fa.acgraph,Np=!1,$.Yj.prototype.Ax=!1,$.Yj.prototype.Xo=function(t){return this.sm||(this.sm=new ql(this,this.Ax),this.sm.N($.zm("stageCredits"))),$.p(t)?(this.sm.N(t),this):this.sm},$.Pp=0,Qp=[],$.Tp={},$.Up={},$.Wp={},$.Vp={},$p=!1,bq=null,dq=[],fq=[],iq=[],jq=[],$.vl=new ul,oq={},function(){for(var t,e=["ms","moz","webkit","o"],i=0;t=e[i]&&!$.fa.requestAnimationFrame;++i)$.fa.requestAnimationFrame=$.fa[t+"RequestAnimationFrame"],$.fa.cancelAnimationFrame=$.fa[t+"CancelAnimationFrame"]||$.fa[t+"CancelRequestAnimationFrame"];if(!$.fa.requestAnimationFrame){var n=0;$.fa.requestAnimationFrame=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-n));return n=e+i,$.fa.setTimeout((function(){t(e+i)}),i)},$.fa.cancelAnimationFrame||($.fa.cancelAnimationFrame=function(t){(0,window.clearTimeout)(t)})}}(),$.E("anychart.graphics",$.dF),$.E("anychart.fromJson",$.Xp),$.E("anychart.fromXml",(function(t){return $.Xp($.np(t))})),$.E("anychart.onDocumentLoad",(function(t,e){CE||(CE=[]),CE.push([t,e]),$.Ld($.ll,"load",(function(){for(var t=0,e=CE.length;t<e;t++){var i=CE[t];i[0].apply(i[1])}CE.length=0}))})),$.E("anychart.onDocumentReady",(function(t,e){if($.ll.isNodeJS&&($p=!0),$p)t.call(e);else if(aq||(aq=[]),aq.push([t,e]),"complete"===$.Lp.readyState)(0,window.setTimeout)(Zp,1);else{var i=$.ll;$.Ld($.Lp,["DOMContentLoaded","readystatechange"],Yp,!1),$.Ld(i,"load",Yp,!1)}})),$.E("anychart.licenseKey",(function(t){return $.p(t)&&(bq=t),bq})),$.E("anychart.theme",(function(t){if($.p(t)){if(fq.length=0,t)if($.A(t))for(var e=0;e<t.length;e++)hq(t[e]);else hq(t);for(var i in dq.length=0,iq.length=0,jq.length=0,im)(t=im[i]).LC=Math.min(t.LC,1),t.DI=0}return fq})),$.E("anychart.appendTheme",hq),$.E("anychart.global",$.Mp),$.E("anychart.getChartById",(function(t){return oq[t]})),$.E("anychart.isAsync",$.Op),$.E("anychart.area",lq("anychart.area","Area chart")),$.E("anychart.area3d",lq("anychart.area3d","3D Area chart")),$.E("anychart.bar",lq("anychart.bar","Bar chart")),$.E("anychart.vertical",lq("anychart.vertical","Bar chart")),$.E("anychart.bar3d",lq("anychart.bar3d","3D Bar chart")),$.E("anychart.bubble",lq("anychart.bubble","Bubble chart")),$.E("anychart.bullet",lq("anychart.bullet","Bullet chart")),$.E("anychart.calendar",lq("anychart.calendar","Calendar chart")),$.E("anychart.cartesian",lq("anychart.cartesian","Cartesian chart")),$.E("anychart.cartesian3d",lq("anychart.cartesian3d","3D Cartesian chart")),$.E("anychart.scatter",lq("anychart.scatter","Scatter chart")),$.E("anychart.stick",lq("anychart.stick","Stick chart")),$.E("anychart.jumpLine",lq("anychart.jumpLine","JumpLine chart")),$.E("anychart.stepLine",lq("anychart.stepLine","StepLine chart")),$.E("anychart.ohlc",lq("anychart.ohlc","OHLC chart")),$.E("anychart.candlestick",lq("anychart.candlestick","Candlestick chart")),$.E("anychart.column",lq("anychart.column","Column chart")),$.E("anychart.column3d",lq("anychart.column3d","3D Column chart")),$.E("anychart.box",lq("anychart.box","Box chart")),$.E("anychart.financial",lq("anychart.financial","Financial chart")),$.E("anychart.funnel",lq("anychart.funnel","Funnel chart")),$.E("anychart.line",lq("anychart.line","Line chart")),$.E("anychart.verticalLine",lq("anychart.verticalLine","Vertical Line chart")),$.E("anychart.verticalArea",lq("anychart.verticalArea","Vertical Area chart")),$.E("anychart.marker",lq("anychart.marker","Marker chart")),$.E("anychart.sunburst",lq("anychart.sunburst","Sunburst chart")),$.E("anychart.pie",lq("anychart.pie","Pie chart")),$.E("anychart.pie3d",lq("anychart.pie3d","3D Pie chart")),$.E("anychart.pyramid",lq("anychart.pyramid","Pyramid chart")),$.E("anychart.radar",lq("anychart.radar","Radar chart")),$.E("anychart.polar",lq("anychart.polar","Polar chart")),$.E("anychart.pert",lq("anychart.pert","Pert chart")),$.E("anychart.sparkline",lq("anychart.sparkline","Sparkline chart")),$.E("anychart.heatMap",lq("anychart.heatMap","HeatMap chart")),$.E("anychart.gauges.circular",lq("anychart.gauges.circular","Circular gauge")),$.E("anychart.gauges.linear",lq("anychart.gauges.linear","Linear gauge")),$.E("anychart.gauges.tank",lq("anychart.gauges.tank","Tank gauge")),$.E("anychart.gauges.thermometer",lq("anychart.gauges.thermometer","Thermometer gauge")),$.E("anychart.gauges.led",lq("anychart.gauges.led","LED gauge")),$.E("anychart.map",lq("anychart.map","Map")),$.E("anychart.choropleth",lq("anychart.choropleth","Choropleth map")),$.E("anychart.bubbleMap",lq("anychart.bubbleMap","Bubble map")),$.E("anychart.connector",lq("anychart.connector","Connector map")),$.E("anychart.markerMap",lq("anychart.markerMap","Marker map")),$.E("anychart.seatMap",lq("anychart.seatMap","Seat map")),$.E("anychart.ganttProject",lq("anychart.ganttProject","Gantt Project chart")),$.E("anychart.ganttResource",lq("anychart.ganttResource","Gantt Resource chart")),$.E("anychart.stock",lq("anychart.stock","Stock chart")),$.E("anychart.treeMap",lq("anychart.treeMap","TreeMap chart")),$.E("anychart.circlePacking",lq("anychart.circlePacking","CirclePacking chart")),$.E("anychart.pareto",lq("anychart.pareto","Pareto chart")),$.E("anychart.resource",lq("anychart.resource","Resource chart")),$.E("anychart.quadrant",lq("anychart.quadrant","Quadrant chart")),$.E("anychart.venn",lq("anychart.venn","Venn chart")),$.E("anychart.tagCloud",lq("anychart.tagCloud","TagCloud chart")),$.E("anychart.timeline",lq("anychart.timeline","Timeline chart")),$.E("anychart.mekko",lq("anychart.mekko","Mekko chart")),$.E("anychart.mosaic",lq("anychart.mosaic","Mosaic chart")),$.E("anychart.barmekko",lq("anychart.barmekko","Barmekko chart")),$.E("anychart.waterfall",lq("anychart.waterfall","Waterfall chart")),$.E("anychart.wordtree",lq("anychart.wordtree","Wordtree chart")),$.E("anychart.sankey",lq("anychart.sankey","Sankey chart")),$.E("anychart.surface",lq("anychart.surface","Surface chart")),$.E("anychart.graph",lq("anychart.graph","Graph chart")),$.E("anychart.standalones.background",lq("anychart.standalones.background","anychart.standalones.Background")),$.E("anychart.standalones.colorRange",lq("anychart.standalones.colorRange","anychart.standalones.ColorRange")),$.E("anychart.standalones.dataGrid",lq("anychart.standalones.dataGrid","anychart.standalones.DataGrid")),$.E("anychart.standalones.label",lq("anychart.standalones.label","anychart.standalones.Label")),$.E("anychart.standalones.labelsFactory",lq("anychart.standalones.labelsFactory","anychart.standalones.LabelsFactory")),$.E("anychart.standalones.legend",lq("anychart.standalones.legend","anychart.standalones.Legend")),$.E("anychart.standalones.markersFactory",lq("anychart.standalones.markersFactory","anychart.standalones.MarkersFactory")),$.E("anychart.standalones.projectTimeline",lq("anychart.standalones.projectTimeline","anychart.standalones.ProjectTimeline")),$.E("anychart.standalones.resourceTimeline",lq("anychart.standalones.resourceTimeline","anychart.standalones.ResourceTimeline")),$.E("anychart.standalones.resourceList",lq("anychart.standalones.resourceList","anychart.standalones.ResourceList")),$.E("anychart.standalones.scroller",lq("anychart.standalones.scroller","anychart.standalones.scroller")),$.E("anychart.standalones.table",lq("anychart.standalones.table","anychart.standalones.Table")),$.E("anychart.standalones.title",lq("anychart.standalones.title","anychart.standalones.Title")),$.E("anychart.standalones.axes.linear",lq("anychart.standalones.axes.linear","anychart.standalones.axes.Linear")),$.E("anychart.standalones.axes.polar",lq("anychart.standalones.axes.polar","anychart.standalones.axes.Polar")),$.E("anychart.standalones.axes.radar",lq("anychart.standalones.axes.radar","anychart.standalones.axes.Radar")),$.E("anychart.standalones.axes.radial",lq("anychart.standalones.axes.radial","anychart.standalones.axes.Radial")),$.E("anychart.standalones.axisMarkers.line",lq("anychart.standalones.axisMarkers.line","anychart.standalones.axisMarkers.Line")),$.E("anychart.standalones.axisMarkers.range",lq("anychart.standalones.axisMarkers.range","anychart.standalones.axisMarkers.Range")),$.E("anychart.standalones.axisMarkers.text",lq("anychart.standalones.axisMarkers.text","anychart.standalones.axisMarkers.Text")),$.E("anychart.standalones.grids.linear",lq("anychart.standalones.grids.linear","anychart.standalones.grids.Linear")),$.E("anychart.standalones.grids.linear3d",lq("anychart.standalones.grids.linear3d","anychart.standalones.grids.Linear3d")),$.E("anychart.standalones.grids.polar",lq("anychart.standalones.grids.polar","anychart.standalones.grids.Polar")),$.E("anychart.standalones.grids.radar",lq("anychart.standalones.grids.radar","anychart.standalones.grids.Radar")),$.E("anychart.ui.contextMenu",lq("anychart.ui.contextMenu","Context Menu",!0)),$.E("anychart.ui.ganttToolbar",lq("anychart.ui.ganttToolbar","Gantt toolbar")),$.E("anychart.ui.preloader",lq("anychart.ui.preloader","Preloader")),$.E("anychart.ui.rangePicker",lq("anychart.ui.rangePicker","Range picker")),$.E("anychart.ui.rangeSelector",lq("anychart.ui.rangeSelector","Range selector")),$.E("anychart.ui.zoom",lq("anychart.ui.zoom","Zoom control")),$.E("anychart.ui.binding.exec",lq("anychart.ui.binding.exec","UI binding")),$.E("anychart.ui.binding.init",lq("anychart.ui.binding.init","UI binding")),$.E("anychart.fromXmlFile",lq("anychart.fromXmlFile","Data adapter")),$.E("anychart.fromJsonFile",lq("anychart.fromJsonFile","Data adapter")),$.E("anychart.data.parseHtmlTable",lq("anychart.data.parseHtmlTable","Data adapter")),$.E("anychart.data.loadJsonFile",lq("anychart.data.loadJsonFile","Data adapter")),$.E("anychart.data.loadXmlFile",lq("anychart.data.loadXmlFile","Data adapter")),$.E("anychart.data.loadCsvFile",lq("anychart.data.loadCsvFile","Data adapter")),$.E("anychart.data.loadGoogleSpreadsheet",lq("anychart.data.loadGoogleSpreadsheet","Data adapter"));var mq=$.Yj.prototype;mq.credits=mq.Xo,mq.saveAsPNG=nq("saveAsPng"),mq.saveAsJPG=nq("saveAsJpg"),mq.saveAsPDF=nq("saveAsPdf"),mq.saveAsSVG=nq("saveAsSvg"),mq.saveAsPng=nq("saveAsPng"),mq.saveAsJpg=nq("saveAsJpg"),mq.saveAsPdf=nq("saveAsPdf"),mq.saveAsSvg=nq("saveAsSvg"),mq.shareAsPng=nq("shareAsPng"),mq.shareAsJpg=nq("shareAsJpg"),mq.shareAsPdf=nq("shareAsPdf"),mq.shareAsSvg=nq("shareAsSvg"),mq.getPngBase64String=nq("getPngBase64String"),mq.getJpgBase64String=nq("getJpgBase64String"),mq.getSvgBase64String=nq("getSvgBase64String"),mq.getPdfBase64String=nq("getPdfBase64String"),mq.print=nq("print"),mq.toSvg=nq("toSvg");var Fq,eF=[];eF[0]=Xq,eF[1]=Yq,eF[2]=function(t,e,i,n){return t?$.kl(405,null,[e+"()",t+"()"],!0):$.kl(407,null,[e+"()"],!0),Xq.call(this,t,e,i,n)},eF[3]=function(t,e,i,n,s){return t?$.kl(405,null,[e+"()",t+"()"],!0):$.kl(407,null,[e+"()"],!0),Yq.apply(this,arguments)},Fq=eF,$.Z={},$.Z.vQ=[0,"enabled",$.Dq],$.Z.yz=[1,"fill",$.Qq],$.Z.cC=[1,"fill",$.Nq],$.Z.u8=[0,"fill",$.am],$.Z.jZ=[1,"negativeFill",$.Nq],$.Z.u9=[1,"risingFill",$.Nq],$.Z.q8=[1,"fallingFill",$.Nq],$.Z.Y8=[1,"lowFill",$.Nq],$.Z.L8=[1,"highFill",$.Nq],$.Z.Yn=[1,"stroke",$.Pq],$.Z.qF=[1,"stroke",$.Jq],$.Z.m$=[0,"stroke",$.Zl],$.Z.c9=[1,"lowStroke",$.Jq],$.Z.N8=[1,"highStroke",$.Jq],$.Z.h9=[1,"negativeStroke",$.Jq],$.Z.w9=[1,"risingStroke",$.Jq],$.Z.s8=[1,"fallingStroke",$.Jq],$.Z.e9=[1,"medianStroke",$.Jq],$.Z.j$=[1,"stemStroke",$.Jq],$.Z.x$=[1,"whiskerStroke",$.Jq],$.Z.xQ=[1,"hatchFill",$.Rq],$.Z.gZ=[1,"hatchFill",$.Oq],$.Z.apa=[0,"hatchFill",$.$l],$.Z.kZ=[1,"negativeHatchFill",$.Oq],$.Z.v9=[1,"risingHatchFill",$.Oq],$.Z.r8=[1,"fallingHatchFill",$.Oq],$.Z.M8=[1,"highHatchFill",$.Oq],$.Z.Z8=[1,"lowHatchFill",$.Oq],$.Z.eK=[0,"align",Fk],$.Z.y$=[0,"whiskerWidth",$.br],$.Z.EZ=[0,"type",$.cr],$.Z.uZ=[0,"size",$.Bq],$.Z.q$=[1,"trend",$.Jq],$.Z.fZ=[1,"grid",$.Jq],$.Z.k8=[1,"emptyFill",$.Nq],$.Z.l8=[1,"emptyHatchFill",$.Oq],$.Z.z8=[0,"fontFamily",$.zq],$.Z.D8=[0,"fontStyle",$.cl],$.Z.E8=[0,"fontVariant",$.dl],$.Z.G8=[0,"fontWeight",$.wq],$.Z.C8=[0,"fontSize",function(t){return null===t||$.D(t)||$.uo(t)?t:(0,window.parseFloat)(t)}],$.Z.x8=[0,"fontColor",$.Aq],$.Z.o$=[0,"textShadow",$.Zb],$.Z.A8=[0,"fontOpacity",$.Bq],$.Z.y8=[0,"fontDecoration",$.bl],$.Z.h8=[1,"dummyFill",$.Nq],$.Z.i8=[1,"dummyStroke",$.Jq],$.Z.o8=[0,"type",$.Rk],$.Z.iK=[0,"length",$.br],$.Z.dZ=[0,"direction",$.Sk],$.Z.n8=[0,"position",$.Tk],$.Z.G9=[0,"seriesId",$.zq],$.Z.t8=[0,"fieldName",$.zq],$.Z.jK=[0,"width",$.br],$.Z.hK=[0,"height",$.br],$.Z.H8=[0,"format",$.ar],$.Z.B8=[0,"fontPadding",$.br],$.Z.l$=[0,"stickToLeft",$.Dq],$.Z.p8=[0,"explode",$.br],$.Z.zz=[0,"startAngle",function(t){return $.ab($.N(t)||0)}],$.Z.I7=[0,"cursor",Ck],$.Z.G7=[0,"content",$.Cq],$.Z.dC=[0,"overlapMode",$.Uk],$.Z.ZY=[0,"anchor",$.Dk],$.Z.m9=[0,"position",$.Ek],$.Z.CQ=[0,"offsetY",$.Bq],$.Z.DQ=[0,"offsetX",$.Bq],$.Z.nZ=[0,"positionFormatter",$.gr],$.Z.HQ=[0,"rotation",$.xq],$.Z.tQ=[0,"drawFirstLabel",$.Dq],$.Z.uQ=[0,"drawLastLabel",$.Dq],$.Z.z$=[0,"width",$.xq],$.Z.I8=[0,"height",$.xq],$.Z.a$=[0,"shape",$.Aq],$.KE=524288,$.LE=1048576,$.gm=0,$.vo=1,$.wo=2,$.H($.V,$.qf),$.g=$.V.prototype,$.g.ra=0,$.g.sa=0,$.g.Xz=0,$.g.Lo=window.NaN,$.g.GP=0,$.g.nd=function(t){return this.Pa[t]},$.g.ph=function(t){return $.p(this.Pa[t])},$.g.vf=function(t){return this.oa[t]},$.g.g=function(t){return this.ph(t)?this.nd(t):this.vf(t)},$.g.ta=function(t,e){this.Pa[t]=e},$.g.check=function(){return!0},$.g.getCapabilities=function(t){return(t=this.ua[t])?t.Cb:0},$.g.CM=function(t){return(t=this.ua[t])&&t.ho||0},$.g.ys=function(t){return(t=this.ua[t])&&t.Aka||0},$.g.iH=function(){return null},$.g.Wj=function(t){return $.p(t)?(this.n4=t,this):this.n4},$.g.B=function(t,e){var i=(t&=this.sa)&~this.Xz;return this.Xz|=i,(i||this.Wj())&&this.va(e||0),i},$.g.I=function(t){this.Xz&=~t},$.g.pf=function(t){if(t=!(this.Xz&~(t||0)))t:{for(var e in this.Nl)if(this.Nl[e]){t=!1;break t}t=!0}return t},$.g.J=function(t){return!!(this.Xz&t)},$.g.va=function(t,e,i){(t&=this.ra)&&((0,window.isNaN)(this.Lo)||e?(e=this.Zi(),this.kb(null),t=new Ar(this,t,i),this.dispatchEvent(t),this.kb(e)):this.Lo|=t)},$.g.ka=function(){return this.GP++,(0,window.isNaN)(this.Lo)&&(this.Lo=0),this},$.g.da=function(t){if((0,window.isNaN)(this.Lo)||--this.GP)return this;var e=this.Lo;return this.Lo=window.NaN,t&&e&&this.va(e),this},$.g.F=function(){return{}},$.g.N=function(t){for(var e=[!1],i=0;i<arguments.length;i++)e.push(arguments[i]);return this.ga.apply(this,e)},$.g.ga=function(t,e){var i=arguments[1];if($.p(i)){this.ka();for(var n=[],s=0;s<arguments.length;s++)n.push(arguments[s]);!this.Ie.apply(this,n)&&$.C(i)&&this.U(i,t),this.da(!0)}return this},$.g.U=function(){},$.g.Ie=function(){return!1},$.g.Zd=function(){return null},$.g.Ga=function(t){if($.A(arguments[0]))return this.Ga.apply(this,arguments[0]);var e=[];if(arguments.length){for(var i=0;i<arguments.length;i++){var n=arguments[i];($.C(n)||-1==this.QB.indexOf(n))&&(this.QB.push(n),e.push(n))}this.MT()}return e},$.g.df=function(t){return this.QB.length=0,this.oa={},t&&(this.WC.length=0),this},$.g.MT=function(){for(var t=this.oa||{},e=(0,$.pa)(this.Zd,this),i=0;i<this.QB.length;i++){var n=this.QB[i];$.z(n)?t=$.zm(n,t,e):$.C(n)&&$.ra(t,n)}this.oa=t},$.H(Ar,wd),$.g=Ar.prototype,$.g.cla=function(){return $.X(this,1)},$.g.Xka=function(){return $.X(this,8)},$.g.Yka=function(){return $.X(this,16)},$.g.$ka=function(){return $.X(this,32)},$.g.ala=function(){return $.X(this,2)},$.g.bla=function(){return $.X(this,4)},$.g=$.V.prototype,$.g.dispatchEvent=function(t){return $.z(t)?t=t.toLowerCase():"type"in t&&(t.type=String(t.type).toLowerCase()),$.V.u.dispatchEvent.call(this,t)},$.g.wa=function(t,e,i,n){return $.V.u.wa.call(this,String(t).toLowerCase(),e,i,n)},$.g.Ce=function(t,e,i,n){return $.V.u.Ce.call(this,String(t).toLowerCase(),e,i,n)},$.g.gc=function(t,e,i,n){return $.V.u.gc.call(this,String(t).toLowerCase(),e,i,n)},$.g.TB=function(t){return $.V.u.TB.call(this,t)},$.g.Bl=function(t){return $.p(t)&&(t=String(t).toLowerCase()),$.V.u.Bl.call(this,t)};var fF=$.V.prototype;fF.listen=fF.wa,fF.listenOnce=fF.Ce,fF.unlisten=fF.gc,fF.unlistenByKey=fF.TB,fF.removeAllListeners=fF.Bl,fF.dispose=fF.ld,fF.isConsistent=fF.pf,fF.suspendSignalsDispatching=fF.ka,fF.resumeSignalsDispatching=fF.da,fF=Ar.prototype,fF.targetNeedsRedraw=fF.cla,fF.targetBoundsChanged=fF.Xka,fF.targetDataChanged=fF.Yka,fF.targetMetaChanged=fF.$ka,fF.targetNeedsReapplication=fF.ala,fF.targetNeedsRecalculation=fF.bla,$.E("anychart.PointState.NORMAL",$.gm),$.E("anychart.PointState.HOVER",$.vo),$.E("anychart.PointState.SELECT",$.wo),$.g=$.Br.prototype,$.g.select=function(t){return this.i=t-1,this.advance()},$.g.Iu=function(t){this.select(t)},$.g.current=function(){return this.i},$.g.reset=function(){return this.i=-1,this.f=void 0,this},$.g.advance=function(){this.f=this.view.Af(++this.i);var t=this.Hb();return!!t&&this.i<t},$.g.get=function(t){if(!(this.i>=this.Hb()))return this.view.Ul(this.i).dk(this.f,this.i,t)},$.g.lr=function(t){return this.get(t)},$.g.ma=function(){return this.i},$.g.Gh=function(){return this.get("x")},$.g.Hb=function(){return this.view.Hb()},$.g.j=function(t,e){return 1<arguments.length?(this.view.j(this.i,t,e),this):this.view.j(this.i,t)};var gF=$.Br.prototype;gF.select=gF.select,gF.reset=gF.reset,gF.advance=gF.advance,gF.get=gF.get,gF.meta=gF.j,gF.getIndex=gF.ma,gF.getRowsCount=gF.Hb,$.H($.Cr,$.V),$.g=$.Cr.prototype,$.g.ra=16,$.g.sa=1,$.g.wo=null,$.g.Aw=null,$.g.aE=null,$.g.zY=!1,$.g.Ui=function(){var t=new $.Cr(this);return $.rd(this,t),t},$.g.filter=function(t,e){var i=new Hr(this,t,e);return $.rd(this,i),i},$.g.sort=function(t,e){var i=new Pr(this,t,e);return $.rd(this,i),i},$.g.concat=function(t){return $.A(t)&&(t=new $.Mr(t)),$.J(t,$.Mr)&&(t=t.Yd()),t=new Gr(this,t),$.rd(this,t),t},$.g.Af=function(t,e){return $.Dr(this),t=this.wo?this.wo[t]:t,$.p(t)?this.ee.Af.apply(this.ee,arguments):t},$.g.En=function(t){return this.Af(t)},$.g.Hb=function(){return $.Dr(this),this.wo?this.wo.length:this.ee.Hb()},$.g.Ul=function(t){return $.Dr(this),this.Aw||(this.Aw=this.Zt()),1==this.Aw.length?this.Aw[0]:this.ee.Ul(this.wo?this.wo[t]:t)},$.g.Wv=function(){return this.ee.Wv()},$.g.wO=function(t,e){for(var i=this.Wv(),n=0;n<i.length;n++)e=i[n].wO(t,e);return e},$.g.find=function(t,e){if($.Dr(this),!$.p(t)||!$.p(e))return-1;if(this.Ct||(this.Ct={}),this.Ct[t]||(this.Ct[t]={}),this.Ct[t][e])return this.Ct[t][e];for(var i,n,s=this.$();s.advance();)if(i=s.ma(),n=s.get(t),this.Ct[t][n]=i,n==e)return i;return-1},$.g.qM=function(t,e,i){if($.Dr(this),!$.p(t)||!$.p(e))return null;this.$F||(this.$F={});var n=t+"|"+e;if(this.$F[n])return this.$F[n].slice();if(t>e){var s=t;t=e,e=s}var a=[];for((s=this.$()).reset();s.advance();){var o=s.ma(),r=i?o:s.get("x");r>=t&&r<=e&&a.push(o)}return this.$F[n]=a},$.g.get=function(t,e){if(!(t>=this.Hb()))return this.Ul(t).dk(this.Af(t),t,e)},$.g.set=function(t,e,i){var n=this.Af(t);return $.p(n)&&this.Af(t,bca(this.Ul(t),n,e,i)),this},$.g.$=function(){return $.Dr(this),new $.Br(this)},$.g.FC=function(){return null},$.g.XI=function(t){this.$F=this.Ct=null,$.X(t,16)&&this.B(1,16)},$.g.j=function(t,e,i){if(this.zY)return this.tO.apply(this,arguments);this.aE||(this.aE=[]);var n=this.aE[t];return n||(this.aE[t]=n={}),2<arguments.length?(n[e]=i,this):n[e]},$.g.tO=function(t,e,i){if(t=this.wo?this.wo[t]:t,!$.p(t))throw Error("Index can not be masked by this View");return 2<arguments.length?(this.ee.j(t,e,i),this):this.ee.j(t,e)},$.g.hd=function(t){this.Aw||(this.Aw=this.Zt());for(var e=0;e<this.Aw.length;e++)if(this.Aw[e].hd(t))return!0;return!1},$.g.ED=function(){return this.ee.ED()},$.g.Zt=function(){return this.ee.Zt()},$.g.fP=function(t){return $.J(t,Date)&&(t=t.getTime()),(!$.p(t)||$.ea(t)&&(0,window.isNaN)(t))&&(t=null),t},$.g.F=function(){for(var t=[],e=this.$();e.advance();)t.push(Fr(this,e.ma()));return t};var hF=$.Cr.prototype;hF.derive=hF.Ui,hF.filter=hF.filter,hF.sort=hF.sort,hF.concat=hF.concat,hF.row=hF.Af,hF.getRowsCount=hF.Hb,hF.getIterator=hF.$,hF.getDataSets=hF.Wv,hF.meta=hF.j,hF.get=hF.get,hF.set=hF.set,hF.find=hF.find,$.H(Gr,$.Cr),$.g=Gr.prototype,$.g.sa=0,$.g.Ul=function(t){var e=this.ee.Hb();return t<e?this.ee.Ul(t):this.b.Ul(t-e)},$.g.Zt=function(){return $.Ga(this.ee.Zt(),this.b.Zt())},$.g.ED=function(){return this.ee.ED()||this.b.ED()},$.g.Wv=function(){var t=this.ee.Wv(),e=this.b.Wv();return $.Ga(t,e)},$.g.Af=function(t,e){var i=this.ee.Hb();return t<i?this.ee.Af.apply(this.ee,arguments):(t-=i,this.b.Af.apply(this.b,arguments))},$.g.Hb=function(){return this.ee.Hb()+this.b.Hb()},$.g.XI=function(t){this.Ct=null,$.X(t,16)&&this.va(16)},$.g.tO=function(t,e,i){var n=this.ee.Hb();return t<n?n=this.ee:(t-=n,n=this.b),2<arguments.length?(n.j(t,e,i),this):n.j(t,e)},$.H(Hr,$.Cr),Hr.prototype.FC=function(){for(var t=[],e=this.ee.$();e.advance();)this.f(e.get(this.b))&&t.push(e.ma());return t},$.H($.Jr,$.Cr),$.g=$.Jr.prototype,$.g.ra=16,$.g.sa=0,$.g.dk=function(t,e,i){var n=$.ka(t);if("array"==n){if(n=this.Zc[i])for(var s=0;s<n.length;s++)if(n[s]<t.length){var a=t[n[s]];break}}else"object"==n?a=oo(t,i,this.Zc[i]):-1<(0,$.za)(Kr,i)&&(a=t);return!$.p(a)&&-1<(0,$.za)(iF,i)&&(a=e),a},$.g.Ul=function(){return this},$.g.Zt=function(){return[this]},$.g.Af=function(t,e){return this.ee.Af.apply(this.ee,arguments)},$.g.Hb=function(){return this.ee.Hb()},$.g.XI=function(t){this.Ct=null,$.X(t,16)&&this.va(16)},$.g.hd=function(t){if(this.ee.hd(t))return!0;var e,i=iF;for(e=0;e<i.length;e++)if(i[e]==t)return!0;if(this.ee.ED())for(i=Kr,e=0;e<i.length;e++)if(i[e]==t)return!0;if(i=this.Zc[t])for(e=0;e<i.length;e++)if(this.ee.hd(i[e]))return!0;return!1};var Lr={x:[0,"column","x","name"],value:[1,0,"value","y","close","heat"],size:[2,1],open:[1],high:[2],low:[3,1],close:[4],lowest:[1,"lowest","low"],q1:[2],median:[3],q3:[4],highest:[5,"highest","high"],outliers:[6],id:[0],lat:[0,"lat","y","value"],long:[1,"long","lon","x"],points:[0],y:[1,"row","y"],heat:[2,"heat","value"],category:[2],isTotal:[2],from:[0],to:[1],weight:[2,"value","flow","weight"],z:[2],name:[0],start:[1],end:[2]},Kr=["value","close"],iF=["x"];$.Jr.prototype.pr=function(){return this.Zc};var jF=$.Jr.prototype;$.E("anychart.data.Mapping.DEFAULT_MAPPING",Lr),$.E("anychart.data.Mapping.DEFAULT_SIMPLE_ROW_MAPPING",Kr),$.E("anychart.data.Mapping.DEFAULT_INDEX_MAPPING",iF),jF.getRowsCount=jF.Hb,jF.getIterator=jF.$,jF.row=jF.Af,jF.getMapping=jF.pr,$.H($.Mr,$.V),$.g=$.Mr.prototype,$.g.ra=16,$.g.zK=0,$.g.At=null,$.g.ZX=!1,$.g.data=function(t,e){return $.p(t)?($.Pp++,$.z(t)&&(t=$.Sr(t,e)),$.la(t)?(this.pc=Nr(this,t),this.va(16)):this.pc&&0<this.pc.length?(this.pc.length=0,this.va(16)):this.pc=[],$.Sp(),this):this.pc},$.g.Yd=function(t){return t=new $.Jr(this,t),$.rd(this,t),t},$.g.Af=function(t,e){var i=this.pc[t];return 1<arguments.length&&($.Pp++,this.pc[t]=e,this.va(16),$.Sp()),i},$.g.En=function(t){return this.Af(t)},$.g.Oaa=function(t){return $.Pp++,this.pc.push.apply(this.pc,Nr(this,arguments)),this.va(16),$.Sp(),this},$.g.Xga=function(t,e){return $.Pp++,$.Da(this.pc,Nr(this,[t])[0],e),this.va(16),$.Sp(),this},$.g.remove=function(t){return $.Pp++,Ea(this.pc,t),this.va(16),$.Sp(),this},$.g.Hb=function(){return this.pc.length},$.g.Ul=function(){throw Error("Wrong usage of the data Set")},$.g.Zt=function(){throw Error("Wrong usage of the data Set")},$.g.hd=function(t){return $.ea(t)?this.zK>t:!(!this.At||!this.At[t.split(".")[0]])},$.g.wO=function(t,e){function i(i){i in t||(t[i]=e++)}var n;for(n=0;n<this.zK;n++)i(n);if(this.At)for(n in this.At)i(n);return this.ZX&&i("value"),e},$.g.ED=function(){return this.ZX},$.g.j=function(){throw Error("Wrong usage of the data Set")},$.g.Wv=function(){return[this]};var kF=$.Mr.prototype;$.E("anychart.data.set",$.Or),kF.data=kF.data,kF.mapAs=kF.Yd,kF.row=kF.Af,kF.append=kF.Oaa,kF.insert=kF.Xga,kF.remove=kF.remove,kF.getRowsCount=kF.Hb,$.H(Pr,$.Cr),Pr.prototype.FC=function(){for(var t=[],e=this.ee.$();e.advance();)t.push({value:e.get(this.b),index:e.ma()});for($.Pa(t,this.f),e=t.length;e--;)t[e]=t[e].index;return t};var Rr=/[ \f\n\r\t\v\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\u3031-\u3035\u309b\u309c\u30a0\u30fc\uff70]+/g,cca=/[!-#%-*,-/:;?@\[-\]_{}\xa1\xa7\xab\xb6\xb7\xbb\xbf\u037e\u0387\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0af0\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f14\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cc0-\u1cc7\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u2329\u232a\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30-\u2e3b\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uaaf0\uaaf1\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]/g;$.E("anychart.data.mapAsTable",(function(t,e,i){if(!t||!$.A(t))return[];if($.p(e))switch(e=String(e).toLowerCase(),e){case"range":e=2;break;case"ohlc":e=4;break;default:e=1}else e=1;var n;if($.p(i)&&!(0,window.isNaN)(n=$.P(i,window.NaN,!1))||(n=$.A(t[0])?Math.floor((t[0].length-1)/e):0),(0,window.isNaN)(n)||0>=n)return[];if(t=new $.Mr(t),i=[],1==e)for(e=0;e<n;e++)i.push(t.Yd({x:[0],value:[1+e]}));else if(2==e)for(e=0;e<n;e++)i.push(t.Yd({x:[0],low:[1+2*e],high:[2*e+2]}));else if(4==e)for(e=0;e<n;e++)i.push(t.Yd({x:[0],open:[1+4*e],high:[4*e+2],low:[4*e+3],close:[4*e+4]}));return i})),$.E("anychart.data.buildMapping",Qr),$.E("anychart.data.parseText",$.Sr);var eca="GyMdkHmsSEDahKzZvQL";$.E("anychart.format.locales.default.dateTimeLocale",{eras:["BC","AD"],eraNames:["Before Christ","Anno Domini"],narrowMonths:"JFMAMJJASOND".split(""),standaloneNarrowMonths:"JFMAMJJASOND".split(""),months:"January February March April May June July August September October November December".split(" "),standaloneMonths:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),standaloneShortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),standaloneWeekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortWeekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),standaloneShortWeekdays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),narrowWeekdays:"SMTWTFS".split(""),standaloneNarrowWeekdays:"SMTWTFS".split(""),shortQuarters:["Q1","Q2","Q3","Q4"],quarters:["1st quarter","2nd quarter","3rd quarter","4th quarter"],ampms:["AM","PM"],firstDayOfWeek:0,weekendRange:[5,6],firstWeekCutOffDay:3,dateFormat:"y MMM d",timeFormat:"HH:mm:ss",dateTimeFormat:"y MMM d 'at' HH:mm:ss",formats:{full_year:"yyyy",full_year_semester:"MMM yyyy",full_year_quarter:"MMM yyyy",full_year_month:"MMM yyyy",full_year_third_of_month:"dd MMM yyyy",full_year_week:"dd MMM yyyy",full_year_day:"dd MMM yyyy",full_year_hour:"HH dd MMM yyyy",full_year_minute:"dd MMM yyyy, HH:mm",full_year_second:"dd MMM yyyy, HH:mm:ss",full_year_millisecond:"dd MMM yyyy, HH:mm:ss.SSS",timeline_year:["yyyy","yy"],timeline_year_semester:["Q yyyy","Q ''yy"],timeline_year_quarter:["QQ yyyy","QQ ''yy","Q yyyy","Q ''yy"],timeline_year_month:["MMMM yyyy","MMM yyyy","MMM ''yy","MM ''yy"],timeline_year_third_of_month:"EEEE, dd MMMM yyyy;EE, dd MMM yyyy;EE, dd MMM yy;dd MMM yyyy;dd MMMM yy;MM.dd.yyyy;MM.dd.yy".split(";"),timeline_year_week:"dd MMMM yyyy;dd MMM yyyy;dd MMMM yy;dd MMM yy;MM.dd.yyyy;MM.dd.yy".split(";"),timeline_year_day:"EEEE, dd MMMM yyyy;EE, dd MMM yyyy;EE, dd MMM yy;dd MMM yyyy;dd MMMM yy;MM.dd.yyyy;MM.dd.yy".split(";"),timeline_year_hour:["dd MMMM yyyy HH'h'","dd MMM yyyy HH'h'","dd MMM yy HH'h'","MM.dd.yyyy HH'h'","MM.dd.yy HH'h'"],timeline_year_minute:["dd MMMM yyyy HH:mm","dd MMM yyyy HH:mm","dd MMM yy HH:mm","MM.dd.yyyy HH:mm","MM.dd.yy HH:mm"],timeline_year_second:["dd MMMM yyyy HH:mm:ss","dd MMM yyyy HH:mm:ss","dd MMM yy HH:mm:ss","MM.dd.yyyy HH:mm:ss","MM.dd.yy HH:mm:ss"],timeline_year_millisecond:["dd MMMM yyyy HH:mm:ss.SSS","dd MMM yyyy HH:mm:ss.SSS","dd MMM yy HH:mm:ss.SSS","MM.dd.yyyy HH:mm:ss.SSS","MM.dd.yy HH:mm:ss.SSS"],timeline_semester:["Q"],timeline_semester_quarter:["QQ","Q"],timeline_semester_month:["MMMM","MMM","MM"],timeline_semester_third_of_month:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_semester_week:["dd MMMM","dd MMM","MM.dd","MM.dd"],timeline_semester_day:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_semester_hour:["dd MMMM HH'h'","dd MMM HH'h'","dd MMM HH'h'","MM.dd HH'h'","MM.dd HH'h'"],timeline_semester_minute:["dd MMMM HH:mm","dd MMM HH:mm","dd MMM HH:mm","MM.dd HH:mm","MM.dd HH:mm"],timeline_semester_second:["dd MMMM HH:mm:ss","dd MMM HH:mm:ss","dd MMM HH:mm:ss","MM.dd HH:mm:ss","MM.dd HH:mm:ss"],timeline_semester_millisecond:["dd MMMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS"],timeline_quarter:["QQ","Q"],timeline_quarter_month:["MMMM","MMM","MM"],timeline_quarter_third_of_month:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_quarter_week:["dd MMMM","dd MMM","MM.dd","MM.dd"],timeline_quarter_day:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_quarter_hour:["dd MMMM HH'h'","dd MMM HH'h'","dd MMM HH'h'","MM.dd HH'h'","MM.dd HH'h'"],timeline_quarter_minute:["dd MMMM HH:mm","dd MMM HH:mm","dd MMM HH:mm","MM.dd HH:mm","MM.dd HH:mm"],timeline_quarter_second:["dd MMMM HH:mm:ss","dd MMM HH:mm:ss","dd MMM HH:mm:ss","MM.dd HH:mm:ss","MM.dd HH:mm:ss"],timeline_quarter_millisecond:["dd MMMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS"],timeline_month:["MMMM","MMM","MM"],timeline_month_third_of_month:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_month_week:["dd MMMM","dd MMM","MM.dd","MM.dd"],timeline_month_day:"EEEE, dd MMMM;EE, dd MMM;EE, dd MMM;dd MMM;dd MMMM;MM.dd;MM.dd".split(";"),timeline_month_hour:["dd MMMM HH'h'","dd MMM HH'h'","dd MMM HH'h'","MM.dd HH'h'","MM.dd HH'h'"],timeline_month_minute:["dd MMMM HH:mm","dd MMM HH:mm","dd MMM HH:mm","MM.dd HH:mm","MM.dd HH:mm"],timeline_month_second:["dd MMMM HH:mm:ss","dd MMM HH:mm:ss","dd MMM HH:mm:ss","MM.dd HH:mm:ss","MM.dd HH:mm:ss"],timeline_month_millisecond:["dd MMMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","dd MMM HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS","MM.dd HH:mm:ss.SSS"],timeline_third_of_month:["dd"],timeline_third_of_month_week:["dd"],timeline_third_of_month_day:["EEEE, dd","EE, dd","dd"],timeline_third_of_month_hour:["EEEE, dd HH'h'","EE, dd HH'h'","dd HH'h'"],timeline_third_of_month_minute:["EEEE, dd HH:mm","EE, dd HH:mm","dd HH:mm"],timeline_third_of_month_second:["EEEE, dd HH:mm:ss","EE, dd HH:mm:ss","dd HH:mm:ss"],timeline_third_of_month_millisecond:["EEEE, dd HH:mm:ss.SSS","EE, dd HH:mm:ss.SSS","dd HH:mm:ss.SSS"],timeline_week:["dd"],timeline_week_day:["EEEE, dd","EE, dd","dd"],timeline_week_hour:["EEEE, dd HH'h'","EE, dd HH'h'","dd HH'h'"],timeline_week_minute:["EEEE, dd HH:mm","EE, dd HH:mm","dd HH:mm"],timeline_week_second:["EEEE, dd HH:mm:ss","EE, dd HH:mm:ss","dd HH:mm:ss"],timeline_week_millisecond:["EEEE, dd HH:mm:ss.SSS","EE, dd HH:mm:ss.SSS","dd HH:mm:ss.SSS"],timeline_day:["EEEE, dd","EEEE, dd","EE, dd","dd"],timeline_day_hour:["EEEE, dd HH'h'","EE, dd HH'h'","dd HH'h'"],timeline_day_minute:["EEEE, dd HH:mm","EE, dd HH:mm","dd HH:mm"],timeline_day_second:["EEEE, dd HH:mm:ss","EE, dd HH:mm:ss","dd HH:mm:ss"],timeline_day_millisecond:["EEEE, dd HH:mm:ss.SSS","EE, dd HH:mm:ss.SSS","dd HH:mm:ss.SSS"],timeline_hour:["HH'h'","HH"],timeline_hour_minute:["HH:mm"],timeline_hour_second:["HH:mm:ss"],timeline_hour_millisecond:["HH:mm:ss.SSS"],timeline_minute:["mm''"],timeline_minute_second:["mm''ss\""],timeline_minute_millisecond:["mm''ss\"SSS","mm''ss\"SS"],timeline_second:['ss"',"ss"],timeline_second_millisecond:['ss"SSS','ss"SS'],timeline_millisecond:["SSS"],year:"yyyy",year_semester:"yyyy MMM",year_quarter:"yyyy MMM",year_month:"yyyy MMM",year_third_of_month:"MMM dd",year_week:"MMM dd",year_day:"MMM dd",year_hour:"MMM-dd HH",year_minute:"dd HH:mm",year_second:"HH:mm:ss",year_millisecond:"HH:mm:ss.SSS",semester:"MMM",semester_quarter:"MMM",semester_month:"MMM",semester_third_of_month:"dd",semester_week:"dd",semester_day:"dd",semester_hour:"HH",semester_minute:"HH:mm",semester_second:"HH:mm:ss",semester_millisecond:"SSS",quarter:"MMM",quarter_month:"MMM",quarter_third_of_month:"dd",quarter_week:"dd",quarter_day:"dd",quarter_hour:"HH",quarter_minute:"HH:mm",quarter_second:"HH:mm:ss",quarter_millisecond:"SSS",month:"MMM",month_third_of_month:"dd",month_week:"dd",month_day:"dd",month_hour:"HH",month_minute:"HH:mm",month_second:"HH:mm:ss",month_millisecond:"SSS",third_of_month:"dd",third_of_month_week:"dd",third_of_month_day:"dd",third_of_month_hour:"HH",third_of_month_minute:"HH:mm",third_of_month_second:"HH:mm:ss",third_of_month_millisecond:"SSS",week:"dd",week_day:"dd",week_hour:"HH",week_minute:"HH:mm",week_second:"HH:mm:ss",week_millisecond:"SSS",day:"dd",day_hour:"HH",day_minute:"HH:mm",day_second:"HH:mm:ss",day_millisecond:"SSS",hour:"HH",hour_minute:"HH:mm",hour_second:"HH:mm:ss",hour_millisecond:"SSS",minute:"HH:mm",minute_second:"HH:mm:ss",minute_millisecond:"SSS",second:"HH:mm:ss",second_millisecond:"SSS",millisecond:"SSS",charts_year:"yyyy",charts_semester:"MMM yyyy",charts_quarter:"MMM yyyy",charts_month:"MMM",charts_third_of_month:"dd MMM",charts_week:"dd MMM",charts_day:"dd MMM",charts_hour:"HH:mm",charts_minute:"HH:mm",charts_second:"HH:mm:ss",charts_millisecond:"HH:mm:ss.SSS",charts_year_semester:"MMM",charts_semester_quarter:"MMM",charts_quarter_month:"MMM",charts_month_third_of_month:"dd MMM",charts_third_of_month_week:"dd MMM",charts_week_day:"dd",charts_day_hour:"HH:mm",charts_hour_minute:"HH:mm",charts_minute_second:"HH:mm:ss",charts_second_millisecond:"HH:mm:ss.SSS"}}),$.E("anychart.format.locales.default.numberLocale",{decimalsCount:10,decimalPoint:".",groupsSeparator:"",scale:!1,zeroFillDecimals:!1,scaleSuffixSeparator:"",useBracketsForNegative:!1}),$.E("anychart.format.locales.default.messages",{});var Ida=/^([-]?\d+\.?\d*)(.*?)?$/,As={factors:[1e15,1e12,1e9,1e6,1e3,1e3,1,.001,1e-6,1e-9],suffixes:"P T G M K k  m u n".split(" ")},Ds="default",Cs=null,fs=window.NaN,hs="default",is=null,ks=null,ms=null,ys=0,xs={},Es={},zs={},cs={},Zr={};$.E("anychart.format.inputLocale",(function(t){if($.p(t)){var e=$.z(t),i="object"==$.ka(t);e||i?(es(t,i=i?"input":t),Ds=e?i:Zr[i]||Zr.input||t):Ds="default"}return Ds})),$.E("anychart.format.inputBaseDate",gs),$.E("anychart.format.inputDateTimeFormat",(function(t){return $.p(t)&&(Cs=$.z(t)?t:null),Cs})),$.E("anychart.format.outputLocale",$.Ro),$.E("anychart.format.outputTimezone",(function(t){return $.p(t)&&(ys=$.N(t)||0),ys})),$.E("anychart.format.outputDateFormat",ls),$.E("anychart.format.outputTimeFormat",ns),$.E("anychart.format.outputDateTimeFormat",js),$.E("anychart.format.parseDateTime",$.ps),$.E("anychart.format.parseNumber",(function(t,e){var i=as(e)||as(Ds)||as("default"),n=1;if($.z(t)){i.useBracketsForNegative&&"("==t.charAt(0)&&")"==t.charAt(t.length-1)&&(n=-1,t=t.substring(1,t.length-1)),t=(t=t.replace(i.decimalPoint,".")).replace(new RegExp(tc(i.groupsSeparator),"g"),"");var s=i.scale;if(!0===s&&(s=As),$.C(s)&&$.A(s.factors)&&$.A(s.suffixes)){var a=(t=t.replace(new RegExp(tc(i.scaleSuffixSeparator),"g"),"")).match(Ida);if(!a)return window.NaN;var o=1;if(t=+a[1],a=a[2]){var r=s.factors;s=s.suffixes;for(var l=Math.min(r.length,s.length),h=0;h<l;h++)if(a==s[h]){o=r[h];break}}t*=o}}return n*=+t,(0,window.isNaN)(n)?n:$.Tm(n,i.decimalsCount)})),$.E("anychart.format.subs",$.gc),$.E("anychart.format.getMessage",$.qs),$.E("anychart.format.getDateTimeFormats",$.ts),$.E("anychart.format.getDateTimeFormat",$.ss),$.E("anychart.format.getIntervalIdentifier",$.rs),$.E("anychart.format.date",$.vs),$.E("anychart.format.time",ws),$.E("anychart.format.dateTime",$.us),$.E("anychart.format.number",$.Bs),$.E("anychart.format.getLocale",$r),$.H($.Gs,$.V),$.g=$.Gs.prototype,$.g.ra=2,$.g.nc=function(t,e){this.Xe||(this.Xe=[]);var i=this.Xe.length;return t>=i&&0<i&&(t%=i),$.p(e)?(this.Xe[t]=e,this.va(2),this):(i=this.Xe[t])?i:null},$.g.items=function(t,e){return $.p(t)?($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.Xe),this.Xe=(0,$.Wa)(t,(function(t){return $.Ub(t)})),this.va(2),this):this.Xe},$.g.Gp=function(t){this.Xe=$.Ha(this.oa.items),t&&this.va(2)},$.g.F=function(){var t=$.Gs.u.F.call(this);t.type="distinct";for(var e=[],i=0;i<this.Xe.length;i++)e.push($.Rl(this.Xe[i]));return t.items=e,t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Gs)?{items:t.items()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),!0)},$.g.U=function(t,e){$.Gs.u.U.call(this,t,e),this.items(t.items)};var lF=$.Gs.prototype;$.E("anychart.palettes.distinctColors",(function(t,e){var i=new $.Gs;return $.p(t)&&i.items.apply(i,arguments),i})),lF.itemAt=lF.nc,lF.items=lF.items,$.H($.Hs,$.V),$.g=$.Hs.prototype,$.g.ra=2,$.g.nc=function(t,e,i,n,s){var a=this.items(),o=a.length;return t>=o&&0<o&&(t%=o),$.p(e)?(a[t]=$.Yb.apply(null,$.Ja(arguments,1)),this.va(2),this):a[t]||null},$.g.items=function(t,e){if(!this.b)if(this.b=[],$.p(this.oa.items))for(var i=0;i<this.oa.items.length;i++){var n=$.Yb.call(null,this.oa.items[i]);this.b.push(n)}else for(i in Jg)this.b.push(Jg[i]);return $.p(t)?($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.b),this.b=(0,$.Wa)(t,(function(t){return $.Yb.call(null,t)})),this.va(2),this):this.b},$.g.F=function(){for(var t=$.Hs.u.F.call(this),e=[],i=this.items(),n=0;n<i.length;n++)e.push($.Rl(i[n]));return t.items=e,t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Hs)?{items:t.items()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),!0)},$.g.U=function(t,e){$.Hs.u.U.call(this,t,e),this.items(t.items)},$.g.R=function(){$.sd(this.b),this.b=null,$.Hs.u.R.call(this)};var mF=$.Hs.prototype;$.E("anychart.palettes.hatchFills",(function(t,e){var i=new $.Hs;return i.items.apply(i,$.p(t)?arguments:$.Ec(Jg)),i})),mF.itemAt=mF.nc,mF.items=mF.items,$.H($.Ls,$.V),$.g=$.Ls.prototype,$.g.ra=2,$.g.nc=function(t,e){var i=this.items(),n=i.length;return t>=n&&0<n&&(t%=n),$.p(e)?((n=Qk(e))!=i[t]&&(i[t]=n,this.va(2)),this):(n=i[t])||null},$.g.items=function(t,e){if(!this.Bc)if(this.Bc=[],$.p(this.oa.items))for(var i=0;i<this.oa.items.length;i++)this.Bc.push(this.oa.items[i]);else for(i in Nk)this.Bc.push(Nk[i]);return $.p(t)?($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.Bc),this.Bc=(0,$.Wa)(t,(function(t){return Qk(t)})),this.va(2),this):this.Bc},$.g.F=function(){var t=$.Ls.u.F.call(this);return t.items=this.items(),t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Ls)?{items:t.items()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),!0)},$.g.U=function(t,e){$.Ls.u.U.call(this,t,e),this.items(t.items)};var nF=$.Ls.prototype;$.E("anychart.palettes.markers",(function(t,e){var i=new $.Ls;return $.p(t)&&i.items.apply(i,arguments),i})),nF.itemAt=nF.nc,nF.items=nF.items,$.H($.Ms,$.V),$.g=$.Ms.prototype,$.g.ra=2,$.g.sa=16,$.g.items=function(t,e){return $.p(t)?($.C(t)&&$.A(t.keys)?this.Xe=$.Ub(t).keys:($.A(t)||(t=$.Ja(arguments,0)),$.sd(this.Xe),this.Xe=(0,$.Wa)(t,(function(t){return $.Ub(t)}))),this.B(16,2),this):this.Xe},$.g.count=function(t){return $.p(t)?(this.b!=t&&(this.b=t,this.B(16,2)),this):this.b},$.g.nc=function(t,e){if(this.J(16)){if(this.Xe&&0!=this.b){var i=[],n=$.A(this.Xe)?this.Xe:this.Xe.keys;if($.A(n)&&n.length){for(var s,a=this.b||this.i||n.length,o=1/(n.length-1),r=0;r<n.length;r++){var l=n[r];$.z(l)?(s=$.Ll(l),i.push({color:s?s.vk:"#000000",offset:r*o})):(s=$.Ll(l.color),i.push({color:s?s.vk:"#000000",offset:$.p(l.offset)?l.offset:r*o}))}if(Sa(i),this.f=[],1==i.length)for(r=0;r<a;r++)this.f[r]={color:i[0].color};else for(r=0;r<a;r++){for(s=1==a?0:r/(a-1),o=n=null,l=0;l<i.length;l++)s>=i[l].offset&&(n=i[l]),s<=i[l].offset&&null==o&&(o=i[l]);n||(n=i[0]),o||(o=i[i.length-1]),o.offset==n.offset?this.f[r]={color:n.color}:(s=1-(s-n.offset)/(o.offset-n.offset),this.f[r]={color:$.Tb($.Hl($.Cl(n.color),$.Cl(o.color),s))})}}}this.I(16)}return 1>(i=$.A(this.Xe)?this.Xe:this.Xe.keys).length?null:(i=this.b||this.i||i.length)?$.p(e)?(this.f[t]=e,this.va(2),this):(t>i-1&&(t=i-1),0>t&&(t=0),(i=this.f[t])?i:null):null},$.g.Gp=function(t){this.b=window.NaN,this.Xe="#1D8BD1 #F1683C #2AD62A #DBDC25 #8FBC8B #D2B48C #FAF0E6 #20B2AA #B0C4DE #DDA0DD #9C9AFF #9C3063 #FFFFCE #CEFFFF #630063 #FF8284 #0065CE #CECFFF #000084 #FF00FF #FFFF00 #00FFFF #840084 #840000 #008284 #0000FF #00CFFF #CEFFFF #CEFFCE #FFFF9C #9CCFFF #FF9ACE #CE9AFF #FFCF9C #3165FF #31CFCE #9CCF00 #FFCF00 #FF9A00 #FF6500".split(" "),this.B(16),t&&this.va(2)},$.g.F=function(){var t=$.Ms.u.F.call(this);t.type="range";for(var e=[],i=0;i<this.Xe.length;i++)e.push($.Rl(this.Xe[i]));return t.items=e,(0,window.isNaN)(this.b)||(t.count=this.b),t},$.g.Zd=function(t){return $.A(t)?{items:t}:$.J(t,$.Ms)?{items:t.items(),count:t.count()}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.items(i.items),"count"in i&&this.count(i.count),!0)},$.g.U=function(t,e){$.Ms.u.U.call(this,t,e),this.items(t.items),this.count(t.count)};var oF=$.Ms.prototype;$.E("anychart.palettes.rangeColors",(function(t,e){var i=new $.Ms;return $.p(t)&&i.N.apply(i,arguments),i})),oF.itemAt=oF.nc,oF.items=oF.items,oF.count=oF.count,$.E("anychart.palettes.defaultPalette","#64b5f6 #1976d2 #ef6c00 #ffd54f #455a64 #96a6a6 #dd2c00 #00838f #00bfa5 #ffa000".split(" ")),$.E("anychart.palettes.earth","#827717 #c77532 #998675 #6b617b #c69c6d #d29b9b #879872 #16685d #57a7b1 #bdbdbd".split(" ")),$.E("anychart.palettes.monochrome",["#37474f","#757575","#90a4ae","#bdbdbd","#e1e1e1"]),$.E("anychart.palettes.provence","#aa8ab3 #b7cbe2 #cdd18e #938d9c #6f5264 #96246a #519790 #6aabcc #61687d #7b8030".split(" ")),$.E("anychart.palettes.morning","#0288d1 #58abd7 #ffe082 #f8bbd0 #f48fb1 #bbdefb #d4e157 #ff6e40 #03a9f4 #e1bee7".split(" ")),$.E("anychart.palettes.coffee","#482311 #8d5932 #d8b597 #f2d1be #9b301c #d81e05 #c5e1a5 #558b2f #ffab00 #e65100".split(" ")),$.E("anychart.palettes.wines","#6f3448 #857600 #f1a122 #a50b01 #400001 #a98b80 #c08081 #86614e #c26364 #615060".split(" ")),$.E("anychart.palettes.turquoise","#80deea #00acc1 #00838f #29b6f6 #0277bd #0277bd #8c9eff #9575cd #ce93d8 #8e24aa".split(" ")),$.E("anychart.palettes.pastel","#90caf9 #80cbc4 #aed581 #e6ee9c #ffcc80 #ffab91 #f8bbd0 #d1c4e9 #9e9e9e #c7b299".split(" ")),$.E("anychart.palettes.blue","#40c4ff #0288d1 #9fa8da #5c6bc0 #7e57c2 #54dbdf #15a9c7 #00897b #304ffe #0179be".split(" ")),$.E("anychart.palettes.glamour","#f8bbd0 #ce93d8 #ab47bc #d81b60 #880e4f #ffd600 #ff6e40 #03a9f4 #5e35b1 #1976d2".split(" ")),$.E("anychart.palettes.sea","#a9e1d4 #54dbdf #15a9c7 #207fbf #c0aca5 #8b8a92 #dbcb8f #dba869 #ffab00 #00897b".split(" ")),$.E("anychart.palettes.v6","#1D8BD1 #F1683C #2AD62A #DBDC25 #8FBC8B #D2B48C #FAF0E6 #20B2AA #B0C4DE #DDA0DD #9C9AFF #9C3063 #FFFFCE #CEFFFF #630063 #FF8284 #0065CE #CECFFF #000084 #FF00FF #FFFF00 #00FFFF #840084 #840000 #008284 #0000FF #00CFFF #CEFFFF #CEFFCE #FFFF9C #9CCFFF #FF9ACE #CE9AFF #FFCF9C #3165FF #31CFCE #9CCF00 #FFCF00 #FF9A00 #FF6500".split(" "));var Os=1,gca={LINEAR:Os,W8:2,Nsa:3},Ss=function(){var t={};return t[Os]=function(t,e){return t=$.N(t),(e=$.N(e)-t)?function(i){return($.N(i)-t)/e}:function(){return 0}},t[2]=function(t,e){return t=$.Xm(Math.abs($.N(t))),(e=$.Xm(Math.abs($.N(e)))-t)?function(i){return($.Xm(Math.abs($.N(i)))-t)/e}:function(){return 0}},t[3]=function(t,e){return t=Fs(t),(e=Fs(e)-t)?function(i){return(Fs(i)-t)/e}:function(){return 0}},t}(),Ts=function(){var t={};return t[Os]=function(t,e){return t=$.N(t),(e=$.N(e)-t)?function(i){return i*e+t}:function(){return t}},t[2]=function(t,e){var i=$.N(t),n=$.N(e),s=$.fb(i)||$.fb(n);return t=$.Xm(Math.abs(i)),(e=$.Xm(Math.abs(n))-t)?function(i){return Ym(Math.E,i*e+t)*s}:function(){return i}},t[3]=function(t,e){return t=Fs(t),(e=Fs(e)-t)?function(i){return Math.round(i*e+t)}:function(){return t}},t}();Ps.prototype.transform=function(t){return this.f||(this.f=Us(this.G,this.i,this.D,this.o,[],Os)),this.f(t)},Ps.prototype.Mc=function(t){return this.b||(this.b=Us(this.i,this.G,[],Os,this.D,this.o)),this.b(t)},Ps.prototype.xe=function(t){return $.p(t)?(this.i=$.Ja(t,0),this.f=this.b=null,this):$.Ja(this.i,0)},$.H(Vs,$.V),$.g=Vs.prototype,$.g.ra=2,$.g.Pp=null,$.g.qn=4,$.g.pm=null,$.g.jv=null,$.g.Mba=function(t,e,i,n,s,a){if($.p(t)){if(null===t)var o=null;else if($.z(t)&&1==arguments.length)o=Fn(t);else{if($.z(t))switch(t=$.Zk(t),e=$.N(e)||1,t){case"year":t="y";break;case"semester":t="m",e*=6;break;case"quarter":t="m",e*=4;break;case"month":t="m";break;case"third-of-month":t="d",e*=10;break;case"week":t="d",e*=7;break;case"day":t="d";break;case"hour":t="h";break;case"minute":t="n";break;case"second":t="s";break;case"millisecond":t="t"}o=new $.En(t,e,i,n,s,a)}var r;return(r=o&&this.Pp)&&(r=this.Pp,r=o.ai==r.ai&&o.pg==r.pg&&o.xg==r.xg&&o.Th==r.Th&&o.Bj==r.Bj&&o.wh==r.wh),r||!o&&!this.Pp||(o?(this.qn=window.NaN,this.Pp=o):(this.qn=4,this.Pp=null),this.jv=this.pm=null,this.va(2)),this}return Gn(this.Pp,!1)},$.g.dU=function(){this.scale.pb();var t=this.b;return t&&((t.ai?"year":t.pg&&((t.pg%6?!(t.pg%3)&&"quarter":"semester")||"month"))||t.xg&&(t.xg%7?"day":"week")||t.Th&&"hour"||t.Bj&&"minute"||t.wh&&(t.wh%1?"millisecond":"second"))||"millisecond"},$.g.eU=function(){this.scale.pb();var t=this.b;return t&&(t.ai||t.pg&&(!(t.pg%6)&&t.pg/6||!(t.pg%3)&&t.pg/3||t.pg)||t.xg&&(!(t.xg%7)&&t.xg/7||t.xg)||t.Th||t.Bj||t.wh&&(!(t.wh%1)&&t.wh||1e3*t.wh))||0},$.g.count=function(t){return $.p(t)?(this.qn!=t&&(this.Pp=null,this.qn=(0,window.isNaN)(t)||2>t?4:Math.ceil(+t),this.jv=this.pm=null,this.va(2)),this):this.qn},$.g.set=function(t){if(this.pm!=t){this.qn=window.NaN,this.Pp=null,this.pm=(0,$.Wa)(t,(function(t){return $.ps(t)})),$.Pa(this.pm);for(var e=this.pm[0],i=1,n=1;n<this.pm.length;n++){var s=this.pm[n];s!=e&&(this.pm[i++]=s),e=s}this.pm.length=t.length?i:0,this.jv=null,this.va(2)}return this},$.g.get=function(){var t=this.dk();return(0,$.Ye)(t,this.hfa,this)},$.g.dk=function(){if(this.pm)var t=this.pm;else this.scale.pb(),t=this.jv;return t||[]},$.g.hfa=function(t){return!(0>(t=this.scale.transform(t))||1<t)},$.g.EB=function(t,e,i,n){if(this.jv=null,!this.pm){var s=[],a=this.Pp,o=this.qn;for(a&&(n-i)/wp(a)>this.scale.an()&&($.kl(20,null,[n-i,wp(a)]),a=null,this.qn=4),a||(a=Ws(this,t,e,!0)),t=new $.On(new Date(i)),n=new $.On(new Date(n)),e=0;0>=t.getTime()-n.getTime()&&e<this.scale.an();t.add(a),e++)s.push(t.getTime());this.jv=s,this.qn=o,this.b=a}},$.g.DB=function(t,e,i,n){this.jv=null;var s=[t,e];if(!this.pm){var a=[],o=this.Pp,r=this.qn;o&&(e-t)/wp(o)>this.scale.an()&&($.kl(20,null,[e-t,wp(o)]),o=null,this.qn=4),o||(o=Ws(this,t,e,!1));var l=$.So(t,o,0),h=new $.On(new Date(l));for(i?s[0]=l:l<t&&h.add(o),t=new $.On(new Date(e)),e=0;0>=h.getTime()-t.getTime()&&e<this.scale.an();h.add(o),e++)a.push(h.getTime());n&&(!a.length||a[a.length-1]<t.getTime())&&a.push(s[1]=h.getTime()),this.jv=a,this.qn=r,this.b=o}return s};var jca=[1,2,5,10,20,50,100,200,500,1e3,2e3,5e3,1e4,2e4,3e4,6e4,12e4,3e5,6e5,12e5,18e5,36e5,72e5,108e5,216e5,288e5,432e5,576e5,864e5,1728e5,6048e5,864e6,12096e5,18144e5,24192e5,2628e6,5256e6,7884e6,10512e6,15768e6,31536e6,63072e6],hca=[new $.En(Dn,.001),new $.En(Dn,.001),new $.En(Dn,.001),new $.En(Dn,.005),new $.En(Dn,.005),new $.En(Dn,.01),new $.En(Dn,.02),new $.En(Dn,.04),new $.En(Dn,.1),new $.En(Dn,.2),new $.En(Dn,.5),new $.En(Dn,1),new $.En(Dn,2),new $.En(Dn,5),new $.En(Dn,10),new $.En(Dn,20),new $.En(Dn,30),new $.En(Cn,1),new $.En(Cn,1),new $.En(Cn,5),new $.En(Cn,10),new $.En(Cn,20),new $.En(Cn,30),new $.En(Bn,1),new $.En(Bn,2),new $.En(Bn,2),new $.En(Bn,3),new $.En(Bn,4),new $.En(Bn,8),new $.En(Bn,12),new $.En(An,1),new $.En(An,2),new $.En(An,7),new $.En(An,7),new $.En(An,7),new $.En(An,7),new $.En(zn,1),new $.En(zn,1),new $.En(zn,1),new $.En(zn,2),new $.En(zn,4),new $.En(zn,6)],ica=[new $.En(Dn,.001),new $.En(Dn,.002),new $.En(Dn,.005),new $.En(Dn,.01),new $.En(Dn,.02),new $.En(Dn,.05),new $.En(Dn,.1),new $.En(Dn,.2),new $.En(Dn,.5),new $.En(Dn,1),new $.En(Dn,2),new $.En(Dn,5),new $.En(Dn,10),new $.En(Dn,20),new $.En(Dn,30),new $.En(Cn,1),new $.En(Cn,2),new $.En(Cn,5),new $.En(Cn,10),new $.En(Cn,20),new $.En(Cn,30),new $.En(Bn,1),new $.En(Bn,2),new $.En(Bn,3),new $.En(Bn,6),new $.En(Bn,8),new $.En(Bn,12),new $.En(Bn,16),new $.En(An,1),new $.En(An,2),new $.En(An,7),new $.En(An,10),new $.En(An,14),new $.En(An,21),new $.En(An,28),new $.En(zn,1),new $.En(zn,2),new $.En(zn,3),new $.En(zn,4),new $.En(zn,6),new $.En(yn,1),new $.En(yn,2)];Vs.prototype.F=function(){var t=Vs.u.F.call(this);if(this.pm){for(var e=[],i=0;i<this.pm.length;i++)e.push(this.pm[i].getTime());t.explicit=e}else this.Pp?t.interval=Gn(this.Pp):(0,window.isNaN)(this.qn)||(t.count=this.qn);return t},Vs.prototype.Ie=function(t,e){return!!$.A(e)&&(this.set(e),!0)},Vs.prototype.U=function(t,e){Vs.u.U.call(this,t,e),$.A(t.explicit)?this.set(t.explicit):this.pm=null,this.qn=Math.max(2,Math.ceil($.N(t.count))),this.Pp=$.z(t.interval)?Fn(t.interval):null,this.jv=null};var pF=Vs.prototype,et,ct,at,qF;pF.interval=pF.Mba,pF.count=pF.count,pF.set=pF.set,pF.get=pF.get,pF.getIntervalUnit=pF.dU,pF.getIntervalUnitCount=pF.eU,$.H(Xs,$.V),$.g=Xs.prototype,$.g.ra=6,$.g.Xa=$.ia,$.g.Kr=function(t,e,i){return this.transform(t,i)},$.g.Lz=function(t){return t},$.g.vH=function(){return this.$B},$.g.zk=function(t){return $.Do(t)},$.g.Ne=function(t){return $.p(t)?(t=!!t,this.PD!=t&&(this.PD=t,this.oN(),this.va(2)),this):this.PD},$.g.oN=function(){},$.g.Bg=function(){return this.cs||this.Co(),this.cs++,this},$.g.Hg=function(t){return!!(this.cs=Math.max(this.cs-1,0))||this.IC(!!t)},$.g.Px=function(){return!1},$.g.sD=function(){return 0},$.g.gS=!1,$.g.jn=function(t){return $.p(t)?(t=this.gS?$.zk(EE,t,"none"):"none",this.jY!=t&&(this.jY=t,this.va(6)),this):this.gS?this.jY:"none"},$.g.kx=function(t){return $.p(t)?(t=$.zk(wda,t,"direct"),this.iY!=t&&(this.iY=t,"none"!=this.jn()&&this.va(6)),this):this.iY},$.g.CE=function(t){return Number(t)},$.g.F=function(){var t=Xs.u.F.call(this);return t.type=this.Ma(),t.inverted=this.Ne(),t},$.g.U=function(t,e){Xs.u.U.call(this,t,e),this.Ne(t.inverted)},ct=1,$.bt=8,qF={},qF.linear=ct,qF.log=2,qF["date-time"]=4,qF.ordinal=$.bt,qF["linear-color"]=32,qF["ordinal-color"]=16,at=qF;var rF=Xs.prototype;rF.inverted=rF.Ne,rF.startAutoCalc=rF.Bg,rF.finishAutoCalc=rF.Hg,$.H($.kt,Xs),$.g=$.kt.prototype,$.g.an=function(t){return $.p(t)?(t=$.P(t,1e3,!1),this.cl!=t&&(this.cl=t,this.Kc=!1,this.va(2)),this):this.cl},$.g.uh=function(t){if($.p(t)){t=$.N(t);var e=(0,window.isNaN)(t);return(e!=this.Pn||!e&&t!=this.min)&&(this.Pn=e,this.min=t,this.jt=window.NaN,this.Kc=!1,e&&this.va(4),this.va(2)),this}return this.pb(),this.min},$.g.di=function(t){if($.p(t)){t=$.N(t);var e=(0,window.isNaN)(t);return(e!=this.Nn||!e&&t!=this.max)&&(this.Nn=e,this.max=t,this.Lq=window.NaN,this.Kc=!1,e&&this.va(4),this.va(2)),this}return this.pb(),this.max},$.g.XQ=function(t){return $.p(t)?(t=!!t,this.BF!=t&&(this.BF=t,this.Pn&&(this.Kc=!1,this.va(6))),this):this.BF},$.g.WQ=function(t){return $.p(t)?(t=!!t,this.AF!=t&&(this.AF=t,this.Nn&&(this.Kc=!1,this.va(6))),this):this.AF},$.g.KB=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)&&(0,window.isNaN)(this.jt)||t==this.jt||(this.jt=t,this.min=window.NaN,this.Pn=!0,this.Kc=!1,this.va(4)),this):this.jt},$.g.JB=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)&&(0,window.isNaN)(this.Lq)||t==this.Lq||(this.Lq=t,this.max=window.NaN,this.Nn=!0,this.Kc=!1,this.va(4)),this):this.Lq},$.g.Qs=function(t){return $.p(t)?(t=+t||0,this.HI!=t&&(this.HI=t,this.Pn&&(this.Kc=!1,this.va(2))),this):this.HI},$.g.Os=function(t){return $.p(t)?(t=+t||0,this.BI!=t&&(this.BI=t,this.Nn&&(this.Kc=!1,this.va(2))),this):this.BI},$.g.oN=function(){this.Kc=!1},$.g.Co=function(){this.Aia=this.dA,this.zia=this.cA,this.dA=window.Infinity,this.cA=-window.Infinity,this.Kc=this.DX=!1},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++){var i=+arguments[e];(0,window.isNaN)(i)&&(i=(0,window.parseFloat)(arguments[e])),(0,window.isNaN)(i)||(this.DX=!0,i<this.dA&&(this.dA=i,this.Kc=!1),i>this.cA&&(this.cA=i,this.Kc=!1))}return this},$.g.IC=function(t){var e=this.Aia!=this.dA||this.zia!=this.cA;return e&&(this.Kc=!1,t||this.va(2)),e},$.g.Of=function(){return this.Pn||this.Nn},$.g.transform=function(t){return this.pb(),Number(this.Oq.transform(t))},$.g.pb=function(){this.Kc||(this.Kc=!0,this.dT(),this.sJ(),this.ex())},$.g.sJ=function(){},$.g.ex=function(){this.Oq||(this.Oq=new Ps);var t=this.cK*this.$B;t=[-t,this.$B-t],this.PD&&t.reverse(),this.Oq.xe(t)},$.g.dT=function(){var t=!this.Pn,e=!this.Nn,i="percent"==this.jn();t&&this.Xc(this.min),e&&this.Xc(this.max),this.DX||(this.dA=0,this.cA=i?100:1);var n=t?this.min:this.dA,s=e?this.max:this.cA;if(!t&&n>=this.jt&&(n=this.jt,t=!0),!e&&s<=this.Lq&&(s=this.Lq,e=!0),$.Wm(n,s,1e-6)){if(n==s)var a=.5;else a=n.toExponential().split("e")[1],a=+("1e-"+Math.max(Math.abs(a)+1,5));e?n-=2*a:t?s+=2*a:(n-=a,s+=a)}i&&(t=e=!0),t=this.Nz(n,s,!t,!e,this.GJ,!0),this.min=t.min,this.max=t.max,this.Lx=t.Lx||0},$.g.Nz=function(t,e,i,n,s,a){var o=e-t,r=o*this.HI;return o*=this.BI,{max:n?mt(e,o,s,a,1):e,min:i?mt(t,r,s,a,-1):t}},$.g.Mc=function(t){return this.pb(),this.Oq.Mc(t)},$.g.F=function(){var t=$.kt.u.F.call(this);return t.maximum=this.Nn?null:this.max,t.minimum=this.Pn?null:this.min,t.minimumGap=this.Qs(),t.maximumGap=this.Os(),t.softMinimum=(0,window.isNaN)(this.jt)?null:this.jt,t.softMaximum=(0,window.isNaN)(this.Lq)?null:this.Lq,t.softMaximum=(0,window.isNaN)(this.Lq)?null:this.Lq,t.alignMinimum=this.BF,t.alignMaximum=this.AF,t.maxTicksCount=this.cl,t},$.g.U=function(t,e){$.kt.u.U.call(this,t,e),this.Qs(t.minimumGap),this.Os(t.maximumGap),this.KB(t.softMinimum),this.JB(t.softMaximum),this.uh(t.minimum),this.di(t.maximum),this.XQ(t.alignMinimum),this.WQ(t.alignMaximum),this.an(t.maxTicksCount)};var sF=$.kt.prototype;sF.maxTicksCount=sF.an,sF.minimum=sF.uh,sF.maximum=sF.di,sF.extendDataRange=sF.Xc,$.H($.nt,$.kt),$.g=$.nt.prototype,$.g.zk=function(t){return!$.ps(t)},$.g.Ma=function(){return"date-time"},$.g.Xa=function(t){return this.xh||(this.xh=new Vs(this),$.W(this,"ticks",this.xh),$.K(this.xh,this.li,this)),$.p(t)?(this.xh.N(t),this):this.xh},$.g.yb=function(t){return this.Di||(this.Di=new Vs(this),$.W(this,"minorTicks",this.Di),$.K(this.Di,this.li,this)),$.p(t)?(this.Di.N(t),this):this.Di},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++)$.nt.u.Xc.call(this,Fs(arguments[e]));return this},$.g.ex=function(){$.nt.u.ex.call(this),Qs(this.Oq,[this.min,this.max]),Rs(this.Oq,3)},$.g.sJ=function(){var t=this.Xa().DB(this.min,this.max,this.Pn&&this.BF,this.Nn&&this.AF);this.yb().EB(this.min,this.max,t[0],t[1]),this.Pn&&(this.min=t[0]),this.Nn&&(this.max=t[1])},$.g.li=function(t){$.X(t,2)&&(this.Kc=!1,this.va(2))},$.g.F=function(){var t=$.nt.u.F.call(this);return t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t},$.g.U=function(t,e){$.nt.u.U.call(this,t,e),this.Xa(t.ticks),this.yb(t.minorTicks)},$.g.R=function(){$.sd(this.xh,this.Di),this.Di=this.xh=null,$.nt.u.R.call(this)};var tF=$.nt.prototype;$.E("anychart.scales.dateTime",$.ht),tF.getType=tF.Ma,tF.ticks=tF.Xa,tF.minorTicks=tF.yb,tF.transform=tF.transform,tF.inverseTransform=tF.Mc,tF.extendDataRange=tF.Xc,tF.softMinimum=tF.KB,tF.softMaximum=tF.JB,tF.alignMinimum=tF.XQ,tF.alignMaximum=tF.WQ,tF.minimumGap=tF.Qs,tF.maximumGap=tF.Os,$.H(pt,$.V),pt.prototype.ra=2;var Jda=new $.En(0,0,1),kca=new $.En(0,0,0,1);$.g=pt.prototype,$.g.C5=function(t){if($.p(t)){if("array"===$.ka(t)){for(var e=[],i=0;7>i;i++){t:{var n=t[i];if("object"===$.ka(n)&&"from"in n&&"to"in n){var s=+n.from;if(s<(n=+n.to)&&0<=s&&24>s&&0<n&&24>=n){s={from:s,to:n};break t}}s=null}e.push(s)}t=e.length?e:null}else t=null;if(this.b=t,this.D={},this.o={},this.b)for(t=0;t<this.b.length;t++)this.b[t]||(this.o[String(t)]=!0);else this.o=ot(this.G);return this.va(2),this}return this.b},$.g.HA=function(t){if($.p(t)){if("array"===$.ka(t)){for(var e=[],i=0;i<t.length;i++){t:{var n=t[i];if("object"===$.ka(n)&&"day"in n&&"month"in n){var s=+n.day,a=+n.month;if(!(0,window.isNaN)(s)&&0<=a&&12>a){s={day:s,month:a},"year"in n&&(a=+n.year,(0,window.isNaN)(a)||(s.year=a)),"label"in n&&(s.label=String(n.label)),n=s;break t}}n=null}n&&e.push(n)}t=e.length?e:null}else t=null;if(this.f=t,this.i={UY:{},MS:{}},this.D={},this.f)for(t=0;t<this.f.length;t++)e=(i=this.f[t]).year,i=($.p(e)?e+"-":"")+String(i.month)+"-"+String(i.day),$.p(e)?this.i.MS[i]=!0:this.i.UY[i]=!0;return this.va(2),this}return this.f},$.g.vD=function(t,e){var i=$.Xk(t),n=$.Xk(e),s=[];if((0,window.isNaN)(i)||(0,window.isNaN)(n))return s;i=$.Uo(i,"day",1,i),i=new Date(i);for(var a=(i=new $.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate())).getTime();a<n;){i.add(Jda);var o=i.getTime(),r=o-1e3,l=new Date(a),h=l.getUTCFullYear(),c=l.getUTCMonth(),u=l.getUTCDate(),d=l.getUTCDay();l=($.p(h)?h+"-":"")+c+"-"+u;var p=this.D[l];if(!$.p(p)){var g=!!this.o[d];p={isHoliday:!(!this.i.UY[($.p(void 0)?"undefined-":"")+c+"-"+u]&&!this.i.MS[l]),isWeekend:g,start:a,end:r,workingIntervals:[],notWorkingIntervals:[]},g?p.notWorkingIntervals.push({from:a,to:r}):(a=p,r=d,this.b&&(h=new $.On(h,c,u),u=this.b[r])&&(c=u.from,u=u.to,r=h.getTime(),r=qt(r,h,c,a.notWorkingIntervals),r=qt(r,h,u-c,a.workingIntervals),qt(r,h,24-u,a.notWorkingIntervals))),this.D[l]=p}l=p,s.push(l),a=o}return s},$.g.F=function(){var t=pt.u.F.call(this);return this.b&&!$.Jc(this.b)&&(t.schedule=JSON.parse(JSON.stringify(this.b))),this.f&&!$.Jc(this.f)&&(t.holidays=JSON.parse(JSON.stringify(this.f))),t},$.g.U=function(t,e){pt.u.U.call(this,t,e),"schedule"in t&&this.C5(t.schedule),"holidays"in t&&this.HA(t.holidays)};var uF=pt.prototype;uF.schedule=uF.C5,uF.holidays=uF.HA,uF.getWorkingSchedule=uF.vD,$.H($.st,$.V),$.st.prototype.ra=6;var mca=200,lca=[[{unit:"minute",count:10},{unit:"hour",count:1},{unit:"day",count:1}],[{unit:"hour",count:2},{unit:"day",count:1},{unit:"month",count:1}],[{unit:"day",count:1},{unit:"week",count:1},{unit:"month",count:1}],[{unit:"month",count:1},{unit:"quarter",count:1},{unit:"year",count:1}],[{unit:"quarter",count:1},{unit:"year",count:1},{unit:"year",count:10}]];$.g=$.st.prototype,$.g.Ma=function(){return"gantt"},$.g.dL=ba(7),$.g.Uj=function(){return(0,window.isNaN)(this.$e)&&(0,window.isNaN)(this.Ze)&&(0,window.isNaN)(this.Ph)&&(0,window.isNaN)(this.Oh)},$.g.reset=function(){this.Oh=this.Ph=this.Fj=this.Gj=this.Ze=this.$e=window.NaN,this.Kc=!1},$.g.Jr=function(t,e){return t=$.Xk(t),e=$.Xk(e),this.$e==t&&this.Ze==e||(0,window.isNaN)(e)||(0,window.isNaN)(t)||($.Et(this),this.$e=t,this.Ze=e,this.Kc=!1,this.pb(),this.va(4)),this},$.g.Qm=function(){if(this.Uj())this.m4=!0;else{this.m4=!1;var t=this.bm.isPixels,e=this.am.isPixels;t&&e?wt(this):t?xt(this,!0):e?xt(this,!1):this.uj(),this.$e=this.Gj,this.Ze=this.Fj,this.Kc=!0,this.va(4)}return this},$.g.Vr=function(t,e){var i=1/(t||1.25),n=$.p(e)?e:.5;if($.Et(this),!this.Uj()){var s=this.Ze-this.$e,a=this.$e-Math.round(s*(i-1)*n);i=this.Ze+Math.round(s*(i-1)*(1-n)),6e4>=Math.abs(a-i)&&(a=(i=(this.$e+this.Ze)/2)-3e4,i+=3e4),this.Jr(a,i)}return this},$.g.Wr=function(t,e){var i=t||1.25,n=$.p(e)?e:.5;if($.Et(this),!$.yt(this)||!$.zt(this)){var s=this.$e-Math.round((this.Ze-this.$e)*(i-1)*n);if(i=this.Ze+Math.round((this.Ze-this.$e)*(i-1)*(1-n)),this.uj(),$.Dt(this)){if(n=this.Xq.ob().width,this.bm.isPixels){var a=$.vt(this.bm.value,n);this.Gj=this.Ph-Math.round((a/n||0)*(i-s))}this.am.isPixels&&(a=$.vt(this.am.value,n),this.Fj=this.Oh+Math.round((a/n||0)*(i-s)))}if(s<this.Gj||i>this.Fj){if(s<this.Gj&&i>this.Fj)return this.Qm(),this;s<this.Gj&&this.Jr(this.Gj,i+(this.Gj-s)),i>this.Fj&&this.Jr(s-(i-this.Fj),this.Fj)}else this.Jr(s,i)}return this},$.g.kj=function(t,e,i){if($.Dt(this)&&$.ea(t)&&$.ea(e)){i=this.bm.isPixels;var n=this.am.isPixels;if(i&&n?wt(this):i?xt(this,!0):n&&xt(this,!1),n=this.Oh-this.Ph,(i=e-t)>=this.Fj-this.Gj)this.$e=this.Gj,this.Ze=this.Fj;else{this.$e=Math.min(t,e),this.Ze=Math.max(t,e);var s=$.At(this,n,this.bm),a=$.At(this,n,this.am);s=(0,window.isNaN)(this.$m)?(0,window.isNaN)(this.Ko)?this.Ph-s:Math.min(this.Ko,this.Ph):this.$m,a=(0,window.isNaN)(this.Zm)?(0,window.isNaN)(this.Jo)?this.Oh+a:Math.max(this.Jo,this.Oh):this.Zm,t<s?(this.$e=s,this.Ze=this.$e+i):e>a&&(this.Ze=a,this.$e=this.Ze-i)}this.Gj=s,this.Fj=a,this.Kc=!0,this.Uj()&&(this.QI=!0,this.MI=[t,e]),this.va(4),t=this}else t:{if(this.pb(),$.z(t)){if(0===e){t=this;break t}switch(a=$.zk(yda,i,$.p(void 0)?void 0:"first-visible-date"),s=$.Vo($.Zk(t,"day"),e||1),a){case"first-date":n=this.Ph;break;case"last-date":n=this.Oh,s=s.b(-1);break;case"last-visible-date":n=this.Ze,s=s.b(-1);break;case"first-visible-date":n=this.$e}n=new $.On($.ps(n)),a=$.Xk(n),n.add(s),n=$.Xk(n),s=Math.min(a,n),a=(n=Math.max(a,n))-s}else s=t,n=e,$.p(e)?a=e-t:n=t+(a=this.Ze-this.$e);var o=this.uj();a=Math.min(o.max-o.min,a),n>o.max&&(s=(n=o.max)-a),s<o.min&&(n=(s=o.min)+a),this.Uj()&&(this.QI=!0,this.MI=[t,e,i]),t=this.Jr(s,n)}return t},$.g.Px=function(){return!1},$.g.FA=function(t){$.X(t,2)&&this.va(2)},$.g.sj=function(){return this.pb(),this.Uj()?tt(this):{min:this.$e,max:this.Ze}},$.g.uj=function(){if((0,window.isNaN)(this.Gj))if((0,window.isNaN)(this.$m))if((0,window.isNaN)(this.Ko)){var t=((0,window.isNaN)(this.Zm)?(0,window.isNaN)(this.Jo)?this.Oh:Math.max(this.Oh,this.Jo):this.Zm)-this.Ph;t=$.At(this,t,this.bm),this.Gj=this.Ph-t}else this.Gj=Math.min(this.Ko,this.Ph);else this.Gj=this.$m;return(0,window.isNaN)(this.Fj)&&((0,window.isNaN)(this.Zm)?(0,window.isNaN)(this.Jo)?(t=this.Oh-((0,window.isNaN)(this.$m)?(0,window.isNaN)(this.Ko)?this.Ph:Math.min(this.Ph,this.Ko):this.$m),t=$.At(this,t,this.am),this.Fj=this.Oh+t):this.Fj=Math.max(this.Jo,this.Oh):this.Fj=this.Zm),this.Uj()?tt(this):{min:this.Gj,max:this.Fj}},$.g.uh=function(t){return $.p(t)&&(t=$.Xk(t),this.$m!=t&&(this.$m=t,this.Gj=window.NaN,this.Kc=!1,this.va(4))),this.$m},$.g.di=function(t){return $.p(t)&&(t=$.Xk(t),this.Zm!=t&&(this.Zm=t,this.Fj=window.NaN,this.Kc=!1,this.va(4))),this.Zm},$.g.KB=function(t){return $.p(t)&&(t=$.Xk(t),this.Ko!=t&&(this.Ko=t,this.Gj=window.NaN,this.Kc=!1,this.va(4))),this.Ko},$.g.JB=function(t){return $.p(t)&&(t=$.Xk(t),this.Jo!=t&&(this.Jo=t,this.Fj=window.NaN,this.Kc=!1,this.va(4))),this.Jo},$.g.Gla=function(t){return $.p(t)?(this.eQ!==t&&(this.eQ=!!t,this.Kc=!1,this.va(4)),this):this.eQ},$.g.Fla=function(t){return $.p(t)?(this.gF!==t&&(this.gF=!!t,this.Kc=!1,this.va(4)),this):this.gF},$.g.KT=function(t){return $.p(t)?(t=$.Za(t,1,12),this.Qv!=t&&(this.Qv=t,this.Kc=!1,this.va(4)),this):this.Qv},$.g.JT=function(t){return $.p(t)?(t=+t,(0,window.isNaN)(t)||this.XG==t||(this.XG=t,this.Kc=!1,this.va(4)),this):this.XG},$.g.transform=function(t){return $.Ft(this,t)},$.g.Mc=function(t){return $.Gt(this,t)},$.g.vz=function(t){return $.p(t)?((t=rt(t)).length==this.jd.length&&(0,$.lD)(t,(function(t,e){var i=this.jd[e].levels;return t.levels.length==i.length&&(0,$.lD)(t.levels,(function(t,e){return t.unit==i[e].unit&&t.count==i[e].count}))}),this)||(this.jd=t,this.Kc=!1,this.va(516)),this):(0,$.Wa)(this.jd,(function(t){return(0,$.Wa)(t.levels,(function(t){return{unit:t.unit,count:t.count}}))}))},$.g.an=function(t){return $.p(t)?(t=$.P(t,1e3,!1),this.cl!=t&&(this.cl=t,this.Kc=!1,this.va(516)),this):this.cl},$.g.calendar=function(t){return $.p(t)?(this.je!=t&&(this.je&&$.kr(this.je,this.FA,this),(this.je=t)&&$.K(this.je,this.FA,this),this.va(2)),this):(this.je||(this.je=new pt,$.K(this.je,this.FA,this),this.va(2)),this.je)},$.g.Qs=function(t,e){if($.p(t)){var i=Bt(t,e);return Ct(this.bm,i)||(this.bm=i,this.Gj=window.NaN,this.Kc=!1,this.va(4)),this}return this.bm.isPixels?this.bm:this.bm.value},$.g.Os=function(t,e){if($.p(t)){var i=Bt(t,e);return Ct(this.am,i)||(this.am=i,this.Fj=window.NaN,this.Kc=!1,this.va(4)),this}return this.am.isPixels?this.am:this.am.value},$.g.pb=function(){if(!this.Kc&&!this.Uj()){this.Kc=!0;var t=this.uj(),e=t.min;if(t=t.max,(0,window.isNaN)(e)?(0,window.isNaN)(this.$e)||(this.Ph=this.$e):(0,window.isNaN)(this.$e)?this.$e=e:this.$e=Math.max(this.$e,e),(0,window.isNaN)(t)?(0,window.isNaN)(this.Ze)||(this.Oh=this.Ze):(0,window.isNaN)(this.Ze)?this.Ze=t:this.Ze=Math.min(this.Ze,t),this.$e>this.Ze){var i=this.$e-this.Ze;this.$e=Math.max(this.Ze,e),this.Ze=Math.min(this.$e+i,t)}}},$.g.Fn=function(t,e,i,n,s){e=s||this.sj(),s=(t=this.sj()).min;var a=t.max;t=new $.On(new Date(s)),s=a-s;do{a=$.Vo(i,n);var o=t.clone();if(t.add(a),(a=Math.ceil(s/(t.getTime()-o.getTime())))>this.cl)switch(i){case"millisecond":i="second",n=1;break;case"second":59>n?n++:(n=1,i="minute");break;case"minute":59>n?n++:(n=1,i="hour");break;case"hour":23>n?n++:(n=1,i="day");break;case"day":29>n?n++:(n=1,i="month");break;case"month":11>n?n++:(n=1,i="year");break;default:n++}}while(a>this.cl);if(t="week"===i&&(this.eQ||this.gF)){s=e.min,a=n;var r=this.Qv,l=this.gF,h=new Date(s),c=1!==r;o=h.getMonth();var u=h=h.getFullYear();l?r=o:c?(--r,0<=o&&o<r&&(u=h-1)):r=0,s=$.Oo(s,6048e5*a,Date.UTC(u,r,1))}else s=$.Uo(e.min,i,n,2e3);if(a=s,n=$.Vo(i,n),e=e.max,s=[],1<this.Qv&&("year"===i||"semester"===i||"quarter"===i)){if(1<(i=this.Qv)?(o=new Date(a),i=Date.UTC(o.getUTCFullYear(),o.getUTCMonth()+i-1,o.getUTCDate(),o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds())):i=a,i>a){o=n.b(-1);var d=new $.On(new Date(i));do{d.add(o),i=d.getTime()}while(i>a)}}else d=new $.On(new Date(a));for(i=d.getTime(),a=n;i<e;)n=a,t&&(h=11===(o=new Date(i)).getMonth(),u=this.gF,r=this.Qv-1,l=o.getFullYear(),c=o.getMonth(),u?h?(h=0,r=l+1):(h=c+1,r=l):0===r?(h=0,r=l+1):(h=r,r=0<=c&&c<r?l:l+1),n=(o=(Date.UTC(r,h,1)-o)/1e3)<60*(60*(24*n.xg+n.Th)+n.Bj)+n.wh?new $.En(0,0,0,0,0,o):n),o=i,d.add(n),i=d.getTime(),s.push({start:o,end:i});return s},$.g.vD=function(){if(this.je){this.pb();var t=this.sj();return this.je.vD(t.min,t.max)}return[]},$.g.F=function(){var t=$.st.u.F.call(this);if((0,window.isNaN)(this.$e)||(t.visibleMinimum=this.$e),(0,window.isNaN)(this.Ze)||(t.visibleMaximum=this.Ze),(0,window.isNaN)(this.$m)||(t.minimum=this.$m),(0,window.isNaN)(this.Zm)||(t.maximum=this.Zm),(0,window.isNaN)(this.Ko)||(t.softMinimum=this.Ko),(0,window.isNaN)(this.Jo)||(t.softMaximum=this.Jo),(0,window.isNaN)(this.Ph)||(t.dataMinimum=this.Ph),(0,window.isNaN)(this.Oh)||(t.dataMaximum=this.Oh),t.minimumGap=this.bm,t.maximumGap=this.am,t.maxTicksCount=this.cl,t.zoomLevels=this.vz(),1<this.Qv&&(t.fiscalYearStartMonth=this.Qv),this.XG&&(t.fiscalYearOffset=this.XG),this.je){var e=this.je.F();$.Jc(e)||(t.calendar=e)}return t},$.g.U=function(t,e){$.st.u.U.call(this,t,e),this.Qs(t.minimumGap),this.Os(t.maximumGap),"minimum"in t&&this.uh(t.minimum),"maximum"in t&&this.di(t.maximum),"softMinimum"in t&&this.KB(t.softMinimum),"softMaximum"in t&&this.JB(t.softMaximum);var i=!1;"dataMinimum"in t&&(this.Ph=t.dataMinimum,i=!0),"dataMaximum"in t&&(this.Oh=t.dataMaximum,i=!0),"visibleMinimum"in t&&(this.$e=t.visibleMinimum,i=!0),"visibleMaximum"in t&&(this.Ze=t.visibleMaximum,i=!0),"zoomLevels"in t&&this.vz(t.zoomLevels),"fiscalYearStartMonth"in t&&this.KT(t.fiscalYearStartMonth),"fiscalYearOffset"in t&&this.JT(t.fiscalYearOffset),"maxTicksCount"in t&&this.an(t.maxTicksCount),"calendar"in t&&this.calendar().U(t.calendar),i&&(this.Kc=!1,this.pb(),this.va(4))};var vF=$.st.prototype;vF.getRange=vF.sj,vF.getTotalRange=vF.uj,vF.minimum=vF.uh,vF.maximum=vF.di,vF.softMinimum=vF.KB,vF.softMaximum=vF.JB,vF.minimumGap=vF.Qs,vF.maximumGap=vF.Os,vF.fiscalYearStartMonth=vF.KT,vF.fiscalYearOffset=vF.JT,vF.transform=vF.transform,vF.inverseTransform=vF.Mc,vF.zoomLevels=vF.vz,vF.maxTicksCount=vF.an,vF.calendar=vF.calendar,vF.weeksEndWithYear=vF.Gla,vF.weeksCycleMonthly=vF.Fla,$.H($.It,$.V),$.g=$.It.prototype,$.g.ra=2,$.g.Jl=window.NaN,$.g.lh=4,$.g.qm=6,$.g.Il=null,$.g.Hl=null,$.g.Vc=0,$.g.Fm="linear",$.g.RZ=function(t){return $.p(t)?(this.b!=t&&(this.b=t,"logarithmic"!=this.Fm&&this.va(2)),this):this.b},$.g.Oba=function(t){return $.p(t)?(this.Jl!=t&&(0>=(t=$.N(t))?(this.lh=4,this.qm=6,this.Jl=window.NaN):(this.qm=this.lh=window.NaN,this.Jl=+t),this.Hl=this.Il=null,this.va(2)),this):this.Jl},$.g.count=function(t,e){return $.p(t)?(this.lh!=t&&(this.Jl=window.NaN,this.lh=Math.ceil($.N(t)),this.qm=Math.ceil($.N(e)),2<=this.lh||(this.lh=4),this.qm>=this.lh||(this.qm=this.lh),this.Hl=this.Il=null,this.va(2)),this):[this.lh,this.qm]},$.g.eF=ba(9),$.g.XF=function(t){return $.p(t)?(t=+t||0,this.Vc!=t&&(this.Vc=t,this.Hl=null,this.Il||this.va(2)),this):this.Vc},$.g.set=function(t){return $.Ta(this.Il,t)||(this.Jl=this.qm=this.lh=window.NaN,this.Il=$.Ja(t,0),$.Ka(this.Il),$.Pa(this.Il,$.po),this.Hl=null,this.va(2)),this},$.g.get=function(){var t=this.dk();return(0,$.Ye)(t,(function(t){return 0<=(t=this.transform(t))&&1>=t}),this.qa)},$.g.dk=function(){if(this.Il)var t=this.Il;else this.qa.pb(),t=this.Hl;return t||[]},$.g.mode=function(t){return $.p(t)?(t="log"==(t=String(t).toLowerCase())||"logarithmic"==t?"logarithmic":"linear",this.Fm!=t&&(this.Hl=null,this.Fm=t,this.Il||this.va(2)),this):this.Fm},$.g.DB=function(t,e,i,n,s,a){return this.Il?(this.Hl=null,s=[t,e],i&&(s[0]=Math.min(t,this.Il[0]||0)),n&&(s[1]=Math.max(e,this.Il[this.Il.length-1]||0))):(t="logarithmic"==this.Fm?nca(this,t,e,s||10,a||0,!!i,!!n):Jt(this,t,e,!!i,!!n,this.b,this.Vc),this.Hl=t.Xa,s=t.result),s},$.g.EB=function(t,e,i,n,s){if(this.Il)this.Hl=null;else if(this.Hl?this.Hl.length=0:this.Hl=[],!(2>t.length)){e=e||10;var a="logarithmic"==this.Fm,o=a?this.R$:this.Nba,r=t.length-1,l=this.Jl,h=this.lh;if(!(0,window.isNaN)(this.Jl)){var c=t[r],u=t[0];a&&(u=$.Xm(u,e),c=$.Xm(c,e)),(c-u)/this.Jl>this.qa.an()&&($.kl(20,null,[c-u,this.Jl]),this.Jl=window.NaN,this.lh=4)}for($.p(i)?(u=t[0],c=t[1],o.call(this,u,c,i,c,this.lh,e,s||0,!0),u=1):u=0,$.p(n)&&r--,i=u;i<=r-1;i++)u=t[i],c=t[i+1],o.call(this,u,c,u,c,this.lh,e,s||0);$.p(n)&&(u=t[r],c=t[r+1],o.call(this,u,c,u,n,this.lh,e,s||0)),this.Jl=l,this.lh=h}},$.g.Nba=function(t,e,i,n,s,a,o,r){Kt(this,t,e,Lt(this,i,n,s),this.Hl[this.Hl.length-1],this.Hl,r)},$.g.R$=function(t,e,i,n,s,a,o){function r(t){return 0>t?-l(-t+o-1):t?l(t+o-1):0}function l(t){return Ym(a,t)}var h=$.Xm(Math.abs(i),a),c=$.Xm(Math.abs(n),a),u=$.Xm(Math.abs(t),a),d=$.Xm(Math.abs(e),a);n*=i,i=!1,0<n?0<t?r=l:(t=c,c=h,h=t,t=d,d=u,u=t,r=function(t){return-l(t)},i=!0):(u=-(u-o+1),d-=o-1,h=-(h-o+1),c-=o-1,n||(e?u=h=0:d=c=0)),s=Kt(this,u,d,Lt(this,h,c,s),window.NaN),s=(0,$.Wa)(s,r),i&&s.reverse(),this.Hl[this.Hl.length-1]==s[0]&&s.shift(),this.Hl=$.Ga(this.Hl,s)},$.g.F=function(){var t=$.It.u.F.call(this);return t.mode=this.Fm,t.base=this.Vc,t.allowFractional=this.b,this.Il?t.explicit=this.Il:(this.lh==this.qm?(0,window.isNaN)(this.lh)||(t.count=this.lh):((0,window.isNaN)(this.lh)||(t.minCount=this.lh),(0,window.isNaN)(this.qm)||(t.maxCount=this.qm)),(0,window.isNaN)(this.Jl)||(t.interval=this.Jl)),t},$.g.Ie=function(t,e){return!!$.A(e)&&(this.set(e),!0)},$.g.U=function(t,e){$.It.u.U.call(this,t,e),this.mode(t.mode),this.XF(t.base),this.Il=t.explicit||null,this.lh=$.N(t.count)||$.N(t.minCount)||window.NaN,this.qm=$.N(t.count)||$.N(t.maxCount)||window.NaN,this.Jl=$.N(t.interval)||window.NaN,this.RZ(t.allowFractional),this.Il?this.lh=this.qm=this.Jl=window.NaN:this.Jl?this.lh=this.qm=window.NaN:(this.lh=Math.ceil($.N(this.lh)),this.qm=Math.ceil($.N(this.qm)),2<=this.lh||(this.lh=4),this.qm>=this.lh||(this.qm=this.lh))};var wF=$.It.prototype;wF.interval=wF.Oba,wF.allowFractional=wF.RZ,wF.count=wF.count,wF.base=wF.XF,wF.set=wF.set,wF.get=wF.get,wF.mode=wF.mode,$.H($.Mt,$.kt),$.g=$.Mt.prototype,$.g.pL="none",$.g.sS="first-visible",$.g.Ma=function(){return"linear"},$.g.CE=function(t,e){for(var i=this.Xa().dk(),n=0,s=0;s<i.length-1;s++)n=Math.max(n,$.Um($.Vm(i[s+1]-i[s])));return $.Tm(Number(t),n+((0,window.isNaN)(e)?0:Number(e)))},$.g.Xa=function(t){return this.xh||(this.xh=this.ol(),$.W(this,"ticks",this.xh)),$.p(t)?(this.xh.N(t),this):this.xh},$.g.yb=function(t){return this.Di||(this.Di=this.ol(),$.W(this,"minorTicks",this.Di),this.Di.ka(),this.Di.count(5),this.Di.da(!1)),$.p(t)?(this.Di.N(t),this):this.Di},$.g.rY=function(t){return $.p(t)?((t=!!t)!=this.GJ&&(this.GJ=t,this.Pn||this.Nn)&&(this.Kc=!1,this.va(4)),this):this.GJ},$.g.ex=function(){$.Mt.u.ex.call(this),Qs(this.Oq,[this.min,this.max])},$.g.sJ=function(){var t=this.Pn&&this.min!=this.jt&&this.BF,e=this.Nn&&this.max!=this.Lq&&this.AF;t=this.Xa().DB(this.min,this.max,t,e,this.yw,this.Lx||0),(0,window.isNaN)(t[4])||(this.Lx=t[4]),this.Pn&&(this.min=t[0]),this.Nn&&(this.max=t[1]),e=this.yb();var i=this.Xa().dk();e.EB(i,this.yw,t[2],t[3],this.Lx)},$.g.li=function(t){$.X(t,2)&&(this.Kc=!1,this.va(2))},$.g.ol=function(){var t=new $.It(this);return $.K(t,this.li,this),t},$.g.Vz=function(t){if($.p(t)){if(t=$.zk(EE,t,"none"),this.pL!=t){switch(this.pL=t,this.pL){case"none":this.SK=this.L3;break;case"value":this.SK=this.P3;break;case"percent":this.SK=this.M3}this.va(6)}return this}return this.pL},$.g.x0=function(t){return $.p(t)?(t=$.Yk(t),this.sS!=t&&(this.sS=t,this.va(6)),this):this.sS},$.g.Lz=function(t,e){return this.SK(t,e)},$.g.L3=function(t){return t},$.g.P3=function(t,e){return $.N(t)-e},$.g.M3=function(t,e){return($.N(t)-e)/Math.abs(e||window.NaN)*100},$.g.F=function(){var t=$.Mt.u.F.call(this);return t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t.stackMode=this.jn(),t.stackDirection=this.kx(),t.stickToZero=this.rY(),t.comparisonMode=this.Vz(),t},$.g.U=function(t,e){$.Mt.u.U.call(this,t,e),this.Xa(t.ticks),this.yb(t.minorTicks),this.jn(t.stackMode),this.kx(t.stackDirection),this.rY(t.stickToZero),this.Vz(t.comparisonMode)},$.g.R=function(){$.sd(this.xh,this.Di),this.Di=this.xh=null,$.Mt.u.R.call(this)};var xF=$.Mt.prototype;$.E("anychart.scales.linear",$.ft),xF.transform=xF.transform,xF.inverseTransform=xF.Mc,xF.getType=xF.Ma,xF.ticks=xF.Xa,xF.minorTicks=xF.yb,xF.stackMode=xF.jn,xF.stackDirection=xF.kx,xF.stickToZero=xF.rY,xF.softMinimum=xF.KB,xF.softMaximum=xF.JB,xF.alignMinimum=xF.XQ,xF.alignMaximum=xF.WQ,xF.minimumGap=xF.Qs,xF.maximumGap=xF.Os,xF.comparisonMode=xF.Vz,xF.compareWith=xF.x0,$.H(Nt,$.Mt),$.g=Nt.prototype,$.g.qI=function(t){return $.p(t)?((t=(0,window.isNaN)(+t)?this.yw:+t)!=this.yw&&(this.yw=t,this.va(2)),this):this.yw},$.g.Ma=function(){return"log"},$.g.ex=function(){Nt.u.ex.call(this);var t=this.min,e=this.max,i=this.qI(),n=$.Vm($.Xm(Math.abs(t),i),6),s=$.Vm($.Xm(Math.abs(e),i),6),a=t*e,o=this.Lx;i=Ym(i,o),0<a?(a=Ss[Os](n,s),0>e?(t=[t,-i,i,-t],n=[0,a(o),a(o-2),a(o-2-n)]):(t=[-e,-i,i,e],n=[a(o-2-s),a(o-2),a(o),1])):0>a?(t=[t,-i,i,e],n=[0,(n-o)/(s=s-o+n-o+2),(n-o+2)/s,1]):(s=s-o+n-o+1,e?(t=[-e,-i,i,e],n=[-(s+1)/s,-1/s,1/s,1]):(t=[t,-i,i,-t],n=[0,(s-1)/s,(s+1)/s,(s+s+1)/s])),o=this.Oq.xe(),a=Ts[Os](o[0],o[1]),n=(0,$.Wa)(n,(function(t){return $.Vm(t)})),Qs(this.Oq,t),this.Oq.xe((0,$.Wa)(n,a)),Rs(this.Oq,[2,Os,2])},$.g.Nz=function(t,e,i,n,s,a){s=this.qI();var o=$.Xm(Math.abs(t),s),r=$.Xm(Math.abs(e),s),l=Math.min(Math.floor(o),Math.floor(r),0);if(i||n){var h=t*e;0<h?0<t?i=Nt.u.Nz.call(this,o,r,i,n,!1,!1):(n=(i=Nt.u.Nz.call(this,r,o,n,i,!1,!1)).max,i.max=i.min,i.min=n):0>h?(2>r-l+o-l&&l--,(i=Nt.u.Nz.call(this,-(o-(l-1)),r-(l-1),i,n,!1,!1)).min=-i.min+l-1,i.max+=l-1):e?(i=Nt.u.Nz.call(this,0,r-(l-1),!1,n,!1,!1)).max+=l-1:(i=Nt.u.Nz.call(this,-(o-(l-1)),0,i,!1,!1,!1)).min=-i.min+l-1,i={max:Ym(s,i.max)*$.fb(e),min:Ym(s,i.min)*$.fb(t),Lx:l},a&&(i.min=$.Vm(i.min),i.max=$.Vm(i.max))}else i={min:t,max:e,Lx:l};return i},$.g.F=function(){var t=Nt.u.F.call(this);return t.logBase=this.qI(),t},$.g.U=function(t,e){Nt.u.U.call(this,t,e),this.qI(t.logBase)};var yF=Nt.prototype;$.E("anychart.scales.log",$.gt),yF.getType=yF.Ma,yF.transform=yF.transform,yF.inverseTransform=yF.Mc,yF.logBase=yF.qI,$.H($.Ot,$.V),$.g=$.Ot.prototype,$.g.ra=2,$.g.Ex=window.NaN,$.g.Wf=null,$.g.Iz=null,$.g.jq=null,$.g.Dx=null,$.g.Ok=null,$.g.Jz=100,$.g.IK=function(t){return $.p(t)?(t=$.P(t,window.NaN),(0,window.isNaN)(t)||this.Ex==t||(this.Ex=t,this.Jz=window.NaN,this.Ok=this.Dx=this.jq=this.Iz=null,this.va(2)),this):this.Ex},$.g.jW=function(t){return $.p(t)?(t=$.P(t,window.NaN),(0,window.isNaN)(t)||this.Jz==t||(this.Jz=t,this.Ex=window.NaN,this.Ok=this.Dx=this.jq=this.Iz=null,this.va(2)),this):this.Jz},$.g.set=function(t){return $.Ta(this.jq,t)||(this.jq=$.Ha(t),this.jq=(0,$.Wa)(this.jq,(function(t){return $.N(t)})),$.Pa(this.jq),$.Ka(this.jq),this.jq[0]=0,this.Ok=this.Dx=this.Iz=null,this.va(2)),this},$.g.names=function(t){if($.p(t))return this.Wf!=t&&(this.Wf=t,this.va(2)),this;var e;if(t=this.dk(),this.Wf&&this.Wf.length<t.length||!this.Ok){var i=this.scale.names();for(this.Ok=[],e=0;e<t.length;e++){var n=$.A(t[e])?t[e][0]:t[e],s=this.scale.Yv(n);(0,window.isNaN)(s)?this.Ok.push(n):this.Ok.push(i[s])}}if(this.Wf)for(;this.Wf.length<t.length;)this.Wf.push(this.Ok[this.Wf.length]);for(n=this.Wf||this.Ok,i=Math.min(n.length,t.length),s=[],e=0;e<i;e++){var a=t[e];if($.A(a)){var o=a[0];a=a[1]}else o=a;o=this.scale.transform(o,0),a=this.scale.transform(a,1),0>o&&0>a||1<o&&1<a||s.push(n[e])}return s},$.g.get=function(){return(0,$.Ye)(this.dk(),(function(t){if($.A(t)){var e=t[0];t=t[1]}else e=t;return e=this.transform(e,0),t=this.transform(t,1),!(0>e&&0>t||1<e&&1<t)}),this.scale)},$.g.dk=function(){return this.Iz?this.Iz:this.jq?this.Iz=this.dW(this.jq):(this.Dx||(this.Dx=this.dW(this.j0())),this.Dx||[])},$.g.j0=function(){for(var t=this.scale.values().length,e=(0,window.isNaN)(this.Ex)?Math.ceil(t/this.Jz)||1:this.Ex,i=[],n=0;n<t;n+=e)i.push(n);return i},$.g.dW=function(t){var e=t.length||0,i=this.scale.values(),n=i.length;if(!e||!n)return[];for(var s=[],a=!1,o=0;o<e&&!a;o++){var r=t[o],l=t[o+1];(0,window.isNaN)(l)||l>=n?(l=n-1,a=!0):l--,s.push(r==l?i[r]:[i[r],i[l]])}return s},$.g.eF=ba(8),$.g.F=function(){var t=$.Ot.u.F.call(this);return this.jq?t.explicit=this.jq:(0,window.isNaN)(this.Jz)?(0,window.isNaN)(this.Ex)||(t.interval=this.Ex):t.maxCount=this.Jz,this.Wf&&(t.names=this.Wf),t},$.g.Ie=function(t,e){return!!$.A(e)&&(this.set(e),!0)},$.g.U=function(t,e){$.Ot.u.U.call(this,t,e),"explicit"in t&&t.explicit?this.set(t.explicit):"interval"in t?this.IK(t.interval):"maxCount"in t&&this.jW(t.maxCount),this.Wf=t.names||null,this.Ok=this.Dx=null};var zF=$.Ot.prototype;zF.interval=zF.IK,zF.maxCount=zF.jW,zF.set=zF.set,zF.get=zF.get,zF.names=zF.names,$.H($.Qt,Xs),$.g=$.Qt.prototype,$.g.Ma=function(){return"ordinal"},$.g.zk=function(t){return!$.p(t)},$.g.Xa=function(t){return this.mb||(this.mb=new $.Ot(this),$.W(this,"ticks",this.mb),$.K(this.mb,this.li,this)),$.p(t)?(this.mb.N(t),this):this.mb},$.g.values=function(t,e){if(!$.p(t))return this.ih;if(null===t)this.UF||(this.UF=!0,this.va(4));else{this.UF=!1;var i=$.A(t);this.Co(),i&&t.length?this.Xc.apply(this,t):this.Xc.apply(this,arguments),this.IC(!0)&&this.va(6)}return this},$.g.names=function(t){if($.p(t)){if(null===t)this.Wf=[];else if($.A(t))this.Wf=$.Ha(t);else{if(!$.z(t)||this.Wf==t)return this;this.Wf=t}return this.Sn=null,$.Pt(this.Xa()),this.va(2),this}if($.A(this.Wf)){if(this.Sn||(this.Sn=$.Ha(this.Wf)),this.Sn.length<this.ih.length)for(;this.Sn.length!=this.ih.length;)this.Sn.push(this.ih[this.Sn.length]);return this.Sn}return this.Ok||[]},$.g.Px=function(){if(!this.Or.length)return!1;for(var t=1;t<this.Or.length&&this.Or[t]==this.Or[0];t++);return t!=this.Or.length},$.g.MY=function(t){if($.p(t))return $.Rt(this,t),this.WR=!this.Or.length,this;if(this.Ww.length!=this.ih.length){for(var e=t=this.Ww.length=0,i=Math.min(this.Or.length,this.ih.length),n=!1,s=0;s<i;s++){var a=$.N(this.Or[s]);0<=a?(t+=a,e++,this.Ww.push(a)):(n=!0,this.Ww.push(void 0))}if(i<this.ih.length||n)for(t=0<e?t/e:1,e=0;e<this.ih.length;e++)this.Ww[e]||(this.Ww[e]=t)}return this.Ww},$.g.Yv=function(t){return t=+this.XB[$.qo(t)],(0,window.isNaN)(t)?window.NaN:t},$.g.Co=function(){this.s4=this.ih,this.ih=[],this.XB={},this.Sn=this.Ok=null,this.Ww.length=0,this.oz.length=0,this.mb&&$.Pt(this.mb)},$.g.IC=function(t){var e=!$.Ta(this.s4,this.ih);return e&&(this.mb&&$.Pt(this.mb),t||this.va(2)),e},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++){var i=arguments[e],n=$.qo(i);$.p(this.XB[n])||(this.XB[n]=this.ih.length,this.ih.push(i))}return this},$.g.Of=function(){return this.UF},$.g.sD=function(){return 1/this.ih.length*this.vH()},$.g.mode=function(t){return $.p(t)?(t=$.zk(Hda,t,"discrete"),this.Fm!=t&&(this.Fm=t,this.va(6)),this):this.Fm},$.g.transform=function(t,e){var i=this.Yv(t);if((0,window.isNaN)(i))return window.NaN;if(this.Px())i=(e||0)*$.St(this)[i]+this.YJ[i];else{var n=this.ih.length;i=i/n+(e||0)/n,"continuous"===this.Fm&&(i=$.Za((i*n-.5)/(n-1),0,1))}return n=(i-this.cK)*this.$B,this.PD?1-n:n},$.g.Mc=function(t){if(t=Zs(this,t),this.Px()){$.St(this);for(var e=1;e<this.YJ.length&&!(t<=this.YJ[e]);e++);t=e-1}else"continuous"===this.Fm&&(t=(t*((e=this.ih.length)-1)+.5)/e),t=$.Za(Math.ceil(t*this.ih.length)-1,0,this.ih.length-1);return this.ih[t]},$.g.li=function(t){$.X(t,2)&&this.va(2)},$.g.F=function(){var t=$.Qt.u.F.call(this);return this.UF||(t.values=this.values()),t.ticks=this.Xa().F(),this.Wf.length&&(t.names=this.Wf),!this.WR&&this.Px()&&(t.weights=this.Or),t.mode=this.Fm,t},$.g.U=function(t,e){$.Qt.u.U.call(this,t,e),this.values(t.values),this.Xa(t.ticks),this.names(t.names),this.MY(t.weights),this.mode(t.mode)},$.g.R=function(){$.qd(this.mb),$.Qt.u.R.call(this)};var AF=$.Qt.prototype;$.E("anychart.scales.ordinal",$.it),AF.getType=AF.Ma,AF.transform=AF.transform,AF.inverseTransform=AF.Mc,AF.ticks=AF.Xa,AF.values=AF.values,AF.names=AF.names,AF.extendDataRange=AF.Xc,AF.weights=AF.MY,$.g=Ut.prototype,$.g.mapping=function(t){if($.p(t)){if($.C(t))for(var e in this.Zc.length=0,t){var i=t[e];$.ea(i)&&(this.Zc[i]=e)}return this}return this.Zc},$.g.getData=function(){return this.la},$.g.Tw=function(){this.la.push(this.f),this.f={},this.b=!1},$.g.fX=function(t,e){var i=this.Zc[t];i=$.p(i)?i:"column"+t,null===e||(this.f[i]=e),this.b=!0},$.g.start=function(){this.la=[],this.f={},this.b=!1},$.g.Kd=$.ia,$.g.AK=function(){this.b&&this.Tw()},$.g=Vt.prototype,$.g.V0=function(){return!0},$.g.Y0=function(){return!0},$.g.reset=function(){return this.f.length=1,this.f[0]=-1,this.b=void 0,this.o=-1,this},$.g.current=function(){return this.b},$.g.Dfa=function(){return this.o},$.g.get=function(t){if(this.b)return this.b.get(t)},$.g.set=function(t,e){return this.b&&this.b.set(t,e),this},$.g.j=function(t,e){return 1<arguments.length?(this.b&&this.b.j(t)!=e&&this.b.j(t,e),this):this.b?this.b.j(t):void 0},$.g.bO=function(t){return $.p(t)?($.D(t)?this.D=t:this.D=this.V0,this):this.D},$.g.S6=function(t){return $.p(t)?($.D(t)?this.i=t:this.i=this.Y0,this):this.i},$.g.advance=function(){var t=Wt(this,Xt(this));return t&&(this.b=t),!!t},$.g.uC=function(){this.reset();for(var t=[];this.advance();)t.push(this.current());return t};var BF=Vt.prototype;BF.reset=BF.reset,BF.current=BF.current,BF.get=BF.get,BF.set=BF.set,BF.meta=BF.j,BF.getDepth=BF.Dfa,BF.advance=BF.advance,BF.toArray=BF.uC,BF.nodeYieldCondition=BF.bO,BF.traverseChildrenCondition=BF.S6,$.H($.Yt,$.V),$.g=$.Yt.prototype,$.g.ra=48|$.V.prototype.ra,$.g.oO=function(t){var e={};$.Sc(e,t),e.dataItem&&$.J(e.dataItem,$.du)&&(e.dataItem=nu(e.dataItem,this)),this.dispatchEvent(e)},$.g.oja=function(t){this.va(t.f)},$.g.pr=function(){return this.Zc},$.g.aw=function(){return new Vt(this)},$.g.search=function(t,e,i){return(t=this.Eo(t,e,i)).length?1==t.length?t[0]:t:null},$.g.Eo=function(t,e,i){for(t=this.Zc[t]||t,t=this.Ld.Eo(t,e,i),e=[],i=0;i<t.length;i++)e.push(nu(t[i],this));return e},$.g.filter=function(t){var e=this.aw();return e.bO(t),e.uC()},$.g.Yr=function(t,e,i){return this.Ld.Yr(t,e,i),this},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){return this.Ld.Eg(t,e),this.xd(e)},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){return(t=this.Ld.Cj(t))?nu(t,this):null},$.g.Gi=function(){return this.Ld.Gi(),this},$.g.Kf=function(t){return this.Ld.Kf(t)},$.g.Sl=function(){for(var t,e=this.Ld.bc(),i=[],n=0;n<e;n++)t=this.Ld.xd(n),i.push(nu(t,this));return i},$.g.Uv=function(){return this.Sl()},$.g.bc=function(){return this.Ld.bc()},$.g.xd=function(t){if(t=this.Ld.xd(t))return nu(t,this)},$.g.F=function(){var t=this.Ld.F();return t.mapping=this.Zc,t},$.g.xB=function(t){return(t=this.Ld.xB(t)).mapping=this.Zc,t},$.g=$.$t.prototype,$.g.Pq=function(){return this.Tk.Pq()},$.g.ND=ba(11),$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){return this.Tk.Eg(t,e),this},$.g.remove=function(){return this.ee?this.ee.removeChild(this):this.Su.removeChild(this),this},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){return(t=this.Tk.Cj(t))?nu(t,this.Su):null},$.g.Gi=function(){return this.Tk.Gi(),this},$.g.Kf=function(t){return this.Tk.Kf(t)},$.g.Sl=function(){for(var t,e=this.Tk.bc(),i=[],n=0;n<e;n++)t=this.Tk.xd(n),i.push(nu(t,this.Su));return i},$.g.Uv=function(){return this.Sl()},$.g.bc=function(){return this.Tk.bc()},$.g.xd=function(t){if(t=this.Tk.xd(t))return nu(t,this.Su)},$.g.get=function(t){if(arguments.length){var e=this.Su.pr(),i=arguments[0],n=[];return $.A(i)?n=i:$.z(i)&&(n=arguments),i=(0,$.Wa)(n,(function(t){return e[t]||t})),this.Tk.get(i)}},$.g.set=function(t){if(arguments.length){var e=this.Su.pr(),i=[],n=[],s=0,a=arguments[0];if($.A(a)){if(a=(n=a)[0],1<n.length&&$.z(a))if(1<arguments.length)var o=arguments[1];else o=n[n.length-1],s=1}else $.z(a)&&1<arguments.length&&(o=(n=arguments)[n.length-1],s=1);for(a=0;a<n.length-s;a++)i[a]=e[n[a]]||n[a];i.push(o),this.Tk.set.apply(this.Tk,i)}return this},$.g.fr=function(t){if(arguments.length){var e=this.Su.pr(),i=arguments[0],n=[];$.A(i)?n=i:$.z(i)&&(n=arguments),i=(0,$.Wa)(n,(function(t){return e[t]||t})),this.Tk.fr(i)}return this},$.g.DD=ba(13),$.g.j=function(t,e){return 1<arguments.length?this.Jk(t,e):this.no(t)},$.g.no=function(t){if(arguments.length){var e,i=arguments[0];if($.A(i)?e=i:$.z(i)&&(e=arguments),$.p(e)){var n,s=this.Ci;for(n=0;n<e.length&&(i=e[n],$.C(s)||$.A(s));n++){if(n==e.length-1)return s[i];s=s[i]}}}},$.g.Jk=function(t){if(arguments.length){var e=arguments[0],i=0,n=[];if($.A(e)){var s=e;if(e=s[0],1<s.length&&$.z(e))if(1<arguments.length)var a=arguments[1];else a=s[s.length-1],i=1}else $.z(e)&&1<arguments.length&&(a=(s=arguments)[s.length-1],i=1);if($.p(s)){var o=this.Ci,r=s[0];n.push(r);var l=o[r];for(e=1;e<s.length-i;e++){var h=s[e];if(!$.ea(h)&&!$.z(h))return this}for(e=1;e<s.length-i;e++)if(h=s[e],n.push(h),$.ea(h))if($.p(l)){if(!$.A(l))return this;l=(o=l)[h],r=h}else o[r]=[],l=o[h],o=o[r],r=h;else{if(!$.z(h))return this;if($.p(l)){if(!$.C(l))return this;l=(o=l)[h],r=h}else o[r]={},l=o[h],o=o[r],r=h}o[r]!=a&&(o[r]=a,this.Su.va(32,void 0,{item:this}))}}return this},$.g.getParent=function(){return this.ee},$.g.fl=function(t){this.ee=t};var CF=$.Yt.prototype;CF.getTraverser=CF.aw,CF.addData=CF.Yr,CF.search=CF.search,CF.searchItems=CF.Eo,CF.filter=CF.filter,CF.addChild=CF.hc,CF.addChildAt=CF.Eg,CF.getChildren=CF.Sl,CF.numChildren=CF.bc,CF.getChildAt=CF.xd,CF.removeChild=CF.removeChild,CF.removeChildAt=CF.Cj,CF.removeChildren=CF.Gi,CF.indexOfChild=CF.Kf,CF=$.$t.prototype,CF.get=CF.get,CF.set=CF.set,CF.meta=CF.j,CF.del=CF.fr,CF.getParent=CF.getParent,CF.addChild=CF.hc,CF.addChildAt=CF.Eg,CF.getChildren=CF.Sl,CF.numChildren=CF.bc,CF.getChildAt=CF.xd,CF.remove=CF.remove,CF.removeChild=CF.removeChild,CF.removeChildAt=CF.Cj,CF.removeChildren=CF.Gi,CF.indexOfChild=CF.Kf,$.H($.au,$.V),$.g=$.au.prototype,$.g.ra=48,$.g.DG=function(t){return $.p(t)?(this.$C=t,this):this.$C},$.g.va=function(t,e,i){!this.Lo&&16&t&&(this.Ru=null),$.au.u.va.call(this,t,e,i)},$.g.aw=function(){return new Vt(this)},$.g.Yr=function(t,e,i){if($.z(t)){var n=new $.Lm;"object"==$.ka(i)&&(n.lJ(i.rowsSeparator),n.hG(i.columnsSeparator),n.OH(i.ignoreTrailingSpaces),n.MH(i.ignoreFirstRow));var s=new Ut;s.mapping(e),n.pC(t,s),t=s.getData(),e="as-table"}else e=String(e).toLowerCase();switch(this.ka(),e){case"as-table":case"as-table":case"table":case"parentid":case"linear":case"plain":case"db":case"database":case"id":case"parentpointer":case"pointer":var a;n=[],s=[];var o=[];for(this.ka(),e=0,a=t.length;e<a;e++){var r=t[e],l=new $.du(this,r),h=r[this.Zc.id||"id"];if(o.push(l),null!=h)if(h=String(h),0>(r=$.Na(n,h,ro))){var c=~r;$.Da(n,h,c),(r=this.search("id",h))?(r=$.J(r,$.du)?r:r[0],$.Da(s,r,c),r.j("nc",!0),$.kl(1,null,[h])):$.Da(s,l,c)}else $.kl(2,null,[h])}for(e=0;e<o.length;e++)a=o[e],null!=(l=t[e][this.Zc[eu.eC]||eu.eC])?(l=String(l),0>(r=$.Na(n,l,ro))?((r=this.search("id",l))?(r=$.J(r,$.du)?r:r[0],fu(r,a)):(this.Iq.push(a),$.kl(3,null,[l])),ju(this,a)):(r=s[r],fu(r,a),r.j("nc")&&ju(this,a))):(this.Iq.push(a),ju(this,a));o.length&&this.va(16),this.da(!0);break;default:for(this.ka(),e=0,n=t.length;e<n;e++)s=gu(this,t[e]),this.Iq.push(s),ju(this,s);t.length&&this.va(16),this.da(!0)}if("array"==$.ka(i)){for(this.$C=!1,t=0;t<i.length;t++)n=i[t],"object"==$.ka(n)&&(e=n.from,n=n.to,($.z(e)||$.ea(e))&&($.z(n)||$.ea(n))&&(n=this.Eo("id",n)[0]))&&(s=n.get("dependsOn"),$.p(s)?"array"==$.ka(s)&&n.set("dependsOn",s.length,e):n.set("dependsOn",[e]));this.$C=!0}return this.da(!0),this},$.g.DS=function(t,e,i){if(!this.Ad[t])for(this.dI[t]=!!e,this.WS.reset(),this.Ad[t]=[],this.QH[t]=ku(i||ro),this.Ru||(this.Ru=this.WS.uC()),e=0;e<this.Ru.length;e++)hu(this,this.Ru[e],t);return this},$.g.Wja=function(t){return delete this.Ad[t],delete this.dI[t],delete this.QH[t],this},$.g.search=function(t,e,i){return(t=this.Eo(t,e,i)).length?1==t.length?t[0]:t:null},$.g.Eo=function(t,e,i){var n=this.dI[t],s=this.Ad[t];if(s)return i=$.D(i)?ku(i):this.QH[t],n=0<=(e=$.Na(s,n?String(e):e,i))?this.Ad[t][e].value:[],$.A(n)?n:[n];for(n=[],this.Ru||(this.Ru=this.WS.uC()),s=i||ro,i=0;i<this.Ru.length;i++)s(this.Ru[i].get(t),e)||n.push(this.Ru[i]);return n},$.g.find=function(t,e){return this.Eo(t,e)[0]},$.g.filter=function(t){var e=this.aw();return e.bO(t),e.uC()},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){var i=null;$.J(t,$.$t)&&(i=t.Su,t=t.Tk),this.ka();var n=null,s=-1,a=null,o=!0,r=null;return $.J(t,$.du)?((r=t.Pq())&&r!=this&&(a=r,r.ka()),s=(n=t.getParent())?n.Kf(t):r.Kf(t),t.remove()):(o=!1,t=gu(this,t)),e=$.Za(e,0,this.bc()),$.Da(this.Iq,t,e),ju(this,t),t.Pq(this),i&&nu(t,i).fl(null),this.va(16),this.da(!0),r&&r.da(!0),this.$C&&(i={type:o?"treeItemMove":"treeItemCreate",target:null,targetIndex:e,item:t},a&&(i.sourceTree=a),o&&(i.sourceIndex=s,i.source=n),this.dispatchEvent(i)),t},$.g.Sl=function(){return $.Ha(this.Iq)},$.g.Uv=function(){return this.Iq},$.g.bc=function(){return this.Iq.length},$.g.xd=function(t){return this.Iq[t]},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Kf=function(t){return $.J(t,$.$t)&&(t=t.Tk),(0,$.za)(this.Iq,t)},$.g.Cj=function(t){var e=null;return 0<=t&&t<=this.Iq.length&&(e=$.Ca(this.Iq,t,1)[0],iu(this,e,void 0,!0),this.va(16),this.$C&&this.dispatchEvent({type:"treeItemRemove",source:null,sourceIndex:t,item:e})),e},$.g.Gi=function(){if(this.Iq.length){for(var t in this.Iq.length=0,this.Ad)this.Ad[t].length=0;this.va(16)}return this},$.g.F=function(){return this.xB([])},$.g.xB=function(t){for(var e={rootMapping:this.Zc,children:[],index:[]},i=0;i<this.bc();i++){var n=this.xd(i);e.children.push(n.F(t))}for(var s in this.Ad)e.index.push(s);return e},$.g.Yd=function(t){return new $.Yt(this,t||{})},$.g=$.du.prototype,$.g.get=function(t){if(arguments.length){var e,i=arguments[0];if($.A(i)?e=i:$.z(i)&&(e=arguments),$.p(e)){var n,s=this.la;for(n=0;n<e.length&&(i=e[n],n||(i=this.Ld.Zc[i]||i),$.C(s)||$.A(s));n++){if(n==e.length-1)return s[i];s=s[i]}}}},$.g.set=function(t){if(arguments.length){var e=arguments[0],i=0,n=[];if($.A(e)){var s=e,a=s[0];if(1<s.length&&$.z(a))if(1<arguments.length)var o=arguments[1];else o=s[s.length-1],i=1}else $.z(e)&&1<arguments.length&&(a=e,o=(s=arguments)[s.length-1],i=1);if($.p(s)){var r=this.la,l=s[0];l=this.Ld.Zc[l]||l,n.push(l);var h=r[l];for(e=1;e<s.length-i;e++){var c=s[e];if(!$.ea(c)&&!$.z(c))return $.kl(17),this}for(e=1;e<s.length-i;e++)if(c=s[e],n.push(c),$.ea(c))if($.p(h)){if(!$.A(h))return $.kl(17),this;h=(r=h)[c],l=c}else r[l]=[],h=r[c],r=r[l],l=c;else{if(!$.z(c))return $.kl(17),this;if($.p(h)){if(!$.C(h))return $.kl(17),this;h=(r=h)[c],l=c}else r[l]={},h=r[c],r=r[l],l=c}r[l]!=o&&(r[l]=o,iu(this.Ld,this,a),hu(this.Ld,this,a),this.Ld.va(16),this.Ld.DG()&&this.Ld.dispatchEvent({type:"treeItemUpdate",item:this,path:n,field:n[0],value:o}))}else $.kl(17)}return this},$.g.fr=function(t){if(arguments.length){var e=arguments[0];if($.A(e))var i=e,n=i[0];else $.z(e)&&(i=arguments,n=e);if($.p(i)){var s,a=[],o=this.la;for(s=1;s<i.length;s++)if(e=i[s],!$.ea(e)&&!$.z(e))return this;for(s=0;s<i.length&&(e=i[s],a.push(e),$.C(o)||$.A(o));s++)if(s==i.length-1){if(!(e in o))break;var r=o[e];$.A(o)?Ea(o,e):delete o[e],iu(this.Ld,this,n),hu(this.Ld,this,n),this.Ld.va(16),this.Ld.DG()&&this.Ld.dispatchEvent({type:"treeItemUpdate",item:this,path:a,field:a[0],value:r,deleted:r})}else o=o[e]}}return this},$.g.DD=ba(12),$.g.j=function(t,e){return 1<arguments.length?this.Jk(t,e):this.no(t)},$.g.no=function(t){if(arguments.length){var e,i=arguments[0];if($.A(i)?e=i:$.z(i)&&(e=arguments),$.p(e)){var n,s=this.Ci;for(n=0;n<e.length&&(i=e[n],$.C(s)||$.A(s));n++){if(n==e.length-1)return s[i];s=s[i]}}}},$.g.Jk=function(t){if(arguments.length){var e=arguments[0],i=0,n=[];if($.A(e)){var s=e;if(e=s[0],1<s.length&&$.z(e))if(1<arguments.length)var a=arguments[1];else a=s[s.length-1],i=1}else $.z(e)&&1<arguments.length&&(a=(s=arguments)[s.length-1],i=1);if($.p(s)){var o=this.Ci,r=s[0];n.push(r);var l=o[r];for(e=1;e<s.length-i;e++){var h=s[e];if(!$.ea(h)&&!$.z(h))return this}for(e=1;e<s.length-i;e++)if(h=s[e],n.push(h),$.ea(h))if($.p(l)){if(!$.A(l))return this;l=(o=l)[h],r=h}else o[r]=[],l=o[h],o=o[r],r=h;else{if(!$.z(h))return this;if($.p(l)){if(!$.C(l))return this;l=(o=l)[h],r=h}else o[r]={},l=o[h],o=o[r],r=h}o[r]!=a&&(o[r]=a,this.Ld.va(32,void 0,{item:this}))}}return this},$.g.getParent=function(){return this.Y},$.g.hc=function(t){return this.Eg(t,this.bc())},$.g.Eg=function(t,e){var i=null;$.J(t,$.$t)&&(i=t.Su,t=t.Tk),this.Ld.ka();var n=null,s=null,a=-1,o=null,r=!0;return $.J(t,$.du)?((n=t.Pq())&&n!=this.Ld&&(o=n,n.ka()),a=(s=t.getParent())?s.Kf(t):n.Kf(t),t.remove()):(r=!1,t=gu(this.Ld,t)),e=$.Za(e,0,this.bc()),$.Da(this.b,t,e),hu(this.Ld,t,void 0,!0),t.Pq(this.Ld),t.Y=this,i&&nu(t,i).fl(nu(this,i)),this.Ld.va(16),this.Ld.da(!0),n&&n.da(!0),this.Ld.DG()&&(i={type:r?"treeItemMove":"treeItemCreate",target:this,targetIndex:e,item:t},o&&(i.sourceTree=o),r&&(i.sourceIndex=a,i.source=s),this.Ld.dispatchEvent(i)),t},$.g.Sl=function(){return $.Ha(this.b)},$.g.Uv=function(){return this.b},$.g.bc=function(){return this.b.length},$.g.xd=function(t){return this.b[t]},$.g.removeChild=function(t){return this.Cj(this.Kf(t))},$.g.Cj=function(t){var e=null;return 0<=t&&t<=this.b.length&&(e=$.Ca(this.b,t,1)[0],iu(this.Ld,e,void 0,!0),lu(e),this.Ld.DG()&&this.Ld.dispatchEvent({type:"treeItemRemove",source:this,sourceIndex:t,item:e})),e},$.g.Gi=function(){var t=this.b.length;if(t){this.Ld.ka();for(var e=0;e<t;e++){var i=this.b[e];lu(i),iu(this.Ld,i,void 0,!0)}this.Ld.da(!1),this.b.length=0,this.Ld.va(16)}return this},$.g.Kf=function(t){return $.J(t,$.$t)&&(t=t.Tk),(0,$.za)(this.b,t)},$.g.remove=function(){if(this.Y)this.Y.removeChild(this);else{var t=this.Ld.Kf(this);0<=t&&this.Ld.Cj(t)}return this},$.g.Pq=function(t){return $.p(t)?(this.Ld!=t&&mu(this,t),this):this.Ld},$.g.clone=function(t){var e=$.Sl(this.la);delete e[this.Ld.Zc[eu.yx]||eu.yx],delete e[this.Ld.Zc[eu.eC]||eu.eC],e=new $.du(t,e);for(var i=0,n=this.bc();i<n;i++){var s=this.xd(i);e.hc(s.clone(t))}return e},$.g.ND=ba(10),$.g.F=function(t){var e={treeDataItemData:$.Qc(this.la)};if($.p(t)){var i;if(i=t.length)for(var n={},s=0;s<i;s++){var a=t[s];this.Ci.hasOwnProperty(a)&&(n[a]=this.Ci[a])}else n=$.Qc(this.Ci);e.treeDataItemMeta=n}if(n=this.bc())for(e.children=[],i=0;i<n;i++)s=this.xd(i),e.children.push(s.F(t));return e};var DF=$.au.prototype;$.E("anychart.data.tree",$.ou),DF.getTraverser=DF.aw,DF.dispatchEvents=DF.DG,DF.addData=DF.Yr,DF.createIndexOn=DF.DS,DF.removeIndexOn=DF.Wja,DF.search=DF.search,DF.searchItems=DF.Eo,DF.find=DF.find,DF.filter=DF.filter,DF.addChild=DF.hc,DF.addChildAt=DF.Eg,DF.getChildren=DF.Sl,DF.numChildren=DF.bc,DF.getChildAt=DF.xd,DF.removeChild=DF.removeChild,DF.removeChildAt=DF.Cj,DF.removeChildren=DF.Gi,DF.indexOfChild=DF.Kf,DF.mapAs=DF.Yd,DF=$.du.prototype,DF.get=DF.get,DF.set=DF.set,DF.meta=DF.j,DF.del=DF.fr,DF.getParent=DF.getParent,DF.addChild=DF.hc,DF.addChildAt=DF.Eg,DF.getChildren=DF.Sl,DF.numChildren=DF.bc,DF.getChildAt=DF.xd,DF.remove=DF.remove,DF.removeChild=DF.removeChild,DF.removeChildAt=DF.Cj,DF.removeChildren=DF.Gi,DF.indexOfChild=DF.Kf,$.H($.Y,$.V),$.g=$.Y.prototype,$.g.Jc=null,$.g.pO=!1,$.g.fn=null,$.g.ra=98313,$.g.sa=15,$.g.oh=function(t){t.Ju();var e=this.ig(t);return e.gE=t,e.getOriginalEvent=function(){return this.gE},this.dispatchEvent(e)},$.g.Ih=function(){},$.g.ig=function(t){var e,i=t.type;t:{for(e=t.relatedTarget;$.J(e,$.ig);){if($.J(e.tag,$.Y)){e=e.tag;break t}e=e.parent()}e=null}return{type:i,originalEvent:t,target:this,relatedTarget:e||t.relatedTarget,domTarget:t.target,relatedDomTarget:t.relatedTarget,offsetX:t.offsetX,offsetY:t.offsetY,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY,button:t.button,keyCode:t.keyCode,charCode:t.charCode,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,platformModifierKey:t.platformModifierKey,state:t.state}},$.g.O=function(t){if($.p(t)){var e=$.z(t)?$.Lp.getElementById(t):t;if(t=e||null===t,this.pO!=t){this.pO=t;var i=this.rP?this.Jc:null;if(this.ka(),t=2,e){var n=this.Jc&&this.Jc.Ja()&&this.Jc.Ja().rb();this.rP=!1,$.af(e)?this.rP?this.Jc.O(e):(this.Jc=this.O0(),"vml"!=$.kk&&this.Jc.ia().setAttribute("role","presentation"),this.Jc.O(e),this.rP=!0):this.Jc=e,this.fn||$.nb(n,this.Jc&&this.Jc.Ja()&&this.Jc.Ja().rb())||(t|=4)}else this.Jc=null;this.B(t,1),this.da(!0),i&&Rp((function(){if(i.BM){var t=$.cc($.ac.Id(),this,"chart");delete i.BM()[t]}$.qd(i)}),this)}return this}return this.Jc},$.g.O0=function(){var t=$.lk();return t.Ax=!1,t.Xo(),t},$.g.zIndex=function(t){return $.p(t)?(t=+t||0,this.Pa.zIndex!=t&&(this.Pa.zIndex=t,this.B(8,65537)),this):this.ph("zIndex")?this.Pa.zIndex:$.p(this.zh)?this.zh:this.oa.zIndex},$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!==t&&(this.Pa.enabled=t,this.B(1,this.mr()),this.WE&&(this.Pa.enabled?(this.tY&&this.da(!0),this.tY=!1):(this.ka(),this.tY=!0))),this):this.g("enabled")},$.g.mr=function(){return 32777},$.g.da=function(t){var e=this.tY&&2==this.GP;if(e){var i=this.Lo;this.Lo=this.mr(),this.GP--}return $.Y.u.da.call(this,t),e&&(this.ka(),i&&this.va(i)),this},$.g.zc=function(){return!(this.pf()||this.md||(this.enabled()?this.O()?(this.I(1),0):(this.remove(),this.I(2),this.pO||$.il(1),1):(this.J(1)&&(this.remove(),this.I(1),this.B(2)),1)))},$.g.remove=$.ia,$.g.ja=function(t,e,i,n){if($.p(t)){if(null===t)this.fn&&(this.fn=null,this.uo());else if($.J(t,$.I))var s=t.left,a=t.top,o=t.width,r=t.height;else $.C(t)?(s=t.left,a=t.top,o=t.width,r=t.height):(s=t,a=e,o=i,r=n);return s=$.N(s),a=$.N(a),o=$.N(o),r=$.N(r),(0,window.isNaN)(s)||(0,window.isNaN)(a)||(0,window.isNaN)(o)||(0,window.isNaN)(r)||this.fn&&this.fn.left==s&&this.fn.top==a&&this.fn.width==o&&this.fn.height==r||(this.fn?(this.fn.left=s,this.fn.top=a,this.fn.width=o,this.fn.height=r):this.fn=$.kn(s,a,o,r),this.uo()),this}return this.fn?this.fn.clone():this.Jc&&(l=this.Jc.Ja())?$.fa.isNodeJS?$.nn($.fa.defaultBounds):l.rb():null;var l},$.g.uo=function(){this.B(4,9)},$.g.gr=function(){return!0},$.g.Eu=function(t,e,i,n){var s=$.eq.exports;s?s.Eu(this,this.Jc,t,e,i,n):$.il(4,null,["Exporting"])},$.g.Yw=function(t,e,i,n,s){var a=$.eq.exports;a?a.Yw(this,this.Jc,t,e,i,n,s):$.il(4,null,["Exporting"])},$.g.Zw=function(t,e,i,n,s){var a=$.eq.exports;a?a.Zw(this,this.Jc,t,e,i,n,s):$.il(4,null,["Exporting"])},$.g.$w=function(t,e,i){var n=$.eq.exports;n?n.$w(this,this.Jc,t,e,i):$.il(4,null,["Exporting"])},$.g.Nq=function(t,e){var i=$.eq.exports;return i?i.Nq(this,this.Jc,t,e):($.il(4,null,["Exporting"]),"")},$.g.Hu=function(t,e,i,n,s,a,o){var r=$.eq.exports;r?r.Hu(this,this.Jc,t,e,i,n,s,a,o):$.il(4,null,["Exporting"])},$.g.FB=function(t,e,i,n,s,a,o,r){var l=$.eq.exports;l?l.FB(this,this.Jc,t,e,i,n,s,a,o,r):$.il(4,null,["Exporting"])},$.g.HB=function(t,e,i,n,s,a){var o=$.eq.exports;o?o.HB(this,this.Jc,t,e,i,n,s,a):$.il(4,null,["Exporting"])},$.g.GB=function(t,e,i,n,s,a,o,r){var l=$.eq.exports;l?l.GB(this,this.Jc,t,e,i,n,s,a,o,r):$.il(4,null,["Exporting"])},$.g.zA=function(t,e,i,n,s){var a=$.eq.exports;a?a.zA(this,this.Jc,t,e,i,n,s):$.il(4,null,["Exporting"])},$.g.wA=function(t,e,i,n,s,a){var o=$.eq.exports;o?o.wA(this,this.Jc,t,e,i,n,s,a):$.il(4,null,["Exporting"])},$.g.BA=function(t,e,i,n){var s=$.eq.exports;s?s.BA(this,this.Jc,t,e,i,n):$.il(4,null,["Exporting"])},$.g.yA=function(t,e,i,n,s,a){var o=$.eq.exports;o?o.yA(this,this.Jc,t,e,i,n,s,a):$.il(4,null,["Exporting"])},$.g.print=function(t,e){var i=$.eq.exports;i?i.print(this,this.Jc,t,e):$.il(4,null,["Exporting"])},$.g.LE=function(t,e,i,n){var s=$.eq.exports;s?s.LE(this,this.Jc,t,e,i,n):$.il(4,null,["Exporting"])},$.g.OE=function(){var t=$.eq.exports;t?t.OE(this,this.Jc):$.il(4,null,["Exporting"])},$.g.ME=function(t,e){var i=$.eq.exports;i?i.ME(this,this.Jc,t,e):$.il(4,null,["Exporting"])},$.g.NE=function(t,e){var i=$.eq.exports;i?i.NE(this,this.Jc,t,e):$.il(4,null,["Exporting"])},$.g.F=function(){var t=$.Y.u.F.call(this),e=$.V.prototype.g.call(this,"zIndex");return $.p(e)&&(t.zIndex=e),e=$.V.prototype.g.call(this,"enabled"),$.p(e)&&(t.enabled=e),t},$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=$.Y.prototype.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},$.g.U=function(t,e){if($.Y.u.U.call(this,t,e),e)"enabled"in t&&(this.oa.enabled=t.enabled),"zIndex"in t&&(this.oa.zIndex=t.zIndex);else{var i=t.enabled;this.enabled(null!=i?i:!$.p(i)||void 0),this.zIndex(t.zIndex)}},$.g.R=function(){$.qd(this.wc),this.fn=this.wc=null,this.rP&&$.qd(this.Jc),this.Jc=null,this.pO=!1,$.Y.u.R.call(this)};var EF=$.Y.prototype;EF.zIndex=EF.zIndex,EF.enabled=EF.enabled,EF.print=EF.print,$.H($.tu,$.V),$.g=$.tu.prototype,$.g.ra=2,$.g.Kx=window.NaN,$.g.Bx=window.NaN,$.g.ww=null,$.g.qx=null,$.g.bt=null,$.g.es=null,$.g.Yf=null,$.g.Jf=null,$.g.Fw=null,$.g.Ew=null,$.g.Dw=null,$.g.Bw=null,$.g.J6=function(t,e,i,n){if($.J(t,$.I)||$.C(t)?(n=t,t=$.N(n.left),e=$.N(n.top),i=$.N(n.width),n=$.N(n.height)):(t=$.N(t),e=$.N(e),i=$.N(i),n=$.N(n)),null===this.ww)if(null===this.bt){var s=0,a=null===this.Yf?+i||0:$.L(this.Yf,i);a=vu(this,a,i)}else{var o=$.L(this.bt,i,!0);a=null===this.Yf?o:$.L(this.Yf,i),s=o-(a=vu(this,a,i))}else s=$.L(this.ww,i),a=null===this.bt?null===this.Yf?+i-s||0:$.L(this.Yf,i):$.L(this.bt,i,!0)-s,a=vu(this,a,i);return null===this.qx?null===this.es?(o=(0,window.isNaN)(this.Kx)?0:this.Kx,i=null===this.Jf?(0,window.isNaN)(this.Bx)?+n||0:this.Bx:$.L(this.Jf,n),i=uu(this,i,n)):(o=$.L(this.es,n,!0),i=null===this.Jf?(0,window.isNaN)(this.Kx)?(0,window.isNaN)(this.Bx)?o:this.Bx:o-this.Kx:$.L(this.Jf,n),o-=i=uu(this,i,n)):(o=$.L(this.qx,n),i=null===this.es?null===this.Jf?(0,window.isNaN)(this.Bx)?+n-o||0:this.Bx:$.L(this.Jf,n):$.L(this.es,n,!0)-o,i=uu(this,i,n)),(0,window.isNaN)(t)||(s+=t),(0,window.isNaN)(e)||(o+=e),new $.I(s,o,a,i)},$.g.set=function(t,e,i,n){return this.ka(),this.ga(!0,t,e,i,n),this.da(!0),this},$.g.zB=function(t){var e=this.Bx!=t;this.Bx=t,e&&this.va(2)},$.g.left=function(t){return $.p(t)?((t=Co(t))!=this.ww&&(this.ww=t,this.va(2)),this):this.ww},$.g.top=function(t){return $.p(t)?((t=Co(t))!=this.qx&&(this.qx=t,this.va(2)),this):this.qx},$.g.right=function(t){return $.p(t)?((t=Co(t))!=this.bt&&(this.bt=t,this.va(2)),this):this.bt},$.g.bottom=function(t){return $.p(t)?((t=Co(t))!=this.es&&(this.es=t,this.va(2)),this):this.es},$.g.width=function(t){return $.p(t)?((t=Co(t))!=this.Yf&&(this.Yf=t,this.va(2)),this):this.Yf},$.g.height=function(t){return $.p(t)?((t=Co(t))!=this.Jf&&(this.Jf=t,this.va(2)),this):this.Jf},$.g.minWidth=function(t){return $.p(t)?((t=Co(t))!=this.Fw&&(this.Fw=t,this.va(2)),this):this.Fw},$.g.minHeight=function(t){return $.p(t)?((t=Co(t))!=this.Ew&&(this.Ew=t,this.va(2)),this):this.Ew},$.g.maxWidth=function(t){return $.p(t)?((t=Co(t))!=this.Dw&&(this.Dw=t,this.va(2)),this):this.Dw},$.g.maxHeight=function(t){return $.p(t)?((t=Co(t))!=this.Bw&&(this.Bw=t,this.va(2)),this):this.Bw},$.g.gr=function(){return $.uo(this.Yf)||$.uo(this.Jf)||$.uo(this.Fw)||$.uo(this.Ew)||$.uo(this.Dw)||$.uo(this.Bw)||$.uo(this.ww)||$.uo(this.qx)||null!==this.es||null!==this.bt||null===this.Yf||null===this.Jf},$.g.F=function(){var t=$.tu.u.F.call(this);return null!==this.qx&&(t.top=this.qx),null!==this.bt&&(t.right=this.bt),null!==this.es&&(t.bottom=this.es),null!==this.ww&&(t.left=this.ww),null!==this.Yf&&(t.width=this.Yf),null!==this.Jf&&(t.height=this.Jf),null!==this.Fw&&(t.minWidth=this.Fw),null!==this.Ew&&(t.minHeight=this.Ew),null!==this.Dw&&(t.maxWidth=this.Dw),null!==this.Bw&&(t.maxHeight=this.Bw),t},$.g.U=function(t){this.left(t.left),this.top(t.top),this.right(t.right),this.bottom(t.bottom),this.width(t.width),this.height(t.height),this.minWidth(t.minWidth),this.minHeight(t.minHeight),this.maxWidth(t.maxWidth),this.maxHeight(t.maxHeight)},$.g.Zd=function(t){var e=null;if($.A(t)){var i=$.p(t[0])?t[0]:null,n=$.p(t[1])?t[1]:null,s=$.p(t[2])?t[2]:null;e=$.p(t[3])?t[3]:null}else $.p(t)&&!$.C(t)&&(i=t);return t={left:i,top:n,width:s,height:e},this.left(i).top(n).width(s).height(e),t},$.g.Ie=function(t,e,i,n,s){if(t=!1,$.J(e,$.tu)){var a=e.ww,o=e.qx,r=e.Yf,l=e.Jf,h=e.Fw,c=e.Ew,u=e.Dw,d=e.Bw,p=e.bt,g=e.es;t=!0}else $.J(e,$.I)?(a=e.left,o=e.top,r=e.width,l=e.height,d=u=c=h=g=p=null,t=!0):$.A(e)?(a=$.p(e[0])?e[0]:null,o=$.p(e[1])?e[1]:null,r=$.p(e[2])?e[2]:null,l=$.p(e[3])?e[3]:null,d=u=c=h=g=p=null,t=!0):$.p(e)&&!$.C(e)&&(a=e,o=$.p(i)?i:null,r=$.p(n)?n:null,l=$.p(s)?s:null,d=u=c=h=g=p=null,t=!0);return t&&this.left(a).top(o).right(p).bottom(g).width(r).height(l).minWidth(h).minHeight(c).maxWidth(u).maxHeight(d),t};var FF=$.tu.prototype;FF.top=FF.top,FF.right=FF.right,FF.bottom=FF.bottom,FF.left=FF.left,FF.width=FF.width,FF.height=FF.height,FF.minWidth=FF.minWidth,FF.minHeight=FF.minHeight,FF.maxWidth=FF.maxWidth,FF.maxHeight=FF.maxHeight,FF.set=FF.set,FF.toRect=FF.J6,$.H($.wu,$.Y),$.g=$.wu.prototype,$.g.ra=$.Y.prototype.ra,$.g.sa=$.Y.prototype.sa,$.g.gr=function(){return this.Ta().gr()},$.g.ob=function(){return this.Ta().J6(this.ja())},$.g.Ta=function(t,e,i,n){return this.Bb||(this.Bb=new $.tu,$.K(this.Bb,this.Pk,this),$.W(this,"bounds",this.Bb)),$.p(t)?(this.Bb.N.apply(this.Bb,arguments),this):this.Bb},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.left=function(t){return $.p(t)?(this.Ta().left(t),this):this.Ta().left()},$.g.right=function(t){return $.p(t)?(this.Ta().right(t),this):this.Ta().right()},$.g.top=function(t){return $.p(t)?(this.Ta().top(t),this):this.Ta().top()},$.g.bottom=function(t){return $.p(t)?(this.Ta().bottom(t),this):this.Ta().bottom()},$.g.width=function(t){return $.p(t)?(this.Ta().width(t),this):this.Ta().width()},$.g.height=function(t){return $.p(t)?(this.Ta().height(t),this):this.Ta().height()},$.g.minWidth=function(t){return $.p(t)?(this.Ta().minWidth(t),this):this.Ta().minWidth()},$.g.minHeight=function(t){return $.p(t)?(this.Ta().minHeight(t),this):this.Ta().minHeight()},$.g.maxWidth=function(t){return $.p(t)?(this.Ta().maxWidth(t),this):this.Ta().maxWidth()},$.g.maxHeight=function(t){return $.p(t)?(this.Ta().maxHeight(t),this):this.Ta().maxHeight()},$.g.R=function(){$.qd(this.Bb),this.Bb=null,$.wu.u.R.call(this)};var GF=$.wu.prototype;GF.bounds=GF.Ta,GF.top=GF.top,GF.right=GF.right,GF.bottom=GF.bottom,GF.left=GF.left,GF.width=GF.width,GF.height=GF.height,GF.minWidth=GF.minWidth,GF.minHeight=GF.minHeight,GF.maxWidth=GF.maxWidth,GF.maxHeight=GF.maxHeight,GF.getPixelBounds=GF.ob,$.H($.yu,$.wu),$.yu.prototype.ra=32768|$.wu.prototype.ra,$.yu.prototype.sa=80|$.wu.prototype.sa;var Kda=$.yu.prototype,HF={};$.sq(HF,[[1,"fill",$.Qq],[1,"stroke",$.Pq],[1,"topStroke",$.Pq],[1,"rightStroke",$.Pq],[1,"bottomStroke",$.Pq],[1,"leftStroke",$.Pq],[0,"disablePointerEvents",$.Dq],[0,"cornerType",function(t,e){return $.zk(vda,t,e||"none")}]]),Kda.lR=HF,$.U($.yu,$.yu.prototype.lR),$.g=$.yu.prototype,$.g.g=$.ir,$.g.ys=function(){return 1},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.yS=function(t){var e=arguments[0];return $.A(e)?e:$.C(e)?[e.leftTop||0,e.rightTop||0,e.rightBottom||0,e.leftBottom||0]:$.Ja(arguments,0)},$.g.xS=function(t){if($.p(t)){var e=this.yS.apply(this,arguments);return $.Ta(e,this.Pa.corners)||(this.Pa.corners=e,this.B(20,1)),this}return this.yS(this.g("corners"))},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(null===t?($.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,$.K(this.Y,this.Tc,this))),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=1),this.Xb=null,this.B(e,i)},$.g.YT=function(){return this.ob()},$.g.W=function(){if(!this.zc())return this;var t,e=this.g("fill")||"none",i=this.g("stroke"),n=this.g("topStroke"),s=this.g("rightStroke"),a=this.g("bottomStroke"),o=this.g("leftStroke"),r=$.p(n)&&!$.cp(n),l=$.p(s)&&!$.cp(s),h=$.p(a)&&!$.cp(a),c=$.p(o)&&!$.cp(o),u=!!(r||l||h||c);if(h=r&&l&&h&&c,(l=(r=this.O()?this.O().Ja():null)&&!r.yf())&&r.suspend(),this.J(4)){if(this.Na||(this.Na=$.ok()),h&&this.f?this.f.clear().parent(null):(this.f||(this.f=$.qk()),this.f.parent(this.Na),this.f.clear()),u?(this.i||(this.i=$.qk()),this.i.parent(this.Na),this.i.clear()):this.i&&this.i.clear().parent(null),this.G)for(h=0,c=this.G.length;h<c;h++)(t=this.G[h])&&t.clear().parent(null);if(u)for(this.D=[n,s,a,o],this.G||(this.G=[]),this.b||(this.b=[]),h=0,c=this.D.length;h<c;h++)n=this.D[h],$.p(n)&&!$.cp(n)?((n=this.G[h]?this.G[h]:this.G[h]=$.qk()).parent(this.Na),n.clear(),this.b[h]=n):$.p(i)&&!$.cp(i)&&(this.D[h]=i,this.b[h]=this.f);if(n=(h=this.YT()).width,s=h.height,c=zu(this,0,n,s),a=zu(this,1,n,s),o=zu(this,2,n,s),t=zu(this,3,n,s),u){var d=this.b[0]?$.$b($.Wb(this.D[0]))/2:0,p=this.b[1]?$.$b($.Wb(this.D[1]))/2:0,g=this.b[2]?$.$b($.Wb(this.D[2]))/2:0,f=this.b[3]?$.$b($.Wb(this.D[3]))/2:0;for(h.left+=f,h.top+=d,h.width-=f+p,h.height-=d+g,a=[h.cb()-a,h.top,h.cb(),h.top,h.cb(),h.top+a,h.cb()-a+a*Math.cos($.bb(315)),h.top+a+a*Math.sin($.bb(315)),h.cb(),h.Va()-o,h.cb(),h.Va(),h.cb()-o,h.Va(),h.cb()-o+o*Math.cos($.bb(45)),h.Va()-o+o*Math.sin($.bb(45)),h.left+t,h.Va(),h.left,h.Va(),h.left,h.Va()-t,h.left+t+t*Math.cos($.bb(135)),h.Va()-t+t*Math.sin($.bb(135)),h.left,h.top+c,h.left,h.top,h.left+c,h.top,h.left+c+c*Math.cos($.bb(225)),h.top+c+c*Math.sin($.bb(225))],h=0,c=a.length;h<c;h+=8)if(o=zu(this,t=h/8,n,s),h||this.i.moveTo(a[a.length-4],a[a.length-3]),this.i.lineTo(a[h],a[h+1]),Au(this,this.i,a[h+2],a[h+3],a[h+4],a[h+5],o),t=this.b[t]){h?(m!=t&&t.moveTo(a[h-2],a[h-1]),Au(this,t,a[h-6],a[h-5],a[h-4],a[h-3],o)):(t.moveTo(a[a.length-2],a[a.length-1]),Au(this,t,a[a.length-6],a[a.length-5],a[a.length-4],a[a.length-3],o)),t.lineTo(a[h],a[h+1]),Au(this,t,a[h+2],a[h+3],a[h+6],a[h+7],o);var m=t}}else{for(m=$.$b($.Wb(i))/2,(0,window.isNaN)(m)&&(m=.5),h.left+=m,h.top+=m,h.width-=m+m,h.height-=m+m,a=[h.cb()-a,h.top,h.cb(),h.top,h.cb(),h.top+a,h.cb(),h.Va()-o,h.cb(),h.Va(),h.cb()-o,h.Va(),h.left+t,h.Va(),h.left,h.Va(),h.left,h.Va()-t,h.left,h.top+c,h.left,h.top,h.left+c,h.top],h=0,c=a.length;h<c;h+=6)h||this.f.moveTo(a[a.length-2],a[a.length-1]),this.f.lineTo(a[h],a[h+1]),Au(this,this.f,a[h+2],a[h+3],a[h+4],a[h+5],zu(this,(h/6+1)%4,n,s));this.f.close()}this.I(4),$.C(e)&&("keys"in e||"src"in e)&&this.B(16)}if(this.J(16)){if(u){for(h=0,c=this.b.length;h<c;h++)(t=this.b[h])&&t.stroke(this.D[h]);this.i.fill(e),this.i.stroke(null)}else this.f.stroke(i),this.f.fill(e);this.I(16)}if(this.J(64)){if(e=this.g("disablePointerEvents"),u){for(h=0,c=this.b.length;h<c;h++)(t=this.b[h])&&t.Dd(e);this.i.Dd(e)}else this.f.Dd(e);this.Na.Dd(e),this.I(64)}return this.J(8)&&(this.Na.zIndex(this.g("zIndex")),this.I(8)),this.J(2)&&(this.Na.parent(this.O()),this.I(2)),l&&r.resume(),this},$.g.remove=function(){this.Na&&this.Na.parent(null)},$.g.yd=function(){var t=this.ob();if(t=t?t.clone():$.kn(0,0,0,0),!this.enabled())return t;var e=this.g("stroke");return e=$.cp(e)?0:$.$b(e),t.top+=e,t.left+=e,t.height-=2*e,t.width-=2*e,t},$.g.F=function(){var t=$.yu.u.F.call(this);$.Tq(this,this.lR,t,"Background",void 0,this.P);var e=this.nd("corners");return e&&(e=4<=e.length?{leftTop:e[0],rightTop:e[1],rightBottom:e[2],leftBottom:e[3]}:e[0],t.corners=e),t},$.g.Zd=function(t){var e=null;return $.z(t)?e={fill:t,stroke:null,enabled:!0}:($.da(t)||null===t)&&(e={enabled:!!t}),e},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?("fill"in i&&(this.oa.fill=i.fill),"stroke"in i&&(this.oa.stroke=i.stroke),"enabled"in i&&(this.oa.enabled=i.enabled)):("fill"in i&&this.fill(i.fill),"stroke"in i&&this.stroke(i.stroke),"enabled"in i&&this.enabled(i.enabled)),!0)},$.g.U=function(t,e){$.yu.u.U.call(this,t,e),$.Iq(this,this.lR,t,e),e?"corners"in t&&(this.oa.corners=this.yS(t.corners)):this.xS(t.corners)},$.g.R=function(){$.sd(this.f,this.b,this.i),this.i=this.b=this.f=null,$.yu.u.R.call(this)},$.H(Bu,$.yu),$.xu(Bu,$.yu);var IF=$.yu.prototype;IF.corners=IF.xS,IF=Bu.prototype,$.E("anychart.standalones.background",(function(){var t=new Bu;return t.ga(!0,$.nm("standalones.background")),t})),IF.draw=IF.W,IF.parentBounds=IF.ja,IF.container=IF.O,$.g=Cu.prototype,$.g.text=function(t){this.kc=t},$.g.width=function(){return this.Ta?this.Ta.width:0},$.g.height=function(){return this.Ta?this.Ta.height:0},$.g.path=function(){return null},$.g.style=function(t){this.f=t},$.g.Ac=function(){this.ia=this.P.Vx()},$.g.setPosition=function(t,e){var i=this.Vd();$.p(t)&&t!=this.No&&(this.No=t,i.setAttribute("x",this.No)),$.p(e)&&e!=this.Oo&&(this.Oo=e,i.setAttribute("y",this.Oo+this.b))},$.g.Vd=function(){return this.ia||this.Ac(),this.ia},$.g.Ij=function(){var t=this.f,e=this.Vd();$.Jc(t)||(t.fontStyle?e.setAttribute("font-style",t.fontStyle):e.removeAttribute("font-style"),t.fontVariant?e.setAttribute("font-variant",t.fontVariant):e.removeAttribute("font-variant"),t.fontFamily?e.setAttribute("font-family",t.fontFamily):e.removeAttribute("font-family"),$.p(t.fontSize)?e.setAttribute("font-size",t.fontSize):e.removeAttribute("font-size"),$.p(t.fontWeight)?e.setAttribute("font-weight",t.fontWeight):e.removeAttribute("font-weight"),$.p(t.letterSpacing)?e.setAttribute("letter-spacing",t.letterSpacing):e.removeAttribute("letter-spacing"),t.fontDecoration?e.setAttribute("text-decoration",t.fontDecoration):e.removeAttribute("font-decoration"),t.fontColor?e.setAttribute("fill",t.fontColor):e.removeAttribute("font-color"),$.p(t.fontOpacity)?e.setAttribute("opacity",t.fontOpacity):e.removeAttribute("font-opacity"),t.disablePointerEvents?e.setAttribute("pointer-events",t.disablePointerEvents?"none":""):e.removeAttribute("pointer-events")),e.textContent=this.kc},$.g.rb=function(){if(!this.Ta){var t=this.Vd();t.removeAttribute("x"),t.removeAttribute("y"),t=t.getBBox(),this.Ta=new $.I(t.x,-t.y,t.width,t.height),this.b=-t.y}return this.Ta},$.H(Eu,$.V),Eu.prototype.ra=2;var Fu={};$.rq(Fu,0,"left",$q),$.rq(Fu,0,"top",$q),$.rq(Fu,0,"bottom",$q),$.rq(Fu,0,"right",$q),$.U(Eu,Fu),$.g=Eu.prototype,$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){return $.ir.call(this,t)||0},$.g.CM=function(){return 0},$.g.ys=function(){return 2},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(null===t?($.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,$.K(this.Y,this.Tc,this))),this):this.Y},$.g.Tc=function(){this.Xb=null,this.va(2)},$.g.set=function(t,e,i,n){var s=$.Gm.apply(this,arguments);return this.nd("top")===s.top&&this.nd("right")===s.right&&this.nd("bottom")===s.bottom&&this.nd("left")===s.left||(this.ta("top",s.top),this.ta("right",s.right),this.ta("bottom",s.bottom),this.ta("left",s.left),this.va(2)),this},$.g.Ej=function(t){var e=$.L(this.g("left"),t.width),i=$.L(this.g("right"),t.width),n=$.L(this.g("top"),t.height),s=$.L(this.g("bottom"),t.height);return new $.I(t.left+e,t.top+n,t.width-e-i,t.height-n-s)},$.g.Ng=function(t){return t-$.L(this.g("left"),t)-$.L(this.g("right"),t)},$.g.Yh=function(t){return t-$.L(this.g("top"),t)-$.L(this.g("bottom"),t)},$.g.NY=function(t){var e=$.L(this.g("left"),t.width),i=$.L(this.g("right"),t.width),n=$.L(this.g("top"),t.height),s=$.L(this.g("bottom"),t.height);return new $.I(t.left-e,t.top-n,t.width+e+i,t.height+n+s)},$.g.Lk=function(t){return t+$.L(this.g("left"),t)+$.L(this.g("right"),t)},$.g.$j=function(t){return t+$.L(this.g("top"),t)+$.L(this.g("bottom"),t)},$.g.F=function(){var t=Eu.u.F.call(this);return $.Tq(this,Fu,t,"Space"),t},$.g.Zd=function(t){return $.Gm.apply(null,arguments)},$.g.Ie=function(t,e){if($.p(arguments[1])){var i=this.Zd.apply(this,$.Ja(arguments,1));return t?Gu(this,i):this.set(i),!0}return!1},$.g.U=function(t,e){this.ka(),e?Gu(this,t):$.Iq(this,Fu,t),this.da(!0)};var JF=Eu.prototype;JF.set=JF.set,$.H($.Hu,Eu),$.Hu.prototype.NY=function(t){var e=this.Lk(t.width),i=this.$j(t.height),n=$.L(this.g("left"),e),s=$.L(this.g("top"),i);return new $.I(t.left-n,t.top-s,e,i)},$.Hu.prototype.$j=function(t){var e=this.g("top"),i=this.g("bottom");return Iu(t,e,i)},$.Hu.prototype.Lk=function(t){var e=this.g("left"),i=this.g("right");return Ju(t,e,i)},$.ja($.Lu),$.H($.Pu,$.Y),$.Pu.prototype.ra=8|$.Y.prototype.ra,$.Pu.prototype.sa=976|$.Y.prototype.sa;var KF=null,LF="fontSize fontFamily fontColor fontOpacity textDirection fontStyle fontVariant fontDecoration fontWeight letterSpacing lineHeight textIndent vAlign hAlign textOverflow selectable disablePointerEvents wordWrap wordBreak rotation".split(" ");$.Pu.prototype.f=$.vq(),$.U($.Pu,$.Pu.prototype.f);var Lda=$.Pu.prototype,MF={};$.sq(MF,[[0,"format",$.ar],[0,"positionFormatter",$.ar],[0,"position",$.Cq],[0,"anchor",Qu],[0,"offsetX",$.Cq],[0,"offsetY",$.Cq],[1,"connectorStroke",$.Pq],[0,"rotation",$.Bq],[0,"width",$.br],[0,"height",$.br],[0,"clip",$.Cq]]),Lda.Dz=MF,$.U($.Pu,$.Pu.prototype.Dz),$.g=$.Pu.prototype,$.g.enabled=function(t){if($.p(t)){var e=this.g("enabled");return null===t?($.Pu.u.enabled.call(this,t),this.I(1)):(null===e&&t&&this.B(1,this.mr()),$.Pu.u.enabled.call(this,t)),this}return this.g("enabled")},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,this.Ia.I(4294967295),$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this.Pa.background=this.Ia.Pa,this):this.Ia},$.g.vg=function(t){$.X(t,1)&&(this.Ia.I(4294967295),Ru(this),this.B(16,1))},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this.Pa.padding=this.Wa.Pa,this):this.Wa},$.g.fm=function(t){$.X(t,2)&&(Ru(this),this.B(4,9))},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e))return this.nd(t);t in this.f&&this[t](e)}else if($.C(t))for(var i in t)i in this.f&&this[i](t[i]);return this}for(var n in i={},this.f)if(n in this.f){var s=this.g(n);$.p(s)&&(i[n]=this.g(n))}return i},$.g.jC=function(){var t=this.g("adjustFontSize");return!!t&&(t.width||t.height)},$.g.Kq=function(t){var e=this.g("fontColor")!=t;null===t?delete this.Nd.fontColor:this.Nd.fontColor=t,e&&this.B(4)},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){return Ru(this),$.p(this.Pa[t])?this.Pa[t]:$.p(this.Nd[t])?this.Nd[t]:this.oa[t]},$.g.xA=function(t){return Ru(this),$.p(this.Pa[t])?this.Pa[t]:this.Nd[t]},$.g.pH=function(){return this.Pa},$.g.Vd=function(){return this.wb},$.g.sl=function(){return this.wb},$.g.clear=function(t){if(this.o||(this.o=[]),this.Da&&this.Da.length)if($.p(t))this.Da[t]&&(this.Da[t].clear(),this.o.push(this.Da[t]),$.Yu(this,t),delete this.Da[t]);else{for($.Yu(this),t=this.Da.length;t--;){var e=this.Da[t];e&&(e.clear(),this.o.push(e))}this.Da.length=0,this.B(128,1)}else this.Da=[];return this},$.g.be=function(t){return t=+t,this.Da&&this.Da[t]?this.Da[t]:null},$.g.jI=function(){return this.Da?this.Da.length:0},$.g.add=function(t,e,i){if($.p(this.Da)||(this.Da=[]),$.p(i))var n=+i,s=this.Da[n];return s?(s.ka(),s.clear()):((s=this.o&&0<this.o.length?this.o.pop():this.vL()).ka(),$.p(n)?this.Da[n]=s:(this.Da.push(s),n=this.Da.length-1),s.HE(n)),s.Hf(t),s.jc(e),s.hp=this,s.state("pointNormal",s),s.state("seriesNormal",this),s.state("seriesNormalTheme",this.oa),s.da(!1),s},$.g.vL=function(){return new $.Tu},$.g.remove=function(){this.wb&&this.wb.parent(null)},$.g.W=function(){if(this.md)return this;this.wb||(this.wb=$.ok(),$.ru(this,this.wb));var t=this.O()?this.O().Ja():null,e=t&&!t.yf();return e&&t.suspend(),this.Da&&(this.sM(),qca(this),(0,$.Pe)(this.Da,(function(t){t&&(t.O(this.wb),t.W())}),this)),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.wb.parent(this.O()),this.I(2)),this.I(4294967295),e&&t.resume(),this},$.g.sM=function(){(0,$.Pe)(this.Da,(function(t){t.sM()}),this)},$.g.S1=function(t,e,i,n,s,a){if(i)var o=i.width,r=i.height;return e=new $.gb(e.x,e.y),i=$.Eo(new $.I(0,0,t.width,t.height),a),e.x-=i.x,e.y-=i.y,n=$.p(n)?$.L(n,o):0,s=$.p(s)?$.L(s,r):0,$.Yo(e,a,n,s),t.left=e.x,t.top=e.y,t},$.g.measure=function(t,e,i,n){return t=this.yl(t,e,i,n),$.mn(t)},$.g.yl=function(t,e,i,n){if($.J(t,$.Tu)){var s=t.g("rotation"),a=$.p(s)?s:this.g("rotation")||0;"auto"==(s=t.g("anchor")||this.g("anchor"))&&i&&i.anchor&&(s=i.anchor),n=$.p(n)?n:t.ma()}else a=$.p(i)&&$.p(i.rotation)?i.rotation:this.g("rotation")||0,s=$.p(i)&&i.anchor||this.g("anchor");return t=$.Xu(this,t,e,i,n),e=a,s=$.Eo(t,s),s=$.Kb($.bb(e),s.x,s.y),t=$.ln(t)||[],s.transform(t,0,t,0,4),t},$.g.ig=function(t){for(var e,i=(t=$.Pu.u.ig.call(this,t)).domTarget;$.J(i,$.ig)&&(e=i.tag,!$.J(e,$.Y)&&$.Do(e));)i=i.parent();return t.labelIndex=$.N(e),t},$.g.R=function(){$.sd(this.Da,this.o,this.b,this.wb,this.Ia,this.Wa,this.b,this.K),this.K=this.b=this.Wa=this.Ia=this.wb=this.o=this.Da=null,$.Pu.u.R.call(this)},$.g.F=function(){var t=$.Pu.u.F.call(this);if($.p(t.enabled)||delete t.enabled,this.ph("background")&&!$.Jc(this.Pa.background)){var e=this.background().F();$.Jc(e)||(t.background=e)}return this.ph("padding")&&!$.Jc(this.Pa.padding)&&(e=this.padding().F(),$.Jc(e)||(t.padding=e)),(e=t.adjustFontSize)&&($.p(e.width)||$.p(e.height))||delete t.adjustFontSize,$.Tq(this,this.f,t,"Labels factory label text",void 0,!0),$.Tq(this,this.Dz,t,"Labels factory label props",void 0,!0),t},$.g.U=function(t,e){var i=this.enabled();if($.Pu.u.U.call(this,t,e),e?($.Iq(this.oa,this.f,t),$.Iq(this.oa,this.Dz,t),"enabled"in t&&(this.oa.enabled=t.enabled)):($.Iq(this,this.f,t),$.Iq(this,this.Dz,t),this.enabled("enabled"in t?t.enabled:i)),(i="background")in t){var n=this.background();e?n.ga(!!e,t[i]):this.background(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa}(i="padding")in t&&(n=this.padding(),e?n.ga(!!e,t[i]):this.padding(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa)},$.H($.Tu,$.Y),$.g=$.Tu.prototype,$.g.ra=8|$.Y.prototype.ra,$.g.sa=3856|$.Y.prototype.sa,$.g.Vd=function(){return this.wb},$.g.state=function(t,e,i){if($.p(e)){$.p(i)&&(i=$.N(i));var n=av(this);return this.lx[t]==e&&(0,$.za)(n,t)==i||(this.lx[t]=e,$.p(i)||-1!=(0,$.za)(n,t)||(i=n.length),(0,window.isNaN)(i)||$.bv(this,t,i),this.B(17,9)),this}return this.lx[t]},$.g.sR=$.vq(),$.U($.Tu,$.Tu.prototype.sR);var Mda=$.Tu.prototype,NF={};$.sq(NF,[[0,"format",$.ar],[0,"positionFormatter",$.ar],[0,"position",$.Cq],[0,"anchor",Qu],[0,"offsetX",$.Cq],[0,"offsetY",$.Cq],[1,"connectorStroke",$.Pq],[0,"rotation",$.Bq],[0,"width",$.br],[0,"height",$.br],[0,"clip",$.Cq],[0,"enabled",$.Zq]]),Mda.oC=NF,$.U($.Tu,$.Tu.prototype.oC),$.g=$.Tu.prototype,$.g.ma=function(){return this.Ad},$.g.HE=function(t){this.Ad=+t},$.g.background=function(t){var e=null===t;return e||this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this)),$.p(t)?(e?($.qd(this.Ia),delete this.Pa.background):(this.Ia.N(t),ev(this)),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&(ev(this),this.B(16,1))},$.g.padding=function(t,e,i,n){var s=null===t;if(s||this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.Pk,this)),$.p(t)){if(s)$.qd(this.Wa),delete this.Pa.padding;else{if($.J(t,$.Hu))for(var a in Fu)s=t.g(a),this.Wa.ta(a,s);else this.Wa.N.apply(this.Wa,arguments);ev(this)}return this}return this.Wa},$.g.Pk=function(t){$.X(t,2)&&(ev(this),this.B(16,8))},$.g.qk=function(t){return $.p(t)?(t=Qu(t),this.Nd.anchor!==t&&(this.Nd.anchor=t,$.p(this.Pa.anchor)||this.B(16,8)),this):this.Nd.anchor},$.g.Hf=function(t){return $.p(t)?(this.i!=t&&(this.i=t,this.B(16,1)),this):this.i},$.g.jc=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,this.B(2052,8)),this):this.aa},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){return ev(this),$.p(this.Pa[t])?this.Pa[t]:this.oa[t]},$.g.xA=function(t){return ev(this),this.Pa[t]},$.g.Pha=function(t){if(this.hp)var e=this.hp;else KF||(KF=new $.Pu).ta("positionFormatter",(function(){return this.value})),e=KF;var i=$.Uu(this);return i.format=String(t),e.measure({},this.jc(),i)},$.g.Hi=function(){$.sd(this.Ia,this.Wa),this.Wa=this.Ia=null,this.oa={},this.Pa={},this.Nd={},this.lx={pointNormal:this},this.P=null,this.hp&&(this.lx.seriesNormal=this.hp,this.lx.seriesNormalTheme=this.hp.oa),this.b=null},$.g.td=function(t,e){$.p(t)&&this.N(t),null!=e&&(this.lx.pointState=e),($.p(t)||$.p(e))&&this.B(17,9)},$.g.ic=function(t){if("adjustFontSize"==t){var e=fv(this,t,(function(t){return t.width}));return{width:e,height:t=fv(this,t,(function(t){return t.height}))}}return e=fv(this,t),"background"!=t||$.p(e)||(e=null),e},$.g.clear=function(){this.Hi(),this.wb&&(this.wb.parent(null),this.wb.Bl()),this.B(2)},$.g.tf=function(t,e){this.b||$.Uu(this);var i=this.b.positionFormatter,n=this.xr&&this.xb.path()?"center":Qu(this.b.anchor)||"left-top",s=dv(this),a=this.b.offsetX,o=this.b.offsetY,r=0,l=0;e&&(r=e.width,l=e.height);var h=this.jc(),c=$.Qc(i.call(h,h));c=new $.gb(c.x,c.y),h=h&&h.connectorPoint,this.Zf&&(this.Zf.clear(),this.Zf.oc(1,0,0,1,0,0)),h&&(this.Zf||(this.Zf=this.wb.path(),this.Zf.eq(!0)),this.Zf.stroke(this.b.connectorStroke),i=$.Qc(i.call(h,h)),this.Zf.moveTo(c.x,c.y).lineTo(i.x,i.y)),i=$.Eo(new $.I(0,0,t.width,t.height),n),c.x-=i.x,c.y-=i.y,a=$.p(a)?$.L(a,r):0,o=$.p(o)?$.L(o,l):0,s?$.Yo(c,n,o,a):$.Yo(c,n,a,o),t.left=c.x,t.top=c.y,Su(this)?this.xb.x(this.Lg+c.x).y(this.Mg+c.y):this.xb.setPosition(this.Lg+c.x,this.Mg+c.y)},$.g.Jt=function(){var t=this.jc(),e=this.b.positionFormatter,i=$.Qc(e.call(t,t));t=t&&t.connectorPoint,this.Zf&&(this.Zf.clear(),this.Zf.oc(1,0,0,1,0,0)),t&&(this.Zf||(this.Zf=this.wb.path(),this.Zf.eq(!0)),this.Zf.stroke(this.b.connectorStroke),e=$.Qc(e.call(t,t)),this.Zf.moveTo(i.x,i.y).lineTo(e.x,e.y))},$.g.bi=function(t,e,i){var n=$.p(i)?function(t){return i[t]}:$.J(this,$.Tu)?this.nd:$.Pu.prototype.xA;if($.J(t,$.Qh)){var s=n.call(this,"text"),a=n.call(this,"useHtml");(e||$.p(s)||$.p(a))&&(a?t.htmlText(s):t.text(s)),t.fontSize(n.call(this,"fontSize")),t.fontFamily(n.call(this,"fontFamily")),t.color(n.call(this,"fontColor")),t.opacity(n.call(this,"fontOpacity")),t.direction(n.call(this,"textDirection")),t.fontStyle(n.call(this,"fontStyle")),t.fontVariant(n.call(this,"fontVariant")),t.er(n.call(this,"fontDecoration")),t.fontWeight(n.call(this,"fontWeight")),t.letterSpacing(n.call(this,"letterSpacing")),t.lineHeight(n.call(this,"lineHeight")),t.textIndent(n.call(this,"textIndent")),t.textShadow(n.call(this,"textShadow")),t.vAlign(n.call(this,"vAlign")),t.Bm(n.call(this,"hAlign")),t.textOverflow(n.call(this,"textOverflow")),t.Hm(n.call(this,"selectable")),t.Dd(n.call(this,"disablePointerEvents")),t.wordWrap(n.call(this,"wordWrap")),t.Xu(n.call(this,"wordBreak"))}else{for(e={},s=0,a=LF.length;s<a;s++){var o=LF[s];e[o]=n.call(this,o)}t.style(e),t.Ij()}},$.g.sM=function(){this.J(16)&&(this.b=null);var t=this.ic("enabled");if(!Su(this)&&t){t=this.xb,(jv(this)||this.wb&&!this.wb.parent())&&(t=this.Rh(),$.mg().Xp().appendChild(t.Vd()),this.f&&this.f.content(null));var e=$.Uu(this),i=this.tk(e.format,this.Hf(),this.ma());t.text($.p(i)?String(i):""),this.bi(t,!0,e)}},$.g.W=function(){var t,e=this.hp;this.wb||(this.wb=$.ok()),this.wb.tag=this.Ad;var i=this.ic("enabled");if(cv(this,1)){if(!i)return this.wb&&this.wb.parent(null),this.I(1),this;this.O()&&!this.wb.parent()&&this.wb.parent(this.O()),this.I(1)}if(!i)return this;if(cv(this,2)&&(i&&((!this.hp.enabled()||$.p(this.enabled())&&!this.enabled())&&this.hp.Vd()&&(this.O()||this.O(e.Vd()),this.O().parent()||this.O().parent(e.O())),this.O()&&((t=Su(this))?this.wb.parent(this.O()):(this.f||(this.f=$.uk(),this.f.zIndex(1)),this.f.parent(this.wb),this.f.content(null),this.f.content(this.xb.Vd())))),this.I(2)),this.J(8)&&(this.O()&&this.O().zIndex(e.zIndex()),this.wb.zIndex(this.zIndex()),this.I(8)),this.J(1024)&&($.Yu(e,this.ma()),this.I(1024)),cv(this,20)){ev(this),this.b=null,t=Su(this);var n=null!==(i=$.Uu(this)).width,s=null!==i.height,a=i.useHtml,o=this.Hf(),r=this.tk(i.format,o,this.ma());this.wb.oc(1,0,0,1,0,0);var l,h=i.background,c=i.background;if(!$.C(c)||!c||"enabled"in c||(c.enabled=!1),(o=$.z(c)||$.da(c)||c&&c.enabled)||this.o?(this.o||(this.o=new $.yu,this.o.zIndex(0),this.o.O(this.wb)),this.ba&&this.o.N($.J(this.ba,$.yu)?this.ba.F():this.ba),this.o.N(c),this.o.W()):h&&(this.ba=h),this.Rh(),t?this.xb.parent(this.wb):(this.f||(this.f=$.uk(),this.f.zIndex(1)),this.f.parent(this.wb),this.f.content(this.xb.Vd())),this.G=Vu(this,(function(t,e){var i=$.J(e,$.Pu)?e.ja():$.J(e,$.Tu)?null:e.ja;if(i)return i})),this.G||(h=this.ja(),(e.O()||h)&&t?this.G=h||e.O().rb():this.G=$.kn(0,0,0,0)),this.G)var u=this.G.width,d=this.G.height;if(t?(this.xb.width(null),this.xb.height(null),a?this.xb.htmlText($.p(r)?String(r):""):this.xb.text($.p(r)?String(r):"")):this.xb.text($.p(r)?String(r):""),this.bi(this.xb,!0,i),t=new $.I(0,0,0,0),$.J(i.padding,$.Hu))var p=i.padding;else($.C(i.padding)||$.ea(i.padding)||$.z(i.padding))&&(p=new $.Hu,$.rd(this,p),p.N(i.padding));if(n||s){if(n){if(a=Math.ceil($.L(i.width,u)),p){var g=p.Ng(a);this.Lg=$.L(p.g("left"),a)}else this.Lg=0,g=a;t.width=a,a=!1}else a=(r=this.xb.rb()).width,p?(t.width=p.Lk(a),this.Lg=$.L(p.g("left"),t.width)):(this.Lg=0,t.width=a),a=!0;if($.p(g)&&this.xb.width(g),s){if(r=Math.ceil($.L(i.height,d)),p){var f=p.Yh(r);this.Mg=$.L(p.g("top"),r)}else this.Mg=0,f=r;t.height=r,r=!1}else r=(r=this.xb.rb()).height,p?(t.height=p.$j(r),this.Mg=$.L(p.g("top"),t.height)):(this.Mg=0,t.height=r),r=!0;$.p(f)&&this.xb.height(f)}else a=(r=this.xb.rb()).width,r=r.height,p?(t.width=p.Lk(a),this.Lg=$.L(p.g("left"),t.width),t.height=p.$j(r),this.Mg=$.L(p.g("top"),t.height)):(this.Lg=0,t.width=a,this.Mg=0,t.height=r),r=a=!0;(!a&&i.adjustByWidth||!r&&i.adjustByHeight)&&(l="different"==$.Ou(e)?$.iv(this,g,f,i.minFontSize,i.maxFontSize,i.adjustByWidth,i.adjustByHeight):Vu(this,(function(t,e){if($.J(e,$.Pu)&&$.p(e.Nd.fontSize))return e.Nd.fontSize})),this.ka(),this.xb.fontSize(l),n?(a=Math.ceil($.L(i.width,u)),t.width=a):(a=(r=this.xb.rb()).width,t.width=p?p.Lk(a):a),s?(r=Math.ceil($.L(i.height,d)),t.height=r):(r=(r=this.xb.rb()).height,t.height=p?p.$j(r):r),this.da(!1)),this.Bb=t,this.B(2048),this.I(20)}return cv(this,2048)&&(this.tf(this.Bb,this.G),o&&(this.o.ja(this.Bb),this.o.W()),this.b.rotation&&(e=$.Eo(this.Bb,this.b.anchor),e=$.Kb($.bb(this.b.rotation),e.x,e.y),this.wb.oc(e.od,e.We,e.gf,e.Le,e.Jd,e.Fd)),this.B(512),this.I(2048)),this.J(512)&&(this.Jt(),this.I(512)),cv(this,256)&&(this.wb&&this.wb.clip(this.b.clip),this.I(256)),this},$.g.Rh=function(){var t=$.J(this.xb,Cu),e=$.J(this.xb,$.Qh);return jv(this)&&(t&&this.f?this.f.parent(null):e&&this.xb&&this.xb.parent(null),Su(this)?(this.xb=new $.Qh,this.xb.Cd("aria-hidden","true"),this.xb.zIndex(1),this.xb.Dd(!0)):(this.xb=new Cu,this.xb.Vd().setAttribute("aria-hidden","true"))),this.xb},$.g.VK=function(t){var e=$.Uu(this).maxLength;return Du(t,e)},$.g.tk=function(t,e,i){return t=$.Wu(this.hp,t,e,i),this.VK(t)},$.g.F=function(){var t=$.Tu.u.F.call(this);if($.p(this.nd("background"))){var e=this.background().F();$.Jc(e)||(t.background=e)}return $.p(this.nd("padding"))&&(e=this.padding().F(),$.Jc(e)||(t.padding=e)),$.Tq(this,this.sR,t,"Labels factory label text"),$.Tq(this,this.oC,t,"Labels factory label props"),(e=t.adjustFontSize)&&($.p(e.width)||$.p(e.height))||delete t.adjustFontSize,this.ph("enabled")||delete t.enabled,t},$.g.U=function(t,e){var i=this.g("enabled");if($.Iq(this,this.sR,t),$.Iq(this,this.oC,t),$.Tu.u.U.call(this,t,e),$.p(t.enabled)||delete this.Pa.enabled,this.ta("enabled","enabled"in t?t.enabled:i),(i="background")in t){var n=this.background();e?n.ga(!!e,t[i]):this.background(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa}(i="padding")in t&&(n=this.padding(),e?n.ga(!!e,t[i]):this.padding(t[i]),this.oa[i]=n.oa,this.Pa[i]=n.Pa)},$.g.R=function(){$.sd(this.Ia,this.Wa,this.o,this.xb,this.wb,this.Rv),this.Rv=this.wb=this.Wa=this.Ia=this.xb=this.o=null,$.Tu.u.R.call(this)},$.H(kv,$.Pu),$.xu(kv,$.Pu),kv.prototype.vL=function(){return new lv},$.H(lv,$.Tu);var OF=$.Pu.prototype;OF.background=OF.background,OF.padding=OF.padding,OF.enabled=OF.enabled,OF.getLabel=OF.be,OF.getLabelsCount=OF.jI,OF=$.Tu.prototype,OF.getIndex=OF.ma,OF.padding=OF.padding,OF.background=OF.background,OF.clear=OF.clear,OF.measureWithText=OF.Pha,OF.draw=OF.W,OF=kv.prototype,$.E("anychart.standalones.labelsFactory",(function(){var t=new kv;return t.ga(!0,$.nm("standalones.labelsFactory")),t})),OF.draw=OF.W,OF.parentBounds=OF.ja,OF.container=OF.O,OF.add=OF.add,OF.clear=OF.clear,OF.measure=OF.measure,OF.measureWithTransform=OF.yl,$.g=mv.prototype,$.g.lg=function(t){return $.p(t)?(this.pc.lg=t,this):this.pc.lg},$.g.Li=function(t){return $.p(t)?(this.pc.Li=t,this):this.pc.Li},$.g.Im=function(t){return $.p(t)?(this.pc.Im=t,this):this.pc.Im},$.g.Dl=function(t){return $.p(t)?(this.pc.Dl=t,this):this.pc.Dl},$.g.getData=function(t){var e=this.pc.lg;return e?e.get.apply(e,arguments):void 0},$.g.no=function(t){var e=this.pc.lg?this.pc.lg.j(t):void 0;return $.p(e)||(e=(e=this.pc.values.series)?e.value.j(t):void 0),e},$.g.Rg=function(t){var e=void 0;if(t)for(var i=0;i<this.pc.Li.length&&(e=(e=this.pc.Li[i])&&e.Rg?e.Rg(t):void 0,!$.p(e));i++);return e},$.eq.format.Context=function(t,e,i){$.eq.format.Context.XF(this,"constructor",t,e,i)},$.H($.eq.format.Context,mv),$.Fw=$.eq.format.Context,$.E("anychart.format.Context",$.Fw);var PF=$.Fw.prototype;PF.getData=PF.getData,PF.getMeta=PF.no,PF.getStat=PF.Rg;var Nda=-1!=Bc.indexOf("PhantomJS"),Bca=!($.xd&&!Nda&&$.bd("534")&&!$.bd("536"));$.H($.pv,$.V),$.g=$.pv.prototype,$.g.ra=1,$.g.label=function(t){return this.i||(this.i=this.b.tL(),$.K(this.i,this.Caa,this),this.i.Ga("defaultFontSettings","defaultLabelSettings","defaultNoDataLabel"),$.W(this,"label",this.i)),$.p(t)?(this.i.N(t),this):this.i},$.g.Caa=function(){this.va(1)},$.g.U=function(t,e){$.pv.u.U.call(this,t,e),this.label().ga(!!e,t.label)},$.g.R=function(){$.qd(this.i),$.pv.u.R.call(this)},$.H(qv,$.V),$.g=qv.prototype,$.g.sa=16,$.g.ra=2,$.g.text=function(t){return rv(this,"text",t)},$.g.qR=function(t){return rv(this,"url",t)},$.g.nR=function(t){return rv(this,"alt",t)},$.g.oR=function(t){return rv(this,"imgAlt",t)},$.g.pR=function(t){return rv(this,"logoSrc",t)},$.g.enabled=function(t){return rv(this,"enabled",t)},$.g.F=function(){var t={},e=this.text(),i=this.qR(),n=this.nR(),s=this.oR(),a=this.pR(),o=this.enabled();return $.p(e)&&(t.text=e),$.p(i)&&(t.url=i),$.p(n)&&(t.alt=n),$.p(s)&&(t.imgAlt=s),$.p(a)&&(t.logoSrc=a),$.p(o)&&(t.enabled=o),t},$.g.Zd=function(t){return $.z(t)?{text:t,enabled:!0}:$.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&("text"in i&&this.text(i.text),this.enabled(i.enabled),!0)},$.g.U=function(t){this.ka(),this.text(t.text),this.qR(t.url),this.nR(t.alt),this.oR(t.imgAlt),this.pR(t.logoSrc),this.enabled(t.enabled),this.da(!0)};var QF=qv.prototype;QF.text=QF.text,QF.url=QF.qR,QF.alt=QF.nR,QF.imgAlt=QF.oR,QF.logoSrc=QF.pR,QF.enabled=QF.enabled,$.H(tv,$.Y),tv.prototype.ra=8|$.Y.prototype.ra,tv.prototype.sa=16|$.Y.prototype.sa;var RF={};$.sq(RF,[[0,"fontSize",$.wq],[0,"fontFamily",$.zq],[0,"fontColor",$.zq],[0,"fontOpacity",$.er],[0,"fontDecoration",$.bl],[0,"fontStyle",$.cl],[0,"fontVariant",$.dl],[0,"fontWeight",$.wq],[0,"letterSpacing",$.wq],[0,"textDirection",$.el],[0,"textShadow",$.Zb],[0,"lineHeight",$.wq],[0,"textIndent",$.wq],[0,"vAlign",$.al],[0,"hAlign",$.$k],[0,"wordWrap",$.zq],[0,"wordBreak",$.zq],[0,"textOverflow",$.zq],[0,"selectable",$.Dq],[0,"disablePointerEvents",$.Dq],[0,"useHtml",$.Dq]]),$.U(tv,RF);var SF={};$.rq(SF,0,"text",$.Aq),$.g=tv.prototype,$.g.parent=function(t){if($.p(t)){if(this.Y!=t){var e=String($.oa(this));null===t?($.kr(this.Y,this.Tc,this),delete this.Y.Uc[e],this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,this.Y.Uc[e]=this,$.K(this.Y,this.Tc,this))}return this}return this.Y},$.g.Tc=function(t){var e=16,i=1;($.X(t,8)||$.X(t,1))&&(e|=4,i|=8),$.X(t,32768)&&(e|=1),this.Xb=null,this.B(e,i)},$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e))return this.Pa[t];t in RF&&this[t](e)}else if($.C(t)){for(var i in this.ka(),t)t.hasOwnProperty(i)&&this.$d(i,t[i]);this.da(!0)}return this}for(var n in i={},RF){var s=this.g(n);$.p(s)&&(i[n]=s)}return i},$.g.bi=function(t,e){for(var i in RF)if(RF.hasOwnProperty(i)){switch(i){case"fontColor":var n="color";break;case"textDirection":n="direction";break;case"fontOpacity":n="opacity";break;case"fontDecoration":n="decoration";break;default:n=i}"useHtml"==n||!e&&t[n]()===this.g(i)||t[n](this.g(i))}if("text"in this.ua){i=this.g("text");var s=(n=!!this.g("useHtml"))?t.htmlText():t.text();(e||i!==s)&&(n?t.htmlText(i):t.text(i))}},$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!=t&&(this.Pa.enabled=t,this.B(1,32777),this.Pa.enabled?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},$.g.F=function(){var t=tv.u.F.call(this);return $.Tq(this,RF,t,"Text"),t},$.g.U=function(t,e){tv.u.U.call(this,t,e),e?$.Hq(this.oa,RF,t):$.Iq(this,RF,t)};var TF=tv.prototype;TF.textSettings=TF.$d,$.H(uv,tv),$.U(uv,SF),uv.prototype.ra=tv.prototype.ra,uv.prototype.sa=64|tv.prototype.sa,uv.prototype.ea=function(){var t=this.g("adjustFontSize");t&&(t.width||t.height)&&this.B(4,9)};var UF=function(){var t={};return $.rq(t,0,"position",$.Ek),$.rq(t,0,"width",$.br),$.rq(t,0,"height",$.br),$.rq(t,0,"anchor",(function(t){return null===t?null:$.Dk(t)})),$.rq(t,0,"offsetX",$.yo),$.rq(t,0,"offsetY",$.yo),$.rq(t,0,"rotation",$.xq),$.rq(t,1,"adjustFontSize",yq),$.rq(t,0,"minFontSize",$.Bq),$.rq(t,0,"maxFontSize",$.Bq),t}();$.U(uv,UF),$.g=uv.prototype,$.g.parent=function(t){var e=uv.u.parent.call(this);return $.p(t)?(e!=t&&(uv.u.parent.call(this,t),null===t?(this.background().parent(null),this.padding().parent(null)):(this.background().df().parent(t.background()),this.padding().parent(t.padding()))),this):e},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,this.Ia.Wj(!0),$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.V1=function(){var t=this.g("rotation");return null==t||(0,window.isNaN)(t)?this.na:t},$.g.qk=function(t){return $.p(t)?(this.ba!=t&&(this.ba=t,this.g("anchor")||this.B(4,9)),this):this.ba},$.g.vA=function(){return this.g("anchor")||this.qk()},$.g.sl=function(){return this.Oa},$.g.fo=function(t,e,i,n){var s=this.g("adjustFontSize");if(s)if(s.width&&s.height){if(t>i||e>n)return 1;if(t<i||e<n)return-1}else if(s.width){if(t<i)return-1;if(t>i)return 1}else if(s.height){if(e<n)return-1;if(e>n)return 1}return 0},$.g.dS=function(t,e){var i=this.g("minFontSize"),n=this.g("maxFontSize"),s=Math.round((n+i)/2),a=n,o=$.sk();if(o.Cd("aria-hidden","true"),this.bi(o,!0),o.fontSize(n),0>=this.fo(o.rb().width,o.rb().height,t,e))return n;o.fontSize(s);for(var r=n=this.fo(o.rb().width,o.rb().height,t,e);i!=a;){if(0>n)i=Math.min(s+1,a),s+=Math.floor((a-s)/2);else{if(!(0<n))break;a=Math.max(s-1,i),s-=Math.ceil((s-i)/2)}if(o.fontSize(s),0>=r*(n=this.fo(o.rb().width,o.rb().height,t,e)))break}if(!n)return $.qd(o),s;do{s+=r,o.fontSize(s),n=this.fo(o.rb().width,o.rb().height,t,e)}while(0>r*n);return $.qd(o),0<r&&(s-=r),s},$.g.Z1=function(){return this.ja()},$.g.rR=function(){return this.g("position")||"center"},$.g.tf=function(){var t=this.ja()||$.kn(0,0,0,0),e=t.left,i=t.top,n=t.width,s=t.height;t=new $.I(0,0,this.Oi,this.Ni);var a=new $.gb(0,0);if(this.ja())switch(this.rR()){case"left-top":a.x=e,a.y=i;break;case"left-center":a.x=e,a.y=i+s/2;break;case"left-bottom":a.x=e,a.y=i+s;break;case"center-top":a.x=e+n/2,a.y=i;break;case"center":a.x=e+n/2,a.y=i+s/2;break;case"center-bottom":a.x=e+n/2,a.y=i+s;break;case"right-top":a.x=e+n,a.y=i;break;case"right-center":a.x=e+n,a.y=i+s/2;break;case"right-bottom":a.x=e+n,a.y=i+s}else a.x=0,a.y=0;return e=$.Eo(new $.I(0,0,this.Oi,this.Ni),this.vA()),a.x-=e.x,a.y-=e.y,n=$.p(this.g("offsetX"))?$.L(this.g("offsetX"),n):0,s=$.p(this.g("offsetY"))?$.L(this.g("offsetY"),s):0,$.Yo(a,this.vA(),n,s),this.Lg+=a.x,this.Mg+=a.y,t.left=a.x,t.top=a.y,this.xb.x(this.Lg).y(this.Mg),t},$.g.W=function(){if(!this.zc())return this;var t=wv(this),e=this.O();return this.J(16)&&(this.bi(this.xb,t),this.I(16)),(t=$.wr(this,"background"))&&!t.O()&&t.O(this.Oa),this.J(2)&&(t&&t.W(),this.xb&&this.xb.parent(this.Oa),this.Oa.parent(e),this.I(2)),this.J(8)&&(t&&t.zIndex(0),this.xb&&this.xb.zIndex(1),this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(vv(this),this.K=this.tf(),this.B(64)),this.J(64)&&(t&&(t.Wj(!1),t.ka(),t.ja(this.K),t.W(),t.da(!1)),this.I(64)),this.J(4)&&(this.Oa.oc(1,0,0,1,0,0),e=this.V1(),t=this.vA(),$.p(e)&&!(0,window.isNaN)(e)||(e=0),t=$.Eo(this.K,t),this.Oa.JE(e,t.x,t.y),this.I(4)),this},$.g.remove=function(){this.Oa.parent(null)},$.g.yi=function(){if(this.J(16)){var t=wv(this);this.bi(this.xb,t),this.I(16)}return this.J(4)&&vv(this),new $.I(0,0,this.Oi,this.Ni)},$.g.F=function(){var t=uv.u.F.call(this);return $.Tq(this,SF,t,"Label Base Text"),$.Tq(this,UF,t,"Label Base"),t.background=this.background().F(),t.padding=this.padding().F(),t},$.g.Zd=function(t){return $.z(t)?{text:t,enabled:!0}:null},$.g.Ie=function(t,e){var i=this.Zd(arguments[1]);return i?(t?this.oa.text!==i.text&&(this.oa.text=i.text,this.B(20,9)):this.Pa.text!==i.text&&(this.Pa.text=i.text,this.B(20,9)),this.enabled(i.enabled),!0):$.Y.prototype.Ie.apply(this,arguments)},$.g.U=function(t,e){uv.u.U.call(this,t,e),$.Iq(this,SF,t,e),$.Iq(this,UF,t,e),this.background().ga(!!e,t.background),this.padding().ga(!!e,t.padding)},$.g.R=function(){$.sd(this.Wa,this.Ia,this.xb,this.Oa),delete this.Wa,delete this.Ia,delete this.xb,delete this.Oa,uv.u.R.call(this)},$.H($.xv,uv),$.xv.prototype.sa=128|uv.prototype.sa;var VF={};$.rq(VF,0,"visible",$.Dq),$.U($.xv,VF),$.xv.prototype.U=function(t,e){$.xv.u.U.call(this,t,e),e&&$.Iq(this,VF,t)},$.xv.prototype.W=function(){return this.zc()?($.xv.u.W.call(this),this.J(128)&&(this.sl().visible(this.g("visible")),this.I(128)),this):this},$.H(yv,$.xv),$.xu(yv,$.xv);var WF=$.xv.prototype;WF.background=WF.background,WF.padding=WF.padding,WF.draw=WF.W,WF=yv.prototype,$.E("anychart.standalones.label",(function(){var t=new yv;return t.N($.nm("standalones.label")),t})),WF.draw=WF.W,WF.parentBounds=WF.ja,WF.container=WF.O,$.H(zv,tv);var XF=function(){var t={};return $.sq(t,[[0,"x",$.Cq],[0,"y",$.Cq],[0,"iconType",function(t){return $.z(t)?$.Vk(t):t}],[0,"iconTextSpacing",function(t){var e=Number(t);return null===t?this.vf("iconTextSpacing"):(0,window.isNaN)(e)?this.g("iconTextSpacing"):e}],[0,"maxWidth",$.Cq],[0,"maxHeight",$.Cq],[1,"iconFill",$.Qq],[1,"iconStroke",$.Pq],[1,"iconHatchFill",$.Rq]]),t}();$.U(zv,SF),$.U(zv,XF),$.g=zv.prototype,$.g.ra=2|tv.prototype.ra,$.g.sa=tv.prototype.sa,$.g.Ay=function(t){return $.p(t)?(t=!!t,this.Fs!=t&&(this.Fs=t,this.Zy=!0,this.$b=null,this.B(20,1)),this):this.Fs},$.g.disabled=function(t){return $.p(t)?(this.fq!=t&&(this.fq=t,this.Zy=!0,this.B(16),this.W()),this):this.fq},$.g.iw=function(t){return $.p(t)?($.D(t)||(t=null===t?null:$.Ok(t)),this.jw!=t&&(this.jw=t,this.Zy=!0,this.B(16,1)),this):this.jw},$.g.gu=function(t,e,i,n,s,a,o){if($.p(t)){var r=$.Ub.apply(null,arguments);return this.gw!=r&&(this.gw=r,this.Zy=!0,this.B(16,1)),this}return this.gw},$.g.hu=function(t,e,i,n,s){if($.p(t)){var a=$.Wb.apply(null,arguments);return this.hw!=a&&(this.hw=a,this.Zy=!0,this.B(16,1)),this}return this.hw},$.g.vJ=function(t){return $.p(t)?(this.Fka=$.N(t),this):this.Fka},$.g.Ki=function(t){return $.p(t)?(this.Eka=t,this):this.Eka},$.g.j=function(t){return $.p(t)?(this.Ci=t,this):this.Ci},$.g.dV=function(t){return $.p(t)?(this.V2=t,this):this.V2},$.g.kw=function(t){return $.p(t)?(t=$.N(t),this.pp!=t&&(this.pp=t,this.$b=null,this.B(4,9)),this):this.pp},$.g.remove=function(){this.wb&&this.wb.parent(null)},$.g.W=function(){if(!this.zc())return this;var t;if((t=!this.lw)&&(this.lw=this.wb.path(),this.lw.oc(1,0,0,1,0,0)),this.KO||(this.KO=this.wb.rect().zIndex(5).stroke(null).fill("#FFFFFF 0.00001")),this.wb.cursor(this.dV()),!$.p(this.g("iconHatchFill"))||$.cp(this.g("iconHatchFill"))||this.Es||(this.Es=this.wb.path(),this.Es.oc(1,0,0,1,0,0),this.Es.stroke("none")),this.J(8)){var e=this.zIndex();this.wb.zIndex(e),this.I(8)}if(this.J(2)&&(e=this.O(),this.wb.parent(e),this.I(2)),e=this.g("iconType"),e=$.z(e)?tca(e):e,this.J(16)&&(Dv(this,this.za,t),this.Zy&&!t&&(Cv(this,e),this.Zy=!1),Ev(this,this.za),this.I(16)),this.J(4)){this.yi(),Cv(this,e),this.KO.Qf($.kn(0,0,this.$b.width,this.$b.height)),this.Zy=!1;var i=this.ad.ea;if(e=this.Fs?this.pp+this.g("iconTextSpacing"):0,this.ad.x(e),1<i.length){var n=$.$b(this.g("iconStroke"));e=0;for(var s=0,a=(i=i[0]).length;s<a;s++)e=Math.max(e,i[s].height);e=(n=Math.max(e,this.pp+n)/2)-e/2}else e=(n=this.$b.height/2)-this.YW.height/2;this.ad.y(e),this.lw.oc(1,0,0,1,0,n-this.pp/2),this.wb.oc(1,0,0,1,this.$b.left,this.$b.top),Dv(this,this.za,t),this.I(4)}return this},$.g.yi=function(){return this.enabled()?(this.$b||this.Mm(),this.$b):new $.I(0,0,0,0)},$.g.ob=function(){return this.$b||this.Mm(),this.$b},$.g.uo=function(){this.$b=null,zv.u.uo.call(this)},$.g.Mm=function(){var t=this.ja(),e=this.text(),i=(e=(null===e||0>e.indexOf("\n"))&&!this.g("useHtml")?this.YW:this.ad.rb()).width,n=e.height,s=$.$b(this.g("iconStroke")),a=this.pp+s;if(t)var o=t.width,r=t.height;else o=r=void 0;var l=$.L(this.g("maxWidth"),o);s=o?$.L(this.g("x"),o):0,r=r?$.L(this.g("y"),r):0;var h=this.Fs?a+this.g("iconTextSpacing"):0;if(this.SF=window.NaN,l?(o=l-h,i&&i>o&&"..."==this.ad.textOverflow()?this.SF=o/i:(this.ad.width(o),e=this.ad.rb()),i=l):(l=o?Math.min(o-h,i):i,l=Math.max(l,1e-5),"..."==this.ad.textOverflow()&&i&&i>l&&(this.SF=l/i),i=l+h),1<(l=this.ad.ea).length){for(n=0,a=l[0],l=0,o=a.length;l<o;l++)n=Math.max(n,a[l].height);n=Math.max(n/2,this.pp/2)+Math.max(e.height-n/2,this.pp/2)}else n=Math.max(this.Fs?a:0,n);this.$b=t?new $.I(t.tb()+s,t.Vb()+r,i,n):new $.I(s,r,i,n)},$.g.zd=function(){return this.ob().width},$.g.qd=function(){return this.ob().height},$.g.UK=function(){this.Oo=this.No=0,this.Fs=!0,this.fq=!1,this.iconType("square"),this.iconFill("black"),this.iconStroke("none"),this.iconHatchFill(null),this.jw=null,this.hw=this.gw="none",this.iconTextSpacing(5)},$.g.clear=function(){return this.ka(),this.$b=null,this.Pa={},this.UK(),this.jg(null),this.Lja=this.Ki(),this.Mja=this.vJ(),this.vJ(window.NaN),this.Ki(window.NaN),this.j(null),this.ta("maxWidth",null),this.ta("maxHeight",null),this.remove(),this.B(4294967295),this.da(!1),this},$.g.Rh=function(){return this.ad},$.g.U=function(t,e){zv.u.U.call(this,t,e),$.Iq(this,XF,t,e),$.Iq(this,SF,t,e),this.Ay(t.iconEnabled),this.iw(t.iconMarkerType),this.gu(t.iconMarkerFill),this.hu(t.iconMarkerStroke),this.disabled(t.disabled),this.vJ(t.sourceUid),this.Ki(t.sourceKey),this.j(t.meta),this.dV(t.hoverCursor),this.kw(t.iconSize)},$.g.R=function(){zv.u.R.call(this),this.ZW=null,$.sd(this.wb,this.ad,this.$l,this.lw,this.KO,this.Es),this.Es=this.KO=this.lw=this.$l=this.ad=this.wb=null};var YF=zv.prototype;YF.getTextElement=YF.Rh,YF.getContentBounds=YF.yi,YF.getWidth=YF.zd,YF.getHeight=YF.qd,YF.draw=YF.W,$.H($.Hv,tv),$.U($.Hv,SF),$.Hv.prototype.ra=tv.prototype.ra,$.Hv.prototype.sa=192|tv.prototype.sa;var Gv=2;$.g=$.Hv.prototype,$.g.Lu=29|Gv,$.g.xb=null,$.g.mj=null,$.g.state=function(t,e){return $.p(e)?(this.Ku(t)&&e!=this.state(t)&&(this.dc=e?t:this.dc&~t,0==this.dc&&(this.dc=Gv),this.B(64,1)),this):!!(this.dc&t)},$.g.Ku=function(t,e){return $.p(e)?(!e&&this.state(t)&&this.state(t,!1),this.Lu=e?this.Lu|t:this.Lu&~t,this):!!(this.Lu&t)},$.g.Qa=function(t){return this.state(Gv,t)},$.g.Tj=function(t){return this.state(4,t)},$.g.Rja=function(){this.state(8,!0)},$.g.checked=function(t){return this.state(16,t)},$.g.disabled=function(t){return this.state(1,t)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.position=function(t){return $.p(t)?(this.af=t,this.B(4,9),this):this.af},$.g.width=function(t){return $.p(t)?(this.Yf!=t&&(this.Yf=t,this.B(20,9)),this):this.Yf},$.g.height=function(t){return $.p(t)?(this.Jf!=t&&(this.Jf=t,this.B(20,9)),this):this.Jf},$.g.$x=function(t){this.$d(t),(t=!this.xb)&&(this.xb=$.sk(),this.xb.Cd("aria-hidden","true"),$.ru(this,this.xb,this.po,this.hg,null,null,this.Sj,this.tr),this.xb.Dd(!0)),this.bi(this.xb,t),this.J(4)&&(Iv(this),t=new $.I(0,0,this.GC.width,this.GC.height),this.xb.x(this.Lg),this.xb.y(this.Mg),this.xb.clip(t),this.xb.oc(1,0,0,1,0,0),this.xb.translate(this.GC.left,this.GC.top),this.B(64),this.I(4))},$.g.XL=function(t,e){this.mj||(this.mj=$.qk(),$.ru(this,this.mj,this.po,this.hg,null,null,this.Sj,this.tr));var i=this.mj,n=this.GC;i.clear();var s=n.left,a=n.top,o=n.width;n=n.height,i.moveTo(s,a).lineTo(s+o,a).lineTo(s+o,a+n).lineTo(s,a+n).close(),i.fill(t),i.stroke(e)},$.g.Lj=function(t){this.J(16)&&(this.$x(t.text),this.I(16)),this.J(4)&&(Iv(this),this.$x(t.text),this.B(64),this.I(4)),this.J(64)&&(this.XL(t.fill,t.stroke),this.I(64))},$.g.W=function(){if(!this.zc())return this;this.ka();var t=$.fd(this.p6);switch(this.dc){case 0:throw Error("Undefined button state.");case 4:this.Lj(t.hover);break;case 8:this.Lj(t.pushed);break;case 16:this.Lj(t.checked);break;case 1:this.Lj(t.disabled);break;default:this.Lj(t.normal)}return this.da(!0),this.J(8)&&(t=this.zIndex(),this.mj&&this.mj.zIndex(t),this.xb&&this.xb.zIndex(t),this.I(8)),this.J(2)&&(t=this.O(),this.mj&&this.mj.parent(t),this.xb&&this.xb.parent(t),this.I(2)),this.J(128)&&(this.xb&&this.xb.cursor(this.cursor()),this.mj&&this.mj.cursor(this.cursor()),this.I(128)),this},$.g.remove=function(){this.xb&&this.xb.parent(null),this.mj&&this.mj.parent(null)},$.g.po=function(t){this.disabled()||this.qE||this.checked()||this.oh(t)&&this.Tj(!0)},$.g.hg=function(t){this.disabled()||this.qE||this.checked()||(this.qE=!1,this.oh(t)&&this.Qa(!0))},$.g.Sj=function(t){t.preventDefault(),this.disabled()||(this.qE=!0,this.oh(t)&&this.Rja())},$.g.tr=function(t){!this.disabled()&&this.qE&&this.oh(t)&&(this.qE=!1,t=t.target==this.mj||t.target==this.xb,this.Ku(16)&&(this.lL=!this.lL)?this.checked(this.lL):t?(this.Tj(!0),$.D(this.hO)&&this.hO(this)):this.Qa(!0))},$.g.TH=function(){this.p6={normal:{stroke:"#dedede",fill:"#e7e7e7",text:{fontColor:"#7c868e"}},hover:{stroke:"#cecece",fill:"#eee",text:{fontColor:"#7c868e"}},pushed:{stroke:"#d0d0d0",fill:"#d9d9d9",text:{fontColor:"#333"}},checked:{stroke:"1 #666 1",fill:{keys:["0 #ffffff","0.5 #e7e7e7","1 #d0d0d0"],angle:"90"},text:{fontColor:"#000"}},disabled:{stroke:"1 #666 1",fill:"#aaa",text:{fontColor:"#777"}}}},$.g.cursor=function(t){return $.p(t)?(t=Ck(t,"default"),this.VC!=t&&(this.VC=t,this.B(128,1)),this):this.VC},$.g.R=function(){$.sd(this.Wa,this.xb,this.mj),this.mj=this.xb=this.Wa=null,$.Hv.u.R.call(this)},$.H(Kv,$.Hv),Kv.prototype.$x=$.ia,Kv.prototype.XL=function(t,e){this.mj||(this.mj=$.qk(),this.mj.cursor("pointer"),$.ru(this,this.mj,this.po,this.hg,null,null,this.Sj,this.tr)),this.mj.clear(),this.b(this.mj,this.GC),this.mj.fill(t),this.mj.stroke(e)},Kv.prototype.TH=function(){this.p6=this.oa},Kv.prototype.R=function(){$.qd(this.mj),this.mj=null,Kv.u.R.call(this)},$.H($.Mv,Eu),$.Mv.prototype.Ej=function(t){var e=this.Ng(t.width),i=this.Yh(t.height),n=$.L(this.g("left"),e),s=$.L(this.g("top"),i);return new $.I(t.left+n,t.top+s,e,i)},$.Mv.prototype.Yh=function(t){var e=this.g("top"),i=this.g("bottom"),n=1;return $.uo(e)?n+=(0,window.parseFloat)(e)/100:t-=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n+=(0,window.parseFloat)(i)/100:t-=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},$.Mv.prototype.Ng=function(t){var e=this.g("left"),i=this.g("right"),n=1;return $.uo(e)?n+=(0,window.parseFloat)(e)/100:t-=$.ea(e)?e:(0,window.parseFloat)(e),$.uo(i)?n+=(0,window.parseFloat)(i)/100:t-=$.ea(i)?i:(0,window.parseFloat)(i),n||(n=1e-7),t/n},$.H(Sv,tv);var ZF={};$.sq(ZF,[[0,"orientation",$.Lk],[0,"layout",$.Gk]]),$.U(Sv,SF),$.U(Sv,ZF),$.g=Sv.prototype,$.g.ra=tv.prototype.ra,$.g.sa=64|tv.prototype.sa,$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.Pk,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.i2=function(){return this.P},$.g.UC=function(t){if($.p(t)){if(t=(0,window.isNaN)((0,window.parseFloat)(t))?0:+t,--t,this.aa!=t){if(!(0<=t&&t<this.P))throw Error("incorrect currentPage value!!");this.aa=t,this.B(16,1)}return this}return this.aa+1},$.g.remove=function(){var t=$.wr(this,"background");t&&t.remove(),this.o&&(this.o.remove(),this.o.B(2)),this.i&&(this.i.remove(),this.i.B(2)),this.kc&&this.kc.parent(null)},$.g.zc=function(){return!(this.pf()||(Wv(this)?this.O()?(this.I(1),0):(this.remove(),this.B(2),$.il(1),1):(this.J(1)&&(this.remove(),this.I(1),this.B(2)),1)))},$.g.W=function(){if(!this.zc())return this;var t,e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),(t=!this.kc)&&(this.kc=$.sk(),this.kc.Cd("aria-hidden","true"));var s=$.wr(this,"background");if(s&&s.ka(),this.J(4)&&Xv(this),this.J(2)&&(s&&s.O(e).W(),this.o&&this.o.O(e),this.kc&&this.kc.parent(e),this.i&&this.i.O(e),this.I(2)),this.J(64)&&(s&&(s.ja(this.D,this.G,this.f,this.b),s.W()),this.I(64)),this.J(8)&&(e=this.zIndex(),s&&s.zIndex(e),this.o&&this.o.zIndex(e),this.kc&&this.kc.zIndex(e),this.i&&this.i.zIndex(e),this.I(8)),this.J(16)&&(this.ka(),this.ta("text",Uv(this)),this.da(!1),this.bi(this.kc,t),this.B(4),this.I(16)),this.J(4)){this.ba.textContent=Uv(this),e=(t=this.ba.getBBox()).height;var a,o=this.ja();this.o.width(e).height(e).ja(o),this.i.width(e).height(e).ja(o);var r=$.L(this.padding().g("top"),this.b);o=$.L(this.padding().g("left"),this.f);var l=this.padding().Ng(this.f),h=this.padding().Yh(this.b);switch(r=this.G+r+(h-t.height)/2,o=this.D+o+(l-t.width)/2,this.g("layout")){case"horizontal":var c=a=r,u=o-10-e,d=o+t.width+10;break;case"vertical":c=r-10-e,a=r+t.height+10,u=d=o+(t.width-e)/2}this.o.position({x:u,y:c}),this.kc.oc(1,0,0,1,0,0),this.kc.translate(o,r),this.i.position({x:d,y:a}),this.o.disabled(!this.aa),this.i.disabled(this.aa+1==this.P),this.o.W(),this.i.W(),this.I(4)}return s&&s.da(!1),n&&i.resume(),this},$.g.ob=function(){return Yv(this)},$.g.yd=function(){this.$b&&!this.J(4)||Xv(this);var t=this.ja();if(t=t?t.clone():$.kn(0,0,0,0),!this.enabled())return t;switch(this.g("orientation")){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.F=function(){var t=Sv.u.F.call(this);return $.Tq(this,ZF,t),t.background=this.background().F(),t.padding=this.padding().F(),t.margin=this.margin().F(),t},$.g.U=function(t,e){Sv.u.U.call(this,t,e),$.Iq(this,ZF,t,e),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin),"background"in t&&this.background().ga(!!e,t.background)},$.g.R=function(){$.sd(this.o,this.i,this.Wa,this.Qc,this.Ia,this.kc),this.kc=this.Ia=this.Qc=this.Wa=this.i=this.o=null,$.Xe(this.ba),Sv.u.R.call(this)};var $F=Sv.prototype;$F.background=$F.background,$F.padding=$F.padding,$F.margin=$F.margin,$F.currentPage=$F.UC,$F.getPagesCount=$F.i2,$.H(Zv,$.Y),Zv.prototype.ra=32768|$.Y.prototype.ra,Zv.prototype.sa=20|$.Y.prototype.sa;var Oda=Zv.prototype,aG={};$.rq(aG,1,"fill",$.Nq),$.rq(aG,1,"stroke",$.Jq),$.rq(aG,0,"width",$.br),$.rq(aG,0,"height",$.br),$.rq(aG,0,"orientation",$.Lk),Oda.LQ=aG,$.U(Zv,Zv.prototype.LQ),$.g=Zv.prototype,$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(this.Y&&$.kr(this.Y,this.Tc,this),(this.Y=t)?($.K(this.Y,this.Tc,this),this.margin().parent(this.Y.margin())):this.margin().parent(null)),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=1),this.B(e,i)},$.g.uo=function(){this.B(20,9)},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.$A,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.bf=function(t){return $.p(t)?(this.ep!=t&&(this.ep=t,this.B(16,1)),this):this.ep},$.g.W=function(){if(!this.zc())return this;this.Sc||(this.Sc=$.qk());var t=this.O(),e=t?t.Ja():null,i=e&&!e.yf();if(i&&e.suspend(),this.J(4)&&($v(this),this.I(4)),this.J(16)){this.Sc.fill(this.g("fill")),this.Sc.stroke(this.g("stroke")),this.Sc.clear();var n=new $.I(this.D,this.G,this.f,this.b);this.ep&&$.D(this.ep)&&this.ep(this.Sc,n),this.I(16)}return this.J(2)&&(this.enabled()&&this.Sc.parent(t),this.I(2)),this.J(8)&&(t=this.zIndex(),this.Sc.zIndex(t),this.I(8)),i&&e.resume(),this},$.g.remove=function(){this.Sc&&this.Sc.parent(null)},$.g.yi=function(){return this.$b&&!this.J(4)||$v(this),new $.I(0,0,this.$b.width,this.$b.height)},$.g.yd=function(){this.$b&&!this.J(4)||($v(this),this.I(4));var t=this.ja()||$.kn(0,0,0,0);if(!this.enabled())return t;switch(this.g("orientation")){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.$A=function(t){$.X(t,2)&&this.B(20,9)},$.g.Nb=function(){var t=this.g("orientation");return!$.p(t)||"top"==t||"bottom"==t},$.g.F=function(){var t=Zv.u.F.call(this);$.Tq(this,this.LQ,t,"Separator");var e=this.margin().F();return $.Jc(e)||(t.margin=e),t},$.g.U=function(t,e){Zv.u.U.call(this,t,e),$.Iq(this,this.LQ,t,e),"margin"in t&&this.margin().ga(!!e,t.margin)},$.g.R=function(){$.sd(this.Qc,this.Sc),this.Sc=this.Qc=null,Zv.u.R.call(this)};var bG=Zv.prototype;bG.margin=bG.margin,bG.getRemainingBounds=bG.yd,$.H($.aw,$.Y),$.aw.prototype.ra=32768|$.Y.prototype.ra,$.aw.prototype.sa=80|$.Y.prototype.sa,$.aw.prototype.o=$.vq(),$.U($.aw,$.aw.prototype.o),$.aw.prototype.K=function(){var t={};return $.sq(t,[[0,"width",$.br],[0,"height",$.br],[0,"align",Fk],[0,"orientation",function(t){return this.r3?"bottom"==t?t:"top":$.Lk(t)}],[0,"rotation",$.Bq],[0,"text",$.zq],[0,"maxLength",$.xq]]),t}(),$.U($.aw,$.aw.prototype.K),$.g=$.aw.prototype,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=function(){var t=this.jg();return t||(t=$.Ga(this.Wd(),bw(this),this.Xd()),this.jg(t)),t},$.g.Xd=function(){var t=[this.Nd];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=$.ir,$.g.ys=function(){return 9},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(this.Y&&$.kr(this.Y,this.Tc,this),(this.Y=t)?($.K(this.Y,this.Tc,this),this.background().df().parent(this.Y.background()),this.padding().parent(this.Y.padding()),this.margin().parent(this.Y.margin())):(this.background().parent(null),this.padding().parent(null),this.margin().parent(null))),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=32769),this.Xb=null,this.B(e,i)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.zB=function(t){this.P=0>t?null:t,$.p(this.height())||this.B(4)},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.Pk,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.Pk,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e))return this.nd(t);t in this.o&&this[t](e)}else if($.C(t))for(var i in t)i in this.o&&this[i](t[i]);return this}for(var n in i={},this.o){var s=this.g(n);$.p(s)&&(i[n]=s)}return i},$.g.W=function(){if(!this.zc())return this;var t=fw(this),e=this.O();return this.ka(),this.J(2)&&(this.wb.parent(e),this.I(2)),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(16)&&(this.bi(t),this.I(16)),this.J(4)&&(gw(this),this.kc.x($.L(this.padding().g("left"),this.f)),this.kc.y($.L(this.padding().g("top"),this.b)),this.wb.oc(this.i.od,this.i.We,this.i.gf,this.i.Le,this.i.Jd,this.i.Fd),this.B(64),this.I(4)),this.J(64)&&((t=this.background()).ka(),t.ja(0,0,this.f,this.b),t.W(),t.da(!1),this.I(64)),this.da(!1),this},$.g.remove=function(){this.wb?this.wb.parent(null):this.kc&&this.kc.parent(null)},$.g.yd=function(){var t=this.ja();if(t=t?t.clone():$.kn(0,0,0,0),!this.enabled())return t;switch(this.$b&&!this.J(4)||gw(this),this.g("orientation")){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.hH=ba(3),$.g.yi=function(){return this.enabled()?(this.$b&&!this.J(4)||gw(this),this.$b.clone()):new $.I(0,0,0,0)},$.g.tk=function(){var t=this.g("text"),e=$.ew(this);if($.p(t)||$.p(e))return t=!t&&$.p(e)?e:t,e=this.g("maxLength"),Du(t,e)},$.g.bi=function(t){var e=this.g("useHtml"),i=this.tk();(t||$.p(i)||$.p(e))&&(e?this.kc.htmlText(i):this.kc.text(i)),this.kc.fontSize(this.g("fontSize")),this.kc.fontFamily(this.g("fontFamily")),this.kc.color(this.g("fontColor")),this.kc.direction(this.g("textDirection")),this.kc.Xu(this.g("wordBreak")),this.kc.wordWrap(this.g("wordWrap")),this.kc.opacity(this.g("fontOpacity")),this.kc.er(this.g("fontDecoration")),this.kc.fontStyle(this.g("fontStyle")),this.kc.fontVariant(this.g("fontVariant")),this.kc.fontWeight(this.g("fontWeight")),this.kc.letterSpacing(this.g("letterSpacing")),this.kc.lineHeight(this.g("lineHeight")),this.kc.textIndent(this.g("textIndent")),this.kc.textShadow(this.g("textShadow")),this.kc.vAlign(this.g("vAlign")),this.kc.Bm(this.g("hAlign")),this.kc.textOverflow(this.g("textOverflow")),this.kc.Hm(this.g("selectable")),this.kc.Dd(this.g("disablePointerEvents"))},$.g.AA=function(){var t=this.nd("rotation");if(delete this.Nd.rotation,t=$.p(t)?t:this.g("rotation"),$.p(t))return t;switch(this.g("orientation")){case"left":return this.Nd.rotation=-90;case"right":return this.Nd.rotation=90;default:return this.Nd.rotation=0}},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.clear=function(){this.wb&&this.wb.Gi()},$.g.F=function(){var t={},e=$.V.prototype.g.call(this,"zIndex");return $.p(e)&&(t.zIndex=e),e=$.V.prototype.g.call(this,"enabled"),$.p(e)&&(t.enabled=e),$.Tq(this,this.o,t,"Title text"),$.Tq(this,this.K,t,"Title props"),e=this.margin().F(),$.Jc(e)||(t.margin=e),e=this.padding().F(),$.Jc(e)||(t.padding=e),e=this.background().F(),$.Jc(e)||(t.background=e),t},$.g.Zd=function(t){return $.z(t)?{text:t,enabled:!0}:$.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?(this.oa.enabled=i.enabled,"text"in i&&(this.oa.text=i.text)):(this.enabled(i.enabled),"text"in i&&this.text(i.text)),!0)},$.g.U=function(t,e){$.aw.u.U.call(this,t,e),$.Iq(this,this.o,t,e),$.Iq(this,this.K,t,e),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin),"background"in t&&this.background().ga(!!e,t.background)},$.g.R=function(){$.sd(this.Ia,this.Qc,this.Wa,this.wb),this.wb=this.Wa=this.Qc=this.Ia=null,$.aw.u.R.call(this)},$.H(hw,$.aw),$.xu(hw,$.aw),hw.prototype.gr=function(){var t=this.width(),e=this.height();return $.uo(t)||$.uo(e)||null===t||null===e};var cG=$.aw.prototype;cG.textSettings=cG.$d,cG.background=cG.background,cG.margin=cG.margin,cG.padding=cG.padding,cG.getRemainingBounds=cG.yd,cG=hw.prototype,$.E("anychart.standalones.title",(function(){var t=new hw;return t.ga(!0,$.nm("standalones.title")),t})),cG.draw=cG.W,cG.parentBounds=cG.ja,cG.container=cG.O,$.H(iw,$.od),$.g=iw.prototype,$.g.getContext=function(){return{parentElement:this.b,titleElement:this.o,separatorElement:this.f,contentElement:this.i}},$.g.Ya=function(){return kw(this),this.b},$.g.WP=function(){var t=$.Uf(this.Ya(),"margin");$.Cf(this.Ya(),this.gb.G.x-t.left,this.gb.G.y-t.top)},$.g.visible=function(t){return $.p(t)?($.Pf(this.Ya(),!!t),this):"none"!=this.Ya().style.display},$.g.rb=function(){var t=$.Lf(this.Ya());return new $.I(0,0,t.width,t.height)},$.g.O=function(t){if($.p(t)&&this.Jc!=t){if(null!==t)return this.Jc=t,t=this.Ya(),this.Jc.appendChild(t),this;this.remove()}return this.Jc},$.g.remove=function(){this.b&&($.Xe(this.b),this.Jc=null)},$.g.R=function(){this.remove(),this.b=this.o=this.f=this.i=this.gb=null,iw.u.R.call(this)},$.H(mw,$.od);var Pda={position:"absolute","z-index":9999,left:0,top:0,width:"100%",height:"100%","pointer-events":"none"},dG={position:"relative",left:0,top:0,overflow:"hidden",width:"100%",height:"100%"},Qda={position:"relative",left:0,top:0,opacity:1,"pointer-events":"none"};$.g=mw.prototype,$.g.T_=function(){$.uf(this.Ir,Pda),$.uf(this.b.Tl(),dG),$.uf(this.b.ia(),Qda)},$.g.O=function(t){return $.p(t)?(t!=this.Jc&&((this.Jc=t)?(this.Jc.appendChild(this.Ir),this.T_(),this.b.Dt()):$.Xe(this.Ir)),this):this.Jc},$.g.Ja=function(){return this.b},$.g.NA=function(){return!0},$.g.Hm=function(t){return $.p(t)?(this.o=t,this):this.o},$.g.R=function(){$.qd(this.b),this.b=null,$.Xe(this.Ir),this.Ir=null},$.H(nw,$.od),$.g=nw.prototype,$.g.he=0,$.g.R=function(){nw.u.R.call(this),this.stop(),delete this.b,delete this.qo},$.g.start=function(t){this.stop(),this.he=$.Dj(this.f,$.p(t)?t:this.i)},$.g.stop=function(){this.uq()&&$.Ej(this.he),this.he=0},$.g.uq=function(){return 0!=this.he},$.g.Ofa=function(){this.he=0,this.b&&this.b.call(this.qo)},$.H(pw,$.qf),pw.prototype.R=function(){Zd(this.o),pw.u.R.call(this)},pw.prototype.D=function(){this.f||(this.f=new nw(this.G,this.K,this),$.rd(this,this.f)),this.f.start()},pw.prototype.G=function(){if(!this.i.md){var t=this.b,e=ow(this.i);if(this.b=e,t){var i=!1;t.width!=e.width&&(this.dispatchEvent("b"),i=!0),t.height!=e.height&&(this.dispatchEvent("a"),i=!0),i&&this.dispatchEvent("resize")}else this.dispatchEvent("a"),this.dispatchEvent("b"),this.dispatchEvent("resize")}},$.H(qw,$.qf),qw.prototype.R=function(){qw.u.R.call(this),this.i&&(Zd(this.i),this.i=null),this.b=this.f=null},qw.prototype.o=function(){var t=$.Ee(this.f||window);$.mb(t,this.b)||(this.b=t,this.dispatchEvent("resize"))},$.H(rw,mw),$.ja(rw);var Rda={position:"absolute","z-index":9999,left:"-10000px",top:"-10000px"},Sda={position:"absolute","z-index":9999,left:0,top:0},Tda={position:"fixed",left:0,top:0,opacity:1,"pointer-events":"none"},Uda={position:"fixed",left:0,top:0,opacity:1,width:"1px",height:"1px"},Vda={position:"fixed",left:0,top:0,opacity:1,"pointer-events":"none",overflow:"",display:"",width:"",height:""};rw.prototype.T_=function(){var t=window.document;$.hd&&(!$.bd("7")||t.documentMode&&6>=t.documentMode)?$.uf(this.Ir,Sda):$.uf(this.Ir,Rda),"svg"==$.kk?($.uf(this.Ja().Tl(),dG),$.uf(this.Ja().ia(),Tda)):($.uf(this.Ja().Tl(),Uda),$.uf(this.Ja().ia(),Vda)),this.D()},rw.prototype.D=function(){if("svg"==$.kk){var t=this.f;t=t.b?t.b.clone():null,this.Ja().resize(t.width,t.height)}},rw.prototype.NA=function(){return!1},rw.prototype.R=function(){$.sd(this.i,this.f),this.f=this.i=null,rw.u.R.call(this)},$.H($.ww,$.Y),$.ww.prototype.sa=6080|$.Y.prototype.sa;var tw=1988;$.ww.prototype.ra=49152|$.Y.prototype.ra;var uw=1,vw=2;$.ww.prototype.ba=$.vq(),$.U($.ww,$.ww.prototype.ba);var Wda=$.ww.prototype,eG={};$.sq(eG,[[0,"width",$.br],[0,"height",$.br],[0,"titleFormat",$.ar],[0,"format",$.ar],[0,"unionFormat",$.ar],[0,"valuePrefix",$.zq],[0,"valuePostfix",$.zq],[0,"position",$.Ek],[0,"anchor",$.Dk],[0,"offsetX",$.Bq],[0,"offsetY",$.Bq],[0,"x",$.Bq],[0,"y",$.Bq],[0,"allowLeaveScreen",$.Dq],[0,"allowLeaveChart",$.Dq],[0,"allowLeaveStage",$.Dq],[0,"displayMode",function(t){return $.zk(Bda,t,"single")}],[0,"positionMode",function(t){return $.zk(Cda,t,"float")}],[0,"onDomReady",$.gr],[0,"onBeforeTitleChange",$.gr],[0,"onTitleChanged",$.gr],[0,"onBeforeContentChange",$.gr],[0,"onContentChanged",$.gr],[0,"hideDelay",$.Bq]]),Wda.OQ=eG,$.U($.ww,$.ww.prototype.OQ),$.g=$.ww.prototype,$.g.Lc=function(t,e){for(var i in this.o){var n=this.o[i];n&&n.Lc(t,e)}return Lw(this,t,e)},$.g.$d=function(t,e){if($.p(t)){if($.z(t)){if(!$.p(e)||!(t in this.ba))return this.g(t);this[t](e)}else{for(var i in this.ka(),t)i in this.ba&&this[i](t[i]);this.da(!0)}return this}var n={};for(i in this.ba){var s=this.g(i);$.p(s)&&(n[i]=s)}return n},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Yia,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.Yia=function(t){$.X(t,2)&&(this.xE(),this.B(tw,1))},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),this.Ia.kb(this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(1024,1)},$.g.title=function(t){return this.jb||(this.jb=new $.aw,$.K(this.jb,this.gB,this),this.jb.kb(this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.gB=function(t){$.X(t,8)?(this.xE(),this.B(tw,1)):$.X(t,1)&&this.B(128,1)},$.g.$r=function(t){return this.aa||(this.aa=new Zv,$.K(this.aa,this.lja,this),this.aa.kb(this),$.W(this,"separator",this.aa)),$.p(t)?(this.aa.N(t),this):this.aa},$.g.lja=function(t){$.X(t,8)?(this.xE(),this.B(tw,1)):$.X(t,1)&&this.B(256,1)},$.g.W=function(){$.Kw(this);var t=this.g("useHtml");if(t){if(this.pf()||this.md)return this;if(!this.enabled())return this.J(1)&&(this.remove(),this.I(1),this.B(2)),this;if(!this.i.O())return this.remove(),this.I(2),this;this.I(1)}else if(!this.zc())return this;var e=this.background(),i=this.title(),n=this.$r(),s=this.Ri();if(Iw(this,this),this.J(8)&&(Hw(this).zIndex(this.zIndex()),this.I(8)),this.J(4)){Rw(this);var a=this.P;this.na=this.padding().Ej(a),this.Ka=this.ea=null,this.I(4)}return this.J(64)&&(this.G=null,Sw(this),t?this.i.WP():Hw(this).oc(1,0,0,1,this.G.x,this.G.y),this.I(64)),t?lw(this.i):(this.J(1024)&&(e.ka(),e.ja(this.P),e.O(Hw(this)),e.W(),e.da(!1),this.I(1024)),this.J(128)&&(i.ka(),i.ja(this.na),i.W(),i.da(!1),!this.ea&&i.enabled()&&(this.ea=i.yd()),this.I(128)),this.J(256)&&(n.ka(),n.ja(this.ea||this.na),n.W(),n.da(!1),!this.Ka&&n.enabled()&&(this.Ka=n.yd()),this.I(256)),this.J(512)&&(t=this.Ka||this.ea||this.na,s.ka(),this.bi(),s.ja(t),s.W(),s.da(!1),this.I(512)),this.J(4096)&&this.I(4096)),this},$.g.ya=function(t){return $.p(t)?(this.pa=t,this):this.pa},$.g.WP=function(t,e){var i=this.g("displayMode");if("single"==i&&(Bw(this,this.b,t,e),Jw(this.b,t,e)),"union"==i)Bw(this,this.b,t,e),Jw(this.b,t,e);else if("separated"==i)for(var n in this.o)(i=this.o[n])&&(Mw(this,i,t,e),Jw(i,t,e))},$.g.Ri=function(t){return this.Qd||(this.Qd=new $.xv,$.K(this.Qd,this.Mia,this),this.Qd.kb(this),this.Qd.width("100%").height("100%"),$.W(this,"contentInternal",this.Qd)),$.p(t)?(this.Qd.N(t),this):this.Qd},$.g.Mia=function(t){$.X(t,8)?(this.xE(),this.B(tw,1)):$.X(t,1)&&this.B(512,1)},$.g.xE=function(){this.G=this.P=null},$.g.remove=function(){this.g("useHtml")&&this.i&&this.i.remove(),Hw(this).parent(null)},$.g.Wj=function(){return this.Za||this.check(uw)&&!$.Jc(this.o)},$.g.ob=function(){this.G=null,Sw(this);var t=this.g("useHtml"),e=t?0:this.g("offsetX");return t=t?0:this.g("offsetY"),new $.I(this.G.x+e,this.G.y+t,this.P.width,this.P.height)},$.g.yi=function(){return Rw(this),this.P},$.g.bi=function(){if(this.J(512)){for(var t in this.Ri().ka(),this.ba){var e=this.g(t);$.p(e)&&this.Ri().$d(t,e)}this.Ri().adjustFontSize(this.g("adjustFontSize")),this.Ri().minFontSize(this.g("minFontSize")),this.Ri().maxFontSize(this.g("maxFontSize")),this.Ri().da(!1)}},$.g.uL=function(){this.D&&this.D.uq()?this.$a=!0:($.qd(this.D),this.D=new nw((function(){this.remove(),this.$a&&(this.$a=!1,this.uL())}),this.g("hideDelay"),this))},$.g.ZN=function(t){if(Pw(this,t.clientX,t.clientY))this.f.NA()||this.f.Hm(!0);else{$.Yd(window.document,"mousemove",this.ZN,!1,this);var e=Hw(this).ia();e&&($.Yd(e,"mouseenter",this.xY,!1,this),$.Yd(e,"mouseleave",this.yY,!1,this)),this.fN(t)}},$.g.xY=function(){$.Yd(window.document,"mousemove",this.ZN,!1,this),Hw(this).ia()&&$.Yd(Hw(this).ia(),"mouseenter",this.xY,!1,this),this.K=null},$.g.yY=function(t){Hw(this).ia()&&$.Yd(Hw(this).ia(),"mouseleave",this.yY,!1,this),this.fN(t)},$.g.fN=function(t){if(2==t.kf.buttons)return!0;this.f.NA()||this.f.Hm(!1),Hw(this).ia()&&$.Yd(Hw(this).ia(),"mouseleave",this.fN,!1,this),this.K=null,this.g("hideDelay")?(this.uL(),this.D.uq()||this.D.start()):this.Lc(!0)},$.g.parent=function(t){if($.p(t)){if(this.Y!=t){var e=String($.oa(this));null===t?($.kr(this.Y,this.Tc,this),this.title().parent(null),this.$r().parent(null),this.background().parent(null),this.padding().parent(null),this.Ri().parent(null),this.Ri().padding().parent(null),delete this.Y.o[e],this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,this.title().df().parent(this.Y.title()),this.$r().df().parent(this.Y.$r()),this.background().df().parent(this.Y.background()),this.padding().parent(this.Y.padding()),this.Ri().parent(this.Y.Ri()),this.Ri().padding().parent(this.Y.Ri().padding()),this.Y.o[e]=this,this.bL(),$.K(this.Y,this.Tc,this))}return this}return this.Y},$.g.Tc=function(t){var e=0,i=0;this.bL(),($.X(t,8)||$.X(t,1))&&(e|=tw,i|=8,this.xE()),$.X(t,32768)&&(e|=1,i|=1),this.Xb=null,this.B(e,i)},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=$.ir,$.g.check=function(t){return!$.p(t)||!!(t&this.fb)},$.g.bL=function(){if(this.g("useHtml")){if(!ZE){ZE=!0;var t=$.ye(),e=$.Ae(t.b,"HEAD",void 0,void 0)[0];if(!e){var i=$.Ae(t.b,"BODY",void 0,void 0)[0];e=t.Ac("HEAD"),i.parentNode.insertBefore(e,i)}(i=t.Ac("STYLE")).innerHTML=".anychart-tooltip {border-radius: 3px;padding: 5px 10px;background: rgba(33, 33, 33, 0.7);border: none;display: inline-block;box-sizing: border-box;letter-spacing: normal;color: #fff;font-family: Verdana, Helvetica, Arial, 'sans-serif';font-size: 12px;position: absolute;pointer-events: none;margin: 10px 0px 10px 10px;}.anychart-tooltip-separator {color: rgba(206, 206, 206, 0.3);border: none;height: 1px;margin: 5px 0;}.anychart-tooltip-title{font-size: 14px;}",t.Yga(e,i,0)}this.i||(this.i=new iw(this))}else this.i&&this.i.remove();for(var n in this.o)this.o[n].bL();this.G=this.P=null},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=function(){var t=this.jg();return t||(t=$.Ga(this.Wd(),[this.Ha],this.Xd()),this.jg(t)),t},$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.F=function(){var t=$.ww.u.F.call(this);$.Tq(this,this.ba,t,void 0,void 0,!0),$.Tq(this,this.OQ,t,void 0,void 0,!0),delete t.x,delete t.y,delete t.zIndex;var e=this.title().F();return $.Jc(e)||(t.title=e),e=this.$r().F(),$.Jc(e)||(t.separator=e),e=this.background().F(),$.Jc(e)||(t.background=e),e=this.padding().Pa,$.Jc(e)||(t.padding=e),t},$.g.U=function(t,e){$.ww.u.U.call(this,t,e),$.Iq(this,this.ba,t,e),$.Iq(this,this.OQ,t,e),this.title().ga(!!e,t.title),this.$r().ga(!!e,t.separator),this.background().ga(!!e,t.background),this.padding().ga(!!e,t.padding);var i=t.contentInternal||{};i.position=i.position?i.position:"left-top",i.anchor=i.anchor?i.anchor:"left-top",this.Ri(i)},$.g.R=function(){if(delete this.Pa,delete this.oa,this.Y){var t=String($.oa(this));$.kr(this.Y,this.Tc,this),delete this.Y.o[t]}for(var e in this.o)(t=this.o[e])&&$.qd(t);if(this.f&&!this.f.NA()&&this.O(null),$.sd(this.jb,this.aa,this.Qd,this.Ia,this.Wa,this.Oa,this.D,this.i),this.i=this.D=this.Oa=this.Wa=this.Ia=this.Qd=this.aa=this.jb=null,this.f&&this.f.NA()&&Tw(this)){for(e in t=!0,sw)if(sw.hasOwnProperty(e)){var i=sw[e];if(i!=this&&this.f==i.f){t=!1;break}}t&&(e=Uw(this),delete Vw[e],$.qd(this.f))}delete this.f,delete sw[String($.oa(this))],$.ww.u.R.call(this)};var fG=$.ww.prototype;fG.title=fG.title,fG.separator=fG.$r,fG.background=fG.background,fG.padding=fG.padding,fG.hide=fG.Lc,fG.textSettings=fG.$d,$.H($.Ww,tv),$.Ww.prototype.ra=tv.prototype.ra;var gG=function(){function t(t){return function(e){var i="itemsSpacing"==t?(0,window.parseFloat)(e):Number(e);return null===e?this.vf(t):(0,window.isNaN)(i)?this.g(t):i}}var e={};return $.sq(e,[[0,"inverted",$.Dq],[0,"itemsLayout",eba],[0,"iconSize",$.N],[0,"width",$.Cq],[0,"height",$.Cq],[0,"maxWidth",$.Cq],[0,"maxHeight",$.Cq],[0,"position",function(t){return $.C(t)?(t.x=$.L(t.x)||0,t.y=$.L(t.y)||0,t):$.Lk(t)}],[0,"positionMode",hba],[0,"drag",$.Dq],[0,"itemsFormat",$.Cq],[0,"titleFormat",$.Cq],[0,"itemsHAlign",Fk],[0,"itemsSpacing",t("itemsSpacing")],[0,"itemsSourceMode",pba],[0,"hoverCursor",Ck],[0,"iconTextSpacing",t("iconTextSpacing")],$.Z.eK]),e}();$.U($.Ww,gG),$.g=$.Ww.prototype,$.g.sa=4032|tv.prototype.sa,$.g.items=function(t){return $.p(t)?(this.Ka!=t&&(this.Ka=t,this.B(1040,1)),this):this.Ka},$.g.RA=function(t){return $.p(t)?(t=$.A(t)?$.Ja(t,0):null===t?t:[t],Xw(this,t)||(this.f=t,this.B(1040,1)),this):this.f},$.g.tR=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,this.B(1040,1)),this):this.aa},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.Pk,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.Pk=function(t){$.X(t,2)&&this.B(4,9)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.Pk,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.title=function(t){return this.jb||(this.jb=new $.aw,$.K(this.jb,this.Mq,this),this.jb.kb(this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.Mq=function(t){var e=0,i=0;$.X(t,1)&&(e|=128,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.wY=function(t){return this.i||(this.i=new Zv,$.K(this.i,this.hla,this),$.W(this,"titleSeparator",this.i)),$.p(t)?(this.i.N(t),this):this.i},$.g.hla=function(t){var e=0,i=0;$.X(t,1)&&(e|=256,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.WI=function(t){return this.K||(this.K=new Sv,$.K(this.K,this.vja,this),$.W(this,"paginator",this.K)),$.p(t)?(this.K.N(t),this):this.K},$.g.vja=function(t){var e=0,i=0;$.X(t,1)&&(e|=512,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.Ua=function(t){return this.gb||(this.gb=new $.ww(0),$.K(this.gb,this.Bp,this),$.Aw(this.gb,this),this.gb.Ga($.ur.tooltip),$.W(this,"tooltip",this.gb),this.gb.ga(!0,this.gb.oa)),$.p(t)?(this.gb.N(t),this):this.gb},$.g.Bp=function(){var t=this.Ua();t.O()&&t.W()},$.g.ja=function(t,e,i,n){return $.Ww.u.ja.call(this,t,e,i,n)},$.g.yd=function(){var t=this.ja()||$.kn(0,0,0,0);if(!this.enabled()||"inside"==this.g("positionMode"))return t;this.$b&&!this.J(4)||this.Mm();var e=this.g("position");if($.C(e))return t;switch(e){case"top":t.top+=this.$b.height,t.height-=this.$b.height;break;case"right":t.width-=this.$b.width;break;default:case"bottom":t.height-=this.$b.height;break;case"left":t.left+=this.$b.width,t.width-=this.$b.width}return t},$.g.ob=function(){return this.$b&&!this.J(4)||this.Mm(),this.$b},$.g.T5=function(t){if(void 0===this.Na)this.EW=!0,this.DW=[t];else{this.EW=!1,this.DW=null;var e=this.ob(),i=this.ja();this.ea=t.x,this.na=t.y,this.FG=!0,this.Sb=(this.ea-i.left)/i.width,this.qc=(this.na-i.top)/i.height,this.ec=(i.width-(this.ea-i.left+e.width))/i.width,this.sb=(i.height-(this.na-i.top+e.height))/i.height,this.B(4,1)}},$.g.Daa=function(){if(void 0===this.Na)return null;var t=this.Na.Pd;return{x:t.Jd,y:t.Fd}},$.g.Mm=function(){var t=this.ja();null!=t&&0>=t.width&&0>=t.height&&(t=null);var e,i,n=this.margin(),s=this.padding(),a=0,o=0,r=this.g("width"),l=this.g("height"),h=this.g("maxWidth"),c=this.g("maxHeight");if(t){var u=t.width,d=t.height;if(null!=r){var p=Math.min(u,$.L(r,u),null!=h?$.L(h,u):u);h=s.Ng(n.Ng(p))}else h=null!=h?s.Ng(n.Ng($.L(h,u))):s.Ng(n.Ng(u));if(null!=l)var g=Math.min(d,$.L(l,d),null!=c?$.L(c,d):d),f=s.Yh(n.Yh(g));else f=null!=c?s.Yh(n.Yh($.L(c,d))):s.Yh(n.Yh(d))}else $.ea(r)&&!(0,window.isNaN)(r)?(p=r,h=s.Ng(r)):h=$.ea(h)&&!(0,window.isNaN)(h)?s.Ng(h):window.Infinity,$.ea(l)&&!(0,window.isNaN)(l)?(g=l,f=s.Yh(l)):f=$.ea(c)&&!(0,window.isNaN)(c)?s.Yh(c):window.Infinity;l=$.wr(this,"titleSeparator"),c=$.wr(this,"paginator"),r=$.wr(this,"title");var m=c&&c.g("orientation"),v="bottom"==m||"top"==m,b=r&&(r.g("orientation")||$.dw(r));b=b&&("bottom"==b||"top"==b);var y=r?0==r.AA()%180:0,S=l&&l.Nb();l&&l.ka(),c&&c.ka(),r&&r.ka();var x=e=null;do{e&&(x=e);var w=i=0,C=0,T=0;if(r&&r.enabled()){r.ja(null),cw(r,null),r.zB(null);var D=r.yi();b?(D.width>h&&(y?cw(r,h):r.zB(h),D=r.yi()),T=D.width,i+=D.height):(D.height>f&&(y?r.zB(f):cw(r,f),D=r.yi()),C=D.height,w+=D.width)}else D=null;l&&l.enabled()?(l.ja(null),e=l.yi(),S?i+=e.height:w+=e.width):e=null;var k=h-w,O=Cca(this,k,f-i),P=O.width;i+=O=O.height,w+=P,C=Math.max(C,O),T=Math.max(T,P),w=Math.max(T,w),T=Math.max(C,i),C=f,b&&(C-=D?D.height:0),S&&(C-=e?e.height:0),c.ja(null),i=Yv(c,1);var L=this.g("itemsLayout");if("horizontal"==L?P>k&&this.Ub&&1<this.Ub.length?Vv(c,!0):Vv(c,!1):"vertical-expandable"==L?P>k&&1<this.me?Vv(c,!0):Vv(c,!1):"vertical"!=L&&"horizontal-expandable"!=L||(O>C&&this.Ub&&1<this.Ub.length?Vv(c,!0):Vv(c,!1)),Wv(c)&&(v?(w=Math.max(w,i.width),T+=i.height):(w+=i.width,T=Math.max(T,i.height))),w=Math.min(w,h),C=Math.min(T,f),k=n.Lk(s.Lk(w)),O=n.$j(s.$j(C)),r&&r.enabled()){if(L=D.width,b||y){if(y&&!b){var I;T=Wv(c)?i.width:0;var A=(this.Ub&&this.Ub.length?this.Ub[0].ob().width:0)+T;I=P+T>=h-D.width?A:P,D=Math.max(Math.min(r.text().length,1),r.margin().Ng(w-L<=I?w-I:L)),cw(r,D)}else!y&&T>f&&(D=0,e&&S&&(D+=e.height),"top"!=m&&"bottom"!=m||(D+=i.height),P=Wv(c)&&!v?i.height:0,P=Math.max(this.Ub&&this.Ub.length?this.Ub[0].ob().height:0,P),D=Math.max(1,r.margin().Yh(f-D-P)),y?r.zB(D):cw(r,D));D=r.yi(),l&&(l.width(k),e=l.yi())}else D=r.yi(),l&&(l.width(O),e=l.yi());b?C-=D.height:w-=D.width}for(l&&l.enabled()&&(S?C-=e.height:w-=e.width),D=w,e=C,Wv(c)&&(v?e=C-i.height:D=w-i.width),P=D,w=e,this.b=[],e=0,C=this.Ub&&this.Ub.length,i=this.g("itemsSpacing"),D=0;D<C&&D in this.G;D++);if(0<w&&this.Ub&&D!=C)switch(this.b[e]=[],this.b[e][0]=this.Ub[D],this.g("itemsLayout")){case"horizontal":for(w=this.Ub[D].ob().zd(),D+=1;D<C;D++)D in this.G||(w+i+this.Ub[D].ob().zd()>P?(e++,this.b[e]=[],this.b[e][0]=this.Ub[D],w=this.Ub[D].ob().zd()):(w=w+i+this.Ub[D].ob().zd(),this.b[e].push(this.Ub[D])));break;case"vertical":for(P=this.Ub[D].ob().qd(),D+=1,C=this.Ub.length;D<C;D++)D in this.G||(P+i+this.Ub[D].ob().qd()>w?(e++,this.b[e]=[],this.b[e][0]=this.Ub[D],P=this.Ub[D].ob().qd()):(P=P+i+this.Ub[D].ob().qd(),this.b[e].push(this.Ub[D])));break;case"horizontal-expandable":var E=this.Ub[D].ob().zd()+i,G=this.Ub[D].ob().qd()+i,U=0;for(D+=1;D<C;D++)D in this.G||(L=(A=this.Ub[D]).ob().zd(),T=A.ob().qd(),E+L>P?((U+=G)+T>w?(e++,this.b[e]=[],this.b[e][0]=A,U=0):this.b[e].push(A),E=L+i,G=T+i):(E+=L+i,G=Math.max(G,T+i),this.b[e].push(A)));break;case"vertical-expandable":for(E=this.Ub[D].ob().zd()+i,G=this.Ub[D].ob().qd()+i,U=0,D+=1;D<C;D++)D in this.G||(L=(A=this.Ub[D]).ob().zd(),G+(T=A.ob().qd())>w?((U+=E)+L>P?(e++,this.b[e]=[],this.b[e][0]=A,U=0):this.b[e].push(A),E=L+i,G=T+i):(E=Math.max(E,L+i),G+=T+i,this.b[e].push(A)))}(i=$.wr(this,"paginator"))&&Nv(i,e+1),c.ja(null),e=c.ob()}while(!$.nb(x,e));if(p||(p=k),g||(g=O),this.$b=new $.I(a,o,p,g),this.FG)a=this.Sb<this.ec?Math.max(t.left,this.Sb*t.width+t.left):Math.min(t.cb(),t.cb()-(this.ec*t.width+p)),o=this.qc<this.sb?Math.max(t.top,this.qc*t.height+t.top):Math.min(t.Va(),t.Va()-(this.sb*t.height+g)),$.qb(t,this.$b)||(a<t.left&&(a=t.left),a+p>t.cb()&&(a=t.cb()-p),o<t.top&&(o=t.top),o+g>t.Va()&&(o=t.Va()-g));else if(t){switch(n=this.g("position"),s=this.g("align"),a=t.tb(),o=t.Vb(),n){case"left":case"right":switch(s){case"center":o+=(d-g)/2;break;case"right":case"bottom":o=t.Va()-g}break;case"top":case"bottom":switch(s){case"center":a+=(u-p)/2;break;case"right":case"bottom":a=t.cb()-p}}switch(n){case"right":a=t.cb()-p;break;case"bottom":o=t.Va()-g}}else a=$.L(n.g("left"),0),o=$.L(n.g("top"),0);this.$b.left=a,this.$b.top=o,this.padding().Ej(this.margin().Ej(this.$b)),(t=this.$b.clone()).left=0,t.top=0,this.Ha=this.margin().Ej(t),this.Od=this.padding().Ej(this.Ha),l&&l.da(!1),c&&c.da(!1),r&&r.da(!1),this.I(4)},$.g.remove=function(){this.Na&&this.Na.parent(null)},$.g.W=function(){if(!this.zc())return this;this.Na||(this.Na=$.ok(),$.ru(this,this.Na),this.ba||(this.ba=$.ok(),this.ba.parent(this.Na).zIndex(20))),this.J(8)&&(this.Na.zIndex(this.zIndex()),this.I(8));var t,e=this.O(),i=e?e.Ja():null;if(this.J(2)&&(this.Na.parent(e),this.I(2),"svg"==$.kk&&(this.P=$.mg(),e=this.P.Xp(),this.D=this.P.Wo(),e.appendChild(this.D))),(e=i&&!i.yf())&&i.suspend(),this.J(1024)&&(this.$a=!0,this.I(1024)),this.J(16)){var n=this.tR(),s=Dca(this);this.g("inverted")&&(s=s.reverse()),s=$.D(n)?n(s):s,this.Ub&&this.Ub.length!=s.length&&(this.$a=!0),n=Eca(this,s),Fca(this,n),this.I(16)}if(this.EW&&this.T5.apply(this,this.DW),Gca(this),this.J(4)){if(this.Ub&&"..."==this.g("textOverflow"))for(n=0,s=this.Ub.length;n<s;n++)this.Ub[n].ja(null),this.Ub[n].Rh().width(null);this.Mm(),this.B(3008),this.Na.oc(1,0,0,1,this.$b.left,this.$b.top),this.Na.clip(this.Ha),this.I(4)}(this.J(64)&&((n=$.wr(this,"background"))&&(n.ka(),n.ja(this.Ha),this.enabled()&&n.O(this.Na),n.da(!1),n.W()),this.I(64)),this.J(128)&&((n=$.wr(this,"title"))&&(n.ka(),n.ja(this.Od),this.enabled()&&n.O(this.Na),n.da(!1),n.W()),this.I(128)),n=this.jb?this.jb.yd():this.Od,this.J(256)&&((s=$.wr(this,"titleSeparator"))&&(s.ka(),s.ja(n),this.enabled()&&s.O(this.Na),s.da(!1),s.W()),this.I(256)),s=this.i?this.i.yd():n,n=$.wr(this,"paginator"),this.J(512)&&(n&&(n.ka(),n.ja(s),this.enabled()&&n.O(this.Na),n.da(!1),n.W()),this.I(512)),s=n&&Wv(n)?n.yd():s,n=n&&Wv(n)?n.UC()-1:0,s.width=Math.max(1,s.width),s.height=Math.max(1,s.height),Hca(this,n,s.ceil()),this.J(2048))&&(!this.ko&&this.g("drag")&&(this.ko=this.Na.rect(),this.ko.fill($.bm).stroke(null).zIndex(0),this.Na.wa("beforedrag",(function(){this.FG=!0,this.fb||(this.fb=!0,this.Ba||(this.Ba=$.mk(),this.Ba.fill($.bm).stroke(null).zIndex(100)),this.Ba.Qf(this.Ha),this.Ba.parent(this.Na),this.dispatchEvent("dragstart"))}),!1,this),this.Na.wa("drag",this.pga,!1,this),this.Na.wa("end",(function(){var t=this.Na.Pd,e=this.ob(),i=this.ja();this.ea=t.Jd,this.na=t.Fd,this.Sb=(this.ea-i.left)/i.width,this.qc=(this.na-i.top)/i.height,this.ec=(i.width-(this.ea-i.left+e.width))/i.width,this.sb=(i.height-(this.na-i.top+e.height))/i.height,this.fb&&(this.fb=!1,this.Ba.parent(null),this.dispatchEvent("dragend"))}),!1,this)),n=!1,this.g("drag")&&(n=this.margin().Ej("inside"==this.g("positionMode")?this.ja():(t=gaa(this.ja(),this.yd())).length?t[0]:$.kn(0,0,0,0))),this.ko&&this.ko.Qf(this.Ha),this.Na.Om(n),this.I(2048));return e&&i.resume(),this},$.g.pga=function(t){return this.dispatchEvent(t.type)},$.g.ig=function(t){t=$.Ww.u.ig.call(this,t);var e=$.so(t.domTarget);return e=$.N(e&&e.index),(0,window.isNaN)(e)||(t.itemIndex=e),t},$.g.Eaa=function(t){var e=ax(this,t);if(e&&this.dispatchEvent(e))switch(e.type){case"legenditemmouseover":var i=this.Ub&&this.Ub[e.itemIndex];e=e.itemSource,i&&(e&&$.D(e.wq)&&e.wq(i,t),i.za=!0,Ev(i,!0),Av(i,!0),Dv(i,!0),t&&Yw(this,t));break;case"legenditemmousemove":t&&Yw(this,t);break;case"legenditemmouseout":i=this.Ub&&this.Ub[e.itemIndex],e=e.itemSource,i&&(e&&$.D(e.vq)&&e.vq(i,t),(t=i).za=!1,Ev(t,!1),Av(t,!1),Dv(t,!1),this.Ua().Lc());break;case"legenditemclick":t.button==$.Ri&&(i=this.Ub&&this.Ub[e.itemIndex],e=e.itemSource,i&&e&&$.D(e.zr)&&e.zr.call(e,i,t))}},$.g.Ih=function(t){(t=ax(this,t))&&this.dispatchEvent(t)},$.g.F=function(){var t=$.Ww.u.F.call(this);return $.Tq(this,gG,t),t.margin=this.margin().F(),t.padding=this.padding().F(),t.background=this.background().F(),t.title=this.title().F(),t.titleSeparator=this.wY().F(),t.paginator=this.WI().F(),t.tooltip=this.Ua().F(),$.p(this.items())&&(t.items=this.items()),t},$.g.U=function(t,e){$.Ww.u.U.call(this,t,e),$.Iq(this,gG,t,e),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin),"title"in t&&this.title().ga(!!e,t.title),"background"in t&&this.background().ga(!!e,t.background),"titleSeparator"in t&&this.wY().ga(!!e,t.titleSeparator),"paginator"in t&&this.WI().ga(!!e,t.paginator),this.Ua().ga(!!e,t.tooltip),this.items(t.items),this.tR(t.itemsFormatter)},$.g.R=function(){$.Ww.u.R.call(this),this.D&&($.Ve(this.D),$.Xe(this.D)),$.sd(this.ko,this.gb,this.K,this.o,this.Ub,this.ba,this.Qc,this.Wa,this.Ia,this.jb,this.i,this.gb,this.Na,this.D),this.D=this.Na=this.gb=this.i=this.jb=this.Ia=this.ba=this.K=this.Wa=this.Qc=this.Ub=this.o=this.ko=null},$.H(bx,$.Ww),$.xu(bx,$.Ww),bx.prototype.gr=function(){var t=this.g("width"),e=this.g("height");return $.uo(t)||$.uo(e)||null===t||null===e},bx.prototype.Hd=function(t){if($.X(t,64)){this.ka(),t=t.target.d2(this.g("titleFormat"));var e=$.wr(this,"title");e&&null!==t&&$.ew(e,t),this.B(1040),this.O()&&this.W(),this.da(!1)}},bx.prototype.RA=function(t){if($.p(t)){if(t=$.A(t)?$.Ja(t,0):null===t?t:[t],!Xw(this,t)){if(this.f)for(var e,i=0;i<this.f.length;i++)(e=this.f[i]).NI&&e.NI()&&$.kr(e,this.Hd,e);if(this.f=t)for(e=0;e<this.f.length;e++)(t=this.f[e]).NI&&t.NI()&&$.K(t,this.Hd,this);this.B(1040,1)}return this}return this.f};var hG=$.Ww.prototype;hG.items=hG.items,hG.itemsFormatter=hG.tR,hG.margin=hG.margin,hG.padding=hG.padding,hG.background=hG.background,hG.title=hG.title,hG.titleSeparator=hG.wY,hG.paginator=hG.WI,hG.tooltip=hG.Ua,hG.getRemainingBounds=hG.yd,hG.getPixelBounds=hG.ob,hG.getCurrentPosition=hG.Daa,hG=bx.prototype,$.E("anychart.standalones.legend",(function(){var t=new bx;return t.N($.nm("standalones.legend")),t})),hG.draw=hG.W,hG.parentBounds=hG.ja,hG.container=hG.O,hG.itemsSource=hG.RA,$.H($.cx,$.V),$.cx.prototype.ra=2;var iG=function(){var t={};return $.sq(t,[[0,"enabled",$.Dq],[0,"duration",function(t){return null===t?this.vf("duration"):$.P(t,this.g("duration"),!0)}]]),t}();$.U($.cx,iG),$.cx.prototype.F=function(){var t={};return $.Tq(this,iG,t),t},$.cx.prototype.U=function(t,e){$.Iq(this,iG,t,e)},$.cx.prototype.Zd=function(t,e,i){return e=null,$.da(t)||null===t?(e={enabled:!!t},$.p(i)&&(e.duration=i)):(0,window.isNaN)(+t)||(e={enabled:!0,duration:+t}),e},$.cx.prototype.Ie=function(t,e){var i=this.Zd(e);return!!i&&("enabled"in i&&this.enabled(i.enabled),"duration"in i&&this.duration(i.duration),!0)},$.H(dx,$.V);var jG={};$.sq(jG,[[0,"enabled",$.Dq],[0,"titleFormat",$.ar]]),$.U(dx,jG),$.g=dx.prototype,$.g.ra=10|$.V.prototype.ra,$.g.PW=function(t){$.X(t,8)&&this.enabled(this.Us.g("enabled"))},$.g.F=function(){var t=dx.u.F.call(this);return $.Tq(this,jG,t),t},$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:$.D(t)?{titleFormat:t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&("enabled"in i&&this.enabled(i.enabled),"titleFormat"in i&&this.titleFormat(i.titleFormat),!0)},$.g.U=function(t,e){dx.u.U.call(this,t,e),$.Iq(this,jG,t,e)},$.g.R=function(){this.ya=null,this.Us&&(this.Us.va(2),$.kr(this.Us,this.PW,this)),this.Us=null,dx.u.R.call(this)},$.H(fx,dx);var kG={};$.rq(kG,0,"mode",(function(t){return $.zk(Fda,t,"chart-elements")})),$.U(fx,kG),$.g=fx.prototype,$.g.HS=function(){var t=this.ya;t.iL||(t.iL=new $.Fw);var e={chart:{value:t,type:""}};return t.iL.Li([t]),$.ov(t.iL,e)},$.g.JR=function(){var t=this.ya.Na;if(t.Cd("role",null),t.Cd("aria-hidden","true"),t.Cd("aria-label",null),$.Xe(this.tE),this.tE=null,this.g("enabled")){var e=this.HS();if(this.g("titleFormat")){var i=this.g("titleFormat");$.z(i)&&(i=$.Nu($.Lu.Id(),i)),i=i.call(e,e)}(e=$.wr(this.ya,"title"))&&!i&&e.g("text")&&e.enabled()&&(i=e.g("text")),"data-table"==this.g("mode")?(this.tE=this.ya.G6(i),(t=this.ya.O().O())&&$.We(t,this.tE,0)):i&&(t.Cd("aria-label",i),t.Cd("aria-hidden",null),t.Cd("role","article"))}},$.g.F=function(){var t=fx.u.F.call(this);return $.Tq(this,kG,t),t},$.g.U=function(t,e){fx.u.U.call(this,t,e),$.Iq(this,kG,t)},$.g.R=function(){$.Xe(this.tE),this.tE=null,fx.u.R.call(this)},$.H(gx,dx),gx.prototype.JR=function(){var t=null,e=null,i=this.Sa.sl()||this.b;this.g("enabled")&&this.g("titleFormat")&&(t=this.HS(),e=this.g("titleFormat"),$.z(e)&&(e=$.Nu($.Lu.Id(),e)),t=e.call(t,t),e="img"),this.Sa.check(4)&&!this.b&&(i=this.b=this.Sa.sl().Bd()),i.Cd("aria-label",t),i.Cd("role",e)},gx.prototype.HS=function(){return this.Sa.Rk()},gx.prototype.R=function(){$.qd(this.b),this.Sa=null,gx.u.R.call(this)},$.H($.hx,$.V);var lG={},nG;$.sq(lG,[[0,"spotRadius",$.P],[0,"multiSelectOnClick",$.Dq],[0,"unselectOnClickOutOfPoint",$.Dq],[0,"hoverMode",$.Ak],[0,"selectionMode",$.Bk],[0,"zoomOnMouseWheel",$.Dq],[0,"scrollOnMouseWheel",$.Dq]]),$.U($.hx,lG),$.hx.prototype.ra=2,$.hx.prototype.U=function(t,e){$.Iq(this,lG,t,e)},$.hx.prototype.F=function(){var t={};return $.Tq(this,lG,t),t},$.ix.prototype.Lh=function(t,e,i){var n;if($.p(e)){var s=this.target.pq(),a=this.target.$(),o=a.Hb(),r=!0;if($.da(e)&&e){for(e=a.ma(),n=o;n--;)s=$.lx(this,t,n,i,s),r=!1;a.select(e)}else if($.A(e))for($.Pa(e),n=e.length;n--;)(a=+e[n])<o&&(s=$.lx(this,t,a,i,s),r=!1);else+e<o&&(s=$.lx(this,t,+e,i,s),r=!1);r||this.target.wm(s)}else if(!(this.Gc&t)){for(i=$.gm,t==$.gm||t==$.vo?i=$.vo:t==$.wo&&(i=$.wo|$.vo),n=this.b.length;n--;)$.px(this,i,n)&&(this.target.$().select(this.f[n])&&this.target.pk($.gm),$.Ca(this.b,n,1),$.Ca(this.f,n,1));if(this.target.wm(),$.kx(this)){if(this.target.pf())if(this.target.eh())for(a=this.target.Ec();a.advance();)n=a.ma(),a.select(n)&&$.kx(this,n)&&this.target.ml(t);else $.kx(this,window.NaN)&&this.target.ml(t);this.Gc=t}}},$.ix.prototype.Vh=function(t,e){if($.p(e)){var i=this.target.pq(),n=this.target.$(),s=this.target.$().Hb();if($.da(e)&&e){for(var a=n.ma();s--;)i=$.rx(this,t,s,i);n.select(a)}else if($.A(e))for($.Pa(e),s=e.length;s--;)i=$.rx(this,t,+e[s],i);else if((0,window.isNaN)(e))for(s=this.f.length;s--;)i=$.jx(this,t,s);else i=$.rx(this,t,+e,i);this.target.wm(i),this.target.eh()||"single"!=this.target.Xl()||this.target.ml($.mx(this,$.wo)?$.wo:$.mx(this,$.vo)?$.vo:$.gm)}else{for(s=this.b.length;s--;)$.px(this,t,s)&&(this.target.$().select(this.f[s])&&this.target.pk($.gm),$.Ca(this.f,s,1),$.Ca(this.b,s,1));if(this.target.wm(),this.Gc&=~t,this.target.pf())if(this.target.eh())for(n=this.target.Ec();n.advance();)i=n.ma(),n.select(i)&&$.kx(this,i)&&this.target.ml(this.Gc);else this.target.ml(this.Gc)}},$.ix.prototype.fk=function(){return this.Gc},$.H($.ux,$.wu),$.g=$.ux.prototype,$.g.ra=$.wu.prototype.ra,$.g.sa=3552|$.wu.prototype.sa,$.g.DP=function(){return!0},$.g.uN=function(){return!1},$.g.r6=function(){return!0},$.g.eg=function(t){return $.il(8),$.p(t)?this:null},$.g.ef=function(){return null},$.g.aj=function(){return!1},$.g.ou=ba(15),$.g.O0=function(){var t=$.lk();return t.Ax=this.Ax,t.Xo(sv(this.Xo())),t},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.$A,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.$A=function(t){$.X(t,2)&&this.B(4,9)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(t){$.X(t,2)&&this.B(4,9)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(t){$.X(t,1)&&this.B(64,1)},$.g.title=function(t){return this.jb||(this.jb=new $.aw,this.jb.kb(this),$.K(this.jb,this.QW,this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.QW=function(t){var e=0,i=0;$.X(t,1)&&(e|=160,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.label=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=this.sv[i];return s||((s=this.tL()).kb(this),s.Ga("defaultFontSettings","defaultLabelSettings"),this.sv[i]=s,$.K(s,this.Tia,this),this.B(256,1)),$.p(n)?(s.N(n),this):s},$.g.Tia=function(){this.B(256,1)},$.g.tL=function(){return new $.xv},$.g.LX=function(t,e){t.ja(e)},$.g.FW=function(t){$.X(t,1)&&this.B(256,1)},$.g.Gm=function(t){return this.Dq||(this.Dq=new $.pv(this),$.K(this.Dq,this.FW,this)),$.p(t)?(this.Dq.N(t),this):this.Dq},$.g.yj=function(){return!1},$.g.q6=function(){return!0},$.g.pb=$.ia,$.g.co=$.ia,$.g.Jv=function(){this.pb(),this.co()},$.g.La=function(t,e){return $.p(t)?$.p(e)?(this.kn[t.toLowerCase()]=e,this):this.kn[t.toLowerCase()]:this.kn},$.g.hJ=function(){this.kn={}},$.g.Rg=function(t){return this.Jv(),this.La(t)},$.g.Ua=function(t){return this.gb||(this.gb=this.xL(),$.W(this,"tooltip",this.gb)),$.p(t)?(this.gb.N(t),this):this.gb},$.g.xL=function(){var t=new $.ww(4294967295);return t.ya(this),$.Aw(t,this),this.DP()&&this.wa("pointshover",this.yka,!0),t},$.g.oU=function(t,e,i){return t=[],$.p(this.Ue())&&(t=(0,$.Wa)(this.Ue(),(function(t){return"scatter"==t.g("xMode")?t.$().select(e):t.$().select(i),{series:t,points:[e]}}))),(0,$.Ye)(t,(function(t){return t=t.series.$(),$.p(t.j("missing"))?!t.j("missing"):!$.Do(t.get("value"))}))},$.g.yka=function(t){if(!t.PT){var e=[];if((0,$.Pe)(t.seriesStatus,(function(i){0==i.points.length?("float"==this.gb.g("positionMode")&&this.gc("mousemove",this.QJ),this.gb.Lc(!1,t)):i.series.enabled()&&e.push(i)}),this),0!=e.length)if("float"==this.gb.g("positionMode")&&this.wa("mousemove",this.QJ),"single"==$.wr(this,"interactivity",!0,this.gd).g("hoverMode")){var i=[];if("single"==this.gb.g("displayMode"))i=t.seriesStatus;else{var n=i=t.seriesStatus[0].points[0];$.p(n.index)&&(n=i=n.index);var s=t.seriesStatus[0].series;s.tl&&$.J(s.tl(),$.Qt)&&"scatter"==s.g("xMode")&&(i=t.point.get("x")),i=this.oU(s,n,i)}$.Nw(this.gb,i,t.originalEvent.clientX,t.originalEvent.clientY,t.seriesStatus[0].series,this.Uu())}else{var a=e[0];e[0].series.$().select(e[0].nearestPointToCursor.index),(0,$.Pe)(e,(function(t){a.nearestPointToCursor.distance>t.nearestPointToCursor.distance&&(t.series.$().select(t.nearestPointToCursor.index),a=t)})),"single"==this.gb.g("displayMode")?$.Nw(this.gb,[a],t.originalEvent.clientX,t.originalEvent.clientY,a.series,this.Uu()):$.Nw(this.gb,e,t.originalEvent.clientX,t.originalEvent.clientY,a.series,this.Uu())}}},$.g.QJ=function(t){this.gb.WP(t.clientX,t.clientY)},$.g.Uu=function(){return!1},$.g.contextMenu=function(t){return this.rk||(this.rk=$.eq.ui.contextMenu(!!$.C(t)&&t.fromTheme))&&this.rk.itemsProvider(this.vS),$.p(t)?(this.rk&&this.rk.setup(t),this):this.rk},$.g.vS=function(t){var e=t.event?t.event.target.Zi():null,i=t.event?$.so(t.event.domTarget):null;return e=$.C(i)&&$.p(i.X)&&i.X.seriesType&&$.p(i.index)||e&&e.seriesType,i={},$.eq.exports&&$.Sc(i,$.Sl($.mG.exporting)),$.Tj()&&t.menuParent&&$.Sc(i,$.Sl($.mG[t.menuParent.fullScreen()?"full-screen-exit":"full-screen-enter"])),$.Sc(i,$.Sl($.mG.main)),t.menuParent.jx(i,t,e)},$.g.jx=function(t){return t},$.g.uO=ba(16),$.g.NM=function(){var t,e,i,n=[],s=this.Ue();for(e=0;e<s.length;e++)if((t=s[e])&&t.state&&t.ce&&t.enabled()){var a=$.sx(t.state,$.wo);for(i=0;i<a.length;i++)n.push(t.ce(a[i]))}return n},nG={"select-marquee-start":{index:9.3,text:"Start selection marquee",eventType:"anychart.startSelectMarquee",action:function(t){t.menuParent.AP(!1)}},"save-chart-as":{index:10,text:"Save chart as...",iconClass:"ac ac-file-image-o",subMenu:{"save-chart-as-png":{index:10,text:".png",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsPng",action:function(t){t.menuParent.Eu()}},"save-chart-as-jpg":{index:20,text:".jpg",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsJpg",action:function(t){t.menuParent.Yw()}},"save-chart-as-pdf":{index:30,text:".pdf",iconClass:"ac ac-file-pdf-o",eventType:"anychart.saveAsPdf",action:function(t){t.menuParent.Zw()}},"save-chart-as-svg":{index:40,text:".svg",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsSvg",action:function(t){t.menuParent.$w()}}}},"save-data-as":{index:20,text:"Save data as...",iconClass:"ac ac-save",subMenu:{"save-data-as-text":{index:10,text:".csv",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsCsv",action:function(t){t.menuParent.cz()}},"save-data-as-xlsx":{index:20,text:".xlsx",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsXlsx",action:function(t){t.menuParent.dz()}}}},"share-with":{index:30,text:"Share with...",iconClass:"ac ac-net",subMenu:{"share-with-facebook":{index:10,text:"Facebook",iconClass:"ac ac-facebook",eventType:"anychart.shareWithFacebook",action:function(t){t.menuParent.LE()}},"share-with-twitter":{index:20,text:"Twitter",iconClass:"ac ac-twitter",eventType:"anychart.shareWithTwitter",action:function(t){t.menuParent.OE()}},"share-with-linkedin":{index:30,text:"LinkedIn",iconClass:"ac ac-linkedin",eventType:"anychart.shareWithLinkedIn",action:function(t){t.menuParent.ME()}},"share-with-pinterest":{index:40,text:"Pinterest",iconClass:"ac ac-pinterest",eventType:"anychart.shareWithPinterest",action:function(t){t.menuParent.NE()}}}},"print-chart":{index:50,text:"Print",iconClass:"ac ac-print",eventType:"anychart.print",action:function(t){t.menuParent.print()}},"full-screen-enter":{index:60,text:"Enter full screen",action:function(t){t.menuParent.fullScreen(!0)}},"full-screen-exit":{index:60,text:"Exit full screen",action:function(t){t.menuParent.fullScreen(!1)}},about:{index:80,iconClass:"ac ac-cog",text:"AnyChart "+$.gc.apply(null,["v%s.%s.%s.%s"].concat(["8","13","1","1939"])),href:"https://anychart.com"},"save-config-as":{index:100,text:"Save config as...",iconClass:"ac ac-save",subMenu:{"save-config-as-json":{index:10,text:".json",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsJson",action:function(t){t.menuParent.VO()}},"save-config-as-xml":{index:20,text:".xml",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsXml",action:function(t){t.menuParent.WO()}}}},"link-to-help":{index:110,iconClass:"ac ac-question",text:"Need help? Go to support center!",href:"https://anychart.com/support"},"version-history":{index:120,text:"Version History",href:""}},$.mG={exporting:{"save-chart-as":nG["save-chart-as"],"save-data-as":nG["save-data-as"],"share-with":nG["share-with"],"print-chart":nG["print-chart"],"exporting-separator":{index:51}},"full-screen-enter":{"full-screen-enter":nG["full-screen-enter"],"full-screen-separator":{index:61}},"full-screen-exit":{"full-screen-exit":nG["full-screen-exit"],"full-screen-separator":{index:61}},main:{about:nG.about},"select-marquee":{"select-marquee-start":nG["select-marquee-start"],"select-marquee-separator":{index:9.4}}},$.g=$.ux.prototype,$.g.Xo=function(t){return this.sm||(this.sm=new qv(this),$.K(this.sm,this.Nia,this),$.W(this,"credits",this.sm),this.sm.U(this.sm.oa)),$.p(t)?(this.sm.N(t),this):this.sm},$.g.Nia=function(t){var e=0;$.X(t,2)&&(e|=1024),this.B(e,1)},$.g.mC=function(t,e){return this.fv||(this.fv=new $.cx,$.K(this.fv,this.Eia,this),$.W(this,"animation",this.fv)),$.p(t)?(this.fv.N.apply(this.fv,arguments),this):this.fv},$.g.Eia=function(){this.B(2048,1)},$.g.UL=$.ia,$.g.ut=function(t){return this.jl||(this.jl=new fx(this),$.K(this.jl,this.JW,this),$.W(this,"a11y",this.jl)),$.p(t)?(this.jl.N.apply(this.jl,arguments),this):this.jl},$.g.JW=function(){this.B(32,1)},$.g.aG=function(t){t=this.margin().Ej(t);var e=$.wr(this,"background");return this.J(68)&&(e&&(e.ka(),e.O()||e.O(this.Na),e.ja(t),e.da(!1),e.W()),this.I(64)),t=e&&e.enabled()?e.yd():t,t=this.iT(t),t=this.padding().Ej(t),e=this.title(),this.J(132)&&(e&&(e.ka(),e.O()||e.O(this.Na),e.ja(t),e.da(!1),e.W()),this.I(128)),(e&&e.enabled()?e.yd():t).clone()},$.g.iT=function(t){var e=this.O().Ja();if(!e)return t;e=e.Xo();var i=this.Xo();return e.N(sv(i)),delete i.text_,delete i.url_,delete i.alt_,delete i.imgAlt_,delete i.logoSrc_,delete i.enabled_,this.I(1024),t},$.g.Lj=function(){if(this.VR||(this.Jx?$.K(this,this.d3,this):$.kr(this,this.d3,this),this.VR=!0),this.zc()){this.ka();var t=$.wr(this.Gm(),"label");if(t&&this.q6()){var e=this.yj();t.visible()!==e&&this.Na&&(e=this.dispatchEvent({type:"datachanged",chart:this,hasData:!e})&&e),t.visible(e)}this.Na||(this.Na=$.ok(),$.ru(this,this.Na));var i=(e=this.O()?this.O().Ja():null)&&!e.yf();i&&e.suspend(),!this.rk&&$.p(this.oa.contextMenu)&&this.contextMenu(this.oa.contextMenu),this.rk&&this.rk.attach(this),this.J(8)&&(this.Na.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Na.parent(this.O()),this.I(2)),this.J(4)&&e&&e.wa("stageresize",this.az,!1,this);var n=this.ob(),s=n.width&&n.height;if(s){this.pv(),this.kg=this.aG(n),this.Qh(this.kg),this.RE(this.dg());var a=$.wr(this,"background"),o=a?a.g("fill"):null;if(a&&a.enabled()&&o&&"none"!=o||(this.lP||(this.lP=this.Na.rect(),this.lP.fill($.bm).stroke(null)),this.lP.Qf(this.kg)),this.J(260)){for(a=0,o=this.sv.length;a<o;a++){var r=this.sv[a];r&&(r.ka(),!r.O()&&r.enabled()&&r.O(this.Na),this.LX(r,n),r.W(),r.da(!1))}t&&(t.ka(),t.O(this.Na),this.LX(t,this.kg),t.W(),t.da(!1)),this.I(256)}}this.I(4),s&&(this.UL(),this.I(2048),this.J(32)&&((t=$.wr(this,"a11y"))&&t.JR(),this.I(32))),this.da(!1),t=$.cc($.ac.Id(),this,"chart"),this.Na.id(t),i&&e.resume(),e&&(e.BM()[t]=this),$.Dp(this,{type:"chartdraw",chart:this}),this.DP()&&this.kO()}},$.g.W=function(t){return t?(this.i0||(this.i0=(0,$.pa)(this.W,this)),(0,window.setTimeout)(this.i0,0)):this.Lj(),this},$.g.pv=function(){},$.g.Qh=function(){},$.g.RE=function(){},$.g.Oz=function(t){return $.p(t)?(this.Jx!=t&&(this.Jx=t,this.VR=!1,this.B(4,9),this.Jx&&this.W()),this):this.Jx},$.g.az=function(){this.Ta().gr()&&this.B(772,9)},$.g.dg=function(){return this.kg},$.g.tha=function(t,e){var i={x:t,y:e};if(this.O()&&this.O().Ja()){var n=$.Zj(this.O().Ja());i.x+=n.x,i.y+=n.y}return i},$.g.AU=function(t,e){var i={x:t,y:e};if(this.O()&&this.O().Ja()){var n=$.Zj(this.O().Ja());i.x-=n.x,i.y-=n.y}return i},$.g.remove=function(){this.Na&&this.Na.parent(null)},$.g.d3=function(){Rp(this.W,this)};var oG={};$.rq(oG,1,"selectRectangleMarqueeFill",$.Qq),$.rq(oG,1,"selectRectangleMarqueeStroke",$.Pq),$.rq(oG,3,"selectRectangleMarqueeFill",$.Qq,"selectMarqueeFill"),$.rq(oG,3,"selectRectangleMarqueeStroke",$.Pq,"selectMarqueeStroke"),$.U($.ux,oG),$.g=$.ux.prototype,$.g.RB=function(t){var e=this.md?{}:this.F();if($.p(gq()[0].chart.background.fill)){var i={};i[Ica(this)]=$.nm(this.Ma()),e=$.Bm(e,i)||{}}return t?$.ho(e):e},$.g.MP=function(t){return $.qp(this.RB(!1),"",t)},$.g.F=function(){var t,e=$.ux.u.F.call(this);e.type=this.Ma(),$.wr(this,"title")&&(e.title=this.title().F()),$.wr(this,"background")&&(e.background=this.background().F()),$.wr(this,"tooltip")&&(e.tooltip=this.Ua().F()),e.margin=this.margin().F(),e.padding=this.padding().F(),$.wr(this,"a11y")&&(e.a11y=this.ut().F()),$.p(this.Jx)&&(e.autoRedraw=this.Jx);for(var i=[],n=0;n<this.sv.length;n++)this.sv[n]&&i.push(this.sv[n].F());return 0<i.length&&(e.chartLabels=i),e.bounds=this.Ta().F(),$.wr(this,"animation")&&(e.animation=this.mC().F()),$.wr(this.Gm(),"label")&&(e.noDataLabel=this.Gm().label().F()),this.rk&&(e.contextMenu=this.contextMenu().serialize()),e.credits=this.Xo().F(),this.Tt&&(t=this.SG().F()),t&&!$.Jc(t)&&(e.exports=t),$.Tq(this,oG,e),e},$.g.U=function(t,e){"autoRedraw"in t&&(this.Jx=t.autoRedraw),$.ux.u.U.call(this,t,e),"title"in t&&this.title().ga(!!e,t.title),"background"in t&&this.background().ga(!!e,t.background),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin(t.margin);var i=t.chartLabels;if($.A(i))for(var n=0;n<i.length;n++)this.label(n,i[n]);$.z(t.container)&&this.O(t.container),this.Ta(t.bounds),this.left(t.left),this.top(t.top),this.width(t.width),this.height(t.height),this.right(t.right),this.bottom(t.bottom),this.mC(t.animation),"noDataLabel"in t&&this.Gm().label().ga(!!e,t.noDataLabel),"tooltip"in t&&this.Ua().ga(!!e,t.tooltip),"a11y"in t&&this.ut().ga(!!e,t.a11y),$.p(t.contextMenu)&&this.contextMenu(t.contextMenu),"credits"in t&&this.Xo(t.credits),"exports"in t&&this.SG(t.exports),$.Iq(this,oG,t)},$.g.$c=void 0,$.g.R=function(){$.sd(this.fv,this.jl,this.gb,this.Dq,this.qh,this.Ia,this.gb,this.Qc,this.Wa,this.jb,this.sv,this.rk,this.sm,this.Na),this.jb=this.Wa=this.Qc=this.gb=this.Ia=this.qh=this.Dq=this.jl=this.fv=null,this.sv.length=0,this.Na=this.sm=this.rk=null,$.ux.u.R.call(this),this.he&&pq(this,this.he)},$.g.Ih=function(t){var e,i=$.so(t.domTarget);if($.J(t.target,$.Pu)||$.J(t.target,$.dy)){var n=t.target.Zi();n.aj&&n.aj()&&(e=n),n=i}else $.J(t.target,$.Ww)?i&&(e=i.X,n=i.index):(e=i&&i.X,n=$.ea(i.index)?i.index:t.pointIndex);e&&!e.md&&e.enabled()&&$.D(e.Tg)&&($.p(t.pointIndex)||(t.pointIndex=$.A(n)?n[n.length-1]:n),(t=e.Tg(t))&&e.dispatchEvent(t))},$.g.ig=function(t){var e=$.ux.u.ig.call(this,t),i=$.so(e.relatedDomTarget);return(i=i&&i.X)&&!i.md&&i.enabled()?i.ig(t):e},$.g.mG=function(t,e){for(var i=[],n=0,s=t.length;n<s;n++){var a,o=t[n];a=o.De?{index:o.De.index,distance:o.De.Tf}:{index:window.NaN,distance:window.NaN},i.push({series:o.X,points:e?[]:o.vd?$.Ha(o.vd):[],nearestPointToCursor:a})}return i},$.g.XD=function(t,e,i){for(var n,s,a,o=window.Infinity,r=0,l=t.length;r<l;r++){var h=t[r];if(h.De){var c=h.De;(o>c.Tf||!n)&&(n=h.X,s=c.index,a=$.Aa(h.vd,c.index),o=c.Tf)}}return(t={index:s,series:n})[e]=i?!a:a,t},$.g.bl=function(t,e,i,n,s){var a=this.XD(i,t,n),o=[];if(!n)for(var r=0;r<i.length;r++)for(var l=i[r],h=l.X,c=0;c<l.vd.length;c++)o.push(h.ce(l.vd[c]));return h=a.series,t={type:"hovered"==t?"pointshover":"pointsselect",seriesStatus:this.mG(i,n),currentPoint:a,actualTarget:e.target,target:this,originalEvent:e,point:h.ce(a.index),points:o},s&&(t.PT=!0),t},$.g.TL=$.ia,$.g.hA=$.ia,$.g.If=function(t){var e=$.wr(this,"interactivity",!0,this.gd),i=$.so(t.domTarget),n=!1;if($.J(t.target,$.Ww)||this.$q(t.target)){if($.p(i)){if($.ea(i)&&(i=t.target.Zi()),i.fg){var s=i.fg.X,a=i.fg.vd;$.A(a)&&!a.length&&(a=window.NaN)}else s=i.X,a=i.index;n=!0}}else $.J(t.target,$.Pu)||$.J(t.target,$.dy)||$.J(t.target,$.ww)?((a=t.target.Zi()).aj&&a.aj()&&(s=a),a=i):t.target.Zi&&$.J(t.target.Zi(),$.ww)?((a=t.target.Zi().Zi()).aj&&a.aj()&&(s=a),a=i):(s=i&&i.X,a=$.ea(i&&i.index)?i.index:t.pointIndex);if(s&&!s.md&&s.enabled()&&$.D(s.Tg)){if(null!=(i=s.Tg(t))&&$.ea(i.pointIndex)&&!(0,window.isNaN)(i.pointIndex)&&(a=i.pointIndex),i&&($.to(s,t.relatedTarget)||s.dispatchEvent(i))&&"single"==e.g("hoverMode")&&($.A(a)&&!(0,$.lD)(a,(function(t){return $.tx(s.state,$.vo,t)}),this)||!$.tx(s.state,$.vo,a)&&!(0,window.isNaN)(a))){$.D(s.$i)&&s.$i(a,t),this.TL(a,s);var o=[];(i=$.sx(s.state,$.vo)).length&&o.push({X:s,vd:i,De:{index:$.A(a)?a[0]:a,Tf:0}}),o.length&&(s.$().select(o[0].De.index),this.dispatchEvent(this.bl("hovered",t,o,!1,n)),this.zl=o.length?o:null)}}else this.zl&&(this.Md(),this.dispatchEvent(this.bl("hovered",t,this.zl,!0)),this.zl=null);if("single"!=e.g("hoverMode"))if(i=!1,(a=this.oq(t))&&a.length){for(s=this.Ue(),e=0;e<s.length;e++){var r=!1;for(o=0;o<a.length;o++)r=r||s[e]==a[o].X;!r&&$.sx(s[e].state,$.vo).length&&(a.push({X:s[e],vd:[]}),s[e].Md(),i=!0)}for(e=0,o=a.length;e<o;e++){r=a[e],s=r.X;var l=r.vd,h=$.sx(s.state,$.vo);i=i||!$.Ta(l,h),s.state.fk()&$.vo||s.$i(r.vd)}i&&(this.dispatchEvent(this.bl("hovered",t,a,!1,n)),this.zl=a.length?a:null)}else $.J(t.target,$.Ww)||(this.Md(),this.zl&&this.dispatchEvent(this.bl("hovered",t,this.zl,!0)),this.zl=null)},$.g.hg=function(t){var e,i=$.wr(this,"interactivity",!0,this.gd).g("hoverMode"),n=$.so(t.domTarget),s=!1;if($.J(t.target,$.Pu)||$.J(t.target,$.dy)){var a=t.target.Zi();a.aj&&a.aj()&&(e=a),a=n}else $.J(t.target,$.Ww)||this.$q(t.target)?(n&&(n.fg?(e=n.fg.X,a=n.fg.vd,$.A(a)&&!a.length&&(a=window.NaN)):(e=n.X,a=n.index)),s=!0):(e=n&&n.X,a=$.ea(n.index)?n.index:t.pointIndex);if(e&&!e.md&&e.enabled()&&$.D(e.Tg)&&(n=e.Tg(t))){var o=$.so(t.relatedDomTarget);o=$.N($.C(o)?o.index:o);var r=$.to(e,t.relatedTarget),l="vml"==$.kk&&e.Ua&&$.to(e.Ua(),t.relatedTarget);r&&o==a||!e.dispatchEvent(n)||l||"single"!=i||(0,window.isNaN)(a)&&!$.A(a)||(e.Md(),this.hA(),this.dispatchEvent(this.bl("hovered",t,[{X:e,vd:[],De:{index:$.A(a)?a[0]:a,Tf:0}}],!1,s)))}"single"==i||$.to(this,t.relatedTarget)||(this.Md(),this.hA(),this.zl&&this.dispatchEvent(this.bl("hovered",t,this.zl,!0,s)),this.zl=null)},$.g.$q=function(){return!1},$.g.Sj=function(t){this.Eq(t)},$.g.h2=function(){return this},$.g.Eq=function(t){var e=this.h2();if(!e.nB){var i,n,s=$.wr(e,"interactivity",!0,e.gd),a=t.ctrlKey||t.metaKey,o=s.g("multiSelectOnClick"),r=a||t.shiftKey||o,l=$.so(t.domTarget),h=e.$q(t.target),c=$.J(t.target,$.Pu),u=$.J(t.target,$.dy);if(h=$.J(t.target,$.Ww)||h){if(l)if(n=l.fg||l.vd)var d=n.X,p=n.vd;else d=l.X,p=l.index}else c||u?((c=t.target.Zi()).aj&&c.aj()&&(d=c),p=l):(d=l&&l.X,p=l&&$.ea(l.index)?l.index:t.pointIndex);if(d&&!d.md&&d.enabled()&&$.D(d.Tg)){var g=d.Tg(t);if(g&&($.to(d,t.relatedTarget)||d.dispatchEvent(g))&&(h||(p=g.pointIndex),"single"==s.g("hoverMode"))){if("none"==s.g("selectionMode")||"none"==d.ej())return;var f=1==(c=$.sx(d.state,$.wo)).length&&c[0]==p;if(!r&&f)return;for((l=r)&&(l=!!(d.state.fk()&$.wo)),!o&&(l||!r||r&&"multi-select"!=s.g("selectionMode"))?(e.ie(),e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0))):"single-select"==d.ej()&&(e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0)),d.ie(),$.A(p)&&(p=p[p.length-1])),$.D(d.Ii)&&d.Ii(p,t),u=e.Ue(),o=[],l=0;l<u.length;l++)(i=u[l])&&(c=$.sx(i.state,$.wo)).length&&o.push({X:i,vd:c,De:{index:p,Tf:0}});o.length||o.push({X:d,vd:[],De:{index:p,Tf:0}}),e.dispatchEvent(e.bl("selected",g,o)),e.hm=f?null:o}}else"single"==s.g("hoverMode")&&s.g("unselectOnClickOutOfPoint")&&(h||e.ie(),e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0)),e.hm=null);if("single"!=s.g("hoverMode")&&"none"!=s.g("selectionMode"))if((p=e.oq(t))&&p.length){var m;if(h=!1,o=[],"single-select"==s.g("selectionMode")){var v;for(l=0,s=p.length;l<s;l++){var b=p[l];"none"!=(d=b.X).ej()&&(v||(v=b),v.De.Tf>b.De.Tf&&(v=b))}if(d=v.X,h=!(f=1==(c=$.sx(d.state,$.wo)).length&&c[0]==v.De.index)||f&&r,(a=r)&&(a=!!(d.state.fk()&$.wo)),!a&&r||f||d.ie(),d.Ii(v.De.index,t),(c=$.sx(d.state,$.wo)).length)for(o.push({X:d,vd:[v.De.index],De:v.De}),u=e.Ue(),l=0;l<u.length;l++)"none"!=(d=u[l]).ej()&&((m=d==o[0].X)||d.ie());else o.push({X:d,vd:c,De:b.De})}else{if(v=[],!r)for(u=e.Ue(),l=0;l<u.length;l++)if("none"!=(i=u[l]).ej()){for(m=!1,g=0;g<p.length;g++)m=m||i==p[g].X;!m&&$.sx(i.state,$.wo).length&&(v.push({X:i,vd:[]}),i.ie(),h=!0)}for(l=0,s=p.length;l<s;l++)if("none"!=(d=(b=p[l]).X).ej()){if(n="single-select"==d.ej()?[b.De.index]:b.vd,c=$.sx(d.state,$.wo),t.shiftKey){for(m=!0,g=0;g<n.length;g++)m=m&&$.Aa(c,n[g]);f=m}else a||(f=$.Ta(n,c));h=h||!f,f||((c=r)&&(c=!!(d.state.fk()&$.wo)),!c&&r&&"single-select"!=d.ej()||d.ie(),d.Ii(n,t)),(c=$.sx(d.state,$.wo)).length?o.push({X:d,vd:c,De:b.De}):v.push({X:d,vd:c,De:b.De})}for(l=0;l<v.length;l++)o.push(v[l])}h&&(e.dispatchEvent(e.bl("selected",t,o)),e.hm=o.length?o:null)}else h||e.ie(),e.hm&&e.dispatchEvent(e.bl("selected",t,e.hm,!0)),e.hm=null}},$.g.ie=function(){var t,e=this.Ue(),i=0;for(t=e.length;i<t;i++)e[i]&&e[i].ie()},$.g.Md=function(){var t,e=this.Ue(),i=0;for(t=e.length;i<t;i++)e[i]&&e[i].Md()},$.g.gd=function(t){return this.qh||(this.qh=this.ES(),$.K(this.qh,this.kO,this),$.W(this,"interactivity",this.qh)),$.p(t)?($.C(t)?this.qh.N(t):this.qh.hoverMode(t),this):this.qh},$.g.ES=function(){return new $.hx(this)},$.g.kO=function(){for(var t=this.Ue(),e=t.length;e--;)if(t[e]){var i=$.wr(this,"interactivity",!0,this.gd);t[e].Xl(i.g("hoverMode"))}},$.g.rN=function(t){this.Js&&this.AV.cursor(this.yV||yx(this,t.clientX,t.clientY)?this.zV:null)},$.g.h3=function(t){var e,i=this.O(),n=$.Zj(i.Ja()),s=t.clientX-n.x;n=t.clientY-n.y,"mousedown"==t.type&&!t.kf.OA()||!(e=yx(this,t.clientX,t.clientY))||this.DV&&!1===this.DV(e-1,s,n,0,0,t)||(this.XH=e-1,e=this.Js[this.XH],this.pw=s,this.MD=n,this.Hn.Qf(this.qN?new $.I(this.pw,e.top,0,e.height):new $.I(this.pw,this.MD,0,0)),this.Hn.parent(i),this.Hy||(this.Hy=new zx(this.Hn)),this.Hy.D5=$.ll,(e=e.clone()).left-=this.pw,e.top-=this.MD,this.Hy.NX(e),this.lu.wa(this.Hy,"drag",this.cha),this.lu.wa(this.Hy,"end",this.bha),this.yV=!0,this.Hy.lk(t.kf),t.preventDefault(),t.stopPropagation())},$.g.cha=function(t){if(this.qN){var e=this.Js[this.XH];e=new $.I(this.pw,e.top,t.left,e.height)}else e=new $.I(this.pw,this.MD,t.left,t.top);this.Hn.Qf(e),this.BV&&this.BV(this.XH,this.pw,this.MD,t.left,t.top,new $.Si(t.EC,this.O().Ja()))},$.g.bha=function(t){if(this.qN){var e=this.Js[this.XH];e=new $.I(this.pw,e.top,t.left,e.height)}else e=new $.I(this.pw,this.MD,t.left,t.top);this.Hn.Qf(e),e=!1,this.CV&&(e=!1===this.CV(this.XH,this.pw,this.MD,t.left,t.top,new $.Si(t.EC,this.O().Ja()))),e||this.i3?this.Hn.parent(null):wx(this)},$.H(zx,$.ag),zx.prototype.ar=function(){this.deltaX=this.deltaY=0},zx.prototype.ls=function(){},$.g=$.ux.prototype,$.g.Rka=function(t){return $.kl(405,null,["chart.startSelectMarquee()","chart.startSelectRectangleMarquee()"],!0),this.AP(t)},$.g.AP=function(t){return this.nB=$.xx(this,this.hja,this.fja,this.gja,this.MM(),void 0,t,this.g("selectRectangleMarqueeStroke"),this.g("selectRectangleMarqueeFill")),this},$.g.jN=function(){return!!this.Js},$.g.Dda=function(){return this.nB=!1,wx(this),this},$.g.MM=function(){return null},$.g.aA=function(t,e,i,n,s,a,o){e=$.Zj(this.O().Ja());var r=0>s?i+s:i,l=0>a?n+a:n;return{type:t,offsetX:o.offsetX,offsetY:o.offsetY,clientX:o.clientX,clientY:o.clientY,screenX:o.screenX,screenY:o.screenY,button:o.button,actionButton:o.actionButton,keyCode:o.keyCode,charCode:o.charCode,ctrlKey:o.ctrlKey,altKey:o.altKey,shiftKey:o.shiftKey,metaKey:o.metaKey,platformModifierKey:o.platformModifierKey,clientStartX:i+e.x,clientStartY:n+e.y,clientLeft:r+e.x,clientTop:l+e.y,startX:i,startY:n,left:r,top:l,width:Math.abs(s),height:Math.abs(a)}},$.g.hja=function(t,e,i,n,s,a){return this.dispatchEvent(this.aA("selectmarqueestart",t,e,i,n,s,a))},$.g.fja=function(t,e,i,n,s,a){return this.dispatchEvent(this.aA("selectmarqueechange",t,e,i,n,s,a))},$.g.gja=function(t,e,i,n,s,a){return t=this.aA("selectmarqueefinish",t,e,i,n,s,a),(e=this.dispatchEvent(t))&&this.$O(t),this.nB=!1,e},$.g.$O=function(){},$.g.fullScreen=function(t){var e=this.O();return e=e?e.Ja():null,$.p(t)?(e&&e.fullScreen(t),this):!!e&&e.fullScreen()},$.g.Ky=function(){var t=this.O();return!!(t=t?t.Ja():null)&&t.Ky()},$.g.SG=function(t){var e=$.fa.anychart.exports;return e?this.Tt||(this.Tt=e.create()):$.il(4,null,["Exporting"]),$.p(t)&&this.Tt?(this.Tt.U(t),this):this.Tt},$.g.ts=function(){return this.Ue()},$.g.m2=function(){var t=$.Ga.apply(null,(0,$.Wa)(this.ts(),(function(t){return t.data().Wv()})));return $.Ka(t,t,$.qo),t},$.g.VW=function(t,e,i){var n;if($.A(e))for(n=0;n<e.length;n++){var s=e[n];t[i[n]]=$.C(s)?co(s):s}else if($.C(e))for(n in e)s=e[n],t[i[n]]=$.C(s)?co(s):s;else t[i.value]=$.C(e)?co(e):e},$.g.d6=function(){return!0},$.g.sA=function(){return[]},$.g.tA=function(t){return t.ma()},$.g.rA=function(){return null},$.g.qA=function(t){return $.J(t,$.eB)?t.Be():["value"]},$.g.$W=function(t,e,i,n){return($.J(e,$.eB)?e.name():"series"+String(i))+(1<n?" ("+t+")":"")},$.g.nD=function(t,e,i,n){var s=$.qo(t);return s in n?n=n[s]:(n=n[s]=i.length,i.push([e||String(t)])),i[n]},$.g.N1=function(t,e,i,n,s,a,o){if((s=$.qo(t))in o){do{a=s+"_"+1..toString()}while(a in o);s=a}return o[s]=!0,s in n?n=n[s]:(n=n[s]=i.length,i.push([e||String(t)])),i[n]},$.g.O1=function(t){return $.D(t.$)?t.$():t.data().$()},$.g.W2=function(t){return $.qo(t.data().Wv()[0])},$.g.N4=function(t,e,i,n){for(var s=0;s<e.length;s++)t[s+n.length]=i.get(e[s])},$.g.M4=function(t,e,i,n){if(1<e.length)for(var s=0;s<i.length;s++)t.push(this.$W(i[s],e[n],n+1,i.length));else t.push.apply(t,i)},$.g.DM=function(t){for(var e=this.ts(),i=this.sA(),n={},s=[],a=0;a<e.length;a++){var o=e[a],r=this.qA(o);if(r.length){var l=this.O1(o,t);l.reset();for(var h=this.W2(o),c={};l.advance();){var u=this.tA(l);this.d6(t,o,u)&&(u=this.nD(u,this.rA(l,o),s,n,h,l.ma(),c),this.N4(u,r,l,i))}this.M4(i,e,r,a)}}return{headers:i,data:s}},$.g.Zj=function(t,e){var i="raw"==(t=$.zk(zda,t,"default"))?$.Ax(this):this.DM(t);return $.kp(i.headers,i.data,e)},$.g.H6=function(t,e){var i=this.Zj();return(i=Ap(i,t,e))?e?ef(i):i:null},$.g.G6=function(t,e){var i=this.H6(t);return i?($.uf(i,{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px"}),e?ef(i):i):i},$.g.WO=function(t){var e=$.eq.exports;if(e){var i=this.MP(!1);e.WO(this,i,t)}else $.il(4,null,["Exporting"])},$.g.VO=function(t){var e=$.eq.exports;if(e){var i=this.RB(!0);e.VO(this,i,t)}else $.il(4,null,["Exporting"])},$.g.cz=function(t,e,i){var n=$.eq.exports;n?(t=this.Zj(t,e),n.cz(this,t,i)):$.il(4,null,["Exporting"])},$.g.dz=function(t,e,i){var n=$.eq.exports;if(n){var s={rowsSeparator:"\n",columnsSeparator:",",ignoreFirstRow:!1};$.ra(s,i||{}),t=this.Zj(t,s),n.dz(this,t,e)}else $.il(4,null,["Exporting"])},$.g.id=function(t){if($.p(t)){if(this.he!=t)if(null===t)pq(this,this.he),this.he=t;else{var e=this.he;oq[t]&&oq[t]!=this?($.kl(21,null,[t],!0),e=!1):($.p(e)&&pq(this,e),oq[t]=this,e=!0),e&&(this.he=t)}return this}return this.he};var pG=$.ux.prototype;pG.a11y=pG.ut,pG.animation=pG.mC,pG.autoRedraw=pG.Oz,pG.title=pG.title,pG.background=pG.background,pG.margin=pG.margin,pG.padding=pG.padding,pG.label=pG.label,pG.container=pG.O,pG.contextMenu=pG.contextMenu,pG.draw=pG.W,pG.toJson=pG.RB,pG.toXml=pG.MP,pG.legend=pG.eg,pG.credits=pG.Xo,pG.tooltip=pG.Ua,pG.saveAsPng=pG.Eu,pG.saveAsJpg=pG.Yw,pG.saveAsPdf=pG.Zw,pG.saveAsSvg=pG.$w,pG.shareAsPng=pG.Hu,pG.shareAsJpg=pG.FB,pG.shareAsPdf=pG.GB,pG.shareAsSvg=pG.HB,pG.getPngBase64String=pG.zA,pG.getJpgBase64String=pG.wA,pG.getSvgBase64String=pG.BA,pG.getPdfBase64String=pG.yA,pG.toSvg=pG.Nq,pG.saveAsCsv=pG.cz,pG.saveAsXlsx=pG.dz,pG.saveAsXml=pG.WO,pG.saveAsJson=pG.VO,pG.exports=pG.SG,pG.toCsv=pG.Zj,pG.toA11yTable=pG.G6,pG.toHtmlTable=pG.H6,pG.localToGlobal=pG.tha,pG.globalToLocal=pG.AU,pG.getStat=pG.Rg,pG.getSelectedPoints=pG.NM,pG.credits=pG.Xo,pG.shareWithFacebook=pG.LE,pG.shareWithTwitter=pG.OE,pG.shareWithLinkedIn=pG.ME,pG.shareWithPinterest=pG.NE,pG.startSelectMarquee=pG.Rka,pG.startSelectRectangleMarquee=pG.AP,pG.inMarquee=pG.jN,pG.cancelMarquee=pG.Dda,pG.id=pG.id,pG.fullScreen=pG.fullScreen,pG.isFullScreenAvailable=pG.Ky,$.H($.Bx,$.ux),$.g=$.Bx.prototype,$.g.ra=$.ux.prototype.ra,$.g.sa=512|$.ux.prototype.sa,$.g.Ma=function(){return this.re},$.g.eg=function(t){return this.Bi||(this.Bi=new $.Ww,$.K(this.Bi,this.OW,this),this.Bi.kb(this),$.W(this,"legend",this.Bi),this.B(512,1)),$.p(t)?(this.Bi.N(t),this):this.Bi},$.g.OW=function(t){var e=0,i=0;$.X(t,1)&&(e|=512,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.Ms=function(t){return"default"==t},$.g.zr=function(t){t=t.Ki(),(t=this.ef(t))&&(t.enabled(!t.enabled()),t.enabled()?t.Zk():t.Md())},$.g.wq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Zk()},$.g.vq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Md()},$.g.aG=function(t){t=$.Bx.u.aG.call(this,t);var e=$.wr(this,"legend");return this.J(516)&&e&&"outside"==e.g("positionMode")&&$.z(e.g("position"))&&(Cx(this,t),this.I(512)),(t=e&&e.enabled()&&"outside"==e.g("positionMode")&&$.z(e.g("position"))?e.yd():t).clone()},$.g.RE=function(t){var e=$.wr(this,"legend");this.J(516)&&(e&&("inside"==e.g("positionMode")||$.C(e.g("position")))?Cx(this,t):this.I(512))},$.g.NI=function(){return!1},$.g.F=function(){var t=$.Bx.u.F.call(this);return $.wr(this,"legend")&&(t.legend=this.eg().F()),t.interactivity=this.gd().F(),t},$.g.U=function(t,e){$.Bx.u.U.call(this,t,e),"legend"in t&&this.eg(t.legend),this.gd(t.interactivity)},$.g.R=function(){$.qd(this.Bi),this.Bi=null,$.Bx.u.R.call(this)};var qG=$.Bx.prototype;qG.legend=qG.eg,qG.interactivity=qG.gd,qG.noData=qG.Gm,$.H($.Dx,$.qf),$.Dx.prototype.f=function(t,e){this.Jj=t,this.mL=e},$.Dx.prototype.b=function(t){this.state=t,$.Dp(this,"statechange")};var rG=$.Dx.prototype;rG.setRules=rG.f,rG.setState=rG.b,$.H($.Ex,$.qf),$.Ex.prototype.handleEvent=function(t){var e=0,i=0,n=t.kf;"mousewheel"==n.type?(t=Fx(-n.wheelDelta),$.p(n.wheelDeltaX)?(e=Fx(-n.wheelDeltaX),i=Fx(-n.wheelDeltaY)):i=t):(100<(t=n.detail)?t=3:-100>t&&(t=-3),$.p(n.axis)&&n.axis===n.HORIZONTAL_AXIS?e=t:i=t),$.ea(this.i)&&(e=$.Za(e,-this.i,this.i)),$.ea(this.o)&&(i=$.Za(i,-this.o,this.o)),this.D&&(e=-e),e=new Gx(t,n,e,i),this.dispatchEvent(e)},$.Ex.prototype.R=function(){$.Ex.u.R.call(this),Zd(this.f),this.f=null},$.H(Gx,$.Bd),$.H($.Hx,$.V),$.Hx.prototype.ra=32779|$.V.prototype.ra,$.Hx.prototype.ys=function(t){var e=$.Hx.u.ys.call(this,t),i=this.flatten().enabled;return"enabled"==t?(e=32768,i&&(e|=this.f,this.f=0)):i||(this.f|=e),e};var sG={};$.sq(sG,[[0,"format",$.ar],[1,"adjustFontSize",yq],[0,"fontVariant",$.dl],[0,"letterSpacing",$.wq],[0,"textDirection",$.el],[0,"textIndent",$.Bq],[0,"textShadow",$.Zb],[0,"textOverflow",$.Zq],[0,"useHtml",$.Dq],[0,"wordBreak",$.Cq],[0,"wordWrap",$.Cq],[0,"fontColor",$.Aq],[0,"fontDecoration",$.bl],[0,"fontFamily",$.zq],[0,"fontOpacity",$.Bq],[0,"fontSize",$.wq],[0,"fontStyle",$.cl],[0,"fontWeight",$.wq],[0,"hAlign",$.$k],[0,"lineHeight",$.wq],[0,"minFontSize",$.wq],[0,"maxFontSize",$.wq],[0,"maxLength",$.xq],[0,"vAlign",$.al],[0,"anchor",$.Dk],[0,"height",$.br],[0,"offsetX",$.br],[0,"offsetY",$.br],[0,"position",$.Ek],[0,"rotation",$.Bq],[0,"width",$.br],[0,"zIndex",$.Bq],[0,"allowMultiline",$.Zq],[0,"clip",$.Cq],[0,"enabled",$.Zq],[0,"selectable",$.Dq],[0,"disablePointerEvents",$.Dq],[0,"autoRotate",$.Dq]]),$.U($.Hx,sG),$.g=$.Hx.prototype,$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(null===t?($.kr(this.Y,this.Tc,this),this.padding().parent(null),this.Y=null):(this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,this.padding().parent(this.Y.padding()),$.K(this.Y,this.Tc,this),this.Ug())),this):this.Y},$.g.Tc=function(t){this.Ug(),this.va(t.f)},$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.Ug=function(){this.b=null},$.g.flatten=function(){if(!this.b)for(var t in this.b={},sG)sG.hasOwnProperty(t)&&(this.b[t]=this.g(t));return this.b},$.g.VK=function(t){var e=this.flatten().maxLength;return Du(t,e)},$.g.tk=function(t){var e=this.g("format")||$.ep;return $.z(e)&&(e=$.Nu($.Lu.Id(),e)),t=e.call(t,t),t=$.p(t)?String(t):"",this.VK(t)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.fm,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(){this.va(2)},$.g.background=function(t){return this.Ia||(this.Ia=new $.yu),$.p(t)?this:this.Ia},$.g.Ie=function(t,e){return!!$.da(e)&&(this.enabled(e),!0)},$.g.U=function(t,e){$.Hx.u.U.call(this,t,e),$.Iq(this,sG,t,e),this.padding().ga(!!e,t.padding)},$.g.F=function(){var t=$.Hx.u.F.call(this);$.Tq(this,sG,t,void 0,void 0,!0);var e=$.wr(this,"padding");return e&&(e=$.Qc(e.Pa),$.Jc(e)||(t.padding=e)),t},$.g.R=function(){this.b=null,this.parent(null),$.sd(this.Wa,this.Ia),this.Ia=this.Wa=null,$.Hx.u.R.call(this)};var tG=$.Hx.prototype;tG.padding=tG.padding,tG.background=tG.background,$.g=$.Ix.prototype,$.g.width=function(){return this.Ta?this.Ta.width:0},$.g.height=function(){if(this.Ta)var t=this.Ta.height;else if(this.b.length)for(var e=t=0;e<this.b.length;e++)t+=this.b[e].height();else t=this.Ha;return t},$.g.style=function(t){if($.p(t)){var e,i=t||{},n=this.f,s={};for(e in n)n[e]!==i[e]&&(s[e]=!0);for(e in i)i[e]!==n[e]&&(s[e]=!0);return $.Jc(s)||(this.ho.style=!0,this.f=i,t.fontSize&&(t=(0,window.parseFloat)(t.fontSize),t=(0,window.isNaN)(t)?13:t,this.Ha=24>t?t+3:Math.round(1.2*t),this.aa=Math.round(.8*this.Ha))),this}return this.f},$.g.nK=function(t){this.Ba+=t},$.g.mK=function(){this.Ba+="\n"},$.g.pM=function(){this.text(this.Ba),this.Ba="",Lx(this)},$.g.text=function(t){return $.p(t)?(t=ic(t),t=$.hc(t),this.kc!=t&&(this.ho.text=!0,this.kc=t),this):this.kc},$.g.Ac=function(){this.ia=this.P.Vx()},$.g.Vd=function(){return this.ia||this.Ac(),this.ia},$.g.Ij=function(){var t;if(this.na||this.ea)for(this.G&&this.G.Ij(),this.K&&this.K.Ij(),t=0;t<this.i.length;t++)for(var e=this.i[t],i=0;i<e.length;i++)e[i].Ij();else if(this.ba)for(t=0;t<this.b.length;t++)(e=this.b[t])&&e.Ij();else e=this.f,t=this.Vd(),this.ho.style&&("fontStyle"in e?t.setAttribute("font-style",e.fontStyle):t.removeAttribute("font-style"),"fontVariant"in e?t.setAttribute("font-variant",e.fontVariant):t.removeAttribute("font-variant"),"fontFamily"in e?(t.setAttribute("font-family",e.fontFamily),t.style.fontFamily=e.fontFamily):(t.removeAttribute("fontFamily"),t.style.fontFamily=""),t.style.textShadow="textShadow"in e&&"none"!=e.textShadow?e.textShadow:"","fontSize"in e?t.setAttribute("font-size",e.fontSize):t.removeAttribute("font-size"),"fontWeight"in e?t.setAttribute("font-weight",e.fontWeight):t.removeAttribute("font-weight"),"letterSpacing"in e?t.setAttribute("letter-spacing",e.letterSpacing):t.removeAttribute("letter-spacing"),"fontDecoration"in e?t.setAttribute("text-decoration",e.fontDecoration):t.removeAttribute("text-decoration"),"fontColor"in e?e.textOverflow||t.setAttribute("fill",e.fontColor):t.removeAttribute("fill"),"fontOpacity"in e?t.setAttribute("opacity",e.fontOpacity):t.removeAttribute("opacity"),"disablePointerEvents"in e?t.setAttribute("pointer-events",e.disablePointerEvents?"none":""):t.removeAttribute("pointer-events"),"selectable"in e&&!e.selectable?(t.style["-webkit-touch-callout"]="none",t.style["-webkit-user-select"]="none",t.style["-khtml-user-select"]="none",t.style["-moz-user-select"]="moz-none",t.style["-ms-user-select"]="none",t.style["-o-user-select"]="none",t.style["user-select"]="none",($.hd&&9==cd||$.yd)&&(t.setAttribute("unselectable","on"),t.setAttribute("onselectstart","return false;"))):(t.style["-webkit-touch-callout"]="",t.style["-webkit-user-select"]="",t.style["-khtml-user-select"]="",t.style["-moz-user-select"]="",t.style["-ms-user-select"]="",t.style["-o-user-select"]="",t.style["user-select"]="",($.hd&&9==cd||$.yd)&&(t.removeAttribute("unselectable"),t.removeAttribute("onselectstart"))),"anchor"in e?(e=e.anchor,t.setAttribute("text-anchor",$.ec(e,"center")?"middle":$.ec(e,"right")?"end":"start")):t.removeAttribute("text-anchor"),this.ho.style=!1),this.ho.text&&(t.textContent=this.kc,this.ho.text=!1)},$.g.rb=function(){return this.Ta?this.Ta:new $.I(0,0,0,this.Ha)},$.g.ld=function(){$.Rx(this),this.ia&&($.Xe(this.ia),this.ia=null),this.D&&($.Xe(this.D),this.Za=this.D=null),Jx(this,!0),this.o=this.O=null,this.style({}),this.text("")},$.H($.Zx,$.Pu),$.g=$.Zx.prototype,$.g.Dc=function(t){return $.p(t)?(t=$.N(t),this.tc!=t&&(this.tc=t,this.B(4,9)),this):this.tc},$.g.uc=function(t){return $.p(t)?(t=$.N(t),this.vc!=t&&(this.vc=t,this.B(4,9)),this):this.vc},$.g.Ty=function(t){return $.p(t)?(t=$.N(t),this.D!=t&&(this.D=t,this.B(4,9)),this):this.D},$.g.UE=function(t){$.p(t)&&(t=null===t?t:$.ab($.N(t)||0),this.P!=t&&(this.P=t,this.B(4,9)))},$.g.fz=function(t){return $.p(t)?(t=null===t?t:$.Za($.N(t)||0,-360,360),this.G!=t&&(this.G=t,this.B(4,9)),this):this.G};var Xda=$.Zx.prototype,uG=$.Qc($.Pu.prototype.Dz);$.rq(uG,0,"autoRotate",$.Dq),Xda.Dz=uG,$.U($.Zx,$.Zx.prototype.Dz),$.Zx.prototype.S1=function(t,e,i,n,s,a){if(i)var o=i.width,r=i.height;var l=e.angle,h=e.radius;e=$.p(e.radiusY)?e.radiusY:h;var c=0,u=0,d=this.Dc(),p=this.uc(),g=this.fz(),f=this.Ty();return(i||!(0,window.isNaN)(d)&&!(0,window.isNaN)(p))&&(c=i.left,u=i.top,c=(0,window.isNaN)(d)?c+o/2:d,u=(0,window.isNaN)(p)?u+r/2:p,i=$.p(f)&&!(0,window.isNaN)(f)?$.L(s,f):i?$.L(s,Math.min(o,r)/2):0,l+=$.L(n,null!=g?g:360),h+=i,e+=i),n=c+$.db(l,h),l=u+$.eb(l,e),n-=(a=$.Eo(new $.I(0,0,t.width,t.height),a)).x,l-=a.y,t.left=n,t.top=l,t},$.Zx.prototype.yl=function(t,e,i,n){if($.J(t,$.$x)){var s=(t.jc()?t.jc().value.angle:0)||0,a=t.AA(s),o=t.ic("anchor");"auto"==o&&(o=t.ic("autoRotate")?"center":$.Go(s)),n=$.p(n)?n:t.ma()}else o=($.p(i)&&$.p(i.rotation)?i.rotation:this.g("rotation"))||0,a=($.p(i)&&$.p(i.autoRotate)?i.autoRotate:this.g("autoRotate"))||!1,s=(e?e.value.angle:0)||0,a=a?0<s&&180>s?o+s+270:o+s+90:o,o=$.p(i)&&i.anchor||this.g("anchor");return t=$.Xu(this,t,e,i,n),e=a,i=$.Eo(t,o),e=$.Kb($.bb(e),i.x,i.y),t=$.ln(t)||[],e.transform(t,0,t,0,4),t},$.Zx.prototype.vL=function(){return new $.$x},$.H($.$x,$.Tu);var Yda=$.$x.prototype,vG=$.Qc($.Tu.prototype.oC);$.rq(vG,0,"autoRotate",$.Dq),Yda.oC=vG,$.U($.$x,$.$x.prototype.oC),$.$x.prototype.AA=function(t){var e=this.ic("rotation");return this.ic("autoRotate")?0<t&&180>t?e+t+270:e+t+90:e},$.$x.prototype.tf=function(t,e){this.b||$.Uu(this);var i=this.b.positionFormatter,n=this.xb.path()?"center":Qu(this.b.anchor)||"left-top",s=this.b.offsetX||0,a=this.b.offsetY||0,o=this.hp,r=this.jc(),l=$.Qc(i.call(r,r));i=l.angle,r=l.radius,l=$.p(l.radiusY)?l.radiusY:r;var h=0,c=0,u=o.Dc(),d=o.uc(),p=o.fz();if(o=o.Ty(),e||!(0,window.isNaN)(u)&&!(0,window.isNaN)(d)){h=e.left,c=e.top;var g=e.width,f=e.height;h=(0,window.isNaN)(u)?h+g/2:u,c=(0,window.isNaN)(d)?c+f/2:d,a=$.p(o)&&!(0,window.isNaN)(o)?$.L(a,o):e?$.L(a,Math.min(g,f)/2):0,i+=$.L(s,null!=p?p:360),r+=a,l+=a}s=h+$.db(i,r),a=c+$.eb(i,l),s-=(n=$.Eo(new $.I(0,0,t.width,t.height),n)).x,a-=n.y,this.Lg+=s,this.Mg+=a,t.left=s,t.top=a,this.b.rotation=this.AA(i),this.xr?this.xb.x(this.Lg).y(this.Mg):this.xb.setPosition(this.Lg,this.Mg)},$.H($.dy,$.Y);var Zda=function(){var t={};return $.sq(t,[$.Z.yz,$.Z.Yn,$.Z.CQ,$.Z.DQ,$.Z.nZ,$.Z.HQ,[0,"position",$.Aq],[0,"size",$.xq],[0,"anchor",function(t){return null===t?t:$.Dk(t)}],[0,"type",function(t){return $.D(t)||(t=$.Ok(t)),t}]]),t}();$.U($.dy,Zda),$.g=$.dy.prototype,$.g.ra=$.Y.prototype.ra,$.g.sa=80|$.Y.prototype.sa,$.g.MT=function(){for(var t in $.dy.u.MT.call(this),this.oa)t in this.ua&&(this.b[t]=!0)},$.g.enabled=function(t){return $.p(t)?(null===this.o&&t&&this.B(1,this.mr()),this.o=t,this.WE=null!==this.Pa.enabled,$.dy.u.enabled.call(this,t),this):this.o},$.g.Ma=function(){return this.Pa.type||this.oa.type},$.g.Tm=function(){return $.p(this.Pa.fill)?this.Pa.fill:this.oa.fill},$.g.oJ=function(t){this.D=t},$.g.g=function(t){var e=$.dy.u.g.call(this,t);return e||("stroke"==t?e=this.G||"none":"fill"==t?e=this.D||"black":"type"==t&&(e=this.WF||"diagonal-cross")),e},$.g.ta=function(t,e){$.dy.u.ta.call(this,t,e),this.b[t]=!0},$.g.gk=function(){return $.p(this.Pa.stroke)?this.Pa.stroke:this.oa.stroke},$.g.pJ=function(t){this.G=t},$.g.Dd=function(t){return $.p(t)?(this.RL=t,this.B(16,1),this):this.RL},$.g.measure=function(t){this.i||(this.i=$.qk());var e=this.ja();if(e)var i=e.width,n=e.height;var s=this.g("type"),a=this.g("size");e=this.g("anchor");var o=this.g("offsetX"),r=this.g("offsetY");return s=$.z(s)?$.zp(s):s,this.i.clear(),s.call(this,this.i,0,0,a),a=this.i.rb(),t=$.Qc(this.g("positionFormatter").call(t,t)),t=new $.gb(t.x,t.y),s=$.Eo(new $.I(0,0,a.width,a.height),e),t.x-=s.x,t.y-=s.y,$.Yo(t,e,$.p(o)?$.L(o,i):0,$.p(r)?$.L(r,n):0),a.left=t.x,a.top=t.y,a},$.g.clear=function(t){if(this.f||(this.f=[]),this.Bc&&this.Bc.length)if($.p(t))this.Bc[t]&&(this.Bc[t].clear(),this.f.push(this.Bc[t]),delete this.Bc[t]);else{for(t=this.Bc.length;t--;){var e=this.Bc[t];e&&(e.clear(),this.f.push(e))}this.Bc.length=0,this.B(64,1)}else this.Bc=[];return this},$.g.jp=function(t){return t=+t,this.Bc&&this.Bc[t]?this.Bc[t]:null},$.g.pH=function(){return this.b},$.g.Vd=function(){return this.wb},$.g.add=function(t,e){if($.p(this.Bc)||(this.Bc=[]),$.p(e))var i=+e,n=this.Bc[i];return n?n.clear():(n=this.f&&0<this.f.length?this.f.pop():this.L0(),$.p(i)?(this.Bc[i]=n,n.HE(i)):(this.Bc.push(n),n.HE(this.Bc.length-1))),n.jc(t),$.fy(n,this),n},$.g.L0=function(){return new $.ey},$.g.W=function(){if(this.md)return this;this.wb||(this.wb=$.ok(),this.K&&$.ru(this,this.wb)),this.wb.Dd(this.Dd());var t=this.wb.Ja(),e=t&&!t.yf();return e&&t.suspend(),this.Bc&&(0,$.Pe)(this.Bc,(function(t){t&&(t.O(this.wb),t.W())}),this),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.wb.parent(this.O()),this.I(2)),this.I(4294967295),e&&t.resume(),this},$.g.remove=function(){this.wb&&this.wb.remove()},$.g.sl=function(){return this.wb},$.g.F=function(){var t=$.dy.u.F.call(this);delete t.enabled;var e=this.enabled();return $.p(e)&&(t.enabled=e),$.p(this.Dd())&&(t.disablePointerEvents=this.Dd()),this.b.position&&(t.position=this.g("position")),this.b.anchor&&(t.anchor=this.g("anchor")),this.b.offsetX&&(t.offsetX=this.g("offsetX")),this.b.offsetY&&(t.offsetY=this.g("offsetY")),this.b.type&&(t.type=this.g("type")),this.b.rotation&&(t.rotation=(0,window.isNaN)(this.g("rotation"))?null:this.g("rotation")),$.p(this.g("size"))&&(t.size=this.g("size")),this.b.fill&&$.p(this.Pa.fill)&&(t.fill=$.Rl(this.Pa.fill)),this.b.stroke&&$.p(this.Pa.stroke)&&(t.stroke=$.Rl(this.Pa.stroke)),t},$.g.Zd=function(t){return $.z(t)?{type:t,enabled:!0}:null},$.g.Ie=function(t,e){var i=this.Zd(arguments[1]);return i?(this.type?this.type(i.type):this.ta("type",i.type),this.enabled(i.enabled),!0):$.Y.prototype.Ie.apply(this,arguments)},$.g.U=function(t,e){var i=this.enabled();if($.dy.u.U.call(this,t,e),e)for(var n in t)this.oa[n]=t[n],this.b[n]=!0;else $.Iq(this,wG,t);this.Dd(t.disablePointerEvents),this.enabled("enabled"in t?t.enabled:i)},$.g.R=function(){$.sd(this.Bc,this.f,this.wb),this.wb=this.f=this.Bc=null,$.dy.u.R.call(this)},$.g.ig=function(t){for(var e,i=(t=$.dy.u.ig.call(this,t)).domTarget;$.J(i,$.ig)&&(e=i.tag,!$.J(e,$.Y)&&$.Do(e));)i=i.parent();return t.markerIndex=$.N(e),t},$.H($.ey,$.Y);var wG=function(){var t={};return $.sq(t,[$.Z.ZY,$.Z.CQ,$.Z.DQ,$.Z.nZ,$.Z.HQ,[0,"position",$.Cq],[0,"size",$.Bq],[1,"fill",$.Qq],[1,"stroke",$.Pq],[0,"type",function(t){return $.D(t)||(t=$.Ok(t)),t}]]),t}();$.U($.ey,wG),$.g=$.ey.prototype,$.g.ra=$.Y.prototype.ra,$.g.sa=16|$.Y.prototype.sa,$.g.Vd=function(){return this.b},$.g.ma=function(){return this.Ad},$.g.HE=function(t){this.Ad=+t},$.g.jc=function(t){return $.p(t)?(this.aa!=t&&(this.aa=t,this.B(16,8)),this):this.aa},$.g.ta=function(t,e){this.f[t]=e},$.g.g=function(t){var e=$.p(this.f[t])?this.f[t]:this.oa[t];return $.p(e)||("stroke"==t?e=this.G:"fill"==t&&(e=this.D)),e},$.g.oJ=function(t){this.D=t},$.g.pJ=function(t){this.G=t},$.g.enabled=function(t){return $.p(t)?(this.f.enabled!=t&&(this.f.enabled=t,this.B(1,9)),this):$.p(this.f.enabled)?this.f.enabled:this.oa.enabled},$.g.clear=function(){this.Hi(),this.b&&(this.b.parent(null),this.b.Bl()),this.B(2)},$.g.Hi=function(){this.f.padding&&$.qd(this.f.padding),this.oa={},this.f={},this.o={},delete this.D,delete this.G},$.g.td=function(t,e){$.p(t)&&this.N(t),$.p(e)&&(this.o=e),this.B(17,9)},$.g.ic=function(t){var e,i=$.fy(this),n=$.gy(this)?$.gy(this):i,s=!(i&&n);return n!=i&&(e=n.pH()),"enabled"==t?hy(this,this.enabled(),this.o.enabled,!s&&i.enabled(),!s&&n.enabled(),null!==(s?null:n.enabled())):hy(this,this[t](),this.o[t],s?void 0:i[t](),s?void 0:n[t](),!(!e||!e[t]))},$.g.W=function(){if(this.md)return this;var t,e=$.fy(this),i=$.gy(this)?$.gy(this):e,n=!(e&&i);i!=e&&(t=i.pH()),this.b||(this.b=$.qk());var s=hy(this,this.enabled(),this.o.enabled,!n&&e.enabled(),!n&&i.enabled(),null!==(n?null:i.enabled()));if(null===s&&(s=!0),this.J(1)||!n&&i.J(1)){if(!s)return this.b.parent(null),this.I(4294967295),this;this.O()&&this.b.parent(this.O()),this.I(1)}if((this.J(2)||!n&&i.J(2))&&(s&&(!n&&e.Vd()&&(this.O()||this.O(e.Vd()),this.O().parent()||this.O().parent(e.O())),this.O()&&this.b.parent(this.O())),this.I(2)),(this.J(8)||!n&&i.J(8))&&(this.O()&&!n&&this.O().zIndex(e.zIndex()),this.b.zIndex(this.zIndex()),this.I(8)),this.J(16)||!n&&i.J(16)||!n&&i.J(4)){var a="anchor type size offsetY offsetX fill stroke positionFormatter rotation".split(" ");s={},n&&(this.ka(),$.p(this.g("positionFormatter"))||this.ta("positionFormatter",$.ep),$.p(this.g("size"))||this.ta("size",10),$.p(this.g("anchor"))||this.ta("anchor","center"),$.p(this.g("offsetX"))||this.ta("offsetX",0),$.p(this.g("offsetY"))||this.ta("offsetY",0),$.p(this.g("rotation"))||this.ta("rotation",0),this.da(!1));for(var o=0,r=a.length;o<r;o++){var l=a[o],h=this[l](),c=this.o[l],u=n?void 0:e[l]?e[l]():e.g(l),d=n?void 0:i[l]?i[l]():i.g(l);s[l]=hy(this,h,c,u,d,!(!t||!t[l]))}if(e=$.z(s.type)?$.zp(s.type):s.type,i=this.ja())var p=i.width,g=i.height;this.b.clear(),i=$.Dk(s.anchor),n=$.dp(s.stroke),this.i&&this.i.wv?e.call(this,this.b,0,0,s.size,n):e.call(this,this.b,0,0,s.size),t=this.b.ck(),a=this.jc(),a=$.Qc(s.positionFormatter.call(a,a)),a=new $.gb(a.x,a.y),o=$.Eo(new $.I(0,0,t.width,t.height),i),a.x-=o.x,a.y-=o.y,$.Yo(a,i,$.p(s.offsetX)?$.L(s.offsetX,p):0,$.p(s.offsetY)?$.L(s.offsetY,g):0),t.left=a.x+t.width/2,t.top=a.y+t.height/2,this.b.clear(),this.i&&this.i.wv?e.call(this,this.b,t.left,t.top,s.size,n):e.call(this,this.b,t.left,t.top,s.size),this.b.fill(s.fill),this.b.stroke(s.stroke),this.b.oc(1,0,0,1,0,0),this.b.JE(s.rotation||0,a.x+o.x,a.y+o.y),this.b.tag=this.ma(),this.I(16)}return this.I(4),this},$.g.F=function(){var t=$.ey.u.F.call(this);delete t.enabled;var e=this.enabled();return null!=e&&(t.enabled=e),$.p(this.g("position"))&&(t.position=this.g("position")),$.p(this.g("rotation"))&&(t.rotation=(0,window.isNaN)(this.g("rotation"))?null:this.g("rotation")),$.p(this.g("anchor"))&&(t.anchor=this.g("anchor")),$.p(this.g("offsetX"))&&(t.offsetX=this.g("offsetX")),$.p(this.g("offsetY"))&&(t.offsetY=this.g("offsetY")),$.p(this.g("type"))&&(t.type=this.g("type")),$.p(this.g("size"))&&(t.size=this.g("size")),$.p(this.g("fill"))&&(t.fill=$.Rl(this.g("fill"))),$.p(this.g("stroke"))&&(t.stroke=$.Rl(this.g("stroke"))),t},$.g.U=function(t,e){var i=this.enabled();$.ey.u.U.call(this,t,e),$.Iq(this,wG,t),$.p(t.enabled)||delete this.f.enabled,this.enabled("enabled"in t?t.enabled:i)},$.g.R=function(){$.qd(this.b),this.b=null,$.ey.u.R.call(this)},$.H(iy,$.dy),$.xu(iy,$.dy),iy.prototype.L0=function(){return new jy},$.H(jy,$.ey);var xG=$.dy.prototype;xG.disablePointerEvents=xG.Dd,xG.enabled=xG.enabled,xG=$.ey.prototype,xG=iy.prototype,$.E("anychart.standalones.markersFactory",(function(){var t=new iy;return t.N($.zm("standalones.markersFactory")),t})),xG.draw=xG.W,xG.parentBounds=xG.ja,xG.container=xG.O,xG.add=xG.add,xG.clear=xG.clear,xG.measure=xG.measure,xG=jy.prototype,xG.enabled=xG.enabled,xG.draw=xG.W,xG.clear=xG.clear,xG.getIndex=xG.ma,$.H(ky,$.V),$.g=ky.prototype,$.g.ra=1,$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t};var $da=ky.prototype,yG={};$.rq(yG,1,"stroke",$.Jq),$.rq(yG,1,"fill",$.Nq),$.rq(yG,0,"width",$.br),$.rq(yG,0,"offset",$.br),$.rq(yG,0,"enabled",$.Zq),$da.vK=yG,$.U(ky,ky.prototype.vK),$.g=ky.prototype,$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:$.z(t)?{fill:t,stroke:null,enabled:!0}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?(this.oa.enabled=i.enabled,"fill"in i&&(this.oa.fill=i.fill),"stroke"in i&&(this.oa.stroke=i.stroke)):(this.enabled(i.enabled),"fill"in i&&this.fill(i.fill),"stroke"in i&&this.stroke(i.stroke)),!0)},$.g.U=function(t,e){e?$.Hq(this.oa,this.vK,t):($.Iq(this,this.vK,t),this.enabled(!("enabled"in t)||t.enabled))},$.g.F=function(){var t={};return $.Tq(this,this.vK,t,"Map axes props"),t},$.g.R=function(){ky.u.R.call(this)},$.H(ly,$.V),ly.prototype.sa=16|$.V.prototype.sa,ly.prototype.ra=1;var zG={};$.sq(zG,[$.Z.Yn,$.Z.iK]),$.U(ly,zG),ly.prototype.F=function(){var t=ly.u.F.call(this);return $.Tq(this,zG,t,"Connector"),t},ly.prototype.U=function(t,e){ly.u.U.call(this,t),e?$.Hq(this.oa,zG,t):$.Iq(this,zG,t)},ly.prototype.Zd=function(t){return(0,window.isNaN)(t)?$.z(t)?{stroke:t}:null:{length:t}},ly.prototype.Ie=function(t,e){var i=this.Zd(e);return!!i&&("length"in i&&this.length(i.length),"stroke"in i&&this.stroke(i.stroke),!0)},$.H($.my,$.V),$.g=$.my.prototype,$.g.B=function(t,e){return this.Yj.B(t,e)},$.g.va=function(t,e){return this.Yj.va(t,e)},$.g.g=$.ir,$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa],e=this.Yj.iH(this.aa);return e&&t.push.apply(t,e.Xd()),t},$.g.Wd=function(){var t=[this.Pa],e=this.Yj.iH(this.aa);return e&&t.push.apply(t,e.Wd()),t},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb};var aea=$.my.prototype,AG={};$.sq(AG,[$.Z.cC,$.Z.jZ,$.Z.u9,$.Z.q8,$.Z.qF,$.Z.c9,$.Z.N8,$.Z.Y8,$.Z.L8,$.Z.h9,$.Z.w9,$.Z.s8,$.Z.e9,$.Z.j$,$.Z.x$,$.Z.gZ,$.Z.kZ,$.Z.v9,$.Z.r8,$.Z.M8,$.Z.Z8,$.Z.y$,$.Z.EZ,$.Z.uZ,$.Z.q$,$.Z.fZ,$.Z.k8,$.Z.l8,$.Z.z8,$.Z.D8,$.Z.E8,$.Z.G8,$.Z.C8,$.Z.x8,$.Z.A8,$.Z.y8,$.Z.o$,$.Z.h8,$.Z.i8,$.Z.p8,$.Z.G7,$.Z.z$,$.Z.I8,$.Z.a$]),aea.fC=AG,$.U($.my,$.my.prototype.fC),$.g=$.my.prototype,$.g.Jk=function(t,e){$.A(e)?$.tq.apply(null,$.Ga(this.ua,t,e)):$.C(e)&&(this.ua[t]=e)},$.g.labels=function(t){if(!this.Da){var e=this.g("labelsFactoryConstructor")||$.ny,i=this.g("labelsAfterInitCallback")||$.ia;this.Da=e(),this.Da.WE=!1,$.W(this,"labels",this.Da),i.call(this.Yj,this.Da)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.Da.N(t),this):this.Da},$.g.th=function(t){if(!this.o){var e=this.g("labelsFactoryConstructor")||$.oy,i=this.g("labelsAfterInitCallback")||$.ia;this.o=e(),this.o.WE=!1,$.W(this,"minLabels",this.o),i.call(this.Yj,this.o),this.o.I(4294967295)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.o.N(t),this):this.o},$.g.sh=function(t){if(!this.f){var e=this.g("labelsFactoryConstructor")||$.oy,i=this.g("labelsAfterInitCallback")||$.ia;this.f=e(),this.f.WE=!1,$.W(this,"maxLabels",this.f),i.call(this.Yj,this.f),this.f.I(4294967295)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.f.N(t),this):this.f},$.g.headers=function(t){if(!this.i){var e=this.g("labelsFactoryConstructor")||$.oy,i=this.g("headersAfterInitCallback")||Lca;this.i=e(),$.W(this,"headers",this.i),i.call(this.Yj,this.i)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.i.N(t),this):this.i},$.g.Jm=function(t){return this.labels(t)},$.g.Ck=function(t){if(!this.K){var e=this.g("labelsFactoryConstructor")||$.ny,i=this.g("labelsAfterInitCallback")||$.ia;this.K=e(),i.call(this.Yj,this.K)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.K.N(t),this):this.K},$.g.Db=function(t){if(!this.Bc){var e=this.g("markersFactoryConstructor")||$.qy,i=this.g("markersAfterInitCallback")||$.ia;this.Bc=e(),$.W(this,"markers",this.Bc),i.call(this.Yj,this.Bc)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.Bc.N(t),this):this.Bc},$.g.dl=function(t){if(!this.D){var e=this.g("outlierMarkersAfterInitCallback")||$.ia;this.D=new $.dy,$.W(this,"outlierMarkers",this.D),e.call(this.Yj,this.D)}return $.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.D.N(t),this):this.D},$.g.Zf=function(t){if(!this.b){var e=this.g("connectorAfterInitCallback")||$.ia;this.b=new ly,$.W(this,"connector",this.b),e.call(this.Yj,this.b)}return $.p(t)?(this.b.N(t),this):this.b},$.g.xt=function(t){if(!this.G){var e=this.g("outlineConstructor")||Kca,i=this.g("outlineAfterInitCallback")||$.ia;this.G=e(),$.W(this,"outline",this.G),i.call(this.Yj,this.G)}return $.p(t)?(this.G.N(t),this):this.G},$.g.background=function(t){if(!this.Ia){var e=this.g("backgroundAfterInitCallback")||Nca;this.Ia=new $.yu,$.W(this,"background",this.Ia),e.call(this.Yj,this.Ia),this.Ia.df()}return $.p(t)?(this.Ia.N(t),this):this.Ia},$.g.Qa=function(t){return this.Yj.Qa(t)},$.g.lb=function(t){return this.Yj.lb(t)},$.g.selected=function(t){return this.Yj.selected?this.Yj.selected(t):null},$.g.F=function(){var t=$.my.u.F.call(this);return $.Tq(this,this.fC,t,"State settings",this.ua),this.ua.labels&&(t.labels=this.labels().F()),this.ua.minLabels&&(t.minLabels=this.th().F()),this.ua.maxLabels&&(t.maxLabels=this.sh().F()),this.ua.headers&&(t.headers=this.headers().F()),this.ua.lowerLabels&&(t.lowerLabels=this.Ck().F()),this.ua.upperLabels&&(t.upperLabels=t.labels,delete t.labels),this.ua.markers&&(t.markers=this.Db().F()),this.ua.outlierMarkers&&(t.outlierMarkers=this.dl().F()),this.ua.connector&&(t.connector=this.Zf().F()),this.ua.outline&&(t.outline=this.xt().F()),this.ua.background&&(t.background=this.background().F()),t},$.g.U=function(t,e){$.my.u.U.call(this,t,e),$.Iq(this,this.fC,t,e);var i=$.Jc(t);if($.p(this.ua.labels)){var n=i?this.labels().oa:t.labels;vy(n),this.labels().ga(!!e,n)}$.p(this.ua.minLabels)&&(n=i?this.th().oa:t.minLabels,vy(n),this.th().ga(!!e,n)),$.p(this.ua.maxLabels)&&(n=i?this.sh().oa:t.maxLabels,vy(n),this.sh().ga(!!e,n)),$.p(this.ua.headers)&&(n=i?this.headers().oa:t.headers,vy(n),this.headers().N(n)),$.p(this.ua.lowerLabels)&&(n=i?this.Ck().oa:t.lowerLabels,vy(n),this.Ck().ga(!!e,n)),$.p(this.ua.upperLabels)&&(n=i?this.Jm().oa:t.upperLabels,vy(n),this.Jm().ga(!!e,n)),$.p(this.ua.markers)&&(n=i?this.Db().oa:t.markers,vy(n),this.Db().ga(!!e,n)),$.p(this.ua.outlierMarkers)&&(n=i?this.dl().oa:t.outlierMarkers,vy(n),this.dl().ga(!!e,n)),$.p(this.ua.connector)&&this.Zf().ga(!!e,i?this.Zf().oa:t.connector),$.p(this.ua.outline)&&this.xt().ga(!!e,i?this.xt().oa:t.outline),$.p(this.ua.background)&&(this.background().ga(!!e,t.background),this.background().I(4294967295))},$.g.df=function(t){return $.my.u.df.call(this,t),this.jg(null),this},$.g.R=function(){$.sd(this.Da,this.o,this.f,this.i,this.K,this.Bc,this.D,this.G,this.b,this.Ia),delete this.b,$.my.u.R.call(this)};var BG=$.my.prototype,yy;BG.labels=BG.labels,BG.minLabels=BG.th,BG.maxLabels=BG.sh,BG.headers=BG.headers,BG.upperLabels=BG.Jm,BG.lowerLabels=BG.Ck,BG.markers=BG.Db,BG.outlierMarkers=BG.dl,BG.connector=BG.Zf,BG.outline=BG.xt,BG.normal=BG.Qa,BG.hovered=BG.lb,BG.selected=BG.selected,Tc("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" ")),$.ja($.Ay),$.Ay.prototype.b=0,$.H($.By,$.qf),$.By.prototype.sb=$.Ay.Id();var Oca=null,Iy;$.g=$.By.prototype,$.g.oy=function(){return this.he||(this.he=":"+(this.sb.b++).toString(36))},$.g.Ya=function(){return this.Ed},$.g.fl=function(t){if(this==t)throw Error("Unable to set parent component");if(t&&this.Y&&this.he&&$.Gy(this.Y,this.he)&&this.Y!=t)throw Error("Unable to set parent component");this.Y=t,$.By.u.kb.call(this,t)},$.g.getParent=function(){return this.Y},$.g.kb=function(t){if(this.Y&&this.Y!=t)throw Error("Method not supported");$.By.u.kb.call(this,t)},$.g.Ac=function(){this.Ed=this.f.createElement("DIV")},$.g.Sd=function(t){this.vE(t)},$.g.vE=function(t,e){if(this.xf)throw Error("Component already rendered");this.Ed||this.Ac(),t?t.insertBefore(this.Ed,e||null):this.f.b.body.appendChild(this.Ed),this.Y&&!this.Y.xf||this.Gg()},$.g.Bs=ba(17),$.g.xH=ba(19),$.g.pl=ba(22),$.g.Gg=function(){this.xf=!0,this.Pj((function(t){!t.xf&&t.Ya()&&t.Gg()}))},$.g.Dh=function(){this.Pj((function(t){t.xf&&t.Dh()})),this.G&&pf(this.G),this.xf=!1},$.g.R=function(){this.xf&&this.Dh(),this.G&&(this.G.ld(),delete this.G),this.Pj((function(t){t.ld()})),!this.fb&&this.Ed&&$.Xe(this.Ed),this.Y=this.dh=this.Ed=this.D=this.o=null,$.By.u.R.call(this)},$.g.hc=function(t,e){this.Eg(t,$.Fy(this),e)},$.g.Eg=function(t,e,i){if(t.xf&&(i||!this.xf))throw Error("Component already rendered");if(0>e||e>$.Fy(this))throw Error("Child component index out of bounds");if(this.D&&this.o||(this.D={},this.o=[]),t.getParent()==this){var n=t.oy();this.D[n]=t,$.Fa(this.o,t)}else $.Mc(this.D,t.oy(),t);t.fl(this),$.Da(this.o,t,e),t.xf&&this.xf&&t.getParent()==this?(e=(i=this.AD()).childNodes[e]||null)!=t.Ya()&&i.insertBefore(t.Ya(),e):i?(this.Ed||this.Ac(),e=this.xd(e+1),t.vE(this.AD(),e?e.Ed:null)):this.xf&&!t.xf&&t.Ed&&t.Ed.parentNode&&1==t.Ed.parentNode.nodeType&&t.Gg()},$.g.AD=function(){return this.Ed},$.g.xd=function(t){return this.o&&this.o[t]||null},$.g.Pj=function(t,e){this.o&&(0,$.Pe)(this.o,t,e)},$.g.Kf=function(t){return this.o&&t?(0,$.za)(this.o,t):-1},$.g.removeChild=function(t,e){if(t){var i=$.z(t)?t:t.oy();t=$.Gy(this,i),i&&t&&($.Lc(this.D,i),$.Fa(this.o,t),e&&(t.Dh(),t.Ed&&$.Xe(t.Ed)),t.fl(null))}if(!t)throw Error("Child is not in parent component");return t},$.g.Cj=function(t,e){return this.removeChild(this.xd(t),e)},$.g.Gi=function(t){for(var e=[];this.o&&0!=this.o.length;)e.push(this.Cj(0,t));return e},$.H($.Hy,$.By),$.g=$.Hy.prototype,$.g.Ut=null,$.g.GH=!1,$.g.Ac=function(){this.Ed=this.f.Ac("INPUT",{type:"text"})},$.g.pl=ba(21),$.g.Gg=function(){$.Hy.u.Gg.call(this);var t=new nf(this);if(t.wa(this.Ya(),"focus",this.VU),t.wa(this.Ya(),"blur",this.iga),$.Jy())this.Qg=t;else{$.gd&&t.wa(this.Ya(),["keypress","keydown","keyup"],this.sga);var e=$.te(this.Ya());t.wa(e?$.Ge(e):window,"load",this.Iga),this.Qg=t,Ky(this)}this.fo(),this.Ya().u3=this},$.g.Dh=function(){$.Hy.u.Dh.call(this),this.Qg&&(this.Qg.ld(),this.Qg=null),this.Ya().u3=null},$.g.R=function(){$.Hy.u.R.call(this),this.Qg&&(this.Qg.ld(),this.Qg=null)},$.g.VU=function(){this.GH=!0;var t=this.Ya();if($.Sj(t,"label-input-label"),!$.Jy()&&!$.Ly(this)&&!this.b){var e=this;t=function(){e.Ya()&&(e.Ya().value="")},$.hd?$.Dj(t,10):t()}},$.g.iga=function(){$.Jy()||(this.Qg.gc(this.Ya(),"click",this.VU),this.Ut=null),this.GH=!1,this.fo()},$.g.sga=function(t){27==t.keyCode&&("keydown"==t.type?this.Ut=this.Ya().value:"keypress"==t.type?this.Ya().value=this.Ut:"keyup"==t.type&&(this.Ut=null),t.preventDefault())},$.g.tga=function(){$.Ly(this)||(this.Ya().value="",$.Dj(this.ega,10,this))},$.g.ega=function(){$.Ly(this)||(this.Ya().value=this.i)},$.g.Iga=function(){this.fo()},$.g.clear=function(){this.Ya().value="",null!=this.Ut&&(this.Ut="")},$.g.reset=function(){$.Ly(this)&&(this.clear(),this.fo())},$.g.vj=function(){return null!=this.Ut?this.Ut:$.Ly(this)?this.Ya().value:""},$.g.be=function(){return this.i},$.g.fo=function(){var t=this.Ya();$.Jy()?this.Ya().placeholder!=this.i&&(this.Ya().placeholder=this.i):Ky(this),$.zy(t,"label",this.i),$.Ly(this)?(t=this.Ya(),$.Sj(t,"label-input-label")):(this.b||this.GH||(t=this.Ya(),$.Qj(t,"label-input-label")),$.Jy()||$.Dj(this.bka,10,this))},$.g.Dj=function(t){this.Ya().disabled=!t;var e=this.Ya();t?$.Sj(e,"label-input-label-disabled"):$.Qj(e,"label-input-label-disabled")},$.g.isEnabled=function(){return!this.Ya().disabled},$.g.B1=ba(23),$.g.bka=function(){!this.Ya()||$.Ly(this)||this.GH||(this.Ya().value=this.i)},$.H($.Ny,$.Y),$.g=$.Ny.prototype,$.g.Ih=function(t){t:{var e=t.type;switch(e){case"mouseout":e="axismarkerout";break;case"mouseover":e="axismarkerover";break;case"mousemove":e="axismarkermove";break;default:t=null;break t}t={type:e,target:this,originalEvent:t,rawValue:this.tK(),formattedValue:this.kR(),offsetX:t.offsetX,offsetY:t.offsetY}}t&&this.dispatchEvent(t)},$.g.kR=function(){return"Value: "+this.tK()},$.g.ra=4|$.Y.prototype.ra,$.g.sa=20|$.Y.prototype.sa,$.g.xc=function(){return this.pa},$.g.WK=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma());if(t=e?t==this.o?null:t:$.jt(this.o,t,null,15,null,this.zg,this)){var i=this.o==t;this.o=t;var n=this.qa||this.b&&this.b.scale();n?t.da(!1):e||t.da(i),i||n||this.B(4,13)}}},$.g.Po=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma()),i=e?t==this.qa?null:t:$.jt(this.qa,t,null,15,null,this.zg,this);if(i||null===t&&this.qa){t=this.qa==i;var n=e&&!this.qa;i||$.kr(this.qa,this.zg,this),this.qa=i,n&&$.K(this.qa,this.zg,this),i&&!e&&i.da(t),t||this.B(4,13)}return this}return this.qa||this.b&&this.b.scale()||this.o},$.g.p3=function(){return!!this.qa},$.g.zg=function(t){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)&&(e|=1),this.B(4,8|e)},$.g.tK=function(){return $.p(void 0)?(void 0!==this.g("value")&&this.value(void 0),this):this.g("value")},$.g.uD=function(){var t=9;return"consider"==this.g("scaleRangeMode")&&(t|=4),t},$.g.mr=function(){return 4|$.Ny.u.mr.call(this)},$.g.xs=function(){return[this.tK()]},$.g.e_=function(){this.B(4,9)},$.g.axis=function(t){return $.p(t)?(this.b!=t&&(this.b&&$.kr(this.b,this.e_,this),this.b=t,$.K(this.b,this.e_,this),this.B(4,13)),this):this.b},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.Nb=function(){return"horizontal"==this.we()},$.g.fs=void 0,$.g.kv=void 0,$.g.W=function(){if(!this.scale())return $.il(2),this;if(!this.zc())return this;if(this.J(8)){var t=this.zIndex();$.Oy(this).zIndex(t),this.I(8)}return this.J(2)&&(t=this.O(),$.Oy(this).parent(t),this.I(2)),this.J(16)&&(this.kv(),this.I(16)),this.J(4)&&(this.fs(),this.I(4)),this},$.g.lo=function(){var t=this.scale();if(t){var e=$.Oy(this),i=t.transform(this.g("value"),.5);if(e.clear(),!(0,window.isNaN)(i)&&(0<=i&&1>=i||this.i)){t=this.ja();var n=this.Qp(),s=e.gl();this.Nb()?(i=t.Vb()+t.height-i*t.height,i=$.R(i,s),e.moveTo(t.tb(),i),e.lineTo(t.cb(),i)):(i=t.tb()+i*t.width,i=$.R(i,s),e.moveTo(i,t.Vb()),e.lineTo(i,t.Va())),this.i||e.clip(n.Ej(t))}}else $.il(2)},$.g.remove=function(){$.Oy(this).parent(null)};var CG={};$.sq(CG,[[0,"scaleRangeMode",gl]]),$.U($.Ny,CG),$.Ny.prototype.U=function(t,e){if($.Ny.u.U.call(this,t,e),"layout"in t&&t.layout&&this.we(t.layout),"axis"in t){var i=t.axis;$.ea(i)?this.pa&&this.axis(this.pa.ZG(i)):i.Iy&&i.Iy()&&this.axis(i)}$.Iq(this,CG,t,e)},$.Ny.prototype.F=function(){var t=$.Ny.u.F.call(this);return $.Tq(this,CG,t),t},$.Ny.prototype.R=function(){this.pa=this.b=null,$.sd(this.D,this.$g),this.$g=this.D=null,$.Ny.u.R.call(this)},$.H($.Qy,$.Y),$.Qy.prototype.ra=$.Y.prototype.ra,$.Qy.prototype.sa=$.Y.prototype.sa;var bea=$.Qy.prototype,DG={};$.sq(DG,[[1,"stroke",$.Pq],[0,"length",$.yo],[0,"position",$.Wk]]),bea.dR=DG,$.U($.Qy,$.Qy.prototype.dR),$.g=$.Qy.prototype,$.g.orientation=function(t){return $.p(t)?(t=$.Lk(t),this.vh!=t&&(this.vh=t,this.ep=null),this):this.vh},$.g.remove=function(){this.path&&this.path.parent(null)},$.g.W=function(){return this.path.clear(),this.path.stroke(this.g("stroke")),this.zc()?(this.J(8)&&(this.path.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.path.parent(this.O()),this.I(2)),this):this},$.g.h1=function(t,e,i,n){t=e.left+t*e.width;var s=i.top;t=$.R(t,this.path.gl());var a=this.g("position");e=$.L(this.g("length"),e.height),"outside"==a?(s-=n/2,i=-e):(s="center"==a?s+(i.height-e)/2:s+n/2,i=e),this.path.moveTo(t,s),this.path.lineTo(t,s+i)},$.g.nT=function(t,e,i,n){i=i.left,t=e.top+e.height-t*e.height,t=$.R(t,this.path.gl());var s=this.g("position");e=$.L(this.g("length"),e.width),"outside"==s?(i+=n/2,n=e):"center"==s?(i-=e/2,n=e):(i-=n/2,n=-e),this.path.moveTo(i,t),this.path.lineTo(i+n,t)},$.g.hT=function(t,e,i,n){t=e.left+t*e.width,i=i.top,t=$.R(t,this.path.gl());var s=this.g("position");e=$.L(this.g("length"),e.height),"outside"==s?(i+=n/2,n=e):"center"==s?(i-=e/2,n=e):(i-=n/2,n=-e),this.path.moveTo(t,i),this.path.lineTo(t,i+n)},$.g.lT=function(t,e,i,n){i=i.left,t=e.top+e.height-t*e.height,t=$.R(t,this.path.gl());var s=this.g("position");e=$.L(this.g("length"),e.width),"outside"==s?(i-=n/2,n=-e):(i="center"==s?i-e/2:i+n/2,n=e),this.path.moveTo(i,t),this.path.lineTo(i+n,t)},$.g.F=function(){var t=$.Qy.u.F.call(this);return $.Tq(this,this.dR,t,"AxisTicks"),t},$.g.U=function(t,e){$.Qy.u.U.call(this,t,e),$.Iq(this,this.dR,t,e)},$.g.R=function(){$.qd(this.path),this.path=null,$.Qy.u.R.call(this)},$.H($.Sy,$.Y),$.Sy.prototype.g=function(t){var e=$.Sy.u.g.call(this,t);return("orientation"==t&&null==e||!$.p(e))&&(e=this.Nd[t]),e};var EG={};$.sq(EG,[$.Z.jK,$.Z.tQ,$.Z.uQ,$.Z.dC,$.Z.Yn,[0,"staggerMode",$.Dq],[0,"staggerMaxLines",$.xq],[0,"staggerLines",$.xq],[0,"orientation",dr],[0,"value",Co]]),$.U($.Sy,EG),$.g=$.Sy.prototype,$.g.sa=976|$.Y.prototype.sa,$.g.ra=$.Y.prototype.ra,$.g.Pc=null,$.g.Er="axis",$.g.jb=null,$.g.Da=null,$.g.rc=null,$.g.mb=null,$.g.Rc=null,$.g.In=null,$.g.AJ=1,$.g.Hq=null,$.g.UH=null,$.g.Wa=null,$.g.ci=null,$.g.Fk=null,$.g.title=function(t){return this.jb||(this.jb=new $.aw,$.W(this,"title",this.jb),this.jb.kb(this),$.K(this.jb,this.Mq,this)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.Mq=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9):$.X(t,1)&&(e=64,i=1),this.B(e,i)},$.g.labels=function(t){return this.Da||(this.Da=new $.Pu,$.W(this,"labels",this.Da),this.Da.kb(this),$.K(this.Da,this.de,this)),$.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.Da.N(t),this):this.Da},$.g.de=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9):$.X(t,1)&&(e=384,i=1),this.labels().clear(),this.ns(),this.ik=null,this.ae(),this.B(e,i)},$.g.qb=function(t){return this.rc||(this.rc=new $.Pu,$.W(this,"minorLabels",this.rc),this.rc.kb(this),$.K(this.rc,this.Baa,this)),$.p(t)?(!$.C(t)||"enabled"in t||(t.enabled=!0),this.rc.N(t),this):this.rc},$.g.Baa=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9):$.X(t,1)&&(e=128,i=1),this.ik=null,this.ae(),this.qb().clear(),this.B(e,i)},$.g.ol=function(){return new $.Qy},$.g.Bz=function(){return this.line?this.line:this.line=$.qk()},$.g.Xa=function(t){return this.mb||(this.mb=this.ol(),$.W(this,"ticks",this.mb),this.mb.kb(this),$.K(this.mb,this.ZZ,this)),$.p(t)?(this.mb.N(t),this):this.mb},$.g.yb=function(t){return this.Rc||(this.Rc=this.ol(),$.W(this,"minorTicks",this.Rc),this.Rc.kb(this),$.K(this.Rc,this.ZZ,this)),$.p(t)?(this.Rc.N(t),this):this.Rc},$.g.ZZ=function(t){var e=0,i=0;$.X(t,8)?(e=this.se,i=9,this.ae()):$.X(t,1)&&(e=256,i=1),this.B(e,i)},$.g.scale=function(t){if($.p(t)){if(this.In!=t&&(t=$.jt(this.scale(),t,null,this.WT(),null,this.zg,this))){var e=this.In==t;this.In=t,this.ns(),this.ik=null,this.ae(),this.labels().clear(),this.qb().clear(),t.da(e),e||this.B(this.se,9)}return this}return this.In},$.g.WT=function(){return 15},$.g.zg=function(t){$.X(t,2)&&(this.ns(),this.ik=null,this.ae(),this.labels().clear(),this.qb().clear(),this.B(this.se,9))},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.W(this,"padding",this.Wa),$.K(this.Wa,this.fm,this)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.dF=function(t){return($.ea(t)||$.J(t,$.Sy))&&(this.Ba=t,this.B(this.se,9)),this.Ba},$.g.fm=function(t){$.X(t,2)&&(this.ns(),this.ik=null,this.ae(),this.B(this.se,9))},$.g.Iy=function(){return!0},$.g.ns=function(){this.na=null},$.g.sy=function(t){if(!this.ik||this.J(512)){var e=this.scale();if(e){var i=this.labels(),n=i.enabled(),s=e.Xa().get(),a=s.length;if(n){var o,r=0;for(o=a;r<o;r++)(0==r&&this.g("drawFirstLabel")||r==a-1&&this.g("drawLastLabel")||0<r&&r<a-1)&&this.be(r,!0,s,t)}if($.J(e,$.kt)){var l=this.qb(),h=l.enabled(),c=(l=e.yb().get()).length;if(h)for(r=0,o=c;r<o;r++)this.be(r,!1,l,t)}}if("allow-overlap"==this.g("overlapMode"))return{labels:n,qb:h};o=[];var u=[];if(e){var d,p,g,f=-1,m=-1,v=-1;r=i.g("position");var b=this.UH&&0>$.Ho(r)?this.UH:null,y=this.g("drawFirstLabel"),S=this.g("drawLastLabel");if($.J(e,$.kt)){i=r=0;for(var x;r<a||i<c;){var w=s[r],C=l[i],T=e.transform(w);if(x=e.transform(C),C=w=d=p=null,-1==m&&n)for(g=r;-1==m&&g<a;){C=!g&&y||g==a-1&&S||0!=g&&g!=a-1?this.rd(g,!0,s,t):null,w=-1!=f?this.rd(f,!0,s,t):null,d=g!=a-1&&S?this.rd(a-1,!0,s,t):null;var D=!b||!Uy(this,b,C);C&&D&&!$.bn(C,w)&&!$.bn(C,d)&&(0>=(D=e.transform(s[g]))&&y||1<=D&&S||0<D&&1>D)&&(m=g),g++}T<=x&&r<a||i==c?(n&&r==m?(f=r,m=-1,o.push(!0)):o.push(!1),r++,T==x&&(n||this.Xa().enabled())&&(u.push(!1),i++)):(h?(C=this.rd(i,!1,l,t),-1!=f&&(w=this.rd(f,!0,s,t)),-1!=m&&(d=this.rd(m,!0,s,t)),-1!=v&&(p=this.rd(v,!1,l,t)),T=!(T=this.qb().be(i))||!$.p(T.enabled())||T.enabled(),!(D=!b||!Uy(this,b,C))||$.bn(C,w)||$.bn(C,d)||$.bn(C,p)||!T?u.push(!1):0>=(D=e.transform(l[i]))&&y||1<=D&&S||0<D&&1>D?(v=i,u.push(!0)):u.push(!1)):u.push(!1),i++)}h||(u=!1)}else if($.J(e,Xs))for(S?(d=this.rd(a-1,!0,s,t),d=b&&Uy(this,b,d)?null:d):d=null,r=0;r<a;r++)n?(C=!r&&y||r==a-1&&S||0!=r&&r!=a-1?this.rd(r,!0,s,t):null,w=-1!=f?this.rd(f,!0,s,t):null,D=!b||!Uy(this,b,C),r?r==a-1?S&&D?(f=r,o.push(!0)):o.push(!1):!D||$.bn(C,w)||$.bn(C,d)?o.push(!1):(f=r,o.push(!0)):y&&D?(f=r,o.push(!0)):o.push(!1)):o.push(!1)}n||(o=!1),this.ik={labels:o,qb:u},this.B(this.se),this.I(512)}return this.ik},$.g.be=function(t,e,i,n){if(!e&&this.scale()&&!$.J(this.scale(),$.kt))return null;var s=e?this.labels():this.qb(),a=s.be(t);return a||((a=s.add(void 0,void 0,t)).Pa.ja=this.ja(),a.xr=null,$.bv(a,[a.Pa,s.Pa,s.oa])),s=i[t],s=$.A(s)?s[0]:s,a.jc(Pca(this,t,e,i,n)),a.Hf(this.nq(t,s)),a.sM(),a},$.g.rd=function(t,e,i,n){if(!e&&this.scale()&&!$.J(this.scale(),$.kt)||0>t)return null;var s=e?this.ci:this.Fk;if($.p(s[t]))return s[t];var a=Xy(this,i[t]);if(0>a||1<a)return[0,0];if(a=e?this.labels():this.qb(),i=this.be(t,e,i,n),n=Su(i))i.Pa.ja=this.ja(),$.bv(i,[i.Pa,a.Pa,a.oa]),e=a.measure(i,void 0,void 0,t);else{(e=i.Rh()).Ta&&($.mg().Xp().appendChild(e.Vd()),i.B(2),e.b=0,e.Ta=null,e.setPosition(0,0)),e=e.rb();var o=i.ic("padding");o&&!$.Jc(o)&&(e=$.Ku(e,o)),e.left=i.jc().value.x,e.top=i.jc().value.y}switch(a=a.g("position"),a=$.Ho(a),this.g("orientation")){case"top":e.top-=a*e.height/2;break;case"right":e.left+=a*e.width/2;break;case"bottom":e.top+=a*e.height/2;break;case"left":e.left-=a*e.width/2}if(n)e=$.ln(e);else{n=(a=$.Uu(i)).anchor||"left-top",i=$.Eo(new $.I(0,0,e.width,e.height),n),e.left-=i.x,e.top-=i.y,i=$.Eo(e,n),o=this.ja();var r=a.offsetX,l=a.offsetY,h=new $.gb(e.left,e.top);$.Yo(h,n,$.p(r)?$.L(r,o.width):0,$.p(l)?$.L(l,o.height):0),e.left=h.x,e.top=h.y,e=$.ln(e),a.rotation&&$.Kb($.bb(a.rotation),i.x,i.y).transform(e,0,e,0,4)}return s[t]=e},$.g.HM=function(t,e,i,n,s){var a=0,o=0;switch(this.g("orientation")){case"top":a=Math.round(t.left+e*t.width),o=s.top-i/2-n;break;case"right":a=s.cb()+i/2+n,o=Math.round(t.Va()-e*t.height);break;case"bottom":a=Math.round(t.left+e*t.width),o=s.Va()+i/2+n;break;case"left":a=s.left-i/2-n,o=Math.round(t.Va()-e*t.height)}return{x:a,y:o}},$.g.ae=function(){this.o&&(this.o.length=0),this.ci.length=0,this.Fk.length=0,this.Hq=this.ea=null},$.g.l0=function(t,e,i){var n=this.Xa(),s=this.yb(),a=this.labels().g("position"),o=this.qb().g("position"),r=n.g("position"),l=s.g("position"),h=$.Ho(a),c=$.Ho(o);return r=$.Ho(r),l=$.Ho(l),i?(i=n.enabled()?n.g("length"):0,s=s.enabled()?s.g("length"):0,r=r||h?h?t+i:t/2+Math.max(t/2,i):Math.max(t,i),h=l||c?h?e+s:e/2+Math.max(e/2,s):Math.max(e,s)):(r=i=$.Io(n,1),h=s=$.Io(s,1),"outside"==a?r+=t:"center"==a&&(r=Math.max(r,t/2)),"outside"==o?h+=e:"center"==o&&(h=Math.max(h,e/2))),Math.max(r,h)},$.g.Jg=function(t){return this.Nb()?this.padding().Ng(t):this.padding().Yh(t)},$.g.yd=function(t){var e=this.ja();if(e&&null===this.g("value")){var i=e.clone();if(this.scale()&&this.enabled()){var n=this.ob(t),s=this.padding();switch(t=e.height-s.Yh(e.height)+n.height,e=e.width-s.Ng(e.width)+n.width,this.g("orientation")){case"top":i.height-=t,i.top+=t;break;case"right":i.width-=e;break;case"bottom":i.height-=t;break;case"left":i.width-=e,i.left+=e}}return i}return new $.I(0,0,0,0)},$.g.bG=function(t,e,i,n){var s=this.g("width");return s?$.L(s,t):$.Wy(this,i,e,n)},$.g.ob=function(t){var e=t&&4!=(this.labels().enabled()?$.Ho(this.labels().g("position")):1)+(this.qb().enabled()?$.Ho(this.qb().g("position")):1)+(this.Xa().enabled()?$.Ho(this.Xa().g("position")):1)+(this.yb().enabled()?$.Ho(this.yb().g("position")):1),i=e?this.ea:this.Hq;if(!i||this.J(4)){if(i=this.ja()){if(i.top=Math.round(i.top),i.left=Math.round(i.left),i.width=Math.round(i.width),i.height=Math.round(i.height),this.Nb())var n=i.width,s=i.height;else n=i.height,s=i.width;n=this.Jg(n),t=this.bG(s,n,i,t);var a=this.padding();s=$.L(a.g("top"),i.height);var o=$.L(a.g("right"),i.width),r=$.L(a.g("bottom"),i.height);a=$.L(a.g("left"),i.width);var l=0,h=0,c=0,u=0;switch(this.g("orientation")){case"top":h=i.top+s,l=i.left+a,u=t,c=n;break;case"right":h=i.top+s,l=i.left+i.width-t-o,u=n,c=t;break;case"bottom":h=i.top+i.height-t-r,l=i.left+a,u=t,c=n;break;case"left":h=i.top+s,l=i.left+a,u=n,c=t}(i=new $.I(l,h,c,u)).round(),e?this.ea=i:this.Hq=i}else this.Hq=new $.I(0,0,0,0),this.ea=new $.I(0,0,0,0);this.I(4)}return e?this.ea:this.Hq},$.g.hR=function(t,e,i){e=t.Va(),e+=i/2,this.line.moveTo($.R(t.left,1)-.5,e).lineTo($.R(t.cb(),1)+.5,e)},$.g.gR=function(t,e,i){e=t.left,e-=i/2-1,this.line.moveTo(e,$.R(t.top,1)-.5).lineTo(e,$.R(t.Va(),1)+.5)},$.g.eR=function(t,e,i){e=t.top,e-=i/2-1,this.line.moveTo($.R(t.left,1)-.5,e).lineTo($.R(t.cb(),1)+.5,e)},$.g.fR=function(t,e,i){e=t.cb(),e+=i/2,this.line.moveTo(e,$.R(t.top,1)-.5).lineTo(e,$.R(t.Va(),1)+.5)},$.g.lo=function(){switch(this.Bz().clear(),this.g("orientation")){case"top":var t=this.hR;break;case"right":t=this.gR;break;case"bottom":t=this.eR;break;case"left":t=this.fR}var e=this.g("stroke"),i=$.dp(e),n=0==(i=i||1)%2?0:.5,s=this.ob();t.call(this,s,n,i,0,0),this.line.stroke(e)},$.g.GM=function(t,e,i,n,s,a){var o=this.ob(),r=this.line.rb(),l=this.g("stroke");l=$.dp(l);var h=0,c=0;switch(this.g("orientation")){case"top":h=Math.round(o.left+t*o.width)+s,c=r.top-a*(l/2+e.height/2+i)-n;break;case"right":h=r.cb()+a*(l/2+e.width/2+i)+n,c=Math.round(o.top+o.height-t*o.height)+s;break;case"bottom":h=Math.round(o.left+t*o.width)+s,c=r.Va()+a*(l/2+e.height/2+i)+n;break;case"left":h=r.left-a*(l/2+e.width/2+i)-n,c=Math.round(o.top+o.height-t*o.height)+s}return{x:h,y:c}},$.g.ke=function(t,e,i,n,s,a,o){if(s)var r=this.Xa(),l=this.labels();else r=this.yb(),l=this.qb();if(o){if(a=$.mn(this.rd(i,s,a)),o=0,s){var h=!0;if(1<this.G&&this.g("staggerMode"))for(var c=0,u=this.ba.length;c<u;c++){for(var d=this.ba[c],p=0,g=d.length;p<g;p++)if(i==d[p]){h=!1;break}if(!h)break;o+=this.aa[c]}}h=$.Ho(l.g("position")),r=$.Io(r,h),e={value:this.GM(e,a,o,r,n,h,s)},t=this.nq(i,t),(n=l.be(i))||(n=l.add(t,e,i),$.bv(n,[n.Pa,l.Pa,l.oa])),n.Hf(t),n.jc(e)}else l.clear(i)},$.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.title().B(2),this.Xa().B(2),this.yb().B(2),this.labels().B(2),this.qb().B(2),this.B(450)),!1))},$.g.cM=function(){var t=this.title();t.ja(this.ob()),$.dw(t,this.g("orientation")),t.W()},$.g.iR=function(){var t=this.zIndex();this.line.zIndex(t),this.title().zIndex(t),this.Xa().zIndex(t),this.yb().zIndex(t),this.labels().zIndex(t),this.qb().zIndex(t)},$.g.BE=function(t,e,i){return $.A(i)?i[t]:i},$.g.W=function(){var t=this.scale();if(!t)return $.il(2),this;if(!this.zc())return this;var e=this.g("orientation"),i=this.Xa(),n=this.yb();if(this.title().ka(),this.labels().ka(),this.qb().ka(),i.ka(),n.ka(),this.J(16)&&(this.lo(),this.I(16)),this.J(8)&&(this.iR(),this.I(8)),this.J(2)){var s=this.O();this.title().O(s),this.line.parent(s),i.O(s),n.O(s),this.labels().O(s),this.qb().O(s),this.I(2)}if(this.J(64)&&(this.cM(),this.I(64)),this.J(256)){var a=this.Xa();a.orientation(e),a.W();var o=$.Ry(a),r=this.yb();r.orientation(e),r.W();var l=$.Ry(r);this.I(256)}if(this.J(128)&&((e=this.labels()).O()||e.O(this.O()),e.ja(this.ja()),(e=this.qb()).O()||e.O(this.O()),e.ja(this.ja()),this.I(128)),$.p(o)||$.p(l)){s=(e=t.Xa().get()).length;var h,c=i.g("stroke"),u=c&&c.thickness?(0,window.parseFloat)(c.thickness):1;c=this.ob();var d=this.line.rb(),p=this.g("stroke");p=$.Wb(p),p=$.dp(p);var g=$.J(t,$.Qt);if($.J(t,$.kt)){var f=Vy(this);if($.C(f)){var m=f.labels;g=f.qb}else m=!f,g=!f;for(var v,b,y,S=t.yb().get(),x=(f=n.g("stroke"))&&f.thickness?(0,window.parseFloat)(f.thickness):1,w=f=0,C=S.length;f<s||w<C;){var T=e[f];v=S[w];var D=t.transform(T);if(b=t.transform(v),"log"==t.Ma()&&(D=$.Tm(D,6),b=$.Tm(b,6)),D<=b&&f<s||w==C){y=0==u%2?0:-.5;var k=this.BE(f,e,m);v=f,b=m,(h=$.A(b)?b[v]:$.da(b))&&o&&o.call(a,D,c,d,p,y),this.ke(T,t.transform(T,.5),f,y,!0,e,k),y=D,f++}else D=0==x%2?0:-.5,k=this.BE(w,S,g),T=w,h=g,(h=$.A(h)?h[T]:$.da(h))&&l&&y!=b&&l.call(r,b,c,d,p,D),this.ke(v,t.transform(v,.5),w,D,!1,S,k&&y!=b),w++}g&&this.qb().W()}else for(l=Vy(this),m=$.C(l)?l.labels:!l,l=0==u%2?0:-.5,f=0;f<s;f++)T=e[f],$.A(T)?(r=T[0],y=T[1],u=(t.transform(T[0],0)+t.transform(T[1],1))/2):(r=y=T,u=t.transform(T,.5)),k=g&&"continuous"==t.mode()?.5:0,D=t.transform(r,k),o&&(0<=D&&1>=D&&o.call(a,D,c,d,p,l),f==s-1&&0<=(D=t.transform(y,1))&&1>=D&&o.call(a,D,c,d,p,l)),k=$.A(m)?m[f]:m,this.ke(r,u,f,l,!0,e,k&&0<=u&&1>=u);this.labels().W()}return this.title().da(!1),this.labels().da(!1),this.qb().da(!1),i.da(!1),n.da(!1),this},$.g.remove=function(){this.jb&&this.jb.remove(),this.line&&this.line.parent(null),this.Xa().remove(),this.yb().remove(),this.Da&&this.Da.remove(),this.rc&&this.rc.remove()},$.g.uo=function(){this.ns(),this.ik=null,this.ae(),this.B(this.se,9)},$.g.nq=function(t,e){var i,n=this.scale(),s=!0,a=!1;if($.J(n,$.Qt)){var o=n.Xa().names()[t],r=e,l=i="string";s=!1}else $.J(n,$.nt)?(o=$.vs(e),i="string",l="date-time",r=e,a=!0):(o=(0,window.parseFloat)(e),r=(0,window.parseFloat)(e),i=l="number");return o={axis:{value:this,type:""},index:{value:t,type:"number"},value:{value:o,type:i},tickValue:{value:r,type:l},scale:{value:n,type:""}},s&&(o.max={value:$.p(n.max)?n.max:null,type:"number"},o.min={value:$.p(n.min)?n.min:null,type:"number"}),a&&(s=n.Xa(),o.intervalUnit={value:s.dU(),type:"string"},o.intervalUnitCount={value:s.eU(),type:"number"},s=n.yb(),o.minorIntervalUnit={value:s.dU(),type:"string"},o.minorIntervalUnitCount={value:s.eU(),type:"number"}),(n={})["%AxisName"]={value:this.title().text(),type:"string"},(s=new $.Fw(o)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),s.Dl(n),$.ov(s)},$.g.Nb=function(){var t=this.g("orientation");return"top"==t||"bottom"==t},$.g.F=function(){var t=$.Sy.u.F.call(this);return $.Tq(this,EG,t),this.ph("zIndex")||delete t.zIndex,t.title=this.title().F(),t.labels=this.labels().F(),t.minorLabels=this.qb().F(),t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t},$.g.U=function(t,e){$.Sy.u.U.call(this,t,e),$.Iq(this,EG,t,e),"title"in t&&this.title().ga(!!e,t.title),"padding"in t&&this.padding(t.padding),this.labels().ga(!!e,t.labels),this.qb().ga(!!e,t.minorLabels),this.Xa(t.ticks),this.yb(t.minorTicks)},$.g.R=function(){this.In&&$.kr(this.In,this.zg,this),this.In=null,$.sd(this.jb,this.Wa,this.line,this.Da,this.rc,this.mb,this.Rc),this.Rc=this.mb=this.rc=this.Da=this.line=this.Wa=this.jb=null,this.ci.length=0,this.Fk.length=0,this.Hq=null,$.Sy.u.R.call(this)},$.H(Yy,$.Sy),$.xu(Yy,$.Sy);var FG=$.Sy.prototype;FG.title=FG.title,FG.labels=FG.labels,FG.minorLabels=FG.qb,FG.ticks=FG.Xa,FG.minorTicks=FG.yb,FG.scale=FG.scale,FG.getRemainingBounds=FG.yd,FG.isHorizontal=FG.Nb,FG.padding=FG.padding,FG.getPixelBounds=FG.ob,FG.valueTarget=FG.dF,FG=Yy.prototype,$.E("anychart.standalones.axes.linear",(function(){var t=new Yy;return t.Ga("standalones.linearAxis"),t})),FG.padding=FG.padding,FG.draw=FG.W,FG.parentBounds=FG.ja,FG.container=FG.O,$.H($.Zy,uv),$.Zy.prototype.Ih=function(t){t:{var e=t.type;switch(e){case"mouseout":e="axismarkerout";break;case"mouseover":e="axismarkerover";break;case"mousemove":e="axismarkermove";break;default:t=null;break t}t={type:e,target:this,originalEvent:t,rawValue:az(this),formattedValue:"Value: "+az(this),offsetX:t.offsetX,offsetY:t.offsetY}}t&&this.dispatchEvent(t)},$.Zy.prototype.ra=4|uv.prototype.ra,$.Zy.prototype.sa=uv.prototype.sa;var GG={};$.sq(GG,[$.Z.eK,[0,"scaleRangeMode",gl]]),$.U($.Zy,GG),$.g=$.Zy.prototype,$.g.xc=function(){return this.pa},$.g.WK=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma());if(t=e?t==this.o?null:t:$.jt(this.o,t,null,15,null,this.zg,this)){var i=this.o==t;this.o=t;var n=this.qa||this.b&&this.b.scale();n?t.da(!1):e||t.da(i),i||n||this.B(4,13)}}},$.g.Po=function(t){if($.p(t)){var e="gantt"==(t&&$.D(t.Ma)&&t.Ma());if(t=e?t==this.qa?null:t:$.jt(this.qa,t,null,15,null,this.zg,this)){var i=this.qa==t;this.qa=t,e||t.da(i),i||this.B(4,13)}return this}return this.qa||this.b&&this.b.scale()||this.o},$.g.p3=function(){return!!this.qa},$.g.zg=function(t){if(t.target==this.Po()){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)&&(e|=1),this.B(4,8|e)}},$.g.f_=function(){this.B(4,9)},$.g.axis=function(t){return $.p(t)?(this.b!=t&&(this.b&&$.kr(this.b,this.f_,this),this.b=t,$.K(this.b,this.f_,this),this.B(4,13)),this):this.b},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.we=function(t){return $.p(t)?(t=$.Gk(t),this.f!=t&&(this.f=t,this.B(4,9)),this):this.f?this.f:this.b?"left"==(t=this.b.g("orientation"))||"right"==t?"horizontal":"vertical":this.D},$.g.Nb=function(){return"horizontal"==this.we()},$.g.zc=function(){var t=$.Zy.u.zc.call(this)&&!(null==az(this)||!this.Po());return t?0<=(t=this.scale().transform(az(this),.5))&&1>=t||this.G?(this.B(6),!0):(this.remove(),this.I(6),!1):t},$.g.V1=function(){var t=this.g("rotation");return null==t||(0,window.isNaN)(t)?this.Nb()?0:-90:t},$.g.rR=function(){var t=this.g("align");if(this.Nb()){if("left"==t)return"left-center";if("right"==t)return"right-center"}else{if("top"==t)return"center-top";if("bottom"==t)return"center-bottom"}return"center"},$.g.vA=function(){var t=this.g("anchor");if(!t||"auto"==t)switch(this.rR()){case"center-top":case"right-center":t="right-center";break;case"center-bottom":case"left-center":t="left-center";break;default:t="center"}return t},$.g.Z1=function(){return this.i},$.g.ja=function(t,e,i,n){return $.p(t)?(null===t||$.J(t,$.I)?this.i=t:"object"==$.ka(t)?this.i=new $.I(t.left,t.top,t.width,t.height):this.i=new $.I(t||0,e||0,i||0,n||0),this.uo(),this):null!=az(this)&&this.Po()&&this.i?(t=this.i.clone(),e=this.scale().transform(az(this),.5),this.Nb()?(t.height=0,t.top=Math.round(this.i.top+this.i.height-e*this.i.height)):(t.width=0,t.left=Math.round(this.i.left+e*this.i.width)),t):null},$.g.uD=function(){var t=9;return"consider"==this.g("scaleRangeMode")&&(t|=4),t},$.g.mr=function(){return 4|$.Zy.u.mr.call(this)},$.g.xs=function(){return[az(this)]},$.g.F=function(){var t=$.Zy.u.F.call(this);return $.Tq(this,GG,t,"TextBase"),this.f&&(t.layout=this.f),t},$.g.U=function(t,e){if($.Zy.u.U.call(this,t,e),$.Iq(this,GG,t,e),"layout"in t&&t.layout&&this.we(t.layout),"axis"in t){var i=t.axis;$.ea(i)?this.pa&&this.axis(this.pa.ZG(i)):i.Iy&&i.Iy()&&this.axis(i)}},$.g.R=function(){$.qd(this.$g),this.b=this.pa=this.$g=null,$.Zy.u.R.call(this)},$.H($.bz,$.V),$.bz.prototype.sa=$.V.prototype.sa,$.bz.prototype.ra=$.V.prototype.ra|$.KE|$.LE;var Qca=Date.UTC(2e3,10,29,23,59,59,999);$.g=$.bz.prototype,$.g.Uw=function(){return this.ye},$.g.labels=function(t){return $.p(t)&&this.Da!=t?(this.Da&&$.kr(this.Da,this.Kn,this),this.Da=t,$.K(this.Da,this.Kn,this),this):this.Da},$.g.Kn=function(){this.ye.length||$.dz(this);for(var t=this.labels().flatten(),e=0;e<this.ye.length;e++){var i=this.ye[e];i.style(t),i.Ij()}this.va($.LE)},$.g.reset=function(){for(var t=0;t<this.ye.length;t++)this.ye[t].ld();this.ye.length=0,this.pA={},this.f.length=0},$.g.R=function(){this.reset(),this.ye.length=0;var t=$.vl,e="m"+$.oa(this);e in t.b&&($.kr(t.b[e].FO,t.o,t),delete t.b[e]),this.Da&&$.kr(this.Da,this.Kn,this),$.bz.u.R.call(this)},$.H($.fz,$.kt),$.g=$.fz.prototype,$.g.Ma=function(){return"linear-color"},$.g.w1=function(t){var e,i=[],n=0;for(e=arguments.length;n<e;n++){var s=arguments[n];if($.z(s))i.push(s);else if($.A(s))i.push.apply(i,s);else if($.C(s)){var a=s.keys;if($.p(a)&&$.A(a)){a=this.w1.apply(this,s.keys);var o=s.opacity;if($.p(o))for(var r=0;r<a.length;r++)s=a[r],$.p(s.opacity)||(s.opacity=o);i.push.apply(i,a)}else i.push(s)}}return $.Ub(i).keys},$.g.yia=function(t){for(var e=this.w1.apply(this,arguments),i=0,n=e.length;i<n;i++){var s=e[i];$.p(s.offset)||(s.offset=i?i==n-1?1:i/(n-1):0);var a=s.color;$.A(a)?s.color=$.Ha(a):$.z(a)&&(s.color=$.Cl($.Ll(a).vk))}return Sa(e),e},$.g.Jj=function(t){if(0<arguments.length&&$.p(arguments[0])){var e=this.yia.apply(this,arguments),i=this.Xe&&e.length==this.Xe.length;if(i)for(var n=0,s=e.length;n<s;n++){var a=!1;(0,$.Pe)(this.Xe,(function(t){a=a||$.Pc(t,e[n])})),i=i&&a}return i&&this.Xe||(this.Xe=e,this.va(2)),this}return this.Xe},$.g.Qq=function(t){t=this.transform(t);for(var e,i,n=0,s=this.Xe.length;n<s;n++){var a=this.Xe[n];if(i)break;t>=a.offset?e=a:i=a}var o;return o=e?i?$.Kl(i.color,e.color,(t-e.offset)/(i.offset-e.offset)):e.color:i.color,$.A(o)?$.Tb(o):o.color},$.g.pS=function(t){var e;this.pb(),t=$.Cl($.Ll(t).vk);var i=0;for(e=this.Xe.length;i<e;i++){var n=this.Xe[i],s=n.color;if(i!=this.Xe.length-1)var a=this.Xe[i+1],o=a.color;var r=(t[1]-s[1])/(o[1]-s[1]),l=(t[2]-s[2])/(o[2]-s[2]),h=(t[0]-s[0])/(o[0]-s[0]);if((0,window.isNaN)(h)&&(h=r||l),(0,window.isNaN)(r)&&(r=l||h),(0,window.isNaN)(l)&&(l=h||r),$.Wm(h,r)&&$.Wm(h,l)&&$.Wm(r,l)&&(r=Math.round(o[1]*r+(1-r)*s[1])==t[1],l=Math.round(o[2]*l+(1-l)*s[2])==t[2],Math.round(o[0]*h+(1-h)*s[0])==t[0]&&r&&l)){var c=this.xe*(h/(1/(a.offset-n.offset))+n.offset)+this.min;break}}return $.p(c)?c:window.NaN},$.g.Xa=function(t){return this.xh||(this.xh=this.ol(),$.W(this.xh,"ticks",this.xh)),$.p(t)?(this.xh.N(t),this.va(2),this):this.xh},$.g.yb=function(t){return this.Di||(this.Di=this.ol(),$.W(this.xh,"minorTicks",this.Di),this.Di.count(5)),$.p(t)?(this.Di.N(t),this.va(2),this):this.Di},$.g.sJ=function(){var t=this.Xa().DB(this.min,this.max,this.Pn&&this.min!=this.jt,this.Nn&&this.max!=this.Lq,this.yw);this.Pn&&(this.min=t[0]),this.Nn&&(this.max=t[1]),this.yb().EB(this.Xa().dk(),this.yw,t[2],t[3],this.Lx)},$.g.ex=function(){$.fz.u.ex.call(this),Qs(this.Oq,[this.min,this.max]),this.xe=this.max-this.min},$.g.li=function(t){$.X(t,2)&&(this.Kc=!1,this.va(2))},$.g.ol=function(){var t=new $.It(this);return $.K(t,this.li,this),t},$.g.F=function(){var t=$.fz.u.F.call(this);return t.ticks=this.Xa().F(),t.minorTicks=this.yb().F(),t.colors=(0,$.Wa)(this.Jj(),(function(t){return t.offset+" "+$.Tb(t.color)+($.p(t.opacity)?" "+t.opacity:"")})),t},$.g.U=function(t,e){$.fz.u.U.call(this,t,e),this.Xa(t.ticks),this.yb(t.minorTicks),this.Jj(t.colors)},$.g.R=function(){$.sd(this.xh,this.Di),this.Di=this.xh=null,$.fz.u.R.call(this)};var HG=$.fz.prototype;$.E("anychart.scales.linearColor",$.gz),HG.getType=HG.Ma,HG.colors=HG.Jj,HG.valueToColor=HG.Qq,HG.colorToValue=HG.pS,HG.ticks=HG.Xa,HG.minorTicks=HG.yb,$.H(hz,$.Ot),hz.prototype.j0=function(){var t=[],e=this.scale.Yy();if(e.length||(e=this.scale.sr()),e){var i;e=e.length-1,i=(0,window.isNaN)(this.IK())?Math.ceil(e/this.jW())||1:this.IK();for(var n=0;n<e;n+=i)t.push(n)}return t},hz.prototype.dW=function(t){var e=t.length||0,i=this.scale.sr(),n=i.length-1;if(!e||!n)return[];for(var s=[],a=!1,o=0;o<e&&!a;o++){var r=t[o],l=t[o+1];(0,window.isNaN)(l)||l>=n?(l=n-1,a=!0):l--;var h=i[r].gp;if($.da(h)){h=(i[r].start+i[r].end)/2;var c=(i[l].start+i[l].end)/2}else c=i[l].gp;s.push(r==l?h:[h,c])}return s},$.H($.iz,Xs),$.g=$.iz.prototype,$.g.Ma=function(){return"ordinal-color"},$.g.oN=function(){this.Co()},$.g.Jj=function(t){if($.p(t))return null===t?this.Xe=[]:$.A(t)&&(this.Xe=$.Ha(t)),this.Co(),this.va(2),this;if($.A(this.Xe)){if(this.tB||(this.tB=$.Ha(this.Xe)),this.tB.length<this.jd.length)for(;this.tB.length!=this.jd.length;)this.tB.push(this.jd[this.tB.length]);return this.tB}return this.bo||[]},$.g.names=function(t){if($.p(t)){if(null===t)this.Wf=[];else if($.A(t))this.Wf=$.Ha(t);else{if(!$.z(t)||this.Wf==t)return this;this.Wf=t}return this.Co(),$.Pt(this.Xa()),this.va(4),this}if(this.pb(),$.A(this.Wf)){if(this.Sn||(this.Sn=$.Ha(this.Wf)),this.Sn.length<this.xk.length)for(;this.Sn.length!=this.xk.length;)this.Sn.push(this.xk[this.Sn.length]);return this.Sn}if(!this.Ok){this.Ok=[],t=0;for(var e=this.xk.length;t<e;t++){var i,n=this.xk[t];(i=$.p(n.gp)&&!$.da(n.gp)?n.gp:(0,window.isFinite)(n.start+n.end)?n.start===n.end?n.start:n.start+" - "+n.end:!0===n.gp?(0,window.isFinite)(n.start)?">= "+n.start:"<= "+n.end:(0,window.isFinite)(n.start)?"> "+n.start:"< "+n.end)||(i="default"),n.name||(n.name=i),this.Ok.push(i)}}return this.Ok},$.g.Yy=function(t){return $.p(t)?(this.jd!=t&&(this.jd=t,null===(t=t[t.length-1]).equal&&null===t.from&&null===t.to&&null===t.greater&&null===t.less||this.jd.push({equal:null,less:null,greater:null,from:null,to:null}),this.eW||(this.bo=$.zm("defaultOrdinalColorScale").autoColors(this.jd.length-1),this.bo.push("#000")),this.Co(),$.Pt(this.Xa()),this.va(4)),this):this.jd},$.g.sr=function(){return this.pb(),this.names(),this.xk},$.g.Dn=function(t){this.pb();var e=this.xk[this.xk.length-1];if(this.xk)for(var i=0;i<this.xk.length-1;i++){var n=this.xk[i];if(!0===n.gp&&t>=n.start&&t<=n.end&&-1<n.sourceIndex||!1===n.gp&&t>n.start&&t<n.end&&-1<n.sourceIndex||!1===n.gp&&window.Infinity==Math.abs(t)&&(t==n.start||t==n.end)||n.gp===t){e=n;break}}return e},$.g.Qq=function(t){this.pb();var e="none";if(t=this.Dn(t)){var i=t.sourceIndex;if(0<=i){var n=this.Jj();$.p(t.color)?e=t.color:n&&0<n.length&&(e=i>n.length-1?n[n.length-1]:n[i])}}return e},$.g.pS=function(t){this.pb(),t=$.Ll(t).vk;for(var e=window.NaN,i=0,n=this.xk.length;i<n;i++){var s=this.xk[i],a=this.Jj();if(t==$.Ll(s.color||a[s.sourceIndex]||a[a.length-1]).vk){e=(s.start+s.end)/2;break}}return e},$.g.Yv=function(t){return this.pb(),(t=this.Dn(t))?(0,$.za)(this.xk,t):-1},$.g.Xa=function(t){return this.xh||(this.xh=this.ol()),$.p(t)?(this.xh.N(t),this):this.xh},$.g.li=function(t){$.X(t,2)&&this.va(2)},$.g.ol=function(){var t=new hz(this);return $.W(t,"ticks",t),$.K(t,this.li,this),t},$.g.transform=function(t,e){this.pb();var i=this.Dn(t);return i&&"default"!==i.name?1/(this.xk.length-1)*((0,$.za)(this.xk,i)+(e||0)):window.NaN},$.g.Mc=function(t){return this.pb(),((t=this.xk[$.Za(Math.ceil(t*(this.xk.length-1))-1,0,this.xk.length-2)]).start+t.end)/2},$.g.Of=function(){return!!this.Yy.length},$.g.IC=function(t){return this.Kc=!1,t||this.va(2),!0},$.g.reset=function(){return this.Sn=this.Ix=this.Ok=this.tB=this.xk=null,this},$.g.Co=function(){this.reset(),this.la.length=0},$.g.Xc=function(t){for(var e=0;e<arguments.length;e++)this.la.push(arguments[e]);return this},$.g.pb=function(){if(!this.xk){var t=[];if(!this.jd.length){this.Ix=[],$.Ka(this.la);var e=[],i=[];(0,$.Pe)(this.la,(function(t){var n=$.N(t);(0,window.isNaN)(t)?e.push({equal:t}):i.push(n)})),$.Pa(i);var n=Math.round(1+3.32*Math.log(i.length)/Math.log(10)),s=Math.floor(i[0]),a=(i[i.length-1]-s)/n,o=s,r=Math.ceil(o+a);for(s=0;s<n;s++)this.Ix.push({from:o,to:r}),o=r,r=Math.ceil(o+a);this.Ix=this.Ix.concat(e),this.Ix.length&&this.Ix.push({equal:null,less:null,greater:null,from:null,to:null}),this.eW||(this.bo=$.zm("defaultOrdinalColorScale").autoColors(this.Ix.length-1))&&this.bo.push("#000")}for(s=0,n=(r=this.jd.length?this.jd:this.Ix).length;s<n;s++){a=r[s],o=this.Wf?this.Wf[s]:null;var l=this.Jj(),h=this.Ne()?Math.max(0,l.length-2-s):s;l=l&&l[h]?l[h]:null,h=!0;var c=s,u=a.equal,d=$.N(a.from),p=$.N(a.to),g=$.N(a.less),f=$.N(a.greater),m=window.NaN,v=window.NaN,b=!0;$.p(u)?$.da(u)?(b=u,(0,window.isNaN)(f)?(0,window.isNaN)(g)||(m=-window.Infinity,v=g):(m=f,v=window.Infinity)):(d=$.N(u),(0,window.isNaN)(d)?b=u:v=m=d):(0,window.isNaN)(d)||(0,window.isNaN)(p)?(0,window.isNaN)(f)?(0,window.isNaN)(g)?h=!1:(m=-window.Infinity,v=g):(m=f,v=window.Infinity):(m=Math.min(d,p),v=Math.max(d,p)),h&&t.push({gp:b,start:m,end:v,sourceIndex:c,enabled:!0,color:a.color||l,name:a.name||o})}for(Rca(t),o=[],s=0,n=t.length;s<n;s++)(a=t[s]).enabled&&o.push(a);t.length=0,this.xk=o}},$.g.F=function(){var t=$.iz.u.F.call(this);return t.ticks=this.Xa().F(),this.jd&&this.jd.length&&(t.ranges=this.jd),this.Wf&&(t.names=this.Wf),this.Xe&&(t.colors=this.Xe),t},$.g.U=function(t,e){$.iz.u.U.call(this,t,e),this.Xa(t.ticks),this.Jj(t.colors),this.Yy(t.ranges),this.names(t.names)},$.g.R=function(){$.qd(this.xh),this.xh=null,$.iz.u.R.call(this)};var IG=$.iz.prototype;$.E("anychart.scales.ordinalColor",$.jz),IG.getType=IG.Ma,IG.colors=IG.Jj,IG.ranges=IG.Yy,IG.names=IG.names,IG.ticks=IG.Xa,IG.getRangeByValue=IG.Dn,IG.getProcessedRanges=IG.sr,IG.valueToColor=IG.Qq,IG.colorToValue=IG.pS,IG.getIndexByValue=IG.Yv,IG.transform=IG.transform,IG.inverseTransform=IG.Mc,$.H($.kz,$.Y),$.g=$.kz.prototype,$.g.ra=98312|$.Y.prototype.ra,$.g.sa=80|$.Y.prototype.sa,$.g.g=$.ir,$.g.ys=function(){return 1},$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){return $.p(t)?(this.Y!=t&&(this.Y&&$.kr(this.Y,this.Tc,this),(this.Y=t)&&$.K(this.Y,this.Tc,this)),this):this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=80,i|=1),$.X(t,32768)&&(e|=1,i|=1),$.X(t,65536)&&(e|=8,i|=1),this.Xb=null,this.B(e,i)};var cea=$.kz.prototype,JG={};$.rq(JG,1,"stroke",$.Pq),$.rq(JG,1,"fill",$.Nq),$.rq(JG,0,"drawFirstLine",$.Dq),$.rq(JG,0,"drawLastLine",$.Dq),$.rq(JG,0,"isMinor",$.Dq),cea.Cz=JG,$.U($.kz,$.kz.prototype.Cz),$.g=$.kz.prototype,$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!=t&&(this.Pa.enabled=t,this.B(1,this.mr()),this.Pa.enabled?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},$.g.zIndex=function(t){return $.p(t)?(t=+t||0,this.Pa.zIndex!=t&&(this.Pa.zIndex=t,this.B(8,65537)),this):$.p(this.nd("zIndex"))?this.nd("zIndex"):$.p(this.zh)?this.zh:this.g("zIndex")},$.g.cc=function(t){return this.Fa||this.Y&&!this.oa.palette||(lz(this,this.oa.palette),$.W(this,"palette",this.Fa),this.Fa.Gp(!1)),$.p(t)?(lz(this,t),this.Fa.N(t),this):this.Fa},$.g.Hc=function(t){if(!$.J(this.Fa,t)){var e=!!this.Fa;$.qd(this.Fa),this.Fa=new t,$.K(this.Fa,this.Pf,this),e&&this.B(64,1)}},$.g.Pf=function(t){$.X(t,2)&&this.B(64,1)},$.g.Nb=function(){return"horizontal"==this.we()},$.g.c2=function(t){return"left"==(t=t.orientation())||"right"==t?"horizontal":"vertical"},$.g.q4=function(t){return $.Gk(t)},$.g.we=function(t){return $.p(t)?(t=this.q4(t),this.f!=t&&(this.f=t,this.aa=null,this.B(64,9)),this):this.f?this.f:this.b?this.c2(this.b):this.HL},$.g.scale=function(t){return $.p(t)?(nz(this,!1,t),this):this.qa?this.qa:this.b?this.b.scale():this.aa},$.g.zg=$.ia,$.g.axis=function(t){return $.p(t)?(this.b!=t&&(this.b&&$.kr(this.b,this.c0,this),this.b=t,$.K(this.b,this.c0,this),this.B(64,9)),this):this.b},$.g.c0=function(){this.B(80,9)},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.d_=function(){var t=$.qk();return t.parent(this.O()).zIndex(this.zIndex()).stroke("none"),t},$.g.Sz=function(){$.Dc(this.D,(function(t){t.clear()}))},$.g.Uh=function(){return this.o=this.o?this.o:$.qk()},$.g.u0=function(){var t=this.scale();return t||$.il(2),!!t},$.g.Lj=function(){var t=this.scale(),e=window.NaN,i=$.J(t,$.Qt),n=(i?t.Xa():this.g("isMinor")?t.yb():t.Xa()).get(),s=this.Nb()?[this.KG,this.HG]:[this.LG,this.IG];this.Sz(),this.Uh().clear();var a=this.ja()||$.kn(0,0,0,0),o=this.Xj&&this.Xj.uN(),r=$.dp(this.g("stroke"));if(o){var l=this.Xj;this.oi=l.oi,this.Mh=l.Mh,a.top-=this.Mh+r/2,a.height+=this.Mh+r/2,a.width+=this.oi}if((a=a.clone()).height=$.R(a.height,1)+.5,a.width=$.R(a.width,1)+.5,this.Uh().clip(a),a=s[1],s=s[0],r=-this.Uh().gl()%2/2,o&&this.Nb()){var h=t.Ne()?1:0;s.call(this,h,r)}for(o=0,l=n.length;o<l;o++){var c=n[o];$.A(c)&&(c=c[0]);var u=i&&"continuous"==t.mode()?.5:0;h=t.transform(c,u),"log"==t.Ma()&&(h=$.Tm(h,6)),o&&(u=$.oz(this,o-1))&&a.call(this,h,e,u,r),o?o==l-1?(this.g("drawLastLine")||i)&&s.call(this,h,r):s.call(this,h,r):this.g("drawFirstLine")&&s.call(this,h,r),e=h}i&&$.p(c)&&(h=t.Ne()?0:1,this.g("drawLastLine")&&s.call(this,h,r),(u=$.oz(this,o-1))&&a.call(this,h,e,u,r))},$.g.sK=function(){this.Uh().stroke(this.g("stroke"))},$.g.pv=$.ia,$.g.TK=function(){var t=this.O();this.Uh().parent(t),$.Dc(this.D,(function(e){e.parent(t)}))},$.g.xC=function(){var t=this.zIndex();this.Uh().zIndex(t+.03),$.Dc(this.D,(function(e){e.zIndex(t)}))},$.g.W=function(){return this.u0()&&this.zc()?(this.pv(),this.J(16)&&(this.sK(),this.I(16)),this.J(68)&&(this.Lj(),this.I(68)),this.J(8)&&(this.xC(),this.I(8)),this.J(2)&&(this.TK(),this.I(2)),this):this},$.g.remove=function(){this.Uh().parent(null),$.Dc(this.D,(function(t){t.parent(null)}))},$.g.F=function(){var t={};this.Fa&&(t.palette=this.Fa.F());var e=$.V.prototype.g.call(this,"zIndex");return $.p(e)&&(t.zIndex=e),e=$.V.prototype.g.call(this,"enabled"),t.enabled=$.p(e)?e:null,$.Tq(this,this.Cz,t,"Map grids props"),t},$.g.U=function(t,e){if("axis"in t){var i=t.axis;$.ea(i)?this.Xj&&this.axis(this.Xj.ZG(i)):$.J(i,$.Sy)&&this.axis(i)}t.palette&&this.cc(t.palette),e?$.Hq(this.oa,this.Cz,t):($.Iq(this,this.Cz,t),$.kz.u.U.call(this,t))},$.g.R=function(){for(var t in this.Xj=this.b=null,this.D)$.qd(this.D[t]);this.D=null,$.sd(this.Fa,this.$g,this.o),this.o=this.$g=this.Fa=null,$.kz.u.R.call(this)};var KG=$.kz.prototype;KG.enabled=KG.enabled,KG.palette=KG.cc,$.H(pz,$.kz),$.g=pz.prototype,$.g.zg=function(t){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)&&(e|=1),this.B(20,8|e)},$.g.KG=function(t){var e=this.ja()||$.kn(0,0,0,0);t=e.Va()-t*e.height,t=$.R(t,this.Uh().gl()),this.o.moveTo(e.tb(),t),this.o.lineTo(e.cb(),t)},$.g.LG=function(t){var e=this.ja()||$.kn(0,0,0,0);t=e.tb()+t*e.width;var i=this.Uh().gl();t=$.R(t,i),this.o.moveTo(t,e.Va()),this.o.lineTo(t,e.Vb())},$.g.HG=function(t,e,i){if(!(0,window.isNaN)(e)){var n=this.ja()||$.kn(0,0,0,0),s=this.Uh().gl();e=n.Va()-e*n.height,e=$.R(e,s),t=n.Va()-t*n.height,t=$.R(t,s),i.moveTo(n.tb(),e),i.lineTo(n.cb(),e),i.lineTo(n.cb(),t),i.lineTo(n.tb(),t),i.close()}},$.g.IG=function(t,e,i){if(!(0,window.isNaN)(e)){var n=this.ja()||$.kn(0,0,0,0),s=this.Uh().gl();e=n.tb()+e*n.width,e=$.R(e,s),t=n.tb()+t*n.width,t=$.R(t,s),i.moveTo(e,n.Vb()),i.lineTo(t,n.Vb()),i.lineTo(t,n.Va()),i.lineTo(e,n.Va()),i.close()}},$.H(qz,pz),$.xu(qz,pz);var LG=pz.prototype;LG.isHorizontal=LG.Nb,LG.scale=LG.scale,LG.axis=LG.axis,LG=qz.prototype,$.E("anychart.standalones.grids.linear",(function(){var t=new qz;return t.N($.nm("standalones.linearGrid")),t})),LG.layout=LG.we,LG.draw=LG.W,LG.parentBounds=LG.ja,LG.container=LG.O,$.H(sz,$.qf),$.rz=0,$.g=sz.prototype,$.g.Jw=function(){this.bp("begin")},$.g.cm=function(){this.bp("end")},$.g.eE=function(){this.bp("finish")},$.g.nO=function(){this.bp("play")},$.g.bp=function(t){this.dispatchEvent(t)};var tz={},uz=null;$.H($.xz,sz),$.g=$.xz.prototype,$.g.play=function(t){if(t||this.dc==$.rz)this.Kd=0,this.coords=this.b;else if(1==this.dc)return!1;$.vz(this),this.o=t=(0,$.Ln)(),-1==this.dc&&(this.o-=this.duration*this.Kd),this.D=this.o+this.duration,this.Kd||this.Jw(),this.nO(),-1==this.dc&&this.bp("resume"),this.dc=1;var e=$.oa(this);return e in tz||(tz[e]=this),wz(),this.uG(t),!0},$.g.stop=function(t){$.vz(this),this.dc=$.rz,t&&(this.Kd=1),yz(this,this.Kd),this.bp("stop"),this.cm()},$.g.R=function(){this.dc==$.rz||this.stop(!1),this.bp("destroy"),$.xz.u.R.call(this)},$.g.uG=function(t){t<this.o&&(this.D=t+this.D-this.o,this.o=t),this.Kd=(t-this.o)/(this.D-this.o),1<this.Kd&&(this.Kd=1),yz(this,this.Kd),1==this.Kd?(this.dc=$.rz,$.vz(this),this.eE(),this.cm()):1==this.dc&&this.en()},$.g.en=function(){this.bp("animate")},$.g.bp=function(t){this.dispatchEvent(new zz(t,this))},$.H(zz,wd),$.H(Az,sz),Az.prototype.add=function(t){$.Aa(this.Wb,t)||(this.Wb.push(t),$.Ld(t,"finish",this.f,!1,this))},Az.prototype.remove=function(t){$.Fa(this.Wb,t)&&$.Yd(t,"finish",this.f,!1,this)},Az.prototype.R=function(){(0,$.Pe)(this.Wb,(function(t){t.ld()})),this.Wb.length=0,Az.u.R.call(this)},$.H(Bz,Az),Bz.prototype.play=function(t){if(0==this.Wb.length)return!1;if(t||this.dc==$.rz)this.b=0,this.Jw();else if(1==this.dc)return!1;this.nO(),-1==this.dc&&this.bp("resume");var e=-1==this.dc&&!t;return this.o=(0,$.Ln)(),this.D=null,this.dc=1,(0,$.Pe)(this.Wb,(function(i){e&&-1!=i.dc||i.play(t)})),!0},Bz.prototype.stop=function(t){(0,$.Pe)(this.Wb,(function(e){e.dc==$.rz||e.stop(t)})),this.dc=$.rz,this.D=(0,$.Ln)(),this.bp("stop"),this.cm()},Bz.prototype.f=function(){this.b++,this.b==this.Wb.length&&(this.D=(0,$.Ln)(),this.dc=$.rz,this.eE(),this.cm())},$.H(Cz,Az),Cz.prototype.play=function(t){if(0==this.Wb.length)return!1;if(t||this.dc==$.rz)this.b<this.Wb.length&&this.Wb[this.b].dc!=$.rz&&this.Wb[this.b].stop(!1),this.b=0,this.Jw();else if(1==this.dc)return!1;return this.nO(),-1==this.dc&&this.bp("resume"),this.o=(0,$.Ln)(),this.D=null,this.dc=1,this.Wb[this.b].play(t),!0},Cz.prototype.stop=function(t){if(this.dc=$.rz,this.D=(0,$.Ln)(),t)for(t=this.b;t<this.Wb.length;++t){var e=this.Wb[t];e.dc==$.rz&&e.play(),e.dc==$.rz||e.stop(!0)}else this.b<this.Wb.length&&this.Wb[this.b].stop(!1);this.bp("stop"),this.cm()},Cz.prototype.f=function(){1==this.dc&&(this.b++,this.b<this.Wb.length?this.Wb[this.b].play():(this.D=(0,$.Ln)(),this.dc=$.rz,this.eE(),this.cm()))},$.H(Dz,Bz),Dz.prototype.update=function(){for(var t=(0,$.Ln)(),e=0;e<this.Wb.length;e++){var i=this.Wb[e];i.update(),i.uG(t)}},$.H($.Ez,$.xz),$.Ez.prototype.update=function(){},$.Ez.prototype.nO=function(){this.update()},$.Ez.prototype.R=function(){$.Ez.u.R.call(this),this.X=null},$.H(Fz,$.Ez),Fz.prototype.update=function(){this.b.length=this.f.length=0;for(var t=this.X.cg();t.advance();)if(!t.j("missing")){(0,window.isNaN)(t.j("destinationValue"))&&t.j("destinationValue",t.j("size"));var e=t.j("destinationValue");this.b.push(0>e?-1e-5:0),this.f.push(e),e=t.j("x");var i,n=t.j("value");(i=t.j("label"))&&(i=i.jc().value,this.b.push(e,n),this.f.push(i.x,i.y)),(i=t.j("marker"))&&(i=i.jc().value,this.b.push(e,n),this.f.push(i.x,i.y))}},Fz.prototype.en=function(){for(var t=this.X.cg(),e=0;t.advance();)if(!t.j("missing")){t.j("size",this.coords[e++]),this.X.bf.yt(t);var i=t.j("label");i&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W()),(i=t.j("marker"))&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W())}},Fz.prototype.cm=function(){this.en()},$.H(Gz,$.Ez),Gz.prototype.update=function(){this.i=uB(this.X),this.xa=this.X.g("isVertical");var t=this.X.clip();$.da(t)&&!t&&(this.i=this.X.xc().ob()),this.xa?(this.b[0]=this.i.top,this.X.Ra().Ne()||(this.b[0]+=this.i.height),this.b[1]=0,(0,window.isNaN)(this.G)&&(this.G=this.i.height),this.f[0]=this.i.top):(this.b[0]=this.i.left,this.X.Ra().Ne()&&(this.b[0]+=this.i.width),this.b[1]=0,(0,window.isNaN)(this.G)&&(this.G=this.i.width),this.f[0]=this.i.left),this.f[1]=this.G},Gz.prototype.en=function(){this.xa?(this.i.top=this.coords[0],this.i.height=this.coords[1]):(this.i.left=this.coords[0],this.i.width=this.coords[1]),this.X.bs(this.i)},Gz.prototype.cm=function(){this.xa?(this.i.top=this.coords[0],this.i.height=this.coords[1]):(this.i.left=this.coords[0],this.i.width=this.coords[1]),this.X.bs(this.i),this.G=window.NaN},$.H(Hz,$.Ez),Hz.prototype.update=function(){this.i=this.X.g("isVertical"),this.b.length=this.f.length=0;for(var t=this.X.cg();t.advance();)if(!t.j("missing")){var e=t.j("x");(0,window.isNaN)(t.j("destinationValue"))&&t.j("destinationValue",t.j("value"));var i=t.j("destinationValue"),n=t.j("zero");this.b.push(n),this.f.push(i),(i=t.j("label"))&&(i=i.jc().value,this.i?this.b.push(n,e):this.b.push(e,n),this.f.push(i.x,i.y)),(i=t.j("marker"))&&(i=i.jc().value,this.i?this.b.push(n,e):this.b.push(e,n),this.f.push(i.x,i.y))}},Hz.prototype.en=function(){for(var t=this.X.cg(),e=0;t.advance();)if(!t.j("missing")){t.j("value",this.coords[e++]),this.X.bf.yt(t);var i=t.j("label");i&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W()),(i=t.j("marker"))&&(i.jc({value:{x:this.coords[e++],y:this.coords[e++]}}),i.W())}},Hz.prototype.cm=function(){this.en()};var MG={};MG.bar=Hz,MG.bubble=Fz,MG.area=Gz,MG.line=Gz,MG["range-area"]=Gz,MG["range-spline-area"]=Gz,MG["range-step-area"]=Gz,MG.spline=Gz,MG["spline-area"]=Gz,MG["step-area"]=Gz,MG["step-line"]=Gz,MG.column=Hz,MG["jump-line"]=Hz,MG.stick=Hz,MG.mekko=Hz,$.H($.Kz,$.V),$.V.prototype.n2=function(t,e){if(!$.p(this.PB[t])){t=$.pm(t);var i=$.sr(this);if(this.PB[t]=$.tr(i,"base"),!e)for(var n=0;n<this.uY.length;n++)-1!=(0,$.za)(this.uY[n].kk,t)&&(this.PB[t]=$.Ga(this.PB[t],$.tr(i,this.uY[n].JP)));this.PB[t]=$.Ga(this.PB[t],$.tr(i,t))}return this.PB[t]},$.H($.Lz,$.Y),$.Jz($.Lz,"dataarea","appearance"),$.g=$.Lz.prototype,$.g.ra=$.Y.prototype.ra,$.g.background=function(t){return this.Ia||(this.Ia=new $.yu,$.K(this.Ia,this.vg,this),$.W(this,"background",this.Ia)),$.p(t)?(this.Ia.N(t),this):this.Ia},$.g.vg=function(){$.nr(this,"dataarea","appearance",1)},$.g.remove=function(){this.Aa&&this.Aa.parent(null)},$.g.bs=function(t){this.Aa&&this.Aa.clip(t)},$.g.W=function(){if(!this.zc())return this;if(this.Aa||(this.Aa=$.ok()),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.J(4)&&($.nr(this,"dataarea","appearance"),this.I(4)),$.rr(this,"dataarea","appearance")){var t=$.wr(this,"background");t&&(t.ka(),t.O()||t.O(this.Aa),t.ja(this.ja()),t.da(!1),t.W()),$.pr(this,"dataarea","appearance")}return this},$.g.F=function(){var t=$.Lz.u.F.call(this);return t.background=this.background().F(),t},$.g.U=function(t,e){$.Lz.u.U.call(this,t,e),this.background().ga(!!e,t.background)},$.g.R=function(){$.sd(this.Ia),this.Ia=null,$.Lz.u.R.call(this)};var NG=$.Lz.prototype;NG.background=NG.background,$.H($.Mz,$.Bx),$.Jz($.Mz,"serieschart","dataarea"),$.Mz.prototype.sa=61440|$.Bx.prototype.sa,$.Mz.prototype.fj={},$.Mz.prototype.ms=function(t){return this.Ti||(this.Ti=new $.Kz,$.W(this,"defaultSeriesSettings",this.Ti)),$.p(t)?(this.Ti.oa=t,this):this.Ti},$.Mz.prototype.Ss=function(t){return String(t)};var OG=function(){var t={};return $.sq(t,[[0,"defaultSeriesType",function(t){return this.Ss(t)}],[0,"maxBubbleSize",$.wq],[0,"minBubbleSize",$.wq],[0,"pointWidth",$.yo],[0,"maxPointWidth",$.yo],[0,"minPointLength",$.yo],[0,"baseline",$.Bq]]),t}();$.U($.Mz,OG),$.g=$.Mz.prototype,$.g.Vv=function(t){t=this.Ss(t);var e=this.fj[t];return e&&e.Fb in $.PG?t=[t,e]:($.il(4,null,[t+" series"]),t=null),t},$.g.zM=function(t){return t.check(32768)?31:30},$.g.VX=function(t){var e=this.hb[this.hb.length-1];e=e?e.yh()+1:0,this.hb.push(t),t.yh(e),$.fB(t),t.Kq(this.cc().nc(e)),$.kB(t,this.Nf().nc(e)),t.dx(this.ve().nc(e)),t.kb(this),$.K(t,this.FE,this)},$.g.Ae=function(t,e,i){var n=this.Vv(t);return n?(t=n[0],(t=this.Gt(t,n[1])).data(e,i),this.VX(t),this.B(492288|(t.check($.tB)?4:0),1)):t=null,t},$.g.kl=function(t){var e=[],i=this.g("defaultSeriesType"),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.Ae(i,arguments[s]));else e.push(this.Ae(i,null));return this.da(!0),e},$.g.ty=function(t){return $.xa(this.hb,(function(e){return e.id()==t}))},$.g.ef=function(t){return this.Ai(this.ty(t))},$.g.Ai=function(t){return this.hb[t]||null},$.g.tj=function(){return this.hb.length},$.g.Ao=function(t){return this.Rn(this.ty(t))},$.g.Rn=function(t){var e=this.hb[t];return e&&($.Pp++,this.ka(),$.Ca(this.hb,t,1),$.qd(e),this.B(492304,1),this.da(!0),$.Sp()),this},$.g.Dp=function(){if(this.hb.length){$.Pp++,this.ka();var t=this.hb;this.hb=[],$.sd(t),this.B(492304,1),this.da(!0),this.hm=this.zl=null,this.gc("mousemove",this.QJ),$.Sp()}return this},$.g.FE=function(t){var e=0;$.X(t,32768)&&(e|=256),$.X(t,1)&&(e=32768),$.X(t,2048)&&(e=32),$.X(t,16)&&(e|=256,"categories"==this.eg().g("itemsSourceMode")&&(e|=512),this.MA()),$.X(t,4)&&(e|=458752),$.X(t,64)&&(e|=512,$.X(t,8)&&(e|=4)),this.B(e,1)},$.g.Ue=function(){return this.hb},$.g.Ey=function(){for(var t=this.hb.length;t--;)this.hb[t].sp()&&this.hb[t].B(1024)},$.g.e3=function(){for(var t=this.hb.length;t--;)this.hb[t].Ak()&&this.hb[t].B(1028)},$.g.xa=function(t){return!!$.p(t)&&this},$.g.Ra=function(){},$.g.aX=function(){},$.g.eT=function(){},$.g.ev=function(){return!0},$.g.Yja=function(t){for(var e=0;e<this.hb.length;e++){var i=this.hb[e];i&&i.yE(),t||i.B(1024)}},$.g.rB=function(t){for(var e=0;e<this.hb.length;e++){var i=this.hb[e];i&&i.yE()}t||this.Ey()},$.g.cc=function(t){return $.J(t,$.Ms)?(this.Hc($.Ms,t),this):$.J(t,$.Gs)?(this.Hc($.Gs,t),this):($.C(t)&&"range"==t.type?this.Hc($.Ms):($.C(t)||null==this.Fa)&&this.Hc($.Gs),$.p(t)?(this.Fa.N(t),this):this.Fa)},$.g.Nf=function(t){return this.He||(this.He=new $.Ls,$.K(this.He,this.yI,this),$.W(this,"markerPalette",this.He)),$.p(t)?(this.He.N(t),this):this.He},$.g.ve=function(t){return this.fd||(this.fd=new $.Hs,$.K(this.fd,this.HH,this),$.W(this,"hatchFillPalette",this.fd)),$.p(t)?(this.fd.N(t),this):this.fd},$.g.Hc=function(t,e){if($.J(this.Fa,t))e&&this.Fa.N(e);else{var i=!!this.Fa;$.qd(this.Fa),this.Fa=new t,$.W(this,"palette",this.Fa),this.Fa.Gp(),e&&this.Fa.N(e),$.K(this.Fa,this.Pf,this),i&&this.B(4608,1)}},$.g.Pf=function(t){$.X(t,2)&&this.B(4608,1)},$.g.yI=function(t){$.X(t,2)&&this.B(8704,1)},$.g.HH=function(t){$.X(t,2)&&this.B(16896,1)},$.g.labels=function(t){return $.p(t)?(this.ca.labels(t),this):this.ca.labels()},$.g.th=function(t){return $.p(t)?(this.ca.th(t),this):this.ca.th()},$.g.sh=function(t){return $.p(t)?(this.ca.sh(t),this):this.ca.sh()},$.g.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},$.g.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za},$.g.selected=function(t){return $.p(t)?(this.Ea.N(t),this):this.Ea},$.g.Kn=function(t){if($.X(t,1)){for(this.Qa().labels().I(4294967295),this.Qa().th().I(4294967295),this.Qa().sh().I(4294967295),t=this.hb.length;t--;){var e=this.hb[t];e.check($.QG)&&e.B(256)}this.B(32768,1)}};var dea={bar:["value"],line:["value"],polyline:["value"],area:["value"],polygon:["value"],column:["value"],spline:["value"],marker:["value"],"step-area":["value"],"step-line:":["value"],"spline-area":["value"],"jump-line":["value"],stick:["value"],mekko:["value"],bubble:["value","size"],"range-bar":["high","low"],"range-area":["high","low"],"range-column":["high","low"],"range-step-area":["high","low"],"range-spline-area":["high","low"],ohlc:["open","high","low","close"],candlestick:["open","high","low","close"],box:["lowest","q1","median","q3","highest"],connector:["points"],choropleth:["id","value"],"marker-map":["id","long","lat"],"bubble-map":["id","long","lat","size"],hilo:["high","low"],waterfall:["value"],moment:["value"],range:["start","end"]};$.g=$.Mz.prototype,$.g.data=function(t){if($.p(t)){var e=null;if(t){var i=t.title||t.caption;i&&this.title(i),t.header&&t.header.length&&(e=t.header),t.rows?this.Xf=t.rows:this.Xf=t}else this.Xf=t;$.J(t,$.Mr)||(t=$.Or(this.Xf),$.rd(this,t));var n=t.Af(0);i=1;var s=null;$.A(n)?i=n.length:$.C(n)&&(i=(s=$.Fc(n)).length);var a=this.tj(),o=1;n=0,this.ka();for(var r=0;r<a;r++){var l=this.Ai(n),h=l.Be(),c=o+h.length;c<=i?(o=Qr(t,o,c,h,s),l.data(o),e&&l.name(e[n+1]),o=c):(l=l.id(),this.Ao(l),n--),n++}a=this.g("defaultSeriesType"),h=dea[a];do{if(!((c=o+h.length)<=i))break;o=Qr(t,o,c,h,s),l=this.kl(o)[0],e&&l.name(e[n+1]),n++,o=c}while(o<=i);return this.B(256),this.da(!0),this}return this.Xf},$.g.MA=function(){},$.g.pv=function(){if(!this.pf()&&($.J(this.Fa,$.Ms)&&$.Ns(this.Fa,this.Ue().length),this.J(28672))){$.xr(this.hb);var t=0;this.J(20480)&&(t|=2048),this.J(8192)&&(t|=128);for(var e=this.hb.length;e--;){var i=this.hb[e],n=i.yh();i.Kq(this.cc().nc(n)),$.kB(i,this.Nf().nc(n)),i.dx(this.ve().nc(n)),i.B(t)}this.B(32768),this.I(28672),$.zr(this.hb)}},$.g.Z5=function(t,e,i,n,s){t.Qp(e||0,i||0,n||0,s||0)},$.g.aL=function(){this.aX(),this.eT(),$.Oz(this)},$.g.g1=function(){for(var t=0;t<this.hb.length;t++)this.hb[t].W()},$.g.yv=function(t){return this.tn||(this.tn=new $.Lz,$.K(this.tn,this.OS,this),$.W(this,"dataArea",this.tn)),$.p(t)?(this.tn.N(t),this):this.tn},$.g.OS=function(t){$.X(t,1)&&$.nr(this,"serieschart","dataarea",1)},$.g.RE=function(t){if($.Mz.u.RE.call(this,t),$.rr(this,"serieschart","dataarea")){var e=$.wr(this,"dataArea");e&&(e.ka(),e.O()||e.O(this.Na),e.ja(t),e.da(!1),e.W()),$.pr(this,"serieschart","dataarea")}},$.g.az=function(t){this.ka(),$.Mz.u.az.call(this,t),$.nr(this,"serieschart","dataarea",9),this.da(!0)},$.g.OW=function(t){$.X(t,8)&&$.nr(this,"serieschart","dataarea"),$.Mz.u.OW.call(this,t)},$.g.QW=function(t){$.X(t,8)&&$.nr(this,"serieschart","dataarea"),$.Mz.u.QW.call(this,t)},$.g.Ol=function(t,e){var i,n=[];if(this.pb(),this.ev()&&"categories"==t&&$.J(this.Ra(),$.Qt)){var s=this.Ra().names();if($.D(e)){var a=this.Ra().values(),o=0;for(i=a.length;o<i;o++){var r={value:a[o],name:s[o]};r=e.call(r,r),$.z(r)||(r=String(s[o])),n.push({text:r,iconEnabled:!1,sourceUid:$.oa(this),sourceKey:o})}}else for(o=0,i=s.length;o<i;o++)n.push({text:String(s[o]),iconEnabled:!1,sourceUid:$.oa(this),sourceKey:o})}else for(o=0,i=this.hb.length;o<i;o++)(a=(s=this.hb[o]).qD(e)).sourceUid=$.oa(this),a.sourceKey=s.id(),n.push(a);return n},$.g.xN=function(t){var e=t.enabled(),i=t.vm||[],n=!0;return(t=t.data()?t.data().Hb():0)&&t!=i.length||(n=!1),e&&n},$.g.yj=function(){for(var t=0,e=this.hb.length,i=0;i<e&&!this.xN(this.hb[i]);i++)t++;return t==e},$.g.U=function(t,e){$.Mz.u.U.call(this,t,e),$.Iq(this,OG,t,e),this.cc(t.palette),this.Nf(t.markerPalette),this.ve(t.hatchFillPalette),t.dataArea&&this.yv().ga(!!e,t.dataArea),this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),this.Ea.ga(!!e,t.selected)},$.g.$c=function(){this.ca.Ga(this.oa),$.W(this,"normal",this.ca),this.ca.ga(!0,{}),$.W(this,"hovered",this.za),this.za.ga(!0,{}),$.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},$.g.F=function(){var t=$.Mz.u.F.call(this);return $.Tq(this,OG,t),t.palette=this.cc().F(),t.markerPalette=this.Nf().F(),t.hatchFillPalette=this.ve().F(),this.tn&&(t.dataArea=this.yv().F()),t.normal=this.Qa().F(),t.hovered=this.lb().F(),t.selected=this.selected().F(),t},$.g.R=function(){this.ka(),this.Dp(),this.da(!1),$.sd(this.Fa,this.He,this.fd,this.tn,this.Ti,this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=this.Ti=this.tn=this.fd=this.He=this.Fa=null,$.Mz.u.R.call(this)};var RG=$.Mz.prototype;RG.labels=RG.labels,RG.minLabels=RG.th,RG.maxLabels=RG.sh,RG.normal=RG.Qa,RG.hovered=RG.lb,RG.selected=RG.selected,RG.isVertical=RG.xa,RG.dataArea=RG.yv,$.H($.Qz,$.Mz),$.Qz.prototype.sa=2031616|$.Mz.prototype.sa;var SG={};$.rq(SG,0,"barGroupsPadding",$.N),$.rq(SG,0,"barsPadding",$.N),$.U($.Qz,SG),$.g=$.Qz.prototype,$.g.g1=function(){for(var t="direct"==this.bb().kx(),e=0;e<this.hb.length;e++)this.hb[t?this.hb.length-e-1:e].W()},$.g.uy=function(){return null},$.g.wy=function(){return null},$.g.ev=function(){return!0},$.g.zU=function(){return"ordinal"},$.g.CA=function(){return 15},$.g.xD=function(){return["Chart scale","ordinal, linear, log, date-time"]},$.g.tH=function(){return"linear"},$.g.sH=function(){return this.CA()},$.g.SM=function(){return this.xD()},$.g.nH=function(){return 0},$.g.tV=function(){},$.g.Ra=function(t){if($.p(t)){if(t=$.jt(this.eb,t,this.zU(),this.CA(),this.xD(),this.iQ,this)){var e=this.eb==t;this.Bia=this.eb?String($.oa(this.eb)):null,this.eb=t,t.da(e),e||(t=131072,this.ev()&&"categories"==this.eg().g("itemsSourceMode")&&(t|=512),t|=this.nH(),this.B(t,1),this.tV(this.eb))}return this}return this.eb||(this.eb=$.jt(this.eb,{},this.zU(),this.CA(),null,this.iQ,this),this.eb.da(!1)),this.eb},$.g.iQ=function(t){if(this.ka(),$.X(t,4)){var e=458752;this.ev()&&"categories"==this.eg().g("itemsSourceMode")&&(e|=512),this.B(e,1)}$.X(t,2)&&$.Rz(this,this.eb),this.da(!0)},$.g.bb=function(t){if($.p(t)){if(t=$.jt(this.Fc,t,this.tH(),this.sH(),this.SM(),this.Yu,this)){var e=this.Fc==t;this.Cia=this.Fc?String($.oa(this.Fc)):null,this.Fc=t,this.Fc.da(e),e||(this.B(131072|this.nH(),1),this.tV(this.Fc))}return this}return this.Fc||(this.Fc=$.jt(this.Fc,{},this.tH(),this.sH(),null,this.Yu,this),this.Fc.da(!1)),this.Fc},$.g.Yu=function(t){this.ka(),$.X(t,4)&&this.B(458752,1),$.X(t,2)&&$.Rz(this,this.Fc),this.da(!0)},$.g.uV=function(){this.B(32768,1)},$.g.Lj=function(){this.pf(1572864)||$.Qz.u.Lj.call(this)},$.g.pb=function(){if(this.ka(),Sz(this),this.So){if(this.J(65536)){var t,e;for(v in this.kA={},this.xn={},this.mm){var i=this.mm[v];i.Of()&&i.Bg()}for(this.Re=this.CS(),t=0;t<this.Re.length;t++){var n=this.Re[t];i=n.X.Ra();var s=n.X.bb();i=$.oa(i),s=$.oa(s),this.xn[i]||(this.xn[i]=[]),this.kA[i]||(this.kA[i]={}),this.kA[i][s]||(this.kA[i][s]=[]),this.xn[i].push(n),this.kA[i][s].push(n)}for(v in this.xn){if(i=(s=this.xn[v])[0].X.Ra(),1<s.length)if(n=s[s.length-1],$.J(i,$.Qt)){var a=n.qt;for(t=0;t<s.length-1;t++)for(e=(n=s[t]).data.length;e<a.length;e++)n.data.push(zB(a[e]))}else{var o,r;a=[];var l=s[0].data;n=s[1].data,e=l.length;var h=n.length,c=o=0,u=o<e?l[o].data.x:window.NaN;for(r=c<h?n[c].data.x:window.NaN;!(0,window.isNaN)(u)&&!(0,window.isNaN)(r);){var d=u<=r,p=u>=r;a.push(d?u:r),d&&(u=++o<e?l[o].data.x:window.NaN),p&&(r=++c<h?n[c].data.x:window.NaN)}for(;!(0,window.isNaN)(u);)a.push(u),u=++o<e?l[o].data.x:window.NaN;for(;!(0,window.isNaN)(r);)a.push(r),r=++c<h?n[c].data.x:window.NaN;for(t=2;t<s.length;t++){var g=[];for(l=a,n=s[t].data,e=l.length,h=n.length,c=o=0,u=o<e?l[o]:window.NaN,r=c<h?n[c].data.x:window.NaN;!(0,window.isNaN)(u)&&!(0,window.isNaN)(r);)d=u<=r,p=u>=r,g.push(d?u:r),d&&(u=++o<e?l[o]:window.NaN),p&&(r=++c<h?n[c].data.x:window.NaN);for(;!(0,window.isNaN)(u);)g.push(u),u=++o<e?l[o]:window.NaN;for(;!(0,window.isNaN)(r);)g.push(r),r=++c<h?n[c].data.x:window.NaN;a=g}for(t=0;t<s.length;t++)if((e=(l=(n=s[t]).data).length)<a.length){for(c=[],u=(h=l[o=0])?h.data.x:window.NaN,e=0;e<a.length;e++)u<=(r=a[e])?(c.push(h),u=(h=l[++o])?h.data.x:window.NaN):c.push(zB(r));n.data=c}}if(a=Uca(s),t=!$.Jc(a),n=s[0],i.Of())if($.J(i,$.Qt))this.UR(i,s,t,a);else if(n.data.length){if(t)for(t=0;t<n.data.length;t++)t in a||i.Xc(n.data[t].data.x);else i.Xc(n.data[0].data.x,n.data[n.data.length-1].data.x);if(hB(n.X))if(n.XU)for(a=n.X.Ec();a.advance();)Uz(a.j("missing"),TG)||(l=n.X.error().vs(!0),t=a.get("x"),i.Xc(t-l[0],t+l[1]));else bB(n.X.error())&&((a=n.X.Ec()).select(0),l=n.X.error().vs(!0),t=a.get("x"),i.Xc(t-l[0],t+l[1]),a.select(n.data.length-1),l=n.X.error().vs(!0),t=a.get("x"),i.Xc(t-l[0],t+l[1]))}$.J(i,$.Qt)&&this.DT(i,s)}for(v in this.bS(),this.mm)(i=this.mm[v]).Of()&&i.Hg();$.Jc(this.mm)&&this.Ra().Of()&&(this.Ra().Bg(),this.Ra().Hg()),this.I(65536)}if(this.KR(),this.J(262144)){var f;for(f in this.FD=!1,this.pn)(t=this.pn[f]).Of()&&t.Bg();for(var m in this.kA){var v=this.xn[m];for(i=this.mm[m],$.J(i,$.Qt)?(i=v[0].data.length,s=this.r2(),t=this.q2(),i=[$.Za(Math.floor(s*i-1),0,i-1),$.Za(Math.ceil(t*i+1),0,i-1),$.Za(Math.floor(s*i+.5),0,i-1),$.Za(Math.floor(t*i-.5),0,i-1)]):i=Vca(v,i),i=(n=i)[0],s=n[1],t=n[2],n=n[3],a=0;a<v.length;a++)r=(l=v[a]).data,l.X.check($.dB)&&l.cO!==r.length&&(o=s,u=r[l=i],e=r[o],u.j.missing&&u.j.notMissingStart&&(r=u.j.notMissingStartIndex,l=(0,window.isNaN)(r)?l:r),!u.j.missing&&u.j.hasPreviousMissingFromStart&&(r=u.j.notMissingStartIndexForPreviousMissing,l=Math.min(l,(0,window.isNaN)(r)?l:r)),e.j.missing&&e.j.notMissingEnd&&(r=e.j.notMissingEndIndex,o=(0,window.isNaN)(r)?o:r),!e.j.missing&&e.j.hasPreviousMissingFromEnd&&(r=u.j.notMissingEndIndexForPreviousMissing,o=Math.max(o,(0,window.isNaN)(r)?o:r)),o=(l=[l,o])[1],i=Math.min(i,l[0]),s=Math.max(s,o));for(var b in v=(t=[i,s,t,n])[0],i=t[1],s=t[2],l=t[3],a=this.kA[m]){if(n=a[b],t=this.pn[b],u=this.uH(t),r="direct"==(r=this.bb().kx()),h="percent"==u,o="none"!=u){var y=[];for(p=v;p<=i;p++)y.push({Sw:0,Cp:0,Iw:0,Rw:0,zp:0,Hw:0,pE:!1,cE:!1,Rs:!1,PE:{jB:window.NaN,dB:window.NaN,dN:!1,i1:!1}})}for(u=0;u<n.length;u++)if(d=(e=n[r?n.length-u-1:u]).X,e.rj=v,e.lastIndex=i,e.zJ=o&&d.EP(),e.uu=window.Infinity,e.tu=-window.Infinity,this.FD=this.FD||e.zJ,c=e.data,e.zJ||h)for(p=v;p<=i;p++){g=c[p];var S=y[p-v];g.j.shared=S.PE,g.j.stackedMissing=S.Rs,Uz(g.j.missing,TG)?S.Rs=!0:(d=this.mU(g),p>=s&&p<=l&&(e.uu>d&&(e.uu=d),e.tu<d&&(e.tu=d)),0<=d?(g.j.stackedZero=S.Cp,S.Cp+=d,g.j.stackedValue=S.Cp,h||(S.pE?(g.j.stackedZeroPrev=S.Sw,g.j.stackedValuePrev=S.Sw+d):g.j.stackedZeroPrev=g.j.stackedValuePrev=window.NaN,S.cE?(g.j.stackedZeroNext=S.Iw,g.j.stackedValueNext=S.Iw+d):g.j.stackedZeroNext=g.j.stackedValueNext=window.NaN)):(g.j.stackedZero=S.zp,S.zp+=d,g.j.stackedValue=S.zp,h||(S.pE?(g.j.stackedZeroPrev=S.Rw,g.j.stackedValuePrev=S.Rw+d):g.j.stackedZeroPrev=g.j.stackedValuePrev=window.NaN,S.cE?(g.j.stackedZeroNext=S.Hw,g.j.stackedValueNext=S.Hw+d):g.j.stackedZeroNext=g.j.stackedValueNext=window.NaN)),h||(this.ps(t,g.j.stackedValuePrev),this.ps(t,g.j.stackedValue),this.ps(t,g.j.stackedValueNext),(g=c[p-1])&&(Uz(g.j.missing,TG)?S.pE=!0:0<=d?S.Sw+=d:S.Rw+=d),(g=c[p+1])&&(Uz(g.j.missing,TG)?S.cE=!0:0<=d?S.Iw+=d:S.Hw+=d)),S.Rs=!1,S.PE.dN=S.PE.dN||!(!S.Cp&&!S.zp))}else{var x=d.Be();for(p=v;p<=i;p++)if((g=c[p])&&!Uz(g.j.missing,TG)){for(S=0;S<x.length;S++)this.ps(t,g.data[x[S]]);if(p>=s&&p<=l)for(S=0;S<x.length;S++)d=$.N(g.data[x[S]]),e.uu>d&&(e.uu=d),e.tu<d&&(e.tu=d)}if(e.X.check(256))for(p=v;p<=i;p++)if(d=(g=c[p]).data.outliers,!Uz(g.j.missing,TG)&&$.A(d))for(S=0;S<d.length;S++)this.ps(t,d[S]);if(hB(e.X)&&(bB(e.X.error())||e.Q2))for(c=e.X.Ec();c.advance();)Uz(c.j("missing"),TG)||(p=e.X.error().vs(!1),d=$.N(c.get("value")),this.ps(t,d-p[0]),this.ps(t,d+p[1]))}if(h)for(this.ps(t,0),u=0;u<n.length;u++)for(c=(e=n[u]).data,p=v;p<=i;p++)g=c[p],S=y[p-v],Uz(g.j.missing,TG)?(g.j.stackedPositiveZero=g.j.stackedPositiveZero/S.Cp*100||0,g.j.stackedNegativeZero=g.j.stackedNegativeZero/S.zp*100||0):(0<=(d=g.j.stackedValue)?(r=S.Cp,d&&this.ps(t,100)):(r=-S.zp,this.ps(t,-100)),g.j.stackedZero=g.j.stackedZero/r*100||0,g.j.stackedValue=g.j.stackedValue/r*100||0);o&&this.P4(n,v,i,t)}}for(f in this.cS(),this.pn)(t=this.pn[f]).Of()&&t.Hg();$.Jc(this.pn)&&this.bb().Of()&&(this.bb().Bg(),this.bb().Hg()),this.B(1572864),this.I(262144)}this.LR()}else this.eS(),this.Q_();this.da(!1)},$.g.Q_=function(){},$.g.UR=function(t,e,i,n){if(e=e[0],i){var s={},a=[];for(i=0;i<e.data.length;i++)if(!(i in n)){var o=e.data[i].data.x;s[$.qo(o)]=a.length,a.push(o)}}else s=e.Lp,a=e.qt;t.XB=s,t.ih=a},$.g.DT=function(t,e){var i,n,s,a=$.Tt(t);if(a){var o=e[0].qt.length,r=Array(o);for(i=0;i<e.length;i++){var l=e[i].data;if(0<o)for(n=0;n<l.length;n++)!$.p(r[n])&&$.p(s=l[n].data[a])&&(r[n]=s,o--)}t.Ok=r}},$.g.PM=function(){var t=this.Ra(),e={};if(t.Of())for(t=0;t<this.hb.length;t++){var i=this.hb[t];if(i&&i.enabled()){var n=$.oa(i.Ra());e[n]||(e[n]={qt:[],Lp:{}});var s=e[n].qt;if(n=e[n].Lp,i=i.data())for(i=i.$();i.advance();){var a=i.get("x"),o=$.qo(a);o in n||(n[o]=s.length,s.push(a))}}}else e[$.oa(t)]={qt:t.values(),Lp:t.XB};return e},$.g.CS=function(){for(var t=[],e=0;e<this.hb.length;e++){var i=this.hb[e];if(i&&i.enabled()){var n=i.Ra();if($.J(n,$.Qt)){var s=this.PM(),a=$.oa(i.Ra());i=$.AB(i,s[a].Lp,s[a].qt,!n.Of())}else i=$.yB(i,!0,$.J(n,$.nt));t.push(i)}}return t},$.g.uH=function(t){return t.jn()},$.g.ps=function(t,e){t.Xc(e)},$.g.mU=function(t){return+t.data.value},$.g.P4=function(){},$.g.eS=function(){if(this.J(327680)){$.xr(this.hb);var t,e,i,n=this.hb.length;for(e in this.Re.length=0,this.xn={},this.mm){var s=this.mm[e];s.Of()&&s.Bg()}for(e in this.pn){var a=this.pn[e];a.Of()&&a.Bg()}for(t=0;t<n;t++)if((i=this.hb[t])&&i.enabled()){s=i.Ra(),a=i.bb();var o=$.J(s,$.Qt)?$.AB(i,{},[],!1,!0):$.yB(i,!1,$.J(s,$.nt));o.uu=window.Infinity,o.tu=-window.Infinity;var r=(i=o.X).vm||[];if(r.length)for(e=0;e<r.length;e++){var l=o.data[r[e]].j;l.missing=(Number(l.missing)||0)|(Number(Tz)||0)}for(e=hB(i)&&(o.XU||bB(o.X.error())),r=i.Ec(),l=i.Be();r.advance();)if(!Uz(r.j("missing"),TG))if(i=r.get("x"),s.Xc(i),e){var h=o.X.error().vs(!0);i=$.N(i),s.Xc(i-h[0],i+h[1]),h=o.X.error().vs(!1),i=$.N(r.get("value")),a.Xc(i-h[0],i+h[1]),o.uu>i&&(o.uu=i),o.tu<i&&(o.tu=i)}else for(h=0;h<l.length;h++)i=r.get(l[h]),a.Xc(i),i=$.N(i),(0,window.isNaN)(i)||(o.uu>i&&(o.uu=i),o.tu<i&&(o.tu=i));o.rj=0,o.lastIndex=o.data.length,e=$.oa(s),(s=this.xn[e])||(this.xn[e]=s=[]),s.push(o),this.Re.push(o)}for(e in this.bS(),this.cS(),this.mm)(s=this.mm[e]).Of()&&s.Hg();for(e in this.pn)(a=this.pn[e]).Of()&&a.Hg();this.B(1572864),$.zr(this.hb),this.I(327680)}},$.g.bS=function(){},$.g.cS=function(){},$.g.vy=function(){return this.pb(),Vz(this.mm)},$.g.xy=function(){return this.pb(),Vz(this.pn)},$.g.co=function(){if(this.J(524288)){this.hJ();var t,e=0,i=0,n=-window.Infinity,s=window.Infinity,a=-window.Infinity,o=window.Infinity,r=0,l=-window.Infinity,h=window.Infinity,c=-window.Infinity,u=window.Infinity,d=0,p=-window.Infinity,g=window.Infinity,f=!1;for(t in this.xn){var m=this.xn[t];if(this.So)for(var v=m[0].data.length,b=Array(v),y=0;y<v;y++)b[y]=[];for(var S,x,w,C,T=0;T<m.length;T++)if((x=(S=m[T]).X)&&x.enabled()){var D=x.name(),k=[],O=[],P=[];w=x.check($.fm|$.UG),(C=x.Ak())&&(f=!0);var L=0,I=window.Infinity,A=-window.Infinity,E=0,G=window.Infinity,U=-window.Infinity,F=window.Infinity,M=-window.Infinity,_=0,N=window.Infinity,R=-window.Infinity,j=0;for(y=0;y<S.data.length;y++){var B=S.data[y];if(Uz(B.j.missing,BB)||L++,!Uz(B.j.missing,TG)){if(w){var H=$.N(B.data.open);(0,window.isNaN)(H)||(A=Math.max(H,A),I=Math.min(H,I)),H=$.N(B.data.close),(0,window.isNaN)(H)||(A=Math.max(H,A),I=Math.min(H,I)),H=$.N(B.data.high);var z=$.N(B.data.low);A=Math.max(H,z,A),I=Math.min(H,z,I),H-=z,U=Math.max(H,U),G=Math.min(H,G)}else C&&(H=$.N(B.data.size),R=Math.max(H,R),N=Math.min(H,N),j+=H,P.push(H)),H="heat-map"==this.Ma()?"heat":"value",H=$.N(B.data[H]),A=Math.max(H,A),I=Math.min(H,I);E+=H,k.push(H),this.So?b[y].push(H):(H=$.N(B.data.x),M=Math.max(H,M),F=Math.min(H,F),_+=H,O.push(H))}}if(e+=L,i+=E,A>n){n=A;var V=D}if(I<s){s=I;var q=D}if(E>a){a=E;var W=D}if(E<o){o=E;var Y=D}if(r+=_,M>l){l=M;var K=D}if(F<h){h=F;var X=D}if(_>c){c=_;var J=D}if(_<u){u=_;var Z=D}y=L?E/L:0,x.La("seriesSum",E),x.La("seriesMin",I),x.La("seriesMax",A),x.La("seriesAverage",y),x.La("seriesPointsCount",L),x.La("seriesPointCount",L),x.La("sum",E),x.La("max",A),x.La("min",I),x.La("average",y),x.La("pointsCount",L),w?(x.La("seriesYRangeMax",U),x.La("seriesYRangeMin",G),x.La("seriesYRangeSum",E),x.La("seriesYRangeAverage",y),x.La("seriesYRangeMode",$m(k)),x.La("seriesYRangeMedian",Zm(k))):(C&&(x.La("seriesBubbleMaxSize",R),x.La("seriesBubbleMinSize",N),x.La("seriesBubbleSizeSum",j),x.La("seriesBubbleSizeAverage",L?j/L:0),x.La("seriesBubbleSizeMode",$m(P)),x.La("seriesBubbleSizeMedian",Zm(P)),d+=j,p=Math.max(p,R),g=Math.min(g,N)),x.La("seriesYMax",A),x.La("seriesYMin",I),x.La("seriesYSum",E),x.La("seriesFirstYValue",k[0]),x.La("seriesLastYValue",k[k.length-1]),x.La("seriesYAverage",y),x.La("seriesYMode",$m(k)),x.La("seriesYMedian",Zm(k))),this.So||(x.La("seriesXMax",M),x.La("seriesXMin",F),x.La("seriesXSum",_),x.La("seriesFirstXValue",O[0]),x.La("seriesLastXValue",O[k.length-1]),x.La("seriesXAverage",L?_/L:0),x.La("seriesXMode",$m(O)),x.La("seriesXMedian",Zm(O)))}if(this.So){for(C=Array(v),k=Array(v),O=Array(v),P=Array(v),L=Array(v),I=Array(v),y=0;y<v;y++){for(x=b[y],w=0,T=window.Infinity,S=-window.Infinity,A=0;A<x.length;A++)w+=E=x[A],T=Math.min(T,E),S=Math.max(S,E);C[y]=w,k[y]=T,O[y]=S,P[y]=w/x.length,L[y]=Zm(x),I[y]=$m(x)}for(T=0;T<m.length;T++)(x=(S=m[T]).X)&&x.enabled()&&((w=x.check($.fm|$.UG))?(x.La("catYRangeSumArr_",C),x.La("catYRangeMinArr_",k),x.La("catYRangeMaxArr_",O),x.La("catYRangeAvgArr_",P),x.La("catYRangeMedianArr_",L),x.La("catYRangeModeArr_",I)):(x.La("catYSumArr_",C),x.La("catYMinArr_",k),x.La("catYMaxArr_",O),x.La("catYAvgArr_",P),x.La("catYMedianArr_",L),x.La("catYModeArr_",I)))}}this.La("dataPlotYSum",i),this.La("dataPlotYRangeSum",i),this.La("dataPlotYMax",n),this.La("dataPlotYRangeMax",n),this.La("dataPlotYMin",s),this.La("dataPlotYRangeMin",s),this.La("dataPlotYAverage",e?i/e:0),this.La("dataPlotSeriesCount",this.Re.length),this.La("dataPlotPointCount",e),this.La("dataPlotMaxYValuePointSeriesName",V),this.La("dataPlotMinYValuePointSeriesName",q),this.La("dataPlotMaxYSumSeriesName",W),this.La("dataPlotMinYSumSeriesName",Y),f&&(this.La("dataPlotBubbleSizeSum",d),this.La("dataPlotBubbleMinSize",g),this.La("dataPlotBubbleMaxSize",p),this.La("dataPlotBubbleSizeAverage",e?d/e:0)),this.So||(this.La("dataPlotXSum",r),this.La("dataPlotXMax",l),this.La("dataPlotXMin",h),this.La("dataPlotXAverage",e?r/e:0),this.La("dataPlotMaxXValuePointSeriesName",K),this.La("dataPlotMinXValuePointSeriesName",X),this.La("dataPlotMaxXSumSeriesName",J),this.La("dataPlotMinXSumSeriesName",Z)),this.I(524288)}if(this.J(1048576)){for(e=this.vy(),i=this.xy(),s=0;s<e.length;s++)if(n=e[s],$.J(n,$.kt))if($.p(Q))var Q=Math.min(n.uh(),Q),tt=Math.max(n.di(),tt);else Q=n.uh(),tt=n.di();for(s=0;s<i.length;s++)if(n=i[s],$.J(n,$.kt))if($.p(et))var et=Math.min(n.uh(),et),it=Math.max(n.di(),it);else et=n.uh(),it=n.di();this.La("xScalesMin",Q),this.La("xScalesMax",tt),this.La("yScalesMin",et),this.La("yScalesMax",it),this.I(1048576)}(Q=this.La("chartElements")||{}).series=this.hb.length,this.La("chartElements",Q)},$.g.r2=function(){return 0},$.g.q2=function(){return 1},$.g.aX=function(){},$.g.KR=function(){},$.g.LR=function(){},$.g.eT=function(){var t,e,i;if(this.So)for(e in this.xn)if($.J(this.mm[e],$.Qt)||$.J(this.mm[e],$.nt)){var n=this.xn[e],s=i=0,a={},o={};for(t=0;t<n.length;t++){var r=n[t].X,l=r.bb(),h=$.oa(l);r.check(262144)&&(r.g("isVertical")?"none"==this.uH(l)?s++:h in o||(s++,o[h]=!0):"none"==this.uH(l)?i++:h in a||(i++,a[h]=!0))}this.SL(i,n,!0),this.SL(s,n,!1)}},$.g.SL=function(t,e,i){var n=this.g("barsPadding"),s=this.g("barGroupsPadding");if(0<t)for(var a=(t=1/(t+(t-1)*n+s))*s/2,o={},r=0;r<e.length;r++)if((s=e[r].X).check(262144)&&i^s.g("isVertical")){var l=s.bb();"none"==this.uH(l)?($.jB(s,a+t/2),$.iB(s,t),a+=t*(1+n)):(l=$.oa(l))in o?($.jB(s,o[l]+t/2),$.iB(s,t)):($.jB(s,a+t/2),$.iB(s,t),o[l]=a,a+=t*(1+n))}},$.g.UL=function(){var t=$.wr(this,"animation");if(t&&t.g("enabled")&&0<t.g("duration"))if(this.Og&&1==this.Og.dc)this.Og.update();else if(this.J(2048)){$.qd(this.Og),this.Og=new Dz,t=t.g("duration");for(var e=0;e<this.hb.length;e++){var i=this.hb[e];if(i.enabled()&&null==i.hi().g("point")){var n=MG[i.re];n&&this.Og.add(new n(i,t))}}this.Og.wa("begin",(function(){$.vx(this,!0),$.Dp(this,{type:"animationstart",chart:this})}),!1,this),this.Og.wa("end",(function(){$.vx(this,!1),$.Dp(this,{type:"animationend",chart:this})}),!1,this),this.Og.play(!1)}},$.g.jx=function(t,e,i){e={},$.Sc(e,$.Sl(i?VG["chart-with-series-point"]:VG["chart-with-series-default"]),$.Sl($.mG["select-marquee"]),t);var n=this.FM();if((t=e["exclude-points-list"]).subMenu={},t.enabled=!1,n.length){i={};for(var s,a=0;a<n.length;a++){var o;o="candlestick"==(s=n[a].ef().kk())||"ohlc"==s?"o - "+n[a].get("open")+", h - "+n[a].get("high")+", l - "+n[a].get("low")+", c - "+n[a].get("close"):"box"==s||"range-area"==s||"range-bar"==s||"range-column"==s||"range-spline-area"==s||"range-step-area"==s?"high - "+n[a].get("high")+", low - "+n[a].get("low"):"bubble"==s?"x - "+n[a].get("x")+", y - "+n[a].get("value")+", size - "+n[a].get("size"):n[a].get("value"),i["exclude-points-point-"+a]={index:10.01,text:n[a].ef().name()+": "+o,eventType:"anychart.include",scrollable:!0,action:(0,$.pa)(n[a].ef().lV,n[a].ef(),n[a].ma())}}i["excluded-points-separator"]={index:10.01+10},(o=$.Sl(WG["exclude-points-include-all"])).index=10.01+20,i["exclude-points-include-all"]=o,t.subMenu=i,t.enabled=!0}return e},$.g.FM=function(){return(0,$.Gg)((0,$.Wa)(this.hb,(function(t){return t.FM()})),(function(t,e){return daa(t,e)}),[])};var WG={"exclude-points-point":{index:7,text:"Exclude",eventType:"anychart.exclude",action:function(t){t.menuParent.ka();for(var e,i=t.selectedPoints,n=0;n<i.length;n++)e=i[n],$.D(e.ef)&&e.ef().v1(e.ma());t.menuParent.da(!0)}},"exclude-points-list":{index:8,text:"Include",subMenu:[],enabled:!1},"exclude-points-keep-only":{index:9,text:"Keep only",eventType:"anychart.keepOnly",action:function(t){t.menuParent.ka();var e,i,n=t.menuParent.Ue();for(i=0;i<n.length;i++)if((e=n[i])&&e.state){var s=$.sx(e.state,$.wo);e.t3(s)}t.menuParent.da(!0)}},"exclude-points-include-all":{index:30,text:"Include all",eventType:"anychart.includeAll",action:function(t){t.menuParent.ka();var e,i=t.menuParent.Ue();for(e=0;e<i.length;e++){var n=i[e];$.D(n.kV)&&n.kV()}t.menuParent.da(!0)}}},VG={"chart-with-series-default":{"exclude-points-list":WG["exclude-points-list"],"exclude-points-separator":{index:8.5}},"chart-with-series-point":{"exclude-points-point":WG["exclude-points-point"],"exclude-points-list":WG["exclude-points-list"],"exclude-points-keep-only":WG["exclude-points-keep-only"],"chart-with-series-point-separator":{index:9.2}}};$.g=$.Qz.prototype,$.g.qU=function(){return this.hb},$.g.oq=function(t){var e=this.fc||$.kn(0,0,0,0),i=t.clientX,n=t.clientY,s=$.Zj(this.O().Ja());t=i-s.x,s=n-s.y;var a=e.left,o=e.top,r=e.width,l=e.height;if(t<a||t>a+r||s<o||s>o+l)return null;e=[];var h=this.gd();if("by-spot"==h.g("hoverMode")){for(i=h.g("spotRadius"),this.Ks?(n=(l-(s-i-o))/l,a=(l-(s+i-o))/l,o=t,t=s,s=o):(n=(t-i-a)/r,a=(t+i-a)/r),o=0,r=this.hb.length;o<r;o++)if((l=this.hb[o])&&l.enabled()){h=l.Ra().Mc(n);var c=l.Ra().Mc(a),u=this.So?l.qM(h,c):l.data().qM(h,c);c=l.Ec();for(var d,p=[],g=window.Infinity,f=0;f<u.length;f++)if(h=u[f],c.select(h)&&!c.j("missing")){for(var m=c.j("x"),v=!1,b=l.Be(),y=0;y<b.length;y++){var S=c.j(b[y]);S=$.gn(m,S,t,s),v=v||S<=i,S<g&&(g=S,d=h)}v&&p.push(h)}p.length&&e.push({X:l,vd:p,Ln:p[p.length-1],De:{index:d,Tf:g}})}}else"by-x"==this.gd().g("hoverMode")&&(e=Xz(this,i,n));return e},$.g.kO=function(){},$.g.aA=function(t,e,i,n,s,a,o){for(t=$.Qz.u.aA.call(this,t,e,i,n,s,a,o),n=!0,s=[],e=0;e<this.hb.length;e++){var r=this.hb[e];i=r.enabled()?$.CB(r,t.left,t.top,t.width,t.height):[],a=(0,$.lD)(i,(function(t){return $.nx(r.state,t)>=$.wo})),n=n&&a,s.push({series:r,pointsInRect:i,allPointsAreSelected:a})}return t.seriesStatus=s,t.allPointsAreSelected=n,t},$.g.$O=function(t){var e=t.shiftKey||t.ctrlKey||t.metaKey,i=t.seriesStatus;if(e&&t.allPointsAreSelected)for(t=0;t<i.length;t++)i[t].series.ie(i[t].pointsInRect);else for(t=0;t<i.length;t++)$.EB(i[t].series,i[t].pointsInRect,e)},$.g.nD=function(t,e,i,n,s,a,o){return this.So?$.Qz.u.nD.call(this,t,e,i,n,s,a,o):this.N1(t,e,i,n,s,a,o)},$.g.sA=function(){return["x"]},$.g.tA=function(t){return t.get("x")},$.g.rA=function(t){return t=t.get("name"),$.z(t)?t:null},$.g.bu=function(t){if(!this.ax||this.yX){var e,i=$.Sl(this.vf("scales"));if(t&&t.scales){for(var n=0;n<i.length;n++)t.scales[n]&&$.ra(i[n],t.scales[n]);t.scales.length>i.length&&(i=$.Ga(i,$.Ja(t.scales,i.length)))}if(n={},$.A(i))for(e=0;e<i.length;e++){var s=i[e];$.z(s)&&(s={type:s});var a=$.dt(s.type,!1);a.Ga(s),a.ticks&&(s=a.ticks().oa,$.ra(s,a.oa.ticks),a.oa.ticks=s),a.minorTicks&&(s=a.minorTicks().oa,$.ra(s,a.oa.minorTicks),a.oa.minorTicks=s),a.N(a.oa),n[e]=a}else if($.C(i))for(e in i)i.hasOwnProperty(e)&&(s=i[e],$.z(s)&&(s={type:s}),(a=$.dt(s.type,!1)).Ga(s),a.ticks&&(s=a.ticks().oa,$.ra(s,a.oa.ticks),a.oa.ticks=s),a.minorTicks&&(s=a.minorTicks().oa,$.ra(s,a.oa.minorTicks),a.oa.minorTicks=s),a.N(a.oa),n[e]=a);for(e=["xScale","yScale"],i=0;i<e.length;i++){var o=e[i];s=t?t[o]:this.vf(o),$.ea(s)||$.z(s)&&!(0,window.isNaN)(Number(s))?a=n[s]:$.z(s)?a=$.dt(s,null):$.C(s)?((a=s.type?$.dt(s.type,!0):this[o]()).Ga(s),a.ticks&&(s=a.ticks().oa,$.ra(s,a.oa.ticks),a.oa.ticks=s),a.minorTicks&&(s=a.minorTicks().oa,$.ra(s,a.oa.minorTicks),a.oa.minorTicks=s),a.N(a.oa)):a=null,a&&this[o](a)}this.ax=n,this.yX=!1}return this.ax},$.g.U=function(t,e){$.Qz.u.U.call(this,t,e),$.Iq(this,SG,t),(t.scales||t.xScale||t.yScale)&&(this.yX=!0);var i=this.bu(t);this.ht(t,i,e)},$.g.F=function(){var t=$.Qz.u.F.call(this),e={},i=[];return $.Tq(this,SG,t),$.Zz(t,"xScale",this.Ra(),i,e),$.Zz(t,"yScale",this.bb(),i,e),this.ft(t,i,e),t.scales=i,t},$.g.ht=function(t,e,i){this.kP(t,e,i)},$.g.ft=function(t,e,i){this.eP(t,e,i)},$.g.ML=function(){return 1},$.g.kP=function(t,e,i){var n=t.series;if($.A(n))for(t=0;t<n.length;t++){var s=n[t],a=s.seriesType||this.g("defaultSeriesType");(a=this.Ae(a,s.data))&&(a.ga(!!i,s),$.C(s)&&("xScale"in s&&s.xScale>this.ML()&&a.Ra(e[s.xScale]),"yScale"in s&&s.yScale>this.ML()&&a.bb(e[s.yScale])))}},$.g.eP=function(t,e,i){var n,s=[];for(n=0;n<this.hb.length;n++){var a=this.hb[n],o=a.F();$.Zz(o,"xScale",a.Ra(),e,i),$.Zz(o,"yScale",a.bb(),e,i),s.push(o)}s.length&&(t.series=s)},$.g.im=function(t,e,i,n){if($.A(t))for(var s=0;s<t.length;s++){var a=t[s],o=e.call(this,s);$.Jc(a)||(n?o.N(a):o.Ga(a),(a=$.C(a)&&"scale"in a?a.scale:o.vf("scale"))>this.ML()&&o.scale(i[a]))}},$.g.R=function(){$.qd(this.Og),$.Qz.u.R.call(this)},$.H($.$z,$.Ny);var XG={};$.sq(XG,[[1,"stroke",$.Pq],[0,"value",$.Cq]]),$.U($.$z,XG),$.g=$.$z.prototype,$.g.ra=$.Ny.prototype.ra,$.g.sa=$.Ny.prototype.sa,$.g.we=function(t){return $.p(t)?(t=$.Gk(t),this.f!=t&&(this.f=t,this.B(4,9)),this):this.f?this.f:this.axis()?"left"==(t=this.axis().orientation())||"right"==t?"horizontal":"vertical":this.G},$.g.scale=function(t){return this.Po(t)},$.g.fs=function(){this.lo()},$.g.kv=function(){$.Oy(this).stroke(this.g("stroke"))},$.g.R=function(){this.ta("stroke",null),$.$z.u.R.call(this)},$.g.F=function(){var t=$.$z.u.F.call(this);return $.Tq(this,XG,t),this.f&&(t.layout=this.f),t},$.g.U=function(t,e){$.$z.u.U.call(this,t,e),$.Iq(this,XG,t)},$.H(bA,$.$z),$.xu(bA,$.$z);var YG=$.$z.prototype;YG.scale=YG.scale,YG.axis=YG.axis,YG.layout=YG.we,YG.isHorizontal=YG.Nb,YG=bA.prototype,$.E("anychart.standalones.axisMarkers.line",(function(){return new bA})),YG.draw=YG.W,YG.parentBounds=YG.ja,YG.container=YG.O,$.H($.cA,$.Ny),$.ZG={},$.sq($.ZG,[[1,"fill",$.Qq],[0,"from",$.Cq],[0,"to",$.Cq]]),$.U($.cA,$.ZG),$.g=$.cA.prototype,$.g.kR=function(){return"From: "+this.g("from")+" to: "+this.g("to")},$.g.ra=$.Ny.prototype.ra,$.g.sa=$.Ny.prototype.sa,$.g.we=function(t){return $.p(t)?(t=$.Gk(t),this.f!=t&&(this.f=t,this.B(4,9)),this):this.f?this.f:this.axis()?"left"==(t=this.axis().orientation())||"right"==t?"horizontal":"vertical":this.G},$.g.scale=function(t){return this.Po(t)},$.g.xs=function(){return[this.g("from"),this.g("to")]},$.g.tK=function(){return $.p(void 0)&&($.p((void 0).from)&&this.from((void 0).from),$.p((void 0).to)&&this.to((void 0).to)),{from:this.g("from"),to:this.g("to")}},$.g.fs=function(){$.Py(this)},$.g.kv=function(){$.Oy(this).stroke(null).fill(this.g("fill"))},$.g.R=function(){this.ta("fill",null),$.cA.u.R.call(this)},$.g.F=function(){var t=$.cA.u.F.call(this);return $.Tq(this,$.ZG,t,void 0,void 0,!0),this.f&&(t.layout=this.f),t},$.g.U=function(t,e){$.cA.u.U.call(this,t,e),$.Iq(this,$.ZG,t)},$.H(eA,$.cA),$.xu(eA,$.cA);var $G=$.cA.prototype;$G.scale=$G.scale,$G.axis=$G.axis,$G.layout=$G.we,$G.isHorizontal=$G.Nb,$G=eA.prototype,$.E("anychart.standalones.axisMarkers.range",(function(){return new eA})),$G.draw=$G.W,$G.parentBounds=$G.ja,$G.container=$G.O,$.H($.fA,$.Zy);var aH={};$.sq(aH,[[0,"value",$.Cq]]),$.U($.fA,aH),$.g=$.fA.prototype,$.g.ra=$.Zy.prototype.ra,$.g.sa=$.Zy.prototype.sa,$.g.scale=function(t){return this.Po(t)},$.g.F=function(){var t=$.fA.u.F.call(this);return $.Tq(this,aH,t),t},$.g.U=function(t,e){$.fA.u.U.call(this,t,e),$.Iq(this,aH,t,e)},$.H(gA,$.fA),$.xu(gA,$.fA);var bH=$.fA.prototype;bH.scale=bH.scale,bH.axis=bH.axis,bH.layout=bH.we,bH.background=bH.background,bH.padding=bH.padding,bH.isHorizontal=bH.Nb,bH=gA.prototype,$.E("anychart.standalones.axisMarkers.text",(function(){return new gA})),bH.draw=bH.W,bH.parentBounds=bH.ja,bH.container=bH.O,$.H(hA,uv),hA.prototype.ra=2|uv.prototype.ra;var cH={};$.sq(cH,[[0,"format",$.ar],[0,"axisIndex",$.Cq]]),$.U(hA,cH),$.g=hA.prototype,$.g.Hf=function(t){return $.p(t)?(this.i!=t&&(this.i=t,this.B(16,1)),this):this.i},$.g.x=function(t){return $.p(t)&&this.No!=t&&(this.No=t,this.B(4,9)),this},$.g.y=function(t){return $.p(t)&&this.Oo!=t&&(this.Oo=t,this.B(4,9)),this},$.g.tf=function(){if(this.ja())var t=this.ja();else{t=new $.I(0,0,0,0);var e=this.xb.rb();t.width=this.padding().Lk(e.width),t.height=this.padding().$j(e.height)}e=t.width;var i=t.height;t=new $.I(0,0,this.Oi,this.Ni);var n=new $.gb(0,0);n.x=this.No,n.y=this.Oo;var s=this.vA(),a=$.Eo(new $.I(0,0,this.Oi,this.Ni),s);n.x-=a.x,n.y-=a.y,a=this.g("offsetX");var o=this.g("offsetY");return $.Yo(n,s,$.p(a)?$.L(a,e):0,$.p(o)?$.L(o,i):0),this.Lg+=n.x,this.Mg+=n.y,t.left=n.x,t.top=n.y,this.xb.x(this.Lg).y(this.Mg),(e=this.xb.clip())?e.shape(this.Lg,this.Mg,this.nn,this.ln):(e=$.tk(this.Lg,this.Mg,this.nn,this.ln),this.xb.clip(e)),t},$.g.F=function(){var t=hA.u.F.call(this);return $.Tq(this,cH,t,"Crosshair Label"),t},$.g.U=function(t,e){hA.u.U.call(this,t,e),$.Iq(this,cH,t,e)};var dH=hA.prototype;dH.background=dH.background,dH.padding=dH.padding,$.H($.iA,$.Y),$.iA.prototype.ra=2|$.Y.prototype.ra,$.iA.prototype.sa=16|$.Y.prototype.sa;var eH={};$.rq(eH,1,"xStroke",$.Pq),$.rq(eH,1,"yStroke",$.Pq),$.rq(eH,0,"displayMode",(function(t){return $.zk(Dda,t,"float")})),$.U($.iA,eH),$.g=$.iA.prototype,$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t},$.g.parent=function(t){if($.p(t)){if(this.Y!=t){var e=String($.oa(this));if(null===t){$.kr(this.Y,this.Tc,this),t=$.jA(this);var i=$.kA(this);for(t=$.Ga(t,i),i=0;i<t.length;i++){var n=t[i];n&&n.parent(null)}delete this.Y.nL[e],this.Y=null}else this.Y&&$.kr(this.Y,this.Tc,this),this.Y=t,lA(this,$.jA(this.Y),!0),lA(this,$.kA(this.Y),!1),this.Y.nL[e]=this,$.K(this.Y,this.Tc,this)}return this}return this.Y},$.g.Tc=function(t){var e=0,i=0;$.X(t,1)&&(e|=16,i|=1),$.X(t,8)&&(e|=4,i|=8),$.X(t,32768)&&(e|=1,i|=32769),this.Xb=null,this.B(e,i)},$.g.v3=function(t){$.X(t,2)&&this.va(2)},$.g.$h=function(t){return $.p(t)?(this.mc!=t&&(this.mc=t),this):this.mc},$.g.YB=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=$.jA(this),a=s[i];return a||((a=new hA).Ga("defaultFontSettings","defaultCrosshairLabel"),s[i]=a,mA(this,a,i,!0),$.K(a,this.v3,this),i=this.zIndex(),a.zh=i),$.p(n)?(a.N(n),this):a},$.g.ZB=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=$.kA(this),a=s[i];return a||((a=new hA).Ga("defaultFontSettings","defaultCrosshairLabel"),s[i]=a,mA(this,a,i,!1),$.K(a,this.v3,this),i=this.zIndex(),a.zh=i),$.p(n)?(a.N(n),this):a},$.g.W=function(){if(!this.zc())return this;var t=this.ja(),e=this.zIndex(),i=this.O();this.J(16)&&(this.Pr.stroke(this.g("xStroke")),this.Sr.stroke(this.g("yStroke")),this.I(16));var n,s=$.jA(this),a=$.kA(this);if(a=(s=$.Ga(s,a)).length,this.J(2)&&(this.Pr.parent(i),this.Sr.parent(i),$.oA(s,i),this.I(2)),this.J(8)){for(this.Pr.zIndex(e),this.Sr.zIndex(e),i=0;i<a;i++)(n=s[i])&&(n.zh=e);this.I(8)}return this.J(4)&&($.pA(s,t),this.I(4)),this},$.g.Lc=function(){this.$U(),this.aV()},$.g.$U=function(t){this.Pr.clear(),rA(this,t)},$.g.aV=function(t){if(this.Sr.clear(),$.p(t))t.O(null),t.remove();else{t=$.kA(this);for(var e=0;e<t.length;e++){var i=t[e];i&&(i.O(null),i.remove())}}},$.g.If=function(t){if(this.enabled()){var e=t.clientX,i=t.clientY,n=$.Zj(this.O().Ja());if(t=e-n.x,n=i-n.y,"sticky"==this.g("displayMode")&&(e=Xz(this.Yl,e,i))){i=window.Infinity;for(var s=0;s<e.length;s++){var a=e[s],o=a.De.Tf;if(o<i){i=o;var r=a.X,l=a.De.index}}(r=r.$()).select(l),l=$.N(r.j("x")),r=$.$o(r.j("value"),r.j("close"),r.j("high")),r=$.N(r),this.Yl.Ks?(n=l,(0,window.isNaN)(r)||(t=r)):(t=l,(0,window.isNaN)(r)||(n=r))}t>=(l=this.ja()).tb()&&t<=l.cb()&&n>=l.Vb()&&n<=l.Va()?(this.ka(),l=$.jA(this),r=$.kA(this),this.Kt(l,!0,t,n),this.Kt(r,!1,t,n),this.da(!0)):this.Lc()}},$.g.Zx=function(t,e,i,n){var s=e?this.Pr:this.Sr;if((e=this.g(e?"xStroke":"yStroke"))&&!$.cp(e)){var a=(e=this.ja()).cb()-e.tb(),o=e.Va()-e.Vb();i-=e.tb();var r,l=n-e.Vb();n=t.Nb(),t=t.scale(),i=n?i:l,a=n?a:o,o=n?e.tb():e.Vb(),0>(r="linear"==(l=t.Ma())||"datetime"==l||"log"==l?i/a:t.transform(t.Mc(i/a),.5))||1<r?s.clear():(t=o+r*a,a=s.gl(),n?(r=$.R(t,a),n=e.Vb(),t=r,e=e.Va()):(r=e.tb(),n=$.R(t,a),t=e.cb(),e=n),s.clear().moveTo(r,n).lineTo(t,e))}},$.g.ke=function(t,e,i,n,s,a){var o=$.jA(this),r=$.kA(this);if(i=e?o[i]:r[i],e?i.ph("enabled")&&i.Pa.enabled||i.enabled()&&this.SY:i.enabled()){e=(r=this.ja()).cb()-r.tb();var l=r.Va()-r.Vb();if(e=(o=t.Nb())?e:l,l=t.scale(),$.p(a)?s=a:(n-=r.tb(),s-=r.Vb(),s=(o?n:s)/e),0>(s=l.transform(l.Mc(s),.5))||1<s)i.O(null),i.remove();else{if(n=this.nq(t,o?s:1-s),a=i.g("format")||t.labels().g("format")||$.ep,$.z(a)&&(a=$.Nu($.Lu.Id(),a)),i.text(a.call(n,n)),i.qk($.nA(t)),a=this.ja(),n=o=0,t){var h=t.ob(),c=t.enabled();r=c?h.tb():a.cb(),l=c?h.Vb():a.Va();var u=c?h.cb():a.tb();switch(h=c?h.Va():a.Vb(),t.orientation()){case"left":o=this.bI(i)?u-1:u+1,n=Math.round(a.top+s*e);break;case"top":o=Math.round(a.left+s*e),n=sA(i)?h-1:h+1;break;case"right":o=this.bI(i)?r-1:r+1,n=Math.round(a.top+s*e);break;case"bottom":o=Math.round(a.left+s*e),n=sA(i)?l-1:l+1}t=o,e=n}else t=o,e=n;i.x(t).y(e),i.O(this.O()),i.W()}}},$.g.Kt=function(t,e,i,n,s,a){var o,r,l=$.qA(this);if($.p(s))for(o=0;o<t.length;o++)(r=t[o])&&(a||r.ph("enabled")&&r.Pa.enabled?this.ke(this.mc,e,o,i,n,s):rA(this,r));else for(s=e?l.uy:l.wy,o=0;o<t.length;o++)if(r=t[o])if(a=r.g("axisIndex"),(a=s.call(l,a))&&$.p(a.scale().Mc(0))){if(!h){this.Zx(a,e,i,n);var h=!0}this.ke(a,e,o,i,n)}else this.$U(r)},$.g.bI=function(t){return"left-top"==(t=t.vA())||"left-center"==t||"left-bottom"==t},$.g.nq=function(t,e){if(!t)return null;var i=t.scale(),n=i.Ma(),s=i.Mc(e),a="number";switch(n){case"linear":case"log":var o=i.CE(s);break;case"ordinal":o=String(s),a="string";break;case"stock-scatter-date-time":case"stock-ordinal-date-time":case"date-time":o=$.vs(s),a="string"}return $.ov(new $.Fw({value:{value:o,type:a},rawValue:{value:s,type:"number"},max:{value:$.p(i.max)?i.max:null,type:"number"},min:{value:$.p(i.min)?i.min:null,type:"number"},scale:{value:i,type:""},tickValue:{value:s,type:"number"}}))},$.g.hg=function(t){var e=this.ja(),i=t.offsetX;t=t.offsetY,(i<=e.tb()||i>=e.cb()||t<=e.Vb()||t>=e.Va())&&this.Lc()},$.g.remove=function(){this.Lc()},$.g.R=function(){this.Yl&&(this.Yl.gc("mouseover",this.If,!1,this),this.Yl.gc("mousemove",this.If,!1,this),this.Yl.gc("mouseout",this.hg,!1,this),this.Yl=null),$.sd(this.Pr,this.Sr,this.hQ,this.kQ),this.Pr=this.Sr=this.hQ=this.kQ=null,$.iA.u.R.call(this)},$.g.enabled=function(t){return $.p(t)?(this.Pa.enabled!=t&&(this.Pa.enabled=t,this.B(1,32777),this.Pa.enabled?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},$.g.F=function(){var t,e=$.iA.u.F.call(this);$.Tq(this,eH,e,"Crosshair");var i=[],n=$.jA(this),s=$.kA(this);for(t=0;t<n.length;t++)n[t]&&i.push(n[t].F());for(0<i.length&&(e.xLabels=i),i=[],t=0;t<s.length;t++)s[t]&&i.push(s[t].F());return 0<i.length&&(e.yLabels=i),e},$.g.U=function(t,e){var i;$.iA.u.U.call(this,t,e),$.Iq(this,eH,t,e);var n=t.xLabels;if($.A(n))for(i=0;i<n.length;i++)this.YB(i,n[i]);else"xLabel"in t&&this.YB(0,t.xLabel);if(n=t.yLabels,$.A(n))for(i=0;i<n.length;i++)this.ZB(i,n[i]);else"yLabel"in t&&this.ZB(0,t.yLabel)};var fH=$.iA.prototype;fH.xLabel=fH.YB,fH.yLabel=fH.ZB,$.H(tA,$.V);var eea=tA.prototype,gH={};$.rq(gH,1,"stroke",$.Pq),eea.uR=gH,$.U(tA,tA.prototype.uR),$.g=tA.prototype,$.g.sa=$.V.prototype.sa,$.g.ra=1|$.V.prototype.ra,$.g.F=function(){var t=tA.u.F.call(this);return $.Tq(this,this.uR,t),t},$.g.U=function(t,e){tA.u.U.call(this,t,e),$.Iq(this,this.uR,t,e)},$.g.R=function(){this.i=null,tA.u.R.call(this)},$.H(uA,$.yu),$.g=uA.prototype,$.g.sa=384|$.yu.prototype.sa,$.g.title=function(t){return this.jb||(this.jb=new $.aw,this.jb.kb(this),$.K(this.jb,this.Mq,this),$.W(this,"title",this.jb)),$.p(t)?(this.jb.N(t),this):this.jb},$.g.Mq=function(t){var e=0,i=0;$.X(t,1)&&(e|=128,i|=1),$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.margin=function(t,e,i,n){return this.Qc||(this.Qc=new $.Mv,$.K(this.Qc,this.$A,this),$.W(this,"margin",this.Qc)),$.p(t)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},$.g.$A=function(t){$.X(t,2)&&this.B(4,9)},$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(t){$.X(t,2)&&this.B(4,9)},$.g.label=function(t,e){if($.ea(t)||$.z(t)&&!(0,window.isNaN)(+t))var i=+t,n=e;else i=0,n=t;var s=this.Da[i];return s||((s=new $.xv).kb(this),s.Ga("defaultFontSettings","defaultLabelSettings","chart.defaultQuarterSettings.defaultLabelSettings"),this.Da[i]=s,$.K(s,this.Naa,this),this.B(256,1)),$.p(n)?(s.N(n),this):s},$.g.Naa=function(){this.B(256,1)},$.g.YT=function(){return this.margin().Ej(this.ob())},$.g.W=function(){if(!this.zc())return this;if(this.J(4)&&this.B(384),uA.u.W.call(this),this.J(128)){var t=$.wr(this,"title");t&&(t.ka(),t.O(this.Na),t.zIndex(10),t.ja(this.ob()),t.da(!1),t.W()),this.I(128)}if(this.J(256)){t=this.YT();for(var e=0,i=this.Da.length;e<i;e++){var n=this.Da[e];n&&(n.ka(),n.O(this.Na),n.ja(this.padding().Ej(t)),n.zIndex(20),n.da(!1),n.W())}this.I(256)}return this},$.g.F=function(){var t=uA.u.F.call(this),e=$.wr(this,"title");e&&(t.title=e.F()),t.margin=this.margin().F(),t.padding=this.padding().F(),e=[];for(var i=0;i<this.Da.length;i++)this.Da[i]&&e.push(this.Da[i].F());return 0<e.length&&(t.labels=e),t},$.g.U=function(t,e){uA.u.U.call(this,t,e),"title"in t&&this.title().ga(!!e,t.title),"padding"in t&&this.padding().ga(!!e,t.padding),"margin"in t&&this.margin().ga(!!e,t.margin);var i=t.labels;if($.A(i))for(var n=0;n<i.length;n++)this.label(n,i[n])},$.g.R=function(){$.sd(this.jb,this.Qc,this.Wa,this.Da),this.Da=this.Wa=this.Qc=this.jb=null,uA.u.R.call(this)};var hH=uA.prototype;hH.title=hH.title,hH.margin=hH.margin,hH.padding=hH.padding,hH.label=hH.label,$.H(vA,$.V),$.g=vA.prototype,$.g.zm=function(){return this.o||$.wr(this,"rightTop"),this.b||$.wr(this,"leftBottom"),this.i||$.wr(this,"rightBottom"),this.f||$.wr(this,"leftTop"),this.D},$.g.t5=function(t){return this.o||(this.o=new uA,$.K(this.o,this.pa.GO,this.pa),this.D[0]=this.o,$.W(this,"rightTop",this.o)),$.p(t)?(this.o.N(t),this):this.o},$.g.G3=function(t){return this.f||(this.f=new uA,$.K(this.f,this.pa.GO,this.pa),this.D[1]=this.f,$.W(this,"leftTop",this.f)),$.p(t)?(this.f.N(t),this):this.f},$.g.E3=function(t){return this.b||(this.b=new uA,$.K(this.b,this.pa.GO,this.pa),this.D[2]=this.b,$.W(this,"leftBottom",this.b)),$.p(t)?(this.b.N(t),this):this.b},$.g.s5=function(t){return this.i||(this.i=new uA,$.K(this.i,this.pa.GO,this.pa),this.D[3]=this.i,$.W(this,"rightBottom",this.i)),$.p(t)?(this.i.N(t),this):this.i},$.g.F=function(){var t=vA.u.F.call(this);return this.o&&(t.rightTop=this.o.F()),this.f&&(t.leftTop=this.f.F()),this.b&&(t.leftBottom=this.b.F()),this.i&&(t.rightBottom=this.i.F()),t},$.g.U=function(t){vA.u.U.call(this,t),this.t5(t.rightTop),this.G3(t.leftTop),this.E3(t.leftBottom),this.s5(t.rightBottom)},$.g.R=function(){$.sd(this.o,this.f,this.b,this.i),this.i=this.b=this.f=this.o=null,this.D.length=0,vA.u.R.call(this)};var iH=vA.prototype;iH.rightTop=iH.t5,iH.leftTop=iH.G3,iH.leftBottom=iH.E3,iH.rightBottom=iH.s5,$.H($.wA,$.Qz),$.g=$.wA.prototype,$.g.sa=266338304|$.Qz.prototype.sa,$.g.xa=function(t){if($.p(t)){if(t=!!t,!!this.Ks!=t){for(this.Ks=t,t=this.hb.length;t--;)this.hb[t].isVertical(this.Ks);var e=$.Ga(this.b,this.qf);for($.xr(e),t=e.length;t--;){var i=e[t];if(i){switch(i.g("orientation")){case"bottom":var n="left";break;case"top":n="right";break;case"left":n="bottom";break;case"right":n="top"}i.orientation(n)}}for(i=$.Ga(this.Yg,this.Zg,this.jh,this.kh,this.og,this.rg,this.tg),$.xr(i),t=i.length;t--;){var s=i[t];s&&(n="horizontal"==s.we()?"vertical":"horizontal",s.we(n))}$.yr(e,i)}return this}return this.Ks=$.p(this.Ks)?this.Ks:!!this.g("isVertical")},$.g.MA=function(){this.aa&&this.Nk().MA()},$.g.co=function(){if(this.J(524288)){$.wA.u.co.call(this);var t=this.La("chartElements");t.axes={x:0,y:0},t.grids={x:0,y:0,xMinor:0,yMinor:0};for(var e=Math.max(this.b.length,this.qf.length,this.Yg.length,this.Zg.length,this.jh.length,this.kh.length);e--;)this.b[e]&&t.axes.x++,this.qf[e]&&t.axes.y++,this.Yg[e]&&t.grids.x++,this.Zg[e]&&t.grids.y++,this.jh[e]&&t.grids.xMinor++,this.kh[e]&&t.grids.yMinor++;this.La("chartElements",t)}},$.g.pta=function(t){return $.p(t)?(this.yg=t,this):this.yg||{}},$.g.qta=function(t){return $.p(t)?(this.zG=t,this):this.zG||{}},$.g.fA=function(t){return this.aq||(this.aq=$.zm("defaultGridSettings")),$.p(t)?(this.aq=t,this):this.aq||{}},$.g.gA=function(t){return this.bq||(this.bq=$.zm("defaultMinorGridSettings")),$.p(t)?(this.bq=t,this):this.bq||{}},$.g.DF=function(){return new pz},$.g.ip=function(t){return(t?this.fA():this.gA()).zIndex+.001*$.Ga(this.Yg,this.Zg,this.jh,this.kh).length},$.g.lm=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.Yg[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"horizontal":"vertical"),s.zIndex(this.ip(!0)),this.Yg[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.nm=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.Zg[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"vertical":"horizontal"),s.zIndex(this.ip(!0)),this.Zg[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.Qr=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.jh[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"horizontal":"vertical"),s.Ga("defaultMinorGridSettings"),s.zIndex(this.ip(!1)),this.jh[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.Tr=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.kh[i];return s||((s=this.DF()).Xj=this,$.mz(s,this.xa()?"vertical":"horizontal"),s.Ga("defaultMinorGridSettings"),s.zIndex(this.ip(!1)),this.kh[i]=s,$.K(s,this.wu,this),this.B(9437184,1)),$.p(n)?(s.N(n),this):s},$.g.wu=function(){this.B(8388608,1)},$.g.$h=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.b[i];return s||((s=new $.Sy).dF(0),s.kb(this),$.W(this,"defaultXAxisSettings",s),this.b[i]=s,$.K(s,this.xo,this),this.B(3145732,1)),$.p(n)?(s.N(n),this):s},$.g.ij=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.qf[i];return s||((s=new $.Sy).dF(0),$.W(this,"defaultYAxisSettings",s),s.kb(this),this.qf[i]=s,$.K(s,this.xo,this),this.B(3145732,1)),$.p(n)?(s.N(n),this):s},$.g.wD=ba(24),$.g.yD=ba(25),$.g.xo=function(t){var e=0,i=0;$.X(t,1)&&(e|=2097152,i|=1),$.X(t,8)&&(e|=4),this.ka(),this.B(e,i),$.nr(this,"serieschart","dataarea",1),this.da(!0)},$.g.ZG=function(t){return t>=this.b.length?this.qf[t-this.b.length]:this.b[t]},$.g.uy=function(t){return this.b[t]},$.g.wy=function(t){return this.qf[t]},$.g.X5=function(t){t.scale(this.bb())},$.g.nH=function(){return 2097152},$.g.a_=function(){return new $.$z},$.g.Ym=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.og[i];if(!s){s=this.a_();var a=$.tr($.sr(this),"defaultLineMarkerSettings");s.Ga(a),s.pa=this,$.aA(s,this.xa()?"vertical":"horizontal"),this.og[i]=s,s.kb(this),$.K(s,this.Kw,this),this.B(5242880,1)}return $.p(n)?(s.N(n),this):s},$.g.b_=function(){return new $.cA},$.g.gn=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.rg[i];if(!s){s=this.b_();var a=$.tr($.sr(this),"defaultRangeMarkerSettings");s.Ga(a),s.pa=this,$.dA(s,this.xa()?"vertical":"horizontal"),this.rg[i]=s,s.kb(this),$.K(s,this.Kw,this),this.B(5242880,1)}return $.p(n)?(s.N(n),this):s},$.g.c_=function(){return new $.fA},$.g.mn=function(t,e){var i=$.N(t);if((0,window.isNaN)(i)){i=0;var n=t}else i=t,n=e;var s=this.tg[i];if(!s){s=this.c_();var a=$.tr($.sr(this),"defaultTextMarkerSettings");s.Ga(a),s.pa=this,$.$y(s,this.xa()?"vertical":"horizontal"),this.tg[i]=s,s.kb(this),$.K(s,this.Kw,this),this.B(5242880,1)}return $.p(n)?(s.N(n),this):s},$.g.Kw=function(t){var e=4227072;$.X(t,4)&&(e|=327680),this.B(e,1)},$.g.tV=function(t){for(var e=0,i=$.Ga(this.og,this.rg,this.tg),n=0;n<i.length;n++){var s=i[n];s&&s.enabled()&&s.scale()==t&&(e|=s.B(4))}e&&this.B(4194304,1)},$.g.vy=function(){return this.pb(),Vz(zA(this,this.mm,!0))},$.g.xy=function(){return this.pb(),Vz(zA(this,this.pn,!1))},$.g.bS=function(){AA(this,this.mm)},$.g.cS=function(){AA(this,this.pn)},$.g.mh=function(t){return this.$f||(this.$f=new $.iA,this.$f.enabled(!1),$.qA(this.$f,this),$.K(this.$f,this.fB,this),$.W(this,"crosshair",this.$f),this.B(16777216,1)),$.p(t)?(this.$f.N(t),this):this.$f},$.g.fB=function(){this.B(16777216,1)},$.g.Nk=function(t){return this.aa?this.Ba||(this.ud=new this.aa.ChartController(this),this.Ba=new this.aa.PlotController(this.ud,this),$.W(this,"annotations",this.Ba),$.K(this.Ba,this.aR,this)):$.il(4,null,["Annotations"]),$.p(t)?(this.Ba&&this.Ba.N(t),this):this.Ba||null},$.g.aR=function(){this.B(33554432,1)},$.g.PS=function(t){return $.p(t)?(this.Sb=t,this):this.Sb},$.g.Eq=function(t){this.aa&&this.Nk().ie(),$.wA.u.Eq.call(this,t)},$.g.dg=function(){return this.fc},$.g.M1=function(t){return t.clone().round()},$.g.mD=function(t,e){var i,n,s,a,o,r,l=this.ob().clone(),h=$.Ga(this.b,this.qf),c=0,u=0;for(i=h.length;u<i;u++)if((n=h[u])&&n.enabled()&&null===n.g("value")){switch(n.g("orientation")){case"top":a||(a=n);break;case"bottom":r||(r=n);break;case"right":o||(o=n);break;case"left":s||(s=n)}n.ka();var d=n.padding().Pa;d.top=0,d.right=0,d.bottom=0,d.left=0,n.B(n.se)}do{i=[0,0,0,0];var p=!0;for(d=t.clone(),this.$a=this.Ka=this.Ha=this.fb=window.NaN,u=h.length;u--;)if((n=h[u])&&n.enabled()&&null===n.g("value")){n.ja(t);var g=n.g("orientation"),f=n.g("stroke");$.C(f)||(f=$.Wb(f)),f=$.$b(f),"top"==g?(n.padding().top(i[0]),n.padding().bottom(0),g=n.yd(a!=n),i[0]=t.height-g.height,(0,window.isNaN)(this.fb)&&(this.fb=f)):"bottom"==g?(n.padding().bottom(i[2]),n.padding().top(0),g=n.yd(r!=n),i[2]=t.height-g.height,(0,window.isNaN)(this.Ha)&&(this.Ha=f)):"left"==g?(n.padding().left(i[3]),n.padding().right(0),g=n.yd(s!=n),i[3]=t.width-g.width,(0,window.isNaN)(this.Ka)&&(this.Ka=f)):"right"==g&&(n.padding().right(i[1]),n.padding().left(0),g=n.yd(o!=n),i[1]=t.width-g.width,(0,window.isNaN)(this.$a)&&(this.$a=f))}for(i=this.S_(i,e||0),d.left+=i[3],d.top+=i[0],d.width-=i[1]+i[3],d.height-=i[2]+i[0],u=h.length;u--;)if((n=h[u])&&n.enabled()&&null===n.g("value")){switch(f=n.yd(a!=n&&r!=n&&s!=n&&o!=n),n.Nb()?(n.padding().left(i[3]),n.padding().right(i[1]),(g=n.yd(a!=n&&r!=n)).height!=f.height&&(p=!1)):(n.padding().top(i[0]),n.padding().bottom(i[2]),(g=n.yd(s!=n&&o!=n)).width!=f.width&&(p=!1)),g=n.ob(!1),n.g("orientation")){case"top":var m="bottom";break;case"right":m="left";break;case"bottom":m="top";break;case"left":m="right"}n=null,f=l.top;var v=l.height,b=l.left+l.width,y=l.top+l.height,S=g.left+g.width,x=g.top+g.height;switch(m){case"top":g.top>l.top&&(n=new $.I(l.left,l.top,l.width,g.top-l.top));break;case"bottom":x<y&&(n=new $.I(l.left,x,l.width,y-x));break;case"left":g.left>l.left&&(n=new $.I(l.left,f,g.left-l.left,v));break;case"right":S<b&&(n=new $.I(S,f,b-S,v))}n&&(l=n)}c++}while(!p&&5>c);for(u=0,i=h.length;u<i;u++)(n=h[u])&&n.enabled()&&null===n.g("value")&&(n!=a&&n!=r&&n!=s&&n!=o||(c=n,$.p(l)&&(c.UH=l,c.ik=null,c.ns(),c.ae())),n.da(!1));for(l=d,u=0;u<h.length;u++)(s=h[u])&&s.g("enabled")&&null!==(o=s.g("value"))&&(s.ka(),s.ja(l),a=s.ob(!0),r=yA(this,s))&&(m=r.scale(),r=s.g("orientation"),c=0,s.padding(c),i=m.sD(),o=m.transform(o)+(m.Ne()?-i:i)/2,"top"===r?c=l.height*(1-o)-a.height:"bottom"===r?c=l.height-l.height*(1-o)-a.height:"right"===r?c=l.width-l.width*o-a.width:"left"===r&&(c=l.width*o-a.width),s.padding()[r](c),s.da(!1));return d.clone().round()},$.g.S_=function(t){return t},$.g.XT=function(){return 199262208},$.g.WL=function(t){for(var e=0;e<t.length;e++){var i=t[e];i&&(i.ka(),i.O(Wca(this,i)?this.Na:null),i.W(),i.da(!1))}},$.g.jR=function(){var t;if(this.J(8388608)){var e=$.Ga(this.Zg,this.Yg,this.jh,this.kh),i=0;for(t=e.length;i<t;i++){var n=e[i];n&&(n.ka(),n.scale()||xA(this,n),n.ja(this.fc),n.O(this.Na),n.Qp(this.fb,this.$a,this.Ha,this.Ka),n.W(),n.da(!1))}this.I(8388608)}if(this.J(2097152)&&(this.WL(this.b),this.WL(this.qf),this.I(2097152)),this.J(4194304)){for(i=0,t=(e=$.Ga(this.og,this.rg,this.tg)).length;i<t;i++)(n=e[i])&&(n.ka(),n.scale()||xA(this,n),n.ja(this.fc),n.O(this.Na),n.Qp(this.fb,this.$a,this.Ha,this.Ka),n.W(),n.da(!1));this.I(4194304)}},$.g.Qh=function(t){var e;if(this.aa&&(this.Nk(),this.ud.gv(!0)),this.pb(),!this.pf()){if($.xr(this.b,this.qf),this.J(2097156)){var i,n=0;for(e=this.b.length;n<e;n++)(i=this.b[n])&&(i.B(i.se),i.ae(),$.Yu(i.labels()),$.Yu(i.qb()),!i||i.scale()&&String($.oa(i.scale()))!=this.Bia||(i.scale(this.Ra()),this.B(4)));for(n=0,e=this.qf.length;n<e;n++)(i=this.qf[n])&&($.Yu(i.labels()),$.Yu(i.qb()),!i||i.scale()&&String($.oa(i.scale()))!=this.Cia||(this.X5(i),this.B(4)))}if(this.J(4)&&(n=this.M1(t),this.fc=this.mD(n),this.MA(),this.B(this.XT())),this.jR(),$.Pz(this,this.fb,this.$a,this.Ha,this.Ka),this.J(16777216)&&((n=$.wr(this,"crosshair"))&&(n.ka(),n.ja(this.fc),n.O(this.Na),n.W(),n.da(!1)),this.I(16777216)),this.J(33554432)&&(this.aa&&((n=this.Nk()).ka(),n.ja(this.fc),n.O(this.Na),n.W(),n.da(!1)),this.I(33554432)),this.J(134217728)){if(this.na||(this.na=this.Na.path(),this.na.zIndex(2)),t=this.zL().g("stroke"),n=$.$b(t),!$.cp(t)&&$.p(t)){var s=this.fc.clone();i=(e=s.top)+s.height;var a=s.left;s=a+s.width;var o=$.R((a+s)/2,n),r=$.R((e+i)/2,n);this.na.clear().moveTo(o,e).lineTo(o,i).moveTo(a,r).lineTo(s,r)}this.na&&(this.na.stroke(t),this.na.clip(this.fc)),this.ec=[],t=this.fc.width/2,e=this.fc.height/2,this.ec[0]=$.kn(this.fc.left+t+n/2,this.fc.top,t-n/2,e-n/2),this.ec[1]=$.kn(this.fc.left,this.fc.top,t-n/2,e-n/2),this.ec[2]=$.kn(this.fc.left,this.fc.top+e+n/2,t-n/2,e-n/2),this.ec[3]=$.kn(this.fc.left+t+n/2,this.fc.top+e+n/2,t-n/2,e-n/2),this.B(67108864),this.I(134217728)}if(this.J(67108864)){for(t=this.HO().zm(),n=0;n<t.length;n++)(e=t[n])&&(e.O(this.Na),e.ja(this.ec[n]),e.W());this.I(67108864)}$.zr(this.b,this.qf)}},$.g.GO=function(){this.B(67108864,1)},$.g.HO=function(t){return this.Za||(this.Za=new vA(this),$.W(this,"quarters",this.Za)),$.p(t)?(this.Za.N(t),this):this.Za},$.g.cea=function(){this.B(134217732,1)},$.g.zL=function(t){return this.ea||(this.ea=new tA,$.W(this,"crossing",this.ea),$.K(this.ea,this.cea,this)),$.p(t)?(this.ea.N(t),this):this.ea},$.g.U=function(t,e){$.wA.u.U.call(this,t,e),this.zL(t.crossing),this.HO(t.quarters)},$.g.ht=function(t,e,i){$.wA.u.ht.call(this,t,e,i),"isVertical"in t&&(this.Ks=!!t.isVertical),this.aa&&this.Nk(t.annotations),$.BA(this,t),this.Wg(t),e=this.bu();var n=$.p(t)?t:this.oa,s=$.p(t);this.im(n.lineAxesMarkers,this.Ym,e,s),this.im(n.rangeAxesMarkers,this.gn,e,s),this.im(n.textAxesMarkers,this.mn,e,s),"crosshair"in t&&this.mh().ga(!!i,t.crosshair),"yCrossAxes"in t&&CA(this.qf,t.yCrossAxes),"xCrossAxes"in t&&CA(this.b,t.xCrossAxes)},$.g.Wg=function(t){var e=this.bu(),i=$.p(t)?t:this.oa;t=$.p(t),this.im(i.xAxes,this.$h,e,t),this.im(i.yAxes,this.ij,e,t)},$.g.F=function(){var t=$.wA.u.F.call(this);return t.crossing=this.zL().F(),t.quarters=this.HO().F(),t.yCrossAxes=DA(this.qf,this.b),t.xCrossAxes=DA(this.b,this.qf),t},$.g.ft=function(t,e,i){$.wA.u.ft.call(this,t,e,i),t.isVertical=this.xa();var n=[];$.Yz(this,t,"xAxes",this.b,this.EX,e,i,n),$.Yz(this,t,"yAxes",this.qf,this.EX,e,i,n),$.Yz(this,t,"xGrids",this.Yg,this.rK,e,i,n),$.Yz(this,t,"yGrids",this.Zg,this.rK,e,i,n),$.Yz(this,t,"xMinorGrids",this.jh,this.rK,e,i,n),$.Yz(this,t,"yMinorGrids",this.kh,this.rK,e,i,n),$.Yz(this,t,"lineAxesMarkers",this.og,this.FX,e,i,n),$.Yz(this,t,"rangeAxesMarkers",this.rg,this.FX,e,i,n),$.Yz(this,t,"textAxesMarkers",this.tg,this.FX,e,i,n),t.crosshair=this.mh().F()},$.g.EX=function(t,e,i,n){var s=t.F();return $.Zz(s,"scale",t.scale(),e,i),n.push($.oa(t)),s},$.g.rK=function(t,e,i,n){var s=t.F();return $.Zz(s,"scale",t.scale(),e,i),(t=t.axis())&&(0>(n=(0,$.za)(n,$.oa(t)))?("layout"in s||(s.layout=t.Nb()?"horizontal":"vertical"),"scale"in s||$.Zz(s,"scale",t.scale(),e,i)):s.axis=n),s},$.g.FX=function(t,e,i,n){var s=t.F();return t.p3()&&$.Zz(s,"scale",t.Po(),e,i),(t=t.axis())&&(0>(n=(0,$.za)(n,$.oa(t)))?("layout"in s||(s.layout=t.Nb()?"horizontal":"vertical"),"scale"in s||$.Zz(s,"scale",t.scale(),e,i)):s.axis=n),s},$.g.R=function(){$.sd(this.b,this.qf,this.og,this.rg,this.tg,this.Yg,this.Zg,this.jh,this.kh,this.Za,this.ea,this.ud),delete this.b,delete this.qf,this.ud=this.ea=this.Za=this.kh=this.jh=this.Zg=this.Yg=this.tg=this.rg=this.og=null,$.wA.u.R.call(this)};var jH=$.wA.prototype;jH.isVertical=jH.xa,$.g=$.EA.prototype,$.g.ma=function(){return this.index},$.g.xc=function(){return this.ya},$.g.get=function(t){return this.ya.data().get(this.index,t)},$.g.set=function(t,e){return this.ya.data().set(this.index,t,e),this},$.g.lb=function(t){var e=this.xc(),i=$.tx(e.state,$.vo,this.index);return $.p(t)&&i!=t?(t?e.Tj(this.index):e.Md(this.index),this):i},$.g.selected=function(t){var e=this.xc(),i=$.tx(e.state,$.wo,this.index);return $.p(t)&&i!=t?(t?e.select(this.index):e.ie(this.index),this):i},$.g.iy=function(){return this.index<this.ya.data().Hb()},$.g.La=function(t,e){return $.p(t)?$.p(e)?(this.kn[t.toLowerCase()]=e,this):this.kn[t.toLowerCase()]:this.kn},$.g.Jv=function(){this.ya.Jv()},$.g.Rg=function(t){this.Jv();var e=this.La(t);return $.p(e)?e:this.get(t)};var kH=$.EA.prototype;kH.getIndex=kH.ma,kH.getChart=kH.xc,kH.get=kH.get,kH.set=kH.set,kH.hovered=kH.lb,kH.selected=kH.selected,kH.exists=kH.iy,kH.getStat=kH.Rg,$.H($.FA,$.EA),$.g=$.FA.prototype,$.g.ef=function(){return this.X},$.g.get=function(t){t:{var e=this.X,i=this.index;if(e.pd){var n=void 0,s=e.pd.data[i];if(s)if(t in(i=s.data))n=i[t];else{if(s=s.j.rawIndex,e=e.data(),!$.p(s)){t=n;break t}n=e.Af(s),n=e.Ul(s).dk(n,s,t),i[t]=n}t=n}else t=e.data().get(i,t)}return t},$.g.set=function(t,e){return this.X.SX(this.index,t,e),this},$.g.Mfa=function(){return this.X.tU(this.index)},$.g.Nfa=function(){return this.X.uU(this.index)},$.g.selected=function(t){var e=this.ef(),i=$.tx(e.state,$.wo,this.index);return $.p(t)&&i!=t?(t?e.select(this.index):e.ie(this.index),this):i},$.g.lb=function(t){var e=this.ef(),i=$.tx(e.state,$.vo,this.index);return $.p(t)&&i!=t?(t?e.Tj(this.index):e.Md(this.index),this):i},$.g.iy=function(){return this.index<this.X.$().Hb()},$.g.Jv=function(){$.FA.u.Jv.call(this);var t=this.ya,e=this.X,i=e.check($.fm|$.UG),n=i?this.get("high")-this.get("low"):this.get("value");this.La("index",this.index),$.p(n)&&this.La("value",n);var s=this.get("size");if($.ea(t.La("dataPlotXSum"))){var a=n/t.La("dataPlotXSum");this.La("xPercentOfTotal",$.Tm(100*a,2))}$.ea(e.La("seriesXSum"))&&(a=n/e.La("seriesXSum"),this.La("xPercentOfSeries",$.Tm(100*a,2))),$.ea(e.La("seriesBubbleSizeSum"))&&(a=s/e.La("seriesBubbleSizeSum"),this.La("bubbleSizePercentOfSeries",$.Tm(100*a,2)),a=s/t.La("dataPlotBubbleSizeSum"),this.La("bubbleSizePercentOfTotal",$.Tm(100*a,2)),this.La("bubbleSize",s)),a=i?e.La("catYRangeSumArr_"):e.La("catYSumArr_"),s=this.get("x"),a?(this.La("categoryName",s),s=a[this.index],i?(a=n/e.La("seriesYRangeSum"),this.La("yPercentOfSeries",$.Tm(100*a,2)),a=n/t.La("dataPlotYSum"),this.La("yPercentOfTotal",$.Tm(100*a,2)),this.La("yPercentOfCategory",$.Tm(n/s*100,2)),a=s/t.La("dataPlotYSum"),this.La("categoryYRangePercentOfTotal",$.Tm(100*a,2)),this.La("categoryYRangeSum",s),this.La("categoryYRangeMax",e.La("catYRangeMaxArr_")[this.index]),this.La("categoryYRangeMin",e.La("catYRangeMinArr_")[this.index]),this.La("categoryYRangeAverage",e.La("catYRangeAvgArr_")[this.index]),this.La("categoryYRangeMedian",e.La("catYRangeMedianArr_")[this.index]),this.La("categoryYRangeMode",e.La("catYRangeModeArr_")[this.index])):(a=n/e.La("seriesYSum"),this.La("yPercentOfSeries",$.Tm(100*a,2)),a=n/t.La("dataPlotYSum"),this.La("yPercentOfTotal",$.Tm(100*a,2)),this.La("yPercentOfCategory",$.Tm(n/s*100,2)),a=s/t.La("dataPlotYSum"),this.La("categoryYPercentOfTotal",$.Tm(100*a,2)),this.La("categoryYSum",s),this.La("categoryYMax",e.La("catYMaxArr_")[this.index]),this.La("categoryYMin",e.La("catYMinArr_")[this.index]),this.La("categoryYAverage",e.La("catYAvgArr_")[this.index]),this.La("categoryYMedian",e.La("catYMedianArr_")[this.index]),this.La("categoryYMode",e.La("catYModeArr_")[this.index]))):(a=s/e.La("seriesXSum"),this.La("xPercentOfSeries",$.Tm(100*a,2)),a=n/e.La("seriesYSum"),this.La("yPercentOfSeries",$.Tm(100*a,2)),a=s/t.La("dataPlotXSum"),this.La("xPercentOfTotal",$.Tm(100*a,2)),a=n/t.La("dataPlotYSum"),this.La("yPercentOfTotal",$.Tm(100*a,2)))};var lH=$.FA.prototype;lH.get=lH.get,lH.set=lH.set,lH.hovered=lH.lb,lH.selected=lH.selected,lH.getSeries=lH.ef,lH.getStackValue=lH.Mfa,lH.getStackZero=lH.Nfa,lH.exists=lH.iy,$.H(GA,$.FA),GA.prototype.b=function(){return this.X.K1?Math.abs(this.X.K1(this.index)):Math.abs(this.X.data().j(this.index,"size"))};var mH=GA.prototype,fea,BB,Tz,Tca,TG;mH.getPixelRadius=mH.b,$.PG={},$.dB=16,$.tB=2048,$.UG=16384,$.fm=65536,$.H($.JA,$.od),$.g=$.JA.prototype,$.g.aF=$.ia,$.g.type=0,$.g.flags=0,$.g.Np=["value"],$.g.El="value",$.g.Kh={},$.g.nh=function(t,e){var i=this.X.check(32768),n=this.X.check($.fm),s=this.X.check(8),a=this.X.eh(),o={},r="hatchFill",l="stroke",h="fill",c=s?"stroke":"path";return n?(t>e?this.Hd&&(c="high",r="highHatchFill"):this.Od&&(c="low",r="lowHatchFill"),o.path=c,o.qe=r):a?(this.X.gh()||(this.ba?t<this.aa&&(c="negative",r="negativeHatchFill"):this.Ha&&(t>e||(0,window.isNaN)(e)?(c="rising",r="risingHatchFill"):t<e&&(c="falling",r="fallingHatchFill"))),s?o.stroke=c:(o.path=c,o.qe=r)):(this.X.gh()||(this.ba?t<this.aa&&(l="negativeStroke",h="negativeFill",r="negativeHatchFill"):this.Ha&&(t>e||(0,window.isNaN)(e)?(l="risingStroke",h="risingFill",r="risingHatchFill"):t<e&&(l="fallingStroke",h="fallingFill",r="fallingHatchFill"))),o.stroke=l,i||(o.fill=h,o.qe=r)),o},$.g.Be=function(){return this.Np},$.g.Gd=function(t,e){if(null!=this.X.hi().g("point"))this.wn=this.Cea,this.aF=this.wla;else{t:{var i=this.Kh;for(var n in i){var s=t.f[n];if(!s||s.Qb!=i[n]){i=!1;break t}}i=!0}if(!i)return $.il(300,null,[this.X.name(),this.X.kk(),this.Kh]),void(this.wn=$.ia);this.wn=this.Dea,this.aF=this.WB}this.bd=t,this.G=!1,this.Ba=!!(this.flags&$.dB)&&!!this.X.g("connectMissingPoints"),this.Gc=this.X.fk(),this.o=this.X.yu,this.xa=this.X.g("isVertical"),this.wv=$.p(e)?e:2.5<this.X.q0-this.o&&10<this.o,i=this.X.hi(),n=this.X,OA(i.g("start"),n),this.aa=this.X.jf.g("baseline"),this.nf=!!this.X.tl()&&this.X.tl().Px(),i=this.X.Qa(),this.ba=$.p(i.nd("negativeStroke"))||$.p(i.nd("negativeFill")),this.Ha=$.p(i.nd("risingStroke"))||$.p(i.nd("fallingStroke"))||$.p(i.nd("risingFill"))||$.p(i.nd("fallingFill")),this.qc=$.p(i.nd("highFill")),this.Uc=$.p(i.nd("lowFill")),this.Hd=$.p(i.nd("highStroke"))||this.qc,this.Od=$.p(i.nd("lowStroke"))||this.Uc,this.prevValue=window.NaN},$.g.Cea=function(t,e){var i=this.X.hi(),n=this.X;OA(i.g("point"),n,t,e)},$.g.Dea=function(t,e){if(t.j("missing"))this.jA(t,e|this.Gc),this.G=this.G&&this.Ba;else{if(this.nf){var i=$.p(t.j("category"))?t.j("category"):t.ma();this.o=this.X.my(i)}this.G?this.ug(t,e|this.Gc):this.Qo(t,e|this.Gc),this.G=!0}},$.g.Rl=function(){if(this.wn!=$.ia){null!=this.X.hi().g("point")||this.Km();var t=this.X.hi(),e=this.X;OA(t.g("finish"),e)}},$.g.Qo=function(t,e){this.ug(t,e)},$.g.ug=function(){},$.g.jA=function(){this.Ba||this.Km()},$.g.Km=function(){},$.g.WB=function(t,e){this.X.eh()||(ZA(this.bd,e,t.j("shapeNames")),this.bd.VB(e,t.j("shapeNames")))},$.g.wla=function(t,e){var i=this.X.hi(),n=this.X;OA(i.g("updatePoint"),n,t,e,!0)},$.g.yt=function(){},$.g.uK=function(){},$.g.R=function(){this.bd=this.X=null,$.JA.u.R.call(this)},fea=10*1e-6,$.nH={name:"fill",Qb:"path",Yb:"fill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.oH={name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:2e-6},$.pH={name:"negative",Qb:"path",Yb:null,Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:2e-6},$.qH={name:"hatchFill",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.rH={name:"lowHatchFill",Qb:"path",Yb:"lowHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.sH={name:"highHatchFill",Qb:"path",Yb:"highHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.tH={name:"circle",Qb:"circle",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},$.uH={name:"hatchFill",Qb:"circle",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.vH={name:"negativeFill",Qb:"path",Yb:"negativeFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.wH={name:"negativeStroke",Qb:"path",Yb:null,Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:2e-6},$.xH={name:"negative",Qb:"circle",Yb:"negativeFill",Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:0},$.yH={name:"negative",Qb:"path",Yb:"negativeFill",Zb:"negativeStroke",ac:!0,Ib:!1,zIndex:0},$.zH={name:"negativeHatchFill",Qb:"circle",Yb:"negativeHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.AH={name:"rising",Qb:"path",Yb:"risingFill",Zb:"risingStroke",ac:!0,Ib:!1,zIndex:0},$.BH={name:"rising",Qb:"path",Yb:null,Zb:"risingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.CH={name:"risingStroke",Qb:"path",Yb:null,Zb:"risingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.DH={name:"risingFill",Qb:"path",Yb:"risingFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.EH={name:"risingHatchFill",Qb:"path",Yb:"risingHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.FH={name:"falling",Qb:"path",Yb:"fallingFill",Zb:"fallingStroke",ac:!0,Ib:!1,zIndex:0},$.GH={name:"falling",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.HH={name:"fallingStroke",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!0,Ib:!1,zIndex:2e-6},$.IH={name:"fallingFill",Qb:"path",Yb:"fallingFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.JH={name:"fallingHatchFill",Qb:"path",Yb:"fallingHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.KH={name:"negativeHatchFill",Qb:"path",Yb:"negativeHatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6},$.LH={name:"highFill",Qb:"path",Yb:"highFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.MH={name:"highStroke",Qb:"path",Yb:null,Zb:"highStroke",ac:!0,Ib:!1,zIndex:2e-6},$.NH={name:"high",Qb:"path",Yb:"highFill",Zb:"highStroke",ac:!0,Ib:!1,zIndex:0},$.OH={name:"low",Qb:"path",Yb:"lowFill",Zb:"lowStroke",ac:!0,Ib:!1,zIndex:0},$.PH={name:"lowFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!0,Ib:!1,zIndex:0},$.QH={name:"lowStroke",Qb:"path",Yb:null,Zb:"lowStroke",ac:!0,Ib:!1,zIndex:2e-6},$.RH={name:"path",Qb:"path",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},$.SH={name:"front",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:5*1e-6},$.QG=8388608,BB=2,Tz=4,Tca=6,TG=7,$.H(LA,$.V),LA.prototype.sa=0,LA.prototype.ra=7,LA.prototype.gx=function(t){return $.p(t)?(this.b=$.A(t)?(0,$.Wa)(t,(function(t){return{name:String(t.name),Qb:String(t.shapeType),Yb:t.fillName,Zb:t.strokeName,ac:!!t.canBeHoveredSelected,Ik:!!t.scrollerSelected,Ib:!!t.isHatchFill,zIndex:+t.zIndex||0}})):null,this.va(2),this):(0,$.Wa)(this.b||this.Sa.Ah.Lb,(function(t){return{name:t.name,shapeType:t.Qb,fillName:t.Yb,strokeName:t.Zb,canBeHoveredSelected:t.ac,scrollerSelected:t.Ik,isHatchFill:t.Ib,zIndex:t.zIndex}}))};var TH={};$.sq(TH,[[0,"start",$.gr],[0,"point",$.gr],[0,"updatePoint",$.gr],[0,"finish",$.gr],[0,"needsZero",$.Dq],[0,"needsWidth",$.Dq],[0,"yValues",$.fr]]),$.U(LA,TH),$.g=LA.prototype,$.g.ph=function(t){return null!=this.Pa[t]},$.g.F=function(){var t=LA.u.F.call(this);return $.Tq(this,TH,t,"Series Rendering Settings"),this.b&&(t.shapes=this.gx()),t},$.g.U=function(t,e){LA.u.U.call(this,t),$.Iq(this,TH,t,e);var i=t.shapes;$.p(i)&&this.gx(i)},$.g.Ie=function(t,e){return!!$.D(e)&&(this.point(e),!0)},$.g.R=function(){LA.u.R.call(this),this.b=this.Sa=null},NA.prototype.ed=function(t,e,i){if(i)for(var n={},s=0;s<i.length;s++)n[i[s]]=!0;return this.series.Rf.ed(t||$.gm,n,e)},NA.prototype.Rg=function(t){var e=this.series;return e.ya.Jv(),e.La(t)},$.H(MA,NA),MA.prototype.f=function(t){return this.b.get(t)},MA.prototype.tU=function(){var t=this.b.j("stackedValue");return $.p(t)?t:this.b.get("value")},MA.prototype.uU=function(){var t=this.b.j("stackedZero");return $.p(t)?t:0};var UH=LA.prototype;UH.shapes=UH.gx,UH=NA.prototype,UH.getShapesGroup=UH.ed,UH.getStat=UH.Rg,UH=MA.prototype,UH.getDataValue=UH.f,UH.getStackedValue=UH.tU,UH.getStackedZero=UH.uU,$.H($.QA,$.od),$.g=$.QA.prototype,$.g.jP=function(t,e,i){t&&(e?delete t.tag:t.tag={X:this.X,index:i},t.Dd(e))},$.g.uv=function(){var t,e;for(t in this.i){var i=this.i[t];for(e=0;e<i.length;e++){var n=i[e];n.parent(null),$.J(n,$.Ag)&&(n.clear(),n.oc(1,0,0,1,0,0))}this.G[t]=0,i.length=0}},$.g.ed=function(t,e,i,n){return $.UA(this,t,e,i,n)},$.g.yF=ba(27),$.g.zt=function(t,e){if($.A(e))for(var i=0;i<e.length;i++)this.zt(t,e[i]);else if(e)for(i in e)e[i].zIndex(this.f[i].zIndex+t)},$.g.Mo=function(t,e){if($.A(e))for(var i=0;i<e.length;i++)VA(this,t,e[i]);else e&&VA(this,t,e)},$.g.bs=function(t){for(var e in this.i)for(var i=this.i[e],n=0;n<i.length;n++)i[n].clip(t)},$.g.R=function(){for(var t in this.D)$.sd(this.D[t]),this.D[t].length=0,this.i[t].length=0;this.f=this.Bd=null,$.QA.u.R.call(this)},$.H($.WA,$.QA),$.WA.prototype.ed=function(t,e,i,n){var s=this.X.$();return i=i||0,this.X.eh()&&this.X.kt()&&(i+=Number(s.j("stateZIndex"))||Number(s.get("zIndex"))||0),t=$.WA.u.ed.call(this,t,e,i,n),s.j(this.P,t),t},$.WA.prototype.zt=function(t,e){var i=this.X.$();t+=this.X.kt()&&Number(i.get("zIndex"))||0,$.WA.u.zt.call(this,t,e)},$.WA.prototype.VB=function(t,e){var i,n,s,a=this.X.$();for(s in e){var o=this.f[s];if(o&&!o.Ib){var r=o.fill(this.X,+t,void 0,void 0,"fill");o=o.stroke(this.X,+t,void 0,void 0,"stroke"),r&&$.dm(r)&&(i=r),o&&$.dm(o)&&(n=o)}}a.j("markerFill",i),a.j("markerStroke",n)},$.H($.XA,$.QA),$.g=$.XA.prototype,$.g.jP=function(t,e){$.XA.u.jP.call(this,t,e,!0)},$.g.uv=function(){$.XA.u.uv.call(this),this.o={}},$.g.ed=function(t,e){var i=ZA(this,t,e),n=this.X.$(),s=n.ma();if(this.b=this.o[i],!this.b){var a=$.XA.u.ed.call(this,t,e);this.b=this.o[i]={gx:[a],rows:[],mV:[]},(0,window.isNaN)(s)||(this.b.mV.push(s),this.b.rows.push(n.current()))}return this.b.gx[this.b.gx.length-1]},$.g.yF=ba(26),$.g.zt=function(t){var e,i=this.X.$().current(),n=this.X.$().ma();for(e in this.o)for(var s=this.o[e],a=s.rows,o=0,r=a.length;o<r;o++){this.X.$().Iu(a[o],s.mV[o]);for(var l=s.gx,h=0;h<l.length;h++)$.XA.u.zt.call(this,t,l[h])}i&&this.X.$().Iu(i,n)},$.g.Mo=function(t){var e=this.X.$().current();for(var i in this.K=this.X.$().ma(),this.o)for(var n=this.o[i],s=n.rows,a=0,o=s.length;a<o;a++){this.X.$().Iu(s[a],n.mV[a]);for(var r=n.gx,l=0;l<r.length;l++)$.XA.u.Mo.call(this,t,r[l])}e&&this.X.$().Iu(e,this.K),this.K=void 0},$.g.VB=function(t,e){var i=this.X.$(),n=i.ma();if(n=$.p(this.K)?this.K:n,e&&0<=n){var s,a,o;for(o in e){var r=this.f[o];r&&!r.Ib&&(n=r.fill(this.X,t,void 0,void 0,"fill"),r=r.stroke(this.X,t,void 0,void 0,"stroke"),n&&$.dm(n)&&(s=n),r&&$.dm(r)&&(a=r))}i.j("markerFill",s),i.j("markerStroke",a)}},$.g.R=function(){this.o=null,$.XA.u.R.call(this)},$.H($A,$.V),$.g=$A.prototype,$.g.ra=5,$.g.sa=16,$.g.mode=function(t){return $.p(t)?(t=$.zk(Ada,t,"both"),this.Fm!=t&&(this.Fm=t,this.va(5)),this):this.Fm},$.g.hF=function(t){return $.p(t)?(t=$.yo(t),this.ba!=t&&(this.ba=t,this.o=this.i=void 0,this.va(5)),this):this.ba},$.g.jF=function(t){return $.p(t)?(t=$.yo(t),this.o!=t&&(this.o=t,this.va(5)),this):this.o},$.g.iF=function(t){return $.p(t)?(t=$.yo(t),this.i!=t&&(this.i=t,this.va(5)),this):this.i},$.g.bF=function(t){return $.p(t)?(t=$.yo(t),this.K!=t&&(this.K=t,this.f=this.b=void 0,this.va(5)),this):this.K},$.g.fF=function(t){return $.p(t)?(t=$.yo(t),this.f!=t&&(this.f=t,this.va(5)),this):this.f},$.g.cF=function(t){return $.p(t)?(t=$.yo(t),this.b!=t&&(this.b=t,this.va(5)),this):this.b},$.g.gQ=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)||this.aa==t||(this.aa=t,this.va(1)),this):this.aa},$.g.ZP=function(t){return $.p(t)?(t=$.N(t),(0,window.isNaN)(t)||this.G==t||(this.G=t,this.va(1)),this):this.G},$.g.$J=function(t,e,i,n,s){if($.p(t)){var a=$.D(t)?t:$.Wb.apply(null,arguments);return a!=this.P&&(this.P=a,this.va(1)),this}return this.P},$.g.SJ=function(t,e,i,n,s){if($.p(t)){var a=$.D(t)?t:$.Wb.apply(null,arguments);return a!=this.D&&(this.D=a,this.va(1)),this}return this.D},$.g.jT=function(t,e,i,n,s,a,o,r){if(aB(t)){t=e?s:n;var l=o!=(e?n:s);n=r!=(e?n:s),s=e?this.gQ():this.ZP(),e^i?(e=s||0,l&&a.moveTo(o,t-e/2).lineTo(o,t+e/2),a.moveTo(o,t).lineTo(r,t),n&&a.moveTo(r,t-e/2).lineTo(r,t+e/2)):(e=s||0,l&&a.moveTo(t-e/2,o).lineTo(t+e/2,o),a.moveTo(t,o).lineTo(t,r),n&&a.moveTo(t-e/2,r).lineTo(t+e/2,r))}},$.g.W=function(t,e){var i=t?this.Sa.tl():this.Sa.bb(),n=this.Sa.$(),s=n.j("x"),a=n.j("value"),o=$.N(t?n.get("x"):n.get("value")),r=this.cU(t),l=this.Sa,h=l.$().ma();n=l.eD.length?l.eD.pop():$.qk().zIndex(4e-6),l.Aa.hc(n),l.Rf.jP(n,l.check(524288),h),n.stroke(r),n.fill(null),l.nA.push(n),l=(r=this.vs(t))[0],r=r[1],0===l&&0===r||(l?(l=i.transform(o-l),l=this.Sa.Qe(l,t)):l=t?s:a,r?(o=i.transform(o+r),o=this.Sa.Qe(o,t)):o=t?s:a,this.jT(i,t,e,s,a,n,l,o))},$.g.cU=function(t){return t=this.Sa.cU(t),$.C(t)&&"keys"in t&&!$.C(t.mode)&&(t.mode=this.Sa.ob()),t},$.g.vs=function(t){if(!hB(this.Sa))return[0,0];var e=(t=t?"x":"value")+"Error",i=t+"LowerError",n=t+"UpperError",s=this.Sa.$();e=s.get(e)||this[e](),i=s.get(i)||this[i](),n=s.get(n)||this[n]();var a=$.uo(e)||!$.Do(e),o=$.uo(n)||!$.Do(n)||a;return a=$.uo(i)||!$.Do(i)||a,t=s.get(t),e=$.L(e,t),[i=a?i?$.L(i,t):e/2:0,n=o?n?$.L(n,t):e/2:0]},$.g.F=function(){var t=$A.u.F.call(this);return t.mode=this.mode(),t.xError=this.hF(),$.p(this.jF())&&(t.xUpperError=this.jF()),$.p(this.iF())&&(t.xLowerError=this.iF()),t.valueError=this.bF(),$.p(this.fF())&&(t.valueUpperError=this.fF()),$.p(this.cF())&&(t.valueLowerError=this.cF()),t.xErrorWidth=this.gQ(),t.valueErrorWidth=this.ZP(),$.D(this.xErrorStroke)&&($.D(this.$J())?$.kl(8,null,["x error stroke"]):t.xErrorStroke=$.Rl(this.$J())),$.D(this.valueErrorStroke)&&($.D(this.SJ())?$.kl(8,null,["value error stroke"]):t.valueErrorStroke=$.Rl(this.SJ())),t},$.g.Zd=function(t){return $.z(t)||$.ea(t)||null===t?{xError:t,valueError:t}:$.da(t)?{mode:t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&("xError"in i?(this.ka(),this.hF(i.xError),this.bF(i.valueError),this.da(!0)):"mode"in i&&(i.mode?this.mode("both"):this.mode("none")),!0)},$.g.U=function(t,e){$A.u.U.call(this,t,e),this.mode($.p(t.mode)||"none"!=this.Fm?t.mode:"both"),this.hF(t.xError),this.jF(t.xUpperError),this.iF(t.xLowerError),this.bF(t.valueError),this.fF(t.valueUpperError),this.cF(t.valueLowerError),this.gQ(t.xErrorWidth),this.ZP(t.valueErrorWidth),this.$J(t.xErrorStroke),this.SJ(t.valueErrorStroke)};var VH=$A.prototype;VH.mode=VH.mode,VH.xError=VH.hF,VH.xUpperError=VH.jF,VH.xLowerError=VH.iF,VH.valueError=VH.bF,VH.valueUpperError=VH.fF,VH.valueLowerError=VH.cF,VH.xErrorWidth=VH.gQ,VH.valueErrorWidth=VH.ZP,VH.xErrorStroke=VH.$J,VH.valueErrorStroke=VH.SJ,$.H($.cB,tv);var WH={};$.rq(WH,0,"text",$.ar),$.U($.cB,WH),$.g=$.cB.prototype,$.g.reset=function(){this.Pa={},this.fq=this.pp=this.hw=this.gw=this.jw=this.fV=this.gV=this.eV=this.iV=this.Fs=this.hV=void 0},$.g.GD=function(t){return $.p(t)?(t=$.Do(t)?5:+t,this.hV!=t&&(this.hV=t,this.va(1)),this):this.hV},$.g.Ay=function(t){return $.p(t)?(t=!!t,this.Fs!=t&&(this.Fs=t,this.va(1)),this):this.Fs},$.g.HD=function(t){return $.p(t)?($.z(t)&&(t=$.Vk(t)),this.iV!=t&&(this.iV=t,this.va(1)),this):this.iV},$.g.Gs=function(t,e,i,n,s,a,o){if($.p(t)){var r=null===t||$.D(t)?t:$.Ub.apply(null,arguments);return r!=this.eV&&(this.eV=r,this.va(1)),this}return this.eV},$.g.Is=function(t,e,i,n,s){if($.p(t)){var a=null===t||$.D(t)?t:$.Wb.apply(null,arguments);return a!=this.gV&&(this.gV=a,this.va(1)),this}return this.gV},$.g.Hs=function(t,e,i,n){if($.p(t)){var s=$.D(t)?t:$.Yb.apply(null,arguments);return s!=this.fV&&(this.fV=s,this.va(1)),this}return this.fV},$.g.iw=function(t){return $.p(t)?($.D(t)||(t=$.Ok(t)),this.jw!=t&&(this.jw=t,this.va(1)),this):this.jw},$.g.gu=function(t,e,i,n,s,a,o){if($.p(t)){var r=$.Ub.apply(null,arguments);return this.gw!=r&&(this.gw=r,this.va(1)),this}return this.gw},$.g.hu=function(t,e,i,n,s){if($.p(t)){var a=$.Wb.apply(null,arguments);return this.hw!=a&&(this.hw=a,this.va(1)),this}return this.hw},$.g.kw=function(t){return $.p(t)?(t=$.N(t),this.pp!=t&&(this.pp=t,this.va(1)),this):this.pp},$.g.format=function(t){return this.text(t)},$.g.disabled=function(t){return $.p(t)?(t=!!t,this.fq!=t&&(this.fq=t,this.va(1)),this):this.fq},$.g.F=function(){var t=$.cB.u.F.call(this);return $.Tq(this,SF,t,"Legend Item Settings"),$.p(this.GD())&&(t.iconTextSpacing=this.GD()),$.p(this.Ay())&&(t.iconEnabled=this.Ay()),$.p(this.kw())&&(t.iconSize=this.kw()),$.z(this.HD())&&(t.iconType=this.HD()),$.z(this.iw())&&(t.iconMarkerType=this.iw()),$.p(this.disabled())&&(t.disabled=this.disabled()),$.p(this.Gs())&&!$.D(this.Gs())&&(t.iconFill=$.Rl(this.Gs())),$.p(this.Is())&&!$.D(this.Is())&&(t.iconStroke=$.Rl(this.Is())),$.p(this.Hs())&&!$.D(this.Hs())&&(t.iconHatchFill=$.Rl(this.Hs())),$.p(this.gu())&&!$.D(this.gu())&&(t.iconMarkerFill=this.gu()),$.p(this.hu())&&!$.D(this.hu())&&(t.iconMarkerStroke=this.hu()),t},$.g.U=function(t,e){this.ka(),$.cB.u.U.call(this,t,e),e?$.Hq(this.oa,WH,t):$.Iq(this,WH,t),this.GD(t.iconTextSpacing),this.Ay(t.iconEnabled),this.HD(t.iconType),this.Is(t.iconStroke),this.Gs(t.iconFill),this.Hs(t.iconHatchFill),this.iw(t.iconMarkerType),this.gu(t.iconMarkerFill),this.hu(t.iconMarkerStroke),this.kw(t.iconSize),this.disabled(t.disabled),this.da(!0)};var XH=$.cB.prototype;XH.iconTextSpacing=XH.GD,XH.iconEnabled=XH.Ay,XH.iconType=XH.HD,XH.iconFill=XH.Gs,XH.iconStroke=XH.Is,XH.iconHatchFill=XH.Hs,XH.iconMarkerType=XH.iw,XH.iconMarkerFill=XH.gu,XH.iconMarkerStroke=XH.hu,XH.iconSize=XH.kw,XH.format=XH.format,XH.disabled=XH.disabled,$.H($.eB,$.wu),$.Gq($.eB,"fill negativeFill risingFill fallingFill stroke lowStroke highStroke lowFill highFill negativeStroke risingStroke fallingStroke medianStroke stemStroke whiskerStroke hatchFill negativeHatchFill risingHatchFill fallingHatchFill highHatchFill lowHatchFill whiskerWidth type size".split(" "),"normal"),$.eB.prototype.sa=130976|$.wu.prototype.sa,$.eB.prototype.ra=2132|$.wu.prototype.ra,$.eB.prototype.zQ=fea,$.eB.prototype.sF={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x"};var mB={};$.g=$.eB.prototype,$.g.o0=!0,$.g.sW=window.NaN,$.g.V3=window.NaN,$.g.cP=window.NaN,$.g.bP=window.NaN,$.g.tW=window.NaN,$.g.W3=window.NaN,$.g.Ma=function(){return this.re},$.g.kk=function(t){return $.p(t)?((t=this.ya.Vv(t))&&t[0]!=this.re&&(this.re=t[0],this.Mz(t[1],!1),this.B(5664,this.ra)),this):this.re},$.g.wU=function(){var t=$.D(this.xc().uN)&&this.xc().uN();return this.jf.ms().n2(this.re,t)},$.g.Mz=function(t,e){var i=new $.PG[t.Fb](this);this.Ah&&this.Aa&&(!this.check(4)&&this.check(4,t,i)?($.qd(this.Aa),this.Aa=null):this.check(4)&&!this.check(4,t,i)&&(this.Aa=null)),this.Ah=t,this.qu=this.Qu=null,$.qd(this.bf),this.bf=i,this.ka(),this.rE(),$.D(this.jf.ms().n2)?(this.df(),this.Ga(this.wU())):this.oa=this.jf.ms()[$.pm(this.re)]||{},this.ca.df(),$.W(this,"normal",this.ca),wy(this.ca),this.ca.ga(!0,{}),this.za.df(),$.W(this,"hovered",this.za),wy(this.za),this.za.ga(!0,{}),this.Ea.df(),$.W(this,"selected",this.Ea),wy(this.Ea),this.Ea.ga(!0,{}),this.check(256)?this.RH={}:this.RH&&delete this.RH,this.Nd.xPointPosition=.5,this.vC(this.oa,!0,!0,e),this.da(!1),(i=this.Cu).oa=this.oa.rendering||{},i.oa.needsZero=i.Sa.check(1),i.oa.needsWidth=i.Sa.check(1024),i.oa.yValues=$.Ja(i.Sa.bf.Be(),0),$.fB(this)},$.g.rE=function(){$.qd(this.Rf);var t=this.Cu;this.Rf=new(2==this.Ah.Kb?$.WA:$.XA)(this,t.b||t.Sa.Ah.Lb,this.check(524288),null,this.Ah.Jb,this.eq)},$.g.vC=function(t,e,i,n){hB(this)&&this.error().ga(!!i,t.error),e&&this.Ls().reset(),this.Ls().ga(!!i,t.legendItem),"tooltip"in t&&this.Ua().ga(!!i,t.tooltip),$.p(n)||(n=i),n&&(this.clip(t.clip),this.zIndex(t.zIndex)),this.ut().ga(!!i,t.a11y||this.oa.a11y)},$.g.Xja=function(t){var e=1024,i=1;$.X(t,4)&&(i|=4),$.X(t,2)&&(e|=32768),this.B(e,i)},$.g.ma=function(){return this.md?-1:(0,$.za)(this.jf.Ue(),this)},$.g.yh=function(t){return $.p(t)?(this.Wq=t,this):this.Wq},$.g.id=function(t){return $.p(t)?(t=String(t),this.he!=t&&(this.he=t,this.va(64)),this):this.he||String(this.Wq)},$.g.j4=function(){this.va(64),this.ya.g("categorizedBySeries")&&this.tl().va(4)},$.g.name=function(t){return $.p(t)?(t=String(t),this.Er!=t&&(this.Er=t,this.j4()),this):this.Er||"Series "+this.ma()},$.g.j=function(t,e){if(this.Ci||(this.Ci={}),$.p(t)){if($.p(e)){var i=this.Ci[t];return $.p(i)&&i==e||(this.Ci[t]=e),this}return $.C(t)?(this.Ci!=t&&(this.Ci=t),this):this.Ci[t]}return this.Ci},$.g.nN=function(t,e,i){return new $.my(t,e,i,void 0)},$.g.R3=function(t){$.sy.call(this,t),t.I(4294967295)},$.g.S3=function(t){$.ty.call(this,t),t.I(4294967295)},$.g.TH=function(){var t={};$.T(t,[["fill",3072,65,4294967295],["negativeFill",3072,65,4294967295],["risingFill",3072,65,4294967295],["fallingFill",3072,65,4294967295],["stroke",3072,65,4294967295],["lowStroke",2048,65,4294967295],["highStroke",2048,65,4294967295],["lowFill",2048,65,4294967295],["highFill",2048,65,4294967295],["negativeStroke",3072,65,4294967295],["risingStroke",3072,65,4294967295],["fallingStroke",3072,65,4294967295],["medianStroke",2048,65,4294967295],["stemStroke",2048,65,4294967295],["whiskerStroke",2048,65,4294967295],["hatchFill",3072,65,4294967295],["negativeHatchFill",2048,65,4294967295],["risingHatchFill",2048,65,4294967295],["fallingHatchFill",2048,65,4294967295],["highHatchFill",2048,65,4294967295],["lowHatchFill",2048,65,4294967295],["whiskerWidth",1024,1,256],["type",1024,65,8192],["size",1024,1,8192],["labels",0,0],["minLabels",0,0],["maxLabels",0,0],["markers",0,0],["outlierMarkers",0,0]]),this.ca=this.nN(this,t,$.gm),this.ca.ta("labelsAfterInitCallback",$.sy),this.ca.ta("markersAfterInitCallback",$.ty),this.ca.ta("outlierMarkersAfterInitCallback",Mca),t={},$.T(t,gB()),this.za=this.nN(this,t,$.vo),this.za.ta("labelsFactoryConstructor",$.oy),this.za.ta("markersFactoryConstructor",$.ry),this.za.ta("labelsAfterInitCallback",this.R3),this.za.ta("markersAfterInitCallback",this.S3),t={},$.T(t,gB()),this.Ea=this.nN(this,t,$.wo),this.Ea.ta("labelsFactoryConstructor",$.oy),this.Ea.ta("markersFactoryConstructor",$.ry),this.Ea.ta("labelsAfterInitCallback",this.R3),this.Ea.ta("markersAfterInitCallback",this.S3)},$.g.check=function(t,e,i){return!!(t&(e||this.Ah).Cb|t&(i||this.bf).flags)},$.g.kt=function(){return this.check(1048576)},$.g.EP=function(){return this.check(32)},$.g.jL=function(){return!0},$.g.Ak=function(){return this.check(2)},$.g.sp=function(){return!!this.Cu.g("needsWidth")},$.g.aO=function(){return!0},$.g.eh=function(){return this.check(512)},$.g.aj=function(){return!0},$.g.ou=ba(14),$.g.L2=function(){return this.gh()},$.g.jH=function(){var t=0;if(this.sp()){t=this.dH("pointWidth"),t=$.L(t,this.my());var e=this.dH("maxPointWidth");null!=e&&(e=$.L(e,this.my()),t=Math.min(t,e))}return t},$.g.Eh=function(){return this.VF||$.Yb("diagonal-brick")},$.g.mr=function(){return this.ra},$.g.Kq=function(t){this.Nd.color=t,this.ca.Db().oJ(this.Zv()),this.ca.Db().pJ(this.qy()),this.ca.dl().oJ(qB(this)),this.ca.dl().pJ($.Ql(this.Qa().dl().fill()))},$.g.dx=function(t){this.VF=$.Yb(t)},$.g.Qp=function(t,e,i,n){return this.$g||(this.$g=new $.Hu,this.$g.set(0)),$.p(t)?(this.$g.N.apply(this.$g,arguments),this):this.$g},$.g.bG=function(t){var e=0>t;return t=((t=Math.abs(t))-this.sW)/(this.V3-this.sW),!(0,window.isNaN)(t)&&(0,window.isFinite)(t)||(t=.5),t=this.tW+t*(this.W3-this.tW),e?-t:t},$.g.Be=function(){return this.Cu.g("yValues")},$.g.sl=function(){return this.Aa},$.g.xc=function(){return this.ya},$.g.$=function(){return this.iterator||this.Ec()},$.g.Ec=function(){return this.iterator=this.cg()},$.g.tl=function(){return this.ya.Ra()},$.g.bb=function(t){if($.p(t)){if(t){if(t=$.jt(this.Fc,t,null,15,null,this.zg,this)){var e=this.Fc==t;this.Fc=t,this.Fc.da(e),e||this.B(1024,5)}}else this.Fc&&(this.Fc&&$.kr(this.Fc,this.zg,this),this.Fc=null,this.B(1024,5));return this}return this.Fc||this.jf.bb()},$.g.zg=function(t){var e=0;$.X(t,4)&&(e|=4),$.X(t,2)?this.B(1024,1|e):this.va(e)},$.g.Lr=function(t,e){return this.Qe(this.tl().transform(t,e),!0)},$.g.Jp=function(t,e){return this.Qe(this.bb().transform(t,e),!1)},$.g.hi=function(t){return $.p(t)?(this.Cu.N(t),this):this.Cu},$.g.error=function(t){return hB(this)||$.kl(12,void 0,[this.kk()]),this.Lv||(this.Lv=new $A(this),$.K(this.Lv,this.Ria,this)),$.p(t)?(this.Lv.N(t),this):this.Lv},$.g.Ria=function(t){var e=0;$.X(t,1)&&(e|=1),$.X(t,4)&&(e|=4),this.B(1024,e)},$.g.vs=function(t){return this.error().vs(t)},$.g.cU=function(t){var e=t?this.error().$J():this.error().SJ();if($.D(e)){var i=this.Ge();e=$.Wb(e.call(i,i))}if(this.kt()){var n=this.k2(t?"xErrorStroke":"valueErrorStroke");$.D(n)?(i=this.Ge(e),n=$.Wb(n.call(i,i))):n&&(n=$.Wb(n))}return n||e},$.g.jT=function(t){if(t=!t.j("missing")){var e=this.error(),i=e.Sa.$();t=i.get("xError")||e.hF();var n=i.get("xLowerError")||e.iF(),s=i.get("xUpperError")||e.jF(),a=i.get("valueError")||e.bF(),o=i.get("valueLowerError")||e.cF();e=i.get("valueUpperError")||e.fF(),a=$.p(o)||$.p(e)||$.uo(a)||!$.Do(a),t=$.p(n)||$.p(s)||$.uo(t)||!$.Do(t)||a}if(t)switch(t=this.error(),n=t.mode(),s=this.g("isVertical"),n){case"x":t.W(!0,s);break;case"value":t.W(!1,s);break;case"both":t.W(!0,s),t.W(!1,s)}},$.g.clip=function(t){return $.p(t)?(null===t&&(t=!1),this.gg!=t&&(this.gg=t,this.B(4096,1)),this):this.gg},$.g.Ls=function(t){return this.vp||(this.vp=new $.cB,$.K(this.vp,this.NW,this)),$.p(t)?(this.vp.N(t),this):this.vp},$.g.NW=function(t){var e=64,i=!1;$.X(t,8)&&(e|=8,i=!0),this.va(e,i)},$.g.qD=function(t){var e=this.Ls();e.I(e.sa);var i=tv.prototype.F.call(e);$.p(e.GD())&&(i.iconTextSpacing=e.GD());var n=e.g("text");return $.p(n)&&(i.text=n),$.p(e.Ay())&&(i.iconEnabled=e.Ay()),$.p(e.HD())&&(i.iconType=e.HD()),$.p(e.kw())&&(i.iconSize=e.kw()),$.p(e.Gs())&&(i.iconFill=e.Gs()),$.p(e.Is())&&(i.iconStroke=e.Is()),$.p(e.Hs())&&(i.iconHatchFill=e.Hs()),$.p(e.iw())&&(i.iconMarkerType=e.iw()),$.p(e.gu())&&(i.iconMarkerFill=e.gu()),$.p(e.hu())&&(i.iconMarkerStroke=e.hu()),$.p(e.disabled())&&(i.disabled=e.disabled()),e=this.g("color"),n=this.RC(),t=i.text||t,$.z(t)&&(t=$.Nu($.Lu.Id(),t)),i.text=$.D(t)?t.call(n,n):this.e2(n),i.disabled="disabled"in i?!!i.disabled:!this.enabled(),i.meta=this.j(),"marker"!=i.iconType||this.check(8192)||(i.iconFill=this.ca.Db().g("fill"),i.iconStroke=this.ca.Db().g("stroke")),i.iconType=this.pD(i.iconType,n),i.iconEnabled=!("iconEnabled"in i)||!!i.iconEnabled,i.iconStroke=this.eH(i.iconStroke,2,e,n),i.iconFill=this.eH(i.iconFill,1,e,n),i.iconHatchFill=this.eH(i.iconHatchFill,3,this.Eh(),n),this.check(4194304)&&this.ca.Db().enabled()?(i.iconMarkerType=i.iconMarkerType||this.ca.Db().type(),i.iconMarkerFill=i.iconMarkerFill||this.ca.Db().g("fill"),i.iconMarkerStroke=i.iconMarkerStroke||this.ca.Db().g("stroke")):(i.iconMarkerType=null,i.iconMarkerFill=null,i.iconMarkerStroke=null),i},$.g.pD=function(t){return"marker"==t?"line"==(t=this.check(8192)?this.g("type"):this.check(4194304)?this.ca.Db().type():"square")&&(t="v-line"):$.D(t)||(t=$.Vk(t)),t},$.g.eH=function(t,e,i){if(t)$.D(t)?(e={sourceColor:i},t=t.call(e,e)):t=$.Rl(t);else{if(2==e)var n="stroke";else if(3==e){if(this.check(8))return null;n="hatchFill"}else this.check(8)?(n="stroke",e=2):n="fill";t=this.ca.g(n);var s=this.ca.oa[n];if($.D(t)&&t==s)return e=this.RC([{sourceColor:{value:i,type:"string"}}]),t.call(e,e);t=$.cm(n,e,!1)(this,$.gm,!0)}return t},$.g.e2=function(){return this.name()},$.g.Ua=function(t){if(!this.px&&(this.px=new $.ww(0),this.px.df(),this.ya.r6())){var e=this.ya,i=e.Ua();this.px.parent(i),this.px.ya(e),$.W(this,"tooltip",this.px)}return $.p(t)?(this.px.N(t),this):this.px},$.g.kd=function(t){if($.p(t)){if(null===t&&this.vb)this.vb=null,this.B(65536,129);else if(t=$.jt(this.vb,t,null,48,null,this.Wp,this)){var e=this.vb==t;this.vb=t,this.vb.da(e),e||this.B(65536,129)}return this}return this.vb},$.g.Bn=ba(28),$.g.Wp=function(t){$.X(t,6)&&this.B(65536,129)},$.g.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},$.g.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za},$.g.selected=function(t){return $.p(t)?(this.Ea.N(t),this):this.Ea},$.g.k2=function(t){return this.kt()?this.$().get(t):void 0},$.g.ph=function(t){return null!=this.Pa[t]},$.g.g=function(t){var e=this.Pa[t];return null==e&&(null!=(e=this.oa[t])||(e=this.Nd[t])),e},$.g.dH=function(t){return null!=this.Pa[t]?this.Pa[t]:null!=this.jf.Pa[t]?this.jf.Pa[t]:null!=this.ya.Pa[t]?this.ya.Pa[t]:null!=this.oa[t]?this.oa[t]:null!=this.jf.oa[t]?this.jf.oa[t]:null!=this.ya.oa[t]?this.ya.oa[t]:this.Nd[t]},$.g.sc=function(t,e,i,n,s,a,o){var r=0==e?this.ca:1==e?this.za:this.Ea;if(o)return n(r.g(t));if(this.kt()){o=i.get(0==e?"normal":1==e?"hovered":"selected");var l=$.Zo($.p(o)?o[t]:void 0,i.get($.hm(e,t)),r.g(t))}if($.p(l))l=n(l);else{if((t=a||t)in this.ua&&(l=this.g(t),$.p(l)))return n(l);s&&(r=this.Ea),null==(l=r.Pa[t])&&(null!=(l=r.oa[t])||e||(l=this.Nd[t]),$.p(l)&&(l=n(l)))}return l},$.g.U1=function(){return this.O()},$.g.iA=function(t,e,i,n,s,a,o,r,l){var h,c,u,d,p,g,f,m,v,b=o.ma();if((0,window.isNaN)(b))return null;if(a&&((h=this.RH[b])||(h=this.RH[b]=[])),t[0]&&(c=t[0].call(this.ca)),o.j("missing")||o.j("skipDrawing"))t=!1;else{r=$.em(r);var y=n&&this.kt();e[0]&&(u=e[0].call(this.ya.ca));var S=c;if(y)var x=(n=o.get("normal"))?n[i[0]]:o.get(i[0]);if(3<t.length&&(e[3]&&(g=e[3].call(this.ya.ca)),t[3]&&(f=t[3].call(this.ca)),y))var w=(n=o.get("normal"))?n[i[3]]:o.get(i[3]);if(r){var C=1==r?"hovered":"selected";if(e[r]&&(d=e[r].call(this.ya[C]())),t[r]&&(p=t[r].call(this[C]())),y)var T=(n=o.get(C))?n[i[0]]:o.get(i[r]);if(3<t.length&&(e[r+3]&&(m=e[r+3].call(this.ya[C]())),t[r+3]&&(v=t[r+3].call(this[C]())),y))var D=(n=o.get(C))?n[i[3]]:o.get(i[r+3])}x=(D=(0,$.Wa)([x,w,T,D],(function(t){return!$.C(t)||"enabled"in t||((t=$.Qc(t)).enabled=!0),t})))[0],w=D[1],T=D[2],D=D[3],t=Vba($.no([D,0,T,0,v,mo,p,mo,m,mo,d,mo,w,0,x,0,f,mo,S,mo,g,mo,u,mo],"enabled"))}if(t){if(t=s?this.nG():null,c=[S,p,x,T],e=[u,S,x,d,p,T,g,f,w,m,v,D],!a)return"rangeMode"!=(a=ap(s?$.no([D,0,T,0,v,$.jo,p,$.jo,m,$.jo,d,$.jo,w,0,x,0,f,$.jo,S,$.jo,g,$.jo,u,$.jo,v,$.ko,p,$.ko,d,$.ko,f,$.ko,S,$.ko,u,$.ko],"position"):$.no([T,0,p,mo,x,0,S,mo],"position"),"auto"))||s?(h=this.Bh(a,!0),this.aM(c,e,b,h,t,l,a)):(h=this.Bh("high",!0),s=this.Bh("low",!0),a=b+this.qB.length,Zca(this,c,b,a,h,s,l));if(s=o.j("x"),this.g("isVertical"))for(b=0;b<a.length;b++)h[b]=this.aM(c,e,h[b],{value:{x:a[b],y:s}},t,l).ma();else for(b=0;b<a.length;b++)h[b]=this.aM(c,e,h[b],{value:{x:s,y:a[b]}},t,l).ma()}else if(a)for(b=0;b<h.length;b++)c.clear(h[b]);else c.clear(b),s||"rangeMode"==(a=ap($.no([T,0,p,mo,x,0,S,mo],"position"),"auto"))&&(a=b+this.qB.length,c.clear(a));return null},$.g.T1=function(t){var e=this.g("isVertical");return this.bb().Ne()&&(t=!t),e?t?0:180:t?270:90},$.g.jS=function(t){return"low"!=t&&"lowest"!=t&&("high"==t||"highest"==t||0<=(Number(this.$().get(t))||0))},$.g.n5=function(t){return $.Jo(t,180)},$.g.AE=function(t,e){var i=$.Ek(t,null);return i&&"auto"!==i?i=this.n5(i):(i=this.jS(t),i=this.T1(i),i=$.Go(i)),$.Jo(i,e)},$.g.t0=function(t,e){var i=$.mn(t.yl(e,void 0,{anchor:e.qk()})),n=e.qk(),s=e.ic("rotation");if(n=$.Jo(n,-s),$.No(n)&&i.left<this.fa.left||$.Mo(n)&&i.left+i.width>this.fa.left+this.fa.width){var a=n;0<=(n=(0,$.za)($.Fo,a))&&(a=$.Fo.length,a=$.Fo[(a-n)%a]),n=a}($.Lo(n)&&i.top<this.fa.top||$.Ko(n)&&i.top+i.height>this.fa.top+this.fa.height)&&0<=(i=(0,$.za)($.Fo,n))&&(n=$.Fo.length,n=$.Fo[(n-i+4)%n]),n=$.Jo(n,s),e.qk(n)},$.g.UX=function(t,e,i,n,s,a,o,r,l,h,c,u,d){$.bv(t,$.no([d,0,o,0,u,$.jo,a,$.jo,c,$.jo,s,$.jo,h,0,n,0,l,$.jo,i,$.jo,r,$.jo,e,$.jo,u,$.ko,a,$.ko,s,$.ko,t,$.jo,t,$.lo,l,$.ko,i,$.ko,e,$.ko]))},$.g.O_=$.ia,$.g.aM=function(t,e,i,n,s,a,o){if(s){var r=n;(n=(t=t[0]).be(i))||(n=t.add(void 0,void 0,i)),n.Hf(s),r=this.XN(n,r),n.jc(r),n.Hi(),e.unshift(n),this.UX.apply(this,e),e=n.ic("anchor"),dv(n,this.g("isVertical")),$.p(o)&&"auto"==e&&(o=this.AE(o,Number(n.ic("rotation"))||0),n.qk(o),this.t0(t,n)),this.O_(n,i),i=n}else i=rB(this,t,i,n);return a&&i.W(),i},$.g.labels=function(t){return $.p(t)?(this.ca.labels(t),this):this.ca.labels()},$.g.th=function(t){return $.p(t)?(this.ca.th(t),this):this.ca.th()},$.g.sh=function(t){return $.p(t)?(this.ca.sh(t),this):this.ca.sh()},$.g.de=function(t){$.X(t,1)&&this.B(256,1025)},$.g.tf=function(t,e,i){var n=this.xc(),s=[this.ca.labels,this.za.labels,this.Ea.labels],a=this.jL()?[n.Qa().labels,n.lb().labels,n.selected().labels]:[],o=["label","hoverLabel","selectLabel"];t.j("isMaxPoint")?(s.push(this.ca.sh,this.za.sh,this.Ea.sh),this.jL()&&a.push(n.Qa().sh,n.lb().sh,n.selected().sh),o.push("maxLabel","hoverMaxLabel","selectMaxLabel")):t.j("isMinPoint")&&(s.push(this.ca.th,this.za.th,this.Ea.th),this.jL()&&a.push(n.Qa().th,n.lb().th,n.selected().th),o.push("minLabel","hoverMinLabel","selectMinLabel")),t.j("label",this.iA(s,a,o,this.kE(),!0,null,t,e,i))},$.g.TQ=function(){},$.g.kT=function(t){t.W()},$.g.XN=function(t,e){return e},$.g.Db=function(t){return $.p(t)?(this.ca.Db(t),this):this.ca.Db()},$.g.Mn=function(t){$.X(t,1)&&this.B(128,65)},$.g.gq=function(t,e,i){t.j("marker",this.iA([this.ca.Db,this.za.Db,this.Ea.Db],[],["marker","hoverMarker","selectMarker"],this.vO(),!1,null,t,e,i))},$.g.Zv=function(t){return t=$.p(t)?t:$.cm(this.check(8)?"stroke":"fill",1,!1)(this,$.gm,!0,!0),$.Ul(t,1,!0)},$.g.qy=function(){return $.Ql(this.ca.Db().g("fill"))},$.g.dl=function(t){return $.p(t)?(this.ca.dl(t),this):this.ca.dl()},$.g.tja=function(t){$.X(t,1)&&this.B(128,1)},$.g.$L=function(t,e,i){var n=t.j("outliers");n&&n.length&&this.iA([this.ca.dl,this.za.dl,this.Ea.dl],[],["outlierMarker","hoverOutlierMarker","selectOutlierMarker"],this.UW(),!1,n,t,e,i)},$.g.kE=function(){return!1},$.g.vO=function(){return!1},$.g.UW=function(){return!1},$.g.I4=function(){return!1},$.g.gh=function(){return!1},$.g.iB=function(){return!1},$.g.yE=function(){if(this.gh()&&this.eh()&&this.sp()){var t=this.$();for(t.reset();t.advance();)sB(t);sB(this.LM()),sB(this.KM())}},$.g.remove=function(){this.check(4)?$.RA(this.Rf,null):this.Aa&&this.Aa.remove();var t=this.ca.labels();t.Vd()&&(t.Vd().remove(),t.B(2)),(t=this.ca.Db())&&(t.remove(),t.B(2)),(t=this.ca.dl())&&(t.remove(),t.B(2))},$.g.ut=function(t){return this.jl||(this.jl=new gx(this),$.K(this.jl,this.JW,this),$.J(this.ya,$.ux)&&(ex(this.jl,this.ya.ut()),ex(this.jl).va(2))),$.p(t)?(this.jl.N.apply(this.jl,arguments),this):this.jl},$.g.JW=function(){this.B(32,1)},$.g.W=function(){if(!this.zc())return this;if(this.ka(),$.p(this.Nd.color)&&this.J(16768)&&this.Kq(this.Nd.color),this.J(32768)&&(this.rE(),this.I(32768)),this.J(4)){this.fa=this.ob(),this.Mx=this.$g?this.$g.Ej(this.fa):this.fa;var t=Math.min(this.fa.height,this.fa.width);this.tW=$.L(this.Vha,t),this.W3=$.L(this.Oha,t),this.B(7168)}this.J(512)&&(this.Ec(),this.bX(),this.B(68640,2049),this.I(512)),this.k0(),this.J(1024)&&this.B(24960),t=[];var e=[],i=!1;if(this.J(1026)&&(this.cX(),this.nE()),this.J(1282)){var n=this.ca.labels(),s=this.ca.th().enabled()||this.ca.sh().enabled()||this.za.labels().enabled()||this.Ea.labels().enabled()||this.za.th().enabled()||this.Ea.th().enabled()||this.za.sh().enabled()||this.Ea.sh().enabled();oB(this,n,s,this.kE(),$.QG,256)&&(s=this.zIndex()+this.zQ+(this.gh()?1:0),n.zh=s,n.B(8),this.check($.QG)&&t.push(this.tf),e.push(n),i=!0),this.ca.th().I(4294967295),this.ca.sh().I(4294967295),this.za.th().I(4294967295),this.za.sh().I(4294967295),this.Ea.th().I(4294967295),this.Ea.sh().I(4294967295),this.I(256)}if(this.J(1154)&&(n=this.ca.Db(),s=this.za.Db().enabled()||this.Ea.Db().enabled(),oB(this,n,s,this.vO(),4194304,128)&&(s=this.zIndex()+12e-6+(this.gh()?1:0),n.zh=s,this.check(4194304)&&t.push(this.gq),e.push(n)),this.I(128)),this.J(9218)){if(this.eD||(this.eD=[]),this.nA)for(;this.nA.length;)(n=this.nA.pop()).clear(),n.parent(null),this.eD.push(n);else this.nA=[];hB(this)&&"none"!=this.error().mode()&&(this.I4()||bB(this.error()))&&t.push(this.jT),this.I(8192)}if(this.J(17410)&&(n=this.ca.dl(),s=this.za.dl().enabled()||this.Ea.dl().enabled(),oB(this,n,s,this.UW(),256,16384)&&(s=this.zIndex()+11e-6,n.zh=s,this.check(256)&&t.push(this.$L),e.push(n)),this.I(16384)),n=t.length,this.J(1024)){if(s=this.uX()){var a=this.Be();if(this.bJ(s,a),i&&this.TQ(),this.ya.g("categorizedBySeries")){i=this.Ec();var o=this.Iha,r=this.ya.g("barsPadding"),l=this.ya.g("barGroupsPadding"),h=i.Sa.pd.cO;this.Pz=1/(l+r*(h-1)+h),$.iB(this,this.Pz),this.nE(),this.Gd(!1)}else o=this.XA,this.Gd(),i=this.Ec();for((r=this.LM())&&(this.XA(r,a,s),this.wn(r,this.rr(r.ma()))),i.reset();i.advance();)for(i.j("destinationValue",window.NaN),l=this.rr(i.ma()),o.call(this,i,a,s),this.wn(i,l),r=0;r<n;r++)t[r].call(this,i,l,!1);(r=this.KM())&&(this.XA(r,a,s),this.wn(r,this.rr(r.ma()))),this.Rl()}else for(i=this.Ec();i.advance();)this.uI(i,this.Be(),window.NaN);this.I(2056),this.check(4)&&this.B(4096)}else if(n)for(i&&this.TQ(),i=this.Ec();i.advance();)for(l=this.rr(i.ma()),r=0;r<n;r++)t[r].call(this,i,l,!1);return Yca(this,e),this.I(1026),this.J(2048)&&(this.Mo(),this.I(2048)),this.J(8)&&(this.xC(),this.I(8)),this.J(4096)&&(this.bs(),this.I(4096)),this.J(32)&&(this.ut().JR(),this.I(32)),this.I(65540),this.da(!1),this},$.g.Gd=function(t){this.bf.Gd(this.Rf,t)},$.g.wn=function(t,e){this.bf.wn(t,e)},$.g.Rl=function(){this.bf.Rl()},$.g.cX=function(){this.check(4)?this.Aa=this.O():(this.Aa||(this.Aa=$.ok(),this.o0&&$.ru(this,this.Aa)),this.Aa.zIndex(this.zIndex()),this.Aa.parent(this.O())),this.J(1024)&&this.Rf.uv(),$.RA(this.Rf,this.Aa)},$.g.nE=function(){this.q0=this.my(),this.yu=this.jH()},$.g.xC=function(){var t=this.zIndex();this.check(4)?this.bf.uK(t):this.Aa.zIndex(t)},$.g.bs=function(t){if(t=t||this.gg,$.da(t)&&(t=t?uB(this):null),t?(this.ti||(this.ti=$.tk()),this.ti.shape(t),t=this.ti):t=null,this.check(4)?this.Rf.bs(t):this.Aa.clip(t),this.check($.QG)){var e=this.ca.labels().Vd();e&&e.clip(t)}this.check(4194304)&&(e=this.ca.Db().Vd())&&e.clip(t),this.check(256)&&(e=this.ca.dl().Vd())&&e.clip(t)},$.g.Mo=function(){if($.J(this.Rf,$.WA))for(var t=this.Ec();t.advance();)this.Rf.Mo(this.rr(t.ma()),t.j("shapes"));else this.Rf.Mo(this.fk())},$.g.bX=$.ia,$.g.k0=function(){if(this.J(65536)){if(this.vb){var t=this.Be(),e=this.Ec();for(this.vb.ka(),this.vb.Bg();e.advance();){var i=e.get(t[1]);this.vb.Xc(i)}this.vb.Hg(),this.vb.da(!1),this.B(3072,129)}this.I(65536)}},$.g.uX=function(){return this.Be()},$.g.oH=function(){return[]},$.g.rr=function(){return $.gm},$.g.fk=function(){return $.gm},$.g.RD=function(){return!0},$.g.LM=function(){return null},$.g.KM=function(){return null},$.g.kH=function(t){return t.get("value")},$.g.Qe=function(t,e){if(e^this.g("isVertical"))var i=this.fa.left,n=this.fa.width;else i=this.fa.Va(),n=-this.fa.height;return i+t*n},$.g.Zs=function(t,e){for(var i=[],n=this.Qe(t,!0),s=0;s<e.length;s++)i.push(n,this.Qe(e[s],!1));return i},$.g.P_=function(t){if(this.g("isVertical"))var e=this.Mx.left,i=e+this.Mx.width;else i=(e=this.Mx.top)+this.Mx.height;return $.Za(t,e,i)},$.g.z0=function(){return!1},$.g.uI=function(t,e,i){i=this.Qe(i,!0),t.j("x",i);for(var n=0;n<e.length;n++)t.j(e[n],void 0),t.j(e[n]+"X",i)},$.g.YA=function(t,e,i){var n,s=[],a=[];for(n in e)s.push(n),a.push(e[n]);for(e=this.Zs(i,a),i=0;i<s.length;i++)t.j(s[i]+"X",e[2*i]),t.j(s[i],e[2*i+1]);t.j("x",e[0])},$.g.Fha=function(t,e,i,n){if(!t.j("missing")){e=t.j("shared");var s=t.j("value"),a=t.j("zero"),o=this.kH(t),r=Number(o);i=Math.max(Math.abs(s-a),this.rW),s=a>=s,null===o||(0,window.isNaN)(r)||0!=r||(s=!((s=this.g("isVertical"))^(o=this.bb().Ne()))),o=e.dN,r=t.j("valueRatio"),r=$.p(r)?!r:!i,s?(i=-i,(0,window.isNaN)(e.jB)?(e.jB=a+i,i=e.jB,o||(r=!1)):(i=(a=Math.min(a,e.jB))+i,e.jB=i)):(0,window.isNaN)(e.dB)?(e.dB=a+i,i=e.dB,o||(r=!1)):(i=(a=Math.max(a,e.dB))+i,e.dB=i),t.j("value",i),t.j("zero",a),t.j("skipDrawing",r)}return n},$.g.Gha=function(t,e,i,n){if(!t.j("missing")){var s=t.j("value");e=t.j("zero");var a=this.kH(t),o=Number(a);i=Math.max(Math.abs(s-e),this.rW),s=e>=s,null===a||(0,window.isNaN)(o)||0!=o||(s=!((a=this.g("isVertical"))^(o=this.bb().Ne()))),s&&(i=-i),t.j("value",e+i)}return n},$.g.Eha=function(t,e,i,n){if(!t.j("missing")){var s=((e=t.j("high"))+(i=t.j("low")))/2,a=Math.max(Math.abs(i-e),this.rW)/2;e>=i&&(a=-a),t.j("high",s-a),t.j("low",s+a)}return n},$.g.Kha=function(t,e,i,n,s){if(e=this.bb(),e={value:$.Za(e.transform(t.j("stackedValue"),.5),0,1),zero:$.Za(e.transform(t.j("stackedZero"),.5),0,1),prevValue:e.transform(t.j("stackedValuePrev"),.5),prevZero:e.transform(t.j("stackedZeroPrev"),.5),nextValue:e.transform(t.j("stackedValueNext"),.5),nextZero:e.transform(t.j("stackedZeroNext"),.5)},this.YA(t,e,s),t.j("zeroMissing",t.j("stackedMissing")),s=t.j("shared")){i=Math.abs(e.value-e.zero),e=s.dN;var a=t.j("valueRatio");i=$.p(a)?!a:!i,s.i1||e||(i=!1,s.i1=!0),t.j("skipDrawing",i)}return n},$.g.Bha=function(t,e,i,n){for(var s,a,o=this.bb(),r=0;r<i.length;r++){var l=e[r];a=t.lr(i[r]);var h=this.Rx;s=o.P3(a,h),a=o.M3(a,h),t.j(l+"Change",s),t.j(l+"PercentChange",$.Tm(Number(a),2)),t.j(l+"RatioChange",Number(a)/100)}return n},$.g.Cha=function(t,e,i,n,s){var a=!1;if(e=!1,!n&&0<=s&&1>=s){a=window.Infinity,s=-window.Infinity;var o,r=Math.min.apply(null,this.f5);for(e=Math.max.apply(null,this.f5),o=0;o<i.length;o++){var l;(l=$.J(this.bb(),$.Mt)?this.bb().Vz():null)&&"none"!=l?"value"==l?l=Number(t.j("valueChange")):(l=Number(t.j("valuePercentChange")),r=$.Tm(r,2),e=$.Tm(e,2)):l=Number(t.lr(i[o])),(0,window.isNaN)(l)||(s<l&&(s=l),a>l&&(a=l))}a=(0,window.isFinite)(a)&&r>=a,e=(0,window.isFinite)(s)&&e<=s}return t.j("isMinPoint",a),t.j("isMaxPoint",e),n},$.g.O3=function(t,e,i,n,s){for(var a=this.bb(),o={},r=0;r<i.length;r++){var l=a.transform(a.Lz(t.lr(i[r]),this.Rx),.5);(0,window.isNaN)(l)&&(n|=1),o[e[r]]=l}return this.YA(t,o,s),n},$.g.YD=function(t,e,i,n){return t.j("zeroX",t.j("x")),t.j("zero",this.Mi),t.j("zeroMissing",!1),n},$.g.Jha=function(t,e,i,n){return t.j("size",this.bG(Number(t.get("size")))),n},$.g.Hha=function(t,e,i,n){e=this.bb(),i=[];var s=t.get("outliers");if($.A(s))for(var a=0;a<s.length;a++)e.zk(s[a])||i.push(this.Qe(e.transform(e.Lz(s[a],this.Rx),.5),!1));return t.j("outliers",i),n},$.g.bJ=function(){var t=this.bb();if(this.Vj.length=0,this.gh()?this.Vj.push(this.Kha):(this.Vj.push(this.O3),$.PA(this)&&this.Vj.push(this.YD),$.J(t,$.Mt)&&"none"!=t.Vz()&&this.Vj.push(this.Bha)),this.aO()&&(this.f5=this.oH(!0),this.Vj.push(this.Cha)),this.eh()&&this.sp()&&"percent"!=this.bb().jn()){var e=this.dH("minPointLength"),i=this.g("isVertical")?this.fa.width:this.fa.height;this.rW=Math.abs($.L(e,i)),this.check($.fm|$.UG)?this.Vj.push(this.Eha):this.gh()?this.Vj.push(this.Fha):this.Vj.push(this.Gha)}this.Ak()&&this.Vj.push(this.Jha),this.check(256)&&this.Vj.push(this.Hha),$.PA(this)&&(e=this.jf.g("baseline")||0,this.YY=$.Za(t&&t.transform(e,.5)||e,0,1),this.Mi=this.P_(this.Qe(this.YY,!1)))},$.g.yU=function(){return this.g("xPointPosition")},$.g.XA=function(t,e,i){var n=this.z0()?0:-9&(Number(t.j("missing"))||0);this.RD(t)||(n|=8);var s=this.tl().Kr(t.Gh(),t.ma(),this.yU());if(t.j("xRatio",s),n)this.uI(t,e,s);else for(var a=0;a<this.Vj.length;a++)n=this.Vj[a].call(this,t,e,i,n,s);t.j("missing",n)},$.g.Iha=function(t,e,i){var n=-9&(Number(t.j("missing"))||0);this.RD(t)||(n|=8);var s=this.tl(),a=t.j("ordinalIndex"),o=this.name(),r=s.Kr(o,a,0);if(s=s.Kr(o,a,1),o=this.ya.g("barsPadding"),a=r+(s-r)*(this.ya.g("barGroupsPadding")/2*this.Pz+this.Pz/2+a*this.Pz*(1+o)),t.j("xRatio",a),n)this.uI(t,e,a);else for(r=0;r<this.Vj.length;r++)n=this.Vj[r].call(this,t,e,i,n,a);t.j("missing",n)},$.g.GS=function(t){return[this.ce(t.ma()),this,this.xc()]},$.g.aU=function(t){var e={},i=t.get("high")-t.get("low");return e["%Range"]={value:i,type:"number"},e["%Name"]={value:t.get("name"),type:"string"},e},$.g.p2=function(){return"string"},$.g.ym=function(t,e){var i=this.tl(),n=this.bb(),s={chart:{value:this.xc(),type:""},series:{value:this,type:""},xScale:{value:i,type:""},yScale:{value:n,type:""},index:{value:e.ma(),type:"number"},x:{value:e.Gh(),type:this.p2()},seriesName:{value:this.name(),type:"string"}};if(i&&$.D(i.Ma)&&(s.xScaleType={value:i.Ma(),type:"string"}),this.Ak()&&(s.size={value:e.get("size"),type:"number"}),hB(this)){if("both"==(i=this.error().mode())||"value"==i){var a=this.vs(!1);s.valueLowerError={value:a[0],type:"number"},s.valueUpperError={value:a[1],type:"number"}}"both"!=i&&"x"!=i||(a=this.vs(!0),s.xLowerError={value:a[0],type:"number"},s.xUpperError={value:a[1],type:"number"})}var o=this.Be();for(i=0;i<o.length;i++)s[a=o[i]]={value:e.get(a),type:"number"};if($.J(n,$.Mt)&&"none"!=n.Vz())for(n=["Change","PercentChange","RatioChange"],i=0;i<o.length;i++){a=o[i];for(var r=0;r<n.length;r++){var l=a+n[r];s[l]={value:e.j(l),type:"number"}}}return s},$.g.nG=function(){return $.vB(this,new $.Fw)},$.g.Rk=function(){return this.Qu||(this.Qu=new $.Fw),$.vB(this,this.Qu)},$.g.RC=function(t){this.YV||(this.YV=new $.Fw(void 0,void 0,[this,this.ya]));var e={series:{value:this,type:""},chart:{value:this.xc(),type:""},seriesName:{value:this.name(),type:"string"}};if(t)for(var i=0;i<t.length;i++)$.ra(e,t[i]);return this.YV.Li([this,this.ya]),$.ov(this.YV,e)},$.g.oG=function(t){var e=this.$(),i=e.j("x"),n=e.j(this.Ah.Ab),s=e.j(this.Ah.zb);return i=new $.I(i,Math.min(n,s),0,Math.abs(s-n)),this.sp()&&(i.left-=this.yu/2,i.width+=this.yu),this.Ak()&&(e=e.j("size"),i.left-=e,i.top-=e,i.width+=e+e,i.height+=e+e),this.g("isVertical")&&(e=i.left,i.left=i.top,i.top=e,e=i.height,i.height=i.width,i.width=e),$.Eo(i,t)},$.g.N0=function(t){var e=this.$(),i=e.j("x"),n=e.j(t);return $.p(n)||(n=e.get(t),$.p(n)?(this.gh()&&(n+=e.j("stackedZero")),n=this.Jp(n)):n=window.NaN),this.g("isVertical")?{x:n,y:i}:{x:i,y:n}},$.g.Bh=function(t,e){if(this.$().j("missing"))var i={x:window.NaN,y:window.NaN};else if((i=$.Ek(t,null))?i=this.oG(i):(i=this.N0(t),((0,window.isNaN)(i.x)||(0,window.isNaN)(i.y))&&(i=this.oG("center-top"))),e&&this.check($.tB)){var n=this.ya,s=this.ma();i.x+=n.QM(s,this.gh()),i.y-=n.RM(s,this.gh())}return{value:i}};var YH={};$.sq(YH,[[0,"color",$.Sq],[0,"xPointPosition",$.Bq],[0,"pointWidth",$.br],[0,"maxPointWidth",$.br],[0,"minPointLength",$.br],[0,"maxPointWidth",$.br],[0,"minPointLength",$.br],[0,"connectMissingPoints",$.Dq],[0,"displayNegative",$.Dq],[0,"stepDirection",function(t,e){return $.zk(Eda,t,e||"center")}],[0,"isVertical",$.Zq]]),$.U($.eB,YH),$.g=$.eB.prototype,$.g.La=function(t,e){return $.p(t)?$.p(e)?(this.kn[t.toLowerCase()]=e,this):this.kn[t.toLowerCase()]:this.kn},$.g.co=$.ia,$.g.Rg=function(t){return this.ya.Jv(),this.La(t)},$.g.F=function(){var t=$.eB.u.F.call(this);if(t.seriesType=this.kk(),t.clip=$.J(this.gg,$.I)?this.gg.F():this.gg,this.Ci&&(t.meta=this.j()),this.he&&(t.id=this.id()),this.Er&&(t.name=this.name()),this.Wq!=this.ma()&&(t.autoIndex=this.yh()),this.check(524288)){var e=this.Ua().F();$.Jc(e)||(t.tooltip=this.Ua().F()),t.legendItem=this.Ls().F()}return hB(this)&&(t.error=this.error().F()),$.Tq(this,YH,t),t.normal=this.ca.F(),t.hovered=this.za.F(),t.selected=this.Ea.F(),t.a11y=this.ut().F(),t},$.g.U=function(t,e){$.eB.u.U.call(this,t,e),this.id(t.id),this.yh(t.autoIndex),this.name(t.name),this.j(t.meta),this.clip(t.clip),this.ut(t.a11y),this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),this.Ea.ga(!!e,t.selected),$.Iq(this,YH,t),this.vC(t,!1,e)},$.g.R=function(){$.sd(this.nA,this.eD),this.check(4)||$.qd(this.Aa),$.sd(this.Rf,this.bf,this.ca,this.za,this.Ea,this.px,this.vp,this.Lv,this.Cu,this.$g,this.jl),this.px=this.vp=this.Cu=this.Lv=this.jl=this.$g=this.Fc=this.nA=this.Aa=this.ep=this.Ea=this.za=this.ca=null,delete this.Rf,delete this.ya,delete this.jf,delete this.iterator,delete this.oa,delete this.Nd,delete this.Pa,$.eB.u.R.call(this)};var ZH=$.eB.prototype;ZH.a11y=ZH.ut,ZH.getType=ZH.Ma,ZH.seriesType=ZH.kk,ZH.name=ZH.name,ZH.id=ZH.id,ZH.meta=ZH.j,ZH.getIndex=ZH.ma,ZH.yScale=ZH.bb,ZH.labels=ZH.labels,ZH.minLabels=ZH.th,ZH.maxLabels=ZH.sh,ZH.markers=ZH.Db,ZH.outlierMarkers=ZH.dl,ZH.normal=ZH.Qa,ZH.hovered=ZH.lb,ZH.selected=ZH.selected,ZH.tooltip=ZH.Ua,ZH.legendItem=ZH.Ls,ZH.clip=ZH.clip,ZH.error=ZH.error,ZH.transformX=ZH.Lr,ZH.transformY=ZH.Jp,ZH.getPixelBounds=ZH.ob,ZH.getPixelPointWidth=ZH.jH,ZH.getStat=ZH.Rg,ZH.rendering=ZH.hi,ZH.colorScale=ZH.kd,$.H(wB,$.Br),$.g=wB.prototype,$.g.reset=function(){return this.la=this.Sa.pd.data,wB.u.reset.call(this)},$.g.advance=function(){return this.i++,this.ag=this.la[this.i],this.f=void 0,!!this.la.length&&this.i<this.la.length},$.g.get=function(t){var e=void 0;if(this.ag)if(t in this.ag.data)e=this.ag.data[t];else{var i=this.ag.j.rawIndex;if(!this.f){if(!$.p(i))return this.ag.data[t]=e;this.f=this.view.Af(i)}this.ag.data[t]=e=this.view.Ul(i).dk(this.f,i,t)}return e},$.g.Hb=function(){return this.la.length},$.g.j=function(t,e){var i=1<arguments.length;if(!this.ag)return i?this:void 0;var n=this.ag.j;return i?(n[t]=e,this):n[t]};var $H=wB.prototype;$H.reset=$H.reset,$H.advance=$H.advance,$H.get=$H.get,$H.meta=$H.j,$H.getRowsCount=$H.Hb,$.H($.xB,$.eB),$.xB.prototype.sa=$.eB.prototype.sa,$.xB.prototype.ra=$.eB.prototype.ra;var aI={};$.sq(aI,[[0,"xMode",function(t){return $.zk(Gda,t,"ordinal")}]]),$.U($.xB,aI),$.g=$.xB.prototype,$.g.vC=function(t,e,i,n){$.xB.u.vC.call(this,t,e,i,n),this.ej(t.selectionMode)},$.g.my=function(t){return(($.p(t)&&$.J(this.Ra(),$.Qt)?$.St(this.Ra())[t]:this.Ra().sD())||this.Ra().vH()/this.$().Hb())*(this.g("isVertical")?this.fa.height:this.fa.width)},$.g.oH=function(){return[this.pd.uu,this.pd.tu]},$.g.Ra=function(t){if($.p(t)){if(t){if(t=$.jt(this.eb,t,null,15,null,this.zg,this)){var e=this.eb==t;this.eb=t,this.eb.da(e),e||this.B(1024,5)}}else this.eb&&(this.eb&&$.kr(this.eb,this.zg,this),this.eb=null,this.B(1024,5));return this}return this.eb||this.ya.Ra()},$.g.tl=function(){return this.Ra()},$.g.rr=function(t){return $.nx(this.state,t)},$.g.fk=function(){var t=this.state.fk();return t||this.eh()||"single"!=this.Xl()?t:$.mx(this.state,$.wo)?$.wo:$.mx(this.state,$.vo)?$.vo:$.gm},$.g.bX=function(){if(this.data().hd("state")){for(var t=this.cg(),e=[];t.advance();)"selected"==String(t.get("state")).toLowerCase()&&e.push(t.ma());e.length&&this.Ii(e)}$.xB.u.bX.call(this)},$.g.XN=function(t,e){if("auto"==this.labels().g("position")&&"continuous"==this.Ra().mode()){var i=e.value,n=i.x;i=i.y;var s=t.Rh();if(s&&s.text()){var a=s.Ta.width/2;s=this.Mx.cb();var o=this.Mx.tb(),r=n+a;return o>(a=n-a)&&r>o?n+=o-a:r>s&&a<s&&(n-=r-s),{value:{x:n,y:i}}}}return $.xB.u.XN.call(this,t,e)},$.g.kT=function(t){$.xB.u.kT.call(this,t);for(var e=t.jI(),i=0;i<e;i++){var n=t.be(i);if(n){var s=this.XN(n,n.jc());n.jc(s)}}t.W()},$.g.W=function(){return $.xB.u.W.call(this),DB(this,!0),this},$.g.Ge=function(t,e,i){var n,s=$.lB(this),a=e?this.cg():this.$(),o=a.ma();s.lg(a).Li([this.ce(o),this]),t=t||this.g("color")||"blue";var r=a.Gh();e=a.get("value");var l=$.p(a.get("name"))?a.get("name"):r;return a={x:{value:r,type:"date-time"},value:{value:e,type:"number"},index:{value:o,type:"number"},iterator:{value:a,type:""},autoColor:{value:t,type:""},chart:{value:this.ya,type:""},plot:{value:this.jf,type:""},series:{value:this,type:""},name:{value:l,type:"string"}},i=$.p(i)&&i,(o=this.kd())&&!i&&($.p(e)&&(n=o.Qq(e)),a.scaledColor={value:n,type:""},a.colorScale={value:o,type:""}),a.sourceColor={value:n||t,type:""},$.ov(s,a)},$.g.Yi=function(t){var e=$.lB(this),i=(t=t?this.cg():this.$()).ma();e.lg(t).Li([this.ce(i),this]);var n=this.Eh(),s=t.Gh(),a=t.get("value"),o=$.p(t.get("name"))?t.get("name"):s;return $.ov(e,{x:{value:s,type:"date-time"},value:{value:a,type:"number"},index:{value:i,type:"number"},iterator:{value:t,type:""},sourceHatchFill:{value:n,type:""},plot:{value:this.jf,type:""},chart:{value:this.ya,type:""},series:{value:this,type:""},name:{value:o,type:"string"}})},$.g.data=function(t,e){return $.p(t)?(this.qB!==t&&(this.qB=t,$.qd(this.gm),$.J(t,$.Cr)?this.ee=this.gm=t.Ui():this.ee=$.J(t,$.Mr)?this.gm=t.Yd():(this.gm=new $.Mr($.A(t)||$.z(t)?t:null,e)).Yd(),this.wG=this.ee,$.K(this.wG,this.dd,this),this.B(1536,85)),this):this.wG},$.g.dd=function(t){$.X(t,16)&&(t=327680,$.J(this.ya,$.wA)&&(t|=2097152),this.ya.B(t),this.B(1536,85))},$.g.cg=function(){return this.pd?new wB(this):this.data().$()},$.g.K1=function(t){return this.pd?(t=this.pd.data[t])?t.j.size:void 0:this.data().j(t,"size")},$.g.uU=function(t){return this.pd?(t=this.pd.data[t])?this.pd.zJ?t.j.stackedZero:0:void 0:this.data().j(t,"zero")},$.g.tU=function(t){return this.pd?(t=this.pd.data[t])?this.pd.zJ?t.j.stackedValue:t.data.value:void 0:this.data().j(t,"value")},$.g.SX=function(t,e,i){this.pd&&(t=(t=this.pd.data[t])&&t.j.rawIndex),this.data().set(t,e,i)},$.g.v1=function(t){this.vm||(this.vm=[]),$.A(t)||(t=[t]);for(var e=!1,i=0;i<t.length;i++)e=$.Ua(this.vm,t[i])||e;return e&&this.B(1024,5),e},$.g.lV=function(t){if(!this.vm)return!1;$.A(t)||(t=[t]);for(var e=!1,i=0;i<t.length;i++){var n=this.vm,s=$.Na(n,t[i],void 0);e=0<=s&&Ea(n,s)||e}return e&&this.B(1024,5),e},$.g.FM=function(){return(0,$.Wa)(this.vm||[],this.ce,this)},$.g.t3=function(t){this.vm?this.vm.length=0:this.vm=[];for(var e=this.$().Hb(),i=0;i<e;i++)this.vm.push(i);this.lV(t)},$.g.kV=function(){return!(!this.vm||!this.vm.length||(this.vm.length=0,this.B(1024,5),0))},$.g.kE=function(){return!this.pd||this.pd.N2},$.g.vO=function(){return!this.pd||this.pd.O2},$.g.UW=function(){return!this.pd||this.pd.P2},$.g.I4=function(){return!this.pd||this.pd.M2},$.g.gh=function(){return!this.pd||this.pd.zJ},$.g.iB=function(){return this.Ra().Ne()},$.g.RD=function(t){return t=t.ma(),"scatter"==this.g("xMode")&&(t=$.qo(this.pd.data[t].data.x),t=this.pd.Lp[t]),t>=this.pd.rj&&t<=this.pd.lastIndex},$.g.bU=function(t,e,i,n){var s,a=this.data(),o=a.$(),r=this.bb(),l=!1,h=!1,c=this.Ak(),u=[];this.eh()&&this.kt()&&u.push("zIndex"),c&&u.push("size"),this.check(256)&&u.push("outliers"),hB(this)&&(aB(this.Ra())&&(a.hd("xError")&&(u.push("xError"),l=!0),a.hd("xLowerError")&&(u.push("xLowerError"),l=!0),a.hd("xUpperError")&&(u.push("xUpperError"),l=!0)),aB(this.bb())&&(a.hd("valueError")&&(u.push("valueError"),h=!0),a.hd("valueLowerError")&&(u.push("valueLowerError"),h=!0),a.hd("valueUpperError")&&(u.push("valueUpperError"),h=!0))),$.J(r,$.Qt)&&(s=$.Tt(r))&&a.hd(s)&&u.push(s);var d=this.Ra();$.J(d,$.Qt)&&(s=$.Tt(d))&&a.hd(s)&&u.push(s);var p=this.oV();for(d=0;o.advance();){var g=i(o.get("x"));if(!n(g)){var f,m={};m.x=g,g=!1;var v=this.Be(),b=0;for(f=v.length;b<f;b++){s=v[b];var y=this.r4(o.get(s));g=g||r.zk(y),m[s]=y}for(b=0,f=u.length;b<f;b++)m[s=u[b]]=o.get(s);c&&(b=$.N(m.size=o.get("size")),(0,window.isNaN)(b)||0>b&&!this.g("displayNegative"))&&(g=!0),b={},g?b.missing=1:(b.missing=0,d++),b.rawIndex=o.ma(),b.ordinalIndex=d-1,m={data:m,j:b},this.XW(o,m,p),e(t,m)}}if(this.check($.dB)&&this.g("connectMissingPoints")&&d!==t.length)for(i=e=null,o=n=window.NaN,c=r=!1,u=0;u<t.length;u++)p=t.length-u-1,m=t[u],b=!!(g=t[p]).j.missing,m.j.missing?(r=!0,m.j.notMissingStart=e,m.j.notMissingStartIndex=n,e&&(e.j.connectsMissingPointsStart=!0)):((m.j.hasPreviousMissingFromStart=r)&&u&&(m.j.notMissingStartIndexForPreviousMissing=t[u-1].j.notMissingStartIndex),r=!1,e=m,n=u),b?(c=!0,g.j.notMissingEnd=i,g.j.notMissingEndIndex=o,i&&(i.j.connectsMissingPointsEnd=!0)):((g.j.hasPreviousMissingFromEnd=c)&&p<t.length-1&&(m.j.notMissingEndIndexForPreviousMissing=t[p+1].j.notMissingEndIndex),c=!1,i=g,o=p);return this.B(512),this.pd={data:t,X:this,cO:d,N2:this.check($.QG)&&(a.hd("normal")||a.hd("hovered")||a.hd("selected")||a.hd("label")||a.hd("hoverLabel")||a.hd("selectLabel")||a.hd("minLabel")||a.hd("hoverMinLabel")||a.hd("selectMinLabel")||a.hd("maxLabel")||a.hd("hoverMaxLabel")||a.hd("selectMaxLabel")),O2:this.check(4194304)&&(a.hd("normal")||a.hd("hovered")||a.hd("selected")||a.hd("marker")||a.hd("hoverMarker")||a.hd("selectMarker")),P2:this.check(256)&&(a.hd("outliers")||a.hd("normal")||a.hd("hovered")||a.hd("selected")||a.hd("outlierMarker")||a.hd("hoverOutlierMarker")||a.hd("selectOutlierMarker")),XU:l,Q2:h,M2:l||h}},$.g.oV=function(){return null},$.g.XW=function(){},$.g.r4=function(t){return t},$.g.qM=function(t,e){if(this.pd){var i=[],n="scatter"==this.g("xMode");if(this.pd.Lp)var s=this.pd.Lp[$.qo(t)],a=this.pd.Lp[$.qo(e)];else 0>(s=$.Oa(this.pd.data,(function(e){return t-e.data.x})))&&(s=~s),0>(a=$.Oa(this.pd.data,(function(t){return e-t.data.x})))&&(a=~a);if(!(0,window.isNaN)(s)&&!(0,window.isNaN)(a)){if(s>a){var o=s;s=a,a=o}if(n)for(o=this.pd.data,n=0;n<o.length;n++){var r=o[n],l=this.pd.Lp[$.qo(r.data.x)];l>=s&&l<=a&&i.push(r.j.rawIndex)}else for(a=Math.min(a,this.pd.data.length-1),n=s;n<=a;n++)i.push(n)}return i}return i=this.Ra(),(s=$.J(i,$.Qt))&&(t=i.Yv(t),e=i.Yv(e)),this.wG.qM(t,e,s)},$.g.pk=function(t,e){if(DB(this)){var i=this.$();if(8===i.j("missing"))return e;var n=i.j("shapes");return this.eh()&&(this.Rf.Mo(t,n),this.Rf.VB(t,n)),this.check(256)&&this.$L(i,t,!0),this.bf.aF(i,t),this.check(4194304)&&this.gq(i,t,!0),this.check($.QG)&&this.tf(i,t,!0),e}},$.g.wm=$.ia,$.g.ml=function(t){if(DB(this)){var e=this.$(),i=e.j("shapes");this.Rf.Mo(t,i),this.bf.aF(e,t),this.check(256)&&this.$L(e,t,!0)}},$.g.pq=$.ia,$.g.ej=function(t){return $.p(t)?((t=null===t?null:$.Bk(t))!=this.et&&(this.et=t),this):this.et},$.g.Xl=function(t){return $.p(t)?this:this.ya.gd().g("hoverMode")},$.g.Tj=function(t){return $.p(t)?this.$i(t):this.Zk(),this},$.g.Md=function(t){var e,i;return(e=!$.mx(this.state,$.vo))&&(e=!(this.state.fk()&$.vo)),e||!this.enabled()||(i=$.p(t)?t:this.state.Gc==$.gm?window.NaN:void 0,this.state.Vh($.vo,i)),this},$.g.$i=function(t){if(!this.enabled())return this;if($.A(t)){for(var e=$.sx(this.state,$.vo),i=0;i<e.length;i++)$.Aa(t,e[i])||this.state.Vh($.vo,e[i]);$.qx(this.state,t)}else $.ea(t)&&(this.Md(),$.qx(this.state,t));return this},$.g.Zk=function(){this.enabled()&&this.state.Lh($.vo)},$.g.select=function(t){return this.enabled()?($.p(t)?this.Ii(t):this.Gu(),this):this},$.g.ie=function(t){return this.enabled()?(e=$.p(t)?t:this.state.Gc==$.gm?window.NaN:void 0,this.state.Vh($.wo,e),this):this;var e},$.g.Ii=function(t,e){return $.EB(this,t,!(!e||!e.shiftKey))},$.g.Gu=function(){this.enabled()&&this.state.Lh($.wo)},$.g.ig=function(t){t=$.xB.u.ig.call(this,t);var e=this.g("isVertical");if(this.eh())t.pointIndex=$.N($.so(t.domTarget).index);else if(this.Dka){var i=this.fa||$.kn(0,0,0,0),n=$.Zj(this.O().Ja()),s=t.clientX,a=t.clientY;if(e){var o=a,r=i.top+n.y+i.height;i=-i.height}else o=s,r=i.left+n.x,i=i.width;if(i=this.Ra().Mc((o-r)/i),r=!!this.ya.g("categorizedBySeries"),this.ya&&r&&!this.eh()){r=this.Ra();var l=this.name(),h=r.Kr(l,window.NaN,0);l=r.Kr(l,window.NaN,1)-h;var c=this.ya.g("barsPadding"),u=this.ya.g("barGroupsPadding");for(c*=this.Pz,u*=this.Pz,r=this.pd.cO,l=(h+=l*(u-c)/2)+l*(this.Pz+c)*r,h=this.Qe(h,!0),l=(this.Qe(l,!0)-h)/r,r=h+(e?n.y:n.x),e=Math.floor((o-r)/l),o=-1,r=0;r<this.pd.data.length;r++)if(!(h=this.pd.data[r]).j.missing&&++o==e){i=h.data.x;break}}if(i=$.Wz(this,i),$.A(i)&&1<i.length){for(s-=n.x,n=a-n.y,a=this.$(),e=window.Infinity,o=-1,r=0;r<i.length;r++)if(a.select(i[r]))for(h=a.j("x"),l=this.Be(),c=0;c<l.length;c++)u=a.j(l[c]),(u=$.gn(h,u,s,n))<e&&(e=u,o=i[r]);i=o}0>i&&(i=window.NaN),t.pointIndex=i}return t},$.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},$.g.Tg=function(t){var e,i=t.type;switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":i="pointmousemove";break;case"mousedown":i="pointmousedown";break;case"mouseup":i="pointmouseup";break;case"click":case"touchstart":i="pointclick";break;case"dblclick":i="pointdblclick";break;default:return null}t.target!=this.Qa().dl()||(0,window.isNaN)(t.markerIndex)?"pointIndex"in t?e=t.pointIndex:"labelIndex"in t?e=t.labelIndex:"markerIndex"in t&&(e=t.markerIndex):e=$ca(this,t.markerIndex),e=$.N(e),t.pointIndex=e;var n=this.cg();return n.select(e)||n.reset(),{type:i,actualTarget:t.target,series:this,iterator:n,pointIndex:e,target:this,originalEvent:t,point:this.ce(e)}},$.g.ce=function(t){return this.Ak()?new GA(this,t):new $.FA(this,t)},$.g.F=function(){var t=$.xB.u.F.call(this);if($.Tq(this,aI,t),this.pd){for(var e=[],i=this.data(),n=new wB(this);n.advance();){var s=n.j("rawIndex");(0,window.isNaN)(s)?e.push({x:n.get("x")}):e.push(Fr(i,s))}t.data=e}else t.data=this.data().F();return $.p(this.ej())&&(t.selectionMode=this.ej()),t},$.g.U=function(t,e){$.xB.u.U.call(this,t,e),$.Iq(this,aI,t,e),"data"in t&&this.data(t.data||null),this.ej(t.selectionMode)},$.g.R=function(){$.qd(this.gm),delete this.wG,this.eb=this.pd=this.state=this.ee=this.gm=null,$.xB.u.R.call(this)};var bI=$.xB.prototype;bI.data=bI.data,bI.xScale=bI.Ra,bI.hover=bI.Tj,bI.unhover=bI.Md,bI.select=bI.select,bI.unselect=bI.ie,bI.selectionMode=bI.ej,bI.getPoint=bI.ce,bI.excludePoint=bI.v1,bI.includePoint=bI.lV,bI.keepOnlyPoints=bI.t3,bI.includeAllPoints=bI.kV,bI.getExcludedPoints=bI.FM,$.H($.GB,$.Y);var FB=1e6;$.GB.prototype.ra=$.Y.prototype.ra,$.GB.prototype.sa=464|$.Y.prototype.sa,$.GB.prototype.K=function(t){return this.aa||(this.aa=new RB(this),$.W(this,"thumbs",this.aa)),$.p(t)?(this.aa.N(t),this):this.aa};var cI=function(){function t(t){return function(e){var i=$.yo(e,null);return null===e?this.vf(t):null===i?this.g(t):i}}var e={};return $.sq(e,[[0,"height",t("height")],[0,"minHeight",t("minHeight")],[0,"maxHeight",t("maxHeight")],[0,"orientation",dr],[0,"inverted",$.Dq],[0,"autoHide",$.Dq],[1,"fill",$.Qq],[1,"selectedFill",$.Qq],[1,"outlineStroke",$.Pq],[0,"allowRangeChange",$.Dq]]),e}();$.U($.GB,cI),$.g=$.GB.prototype,$.g.padding=function(t,e,i,n){return this.Wa||(this.Wa=new $.Hu,$.K(this.Wa,this.fm,this),$.W(this,"padding",this.Wa)),$.p(t)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},$.g.fm=function(t){$.X(t,2)&&this.B(4,9)},$.g.Nb=function(){return"bottom"==this.g("orientation")||"top"==this.g("orientation")},$.g.remove=function(){this.Aa&&this.Aa.remove()},$.g.Oe=function(){return this.enabled()&&(!this.g("autoHide")||this.g("allowRangeChange")||0!=this.D||this.o!=FB)},$.g.W=function(){if(!this.zc())return this;if(this.I(256),!this.Oe())return this.remove(),this.B(2),this;if(this.pf())return this;if(this.Aa||(this.Aa=$.ok(),this.f=$.qk(),this.f.zIndex(100),this.b=$.qk(),this.b.zIndex(100),this.ba=this.Aa.rect(),this.ba.zIndex(1),this.dO=$.tk(),this.ba.clip(this.dO),this.G=this.Aa.rect(),this.G.zIndex(50),this.vB=$.tk(),this.G.clip(this.vB),this.P=this.Aa.path(),this.P.zIndex(99),$.ru(this,this.Aa,this.Iaa,this.bia),this.wc.wa(this.f,"mouseover",this.C6),this.wc.wa(this.f,"mouseout",this.B6),this.wc.Ce(this.f,"mousedown",this.ZE),this.wc.Ce(this.f,"touchstart",this.ZE),this.wc.wa(this.b,"mouseover",this.C6),this.wc.wa(this.b,"mouseout",this.B6),this.wc.Ce(this.b,"mousedown",this.ZE),this.wc.Ce(this.b,"touchstart",this.ZE),this.wc.Ce(this.G,"mousedown",this.ZE),this.wc.Ce(this.G,"touchstart",this.ZE),this.wc.wa(this.ba,"click",this.xia)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(128)&&(this.f.cursor(HB(this)),this.b.cursor(HB(this)),this.G.cursor(HB(this)),this.B(84),this.I(128)),this.J(4)&&(this.VP(),this.I(4)),this.J(64)){var t=(Math.max($.$b(this.g("outlineStroke")),5)-1)/2;if(this.Nb()){var e=this.fa.top;if(this.K().g("enabled"))t=e+this.fa.height/2,this.f.clear().moveTo(-4,t-6).lineTo(-2,t-8).lineTo(2,t-8).lineTo(4,t-6).lineTo(4,t+6).lineTo(2,t+8).lineTo(-2,t+8).lineTo(-4,t+6).close().moveTo(-1,t-5).lineTo(-1,t+5).moveTo(1,t-5).lineTo(1,t+5),this.b.clear().moveTo(-4,t-6).lineTo(-2,t-8).lineTo(2,t-8).lineTo(4,t-6).lineTo(4,t+6).lineTo(2,t+8).lineTo(-2,t+8).lineTo(-4,t+6).close().moveTo(-1,t-5).lineTo(-1,t+5).moveTo(1,t-5).lineTo(1,t+5);else{var i=e+this.fa.height;this.f.clear().moveTo(-t,e).lineTo(t,e).lineTo(t,i).lineTo(-t,i).close(),this.b.clear().moveTo(-t,e).lineTo(t,e).lineTo(t,i).lineTo(-t,i).close()}}else e=this.fa.left,this.K().g("enabled")?(t=e+this.fa.width/2,this.f.clear().moveTo(t-6,-4).lineTo(t-8,-2).lineTo(t-8,2).lineTo(t-6,4).lineTo(t+6,4).lineTo(t+8,2).lineTo(t+8,-2).lineTo(t+6,-4).close().moveTo(t-5,-1).lineTo(t+5,-1).moveTo(t-5,1).lineTo(t+5,1),this.b.clear().moveTo(t-6,-4).lineTo(t-8,-2).lineTo(t-8,2).lineTo(t-6,4).lineTo(t+6,4).lineTo(t+8,2).lineTo(t+8,-2).lineTo(t+6,-4).close().moveTo(t-5,-1).lineTo(t+5,-1).moveTo(t-5,1).lineTo(t+5,1)):(i=e+this.fa.height,this.f.clear().moveTo(e,-t).lineTo(e,t).lineTo(i,t).lineTo(i,-t).close(),this.b.clear().moveTo(e,-t).lineTo(e,t).lineTo(i,t).lineTo(i,-t).close());this.B(16),this.I(64)}if(this.J(16)){switch(this.ba.Qf(this.fa),this.G.Qf(this.fa),this.dO.shape(this.fa),t=this.g("fill"),this.ba.fill("none"==t?$.bm:t).stroke(null),t=this.g("selectedFill"),this.G.fill("none"==t?$.bm:t).stroke(null),this.P.stroke(this.g("outlineStroke")).fill(null),LB(this,this.f,this.fb),LB(this,this.b,this.Za),this.g("orientation")){case"top":t=this.fa,i=this.D,e=this.o,this.g("inverted")&&(i=FB-i,e=FB-e),i=t.left+i/FB*t.width;var n=t.left+e/FB*t.width;this.f.oc(1,0,0,1,i,0),this.b.oc(1,0,0,1,n,0),e=Math.min(i,n),i=Math.max(i,n),this.vB.shape(e,t.top,i-e,t.height),e=$.R(e,1),i=$.R(i,1),n=$.R(t.top,1);var s=$.R(t.top+t.height,1);this.P.clear().moveTo(t.left,n).lineTo(e,n).lineTo(e,s).lineTo(i,s).lineTo(i,n).lineTo(t.left+t.width,n);break;case"right":t=this.fa,e=this.D,i=this.o,this.g("inverted")||(e=FB-e,i=FB-i),e=t.top+e/FB*t.height,n=t.top+i/FB*t.height,this.f.oc(1,0,0,1,0,e),this.b.oc(1,0,0,1,0,n),i=Math.min(e,n),e=Math.max(e,n),this.vB.shape(t.left,i,t.width,e-i),this.P.clear().moveTo(t.left,t.top).lineTo(t.left,i).lineTo(t.left+t.width,i).lineTo(t.left+t.width,e).lineTo(t.left,e).lineTo(t.left,t.top+t.height);break;case"bottom":t=this.fa,i=this.D,e=this.o,this.g("inverted")&&(i=FB-i,e=FB-e),i=t.left+i/FB*t.width,n=t.left+e/FB*t.width,this.f.oc(1,0,0,1,i,0),this.b.oc(1,0,0,1,n,0),e=Math.min(i,n),i=Math.max(i,n),this.vB.shape(e,t.top,i-e,t.height),e=$.R(e,1),i=$.R(i,1),n=$.R(t.top,1),s=$.R(t.top+t.height,1),this.P.clear().moveTo(t.left,n).lineTo(e,n).lineTo(e,s).lineTo(i,s).lineTo(i,n).lineTo(t.left+t.width,n);break;case"left":t=this.fa,e=this.D,i=this.o,this.g("inverted")||(e=FB-e,i=FB-i),e=t.top+e/FB*t.height,n=t.top+i/FB*t.height,this.f.oc(1,0,0,1,0,e),this.b.oc(1,0,0,1,0,n),i=Math.min(e,n),e=Math.max(e,n),this.vB.shape(t.left,i,t.width,e-i),this.P.clear().moveTo(t.left+t.width,t.top).lineTo(t.left+t.width,i).lineTo(t.left,i).lineTo(t.left,e).lineTo(t.left+t.width,e).lineTo(t.left+t.width,t.top+t.height)}this.K().g("autoHide")||JB(this),this.I(16)}return this},$.g.yd=function(){var t=this.ja();return t=t?t.clone():$.kn(0,0,0,0),this.Oe()&&(this.J(4)&&(this.VP(),this.I(4)),this.Nb()?(t.height-=this.i.height,"top"==this.g("orientation")&&(t.top+=this.i.height)):(t.width-=this.i.width,"left"==this.g("orientation")&&(t.left+=this.i.width))),t},$.g.VP=function(){var t=this.ja(),e=this.Nb()?t.height:t.width,i=$.L(this.g("height"),e),n=$.L(this.g("maxHeight"),e),s=$.L(this.g("minHeight"),e);e=i,(0,window.isNaN)(s)||(e=Math.max(e,s)),(0,window.isNaN)(n)||(e=Math.min(i,n)),e=this.Nb()?this.padding().$j(e):this.padding().Lk(e),this.i.left=t.left,this.i.top=t.top,i=this.g("orientation"),this.Nb()?(this.i.width=t.width,this.i.height=e,"bottom"==i&&(this.i.top+=t.height-e)):(this.i.width=e,this.i.height=t.height,"right"==i&&(this.i.left+=t.width-e)),this.sb||this.Nb()?this.fa=this.padding().Ej(this.i):(e=this.padding(),"left"==i?(i=$.L(e.g("left"),this.i.width),t=$.L(e.g("top"),this.i.height),n=$.L(e.g("right"),this.i.width),e=$.L(e.g("bottom"),this.i.height)):(i=$.L(e.g("right"),this.i.width),t=$.L(e.g("bottom"),this.i.height),n=$.L(e.g("left"),this.i.width),e=$.L(e.g("top"),this.i.height)),this.fa.left=this.i.left+e,this.fa.top=this.i.top+i,this.fa.width=this.i.width-e-t,this.fa.height=this.i.height-i-n),this.B(80)},$.g.Iaa=function(t){t.Ju(),!$.to(this.Aa,t.relatedTarget)&&this.oh(t)&&(this.$a=!0,JB(this))},$.g.bia=function(t){t.Ju(),!$.to(this.Aa,t.relatedTarget)&&this.oh(t)&&(this.$a=!1,KB(this))},$.g.C6=function(t){t=t.target,$.J(t,$.Ag)&&(t==this.f?LB(this,this.f,this.fb=!0):t==this.b&&LB(this,this.b,this.Za=!0))},$.g.B6=function(t){t=t.target,$.J(t,$.Ag)&&(t==this.f?LB(this,this.f,this.fb=!1):t==this.b&&LB(this,this.b,this.Za=!1))},$.g.ZE=function(t){if($.J(t.currentTarget,$.ig)){var e,i=t.currentTarget;i!=this.f||this.Ba?i!=this.b||this.ea?i!=this.G||this.na||(this.na=e=new QB(this,this.G,!1)):this.ea=e=new QB(this,this.b,!0):this.Ba=e=new QB(this,this.f,!0),e&&(this.wc.wa(e,"start",this.Haa),this.wc.wa(e,"end",this.Gaa),e.lk(t.kf))}},$.g.xia=function(t){var e=$.Zj(this.Aa.Ja());t=this.Nb()?t.clientX-e.x:t.clientY-e.y,MB(this,"background-click","scrollerchangestart")&&(OB(this,!1,t),MB(this,"background-click","scrollerchangefinish"))},$.g.Haa=function(t){if(this.g("allowRangeChange")&&t.f!=this.na){t=HB(this);var e="thumb-drag"}else t=HB(this),e="selected-range-drag";return(e=MB(this,e,"scrollerchangestart"))&&(this.Ha++,this.f.cursor(null),this.b.cursor(null),this.G.cursor(null),$.uf(window.document.body,"cursor",t)),e},$.g.Gaa=function(t){this.Ha=Math.max(this.Ha-1,0),KB(this),this.f.cursor(HB(this)),this.b.cursor(HB(this)),this.G.cursor(HB(this)),$.uf(window.document.body,"cursor",""),t=this.g("allowRangeChange")&&t.f!=this.na?"thumb-drag":"selected-range-drag",MB(this,t,"scrollerchangefinish")},$.g.N3=function(t,e,i,n){return{type:t,startRatio:e,endRatio:i,source:n}},$.g.R=function(){$.qd(this.Aa),this.G=this.ba=this.P=this.b=this.f=this.Aa=null,$.qd(this.Ba),this.Ba=null,$.qd(this.ea),this.ea=null,$.qd(this.na),this.na=null,$.qd(this.aa),this.aa=null,$.qd(this.Wa),this.Wa=null,$.GB.u.R.call(this)},$.g.F=function(){var t=$.GB.u.F.call(this);return $.Tq(this,cI,t,"Scroller"),t.thumbs=this.K().F(),t},$.g.U=function(t,e){$.GB.u.U.call(this,t,e),$.Iq(this,cI,t,e),"thumbs"in t&&this.K().ga(!!e,t.thumbs)},$.H(QB,$.ag),$.g=QB.prototype,$.g.Faa=function(){$.p(this.Qj)&&($.ll.cancelAnimationFrame(this.Qj),this.rs(0))},$.g.ar=function(){this.i.Nb()?(this.deltaX=PB(this.i,this.b),this.deltaY=0):(this.deltaX=0,this.deltaY=PB(this.i,this.b))},$.g.ls=function(t,e){this.ba=this.i.Nb()?t:e,$.p(this.Qj)||(this.Qj=$.ll.requestAnimationFrame(this.rs))},$.g.VA=function(t){return this.i.Nb()?NB(this.i,this.b,t):0},$.g.xw=function(t){return this.i.Nb()?0:NB(this.i,this.b,t)},$.H(RB,$.V),$.Gq(RB,["fill","stroke"],"normal"),RB.prototype.B=function(t,e){return this.i.B(t,e)},RB.prototype.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},RB.prototype.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za};var dI={};$.sq(dI,[[0,"enabled",$.Cq],[0,"autoHide",$.Cq]]),$.U(RB,dI),$.g=RB.prototype,$.g.F=function(){var t={};return t.normal=this.Qa().F(),t.hovered=this.lb().F(),$.Tq(this,dI,t,"Scroller thumbs"),t},$.g.U=function(t,e){this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),$.Iq(this,dI,t)},$.g.Zd=function(t){return $.da(t)||null===t?{enabled:!!t}:null},$.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.enabled(i.enabled),!0)},$.g.R=function(){$.sd(this.ca,this.za),this.za=this.ca=null,RB.u.R.call(this)},$.H(SB,$.GB),$.xu(SB,$.GB),SB.prototype.Jr=function(t,e){return $.IB(this,t,e),this},SB.prototype.ec=function(t){return $.p(t)?($.IB(this,t,this.o/FB),this):this.D/FB},SB.prototype.Sb=function(t){return $.p(t)?($.IB(this,this.D/FB,t),this):this.o/FB};var eI=$.GB.prototype;eI.thumbs=eI.K,eI=RB.prototype,eI.normal=eI.Qa,eI.hovered=eI.lb,eI=SB.prototype,$.E("anychart.standalones.scroller",(function(){var t=new SB;return t.N($.nm("standalones.scroller")),t})),eI.setRange=eI.Jr,eI.startRatio=eI.ec,eI.endRatio=eI.Sb,eI.parentBounds=eI.ja,eI.getRemainingBounds=eI.yd,eI.container=eI.O,eI.padding=eI.padding,eI.draw=eI.W,$.H($.TB,$.GB);var fI={};$.rq(fI,0,"position",(function(t,e){return $.zk(uda,t,e||"after-axes")})),$.U($.TB,fI),$.TB.prototype.F=function(){var t=$.TB.u.F.call(this);return $.Tq(this,fI,t),t},$.TB.prototype.U=function(t,e){$.TB.u.U.call(this,t,e),$.Iq(this,fI,t,e)},$.g=UB.prototype,$.g.BB=function(t,e){return t=$.Za($.N(t),0,1),(0,window.isNaN)(t)&&(t=this.i),e=$.Za($.N(e),0,1),(0,window.isNaN)(e)&&(e=this.b),this.f=null,this.i==t&&this.b==e||(this.i=t,this.b=e,this.pa.B(268435456,1)),this},$.g.W5=function(t,e,i){return this.f={start:t,end:e,scale:i},this.pa.B(268435456,1),this},$.g.V5=function(t,e,i){return this.f={count:$.P(t),scale:i,qfa:!!e},this.pa.B(268435456,1),this},$.g.Fz=function(){return VB(this),this.i},$.g.Ez=function(){return VB(this),this.b},$.g.wS=function(t){return $.p(t)?(t=!!t,this.o!=t&&(this.o=t),this):this.o},$.g.N=function(t){return $.p(t)&&((0,window.isNaN)(+t)?$.C(t)&&(this.wS(t.continuous),$.p(t.startValue)&&$.p(t.endValue)?this.W5(t.startValue,t.endValue,$.J(t.scale,Xs)?t.scale:void 0):$.p(t.pointsCount)?this.V5(t.pointsCount,t.fromEnd,$.J(t.scale,Xs)?t.scale:void 0):this.BB(t.startRatio,t.endRatio)):this.BB(0,1/Math.abs(+t||1))),this},$.g.F=function(){return{startRatio:this.Fz(),endRatio:this.Ez(),continuous:this.o}};var gI=UB.prototype;gI.setTo=gI.BB,gI.setToValues=gI.W5,gI.setToPointsCount=gI.V5,gI.getStartRatio=gI.Fz,gI.getEndRatio=gI.Ez,gI.continuous=gI.wS,$.H($.WB,$.wA);var hI=function(){var t={};return $.sq(t,[[0,"zAngle",function(t){return $.Za($.N(t),0,90)}],[0,"zAspect",function(t){return $.ea(t)?Math.max(t,0):t}],[0,"zDistribution",$.Dq],[0,"zPadding",function(t){return Math.max($.N(t),0)||0}]]),t}();$.U($.WB,hI),$.g=$.WB.prototype,$.g.sa=1879048192|$.wA.prototype.sa,$.g.Tq=function(t){return $.p(t)?(this.ka(),this.Uc.N(t),this.da(!0),this):this.Uc},$.g.Uq=function(t){return $.p(t)?(this.ka(),this.bg.N(t),this.da(!0),this):this.bg},$.g.Mp=function(t){return this.D||(this.D=new $.TB,this.D.kb(this),$.K(this.D,this.$Z,this),this.wc.wa(this.D,"scrollerchange",this.qK),this.wc.wa(this.D,"scrollerchangefinish",this.qK),this.B(536870916,1),$.W(this,"xScroller",this.D)),$.p(t)?(this.D.N(t),this):this.D},$.g.Ur=function(t){return this.G||(this.G=new $.TB,this.G.kb(this),$.K(this.G,this.$Z,this),this.wc.wa(this.G,"scrollerchange",this.qK),this.wc.wa(this.G,"scrollerchangefinish",this.qK),this.B(1073741828,1),$.W(this,"yScroller",this.G)),$.p(t)?(this.G.N(t),this):this.G},$.g.$Z=function(t){var e=t.target==this.Mp()?536870912:1073741824,i=1;$.X(t,8)&&(e|=4,i|=8),this.B(e,i)},$.g.qK=function(t){var e=t.target==this.Mp()?this.Uc:this.bg;e.wS()^"scrollerchangefinish"==t.type&&(t.preventDefault(),this.ka(),e.BB(t.startRatio,t.endRatio),this.da(!0))},$.g.Gt=function(t,e){return new $.xB(this,this,t,e,!0)},$.g.Ss=function(t){return $.zk(xda,t,"line")},$.g.mD=function(t){return t=XB(this.Ur(),t),this.Dk=t.E5,t=XB(this.Mp(),t.A0),$.WB.u.mD.call(this,t.A0,t.E5)},$.g.S_=function(t,e){var i=YB(this,t,this.Mp(),e),n=this.Ur();return YB(this,i,n,this.Dk)},$.g.KR=function(t){if(this.J(268435456)){for(var e in this.mm){var i=this.Tq().Fz(),n=1/(this.Tq().Ez()-i);Ys(this.mm[e],n,i)}$.IB(this.Mp(),this.Tq().Fz(),this.Tq().Ez()),t||this.B(570687488)}},$.g.LR=function(t){if(this.J(268435456)){for(var e in this.pn){var i=this.Uq().Fz(),n=1/(this.Uq().Ez()-i);Ys(this.pn[e],n,i)}$.IB(this.Ur(),this.Uq().Fz(),this.Uq().Ez()),t||this.B(1107296256)}},$.g.Q_=function(){this.J(268435456)&&(this.KR(!0),this.LR(!0),this.B(1644167168))},$.g.pb=function(){$.WB.u.pb.call(this),this.I(268435456)},$.g.r2=function(){return this.Uc.Fz()},$.g.q2=function(){return this.Uc.Ez()},$.g.XT=function(){return 1610612736|$.WB.u.XT.call(this)},$.g.jR=function(){$.WB.u.jR.call(this),this.J(536870912)&&(this.Mp().O(this.Na),this.Mp().W(),this.I(536870912)),this.J(1073741824)&&(this.Ur().O(this.Na),this.Ur().W(),this.I(1073741824))},$.g.d6=function(t,e,i){var n=this.P1(e);return e=n.transform(i,0),i=n.transform(i,1),"selected"!=t||1>=Math.min(e,i)&&0<=Math.max(e,i)},$.g.P1=function(t){return t.tl()},$.g.ht=function(t,e,i){$.WB.u.ht.call(this,t,e,i),$.Iq(this,hI,t),"xScroller"in t&&this.Mp().ga(!!i,t.xScroller),"yScroller"in t&&this.Ur().ga(!!i,t.yScroller);var n=t.xZoom;$.C(n)&&($.ea(n.scale)||$.z(n.scale))?(i=n.scale,n.scale=e[n.scale],this.Tq(n),n.scale=i):this.Tq(n),t=t.yZoom,$.C(t)&&($.ea(t.scale)||$.z(t.scale))?(i=t.scale,t.scale=e[t.scale],this.Uq(t),t.scale=i):this.Uq(t)},$.g.F=function(){var t=$.WB.u.F.call(this);return $.Tq(this,hI,t),t.xScroller=this.Mp().F(),t.yScroller=this.Ur().F(),t.xZoom=this.Tq().F(),t.yZoom=this.Uq().F(),{chart:t}},$.g.R=function(){$.WB.u.R.call(this),$.sd(this.D,this.G),this.G=this.D=null},$.g=$.ZB.prototype,$.g.zs=ba(29),$.g.Yt=function(){return $.aC(this),this.b.concat()},$.g.Uj=function(){return 0==this.i},$.g.clear=function(){this.f={},this.i=this.b.length=0},$.g.remove=function(t){return!!$.$B(this.f,t)&&(delete this.f[t],this.i--,this.b.length>2*this.i&&$.aC(this),!0)},$.g.get=function(t,e){return $.$B(this.f,t)?this.f[t]:e},$.g.set=function(t,e){$.$B(this.f,t)||(this.i++,this.b.push(t)),this.f[t]=e},$.g.forEach=function(t,e){for(var i=this.Yt(),n=0;n<i.length;n++){var s=i[n],a=this.get(s);t.call(e,a,s,this)}},$.g.clone=function(){return new $.ZB(this)},$.H($.bC,Cz),$.bC.prototype.update=function(){for(var t=0;t<this.Wb.length;t++)this.Wb[t].update();this.Wb.length&&this.Wb[0].uG((0,$.Ln)())},$.H($.cC,$.V),$.g=$.cC.prototype,$.g.ra=9,$.g.g=$.ir,$.g.jg=function(t){return $.p(t)&&(this.Xb=t),this.Xb},$.g.bh=$.hr,$.g.Xd=function(){var t=[this.oa];return this.Y&&(t=$.Ga(t,this.Y.Xd())),t},$.g.Wd=function(){var t=[this.Pa];return this.Y&&(t=$.Ga(t,this.Y.Wd())),t};var gea=$.cC.prototype,iI={};$.rq(iI,1,"stroke",$.Pq),$.rq(iI,1,"fill",$.Qq),gea.mR=iI,$.U($.cC,$.cC.prototype.mR),$.g=$.cC.prototype,$.g.content=function(t){return $.p(t)?(this.Qd!=t&&(this.b=$.J(t,$.ig)||$.J(t,$.Y)?this.Qd:this.gi,this.gi=this.Qd=t,this.ak||(this.ak=$.ok()),$.J(t,$.ig)?this.ak.hc(t):$.J(t,$.Y)?(t.ka(),t.O(this.ak)):(t=$.Xp(t))?(this.gi=t,t.ka(),t.O(this.ak)):this.gi=null,this.va(8)),this):this.Qd},$.g.ce=function(){var t=this.ya.ZT();return{x:t[0],y:t[1]}},$.g.rb=function(){var t=this.ya.L1();return t?t.clone():$.kn(0,0,0,0)},$.g.eG=function(){if(this.b){var t=this.b;$.J(t,$.ig)?(this.ak.Ja().gc("renderfinish",this.ya.kK,!1,this.ya),t.remove()):(t.ka(),$.J(t,$.Tu)?$.Zu(t)&&$.Zu(t).clear(t.ma()):$.J(t,$.ey)?$.fy(t)&&$.fy(t).clear(t.ma()):$.J(t,$.Y)&&(t.O(null),t.remove()),this.gi.gc("chartdraw",this.ya.kL,!1,this.ya),t.da(!1)),this.b=null}},$.g.U=function(t,e){$.cC.u.U.call(this,t,e),$.Iq(this,this.mR,t,e),"content"in t&&this.content(t.content)},$.g.F=function(){var t={};return $.Tq(this,this.mR,t,"Map axes props"),this.gi&&$.J(this.gi,$.ux)&&(t.content=this.gi.RB()),t},$.g.R=function(){this.b=this.gi,this.eG(),this.gi=this.Qd=null,$.sd(this.ak),this.ak=null,$.cC.u.R.call(this)};var jI=$.cC.prototype;jI.content=jI.content,jI.getPoint=jI.ce,jI.getBounds=jI.rb,$.H($.dC,$.Fg),$.dC.prototype.clear=function(){for(var t;t=this.bc();)this.b.push(this.Cj(t-1));return this},$.dC.prototype.R=function(){for(var t=this.b.length;t--;)$.qd(this.b[t]);this.b=null,delete this.o,delete this.i,this.f=null,$.dC.u.R.call(this)},$.H(fC,$.JA),$.PG[1]=fC,$.g=fC.prototype,$.g.type=1,$.g.flags=225|$.dB,$.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},$.g.vea=function(t,e,i,n,s,a,o){a=t.j("nextZeroX");var r=t.j("nextZero"),l=t.j("nextValueX");t=t.j("nextValue"),(0,window.isNaN)(r)||(0,window.isNaN)(t)?(gC(this,this.b,e,i,n,s,o),this.f=[n,s]):(gC(this,this.b,l,t,a,r,o),this.f=[a,r])},$.g.wea=function(t,e,i,n,s,a,o){gC(this,this.b,e,i,n,s,o),this.i=e,this.Mi=s},$.g.Eea=function(t,e,i,n,s,a){var o=this.bd,r=this.nh(a,this.prevValue),l={};l[r.stroke]=!0,l[r.fill]=!0,l[r.qe]=!0,o=o.ed(this.Gc,l),l=t.j("prevZeroX");var h=t.j("prevZero"),c=t.j("prevValueX"),u=t.j("prevValue");(0,window.isNaN)(h)||(0,window.isNaN)(u)||(hC(this,o,c,u,h,a),this.f.push(l,h),this.Km(),gC(this,o,e,i,n,s,r),this.f=[n,s]),hC(this,o,e,i,s,a),this.f.push(n,s),e=t.j("nextZeroX"),i=t.j("nextZero"),n=t.j("nextValueX"),t=t.j("nextValue"),(0,window.isNaN)(i)||(0,window.isNaN)(t)||(this.Km(),gC(this,o,n,t,e,i,r),this.f=[e,i])},$.g.Fea=function(t,e,i,n,s,a){t=this.bd;var o=this.nh(a,this.prevValue),r={};r[o.stroke]=!0,r[o.fill]=!0,r[o.qe]=!0,t=t.ed(this.Gc,r),hC(this,t,e,i,s,a),this.i=n},$.g.Gd=function(t){fC.u.Gd.call(this,t),this.ec=!!this.X.g("closed"),this.fb=!1,this.Sb=this.ea=this.sb=this.D=window.NaN,this.X.L2()?(this.Za=this.vea,this.$a=this.Eea):(this.Za=this.wea,this.$a=this.Fea)},$.g.jA=function(t,e){(0,window.isNaN)(this.D)&&(this.fb=!0),fC.u.jA.call(this,t,e)},$.g.Qo=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.nh(i,this.prevValue),s={};s[n.stroke]=!0,s[n.fill]=!0,s[n.qe]=!0,this.b=e.ed(this.Gc,s),e=t.j("x"),s=t.j("value");var a=t.j("zeroX"),o=t.j("zero");this.Za(t,e,s,a,o,i,n),(0,window.isNaN)(this.D)&&(this.D=e,this.sb=s,this.ea=a,this.Sb=o),this.na=e,this.P=s,this.prevValue=i,this.Ka=o,this.K=n},$.g.ug=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n=t.j("x"),s=t.j("value"),a=t.j("zeroX"),o=t.j("zero");this.$a(t,n,s,a,o,e),this.na=n,this.P=s,this.prevValue=e,this.Ka=o,this.K=i},$.g.Km=function(){if(this.G){var t=this.b,e=this.K,i=t[e.fill];if(t=t[e.qe],this.f){for(e=this.f.length-1;0<=e;e-=2){var n=this.f[e-1],s=this.f[e];s=(s=$.R(s,1))<this.P?Math.floor(s):Math.ceil(s),$.IA(i,this.xa,n,s),$.IA(t,this.xa,n,s)}i.close(),t.close(),this.f=null}else(0,window.isNaN)(this.i)||(e=(e=$.R(this.Mi,1))<this.P?Math.floor(e):Math.ceil(e),$.IA(i,this.xa,this.i,e),$.IA(t,this.xa,this.i,this.Mi),i.close(),t.close())}},$.g.Rl=function(){this.ec&&!(0,window.isNaN)(this.D)&&(this.Ba||this.G&&!this.fb)&&(hC(this,this.b,this.D,this.sb,this.Ka,this.prevValue),this.X.gh()?this.f.push(this.ea,this.Sb):this.i=this.ea),fC.u.Rl.call(this)},$.H($.iC,$.JA),$.PG[4]=$.iC,$.g=$.iC.prototype,$.g.type=4,$.g.flags=514,$.g.Kh={circle:"circle",hatchFill:"circle",negative:"circle",negativeHatchFill:"circle"},$.g.ug=function(t,e){if(0>t.j("size"))var i="negative",n="negativeHatchFill";else i="circle",n="hatchFill";var s={};s[i]=!0,s[n]=!0,i=this.bd.ed(e,s),jC(this,t,i)},$.g.yt=function(t){var e=t.j("shapes");jC(this,t,e)},$.H(kC,$.JA),$.PG[5]=kC,$.g=kC.prototype,$.g.type=5,$.g.flags=263744|$.UG,$.g.Kh={rising:"path",risingHatchFill:"path",falling:"path",fallingHatchFill:"path"},$.g.Np=["open","high","low","close"],$.g.El="close",$.g.ug=function(t,e){var i=Number(t.get("open"))<Number(t.get("close"));if(i)var n="rising",s="risingHatchFill";else n="falling",s="fallingHatchFill";var a={};a[n]=!0,a[s]=!0,a=this.bd.ed(e,a);var o=t.j("x"),r=t.j("open"),l=t.j("high"),h=t.j("low"),c=t.j("close"),u=this.o/2;n=a[n],$.HA(n,this.xa,o,l),$.IA(n,this.xa,o,i?c:r),$.HA(n,this.xa,o-u,r),$.IA(n,this.xa,o+u,r,o+u,c,o-u,c,o-u,r),$.HA(n,this.xa,o,h),$.IA(n,this.xa,o,i?r:c),n=a[s],$.HA(n,this.xa,o,l),$.IA(n,this.xa,o,i?c:r),$.HA(n,this.xa,o-u,r),$.IA(n,this.xa,o+u,r,o+u,c,o-u,c,o-u,r),$.HA(n,this.xa,o,h),$.IA(n,this.xa,o,i?r:c)},$.H($.lC,$.JA),$.PG[6]=$.lC,$.g=$.lC.prototype,$.g.type=6,$.g.flags=263905,$.g.Kh={path:"path",hatchFill:"path"},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.path]=!0,a[s.qe]=!0,t.j("names",s),i=i.ed(e,a),this.EF(t,i[s.path],i[s.qe]),this.prevValue=n},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("names");for(e in i)i[e].clear();this.EF(t,i[n.path],i[n.qe])},$.g.EF=function(t,e,i){if(!t.j("skipDrawing")){var n=t.j("x"),s=t.j("zero");t=t.j("value");var a=(n-=this.o/2)+this.o,o=$.$b(e.stroke());this.wv&&(n=$.R(n,o),a=$.R(a,o),t=$.R(t,o),s=this.xa?(s=$.R(s,1))<t?Math.floor(s):Math.ceil(s):$.R(s,o)),$.HA(e,this.xa,n,t),$.IA(e,this.xa,a,t,a,s,n,s),e.close(),$.HA(i,this.xa,n,t),$.IA(i,this.xa,a,t,a,s,n,s),i.close()}},$.H(mC,$.JA),$.PG[19]=mC,$.g=mC.prototype,$.g.type=19,$.g.flags=34505,$.g.Kh={stroke:"path"},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.stroke]=!0,t.j("names",s),i=i.ed(e,a),nC(this,t,i,s),this.prevValue=n},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("names");for(e in i)i[e].clear();nC(this,t,i,n)},$.H($.oC,$.JA),$.PG[8]=$.oC,$.g=$.oC.prototype,$.g.type=8,$.g.flags=32969|$.dB,$.g.Kh={stroke:"path"},$.g.Gd=function(t){$.oC.u.Gd.call(this,t),this.ud=!!this.X.g("closed"),this.ec=!1,this.fb=this.ea=window.NaN},$.g.jA=function(){(0,window.isNaN)(this.ea)&&(this.ec=!0)},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n={};n[i.stroke]=!0,this.b=this.bd.ed(this.Gc,n),n=t.j("x"),t=t.j("value"),$.HA(this.b[i.stroke],this.xa,n,t),(0,window.isNaN)(this.ea)&&(this.ea=n,this.fb=t),this.na=n,this.P=t,this.prevValue=e,this.K=i},$.g.ug=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.nh(i,this.prevValue),s={};s[n.stroke]=!0,e=e.ed(this.Gc,s),s=t.j("x");var a=t.j("value");if(e!=this.b){var o=this.na,r=this.P,l=KA(this,i);this.ba&&l?(r=t.j("zero"),t=(s-this.na)*(r-this.P)/(a-this.P)+this.na):this.Ha&&!this.ba?t=o:(t=o+(s-o)/2,r+=(a-r)/2),$.IA(this.b[this.K.stroke],this.xa,t,r),this.b=e,$.HA(this.b[n.stroke],this.xa,t,r)}$.IA(this.b[n.stroke],this.xa,s,a),this.na=s,this.P=a,this.prevValue=i,this.K=n},$.g.Rl=function(){this.QZ(),$.oC.u.Rl.call(this)},$.g.QZ=function(){this.ud&&!(0,window.isNaN)(this.ea)&&(this.Ba||this.G&&!this.ec)&&$.IA(this.b[this.K.stroke],this.xa,this.ea,this.fb)},$.H($.pC,$.JA),$.PG[9]=$.pC,$.g=$.pC.prototype,$.g.type=9,$.g.flags=8832,$.g.Kh={path:"path",hatchFill:"path"},$.g.WB=function(t,e){var i=t.j("shapes"),n=t.j("names");i&&(i[n.path].clear(),i[n.qe].clear(),$.qC(this,t,e,i,n))},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.path]=!0,a[s.qe]=!0,t.j("names",s),i=i.ed(e,a),$.qC(this,t,e,i,s),this.prevValue=n},$.H(rC,$.JA),$.PG[10]=rC,$.g=rC.prototype,$.g.type=10,$.g.flags=263752|$.UG,$.g.Kh={rising:"path",falling:"path"},$.g.Np=["open","high","low","close"],$.g.El="close",$.g.ug=function(t,e){var i=Number(t.get("open"))<Number(t.get("close"))?"rising":"falling",n={};n[i]=!0;var s=this.bd.ed(e,n);n=t.j("x");var a=t.j("open"),o=t.j("high"),r=t.j("low"),l=t.j("close"),h=this.o/2;i=s[i],$.HA(i,this.xa,n,o),$.IA(i,this.xa,n,r),$.HA(i,this.xa,n-h,a),$.IA(i,this.xa,n,a),$.HA(i,this.xa,n+h,l),$.IA(i,this.xa,n,l)},$.H(sC,$.JA),$.PG[11]=sC,$.g=sC.prototype,$.g.type=11,$.g.flags=$.dB|$.fm|0,$.g.Kh={fill:"path",hatchFill:"path",lowStroke:"path",highStroke:"path"},$.g.Np=["low","high"],$.g.El="high",$.g.nh=function(t,e){var i={},n="fill",s="hatchFill";return t>e?this.qc&&(n="highFill",s="highHatchFill"):this.Uc&&(n="lowFill",s="lowHatchFill"),i.bV="highStroke",i.$V="lowStroke",i.fill=n,i.qe=s,i},$.g.Qo=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]),n=this.nh(n,i),(i={})[n.bV]=!0,i[n.$V]=!0,i=e.ed(this.Gc,i),this.P=i[n.bV],this.ea=i[n.$V],(i={})[n.fill]=!0,i[n.qe]=!0,this.b=e.ed(this.Gc,i),e=t.j("x"),i=t.j("high"),t=t.j("low");var s=this.b[n.fill],a=this.b[n.qe];$.HA(s,this.xa,e,t),$.IA(s,this.xa,e,i),$.HA(a,this.xa,e,t),$.IA(a,this.xa,e,i),$.HA(this.P,this.xa,e,i),this.f=[e,t,s,a],this.D=e,this.K=i,this.na=t,this.i=n},$.g.ug=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]),n=this.nh(n,i),(i={})[n.fill]=!0,i[n.qe]=!0,e=e.ed(this.Gc,i),i=t.j("x");var s=t.j("high"),a=t.j("low");if(this.b!=e){var o=vn(this.D,this.K,i,s,this.D,this.na,i,a);if(o){t=this.b[this.i.fill];var r=this.b[this.i.qe];$.IA(t,this.xa,o.x,o.y),$.IA(r,this.xa,o.x,o.y),this.f.push(o.x,o.y,t,r),this.b=e,t=this.b[n.fill],r=this.b[n.qe],$.HA(t,this.xa,o.x,o.y),$.HA(r,this.xa,o.x,o.y),this.f.push(o.x,o.y,t,r)}}t=this.b[n.fill],r=this.b[n.qe],$.IA(t,this.xa,i,s),$.IA(r,this.xa,i,s),$.IA(this.P,this.xa,i,s),this.f.push(i,a,t,r),this.D=i,this.K=s,this.na=a,this.i=n},$.g.Km=function(){if(this.G&&this.f){for(var t=!0,e=null,i=this.f.length-1;0<=i;i-=4){var n=this.f[i-3],s=this.f[i-2],a=this.f[i-1],o=this.f[i];e&&a!=e?($.HA(a,this.xa,n,s),$.HA(o,this.xa,n,s)):($.IA(a,this.xa,n,s),$.IA(o,this.xa,n,s)),t?($.HA(this.ea,this.xa,n,s),t=!1):$.IA(this.ea,this.xa,n,s),e=a}this.f=null}},$.H($.tC,$.JA),$.PG[12]=$.tC,$.g=$.tC.prototype,$.g.type=12,$.g.flags=263680|$.fm,$.g.Kh={path:"path",hatchFill:"path"},$.g.Np=["low","high"],$.g.El="high",$.g.ug=function(t,e){if(!t.j("skipDrawing")){var i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]),n=this.nh(n,i),(i={})[n.path]=!0,i[n.qe]=!0,t.j("name",n.path),i=this.bd.ed(e,i);var s=t.j("x"),a=t.j("high"),o=t.j("low"),r=(s-=this.o/2)+this.o,l=$.$b(i[n.path].stroke());this.wv&&(s=$.R(s,l),r=$.R(r,l)),a=$.R(a,l),o=$.R(o,l),l=i[n.path],$.HA(l,this.xa,s,o),$.IA(l,this.xa,r,o),$.IA(l,this.xa,r,a),$.IA(l,this.xa,s,a),l.close(),l=i[n.qe],$.HA(l,this.xa,s,o),$.IA(l,this.xa,r,o),$.IA(l,this.xa,r,a),$.IA(l,this.xa,s,a),l.close()}},uC.prototype.xa=function(t){return $.p(t)?(this.K=t,this):this.K},uC.prototype.aa=function(t){return $.p(t)?(this.i=t,this):this.i},uC.prototype.f=function(t){var e,i,n=arguments;for(e=0;e<this.Ca.length;e++){var s=this.Ca[e],a=0;for(i=n.length;a<i;a++)switch(n[a]){case"m":if(this.K)var o=n[a+2],r=n[a+1];else o=n[a+1],r=n[a+2];s.moveTo(o,r),a+=2;break;case"bs":if(this.K){o=n[a+2],r=n[a+1];var l=n[a+4],h=n[a+3]}else o=n[a+1],r=n[a+2],l=n[a+3],h=n[a+4];s.b?(s.moveTo(o,r),s.lineTo(l,h)):s.moveTo(l,h),a+=4;break;case"bc":this.K?(l=n[a+2],h=n[a+1]):(l=n[a+1],h=n[a+2]),s.b&&s.lineTo(l,h),a+=2;break;case"c":this.K?(o=n[a+2],r=n[a+1],l=n[a+4],h=n[a+3]):(o=n[a+1],r=n[a+2],l=n[a+3],h=n[a+4]),s.lK(o,r,l,h),a+=4;break;case"l":this.K?(o=n[a+2],r=n[a+1]):(o=n[a+1],r=n[a+2]),s.lineTo(o,r)}}},$.H(DC,$.JA),$.PG[13]=DC,$.g=DC.prototype,$.g.type=13,$.g.flags=$.dB|$.fm|0,$.g.Kh={fill:"path",hatchFill:"path",lowStroke:"path",highStroke:"path"},$.g.Np=["low","high"],$.g.nh=function(t,e){var i={},n="fill",s="hatchFill";return t>e?this.qc&&(n="highFill",s="highHatchFill"):this.Uc&&(n="lowFill",s="lowHatchFill"),i.bV="highStroke",i.$V="lowStroke",i.fill=n,i.qe=s,i},$.g.Gd=function(t){DC.u.Gd.call(this,t),this.i.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.i.Ha=t),this.D.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.D.Ha=t),this.K=[]},$.g.Qo=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]);var s={highStroke:!0,lowStroke:!0};s=e.ed(this.Gc,s),this.P=s.highStroke,this.ea=s.lowStroke;var a=this.nh(n,i);(s={})[a.fill]=!0,s[a.qe]=!0,e.ed(this.Gc,s),e=t.j("x"),s=t.j("high"),t=t.j("low"),BC(this.i,!1),this.i.Ca=[this.P],(s=zC(this.i,e,s))&&this.K.push.apply(this.K,s),s=this.X.$().current(),a=this.X.$().ma(),this.f=[e,t,n,i,s,a]},$.g.ug=function(t){var e=this.bd,i=this.X.Be(),n=t.get(i[1]);i=t.get(i[0]);var s=this.nh(n,i),a={};a[s.fill]=!0,a[s.qe]=!0,e.ed(this.Gc,a),e=t.j("x"),s=t.j("high"),t=t.j("low"),(s=zC(this.i,e,s))&&this.K.push.apply(this.K,s),s=this.X.$().current(),a=this.X.$().ma(),this.f.push(e,t,n,i,s,a)},$.g.Km=function(){var t=this.bd;if(this.G){var e=AC(this.i);if(e&&this.K.push.apply(this.K,e),this.i.Ca=[this.ea],BC(this.i,!0),BC(this.D,!0),e=[],this.f){for(var i=!0,n=this.X.cg(),s=this.f.length-1;0<=s;s-=6){var a=this.f[s-2],o=this.f[s-3],r=this.f[s-4],l=this.f[s-5];n.Iu(this.f[s-1],this.f[s]),o=this.nh(o,a),a=t.ed(this.Gc,n.j("shapeNames")),zC(this.D,l,r),zC(this.i,l,r),i?(this.b=a,r=a[o.fill],l=a[o.qe],this.D.Ca=[r,l],i=!1):(r=s==this.f.length-7||5==s?6:12,r=$.Ca(this.K,this.K.length-r,r),$.qa($.Ca,e,void 0,0).apply(null,r),this.b!=a&&(r=[r=a[o.fill],l=a[o.qe]],(o=this.D).b=e.slice(),o.P=r,e.length=0,this.b=a))}$.qa($.Ca,this.D.Wh,void 0,0).apply(null,e),AC(this.D),AC(this.i),this.f=null}}},$.H(EC,$.JA),$.PG[14]=EC,$.g=EC.prototype,$.g.type=14,$.g.flags=$.dB|$.fm|131072,$.g.Kh={fill:"path",hatchFill:"path",highStroke:"path",lowStroke:"path"},$.g.Np=["low","high"],$.g.El="high",$.g.Gd=function(t){EC.u.Gd.call(this,t),this.P=this.X.g("stepDirection")||"center"},$.g.Qo=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("high");t=t.j("low"),$.HA(e.fill,this.xa,i,t),$.IA(e.fill,this.xa,i,n),$.HA(e.hatchFill,this.xa,i,t),$.IA(e.hatchFill,this.xa,i,n),$.HA(e.highStroke,this.xa,i,n),this.D=i,this.i=n,this.f=[i,t]},$.g.ug=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("high");t=t.j("low");var s=e.fill,a=e.hatchFill;switch(e=e.highStroke,this.P){case"forward":$.IA(s,this.xa,i,this.i),$.IA(a,this.xa,i,this.i),$.IA(e,this.xa,i,this.i);break;case"backward":$.IA(s,this.xa,this.D,n),$.IA(a,this.xa,this.D,n),$.IA(e,this.xa,this.D,n);break;default:var o=(i+this.D)/2;$.IA(s,this.xa,o,this.i,o,n),$.IA(a,this.xa,o,this.i,o,n),$.IA(e,this.xa,o,this.i,o,n)}$.IA(s,this.xa,i,n),$.IA(a,this.xa,i,n),$.IA(e,this.xa,i,n),this.D=i,this.i=n,this.f.push(i,t)},$.g.Km=function(){if(this.G&&this.f){var t=this.bd.ed(this.Gc),e=t.fill,i=t.hatchFill;t=t.lowStroke;for(var n=window.NaN,s=window.NaN,a=!0,o=this.f.length-1;0<=o;o-=2){var r=this.f[o-1],l=this.f[o];if(a)$.HA(t,this.xa,r,l),a=!1;else switch(this.P){case"forward":$.IA(e,this.xa,n,l),$.IA(i,this.xa,n,l),$.IA(t,this.xa,n,l);break;case"backward":$.IA(e,this.xa,r,s),$.IA(i,this.xa,r,s),$.IA(t,this.xa,r,s);break;default:n=(r+n)/2,$.IA(e,this.xa,n,s,n,l),$.IA(i,this.xa,n,s,n,l),$.IA(t,this.xa,n,s,n,l)}$.IA(e,this.xa,r,l),$.IA(i,this.xa,r,l),$.IA(t,this.xa,r,l),n=r,s=l}e.close(),i.close(),this.f=null}},$.H(FC,$.JA),$.PG[31]=FC,$.g=FC.prototype,$.g.type=31,$.g.flags=295433|$.fm,$.g.Kh={stroke:"path"},$.g.Gd=function(t){FC.u.Gd.call(this,t),this.wv=2<this.o},$.g.Np=["low","high"],$.g.El="high",$.g.ug=function(t,e){var i=this.X.Be(),n=t.get(i[1]),s=t.get(i[0]),a={};i="stroke",n>s?this.Hd&&(i="highStroke"):this.Od&&(i="lowStroke"),a[i]=!0,t.j("name",i),n=this.bd.ed(e,a),GC(this,t,n,i)},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("name");for(e in i)i[e].clear();GC(this,t,i,n)},$.H(HC,$.JA),$.PG[15]=HC,$.g=HC.prototype,$.g.type=15,$.g.flags=32969|$.dB,$.g.Kh={stroke:"path"},$.g.Gd=function(t){HC.u.Gd.call(this,t),this.f.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.f.Ha=t)},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n=t.j("x");t=t.j("value");var s={};s[i.stroke]=!0,this.b=this.bd.ed(this.Gc,s),this.f.Ca=[this.b[i.stroke]],BC(this.f,!1),zC(this.f,n,t),this.P=t,this.prevValue=e},$.g.ug=function(t){var e=t.get(this.X.Be()[0]),i=this.bd,n=this.nh(e,this.prevValue),s={};s[n.stroke]=!0,i=i.ed(this.Gc,s);var a=t.j("x");if(s=t.j("value"),zC(this.f,a,s),i!=this.b){var o;a=this.P;var r=KA(this,e);o=this.ba&&r?t.j("zero"):this.Ha&&!this.ba?a:"middle",t=this.f,n=[i[n.stroke]],t.b=o,t.P=n,this.b=i}this.P=s,this.prevValue=e},$.g.Km=function(){this.G&&AC(this.f)},$.g.R=function(){this.f.Ca=null,HC.u.R.call(this)},$.H(IC,$.JA),$.PG[16]=IC,$.g=IC.prototype,$.g.type=16,$.g.flags=225|$.dB,$.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},$.g.Gd=function(t){IC.u.Gd.call(this,t),this.i.xa(this.xa),t=this.X.iB(),$.p(t)&&(this.i.Ha=t)},$.g.jA=function(t){if(this.Ba){if(this.X.gh()){var e=t.j("x"),i=t.j("zero");t=t.j("zeroMissing"),this.f.push(e,i,t)}}else this.Km()},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n=t.j("x"),s=t.j("zero"),a=t.j("zeroMissing");t=t.j("value"),s=Wo(s),t=Wo(t),BC(this.i,!1),this.i.aa(s),zC(this.i,n,t);var o={};o[i.stroke]=!0,o[i.fill]=!0,o[i.qe]=!0,this.b=this.bd.ed(this.Gc,o),(o=this.b[i.fill]).b=!0;var r=this.b[i.qe];r.b=!0,(i=this.b[i.stroke]).b=!1,this.i.Ca=[o,i,r],this.X.gh()?this.f=[n,s,a]:this.Mi=s,this.P=t,this.prevValue=e},$.g.ug=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.D=this.nh(i,this.prevValue),s=t.j("x"),a=t.j("zero"),o=t.j("zeroMissing");t=t.j("value"),a=Wo(a),t=Wo(t),zC(this.i,s,t);var r={};if(r[n.stroke]=!0,r[n.fill]=!0,r[n.qe]=!0,(e=e.ed(this.Gc,r))!=this.b){var l;r=this.P;var h=KA(this,i);l=this.ba&&h?a:this.Ha&&!this.ba?r:"middle",(r=e[n.fill]).b=!0,(h=e[n.qe]).b=!0;var c=e[n.stroke];c.b=!1,r=[r,c,h],(n=this.i).b=l,n.P=r,this.i.aa(a),this.b=e}this.X.gh()&&this.f.push(s,a,o),this.P=t,this.prevValue=i},$.g.Km=function(){if(this.G&&(AC(this.i),this.f)){var t=this.D,e={};e[t.stroke]=!0,e[t.fill]=!0,e[t.qe]=!0,this.b=this.bd.ed(this.Gc,e),(e=this.b[t.fill]).b=!1;var i=this.b[t.qe];i.b=!1,(t=this.b[t.stroke]).b=!1,this.i.Ca=[e,t,i],BC(this.i,!0);for(var n=t=window.NaN,s=!1,a=!0,o=this.f.length-1;0<=o;o-=3){var r=this.f[o-2],l=this.f[o-1],h=this.f[o];a?($.IA(e,this.xa,r,l),$.IA(i,this.xa,r,l),h||zC(this.i,r,l),a=!1):h&&s?($.IA(e,this.xa,r,l),$.IA(i,this.xa,r,l)):h?(AC(this.i),BC(this.i,!0),$.IA(e,this.xa,t,l,r,l),$.IA(i,this.xa,t,l,r,l)):(s&&($.IA(e,this.xa,r,n,r,l),$.IA(i,this.xa,r,n,r,l)),zC(this.i,r,l)),t=r,n=l,s=h}AC(this.i),this.f=null}},$.g.R=function(){this.i.Ca=null,IC.u.R.call(this)},$.H(JC,$.JA),$.PG[17]=JC,$.g=JC.prototype,$.g.type=17,$.g.flags=131297|$.dB,$.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},$.g.Gd=function(t){JC.u.Gd.call(this,t),this.P=this.X.g("stepDirection")||"center"},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.bd,n=this.nh(e,this.prevValue),s={};s[n.stroke]=!0,s[n.fill]=!0,s[n.qe]=!0,i=this.b=i.ed(this.Gc,s),s=t.j("x"),t.j("zeroX");var a=t.j("zero"),o=t.j("value");if(this.X.gh()){var r=t.j("nextZero");if(t=t.j("nextValue"),(0,window.isNaN)(r)||(0,window.isNaN)(t))LC(this,i,n,s,o,a),this.f=[s,a],this.i=o;else{var l=i.stroke;$.HA(l,this.xa,s,o),$.IA(l,this.xa,s,o),LC(this,i,n,s,t,r),this.f=[s,r],this.i=t}}else LC(this,i,n,s,o,a),this.ea=s,this.Mi=a,this.i=o;this.D=s,this.prevValue=e,this.Ka=a,this.K=n},$.g.ug=function(t){var e=t.get(this.X.Be()[0]),i=this.bd,n=this.nh(e,this.prevValue),s={};s[n.stroke]=!0,s[n.fill]=!0,s[n.qe]=!0,i=i.ed(this.Gc,s),s=t.j("x"),t.j("zeroX");var a=t.j("zero"),o=t.j("value");if(this.X.gh()){var r=t.j("prevZero"),l=t.j("prevValue"),h=t.j("nextZero");t=t.j("nextValue"),(0,window.isNaN)(r)||(0,window.isNaN)(l)?(MC(this,i,n,e,s,o,a),this.f.push(s,a)):(MC(this,i,n,e,s,l,a),this.f.push(s,r),this.D=s,this.i=l,this.Km(),LC(this,i,n,s,o,a),this.f=[s,a]),(0,window.isNaN)(h)||(0,window.isNaN)(t)?this.i=o:($.IA(i.stroke,this.xa,s,o),this.Km(),LC(this,i,n,s,t,h),this.f=[s,h],this.i=t)}else MC(this,i,n,e,s,o,a),this.ea=s,this.i=o;this.D=s,this.prevValue=e,this.Ka=a,this.K=n},$.g.Km=function(){if(this.G){var t=this.b,e=this.K,i=t[e.fill];if(t=t[e.qe],(0,window.isNaN)(this.ea)){if(this.f){var n=window.NaN;e=window.NaN;for(var s=this.f.length-1;0<=s;s-=2){var a=this.f[s-1],o=this.f[s];if(!(0,window.isNaN)(e))switch(this.P){case"forward":$.IA(i,this.xa,n,o),$.IA(t,this.xa,n,o);break;case"backward":$.IA(i,this.xa,a,e),$.IA(t,this.xa,a,e);break;default:n=(a+n)/2,$.IA(i,this.xa,n,e,n,o),$.IA(t,this.xa,n,e,n,o)}$.IA(i,this.xa,a,o),$.IA(t,this.xa,a,o),n=a,e=o}i.close(),t.close(),this.f=null}}else $.IA(i,this.xa,this.ea,this.Mi),$.IA(t,this.xa,this.ea,this.Mi),i.close(),t.close()}},$.H(NC,$.JA),$.PG[18]=NC,$.g=NC.prototype,$.g.type=18,$.g.flags=164041|$.dB,$.g.Kh={stroke:"path"},$.g.Gd=function(t){NC.u.Gd.call(this,t),this.P=this.X.g("stepDirection")||"center"},$.g.Qo=function(t){var e=t.get(this.X.Be()[0]),i=this.nh(e,this.prevValue),n={};n[i.stroke]=!0,this.b=this.bd.ed(this.Gc,n),n=t.j("x"),t=t.j("value"),$.HA(this.b[i.stroke],this.xa,n,t),this.D=n,this.i=t,this.prevValue=e,this.K=i},$.g.ug=function(t){var e=this.bd,i=t.get(this.X.Be()[0]),n=this.nh(i,this.prevValue),s={};s[n.stroke]=!0,e=e.ed(this.Gc,s),s=t.j("x");var a=t.j("value"),o=this.i;if(e!=this.b){var r=KA(this,i);this.ba&&r&&(o=t.j("zero")),t=OC(this,this.K,s,this.i,o),this.b=e,$.HA(this.b[n.stroke],this.xa,t,o)}OC(this,n,s,o,a),$.IA(this.b[n.stroke],this.xa,s,a),this.D=s,this.i=a,this.prevValue=i,this.K=n},$.H(PC,$.JA),$.PG[20]=PC,$.g=PC.prototype,$.g.type=20,$.g.flags=296681,$.g.Kh={stroke:"path"},$.g.Gd=function(t){PC.u.Gd.call(this,t),this.wv=2<this.o},$.g.ug=function(t,e){var i=this.bd,n=t.get(this.X.Be()[0]),s=this.nh(n,this.prevValue),a={};a[s.stroke]=!0,t.j("names",s),i=i.ed(e,a),QC(this,t,i,s),this.prevValue=n},$.g.yt=function(t){var e,i=t.j("shapes"),n=t.j("names");for(e in i)i[e].clear();QC(this,t,i,n)};var WC={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps-lock",27:"esc",32:"space",33:"pg-up",34:"pg-down",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:"semicolon",61:"equals",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",93:"context",96:"num-0",97:"num-1",98:"num-2",99:"num-3",100:"num-4",101:"num-5",102:"num-6",103:"num-7",104:"num-8",105:"num-9",106:"num-multiply",107:"num-plus",109:"num-minus",110:"num-period",111:"num-division",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",186:"semicolon",187:"equals",189:"dash",188:",",190:".",191:"/",192:"`",219:"open-square-bracket",220:"\\",221:"close-square-bracket",222:"single-quote",224:"win"},VC;$.H($.SC,$.qf);var bda=[27,112,113,114,115,116,117,118,119,120,121,122,123,19],cda="color date datetime datetime-local email month number password search tel text time url week".split(" ");$.g=$.SC.prototype,$.g.Al=function(t,e){XC(this.i,eda(arguments),t)},$.g.R=function(){$.SC.u.R.call(this),this.i={},$.Yd(this.b,"keydown",this.IU,!1,this),$.RC&&$.Yd(this.b,"keypress",this.J2,!1,this),$.Yd(this.b,"keyup",this.E2,!1,this),this.b=null},$.g.E2=function(t){$.gd&&(32==this.D&&32==t.keyCode&&t.preventDefault(),this.D=null),$.RC&&!this.ba&&$.RC&&t.ctrlKey&&t.altKey&&this.IU(t)},$.g.J2=function(t){32<t.keyCode&&$.RC&&t.ctrlKey&&t.altKey&&(this.ba=!0)},$.g.IU=function(t){t:{var e=t.keyCode;if(""!=t.key){var i=t.key;if("Control"==i||"Shift"==i||"Meta"==i||"AltGraph"==i){e=!1;break t}}else if(16==e||17==e||18==e){e=!1;break t}var n="TEXTAREA"==(i=t.target).tagName||"INPUT"==i.tagName||"BUTTON"==i.tagName||"SELECT"==i.tagName,s=!n&&(i.isContentEditable||i.ownerDocument&&"on"==i.ownerDocument.designMode);e=!((n||s)&&!this.ea[e]&&!this.G&&(s||(!this.aa||!(t.altKey||t.ctrlKey||t.metaKey))&&("INPUT"==i.tagName&&this.na[i.type]?13!=e:"INPUT"!=i.tagName&&"BUTTON"!=i.tagName||32==e)))}e&&("keydown"==t.type&&$.RC&&t.ctrlKey&&t.altKey?this.ba=!1:(e=Gp(t.keyCode),i=UC(t.key,e,(t.shiftKey?1:0)|(t.ctrlKey?2:0)|(t.altKey?4:0)|(t.metaKey?8:0)),(!(n=YC(this.f,i))||1500<=(0,$.Ln)()-this.o)&&(this.f=this.i,this.o=(0,$.Ln)()),(n=YC(this.f,i))&&n.next&&(this.f=n.next,this.o=(0,$.Ln)()),n&&(n.next?t.preventDefault():(this.f=this.i,this.o=(0,$.Ln)(),this.K&&t.preventDefault(),this.P&&t.stopPropagation(),i=n.b,n=t.target,s=this.dispatchEvent(new ZC("shortcut",i,n)),(s&=this.dispatchEvent(new ZC("shortcut_"+i,i,n)))||t.preventDefault(),$.gd&&(this.D=e)))))},$.H(ZC,wd),$.H($C,$.Br),$.g=$C.prototype,$.g.advance=function(){this.f=this.b[++this.i];var t=this.Hb();return!!t&&this.i<t},$.g.get=function(t){if(!(this.i>=this.Hb())&&$.p(t)&&this.f){if(this.f.j){var e=this.f.j("treemap_type");if(1==e||3==e||4==e)return;if(e=this.f.j(t))return e}if(this.f.get)return this.f.get(t)}},$.g.ma=function(){return this.i},$.g.Hb=function(){return this.b.length},$.g.j=function(t,e){if(this.f&&this.f.j)return 1<arguments.length?(this.f.j(t,e),this):this.f.j(t)},$.H(aD,$.EA),$.g=aD.prototype,$.g.ma=function(){return this.index},$.g.xc=function(){return this.ya},$.g.Zca=function(){return this.node},$.g.get=function(t){return this.node.get.apply(this.node,arguments)},$.g.set=function(t){return this.node.set.apply(this.node,arguments),this},$.g.lb=function(t){var e=$.tx(this.ya.state,$.vo,this.index);return $.p(t)&&e!=t?(t?this.ya.$i(this.index):this.ya.Md(this.index),this):e},$.g.selected=function(t){if(this.node.bc())return!!$.p(t)&&this;var e=$.tx(this.ya.state,$.wo,this.index);return $.p(t)&&e!=t?(t?this.ya.Ii(this.index):this.ya.ie(this.index),this):e},$.g.iy=function(){return!0};var kI=aD.prototype,lI;kI.getIndex=kI.ma,kI.getChart=kI.xc,kI.getNode=kI.Zca,kI.get=kI.get,kI.set=kI.set,kI.hovered=kI.lb,kI.selected=kI.selected,kI.exists=kI.iy,$.H($.bD,$.Bx),$.g=$.bD.prototype,$.g.eh=function(){return!0},$.g.Ak=function(){return!1},$.g.aj=function(){return!0},$.g.Ue=function(){return[this]},$.g.ra=16|$.bD.prototype.ra,$.g.sa=4112|$.Bx.prototype.sa,$.g.pk=$.ia,$.g.ml=$.ia,$.g.wm=$.ia,$.g.pq=$.ia,$.g.Xl=function(t){return $.p(t)?((t=$.Ak(t))!=this.K&&(this.K=t),this):this.K},$.g.ej=function(t){return $.p(t)?((t=null===t?null:$.Bk(t))!=this.et&&(this.et=t),this):this.et},$.g.qC=function(t){if(t){var e=this.$().f;t.tag={X:this,index:e.j("index"),node:e}}},$.g.ce=function(t){var e=null;return(t=this.ba[t])&&(e=new aD(this,t)),e},$.g.ig=function(t){t=$.Y.prototype.ig.call(this,t);var e=$.so(t.domTarget).index;if(!$.p(e)&&$.mx(this.state,$.vo)){var i=$.sx(this.state,$.vo);i.length&&(e=i[0])}return e=$.N(e),(0,window.isNaN)(e)||(t.pointIndex=e),t},$.g.Qa=function(t){return $.p(t)?(this.ca.N(t),this):this.ca},$.g.lb=function(t){return $.p(t)?(this.za.N(t),this):this.za},$.g.selected=function(t){return $.p(t)?(this.Ea.N(t),this):this.Ea},$.g.oq=function(){return[]},$.g.$i=function(t){if(!this.enabled())return this;if($.A(t)){for(var e=$.sx(this.state,$.vo),i=0;i<e.length;i++)$.Aa(t,e[i])||this.state.Vh($.vo,e[i]);$.qx(this.state,t)}else $.ea(t)&&(this.Md(),$.qx(this.state,t));return this},$.g.Md=function(t){var e,i;(e=$.mx(this.state,$.vo))||(e=!!(this.state.fk()&$.vo)),e&&this.enabled()&&(i=$.p(t)?t:this.state.Gc==$.gm?window.NaN:void 0,this.state.Vh($.vo,i))},$.g.Ii=function(t,e){var i=e&&e.shiftKey?void 0:e?$.vo:$.gm;return $.A(t)?(e||this.ie(),this.state.Lh($.wo,t,i)):$.ea(t)&&this.state.Lh($.wo,t,i),this},$.g.jr=function(t){this.zl&&(this.Md(),this.dispatchEvent(this.bl("hovered",{target:this},this.zl,!0)),this.zl=null),this.St();var e,i=null;if($.J(t,$.du)||$.J(t,$.$t))i=t;else if($.A(t)){if((e=this.data())&&e.bc()){e=e.xd(0);for(var n=0;n<t.length&&e;n++)e=e.xd(t[n]);e&&(i=e)}}else(e=this.data())&&e.bc()&&(i=e.Eo("id",t)[0]);this.IE(i)},$.g.data=function(t,e){return $.p(t)?($.J(t,$.au)||$.J(t,$.Yt)?t!=this.la&&(this.la&&$.kr(this.la,this.dd,this),this.la=t,$.K(this.la,this.dd,this)):(this.la&&$.kr(this.la,this.dd,this),this.la=new $.au(t,e),$.K(this.la,this.dd,this)),this.B(4352,1),this):this.la},$.g.dd=function(t){$.X(t,16)&&this.B(4352,1)},$.g.$=function(){return this.sd||this.Ec()},$.g.Ec=function(){return this.sd=new $C(this.Uc)},$.g.Zj=function(t,e){return $.qu(this.data(),e)},$.g.F=function(){var t=$.bD.u.F.call(this),e=this.data();e&&(t.treeData=e.xB());var i=[];if(e=this.uA())for(var n,s=1;s<e.length;s++)n=e[s-1].node,i[s-1]=n.Kf(e[s].node);return i.length&&(t.drillTo=i),t.normal=this.ca.F(),t.hovered=this.za.F(),t.selected=this.Ea.F(),t},$.g.U=function(t,e){$.bD.u.U.call(this,t,e),"treeData"in t&&this.data($.cu(t.treeData)),"drillTo"in t&&this.jr(t.drillTo),this.ca.ga(!!e,t),this.ca.ga(!!e,t.normal),this.za.ga(!!e,t.hovered),this.Ea.ga(!!e,t.selected)},$.ja($.dD);var hea={button:"pressed",checkbox:"checked",menuitem:"selected",menuitemcheckbox:"checked",menuitemradio:"checked",radio:"checked",tab:"selected",treeitem:"selected"},rD;if($.g=$.dD.prototype,$.g.zH=function(){},$.g.Ac=function(t){return t.f.Ac("DIV",$.kD(this,t).join(" "),t.Qd)},$.g.Gn=function(t){return t},$.g.yH=ba(31),$.g.Xk=ba(34),$.g.CD=function(t){$.Ey(t)&&this.z2(t.Ya(),!0),t.isEnabled()&&this.AH(t,t.Oe())},$.g.GU=function(t,e){$.Sf(t,!e,!$.hd&&!$.yd)},$.g.z2=function(t,e){fD(t,this.Hh()+"-rtl",e)},$.g.w2=function(t){var e;return!(!$.hD(t,32)||!(e=t.Ya()))&&$.gf(e)&&$.jf(e)},$.g.AH=function(t,e){var i;if($.hD(t,32)&&(i=t.Ya())){if(!e&&$.iD(t,32)){try{i.blur()}catch(n){}$.iD(t,32)&&t.ZM(null)}($.gf(i)&&$.jf(i))!=e&&$.ff(i,e)}},$.g.Ji=function(t,e){$.Pf(t,e),t&&$.zy(t,"hidden",!e)},$.g.HU=function(t,e,i){var n=t.Ya();if(n){var s=this.$G(e);s&&fD(t,s,i),this.Tu(n,e,i)}},$.g.Tu=function(t,e,i){lI||(lI={1:"disabled",8:"selected",16:"checked",64:"expanded"}),e=lI[e];var n=t.getAttribute("role")||null;n&&(n=hea[n]||e,e="checked"==e||"selected"==e?n:e),e&&$.zy(t,e,i)},$.g.ew=ba(36),$.g.Hh=function(){return"anychart-control"},$.g.$G=function(t){return this.b||$.mD(this),this.b[t]},$.g.qH=ba(35),$.H($.nD,$.dD),$.ja($.nD),$.g=$.nD.prototype,$.g.zH=function(){return"button"},$.g.Tu=function(t,e,i){switch(e){case 8:case 16:$.zy(t,"pressed",i);break;default:$.nD.u.Tu.call(this,t,e,i)}},$.g.Ac=function(t){var e=$.nD.u.Ac.call(this,t);$.oD(e,t.gb);var i=t.vj();return i&&this.v2(e,i),$.hD(t,16)&&this.Tu(e,16,$.iD(t,16)),e},$.g.Xk=ba(33),$.g.vj=$.ia,$.g.v2=$.ia,$.g.Hh=function(){return"anychart-button"},rD={},$.pD={},$.H($.sD,$.By),$.g=$.sD.prototype,$.g.Qd=null,$.g.dc=0,$.g.Lu=39,$.g.mv=255,$.g.EJ=0,$.g.hj=!0,$.g.Cs=null,$.g.WU=!0,$.g.Ac=function(){var t=this.i.Ac(this);this.Ed=t,$.gD(this.i,t,this.lH()),this.i.GU(t,!1),this.Oe()||this.i.Ji(t,!1)},$.g.lH=function(){return null},$.g.AD=function(){return this.i.Gn(this.Ya())},$.g.xH=ba(18),$.g.pl=ba(20),$.g.Gg=function(){if($.sD.u.Gg.call(this),$.jD(this.i,this,this.Ed),this.i.CD(this),-2&this.Lu&&(this.WU&&tD(this,!0),$.hD(this,32))){var t=this.Ya();if(t){var e=this.Zl||(this.Zl=new $.Jp);e.WM(t),$.Dy(this).wa(e,"key",this.oo).wa(t,"focus",this.Xfa).wa(t,"blur",this.ZM)}}},$.g.Dh=function(){$.sD.u.Dh.call(this),this.Zl&&this.Zl.wH(),this.Oe()&&this.isEnabled()&&this.i.AH(this,!1)},$.g.R=function(){$.sD.u.R.call(this),this.Zl&&(this.Zl.ld(),delete this.Zl),delete this.i,this.K=this.Cs=this.Qd=null},$.g.AM=function(){var t=this.Qd;if(!t)return"";if(!$.z(t))if($.A(t))t=$.Wa(t,$.lf).join("");else{if(XD&&null!==t&&"innerText"in t)t=$.hc(t.innerText);else{var e=[];kf(t,e,!0),t=e.join("")}t=(t=t.replace(/ \xAD /g," ").replace(/\xAD/g,"")).replace(/\u200B/g,""),XD||(t=t.replace(/ +/g," "))," "!=t&&(t=t.replace(/^\s*/,""))}return $.lc(t)},$.g.Oe=function(){return this.hj},$.g.Ji=function(t,e){if(e||this.hj!=t&&this.dispatchEvent(t?"show":"hide")){var i=this.Ya();return i&&this.i.Ji(i,t),this.isEnabled()&&this.i.AH(this,t),this.hj=t,!0}return!1},$.g.isEnabled=function(){return!$.iD(this,1)},$.g.Dj=function(t){var e=this.getParent();e&&"function"==typeof e.isEnabled&&!e.isEnabled()||!zD(this,1,!t)||(t||($.BD(this,!1),this.rq(!1)),this.Oe()&&this.i.AH(this,t),AD(this,1,!t,!0))},$.g.rq=function(t){zD(this,2,t)&&AD(this,2,t)},$.g.uq=function(){return $.iD(this,4)},$.g.Ve=function(){return $.iD(this,8)},$.g.rJ=function(t){zD(this,8,t)&&AD(this,8,t)},$.g.Cl=function(t){zD(this,64,t)&&AD(this,64,t)},$.g.hn=function(t,e){if(this.xf&&$.iD(this,t)&&!e)throw Error("Component already rendered");!e&&$.iD(this,t)&&AD(this,t,!1),this.Lu=e?this.Lu|t:this.Lu&~t},$.g.po=function(t){!ED(t,this.Ya())&&this.dispatchEvent("enter")&&this.isEnabled()&&DD(this,2)&&this.rq(!0)},$.g.hg=function(t){!ED(t,this.Ya())&&this.dispatchEvent("leave")&&(DD(this,4)&&$.BD(this,!1),DD(this,2)&&this.rq(!1))},$.g.BH=$.ia,$.g.Sj=function(t){this.isEnabled()&&(DD(this,2)&&this.rq(!0),t.OA()&&(DD(this,4)&&$.BD(this,!0),this.i&&this.i.w2(this)&&this.Ya().focus())),t.OA()&&t.preventDefault()},$.g.tr=function(t){this.isEnabled()&&(DD(this,2)&&this.rq(!0),this.uq()&&this.Vs(t)&&DD(this,4)&&$.BD(this,!1))},$.g.D2=function(t){this.isEnabled()&&this.Vs(t)},$.g.Vs=function(t){DD(this,16)&&$.CD(this,!$.iD(this,16)),DD(this,8)&&this.rJ(!0),DD(this,64)&&this.Cl(!$.iD(this,64));var e=new wd("action",this);return t&&(e.altKey=t.altKey,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.i=t.i),this.dispatchEvent(e)},$.g.Xfa=function(){DD(this,32)&&zD(this,32,!0)&&AD(this,32,!0)},$.g.ZM=function(){DD(this,4)&&$.BD(this,!1),DD(this,32)&&zD(this,32,!1)&&AD(this,32,!1)},$.g.oo=function(t){return!!(this.Oe()&&this.isEnabled()&&this.EA(t))&&(t.preventDefault(),t.stopPropagation(),!0)},$.g.EA=function(t){return 13==t.keyCode&&this.Vs(t)},!$.D($.sD))throw Error("Invalid component class "+$.sD);if(!$.D($.dD))throw Error("Invalid renderer class "+$.dD);var iea=$.oa($.sD);rD[iea]=$.dD,$.qD("anychart-control",(function(){return new $.sD(null)})),$.H(yD,$.od);var FD=!$.hd||$.dd(9);yD.prototype.i=function(){this.b=!1},yD.prototype.o=function(){this.b=!0},yD.prototype.D=function(t){if(this.b)this.b=!1;else{var e=t.kf,i=e.button,n=e.type,s=GD(e,"mousedown");this.f.Sj(new $.Bd(s,t.currentTarget)),s=GD(e,"mouseup"),this.f.tr(new $.Bd(s,t.currentTarget)),FD||(e.button=i,e.type=n)}},yD.prototype.R=function(){this.f=null,yD.u.R.call(this)},$.H($.HD,$.nD),$.ja($.HD),$.g=$.HD.prototype,$.g.zH=function(){},$.g.Ac=function(t){return $.uD(t,!1),t.mv&=-256,t.hn(32,!1),t.f.Ac("BUTTON",{class:$.kD(this,t).join(" "),disabled:!t.isEnabled(),title:t.gb||"",value:t.vj()||""},t.AM()||"")},$.g.yH=ba(30),$.g.Xk=ba(32),$.g.CD=function(t){$.Dy(t).wa(t.Ya(),"click",t.Vs)},$.g.GU=$.ia,$.g.z2=$.ia,$.g.w2=function(t){return t.isEnabled()},$.g.AH=$.ia,$.g.HU=function(t,e,i){$.HD.u.HU.call(this,t,e,i),(t=t.Ya())&&1==e&&(t.disabled=i)},$.g.vj=function(t){return t.value},$.g.v2=function(t,e){t&&(t.value=e)},$.g.Tu=$.ia,$.H($.ID,$.sD),$.g=$.ID.prototype,$.g.vj=function(){return this.na},$.g.SX=function(t){this.na=t},$.g.R=function(){$.ID.u.R.call(this),delete this.na,delete this.gb},$.g.Gg=function(){if($.ID.u.Gg.call(this),$.hD(this,32)){var t=this.Ya();t&&$.Dy(this).wa(t,"keyup",this.EA)}},$.g.EA=function(t){return 13==t.keyCode&&"key"==t.type||32==t.keyCode&&"keyup"==t.type?this.Vs(t):32==t.keyCode},$.qD("anychart-button",(function(){return new $.ID(null)})),$.H($.LD,$.ID),$.LD.prototype.Ac=function(){$.LD.u.Ac.call(this),$.Ce(this.Ya(),{type:"button"}),MD(this)}}.call(this,$)),_.tree_data||(_.tree_data=1,function(t){}.call(this,$)),_.gantt_base||(_.gantt_base=1,function(t){var e,i,n,s;t.mI=function(){t.V.call(this),this.B(4294967295),t.T(this.ua,[["id"],["className"]])},t.nI=function(){t.V.call(this),this.Wa=new t.Hu,t.K(this.Wa,this.Pk,this),this.Xb=this.Y=null,this.I(4294967295),t.Eq(this.ua,0,0,9,1),t.T(this.ua,[["fill",0,1],["format",20,9]])},t.oI=function(){t.Y.call(this),this.ab=this.b=null,this.G=new t.mI,t.K(this.G,this.Raa,this),this.Ia=new t.yu,t.K(this.Ia,this.Paa,this),this.Wa=new t.Hu,t.K(this.Wa,this.fm,this),this.D=new t.nI,this.D.parent(this),t.K(this.D,this.Oga,this),this.Xb=this.Y=this.eb=null,this.Da=[],this.K=[],t.Eq(this.ua,20,20,9,1),t.T(this.ua,[["format",20,9],["stroke",16,1],["fill",16,1],["levelHeight",16,1],["drawTopLine",256,1],["drawRightLine",256,1],["drawBottomLine",256,1],["drawLeftLine",256,1]])},e=function(e,i,n){var s=e.Da[i]||null;if(!s&&n){e.Kv(),n=t.nm("defaultLabelFactory.format");var a=t.nm("defaultLabelFactory.positionFormatter");(s=new t.Pu).format(n),s.positionFormatter(a),s.df(),s.enabled(!0),s.O(e.Lf),e.Da[i]=s}return s},i=function(t,e,i){return(t=t.K[e])?t.nd(i):void 0},n=function(t,e,i,n,s,a){for(var o=0,r=a.length;o<r;o++){var l=a[o];if(n.width=null,n.height=null,i.measure(t.Am(e,l),void 0,n).width<s.width)return o}return r-1},s=function(e,i){t.V.call(this),this.Yk=e,this.Ad=i,t.Eq(this.ua,20,20,9,1),t.T(this.ua,[["format",20,9],["enabled",512,1],["stroke",16,1],["fill",16,1],["height",16,1]])},t.H(t.mI,t.V),t.mI.prototype.sa=23,t.mI.prototype.ra=1|t.V.prototype.ra;var a={};t.rq(a,0,"id",t.zq),t.rq(a,0,"className",t.zq),t.U(t.mI,a),t.g=t.mI.prototype,t.g.enabled=function(e){return t.p(e)?(this.Pa.enabled!=e&&(e=this.Pa.enabled=e,this.B(1,1),e?this.da(!0):(0,window.isNaN)(this.Lo)&&this.ka()),this):this.g("enabled")},t.g.target=function(e){return t.p(e)?(this.b!=e&&(this.b=e,this.B(2)),this):this.b},t.g.Ya=function(){return this.Ud},t.g.Qf=function(t){this.Bb=t,this.B(4)},t.g.ph=function(t){return null!=this.Pa[t]},t.g.CM=function(){return 16},t.g.ys=function(){return 1},t.g.zc=function(){return!(this.pf()||this.md||(this.enabled()?this.target()?(this.I(1),0):(this.remove(),this.B(2),t.il(1),1):(this.J(1)&&(this.remove(),this.I(1),this.B(2)),1)))},t.g.W=function(){if(!this.zc())return this;if(this.Ud||(this.Ud=t.Me("DIV"),t.uf(this.Ud,{position:"absolute","pointer-events":"none"})),this.J(2)&&(this.b.appendChild(this.Ud),this.I(2)),this.J(16)){var e=this.g("id");t.p(e)&&this.Ud.setAttribute("id",e),e=this.g("className"),t.p(e)&&(this.Ud.className=e),this.I(16)}return this.J(4)&&(t.Cf(this.Ud,this.Bb.left,this.Bb.top),t.If(this.Ud,this.Bb.width,this.Bb.height),this.I(4)),this},t.g.remove=function(){this.Ud&&t.Xe(this.Ud)},t.g.Ie=function(e,i){return!(!t.da(i)&&null!==i||(e?this.oa.enabled=!!i:this.enabled(!!i),0))},t.g.F=function(){var e=t.mI.u.F.call(this);t.Tq(this,a,e,"Overlay ui element");var i=t.V.prototype.g.call(this,"enabled");return e.enabled=t.p(i)?i:null,e},t.g.U=function(e,i){t.mI.u.U.call(this,e,i),i?(t.Hq(this.oa,a,e),"enabled"in e&&(this.oa.enabled=e.enabled)):(t.Iq(this,a,e),this.enabled(e.enabled))},t.g.R=function(){t.mI.u.R.call(this)};var o=t.mI.prototype;o.getElement=o.Ya,o.enabled=o.enabled,t.H(t.nI,t.V),t.g=t.nI.prototype,t.g.ra=9|t.V.prototype.ra,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this),this.Wa.parent(this.Y.padding())),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(n|=8),t.X(e,32768)&&(i|=1,n|=9),this.B(i,n)};var r=t.vq();t.rq(r,0,"format",t.ar),t.U(t.nI,r);var l={};t.rq(l,1,"fill",t.Qq),t.U(t.nI,l),t.g=t.nI.prototype,t.g.padding=function(e,i,n,s){return t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.Pk=function(e){t.X(e,2)&&this.B(4,9)},t.g.U=function(e,i){i?(t.Hq(this.oa,l,e),t.Hq(this.oa,r,e)):(t.Iq(this,r,e),t.Iq(this,l,e)),this.padding().ga(!!i,e.padding)},t.g.F=function(){var e={};return e.padding=this.padding().F(),t.Tq(this,r,e,"Time line holidays settings text props"),t.Tq(this,l,e,"Time line holidays settings props"),e},t.g.R=function(){t.nI.u.R.call(this),t.qd(this.Wa),this.Wa=null};var h=t.nI.prototype;h.padding=h.padding,t.H(t.oI,t.wu),t.oI.prototype.sa=2e3|t.wu.prototype.sa,t.oI.prototype.ra=t.wu.prototype.ra;var c=t.vq();t.rq(c,0,"format",t.ar),t.U(t.oI,c);var u={};t.sq(u,[[1,"stroke",t.Pq],[1,"fill",t.Qq],[0,"levelHeight",t.br],[0,"drawTopLine",t.Dq],[0,"drawRightLine",t.Dq],[0,"drawBottomLine",t.Dq],[0,"drawLeftLine",t.Dq]]),t.U(t.oI,u),t.g=t.oI.prototype,t.g.Ra=function(e){return t.p(e)?(this.eb!=e&&(this.eb&&t.kr(this.eb,this.h_,this),(this.eb=e)&&t.K(this.eb,this.h_,this),this.B(128,1)),this):this.eb},t.g.MX=function(t){this.f=t,this.B(512,1)},t.g.level=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var a=e}else n=e,a=i;var o=this.K[n];return o||(this.K[n]=o=new s(this,n)),t.p(a)?(o.N(a),this):o},t.g.background=function(e){return t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.padding=function(e,i,n,s){return t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.HA=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.Qaa=function(e){return t.p(e)?(this.G.N(e),this.B(1024,1),this):this.G},t.g.ph=function(t){return null!=this.Pa[t]},t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this)),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(n|=8),t.X(e,32768)&&(i|=1,n|=9),this.B(i,n)},t.g.h_=function(e){var i=0;t.X(e,4)&&(i|=512),t.X(e,2)&&(i|=384),this.B(i,1)},t.g.Paa=function(){this.B(64,1)},t.g.fm=function(e){t.X(e,2)&&this.B(4,9)},t.g.Oga=function(){this.B(16,1)},t.g.Raa=function(){this.B(1024,1)},t.g.Am=function(e,i){var n=t.us(e,i);return t.ov(new t.Fw({value:{value:n,type:"string"},tickValue:{value:e,type:"number"},scale:{value:this.eb,type:""}}))},t.g.wi=function(e){var i=this.Da[e];e=this.ba[e]?this.ba[e]:this.ba[e]=this.na[e][this.Ba];for(var n=0,s=i.jI();n<s;n++){var a=i.be(n),o=a.Hf().tickValue;a.Hf(this.Am(o,e)),o=i.measure(a);var r=a.ic("hAlign");o.left="left"==r||"start"==r?a.D.left:"right"==r||"end"==r?a.D.cb()-o.width:a.D.left+(a.D.width-o.width)/2,r=a.ic("vAlign"),o.top="top"==r?a.D.top:"bottom"==r?a.D.Va()-o.height:a.D.top+(a.D.height-o.height)/2,o.left=Math.max(a.K.left,Math.min(o.left,a.K.cb()-o.width)),o.top=Math.max(a.K.top,Math.min(o.top,a.K.Va()-o.height)),a.jc({value:{x:o.left,y:o.top}})}t.Yu(i),i.W()},t.g.W=function(){if(this.zc()){var s,a=!1,o=!1;if(this.Kv(),this.J(2)&&(this.b.parent(this.O()),this.I(2)),this.J(8)&&(this.b.zIndex(this.zIndex()),this.Ia.zIndex(0),this.o.zIndex(1),this.Lf.zIndex(2),this.I(8)),this.J(4)&&(this.ab=this.ob(),t.Xo(this.ab,0),this.gg.shape(this.ab),this.ba.length=0,this.B(1472),this.I(4)),this.J(512)){var r=this.f.length,l=this.aa.length;this.ba.length=0,this.na.length=0,this.fb.length=0,this.Za.length=0;var h=this.i.length=0,u=0;for(r=Math.max(r,l),s=0;s<r;s++){var d=this.f[s],p=this.aa[s];l=this.ea[s];var g=this.Ka[s],f=this.Ha[s],m=i(this,s,"enabled");if(!d||!m&&t.p(m)){p&&p.clear().parent(null),l&&l.clear().parent(null),g&&g.clear().parent(null),f&&f.clear().parent(null);var v=e(this,s,!1)}else{var b=t.Zo(i(this,s,"height"),d.height,this.g("levelHeight"),null);if(null===b?(this.i[s]=null,u++):(this.i[s]=t.L(b,this.ab.height),h+=this.i[s]),"formats"in d)this.na[s]=d.formats;else{b=d.unit;var y=void 0;this.f[s+1]&&(y=this.f[s+1].unit)!=b&&(y=t.vp(y,-1)),this.na[s]=t.ts(t.rs(d.unit,y,"timeline"))}p?p.clear().parent(this.o):(p=this.o.path(),this.aa[s]=p),l?l.clear().parent(this.o):(l=this.o.path(),this.ea[s]=l),g?g.clear().parent(this.o):(g=this.o.path(),this.Ka[s]=g),f?f.clear().parent(this.o):(f=this.o.path(),this.Ha[s]=f),v=e(this,s,!0)}v&&v.clear()}this.P=(this.ab.height-h)/u,this.B(400),this.I(512)}if(this.J(16)){for(h=t.nm("defaultLabelFactory"),u={},t.Tq(this,c,u),u.format=this.g("format"),u.padding=this.padding(),b={},t.Tq(this.D,c,b),b.padding=this.D.padding(),r=this.f.length,s=0;s<r;s++)if(d=this.f[s],m=i(this,s,"enabled"),d&&(m||!t.p(m))){p=this.aa[s],l=this.ea[s],g=this.Ka[s],f=this.Ha[s];var S={};t.Sc(S,h),t.Sc(S,u),y={},t.Hq(y,c,d),"padding"in d&&(y.padding=d.padding),t.Sc(S,y),this.K[s]&&t.Hq(S,c,this.K[s].Pa),S.enabled=!0,S.width=null,S.height=null,this.fb[s]=S,S={},t.Sc(S,h),t.Sc(S,u),t.Sc(S,b),t.Sc(S,y),(y=d.holiday)&&(t.Hq(S,c,y),"padding"in y&&(S.padding=y.padding)),S.enabled=!0,S.width=null,S.height=null,this.Za[s]=S,S=t.Zo(i(this,s,"stroke"),d.stroke,this.g("stroke")),m=t.Zo(i(this,s,"fill"),d.fill,this.g("fill")),g.fill(null).stroke(S),p.fill(m).stroke(null),(p=t.Zo(i(this,s,"fill"),y&&y.fill,this.D.nd("fill")))||(p=m),f.fill(null).stroke(S),l.fill(p).stroke(null)}this.B(256),this.I(16)}if(this.J(64)&&(this.Ia.ja(this.ab),this.Ia.O(this.b),this.Ia.W(),this.I(64)),this.J(128)&&(a=!0,this.I(128)),this.J(256)&&(o=!0,this.I(256)),this.J(1024)&&(this.G.target(this.O().Ja().Tl()),this.G.Qf(this.ob()),this.G.W(),this.I(1024)),this.eb&&(a||o))for(a=(r=this.f.length)-1,s=this.ab.height+this.ab.top,h=!!this.g("drawTopLine"),u=!!this.g("drawRightLine"),b=!!this.g("drawBottomLine"),y=!!this.g("drawLeftLine"),S=0;S<r;S++)if(d=this.f[S],m=i(this,S,"enabled"),d&&(m||!t.p(m))){m=S==a;var x=null===this.i[S]?this.i[S]=this.P:this.i[S];p=this.aa[S].clear(),l=this.ea[S].clear(),g=this.Ka[S].clear(),f=this.Ha[S].clear(),o&&(v=this.Da[S]).clear();var w=(v=(d=this.eb.Fn(0,this.ab.width,d.unit,d.count)).length)-1,C=t.$b(g.stroke()),T=!S&&b?C/2:S?Math.ceil(C/2):0;s=t.R(s-T,C);var D=m&&h?C/2:m?0:Math.floor(C/2);for(x-=(S?T/2:T)+(m?D:D/2),x=t.R(s-x,C,!0),T=this.Ba=0;T<v;T++){var k=T==w,$=d[T],O=$.holiday,P=O?f:g;C=t.$b(P.stroke()),D=t.R(this.un($.start),C),C=t.R(this.un($.end),C);var L=Math.floor(D),I=Math.ceil(C),A=h||!m?Math.ceil(x):Math.floor(x),E=b&&!S?Math.floor(s):Math.ceil(s);y&&!T&&P.moveTo(D,A).lineTo(D,E),!u&&k||P.moveTo(C,A).lineTo(C,E),!h&&m||P.moveTo(L,x).lineTo(I,x),b&&!S&&P.moveTo(L,s).lineTo(I,s),(O?l:p).moveTo(L,E).lineTo(I,E).lineTo(I,A).lineTo(L,A).close(),o&&(k=S,O=O?this.Za[k]:this.fb[k],I=this.i[k],P=this.Da[k],L=t.kn(D,x,C-D,I),D=Math.max(D,this.ab.left),D=t.kn(D,x,Math.min(C,this.ab.cb())-D,I),C=P.add({tickValue:$.start},null,T),(I=O.padding)?(t.J(I,t.Hu)||(this.$a||(this.$a=new t.Hu),this.$a.N(O.padding),I=this.$a),C.K=I.Ej(D),C.D=I.Ej(L)):(C.K=D,C.D=L),O.anchor="left-top",C.Rh().clip(C.K),C.td(O),C.padding(0),this.ba[k]||this.Ba==this.na[k].length-1||(this.Ba=Math.max(this.Ba,n(this,$.start,P,O,C.D,this.na[k]))))}o&&this.wi(S),s=x}}},t.g.Kv=function(){this.b||(this.b=t.ok(),this.gg=t.tk(),this.b.clip(this.gg),this.o=this.b.Bd(),this.aa=[],this.ea=[],this.Ka=[],this.Ha=[],this.Lf=this.b.Bd(),this.i=[],this.fb=[],this.Za=[],this.na=[],this.ba=[])},t.g.un=function(t){return(this.eb.un?this.eb.un(t):this.eb.transform(t)*this.ab.width)+this.ab.left},t.g.remove=function(){this.b&&this.b.parent(null)},t.g.F=function(){var e=t.oI.u.F.call(this);return t.Tq(this,u,e,"Resource Timeline"),t.Tq(this,c,e,"Resource Timeline text settings"),e.background=this.Ia.F(),e.padding=this.Wa.F(),e.holidays=this.D.F(),e.overlay=this.G.F(),this.K.length&&(e.levels=(0,t.Wa)(this.K,(function(t){return t?t.F():{}}))),e},t.g.U=function(e,i){t.oI.u.U.call(this,e,i),i?(t.Hq(this.oa,u,e),t.Hq(this.oa,c,e)):(t.Iq(this,u,e),t.Iq(this,c,e)),"background"in e&&this.Ia.ga(!!i,e.background),"padding"in e&&this.Wa.ga(!!i,e.padding),"holidays"in e&&this.D.U(e.holidays,i),"overlay"in e&&this.G.ga(!!i,e.overlay);var n=e.levels;if(t.A(n))for(var s=0;s<n.length;s++)this.level(s,n[s])},t.g.R=function(){t.qd(this.b),this.b=null,t.qd(this.Ia),this.Ia=null,t.qd(this.Wa),this.Wa=null,t.qd(this.gg),this.gg=null,t.qd(this.D),this.D=null,t.sd(this.aa),this.aa=null,t.sd(this.ea),this.ea=null,t.sd(this.Da),this.Da=null,t.qd(this.G),this.G=null,t.sd(this.K),this.Lf=this.o=this.K=null,t.oI.u.R.call(this)},t.H(s,t.V),t.U(s,c);var d={};t.sq(d,[[0,"enabled",t.Dq],[1,"stroke",t.Pq],[1,"fill",t.Qq],[0,"height",t.br]]),t.U(s,d),t.g=s.prototype,t.g.B=function(t,e){return this.Yk.B(t,e)},t.g.vf=function(t){return"enabled"==t||this.Yk.g("height"==t?"levelHeight":t)},t.g.F=function(){var e=s.u.F.call(this);return t.Tq(this,d,e,"TimeLine Header Level",void 0,!0),t.Tq(this,c,e,"TimeLine Header Level text settings",void 0,!0),e},t.g.Ie=function(e,i){return!(!t.da(i)&&null!==i||(this.enabled(!!i),0))},t.g.U=function(e){if(s.u.U.call(this,e),t.Iq(this,d,e),t.C(e.labels)){var i=this.nd("enabled");t.Iq(this,c,e.labels),this.ta("enabled",i)}t.Iq(this,c,e)},t.g.R=function(){this.Yk=null,s.u.R.call(this)};var p=t.oI.prototype;p.background=p.background,p.padding=p.padding,p.holidays=p.HA,p.overlay=p.Qaa,p.level=p.level,p=s.prototype}.call(this,$)),_.gantt_part||(_.gantt_part=1,function(t){var e=function(t,i){return!!t.getParent()&&(t.getParent()==i||e(t.getParent(),i))},i=function(e){return!!e.flatten().useHtml&&!t.Uc()},n=function(t){var e=t.flatten(),n=null!=e.width;return(e=!i(t)&&n&&"left"!=e.hAlign)||(n=null!=(e=t.flatten()).width,e=!i(t)&&n&&"break-word"==e.wordWrap),e||(n=null!=(e=t.flatten()).width,e=!i(t)&&n&&e.wordBreak),e},s=function(){t.Y.call(this),this.K=this.P=this.G=this.ba=this.Vc=null,this.f="vertical",this.aa=this.sb=1,this.na=t.Ub("#e0e0e0",this.aa),this.Ba=t.Wb("#d5d5d5",this.aa),this.Ha=t.Ub("#d5d5d5",this.aa),this.Ka=t.Wb("#656565",this.aa),this.b=0,this.i=1,this.o=this.D=null,this.ea=!1,this.Za=-1,this.fb=!0,this.$a=5},a=function(e){return"svg"===t.kk?Math.floor(e)+.5:Math.floor(e)},o=function(e){if(t.p(i)){var i=+i;return!(0,window.isNaN)(i)&&e.b!=i&&0<=i&&1>i&&(i==e.i?(e.i=1,e.b=i):(e.b=Math.min(i,e.i),e.i=Math.max(i,e.i)),g(e),e.B(64,1),b(e,"api")),e}return e.b},r=function(e){if(t.p(i)){var i=+i;return!(0,window.isNaN)(i)&&e.i!=i&&0<i&&1>=i&&(i==e.b?(e.b=0,e.i=i):(e.i=Math.max(i,e.b),e.b=Math.min(i,e.b)),g(e),e.B(64,1),b(e,"api")),e}return e.i},l=function(e,i,n){if(i=+i,!(0,window.isNaN)(i)){i=t.Za(i,0,1);var s=e.i-e.b;i=t.Tm(t.Za(i+s,0,1),4),s=t.Tm(i-s,4),e.b==s&&e.i==i||(e.b=s,e.i=i,g(e),e.B(64,1),b(e,n||"api"))}return e},h=function(t,e){e=+e;var i=(0,window.isNaN)(e)?40:e;if(t.o&&i&&(i=+(i+=v(t)?t.o.top:t.o.left),t.o&&!(0,window.isNaN)(i))){var n=v(t);i!=(n?t.o.top:t.o.left)&&(n?t.o.top=i:t.o.left=i,m(t),f(t),t.B(64,1),b(t,"user_action"))}},c=function(e,i){e.na=t.Ul(e.na,i,!0),e.Ba=t.Ul(e.Ba,i,!1),e.Ha=t.Ul(e.Ha,i,!0),e.Ka=t.Ul(e.Ka,i,!1),e.B(16,1)},u=function(e){return e.G||(e.G=new t.Hv,e.G.Ku(16,!1),t.K(e.G,(function(){e.G.W()})),t.Jv(e.G,(function(){e.aQ()?h(e,40):e.scroll(.05,"user_action")}))),e.G},d=function(e){return e.P||(e.P=new t.Hv,e.P.Ku(16,!1),t.K(e.P,(function(){e.P.W()})),t.Jv(e.P,(function(){e.aQ()?h(e,-40):e.scroll(-.05,"user_action")}))),e.P},p=function(e,i){var n=v(e),s=e.K.Om(),a=e.K.rb(),o=!!i,r=n?s.top:s.left;s=n?s.height:s.width;var l=n?a.top:a.left,h=l+(n?a.height:a.width);10>=(n?a.height:a.width)?(n=e.i-e.b,e.b=(l-r)*(1-n)/(s-10),e.i=Math.min(e.b+n,1)):(e.b=t.Tm((l-r)/s,5),e.i=t.Tm((h-r)/s,5)),g(e),o||e.B(64,1),b(e)},g=function(e){if(e.D&&e.o)if(v(e)){var i=e.D.height,n=t.Tm((e.i-e.b)*i,1);e.o.top=t.Tm(e.b*i,1)+e.D.top,e.o.height=n}else i=e.D.width,n=t.Tm((e.i-e.b)*i,1),e.o.left=t.Tm(e.b*i,1)+e.D.left,e.o.width=n},f=function(e){if(e.D&&e.o){var i=v(e),n=i?e.o.top-e.D.top:e.o.left-e.D.left,s=i?n+e.o.height:n+e.o.width;i=i?e.D.height:e.D.width,e.b=t.Tm(n/i,4),e.i=t.Tm(s/i,4)}},m=function(t){var e=t.o;t=t.D,e.width>t.width&&(e.width=t.width),e.height>t.height&&(e.height=t.height),e.top+e.height>t.top+t.height&&(e.top-=e.top+e.height-(t.top+t.height)),e.left+e.width>t.left+t.width&&(e.left-=e.left+e.width-(t.left+t.width)),e.top<t.top&&(e.top=t.top),e.left<t.left&&(e.left=t.left)},v=function(t){return"horizontal"!=t.f.toLowerCase()},b=function(t,e){if(t.fb){0<=t.Za&&((0,window.clearTimeout)(t.Za),t.Za=-1);var i={type:"scrollchange",startRatio:t.b,endRatio:t.i,visibleBounds:t.o,source:e||"user_action"};t.Za=(0,window.setTimeout)((function(){t.dispatchEvent(i),t.Za=-1}),0)}},y=function(e){t.V.call(this),this.i=!!e,this.na={},this.Ba={},this.ea=[],this.la=null,this.D=[],this.Zr=[],this.b=[],this.Zh=this.te=null,this.Sb=1,this.o=this.f=window.NaN,this.Ka=this.P=0,this.qc=!1,this.G=0,this.lE=!1,this.Ha=null,this.ba=this.K=window.NaN,this.ec=0,this.aa=null,this.Za=20,this.$a=this.fb=window.NaN,this.iz=[],this.sb={}},S=function(e,i){return t.p(i)&&e.Za!=i?(e.Za=i,e.B(128,2),e):e.Za},x=function(e,i){return t.N(i.get("rowHeight"))||e.Za},w=function(e,i){for(var n=["actualStart","actualEnd","baselineStart","baselineEnd"],s=0;s<n.length;s++){var a=n[s],o=i.get(a);null!=o?(o=t.ps(o),i.j(a,null===o?window.NaN:+o)):i.j(a,window.NaN),L(e,i.j(a))}},C=function(e,i){var n=i.get("periods");if(e.i&&t.A(n)){for(var s=window.NaN,a=window.NaN,o=0,r=n.length;o<r;o++){var l=n[o],h=i.no("periods",o,"start"),c=t.ps(l.start);null===c?i.Jk("periods",o,"start",null):(c=+c,i.Jk("periods",o,"start",c),h=c),c=i.no("periods",o,"end");var u=t.ps(l.end);null===u?i.Jk("periods",o,"end",null):(u=+u,i.Jk("periods",o,"end",u),c=u),null===(u=t.ps(l.baselineStart))?i.Jk("periods",o,"baselineStart",null):(u=+u,i.Jk("periods",o,"baselineStart",u)),null===(l=t.ps(l.baselineEnd))?i.Jk("periods",o,"baselineEnd",null):(l=+l,i.Jk("periods",o,"baselineEnd",l)),s=$(Math.min,s,a,h,c),a=$(Math.max,s,a,h,c),L(e,h),L(e,c)}i.j("minPeriodDate",s),i.j("maxPeriodDate",a)}},T=function(e,i){var n,s=i.get("markers");for(n=0;s&&n<s.length;n++){var a=s[n];a=a.value,a=null===(a=t.ps(a))?null:+a,i.Jk("markers",n,"value",a),L(e,a)}},D=function(t,e){if(e){var i=e.uid;e.j("collapsed")?t.sb[i]=e:delete t.sb[i]}},k=function(e,i,n){i.j("depth",n).j("index",e.ec++),e.Zr.push(i);var s=i.get("progressValue");null!=s?(s=t.uo(s)?(0,window.parseFloat)(s)/100:+s,i.j("progressValue",s)):i.j("progressValue",null),s=i.get("collapsed"),t.da(s)&&i.j("collapsed",s),D(e,i),w(e,i),C(e,i),T(e,i);for(var a=s=0,o=window.NaN,r=window.NaN,l=window.NaN,h=window.NaN,c=0,u=i.bc();c<u;c++){var d=i.xd(c);if(d.bc()?k(e,d,n+1):(d.j("depth",n+1).j("index",e.ec++),w(e,d),C(e,d),T(e,d),e.Zr.push(d)),!e.i){var p=d.j("actualStart");p=t.ea(p)&&!(0,window.isNaN)(p)?p:d.j("autoStart")||window.NaN;var g=d.j("actualEnd");g=t.ea(g)&&!(0,window.isNaN)(g)?g:d.j("autoEnd")||p;var f=d.j("baselineStart"),m=t.ea(f)&&!(0,window.isNaN)(f)?f:d.j("autoBaselineStart")||window.NaN,v=d.j("baselineEnd");f=t.ea(v)&&!(0,window.isNaN)(v)?v:d.j("autoBaselineEnd")||f,null!=(v=d.get("progressValue"))&&(v=t.Ao(v)),v=null!=v?v:d.j("autoProgress")||0,d.j("progressValue",v),o=O(Math.min,o,r,p,g),r=O(Math.max,o,r,p,g),l=O(Math.min,l,h,m,f),h=O(Math.max,l,h,m,f),(0,window.isNaN)(p)||(0,window.isNaN)(g)||(s+=v*(d=g-p),a+=d)}}i.bc()&&!e.i&&(0!=a&&i.j("autoProgress",s/a),i.j("autoStart",o),i.j("autoEnd",r),i.j("autoBaselineStart",l),i.j("autoBaselineEnd",h))},$=function(t,e,i,n,s){var a=[];return P(e)&&a.push(e),P(i)&&a.push(i),P(n)&&a.push(n),P(s)&&a.push(s),a.length?t.apply(null,a):window.NaN},O=function(t,e,i,n,s){var a=[];return P(e)&&(a.push(e),P(i)&&a.push(i)),P(n)&&(a.push(n),P(s)&&a.push(s)),a.length?t.apply(null,a):window.NaN},P=function(e){return t.ea(e)&&!(0,window.isNaN)(e)},L=function(e,i){t.ea(i)&&!(0,window.isNaN)(i)&&((0,window.isNaN)(e.K)&&(e.K=i,e.ba=i),e.K=Math.min(i,e.K),e.ba=Math.max(i,e.ba))},I=function(e,i,n){if(!e.b.length)return 0;var s=e.b.length-1;return(i=Math.min(i,s))>(n=t.p(n)?Math.min(n,s):s)&&(i=(n+=i-=n)-i),e.b[n]-(e.b[i-1]||0)},A=function(e,i){var n=t.Na(e.b,i);return 0<=n?n:~n},E=function(e){if(e.D.length){e.f=(0,window.isNaN)(e.f)?e.fb:e.f,e.o=(0,window.isNaN)(e.o)?e.$a:e.o,e.fb=window.NaN,e.$a=window.NaN,(0,window.isNaN)(e.f)||(e.f=t.Za(e.f,0,e.D.length-1)),(0,window.isNaN)(e.o)||(e.o=t.Za(e.o,0,e.D.length-1));var i=I(e,0,e.b.length-1);e.G>=i?(e.f=0,e.P=0,e.o=e.D.length-1):((0,window.isNaN)(e.f)&&(0,window.isNaN)(e.o)&&(e.f=0),(0,window.isNaN)(e.f)?(i=I(e,0,e.o))<e.G?(e.f=0,e.P=0,e.o=A(e,e.G)):(e.f=A(e,e.b[e.o]-e.G),e.P=I(e,e.f,e.o)-e.G):(i=I(e,e.f)-e.P)<e.G?(e.f=A(e,e.b[e.b.length-1]-e.G),e.o=e.b.length-1,e.P=I(e,e.f,e.o)-e.G):e.o=A(e,(e.f?e.b[e.f-1]:0)+e.G+e.P))}else e.f=0,e.o=0,e.P=0;e.lE=!0,t.Op()||e.I(256)},G=function(e,i){return t.p(i)?(e.G!=i&&(e.G=i,e.B(256,2)),e):e.G},U=function(e,i){t.p(i)&&e.te!=i&&(e.te=i,e.B(256,2))},F=function(e,i){t.p(i)&&e.Zh!=i&&(e.Zh=i,e.B(256,2))},M=function(t){for(;t.iz.length;)(0,window.clearTimeout)(t.iz.pop())},_=function(t){return t.te&&t.te.Gb||t.Zh&&t.Zh.Gb},N=function(e){t.Op()?e.iz.push(t.Ep((function(){this.iz.push(t.Ep(this.T0,void 0,this)),this.iz.push(t.Ep(this.ifa,void 0,this))}),void 0,e)):e.T0()},R=function(e){return e.aa||(e.aa=new s,e.aa.U(t.zm("defaultScrollBar")),e.aa.we("vertical"),e.aa.wa("scrollchange",(function(t){var i=t.startRatio;t=t.endRatio;var n=e.b[e.b.length-1];e.ka(),i?1==t?e.Nj(e.b.length):(t=Math.round(i*n),t-=(i=A(e,t))?e.b[i-1]:0,e.Cg(i).km(t)):e.Cg(0).km(0),e.da(!0)}))),e.aa},j=function(e,i){if(t.p(i)){var n=Math.max(+i,0);if(e.b.length){var s=e.b[e.b.length-1];e.ka(),n>s-e.G?e.Nj(e.b.length-1):(n-=(s=A(e,n))?e.b[s-1]:0,e.Cg(s).km(n)),t.Op()&&E(e),e.da(!0)}else e.Ka=n,e.qc=!0;return e}return e.Ka},B=function(t,e){t.la.ka();var i=t.la.aw();for(i.bO(t.hha);i.advance();){var n=i.current();n.j("collapsed",e),D(t,n)}t.la.da(!0)},H=function(){t.Y.call(this),this.f="vertical",this.K=this.o=this.G=this.Vc=null,this.af=.5,this.ea=this.aa=this.P=this.D=0,this.Za=this.Ka=!1,this.$a=t.yf(t.Lp.body,"cursor"),this.b=3,this.ba=!0,this.i=t.Wb("#acbece"),this.na=t.Ub({keys:["0 #9ccae3","0.5 #a9dbf6","1 #e3f4fc"],angle:-90,opacity:1}),this.Sb=t.Ub("#cecece"),this.Ba=t.Ub("#ccd7e1 0.3"),this.ec=t.Wb(null),this.fb=t.Ub("#fff 0"),this.sb=t.Wb(null),this.Ha=!0},z=function(e){var i=0;t.p(i)&&(i=+i,(0,window.isNaN)(i)||(i=Math.abs(i),e.D!=i&&(e.aa=i,e.B(64,1))))},V=function(e,i,n){t.uf(t.Lp.body,"cursor",n?e.$a:i?"e-resize":"n-resize")},q=function(e){var i=K(e);e.Vc.cursor(i?"e-resize":"n-resize");var n=e.ab;if(e.ba)var s=i?n.tb()+e.af*(n.zd()-e.b):n.tb(),a=i?n.Vb():n.Vb()+e.af*(n.qd()-e.b),o=i?n.tb()+e.D-3:n.tb(),r=i?n.Vb():n.Vb()+e.D-3,l=i?n.zd()-e.D-e.P+6:n.zd(),h=i?n.qd():n.qd()-e.D-e.P+6;else s=i?n.tb()+e.af*n.zd()-e.b/2:n.tb(),a=i?n.Vb():n.Vb()+e.af*n.qd()-e.b/2,o=i?n.tb()+e.D-3-e.b/2:n.tb(),r=i?n.Vb():n.Vb()+e.D-3-e.b/2,l=i?n.zd()-e.D-e.P+6+e.b:n.zd(),h=i?n.qd():n.qd()-e.D-e.P+6+e.b;var c=i?e.b:n.zd(),u=i?n.qd():e.b,d=i?s-3:n.tb(),p=i?n.Vb():a-3,g=i?e.b+6:n.zd();i=i?n.qd():e.b+6,o=new t.I(o,r,l,h),e.G.Ho(s).Io(a).Go(c).Fo(u),e.o.Ho(d).Io(p).Go(g).Fo(i).Om(o)},W=function(e){return e.o||(e.o=t.mk().stroke(e.sb).fill(e.fb),t.Ld(e.o,"dblclick",e.aia,!1,e),t.Ld(e.o,"mousemove",e.eba,!1,e),t.Ld(e.o,"mouseout",e.fba,!1,e),t.Ld(e.o,"start",e.dba,!1,e),t.Ld(e.o,"drag",e.ko,!1,e),t.Ld(e.o,"end",e.cba,!1,e)),e.o},Y=function(e){return e.K||(e.K=t.mk().visible(!1)),e.K},K=function(t){return"horizontal"!=t.f.toLowerCase()},X=function(){t.Y.call(this),this.o=this.b=this.f=this.Vc=null,this.af=window.NaN,this.aa=this.P=!1,this.ea=t.yf(t.Lp.body,"cursor"),this.i=t.Wb("1 #acbece"),this.ba=t.Wb("1 #acbece"),this.D=1,this.G=t.Ub("#ccd7e1 0.3"),this.na=t.Ub("#fff 0.00001"),this.K=!0},J=function(e,i){t.uf(t.Lp.body,"cursor",i?e.ea:"e-resize")},Z=function(e){e.Vc.cursor("e-resize");var i=e.ab.left+e.af+e.D/2,n=new t.I(e.ab.left-3,e.ab.top,e.ab.width+6,e.ab.height);e.f.clear().moveTo(i,e.ab.top).lineTo(i,e.ab.top+e.ab.height),i=e.ab.left+e.af-3;var s=e.ab.left+e.af+e.D+3;e.b.oc(1,0,0,1,0,0),e.b.clear().moveTo(i,e.ab.top).lineTo(s,e.ab.top).lineTo(s,e.ab.top+e.ab.height).lineTo(i,e.ab.top+e.ab.height).close().Om(n)},Q=function(e){return e.o||(e.o=t.qk(),e.o.fill(e.G).stroke(null)),e.o},tt=function(){t.V.call(this),this.Xb=null,t.T(this.ua,[["fill",0,2],["stroke",0,2],["placementStroke",0,2],["enabled",0,32768]])},et=function(){this.f=this.i=this.b=null},it=function(t,e){if(t.b!=e){if(t.b){var i=t.b.Pq();i.ka(),t.b.j("selected",!1),i.da(!1)}else t.i=null;e?((i=e.Pq()).ka(),e.j("selected",!0),i.da(!1)):t.i=null,t.b=e}},nt=function(t,e){return!!t.b&&(e.j("selected")?(it(t,e),!0):t.b.j("selected")?t.b==e:(t.b=null,t.i=null,!1))},st=function(t,e,i){return!(!nt(t,e)||null==t.i)&&t.b==e&&t.i===i},at=function(t,e,i,n,s,a,o,r){e&&i?(t.f={sfa:e,kla:i,tfa:n,lla:s,G1:a,I6:o,y0:r||"finish-start"},it(t,null),t.i=null):t.f=null},ot=function(e,i){t.Y.call(this),this.yo=null,this.Jy=t.yk(),this.Vg=null,this.Gb=this,this.pu=!0,this.controller=null,e&&t.J(e,y)?(this.controller=e,this.pu=!1):(this.controller=new y(i),t.K(this.controller,this.AW,this),this.bz=new et),this.fa=null,this.Tn=1,this.Za=null,this.Od=[],this.me=this.Sb=this.yg=this.ec=this.Uc=this.fb=this.Zq=this.bj=this.sb=this.Vc=this.ud=null,this.G=45,this.M6=this.f=0,this.$a=this.D=this.Ba=this.Ha=null,this.mp=[],this.Hd=[],this.ea=-1,this.Dk=this.dn=0,this.vi=this.$y=!1,this.oj=null,this.altKey=!1,this.Vn=null,this.bx=this.Fu=0,this.Cm=!0,this.Ap=this.gb=this.i=this.Vi=null,this.zo=!1,t.su(this,this,this.k_,this.Vaa,this.Uaa,this.k_,this.Taa),t.T(this.ua,[["backgroundFill",16,1],["rowFill",16,1,void 0,function(){this.ta("rowOddFill",null),this.ta("rowEvenFill",null)}],["rowStroke",80,1,void 0,function(){this.Tn=t.dp(this.g("rowStroke")),this.pu||this.controller.Tn(this.Tn)}],["rowEvenFill",16,1],["rowOddFill",16,1],["rowHoverFill",0,0],["rowSelectedFill",16,1]])},rt=function(t,e){var i=e||dt(t),n=i.BN&&i.AN&&i.ZF===i.$K;return i=i.BN&&!i.AN,!t.bc()&&(n||i)},lt=function(t,e){var i=e||dt(t),n=i.fI&&i.eI&&i.start==i.end;return i=i.fI&&!i.eI,!t.bc()&&(i||n)},ht=function(t,e){var i=e||dt(t);return i.PA||i.QA&&i.YR},ct=function(t,e){var i=e||dt(t);return(!!t.bc()||i.QD)&&i.fI&&i.eI},ut=function(e,i){var n=window.NaN;return t.ea(e)&&!(0,window.isNaN)(e)?n=e:t.ea(i)&&!(0,window.isNaN)(i)&&(n=i),n},dt=function(e){var i=e.j("actualStart"),n=e.j("autoStart"),s=e.j("actualEnd"),a=e.j("autoEnd"),o=e.j("baselineStart"),r=e.j("autoBaselineStart"),l=e.j("baselineEnd"),h=e.j("autoBaselineEnd"),c=e.DD("baselineStart")||e.DD("baselineEnd")||!(0,window.isNaN)(r)||!(0,window.isNaN)(h),u=e.j("progressValue"),d=e.j("autoProgress"),p=e.get("baselineProgressValue"),g=t.ea(p)||t.uo(p);return p=g?t.uo(p)?(0,window.parseFloat)(p)/100:Number(p):window.NaN,i=ut(i,n),s=ut(s,a),o=ut(o,r),l=ut(l,h),u=ut(u,d),d=e.j("minPeriodDate"),h=e.j("maxPeriodDate"),{start:i,end:s,ZF:o,$K:l,f0:p,Kd:u,fI:!(0,window.isNaN)(i),eI:!(0,window.isNaN)(s),BN:!(0,window.isNaN)(o),AN:!(0,window.isNaN)(l),bN:c,QA:!(0,window.isNaN)(i)&&!(0,window.isNaN)(s)&&i!=s,eha:!(0,window.isNaN)(i)&&!(0,window.isNaN)(s)&&i==s&&e.bc(),PA:t.ea(o)&&!(0,window.isNaN)(o)&&t.ea(l)&&!(0,window.isNaN)(l)&&o!==l,EN:!(0,window.isNaN)(u),YR:g,Cta:d,Bta:h,DN:!(0,window.isNaN)(d)&&!(0,window.isNaN)(h),QD:!!e.get("anychartIsLoadable")}},pt=function(e,i){var n=e.no("periods",i),s=n?n.start:void 0,a=n?n.end:void 0,o=null!=s&&!(0,window.isNaN)(s),r=null!=a&&!(0,window.isNaN)(a),l=n?n.baselineStart:void 0;return{start:s,end:a,EI:o?s:r?a:null,ZF:l,$K:n=n?n.baselineEnd:void 0,BN:!(0,window.isNaN)(l),AN:!(0,window.isNaN)(n),PA:t.ea(l)&&!(0,window.isNaN)(l)&&t.ea(n)&&!(0,window.isNaN)(n)&&l!==n,fI:o,eI:r,DN:o&&r,CN:!!(o^r)}},gt=function(t,e,i){if(t.controller.i)var n="periods";else(t=i||dt(e)).PA?n="baselines":lt(e,t)?n="milestones":ct(e,t)?n="grouping-tasks":(t=t||dt(e)).fI&&t.eI&&t.start!=t.end&&!e.bc()&&!t.PA&&(n="tasks");return n},ft=function(t,e){t.Gb=e,t.Gb!=t&&t.uf().parent(t.Gb.uf())},mt=function(e,i){i&&!e.cQ?(t.Ld(t.Lp,"mousemove",e.fT,!1,e),e.cQ=!0):(t.Yd(t.Lp,"mousemove",e.fT,!1,e),e.cQ=!1)},vt=function(e){return e.Vc||(e.Vc=t.ok(),t.ru(e,e.Vc,null,null,null,null,e.j_)),e.Vc},bt=function(e){return e.Zq||(e.Zq=t.ok(),e.Zq.zIndex(30)),e.Zq},yt=function(e){return e.ec||(e.ec=t.ok(),e.ec.zIndex(35)),e.ec},St=function(e){return e.fb||(e.fb=t.ok(),e.fb.zIndex(40)),e.fb},xt=function(e){return e.Uc||(e.Uc=t.ok(),e.Uc.zIndex(45)),e.Uc},wt=function(e){return e.Sb||(e.Sb=t.ok(),e.Sb.zIndex(50)),e.Sb},Ct=function(e){return e.me||(e.me=t.ok(),e.me.zIndex(60)),e.me},Tt=function(t){return t.Ha||(t.Ha=bt(t).path(),t.Ha.stroke(null).zIndex(1)),t.Ha},Dt=function(t){return t.Ba||(t.Ba=bt(t).path(),t.Ba.stroke(null).zIndex(1)),t.Ba},kt=function(t){return t.D||(t.D=bt(t).path(),t.D.stroke(null).zIndex(2)),t.D},$t=function(t,e){return t.Hd[e]||(t.Hd[e]=bt(t).path(),t.Hd[e].stroke(null).zIndex(1)),t.Hd[e]},Ot=function(t){return t.$a||(t.$a=bt(t).path(),t.$a.stroke(null).zIndex(3)),t.$a},Pt=function(t){return t.Za||(t.Za=bt(t).path(),t.Za.stroke(t.g("rowStroke")).zIndex(4)),t.Za},Lt=function(t,e){return t.Od[e]||(t.Od[e]=bt(t).path(),t.Od[e].stroke(t.g("rowStroke")).zIndex(4)),t.Od[e]},It=function(t){return t.yg||(t.yg=xt(t).path()),t.yg},At=function(t){return t.ud||(t.ud=bt(t).path(),t.ud.zIndex(40)),t.ud},Et=function(e,i){if(!e)return t.Xl;var n=i+"|"+e+"|false",s=Zi[n];if(!s){switch(i){case 2:s=t.Zl;break;case 3:s=t.$l;break;default:s=t.am}Zi[n]=s=t.qa(Gt,e,s,3==i,!1)}return s},Gt=function(e,i,n,s,a,o,r,l,h,c,u){if(o=t.em(o),s&&o!=t.gm){var d=a.sc(e,o,i);if(n&&!0===d&&(d=i(a.Eh())),t.p(d)){if(!t.D(d))return d;if(n)return n=a.Yi(),i(d.call(n,n))}}return s=a.sc(e,0,i),n&&!0===s&&(s=i(a.Eh())),t.D(s)&&(n=n?a.Yi():a.Ge(e,r,l,h,c,u),s=i(s.call(n,n))),d&&(n=a.Ge(e,r,l,h),s=i(d.call(n,n))),s},Ut=function(e){t.eq.ui.ContextMenu&&e.Gb.contextMenu&&(e=e.Gb.contextMenu()).Oe()&&e.Lc()},Ft=function(e){if(!e.yo){var i=vt(e).ia();i&&(e.yo=new t.Ex(i),t.Ld(e.yo,"mousewheel",e.Oy,!1,e),t.Ld(t.ll,"unload",(function(){t.Yd(e.yo,"mousewheel",e.Oy,!1,this)}))),e.tq().wa("scrolling",(0,t.pa)(e.XS,e,!0))}},Mt=function(e){e.Gb.bg||(e.Gb.bg=new jt(e.Gb,t.Lp),t.Ld(e.Gb.bg,"key",(function(t){18==t.keyCode&&(this.altKey=!0),(46==t.keyCode||t.metaKey&&8==t.keyCode)&&this.AG(t)}),!1,e.Gb))},_t=function(t){var e=It(t);e.fill(t.uf().g("fill")),e.stroke(t.uf().g("stroke"))},Nt=function(t,e){if(e){var i=Et("rowSelectedFill",1)(t,0,e);return Ot(t).fill(i),it(t.Gb.nk(),e),t.B(128,1),!0}return!1},Rt=function(e,i){t.ag.call(this,e.ia()),this.b=i,this.y=this.x=0,t.bg(this)},jt=function(e,i,n){t.Jp.call(this,i,n),this.b=e},Bt=function(){t.sg.call(this),this.j={}},Ht=function(){t.Y.call(this),this.Ga("defaultButtonSettings"),this.dc=0,t.T(this.ua,en),this.VE={},this.ca=new t.my(this,tn,0,nn),this.za=new t.my(this,tn,1,nn),this.Ea=new t.my(this,tn,2,nn),this.VE[0]=this.ca,this.VE[1]=this.za,this.VE[2]=this.Ea;var e=this.VE[0],i=this.VE[1],n=this.VE[2];this.BP={},this.BP[0]=[e.Pa,e.oa],this.BP[1]=[i.Pa,i.oa,e.Pa,e.oa],this.BP[2]=[n.Pa,n.oa,e.Pa,e.oa],this.YK={},e=e.background(),i=i.background(),n=n.background(),this.YK[0]=[e.oa,e.Pa],this.YK[1]=[e.oa,e.Pa,i.oa,i.Pa],this.YK[2]=[e.oa,e.Pa,n.oa,n.Pa]},zt=function(t){Ht.call(this),this.Ga("defaultDataGrid.buttons"),this.te=t,this.b=-1,this.Qa().background().P=!1,this.lb().background().P=!1,this.WE=this.selected().background().P=!1,this.kb(this.te)},Vt=function(e,i){t.Y.call(this),this.te=e,t.K(this.te.controller,this.Zda,this),this.Ad=i,this.Lw=[],this.gg=this.jz=this.jb=this.Zq=this.MJ=this.Vc=this.zj=null,this.Jf=0,this.ab=null,this.QT=this.kea,this.Lm=[],this.ye=[],this.Zr=[],this.QV=[],this.dX=this.eX=window.NaN,this.VD=this.yG,this.kb(this.te),t.T(this.ua,[["width",4,9,0,function(){this.ab=null}],["defaultWidth",0,0],["collapseExpandButtons",128,1],["depthPaddingMultiplier",128,1]]),this.I(1)},qt=function(t){for(var e=0;e<t.ye.length;e++)t.ye[e].ld();t.ye.length=0},Wt=function(e,i,n,s){var a=e.ye[i],o=e.Zr[i];if(n){var r=e.Lw[i];r||((r=new t.Hx).df(!0),r.parent(e.labels()),e.Lw[i]=r),e.VD(r,o)}if(s&&(t.Kx(a),a.Ta=null),o){if(n){var l=o.j("index");l=e.Lw[l]}else l=e.labels();e=e.te.Ic(o),e=l.tk(e),a.text(e)}a.style(l.flatten()),t.Mx(a),a.Ij()},Yt=function(e){return e.MJ||(e.MJ=t.ok()),e.MJ},Kt=function(e){return e.jz||(e.jz=t.qk(),Yt(e).Eg(e.jz,0),e.jz.fill(e.te.g("headerFill")),e.jz.stroke(null)),e.jz},Xt=function(e){return e.Zq||(e.Zq=t.ok()),e.Zq},Jt=function(){t.Hy.call(this),this.Bb=null},Zt=function(t,e,i){return{originalEvent:e,type:i,value:t.vj()}},Qt=function(e){if(ot.call(this,e),this.Ga("defaultDataGrid"),this.b=[],this.o=[],this.Ka=null,this.ba=0,this.P={},U(this.controller,this),this.qc=this.fh=this.K=null,this.Mw={first:window.NaN,sw:window.NaN,count:window.NaN,reset:!0},this.YE=[],t.T(this.ua,[["columnStroke",512,1],["headerFill",16,1],["fixedColumns",4,1,0,function(){this.Gb.B(4,1)}],["onEditStart",0,0],["onEditEnd",0,0]]),"columns"in(e=this.oa))for(var i=0;i<e.columns.length;i++)e.columns[i]&&se(this,i)},te=function(e){return function(i){return t.ea(i)?new t.Xn(e).format(new t.On(new Date(i))):t.p(i)?String(i):""}},ee=function(e){return e.Ka||(e.Ka=t.qk(),bt(e).Eg(e.Ka,0),e.Ka.stroke(null)),e.Ka},ie=function(e){return e=Et("columnStroke",2)(e,0),t.dp(e)},ne=function(e,i){for(var n=ie(e),s=0,a=0,o=0,r=e.b.length;o<r;o++){var l=e.b[o];l&&l.enabled()&&!l.md&&(a=l.width(),t.uo(a)&&(a=90,l.ab=null,l.ka(),l.da(!1)),l.width(a),s+=a+=n)}return s-(i?a:0)},se=function(e,i,n,s){var a=!1,o=t.N(i);return(0,window.isNaN)(o)?(o=0,n=i):o=i,(i=e.b[o])||(i=new Vt(e,o),a=e.oa,i.Ga(a.defaultColumnSettings),"columns"in a&&i.Ga(a.columns[o]),t.K(i,e.Sda,e),t.wl(i),a=!0),t.p(n)?(a=t.J(n,Vt)?n.F():n,i.ga(!!s,a),i.enabled()&&i.O(St(e)),e.b[o]=i,e.B(528,1),e):(a&&(i.O(St(e)),e.b[o]=i,e.B(528,1),e.g("fixedColumns")&&e.Gb.B(4,1)),function(e){for(var i=0,n=0,s=e.b.length;n<s;n++)e.b[n]&&e.b[n].enabled()&&i++;if(i>e.o.length){var a=new X;n=Et("columnStroke",2)(e,0),a.stroke(n),a.ba=n,a.O(wt(e)),t.K(a,(function(){a.W(),this.g("fixedColumns")&&this.Gb.B(4,1)}),e),a.wa("splitterpositionchange",(0,t.pa)(e.Gka,e,i-1)),a.wa("dblclick",(0,t.pa)(e.Hka,e,i-1)),a.wa("dragstart",(0,t.pa)(e.XS,e,!0)),a.wa("drag",(0,t.pa)(e.XS,e,!0)),e.o.push(a)}}(e),i)},ae=function(e){e.controller.iz.push(t.Ep((function(){!function(t){if(t.Mw.reset){t.Gb.dispatchEvent("workingstart");for(var e=0,i=0,n=t.b.length;i<n;i++){var s=t.b[i];s&&s.enabled()&&!s.md&&e++}i=t.controller.Zr,t=t.Mw,i.length?(t.first=0,t.count=Math.min(Math.max(1,Math.floor(300/e)),i.length),t.sw=t.first+Math.max(0,t.count-1),t.reset=!1):(t.first=window.NaN,t.sw=window.NaN,t.count=window.NaN,t.reset=!0)}}(this);var e=!1;if(this.Sv((function(i){if(!i.pf()){e=!0,i.Uw();var s=!1,a=!1,o=0;i.J(512)&&(s=!0),i.J(1024)&&(n(i.labels())&&(o|=t.LE),s=a=!0),i.J(2048)&&(o|=t.KE,s=a=!0),s&&i.Hx(a),i.va(o)}})),e)if(function(t){var e=t.controller.Zr;return t=t.Mw,!((0,window.isNaN)(t.sw)||t.sw>=e.length-1||(t.first=t.sw+1,t.sw=t.first+Math.min(e.length-1-t.first,t.count),0))}(this)){var i=Math.round(this.Mw.sw/this.controller.Zr.length*100);(0,window.isNaN)(i)?this.PN().enabled(!1):(this.PN().enabled(!0).ja(this.fa).text("Working: "+i+"%").W(),this.Gb.dispatchEvent({type:"working",progress:i})),t.vl.measure(),this.Sv((function(t){t.B(128),t.W()})),ae(this)}else this.Sv((function(t){t.I(3584),t.B(128),t.W()})),this.Wj(!1),this.PN().enabled(!1).W(),N(this.controller),this.controller.iz.push(t.Ep((function(){M(this.controller),this.Gb.dispatchEvent({type:"working",progress:100}),this.Gb.dispatchEvent("workingfinish")}),void 0,this))}),void 0,e))},oe=function(){Qt.call(this)},re=function(e){t.Ny.call(this),this.Ga("defaultLineMarkerSettings"),this.Po(e),t.kr(e,this.zg,this),t.T(this.ua,[["stroke",16,1],["value",0,0,0,function(){this.B(4,this.uD())}]])},le=function(e){t.Ny.call(this),this.Ga("defaultRangeMarkerSettings"),this.Po(e),t.kr(e,this.zg,this),t.T(this.ua,[["fill",16,1],["from",4,9],["to",4,9]])},he=function(e){t.Zy.call(this),this.Ga("defaultTextMarkerSettings"),this.Po(e),t.kr(e,this.zg,this),t.T(this.ua,[["value",0,0,0,function(){this.B(4,this.uD())}]])},ce=function(e){t.ag.call(this,e.ia()),this.element=e,this.y=this.x=0},ue=function(e){t.ag.call(this,e.ia()),this.element=e,this.Kd=window.NaN},de=function(t){ue.call(this,t)},pe=function(e,i,n){t.ag.call(this,i.ia()),this.element=i,this.My=!!n,this.i=this.b=window.NaN},ge=function(e,i){t.ag.call(this,e.ia()),this.element=e,this.b=!!i},fe=function(){t.V.call(this),this.Xb=null,t.T(this.ua,[["fill",0,2],["stroke",0,2],["size",0,2],["type",0,2],["verticalOffset",0,2],["horizontalOffset",0,2],["enabled",0,0]])},me=function(){t.V.call(this),this.Xb=this.b=this.f=null},ve=function(e){t.V.call(this),this.D=e,this.Xb=null,t.T(this.ua,[["fill",0,2],["stroke",0,2],["enabled",0,2]]),this.b=this.f=this.o=this.i=null},be=function(){t.V.call(this),this.b=this.Y=null,t.T(this.ua,[["position",0,1,void 0,this.at],["offsetY",0,1,void 0,this.at],["offsetX",0,1,void 0,this.at],["fill",0,1,void 0,this.at],["stroke",0,1,void 0,this.at],["anchor",0,1,void 0,this.at],["size",0,1,void 0,this.at],["rotation",0,1,void 0,this.at],["type",0,1,void 0,this.at],["enabled",0,1,void 0,this.at]])},ye=function(e,i,n,s,a,o,r){this.element=e,this.tag=s,this.b=r,this.predictedBounds=n,this.item=i,this.shapes=this.element.Rf.ed(i,s,o?t.wo:t.gm,void 0,void 0,void 0,a,r),t.p(a)&&(this.periodIndex=a,this.period=i.get("periods",a)),e.Ma(),(i=De(e,i,a))&&(i=i.markerType),this.markerType=i||e.g("markerType")},Se=function(e,i){t.V.call(this),this.Ed=i,this.Xb=this.Y=null,t.T(this.ua,[["drawer",0,1],["shapes",0,1]])},xe=function(t,e,i,n,s,a,o){e=new ye(t.Ed,e,i,n,s,a,o),t.g("drawer").call(e,e)},we=function(e,i,n){if(t.od.call(this),this.G=e,this.D=i,this.wb=null,this.b={},this.f={},this.o={},this.i={},t.A(n))for(e=0;e<n.length;e++){var s=(i=n[e]).shapeType;switch(String(s).toLowerCase()){case"none":var a=null;break;case"rect":a=t.mk;break;case"circle":a=t.nk;break;case"ellipse":a=t.pk;break;default:a=t.qk}this.b[s]||(this.b[s]=[],this.f[s]=[],this.o[s]=0),this.i[i.name]={zIndex:+i.zIndex,nS:a,Qb:s,Dd:!!i.disablePointerEvents}}this.IP={}},Ce=function(t,e,i,n,s,a,o){e=t.i[e];var r=t.D.Tm(i,a,o);return i=t.D.gk(i,a,o),s.fill(r),s.stroke(i),s.kb(t.G),s.Dd(!!e.Dd),s.zIndex(e.zIndex+n),s.parent(t.Bd),s},Te=function(e){t.V.call(this),this.Ga("defaultTimeline.elements"),this.Yj=this,this.Zh=e,this.Y=null,t.T(this.ua,[["height",0,1],["anchor",0,1],["position",0,1],["offset",0,1],["enabled",0,1]]),e={},t.T(e,[["fill",0,8192],["stroke",0,8192]]),this.ca=new t.my(this.Yj,e,t.gm),e={},t.T(e,[["fill",0,0],["stroke",0,0]]),this.Ea=new t.my(this.Yj,e,t.wo),this.gb=this.Vi=this.$s=this.Xb=this.cj=this.kI=this.Da=null},De=function(e,i,n){if(t.p(n))return i.get("periods")[n];for(e=e.qr(),n=0;n<e.length;n++){var s=i.get(e[n]);if(t.p(s)){var a=s;break}}return a},ke=function(e){Te.call(this,e),this.fi=null,t.T(this.ua,[["markerType",0,1]])},$e=function(e){ke.call(this,e),t.T(this.ua,[["depth",0,1],["drawOnCollapsedOnly",0,1]])},Oe=function(e){Te.call(this,e),t.T(this.ua,[["drawOverEnd",0,1]])},Pe=function(t){Oe.call(this,t)},Le=function(e){Te.call(this,e),t.T(this.ua,[["above",0,1],["disableWithRelatedTask",0,1]])},Ie=function(e){t.V.call(this),this.Yj=this,this.Zh=e,t.T(this.ua,[["previewStroke",0,2]]),e={},t.T(e,[["fill",0,8192],["stroke",0,8192]]),this.ca=new t.my(this.Yj,e,t.gm),e={},t.T(e,[["fill",0,0],["stroke",0,0]]),this.Ea=new t.my(this.Yj,e,t.wo)},Ae=function(t){Te.call(this,t),this.Ga("defaultTimeline.groupingTasks"),this.Fi=null},Ee=function(e){Te.call(this,e),this.fi=null,t.T(this.ua,[["markerType",0,1]])},Ge=function(e){Ee.call(this,e),t.T(this.ua,[["depth",0,1],["drawOnCollapsedOnly",0,1]])},Ue=function(t){Te.call(this,t)},Fe=function(t){Te.call(this,t),this.Ga("defaultTimeline.tasks"),this.Fi=null},Me=function(e,i){t.Y.call(this),this.Yk=e,this.qa=this.Yk.aa.scale(),this.Ad=i,this.Da=this.b=null,this.ye=[],this.Ia=null,this.mb=[],this.D=[],this.o="yyyy/MM/dd'T'HH:mm:ss.SSS",this.Bb={left:0,top:0,width:0,height:0},this.i=this.f=null,t.T(this.ua,[["enabled",1,32768],["stroke",16,1],["height",4,9]]),this.count=this.Dg=void 0},_e=function(e){if(!e.b){var i=null!=e.i;e.Da&&!t.Jc(e.Da.Pa)&&(i=!0),i&&(e.b=new t.bz,e.b.labels(e.labels()),t.wl(e.b))}},Ne=function(e){t.Y.call(this),this.Ga("defaultGanttHeader"),this.aa=e,this.i=null,this.K=new t.mI,this.Da=this.Ia=null,this.f=[],this.D=new t.nI,this.Bb={left:0,top:0,width:0,height:0},this.b=new t.bz,this.b.labels(this.labels()),t.dz(this.b),t.wl(this.b),t.T(this.ua,[["stroke",16,1],["levelHeight",512,1,void 0,this.rha],["drawTopLine",0,0],["drawRightLine",0,0],["drawBottomLine",0,0],["drawLeftLine",0,0]])},Re=function(e,i){ot.call(this,e,i),this.Ga("defaultTimeline"),this.dD=this.Ev=this.Hv=this.Gv=this.Fv=this.mA=this.iq=this.EE=this.su=this.rh=null,this.KN=void 0,this.LN=window.NaN,this.gJ=!1,this.Mt=this.Rt=this.Qt=this.Nt=this.NG=this.Pt=this.Ot=null,this.gT=this.GG=this.Yx=!1,this.ap=this.Wx=null,this.WJ=[],this.VJ=0,this.WA=[],this.pB=[],this.OB=[],this.os=[],this.eY=this.JH=null,this.qa=new t.st,t.K(this.qa,this.ii,this),function(e,i){t.p(i)&&e.Xq!==i&&(null===i?(t.kr(e.Xq,e.dL,e),e.Xq=null):(e.Xq&&t.kr(e.Xq,e.dL,e),e.Xq=i,t.K(e.Xq,e.dL,e)))}(this.qa,this),this.TC=this.Kj=this.ov=this.fw=this.Bt=this.hk=this.Nw=this.Kk=this.dy=null,this.QE=[],t.T(this.ua,[["cropLabels",2048,1],["zoomOnMouseWheel",0,0],["columnStroke",16,1],["workingFill",0,0,0,function(){var t=this.g("workingFill");Ve(this).fill(t)}],["notWorkingFill",0,0,0,function(){var t=this.g("notWorkingFill");qe(this).fill(t)}],["holidaysFill",0,0,0,function(){var t=this.g("holidaysFill");He(this).fill(t)}],["weekendsFill",0,0,0,function(){var t=this.g("weekendsFill");ze(this).fill(t)}],["connectBy",128,1],["allowConnectorCaps",0,8192]]),F(this.controller,this),this.GA()},je=function(t){return t.eY||(t.eY=t.controller.i?[t.Gr(),t.Wc(),t.Ml()]:[t.Nc(),t.np(),t.Wc(),t.Wc().Ei(),t.Ml(),t.Sp(),t.Sp().Ei(),t.Nc().Kd(),t.np().Kd(),t.Ml().Kd()]),t.eY},Be=function(e,i,n,s,a){return i={dha:!0,item:e,index:i,type:n,Ta:s},t.p(a)&&(i.Fq=a,e=e.get("periods"),i.ub=e[a]),i},He=function(t){return t.hN||(t.hN=Ui(t).path(),t.hN.zIndex(0),t.hN.stroke("none").fill(t.g("holidaysFill"))),t.hN},ze=function(t){return t.dQ||(t.dQ=Ui(t).path(),t.dQ.zIndex(0),t.dQ.stroke("none").fill(t.g("weekendsFill"))),t.dQ},Ve=function(t){return t.fQ||(t.fQ=Ui(t).path(),t.fQ.zIndex(1),t.fQ.stroke("none").fill(t.g("workingFill"))),t.fQ},qe=function(t){return t.eO||(t.eO=Ui(t).path(),t.eO.zIndex(1),t.eO.stroke("none").fill(t.g("notWorkingFill"))),t.eO},We=function(t){return t.EE||(t.EE=wt(t).path(),t.EE.zIndex(6),t.EE.stroke(Et("columnStroke",2)(t,0))),t.EE},Ye=function(t){return t.iq||(t.iq=xt(t).path(),t.iq.zIndex(0).cursor("ew-resize"),t.wc.wa(t.iq,"mousedown",(function(t){t.stopPropagation()})),t.iq.Ce("mousedown",t.Rea,!1,t)),t.iq},Ke=function(t){return t.mA||(t.mA=xt(t).path(),t.mA.zIndex(10),t.wc.wa(t.mA,"mousedown",(function(t){t.stopPropagation()})),t.mA.Ce("mousedown",t.Sea,!1,t)),t.mA},Xe=function(t){return t.OG||(t.OG=xt(t).path(),t.OG.zIndex(10),t.wc.wa(t.OG,"mousedown",(function(t){t.stopPropagation()})),t.OG.Ce("mousedown",t.Iea,!1,t)),t.OG},Je=function(t){return t.Fv||(t.Fv=xt(t).path(),t.Fv.zIndex(20).cursor("col-resize"),t.Fv.Ei=Ye(t),t.wc.wa(t.Fv,"mousedown",(function(t){t.stopPropagation()})),t.Fv.Ce("mousedown",t.Qea,!1,t)),t.Fv},Ze=function(t){return t.Gv||(t.Gv=xt(t).path(),t.Gv.zIndex(30).cursor("col-resize"),t.Gv.Ei=Ye(t),t.wc.wa(t.Gv,"mousedown",(function(t){t.stopPropagation()})),t.Gv.Ce("mousedown",t.Tea,!1,t)),t.Gv},Qe=function(t){return t.Hv||(t.Hv=xt(t).path(),t.Hv.zIndex(40).cursor("move"),t.wc.wa(t.Hv,"mousedown",(function(t){t.stopPropagation()})),t.Hv.Ce("mousedown",t.Uea,!1,t)),t.Hv},ti=function(t){return t.Ev||(t.Ev=xt(t).path(),t.Ev.zIndex(50).cursor("move"),t.wc.wa(t.Ev,"mousedown",(function(t){t.stopPropagation()})),t.Ev.Ce("mousedown",t.Lea,!1,t)),t.Ev},ei=function(t){return t.dD||(t.dD=xt(t).path(),t.dD.zIndex(60),t.dD.Dd(!0)),t.dD},ii=function(t,e){for(var i=0;i<t.os.length;i++)t.os[i].clear().oc(1,0,0,1,0,0);t.os.length=0,e||(t.Ua().enabled(t.ot),t.ot=void 0)},ni=function(e,i,n,s){var a=i;switch(e=e.Ml().g("above"),n){case"tasks":case"periods":s&&"left-center"==i&&(a=e?"left-top":"left-bottom");break;case"grouping-tasks":a=t.Ko(i)?"left-top":"left-bottom",s&&"left-center"==i&&(a=e?"left-top":"left-bottom");break;case"baselines":"left-center"==i&&(a=e?"left-bottom":"left-top")}return a},si=function(e,i,n){if(e.Wx){var s=e.Wx.b?e.Fv:e.Gv,a=s.tag.item,o=s.tag.Fq,r=s.tag.Ta;switch(s.tag.type){case"baselines":s=e.Wx.b?a.j("baselineEnd"):a.j("baselineStart");break;case"periods":s=e.Wx.b?a.no("periods",o,"end"):a.no("periods",o,"start");break;default:s=dt(a),s=e.Wx.b?s.end:s.start}a=t.Zj(e.O().Ja()).x,i=n?0>n?e.fa.left:e.fa.left+e.fa.width:i.clientX-a,n=t.Ft(e.qa,s),n=e.fa.left+e.fa.width*n,e.iq.clear().moveTo(n,r.top).lineTo(i,r.top).lineTo(i,r.top+r.height).lineTo(n,r.top+r.height).close()}},ai=function(e,i,n,s){if(e.ap&&e.vi){var a=e.ap.My?e.Hv:e.Ev,o=a.tag.index;a=a.tag.Fq;var r=t.Zj(e.O().Ja()),l=r.x;r=r.y,n||s?(n=e.ap.b-l,i=e.ap.i-r):(n=i.clientX-l,i=i.clientY-r),s=Oi(e,o,a),o=e.nj().previewStroke(),l=t.dp(o)%2&&"svg"===t.kk?.5:0,a=e.ap.My?s.left:s.left+s.width,s=s.top+s.height/2+l,ei(e).stroke(o).clear().moveTo(a,s).lineTo(n,i)}},oi=function(t,e){var i="connectorselect";if(e)switch(i=e.type,i){case"mouseout":i="connectormouseout";break;case"mouseover":i="connectormouseover";break;case"mousemove":case"touchmove":i="connectormousemove";break;case"mousedown":case"touchstart":i="connectormousedown";break;case"mouseup":case"touchend":i="connectormouseup";break;case"click":i="connectorclick";break;case"dblclick":i="connectordblclick"}return{type:i,actualTarget:e?e.target:null,target:t,originalEvent:e}},ri=function(e,i){if(i&&i.originalEvent){var n=i.originalEvent,s=t.J(n,t.Si)?n.target:n.domTarget;if(s&&t.J(s,Bt)&&"connectors"==s.type){for(var a in n=oi(e,n),s.j)n[a]=s.j[a];return n}}return null},li=function(t,e){switch(e){case"periods":return t.Gr();case"tasks":return t.Nc();case"grouping-tasks":return t.np();case"baselines":return t.Ml();case"milestones":return t.Wc();case"baselines-milestones":return t.Sp();case"milestones-preview":return t.Wc().Ei();case"baselines-milestones-preview":return t.Sp().Ei()}return t.elements()},hi=function(t,e){return t.controller.i?t.Gr():lt(e)?t.Wc():ct(e)?t.np():t.Nc()},ci=function(e,i,n){if(t.p(n))var s=(i=pt(i,n)).PA?e.Ml():i.CN?e.Wc():e.Gr();else s=lt(i)?e.Wc():rt(i)?e.Sp():ht(i)?e.Ml():ct(i)?e.np():dt(i).DN?e.Gr():e.Nc();return s.Ua()},ui=function(t,e){var i=ri(t,e);return!!i&&(ii(t),t.Gb.dispatchEvent(i),!0)},di=function(t,e){var i=e&&e.originalEvent?e.originalEvent.domTarget:null;if(i&&"connectors"==i.type){ii(t);var n=ri(t,e);return t.Gb.dispatchEvent(n)&&((n=ri(t,e)).type="connectorselect",t.Gb.nk().f&&pi(t,e.originalEvent),t.Gb.dispatchEvent(n)&&(t.Gb.jJ(e.originalEvent),i=i.j,at(t.Gb.nk(),i.fromItem,i.toItem,i.fromItemIndex,i.toItemIndex,i.fromPeriodIndex,i.toPeriodIndex,i.connType),t.B(128,1))),!0}return!1},pi=function(t,e){var i=t.Gb.nk();if(i.f){var n=oi(t,e);n.type="connectorselect",t.Gb.dispatchEvent(n)&&(at(i,null),t.B(128,1))}},gi=function(t,e,i){var n=Et("rowSelectedFill",1)(t,0,e);return Ot(t).fill(n),n=t.Gb.nk(),it(n,e),n.i=e?i:null,!!n.b&&(t.B(128,1),!0)},fi=function(t){if(t.VJ<t.WJ.length){var e=t.WJ[t.VJ++];e.reset()}else(e=new Bt).kb(t),t.WJ.push(e),t.VJ++;return e.parent(yt(t)),e},mi=function(t,e,i){return t*=e,(i=i.g("drawOverEnd"))?t:Math.min(t,e)},vi=function(e,i,n,s,a,o){var r="grouping-tasks"==i.Ma(),l=i.qd(s,o);r=t.L(l,a||r?n.height/2:n.height),l=i.g("anchor");var h=i.g("position");return s=i.rD(s,o),s=t.L(s,n.height),"auto"==l&&(l=ni(e,h,i.Ma(),a)),e=t.Eo(n,h),new t.I(e.x,e.y+(t.Ko(l)?0:t.Lo(l)?-r:-r/2)+s,n.width,r)},bi=function(e,i,n,s,a){return e=e.gk(n,a?t.wo:t.gm,s),e=t.dp(e)%2&&"svg"===t.kk?.5:0,n=Math.round(i.left)+e,s=Math.round(i.top)+e,new t.I(n,s,Math.round(i.left+i.width)+e-n,Math.round(i.top+i.height)+e-s)},yi=function(e,i,n,s){e.controller.data().ka(),t.p(s)?(t.A(i.j("periodBounds"))||i.Jk("periodBounds",[]),i.Jk("periodBounds",s,n)):i.j("relBounds",n),e.controller.data().da(!1)},Si=function(e,i,n,s,a,o){if(!o){if(!i.b)for(var r in i.b={},wn)o=i.g(r),t.p(o)&&(i.b[r]=o);o=i.b}(i=o).enabled&&(e=e.Db().add({value:n}),r=!("stroke"in i),((n=!("fill"in i))||r)&&(i=t.Qc(i),n&&(i.fill=t.Pl(s)),r&&(i.stroke=t.Pl(a))),e.N(i))},xi=function(e,i,n,s,a){var o=De(n,i,a),r=o&&o.startMarker;o=o&&o.endMarker;var l=s.top+s.height/2,h={x:s.left,y:l};s={x:s.left+s.width,y:l},l=n.Tm(i,t.gm,a),i=n.gk(i,t.gm,a),a=n.BJ(),n=n.QG(),Si(e,a,h,l,i,r),Si(e,n,s,l,i,o)},wi=function(t,e){var i=t.g("enabled"),n=0!=t.g("depth"),s=e.j("collapsed");return s=!t.g("drawOnCollapsedOnly")||s,i&&n&&s},Ci=function(e,i,n,s,a,o){var r=a.QD||ct(i,a),l=t.p(o),h=r?e.np():l?e.Gr():e.Nc(),c=e.Ml();o=l?o:void 0,l=l?st(e.Gb.nk(),i,o):nt(e.Gb.nk(),i);var u=a.start,d=a.end;r&&(d=(0,window.isNaN)(d)?u:d,u=(0,window.isNaN)(u)?d:u);var p=a.ZF,g=a.$K;u=t.Ft(e.qa,u),d=t.Ft(e.qa,d),p=t.Ft(e.qa,p),g=t.Ft(e.qa,g);var f=h.g("enabled"),m=c.g("disableWithRelatedTask"),v=c.g("enabled")&&(!m||f);if(v=0<g&&1>p&&v,(m=0<d&&1>u&&f)||v){if(f=e.fa,m){var b=f.left+f.width*u;b=vi(e,h,new t.I(b,n,f.left+f.width*d-b,s),i,!0)}if(v){var y=f.left+f.width*p;y=vi(e,c,new t.I(y,n,f.left+f.width*g-y,s),i,!0)}if(b&&y&&Ti(e,b,y,h,i),y&&(y=bi(c,y,i,void 0,l),u=e.io(i,c,y,o),xe(c.hi(),i,y,u,o,l),xi(e,i,c,y)),b&&(r&&!b.width&&(u=b.height,b.left-=u/2,b.width=u,a.QA=!0),b=bi(h,b,i,o,l),u=e.io(i,h,b,o),r&&(d=e.Wc().Ei(),r=e.Sp().Ei(),d=wi(d,i),r=wi(r,i),Di(e,0,i,n,s,t.oa(i),d,r,!0)),yi(e,i,b),a.QA?(xe(h.hi(),i,b,u,void 0,l),xi(e,i,h,b),o=h.Kd(),a.EN&&o.g("enabled")&&(r=mi(a.Kd,b.width,o),u=vi(e,o,new t.I(b.left,b.top,r,b.height),i),d=e.io(i,o,u),xe(o.hi(),i,u,d,void 0,l),r&&xi(e,i,o,u))):a.DN&&xe(h.hi(),i,b,u,o,l)),y)var S=y;else b&&((S=b.clone()).top=n,S.height=s,(S=vi(e,c,S,i,!0)).top+=.5,Ti(e,b,S,h,i));S&&(n=c.Kd(),a.YR&&n.g("enabled")&&(a=mi(a.f0,S.width,n),S=vi(e,n,new t.I(S.left,S.top,a,S.height),i),s=e.io(i,n,S),xe(n.hi(),i,S,s,void 0,l),a&&xi(e,i,n,S)))}},Ti=function(e,i,n,s,a){var o=s.g("anchor"),r=s.g("position"),l=e.Ml().g("anchor"),h=e.Ml().g("position");o==l&&r==h&&("auto"==o&&(o=ni(e,r,s.Ma(),!0)),"auto"==l&&(l=ni(e,h,e.Ml().Ma(),!0)),r=e.Ml().gk(a,t.gm),s=s.gk(a,t.gm),s=t.dp(s)/2,s+=a=t.dp(r)/2,o==l&&(e.Ml().g("above")?t.Ko(o)?i.top+=n.height+s:n.top-=i.height+s:t.Ko(o)?n.top+=i.height+s:i.top-=n.height+s))},Di=function(t,e,i,n,s,a,o,r,l){var h=dt(i),c=lt(i,h),u=rt(i,h),d=t.Wc().Ei(),p=t.Sp().Ei(),g=d.g("depth");g=null==g||e<=g;var f=p.g("depth");if(c=g&&c,u=(f=null==f||e<=f)&&u,g||f){f=s/2;var m=(g=t.Ml().g("above"))?n:n+f;if(c&&o&&ki(t,d,i,l&&g?n+f:n,f,h,void 0,a),u&&r&&ki(t,p,i,m,f,h,void 0,a),ct(i,h)&&(o||r))for(h=0;h<i.bc();h++)d=i.xd(h),Di(t,e+1,d,n,s,a,o,r,l)}},ki=function(e,i,n,s,a,o,r,l){if(o=null!=o?o:t.p(r)?pt(n,r):dt(n),e.controller.i)o=o.EI;else{var h=i.Ma();o="milestones"===h||"milestones-preview"===h?o.start:o.ZF}if(0<=(o=t.Ft(e.qa,o))&&1>=o&&i.g("enabled")){h=i.gk(n,t.gm),h=(t.cp(h)?0:t.z(h)?1:h.thickness?h.thickness:1)%2&&"svg"===t.kk?.5:0;var c=i.qd(n,r);c=t.L(c,a),s=vi(e,i,new t.I(Math.round(e.fa.left+e.fa.width*o)+h-Math.round(c/2),s,c,a),n,void 0,r),a=t.p(r)?st(e.Gb.nk(),n,r):nt(e.Gb.nk(),n),s=bi(i,s,n,r,a),o=e.io(n,i,s,r),yi(e,n,s,r),xe(i.hi(),n,s,o,r,a,l)}},$i=function(t,e){var i=t.fa.top+t.uk()+1,n=t.controller.b,s=t.controller.Cg(),a=t.controller.km();return(e?n[e-1]:0)-((s?n[s-1]:0)+a)+i},Oi=function(e,i,n){var s=$i(e,i);i=e.controller.D[i];var a=x(e.controller,i);if(e.controller.i){var o=pt(i,n),r=0,l=o.CN,h=o.start,c=o.end,u=e.Gr();return l&&(u=e.Wc(),c=h=o.EI,r=u.qd(i,n),r=Math.round(t.L(r,a)/2)),h=t.Ft(e.qa,h)*e.fa.width+e.fa.left-r,c=t.Ft(e.qa,c)*e.fa.width+e.fa.left+r,vi(e,u,new t.I(h,s,c-h,a),i,void 0,n)}return r=(u=dt(i)).start,c=u.end,n=u.bN,h=0,(u=lt(i,u))&&(c=r,h=e.Wc().qd(i),h=Math.round(t.L(h,a)/2)),r=t.Ft(e.qa,r)*e.fa.width+e.fa.left-h,c=t.Ft(e.qa,c)*e.fa.width+e.fa.left+h,s=new t.I(r,s,c-r,a),u?(a=e.Wc(),e=vi(e,a,s,i,n)):ht(i)?(a=ct(i)?e.np():e.Nc(),n=vi(e,a,s,i,!0),u=e.Ml(),s=vi(e,u,s,i,!0),Ti(e,n,s,a,i),e=n):(a=ct(i)?e.np():e.Nc(),e=vi(e,a,s,i,n)),e},Pi=function(e,i,n,s,a,o){s=s||"finish-start";var r=i.index,l=n.index;i=i.periodIndex,n=n.periodIndex;var h=e.controller.D,c=h[r];h=h[l];var u=hi(e,c),d=hi(e,h),p=Oi(e,r,i),g=Oi(e,l,n),f=x(e.controller,h);if(p&&g&&u.g("enabled")&&d.g("enabled")){if(d=!!(u=e.Gb.nk()).f&&u.f.sfa==c&&u.f.kla==h&&u.f.y0==s&&u.f.G1==i&&u.f.I6==n,u=null!=o,a)if(d)var m="object"==t.ka(a.selected)?a.selected.fill:void 0,v="object"==t.ka(a.selected)?a.selected.stroke:void 0;else m=t.p(a.fill)?a.fill:"object"==t.ka(a.normal)?a.normal.fill:void 0,v=t.p(a.stroke)?a.stroke:"object"==t.ka(a.normal)?a.normal.stroke:void 0;a=d?t.wo:t.gm,v=v||e.nj().gk(c,h,a,s,i,n),o=o||null,d=u?o:null;var b=t.dp(v)%2&&"svg"===t.kk?.5:0;switch((s+"").toLowerCase()){case"finish-finish":var y=Math.round(p.left+p.width)+b,S=Math.round(p.top+p.height/2)+b,w=Math.round(g.left+g.width)+b,C=Math.round(g.top+g.height/2)+b,T="left";p.top==g.top?(o=Li(e,y,S,w,C,o),y>w&&(T="right")):(p=Math.max(y+9,w+9),o=Li(e,y,S,p,S,o),o=Li(e,p,S,p,C,o),o=Li(e,p,C,w,C,o)),d=Ii(e,w,C,T,d);break;case"start-finish":if(y=Math.round(p.left)+b,S=Math.round(p.top+p.height/2)+b,w=Math.round(g.left+g.width)+b,C=Math.round(g.top+g.height/2)+b,T="left",y-5-5-4>w)o=Li(e,y,S,p=w+9,S,o),o=Li(e,p,S,p,C,o),o=Li(e,p,C,w,C,o);else{var D=g.top>=p.top;p=y-5,g=w+9;var k=$i(e,l);f=Math.round(D?k:k+f)+b,o=Li(e,y,S,p,S,o),o=Li(e,p,S,p,f,o),o=Li(e,p,f,g,f,o),o=Li(e,g,f,g,C,o),o=Li(e,g,C,w,C,o)}d=Ii(e,w,C,T,d);break;case"start-start":y=Math.round(p.left)+b,S=Math.round(p.top+p.height/2)+b,w=Math.round(g.left)+b,C=Math.round(g.top+g.height/2)+b,T="right",p.top==g.top?(o=Li(e,y,S,w,C,o),y>w&&(T="left")):(p=Math.min(y-4-5,w-4-5),o=Li(e,y,S,p,S,o),o=Li(e,p,S,p,C,o),o=Li(e,p,C,w,C,o)),d=Ii(e,w,C,T,d);break;default:y=Math.round(p.left+p.width)+b,S=Math.round(p.top+p.height/2)+b,(w=Math.round(g.left)+b)>=y?(w=Math.min(w+5,Math.round(g.left+g.width/2)+b),g.top>p.top?(C=Math.round(g.top)+b,o=Li(e,y,S,w,S,o),o=Li(e,w,S,w,C,o),d=Ii(e,w,C,"bottom",d)):g.top<p.top?(C=Math.round(g.top+g.height)+b,o=Li(e,y,S,w,S,o),o=Li(e,w,S,w,C,o),d=Ii(e,w,C,"top",d)):(w=Math.round(g.left)+b,C=Math.round(g.top+g.height/2)+b,o=Li(e,y,S,w,C,o),d=Ii(e,w,C,"right",d))):(C=Math.round(g.top+g.height/2),k=$i(e,l)+b,f=Math.round(g.top>p.top?k:k+f)+b,g=w-5-4,o=Li(e,y,S,p=y+5,S,o),o=Li(e,p,S,p,f,o),o=Li(e,p,f,g,f,o),o=Li(e,g,f,g,C,o),o=Li(e,g,C,w,C,o),d=Ii(e,w,C,"right",d))}r={fromItemIndex:r,toItemIndex:l,connType:s,fromItem:c,toItem:h},e.controller.i&&(r.fromPeriodIndex=i,r.toPeriodIndex=n),l=e.elements().uf().g("enabled")?"pointer":"default",o&&!u&&(o.tag=void 0,o.type="connectors",o.KS=null,o.cursor(l),r.path=o,o.j=r,o.stroke(v)),d&&!u&&(d.tag=void 0,d.type="connectors",d.KS=null,d.cursor(l),r.arrow=d,d.j=r,d.fill(m||e.nj().Tm(c,h,a,s,i,n)),d.stroke(v))}},Li=function(t,e,i,n,s,a){if(a)try{a.lineTo(n,s)}catch(h){a.moveTo(e,i).lineTo(n,s)}else{var o=Math.max(e,n),r=Math.min(i,s),l=Math.max(i,s);Math.min(e,n)<t.fa.left+t.fa.width&&o>t.fa.left&&r<t.fa.top+t.fa.height&&l>t.fa.top&&((a=fi(t)).type="connectors",a.zIndex(60).moveTo(e,i).lineTo(n,s))}return a},Ii=function(t,e,i,n,s){if(t.g("allowConnectorCaps")){var a=s||null;if(e>=t.fa.left&&e<=t.fa.left+t.fa.width&&i>=t.fa.top&&i<=t.fa.top+t.fa.height){var o=0,r=0,l=0,h=0;switch(n){case"left":r=i-4,l=o=(e+=1)+4,h=i+4;break;case"top":o=e-4,l=e+4,h=r=(i+=1)+4;break;case"right":r=i-4,l=o=--e-4,h=i+4;break;case"bottom":o=e-4,l=e+4,h=r=--i-4}null==s&&((a=fi(t)).type="connectors"),a.zIndex(70).moveTo(e,i).lineTo(o,r).lineTo(l,h).lineTo(e,i)}return a}return null},Ai=function(e,i,n,s){var a=e.fa.top+e.uk()+1,o=e.fa.top+e.fa.height;n=t.Ft(e.qa,n),s=t.Ft(e.qa,s),n=e.fa.left+e.fa.width*n,e=e.fa.left+e.fa.width*s,n=t.R(n,1),e=t.R(e,1),i.moveTo(n,a).lineTo(e,a).lineTo(e,o).lineTo(n,o).close()},Ei=function(t,e){if(t.TC&&Hn.hour>=Hn[t.TC]){var i,n=e.workingIntervals,s=e.notWorkingIntervals;for(i=0;i<s.length;i++){var a=s[i];Ai(t,qe(t),a.from,a.to)}for(i=0;i<n.length;i++)s=n[i],Ai(t,Ve(t),s.from,s.to)}},Gi=function(e){var i=e.qa.Uj(),n=e.qa.sj(),s=e.controller.K,a=e.controller.ba;e.qa.ka(),t.ut(e.qa,s,a),e.qa.Q6=s,e.qa.P6=a,!i||(0,window.isNaN)(s)||(0,window.isNaN)(a)||(e.qa.m4?e.qa.Qm():e.qa.QI?(e.qa.kj.apply(e.qa,e.qa.MI),e.qa.QI=!1,e.qa.MI=null):e.qa.BW?(s=e.qa).BW&&(s.BW=!1,t.Et(s),s.va(4)):(s=e.qa.uj(),e.qa.kj(s.min,s.min+Math.round((s.max-s.min)/10)))),!i&&(i=n.min,s=n.max-i)&&(i=(n=e.qa.sj()).min,e.qa.kj(i,i+s)),e.qa.da(!0)},Ui=function(e){return e.fS||(e.fS=t.ok(),e.fS.zIndex(33)),e.fS},Fi=function(e){return e.oB||(e.oB=t.ok(),e.oB.zIndex(34)),e.oB},Mi=function(e){return e.NB||(e.NB=t.ok(),e.NB.zIndex(36)),e.NB},_i=function(e,i){var n=e.label.ic("position"),s=i.label.ic("position");return n=t.Eo(e.Ta,n),s=t.Eo(i.Ta,s),n.x-s.x||-1},Ni=function(e){var i=e.ic("background"),n=e.Rh().rb();return i&&i.enabled?(e=e.ic("padding"),t.Ku(n,e)):n},Ri=function(){Re.call(this)},ji=function(){Re.call(this,void 0,!0)},Bi=function(e){t.Bx.call(this),this.Ga("ganttBase",e?"ganttResource":"ganttProject"),this.G=!!e,this.na=this.o=this.b=this.f=this.la=null,this.P=new et,this.i=null,this.ib=new y(this.G),U(this.ib,Hi(this)),F(this.ib,this.wf()),t.K(this.ib,this.B0,this),this.D=R(this.ib),this.D.zIndex(qn),t.K(this.D,this.mka,this),this.Ce("chartdraw",(function(){Ft(this.GF()),Ft(this.wf()),Mt(this.GF()),Mt(this.wf())}),!1,this),t.T(this.ua,[["headerHeight",4,1],["splitterPosition",4,1],["rowHoverFill",0,0,0,function(){this.wf().rowHoverFill(this.g("rowHoverFill")),Hi(this).rowHoverFill(this.g("rowHoverFill"))}],["rowSelectedFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowSelectedFill(this.g("rowSelectedFill")),this.f.rowSelectedFill(this.g("rowSelectedFill")),t.yr(this.f,this.b)}],["rowFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowFill(this.g("rowFill")),this.f.rowFill(this.g("rowFill")),t.yr(this.f,this.b)}],["rowEvenFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowEvenFill(this.g("rowEvenFill")),this.f.rowEvenFill(this.g("rowEvenFill")),t.yr(this.f,this.b)}],["rowOddFill",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.b.rowOddFill(this.g("rowOddFill")),this.f.rowOddFill(this.g("rowOddFill")),t.yr(this.f,this.b)}],["columnStroke",0,0,0,function(){t.xr(this.wf(),Hi(this)),this.f.columnStroke(this.g("columnStroke")),this.b.columnStroke(this.g("columnStroke")),t.yr(this.f,this.b)}],["rowStroke",0,0,0,function(){t.xr(this.wf(),Hi(this),this.ib);var e=this.g("rowStroke");this.f.rowStroke(e),this.b.rowStroke(e),this.ib.Tn(t.dp(e)),t.yr(this.f,this.b,this.ib)}]])},Hi=function(e){return e.f||(e.f=new Qt(e.ib),t.W(e,"dataGrid",e.f),e.f.zIndex(t.zm("defaultDataGrid").zIndex),ft(e.f,e),t.K(e.f,e.hea,e)),e.f},zi=function(e,i,n){var s=e.la.Eo("id",i);return s.length?(i=s[0],e.dispatchEvent({type:"rowcollapseexpand",item:i,collapsed:n})&&i.j("collapsed",n)):t.kl(404,null,["Task",i]),e},Vi=function(e){return e.o||(e.o=new H,e.o.zIndex(10),t.K(e.o,(function(){this.o.W()}),e),function(e){return t.p(!0)?(t.da(!0)&&1!=e.ba&&(e.ba=!0,e.position(e.af)),e):e.ba}(function(e){var i=2;return t.p(i)?(i=+i,(0,window.isNaN)(i)||e.b==i||(e.b=i,e.B(64,1)),e):e.b}(e.o.ka().we("vertical").position(e.g("splitterPosition")).e1("#000 0.3").stroke("none")).fill("#cecece")).da(!1),e.o.wa("splitterpositionchange",(function(e){var i=this.padding(),n=this.ob();if(i=i.Ng(n.width),n=Vi(this).position(),i=Math.floor(n*i),this.f.g("fixedColumns")&&"drawing"!=e.src){e=i-(e=ne(this.f,!0))-ie(this.f);t:{for(var s=(n=this.f).b.length-1;-1<s;s--){var a=n.b[s];if(a&&a.enabled()&&!a.md){n=a;break t}}n=null}n&&(n.ka(),n.width(e),n.da(!1))}e={type:"splitterpositionchange",newPosition:i,oldPosition:this.g("splitterPosition")},this.ta("splitterPosition",i),this.B(4,1),t.Dp(this,e)}),void 0,e)),t.p(void 0)?(e.o.N(void 0),e):e.o},qi=function(){return new Bi(!1)},Wi=function(){return new Bi(!0)};t.Hy.prototype.B1=t.ca(23,(function(){this.b=!1})),t.$t.prototype.DD=t.ca(13,(function(t){return this.Tk.DD(t)})),t.du.prototype.DD=t.ca(12,(function(t){return t in this.la})),t.$t.prototype.ND=t.ca(11,(function(t){return e(this.Tk,t.Tk)})),t.du.prototype.ND=t.ca(10,(function(t){return e(this,t)})),t.st.prototype.dL=t.ca(7,(function(e){if(t.X(e,8)&&!this.Uj()&&t.Dt(this)){var i=t.yt(this),n=t.zt(this);e=this.bm.isPixels;var s=this.am.isPixels,a=this.Xq.ob().width;i&&n?this.Qm():i&&e?(a=(i=t.vt(this.bm.value,a))*(this.Ze-this.Ph)/(a-i)||0,this.Gj=this.$e=this.Ph-a,s&&(e=t.At(this,this.Ze-this.$e,this.am),this.Fj=this.Oh+e),this.Kc=!0):n&&s?(a=(i=t.vt(this.am.value,a))*(this.Oh-this.$e)/(a-i)||0,this.Fj=this.Ze=this.Oh+a,e&&(e=t.At(this,this.Ze-this.$e,this.bm),this.Gj=this.Ph-e),this.Kc=!0):t.Et(this),this.va(4)}})),t.Qh.prototype.hH=t.ca(4,(function(){if(null!=this.kc){var e=t.mg().measure(this.text(),this.style());return e.left=this.No,e.top=this.Oo,e}return new t.I(0,0,0,0)})),t.aw.prototype.hH=t.ca(3,(function(){return this.kc?this.kc.hH():null}));var Yi="minFontSize maxFontSize adjustFontSize fontSize fontFamily fontColor fontOpacity fontDecoration fontStyle fontVariant fontWeight letterSpacing textDirection lineHeight textIndent vAlign hAlign wordWrap wordBreak textOverflow selectable disablePointerEvents useHtml format".split(" ");t.H(s,t.wu),t.g=s.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=80|t.wu.prototype.sa,t.g.we=function(e){return t.p(e)?((e=t.Gk(e))!=this.f&&(this.f=e,this.B(4,1)),this):this.f},t.g.ZK=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return this.Ba!=o&&(this.Ba=t.Ul(o,this.aa,!1),this.B(16,1)),this}return this.Ba||"none"},t.g.XK=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.na!=l&&(this.na=t.Ul(l,this.aa,!0),this.B(16,1)),this}return this.na||"none"},t.g.pP=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return this.Ka!=o&&(this.Ka=t.Ul(o,this.aa,!1),this.B(16,1)),this}return this.Ka||"none"},t.g.oP=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.Ha!=l&&(this.Ha=t.Ul(l,this.aa,!0),this.B(16,1)),this}return this.Ha||"none"},t.g.DC=function(e){return t.p(e)?(e=t.N(e),this.Sb!=e&&(this.Sb=e,this.B(4,9)),this):this.Sb},t.g.zS=function(e){return t.p(e)?(e=t.N(e),this.$a!=e&&(this.$a=e,this.B(16,1)),this):this.$a},t.g.op=function(e){return t.p(e)?(t.da(e)&&(this.fb=e),this):this.fb},t.g.kg=function(e,i){return t.p(e)?(t.nb(this.D,e)||(this.D=e.clone(),this.o?m(this):this.o=this.D.clone(),f(this),this.B(64,1),b(this,i||"api")),this):this.D},t.g.aQ=function(e){return t.p(e)?(t.nb(this.o,e)||(this.o=e.clone(),this.D?m(this):this.D=this.o.clone(),f(this),this.B(64,1),b(this,"api")),this):this.o},t.g.scroll=function(e,i){e=+e;var n=(0,window.isNaN)(e)?.05:t.Za(e,-1,1);return n?l(this,this.b+n,i):this},t.g.$R=function(e){return t.p(e)?(t.da(e)&&this.ea!=e&&(this.ea=e,this.B(4,1)),this):this.ea},t.g.xW=function(e){return t.p(e)?(this.aa!=e&&(this.aa=e,c(this,this.aa)),this):this.aa},t.g.yW=function(e){return t.p(e)?(this.sb=e,this):this.sb},t.g.sk=function(){return this.Vc||(this.Vc=t.ok(),t.ru(this,this.Vc,this.e0,this.d0,this.xda)),this.Vc},t.g.e0=function(t){t.preventDefault(),c(this,this.sb),this.oh(t)},t.g.d0=function(t){t.preventDefault(),c(this,this.aa),this.oh(t)},t.g.xda=function(e){e.preventDefault();var i=v(this),n=this.K.rb(),s=this.K.Om(),a=i?e.offsetY:e.offsetX;s=i?t.Tm((a-s.top)/s.height,4):t.Tm((a-s.left)/s.width,4),(i?a<=n.top:a<=n.left)?l(this,s,"user_action"):(n=+s,(0,window.isNaN)(n)||(n=t.Za(n,0,1),i=this.i-this.b,n=t.Tm(t.Za(n-i,0,1),4),i=t.Tm(n+i,4),this.b==n&&this.i==i)||(this.b=n,this.i=i,g(this),this.B(64,1),b(this,"user_action"))),this.oh(e)},t.g.Cka=function(t){t.preventDefault(),this.oh(t)},t.g.ko=function(){p(this,!0),this.dispatchEvent("scrolling")},t.g.bba=function(){p(this,!1),this.dispatchEvent("scrollend")},t.g.W=function(){if(this.zc()){var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();if(n&&i.suspend(),this.sk().bc()||(this.Vc.hc(function(e){return e.ba||(e.ba=t.mk()),e.ba}(this)),this.Vc.hc(function(e){return e.K||(e.K=t.mk(),e.K.kb(e.sk()),t.Ld(e.K,"drag",e.ko,!1,e),t.Ld(e.K,"end",e.bba,!1,e),t.ru(e,e.K,e.e0,e.d0,null,null,null,e.Cka)),e.K}(this))),this.J(2)&&(this.sk().parent(e),this.I(2)),this.J(4)){if(this.ab=this.ob(),this.ab.left=a(this.ab.left),this.ab.top=a(this.ab.top),this.ab.width=Math.round(this.ab.width),this.ab.height=Math.round(this.ab.height),u(this).O()||this.G.O(this.Vc),d(this).O()||this.P.O(this.Vc),u(this).enabled(this.ea),d(this).enabled(this.ea),this.ea&&this.G&&this.P){this.G.ka(),this.P.ka();var s,o=v(this);e=this.ab;var r=3>(o?e.height:e.width)/(o?e.width:e.height),l=s=o?e.width:e.height,h=e.left,c=e.top;r&&(o?s=t.Tm(e.height/3,1):l=t.Tm(e.width/3,1)),r=o?e.left:e.left+e.width-l,o=o?e.top+e.height-s:e.top,this.G.ja(e),this.G.position({x:r,y:o}).width(l).height(s).W(),this.P.ja(e),this.P.position({x:h,y:c}).width(l).height(s).W(),this.G.da(!1),this.P.da(!1)}this.B(80),this.I(4)}this.J(16)&&(e=Math.min(this.$a,Math.min(this.ab.width,this.ab.height)/2),this.ba.fill(this.na).stroke(this.Ba).round(e),this.K.fill(this.Ha).stroke(this.Ka).round(e),this.I(16)),this.J(64)&&(0>=this.b&&1<=this.i||this.b==this.i?this.sk().visible(!1):(this.sk().visible(!0),e=v(this),l=this.ab,this.ba.Qf(l),this.ea?(c=this.G.width(),o=this.G.height(),s=e?l.left:l.left+c+1,h=e?l.top+o+1:l.top,c=e?l.width:l.width-2*(c+1),o=e?l.height-2*(o+1):l.height,s=new t.I(s,h,c,o)):s=l.clone(),c=e?s.height:s.width,h=o=t.Tm(c*(this.i-this.b),1),r=!1,10>o&&(r=!0,h=10),r?(o=this.b*(c-h)/(1+this.b-this.i),c=e?l.left:t.Tm(s.left+o,1),o=e?t.Tm(s.top+o,1):l.top):(c=e?l.left:t.Tm(s.left+this.b*s.width,1),o=e?t.Tm(s.top+this.b*s.height,1):l.top),r=e?l.width:h,e=e?h:l.height,this.K.Ho(a(c)).Io(a(o)).Go(Math.round(r)).Fo(Math.round(e)).Om(s),this.K.oc(1,0,0,1,0,0)),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),this.I(8)),n&&i.resume()}return this},t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.F=function(){var e=s.u.F.call(this);return t.D(this.ZK())?t.kl(8,null,["ScrollBar background stroke"]):e.backgroundStroke=t.Rl(this.ZK()),t.D(this.XK())?t.kl(8,null,["ScrollBar background fill"]):e.backgroundFill=t.Rl(this.XK()),t.D(this.oP())?t.kl(8,null,["ScrollBar slider fill"]):e.sliderFill=t.Rl(this.oP()),t.D(this.pP())?t.kl(8,null,["ScrollBar slider stroke"]):e.sliderStroke=t.Rl(this.pP()),e.mouseOverOpacity=this.yW(),e.mouseOutOpacity=this.xW(),e.buttonsVisible=this.$R(),e.barSize=this.DC(),e.cornersRadius=this.zS(),e},t.g.U=function(t,e){s.u.U.call(this,t,e),this.XK(t.backgroundFill),this.ZK(t.backgroundStroke),this.oP(t.sliderFill),this.pP(t.sliderStroke),this.yW(t.mouseOverOpacity),this.xW(t.mouseOutOpacity),this.$R(t.buttonsVisible),this.DC(t.barSize),this.zS(t.cornersRadius)},t.g.R=function(){t.sd(this.ba,this.G,this.P,this.K,this.Vc),this.Vc=this.K=this.P=this.G=this.ba=null,s.u.R.call(this)};var Ki=s.prototype;Ki.barSize=Ki.DC,Ki.backgroundStroke=Ki.ZK,Ki.backgroundFill=Ki.XK,Ki.sliderStroke=Ki.pP,Ki.sliderFill=Ki.oP,Ki.mouseOutOpacity=Ki.xW,Ki.mouseOverOpacity=Ki.yW,Ki.cornersRadius=Ki.zS,Ki.buttonsVisible=Ki.$R,t.H(y,t.V),t.g=y.prototype,t.g.ra=18,t.g.sa=448,t.g.dd=function(e){var i=0;t.X(e,32)&&(D(this,e.item),i|=128),t.X(e,16)&&(i|=64),this.te&&this.Zh&&this.Zh.Gb.B(256),this.B(i,2)},t.g.aba=function(t){return!t.j("collapsed")},t.g.hha=function(t){return!!t.bc()},t.g.data=function(e){if(t.p(e)){if(this.la!=e&&(t.J(e,t.au)||t.J(e,t.Yt))){var i=!1;this.sb={},this.la&&(t.kr(this.la,this.dd,this),i=!0),this.la=e,t.K(this.la,this.dd,this),this.Ha=this.la.aw(),this.Ha.S6(this.aba),this.Zh&&this.Zh.scale().reset(),t.Op()?(this.te&&(M(this),function(t){t.Mw.reset=!0,t.Sv((function(t){qt(t)}))}(this.te),i&&_(this).dispatchEvent("workingcancel")),_(this).B(256)):this.te&&this.Zh&&this.Zh.Gb.B(256),this.B(64,2)}return this}return this.la},t.g.km=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.B(256,2)),this):this.P},t.g.Cg=function(e){return t.p(e)?((0,window.isNaN)(e)||(this.f=e,this.o=window.NaN,this.fb=e,this.$a=window.NaN,this.P=0,this.B(256,2)),this):this.f},t.g.Nj=function(e){return t.p(e)?((0,window.isNaN)(e)||(this.f=window.NaN,this.o=e,this.fb=window.NaN,this.$a=e,this.B(256,2)),this):this.o},t.g.Tn=function(e){return t.p(e)?(this.Sb!=e&&(this.Sb=e,this.B(128,2)),this):this.Sb},t.g.T0=function(){if((t.Op()||!this.pf())&&this.J(64)){this.ec=0,this.ba=this.K=window.NaN,this.Zr.length=0,this.la.ka();for(var e=0,i=this.la.bc();e<i;e++){var n=this.la.xd(e);k(this,n,0)}this.K==this.ba&&(e=this.K,this.K=e-432e5,this.ba=e+432e5),this.la.da(!1),this.va(16),this.I(64),this.Zh&&Gi(this.Zh),this.B(128)}if(t.Op()||!this.pf()){if(this.J(128)){for(this.D.length=0,this.b.length=0,this.ea.length=0,this.na={},this.Ba={},e=0,this.Ha.reset();this.Ha.advance();){n=this.Ha.current(),this.D.push(n),e+=x(this,n)+this.Sb,this.b.push(e);var s=n.get("id");if(i={item:n,index:this.b.length-1},t.p(s)&&!this.Ba[s]&&(this.Ba[s]=i),this.i){if(i=n.get("periods"),t.A(i))for(n=0,s=i.length;n<s;n++){var a=i[n],o=a.id,r={period:a,index:this.b.length-1,periodIndex:n};if(this.na[o]||(this.na[o]=r),t.A(a.connector)){a=a.connector;for(var l=0;l<a.length;l++){var h=a[l];if(h){var c=this.na[h.connectTo]||h.connectTo;c={from:r,to:c},(o=h.connectorType)&&(c.type=o),c.connSettings=h,this.ea.push(c)}}}else a.connectTo&&(c={from:r,to:c=this.na[a.connectTo]||a.connectTo},(o=a.connectorType)&&(c.type=o),a.connector&&(c.connSettings=a.connector),this.ea.push(c))}}else if(t.A(n.get("connector")))for(n=n.get("connector"),s=0;s<n.length;s++)(r=n[s])&&(o=r.connectTo,c=r.connectBy,t.z(c)&&c&&(c=this.la.find(c,o))&&(o=c.get("id")),c={from:i,to:c=this.Ba[o]||o},(o=r.connectorType)&&(c.type=o),c.connSettings=r,this.ea.push(c));else n.get("connectTo")&&(o=n.get("connectTo"),c={from:i,to:c=this.Ba[o]||o},(o=n.get("connectorType"))&&(c.type=o),n.get("connector")&&(c.connSettings=n.get("connector")),this.ea.push(c))}this.I(128),this.B(256)}this.qc&&(j(this,this.Ka),this.qc=!1),E(this),t.Op()&&this.I(256),(0,window.isNaN)(this.K)||this.K!=this.ba||(this.K-=864e5,this.ba+=864e5)}t.Op()||(this.te&&this.te.oE(),this.Zh&&this.Zh.oE()),t.vl.measure(),e=null,this.te&&this.te.O()&&(e=this.te.O().Ja()),!e&&this.Zh&&this.Zh.O()&&(e=this.Zh.O().Ja()),e&&e.suspend(),this.te&&this.te.Lj(this.lE),this.Zh&&this.Zh.Lj(this.lE),this.aa&&(this.aa.ka(),this.aa.op(!1),n=0,s=1,this.b.length&&(s=(n=this.b[this.f]-I(this,this.f,this.f)+this.P)+this.G,this.Ka=n,r=this.b[this.b.length-1],i=new t.I(0,0,0,r),n=t.Tm(n/r,4),s=t.Tm(s/r,4),this.aa.kg(i)),i=this.aa,n=+n,r=+s,(0,window.isNaN)(n)||(0,window.isNaN)(r)||(n=t.Za(n,0,1),r=t.Za(r,0,1),(s=Math.min(n,r))==(n=Math.max(n,r))||i.b==s&&i.i==n||(i.b=s,i.i=n,g(i),i.B(64,1),b(i,"api"))),i.W().op(!0).da(!1)),(i=_(this))&&((n={totalListLength:this.b.length,startListIndex:this.f,endListIndex:this.o}).type=this.o>=this.b.length-2?"needsdataload":"nodataloadingneeded",t.Dp(i,n)),e&&e.resume(),this.lE=!1},t.g.ifa=function(){var e=this.te&&this.te.enabled();e&&this.te.oE(),this.iz.push(t.Ep((function(){if(e&&this.te.Lj(this.lE),this.Zh&&this.Zh.Lj(this.lE),!e){var t=_(this);t.dispatchEvent("workingstart"),t.dispatchEvent({type:"working",progress:100}),t.dispatchEvent("workingfinish")}}),void 0,this))},t.g.F=function(){var t=y.u.F.call(this);return t.isResourceChart=this.i,this.la&&(t.treeData=this.la.xB(["collapsed"])),t.verticalOffset=this.km(),(0,window.isNaN)(this.Cg())?(0,window.isNaN)(this.Nj())||(t.endIndex=this.Nj()):t.startIndex=this.Cg(),t.scrollTo=this.Ka,t},t.g.U=function(e,i){y.u.U.call(this,e,i),this.i=e.isResourceChart,"treeData"in e&&this.data(t.cu(e.treeData)),this.km(e.verticalOffset),"startIndex"in e?this.Cg(e.startIndex):"endIndex"in e&&this.Nj(e.endIndex),"scrollTo"in e&&j(this,+e.scrollTo)},t.H(H,t.wu),t.g=H.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=80|t.wu.prototype.sa,t.g.we=function(e){return t.p(e)?((e=t.Gk(e))!=this.f&&(this.f=e,this.position(this.af)),this):this.f},t.g.position=function(e){if(t.p(e)){e=t.uo(e)?(0,window.parseFloat)(e)/100:e;var i=0,n=1;return this.ab&&(n=K(this)?this.ab.zd():this.ab.qd(),i=this.D/n,n=(n-this.P)/n),e=t.Za(e,i,n),(0,window.isNaN)(e)||(this.ab&&(this.af=e,this.Ha&&this.dispatchEvent("splitterpositionchange")),this.af=e,this.B(64,1)),this}return this.af},t.g.stroke=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return this.i!=o&&(this.i=o,this.B(80,1)),this}return this.i||"none"},t.g.fill=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.na!=l&&(this.na=l,this.B(16,1)),this}return this.na||"none"},t.g.e1=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.Ba!=l&&(this.Ba=l,this.B(16,1)),this}return this.Ba||"none"},t.g.op=function(e){return t.p(e)?(t.da(e)&&(this.Ha=e),this):this.Ha},t.g.sk=function(){return this.Vc||(this.Vc=t.ok()),this.Vc},t.g.dba=function(){this.Ka=!0,Y(this).visible(!0);var e=K(this);this.$a=t.yf(t.Lp.body,"cursor"),e?this.K.Ho(this.af*this.ab.zd()+this.ab.tb()).Io(this.ab.Vb()).Go(0).Fo(this.ab.qd()):this.K.Ho(this.ab.tb()).Io(this.af*this.ab.qd()+this.ab.Vb()).Go(this.ab.zd()).Fo(0)},t.g.ko=function(){var t=this.o.rb(),e=K(this),i=this.b/2;V(this,e);var n=e?this.af*this.ab.zd()+this.ab.tb():this.af*this.ab.qd()+this.ab.Vb();t=e?t.tb()+t.zd()/2:t.Vb()+t.qd()/2,e?(this.K.Ho(Math.min(n,t)).Go(Math.abs(n-t)),this.G.Ho(t-i)):(this.K.Io(Math.min(n,t)).Fo(Math.abs(n-t)),this.G.Io(t-i))},t.g.cba=function(){this.Ka=!1,Y(this).visible(!1);var e=this.o.rb(),i=K(this);this.Za||V(this,i,!0),this.ba?(e=i?e.left+3-this.ab.left:e.top+3-this.ab.top,i=i?e/(this.ab.width-this.b):e/(this.ab.height-this.b)):(e=i?e.left+e.width/2-this.ab.left:e.top+e.height/2-this.ab.top,i=i?e/this.ab.width:e/this.ab.height),this.position(t.Tm(i,4))},t.g.eba=function(){this.Za=!0,this.G.fill("black")},t.g.aia=function(t){this.dispatchEvent({type:"dblclick",originalEvent:t})},t.g.fba=function(){this.Za=!1,this.Ka||V(this,K(this),!0),this.G.fill(this.Sb)},t.g.W=function(){if(this.zc()){var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),this.sk().bc()||this.sk().hc(Y(this)).hc(W(this)).hc(function(e){return e.G||(e.G=t.mk().Dd(!0).fill(e.na).stroke(e.i)),e.G}(this)),this.J(2)&&(this.sk().parent(e),this.I(2)),this.J(4)&&(this.ab=this.ob(),this.Ha&&this.dispatchEvent({type:"splitterpositionchange",src:"drawing"}),this.B(80),this.I(4)),this.J(16)&&(this.G.stroke(this.i).fill(this.na),this.K.fill(this.Ba).stroke(this.ec),this.o.fill(this.fb).stroke(this.sb),this.I(16)),this.J(64)&&(W(this).oc(1,0,0,1,0,0),this.D!=this.aa&&(e=K(this)?this.ab.zd():this.ab.qd(),this.aa<=e&&(this.D=this.aa,this.aa>e-this.P&&(this.ea=e-this.aa),this.position(this.af))),this.P!=this.ea&&(e=K(this)?this.ab.zd():this.ab.qd(),this.ea<=e&&(this.P=this.ea,this.ea>e-this.D&&(this.aa=e-this.ea),this.position(this.af))),q(this),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),q(this),this.I(8)),n&&i.resume()}return this},t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.R=function(){t.sd(this.K,this.o,this.G,this.Vc),this.Vc=this.G=this.o=this.K=null,H.u.R.call(this)},t.H(X,t.wu),t.g=X.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=80|t.wu.prototype.sa,t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.position=function(e){return t.p(e)?(this.af!=e&&(this.af=e,this.B(64,1)),this):this.af},t.g.stroke=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments),r=t.dp(o);return this.i==o&&r==this.D||(this.i=o,this.D=r,this.B(80,1)),this}return this.i||"none"},t.g.e1=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return this.G!=l&&(this.G=l,this.B(16,1)),this}return this.G||"none"},t.g.op=function(e){return t.p(e)?(t.da(e)&&(this.K=e),this):this.K},t.g.sk=function(){return this.Vc||(this.Vc=t.ok()),this.Vc},t.g.Kaa=function(){this.dispatchEvent("dragstart"),this.P=!0,this.ea=t.yf(t.Lp.body,"cursor"),Q(this).clear()},t.g.ko=function(){var t=this.b.rb();J(this);var e=this.ab.left+this.af+this.D/2;t=t.tb()+t.zd()/2,this.o.clear().moveTo(e,this.ab.top).lineTo(t,this.ab.top).lineTo(t,this.ab.top+this.ab.height).lineTo(e,this.ab.top+this.ab.height).close(),this.f.clear().moveTo(t,this.ab.top).lineTo(t,this.ab.top+this.ab.height),this.dispatchEvent("drag")},t.g.Jaa=function(){this.P=!1,this.o.clear();var t=this.b.rb();this.aa||J(this,!0),this.position(t.left+3-this.ab.left),this.dispatchEvent("dragend")},t.g.cia=function(t){t.preventDefault(),this.oh(t)},t.g.Laa=function(){this.aa=!0,this.f.stroke("2 black")},t.g.Maa=function(){this.aa=!1,this.P||J(this,!0),this.f.stroke(this.ba)},t.g.W=function(){if(this.zc()){var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),this.sk().bc()||this.sk().hc(Q(this)).hc(function(e){return e.b||(e.b=t.qk().fill(e.na).stroke(null),t.Ld(e.b,"start",e.Kaa,!1,e),t.Ld(e.b,"drag",e.ko,!1,e),t.Ld(e.b,"end",e.Jaa,!1,e),t.ru(e,e.b,null,e.Maa,null,e.Laa,null,e.cia)),e.b}(this)).hc(function(e){return e.f||(e.f=t.qk().Dd(!0).stroke(e.i)),e.f}(this)),this.J(2)&&(this.sk().parent(e),this.I(2)),this.J(4)&&(this.ab=this.ob(),this.K&&this.dispatchEvent("splitterpositionchange"),this.B(80),this.I(4)),this.J(16)&&(this.f.stroke(this.i),this.o.fill(this.G),this.b.fill(this.na),this.I(16)),this.J(64)&&((0,window.isNaN)(this.af)&&(this.af=Math.round((this.ab.width-this.D)/2)),this.K&&this.dispatchEvent("splitterpositionchange"),Z(this),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),Z(this),this.I(8)),n&&i.resume()}return this},t.g.R=function(){t.sd(this.o,this.b,this.f,this.Vc),this.Vc=this.f=this.b=this.o=null,X.u.R.call(this)},t.H(tt,t.V),tt.prototype.ra=32770,tt.prototype.sa=t.V.prototype.sa;var Xi={};t.sq(Xi,[[1,"fill",t.Qq],[1,"stroke",t.Pq],[1,"placementStroke",t.Pq],[0,"enabled",t.Zq]]),t.U(tt,Xi),t.g=tt.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.mO),this.Y=null):(this.Y&&t.kr(this.Y,this.mO,this),this.Y=e,t.K(this.Y,this.mO,this))),this):this.Y},t.g.mO=function(e){var i=0;t.X(e,32768)&&(i|=32768),t.X(e,2)&&(i|=2),this.va(i)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){tt.u.U.call(this,e,i),t.Iq(this,Xi,e,i)},t.g.F=function(){var e=tt.u.F.call(this);return t.Tq(this,Xi,e,void 0,void 0,!0),this.ph("enabled")&&null!==e.enabled||delete e.enabled,e},t.g.R=function(){this.Y&&(t.kr(this.Y,this.mO,this),this.Y=null),this.Xb=null,tt.u.R.call(this)},t.H(et,t.od),et.prototype.reset=function(){it(this,null),this.f=this.i=null},et.prototype.R=function(){this.reset(),this.la=null,et.u.R.call(this)},t.H(ot,t.wu),t.g=ot.prototype,t.g.ra=t.wu.prototype.ra|t.KE|2,t.g.sa=208|t.wu.prototype.sa,t.g.nk=function(){return this.bz},t.g.Ic=function(e,i,n,s,a,o){this.i||(this.i=new t.Fw);var r=this.controller.i,l={item:{value:e,type:""},name:{value:e.get("name"),type:"string"},id:{value:e.get("id"),type:"string"},linearIndex:{value:e.j("index")+1,type:"number"}};if(r){if(t.p(i)){r=t.Fc(i);for(var h={},c=["start","end"],u=0;u<r.length;u++){var d=r[u];if(!t.Aa(c,d)){var p=i[d],g="";t.ea(p)?g="number":t.uo(p)?g="percent":t.z(p)&&(g="string"),h[d]={value:p,type:g}}}this.i.Dl(h)}else this.i.Dl({});h=(r=pt(e,n)).CN,(c=gt(this,e))&&(l.rowType={value:c,type:"string"}),l.minPeriodDate={value:e.j("minPeriodDate"),type:"date-time"},l.maxPeriodDate={value:e.j("maxPeriodDate"),type:"date-time"},l.period={value:i,type:""},l.periodIndex={value:null!=n&&0<=n?n:void 0,type:"number"},l.periodStart={value:i?r.start:void 0,type:"date-time"},l.periodEnd={value:i?r.end:void 0,type:"date-time"},i=h?r.EI:l.periodEnd.value||l.maxPeriodDate.value,l.start={value:h?r.EI:l.periodStart.value||l.minPeriodDate.value,type:"date-time"},l.end={value:i,type:"date-time"},l.barBounds={value:e.no("periodBounds",n),type:""}}else n=dt(e),(i=gt(this,e,n))&&(l.rowType={value:i,type:"string"}),l.actualStart={value:e.j("actualStart"),type:"date-time"},l.actualEnd={value:e.j("actualEnd"),type:"date-time"},i=ct(e,n),l.progressValue={value:n.Kd,type:"percent"},l.autoStart={value:i?e.j("autoStart"):void 0,type:"date-time"},l.autoEnd={value:i?e.j("autoEnd"):void 0,type:"date-time"},l.start={value:n.start,type:"date-time"},l.end={value:n.end,type:"date-time"},l.autoProgress={value:i?e.j("autoProgress"):void 0,type:"percent"},l.barBounds={value:e.j("relBounds"),type:""},l.progress={value:n.Kd,type:"percent"},l.baselineProgress={value:n.YR?n.f0:0,type:"percent"},n.BN&&(l.baselineStart={value:n.ZF,type:"date-time"}),n.AN&&(l.baselineEnd={value:n.$K,type:"date-time"});return t.p(s)&&(l.elementType={value:s,type:"string"}),t.p(a)&&(l.hoverRatio={value:a,type:"number"}),t.p(o)&&(l.hoverDateTime={value:o,type:"date-time"}),this.i.lg(e),t.ov(this.i,l)},t.g.P$=t.ia,t.g.Q$=t.ia,t.g.OZ=t.ia,t.g.NZ=t.ia,t.g.PZ=t.ia,t.g.MZ=t.ia,t.g.Uaa=function(e){if(!this.zo)if(this.Cm)if((e=this.rl(e))&&!this.Gb.altKey){var i=t.Qc(e);i.type="rowMouseUp",i=this.jQ||this.Gb.dispatchEvent(i),this.jQ=!1;var n=this.Gb.dispatchEvent(e);i&&n&&(this.Gb.v5(e),this.lQ=!0)}else this.Gb.jJ(e);else this.Cm=!0;this.zo=!1},t.g.k_=function(t){if(this.lQ)this.lQ=!1;else{var e=this.rl(t);this.OZ(e,t),e&&this.Cm&&this.Gb.dispatchEvent(e)&&this.Gb.z5(e),e||this.Ua().Lc()}},t.g.Taa=function(t){switch(t.type){case"dblclick":t=this.rl(t),this.MZ(t),this.Cm?t&&this.Gb.dispatchEvent(t)&&this.Gb.w5(t):this.Cm=!0;break;case"mousedown":case"touchstart":this.j_(t);break;case"mouseup":case"touchend":t=this.rl(t),this.PZ(t),this.Cm&&t&&this.Gb.dispatchEvent(t)&&(this.Gb.TO(t),this.jQ=!0),this.Ua().Lc();break;case"contextmenu":this.Gb.dispatchEvent(t)}},t.g.Vaa=function(t){this.Cm&&(t=this.rl(t))&&this.Gb.dispatchEvent(t)&&this.Gb.A5(t)},t.g.j_=function(t){var e=this.rl(t);this.NZ(e),this.Cm&&(t.preventDefault(),e&&this.Gb.dispatchEvent(e)&&this.Gb.iJ(e))},t.g.v5=function(t){this.UO(t)},t.g.w5=function(t){this.SO(t)},t.g.UO=function(e){this.Cm&&Nt(this,e.item)&&((e=t.Qc(e)).type="rowSelect",this.Gb.dispatchEvent(e))},t.g.SO=function(t){if((t=t.item)&&ct(t)){var e=!t.j("collapsed");this.Gb.dispatchEvent({type:"rowcollapseexpand",item:t,collapsed:e})&&t.j("collapsed",e)}},t.g.z5=function(e){if(!this.vi){this.Gb.ro(e.hoveredIndex,e.startY,e.endY);var i=this.Ua(),n=this.Ic(e.item,e.period,e.periodIndex);t.Ow(i,e.originalEvent.clientX,e.originalEvent.clientY,n)}},t.g.A5=function(){this.Gb.ro()},t.g.TO=t.ia,t.g.iJ=t.ia,t.g.wW=t.ia,t.g.rl=function(e){if(this.mp.length){var i,n=this.controller.D,s=this.controller.Cg(),a=e.type;switch(a){case"mouseout":a="rowMouseOut",0<=this.ea&&(i=n[s+this.ea]);break;case"mouseover":a="rowMouseOver";break;case"mousemove":case"touchmove":a="rowMouseMove";break;case"mousedown":case"touchstart":a="rowMouseDown";break;case"mouseup":case"touchend":a="rowMouseUp";break;case"click":a="rowClick";break;case"dblclick":a="rowDblClick"}a={type:a,actualTarget:e.target,target:this,originalEvent:e};var o=this.fa.top+this.G+1,r=this.fa.top+t.Zj(this.O().Ja()).y+this.G;if(e=e.clientY-r,r=this.mp.length?this.mp[this.mp.length-1]:0,i)a.item=i;else{if(0>e||e>r)return null;i=t.Na(this.mp,e);var l=(o+=r=(this.ea=i=0<=i?i:~i)?this.mp[i-1]:0)+(this.mp[i]-r-this.Tn);a.item=n[s+i],a.startY=o,a.endY=l,a.hoveredIndex=this.ea,a.index=s+i,a.itemHeightMouseRatio=(e-r)/(this.mp[i]-r)}if(a.item)return(n=gt(this,a.item))&&(a.rowType=n),a}return null},t.g.uf=function(e){return this.Vi||(this.Vi=new tt,t.W(this,"edit",this.Vi),t.K(this.Vi,this.iO,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Vi.N(e),this):this.Vi},t.g.iO=function(e){t.X(e,2)&&_t(this)},t.g.bs=function(t){wt(this).clip(t),this.oB&&this.oB.clip(t),this.NB&&this.NB.clip(t),yt(this).clip(t)};var Ji={};t.sq(Ji,[[1,"backgroundFill",t.Qq],[1,"rowFill",t.Nq],[1,"rowStroke",t.Nq],[1,"rowEvenFill",t.Nq],[1,"rowOddFill",t.Nq],[1,"rowHoverFill",t.Nq],[1,"rowSelectedFill",t.Nq]]),t.U(ot,Ji);var Zi={};t.g=ot.prototype,t.g.dH=function(t,e){var i=this.g(t);return null!=i?i:this.g(e)},t.g.sc=function(t,e,i){return i("rowSelectedFill"==t||"rowHoverFill"==t||"selectedElementFill"==t||"selectedElementStroke"==t?this.g(t):this.dH(t,-1!=t.indexOf("Fill")?"baseFill":"baseStroke"))},t.g.Ge=function(e,i,n,s,a,o){var r=this.Gb.cc();switch(e){case"baseFill":e=r.nc(0);break;case"baseStroke":e=t.Pl(r.nc(0));break;case"progressFill":e=r.nc(1);break;case"progressStroke":e={color:"#fff",opacity:1e-5};break;case"baselineFill":e=t.Pl(r.nc(1),.7);break;case"baselineStroke":e=t.Ql(t.Pl(r.nc(1),.7));break;case"parentFill":e=r.nc(4);break;case"parentStroke":e=t.Pl(r.nc(4));break;case"milestoneFill":e=r.nc(9);break;case"milestoneStroke":e=t.Ql(r.nc(9));break;case"selectedElementFill":e=r.nc(2);break;case"selectedElementStroke":e=t.Ql(r.nc(2));break;case"selectedConnectorStroke":e=t.Wl(t.Pl(r.nc(2)),2);break;case"rowFill":e=t.zm("ganttBase").rowFill;break;case"rowHoverFill":e=t.zm("ganttBase").defaultRowHoverFill;break;case"rowSelectedFill":e=t.zm("ganttBase").defaultRowSelectedFill;break;default:e="blue"}return e={sourceColor:e},null!=i&&(t.p(s)?(e.fromItem=i,e.fromItemIndex=i.j("index"),e.toItem=n,e.toItemIndex=n.j("index"),e.connType=s):(e.item=i,e.itemIndex=i.j("index")),t.p(a)&&(t.p(o)?(i=i.get("periods")[a],n=n.get("periods")[o],e.fromPeriod=i,e.fromPeriodIndex=a,e.toPeriod=n,e.toPeriodIndex=o):(o=i.get("periods")[a],e.period=o,e.periodIndex=a))),e},t.g.Yi=function(){return{sourceHatchFill:this.Eh()}},t.g.Eh=function(){return t.Yb("diagonal-brick")},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(128,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(128,1)},t.g.d1=function(e){t.J(e.currentTarget,t.ig)&&!this.Vg&&(this.Vg=new Rt(this.Vc,this),this.Vg.wa("drag",this.ko,!1,this),this.Vg.wa("end",this.i_,!1,this),this.Vg.lk(e.kf))},t.g.ko=function(e){if(this.vi=!0,this.uf().g("enabled")&&!this.nf&&(mt(this,!0),this.Cm=!1,this.Gb.ro(),this.Ua().Lc(),e=this.rl(e))){var i=e.item,n=e.itemHeightMouseRatio,s=e.startY,a=e.endY;this.oj?(i&&i!=this.oj&&!i.ND(this.oj)?.2>n||.8<n?this.Gb.Iv(.2>n?s:a,void 0,"auto"):lt(i)?this.Gb.Iv(void 0,void 0,"not-allowed"):this.Gb.Iv(s,a,"auto"):this.Gb.Iv(void 0,void 0,"not-allowed"),this.P$(e)):(e=this.fa.top+t.Zj(this.O().Ja()).y+this.G,this.Gb.Iv(e+this.mp[this.mp.length-1],void 0,"auto"))}this.Ua().Lc(),this.zo=!0},t.g.i_=function(e){if(this.uf().enabled()&&!this.nf){var i=this.rl(e),n=this.controller.data();if(this.Q$(i),i){e=i.item;var s=i.hoveredIndex;s=this.controller.Cg()+s;var a=this.controller.D,o=.2>(i=i.itemHeightMouseRatio);if(i=.8<i,this.oj&&e&&e!=this.oj&&!e.ND(this.oj))if(o||i)if(o?(o=a[s-1],s=e):(o=e,s=a[s+1]),o&&s){a=o.j("depth");var r=s.j("depth");i?(n=e.getParent()||n).Eg(this.oj,n.Kf(e)+1):a==r?(e=(n=s.getParent()||s.Pq()).Kf(s),(i=this.oj.getParent()||this.oj.Pq())==n&&i.Kf(this.oj)<e&&(e=Math.max(0,e-1)),n.Eg(this.oj,e)):a<r?o.Eg(this.oj,0):o.ND(this.oj)||(n=e.getParent()||n,e=n.Kf(e),n.Eg(this.oj,e))}else s?(n=s.Pq()).Eg(this.oj,0):o&&(e=(n=o.getParent()||o.Pq()).Kf(o)+1,n.Eg(this.oj,e));else lt(e)||e.hc(this.oj)}else this.oj&&(i=this.fa.top+t.Zj(this.O().Ja()).y+this.G,e.clientY<i?n.Eg(this.oj,0):n.hc(this.oj));this.Gb.Iv(void 0,void 0,"auto"),this.oj=null}this.nf=!1,t.Dj((function(){this.zo=!1}),10,this),this.Vg.reset(),this.vi=!1,this.Cm=!0,(0,window.clearInterval)(this.Vn),this.Vn=null,mt(this,!1)},t.g.oT=function(){var e,i,n=this.fa.top+this.G+1,s=this.controller.km(),a=this.controller.Cg(),o=this.controller.Nj(),r=this.controller.D,l=n-s;this.Gb.ro(),this.mp.length=0,Dt(this).clear(),Tt(this).clear(),Ot(this).clear(),Pt(this).clear();for(var h=0;h<this.Hd.length;h++)this.Hd[h].clear(),t.p(this.Od[h])&&this.Od[h].clear();if(h=!1,this.Gb.na&&(e=this.Gb.na.Jj)&&(i=this.Gb.na.mL))for(var c in this.Ys=this.Ys||{},h=!0,e){if(!(c in this.Ys)){var u=bt(this).path();u.stroke(null).zIndex(5),this.Ys[c]=u}this.Ys[c].clear()}for(c=this.Tn%2&&"svg"===t.kk?.5:0,u=a;u<=o;u++){var d=r[u];if(!d)break;var p=u==a;l=p?n:l;var g=x(this.controller,d);if(g=p?g-s+1:g,t.D(this.g("rowFill"))){var f=$t(this,u);p=l+g,f.moveTo(this.fa.left,l).lineTo(this.fa.left+this.f,l).lineTo(this.fa.left+this.f,p).lineTo(this.fa.left,p).close()}else f=u%2?this.Ba:this.Ha,p=l+g,t.cp(f.fill())||f.moveTo(this.fa.left,l).lineTo(this.fa.left+this.f,l).lineTo(this.fa.left+this.f,p).lineTo(this.fa.left,p).close();if(d.j("selected")&&(it(this.Gb.nk(),d),this.$a.clear().moveTo(this.fa.left,l).lineTo(this.fa.left+this.fa.width,l).lineTo(this.fa.left+this.fa.width,p).lineTo(this.fa.left,p).close()),h){g=this.Gb.na.state;for(var m=0;m<i.length;m++)if((f=(0,i[m])(d,g))&&f in e){d=e[f],(f=this.Ys[f]).moveTo(this.fa.left,l).lineTo(this.fa.left+this.f,l).lineTo(this.fa.left+this.f,p).lineTo(this.fa.left,p).close().fill(d);break}}l=p+this.Tn,t.D(this.g("rowStroke"))?(d=Math.floor(l-this.Tn/2)+c,Lt(this,u).moveTo(this.fa.left,d).lineTo(this.fa.left+this.f,d+1e-4)):(d=Math.floor(l-this.Tn/2)+c,this.Za.moveTo(this.fa.left,d).lineTo(this.fa.left+this.f,d)),d=l-n,this.mp.push(d),this.M6=d}return n=new t.I(this.fa.left,this.fa.top-1,this.fa.width,l-this.fa.top+1),this.bs(n),n},t.g.Oy=function(e){Ut(this);var i=e.deltaX,n=e.deltaY,s=0<Math.abs(n),a=0<Math.abs(i);(t.RC||t.gd)&&(i*=18,n*=18);var l=!t.Lp.body.scrollLeft,h=this.tq(),c=R(this.controller),u=!1,d=!1;s&&(d=0>n,s=o(c),c=r(c),d=!(!s&&1==c)&&(0<s&&1>c||!s&&!d&&1!=c||1==c&&d&&0!=s)),a&&(a=0>i,u=o(h),h=r(h),u=a?u||1!=h?0<u&&1>h||1==h&&0!=u||!u&&l:l:!(!u&&1==h)&&(0<u&&1>h||!u&&1!=h)),(d||u)&&(e.preventDefault(),this.scroll(i,n))},t.g.AW=function(e){t.X(e,2)&&this.va(1)},t.g.Bp=function(){this.Ua().W()},t.g.kv=t.ia,t.g.fs=t.ia,t.g.hv=function(e){return t.p(e)?(S(this.controller,e),this):S(this.controller)},t.g.Lj=function(e){if(e&&this.B(64),!this.zc())return this;var i=this.O();if((e=i?i.Ja():null)&&e.suspend(),!vt(this).bc()){if(this.sb=this.Vc.rect(),this.sb.fill(this.g("backgroundFill")).stroke(null).zIndex(10),this.bj=this.Vc.rect(),this.bj.fill(t.bm).stroke(null).zIndex(20),this.nV(this.Vc),this.pu){var n=R(this.controller);t.K(n.O(Ct(this)),(function(e){t.X(e,8)?this.B(4,1):n.W()}),this)}var s=this.tq();t.K(s.O(Ct(this)),(function(e){t.X(e,1)&&s.W()}),s),this.Vc.Ce("mousedown",this.d1,!1,this),this.Vc.Ce("touchstart",this.d1,!1,this),t.Op()&&this.Vc.Ce("mousemove",(function(){Ft(this),Mt(this)}),!1,this),this.mN(),this.Ap=e.rect(),this.Ap.stroke("none").fill("#000 0.1").zIndex(1e10)}if(this.J(2)&&(this.Vc.parent(i),this.I(2)),this.J(4)&&(i=this.ob(),this.fa=t.Xo(i,0),this.Vc.clip(this.fa),this.sb.Qf(this.fa),this.bj.Qf(this.fa),this.f=this.fa.width,this.K7&&this.Ap.Qf(this.fa),i=this.fa.top+this.G+.5,At(this).clear().moveTo(this.fa.left,i).lineTo(this.fa.left+this.f,i+1e-4),this.pu&&(i=(n=R(this.controller)).DC(),n.Ta(this.fa.left+this.fa.width-i-1,this.fa.top+this.uk()+i+1,i,this.fa.height-this.uk()-2*i-2)),i=(s=this.tq()).DC(),s.Ta(this.fa.left+i,this.fa.top+this.fa.height-i-1,this.fa.width-2*i,i),this.$y=!0,this.fs(),this.I(4)),this.J(64)&&(this.Ua().Lc(),this.$y=!0,this.WW(),this.I(64)),this.J(16)){this.sb.fill(this.g("backgroundFill"));var a=this.g("rowFill");if(i=this.controller.D,t.D(a))for(var o=0;o<i.length;o++)a=i[o],a=Et("rowFill",1)(this,0,a),$t(this,o).fill(a);else{o=Et("rowOddFill",1)(this,0),o=t.cp(o)?a:o;var r=Et("rowEvenFill",1)(this,0);r=t.cp(r)?a:r,Tt(this).fill(o),Dt(this).fill(r)}if(t.D(this.g("rowSelectedFill"))||(a=this.Gb.nk().b,a=Et("rowSelectedFill",1)(this,0,a),Ot(this).fill(a)),a=this.g("rowStroke"),t.D(a)){for(o=0;o<i.length;o++)a=i[o],a=Et("rowStroke",2)(this,0,a),Lt(this,o).stroke(a);var l=Et("rowStroke",2)(this,0,i[0])}else t.z(a)?l=a:t.C(a)&&a.color&&(l=a.color),Pt(this).stroke(a);l&&At(this).stroke(l),this.kv(),_t(this),this.I(16)}return this.J(8)&&(vt(this).zIndex(this.zIndex()),this.I(8)),this.J(128)&&(this.$y=!0,this.I(128)),this.dY(),this.$y&&(this.oT(),this.O4(),this.$y=!1),this.Kn(),this.T3(),e&&e.resume(),this.pu&&e&&!this.yo&&e.Ce("stagerendered",(function(){Ft(this),Mt(this)}),void 0,this),this},t.g.mN=t.ia,t.g.nV=t.ia,t.g.oE=t.ia,t.g.pI=function(e){(this.K7=e)?this.Ap.Qf(this.fa):this.Ap.Qf(new t.I(0,0,0,0))},t.g.ro=function(e,i,n){var s=!1,a=!1;t.p(e)&&t.p(i)&&t.p(n)?this.dn==i&&this.Dk==n||(this.ea=e,this.dn=i,this.Dk=n,s=0<=this.ea):(0<=this.ea&&(this.ea=-1,this.Dk=this.dn=window.NaN),a=!0),s?(e=this.controller.D[e],e=Et("rowHoverFill",1)(this,0,e),kt(this).clear().fill(e).moveTo(this.fa.left,this.dn).lineTo(this.fa.left+this.fa.width,this.dn).lineTo(this.fa.left+this.fa.width,this.Dk).lineTo(this.fa.left,this.Dk).close()):a&&kt(this).clear()},t.g.Iv=function(e,i,n){var s=It(this);t.p(e)?t.p(i)?s.clear().moveTo(this.fa.left,e).lineTo(this.fa.left+this.f,e).lineTo(this.fa.left+this.f,i).lineTo(this.fa.left,i).close().stroke(this.uf().g("stroke")):s.clear().moveTo(this.fa.left,e).lineTo(this.fa.left+this.f,e).stroke(this.uf().g("placementStroke")):s.clear(),t.p(n)&&t.uf(t.Lp.body,"cursor",n)},t.g.fT=function(e){var i=this.O();if(i){var n=t.Zj(i.Ja());i=this.fa.top+n.y+this.G+10;var s=n.y+this.fa.height-10-10,a=(n=n.x+this.fa.left+10)+this.fa.width-10-10,o=e.clientX,r=e.clientY;this.bx=this.Fu=0,(o<n||o>a)&&(this.Fu=o-n),(r<i||r>s)&&(this.bx=r-i);var l=this;!this.vi||this.Vn||this.nf||(this.Vn=(0,window.setInterval)((function(){l.wW(e)}),100))}},t.g.XS=function(t){this.nf=t},t.g.AG=function(){},t.g.WW=t.ia,t.g.O4=t.ia,t.g.remove=function(){this.Vc&&this.Vc.parent(null)},t.g.dY=function(){},t.g.Kn=t.ia,t.g.T3=t.ia,t.g.jJ=function(t){this.controller.data()&&(this.Gb==this&&this.dispatchEvent({type:"rowSelect",actualTarget:t?t.target:this,target:this,originalEvent:t,item:null,prevItem:this.Gb.nk().b}),this.Gb.nk().reset(),this.B(64,1))},t.g.data=function(e){var i=this.controller.data();return t.p(e)?(e!=i&&t.J(e,t.au)&&this.controller.data(e),this):i},t.g.W=function(){return this.md||(this.fa&&!this.fa.height&&this.fa.height||(this.fa=this.ob()),N(G(this.controller,this.fa.height-this.G-1).Tn(this.Tn))),this},t.g.Nj=function(e){return t.p(e)?(this.controller.Nj(e),this):this.controller.Nj()},t.g.Saa=function(){return this.controller.D},t.g.Cg=function(e){return t.p(e)?(this.controller.Cg(e),this):this.controller.Cg()},t.g.uk=function(e){return t.p(e)?(this.G!=e&&(this.G=e,this.fa||(this.fa=this.ob()),this.pu&&G(this.controller.ka(),this.fa.height-e-1).da(!1),this.B(4,1)),this):this.G},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),t.W(this,"tooltip",this.gb),t.K(this.gb,this.Bp,this),t.Aw(this.gb,this)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.OM=function(t){return this.Ua(t)},t.g.km=function(e){return t.p(e)?(this.controller.km(e),this):this.controller.km()},t.g.R=function(){t.Yd(window.document,"mousemove",this.fT,!1,this),this.Vi&&t.kr(this.Vi,this.iO,this),this.gb&&t.kr(this.gb,this.Bp,this),this.Gb.bg&&(this.Gb.bg.Bl(),t.qd(this.Gb.bg)),t.kr(this.controller,this.AW,this),this.Vg&&(this.Vg.gc("drag",this.ko,!1,this),this.Vg.gc("end",this.i_,!1,this)),t.sd(this.Fa,this.Vi,this.gb,this.bj,this.sb,this.Vg,this.ud,this.yg,this.Za,this.$a,this.D,this.Ba,this.Ha,this.me,this.Sb,this.Uc,this.fb,this.ec,this.oB,this.NB,this.Zq,this.Vc,this.bz),this.bz=this.Vi=this.Vc=this.Zq=this.NB=this.oB=this.ec=this.fb=this.Uc=this.Sb=this.me=this.Ha=this.Ba=this.D=this.$a=this.Za=this.yg=this.ud=this.Vg=this.controller=this.sb=this.bj=this.gb=null,ot.u.R.call(this)},t.g.F=function(){var e=ot.u.F.call(this);return(e.isStandalone=this.pu)&&(e.controller=this.controller.F(),e.defaultRowHeight=this.hv(),e.palette=this.cc().F()),t.Tq(this,Ji,e,void 0,void 0,!0),e.headerHeight=this.G,e.edit=this.uf().F(),e},t.g.U=function(e,i){ot.u.U.call(this,e,i),(this.pu="isStandalone"in e?e.isStandalone:"controller"in e)&&"controller"in e&&(this.controller=new y(void 0),t.K(this.controller,this.AW,this),this.controller.N(e.controller),this.hv(e.defaultRowHeight),this.cc(e.palette)),t.Iq(this,Ji,e,i),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip),this.uk(e.headerHeight),"edit"in e&&this.uf().ga(!!i,e.edit)},t.H(Rt,t.ag),Rt.prototype.ar=function(){this.deltaY=this.deltaX=0},Rt.prototype.ls=function(t,e){if(this.b.Gb.altKey||!this.b.uf().enabled()&&!this.b.nf){var i=this.x-t,n=this.y-e;this.x=t,this.y=e,this.b.scroll(i,n)}},Rt.prototype.reset=function(){this.y=this.x=0},t.H(jt,t.Jp),jt.prototype.zE=function(){jt.u.zE.call(this),this.b.altKey=!1},jt.prototype.WM=function(e,i){jt.u.WM.call(this,e,i),t.Ld(t.ll,["visibilitychange","blur"],this.zE,!1,this)},jt.prototype.wH=function(){jt.u.wH.call(this),t.Yd(t.ll,["visibilitychange","blur"],this.zE,!1,this)},t.H(Bt,t.Ag),t.g=Bt.prototype,t.g.reset=function(){this.fill(null).stroke(null).clear(),this.KS=null,this.type=void 0,this.label&&(this.label.Hi(),this.label.enabled(!1),this.label.W()),this.ub=this.item=this.PV=this.label=null,this.Fq=void 0},t.g.KS=null,t.g.label=null,t.g.PV=null,t.g.item=null,t.g.ub=null,t.g.Fq=void 0,t.H(Ht,t.Y),t.g=Ht.prototype,t.g.sa=208|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.state=function(e){return t.p(e)?(this.dc!=e&&(this.dc=e,this.B(20,1)),this):this.dc},t.g.Ve=function(){return 2==this.dc},t.g.po=function(t){!this.Ve()&&this.oh(t)&&this.state(1)},t.g.hg=function(t){!this.Ve()&&this.oh(t)&&this.state(0)},t.g.Ds=function(t){this.oh(t)&&(this.Ve()?this.state(1):this.state(2))},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.K(this.Wa,this.fm,this)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.fm=function(e){t.X(e,2)&&this.B(4,9)};var Qi={};t.sq(Qi,[t.Z.I7,t.Z.jK,t.Z.hK]),t.U(Ht,Qi);var tn,en=[["cursor",128,1],["width",4,1],["height",4,1]],nn=t.uq(),sn={};t.T(sn,[["background",0,0],["content",20,1]]),t.Eq(sn,20,16,1,1),tn=sn,t.Gq(Ht,t.Fc(tn),"normal"),t.g=Ht.prototype,t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.W=function(){if(!this.zc())return this;this.ka(),this.Aa||(this.Aa=t.ok(),this.Ia=new t.yu,this.Ia.ga(!0,this.sc("background")),this.Ia.zIndex(0),this.Ia.O(this.Aa),this.Ia.kb(this),this.fu=this.Aa.rect().stroke(null).fill(t.bm).zIndex(999),t.ru(this,this.fu,this.po,this.hg,this.Ds,null)),this.ad||(this.ad=t.sk().zIndex(1)),this.Ed||(this.Ed=t.qk().zIndex(1).stroke(null).fill(null));var e=this.sc("content");return this.yN=t.z(e)||t.ea(e),this.m3=t.D(e),this.Ed.parent(null),this.ad.parent(null),this.yN?this.ad.parent(this.Aa):this.m3&&(this.xea=e,this.Ed.parent(this.Aa)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(128)&&(this.fu.cursor(this.g("cursor")),this.I(128)),this.J(16)&&this.yN&&this.bi(),this.J(4)&&(this.Ox(),this.B(80),this.I(4)),this.J(16)&&(this.yN&&this.$x(),this.I(16)),this.J(64)&&(this.XL(),this.I(64)),this.da(!1),this},t.g.fo=function(t,e,i,n){var s=this.sc("adjustFontSize");if(s)if(s.width&&s.height){if(t>i||e>n)return 1;if(t<i||e<n)return-1}else if(s.width){if(t>i)return 1;if(t<i)return-1}else if(s.height){if(e>n)return 1;if(e<n)return-1}return 0},t.g.dS=function(e,i){var n=this.sc("minFontSize"),s=this.sc("maxFontSize"),a=Math.round((s+n)/2),o=s,r=t.sk();r.Cd("aria-hidden","true"),this.bi(r),r.fontSize(s);var l=r.rb();if(0>=(l=this.fo(l.width,l.height,e,i)))return s;for(r.fontSize(a),l=r.rb(),s=l=this.fo(l.width,l.height,e,i);n!=o;){if(0>l)n=Math.min(a+1,o),a+=Math.floor((o-a)/2);else{if(!(0<l))break;o=Math.max(a-1,n),a-=Math.ceil((a-n)/2)}if(r.fontSize(a),l=r.rb(),0>=s*(l=this.fo(l.width,l.height,e,i)))break}if(!l)return t.qd(r),a;do{a+=s,r.fontSize(a),l=r.rb(),l=this.fo(l.width,l.height,e,i)}while(0>s*l);return t.qd(r),a},t.g.jC=function(){var t=this.sc("adjustFontSize");return t&&(t.width||t.height)},t.g.$x=function(){if(this.jC()){var t=this.dS(this.Oi,this.Ni);this.ad.fontSize(t)}this.ad.x(this.Lg),this.ad.y(this.Mg-1),this.ad.clip(this.Ll)},t.g.XL=function(){this.Ia.ka(),this.Ia.ja(this.Ll),this.Ia.ga(!1,this.sc("background")),this.Ia.W(),this.Ia.da(!1)},t.g.vg=function(e){t.X(e,1)&&(e.target.I(4294967295),this.va(1))},t.g.bh=function(){return this.BP[this.dc]},t.g.sc=function(e){if("background"==e){e={};var i=t.Ga(e,this.YK[this.dc]);t.Sc.apply(null,i)}else e=t.ir.call(this,e);return e},t.g.bi=function(e){var i=e||this.ad;if(i.color(this.sc("fontColor")),i.opacity(this.sc("fontOpacity")),i.Hm(this.sc("selectable")),i.Dd(this.sc("disablePointerEvents")),this.J(4)||e){e=this.sc("content");var n=this.sc("useHtml");t.p(e)&&(n?i.htmlText(e):i.text(e)),i.fontFamily(this.sc("fontFamily")),i.fontStyle(this.sc("fontStyle")),i.fontVariant(this.sc("fontVariant")),i.fontWeight(this.sc("fontWeight")),i.fontSize(this.sc("fontSize")),i.er(this.sc("fontDecoration")),i.direction(this.sc("textDirection")),i.Xu(this.sc("wordBreak")),i.wordWrap(this.sc("wordWrap")),i.letterSpacing(this.sc("letterSpacing")),i.lineHeight(this.sc("lineHeight")),i.textIndent(this.sc("textIndent")),i.textShadow(this.sc("textShadow")),i.vAlign(this.sc("vAlign")),i.Bm(this.sc("hAlign")),i.textOverflow(this.sc("textOverflow"))}},t.g.Ox=function(){var e,i,n=this.ja(),s=this.g("width"),a=this.g("height"),o=0,r=0;if(n){var l=n.width,h=n.height;if(null!=s?(this.Oi=e=t.L(s,l),o=Math.abs(e),n=!1):(e=0,n=!0),null!=a){this.Ni=i=t.L(a,h),r=Math.abs(i);var c=!1}else i=0,c=!0}else t.Do(s)?(n=!0,e=0):(n=!1,this.Oi=e=t.N(s),o=Math.abs(e)),t.Do(a)?(c=!0,i=0):(c=!1,this.Ni=i=t.N(a),r=Math.abs(i));var u=t.Sm(this.af);u.x=l?t.L(u.x,l):0,u.y=h?t.L(u.y,h):0,this.yN&&(l=this.padding(),this.ad.width(null),this.ad.height(null),n?(this.nn=e+=this.ad.rb().width,this.Oi=l.Lk(e)):this.nn=l.Ng(o),this.ad.width(this.nn),c?(this.ln=i+=this.ad.rb().height,this.Ni=l.$j(i)):this.ln=l.Yh(r),this.ad.height(this.ln),this.Lg=t.L(l.g("left"),this.Oi),this.Mg=t.L(l.g("top"),this.Ni),this.Lg+=u.x,this.Mg+=u.y),this.m3&&(s={path:this.Ed,width:s,height:a,state:this.Ve()?"selected":1==this.dc?"hovered":"normal"},this.xea.call(s,this.Ed),s=this.Ed.rb(),n&&(this.Oi=s.left+s.width),c&&(this.Ni=s.top+s.height),this.Ed.oc(1,0,0,1,u.x,u.y)),this.Ll=new t.I(u.x,u.y,this.Oi,this.Ni),this.fu.Qf(this.Ll)},t.g.position=function(e){return t.p(e)?(this.af=e,this.B(4,9),this):this.af},t.g.F=function(){var e=Ht.u.F.call(this);return t.Tq(this,Qi,e,"Button"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.padding=this.padding().F(),e},t.g.U=function(e,i){Ht.u.U.call(this,e,i),t.Iq(this,Qi,e,i),this.padding().ga(!!i,e.padding),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.R=function(){t.sd(this.fu,this.ad,this.Ed,this.Ia,this.Aa,this.Wa),this.Wa=this.Aa=this.Ia=this.Ed=this.ad=this.fu=null,t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,Ht.u.R.call(this)};var an=Ht.prototype;an.normal=an.Qa,an.hovered=an.lb,an.selected=an.selected,an.padding=an.padding,t.H(zt,Ht),zt.prototype.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this.ca,"background",this.ca.background()),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this.za,"background",this.za.background()),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{}),t.W(this.Ea,"background",this.Ea.background())},zt.prototype.Ds=function(e){if(this.kb(null),this.oh(e)){this.Ve()?this.state(1):this.state(2),e=this.te;var i=!this.Ve(),n=e.controller.D[this.b];if(n){var s={item:n,collapsed:i};n.get("anychartIsLoadable")&&!n.bc()?(s.type="ganttloaddata",i=!!t.p(i)&&i,n.j("collapsed",i),t.Dp(e.Gb,s)):n.bc()&&(s.type="rowcollapseexpand",e.Gb.dispatchEvent(s)&&n.j("collapsed",i))}}this.kb(this.te)},t.H(Vt,t.Y),Vt.prototype.sa=4048|t.Y.prototype.sa,Vt.prototype.ra=t.Y.prototype.ra|t.KE|t.LE|4096;var on={};t.rq(on,0,"width",t.br),t.rq(on,0,"defaultWidth",t.Bq),t.rq(on,0,"collapseExpandButtons",t.Dq),t.rq(on,0,"depthPaddingMultiplier",t.Bq),t.U(Vt,on),t.g=Vt.prototype,t.g.tka=function(e,i){var n=t.z(i)?function(t,e){if(!t.P[e])switch(e){case"direct-numbering":t.P[e]={formatter:t.$E,width:50};break;case"text":t.P[e]={formatter:t.$E,width:170};break;case"financial":t.P[e]={formatter:t.m7,textStyle:{hAlign:"right"},width:90};break;case"percent":t.P[e]={formatter:t.r7,textStyle:{hAlign:"right"},width:50};break;case"date-common-log":t.P[e]={formatter:te("dd/MMM/yyyy"),textStyle:{hAlign:"right"},width:90};break;case"date-iso-8601":t.P[e]={formatter:te("yyyy-MM-dd"),textStyle:{hAlign:"right"},width:90};break;case"date-us-short":t.P[e]={formatter:te("M/dd/yyyy"),textStyle:{hAlign:"right"},width:90};break;case"date-dmy-dots":t.P[e]={formatter:te("dd.MM.yy"),textStyle:{hAlign:"right"},width:90};break;default:t.P[e]={formatter:t.$E,width:90}}return t.P[e]}(this.te,i):i;if(t.C(n)){this.ka();var s=n.formatter,a=n.width;n=n.textStyle,t.p(s)&&this.labels().format((function(){return s(this.item.get(e))})),t.p(a)&&(this.width(a),this.defaultWidth(a)),t.p(n)&&this.labels(n),this.da(!0)}return this},t.g.kea=function(){return""},t.g.yG=t.ia,t.g.Zda=function(e){t.X(e,16)&&(qt(this),e=2048,(n(this.labels())||this.VD!=this.yG)&&(e|=1024),t.sd(this.Lw),this.Lw.length=0,this.B(e))},t.g.Uw=function(){var e;if(this.Zr=this.te.controller.Zr,t.Op()){var i=this.te.Mw,n=[];for(e=i.first;e<=i.sw;e++)this.ye[e]||(this.ye[e]=new t.Ix),n.push(this.ye[e]);return n}if(!this.ye.length)for(e=0;e<this.Zr.length;e++)i=new t.Ix,this.ye.push(i);return this.ye},t.g.Hx=function(e){var i,n=this.VD!=this.yG;if(t.Op()){var s=this.te.Mw;for(i=s.first;i<=s.sw;i++)Wt(this,i,n,e)}else for(i=0;i<this.ye.length;i++)Wt(this,i,n,e)},t.g.ma=function(){return this.Ad},t.g.labels=function(e){return this.zj||(this.zj=new t.Hx,this.zj.Ga("ganttDefaultSimpleLabelsSettings"),0==this.Ad?this.zj.Ga({format:"{%linearIndex}"}):1==this.Ad&&this.zj.Ga({format:"{%name}"}),t.K(this.zj,this.lI,this)),t.p(e)?(this.zj.N(e),this.B(128,1),this):this.zj},t.g.lI=function(e){var i=0,n=1;t.X(e,1)&&(i|=512,t.Op()&&(n|=4096)),t.X(e,8)&&(i|=1024,n|=4096),t.X(e,2)&&(i|=128,n|=4096),t.X(e,32768)&&(i|=128,this.zj.enabled()&&(n|=4096)),t.Op()&&4096&n&&(this.te.Mw.reset=!0,M(this.te.controller),this.te.Gb.dispatchEvent("workingcancel"),this.I(i)),this.B(i,n)},t.g.y3=function(e){return t.p(e)?(this.VD=e||this.yG,t.sd(this.Lw),this.Lw.length=0,this.B(1024,1),this):this.VD},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),this.jb.ka(),this.jb.O(Yt(this)).margin(0),this.jb.da(!1),t.K(this.jb,this.Mq,this),this.jb.kb(this)),t.p(e)?(this.ka(),this.jb.N(e),this.jb.O(Yt(this)),this.da(!0),this):this.jb},t.g.Mq=function(e){t.X(e,1)&&this.te.B(16,9)},t.g.sk=function(){return this.Vc||(this.Vc=t.ok()),this.Vc},t.g.position=function(e){return t.p(e)?(this.af&&this.af.x==e.x&&this.af.y==e.y||(this.af=e,this.ab=null,this.B(4,9)),this):this.af},t.g.height=function(e){return t.p(e)?(this.Jf!=e&&(this.Jf=e,this.ab=null,this.B(4,9)),this):this.Jf},t.g.gU=function(){return this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.Lf},t.g.remove=function(){this.Vc&&this.Vc.parent(null),this.te.B(512,1)},t.g.Ox=function(){if(this.ab)return this.ab;var e=this.te.ob(),i=t.L(this.g("width")||0,e.width);i=Math.max(hn,i);var n=t.L(this.Jf||0,e.height),s=t.Sm(this.af);return this.ab=new t.I(e.left+s.x,e.top+s.y,i,n)},t.g.ob=function(){return this.Ox()},t.g.Ada=function(e){t.X(e,1)&&this.B(256,1)},t.g.W=function(){if(this.zc()){var e,i,n=this.O(),s=n?n.Ja():null,a=s&&!s.yf();if(a&&s.suspend(),this.sk().bc()||this.sk().hc(this.gU()).hc(Xt(this)).hc(Yt(this)),this.J(2)&&(this.sk().parent(n),this.I(2)),this.J(4)&&(this.Ox(),this.sk().clip(this.ab),this.B(128),this.I(4)),t.Op()||(this.J(2048)&&(this.I(2048),this.B(128)),this.J(512)&&(this.I(512),this.B(128)),this.J(1024)&&(this.I(1024),this.B(128))),this.J(256)){n=this.te.controller.D;var o=this.te.Cg(),r=this.te.Nj(),l=-1;for(e=o;e<=r;e++){var h=n[e];if(!h)break;this.g("collapseExpandButtons")&&h.bc()&&(l++,(i=this.Lm[l])&&i.W())}this.I(256)}if(this.J(128)){l=this.te.uk(),Kt(this).clear().moveTo(this.ab.left,this.ab.top).lineTo(this.ab.left+this.ab.width,this.ab.top).lineTo(this.ab.left+this.ab.width,this.ab.top+l).lineTo(this.ab.left,this.ab.top+l).close(),n=new t.I(this.ab.left,this.ab.top,this.ab.width,l),this.title().ka(),this.jb.ja(n),this.jb.height(l),this.jb.da(!1),this.B(64),n=this.te.controller.D,o=this.te.Cg(),r=this.te.Nj();var c=this.te.km(),u=this.labels().padding(),d=this.ab.top+l+1-c;c=t.L(u.g("left"),this.ab.width),this.QV.length=0,l=-1;var p=this.te.buttons();e=p.Qa().g("content");var g=p.lb().g("content"),f=p.selected().g("content"),m=p.F();if(m.normal.content=e,m.hovered.content=t.Zo(g,e),m.selected.content=t.Zo(f,e),p.I(4294967295),!(0,window.isNaN)(this.eX)&&!(0,window.isNaN)(this.dX))for(e=this.eX;e<=this.dX;e++)(g=this.ye[e])&&(t.Px(g,null),t.Rx(g));for(this.eX=n[o]?n[o].j("index"):window.NaN,this.dX=n[r]?n[r].j("index"):window.NaN,e=o;e<=r&&(h=n[e]);e++){o=x(this.te.controller,h),g=h.j("depth")||0;var v=c+(g*=this.g("depthPaddingMultiplier"));f=0;var b=dt(h);if(this.g("collapseExpandButtons")&&(h.bc()||b.QD)){l++,(i=this.Lm[l])||(i=new zt(this.te),this.Lm.push(i),i.ga(!0,m),i.zIndex(10),i.O(Xt(this)),t.K(i,this.Ada,this)),i.ka(),i.N(m),f=(p.g("width")||0)+ln;var y=d+(o-(p.g("height")||0))/2,S="svg"===t.kk?.5:0;b=b.QD&&!h.bc()||h.j("collapsed")?1==i.dc?1:0:2;var w=i.enabled(!0);t.p(e)?w.b=e:w=w.b,w.ja(this.ab).position({x:Math.floor(this.ab.left+v)+S,y:Math.floor(y)+S}).state(b),i.da(!1),i.W()}i=d+o,h=h.j("index"),(v=this.ye[h])&&(this.labels().enabled()?((d=u.Ej(new t.I(this.ab.left,d,this.ab.width,o))).left+=f+g,d.width-=f+g,t.Px(v,this.xl),t.Wx(v,d,s),t.Qx(v),this.QV[h]=v.text()):t.Px(v,null)),d=i+this.te.Tn}for(;++l<this.Lm.length&&this.g("collapseExpandButtons")&&this.Lm[l].enabled();)this.Lm[l].enabled(!1).W();t.Op()?this.I(128):this.I(1664)}this.J(16)&&(Kt(this).fill(this.te.g("headerFill")),this.B(64),this.I(16)),this.J(64)&&(this.jb.W(),this.I(64)),this.J(8)&&(this.sk().zIndex(this.zIndex()),this.I(8)),a&&s.resume()}return this},t.g.U=function(e,i){Vt.u.U.call(this,e,i),t.Iq(this,on,e,i),this.labels().ga(!!i,e.labels),this.title().ga(!!i,e.title),this.y3(e.labelsOverrider||e.cellTextSettingsOverrider)},t.g.F=function(){var e=Vt.u.F.call(this);return t.Tq(this,on,e,void 0,void 0,!0),e.labels=this.labels().F(),e.title=this.title().F(),this.VD!=this.yG&&t.kl(8,null,["Data Grid Column cellTextSettingsOverrider"]),e},t.g.R=function(){qt(this),t.sd(this.zj,this.Lw,this.jb,this.jz,this.MJ,this.Zq,this.Vc,this.Lm),this.zj=null,this.Lw.length=0,this.Vc=this.Zq=this.MJ=this.jz=this.jb=null,this.Lm.length=0,Vt.u.R.call(this)};var rn=Vt.prototype;rn.title=rn.title,rn.enabled=rn.enabled,rn.labels=rn.labels,rn.labelsOverrider=rn.y3,rn.setColumnFormat=rn.tka,rn.draw=rn.W,rn.getPixelBounds=rn.ob,t.H(Jt,t.Hy),t.g=Jt.prototype,t.g.Ac=function(){Jt.u.Ac.call(this);var e=this.Ya();t.Qj(e,"anychart-label-input"),this.Zl=new t.Jp(this.Ya())},t.g.Ta=function(e){if(t.p(e)){if(this.Bb=e,e=this.Ya()){var i=this.Bb;i=t.gc("padding: 0px; position: absolute; left: %spx; top: %spx; width: %spx; height: %spx",i.left,i.top,i.width,i.height),t.Ce(e,{style:i})}return this}return this.Bb},t.g.show=function(e,i){var n=this.Ya();this.Ta(i),n&&(t.My(this,e||""),t.Pf(n,!0))},t.g.Lc=function(){var e=this.Ya();e&&t.Pf(e,!1)},t.g.OV=function(t){var e=Zt(this,t,"editinputkeypress");!this.dispatchEvent(e)||13!=t.keyCode&&27!=t.keyCode||(e=Zt(this,t,13==t.keyCode?"editinputsubmit":"editinputescape"),this.dispatchEvent(e)&&(this.Ya().blur(),this.Lc()))},t.g.NT=function(t){t=Zt(this,t,"editinputfocus"),this.dispatchEvent(t)},t.g.ZR=function(t){var e=Zt(this,t,"editinputblur");this.dispatchEvent(e)&&(e=Zt(this,t,"editinputbeforehide"),this.dispatchEvent(e)&&(e=Zt(this,t,"editinputhide"),this.dispatchEvent(e)&&this.Lc()))},t.g.Gg=function(){Jt.u.Gg.call(this),t.Ld(this.Zl,"key",this.OV,!1,this);var e=t.Dy(this);e.wa(this.Ya(),"focus",this.NT),e.wa(this.Ya(),"blur",this.ZR)},t.g.Dh=function(){var e=t.Dy(this);t.Yd(this.Zl,"key",this.OV,!1,this),e.gc(this.Ya(),"focus",this.NT),e.gc(this.Ya(),"blur",this.ZR),Jt.u.Dh.call(this)},t.g.R=function(){var e=t.Dy(this);t.Yd(this.Zl,"key",this.OV,!1,this),e.gc(this.Ya(),"focus",this.NT),e.gc(this.Ya(),"blur",this.ZR),t.qd(this.Zl),Jt.u.R.call(this)},t.H(Qt,ot),Qt.prototype.sa=512|ot.prototype.sa;var ln=5,hn=20;Qt.prototype.$E=function(e){return t.p(e)?String(e):""},Qt.prototype.m7=function(e){return t.p(e)?t.ea(e)?e.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1,"):String(e):""},Qt.prototype.r7=function(e){return t.ea(e)?t.Tm(100*e,2)+"%":t.p(e)?t.uo(e)?e:e+"%":""},Qt.prototype.XY=function(){};var cn={};t.sq(cn,[[1,"columnStroke",t.Pq],[1,"headerFill",t.Qq],[0,"onEditStart",t.gr],[0,"onEditEnd",t.gr],[0,"fixedColumns",t.Dq]]),t.U(Qt,cn),t.g=Qt.prototype,t.g.Sv=function(e,i,n){for(var s=-1,a=0,o=this.b.length;a<o;a++){var r=this.b[a];r&&r.enabled()&&!r.md&&((r=[r,++s]).push.apply(r,t.Ja(arguments,2)),e.apply(i||this,r))}},t.g.IA=function(e){return t.p(e)?(this.ba!=e&&(this.ba=e,this.B(512,1)),this):this.ba},t.g.KC=function(t,e){return se(this,t,e)},t.g.LZ=function(t){return this.KC(this.b.length,t)},t.g.Bfa=function(){for(var t=0,e=0;e<this.b.length;e++){var i=this.b[e];i&&!i.md&&t++}return t},t.g.PN=function(e){return this.aa||(this.aa=new t.xv,this.aa.O(Ct(this)),this.aa.background().enabled(!0).fill("red 0.5"),this.aa.text("Working..."),this.aa.anchor("left-top"),this.aa.position("left-top"),this.aa.padding(5),this.aa.enabled(!0),this.aa.ja(this.fa)),e?(this.aa.ga(!1,e),this):this.aa},t.g.oE=function(){t.Op()?ae(this):this.Sv((function(e){e.Uw();var i=!1,s=!1,a=0;e.J(512)&&(i=!0),e.J(1024)&&(n(e.labels())&&(a|=t.LE),i=s=!0),e.J(2048)&&(a|=t.KE,i=s=!0),i&&e.Hx(s),e.va(a)}))},t.g.Gka=function(e,i){var n=i.target;n.ab||(n.ab=n.ob()),this.Sv(this.$ja,this,e,new t.I(t.Tm(n.ab.left,1),t.Tm(n.ab.top,1),t.Tm(Math.min(n.af,n.ab.width-n.D),1),t.Tm(n.ab.height,1)).width+hn)},t.g.Hka=function(t,e){this.Sv(this.jea,this,t,e)},t.g.$ja=function(e,i,n,s){n==i&&(i={type:"splitterpositionchange",columnIndex:e.ma(),targetColumn:e,linearColumnIndex:i,oldWidth:e.ob().width,newWidth:s},e.width(s),t.Dp(this,i))},t.g.jea=function(t,e,i,n){i==e&&(i=(e=t.title()).height(),n.offsetY-this.fa.top<i&&(n=e.hH().width,n+=e.padding().g("left")+e.padding().g("right"),t.width(t.defaultWidth()?t.defaultWidth():n),this.g("fixedColumns")&&this.Gb.B(4,1)))},t.g.Sda=function(e){var i=0;t.X(e,1)&&(i|=16),t.X(e,8)&&(i|=512),t.X(e,4096)&&(i|=64,t.Op()&&(this.Mw.reset=!0)),t.Op()&&t.X(e,4096)&&this.O()&&this.I(i);var n=!1;this.g("fixedColumns")&&t.X(e,32776)&&(i|=4,n=!0),this.B(i,1),n&&this.Gb.B(4,1)},t.g.tq=function(e){if(!this.Sh){this.Sh=new s,this.Sh.U(t.zm("defaultScrollBar")),this.Sh.we("horizontal");var i=this;this.Sh.wa("scrollchange",(function(t){i.IA(Math.round(t.startRatio*i.f))})),t.K(this.Sh,this.AX,this)}return t.p(e)?(this.Sh.N(e),this):this.Sh},t.g.AX=function(e){t.X(e,8)&&this.B(4,1)},t.g.scroll=function(e,i){t.xr(this,this.controller),this.IA(this.ba+e);var n=this.controller.Cg(),s=this.controller.b,a=this.controller.km();return j(this.controller,(n?s[n-1]:0)+(a+i)),t.yr(this,this.controller),!0},t.g.fs=function(){var e=ee(this),i=this.fa.top+this.uk();e.clear().moveTo(this.fa.left,this.fa.top).lineTo(this.fa.left+this.fa.width,this.fa.top).lineTo(this.fa.left+this.fa.width,i).lineTo(this.fa.left,i).close(),e=ie(this);for(var n=i=0,s=this.b.length;n<s;n++){var a=this.b[n];a&&a.enabled()&&(t.uo(a.g("width"))&&(a.ab=null),i+=(a=a.Ox().width)+e)}this.f=i,this.B(512)},t.g.kv=function(){ee(this).fill(this.g("headerFill")),this.Sv((function(t){t.B(16),t.W()}))},t.g.nV=function(t){t.hc(bt(this)).hc(yt(this)).hc(St(this)).hc(xt(this)).hc(wt(this)).hc(Ct(this))},t.g.WW=function(){this.Sv((function(t){t.B(128),t.W()}))},t.g.ob=function(){var t=Qt.u.ob.call(this);return this.g("fixedColumns")&&(t.width=ne(this)),t},t.g.dY=function(){if(this.J(512)){var e,i,n=0,s=this.fa.left,a=this.fa.top,o=Et("columnStroke",2)(this,0),r=t.dp(o),l=[],h=this.YE.length=0;for(e=this.b.length;h<e;h++)if(i=this.b[h])if(i.enabled()){var c=i.Ox().width;n+=c+r,l.push(i)}else i.W();for(this.f=n,this.fa.width>this.f&&(this.ba=0),this.ba=t.Za(this.ba,0,Math.abs(this.fa.width-this.f)),n=-this.ba,h=0,e=l.length;h<e;h++){(i=l[h]).ka(),i.position({x:n,y:0}),i.height(this.fa.height),c=i.Ox().width;var u=this.o[h],d=c,p=!(this.g("fixedColumns")&&h==l.length-1);u&&(u.ka(),p?(u.stroke(o),u.ba=o,this.YE.push(n+c+r),d+=r,u.Ta({left:s+n+hn,top:a,width:d+this.fa.width,height:this.fa.height}).op(!1).enabled(!0).position(c-hn).da(!1).W().op(!0)):u.enabled(!1).da(!1).W()),n+=d,i.da(!1),i.W()}for(this.$y=!0;h<this.o.length&&this.o[h].enabled();)this.o[h].enabled(!1),h++;this.Sh&&(s=new t.I(this.fa.left-this.ba,0,this.f,0),a=new t.I(this.fa.left,0,this.fa.width,0),this.Sh.ka().op(!1).kg(s).aQ(a).W().op(!0).da(!1),this.Sh.O()&&this.Sh.W()),this.I(512)}},t.g.k1=function(e){if(e={columnIndex:this.fh.ma(),item:this.qc,value:e.value},t.D(this.g("onEditEnd"))&&(e=this.g("onEditEnd").call(e))&&"object"==t.ka(e)&&!e.cancelEdit&&"object"==t.ka(e.itemMap)&&this.qc){e=e.itemMap;var i=this.controller.data();for(var n in i.ka(),e)e.hasOwnProperty(n)&&this.qc.set(n,e[n]);i.da(!0),this.RJ=!0,this.Bu=!1}},t.g.Mea=function(t){this.RJ||this.Bu||(this.k1.call(this,t),this.Bu=!1)},t.g.Nea=function(){this.Bu=!0},t.g.Oea=function(){this.Gb.pI(!0),this.RJ=!1},t.g.Pea=function(){this.RJ=this.Bu=!1,this.K.reset(),this.Gb.pI(!1)},t.g.MZ=function(e){if(e&&this.uf().g("enabled")){if(this.Cm=!1,!this.K){this.K=new Jt;var i=this.Gb.O().Ja();this.K.Sd(i.O()),this.K.wa("editinputsubmit",this.k1,!1,this),this.K.wa("editinputescape",this.Nea,!1,this),this.K.wa("editinputblur",this.Mea,!1,this),this.K.wa("editinputfocus",this.Oea,!1,this),this.K.wa("editinputhide",this.Pea,!1,this)}this.qc=e.item;var n=e.hoveredIndex,s=!1;if((i=e.index)==this.controller.Cg())this.controller.ka().Cg(i).km(0).da(!0);else if(i==this.controller.Nj()){this.controller.Nj(i),s=this.mp;var a=Math.min(s.length-1,n),o=this.fa.top+this.uk()+1;a=(o+=n=n?s[a-1]:0)+(s[a]-n-this.Tn)-2,s=!0}n=~t.Na(this.YE,e.originalEvent.offsetX-this.fa.left);for(var r=null,l=-1,h=0,c=this.b.length;h<c;h++){var u=this.b[h];if(u&&u.enabled()&&++l==n){r=u.Ox(),this.fh=u;break}}0>(n=r).left&&(this.IA(this.IA()+n.left),n.left=0),r=x(this.controller,e.item),l=e.hoveredIndex?2:1,(e=n?new t.I(n.left,e.startY,n.width-2,r-l):null)&&(s&&(e.top=o,e.height=a-o),this.fh&&(i=this.fh.QV[i],o={columnIndex:this.fh.ma(),item:this.qc,value:i},t.D(this.g("onEditStart"))&&(o=this.g("onEditStart").call(o))&&"object"==t.ka(o)&&!o.cancelEdit&&this.qc&&(this.K.show(null!=o.value?o.value:i,e),e=this.K,i=t.Ly(e),e.b=!0,e.Ya().focus(),i||t.Jy()||(e.Ya().value=e.i),e.Ya().select(),t.Jy()||(e.Qg&&e.Qg.Ce(e.Ya(),"click",e.VU),t.Dj(e.B1,10,e)))))}},t.g.iJ=function(t){this.vW(t)},t.g.vW=function(t){this.uf().g("enabled")&&(this.oj=t.item)},t.g.wW=function(){if(this.vi&&(this.Fu||this.bx)){var t=0,e=0;this.Fu&&(t=0<this.Fu?30:-30),this.bx&&(e=0<this.bx?30:-30),this.scroll(t,e)}},t.g.buttons=function(e){return this.Lm||(this.Lm=new zt(this),t.W(this,"buttons",this.Lm),this.Lm.$c(),t.K(this.Lm,this.Bda,this)),t.p(e)?(this.Lm.N(e),this):this.Lm},t.g.Bda=function(e){t.X(e,1)&&(this.buttons().I(4294967295),this.WW())},t.g.F=function(){var e=Qt.u.F.call(this);t.Tq(this,cn,e,void 0,void 0,!0),e.horizontalOffset=this.IA(),e.buttons=this.buttons().F(),e.columns=[];for(var i=0;i<this.b.length;i++){var n=this.b[i];e.columns.push(!!n&&n.F())}return this.Sh&&(e.horizontalScrollBar=this.tq().F()),e.tooltip=this.Ua().F(),e},t.g.U=function(e,i){if(Qt.u.U.call(this,e,i),t.Iq(this,cn,e,i),this.IA(e.horizontalOffset),this.buttons().ga(!!i,e.buttons),"defaultColumnSettings"in e&&this.XY(),this.onEditStart(e.onEditStart),this.onEditEnd(e.onEditEnd),"columns"in e)for(var n=0,s=e.columns.length;n<s;n++){var a=e.columns[n];a&&se(this,n,a,i)}"horizontalScrollBar"in e&&this.tq(e.horizontalScrollBar)},t.g.R=function(){t.sd(this.Sh,this.Ka,this.o,this.b,this.Lm),this.Ka=this.Sh=this.Lm=null,this.o.length=0,this.b.length=0,Qt.u.R.call(this)},t.H(oe,Qt),t.xu(oe,Qt),oe.prototype.vx=function(e){return t.p(e)?(R(this.controller).N(e),this):R(this.controller)},oe.prototype.F=function(){var t=oe.u.F.call(this);return t.verticalScrollBar=this.vx().F(),t},oe.prototype.U=function(t){oe.u.U.call(this,t),"verticalScrollBar"in t&&this.vx(t.verticalScrollBar)};var un=Qt.prototype;un.edit=un.uf,un.column=un.KC,un.data=un.data,un.addColumn=un.LZ,un.startIndex=un.Cg,un.endIndex=un.Nj,un.getVisibleItems=un.Saa,un.horizontalScrollBar=un.tq,un.horizontalOffset=un.IA,un.verticalOffset=un.km,un.tooltip=un.Ua,un.draw=un.W,un.buttons=un.buttons,un.getColumnsCount=un.Bfa,un.loadingMessage=un.PN,un=oe.prototype,t.E("anychart.standalones.dataGrid",(function(){var e=new oe;return e.N(t.nm("standalones.dataGrid")),e})),un.draw=un.W,un.data=un.data,un.addColumn=un.LZ,un.parentBounds=un.ja,un.container=un.O,un.headerHeight=un.uk,un.verticalScrollBar=un.vx,un.defaultRowHeight=un.hv,un.buttons=un.buttons,t.H(re,t.Ny);var dn={};t.sq(dn,[[1,"stroke",t.Pq],[0,"value",t.Cq]]),t.U(re,dn),t.g=re.prototype,t.g.ra=t.Ny.prototype.ra,t.g.sa=t.Ny.prototype.sa,t.g.scale=function(e){return t.p(e)?(t.kl(500),this):this.Po()},t.g.we=function(e){return t.p(e)?("horizontal"==e&&t.kl(501),this):"vertical"},t.g.fs=function(){this.lo()},t.g.kv=function(){t.Oy(this).stroke(this.g("stroke"))},t.g.R=function(){this.ta("stroke",null),re.u.R.call(this)},t.g.F=function(){var e=re.u.F.call(this);return t.Tq(this,dn,e),e},t.g.U=function(e,i){re.u.U.call(this,e,i),t.Iq(this,dn,e)};var pn=re.prototype;pn.scale=pn.scale,pn.layout=pn.we,pn.isHorizontal=pn.Nb,t.H(le,t.Ny);var gn={};t.sq(gn,[[1,"fill",t.Qq],[0,"from",t.Cq],[0,"to",t.Cq]]),t.U(le,gn),t.g=le.prototype,t.g.kR=function(){return"From: "+this.g("from")+" to: "+this.g("to")},t.g.ra=t.Ny.prototype.ra,t.g.sa=t.Ny.prototype.sa,t.g.we=function(e){return t.p(e)?("horizontal"==e&&t.kl(501),this):"vertical"},t.g.scale=function(e){return t.p(e)?(t.kl(500),this):this.Po()},t.g.fs=function(){t.Py(this)},t.g.kv=function(){t.Oy(this).stroke(null).fill(this.g("fill"))},t.g.R=function(){this.ta("fill",null),le.u.R.call(this)},t.g.F=function(){var e=le.u.F.call(this);return t.Tq(this,gn,e),e},t.g.U=function(e,i){le.u.U.call(this,e,i),t.Iq(this,gn,e,i)};var fn=le.prototype;fn.scale=fn.scale,fn.layout=fn.we,fn.isHorizontal=fn.Nb,t.H(he,t.Zy);var mn={};t.sq(mn,[[0,"value",t.Cq]]),t.U(he,mn),t.g=he.prototype,t.g.ra=t.Zy.prototype.ra,t.g.sa=t.Zy.prototype.sa,t.g.scale=function(e){return t.p(e)?(t.kl(500),this):this.Po()},t.g.we=function(e){return t.p(e)?("horizontal"==e&&t.kl(501),this):"vertical"},t.g.F=function(){var e=he.u.F.call(this);return t.Tq(this,mn,e),e},t.g.U=function(e,i){he.u.U.call(this,e,i),t.Iq(this,mn,e,i)};var vn=he.prototype;vn.scale=vn.scale,vn.layout=vn.we,vn.background=vn.background,vn.padding=vn.padding,vn.isHorizontal=vn.Nb,t.H(ce,t.ag),ce.prototype.ar=function(){this.deltaY=this.deltaX=0},ce.prototype.ls=function(t){this.element.oc(1,0,0,1,t,0)},ce.prototype.xw=function(){return 0},t.H(ue,t.ag),t.g=ue.prototype,t.g.ar=function(){this.deltaY=this.deltaX=0},t.g.ls=function(t){this.element.oc(1,0,0,1,t,0),this.Kd=(t-this.f.left)/this.f.width},t.g.l2=function(){var e=this.element.tag.item;return(t.p(e.j("progressValue"))?e.j("progressValue"):e.j("autoProgress"))||0},t.g.VA=function(e){var i=this.element.tag.Ta,n=this.l2();return n*=i.width,this.f.left=-n,this.f.width=i.width,t.Za(e,-n,i.width-n)},t.g.xw=function(){return 0},t.H(de,ue),de.prototype.l2=function(){var e=this.element.tag.item.get("baselineProgressValue")||0;return t.Ao(e)},t.H(pe,t.ag),pe.prototype.ar=function(){this.deltaY=this.deltaX=0},t.H(ge,t.ag),ge.prototype.xw=function(){return 0},t.H(fe,t.V),fe.prototype.ra=2,fe.prototype.sa=t.V.prototype.sa;var bn={};t.sq(bn,[[1,"fill",t.Qq],[1,"stroke",t.Pq],[0,"size",t.Bq],[0,"type",t.Ok],[0,"verticalOffset",t.Bq],[0,"horizontalOffset",t.Bq],[0,"enabled",t.Zq]]),t.U(fe,bn),t.g=fe.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){this.va(2)},t.g.Ie=function(e,i){return!(!t.da(i)&&null!==i||(e?this.oa.enabled=i:this.enabled(i),0))},t.g.U=function(e,i){fe.u.U.call(this,e,i),t.Iq(this,bn,e,i)},t.g.F=function(){var e=fe.u.F.call(this);return t.Tq(this,bn,e,void 0,void 0,!0),this.ph("enabled")&&null!==e.enabled||delete e.enabled,e},t.g.R=function(){this.Y&&(t.kr(this.Y,this.Tc,this),this.Y=null),this.Xb=null,fe.u.R.call(this)},t.H(me,t.V),t.g=me.prototype,t.g.ra=2,t.g.sa=t.V.prototype.sa,t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Pu().parent(null),this.Et().parent(null),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,this.Pu().parent(this.Y.Pu()),this.Et().parent(this.Y.Et()),t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){this.va(2)},t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.Pu=function(e){return this.f||(this.f=new fe,t.W(this,"thumb",this.f),t.K(this.f,this.BK,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.Et=function(e){return this.b||(this.b=new fe,t.W(this,"connectorThumb",this.b),t.K(this.b,this.BK,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.BK=function(){this.va(2)},t.g.U=function(t,e){me.u.U.call(this,t,e),this.Pu().ga(!!e,t.thumb),this.Et().ga(!!e,t.connectorThumb)},t.g.F=function(){var t=me.u.F.call(this);return t.thumb=this.Pu().F(),t.connectorThumb=this.Et().F(),t},t.g.R=function(){this.Y&&(t.kr(this.Y,this.Tc,this),this.Y=null),this.Xb=null,t.kr(this.f,this.BK,this),t.kr(this.b,this.BK,this),t.sd(this.f,this.b),this.b=this.f=null,me.u.R.call(this)};var yn=me.prototype;yn.thumb=yn.Pu,yn.connectorThumb=yn.Et,t.H(ve,t.V),ve.prototype.ra=2,ve.prototype.sa=t.V.prototype.sa;var Sn={};t.sq(Sn,[[1,"fill",t.Qq],[1,"stroke",t.Pq],[0,"enabled",t.Zq]]),t.U(ve,Sn),t.g=ve.prototype,t.g.g=function(e){var i=t.ir.call(this,e);return"enabled"==e&&(i=null!=i?i:this.D.g("enabled")),i},t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Gz),this.Cx().parent(null),this.Tx().parent(null),this.start().parent(null),this.end().parent(null),this.Y=null):(this.Y&&t.kr(this.Y,this.Gz,this),this.Y=e,this.Cx().parent(this.Y.Cx()),this.Tx().parent(this.Y.Tx()),this.start().parent(this.Y.start()),this.end().parent(this.Y.end()),t.K(this.Y,this.Gz,this))),this.start().jg(null),this.end().jg(null),this):this.Y},t.g.Cx=function(e){return this.i||(this.i=new fe,t.W(this,"thumbs",this.i),t.K(this.i,this.Gz,this)),t.p(e)?(this.i.N(e),this):this.i},t.g.Tx=function(e){return this.o||(this.o=new fe,t.W(this,"connectorThumbs",this.o),t.K(this.o,this.Gz,this)),t.p(e)?(this.o.N(e),this):this.o},t.g.start=function(e){return this.f||(this.f=new me,t.W(this,"start",this.f),this.f.Pu().parent(this.Cx()),this.f.Et().parent(this.Tx()),t.K(this.f,this.Gz,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.end=function(e){return this.b||(this.b=new me,t.W(this,"end",this.b),this.b.Pu().parent(this.Cx()),this.b.Et().parent(this.Tx()),t.K(this.b,this.Gz,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.Gz=function(){this.va(2)},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.U=function(e,i){ve.u.U.call(this,e,i),t.Iq(this,Sn,e,i),"thumbs"in e&&this.Cx().ga(!!i,e.thumbs),"connectorThumbs"in e&&this.Tx().ga(!!i,e.connectorThumbs),"start"in e&&this.start().ga(!!i,e.start),"end"in e&&this.end().ga(!!i,e.end)},t.g.F=function(){var e=ve.u.F.call(this);return t.Tq(this,Sn,e,void 0,void 0,!0),this.ph("enabled")&&null!==e.enabled||delete e.enabled,e.thumbs=this.Cx().F(),e.connectorThumbs=this.Tx().F(),e.start=this.start().F(),e.end=this.end().F(),e},t.g.R=function(){t.sd(this.i,this.o,this.f,this.b),this.b=this.f=this.o=this.i=null,ve.u.R.call(this)};var xn=ve.prototype;xn.thumbs=xn.Cx,xn.connectorThumbs=xn.Tx,xn.start=xn.start,xn.end=xn.end,t.H(be,t.V),be.prototype.ra=3;var wn={};t.sq(wn,[t.Z.m9,t.Z.DQ,t.Z.CQ,t.Z.yz,t.Z.Yn,t.Z.ZY,t.Z.uZ,t.Z.HQ,t.Z.vQ,[0,"type",t.Ok]]),t.U(be,wn),t.g=be.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(e){t.X(e,2)&&this.at()},t.g.at=function(){this.b=null,this.va(2,!0)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){be.u.U.call(this,e,i),t.Iq(this,wn,e,i)},t.g.F=function(){var e=be.u.F.call(this);return t.Tq(this,wn,e,void 0,void 0,!0),e},ye.prototype.ed=function(t,e,i,n){return this.element.Rf.ed(this.item,this.tag,t,e,i,n,this.periodIndex,this.b)},t.H(Se,t.V),Se.prototype.ra=1,Se.prototype.sa=t.V.prototype.sa;var Cn={};t.rq(Cn,0,"drawer",t.gr),t.rq(Cn,0,"shapes",t.Cq),t.U(Se,Cn),t.g=Se.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){this.va(1)},t.g.F=function(){var e=Se.u.F.call(this);return t.Tq(this,Cn,e,void 0,void 0,!0),e},t.g.U=function(e,i){Se.u.U.call(this,e),i?t.Hq(this.oa,Cn,e):t.Iq(this,Cn,e)},t.g.R=function(){this.Y&&(t.kr(this.Y,this.Tc,this),delete this.Y),this.Xb=null,Se.u.R.call(this)},t.H(we,t.od),we.prototype.uv=function(){var e,i;for(e in this.IP={},this.b){var n=this.b[e];for(i=0;i<n.length;i++){var s=n[i];s.parent(null),t.J(s,t.Ag)&&(s.clear(),s.oc(1,0,0,1,0,0))}this.o[e]=0,n.length=0}},we.prototype.ed=function(e,i,n,s,a,o,r,l){var h={};s=s||this.i;var c=t.oa(e)+"_"+i.type+(t.p(r)?"_"+String(r):"");if("milestones-preview"==i.type||"baselines-milestones-preview"==i.type){for(var u=e;u.getParent();)u=u.getParent(),c+="_"+t.oa(u);t.p(l)&&(c+="_"+l)}for(var d in this.IP[c]=i,s)if("none"==s[d].Qb&&o)t.J(o,t.pg)&&(h[d]=Ce(this,d,e,a||0,o,n,r),h[d].tag=i);else{l=d,c=void 0,u=d;var p=e,g=a||0,f=n,m=r,v=this.i[u],b=v.Qb;this.f[b].length>this.o[b]?c=this.f[b][this.o[b]]:this.f[b].push(c=v.nS()),this.o[b]++,this.b[b].push(c),c=Ce(this,u,p,g,c,f,m),h[l]=c,h[d].tag=i}return h},we.prototype.R=function(){for(var e in this.f)t.sd(this.f[e]),this.f[e].length=0,this.b[e].length=0;this.IP=this.i=this.Bd=null,we.u.R.call(this)},t.H(Te,t.V),t.Gq(Te,["fill","stroke"],"normal"),Te.prototype.ra=12291,Te.prototype.sa=t.V.prototype.sa;var Tn={};t.rq(Tn,0,"height",t.br),t.rq(Tn,0,"anchor",(function(e){return null===e?null:"auto"==(e=t.Dk(e,"left-center"))?"auto":t.Ko(e)?"left-top":t.Lo(e)?"left-bottom":"left-center"})),t.rq(Tn,0,"position",(function(e){return null===e?null:(e=t.Ek(e,"left-center"),t.Ko(e)?"left-top":t.Lo(e)?"left-bottom":"left-center")})),t.rq(Tn,0,"offset",t.br),t.rq(Tn,0,"enabled",t.Zq),t.U(Te,Tn),t.g=Te.prototype,t.g.g=t.ir,t.g.bh=t.hr,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Xb=null,null===e?(t.kr(this.Y,this.Tc,this),this.hi().parent(null),this.uf().parent(null),this.Ua().parent(null),this.BJ().parent(null),this.QG().parent(null),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,this.hi().parent(this.Y.hi()),this.uf().parent(this.Y.uf()),this.Ua().parent(this.Y.Ua()),this.BJ().parent(this.Y.BJ()),this.QG().parent(this.Y.QG()),t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(){},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.qr=function(){return this.cj||(this.cj=[])},t.g.Ge=function(e,i,n,s){return i={sourceColor:"stroke"==i?this.sU(n):this.rU(n),item:e,itemIndex:e.j("index")},t.p(s)&&(i.period=e.get("periods")[s],i.periodIndex=s),i},t.g.aH=function(e,i,n,s){var a,o=i===t.gm,r="stroke"==n?t.Zl:t.am,l=De(this,e,s);return l&&(a=o?l[n]:"object"==t.ka(l.selected)?l.selected[n]:void 0),a?a=r(a):(a=(o?this.Qa():this.selected()).g(n),t.D(a)?(e=this.Ge(e,n,i,s),a=r(a.call(e,e))):a=r(a)),a},t.g.ws=function(){return"blue"},t.g.au=function(){return"blue"},t.g.kU=function(){return this.Um().nc(2)},t.g.lU=function(){return t.Ql(this.Um().nc(2))},t.g.rU=function(e){return e==t.gm?this.ws():this.kU()},t.g.sU=function(e){return e==t.gm?this.au():this.lU()},t.g.Um=function(){return this.wf().Gb.cc()},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),"all"!=this.Ma()&&this.gb.df(),t.W(this.Zh,"tooltip",this.gb),t.W(this,"tooltip",this.gb),t.Aw(this.gb,this.Zh),"all"==this.Ma()&&(this.gb.Za=!0,t.Kw(this.gb))),t.p(e)?(this.gb.N(e),this):this.gb},t.g.uf=function(e){return this.Vi||(this.Vi=new ve(this.Zh.uf()),t.W(this,"edit",this.Vi),t.K(this.Vi,this.iO,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Vi.N(e),this):this.Vi},t.g.iO=function(){this.va(2)},t.g.BJ=function(e){return this.CJ||(this.CJ=new be,t.W(this,"startMarker",this.CJ),t.K(this.CJ,this.i6,this)),t.p(e)?("object"!==t.ka(e)||"enabled"in e||(e.enabled=!0),this.CJ.N(e),this):this.CJ},t.g.QG=function(e){return this.RG||(this.RG=new be,t.W(this,"endMarker",this.RG),t.K(this.RG,this.i6,this)),t.p(e)?("object"!==t.ka(e)||"enabled"in e||(e.enabled=!0),this.RG.N(e),this):this.RG},t.g.i6=function(e){t.X(e,1)&&this.va(1)},t.g.Ma=function(){return"all"},t.g.wf=function(){return this.Zh},t.g.Tm=function(t,e,i){return this.aH(t,e,"fill",i)},t.g.gk=function(t,e,i){return this.aH(t,e,"stroke",i)},t.g.rE=function(){t.qd(this.Rf);var e=this.$s.g("shapes");e=this.Rf=new we(this.wf(),this,e);var i=yt(this.wf());if(e.Bd!=i)for(var n in e.Bd=i,e.b)for(var s=e.b[n],a=0;a<s.length;a++)s[a].parent(i)},t.g.vj=function(t,e,i){return null!=(e=(i=De(this,e,i))&&null!=(i=i[t])?i:e.get(t))?e:this.g(t)},t.g.qd=function(t,e){return this.vj("height",t,e)},t.g.rD=function(t,e){return this.vj("offset",t,e)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.K(this.Da,this.de,this),this.Da.df(),t.W(this,"labels",this.Da)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(){this.va(4096)},t.g.hi=function(e){return this.$s||(this.$s=new Se(this.Zh,this),t.W(this,"rendering",this.$s),t.K(this.$s,this.l5,this)),t.p(e)?(this.$s!=e&&this.$s.N(e),this):this.$s},t.g.l5=function(){this.rE(),this.va(1)},t.g.iH=function(e){var i=this.parent();return i?i[e&t.wo?"selected":"normal"]():null},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){Te.u.U.call(this,e,i),t.Iq(this,Tn,e,i),this.labels().ga(!!i,e.labels),this.Qa().ga(!!i,e),this.Qa().ga(!!i,e.normal),this.selected().ga(!!i,e.selected),this.hi().ga(!!i,e.rendering),this.uf().ga(!!i,e.edit),this.Ua().ga(!!i,e.tooltip)},t.g.F=function(){var e=Te.u.F.call(this);t.Tq(this,Tn,e,void 0,void 0,!0),e.labels=this.labels().F(),e.rendering=this.hi().F(),e.normal=this.Qa().F(),e.selected=this.selected().F(),e.edit=this.uf().F();var i=this.Ua().F();return t.Jc(i)||(e.tooltip=i),e},t.g.R=function(){t.kr(this.$s,this.l5,this),t.qd(this.$s),delete this.$s,this.Y&&(t.kr(this.Y,this.Tc,this),delete this.Y),this.Xb=null,t.sd(this.ca,this.Ea,this.Da,this.kI,this.Rf,this.Vi,this.gb),this.kI&&(this.kI.length=0),this.gb=this.Vi=this.Rf=this.Da=this.Ea=this.ca=null,Te.u.R.call(this)};var Dn=Te.prototype;Dn.rendering=Dn.hi,Dn.normal=Dn.Qa,Dn.selected=Dn.selected,Dn.labels=Dn.labels,Dn.edit=Dn.uf,Dn.tooltip=Dn.Ua,Dn.startMarker=Dn.BJ,Dn.endMarker=Dn.QG,t.H(ke,Te);var kn={};t.sq(kn,[[0,"markerType",t.Ok]]),t.U(ke,kn),t.g=ke.prototype,t.g.Ma=function(){return"baselines-milestones"},t.g.ws=function(){return this.Um().nc(8)},t.g.au=function(){return t.Ql(this.Um().nc(8))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma()])},t.g.Ei=function(e){return"baselines-milestones-preview"==this.Ma()?null:(this.fi||(this.fi=new $e(this.wf()),t.W(this,"preview",this.fi),this.fi.$c(),this.fi.parent(this)),t.p(e)?(this.fi.N(e),this):this.fi)},t.g.F=function(){var t=ke.u.F.call(this);return"baselines-milestones"==this.Ma()&&(t.preview=this.Ei().F()),t},t.g.U=function(t,e){ke.u.U.call(this,t,e),"baselines-milestones"==this.Ma()&&this.Ei().ga(!!e,t.preview)},t.g.R=function(){t.sd(this.fi),ke.u.R.call(this)},t.H($e,ke);var $n={};t.sq($n,[[0,"depth",t.xq],[0,"drawOnCollapsedOnly",t.Dq]]),t.U($e,$n),$e.prototype.Ma=function(){return"baselines-milestones-preview"},$e.prototype.qr=function(){return this.cj||(this.cj=[this.Ma()],this.cj.push.apply(this.cj,this.parent().qr())),this.cj},$e.prototype.U=function(e,i){$e.u.U.call(this,e,i),t.Iq(this,$n,e,i)},$e.prototype.F=function(){var e=$e.u.F.call(this);return t.Tq(this,$n,e,void 0,void 0,!0),e};var On=ke.prototype;On.preview=On.Ei,(On=$e.prototype).preview=void 0,t.H(Oe,Te);var Pn={};t.rq(Pn,0,"drawOverEnd",t.Dq),t.U(Oe,Pn),Oe.prototype.Ma=function(){return"progress"},Oe.prototype.ws=function(){return this.Um().nc(1)},Oe.prototype.au=function(){return t.bm},Oe.prototype.qr=function(){return this.cj||(this.cj=[this.Ma()])},t.H(Pe,Oe),Pe.prototype.Ma=function(){return"baseline-progress"},Pe.prototype.ws=function(){return"green"},Pe.prototype.qr=function(){return this.cj||(this.cj=[this.Ma(),"baselineProgress"])},t.H(Le,Te);var Ln={};t.rq(Ln,0,"above",t.Dq),t.rq(Ln,0,"disableWithRelatedTask",t.Dq),t.U(Le,Ln),t.g=Le.prototype,t.g.Ma=function(){return"baselines"},t.g.ws=function(){return t.Pl(this.Um().nc(1),.7)},t.g.au=function(){return t.Ql(t.Pl(this.Um().nc(1),.7))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma(),"baseline"])},t.g.eJ=function(e){var i=0;t.X(e,4096)&&(i|=4096),t.X(e,1)&&(i|=1),t.X(e,8192)&&(i|=8192),this.va(i)},t.g.Kd=function(e){if(!this.Fi){this.Fi=new Pe(this.wf()),t.W(this,"progress",this.Fi),this.Fi.$c();var i=this.wf().elements();this.Fi.parent(i),this.Fi.uf().parent(this.uf()),t.K(this.Fi,this.eJ,this)}return t.p(e)?(this.Fi.N(e),this):this.Fi},t.g.U=function(e,i){Le.u.U.call(this,e,i),t.Iq(this,Ln,e,i),this.Kd().ga(!!i,e.progress)},t.g.F=function(){var e=Le.u.F.call(this);return t.Tq(this,Ln,e,void 0,void 0,!0),e.progress=this.Kd().F(),e};var In=Le.prototype;In.progress=In.Kd,t.H(Ie,t.V),t.Gq(Ie,["fill","stroke"],"normal"),Ie.prototype.ra=8194,Ie.prototype.sa=t.V.prototype.sa;var An={};t.sq(An,[[1,"previewStroke",t.Pq]]),t.U(Ie,An),t.g=Ie.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.Ge=function(e,i,n,s,a,o,r){return n={sourceColor:"stroke"==s?this.sU(n):this.rU(n),fromItem:e,fromItemIndex:e.j("index"),toItem:i,toItemIndex:i.j("index"),connType:a||"finish-start"},t.p(o)&&(n.fromPeriod=e.get("periods")[o],n.fromPeriodIndex=o),t.p(r)&&(n.toPeriod=i.get("periods")[r],n.toPeriodIndex=r),n},t.g.aH=function(e,i,n,s,a,o,r){var l=(n===t.gm?this.Qa():this.selected()).g(s),h="stroke"==s?t.Zl:t.am;return t.D(l)?(e=this.Ge(e,i,n,s,a,o,r),l=h(l.call(e,e))):l=h(l),l},t.g.ws=function(){return"#545f69"},t.g.au=function(){return"#545f69"},t.g.kU=function(){return"#545f69"},t.g.lU=function(){return t.Wl(t.Pl(this.Um().nc(2)),2)},t.g.rU=function(e){return e==t.gm?this.ws():this.kU()},t.g.sU=function(e){return e==t.gm?this.au():this.lU()},t.g.Um=function(){return this.wf().Gb.cc()},t.g.Ma=function(){return"connectors"},t.g.wf=function(){return this.Zh},t.g.Tm=function(t,e,i,n,s,a){return this.aH(t,e,i,"fill",n,s,a)},t.g.gk=function(t,e,i,n,s,a){return this.aH(t,e,i,"stroke",n,s,a)},t.g.U=function(e,i){Ie.u.U.call(this,e,i),t.Iq(this,An,e,i),this.Qa().ga(!!i,e),this.Qa().ga(!!i,e.normal),this.selected().ga(!!i,e.selected)},t.g.F=function(){var e=Ie.u.F.call(this);return t.Tq(this,An,e,void 0,void 0,!0),e.normal=this.Qa().F(),e.selected=this.selected().F(),e},t.g.R=function(){t.sd(this.ca,this.Ea),Ie.u.R.call(this)};var En=Ie.prototype;En.normal=En.Qa,En.selected=En.selected,t.H(Ae,Te),t.g=Ae.prototype,t.g.Ma=function(){return"grouping-tasks"},t.g.ws=function(){return this.Um().nc(4)},t.g.au=function(){return t.Pl(this.Um().nc(4))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma()])},t.g.Kd=function(e){if(!this.Fi){this.Fi=new Oe(this.wf()),t.W(this,"progress",this.Fi),t.K(this.Fi,this.eJ,this);var i=this.wf().elements();this.Fi.parent(i),this.Fi.uf().parent(this.uf())}return t.p(e)?(this.Fi.N(e),this):this.Fi},t.g.eJ=function(e){var i=0;t.X(e,4096)&&(i|=4096),t.X(e,1)&&(i|=1),t.X(e,8192)&&(i|=8192),this.va(i)},t.g.F=function(){var t=Ae.u.F.call(this);return t.progress=this.Kd().F(),t},t.g.U=function(t,e){Ae.u.U.call(this,t,e),this.Kd().ga(!!e,t.progress)};var Gn=Ae.prototype;Gn.progress=Gn.Kd,t.H(Ee,Te);var Un={};t.sq(Un,[[0,"markerType",t.Ok]]),t.U(Ee,Un),t.g=Ee.prototype,t.g.Ma=function(){return"milestones"},t.g.ws=function(){return this.Um().nc(9)},t.g.au=function(){return t.Ql(this.Um().nc(9))},t.g.qr=function(){return this.cj||(this.cj=[this.Ma(),"milestone","actual"])},t.g.Ei=function(e){return"milestones-preview"==this.Ma()?null:(this.fi||(this.fi=new Ge(this.wf()),t.W(this,"preview",this.fi),this.fi.$c(),this.fi.parent(this)),t.p(e)?(this.fi.N(e),this):this.fi)},t.g.F=function(){var t=Ee.u.F.call(this);return"milestones"==this.Ma()&&(t.preview=this.Ei().F()),t},t.g.U=function(t,e){Ee.u.U.call(this,t,e),"milestones"==this.Ma()&&this.Ei().ga(!!e,t.preview)},t.g.R=function(){t.sd(this.fi),Ee.u.R.call(this)},t.H(Ge,Ee);var Fn={};t.sq(Fn,[[0,"depth",t.xq],[0,"drawOnCollapsedOnly",t.Dq]]),t.U(Ge,Fn),Ge.prototype.Ma=function(){return"milestones-preview"},Ge.prototype.qr=function(){return this.cj||(this.cj=[this.Ma()],this.cj.push.apply(this.cj,this.parent().qr())),this.cj},Ge.prototype.U=function(e,i){Ge.u.U.call(this,e,i),t.Iq(this,Fn,e,i)},Ge.prototype.F=function(){var e=Ge.u.F.call(this);return t.Tq(this,Fn,e,void 0,void 0,!0),e};var Mn=Ee.prototype;Mn.preview=Mn.Ei,(Mn=Ge.prototype).preview=void 0,t.H(Ue,Te),Ue.prototype.Ma=function(){return"periods"},Ue.prototype.ws=function(){return this.Um().nc(0)},Ue.prototype.au=function(){return t.Pl(this.Um().nc(0))},Ue.prototype.qd=function(t,e){var i=De(this,t,e);return i&&null!=(i=i.height)?i:Ue.u.qd.call(this,t,e)},t.H(Fe,Te),t.g=Fe.prototype,t.g.Ma=function(){return"tasks"},t.g.ws=function(){return this.Um().nc(0)},t.g.au=function(){return t.Pl(this.Um().nc(0))},t.g.eJ=function(e){var i=0;t.X(e,4096)&&(i|=4096),t.X(e,1)&&(i|=1),t.X(e,8192)&&(i|=8192),this.va(i)},t.g.qr=function(){return this.cj||(this.cj=[this.Ma(),"actual"])},t.g.Kd=function(e){if(!this.Fi){this.Fi=new Oe(this.wf()),t.W(this,"progress",this.Fi),this.Fi.$c();var i=this.wf().elements();this.Fi.parent(i),this.Fi.uf().parent(this.uf()),t.K(this.Fi,this.eJ,this)}return t.p(e)?(this.Fi.N(e),this):this.Fi},t.g.F=function(){var t=Fe.u.F.call(this);return t.progress=this.Kd().F(),t},t.g.U=function(t,e){Fe.u.U.call(this,t,e),this.Kd().ga(!!e,t.progress)};var _n=Fe.prototype;_n.progress=_n.Kd,t.H(Me,t.Y),Me.prototype.sa=976|t.Y.prototype.sa,Me.prototype.ra=t.Y.prototype.ra;var Nn={};t.sq(Nn,[[0,"enabled",t.Zq],t.Z.Yn,t.Z.hK]),t.U(Me,Nn),t.Gq(Me,Yi,"labels"),t.Gq(Me,["fill"],"background"),t.g=Me.prototype,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.df(),this.Ia.parent(this.Yk.background()),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(256,1)},t.g.Qf=function(t){var e=this.Bb;return e.left==t.left&&e.top==t.top&&e.width==t.width&&e.height==t.height||(this.Bb=t,this.B(4)),this},t.g.m_=function(e){if(t.p(e)&&this.i!=e){if(this.i=e,_e(this),this.b){e=this.b;var i=this.i;t.p(i)&&e.b!=i&&(e.b=i,e.reset(),t.dz(e),e.va(t.KE|t.LE))}return this.B(576,1),this}return this.i},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,this.Da.Ga("ganttDefaultSimpleLabelsSettings","defaultLevelsLabelsSettings"),this.Da.parent(this.Yk.labels()),t.K(this.Da,this.de,this)),t.p(e)?(this.Da.N(e),this.B(64,1),this):this.Da},t.g.de=function(e){var i=!1;this.b||(_e(this),i=!!this.b),i&&(this.b.va(t.KE|t.LE),this.b.Kn(e)),this.B(64,1)},t.g.Am=function(e,i){var n=e.start,s=e.end,a=t.us(n,i),o=t.us(s,i),r=a,l=this.qa.KT();return a=this.qa.JT(),1<l&&("year"===this.Dg||"semester"===this.Dg||"quarter"===this.Dg?(1<l?(r=new Date(n),a=Date.UTC(r.getUTCFullYear()+(a||0),r.getUTCMonth()-(l-1),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())):a=n,r=t.us(a,i)):-1==i.indexOf("y")&&-1==i.indexOf("Q")||(l=new t.On(new Date(n)).getMonth()+1<l?-1:0,a=t.Vo("year",a+l),(l=new t.On(new Date(n))).add(a),a=l.getTime(),r=t.us(a,i))),t.ov(new t.Fw({value:{value:r,type:"string"},tickValue:{value:n,type:"number"},scale:{value:this.qa,type:""},end:{value:s,type:"number"},endValue:{value:o,type:"string"},unit:{value:this.Dg,type:"string"},count:{value:this.count,type:"number"}}))},t.g.mN=function(){this.Oa||(this.Oa=t.ok(),this.background().O(this.Oa),this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl),this.Lf.zIndex(1),this.Lf.parent(this.Oa),this.f=this.Oa.path(),this.f.zIndex(2))},t.g.W=function(){if(this.zc()){var e;if(this.mN(),this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.J(4)&&(this.B(896),this.I(4)),this.J(256)){var i=this.background();i.ka(),i.ja(this.Bb),i.W(),i.da(!1),this.I(256)}if(this.J(512)){if(null!=this.i)this.D=t.A(this.i)?this.i:[this.i];else{t:{i=this.Yk.f;for(var n=this.Ad;n<i.length;n++)if(e=i[n+1]){i=e;break t}i=null}if(i){var s=i.Dg;s!=this.Dg&&(s=t.vp(s,-1))}this.D=t.ts(t.rs(this.Dg,s,"timeline"))}this.o=this.D[0]||this.o,this.B(128),this.I(512)}if(this.J(128)){this.mb=this.qa.Fn(window.NaN,window.NaN,this.Dg,this.count),i=this.mb[0],s=this.Bb.left+this.qa.transform(i.start)*this.Bb.width,i=this.Bb.left+this.qa.transform(i.end)*this.Bb.width,i=Math.ceil(this.labels().padding().Ng(i-s)),n=this.b||this.Yk.b,t.ez(n),e=!1;var a=window.Infinity,o=this.o;for(s=0;s<this.D.length;s++){var r=this.D[s],l=n.pA;if(r in l){if((l=Math.ceil(l[r].width))<=i){this.o=r,e=!0;break}l<=a&&(a=l,o=r)}}e||(this.o=o),this.B(80),this.I(128)}if(this.J(64)){for(s=0;s<this.mb.length;s++)i=this.mb[s],n=this.ye[s]||(this.ye[s]=new t.Ix),e=this.Am(i,this.o),e=this.labels().tk(e),n.text(e),n.style(this.labels().flatten()),n.Ij(),t.Px(n,this.xl),e=Math.max(0,this.qa.transform(i.start)),e=this.Bb.left+e*this.Bb.width,e+=this.labels().padding().g("left"),i=this.Bb.left+this.qa.transform(i.end)*this.Bb.width,a=this.labels().padding().g("right"),i=Math.max(0,i-e-a),t.Wx(n,new t.I(e,this.Bb.top,i,this.Bb.height),this.O().Ja());for(i=this.ye.length;s<i;s++)n=this.ye[s],t.Px(n,null),t.Rx(n);this.I(64)}if(this.J(16)){for(this.f.clear(),s=this.g("stroke")||this.Yk.g("stroke"),n=t.dp(s),a=t.R(this.Bb.top,n),this.f.stroke(s).moveTo(this.Bb.left,a).lineTo(this.Bb.left+this.Bb.width,a),s=0;s<this.mb.length;s++)i=this.mb[s],e=this.Bb.left+this.qa.transform(i.start)*this.Bb.width,e=t.R(e,n),this.f.moveTo(e,a).lineTo(e,this.Bb.top+this.Bb.height);this.I(16)}}},t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.F=function(){var e=Me.u.F.call(this);t.Tq(this,Nn,e),t.Jc(this.background().Pa)||(e.background=this.background().F());var i=this.labels().F();return t.Jc(i)||(e.labels=i),this.i&&(e.formats=this.i),e},t.g.U=function(e,i){Me.u.U.call(this,e,i),t.Iq(this,Nn,e,i),this.labels().ka();for(var n=0;n<Yi.length;n++){var s=Yi[n];s in e&&this.labels()[s](e[s])}this.Da.da(!0),this.background().ga(!!i,e.background),this.Da.ga(!!i,e.labels),"formats"in e&&this.m_(e.formats)},t.g.R=function(){t.sd(this.f,this.Ia),this.b&&t.qd(this.b),this.b=this.qa=this.Yk=this.Ia=this.f=null;for(var e=0;e<this.ye.length;e++)this.ye[e].ld();Me.u.R.call(this)};var Rn=Me.prototype;Rn.labels=Rn.labels,Rn.background=Rn.background,Rn.formats=Rn.m_,t.H(Ne,t.Y),Ne.prototype.sa=528|t.Y.prototype.sa,Ne.prototype.ra=t.Y.prototype.ra;var jn={};t.sq(jn,[[1,"stroke",t.Pq],[0,"levelHeight",t.br]]),t.U(Ne,jn),t.Gq(Ne,Yi,"labels"),t.Gq(Ne,["fill"],"background"),t.g=Ne.prototype,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.Wj(!0),this.Ia.Ga("defaultGanttHeader.background"),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(16,1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,this.Da.Ga("ganttDefaultSimpleLabelsSettings","defaultLevelsLabelsSettings"),this.Da.Wj(!0),t.K(this.Da,this.de,this)),t.p(e)?(this.Da.N(e),this.B(512,1),this):this.Da},t.g.de=function(){this.B(512,1)},t.g.level=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.f[n];return a||(this.f[n]=a=new Me(this,n),a.labels().parent(this.labels()),t.K(a,this.sha,this),a.Ga("defaultLevelSettings")),t.p(s)?(a.N(s),this):a},t.g.sha=function(e){var i=0,n=0;t.X(e,32776)&&(this.P=null,i|=512,n|=1),t.X(e,1)&&(i|=512,n|=1),this.B(i,n)},t.g.MX=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=this.f[e]||this.level(e);n.Dg==i.unit&&n.count==i.count||(n.Dg=i.unit,n.count=i.count,n.B(512)),n.B(128)}this.B(512,1)},t.g.rha=function(){this.P=null},t.g.Qf=function(t){var e=this.Bb;return e.left==t.left&&e.top==t.top&&e.width==t.width&&e.height==t.height||(this.Bb=t,this.B(4,9)),this},t.g.ob=function(){return this.Bb},t.g.HA=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.Kv=function(){this.i||(this.i=t.ok(),this.gg=t.tk(),this.i.clip(this.gg),this.o=this.i.Bd())},t.g.W=function(){if(this.zc()){var e,i;this.Kv(),this.J(2)&&(this.i.parent(this.O()),this.I(2)),this.J(8)&&(this.i.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(t.ez(this.b),this.gg.shape(this.Bb),this.P=null,this.B(512),this.I(4));var n=!1;if(this.J(512)){if(n=!0,null==this.P){var s=0,a=0;for(this.G=[],e=0;e<this.f.length;e++)(i=this.f[e])&&i.enabled()&&(null!=(i=i.g("height")||this.g("levelHeight"))?(i=t.L(i,this.Bb.height),this.G[e]=i,s+=i):(this.G[e]=null,a++));this.P=a?Math.max(0,(this.Bb.height-s)/a):0}for(s=this.Bb.top+this.Bb.height,e=0;e<this.f.length;e++)if(i=this.f[e])if(i.enabled()){i.ka(),i.O(this.o),a=null!=(a=this.G[e])?a:this.P;var o=new t.I(this.Bb.left,s-a,this.Bb.width,a);t.Xo(o,0),i.Qf(o),i.da(!1),s-=a}else i.remove();this.I(512)}if(this.J(16)){for(n=!0,e=0;e<this.f.length;e++)(i=this.f[e])&&i.B(272);this.I(16)}if(n)for(e=0;e<this.f.length;e++)(i=this.f[e])&&i.W()}},t.g.F=function(){var e=Ne.u.F.call(this);t.Tq(this,jn,e),e.levels=[];for(var i=0;i<this.f.length;i++){var n=this.f[i];n&&e.levels.push(n.F())}return e.labels=this.labels().F(),e.background=this.background().F(),e},t.g.U=function(e,i){Ne.u.U.call(this,e,i),t.Iq(this,jn,e,i),this.background().ga(!!i,e.background),this.labels().ga(!!i,e.labels);var n=e.levels;if(t.A(n))for(var s=0;s<n.length;s++)this.level(s,n[s])},t.g.R=function(){this.aa=null,t.sd(this.f,this.b,this.D,this.K),this.f.length=0,this.b=this.K=this.D=null,Ne.u.R.call(this)};var Bn=Ne.prototype;Bn.background=Bn.background,Bn.level=Bn.level,Bn.labels=Bn.labels,Bn.getPixelBounds=Bn.ob,t.H(Re,ot),Re.prototype.ra=ot.prototype.ra,Re.prototype.sa=14848|ot.prototype.sa;var Hn={millisecond:0,second:1,minute:2,hour:3,day:4,week:5,"third-of-month":6,month:7,quarter:8,semester:9,year:10},zn={};t.sq(zn,[[0,"cropLabels",t.Dq],[0,"zoomOnMouseWheel",t.Dq],[1,"columnStroke",t.Pq],[1,"workingFill",t.Qq],[1,"notWorkingFill",t.Qq],[1,"holidaysFill",t.Qq],[1,"weekendsFill",t.Qq],[0,"connectBy",t.zq],[0,"allowConnectorCaps",t.Dq]]),t.U(Re,zn),t.g=Re.prototype,t.g.elements=function(e){return this.dy||(this.dy=new Te(this),t.W(this,"elements",this.dy),this.dy.$c(),t.K(this.dy,this.Vu,this)),t.p(e)?(this.dy.N(e),this):this.dy},t.g.Gr=function(e){return this.Nw||(this.Nw=new Ue(this),t.W(this,"periods",this.Nw),this.Nw.$c(),this.Nw.parent(this.elements()),t.K(this.Nw,this.Vu,this)),t.p(e)?(this.Nw.N(e),this):this.Nw},t.g.Nc=function(e){return this.Kk||(this.Kk=new Fe(this),t.W(this,"tasks",this.Kk),this.Kk.$c(),this.Kk.parent(this.elements()),t.K(this.Kk,this.Vu,this)),t.p(e)?(this.Kk.N(e),this):this.Kk},t.g.Wc=function(e){return this.hk||(this.hk=new Ee(this),t.W(this,"milestones",this.hk),this.hk.$c(),this.hk.parent(this.elements()),t.K(this.hk,this.Vu,this),t.K(this.hk.Ei(),this.Vu,this)),t.p(e)?(this.hk.N(e),this):this.hk},t.g.Sp=function(e){return this.Bt||(this.Bt=new ke(this),t.W(this,"baselineMilestones",this.Bt),this.Bt.$c(),this.Bt.parent(this.elements()),t.K(this.Bt,this.Vu,this),t.K(this.Bt.Ei(),this.Vu,this)),t.p(e)?(this.Bt.N(e),this):this.Bt},t.g.np=function(e){return this.fw||(this.fw=new Ae(this),t.W(this,"groupingTasks",this.fw),this.fw.$c(),this.fw.parent(this.elements()),t.K(this.fw,this.Vu,this)),t.p(e)?(this.fw.N(e),this):this.fw},t.g.Ml=function(e){return this.ov||(this.ov=new Le(this),t.W(this,"baselines",this.ov),this.ov.$c(),this.ov.parent(this.elements()),t.K(this.ov,this.Vu,this)),t.p(e)?(this.ov.N(e),this):this.ov},t.g.nj=function(e){return this.Kj||(this.Kj=new Ie(this),t.W(this,"connectors",this.Kj),this.Kj.$c(),t.K(this.Kj,this.Vu,this)),t.p(e)?(this.Kj.N(e),this):this.Kj},t.g.io=function(e,i,n,s){var a,o=e.get("id"),r=i.Ma(),l=i.kI||(i.kI=[i.labels(),i.wf().elements().labels(),i.wf().labels()]);(i=De(i,e,s))&&(a=i.label),i=this.controller.km()+n.top-this.uk()-this.fa.top;var h=this.controller.Cg();return n={$H:!0,id:o,type:r,item:e,labels:l,Ta:n,PV:a,Af:i=A(this.controller,(this.controller.b[h-1]||0)+i)},t.p(s)&&(n.Fq=s,e=e.get("periods"),n.ub=e[s]),n},t.g.Vu=function(e){if(!t.X(e,2)){var i=0;t.X(e,4096)&&(i|=2048),t.X(e,1)&&(i|=64),t.X(e,8192)&&(i|=128),this.B(i,1)}},t.g.scale=function(e){return t.p(e)?(this.qa.N(e),this):this.qa},t.g.ii=function(e){var i=0;t.X(e,4)&&(i|=4608),t.X(e,2)&&(i|=8192),this.B(i,1)},t.g.$v=function(){return this.qa},t.g.GA=function(e){return this.Yk||(this.Yk=new Ne(this),this.Yk.zIndex(80),t.K(this.Yk,this.T2,this),this.Yk.b.va(t.KE|t.LE)),t.p(e)?(this.Yk.N(e),this):this.Yk},t.g.T2=function(e){t.X(e,1)&&this.B(512,1)},t.g.IL=function(e){return t.p(e)?(this.RS=e,this):this.RS||{}},t.g.JL=function(e){return t.p(e)?(this.TS=e,this):this.TS||{}},t.g.NL=function(e){return t.p(e)?(this.VS=e,this):this.VS||{}},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.WA[n];return a||((a=new re(this.qa)).Ga(this.oa.defaultLineMarkerSettings),a.kb(this),this.WA[n]=a,t.K(a,this.Ry,this),this.B(4096,1)),t.p(s)?(a.N(s),this):a},t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.pB[n];return a||((a=new le(this.qa)).Ga(this.oa.defaultRangeMarkerSettings),a.kb(this),this.pB[n]=a,t.K(a,this.Ry,this),this.B(4096,1)),t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.OB[n];return a||((a=new he(this.qa)).Ga(this.oa.defaultTextMarkerSettings),a.kb(this),this.OB[n]=a,t.K(a,this.Ry,this),this.B(4096,1)),t.p(s)?(a.N(s),this):a},t.g.Ry=function(){this.B(4096,1)},t.g.labels=function(e){if(this.rh||(this.rh=new t.Pu,this.rh.kb(this),t.K(this.rh,this.de,this),t.W(this,"labels",this.rh)),t.p(e)){var i=!0;return t.J(e,t.Pu)?this.rh.N(e.F()):t.C(e)?this.rh.N(e):t.cp(e)?this.rh.enabled(!1):i=!1,i&&this.B(64,1),this}return this.rh},t.g.Db=function(e){if(this.su||(this.su=new t.dy,this.su.Ga("defaultTimeline.markers"),this.su.kb(this)),t.p(e)){var i=!0;return t.J(e,t.dy)?this.su.N(e.F()):t.C(e)?this.su.N(e):t.cp(e)?this.su.enabled(!1):i=!1,i&&this.B(64,1),this}return this.su},t.g.Rea=function(t){this.Ot=new ce(Ye(this)),this.Ot.wa("start",this.m1,!1,this),this.Ot.wa("drag",this.n1,!1,this),this.Ot.wa("end",this.o1,!1,this),this.Ot.lk(t.kf)},t.g.Sea=function(t){this.Pt=new ue(Ke(this)),this.Pt.wa("start",this.r1,!1,this),this.Pt.wa("drag",this.s1,!1,this),this.Pt.wa("end",this.p1,!1,this),this.Pt.lk(t.kf)},t.g.Iea=function(t){this.NG=new de(Xe(this)),this.NG.wa("start",this.Jea,!1,this),this.NG.wa("drag",this.Kea,!1,this),this.NG.wa("end",this.Hea,!1,this),this.NG.lk(t.kf)},t.g.Qea=function(t){this.Nt=new ge(Je(this),!0),this.Nt.wa("start",this.l1,!1,this),this.Nt.wa("drag",this.kM,!1,this),this.Nt.wa("end",this.jM,!1,this),this.Nt.lk(t.kf)},t.g.Tea=function(t){this.Qt=new ge(Ze(this),!1),this.Qt.wa("start",this.t1,!1,this),this.Qt.wa("drag",this.kM,!1,this),this.Qt.wa("end",this.jM,!1,this),this.Qt.lk(t.kf)},t.g.Uea=function(t){this.Rt=new pe(this,Qe(this),!0),this.Rt.wa("start",this.hM,!1,this),this.Rt.wa("drag",this.iM,!1,this),this.Rt.wa("end",this.gM,!1,this),this.Rt.lk(t.kf)},t.g.Lea=function(t){this.Mt=new pe(this,ti(this),!1),this.Mt.wa("start",this.hM,!1,this),this.Mt.wa("drag",this.iM,!1,this),this.Mt.wa("end",this.gM,!1,this),this.Mt.lk(t.kf)},t.g.m1=function(){this.Vg&&this.Vg.Dj(!1),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),this.Gb.ro(),Ke(this).clear(),Xe(this).clear(),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),t.uf(t.Lp.body,"cursor","ew-resize"),mt(this,!0)},t.g.n1=function(){this.vi=!0,this.Cm=!1,this.zo=this.gT=!0},t.g.o1=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0);var i=Ye(this).rb();ii(this);var n=e.target.element;e=n.tag.item;var s=this.controller.data();if(s.ka(),i=t.Gt(this.qa,"milestones"==n.tag.type||"milestones-preview"==n.tag.type?(i.left+i.width/2-this.fa.left)/this.fa.width:(i.left-this.fa.left)/this.fa.width),!(0,window.isNaN)(i))switch(n.tag.type){case"milestones":case"milestones-preview":if(this.controller.i){n=n.tag.Fq;var a=e.no("periods",n,"start");a=t.p(a)?"start":"end",e.set("periods",n,a,i),e.Jk("periods",n,a,i)}else e.set("actualStart",i),e.j("actualStart",i),t.p(e.get("actualEnd"))&&(e.set("actualEnd",i),e.j("actualEnd",i));break;case"periods":n=n.tag.Fq,a=e.no("periods",n,"start"),a=e.no("periods",n,"end")+(i-a),(0,window.isNaN)(a)||(e.set("periods",n,"start",i),e.Jk("periods",n,"start",i),e.set("periods",n,"end",a),e.Jk("periods",n,"end",a));break;case"baselines":n=e.j("baselineStart"),a=e.j("baselineEnd"),n=i-n,(0,window.isNaN)(a+n)||(e.set("baselineStart",i),e.j("baselineStart",i)),e.set("baselineEnd",a+n),e.j("baselineEnd",a+n);break;default:n=(a=(n=dt(e)).end)+(n=i-n.start),(0,window.isNaN)(n)||(e.set("actualStart",i),e.j("actualStart",i),e.set("actualEnd",n),e.j("actualEnd",n))}s.da(!0),Gi(this),this.gT=this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null}t.uf(t.Lp.body,"cursor",""),mt(this,!1)},t.g.r1=function(){this.Vg&&this.Vg.Dj(!1),this.GG=!0,this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),Ye(this).clear(),Xe(this).clear()},t.g.s1=function(){this.vi=!0,this.Cm=!1,this.zo=!0},t.g.p1=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0),ii(this);var i=(e=e.target).element.tag.item;(0,window.isNaN)(e.Kd)||i.set("progressValue",t.Tm(e.Kd,2)),this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null,this.GG=!1}},t.g.Jea=function(){this.Vg&&this.Vg.Dj(!1),this.GG=!0;var t=this.Ua();this.ot=t.enabled(),t.Lc(),t.enabled(!1),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),Ye(this).clear(),Ke(this).clear()},t.g.Kea=function(){this.vi=!0,this.Cm=!1,this.zo=!0},t.g.Hea=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0),ii(this);var i=(e=e.target).element.tag.item;(0,window.isNaN)(e.Kd)||i.set("baselineProgressValue",t.Tm(e.Kd,2)),this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null,this.GG=!1}},t.g.t1=function(){this.Vg&&this.Vg.Dj(!1),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),Ke(this).clear(),Xe(this).clear(),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),t.uf(t.Lp.body,"cursor","col-resize"),this.iq.cursor("col-resize"),mt(this,!0)},t.g.l1=function(){this.Vg&&this.Vg.Dj(!1),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),Ke(this).clear(),Xe(this).clear(),Je(this).clear(),Ze(this).clear(),Qe(this).clear(),ti(this).clear(),t.uf(t.Lp.body,"cursor","col-resize"),this.iq.cursor("col-resize"),mt(this,!0)},t.g.kM=function(t){this.vi=!0,this.Cm=!1,this.Wx=t.target,this.zo=!0,si(this,t)},t.g.jM=function(e){if(this.vi){this.Vg&&this.Vg.Dj(!0);var i=this.iq.rb();this.os.push(this.iq),ii(this);var n=(e=e.target.element).tag.item,s=e.tag.Fq,a=this.controller.data();a.ka();var o=(i.left+i.width-this.fa.left)/this.fa.width;if(i=t.Gt(this.qa,(i.left-this.fa.left)/this.fa.width),o=t.Gt(this.qa,o),!(0,window.isNaN)(i)&&!(0,window.isNaN)(o))switch(e.tag.type){case"periods":n.set("periods",s,"start",i),n.Jk("periods",s,"start",i),n.set("periods",s,"end",o),n.Jk("periods",s,"end",o);break;case"baselines":n.set("baselineStart",i),n.j("baselineStart",i),n.set("baselineEnd",o),n.j("baselineEnd",o);break;default:n.set("actualStart",i),n.j("actualStart",i),n.set("actualEnd",o),n.j("actualEnd",o)}a.da(!0),Gi(this),this.Wx=null,this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null}t.uf(t.Lp.body,"cursor",""),this.iq.cursor("ew-resize"),mt(this,!1)},t.g.hM=function(t){this.Vg&&this.Vg.Dj(!1),this.Gb.ro(),this.ap=t.target,ii(this),this.ot=this.Ua().enabled(),this.Ua().Lc(),this.Ua().enabled(!1),mt(this,!0)},t.g.iM=function(t){this.Yx=this.vi=!0,this.Cm=this.ET=!1,this.ap.b=t.clientX,this.ap.i=t.clientY,this.zo=!0},t.g.gM=function(){this.vi&&(this.Vg&&this.Vg.Dj(!0),this.Ua().enabled(this.ot),this.ot=void 0,ei(this).clear(),this.Yx=this.vi=!1,this.ET=!0,(0,window.clearInterval)(this.Vn),this.Vn=null),mt(this,!1)},t.g.OZ=function(e,i){if(this.vi){if(this.Yx)if(e&&this.ap){var n=e.originalEvent.domTarget;if(n&&n.tag&&n.tag.$H){var s=(n=n.tag).item;if("baselines"!=n.type&&"connectors"!=n.type&&"milestones-preview"!=n.type){var a=this.ap.element.tag,o=a.item,r=a.index,l=e.period,h=e.periodIndex;l?(a={item:o,period:a.ub,index:r,periodIndex:a.Fq},s={item:s,period:l,index:e.hoveredIndex+this.controller.Cg(),periodIndex:h}):(a={item:o,index:r},s={item:s,index:e.hoveredIndex+this.controller.Cg()}),n=.5>((l=i.clientX-t.Zj(this.O().Ja()).x)-(n=n.Ta).left)/n.width,n=this.ap.My?n?"start-start":"start-finish":n?"finish-start":"finish-finish",ei(this).clear(),Pi(this,a,s,n,void 0,ei(this))}else ai(this,i)}else ai(this,i)}else ai(this,i)}else if(e&&e.originalEvent){if((a=(a=e.originalEvent).domTarget)&&a.tag&&a.tag.$H){if(o=(h=(l=a.tag).item).get("id"),t.p(this.KN)||(this.KN=o),s=e.periodIndex,t.p(s)&&(0,window.isNaN)(this.LN)&&(this.LN=s),this.KN!=o&&this.LN!=s&&(ii(this,!0),this.KN=o,t.p(s)&&(this.LN=s)),l.Ta){if("baseline-progress"!=l.type){var c=l.type;o=l.Ta;var u=l.item;ii(this,!0),(r=li(this,c).uf()).g("enabled")&&(c=Be(u,null,c,o,s),(u=Ye(this)).tag=c,u.fill(r.g("fill")).stroke(r.g("stroke")).clear().moveTo(o.left,o.top).lineTo(o.left+o.width,o.top).lineTo(o.left+o.width,o.top+o.height).lineTo(o.left,o.top+o.height).close(),this.os.push(u))}if(h)if("tasks"==l.type||"grouping-tasks"==l.type||"progress"==l.type){if(c=l.Ta,u=l.item,(o=li(this,l.type).Kd().uf()).g("enabled")){var d=Be(u,null,"progress",c,void 0);(r=Ke(this)).tag=d,u=t.p(u.j("progressValue"))?u.j("progressValue"):u.j("autoProgress"),u=c.left+(u||0)*c.width,c=c.top+c.height,r.fill(o.g("fill")).stroke(o.g("stroke")).clear().moveTo(u,c-5).lineTo(u+5,c).lineTo(u+5,c+5).lineTo(u-5,c+5).lineTo(u-5,c).close(),this.os.push(r)}}else"baselines"!=l.type&&"baseline-progress"!=l.type||(c=l.Ta,u=l.item,(o=li(this,l.type).Kd().uf()).g("enabled")&&(d=Be(u,null,"baseline-progress",c,void 0),(r=Xe(this)).tag=d,u=u.get("baselineProgressValue")||0,u=t.Ao(u),u=c.left+u*c.width,c=c.top+c.height,r.fill(o.g("fill")).stroke(o.g("stroke")).clear().moveTo(u,c-5).lineTo(u+5,c).lineTo(u+5,c+5).lineTo(u-5,c+5).lineTo(u-5,c).close(),this.os.push(r)));else Ke(this).clear(),Xe(this).clear();if(h&&"milestones"!=l.type&&"milestones-preview"!=l.type){c=l.type,o=l.Ta,u=l.item,r=li(this,c).uf(),c=Be(u,null,c,o,s),u=r.start().Pu(),d=r.end().Pu();var p=o.left+o.width;if(r.g("enabled")&&u.g("enabled")){var g=Je(this);g.tag=c;var f=u.g("size");g.fill(u.g("fill")).stroke(u.g("stroke")).clear().moveTo(o.left-1,o.top).lineTo(o.left-1+f,o.top).lineTo(o.left-1+f,o.top+o.height).lineTo(o.left-1,o.top+o.height).close(),this.os.push(g)}r.g("enabled")&&d.g("enabled")&&((g=Ze(this)).tag=c,f=d.g("size"),g.fill(d.g("fill")).stroke(d.g("stroke")).clear().moveTo(p+1,o.top).lineTo(p+1-f,o.top).lineTo(p+1-f,o.top+o.height).lineTo(p+1,o.top+o.height).close(),this.os.push(g))}else Je(this).clear(),Ze(this).clear();h&&"baselines"!=l.type&&"milestones-preview"!=l.type?(o=e.hoveredIndex+this.controller.Cg(),r=l.type,h=l.Ta,c=l.item,l=li(this,r).uf(),s=Be(c,o,r,h,s),o=h.left+h.width,r=l.start().Et(),c=l.end().Et(),f=h.top+h.height/2,l.g("enabled")&&r.g("enabled")&&((u=Qe(this)).tag=s,u.fill(r.g("fill")).stroke(r.g("stroke")),g=t.zp(r.g("type")),d=r.g("size")/2,g.call(null,u,h.left-d+r.g("horizontalOffset"),f+r.g("verticalOffset"),d),this.os.push(u)),l.g("enabled")&&c.g("enabled")&&((u=ti(this)).tag=s,u.fill(c.g("fill")).stroke(c.g("stroke")),g=t.zp(c.g("type")),d=c.g("size")/2,g.call(null,u,o+d+c.g("horizontalOffset"),f+c.g("verticalOffset"),d),this.os.push(u))):(ti(this).clear(),Qe(this).clear())}}else!a||a.tag&&a.tag.dha||ii(this,!0);if(s=ri(this,e))this.Gb.dispatchEvent(s),this.JH=a.j;else if(this.JH){if(e&&e.originalEvent){for(n in a={type:"connectormouseout",actualTarget:e.originalEvent.target,target:this,originalEvent:e.originalEvent},this.JH)a[n]=this.JH[n];s=a}else s=null;this.Gb.dispatchEvent(s),this.JH=null}}else ii(this,!1)},t.g.iJ=function(t){this.vW(t)},t.g.TO=function(){this.Ua().enabled(this.ot),this.ot=void 0},t.g.vW=function(t){this.elements().uf().g("enabled")&&(this.oj=t.item)},t.g.NZ=function(t){t&&(t=ri(this,t))&&this.Gb.dispatchEvent(t)},t.g.PZ=function(e){if(this.ET&&(this.ET=!1,e)){var i=e.item,n=e.periodIndex,s=e.originalEvent,a=s.domTarget;if((a=a?a.tag:void 0)&&a.$H&&"baselines"!=a.type&&"milestones-preview"!=a.type){s=s.clientX-t.Zj(this.O().Ja()).x,a=a.Ta;var o=this.ap.My?this.Hv:this.Ev;if(a=.5>(s-a.left)/a.width,s=o.tag.item,a=this.ap.My?a?"start-start":"start-finish":a?"finish-start":"finish-finish",o=o.tag.Fq,a=a||"finish-start",t.J(s,t.du)||t.J(s,t.$t)||(s=(s=this.controller.data().Eo("id",s)).length?s[0]:null),s&&(t.J(i,t.du)||t.J(i,t.$t)||(i=(i=this.controller.data().Eo("id",i)).length?i[0]:null),i)){this.controller.data().ka();var r=!1;if(this.controller.i){var l=s.get("periods")[o],h=i.get("periods")[n];if(t.p(l)&&t.p(h)){var c=l.connector,u={};if(u.connectTo=h.id,u.connectorType=a,c)if(t.A(c))c=c.length;else{r=t.Qc(c);var d={};d.connectTo=l.connectTo,d.connectorType=l.connectorType||"finish-start",t.Sc(d,r),c=1,r=!0}else c=l.connectTo,t.p(c)?((d={}).connectTo=c,d.connectorType=l.connectorType||"finish-start",c=1,r=!0):c=0;n={type:"beforeCreateConnector",target:i,source:s,connectorType:a,targetPeriod:h,targetPeriodIndex:n,sourcePeriod:l,sourcePeriodIndex:o},this.Gb.dispatchEvent(n)&&(r&&s.set("periods",o,"connector",[d]),s.set("periods",o,"connector",c,u))}}else c=s.get("connector"),(u={}).connectTo=i.get("id"),u.connectorType=a,c?t.A(c)?c=c.length:(r=t.Qc(c),(d={}).connectTo=s.get("connectTo"),d.connectorType=s.get("connectorType")||"finish-start",t.Sc(d,r),c=1,r=!0):(c=s.get("connectTo"),t.p(c)?((d={}).connectTo=c,d.connectorType=s.get("connectorType")||"finish-start",c=1,r=!0):c=0),n={type:"beforeCreateConnector",target:i,source:s,connectorType:a},this.Gb.dispatchEvent(n)&&(r&&s.set("connector",[d]),s.set("connector",c,u));this.controller.data().da(!0)}}}(e=ri(this,e))?this.Gb.dispatchEvent(e):ei(this).clear(),this.Yx=!1,this.ap=null,this.Cm=!0},t.g.wW=function(t){if(this.vi&&!this.GG&&(this.Fu||this.bx)){var e=0,i=0;this.Fu&&(e=0<this.Fu?30:-30),(this.Yx||this.oj)&&this.bx&&(i=0<this.bx?30:-30),this.scroll(e,i,!0)&&(si(this,t,this.Fu),ai(this,t,this.Fu,this.bx))}},t.g.Ua=function(e){return t.p(e)?(this.elements().Ua(e),this):this.elements().Ua()},t.g.OM=function(t,e,i){return e?ci(this,e,i):this.Ua()},t.g.SO=function(t){if(!ui(this,t)&&(t=t.item)&&ct(t)){var e=!t.j("collapsed");this.Gb.dispatchEvent({type:"rowcollapseexpand",item:t,collapsed:e})&&t.j("collapsed",e)}},t.g.UO=function(e){di(this,e)||(pi(this,e),gi(this,e.item,e.periodIndex)&&((e=t.Qc(e)).type="rowSelect",this.Gb.dispatchEvent(e)))},t.g.rl=function(e){var i=Re.u.rl.call(this,e),n=i&&i.originalEvent?i.originalEvent.domTarget:null;if(i&&n){var s=this.ob();s=Math.abs(s.left-e.offsetX)/s.width;var a=t.Gt(this.scale(),s);if(n.tag&&t.p(n.tag.type))var o=n.tag.type;i.hoverRatio=s,i.hoverDateTime=a,o&&(i.elementType=o,"milestones-preview"===o||"baselines-milestones-preview"===o)&&(i.tooltipItem=i.originalEvent.domTarget.tag.item),this.controller.i&&n.tag&&(i.period=n.tag.ub,i.periodIndex=n.tag.Fq),(e=function(e,i){var n=e.mp,s=e.uk();s=e.fa.top+t.Zj(e.O().Ja()).y+s,n=(0<=(n=t.Na(n,i.clientY-s))?n:~n)+e.controller.Cg();var a=new t.gb(i.offsetX,i.offsetY);return t.ya(e.QE[n]||[],(function(t){return!(!t.label.enabled()||0!==Ni(t.label).Tf(a))}),e)}(this,e))&&(this.controller.i?(i.period=e.ub,i.periodIndex=e.Fq,i.elementType=e.type):i.tooltipItem=e.item)}return i},t.g.YL=function(e,i,n){var s=e.get("markers");if(s)for(var a=0;a<s.length;a++){var o=s[a];if(o){var r=e.no("markers",a,"value");if(null!==r){var l=t.Ft(this.qa,r);if(0<=l&&1>=l){r=.7*n,l=Math.round(this.fa.left+this.fa.width*l);var h=Math.round(i+n/2);(l=this.Db().add({value:{x:l,y:h}})).ta("size",r/2),l.N(o)}}}}},t.g.oT=function(){var t=Re.u.oT.call(this);return t.top+=this.uk(),yt(this).clip(t),t},t.g.bs=function(t){Re.u.bs.call(this,t),Ui(this).clip(t)},t.g.mN=function(){wt(this).zIndex(33),this.Db().O(St(this)),this.labels().O(St(this)),this.GA().O(vt(this)),Gi(this)},t.g.fs=function(){this.GA().Qf({left:this.fa.left,top:this.fa.top,width:this.fa.width,height:this.uk()}),this.B(4096),this.gJ=!0},t.g.kv=function(){We(this).stroke(Et("columnStroke",2)(this,0))},t.g.nV=function(t){t.hc(bt(this)).hc(Ui(this)).hc(Fi(this)).hc(yt(this)).hc(Mi(this)).hc(St(this)).hc(xt(this)).hc(wt(this)).hc(Ct(this))},t.g.Kn=function(){this.J(2048)&&(this.Kt(),this.I(2048))},t.g.dY=function(){var e=this.GA();this.J(512)&&(this.gJ=this.$y=!0,e.B(512),this.B(8192),this.I(512));var i=t.Ht(this.qa);if(this.gJ){e.ka(),e.MX(i);for(var n=[],s=0;s<i.length;s++)if(e.level(s).enabled()){i=i[s],this.TC=i.unit,n=this.qa.Fn(window.NaN,window.NaN,i.unit,i.count);break}if(e.W(),e.da(!1),(e=n).length){n=(i=We(this).clear()).stroke(),n=t.dp(n),s=this.fa.top+this.uk()+1;for(var a=this.fa.top+this.fa.height,o=0,r=e.length;o<r;o++){var l=t.Ft(this.qa,e[o].start);l=this.fa.left+this.fa.width*l,l=t.R(l,n),i.moveTo(l,s).lineTo(l,a)}}i=this.qa.uj(),n=this.qa.sj(),e=t.Ft(this.qa,i.min)*this.fa.width,s=t.Ft(this.qa,i.max)*this.fa.width,i=t.Ft(this.qa,n.min)*this.fa.width,n=t.Ft(this.qa,n.max)*this.fa.width,this.Sh&&(e=new t.I(e,0,s-e,0),i=new t.I(i,0,n-i,0),this.Sh.ka().op(!1).kg(e).aQ(i).W().op(!0).da(!1),this.Sh.O()&&this.Sh.W())}if(this.J(8192)){if(Ve(this).clear(),qe(this).clear(),He(this).clear(),ze(this).clear(),this.qa.je&&this.TC&&Hn.day>=Hn[this.TC])for(e=this.qa.vD(),i=0;i<e.length;i++)s=(n=e[i]).start,a=n.end,o=n.isWeekend,n.isHoliday?"day"===this.TC?Ai(this,He(this),s,a):Ei(this,n):o?Ai(this,ze(this),s,a):Ei(this,n);this.I(8192)}},t.g.O4=function(){if(this.$y||this.gJ){for(var e=je(this),i=0;i<e.length;i++){var n=e[i];n.Rf||n.rE(),n.Rf.uv()}if(yt(this).Gi(),this.VJ=0,this.Db().clear(),this.controller.i){if(this.Gr().g("enabled"))for(var s=this.fa.top+this.uk()+1-this.controller.km(),a=this.controller.D,o=this.controller.Cg();o<=this.controller.Nj();o++){var r=a[o];if(!r)break;var l=x(this.controller,r),h=s+l,c=r.get("periods");if(c)for(var u=0;u<c.length;u++){var d=pt(r,u);if(d.PA)Ci(this,r,s,l,d,u);else{var p=r,g=s,f=l,m=u,v=pt(p,m),b=v.start,y=v.end;if(v.DN){var S=t.Ft(this.qa,b),w=t.Ft(this.qa,y);if(0<w&&1>S){var C=this.fa.left+this.fa.width*S,T=this.fa.left+this.fa.width*w-C,D=this.Gr(),k=D.qd(p,m),$=t.L(k,f),O=new t.I(C,g,T,f),P=D.g("anchor"),L=D.g("position");"auto"==P&&(P=ni(this,L,"periods"));var I=D.rD(p,m),A=t.L(I,f),E=t.Eo(O,L),G=E.y+(t.Ko(P)?0:t.Lo(P)?-$:-$/2)+A,U=st(this.Gb.nk(),p,m),F=bi(D,new t.I(E.x,G,T,$),p,m,U),M=this.io(p,D,F,m);yi(this,p,F,m),xe(D.hi(),p,F,M,m,U),xi(this,p,D,F,m)}}else v.CN&&ki(this,this.Wc(),p,g,f,v,m)}}this.YL(r,s,l),s=h+this.Tn}}else for(var _=this.fa.top+this.uk()+1-this.controller.km(),N=this.controller.D,R=this.controller.Cg();R<=this.controller.Nj();R++){var j=N[R];if(!j)break;var B,H=dt(j),z=x(this.controller,j),V=_+z,q=ht(j,H),W=ct(j,H),Y=lt(j,H),K=rt(j,H);if(B=!K){var X=H||dt(j);B=!X.PA&&X.bN}var J=B;if(q)Ci(this,j,_,z,H);else if(W){var Z=j,Q=_,tt=z,et=H;if(this.np().g("enabled")&&(et.QA||et.eha||et.QD)){var it=this.Wc().Ei(),at=this.Sp().Ei(),ot=wi(it,Z),ut=wi(at,Z);Di(this,0,Z,Q,tt,t.oa(Z),ot,ut,!1);var gt=et.start,ft=et.end;ft=(0,window.isNaN)(ft)?gt:ft,gt=(0,window.isNaN)(gt)?ft:gt;var mt=t.Ft(this.qa,gt),vt=t.Ft(this.qa,ft);if(0<vt&&1>mt){var bt=this.fa,St=this.np(),xt=bt.left+bt.width*mt,wt=bt.left+bt.width*vt-xt,Ct=vi(this,St,new t.I(xt,Q,wt,tt),Z);if(!Ct.width){var Tt=Ct.height;Ct.left-=Tt/2,wt=Tt,Ct.width=wt}var Dt=nt(this.Gb.nk(),Z);Ct=bi(St,Ct,Z,void 0,Dt);var kt=this.io(Z,St,Ct);yi(this,Z,Ct),xe(St.hi(),Z,Ct,kt,void 0,Dt),xi(this,Z,St,Ct);var $t=St.Kd();if(et.EN&&$t.g("enabled")){var Ot=mi(et.Kd,wt,$t),Pt=vi(this,$t,new t.I(Ct.left,Ct.top,Ot,Ct.height),Z),Lt=this.io(Z,$t,Pt);xe($t.hi(),Z,Pt,Lt,void 0,Dt),Ot&&xi(this,Z,$t,Pt)}}}}else if(Y||K){var It=this.Wc(),At=this.Sp(),Et=this.Ml().g("above");if(Y){var Gt=H.bN?z/2:z;ki(this,It,j,Et&&H.bN?_+Gt:_,Gt,H)}if(K){var Ut=Y?z/2:z;ki(this,At,j,Y?Et?_:_+Ut:_,Ut,H)}}else if(J){var Ft=j,Mt=_,_t=z,Nt=H,Rt=Nt.QD||ct(Ft,Nt),jt=Rt?this.np():this.Nc(),Bt=nt(this.Gb.nk(),Ft),Ht=Nt.start,zt=Nt.end;Rt&&(zt=(0,window.isNaN)(zt)?Ht:zt,Ht=(0,window.isNaN)(Ht)?zt:Ht);var Vt=t.Ft(this.qa,Ht),qt=t.Ft(this.qa,zt),Wt=jt.g("enabled"),Yt=this.fa;if(0<qt&&1>Vt&&Wt){var Kt=Yt.left+Yt.width*Vt,Xt=vi(this,jt,new t.I(Kt,Mt,Yt.left+Yt.width*qt-Kt,_t),Ft,!0);if(Rt&&!Xt.width){var Jt=Xt.height;Xt.left-=Jt/2,Xt.width=Jt,Nt.QA=!0}Xt=bi(jt,Xt,Ft,void 0,Bt);var Zt=this.io(Ft,jt,Xt);if(Rt){var Qt=this.Wc().Ei(),te=this.Sp().Ei(),ee=wi(Qt,Ft),ie=wi(te,Ft);Di(this,0,Ft,Mt,_t,t.oa(Ft),ee,ie,!0)}if(yi(this,Ft,Xt),Nt.QA){xe(jt.hi(),Ft,Xt,Zt,void 0,Bt),xi(this,Ft,jt,Xt);var ne=jt.Kd();if(Nt.EN&&ne.g("enabled")){var se=mi(Nt.Kd,Xt.width,ne),ae=vi(this,ne,new t.I(Xt.left,Xt.top,se,Xt.height),Ft),oe=this.io(Ft,ne,ae);xe(ne.hi(),Ft,ae,oe,void 0,Bt),se&&xi(this,Ft,ne,ae)}}}}else{var re=j,le=_,he=z,ce=H,ue=this.Nc();if(ue.g("enabled")&&ce.QA){var de=ce.end,pe=t.Ft(this.qa,ce.start),ge=t.Ft(this.qa,de);if(0<ge&&1>pe){var fe=this.fa,me=fe.left+fe.width*pe,ve=fe.left+fe.width*ge-me,be=vi(this,ue,new t.I(me,le,ve,he),re),ye=nt(this.Gb.nk(),re);be=bi(ue,be,re,void 0,ye);var Se=this.io(re,ue,be);yi(this,re,be),xe(ue.hi(),re,be,Se,void 0,ye),xi(this,re,ue,be);var we=ue.Kd();if(ce.EN&&we.g("enabled")){var Ce=mi(ce.Kd,ve,we),Te=vi(this,we,new t.I(be.left,be.top,Ce,be.height),re),De=this.io(re,we,Te);xe(we.hi(),re,Te,De,void 0,ye),Ce&&xi(this,re,we,Te)}}}}this.YL(j,_,z),_=V+this.Tn}this.Db().W();for(var ke,$e=this.controller.ea,Oe=$e.length,Pe=this.controller.i?this.controller.na:this.controller.Ba;Oe--;){var Le=(ke=$e[Oe]).to;t.C(Le)||(Le=Pe[Le]),t.p(Le)?(ke.to=Le,Pi(this,ke.from,Le,ke.type,ke.connSettings)):t.Ca($e,Oe,1)}for(var Ie=this.VJ,Ae=this.WJ.length;Ie<Ae;Ie++)this.WJ[Ie].reset();this.B(2048),this.gJ=!1}},t.g.T3=function(){if(this.J(4096)){for(var e=t.Ga(this.WA,this.pB,this.OB),i=this.fa.top+this.uk()+1,n=new t.I(this.fa.left,i,this.fa.width,this.fa.height-this.uk()-1),s=0,a=e.length;s<a;s++){var o=e[s];if(o){var r=n,l=Fi(this);t.J(o,he)&&(r=new t.I(this.fa.left,i,this.fa.width,this.M6),l=Mi(this)),o.ka(),o.B(4),o.ja(r),o.O(l),o.B(2),o.W(),o.da(!1)}}this.I(4096)}},t.g.de=function(){this.B(2048,1)},t.g.Kt=function(){this.labels().ka(),this.labels().clear(),this.QE=[];for(var e=this.g("cropLabels"),i=je(this),n=0;n<i.length;n++){var s=i[n];if(s.g("enabled")){s.Rf||s.rE();var a=s.Rf.IP;for(g in a)if(a.hasOwnProperty(g)){var o=a[g];if(o.$H){var r=this.Ic(o.item,o.ub,o.Fq);o.label=this.labels().add(r,{value:{x:0,y:0}});var l=o.PV,h=o.labels,c=h&&h[0]?h[0]:null,u=this.elements().labels(),d=this.labels(),p=l&&t.p(l.enabled)?l.enabled:null;if(u=s&&t.p(u.enabled())?u.enabled():null,c=c&&t.p(c.enabled())?c.enabled():null,null===p?null===u?null===c?d.enabled():c:u:p){for(o.label.Hi(),o.label.enabled(!0),o.label.state("labelOwnSettings",o.label.Pa,0),o.label.state("pointState",l,1),l=h.length,d=0;d<l;d++)u=h[d],p=2+d,o.label.state("st"+p,u,p);for(d=0;d<l;d++)u=h[d],p=2+d+l,o.label.state("st"+p,u.oa,p);h=t.Dk(o.label.ic("position")),h={value:t.Eo(o.Ta,h)},o.label.jc(h),t.nv(r).label={value:o.label,type:""},t.ov(r),o.label.Hf(r),this.controller.data().ka(),o.item.j("label",o.label),this.controller.data().da(!1)}else o.label.enabled(!1);o.label.W(),t.A(this.QE[o.Af])||(this.QE[o.Af]=[]),r="periods"===o.type||"milestones"===o.type,h="milestones-preview"===o.type||"baselines-milestones-preview"===o.type,((l=this.controller.i)&&r||!l&&h)&&t.Ua(this.QE[o.Af],o,_i)}}}}if(e)for(n=this.controller.Cg(),e=this.controller.Nj();n<=e;n++)for(s=this.QE[n]||[],a=0;a<s.length;a++){h=s[a-1]||null;var g=s[a];r=s[a+1]||null,o=Ni(g.label),u=g,(l=r)?(d=l.Ta.tb()-u.Ta.cb(),p=Ni(l.label),u=u.Ta.cb()+d/2,l=p.tb()<l.Ta.tb()&&0<d?p.tb()<=u?u:p.tb():l.Ta.tb()):l=window.Infinity,(d=h)?(h=d.Ta.cb(),d.label.enabled()?(d.label.W(),d=Ni(d.label).cb(),d=Math.max(h,d)):d=h):d=-window.Infinity,h=Math.min(l,o.cb()),l=Math.max(d,o.tb()),d=Math.max(h-l,0),p=!1,"center"===g.label.ic("anchor").split("-")[0]&&(d=g.label.ic("position").split("-")[0],d=t.Eo(g.Ta,d),d=2*Math.min(d.x-l,h-d.x),p=!0),d<o.width&&(r&&(r=Ni(r.label),p=Math.max(o.top+o.height,r.top+r.height)-Math.min(o.top,r.top)<o.height+r.height),p&&(g.label.width(d),g.label.height(o.height)))}for(this.labels().da(!0),this.labels().W(),this.elements().labels().I(4294967295),e=0;e<i.length;e++)i[e].labels().I(4294967295)},t.g.AG=function(){var e=this.Gb.nk();if(e.f&&this.elements().uf().g("enabled")){var i=e.f,n=i.tfa,s=i.lla,a=i.y0,o=this.controller.D,r=o[n],l=o[s];if(n={type:"beforeRemoveConnector",fromItem:r,toItem:l,fromItemIndex:n,toItemIndex:s,connectorType:a},this.controller.i){s=i.G1;var h=r.get("periods")[s];o=h.connector,i=i.I6;var c=l.get("periods")[i];if(l=c.id,n.fromPeriodIndex=s,n.fromPeriod=h,n.toPeriodIndex=i,n.toPeriod=c,t.A(o))for(i=0;i<o.length;i++)(h=o[i])&&(c=h.connectorType||"finish-start",h.connectTo==l&&c==a&&this.Gb.dispatchEvent(n)&&(r.fr("periods",s,"connector",i),at(e,null)));else this.Gb.dispatchEvent(n)&&(r.fr("periods",s,"connector"),r.fr("periods",s,"connectorType"),r.fr("periods",s,"connectTo"),at(e,null))}else if(s=l.get("id"),o=r.get("connector"),t.A(o))for(i=0;i<o.length;i++)(l=o[i])&&(h=l.connectorType||"finish-start",s==l.connectTo&&h==a&&this.Gb.dispatchEvent(n)&&(r.fr("connector",i),at(e,null)));else this.Gb.dispatchEvent(n)&&(r.fr("connector"),r.fr("connectorType"),r.fr("connectTo"),at(e,null))}},t.g.vx=function(e){return t.p(e)?(R(this.controller).N(e),this):R(this.controller)},t.g.tq=function(e){if(!this.Sh){this.Sh=new s,this.Sh.U(t.zm("defaultScrollBar")),this.Sh.we("horizontal");var i=this.qa;this.Sh.wa("scrollchange",(function(t){var e=t.startRatio;t=t.endRatio;var n=i.uj(),s=n.min;n=n.max-s,i.Jr(Math.round(s+e*n),Math.round(s+t*n))})),t.K(this.Sh,this.AX,this)}return t.p(e)?(this.Sh.N(e),this):this.Sh},t.g.AX=function(e){t.X(e,8)&&this.B(4,1)},t.g.scroll=function(e,i,n){if(e||i){t.xr(this,this.qa,this.controller),n||(this.vi=!1,(0,window.clearInterval)(this.Vn),this.Vn=null,ii(this));var s=this.controller.Cg(),a=this.controller.b,o=this.controller.km();return j(this.controller,(s?a[s-1]:0)+(o+i)),e/=this.fa.width,n&&!this.Yx&&(this.Wx||this.gT)?(n=this.qa,e&&!n.Uj()&&(t.Et(n),n.uj(),i=Math.round((n.Ze-n.$e)*e),e=n.$e+i,i=n.Ze+i,!(0,window.isNaN)(n.$m)&&e<n.$m||!(0,window.isNaN)(n.Zm)&&i>n.Zm||(n.Ph=window.NaN,n.$e=e,n.Oh=window.NaN,n.Ze=i,n.va(4)))):(this.Yx||this.vi&&this.oj||!this.vi)&&(n=this.qa,e&&!n.Uj()&&(t.Et(n),i=n.uj(),e=0<=(e=Math.round((n.Ze-n.$e)*e))?Math.min(i.max-n.Ze,e):Math.max(i.min-n.$e,e),n.Jr(n.$e+e,n.Ze+e))),t.zr(this.qa,this.controller,this),this.B(4608,1),!0}return!1},t.g.vH=function(e){return e=t.Za(e,-100,100),1.05+Math.abs(e)/100},t.g.Oy=function(e){if(this.g("zoomOnMouseWheel")){e.preventDefault(),Ut(this),this.Ua().Lc();var i=e.deltaY,n=this.vH(i);e=e.clientX;var s=t.Zj(this.O().Ja()).x;e=(e-this.Bb.left()-s)/this.Ta().width(),0>i?this.qa.Vr(n,e):this.qa.Wr(n,e)}else Re.u.Oy.call(this,e)},t.g.F=function(){var e=Re.u.F.call(this);e.scale=this.qa.F(),e.labels=this.labels().F(),e.markers=this.Db().F(),e.header=this.GA().F(),t.Tq(this,zn,e,void 0,void 0,!0),e.elements=this.elements().F(),e.connectors=this.nj().F(),e.milestones=this.Wc().F(),this.controller.i?e.periods=this.Gr().F():(e.tasks=this.Nc().F(),e.groupingTasks=this.np().F(),e.baselines=this.Ml().F(),e.baselineMilestones=this.Sp().F());var i,n=[];for(i=0;i<this.WA.length;i++){var s=this.WA[i];s&&n.push(s.F())}for(n.length&&(e.lineAxesMarkers=n),n=[],i=0;i<this.pB.length;i++)(s=this.pB[i])&&n.push(s.F());for(n.length&&(e.rangeAxesMarkers=n),n=[],i=0;i<this.OB.length;i++)(s=this.OB[i])&&n.push(s.F());return n.length&&(e.textAxesMarkers=n),this.Sh&&(e.horizontalScrollBar=this.tq().F()),e.verticalScrollBar=this.vx().F(),e},t.g.U=function(e,i){Re.u.U.call(this,e,i),"scale"in e&&this.qa.N(e.scale),this.labels().ga(!!i,e.labels),"markers"in e&&this.Db(e.markers),"header"in e&&!i&&this.GA().ga(!1,e.header),t.Iq(this,zn,e,i),this.elements().ga(!!i,e.elements),this.Wc().ga(!!i,e.milestones),this.nj().ga(!!i,e.connectors),this.controller.i?this.Gr().ga(!!i,e.periods):(this.Nc().ga(!!i,e.tasks),this.np().ga(!!i,e.groupingTasks),this.Ml().ga(!!i,e.baselines),this.Sp().ga(!!i,e.baselineMilestones)),"defaultLineMarkerSettings"in e&&this.IL(e.defaultLineMarkerSettings),"defaultRangeMarkerSettings"in e&&this.JL(e.defaultRangeMarkerSettings),"defaultTextMarkerSettings"in e&&this.NL(e.defaultTextMarkerSettings);var n,s=e.lineAxesMarkers,a=e.rangeAxesMarkers,o=e.textAxesMarkers;if(t.A(s))for(n=0;n<s.length;n++)this.Ym(n,s[n]);if(t.A(a))for(n=0;n<a.length;n++)this.gn(n,a[n]);if(t.A(o))for(n=0;n<o.length;n++)this.mn(n,o[n]);"horizontalScrollBar"in e&&this.tq(e.horizontalScrollBar),"verticalScrollBar"in e&&this.vx(e.verticalScrollBar)},t.g.R=function(){t.qd(this.Sh),this.Sh=null,t.kr(this.qa,this.ii),this.Yk&&t.kr(this.Yk,this.T2);for(var e=t.Ga(this.WA,this.OB,this.pB),i=0;i<e.length;i++){var n=e[i];n&&(t.kr(n,this.Ry),t.qd(n))}this.Ot&&(this.Ot.gc("start",this.m1,!1,this),this.Ot.gc("drag",this.n1,!1,this),this.Ot.gc("end",this.o1,!1,this)),this.Pt&&(this.Pt.gc("start",this.r1,!1,this),this.Pt.gc("drag",this.s1,!1,this),this.Pt.gc("end",this.p1,!1,this)),this.Nt&&(this.Nt.gc("start",this.l1,!1,this),this.Nt.gc("drag",this.kM,!1,this),this.Nt.gc("end",this.jM,!1,this)),this.Qt&&(this.Qt.gc("start",this.t1,!1,this),this.Qt.gc("drag",this.kM,!1,this),this.Qt.gc("end",this.jM,!1,this)),this.Rt&&(this.Rt.gc("start",this.hM,!1,this),this.Rt.gc("drag",this.iM,!1,this),this.Rt.gc("end",this.gM,!1,this)),this.Mt&&(this.Mt.gc("start",this.hM,!1,this),this.Mt.gc("drag",this.iM,!1,this),this.Mt.gc("end",this.gM,!1,this)),t.sd(this.dy,this.Nw,this.Kk,this.fw,this.hk,this.Bt,this.ov,this.Kj,this.qa,this.Yk,this.EE,this.iq,this.mA,this.Fv,this.Gv,this.Hv,this.Ev,this.dD,this.Ot,this.Pt,this.Nt,this.Qt,this.Rt,this.Mt,this.rh,this.su),this.Kj=this.su=this.rh=null,this.WA.length=0,this.pB.length=0,this.OB.length=0,Re.u.R.call(this)},t.H(Ri,Re),t.xu(Ri,Re),t.H(ji,Re),t.xu(ji,Re);var Vn=Re.prototype;Vn.edit=Vn.uf,Vn.horizontalScrollBar=Vn.tq,Vn.verticalScrollBar=Vn.vx,Vn.tooltip=Vn.Ua,Vn.labels=Vn.labels,Vn.markers=Vn.Db,Vn.scale=Vn.scale,Vn.textMarker=Vn.mn,Vn.lineMarker=Vn.Ym,Vn.rangeMarker=Vn.gn,Vn.header=Vn.GA,Vn.elements=Vn.elements,Vn.connectors=Vn.nj,Vn.tasks=Vn.Nc,Vn.milestones=Vn.Wc,Vn.baselineMilestones=Vn.Sp,Vn.groupingTasks=Vn.np,Vn.baselines=Vn.Ml,Vn.periods=Vn.Gr,Vn=Ri.prototype,t.E("anychart.standalones.projectTimeline",(function(){var e=new Ri;return e.N(t.nm("standalones.projectTimeline")),e})),t.E("anychart.standalones.resourceTimeline",(function(){var e=new ji;return e.N(t.nm("standalones.resourceTimeline")),e})),Vn.draw=Vn.W,Vn.data=Vn.data,Vn.parentBounds=Vn.ja,Vn.container=Vn.O,Vn.headerHeight=Vn.uk,Vn.defaultRowHeight=Vn.hv,Vn.palette=Vn.cc,(Vn=ji.prototype).draw=Vn.W,Vn.data=Vn.data,Vn.parentBounds=Vn.ja,Vn.container=Vn.O,Vn.headerHeight=Vn.uk,Vn.defaultRowHeight=Vn.hv,Vn.palette=Vn.cc,t.H(Bi,t.Bx),Bi.prototype.Ma=function(){return this.G?"gantt-resource":"gantt-project"},Bi.prototype.sa=12288|t.Bx.prototype.sa,Bi.prototype.ra=t.Bx.prototype.ra;var qn=20;t.g=Bi.prototype,t.g.Ue=function(){return[]},t.g.Tg=function(){return null},t.g.Ii=function(){return this},t.g.$i=function(){return this},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.B0=function(e){t.X(e,2)&&this.B(8192,1)},t.g.mka=function(e){t.X(e,1)&&e.target.W(),t.X(e,8)&&this.B(4,1)},t.g.hea=function(e){t.X(e,32768)&&this.B(4,1),N(this.ib)},t.g.data=function(e,i){return t.p(e)?(t.J(e,t.au)||t.J(e,t.Yt)?this.la!=e&&(this.la=e,this.B(4352,1)):(this.la=new t.au(e,i),this.B(4352,1)),this):this.la},t.g.hv=function(e){return t.p(e)?(S(this.ib,e),this):S(this.ib)},t.g.pI=function(t){this.f.pI(t),this.b.pI(t)};var Wn={};t.rq(Wn,0,"headerHeight",t.Cq),t.rq(Wn,0,"splitterPosition",t.Cq),t.rq(Wn,1,"rowHoverFill",t.Nq),t.rq(Wn,1,"rowSelectedFill",t.Nq),t.rq(Wn,1,"rowFill",t.Nq),t.rq(Wn,1,"rowEvenFill",t.Nq),t.rq(Wn,1,"rowOddFill",t.Nq),t.rq(Wn,1,"columnStroke",t.Pq),t.rq(Wn,1,"rowStroke",t.Jq),t.U(Bi,Wn),t.g=Bi.prototype,t.g.GF=function(e){return t.p(e)?(Hi(this).enabled(e),this):Hi(this)},t.g.wf=function(){if(!this.b){this.b=new Re(this.ib,this.G),t.W(this,"timeline",this.b),this.b.zIndex(t.zm("defaulTimeline").zIndex),ft(this.b,this);var e=this;t.K(this.b,(function(){N(e.ib)}),this.ib)}return this.b},t.g.Vr=function(t){return this.wf().$v().Vr(t),this},t.g.Wr=function(t){return this.wf().$v().Wr(t),this},t.g.kj=function(t,e,i){return this.wf().$v().kj(t,e,i),this},t.g.Qm=function(){return this.wf().$v().Qm(),this},t.g.lfa=function(e){var i=this.b.fa;if(i&&i.width){var n=this.la.Eo("id",e);if(n.length){var s=(n=n[0]).j("actualStart"),a=n.j("actualEnd");if(!t.p(s)||((0,window.isNaN)(s)||t.p(a))&&s!=a){if(this.wf().$v().Jr(s,a),0<i.width&&(e=n.j("relBounds"),n=n.j("label"))&&(s=this.b.labels().measure(n,n.jc()),e&&s)){if(n=s.left<e.left,e=s.left+s.width>e.left+e.width,s.width<i.width){if(i=i.width/(i.width-s.width),n&&!e)var o=t.Gt(this.b.scale(),1-i),r=t.Gt(this.b.scale(),1);e&&!n&&(o=t.Gt(this.b.scale(),0),r=t.Gt(this.b.scale(),i))}else o=t.Gt(this.b.scale(),0),r=t.Gt(this.b.scale(),s.width/i.width);this.wf().$v().Jr(o,r)}}else t.kl(11,null,[e])}else t.kl(404,null,["Task",e])}return this},t.g.Yaa=function(e){return t.p(e)?(j(this.ib,e),this):j(this.ib)},t.g.$aa=function(t){return this.ib.ka().Cg(t).km(0).da(!0),this},t.g.Ra=function(e){return t.p(e)?(this.wf().scale(e),this):this.wf().scale()},t.g.Zaa=function(t){var e=this.ib;return t=t||e.b.length-1,e.Nj(t),this},t.g.Waa=function(){return B(this.ib,!0),this},t.g.Xaa=function(){return B(this.ib,!1),this},t.g.Afa=function(){return this.ib.sb},t.g.bfa=function(t){return zi(this,t,!1)},t.g.Oda=function(t){return zi(this,t,!0)},t.g.l_=function(){return this.na||(this.na=new t.Dx,this.na.wa("statechange",(function(){this.b.B(128,1),this.f.B(128,1)}),void 0,this)),this.na},t.g.Ol=function(){return[]},t.g.v5=function(t){this.UO(t)},t.g.w5=function(t){this.SO(t)},t.g.ro=function(t,e,i){this.f.ro(t,e,i),this.b.ro(t,e,i)},t.g.Iv=function(t,e,i){this.f.Iv(t,e,i),this.b.Iv(t,e,i)},t.g.nk=function(){return this.P},t.g.z5=function(e){var i=e.target;if(!i.vi&&!i.Yx){this.ro(e.hoveredIndex,e.startY,e.endY);var n=e.tooltipItem?e.tooltipItem:e.item,s=i.OM(void 0,n,e.periodIndex);if(t.J(i,Qt)){var a=ci(this.b,n),o=a.g("format");a=a.g("titleFormat"),s.Ha.format=o,s.Ha.titleFormat=a}else t.Cw(i.Ua());s.enabled()&&(i=i.Ic(n,e.period,e.periodIndex,e.elementType,e.hoverRatio,e.hoverDateTime),s.parent()&&t.Cw(s.parent()),t.Ow(s,e.originalEvent.clientX,e.originalEvent.clientY,i))}},t.g.A5=function(t){this.ro(),this.f.OM().Lc(),this.b.OM(void 0,t.item,t.periodIndex).Lc()},t.g.UO=function(e){if(!di(this.b,e)){var i=e.item,n=e.period,s=e.periodIndex,a=this.nk(),o=this.G?st(a,i,s):nt(a,i);i&&!o&&(o={type:"rowSelect",item:i,prevItem:a.b},t.p(n)&&(o.period=n,o.periodIndex=s),null!=a.i&&a.b&&(n=a.i,o.prevPeriodIndex=n,o.prevPeriod=a.b.get("periods",n)),this.dispatchEvent(o)&&(pi(this.b,e),Nt(this.f,i),gi(this.b,i,s)))}},t.g.SO=function(t){if(t&&!ui(this.b,t)&&(t=t.item)&&ct(t)){var e=!t.j("collapsed");this.dispatchEvent({type:"rowcollapseexpand",item:t,collapsed:e})&&t.j("collapsed",e)}},t.g.iJ=function(t){t.target.iJ(t)},t.g.jJ=function(t){var e=this.nk(),i={type:"rowSelect",actualTarget:t?t.target:this,target:this,originalEvent:t,item:null,prevItem:e.b};if(null!=e.i&&e.b){var n=e.i;i.prevPeriodIndex=n,i.prevPeriod=e.b.get("periods",n)}this.dispatchEvent(i)&&(this.f.jJ(t),this.b.jJ(t)),pi(this.b,t)},t.g.TO=function(t){t.target.TO(t)},t.g.uO=function(e){var i=e.event,n=e.target;return t.J(n,ot)&&(e.interactivityEvent=n.rl(i)),e},t.g.uf=function(e){return this.Vi||(this.Vi=new tt,t.W(this,"edit",this.Vi)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Vi.N(e),this):this.Vi},t.g.AG=function(t){this.f.AG(t),this.b.AG(t)},t.g.Qh=function(e){t.xr(Hi(this),this.wf(),Vi(this),this.ib),this.o.O()||(this.f.O(this.Na),this.b.O(this.Na),this.o.O(this.Na),this.D.O(this.Na));var i=this.f.g("fixedColumns"),n=this.g("headerHeight");if(this.J(4)&&0<e.width){if(this.f.enabled()){var s=i?ne(this.f):Math.round(t.L(this.g("splitterPosition"),e.width));if(this.o.Ta(e),i){var a=ne(this.f,!0);if(a){var o=this.o;a+=hn,o.D=a,o.aa=a,o.B(64)}else z(this.o)}else z(this.o);s=t.Za(s/e.width,0,1),this.o.op(!1),this.o.position(s),this.o.W(),this.o.op(!0),i&&this.o.position()!=s&&(this.o.op(!1),this.o.position(s),this.o.W(),this.o.op(!0))}else this.b.Ta().set(e);i=e.height-n-1,G(this.ib)!=i&&(this.b.uk(n),this.f.uk(n),G(this.ib,i)),i=this.f.enabled(),this.o.enabled(i),i&&((i=this.o).ab||(i.ab=i.ob()),s=i.ba?i.b:0,i=K(i)?new t.I(t.Tm(i.ab.tb(),1),t.Tm(i.ab.Vb(),1),t.Tm((i.ab.zd()-s)*i.af,1),t.Tm(i.ab.qd(),1)):new t.I(t.Tm(i.ab.tb(),1),t.Tm(i.ab.Vb(),1),t.Tm(i.ab.zd(),1),t.Tm((i.ab.qd()-s)*i.af,1)),s=function(e){if(e.ab||(e.ab=e.ob()),e.ba){var i=t.Tm((e.ab.zd()-e.b)*e.af,1),n=t.Tm((e.ab.qd()-e.b)*e.af,1);return K(e)?(i+=e.b,new t.I(t.Tm(e.ab.tb()+i,1),t.Tm(e.ab.Vb(),1),t.Tm(e.ab.zd()-i,1),t.Tm(e.ab.qd(),1))):(n+=e.b,new t.I(t.Tm(e.ab.tb(),1),t.Tm(e.ab.Vb()+n,1),t.Tm(e.ab.zd(),1),t.Tm(e.ab.qd()-n,1)))}return K(e)?(i=e.ab.zd()*e.af,new t.I(t.Tm(e.ab.tb()+i,1),t.Tm(e.ab.Vb(),1),t.Tm(e.ab.zd()-i,1),t.Tm(e.ab.qd(),1))):(n=e.ab.qd()*e.af,new t.I(t.Tm(e.ab.tb(),1),t.Tm(e.ab.Vb()+n,1),t.Tm(e.ab.zd(),1),t.Tm(e.ab.qd()-n,1)))}(this.o),this.f.Ta().set(i),this.b.Ta().set(s)),i=this.b.ob(),s=this.D.DC(),this.D.Ta(e.left+e.width-s-1,i.top+n+s+1,s,i.height-n-2*s-2)}this.J(4096)&&(this.ib.data(this.la),this.B(8192),this.I(4096)),t.yr(this.f,this.b,this.o,this.ib),t.Op()&&this.f.Wj(!0),N(this.ib),0<e.width&&Vi(this).W(),this.J(8192)&&this.I(8192)},t.g.Zj=function(e,i){return t.qu(this.data(),i)},t.g.yj=function(){return!this.la||!this.la.bc()},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&(Hi(this).B(128),this.wf().B(128),this.B(8192,1))}},t.g.Pf=function(e){t.X(e,2)&&(Hi(this).B(128),this.wf().B(128),this.B(8192,1))},t.g.F=function(){var e=Bi.u.F.call(this);return t.Tq(this,Wn,e,void 0,void 0,!0),e.defaultRowHeight=this.hv(),e.controller=this.ib.F(),e.dataGrid=this.GF().F(),e.timeline=this.wf().F(),e.edit=this.uf().F(),e.palette=this.cc().F(),{gantt:e}},t.g.U=function(e,i){Bi.u.U.call(this,e,i),"controller"in e&&this.ib.U(e.controller,i),this.data(this.ib.data()),"dataGrid"in e&&this.GF().U(e.dataGrid,i),"timeline"in e&&this.wf().U(e.timeline,i),this.cc(e.palette),t.Iq(this,Wn,e,i),this.hv(e.defaultRowHeight),"edit"in e&&this.uf().ga(!!i,e.edit)},t.g.R=function(){t.kr(this.ib,this.B0,this),t.sd(this.Fa,this.ib,this.D,this.f,this.b,this.o,this.Vi,this.P),this.P=this.Vi=this.o=this.b=this.f=this.D=this.ib=this.Fa=null,Bi.u.R.call(this)};var Yn=Bi.prototype;Yn.data=Yn.data,Yn.dataGrid=Yn.GF,Yn.getTimeline=Yn.wf,Yn.zoomIn=Yn.Vr,Yn.zoomOut=Yn.Wr,Yn.zoomTo=Yn.kj,Yn.fitAll=Yn.Qm,Yn.fitToTask=Yn.lfa,Yn.scrollTo=Yn.Yaa,Yn.scrollToRow=Yn.$aa,Yn.scrollToEnd=Yn.Zaa,Yn.collapseAll=Yn.Waa,Yn.expandAll=Yn.Xaa,Yn.expandTask=Yn.bfa,Yn.collapseTask=Yn.Oda,Yn.getType=Yn.Ma,Yn.edit=Yn.uf,Yn.toCsv=Yn.Zj,Yn.xScale=Yn.Ra,Yn.defaultRowHeight=Yn.hv,Yn.palette=Yn.cc,Yn.rowsColoring=Yn.l_,Yn.statefulColoring=Yn.l_,Yn.getCollapsedItemsMap=Yn.Afa,t.Vp["gantt-resource"]=Wi,t.Vp["gantt-project"]=qi,t.E("anychart.ganttProject",qi),t.E("anychart.ganttResource",Wi)}.call(this,$)),_.theme_core||(_.theme_core=1,function(t){var e,i,n,s;t.vN=function(e,i){var n=null===e||"boolean"==typeof e||""==e?window.NaN:+e;return(0,window.isNaN)(n)?e:t.Bs(n,i,void 0,void 0,void 0,void 0,void 0,void 0)},t.wN=function(){return t.vN(this.value)},t.xN=function(){return this.name||this.getData("id")},e=function(){return this.x},t.zN=function(){return this.sourceColor},t.AN=function(){return t.Ul(this.sourceColor,.7,!0)},t.BN=function(){return t.Ul(this.sourceColor,.65,!0)},t.CN=function(){return t.Ul(this.sourceColor,.5,!0)},t.DN=function(){return t.Ul(this.sourceColor,.85,!0)},t.EN=function(){return t.Ql(this.sourceColor)},t.FN=function(){return t.Pl(this.sourceColor)},t.GN=function(){return t.Ul(t.Pl(this.sourceColor),.5,!0)},t.HN=function(){return t.Wl(this.sourceColor,1.5)},t.IN=function(){return t.Wl(this.sourceColor,1)},t.JN=function(){return t.Wl(t.Pl(this.sourceColor),1.5)},t.KN=function(){return"High: "+t.vN(this.high)+"\nLow: "+t.vN(this.low)},i=function(){return"Open: "+t.vN(this.open)+"\nHigh: "+t.vN(this.high)+"\nLow: "+t.vN(this.low)+"\nClose: "+t.vN(this.close)},n=function(){return t.Wl(this.sourceColor,1.5)},t.NN=function(){var e=this.chart,i=t.wr(e,"title");return i=i&&i.enabled()&&i.text()?i.text():"",(e.Ma()||"Anychart ")+" chart "+(i?" entitled "+i:"")},t.ON=function(){var e=this.chart,i=t.NN.apply(this);return(i+=", with "+e.Rg("count")+" points. ")+"Min value is "+e.Rg("min")+", max value is "+e.Rg("max")+"."},t.PN=function(){for(var e=this.chart,i=t.NN.call(this),n=e.tj(),s={},a=0;a<n;a++){var o=e.Ai(a).kk();s.hasOwnProperty(o)?s[o]+=1:s[o]=1}for(var r in i+=", with ",s)i+=s[r]+" "+r+" series, ";if(i+=". ",s=e.bb(),n=(e=e.Ra()).Ma(),"ordinal"==(a=s.Ma())){for(i+="Y-scale with "+(s=s.values()).length+" categories: ",a=0;a<s.length;a++)i+=s[a]+", ";i+=". "}else o=s.uh(),s=s.di(),"date-time"==a&&(o=t.us(o),s=t.us(s)),i+="Y-scale minimum value is "+o+" , maximum value is "+s+". ";if("ordinal"==n){for(i+="X-scale with "+(e=e.values()).length+" categories: ",n=0;n<e.length;n++)i+=e[n]+", ";i+=". "}else o=e.uh(),s=e.di(),"date-time"==n&&(o=t.us(o),s=t.us(s)),i+="X-scale minimum value is "+o+" , maximum value is "+s+". ";return i},t.QN=function(){for(var e=this.chart,i=t.NN.call(this),n=e.tj(),s={},a=0;a<n;a++){var o=e.Ai(a).Ma();s.hasOwnProperty(o)?s[o]+=1:s[o]=1}for(var r in i+=", with ",s)i+=s[r]+" "+r+" series, ";if(i+=". ",s=e.bb(),n=(e=e.Ra()).Ma(),"ordinal"==(a=s.Ma())){for(i+="Y-scale with "+(s=s.values()).length+" categories: ",a=0;a<s.length;a++)i+=s[a]+", ";i+=". "}else o=s.uh(),s=s.di(),"date-time"==a&&(o=t.us(o),s=t.us(s)),i+="Y-scale minimum value is "+o+", maximum value is "+s+". ";if("ordinal"==n){for(i+="X-scale with "+(e=e.values()).length+" categories: ",n=0;n<e.length;n++)i+=e[n]+", ";i+=". "}else o=e.uh(),s=e.di(),"date-time"==n&&(o=t.us(o),s=t.us(s)),i+="X-scale minimum value is "+o+", maximum value is "+s+". ";return i},s=function(e){return"date-time"===e.xScaleType?t.vs(e.x):t.vN(e.x)},t.E("anychart.themes.defaultTheme",{palette:{type:"distinct",items:"#64b5f6 #1976d2 #ef6c00 #ffd54f #455a64 #96a6a6 #dd2c00 #00838f #00bfa5 #ffa000".split(" ")},hatchFillPalette:{items:"backward-diagonal forward-diagonal horizontal vertical dashed-backward-diagonal grid dashed-forward-diagonal dashed-horizontal dashed-vertical diagonal-cross diagonal-brick divot horizontal-brick vertical-brick checker-board confetti plaid solid-diamond zig-zag weave percent-05 percent-10 percent-20 percent-25 percent-30 percent-40 percent-50 percent-60 percent-70 percent-75 percent-80 percent-90".split(" ")},hatchFillPaletteFor3D:{items:"backward-diagonal forward-diagonal dashed-backward-diagonal grid dashed-forward-diagonal dashed-horizontal dashed-vertical diagonal-cross diagonal-brick divot horizontal-brick vertical-brick checker-board confetti plaid solid-diamond zig-zag weave percent-05 percent-10 percent-20 percent-25 percent-30 percent-40 percent-50 percent-60 percent-70 percent-75 percent-80 percent-90 horizontal vertical".split(" ")},markerPalette:{items:"circle diamond square triangle-down triangle-up diagonal-cross pentagon cross v-line star5 star4 trapezium star7 star6 star10".split(" ")},defaultScaleSettings:{linear:{maxTicksCount:1e3,inverted:!1,maximum:null,minimum:null,minimumGap:.1,maximumGap:.1,softMinimum:null,softMaximum:null,alignMinimum:!0,alignMaximum:!0,ticks:{mode:"linear",base:0,explicit:null,minCount:4,maxCount:6,interval:window.NaN,allowFractional:!0},minorTicks:{mode:"linear",base:0,explicit:null,count:5,interval:window.NaN,allowFractional:!0},stackMode:"none",stackDirection:"direct",stickToZero:!0},ordinal:{type:"ordinal",inverted:!1,mode:"discrete",names:[],ticks:{maxCount:100}},log:{type:"log",logBase:10,ticks:{mode:"log"},minorTicks:{mode:"log"}},dateTime:{type:"date-time",alignMinimum:!1,alignMaximum:!1,minimumGap:0,maximumGap:0,ticks:{count:4},minorTicks:{count:4}}},defaultFontSettings:{fontSize:13,fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontColor:"#7c868e",textDirection:"ltr",fontOpacity:1,fontDecoration:"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:"normal",lineHeight:"normal",textIndent:0,textShadow:"none",maxLength:null,vAlign:"top",hAlign:"start",wordWrap:"normal",wordBreak:"normal",textOverflow:"",selectable:!1,disablePointerEvents:!1,useHtml:!1},defaultBackground:{enabled:!1,fill:"#ffffff",stroke:"none",cornerType:"round",corners:0},defaultSeparator:{enabled:!1,fill:"#CECECE 0.3",width:"100%",height:1,margin:{top:5,right:0,bottom:5,left:0},orientation:"top",stroke:"none",zIndex:1},defaultLabelFactory:{enabled:!1,offsetX:0,offsetY:0,width:null,height:null,clip:null,fontSize:12,minFontSize:8,maxFontSize:72,textShadow:"none",adjustFontSize:{width:!1,height:!1},anchor:"center",padding:4,rotation:0,format:t.wN,positionFormatter:t.wN},defaultSimpleLabelsSettings:{fontSize:13,fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontColor:"#7c868e",textDirection:"ltr",fontOpacity:1,fontDecoration:"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:"normal",lineHeight:"normal",textIndent:0,textShadow:"none",vAlign:"top",hAlign:"left",wordWrap:null,wordBreak:null,textOverflow:!1,selectable:!1,useHtml:!1,allowMultiline:!1,padding:4,width:null,height:null,anchor:"left-top",position:"left-top",offsetX:0,offsetY:0,enabled:!0,disablePointerEvents:!0},defaultMarkerFactory:{anchor:"center",size:6,offsetX:0,offsetY:0,rotation:0,positionFormatter:t.wN},defaultTitle:{enabled:!1,fontSize:16,text:"Title text",maxLength:null,width:null,height:null,align:"center",hAlign:"center",padding:0,margin:0},defaultTooltip:{enabled:!0,title:{fontColor:"#ffffff",text:"",fontSize:14,rotation:0,align:"left",hAlign:"left",orientation:"top",zIndex:1,background:{fill:"none",stroke:"none"}},contentInternal:{enabled:!0,fontSize:12,minFontSize:9,maxFontSize:13,fontColor:"#ffffff",hAlign:"left",text:"Tooltip Text",width:"100%",height:"100%",anchor:"left-top",offsetX:0,offsetY:0,position:"left-top",adjustFontSize:{width:!1,height:!1},padding:0,rotation:0,zIndex:1,background:{disablePointerEvents:!1,fill:"none",stroke:"none"}},fontSize:12,minFontSize:9,maxFontSize:13,maxLength:null,fontColor:"#ffffff",text:"Tooltip Text",width:null,height:null,adjustFontSize:{width:!1,height:!1},background:{enabled:!0,fill:"#212121 0.7",corners:3,zIndex:0,cornerType:"round"},offsetX:10,offsetY:10,padding:{top:5,right:10,bottom:5,left:10},valuePrefix:"",valuePostfix:"",position:"left-top",anchor:"left-top",hideDelay:0,titleFormat:t.wN,format:function(){return this.valuePrefix+t.vN(this.value)+this.valuePostfix},unionFormat:"{%joinedFormattedValues}",zIndex:0,allowLeaveChart:!0,allowLeaveScreen:!1,allowLeaveStage:!1},defaultAxis:{value:null,enabled:!0,startAngle:0,drawLastLabel:!0,drawFirstLabel:!0,staggerMaxLines:2,staggerMode:!1,staggerLines:null,width:null,overlapMode:"no-overlap",stroke:"#CECECE",title:{padding:5,fontSize:13,text:"Axis title",fontColor:"#545f69",zIndex:35},labels:{enabled:!0,format:t.wN,position:"outside",zIndex:35},minorLabels:{fontSize:9,format:t.wN,position:"outside",zIndex:35},ticks:{enabled:!0,length:6,position:"outside",stroke:"#CECECE",zIndex:35},minorTicks:{enabled:!1,length:4,position:"outside",stroke:"#EAEAEA",zIndex:35},zIndex:35},defaultGridSettings:{enabled:!0,isMinor:!1,drawFirstLine:!0,drawLastLine:!0,fill:function(){return this.palette.nc(this.index)},palette:{items:["none"]},stroke:"#CECECE",scale:1,zIndex:11},defaultMinorGridSettings:{isMinor:!0,stroke:"#EAEAEA",zIndex:10},defaultLineMarkerSettings:{enabled:!0,value:0,layout:null,stroke:{color:"#7c868e",thickness:2,opacity:1,dash:"",lineJoin:"miter",lineCap:"square"},zIndex:25.2,scale:1,scaleRangeMode:"none"},defaultTextMarkerSettings:{fontSize:12,value:0,anchor:"auto",align:"center",layout:null,text:"Text marker",zIndex:25.3,scale:1,scaleRangeMode:"none",rotation:null},defaultRangeMarkerSettings:{enabled:!0,from:0,to:0,layout:null,fill:"#c1c1c1 0.4",zIndex:25.1,scale:1,scaleRangeMode:"none"},defaultLegend:{enabled:!1,vAlign:"bottom",fontSize:12,textOverflow:"...",itemsLayout:"horizontal",itemsHAlign:"left",positionMode:"outside",itemsSpacing:15,items:null,itemsFormat:null,itemsSourceMode:"default",inverted:!1,hoverCursor:"pointer",iconTextSpacing:5,iconSize:15,width:null,height:null,position:"top",align:"center",padding:{top:0,right:10,bottom:10,left:10},margin:0,title:{fontSize:15},paginator:{enabled:!0,fontSize:12,fontColor:"#545f69",orientation:"right",layout:"horizontal",padding:{top:0,right:0,bottom:0,left:5},margin:0,zIndex:30,buttonsSettings:{normal:{stroke:"#757575",fill:"#9e9e9e"},hover:{stroke:"#546e7a",fill:"#7c868e"},pushed:{stroke:"#7c868e",fill:"#9e9e9e"},disabled:{stroke:null,fill:"#e0e0e0"}}},titleFormat:null,tooltip:{enabled:!1,allowLeaveScreen:!0},drag:!1,maxWidth:null,maxHeight:null,zIndex:200},defaultCrosshairLabel:{x:0,y:0,axisIndex:0,anchor:null,format:t.wN,enabled:!0,fontSize:12,minFontSize:8,maxFontSize:16,fontColor:"#ffffff",fontWeight:400,disablePointerEvents:!0,text:"Label text",background:{enabled:!0,disablePointerEvents:!0,fill:"#212121 0.7",corners:3,zIndex:0},padding:{top:5,right:10,bottom:5,left:10},width:null,height:null,offsetX:0,offsetY:0,adjustFontSize:{width:!1,height:!1},rotation:0},defaultCallout:{enabled:!0,orientation:"left",title:{enabled:!1},padding:0,margin:0,align:"center",labels:{enabled:!0,vAlign:"middle",hAlign:"center",positionFormatter:t.wN,adjustFontSize:!1,connectorStroke:null}},defaultScroller:{enabled:!1,fill:"#f7f7f7",selectedFill:"#ddd",outlineStroke:"none",height:16,minHeight:null,maxHeight:null,autoHide:!1,orientation:"bottom",position:"after-axes",allowRangeChange:!0,thumbs:{enabled:!0,autoHide:!1,normal:{fill:"#E9E9E9",stroke:"#7c868e"},hovered:{fill:"#ffffff",stroke:"#757575"}},inverted:!1,zIndex:35},defaultLabelSettings:{enabled:!0,text:"Chart label",width:null,height:null,anchor:"left-top",position:"left-top",offsetX:0,offsetY:0,minFontSize:8,maxFontSize:72,adjustFontSize:{width:!1,height:!1},rotation:0,zIndex:50},defaultButtonSettings:{padding:[3,5],normal:{hAlign:"center",vAlign:"middle",background:{enabled:!0,stroke:"#dedede",fill:"#e7e7e7",corners:[0]},content:"Button",disablePointerEvents:!0,selectable:!1,adjustFontSize:{width:!1,height:!1},minFontSize:8,maxFontSize:72},hovered:{},selected:{}},defaultNoDataLabel:{padding:{},disablePointerEvents:!1,enabled:!1,background:{zIndex:0,enabled:!1,visible:!1,disablePointerEvents:!1},fontFamily:"Arial",fontColor:"black",fontWeight:"bold",fontSize:15,position:"center",anchor:"center",zIndex:999999,text:"No data."},stageCredits:{text:"AnyChart",url:"https://www.anychart.com/?utm_source=registered",alt:"AnyChart - JavaScript Charts designed to be embedded and integrated{{anychart-version}}",imgAlt:"AnyChart - JavaScript Charts",logoSrc:"https://static.anychart.com/logo.png"},chart:{zIndex:0,enabled:!0,padding:{top:10,right:20,bottom:15,left:10},margin:{top:0,right:0,bottom:0,left:0},autoRedraw:!0,background:{enabled:!0,zIndex:.5},contextMenu:{fromTheme:!0,enabled:!0},title:{text:"Chart Title",padding:{top:0,right:0,bottom:10,left:0},zIndex:80,background:{zIndex:0}},animation:{enabled:!1,duration:1e3},interactivity:{hoverMode:"single",selectionMode:"multi-select",spotRadius:2,multiSelectOnClick:!1,unselectOnClickOutOfPoint:!0},tooltip:{displayMode:"single",positionMode:"float",title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return s(this.points[0])},format:function(){return this.formattedValues.join("\n")}},bounds:{top:null,right:null,bottom:null,left:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null},credits:{},defaultSeriesSettings:{base:{enabled:!0,isVertical:null,background:{enabled:!0},tooltip:{titleFormat:function(){return s(this)},format:function(){return this.seriesName+": "+this.valuePrefix+t.vN(this.value)+this.valuePostfix}},normal:{fill:t.BN,stroke:t.HN,lowStroke:t.HN,highStroke:t.HN,lowFill:t.zN,highFill:t.zN,negativeFill:t.zN,negativeStroke:t.HN,risingFill:t.zN,risingStroke:t.HN,fallingFill:t.zN,fallingStroke:t.HN,risingHatchFill:!1,fallingHatchFill:!1,hatchFill:!1,labels:{enabled:null,anchor:"auto",position:"value"},minLabels:{enabled:null},maxLabels:{enabled:null},outlierMarkers:{enabled:null},markers:{enabled:!1,disablePointerEvents:!1,position:"value",positionFormatter:t.wN,size:4}},hovered:{fill:t.zN,stroke:t.JN,lowFill:t.zN,highFill:t.zN,lowStroke:t.JN,highStroke:t.JN,negativeFill:t.zN,negativeStroke:t.JN,risingFill:t.zN,fallingFill:t.zN,risingStroke:t.JN,fallingStroke:t.JN,risingHatchFill:null,fallingHatchFill:null,hatchFill:null,labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null},outlierMarkers:{enabled:null},markers:{enabled:null,size:6}},selected:{fill:"#333 0.85",stroke:"#333 0.85",lowStroke:"#333 0.85",highStroke:"#333 0.85",lowFill:"#333 0.85",highFill:"#333 0.85",negativeFill:"#333 0.85",negativeStroke:"#333 0.85",risingFill:"#333 0.85",risingStroke:"#333 0.85",fallingFill:"#333 0.85",fallingStroke:"#333 0.85",risingHatchFill:null,fallingHatchFill:null,hatchFill:null,labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null},outlierMarkers:{enabled:null},markers:{enabled:null,fill:"#333 0.85",stroke:"1.5 #212121",size:6}},legendItem:{enabled:!0,iconType:"square"},clip:!0,color:null,xScale:null,yScale:null,error:{mode:"both",xError:null,xUpperError:null,xLowerError:null,valueError:null,valueUpperError:null,valueLowerError:null,xErrorWidth:10,valueErrorWidth:10,xErrorStroke:t.EN,valueErrorStroke:t.EN},pointWidth:null,connectMissingPoints:!1,a11y:{enabled:!1,titleFormat:"Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"}},marker:{normal:{fill:t.zN,stroke:n,size:4,labels:{offsetY:3}},hovered:{fill:t.FN,stroke:n,size:6},selected:{fill:"#333 0.85",stroke:"1.5 #212121",size:6},legendItem:{iconStroke:"none"}},bubble:{normal:{fill:t.AN,negativeFill:function(){return t.Ql(t.Ql(t.Ql(this.sourceColor)))},negativeStroke:function(){return t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor))))},negativeHatchFill:!1,labels:{anchor:"center"}},hovered:{fill:t.CN,negativeFill:function(){return t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor))))},negativeStroke:function(){return t.Ql(t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor)))))},negativeHatchFill:null},selected:{negativeFill:function(){return t.Ql(t.Ql(t.Ql(this.sourceColor)))},negativeStroke:function(){return t.Ql(t.Ql(t.Ql(t.Ql(this.sourceColor))))},negativeHatchFill:null},displayNegative:!1,legendItem:{iconStroke:"none"}},areaLike:{normal:{fill:t.BN},hovered:{fill:t.BN,markers:{enabled:!0}},selected:{markers:{enabled:!0}},legendItem:{iconStroke:"none"},stepDirection:"center"},barLike:{normal:{fill:t.DN},hovered:{fill:t.BN},legendItem:{iconStroke:"none"}},lineLike:{hovered:{markers:{enabled:!0}},selected:{markers:{enabled:!0}},stepDirection:"center"},rangeLike:{normal:{labels:{format:function(){return t.vN(this.high)},position:"high"},markers:{position:"high"}},tooltip:{format:t.KN}},candlestick:{normal:{risingFill:"#64b5f6",risingStroke:"#64b5f6",fallingFill:"#ef6c00",fallingStroke:"#ef6c00",risingHatchFill:!1,fallingHatchFill:!1,markers:{position:"high"},labels:{position:"high",format:e}},hovered:{risingFill:t.FN,risingStroke:t.EN,fallingFill:t.FN,fallingStroke:t.EN,risingHatchFill:null,fallingHatchFill:null},selected:{risingFill:"#333 0.85",risingStroke:"#333 0.85",fallingFill:"#333 0.85",fallingStroke:"#333 0.85",risingHatchFill:null,fallingHatchFill:null},tooltip:{format:i}},column:{isVertical:!1,normal:{labels:{offsetY:3}}},ohlc:{normal:{risingStroke:"#64b5f6",fallingStroke:"#ef6c00",markers:{position:"high"},labels:{position:"high",format:e}},hovered:{risingStroke:t.EN,fallingStroke:t.EN},selected:{risingStroke:"3 #333 0.85",fallingStroke:"3 #333 0.85"},tooltip:{format:i}},stick:{normal:{stroke:t.IN}},jumpLine:{pointWidth:"100%"},hilo:{pointWidth:1}},chartLabels:[],maxBubbleSize:"20%",minBubbleSize:"5%",a11y:{enabled:!0,titleFormat:t.NN,mode:"chart-elements"},normal:{labels:{enabled:!1},minLabels:{enabled:null},maxLabels:{enabled:null}},hovered:{labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null}},selected:{labels:{enabled:null},minLabels:{enabled:null},maxLabels:{enabled:null}},crossing:{stroke:"none"},baseline:0,defaultQuarterSettings:{enabled:!1,zIndex:1,fill:"none",stroke:"none",title:{padding:5},defaultLabelSettings:{text:"Quarter label",anchor:"center",position:"center"},margin:{},padding:{}},quarters:{rightTop:{fill:"#e3f2fd",title:{orientation:"top"}},leftTop:{title:{orientation:"top"}},leftBottom:{fill:"#e3f2fd",title:{orientation:"bottom"}},rightBottom:{title:{orientation:"bottom"}}},selectRectangleMarqueeFill:"#d3d3d3 0.4",selectRectangleMarqueeStroke:"#d3d3d3",maxPointWidth:"100%",minPointLength:0,dataArea:{zIndex:10,background:{fill:"none"}}},cartesianBase:{defaultSeriesSettings:{base:{normal:{labels:{enabled:null,format:"{%Value}{decimalsCount:2}"}}},bar:{isVertical:!0,normal:{labels:{offsetY:3}},tooltip:{anchor:"left-top"}},column:{tooltip:{anchor:"left-top"}},rangeColumn:{isVertical:!1,tooltip:{anchor:"left-top",offsetX:10}},rangeBar:{normal:{labels:{offsetY:3}},isVertical:!0},box:{normal:{medianStroke:t.EN,stemStroke:t.EN,whiskerStroke:t.EN,whiskerWidth:0,outlierMarkers:{enabled:!0,disablePointerEvents:!1,position:"center",rotation:0,anchor:"center",offsetX:0,offsetY:0,type:"circle",size:3,positionFormatter:t.wN},markers:{position:"median"},labels:{position:"highest",format:function(){return"Highest: "+t.vN(this.highest)+"\nMedian: "+t.vN(this.median)+"\nLowest: "+t.vN(this.lowest)}}},hovered:{medianStroke:t.zN,stemStroke:t.zN,whiskerStroke:t.EN,whiskerWidth:null,outlierMarkers:{enabled:null,size:4}},selected:{medianStroke:"#333 0.85",stemStroke:"#333 0.85",whiskerStroke:"#333 0.85",whiskerWidth:null,outlierMarkers:{enabled:null,size:4,fill:"#333 0.85",stroke:"1.5 #212121"}},tooltip:{titleFormat:function(){return this.name||this.x},format:function(){return"Lowest: "+this.valuePrefix+t.vN(this.lowest)+this.valuePostfix+"\nQ1: "+this.valuePrefix+t.vN(this.q1)+this.valuePostfix+"\nMedian: "+this.valuePrefix+t.vN(this.median)+this.valuePostfix+"\nQ3: "+this.valuePrefix+t.vN(this.q3)+this.valuePostfix+"\nHighest: "+this.valuePrefix+t.vN(this.highest)+this.valuePostfix}}}},defaultXAxisSettings:{orientation:"bottom",title:{text:"X-Axis",padding:{top:5,right:0,bottom:0,left:0}},labels:{format:function(){var e=this.tickValue;switch(this.scale.Ma()){case"ordinal":return this.value;case"date-time":var i=this.intervalUnit;return t.us(e,t.ss(t.rs(i,i,"charts")));default:return t.Bs(this.value)}}},minorLabels:{format:function(){var e=this.tickValue;switch(this.scale.Ma()){case"ordinal":return this.value;case"date-time":var i=this.minorIntervalUnit;return t.us(e,t.ss(t.rs(i,t.vp(i),"charts")));default:return t.Bs(this.value)}}},scale:0},defaultYAxisSettings:{orientation:"left",title:{text:"Y-Axis",padding:{top:0,right:0,bottom:5,left:0}},labels:{format:"{%Value}"},scale:1},defaultAnnotationSettings:{},annotations:{annotationsList:[],zIndex:2e3},xAxes:[{}],yAxes:[{}],xGrids:[],yGrids:[],xMinorGrids:[],yMinorGrids:[],series:[],lineAxesMarkers:[],rangeAxesMarkers:[],textAxesMarkers:[],xScale:0,yScale:1,barsPadding:.4,barGroupsPadding:.8,maxBubbleSize:"20%",minBubbleSize:"5%",isVertical:!1,scales:[{type:"ordinal"},{type:"linear"}],yScroller:{orientation:"left",inverted:!1},crosshair:{enabled:!1,displayMode:"float",xStroke:"#969EA5",yStroke:"#969EA5",zIndex:41,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},xZoom:{continuous:!0,startRatio:0,endRatio:1},yZoom:{continuous:!0,startRatio:0,endRatio:1},a11y:{titleFormat:t.PN}},pieFunnelPyramidBase:{mode3d:!1,animation:{duration:500},normal:{fill:t.zN,stroke:"none",hatchFill:null,labels:{enabled:!0,fontColor:null,position:"inside",disablePointerEvents:!1,autoRotate:!1,zIndex:34,format:function(){return this.name?this.name:this.x}},markers:{enabled:!1,position:"center",positionFormatter:t.wN,zIndex:33}},hovered:{fill:t.FN,stroke:t.zN,labels:{enabled:null},markers:{enabled:null}},selected:{fill:"#333 0.85",stroke:"1.5 #212121",labels:{enabled:null},markers:{enabled:null}},connectorStroke:"#CECECE",overlapMode:"no-overlap",connectorLength:20,baseWidth:"70%",neckWidth:null,neckHeight:null,pointsPadding:0,forceHoverLabels:!0,outsideLabels:{disablePointerEvents:!1,autoColor:"#545f69"},insideLabels:{disablePointerEvents:!0,autoColor:"#ffffff"},legend:{enabled:!0,padding:{top:10,right:10,bottom:0,left:10},position:"bottom"},tooltip:{title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){return"Value: "+t.vN(this.value)+"\nPercent Value: "+(100*this.value/this.getStat("sum")).toFixed(1)+"%"}},interactivity:{hoverMode:"single"}},defaultScrollBar:{barSize:10,backgroundFill:"#e0e0e0",backgroundStroke:"#d5d5d5",sliderFill:"#d5d5d5",sliderStroke:"#656565",mouseOverOpacity:.45,mouseOutOpacity:.25,handlePositionChange:!0,startRatio:"0",endRatio:"1",buttonsVisible:!1,cornersRadius:5},standalones:{background:{enabled:!0,zIndex:0},label:{enabled:!0,text:"Label text",padding:0,width:null,height:null,anchor:"left-top",position:"left-top",offsetX:0,offsetY:0,minFontSize:8,maxFontSize:72,adjustFontSize:{width:!1,height:!1},rotation:0,zIndex:0},labelsFactory:{enabled:!0,zIndex:0},legend:{enabled:!0,zIndex:0},markersFactory:{enabled:!0,zIndex:0},title:{enabled:!0,zIndex:0},linearAxis:{enabled:!0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0}},polarAxis:{enabled:!0,startAngle:0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0}},radarAxis:{enabled:!0,startAngle:0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0}},radialAxis:{enabled:!0,startAngle:0,innerRadius:0,zIndex:0,ticks:{enabled:!0},minorTicks:{enabled:!0},minorLabels:{padding:{top:1,right:1,bottom:0,left:1}}},linearGrid:{enabled:!0,scale:null,zIndex:0},polarGrid:{enabled:!0,layout:"circuit",zIndex:0},radarGrid:{enabled:!0,layout:"circuit",zIndex:0},lineAxisMarker:{enabled:!0,zIndex:0},textAxisMarker:{enabled:!0,zIndex:0},rangeAxisMarker:{enabled:!0,zIndex:0},scroller:{enabled:!0}}})}.call(this,$)),_.theme_tag_cloud||(_.theme_tag_cloud=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{tagCloud:{anglesCount:7,fromAngle:-90,toAngle:90,mode:"spiral",textSpacing:1,scale:{type:"linear"},colorRange:{},colorScale:null,normal:{fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontOpacity:1,fontDecoration:"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fill:function(){return t.Ul(this.scaledColor||this.sourceColor,.85,!0)},stroke:"none"},hovered:{fill:t.BN,stroke:"none"},selected:{fill:"#333 0.85",stroke:"none"},tooltip:{enabled:!0,title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){return"Frequency: "+t.vN(this.value)+"\nPercent of total: "+(100*this.value/this.getStat("sum")).toFixed(1)+"%"}},legend:{enabled:!1,itemsSourceMode:"categories",tooltip:{contentInternal:{background:{disablePointerEvents:!1}}}}}})}.call(this,$)),_.color_scales||(_.color_scales=1,function(t){var e,i,n,s,a;t.SN=function(t,e){var i=t.g("fontSize")!=e;null===e?delete t.Nd.fontSize:t.Nd.fontSize=e,i&&t.B(4)},t.TN=function(e){var i={};return t.Dc(e.Pa,(function(e,n){t.p(e)&&("adjustByHeight"!=n&&"adjustByWidth"!=n||(n="adjustFontSize"),i[n]=this.nd(n))}),e),i},t.UN=function(e,i){return t.zk(o,e,i||"clip")},e=function(){t.Qy.call(this)},t.WN=function(){t.Sy.call(this),this.Ga("defaultColorRange"),t.su(this,this,this.If,this.hg,null,this.If),this.wc.wa(this,"mousedown",this.Ds),this.se|=1024,t.T(this.ua,[["length",this.se,9],["align",this.se,9],["colorLineSize",this.se,9]])},t.XN=function(t){t.line&&(t.line.Bl(),t.line.remove(),t.line=null),t.lines&&(t.lines.length=0)},i=function(e){if(e.b){var i=e.scale();if(i&&t.J(i,t.iz)){e.i={};for(var n=e.b,s=n.Ec();s.advance();){var a=(t.p(n.ea)?s.j(n.ea):null)||s.get(n.bf?n.bf.El:n.Hr[1]);!(a=i.Dn(a))||(0,window.isNaN)(a.start)||(0,window.isNaN)(a.end)||(e.i[a.sourceIndex]||(e.i[a.sourceIndex]=[]),e.i[a.sourceIndex].push(s.ma()))}}}},n=function(e,i,n){var s=0;return i.enabled()&&(s=i.g("length"),s="center"==(i=i.g("position"))?Math.max((s-e.g("colorLineSize"))/2,0):t.p(n)?0<n?"outside"==i?0:s:0>n&&"inside"==i?0:s:s),s},s=function(e){var i=0,n=t.wr(e,"marker");if(n&&n.enabled()){e=e.g("orientation"),i=2*n.g("size");var s=n.g("offsetX");switch(n=n.g("offsetY"),s=t.p(s)?s:0,n=t.p(n)?n:0,e){case"top":i+=n;break;case"right":i-=s;break;case"bottom":i-=n;break;case"left":i+=s}}return i},t.aO=function(e,i){if(e.b){var n=e.scale(),s=t.wr(e,"marker"),a=e.b,o=a.kd()||(a.Bn?a.Bn():void 0),r=s&&s.enabled();if(a=a.enabled()&&o==n,e.enabled()&&r&&n&&a&&(n=e.line.rb(),r=t.Za(e.scale().transform(i,.5),0,1),!(0,window.isNaN)(r))){switch(a=e.g("orientation"),o=s.g("size"),a){case"top":var l=n.left+n.width*r,h=n.top+n.height+o,c=180;break;case"bottom":l=n.left+n.width*r,h=n.top-o,c=0;break;case"left":l=n.left+n.width+o,h=n.top+n.height-n.height*r,c=90;break;case"right":l=n.left-o,h=n.top+n.height-n.height*r,c=-90}s.ka(),s.ta("rotation",c),s.jc({value:{x:l,y:h}}),s.da(!1),s.W(),s.Vd().visible(!0)}}},t.bO=function(e){var i=t.wr(e,"marker");e.scale()&&i&&i.Vd().visible(!1)},a=function(){t.WN.call(this)},t.eB.prototype.Bn=t.ca(28,(function(){return this.vb}));var o={dma:"always-show",qna:"clip",f8:"drop"};t.H(e,t.Qy),e.prototype.h1=function(t,e,i,n,s){if(e=Math.round(e.left+t*e.width),e=1==t?e+s:e-s,t=this.g("length"),"outside"==(s=this.g("position")))var a=i.top-n/2,o=-t;else"center"==s?(a=i.top+(i.height-t)/2,o=t):"inside"==s&&(a=i.Va()+n/2,o=t);this.path.moveTo(e,a),this.path.lineTo(e,a+o)},e.prototype.nT=function(t,e,i,n,s){e=Math.round(e.top+e.height-t*e.height),e=1==t?e-s:e+s,t=this.g("length"),"outside"==(s=this.g("position"))?(i=i.cb()+n/2,n=t):"center"==s?(i=i.left+(i.width-t)/2,n=t):(i=i.left-n/2,n=-t),this.path.moveTo(i,e),this.path.lineTo(i+n,e)},e.prototype.hT=function(t,e,i,n,s){if(e=Math.round(e.left+t*e.width),e=1==t?e+s:e-s,t=this.g("length"),"outside"==(s=this.g("position")))var a=i.Va()+n/2,o=t;else"center"==s?(a=i.top+(i.height-t)/2,o=t):"inside"==s&&(a=i.top-n/2,o=-t);this.path.moveTo(e,a),this.path.lineTo(e,a+o)},e.prototype.lT=function(t,e,i,n,s){if(e=Math.round(e.top+e.height-t*e.height),e=1==t?e-s:e+s,t=this.g("length"),"outside"==(s=this.g("position")))var a=i.left-n/2,o=-t;else"center"==s?(a=i.left+(i.width-t)/2,o=t):"inside"==s&&(a=i.cb()+n/2,o=t);this.path.moveTo(a,e),this.path.lineTo(a+o,e)},t.H(t.WN,t.Sy);var r={};t.sq(r,[[0,"colorLineSize",t.Bq],t.Z.eK,t.Z.iK]),t.U(t.WN,r),t.g=t.WN.prototype,t.g.sa=1024|t.Sy.prototype.sa,t.g.ol=function(){return new e},t.g.Bz=function(){return this.line||(t.J(this.scale(),t.fz)?this.line=t.qk():t.J(this.scale(),t.iz)&&(this.line=t.ok(),this.lines=[]),this.line.zIndex(this.zIndex()),this.line.parent(this.O()),this.line.cursor("pointer"),t.ru(this,this.line)),this.line},t.g.Br=function(e){return this.$l||(this.$l=new t.ey,t.W(this,"marker",this.$l),this.$l.jc({value:{x:0,y:0}}),t.K(this.$l,this.Aaa,this)),t.p(e)?(this.$l.N(e),this.B(1024,1),this):this.$l},t.g.Aaa=function(e){t.X(e,1)&&this.B(1024,1)},t.g.target=function(e){return t.p(e)?(this.b!=e&&(this.b=e,i(this),t.K(this.b,this.Zka,this)),this):this.b},t.g.Zka=function(e){t.X(e,132)&&i(this)},t.g.nq=function(e,i){var n=this.scale(),s={};if(t.J(n,t.fz))var a=(0,window.parseFloat)(i),o=n.CE(a),r="number";else if(t.J(n,t.iz)){a=i,o=n.Xa().names()[e],r="string";var l=n.Dn(i);l&&(s.colorRange={value:{color:l.color,end:l.end,name:l.name,start:l.start,index:l.sourceIndex},type:""})}return s.index={value:e,type:"number"},s.value={value:o,type:r},s.tickValue={value:a,type:"number"},s.max={value:t.p(n.max)?n.max:null,type:"number"},s.min={value:t.p(n.min)?n.min:null,type:"number"},s.scale={value:n,type:""},t.ov(new t.Fw(s))},t.g.hR=function(e,i,n,s,a){n=e.top+e.height+n/2-s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(e.left+i,n).lineTo(e.left-i+e.width,n).lineTo(e.left-i+e.width,n-a).lineTo(e.left+i,n-a).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.width/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.left+i+r*l;u.moveTo(d,n).lineTo(d+r,n).lineTo(d+r,n-a).lineTo(d,n-a).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.gR=function(e,i,n,s,a){n=e.left-n/2+s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(n,e.top+i).lineTo(n,e.top-i+e.height).lineTo(n+a,e.top-i+e.height).lineTo(n+a,e.top+i).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.height/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.top+i+r*(s.length-1-l-1);u.moveTo(n,d).lineTo(n,d+r).lineTo(n+a,d+r).lineTo(n+a,d).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.eR=function(e,i,n,s,a){n=e.top-n/2+s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(e.left+i,n).lineTo(e.left-i+e.width,n).lineTo(e.left-i+e.width,n+a).lineTo(e.left+i,n+a).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.width/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.left+i+r*l;u.moveTo(d,n).lineTo(d+r,n).lineTo(d+r,n+a).lineTo(d,n+a).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.fR=function(e,i,n,s,a){n=e.left+e.width+n/2-s;var o=this.scale();if(t.J(o,t.fz))this.line.moveTo(n,e.top+i).lineTo(n,e.top-i+e.height).lineTo(n-a,e.top-i+e.height).lineTo(n-a,e.top+i).close();else if(t.J(o,t.iz)){s=o.sr(),o=o.Jj();for(var r=e.height/(s.length-1),l=0,h=s.length-1;l<h;l++){var c=s[l];c=c.color||o[c.sourceIndex]||o[o.length-1];var u=this.lines[l]?this.lines[l].clear():this.lines[l]=this.line.path(),d=e.top+i+r*(s.length-1-l-1);u.moveTo(n,d).lineTo(n,d+r).lineTo(n-a,d+r).lineTo(n-a,d).close(),u.stroke(this.g("stroke")),u.fill(c)}}},t.g.lo=function(){var e=this.Bz(),i=this.scale();if(i||this.scale(t.gz()),t.J(i,t.fz))e.clear(),e.stroke(this.g("stroke")),i=t.Ub(i.Jj()),this.Nb()?i.angle=0:i.angle=90,e.fill(i);else if(t.J(i,t.iz))for(e=0,i=this.lines.length;e<i;e++)this.lines[e].clear();switch(this.g("orientation")){case"top":var a=this.hR;break;case"right":a=this.gR;break;case"bottom":a=this.eR;break;case"left":a=this.fR}e=this.g("stroke"),i=0==(e=!(e=t.Wb(e))||t.cp(e)?0:e.thickness?(0,window.parseFloat)(e.thickness):1)%2?0:.5;var o=this.ob(),r=s(this),l=Math.round(this.g("colorLineSize")),h=n(this,this.Xa(),1),c=n(this,this.yb(),1);a.call(this,o,i,e,Math.max(h,c,r),l)},t.g.ob=function(){if(!this.Hq||this.J(4)){var e=this.ja();if(e){if(e.top=Math.round(e.top),e.left=Math.round(e.left),e.width=Math.round(e.width),e.height=Math.round(e.height),this.Nb())var i=e.width,n=e.height;else i=e.height,n=e.width;var s=this.Jg(i);n=this.width()?t.L(this.width(),n):t.Wy(this,e,s);var a=this.padding(),o=t.L(a.g("top"),e.height),r=t.L(a.g("right"),e.width),l=t.L(a.g("bottom"),e.height);a=t.L(a.g("left"),e.width);var h,c=this.g("align");switch(this.Nb()?(s+r+a>i&&(s=i-(r+a)),"left"==c||"top"==c?h=a:"right"==c||"bottom"==c?h=i-s-r:"center"==c&&(h=(i-s-r-a)/2)):(s+l+o>i&&(s=i-(l+o)),"left"==c||"top"==c?h=o:"right"==c||"bottom"==c?h=i-s-l:"center"==c&&(h=(i-s-l-o)/2)),this.g("orientation")){case"top":var u=e.top+o,d=e.left+h,p=n,g=s;break;case"right":u=e.top+h,d=e.left+e.width-n-r,p=s,g=n;break;case"bottom":u=e.top+e.height-n-l,d=e.left+h,p=n,g=s;break;case"left":u=e.top+h,d=e.left+a,p=s,g=n}this.Hq=new t.I(Math.round(d),Math.round(u),Math.round(g),Math.round(p))}else this.Hq=new t.I(0,0,0,0);this.I(4)}return this.Hq},t.g.Jg=function(e){return t.L(this.g("length"),e)},t.g.l0=function(e,i){var a=this.Xa(),o=this.yb(),r=a.g("position"),l=o.g("position");a=n(this,a);var h=n(this,o);return o=s(this),"outside"==r?"outside"==l?r=Math.max(e+a,i+h):(r="inside"==l?Math.max(e+a,i):Math.max(e+a,i+h),o=Math.max(h,o)):"inside"==r?"outside"==l?(r=Math.max(e,i+h),o=Math.max(a,o)):(r="inside"==l?Math.max(e,i):Math.max(e,i+h),o=Math.max(a,h,o)):"outside"==r?(r=Math.max(e+a,i+h),o=Math.max(a,o)):(r="inside"==l?Math.max(e+a,i):Math.max(e+a,i+h),o=Math.max(a,h,o)),l=!(l=this.g("stroke"))||t.cp(l)?0:l.thickness?(0,window.parseFloat)(l.thickness):1,r+o+(l=Math.round(this.g("colorLineSize"))+l)},t.g.scale=function(e){return(e=t.WN.u.scale.call(this,e))||(this.f||(this.f=t.gz(),this.f.Jj("#fff","#000")),e=this.f),e},t.g.WT=function(){return 48},t.g.zg=function(e){t.X(e,2)&&t.XN(this),t.WN.u.zg.call(this,e)},t.g.W=function(){if(!this.zc())return this;var e=t.wr(this,"marker");if(this.J(1024)&&(e&&(e.O(this.O()),e.zIndex(this.zIndex()+1),e.W(),e.Vd().visible(!1)),this.I(1024)),e&&(this.J(2)&&e.O(this.O()),this.J(8))){var i=this.zIndex();e.zIndex(i+1)}return t.WN.u.W.call(this)},t.g.Ds=function(e){if(this.b){var i=this.scale(),n=this.b,s=n&&(n.kd()||(n.Bn?n.Bn():void 0));if(this.enabled()&&i&&n.enabled()&&s==i){if(s=this.line.rb(),this.Nb()){var a=e.clientX,o=s.left+t.Zj(this.O().Ja()).x;s=(a-o)/s.width}else a=e.clientY,o=s.top+t.Zj(this.O().Ja()).y,s=(s.height-(a-o))/s.height;if(s=i.Mc(s),e.metaKey||e.shiftKey||!n.map||n.map.ie(),t.J(i,t.iz))s=i.Dn(s),i&&n&&(a=this.i[s.sourceIndex],"single"==(i=(i=n.xc()).gd()).g("hoverMode")?this.fg={X:n,vd:a}:this.fg=[{X:n,vd:a,Ln:a[a.length-1],De:{index:a[a.length-1],Tf:0}}]);else if(t.J(i,t.fz)){e=n.Ec(),a=window.Infinity;for(var r=window.NaN,l=i.uh(),h=i.di();e.advance();){o=e.get(n.bf?n.bf.El:n.Hr[1]),o=t.Za(o,l,h);var c=Math.abs(s-o);a>c&&(a=c,r=o)}for(a=[],e=n.Ec(),s=r;e.advance();)o=e.get(n.bf?n.bf.El:n.Hr[1]),(o=t.Za(o,l,h))==s&&a.push(e.ma());i&&n&&("single"==(i=(i=n.xc()).gd()).g("hoverMode")?this.fg={X:n,vd:a}:this.fg=[{X:n,vd:a,Ln:a[a.length-1],De:{index:a[a.length-1],Tf:0}}])}}}},t.g.If=function(e){if(this.b){var i=this.scale(),n=this.b,s=n.kd()||(n.Bn?n.Bn():void 0);if(this.enabled()&&i&&n.enabled()&&s==i){if(s=this.line.rb(),this.Nb()){var a=e.clientX,o=s.left+t.Zj(this.O().Ja()).x;s=(a-o)/s.width}else a=e.clientY,o=s.top+t.Zj(this.O().Ja()).y,s=(s.height-(a-o))/s.height;if(s=i.Mc(s),t.J(i,t.iz)){e=i.Dn(s);var r=this.i[e.sourceIndex];"single"==(o=(i=n.xc()).gd()).g("hoverMode")?this.fg={X:n,vd:r}:this.fg=[{X:n,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]}else if(t.J(i,t.fz)&&n){o=n.Ec(),r=window.Infinity;for(var l=window.NaN,h=i.uh(),c=i.di();o.advance();){a=o.get(n.bf?n.bf.El:n.Hr[1]),a=t.Za(a,h,c);var u=Math.abs(s-a);r>u&&(r=u,l=a)}for(r=[],o=n.Ec(),s=l;o.advance();)a=o.get(n.bf?n.bf.El:n.Hr[1]),(a=t.Za(a,h,c))==s&&r.push(o.ma());i&&n&&("single"==(o=(i=n.xc()).gd()).g("hoverMode")?(this.fg&&!(0,t.lD)(r,(function(e){return t.Aa(this.fg.vd,e)}),this)&&i.dispatchEvent(i.bl("hovered",e,[{X:n,vd:[],De:{index:this.fg.vd[this.fg.vd.length-1],Tf:0}}],!1)),this.fg={X:n,vd:r}):this.fg=[{X:n,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}])}t.aO(this,s)}}},t.g.hg=function(){t.bO(this);var e=this.b;e&&(this.Sa=e)},t.g.remove=function(){var e=t.wr(this,"marker");e&&e.remove(),t.WN.u.remove.call(this)},t.g.F=function(){var e=t.WN.u.F.call(this);return t.Tq(this,r,e),e.marker=this.Br().F(),e},t.g.U=function(e,i){t.WN.u.U.call(this,e,i),t.Iq(this,r,e,i),this.Br(e.marker)},t.g.R=function(){t.sd(this.$l,this.f),this.f=this.$l=null,t.WN.u.R.call(this)},t.H(a,t.WN),t.xu(a,t.WN);var l=t.WN.prototype;l.marker=l.Br,l=a.prototype,t.E("anychart.standalones.colorRange",(function(){var t=new a;return t.Ga("standalones.colorRange"),t})),l.padding=l.padding,l.draw=l.W,l.parentBounds=l.ja,l.container=l.O}.call(this,$)),_.heatmap_part||(_.heatmap_part=1,function(t){var e=function(e){t.JA.call(this,e)},i=function(e,i,n){if(n){var s=i==t.gm?"normal":i==t.vo?"hover":"select";i=e.j(s+"X");var a=e.j(s+"Y"),o=e.j(s+"Width");e=e.j(s+"Height"),e=new t.I(i,a,o,e),n.rect.Qf(e),n.hatchRect.Qf(e)}},n=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),t.Ou(this.Qa().labels(),"same"),this.Qa().labels().kb(this),this.b=t.cm("stroke",2,!0),this.ca.Jk("stroke",[1024,65,4294967295])},s=function(e,i,n,s,a){if((e=e.iA([e.Qa().labels,e.lb().labels,e.selected().labels],[],["label","hoverLabel","selectLabel"],e.kE(),!0,null,i,n,!1))&&((n=t.Uu(e)).adjustByHeight||n.adjustByHeight)){var o=i.j(s+"Width");i=i.j(s+"Height"),o-=(s=(new t.Hu).N(n.padding)).g("left")+s.g("right"),i-=s.g("top")+s.g("bottom"),t.qd(s),i=t.iv(e,o,i,n.minFontSize,n.maxFontSize,n.adjustByWidth,n.adjustByHeight),a=Math.min(a||window.Infinity,i)}return a},a=function(e,i){t.WB.call(this,!1),this.Ga("heatMap"),this.re="heat-map",this.ta("defaultSeriesType","heat-map"),this.Sa=this.Ae(this.g("defaultSeriesType"),e||null,i),t.T(this.ua,[["labelsDisplayMode",32768,1,0,function(){this.Sa.B(256)}]])},o=function(e,i){var n={},s=0,a=e.values(),o=[];if(a)for(var r=0;r<a.length;r++){var l=a[r],h=e.transform(l,0),c=e.transform(l,1);(!i||1>=Math.min(h,c)&&0<=Math.max(h,c))&&(n[t.qo(l)]=s++,o.push(String(l)))}return{values:n,names:o}},r=function(t,e){var i=new a(t,e);return i.iP(i.vf("colorScale"),i.bu()),i.Wg(),i.$c(),i};t.H(e,t.JA),t.PG[30]=e,t.g=e.prototype,t.g.type=30,t.g.flags=512,t.g.Np=["y"],t.g.Kh={rect:"rect",hatchRect:"rect"},t.g.ug=function(t,e){var n=this.bd.ed(e);i(t,e,n)},t.g.WB=function(t,e){var n=t.j("shapes");i(t,e,n)},t.H(n,t.xB),t.g=n.prototype,t.g.zQ=13e-6,t.g.sF={"%XValue":"x"},t.g.Ua=function(e){var i=this.ya.Ua(e);return t.p(e)?this:i},t.g.TQ=function(){var e,i,n=this.Qa().labels(),a=this.lb().labels(),o=this.selected().labels(),r=n.enabled(),l=r||a.enabled(),h=r||o.enabled(),c=n.jC();if(l=(c||a.jC())&&l,h=(c||o.jC())&&h,c=r&&c,r=e=i=window.NaN,t.SN(n,null),t.SN(a,null),t.SN(o,null),c||l||h){var u=this.$();for(u.reset();u.advance();)u.j("missing")||(c&&(r=s(this,u,t.gm,"normal",r)),l&&(e=s(this,u,t.vo,"hover",e)),h&&(i=s(this,u,t.wo,"select",i)))}c?t.SN(n,r):t.SN(n,null),l?t.SN(a,e):t.SN(a,null),h?t.SN(o,i):t.SN(o,null)},t.g.Dha=function(e,i,n,s){i=e.j("left");var a=e.j("right");n=e.j("top");var o=e.j("bottom"),r=this.b(this,t.gm),l=this.b(this,t.vo),h=this.b(this,t.wo);return r=t.$b(r)/2,l=t.$b(l)/2,h=t.$b(h)/2,a-=i,o-=n,e.j("normalX",i+r),e.j("normalY",n+r),e.j("normalWidth",a-r-r),e.j("normalHeight",o-r-r),e.j("hoverX",i+l),e.j("hoverY",n+l),e.j("hoverWidth",a-l-l),e.j("hoverHeight",o-l-l),e.j("selectX",i+h),e.j("selectY",n+h),e.j("selectWidth",a-h-h),e.j("selectHeight",o-h-h),s},t.g.RD=function(t){var e=this.tl(),i=this.bb(),n=t.get("x"),s=t.get("y"),a=e.transform(n,0),o=e.transform(n,1),r=i.transform(s,0);if(i=i.transform(s,1),0>a&&0>o||0>r&&0>i||1<a&&1<o||1<r&&1<i)return!1;var l=Math.round(this.Qe(a,!0)),h=Math.round(this.Qe(r,!1)),c=Math.round(this.Qe(o,!0)),u=Math.round(this.Qe(i,!1));return r=this.i/2,a=this.f/2,s=Math.min(l,c),l=Math.max(l,c),c=Math.min(h,u),h=Math.max(h,u),s+=Math.ceil(r),c+=Math.floor(a),l-=1==o?Math.ceil(r):Math.floor(r),h-=1==i?Math.floor(a):Math.ceil(a),t.j("left",s),t.j("top",c),t.j("right",l),t.j("bottom",h),t.j("x",e.transform(n,.5)),!0},t.g.bJ=function(t,e){this.Vj.length=0,this.Vj.push(this.Dha);var i=this.$();for(i.reset();i.advance();)this.XA(i,t,e);this.Vj.length=0},t.g.oG=function(e){var i=this.$(),n=i.j("left"),s=i.j("top"),a=i.j("right");return i=i.j("bottom"),(e=t.Eo(new t.I(n,s,a-n,i-s),e)).x=Math.floor(e.x),e.y=Math.floor(e.y),e},t.g.tf=function(e,i,n){var s=this.ya.g("labelsDisplayMode"),a=this.iA([this.Qa().labels,this.lb().labels,this.selected().labels],[],["label","hoverLabel","selectLabel"],this.kE(),!0,null,e,i,!1);if(a){var o=i==t.gm?"normal":i==t.vo?"hover":"select";i=e.j(o+"X");var r=e.j(o+"Y"),l=e.j(o+"Width");o=e.j(o+"Height"),r=t.kn(i,r,l,o),i=this.Qa().labels(),"drop"==s&&((l=t.Uu(a)).width=null,l.height=null,l=i.measure(a.Hf(),a.jc(),l),r.left>l.left+.5||r.cb()<l.cb()-.5||r.top>l.top+.5||r.Va()<l.Va()-.5)&&(i.clear(a.ma()),a=null),a&&((s="always-show"==s?this.fa:t.ob(this.fa,r))?(a.clip(s),n&&a.W()):i.clear(a.ma()))}e.j("label",a)},t.g.UX=function(e,i,n,s,a,o,r){t.bv(e,t.no([r,0,o,t.jo,s,0,n,t.jo,e,t.jo,o||n,t.lo,o,t.ko,e,t.lo,n,t.ko]))},t.g.nE=function(){for(var e=this.xc(),i=0,s=0,a=0,o=(e=t.Ga(e.Yg,e.Zg)).length;a<o;a++){var r=e[a];if(r&&r.enabled()){var l=t.$b(r.g("stroke"));r.Nb()?l>s&&(s=l):l>i&&(i=l)}}this.i=i,this.f=s,n.u.nE.call(this)},t.g.P_=function(e){var i=this.fa,n=i.Va()-this.Qp().bottom();return i=i.Vb()+this.Qp().top(),t.Za(e,i,n)},t.g.GS=function(){return[this,this.xc()]},t.g.aU=function(){return{}},t.g.ym=function(e,i){var n={chart:{value:this.xc(),type:""},series:{value:this,type:""},scale:{value:this.Ra(),type:""},index:{value:i.ma(),type:"number"},x:{value:i.get("x"),type:"string"},y:{value:i.get("y"),type:"string"},heat:{value:i.get("heat"),type:"number"},seriesName:{value:this.name(),type:"string"}},s=this.xc().kd();if(s){var a=i.get("heat");if(t.J(s,t.iz)){var o=s.Dn(a);o&&(n.colorRange={value:{color:o.color,end:o.end,name:o.name,start:o.start,index:o.sourceIndex},type:""}),n.color={value:s.Qq(a),type:""}}}return n},t.g.Ge=function(e,i,s){i=n.u.Ge.call(this,e,i,s),s=t.nv(i);var a,o=i.lg();s.x={value:o.get("x"),type:"string"},s.y={value:o.get("y"),type:"string"},s.heat={value:o.get("heat"),type:"number"},e=e||this.g("color")||"blue";var r=this.xc().kd();return r&&(o=o.get("heat"),t.p(o)&&(a=r.Qq(o)),s.scaledColor={value:a,type:""}),s.colorScale={value:r,type:""},s.sourceColor={value:a||e,type:""},t.ov(i,s)};var l=n.prototype;l.tooltip=l.Ua,t.H(a,t.WB),a.prototype.sa=-2147483648|t.WB.prototype.sa;var h={};h["heat-map"]={Fb:30,Kb:2,Lb:[{name:"rect",Qb:"rect",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},{name:"hatchRect",Qb:"rect",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:1e-6}],Ob:null,Jb:null,Cb:5767168|t.QG,Ab:"y",zb:"y"},a.prototype.fj=h;var c=["normal","hovered","selected"],u=["data","tooltip"];!function(){function e(e,i){for(var n=[],s=1;s<arguments.length;s++)n.push(arguments[s]);return s=(s=this.Ai(0))[e].apply(s,n),t.p(n[0])?this:s}for(var i=0;i<c.length;i++){var n=c[i];a.prototype[n]=t.qa(e,n)}}(),t.Gq(a,["fill","stroke","hatchFill","labels","markers"],"normal");var d={};t.rq(d,0,"labelsDisplayMode",t.UN),t.U(a,d),t.g=a.prototype,t.g.Ss=function(){return"heat-map"},t.g.Vv=function(t){return this.tj()?null:a.u.Vv.call(this,t)},t.g.Gt=function(t,e){return new n(this,this,t,e,!0)},t.g.CA=function(){return t.bt},t.g.xD=function(){return["HeatMap chart scale","ordinal"]},t.g.tH=function(){return"ordinal"},t.g.wu=function(){this.Sa.B(1024),this.B(8421376,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(-2147483136,1);else if(e=t.jt(this.vb,e,null,48,["HeatMap chart color scale","ordinal-color, linear-color"],this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||this.B(-2147483136,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(-2147483136,1)},t.g.Ol=function(e){var i,n=[];if("categories"==e){this.pb();var s=this.kd();if(s&&t.J(s,t.iz)){var a=this.Sa,o=s.sr();for(e=0,i=o.length;e<i;e++){var r=o[e];"default"!==r.name&&n.push({text:r.name,iconEnabled:!0,iconType:"square",iconFill:r.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:e,meta:{X:a,scale:s,xe:r}})}}}return n},t.g.Ms=function(t){return"categories"==t},t.g.zr=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){var o=[];n=n.xe;for(var r=s.Ec();r.advance();){var l=r.get("heat");n==a.Dn(l)&&o.push(r.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:o}:a.fg=[{X:s,vd:o,Ln:o[o.length-1],De:{index:o[o.length-1],Tf:0}}])}}},t.g.wq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){var o=n.xe,r=s.Ec();for(n=[];r.advance();){var l=r.get("heat");o==a.Dn(l)&&n.push(r.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:n}:a.fg=[{X:s,vd:n,Ln:n[n.length-1],De:{index:n[n.length-1],Tf:0}}])}}},t.g.vq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")&&"single"==this.gd().g("hoverMode")){var s=t.so(i.domTarget);s&&(s.X=n.X)}},t.g.mG=function(e,i){for(var n=[],s=0,a=e.length;s<a;s++){var o,r=e[s];o=r.De?{index:r.De.index,distance:r.De.Tf}:{index:window.NaN,distance:window.NaN},n.push({series:r.X,points:i?[]:r.vd?t.Ha(r.vd):[],nearestPointToCursor:o})}return n},t.g.XD=function(t,e,i){return(t=a.u.XD.call(this,t,e,i)).series=this,t},t.g.ce=function(t){return this.Sa.ce(t)},t.g.Uu=function(){return!0},t.g.Rk=function(){return this.Sa.Rk()},t.g.eS=function(){var e=this.J(327680);if(a.u.eS.call(this),e){var i=null,n=null,s=this.bb(),o=this.Ra(),r=t.Tt(o),l=t.Tt(s);if(r||l){if(r){var h=r;i=[]}if(l){var c=l;n=[]}for(var u=this.Sa.Ec();u.advance();){if(r){e=o.Yv(u.get("x"));var d=u.get(h);t.p(i[e])||(i[e]=d||u.get("x")||u.get("heat"))}l&&(e=s.Yv(u.get("y")),d=u.get(c),t.p(n[e])||(n[e]=d||u.get("y")||u.get("heat")))}r&&(o.Ok=i),l&&(s.Ok=n)}this.B(-2147483648)}if(this.J(-2147483648)){if(this.vb&&this.vb.Of()){for(this.vb.Bg(),(u=this.Sa.$()).reset();u.advance();)this.vb.Xc(u.get("heat"));this.vb.Hg()}this.Sa&&this.Sa.B(2048),this.B(32768),this.I(-2147483648)}},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Sa.data(e,i),this}return this.Sa.data()},t.g.Tj=function(t){return this.Sa.Tj(t),this},t.g.select=function(t){return this.Sa.select(t),this},t.g.DM=function(e){this.pb();var i="selected"==e,n=o(this.Ra(),i);e=n.values;var s=n.names;i=(n=o(this.bb(),i)).values;var a=n.names;n=[];for(var r=0;r<a.length;r++)n.push([a[r]]);for(a=this.Sa.cg();a.advance();){r=e[t.qo(a.get("x"))];var l=i[t.qo(a.get("y"))],h=String(a.get("heat"));(0,window.isNaN)(r)||(0,window.isNaN)(l)||(n[l][r+1]=h)}return s.unshift("#"),{headers:s,data:n}},t.g.F=function(){var t=a.u.F.call(this),e=t.chart;return delete e.barsPadding,delete e.barGroupsPadding,delete e.crosshair,delete e.defaultSeriesType,t},t.g.iP=function(e,i){if(t.ea(e))var n=i[e];else t.z(e)?(n=t.dt(e,null))||(n=i[e]):t.C(e)?(n=t.dt(e.type,null))&&n.N(e):n=null;n&&this.kd(n)},t.g.ht=function(e,i,n){this.iP(e.colorScale,i),a.u.ht.call(this,e,i,n),t.Iq(this,d,e)},t.g.ft=function(e,i,n){a.u.ft.call(this,e,i,n),t.Tq(this,d,e),t.Zz(e,"colorScale",this.kd(),i,n)},t.g.kP=function(e,i,n){i={};var s,a=c;for(s=0;s<a.length;s++){var o=a[s];t.p(e[o])&&(i[o]=e[o])}for(a=u,s=0;s<a.length;s++)o=a[s],t.p(e[o])&&(i[o]=e[o]);this.Sa.U(i,n)},t.g.eP=function(e){var i,n=this.Sa.F(),s=c;for(i=0;i<s.length;i++){var a=s[i];t.p(n[a])&&(e[a]=n[a])}for(s=u,i=0;i<s.length;i++)a=s[i],t.p(n[a])&&(e[a]=n[a])},t.g.R=function(){a.u.R.call(this),this.Sa=null};var p=a.prototype;p.getType=p.Ma,p.xGrid=p.lm,p.yGrid=p.nm,p.xAxis=p.$h,p.yAxis=p.ij,p.xScale=p.Ra,p.yScale=p.bb,p.hover=p.Tj,p.select=p.select,p.unhover=p.Md,p.unselect=p.ie,p.data=p.data,p.colorScale=p.kd,p.xZoom=p.Tq,p.yZoom=p.Uq,p.xScroller=p.Mp,p.yScroller=p.Ur,p.annotations=p.Nk,t.Tp["heat-map"]=r,t.E("anychart.heatMap",r)}.call(this,$)),_.binding||(_.binding=1,function(t){var e=function(e){var i=e.type;switch(t.z(i)&&i.toLowerCase()){case"checkbox":case"radio":return e.checked?e.value:null;case"select-one":return 0<=(i=e.selectedIndex)?e.options[i].value:null;case"select-multiple":i=[];for(var n,s=0;n=e.options[s];s++)n.selected&&i.push(n.value);return i.length?i:null;default:return null!=e.value?e.value:null}},i=function(e,n,s,a){if(t.z(e)){for(var o=[t.ll],r=0;r<arguments.length;r++)o.push(arguments[r]);return i.apply(null,o)}var l=n,h=/\s*\.?\s*(([\w_]+)(\(\s*(,?\s*([\d\.]+|".+"|'.+'|\{\d+\}))*\s*\))?)/,c=[],u=!1;do{var d=l.match(h);if(!d){u=!0;break}var p=d[3],g=void 0;p&&((p=/\(\s*(.*)\s*\)/.exec(p))[1]&&(g=p[1].split(/\s*,\s*/)),p=!0),c.push([d[2],p,g]),l=l.replace(d[0],"")}while(l.length);if(l=!u&&c){for(h=[],c=3;c<arguments.length;c++)h.push(arguments[c]);t:{c=e;try{for(u=0;u<l.length;u++){var f=l[u],m=f[0];if(o=f[1],r=f[2])for(d=0;d<r.length;d++){var v=r[d].replace(/^'(.*)'$/,"$1");if((v=v.replace(/^"(.*)"$/,"$1"))==r[d]){var b=r[d].match(/^\{(\d+)\}$/);if(b){var y=Number(b[1]);r[d]=t.p(h[y])?h[y]:void 0}}else r[d]=v}null!=s&&u==l.length-1&&(r=r||[]).push(s),c=o?c[m].apply(c,r):c[m]}}catch(S){f="Could not apply key '"+m,o&&(f+="()"),f+="'",r&&(f+=" with arguments ["+r+"]"),(o=t.ll.console)&&"object"!=typeof(r=o.warn||o.log)&&r.call(o,f),o=null;break t}o=c}return o}},n=function(e){if(t.p(e)||(e=".ac-control"),t.af(e)){var i=e;if(e=i.type,t.p(e)){var o="change";switch(e=e.toLowerCase()){case"button":case"submit":o="click";break;case"text":case"textarea":case"range":o="input"}a(i),t.Ld(i,o,s,!1),e=i.getAttribute("ac-chart-id"),e=t.eq.getChartById(e),t.Ld(e,"chartdraw",(function(){a(i)}),!1,i)}}else if(t.z(e))n(window.document.querySelectorAll(e));else if(t.A(e)||t.Qe(e))for(o=0;o<e.length;o++)n(e[o])},s=function(n){n.preventDefault();var s=n.target,a=n.target.getAttribute("ac-chart-id"),o=t.eq.getChartById(a);if(n=n.target.getAttribute("ac-key"),a&&o&&n&&(a=s.type,t.p(a))){switch(s=e(s),a.toLowerCase()){case"checkbox":s=!!s;break;case"date":s=t.eq.format.parseDateTime(s,"yyyy-MM-dd")}i(o,n,s)}},a=function(n){var s=n.type;if(t.p(s)){s=s.toLowerCase();var a=n.getAttribute("ac-chart-id"),o=t.eq.getChartById(a),r=n.getAttribute("ac-key");if(a&&o&&r&&(a=i(o,r),o=e(n),r=!0,null!=a&&!t.D(a))){switch(s){case"button":case"submit":case"radio":r=!1;break;case"checkbox":a=!!a,o=!!o;break;case"color":t.C(a)&&t.D(a.fill)&&(a=a.fill());break;case"date":a=t.eq.format.dateTime(a,"yyyy-MM-dd");break;default:a=t.da(a)?a:String(a),o=t.da(o)?o:String(o)}if(r&&a!=o){r=a;var l=n.type;switch(t.z(l)&&l.toLowerCase()){case"checkbox":case"radio":n.checked=r;break;case"select-one":if(n.selectedIndex=-1,t.z(r))for(var h=0;l=n.options[h];h++)if(l.value==r){l.selected=!0;break}break;case"select-multiple":for(t.z(r)&&(r=[r]),h=0;l=n.options[h];h++)if(l.selected=!1,r)for(var c,u=0;c=r[u];u++)l.value==c&&(l.selected=!0);break;default:n.value=null!=r?r:""}}"button"!=s&&"submit"!=s||(a==o?t.Qj(n,"btn-primary"):t.Sj(n,"btn-primary"))}}};t.E("anychart.ui.binding.exec",i),t.E("anychart.ui.binding.init",n)}.call(this,$)),_.pie||(_.pie=1,function(t){var e=function(e,i,n,s,a){var o,r=!1;if(!a)return!1;var l=0;for(o=a.length;l<o-1;l+=2){var h=l==o-2?0:l+2,c=l==o-2?1:l+3;r=r||t.en(a[l],a[l+1],a[h],a[c],e,i,n,s)}return r},i=function(t,e,i,n){var s,a=!1;if(!n)return!1;var o=0;for(s=n.length;o<s-1;o+=2)if(!a){a=n[o];var r=n[o+1];a=(t-a)*(t-a)+(e-r)*(e-r)>i*i}return a},n=function(){return new t.Zx},s=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e},a=function(e,i,n,s,a,r){t.Cr.call(this,e),this.i=i,this.f=s||null,this.o=a||function(t,e){return t.value+=Math.max(0,+e)||0,t},this.D=r||function(){return{value:0}},this.b=new o,this.b.j(0,"groupedPoint",!0),this.b.j(0,"name",n)},o=function(){t.V.call(this),t.Ir(this),this.f=void 0},r=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e,this.G=v(this.ya),this.i=this.ya.g("connectorStroke")},l=function(e,i){t.EA.call(this,e,i)},h=function(e,i){t.Bx.call(this),this.Ga("pieFunnelPyramidBase","pie"),this.contextMenu(this.oa.contextMenu),this.ka(),this.Yc=this.i=this.fd=this.Fa=this.Uc=null,this.nf=!0,this.Sb={},this.Dk=function(){var e=this.sourceColor,i=this.aquaStyleObj;return{keys:[{offset:0,color:t.Pl(e,.5)},{offset:.95,color:t.Ql(e,.4)},{offset:1,color:t.Ql(e,.4)}],cx:.5,cy:.5,fx:i.fx,fy:i.fy,mode:i.mode}},this.D=[],this.state=new t.ix(this),this.data(e||null,i),this.B(4294967295),t.T(this.ua,[["overlapMode",4096,1],["radius",4,1],["innerRadius",4,1],["startAngle",4112,1],["sort",16,1,0,function(){c(this)}],["insideLabelsOffset",4100,9],["connectorLength",4100,9],["outsideLabelsCriticalAngle",4096,1],["forceHoverLabels",4096,1],["connectorStroke",16,1],["mode3d",4116,1],["sliceDrawer",16,1]]);var s={};t.T(s,[["explode",4116,1],["fill",528,1],["stroke",528,1],["hatchFill",528,1],["labels",0,0],["outline",0,0]]),this.ca=new t.my(this,s,t.gm,[[1,"fill",function(e){var i=!1;return t.z(e[0])&&(e[0]=e[0].toLowerCase(),i="aquastyle"==e[0]),this.g("mode3d")&&i?this.g("fill"):t.D(e[0])||i?e[0]:t.Ub.apply(null,e)}]]),this.ca.ta("labelsFactoryConstructor",n),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.de,this),e.kb(this),this.B(4096,1)})),this.ca.ta("outlineAfterInitCallback",(function(e){t.K(e,this.uja,this),this.B(16,1)})),s={},t.T(s,[["explode",4116,1],["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0],["outline",16,1]]),this.za=new t.my(this,s,t.vo),this.za.ta("labelsFactoryConstructor",t.py),s={},t.T(s,[["explode",4116,1],["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0],["outline",16,1]]),this.Ea=new t.my(this,s,t.wo),this.Ea.ta("labelsFactoryConstructor",t.py),this.da(!1)},c=function(e){t.qd(e.P),delete e.sd,e.P=u(e,e.i),t.K(e.P,e.dd,e),e.B(13104,17)},u=function(e,i){if(null!=e.Uc){var n=i;i=new a(i,"value",e.yo,e.Uc,void 0,(function(){return{value:0}})),t.rd(n,i),i.zY=!0}return"none"!=(n=e.g("sort"))&&null!=n&&((i="asc"==n?i.sort("value",(function(t,e){return t-e})):i.sort("value",(function(t,e){return e-t}))).zY=!0),i},d=function(e,i,n){if(!e)return t.Xl;var s=i+"|"+e+"|"+n,a=J[s];if(!a){switch(i){case 2:a=t.Zl;break;case 3:a=t.$l;break;default:a=t.am}J[s]=a=t.qa(p,e,a,3==i,n)}return a},p=function(e,i,n,s,a,o,r,l){if(o!=t.gm&&s){var h=a.sc(e,o,a.$(),i,!1,void 0,r);if(n&&!0===h&&(h=i(a.Eh())),t.p(h)){if(!t.D(h))return h;if(n)return n=a.Yi(r),i(h.call(n,n))}}return e=a.sc(e,0,a.$(),i,!1,void 0,r),s=t.p(l)?l:e,l=t.z(e)&&"aquastyle"==e,n&&!0===e&&(e=i(a.Eh())),t.D(e)&&(n=n?a.Yi(r):a.Ge(s,r),e=i(e.call(n,n))),l&&(n=a.$(),n={aquaStyleObj:a.Sb,sourceColor:a.cc().nc(n.ma())},e=a.Dk.call(n)),h&&(n=a.Ge(e,r),e=i(h.call(n,n))),e},g=function(t,e,i){null!=(i=t.$().j(i||"hatchSlice"))&&(t=d("hatchFill",3,!0)(t,e,!1),i.stroke(null).fill(t))},f=function(e){return t.C(e)&&e.hasOwnProperty("mode")&&e.hasOwnProperty("cx")},m=function(e){return e=null===e?window.NaN:+e,!(t.ea(e)&&!(0,window.isNaN)(e)&&0<e)},v=function(e){return"outside"==t.Wk(e.labels().g("position"))},b=function(t,e){var i=e.ma();t.Za&&(t.Za[i]=null)},y=function(e){var i,n=e.$(),s=n.ma(),a=e.g("mode3d"),o="allow-overlap"==e.g("overlapMode");if(function(e){e.$a=[];var i=e.g("mode3d");e.ba?(e.ba.clear(),i&&e.ec.clear()):(e.ba=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.ba.parent(e.Na),e.ba.zIndex(32),i&&(e.ec=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.ec.parent(e.Na),e.ec.zIndex(29))),e.aa=[],i=e.g("connectorStroke"),e.ud||(e.ud=e.Na.path(),e.ud.stroke(i))}(e),!o)var r={},l=i=!1;for(n.reset();n.advance();)if(!m(n.get("value"))){var h=n.ma(),c=t.nx(e.state,h),u=n.j("start"),d=n.j("sweep"),p=(u+d/2)*Math.PI/180;u=90>(d=t.ab(t.cb(p)))||270<d;var g=M(e,h),f=a?.45*e.b:e.b,v=g[0]+e.b*Math.cos(p);if(f=g[1]+f*Math.sin(p),a&&(f+=.2*e.b/2),p=u?5:-5,n.j("connector",p),e.$a[2*h]=v,e.$a[2*h+1]=f,n.j("anchor",u?"left-center":"right-center"),v=e.ke(c,!1),b(e,v),v.na=d,c=N(e,c),n.j("explode",c),e.Hd&&-1!=(0,t.za)(e.Hd,h)&&v.enabled(!1),o)v&&0!=v.enabled()&&(h=v.ma(),b(e,v),u=e.ek(v),d=c?e.kg:e.me,e.Ka=Math.max(d.left-u.left,u.cb()-d.cb(),d.top-u.top,u.Va()-d.Va(),e.Ka),e.aa[h]||(f=e.$a[2*h+1]-.2*e.b/2,u=a&&f<e.uc?t.eC(e.ec):t.eC(e.ba),e.aa[h]=u,u.stroke(e.g("connectorStroke")),w(e,v,u)));else{if(h=r[c]){f=h[0],p=h[1],g=h[2];var y=h[3]}else(h=[]).push(f=[],p=[],g=[],y=[],c),r[c]=h;270<d&&!i&&(f.length||g&&g.length)&&(i=!0),90<d&&!l&&(p.length||y&&y.length)&&(l=!0),(u=u?i?y:p:l?g:f).push(v)}}if(e.dn=window.NaN,!o){var S=[];t.va(t.Ec(r),(function(t){var e=t[3].concat(t[1]),i=t[2].concat(t[0]);t=t[4],this.Nx(i,!1,S,t),this.Nx(e,!0,S,t),S=S.concat(i,e)}),e)}n.select(s),e.qc||(e.qc=[]),e.Hd||(e.Hd=[]),h=e.dn,-1!=(0,t.za)(e.qc,h)?t.ua(e.qc)!=h&&(e.Hd.push(h),e.qc.length=0):e.qc.push(h),e.Ka=Math.round(e.Ka)},S=function(e){e.b=Math.max(e.b-Math.max(e.Ka,0),0);var i=e.g("innerRadius");e.G=t.D(i)?i(e.b):t.L(i,e.b),i=e.G/Math.pow(2,.5)*2,e.na=t.kn(e.Dc-i/2,e.uc-i/2,i,i),e.fb=new t.I(e.Dc-e.b,e.uc-e.b,2*e.b,2*e.b),(i=e.labels()).ka(),i.Dc(e.Dc),i.uc(e.uc),i.Ty(e.b),i.UE(e.g("startAngle")),i.fz(360),i.ja(e.fb),i.da(!1),e.lb().labels().ja(e.fb)},x=function(t,e){t.Ba=e;var i=Math.min(t.na.width/t.Ba.width,t.na.height/t.Ba.height);(0,window.isFinite)(i)||(i=0),t.f.ak.oc(i,0,0,i,t.na.left-t.Ba.left*i+(t.na.width-i*t.Ba.width)/2,t.na.top-t.Ba.top*i+(t.na.height-i*t.Ba.height)/2)},w=function(e,i,n){var s=e.data().$(),a=i.ma(),o=e.g("mode3d");if(s.select(a)){var r=e.$a[2*a];a=e.$a[2*a+1],s=s.j("connector");var l=i.jc().value,h=t.p(i.g("offsetY"))?i.g("offsetY"):e.labels().g("offsetY");h||(h=0),h=t.L(h,e.b),(i=t.p(i.g("offsetX"))?i.g("offsetX"):e.labels().g("offsetX"))||(i=0);var c=t.bb(l.angle+t.L(i,360)),u=l.radius+h;i=e.Dc+u*Math.cos(c)-s,e=e.uc+(o?l.radiusY+h:u)*Math.sin(c),n.clear().moveTo(r,a).lineTo(i,e).lineTo(i+s,e)}},C=function(e,i,n){var s=e.$(),a=s.ma(),o=s.j("start"),r=s.j("sweep");if(n){var l=s.j("slice"),h=s.j("sliceOutline"),c=s.j("hatchSlice");l&&l.clear(),c&&c.clear(),h&&h.clear()}else e.ue&&(l=t.eC(e.ue),s.j("slice",l)),e.Od&&(h=t.eC(e.Od),s.j("sliceOutline",h)),e.o&&(c=t.eC(e.o),s.j("hatchSlice",c));if(l){var u=e.sc("outline.offset",i,s,t.br,!1)||0;n=e.sc("outline.width",i,s,t.br,!1)||0,u=t.L(u,e.b),n=t.L(n,e.b);var p=N(e,i);s.j("explode",p);var m=o+r/2;s=p*Math.cos(t.bb(m)),p*=Math.sin(t.bb(m));var v=e.b;if(m=v+u,u=v+u+n,v={centerX:e.Dc,centerY:e.uc,innerRadius:e.G,outerRadius:v,innerOutlineRadius:m,outerOutlineRadius:u,startAngle:o,sweepAngle:r,explodeX:s,explodeY:p,path:l},h&&(n?t.wi(h,e.Dc+s,e.uc+p,u,m,o,r):h.clear()),e.g("sliceDrawer").call(v,v),l.tag={X:e,index:a},e.g("mode3d"))for(r=e.D.length,n=e.$().ma(),o=0;o<r;o++)(h=e.D[o]).index==n&&E(e,h.type+"Path"+("outerFront"==h.type||"innerBack"==h.type||"outerBack"==h.type||"innerFront"==h.type?h.start:""),i);else n=(r=e.$()).j("slice"),t.p(n)&&(h=(s=d("fill",1,!0))(e,i,!1,null),f(h)&&null===h.mode&&(h.mode=e.fb?e.fb:null),n.fill(h),o=(s=d("stroke",2,!0))(e,i,!1,null),f(o)&&null===o.mode&&(o.mode=e.fb?e.fb:null),n.stroke(o),(n=e.$().j("sliceOutline"))&&(null===(s=e.sc("outline.enabled",i,r,t.Zq,!1))&&(s=e.sc("outline.enabled",0,r,t.Zq,!1)),s?(r=(s=d("outline.fill",1,!0))(e,0,!1,h),h=s(e,i,!1,r),f(h)&&null===h.mode&&(h.mode=e.fb?e.fb:null),o=(s=d("outline.stroke",2,!0))(e,i,!1,o),f(o)&&null===o.mode&&(o.mode=e.fb?e.fb:null)):h=o="none",n.fill(h).stroke(o)),g(e,i));c&&(c.pe(l.F()),c.tag={X:e,index:a},g(e,i))}},T=function(e,i,n,s,a,o,r,l,h,c){if(h+=String(a),c=e.Zz(h,c)){var u=.45*s,d=.2*e.b;o<a&&(o+=360),360==Math.abs(r)&&(a=0,o=180),r=t.bb(a),a=t.bb(o),o=i+s*+Math.cos(r).toFixed(5),r=n+u*+Math.sin(r).toFixed(5),i+=s*+Math.cos(a).toFixed(5),n+=u*+Math.sin(a).toFixed(5),c.moveTo(o,r),c.Ff(i,n,s,u,!1,!0),c.lineTo(i,n+d),c.Ff(o,r+d,s,u,!1,!1),c.lineTo(o,r),c.close(),E(e,h,l)}},D=function(e,i,n,s,a,o,r,l,h,c){if(h+=String(a),c=e.Zz(h,c)){var u=.45*s,d=.2*e.b;o<a&&(o+=360),360==Math.abs(r)&&(a=180,o=0),r=t.bb(a),a=t.bb(o),o=i+s*Math.cos(r),r=n+u*Math.sin(r),i+=s*Math.cos(a),n+=u*Math.sin(a),c.moveTo(o,r),c.Ff(i,n,s,u,!1,!0),c.lineTo(i,n+d),c.Ff(o,r+d,s,u,!1,!1),c.lineTo(o,r),c.close(),E(e,h,l)}},k=function(e,i,n,s,a,o,r,l,h){var c=t.bb(r);r=.2*e.b;var u=n+o*Math.cos(c);n+=a*Math.cos(c),o=s+.45*o*Math.sin(c),s+=.45*a*Math.sin(c),(h=e.Zz(i,h))&&(h.moveTo(u,o),h.lineTo(n,s),h.lineTo(n,s+r),h.lineTo(u,o+r),h.lineTo(u,o),h.close(),E(e,i,l))},$=function(e,i,n,s){var a=e.labels();if(a.ka(),a.fontOpacity(i),a.W(),a.da(!1),s&&e.aa)for(i=0;i<e.aa.length;i++)(s=e.aa[i])&&(a=e.g("connectorStroke"),a=t.Ul(a,n),s.stroke(a))},O=function(e){var i=e.$(),n=i.ma(),s=t.nx(e.state,n),a=N(e,s),o=(s=i.j("start"))+(i=i.j("sweep"));if(t.p(s)&&t.p(i)&&i){var r=s+i/2,l=a*Math.cos(t.bb(r));a=.45*a*Math.sin(t.bb(r)),e.D.push({index:n,type:"top",start:s,mt:i,hy:l,ky:a}),e.D.push({index:n,type:"bottom",start:s,mt:i,hy:l,ky:a}),360!=Math.abs(i)&&(e.D.push({index:n,type:"start",angle:s,hy:l,ky:a}),e.D.push({index:n,type:"end",angle:o,hy:l,ky:a}));var h=s,c=o;if(h==c)r=!1;else{h=t.bb(h),c=t.bb(c),r=t.Tm(Math.cos(h),7);var u=t.Tm(Math.cos(c),7);h=G(r,Math.sin(h)),c=G(u,Math.sin(c)),r=1==h||2==h||(3==h?1==c||2==c||3==c&&r>=u:4==h&&(4!=c||r>=u))}if(r)for(h=U(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="outerFront",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c];if((h=s)!=(c=o)&&e.G?(h=t.bb(h),c=t.bb(c),r=t.Tm(Math.cos(h),7),u=t.Tm(Math.cos(c),7),h=G(r,Math.sin(h)),c=G(u,Math.sin(c)),r=3==h||4==h||(1==h?3==c||4==c||1==c&&r<=u:2==h&&(2!=c||r<=u))):r=!1,r)for(h=F(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="innerBack",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c];for(h=F(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="outerBack",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c];for(h=U(s,o),r=e.D.length,u=h.length,e.D.length=r+u,c=0;c<u;c++)h[c].index=n,h[c].type="innerFront",h[c].mt=i,h[c].hy=l,h[c].ky=a,e.D[r+c]=h[c]}},P=function(e,i,n){var s=0,a=e.D.length;if(t.p(i))for(s=0;s<a;s++){var o=e.D[s];o.index==i&&L(e,o,n)}else{for(s=0;s<a;s++)switch(o=e.D[s],o.type){case"top":o.ez=1;break;case"outerFront":o.ez=o.Jn?1:t.Tm(Math.sin(t.bb(_(o.start,o.end))),7);break;case"innerBack":o.ez=o.Jn?-1:t.Tm(Math.sin(t.bb(_(o.start,o.end))),7);break;case"bottom":o.ez=-3;break;case"innerFront":o.ez=0;break;case"outerBack":o.ez=-2;break;default:o.ez=t.Tm(Math.sin(t.bb(o.angle)),7)}for(e.D.sort((function(t,e){return t.ez-e.ez})),s=0;s<a;s++)L(e,e.D[s])}e.D.length=0},L=function(e,i,n){var s=e.$();s.select(i.index);var a=t.nx(e.state,i.index),o=N(e,a);s.j("explode",o),s=e.Dc;var r=e.uc;o&&(s+=i.hy,r+=i.ky),o=e.b;var l=e.G;switch(i.type){case"top":I(e,s,r,o,l,i.start,i.mt,a,!0,n);break;case"bottom":I(e,s,r,o,l,i.start,i.mt,a,!1,n);break;case"outerFront":T(e,s,r,o,i.start,i.end,i.mt,a,"outerFront",n);break;case"innerBack":D(e,s,r,l,i.start,i.end,i.mt,a,"innerBack",n);break;case"outerBack":T(e,s,r,o,i.start,i.end,i.mt,a,"outerBack",n);break;case"innerFront":D(e,s,r,l,i.start,i.end,i.mt,a,"innerFront",n);break;case"start":k(e,"startPath",s,r,o,l,i.angle,a,n);break;case"end":k(e,"endPath",s,r,o,l,i.angle,a,n)}},I=function(e,i,n,s,a,o,r,l,h,c){if(0>s&&(s=0),0>a&&(a=0),s<a){var u=s;s=a,a=u}u=(h?"top":"bottom")+"Path",n+=h?0:.2*e.b,r=t.Za(r,-360,360),(h=e.Zz(u,c))&&(0>=a?360==Math.abs(r)?h.Fe(i,n,s,.45*s,o,r,!1):h.moveTo(i,n).Fe(i,n,s,.45*s,o,r,!0).close():(c=360>Math.abs(r),h.Fe(i,n,s,.45*s,o,r).Fe(i,n,a,.45*a,o+r,-r,c),c&&h.close()),E(e,u,l))},A=function(e,i){var n,s=e.$(),a=s.ma(),o=s.get("normal"),r=t.Zo(t.p(o)?o.fill:void 0,s.get("fill"),e.fill());return(i=t.em(i))==t.wo?(o=s.get("selected"),s=t.Zo(t.p(o)?o.fill:void 0,s.get("selectFill"),e.selected().fill(),r),r=e.EK(s,r)):i==t.vo?(o=s.get("hovered"),s=t.Zo(t.p(o)?o.fill:void 0,s.get("hoverFill"),e.lb().fill(),r),r=e.EK(s,r)):r=e.EK(r),r=t.z(r)?t.Ll(r):t.Ll(r.color),a=e.cc().nc(a),t.C(a)&&(a.color?n=t.Ll(a.color):a.keys&&a.keys.length&&(n=t.Ll(a.keys[0].color))),n=n?n.vk:a,r?r.vk:n},E=function(e,i,n){var s=e.$(),a=s.ma(),o=A(e,n),r=t.Cl(o),l=s.j(i);l.tag={X:e,index:a};var h,c=t.Il(r,.3),u=t.Hl([255,255,255],r,.1),d=t.Tb(t.Hl(r,c,.7));u=t.Tb(t.Hl(c,u,.1));var p=t.Tb(t.Hl(r,c,.8)),f=t.Tb(t.Hl(r,c,.2));r=t.Tb(t.Hl(r,c,.1));var m=t.em(n);c=m==t.vo,m=m==t.wo;var v,b=t.Vl(c?e.lb().fill():m?e.selected().fill():e.fill());f={color:c||m?t.Pl(f,.2):f,opacity:b},u={angle:45,keys:[{position:0,opacity:b,color:c||m?t.Pl(o,.2):t.Pl(o,.1)},{position:.19,opacity:b,color:c||m?t.Pl(u,.2):u},{position:1,opacity:b,color:c||m?t.Pl(p,.2):p}]},d=o={angle:-50,keys:[{position:0,opacity:b,color:c||m?t.Pl(o,.3):o},{position:1,opacity:b,color:c||m?t.Pl(d,.2):d}]},h="topPath"==i?o:"bottomPath"==i?d:t.ec(i,"outer")?u:t.ec(i,"inner")?f:{color:c||m?t.Pl(r,.2):r,opacity:b},v=m&&t.dm(e.selected().stroke())?e.selected().stroke():t.dm(e.stroke())?e.stroke():h,l.fill(h),l.stroke(v),i="hatch"+String(i.charAt(0)).toUpperCase()+i.substr(1),(s=s.j(i))&&(s.pe(l.F()),s.tag={X:e,index:a},g(e,n,i))},G=function(t,e){return 0<=t&&0<=e?1:0>=t&&0<=e?2:0>=t&&0>e?3:4},U=function(e,i){var n=t.Tm(Math.cos(t.bb(e)),7),s=t.Tm(Math.cos(t.bb(i)),7),a=G(n,Math.sin(t.bb(e))),o=G(s,Math.sin(t.bb(i))),r=[];if(1==a)switch(o){case 1:n>=s?r.push({start:e,end:i}):(r.push({start:e,end:180,Jn:!0}),r.push({start:360,end:i}));break;case 2:r.push({start:e,end:i,Jn:!0});break;case 3:case 4:r.push({start:e,end:180,Jn:!0})}else if(2==a)switch(o){case 1:r.push({start:e,end:180}),r.push({start:360,end:i});break;case 2:n>=s?r.push({start:e,end:i}):(r.push({start:e,end:180}),r.push({start:360,end:i,Jn:!0}));break;case 3:case 4:r.push({start:e,end:180})}else if(3==a)switch(o){case 1:r.push({start:360,end:i});break;case 2:r.push({start:360,end:i,Jn:!0});break;case 3:n>=s&&r.push({start:0,end:180,Jn:!0})}else if(4==a)switch(o){case 1:r.push({start:360,end:i});break;case 2:r.push({start:360,end:i,Jn:!0});break;case 3:r.push({start:360,end:180,Jn:!0});break;case 4:n>=s&&r.push({start:0,end:180,Jn:!0})}return r},F=function(e,i){var n=t.Tm(Math.cos(t.bb(e)),7),s=t.Tm(Math.cos(t.bb(i)),7),a=G(n,Math.sin(t.bb(e))),o=G(s,Math.sin(t.bb(i))),r=[];if(1==a)switch(o){case 1:n<=s&&r.push({start:180,end:360});break;case 3:r.push({start:180,end:i});break;case 4:r.push({start:180,end:i,Jn:!0})}else if(2==a)switch(o){case 1:r.push({start:180,end:360,Jn:!0});break;case 2:n<=s&&r.push({start:180,end:360,Jn:!0});break;case 3:r.push({start:180,end:i});break;case 4:r.push({start:180,end:i,Jn:!0})}else if(3==a)switch(o){case 1:case 2:r.push({start:e,end:360,Jn:!0});break;case 3:n>=s?(r.push({start:e,end:360}),r.push({start:180,end:i})):r.push({start:e,end:i});break;case 4:r.push({start:e,end:i,Jn:!0})}else if(4==a)switch(o){case 1:case 2:r.push({start:e,end:360});break;case 3:r.push({start:e,end:360}),r.push({start:180,end:i});break;case 4:n>=s?(r.push({start:e,end:360}),r.push({start:180,end:i})):r.push({start:e,end:i})}return r},M=function(e,i){var n=e.$();n.select(i);var s=e.Dc,a=e.uc,o=t.nx(e.state,i);if(o=N(e,o)){var r=e.g("mode3d"),l=n.j("start");n=(l+(n=n.j("sweep"))/2)*Math.PI/180,r=(r?.45*o:o)*Math.sin(n),s+=o*Math.cos(n),a+=r}return[s,a]},_=function(t,e){return e<t&&(e+=360),(t+e)/2},N=function(e,i,n){i=i||0;var s=e.$();return 1==s.Hb()?e=0:(n=e.sc("explode",i,s,t.br,!1,void 0,n),e=t.p(n)?t.L(n,e.bg):0),e},R=function(e){var i=e.Ua();e.gc(t.yk()?"mousemove":"touchstart",e.wR),i.Lc()},j=function(t,e,i,n){this.G=n,this.i=i,this.qg=e,this.labels=[],this.y=this.height=0,this.b=[],this.f=t,this.ZH=!1,this.nl=null},B=function(t,e){e&&(t.labels.push(e),t.Nx())},H=function(e,i){var n=t.ln(e.rb());return!t.bn(n,t.ln(i))},z=function(t){for(var e=0,i=t.labels.length;e<i;e++){var n=t.labels[e],s=t.b[3*e],a=t.b[3*e+1],o=t.b[3*e+2],r=n.jc().value;r.angle=s,r.radius=a,r.radiusY=o,b(t.qg,n)}},V=function(t,e){var i=new h(t,e);return i.$c(),i},q=function(t,e){var i=new h(t,e);return i.Ga("pie3d"),i.$c(),i};t.H(s,t.Ez),t.g=s.prototype,t.g.update=function(){this.b.length=this.f.length=0;for(var t=this.ya.cg();t.advance();)if(!t.j("missing")){var e=t.j("start"),i=t.j("sweep"),n=this.ya.b,s=this.ya.j2();this.b.push(this.ya.Vl(),0,0,0),this.f.push(e,i,n,s)}},t.g.Jw=function(){$(this.ya,1e-5,1e-5,v(this.ya))},t.g.en=function(){for(var e=this.ya.cg(),i=0;e.advance();)if(!e.j("missing")){e.j("start",this.coords[i++]),e.j("sweep",this.coords[i++]),e.j("radius",this.coords[i++]),e.j("innerRadius",this.coords[i++]);var n=this.ya,s=e,a=s.j("slice");a.clear();var o=s.j("start"),r=s.j("sweep"),l=s.j("radius"),h=s.j("innerRadius"),c=t.nx(n.state,s.ma());if(c=N(n,c)){var u=o+r/2;a=t.wi(a,n.Dc+c*Math.cos(t.bb(u)),n.uc+c*Math.sin(t.bb(u)),l,h,o,r)}else a=t.wi(a,n.Dc,n.uc,l,h,o,r);(o=s.j("hatchSlice"))&&(n.$().select(s.ma()),o.clear(),o.pe(a.F()),n=d("hatchFill",3,!0)(n,t.nx(n.state,s.ma()),!1,null),o.stroke(null).fill(n))}},t.g.cm=function(){this.en()},t.g.R=function(){s.u.R.call(this),this.ya=null},t.H(a,t.Cr),t.g=a.prototype,t.g.FC=function(){var e=[],i=this.ee.$(),n=void 0,s=void 0;if(this.f)for(;i.advance();){var a=i.get(this.i),o=i.get("name");t.p(o)||(o="Point "+i.ma()),this.f(a)?e.push(i.ma()):n?(n.push(a),s.push(o)):(n=[a],s=[o])}else for(a=0,i=i.Hb();a<i;a++)e.push(a);return n?(this.b.Af(0,(0,t.Gg)(n,this.o,this.D())),this.b.j(0,"names",s),this.b.j(0,"values",n)):(this.b.Af(0,n),this.b.j(0,"names",[]),this.b.j(0,"values",[])),e},t.g.Hb=function(){return t.Dr(this),(this.wo?this.wo.length:this.ee.Hb())+this.b.Hb()},t.g.Ul=function(e){t.Dr(this);var i=this.ee.Hb();return e<i?this.ee.Ul(e):this.b.Ul(e-i)},t.g.Zt=function(){return t.Ga(this.ee.Zt(),this.b)},t.g.Af=function(e,i){t.Dr(this);var n=this.wo?this.wo.length:this.ee.Hb();return e<n?t.Cr.prototype.Af.apply(this,arguments):(e-=n,this.b.Af.apply(this.b,arguments))},t.g.tO=function(e,i,n){var s=this.wo?this.wo.length:this.ee.Hb();if(e>s)throw Error("Index can not be masked by this View");return e>=s?(e-=s,2<arguments.length?(this.b.j.apply(this.b,arguments),this):this.b.j.apply(this.b,arguments)):t.Cr.prototype.tO.apply(this,arguments)},t.H(o,t.Jr),o.prototype.Af=function(t,e){if(!t){var i=this.f;return 1<arguments.length&&(this.f=e),i}},o.prototype.j=function(e,i,n){if(!e)return t.Cr.prototype.j.apply(this,arguments)},o.prototype.Hb=function(){return t.p(this.f)?1:0};var W=o.prototype;W.row=W.Af,W.getRowsCount=W.Hb,t.H(r,t.Ez),r.prototype.update=function(){this.b.length=this.f.length=0,this.b.push(1e-5,1e-5),this.f.push(1,this.i.opacity||1)},r.prototype.en=function(){$(this.ya,this.coords[0],this.coords[1],this.G)},r.prototype.cm=function(){this.en()},r.prototype.R=function(){r.u.R.call(this),this.i=this.ya=null,delete this.G},t.H(l,t.EA),l.prototype.Vl=function(){return this.ya.data().j(this.index,"start")},l.prototype.b=function(){var t=this.ya.data();return t.j(this.index,"start")+(t=t.j(this.index,"sweep"))};var Y=l.prototype;Y.getStartAngle=Y.Vl,Y.getEndAngle=Y.b,Y.hovered=Y.lb,t.H(h,t.Bx),t.Gq(h,["fill","stroke","hatchFill","outline"],"normal"),t.Gq(h,["explode"],"selected"),h.prototype.ra=16|t.Bx.prototype.ra,h.prototype.sa=28688|t.Bx.prototype.sa;var K,X=(K={},t.sq(K,[t.Z.dC,t.Z.zz,[0,"radius",function(e){return t.yo(e,"100%")}],[0,"innerRadius",function(e){return t.D(e)?e:t.yo(e)}],[0,"sort",t.Mk],[0,"insideLabelsOffset",t.yo],[0,"connectorLength",function(e){return t.yo(e,"20%")}],[0,"outsideLabelsCriticalAngle",function(e){return t.ab(t.L(e))}],[0,"forceHoverLabels",t.Cq],[1,"connectorStroke",t.Pq],[0,"mode3d",t.Dq],[0,"sliceDrawer",t.gr]]),K);t.U(h,X),t.g=h.prototype,t.g.Ma=function(){return this.g("mode3d")?"pie-3d":"pie"},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.Ue=function(){return[this]},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}if(this.Xf!==e){if(this.Xf=e,this.i!=e||null===e){if(t.qd(this.Yc),t.J(e,t.Cr)){var s=e;this.Yc=null}else s=t.J(e,t.Mr)?(this.Yc=e).Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd();this.i=s.Ui()}c(this)}return this}return this.P},t.g.dd=function(e){t.X(e,16)&&this.B(13104,17)},t.g.$=function(){return this.sd||(this.sd=this.P.$())},t.g.Ec=function(){return this.sd=this.P.$()},t.g.cg=function(){return this.P.$()},t.g.group=function(e,i){return t.p(e)?(t.D(e)&&e!=this.Uc?(this.Uc=e,this.yo=i||"Grouped point",c(this)):t.cp(e)&&(this.Uc=null,c(this)),this):this.Uc},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)};var J={};t.g=h.prototype,t.g.sc=function(e,i,n,s,a,o,r){var l=!!(i&t.vo),h=!!(i&t.wo);return o=h?this.Ea:l?this.za:this.ca,a=e.split("."),o=(0,t.Gg)(a,(function(t,e){return t[e]()}),o),r?e=o:(r=n.get(h?"selected":l?"hovered":"normal"),r=t.p(r)?(0,t.Gg)(a,(function(t,e){return t?t[e]:t}),r):void 0,e=t.Zo(r,n.get(t.hm(i,e)),o)),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){return t.Yb(this.ve().nc(this.$().ma())||"none")},t.g.Yi=function(){var t=this.$();return{index:t.ma(),sourceHatchFill:this.Eh(),iterator:t}},t.g.Ge=function(e,i){var n,s=this.$();return i||(n=s.get("fill")),{index:s.ma(),sourceColor:t.Ub(e||n||this.cc().nc(s.ma())||"blue"),iterator:s,series:this,chart:this}},t.g.EK=function(e,i){var n=this.$().ma();if(t.z(e)&&"aquastyle"==e)n={aquaStyleObj:this.Sb,sourceColor:this.cc().nc(n)},n=this.Dk.call(n);else if(t.D(e)){var s=1<arguments.length?this.EK.apply(this,t.Ja(arguments,1)):this.cc().nc(n);n={index:n,sourceColor:s,iterator:this.$()},n=e.call(n)}else n=e;return n},t.g.yj=function(){return!this.$().Hb()},t.g.Tp=function(e){return this.f||(this.f=new t.cC(this),t.K(this.f,this.yja,this),t.W(this,"center",this.f)),t.p(e)?(this.f.N(e),this):this.f},t.g.yja=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=16388,n|=1),this.B(i,n)},t.g.labels=function(e){return t.p(e)?(this.ca.labels(e),this):this.ca.labels()},t.g.ek=function(e){this.Za||(this.Za=[]);var i=e.ma();return this.Za[i]||(this.Za[i]=t.mn(this.labels().yl(e))),this.Za[i]},t.g.de=function(e){var i=0,n=0;t.X(e,1)&&(i|=4096,n|=1),t.X(e,8)&&(i|=4100,n|=9),this.B(i,n)},t.g.uja=function(){this.B(20,1)},t.g.Ic=function(e){var i=this.$();return this.oe&&!e||(this.oe=new t.Fw),this.oe.lg(i).Li([this.ce(i.ma()),this]),e={x:{value:i.get("x"),type:"string"},value:{value:i.get("value"),type:"number"},name:{value:i.get("name"),type:"string"},index:{value:i.ma(),type:"number"},chart:{value:this,type:""}},i.j("groupedPoint")&&(e.name={value:i.j("name"),type:"string"},e.groupedPoint={value:!0,type:"string"},e.names={value:i.j("names"),type:""},e.values={value:i.j("values"),type:""}),t.ov(this.oe,e)},t.g.Bh=function(){var e=v(this),i=this.$(),n=i.j("start"),s=i.j("sweep"),a=1==i.Hb()||360==s;i=t.nx(this.state,i.ma()),i=N(this,i),n+=s/2;var o=this.g("mode3d");if(s=this.g("insideLabelsOffset"),o){if(e)a=this.b+this.ea,s=.45*this.b+this.ea,i&&(a+=i,s+=.45*i);else{var r=this.b;e=.45*this.b;var l=this.G;o=.45*this.G,a&&!l?s=a=0:(a=t.L(s,l+r),s=t.uo(s)?t.L(s,o+e):.45*t.L(s,o+e),i&&(a+=i,s+=.45*i))}return{value:{angle:n,radius:a,radiusY:s}}}return{value:{angle:n,radius:e?this.b+this.ea+i:t.L(s,a&&!this.G?0:this.b-this.G)+this.G+i,outerRadius:this.b,innerRadius:this.G}}},t.g.Nx=function(i,n,s,a){var o,r,l,h,c,u,d=null,p=this.$(),g=[],f=n?t.va:t.Pe;for(f(i,(function(t){t&&0!=t.enabled()&&(p.select(t.ma()),t.Hf(this.Ic()),C=this.ek(t),!d||H(d,C)?(d&&g.push(d),(d=new j(n,this,g,a||0)).iC(t)):d.iC(t))}),this),d&&g.push(d),i=0,o=g.length;i<o;i++)(d=g[i])&&d.fp&&(r||(r=[]),r=t.Ga(r,d.fp));d=null,r&&(t.Pa(r,(function(t,e){return t.ma()>e.ma()?1:t.ma()<e.ma()?-1:0})),f(r,(function(t){if(t){for(p.select(t.ma()),t.Hf(this.Ic()),C=this.ek(t),l=!0,h=0,c=g.length;h<c;h++)l=l&&H(g[h],C);if(l){for(d||(d=new j(n,this,[],a||0)),B(d,t),u=d.rb(),l=!0,h=0;h<c;h++)l=l&&H(g[h],u);d.ZH||!l?(d.labels.pop().enabled(!1),d.Nx(),g.push(d),d=null):t.enabled(!0)}else d&&(g.push(d),d=null)}}),this),d&&g.push(d));var m,v,y=this.g("mode3d"),S=this.g("connectorStroke");for(i=0,o=g.length;i<o;i++)if(d=g[i]){z(d);var x=0;for(m=d.labels.length;x<m;x++)if((r=d.labels[x])&&0!=r.enabled()){b(this,r),f=r.ma(),p.select(f);var C=this.ek(r);if(s){var T=this.$a[2*f],D=this.$a[2*f+1],k=p.j("connector"),$=r.jc().value,O=$.angle;O=t.bb(O),$=$.radius;var P=this.Dc+$*Math.cos(O)-k,L=this.uc+$*Math.sin(O),I=0;for(v=s.length;I<v;I++){O=s[I],b(this,O);var A=this.ek(O),E=O.ma(),G=M(this,E),U=G[0],F=G[1],_=p.j("start"),N=p.j("sweep");G=this.$a[2*E],E=this.$a[2*E+1],k=p.j("connector"),$=O.jc().value,O=$.angle,O=t.bb(O),$=$.radius,k=this.Dc+$*Math.cos(O)-k,$=this.uc+$*Math.sin(O),O=t.bb(_);var R=U+this.G*Math.cos(O),V=F+this.G*Math.sin(O),q=U+this.b*Math.cos(O),W=F+this.b*Math.sin(O);if(O=t.bb(_+N),_=U+this.G*Math.cos(O),N=F+this.G*Math.sin(O),U+=this.b*Math.cos(O),F+=this.b*Math.sin(O),O=t.ln(C),t.bn(O,t.ln(A))||e(R,V,q,W,O)||e(_,N,U,F,O)||e(G,E,k,$,O)||t.en(T,D,P,L,R,V,q,W)||t.en(T,D,P,L,_,N,U,F)||t.en(G,E,k,$,T,D,P,L)||t.bn(O,[q,W,R,V])||t.bn(O,[U,F,_,N])){r.enabled(!1);break}}}0!=r.enabled()&&((this.yg||this.nf)&&(I=a?this.kg:this.me,(I=Math.max(I.left-C.left,C.cb()-I.cb(),I.top-C.top,C.Va()-I.Va()))>this.Ka&&(this.dn=f),this.Ka=Math.max(this.Ka,I)),this.aa[f]||(I=this.$a[2*f+1]-.2*this.b/2,I=y&&I<this.uc?t.eC(this.ec):t.eC(this.ba),this.aa[f]=I,I.stroke(S),w(this,r,I)))}}},t.g.Mm=function(e){this.bg=Math.min(e.width,e.height);var i=N(this,t.gm,!0),n=N(this,t.vo,!0),s=N(this,t.wo,!0),a=Math.max(i,n||0,s||0),o=this.$();for(o.reset();o.advance();)i=N(this,t.gm),n=N(this,t.vo),s=N(this,t.wo),a=Math.max(i,n||0,s||0,a);i=this.ca.labels().enabled()||this.za.labels().enabled()||this.Ea.labels().enabled(),a=v(this)&&i?a:0,this.me=t.kn(e.left+a,e.top+a,e.width-2*a,e.height-2*a),i=this.bg-2*a,n=Math.max(t.L(this.g("radius"),i),0),this.g("mode3d")?this.b=Math.min(Math.min(n,(e.width-2*a)/2),(e.height-2*a)/1.3):this.b=Math.min(i/2,n),this.ea=t.L(this.g("connectorLength"),this.b),this.Ap=this.b,this.Ka=0,this.Dc=this.me.left+this.me.width/2,this.uc=this.me.top+this.me.height/2,i=t.bb(-145),a=.5*(n=Math.min(e.width,e.height)/2)*Math.cos(i)/e.width+.5,i=.5*n*Math.sin(i)/e.height+.5,0>e.width&&(e.width=0),0>e.height&&(e.height=0),this.Sb.fx=!(0,window.isNaN)(a)&&(0,window.isFinite)(a)?a:0,this.Sb.fy=!(0,window.isNaN)(i)&&(0,window.isFinite)(i)?i:0,this.Sb.mode=e,S(this)},t.g.pb=function(){if(this.J(8192)){this.hJ();for(var t,e=this.data().$(),i=0,n=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=0;e.advance();)t=e.get("value"),m(t)?i++:(t=+t,n=Math.min(t,n),s=Math.max(t,s),a+=t);var o;(e=e.Hb()-i)?o=a/e:n=s=a=o=void 0,this.La("count",e),this.La("min",n),this.La("max",s),this.La("sum",a),this.La("average",o),this.I(8192)}},t.g.pv=function(){this.Fa&&t.J(this.Fa,t.Ms)&&t.Ns(this.Fa,this.$().Hb())},t.g.kK=function(){var e=this.f.gi.rb();t.nb(e,this.Ba)||x(this,e)},t.g.kL=function(){this.B(4,1)},t.g.Qh=function(e){this.pb(),t.Yu(this.labels());var i=this.$();i.Hb();var n=this.g("mode3d"),s=this.Tp();if(this.J(16384)&&(s&&s.ak&&(this.f.eG(),this.f.ak.parent(this.Na),this.f.ak.zIndex(25),this.f.ak&&(t.J(this.f.gi,t.ig)?this.f.ak.Ja().wa("renderfinish",this.kK,!1,this):t.J(this.f.gi,t.Y)&&this.f.ak.wa("chartdraw",this.kL,!1,this))),this.I(16384)),this.J(4)&&(this.nf=!0,this.Mm(e),this.B(4112)),this.J(16)){this.yg=!0;var a=this.Vl(),o=0;for(i.reset();i.advance();)if(o=i.get("value"),m(o))i.j("missing",!0);else{o=(o=+o)/this.Rg("sum")*360;var r=i.get("state");r="selected"==r?t.wo:"hovered"==r?t.vo:"normal"==r?t.gm:window.NaN,(0,window.isNaN)(r)||this.state.Lh(r,i.ma()),i.j("start",a).j("sweep",o).j("explode",N(this,r)),a+=o}}if(this.J(4096)){if(this.labels().O()||this.labels().O(this.Na),this.labels().clear(),this.qc&&(this.qc.length=0),this.Hd&&(this.Hd.length=0),this.ba&&(this.ba.clear(),n&&this.ec.clear()),this.labels().enabled()){var l=v(this)?"outsideLabels":"insideLabels";if(a=t.wr(this,l,!0,(function(){var e=new t.V;return t.rd(this,e),t.W(this,l,e),e})).oa,this.labels().Kq(a.autoColor),this.labels().disablePointerEvents(a.disablePointerEvents),v(this)){if((this.yg||this.nf)&&(this.b=this.Ap,this.Ka=Number.NEGATIVE_INFINITY),y(this),this.yg||this.nf){for(a=5;this.Ka&&(0,window.isFinite)(this.Ka)&&a&&10<Math.abs(this.Ka);)S(this),this.Ka=Number.NEGATIVE_INFINITY,this.labels().clear(),this.ba&&(this.ba.clear(),n&&this.ec.clear()),y(this),a--;this.B(4)}}else for(i.reset();i.advance();)m(i.get("value"))||(a=t.nx(this.state,i.ma()),this.ke(a,!!(a&t.vo)))}this.labels().W(),this.labels().Vd().clip(e),this.B(16),this.I(4096)}if(this.J(16)){for(e=this.ca.xt().g("offset")||this.ca.xt().g("width")||this.za.xt().g("offset")||this.za.xt().g("width")||this.Ea.xt().g("offset")||this.Ea.xt().g("width"),this.Od?this.Od.clear():e&&(this.Od=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.Od.zIndex(30),this.Od.parent(this.Na)),this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ue.zIndex(30),this.ue.parent(this.Na)),this.o?this.o.clear():(this.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.o.parent(this.Na),this.o.zIndex(31).Dd(!0)),n&&(this.D.length=0),i.reset();i.advance();)m(i.get("value"))||(a=t.nx(this.state,i.ma()),n?O(this):C(this,a));if(n&&P(this),i=this.g("connectorStroke"),this.aa)for(n=0;n<this.aa.length;n++)(e=this.aa[n])&&e.stroke(i);this.G?(n=this.f.g("fill"),e=this.f.g("stroke"),this.Ha||(this.Ha=t.nk()),a=this.G-t.$b(e)/2,this.Ha.parent(this.Na).zIndex(20).stroke(e).fill(n).Eb(a)):this.Ha&&this.Ha.parent(null),this.ud&&this.ud.stroke(i),this.I(16)}this.J(4)&&s&&(i=s.gi,s=s.ak,t.J(i,t.ig)?(i=i.rb(),x(this,i),s.clip(null)):t.J(i,t.Y)&&(i.ja(this.na),i.da(!1),i.W(),s.oc(1,0,0,1,0,0),s.clip(t.nk(this.Dc,this.uc,this.G+2))),this.Ha&&this.G&&this.Ha.To(this.Dc).Uo(this.uc)),this.nf=!1},t.g.ke=function(n,s){if(v(this)){var a=n,o=this.$(),r=(a=t.em(a))==t.vo,l=a==t.wo,h=this.labels(),c=l?this.Ea.labels():r?this.za.labels():null,u=o.get("normal");u=t.p(u)?u.label:void 0;var d=l?o.get("selected"):r?o.get("hovered"):void 0;d=t.p(d)?d.label:void 0,u=t.Zo(u,o.get("label")),d=l?t.Zo(d,o.get("selectLabel")):r?t.Zo(d,o.get("hoverLabel")):null;var p=o.ma();a=h.be(p);var g,f=u&&t.p(u.enabled)?u.enabled:null,m=d&&t.p(d.enabled)?d.enabled:null;return r=r||l?null===m?null===c.enabled()?null===f?a&&t.p(a.enabled())?a.enabled():h.enabled():f:c.enabled():m:null===f?a&&t.p(a.enabled())?a.enabled():h.enabled():f,f=this.Ic(!0),m=this.Bh(),r?((l=!a)&&(a=h.add(f,m,p)),h=a.enabled(),a.Hi(),t.$u(a,c),a.td(u,d),a.enabled(h),o=o.j("anchor"),t.p(o)&&a.anchor(o),l||a.W()):a?(h=a.enabled(),a.clear(),a.enabled(h)):(a=h.add(f,m,p),o=o.j("anchor"),t.p(o)&&a.anchor(o),a.enabled(!1)),s&&(o=a)&&this.aa&&(c=o.ma(),(g=this.aa[c])?o&&0!=o.enabled()&&r?w(this,o,g):g.clear():r?w(this,o,this.ud):this.ud.clear()),a}g=(n=t.em(n))==t.vo,m=n==t.wo;var b=this.$();a=this.labels(),o=m?this.Ea.labels():g?this.za.labels():null,c=b.get("normal"),c=t.p(c)?c.label:void 0,u=m?b.get("selected"):g?b.get("hovered"):void 0,u=t.p(u)?u.label:void 0,c=t.Zo(c,b.get("label")),u=m?t.Zo(u,b.get("selectLabel")):g?t.Zo(u,b.get("hoverLabel")):null,d=b.ma(),h=a.be(d),p=c&&t.p(c.enabled)?c.enabled:null,r=u&&t.p(u.enabled)?u.enabled:null,l=this.Bh(),f=this.Ic(!0);var y=this.g("mode3d"),S=!0;if((!(m=g||m)||m&&!this.g("forceHoverLabels"))&&"allow-overlap"!=this.g("overlapMode")){var x=b.j("start"),C=b.j("sweep");S=this.Dc;var T=this.uc,D=N(this,n);if(D){var k=(x+C/2)*Math.PI/180,$=(y?.45*D:D)*Math.sin(k);S+=D*Math.cos(k),T+=$}k=x*Math.PI/180,D=S+this.b*Math.cos(k),$=T+(y?.45*this.b:this.b)*Math.sin(k),k=(x+C)*Math.PI/180,x=S+this.b*Math.cos(k),k=T+(y?.45*this.b:this.b)*Math.sin(k),this.sb?this.sb.clear():this.sb=new t.$x,this.sb.Hf(f),this.sb.jc(l),this.sb.Hi(),t.Zu(this.sb,this.labels()),t.$u(this.sb,a),this.sb.td(c,u),y=this.labels().yl(this.sb,null,null,d),C=(b=(1==b.Hb()||360==C)&&!this.G)||!e(S,T,x,k,y),k=!i(S,T,this.b,y),x=b||i(S,T,this.G,y),S=(b||!e(D,$,S,T,y))&&C&&k&&x}return(m?null===r?null===o.enabled()?null===p?a.enabled():p:o.enabled():r:null===p?a.enabled():p)&&S?(h?(h.Hf(f),h.jc(l)):h=a.add(f,l,d),h.Hi(),t.$u(h,o),h.td(c,u),g&&!h.O()&&a.Vd()&&(h.O(a.Vd()),h.O().parent()||h.O().parent(a.O()))):h&&a.clear(h.ma()),h},t.g.UL=function(){if(!this.g("mode3d")&&this.mC().g("enabled")&&0<this.mC().g("duration"))if(this.Og&&1==this.Og.dc)this.Og.update();else if(this.J(2048)){t.qd(this.Og),this.Og=new t.bC;var e=this.mC().g("duration"),i=e*(1-.85);e=new s(this,.85*e),i=new r(this,i),this.Og.add(e),this.Og.add(i),this.Og.wa("begin",(function(){this.bj=this.g("connectorStroke"),this.ta("connectorStroke","none"),t.vx(this,!0),t.Dp(this,{type:"animationstart",chart:this})}),!1,this),this.Og.wa("end",(function(){this.ta("connectorStroke",this.bj),t.vx(this,!1),t.Dp(this,{type:"animationend",chart:this})}),!1,this),this.Og.play(!1)}},t.g.Zz=function(e,i){var n=this.$(),s="hatch"+String(e.charAt(0)).toUpperCase()+e.substr(1);if(i){var a=n.j(e),o=n.j(s);a&&a.clear(),o&&o.clear()}else a=t.eC(this.ue),n.j(e,a),o=t.eC(this.ue),n.j(s,o);return a},t.g.ZT=function(){return[this.Dc,this.uc]},t.g.L1=function(){return this.na},t.g.yba=function(){return this.b},t.g.j2=function(){return this.G},t.g.Jfa=function(t){return N(this,t)},t.g.Vl=function(){return this.g("startAngle")+-90},t.g.ce=function(t){var e,i=new l(this,t);return this.$().select(t)&&i.iy()&&!m(e=i.get("value"))&&(t=e/this.Rg("sum")*100,i.La("percentValue",t),i.La("yPercentOfTotal",t)),i},t.g.Ol=function(e,i){var n=[],s=this.$().reset(),a="aquastyle"==this.ca.g("fill");if(a){var o=this.Sb;this.Sb={}}for(;s.advance();){var r=s.ma(),l=s.get("legendItem")||{},h=null;t.D(i)&&(h=this.Ic(),h=i.call(h,h),t.ea(h)&&(h=String(h))),t.z(h)||(h=s.j("groupedPoint")?s.j("name"):String(t.p(s.get("name"))?s.get("name"):s.get("x")));var c=this.g("mode3d"),u=d("fill",1,!1),p=d("stroke",2,!1),g=d("hatchFill",3,!1);h={enabled:!0,meta:{pointIndex:r,pointValue:s.get("value")},iconType:"square",text:h,iconStroke:c?t.Ql(A(this,t.gm),.2):p(this,t.gm,!1,null),iconFill:c?A(this,t.gm):u(this,t.gm,!1,null),iconHatchFill:g(this,t.gm,!1,null)},t.Sc(h,l),h.sourceUid=t.oa(this),h.sourceKey=r,n.push(h)}return a&&(this.Sb=o),n},t.g.Ms=function(){return!0},t.g.zr=function(t){t=t.Ki(),this.data().$().select(t)&&this.select(t)},t.g.wq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.vq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.oq=function(){return[]},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget).index;if(!t.p(i)&&t.mx(this.state,t.vo)){var n=t.sx(this.state,t.vo);n.length&&(i=n[0])}return i=t.N(i),(0,window.isNaN)(i)||(e.pointIndex=e.sliceIndex=i),e},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i;if("pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),(0,window.isNaN)(i))return null;e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,pie:this,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(e){var i;(i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()&&(t.p(e)?this.state.Vh(t.vo,e):this.state.Vh(t.vo,!0),R(this))},t.g.$i=function(e,i){if(!this.enabled())return this;if(t.A(e))for(var n=t.sx(this.state,t.vo),s=0;s<n.length;s++)t.Aa(e,n[s])||this.state.Vh(t.vo,n[s]);return t.qx(this.state,e),t.p(i)&&this.wR(i),this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo,!0)},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.ej=function(e){return t.p(e)?((e=t.Bk(e))!=this.fh&&(this.fh=e),this):this.fh},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.Gu=function(){R(this),this.state.Lh(t.wo,!0)},t.g.Ii=function(e,i){var n=i&&i.shiftKey?void 0:i?t.vo:t.gm;return t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,n)):t.ea(e)&&this.state.Lh(t.wo,e,n),this},t.g.ie=function(e){t.p(e)?this.state.Vh(t.wo,e):this.state.Vh(t.wo,!0)},t.g.pk=function(t,e){var i=this.$(),n=i.j("explode");return this.g("mode3d")?(O(this),P(this,i.ma(),!0)):C(this,t,!0),m(i.get("value"))||this.ke(t),e||n!=N(this,t)},t.g.wm=function(t){var e=this.$(),i=e.j("sweep"),n=e.get("value"),s=e.ma();1==e.Hb()||360==i||m(n)&&s!=e.Hb()||(t=!!t,i=v(this),t||i?i?(this.yg=!1,this.labels().ka(),this.labels().clear(),y(this),this.labels().W(),this.labels().da(!1)):(this.labels().clear(),e.select(s)):this.labels().W())},t.g.ml=t.ia,t.g.pq=t.ia,t.g.xL=function(){var e=new t.ww(0);return e.ya(this),t.Aw(e,this),t.K(e,this.Bp,this),t.W(this,"tooltip",e),e},t.g.Bp=function(){this.Ua().W()},t.g.wR=function(e){var i=t.wr(this,"legend");if(!e||!i||e.target!=i){i=this.Ua();var n=this.Ic();e&&(i.ka(),t.Ow(i,e.clientX,e.clientY,n),i.da(!1),this.wa(t.yk()?"mousemove":"touchstart",this.wR))}},t.g.Rk=function(){return this.Ic()},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.F=function(){var e=h.u.F.call(this);return e.data=this.data().F(),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),t.wr(this,"tooltip")&&(e.tooltip=this.Ua().F()),this.Tp()&&(e.center=this.Tp().F()),t.Tq(this,X,e,"Pie"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),{chart:e}},t.g.U=function(e,i){h.u.U.call(this,e,i),t.Iq(this,X,e,i),this.group(e.group),this.data(e.data),"center"in e&&this.Tp().ga(!!i,e.center),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip),"normal"in e&&this.Qa().ga(!!i,e.normal),"hovered"in e&&this.lb().ga(!!i,e.hovered),"selected"in e&&this.selected().ga(!!i,e.selected),"hatchFillPalette"in e&&this.ve().ga(!!i,e.hatchFillPalette),"palette"in e&&this.cc(e.palette)},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.R=function(){t.sd(this.Og,this.ca,this.za,this.Ea,this.f,this.Yc,this.i,this.P,this.Fa,this.fd),this.P=this.i=this.Yc=this.f=this.Ea=this.za=this.ca=this.Og=null,delete this.sd,this.fd=this.Fa=null,h.u.R.call(this)},t.g=j.prototype,t.g.iC=function(t){t&&(this.labels.push(t),this.pb())},t.g.rb=function(){if(!this.nl){var e=this.labels[0]?this.qg.ek(this.labels[0]).height:0;this.nl=new t.I(this.x,this.y+e/2,this.width,this.height)}return this.nl},t.g.ae=function(){this.nl=null},t.g.Nx=function(){var e=this.height=0;this.ae();var i=this.G,n=this.qg.Tp(),s=n?n.ce():this.qg.ZT(),a=this.qg.b+i;n=s.x,s=s.y;var o=this.qg.g("mode3d");if(o)var r=s+.45*a+this.qg.ea-.1+.2*this.qg.b/2,l=s-(.45*a+this.qg.ea)+.1-.2*this.qg.b/2;else r=s+a+this.qg.ea-.1,l=s-(a+this.qg.ea)+.1;for(var h=0,c=this.labels.length;h<c;h++){var u=this.labels[h];e+=(a=this.qg.ek(u)).top-this.height-a.height/2,this.height+=a.height}for(this.y=e/c,(e=this.y+this.height)>r&&(e=r,this.y=r-this.height),0!=this.labels.length&&(a=this.qg.ek(this.labels[0]).height,this.y+a<l&&(e=l-a+this.height,this.y=l-a)),r=this.qg.g("outsideLabelsCriticalAngle"),this.b.length=0,l=this.qg.data().$(),this.width=this.x=window.NaN,this.K=null,this.o=this.D=window.NaN,this.ZH=!1,h=0,c=this.labels.length;h<c;h++){u=this.labels[h],a=this.qg.ek(u);var d=h==c-1?0:this.qg.ek(this.labels[h+1]).height,p=u.ma();l.select(p);var g=l.j("start"),f=l.j("sweep");(p=t.p(u.g("offsetX"))?u.g("offsetX"):this.qg.labels().g("offsetX"))||(p=0),p=t.L(p,360);var m=t.p(u.g("offsetY"))?u.g("offsetY"):this.qg.labels().g("offsetY");m||(m=0),u=t.L(m,this.qg.b);var v=t.bb(g+f/2+p);f=this.f?5:-5;var b=this.qg.b+i,y=this.qg.b+this.qg.ea+i+u;if(o)var S=.45*(this.qg.b+i),x=.45*(this.qg.b+i+u)+this.qg.ea;else S=b,x=y;g=e;var w=b+this.qg.ea,C=S+this.qg.ea;Math.abs(g-s)>C&&(C=Math.abs(g-s)),C=w*Math.sqrt(Math.pow(C,2)-Math.pow(g-s,2))/C,w=n+(this.f?1:-1)*Math.abs(C),b=n+b*Math.cos(v),S=s+S*Math.sin(v);var T=n+y*Math.cos(v);if(v=s+x*Math.sin(v),x=Math.floor(t.gn(w,g,n,s))+m,y=0>C||x>y,(m=Math.abs(t.Bb(w-b,g-S,T-b,v-S)))>this.o||(0,window.isNaN)(this.o)||y){for(this.o=0>C?Number.POSITIVE_INFINITY:m,C=window.Infinity,x=v=0;x<this.labels.length;x++)l.select(this.labels[x].ma()),b=l.get("value"),(0,window.isNaN)(+b)||(b=+b),b<C&&(C=b,v=x);this.K=this.labels[v],this.D=v}(m>r||y)&&(this.ZH=!0),f=w+f,w=this.f?f:f-a.width,this.x=(0,window.isNaN)(this.x)||this.x>w?w:this.x,w=this.f?f+a.width:f,this.width=(0,window.isNaN)(this.width)||this.width<w?w:this.width,f-=n,g-=s,o&&(g+=.2*this.qg.b/2),w=Math.sqrt(Math.pow(f,2)+Math.pow(g,2))-u,u=Math.sqrt(Math.pow(f,2)+Math.pow(g,2))-u,y=window.NaN,0<f&&0<=g?y=t.cb(Math.atan(g/f)):0<f&&0>g?y=t.cb(Math.atan(g/f))+360:0>f?y=t.cb(Math.atan(g/f))+180:!f&&0<g?y=90:!f&&0>g&&(y=270),y-=p,this.b.push(y,w,u),e-=a.height/2+d/2}this.width-=this.x},t.g.pb=function(){if(this.Nx(),this.ZH){var e=this.K,i=this.D;(0,window.isNaN)(i)||(e.enabled(!1),this.fp||(this.fp=[]),this.fp.push(e),t.Ca(this.labels,i,1));var n=this.qg;e=this.labels;var s,a,o=this.i,r=o[o.length-1];if(r!=this){var l=null;i=e.slice();var h=o.length,c=!1,u=0;for(s=e.length;u<s;u++)if(a=e[u]){var d=n.ek(a);!r||H(r,d)?!l||H(l,d)?(l&&(o.push(l),r=l),d="left-center"==a.anchor(),l=new j(d,n,o,this.G),B(l,a)):(B(l,a),n.ZH?(a.enabled(!1),l.fp||(l.fp=[]),l.fp.push(a),l.labels.pop(),l.Nx()):r&&l&&!H(r,l.rb())&&(o.pop(),l.labels=t.Ga(r.labels,l.labels),r=null,l.Nx(),c=!0)):(a.enabled(!1),l&&(l.fp||(l.fp=[]),l.fp.push(a)))}if(l)if(0<o.length-h||c)this.labels=l.labels;else{if((n=l).fp){for(o=0,u=n.fp.length;o<u;o++)n.fp[o].enabled(!0);n.fp.length=0}i.length!=e.length&&(this.labels=i)}}this.pb()}else if((e=this.i[this.i.length-1])&&(i=e.rb()),i&&!H(this,i)){for(this.i.pop(),this.labels=t.Ga(e.labels,this.labels),e=0,i=this.labels.length;e<i;e++)this.labels[e].enabled(!0);this.pb()}};var Z=h.prototype;Z.center=Z.Tp,Z.group=Z.group,Z.data=Z.data,Z.labels=Z.labels,Z.getPixelRadius=Z.yba,Z.getPixelInnerRadius=Z.j2,Z.getPixelExplode=Z.Jfa,Z.palette=Z.cc,Z.tooltip=Z.Ua,Z.hatchFillPalette=Z.ve,Z.getType=Z.Ma,Z.getPoint=Z.ce,Z.toCsv=Z.Zj,Z.hover=Z.Tj,Z.unhover=Z.Md,Z.select=Z.select,Z.unselect=Z.ie,Z.normal=Z.Qa,Z.hovered=Z.lb,Z.selected=Z.selected,t.Tp.pie=V,t.Tp["pie-3d"]=q,t.E("anychart.pie",V),t.E("anychart.pie3d",q)}.call(this,$)),_.cartesian||(_.cartesian=1,function(t){var e=function(e,i,n){var s=["whiskerWidth","hoverWhiskerWidth","selectWhiskerWidth"];if(2==n)var a=e.Ea,o="selected";else 1==n?(a=e.za,o="hovered"):(a=e.ca,o="normal");return o=i.get(o),null!=(i=t.Zo(t.p(o)?o[s[0]]:void 0,i.get(s[n]),a.g(s[0])))||(i=e.ca.g(s[0])),t.L(i,e.yu)},i=function(e){t.JA.call(this,e)},n=function(){t.WB.call(this),this.Ga("cartesian"),t.T(this.ua,[["categorizedBySeries",327680,1]]),this.re="cartesian"},s=function(){var t=new n;return t.ta("defaultSeriesType","line"),t.$c(),t.Wg(),t},a=function(t){var e=new n;e.Ga("area"),e.ta("defaultSeriesType","area"),e.re="area",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.area(arguments[i]);return e},o=function(t){var e=new n;e.Ga("bar"),e.ta("defaultSeriesType","bar"),e.re="bar",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.bar(arguments[i]);return e},r=function(t){var e=new n;e.Ga("box"),e.ta("defaultSeriesType","box"),e.re="box",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.box(arguments[i]);return e},l=function(t){var e=new n;e.Ga("column"),e.ta("defaultSeriesType","column"),e.re="column",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.column(arguments[i]);return e},h=function(t){var e=new n;e.Ga("column"),e.ta("defaultSeriesType","hilo"),e.re="hilo",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.hilo(arguments[i]);return e},c=function(e){t.kl(405,null,["anychart.financial()","anychart.ohlc() or anychart.candlestick()"],!0);var i=new n;i.Ga("financial"),i.ta("defaultSeriesType","candlestick"),i.re="financial",i.Wg(),i.$c();for(var s=0,a=arguments.length;s<a;s++)i.candlestick(arguments[s]);return i},u=function(t){var e=new n;e.Ga("line"),e.ta("defaultSeriesType","line"),e.re="line",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.line(arguments[i]);return e},d=function(t){var e=new n;e.Ga("verticalArea"),e.ta("defaultSeriesType","area"),e.re="vertical-area",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.area(arguments[i]);return e},p=function(t){var e=new n;e.Ga("verticalLine"),e.ta("defaultSeriesType","line"),e.re="vertical-line",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.line(arguments[i]);return e},g=function(t){var e=new n;e.Ga("line","stick"),e.ta("defaultSeriesType","stick"),e.re="stick",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.stick(arguments[i]);return e},f=function(e){var i=new n;i.Ga("line","jumpLine"),i.ta("defaultSeriesType","jump-line"),i.re="jump-line",i.Wg(),i.$c();for(var s=t.pm("jump-line"),a=0,o=arguments.length;a<o;a++)i[s](arguments[a]);return i},m=function(e){var i=new n;i.Ga("line","stepLine"),i.ta("defaultSeriesType","step-line"),i.re="step-line",i.Wg(),i.$c();for(var s=t.pm("step-line"),a=0,o=arguments.length;a<o;a++)i[s](arguments[a]);return i},v=function(t){var e=new n;e.Ga("financial","ohlc"),e.ta("defaultSeriesType","ohlc"),e.re="ohlc",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.ohlc(arguments[i]);return e},b=function(t){var e=new n;e.Ga("financial","candlestick"),e.ta("defaultSeriesType","candlestick"),e.re="candlestick",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.candlestick(arguments[i]);return e};t.wA.prototype.yD=t.ca(25,(function(){return this.qf.length})),t.wA.prototype.wD=t.ca(24,(function(){return this.b.length})),t.IP={name:"median",Qb:"path",Yb:null,Zb:"medianStroke",ac:!0,Ib:!1,zIndex:2e-6},t.JP={name:"stem",Qb:"path",Yb:null,Zb:"stemStroke",ac:!0,Ib:!1,zIndex:2e-6},t.KP={name:"whisker",Qb:"path",Yb:null,Zb:"whiskerStroke",ac:!0,Ib:!1,zIndex:2e-6},t.H(i,t.JA),t.PG[3]=i,t.g=i.prototype,t.g.type=3,t.g.flags=263936,t.g.Kh={path:"path",hatchFill:"path",median:"path",stem:"path",whisker:"path"},t.g.Np=["lowest","q1","median","q3","highest"],t.g.ug=function(i,n){var s=this.bd.ed(n),a=i.j("x"),o=i.j("lowest"),r=i.j("q1"),l=i.j("median"),h=i.j("q3"),c=i.j("highest"),u=e(this.X,i,n)/2,d=this.o/2,p=s.path;t.HA(p,this.xa,a-d,r),t.IA(p,this.xa,a+d,r,a+d,h,a-d,h),p.close(),p=s.hatchFill,t.HA(p,this.xa,a-d,r),t.IA(p,this.xa,a+d,r,a+d,h,a-d,h),p.close(),p=s.median,t.HA(p,this.xa,a-d,l),t.IA(p,this.xa,a+d,l),p=s.stem,t.HA(p,this.xa,a,o),t.IA(p,this.xa,a,r),t.HA(p,this.xa,a,h),t.IA(p,this.xa,a,c),p=s.whisker,t.HA(p,this.xa,a-u,o),t.IA(p,this.xa,a+u,o),t.HA(p,this.xa,a-u,c),t.IA(p,this.xa,a+u,c)},t.g.WB=function(i,n){var s=i.j("shapes");if(s){var a=i.j("x"),o=i.j("lowest"),r=i.j("highest"),l=e(this.X,i,n)/2;(s=s.whisker).clear(),t.HA(s,this.xa,a-l,o),t.IA(s,this.xa,a+l,o),t.HA(s,this.xa,a-l,r),t.IA(s,this.xa,a+l,r)}},t.H(n,t.WB);var y={},S=7864320|t.QG;y.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y.bar={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y.box={Fb:3,Kb:2,Lb:[t.RH,t.qH,t.IP,t.JP,t.KP],Ob:null,Jb:null,Cb:S,Ab:"highest",zb:"lowest"},y.bubble={Fb:4,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.candlestick={Fb:5,Kb:2,Lb:[t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y.column={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y["jump-line"]={Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:3670016|t.QG,Ab:"value",zb:"value"},y.ohlc={Fb:10,Kb:2,Lb:[t.BH,t.GH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-area"]={Fb:11,Kb:1,Lb:[t.nH,t.QH,t.MH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-bar"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-column"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-spline-area"]={Fb:13,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y["range-step-area"]={Fb:14,Kb:1,Lb:[t.nH,t.qH,t.MH,t.QH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},y.spline={Fb:15,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y["spline-area"]={Fb:16,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y["step-area"]={Fb:17,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y["step-line"]={Fb:18,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"value"},y.stick={Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:S,Ab:"value",zb:"zero"},y.hilo={Fb:31,Kb:2,Lb:[t.oH,t.MH,t.QH],Ob:null,Jb:null,Cb:S,Ab:"high",zb:"low"},n.prototype.fj=y,t.Nz(n,n.prototype.fj),n.prototype.xN=function(t){var e=t.enabled(),i=t.vm||[],n=!0;return(t=t.data()?t.data().Hb():0)&&t!=i.length||(n=!1),e&&n},n.prototype.UR=function(e,i,s,a){if(this.g("categorizedBySeries")){a=i.length;var o=[],r={};for(s=0;s<a;s++){var l=i[s].X.name();o.push(l),r[l=t.qo(l)]=s}e.XB=r,e.ih=o}else n.u.UR.call(this,e,i,s,a)},n.prototype.DT=function(t,e){this.g("categorizedBySeries")||n.u.DT.call(this,t,e)};var x={};t.sq(x,[[0,"categorizedBySeries",t.Dq]]),t.U(n,x),n.prototype.F=function(){var e=n.u.F.call(this);return t.Tq(this,x,e.chart),e},n.prototype.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,x,e)},t.Tp.cartesian=s;var w=n.prototype;t.E("anychart.cartesian",s),w.xScale=w.Ra,w.yScale=w.bb,w.crosshair=w.mh,w.xGrid=w.lm,w.yGrid=w.nm,w.xMinorGrid=w.Qr,w.yMinorGrid=w.Tr,w.xAxis=w.$h,w.getXAxesCount=w.wD,w.yAxis=w.ij,w.getYAxesCount=w.yD,w.getSeries=w.ef,w.lineMarker=w.Ym,w.rangeMarker=w.gn,w.textMarker=w.mn,w.palette=w.cc,w.markerPalette=w.Nf,w.hatchFillPalette=w.ve,w.getType=w.Ma,w.addSeries=w.kl,w.getSeriesAt=w.Ai,w.getSeriesCount=w.tj,w.removeSeries=w.Ao,w.removeSeriesAt=w.Rn,w.removeAllSeries=w.Dp,w.getPlotBounds=w.dg,w.xZoom=w.Tq,w.yZoom=w.Uq,w.xScroller=w.Mp,w.yScroller=w.Ur,w.getStat=w.Rg,w.annotations=w.Nk,w.getXScales=w.vy,w.getYScales=w.xy,t.Tp.area=a,t.Tp.bar=o,t.Tp.box=r,t.Tp.column=l,t.Tp.hilo=h,t.Tp.financial=c,t.Tp.line=u,t.Tp["vertical-area"]=d,t.Tp["vertical-line"]=p,t.Tp.stick=g,t.Tp["jump-line"]=f,t.Tp["step-line"]=m,t.Tp.ohlc=v,t.Tp.candlestick=b,t.E("anychart.area",a),t.E("anychart.bar",o),t.E("anychart.vertical",o),t.E("anychart.box",r),t.E("anychart.column",l),t.E("anychart.hilo",h),t.E("anychart.financial",c),t.E("anychart.ohlc",v),t.E("anychart.candlestick",b),t.E("anychart.stick",g),t.E("anychart.jumpLine",f),t.E("anychart.stepLine",m),t.E("anychart.line",u),t.E("anychart.verticalArea",d),t.E("anychart.verticalLine",p)}.call(this,$)),_.mekko||(_.mekko=1,function(t){var e=function(e,i){e.WR&&t.Rt(e,i)},i=function(e,i,n,s,a,o){t.xB.call(this,e,i,n,s,a),this.nv=o},n=function(e,i){t.wA.call(this,!0),this.Ga("mekko"),this.tw=this.Pv=null,this.zla=!!e,this.nv=!!i,this.ta("defaultSeriesType","mekko"),t.T(this.ua,[["pointsPadding",4294967295,1]])},s=function(t,e,i,n,s,a){t.data.length&&(t.data[0].j.missing||(i.push(t.X.name()),n.push(t.data[0].data.value)),t.data[e].j.missing||(s.push(t.X.name()),a.push(t.data[e].data.value)))},a=function(e){t.JA.call(this,e)},o=function(e,i,n,s){if(0!=i.get("value")&&n){var a=i.j("x"),o=i.j("zero"),r=i.j("value"),l=s?i.j("pointWidth"):e.o;i.j("pointWidth",l),l=(a-=(l-=2*(s=Math.abs(t.Tm(t.L(e.X.ya.g("pointsPadding"),l)))))/2)+l,i=i.j("stroke")?i.j("stroke"):n.path.stroke();var h=(i=t.$b(i))/2;e.xa?(a=t.R(a,1),l=t.R(l,1)):(r=t.R(r,1),o=t.R(o,1)),a=t.R(a+h,i),l=t.R(l-h,i),r+=e.xa?-h:h,o-=e.xa?-h:h,r=t.R(r,i),o=t.R(o,i),s&&(o-=s=(i=Math.abs(o-r))>2*s?s:i/2-1,r+=s),s=n.path,t.HA(s,e.xa,a,r),t.IA(s,e.xa,l,r,l,o,a,o),s.close(),s=n.hatchFill,t.HA(s,e.xa,a,r),t.IA(s,e.xa,l,r,l,o,a,o),s.close()}},r=function(t){var e=new n(!1);e.re="mekko",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.mekko(arguments[i]);return e},l=function(t){var e=new n(!0);e.Ga("mosaic"),e.re="mosaic",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.mekko(arguments[i]);return e},h=function(t){var e=new n(!1,!0);e.Ga("barmekko"),e.re="barmekko",e.Wg(),e.$c();for(var i=0,s=arguments.length;i<s;i++)e.mekko(arguments[i]);return e};t.H(i,t.xB),i.prototype.r4=function(t){return!this.nv&&0>t?0:t},i.prototype.gq=function(t,e,n){(this.nv||0<t.get("value"))&&i.u.gq.call(this,t,e,n)},i.prototype.tf=function(t,e,n){(this.nv||0<t.get("value"))&&i.u.tf.call(this,t,e,n)},t.H(n,t.wA);var c={};c.mekko={Fb:29,Kb:2,Lb:[t.RH,t.qH],Ob:null,Jb:null,Cb:5767168|t.QG,Ab:"value",zb:"zero"},n.prototype.fj=c,t.Nz(n,n.prototype.fj),t.g=n.prototype,t.g.sa=268435456|t.wA.prototype.sa,t.g.FE=function(e){n.u.FE.call(this,e),t.X(e,64)&&this.B(268435456,1)},t.g.FT=function(){if(t.p(void 0)){var e=t.jt(this.Pv,void 0,"ordinal",t.bt,null,this.hL,this);if(e){var i=this.Pv==e;this.Pv=e,this.Pv.da(i),i||(e=458752,(this.ev()&&"categories"==this.eg().g("itemsSourceMode")||this.nv)&&(e|=512),this.B(e,268435457))}return this}return this.Pv||(e=this.bu(),i=this.vf("firstCategoriesScale"),this.Pv=t.jt(this.Pv,e[i],null,void 0,null,this.hL,this),this.Pv.da(!1)),this.Pv},t.g.RV=function(){if(t.p(void 0)){var e=t.jt(this.tw,void 0,"ordinal",t.bt,null,this.hL,this);if(e){var i=this.tw==e;this.tw=e,this.tw.da(i),i||this.B(458752,268435457)}return this}return this.tw||(e=this.bu(),i=this.vf("lastCategoriesScale"),this.tw=t.jt(this.tw,e[i],null,void 0,null,this.hL,this),this.tw.da(!1)),this.tw},t.g.hL=function(e){this.ka(),t.X(e,4)&&(e=458752,(this.ev()&&"categories"==this.eg().g("itemsSourceMode")||this.nv)&&(e|=512),this.B(e,268435456)),this.da(!0)},t.g.CA=function(){return t.bt},t.g.xD=function(){return["Mekko chart X scale","ordinal"]},t.g.tH=function(){return"linear"},t.g.sH=function(){return 15},t.g.SM=function(){return["Chart scale","ordinal, linear, log, date-time"]},t.g.ev=function(){return!0},t.g.Ol=function(e,i){if(this.nv&&1==this.tj()&&t.J(this.Ra(),t.Qt)){this.pb();var s,a=[],o=this.Ra().names(),r=this.Ra().values(),l=this.Ai(0);for(s=0;s<r.length;s++){var h=null;t.D(i)&&(h={value:r[s],name:o[s]},h=i.call(h,h)),t.z(h)||(h=String(o[s]));var c=this.cc().nc(s);a.push({text:h,iconType:"square",iconStroke:t.Wl(c,1),iconFill:c,iconHatchFill:l.hatchFill()})}return a}return n.u.Ol.call(this,e,i)},t.g.X5=function(t){if(this.zla){var e=!this.Ra().Ne(),i="left"==t.g("orientation")||"bottom"==t.g("orientation");t.scale(i==e?this.FT():this.RV())}else t.scale(this.bb())},t.g.pb=function(){var i=this.J(196608);if(this.J(458752)&&this.B(268435456),n.u.pb.call(this),i){var a,o=[],r=[],l=this.Re.length;for(i=0;i<this.Re.length;i++){var h=this.Re[i].data;for(a=0;a<h.length;a++){if(t.p(r[a])||(r[a]=0),h[a].j.missing){r[a]++;var c=0}else c=t.N(h[a].data.value),c=this.nv?Math.abs(c):0>c?0:c;null==o[a]?o.push(c):o[a]+=c}}for(i=0;i<this.Re.length;i++)for(h=this.Re[i].data,a=c=0;a<h.length;a++)h[a].j.category=r[a]<l?c++:c;o=(0,t.Ye)(o,(function(t,e){return r[e]<l})),e(this.Ra(),o)}this.J(268435456)&&(function(t){if(t.Re.length){var i,n=[],a=[],o=[],r=[],l=t.Re[0].data.length-1;if("direct"==t.bb().kx())for(i=t.Re.length;i--;)s(t.Re[i],l,n,o,a,r);else for(i=0;i<t.Re.length;i++)s(t.Re[i],l,n,o,a,r);(l=t.FT()).Bg(),l.Xc.apply(l,n),l.Hg(),e(l,o),(l=t.RV()).Bg(),l.Xc.apply(l,a),l.Hg(),e(l,r)}}(this),this.I(268435456))};var u={};t.rq(u,0,"pointsPadding",t.Cq),t.U(n,u),t.g=n.prototype,t.g.Gt=function(t,e){return new i(this,this,t,e,!1,this.nv)},t.g.Ss=function(){return"mekko"},t.g.ML=function(){return 3},t.g.F=function(){var e=n.u.F.call(this);return t.Tq(this,u,e),{chart:e}},t.g.ft=function(t,e,i){n.u.ft.call(this,t,e,i)},t.g.EX=function(e,i,n,s){var a=e.F();return(e.scale()==this.FT()&&"left"!=e.g("orientation")||e.scale()==this.RV()&&"right"!=e.g("orientation"))&&t.Zz(a,"scale",e.scale(),i,n),s.push(t.oa(e)),a},t.g.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,u,e)};var d=n.prototype;d.xScale=d.Ra,d.yScale=d.bb,d.crosshair=d.mh,d.xAxis=d.$h,d.getXAxesCount=d.wD,d.yAxis=d.ij,d.getYAxesCount=d.yD,d.getSeries=d.ef,d.palette=d.cc,d.markerPalette=d.Nf,d.hatchFillPalette=d.ve,d.getType=d.Ma,d.addSeries=d.kl,d.getSeriesAt=d.Ai,d.getSeriesCount=d.tj,d.removeSeries=d.Ao,d.removeSeriesAt=d.Rn,d.removeAllSeries=d.Dp,d.getPlotBounds=d.dg,d.annotations=d.Nk,d.lineMarker=d.Ym,d.rangeMarker=d.gn,d.textMarker=d.mn,t.H(a,t.JA),t.PG[29]=a,t.g=a.prototype,t.g.type=29,t.g.flags=263905,t.g.Kh={path:"path",hatchFill:"path"},t.g.ug=function(t,e){if(!t.j("missing")){var i=this.bd.ed(e);o(this,t,i)}},t.g.yt=function(t){var e,i=t.j("shapes");for(e in i)i[e].clear();o(this,t,i,!0)},t.g.WB=function(t){if(!t.j("missing")){var e,i=t.j("shapes");for(e in i)i[e].clear();o(this,t,i,!0)}},t.Tp.mekko=r,t.Tp.mosaic=l,t.Tp.barmekko=h,t.E("anychart.mekko",r),t.E("anychart.mosaic",l),t.E("anychart.barmekko",h)}.call(this,$)),_.theme_graph||(_.theme_graph=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{graph:{labels:{enabled:!1,fontSize:8,fontColor:"#7c868e",disablePointerEvents:!0,selectable:!1,anchor:"center-top",position:"center-bottom",padding:{top:0,left:0,right:0,bottom:0}},padding:10,tooltip:{displayMode:"single",positionMode:"float",separator:{enabled:!1},title:{enabled:!1},titleFormat:""},nodes:{width:12,height:12,shape:"circle",tooltip:{format:"{%id}"},labels:{format:"{%id}",enabled:!1},normal:{fill:t.zN,stroke:t.EN},hovered:{fill:t.FN,stroke:t.zN},selected:{fill:"#333 0.85",stroke:"1.5 #212121"}},edges:{arrows:{enabled:!1,size:10,position:"100%"},stroke:t.FN,hovered:{stroke:t.EN},selected:{stroke:"#333 0.85"},labels:{enabled:!1,format:"from {%from} to {%to}"},tooltip:{format:"from: {%from}\nto: {%to}"}},layout:{type:"forced",iterationCount:500},interactivity:{enabled:!0,zoomOnMouseWheel:!0,scrollOnMouseWheel:!1,nodes:!0,edges:!0,magnetize:!1,hoverGap:7}}})}.call(this,$)),_.map_part||(_.map_part=1,function(t){var e=function(t,e,i){return t+i*(e-t)},i=function(t){var e=t.mi-t.Hj;return e*e+(t=t.Pe-t.ze)*t},n=function(t){switch(String(t).toLowerCase()){case"hammeraitoff":case"hammer-aitoff":case"hammer":return"hammer";case"wagner":case"wagner6":return"wagner6";case"undefined":case"null":case"none":case"wsg84":case"base":case"+proj=longlat +datum=WGS84 +no_defs":return"wsg84"}return t},s=function(e,i,n){t.Ex.call(this,e,i),this.b=n||function(){return!0}},a=function(){},o=function(t){return 0<t?Math.sqrt(t):0},r=function(){},l=function(){},h=function(){this.f=45*Math.PI/180,this.b=1/Math.tan(this.f)},c=function(){},u=function(){},d=function(){},p=function(){},g=function(t,e){this.scale=t,this.angle=e},f=function(){this.b=2,this.f=new g((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}))},m=function(){},v=function(){this.b=new g((function(){return 1}),Math.asin)},b=function(e){this.f=e,this.b=t.ll.proj4},y=function(){},S=function(){},x=function(e){var i=e(0,0);return!(!t.A(i)||(e=i[0],i=i[1],!t.ea(e)||(0,window.isNaN)(e)||!t.ea(i)||(0,window.isNaN)(i)))},w=function(e){if(t.C(e)){var i=new a,n=(t.D(e.forward)?e.forward:null)||(t.D(e)?e:null),s=t.D(e.invert)?e.invert:null;return n&&x(n)&&(i.forward=function(e,i){return e=t.bb(e),i=t.bb(i),n(e,i)},s&&x(s)&&(i.xj=function(e,i){var n=s(e,-i);return n[0]=t.cb(n[0]),n[1]=t.cb(n[1]),n})),i}switch(e){case"bonne":i=new h;break;case"eckert1":i=new c;break;case"eckert3":i=new u;break;case"fahey":i=new p;break;case"hammer":i=new f;break;case"aitoff":i=new r;break;case"mercator":i=new m;break;case"orthographic":i=new v;break;case"robinson":i=new y;break;case"wagner6":i=new S;break;case"wsg84":i=new a;break;case"equirectangular":i=new d;break;case"august":i=new l;break;default:try{t.ll.proj4?i=new b(e):(i=new a,Ee||(t.kl(19,null,null,!0),Ee=!0))}catch(o){i=new a}}return i},C=function(e){switch(e=String(e).toLowerCase()){case"undefined":case"null":case"none":case"wsg84":return!0;case"bonne":case"eckert1":case"eckert3":case"fahey":case"hammer":case"aitoff":case"mercator":case"orthographic":case"robinson":case"wagner6":case"equirectangular":case"august":return!1;default:return!t.ll.proj4}},T=function(e){t.hx.call(this,e),t.T(this.ua,[["zoomOnDoubleClick",0,0],["keyboardZoomAndMove",0,0],["drag",0,0],["copyFormat",0,0]])},D=function(e,i,n,s){t.EA.call(this,e,window.NaN),this.id=s,this.f=n,this.b=i},k=function(e,i){t.FA.call(this,e,i)},$=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),this.ss=[],this.GX=[],t.T(this.ua,[["startSize",1024,1,4294967295],["endSize",1024,1,4294967295],["curvature",1024,1025,4294967295]]),this.eq=!0,this.aP={},this.KH={},this.DE={},this.JA={}},O=function(t,e){t.i!=e&&(t.i=e,t.b||t.B(512,1))},P=function(t){return t.b||t.i},L=function(e,i){var n=!!(i&t.wo),s=!n&&!!(i&t.vo),a=e.$(),o=a.get("normal");o=t.p(o)?o.label:void 0;var r=a.get("hovered");r=t.p(r)?r.label:void 0;var l=a.get("selected");l=t.p(l)?l.label:void 0,o=t.Zo(o,a.get("label")),r=s?t.Zo(r,a.get("hoverLabel")):null,l=n?t.Zo(l,a.get("selectLabel")):null,a=o&&t.p(o.position)?o.position:void 0,r=r&&t.p(r.position)?r.position:void 0,l=l&&t.p(l.position)?l.position:void 0,o=e.Qa().labels();var h=e.lb().labels(),c=e.selected().labels();return s||n?s?t.p(r)?r:t.p(h.g("position"))?h.g("position"):t.p(a)?a:o.g("position"):t.p(l)?l:t.p(c.g("position"))?c.g("position"):t.p(a)?a:o.g("position"):t.p(a)?a:o.g("position")},I=function(e){var i="center";return(e=t.ab(e))?90>e?i="left-bottom":90==e?i="left-center":180>e?i="left-top":180==e?i="center-top":270>e?i="right-top":270==e?i="right-center":270<e&&(i="right-bottom"):i="center-bottom",i},A=function(e,i){t.p(i)&&!t.Ta(e.f,i)&&(e.f=i,e.B(256,1))},E=function(t){return 24==t.bf.type},G=function(e){var i=e.$(),n=i.ma(),s=t.nx(e.state,n),a=!!(s&t.wo),o=!a&&!!(s&t.vo),r=e.bf.type,l=i.j("shapes");if(l)if(e.Ak()||22==r){r=i.j("x");var h=i.j("value"),c=F(e,i);if(!c)return;var u=c.x;c=c.y;var d=l.path||l.circle||l.negative,p=((d=d.Pd)?-d.Jd:0)+u-r,g=(d?-d.Fd:0)+c-h;t.Dc(l,(function(t){t.translate(p,g)}))}else if(21==r){h=e.ZA,r=e.ya.zf.Ig().clone(),h&&t.wb(r,t.Jb(h));var f=r.od,m=r.Jd,v=r.Fd;t.Dc(l,(function(t){t.oc(f,0,0,f,m,v)}))}else 24==r&&(r=e.ya.zf.Ig(),(l=l.hatchFill)&&l.oc(r.od,r.gf,r.We,r.Le,r.Jd,r.Fd));e.check(4194304)&&(d=i.get("normal"),d=t.p(d)?d.marker:void 0,c=i.get("hovered"),c=t.p(c)?c.marker:void 0,l=i.get("selected"),l=t.p(l)?l.marker:void 0,d=t.Zo(d,i.get("marker")),c=t.Zo(c,i.get("hoverMarker")),l=t.Zo(l,i.get("selectMarker")),r=e.Qa().Db(),h=e.lb().Db(),u=e.selected().Db(),i=r.jp(n),d=d&&t.p(d.enabled)?d.enabled:null,c=c&&t.p(c.enabled)?c.enabled:null,l=l&&t.p(l.enabled)?l.enabled:null,(a=o||a?o?null===c?h&&null===h.enabled()?null===d?r.enabled():d:h.enabled():c:null===l?u&&null===u.enabled()?null===d?r.enabled():d:u.enabled():l:null===d?r.enabled():d)&&i&&i.Vd()&&i.jc()&&function(e,i,n){var s=i.Vd(),a=e.$(),o=e.$(),r=!!(n&t.wo);n=!r&&!!(n&t.vo);var l=o.get("normal");l=t.p(l)?l.marker:void 0;var h=o.get("hovered");h=t.p(h)?h.marker:void 0;var c=o.get("selected");c=t.p(c)?c.marker:void 0,l=t.Zo(l,o.get("marker")),h=t.Zo(h,o.get("hoverMarker")),c=t.Zo(c,o.get("selectMarker")),o=l&&t.p(l.position)?l.position:e.Qa().Db().g("position"),l=e.lb().Db().g("position"),h=h&&t.p(h.position)?h.position:t.p(l)?l:o,l=e.selected().Db().g("position"),c=c&&t.p(c.position)?c.position:t.p(l)?l:o,n=e.Bh(n?h:r?c:o),e=i.ic("rotation"),t.p(e)&&null!==e&&!(0,window.isNaN)(e)||(e=a.j("markerRotation")),r=i.ic("anchor"),t.p(r)&&null!==r||(r=a.j("markerAnchor")),t.p(e)&&s.Du(-e,r),i=i.jc().value,a=n.value,n=s.Pd,s.translate((n?-n.Jd:0)+a.x-i.x,(n?-n.Fd:0)+a.y-i.y),t.p(e)&&s.Du(e,r)}(e,i,s)),(a=(n=e.Qa().labels().be(n))&&n.Vd()&&n.jc()&&n.ic("enabled"))&&function(e,i,n){var s=i.Vd(),a=e.$();n=L(e,n);var o=e.Bh(n);n=i.ic("rotation");var r=i.ic("anchor");t.p(r)&&null!==r||(r=a.j("labelAnchor")),t.p(n)&&s.Du(-n,r);var l=i.jc().value;o=o.value;var h=s.Pd;s.translate(-h.Jd+o.x-l.x,-h.Fd+o.y-l.y),(l=i.Zf)&&"offset"!=a.j("positionMode")&&(i=i.ZA||e.ZA,a=e.ya.zf.Ig().clone(),i&&t.wb(a,t.Jb(i)),e=a.od,i=a.Jd,a=a.Fd,a=new t.Db(e,0,0,e,i,a),t.Hb(a,t.Jb(s.Pd)),e=a.od,t.Wm(e,1,1e-6)?a=i=0:(i=a.Jd,a=a.Fd),l.oc(e,0,0,e,i,a)),t.p(n)&&s.Du(n,r)}(e,n,s)},U=function(e){var i=e.$(),n=(n=i.j("features"))&&n.length?n[0]:null;if(!n||!E(e))return{x:0,y:0};var s=(n=n.properties)&&n.middleXYMode,a=i.get("middleXYMode");return"relative"==(s=t.p(a)?a:s||"relative")?e=M(e):"absolute"==s?(s=i.get("middle-x"),a=i.get("middle-y"),i=t.p(s)?s:n?n["middle-x"]:0,n=t.p(a)?a:n?n["middle-y"]:0,i=t.N(i),n=t.N(n),e={x:(e=e.ya.scale().transform(i,n))[0],y:e[1]}):e={x:0,y:0},e},F=function(e,i){var n=e.ya.scale(),s=!1,a=e.Be(),o=i.get(a[0]),r=i.get(a[1]);a=i.get(a[2]);var l=t.Do(r)&&r==o;return r=(0,window.parseFloat)(r),a=(0,window.parseFloat)(a),n=n.transform(r,a),(0,window.isNaN)(r)||(r=n[0]),(0,window.isNaN)(a)||l||(a=n[1]),((0,window.isNaN)(r)||(0,window.isNaN)(a))&&((n=i.j("features"))&&n.length&&n[0].properties?(i.j("regionId",o),o=M(e),(0,window.isNaN)(r)&&(r=o.x),((0,window.isNaN)(a)||l)&&(a=o.y)):s=!0),i.j("missing",s),s?null:{x:r,y:a}},M=function(e){var i=e.$(),n=(e=(e=i.j("features"))&&e.length?e[0]:null)?e.properties:null,s=i.get("middle-x"),a=i.get("middle-y");return i=t.p(s)?s:n&&t.p(n["middle-x"])?n["middle-x"]:.5,n=t.p(a)?a:n&&t.p(n["middle-y"])?n["middle-y"]:.5,e=(e=e?e.ia:null)?{x:(e=e.kr()).left+e.width*i,y:e.top+e.height*n}:null},_=function(e){this.map=e,this.status=0,this.timeout=null,this.zy=(0,t.pa)((function(t){this.status=t,this.map.dispatchEvent("animationend"),this.timeout=null}),this)},N=function(t,e){if(t.status^e)if(t.timeout&&e)(0,window.clearTimeout)(t.timeout),t.timeout=null;else if(e){t.status=e;var i=ge(t.map);t.map!=i&&t.map.kb(i),t.map.dispatchEvent("animationstart")}else t.timeout&&(0,window.clearTimeout)(t.timeout),t.timeout=(0,window.setTimeout)(t.zy,oi,e);else t.status&&e&&t.timeout&&((0,window.clearTimeout)(t.timeout),t.timeout=null)},R=function(e,i,n,s,a,o){this.map=e,this.i=!!a,t.xz.call(this,i,n,s,o)},j=function(t,e,i,n,s,a,o){R.call(this,t,[],[],s,a,o),this.ss=e,this.xJ=i,this.fe=n,this.G=o},B=function(e,i){t.D(e.G)&&(i=e.G(i));var n=(0,t.pa)(e.aS,{t:i,fe:e.fe,xJ:e.xJ,TT:e.map.scale()});e.fe.Yo.ratio(i),e.map.scale().ka(),e.map.scale().Bg(!1),he(e.map,e.ss,n,!1,!0),e.map.scale().Hg(),e.map.scale().da(!0)},H=function(t,e,i,n,s,a){R.call(this,t,e,i,n,s,a),this.G=!1},z=function(e,i){if(e.map.ss()){var n=e.map.zf,s=n.ck().round(),a=n.rb().round(),o=e.map.Dc,r=e.map.uc,l=e.map.mQ/e.map.aC;e.map.Nr||(1>l&&!t.qb(a,s)&&(o=(r=ye(e.map,s,a))[1],r=r[2]),o<a.left?o=a.left:o>a.cb()&&(o=a.cb()),r<a.top?r=a.top:r>a.Va()&&(r=a.Va())),a=i/e.map.Sg(),n.scale(a,a,o,r),e.map.lq=i,n=n.Pd,e.map.scale().zoom=n.od,dt(e.map.scale(),n.Jd,n.Fd),ee(e.map)}},V=function(t,e,i){var n=t.map.zf.Pd;t.map.zf.oc(n.od,0,0,n.Le,e,i),t.map.scale().zoom=n.od,dt(t.map.scale(),n.Jd,n.Fd),ee(t.map)},q=function(){t.Y.call(this),delete this.oa.enabled,this.Xb=this.Y=null,this.path=t.qk(),this.path.eq(!0),t.ru(this,this.path),t.T(this.ua,[["stroke",0,1],["length",0,9],["position",0,9]])},W=function(t){switch(t.orientation()){case"top":t.b=t.qa.zq();break;case"right":t.b=t.qa.yq();break;case"bottom":t.b=t.qa.Cq();break;case"left":t.b=t.qa.Bq()}return t.b},Y=function(e,i,n,s,a){switch(i){case"inside":i=t.$a(n,2*Math.PI)+1.5*Math.PI,"top"==e.orientation()||"left"==e.orientation()?s[0]<a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n+.5*Math.PI):s[0]>a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n+.5*Math.PI);break;case"center":i=Y(e,"outside",n,s,a),s[0]+=Math.cos(i)*e.length()/2,s[1]+=Math.sin(i)*e.length()/2,i+=Math.PI;break;default:i=t.$a(n-Math.PI/2,2*Math.PI),"top"==e.orientation()||"left"==e.orientation()?s[0]>a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n-1.5*Math.PI):s[0]<=a[0]&&(s[1]<=a[1]||s[1]>=a[1])&&(i=n-1.5*Math.PI)}return i},K=function(t,e){t.qa.pb(),e=(0,window.parseFloat)(e);var i=W(t),n=t.g("position"),s=t.g("length");if(t.Nb()){var a=t.qa.transform(e,i,null);i=t.qa.transform(e+1,i,null)}else a=t.qa.transform(i,e,null),i=t.qa.transform(i,e+1,null);var o=Math.atan(-(a[1]-i[1])/(i[0]-a[0]));return(0,window.isNaN)(o)&&(o=0),n=Y(t,n,o,a,i),[a[0],a[1],a[0]+Math.cos(n)*s,a[1]+Math.sin(n)*s,n]},X=function(e,i){var n=K(e,i);return new t.I(Math.min(n[0],n[2]),Math.min(n[1],n[3]),Math.abs(n[0]-n[2]),Math.abs(n[1]-n[3]))},J=function(){t.Y.call(this),this.ci=[],this.Fk=[],this.Xb=this.Y=null,this.se=980,t.T(this.ua,[["stroke",16,1],["overlapMode",980,9],["drawFirstLabel",980,9],["drawLastLabel",980,9]])},Z=function(t,e){var i=(e?t.labels():t.qb()).g("position");if("center"==i)var n="center";else switch(t.vh){case"top":n="center-bottom";break;case"right":n="left-center";break;case"bottom":n="center-top";break;case"left":n="inside"==i?"left-center":"right-center"}return n},Q=function(e,i){if(!e.Hq||e.J(4)){var n=e.ja(),s=e.scale();if(t.p(i)&&s.Qf(i),s.pb(),e.Nb())var a=e.scale().wx(),o=e.scale().qz();else a=e.scale().xx(),o=e.scale().rz();a=a.get();var r=o.get();o=e.title();var l=e.labels(),h=e.parent().labels(),c=l.nd("enabled"),u=null==c?h.enabled():c;h=e.qb(),c=e.parent().qb();var d=h.nd("enabled");c=null==d?c.enabled():d;var p=e.Xa();p.qa=s,(d=e.yb()).qa=s,s=p.g("position");var g,f=t.Ho(s);if(s=d.g("position"),s=t.Ho(s),e.ae(),u)for(t.Yu(l),l=0,u=a.length;l<u;l++)p=t.mn(e.rd(l,!0,a)),g?t.pb(g,p):g=p;else if(p.enabled()&&0<=f)for(l=0,u=a.length;l<u;l++)f=X(p,(0,window.parseFloat)(a[l])),g?t.pb(g,f):g=f;if(c)for(t.Yu(h),l=0,u=r.length;l<u;l++)p=t.mn(e.rd(l,!1,r)),g?t.pb(g,p):g=p;else if(d.enabled()&&0<=s)for(l=0,u=r.length;l<u;l++)f=X(d,r[l]),g?t.pb(g,f):g=f;if(o.enabled()){switch(o.O()||o.O(e.O()),o.ka(),t.dw(o,e.vh),o.ja(n),n=o.yi(),e.vh){case"top":g.top-=n.height,g.height+=n.height;break;case"right":g.width+=n.width;break;case"bottom":g.height+=n.height;break;case"left":g.left-=n.width,g.width+=n.width}o.da(!1)}g||(g=new t.I(0,0,0,0)),e.Hq=g,e.I(4)}return e.Hq.clone()},tt=function(e){return e.line?e.line:e.line=t.qk().Dd(!0).eq(!0)},et=function(e){t.V.call(this),this.D=e,this.G=[],this.Xb=this.Y=null,this.I(4294967295),t.T(this.ua,[["stroke",0,1],["overlapMode",0,9],["drawFirstLabel",0,9],["drawLastLabel",0,9],["enabled",0,32768]])},it=function(){function e(t){t.enabled(null)}t.Y.call(this),this.Ga("defaultCallout"),this.f=this.b=null,t.su(this,this);var i={};t.T(i,[["labels",0,0]]),this.ca=new t.my(this,i,t.gm),this.ca.ta("labelsFactoryConstructor",t.oy),this.ca.ta("labelsAfterInitCallback",t.sy),this.za=new t.my(this,i,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",e),this.Ea=new t.my(this,i,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",e),this.se=448,t.T(this.ua,[["orientation",this.se,9],["align",this.se,9],["length",this.se,9],["width",this.se,9]])},nt=function(e,i,n,s){var a=i.ma(),o=i.ef(),r=o.Ec();r.select(a),s=t.p(s)?s:t.nx(o.state,a),i.state=s;var l=o.$(),h=!!(s&t.wo),c=!h&&!!(s&t.vo),u=o.Qa().labels();switch(i=(i=l.get("normal"))?i.label:void 0,i=t.Zo(i,l.get("label")),h?(h=(h=l.get("selected"))?h.label:void 0,h=t.Zo(h,l.get("selectLabel")),l=o.selected().labels()):c?(h=(h=l.get("hovered"))?h.label:void 0,h=t.Zo(h,l.get("hoverLabel")),l=o.lb().labels()):l=h=null,(c=o.Ic(!0)).b=o.ce(a),n.Hf(c),t.Zu(n,u),t.$u(n,l),n.td(i,h),t.Yu(u),s=!(i=!!(s&t.wo))&&!!(s&t.vo),a=e.Qa().labels(),s=i?e.selected().labels():s?e.lb().labels():a,(i=t.TN(a)).enabled=a.enabled(),(a=t.TN(s)).enabled=null===s.enabled()?i.enabled:s.enabled(),n.td(i,n.state("pointState")?t.Sc(n.state("pointState"),a):a),(a=e.Bh(n.ma())).connectorPoint={value:U(o)},n.jc(a),e.Nb()?(n.width(e.b),n.height(e.f)):(n.width(e.f),n.height(e.b)),e.g("orientation")){case"top":n.anchor("center-bottom");break;case"right":n.anchor("left-center");break;case"bottom":n.anchor("center-top");break;case"left":n.anchor("right-center")}return r.j("shapes")&&(e=r.j("fill"),r=r.j("stroke"),n.background().enabled(!0).fill(e).stroke(r)),n},st=function(){t.iA.call(this)},at=function(){t.kz.call(this),this.qa=this.i=null,t.T(this.ua,[["minorStroke",16]])},ot=function(e){t.V.call(this),this.Ga("defaultGridSettings"),this.Y=null,this.i=e,this.o=[],this.Fa=this.Xb=null,this.I(4294967295),t.T(this.ua,[["stroke",0,1],["minorStroke",0,1],["fill",0,1],["drawFirstLine",0,9],["drawLastLine",0,9],["enabled",0,32768],["zIndex",0,65536]])},rt=function(e,i){t.J(i,t.Ms)||t.C(i)&&"range"==i.type?e.Hc(t.Ms):(t.J(i,t.Gs)||t.C(i)||null==e.Fa)&&e.Hc(t.Gs)},lt=function(t,e,i){this.b=i||0,this.f=t,this.cT=e},ht=function(e){t.V.call(this),this.qa=e},ct=function(){t.V.call(this),this.Ga("map.geoScale"),this.cl=window.NaN,this.Ka=Number.MAX_VALUE,this.Ba=-Number.MAX_VALUE,this.Za=Number.MAX_VALUE,this.Ha=-Number.MAX_VALUE,this.fh=Number.MAX_VALUE,this.bg=-Number.MAX_VALUE,this.nf=Number.MAX_VALUE,this.me=-Number.MAX_VALUE,this.$a=this.fb=this.sb=this.Sb=!0,this.P=0,this.ea=this.aa=this.na=this.ba=this.bn=this.Aq=this.xq=this.cn=window.NaN,this.qc=this.ec=1,this.Kc=!1,this.cs=0,this.Ys=this.yo=!1,this.Bb=null},ut=function(t,e,i,n,s){t.na=e,t.ba=i,t.ea=n,t.aa=s},dt=function(t,e,i){t.Dk=e,t.dn=i},pt=function(t){return t.b||t.pb(),t.b},gt=function(t,e){t.yo=!1,t.Ys=e},ft=function(e){return t.p(e.bj)?e.bj:e.yo},mt=function(e){return t.p(e.yg)?e.yg:e.Ys},vt=function(t,e,i){var n=Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=-Number.MAX_VALUE,r=t.precision(),l=r[0],h=r[1];if(i){if(i=t.f,l=t.o,t.fe&&C(t.fe.default.Pg))(i=Dt(t,e,i))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]);else for(r=i;r<l;)(i=Dt(t,e,r))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=h;i=Dt(t,e,l)}else{h=t.i;var c=t.D;if(t.fe&&C(t.fe.default.Pg))(i=Dt(t,h,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]);else if(h>c){for(r=h;180>r;)(i=Dt(t,r,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=l;for(r=-180;r<h;)(i=Dt(t,r,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=l}else for(r=h;r<c;)(i=Dt(t,r,e))[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),r+=l;i=Dt(t,c,e)}return i[0]<n&&(n=i[0]),i[0]>a&&(a=i[0]),i[1]<s&&(s=i[1]),i[1]>o&&(o=i[1]),{cn:n,Aq:s,xq:a,bn:o}},bt=function(e,i,n){return e.pb(),e.Bb?(i=t.N(i),n=t.N(n),i=(i-e.cn)*e.ratio,n=(-n+e.bn)*e.ratio,[ft(e)?e.Bb.cb()-e.G-i:e.Bb.left+e.G+i,mt(e)?e.Bb.Va()-e.K-n:e.Bb.top+e.K+n]):[window.NaN,window.NaN]},yt=function(e,i,n){return e.pb(),e.Bb?(i=t.N(i),n=t.N(n),[+(ft(e)?e.Bb.cb()-e.G-i:i-e.Bb.left-e.G)/e.ratio+e.cn,-(mt(e)?e.Bb.Va()-e.K-n:n-e.Bb.top-e.K)/e.ratio+e.bn]):[window.NaN,window.NaN]},St=function(t,e,i,n){return t=t.fe.default,(e=(n.Yo||t.Yo).forward(e,i))[0]*=n.scale||t.scale,e[1]*=n.scale||t.scale,e[0]+=n.ri||0,e[1]+=n.jj||0,[e[0],e[1]]},xt=function(t,e,i){var n,s=!1,a=0;for(n=i.length-1;a<i.length;n=a++)i[a][1]>e!=i[n][1]>e&&t<(i[n][0]-i[a][0])*(e-i[a][1])/(i[n][1]-i[a][1])+i[a][0]&&(s=!s);return s},wt=function(e,i,n){if(!e.fe)return null;var s=window.NaN,a=window.NaN,o=t.Hc(e.fe,(function(e,o){if("default"!=o&&e.eu){var r=St(this,i,n,e),l=r[0];r=r[1];var h=e.eu;return(h=t.A(h)?xt(l,r,h):l>=h.left&&l<=h.left+h.width&&r<=h.top&&r>=h.top-h.height)&&(s=l,a=r),h}return!1}),e)||"default";return[e.fe[o],s,a]},Ct=function(e,i,n,s){if(!e.fe)return[];if(e.pb(),t.p(s))s=null!==s&&s in e.fe?e.fe[s]:e.fe.default;else{var a=wt(e,i,n);s=a[0];var o=a[1];a=a[2]}return(0,window.isNaN)(o)&&(o=(i=St(e,i,n,s))[0],a=i[1]),!e.Bb||(0,window.isNaN)(o)||(0,window.isNaN)(a)?[window.NaN,window.NaN]:(o=(+o-e.cn)*e.ratio,i=(-a+e.bn)*e.ratio,[ft(e)?e.Bb.cb()-e.G-o:e.Bb.left+e.G+o,mt(e)?e.Bb.Va()-e.K-i:e.Bb.top+e.K+i])},Tt=function(e,i,n,s){if(!e.fe)return[];var a,o=e.fe.default;return a=t.p(s)?s in e.fe?s:"default":t.Hc(e.fe,(function(e,s){if("default"!=s&&e.eu){var a=e.eu;return t.A(a)?xt(i,n,a):i>=a.left&&i<=a.left+a.width&&n<=a.top&&n>=a.top-a.height}return!1}),e)||"default",s=(e=e.fe[a]).Yo||o.Yo,i-=e.ri||o.ri||0,n-=e.jj||o.jj||0,a=e.scale||o.scale,e.Pg||o.Pg?s.xj(i/a,n/a):[i/a,n/a]},Dt=function(e,i,n){if((0,window.isNaN)(i)||(0,window.isNaN)(n))return[window.NaN,window.NaN];var s=window.NaN,a=window.NaN;if(t.p(null))var o=e.fe.default;else o=(a=wt(e,i,n))[0],s=a[1],a=a[2];return(0,window.isNaN)(s)?(e=e.fe.default,(i=(o.Yo||e.Yo).forward(i,n))[0]*=o.scale||e.scale,i[1]*=o.scale||e.scale,-620.8680523857!=o.ri&&(i[0]+=o.ri||0,i[1]+=o.jj||0),o=[i[0],i[1]]):o=[s,a],o},kt=function(e,i){this.f=i||t.Ma,this.b=e;for(var n=Math.floor(e.length/2);n--;)$t(this,n)},$t=function(t,e){var i=2*e+1,n=2*e+2,s=e;i<=t.b.length&&0<t.f(t.b[i],t.b[s])&&(s=i),n<=t.b.length&&0<t.f(t.b[n],t.b[s])&&(s=n),s!=e&&(Ot(t,e,s),$t(t,s))},Ot=function(t,e,i){var n=t.b[e];t.b[e]=t.b[i],t.b[i]=n},Pt=function(){},Lt=function(e,i,n){var s;if(n&&!n["middle-x"]&&!n["middle-y"]){var a=t.Ic(n,(function(t,e){return/middle-x/.test(e)})),o=t.Ic(n,(function(t,e){return/middle-y/.test(e)}))||.5;n["middle-x"]=a||.5,n["middle-y"]=o}switch(i.type){case"Point":return{coordinates:[i.coordinates[0],i.coordinates[1]],properties:n};case"MultiPoint":var r=[];for(e=i.coordinates,i=0,a=e.length;i<a;i++)r.push(e[0],e[1]);return{coordinates:r,properties:n};case"LineString":for(r=[],e=i.coordinates,i=0,a=e.length;i<a;i++)o=e[i],r.push(o[0],o[1]);return{paths:[r],properties:n};case"MultiLineString":var l=[],h=i.coordinates;for(i=0,a=h.length;i<a;i++){r=[];var c=0;for(s=(e=h[i]).length;c<s;c++)o=e[c],r.push(o[0],o[1]);l.push(r)}return{paths:l,properties:n};case"Polygon":h=[];var u=[],d=i.coordinates;for(i=0,a=d.length;i<a;i++){for(0!=i&&(r=[]),c=0,s=(e=d[i]).length;c<s;c++)o=e[c],i?r.push(o[0],o[1]):h.push(o[0],o[1]);r&&u.push(r)}return{polygones:[{outerPath:h,holes:u}],properties:n};case"MultiPolygon":l=[];var p=i.coordinates;for(i=0,a=p.length;i<a;i++){for(h=[],u=[],c=0,s=(d=p[i]).length;c<s;c++){0!=c&&(r=[]);for(var g=0,f=(e=d[c]).length;g<f;g++)o=e[g],c?r.push(o[0],o[1]):h.push(o[0],o[1]);r&&u.push(r)}d={outerPath:h,holes:u},l.push(d)}return{polygones:l,properties:n};case"GeometryCollection":if(i.geometries){for(r=[],c=i.geometries,i=0,a=c.length;i<a&&(o=Lt(e,c[i],c[i].properties),t.p(o));i++)r.push(o);return{geometries:r,properties:n||null}}t.il(10,"GeometryCollection object missing 'geometries' member.");break;default:t.il(10,"Geometry object must be one of 'Point', 'LineString', 'Polygon' or 'MultiPolygon'.")}return null},It=function(t){this.f=t,this.b=0,this.i=this.f.length,this.o=null,Et(this)},At=function(t){return" ">=(t=t.f[t.b])&&(" "===t||"\n"===t||"\t"===t||"\r"===t||"\f"===t)},Et=function(t){for(;t.b<t.i&&At(t);)t.b+=1;return t.b<t.i},Gt=function(t){t.b<t.i&&!At(t)&&","!==t.f[t.b]||!(Et(t)&&t.b<t.i)||","!==t.f[t.b]||(t.b+=1,Et(t))},Ut=function(t){var e=0,i=0,n=[],s=1,a=1,o=t.b;if(Et(t),t.b<t.i&&"+"===t.f[t.b]?t.b+=1:t.b<t.i&&"-"===t.f[t.b]&&(t.b+=1,s=-1),t.b===t.i||("0">t.f[t.b]||"9"<t.f[t.b])&&"."!==t.f[t.b])return null;for(var r=t.b;t.b<t.i&&"0"<=t.f[t.b]&&"9">=t.f[t.b];)t.b+=1;if(t.b!==r)for(var l=t.b-1,h=1;l>=r;)i+=h*(t.f[l]-0),--l,h*=10;if(t.b<t.i&&"."===t.f[t.b]){if(t.b+=1,t.b>=t.i||"0">t.f[t.b]||"9"<t.f[t.b])return null;for(;t.b<t.i&&"0"<=t.f[t.b]&&"9">=t.f[t.b];)n.push(t.f[t.b]-0),t.b+=1}if(t.b!==o&&t.b+1<t.i&&("e"===t.f[t.b]||"E"===t.f[t.b])&&"x"!==t.f[t.b+1]&&"m"!==t.f[t.b+1]){if(t.b+=1,"+"===t.f[t.b]?t.b+=1:"-"===t.f[t.b]&&(t.b+=1,a=-1),t.b>=t.i||"0">t.f[t.b]||"9"<t.f[t.b])return null;for(;t.b<t.i&&"0"<=t.f[t.b]&&"9">=t.f[t.b];)e*=10,e+=t.f[t.b]-0,t.b+=1}return i+=(0,window.parseFloat)("0."+n.join("")),i*=s,e&&(i*=Math.pow(10,a*e)),o===t.b?null:(Gt(t),i)},Ft=function(t){if(t.b>=t.i)return null;var e=t.f[t.b];if(t.b+=1,"0"===e)e=0;else{if("1"!==e)return null;e=1}return Gt(t),e},Mt=function(){},_t=function(e,i,n,s){var a,o=t.Ze(i),r=[],l=0;for(a=o.length;l<a;l++){var h=o[l];if(t.af(h)){var c=h.tagName.toLowerCase(),u=!n||"g"==c||"svg"==c&&n?{}:null;if(i=Nt(e,h,u,s),u){if("g"==c||"svg"==c){var d=Ht(h,s),p=zt(e,h,"group");h=Vt(h),"g"==c?(c=p.id,t.p(c)?h.id=c:t.p(h.id)&&(c=h.id),u.tx=d,u.properties=h,u.attrs=p,u.id=c):(u.properties={},u.attrs={}),u.type="group",u.features=i}else u=i;u&&r.push(u)}else n?i&&(t.A(i)?r.push.apply(r,i):r.push(i)):("g"==c||"svg"==c)&&i&&r.push.apply(r,i)}}return r},Nt=function(e,i,n,s){var a=i.getAttribute("id");if(a&&e.b[a])var o=t.Sl(e.b[a]);else{var r=Rt(e,i);switch(i.tagName.toLowerCase()){case"rect":var l=+i.getAttribute("x"),h=+i.getAttribute("y"),c=+i.getAttribute("width"),u=+i.getAttribute("height");o=qt(e,i,[{type:"M",values:[l,h]},{type:"L",values:[l+c,h]},{type:"L",values:[l+c,h+u]},{type:"L",values:[l,h+u]},{type:"Z"}],s);break;case"circle":var d=+i.getAttribute("cx"),p=+i.getAttribute("cy"),g=+i.getAttribute("r"),f=d-g,m=Kt(e,[{type:"M",values:[f,p]},{type:"A",values:[g,g,0,1,0,f+2*g,p]},{type:"A",values:[g,g,0,1,0,f,p]},{type:"Z"}]);o=qt(e,i,m,s);break;case"ellipse":var v=+i.getAttribute("cx"),b=+i.getAttribute("cy"),y=+i.getAttribute("rx"),S=+i.getAttribute("ry"),x=v-y,w=Kt(e,[{type:"M",values:[x,b]},{type:"A",values:[y,S,0,1,0,x+2*y,b]},{type:"A",values:[y,S,0,1,0,x,b]},{type:"Z"}]);o=qt(e,i,w,s);break;case"polygon":for(var C=i.getAttribute("points").trim().split(/\s+|,/),T=[],D=0,k=C.length-1;D<k;D+=2)D?T.push({type:"L",values:[+C[D],+C[D+1]]}):T.push({type:"M",values:[+C[D],+C[D+1]]});T.push({type:"Z"}),o=qt(e,i,T,s);break;case"polyline":for(var $=i.getAttribute("points").trim().split(/\s+|,/),O=[],P=0,L=$.length-1;P<L;P+=2)P?O.push({type:"L",values:[+$[P],+$[P+1]]}):O.push({type:"M",values:[+$[P],+$[P+1]]});o=qt(e,i,O,s);break;case"path":var I=i.getAttribute("d")||"";if(I&&0!==I.length){var A=new It(I),E=[];if(A.b<A.i)var G=A.f[A.b],U=ei[G]?ei[G]:null,F="M"===U||"m"===U;else F=!0;if(F)for(;A.b<A.i;){t:{var M=A,_=M.f[M.b],N=ei[_]?ei[_]:null;if(null===N){if(null===M.o){var R=null;break t}if(null===(N=("+"===_||"-"===_||"."===_||"0"<=_&&"9">=_)&&"Z"!==M.o?"M"===M.o?"L":"m"===M.o?"l":M.o:null)){R=null;break t}}else M.b+=1;M.o=N;var j=null,B=N.toUpperCase();"H"===B||"V"===B?j=[Ut(M)]:"M"===B||"L"===B||"T"===B?j=[Ut(M),Ut(M)]:"S"===B||"Q"===B?j=[Ut(M),Ut(M),Ut(M),Ut(M)]:"C"===B?j=[Ut(M),Ut(M),Ut(M),Ut(M),Ut(M),Ut(M)]:"A"===B?j=[Ut(M),Ut(M),Ut(M),Ft(M),Ft(M),Ut(M),Ut(M)]:"Z"===B&&(Et(M),j=[]),R=null===j||0<=j.indexOf(null)?null:{type:N,values:j}}if(null===R)break;E.push(R)}var H=E}else H=[];var z=Kt(e,Yt(H));o=qt(e,i,z,s);break;case"line":var V=+i.getAttribute("x1"),q=+i.getAttribute("x2"),W=+i.getAttribute("y1"),Y=+i.getAttribute("y2");o=qt(e,i,[{type:"M",values:[V,W]},{type:"L",values:[q,Y]}],s);break;case"text":var K=Ht(i,s),X=Vt(i),J=zt(e,i,"element");X.id=J.id;var Z=i.cloneNode(!0);K.Tv&&Z.setAttribute("transform",K.Tv.toString()),Z.removeAttribute("data-ac-wrapper-id");var Q=J.id;t.p(Q)?X.id=Q:t.p(X.id)&&(Q=X.id),o={type:"text",text:i,cloneNode:Z,tx:K,id:Q,properties:X,attrs:J};break;case"image":var tt=Ht(i,s),et=Vt(i),it=zt(e,i,"element"),nt=+i.getAttribute("x"),st=+i.getAttribute("y"),at=+i.getAttribute("width"),ot=+i.getAttribute("height");et.id=it.id;var rt=i.cloneNode(!0);tt.Tv&&rt.setAttribute("transform",tt.Tv.toString()),rt.removeAttribute("data-ac-wrapper-id");var lt=it.id;t.p(lt)?et.id=lt:t.p(et.id)&&(lt=et.id),o={type:"image",sourceNode:i,cloneNode:rt,bounds:t.kn(nt,st,at,ot),tx:tt,id:lt,properties:et,attrs:it};break;case"use":o=Rt(e,i);break;case"clippath":for(var ht=Ht(i,s),ct=_t(e,i,!0,ht.Tv),ut=[],dt=0,pt=ct.length;dt<pt;dt++)ut.push.apply(ut,ct[dt].commands);o={clippath:qt(e,i,ut,s)};break;case"lineargradient":var gt={};if(r)var ft=r.gradientUnits,mt=r.transform,vt=+r.x1,bt=+r.y1,yt=+r.x2,St=+r.y2,xt=(0,window.parseFloat)(r.opacity);var wt=i.getAttribute("gradientUnits")||ft,Ct=Ht(i).self||mt,Tt=+i.getAttribute("x1"),Dt=+i.getAttribute("y1"),kt=+i.getAttribute("x2"),$t=+i.getAttribute("y2"),Ot=(0,window.parseFloat)(i.getAttribute("opacity")),Pt=t.p(Tt)?Tt:t.p(vt)?vt:0,Lt=t.p(Dt)?Dt:t.p(bt)?bt:0,At=t.p(kt)?kt:t.p(yt)?yt:0,Gt=t.p($t)?$t:t.p(St)?St:0,Mt=(0,window.isNaN)(Ot)?t.p(xt)?xt:1:Ot;Pt=t.Tm(Pt,7),Lt=t.Tm(Lt,7);var Nt=(At=t.Tm(At,7))-Pt,Bt=(Gt=t.Tm(Gt,7))-Lt;gt.mode=!(!wt||"userspaceonuse"!=wt.toLowerCase())&&t.kn(Math.min(Pt,At),Math.min(Lt,Gt),Math.abs(Nt),Math.abs(Bt));var Wt=Math.round(t.cb(Math.atan(Bt/Nt)));0<Nt&&0>Bt?Wt=Math.abs(Wt):0>=Nt&&0>=Bt?Wt=180-Math.abs(Wt):0>=Nt&&0<Bt?Wt=180+Math.abs(Wt):0<Nt&&0<Bt&&(Wt=360-Math.abs(Wt)),gt.opacity=Mt;var Xt=t.Ze(i);gt.keys=Xt.length?jt(i):r?r.keys:[],gt.angle=Wt,gt.transform=Ct,o=gt;break;case"radialgradient":var Jt={};if(r)var Zt=r.gradientUnits,Qt=r.gradientTransform,te=+r.r,ee=+r.cx,ie=+r.cy,ne=+r.fx,se=+r.fy,ae=(0,window.parseFloat)(r.opacity);var oe=i.getAttribute("gradientUnits")||Zt,re=Ht(i).self||Qt,le=+i.getAttribute("r"),he=+i.getAttribute("cx"),ce=+i.getAttribute("cy"),ue=+i.getAttribute("fx"),de=+i.getAttribute("fy"),pe=(0,window.parseFloat)(i.getAttribute("opacity")),ge=t.p(le)?le:t.p(te)?te:0,fe=t.p(he)?he:t.p(ee)?ee:0,me=t.p(ce)?ce:t.p(ie)?ie:0,ve=t.p(ue)?ue:t.p(ne)?ne:0,be=t.p(de)?de:t.p(se)?se:0,ye=(0,window.isNaN)(pe)?t.p(ae)?ae:1:pe;if(oe&&"userspaceonuse"==oe.toLowerCase()){var Se=2*ge,xe=t.kn(fe-ge,me-ge,Se,Se);Jt.cx=.5,Jt.cy=.5,Jt.fx=(ve-xe.left)/Se,Jt.fy=(be-xe.top)/Se,Jt.mode=xe}else Jt.cx=fe,Jt.cy=me,Jt.fx=ve,Jt.fy=be;Jt.opacity=ye,Jt.transform=re;var we=t.Ze(i);Jt.keys=we.length?jt(i):r?r.keys:[],o=Jt;break;case"pattern":var Ce={},Te=+i.getAttribute("x"),De=+i.getAttribute("y"),ke=+i.getAttribute("width"),$e=+i.getAttribute("height");Ce.type="pattern",Ce.bounds=t.kn(Te,De,ke,$e),Ce.properties=Vt(i),Ce.attrs=zt(e,i,"group"),Ce.features=_t(e,i,Ce),Ce.properties.id=Ce.id=Ce.attrs.id,o=Ce;break;case"defs":case"desc":break;default:var Oe=Ht(i,s);o=_t(e,i,n,Oe.Tv)}o&&a&&(e.b[a]=o)}return o},Rt=function(e,i){var n=i.getAttributeNS("http://www.w3.org/1999/xlink","href"),s=null;return n&&(n=n.substring(1,n.length),(s=t.Sl(e.b[n]))||(n=e.i.getElementById(n))&&(s=Nt(e,n))),s},jt=function(e){if(!e)return null;if((e=t.Ze(e))&&e.length)for(var i=[],n=0,s=e.length;n<s;n++){var a=e[n],o=t.yf(a,"stop-color"),r=(0,window.parseFloat)(t.yf(a,"stop-opacity"));o=o||a.getAttribute("stop-color"),r=(0,window.isNaN)(r)?(0,window.parseFloat)(a.getAttribute("stop-opacity")):r,a=(0,window.parseFloat)(a.getAttribute("offset")),i.push({offset:a,color:o,opacity:(0,window.isNaN)(r)?1:r})}return i},Bt=function(e,i){for(var n=i?i.clear():t.qk(),s=0,a=e.length;s<a;s++){var o=e[s],r=o.values;switch(o.type){case"M":n.moveTo(+r[0],+r[1]);break;case"L":n.lineTo(+r[0],+r[1]);break;case"C":n.Sk(+r[0],+r[1],+r[2],+r[3],+r[4],+r[5]);break;case"Z":n.close()}}return n},Ht=function(e,i){var n=e.tagName.toLowerCase();if(!(n="lineargradient"==n||"radialgradient"==n?e.getAttribute("gradientTransform"):e.getAttribute("transform")))return{self:null,Tv:t.p(i)?i:null};var s=(n=t.Mb(n)).clone();return i&&t.Hb(s,i),{self:n,Tv:s}},zt=function(e,i,n){var s={},a=i.attributes;s.fill={},s.stroke={};for(var o=0,r=a.length;o<r;o++){var l=a[o];switch(l.name=l.name.toLowerCase(),l.name){case"clip-path":var h=l.value.replace(/^url\s*\("*#(.+)"*\)/g,"$1");(h=e.b[h])&&(s[l.name]=h.clippath);break;case"opacity":t.p(s.fill.opacity)||(s.fill.opacity=l.value),t.p(s.stroke.opacity)||(s.stroke.opacity=l.value);break;case"fill":s.fill.color=l.value;break;case"fill-opacity":s.fill.opacity=l.value;break;case"stroke":s.stroke.color=l.value;break;case"stroke-opacity":s.stroke.opacity=l.value;break;case"stroke-linejoin":s.stroke.lineJoin=l.value;break;case"stroke-linecap":s.stroke.lineCap=l.value;break;case"stroke-width":s.stroke.thickness=l.value;break;case"stroke-dasharray":s.stroke.dash=l.value;break;default:"style"!=l.name&&"d"!=l.name&&"transform"!=l.name&&"data-ac-wrapper-id"!=l.name&&(s[l.name]=l.value)}}return"element"==n&&(t.p(s.fill.color)||(i.style?(s.fill.color=t.yf(i,"fill"),t.uf(i,"fill","")):s.fill.color="black"),n=s.fill.color.trim(),t.ec(n,"url")&&(a=n.replace(/"/g,"").replace(/^url\s*\(#(.+)\)/g,"$1"),s.fill=e.b[a]),s.stroke.color||(i.style?(s.stroke.color=t.yf(i,"stroke"),t.uf(i,"stroke","")):s.stroke.color="none"),t.ec(s.stroke.color.trim(),"url")&&(n=n.replace(/"/g,"").replace(/^url\s*\(#(.+)\)/g,"$1"),s.stroke=e.b[n])),(e=i.getAttribute("style"))&&(s.style=e),s},Vt=function(e){for(var i={},n=0,s=(e=t.Ze(e)).length;n<s;n++){var a=e[n];if("desc"==a.tagName){for(n=0,s=(e=t.Ze(a)).length;n<s;n++)i[(a=e[n]).tagName]=a.textContent;break}}return i},qt=function(e,i,n,s){if((s=Ht(i,s)).Tv)for(var a=t.fd(n),o=0,r=a.length;o<r;o++){var l=a[o].values;l&&s.Tv.transform(l,0,l,0,l.length/2)}return o=Vt(i),i=(e=zt(e,i,"element")).id,t.p(i)?o.id=i:t.p(o.id)&&(i=o.id),{type:"path",properties:o,id:i,commands:n,commands_tx:a,attrs:e,tx:s}},Wt=function(t,e,i,n,s,a,o,r,l,h,c){function u(t,e,i){return{x:t*Math.cos(i)-e*Math.sin(i),y:t*Math.sin(i)+e*Math.cos(i)}}var d=Math.PI*r/180,p=[];if(c){var g=c[0];l=c[1];var f=c[2],m=c[3]}else{e=(i=u(e,i,-d)).x,i=i.y,1<(m=(g=(e-(n=(s=u(n,s,-d)).x))/2)*g/(a*a)+(f=(i-(s=s.y))/2)*f/(o*o))&&(a*=m=Math.sqrt(m),o*=m),m=a*a;var v=o*o;f=(l=(l===h?-1:1)*Math.sqrt(Math.abs((m*v-m*f*f-v*g*g)/(m*f*f+v*g*g))))*a*f/o+(e+n)/2,m=l*-o*g/a+(i+s)/2,g=Math.asin(((i-m)/o).toFixed(9)),l=Math.asin(((s-m)/o).toFixed(9)),e<f&&(g=Math.PI-g),n<f&&(l=Math.PI-l),0>g&&(g=2*Math.PI+g),0>l&&(l=2*Math.PI+l),h&&g>l&&(g-=2*Math.PI),!h&&l>g&&(l-=2*Math.PI)}if(Math.abs(l-g)>120*Math.PI/180){v=l;var b=n,y=s;l=h&&l>g?g+120*Math.PI/180:g+120*Math.PI/180*-1,n=f+a*Math.cos(l),s=m+o*Math.sin(l),p=Wt(t,n,s,b,y,a,o,r,0,h,[l,v,f,m])}if(a=4/3*a*(t=Math.tan((l-g)/4)),t*=4/3*o,o=[e,i],e=[e+a*Math.sin(g),i-t*Math.cos(g)],i=[n+a*Math.sin(l),s-t*Math.cos(l)],n=[n,s],e[0]=2*o[0]-e[0],e[1]=2*o[1]-e[1],c)return[e,i,n].concat(p);p=[e,i,n].concat(p).join().split(",");var S=[],x=[];return p.forEach((function(t,e){e%2?x.push(u(p[e-1],p[e],d).y):x.push(u(p[e],p[e+1],d).x),6===x.length&&(S.push(x),x=[])})),S},Yt=function(t){var e=[],i=null,n=null,s=null,a=null;return t.forEach((function(t){switch(t.type){case"M":var o=t.values[0],r=t.values[1];e.push({type:"M",values:[o,r]}),s=o,a=r,i=o,n=r;break;case"m":o=i+t.values[0],r=n+t.values[1],e.push({type:"M",values:[o,r]}),s=o,a=r,i=o,n=r;break;case"L":o=t.values[0],r=t.values[1],e.push({type:"L",values:[o,r]}),i=o,n=r;break;case"l":o=i+t.values[0],r=n+t.values[1],e.push({type:"L",values:[o,r]}),i=o,n=r;break;case"C":var l=t.values[0],h=t.values[1],c=t.values[2],u=t.values[3];o=t.values[4],r=t.values[5],e.push({type:"C",values:[l,h,c,u,o,r]}),i=o,n=r;break;case"c":l=i+t.values[0],h=n+t.values[1],c=i+t.values[2],u=n+t.values[3],o=i+t.values[4],r=n+t.values[5],e.push({type:"C",values:[l,h,c,u,o,r]}),i=o,n=r;break;case"Q":l=t.values[0],h=t.values[1],o=t.values[2],r=t.values[3],e.push({type:"Q",values:[l,h,o,r]}),i=o,n=r;break;case"q":l=i+t.values[0],h=n+t.values[1],o=i+t.values[2],r=n+t.values[3],e.push({type:"Q",values:[l,h,o,r]}),i=o,n=r;break;case"A":o=t.values[5],r=t.values[6],e.push({type:"A",values:[t.values[0],t.values[1],t.values[2],t.values[3],t.values[4],o,r]}),i=o,n=r;break;case"a":o=i+t.values[5],r=n+t.values[6],e.push({type:"A",values:[t.values[0],t.values[1],t.values[2],t.values[3],t.values[4],o,r]}),i=o,n=r;break;case"H":o=t.values[0],e.push({type:"H",values:[o]}),i=o;break;case"h":o=i+t.values[0],e.push({type:"H",values:[o]}),i=o;break;case"V":r=t.values[0],e.push({type:"V",values:[r]}),n=r;break;case"v":r=n+t.values[0],e.push({type:"V",values:[r]}),n=r;break;case"S":c=t.values[0],u=t.values[1],o=t.values[2],r=t.values[3],e.push({type:"S",values:[c,u,o,r]}),i=o,n=r;break;case"s":c=i+t.values[0],u=n+t.values[1],o=i+t.values[2],r=n+t.values[3],e.push({type:"S",values:[c,u,o,r]}),i=o,n=r;break;case"T":o=t.values[0],r=t.values[1],e.push({type:"T",values:[o,r]}),i=o,n=r;break;case"t":o=i+t.values[0],r=n+t.values[1],e.push({type:"T",values:[o,r]}),i=o,n=r;break;case"Z":case"z":e.push({type:"Z",values:[]}),i=s,n=a}})),e},Kt=function(e,i){var n=[],s=null,a=null,o=null,r=null,l=null,h=null,c=null;return(0,t.Pe)(i,(function(t){switch(t.type){case"M":var e=t.values[0],i=t.values[1];n.push({type:"M",values:[e,i]}),h=e,c=i,r=e,l=i;break;case"C":var u=t.values[0],d=t.values[1],p=t.values[2],g=t.values[3];e=t.values[4],i=t.values[5],n.push({type:"C",values:[u,d,p,g,e,i]}),a=p,o=g,r=e,l=i;break;case"L":e=t.values[0],i=t.values[1],n.push({type:"L",values:[e,i]}),r=e,l=i;break;case"H":e=t.values[0],n.push({type:"L",values:[e,l]}),r=e;break;case"V":i=t.values[0],n.push({type:"L",values:[r,i]}),l=i;break;case"S":if(p=t.values[0],g=t.values[1],e=t.values[2],i=t.values[3],"C"===s||"S"===s)var f=r+(r-a),m=l+(l-o);else f=r,m=l;n.push({type:"C",values:[f,m,p,g,e,i]}),a=p,o=g,r=e,l=i;break;case"T":e=t.values[0],i=t.values[1],"Q"===s||"T"===s?(u=r+(r-a),d=l+(l-o)):(u=r,d=l),f=r+2*(u-r)/3,m=l+2*(d-l)/3,n.push({type:"C",values:[f,m,e+2*(u-e)/3,i+2*(d-i)/3,e,i]}),a=u,o=d,r=e,l=i;break;case"Q":u=t.values[0],d=t.values[1],e=t.values[2],i=t.values[3],f=r+2*(u-r)/3,m=l+2*(d-l)/3,n.push({type:"C",values:[f,m,e+2*(u-e)/3,i+2*(d-i)/3,e,i]}),a=u,o=d,r=e,l=i;break;case"A":u=t.values[0],d=t.values[1],p=t.values[2],g=t.values[3],f=t.values[4],e=t.values[5],i=t.values[6],0===u||0===d?(n.push({type:"C",values:[r,l,e,i,e,i]}),r=e,l=i):r===e&&l===i||Wt(this,r,l,e,i,u,d,p,g,f).forEach((function(t){n.push({type:"C",values:t}),r=e,l=i}));break;case"Z":n.push(t),r=h,l=c}s=t.type}),e),n},Xt=function(){},Jt=function(t,e){var i={type:"Feature",id:e.id,properties:e.properties||{},geometry:Zt(t,e)};return null==e.id&&delete i.id,i},Zt=function(e,i){function n(e){return e=t.Ja(e,0),r(e,0),e}function s(e){for(var i=[],n=0,s=e.length;n<s;++n){var a,o=e[n],h=i;h.length&&h.pop();for(var c=l[0>o?~o:o],u=0,d=c.length;u<d;++u)h.push(a=t.Ja(c[u],0)),r(a,u);0>o&&Xt.Id().reverse(h,d)}return 2>i.length&&i.push(t.Ja(i[0],0)),i}function a(e){for(e=s(e);4>e.length;)e.push(t.Ja(e[0],0));return e}function o(e){return(0,t.Wa)(e,a)}var r=function(e){if(!e)return t.ia;var i,n,s=e.scale[0],a=e.scale[1],o=e.translate[0],r=e.translate[1];return function(t,e){e||(i=n=0),i+=t[0],n+=t[1],t[0]=i*s+o,t[1]=n*a+r}}(e.transform),l=e.arcs,h={Point:function(t){return n(t.coordinates)},MultiPoint:function(e){return(0,t.Wa)(e.coordinates,n)},LineString:function(t){return s(t.arcs)},MultiLineString:function(e){return(0,t.Wa)(e.arcs,s)},Polygon:function(t){return o(t.arcs)},MultiPolygon:function(e){return(0,t.Wa)(e.arcs,o)}};return function e(i){var n=i.type;return"GeometryCollection"===n?{type:n,geometries:(0,t.Wa)(i.geometries,e)}:n in h?{type:n,coordinates:h[n](i)}:null}(i)},Qt=function(t){this.Y=t,this.b=!0,this.i=this.f=null},te=function(){t.Mz.call(this),this.Ga("map"),this.bA=this.Ht=null,this.rV=[],this.wl=null,this.zw=[],this.xM=this.An=null,this.Cr=0,this.Jy=!0,this.ta("zoomFactor",1.3),this.Fl=window.NaN,this.Q3=new _(this),t.Ld(this,"animationstart",(function(){this.j7=!0}),!1,this),t.Ld(this,"animationend",(function(){this.j7=!1;for(var t,e=this.hb.length;e--;)21==(t=this.hb[e]).bf.type&&(t.ZA=this.zf.Ig().clone(),t.B(1024),t.W());this.wC=!0,this.GW||le(this)}),!1,this),this.Nr=!1,this.c3=(0,t.pa)(this.$da,this),this.Wka=(0,t.pa)((function(){this.LJ&&this.Eq(this.RW),this.wc.gc(this,["pointerdown","touchstart"],this.z6,!1,this),this.z6=null,this.wc.gc(this,["pointermove","touchmove"],this.y6,!1,this),this.y6=null,this.u6=!1}),this),this.tea=(0,t.pa)((function(){this.FN||this.Eq(this.RW),this.wc.gc(this,["pointermove","mousemove"],this.w6,!1,this),this.w6=null,this.f4=!1}),this),this.O$=(0,t.pa)(this.Eq,this),this.vX=this.sG=null,this.It=[],this.jE=null,this.eo=[],this.ux(this.oa.unboundRegions||"as-is"),this.ta("defaultSeriesType","choropleth"),this.wc.wa(this,["pointerdown","touchstart"],this.Vka),t.T(this.ua,[["geoIdField",4194320,1],["overlapMode",8388608,1],["minZoomLevel",0,0],["maxZoomLevel",0,0],["selectPolygonMarqueeFill",0,0,0,function(){this.kN()&&this.Dm&&this.Dm.fill(this.g("selectPolygonMarqueeFill"))}],["selectPolygonMarqueeStroke",0,0,0,function(){this.kN()&&this.Dm&&this.Dm.stroke(this.g("selectPolygonMarqueeStroke"))}],["selectPolygonMarqueeMarker",0,0,0,function(){if(this.kN()&&this.rp){var e=this.g("selectPolygonMarqueeMarker")||{},i=t.Ub(e.fill),n=t.Wb(e.stroke);e=e.radius||15,this.rp.stroke(n),this.rp.fill(i),this.pN=e}}]])},ee=function(e){e.ue.oc(1,0,0,1,0,0);var i,n=e.zf.Ig();for(e.$f&&e.$f.update(),i=e.hb.length;i--;){var s=e.hb[i];s.enabled()&&s.kz()}for(i=e.eo.length;i--;)(s=e.eo[i]).enabled()&&s.kz();if(t.wr(e,"axesSettings"))for(s=e.Rp.zm(),i=0;i<s.length;i++){var a=s[i];a.enabled()&&a.kz(n)}if(t.wr(e,"gridsSettings"))for(i=(e=e.yy.zm()).length;i--;)(s=e[i]).enabled()&&s.kz(n)},ie=function(t){t.Y2=!1,ne(t),t.Dm.parent(null),t.ku.parent(null),t.rp.parent(null),t.Na.gc("mousemove",t.L4,!0,t),t.Na.gc("dblclick",t.K4,!0,t),t.Na.gc("click",t.J4,!0,t),t.yk.length=0,t.xV=t.wV=t.WH=null,t.nB=!1},ne=function(t){t.Dm&&(t.Dm.clear(),t.ku.clear(),t.rp.Eb(0))},se=function(t,e,i,n){return{type:t,offsetX:n.offsetX,offsetY:n.offsetY,clientX:n.clientX,clientY:n.clientY,screenX:n.screenX,screenY:n.screenY,button:n.button,actionButton:n.actionButton,keyCode:n.keyCode,charCode:n.charCode,ctrlKey:n.ctrlKey,altKey:n.altKey,shiftKey:n.shiftKey,metaKey:n.metaKey,platformModifierKey:n.platformModifierKey,originalEvent:n,polygon:e,polygonBounds:i}},ae=function(e,i){var n;return(n=re(e)?t.ok():new t.dC(e.Zz,e.v0)).parent(i),n.oc(1,0,0,1,0,0),n},oe=function(e,i){for(var n=i.Gi(),s=0,a=n.length;s<a;s++){var o=n[s];t.J(o,t.Ag)?e.v0(o):t.J(o,t.Fg)&&oe(e,o)}},re=function(e){return e.jE?"svg"==e.jE.Ma():!!e.An&&(t.z(e.An)&&t.ec(e.An,"<")||t.Oe(e.An))},le=function(e){var i,n,s,a,o,r,l,h={},c={},u="allow-overlap"!=e.g("overlapMode");for(e.GW=!0,i=e.hb.length;i--;){var d=e.hb[i],p=d.Ma();if(t.da(e.wC)?e.wC:e.wC[p]){var g=d.$(),f=g.Hb(),m=null===d.rO()&&u||"no-overlap"==d.rO();p=h[p]?h[p]:h[p]=[];var v=0;for(n=f;v<n;v++){(f={}).X=d,f.Ta=d.ek(v,t.gm),e.GW=e.GW&&!f.Ta,f.index=v,f.so=[],f.state=!0,g.select(f.index);var b,y=g.j("currentPointElement");y&&(b=y.properties),y=null!=(y=g.get("overlapMode"))?y:b&&null!=b.overlapMode?b.overlapMode:null,f.GV=null==y&&m||null!=y&&"no-overlap"==t.Uk(y),y=g.get("labelrank"),f.JO=(0,window.parseFloat)(t.p(y)?y:b&&t.p(b.labelrank)?b.labelrank:0),p.push(f)}c[d.ma()]=[]}}for(t.Dc(h,(function(e){for(i=0,n=e.length;i<n;i++){for(r=e[i],a=r.Ta,v=0,s=e.length;v<s;v++)l=e[v],o=l.Ta,i!=v&&t.bn(a,o)&&r.so.push(l);r.YU=r.so.length}for(var h=new kt(e,(function(t,e){return(t=t?t.YU:window.NaN)>(e=e?e.YU:window.NaN)?1:0}));e.length;){var u=h.pop();if(u.state&&u.GV){for(i=0,n=u.so.length;i<n;i++){var d=u.so[i];d.state&&u.state&&(u.GV&&!d.GV?u.state=!1:u.JO==d.JO?u.X.ma()<=d.X.ma()&&(u.state=!1):u.JO<d.JO&&(u.state=!1))}if(!u.state)for(i=0,n=u.so.length;i<n;i++)(d=u.so[i]).YU--,-1!=(d=(0,t.za)(e,d))&&$t(h,d)}c[u.X.ma()][u.index]=u.state}})),i=e.hb.length;i--;)(d=e.hb[i]).ka(),A(d,c[d.ma()]),d.W(),d.da(!1)},he=function(e,i,n,s,a){var o,r,l,h=0;for(r=i.length;h<r;h++)if(o=i[h]){if(s){var c={};t.Gc(o,"properties")&&(c.properties=t.Qc(o.properties))}else a&&(c=e.wl[h]);if(t.Gc(o,"geometries")){var u=o.geometries;s?l=[]:a&&(l=c.geometries);var d=u.length;for(o=0;o<d;o++){var p=s?l[o]={}:a?l[o]:null;ue(e,u[o],n,p,s)}}else ue(e,o,n,c,s);s&&(e.wl[h]=c)}},ce=function(e,i,n,s){if(i){var a;if(re(e)){if(t.Gc(i,"type"))if("group"==i.type){i.ia||(i.ia=ae(e,n));var o=i.features,r=o.length;for(a=0;a<r;a++)ce(e,o[a],i.ia,s);t.Dc(i.attrs,(function(t,e){"id"==e?i.ia.id(t):"clip-path"==e?(t.ia=Bt(t.commands,t.ia),i.ia.clip(t.ia)):i.ia.Cd(e,t)}),e)}else"image"==i.type?(i.ia||(i.ia=n.wk()),s=i.bounds,i.ia.x(s.left),i.ia.y(s.top),i.ia.width(s.width),i.ia.height(s.height),i.ia.src(i.attrs["xlink:href"])):"path"==i.type?(i.ia||(i.ia=e.Zz(n)),Bt(i.commands,i.ia),t.Dc(i.attrs,(function(e,s){if("id"==s)i.ia.id(e);else if("clip-path"==s)e.ia=Bt(e.commands,e.ia),i.ia.clip(e.ia);else if("fill"==s){if(t.C(e))if(e.type&&"pattern"==e.type){var l=e.bounds;if(!e.ia)for(e.ia=t.Sb(l),e.ia.parent(n),e.ia.oc(1,0,0,1,0,0),o=e.features,r=o.length,a=0;a<r;a++)ce(this,o[a],e.ia,null);l=e.ia}else l=e;else l=e;i.ia.fill(l)}else if("stroke"==s){if(t.C(e))if(e.type&&"pattern"==e.type){if(l=e.bounds,!e.ia)for(e.ia=t.Sb(l),e.ia.parent(n),e.ia.oc(1,0,0,1,0,0),o=e.features,r=o.length,a=0;a<r;a++)ce(this,o[a],e.ia,null);l=e.ia}else l=e;else l=e;i.ia.stroke(l)}else i.ia.Cd(s,e)}),e)):"text"==i.type&&(i.ia||(i.ia=new t.Yh),(s=i.cloneNode.cloneNode(!0)).removeAttribute("transform"),i.ia.content(s));i.ia&&((s=i.tx?i.tx.self:null)&&i.ia.oc(s.od,s.We,s.gf,s.Le,s.Jd,s.Fd),i.ia.parent(n),"group"!=i.type&&e.zw.push(i.ia))}else if(s=t.eC(n),i.ia=s,e.zw.push(s),t.Gc(i,"geometries"))for(s=i.geometries,r=s.length,a=0;a<r;a++)ue(e,s[a],e.f1);else ue(e,i,e.f1);if(e.J(262144)){for(s=e.hb.length;s--;)e.hb[s].ss=e.wl;e.I(262144)}}},ue=function(e,i,n,s,a){var o,r;if(i)if(t.Gc(i,"polygones")){var l=i.polygones,h=l.length;for(a?r=[]:s&&(r=s.polygones),o=0;o<h;o++){var c=l[o],u=c.outerPath,d=c.holes;if(a)var p={outerPath:u=t.Ha(u),holes:[]};else if(s){u=(p=r[o]).outerPath=t.Ha(u);var g=p.holes}var f=u.length;for(c=0;c<f-1;c+=2)n.call(e,u,c,i);for(f=d.length,c=0;c<f;c++){var m=d[c];for(a?(m=t.Ha(m),p.holes.push(m)):s&&(m=g[c]=t.Ha(m)),u=0;u<m.length-1;u+=2)n.call(e,m,u,i)}a&&r.push(p)}a&&(s.polygones=r)}else if(t.Gc(i,"paths")){for(h=(p=i.paths).length,a?l=[]:s&&(l=s.paths),o=0;o<h;o++)for(r=p[o],a?(r=t.Ha(r),l.push(r)):s&&(r=l[o]=t.Ha(r)),f=r.length,c=0;c<f-1;c+=2)n.call(e,r,c,i);a&&(s.paths=l)}else if(t.Gc(i,"coordinates"))for(f=(o=i.coordinates).length,a?(o=t.Ha(o),s.coordinates=o):s&&(o=s.coordinates=t.Ha(o)),c=0;c<f-1;c+=2)n.call(e,o,c,i);else if(t.Gc(i,"type"))if("path"==i.type)(a||s)&&(s.type=i.type,s.commands=i.commands,s.commands_tx=i.commands_tx,s.attrs=i.attrs,s.properties=i.properties,s.tx=i.tx),n.call(e,null,0,i);else if("image"==i.type)(a||s)&&(s.type=i.type,s.bounds=i.bounds,s.attrs=i.attrs,s.properties=i.properties,s.sourceNode=i.sourceNode,s.cloneNode=i.cloneNode,s.tx=i.tx),n.call(e,null,0,i);else if("text"==i.type)(a||s)&&(s.type=i.type,s.text=i.text,s.cloneNode=i.cloneNode,s.attrs=i.attrs,s.properties=i.properties,s.tx=i.tx),n.call(e,null,0,i);else if("group"==i.type){for(r=(f=i.features).length,a?o=[]:s&&(o=s.features),c=0;c<r;c++)p=f[c],a?(h={},t.Gc(p,"properties")&&(h.properties=p.properties)):s&&(h=p),ue(e,p,n,h,a),a&&o.push(h);a&&(s.features=o),(a||s)&&(s.type=i.type,s.attrs=i.attrs,s.tx=i.tx)}},de=function(t,e,i,n){if("group"==e.type)for(var s=0,a=e.features.length;s<a;s++){var o=e.features[s];i.call(n,e),de(t,o,i,n)}else i.call(n,e)},pe=function(t,e){if(!t.wl)return null;for(var i=0,n=t.wl.length;i<n;i++){var s=t.wl[i];if(s.properties[t.g("geoIdField")]==e)return s}return null},ge=function(t){var e=t.vX;return e||(t.lka={},e=t.lka.root=t,t.zX="root",t.sG=e,t.vX=e),e},fe=function(t){return{type:"drillchange",path:t=t.uA(),current:t[t.length-1]}},me=function(e,i,n){if(e.O()){var s=ge(e),a=e.Fh();s.Cv=!0;var o=pe(a,i);if(o){var r=o.ia.kr();o=o.properties}else t.kl(301,null,[i]),r=(r=s.dg())?new t.I(r.left+r.width/2-1,r.top+r.height/2-1,1,1):new t.I(0,0,1,1),(o={})[a.g("geoIdField")]=i;var l=t.zm("map");if(n.g("maxZoomLevel")==l.maxZoomLevel&&n.ta("maxZoomLevel",a.g("maxZoomLevel")),n.g("minZoomLevel")==l.minZoomLevel&&n.ta("minZoomLevel",a.g("minZoomLevel")),n.tj()&&!n.ef(0).kd()&&(l=a.ef(0).kd(),n.ef(0).kd(l)),n.tj()&&"choropleth"==n.ef(0).kk()&&!t.wr(n,"colorRange")&&t.wr(a,"colorRange")){l=a.Qi(),n.Qi(l.F());var h=n.Qi();h.labels().format(l.labels().format()),h.labels().positionFormatter(l.labels().positionFormatter()),h.qb().format(l.qb().format()),h.qb().positionFormatter(l.qb().positionFormatter())}!t.wr(n,"legend")&&t.wr(a,"legend")&&(l=a.eg(),n.eg(l.F())),n.wja=a,n.vX=ge(e),n.enabled(!0).O(e.O()).W(),n.Lc(),n.zX=i,n.kb(s),i=ye(n,r,void 0,!0),n.Nr=!0,n.Fl=0,n.kj(1/i[0],i[1],i[2]),e.Bv(n,(function(e,i,n,s,a){n.Cv&&(i.Ua().Lc(null),i.Lc(),i.Md(),n.sG=e,n.It.push(new D(i,e,a,this.zX)),e.show(),e.Ua().Lc(null),i=ye(e,s,void 0,!0),e.Fl=400,e.Nr=!0,e.kj(this.g("minZoomLevel"),i[1],i[2]),this.Bv(e,(function(e){this.kj(this.g("minZoomLevel")),e.Cv=!1,(0,window.setTimeout)((0,t.pa)((function(){this.dispatchEvent(fe(this))}),e),0)}),n))}),n,a,s,r,o)}},ve=function(e,i,n){var s=ge(e),a=e.Fh();if(a!=i){s.Cv=!0,a.Fl=700,function(e){var i=(e=e.Fh()).zf,n=e.g("minZoomLevel"),s=i.rb();i=i.kp();var a=(s.left+s.width/2)*(1-n);return s=(s.top+s.height/2)*(1-n),t.Wm(e.Sg(),n)&&t.Wm(i[4],a)&&t.Wm(i[5],s)}(a)||a.kj(e.g("minZoomLevel"));var o=n||1;e.Bv(a,(function(e,i){var n=pe(e,i.It[i.It.length-o].oy());if(n){var s=n.ia.kr(),a=ye(this,s);n=a[0],s=a[1],a=a[2]}else t.kl(301,null,[this.zX]),n=10;this.Nr=!0,this.Fl=400,this.kj(1/n,s,a),this.Bv(this,(function(e,i){this.kj(this.g("minZoomLevel")),this.Lc(),this.Md(),this.enabled(!1),i.sG=e,i.Cv=!1,t.Ca(i.It,i.It.length-o,o),e.Ua().Lc(null),this.Ua().Lc(null),e.show(),(0,window.setTimeout)((0,t.pa)((function(){this.dispatchEvent(fe(this))}),i),0)}),e,i)}),i,s)}},be=function(t,e){return{type:e,target:t.Fh(),from:t.aC,current:t.lq,to:t.mQ}},ye=function(e,i,n,s){e=e.Fh();var a=i.left+i.width/2,o=i.top+i.height/2,r=t.p(n)?n:e.dg(),l=r.left+r.width/2;return n=r.top+r.height/2,i=1/Math.max(i.width/r.width,i.height/r.height),s||(i=Math.max(Math.min(i*e.Sg(),e.g("maxZoomLevel")),e.g("minZoomLevel"))/e.Sg()),t.Wm(i,1,1e-7)?(s=l-a,o=n-o):(s=(l-i*a)/(1-i),o=(n-i*o)/(1-i)),[i*=e.Sg(),s,o]},Se=function(e){t.JA.call(this,e)},xe=function(e){t.JA.call(this,e)},we=function(e){t.JA.call(this,e),this.b=t.nB("curvature",t.N,!1,"curvature"),this.i=t.nB("startSize",t.Bq,!1,"startSize"),this.f=t.nB("endSize",t.Bq,!1,"endSize")},Ce=function(e,i,n,s,a,o,r,l,h,c,u,d,p,g){var f,m=Math.abs(s-o),v=Math.abs(a-r);v=t.Tm(t.cb(Math.atan(v/m)),7),o<s&&r<a?f=v:o<s&&r>a?f=-v:o>s&&r>a?f=v-180:o>s&&r<a&&(f=180-v);var b=u/2;v=0>d?-90:90;var y,S=s+Math.cos(t.bb(f+v))*b,x=a+Math.sin(t.bb(f+v))*b;u=s+Math.cos(t.bb(f-v))*b,f=a+Math.sin(t.bb(f-v))*b,m=Math.abs(i-l),v=Math.abs(n-h),v=t.Tm(t.cb(Math.atan(v/m)),7),l<i&&h<n?y=v-180:l<i&&h>n?y=180-v:l>i&&h>n?y=v:l>i&&h<n&&(y=-v),b=c/2,v=0>d?-90:90,m=i+Math.cos(t.bb(y+v))*b;var w=n+Math.sin(t.bb(y+v))*b;c=i+Math.cos(t.bb(y-v))*b,y=n+Math.sin(t.bb(y-v))*b;var C=t.gn(m,w,S,x);v=C/2*d;var T=(m+S)/2+Math.cos(t.bb(g))*v*1.2,D=(w+x)/2+Math.sin(t.bb(g))*v*1.2;v=C/2*d,b=0<d?1:-1,b=Math.abs(v)<C/4?C/4*b:Math.abs(v)>C/2?C/2*b:v,v=(0>d?90:-90)*p,C=T+Math.cos(t.bb(g+v))*b;var k=D+Math.sin(t.bb(g+v))*b;return v=(0>d?-90:90)*p,T+=Math.cos(t.bb(g+v))*b,v=D+Math.sin(t.bb(g+v))*b,e.moveTo(S,x),e.Sk(C,k,T,v,m,w),x=(m=t.gn(c,y,u,f))/2*d,S=(c+u)/2+Math.cos(t.bb(g))*x*1.2,x=(y+f)/2+Math.sin(t.bb(g))*x*1.2,v=m/2*d,b=0<d?1:-1,b=Math.abs(v)<m/4?m/4*b:Math.abs(v)>m/2?m/2*b:v,v=(0>d?90:-90)*p,m=S+Math.cos(t.bb(g+v))*b,w=x+Math.sin(t.bb(g+v))*b,v=(0>d?-90:90)*p,d=S+Math.cos(t.bb(g+v))*b,g=x+Math.sin(t.bb(g+v))*b,e.lineTo(c,y),e.Sk(d,g,m,w,u,f),e.close(),[i,n,l,h,o,r,s,a]},Te=function(e){t.pC.call(this,e)},De=function(){var t=new te;return t.$c(),t},ke=function(t){var e=new te;e.Ga("bubbleMap"),e.$c(),e.ta("defaultSeriesType","bubble");for(var i=0,n=arguments.length;i<n;i++)e.bubble(arguments[i]);return e},$e=function(t){var e=new te;e.Ga("choropleth"),e.$c(),e.ta("defaultSeriesType","choropleth");for(var i=0,n=arguments.length;i<n;i++)e.choropleth(arguments[i]);return e},Oe=function(t){var e=new te;e.Ga("connector"),e.$c(),e.ta("defaultSeriesType","connector");for(var i=0,n=arguments.length;i<n;i++)e.connector(arguments[i]);return e},Pe=function(t){var e=new te;e.Ga("markerMap"),e.$c(),e.ta("defaultSeriesType","marker");for(var i=0,n=arguments.length;i<n;i++)e.marker(arguments[i]);return e},Le=function(t){var e=new te;e.Ga("seatMap"),e.$c(),e.ta("defaultSeriesType","choropleth");for(var i=0,n=arguments.length;i<n;i++)e.choropleth(arguments[i]);return e};t.Bd.prototype.J1=t.ca(0,(function(){return this.kf}));var Ie={qma:"as-is",bpa:"hide"},Ae={nna:"choropleth",qQ:"bubble",av:"marker",wna:"connector"},Ee=!1;t.H(s,t.Ex),s.prototype.handleEvent=function(t){this.b(t)&&(t.preventDefault(),s.u.handleEvent.call(this,t))},s.prototype.R=function(){s.u.R.call(this),this.b=null},t.g=a.prototype,t.g.asin=function(t){return 1<t?Math.PI/2:-1>t?-Math.PI/2:Math.asin(t)},t.g.acos=function(t){return 1<t?0:-1>t?Math.PI:Math.acos(t)},t.g.sinh=function(t){return.5*(Math.exp(t)-Math.exp(-t))},t.g.cosh=function(t){return.5*(Math.exp(t)+Math.exp(-t))},t.g.forward=function(t,e){return[t,e]},t.g.xj=function(t,e){return[t,e]},t.H(r,a),r.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.cos(i),s=(s=this.acos(n*Math.cos(e/=2)))?s/Math.sin(s):1;return[e=2*n*Math.sin(e)*s,i=Math.sin(i)*s]},r.prototype.xj=function(e,i){if(e*e+4*i*i>Math.PI*Math.PI+1e-6)return[window.NaN,window.NaN];var n=e,s=i,a=25,o=0;do{var r=Math.sin(n),l=Math.sin(n/2),h=Math.cos(n/2),c=Math.sin(s),u=Math.cos(s),d=Math.sin(2*s),p=c*c,g=u*u,f=l*l,m=1-g*h*h,v=m?this.acos(u*h)*Math.sqrt(o=1/m):o=0;m=2*v*u*l-e;var b=v*c-i,y=o*(g*f+v*u*h*p),S=o*(.5*r*d-2*v*c*l);if(!(h=S*(r=.25*o*(d*l-v*c*g*r))-(u=o*(p*h+v*f*u))*y))break;n-=S=(b*S-m*u)/h,s-=m=(m*r-b*y)/h}while((1e-6<Math.abs(S)||1e-6<Math.abs(m))&&0<--a);return[t.Za(t.cb(n),-180,180),t.Za(t.cb(s),-180,180)]},t.H(l,a),l.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.tan(i/2),s=o(1-n*n),a=1+s*Math.cos(e/=2),r=(n/=a)*n;return[4/3*(s=Math.sin(e)*s/a)*(3+(a=s*s)-3*r),4/3*n*(3+3*a-r)]},l.prototype.xj=function(e,i){if(i*=.375,!(e*=.375)&&1<Math.abs(i))return[window.NaN,window.NaN];var n=1+e*e+i*i,s=Math.sqrt(.5*(n-Math.sqrt(n*n-4*i*i)));n=this.asin(s)/3,s?(s=Math.abs(i/s),s=Math.log(s+o(s*s-1))/3):(s=Math.abs(e),s=Math.log(s+o(s*s+1))/3);var a=Math.cos(n),r=this.cosh(s),l=r*r-a*a;return e=2*(0<e?1:0>e?-1:0)*Math.atan2(this.sinh(s)*a,.25-l),i=2*(0<i?1:0>i?-1:0)*Math.atan2(r*Math.sin(n),.25+l),[t.cb(e),t.cb(i)]},t.H(h,a),h.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=this.b+this.f-i,s=n?e*Math.cos(i)/n:n;return[e=n*Math.sin(s),i=this.b-n*Math.cos(s)]},h.prototype.xj=function(e,i){var n=Math.sqrt(e*e+(i=this.b-i)*i),s=this.b+this.f-n;return e=n/Math.cos(s)*Math.atan2(e,i),[t.cb(e),t.cb(s)]},t.H(c,a),c.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.sqrt(8/(3*Math.PI));return[e=n*e*(1-Math.abs(i)/Math.PI),n*i]},c.prototype.xj=function(e,i){var n=Math.sqrt(8/(3*Math.PI)),s=i/n;return e/=n*(1-Math.abs(s)/Math.PI),[t.cb(e),t.cb(s)]},t.H(u,a),u.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.sqrt(Math.PI*(4+Math.PI));return[e=2/n*e*(1+Math.sqrt(1-4*i*i/(Math.PI*Math.PI))),4/n*i]},u.prototype.xj=function(e,i){var n=Math.sqrt(Math.PI*(4+Math.PI))/2;return e=e*n/(1+o(1-i*i*(4+Math.PI)/(4*Math.PI))),[t.cb(e),t.cb(i*n/2)]},t.H(d,a),d.prototype.forward=function(e,i){return[e=t.bb(e),i=t.bb(i)]},d.prototype.xj=function(e,i){return[t.cb(e),t.cb(i)]},t.H(p,a),p.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=Math.cos(t.bb(35)),s=Math.tan(i/2);return[e=e*n*o(1-s*s),(1+n)*s]},p.prototype.xj=function(e,i){var n=Math.cos(t.bb(35)),s=i/(1+n);return e=e?e/(n*o(1-s*s)):0,i=2*Math.atan(s),[t.cb(e),t.cb(i)]},t.H(g,a),g.prototype.forward=function(t,e){var i=Math.cos(e),n=this.scale(Math.cos(t)*i);return[t=n*i*Math.sin(t),e=n*Math.sin(e)]},g.prototype.xj=function(e,i){var n=t.gn(0,0,e,i),s=this.angle(n),a=Math.sin(s);return[e=Math.atan2(e*a,n*Math.cos(s)),i=Math.asin(n&&i*a/n)]},t.H(f,a),f.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=this.f.forward(e/2,i);return n[0]*=this.b,[e=n[0],i=n[1]]},f.prototype.xj=function(e,i){var n=this.f.xj(e/this.b,i);return n[0]*=2,e=n[0],i=n[1],[t.cb(e),t.cb(i)]},t.H(m,a),m.prototype.forward=function(e,i){return e=t.bb(e),i=t.bb(i),[e,i=Math.log(Math.tan(Math.PI/4+i/2))]},m.prototype.xj=function(e,i){return i=2*Math.atan(Math.exp(i))-Math.PI/2,[t.cb(e),t.cb(i)]},t.H(v,a),v.prototype.forward=function(e,i){e=t.bb(e),i=t.bb(i);var n=this.b.forward(e,i);return[e=n[0],i=n[1]]},v.prototype.xj=function(e,i){var n=this.b.xj(e,i);return e=n[0],i=n[1],[t.cb(e),t.cb(i)]},t.H(b,a),b.prototype.forward=function(t,e){return this.b(this.f).forward([t,e])},b.prototype.xj=function(t,e){return this.b(this.f).inverse([t,e])},t.H(y,a);var Ge=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];y.prototype.forward=function(e,i){if((0,window.isNaN)(e)||(0,window.isNaN)(i))return[window.NaN,window.NaN];e=t.bb(e),i=t.bb(i);var n,s=Math.min(18,36*Math.abs(i)/Math.PI),a=Math.floor(s);s-=a;var o=(n=Ge[a])[0],r=n[1],l=(n=Ge[++a])[0],h=n[1];return a=(n=Ge[Math.min(19,++a)])[0],n=n[1],[e*(l+s*(a-o)/2+s*s*(a-2*l+o)/2),i=(0<i?Math.PI/2:-Math.PI/2)*(h+s*(n-r)/2+s*s*(n-2*h+r)/2)]},y.prototype.xj=function(e,i){if((0,window.isNaN)(e)||(0,window.isNaN)(i))return[window.NaN,window.NaN];var n=i/Math.PI/2,s=90*n,a=Math.min(18,Math.abs(s/5)),o=Math.max(0,Math.floor(a));do{var r=Ge[o][1],l=Ge[o+1][1],h=Ge[Math.min(19,o+2)][1],c=h-r,u=2*(Math.abs(n)-l)/c;if(0<=(u*=1-(r=(h-2*l+r)/c)*u*(1-2*r*u))||1===o){s=(0<=i?5:-5)*(u+a),n=50;do{u=(a=Math.min(18,Math.abs(s)/5))-(o=Math.floor(a)),r=Ge[o][1],l=Ge[o+1][1],h=Ge[Math.min(19,o+2)][1],s-=t.cb(a=(0<=i?Math.PI/2:-Math.PI/2)*(l+u*(h-r)/2+u*u*(h-2*l+r)/2)-i)}while(1e-12<Math.abs(a)&&0<--n);break}}while(0<=--o);return a=Ge[o][0],n=Ge[o+1][0],o=Ge[Math.min(19,o+2)][0],i=t.bb(s),[t.cb(e/(n+u*(o-a)/2+u*u*(o-2*n+a)/2)),t.cb(i)]},t.H(S,a),S.prototype.forward=function(e,i){return e=t.bb(e),i=t.bb(i),[e*=Math.sqrt(1-3*i*i/(Math.PI*Math.PI)),i]},S.prototype.xj=function(e,i){return e/=Math.sqrt(1-3*i*i/(Math.PI*Math.PI)),[t.cb(e),t.cb(i)]},t.H(T,t.hx);var Ue={};t.sq(Ue,[[0,"zoomOnDoubleClick",t.Dq],[0,"keyboardZoomAndMove",t.Dq],[0,"drag",t.Dq],[0,"copyFormat",t.gr]]),t.U(T,Ue),T.prototype.F=function(){var e=T.u.F.call(this);return t.Tq(this,Ue,e),e},T.prototype.U=function(e,i){T.u.U.call(this,e,i),t.Iq(this,Ue,e)},t.H(D,t.EA),t.g=D.prototype,t.g.get=function(e){return t.D(this.ya.data)?this.ya.data().get(this.index,e):void 0},t.g.oy=function(){return this.id},t.g.nba=function(){return this.f},t.g.Q1=function(){return this.b},t.g.Ifa=function(){return this.xc()};var Fe=D.prototype;Fe.getId=Fe.oy,Fe.getProperties=Fe.nba,Fe.getCurrentChart=Fe.Q1,Fe.getParentChart=Fe.Ifa,Fe.get=Fe.get,t.H(k,t.FA),t.g=k.prototype,t.g.ny=function(){var t=this.X.$();return t.select(this.index),t.j("features")[0].properties},t.g.Efa=function(){var t=this.X.$();return t.select(this.index),t.j("features")[0].ia.kr()},t.g.Rha=function(e){if(t.p(e))return this.set("middle-x",e),this;(e=this.X.$()).select(this.index),e=(e=e.j("features"))&&e.length?e[0].properties:null;var i=this.get("middle-x");return t.p(i)?i:e?e["middle-x"]:.5},t.g.Sha=function(e){if(t.p(e))return this.set("middle-y",e),this;(e=this.X.$()).select(this.index),e=(e=e.j("features"))&&e.length?e[0].properties:null;var i=this.get("middle-y");return t.p(i)?i:e?e["middle-y"]:.5},t.g.pla=function(e,i){var n=this.xc();if(t.p(e)||t.p(i)){var s=P(this.X),a=this.ny();return a&&s&&(s=a[s])&&n.BT(s,e,i),this}return n.BT(this.ny()[P(this.X)])},t.g.translate=function(t,e){return this.xc().R6(this.ny()[P(this.X)],t,e),this},t.g.Pg=function(e){var i=this.xc();return t.p(e)?(i.zT(this.ny()[P(this.X)],e),this):i.zT(this.ny()[P(this.X)],e)},t.g.kka=function(e){var i=this.xc();return t.p(e)?(i.AT(this.ny()[P(this.X)],e),this):i.AT(this.ny()[P(this.X)],e)};var Me=k.prototype;Me.getFeatureProp=Me.ny,Me.getFeatureBounds=Me.Efa,Me.middleX=Me.Rha,Me.middleY=Me.Sha,Me.translation=Me.pla,Me.translate=Me.translate,Me.crs=Me.Pg,Me.scaleFactor=Me.kka,t.H($,t.xB),t.g=$.prototype,t.g.ra=1152|t.xB.prototype.ra,t.g.sa=4194304|t.xB.prototype.sa,t.g.zQ=13e-6,t.g.sF={},t.g.my=function(){return 0},t.g.HF=null,t.g.Ge=function(e,i,n){e=e||this.g("color")||"blue";var s,a=this.$(),o={},r=this.kd();return n=t.p(n)&&n,r&&!n&&(n=a.get(this.bf.El),t.p(n)&&(s=r.Qq(n)),t.Sc(o,{scaledColor:s,colorScale:r})),E(this)&&(s=a.j("currentPointElement"),r=(r=a.j("features"))&&r.length?r[0]:null,t.Sc(o,{properties:r?r.properties:null,attributes:s?s.attrs:null,element:s?s.domElement:null})),o.sourceColor=e,this.kt()&&(a=i?this.cg():a,t.Sc(o,{index:a.ma(),sourceColor:e,iterator:a,referenceValueNames:this.Be()})),o},t.g.Yi=function(t){var e=this.Eh();return this.kt()?{index:(t=t?this.cg():this.$()).ma(),sourceHatchFill:e,iterator:t,referenceValueNames:this.Be()}:{sourceHatchFill:e}},t.g.lD=function(e){return t.p(e)?(e!=this.b&&(this.b=e,this.B(1536,5)),this):this.b||this.i},t.g.ek=function(e,i){var n=this.$();n.select(e);var s=t.p(i)?i:t.nx(this.state,e),a=!!(s&t.wo),o=!a&&!!(s&t.vo),r=n.get("normal");r=t.p(r)?r.label:void 0;var l=(r=t.Zo(r,n.get("label")))&&t.p(r.enabled)?r.enabled:null,h=this.Qa().labels(),c=null;if(a){var u=n.get("selected");u=t.p(u)?u.label:void 0;var d=(u=t.Zo(u,n.get("selectLabel")))&&t.p(u.enabled)?u.enabled:null;c=this.selected().labels()}else o?(u=n.get("hovered"),u=t.p(u)?u.label:void 0,d=(u=t.Zo(u,n.get("hoverLabel")))&&t.p(u.enabled)?u.enabled:null,c=this.lb().labels()):u=null;return(a||o?null===d?null===c.enabled()?null===l?h.enabled():l:c.enabled():d:null===l?h.enabled():l)?(n=L(this,s),n=this.Bh(n),s=this.Ic(!0),a={},r&&t.Sc(a,r),c&&t.Sc(a,t.TN(c)),u&&t.Sc(a,u),u=a.anchor,t.p(u)&&null!==u||(a.anchor=this.$().j("labelAnchor")),t.ln(h.measure(s,n,a,e))):null},t.g.rO=function(e){return t.p(e)?(e=null===(e=!1===e?"no-overlap":e)?e:"allow-overlap"==t.Uk(e),this.HF!=e&&(this.HF=e,this.B(256,1025)),this):null===this.HF?this.ya.g("overlapMode"):this.HF?"allow-overlap":"no-overlap"},t.g.tf=function(e,i,n){var s=e.ma();this.f&&t.p(this.f[s])&&!this.f[s]||$.u.tf.call(this,e,i,n)},t.g.U1=function(){return this.Aa},t.g.RD=function(){return!0},t.g.XA=function(t){if(22==this.bf.type||this.Ak()){var e=F(this,t);t.j("x",e?e.x:window.NaN),t.j("value",e?e.y:window.NaN)}this.Ak()&&t.j("size",this.bG(Number(t.get("size"))))},t.g.co=function(){for(var e=-window.Infinity,i=window.Infinity,n=0,s=0,a=this.Ec();a.advance();){var o=this.enabled()?[this.$().get(this.bf.El)]:null;o&&(o=t.N(o[0]),(0,window.isNaN)(o)||(e=Math.max(e,o),i=Math.min(i,o),n+=o)),s++}a=n/s,this.La("seriesMax",e),this.La("seriesMin",i),this.La("seriesSum",n),this.La("seriesAverage",a),this.La("seriesPointsCount",s),this.La("seriesPointCount",s)},t.g.kz=function(){var t=this.Ec(),e=this.O()?this.O().Ja():null,i=e&&!e.yf();for(i&&e.suspend();t.advance()&&this.enabled();)G(this);i&&e.resume()},t.g.pk=function(e,i){var n=this.$();if(this.eh())if(E(this)){var s=n.j("features");if(!s)return void n.j("beforeDrawState",e);for(var a=0,o=s.length;a<o;a++){var r=s[a];t.p(r.ia)&&de(this.xc(),r,(function(i){var s=i.ia;if(s&&t.J(s,t.pg)){var a=n.j("beforeDrawState");t.ea(a)&&(e=a,n.j("beforeDrawState",null)),a=e;var o="s"+t.oa(s),r=s.zIndex();switch(a){case t.vo:o in this.DE&&(r=this.DE[o]),o in this.JA||(this.JA[o]=r,s.zIndex(1e4),n.j("stateZIndex",1e4),this.KH[o]=s);break;case t.wo:o in this.JA&&(r=this.JA[o],delete this.KH[o],delete this.JA[o]),o in this.DE||(this.DE[o]=r,s.zIndex(1e3),n.j("stateZIndex",1e3),this.aP[o]=s);break;default:o in this.KH&&(this.KH[o].zIndex(this.JA[o]),n.j("stateZIndex",null),delete this.KH[o],delete this.JA[o]),o in this.aP&&(this.aP[o].zIndex(this.DE[o]),n.j("stateZIndex",null),delete this.aP[o],delete this.DE[o])}n.j("currentPointElement",i),s={foreignFill:s},i.S2&&(s.hatchFill=i.S2),this.Rf.Mo(e,s),this.Rf.VB(e,s)}}),this)}}else s=n.j("shapes"),this.Rf.Mo(e,s),this.Rf.VB(e,s);return this.check(256)&&this.$L(n,e,!0),this.bf.aF(n,e),this.check(4194304)&&this.gq(n,e,!0),this.check(t.QG)&&this.tf(n,e,!0),i},t.g.pq=t.ia,t.g.k0=function(){this.I(65536)},t.g.pb=function(){if(E(this)||this.I(65536),this.J(4194304)||this.J(65536)){var e=this.Bn(),i=this.Be();this.GX.length=0;var n,s=this.Ec(),a=this.ya.SH;for(a&&(n=a[this.lD()]);s.advance();){if(this.J(4194304)){if(!n)continue;if(!(a=s.get(i[0]))||!(t.ea(a)||t.z(a)||t.A(a)))continue;a=t.A(a)?a:[a],s.j("features",void 0);for(var o=[],r=0,l=a.length;r<l;r++){var h=a[r],c=n[h];c&&(o.push(c),this.GX[s.ma()]=h)}s.j("features",o)}e&&this.J(65536)&&e.Xc(s.get(i[1]))}e&&this.J(65536)&&e.Hg(),this.I(65536),this.I(4194304)}},t.g.Gd=function(){this.pb(),this.ZA=this.ya.zf.Ig().clone(),$.u.Gd.call(this)},t.g.wn=function(e,i){if(this.J(4)&&E(this)){var n=e.j("features");if(n){var s=e.j("beforeDrawState");t.ea(s)&&(i=s,this.pk(i),e.j("beforeDrawState",null)),s=0;for(var a=n.length;s<a;s++){var o=n[s];t.p(o.ia)&&t.ru(this,o.ia)}}}$.u.wn.call(this,e,i)},t.g.qD=function(e){var i=this.Ls();i.I(i.sa);var n,s=i.F(),a={sourceColor:this.g("color")};return t.D(i.Gs())&&(s.iconFill=i.Gs().call(a,a)),t.D(i.Is())&&(s.iconStroke=i.Is().call(a,a)),t.D(i.Hs())&&(a.sourceColor=this.VF,s.iconHatchFill=i.Hs().call(a,a)),i=this.RC(),t.D(e)&&(n=e.call(i,i)),t.z(n)||(n=this.name()),"marker"==s.iconType&&this.check(4194304)&&(e=this.Qa().Db(),s.iconFill=e.fill(),s.iconStroke=e.stroke()),s.iconType=this.pD(s.iconType,i),n={text:n,iconEnabled:!0,iconStroke:void 0,iconFill:this.g("color"),iconHatchFill:void 0,disabled:!this.enabled()},t.Sc(n,s),n},t.g.GS=function(){return[this,this.xc()]},t.g.aU=function(){return{}},t.g.ym=function(e,i){var n=this.tl(),s={chart:{value:this.xc(),type:""},series:{value:this,type:""},scale:{value:n,type:""},index:{value:i.ma(),type:"number"},seriesName:{value:this.name(),type:"string"},id:{value:i.get("id"),type:"string"}},a=i.get("value");for(t.p(a)&&(s.value={value:a,type:"number"}),n&&t.D(n.Ma)&&(s.xScaleType={value:n.Ma(),type:"string"}),a=this.Be(),n=0;n<a.length;n++){var o=a[n];o in s||(s[o]={value:i.get(o),type:"number"})}if(21==this.bf.type){var r=i.j("pointsWithoutMissing");if(r&&r.length){for(s.startPoint={value:{lat:r[0],long:r[1]},type:""},s.endPoint={value:{lat:r[r.length-2],long:r[r.length-1]},type:""},o=[],n=0,a=r.length;n<a;n+=2)o.push({lat:r[n],long:r[n+1]});s.connectorPoints={value:o,type:""}}}else if((n=i.j("regionId"))&&(s.id={value:n,type:"string"}),n=(n=i.j("features"))&&n.length?n[0].properties:null)for(r in s.regionProperties={value:n,type:""},n)!n.hasOwnProperty(r)||r in s||(s[r]={value:n[r]});return s},t.g.$T=function(){return t.vB(this,new t.Fw)},t.g.nG=function(){return this.$T()},t.g.aO=function(){return!1},t.g.oba=function(t,e){var i=this.ya.scale().transform(t,e);return{x:i[0],y:i[1]}},t.g.Ic=function(e){return this.o&&!e||(this.o=new t.Fw),t.vB(this,this.o)},t.g.aM=function(e,i,n,s,a,o){var r=e[0],l=e[1],h=e[2];if(e=e[3],!s.value)return null;var c=a?r.be(n):r.jp(n);return c?(a&&c.Hf(a),c.jc(s)):c=a?r.add(a,s,n):r.add(s,n),c.Hi(),a?(c.qk(this.$().j("labelAnchor")),i.unshift(c),this.UX.apply(this,i)):(t.gy(c,l||r),h=t.Qc(h||{}),e=t.Qc(e||{}),i=c.ic("rotation"),t.p(i)&&null!==i&&!(0,window.isNaN)(i)||(i=this.$().j("markerRotation"),"rotation"in h||(h.rotation=i),"rotation"in e||(e.rotation=i)),i=c.ic("anchor"),t.p(i)&&null!==i||(i=this.$().j("markerAnchor"),"anchor"in h||(h.anchor=i),"anchor"in e||(e.anchor=i)),c.td(h,e)),o&&c.W(),24==this.bf.type&&(c.ZA=this.ya.zf.Ig().clone()),c},t.g.Bh=function(e){var i=this.$(),n={x:0,y:0};switch(this.bf.type){case 21:if(i.j("shapes").path){var s=i.j("sumDist"),a=i.j("connectorsDist"),o=i.j("points"),r=0;if(t.z(e))switch(e){case"start":var l=0;break;case"middle":l=.5;break;case"end":l=1;break;default:t.uo(e)?l=(0,window.parseFloat)(e)/100:(l=t.N(e),(0,window.isNaN)(l)&&(l=.5))}else l=t.N(e),(0,window.isNaN)(l)&&(l=.5);s*=l;for(var h=0,c=o.length;h<c;h+=8){if(e=a[h/8],s>=r&&s<=r+e){var u=(s-r)/e,d=o[h+2],p=o[h+3],g=o[h+4],f=o[h+5],m=o[h+6],v=o[h+7];n=g+(d-g)*(1-u);var b=f+(p-f)*(1-u);g=m+(g-m)*(1-u),f=v+(f-v)*(1-u),d=n+(d+(o[h]-d)*(1-u)-n)*(1-u),p=b+(p+(o[h+1]-p)*(1-u)-b)*(1-u),n=g+(n-g)*(1-u),g=f+(b-f)*(1-u),b=n+(d-n)*(1-u),u=g+(p-g)*(1-u),f=t.Tm(t.cb(Math.atan(Math.abs(g-p)/Math.abs(n-d))),7),n<d&&g<p?f-=180:n<d&&g>p?f=180-f:n>d&&g>p||n>d&&g<p&&(f=-f),i.j("labelAnchor",I(t.ab(f+90))),i.j("markerRotation",f),i.j("markerAnchor",1==l?"right-center":l?"center":"left-center")}r+=e}this.ya.j7||this.ya.dia||21!=this.bf.type?(a=this.ZA,i=this.ya.zf.Ig().clone(),a&&t.wb(i,t.Jb(a)),n={x:b*(a=i.od)+i.Jd,y:u*a+i.Fd}):n={x:b,y:u}}else n={x:0,y:0};break;case 22:case 23:n=F(this,i);break;case 24:if((u=(b=i.j("features"))&&b.length?b[0]:null)?(b=U(this),(e=i.get("label"))&&(h=e.positionMode,l=e.x,o=e.y),(n=(n=u.properties)&&n.label)&&(c=n&&n.positionMode,s=e.x,r=e.y),h=h||c||"relative",l=t.p(l)?l:s,r=t.p(o)?o:r,t.p(l)&&t.p(r)?(i.j("positionMode",h),a=b.x,o=b.y,"relative"==h?(l=t.yo(l),r=t.yo(r),l=t.uo(l)?(0,window.parseFloat)(l)/100:l,r=t.uo(r)?(0,window.parseFloat)(r)/100:r,(u=u.ia)?(l=(u=u.kr()).left+u.width*l,r=u.top+u.height*r):r=l=0):"absolute"==h?(l=(r=this.ya.scale().transform((0,window.parseFloat)(l),(0,window.parseFloat)(r)))[0],r=r[1]):"offset"==h&&(u=t.bb((0,window.parseFloat)(l)-90),l=a+(r=(0,window.parseFloat)(r))*Math.cos(u),r=o+r*Math.sin(u)),u=t.Tm(t.cb(Math.atan(Math.abs(o-r)/Math.abs(a-l))),7),a<l&&o<r?u-=180:a<l&&o>r?u=180-u:a>l&&o>r||a>l&&o<r&&(u=-u),a=I(t.ab(u-90)),i.j("labelAnchor",a),i.j("markerAnchor",a),a={x:l,y:r}):(i.j("labelAnchor","center"),i.j("markerAnchor","center"))):b=null,a?(a.connectorPoint={value:b},n=a):n=b,i=n&&n.connectorPoint)return delete n.connectorPoint,{connectorPoint:i,value:n}}return{value:n}},t.g.ce=function(t){return E(this)?new k(this,t):$.u.ce.call(this,t)};var _e={};t.rq(_e,0,"startSize",t.Bq),t.rq(_e,0,"endSize",t.Bq),t.rq(_e,0,"curvature",t.Bq),t.U($,_e),$.prototype.F=function(){var e=$.u.F.call(this);return t.Tq(this,_e,e),e.seriesType=this.Ma(),e.overlapMode=this.HF,t.p(this.b)&&(e.geoIdField=this.b),e},$.prototype.U=function(e,i){$.u.U.call(this,e,i),t.Iq(this,_e,e),this.rO(e.overlapMode),this.lD(e.geoIdField)};var Ne=$.prototype;Ne.overlapMode=Ne.rO,Ne.geoIdField=Ne.lD,Ne.transformXY=Ne.oba,Ne.getPoint=Ne.ce,t.H(R,t.xz),R.prototype.Jw=function(){this.i||N(this.map.Q3,1),R.u.Jw.call(this)},R.prototype.cm=function(){this.i||N(this.map.Q3,0),R.u.cm.call(this)},R.prototype.R=function(){R.u.R.call(this),this.map=null},t.H(j,R),j.prototype.aS=function(t,e){var i=(t[e]-this.fe.ri)/this.fe.scale,n=(t[e+1]-this.fe.jj)/this.fe.scale;this.xJ&&(i=(n=this.xJ.xj(i,n))[0],n=n[1]),i=this.fe.Yo.forward(i,n),t[e]=i[0]*this.fe.scale+this.fe.ri,t[e+1]=i[1]*this.fe.scale+this.fe.jj,this.TT.oM(t[e],t[e+1])},j.prototype.stop=function(e){t.vz(this),this.dc=t.rz,e&&(this.Kd=1),B(this,this.Kd),this.bp("stop"),this.cm()},j.prototype.uG=function(e){this.dc!=t.rz&&(this.Kd=(e-this.o)/(this.D-this.o),1<=this.Kd&&(this.Kd=1),B(this,this.Kd),1==this.Kd?(this.dc=t.rz,t.vz(this),this.eE(),this.cm()):1==this.dc&&this.en())},j.prototype.R=function(){j.u.R.call(this),this.fe=this.xJ=this.ss=null},t.H(H,R),H.prototype.Jw=function(){this.G=t.Wm(this.b[0],this.f[0],1e-5)&&this.map.oK,H.u.Jw.call(this)},H.prototype.en=function(){this.G?V(this,this.coords[1],this.coords[2]):z(this,this.coords[0]),this.i||ge(this.map).dispatchEvent(be(this.map,"zoom")),H.u.en.call(this)},H.prototype.eE=function(){if(this.map.ss()){var e=this.coords[0],i=this.coords[1],n=this.coords[2];this.G?V(this,i,n):(i=this.map.zf.Pd,n=this.map.g("minZoomLevel"),!this.map.Nr&&e<=n&&!t.zb(i)||this.map.mQ==n?(this.map.zf.oc(n,0,0,n,0,0),this.map.lq=n,this.map.scale().zoom=n,dt(this.map.scale(),0,0),ee(this.map)):z(this,e))}this.map.C3=this.map.Nr,this.map.Nr=!1,this.map.Fl=window.NaN,H.u.eE.call(this)},H.prototype.cm=function(){this.i||ge(this.map).dispatchEvent(be(this.map,"zoomend")),H.u.cm.call(this),this.map=this.map.si=null,this.ld()},t.H(q,t.Y),t.g=q.prototype,t.g.ra=t.Y.prototype.ra,t.g.sa=t.Y.prototype.sa,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this)),this):this.Y},t.g.Tc=function(e){var i=0;t.X(e,1)&&(i|=1),t.X(e,8)&&(i|=8),this.Xb=null,this.va(i)};var Re=q.prototype,je={};t.rq(je,1,"stroke",t.Pq),t.rq(je,0,"length",t.N),t.rq(je,0,"position",t.Wk),Re.DK=je,t.U(q,q.prototype.DK),t.g=q.prototype,t.g.orientation=function(e){return t.p(e)?(e=t.Lk(e),this.vh!=e&&(this.vh=e,this.ep=null),this):this.vh},t.g.Nb=function(){var t=this.orientation();return"top"==t||"bottom"==t},t.g.remove=function(){this.path&&this.path.parent(null)},t.g.W=function(){return W(this),this.path.clear(),this.path.stroke(this.g("stroke")),this.zc()?(this.J(8)&&(this.path.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.path.parent(this.O()),this.I(2)),this):this},t.g.hq=function(t){t=K(this,t),this.path.moveTo(t[0],t[1]),this.path.lineTo(t[2],t[3])},t.g.U=function(e,i){q.u.U.call(this,e,i),i?t.Hq(this.oa,this.DK,e):t.Iq(this,this.DK,e)},t.g.F=function(){var e=q.u.F.call(this);return t.Tq(this,this.DK,e,"Map axis ticks props"),e},t.g.R=function(){t.qd(this.path),this.path=null,q.u.R.call(this)},t.H(J,t.Y),t.g=J.prototype,t.g.sa=976|t.Y.prototype.sa,t.g.ra=32768|t.Y.prototype.ra,t.g.line=null,t.g.Er="axis",t.g.Da=null,t.g.mb=null,t.g.rc=null,t.g.Rc=null,t.g.qa=null,t.g.$b=null,t.g.ci=null,t.g.Fk=null,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(this.Y&&t.kr(this.Y,this.Tc,this),(this.Y=e)&&t.K(this.Y,this.Tc,this)),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=this.se,n|=8),t.X(e,32768)&&(i|=1,n|=9),this.Xb=null,this.B(i,n)};var Be={};t.rq(Be,1,"stroke",t.Pq),t.rq(Be,0,"overlapMode",t.Uk),t.rq(Be,0,"drawFirstLabel",t.Dq),t.rq(Be,0,"drawLastLabel",t.Dq),t.U(J,Be),t.g=J.prototype,t.g.title=function(e){return this.jb||(this.jb=new t.aw,this.jb.df(),this.jb.padding().df(),this.jb.margin().df(),t.W(this,"title",this.jb),this.jb.kb(this),this.jb.parent(this.parent().title()),t.K(this.jb,this.Mq,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.Mq=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=64,n=1),this.B(i,n)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,this.Da.df(),t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=384,n=1),this.ae(),this.B(i,n)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,this.rc.df(),t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.uba,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.uba=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=384,n=1),this.ae(),this.B(i,n)},t.g.ol=function(){var e=new q;return e.orientation(this.vh),e.kb(this),t.K(e,this.vba,this),e},t.g.Xa=function(e){return this.mb||(this.mb=this.ol(),this.mb.df(),t.W(this,"ticks",this.mb),this.mb.parent(this.parent().Xa())),t.p(e)?(this.mb.N(e),this):this.mb},t.g.yb=function(e){return this.Rc||(this.Rc=this.ol(),this.Rc.df(),t.W(this,"minorTicks",this.Rc),this.Rc.parent(this.parent().yb())),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.vba=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=384,n=1),this.ae(),this.B(i,n)},t.g.scale=function(e){return t.p(e)?(this.In!=e&&(this.In&&t.kr(this.In,this.ii,this),(this.In=e)&&t.K(this.In,this.ii,this),this.ae(),t.Yu(this.labels()),t.Yu(this.qb()),this.Xa().qa=this.In,this.yb().qa=this.In,this.B(this.se,9)),this):this.In},t.g.ii=function(e){t.X(e,2)&&(this.ae(),t.Yu(this.labels()),t.Yu(this.qb()),this.B(this.se,9))},t.g.orientation=function(e){return t.p(e)?(this.vh=e,this):this.vh},t.g.Nb=function(){return"top"==this.vh||"bottom"==this.vh},t.g.kz=function(t){this.Oa&&this.Oa.oc(t.od,t.gf,t.We,t.Le,t.Jd,t.Fd)},t.g.sy=function(){if(!this.ik||this.J(512)){if("allow-overlap"==this.g("overlapMode"))return!1;var e=this.scale(),i=[],n=[];if(e){var s,a,o,r=-1,l=-1,h=-1,c=(this.Nb()?this.scale().wx():this.scale().xx()).get(),u=c.length,d=this.parent().labels(),p=this.labels().nd("enabled");d=null==p?d.enabled():p;var g=this.Nb()?this.scale().qz():this.scale().rz();p=this.g("drawFirstLabel");var f=this.g("drawLastLabel"),m=g.get(),v=g=0,b=m.length,y=this.parent().qb(),S=this.qb().nd("enabled");for(y=null==S?y.enabled():S;g<u||v<b;){var x=(0,window.parseFloat)(c[g]);if(S=(0,window.parseFloat)(m[v]),this.Nb())var w=e.Lr(x),C=e.Lr(S);else w=e.Jp(x),C=e.Jp(S);if(S=x=s=a=null,-1==l&&d)for(o=g;-1==l&&o<u;){if(S=!o&&p||o==u-1&&f||0!=o&&o!=u-1?this.rd(o,!0,c):null,x=-1!=r?this.rd(r,!0,c):null,s=o!=u-1&&f?this.rd(u-1,!0,c):null,S&&!t.bn(S,x)&&!t.bn(S,s)){var T=this.Nb()?e.Lr(c[o]):e.Jp(c[o]);(0>=T&&p||1<=T&&f||0<T&&1>T)&&(l=o)}o++}w<=C&&g<u||v==b?(d&&g==l?(r=g,l=-1,i.push(!0)):i.push(!1),g++,w==C&&(d||this.Xa().enabled())&&(n.push(!1),v++)):(y?(S=this.rd(v,!1,m),-1!=r&&(x=this.rd(r,!0,c)),-1!=l&&(s=this.rd(l,!0,c)),-1!=h&&(a=this.rd(h,!1,m)),w=!(w=this.qb().be(v))||!t.p(w.enabled())||w.enabled(),t.bn(S,x)||t.bn(S,s)||t.bn(S,a)||!w?n.push(!1):0>=(T=this.Nb()?e.Lr(m[v]):T=e.Jp(m[v]))&&p||1<=T&&f||0<T&&1>T?(h=v,n.push(!0)):n.push(!1)):n.push(!1),v++)}y||(n=!1)}d||(i=!1),this.ik={labels:i,qb:n},this.I(512)}return this.ik},t.g.nq=function(e,i){i=(0,window.parseFloat)(i);var n=Math.abs(i)%1,s=Math.floor(Math.abs(i)),a=Math.floor(60*n);return s+="°",((n=Math.floor(60*n%1*60))||a)&&(10>a&&(a="0"+a),s+=a+"'"),s+=a=this.Nb()?0<i?"E":"W":0<i?"N":"S",a={axis:{value:this,type:""},scale:{value:a=this.scale(),type:""},index:{value:e,type:"number"},value:{value:s,type:"string"},tickValue:{value:i,type:"number"},max:{value:t.p(a.max)?a.max:null,type:"number"},min:{value:t.p(a.min)?a.min:null,type:"number"}},(s={})["%AxisName"]={value:this.title().text(),type:"string"},(a=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}).Dl(s),t.ov(a)},t.g.IM=function(e,i){switch(this.vh){case"top":var n=t.cb(e)+90;break;case"right":n=t.cb(e);break;case"bottom":n=t.cb(e)-90;break;case"left":n=t.cb(e)-180}var s=(i?this.Xa():this.yb()).g("position");return"inside"!=s&&"center"!=s||(n+=180),n},t.g.rd=function(e,i,n){var s=i?this.ci:this.Fk;if(t.p(s[e]))return s[e];var a=i?this.Xa():this.yb(),o=i?this.labels():this.qb(),r=i?this.parent().labels():this.parent().qb(),l=(0,window.parseFloat)(n[e]);n=K(a,l);var h=o.g("position")||r.g("position");h=t.Ho(h);var c=a.g("position");return c=t.Ho(c),a.enabled()?0<c*h?(a=n[2],h=n[3]):0>c*h||c?(a=n[0],h=n[1]):(a=n[0]+(n[2]-n[0])/2,h=n[1]+(n[3]-n[1])/2):(a=n[0],h=n[1]),l=this.nq(e,l),a={value:{x:a,y:h}},h=t.TN(r),o=t.TN(o),n=this.IM(n[4],i),i=Z(this,i),t.Sc(h,o),t.p(h.rotation)||(h.rotation=n),t.p(h.anchor)||(h.anchor=i),r=r.yl(l,a,h,e),s[e]=r},t.g.yd=function(){var e=this.ja();return e?this.scale()&&this.g("enabled")?Q(this,e):e.clone():new t.I(0,0,0,0)},t.g.uo=function(){this.ae(),this.B(this.se,9)},t.g.ae=function(){this.ci.length=0,this.Fk.length=0,this.ik=null},t.g.ke=function(e,i,n){var s=i?this.Xa():this.yb(),a=i?this.labels():this.qb(),o=i?this.parent().labels():this.parent().qb(),r=K(s,e),l=a.g("position")||o.g("position");l=t.Ho(l);var h=s.g("position");if(h=t.Ho(h),s.enabled())if(h||l)0<h*l||!h&&0>l?(c=r[2],u=r[3]):(0>h*l||!l||!h&&0<l)&&(c=r[0],u=r[1]);else var c=r[0]+(r[2]-r[0])/2,u=r[1]+(r[3]-r[1])/2;else c=r[0],u=r[1];e=this.nq(n,e),n=a.add(e,{value:{x:c,y:u}},n),r=this.IM(r[4],i),t.p(r)&&(r=t.N(r),n.Nd.rotation!==r&&(n.Nd.rotation=r,t.p(n.Pa.rotation)&&!(0,window.isNaN)(n.Pa.rotation)||n.B(16,9))),n.qk(Z(this,i)),i=t.TN(a),t.p(i.enabled)&&null==i.enabled&&delete i.enabled,t.bv(n,[n,i,"auto",o,a.oa,o.oa])},t.g.tba=function(){var t=this.scale(),e=t.precision()[0],i=t.Bq(),n=t.yq(),s=t.zq(),a=i;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,s,null);this.line.moveTo(o[0],o[1]),o=t.transform(n,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<n;){var r=(o=t.transform(a,s,null))[0];o=o[1],a==i?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(n,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.sba=function(){var t=this.scale(),e=t.precision()[1],i=t.yq(),n=t.Cq(),s=t.zq(),a=n;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,n,null);this.line.moveTo(o[0],o[1]),o=t.transform(i,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<s;){var r=(o=t.transform(i,a,null))[0];o=o[1],a==n?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(i,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.qba=function(){var t=this.scale(),e=t.precision()[0],i=t.Bq(),n=t.yq(),s=t.Cq(),a=i;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,s,null);this.line.moveTo(o[0],o[1]),o=t.transform(n,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<n;){var r=(o=t.transform(a,s,null))[0];o=o[1],a==i?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(n,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.rba=function(){var t=this.scale(),e=t.precision()[1],i=t.Bq(),n=t.Cq(),s=t.zq(),a=n;if(!(0,window.isNaN)(a))if(C(t.fe.default.Pg)){var o=t.transform(i,n,null);this.line.moveTo(o[0],o[1]),o=t.transform(i,s,null),this.line.lineTo(o[0],o[1])}else{for(;a<s;){var r=(o=t.transform(i,a,null))[0];o=o[1],a==n?this.line.moveTo(r,o):this.line.lineTo(r,o),a+=e}o=t.transform(i,s,null),r=Math.round(o[0]),o=Math.round(o[1]),this.line.lineTo(r,o)}},t.g.lo=function(){switch(tt(this).clear(),this.vh){case"top":var t=this.tba;break;case"right":t=this.sba;break;case"bottom":t=this.qba;break;case"left":t=this.rba}t.call(this),this.line.stroke(this.g("stroke"))},t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.zc=function(){return!this.pf()&&(this.g("enabled")?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.title().B(2),this.Xa().B(2),this.yb().B(2),this.labels().B(2),this.qb().B(2),this.B(2|this.se)),!1))},t.g.W=function(){var e=this.scale();if(!e)return t.il(2),this;if(e.pb(),!this.zc())return this;this.Oa||(this.Oa=t.ok(),this.title().O(this.Oa),tt(this).parent(this.Oa),this.Xa().O(this.Oa),this.yb().O(this.Oa),this.labels().O(this.Oa),this.qb().O(this.Oa));var i=this.vh;if(this.title().ka(),this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka(),this.J(16)&&(this.lo(),this.I(16)),this.J(8)){var n=this.zIndex();this.Oa.zIndex(n),tt(this).zIndex(1),this.I(8)}if(this.J(2)&&(n=this.O(),this.Oa.parent(n),this.I(2)),this.J(64)&&((n=this.title()).g("enabled")&&n.ja(Q(this)),t.dw(n,i),n.W(),this.I(64)),this.J(256)){var s=this.Xa();if(s.W(),s.enabled())var a=s.hq;var o=this.yb();if(o.W(),o.enabled())var r=s.hq;this.I(256)}if(this.J(128)){var l=this.labels();l.O()||l.O(this.O()),l.ja(this.ja()),l.clear(),l=null==(l=this.labels().nd("enabled"))?this.parent().labels().enabled():l;var h=this.qb();h.O()||h.O(this.O()),h.ja(this.ja()),h.clear(),h=null==(h=this.qb().nd("enabled"))?this.parent().qb().enabled():h,this.I(128)}if(t.p(a)||t.p(r)||l||h){n=(i=(this.Nb()?this.scale().wx():this.scale().xx()).get()).length;var c=this.sy();if(t.C(c)){h=c.labels;var u=c.qb}else h=!c,u=!c;for(var d,p=(this.Nb()?this.scale().qz():this.scale().rz()).get(),g=c=0,f=p.length;c<n||g<f;){var m=(0,window.parseFloat)(i[c]),v=(0,window.parseFloat)(p[g]);if(this.Nb()){var b=e.Lr(m);d=e.Lr(v)}else b=e.Jp(m),d=e.Jp(v);if(b<=d&&c<n||g==f){var y=t.A(h)?h[c]:h;t.da(h)&&(c||(y=y&&this.g("drawFirstLabel")),c==n-1&&(y=y&&this.g("drawLastLabel"))),(v=t.A(h)&&h[c]||t.da(h))&&a&&a.call(s,m),y&&this.ke(m,!0,c),y=b,c++}else(a||l)&&y==d||(b=t.A(u)?u[g]:u,(m=t.A(u)&&u[g]||t.da(u))&&r&&r.call(o,v),b&&this.ke(v,!1,g)),g++}u&&(t.Yu(this.parent().qb()),t.Yu(this.qb()),this.qb().W()),t.Yu(this.parent().labels()),t.Yu(this.labels()),this.labels().W()}return this.title().da(!1),this.labels().da(!1),this.qb().da(!1),this.Xa().da(!1),this.yb().da(!1),this.I(4),this},t.g.U=function(e,i){J.u.U.call(this,e,i),t.Iq(this,Be,e,i),this.title().ga(!!i,e.title),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Xa().ga(!!i,e.ticks),this.yb().ga(!!i,e.minorTicks)},t.g.F=function(){var e=J.u.F.call(this),i=this.title().F();return t.Jc(i)||(e.title=i),i=this.Xa().F(),t.Jc(i)||(e.ticks=i),i=this.yb().F(),t.Jc(i)||(e.minorTicks=i),i=t.TN(this.labels()),t.Jc(i)||(e.labels=i),i=t.TN(this.qb()),t.Jc(i)||(e.minorLabels=i),t.Tq(this,Be,e,"Map "+this.vh+" axis props"),e},t.g.R=function(){t.sd(this.jb,this.Da,this.rc,this.mb,this.Rc),this.Rc=this.mb=this.rc=this.Da=this.jb=null,J.u.R.call(this)};var He=J.prototype;He.title=He.title,He.labels=He.labels,He.minorLabels=He.qb,He.ticks=He.Xa,He.minorTicks=He.yb,t.H(et,t.V),t.g=et.prototype,t.g.sa=985,t.g.ra=32777,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e};var ze={};t.sq(ze,[t.Z.Yn,t.Z.dC,t.Z.tQ,t.Z.uQ,t.Z.vQ]),t.U(et,ze),t.g=et.prototype,t.g.zm=function(){return this.G},t.g.top=function(e){return this.o||(this.o=new J,this.o.df(),t.W(this,"top",this.o),this.o.orientation("top"),this.o.parent(this),t.K(this.o,this.D.gO,this.D),this.o.zh=li+0*hi,this.G[0]=this.o),t.p(e)?(this.o.N(e),this):this.o},t.g.right=function(e){return this.i||(this.i=new J,this.i.df(),t.W(this,"right",this.i),this.i.orientation("right"),this.i.parent(this),t.K(this.i,this.D.gO,this.D),this.i.zh=li+hi,this.G[1]=this.i),t.p(e)?(this.i.N(e),this):this.i},t.g.bottom=function(e){return this.b||(this.b=new J,this.b.df(),t.W(this,"bottom",this.b),this.b.orientation("bottom"),this.b.parent(this),t.K(this.b,this.D.gO,this.D),this.b.zh=li+2*hi,this.G[2]=this.b),t.p(e)?(this.b.N(e),this):this.b},t.g.left=function(e){return this.f||(this.f=new J,this.f.df(),t.W(this,"left",this.f),this.f.orientation("left"),this.f.parent(this),t.K(this.f,this.D.gO,this.D),this.f.zh=li+3*hi,this.G[3]=this.f),t.p(e)?(this.f.N(e),this):this.f},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),t.K(this.jb,this.Mq,this),this.jb.I(4294967295)),t.p(e)?(this.jb.N(e),this.jb.I(4294967295),this):this.jb},t.g.Mq=function(){this.jb.I(4294967295)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.U(this.Da.oa,!0),t.K(this.Da,this.de,this),this.Da.I(4294967295)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this.Da.I(4294967295),this):this.Da},t.g.de=function(e){this.Da.I(4294967295);var i=0;t.X(e,8)?i=9:t.X(e,1)&&(i=1),this.va(i)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.U(this.rc.oa,!0),t.K(this.rc,this.pba,this),this.rc.I(4294967295)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this.rc.I(4294967295),this):this.rc},t.g.pba=function(e){this.rc.I(4294967295);var i=0;t.X(e,8)?i=9:t.X(e,1)&&(i=1),this.va(i)},t.g.Xa=function(e){return this.mb||(this.mb=new q,t.W(this,"ticks",this.mb),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.yb=function(e){return this.Rc||(this.Rc=new q,t.W(this,"minorTicks",this.Rc),t.K(this.Rc,this.li,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.li=function(e){var i=0;t.X(e,8)?i=9:t.X(e,1)&&(i=1),this.va(i)},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.Kg=function(e,i){var n=t.p(i)?i:{};this.left().ga(!!e,n.left),this.top().ga(!!e,n.top),this.right().ga(!!e,n.right),this.bottom().ga(!!e,n.bottom)},t.g.U=function(e,i){this.D.ka(),t.Iq(this,ze,e,i),i||this.enabled(!("enabled"in e)||e.enabled),this.title().ga(!!i,e.title),this.Xa().ga(!!i,e.ticks),this.yb().ga(!!i,e.minorTicks),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Kg(!!i,e),this.D.da(!0)},t.g.F=function(){var e={};if(this.f){var i=this.f.F();t.Jc(i)||(e.left=i)}return this.o&&(i=this.o.F(),t.Jc(i)||(e.top=i)),this.i&&(i=this.i.F(),t.Jc(i)||(e.right=i)),this.b&&(i=this.b.F(),t.Jc(i)||(e.bottom=i)),e.title=this.title().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),t.Tq(this,ze,e,"Map axes props"),e},t.g.R=function(){t.sd(this.o,this.i,this.b,this.f,this.jb,this.Da,this.rc,this.mb,this.Rc),this.f=this.b=this.i=this.o=null,this.G.length=0,this.Rc=this.mb=this.rc=this.Da=this.jb=null,et.u.R.call(this)};var Ve=et.prototype;Ve.left=Ve.left,Ve.top=Ve.top,Ve.right=Ve.right,Ve.bottom=Ve.bottom,Ve.title=Ve.title,Ve.ticks=Ve.Xa,Ve.minorTicks=Ve.yb,Ve.labels=Ve.labels,Ve.minorLabels=Ve.qb,t.H(it,t.Y),t.Gq(it,["labels"],"normal");var qe,We=(qe={},t.sq(qe,[[0,"orientation",function(e){return t.Lk(e,"right")}],t.Z.eK,t.Z.iK,t.Z.jK]),qe);t.U(it,We),t.g=it.prototype,t.g.sa=448|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=128,n=1),this.B(i,n)},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.W(this,"padding",this.Wa),t.K(this.Wa,this.Pk,this)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.margin=function(e,i,n,s){return this.Qc||(this.Qc=new t.Mv,t.W(this,"margin",this.Qc),t.K(this.Qc,this.Pk,this)),t.p(e)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},t.g.Pk=function(e){t.X(e,2)&&this.B(4,9)},t.g.items=function(e){return t.p(e)?(this.Ub!=e&&(this.Ub=e,this.B(16,1)),this):this.Ub||[]},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(256,1)},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),t.K(this.jb,this.Mq,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.Mq=function(e){var i=0,n=0;t.X(e,8)?(i=this.se,n=9):t.X(e,1)&&(i=64,n=1),this.B(i,n)},t.g.kz=function(){for(var t=0,e=this.Qa().labels().jI();t<e;t++){var i=this.Qa().labels().be(t),n=i.Zf,s=this.i[t],a=s.ef();a.Ec().select(s.ma()),i=this.Bh(i.ma()).value,a=U(a),n.clear().moveTo(i.x,i.y).lineTo(a.x,a.y)}},t.g.Ih=function(e){var i=this.i[t.p(e.labelIndex)?e.labelIndex:e.domTarget.lha];e.domTarget.tag={X:i.ef(),index:i.ma()},e.pointIndex=i.ma()},t.g.Nb=function(){var t=this.g("orientation");return"top"==t||"bottom"==t},t.g.sl=function(){return this.Bd||(this.Bd=t.ok()),this.Bd},t.g.yd=function(){var e=this.ja();if(e){if(e=e.clone(),this.enabled()){var i=this.ob(),n=i.height;switch(i=i.width,this.g("orientation")){case"top":e.height-=n,e.top+=n;break;case"right":e.width-=i;break;case"bottom":e.height-=n;break;case"left":e.width-=i,e.left+=i}}return e}return new t.I(0,0,0,0)},t.g.ob=function(){if(!this.K||this.J(4)){var e=this.ja();if(e){if(e.top=Math.round(e.top),e.left=Math.round(e.left),e.width=Math.round(e.width),e.height=Math.round(e.height),this.Nb())var i=e.width,n=e.height;else i=e.height,n=e.width;var s=0,a=0;this.f=this.b=null;for(var o=0,r=this.i.length;o<r;o++){var l=this.i[o],h=new t.Tu;nt(this,l,h),t.Yu(t.Zu(h)),l=h.ic("enabled")?t.Zu(h).measure(h):t.kn(0,0,0,0),t.Yu(t.Zu(h)),l.height>a&&(a=l.height),l.width>s&&(s=l.width)}this.Nb()||(o=s,s=a,a=o),o=this.i.length;var c=null==this.g("length"),u=null==this.g("width"),d=null!=this.g("length")?t.L(this.g("length"),i):s*o,p=null!=this.g("width")?t.L(this.g("width"),n):a;s=a=0;var g=!1,f=!1;(r=this.title()).enabled()&&(r.O()||r.O(this.O()),r.ka(),r.ja(e),t.dw(r,this.g("orientation")),this.Nb()?(a=r.yi().height,s=r.yi().width):(a=r.yi().width,s=r.yi().height),"top"==(g=r.g("orientation")||t.dw(r))||"bottom"==g?(g=this.Nb(),f=!this.Nb()):(g=!this.Nb(),f=this.Nb()),r.da(!1));var m=this.padding();h=t.L(m.g("top"),e.height),l=t.L(m.g("right"),e.width);var v=t.L(m.g("bottom"),e.height);m=t.L(m.g("left"),e.width);var b,y=this.margin(),S=t.L(y.g("top"),e.height),x=t.L(y.g("right"),e.width),w=t.L(y.g("bottom"),e.height);switch(y=t.L(y.g("left"),e.width),c&&!u?(c=p-(g?a:0),d=Math.min(f?c*o+s:Math.max(c*o,s),i),this.b=(d-(f?s:0))/o,this.f=c):!c&&u?(c=(d-(f?s:0))/o,p=Math.min(g?c+a:Math.max(c,a),n),this.b=c,this.f=p-(g?a:0)):c&&u?(n=Math.min(d,i-(f?s:0))/o,d=Math.max(p,f?a:0),c=Math.max(n,d)*o+v+h+w+S>i?(i-(v+h+w+S)-(f?s:0))/o:Math.max(n,d),d=f?c*o+s:Math.max(c*o,s),p=g?c+a:Math.max(c,a),this.f=this.b=c):(this.b=(d-(f?s:0))/o,this.f=p-(g?a:0)),n=this.g("align"),this.Nb()?(d+l+m+x+y>i&&(d=i-(l+m+x+y)),"left"==n||"top"==n?b=m+y:"right"==n||"bottom"==n?b=i-d-l-x:"center"==n&&(b=(i-d)/2)):(d+v+h+w+S>i&&(d=i-(v+h+w+S)),"left"==n||"top"==n?b=h+S:"right"==n||"bottom"==n?b=i-d-v-w:"center"==n&&(b=(i-d)/2)),this.g("orientation")){case"top":var C=e.top+h+S,T=e.left+b,D=p,k=d;this.D=new t.I(T,C,this.b,this.f);break;case"right":C=e.top+b,T=e.left+e.width-p-l-x,D=d,k=p,this.D=new t.I(T,C,this.f,this.b);break;case"bottom":C=e.top+e.height-p-v-w,T=e.left+b,D=p,k=d,this.D=new t.I(T,C,this.b,this.f);break;case"left":C=e.top+b,T=e.left+m+y,D=d,k=p,this.D=new t.I(T,C,this.f,this.b)}if(r.enabled())switch(g=r.g("orientation")||t.dw(r),g){case"top":this.D.left=T,this.D.top=C+(this.Nb()?a:s);break;case"left":this.D.left=T+(this.Nb()?s:a),this.D.top=C}this.kg=new t.I(Math.round(T),Math.round(C),Math.round(k),Math.round(D)),this.G=new t.I(this.kg.left-m,this.kg.top-h,this.kg.width+m+l,this.kg.height+h+v),this.K=new t.I(this.G.left-y,this.G.top-S,this.G.width+y+x,this.G.height+S+w)}else this.K=new t.I(0,0,0,0);this.B(this.se),this.I(4)}return this.K},t.g.Bh=function(t){if(null===this.b||null===this.f)return{value:{x:0,y:0}};var e=this.D;switch(this.g("orientation")){case"top":var i=e.left+this.b*t+this.b/2,n=e.top+this.f;break;case"right":i=e.left,n=e.top+this.b*t+this.b/2;break;case"bottom":i=e.left+this.b*t+this.b/2,n=e.top;break;case"left":i=e.left+this.f,n=e.top+this.b*t+this.b/2}return{value:{x:i,y:n}}},t.g.W=function(){if(!this.zc())return this;var e=this.Qa().labels();if(!this.ya&&this.i&&this.i.length&&(this.ya=this.i[0].xc(),t.Ld(this.ya,"pointshover",(function(i){i=i.seriesStatus;for(var n=0,s=this.i.length;n<s;n++)for(var a=this.i[n],o=a.ma(),r=0,l=i.length;r<l;r++){var h=i[r],c=h.series;if(c==a.ef()){for(var u=!1,d=0,p=(h=h.points).length;d<p;d++){var g=h[d];if(a.ma()==g.index){(c=nt(this,a,e.be(n),t.nx(c.state,o))).W(),t.Yu(t.Zu(c)),u=!0;break}}u||a.state!=t.vo||((c=nt(this,a,e.be(n),t.gm)).W(),t.Yu(t.Zu(c)))}}}),!1,this),t.Ld(this.ya,"pointsselect",(function(i){i=i.seriesStatus;for(var n=0,s=this.i.length;n<s;n++)for(var a=this.i[n],o=a.ma(),r=0,l=i.length;r<l;r++){var h=i[r],c=h.series;if(c==a.ef()){for(var u=!1,d=0,p=(h=h.points).length;d<p;d++){var g=h[d];if(a.ma()==g.index){(u=nt(this,a,e.be(n),t.nx(c.state,o))).W(),t.Yu(t.Zu(u)),u=!0;break}}!u&&a.state&t.wo&&((u=nt(this,a,e.be(n),t.nx(c.state,o))).W(),t.Yu(t.Zu(u)))}}}),!1,this)),this.sl(),this.o||(this.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()}),void 0,this),t.ru(this,this.o),this.o.kb(this)),this.title().ka(),e.ka(),this.J(8)){var i=this.zIndex();this.Bd.zIndex(i),this.title().zIndex(2),e.zIndex(1),this.background().zIndex(0),this.o.zIndex(1.1),this.I(8)}if(this.J(2)&&(i=this.O(),this.Bd.parent(i),this.title().O(this.Bd),e.O(this.Bd),this.background().O(this.Bd),this.o.parent(this.Bd),this.I(2)),this.J(256)&&((i=this.background()).ka(),i.ja(this.G),i.O(this.Bd),i.W(),i.da(!1),this.I(256)),this.J(64)&&((i=this.title()).ja(this.kg),i.W(),this.I(64)),this.J(128)){this.o.clear(),function(e){var i=e.Qa().labels();i.O()||i.O(e.O()),i.ja(e.ja()),i.clear();for(var n=0,s=e.i.length;n<s;n++){var a=e.i[n],o=i.add(null,null);if(nt(e,a,o),o.ic("enabled")){switch(a=(o=o.jc()).value.x,o=o.value.y,e.g("orientation")){case"top":a-=e.b/2,o-=e.f;var r=e.b,l=e.f;break;case"right":o-=e.b/2,r=e.f,l=e.b;break;case"bottom":a-=e.f/2,r=e.b,l=e.f;break;case"left":a-=e.f,o-=e.b/2,r=e.f,l=e.b}if(e.o){var h=t.eC(e.o);h.moveTo(a,o).lineTo(a+r,o).lineTo(a+r,o+l).lineTo(a,o+l).close(),h.lha=n,h.stroke(null).fill(t.bm)}}}}(this),e.B(8),e.W(),i=0;for(var n=e.jI();i<n;i++)t.Yu(t.Zu(e.be(i)));this.I(128)}return this.title().da(!1),e.da(!1),this},t.g.remove=function(){this.jb&&this.jb.remove(),this.Da&&this.Da.remove()},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.N(this.ca.oa),t.W(this,"hovered",this.za),this.za.N(this.za.oa),t.W(this,"selected",this.Ea),this.Ea.N(this.Ea.oa)},t.g.F=function(){var e=it.u.F.call(this);return t.Tq(this,We,e),e.title=this.title().F(),e.background=this.background().F(),e.padding=this.padding().F(),e.margin=this.margin().F(),e.items=this.items(),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.U=function(e,i){this.ka(),it.u.U.call(this,e,i),t.Iq(this,We,e),"title"in e&&this.title(e.title),"background"in e&&this.background(e.background),"padding"in e&&this.padding(e.padding),"margin"in e&&this.margin(e.margin),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.items(e.items),this.da(!0)},t.g.R=function(){t.sd(this.Wa,this.Qc,this.Ia,this.jb),this.G=this.jb=this.Ia=this.Qc=this.Wa=null,it.u.R.call(this)};var Ye=it.prototype;Ye.title=Ye.title,Ye.normal=Ye.Qa,Ye.hovered=Ye.lb,Ye.selected=Ye.selected,Ye.background=Ye.background,Ye.padding=Ye.padding,Ye.margin=Ye.margin,Ye.items=Ye.items,t.H(st,t.iA),t.g=st.prototype,t.g.show=function(e){var i=[],n=t.qA(this);if(e=n.oq(e))if((0,t.Pe)(e,(function(t){t.series.enabled()&&0!=t.points.length&&i.push(t)}),this),0==i.length)this.Lc();else{var s=i[0];(0,t.Pe)(i,(function(t){s.nearestPointToCursor.distance>t.nearestPointToCursor.distance&&(s=t)})),e=this.g("xStroke");var a=this.g("yStroke"),o=s.series,r=o.$();r.select(s.nearestPointToCursor.point.index);var l=t.N(r.j("x"));r=t.N(r.j("value")),((0,window.isNaN)(l)||(0,window.isNaN)(r))&&(l=(r=M(o).value).x,r=r.y),l=(r=(n=n.scale()).Mc(l,r))[0],r=r[1],o=n.Lr(l),n=n.Jp(r),this.wi(t.jA(this),!0,o,e,l),this.wi(t.kA(this),!1,n,a,r)}},t.g.update=function(e,i){if(this.enabled()){var n,s;n=t.p(e)?(0,window.parseFloat)(e):t.p(this.TV)?this.TV:0,s=t.p(i)?(0,window.parseFloat)(i):t.p(this.UV)?this.UV:0,n=t.qA(this).AU(n,s);var a=t.qA(this).Mc(n.x,n.y);n=a.long,s=a.lat;var o=t.qA(this).scale(),r=o.Lr(a.x);a=o.Jp(a.y),o=this.g("xStroke");var l=this.g("yStroke");0<r&&1>r&&0<a&&1>a?(this.wi(t.jA(this),!0,r,o,n),this.wi(t.kA(this),!1,r,l,s)):this.Lc()}},t.g.If=function(t){this.TV=t.clientX,this.UV=t.clientY,"sticky"!=this.g("displayMode")&&this.update(t.clientX,t.clientY)},t.g.hg=function(e){if(!t.to(t.qA(this),e.relatedTarget)){this.TV=e.clientX,this.UV=e.clientY,e=t.qA(this).AU(e.clientX,e.clientY);var i=t.qA(this).Mc(e.x,e.y),n=t.qA(this).scale();e=n.Lr(i.x),i=n.Jp(i.y),(0>e||1<e||0>i||1<i)&&this.Lc()}},t.g.W=function(){if(!this.zc())return this;this.Oa||(this.Oa=t.ok(),this.Pr.parent(this.Oa),this.Sr.parent(this.Oa)),this.J(16)&&(this.Pr.stroke(this.g("xStroke")),this.Sr.stroke(this.g("yStroke")),this.I(16));var e=t.Ga(t.jA(this),t.kA(this));if(this.J(2)){var i=this.O();this.Oa.parent(i),t.oA(e,this.Oa),this.I(2)}return this.J(8)&&(i=this.zIndex(),this.Oa.zIndex(i),this.I(8)),this.J(4)&&(i=this.ja(),t.pA(e,i),this.I(4)),this},t.g.lo=function(e,i,n){var s=t.qA(this).scale(),a=0==this.Pr.gl()%2?0:-.5,o=0==this.Sr.gl()%2?0:-.5;if(i.clear(),e.Nb()){var r=s.precision()[1];for(o=s.Cq();o<s.zq();)e=s.transform(n,o,null),o==s.Cq()?i.moveTo(e[0]-a,e[1]):i.lineTo(e[0]-a,e[1]),o+=r;e=s.transform(n,s.zq(),null),i.lineTo(e[0]-a,e[1])}else{for(r=s.precision()[0],a=s.Bq();a<s.yq();)e=s.transform(a,n,null),a==s.Bq()?i.moveTo(e[0],e[1]-o):i.lineTo(e[0],e[1]-o),a+=r;e=s.transform(s.yq(),n,null),i.lineTo(e[0],e[1]-o)}},t.g.tf=function(e,i,n){var s=this.nq(e,n),a=i.format()||t.ep;i.text(a.call(s,s)),i.qk(t.nA(e)),n=K(e.Xa(),n),i.x(n[0]).y(n[1]),i.rotation(this.IM(e,n[4])),i.O(this.Oa).W()},t.g.IM=function(e,i){switch(e.orientation()){case"top":var n=t.cb(i)+90;break;case"right":n=t.cb(i);break;case"bottom":n=t.cb(i)-90;break;case"left":n=t.cb(i)-180}return n},t.g.nq=function(e,i){i=(0,window.parseFloat)(i);var n=Math.abs(i)%1,s=Math.floor(Math.abs(i)),a=Math.floor(60*n);return s+="°",((n=Math.floor(60*n%1*60))||a)&&(10>a&&(a="0"+a),s+=a+"'"),s+=a=e.Nb()?0<i?"E":"W":0<i?"N":"S",a=e.scale(),a={axis:{value:e,type:""},scale:{value:a,type:""},index:{value:window.NaN,type:"number"},value:{value:s,type:"string"},tickValue:{value:i,type:"number"},max:{value:t.p(a.max)?a.max:null,type:"number"},min:{value:t.p(a.min)?a.min:null,type:"number"}},(s={})["%AxisName"]={value:e.title().text(),type:"string"},(a=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}).Dl(s),t.ov(a)},t.g.wi=function(e,i,n,s,a){var o,r=t.qA(this),l=!1,h=i?r.uy:r.wy,c=i?this.$U:this.aV;i=i?this.Pr:this.Sr;var u=s&&"none"!=s;for(s=0;s<e.length;s++)if(o=e[s]){var d=o.g("axisIndex");(d=h.call(r,d))&&t.p(d.scale().Mc(0))&&0<n&&1>n?(!l&&u&&(this.lo(d,i,a),l=!0),o.enabled()&&this.tf(d,o,a)):c.call(this,o)}},t.H(at,t.kz);var Ke=at.prototype,Xe=t.kz.prototype.Cz;t.rq(Xe,1,"minorStroke",t.Pq),Ke.Cz=Xe,t.U(at,at.prototype.Cz),t.g=at.prototype,t.g.scale=function(e){return t.p(e)&&this.qa!=e&&(this.qa&&t.kr(this.qa,this.zg,this),(this.qa=e)&&t.K(this.qa,this.zg,this),this.B(68,9)),this.qa||this.b&&this.b.scale()||null},t.g.zg=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(20,i)},t.g.Uh=function(e){var i=e?this.o:this.i;return i||(e?(i=this.o=t.qk()).zIndex(1):(i=this.i=t.qk()).zIndex(0),i.Dd(!0).eq(!0),i.parent(this.Aa)),i},t.g.d_=function(){var e=t.qk();return e.parent(this.Aa).zIndex(3).stroke("none"),e},t.g.kz=function(t){this.Aa&&this.Aa.oc(t.od,t.gf,t.We,t.Le,t.Jd,t.Fd)},t.g.pv=function(){this.Aa||(this.Aa=t.ok())},t.g.TK=function(){var t=this.O();this.Aa.parent(t)},t.g.xC=function(){var t=this.zIndex();this.Aa.zIndex(t)},t.g.Bea=function(t,e,i,n){var s=(i=this.qa).Bq(),a=i.yq();if(C(i.fe.default.Pg)){var o=i.transform(s,t,null);e.moveTo(o[0],o[1]),o=i.transform(a,t,null),e.lineTo(o[0],o[1])}else{for(var r=s;r<a;)o=i.transform(r,t,null),r==s?e.moveTo(o[0],o[1]):e.lineTo(o[0],o[1]),r+=n;o=i.transform(a,t,null),e.lineTo(o[0],o[1])}},t.g.Aea=function(t,e,i,n){var s=(i=this.qa).Cq(),a=i.zq();if(C(i.fe.default.Pg)){var o=i.transform(t,s,null);e.moveTo(o[0],o[1]),o=i.transform(t,a,null),e.lineTo(o[0],o[1])}else{for(var r=s;r<a;)o=i.transform(t,r,null),r==s?e.moveTo(o[0],o[1]):e.lineTo(o[0],o[1]),r+=n;o=i.transform(t,a,null),e.lineTo(o[0],o[1])}},t.g.zea=function(t,e,i,n,s,a){s=(i=this.qa).Bq();var o=i.yq(),r=i.Cq();if((0,window.isNaN)(e)&&t!=r&&(e=r),!(0,window.isNaN)(e)){var l;if(C(i.fe.default.Pg))r=i.transform(s,t,null),n.moveTo(r[0],r[1]),r=i.transform(o,t,null),n.lineTo(r[0],r[1]),r=i.transform(o,t,null),n.lineTo(r[0],r[1]),r=i.transform(o,e,null),n.lineTo(r[0],r[1]),r=i.transform(o,e,null),n.lineTo(r[0],r[1]),r=i.transform(s,e,null),n.lineTo(r[0],r[1]),r=i.transform(s,e,null),n.lineTo(r[0],r[1]);else{for(l=s;l<o;)r=i.transform(l,t,null),l==s?n.moveTo(r[0],r[1]):n.lineTo(r[0],r[1]),l+=a;for(r=i.transform(o,t,null),n.lineTo(r[0],r[1]),l=t;l>e;)r=i.transform(o,l,null),n.lineTo(r[0],r[1]),l-=a;for(r=i.transform(o,e,null),n.lineTo(r[0],r[1]),l=o;l>s;)r=i.transform(l,e,null),n.lineTo(r[0],r[1]),l-=a;for(r=i.transform(s,e,null),n.lineTo(r[0],r[1]),l=e;l<t;)r=i.transform(s,l,null),n.lineTo(r[0],r[1]),l+=a}r=i.transform(s,t,null),n.lineTo(r[0],r[1]),n.close()}},t.g.yea=function(t,e,i,n,s,a){var o=(i=this.qa).Bq();s=i.Cq();var r=i.zq();if((0,window.isNaN)(e)&&t!=o&&(e=o),!(0,window.isNaN)(e)){var l;if(C(i.fe.default.Pg))o=i.transform(e,s,null),n.moveTo(o[0],o[1]),o=i.transform(t,s,null),n.lineTo(o[0],o[1]),o=i.transform(t,s,null),n.lineTo(o[0],o[1]),o=i.transform(t,r,null),n.lineTo(o[0],o[1]),o=i.transform(t,r,null),n.lineTo(o[0],o[1]),o=i.transform(e,r,null),n.lineTo(o[0],o[1]),o=i.transform(e,r,null),n.lineTo(o[0],o[1]);else{for(l=e;l<t;)o=i.transform(l,s,null),l==e?n.moveTo(o[0],o[1]):n.lineTo(o[0],o[1]),l+=a;for(o=i.transform(t,s,null),n.lineTo(o[0],o[1]),l=s;l<r;)o=i.transform(t,l,null),n.lineTo(o[0],o[1]),l+=a;for(o=i.transform(t,r,null),n.lineTo(o[0],o[1]),l=t;l>e;)o=i.transform(l,r,null),n.lineTo(o[0],o[1]),l-=a;for(o=i.transform(e,r,null),n.lineTo(o[0],o[1]),l=r;l>s;)o=i.transform(e,l),n.lineTo(o[0],o[1]),l-=a}o=i.transform(e,s,null),n.lineTo(o[0],o[1]),n.close()}},t.g.sK=function(){this.Uh(!0).stroke(this.g("stroke")),this.Uh(!1).stroke(this.g("minorStroke"))},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.Lj=function(){var e=this.qa,i=this.Uh(!0),n=this.Uh(!1);if(this.J(64)||this.J(4)){var s,a=window.NaN,o=e.precision();if(this.Nb()){var r=e.xx(),l=e.rz();o=o[0],e=e.zq();var h=[this.Bea,this.zea]}else r=e.wx(),l=e.qz(),o=o[1],e=e.yq(),h=[this.Aea,this.yea];r=r.get(),l=l.get(),this.Sz(),i.clear(),n.clear();var c=h[0],u=h[1],d=-i.gl()%2/2,p=0;for(s=r.length;p<s;p++){var g=r[p];p&&(h=t.oz(this,p-1))&&u.call(this,g,a,null,h,d,o),(!p&&this.g("drawFirstLine")||p==s-1&&this.g("drawLastLine")||0!=p&&p!=s-1)&&c.call(this,g,i,d,o),a=g}for(g!=e&&(h=t.oz(this,p-1))&&u.call(this,e,a,null,h,d),d=-i.gl()%2/2,p=0,s=l.length;p<s;p++)g=l[p],c.call(this,g,n,d,o);this.I(64),this.I(4)}},t.g.R=function(){t.sd(this.o,this.i),this.i=this.o=null,at.u.R.call(this)},t.H(ot,t.V),t.g=ot.prototype,t.g.sa=985,t.g.ra=98313,t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e};var Je={};t.sq(Je,[t.Z.vQ,t.Z.Yn,t.Z.cC,[1,"minorStroke",t.Pq],[0,"drawFirstLine",t.Dq],[0,"drawLastLine",t.Dq],[0,"zIndex",t.N]]),t.U(ot,Je),t.g=ot.prototype,t.g.cc=function(e){return this.Fa||(rt(this,this.oa.palette),t.W(this,"palette",this.Fa),this.Fa.Gp(!1)),t.p(e)?(rt(this,e),this.Fa.N(e),this):this.Fa},t.g.Hc=function(e){if(!t.J(this.Fa,e)){var i=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.K(this.Fa,this.Pf,this),i&&this.va(1)}},t.g.Pf=function(e){t.X(e,2)&&this.va(1)},t.g.zm=function(){return this.o},t.g.vertical=function(e){if(!this.f){this.f=new at,t.mz(this.f,"vertical"),this.f.df().parent(this),t.W(this,"vertical",this.f);var i=this.g("zIndex")+this.o.length*hi;this.f.zh=i,t.K(this.f,this.i.t4,this.i),this.o.push(this.f)}return t.p(e)?(this.f.N(e),this):this.f},t.g.U2=function(e){if(!this.b){this.b=new at,t.mz(this.b,"horizontal"),this.b.df().parent(this),t.W(this,"horizontal",this.b);var i=this.g("zIndex")+this.o.length*hi;this.b.zh=i,t.K(this.b,this.i.t4,this.i),this.o.push(this.b)}return t.p(e)?(this.b.N(e),this):this.b},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.Kg=function(e,i){var n=t.p(i)?i:this.oa;this.U2().ga(!!e,n.horizontal),this.vertical().ga(!!e,n.vertical)},t.g.U=function(e,i){this.i.ka(),t.Iq(this,Je,e),i&&this.ta("enabled",!("enabled"in e)||e.enabled),e.palette&&this.cc(e.palette),this.Kg(!!i,e),this.i.da(!0)},t.g.F=function(){var e={};if(this.f){var i=this.f.F();t.Jc(i)||(e.vertical=i)}return this.b&&(i=this.b.F(),t.Jc(i)||(e.horizontal=i)),this.Fa&&(e.palette=this.Fa.F()),t.Tq(this,Je,e,"Map grids props"),e},t.g.R=function(){t.sd(this.f,this.b,this.Fa),this.Fa=this.b=this.f=null,this.o.length=0,this.i=null,ot.u.R.call(this)};var Ze=ot.prototype;Ze.horizontal=Ze.U2,Ze.vertical=Ze.vertical,Ze.palette=Ze.cc,t.H(lt,a),lt.prototype.ratio=function(e){return t.p(e)?(e=t.N(e)||0,this.b!=e&&(this.b=e),this):this.b},lt.prototype.forward=function(t,e){var i=this.f.forward(t,e),n=this.cT.forward(t,e);return[t=(1-this.b)*i[0]+this.b*n[0],e=(1-this.b)*i[1]+this.b*n[1]]},lt.prototype.xj=function(t,e){var i=this.f.xj(t,e),n=this.cT.xj(t,e);return[t=(1-this.b)*i[0]+this.b*n[0],e=(1-this.b)*i[1]+this.b*n[1]]},t.H(ht,t.V),t.g=ht.prototype,t.g.ra=2,t.g.Gl=window.NaN,t.g.Nh=4,t.g.om=6,t.g.ll=null,t.g.Ro=null,t.g.Vc=0,t.g.xba=function(e){return null!=e?(this.Gl!=e&&(0>=(e=t.N(e))?(this.Nh=4,this.om=6,this.Gl=window.NaN):(this.om=this.Nh=window.NaN,this.Gl=+e),this.Ro=this.ll=null,this.va(2)),this):this.Gl},t.g.count=function(e,i){return t.p(e)?(this.Nh!=e&&(this.Gl=window.NaN,this.Nh=Math.ceil(t.N(e)),this.om=Math.ceil(t.N(i)),2<=this.Nh||(this.Nh=4),this.om>=this.Nh||(this.om=this.Nh),this.Ro=this.ll=null,this.va(2)),this):[this.Nh,this.om]},t.g.XF=function(e){return t.p(e)?(e=+e||0,this.Vc!=e&&(this.Vc=e,this.Ro=null,this.ll||this.va(2)),this):this.Vc},t.g.set=function(e){return t.Ta(this.ll,e)||(this.Gl=this.om=this.Nh=window.NaN,this.ll=t.Ja(e,0),t.Ka(this.ll),t.Pa(this.ll,t.po),this.Ro=null,this.va(2)),this},t.g.get=function(){var e=this.dk(),i="horizontal"==this.vh?this.qa.Lr:this.qa.Jp;return(0,t.Ye)(e,(function(t){return 0<=(t=i.call(this,(0,window.parseFloat)(t)))&&1>=t}),this.qa)},t.g.dk=function(){if(this.ll)var t=this.ll;else this.qa.pb(),t=this.Ro;return t||[]},t.g.DB=function(e,i,n,s){this.Ro=null;var a=[e,i];if(this.ll)n&&(a[0]=Math.min(e,this.ll[0]||0)),s&&(a[1]=Math.max(i,this.ll[this.ll.length-1]||0));else{var o=[],r=this.Gl,l=this.Nh,h=this.om;if(!(0,window.isNaN)(r)&&(i-e)/r>this.qa.an()&&(this.qa.XY||(t.kl(20,null,[i-e,r]),this.qa.XY=!0),r=window.NaN,l=4,h=6),(0,window.isNaN)(r))for(var c=window.NaN,u=l;u<=h;u++){l=(i-e)/(u-1);var d=Math.log(l),p=Math.pow(10,Math.floor(d*Math.LOG10E)),g=Math.pow(10,Math.ceil(d*Math.LOG10E)),f=l<p+p?p/2:Number.POSITIVE_INFINITY;d=t.Xm(l/g,2),(d=Math.min(t.Po(l,p)||window.Infinity,t.Po(l,g)||window.Infinity,t.Po(l,f)||window.Infinity,t.Po(l,Math.pow(2,Math.floor(d))*g)||window.Infinity,t.Po(l,Math.pow(2,Math.ceil(d))*g)||window.Infinity))&&(0,window.isFinite)(d)&&(l=d),d=t.Vm(t.Oo(e,l,this.Vc))-e,d*=d,p=t.Vm(t.Po(i,l,this.Vc))-i,d+=p*=p,((0,window.isNaN)(c)||d<c)&&(c=d,r=l)}for(h=t.Um(r),c=t.Vm(t.Oo(e,r,this.Vc,h)),n?a[0]=e=c:1e-7<e-c&&(o.push(e),a[2]=c),n=t.Vm(t.Po(i,r,this.Vc,h)),s?a[1]=i=n:1e-7<n-i&&(a[3]=n),e=t.Vm(t.Po(e,r,this.Vc,h));e<=i;e=t.Vm(e+r))o.push(e);3 in a&&o.push(i),this.Ro=o}return a},t.g.EB=function(e,i,n){if(this.ll)this.Ro=null;else if(this.Ro?this.Ro.length=0:this.Ro=[],!(2>e.length)){var s=this.wba,a=e.length-1,o=this.Gl,r=this.Nh;if(!(0,window.isNaN)(this.Gl)){var l=e[a],h=e[0];(l-h)/this.Gl>this.qa.an()&&(t.kl(20,null,[l-h,this.Gl]),this.Gl=window.NaN,this.Nh=4)}for(t.p(i)?(h=e[0],l=e[1],s.call(this,h,l,i,l),h=1):h=0,t.p(n)&&a--,i=h;i<=a-1;i++)h=e[i],l=e[i+1],s.call(this,h,l,h,l);t.p(n)&&(h=e[a],l=e[a+1],s.call(this,h,l,h,n)),this.Gl=o,this.Nh=r}},t.g.wba=function(e,i,n,s){var a=this.Gl;for((0,window.isNaN)(a)&&(a=(s-n)/(this.Nh-1)),a=Math.max(a,1e-7),n=this.Ro[this.Ro.length-1],i=t.Tm(i,7),e=t.Tm(e,7);e<=i;e=t.Tm(e+a,7))n!=e&&this.Ro.push(e),n=e},t.g.F=function(){var t=ht.u.F.call(this);return this.ll?t.explicit=this.ll:(this.Nh==this.om?(0,window.isNaN)(this.Nh)||(t.count=this.Nh):((0,window.isNaN)(this.Nh)||(t.minCount=this.Nh),(0,window.isNaN)(this.om)||(t.maxCount=this.om)),(0,window.isNaN)(this.Gl)||(t.interval=this.Gl)),t},t.g.Ie=function(e,i){var n=arguments[1];return t.A(n)?(this.set(n),!0):t.V.prototype.Ie.apply(this,arguments)},t.g.U=function(e,i){ht.u.U.call(this,e,i),(this.ll=e.explicit||null)&&(0,t.Pe)(this.ll,(function(t,e,i){i[e]=(0,window.parseFloat)(t)})),this.Nh=e.count||e.minCount||window.NaN,this.om=e.count||e.maxCount||window.NaN,this.Gl=e.interval||window.NaN,this.ll?this.Nh=this.om=this.Gl=window.NaN:this.Gl?this.Nh=this.om=window.NaN:(this.Nh=Math.ceil(t.N(this.Nh)),this.om=Math.ceil(t.N(this.om)),2<=this.Nh||(this.Nh=4),this.om>=this.Nh||(this.om=this.Nh))};var Qe=ht.prototype;Qe.interval=Qe.xba,Qe.count=Qe.count,Qe.set=Qe.set,Qe.get=Qe.get,t.H(ct,t.V),t.g=ct.prototype,t.g.ra=6,t.g.Ma=function(){return"geo"},t.g.IC=function(t){var e=this.jQ!=this.Ka||this.RJ!=this.Ba||this.lQ!=this.Za||this.cQ!=this.Ha;return e&&(this.Kc=!1,t||this.va(2)),e},t.g.rb=function(){return this.Bb?this.Bb.clone():t.kn(0,0,0,0)},t.g.Qf=function(t){return this.Bb=t,this.Kc=!1,this},t.g.wx=function(e){return this.ud||(this.ud=this.ol(),this.ud.vh="horizontal"),t.p(e)?(this.ud.N(e),this):this.ud},t.g.qz=function(e){return this.Uc||(this.Uc=this.ol(),this.Uc.vh="horizontal"),t.p(e)?(this.Uc.N(e),this):this.Uc},t.g.xx=function(e){return this.Od||(this.Od=this.ol(),this.Od.vh="vertical"),t.p(e)?(this.Od.N(e),this):this.Od},t.g.rz=function(e){return this.Hd||(this.Hd=this.ol(),this.Hd.vh="vertical"),t.p(e)?(this.Hd.N(e),this):this.Hd},t.g.li=function(e){t.X(e,2)&&(this.Kc=!1,this.va(2))},t.g.ol=function(){var e=new ht(this);return t.K(e,this.li,this),e},t.g.an=function(e){return t.p(e)?(e=t.P(e,1e3,!1),this.cl!=e&&(this.cl=e,this.Kc=!1,this.va(2)),this):this.cl},t.g.precision=function(e,i){if(0<arguments.length){var n=0;return e&&(t.A(e)?(1<e.length&&(i=t.N(e[1])),e=t.N(e[0])):1==arguments.length&&(i=e=t.N(e)),0==e||(0,window.isNaN)(e)||this.YE==e||(this.YE=e,n=2)),i&&(i=t.N(i))&&this.$E!=i&&(this.$E=i,n=2),this.va(n),this}return[this.YE,this.$E]},t.g.mq=function(e){return t.p(e)?(e=+e||0,this.P!=e&&(this.P=e,this.Of()&&(this.Kc=!1,this.va(2))),this):this.P},t.g.Bq=function(e){if(t.p(e)){e=t.Za(t.N(e),-180,180);var i=(0,window.isNaN)(e);return(i!=this.Sb||!i&&e!=this.i)&&(e>=this.D?this.yq(e):(this.Sb=i,this.i=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.i},t.g.yq=function(e){if(t.p(e)){e=t.Za(t.N(e),-180,180);var i=(0,window.isNaN)(e);return(i!=this.fb||!i&&e!=this.D)&&(e<=this.i?this.Bq(e):(this.fb=i,this.D=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.D},t.g.Cq=function(e){if(t.p(e)){e=t.Za(t.N(e),-90,90);var i=(0,window.isNaN)(e);return(i!=this.sb||!i&&e!=this.f)&&(e>=this.o?this.zq(e):(this.sb=i,this.f=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.f},t.g.zq=function(e){if(t.p(e)){e=t.Za(t.N(e),-90,90);var i=(0,window.isNaN)(e);return(i!=this.$a||!i&&e!=this.o)&&(e<=this.f?this.Cq(e):(this.$a=i,this.o=e,this.Kc=!1,i?this.va(4):this.va(2))),this}return this.pb(),this.o},t.g.Ne=function(e,i){if(t.p(e)||t.p(i)){var n=0;return t.p(e)&&(t.A(e)&&(1<e.length&&(i=e[1]),e=e[0]),this.bj!=e&&(this.bj=!!e,n=2)),t.p(i)?(i=!!i,this.yg!=i&&(this.yg=i,n=2)):1==arguments.length&&(e=!!e,this.yg!=e&&(this.yg=e,n=2)),this.va(n),this}return[ft(this),mt(this)]},t.g.Xc=function(t){for(var e=0;e<arguments.length-1;e+=2){var i=(0,window.parseFloat)(+arguments[e]),n=(0,window.parseFloat)(+arguments[e+1]);(0,window.isNaN)(i)||(0,window.isNaN)(n)||(i<this.fh&&(this.fh=i,this.Kc=!1),i>this.bg&&(this.bg=i,this.Kc=!1),n<this.nf&&(this.nf=n,this.Kc=!1),n>this.me&&(this.me=n,this.Kc=!1))}return this.Kc||this.va(2),this},t.g.oM=function(t){for(var e=arguments,i=0;i<e.length-1;i+=2){var n=+e[i],s=+e[i+1];if((0,window.isNaN)(n)&&(n=(0,window.parseFloat)(e[i])),(0,window.isNaN)(s)&&(s=(0,window.parseFloat)(e[i+1])),this.Ap){var a=Tt(this,n,s,null);this.Xc.apply(this,a)}n<this.Ka&&(this.Ka=n,this.Kc=!1),n>this.Ba&&(this.Ba=n,this.Kc=!1),s<this.Za&&(this.Za=s,this.Kc=!1),s>this.Ha&&(this.Ha=s,this.Kc=!1)}},t.g.Co=function(){this.Ap&&(this.fh=Number.MAX_VALUE,this.bg=-Number.MAX_VALUE,this.nf=Number.MAX_VALUE,this.me=-Number.MAX_VALUE),this.jQ=this.Ka,this.RJ=this.Ba,this.lQ=this.Za,this.cQ=this.Ha,this.Ka=Number.MAX_VALUE,this.Ba=-Number.MAX_VALUE,this.Za=Number.MAX_VALUE,this.Ha=-Number.MAX_VALUE,this.Kc=!1},t.g.Of=function(){return this.Sb&&(0,window.isNaN)(this.na)||this.sb&&(0,window.isNaN)(this.ea)||this.fb&&(0,window.isNaN)(this.ba)||this.$a&&(0,window.isNaN)(this.aa)},t.g.Bg=function(e){return this.Ap=!t.p(e)||e,this.cs||this.Co(),this.cs++,this},t.g.Hg=function(t){return!!(this.cs=Math.max(this.cs-1,0))||this.IC(!!t)},t.g.pb=function(){if(!this.Kc&&this.Bb){this.Kc=!0,this.dT();var e=[this.i,this.f],i=[this.D,this.o],n=this.wx().DB(e[0],i[0]);e=this.xx().DB(e[1],i[1]),this.qz().EB(this.wx().dk(),n[2],n[3]),this.rz().EB(this.xx().dk(),e[2],e[3]),this.ec=this.xq-this.cn,this.qc=this.bn-this.Aq,this.bz=this.D-this.i,this.Bu=this.o-this.f,this.ratio=Math.min(this.Bb.height/this.qc,this.Bb.width/this.ec),this.G=(this.Bb.width-this.ec*this.ratio)/2,this.K=(this.Bb.height-this.qc*this.ratio)/2,n=vt(this,this.i,!0),e=vt(this,this.D,!0),i=vt(this,this.f,!1);var s=vt(this,this.o,!1);this.cn=Math.min(n.cn,e.cn,i.cn,s.cn,n.xq,e.xq,i.xq,s.xq),this.xq=Math.max(n.cn,e.cn,i.cn,s.cn,n.xq,e.xq,i.xq,s.xq),this.Aq=Math.min(n.Aq,e.Aq,i.Aq,s.Aq,n.bn,e.bn,i.bn,s.bn),this.bn=Math.max(n.Aq,e.Aq,i.Aq,s.Aq,n.bn,e.bn,i.bn,s.bn),this.ec=this.xq-this.cn,this.qc=this.bn-this.Aq,this.bz=this.D-this.i,this.Bu=this.o-this.f,this.ratio=Math.min(this.Bb.height/this.qc,this.Bb.width/this.ec),this.G=(this.Bb.width-this.ec*this.ratio)/2,this.K=(this.Bb.height-this.qc*this.ratio)/2;t:{this.b||(this.b=t.qk()),n=(e=this.precision())[0],e=e[1],i=this.Bq(),s=this.yq();var a=this.Cq(),o=this.zq();if(this.b.clear(),this.fe&&C(this.fe.default.Pg)){var r=Ct(this,i,a,null);this.b.moveTo(r[0],r[1]),r=Ct(this,i,o,null),this.b.lineTo(r[0],r[1]),r=Ct(this,s,o,null),this.b.lineTo(r[0],r[1]),r=Ct(this,s,a,null),this.b.lineTo(r[0],r[1])}else{if(r=Ct(this,i,a,null),(0,window.isNaN)(r[0])||(0,window.isNaN)(r[1]))break t;this.b.moveTo(r[0],r[1]);for(var l=a;l<o;)r=Ct(this,i,l,null),this.b.lineTo(r[0],r[1]),l+=e;for(r=Ct(this,i,o,null),this.b.lineTo(r[0],r[1]),l=i;l<s;)r=Ct(this,l,o,null),this.b.lineTo(r[0],r[1]),l+=n;for(r=Ct(this,s,o,null),this.b.lineTo(r[0],r[1]),l=o;l>a;)r=Ct(this,s,l,null),this.b.lineTo(r[0],r[1]),l-=e;for(r=Ct(this,s,a,null),this.b.lineTo(r[0],r[1]),l=s;l>i;)r=Ct(this,l,a,null),this.b.lineTo(r[0],r[1]),l-=n}r=Ct(this,i,a,null),this.b.lineTo(r[0],r[1]),this.b.close()}}},t.g.dT=function(){var t=(this.fb?(0,window.isNaN)(this.ba)?this.bg:this.ba:this.D)-(this.Sb?(0,window.isNaN)(this.na)?this.fh:this.na:this.i),e=(this.$a?(0,window.isNaN)(this.aa)?this.me:this.aa:this.o)-(this.sb?(0,window.isNaN)(this.ea)?this.nf:this.ea:this.f);this.fb&&(this.D=(0,window.isNaN)(this.ba)?this.bg+t*this.P:this.ba),this.Sb&&(this.i=(0,window.isNaN)(this.na)?this.fh-t*this.P:this.na),this.$a&&(this.o=(0,window.isNaN)(this.aa)?this.me+e*this.P:this.aa),this.sb&&(this.f=(0,window.isNaN)(this.ea)?this.nf-e*this.P:this.ea),this.cn=this.Ka,this.Aq=this.Za,this.xq=this.Ba,this.bn=this.Ha},t.g.transform=function(t,e,i){return(t=Ct(this,t,e,i))[0]=t[0]*this.zoom+this.Dk,t[1]=t[1]*this.zoom+this.dn,t},t.g.Mc=function(e,i){return this.pb(),!this.Bb||(0,window.isNaN)(e)||(0,window.isNaN)(i)?[window.NaN,window.NaN]:(e=t.N(e),i=t.N(i),e=(e-this.Dk)/this.zoom,i=(i-this.dn)/this.zoom,Tt(this,+(ft(this)?this.Bb.cb()-this.G-e:e-this.Bb.left-this.G)/this.ratio+this.cn,-(mt(this)?this.Bb.Va()-this.K-i:i-this.Bb.top-this.K)/this.ratio+this.bn))},t.g.Lr=function(e){return this.pb(),e=t.N(e),e=t.Tm((e-this.i)/this.bz,3),ft(this)?1-e:e},t.g.Jp=function(e){return this.pb(),e=t.N(e),e=t.Tm((e-this.f)/this.Bu,3),mt(this)?1-e:e},t.g.F=function(){var t=ct.u.F.call(this);return t.type=this.Ma(),this.fb||(t.maximumX=this.D),this.$a||(t.maximumY=this.o),this.Sb||(t.minimumX=this.i),this.sb||(t.minimumY=this.f),t.precision=this.precision(),t.gap=this.mq(),t.xTicks=this.wx().F(),t.xMinorTicks=this.qz().F(),t.yTicks=this.xx().F(),t.yMinorTicks=this.rz().F(),(0,window.isNaN)(this.cl)||(t.maxTicksCount=this.cl),t},t.g.U=function(t,e){ct.u.U.call(this,t,e),this.Bq(t.minimumX),this.Cq(t.minimumY),this.yq(t.maximumX),this.zq(t.maximumY),this.precision(t.precision),this.mq(t.gap),this.wx(t.xTicks),this.qz(t.xMinorTicks),this.xx(t.yTicks),this.rz(t.yMinorTicks),this.an(t.maxTicksCount)},t.g.R=function(){t.sd(this.ud,this.Uc,this.Od,this.Hd),this.Hd=this.Od=this.Uc=this.ud=null,ct.u.R.call(this)};var ti=ct.prototype;ti.maxTicksCount=ti.an,ti.getType=ti.Ma,ti.gap=ti.mq,ti.xTicks=ti.wx,ti.xMinorTicks=ti.qz,ti.yTicks=ti.xx,ti.yMinorTicks=ti.rz,ti.extendDataRange=ti.Xc,ti.minimumX=ti.Bq,ti.maximumX=ti.yq,ti.minimumY=ti.Cq,ti.maximumY=ti.zq,ti.precision=ti.precision,kt.prototype.pop=function(){Ot(this,0,this.b.length-1);var t=this.b.pop();return $t(this,0),t},t.ja(Pt),Pt.prototype.Ma=function(){return"geo-json"},Pt.prototype.f=function(e){var i,n=[];switch(e.type){case"FeatureCollection":if(e.features){var s=e.features;for(e=0,i=s.length;e<i;e++){var a=s[e];n.push(Lt(this,a.geometry,a.properties))}}else t.il(10,"FeatureCollection object missing 'features' member.");break;case"GeometryCollection":if(e.geometries)for(s=e.geometries,e=0,i=s.length;e<i;e++)n.push(Lt(this,s[e],s[e].properties));else t.il(10,"GeometryCollection object missing 'geometries' member.");break;case"Feature":e.properties&&e.geometry?n.push(Lt(this,e.geometry,e.properties)):t.il(10,"Feature object missing 'properties' or 'geometry' member.");break;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":e.coordinates?n.push(Lt(this,e,null)):t.il(10,"Geometry object missing 'coordinates' member.");break;default:t.il(10,"GeoJSON object must be one of 'Point', 'LineString', 'Polygon', 'MultiPolygon', 'Feature', 'FeatureCollection' or 'GeometryCollection'.")}return n};var ei={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"};t.ja(Mt),Mt.prototype.Ma=function(){return"svg"},Mt.prototype.f=function(e){var i,n;this.i=t.z(e)?(new window.DOMParser).parseFromString(e,"text/xml"):e,this.b={};var s=0;for(i=(e=this.i.getElementsByTagName("defs")).length;s<i;s++){var a=e[s],o=t.Ze(a);for(a=0,n=o.length;a<n;a++){var r=o[a];if(t.af(r)){var l=r.getAttribute("id");this.b[l]||Nt(this,r)}}}return _t(this,this.i,null,null)},t.ja(Xt),Xt.prototype.Ma=function(){return"topo-json"},Xt.prototype.f=function(e){var i=[],n=Pt.Id();return t.Dc(e.objects,(function(s){s=function(e,i,n){return"GeometryCollection"===n.type?{type:"FeatureCollection",features:(0,t.Wa)(n.geometries,(function(t){return Jt(i,t)}),e)}:Jt(i,n)}(this,e,s),i.push.apply(i,n.f(s))}),this),i},Xt.prototype.reverse=function(t,e){for(var i,n=t.length,s=n-e;s<--n;)i=t[s],t[s++]=t[n],t[n]=i},t.g=Qt.prototype,t.g.stroke=function(e,i,n,s,a){if(t.p(e)){var o=t.Wb.apply(null,arguments);return o!=this.i&&(this.i=o,this.Y.B(16,1)),this}return this.i},t.g.fill=function(e,i,n,s,a,o,r){if(t.p(e)){var l=t.Ub.apply(null,arguments);return l!=this.f&&(this.f=l,this.Y.B(16,1)),this}return this.f},t.g.enabled=function(e){return t.p(e)?(e=!!e,this.b!=e&&(this.b=e,this.Y.B(16,1)),this):this.b},t.g.N=function(e){return t.p(e)&&(this.Y.ka(),t.da(e)||null===e?this.enabled(!!e):t.C(e)&&(this.stroke(e.stroke),this.fill(e.fill),this.enabled(e.enabled)),this.Y.da(!0)),this},t.g.F=function(){var t={};return t.fill=this.fill(),t.enabled=this.enabled(),t.stroke=this.stroke(),t};var ii=Qt.prototype;ii.stroke=ii.stroke,ii.fill=ii.fill,ii.enabled=ii.enabled,t.H(te,t.Mz);var ni={},si=5767168|t.QG;ni.connector={Fb:21,Kb:2,Lb:[t.RH,t.qH,{name:"eventHandler",Qb:"path",Yb:!0,Zb:null,ac:!1,Ib:!1,zIndex:0}],Ob:null,Jb:null,Cb:si},ni.marker={Fb:22,Kb:2,Lb:[t.RH,t.qH],Ob:null,Jb:null,Cb:1572864|t.QG},ni.bubble={Fb:23,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:si,Ab:"value",zb:"value"},ni.choropleth={Fb:24,Kb:2,Lb:[{name:"foreignFill",Qb:"none",Yb:"fill",Zb:"stroke",ac:!0,Ib:!1,zIndex:0},t.qH],Ob:null,Jb:null,Cb:si},te.prototype.fj=ni,t.Nz(te,te.prototype.fj);var ai={};t.sq(ai,[[0,"geoIdField",t.Cq],[0,"overlapMode",t.Uk],[0,"minZoomLevel",t.N],[0,"maxZoomLevel",t.N],[1,"selectPolygonMarqueeStroke",t.Pq],[1,"selectPolygonMarqueeFill",t.Qq],[0,"selectPolygonMarqueeMarker",t.Cq]]),t.U(te,ai),te.prototype.sa=268238864|t.Mz.prototype.sa,te.prototype.ra=1024|t.Mz.prototype.ra;var oi=100,ri={default:{crs:"wsg84",scale:1}},li=20,hi=1e-5;t.g=te.prototype,t.g.fO=0,t.g.uz=1,t.g.lq=1,t.g.Ek=null,t.g.Ma=function(){return"map"},t.g.uy=function(t){return this.axes().zm()[t]},t.g.wy=function(t){return this.axes().zm()[t]},t.g.$da=function(){if(!this.md){var e=this.O();if((e=e?e.Ja():null)&&this.dg()){e=e.Tl(),t.hd&&(e.style["-ms-touch-action"]="none"),t.DE||(t.DE=t.Me("textarea"),t.DE.setAttribute("readonly","readonly"),t.uf(t.DE,{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",left:0,top:0,width:"1px"}),window.document.body.appendChild(t.DE),t.Ld(t.DE,["focus","focusin","select"],(function(t){t.preventDefault()}))),this.wa("pointsselect",(function(e){t.DE.innerHTML=this.gd().g("copyFormat").call(e,e),t.DE.select()}),!1,this),this.Ag=new t.SC(t.DE),this.Ag.K=!0,this.Ag.P=!0,this.Ag.G=!0,this.Ag.aa=!0,this.Ag.Al("zoom_in",187,8),this.Ag.Al("zoom_out",189,8),this.Ag.Al("zoom_full_out",48,8),this.Ag.Al("zoom_in",187,2),this.Ag.Al("zoom_out",189,2),this.Ag.Al("zoom_full_out",48,2),this.Ag.Al("zoom_in",107,8),this.Ag.Al("zoom_out",109,8),this.Ag.Al("zoom_full_out",96,8),this.Ag.Al("zoom_in",107,2),this.Ag.Al("zoom_out",109,2),this.Ag.Al("zoom_full_out",96,2),this.Ag.Al("move_left",37),this.Ag.Al("move_right",39),this.Ag.Al("move_up",38),this.Ag.Al("move_down",40),this.Ag.Al("drill_up",8),this.Ag.Al("drill_up",27);var i,n,a=this.g("minZoomLevel"),o=this.g("maxZoomLevel");this.Ag.wa("shortcut",(function(e){if(this.qh.g("keyboardZoomAndMove")&&(!t.DE.ya||t.DE.ya==this)){var i=0;i=0,this.Jy=!0,this.Fl=100;var n=t.DE.ya.Fh();switch(e.identifier){case"zoom_in":n.Vr();break;case"zoom_out":n.Wr();break;case"zoom_full_out":n.Qm();break;case"move_up":i=10*n.Sg(),n.move(0,i);break;case"move_left":i=10*n.Sg(),n.move(i,0);break;case"move_down":i=-10*n.Sg(),n.move(0,i);break;case"move_right":i=-10*n.Sg(),n.move(i,0);break;case"drill_up":e=n.zf.Pd,t.Wm(n.Sg(),a)&&t.Wm(e.Jd,0)&&t.Wm(e.Fd,0)?(n.zf.oc(a,0,0,a,0,0),this.ay()):this.Cv||(n.si&&n.si.stop(),this.Bv(n,(function(){this.zD=!0,this.Fl=300,this.kj(a),this.Bv(this,(function(){this.zD=!1}))})))}}}),!1,this),this.gha=(0,t.pa)((function(e){if(!this.O())return!1;var i=t.Zj(this.O().Ja()),n=e.J1?e.kf:e,s=this.Fh();n=t.Za(1-n.deltaY/120,.7,2);var r=s.gd().g("zoomOnMouseWheel"),l=this.dg();return(l&&e.clientX>=l.left+i.x&&e.clientX<=l.left+i.x+l.width&&e.clientY>=l.top+i.y&&e.clientY<=l.top+i.y+l.height||!l)&&r&&!(1<n&&s.lq>=o||1>n&&s.lq<=a)}),this),this.Oy=new s(e,!1,this.gha),this.Oy.wa("mousewheel",(function(e){var i=this.Fh(),n=i.zf;this.Jy=!0;var s=t.Zj(this.O().Ja()),r=this.dg();if(r=r&&e.clientX>=r.left+s.x&&e.clientX<=r.left+s.x+r.width&&e.clientY>=r.top+s.y&&e.clientY<=r.top+s.y+r.height,this.qh.g("zoomOnMouseWheel")&&r&&!i.zD){r=t.Za(1-e.deltaY/120,.7,2),this.dJ=this.dK,this.dK=1<r||1==r&&!this.dJ,this.dJ!=this.dK&&i.si&&1==i.si.dc&&i.si.stop();var l=i.Sg();1>r&&t.Wm(l,a)&&!t.zb(n.Pd)?(n.oc(a,0,0,a,0,0),i.lq=a,i.zD=!1,i.si&&1==i.si.dc&&i.si.stop(),i.scale().zoom=a,dt(i.scale(),0,0),ee(i)):1<=r&&(t.Wm(l,o)||l>o)||1>=r&&(t.Wm(l,a)||l<a)||i.zoom(r,e.clientX-s.x,e.clientY-s.y,20)}}),!1,this),this.fW=function(e){if(this.O()&&this.O().Ja()){var i=t.Zj(this.O().Ja()),n=this.ob();if(n&&e.clientX>=n.left+i.x&&e.clientX<=n.left+i.x+n.width&&e.clientY>=n.top+i.y&&e.clientY<=n.top+i.y+n.height&&this.Jy){var s=t.Fe(t.ye(t.DE).b),a=s.scrollLeft,o=s.scrollTop;if(t.DE.select(),t.DE.ya=this,t.gd){var r=s.scrollLeft,l=s.scrollTop;(0,window.setTimeout)((function(){s.scrollLeft==r&&s.scrollTop==l&&t.ll.scrollTo(a,o)}),0)}else t.ll.scrollTo(a,o)}}},this.gW=function(e){if(this.qh.g("zoomOnDoubleClick")){var i=this.Fh(),n=t.Zj(this.O().Ja()),s=i.dg();s&&e.clientX>=s.left+n.x&&e.clientX<=s.left+n.x+s.width&&e.clientY>=s.top+n.y&&e.clientY<=s.top+n.y+s.height&&(this.Jy=!0,n=this.g("zoomFactor"),s=e.clientX,e=e.clientY,this.Fl=100,i.zoom(n,s,e))}},this.wI=function(){this.OJ=0,this.ey(),t.Yd(window.document,["pointermove","touchmove"],this.O6,!1,this)},this.hW=function(){this.Om||(t.Yd(window.document,"mousemove",this.bB,!1,this),t.Yd(window.document,"mouseup",this.cB,!1,this))},t.Ld(this.eg(),["drag","dragstart"],(function(){this.ON=!0}),!1,this),t.Ld(this.eg(),"dragend",(function(){this.ON=!1}),!1,this),t.Ld(e,"click",this.fW,!1,this),t.Ld(e,"dblclick",this.gW,!1,this),this.OJ=0,t.Ld(e,["pointerup","touchend"],this.wI,!1,this),this.wa("mousedown",(function(e){var s=t.Zj(this.O().Ja()),a=this.dg();a&&e.clientX>=a.left+s.x&&e.clientX<=a.left+s.x+a.width&&e.clientY>=a.top+s.y&&e.clientY<=a.top+s.y+a.height&&(this.Jy=!0,i=e.clientX,n=e.clientY,t.Ld(window.document,"mousemove",this.bB,!0,this),t.Ld(window.document,"mouseup",this.cB,!0,this))}),!1,this),this.bB=function(t){var e=this.Fh();this.qh.g("drag")&&1!=e.Sg()&&!this.ON&&(e.lk(),e.move(t.clientX-i,t.clientY-n),this.dispatchEvent("drag"),i=t.clientX,n=t.clientY)},this.cB=function(){if(this.FN){this.ey();for(var e=this.hb.length;e--;){var i=this.hb[e];21==i.bf.type&&(i.ZA=this.zf.Ig().clone(),i.B(1024,1),i.kz())}}t.Yd(window.document,"mousemove",this.bB,!0,this),t.Yd(window.document,"mouseup",this.cB,!0,this)},t.Ld(e,"mouseleave",this.hW,!1,this)}else(0,window.setTimeout)(this.c3,100)}},t.g.lk=function(){this.Om||(this.Om=!0,this.dispatchEvent("dragstart"))},t.g.ey=function(){this.Om&&(this.Om=!1,this.qh.g("drag")&&1!=this.Fh().Sg()&&!this.ON&&this.dispatchEvent("dragend"))},t.g.Vka=function(e){this.If(e),this.Jy=!1;var i=t.Zj(this.O().Ja()),n=this.dg();if(n&&e.clientX>=n.left+i.x&&e.clientX<=n.left+i.x+n.width&&e.clientY>=n.top+i.y&&e.clientY<=n.top+i.y+n.height){if(2==(n=(i=(e.gE||e).kf.kf).touches.length))e=i.touches[0],i=i.touches[1],this.OJ=t.gn(e.pageX,e.pageY,i.pageX,i.pageY),this.LJ=!1;else if(1==n){if(this.LJ=!0,this.RW=e,!this.u6){if(this.z6=this.wc.Ce(this,"touchstart",(function(t){1<t.gE.kf.kf.touches.length&&(this.LJ=!1)})),this.y6=this.wc.Ce(this,"touchmove",(function(){this.LJ=!1})),this.qh.g("drag")&&1!=this.Sg()){var s=(n=this.zf).ck();t.qb(n.rb(),s)&&i.preventDefault()}this.u6=!0,(0,window.setTimeout)(this.Wka,10)}this.k6=e.clientX,this.l6=e.clientY,this.Om=!0}else this.LJ=!1;t.Ld(window.document,["pointermove","touchmove"],this.O6,!1,this),t.Ld(window.document.body,["pointermove","touchmove"],(function(){return!1}),!1,this)}},t.g.Sj=function(t){this.nB||(this.FN=!1,this.RW=t,this.Sg()==this.g("minZoomLevel")?(0,window.setTimeout)(this.O$,0,t):this.f4||(this.w6=this.wc.Ce(this,"mousemove",(function(){this.FN=!this.ON})),this.f4=!0,(0,window.setTimeout)(this.tea,70)))},t.g.h2=function(){return this.sG||this},t.g.Eq=function(e){if("drill-down"==this.gd().g("selectionMode")){var i=this.Fh().pT();if(i){var n,s=t.so(e.domTarget);if(t.J(e.target,t.Pu)||t.J(e.target,t.dy)){(e=e.target.Zi()).aj&&e.aj()&&(n=e);var a=s}else t.J(e.target,t.Ww)||this.$q(e.target)?s&&(s.fg?(n=s.fg.X,a=s.fg.vd):(n=s.X,a=s.index)):(n=s&&s.X,a=t.ea(s.index)?s.index:e.pointIndex);n&&(i=i[s=n.ce(a).get("id")])&&(t.J(i,te)?this.jr(s,i):t.C(i)&&(this.VH[s]||(this.VH[s]=t.Xp(i)),this.jr(s,this.VH[s])))}}else te.u.Eq.call(this,e)},t.g.hg=function(e){var i,n=this.Fh(),s=n.gd().g("hoverMode"),a=t.so(e.domTarget),o=!1;if(t.J(e.target,t.Pu)||t.J(e.target,t.dy)){var r=e.target.Zi();r.aj&&r.aj()&&(i=r),r=a}else t.J(e.target,t.Ww)||n.$q(e.target)?(a&&(a.fg?(i=a.fg.X,r=a.fg.vd,t.A(r)&&!r.length&&(r=window.NaN)):(i=a.X,r=a.index)),o=!0):(i=a&&a.X,r=t.ea(a.index)?a.index:e.pointIndex);if(i&&!i.md&&i.enabled()&&t.D(i.Tg)&&(a=i.Tg(e))){var l=t.so(e.relatedDomTarget);l=t.N(t.C(l)?l.index:l),t.to(i,e.relatedTarget)&&l==r||!i.dispatchEvent(a)||"single"!=s||(0,window.isNaN)(r)&&!t.A(r)||(i.Md(),n.hA(),n.dispatchEvent(n.bl("hovered",e,[{X:i,vd:[],De:{index:t.A(r)?r[0]:r,Tf:0}}],!1,o)))}"single"==s||t.to(n,e.relatedTarget)||(n.Md(),n.hA(),n.zl&&n.dispatchEvent(n.bl("hovered",e,n.zl,!0,o)),n.zl=null)},t.g.Ih=function(t){this.FN||te.u.Ih.call(this,t)},t.g.O6=function(e){var i=e.kf,n=i.touches?i.touches.length:0;this.Jy=!1;var s=this.Fh(),a=s.zf;if(2==n){n=i.touches[0];var o=i.touches[1];i=t.gn(n.pageX,n.pageY,o.pageX,o.pageY),e=Math.min(n.pageX,o.pageX)+Math.abs(n.pageX-o.pageX)/2,n=Math.min(n.pageY,o.pageY)+Math.abs(n.pageY-o.pageY)/2;var r=25<Math.abs(i-this.OJ);o=this.g("minZoomLevel");var l=this.g("maxZoomLevel");this.qh.g("zoomOnMouseWheel")&&r&&(r=0<i-this.OJ?1.3:1/1.3,this.OJ=i,this.dJ=this.dK,this.dK=1<r||1==r&&!this.dJ,this.dJ!=this.dK&&s.si&&1==s.si.dc&&s.si.stop(),1>r&&t.Tm(s.Sg(),2)==o&&!t.zb(a.Pd)?(a.oc(o,0,0,o,0,0),s.lq=o,s.zD=!1,s.si&&1==s.si.dc&&s.si.stop(),s.scale().zoom=o,dt(s.scale(),0,0),ee(s)):1<r&&s.Sg()>=l||1>r&&s.Sg()<=o||(a=t.Of(this.O().ia()),s.zoom(r,e-a.left,n-a.top)))}else 1==n&&(this.Om&&this.qh.g("drag")&&1!=this.Sg()?(a=e.clientX-s.k6,i=e.clientY-s.l6,t.uf(window.document.body,"cursor","move"),s.move(a,i),s.k6=e.clientX,s.l6=e.clientY):t.uf(window.document.body,"cursor",""))},t.g.oq=function(e){if(t.J(e.target,t.Ww))return t.so(e.domTarget).vd;var i=this.lf||t.kn(0,0,0,0),n=e.clientX;e=e.clientY;var s=t.Zj(this.O().Ja());n-=s.x,e-=s.y,s=i.left;var a=i.top,o=i.width;if(i=i.height,n<s||n>s+o||e<a||e>a+i)return null;if(i=[],"by-spot"==(s=this.gd()).g("hoverMode")){var r=s.g("spotRadius");for(a=0,o=this.hb.length;a<o;a++){var l=this.hb[a];if(l.enabled()){var h=l.$(),c=[];h.reset();for(var u,d=window.Infinity;h.advance();)if(h.j("shape")){var p=h.j("x"),g=h.j("value");s=h.ma(),(p=t.gn(p,g,n,e))<=r&&(c.push(s),p<d&&(d=p,u=s))}c.length&&i.push({X:l,vd:c,Ln:c[c.length-1],De:{index:u,Tf:d}})}}}else this.gd().g("hoverMode");return i},t.g.mG=function(t,e){for(var i,n=[],s=0,a=t.length;s<a;s++){var o=t[s],r=o.X,l={series:r},h=r.$(),c=[];if(!e)for(var u=0;u<o.vd.length;u++){var d=o.vd[u];h.select(d)&&((i=(i=h.j("features"))&&i.length?i[0].properties:null)?(d={id:i[P(r)],index:h.ma(),properties:i},c.push(d)):c.push(d))}l.points=c,o.De?(d=o.De.index,h.select(d)&&(d={},(i=(i=h.j("features"))&&i.length?i[0].properties:null)?(d.id=i[P(r)],d.index=h.ma(),d.properties=i):d.index=h.ma()),o={point:d,distance:o.De.Tf}):o={index:window.NaN,distance:window.NaN},l.nearestPointToCursor=o,n.push(l)}return n},t.g.TL=function(e,i){var n=t.wr(this.Fh(),"colorRange");if(e=t.A(e)?e.length?e[0]:window.NaN:e,n&&n.target()&&!(0,window.isNaN)(e)){var s=n.target();if(s==i){var a=s.$();a.select(e),s=a.get(s.bf.El),t.aO(n,s)}}},t.g.hA=function(){var e=t.wr(this.Fh(),"colorRange");e&&e.enabled()&&t.bO(e)},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.ES=function(){return new T(this)},t.g.$O=function(e){var i=e.shiftKey||e.ctrlKey||e.metaKey,n=e.left,s=e.top,a=e.width;e=e.height;for(var o=0;o<this.hb.length;o++){var r=this.hb[o],l=r.ej()||this.gd().g("selectionMode");if("none"!=l){var h=t.CB(r,n,s,a,e);"single-select"==l&&(i=!1,h=h[0]),t.EB(r,h,i)}}},t.g.j6=function(e){var i=this.kja,n=this.ija,s=this.jja,a=this.g("selectPolygonMarqueeStroke"),o=this.g("selectPolygonMarqueeFill");if(this.Na){a=a||"red 0.5",o=o||"red 0.2";var r=this.g("selectPolygonMarqueeMarker")||{},l=t.Ub(r.fill||o),h=t.Wb(r.stroke||a);r=r.radius||15,this.xV=i,this.wV=n,this.WH=s,this.yk=[],this.Fy=window.Infinity,this.KD=-window.Infinity,this.Gy=window.Infinity,this.LD=-window.Infinity,this.Y2=!0,this.pN=r,this.f3=!!e,this.Dm||(this.Dm=this.Na.path(),this.ku=this.Na.path(),this.rp=this.Na.rn()),this.rp.parent(this.Na),this.rp.stroke(h),this.rp.fill(l),this.rp.zIndex(999),this.ku.parent(this.Na),this.ku.stroke(a,3,"3 3"),this.ku.zIndex(1e3),this.Dm.parent(this.Na),this.Dm.stroke(a),this.Dm.fill(o),this.Dm.zIndex(1e3),this.Na.wa("mousemove",this.L4,!0,this),this.Na.wa("dblclick",this.K4,!0,this),this.Na.wa("click",this.J4,!0,this),e=!0}else e=!1;return this.nB=e,this},t.g.L4=function(e){if(this.yk.length){var i=t.Zj(this.O().Ja()),n=e.clientX-i.x;for(e=e.clientY-i.y,i=t.jb(new t.gb(this.yk[0],this.yk[1]),new t.gb(n,e))<=this.pN,this.ku.clear(),i&&(this.ku.moveTo(n,e),this.ku.lineTo(this.yk[0],this.yk[1])),this.Dm.clear(),this.Dm.moveTo(this.yk[0],this.yk[1]),i=2;i<this.yk.length;i+=2)this.Dm.lineTo(this.yk[i],this.yk[i+1]);this.Dm.lineTo(n,e)}},t.g.J4=function(e){e.stopPropagation(),e.preventDefault();var i=t.Zj(this.O().Ja()),n=e.clientX-i.x;i=e.clientY-i.y,this.Fy=Math.min(n,this.Fy),this.KD=Math.max(n,this.KD),this.Gy=Math.min(i,this.Gy),this.LD=Math.max(i,this.LD),this.yk.push(n,i);var s=!1;2<this.yk.length&&(s=t.jb(new t.gb(this.yk[0],this.yk[1]),new t.gb(n,i))<=this.pN);var a=new t.I(this.Fy,this.Gy,this.KD-this.Fy,this.LD-this.Gy);s?(t.p(this.WH)&&this.WH.call(this,this.yk,a,e),this.f3?(ne(this),this.yk.length=0,this.KD=this.LD=-window.Infinity,this.Fy=this.Gy=window.Infinity):ie(this)):2==this.yk.length?(this.rp.To(n),this.rp.Uo(i),this.rp.Eb(this.pN),t.p(this.xV)&&this.xV.call(this,this.yk,a,e)):t.p(this.wV)&&this.wV.call(this,this.yk,a,e)},t.g.K4=function(e){var i=new t.I(this.Fy,this.Gy,this.KD-this.Fy,this.LD-this.Gy);this.WH&&this.WH.call(this,this.yk,i,e),this.f3?(ne(this),this.yk.length=0,this.KD=this.LD=-window.Infinity,this.Fy=this.Gy=window.Infinity):ie(this),e.stopPropagation(),e.preventDefault()},t.g.Eda=function(){return ie(this),this},t.g.kN=function(){return!!this.Y2},t.g.kja=function(t,e,i){return this.dispatchEvent(se("selectmarqueestart",t,e,i))},t.g.ija=function(t,e,i){return this.dispatchEvent(se("selectmarqueechange",t,e,i))},t.g.jja=function(n,s,a){var o=se("selectmarqueefinish",n,s,a);if(n=this.dispatchEvent(o)){var r=this.zf.Ig();for(s=o.polygon,a=0;a<s.length;a+=2)s[a]-=r.Jd,s[a]/=r.od,s[a+1]-=r.Fd,s[a+1]/=r.Le;var l=o.polygonBounds;for(l.left-=r.Jd,l.left/=r.od,l.top-=r.Fd,l.top/=r.Le,o=o.shiftKey||o.ctrlKey||o.metaKey,a=0;a<this.hb.length;a++){var h=(r=this.hb[a]).ej()||this.gd().g("selectionMode");if("none"!=h){for(var c=r,u=s,d=l,p=c.Ec(),g=[];p.advance();){var f,m=void 0,v=f=void 0,b=c,y=p,S=u,x=d,w=[],C=[];if(t.J(b.Rf,t.WA)&&(v=y.j(b.Rf.P)))for(m in v)if(y=v[m],t.J(y,t.Ag))if((0<=(b=t.yg(y)).segments.indexOf(4)||0<=b.segments.indexOf(3))&&(y.tJ(),b=t.yg(y)),0<(0,t.fda)(b.segments,1)){y=[];for(var T,D,k=0,$=T=window.Infinity,O=D=-window.Infinity,P=0;P<b.segments.length;P++){var L=b.count[P];if(y=y.concat(b.arguments.slice(k,k+2*L)),k+=2*L,P+1>=b.segments.length||1==b.segments[P+1]){for(L=0;L<y.length;L+=2)$=Math.min($,y[L]),O=Math.max(O,y[L]),T=Math.min(T,y[L+1]),D=Math.max(D,y[L+1]);L=[$,T,O,T,O,D,$,D],0<y.length&&t.bn(t.ln(x),L)&&(w.push(y),y=[])}}}else f=y.rb(),t.bn(t.ln(f),t.ln(x))&&w.push(b.arguments);else t.J(y,t.rg)?(b=y.Tp(),y=y.Eb(),w.push([b.x,b.y]),C.push({x:b.x,y:b.y,r:y})):w.push(t.ln(f));else v=y.j(b.Ah.zb+"X"),f=y.j(b.Ah.zb),b.Ah.zb==b.Ah.Ab?w.push([v,f]):(m=y.j(b.Ah.Ab+"X"),b=y.j(b.Ah.Ab),w.push([v,f,m,b,v,b,m,f]));for(v=!1,f=0;f<w.length;f++)for(m=w[f],b=0;b<m.length;b+=2){t:{if(y=m[b],k=m[b+1],$=window.Infinity,t.p(x)){if(y<x.tb()||y>x.cb()||k<x.Vb()||k>x.Va()){y=!1;break t}}else for(O=0;O<S.length;O+=2)$=Math.min($,S[O]);for(O=t.p(x)?{x:x.left-100,y:0}:{x:$,y:0},T=S.length-2,D=!1,$=0;$<S.length;$+=2)t.en(S[$],S[$+1],S[T],S[T+1],y,k,O.x,O.y)&&(D=!D),T=$;y=D}if(y){v=!0;break}}if(!(x=v)){for(f=!1,x=0;x<w.length;x++)if(!(4>(m=w[x]).length)){for(v=m.length-2,b=0;b<m.length;b+=2){for(y=S.length-2,k=0;k<S.length;k+=2){if(t.en(m[b],m[b+1],m[v],m[v+1],S[k],S[k+1],S[y],S[y+1])){f=!0;break}y=k}if(f)break;v=b}if(f)break}x=f}if(!x)for(x=!1,w=0;w<C.length;w++){for(m=C[w],v=S.length-2,f=0;f<S.length;f+=2){if($=S[f],k=S[f+1],y=S[v],O=S[v+1],v=m.x,b=m.y,y=new t.Fi($,k,y,O),($=v)instanceof t.gb?(k=$.y,$=$.x):k=b,O=y.Hj,T=y.ze,k=((Number($)-O)*(y.mi-O)+(Number(k)-T)*(y.Pe-T))/i(y),k=t.Za(k,0,1),y=new t.gb(e(y.Hj,y.mi,k),e(y.ze,y.Pe,k)),t.jb(y,new t.gb(v,b))<=m.r){x=!0;break}v=f}if(x)break}x&&g.push(p.ma())}c=g,"single-select"==h&&(o=!1,c=c[0]),t.EB(r,c,o)}}this.dispatchEvent({type:"pointsselect",points:this.NM(),seriesStatus:[]})}return n},t.g.JS=function(e,i){return this.xv||(this.xv=new t.cx,t.W(this,"crsAnimation",this.xv),t.K(this.xv,this.Oia,this)),t.p(e)?(this.xv.N.apply(this.xv,arguments),this):this.xv},t.g.Oia=function(){},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),t.K(this.Mb,this.Tz,this),this.B(524292,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=557072,n|=1,this.ow()),t.X(e,8)&&(i|=4,n|=8),t.X(e,2)&&(i|=524288,n|=8),this.B(i,n)},t.g.$q=function(e){return t.J(e,t.WN)},t.g.m0=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.eo[n];return a||((a=new it).kb(this),a.Ga(this.U0()),a.$c(),this.eo[n]=a,t.K(a,this.Gia,this),this.B(16777220,1)),t.p(s)?(a.N(s),this):a},t.g.Gia=function(e){var i=0,n=0;t.X(e,1)&&(i|=16777216,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.U0=function(e){return this.QS||(this.QS=t.zm("map.defaultCalloutSettings")),t.p(e)?(t.ra(this.QS,e),this):this.QS||{}},t.g.axes=function(e){if(!this.Rp){this.Rp=new et(this),t.W(this,"axesSettings",this.Rp),this.Rp.Kg(!0);for(var i=this.scale(),n=this.Rp.zm(),s=0;s<n.length;s++){var a=n[s];a.scale()!==i&&a.scale(i)}}return t.p(e)?(this.Rp.ga(!1,e),this):this.Rp},t.g.gO=function(e){var i=0;t.X(e,8)?i|=4:t.X(e,1)&&(i|=33554432),this.B(i,1)},t.g.PU=function(e){return this.yy||(this.yy=new ot(this),t.W(this,"gridsSettings",this.yy),this.yy.Kg(!0)),t.p(e)?(this.yy.ga(!1,e),this):this.yy},t.g.t4=function(){this.B(67108864,1)},t.g.mh=function(e){return this.$f||(this.$f=new st,t.W(this,"crosshair",this.$f),t.qA(this.$f,this),t.K(this.$f,this.fB,this)),t.p(e)?(this.$f.N(e),this):this.$f},t.g.fB=function(){this.B(134217728,1)},t.g.zM=function(t){return E(t)?15:30},t.g.VX=function(t){O(t,this.g("geoIdField")),this.wl&&(t.ss=this.wl),te.u.VX.call(this,t)},t.g.Gt=function(t,e){return new $(this,this,t,e,!0)},t.g.Ss=function(e){return t.zk(Ae,e,"choropleth")},t.g.FE=function(e){var i=0;if(t.X(e,32768)&&(i|=256),t.X(e,1)&&(i=32768,E(e.target)&&(i|=16)),t.X(e,1024)&&(i|=8388608),t.X(e,4)&&(i|=4194304),t.X(e,2048)&&(i=32),t.X(e,16)){i|=8422144,E(e.target)&&(i|=16);for(var n=this.hb.length;n--;)this.hb[n].B(4260356)}t.X(e,64)&&(i|=512,t.X(e,8)&&(i|=4)),t.X(e,128)&&(i|=524288,e=t.wr(this,"colorRange"))&&(e.ae(),e.B(e.se)),this.B(i,1)},t.g.ow=function(){for(var t=this.hb.length;t--;)this.hb[t].B(4)},t.g.Zz=function(e){return(e=e?e.path():t.qk()).eq(!0),e},t.g.v0=function(t){t.clear(),t.parent(null),t.Bl(),t.oc(1,0,0,1,0,0),delete t.tag},t.g.clear=function(){this.zf&&(re(this)?oe(this,this.zf):this.zf.clear()),this.zw.length=0},t.g.dg=function(){return this.lf},t.g.scale=function(e){return t.p(e)?(e&&t.J(e,ct)?this.qa!=e&&(this.qa&&t.kr(this.qa,this.yM,this),this.qa=e,t.K(this.qa,this.yM,this),this.B(65536,1)):(this.qa||(this.qa=new ct,this.qa.U(this.qa.oa,!0),t.K(this.qa,this.yM,this)),this.qa.N(e)),this):(this.qa||(this.qa=new ct,this.qa.U(this.qa.oa,!0),t.K(this.qa,this.yM,this)),this.qa)},t.g.yM=function(e){var i=0;t.X(e,4)&&(i|=65540),t.X(e,2)&&(i|=4),this.B(i,1)},t.g.Ra=function(){return null},t.g.bb=function(){return null},t.g.ux=function(e){return t.p(e)?(t.C(e)?(this.PJ&&!t.z(this.PJ)||(this.PJ=new Qt(this)),this.PJ.N(e)):this.PJ=t.zk(Ie,e,"hide"),this.B(16,1),this):this.PJ},t.g.ss=function(e){if(t.p(e)){if(t.z(e)&&!t.ec(e,"<")){this.xM=e;var i=e.split(".");e=t.ll;for(var n=0,s=i.length;n<s;n++)e=e[i[n]]}else this.xM=null;return this.An!=e&&(this.An=e,this.B(5095440,1)),this}return this.An},t.g.f1=function(e,i,n){var s=bt(this.scale(),e[i],e[i+1]);e=s[0],s=s[1],t.Gc(n,"coordinates")?n.ia.moveTo(e,s).lineTo(e,s):i?n.ia.lineTo(e,s):n.ia.moveTo(e,s)},t.g.aS=function(e,i,n){var s=this.TT;if(re(this.map))"image"==n.type||"text"==n.type?(e=t.mg().kW(n.cloneNode),s.oM(e.tb(),e.Vb(),e.cb(),e.Va())):"path"==n.type&&(this.map.lW||(this.map.lW=t.qk()),Bt(n.commands_tx?n.commands_tx:n.commands,this.map.lW),e=this.map.lW.rb(),s.oM(e.tb(),e.Vb(),e.cb(),e.Va()));else{if(this.V4){n=(e[i]-this.fe.ri)/this.fe.scale;var a=(e[i+1]-this.fe.jj)/this.fe.scale;this.U4&&(n=(a=this.U4.xj(n,a))[0],a=a[1]),a=this.V4.forward(n,a),e[i]=a[0]*this.fe.scale+this.fe.ri,e[i+1]=a[1]*this.fe.scale+this.fe.jj}s.oM(e[i],e[i+1])}},t.g.iT=function(t){return this==ge(this)?te.u.iT.call(this,t):t},t.g.mD=function(e){var i=e.clone();if(t.wr(this,"axesSettings")){var n=0,s=0,a=0,o=0;i=e.clone();for(var r,l=this.Rp.zm(),h=0;h<l.length;h++)if((r=l[h]).g("enabled")){r.ja(e);var c=r.yd(),u=e.left-c.left;n<u&&c.left&&(n=u),s<(u=e.top-c.top)&&c.top&&(s=u),a<(u=c.cb()-e.cb())&&c.cb()&&(a=u),o<(u=c.Va()-e.Va())&&c.Va()&&(o=u),r.B(4)}i.left+=n,i.top+=s,i.width-=n+a,i.height-=s+o}return i},t.g.pb=function(){var e,i=this.scale(),s=!1;if(this.J(262144)){var a=this.ss();if(null!=a){a=t.z(this.An)&&!t.ec(a,"<")?t.eq.maps[this.An]:this.An,t.z(a)&&t.ec(a,"<")||t.Oe(a)?this.jE=Mt.Id():"topology"===a.type.toLowerCase()?this.jE=Xt.Id():this.jE=Pt.Id(),this.rV=this.jE.f(a),t.qd(this.wl),this.wl=null,(s=a["ac-geoFieldId"])&&this.ta("geoIdField",s),this.Ek={};var o=(s=a["ac-tx"]||{}).default;o||(o=s.default=t.Qc(ri.default)),t.Dc(s||ri,(function(e,i){var s={};s.Pg=t.p(e.crs)?n(e.crs):o.Pg,s.wJ=s.Pg,s.Yo=w(s.Pg),s.h6=w(s.wJ),s.scale=e.scale||o.scale||1,s.ri=t.p(e.xoffset)?(0,window.parseFloat)(e.xoffset):0,s.jj=t.p(e.yoffset)?(0,window.parseFloat)(e.yoffset):0,t.p(e.heatZone)&&(s.eu=t.A(e.heatZone)?e.heatZone:t.nn(e.heatZone)),this.Ek[i]=s}),this),(s=a.scale)?ut(i,"minLon"in s?s.minLon:window.NaN,"maxLon"in s?s.maxLon:window.NaN,"minLat"in s?s.minLat:window.NaN,"maxLat"in s?s.maxLat:window.NaN):ut(i,window.NaN,window.NaN,window.NaN,window.NaN)}this.zf?this.clear():(this.zf=ae(this,this.Na),this.zf.zIndex(10),ge(this)==this&&this.c3()),re(this)&&!this.mx&&(this.mx=ae(this,this.zf)),this.ue||(this.ue=this.Na.Bd(),this.ue.zIndex(30)),s=!0,this.B(65540)}if(this.J(65536)){if(this.Ek){if(function(t,e){t.fe=e,t.Kc=!1}(i,this.Ek),this.zf){var r=this.zf.Pd;i.zoom=r.od,dt(i,r.Jd,r.Fd)}var l=this.Ek?this.Ek.default:null,h=!this.bA,c=null===this.Ht?l.wJ:this.Ht;r=!this.wl,this.eB=null,h&&this.Ht?this.eB=this.Ht:this.bA==l.Pg&&this.bA==c||h||re(this)||(this.eB=c);var u=!!this.eB&&!re(this);if(l.Pg!=this.eB&&l.wJ!=this.eB||t.wr(this,"crsAnimation")&&this.xv.g("enabled")){if(!C(l.wJ))var d=l.h6;u&&(e=w(this.eB))}var p=l.Yo;for(h&&(this.bA=c),u&&(this.dr&&1==this.dr.dc&&(this.dr.stop(),this.dr.ld(),this.dr=null),this.bA=this.eB,l.Pg=this.bA,l.Yo=w(l.Pg)),r?(a=this.rV,this.wl=[]):a=u?this.rV:this.wl,h=t.wr(this,"crsAnimation"),(this.dr&&this.dr.dc==t.rz||!this.dr)&&(h&&h.g("enabled")&&0<h.g("duration")&&!r&&u?(l.Yo=new lt(p,e),this.dr=new j(this,a,d,l,h.g("duration"),this!=this.Fh()),this.dr.Ce("end",(function(){this.map.dr.stop(),this.map.dr.ld(),this.fe.Yo=this.fe.Yo.cT}),!0,{map:this,fe:l}),this.dr.play()):(e=(0,t.pa)(this.aS,{fe:l,U4:d,V4:e,TT:this.scale(),map:this}),re(this),i.ka(),i.Bg(s),he(this,a,e,r,u),i.Hg(),i.da(!0),re(this)?(gt(i,!0),this.mx.parent(this.zf),this.mx.oc(1,0,0,1,0,0)):gt(i,!1))),e=-window.Infinity,d=window.Infinity,r=s=0,i=this.hb.length;i--;)(a=this.hb[i]).B(512,1),a.co(),e=Math.max(e,a.La("seriesMax")),d=Math.min(d,a.La("seriesMin")),s+=a.La("seriesSum"),r+=a.La("seriesPointsCount");for(u=s/r,i=0;i<this.hb.length;i++)(a=this.hb[i]).La("max",e),a.La("min",d),a.La("sum",s),a.La("average",u),a.La("pointsCount",r),(a=t.$b(a.stroke()))>this.Cr&&(this.Cr=a)}this.I(65536)}if(this.J(4194304)){if(e=this.g("geoIdField"),this.SH={},this.SH[e]={},this.wl){for(i=this.hb.length;i--;)a=this.hb[i],t.p(a.lD())&&a.lD()!=e&&(this.SH[a.lD()]={});for(i=0,a=this.wl.length;i<a;i++)e=this.wl[i],de(this,e,(function(t){var e=t.properties;if(e)for(var i in this.SH)i in e&&(this.SH[i][e[i]]=t)}),this)}this.I(4194304)}},t.g.RE=function(){te.u.RE.call(this,this.kg),this.yv().bs(pt(this.scale()))},t.g.Qh=function(e){ge(this);var i,n,s,a=this.g("maxZoomLevel"),o=this.g("minZoomLevel"),r=this.scale();if(this.pb(),this.J(32768)){for(i=this.hb.length;i--;){var l=this.hb[i];l.ka(),l.O(this.ue),E(l)&&l.pb(),l.da(!1)}this.wC={},t.Oz(this)}if(this.J(4)){for(i=0,s=this.eo.length;i<s;i++){var h=this.eo[i];h.B(4)}if(t.wr(this,"axesSettings"))for(i=0,s=(l=this.Rp.zm()).length;i<s;i++){var c=l[i];t.Yu(c.labels()),t.Yu(c.qb()),c.B(c.se)}if(t.wr(this,"gridsSettings"))for(i=0,s=(h=this.yy.zm()).length;i<s;i++)(l=h[i]).B(80);this.B(67108864),this.B(33554432),this.B(16777216)}if(this.J(524288)&&t.wr(this,"colorRange")){for(i=0,s=this.hb.length;i<s;i++)E(this.hb[i])&&(n=this.hb[i]);n&&(this.Mb.ka(),this.Mb.scale(n.kd()),this.Mb.target(n),this.Mb.kb(ge(this)),this.Mb.da(!1),this.B(4))}if(this.J(16777216))for(i=0,s=this.eo.length;i<s;i++)if(h=this.eo[i]){n=[];for(var u=0,d=0,p=(c=h.items()).length;d<p;d++)for(var g=c[d],f=0,m=this.hb.length;f<m;f++){l=this.hb[f];var v=(0,t.za)(l.GX,g);(l=-1!=v?l.ce(v):null)&&(n[u]=l,u++)}h.ka(),h.i=n,h.kb(ge(this)),h.O(this.Na),h.zIndex(60),h.da(!1)}if(h=this.zf,this.J(4)){if(this.Mb){this.Mb.ja(e.clone().round());var b=this.Mb.yd()}else b=e.clone();for(this.Na.clip(this.ob()),(e=t.C(this.ux())?t.$b(this.ux().stroke()):0)>this.Cr&&(this.Cr=e),b.left=b.left+this.Cr/2,b.top=b.top+this.Cr/2,b.width=b.width-this.Cr,b.height=b.height-this.Cr,e=b,s=this.eo,l=e.clone(),d=u=c=n=0,i=s.length;i--;)(p=s[i])&&p.enabled()&&(p.ja(e),"top"==(g=p.orientation())?(p=p.yd(),n=e.height-p.height):"bottom"==g?(p=p.yd(),c=e.height-p.height):"left"==g?(p=p.yd(),u=e.width-p.width):"right"==g&&(p=p.yd(),d=e.width-p.width));if(l.left+=u,l.top+=n,l.width-=d+u,l.height-=c+n,(e=this.mD(l).clone()).left+=this.Cr/2,e.top+=this.Cr/2,e.width-=this.Cr,e.height-=this.Cr,r.Qf(e),this.lf=e,t.wr(this,"axesSettings"))for(i=0,s=(l=this.Rp.zm()).length;i<s;i++)(c=l[i]).ae();if(this.zf&&this.Ek&&!this.Ek.default.ri&&this.zf.clip(pt(r)),this.clear(),re(this)&&(r.pb(),this.mx.parent(this.zf),this.mx.oc(1,0,0,1,0,0),this.mx.scale(r.ratio,r.ratio,0,0),r=bt(r,0,0),n=new t.Db(1,0,0,1,r[0],r[1]),t.wb(n,this.mx.Pd),this.mx.oc(n.od,n.We,n.gf,n.Le,n.Jd,n.Fd)),this.wl)for(e=re(this)?this.mx:this.zf,i=0,s=this.wl.length;i<s;i++)r=this.wl[i],ce(this,r,e);for(i=this.hb.length;i--;)(l=this.hb[i]).ja(this.lf),l.B(4,1);r=8388608,re(this)&&(r|=16),this.B(r)}if(this.J(2097152)){r=this.Sg(),i=this.uz*r;var y=(n=this.zf.Ig()).Jd,S=n.Fd;(!(r==o&&i<o||r==a&&i>a)&&h||this.Nr)&&(l=!(t.p(this.Dc)&&t.p(this.uc)),((0,window.isNaN)(this.Dc)||(0,window.isNaN)(this.uc))&&(c=(e=pt(this.scale()).ck()).top+e.height/2,s=(e.left+e.width/2-y)/n.od,e=(c-S)/n.Le,(0,window.isNaN)(this.Dc)&&(this.Dc=s),(0,window.isNaN)(this.uc)&&(this.uc=e)),e=1>this.uz,this.Nr||(i>a?(this.uz=a/this.Sg(),i=this.uz*r):i<o&&e&&(this.uz=o/this.Sg(),i=this.uz*r)),a=this.Fl||200,this.si&&this.si.dc!=t.rz||l||(this.aC=r,this.mQ=i,((e=t.Wm(this.aC,this.mQ,1e-5))&&this.oK||!e)&&this!=this.Fh()||ge(this).dispatchEvent(be(this,"zoomstart"))?(t.eq.ui.ContextMenu&&(e=this.contextMenu()).Oe()&&e.Lc(),l=(e=this.zf).rb(),s=(this.Dc-y)/this.aC,e=(this.uc-S)/this.aC,this.Nr||(s<l.left?s=l.left:s>l.cb()&&(s=l.cb()),e<l.top?e=l.top:e>l.Va()&&(e=l.Va())),this.si=new H(this,[r,y,S],[i,s*(1-this.aC),e*(1-this.aC)],a,this!=this.Fh()),this.si.play()):e&&(s=(e=(a=this.Fh()).zf.rb()).left+e.width/2,e=e.top+e.height/2,y=s*(1-a.lq),S=e*(1-a.lq),this.zf.oc(a.lq,0,0,a.lq,y,S),this.scale().zoom=a.lq,dt(this.scale(),y,S),ee(this)))),this.oK=!1,this.Fl=window.NaN,this.uz=1,this.I(2097152)}if(this.J(1048576)&&(this.Sg()!=o&&h&&(o=h.ck(),l=h.Xt(h.Ig()),y=this.C3?l.left+this.offsetX>=o.left&&0<this.offsetX||l.cb()+this.offsetX<=o.cb()&&0>this.offsetX?0:this.offsetX:l.left+this.offsetX>=o.left?o.left-l.left:l.cb()+this.offsetX<=o.cb()?o.cb()-l.cb():this.offsetX,S=this.C3?l.top+this.offsetY>=o.top&&0<this.offsetY||l.Va()+this.offsetY<=o.Va()&&0>this.offsetY?0:this.offsetY:l.top+this.offsetY>=o.top?o.top-l.top:l.Va()+this.offsetY<=o.Va()?o.Va()-l.Va():this.offsetY,y/=this.Sg(),S/=this.Sg(),this.offsetY=this.offsetX=0,y||S)&&(this.dia=!0,h.RF(1,0,0,1,y,S),n=h.Pd,dt(this.scale(),n.Jd,n.Fd),ee(this)),this.I(1048576)),this.J(33554432)){if(t.wr(this,"axesSettings"))for(l=this.Rp.zm(),i=0;i<l.length;i++)(c=l[i]).ka(),c.O(this.Na),c.W(),c.da(!1);this.I(33554432)}if(this.J(67108864)){if(t.wr(this,"gridsSettings"))for(i=0,s=(h=this.yy.zm()).length;i<s;i++)(l=h[i]).ka(),l.scale(this.scale()),l.O(this.Na),l.W(),l.da(!1);this.I(67108864)}if(this.J(134217728)&&((y=this.mh()).ka(),y.ja(b),y.O(this.Na),y.W(),y.da(!1),this.I(134217728)),this.J(16)){if("as-is"==(y=this.ux()))for(i=0,s=this.zw.length;i<s;i++)(b=this.zw[i]).visible(!0),b.Bl(),delete b.tag;else if(t.C(y)&&y.enabled())for(i=0,s=this.zw.length;i<s;i++)(b=this.zw[i]).visible(!0),b.Bl(),delete b.tag,t.J(b,t.pg)&&b.fill(y.fill()).stroke(y.stroke());else for(i=0,s=this.zw.length;i<s;i++)(b=this.zw[i]).visible(!1),b.Bl(),delete b.tag;this.ow(),this.B(32768),this.I(16)}if(this.J(32768)){for(i=this.hb.length;i--;)b=(l=this.hb[i]).Ma(),this.wC[b]=this.wC[b]||!l.pf(),l.ka(),l.kb(ge(this)),O(l,this.g("geoIdField")),l.W(),l.da(!1);this.I(32768)}if(this.J(8388608)&&(le(this),this.I(8388608)),this.J(524288)&&(t.wr(this,"colorRange")&&(this.Mb.ka(),this.Mb.O(this.Na),this.Mb.zIndex(50),this.Mb.W(),this.Mb.da(!1)),this.I(524288)),this.J(16777216)){for(i=0,s=this.eo.length;i<s;i++)(h=this.eo[i])&&(h.ka(),h.O(this.Na),h.zIndex(60),h.W(),h.da(!1));this.I(16777216)}},t.g.R6=function(e,i,n){var s=pe(this,e);if(s&&!re(this)){var a=s.ia.ck(),o=this.scale().Mc(a.left+a.width/2,a.top+a.height/2);e=(o=wt(this.scale(),o[0],o[1])[0])==this.Ek.default?this.Ek[e]={}:o,i/=this.Sg(),n/=this.Sg();var r=yt(this.scale(),a.left,a.top),l=yt(this.scale(),a.left+i,a.top+n);o=l[0]-r[0],r=l[1]-r[1],l=0;for(var h=s.polygones.length;l<h;l++){for(var c=s.polygones[l],u=c.outerPath,d=0;d<u.length-1;d+=2)u[d]+=o,u[d+1]+=r;for(c=c.holes,d=0;d<c.length-1;d+=2)c[d]+=o,c[d+1]+=r}e.ri=e.ri?e.ri+o:o,e.jj=e.jj?e.jj+r:r,a.left+=i,a.top+=n,i=yt(this.scale(),a.left,a.top),a=yt(this.scale(),a.left+a.width,a.top+a.height),e.eu=t.kn(i[0],i[1],Math.abs(a[0]-i[0]),Math.abs(a[1]-i[1])),this.B(65540,1)}return this},t.g.BT=function(e,i,n){var s=pe(this,e);if(s){var a=s.ia.ck(),o=this.scale().Mc(a.left+a.width/2,a.top+a.height/2);o=(o=wt(this.scale(),o[0],o[1])[0])==this.Ek.default?this.Ek[e]={}:o}if(t.p(i)||t.p(n)){if(s&&!re(this)){var r=o.jj||0;e=(o.ri||0)*this.scale().ratio,r*=this.scale().ratio,i=t.p(i)?i:e,n=t.p(n)?n:r,i/=this.Sg(),n/=this.Sg();for(var l=(i-e)/this.scale().ratio,h=(n-r)/this.scale().ratio,c=0,u=s.polygones.length;c<u;c++){for(var d=s.polygones[c],p=d.outerPath,g=0;g<p.length-1;g+=2)p[g]+=l,p[g+1]+=h;for(d=d.holes,g=0;g<d.length-1;g+=2)d[g]+=l,d[g+1]+=h}o.ri=o.ri?o.ri+l:l,o.jj=o.jj?o.jj+h:h,a.left+=i-e,a.top+=n-r,i=yt(this.scale(),a.left,a.top),a=yt(this.scale(),a.left+a.width,a.top+a.height),o.eu=t.kn(i[0],i[1],Math.abs(a[0]-i[0]),Math.abs(a[1]-i[1])),this.B(65540,1)}return this}return s?[o.ri*this.scale().ratio||0,o.jj*this.scale().ratio||0]:[window.NaN,window.NaN]},t.g.AT=function(e,i){var n=pe(this,e);if(n){var s=this.scale(),a=n.ia.rb(),o=s.Mc(a.left+a.width/2,a.top+a.height/2);o=(o=wt(s,o[0],o[1])[0])==this.Ek.default?this.Ek[e]={}:o}if(t.p(i)){if(n&&!re(this)){var r=t.N(i)||1,l=o.ri||0,h=o.jj||0,c=this.Ek.default.scale||ri.default.scale;c=o.scale?o.scale:c;var u=yt(s,a.left,a.top),d=yt(s,a.left+a.width,a.top+a.height),p=(d[0]-l)/c*r+l;d=(d[1]-h)/c*r+h,u=bt(s,(u[0]-l)/c*r+l,(u[1]-h)/c*r+h),d=bt(s,p,d),d=t.kn(u[0],u[1],Math.abs(d[0]-u[0]),Math.abs(d[1]-u[1])),u=yt(s,d.left+d.width/2,d.top+d.height/2),a=(p=yt(s,a.left+a.width/2,a.top+a.height/2))[0]-u[0],p=p[1]-u[1],u=yt(s,d.left,d.top),d=yt(s,d.left+d.width,d.top+d.height),u[0]+=a,u[1]+=p,d[0]+=a,d[1]+=p,s=0;for(var g=n.polygones.length;s<g;s++){for(var f=n.polygones[s],m=f.outerPath,v=0;v<m.length-1;v+=2)m[v]=(m[v]-l)/c*r+l+a,m[v+1]=(m[v+1]-h)/c*r+h+p;for(f=f.holes,v=0;v<f.length-1;v+=2)f[v]=(f[v]-l)/c*r+l+a,f[v+1]=(f[v+1]-h)/c*r+h+p}o.eu=t.kn(u[0],u[1],Math.abs(d[0]-u[0]),Math.abs(d[1]-u[1])),o.ri=o.ri?o.ri+a:a,o.jj=o.jj?o.jj+p:p,o.scale=r,this.B(65540,1)}return this}return n?o.scale||this.Ek.default.scale||1:window.NaN},t.g.zT=function(e,i){var n=pe(this,e);if(n){var s=this.scale(),a=n.ia.rb(),o=s.Mc(a.left+a.width/2,a.top+a.height/2);if(o=wt(s,o[0],o[1])[0],t.p(i)){if(!re(this)){n.ia.clear();var r=n.properties[this.g("geoIdField")],l=o==this.Ek.default?this.Ek[r]={}:o,h=l.Pg||this.Ek.default.Pg||ri.default.crs;o=w(h),r=w(i);for(var c=l.ri||0,u=l.jj||0,d=l.scale||this.Ek.default.scale||ri.default.scale,p=0,g=n.polygones.length;p<g;p++){for(var f=n.polygones[p],m=f.outerPath,v=0;v<m.length-1;v+=2){var b=(m[v]-c)/d,y=(m[v+1]-u)/d;b=o.xj(b,y),b=r.forward(b[0],b[1]),m[v]=b[0]*d+c,m[v+1]=b[1]*d+u,b=(y=bt(s,m[v],m[v+1]))[0],y=y[1],v?n.ia.lineTo(b,y):n.ia.moveTo(b,y)}for(f=f.holes,v=0;v<f.length-1;v+=2)b=(f[v]-c)/d,y=(f[v+1]-u)/d,b=o.xj(b,y),b=r.forward(b[0],b[1]),f[v]=b[0]*d+c,f[v+1]=b[1]*d+u,b=(y=bt(s,f[v],f[v+1]))[0],y=y[1],v?n.ia.lineTo(b,y):n.ia.moveTo(b,y)}for(u=n.ia.ck(),p=yt(s,u.left+u.width/2,u.top+u.height/2),c=(g=yt(s,a.left+a.width/2,a.top+a.height/2))[0]-p[0],d=g[1]-p[1],p=0,g=n.polygones.length;p<g;p++){for(m=(f=n.polygones[p]).outerPath,v=0;v<m.length-1;v+=2)m[v]+=c,m[v+1]+=d;for(f=f.holes,v=0;v<f.length-1;v+=2)f[v]+=c,f[v+1]+=d}n.ia.setPosition(a.left+a.width/2-u.width/2,a.top+a.height/2-u.height/2),u=n.ia.rb(),n=yt(s,u.left,u.top),s=yt(s,u.left+u.width,u.top+u.height),l.eu=t.kn(n[0],n[1],Math.abs(s[0]-n[0]),Math.abs(s[1]-n[1])),l.ri=l.ri?l.ri+c:c,l.jj=l.jj?l.jj+d:d,l.Pg=i,l.Yo=r,l.wJ=h,l.h6=o,this.B(65540,1)}s=this}else s=t.p(o.Pg)?o.Pg:this.Ek.default.Pg}else s=null;return s},t.g.Pg=function(e){return t.p(e)?(e=n(e),this.Ht!=e&&(this.Ht=e,this.B(65540,1)),this):this.Ht||this.bA||ri.default.crs},t.g.show=function(){this.Na.visible(!0)},t.g.Lc=function(){this.Na.visible(!1);var e=ge(this);e.zl&&(e.dispatchEvent(this.bl("hovered",{target:this},e.zl,!0,!0)),e.zl=null),e.gc("mousemove",e.QJ),(e=t.wr(this,"colorRange"))&&e.enabled()&&t.bO(e)},t.g.Fh=function(){return ge(this).sG},t.g.pT=function(e){return t.p(e)?(t.C(e)&&(this.by=e,this.VH&&t.Dc(this.VH,(function(t){t.ld()})),this.VH={}),this):this.by},t.g.Bv=function(e,i,n){var s=t.Ja(arguments,2);e.si?e.si.Ce("end",(function(){i.apply(this,s)}),!1,e):i.apply(e,s)},t.g.uA=function(){var e=ge(this),i=[new D(null,this,null,null)];return i.push.apply(i,t.Ja(e.It,0)),i},t.g.jr=function(e,i){var n=ge(this),s=this.Fh();if(i==s||n.Cv)return this;if(null===e||"null"==e)return ve(this,n,n.It.length),this;if(t.p(i))me(this,e,i);else if(this.by&&this.by[e])me(this,e,this.by[e]);else{for(s=n.It.length;s--;){var a=n.It[s];if(a.oy()==e){var o=a.Q1();break}}o?ve(this,o,n.It.length-1-s):t.kl(301,null,[e])}return this},t.g.ay=function(){var t=ge(this),e=this.Fh().wja;return!e||t.Cv?(t.Cv=!1,this):(ve(this,e),this)},t.g.Sg=function(){return this.lq},t.g.kj=function(e,i,n,s){return this.Nr||(e=t.Za(e,this.g("minZoomLevel"),this.g("maxZoomLevel"))),this.zoom(e/this.Sg(),i,n,s)},t.g.Sla=function(e,i){var n=this.Fh(),s=[];t.A(e)||(e=[e]);for(var a,o,r="",l=0,h=e.length;l<h;l++){var c=e[l];(o=pe(n,c))&&(r+=c+";",s.push(o))}if(s.length){c=n.zf.Ig();var u=this.AO&&r==this.AO&&this.zO&&function(t,e){return t==e||!!e&&t.od==e.od&&t.gf==e.gf&&t.Jd==e.Jd&&t.We==e.We&&t.Le==e.Le&&t.Fd==e.Fd}(c,this.zO);for(l=0,h=s.length;l<h;l++)o=(o=s[l]).ia,a?t.pb(a,u?o.rb():o.kr()):a=u?o.rb():o.kr();var d=c.od,p=c.Jd,g=c.Fd,f=(s=ye(n,a,void 0,u))[0],m=s[1],v=s[2];this.Bv(n,(function(){this.oK=!0,this.Fl=t.p(i)?i:(0,window.isNaN)(this.Fl)?500:this.Fl,u?(t.Wm(d,f,1e-5)?ge(this).dispatchEvent(be(this,"zoomstart"))&&(this.si=new H(this,[1,p,g],[1,p+m,g+v],this.Fl),this.si.play()):this.kj(this.g("minZoomLevel"),m,v,this.Fl),this.zO=this.AO=null):(t.Wm(d,f,1e-5)?ge(this).dispatchEvent(be(this,"zoomstart"))&&(this.si=new H(this,[1,p,g],[1,p+m,g+v],this.Fl),this.si.play()):this.kj(f,m,v,this.Fl),this.AO=r,this.si&&this.si.Ce("end",(function(){this.AO?this.zO=this.Fh().zf.Ig().clone():this.zO=null}),!1,this))}))}else t.kl(301,null,[e])},t.g.Vr=function(t){return this.zoom(this.g("zoomFactor"),void 0,void 0,t)},t.g.Wr=function(t){return this.zoom(1/this.g("zoomFactor"),void 0,void 0,t)},t.g.Qm=function(){return this.Cv||(this.si&&this.si.stop(),this.Bv(this,(function(){this.zD=!0,this.Fl=300;var t=this.Fh();t.kj(t.g("minZoomLevel")),this.Bv(this,(function(){this.zD=!1}))}))),this},t.g.zoom=function(e,i,n,s){if(t.p(e)){var a=0,o=0;if(t.p(s)&&(this.Fl=s),e=t.N(e),(this.Sg()==this.g("minZoomLevel")&&1>e||this.Sg()==this.g("maxZoomLevel")&&1<e)&&!this.Nr)return this;1!=e&&(this.uz=e,a=2097152,o=1),i=t.N(i),n=t.N(n),this.Dc==i&&this.uc==n||(this.Dc=i,this.uc=n,a=2097152,o=1),this.oK=!0,this.B(a,o)}return this},t.g.move=function(e,i){if(t.p(e)||t.p(i)){var n=0,s=0;t.p(e)&&(e=t.N(e),(0,window.isNaN)(e)||(this.offsetX=e,n=1048576,s=1)),t.p(i)&&(i=t.N(i),(0,window.isNaN)(i)||(this.offsetY=i,n=1048576,s=1)),this.B(n,s)}return this},t.g.transform=function(t,e){var i=this.scale().transform(t,e);return{x:i[0],y:i[1]}},t.g.Mc=function(t,e){var i=this.scale().Mc(t,e);return{x:i[0],long:i[0],y:i[1],lat:i[1]}},t.g.Ol=function(e,i){var n,s=[];if("default"==e){var a=0;for(n=this.hb.length;a<n;a++){var o=this.hb[a],r=o.kd(),l=o.qD(i);l.sourceUid=t.oa(this),l.sourceKey=o.id(),l.meta={scale:r},s.push(l)}}else if("categories"==e){if(this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.J(this.Mb.scale(),t.iz))r=this.Mb.scale(),o=this.Mb.target();else for(a=0,n=this.hb.length;a<n;a++)if(o=this.hb[a],t.J(o.kd(),t.iz)){r=o.kd();break}if(r)for(a=0,n=(l=r.sr()).length;a<n;a++){var h=l[a];"default"!==h.name&&s.push({text:h.name,iconEnabled:!0,iconType:"square",iconFill:h.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:a,meta:{X:o,scale:r,xe:h}})}}return s},t.g.Ms=function(t){return"default"==t||"categories"==t},t.g.zr=function(t,e){var i=t.j(),n=this.eg().g("itemsSourceMode");if("default"==n)n=t.Ki(),(n=this.ef(n))&&(n.enabled(!n.enabled()),n.enabled()?n.Zk():n.Md());else if("categories"==n){n=i.X;var s=i.scale;if(s&&n){var a=[];i=i.xe;for(var o=n.Ec();o.advance();){var r=o.get(n.bf.El);i==s.Dn(r)&&a.push(o.ma())}"single"==this.gd().g("hoverMode")?e.fg={X:n,vd:a}:e.fg=[{X:n,vd:a,Ln:a[a.length-1],De:{index:a[a.length-1],Tf:0}}]}}},t.g.wq=function(e,i){var n=e.j(),s=this.eg().g("itemsSourceMode");if("default"==s)s=e.Ki(),(!e||null!=s||(0,window.isNaN)(s))&&(s=this.ef(s))&&s.Zk();else if("categories"==s){s=n.X;var a=n.scale;if(a&&s){n=n.xe;for(var o=s.Ec(),r=[];o.advance();){var l=o.get(s.bf.El);n==a.Dn(l)&&r.push(o.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:r}:a.fg=[{X:s,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]),this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.aO(this.Mb,(n.start+n.end)/2)}}},t.g.vq=function(e,i){var n=e.j(),s=this.eg().g("itemsSourceMode");"default"==s?(n=e.Ki(),(!e||null!=n||(0,window.isNaN)(n))&&(n=this.ef(n))&&n.Md()):"categories"==s&&("single"==this.gd().g("hoverMode")&&(s=t.so(i.domTarget))&&(s.X=n.X),this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.bO(this.Mb))},t.g.Zj=function(e,i){var n=t.Ax(this);return t.kp(n.headers,n.data,i)};var ci={"select-submenu":{index:9,text:"Select points",iconClass:"ac ac-mouse-pointer",subMenu:{"select-polygon":{index:9.2,text:"Polygon",iconClass:"ac ac-pentagon",eventType:"anychart.startSelectPolygonMarquee",action:function(t){t.menuParent.j6(!1)}},"select-marquee":{index:9.3,text:"Marquee",iconClass:"ac ac-square",eventType:"anychart.startSelectMarquee",action:function(t){t.menuParent.AP(!1)}}}}};t.g=te.prototype,t.g.jx=function(e){var i={};return t.Sc(i,t.Sl(ci),e),i},t.g.ila=function(){return function(e,i,n){var s={type:"FeatureCollection",crs:i.crs||{type:"name",properties:{name:n.default["src-code"]}},features:[],"ac-tx":{}};for(t.Dc(n,(function(e,i){var n={};t.p(e.Pg)&&(n.crs=e.Pg),t.p(e.scale)&&(n.scale=e.scale),t.p(e.ri)&&(n.xoffset=e.ri),t.p(e.jj)&&(n.yoffset=e.jj),t.p(e.eu)&&(n.heatZone=e.eu.F()),s["ac-tx"][i]=n})),e=s.features,n=0;n<i.length;n++){for(var a=i[n],o={type:"Feature",properties:a.properties,geometry:{type:"MultiPolygon",coordinates:[]}},r=0;r<a.polygones.length;r++){for(var l=[],h=a.polygones[r],c=0;c<h.outerPath.length-1;c+=2)l.push([h.outerPath[c],h.outerPath[c+1]]);o.geometry.coordinates.push([l])}e.push(o)}return s}(Pt.Id(),this.wl,this.Ek)},t.g.U=function(e,i){te.u.U.call(this,e,i),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings),"defaultCalloutSettings"in e&&this.U0(e.defaultCalloutSettings),"colorRange"in e&&this.Qi().ga(!!i,e.colorRange),"unboundRegions"in e&&this.ux(e.unboundRegions),t.Iq(this,ai,e);var n,s=e.geoData;if(s&&this.ss(t.ec(s,"{")?JSON.parse(s):s),this.JS(e.crsAnimation),this.Pg(e.crs),e.geoScale){var a=new ct;a.N(e.geoScale),this.scale(a)}if("callouts"in e)for(var o=0,r=(s=e.callouts).length;o<r;o++)(a=s[o])&&this.m0(o,a);if("axesSettings"in e&&this.axes().ga(!!i,e.axesSettings),"gridsSettings"in e&&this.PU().ga(!!i,e.gridsSettings),"crosshair"in e&&this.mh(e.crosshair),r=e.colorScales,s={},t.C(r))for(n in r)r.hasOwnProperty(n)&&(o=r[n],a=t.z(o)?o:o.type,a="ordinal-color"===(a=String(a).toLowerCase())?t.jz():t.gz(),t.C(o)&&a.N(o),s[n]=a);if(r=e.series,t.A(r))for(n=0;n<r.length;n++)a=((o=r[n]).seriesType||this.g("defaultSeriesType")).toLowerCase(),(a=this.Ae(a,o.data))&&(a.N(o),t.C(o)&&"colorScale"in o&&(o=o.colorScale,t.ea(o)?a.kd(s[o]):(a=t.z(o)?o:o.type,(a=t.dt(a,null))&&t.C(o)&&a.N(o))));n=e.drillDownMap,t.C(n)&&(this.by={},t.Dc(n,(function(e,i){this.pT()[i]=t.Xp(e)}),this))},t.g.F=function(){var e,i=te.u.F.call(this);i.unboundRegions=t.z(this.ux())?this.ux():this.ux().F(),t.wr(this,"colorRange")&&(i.colorRange=this.Qi().F()),i.geoScale=this.scale().F(),t.Tq(this,ai,i),e=this.xM?this.xM:re(this)?t.z(this.An)?this.An:"#document"==this.An.nodeName?this.An.documentElement.outerHTML:this.An.outerHTML:JSON.stringify(this.An),t.p(e)&&(i.geoData=e),i.crsAnimation=this.JS().F(),t.C(this.Ht)?t.kl(8,null,["Map crs"]):this.Ht&&(i.crs=this.Ht),e=[];for(var n={},s=[],a=0;a<this.hb.length;a++){var o=this.hb[a],r=o.F();if(o=o.kd()){var l=t.oa(o);n[l]?r.colorScale=(0,t.za)(s,n[l]):(n[l]=o.F(),s.push(n[l]),r.colorScale=s.length-1)}e.push(r)}for(n=[],a=0,r=this.eo.length;a<r;a++)(o=this.eo[a])&&(n[a]=o.F());return n.length&&(i.callouts=n),e.length&&(i.series=e),s.length&&(i.colorScales=s),t.wr(this,"axesSettings")&&(i.axesSettings=this.axes().F()),t.wr(this,"gridsSettings")&&(i.gridsSettings=this.PU().F()),t.wr(this,"crosshair")&&(i.crosshair=this.mh().F()),this.by&&(i.drillDownMap={},t.Dc(this.by,(function(e,n){var s=t.J(e,te)?e.F():e;i.drillDownMap[n]=s}),this.by)),{map:i}},t.g.R=function(){if(t.sd(this.Ag,this.Oy,this.$f,this.Mb,this.eo,this.Rp,this.bga,this.xv,this.Dm,this.ku,this.rp),this.Mb=this.$f=this.Oy=this.Ag=null,this.eo.length=0,this.rp=this.ku=this.Dm=this.xv=this.bga=this.Rp=null,this.O()&&this.O().Ja()){var e=this.O().Ja().Tl();this.fW&&t.Yd(e,"click",this.fW,!1,this),this.gW&&t.Yd(e,"dblclick",this.gW,!1,this),this.wI&&t.Yd(e,"pointerup",this.wI,!1,this),this.wI&&t.Yd(e,"touchend",this.wI,!1,this),this.hW&&t.Yd(e,"mouseleave",this.hW,!1,this)}te.u.R.call(this)};var ui=te.prototype;t.E("anychart.mapModule.Chart.DEFAULT_TX",ri),ui.getType=ui.Ma,ui.geoData=ui.ss,ui.unboundRegions=ui.ux,ui.toGeoJSON=ui.ila,ui.toCsv=ui.Zj,ui.getSeries=ui.ef,ui.addSeries=ui.kl,ui.getSeriesAt=ui.Ai,ui.getSeriesCount=ui.tj,ui.removeSeries=ui.Ao,ui.removeSeriesAt=ui.Rn,ui.removeAllSeries=ui.Dp,ui.colorRange=ui.Qi,ui.callout=ui.m0,ui.axes=ui.axes,ui.grids=ui.PU,ui.crosshair=ui.mh,ui.palette=ui.cc,ui.markerPalette=ui.Nf,ui.hatchFillPalette=ui.ve,ui.getPlotBounds=ui.dg,ui.crsAnimation=ui.JS,ui.featureTranslation=ui.BT,ui.translateFeature=ui.R6,ui.featureScaleFactor=ui.AT,ui.featureCrs=ui.zT,ui.crs=ui.Pg,ui.transform=ui.transform,ui.inverseTransform=ui.Mc,ui.zoom=ui.zoom,ui.move=ui.move,ui.zoomToFeature=ui.Sla,ui.zoomTo=ui.kj,ui.getZoomLevel=ui.Sg,ui.getCurrentScene=ui.Fh,ui.fitAll=ui.Qm,ui.zoomIn=ui.Vr,ui.zoomOut=ui.Wr,ui.drillTo=ui.jr,ui.drillUp=ui.ay,ui.drillDownMap=ui.pT,ui.getDrilldownPath=ui.uA,ui.startSelectPolygonMarquee=ui.j6,ui.inPolygon=ui.kN,ui.cancelPolygonMarquee=ui.Eda,t.H(Se,t.iC),t.PG[23]=Se,Se.prototype.type=23,Se.prototype.Np=["id","long","lat","size"],Se.prototype.El="size",t.H(xe,t.JA),t.PG[24]=xe,t.g=xe.prototype,t.g.type=24,t.g.flags=516|t.dB,t.g.Np=["id","value"],t.g.Kh={foreignFill:"none",hatchFill:"path"},t.g.ug=function(e,i){var n=e.j("features");if(n)for(var s=0,a=n.length;s<a;s++){var o=n[s];t.p(o.ia)&&de(this.X.xc(),o,(function(n){var s=n.ia;if(s&&t.J(s,t.pg)){s.visible(!0),e.j("currentPointElement",n);var a=this.bd.ed(i,void 0,void 0,s),o=a.foreignFill;o&&(e.j("fill",o.fill()),e.j("stroke",o.stroke())),(a=a.hatchFill).pe(t.yg(s)),n.S2=a}}),this)}},t.H(we,t.JA),t.PG[21]=we,t.g=we.prototype,t.g.type=21,t.g.flags=512|t.dB,t.g.Np=["points"],t.g.Kh={path:"path",hatchFill:"path"},t.g.ug=function(e,i){var n=this.i(this.X,e,i),s=this.f(this.X,e,i),a={};a.eventHandler=10>n||10>s,a.path=!0,a.hatchFill=!0,a=this.bd.ed(i,a);var o=this.b(this.X,e,0),r=0,l=0,h=[],c=[],u=0,d=10>n||10>s,p=this.Be(),g=this.X.xc().scale();if((p=e.get(p[0]))&&t.A(p)){for(var f,m,v,b=[],y=[],S=0,x=p.length;S<x;S+=2){var w=t.N(p[S]);f=t.N(p[S+1]),m=(v=g.transform(f,w))[0],v=v[1],(0,window.isNaN)(m)||(0,window.isNaN)(v)||(b.push(m,v),y.push(w,f))}e.j("pointsWithoutMissing",y),w=b}else w=null;for(g=0,p=w.length;g<p;g+=2){var C;if(f=a.path,m=a.hatchFill,b=w[g],y=w[g+1],d&&(C=a.eventHandler),!(0,window.isNaN)(b)&&!(0,window.isNaN)(y)){if(0!=g){var T=(S=t.gn(r,l,b,y))/2*o;v=(r+b)/2;var D=(l+y)/2,k=t.Tm(t.cb(Math.atan(Math.abs(l-y)/Math.abs(r-b))),7);if(x=1,b<=r&&y<=l)var $=k-90;else b<=r&&y>=l?$=270-k:b>=r&&y>=l?($=k-90,x=-1):b>=r&&y<=l&&($=180-k+90,x=-1);v+=Math.cos(t.bb($))*T*1.2,T=D+Math.sin(t.bb($))*T*1.2,D=S/2*o,k=0<o?1:-1;var O=Math.abs(D)<S/4?S/4*k:Math.abs(D)>S/2?S/2*k:D,P=(0>o?90:-90)*x;P=t.bb($+P),D=v+Math.cos(P)*O,k=T+Math.sin(P)*O,P=(0>o?-90:90)*x,P=t.bb($+P),v+=Math.cos(P)*O,T+=Math.sin(P)*O,O=Ce(f,r,l,b,y,D,k,v,T,n,s,o,x,$),d&&Ce(C,r,l,b,y,D,k,v,T,20,20,o,x,$),m.pe(t.yg(f)),h.push.apply(h,O),c.push(S),u+=S}r=w[g],l=w[g+1]}}e.j("points",h).j("sumDist",u).j("connectorsDist",c)},t.H(Te,t.pC),t.PG[22]=Te,Te.prototype.type=22,Te.prototype.Np=["id","long","lat"],Te.prototype.WB=function(t,e){Te.u.WB.call(this,t,e);var i=t.j("shapes");this.bd.zt(e,i)},Te.prototype.ug=function(e,i){var n=this.bd,s=e.get(this.X.Be()[0]),a=this.nh(s,this.prevValue),o={};o[a.path]=!0,o[a.qe]=!0,e.j("names",a),n=n.ed(i,o,i),t.qC(this,e,i,n,a),this.prevValue=s},t.Wp.map=De,t.Wp.bubble=ke,t.Wp.choropleth=$e,t.Wp.connector=Oe,t.Wp.marker=Pe,t.Wp["seat-map"]=Le,t.E("anychart.map",De),t.E("anychart.bubbleMap",ke),t.E("anychart.choropleth",$e),t.E("anychart.connector",Oe),t.E("anychart.markerMap",Pe),t.E("anychart.seatMap",Le)}.call(this,$)),_.theme_pert||(_.theme_pert=1,function(t){var e=function(){return t.Wl(this.sourceColor,1.5)};t.ra(t.fa.anychart.themes.defaultTheme,{pert:{tooltip:{enabled:!1},horizontalSpacing:"15%",verticalSpacing:"25%",expectedTimeCalculator:function(){return void 0===this.duration?Math.round((this.optimistic+4*this.mostLikely+this.pessimistic)/6*100)/100:Number(this.duration)},background:{zIndex:0},milestones:{shape:"circle",size:"5%",normal:{labels:{enabled:!0,anchor:"left-top",vAlign:"middle",hAlign:"center",fontColor:"#fff",disablePointerEvents:!0,format:function(){return this.creator?this.index:this.isStart?"S":"F"}},fill:t.DN,stroke:"none"},hovered:{labels:{enabled:null,fontColor:"#fff",fontOpacity:1},fill:t.FN,stroke:e},selected:{labels:{enabled:null,fontWeight:"bold"},fill:"#333 0.85",stroke:"#333 0.85"},color:"#64b5f6",tooltip:{title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.creator?"Milestone - "+this.index:"Milestone - "+(this.isStart?"Start":"Finish")},format:function(){var t,e="";if(this.successors&&this.successors.length){for(e+="Successors:",t=0;t<this.successors.length;t++)e+="\n - "+this.successors[t].get("name");this.predecessors&&this.predecessors.length&&(e+="\n\n")}if(this.predecessors&&this.predecessors.length)for(e+="Predecessors:",t=0;t<this.predecessors.length;t++)e+="\n - "+this.predecessors[t].get("name");return e}}},tasks:{color:"#64b5f6",normal:{fill:t.DN,stroke:t.DN,dummyFill:t.DN,dummyStroke:function(){return{color:this.sourceColor,dash:"6 4"}},upperLabels:{enabled:!0,anchor:"center-bottom",vAlign:"bottom",hAlign:"center",fontSize:10,contColor:"#333",padding:{top:1,right:10,bottom:1,left:10},format:function(){return this.name}},lowerLabels:{enabled:!0,anchor:"center-top",vAlign:"top",hAlign:"center",fontSize:9,fontOpacity:.5,contColor:"#333",padding:{top:1,right:5,bottom:1,left:5},format:function(){return"t: "+t.vN(this.duration)}}},hovered:{fill:t.FN,stroke:e,upperLabels:{fontWeight:"bold"},lowerLabels:{fontWeight:"bold"}},selected:{fill:"#333 0.85",stroke:"#333 0.85",upperLabels:{fontWeight:"bold"},lowerLabels:{fontWeight:"bold"}},tooltip:{title:{enabled:!0},separator:{enabled:!0},titleFormat:function(){return this.name},format:function(){var e="Earliest start: "+t.vN(this.earliestStart)+"\nEarliest finish: "+t.vN(this.earliestFinish)+"\nLatest start: "+t.vN(this.latestStart)+"\nLatest finish: "+t.vN(this.latestFinish)+"\nDuration: "+t.vN(this.duration)+"\nSlack: "+t.vN(this.slack);return(0,window.isNaN)(this.variance)||(e+="\nStandard deviation: "+Math.round(100*this.variance)/100),e}}},criticalPath:{tasks:{tooltip:{title:{background:null}},color:"#e06666",normal:{lowerLabels:{},upperLabels:{}}},milestones:{tooltip:{title:{background:null}}}}}})}.call(this,$)),_.vml||(_.vml=1,function(t){var e=function(t){var e=Math.pow(10,6);return Math.round(t*e)/e},i=function(e,i,n,s,a){t.Dg.call(this,e,i,n,s,a)},n=function(e,i,n,s,a,o,r){t.Hj.call(this,e,i,n,i,i,o,r),this.b=s,this.f=a},s=function(e,i,n,s,a,o,r){o=null!=o?t.Za(o,0,1):1;var l=[];return(0,t.Pe)(e,(function(t){l.push(String(t.offset)+t.color+(t.opacity?t.opacity:null))})),l.join("")+o+i+n+s+a+(r?String(r.left)+r.top+r.width+r.height:"")},a=function(){t.gh.call(this);var e=window.document;c()||e.createStyleSheet().addRule("."+w,"behavior:url(#default#VML)");try{e.namespaces[x]||e.namespaces.add(x,S),this.f=function(e){return t.Me(x+":"+e,{class:w})}}catch(i){this.f=function(e){return t.Me(x+":"+e,{class:w,xmlns:"urn:schemas-microsoft.com:vml"})}}C&&(this.lc=this.ska)},o=function(e){return t.z(e)&&t.fc(e,"%")?(0,window.parseFloat)(e)+"%":(0,window.parseFloat)(String(e))+"px"},r=function(t){return 100*Math.round(t)},l=function(t,e){t[e]&&(t.cssText=t.cssText.replace(new RegExp("(^|; )("+e+": [^;]*)(;|$)","ig"),";"))},h=function(e,i){e.lc(i,"coordsize",r(1)+" "+r(1)),t.ph(e,i.style,{position:"absolute",left:o(0),top:o(0),width:o(1),height:o(1)})},c=function(){return!!t.ya(t.gk(),(function(t){return t.selectorText==="."+w}))},u=function(e,i){var n=e%90,s=t.bb(e),a=1,o=i.left+i.width/2,r=i.top+i.height/2,l=0>Math.sin(s)||180==e||360==e;return 90!=e&&270!=e||(n+=1e-6),180!=e&&(0>Math.tan(s)||90==e||270==e)&&(a=-1,n=90-n),n=t.bb(n),s=Math.tan(n),s=Math.sin(n)*(i.height/2-s*i.width/2)+Math.sqrt(Math.pow(i.width/2,2)*(1+Math.pow(s,2))),a*=Math.cos(n)*s,n=Math.sin(n)*s,l&&(a=-a,n=-n),{ei:new t.gb(Math.round(o-a),Math.round(r+n)),el:new t.gb(Math.round(o+a),Math.round(r-n))}},d=function(e,i){if(i.ei.x==i.el.x)var n=i.ei.x,s=e.y;else i.ei.y==i.el.y?(n=e.x,s=i.ei.y):(n=(i.ei.x*Math.pow(i.el.y-i.ei.y,2)+e.x*Math.pow(i.el.x-i.ei.x,2)+(i.el.x-i.ei.x)*(i.el.y-i.ei.y)*(e.y-i.ei.y))/(Math.pow(i.el.y-i.ei.y,2)+Math.pow(i.el.x-i.ei.x,2)),s=(i.el.x-i.ei.x)*(e.x-n)/(i.el.y-i.ei.y)+e.y);n=new t.gb(n,s),s=[t.Za(i.ei.x-i.el.x,-1,1),t.Za(i.ei.y-i.el.y,-1,1)];var a=[t.Za(i.ei.x-n.x,-1,1),t.Za(i.ei.y-n.y,-1,1)],o=[t.Za(i.el.x-n.x,-1,1),t.Za(i.el.y-n.y,-1,1)];return 0>(0==s[0]?(a[1]+o[1])*s[1]:(a[0]+o[0])*s[0])?-t.jb(i.ei,n):t.jb(i.ei,n)},p=function(e,i){t.od.call(this),this.b=e,this.i=i},g=function(e){delete e.b,t.Xe(e.oA),e.oA=null},f=function(e){t.Jj.call(this,e),this.f={},this.G={}},m=function(e,i,n){t.Yj.call(this,e,i,n)},v=function(e,i){t.Qh.call(this,e,i),this.Uc=null,this.Ha=!1,this.nf=null},b=function(t){var e=t.nf;return t=t.Ig(),!(null===e&&null===t||null!==e&&null!==t&&t.od==e.od&&t.gf==e.gf&&t.We==e.We&&t.Le==e.Le)},y=function(e){var i=e.Ha;e.Ha=e.xr();var n=!i&&e.Ha;i=i&&!e.Ha;var s=!e.Ja()||e.Ja().yf();s||e.Ja().suspend(),n?(e.Pb(1024),e.Pb(32),e.Pb(16384),e.Pb(4),e.Ta=new t.I(e.x(),e.y(),e.Yf,e.Jf)):i&&(e.Pb(1024),e.Pb(32),e.Pb(16384),e.Pb(4),e.Ta=e.Vm(e.Uc,{})),s||e.Ja().resume()};t.H(i,t.Dg),i.prototype.Sd=function(){var e=this.o(),i=e&&!e.yf();i&&e.suspend(),(0,t.Pe)(this.elements,(function(t){t.Pb(512)}),this),i&&e.resume()},t.E("acgraph.vml.Clip",i),t.H(n,t.Hj),t.H(a,t.gh),t.ja(a);var S="urn:schemas-microsoft-com:vml",x="any_vml",w="any_vml",C=t.sh.document&&t.sh.document.documentMode&&8<=t.sh.document.documentMode;t.g=a.prototype,t.g.Zn=null,t.g.mk=null,t.g.UJ=null,t.g.aB=null,t.g.Dr=null,t.g.CI=null,t.g.ska=function(t,e,i){t[e]=i},t.g.BS=function(){return t.Re(window.document,"div")},t.g.Xp=function(){this.aB=this.IS(),h(this,this.aB),this.aB.style.display="none",t.ph(this,this.aB,{filled:"true",fillcolor:"black",stroked:"false",path:"m0,0 l1,0 e"}),window.document.body.appendChild(this.aB),this.Zn=t.Me("DIV"),this.mk=t.Me("SPAN"),this.UJ=t.Me("SPAN"),window.document.body.appendChild(this.Zn),this.Zn.appendChild(this.UJ),this.Zn.appendChild(this.mk),t.uf(this.Zn,{position:"absolute",visibility:"hidden",left:0,top:0}),t.uf(this.UJ,{"font-size":"0px",border:"0 solid"}),this.UJ.innerHTML="a",this.b=t.Me("SPAN"),this.Zn.appendChild(this.b),t.uf(this.b,{"font-size":"0px",border:"0 solid"}),this.b.innerHTML="a",this.CI=t.Me("IMG"),t.uf(this.CI,{position:"absolute",left:0,top:0}),this.Zn.appendChild(this.CI),this.yp=t.Me("DIV"),this.Zn.appendChild(this.yp)},t.g.TN=function(e){return this.Zn||this.Xp(),this.lc(this.CI,"src",e),t.Of(this.CI)},t.g.measure=function(e,i){if(""==e)return new t.I(0,0,0,0);this.Zn||this.Xp(),t.Xe(this.Dr),this.Dr=this.wF(""),this.aB.appendChild(this.Dr);var n=null,s=0;if(" "==e)return t.jh(this,i);t.ec(e," ")&&(s+=n=t.jh(this,i).width),t.fc(e," ")&&(s+=n||t.jh(this,i).width),l(this.mk.style,"font-style"),l(this.mk.style,"font-variant"),l(this.mk.style,"font-family"),l(this.mk.style,"font-size"),l(this.mk.style,"font-weight"),l(this.mk.style,"letter-spacing"),l(this.mk.style,"text-decoration"),this.mk.style.cssText="",i.fontStyle&&(t.uf(this.mk,"font-style",i.fontStyle),t.uf(this.Dr,"font-style",i.fontStyle)),i.fontVariant&&(t.uf(this.mk,"font-variant",i.fontVariant),t.uf(this.Dr,"font-variant",i.fontVariant)),i.fontFamily&&(t.uf(this.mk,"font-family",i.fontFamily),t.uf(this.Dr,"font-family",i.fontFamily)),i.fontSize&&(t.uf(this.mk,"font-size",i.fontSize),t.uf(this.Dr,"font-size",i.fontSize)),i.fontWeight?(t.uf(this.mk,"font-weight",i.fontWeight),t.uf(this.Dr,"font-weight",i.fontWeight)):(t.uf(this.mk,"font-weight","normal"),t.uf(this.Dr,"font-weight","normal")),i.letterSpacing&&(t.uf(this.mk,"letter-spacing",i.letterSpacing),this.Dr.style["v-text-spacing"]="normal"==i.letterSpacing?"":i.letterSpacing),i.er&&(t.uf(this.mk,"text-decoration",i.decoration),t.uf(this.Dr,"text-decoration",i.decoration)),t.uf(this.mk,"border","0 solid"),this.lc(this.Dr,"string",e),n=t.Of(this.aB).width,t.uf(this.Zn,{left:0,top:0,width:"auto",height:"auto"}),this.mk.innerHTML=e;var a=t.Of(this.UJ);return t.Cf(this.Zn,0,-(a.top+a.height)),(a=t.Of(this.mk)).width=n+s,--a.left,this.mk.innerHTML="",a},t.g.kW=function(e){return this.Zn||this.Xp(),t.z(e)?this.yp.innerHTML=e:(e=e.cloneNode(!0),this.yp.appendChild(e)),e=t.Of(this.yp),this.yp.innerHTML="",e},t.g.D4={1:"m",2:"l",3:"c",4:"ae",5:"x"},t.g.W4=function(e,i){var n=i[2]+i[3];e.push(r(i[4]-t.db(n,i[0])),r(i[5]-t.eb(n,i[1])),r(i[0]),r(i[1]),Math.round(-65536*i[2]),Math.round(-65536*i[3]))},t.g.c5=function(e,i){t.kd(Array.prototype.push,(0,t.Wa)(i,r),e)},t.g.P0=function(){return t.Me("div",{style:"overflow:hidden;position:relative;"})},t.g.hP=function(e,i,n){t.ph(this,e.style,{width:o(i),height:o(n)})},t.g.AS=a.prototype.BS,t.g.Wo=a.prototype.BS,t.g.J0=function(){return this.f("image")},t.g.D0=function(){return this.f("shape")},t.g.M0=function(){return this.f("shape")},t.g.H0=function(){return this.f("shape")},t.g.K0=function(){return this.f("fill")},t.g.I0=a.prototype.BS,t.g.L5=t.ia,t.g.R5=t.ia,t.g.O5=function(e){t.ph(this,e.ia().style,{position:"absolute",left:o(0),top:o(0),width:o(1),height:o(1)})},t.g.M5=function(e){var i=e.ck(),n=e.ia(),s=e.src()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",a=e.align();if(a==t.$g){a=i.left;var r=i.top,l=i.width,h=i.height}else{l=(h=this.TN(s)).width/i.width,r=h.height/i.height;var c=e.jD()==t.ah;switch(r=1/((1<l&&1<r||1>l&&1>r?c?l>r:l<r:c?1<l:1>l)?l:r),l=h.width*r,h=h.height*r,a){case t.$g:a=i.width,r=i.height;break;case"x-min-y-min":a=i.left,r=i.top;break;case"x-mid-y-min":a=i.left+i.width/2-l/2,r=i.top;break;case"x-max-y-min":a=i.left+i.width-l,r=i.top;break;case"x-min-y-mid":a=i.left,r=i.top+i.height/2-h/2;break;default:case"x-mid-y-mid":a=i.left+i.width/2-l/2,r=i.top+i.height/2-h/2;break;case"x-max-y-mid":a=i.left+i.width-l,r=i.top+i.height/2-h/2;break;case"x-min-y-max":a=i.left,r=i.top+i.height-h;break;case"x-mid-y-max":a=i.left+i.width/2-l/2,r=i.top+i.height-h;break;case"x-max-y-max":a=i.left+i.width-l,r=i.top+i.height-h}}t.ph(this,n.style,{position:"absolute",left:o(a),top:o(r),width:o(l),height:o(h)}),this.lc(n,"src",s),e.clip(i)},t.g.H5=function(t){this.KX(t)},t.g.KX=function(e){var i=e.ia();h(this,i);var n=e.To(),s=e.Uo(),a=e.Xr(),o=e.zx(),l=e.Ig();l&&!t.zb(l)?(s=(n=t.tb(n,s,a,o,0,360,!1)).length,l.transform(n,0,n,0,s/2),l=["m",r(n[s-2]),r(n[s-1]),"c"],t.kd(Array.prototype.push,(0,t.Wa)(n,r),l)):l=["ae",r(n),r(s),r(a),r(o),0,-23592960],l.push("x"),t.jg(e,4),t.jg(e,256),this.lc(i,"path",l.join(" "))},t.g.OX=function(e){var i=e.ia();h(this,i);var n=t.rh(this,e,!0);n?this.lc(i,"path",n):(this.lc(i,"path","M 0,0"),i.removeAttribute("path")),t.jg(e,4),t.jg(e,256)},t.g.IS=function(){var t=this.f("shape"),e=this.f("path");return e.setAttribute("textpathok","t"),t.appendChild(e),t},t.g.Vx=function(){return t.Re(window.document,"span")},t.g.wF=function(t){var e=this.f("textpath");return e.setAttribute("on","t"),e.setAttribute("string",t),e},t.g.I5=function(t,e){var i=t.ia();i&&(i.style.cursor=e||"")},t.g.PX=function(e){var i=e.ia().style;if(e.xr()){if(!e.path()){var n=e.$a;e.b.length&&(n-=e.b[0].f);var s=e.aa;t.ph(this,i,{position:"absolute",overflow:"visible",left:o(s),top:o(n)})}}else s=e.x(),n=e.y(),e.vAlign()&&e.height()&&e.height()>e.D&&("middle"==e.vAlign()&&(n+=e.height()/2-e.D/2),"bottom"==e.vAlign()&&(n+=e.height()-e.D)),t.ph(this,i,{position:"absolute",overflow:"hidden",left:o(s),top:o(n)})},t.g.QX=function(e){var i=e.ia(),n=i.style;i.style.cssText="",e.xr()?(e.path()||t.ph(this,n,{width:o(1),height:o(1)}),i.innerHTML=""):null!=e.Uc&&(e.fontSize()&&t.uf(i,"font-size",e.fontSize()),e.color()&&t.uf(i,"color",e.color()),e.fontFamily()&&t.uf(i,"font-family",e.fontFamily()),e.fontStyle()&&t.uf(i,"font-style",e.fontStyle()),e.fontVariant()&&t.uf(i,"font-variant",e.fontVariant()),e.fontWeight()&&t.uf(i,"font-weight",e.fontWeight()),e.letterSpacing()&&t.uf(i,"letter-spacing",e.letterSpacing()),e.er()&&t.uf(i,"text-decoration",e.er()),e.opacity()&&(n.filter="alpha(opacity="+100*e.opacity()+")"),e.lineHeight()&&t.uf(i,"line-height",e.lineHeight()),e.textIndent()&&t.uf(i,"text-indent",e.textIndent()),"..."==e.textOverflow()&&t.uf(i,"text-overflow","ellipsis"),""==e.textOverflow()&&t.uf(i,"text-overflow","clip"),e.direction()&&t.uf(i,"direction",e.direction()),t.uf(i,"word-break",e.Xu()),t.uf(i,"word-wrap",e.wordWrap()),null!=e.width()?t.uf(this.b,"white-space","normal"):t.uf(this.b,"white-space","nowrap"),e.Bm()&&(i.style["text-align"]=e.K?"end"==e.Bm()||"left"==e.Bm()?"left":e.Bm()==t.Ph||"right"==e.Bm()?"right":"center":"end"==e.Bm()||"right"==e.Bm()?"right":e.Bm()==t.Ph||"left"==e.Bm()?"left":"center"),t.Sf(i,!e.Hm()),i.innerHTML=e.Uc,this.lc(n,"width",String(e.width()?o(e.width()):e.rb().width)),this.lc(n,"height",String(e.height()?o(e.height()):e.rb().height)))},t.g.IZ=function(e){var i=e.ia(),n=e.parent().path();if(n){var s=t.qk();s.pe(t.yg(n)),e.i&&s.translate(e.mo,e.um),e=n?t.rh(this,s,!0):"m "+r(e.x)+","+r(e.y)+" l "+(r(e.x)+1)+","+r(e.y)+" e",i.setAttribute("path",e)}},t.g.JZ=function(e){var i=e.parent(),n=i.style(),s=e.b,a=e.ia();n=t.Qc(n),t.Sc(n,s),e=this.wF(e.text),n.fontStyle&&t.uf(e,"font-style",n.fontStyle),n.fontVariant&&t.uf(e,"font-variant",n.fontVariant),n.fontFamily&&t.uf(e,"font-family",n.fontFamily),n.fontSize&&t.uf(e,"font-size",n.fontSize),n.fontWeight&&t.uf(e,"font-weight",n.fontWeight),n.letterSpacing&&(e.style["v-text-spacing"]="normal"==n.letterSpacing?"":n.letterSpacing),n.decoration&&t.uf(e,"text-decoration",n.decoration),n.hAlign&&(e.style["v-text-align"]=i.K?"end"==n.hAlign||"left"==n.hAlign?"left":n.hAlign==t.Ph||"right"==n.hAlign?"right":"center":"end"==n.hAlign||"right"==n.hAlign?"right":n.hAlign==t.Ph||"left"==n.hAlign?"left":"center"),n.opacity&&(s=this.f("fill"),this.lc(s,"opacity",n.opacity),a.appendChild(s)),a.appendChild(e),i.Hm()?a.removeAttribute("unselectable"):this.lc(a,"unselectable","on"),h(this,a),a.setAttribute("filled","t"),a.setAttribute("fillcolor",n.color),a.setAttribute("stroked","f"),i.ia().appendChild(a)},t.g.l4=function(){return!0},t.g.R_=function(e){var i=e.fill();t.J(i,t.Qb)&&(i="black");var a,o=e.stroke();a=t.z(o)?o:"keys"in o?0!=o.keys.length?o.keys[0].color:"#000":o.color;var r=!t.z(i)&&"keys"in i&&"cx"in i&&"cy"in i,l=!t.z(i)&&"keys"in i&&!r,h=!r&&!l,c="none"!=i&&"none"!=i.color,g="none"!=a&&0!=o.thickness,f=h&&c&&1!=i.opacity,m=!t.z(o)&&g&&(1!=o.opacity||"miter"!=o.lineJoin||"butt"!=o.lineCap||"none"!=o.dash);if(r||l||f||m){f=(m=e.Ja()).vn;var v=t.J(e,t.Ag)&&e.Uj()?new t.I(0,0,1,1):e.rb();if(l){var b=t.J(i.mode,t.I),y=t.Ja(i.keys,0);0!=y[0].offset&&y.unshift({offset:0,color:y[0].color,opacity:y[0].opacity});var S=y[y.length-1];1!=S.offset&&y.push({offset:1,color:S.color,opacity:S.opacity});var x=i.mode?t.oh(i.angle,v):i.angle;v=t.Ji(f,b?function(e,i,n,s){var a=u(n,s);s=t.jb(a.ei,a.el);var o=u(n,i);i=t.jb(o.ei,o.el),n=d(a.ei,o),a=d(a.el,o),o={offset:Math.round(n/i*100)/100,color:"",opacity:1};var r,l,h,c={offset:Math.round(a/i*100)/100,color:"",opacity:1},p=[];for(p.toString=function(){for(var t="\n",e=0,i=this.length;e<i;e++)t+="offset: "+this[e].offset+"; color: "+this[e].color+"; opacity: "+this[e].opacity+"\n";return t},p.push(o),h=0;h<e.length;h++){var g=e[h];g.color=t.Bl(g.color).vk,g.offset<=o.offset?r={offset:g.offset,color:g.color,opacity:g.opacity}:g.offset>o.offset&&g.offset<c.offset?p.push({offset:g.offset,color:g.color,opacity:g.opacity}):g.offset>=c.offset&&!l&&(l={offset:g.offset,color:g.color,opacity:g.opacity})}if(p.push(c),e=g=1,2<p.length){r||(r=p[1]),h=i*r.offset;var f=Math.abs(i*p[1].offset-h),m=t.Cl(String(r.color)),v=t.Cl(String(p[1].color));g-=0==f?0:Math.abs(n-h)/f,o.color=t.Tb(t.Hl(m,v,g)),l||(l=p[p.length-2]),f=i*l.offset,h=i*p[p.length-2].offset,g=Math.abs(h-f),f=t.Cl(String(p[p.length-2].color)),m=t.Cl(String(l.color)),e-=0==g?0:Math.abs(a-h)/g,c.color=t.Tb(t.Hl(f,m,e))}else r||0!=l.offset||(r=l),l||1!=r.offset||(l=r),h=i*r.offset,f=i*l.offset,m=t.Cl(String(r.color)),v=t.Cl(String(l.color)),g-=0==(f=Math.abs(f-h))?0:Math.abs(n-h)/f,e-=0==f?0:Math.abs(a-h)/f,o.color=t.Tb(t.Hl(m,v,g)),c.color=t.Tb(t.Hl(m,v,e));for(o.opacity=r.opacity,c.opacity=l.opacity,h=0;h<p.length;h++)p[h].offset=0==h?0:h==p.length-1?1:Math.abs(n-p[h].offset*i)/s;return p}(y,i.mode,x,v):y,i.opacity,x,i.mode)}else if(r){if(i.mode){var w=i.mode;S=Math.min(w.width,w.height),x=(i.cx*w.width-(v.left-w.left))/v.width,y=(i.cy*w.height-(v.top-w.top))/v.height,w=S/v.width,v=S/v.height}else x=i.cx,y=i.cy,w=v=1;v=function(e,i,a,o,r,l,h,c){var u=s(i,a,o,r,l,h,c=null!=c?c:null);return t.Gc(e.G,u)?e.G[u]:e.G[u]=new n(i,a,o,r,l,h,c)}(f,i.keys,x,y,w,v,i.opacity,i.mode)}else v=i;if(x=function(e,i,n){var a="";if(a=t.z(i)?a+(i+"1"):t.J(i,t.Hj)?s(i.keys,i.Dc,i.uc,i.b,i.f,i.opacity,i.Ta):t.J(i,t.Fj)?t.Gj(i.keys,i.opacity,i.angle,i.mode):a+(i.color+i.opacity),t.z(n))var o=n;else if("keys"in n){var r=0!=n.keys.length?n.keys[0]:n;o=r.color||"black",o+="opacity"in r?r.opacity:1}else o=n.color,o+="opacity"in n?n.opacity:1;return a+=String(n.thickness)+o+n.lineJoin+n.lineCap+n.dash,t.Gc(e.f,a)?e.f[a]:(i=new p(i,n),e.f[a]=i)}(f,v,o),!x.Bo){w=this.f("shapetype"),t.qh(this,w,t.cc(t.ac.Id(),x)),t.Se(f.ia(),w),x.Bo=!0;var C=null;if(l){var T=v;T.Bo&&(T=new t.Fj(T.keys,T.opacity,T.angle,T.mode),x.b=T),C=this.f("fill"),y=T.keys;var D=[];(0,t.Pe)(y,(function(t){D.push(t.offset+" "+t.color)}),this),m=t.ab(T.angle+270),S=y[y.length-1],h=y[0],t.ph(this,C,{type:"gradient",method:"none",colors:D.join(","),angle:m,color:h.color,opacity:b||(0,window.isNaN)(S.opacity)?T.opacity:S.opacity,color2:S.color,"o:opacity2":b||(0,window.isNaN)(h.opacity)?T.opacity:h.opacity}),w.appendChild(C),T.uF=f,T.Bo=!0}else r?((b=v).Bo&&(b=new n(b.keys,b.Dc,b.uc,b.b,b.f,b.opacity,b.Ta),x.b=b),C=this.f("fill"),h=(y=b.keys)[y.length-1],S=y[0],t.ph(this,C,{src:m.pathToRadialGradientImage,size:b.b+","+b.f,origin:".5, .5",position:b.Dc+","+b.uc,type:"pattern",method:"linear sigma",colors:"0 "+h.color+";1 "+S.color,color:h.color,opacity:(0,window.isNaN)(h.opacity)?b.opacity:h.opacity,color2:S.color,"o:opacity2":(0,window.isNaN)(S.opacity)?b.opacity:S.opacity}),w.appendChild(C),b.vF=f,b.Bo=!0):h&&(C=x.oA?x.oA:x.oA=this.f("fill"),t.z(i)?(t.ph(this,e.ia(),{fillcolor:i,filled:"none"!=i}),t.ph(this,C,{type:"solid",on:"none"!=i,color:i,opacity:1})):(t.ph(this,e.ia(),{fillcolor:i.color,filled:"none"!=i.color}),t.ph(this,C,{type:"solid",on:"none"!=i.color,color:i.color,opacity:(0,window.isNaN)(i.opacity)?1:i.opacity})));w.appendChild(C),b=x.HJ?x.HJ:x.HJ=this.f("stroke"),f=o.thickness?o.thickness:1,m=(h=function(t,e){if(!(t=String(t)))return"none";var i=t.split(" ");0!=i.length%2&&i.push.apply(i,i);for(var n=[],s=0;s<i.length;s++)n.push(Math.ceil((0,window.parseFloat)(i[s])/e));return n.join(" ")}(o.dash,f))?"flat":o.lineCap,t.ph(this,b,{joinstyle:o.lineJoin||"miter",endcap:"butt"==m?"flat":m,dashstyle:h,on:g,color:a,opacity:t.C(o)&&"opacity"in o?o.opacity:1,weight:f+"px"}),w.appendChild(b)}(r||l)&&(h=v.keys[v.keys.length-1],t.ph(this,e.ia(),{fillcolor:h.color,filled:"none"!=h.color})),t.ph(this,e.ia(),{filled:c,fillcolor:i.color||i,stroked:g,strokecolor:a,strokeweight:o.thickness?o.thickness+"px":"1px"}),t.ph(this,e.ia(),{type:"#"+t.cc(t.ac.Id(),x)})}else t.ph(this,e.ia(),{type:"",filled:c,fillcolor:i.color||i,stroked:g,strokecolor:a,strokeweight:o.thickness?o.thickness+"px":"1px"})},t.g.Ji=function(t){var e=t.ia().style;this.lc(e,"visibility",t.visible()?"":"hidden")},t.g.CB=function(i){var n,s=i.ck(),a=i.Ig();a?(n=i.IB?i.IB:i.IB=this.f("skew"),i.uJ||(i.ia().appendChild(n),i.uJ=!0),t.ph(this,n,{on:"true",origin:[-.5-s.left/s.width,-.5-s.top/s.height].join(),matrix:[e(a.od),e(a.gf),e(a.We),e(a.Le),0,0].join()}),t.ph(this,i.ia().style,{left:o(s.left+a.Jd),top:o(s.top+a.Fd)})):i.uJ&&(t.Xe(i.IB),i.uJ=!1)},t.g.K5=function(e){var i=e.ia(),n=e.To(),s=e.Uo(),a=e.Xr(),o=e.zx();(e=e.Ig())&&!t.zb(e)?(s=(n=t.tb(n,s,a,o,0,360,!1)).length,e.transform(n,0,n,0,s/2),e=["m",r(n[s-2]),r(n[s-1]),"c"],t.kd(Array.prototype.push,(0,t.Wa)(n,r),e)):e=["ae",r(n),r(s),r(a),r(o),0,-23592960],e.push("x"),this.lc(i,"path",e.join(" "))},t.g.N5=function(e){var i=e.ia().style;(e=e.Ig())&&this.lc(i,"rotation",String(t.Cb(e)))},t.g.Q5=function(e){var i=e.ia();(e=t.rh(this,e,!0))?this.lc(i,"path",e):i.removeAttribute("path")},t.g.P5=t.ia,t.g.U5=function(i){var n=i.Ig();if(n){var s=i.b,a=i.ia().style;if(i.xr()){if(!i.path()){var r=i.$a;i.b.length&&(r-=i.b[0].f);var l=i.aa;t.ph(this,a,{position:"absolute",overflow:"visible",left:o(l+n.Jd),top:o(r+n.Fd)})}if(b(i))for(i=0,a=s.length;i<a;i++){var h=s[i];if(h.IB){var c=h.IB;t.ph(this,c,{origin:[-.5-l,-.5-r].join(),matrix:[e(n.od),e(n.gf),e(n.We),e(n.Le),0,0].join()})}else c=h.IB=this.f("skew");!h.uJ&&h.ia()&&(h.ia().appendChild(c),h.uJ=!0);var u=[-.5-l,-.5-r].join();h.ia()&&(h.ia().rotation=0),t.ph(this,c,{on:"true",origin:u,matrix:[e(n.od),e(n.gf),e(n.We),e(n.Le),0,0].join()})}}else l=i.x(),r=i.y(),i.vAlign()&&i.height()&&i.height()>i.D&&("middle"==i.vAlign()&&(r+=i.height()/2-i.D/2),"bottom"==i.vAlign()&&(r+=i.height()-i.D)),t.ph(this,a,{position:"absolute",overflow:"hidden",left:o(l+n.Jd),top:o(r+n.Fd)})}},t.g.OI=function(){return!0},t.g.S5=t.ia,t.g.Z0=t.ia,t.g.HX=function(e){var i=t.J(e,t.Fg),n=e.clip();if(n){n=(n=(n=n.shape()).Xt(n.Pd)).clone();var s=e.ia().style;t.p(i)&&i?(e=e.Ig(),n=t.Ab(n,e)):t.J(e,v)&&!e.xr()||(n.left-=e.Gh()||0,n.top-=e.As()||0),e=n.left,i=n.top,this.lc(s,"clip",["rect(",i+"px",e+n.width+"px",i+n.height+"px",e+"px",")"].join(" "))}else n=e.ia().style,l(n,"clip")},t.g.zW=function(){return!0},t.H(p,t.od),t.g=p.prototype,t.g.Tm=function(){return this.b},t.g.oA=null,t.g.HJ=null,t.g.Bo=!1,t.g.Sm=function(){return"shape-type"},t.g.R=function(){delete this.b,delete this.i,t.Xe(this.oA),this.oA=null,t.Xe(this.HJ),this.HJ=null},t.H(f,t.Jj),f.prototype.clear=function(){t.Kc(this.f),t.Kc(this.G),f.u.clear.call(this)},f.prototype.j5=function(e){for(var i=t.Ij(e.keys,e.Dc,e.uc,e.b,e.f,e.opacity,e.Ta),n=t.Ec(this.f),s=0,a=n.length;s<a;s++){var o=n[s];o.Tm()==e&&g(o)}t.Gc(this.G,i)&&t.Lc(this.G,i)},f.prototype.qX=function(e){for(var i=t.Gj(e.keys,e.opacity,e.angle,e.mode),n=t.Ec(this.f),s=0,a=n.length;s<a;s++){var o=n[s];o.Tm()==e&&g(o)}e=this.ru,t.Gc(e,i)&&t.Lc(e,i)},f.prototype.R=function(){for(var e in this.f)t.qd(this.f[e]);this.f=null,f.u.R.call(this)},t.H(m,t.Yj),m.prototype.F0=function(){return new f(this)},m.prototype.E0=function(t,e,n,s){return new i(this,t,e,n,s)},t.E("acgraph.vml.Stage",m),t.H(v,t.Qh),t.g=v.prototype,t.g.textOverflow=function(t){return t&&(this.Ha=!0),v.u.textOverflow.call(this,t)},t.g.opacity=function(t){if(null!=t){if(t!==this.style().opacity){var e=!this.Ja()||this.Ja().yf();e||this.Ja().suspend(),this.style().opacity=t,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),e||this.Ja().resume()}return this}return this.style().opacity},t.g.color=function(t){if(null!=t){if(t!==this.style().color){var e=!this.Ja()||this.Ja().yf();e||this.Ja().suspend(),this.style().color=t,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),e||this.Ja().resume()}return this}return this.style().color},t.g.sx=function(){if(t.mg().OI()){var e=this.Ig();e&&!t.zb(e)&&(this.Pb(4),this.nf=null)}},t.g.xr=function(){var t=this.Ig();return!(!t||t&&1==t.od&&0==t.gf&&0==t.We&&1==t.Le)||!!this.textOverflow()},t.g.Xt=function(t){return this.Ha=this.xr(),v.u.Xt.call(this,t)},t.g.Sd=function(){if(v.u.Sd.call(this),b(this)||this.textOverflow()){t.mg();var e=this.ia();C&&this.ia()&&(e.innerHTML=e.innerHTML)}return this},t.g.rX=function(){t.jg(this,64)},t.g.OO=function(){this.Ha?v.u.OO.call(this):(t.mg().PX(this),t.jg(this,16384))},t.g.Ep=function(){this.Ha?v.u.Ep.call(this):t.jg(this,32)},t.g.MB=function(){if(this.Ha)v.u.MB.call(this);else{null!=this.direction()&&(this.K="rtl"==this.direction());var e=this.text();this.Hd||null==this.text()?this.Uc=e:this.Uc=t.oc(e),this.Ta=this.Vm(this.Uc,{})}},t.g.Vm=function(e,i){if(this.Ha)return v.u.Vm.call(this,e,i);var n=t.mg(),s=this.style();return n.Zn||n.Xp(),n.b.style.cssText="",s.fontStyle&&t.uf(n.b,"font-style",s.fontStyle),s.fontVariant&&t.uf(n.b,"font-variant",s.fontVariant),s.fontFamily&&t.uf(n.b,"font-family",s.fontFamily),s.fontSize&&t.uf(n.b,"font-size",s.fontSize),s.fontWeight&&t.uf(n.b,"font-weight",s.fontWeight),s.letterSpacing&&t.uf(n.b,"letter-spacing",s.letterSpacing),s.decoration&&t.uf(n.b,"text-decoration",s.decoration),s.textIndent&&t.uf(n.b,"text-indent",s.textIndent),t.uf(n.b,"word-break",s.wordBreak),t.uf(n.b,"word-wrap",s.wordWrap),null!=s.width||t.uf(n.b,"white-space","nowrap"),s.width&&t.uf(n.b,"width",s.width),t.uf(n.Zn,{left:0,top:0,width:"1px",height:"1px"}),t.uf(n.b,{border:"0 solid",position:"absolute",left:0,top:0}),n.b.innerHTML=e,s=t.Of(n.b),n.b.innerHTML="",s.left=this.x(),s.top=this.y(),this.D=s.height,this.height()&&(s.height=this.height()),s},t.g.qv=function(){var t=this.Ig();!t||this.Vf(256)||this.Vf(4)||(this.nf=t.clone())},t.g.Uy=function(){v.u.Uy.call(this),y(this)},t.g.Mr=function(){if(v.u.Mr.call(this),y(this),C&&b(this)){var t=!this.Ja()||this.Ja().yf();t||this.Ja().suspend(),this.ba=!1,this.Pb(1024),this.Pb(32),this.Pb(16384),this.Pb(4),this.sx(),t||this.Ja().resume()}},t.g.R=function(){delete this.nf,v.u.R.call(this)};var T=v.prototype;T.color=T.color,T.opacity=T.opacity,T.textOverflow=T.textOverflow,t.E("acgraph.vml.Text",v),t.E("acgraph.vml.getRenderer",(function(){return a.Id()}))}.call(this,$)),_.theme_map||(_.theme_map=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{map:{defaultCalloutSettings:{},defaultSeriesSettings:{base:{normal:{fill:function(){return this.scaledColor||this.sourceColor},stroke:t.EN,hatchFill:!1,labels:{anchor:"center-bottom",enabled:null,adjustFontSize:{width:!0,height:!0},format:function(){return this.getData("name")?this.getData("name"):this.name?this.name:this.getData("id")?this.getData("id"):"lat: "+this.lat+"\nlong: "+this.long}},markers:{enabled:!1,disablePointerEvents:!1}},hovered:{fill:"#757575",stroke:{thickness:.5,color:"#545f69"},labels:{enabled:null},markers:{enabled:null}},selected:{fill:"#333 0.85",stroke:{thickness:.5,color:"#545f69"},labels:{enabled:null},markers:{enabled:null}},color:null,tooltip:{titleFormat:function(){return this.name||this.getData("name")||"Tooltip title"},format:function(){return"Id: "+this.id+"\nValue: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix}},xScale:null,yScale:null,a11y:{titleFormat:"Series named {%SeriesName}"},clip:!1},choropleth:{normal:{labels:{fontColor:"#212121",anchor:"center"},markers:{anchor:null}},colorScale:{}},connector:{startSize:0,endSize:0,curvature:.3,normal:{stroke:function(){return{thickness:2,color:this.sourceColor,lineJoin:"round"}},markers:{position:"middle",enabled:!0,size:15,stroke:"1.5 #f7f7f7",rotation:null,anchor:null,type:"arrowhead"},labels:{enabled:!1,position:"middle",anchor:null,format:function(){return"from: "+this.startPoint.lat+","+this.startPoint.long+"\nto: "+this.endPoint.lat+","+this.endPoint.long}}},hovered:{stroke:t.FN,markers:{stroke:"1.5 #f7f7f7",size:15}},selected:{stroke:"2 #333 0.85",markers:{fill:"#333 0.85",stroke:"1.5 #f7f7f7",size:15}},tooltip:{title:{enabled:!1},separator:{enabled:!1},format:function(){return"from: "+this.startPoint.lat+", "+this.startPoint.long+"\nto: "+this.endPoint.lat+", "+this.endPoint.long}}},bubble:{normal:{stroke:function(){return{thickness:2,color:t.Ql(this.sourceColor)}},labels:{anchor:"center"}},hovered:{fill:"#757575"},selected:{fill:"#333 0.85"},tooltip:{format:function(){var e=this.id?"Id: "+this.id:"lat: "+this.lat+"\nlong: "+this.long;return this.size&&(e+="\nValue: "+this.valuePrefix+t.vN(this.size)+this.valuePostfix),e}}},marker:{normal:{labels:{enabled:!0}},hovered:{labels:{fontWeight:"bold"}},selected:{labels:{fontWeight:"bold"}},tooltip:{format:function(){var e=this.id?"Id: "+this.id:"lat: "+this.lat+"\nlong: "+this.long;return this.value&&(e+="\nValue: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix),e}}}},colorRange:{zIndex:50},geoScale:{maxTicksCount:1e3,precision:2},callouts:[],axesSettings:{enabled:!1,title:{padding:5,fontSize:13,text:"Axis title",fontColor:"#545f69",zIndex:10},labels:{enabled:!0,padding:2,rotation:null,fontSize:10,anchor:"auto",position:"outside",zIndex:5},minorLabels:{enabled:null,padding:2,rotation:null,fontSize:9,anchor:null,position:"outside",zIndex:4},overlapMode:"no-overlap",ticks:{enabled:!0,length:5,position:"outside",stroke:"#CECECE",zIndex:3},minorTicks:{enabled:!1,length:2,position:"outside",stroke:"#CECECE",zIndex:2},drawFirstLabel:!0,drawLastLabel:!0,stroke:"#CECECE"},gridsSettings:{enabled:!1,minorStroke:"none",zIndex:5},crosshair:{enabled:!1,xStroke:"#969EA5",yStroke:"#969EA5",zIndex:110,xLabels:[{enabled:null,axisIndex:2}],yLabels:[{enabled:null,axisIndex:3}]},unboundRegions:{enabled:!0,fill:"#F7F7F7",stroke:"#e0e0e0"},maxBubbleSize:"10%",minBubbleSize:"1%",geoIdField:"id",interactivity:{copyFormat:function(t){for(var e="",i=0,n=(t=t.seriesStatus).length;i<n;i++){var s=t[i];if(s.points.length){e+="Series "+s.series.getIndex()+":\n";for(var a=0,o=s.points.length;a<o;a++){var r=s.points[a];e+="id: "+r.id+" index: "+r.index,a!=o-1&&(e+="\n")}i!=n-1&&(e+="\n")}}return e||"no selected points"},drag:!0,zoomOnMouseWheel:!1,keyboardZoomAndMove:!0,zoomOnDoubleClick:!1},minZoomLevel:1,maxZoomLevel:10,overlapMode:"no-overlap",crsAnimation:{enabled:!0,duration:300},legend:{enabled:!1,tooltip:{contentInternal:{background:{disablePointerEvents:!1}}}},selectPolygonMarqueeFill:"#d3d3d3 0.4",selectPolygonMarqueeStroke:"#d3d3d3",selectPolygonMarqueeMarker:{fill:"#d3d3d3 0.4",stroke:"#d3d3d3",radius:15}},choropleth:{},bubbleMap:{},markerMap:{},connector:{},seatMap:{}})}.call(this,$)),_.sankey||(_.sankey=1,function(t){var e=function(e,i){t.V.call(this),this.ya=e,this.re=i,this.gb=null;var n={};t.T(n,[["fill",0,8192],["stroke",0,8192],["labels",0,0]]),this.ca=new t.my(this,n,t.gm),t.W(this,"normal",this.ca),this.ca.ta("labelsFactoryConstructor",t.ny),this.ca.ta("labelsAfterInitCallback",t.sy),this.za=new t.my(this,n,t.vo),t.W(this,"hovered",this.za),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",(function(t){t.I(4294967295)}))},i=function(e,i){t.ux.call(this),this.Ga("sankey"),t.su(this,this,this.If,this.hg,null,this.If,null,null),t.T(this.ua,S),this.data(e||null,i),this.PR=(0,t.pa)(this.PR,this),this.NR=(0,t.pa)(this.NR,this)},n=function(t,e){for(var i=e.hE,s=0;s<i.length;s++){var a=i[s];e.level>=a.level&&(a.level=e.level+1,n(t,a)),a.level>t.G&&(t.G=a.level)}},s=function(t,e){return e?(t.hf[e]||(t.hf[e]={type:x,name:e,level:0,lN:0,qO:0,MG:0,PH:[],hE:[],Z2:[],C4:[],j1:[],uta:[],Fta:[],Cy:[],Sy:[],tS:!1}),t.hf[e]):null},a=function(e,i){var n,s=i.type;if(s==x){var a=i.name;e.isConflict={value:i.tS,type:"string"};var o=[];for(n=0;n<i.PH.length;n++){var r=i.PH[n],l=t.xa(r.hE,(function(t){return t==i}));o.push({name:r.name,value:r.C4[l]})}for(e.income={value:o,type:""},o=[],n=0;n<i.hE.length;n++)r=i.hE[n],l=t.xa(r.PH,(function(t){return t==i})),o.push({name:r.name,value:r.Z2[l]});e.outcome={value:o,type:""},e.dropoff={value:i.MG,type:"number"}}else a=s==w?i.from.name+" -> "+i.Je.name:i.from.name+" dropoff";e.type={value:T[s],type:"string"},e.name={value:a,type:"string"},e.value={value:i.weight,type:"number"}},o=function(e,i,n){n=n?e.node().lb().labels():e.node().Qa().labels(),e=e.node().Qa().labels(),n=n.g("position"),e=e.g("position"),e=t.Ek(n||e,"center");var s=n=0,a=(i.Hj+i.mi)/2,o=(i.ze+i.Pe)/2;switch(e){case"left-top":n=i.Hj,s=i.ze;break;case"left-center":n=i.Hj,s=o;break;case"left-bottom":n=i.Hj,s=i.Pe;break;case"center-top":n=a,s=i.ze;break;case"center":n=a,s=o;break;case"center-bottom":n=a,s=i.Pe;break;case"right-top":n=i.mi,s=i.ze;break;case"right-center":n=i.mi,s=o;break;case"right-bottom":n=i.mi,s=i.Pe}return{value:{x:n,y:s}}},r=function(t,e,i,n,s,a){for(var o,r,h=0;h<e.length;h++)r=(o=e[h]).path,l(t,t.b,r.tag,r,n),o.label.qk(i),o.label.jc({value:s(o,a)}),t.ke(t.b,o,n)},l=function(t,e,i,n,s){i=t.Ge(i),t=e.Tm(s,i),e=e.gk(s,i),n.fill(t),n.stroke(e)},h=function(t,e,i,n,s,a){var h=e.tag;l(t,t.f,h,e,i),e=h.element,r(t,e.Cy,n,i,a,"leftTop"),r(t,e.Sy,s,i,a,"rightTop"),e.label.jc(o(t,e,i)),t.ke(t.f,e,i)},c=function(t,e,i){var n=(e=e.tag).element;l(t,t.b,e,n.path,i),n.label.qk("center-bottom"),n.label.jc({value:t.CY(n)}),l(t,t.f,n.from.path.tag,n.from.path,i),l(t,t.f,n.Je.path.tag,n.Je.path,i),t.ke(t.b,n,i)},u=function(t,e,i){var n=e.tag;l(t,t.o,n,e,i),t.ke(t.o,n.element,i)},d=function(t){return(t.ze+t.Pe)/2},p=function(e,i){for(var n=0;n<e.i.length;n++)for(var s=e.i[n].hf,a=0;a<s.length;a++){var o=s[a];if(o.Cy.length){var r=(0,t.Gg)(o.Cy,(function(t,e){return t+d(e.from)*e.weight}),0,e);r=(r/(0,t.Gg)(o.Cy,(function(t,e){return t+e.weight}),0,e)-d(o))*i,o.ze+=r,o.Pe+=r}}},g=function(e,i){for(var n=e.i.slice(),s=0;s<n.length;s++)for(var a=e.i[s].hf,o=0;o<a.length;o++){var r=a[o];if(r.Sy.length){var l=(0,t.Gg)(r.Sy,(function(t,e){return t+d(e.Je)*e.weight}),0,e);l=(l/(0,t.Gg)(r.Sy,(function(t,e){return t+e.weight}),0,e)-d(r))*i,r.ze+=l,r.Pe+=l}}},f=function(t,e){for(var i=0;i<t.i.length;i++){var n,s=t.i[i].hf.slice(),a=e.top,o=a+e.height,r=s.length,l=t.g("nodePadding");for(s.sort(t.OR),n=0;n<r;++n){var h=s[n];0<(a-=h.ze)&&(h.ze+=a,h.Pe+=a),a=h.Pe+l}if(0<(a=a-l-o))for(h.ze=h.ze-a,h.Pe=h.Pe-a,a=h.ze,n=r-2;0<=n;--n)0<(a=(h=s[n]).Pe+l-a)&&(h.ze-=a,h.Pe-=a),a=h.ze}},m=function(e,i,n){var s;for(s=0;s<i.length;s++){var a=i[s];l(e,n,a.tag,a,t.gm)}},v=function(t,e){return new i(t,e)};t.H(e,t.V),t.Gq(e,["fill","stroke","labels"],"normal"),t.g=e.prototype,t.g.ra=28672|t.V.prototype.ra,t.g.Ma=function(){return this.re},t.g.Kg=function(){t.W(this,"normal",this.ca),t.W(this,"hovered",this.za)},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df(),t.W(this,"tooltip",this.gb),this.gb.parent(this.ya.Ua()),this.gb.ya(this.ya)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.Bp=function(){this.va(16384)},t.g.de=function(){this.va(4096)},t.g.xI=function(){this.ca.labels().I(4294967295),this.za.labels().I(4294967295)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.Tm=function(t,e){return this.Fp("fill",t,e)},t.g.gk=function(t,e){return this.Fp("stroke",t,e)},t.g.Fp=function(e,i,n){return e=(i?this.za:this.ca).g(e)||this.ca.g(e),t.D(e)&&(e=e.call(n,n)),e},t.g.F=function(){var t=e.u.F.call(this);return t.tooltip=this.Ua().F(),t.normal=this.ca.F(),t.hovered=this.za.F(),t},t.g.U=function(t,i){e.u.U.call(this,t,i),"tooltip"in t&&this.Ua().ga(!!i,t.tooltip),this.ca.ga(!!i,t),this.ca.ga(!!i,t.normal),this.za.ga(!!i,t.hovered)},t.g.R=function(){t.sd(this.gb,this.ca,this.za),e.u.R.call(this)};var b=e.prototype;b.tooltip=b.Ua,b.normal=b.Qa,b.hovered=b.lb,t.H(i,t.ux),t.Jz(i,"sankey",["appearance","data","flowlabels","nodelabels"]),i.prototype.ra=t.ux.prototype.ra;var y={};t.sq(y,[[0,"nodeWidth",t.br],[0,"nodePadding",t.Bq],[0,"curveFactor",t.er]]),t.U(i,y);var S=[["nodeWidth",4,1],["nodePadding",4,1],["curveFactor",4,1]];t.g=i.prototype,t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Xf!==e&&(this.Xf=e,t.qd(this.la),t.qd(this.Yc),this.sd=null,t.J(e,t.Cr)?this.la=e.Ui():this.la=t.J(e,t.Mr)?e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(256),t.nr(this,"sankey","data",1)),this}return this.la},t.g.dd=function(){this.B(256),t.nr(this,"sankey","data",1)},t.g.cg=function(){return this.la.$()},t.g.Ec=function(){return this.sd=this.la.$()},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.Ma=function(){return"sankey"},t.g.pb=function(){if(t.rr(this,"sankey","data")){this.hf={},this.D={},this.G=-1;for(var e=this.$().reset();e.advance();){var i=String(e.get("from")),a=e.get("to");a=null===a||t.C(a)?null:String(a);var o=t.N(e.get("weight")),r=!i.length,l=null!==a&&!a.length;t.ea(o)&&0<o&&!r&&!l&&(i=s(this,i),r=s(this,a),a=i,i=r,r=this.$().ma(),this.D[r]={type:i?w:C,Ch:r,from:a,Je:i,weight:o},a.qO+=o,i?(a.Sy.push(this.D[r]),a.C4.push(o),a.hE.push(i),i.lN+=o,i.Z2.push(o),i.PH.push(a),i.Cy.push(this.D[r]),a.level>=i.level&&(i.level=a.level+1,n(this,i)),i.level>this.G&&(this.G=i.level)):(a.MG+=o,a.j1.push(o)))}for(var h in this.i=[],this.Ba=!0,this.hf)(o=this.hf[h]).weight=Math.max(o.lN,o.qO),e=o.hE.length+o.j1.length,this.Ba&&!e&&(o.level=this.G),o.PH.length&&e&&(o.tS=o.lN!=o.qO),e=o.level,this.i[e]||(this.i[e]={hf:[],weight:0,top:window.NaN}),(e=this.i[e]).hf.push(o),e.weight+=o.weight;for(o=h=0;o<this.i.length;o++)for(e=this.i[o],a=0;a<e.hf.length;a++)e.hf[a].id=h++;this.B(4),t.pr(this,"sankey","data")}},t.g.yj=function(){return!this.$().Hb()},t.g.Ue=function(){return[]},t.g.Bp=function(){this.Ua().W()},t.g.nG=function(e,i){this.aa&&!i||(this.aa=new t.Fw);var n={};if(a(n,e),e.type!=x){var s=this.$();s.select(e.Ch),this.aa.lg(s)}else this.aa.lg(null);return t.ov(this.aa,n)},t.g.Ux=function(e){this.Si||(this.Si=new t.Fw);var i={};if(e=e.element,a(i,e),e.type!=x){var n=this.$();n.select(e.Ch),this.Si.lg(n)}else this.Si.lg(null);return t.ov(this.Si,i)},t.g.Rga=function(t,e){return{x:t[e].x,y:t[e].y}},t.g.CY=function(t){return{x:(t.left+t.right)/2,y:t.topCenter}},t.g.If=function(e){var i=e.domTarget,n=i.tag;if(n){var s=n.element.type;s==x?(s=this.f.Ua(),h(this,i,t.vo,"left-bottom","right-bottom",this.Rga)):s==w?(s=this.b.Ua(),c(this,i,t.vo)):(s=this.o.Ua(),u(this,i,t.vo)),t.Ow(s,e.clientX,e.clientY,this.Ux(n))}else this.Ua().Lc()},t.g.hg=function(e){var i=(e=e.domTarget).tag;this.Ua().Lc(),i&&((i=i.element.type)==x?h(this,e,t.gm,"center-bottom","center-bottom",this.CY):i==w?c(this,e,t.gm):u(this,e,t.gm))},t.g.rT=function(e){var i=[];t.X(e,8192)&&i.push("appearance"),t.X(e,4096)&&(e=e.target.Ma()==x,i.push(e?"nodelabels":"flowlabels")),t.or(this,"sankey",i,1)},t.g.fM=function(i){return this.o||(this.o=new e(this,C),t.W(this,"dropoff",this.o),this.o.Kg(),t.K(this.o,this.rT,this)),t.p(i)?(this.o.N(i),this):this.o},t.g.vM=function(i){return this.b||(this.b=new e(this,w),t.W(this,"flow",this.b),this.b.Kg(),t.K(this.b,this.rT,this)),t.p(i)?(this.b.N(i),this):this.b},t.g.node=function(i){return this.f||(this.f=new e(this,x),t.W(this,"node",this.f),this.f.Kg(),t.K(this.f,this.rT,this)),t.p(i)?(this.f.N(i),this):this.f},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&t.nr(this,"sankey","appearance",1)}},t.g.Pf=function(e){t.X(e,2)&&t.nr(this,"sankey","appearance",1)},t.g.Ge=function(t){var e=t.element;t=t.element.type;var i=this.cc();return t==x?{id:e.id,name:e.name,sourceColor:i.nc(e.id),conflict:e.tS}:t==w?{from:e.from.name,to:e.Je.name,sourceColor:i.nc(e.from.id)}:{from:e.from.name,sourceColor:i.nc(e.from.id)}};var x=0,w=1,C=2,T={0:"node",1:"flow",2:"dropoff"};t.g=i.prototype,t.g.NR=function(t,e){return this.OR(t.from,e.from)},t.g.PR=function(t,e){return this.OR(t.Je,e.Je)},t.g.OR=function(t,e){return t.ze-e.ze},t.g.sV=function(t,e){return function(i){return t*(1-i)+e*i}},t.g.Qh=function(e){if(!this.pf()){if(this.pb(),this.Aa||(this.Aa=this.Na.Bd(),this.Aa.zIndex(30),this.node(),this.vM(),this.fM()),this.J(4)){this.Aa.Gi(),this.f.labels().B(2),this.b.labels().B(2),this.o.labels().B(2),this.K=[],this.ba=[],this.P=[],this.ea=[];var i=this.g("nodePadding"),n=this.g("nodeWidth");if(this.i.length){var s=this.i.length,a=e.width/s;a=.3*(n=t.L(n,a))}else n=a=s=0;var r,l=[];for(r=0;r<this.i.length;r++){var h=this.i[r],c=h.hf,u=c[c.length-1].MG?a:0;c=(e.height-u-i*(c.length-1))/h.weight,l.push(c)}for(this.na=Math.min.apply(null,l),i=(e.width-n)/(s-1),r=0;r<this.i.length;r++)for(c=(h=this.i[r]).hf,h=0;h<c.length;h++)(s=c[h]).Hj=e.left+s.level*i,s.mi=s.Hj+n,s.ze=e.top+h,s.Pe=s.ze+s.weight*this.na;for(var d in this.D)(c=this.D[d]).height=c.weight*this.na;for(f(this,e),c=1,r=32;0<r;--r)g(this,c*=.99),f(this,e),p(this,c),f(this,e);for(x in this.hf)(s=this.hf[x]).Sy.sort(this.PR),s.Cy.sort(this.NR);for(x in this.hf){var v=i=(s=this.hf[x]).ze;for(r=0;r<s.Sy.length;r++)(c=s.Sy[r]).ze=v+c.height/2,v+=c.height;for(r=0;r<s.Cy.length;r++)(c=s.Cy[r]).Pe=i+c.height/2,i+=c.height}for(x in this.hf)s=this.hf[x],(h=this.Aa.path()).zIndex(3),this.ba.push(h),h.tag={element:s},s.path=h,s.Hj=t.R(t.Tm(s.Hj,4),1),s.ze=t.R(t.Tm(s.ze,4),1),s.mi=t.R(t.Tm(s.mi,4),1),s.Pe=t.R(t.Tm(s.Pe,4),1),h.moveTo(s.Hj,s.ze).lineTo(s.mi,s.ze).lineTo(s.mi,s.Pe).lineTo(s.Hj,s.Pe).lineTo(s.Hj,s.ze).close();for(d in s=this.g("curveFactor"),this.D)if((c=this.D[d]).Je){(h=this.Aa.path()).zIndex(1),this.P.push(h),h.tag={element:c},c.path=h,e=c.from.mi,r=c.Je.Hj,v=c.ze,i=c.Pe,l=(u=this.sV(e,r))(s),u=u(1-s);var b=c.height/2;c.left=e,c.right=r,c.topCenter=(v+i)/2-b,c.leftTop={x:e,y:v-b},c.rightTop={x:r,y:i-b};var y=v-b,S=i-b;v+=b,i+=b,h.moveTo(e,y).Sk(l,y,u,S,r,S).lineTo(r,i).Sk(u,i,l,v,e,v).lineTo(e,y),3>c.height&&((h=this.Aa.path()).zIndex(2),this.ea.push(h),h.fill(t.bm).stroke(t.bm,3),h.moveTo(e,y).Sk(l,y,u,S,r,S).lineTo(r,i).Sk(u,i,l,v,e,v).lineTo(e,y),h.tag={element:c})}else i=c.from.MG*this.na,u=Math.min(i,n/4),r=(e=c.from.mi)+u,i=(l=c.from.Pe)-i,(h=this.Aa.path()).zIndex(1),this.K.push(h),h.tag={element:c},c.path=h,c.dka=r,c.eka=l,h.moveTo(e,i).arcTo(u,u,-90,90),i+u<l&&h.lineTo(r,l),h.lineTo((e+r)/2,l+a).lineTo(e,l).close();t.or(this,"sankey",["appearance","nodelabels","flowlabels"]),this.I(4)}if(t.rr(this,"sankey","appearance")&&(m(this,this.ba,this.f),m(this,this.P,this.b),m(this,this.K,this.o),t.pr(this,"sankey","appearance")),t.rr(this,"sankey","nodelabels")){for(var x in(c=this.f.labels()).clear().O(this.Aa).zIndex(3),this.hf)e=(s=this.hf[x]).id,n=this.nG(s,!0),a=o(this,s,t.gm),s.label=c.add(n,a,e),this.ke(this.f,s,t.gm);c.W(),this.f.xI(),t.pr(this,"sankey","nodelabels")}if(t.rr(this,"sankey","flowlabels")){for(d in x=this.b.labels(),r=this.o.labels(),x.clear().O(this.Aa).zIndex(3),r.clear().O(this.Aa).zIndex(3),this.D)c=this.D[d],e=t.N(d),s=c.Je,n=this.nG(c,!0),s?(a={value:this.CY(c)},c.label=x.add(n,a,e),c.label.qk("center-bottom")):(a={value:{x:c.dka,y:c.eka}},c.label=r.add(n,a,e),c.label.qk("left-center")),this.ke(s?this.b:this.o,c,t.gm);x.W(),r.W(),this.b.xI(),this.o.xI(),t.pr(this,"sankey","flowlabels")}}},t.g.ke=function(e,i,n){var s=i.label;if(s){var a=this.$();e.Ma()==x?a.reset():a.select(i.Ch),i=a.get("normal"),i=t.p(i)?i.label:void 0;var o=a.get("hovered");o=t.p(o)?o.label:void 0,i=t.Zo(i,a.get("label"),null),a=t.Zo(o,a.get("hoverLabel"),null),a=n?a:null,o=n?e.lb().labels():null;var r=e.Qa().labels();n=n?e.lb().labels().oa:null;var l=e.Qa().labels().oa,h=a&&t.p(a.enabled)?a.enabled:null,c=i&&t.p(i.enabled)?i.enabled:null,u=o&&null!==o.enabled()?o.enabled():null,d=r&&null!==r.enabled()?r.enabled():null;e=!1,(e=null!=h?h:null!=c?c:null!=u?u:d)?(s.enabled(!0),s.state("labelOwnSettings",s.Pa,0),s.state("pointState",a,1),s.state("pointNormal",i,2),s.state("elementState",o,3),s.state("elementNormal",r,4),s.state("elementStateTheme",n,5),s.state("auto",s.Nd,6),s.state("elementNormalTheme",l,7)):s.enabled(!1),s.W()}},t.g.ts=function(){return[this]},t.g.qA=function(){return["from","to","weight"]},t.g.F=function(){var e=i.u.F.call(this);return e.data=this.data().F(),e.tooltip=this.Ua().F(),e.palette=this.cc().F(),e.dropoff=this.fM().F(),e.flow=this.vM().F(),e.node=this.node().F(),t.Tq(this,y,e),{chart:e}},t.g.U=function(e,n){i.u.U.call(this,e,n),"data"in e&&this.data(e.data),this.cc(e.palette),"tooltip"in e&&this.Ua().ga(!!n,e.tooltip),"dropoff"in e&&this.fM().ga(!!n,e.dropoff),"flow"in e&&this.vM().ga(!!n,e.flow),"node"in e&&this.node().ga(!!n,e.node),t.Iq(this,y,e,n)},t.g.R=function(){t.sd(this.Fa,this.o,this.b,this.f,this.gb,this.K,this.ba,this.P,this.ea,this.la,this.Yc),this.gb=this.f=this.b=this.o=this.Fa=null,this.K.length=0,this.ba.length=0,this.P.length=0,this.ea.length=0,this.sd=this.Yc=this.la=null,i.u.R.call(this)};var D=i.prototype;D.getType=D.Ma,D.data=D.data,D.noData=D.Gm,D.tooltip=D.Ua,D.dropoff=D.fM,D.flow=D.vM,D.node=D.node,D.palette=D.cc,t.Tp.sankey=v,t.E("anychart.sankey",v)}.call(this,$)),_.venn||(_.venn=1,function(t){var e=function(e){function i(t){t.I(4294967295)}t.V.call(this),this.Ga("venn.intersections"),this.pa=e,e={},t.T(e,[["fill",0,8256],["stroke",0,8256],["hatchFill",0,8256],["labels",0,0],["markers",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("markersFactoryConstructor",t.ry),this.ca.ta("markersAfterInitCallback",t.ty),this.ca.ta("labelsFactoryConstructor",t.oy),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.de,this)})),e={},t.T(e,[["fill",0,8192],["stroke",0,8192],["hatchFill",0,8192],["labels",0,0],["markers",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("markersFactoryConstructor",t.ry),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("markersFactoryConstructor",t.ry),this.za.ta("labelsAfterInitCallback",i),this.za.ta("markersAfterInitCallback",i),this.Ea.ta("labelsAfterInitCallback",i),this.Ea.ta("markersAfterInitCallback",i)},i=function(t){for(var e=Array(t),i=0;i<t;++i)e[i]=0;return e},n=function(e,n){return(0,t.Wa)(i(e),(function(){return i(n)}))},s=function(t,e){for(var i=0,n=0;n<t.length;++n)i+=t[n]*e[n];return i},a=function(t){return Math.sqrt(s(t,t))},o=function(t,e){for(var i=0;i<e.length;++i)t[i]=-1*e[i]},r=function(t,e,i,n,s){for(var a=0;a<t.length;++a)t[a]=e*i[a]+n*s[a]},l=function(t,e,i,n,a){function o(o,u,p){for(var m=0;16>m;++m)if(a=(o+u)/2,r(n.x,1,i.x,a,e),c=n.Se=t(n.x,n.Vk),d=s(n.Vk,e),c>l+g*a*h||c>=p)u=a;else{if(Math.abs(d)<=-f*h)return a;0<=d*(u-o)&&(u=o),o=a,p=c}return 0}var l=i.Se,h=s(i.Vk,e),c=l,u=l,d=h,p=0;a=a||1;for(var g=g||1e-6,f=f||.1,m=0;10>m;++m){if(r(n.x,1,i.x,a,e),c=n.Se=t(n.x,n.Vk),d=s(n.Vk,e),c>l+g*a*h||m&&c>=u)return o(p,a,u);if(Math.abs(d)<=-f*h)break;if(0<=d)return o(a,p,c);u=c,p=a,a*=2}return a},h=function(t,e,i){var n={x:e.slice(),Se:0,Vk:e.slice()},h={x:e.slice(),Se:0,Vk:e.slice()},c=e.slice(),u=1,d=(i=i||{}).zI||20*e.length;n.Se=t(n.x,n.Vk),e=n.Vk.slice(),o(e,n.Vk);for(var p=0;p<d;++p){if(u=l(t,e,n,h,u),i.history&&i.history.push({x:n.x.slice(),Se:n.Se,Vk:n.Vk.slice(),alpha:u}),u){r(c,1,h.Vk,-1,n.Vk),r(e,Math.max(0,s(c,h.Vk)/s(n.Vk,n.Vk)),e,-1,h.Vk);var g=n;n=h,h=g}else o(e,n.Vk);if(1e-5>=a(n.Vk))break}return i.history&&i.history.push({x:n.x.slice(),Se:n.Se,Vk:n.Vk.slice(),alpha:u}),n},c=function(e,i,n){function s(t,e){return t.Se-e.Se}function a(t){for(var e=0;e<t.length;e++)b[v][e]=t[e];b[v].Se=t.Se}var o,l=(n=n||{}).zI||200*i.length,h=n.Dta||1.05,c=n.Qta||.001,u=n.Y3||1e-6,d=n.Y3||1e-5,p=void 0!==n.cka?n.cka:1,g=void 0!==n.Jda?n.Jda:2,f=void 0!==n.Qja?n.Qja:-.5,m=void 0!==n.zka?n.zka:.5,v=i.length,b=Array(v+1);b[0]=i,b[0].Se=e(i);for(var y=b[0].id=0;y<v;++y){var S=i.slice();S[y]=S[y]?S[y]*h:c,b[y+1]=S,b[y+1].Se=e(S),b[y+1].id=y+1}h=i.slice(),c=i.slice(),S=i.slice(),i=i.slice();for(var x=0;x<l;++x){for(b.sort(s),n.history&&((y=(0,t.Wa)(b,(function(t){var e=t.slice();return e.Se=t.Se,e.id=t.id,e}))).sort((function(t,e){return t.id-e.id})),n.history.push({x:b[0].slice(),Se:b[0].Se,Mta:y})),y=o=0;y<v;++y)o=Math.max(o,Math.abs(b[0][y]-b[1][y]));if(Math.abs(b[0].Se-b[v].Se)<u&&o<d)break;for(y=0;y<v;++y){for(o=h[y]=0;o<v;++o)h[y]+=b[o][y];h[y]/=v}if(y=b[v],r(c,1+p,h,-p,y),c.Se=e(c),c.Se<b[0].Se)r(i,1+g,h,-g,y),i.Se=e(i),i.Se<c.Se?a(i):a(c);else if(c.Se>=b[v-1].Se){if(o=!1,c.Se>y.Se?(r(S,1+f,h,-f,y),S.Se=e(S),S.Se<y.Se?a(S):o=!0):(r(S,1-f*p,h,f*p,y),S.Se=e(S),S.Se<c.Se?a(S):o=!0),o){if(1<=m)break;for(y=1;y<b.length;++y)r(b[y],1-m,b[0],m,b[y]),b[y].Se=e(b[y])}}else a(c)}return b.sort(s),{Se:b[0].Se,x:b[0]}},u=function(e,i){var n,s=d(e),a=(0,t.Ye)(s,(function(t){t:{for(var i=0;i<e.length;++i)if(f(t,e[i])>e[i].Eb+1e-10){t=!1;break t}t=!0}return t})),o=0,r=0,l=[];if(1<a.length){var h=b(a);for(n=0;n<a.length;++n){var c=a[n];c.angle=Math.atan2(c.x-h.x,c.y-h.y)}for(a.sort((function(t,e){return e.angle-t.angle})),h=a[a.length-1],n=0;n<a.length;++n){c=a[n],r+=(h.x+c.x)*(c.y-h.y);for(var u={x:(c.x+h.x)/2,y:(c.y+h.y)/2},p=null,m=0;m<c.sO.length;++m)if(-1<h.sO.indexOf(c.sO[m])){var v=e[c.sO[m]],y=Math.atan2(h.x-v.x,h.y-v.y),S=y-Math.atan2(c.x-v.x,c.y-v.y);0>S&&(S+=2*Math.PI),y-=S/2,y=f(u,{x:v.x+v.Eb*Math.sin(y),y:v.y+v.Eb*Math.cos(y)}),(null===p||p.width>y)&&(p={rn:v,width:y,ei:c,el:h})}null!==p&&(l.push(p),o+=g(p.rn.Eb,p.width),h=c)}}else{for(h=e[0],n=1;n<e.length;++n)e[n].Eb<h.Eb&&(h=e[n]);for(o=!1,n=0;n<e.length;++n)if(f(e[n],h)>Math.abs(h.Eb-e[n].Eb)){o=!0;break}o?o=r=0:(o=h.Eb*h.Eb*Math.PI,l.push({rn:h,ei:{x:h.x,y:h.y+h.Eb},el:{x:h.x-1e-10,y:h.y+h.Eb},width:2*h.Eb}))}return r/=2,i&&(i.zC=o+r,i.mta=o,i.Ita=r,i.yC=l,i.wta=a,i.xta=s),o+r},d=function(t){for(var e=[],i=0;i<t.length;++i)for(var n=i+1;n<t.length;++n)for(var s=v(t[i],t[n]),a=0;a<s.length;++a){var o=s[a];o.sO=[i,n],e.push(o)}return e},p=function(t,e){var i=Math.sqrt(t*t-e*e);return e*i+t*t*Math.atan2(e,i)},g=function(t,e){return p(t,e-t)-p(t,-t)},f=function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},m=function(t,e,i){return i>=t+e?0:i<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):g(t,t-(i*i-e*e+t*t)/(2*i))+g(e,e-(i*i-t*t+e*e)/(2*i))},v=function(t,e){var i=f(t,e),n=t.Eb,s=e.Eb;if(i>=n+s||i<=Math.abs(n-s))return[];var a=(n*n-s*s+i*i)/(2*i);s=Math.sqrt(n*n-a*a),n=t.x+a*(e.x-t.x)/i,a=t.y+a*(e.y-t.y)/i;var o=s/i*-(e.y-t.y);return[{x:n+o,y:a-(i=s/i*-(e.x-t.x))},{x:n-o,y:a+i}]},b=function(t){for(var e={x:0,y:0},i=0;i<t.length;++i)e.x+=t[i].x,e.y+=t[i].y;return e.x/=t.length,e.y/=t.length,e},y=function(t,e,i){return Math.min(t,e)*Math.min(t,e)*Math.PI<=i+1e-10?Math.abs(t-e):function(t,e){var i=0,n=n||{},s=n.zI||100;n=n.Ota||1e-10;var a=t(i),o=t(e),r=e-i;if(0<a*o)throw"Initial points must have opposite signs";if(0===a)return i;if(0===o)return e;for(o=0;o<s;++o){var l=i+(r/=2),h=t(l);if(0<=h*a&&(i=l),Math.abs(r)<n||0===h)return l}return i+r}((function(n){return m(t,e,n)-i}),t+e)},S=function(t){t=t.slice();var e,i=[],n={};for(e=0;e<t.length;++e){var s=t[e];if(1==s.ji.length)i.push(s.ji[0]);else if(2==s.ji.length){var a=s.ji[0],o=s.ji[1];n[[a,o]]=!0,n[[o,a]]=!0}}for(e=0;e<i.length;++e)for(a=i[e],s=e+1;s<i.length;++s)[a,o=i[s]]in n||t.push({ji:[a,o],size:0,SD:window.NaN});return t},x=function(t,e){var i=C(t);if(8<=t.length){var n=w(t,e);T(n,t)+1e-8<T(i,t)&&(i=n)}return i},w=function(e,i){function s(t,e){var i,n=d,s=0;for(i=0;i<e.length;++i)e[i]=0;for(i=0;i<n.length;++i)for(var a=t[2*i],o=t[2*i+1],r=i+1;r<n.length;++r){var l=t[2*r],h=t[2*r+1],c=n[i][r],u=p[i][r],g=(l-a)*(l-a)+(h-o)*(h-o),f=Math.sqrt(g);g-=c*c,0<u&&f<=c||0>u&&f>=c||(s+=2*g*g,e[2*i]+=4*g*(a-l),e[2*i+1]+=4*g*(o-h),e[2*r]+=4*g*(l-a),e[2*r+1]+=4*g*(h-o))}return s}var o,r=(i=i||{}).Kta||10,l=[],c={};for(o=0;o<e.length;++o){var u=e[o];1==u.ji.length&&(c[u.ji[0]]=l.length,l.push(u))}o=function(e,i,s){var a=n(i.length,i.length),o=n(i.length,i.length);return e=(0,t.Ye)(e,(function(t){return 2==t.ji.length})),(0,t.Wa)(e,(function(t){var e=s[t.ji[0]],n=s[t.ji[1]],r=y(Math.sqrt(i[e].size/Math.PI),Math.sqrt(i[n].size/Math.PI),t.size);a[e][n]=a[n][e]=r,r=0,t.size+1e-10>=Math.min(i[e].size,i[n].size)?r=1:1e-10>=t.size&&(r=-1),o[e][n]=o[n][e]=r})),{pea:a,Xda:o}}(e,l,c);var d=o.pea,p=o.Xda,g=a((0,t.Wa)(d,a))/d.length;for(d=(0,t.Wa)(d,(function(e){return(0,t.Wa)(e,(function(t){return t/g}))})),o=0;o<r;++o){for(c=[],u=0;u<2*d.length;u++)c.push(1/(u+1)*Math.abs(Math.sin(o)));if(c=h(s,c,i),!f||c.Se<f.Se)var f=c}for(r=f.x,f={},o=0;o<l.length;++o)f[(c=l[o]).ji[0]]={x:r[2*o]*g,y:r[2*o+1]*g,Eb:Math.sqrt(c.size/Math.PI)};return f},C=function(e){function i(t,e){return e.size-t.size}function n(t){return t.set in p}function s(t,e){o[e].x=t.x,o[e].y=t.y,p[e]=!0}for(var a,o={},r={},l=0;l<e.length;++l){var h=e[l];1==h.ji.length&&(a=h.ji[0],o[a]={x:1e10,y:1e10,Lta:o.length,size:h.size,Eb:Math.sqrt(h.size/Math.PI)},r[a]=[])}for(e=(0,t.Ye)(e,(function(t){return 2==t.ji.length})),l=0;l<e.length;++l){h=e[l];var c=t.p(h.weight)?h.weight:1,u=h.ji[0],d=h.ji[1];h.size+1e-10>=Math.min(o[u].size,o[d].size)&&(c=0),r[u].push({set:d,size:h.size,weight:c}),r[d].push({set:u,size:h.size,weight:c})}for(a in h=[],r)if(r.hasOwnProperty(a)){for(l=c=0;l<r[a].length;++l)c+=r[a][l].size*r[a][l].weight;h.push({set:a,size:c})}h.sort(i);var p={};for(s({x:0,y:0},h[0].set),l=1;l<h.length;++l){c=h[l].set;var g=(0,t.Ye)(r[c],n);if(a=o[c],g.sort(i),0===g.length)throw"ERROR: missing pairwise overlap information";for(u=[],d=0;d<g.length;++d){var f=o[g[d].set],m=y(a.Eb,f.Eb,g[d].size);u.push({x:f.x+m,y:f.y}),u.push({x:f.x-m,y:f.y}),u.push({y:f.y+m,x:f.x}),u.push({y:f.y-m,x:f.x});for(var b=d+1;b<g.length;++b){var S=o[g[b].set],x=y(a.Eb,S.Eb,g[b].size);for(S=v({x:f.x,y:f.y,Eb:m},{x:S.x,y:S.y,Eb:x}),x=0;x<S.length;++x)u.push(S[x])}}for(a=1e50,g=u[0],d=0;d<u.length;++d)o[c].x=u[d].x,o[c].y=u[d].y,(f=T(o,e))<a&&(a=f,g=u[d]);s(g,c)}return o},T=function(e,i){for(var n=0,s=0;s<i.length;++s){var a=i[s];if(1!=a.ji.length){if(2==a.ji.length){var o=e[a.ji[0]],r=e[a.ji[1]];o=m(o.Eb,r.Eb,f(o,r))}else o=u((l=a.ji,(0,t.Wa)(l,(function(t){return e[t]}))));n+=(t.p(a.weight)?a.weight:1)*(o-a.size)*(o-a.size)}}var l;return n},D=function(t,e){var i;if(t.sort((function(t,e){return e.Eb-t.Eb})),0<t.length){var n=t[0].x,s=t[0].y;for(i=0;i<t.length;++i)t[i].x-=n,t[i].y-=s}if(1<t.length)for(i=Math.atan2(t[1].x,t[1].y)-e,n=Math.cos(i),s=Math.sin(i),i=0;i<t.length;++i){var a=t[i].x,o=t[i].y;t[i].x=n*a-s*o,t[i].y=s*a+n*o}if(2<t.length){for(i=Math.atan2(t[2].x,t[2].y)-e;0>i;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI)for(n=t[1].y/(1e-10+t[1].x),i=0;i<t.length;++i)s=(t[i].x+n*t[i].y)/(1+n*n),t[i].x=2*s-t[i].x,t[i].y=2*s*n-t[i].y}},k=function(e){function i(i){return{max:Math.max.apply(null,(0,t.Wa)(e,(function(t){return t[i]+t.Eb}))),min:Math.min.apply(null,(0,t.Wa)(e,(function(t){return t[i]-t.Eb})))}}return{Sq:i("x"),st:i("y")}},$=function(e){function i(t,e,i){if(t){var n=t.Ta;if(e)e=r.Sq.max-n.Sq.min+l;else{e=r.Sq.max-n.Sq.max;var a=(n.Sq.max-n.Sq.min)/2-(r.Sq.max-r.Sq.min)/2;0>a&&(e+=a)}for(i?i=r.st.max-n.st.min+l:(i=r.st.max-n.st.max,0>(a=(n.st.max-n.st.min)/2-(r.st.max-r.st.min)/2)&&(i+=a)),n=0;n<t.length;++n)t[n].x+=e,t[n].y+=i,s.push(t[n])}}var n=Math.PI/2;null===n&&(n=Math.PI/2);var s=[];for(o in e)if(e.hasOwnProperty(o)){var a=e[o];s.push({x:a.x,y:a.y,Eb:a.Eb,Y5:o})}var o=function(e){function i(t){return t.parent!==t&&(t.parent=i(t.parent)),t.parent}e=(0,t.Wa)(e,(function(t){return t.parent=t}));for(var n=0;n<e.length;++n)for(var s=n+1;s<e.length;++s)f(e[n],e[s])+1e-10<e[n].Eb+e[s].Eb&&(a=e[s],o=e[n],i(a).parent=i(o));var a,o;for(s={},n=0;n<e.length;++n){var r=i(e[n]).parent.Y5;r in s||(s[r]=[]),s[r].push(e[n])}for(r in(0,t.Wa)(e,(function(t){delete t.parent})),e=[],s)s.hasOwnProperty(r)&&e.push(s[r]);return e}(s);for(e=0;e<o.length;++e)D(o[e],n),a=k(o[e]),o[e].size=(a.Sq.max-a.Sq.min)*(a.st.max-a.st.min),o[e].Ta=a;o.sort((function(t,e){return e.size-t.size}));var r=(s=o[0]).Ta,l=(r.Sq.max-r.Sq.min)/50;for(n=1;n<o.length;)i(o[n],!0,!1),i(o[n+1],!1,!0),i(o[n+2],!0,!0),n+=3,r=k(s);for(n={},e=0;e<s.length;++e)n[s[e].Y5]=s[e];return n},O=function(t,e,i){var n,s=e[0].Eb-f(e[0],t);for(n=1;n<e.length;++n){var a=e[n].Eb-f(e[n],t);a<=s&&(s=a)}for(n=0;n<i.length;++n)(a=f(i[n],t)-i[n].Eb)<=s&&(s=a);return s},P=function(e,i){var n,s=[];for(n=0;n<e.length;++n){var a=e[n];s.push({x:a.x,y:a.y}),s.push({x:a.x+a.Eb/2,y:a.y}),s.push({x:a.x-a.Eb/2,y:a.y}),s.push({x:a.x,y:a.y+a.Eb/2}),s.push({x:a.x,y:a.y-a.Eb/2})}a=s[0];var o=O(s[0],e,i);for(n=1;n<s.length;++n){var r=O(s[n],e,i);r>=o&&(a=s[n],o=r)}for(s={x:(n=c((function(t){return-1*O({x:t[0],y:t[1]},e,i)}),[a.x,a.y],{zI:500,Y3:1e-10}).x)[0],y:n[1]},a=!0,n=0;n<e.length;++n)if(f(s,e[n])>e[n].Eb){a=!1;break}for(n=0;n<i.length;++n)if(f(s,i[n])<i[n].Eb){a=!1;break}return a||(1==e.length?s={x:e[0].x,y:e[0].y}:(u(e,n={}),s=0===n.yC.length?{x:0,y:-1e3,oea:!0}:1==n.yC.length?{x:n.yC[0].rn.x,y:n.yC[0].rn.y}:i.length?P(e,[]):b((0,t.Wa)(n.yC,(function(t){return t.ei}))))),s},L=function(e,i){function n(t){t.I(4294967295)}t.Bx.call(this),this.Ga("venn"),this.sd=null,this.data(e||null,i),this.b=[],this.Fa=this.jm=null,this.i={},this.o=this.D=null,this.state=new t.ix(this),this.f=null,t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj);var s={};t.T(s,[["fill",16896,1],["hatchFill",16896,1],["stroke",16896,1],["labels",0,0],["markers",0,0]]),this.ca=new t.my(this,s,t.gm),this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ta("labelsAfterInitCallback",t.sy),this.ca.ta("markersAfterInitCallback",t.ty),s={},t.T(s,[["fill",16384,1],["hatchFill",16384,1],["stroke",16384,1],["labels",0,0],["markers",0,0]]),this.za=new t.my(this,s,t.vo),t.W(this,"hovered",this.za),this.Ea=new t.my(this,s,t.wo),t.W(this,"selected",this.Ea),this.za.ta("markersAfterInitCallback",n),this.Ea.ta("markersAfterInitCallback",n),this.ca.ta("labelsFactoryConstructor",t.ny),this.za.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsFactoryConstructor",t.oy),this.ca.ta("markersFactoryConstructor",t.qy),this.za.ta("markersFactoryConstructor",t.ry),this.Ea.ta("markersFactoryConstructor",t.ry),t.T(this.ua,[["dataSeparator",4096,1]])},I=function(e,i){if(!i||i.target!=e.eg()){var n=e.$().j("tooltip");n.Lc(!0);var s=e.Ic();i&&t.Ow(n,i.clientX,i.clientY,s)}},A=function(e){if(e.J(16384))for(var i=e.Ec(),n=0;n<e.b.length;n++){var s=e.b[n];i.select(s.SD),s=s.ji;var a=!1,o=e.Ua(),r=t.cm("fill",1,!1);if(1==s.length){var l=e.cc().nc(n);i.j("paletteFill",l);var h=s[0];e.i[h].Gta=l,e.i[h].o5=r(e,t.gm,!0)}else{for(a=[],o={},r=0;r<s.length;r++)h=s[r],l=e.i[h],a.push(l.o5),o[h]=l.o5;i.j("parentColors",a),i.j("parentColorsMap",o),a=!0,o=e.ju().Ua()}s=i.get("normal"),s=t.Zo(t.p(s)?s.hatchFill:void 0,i.get("hatchFill"),e.ve().nc(n)),i.j("hatchFillPaletteFill",s),i.j("isIntersection",a),i.j("paletteMarkerType",e.Nf().nc(n)),i.j("tooltip",o)}},E=function(e){if(e.length){for(var i,n=0;n<e.length;n++){var s=t.Ub(e[n]);i=i?t.Kl(i,s):s}return i||"black"}return"black"},G=function(t,e,i){if((e=e.yC).length)if(1==e.length)e=e[0].rn,t.moveTo(e.x+e.Eb+i.left,e.y+i.top).arcTo(e.Eb,e.Eb,0,360);else if(1<e.length){t.moveTo(e[0].el.x+i.left,e[0].el.y+i.top);for(var n=0;n<e.length;++n){var s=e[n];t.Ff(s.ei.x+i.left,s.ei.y+i.top,s.rn.Eb,s.rn.Eb,s.width>s.rn.Eb,!0)}t.close()}},U=function(e,i,n){var s=n.j("marker");if(s&&!n.j("isMissing")){var a=!!n.j("isIntersection"),o=a?e.ju():e,r=e.Qa().Db(),l=!!((i=t.em(i))&t.vo);i=!!(i&t.wo);var h=n.get("normal");h=t.p(h)?h.marker:void 0;var c=n.get("hovered");c=t.p(c)?c.marker:void 0;var u=n.get("selected");u=t.p(u)?u.marker:void 0;var d=t.Zo(h,n.get("marker"),{});c=t.Zo(c,n.get("hoverMarker")),h=t.Zo(u,n.get("selectMarker")),i?t.Sc(d,h||{}):l&&t.Sc(d,c||{}),u=d,c=i?h:l?c:d,o=i?o.selected().Db():l?o.lb().Db():o.Qa().Db(),h=i?e.selected().Db():l?e.lb().Db():e.Qa().Db(),d=c&&t.p(c.enabled)?c.enabled:null;var p=o.enabled();(null===d?null===p?r.enabled():p:d)?(r=e.Qa().Db().F(),l=i?e.selected().Db().F():l?e.lb().Db().F():{},e=a?e.ju().Qa().Db().F():{},i=a?o.F():{},t.Sc(r,l,e,i,u),d=r,t.p(d.type)||(d.type=o.Ma()||h.Ma()||n.j("paletteMarkerType")),t.p(d.fill)||(e=n.j("paletteFill"),a&&(n=n.j("parentColors"),(e=E(n)).opacity=1),d.fill=o.Tm()||h.Tm()||e),s.Hi(),s.enabled(!0),t.gy(s,o),s.td(d,c)):(t.gy(s,o),s.enabled(!1)),s.W()}},F=function(t,e){return new L(t,e)};t.H(e,t.V),t.Gq(e,["fill","stroke","hatchFill","labels","markers"],"normal"),t.g=e.prototype,t.g.ra=274496|t.V.prototype.ra,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.de=function(){this.va(4096)},t.g.xI=function(){this.Qa().labels().I(4294967295),this.lb().labels().I(4294967295),this.selected().labels().I(4294967295)},t.g.Mn=function(){this.va(262144)},t.g.Ua=function(e){if(!this.gb){this.gb=new t.ww(0);var i=this.pa.Ua();t.W(this,"tooltip",this.gb),this.gb.parent(i),this.gb.ya(this.pa)}return t.p(e)?(this.gb.N(e),this):this.gb},t.g.Kg=function(){t.W(this,"normal",this.ca),t.W(this,"hovered",this.za),t.W(this,"selected",this.Ea)},t.g.F=function(){var t=e.u.F.call(this);return t.normal=this.ca.F(),t.hovered=this.za.F(),t.selected=this.Ea.F(),t.tooltip=this.Ua().F(),t},t.g.U=function(t,i){e.u.U.call(this,t,i),this.ca.ga(!!i,t),this.ca.ga(!!i,t.normal),this.za.ga(!!i,t.hovered),this.Ea.ga(!!i,t.selected),this.Ua().ga(!!i,t.tooltip)},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.gb),e.u.R.call(this),this.gb=this.Ea=this.za=this.ca=null};var M=e.prototype;M.normal=M.Qa,M.hovered=M.lb,M.selected=M.selected,M.tooltip=M.Ua,t.H(L,t.Bx),t.Gq(L,["fill","stroke","hatchFill","labels","markers"],"normal"),t.g=L.prototype,t.g.ra=t.Bx.prototype.ra,t.g.sa=61440|t.Bx.prototype.sa,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.Ma=function(){return"venn"},t.g.Ue=function(){return[this]},t.g.Ak=function(){return!1},t.g.kt=function(){return!0},t.g.ml=function(t){var e=this.$();this.jm.Mo(t,e.j("shapes"))};var _={};t.rq(_,0,"dataSeparator",t.zq),t.U(L,_),t.g=L.prototype,t.g.eh=function(){return!0},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.sc=function(e,i,n,s,a,o,r){return o=this.$().j("isIntersection")?this.ju():this,a=0==i?this.ca:1==i?this.za:this.Ea,o=0==i?o.Qa():1==i?o.lb():o.selected(),r?a.g(e):(r=n.get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),o.nd(e),a.nd(e),o.vf(e),a.vf(e)),t.p(e)&&(e=s(e)),e)},t.g.Eh=function(){return this.$().j("hatchFillPaletteFill")||t.Yb("diagonal-brick")},t.g.Yi=function(){var t=this.$(),e=this.Eh();return{index:t.ma(),sourceHatchFill:e,iterator:t}},t.g.Ge=function(t){var e=this.$();return t=t||e.j("paletteFill")||this.g("color")||"blue",t={index:e.ma(),sourceColor:t,iterator:e},e.j("isIntersection")&&(t.parentColors=e.j("parentColors"),t.parentColorsMap=e.j("parentColorsMap")),t},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.Pf,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)},t.g.de=function(e){t.X(e,1)&&this.B(8192,1)},t.g.Mn=function(e){t.X(e,1)&&this.B(33280,65)},t.g.Ol=function(e,i){var n=[];if(this.yj())return n;this.pb(),A(this);for(var s,a=this.$().reset();a.advance();)if(!a.j("isMissing")){s=a.ma();var o=a.get("legendItem")||{},r=null;t.D(i)&&((r=this.Ic()).b=this.ce(s),r=i.call(r,r)),t.z(r)||(r=String(t.p(a.get("name"))?a.get("name"):a.get("x")));var l=t.cm("fill",1,!1),h=t.cm("stroke",2,!1),c=t.cm("hatchFill",3,!1);if(a.j("isIntersection")){var u=a.j("parentColors");u=E(u)}r={enabled:!0,meta:{pointIndex:s,pointValue:a.get("value"),series:this},iconType:this.Qa().Db().enabled()?a.j("paletteMarkerType"):"square",text:r,iconStroke:a.get("stroke")||h(this,t.gm,!0),iconFill:a.get("fill")||u||l(this,t.gm,!0),iconHatchFill:a.get("hatchFill")||c(this,t.gm,!0)},t.Sc(r,o),r.sourceUid=t.oa(this),r.sourceKey=s,n.push(r)}return n},t.g.Ms=function(){return!0},t.g.zr=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.wq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.vq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():t.J(e,t.Mr)?this.la=this.Yc=e.Yd():this.la=(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(4356,1)),this}return this.la},t.g.dd=function(){this.B(4352,1)},t.g.Ec=function(){return this.sd=this.la.$()},t.g.iea=function(t,e){return t.ji.length-e.ji.length},t.g.ju=function(i){return this.f||(this.f=new e(this),this.f.Kg(),t.K(this.f,this.Zga,this)),t.p(i)?(this.f.N(i),this):this.f},t.g.Zga=function(e){var i=0;t.X(e,4096)&&(i|=8192),t.X(e,262144)&&(i|=32768),t.X(e,8192)&&(i|=16384),t.X(e,64)&&(i|=512),this.B(i,1)},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget);return e.pointIndex=t.N(i.index),e},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.ce=function(e){return new t.EA(this,e)},t.g.$i=function(e,i){if(!this.enabled())return this;if(t.A(e)){for(var n=t.sx(this.state,t.vo),s=0;s<n.length;s++)t.Aa(e,n[s])||this.state.Vh(t.vo,n[s]);t.qx(this.state,e),t.p(i)&&I(this,i)}else t.ea(e)&&(this.Md(),t.qx(this.state,e),t.p(i)&&I(this,i));return this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo)},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(e){var i,n;(i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()&&(n=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.vo,n))},t.g.pk=function(t,e){var i=this.$();return this.jm.Mo(t,i.j("shapes")),this.ke(t,i),U(this,t,i),e},t.g.wm=t.ia,t.g.pq=t.ia,t.g.Xl=function(t){return this.gd().hoverMode(t)},t.g.ej=function(t){return this.gd().selectionMode(t)},t.g.Ii=function(e,i){var n=!(i&&i.shiftKey);return t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,n?t.vo:void 0)):t.ea(e)&&this.state.Lh(t.wo,e,n?t.vo:void 0),I(this,i),this},t.g.Gu=function(){this.enabled()&&this.state.Lh(t.wo)},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.ie=function(e){var i;this.enabled()&&(i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i))},t.g.rr=function(e){return t.nx(this.state,e)},t.g.Ic=function(e){var i=this.$();this.oe&&!e||(this.oe=new t.Fw),this.oe.lg(i).Li([this.ce(i.ma()),this]);var n=i.ma();e=0;for(var s=t.sx(this.state,t.wo),a=0;a<s.length;a++)i.select(s[a]),e+=i.get("value");return i.select(n),n=i.get("x"),s=t.p(i.get("name"))?i.get("name"):n,i={x:{value:n,type:"string"},value:{value:i.get("value"),type:"number"},index:{value:i.ma(),type:"number"},chart:{value:this,type:""},name:{value:s,type:"string"},isIntersection:{value:!!i.j("isIntersection"),type:"string"},selectedPointsSum:{value:e,type:"number"}},t.ov(this.oe,i)},t.g.QJ=function(t){this.$().j("tooltip").WP(t.clientX,t.clientY)},t.g.pb=function(){if(this.J(4096)&&!this.yj()){this.B(16384);for(var e,i,n=this.Ec(),s={},a=[];n.advance();)if(e=n.get("x"),i=n.ma(),t.A(e))1==e.length&&(s[String(e[0])]=e),a[i]=e;else{e=String(e);var o=this.g("dataSeparator");1==(o=e.split(o)).length&&(s[e]=e),a[i]=o}for(i=0;i<a.length;i++)if((e=a[i])&&1<e.length)for(o=0;o<e.length;o++)if(!(e[o]in s)){n.select(i),n.j("isMissing",!0);break}for(this.b.length=0,this.i={},this.o=null,n=this.Ec(),s=this.g("dataSeparator");n.advance();)n.j("isMissing")||(a=n.get("x"),i={size:i=Number(n.get("value")),SD:e=n.ma()},t.A(a)?(i.ji=a,1==a.length&&(this.i[a.join(s)]=i)):(e=(a=String(a)).split(s),i.ji=e,1==e.length&&(this.i[a]=i)),this.b.push(i));t.Ra(this.b,this.iea),A(this),n=function(t){var e=e||{};e.zI=e.zI||500;var i=e.vta||x,n=i(t=S(t));i=[];var s=[];for(a in n)n.hasOwnProperty(a)&&(i.push(n[a].x),i.push(n[a].y),s.push(a));for(e=c((function(e){for(var i={},a=0;a<s.length;++a){var o=s[a];i[o]={x:e[2*a],y:e[2*a+1],Eb:n[o].Eb}}return T(i,t)}),i,e).x,i=0;i<s.length;++i){var a=s[i];n[a].x=e[2*i],n[a].y=e[2*i+1]}return n}(this.b),this.o=$(n),this.I(4096)}},t.g.Qh=function(e){var i;if(this.pb(),this.jm||(this.jm=new t.WA(this,[t.nH,t.oH,t.qH],!0),t.RA(this.jm,this.Na)),0<e.width&&0<e.height){if(this.J(4)){this.jm.uv();var n=this.o,s=e.width,a=e.height,o=[],r=[];for(var l in n)n.hasOwnProperty(l)&&(r.push(l),o.push(n[l]));n=(l=k(o)).Sq,l=l.st;var h=Math.min(a/(l.max-l.min),s/(n.max-n.min));s=(s-(n.max-n.min)*h)/2;var c=(a-(l.max-l.min)*h)/2;a={};for(var d=0;d<o.length;++d){var p=o[d];a[r[d]]={Eb:h*p.Eb,x:s+(p.x-n.min)*h,y:c+(p.y-l.min)*h}}for(var g in o=this.b,r=[],n={},l=[],a)l.push(g),n[g]=[];for(g=0;g<l.length;g++)for(h=a[l[g]],s=g+1;s<l.length;++s)c=a[l[s]],(d=f(h,c))+c.Eb<=h.Eb+1e-10?n[l[s]].push(l[g]):d+h.Eb<=c.Eb+1e-10&&n[l[g]].push(l[s]);for(g=0;g<o.length;++g){for(l=o[g].ji,s={},c={},h=o[g].SD,d=0;d<l.length;++d){s[l[d]]=!0,p=n[l[d]];for(var m=0;m<p.length;++m)c[p[m]]=!0}for(i in d=[],p=[],a)i in s?d.push(a[i]):i in c||p.push(a[i]);s=P(d,p),r[h]=s,s.oea&&0<o[g].size&&t.kl(22,null,[String(l)])}for(this.D=r,i=0;i<this.b.length;i++){if(o=(n=this.b[i]).SD,(r=this.$()).select(o),r=[],1==(n=n.ji).length)g=n[0],r.push(a[g]);else for(l=0;l<n.length;l++)g=n[l],r.push(a[g]);u(r,n={}),r=(o=this.jm.ed(this.rr(o))).hatchFill,g=o.stroke,G(o.fill,n,e),G(r,n,e),G(g,n,e)}this.B(40960),this.I(16384)}if(this.J(8192)){for((a=this.Qa().labels()).clear(),a.O(this.Na),i=0;i<this.b.length;i++)o=(n=this.b[i]).SD,(r=this.$()).select(o),n=this.D[o],g=this.Ic(!0),n={value:{x:e.left+n.x,y:e.top+n.y}},n=a.add(g,n,o),r.j("label",n),this.ke(t.nx(this.state,o),r);a.W(),this.ju().xI(),this.I(8192)}if(this.J(32768)){for((a=this.Qa().Db()).ka(),a.O(this.Na),a.clear(),i=0;i<this.b.length;i++)o=(n=this.b[i]).SD,(r=this.$()).select(o),n=this.D[o],n={value:{x:e.left+n.x+.5,y:e.top+n.y+.5}},n=a.add(n,o),r.j("marker",n),U(this,t.nx(this.state,o),r);a.da(!1),a.W(),(e=this.ju()).Qa().Db().I(4294967295),e.lb().Db().I(4294967295),e.selected().Db().I(4294967295),this.I(32768)}if(this.J(16384)){for(A(this),r=this.Ec();r.advance();)this.jm.Mo(this.rr(r.ma()),r.j("shapes"));this.I(16384)}}},t.g.ke=function(e,i){var n=i.j("label");if(n&&!i.j("isMissing")){var s=i.j("isIntersection")?this.ju():this,a=!!((e=t.em(e))&t.vo),o=!!(e&t.wo),r=i.get("normal");r=t.p(r)?r.label:void 0;var l=i.get("hovered");l=t.p(l)?l.label:void 0;var h=i.get("selected");h=t.p(h)?h.label:void 0,r=t.Zo(r,i.get("label"),null),l=t.Zo(l,i.get("hoverLabel"),null),h=t.Zo(h,i.get("selectLabel"),null),h=o?h:a?l:null,l=o?s.selected().labels():a?s.lb().labels():null;var c=s.Qa().labels(),u=o?this.selected().labels():a?this.lb().labels():null,d=this.Qa().labels(),p=o?s.selected().labels().oa:a?s.lb().labels().oa:null;s=s.Qa().labels().oa,a=o?this.selected().labels().oa:a?this.lb().labels().oa:null,o=this.Qa().labels().oa;var g=h&&t.p(h.enabled)?h.enabled:null,f=r&&t.p(r.enabled)?r.enabled:null,m=l&&null!==l.enabled()?l.enabled():null,v=c&&null!==c.enabled()?c.enabled():null,b=u?u.enabled():null,y=d.enabled();(null===g?null===f?null===m?null===v?null===b?y:b:v:m:f:g)?(n.Hi(),n.enabled(!0),n.state("labelOwnSettings",n.Pa,0),n.state("pointState",h,1),n.state("pointNormal",r,2),n.state("intersectionsState",l,3),n.state("intersectionsNormal",c,4),n.state("chartState",u,5),n.state("chartNormal",d,6),n.state("intersectionsStateTheme",p,7),n.state("chartStateTheme",a,8),n.state("auto",n.Nd,9),n.state("intersectionsNormalTheme",s||null,10),n.state("chartNormalTheme",o||null,11)):n.enabled(!1),n.W()}},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.yj=function(){return!this.$().Hb()},t.g.F=function(){var e=L.u.F.call(this);return t.Tq(this,_,e,"Venn"),e.data=this.data().F(),e.normal=this.Qa().F(),e.hovered=this.lb().F(),e.selected=this.selected().F(),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),e.markerPalette=this.Nf().F(),e.intersections=this.ju().F(),{chart:e}},t.g.U=function(e,i){L.u.U.call(this,e,i),t.Iq(this,_,e,i),this.data(e.data),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.cc().ga(!!i,e.palette),this.Nf().ga(!!i,e.markerPalette),this.ve().ga(!!i,e.hatchFillPalette),this.ju().ga(!!i,e.intersections)},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.Fa,this.fd,this.He,this.jm,this.f,this.Yc,this.la),this.Yc=this.f=this.jm=this.He=this.fd=this.Fa=this.Ea=this.za=this.ca=null,delete this.la,this.sd=null,L.u.R.call(this)};var N=L.prototype;N.data=N.data,N.getType=N.Ma,N.intersections=N.ju,N.normal=N.Qa,N.hovered=N.lb,N.selected=N.selected,N.palette=N.cc,N.hatchFillPalette=N.ve,N.markerPalette=N.Nf,N.hover=N.Tj,N.unhover=N.Md,N.select=N.select,N.unselect=N.ie,t.Tp.venn=F,t.E("anychart.venn",F)}.call(this,$)),_.table||(_.table=1,function(t){var e=function(t,e){this.Y=t,this.Wf=e?T:C},i=function(t){this.Y=t},n=function(e){t.od.call(this),this.i=e,this.aa=this.P=null},s=function(t,e,i){n.call(this,t),this.reset(e,i)},a=function(t,e){n.call(this,t),this.Ad=e,this.b=null},o=function(t,e){n.call(this,t),this.Ad=e,this.b=null},r=function(e,i){t.Y.call(this),this.b=[],this.f=t.P(i,4),this.i=t.P(e,5),this.o=0,this.P=[],this.K=[],this.G=[],this.ba=[],this.aa=[],this.D={fill:"none",cellBorder:"black",topPadding:0,rightPadding:0,bottomPadding:0,leftPadding:0,hAlign:"start",vAlign:"top",enabled:!0,wordWrap:"break-word",wordBreak:"normal"},this.D.fill="#fff"},l=function(t){if(t.J(2048)){var e,i,n=[],s=t.o?t.b.length/t.o:0,a=Math.min(s,t.i),o=Math.min(t.o,t.f);for(e=0;e<a;e++){for(i=0;i<o;i++)n.push(t.b[e*t.o+i]);for(i=o;i<t.f;i++)n.push(S(t,e,i));for(i=o;i<t.o;i++){var r=t,l=t.b[e*t.o+i];l.content(null),r.P.push(l)}}for(e=a;e<t.i;e++)for(i=0;i<t.f;i++)n.push(S(t,e,i));for(e=a;e<s;e++)for(i=0;i<t.o;i++)a=t,(o=t.b[e*t.o+i]).content(null),a.P.push(o);t.b=n,t.o=window.NaN,t.I(2048),t.B(1984)}},h=function(t){if(t.J(64)){var e=t.ob(),i=y(t.f,t.G,t.hs,t.gs,t.GL,t.FL,t.EL,e.width,t.aa);e=y(t.i,t.K,t.dt,t.ct,t.MK,t.LL,t.KL,e.height,t.ba),t.I(64),(i||e)&&(t.aa=i||t.aa,t.ba=e||t.ba,t.B(1792))}},c=function(e,i,n,s,a,o,r){if(o&&"none"!=o){var l=(o.thickness?o.thickness:1)%2?.5:0;switch(i=b(e,i,n,s,a),(n=t.Tl(o))in e.rv?e=e.rv[n]:(s=e.Qn.length?e.Qn.pop():t.qk(),e.wb.hc(s),t.C(o)&&"keys"in o&&!t.C(o.mode)&&((o=t.Sl(o)).mode=e.ob()),s.stroke(o),s.fill(null),e=e.rv[n]=s),r){case 0:e.moveTo(i.tb(),i.Vb()+l),e.lineTo(i.cb()+1,i.Vb()+l);break;case 1:e.moveTo(i.cb()+l,i.Vb()),e.lineTo(i.cb()+l,i.Va()+1);break;case 2:e.moveTo(i.tb(),i.Va()+l),e.lineTo(i.cb()+1,i.Va()+l);break;case 3:e.moveTo(i.tb()+l,i.Vb()),e.lineTo(i.tb()+l,i.Va()+1)}}},u=function(t,e,i){if(e||i){var n;if((n=e&&e.nb("bottomBorder"))||(n=i&&i.nb("topBorder"))||(n=e&&e.nb("border"))||(n=i&&i.nb("border")))return n;if(t.Un){var s=t.Un[(e||window.NaN)&&e.f],a=t.Un[(i||window.NaN)&&i.f];if((n=s&&s.nb("bottomBorder"))||(n=a&&a.nb("topBorder"))||(n=s&&s.nb("border"))||(n=a&&a.nb("border"))||(n=s&&s.nb("cellBottomBorder"))||(n=a&&a.nb("cellTopBorder"))||(n=s&&s.nb("cellBorder"))||(n=a&&a.nb("cellBorder")))return n}return(s=t.sn&&t.sn[(e||i).D])&&((n=!e&&(s.nb("topBorder")||s.nb("border"))||!i&&(s.nb("bottomBorder")||s.nb("border")))||(n=s.nb("cellBottomBorder"))||(n=s.nb("cellTopBorder"))||(n=s.nb("cellBorder"))||(n=s.nb("cellBorder")))||(n=!e&&(t.nb("topBorder")||t.nb("border"))||!i&&(t.nb("bottomBorder")||t.nb("border")))||(n=e&&t.nb("cellBottomBorder"))||(n=i&&t.nb("cellTopBorder"))?n:t.nb("cellBorder")||"none"}return"none"},d=function(t,e,i){if(e||i){var n;if((n=e&&e.nb("rightBorder"))||(n=i&&i.nb("leftBorder"))||(n=e&&e.nb("border"))||(n=i&&i.nb("border")))return n;var s=t.Un&&t.Un[(e||i).f];if(s&&((n=!e&&(s.nb("leftBorder")||s.nb("border"))||!i&&(s.nb("rightBorder")||s.nb("border")))||(n=s.nb("cellRightBorder"))||(n=s.nb("cellLeftBorder"))||(n=s.nb("cellBorder"))||(n=s.nb("cellBorder"))))return n;if(t.sn){s=t.sn[(e||window.NaN)&&e.D];var a=t.sn[(i||window.NaN)&&i.D];if((n=s&&s.nb("rightBorder"))||(n=a&&a.nb("leftBorder"))||(n=s&&s.nb("border"))||(n=a&&a.nb("border"))||(n=s&&s.nb("cellRightBorder"))||(n=a&&a.nb("cellLeftBorder"))||(n=s&&s.nb("cellBorder"))||(n=a&&a.nb("cellBorder")))return n}return(n=!e&&(t.nb("leftBorder")||t.nb("border"))||!i&&(t.nb("rightBorder")||t.nb("border")))||(n=e&&t.nb("cellRightBorder"))||(n=i&&t.nb("cellLeftBorder"))?n:t.nb("cellBorder")||"none"}return"none"},p=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.dt&&i in e.dt&&(delete e.dt[i],s=!0):(e.dt||(e.dt=[]),e.dt[i]!=n&&(e.dt[i]=n,s=!0)),s&&e.B(64,1),e}return e.dt&&i in e.dt?e.dt[i]:null},g=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.ct&&i in e.ct&&(delete e.ct[i],s=!0):(e.ct||(e.ct=[]),e.ct[i]!=n&&(e.ct[i]=n,s=!0)),s&&e.B(64,1),e}return e.ct&&i in e.ct?e.ct[i]:null},f=function(e,i,n){return t.p(n)?(e.G[i]!=n&&(null===n?delete e.G[i]:e.G[i]=n,e.B(64,1)),e):i in e.G?e.G[i]:null},m=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.hs&&i in e.hs&&(delete e.hs[i],s=!0):(e.hs||(e.hs=[]),e.hs[i]!=n&&(e.hs[i]=n,s=!0)),s&&e.B(64,1),e}return e.hs&&i in e.hs?e.hs[i]:null},v=function(e,i,n){if(t.p(n)){var s=!1;return null===n?e.gs&&i in e.gs&&(delete e.gs[i],s=!0):(e.gs||(e.gs=[]),e.gs[i]!=n&&(e.gs[i]=n,s=!0)),s&&e.B(64,1),e}return e.gs&&i in e.gs?e.gs[i]:null},b=function(e,i,n,s,a,o){l(e),h(e);var r=e.ob();o=t.J(o,t.I)?o:new t.I(0,0,0,0);var c=e.aa[n-1]+1||0;return n=e.aa[Math.min(n+a,e.f)-1],o.width=n-c,o.left=r.left+c,c=e.ba[i-1]+1||0,n=e.ba[Math.min(i+s,e.i)-1],o.height=n-c,o.top=r.top+c,o},y=function(e,i,n,s,a,o,r,l,h){var c,u=!1,d=0,p=[],g=[],f=[],m=0;a=t.L(a,l),o=t.L(o,l),r=t.L(r,l);var v=!1;for(c=0;c<e;c++){var b=n?t.L(n[c],l):window.NaN,y=s?t.L(s[c],l):window.NaN,S=i[c],x=b,w=y;S=t.L(S,l),x=t.L(x,l),w=t.L(w,l),(0,window.isNaN)(S)&&(S=a),(0,window.isNaN)(x)&&(x=o),(0,window.isNaN)(w)&&(w=r),(0,window.isNaN)(x)||(S=Math.max(S,x)),(0,window.isNaN)(w)||(S=Math.min(S,w)),(0,window.isNaN)(S)?(m++,(0,window.isNaN)(b)?(0,window.isNaN)(o)||(g[c]=o,v=!0):(g[c]=b,v=!0),(0,window.isNaN)(y)?(0,window.isNaN)(r)||(f[c]=r,v=!0):(f[c]=y,v=!0)):(d+=S,p[c]=S)}if(v&&0<m){var C=[];n=m*m;do{for(s=!1,i=Math.max(3*m,l-d)/m,c=0;c<e;c++)if(!(c in p))if(c in C){if(C[c]==g[c]&&g[c]<i){d-=g[c],m++,delete C[c],s=!0;break}if(C[c]==f[c]&&f[c]>i){d-=f[c],m++,delete C[c],s=!0;break}}else{if(c in g&&g[c]>i){d+=C[c]=g[c],m--,s=!0;break}if(c in f&&f[c]<i){d+=C[c]=f[c],m--,s=!0;break}}}while(s&&0<m&&n--)}for(g=0,f=[],i=Math.max(3*m,l-d)/m,c=0;c<e;c++)g+=S=c in p?p[c]:C&&c in C?C[c]:i,l=Math.round(g)-1,f[c]=l,l!=h[c]&&(u=!0);return u?f:null},S=function(t,e,i){return t.P.length?t.P.pop().reset(e,i):new s(t,e,i)},x=function(t,e,i,n,s,a){return i.o&&i.o[e]||n&&n.o&&n.o[e]||s&&s.o&&s.o[e]||t.D&&t.D[e]||a},w=function(t,e){r.call(this,t,e)};t.ux.prototype.ou=t.ca(15,(function(){return!0})),t.eB.prototype.ou=t.ca(14,(function(){return!1}));var C=["topBorder","rightBorder","bottomBorder","leftBorder"],T=["cellTopBorder","cellRightBorder","cellBottomBorder","cellLeftBorder"];e.prototype.top=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[0],e,256)},e.prototype.right=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[1],e,256)},e.prototype.bottom=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[2],e,256)},e.prototype.left=function(e,i,n,s,a){return null!=e&&(e=t.Wb.apply(null,arguments)),this.Y.nb(this.Wf[3],e,256)};var D=e.prototype;D.top=D.top,D.right=D.right,D.bottom=D.bottom,D.left=D.left;var k=["topPadding","rightPadding","bottomPadding","leftPadding"];i.prototype.top=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[0],e,1024)},i.prototype.right=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[1],e,1024)},i.prototype.bottom=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[2],e,1024)},i.prototype.left=function(e){return t.p(e)&&(e=t.Bo(e)||0),this.Y.nb(k[3],e,1024)};var $=i.prototype;$.top=$.top,$.right=$.right,$.bottom=$.bottom,$.left=$.left,t.H(n,t.od),t.g=n.prototype,t.g.nb=function(e,i,n){if(t.p(e)){if(t.p(i)){var s=!1;return null===i?this.o&&this.o[e]&&(delete this.o[e],s=!0):(this.o||(this.o={}),this.o[e]!=i&&(this.o[e]=i,s=!0)),s&&this.i.B(+n||1024,1),this}return this.o&&this.o[e]}return this.o||{}},t.g.fontSize=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontSize",e)},t.g.fontFamily=function(e){return t.p(e)&&(e=String(e)),this.nb("fontFamily",e)},t.g.Ica=function(e){return t.p(e)&&(e=String(e)),this.nb("fontColor",e)},t.g.Kca=function(e){return t.p(e)&&(e=t.Za(+e,0,1)),this.nb("fontOpacity",e)},t.g.Jca=function(e){return t.p(e)&&(e=t.bl(e)),this.nb("fontDecoration",e)},t.g.fontStyle=function(e){return t.p(e)&&(e=t.cl(e)),this.nb("fontStyle",e)},t.g.fontVariant=function(e){return t.p(e)&&(e=t.dl(e)),this.nb("fontVariant",e)},t.g.fontWeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontWeight",e)},t.g.letterSpacing=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("letterSpacing",e)},t.g.Lca=function(e){return t.p(e)&&(e=t.el(e)),this.nb("textDirection",e)},t.g.textShadow=function(e){return t.p(e)&&(e=t.Zb(e)),this.nb("textShadow",e)},t.g.lineHeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("lineHeight",e)},t.g.textIndent=function(e){return t.p(e)&&(e=(0,window.parseFloat)(t.Bo(e))),this.nb("textIndent",e)},t.g.vAlign=function(e){return t.p(e)&&(e=t.al(e)),this.nb("vAlign",e)},t.g.Bm=function(e){return t.p(e)&&(e=t.$k(e)),this.nb("hAlign",e)},t.g.wordWrap=function(t){return this.nb("wordWrap",t)},t.g.Xu=function(t){return this.nb("wordBreak",t)},t.g.textOverflow=function(e){return t.p(e)&&(e=String(e)),this.nb("textOverflow",e)},t.g.Hm=function(e){return t.p(e)&&(e=!!e),this.nb("selectable",e)},t.g.Dd=function(e){return t.p(e)&&(e=!!e),this.nb("disablePointerEvents",e)},t.g.Mca=function(e){return t.p(e)&&(e=!!e),this.nb("useHtml",e)},t.g.Hca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.i.ka(),this.nb("border",i,256);for(var r=0;4>r;r++)this.nb(C[r],null,256);return this.i.da(!0),this}return this.P||(this.P=new e(this,!1))},t.g.SW=function(e,n,s,a){if(t.p(e)){var o,r,l;if(t.A(e)){var h=e;e=h[0],n=h[1],s=h[2],a=h[3],h=h.length}else h=arguments.length;if(h)t.C(e)?(o=t.Bo(e.top)||0,r=t.Bo(e.right)||0,l=t.Bo(e.bottom)||0,c=t.Bo(e.left)||0):1==h?c=l=r=o=t.Bo(e)||0:2==h?(l=o=t.Bo(e)||0,c=r=t.Bo(n)||0):3==h?(o=t.Bo(e)||0,c=r=t.Bo(n)||0,l=t.Bo(s)||0):4<=h&&(o=t.Bo(e)||0,r=t.Bo(n)||0,l=t.Bo(s)||0,c=t.Bo(a)||0);else var c=l=r=o=0;return this.i.ka(),this.nb(k[0],o,1024),this.nb(k[1],r,1024),this.nb(k[2],l,1024),this.nb(k[3],c,1024),this.i.da(!0),this}return this.aa||(this.aa=new i(this))};var O=n.prototype;O.fontSize=O.fontSize,O.fontFamily=O.fontFamily,O.fontColor=O.Ica,O.fontOpacity=O.Kca,O.fontDecoration=O.Jca,O.fontStyle=O.fontStyle,O.fontVariant=O.fontVariant,O.fontWeight=O.fontWeight,O.letterSpacing=O.letterSpacing,O.textDirection=O.Lca,O.lineHeight=O.lineHeight,O.textIndent=O.textIndent,O.vAlign=O.vAlign,O.hAlign=O.Bm,O.wordWrap=O.wordWrap,O.wordBreak=O.Xu,O.textOverflow=O.textOverflow,O.selectable=O.Hm,O.disablePointerEvents=O.Dd,O.useHtml=O.Mca,O.border=O.Hca,t.H(s,n),t.g=s.prototype,t.g.reset=function(e,i){return(t.ea(this.Qd)||t.z(this.Qd))&&t.qd(this.gi),this.G=this.K=1,this.f=e,this.D=i,this.gi=this.Qd=null,this.b=window.NaN,delete this.o,this},t.g.content=function(e){if(t.p(e)){if(this.Qd!=e){if(this.Qd=e,this.gi&&this.i.eG(this.gi),t.ea(e)||t.z(e)){var i=this.i;i.rh||(i.rh=new t.Pu,i.rh.N(t.nm("standalones.labelsFactory")),i.rh.anchor("center"),i.rh.position("center")),this.gi=i.rh.add({value:String(e)},{value:{x:0,y:0}})}else t.J(e,t.ig)?(this.gi=t.ok(),this.gi.hc(e)):this.gi=e;this.i.B(1024,1)}return this}return this.Qd},t.g.Fx=function(e){return t.p(e)?((e=t.P(e,this.G))!=this.G&&(this.G=e,this.i.B(128,1)),this):this.G},t.g.Gx=function(e){return t.p(e)?((e=t.P(e,this.K))!=this.K&&(this.K=e,this.i.B(128,1)),this):this.K},t.g.Pca=function(){return this.f},t.g.Oca=function(){return this.D},t.g.En=function(){return this.i.En(this.f)},t.g.Nca=function(){return this.i.E_(this.D)},t.g.rb=function(){return b(this.i,this.f,this.D,this.K,this.G)},t.g.fill=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.padding=function(t,e,i,n){return this.SW.apply(this,arguments)},t.g.R=function(){(t.ea(this.Qd)||t.z(this.Qd))&&t.qd(this.gi),s.u.R.call(this)};var P=s.prototype;P.content=P.content,P.rowSpan=P.Gx,P.colSpan=P.Fx,P.padding=P.padding,P.getBounds=P.rb,P.getRowNum=P.Pca,P.getColNum=P.Oca,P.getRow=P.En,P.getCol=P.Nca,P.fill=P.fill,t.H(a,n),t.g=a.prototype,t.g.Tca=function(){return this.Ad},t.g.Sca=function(t){return this.i.Kz(t,this.Ad)},t.g.width=function(e){return t.p(e)?(f(this.i,this.Ad,e),this):f(this.i,this.Ad)},t.g.minWidth=function(e){return t.p(e)?(m(this.i,this.Ad,e),this):m(this.i,this.Ad)},t.g.maxWidth=function(e){return t.p(e)?(v(this.i,this.Ad,e),this):v(this.i,this.Ad)},t.g.G_=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.Qca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.i.ka(),this.nb("cellBorder",i,256);for(var r=0;4>r;r++)this.nb(T[r],null,256);return this.i.da(!0),this}return this.b||(this.b=new e(this,!0))},t.g.Rca=function(t,e,i,n){return this.SW.apply(this,arguments)};var L=a.prototype;L.width=L.width,L.maxWidth=L.maxWidth,L.minWidth=L.minWidth,L.getCell=L.Sca,L.getColNum=L.Tca,L.cellFill=L.G_,L.cellBorder=L.Qca,L.cellPadding=L.Rca,t.H(o,n),t.g=o.prototype,t.g.Xca=function(){return this.Ad},t.g.Wca=function(t){return this.i.Kz(this.Ad,t)},t.g.height=function(e){return t.p(e)?(this.i.y5(this.Ad,e),this):this.i.y5(this.Ad)},t.g.minHeight=function(e){return t.p(e)?(p(this.i,this.Ad,e),this):p(this.i,this.Ad)},t.g.maxHeight=function(e){return t.p(e)?(g(this.i,this.Ad,e),this):g(this.i,this.Ad)},t.g.H_=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.Uca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.i.ka(),this.nb("cellBorder",i,256);for(var r=0;4>r;r++)this.nb(T[r],null,256);return this.i.da(!0),this}return this.b||(this.b=new e(this,!0))},t.g.Vca=function(t,e,i,n){return this.SW.apply(this,arguments)};var I=o.prototype;I.height=I.height,I.maxHeight=I.maxHeight,I.minHeight=I.minHeight,I.getCell=I.Wca,I.getRowNum=I.Xca,I.cellFill=I.H_,I.cellBorder=I.Uca,I.cellPadding=I.Vca,t.H(r,t.wu),t.g=r.prototype,t.g.ra=t.wu.prototype.ra,t.g.sa=4032|t.wu.prototype.sa,t.g.rh=null,t.g.wb=null,t.g.PF=null,t.g.rv=null,t.g.Ov=null,t.g.Qn=null,t.g.QC=null,t.g.C_=null,t.g.D_=null,t.g.F_=null,t.g.Un=null,t.g.sn=null,t.g.dt=null,t.g.ct=null,t.g.hs=null,t.g.gs=null,t.g.MK=null,t.g.LL=null,t.g.KL=null,t.g.GL=null,t.g.FL=null,t.g.EL=null,t.g.wX=function(e){return t.p(e)?(e=t.P(e,this.i),this.i!=e&&((0,window.isNaN)(this.o)&&(this.o=this.f),this.i=e,this.B(2176,1)),this):this.i},t.g.qS=function(e){return t.p(e)?(e=t.P(e,this.f),this.f!=e&&((0,window.isNaN)(this.o)&&(this.o=this.f),this.f=e,this.B(2176,1)),this):this.f},t.g.Kz=function(e,i){return l(this),e=t.P(e,window.NaN,!0),i=t.P(i,window.NaN,!0),this.b[e*this.f+i]||null},t.g.En=function(e){return l(this),e=t.P(e,window.NaN,!0),(0,window.isNaN)(e)||e>=this.i?null:(this.Un||(this.Un=[]),e in this.Un||(this.Un[e]=new o(this,e)),this.Un[e])},t.g.E_=function(e){return l(this),e=t.P(e,window.NaN,!0),(0,window.isNaN)(e)||e>=this.f?null:(this.sn||(this.sn=[]),e in this.sn||(this.sn[e]=new a(this,e)),this.sn[e])},t.g.hka=function(e){return t.p(e)?(this.MK!=e&&(this.MK=e,this.B(64,1)),this):this.MK},t.g.jka=function(e){return t.p(e)?(this.LL!=e&&(this.LL=e,this.B(64,1)),this):this.LL},t.g.ika=function(e){return t.p(e)?(this.KL!=e&&(this.KL=e,this.B(64,1)),this):this.KL},t.g.Rda=function(e){return t.p(e)?(this.GL!=e&&(this.GL=e,this.B(64,1)),this):this.GL},t.g.Qda=function(e){return t.p(e)?(this.FL!=e&&(this.FL=e,this.B(64,1)),this):this.FL},t.g.Pda=function(e){return t.p(e)?(this.EL!=e&&(this.EL=e,this.B(64,1)),this):this.EL},t.g.yca=function(i,n,s,a,o){if(t.p(i)){null===i||(i=t.Wb.apply(null,arguments)),this.ka(),this.nb("border",i,256);for(var r=0;4>r;r++)this.nb(C[r],null,256);return this.da(!0),this}return this.C_||(this.C_=new e(this,!1))},t.g.Yda=function(e,i){var n;if(t.p(e)){var s=!t.A(e),a=0;if(!s){var o=e.length;for(n=0;n<o;n++){var r=e[n];if(!t.A(r)){s=!0;break}r.length>a&&(a=r.length)}}if(!s&&o&&a){if(this.ka(),this.wX(o),this.qS(a),i)for(n=0;n<o;n++)for(s=0;s<a;s++){var l=this.Kz(n,s);l.Gx(1),l.Fx(1)}for(n=0;n<o;n++)for(r=e[n],s=0;s<a;s++){l=this.Kz(n,s);var h=r[s];l.content(t.p(h)?h:null)}this.da(!0)}else t.il(3);return this}for(a=[],n=0;n<this.i;n++){for(r=[],s=0;s<this.f;s++)r.push(this.Kz(n,s).content());a.push(r)}return a},t.g.W=function(){if(!this.zc())return this;this.wb||(this.wb=t.ok(),t.ru(this,this.wb),this.PF=this.wb.Bd());var e=this.wb.Ja(),i=e&&!e.yf();if(i&&e.suspend(),this.J(4)&&(this.B(64),(t.uo(this.left())||t.uo(this.top()))&&this.B(1792),this.I(4)),this.rh&&this.rh.ka(),l(this),h(this),this.J(128)){var n,s;for(n=0;n<this.b.length;n++)this.b[n].b=window.NaN;for(var a=0;a<this.i;a++)for(var o=0;o<this.f;o++){var r=a*this.f+o,p=this.b[r];if((0,window.isNaN)(p.b)&&(1<p.Fx()||1<p.Gx())){for(n=Math.min(this.i,a+p.Gx());n-- >a;)for(s=Math.min(this.f,o+p.Fx());s-- >o;)this.b[n*this.f+s].b=r;p.b=window.NaN}}this.I(128),this.B(1792)}if(this.J(512)){if(this.Qn||(this.Qn=[]),this.Ov)for(var g in this.Ov)(n=this.Ov[g]).clear(),n.parent(null),this.Qn.push(n),delete this.Ov[g];else this.Ov={};for(g=0;g<this.i;g++)for(n=0;n<this.f;n++)if(o=this.b[g*this.f+n],(0,window.isNaN)(o.b)){var f=b(this,g,n,o.Gx(),o.Fx(),f);s=g,a=n,(s=(o=o.fill())||(o=this.Un&&this.Un[s]&&this.Un[s].H_())||(o=this.sn&&this.sn[a]&&this.sn[a].G_())||(o=s%2?this.B5():this.x5())?o:this.nb("fill"))&&((a=t.Tl(s))in this.Ov?s=this.Ov[a]:(o=this.Qn.length?this.Qn.pop():t.qk(),this.wb.Eg(o,0),o.fill(s),o.stroke(null),s=this.Ov[a]=o),a=f.tb(),o=f.cb()+1,r=f.Vb(),p=f.Va()+1,s.moveTo(a,r),s.lineTo(o,r),s.lineTo(o,p),s.lineTo(a,p),s.close())}this.I(512)}if(this.J(256)){if(this.Qn||(this.Qn=[]),this.rv)for(var m in this.rv)(f=this.rv[m]).clear(),f.parent(null),this.Qn.push(f),delete this.rv[m];else this.rv={};for(f=0;f<this.f;f++)g=this.b[f],(0,window.isNaN)(g.b)&&c(this,0,f,1,g.Fx(),u(this,void 0,g),0);for(m=0;m<this.i;m++)g=this.b[m*this.f],(0,window.isNaN)(g.b)&&c(this,m,0,g.Gx(),1,d(this,void 0,g),3);for(m=0;m<this.i;m++)for(f=0;f<this.f;f++)s=m*this.f+f,g=this.b[s],(n=this.b[s+this.f])?(0,window.isNaN)(g.b)?(0,window.isNaN)(n.b)||(n.b==s?g=n=void 0:n=this.b[n.b]):(0,window.isNaN)(n.b)?g=this.b[g.b]:g.b==n.b?g=n=void 0:(g=this.b[g.b],n=this.b[n.b]):(0,window.isNaN)(g.b)||(g=this.b[g.b]),c(this,m,f,1,1,u(this,g,n),2),s=m*this.f+f,g=this.b[s],(n=f+1==this.f?void 0:this.b[s+1])?(0,window.isNaN)(g.b)?(0,window.isNaN)(n.b)||(n.b==s?g=n=void 0:n=this.b[n.b]):(0,window.isNaN)(n.b)?g=this.b[g.b]:g.b==n.b?g=n=void 0:(g=this.b[g.b],n=this.b[n.b]):(0,window.isNaN)(g.b)||(g=this.b[g.b]),c(this,m,f,1,1,d(this,g,n),1);this.I(256)}if(this.J(1024)){if(this.QC)for(;this.QC.length;){var v=this.QC.pop();t.J(v,t.ig)?v.remove():(v.ka(),t.J(v,t.Tu)?(o=v,t.Zu(o)&&t.Zu(o).clear(o.ma())):t.J(v,t.ey)?(s=v,t.fy(s)&&t.fy(s).clear(s.ma())):t.J(v,t.Y)&&(v.ou&&v.ou()&&(s=v).Oz(s.B4),v.O(null),v.remove()),t.kr(v,this.QU),v.da(!1))}for(m=this.i*this.f,f=0;f<m;f++)s=this.b[f],!(0,window.isNaN)(s.b)&&(v=s.gi)&&(t.J(v,t.Fg)?(v.Gi(),t.qd(v)):(v.ka(),t.kr(v,this.QU),t.J(v,t.Tu)||t.J(v,t.ey)?v.enabled(!1):v.ou&&v.ou()&&(s=v).Oz(s.B4),v.O(null),v.remove(),v.da(!1)));for((m=new t.Hu).ka(),f=0;f<this.i;f++)for(g=0;g<this.f;g++)if(v=(s=this.b[f*this.f+g]).gi,n=t.J(v,t.ig),v){if(a=this.Un&&this.Un[f],r=this.sn&&this.sn[g],n||v.ka(),(0,window.isNaN)(s.b)){var y=b(this,f,g,s.Gx(),s.Fx(),y);if(m.top(this.JM("topPadding",s,a,r,this)),m.right(this.JM("rightPadding",s,a,r,this)),m.bottom(this.JM("bottomPadding",s,a,r,this)),m.left(this.JM("leftPadding",s,a,r,this)),y=m.Ej(y),n){v.parent(this.PF),o=v.xd(0);var S=x(this,"hAlign",s,a,r,"start");switch(p=x(this,"vAlign",s,a,r,"top"),"start"==S?S="rtl"==x(this,"textDirection",s,a,r,"rtl")?"right":"left":"end"==S&&(S="rtl"==x(this,"textDirection",s,a,r,"rtl")?"left":"right"),S){case"right":s=y.left+y.width-o.VT();break;case"center":s=y.left+(y.width-o.VT())/2;break;default:s=y.left}switch(p){case"bottom":a=y.top+y.height-o.UT();break;case"middle":a=y.top+(y.height-o.UT())/2;break;default:a=y.top}o.setPosition(s,a),v.clip(y)}else{if(v.O(this.PF),t.J(v,t.Tu)){if((o=v).jc({value:{x:y.left,y:y.top}}),t.Zu(o)==this.rh){o.anchor("left-top"),o.width(y.width),o.height(y.height),(v=r&&r.o)&&o.N(v),(v=a&&a.o)&&o.N(v),(v=s.o)&&o.N(v),o.da(!1);continue}a=o.g("position")||t.$u(o)&&t.$u(o).g("position")||t.Zu(o)&&t.Zu(o).g("position"),a={value:t.Eo(y,a)},o.jc(a),o.W()}else t.J(v,t.ey)?(a=(s=v).g("position")||t.gy(s)&&t.gy(s).g("position")||t.fy(s)&&t.fy(s).g("position"),a={value:t.Eo(y,a)},s.jc(a),s.W()):t.J(v,t.Y)&&(v.ou&&v.ou()&&((s=v).B4=s.Oz(),s.Oz(!1)),(s=v).ja(y),s.W&&s.W());t.K(v,this.QU)}}n||v.da(!1)}m.da(!1),this.rh&&(this.rh.ka(),this.rh.N(this.D),this.rh.O(this.PF),this.rh.ja(this.ob()),this.rh.W(),this.rh.da(!1)),this.I(1024)}return this.rh&&this.rh.da(!1),this.J(8)&&(this.wb.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.wb.parent(this.O()),this.I(2)),this.rk||this.contextMenu({tta:!0,enabled:!0}),i&&e.resume(),this},t.g.oh=function(t){return"contextmenu"==t.type&&this.dispatchEvent(t)},t.g.remove=function(){this.wb&&this.wb.parent(null)},t.g.fontSize=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontSize",e)},t.g.fontFamily=function(e){return t.p(e)&&(e=String(e)),this.nb("fontFamily",e)},t.g.Cca=function(e){return t.p(e)&&(e=String(e)),this.nb("fontColor",e)},t.g.Eca=function(e){return t.p(e)&&(e=t.Za(+e,0,1)),this.nb("fontOpacity",e)},t.g.Dca=function(e){return t.p(e)&&(e=t.bl(e)),this.nb("fontDecoration",e)},t.g.fontStyle=function(e){return t.p(e)&&(e=t.cl(e)),this.nb("fontStyle",e)},t.g.fontVariant=function(e){return t.p(e)&&(e=t.dl(e)),this.nb("fontVariant",e)},t.g.fontWeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("fontWeight",e)},t.g.letterSpacing=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("letterSpacing",e)},t.g.Fca=function(e){return t.p(e)&&(e=t.el(e)),this.nb("textDirection",e)},t.g.textShadow=function(e){return t.p(e)&&(e=t.Zb(e)),this.nb("textShadow",e)},t.g.lineHeight=function(e){return t.p(e)&&(e=t.Bo(e)),this.nb("lineHeight",e)},t.g.textIndent=function(e){return t.p(e)&&(e=(0,window.parseFloat)(t.Bo(e))),this.nb("textIndent",e)},t.g.vAlign=function(e){return t.p(e)&&(e=t.al(e)),this.nb("vAlign",e)},t.g.Bm=function(e){return t.p(e)&&(e=t.$k(e)),this.nb("hAlign",e)},t.g.Xu=function(t){return this.nb("wordBreak",t)},t.g.wordWrap=function(t){return this.nb("wordWrap",t)},t.g.textOverflow=function(e){return t.p(e)&&(e=String(e)),this.nb("textOverflow",e)},t.g.Hm=function(e){return t.p(e)&&(e=!!e),this.nb("selectable",e)},t.g.Dd=function(e){return t.p(e)&&(e=!!e),this.nb("disablePointerEvents",e)},t.g.Gca=function(e){return t.p(e)&&(e=!!e),this.nb("useHtml",e)},t.g.Aca=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("fill",e,512)},t.g.B5=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("rowOddFill",e,512)},t.g.x5=function(e,i,n,s,a,o,r){return null!=e&&(e=t.Ub.apply(null,arguments)),this.nb("rowEvenFill",e,512)},t.g.zca=function(i,n,s,a,o){if(t.p(i)){i=t.Wb.apply(null,arguments),this.ka(),this.nb("cellBorder",i,256);for(var r=0;4>r;r++)this.nb(T[r],null,256);return this.da(!0),this}return this.D_||(this.D_=new e(this,!0))},t.g.Bca=function(e,n,s,a){if(t.p(e)){var o,r,l;if(t.A(e)){var h=e;e=h[0],n=h[1],s=h[2],a=h[3],h=h.length}else h=arguments.length;if(h)t.C(e)?(o=t.Bo(e.top)||0,r=t.Bo(e.right)||0,l=t.Bo(e.bottom)||0,c=t.Bo(e.left)||0):1==h?c=l=r=o=t.Bo(e)||0:2==h?(l=o=t.Bo(e)||0,c=r=t.Bo(n)||0):3==h?(o=t.Bo(e)||0,c=r=t.Bo(n)||0,l=t.Bo(s)||0):4<=h&&(o=t.Bo(e)||0,r=t.Bo(n)||0,l=t.Bo(s)||0,c=t.Bo(a)||0);else var c=l=r=o=0;return this.ka(),this.nb(k[0],o,1024),this.nb(k[1],r,1024),this.nb(k[2],l,1024),this.nb(k[3],c,1024),this.da(!0),this}return this.F_||(this.F_=new i(this))},t.g.QU=function(e){t.D(e.target.W)&&e.target.W()},t.g.nb=function(e,i,n){if(t.p(e)){if(t.p(i)){var s=!1;return null===i?this.D[e]&&(delete this.D[e],s=!0):this.D[e]!=i&&(this.D[e]=i,s=!0),s&&this.B(+n||1024,1),this}return this.D&&this.D[e]}return this.D||{}},t.g.y5=function(e,i){return t.p(i)?(this.K[e]!=i&&(null===i?delete this.K[e]:this.K[e]=i,this.B(64,1)),this):e in this.K?this.K[e]:null},t.g.eG=function(t){this.QC=this.QC||[],this.QC.push(t)},t.g.JM=function(t,e){for(var i=1;i<arguments.length;i++){var n=arguments[i];if(n&&null!=(n=n.nb(t)))return n}return 0},t.g.R=function(){t.sd(this.b,this.P,this.Un,this.sn,this.Ov,this.rv,this.Qn),t.qd(this.rh),t.qd(this.wb),t.qd(this.PF),t.qd(this.rk),delete this.D,r.u.R.call(this)},t.g.SG=function(e){var i=t.fa.anychart.exports;return i?this.Tt||(this.Tt=i.create()):t.il(4,null,["Exporting"]),t.p(e)&&this.Tt?(this.Tt.U(e),this):this.Tt},t.g.Zj=function(e){var i=t.C(e)?e:{};e=i.rowsSeparator||"\n",t.gp(e);var n=i.columnsSeparator||",";t.gp(n),i=i.ignoreFirstRow||!1;var s,a,o,r=this.wX(),l=this.qS(),h=Array(r);for(s=0;s<r;s++)h[s]=Array(l);var c={},u=[];for(s=0;s<r;s++){for(a=0;a<l;a++)if(!(s*l+a in c)){var d=this.Kz(s,a),p=d.content();(-1!=(p=t.z(p)||t.ea(p)||t.da(p)?String(p):"").indexOf(n)||-1!=p.indexOf(e))&&(p='"'+(p=p.split('"').join('""'))+'"'),h[s][a]=p,p=d.Fx();var g=d.Gx();if(2!=g+p)for(d=0;d<g;d++)for(o=0;o<p;o++)0==d&&0==o||(h[s+d][a+o]="",c[(s+d)*l+(a+o)]=!0)}u.push(h[s].join(n))}return i&&u.shift(),u.join(e)},t.g.dz=function(e){var i=t.eq.exports;if(i){var n=this.Zj({rowsSeparator:"\n",columnsSeparator:",",ignoreFirstRow:!1});i.dz(this,n,e)}else t.il(4,null,["Exporting"])},t.g.cz=function(e,i){var n=t.eq.exports;if(n){var s=this.Zj(e);n.cz(this,s,i)}else t.il(4,null,["Exporting"])},t.H(w,r),t.xu(w,r),r.prototype.contextMenu=function(e){return!this.rk&&(this.rk=t.eq.ui.contextMenu(!0))&&(this.rk.itemsProvider(this.vS),this.rk.attach(this)),t.p(e)?(this.rk&&this.rk.setup(e),this):this.rk},r.prototype.vS=function(e){var i={};return t.eq.exports&&t.Sc(i,t.Sl(E.exporting)),t.Tj()&&e.menuParent&&t.Sc(i,t.Sl(E[e.menuParent.fullScreen()?"full-screen-exit":"full-screen-enter"])),t.Sc(i,t.Sl(E.main)),e.menuParent.jx(i,e)},r.prototype.jx=function(t){return t};var A={"save-table-as":{index:10,text:"Save table as...",iconClass:"ac ac-file-image-o",subMenu:{"save-table-as-png":{index:10,text:".png",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsPng",action:function(t){t.menuParent.Eu()}},"save-table-as-jpg":{index:20,text:".jpg",iconClass:"ac ac-file-image-o",eventType:"anychart.saveAsJpg",action:function(t){t.menuParent.Yw()}},"save-table-as-pdf":{index:30,text:".pdf",iconClass:"ac ac-file-pdf-o",eventType:"anychart.saveAsPdf",action:function(t){t.menuParent.Zw()}},"save-table-as-svg":{index:40,text:".svg",iconClass:"ac ac-file-code-o",eventType:"anychart.saveAsSvg",action:function(t){t.menuParent.$w()}}}},"save-data-as":{index:20,text:"Save data as...",iconClass:"ac ac-save",subMenu:{"save-data-as-text":{index:10,text:".csv",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsCsv",action:function(t){t.menuParent.cz()}},"save-data-as-xlsx":{index:20,text:".xlsx",iconClass:"ac ac-file-excel-o",eventType:"anychart.saveAsXlsx",action:function(t){t.menuParent.dz()}}}},"share-with":{index:30,text:"Share with...",iconClass:"ac ac-net",subMenu:{"share-with-facebook":{index:10,text:"Facebook",iconClass:"ac ac-facebook",eventType:"anychart.shareWithFacebook",action:function(t){t.menuParent.LE()}},"share-with-twitter":{index:20,text:"Twitter",iconClass:"ac ac-twitter",eventType:"anychart.shareWithTwitter",action:function(t){t.menuParent.OE()}},"share-with-linkedin":{index:30,text:"LinkedIn",iconClass:"ac ac-linkedin",eventType:"anychart.shareWithLinkedIn",action:function(t){t.menuParent.ME()}},"share-with-pinterest":{index:40,text:"Pinterest",iconClass:"ac ac-pinterest",eventType:"anychart.shareWithPinterest",action:function(t){t.menuParent.NE()}}}},"print-table":{index:50,text:"Print",iconClass:"ac ac-print",eventType:"anychart.print",action:function(t){t.menuParent.print()}},"full-screen-enter":{index:60,text:"Enter full screen",action:function(t){t.menuParent.fullScreen(!0)}},"full-screen-exit":{index:60,text:"Exit full screen",action:function(t){t.menuParent.fullScreen(!1)}},about:{index:80,iconClass:"ac ac-cog",text:"AnyChart "+t.gc.apply(null,["v%s.%s.%s.%s"].concat(["8","13","1","1939"])),href:"https://anychart.com"},"link-to-help":{index:110,iconClass:"ac ac-question",text:"Need help? Go to support center!",href:"https://anychart.com/support"},"version-history":{index:120,text:"Version History",href:""}},E={exporting:{"save-table-as":A["save-table-as"],"save-data-as":A["save-data-as"],"share-with":A["share-with"],"print-table":A["print-table"],"exporting-separator":{index:51}},"full-screen-enter":{"full-screen-enter":A["full-screen-enter"],"full-screen-separator":{index:61}},"full-screen-exit":{"full-screen-exit":A["full-screen-exit"],"full-screen-separator":{index:61}},main:{about:A.about}};r.prototype.uO=function(t){return t},r.prototype.fullScreen=function(e){var i=this.O();return i=i?i.Ja():null,t.p(e)?(i&&i.fullScreen(e),this):!!i&&i.fullScreen()},r.prototype.Ky=function(){var t=this.O();return!!(t=t?t.Ja():null)&&t.Ky()};var G=r.prototype;G.rowsCount=G.wX,G.colsCount=G.qS,G.getCell=G.Kz,G.getRow=G.En,G.getCol=G.E_,G.rowsHeight=G.hka,G.rowsMinHeight=G.jka,G.rowsMaxHeight=G.ika,G.colsWidth=G.Rda,G.colsMinWidth=G.Qda,G.colsMaxWidth=G.Pda,G.border=G.yca,G.contents=G.Yda,G.contextMenu=G.contextMenu,G.draw=G.W,G.fullScreen=G.fullScreen,G.isFullScreenAvailable=G.Ky,G.fontSize=G.fontSize,G.fontFamily=G.fontFamily,G.fontColor=G.Cca,G.fontOpacity=G.Eca,G.fontDecoration=G.Dca,G.fontStyle=G.fontStyle,G.fontVariant=G.fontVariant,G.fontWeight=G.fontWeight,G.letterSpacing=G.letterSpacing,G.textDirection=G.Fca,G.textShadow=G.textShadow,G.lineHeight=G.lineHeight,G.textIndent=G.textIndent,G.vAlign=G.vAlign,G.hAlign=G.Bm,G.wordBreak=G.Xu,G.wordWrap=G.wordWrap,G.textOverflow=G.textOverflow,G.selectable=G.Hm,G.disablePointerEvents=G.Dd,G.useHtml=G.Gca,G.cellFill=G.Aca,G.rowEvenFill=G.x5,G.rowOddFill=G.B5,G.cellBorder=G.zca,G.cellPadding=G.Bca,G.saveAsPng=G.Eu,G.saveAsJpg=G.Yw,G.saveAsPdf=G.Zw,G.saveAsSvg=G.$w,G.shareAsPng=G.Hu,G.shareAsJpg=G.FB,G.shareAsPdf=G.GB,G.shareAsSvg=G.HB,G.getPngBase64String=G.zA,G.getJpgBase64String=G.wA,G.getSvgBase64String=G.BA,G.getPdfBase64String=G.yA,G.toSvg=G.Nq,G.toCsv=G.Zj,G.saveAsCsv=G.cz,G.saveAsXlsx=G.dz,G.exports=G.SG,G.shareWithFacebook=G.LE,G.shareWithTwitter=G.OE,G.shareWithLinkedIn=G.ME,G.shareWithPinterest=G.NE,G.parentBounds=G.ja,G.container=G.O,(G=w.prototype).draw=G.W,t.E("anychart.standalones.table",(function(t,e){return new w(t,e)}))}.call(this,$)),_.pareto||(_.pareto=1,function(t){var e=function(e){t.Jr.call(this,e),this.i=[],this.f=[],this.ih=[],this.b=0},i=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a)},n=function(i,n,a){if(t.p(a)&&-1<a){var o=null;i=i.data(),t.p(i)&&(i=i.Ul(a),t.J(i,e)||t.J(i,s))&&((o={}).cf=t.Tm(i.oD(a),2),o.rf=t.Tm(i.mH(a),2))}o&&(n.cf=o.cf,n.rf=o.rf)},s=function(e){t.Jr.call(this,e)},a=function(){t.WB.call(this),this.Ga("pareto"),this.o=t.ft(),this.o.uh(0).di(100),this.re="pareto"},o=function(e){if(t.p(e.i)){var i=e.i;t.Dr(i),i=i.b;var n,s=e.Ai(0);(n=s?s.bb():e.bb()).uh(0),i?n.di(i):n.di(1)}},r=function(e,i){return t.Do(e)?t.Do(i)?-1:1:t.Do(i)?-1:i-e},l=function(t){var e=new a;return e.ta("defaultSeriesType","column"),e.Wg(),e.$c(),e.data(t),e};t.H(e,t.Jr),t.g=e.prototype,t.g.sa=1,t.g.dk=function(i,n,s){return i=e.u.dk.call(this,i,n,s),"value"==s&&(i=t.N(i),(0,window.isNaN)(i)||0>i)&&(i=0),i},t.g.FC=function(){this.i=[],this.f=[],this.ih=[],this.b=0,this.I(1);for(var t,e=this.$();e.advance();)t=e.get("value"),this.ih.push(t),this.b+=t;if(this.ih.length)if(0==this.b)for(e=0;e<this.ih.length;e++)this.i[e]=0,this.f[e]=0;else for(this.i[0]=this.f[0]=100*this.ih[0]/this.b,e=1;e<this.ih.length;e++)this.i[e]=100*this.ih[e]/this.b,this.f[e]=this.f[e-1]+100*this.ih[e]/this.b;return null},t.g.XI=function(e){this.Ct=null,t.X(e,16)&&this.B(1,16)},t.g.oD=function(t){return this.f[t]},t.g.mH=function(t){return this.i[t]},t.g.vj=function(t){return this.ih[t]},t.H(i,t.xB),t.g=i.prototype,t.g.sF={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x","%CF":"cf","%RF":"rf"},t.g.ym=function(n,a){var o,r=i.u.ym.call(this,n,a),l=this.data();return t.p(l)&&t.p(r.index)&&-1<(o=Number(r.index.value))&&(l=l.Ul(o),t.J(l,e)||t.J(l,s))&&(r.cf={value:t.Tm(l.oD(o),2),type:"number"},r.rf={value:t.Tm(l.mH(o),2),type:"number"}),r},t.g.Ge=function(t,e){var s=i.u.Ge.call(this,t,e);return n(this,s,s.index),s},t.g.Yi=function(t){return t=i.u.Yi.call(this,t),n(this,t,t.index),t},t.g.ce=function(t){var e=i.u.ce.call(this,t);return n(this,e,t),e},t.H(s,t.Jr),s.prototype.dk=function(t,e,i){return"value"==i?this.ee.oD(e):s.u.dk.call(this,t,e,i)},s.prototype.oD=function(t){return this.ee.oD(t)},s.prototype.mH=function(t){return this.ee.mH(t)},t.H(a,t.WB),a.prototype.data=function(i,n){if(t.p(i)){if(i){var a=i.title||i.caption;a&&this.title(a),i.rows&&(i=i.rows)}if(this.qB!==i){this.qB=i,t.qd(this.gm),t.J(i,t.Cr)?this.ee=this.gm=i.Ui():t.J(i,t.Mr)?this.ee=this.gm=i.Yd():this.ee=(this.gm=new t.Mr(t.A(i)||t.z(i)?i:null,n)).Yd(),this.ka(),this.i&&t.kr(this.i,this.dd,this),t.qd(this.i),this.i=new e(this.ee.sort("value",r)),t.K(this.i,this.dd,this),o(this),a=this.Ai(0);var l=this.Ai(1);this.K&&t.qd(this.K),this.K=this.i.Ui(),a||(a=this.column()),a.data(this.K),this.P&&t.qd(this.P),this.P=new s(this.i),l||(l=this.line().clip(!1).Db(!0).bb(this.o)),l.data(this.P),this.da(!0)}return this}return this.i},a.prototype.dd=function(e){t.X(e,16)&&o(this)};var h={},c=7864320|t.QG;h.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h.bar={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h.box={Fb:3,Kb:2,Lb:[t.RH,t.qH,t.IP,t.JP,t.KP],Ob:null,Jb:null,Cb:c,Ab:"highest",zb:"lowest"},h.bubble={Fb:4,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h.candlestick={Fb:5,Kb:2,Lb:[t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h.column={Fb:6,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h["jump-line"]={Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h.stick={Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:3670016|t.QG,Ab:"value",zb:"value"},h.ohlc={Fb:10,Kb:2,Lb:[t.BH,t.GH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-area"]={Fb:11,Kb:1,Lb:[t.nH,t.QH,t.MH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-bar"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-column"]={Fb:12,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-spline-area"]={Fb:13,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h["range-step-area"]={Fb:14,Kb:1,Lb:[t.nH,t.qH,t.MH,t.QH],Ob:null,Jb:null,Cb:c,Ab:"high",zb:"low"},h.spline={Fb:15,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},h["spline-area"]={Fb:16,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h["step-area"]={Fb:17,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"zero"},h["step-line"]={Fb:18,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:c,Ab:"value",zb:"value"},a.prototype.fj=h,t.Nz(a,a.prototype.fj),t.g=a.prototype,t.g.Gt=function(t,e){return new i(this,this,t,e,!0)},t.g.CA=function(){return t.bt},t.g.xD=function(){return["Pareto chart xScale","ordinal"]},t.g.sH=function(){return 3},t.g.SM=function(){return["Pareto chart yScale","scatter","linear, log"]},t.g.ts=function(){return[this]},t.g.qA=function(){return["value","CF","RF"]},t.g.N4=function(t,e,i){e=i.ma(),i=this.i.Ul(e),t[1]=i.vj(e),t[2]=i.oD(e),t[3]=i.mH(e)},t.g.pb=function(){this.J(131072)&&o(this),a.u.pb.call(this)},t.g.Qh=function(t){return this.J(131072)&&o(this),a.u.Qh.call(this,t)},t.g.P1=function(){return this.Ra()},t.g.R=function(){t.sd(this.i,this.ee,this.gm,this.K,this.P),this.P=this.K=this.gm=this.ee=this.i=null,t.qd(this.o),this.o=null,a.u.R.call(this)},t.g.F=function(){var e=a.u.F.call(this);return t.p(this.data())&&(e.chart.data=this.data().F()),e},t.g.Wg=function(t){a.u.Wg.call(this,t),this.ij(1).scale()||this.ij(1).scale(this.o)},t.g.U=function(t,e){a.u.U.call(this,t,e),e&&this.ij(1).scale(this.o),"data"in t&&this.data(t.data)};var u=a.prototype;u.data=u.data,u.xScale=u.Ra,u.yScale=u.bb,u.crosshair=u.mh,u.xGrid=u.lm,u.yGrid=u.nm,u.xMinorGrid=u.Qr,u.yMinorGrid=u.Tr,u.xAxis=u.$h,u.getXAxesCount=u.wD,u.yAxis=u.ij,u.getYAxesCount=u.yD,u.getSeries=u.ef,u.lineMarker=u.Ym,u.rangeMarker=u.gn,u.textMarker=u.mn,u.palette=u.cc,u.markerPalette=u.Nf,u.hatchFillPalette=u.ve,u.getType=u.Ma,u.addSeries=u.kl,u.getSeriesAt=u.Ai,u.getSeriesCount=u.tj,u.removeSeries=u.Ao,u.removeSeriesAt=u.Rn,u.removeAllSeries=u.Dp,u.getPlotBounds=u.dg,u.xZoom=u.Tq,u.yZoom=u.Uq,u.xScroller=u.Mp,u.yScroller=u.Ur,u.getStat=u.Rg,u.annotations=u.Nk,u.getXScales=u.vy,u.getYScales=u.xy,t.Tp.pareto=l,t.E("anychart.pareto",l)}.call(this,$)),_.theme_radar||(_.theme_radar=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{radar:{defaultSeriesType:"line",defaultSeriesSettings:{base:{clip:!1},area:{},line:{},marker:{}},xAxis:{scale:0,zIndex:25,labels:{zIndex:25},minorLabels:{zIndex:25},ticks:{zIndex:25},minorTicks:{zIndex:25}},yAxis:{scale:1},startAngle:0,innerRadius:0,xGrids:[{}],yGrids:[{}],minorGrids:[],scales:[{type:"ordinal"},{type:"linear"}],xScale:0,yScale:1,a11y:{titleFormat:t.PN}}})}.call(this,$)),_.theme_waterfall||(_.theme_waterfall=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{waterfall:{dataMode:"diff",drawTotalsAsAbsolute:!1,connectorStroke:"#697474",defaultSeriesType:"waterfall",defaultSeriesSettings:{waterfall:{normal:{fill:"#96a6a6",stroke:"#697474",risingFill:"#64b5f6",fallingFill:"#ef6c00",risingStroke:"#467fac",fallingStroke:"#a74c00",risingHatchFill:!1,fallingHatchFill:!1,labels:{enabled:!0,connectorStroke:"#c1c1c1",format:function(){return t.vN(this.isTotal?this.absolute:this.diff)}}},hovered:{risingFill:t.BN,fallingFill:t.BN,risingStroke:t.JN,fallingStroke:t.JN,risingHatchFill:null,fallingHatchFill:null},selected:{risingFill:"#333 0.85",fallingFill:"#333 0.85",risingStroke:"#333 0.85",fallingStroke:"#333 0.85",risingHatchFill:null,fallingHatchFill:null},tooltip:{format:function(){return this.isTotal?"Absolute: "+t.vN(this.absolute):"Absolute: "+t.vN(this.absolute)+"\nDifference: "+t.vN(this.diff)}}}},legend:{enabled:!0,itemsSourceMode:"categories"},scales:[{type:"ordinal"},{type:"linear",softMinimum:0,stackDirection:"reverse"}],stackLabels:{anchor:"auto",enabled:!1,format:"{%total}",position:"auto"},connectors:{stroke:"#697474",labels:{format:"{%stack}",position:"auto",anchor:"auto"}},arrow:{connector:{stroke:"#697474"},label:{fontSize:"12px",position:"auto",anchor:"auto"}},total:{enabled:!0,normal:{fill:"#96a6a6",stroke:"#697474",labels:{enabled:!0,anchor:"auto",position:"auto"}},hovered:{fill:t.BN,stroke:t.BN},tooltip:{enabled:!0,format:function(){return this.isTotal?"Absolute: "+this.value:"Value: "+this.value},titleFormat:function(){return this.isTotal?"Total: "+this.name:"Split: "+this.name}}}}})}.call(this,$)),_.theme_venn||(_.theme_venn=1,function(t){var e={titleFormat:"{%Name}",format:"Value: {%Value}"};t.ra(t.fa.anychart.themes.defaultTheme,{venn:{dataSeparator:"&",background:{zIndex:0},padding:{top:15,right:5,bottom:15,left:5},a11y:{enabled:!0,titleFormat:t.NN,mode:"chart-elements"},color:"#64b5f6",normal:{fill:t.CN,stroke:"none",hatchFill:!1,labels:{fontColor:"#f4f4f4",format:"{%Name}",enabled:!0,disablePointerEvents:!0,zIndex:100,fontWeight:"bold"},markers:{enabled:!1,zIndex:99,disablePointerEvents:!0,stroke:"none"}},hovered:{fill:t.GN,stroke:"none",hatchFill:!1,labels:{enabled:null},markers:{enabled:null}},selected:{fill:"#333 0.85",stroke:"none",hatchFill:!1,labels:{enabled:null},markers:{enabled:null}},tooltip:e,intersections:{normal:{fill:"#fff 0.00001",stroke:"none",labels:{fontWeight:"normal",format:"{%Value}",enabled:null},markers:{enabled:null}},hovered:{fill:"#fff 0.5",stroke:"none",labels:{enabled:null},hoverMarkers:{enabled:null}},selected:{fill:"#333 0.85",stroke:"none",labels:{enabled:null},markers:{enabled:null}},tooltip:e},legend:{enabled:!0,zIndex:0,tooltip:{enabled:!1},padding:{top:10,right:10,bottom:0,left:10},position:"bottom"}}})}.call(this,$)),_.theme_pie||(_.theme_pie=1,function(t){t.ra(t.eq.themes.defaultTheme,{pie:{sliceDrawer:function(){t.dF.vector.primitives.donut(this.path,this.centerX+this.explodeX,this.centerY+this.explodeY,this.outerRadius,this.innerRadius,this.startAngle,this.sweepAngle)},interactivity:{multiSelectOnClick:!0,unselectOnClickOutOfPoint:!1},animation:{duration:2e3},title:{text:"Pie Chart"},group:!1,sort:"none",radius:"45%",innerRadius:0,startAngle:0,outsideLabelsCriticalAngle:60,insideLabelsOffset:"50%",center:{fill:"none",stroke:"none"},normal:{labels:{format:"{%PercentValue}{decimalsCount:1,zeroFillDecimals:true}%"},explode:0,outline:{enabled:!0,width:0,offset:0,fill:t.GN,stroke:"none"}},hovered:{explode:0,outline:{enabled:null,width:10,offset:0,fill:t.zN,stroke:"none"}},selected:{explode:"5%",fill:t.zN,stroke:"none",outline:{enabled:null,width:10,offset:0,fill:t.GN,stroke:"none"}},a11y:{titleFormat:t.ON}},pie3d:{radius:"65%",mode3d:!0,selected:{explode:"5%"},aspect3d:.45,connectorLength:"15%",legendItem:{iconStroke:null}}})}.call(this,$)),_.theme_cartesian_3d||(_.theme_cartesian_3d=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{cartesian3dBase:{zAngle:45,zAspect:"50%",zDistribution:!1,zPadding:10,defaultSeriesSettings:{base:{normal:{stroke:"none",fill:t.zN},hovered:{stroke:"none",fill:t.FN},selected:{stroke:"none",fill:"#333"},tooltip:{anchor:"left-top",position:"left-top"}},area:{hovered:{markers:{enabled:!0}},selected:{markers:{enabled:!0}}},bar:{isVertical:!0},line:{hovered:{markers:{enabled:!0}},selected:{markers:{enabled:!0}}},line2d:{normal:{stroke:t.zN},hovered:{stroke:t.FN,markers:{enabled:!0}},selected:{stroke:"#333",markers:{enabled:!0}}}}},bar3d:{xGrids:[{}],yGrids:[{enabled:!0,scale:0}],yScale:{stackDirection:"reverse"}},column3d:{defaultSeriesType:"column"},area3d:{defaultSeriesType:"area",zDistribution:!0,zPadding:5},line3d:{defaultSeriesType:"line",zDistribution:!0,zPadding:5},cartesian3d:{defaultSeriesType:"column",xGrids:[{enabled:!0,scale:0}],yGrids:[{}]}})}.call(this,$)),_.theme_heatmap||(_.theme_heatmap=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{heatMap:{annotations:{annotationsList:[],zIndex:2e3},isVertical:!1,scales:[{type:"ordinal"},{type:"ordinal",inverted:!0},{type:"ordinal-color"}],xScale:0,yScale:1,colorScale:2,background:{enabled:!0},xAxes:[{orientation:"top"}],yAxes:[{}],xGrids:[],yGrids:[],tooltip:{enabled:!0,title:{enabled:!0,fontSize:13,fontWeight:"normal"},contentInternal:{fontSize:11},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){if(void 0!==this.heat){var t="Value: "+this.valuePrefix+this.heat+this.valuePostfix;return(0,window.isNaN)(+this.heat)||(t+="\nPercent Value: "+(100*this.heat/this.getStat("sum")).toFixed(1)+"%"),t}return"x: "+this.x+"\ny: "+this.y}},legendItem:{iconStroke:null},legend:{itemsSourceMode:"categories"},defaultXAxisSettings:{enabled:!0,orientation:"bottom",ticks:{enabled:!1},title:{text:"X-Axis",padding:5},scale:0},defaultYAxisSettings:{enabled:!0,orientation:"left",ticks:{enabled:!1},title:{text:"Y-Axis",padding:5},scale:1},defaultSeriesSettings:{heatMap:{normal:{fill:function(){if(this.colorScale){var e=this.iterator.get("heat");e=this.colorScale.valueToColor(e)}else e=t.Ul(this.sourceColor,.85,!0);return e},stroke:"1 #ffffff",labels:{disablePointerEvents:!0,enabled:!0,fontSize:11,anchor:"center",adjustFontSize:{width:!0,height:!0},minFontSize:7,maxFontSize:13,hAlign:"center",vAlign:"middle",fontWeight:"normal",fontColor:"#212121",selectable:!1,background:{enabled:!1},padding:{top:2,right:4,bottom:2,left:4},position:"center",format:function(){return t.vN(this.heat)}},markers:{enabled:!1,disablePointerEvents:!1,position:"center",rotation:0,anchor:"center",offsetX:0,offsetY:0,size:4,positionFormatter:t.wN,fill:"#dd2c00",type:"circle",stroke:"none"},hatchFill:!1},hovered:{fill:"#757575",stroke:"2 #ffffff",labels:{fontColor:"#f5f5f5",enabled:null},markers:{enabled:null,size:6},hatchFill:null},selected:{fill:"#333 0.85",stroke:"2 #ffffff",labels:{fontColor:"#fff",enabled:null},markers:{enabled:null,size:6,fill:"#333 0.85",stroke:"1.5 #212121"},hatchFill:null},tooltip:{enabled:!0,title:{enabled:!0,fontSize:13,fontWeight:"normal"},contentInternal:{fontSize:11},separator:{enabled:!0},titleFormat:function(){return this.name||this.x},format:function(){if(void 0!==this.heat){var t="Value: "+this.valuePrefix+this.heat+this.valuePostfix;return(0,window.isNaN)(+this.heat)||(t+="\nPercent Value: "+(100*this.heat/this.getStat("sum")).toFixed(1)+"%"),t}return"x: "+this.x+"\ny: "+this.y}}}},labelsDisplayMode:"drop",clip:!0,xZoom:{continuous:!0,startRatio:0,endRatio:1},yZoom:{continuous:!0,startRatio:0,endRatio:1},yScroller:{orientation:"right",inverted:!0},a11y:{titleFormat:t.NN}}})}.call(this,$)),_.theme_bullet||(_.theme_bullet=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{bullet:{background:{enabled:!0},layout:"horizontal",defaultRangeMarkerSettings:{enabled:!0,from:0,to:0,zIndex:2,fill:null},padding:{top:5,right:10,bottom:5,left:10},margin:0,defaultMarkerSettings:{fill:"#64b5f6",stroke:"2 #64b5f6",zIndex:2},rangePalette:{type:"distinct",items:["#828282","#a8a8a8","#c2c2c2","#d4d4d4","#e1e1e1"]},markerPalette:{items:["bar","line","x","ellipse"]},axis:{enabled:!1,title:{padding:0,margin:{top:0,right:0,bottom:10,left:0}},labels:{fontSize:9,padding:0},minorLabels:{padding:0},ticks:{enabled:!1},orientation:null,zIndex:3},title:{rotation:0},scale:{type:"linear",minimumGap:0,maximumGap:0,ticks:{minCount:2,maxCount:5,interval:window.NaN}},ranges:[],a11y:{titleFormat:function(){return t.NN.apply(this)+". "}}}})}.call(this,$)),_.calendar_part||(_.calendar_part=1,function(t){var e=function(e){t.Cr.call(this,e)},i=function(e){t.Y.call(this),this.pa=e,this.Ia=this.jb=null,this.ud=[],this.Uc=[],this.f=t.Qo(t.Ro())},n=function(t,e,i){var n=e.left,s=e.top,a=e.right;e=e.bottom,i?i.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close():(t.D.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close(),t.G.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close(),t.o.moveTo(n,s).lineTo(a,s).lineTo(a,e).lineTo(n,e).lineTo(n,s).close())},s=function(e,i,n,s){return n=s.left+e.Ka*(n+1)+n*e.Ha,i=s.top+e.Ka*(i+1)+i*e.Ha,s=t.R(n+e.Ha,1),e=t.R(i+e.Ha,1),{left:n=t.R(n,1),top:i=t.R(i,1),right:s,bottom:e}},a=function(t,e){for(var i=t.ea,n=0;n<e+1;n++)i+=t.fb[n];var s=((n=i-t.fb[e])-t.Ba)%7,a=(--i-t.Ba)%7;return{m6:n%7,Yea:i%7,Nta:s,n6:Math.floor((n-s)/7),rta:a,Zea:Math.floor((i-a)/7)}},o=function(){t.V.call(this)},r=function(){t.V.call(this),this.Da=null;var e={};t.T(e,[["fill",0,1],["stroke",0,1],["hatchFill",0,1]]);var i={};t.T(i,[["fill",0,0],["stroke",0,0],["hatchFill",0,0]]),this.ca=new t.my(this,e,t.gm),this.za=new t.my(this,i,t.vo),this.Ea=new t.my(this,i,t.wo),t.T(this.ua,[["spacing",0,8],["noDataFill",0,8192],["noDataStroke",0,8192],["noDataHatchFill",0,8192]])},l=function(){t.V.call(this),this.Da=null,t.T(this.ua,[["underSpace",0,8],["stroke",0,1],["noDataStroke",0,1]])},h=function(){t.V.call(this),this.Da=null,t.T(this.ua,[["rightSpace",0,8],["showWeekends",0,8]])},c=function(){t.V.call(this),this.Ia=this.jb=null,t.T(this.ua,[["format",0,1],["inverted",0,8],["monthsPerRow",0,1],["underSpace",0,8]])},u=function(e,i){t.Bx.call(this),this.Ga("calendar"),t.su(this,this,this.If,this.hg,null,this.If,this.paa,null),this.ba=[],this.data(e||null,i),this.aa=[],this.ea=[],this.i={},this.f=0,this.B(4294967295)},d=function(t,e){var n=t.ba[e];return n||((n=new i(t)).kb(t),t.ba[e]=n),n},p=function(e,i,n){var s=e.xg();if(n!==t.gm){var a=n===t.vo?s.lb():s.selected();if(null!=(a=a.g(i))&&!t.D(a))return a}return i=s.Qa().g(i),t.D(i)&&(s=e.Ge(),i=i.call(s,s)),a?(s=e.Ge(i),a.call(s,s)):i},g=function(t,e,i){var n=e.tag.Ch;t.$().select(n),n=p(t,"fill",i),t=p(t,"stroke",i),e.fill(n),e.stroke(t)},f=function(t,e){for(var i=t.ai().g("inverted"),n=0;n<t.ba.length;n++)d(t,i?t.aa.length-n-1:n).B(e)},m=function(t,e){var i=new u(t,e);return i.iP(i.vf("colorScale")),i},v=[31,28,31,30,31,30,31,31,30,31,30,31],b=[31,29,31,30,31,30,31,31,30,31,30,31];t.H(e,t.Cr),e.prototype.FC=function(){for(var e,i,n=[],s=this.ee.$();s.advance();)e=s.get("x"),i=Number(s.get("value")),null==(e=t.ps(e))||(0,window.isNaN)(i)||(i=s.ma(),n.push({value:+e,index:i}));for(n.sort((function(t,e){return t.value-e.value})),s=n.length;s--;)n[s]=n[s].index;return n},t.H(i,t.wu),t.g=i.prototype,t.g.sa=2080374800|t.wu.prototype.sa,t.g.gB=function(e){var i=536870912,n=0;t.X(e,1)&&(n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),this.jb.Wj(!0),t.K(this.jb,this.gB,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.qaa=function(){this.B(268435456,1)},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),this.Ia.Wj(!0),t.K(this.Ia,this.qaa,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.Kv=function(){this.Oa||(this.Oa=t.ok(),t.ru(this,this.Oa)),this.Za||(this.Za=t.mg().Wo(),this.Lf=t.uk(this.Za),this.Lf.zIndex(1),this.Lf.parent(this.Oa)),this.D||(this.D=this.Oa.path(),this.D.zIndex(1)),this.o||(this.o=this.Oa.path(),this.o.zIndex(2)),this.G||(this.G=this.Oa.path(),this.G.zIndex(3)),this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ue.zIndex(4),this.ue.parent(this.Oa)),this.P||(this.P=this.Oa.path(),this.P.zIndex(5)),this.K||(this.K=this.Oa.path(),this.K.zIndex(6))},t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.Mm=function(){var e=this.title(),i=this.ob(),n=i.left,s=i.top;i=i.width,e=24>(e=e.g("fontSize"))?e+3:Math.round(1.2*e);var a=t.L("2%",i),o=this.pa.pg().labels().g("fontSize");o=5+(24>o?o+3:Math.round(1.2*o))+this.Od;var r=i-e-a-1;this.Ha=(r-55*this.Ka)/54;var l=this.ba?7:7-this.b.length;l=this.Ha*l+(l-1+2)*this.Ka,this.$a=o+l,this.Hd=t.kn(n,s,i,this.$a),this.bg=t.kn(n,s,e,this.$a),this.yg=t.kn(n+e,s+o,a,l),this.me=t.kn(n+e+a,s,r,o),this.sb=t.kn(n+e+a,s+o,r,l)},t.g.W=function(){if(!this.zc())return this;this.Kv(),this.Ka=this.pa.xg().g("spacing"),this.Od=this.pa.pg().g("underSpace"),this.ba=this.pa.XJ().g("showWeekends"),this.b=this.f?t.Ha(this.f.weekendRange):[],this.fh=[],this.na={};var e,i=0;for(e=this.b[0];e<=this.b[1];e++){var o=(e+1)%7;this.fh[i++]=o,this.na[String(o)]=!0}for(this.aa={},this.Sb={},e=i=0;7>e;e++)o=(e+this.Ba)%7,!this.ba&&o in this.na||(this.aa[o]=i++),this.Sb[o]=e;if(this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(this.Mm(),this.B(1275068432)),this.J(1073741824)){for(e=this.pa.xg(),i=this.pa.pg(),this.D.stroke("none"),this.D.fill(e.g("noDataFill")),o=t.Yb(e.g("noDataHatchFill")),this.o.stroke("none"),this.o.fill(o),this.G.stroke(e.g("noDataStroke")),this.G.fill("none"),this.P.stroke(i.g("noDataStroke")),this.P.fill("none"),this.K.stroke(i.g("stroke")),this.K.fill("none"),this.D.clear(),this.G.clear(),this.o.clear(),e=this.ea;e<this.nf+this.ea;e++)i=(e-this.Ba)%7,o=Math.floor((e-i)/7),e<i&&(o+=1),!this.ba&&e%7 in this.na||n(this,s(this,this.aa[e%7],o,this.sb));this.K.clear(),this.P.clear(),e=this.Ka>>1,i=this.sb,o=this.i.d4;for(var r=this.ba?0:this.b.length,l=0;12>l;l++){var h=-1<o.indexOf(l)?this.K:this.P,c=a(this,l),u=c.m6,d=c.Yea,p=c.n6,f=c.Zea;if(!this.ba){for(;u in this.na;)c=this.Sb[u],u=(u+1)%7,7===(c+=1)&&(p+=1);for(;d in this.na;)c=this.Sb[d],d=(d-1+7)%7,-1==--c&&--f}c=6-r,u=this.aa[u],d=this.aa[d];var m=s(this,u,p,i),v=s(this,d,f,i);p=s(this,0,p+1,i),f=s(this,c,f-1,i);var b=p.top,y=f.bottom;h.moveTo(m.left-e,m.top-e),h.lineTo(m.left-e,y+e),d===c?h.lineTo(v.right+e,y+e):h.lineTo(f.right+e,y+e).lineTo(f.right+e,v.bottom+e).lineTo(v.right+e,v.bottom+e),h.lineTo(v.right+e,b-e),0===u?h.lineTo(m.left-e,b-e):h.lineTo(p.left-e,b-e).lineTo(p.left-e,m.top-e).lineTo(m.left-e,m.top-e),h.close()}this.I(1073741824)}if(this.J(805306372)&&((e=t.wr(this,"background"))&&e.enabled()&&e.ja(this.Hd),(e=t.wr(this,"title"))&&e.enabled()&&e.ja(this.bg),this.I(4)),this.J(268435456)&&((e=t.wr(this,"background"))&&(e.Wj(!1),e.ka(),e.O(this.Oa),e.zIndex(0),e.W(),e.da(!1)),this.I(268435456)),this.J(536870912)&&((e=t.wr(this,"title"))&&(e.Wj(!1),e.ka(),e.O(this.Oa),e.zIndex(1),e.W(),e.da(!1)),this.I(536870912)),h=this.f?this.f.narrowWeekdays:"SMTWTFS".split(""),o=this.f?this.f.shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),this.J(67108864)){for(e=0;7>e;e++)l=this.ud[e]||(this.ud[e]=new t.Ix),!this.ba&&e in this.na?t.Px(l,null):(i=h[e],r=s(this,this.aa[e],0,this.yg),r=t.kn(r.left,r.top,r.right-r.left,r.bottom-r.top),c=this.pa.XJ().labels().flatten(),l.text(i),l.style(c),l.Ij(),t.Px(l,this.Za),t.Wx(l,r,this.O().Ja()));this.I(67108864)}if(this.J(134217728)){for(e=0;12>e;e++)l=this.Uc[e]||(this.Uc[e]=new t.Ix),i=o[e],h=(r=a(this,e)).n6,0!==this.aa[r.m6%7]&&(h+=1),r=s(this,0,h,this.me),r=t.kn(r.left+5,r.top,r.right-r.left,r.bottom-r.top),h=this.pa.pg().labels().flatten(),l.text(i),l.style(h),l.Ij(),t.Px(l,this.Za),t.Wx(l,r,this.O().Ja());this.I(134217728)}if(this.J(16)){for(e=this.sd=this.pa.data().$(),i=this.i.S0,o=0;o<i.length;o++){for(r=i[o],e.select(r),h=0,c=(l=t.ps(e.Gh())).getUTCMonth(),u=0;u<c;u++)h+=this.fb[u];u=((h+=this.ea+l.getUTCDate()-1)-this.Ba)%7,c=Math.floor((h-u)/7),h<u&&(c+=1),h%=7,(u=t.eC(this.ue)).tag={Ch:r,x:l,value:e.get("value"),timestamp:l.getTime(),f7:c,day:h,month:l.getUTCMonth(),year:l.getUTCFullYear()},g(this.pa,u,t.gm),!this.ba&&h in this.na||n(this,s(this,this.aa[h],c,this.sb),u)}this.I(16)}return this},t.g.U=function(t,e){i.u.U.call(this,t,e),"background"in t&&this.background().ga(!!e,t.background),"title"in t&&this.title().ga(!!e,t.title)},t.g.R=function(){this.Oa.remove(),t.sd(this.D,this.o,this.G,this.P,this.K,this.Oa,this.Ia,this.jb),this.jb=this.Ia=this.Oa=this.K=this.P=this.G=this.o=this.D=null,i.u.R.call(this)},t.H(o,t.V),o.prototype.ra=1,t.H(r,o),t.Gq(r,["fill","stroke","hatchFill"],"normal"),r.prototype.ra=8200|o.prototype.ra;var y={};t.sq(y,[[0,"spacing",t.Bq],[1,"noDataFill",t.Qq],[1,"noDataStroke",t.Pq],[1,"noDataHatchFill",t.Rq]]),t.U(r,y),r.prototype.$c=function(){t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},r.prototype.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},r.prototype.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},r.prototype.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea};var S=r.prototype;S.normal=S.Qa,S.hovered=S.lb,S.selected=S.selected,t.H(l,o),l.prototype.ra=8|o.prototype.ra;var x={};t.sq(x,[[0,"underSpace",t.Bq],[1,"stroke",t.Pq],[1,"noDataStroke",t.Pq]]),t.U(l,x),t.g=l.prototype,t.g.raa=function(){this.va(1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,t.W(this,"labels",this.Da),t.K(this.Da,this.raa,this)),t.p(e)?(this.Da.N(e),this):this.Da},t.g.U=function(e,i){l.u.U.call(this,e,i),t.Iq(this,x,e,i),"labels"in e&&this.labels().ga(!!i,e.labels)},t.g.F=function(){var e=l.u.F.call(this);return t.Tq(this,x,e),t.wr(this,"labels")&&(e.labels=this.labels().F()),e},t.g.R=function(){t.qd(this.Da),this.Da=null,l.u.R.call(this)};var w=l.prototype;w.labels=w.labels,t.H(h,o),h.prototype.ra=8|o.prototype.ra;var C={};t.sq(C,[[0,"rightSpace",t.Bq],[0,"showWeekends",t.Dq]]),t.U(h,C),t.g=h.prototype,t.g.saa=function(){this.va(1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,t.W(this,"labels",this.Da),t.K(this.Da,this.saa,this)),t.p(e)?(this.Da.N(e),this):this.Da},t.g.U=function(e,i){h.u.U.call(this,e,i),t.Iq(this,C,e,i),"labels"in e&&this.labels().ga(!!i,e.labels)},t.g.F=function(){var e=h.u.F.call(this);return t.Tq(this,C,e),t.wr(this,"labels")&&(e.labels=this.labels().F()),e},t.g.R=function(){t.qd(this.Da),this.Da=null,h.u.R.call(this)};var T=h.prototype;T.labels=T.labels,t.H(c,o),c.prototype.ra=8|o.prototype.ra;var D={};t.sq(D,[[0,"format",t.ar],[0,"inverted",t.Dq],[0,"monthsPerRow",t.Bq],[0,"underSpace",t.Bq]]),t.U(c,D),t.g=c.prototype,t.g.title=function(e){return this.jb||(this.jb=new t.aw,t.W(this,"title",this.jb),t.K(this.jb,this.gB,this)),t.p(e)?(this.jb.N(e),this):this.jb},t.g.gB=function(){this.va(9)},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),t.K(this.Ia,this.taa,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.taa=function(){this.va(1)},t.g.U=function(e,i){c.u.U.call(this,e,i),t.Iq(this,D,e,i),"title"in e&&this.title().ga(!!i,e.title),"background"in e&&this.background().ga(!!i,e.background)},t.g.F=function(){var e=c.u.F.call(this);return t.Tq(this,D,e),t.wr(this,"title")&&(e.title=this.title().F()),t.wr(this,"background")&&(e.background=this.background().F()),e},t.g.R=function(){t.sd(this.jb,this.Ia),this.Ia=this.jb=null,c.u.R.call(this)};var k=c.prototype;k.title=k.title,k.background=k.background,t.H(u,t.Bx),t.g=u.prototype,t.g.ra=16|t.Bx.prototype.ra,t.g.sa=61440|t.Bx.prototype.sa,t.g.data=function(i,n){if(t.p(i)){if(i){var s=i.title||i.caption;s&&this.title(s),i.rows&&(i=i.rows)}return this.Xf!==i&&(this.Xf=i,t.sd(this.P,this.la,this.Yc),this.sd=null,t.J(i,t.Cr)?this.la=i.Ui():t.J(i,t.Mr)?this.la=i.Yd():(i=t.A(i)||t.z(i)?i:null,this.Yc=new t.Mr(i,n),this.la=this.Yc.Yd()),t.qd(this.P),delete this.sd,this.P=new e(this.la),t.K(this.P,this.dd,this),this.B(4096,1)),this}return this.P},t.g.dd=function(e){t.X(e,16)&&this.B(4096,1)},t.g.cg=function(){return this.P.$()},t.g.Ec=function(){return this.sd=this.P.$()},t.g.$=function(){return this.sd||(this.sd=this.P.$())},t.g.Ma=function(){return"calendar"},t.g.Ol=function(){return[]},t.g.pb=function(){if(this.J(4096)){this.aa=[],this.ea=[],this.i={};var e=this.data().$();for(e.reset();e.advance();){var i=Number(e.get("value")),n=e.get("x"),s=t.ps(n);n=e.ma();var a=s.getUTCFullYear();s=s.getUTCMonth(),a in this.i||(this.i[a]={d4:[],S0:[]});var o=this.i[a];o.S0.push(n),t.Ua(o.d4,s),t.Ua(this.aa,a),t.Ua(this.ea,i)}this.B(16388),this.I(4096)}this.J(16384)&&(e=this.ea,this.vb&&(this.vb.Of()?(this.vb.Bg(),this.vb.Xc(e[0],e[e.length-1]),this.vb.Hg()):(this.vb.Co(),this.vb.Xc(e[0],e[e.length-1])),t.J(this.vb,t.iz)&&t.Pt(this.vb.Xa())),f(this,16),this.B(8192),this.I(16384))},t.g.yj=function(){return!this.$().Hb()},t.g.Ue=function(){return[]},t.g.qja=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=1879048192),f(this,i),this.B(8192,1)},t.g.ai=function(e){return this.o||(this.o=new c,t.K(this.o,this.qja,this),t.W(this,"years",this.o)),t.p(e)?(this.o.N(e),this):this.o},t.g.Xia=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=1207959552),f(this,i),this.B(8192,1)},t.g.pg=function(e){return this.G||(this.G=new l,t.K(this.G,this.Xia,this),t.W(this,"months",this.G)),t.p(e)?(this.G.N(e),this):this.G},t.g.pja=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=67108864),f(this,i),this.B(8192,1)},t.g.XJ=function(e){return this.K||(this.K=new h,t.K(this.K,this.pja,this),t.W(this,"weeks",this.K)),t.p(e)?(this.K.N(e),this):this.K},t.g.Pia=function(e){var i=0;t.X(e,8)&&(i|=4),t.X(e,1)&&(i|=16),t.X(e,8192)&&(i|=1073741824),f(this,i),this.B(8192,1)},t.g.xg=function(e){return this.b||(this.b=new r,t.W(this,"days",this.b),this.b.$c(),t.K(this.b,this.Pia,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.Jia=function(e){var i=0,n=0;t.X(e,1)&&(i|=32768,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),this.Mb.kb(this),t.K(this.Mb,this.Jia,this),this.B(32772,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Ux=function(e){this.Si||(this.Si=new t.Fw);var i=this.$();return i.select(e.Ch),e={x:{value:e.x,type:"date"},timestamp:{value:e.timestamp,type:"number"},value:{value:e.value,type:"string"},weekNumber:{value:e.f7,type:"number"},day:{value:e.day,type:"number"},month:{value:e.month,type:"number"},year:{value:e.year,type:"number"},index:{value:e.Ch,type:"number"}},t.ov(this.Si.lg(i),e)},t.g.Ge=function(t){var e=t||"blue 0.5";t=this.$().get("value");var i=this.kd();return e={value:t,sourceColor:e},i&&(e.scaledColor=i.Qq(t)),e},t.g.$q=function(e){return t.J(e,t.WN)},t.g.rl=function(t){var e=t.type,i=t.domTarget.tag;if(i&&!this.$q(i)){switch(e){case"mouseout":e="pointmouseout";break;case"mouseover":e="pointmouseover";break;case"mousemove":case"touchmove":e="pointmousemove";break;case"mousedown":case"touchstart":e="pointmousedown";break;case"mouseup":case"touchend":e="pointmouseup";break;case"click":e="pointclick";break;case"dblclick":e="pointdblclick"}return(t={type:e,actualTarget:t.target,target:this,originalEvent:t}).dataIndex=i.Ch,t.x=i.x,t.value=i.value,t.timestamp=i.timestamp,t.weekNumber=i.f7,t.day=i.day,t.month=i.month,t.year=i.year,t.point=i.Hta,t}return null},t.g.If=function(e){var i=this.rl(e);if(i&&this.dispatchEvent(i)){var n=e.domTarget;i=n.tag,this.D.tag=i;var s=this.Ua();i&&!this.$q(i)?(n=n.Cd("d"),this.D.Cd("d",n),g(this,this.D,t.vo),t.Ow(s,e.clientX,e.clientY,this.Ux(i))):(this.D.clear().fill("none").stroke("none"),s.Lc())}},t.g.hg=function(t){(t=this.rl(t))&&this.dispatchEvent(t)&&(this.Ua().Lc(),this.D.clear().fill("none").stroke("none"))},t.g.paa=function(t){(t=this.rl(t))&&this.dispatchEvent(t)},t.g.Kia=function(e){t.X(e,6)&&this.B(16384,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(16384,1);else if(e=t.jt(this.vb,e,null,48,null,this.Kia,this)){var i=this.vb==e;this.vb=e,t.W(this,"colorScale",this.vb),this.vb.da(i),i||this.B(16384,1)}return this}return this.vb},t.g.iP=function(e){if(t.z(e))var i=t.dt(e,null);else t.C(e)?(i=t.dt(e.type,null))&&i.N(e):i=null;i&&this.kd(i)},t.g.oaa=function(){return this.f},t.g.Qh=function(e){if(this.zc()){this.Aa||(this.Aa=this.Na.Bd(),this.Aa.zIndex(30)),this.D||(this.D=this.Aa.path(),this.D.zIndex(9999),this.D.Dd(!0)),this.pb();var i=t.wr(this,"colorRange");if(this.J(32768)&&i&&(i.ka(),i.scale(this.kd()),i.da(!1),this.B(4)),this.J(4)&&(i?(i.ja(e.clone().round()),this.lf=i.yd()):this.lf=e.clone(),this.B(8192),this.I(4)),this.J(32768)&&(i&&(i.ka(),i.O(this.Aa),i.zIndex(50),i.W(),i.da(!1)),this.I(32768)),this.J(8192)){var n=this.lf;e=this.ai().g("inverted"),i=this.ai().title();var s=this.ai().background(),a=i.F(),o=s.F();for(i.I(4294967295),i.background().I(4294967295),s.I(4294967295),i={title:a,background:o},this.f=0,n=n.clone(),s=this.o.g("underSpace"),o=this.aa.length,a=0;a<o;a++){var r=e?o-a-1:a,l=this.aa[r];(r=d(this,r)).U(i,!1),r.O(this.Aa);var h=r;if(h.ec!==l){h.ec=l;var c=h.ec;h.qc=0==c%400||0==c%4&&0!=c%100,h.nf=h.qc?366:365,h.fb=h.qc?b:v,h.Ba=h.f?h.f.firstDayOfWeek:0,h.ea=new Date(Date.UTC(h.ec,0,1)).getUTCDay(),h.ea<h.Ba&&(h.ea+=7)}r.i=this.i[l],r.title().text(String(l)),r.ja(n),r.W(),l=r.$a,n=t.kn(n.left,n.top+l+s,n.width,n.height),this.f+=l+s}for(0<o&&(this.f-=s),this.f+=this.lf.top-this.ob().top,e=this.aa.length;e<this.ba.length;e++)(i=this.ba[e]).enabled(!1),i.W();this.I(8192)}}},t.g.ts=function(){return[this]},t.g.qA=function(){return["x","value"]},t.g.F=function(){var e=u.u.F.call(this);return e.data=this.data().F(),e.tooltip=this.Ua().F(),t.wr(this,"years")&&(e.years=this.ai().F()),t.wr(this,"months")&&(e.months=this.pg().F()),t.wr(this,"weeks")&&(e.weeks=this.XJ().F()),t.wr(this,"days")&&(e.days=this.xg().F()),t.wr(this,"colorScale")&&(e.colorScale=this.kd().F()),t.wr(this,"colorRange")&&(e.colorRange=this.Qi().F()),{chart:e}},t.g.U=function(e,i){if(u.u.U.call(this,e,i),"data"in e&&this.data(e.data),"years"in e&&this.ai().ga(!!i,e.years),"months"in e&&this.pg().ga(!!i,e.months),"weeks"in e&&this.XJ().ga(!!i,e.weeks),"days"in e&&this.xg().ga(!!i,e.days),"colorScale"in e){var n=e.colorScale,s=null;t.z(n)?s=t.dt(n,null):t.C(n)&&(s=t.dt(n.type,null))&&s.N(n),s&&this.kd(s)}"colorRange"in e&&this.Qi(e.colorRange),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip)},t.g.R=function(){t.sd(this.la,this.Yc,this.o,this.G,this.K,this.b,this.vb,this.Mb),this.Yc=this.la=null,delete this.sd,this.Mb=this.vb=this.b=this.K=this.G=this.o=null,u.u.R.call(this)};var $=u.prototype;$.getType=$.Ma,$.data=$.data,$.noData=$.Gm,$.tooltip=$.Ua,$.colorRange=$.Qi,$.colorScale=$.kd,$.years=$.ai,$.months=$.pg,$.weeks=$.XJ,$.days=$.xg,$.getActualHeight=$.oaa,t.Tp.calendar=m,t.E("anychart.calendar",m)}.call(this,$)),_.circular_gauge||(_.circular_gauge=1,function(t){var e=function(e,i,n){return e=t.Pu.prototype.yl.call(e,i,n,void 0,void 0),t.mn(e)},i=function(e,i){return t.zk(j,e,i||"center")},n=function(e,i){return t.zk(B,e,i||"bar")},s=function(e){return null===e?e:t.zo(e)},a=function(){t.Y.call(this),this.mb=new t.dy,this.mb.ta("positionFormatter",t.ep),this.mb.ta("size",10),this.mb.ta("anchor","center"),this.mb.ta("offsetX",0),this.mb.ta("offsetY",0),this.mb.ta("rotation",0),this.mb.kb(this),this.Si={},t.T(this.ua,[["length",0,9],["type",0,9],["stroke",0,1],["fill",0,1],["hatchFill",0,9],["position",0,9]])},o=function(e,i){var n=t.Qc(e.Si);return t.D(i)?i.call(n,n):i},r=function(){t.Y.call(this),this.Ga("defaultAxis"),this.ci=[],this.Fk=[],this.w3=[],this.c4=[],this.sf=388,t.T(this.ua,[["overlapMode",this.sf,1],["startAngle",this.sf,9],["sweepAngle",this.sf,9],["fill",16,1],["width",this.sf,1],["radius",this.sf,9],["cornersRounding",this.sf,9],["drawFirstLabel",this.sf,9],["drawLastLabel",this.sf,9]])},l=function(e){return"log"===t.zk(H,e,"linear")?t.gt():t.ft()},h=function(e){var i=e.g("sweepAngle");return t.p(i)?i:e.Te.g("sweepAngle")},c=function(t,e,n){var s=e?t.Xa():t.yb();e=e?t.labels():t.qb(),e=i(e.g("position"));var a=t.Gq,o=s.g("position");return"outside"==e?(a+=t.lj/2+n,s.enabled()&&("outside"==o?a+=s.Ws:"center"==o&&(a+=s.Ws>t.lj?(s.Ws-t.lj)/2:0))):"inside"==e&&(a-=t.lj/2+n,s.enabled()&&("inside"==o?a-=s.Ws:"center"==o&&(a-=s.Ws>t.lj?(s.Ws-t.lj)/2:0))),a},u=function(i,n,s){var a=s?i.w3:i.c4;if(t.p(a[n]))return a[n];var o=s?i.labels():i.qb(),r=o.be(n),l=i.qa;return s=(s?l.Xa():l.yb()).get()[n],i=i.Am(n,s),s={value:{angle:0,radius:0}},a[n]=r?e(o,r):e(o,i,s),a[n]},d=function(e,n){n=t.ab(t.Vm(n,6));var s="center",a=i(e.labels().g("position"));return"inside"==a?n?0<n&&90>n?s="right-bottom":90==n?s="center-bottom":90<n&&180>n?s="left-bottom":180==n?s="left-center":180<n&&270>n?s="left-top":270==n?s="center-top":270<n&&(s="right-top"):s="right-center":"outside"==a&&(n?0<n&&90>n?s="left-top":90==n?s="center-top":90<n&&180>n?s="right-top":180==n?s="right-center":180<n&&270>n?s="right-bottom":270==n?s="center-bottom":270<n&&(s="left-bottom"):s="left-center"),s},p=function(){t.Y.call(this),t.T(this.ua,[["fill",16,1],["axisIndex",4,5],["position",4,9],["startSize",4,9],["endSize",4,9],["from",4,1],["to",4,1],["radius",4,1],["cornersRounding",4,9]])},g=function(e,i,n,s,a,o,r){r=!!t.p(r)&&r;var l=(o-a)/(s-n),h=e.Te.tc,c=e.Te.vc;if(s>n)for(e=n;e<=s;e++){var u=a+l*(e-n),d=e*Math.PI/180,p=h+u*Math.cos(d);u=c+u*Math.sin(d),r&&e==n?i.moveTo(p,u):i.lineTo(p,u)}else for(e=n;e>=s;e--)u=a+l*(e-n),d=e*Math.PI/180,p=h+u*Math.cos(d),u=c+u*Math.sin(d),r&&e==n?i.moveTo(p,u):i.lineTo(p,u);d=s*Math.PI/180,p=h+o*Math.cos(d),u=c+o*Math.sin(d),i.lineTo(p,u)},f=function(t,e,i,n,s){return"outside"==(t=t.g("position"))?e*(1+(s?0:n))+i/2:"inside"==t?e*(1-(s?0:n))-i/2:e*(1+(s?-.5:.5)*n)},m=function(e,i,n,s){var a=e.Te.vc;s=t.bb(s),i.x=e.Te.tc+n*Math.cos(s),i.y=a+n*Math.sin(s)},v=function(e,i,n,s,a,o,r,l,h,c,u,d,p,f,v,b,y){var S=(n+s)/2,x=(a+o)/2,w=(r+l)/2,C=e.Te.tc,T=e.Te.vc,D=i[p],k={},$={},O={},P={};m(e,k,a,n),m(e,$,o,s),m(e,O,l,s),m(e,P,r,n);var L=t.kn(0,0,0,0);L.left=Math.min(k.x,$.x,O.x,P.x),L.top=Math.min(k.y,$.y,O.y,P.y),L.width=Math.max(k.x,$.x,O.x,P.x)-L.left,L.height=Math.max(k.y,$.y,O.y,P.y)-L.top,k=[],O={},($={}).position="0",$.opacity=c,$.color=h,k.push($),O.position="1",O.opacity=d,O.color=u,k.push(O),c=(h=M(e.Te,e.g("axisIndex")).scale().Ne())?-1:1,(u={}).angle=-(S+90*c),u.keys=k,d=t.qk(),g(e,d,n,S,(r+a)/2,(w+x)/2,!0),g(e,d,S,s,(w+x)/2,(l+o)/2,!1),u.mode=d.rb(),g(e,D,n,S,a,x,!0),g(e,D,S,n,w,r,!1),!p&&f&&(r=C+t.db(n,a),n=T+t.eb(n,a),f<v/2?D.Ff(r,n,v-f,v-f,!1,h):D.Ff(r,n,f,f,!0,h)),g(e,D,S,s+.1*c,x,o,!0),p==i.length-1&&b&&(r=C+t.db(s+.1,l),n=T+t.eb(s+.1,l),b<y/2?D.Ff(r,n,y-b,y-b,!1,h):D.Ff(r,n,b,b,!0,h)),g(e,D,s+.1*c,S,l,w,!1),D.fill(u),t.qd(d)},b=function(e){e.Ca&&e.Ca.length&&(0,t.Pe)(e.Ca,(function(t){t.clear()}))},y=function(){t.Y.call(this),this.Oa=t.ok(),this.Ud=t.nk(),t.T(this.ua,[["radius",4,9],["stroke",16,1],["fill",16,1],["hatchFill",65536,1]])},S=function(){t.xv.call(this),this.vc=this.tc=window.NaN},x=function(){t.Y.call(this),this.o=t.qk(),this.o.stroke("none").fill(t.bm),this.f={},this.state=new t.ix(this),t.T(this.ua,[["stroke",16,1],["fill",16,1],["hatchFill",65536,1],["axisIndex",4,5]])},w=function(e,i,n){return t.D(i)?(e=i.call(e.f,e.f),e=n?t.Ub(e):t.Wb(e)):e=i,e},C=function(e,i){return t.p(i)?(e.G=i,e):e.G},T=function(e){e.ia||(e.ia=t.qk())},D=function(t,e){e&&(e.tag={X:t},e.tag.index=t.$().ma())},k=function(){x.call(this),t.T(this.ua,[["width",4,9],["position",4,9],["radius",4,9],["barDrawer",4,1]])},$=function(){x.call(this),t.T(this.ua,[["verticesCount",4,9],["verticesCurvature",4,9],["topRatio",4,9],["bottomRatio",4,9],["topRadius",4,9],["bottomRadius",4,9]])},O=function(e,i,n,s,a,o,r,l,h,c,u,d,p,g){g?(o=t.ab(n+o),s=t.ab(n+s/2-a)):(o=t.ab(n+s-o),s=t.ab(n+s/2+a)),n=h+Math.cos(t.bb(o))*l,l=c+Math.sin(t.bb(o))*l,h+=Math.cos(t.bb(s))*r,r=c+Math.sin(t.bb(s))*r,s=(n+h)/2,c=(l+r)/2;var f=t.bb(o+90);a=n+1e4*Math.cos(f);var m=l+1e4*Math.sin(f);a=(a-n)*(h-(f=(n*Math.pow(m-l,2)+h*Math.pow(a-n,2)+(a-n)*(m-l)*(r-l))/(Math.pow(m-l,2)+Math.pow(a-n,2))||0))/(m-l)+r||0,a=t.cb(Math.atan(t.gn(h,r,f,a)/t.gn(n,l,f,a))),u=o+(g?-u:u)+((f=e.g("topRatio"))<1-(m=e.g("bottomRatio"))?g?90-a:-(90-a):g?-(90-a):90-a),s+=Math.cos(t.bb(u))*d,c+=Math.sin(t.bb(u))*d,a=.5>(f=e.g("verticesCurvature"))?90:-90,e=s+.5*Math.cos(t.bb(u+a))*d,o=c+.5*Math.sin(t.bb(u+a))*d,a=.5>f?-90:90,s+=.5*Math.cos(t.bb(u+a))*d,d=c+.5*Math.sin(t.bb(u+a))*d,g?p?i.Sk(e,o,s,d,h,r):i.Sk(s,d,e,o,h,r):p?i.Sk(e,o,s,d,n,l):i.Sk(s,d,e,o,n,l)},P=function(){x.call(this),t.T(this.ua,[["size",4,9],["position",4,9],["radius",4,9],["type",4,9]]),this.ia=new t.dy,this.ia.kb(this),this.ia.ta("positionFormatter",t.ep),this.ia.ta("size",10),this.ia.ta("anchor","center"),this.ia.ta("offsetX",0),this.ia.ta("offsetY",0),this.ia.ta("rotation",0)},L=function(){x.call(this),t.T(this.ua,[["startWidth",4,9],["startRadius",4,9],["middleWidth",4,9],["middleRadius",4,9],["endWidth",4,9],["endRadius",4,9]])},I=function(e,i,n,s){var a=(s=s||0)+s,o=e.Wk(),r=i.scale(),l=o.tc,c=o.vc,u=i.Rj(),d=i.Vl(),p=h(i),g=o.Rj();o=t.L(e.g("startRadius"),g),o-=s,i=t.L(e.g("startWidth"),g),i+=a;var f=e.g("endRadius");u=null!=f?t.L(f,g):u,u+=s,s=null!=(s=e.g("endWidth"))?t.L(s,g):0,s+=a,f=null!=(f=e.g("middleRadius"))?t.L(f,g):.9*u,e=t.L(e.g("middleWidth"),g),e+=a,g=t.Za(r.transform(n),0,1),n=t.ab(d+g*p),r=t.bb(n),a=t.bb(t.ab(d+g*p+90)),d=t.bb(t.ab(d+g*p-90)),p=l+o*Math.cos(r),g=c+o*Math.sin(r);var m=l+f*Math.cos(r),v=c+f*Math.sin(r),b=l+u*Math.cos(r);return r=c+u*Math.sin(r),{angle:n,Dc:l,uc:c,Dja:o,Eja:i,Bja:f,Cja:e,zja:u,Aja:s,lY:p+i*Math.cos(a),nY:g+i*Math.sin(a),mY:p+i*Math.cos(d),oY:g+i*Math.sin(d),nW:m+e*Math.cos(a),pW:v+e*Math.sin(a),oW:m+e*Math.cos(d),qW:v+e*Math.sin(d),tT:b+s*Math.cos(a),vT:r+s*Math.sin(a),uT:b+s*Math.cos(d),wT:r+s*Math.sin(d)}},A=function(e,i){this.ka(),t.ux.call(this),this.Ga("circularGauge"),this.o=[],this.K=[],this.Bc=[],this.ba=[],this.aa=[],this.jd=[],this.f=[],this.Ka=this.Ba=this.$a=0,this.data(e||null,i),t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj),t.T(this.ua,[["fill",16,65],["stroke",16,1],["circularPadding",4,1],["encloseWithStraightLine",4,1],["startAngle",4,1],["sweepAngle",4,1],["defaultPointerType",0,0]]),this.da(!0),t.wr(this,"tooltip")},E=function(t,e){switch(e){case"bar":return t.K;case"marker":return t.Bc;case"needle":return t.ba;case"knob":return t.aa}return null},G=function(e,i){return t.xa(e.f,(function(t){return t.id()==i}))},U=function(e){return!(t.J(e,t.Mr)||t.J(e,t.Cr)||t.J(e,t.Jr)||t.A(e))&&!t.D(e)&&t.C(e)},F=function(t){for(var e=0,i=t.f.length;e<i;e++){var n=t.f[e];n&&n.B(4)}},M=function(t,e){return t.o[e]},_=function(e,i,n,s,a){var o=e.g("sweepAngle"),r=e.Vl(),l=r+o,h=t.bb(r),c=t.bb(l);e.P=e.D&&e.D.enabled()?t.L(e.D.g("radius"),a):0;var u=n+a*Math.cos(h);h=s+a*Math.sin(h);var d=n+a*Math.cos(c);if(c=s+a*Math.sin(c),0==o%360&&0!=o)i.Fe(n,s,a+e.b,a+e.b,r,o);else if(180<Math.abs(o)&&e.g("encloseWithStraightLine")){var p=90-(360-Math.abs(o))/2;i.Fe(u,h,e.b,e.b,0>o?r+90-p:r+270+p,0>o?-90+p:90-p),i.Fe(n,s,a+e.b,a+e.b,r,o,!0),i.Fe(d,c,e.b,e.b,l,0>o?-90+p:90-p,!0)}else if(0<(p=360-Math.abs(o)-90))i.Fe(u,h,e.b,e.b,0>o?r+90:r+270,0>o?-90:90),i.Fe(n,s,a+e.b,a+e.b,r,o,!0),i.Fe(d,c,e.b,e.b,l,0>o?-90:90,!0),i.Fe(n,s,e.b+e.P,e.b+e.P,0>o?l-45:l+45,0>o?-p:p,!0);else{p=t.bb(0>o?l-45:l+45);var g=n+Math.cos(p)*(e.b+e.P),f=s+Math.sin(p)*(e.b+e.P);p=t.bb(0>o?l-90:l+90);var m=d+Math.cos(p)*e.b,v=c+Math.sin(p)*e.b;p=t.bb(0>o?l-45+360-o+90:l+405-o-90);var b=n+Math.cos(p)*(e.b+e.P),y=s+Math.sin(p)*(e.b+e.P);p=t.bb(0>o?r+90:r-90);var S=u+Math.cos(p)*e.b,x=h+Math.sin(p)*e.b;p=f-v;var w=m-g;g=g*v-m*f,f=y-x,b=(w*(y=b*x-S*y)-(m=S-b)*g)/(p*m-f*w),p=(g*f-y*p)/(p*m-f*w),t.gn(b,p,n,s)<a?(i.Fe(u,h,e.b,e.b,0>o?r+90:r+270,0>o?-90:90),i.Fe(n,s,a+e.b,a+e.b,r,o,!0),i.Fe(d,c,e.b,e.b,l,0>o?-90:90,!0),i.lineTo(b,p)):i.Fe(n,s,a+e.b,a+e.b,0,360)}i.close()},N=function(e){return e.Za?e.Za.clone():t.kn(0,0,0,0)},R=function(t,e){var i=new A(t,e);return i.ta("defaultPointerType","needle"),i.Kg(),i},j={yQ:"inside",xz:"center",mZ:"outside"},B={kF:"bar",npa:"knob",av:"marker",hqa:"needle"},H={LINEAR:"linear",W8:"log"};t.H(a,t.Y);var z,V=(z={},t.sq(z,[[0,"length",function(e){return null===e?e:t.zo(e)}],t.Z.EZ,t.Z.qF,t.Z.cC,t.Z.xQ,[0,"position",function(t){return i(t)}]]),z);t.U(a,V),t.g=a.prototype,t.g.ra=t.Y.prototype.ra,t.g.sa=t.Y.prototype.sa,t.g.remove=function(){this.mb&&this.mb.remove(),this.f&&this.f.remove()},t.g.Gd=function(){var e=this.g("length");this.Ws=null!=e?t.L(e,this.b.Rj()):this.b.lj,this.Oc=this.b.Rj(),"outside"==(e=this.g("position"))?this.Oc+=this.b.lj/2+this.Ws/2:"inside"==e&&(this.Oc-=this.b.lj/2+this.Ws/2),this.Si.length=this.Ws,this.Si.radius=this.Oc,this.Si.cx=this.b.Wk().tc,this.Si.cy=this.b.Wk().vc,this.mb.clear();var i=this.g("stroke");e=this.g("fill"),t.D(i)||this.mb.ta("stroke",i),t.D(e)||this.mb.fill(e),this.mb.ta("size",this.Ws/2),i=this.g("type"),this.mb.type(i);var n=this.g("hatchFill");this.f||!n||t.cp(n)||(this.f=new t.dy,this.f.ta("positionFormatter",t.ep),this.f.ta("size",10),this.f.ta("anchor","center"),this.f.ta("offsetX",0),this.f.ta("offsetY",0),this.f.ta("rotation",0),this.f.O(this.O()),this.f.zIndex(Y)),this.f&&(this.f.clear(),this.f.Dd(!0),this.f.ta("size",this.Ws/2),this.f.ta("type",i),this.f.ta("fill",e),this.f.ta("stroke",null))},t.g.hq=function(e,i){var n,s=t.bb(e),a=this.b.Wk().tc,r=this.b.Wk().vc;a+=this.Oc*Math.cos(s),s=r+this.Oc*Math.sin(s),r=this.mb.add({value:{x:a,y:s}}),n=t.p(r.g("rotation"))?r.g("rotation"):t.p(this.mb.g("rotation"))?this.mb.g("rotation"):0,this.Si.rotation=n+e+90,this.Si.x=a,this.Si.y=s,this.Si.angle=t.ab(e-st),this.Si.value=i,r.ta("rotation",n+e+90);var l=this.g("fill"),h=this.g("stroke");t.D(l)&&r.ta("fill",t.Ub(o(this,l))),t.D(h)&&r.ta("stroke",t.Wb(o(this,h))),this.f&&this.f.add({value:{x:a,y:s}}).rotation(n+e+90)},t.g.Rl=function(){if(this.zc()){if(this.J(8)){var t=this.zIndex(),e=.1*at;this.mb.zIndex(t+W*e),this.f&&this.f.zIndex(t+Y*e),this.I(8)}this.J(2)&&(this.mb.O(this.O()),this.f&&this.f.O(this.O()),this.I(2)),this.mb.W(),this.f&&this.f.W(),this.I(4)}},t.g.F=function(){var e=a.u.F.call(this);return t.Tq(this,V,e),e},t.g.U=function(e,i){a.u.U.call(this,e,i),t.Iq(this,V,e,i)},t.H(r,t.Y);var q=function(){function e(e){return null===e?e:t.zo(e)}var i={};return t.sq(i,[t.Z.yz,t.Z.dC,[0,"startAngle",function(e){return null===e?e:t.ab(t.N(e)||0)}],[0,"width",e],[0,"sweepAngle",function(e){return null===e?e:t.Za(t.N(e)||0,-360,360)}],[0,"radius",e],[0,"cornersRounding",t.zo],[0,"drawFirstLabel",t.Dq],[0,"drawLastLabel",t.Dq]]),i}();t.U(r,q),r.prototype.ra=2|t.Y.prototype.ra,r.prototype.sa=912|t.Y.prototype.sa;var W=2,Y=3;t.g=r.prototype,t.g.Pc=null,t.g.Da=null,t.g.rc=null,t.g.mb=null,t.g.Rc=null,t.g.scale=function(e){if(t.p(e)){if(e=t.jt(this.qa,e,null,3,null,this.ii,this)){var i=this.qa==e;this.qa=e,e.da(i),i||this.B(this.sf,3)}return this}return this.qa||(this.qa=t.ft(),t.K(this.qa,this.ii,this)),this.qa},t.g.ii=function(e){t.X(e,2)&&this.B(this.sf,3)},t.g.qb=function(e){return this.rc||(this.rc=new t.Zx,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.labels=function(e){return this.Da||(this.Da=new t.Zx,t.W(this,"labels",this.Da),this.Da.ga(!0,this.vf("labels")),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(){this.pj(),this.B(384,1)},t.g.yb=function(e){return this.Rc||(this.Rc=new a,t.W(this,"minorTicks",this.Rc),this.Rc.kb(this),this.Rc.b=this,t.K(this.Rc,this.li,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.Xa=function(e){return this.mb||(this.mb=new a,t.W(this,"ticks",this.mb),this.mb.kb(this),this.mb.b=this,t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0;t.X(e,8)&&(i=384,this.pj()),t.X(e,1)&&(i|=256),this.B(i,1)},t.g.Rj=function(){return this.Gq},t.g.Vl=function(){var t=this.g("startAngle");return null!=t?t+st:this.Te.Vl()},t.g.pj=function(){this.ci.length=0,this.Fk.length=0,this.w3.length=0,this.c4.length=0,this.ik=null},t.g.sy=function(){if(!this.ik||this.J(512)){if("allow-overlap"==this.g("overlapMode"))return!1;for(var e,i,n,s,a,o,r,l,h=this.scale(),c=[],u=[],d=this.g("drawFirstLabel"),p=this.g("drawLastLabel"),g=h.Xa().get(),f=g.length,m=-1,v=p&&!d?f-1:-1,b=-1,y=-1,S=this.labels().enabled(),x=h.yb().get(),w=0,C=0,T=x.length,D=this.qb().enabled();w<f||C<T;){if(e=g[w],n=x[C],i=h.transform(e),l=h.transform(n),n=e=s=a=null,-1==b&&S)for(r=w;-1==b&&r<f;)n=!r&&d||r==f-1&&p||0!=r&&r!=f-1?this.rd(r,!0):null,e=-1!=v?this.rd(v,!0):null,s=p&&!d?r==f-1?null:this.rd(f-1,!0):r!=m?this.rd(m,!0):null,t.bn(n,e)||t.bn(n,s)||(0>=(o=h.transform(g[r]))&&d||1<=o&&p||0<o&&1>o)&&(b=r),r++;i<=l&&w<f||C==T?(S&&w==b&&this.labels().enabled()?(-1==m&&(m=w),v=w,b=-1,c.push(!0)):c.push(!1),w++,i==l&&(this.labels().enabled()||this.Xa().enabled())&&(u.push(!1),C++)):(D?(n=this.rd(C,!1),-1!=v&&(e=this.rd(v,!0)),-1!=b&&(s=this.rd(b,!0)),-1!=y&&(a=this.rd(y,!1)),i=!(i=this.qb().be(C))||!t.p(i.enabled())||i.enabled(),t.bn(n,e)||t.bn(n,s)||t.bn(n,a)||!i?u.push(!1):0>=(o=h.transform(x[C]))||1<=o||0<o&&1>o?(-1==m&&(m=C),y=C,u.push(!0)):u.push(!1)):u.push(!1),C++)}D||(u=!1),S||(c=!1),this.ik={labels:c,qb:u},this.I(512)}return this.ik},t.g.rd=function(e,i){var n=i?this.ci:this.Fk;if(t.p(n[e]))return n[e];var s=u(this,e,i),a=i?this.labels():this.qb(),o=this.qa,r=(i?o.Xa():o.yb()).get()[e],l=o.transform(r);r=(o=a.be(e))&&t.p(o.g("autoRotate"))?o.g("autoRotate"):a.g("autoRotate");var p=o&&t.p(o.g("offsetX"))?o.g("offsetX"):a.g("offsetX"),g=o&&t.p(o.g("offsetY"))?o.g("offsetY"):a.g("offsetY"),f=c(this,i,r?s.height:0);f+=t.L(g,this.Te.Rj());var m=this.Vl();return g=h(this),l=t.ab(m+l*g),l+=t.L(p,g),g=t.bb(l),p=this.Te.tc+f*Math.cos(g),g=this.Te.vc+f*Math.sin(g),f=o&&t.p(o.g("rotation"))?o.g("rotation"):a.g("rotation"),r&&(f+=0<l&&180>l?l+270:l+90),a=o&&t.p(o.g("anchor"))?o.g("anchor"):r?a.g("anchor"):d(this,l),s.left=p,s.top=g,o=t.Eo(new t.I(0,0,s.width,s.height),a),s.left-=o.x,s.top-=o.y,a=t.Eo(s,a),a=t.Kb(t.bb(f),a.x,a.y),s=t.ln(s),a.transform(s,0,s,0,4),n[e]=s},t.g.Am=function(e,i){var n=this.scale();return n={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:n.CE((0,window.parseFloat)(i)),type:"number"},tickValue:{value:(0,window.parseFloat)(i),type:"number"},max:{value:t.p(n.max)?n.max:null,type:"number"},min:{value:t.p(n.min)?n.min:null,type:"number"},scale:{value:n,type:""}},(n=new t.Fw(n)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"mix"}),t.ov(n)},t.g.ke=function(e,i,n){var s=this.qa,a=n?s.Xa().get():s.yb().get(),o=(s=n?this.labels():this.qb()).be(e),r=o&&t.p(o.g("autoRotate"))?o.g("autoRotate"):s.g("autoRotate");o=u(this,e,n),n=c(this,n,r?o.height:0),a=this.Am(e,a[e]),o=s.add(a,{value:{angle:i,radius:n}},e),r||(e=h(this),s=o&&t.p(o.offsetX())?o.offsetX():s.offsetX(),i+=t.L(s,e),o.anchor(d(this,i)))},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.Xa().remove(),this.labels().remove(),this.yb().remove(),this.qb().remove()},t.g.W=function(){if(!this.zc())return this;var e=this.scale(),i=this.Vl(),n=h(this),s=this.Te.tc,a=this.Te.vc;if(this.Pc||(this.Pc=t.qk(),t.ru(this,this.Pc)),this.J(4)){var o=this.g("radius"),r=this.g("width");this.Gq=t.L(null!=o?o:"100%",this.Te.Rj()),this.lj=t.L(null!=r?r:"3%",this.Te.Rj()),o=t.L(this.g("cornersRounding"),this.lj);var l=this.Gq-this.lj/2,c=this.Gq+this.lj/2;this.Pc.clear(),this.Pc.Fe(s,a,this.Gq-this.lj/2,this.Gq-this.lj/2,i,n),o&&(r=s+t.db(i+n,c),c=a+t.eb(i+n,c),o<this.lj/2?this.Pc.Ff(r,c,this.lj-o,this.lj-o,!1,!1):this.Pc.Ff(r,c,o,o,!0,!1)),this.Pc.Fe(s,a,this.Gq+this.lj/2,this.Gq+this.lj/2,i+n,-n,!o),o&&(r=s+t.db(i,l),c=a+t.eb(i,l),o<this.lj/2?this.Pc.Ff(r,c,this.lj-o,this.lj-o,!1,!1):this.Pc.Ff(r,c,o,o,!0,!1)),this.Pc.close(),this.pj(),this.B(384),this.I(4)}if(this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka(),this.J(16)&&(this.Pc.fill(this.g("fill")),this.Pc.stroke(null),this.I(16)),this.J(256)){var u=this.Xa();u.B(4),u.Gd(),u=u.hq;var d=this.yb();d.B(4),d.Gd(),d=d.hq,this.I(256)}if(this.J(128)){var p=this.labels();p.ja(N(this.Te)),p.Dc(s),p.uc(a),p.UE(i),p.fz(n),p.Ty(this.Te.Rj()),p.clear(),p=this.ke;var g=this.qb();g.ja(N(this.Te)),g.Dc(s),g.uc(a),g.UE(i),g.fz(n),g.Ty(this.Te.Rj()),g.clear(),g=this.ke,this.I(128)}if(this.J(8)&&(s=this.zIndex(),a=.1*at,this.Pc.zIndex(s+a),this.Xa().zIndex(s),this.yb().zIndex(s),this.labels().zIndex(s+4*a),this.qb().zIndex(s+4*a),this.I(8)),this.J(2)&&(s=this.O(),this.Pc.parent(s),this.Xa().O(s),this.yb().O(s),this.labels().O(s),this.qb().O(s),this.I(2)),u||p||d||g){var f;if(o=(a=e.Xa().get()).length,l=(r=e.yb().get()).length,c=this.sy(),t.C(c)){s=c.labels;var m=c.qb}else s=!c,m=!c;for(var v,b,y,S=f=0;f<o||S<l;){var x=a[f];v=r[S];var w=e.transform(x);if(w<=(b=e.transform(v))&&f<o||S==l){c=t.ab(i+w*n);var C=t.A(s)?s[f]:s;(t.A(s)&&s[f]||t.da(s))&&u&&u.call(this.mb,c,x),C&&p&&p.call(this,f,c,!0),y=w,f++}else c=t.ab(i+b*n),C=t.A(m)?m[S]:m,(t.A(m)&&m[S]||t.da(m))&&d&&y!=b&&d.call(this.Rc,c,v),C&&g&&y!=b&&g.call(this,S,c,!1),S++}}return u&&this.Xa().Rl(),d&&this.yb().Rl(),p&&this.labels().W(),g&&this.qb().W(),this.labels().da(!1),this.qb().da(!1),this.Xa().da(!1),this.yb().da(!1),this},t.g.F=function(){var e=r.u.F.call(this);return t.Tq(this,q,e),e.scale=this.scale().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),e},t.g.U=function(e,i){r.u.U.call(this,e,i),t.Iq(this,q,e,i);var n=e.scale;if(t.z(n))var s=l(n);else t.C(n)?(s=l(n.type)).N(n):s=null;s&&this.scale(s),this.Xa(e.ticks),this.yb(e.minorTicks),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels)},t.g.R=function(){t.sd(this.Da,this.rc,this.mb,this.Rc,this.Pc),this.Pc=this.Rc=this.mb=this.Da=this.rc=null,r.u.R.call(this)};var K=r.prototype;K.scale=K.scale,K.ticks=K.Xa,K.minorTicks=K.yb,K.labels=K.labels,K.minorLabels=K.qb,t.H(p,t.Y);var X={};t.sq(X,[[0,"fill",t.Ub],[0,"axisIndex",t.Bq],[0,"position",i],[0,"startSize",s],[0,"endSize",s],[0,"from",t.Bq],[0,"to",t.Bq],[0,"radius",s],[0,"cornersRounding",t.zo]]),t.U(p,X),t.g=p.prototype,t.g.sa=65552|t.Y.prototype.sa,t.g.ra=4|t.Y.prototype.ra,t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.remove=function(){this.ia&&this.ia.parent(null),this.Ca&&this.Ca.length&&(0,t.Pe)(this.Ca,(function(t){t.parent(null)}))},t.g.W=function(){var e=this.Te,i=M(e,this.g("axisIndex"));if(!this.zc())return this;if(!i||!i.enabled())return this.ia&&this.ia.clear(),b(this),this;var n=this.g("fill"),s=t.C(n)&&t.p(n.keys)&&!t.p(n.cx)&&!t.p(n.cy);if(s&&this.B(4),b(this),this.J(4)){var a=i.scale(),o=this.g("from"),r=this.g("to");if(a.zk(o)||a.zk(r))return this.ia&&this.ia.clear(),this.I(4),this;if(this.ia?this.ia.clear():this.ia=t.qk(),this.Ca||(this.Ca=[]),b(this),o!=r){var l=r<o,c=t.Za(a.transform(l?r:o),0,1),u=t.Za(a.transform(l?o:r),0,1);if(c==u)return this;a=(o=i.Vl())+c*(r=h(i)),(r=(o+=u*r)-a)||(r=c==u?0:360),u=t.bb(a),c=t.bb(o);var d=this.g("startSize"),p=this.g("endSize");d=null!=d?d:0,p=null!=p?p:"10%";var m=(0,window.parseFloat)(l?p:d)/100;l=(0,window.parseFloat)(l?d:p)/100,d=function(t,e,i,n,s,a){var o=e.Rj();e=f(t,o,i,s,!0);var r=f(t,o,i,a,!0),l=f(t,o,i,s,!1);if(l<e){var h=l;l=e,e=h}(o=f(t,o,i,a,!1))<r&&(h=o,o=r,r=h);var c=l-e,u=o-r;return e=f(t,n,i,s,!0),r=f(t,n,i,a,!0),(l=f(t,n,i,s,!1))<e&&(h=l,l=e,e=h),(o=f(t,n,i,a,!1))<r&&(h=o,o=r,r=h),[l+(t=(c-(l-e))/2),e-t,o+(i=(u-(o-r))/2),r-i]}(this,e,null!=(d=this.g("radius"))?0:i.lj,null!=d?t.L(d,e.Rj()):i.Rj(),m,l);var y=d[0];l=d[1],m=d[2];var S=d[3],x=this.g("cornersRounding");d=y-l,p=t.L(x,d);var w=m-S;x=t.L(x,w);var C,T=e.tc;if(e=e.vc,s){for(var D=n.keys,k=n.keys.length,$=0;$<k-1;$++)this.Ca[$]?C=this.Ca[$]:this.Ca[$]=C=t.qk(),C.clear().stroke("none").fill("none").parent(this.O()).zIndex(this.zIndex());for($=0;$<k-1;$++){C=D[$];var O=D[$+1],P=C.offset,L=O.offset;v(this,this.Ca,a+r*P,a+r*L,l+(S-l)*P,l+(S-l)*L,y+(m-y)*P,y+(m-y)*L,C.color,t.p(C.opacity)?C.opacity:t.p(n.opacity)?n.opacity:1,O.color,t.p(O.opacity)?O.opacity:t.p(n.opacity)?n.opacity:1,$,p,d,x,w)}}l==S?(n=T+Math.cos(u)*l,C=e+Math.sin(u)*l,this.ia.moveTo(n,C),this.ia.arcTo(l,l,a,r)):(n=T+Math.cos(u)*l,C=e+Math.sin(u)*l,this.ia.moveTo(n,C),g(this,this.ia,a,o,l,S)),i=i.scale().Ne(),x&&(n=T+t.db(o,m),C=e+t.eb(o,m),x<w/2?this.ia.Ff(n,C,w-x,w-x,!1,i):this.ia.Ff(n,C,x,x,!0,i)),m==y?(n=T+Math.cos(c)*m,c=e+Math.sin(c)*m,x||this.ia.lineTo(n,c),this.ia.arcTo(m,m,o,-r)):g(this,this.ia,o,a,m,y),p&&(n=T+t.db(a,l),C=e+t.eb(a,l),p<d/2?this.ia.Ff(n,C,d-p,d-p,!1,i):this.ia.Ff(n,C,p,p,!0,i)),this.ia.close()}else this.ia.clear();this.I(4)}return this.J(16)&&(s?this.ia.fill("none"):this.ia.fill(this.g("fill")),this.ia.stroke("none"),this.I(16)),this.J(8)&&(this.ia.zIndex(this.zIndex()),this.Ca&&this.Ca.length&&(0,t.Pe)(this.Ca,(function(t){t.zIndex(this.zIndex())}),this),this.I(8)),this.J(2)&&(this.ia.parent(this.O()),this.Ca&&this.Ca.length&&(0,t.Pe)(this.Ca,(function(t){t.parent(this.O())}),this),this.I(2)),this},t.g.F=function(){var e=p.u.F.call(this);return t.Tq(this,X,e),e},t.g.U=function(e,i){p.u.U.call(this,e,i),t.Iq(this,X,e)},t.g.R=function(){t.sd(this.Ca,this.ia),this.ia=this.Ca=null,p.u.R.call(this)},t.H(y,t.Y);var J={};t.sq(J,[[0,"radius",s],t.Z.Yn,t.Z.yz,t.Z.xQ]),t.U(y,J),t.g=y.prototype,t.g.sa=65552|t.Y.prototype.sa,t.g.remove=function(){this.Oa&&this.Oa.parent(null)},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.W=function(){if(!this.zc())return this;this.J(16)&&(this.Ud.fill(this.g("fill")),this.Ud.stroke(this.g("stroke")),this.I(16));var e=this.g("hatchFill");if(this.J(65536)&&(this.f||!e||t.cp(e)||(this.f=t.nk(),this.f.parent(this.Oa),this.f.zIndex(1)),this.f&&(this.f.fill(e),this.f.stroke(null),this.B(4)),this.I(65536)),this.J(2)&&(this.Oa.parent(this.O()),this.Ud.parent(this.Oa),this.f&&this.f.parent(this.Oa),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.Ud.zIndex(0),this.f&&this.f.zIndex(1),this.I(8)),this.J(4)){e=t.L(this.g("radius"),this.Te.Rj());var i=this.Te.tc,n=this.Te.vc;this.Ud.To(i),this.Ud.Uo(n),this.Ud.Eb(0>e?0:e),this.f&&(this.f.To(i),this.f.Uo(n),this.f.Eb(e)),this.I(4)}return this},t.g.F=function(){var e=y.u.F.call(this);return t.Tq(this,J,e),e},t.g.U=function(e,i){y.u.U.call(this,e,i),t.Iq(this,J,e,i)},t.g.R=function(){t.sd(this.Ud,this.f,this.Oa),this.Oa=this.f=this.Ud=null,y.u.R.call(this)},t.H(S,t.xv),t.g=S.prototype,t.g.Dc=function(e){return t.p(e)?(e=t.N(e),this.tc!=e&&(this.tc=e,this.B(4,9)),this):this.tc},t.g.uc=function(e){return t.p(e)?(e=t.N(e),this.vc!=e&&(this.vc=e,this.B(4,9)),this):this.vc},t.g.Ty=function(e){return t.p(e)?(e=t.N(e),this.D!=e&&(this.D=e,this.B(4,9)),this):this.D},t.g.UE=function(e){t.p(e)&&(e=null===e?e:t.ab(t.N(e)||0),this.P!=e&&(this.P=e,this.B(4,1)))},t.g.fz=function(e){return t.p(e)?(e=null===e?e:t.Za(t.N(e)||0,-360,360),this.G!=e&&(this.G=e,this.B(4,1)),this):this.G},t.g.tf=function(){var e=this.ja()||t.kn(0,0,0,0),i=e.left,n=e.top,s=e.width,a=e.height;e=new t.I(0,0,this.Oi,this.Ni);var o=new t.gb(0,0);if(this.ja()||!(0,window.isNaN)(this.tc)&&!(0,window.isNaN)(this.vc)){var r=this.g("offsetX"),l=this.g("offsetY");i=(0,window.isNaN)(this.tc)?i+s/2:this.tc,n=(0,window.isNaN)(this.vc)?n+a/2:this.vc;var h=null!=this.P?this.P:0,c=null!=this.G?this.G:360;s=t.p(this.D)&&!(0,window.isNaN)(this.D)?t.L(l,this.D):this.ja()?t.L(l,Math.min(s,a)/2):0,r=h+t.L(r,c),o.x=i+Math.cos(t.bb(r))*s,o.y=n+Math.sin(t.bb(r))*s}else o.x=0,o.y=0;return s=this.g("anchor"),s=t.Eo(new t.I(0,0,this.Oi,this.Ni),s),o.x-=s.x,o.y-=s.y,this.Lg+=o.x,this.Mg+=o.y,e.left=o.x,e.top=o.y,this.xb.oc(1,0,0,1,0,0),this.xb.translate(this.Lg,this.Mg),this.xb.clip(new t.I(0,0,this.nn,this.ln)),e},t.H(x,t.Y),x.prototype.sa=65552|t.Y.prototype.sa,x.prototype.ra=4|t.Y.prototype.ra;var Z={};t.sq(Z,[t.Z.qF,t.Z.cC,t.Z.xQ,[0,"axisIndex",t.Bq]]),t.U(x,Z),t.g=x.prototype,t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.ou=function(){return!1},t.g.Ch=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.B(4,5)),this):null!=this.P?this.P:this.i?0:C(this)},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.ma=function(){return this.md?-1:(0,t.za)(this.Te.Ue(),this)},t.g.yh=function(e){return t.p(e)?(this.Wq=e,this):this.Wq},t.g.id=function(e){return t.p(e)?(this.he=e,this):this.he||String(this.Wq)},t.g.remove=function(){this.ia&&(t.J(this.ia,t.Ag)?this.ia.parent(null):this.ia.O(null)),this.b&&(t.J(this.b,t.Ag)?this.b.parent(null):this.b.O(null))},t.g.data=function(e,i){return t.p(e)?(this.qB!==e&&(this.qB=e,t.qd(this.gm),this.sd=null,t.J(e,t.Cr)?this.i=this.gm=e.Ui():t.J(e,t.Mr)?this.i=this.gm=e.Yd():this.i=null===e?null:(this.gm=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.i&&t.K(this.i,this.dd,this),this.B(4,5)),this):this.i},t.g.dd=function(e){t.X(e,16)&&this.B(4,5)},t.g.$=function(){return this.i?this.sd||(this.sd=this.i.$()):this.Te.$()},t.g.Ec=function(){return this.i?this.sd=this.i.$():this.Te.Ec()},t.g.W=function(){if(this.J(16)){var e=this.g("fill"),i=this.g("stroke");this.ia.fill(w(this,e,!0)),this.ia.stroke(w(this,i,!1)),this.I(16)}return this.J(8)&&(this.ia.zIndex(this.zIndex()),this.o.zIndex(this.zIndex()+1),this.b&&(this.b.zIndex(this.zIndex()+.1*at),this.o.zIndex(this.b.zIndex()+1)),this.I(8)),this.J(2)&&(t.J(this.ia,t.Ag)?this.ia.parent(this.O()):this.ia.O(this.O()),this.b&&(t.J(this.b,t.Ag)?this.b.parent(this.O()):this.b.O(this.O())),this.o.parent(this.O()),this.I(2)),this},t.g.Ic=function(e){this.oe&&!e||(this.oe=new t.Fw);var i={series:{value:this,type:""},index:{value:(e=this.$()).ma(),type:"number"},value:{value:e.get("value"),type:"number"}};return this.oe.lg(e).Li([this]),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.pk=t.ia,t.g.wm=t.ia,t.g.ml=t.ia,t.g.pq=t.ia,t.g.ig=function(e){return(e=x.u.ig.call(this,e)).pointIndex=t.N(t.so(e.domTarget).index),e},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var s=this.$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,series:this,iterator:s,pointIndex:i,target:this,originalEvent:e}},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(){var e;return(e=!t.mx(this.state,t.vo))&&(e=!(this.state.fk()&t.vo)),e||!this.enabled()||this.state.Vh(t.vo,this.state.Gc==t.gm?window.NaN:void 0),this},t.g.$i=function(e){if(!this.enabled())return this;if(t.A(e)){for(var i=t.sx(this.state,t.vo),n=0;n<i.length;n++)t.Aa(e,i[n])||this.state.Vh(t.vo,i[n]);t.qx(this.state,e)}else t.ea(e)&&(this.Md(),t.qx(this.state,e));return this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo)},t.g.ie=function(){return this},t.g.ej=function(e){return t.p(e)?((e=null===e?null:t.Bk(e))!=this.et&&(this.et=e),this):this.et},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.F=function(){var e=x.u.F.call(this);return t.Tq(this,Z,e),e.pointerType=this.Ma(),this.i&&(e.data=this.data().F()),t.p(this.P)&&(e.dataIndex=this.P),this.he&&(e.id=this.id()),this.Wq!=this.ma()&&(e.autoIndex=this.yh()),e},t.g.U=function(e,i){x.u.U.call(this,e,i),t.Iq(this,Z,e,i),this.id(e.id),this.yh(e.autoIndex),this.Ch(e.dataIndex),"data"in e&&this.data(e.data||null)},t.g.R=function(){t.sd(this.ia,this.b,this.o),this.o=this.b=this.ia=null,x.u.R.call(this)};var Q=x.prototype;Q.id=Q.id,Q.data=Q.data,Q.dataIndex=Q.Ch,t.H(k,x),k.prototype.Ma=function(){return"bar"};var tt={};t.sq(tt,[[0,"width",s],[0,"position",i],[0,"radius",s],[0,"barDrawer",t.gr]]),t.U(k,tt),k.prototype.W=function(){var e=this.Wk(),i=M(e,this.g("axisIndex"));if(!this.zc())return this;if(T(this),!i||!i.enabled())return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;if(this.J(65536)){var n=this.g("hatchFill");this.b||!n||t.cp(n)||(this.b=t.qk(),this.b.parent(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.fill(n),this.b.stroke(null),this.B(4)),this.I(65536)}if(this.J(4)){n=e.tc;var s=e.vc,a=i.scale(),o=this.Ec();o.select(this.Ch());var r=(0,window.parseFloat)(o.get("value"));if(a.zk(r))return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;this.ia?this.ia.clear():this.ia=t.qk();var l=i.Rj(),c=i.lj;o=i.Vl();var u=h(i),d=this.g("radius");i=null!=d?t.L(d,e.Rj()):l,e=null!=(l=this.g("width"))?t.L(l,e.Rj()):c,c=t.p(d)?e/2:e/2+c/2,"outside"==(d=this.g("position"))?i+=c:"inside"==d&&(i-=c),c=t.Za(a.transform(0),0,1),0<=u^(r=t.Za(a.transform(r),0,1))>=c?(a=r,d=c):(a=c,d=r),a=t.ab(o+a*u),(o=t.ab(t.ab(o+d*u)-a))||(o=r==c?0:360),this.f.cx=n,this.f.cy=s,this.f.radius=i,this.f.startAngle=t.ab(a-st),this.f.sweepAngle=o,this.f.width=e,r={centerX:n,centerY:s,radius:i,startAngle:a,sweepAngle:o,width:e,path:this.ia},(u=this.g("barDrawer")).call(r,r),D(this,this.ia),this.b&&(n={centerX:n,centerY:s,radius:i,startAngle:a,sweepAngle:o,width:e,path:this.b},u.call(n,n)),(t.D(this.g("fill"))||t.D(this.g("stroke")))&&this.B(16),this.I(4)}return k.u.W.call(this),this},k.prototype.F=function(){var e=k.u.F.call(this);return t.Tq(this,tt,e,"Bar pointer"),e},k.prototype.U=function(e,i){k.u.U.call(this,e,i),t.Iq(this,tt,e,i)},t.H($,x),$.prototype.Ma=function(){return"knob"};var et=function(){var e={};return t.sq(e,[[0,"verticesCount",function(e){return(e=t.N(e))?e:this.g("verticesCount")}],[0,"verticesCurvature",t.Cq],[0,"topRatio",t.er],[0,"bottomRatio",t.er],[0,"topRadius",s],[0,"bottomRadius",s]]),e}();t.U($,et),$.prototype.W=function(){var e=this.Wk(),i=M(e,this.g("axisIndex"));if(!this.zc())return this;if(T(this),!i||!i.enabled())return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;if(this.J(65536)){var n=this.g("hatchFill");this.b||!n||t.cp(n)||(this.b=t.qk(),this.b.parent(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.fill(n),this.b.stroke(null),this.B(4)),this.I(65536)}if(this.J(4)){n=e.tc;var s=e.vc,a=i.scale(),o=this.Ec();o.select(this.Ch());var r=(0,window.parseFloat)(o.get("value"));if(a.zk(r))return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;this.ia?this.ia.clear():this.ia=t.qk(),o=i.Rj();var l=i.Vl(),c=h(i);i=null!=(i=this.g("topRadius"))?t.L(i,e.Rj()):.7*o;var u=this.g("bottomRadius");e=null!=u?t.L(u,e.Rj()):.6*o,o=this.g("verticesCount");var d=this.g("topRatio"),p=this.g("bottomRatio");d*=(u=360/o)/2,p*=u/2,a=t.Za(a.transform(r),0,1),a=t.ab(l+a*c),this.f.cx=n,this.f.cy=s,this.f.topRadius=i,this.f.bottomRadius=e,this.f.angle=t.ab(a-st),c=Math.abs(i-e)/2,l=i<e;var g=this.g("verticesCurvature");for(r=.5>g?90:-90,c*=Math.abs(.5-g),this.ia.clear(),g=0;g<o;g++){var f=t.ab(a+g*u);this.ia.Fe(n,s,e,e,f,p,0!=g),O(this,this.ia,f,u,d,p,i,e,n,s,r,c,l,!0);var m=t.ab(f+u/2-d);this.ia.Fe(n,s,i,i,m,2*d),O(this,this.ia,f,u,d,p,i,e,n,s,r,c,l,!1),f=t.ab(f+u-p),this.ia.Fe(n,s,e,e,f,p)}if(this.ia.close(),D(this,this.ia),this.b){for(this.b.clear(),g=0;g<o;g++)f=t.ab(a+g*u),this.b.Fe(n,s,e,e,f,p,0!=g),O(this,this.b,f,u,d,p,i,e,n,s,r,c,l,!0),m=t.ab(f+u/2-d),this.b.Fe(n,s,i,i,m,2*d),O(this,this.b,f,u,d,p,i,e,n,s,r,c,l,!1),f=t.ab(f+u-p),this.b.Fe(n,s,e,e,f,p);this.b.close()}this.I(4)}return $.u.W.call(this),this},$.prototype.F=function(){var e=$.u.F.call(this);return t.Tq(this,et,e,"Knob pointer"),e},$.prototype.U=function(e,i){$.u.U.call(this,e,i),t.Iq(this,et,e,i)},t.H(P,x),P.prototype.Ma=function(){return"marker"};var it=function(){var e={};return t.sq(e,[[0,"size",t.zo],[0,"position",i],[0,"radius",s],[0,"type",function(e){return t.D(e)?e:t.Ok(e,"line")}]]),e}();t.U(P,it),P.prototype.W=function(){var e=this.Wk(),i=M(e,this.g("axisIndex"));if(!this.zc())return this;if(T(this),!i||!i.enabled())return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;var n=this.g("type");if(this.J(65536)){var s=this.g("hatchFill");this.b||!s||t.cp(s)||(this.b=new t.dy,this.b.ta("positionFormatter",t.ep),this.b.ta("size",10),this.b.ta("anchor","center"),this.b.ta("offsetX",0),this.b.ta("offsetY",0),this.b.ta("rotation",0),this.b.O(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.ta("fill",s),this.b.ta("stroke",null),this.b.ta("size",this.D),this.b.ta("type",n),this.B(4)),this.I(65536)}if(this.J(4)){var a=e.tc;s=e.vc;var o=i.scale(),r=this.Ec();r.select(this.Ch());var l=(0,window.parseFloat)(r.get("value"));if(o.zk(l))return this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;var c=i.Rj(),u=i.lj,d=i.Vl(),p=h(i);i=null!=(i=this.g("radius"))?t.L(i,e.Rj()):c,c=this.g("size"),this.D=null!=c?t.L(c,e.Rj()):u,"outside"==(e=this.g("position"))?i+=this.D+u/2:"inside"==e&&(i-=this.D+u/2),e=t.Za(o.transform(l),0,1),e=t.ab(d+e*p),o=t.bb(e),d=a+i*Math.cos(o),o=s+i*Math.sin(o),this.f.cx=a,this.f.cy=s,this.f.radius=i,this.f.size=this.D,this.f.angle=t.ab(e-st),this.ia.ta("size",this.D),this.ia.ta("type",n),(a=this.ia.add({value:{x:d,y:o}},0)).ta("rotation",e+90),this.b&&(this.b.ta("size",this.D),this.b.ta("type",n),this.b.add({value:{x:d,y:o}},0).ta("rotation",e+90)),(t.D(this.g("fill"))||t.D(this.g("stroke")))&&this.B(16),this.I(4)}return P.u.W.call(this),this.ia.W(),this.b&&this.b.W(),a&&a.Vd()&&(a.Vd().tag=r.ma()),this},P.prototype.F=function(){var e=P.u.F.call(this);return t.Tq(this,it,e,"Marker pointer"),e},P.prototype.U=function(e,i){P.u.U.call(this,e,i),t.Iq(this,it,e,i)},t.H(L,x),L.prototype.Ma=function(){return"needle"};var nt={};t.sq(nt,[[0,"startWidth",s],[0,"startRadius",s],[0,"middleWidth",s],[0,"middleRadius",s],[0,"endWidth",s],[0,"endRadius",s]]),t.U(L,nt),t.g=L.prototype,t.g.ph=function(t){return null!=this.Pa[t]},t.g.remove=function(){L.u.remove.call(this),this.o.clear()},t.g.W=function(){var e=M(this.Wk(),this.g("axisIndex"));if(!this.zc())return this;if(T(this),!e||!e.enabled())return this.o.clear(),this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.J(4)&&this.I(4),this;if(this.J(65536)){var i=this.g("hatchFill");this.b||!i||t.cp(i)||(this.b=t.qk(),this.b.parent(this.O()),this.b.zIndex(this.zIndex()+1)),this.b&&(this.b.Dd(!0),this.b.fill(i),this.b.stroke(null),this.B(4)),this.I(65536)}if(this.J(4)){i=e.scale();var n=this.Ec();n.select(this.Ch()),n=(0,window.parseFloat)(n.get("value"));var s=I(this,e,n);if(i.zk(n))return this.o.clear(),this.ia&&this.ia.clear(),this.b&&this.b.clear(),this.I(4),this;this.ia||(this.ia=t.qk()),this.f.cx=s.Dc,this.f.cy=s.uc,this.f.startRadius=s.Dja,this.f.startWidth=s.Eja,this.f.middleRadius=s.Bja,this.f.middleWidth=s.Cja,this.f.endRadius=s.zja,this.f.endWidth=s.Aja,this.f.angle=t.ab(s.angle-st),this.ia.clear().moveTo(s.tT,s.vT).lineTo(s.nW,s.pW).lineTo(s.lY,s.nY).lineTo(s.mY,s.oY).lineTo(s.oW,s.qW).lineTo(s.uT,s.wT).close(),this.b&&this.b.clear().moveTo(s.tT,s.vT).lineTo(s.nW,s.pW).lineTo(s.lY,s.nY).lineTo(s.mY,s.oY).lineTo(s.oW,s.qW).lineTo(s.uT,s.wT).close(),e=I(this,e,n,5),this.o.clear().moveTo(e.tT,e.vT).lineTo(e.nW,e.pW).lineTo(e.lY,e.nY).lineTo(e.mY,e.oY).lineTo(e.oW,e.qW).lineTo(e.uT,e.wT).close(),D(this,this.o),(t.D(this.g("fill"))||t.D(this.g("stroke")))&&this.B(16),this.I(4)}return L.u.W.call(this),this},t.g.F=function(){var e=L.u.F.call(this);return t.Tq(this,nt,e,"Needle pointer"),e},t.g.U=function(e,i){L.u.U.call(this,e,i),t.Iq(this,nt,e,i)},t.H(A,t.ux),A.prototype.sa=446480|t.ux.prototype.sa,A.prototype.Ma=function(){return"circular-gauge"};var st=-90,at=1e-4;t.g=A.prototype,t.g.co=function(){A.u.co.call(this);for(var t=this.La("chartElements")||{},e=0,i=this.o.length;i--;)this.o[i]&&e++;t.axes=e,this.La("chartElements",t)},t.g.Ue=function(){return this.f},t.g.ts=function(){return[this]},t.g.oq=function(){return[]},t.g.Uu=function(){return!0},t.g.tL=function(){return new S},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),this.sd=null,t.J(e,t.Cr)?this.i=this.Yc=e.Ui():this.i=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.la=this.i,t.K(this.la,this.dd,this),F(this),this.B(266496,5)),this):this.la},t.g.dd=function(e){t.X(e,16)&&(F(this),this.B(266496,5))},t.g.$=function(){return this.sd||this.Ec()},t.g.Ec=function(){return this.sd=this.data().$()},t.g.bl=function(t,e,i,n,s){return t={type:"hovered"==t?"pointshover":"pointsselect",seriesStatus:this.mG(i,n),currentPoint:this.XD(i,t,n),actualTarget:e.target,target:this,originalEvent:e},s&&(t.PT=!0),t},t.g.iS=function(e){return this.D||(this.D=new y,t.W(this,"cap",this.D),this.D.Wk(this),t.K(this.D,this.Hia,this),this.B(16384,1)),t.p(e)?(this.D.N(e),this):this.D},t.g.Hia=function(e){var i=0,n=0;t.X(e,1)&&(i|=16384,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.xe=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jd[n];return a||(a=new p,this.jd[n]=a,a.zIndex(30+at*this.Ba),this.Ba++,a.Wk(this),a.Ga(this.vf("defaultRangeSettings")),t.K(a,this.Iia,this),this.B(266240,5)),t.p(s)?(a.N(s),this):a},t.g.Iia=function(){this.B(131072,1)},t.g.$z=function(e,i,s,a){var o="knob"==(e=n(e)),r=ot[e],l=E(this,e);if(r){r=new r;var h=this.f[this.f.length-1];h=h?h.yh()+1:0,this.f.push(r),l[i]=r,i=o?this.Ka++:this.$a++,o=(o?20:40)+at*i,r.yh(h),C(r,i),r.zIndex(o),t.ea(s)?r.Ch(s):r.data(s,a),r.Wk(this),s=this.vf("defaultPointerSettings"),r.Ga(s.base),r.Ga(s[t.pm(e)]),t.K(r,this.fb,this),this.B(266244,5)}else r=null;return r},t.g.vaa=function(t){var e=[],i=this.g("defaultPointerType"),n=arguments.length,s=E(this,i).length;if(this.ka(),n)for(var a=0;a<n;a++)e.push(this.$z(i,s+a,arguments[a]));return this.da(!0),e},t.g.zaa=function(t){return this.YZ(G(this,t))},t.g.YZ=function(e){var i=this.f[e];if(i){t.Pp++,t.Ca(this.f,e,1),e=i.Ma(),e=E(this,e);var n=(0,t.za)(e,i);-1!=n&&t.Ca(e,n,1),t.qd(i),this.B(266240,5),t.Sp()}return this},t.g.yaa=function(){if(this.f.length){t.Pp++;var e=this.f;this.f=[],this.K=[],this.aa=[],this.Bc=[],this.ba=[],this.Ka=this.$a=0,t.sd(e),this.B(266240,5),t.Sp()}return this},t.g.waa=function(t){return this.XZ(G(this,t))},t.g.XZ=function(t){return this.f[t]||null},t.g.nU=function(e){return t.ya(this.f,(function(t){return t.yh()==e}))},t.g.xaa=function(){return this.f.length},function(){function e(e){return function(i,n,s,a){var o=arguments.length,r=t.A(i)?window.NaN:t.N(i);if(3<o){(0,window.isNaN)(r)&&(r=0);var l=n,h=s,c=a}else 2<o?U(i)?(r=0,l=i,h=n,c=s):((0,window.isNaN)(r)&&(r=0),U(n)?(l=n,h=s):(h=n,c=s)):1<o?U(i)?(r=0,l=i,h=n):(0,window.isNaN)(r)?(r=0,h=i,c=n):U(n)?l=n:h=n:0<o?(0,window.isNaN)(r)&&(r=0,U(i)?l=i:h=i):r=0;return(o=E(this,e)[r])||(o=this.$z(e,r,h,c)),t.p(l)?(o.N(l),this):o}}var i,n=A.prototype;for(i in B)n[t.pm(B[i])]=e(B[i])}(),A.prototype.fb=function(e){var i=0,n=0;t.X(e,1)&&(i|=4096,n|=1),t.X(e,4)&&(i|=266240,n|=5),this.B(i,n)},A.prototype.axis=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.o[n];return a||((a=new r).Ga(this.vf("defaultAxisSettings")),a.Wk(this),this.o[n]=a,t.K(a,this.xo,this),this.B(32772,1)),t.p(s)?(a.N(s),this):a},A.prototype.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=32768,n|=1),t.X(e,8)&&(i|=135172),t.X(e,2)&&(i|=262148),this.B(i,n)};var ot={};ot.bar=k,ot.knob=$,ot.marker=P,ot.needle=L;var rt=function(){var e={};return t.sq(e,[t.Z.yz,t.Z.Yn,t.Z.zz,[0,"circularPadding",t.zo],[0,"encloseWithStraightLine",t.Cq],[0,"sweepAngle",function(e){return t.Za(t.N(e)||0,-360,360)}],[0,"defaultPointerType",n]]),e}();t.U(A,rt),t.g=A.prototype,t.g.Rj=function(){return this.na},t.g.Vl=function(){return this.g("startAngle")+st},t.g.yi=function(){return this.Ha?this.Ha.clone():t.kn(0,0,0,0)},t.g.LX=function(t){t.ja(N(this)),t.Ty(this.Rj()),t.Dc(this.tc),t.uc(this.vc),t.UE(this.Vl()),t.fz(this.g("sweepAngle"))},t.g.Qh=function(e){var i,n,s=t.Ga(this.K,this.Bc,this.ba,this.aa);if(t.xr(this.D,this.o,this.jd,s),this.J(262144)){var a=!1;if((0,t.Pe)(this.o,(function(t){t.scale().Bg(),a=a||t.scale().Of()})),a){var o=0;for(i=s.length;o<i;o++)if(n=s[o]){var r=n.$(),l=n.g("axisIndex");r.select(n.Ch()),(l=this.o[l])&&(l.scale().Xc(r.get("value")),t.J(n,k)&&l.scale().Xc(0))}}(0,t.Pe)(this.o,(function(t){t.scale().Hg()})),F(this),this.B(32768),this.B(131072),this.I(262144)}if(this.J(4)){for(function(e,i){e.G?e.G.clear():e.G=e.Na.path(),e.ea=1,e.b=t.L(e.g("circularPadding"),e.ea),e.na=e.ea-e.b,_(e,e.G,0,0,e.na);var n=e.G.rb(),s=Math.min(i.width/n.width,i.height/n.height),a=i.left+i.width/2-n.width/2*s,o=i.top+i.height/2-n.height/2*s;e.ea=s,e.tc=a+Math.abs(n.left)*s,e.vc=o+Math.abs(n.top)*s,e.b*=e.ea,e.na=e.ea-e.b,e.Za=new t.I(a,o,n.width*s,n.height*s),e.Ha=new t.I(a+e.b,o+e.b,n.width*s-e.b,n.height*s-e.b)}(this,e),this.G.clear(),_(this,this.G,this.tc,this.vc,this.na),this.G.zIndex(1),this.G.parent(this.Na),this.D&&this.D.B(4),o=0,i=this.o.length;o<i;o++)(l=this.o[o])&&l.B(4);for(F(this),o=0,i=this.jd.length;o<i;o++)(e=this.jd[o])&&e.B(4);this.B(184320)}if(this.J(16)&&(this.G.stroke(this.g("stroke")),this.G.fill(this.g("fill")),this.I(16)),this.J(16384)&&(this.D&&this.D.O(this.Na).W(),this.I(16384)),this.J(32768)){for(o=0,i=this.o.length;o<i;o++)(l=this.o[o])&&l.O(this.Na).W();this.I(32768)}if(this.J(4096)){for(o=0,i=s.length;o<i;o++)(n=s[o])&&(n.kb(this),n.O(this.Na).W());this.I(4096)}if(this.J(131072)){for(o=0,i=this.jd.length;o<i;o++)(e=this.jd[o])&&e.O(this.Na).W();this.I(131072)}t.zr(this.D,this.o,this.jd,s)},t.g.yj=function(){for(var e=this.$().Hb(),i=0,n=t.Ga(this.K,this.Bc,this.ba,this.aa),s=n.length,a=0;a<s;a++){var o=n[a];if(!o||o.enabled())break;i++}return!e||!s||i==s},t.g.Kg=function(e){var i,n=(e=e||this.oa).axes;if(n){var s=0;for(i=n.length;s<i;s++)n[s]&&this.axis(s,n[s])}if("pointers"in e){if(i=e.pointers,t.A(i))for(s=0;s<i.length;s++){var a=(n=i[s]).pointerType||this.g("defaultPointerType"),o=n.dataIndex,r=n.data||null;(a=this.$z(a,E(this,a).length))&&(a.Ch(o),a.data(r),a.N(n))}}else{if(n=e.bars)for(s=0,i=n.length;s<i;s++)n[s]&&this.bar(s,n[s]);if(n=e.markers)for(s=0,i=n.length;s<i;s++)n[s]&&this.marker(s,n[s]);if(n=e.needles)for(s=0,i=n.length;s<i;s++)n[s]&&this.needle(s,n[s]);if(n=e.knobs)for(s=0,i=n.length;s<i;s++)n[s]&&this.knob(s,n[s])}if(e=e.ranges)for(s=0,i=e.length;s<i;s++)e[s]&&this.xe(s,e[s])},t.g.U=function(e,i){A.u.U.call(this,e,i),t.Iq(this,rt,e,i),this.data(e.data),t.p(e.cap)&&this.iS(e.cap),this.gd(e.interactivity),this.Kg(e)},t.g.F=function(){var e=A.u.F.call(this);t.Tq(this,rt,e),e.data=this.data().F(),this.D&&(e.cap=this.iS().F()),e.interactivity=this.gd().F();var i,n=[],s=0;for(i=this.o.length;s<i;s++){var a=this.o[s];a&&n.push(a.F())}for(n.length&&(e.axes=n),i=[],s=0;s<this.f.length;s++)(n=this.f[s])&&i.push(n.F());for(i.length&&(e.pointers=i),n=[],s=0,i=this.jd.length;s<i;s++)(a=this.jd[s])&&n.push(a.F());return n.length&&(e.ranges=n),{gauge:e}},t.g.R=function(){t.sd(this.Yc,this.i,this.la,this.D,this.jd,this.o,this.K,this.Bc,this.ba,this.aa,this.f),this.D=this.sd=this.la=this.i=this.Yc=null,this.jd.length=0,this.o.length=0,this.K.length=0,this.Bc.length=0,this.ba.length=0,this.aa.length=0,this.f.length=0,A.u.R.call(this)};var lt=A.prototype;lt.data=lt.data,lt.cap=lt.iS,lt.axis=lt.axis,lt.addPointer=lt.vaa,lt.removePointer=lt.zaa,lt.removePointerAt=lt.YZ,lt.removeAllPointers=lt.yaa,lt.getPointer=lt.waa,lt.getPointerAt=lt.XZ,lt.getPointersCount=lt.xaa,lt.range=lt.xe,lt.getType=lt.Ma,lt.noData=lt.Gm,t.Up["circular-gauge"]=R,t.E("anychart.gauges.circular",R)}.call(this,$)),_.graph||(_.graph=1,function(t){var e=function(e,i,n){n=n||new t.gb(0,0);var s=e.x,a=e.y,o=Math.cos(i);i=Math.sin(i),e.x=(s-n.x)*o-(a-n.y)*i+n.x,e.y=(s-n.x)*i+(a-n.y)*o+n.y},i=function(){return new t.Hx(!0)},n=function(e){function n(t){t.kb(this)}t.V.call(this),this.pa=e,this.D=[],this.nt=[],this.f={normal:{},hovered:{},selected:{}},e={},t.T(e,[["fill",0,8192],["stroke",0,8192],["shape",0,8200],["labels",0,4096],["width",0,8200],["height",0,8200]]),this.ca=new t.my(this,e,t.gm),e={},t.T(e,[["fill",0,0],["stroke",0,0],["shape",0,0],["labels",0,0],["width",0,0],["height",0,0]]),this.za=new t.my(this,e,t.vo),this.Ea=new t.my(this,e,t.wo),this.ca.ta("labelsFactoryConstructor",i),this.za.ta("labelsFactoryConstructor",i),this.Ea.ta("labelsFactoryConstructor",i),this.ca.ta("labelsAfterInitCallback",t.sy),this.za.ta("labelsAfterInitCallback",n),this.Ea.ta("labelsAfterInitCallback",n)},s=function(e,i){var n=e.state(i),s=t.xo(n),a=i.id,o=i.eA,r=e.pa.group(i.groupId);if(!e.f[s][a]){var l=e.$();if(l.select(o),o=l.get("labels"),l=(l=l.get(s))&&l.labels?l.labels:{},o=o||{},t.ra(o,l),!t.Jc(o)){var h=new t.Hx(!0);h.N(o)}(l=e[s]().labels()).parent()||(0==n?l.parent(e.pa.labels()):l.parent(e.ca.labels())),(o=r?r[s]().labels():void 0)&&(o.parent()||(0==n?o.parent(e.pa.hf().labels()):o.parent(r.Qa().labels())),l=o),h&&(l=h.parent(l)),l.jg(null),t.K(l,e.de,e),e.f[s][a]=l}return e.f[s][a]},a=function(e){return(e=e.D.pop())||(e=t.qk()),e.clear(),e},o=function(t,e){return e.Gk||(e.Gk=t.tk()),e.Gk},r=function(e,i){var n=s(e,i);if(n.enabled()){var a=o(e,i),r=e.Ic(i);r=n.tk(r),a.text(r),r=n.flatten(),"auto"==n.g("anchor")&&((r=t.Qc(r)).position=i.iI?i.iI:"center-bottom",r.anchor=i.hI?i.hI:"center-top"),a.style(r),t.Mx(a),a.Ij()}},l=function(t){for(var e in t.f)for(var i in t.f[e])t.f[e][i].R();t.f={normal:{},hovered:{},selected:{}}},h=function(e){t.V.call(this),this.ib=e,this.Sc=new t.Ag},c=function(t,e){return e&&(t.Gea=e),t.Gea},u=function(e){t.V.call(this),this.b=e,t.T(this.ua,[["enabled",0,8192],["size",0,8192],["position",0,8192]])},d=function(e,i){var n=p(e,i,"size");return t.p(n)?n:e.g("size")},p=function(t,e,i){return(t=t.b.$()).select(c(e).eA),(t.get("arrow")||{})[i]},g=function(e){n.call(this,e),this.pa=e,this.type=Q,this.i=null,this.Sc=t.qk(),this.G=t.ok(),this.b=t.ok(),this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.K=this.Lf,this.b.parent(this.G),this.K.parent(this.G),t.wl(this)},f=function(e,i){var n=c(i),s=e.pa.b[n.Je];return n=e.pa.b[n.from],t.ab(t.cb(Math.atan2(s.position.y-n.position.y,s.position.x-n.position.x)))},m=function(e,i){var n=e.gk(i);return t.dp(n)},v=function(e,i){var n=e.pa.b[i.from],o=e.pa.b[i.Je];if(e.clear(i),e.pa.gd().g("edges")){i.path=a(e),i.path.tag=e.io(i),i.Zp=e.state(i);var l=m(e,i)+e.pa.gd().g("hoverGap");i.vr=a(e),i.vr.tag=i.path.tag,i.vr.fill(t.bm),i.vr.stroke(t.bm,l)}if(s(e,i).g("enabled")&&(i.Gk=e.tk()),e.TF().g("enabled")){l=e.TF();var u=new h(l);u.O(l.O()),i.AC=u,c(i.AC,i)}i.path?(i.path.moveTo(n.position.x,n.position.y),i.path.lineTo(o.position.x,o.position.y),i.path.parent(e.b),i.vr.moveTo(n.position.x,n.position.y),i.vr.lineTo(o.position.x,o.position.y),i.vr.parent(e.b),i.path.stroke(e.gk(i))):(e.Sc.moveTo(n.position.x,n.position.y),e.Sc.lineTo(o.position.x,o.position.y),e.Sc.stroke(e.gk(i))),i.AC&&i.AC.W(),i.Gk&&(t.Kx(i.Gk),r(e,i),t.Px(i.Gk,e.xl),t.Yx(i.Gk),e.tf(i))},b=function(t){var e=R(t.pa);t.b.suspend(),t.Sc.parent(t.b),t.Sc.clear();for(var i=R(t.pa),n=0;n<i.length;n++)t.clear(i[n]);for(i=0;i<e.length;i++)v(t,e[i]);t.b.resume()},y=function(t){n.call(this,t),this.pa=t,this.type=Z},S=function(){t.V.call(this),t.T(this.ua,[["enabled",0,0],["zoomOnMouseWheel",0,0,0,function(){this.g("zoomOnMouseWheel")&&this.ta("scrollOnMouseWheel",!1)}],["scrollOnMouseWheel",0,0,0,function(){this.g("scrollOnMouseWheel")&&this.ta("zoomOnMouseWheel",!1)}],["nodes",0,0],["edges",0,2],["magnetize",0,0],["hoverGap",0,2]])},x=function(e){t.V.call(this),this.pa=e,t.T(this.ua,[["type",0,1],["iterationCount",0,1]])},w=function(e){n.call(this,e),this.pa=e,this.type=J,this.G=t.ok(),this.b=t.ok(),this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.o=this.Lf,this.b.parent(this.G),this.o.parent(this.G),t.wl(this)},C=function(e,i){if("auto"==s(e,i).g("anchor")&&"forced"==e.pa.we().g("type"))if(0==e.pa.we().g("iterationCount")){var n=e.pa.na;n=360-t.ab(t.cb(Math.atan2(i.position.y-n.y,i.position.x-n.x))),i.hI=90<=n&&270>=n?"right-center":"left-center",i.iI="left-top"}else 1==i.it.length?(n=i.it[0],n=e.pa.b[n],i.position.x>n.position.x?(i.iI="right-center",i.hI="left-center"):(i.iI="left-center",i.hI="right-center")):(i.iI="center-bottom",i.hI="center-top")},T=function(e,i){var n=e.sB(i,"shape");n=n==t.Ok(n)?t.zp(n):e.Uja;var s=e.zd(i),a=e.qd(i),o=i.position.x,r=i.position.y,l=i.path;l.clear(),l.ia()&&l.ia().removeAttribute("transform"),n(l,o,r,a/2,s/2)},D=function(t,e){var i=t.Tm(e),n=t.gk(e);e.path.fill(i),e.path.stroke(n)},k=function(e,i){if(t.p(i))T(e,i),D(e,i);else for(var n=N(e.pa),s=0;s<n.length;s++){var a=e,o=n[s];T(a,o),D(a,o)}},$=function(e,i){var n=i.position.x,a=i.position.y,o=e.zd(i),r=e.qd(i);i.path.setPosition(n-o/2,a-r/2),s(e,i).enabled()&&(n=e.pa.O().Ja(),t.Px(i.Gk,e.xl),i.Gk.Vd().removeAttribute("transform"),t.Wx(i.Gk,e.ek(i),n),t.Qx(i.Gk))},O=function(e){t.ux.call(this),this.Ga("graph"),this.b={},this.K={},this.$a={},this.ea=null,this.Ka=[],this.ba=null,this.D={},this.o={},this.P={},this.mf=this.Oj=this.aa=null,this.la={nodes:null,edges:null},this.Xg=new t.Db,this.qc=L(this),this.zo=!1,this.Ha=this.Ba=this.Od=this.Za=0,this.EV=this.ud=!1,this.data(e)},P=function(t){var e;for(e in t.o){var i=t.o[e];U(t,i.id,J,0),delete t.o[e]}for(e in t.P)i=t.P[e],U(t,i.id,Q,0),delete t.P[e]},L=function(e){var i;return function(){t.Ej(i),i=t.Dj(e.uka,500,e)}},I=function(t,e){var i=t.kp(),n=i.od;return-i.We*n+e/n},A=function(t,e){var i=t.kp(),n=i.od;return-i.Fd*n+e/n},E=function(e,i,n){(i=e.b[i]).path.tag.Zp=n,e.Jh.state(i,n),k(e.Jh,i),e=e.Jh,s(e,i).enabled()&&!i.Gk&&(i.Gk=e.tk()),i.Gk&&(t.Kx(i.Gk),C(e,i),r(e,i),t.Px(i.Gk,e.xl),t.Yx(i.Gk),e.tf(i))},G=function(t,e,i){t.qh.g("edges")&&((e=t.D[e]).path.tag.Zp=i,t.i.state(e,i),v(t.i,e))},U=function(t,e,i,n){switch(i){case Q:if(t.qh.g("edges")){G(t,e,n),(i=(e=t.D[e]).from)in t.o||E(t,i,n);var s=e.Je;s in t.o||E(t,s,n),2==n&&(t.P[e.id]={id:e.id,type:Q},t.o[i]={id:i,type:J},t.o[s]={id:s,type:J})}break;case J:for(E(t,e,n),i=t.b[e].NC,s=0;s<i.length;s++){var a=i[s];a in t.P||G(t,a,n),2==n&&(t.P[a]={id:a,type:Q})}2==n&&(t.o[e]={id:e,type:J})}},F=function(e){for(var i,n=N(e),s=[],a=[],o=0,r=0,l=n.length;r<l;r++)if(i=n[r],-1==(0,t.za)(a,i)){var h=String(o);for(e.$a[h]=[],s.push(i.id),s.push.apply(s,i.it);i=s.pop();){var c=e.b[i];-1==(0,t.za)(a,c)&&(s.push.apply(s,c.it),a.push(c),e.$a[h].push(i),c.sY=String(o))}o++}},M=function(e){var i=e.la.edges;if(0<e.la.nodes.Hb()){var n=e.la.nodes.$();for(n.reset();n.advance();){var s=n.get("id");if(null!=s)if(s=String(s),e.b[s])t.kl(902,null,[s],!0);else{var a=e.b[s]={};a.index=n.ma(),a.id=s,a.eA=n.ma(),a.NC=[],a.it=[],a.Zp=0,a.position={x:n.get("x"),y:n.get("y")},null!=(s=n.get("group"))&&(e.K[s]||(e.K[s]=null),a.groupId=s)}else t.kl(907,null,[],!0)}n.reset()}if(0<i.Hb()){(i=e.la.edges.$()).reset();for(var o;i.advance();){o=i.get("from");var r=i.get("to");if(n=null!=(n=i.get("id"))?String(n):Q+"_"+i.ma(),o!=r)if(a=e.b[o],s=e.b[r],a&&s){(r={}).index=i.ma(),r.id=n,r.from=a.id,r.Je=s.id,r.eA=i.ma(),r.Zp=0;var l=!1;for(o=0;o<a.it.length;o++){var h=a.it[o];if(h==a.id||h==s.id){t.kl(900,null,[a.id,s.id],!0),l=!0;break}}if(!l)for(o=0;o<s.it.length;o++)if((h=s.it[o])==a.id||h==s.id){t.kl(900,null,[s.id,a.id],!0),l=!0;break}l||(a.NC.push(r.id),s.NC.push(r.id),a.it.push(s.id),s.it.push(a.id),e.D[n]=r)}else a||t.kl(903,null,[n,o],!0),s||t.kl(903,null,[n,r],!0);else t.kl(904,null,[n,r],!0)}300<i.Hb()&&e.gd().Ga({edges:!1}),i.reset()}},_=function(t){if(t.b)for(var e in t.b)t.Jh.clear(t.b[e]);if(t.D)for(var i in t.D)t.i.clear(t.D[i]);for(var n in t.hf().cD(),t.bk().cD(),t.b={},t.D={},t.ea=null,t.ba=null,t.$a={},t.o)delete t.o[n];for(n in t.P)delete t.P[n]},N=function(t){if(!t.ea)for(var e in t.ea=[],t.b)t.ea.push(t.b[e]);return t.ea},R=function(t){if(!t.ba)for(var e in t.ba=[],t.D)t.ba.push(t.D[e]);return t.ba},j=function(t){t.G.oc(t.Xg.od,t.Xg.We,t.Xg.gf,t.Xg.Le,t.Xg.Jd,t.Xg.Fd)},B=function(t){return new O(t)},H={Poa:"fixed",Uoa:"forced"};t.H(n,t.V),t.Gq(n,"fill stroke labels shape height width".split(" "),"normal"),t.g=n.prototype,t.g.ra=8192|t.KE|t.LE|36875,t.g.Kg=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),t.W(this,"hovered",this.za),t.W(this,"selected",this.Ea),this.ca.labels().parent(this.pa.labels()),this.za.labels().parent(this.ca.labels()),this.Ea.labels().parent(this.ca.labels())},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.gk=function(e){var i;return i=t.p(e)?this.sB(e,"stroke"):this.ca.g("stroke"),t.D(i)&&(e=this.Ge(e),i=i.call(e,e)),i},t.g.Tm=function(e){var i=this.sB(e,"fill");return t.D(i)&&(e=this.Ge(e),i=i.call(e,e)),i},t.g.Ma=function(){return this.type},t.g.state=function(t,e){return null!=e?(t.Zp=e,t):t.Zp||0},t.g.de=function(e){t.X(e,32768)&&this.va(t.KE);var i=this.pa,n=this.Ma(),s=t.X(e,8),a=[];if(t.p(n))switch(n){case J:case Z:a.push("nodes"),s&&i.Jh.va(t.LE);break;case Q:a.push("edges"),s&&i.i.va(t.LE)}t.X(e,1)&&(a.push("labelsStyle"),a.push("labelsEnabled")),t.X(e,2)&&a.push("labelsEnabled"),t.X(e,32768)&&(a.push("labelsEnabled"),a.push("labelsStyle")),t.X(e,8)&&(a.push("labelsBounds"),a.push("labelsEnabled"),a.push("labelsStyle")),t.or(i,"graph",a,1)},t.g.tk=function(){var e=this.nt.pop();return e||(e=new t.Ix),e},t.g.xU=function(t){var e={},i=this.$();return i.select(t.eA),this.i.lg(i),e.type={value:this.Ma(),type:"string"},e.id={value:t.id,type:"string"},e},t.g.Ic=function(e){return this.i||(this.i=new t.Fw),e=this.xU(e),t.ov(this.i,e)},t.g.io=function(t){var e={};return e.type=this.Ma(),e.id=t.id,e.Zp=this.state(t),e},t.g.Ge=function(e){var i=this.Ma(),n=i==J?1:0,s=this.pa.cc();return t.p(e)?{index:e.index,type:i,id:e.id,sourceColor:s.nc(n)}:{sourceColor:s.nc(n)}},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df(),t.W(this,"tooltip",this.gb),this.gb.parent(this.pa.Ua()),this.gb.ya(this.pa)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.U=function(t,e){n.u.U.call(this,t,e),"tooltip"in t&&this.Ua().N(t.tooltip),this.ca.N(t),this.ca.N(t.normal),this.za.N(t.hovered),this.Ea.N(t.selected)},t.g.F=function(){var e=n.u.F.call(this),i=this.ca.F(),s=this.za.F(),a=this.Ea.F();if(!t.Jc(i)){var o=i.labels;o&&t.Jc(o)&&delete i.labels,t.Jc(i)||(e.normal=i)}return t.Jc(s)||((o=s.labels)&&t.Jc(o)&&delete s.labels,t.Jc(s)||(e.hovered=s)),t.Jc(a)||((o=a.labels)&&t.Jc(o)&&delete a.labels,t.Jc(a)||(e.selected=a)),e},t.g.clear=function(e){var i=e.path;i&&(i.tag=null,i.clear(),i.parent(null),this.D.push(i),e.path=null),(i=e.Gk)&&(e.Gk=null,t.Px(i,null),this.nt.push(i))},t.g.cD=function(){l(this)},t.g.R=function(){var t;for(t=0;t<this.nt.length;t++)this.nt[t].ld();for(t=0;t<this.D.length;t++)this.D[t].R();this.nt.length=0,this.D.length=0,l(this)};var z=n.prototype;z.normal=z.Qa,z.hovered=z.lb,z.selected=z.selected,t.H(h,t.V),h.prototype.W=function(){var i=this.ib,n=p(i,this,"enabled");if(t.p(n)?n:i.g("enabled")){n=this.ib.b,i=f(n,this);var s=c(this),a=n.TF(),o=p(a,this,"position");a=1-t.Ao(t.p(o)?o:a.g("position")),o=n.pa.b[s.Je],s=n.pa.b[s.from];var r=n.pa.hf().zd(o)+t.dp(n.pa.hf().gk(o)),l=n.pa.hf().zd(s)+t.dp(n.pa.hf().gk(s));r=new t.gb(o.position.x+r/2,o.position.y),n=new t.gb(s.position.x+l/2+d(n.TF(),this),s.position.y),e(n,t.bb(i),new t.gb(s.position.x,s.position.y)),e(r,t.bb(i-180),new t.gb(o.position.x,o.position.y)),a=new t.gb(r.x-(r.x-n.x)*a,r.y-(r.y-n.y)*a),i=f(this.ib.b,this),n=d(this.ib,this),a=a.clone(),o=new t.gb(a.x-n,a.y-n/2),n=new t.gb(a.x-n,a.y+n/2),e(o,t.bb(i),a),e(n,t.bb(i),a),i=[a,o,n],this.Sc.parent(this.O()),this.Sc.clear(),this.Sc.moveTo(i[0].x,i[0].y),this.Sc.lineTo(i[1].x,i[1].y),this.Sc.lineTo(i[2].x,i[2].y),this.Sc.close(),this.Sc.fill(function(e,i){var n=p(e,i,"fill");if(!t.p(n)){n=e.b;var s=c(i);n=n.gk(s)}return n}(this.ib,this)),this.Sc.stroke(function(e,i){var n=p(e,i,"stroke");if(!t.p(n)){n=e.b;var s=c(i);n=n.gk(s)}return n}(this.ib,this))}else this.Sc.parent(null)},h.prototype.O=function(e){return t.p(e)&&(this.Jc=e),this.Jc},h.prototype.R=function(){t.qd(this.Sc),this.Sc=null,h.u.R.call(this)},t.H(u,t.V),u.prototype.ra=8192;var V={};t.sq(V,[[0,"enabled",t.Dq],[0,"size",t.Bq],[0,"position",t.Ao]]),t.U(u,V),u.prototype.O=function(t){return t&&(this.Jc=t),this.Jc},u.prototype.F=function(){var e={};return t.Tq(this,V,e),e},u.prototype.U=function(e,i){t.Iq(this,V,e,i)},t.H(g,n),t.g=g.prototype,t.g.Uw=function(){for(var t=[],e=R(this.pa),i=0;i<e.length;i++){var n=e[i],a=s(this,n);n=o(this,n),a.enabled()&&t.push(n)}return t},t.g.ek=function(i){var n=s(this,i),a=this.pa.b,o=a[i.from],r=a[i.Je];a=r.position.x;var l=o.position.x;r=r.position.y;var h=o.position.y;a==l?(h=(o=Math.max(r,h))+(Math.min(r,h)-o)/2,r=a):(o=Math.max(a,l),a=Math.min(a,l),l=Math.max(r,h),h=Math.min(r,h),o==a?(r=o,h+=(l-h)/2):h=((r=a+(o-a)/2)-a)/(o-a)*(l-h)+h),a=this.pa.b[i.from],o=this.pa.b[i.Je],a=new t.gb(a.position.x,a.position.y),o=new t.gb(o.position.x,o.position.y),r=new t.gb(r,h),h=m(this,i),l=this.Jg(i);var c=h/2;if(a.x>o.x){var u=o;o=a,a=u}return u=t.ab(t.cb(Math.atan2(a.y-o.y,a.x-o.x))),e(a,t.bb(-u),r),e(o,t.bb(-u),r),a.y+=c,o.y+=c,e(a,t.bb(u),r),e(o,t.bb(u),r),r=t.kn(a.x,a.y,l,h),r=n.padding().Ej(r),i.H4=a,i.angle=u?u+180:-270,r},t.g.tf=function(e){var i=s(this,e),n=o(this,e);if(n)if(i.enabled()){var a=this.pa.O().Ja();i=this.ek(e),t.Px(n,this.xl),t.Wx(n,i,a),t.Qx(n),a=n.Vd(),n=+a.getAttribute("x")-i.left,i=+a.getAttribute("y")-i.top,e.zta=n,e.Ata=i,i=e.angle+","+e.H4.x+","+e.H4.y,e.Gk.Vd().setAttribute("transform","rotate("+i+")")}else t.Px(n,null),t.Kx(n)},t.g.wi=function(){var t=this.pa.D;for(e in t){var e=this.pa.D[e];this.tf(e)}},t.g.Hx=function(){for(var t=R(this.pa),e=0;e<t.length;e++)r(this,t[e])},t.g.Fia=function(){this.va(8192)},t.g.TF=function(e){return this.o||(this.o=new u(this),t.W(this,"arrows",this.o),this.o.O(this.b),t.K(this.o,this.Fia,this)),t.p(e)?(this.o.N(e),this):this.o},t.g.clear=function(e){g.u.clear.call(this,e),t.qd(e.AC),e.AC=null,e.vr&&(e.vr.tag=null,e.vr.clear(),e.vr.parent(null),this.D.push(e.vr),e.vr=null)},t.g.sB=function(e,i){var n,s=t.xo(e.Zp),a=this[s]().g(i);if("fill"!=i&&"stroke"!=i){var o=this.normal().nd(i),r=this[s]().nd(i);t.p(r)?a=r:t.p(o)&&(a=o)}return(o=this.$()).select(e.eA),(r=o.get(i))&&(n=r),(r=o.get(s))&&r[i]&&(n=r[i]),t.p(n)?n:a},t.g.Jg=function(t){var e=this.pa.b[t.from];return t=this.pa.b[t.Je],Math.sqrt(Math.pow(t.position.x-e.position.x,2)+Math.pow(t.position.y-e.position.y,2))},t.g.cD=function(){g.u.cD.call(this),this.sd=null},t.g.$=function(){return this.sd||(this.sd=this.pa.data().edges.$())},t.g.hU=function(){return this.G},t.g.F=function(){var e=g.u.F.call(this),i=this.Ua().F();return t.Jc(i)||(e.tooltip=i),e},t.g.R=function(){for(var e=R(this.pa),i=0;i<e.length;i++){var n=e[i];this.clear(n),t.qd(n.AC)}g.u.R.call(this)};var q=g.prototype;q.arrows=q.TF,q.tooltip=q.Ua,t.H(y,n),y.prototype.Kg=function(){this.Qa().labels().parent(this.pa.hf().labels()),this.lb().labels().parent(this.Qa().labels()),this.selected().labels().parent(this.Qa().labels())},t.H(S,t.V),S.prototype.ra=2;var W={};t.sq(W,[[0,"enabled",t.Dq],[0,"zoomOnMouseWheel",t.Dq],[0,"scrollOnMouseWheel",t.Dq],[0,"magnetize",t.Dq],[0,"nodes",t.Dq],[0,"edges",t.Dq],[0,"hoverGap",t.Bq]]),t.U(S,W),S.prototype.Ie=function(e,i){return!!t.da(i)&&(this.enabled(i),!0)},S.prototype.U=function(e,i){S.u.U.call(this,e,i),t.Iq(this,W,e,i)},S.prototype.F=function(){var e=S.u.F.call(this);return t.Tq(this,W,e),e},t.H(x,t.V);var Y,K=(Y={},t.sq(Y,[[0,"type",function(e){return t.zk(H,e,"forced")}],[0,"iterationCount",t.Bq]]),Y);t.U(x,K),x.prototype.ra=1,x.prototype.Ie=function(e,i){return!!t.z(i)&&(this.type(i),!0)},x.prototype.U=function(e,i){x.u.U.call(this,e,i),t.Iq(this,K,e,i)},x.prototype.F=function(){var e=x.u.F.call(this);return t.Tq(this,K,e),e},t.H(w,n),t.g=w.prototype,t.g.ra=1|n.prototype.ra,t.g.cD=function(){w.u.cD.call(this),this.sd=null},t.g.$=function(){return this.sd||(this.sd=this.pa.data().nodes.$())},t.g.Uw=function(){for(var t=[],e=N(this.pa),i=0;i<e.length;i++){var n=e[i],a=s(this,n);n=o(this,n),a.enabled()&&t.push(n)}return t},t.g.sB=function(e,i){var n=t.xo(e.Zp),s=t.xo(0),a=this[s]()[i](),o=this[n]()[i]();if(a=t.p(o)?o:a,"fill"!=i&&"stroke"!=i){o=this[s]().nd(i);var r=this[n]().nd(i);t.p(r)?a=r:t.p(o)&&(a=o)}return o=this.pa.group(e.groupId),t.p(o)&&(s=o[s]().nd(i),null!=(o=o[n]().nd(i))?a=o:null!=s&&(a=s)),(o=this.$()).select(e.eA),s=o.get(i),a=t.p(s)?s:a,(s=o.get(n))&&t.p(s[i])?s[i]:a},t.g.xU=function(e){var i=w.u.xU.call(this,e),n=(0,t.Wa)(e.NC,(function(t){var i=this.pa.D[t];return t=i.from,i=i.Je,t!=e.id?t:i}),this);return i.siblings={value:n,type:""},i},t.g.Hx=function(){for(var t=N(this.pa),e=0;e<t.length;e++){var i=t[e];C(this,i),r(this,i)}},t.g.ek=function(e){var i=s(this,e),n=e.position.x,a=e.position.y,o=this.qd(e),r=this.zd(e);n-=r/2;var l=a-o/2,h=this.pa.na;return a=i.padding(),"auto"==i.g("anchor")&&"forced"==this.pa.we().g("type")&&0==this.pa.we().g("iterationCount")&&(e=new t.gb(e.position.x,e.position.y),i=((n=t.jb(h,e))+Math.max(r,o)/2)/n+.025,e.scale(i),(n=this.pa.na.clone()).scale(i),i=n.y-this.pa.na.y,n=e.x-=n.x-this.pa.na.x,l=e.y-=i),a.Ej(t.kn(n,l,r,o))},t.g.tf=function(e){var i=o(this,e);if(s(this,e).enabled()){var n=this.ek(e),a=this.pa.O().Ja();t.Px(i,this.xl),t.Wx(i,n,a),t.Qx(i),e.Gk&&(a=s(this,e),(i=e.Gk.Vd()).removeAttribute("transform"),a.g("autoRotate")&&(a=this.pa.na,90<=(e=t.ab(t.cb(Math.atan2(e.position.y-a.y,e.position.x-a.x))))&&270>=e&&(e+=180),e=t.ab(e),i.setAttribute("transform","rotate("+e+", "+n.left+", "+(n.top+n.height/2)+")")))}else t.Px(i,null),t.Kx(i)},t.g.wi=function(){for(var t=N(this.pa),e=0;e<t.length;e++)this.tf(t[e])},t.g.qd=function(e){return e=t.N(this.sB(e,"height")),(0,window.isNaN)(e)?this.g("height"):e},t.g.zd=function(e){var i=this.sB(e,"shape");return i===t.Ok(i)?this.qd(e):(e=t.N(this.sB(e,"width")),(0,window.isNaN)(e)?this.g("width"):e)},t.g.Uja=function(t,e,i,n,s){var a=e-s,o=i-n;return e+=s,i+=n,t.moveTo(a,o).lineTo(e,o).lineTo(e,i).lineTo(a,i).lineTo(a,o).close(),t},t.g.ZL=function(t){t.path||(t.path=a(this));var e=t.path;e.tag=this.io(t),t.Zp=this.state(t),t.path=e,e.parent(this.b)},t.g.hU=function(){return this.G},t.g.F=function(){var e=w.u.F.call(this),i=this.Ua().F();return t.Jc(i)||(e.tooltip=i),e},t.g.R=function(){for(var t=N(this.pa),e=0;e<t.length;e++)this.clear(t[e]);w.u.R.call(this)};var X=w.prototype;X.tooltip=X.Ua,t.H(O,t.ux),t.Jz(O,"graph","appearance data edges labelsBounds labelsEnabled labelsStyle layout nodes rotate selection transform".split(" "));var J="node",Z="group",Q="edge";t.g=O.prototype,t.g.ra=8194|t.ux.prototype.ra,t.g.sa=16|t.ux.prototype.sa,t.g.Ma=function(){return"graph"},t.g.yj=function(){return!this.la.nodes||!this.la.nodes.Hb()},t.g.Ue=function(){return[]},t.g.ts=function(){return[this]},t.g.Zj=function(){},t.g.Ux=function(t,e){return t==J?this.Jh.Ic(this.b[e]):this.i.Ic(this.D[e])},t.g.Ds=function(e){if(!this.zo){var i=e.domTarget.tag;if(i){var n=i.id,s=i.type;if(!t.Ad&&e.ctrlKey||t.Ad&&e.metaKey){if(2==i.Zp){if(s==J)for(U(this,n,J,0),delete this.o[n],i=this.b[n],e=0;e<i.NC.length;e++)n=i.NC[e],U(this,n,Q,0),delete this.o[n];else e=this.D[n],U(this,e.from,J,0),U(this,e.Je,J,0),U(this,e.id,Q,0),delete this.o[e.from],delete this.o[e.Je],delete this.P[e.id];return}U(this,i.id,i.type,2)}else P(this);U(this,i.id,i.type,2)}else P(this)}this.zo=!1},t.g.po=function(e){if(!this.mf||!this.mf.lp){var i,n=e.domTarget.tag;if(n){var s=n.type,a=n.id;n=n.Zp,this.Ua().Lc(),2!=n&&U(this,a,s,1),s==J?i=this.Jh.Ua():s==Q&&this.qh.g("edges")&&(i=this.i.Ua()),i&&t.Ow(i,e.clientX,e.clientY,this.Ux(s,a))}else this.Ua().Lc()}},t.g.G2=function(e){if(!this.mf||!this.mf.lp){var i,n=e.domTarget.tag;if(n){var s=n.type,a=n.id;this.Ua().Lc(),n.type==J?i=this.Jh.Ua():n.type==Q&&this.qh.g("edges")&&(i=this.i.Ua()),i&&t.Ow(i,e.clientX,e.clientY,this.Ux(s,a))}else this.Ua().Lc()}},t.g.gba=function(t){t.target.tag||this.oh(t)},t.g.uka=function(){this.fb.parent(this.sb)},t.g.hba=function(e){if(!this.mf||!this.mf.lp){var i=this.gd();if(i.g("enabled")){var n=e.deltaY;if(i.g("zoomOnMouseWheel")){var s=t.RC&&6>=Math.abs(e.deltaY)?0<e.deltaY?.8:0>e.deltaY?1.2:1:t.Za(1-e.deltaY/120,.7,2),a=this.kp().od*s;if(.4<a&&100>a){a=N(this).length+R(this).length,this.qh.g("edges")&&500<a&&(this.fb.parent(null),this.qc()),a=e.clientX;var o=e.clientY;t.Eb(this.Xg,s,s),t.Fb(this.Xg,(a||0)*(1-s),(o||0)*(1-s)),j(this)}}i.g("scrollOnMouseWheel")&&(this.Xg.translate(0,n),j(this)),e.preventDefault()}}},t.g.kp=function(){return this.Xg},t.g.hg=function(t){this.mf&&this.mf.lp&&this.gd().g("enabled")&&this.gd().g("nodes")||(t=t.domTarget.tag)&&2!=t.Zp&&U(this,t.id,t.type,0)},t.g.jx=function(e){var i={};return t.Sc(i,t.Sl(t.mG["select-marquee"]),e),i},t.g.$O=function(e){var i=this.kp();e=new t.I(e.left,e.top,e.width,e.height);for(var n=new t.gb(0,0),s=N(this),a=0;a<s.length;a++){var o=s[a];n.x=o.position.x*i.od+i.Jd,n.y=o.position.y*i.od+i.Fd,t.rb(e,n)||U(this,o.id,J,2)}this.zo=!0},t.g.select=function(e){t.p(e)?t.A(e)||(e=[e]):e=t.Fc(this.b),(0,t.Pe)(e,(function(t){t in this.b&&this.Ka.push(t)}),this),(0,t.Pe)(t.Fc(this.o),(function(e){t.Aa(this.Ka,e)||this.Ka.push(e)}),this),t.nr(this,"graph","selection",1)},t.g.ie=function(e){t.p(e)?t.A(e)||(e=[e]):e=t.Fc(this.o),(0,t.Pe)(t.Fc(this.o),(function(i){t.Aa(e,i)||this.Ka.push(i)}),this),t.nr(this,"graph","selection",1)},t.g.KW=function(e){t.X(e,8192)&&t.or(this,"graph",["edges","appearance"],1)},t.g.Uia=function(e){t.X(e,1)&&(this.B(4),t.or(this,"graph",["appearance","labelsStyle","labelsBounds","labelsEnabled","layout"],1))},t.g.Sia=function(e){t.X(e,2)&&this.B(4,1)},t.g.dd=function(){_(this),M(this),F(this),this.B(4),t.or(this,"graph","data appearance labelsStyle labelsBounds labelsEnabled layout".split(" "),1)},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&t.nr(this,"sankey","appearance",1)}},t.g.Pf=function(e){t.X(e,2)&&t.nr(this,"sankey","appearance",1)},t.g.hf=function(e){return this.Jh||(this.Jh=new w(this),t.W(this,"nodes",this.Jh),this.Jh.Kg(),t.K(this.Jh,this.KW,this)),e?(this.Jh.N(e),this):this.Jh},t.g.gd=function(e){return this.qh||(this.qh=new S,t.W(this,"interactivity",this.qh),t.K(this.qh,this.Sia,this)),t.p(e)?(this.qh.N(e),this):this.qh},t.g.group=function(e,i){if(null!=e){if(t.p(this.K[e])){if(null===this.K[e]){var n=new y(this);n.Kg(),t.K(n,this.KW,this),this.K[e]=n}return i?(this.K[e].N(i),this):this.K[e]}t.kl(905,null,[e],!0)}},t.g.we=function(e){return this.f||(this.f=new x(this),t.W(this,"layout",this.f),t.K(this.f,this.Uia,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.bk=function(e){return this.i||(this.i=new g(this),t.W(this,"edges",this.i),this.i.Kg(),t.K(this.i,this.KW,this)),t.p(e)?(this.i.N(e),this):this.i},t.g.labels=function(e){return this.Da||(this.Da=new t.Hx,t.W(this,"labels",this.Da)),t.p(e)?(this.Da.N(e),this):this.Da},t.g.wr=function(){if(!this.mf){this.mf=new t.ag(this.Aa.ia(),this.Aa);var e,i,n,s,a,o,r,l,h,c,u,d=null,p=[];this.mf.wa("start",(function(o){if(h=this.gd().g("enabled"),c=this.gd().g("nodes"),u=N(this).length+R(this).length,h)if(d=o.EC.target,a=d.tag,t.yk()&&this.Ua().Lc(),a&&a.type==J){if(c){var r=a.id;if(t.Jc(this.o))l=this.b[r];else if(r in this.o)for(var g in this.o)p.push(this.b[g]);else(!t.Ad&&!o.EC.ctrlKey||t.Ad&&!o.EC.metaKey)&&P(this),l=this.b[r];e=I(this,o.clientX),i=A(this,o.clientY)}}else P(this),e=o.clientX,i=o.clientY;n=o.clientX,s=o.clientY}),!1,this),this.mf.wa("drag",(function(t){if(h){this.EV=!0,this.Ua().Lc();var n=this.kp().od,s=t.clientX;if(t=t.clientY,a&&a.type==J){if(c){for(s=I(this,s),t=A(this,t),o=s-e,r=t-i,e=s,i=t,p.length||p.push(l),n=0;n<p.length;n++){t=s=p[n];var d=o,g=r;t.position.x+=d,t.position.y+=g,t.position.mo=d,t.position.um=g,$(this.Jh,s)}b(this.i)}}else o=(s-e)/n,r=(t-i)/n,e=s,i=t,this.Xg.translate(o,r),j(this);this.qh.g("edges")&&500<u&&this.fb.parent(null)}}),!1,this),this.mf.wa("end",(function(t){if(h){if(this.EV=!1,a&&a.type==J&&c&&!p.length){if(this.gd().g("magnetize")){for(var e,i=this.Jh,o=l,r=i.pa.$a[o.sY],d=e=window.Infinity,g=o.position.x,f=o.position.y,m=0;m<r.length;m++)if(o.id!=r[m]){var v=i.pa.b[r[m]].position;if(o.position.x>v.x-5&&o.position.x<v.x+5){var y=o.position.x-v.x;y<d&&(d=y,g=v.x)}o.position.y>v.y-5&&o.position.y<v.y+5&&(y=o.position.y-v.y)<e&&(e=y,f=v.y)}o.position.x=g,o.position.y=f,$(this.Jh,l)}b(this.i)}p.length=0}t.clientX==n&&s==t.clientY||(this.qh.g("edges")&&500<u&&this.qc(),this.zo=!0)}),!1,this)}},t.g.iba=function(){if(!this.aa){var e=this.Aa.ia();this.aa=new t.Ex(e,!1),this.aa.wa("mousewheel",this.hba,!1,this)}},t.g.Qh=function(i){if(!this.pf()){if(this.Aa||(this.Aa=this.Na.Bd(),this.hf(),this.bk(),this.we(),this.gd(),this.G=t.ok(),this.ec=t.tk(i),this.Uc=t.ok(),this.Oj=t.mk(i.left,i.top,i.width,i.height),this.Oj.fill(t.bm),this.Oj.stroke(null),this.Oj.parent(this.Uc),this.Uc.parent(this.Aa),this.wc.Ce(this,"chartdraw",this.wr),this.wc.Ce(this,"chartdraw",this.iba),t.yk()?t.su(this,this,this.po,this.hg,this.Ds,this.G2,null,null):(this.wc.gc(this.Na,"contextmenu",this.oh),this.wc.wa(this.Na,"contextmenu",this.gba),function(e){var i=null,n=!1;e.wc.wa(e,"touchstart",(function(e){n=!1,i=t.Dj((function(){this.EV||(this.zo=!1,this.Ds(e)),n=!0}),300,this)})),e.wc.wa(e,"touchend",(function(e){t.Ej(i),n||this.G2(e)}))}(this)),this.Sb=t.ok(),this.Hd=t.ok(),this.sb=t.ok(),this.fb=this.i.hU(),this.me=this.Jh.hU(),this.fb.parent(this.sb),this.me.parent(this.Hd),this.sb.parent(this.Sb),this.Hd.parent(this.Sb),this.Sb.parent(this.G),this.Aa.zIndex(30),this.Aa.clip(this.ec),this.G.parent(this.Aa),this.Jh.va(t.KE),this.i.va(t.KE)),t.rr(this,"graph","layout")){var n=this.we();switch(n.g("type")){case"forced":var s,a=N(n.pa),o=n.pa.$a,r=a.length,l=0,h=2*Math.PI/r;for(s=0;s<r;s++){var c=a[s];c.velocityX=0,c.velocityY=0,c.position.x=10*Math.cos(l),c.position.y=10*Math.sin(l),l+=h}h=n.g("iterationCount");for(var u=0;u<h;u++){for(s=0,r=a.length;s<r;s++)for((c=a[s]).sX=0,l=c.tX=0;l<r;l++){var d=a[l];if(c!=d&&c.sY==d.sY){var p=void 0,g=void 0,f=c.position.x-d.position.x;d=c.position.y-d.position.y;var m=Math.sqrt(f*f+d*d);0!=m&&(g=f/m/m*.9,p=d/m/m*.9),d=[g,p],c.sX+=d[0],c.tX+=d[1]}}for(s=0,r=a.length;s<r;s++)for((c=a[s]).SR=0,c.TR=0,p=c.it,l=0;l<p.length;l++){d=n.pa.b[p[l]],g=m=void 0,f=c.position.x-d.position.x,d=c.position.y-d.position.y;var v=Math.sqrt(f*f+d*d);0!=v&&(g=-f/v*(m=v*v/50)*10,m=-d/v*m*10),d=[g,m],c.SR+=d[0],c.TR+=d[1]}for(s=0,r=a.length;s<r;s++)(c=a[s]).velocityX+=c.sX+c.SR,c.velocityY+=c.tX+c.TR,c.velocityX=t.Za(c.velocityX,-.12,.12),c.velocityY=t.Za(c.velocityY,-.12,.12),c.position.x+=c.velocityX,c.position.y+=c.velocityY}if(0<h&&1<(u=t.Fc(o)).length){for(a=[],s=0;s<u.length;s++){if(f=o[p=u[s]],d=window.Infinity,g=-window.Infinity,h=window.Infinity,m=-window.Infinity,1==(r=f.length))d=(c=n.pa.b[f[0]]).position.y-.5,h=c.position.x-.5,g=c.position.y+.5,m=c.position.x+.5;else{for(l=0;l<r;l++)c=n.pa.b[f[l]],d=Math.min(d,c.position.y),g=Math.max(g,c.position.y),m=Math.max(m,c.position.x),h=Math.min(h,c.position.x);h-=.5,m+=.5,d-=.5,g+=.5}c=Math.abs(h-m),a.push({id:p,fJ:new t.I(h,d,c,Math.abs(g-d))})}for(s=r=0;s<a.length;s++)for(c=a[s].fJ,h=new t.gb(c.left,c.top).Gh(),c=a[s].fJ.zd(),a[s].mo=r-h,r+=c+.5,a[s].um=-t.sb(a[s].fJ).As(),h=o[a[s].id],l=0;l<h.length;l++)(c=n.pa.b[h[l]]).position.x+=a[s].mo,c.position.y+=a[s].um}break;case"fixed":for(o=N(n.pa),s=0;s<o.length;s++)c=o[s],r=(l=n.pa.data().nodes.En(c.eA)).x,l=l.y,null==r&&(r=0,t.kl(901,null,[c.id,"x"],!0)),null==l&&(l=0,t.kl(901,null,[c.id,"y"],!0)),c.position.x=r,c.position.y=l}t.pr(this,"graph","layout")}if(t.rr(this,"graph","rotate")){for(n=N(this),o=t.sb(this.kg),s=0;s<n.length;s++)c=n[s],r=new t.gb(c.position.x,c.position.y),e(r,t.bb(this.Od),o),c.position.x=r.Gh(),c.position.y=r.As();t.pr(this,"graph","rotate")}if(this.J(4)){if((n=this.ec.shape()).Ho(i.left),n.Io(i.top),n.Go(i.width),n.Fo(i.height),this.Oj.Ho(i.left),this.Oj.Io(i.top),this.Oj.Go(i.width),this.Oj.Fo(i.height),this.ud||"forced"===this.we().g("type")){for(c=N(this),o=i=window.Infinity,n=s=-window.Infinity,r=c.length,l=0;l<r;l++)a=c[l].position.x,h=c[l].position.y,i=Math.min(h,i),s=Math.max(a,s),n=Math.max(h,n),o=Math.min(a,o);for(n+=-i,s+=-o,u=Math.min((this.kg.width-.2*this.kg.width)/s,(this.kg.height-.2*this.kg.height)/n),u=(0,window.isFinite)(u)?u:1,l=0;l<r;l++)a=c[l].position.x,h=c[l].position.y,a+=-o,h+=-i,a*=u,h*=u,c[l].position.x=a,c[l].position.y=h;n*=u,s*=u,o=i=0,r=t.sb(this.kg).Gh(),c=t.sb(this.kg).As(),o=(s-o)/2+o,i=(n-i)/2+i,this.na=new t.gb(o,i),n=r-o,i=c-i,(0,window.isFinite)(n)||(n=0),(0,window.isFinite)(i)||(i=0),this.Xg.translate(-this.Ba,-this.Ha),this.Ba=n,this.Ha=i,this.Xg.translate(n,i)}else{for(r=(c=N(this)).length,o=i=window.Infinity,n=s=-window.Infinity,l=0;l<r;l++)a=c[l].position.x,h=c[l].position.y,i=Math.min(h,i),s=Math.max(a,s),n=Math.max(h,n),o=Math.min(a,o);o=(r=t.sb(this.kg).Gh())-((s-o)/2+o),i=(c=t.sb(this.kg).As())-((n-i)/2+i),this.Xg.translate(-this.Ba,-this.Ha),(0,window.isFinite)(o)||(o=0),(0,window.isFinite)(i)||(i=0),this.Ba=o,this.Ha=i,this.Xg.translate(o,i)}t.nr(this,"graph","transform"),t.or(this,"graph","edges nodes labelsStyle labelsEnabled labelsBounds appearance".split(" ")),this.I(4)}if(t.rr(this,"graph","edges")&&(b(this.i),t.rr(this,"graph","labelsStyle")&&this.i.Hx(),t.rr(this,"graph","labelsBounds")&&t.vl.measure(),t.rr(this,"graph","labelsEnabled")&&this.i.wi(),t.pr(this,"graph","edges")),t.rr(this,"graph","nodes")){for(i=this.Jh,n=N(i.pa),o=0;o<n.length;o++)i.ZL(n[o]);t.rr(this,"graph","appearance")&&k(this.Jh),t.rr(this,"graph","labelsStyle")&&this.Jh.Hx(),t.rr(this,"graph","labelsBounds")&&t.vl.measure(),t.rr(this,"graph","labelsEnabled")&&this.Jh.wi(),t.pr(this,"graph","edges")}t.rr(this,"graph","selection")&&(P(this),function(e){(0,t.Pe)(e.Ka,(function(t){U(this,t,J,2)}),e),e.Ka.length=0}(this),t.pr(this,"graph","selection")),t.qr(this,"graph",["appearance","labelsStyle","labelsBounds","labelsEnabled"]),t.rr(this,"graph","transform")&&(j(this),t.pr(this,"graph","transform"))}},t.g.zoom=function(e,i,n){var s=this.kp();return t.p(e)?(null===e?this.LT():(t.ea(i)||this.kg&&(i=this.kg.left+this.kg.width/2),t.ea(n)||this.kg&&(n=this.kg.top+this.kg.height/2),t.Eb(this.Xg,e,e),t.Fb(this.Xg,(i||0)*(1-e),(n||0)*(1-e)),t.nr(this,"graph","transform",1)),this):s.od},t.g.Fh=function(){return this},t.g.Qm=function(){this.LT()},t.g.Vr=function(){this.zoom(1.3)},t.g.Wr=function(){this.zoom(1/1.3)},t.g.move=function(e,i){if(t.p(e))return null===e&&(e=-this.Xg.Jd,i=-this.Xg.Fd),this.Xg.translate(e||0,i||0),t.nr(this,"graph","transform",1),this;var n=this.kp();return[n.Jd,n.Fd]},t.g.LT=function(e){return t.da(e)&&(this.ud=e,this.B(4)),this.Xg.setTransform(1,0,0,1,0,0),this.Xg.translate(this.Ba,this.Ha),t.nr(this,"graph","transform",1),this},t.g.rotation=function(e){return t.p(e)?(this.Za!=e&&(null===e&&(e=0),e=t.ab(e),this.Od=-this.Za+e,this.Za=e,this.B(4),t.or(this,"graph",["labelsStyle","rotate","appearance"],1)),this):this.Za},t.g.data=function(e){if(t.p(e)){if(null===e||t.p(e.nodes)&&t.p(e.edges)){var i,n=e&&e.edges?e.edges:null;e=e&&e.nodes?e.nodes:null,this.nf!==e&&(this.nf=e,this.la&&this.la.nodes&&(t.kr(this.la.nodes,this.dd),t.qd(this.la.nodes)),i=t.J(e,t.Mr)?e.Yd().Ui():t.J(e,t.Cr)?e.Ui():t.Or(e).Yd().Ui(),t.K(i,this.dd,this),this.la.nodes=i),e=n,this.bg!==e&&(this.bg=e,this.la&&this.la.edges&&(t.kr(this.la.edges,this.dd),t.qd(this.la.edges)),i=t.J(e,t.Mr)?e.Yd().Ui():t.J(e,t.Cr)?e.Ui():t.Or(e).Yd().Ui(),t.K(i,this.dd,this),this.la.edges=i),_(this),M(this),F(this),this.B(4),t.or(this,"graph","data appearance labelsStyle labelsBounds labelsEnabled layout".split(" "),1)}else t.kl(906,null,[],!0);return this}return this.la},t.g.F=function(){var e=O.u.F.call(this);t.Tq(this,O.b,e);var i=this.data().nodes;i=i?i.F():i;var n,s=this.data().edges;if(s=s?s.F():s,i)for(n=0;n<i.length;n++){var a=i[n];if(a&&a.id){var o=this.b[a.id];a.x=o.position.x,a.y=o.position.y}}for(n in e.graphData={nodes:i,edges:s},e.nodes=this.hf().F(),e.edges=this.bk().F(),i=this.labels().F(),t.Jc(i)||(e.labels=i),e.groups=[],this.K)(i={}).id=n,i.settings=this.group(n).F(),e.groups.push(i);return e.layout=this.we().F(),e.interactivity=this.gd().F(),(n=this.Xg.clone()).translate(-this.Ba,-this.Ha),e.transformationMatrix={m00_:n.od,m10_:n.We,m01_:n.gf,m11_:n.Le,m02_:n.Jd,m12_:n.Fd},e.rotation=this.rotation(),{chart:e}},t.g.U=function(e,i){if(O.u.U.call(this,e,i),t.Iq(this,O.b,e,i),"graphData"in e&&this.data(e.graphData),"edges"in e&&this.bk().N(e.edges),"nodes"in e&&this.hf().N(e.nodes),"transformationMatrix"in e){var n=e.transformationMatrix;this.Xg.setTransform(n.m00_,n.m10_,n.m01_,n.m11_,n.m02_,n.m12_)}if("rotation"in e&&(this.Za=+e.rotation),"labels"in e&&this.labels().N(e.labels),"layout"in e&&(this.we().N(e.layout),"forced"==e.layout.type&&t.pr(this,"graph","layout")),"group"in e){n=e.groups;for(var s=0;s<n.length;s++){var a=n[s];this.group(a.id,a.settings)}}"interactivity"in e&&this.gd().N(e.interactivity)},t.g.R=function(){t.sd(this.i,this.Jh,this.qh,this.f,this.mf),this.bk().R(),this.hf().R(),this.f=this.qh=this.Jh=this.i=this.ba=this.ea=null,this.D={},this.b={},this.K={},O.u.R.call(this)};var tt=O.prototype;tt.data=tt.data,tt.edges=tt.bk,tt.fit=tt.LT,tt.zoom=tt.zoom,tt.getCurrentScene=tt.Fh,tt.fitAll=tt.Qm,tt.zoomIn=tt.Vr,tt.zoomOut=tt.Wr,tt.select=tt.select,tt.unselect=tt.ie,tt.move=tt.move,tt.getType=tt.Ma,tt.group=tt.group,tt.rotation=tt.rotation,tt.nodes=tt.hf,tt.layout=tt.we,tt.interactivity=tt.gd,tt.noData=tt.Gm,t.Tp.graph=B,t.E("anychart.graph",B)}.call(this,$)),_.sparkline||(_.sparkline=1,function(t){var e=function(e,i){return t.zk(m,e,i||"line")},i=function(e){this.ka(),t.Y.call(this),this.ya=e,this.da(!1)},n=function(e,i){function n(){this.Sa&&this.Sa.B(16,1)}function s(){this.Sa&&this.Sa.B(64,1)}t.ux.call(this),this.Ga("sparkline"),this.nD=this.N1,this.state=new t.ix(this),this.Sa=this.Fc=this.eb=null,this.og=[],this.rg=[],this.tg=[],this.lf=null,this.b={},this.Ax=!0,this.G=new t.dy,this.G.ta("positionFormatter",t.ep),this.G.ta("size",10),this.G.ta("anchor","center"),this.G.ta("offsetX",0),this.G.ta("offsetY",0),this.G.ta("rotation",0),this.G.kb(this),this.G.zh=b,this.D=new t.Pu,this.D.positionFormatter(t.ep),this.D.format(t.ep),this.D.background(null),this.D.rotation(0),this.D.width(null),this.D.height(null),this.D.fontSize(11),this.D.minFontSize(8),this.D.maxFontSize(72),this.D.kb(this),this.D.zh=y,this.data(e||null,i),t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj),t.T(this.ua,[["seriesType",8192,1,0,function(){this.Sa&&(t.qd(this.Sa),this.Sa=null)}],["pointWidth",0,0,0,function(){this.Sa&&this.Sa.sp()&&this.Sa.B(80,1)}],["connectMissingPoints",0,0,0,function(){this.Sa&&!this.Sa.sp()&&this.Sa.B(80,1)}],["fill",0,0,0,n,this],["negativeFill",0,0,0,n,this],["firstFill",0,0,0,n,this],["lastFill",0,0,0,n,this],["maxFill",0,0,0,n,this],["minFill",0,0,0,n,this],["stroke",0,0,0,n,this],["hatchFill",0,0,0,s,this],["firstHatchFill",0,0,0,s,this],["lastHatchFill",0,0,0,s,this],["maxHatchFill",0,0,0,s,this],["minHatchFill",0,0,0,s,this],["negativeHatchFill",0,0,0,s,this]]),this.Ua()},s=function(e,i){var n=e.$().ma();return t.D(i)?(n={index:n,sourceHatchFill:t.Yb("diagonal-brick"),iterator:e.$()},n=t.Yb(i.call(n))):n=t.da(i)?i?t.Yb("diagonal-brick"):null:t.Yb(i),n},a=function(e,i){for(var n={},s=e.length;s--;){var a=e[s];if(a){var o=!t.J(a,t.Y);if(o?a.enabled:a.enabled())for(var r=0,l=i.length;r<l;r++){var h=i[r],c=o?a[h]:a[h]();t.p(c)&&(n[h]=t.J(c,t.V)?c.F():c)}}}return n},o=function(e,i){for(var n={},s=e.length;s--;){var a=e[s];if(a)for(var o=!t.J(a,t.Y),r=0,l=i.length;r<l;r++){var h=i[r],c=o?a[h]:a[h]();t.p(c)&&(n[h]=t.J(c,t.V)?c.F():c)}}return n},r=function(e,i,n,s){if(t.ea(i))var a=n[i];else t.z(i)?(a=t.dt(i,null))||(a=n[i]):t.C(i)?(a=t.dt(i.type,!0)).N(i):a=null;a&&e[s](a)},l=function(e,i,n,s){if(t.A(i))for(var a=0;a<i.length;a++){var o=i[a];e[s](a,o),t.C(o)&&"scale"in o&&1<o.scale&&e[s](a).scale(n[o.scale])}},h=function(t,e){var i=t.bu(e.scales);r(t,e.xScale,i,"xScale"),r(t,e.yScale,i,"yScale"),l(t,e.lineAxesMarkers,i,"lineMarker"),l(t,e.rangeAxesMarkers,i,"rangeMarker"),l(t,e.textAxesMarkers,i,"textMarker")},c=function(e){i.call(this,e),this.path=t.qk(),this.path.zIndex(1),this.f=null,this.b=[this.path]},u=function(e){c.call(this,e),this.i=t.qk(),this.i.zIndex(1.1),this.b.push(this.i)},d=function(t){i.call(this,t)},p=function(t){c.call(this,t)},g=function(t){i.call(this,t)},f=function(t,e){var i=new n(t,e);return i.Kg(),i},m={bC:"area",lF:"column",tt:"line",ata:"win-loss"};t.H(i,t.wu);var v={};t.g=i.prototype,t.g.fa=null,t.g.ra=20|t.wu.prototype.ra,t.g.sa=976|t.wu.prototype.sa,t.g.ly=!1,t.g.Mi=0,t.g.$=function(){return this.ya.$()},t.g.Ec=function(){return this.ya.Ec()},t.g.xc=function(){return this.ya},t.g.Ak=function(){return!1},t.g.sC=function(){if(!this.enabled())return null;var e=this.ya.bb(),i=this.ya.Ra(),n=this.$(),s=!1,a=n.get("x");return n=n.get("value"),t.p(a)&&t.p(n)?(e.zk(n)&&(n=window.NaN),i=i.zk(a)?window.NaN:this.Qe(i.transform(a,.5),!0),e=this.Qe(e.transform(n,.5),!1),((0,window.isNaN)(i)||(0,window.isNaN)(e))&&(s=!0),s?null:[i,e]):null},t.g.sp=function(){return!1},t.g.wn=function(){this.enabled()&&(this.ly=this.ly?this.NF():this.JK())&&this.tf(),this.enabled()&&this.ly&&this.gq()},t.g.remove=function(){this.ya.Db().O(null),this.Aa&&this.Aa.remove(),this.ya.labels().O(null),i.u.remove.call(this)},t.g.Gd=function(){this.ly=!1,this.fa=this.ob(),this.Aa||(this.Aa=t.ok()),this.zc();var e=this.ya.D;e.ka(),e.clear(),e.O(this.O()),e.ja(this.ob()),(e=this.ya.G).ka();var i=this.Zv();e.oJ(i),i=this.qy(),e.pJ(i),e.clear(),e.O(this.O()),e.ja(this.fa)},t.g.Rl=function(){var e=this.ya.G;e.W();var i=t.da(this.ya.clip())?this.ya.clip()?this.ya.ob():"none":this.ya.clip(),n=e.Vd();n&&n.clip(i),e.da(!1),e.I(4294967295),(e=this.ya.D).W(),(n=e.Vd())&&n.clip(i),e.da(!1),e&&e.I(4294967295),this.J(2)?this.I(0):this.I(4294967295)},t.g.Ic=function(e){this.oe&&!e||(this.oe=new t.Fw),e=this.$();var i={chart:{value:this.xc(),type:""},series:{value:this,type:""},index:{value:e.ma(),type:"number"},value:{value:e.get("value"),type:"number"},x:{value:e.get("x"),type:"string"},seriesName:{value:"Series "+e.ma(),type:"string"}};return this.oe.lg(e).Li([this,this.xc()]).Im({"%XValue":"x"}),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.Bh=function(e){var i=this.$(),n=i.j("shape");return n?(i=n.rb(),e=t.Dk(e),{value:t.Eo(i,e)}):{value:{x:i.j("x"),y:i.j("value")}}},t.g.JK=function(){return this.NF()},t.g.Qe=function(t,e){if(e)var i=this.fa.left,n=this.fa.width;else i=this.fa.Va(),n=-this.fa.height;return i+t*n},t.g.tf=function(){var t=this.ya,e=t.$(),i=e.get("value"),n=e.ma(),s=e.get("label");if(n==e.Hb()-1)var r=t.mI(),l=t.b.lastLabels;else n||(r=t.UG(),l=t.b.firstLabels);if(i==t.Rg("max"))var h=t.sh(),c=t.b.maxLabels;else i==t.Rg("min")&&(h=t.th(),c=t.b.minLabels);if(0>i)var u=t.SI(),d=t.b.negativeLabels;e=t.labels(),l=o([l,c,d,t.b.labels],x),s=a([s,r,h,u,e],x),s=o([s,l],x),r=t.D.be(n),h=null,s.enabled?(h=s.position||t.D.g("position"),h=t.Sa.Bh(h),u=t.Sa.Ic(),r?(r.Hf(u),r.jc(h)):r=t.D.add(u,h,n),r.Hi(),r.td(s),h=r):r&&r.clear(),(t=h)&&t.W()},t.g.gq=function(){var e=this.ya,i=e.$(),n=i.get("value"),s=i.ma(),r=i.get("marker");if(s==i.Hb()-1)var l=e.nI(),h=e.b.lastMarkers;else s||(l=e.VG(),h=e.b.firstMarkers);if(n==e.Rg("max"))var c=e.AI(),u=e.b.maxMarkers;else n==e.Rg("min")&&(c=e.GI(),u=e.b.minMarkers);if(0>n)var d=e.TI(),p=e.b.negativeMarkers;i=e.Db(),n=e.b.markers;var g=e.Xv(!0);g={fill:g,stroke:t.Ql(g)},h=o([h,u,p,n,g],S),r=a([r,l,c,d,i],S),r=o([r,h],S),l=e.G.jp(s),c=null,r.enabled?(c=r.position||e.G.g("position"),c=e.Sa.Bh(c),l?l.jc(c):l=e.G.add(c,s),l.Hi(),t.gy(l,e.G),l.td(r),c=l):l&&l.clear(),(e=c)&&e.W()},t.g.Zv=function(){return t.Ub(this.ya.MF(this.ya.g("fill")))},t.g.qy=function(){return t.Ql(this.Zv())},t.g.us=function(){var t=this.ya.G;return t.type("circle"),t.ta("size",1.8),t.ta("position","center"),{labels:{background:{enabled:!1},position:"center",anchor:"center-bottom"},color:"#4682B4"}},t.g.R=function(){t.qd(this.Aa),this.Aa=null,i.u.R.call(this)},t.H(n,t.ux),n.prototype.Ma=function(){return"sparkline"},n.prototype.sa=28672|t.ux.prototype.sa;var b=40,y=40;t.g=n.prototype,t.g.ig=function(e){e=n.u.ig.call(this,e);var i=this.Sa&&this.Sa.fa||t.kn(0,0,0,0);return i=(e.clientX-(i.left+t.Zj(this.O().Ja()).x))/i.width,i=this.Ra().Mc(i),0>(i=this.data().find("x",i))&&(i=window.NaN),e.pointIndex=i,e},t.g.Md=function(){},t.g.oq=function(e){var i=this.Sa&&this.Sa.fa||t.kn(0,0,0,0),n=e.clientX;e=e.clientY;var s=t.Zj(this.O().Ja());n-=s.x,e-=s.y,s=i.left;var a=i.top,o=i.width;return i=i.height,n<s||n>s+o||e<a||e>a+i?null:(i=[],s=(n-s)/o,s=this.Ra().Mc(s),s=(s=t.Er(this.data(),s,t.J(this.Ra(),t.Qt))).length?s[0]:window.NaN,(a=this.$()).select(s)&&(o=a.j("x"),a=a.j("value"),n=t.gn(o,a,n,e),(0,window.isNaN)(o)||(0,window.isNaN)(a)||i.push({X:this,vd:[s],Ln:s,De:{index:s,Tf:n}})),i)},t.g.ej=function(){return"none"},t.g.Ic=function(){this.oe||(this.oe=new t.Fw);var e=this.$();return this.oe.lg(e).Li([this]),e={x:{value:e.get("x"),type:"string"},value:{value:e.get("value"),type:"number"},index:{value:e.ma(),type:"number"},chart:{value:this,type:""}},t.ov(this.oe,e),this.oe},t.g.Rk=function(){return this.Ic()},t.g.Uu=function(){return!0},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,pie:this,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e}},t.g.Ii=function(){return this},t.g.$i=function(){return this},t.g.Ue=function(){return[this]},t.g.ie=t.ia,t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.ce=function(){return null},t.g.eh=function(){return!1},t.g.Ak=function(){return!1},t.g.ml=t.ia,t.g.pk=t.ia,t.g.wm=t.ia,t.g.pq=t.ia,t.g.ms=function(e){return t.p(e)?(this.Ti=e,this):(this.Ti||(this.Ti={}),e=t.pm(this.g("seriesType")),this.Ti[e]||(this.Ti[e]=t.Qc(this.Sa.oa)),this.Ti)};var S="enabled position anchor offsetX offsetY type size fill stroke".split(" "),x="enabled background padding position anchor offsetX offsetY rotation width height fontSize fontFamily fontColor fontOpacity fontDecoration fontStyle fontVariant fontWeight letterSpacing textDirection lineHeight textIndent vAlign hAlign wordWrap wordBreak textOverflow selectable disablePointerEvents useHtml".split(" ");t.g=n.prototype,t.g.Ra=function(e){return t.p(e)?((e=t.jt(this.eb,e,null,15))&&(this.eb=e,this.eb.da(!1),this.B(4096,1)),this):(this.eb||(this.eb=t.it()),this.eb)},t.g.bb=function(e){return t.p(e)?((e=t.jt(this.Fc,e,null,15))&&(this.Fc=e,this.Fc.da(!1),this.B(4096,1)),this):(this.Fc||(this.Fc=t.ft()),this.Fc)},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.og[n];return a||(a=new t.$z,t.W(this,"lineMarker",a),this.og[n]=a,a.kb(this),t.K(a,this.Ry,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.rg[n];return a||(a=new t.cA,this.rg[n]=a,a.kb(this),t.K(a,this.Ry,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.tg[n];return a||(a=new t.fA,t.W(this,"textMarker",a),this.tg[n]=a,a.kb(this),t.K(a,this.Ry,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.Ry=function(){this.B(16384,1)},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.i=this.Yc=e.Ui():this.i=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.la=this.i,t.K(this.la,this.dd,this),this.Sa&&this.Sa.B(16,21),this.B(256,1)),this):this.la},t.g.dd=function(e){t.X(e,16)&&(this.Sa&&this.Sa.B(16,21),this.B(256,1))},t.g.$=function(){return this.sd||this.Ec()},t.g.Ec=function(){return this.sd=this.data().$()},t.g.nJ=function(e){var i=0;t.X(e,32768)&&(i|=256),t.X(e,2048)&&(i=32),t.X(e,1)&&(i=8192),t.X(e,16)&&(i|=8448,this.ow()),t.X(e,4)&&(i|=4096),this.B(i,1)};var w,C=(w={},t.sq(w,[t.Z.cC,t.Z.jZ,t.Z.qF,t.Z.kZ,t.Z.gZ,[0,"seriesType",e],[0,"pointWidth",function(e){return t.yo(e,this.g("pointWidth"))}],[0,"connectMissingPoints",t.Dq],[1,"firstFill",t.Nq],[1,"lastFill",t.Nq],[1,"maxFill",t.Nq],[1,"minFill",t.Nq],[1,"lastHatchFill",t.Oq],[1,"firstHatchFill",t.Oq],[1,"maxHatchFill",t.Oq],[1,"minHatchFill",t.Oq]]),w);t.U(n,C),t.g=n.prototype,t.g.clip=function(e){return t.p(e)?(null===e&&(e=!1),this.gg!=e&&(this.gg=e,this.Sa&&this.Sa.B(4,9)),this):this.gg},t.g.MF=function(e,i){if(t.D(e)){var n=1<arguments.length?this.MF.apply(this,t.Ja(arguments,1)):this.b.color;n={index:this.$().ma(),sourceColor:n,iterator:this.$()},n=e.call(n)}else n=e;return n},t.g.g=function(e){var i=n.u.g.call(this,e);if(!i)switch(e){case"fill":case"negativeFill":case"firstFill":case"lastFill":case"maxFill":case"minFill":case"stroke":case"lastHatchFill":case"firstHatchFill":case"maxHatchFill":case"minHatchFill":i=this.b[e];break;case"hatchFill":case"negativeHatchFill":i=t.p(i)?i:this.b[e]}return i},t.g.Xv=function(e){var i=this.$(),n=i.get("value"),s=i.ma();return e=e&&t.p(i.get("fill"))?i.get("fill"):s==i.Hb()-1&&t.p(this.g("lastFill"))?this.g("lastFill"):!s&&t.p(this.g("firstFill"))?this.g("firstFill"):n==this.Rg("max")&&t.p(this.g("maxFill"))?this.g("maxFill"):n==this.Rg("min")&&t.p(this.g("minFill"))?this.g("minFill"):0>n&&t.p(this.g("negativeFill"))?this.g("negativeFill"):this.g("fill"),e=this.MF(e),t.Ub(e)},t.g.nr=function(){return t.Wb(this.MF(this.g("stroke")))},t.g.Db=function(e){return this.Bc||(this.Bc=new t.ey,t.W(this,"markers",this.Bc),t.K(this.Bc,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Bc.N(e),this):this.Bc},t.g.TI=function(e){return this.Ka||(this.Ka=new t.ey,t.W(this,"negativeMarkers",this.Ka),t.K(this.Ka,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Ka.N(e),this):this.Ka},t.g.VG=function(e){return this.aa||(this.aa=new t.ey,t.W(this,"firstMarkers",this.aa),t.K(this.aa,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.aa.N(e),this):this.aa},t.g.nI=function(e){return this.ea||(this.ea=new t.ey,t.W(this,"lastMarkers",this.ea),t.K(this.ea,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.ea.N(e),this):this.ea},t.g.AI=function(e){return this.na||(this.na=new t.ey,t.W(this,"maxMarkers",this.na),t.K(this.na,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.na.N(e),this):this.na},t.g.GI=function(e){return this.Ba||(this.Ba=new t.ey,t.W(this,"minMarkers",this.Ba),t.K(this.Ba,this.Mn,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Ba.N(e),this):this.Ba},t.g.Mn=function(e){t.X(e,1)&&this.Sa&&this.Sa.B(128,1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Tu,t.W(this,"labels",this.Da),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.SI=function(e){return this.Ha||(this.Ha=new t.Tu,t.W(this,"negativeLabels",this.Ha),t.K(this.Ha,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Ha.N(e),this):this.Ha},t.g.UG=function(e){return this.P||(this.P=new t.Tu,t.W(this,"firstLabels",this.P),t.K(this.P,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.P.N(e),this):this.P},t.g.mI=function(e){return this.ba||(this.ba=new t.Tu,t.W(this,"lastLabels",this.ba),t.K(this.ba,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.ba.N(e),this):this.ba},t.g.sh=function(e){return this.f||(this.f=new t.Tu,t.W(this,"maxLabels",this.f),t.K(this.f,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.f.N(e),this):this.f},t.g.th=function(e){return this.o||(this.o=new t.Tu,t.W(this,"minLabels",this.o),t.K(this.o,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.o.N(e),this):this.o},t.g.de=function(e){t.X(e,1)&&this.Sa&&this.Sa.B(256,1)},t.g.pb=function(){var e;if(this.J(4096)){this.hJ();var i=this.Ra(),n=this.bb();for(i.Of()&&i.Bg(),n.Of()&&n.Bg(),e=this.Ec();e.advance();){var s=e.get("x"),a=e.get("value");t.p(s)&&i.Xc(s),t.p(a)&&n.Xc(a)}e=!1,i.Of()&&(e|=i.Hg()),n.Of()&&(e|=n.Hg()),e&&this.ow(),i=-window.Infinity,n=window.Infinity;var o=s=0;for(e=this.Ec();e.advance();){var r=this.$();a=this.bb(),r=r.get("value"),(a=a.zk(r)?null:r)&&(a=t.N(a),(0,window.isNaN)(a)||(i=Math.max(i,a),n=Math.min(n,a),s+=a)),o++}e=s/o,this.La("max",i),this.La("min",n),this.La("sum",s),this.La("average",e),this.La("pointsCount",o),this.I(4096)}},t.g.Qh=function(e){if(this.J(8192)&&!this.Sa){var i=this.g("seriesType"),n=v[i];if(n){n=new n(this),i=t.pm(i),n.Ga("chart.defaultSeriesSettings.base.normal"),n.Ga("chart.defaultSeriesSettings."+i+".normal");var s=this.oa.defaultSeriesSettings;s&&n.Ga(s.base),s[i]&&n.Ga(s[i]),this.Sa=n,n.zh=30,t.K(n,this.nJ,this),this.b=this.ms()[t.pm(i)]||this.Sa.us(),this.B(12288,1)}else t.il(4,null,[i+" series"]),n=null;this.Sa=n}if(this.pb(),!this.pf()){if(t.xr(this.Sa),this.J(4)&&(this.lf=e.clone().round(),this.Sa.sp()&&(n=this.Sa,e=this.lf,i=n.Ec().Hb(),n=n.jH(e),i=(e.width-i*n)%(i-1),0!=e.height%2&&--e.height,0!=i&&(e.left+=Math.floor(i/2),e.width-=i)),this.ow(),this.B(24576)),this.J(16384)){for(i=0,n=(e=t.Ga(this.og,this.rg,this.tg)).length;i<n;i++)(s=e[i])&&(s.ka(),s.Nb()?s.scale(this.bb()):s.scale(this.Ra()),s.ja(this.lf),s.O(this.Na),s.W(),s.da(!1));this.I(16384)}if(this.J(8192)){if(e=this.Sa){for(e.O(this.Na),e.ja(this.lf),this.Sa.Gd(),e=this.Ec();e.advance();)this.Sa.wn();this.Sa.Rl(),this.Db().I(4294967295),this.GI().I(4294967295),this.AI().I(4294967295),this.TI().I(4294967295),this.VG().I(4294967295),this.nI().I(4294967295),this.labels().I(4294967295),this.th().I(4294967295),this.sh().I(4294967295),this.SI().I(4294967295),this.UG().I(4294967295),this.mI().I(4294967295)}this.I(8192)}t.zr(this.Sa)}},t.g.ow=function(){this.Sa&&this.Sa.B(80)},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.yj=function(){return!this.$().Hb()||!(this.Sa&&this.Sa.enabled())},t.g.bu=function(e){var i,n=this.Ma(),s={};if(t.A(e))for(i=0;i<e.length;i++){var a=e[i];t.z(a)&&(a={type:a}),a=t.qm(a,i,n);var o=t.dt(a.type,!1);o.N(a),s[i]=o}else if(t.C(e))for(i in e)e.hasOwnProperty(i)&&(a=e[i],t.z(a)&&(a={type:a}),a=t.qm(a,i,n),(o=t.dt(a.type,!1)).N(a),s[i]=o);return s},t.g.Kg=function(){h(this,this.oa)},t.g.U=function(e,i){n.u.U.call(this,e,i),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings),this.data(e.data),t.Iq(this,C,e),this.clip(e.clip),this.data(e.data),h(this,e),e.lastMarkers&&this.nI().ga(!!i,e.lastMarkers),e.firstMarkers&&this.VG().ga(!!i,e.firstMarkers),e.maxMarkers&&this.AI().ga(!!i,e.maxMarkers),e.minMarkers&&this.GI().ga(!!i,e.minMarkers),e.negativeMarkers&&this.TI().ga(!!i,e.negativeMarkers),e.markers&&this.Db().ga(!!i,e.markers),e.firstLabels&&this.UG().ga(!!i,e.firstLabels),e.lastLabels&&this.mI().ga(!!i,e.lastLabels),e.maxLabels&&this.sh().ga(!!i,e.maxLabels),e.minLabels&&this.th().ga(!!i,e.minLabels),e.negativeLabels&&this.SI().ga(!!i,e.negativeLabels),e.labels&&this.labels().ga(!!i,e.labels)},t.g.F=function(){var e=n.u.F.call(this);t.Tq(this,C,e);var i,s,a={},o=[];a[t.oa(this.Ra())]=this.Ra().F(),o.push(a[t.oa(this.Ra())]),e.xScale=o.length-1,this.Ra()!=this.bb()&&(a[t.oa(this.bb())]=this.bb().F(),o.push(a[t.oa(this.bb())])),e.yScale=o.length-1,e.clip=t.J(this.gg,t.I)?this.gg.F():this.gg,e.data=this.data().F(),e.lastMarkers=this.nI().F(),e.lastLabels=this.mI().F(),e.firstMarkers=this.VG().F(),e.firstLabels=this.UG().F(),e.maxMarkers=this.AI().F(),e.maxLabels=this.sh().F(),e.minMarkers=this.GI().F(),e.minLabels=this.th().F(),e.negativeMarkers=this.TI().F(),e.negativeLabels=this.SI().F(),e.markers=this.Db().F(),e.labels=this.labels().F();var r=[];for(i=0;i<this.og.length;i++)if(s=this.og[i]){var l=s.F();if(s=s.scale()){var h=t.oa(s);a[h]?l.scale=(0,t.za)(o,a[h]):(a[h]=s.F(),o.push(a[h]),l.scale=o.length-1)}r.push(l)}for(r.length&&(e.lineAxesMarkers=r),r=[],i=0;i<this.rg.length;i++)(s=this.rg[i])&&(l=s.F(),(s=s.scale())&&(a[h=t.oa(s)]?l.scale=(0,t.za)(o,a[h]):(a[h]=s.F(),o.push(a[h]),l.scale=o.length-1)),r.push(l));for(r.length&&(e.rangeAxesMarkers=r),r=[],i=0;i<this.tg.length;i++)(s=this.tg[i])&&(l=s.F(),(s=s.scale())&&(a[h=t.oa(s)]?l.scale=(0,t.za)(o,a[h]):(a[h]=s.F(),o.push(a[h]),l.scale=o.length-1)),r.push(l));return r.length&&(e.textAxesMarkers=r),e.scales=o,{chart:e}},t.g.R=function(){t.sd(this.og,this.rg,this.tg,this.Yc,this.i,this.la,this.Sa,this.Bc,this.Ka,this.aa,this.ea,this.na,this.Ba,this.Da,this.Ha,this.P,this.ba,this.f,this.o),this.og.length=0,this.rg.length=0,this.tg.length=0,this.i=this.Yc=null,delete this.la,delete this.sd,this.b=this.o=this.f=this.ba=this.P=this.Ha=this.Da=this.Ba=this.na=this.ea=this.aa=this.Ka=this.Bc=this.Sa=null,n.u.R.call(this)},t.Tp.sparkline=f;var T=n.prototype;t.E("anychart.sparkline",f),T.xScale=T.Ra,T.yScale=T.bb,T.lineMarker=T.Ym,T.rangeMarker=T.gn,T.textMarker=T.mn,T.data=T.data,T.clip=T.clip,T.lastMarkers=T.nI,T.lastLabels=T.mI,T.firstMarkers=T.VG,T.firstLabels=T.UG,T.maxMarkers=T.AI,T.maxLabels=T.sh,T.minMarkers=T.GI,T.minLabels=T.th,T.negativeMarkers=T.TI,T.negativeLabels=T.SI,T.markers=T.Db,T.labels=T.labels,T.getType=T.Ma,T.noData=T.Gm,t.H(c,i),t.g=c.prototype,t.g.wn=function(){var t;this.enabled()&&((t=this.ly?this.NF():this.JK())&&(this.gq(),this.tf()),this.ly=this.ya.g("connectMissingPoints")&&this.ly||t)},t.g.Gd=function(){if(c.u.Gd.call(this),!this.pf()&&this.enabled()){var e,i=this.ya.bb().transform(0);if((0,window.isNaN)(i)&&(i=0),this.Mi=this.Qe(t.Za(i,0,1),!1),i=this.b.length,this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(this.ya.clip()&&(e=t.da(this.ya.clip())?this.fa:this.ya.clip(),this.Aa.clip(e)),this.I(4)),this.J(16)){for(e=0;e<i;e++)this.b[e].clear();this.x_()}if(this.J(2)){for(e=this.O(),this.Aa.parent(e),e=0;e<i;e++)this.b[e].parent(this.Aa);this.f&&this.f.parent(this.Aa),this.I(2)}this.J(64)&&!this.f&&(this.f=t.qk(),this.f.parent(this.Aa),this.f.zIndex(2),this.f.Dd(!0))}},t.g.Rl=function(){this.yR(),this.A1(),c.u.Rl.call(this)},t.g.Bh=function(){var t=this.$();return{value:{x:t.j("x"),y:t.j("value")}}},t.g.yR=t.ia,t.g.A1=t.ia,t.g.x_=function(){this.path.stroke(this.ya.nr(),1),this.path.fill(null)},t.g.us=function(){return c.u.us.call(this)},t.H(u,c),v.area=u,t.g=u.prototype,t.g.Gd=function(){u.u.Gd.call(this),this.o=window.NaN},t.g.x_=function(){var e=t.Ub(this.ya.MF(this.ya.fill()));this.path.stroke(null),this.path.fill(e),this.i.stroke(this.ya.nr()),this.i.fill(null)},t.g.A1=function(){this.J(64)&&this.f&&(this.f.pe(this.path.F()),this.f&&(this.f.stroke(null),this.f.fill(s(this.ya,this.ya.g("hatchFill")))))},t.g.JK=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.yR(),this.path.moveTo(e,this.Mi).lineTo(e,t),this.i.moveTo(e,t),this.o=e,this.$().j("x",e).j("value",t)}return!0},t.g.NF=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.path.lineTo(e,t),this.i.lineTo(e,t),this.o=e,this.$().j("x",e).j("value",t)}return!0},t.g.yR=function(){(0,window.isNaN)(this.o)||this.path.lineTo(this.o,this.Mi).close()},t.g.us=function(){var t=u.u.us.call(this);return t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.5},t},t.H(d,i),v.column=d,t.g=d.prototype,t.g.Na=null,t.g.du=null,t.g.sp=function(){return!0},t.g.u5=function(){return t.mk()},t.g.jH=function(e){return e=e||this.fa,e=Math.floor((this.ya.Ra().sD()||1/this.$().Hb())*e.width),1>(e=Math.floor(t.L(this.ya.g("pointWidth"),e)))&&(e=1),e},t.g.Gd=function(){d.u.Gd.call(this);var e=this.ya.bb().transform(0);(0,window.isNaN)(e)&&(e=0),this.Mi=this.Qe(t.Za(e,0,1),!1),!this.pf()&&this.enabled()&&(this.Na||(this.Na=new t.dC(this.u5,t.ia),this.Na.zIndex(1)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(4)&&(e=t.da(this.ya.clip())?this.ya.clip()?this.fa:"none":this.ya.clip(),this.Aa.clip(e),this.I(4)),this.J(16)&&this.Na.clear(),this.J(64)&&(this.du||(this.du=new t.dC(this.u5,t.ia),this.du.parent(this.Aa),this.du.zIndex(2),this.du.Dd(!0)),this.du.clear()),this.J(2)&&(this.Aa.parent(this.O()),this.Na.parent(this.Aa),this.du&&this.du.parent(this.Aa),this.I(2)))},t.g.NF=function(){var e=this.sC();if(!e)return!1;if(this.J(16)){var i=e[0],n=e[1];n=n<this.Mi?Math.ceil(n):Math.floor(n),e=t.eC(this.Na);var a=this.jH(),o=0==a%2?0:.5;this.$().j("x",i).j("value",n).j("shape",e);var r=Math.min(this.Mi,n);n=Math.abs(this.Mi-n),e.Ho(Math.ceil(i+o-a/2)).Io(r).Go(a).Fo(n),i=this.$().j("shape"),t.p(i)&&(i.fill(this.ya.Xv(!0)),i.stroke(null))}return this.J(64)&&(e=this.$(),i=this.du?t.eC(this.du):null,e.j("hatchFillShape",i),e=e.j("shape"),t.p(e)&&i&&i.pe(e.F()),null!=(i=this.$().j("hatchFillShape"))&&i.stroke(null).fill(function(e){var i=e.$(),n=i.get("value"),a=i.ma();return i=t.p(i.get("hatchFill"))?i.get("hatchFill"):a==i.Hb()-1&&t.p(e.g("lastHatchFill"))?e.g("lastHatchFill"):!a&&t.p(e.g("firstHatchFill"))?e.g("firstHatchFill"):n==e.Rg("max")&&t.p(e.g("maxHatchFill"))?e.g("maxHatchFill"):n==e.Rg("min")&&t.p(e.g("minHatchFill"))?e.g("minHatchFill"):0>n&&t.p(e.g("negativeHatchFill"))?e.g("negativeHatchFill"):e.g("hatchFill"),s(e,i)}(this.ya))),!0},t.g.us=function(){var t=d.u.us.call(this);return t.markers||(t.markers={}),t.markers.position="center-top",t.labels||(t.labels={}),t.labels.position="center-top",t.labels.anchor="center-bottom",t.negativeMarkers||(t.negativeMarkers={}),t.negativeMarkers.position="center-bottom",t.negativeLabels||(t.negativeLabels={}),t.negativeLabels.position="center-bottom",t.negativeLabels.anchor="center-top",t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.7},t.negativeFill={color:"#ef6c00",opacity:.7},t},t.H(p,c),v.line=p,t.g=p.prototype,t.g.JK=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.path.moveTo(e,t),this.$().j("x",e).j("value",t)}return!0},t.g.NF=function(){var t=this.sC();if(!t)return!1;if(this.J(16)){var e=t[0];t=t[1],this.path.lineTo(e,t),this.$().j("x",e).j("value",t)}return!0},t.g.Zv=function(){return this.ya.nr()},t.g.qy=function(){return t.Ql(this.ya.nr())},t.g.us=function(){var t=p.u.us.call(this);return t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.5},t},t.H(g,d),v["win-loss"]=g,g.prototype.Gd=function(){g.u.Gd.call(this),this.Mi=Math.round(this.Qe(.5,!1))},g.prototype.sC=function(){if(!this.enabled())return null;var e=this.ya.bb(),i=this.ya.Ra(),n=this.$(),s=!1,a=n.get("x");return n=0<(n=n.get("value"))?e.Ne()?0:1:0>n?e.Ne()?1:0:.5,t.p(a)&&t.p(n)?(e.zk(n)&&(n=window.NaN),e=i.zk(a)?window.NaN:this.Qe(i.transform(a,.5),!0),i=this.Qe(n,!1),((0,window.isNaN)(e)||(0,window.isNaN)(i))&&(s=!0),s?null:[e,i]):null},g.prototype.us=function(){var t=g.u.us.call(this);return t.markers||(t.markers={}),t.markers.position="center-top",t.markers.anchor="center-top",t.labels||(t.labels={}),t.labels.position="center-top",t.labels.anchor="center-top",t.negativeMarkers||(t.negativeMarkers={}),t.negativeMarkers.position="center-bottom",t.negativeMarkers.anchor="center-bottom",t.negativeLabels||(t.negativeLabels={}),t.negativeLabels.position="center-bottom",t.negativeLabels.anchor="center-bottom",t.stroke={color:"#64b5f6",thickness:1.5},t.fill={color:"#64b5f6",opacity:.7},t.negativeFill={color:"#ef6c00",opacity:.7},t},t.Tp.sparkline=f,t.E("anychart.sparkline",f)}.call(this,$)),_.exports||(_.exports=1,function(t){var e,i,n,s,a,o,r,l,h,c,u,d,p,g,f,m,v,b,y,S,x,w,C,T,D,k,$,O,P,L,I,A,E,G,U,F,M,_,N,R,j,B,H,z,V,q,W,Y,K,X,J,Z,Q,tt,et,it,nt,st,at,ot,rt,lt,ht,ct,ut,dt,pt,gt,ft,mt,vt,bt,yt,St,xt,wt,Ct,Tt,Dt,kt,$t,Ot,Pt,Lt,It,At,Et,Gt,Ut,Ft,Mt,_t;e=function(e,i,n){return t.p(n)||(n="a4"),n=Nt[n],t.p(e)&&t.p(i)?t.z(e)&&t.da(i)?(e=e.toLowerCase(),(e=Nt[e])&&(n=i?{width:e.height,height:e.width}:e)):(n.width=String(e),n.height=String(i)):t.p(e)&&(e=Nt[String(e)])&&(n=e),t.fc(n.width,"px")||t.fc(n.width,"mm")||(n.width+="px"),t.fc(n.height,"px")||t.fc(n.height,"mm")||(n.height+="px"),n},i=function(e,i){t.yj(e,null,i,void 0)},n=function(e,i){if(e){var n=t.Me("STYLE");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(window.document.createTextNode(String(e))),t.We(t.Ae(window.document,"head",void 0,i)[0],n,0)}},s=function(){Rt&&(window.document.body.removeChild(Rt),Rt=null)},a=function(e){if(!Rt){var i=window.document.createElement("iframe");if(Rt=i,t.uf(i,{visibility:"hidden",position:"fixed",right:0,bottom:0}),window.document.body.appendChild(i),e)for(var s,a=0,o=(e=t.gk()).length;a<o;a++)if((s=e[a]).type==Bt){var r="";s.cssText?r=s.cssText:s.style&&s.style.cssText&&s.selectorText&&(r=s.style.cssText.replace(/\s*-closure-parent-stylesheet:\s*\[object\];?\s*/gi,"").replace(/\s*-closure-rule-index:\s*[\d]+;?\s*/gi,""),r=s.selectorText+" { "+r+" }"),n(r,i.contentWindow.document)}n("body{padding:0;margin:0;height:100%;}@page {size: auto; margin: 0; padding:0}",i.contentWindow.document)}return Rt},o=function(){if(Rt){var e=Rt,i=e.contentWindow;t.Hp?((jt=t.sh.open()).document.write(i.document.documentElement.innerHTML),s(),jt.onafterprint=function(){(0,window.setTimeout)((function(){jt.close()}),0)},(0,window.setTimeout)((function(){jt.focus(),jt.print()}),0)):t.hd?(0,window.setTimeout)((function(){t.uf(e,"visibility",""),i.onafterprint=s,i.focus(),i.print()}),0):(t.Dj(s,6),i.focus(),i.print())}},r=function(t){if(Ht[t])return Ht[t];if(t=String(t),!Ht[t]){var e=/function ([^\(]+)/.exec(t);Ht[t]=e?e[1]:"[Anonymous]"}return Ht[t]},l=function(e,i){var n=[];if(t.Aa(i,e))n.push("[...circular reference...]");else if(e&&50>i.length){n.push(r(e)+"(");for(var s=e.arguments,a=0;s&&a<s.length;a++){0<a&&n.push(", ");var o=s[a];switch(typeof o){case"object":o=o?"object":"null";break;case"string":break;case"number":o=String(o);break;case"boolean":o=o?"true":"false";break;case"function":o=(o=r(o))?o:"[fn]";break;default:o=typeof o}40<o.length&&(o=o.substr(0,40)+"..."),n.push(o)}i.push(e),n.push(")\n");try{n.push(l(e.caller,i))}catch(h){n.push("[exception trying to get caller]\n")}}else e?n.push("[...long stack...]"):n.push("[end]");return n.join("")},h=function(t){var e=Error();if(Error.captureStackTrace)Error.captureStackTrace(e,t||h),e=String(e.stack);else{try{throw e}catch(i){e=i}e=(e=e.stack)?String(e):null}return e||(e=l(t||arguments.callee.caller,[])),e},c=function(e){return e instanceof t.he&&e.constructor===t.he&&e.f===t.ge?e.b:"type_error:Const"},u=function(){var e=t.p(t.fa.URL)&&t.p(t.fa.URL.createObjectURL)?t.fa.URL:t.p(t.fa.webkitURL)&&t.p(t.fa.webkitURL.createObjectURL)?t.fa.webkitURL:t.p(t.fa.createObjectURL)?t.fa:null;if(null!=e)return e;throw Error("This browser doesn't seem to support blob URLs")},d=function(t){return u().createObjectURL(t)},p=function(){this.f=Vt},g=function(e){return e instanceof p&&e.constructor===p&&e.f===Vt?"":(t.ka(e),"type_error:TrustedResourceUrl")},f=function(e){return e instanceof t.ke&&e.constructor===t.ke&&e.i===t.je?e.f:(t.ka(e),"type_error:SafeUrl")},m=function(e){return e instanceof t.ke?e:(e=e.By?e.cu():String(e),qt.test(e)||(e="about:invalid#zClosurez"),t.le(e))},v=function(e){return e instanceof t.ne&&e.constructor===t.ne&&e.f===t.me?e.b:(t.ka(e),"type_error:SafeStyle")},b=function(e){return e.replace(t.YD,(function(t,e,i,n){var s="";return i=i.replace(/^(['"])(.*)\1$/,(function(t,e,i){return s=e,i})),t=m(i).cu(),e+s+t+s+n}))},y=function(e){if(e instanceof t.ke)e='url("'+f(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';else if(e instanceof t.he)e=c(e);else{var i=(e=String(e)).replace(t.oda,"$1").replace(t.YD,"url");if(i=Wt.test(i)){for(var n=i=!0,s=0;s<e.length;s++){var a=e.charAt(s);"'"==a&&n?i=!i:'"'==a&&i&&(n=!n)}i=i&&n}e=i?b(e):"zClosurez"}return e},S=function(e){var i,n="";for(i in e){if(!/^[-_a-zA-Z0-9]+$/.test(i))throw Error("Name allows only [-_a-zA-Z0-9], got: "+i);var s=e[i];null!=s&&(n+=i+":"+(s=t.A(s)?(0,t.Wa)(s,y).join(" "):y(s))+";")}return n?t.oe(n):t.nda},x=function(e){return e instanceof t.qe&&e.constructor===t.qe&&e.o===t.pe?e.f:(t.ka(e),"type_error:SafeHtml")},w=function(e){if(e instanceof t.qe)return e;var i=null;return e.jV&&(i=e.b()),e=t.pc(e.By?e.cu():String(e)),t.re(e,i)},C=function(e){if(e instanceof t.qe)return e;e=w(e);var i=x(e);return i=t.oc(i.replace(/  /g," &#160;"),void 0),t.re(i,e.b())},T=function(e){if(!t.C(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof t.ne||(e=S(e)),v(e)},D=function(e){function i(e){t.A(e)?(0,t.Pe)(e,i):(e=w(e),s+=x(e),e=e.b(),0==n?n=e:0!=e&&n!=e&&(n=null))}var n=0,s="";return(0,t.Pe)(arguments,i),t.re(s,n)},k=function(t,e){return(e||window.document).getElementsByTagName(String(t))},$=function(t){return t.contentDocument||t.contentWindow.document},O=function(e,i,n){t.zj(e,i,n,null)||t.aj(t.qa(i,e))},P=function(e){return new t.oj((function(i,n){var s=e.length,a=[];if(s)for(var o,r=function(t,e){s--,a[t]=e,0==s&&i(a)},l=function(t){n(t)},h=0;h<e.length;h++)o=e[h],O(o,t.qa(r,h),l);else i(a)}))},L=function(){var e=new t.oj(t.ia);return t.lj(e,t.mj,void 0),e},I=function(e,i,n){var s={};return i="object"==t.ka(i)?i:null,t.Dc(e,(function(e,a){s[a]=i?t.p(i[a])?i[a]:void 0:e,t.p(n)&&(s[a]=t.p(s[a])?s[a]:n[a])})),s},A=function(e){if(e.zs&&"function"==typeof e.zs)return e.zs();if(t.z(e))return e.split("");if(t.la(e)){for(var i=[],n=e.length,s=0;s<n;s++)i.push(e[s]);return i}return t.Ec(e)},E=function(e){if(e.Yt&&"function"==typeof e.Yt)return e.Yt();if(!e.zs||"function"!=typeof e.zs){if(t.la(e)||t.z(e)){var i=[];e=e.length;for(var n=0;n<e;n++)i.push(n);return i}return t.Fc(e)}},G=function(e,i){if(e.forEach&&"function"==typeof e.forEach)e.forEach(i,void 0);else if(t.la(e)||t.z(e))(0,t.Pe)(e,i,void 0);else for(var n=E(e),s=A(e),a=s.length,o=0;o<a;o++)i.call(void 0,s[o],n&&n[o],e)},U=function(t,e){if(t)for(var i=t.split("&"),n=0;n<i.length;n++){var s=i[n].indexOf("="),a=null;if(0<=s){var o=i[n].substring(0,s);a=i[n].substring(s+1)}else o=i[n];e(o,a?(0,window.decodeURIComponent)(a.replace(/\+/g," ")):"")}},t.DW=function(e){var i;this.o=this.K=this.i="",this.G=null,this.D=this.Sc="",this.b=!1,e instanceof t.DW?(this.b=t.p(void 0)?void 0:e.b,F(this,e.i),this.K=e.K,this.o=e.o,M(this,e.G),this.Sc=e.Sc,_(this,e.f.clone()),this.D=e.D):e&&(i=String(e).match(Zt))?(this.b=!1,F(this,i[1]||"",!0),this.K=N(i[2]||""),this.o=N(i[3]||"",!0),M(this,i[4]),this.Sc=N(i[5]||"",!0),_(this,i[6]||"",!0),this.D=N(i[7]||"")):(this.b=!1,this.f=new B(null,this.b))},F=function(t,e,i){t.i=i?N(e,!0):e,t.i&&(t.i=t.i.replace(/:$/,""))},M=function(t,e){if(e){if(e=Number(e),(0,window.isNaN)(e)||0>e)throw Error("Bad port number "+e);t.G=e}else t.G=null},_=function(t,e,i){e instanceof B?(t.f=e,Y(t.f,t.b)):(i||(e=R(e,ne)),t.f=new B(e,t.b))},N=function(t,e){return t?e?(0,window.decodeURI)(t.replace(/%25/g,"%2525")):(0,window.decodeURIComponent)(t):""},R=function(e,i,n){return t.z(e)?(e=(0,window.encodeURI)(e).replace(i,j),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null},j=function(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)},B=function(t,e){this.f=this.b=null,this.i=t||null,this.o=!!e},H=function(e){e.b||(e.b=new t.ZB,e.f=0,e.i&&U(e.i,(function(t,i){e.add((0,window.decodeURIComponent)(t.replace(/\+/g," ")),i)})))},z=function(e){var i=E(e);if(void 0===i)throw Error("Keys are undefined");var n=new B(null,void 0);e=A(e);for(var s=0;s<i.length;s++){var a=i[s],o=e[s];t.A(o)?q(n,a,o):n.add(a,o)}return n},V=function(e,i){return H(e),i=W(e,i),t.$B(e.b.f,i)},q=function(e,i,n){e.remove(i),0<n.length&&(e.i=null,e.b.set(W(e,i),t.Ha(n)),e.f+=n.length)},W=function(t,e){var i=String(e);return t.o&&(i=i.toLowerCase()),i},Y=function(t,e){e&&!t.o&&(H(t),t.i=null,t.b.forEach((function(t,e){var i=e.toLowerCase();e!=i&&(this.remove(e),q(this,i,t))}),t)),t.o=e},K=function(){t.qf.call(this),this.Er="closure_frame"+re++,this.f=[],oe[this.Er]=this},X=function(e,i){var n=new K;if(t.Ld(n,"ready",n.ld,!1,n),n.cw)throw Error("[goog.net.IframeIo] Unable to send, already active.");var s=new t.DW(e);if(!Qt){(Qt=t.Me("FORM")).acceptCharset="utf-8";var a=Qt.style;a.position="absolute",a.visibility="hidden",a.top=a.left="-10px",a.width=a.height="10px",a.overflow="hidden",window.document.body.appendChild(Qt)}if(n.Uk=Qt,i&&J(n.Uk,i),n.Uk.action=s.toString(),n.Uk.method="POST",n.cw=!0,n.jG=!1,n.LA=n.Er+"_"+(n.mia++).toString(36),n.vl=t.ye(n.Uk).Ac("IFRAME",{name:n.LA,id:n.LA}),t.hd&&7>Number(t.ad)&&(n.vl.src='javascript:""'),(s=n.vl.style).visibility="hidden",s.width=s.height="10px",s.display="none",t.xd?s.marginTop=s.marginLeft="-10px":(s.position="absolute",s.top=s.left="-10px"),t.hd&&!t.bd("11")){n.Uk.target=n.LA||"",t.ye(n.Uk).b.body.appendChild(n.vl),t.Ld(n.vl,"readystatechange",n.LW,!1,n);try{n.b=!1,n.Uk.submit()}catch(V){t.Yd(n.vl,"readystatechange",n.LW,!1,n),Q(n)}}else{if(t.ye(n.Uk).b.body.appendChild(n.vl),s=n.LA+"_inner",a=$(n.vl),window.document.baseURI){var o=t.pc(s);t.ie("Short HTML snippet, input escaped, safe URL, for performance"),o='<head><base href="'+t.pc(window.document.baseURI)+'"></head><body><iframe id="'+o+'" name="'+o+'"></iframe>',o=t.re(o,null)}else o=t.pc(s),t.ie("Short HTML snippet, input escaped, for performance"),o=t.re('<body><iframe id="'+o+'" name="'+o+'"></iframe>',null);t.yd&&!t.xd?a.documentElement.innerHTML=x(o):a.write(x(o)),t.Ld(a.getElementById(s),"load",n.jO,!1,n);var r=k("TEXTAREA",n.Uk);o=0;for(var l=r.length;o<l;o++){var u=r[o].value;t.lf(r[o])!=u&&(t.df(r[o],u),r[o].value=u)}(r=a.importNode(n.Uk,!0)).target=s,r.action=n.Uk.action,a.body.appendChild(r),u=k("SELECT",n.Uk);var d=k("SELECT",r);for(o=0,l=u.length;o<l;o++)for(var v=k("OPTION",u[o]),b=k("OPTION",d[o]),y=0,S=v.length;y<S;y++)b[y].selected=v[y].selected;for(u=k("INPUT",n.Uk),d=k("INPUT",r),o=0,l=u.length;o<l;o++)if("file"==u[o].type&&u[o].value!=d[o].value){n.Uk.target=s,r=n.Uk;break}try{n.b=!1,r.submit(),a.close(),t.gd&&t.Dj(n.x6,250,n)}catch(V){try{var w=t.ha("window.location.href");if(t.z(V))var O={message:V,name:"Unknown error",lineNumber:"Not available",fileName:w,stack:"Not available"};else{o=!1;try{var P=V.lineNumber||V.line||"Not available"}catch(q){P="Not available",o=!0}try{var L=V.fileName||V.filename||V.sourceURL||t.fa.$googDebugFname||w}catch(q){L="Not available",o=!0}O=!o&&V.lineNumber&&V.fileName&&V.stack&&V.message&&V.name?V:{message:V.message||"Not available",name:V.name||"UnknownError",lineNumber:P,fileName:L,stack:V.stack||"Not available"}}var I=O.fileName;if(null!=I||(I=""),/^https?:\/\//i.test(I)){var A=m(I);t.ie("view-source scheme plus HTTP/HTTPS URL");var E="view-source:"+f(A),G=t.le(E)}else{var U=t.ie("sanitizedviewsrc");G=t.le(c(U))}var F=C("Message: "+O.message+"\nUrl: ");w={href:G,target:"_new"};var M=O.fileName;if(!Yt.test("a"))throw Error("Invalid tag name <a>.");if("A"in Xt)throw Error("Tag name <a> is not allowed for SafeHtml.");if(P=null,L="",w)for(var _ in w){if(!Yt.test(_))throw Error('Invalid attribute name "'+_+'".');var N=w[_];if(null!=N){if(G=L,I=_,(A=N)instanceof t.he)A=c(A);else if("style"==I.toLowerCase())A=T(A);else{if(/^on/i.test(I))throw Error('Attribute "'+I+'" requires goog.string.Const value, "'+A+'" given.');if(I.toLowerCase()in Kt)if(A instanceof p)A=g(A);else if(A instanceof t.ke)A=f(A);else{if(!t.z(A))throw Error('Attribute "'+I+'" on tag "a" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+A+'" given.');A=m(A).cu()}}A.By&&(A=A.cu()),L=G+" "+I+'="'+t.pc(String(A))+'"'}}var R="<a"+L;if(null!=M?t.A(M)||(M=[M]):M=[],!0===zt.a)R+=">";else{var j=D(M);R+=">"+x(j)+"</a>",P=j.b()}var B=w&&w.dir;B&&(P=/^(ltr|rtl|auto)$/i.test(B)?0:null);var H=t.re(R,P),z=D(F,H,C("\nLine: "+O.lineNumber+"\n\nBrowser stack:\n"+O.stack+"-> [end]\n\nJS stack traversal:\n"+h(void 0)+"-> "))}catch(q){z=C("Exception trying to expose exception! You win, we lose. "+q)}x(z),t.Yd(a.getElementById(s),"load",n.jO,!1,n),a.close(),Q(n)}}it(n)},J=function(e,i){var n=t.ye(e);G(i,(function(i,s){t.A(i)||(i=[i]),(0,t.Pe)(i,(function(t){t=n.Ac("INPUT",{type:"hidden",name:s,value:t}),e.appendChild(t)}))}))},Z=function(t,e){var i;t.jG=!0,t.cw=!1,i||"function"!=typeof t.i||t.i(e)&&(i=4),i?Q(t):(t.dispatchEvent("complete"),t.dispatchEvent("success"),tt(t))},Q=function(t){t.b||(t.cw=!1,t.jG=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"),tt(t),t.b=!0)},tt=function(t){et(t),it(t),t.Uk=null,t.dispatchEvent("ready")},et=function(e){var i=e.vl;i&&(i.onreadystatechange=null,i.onload=null,i.onerror=null,e.f.push(i)),e.KA&&(t.Ej(e.KA),e.KA=null),t.gd||t.yd&&!t.xd?e.KA=t.Dj(e.$0,2e3,e):e.$0(),e.vl=null,e.LA=null},it=function(e){e.Uk&&e.Uk==Qt&&t.Ve(e.Uk)},nt=function(e){return e.vl?t.hd&&!t.bd("11")?e.vl:$(e.vl).getElementById(e.LA+"_inner"):null},st=function(){},at=function(t){var e;return(e=t.b)||(e={},lt(t)&&(e[0]=!0,e[1]=!0),e=t.b=e),e},ot=function(){},rt=function(t){return(t=lt(t))?new window.ActiveXObject(t):new window.XMLHttpRequest},lt=function(t){if(!t.f&&void 0===window.XMLHttpRequest&&void 0!==window.ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],i=0;i<e.length;i++){var n=e[i];try{return new window.ActiveXObject(n),t.f=n}catch(s){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f},ht=function(e){t.qf.call(this),this.headers=new t.ZB,this.ba=e||null,this.f=!1,this.aa=this.b=null,this.na="",this.i=0,this.D="",this.o=this.Ba=this.K=this.ea=!1,this.G=0,this.P=null,this.Za=le,this.Ha=this.Ka=!1},t.RW=function(t,e,i,n,s,a,o){var r=new ht;ue.push(r),e&&r.wa("complete",e),r.Ce("ready",r.Kda),a&&(r.G=Math.max(0,a)),o&&(r.Ka=o),ct(r,t,i,n,s)},ct=function(e,i,n,s,a){if(e.b)throw Error("[goog.net.XhrIo] Object is active with another request="+e.na+"; newUri="+i);n=n?n.toUpperCase():"GET",e.na=i,e.D="",e.i=0,e.ea=!1,e.f=!0,e.b=e.ba?rt(e.ba):rt(ae),e.aa=e.ba?at(e.ba):at(ae),e.b.onreadystatechange=(0,t.pa)(e.x4,e);try{e.Ba=!0,e.b.open(n,String(i),!0),e.Ba=!1}catch(r){return void e.Lv(5,r)}i=s||"";var o=e.headers.clone();a&&G(a,(function(t,e){o.set(e,t)})),a=t.ya(o.Yt(),dt),s=t.fa.FormData&&i instanceof t.fa.FormData,!t.Aa(ce,n)||a||s||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(t,e){this.b.setRequestHeader(e,t)}),e),e.Za&&(e.b.responseType=e.Za),"withCredentials"in e.b&&e.b.withCredentials!==e.Ka&&(e.b.withCredentials=e.Ka);try{mt(e),0<e.G&&(e.Ha=ut(e.b),e.Ha?(e.b.timeout=e.G,e.b.ontimeout=(0,t.pa)(e.D6,e)):e.P=t.Dj(e.D6,e.G,e)),e.K=!0,e.b.send(i),e.K=!1}catch(r){e.Lv(5,r)}},ut=function(e){return t.hd&&t.bd(9)&&t.ea(e.timeout)&&t.p(e.ontimeout)},dt=function(t){return"content-type"==t.toLowerCase()},pt=function(t){t.ea||(t.ea=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))},gt=function(e){if(e.f&&void 0!==t.OD&&(!e.aa[1]||4!=vt(e)||2!=bt(e)))if(e.K&&4==vt(e))t.Dj(e.x4,0,e);else if(e.dispatchEvent("readystatechange"),e.YH()){e.f=!1;try{if(t.VW(e))e.dispatchEvent("complete"),e.dispatchEvent("success");else{e.i=6;try{var i=2<vt(e)?e.b.statusText:""}catch(n){i=""}e.D=i+" ["+bt(e)+"]",pt(e)}}finally{ft(e)}}},ft=function(e,i){if(e.b){mt(e);var n=e.b,s=e.aa[0]?t.ia:null;e.b=null,e.aa=null,i||e.dispatchEvent("ready");try{n.onreadystatechange=s}catch(a){}}},mt=function(e){e.b&&e.Ha&&(e.b.ontimeout=null),e.P&&(t.Ej(e.P),e.P=null)},t.VW=function(e){var i=bt(e);t:switch(i){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var n=!0;break t;default:n=!1}return n||((i=0===i)&&(!(e=String(e.na).match(Zt)[1]||null)&&t.fa.self&&t.fa.self.location&&(e=(e=t.fa.self.location.protocol).substr(0,e.length-1)),i=!he.test(e?e.toLowerCase():"")),n=i),n},vt=function(t){return t.b?t.b.readyState:0},bt=function(t){try{return 2<vt(t)?t.b.status:-1}catch(e){return-1}},t.XW=function(e){if(e.b)return t.io(e.b.responseText)},t.YW=function(e){return t.z(e.D)?e.D:String(e.D)},yt=function(e,i,n){var s=e.width()/e.height();return{width:i=t.p(i)?i:n?Math.round(n*s):e.width(),height:n=t.p(n)?n:i?Math.round(i/s):e.height()}},St=function(e,i,n,s,a,o){n&&(i.responseType="base64"),s&&(i.save=!0);var r=o||t.ia,l=s?"url":"result";i=z(new t.ZB(i)),t.RW(de+"/"+e,(function(e){e=e.target,t.VW(e)?a(t.XW(e)[l]):r(t.YW(e))}),"POST",i.toString())},xt=function(e,i,n,s,a,o){n=yt(e,n,s),i.data=e.Nq(n.width,n.height),i.dataType="svg",i.responseType="file",i.width=n.width,i.height=n.height,t.p(a)&&(i.quality=a),t.p(o)&&(i["file-name"]=o)},wt=function(e,i,n,s,a,o,r){n=yt(e,n,s),i.data=e.Nq(n.width,n.height),i.dataType="svg",i.responseType="file",i.width=n.width,i.height=n.height,t.p(a)&&(i.quality=a),t.p(o)&&(i["force-transparent-white"]=o),t.p(r)&&(i["file-name"]=r)},Ct=function(e,i,n,s,a){i.data=e.Nq(n,s),i.dataType="svg",i.responseType="file",t.p(a)&&(i["file-name"]=a)},Tt=function(e,i,n,s,a,o,r){var l=null;t.p(n)?t.ea(n)?(i["pdf-width"]=n,i["pdf-height"]=t.ea(s)?s:e.height()):t.z(n)?(i["pdf-size"]=n||"a4",i.landscape=!!s,l=Jt[i["pdf-size"]],i.landscape&&(l={width:l.height,height:l.width})):(i["pdf-width"]=e.width(),i["pdf-height"]=e.height()):(i["pdf-width"]=e.width(),i["pdf-height"]=e.height()),t.p(a)&&(i["pdf-x"]=a),t.p(o)&&(i["pdf-y"]=o),t.p(r)&&(i["file-name"]=r),l?(n=l.width,l=l.height,s=e.width(),r=e.height(),(l=n<l?[n,n/s*r]:n>l?[l/r*s,l]:[n,l])[0]-=a||0,l[1]-=o||0,e=e.Nq(l[0],l[1])):e=e.Nq(i["pdf-width"],i["pdf-height"]),i.data=e,i.dataType="svg",i.responseType="file"},Dt=function(e,i,n,s,a){if("svg"==t.kk){var o={};xt(e,o,i,n,s,a),X(de+"/png",o)}else(0,window.alert)(t.ld(15))},kt=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};wt(e,r,i,n,s,a,o),X(de+"/jpg",r)}else(0,window.alert)(t.ld(15))},$t=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};Tt(e,r,i,n,s,a,o),X(de+"/pdf",r)}else(0,window.alert)(t.ld(15))},Ot=function(e,i,n,s){if("svg"==t.kk){var a={};Ct(e,a,i,n,s),X(de+"/svg",a)}else(0,window.alert)(t.ld(15))},Pt=function(t){var e="";return t&&(e=(new window.XMLSerializer).serializeToString(t)),e},Lt=function(){this.b={},this.i={},this.G={},this.o={},this.D={},this.ea=["svg2pdf.min.js","jspdf.min.js","canvg.min.js","xlsx.core.min.js"],this.k3=!1,this.K={}},It=function(e){var i=me,n=t.fa.anychart.exports;if(n.k3)return L();var s=i.ea,a=n.ic(e,"clientside").path;a+=t.fc(a,"/")?"":"/",e=[];for(var o=0;o<s.length;o++)i=new t.oj((function(e,i){var n=a+s[o],r=t.Re(window.document,"script");r.setAttribute("src",n),r.onload=r.onreadystatechange=function(){t.hl("info","Loaded external exporting script "+n),e()},r.onerror=function(){t.hl("warn","Failed tp load external script "+n),i()},t.Lp.head.appendChild(r)})),e.push(i);return P(e).then((function(){n.k3=!0}))},At=function(e,i,n){if(t.C(n)){var s={};t.Dc(n,(function(e,i){t.p(e)&&(s[i]=e)})),t.Jc(s)||(e[i]=s)}else t.p(n)&&(e[i]=n)},Et=function(e,n,s,a){i(It(e).then((function(){var e=t.fa.XLSX,i=e.utils,a=t.Rm().pC(n),o=i.book_new();a=i.aoa_to_sheet(a),i.book_append_sheet(o,a,"data"),e=e.write(o,{type:"array"}),_t(new window.Blob([e],{type:fe.xlsx}),s,"xlsx")})),(function(){a()}))},Gt=function(i,n,s,a){var o=s.paperSize,r=s.landscape,l=s.x||0,h=s.y||0,c=s.filename||"anychart";c+=".pdf";try{if(t.p(o)||t.p(r)){var u=e(o,r);if(t.z(o)){var d=Jt[o].width,p=Jt[o].height;(r&&p>d||!r&&p<d)&&(d=[p,p=d][0])}else d=(0,window.parseFloat)(u.width),p=(0,window.parseFloat)(u.height);var g=new t.fa.jsPDF(r?"l":"p","pt",o||[d,p]);t.z(n)?g.addImage(n,"png",l,h,d,p):t.fa.svg2pdf(n,g,{xOffset:l,yOffset:h,scale:1})}else{var f=i.width(),m=i.height();g=new t.fa.jsPDF(f>m?"l":"p","pt",[f,m]),t.z(n)?g.addImage(n,"png",l,h,f,m):t.fa.svg2pdf(n,g,{xOffset:l,yOffset:h,scale:1})}g.save(c)}catch(v){a(s)}},Ut=function(e,i,n,s,a,o,r){var l=fe[n],h=t.Re(window.document,"canvas");h.width=s,h.height=a,t.uf(h,{width:s,height:a,visibility:"hidden",position:"fixed",right:0,bottom:0}),t.Lp.body.appendChild(h);var c=h.getContext("2d"),p=new window.Image,g=i.quality||.92;e.setAttribute("width",s),e.setAttribute("height",a);var f=(new window.XMLSerializer).serializeToString(e),m=d(new window.Blob([f],{type:"image/svg+xml"}));p.onload=function(){try{if(h.msToBlob&&c.drawSvg){c.drawSvg(f,0,0,s,a);var e=h.toDataURL(l,g)}else c.drawImage(p,0,0,s,a),e=h.toDataURL(l,g);o(e),t.Xe(h),u().revokeObjectURL(m)}catch(n){r(i)}},p.src=m},Ft=function(t,e,i,n,s,a,o){function r(t){_t(t,l,i)}var l=n.filename||"anychart",h=0<e.getElementsByTagName("image").length;try{switch(i){case"svg":var c=(new window.XMLSerializer).serializeToString(e);_t(new window.Blob([c],{type:"image/svg+xml"}),l,i);break;case"png":case"jpg":Ut(e,n,i,s,a,r,o);break;case"pdf":h?Ut(e,n,i,s,a,(function(e){Gt(t,e,n,o)}),o):Gt(t,e,n,o)}}catch(u){o(n)}},Mt=function(e,n,s,a){i(It(e).then((function(){function i(e){var i=e.getAttribute("href"),n=new window.Image,s=(0,window.parseFloat)(e.getAttribute("width")),a=(0,window.parseFloat)(e.getAttribute("height"));s=s||1,a=a||1,n.onload=function(){var i=t.Re(window.document,"CANVAS");t.Lp.body.appendChild(i);var r=i.getContext("2d");i.width=s,i.height=a,r.drawImage(n,0,0,s,a),r=i.toDataURL(),e.setAttribute("href",r),e.setAttribute("src",r),++f==m.length&&o(),t.Xe(i)},n.crossOrigin="anonymous",n.src=i}function o(){Ft(r,g,n,s,c,u,a)}var r=t.J(e,t.Yj)?e:e.O().Ja(),l=s.paperSize,h=s.landscape;if(t.z(l))var c=Jt[l].width,u=Jt[l].height;else c=s.width||r.width(),u=s.height||r.height();var d=r.width(),p=r.height();"pdf"==n&&t.z(l)&&(h&&u>c||!h&&u<c)&&(c=[u,u=c][0]),r.resize(c,u);var g=r.ia().cloneNode(!0);r.resize(t.z(d)?d:"100%",t.z(p)?p:"100%"),g.setAttribute("width",c),g.setAttribute("height",u);var f=0,m=g.getElementsByTagName("image");l=t.Aa(["png","jpg","pdf"],n);try{if(0<m.length){if((t.Cc("Trident")||t.Cc("MSIE"))&&l)throw"Internet explorer can't export chart with images to pdf, jpg or png";for(l=0;l<m.length;l++)i(m[l])}else o()}catch(v){a(s)}})),(function(){a(s)}))},_t=function(e,i,n){var s=t.Re(window.document,"a");if(t.z(e)){var a=(0,window.atob)(e.split(",")[1]);e=e.split(",")[0].split(":")[1].split(";")[0];for(var o=new window.ArrayBuffer(a.length),r=new window.Uint8Array(o),l=0;l<a.length;l++)r[l]=a.charCodeAt(l);a=new window.Blob([o],{type:e})}else a=e;i=i+"."+n,n=d(a),t.p(s.download)?(t.Lp.body.appendChild(s),s.href=n,s.download=i,s.click(),t.Xe(s)):t.p(t.fa.navigator.msSaveOrOpenBlob)?t.fa.navigator.msSaveOrOpenBlob(a,i):t.Mp.open(n,i),u().revokeObjectURL(n)},t.ZB.prototype.zs=t.ca(29,(function(){t.aC(this);for(var e=[],i=0;i<this.b.length;i++)e.push(this.f[this.b[i]]);return e})),t.ke.prototype.b=t.ca(2,(function(){return 1})),t.qe.prototype.b=t.ca(1,(function(){return this.i}));var Nt={"us-letter":{width:"215.9mm",height:"279.4mm"},a0:{width:"841mm",height:"1189mm"},a1:{width:"594mm",height:"841mm"},a2:{width:"420mm",height:"594mm"},a3:{width:"297mm",height:"420mm"},a4:{width:"210mm",height:"297mm"},a5:{width:"148mm",height:"210mm"},a6:{width:"105mm",height:"148mm"}},Rt=null,jt=null,Bt=5,Ht={},zt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Vt={};p.prototype.By=!0,p.prototype.cu=function(){return""},p.prototype.jV=!0,p.prototype.b=function(){return 1};var qt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Wt=/^[-,."'%_!# a-zA-Z0-9]+$/,Yt=/^[a-zA-Z0-9-]+$/,Kt={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},Xt={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Jt={a0:{width:2384,height:3370},a1:{width:1684,height:2384},a2:{width:1191,height:1684},a3:{width:842,height:1191},a4:{width:595,height:842},a5:{width:420,height:595},a6:{width:297,height:420},a7:{width:210,height:297},a8:{width:48,height:210},a9:{width:105,height:148},b0:{width:2834,height:4008},b1:{width:2004,height:2834},b2:{width:1417,height:2004},b3:{width:1e3,height:1417},b4:{width:708,height:1e3},b5:{width:498,height:708},b6:{width:354,height:498},b7:{width:249,height:354},b8:{width:175,height:249},b9:{width:124,height:175},"arch-a":{width:648,height:864},"arch-b":{width:864,height:1296},"arch-c":{width:1296,height:1728},"arch-d":{width:1728,height:2592},"arch-e":{width:2592,height:3456},"crown-octavo":{width:348,height:527},"crown-quarto":{width:535,height:697},"demy-octavo":{width:391,height:612},"demy-quarto":{width:620,height:782},"royal-octavo":{width:442,height:663},"royal-quarto":{width:671,height:884},executive:{width:522,height:756},halfletter:{width:396,height:612},ledger:{width:1224,height:792},legal:{width:612,height:1008},letter:{width:612,height:792},tabloid:{width:792,height:1224}},Zt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;t.DW.prototype.toString=function(){var t=[],e=this.i;e&&t.push(R(e,te,!0),":");var i=this.o;return(i||"file"==e)&&(t.push("//"),(e=this.K)&&t.push(R(e,te,!0),"@"),t.push((0,window.encodeURIComponent)(String(i)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(i=this.G)&&t.push(":",String(i))),(i=this.Sc)&&(this.o&&"/"!=i.charAt(0)&&t.push("/"),t.push(R(i,"/"==i.charAt(0)?ie:ee,!0))),(i=this.f.toString())&&t.push("?",i),(i=this.D)&&t.push("#",R(i,se)),t.join("")},t.DW.prototype.clone=function(){return new t.DW(this)};var Qt,te=/[#\/\?@]/g,ee=/[#\?:]/g,ie=/[#\?]/g,ne=/[#\?@]/g,se=/#/g;t.g=B.prototype,t.g.add=function(t,e){H(this),this.i=null,t=W(this,t);var i=this.b.get(t);return i||this.b.set(t,i=[]),i.push(e),this.f+=1,this},t.g.remove=function(e){return H(this),e=W(this,e),!!t.$B(this.b.f,e)&&(this.i=null,this.f-=this.b.get(e).length,this.b.remove(e))},t.g.clear=function(){this.b=this.i=null,this.f=0},t.g.Uj=function(){return H(this),0==this.f},t.g.forEach=function(e,i){H(this),this.b.forEach((function(n,s){(0,t.Pe)(n,(function(t){e.call(i,t,s,this)}),this)}),this)},t.g.Yt=function(){H(this);for(var t=this.b.zs(),e=this.b.Yt(),i=[],n=0;n<e.length;n++)for(var s=t[n],a=0;a<s.length;a++)i.push(e[n]);return i},t.g.zs=function(e){H(this);var i=[];if(t.z(e))V(this,e)&&(i=t.Ga(i,this.b.get(W(this,e))));else{e=this.b.zs();for(var n=0;n<e.length;n++)i=t.Ga(i,e[n])}return i},t.g.set=function(t,e){return H(this),this.i=null,t=W(this,t),V(this,t)&&(this.f-=this.b.get(t).length),this.b.set(t,[e]),this.f+=1,this},t.g.get=function(t,e){if(!t)return e;var i=this.zs(t);return 0<i.length?String(i[0]):e},t.g.toString=function(){if(this.i)return this.i;if(!this.b)return"";for(var t=[],e=this.b.Yt(),i=0;i<e.length;i++){var n=e[i],s=(0,window.encodeURIComponent)(String(n));n=this.zs(n);for(var a=0;a<n.length;a++){var o=s;""!==n[a]&&(o+="="+(0,window.encodeURIComponent)(String(n[a]))),t.push(o)}}return this.i=t.join("&")},t.g.clone=function(){var t=new B;return t.i=this.i,this.b&&(t.b=this.b.clone(),t.f=this.f),t},t.H(K,t.qf);var ae,oe={},re=0;t.g=K.prototype,t.g.Uk=null,t.g.vl=null,t.g.LA=null,t.g.mia=0,t.g.cw=!1,t.g.jG=!1,t.g.KA=null,t.g.abort=function(){this.cw&&(t.$d(nt(this)),this.cw=this.jG=!1,this.dispatchEvent("abort"),tt(this))},t.g.R=function(){this.cw&&this.abort(),K.u.R.call(this),this.vl&&et(this),it(this),delete this.i,this.Uk=null,delete oe[this.Er]},t.g.YH=function(){return this.jG},t.g.uq=function(){return this.cw},t.g.LW=function(){if("complete"==this.vl.readyState){t.Yd(this.vl,"readystatechange",this.LW,!1,this);try{var e=$(this.vl);if(t.hd&&"about:blank"==e.location&&!window.navigator.onLine)return void Q(this)}catch(i){return void Q(this)}Z(this,e)}},t.g.jO=function(){if(!t.yd||t.xd||"about:blank"!=(this.vl?$(nt(this)):null).location){t.Yd(nt(this),"load",this.jO,!1,this);try{Z(this,this.vl?$(nt(this)):null)}catch(e){Q(this)}}},t.g.$0=function(){for(this.KA&&(t.Ej(this.KA),this.KA=null);0!=this.f.length;){var e=this.f.pop();t.Xe(e)}},t.g.x6=function(){if(this.cw){var e=this.vl?$(nt(this)):null;e&&!t.Zc(e,"documentUri")?(t.Yd(nt(this),"load",this.jO,!1,this),Q(this)):t.Dj(this.x6,250,this)}},st.prototype.b=null,t.H(ot,st),ae=new ot,t.H(ht,t.qf);var le="",he=/^https?$/i,ce=["POST","PUT"],ue=[];t.g=ht.prototype,t.g.Kda=function(){this.ld(),t.Fa(ue,this)},t.g.D6=function(){void 0!==t.OD&&this.b&&(this.D="Timed out after "+this.G+"ms, aborting",this.i=8,this.dispatchEvent("timeout"),this.abort(8))},t.g.Lv=function(t,e){this.f=!1,this.b&&(this.o=!0,this.b.abort(),this.o=!1),this.D=e,this.i=t,pt(this),ft(this)},t.g.abort=function(t){this.b&&this.f&&(this.f=!1,this.o=!0,this.b.abort(),this.o=!1,this.i=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ft(this))},t.g.R=function(){this.b&&(this.f&&(this.f=!1,this.o=!0,this.b.abort(),this.o=!1),ft(this,!0)),ht.u.R.call(this)},t.g.x4=function(){this.md||(this.Ba||this.K||this.o?gt(this):this.bja())},t.g.bja=function(){gt(this)},t.g.uq=function(){return!!this.b},t.g.YH=function(){return 4==vt(this)};var de="//export.anychart.com";t.g=t.Yj.prototype,t.g.yla=function(e){return t.p(e)?(this.jy=(this.W6=!!e)?t.Ch.anychart.exports:null,this):!!this.W6},t.g.Hu=function(e,i,n,s,a,o,r){if("svg"==t.kk){var l={};xt(this,l,s,a,o,r),St("png",l,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.FB=function(e,i,n,s,a,o,r,l){if("svg"==t.kk){var h={};wt(this,h,s,a,o,r,l),St("jpg",h,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.HB=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};Ct(this,r,s,a,o),St("svg",r,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.GB=function(e,i,n,s,a,o,r,l){if("svg"==t.kk){var h={};Tt(this,h,s,a,o,r,l),St("pdf",h,!!n,!0,e,i)}else(0,window.alert)(t.ld(15))},t.g.zA=function(e,i,n,s,a){if("svg"==t.kk){var o={};xt(this,o,n,s,a),St("png",o,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.wA=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};wt(this,r,n,s,a,o),St("jpg",r,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.BA=function(e,i,n,s){if("svg"==t.kk){var a={};Ct(this,a,n,s),St("svg",a,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.yA=function(e,i,n,s,a,o){if("svg"==t.kk){var r={};Tt(this,r,n,s,a,o),St("pdf",r,!0,!1,e,i)}else(0,window.alert)(t.ld(15))},t.g.Eu=function(t,e,i,n){this.jy?this.jy.Eu(this,this,t,e,i,n):Dt(this,t,e,i,n)},t.g.Yw=function(t,e,i,n,s){this.jy?this.jy.saveAsJpg(this,this,t,e,i,n,s):kt(this,t,e,i,n,s)},t.g.Zw=function(t,e,i,n,s){this.jy?this.jy.saveAsPdf(this,this,t,e,i,n,s):$t(this,t,e,i,n,s)},t.g.$w=function(t,e,i){this.jy?this.jy.saveAsSvg(this,this,t,e,i):Ot(this,t,e,i)},t.g.print=function(i,s){if(t.p(i)||t.p(s)){var r=e(i,s,"us-letter"),l=a(this.EY()).contentWindow.document;n("html, body {height: 100%; overflow: hidden}",l);var h=t.Me("DIV");t.uf(h,{width:r.width,height:r.height}),l.body.appendChild(h),r=this.width(),l=this.height();var c=t.Wf(h);this.resize(c.width,c.height),"svg"==(c=this.ia()).tagName&&c.cloneNode?(c=c.cloneNode(!0),h.appendChild(c)):t.lk(h).data(this.data()),this.resize(r,l)}else h=a(this.EY()).contentWindow.document,"svg"==(l=this.ia()).tagName?l.cloneNode?r=l.cloneNode(!0):((l=t.lk(h.body)).data(this.data()),r=l.ia()):(l=t.lk(h.body)).data(this.data()),c=r,(l=t.mg()).lc(c,"width","100%"),l.lc(c,"height","100%"),l.lc(c,"viewBox","0 0 "+this.width()+" "+this.height()),t.uf(c,"width","100%"),t.uf(c,"height",""),t.uf(c,"max-height","100%"),h.body.appendChild(r);o()},t.g.Nq=function(i,n){if("svg"!=t.kk)return"";if(t.p(i)||t.p(n)){var s=e(i,n),a=t.bf(this.ia()),o=t.yf(a,"width");a=t.yf(a,"height"),this.resize(s.width,s.height),s=Pt(this.ia()),this.resize(o,a)}else t.mg().hP(this.ia(),this.width(),this.height()),s=Pt(this.ia()),t.mg().hP(this.ia(),"100%","100%");return'<?xml version="1.0" encoding="UTF-8" standalone="no"?>'+s},t.E("acgraph.server",(function(e){return t.p(e)&&(de=e),de}));var pe=t.Yj.prototype;pe.useAnychartExporting=pe.yla,pe.saveAsPNG=pe.Eu,pe.saveAsJPG=pe.Yw,pe.saveAsPDF=pe.Zw,pe.saveAsSVG=pe.$w,pe.saveAsPng=pe.Eu,pe.saveAsJpg=pe.Yw,pe.saveAsPdf=pe.Zw,pe.saveAsSvg=pe.$w,pe.shareAsPng=pe.Hu,pe.shareAsJpg=pe.FB,pe.shareAsPdf=pe.GB,pe.shareAsSvg=pe.HB,pe.getPngBase64String=pe.zA,pe.getJpgBase64String=pe.wA,pe.getSvgBase64String=pe.BA,pe.getPdfBase64String=pe.yA,pe.print=pe.print,pe.toSvg=pe.Nq,t.g=Lt.prototype,t.g.w0=function(e){return"object"==t.ka(e)?(t.ra(this.K,e),this):this.K},t.g.filename=function(e){return t.p(e)&&(this.aa=e),this.aa},t.g.wk=function(t,e){return this.b=I({width:t,height:e},t,this.b)},t.g.z1=function(t,e,i,n,s,a,o){return this.i=I({caption:t,link:e,name:i,description:n,width:s,height:a,appId:o},t,this.i)},t.g.T6=function(t,e,i){return this.G=I({url:t,width:e,height:i},t,this.G)},t.g.I3=function(t,e,i,n){return this.o=I({caption:t,description:e,width:i,height:n},t,this.o)},t.g.G4=function(t,e,i,n){return this.D=I({link:t,description:e,width:i,height:n},t,this.D)},t.g.UK=function(){this.aa="anychart",this.b={width:void 0,height:void 0},this.i={caption:t.ll.location?t.ll.location.hostname:"",link:void 0,name:void 0,description:void 0,appId:0x42607363aa4b7,width:1200,height:630},this.G={url:"https://export.anychart.com/sharing/twitter",width:1024,height:800},this.o={caption:"AnyChart",description:void 0,width:1200,height:630},this.D={link:void 0,description:void 0,width:1200,height:800},this.K={path:"https://cdn.anychart.com/3rd/",enabled:!0,fallback:!0}},t.g.F=function(){var t={};return At(t,"filename",this.aa),At(t,"image",this.b),At(t,"facebook",this.i),At(t,"twitter",this.G),At(t,"linkedin",this.o),At(t,"pinterest",this.D),At(t,"clientside",this.K),t},t.g.U=function(t){this.filename(t.filename),this.wk(t.image),this.z1(t.facebook),this.T6(t.twitter),this.I3(t.linkedin),this.G4(t.pinterest),this.w0(t.clientside)};var ge=Lt.prototype;ge.filename=ge.filename,ge.image=ge.wk,ge.facebook=ge.z1,ge.twitter=ge.T6,ge.linkedin=ge.I3,ge.pinterest=ge.G4,ge.clientside=ge.w0;var fe={png:"image/png",jpg:"image/jpeg",svg:"image/svg+xml",csv:"text/csv",pdf:"application/pdf",json:"application/json",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xml:"text/xml"},me=new Lt;me.UK(),me.create=function(){return new Lt},me.ic=function(e,i){var n=e&&e.exports?e.exports()[i]():void 0,s=t.fa.anychart.exports[i]();return"object"==t.ka(n)?I(s,n,s):t.p(n)?n:s},me.na=t.fa.IS_ANYCHART_AMD?t.eq.acgraph.server:t.ll.acgraph.server,me.ba=function(t,e,i){return function(){X(de+"/"+i,{"file-name":e,data:t,dataType:i,responseType:"file"})}},me.f=function(e,i){return function(n){e.fallback?(t.kl(1e3,null,[],!0),i.call(null,arguments)):t.kl(1002,null,[],!0)}},me.Eu=function(e,i,n,s,a,o){var r=i?i.Ja():null;r&&(i=me.ic(e,"image"),n=I({width:n,height:s,quality:a,filename:o},n,{width:i.width,height:i.height,filename:me.ic(e,"filename")}),s=me.ic(e,"clientside"),a=me.f(s,(function(t){Dt(r,t.width,t.height,t.quality,t.filename)})),s.enabled?Mt(e,"png",n,a):s.fallback?Dt(r,n.width,n.height,n.quality,n.filename):t.kl(1001,null,[],!0))},me.Yw=function(e,i,n,s,a,o,r){var l=i?i.Ja():null;l&&(i=me.ic(e,"image"),n=I({width:n,height:s,quality:a,forceTransparentWhite:o,filename:r},n,{width:i.width,height:i.height,filename:me.ic(e,"filename")}),s=me.ic(e,"clientside"),a=me.f(s,(function(t){kt(l,t.width,t.height,t.quality,t.forceTransparentWhite,t.filename)})),s.enabled?Mt(e,"jpg",n,a):s.fallback?kt(l,n.width,n.height,n.quality,n.forceTransparentWhite,n.filename):t.kl(1001,null,[],!0))},me.Zw=function(e,i,n,s,a,o,r){var l=i?i.Ja():null;l&&(i=me.ic(e,"image"),n=I({paperSize:n,width:n,landscape:s,height:s,x:a,y:o,filename:r},n,{width:i.width,height:i.height,filename:me.ic(e,"filename")}),s=me.ic(e,"clientside"),a=me.f(s,(function(t){$t(l,t.paperSize||t.width,t.landscape||t.height,t.x,t.y,t.filename)})),s.enabled?Mt(e,"pdf",n,a):s.fallback?$t(l,n.paperSize||n.width,n.landscape||n.height,n.x,n.y,n.filename):t.kl(1001,null,[],!0))},me.$w=function(e,i,n,s,a){var o=i?i.Ja():null;o&&(i=me.ic(e,"image"),n=I({paperSize:n,width:n,landscape:s,height:s,filename:a},n,{width:i.width,height:i.height,filename:me.ic(e,"filename")}),s=me.ic(e,"clientside"),a=me.f(s,(function(t){Ot(o,t.paperSize||t.width,t.landscape||t.height,t.filename)})),s.enabled?Mt(e,"svg",n,a):s.fallback?Ot(o,n.paperSize||n.width,n.landscape||n.height,n.filename):t.kl(1001,null,[],!0))},me.Nq=function(t,e,i,n){return(e=e?e.Ja():null)?(t=me.ic(t,"image"),i=I({paperSize:i,width:i,landscape:n,height:n},i,{width:t.width,height:t.height}),e.Nq(i.paperSize||i.width,i.landscape||i.height)):""},me.P=function(e,i,n,s){s=s||me.ic(e,"filename"),e=me.ic(e,"clientside");var a=me.ba(i,s,n),o=me.f(e,a);if(e.enabled)try{_t(new window.Blob([i],{type:fe[n]||""}),s,n)}catch(r){o()}else e.fallback?a():t.kl(1001,null,[],!0)},me.WO=function(t,e,i){me.P(t,e,"xml",i)},me.VO=function(t,e,i){me.P(t,e,"json",i)},me.cz=function(t,e,i){me.P(t,e,"csv",i)},me.dz=function(e,i,n){var s=me.ic(e,"clientside");n=n||me.ic(e,"filename");var a=me.ba(i,n,"xlsx"),o=me.f(s,a);s.enabled?Et(e,i,n,o):s.fallback?a():t.kl(1001,null,[],!0)},me.Hu=function(t,e,i,n,s,a,o,r,l){if(e=e?e.Ja():null){var h=me.ic(t,"image");t=I({onSuccess:i,onError:n,asBase64:s,width:a,height:o,quality:r,filename:l},i,{width:h.width,height:h.height,filename:me.ic(t,"filename")}),e.Hu(t.onSuccess,t.onError,t.asBase64,t.width,t.height,t.quality,t.filename)}},me.FB=function(t,e,i,n,s,a,o,r,l,h){if(e=e?e.Ja():null){var c=me.ic(t,"image");t=I({onSuccess:i,onError:n,asBase64:s,width:a,height:o,quality:r,forceTransparentWhite:l,filename:h},i,{width:c.width,height:c.height,filename:me.ic(t,"filename")}),e.FB(t.onSuccess,t.onError,t.asBase64,t.width,t.height,t.quality,t.forceTransparentWhite,t.filename)}},me.HB=function(t,e,i,n,s,a,o,r){if(e=e?e.Ja():null){var l=me.ic(t,"image");t=I({onSuccess:i,onError:n,asBase64:s,paperSize:a,width:a,landscape:o,height:o,filename:r},i,{width:l.width,height:l.height,filename:me.ic(t,"filename")}),e.HB(t.onSuccess,t.onError,t.asBase64,t.paperSize||t.width,t.landscape||t.height,t.filename)}},me.GB=function(t,e,i,n,s,a,o,r,l,h){if(e=e?e.Ja():null){var c=me.ic(t,"image");t=I({onSuccess:i,onError:n,asBase64:s,paperSize:a,width:a,landscape:o,height:o,x:r,y:l,filename:h},i,{width:c.width,height:c.height,filename:me.ic(t,"filename")}),e.GB(t.onSuccess,t.onError,t.asBase64,t.paperSize||t.width,t.landscape||t.height,t.x,t.y,t.filename)}},me.zA=function(t,e,i,n,s,a,o){(e=e?e.Ja():null)&&(t=me.ic(t,"image"),i=I({onSuccess:i,onError:n,width:s,height:a,quality:o},i,{width:t.width,height:t.height}),e.zA(i.onSuccess,i.onError,i.width,i.height,i.quality))},me.wA=function(t,e,i,n,s,a,o,r){(e=e?e.Ja():null)&&(t=me.ic(t,"image"),i=I({onSuccess:i,onError:n,width:s,height:a,quality:o,forceTransparentWhite:r},i,{width:t.width,height:t.height}),e.wA(i.onSuccess,i.onError,i.width,i.height,i.quality,i.forceTransparentWhite))},me.BA=function(t,e,i,n,s,a){(e=e?e.Ja():null)&&(t=me.ic(t,"image"),i=I({onSuccess:i,onError:n,paperSize:s,width:s,landscape:a,height:a},i,{width:t.width,height:t.height}),e.BA(i.onSuccess,i.onError,i.paperSize||i.width,i.landscape||i.height))},me.yA=function(t,e,i,n,s,a,o,r){(e=e?e.Ja():null)&&(t=me.ic(t,"image"),i=I({onSuccess:i,onError:n,paperSize:s,width:s,landscape:a,height:a,x:o,y:r},i,{width:t.width,height:t.height}),e.yA(i.onSuccess,i.onError,i.paperSize||i.width,i.landscape||i.height,i.x,i.y))},me.print=function(t,e,i,n){(t=e?e.Ja():null)&&(i=I({paperSize:i,landscape:n},i),t.print(i.paperSize,i.landscape))},me.LE=function(e,i,n,s,a,o){var r=me.ic(e,"facebook"),l=I({caption:n,link:s,name:a,description:o},n,r),h=t.ll.open("","_blank","scrollbars=yes, width=550, height=550, top="+Number(window.screen.height/2-275)+", left="+Number(window.screen.width/2-275));me.Hu(e,i,(function(t){(t={app_id:r.appId,display:"popup",picture:t}).caption=l.caption,l.link&&(t.link=l.link,l.name&&(t.name=l.name),l.description&&(t.description=l.description));var e,i="";for(e in t)i+=i?"&":"",i+=e+"="+t[e];h.location.href="https://www.facebook.com/dialog/feed?"+i}),void 0,!1,r.width,r.height)},me.OE=function(e,i){var n=me.ic(e,"twitter"),s=Number(window.screen.width/2-300),a=Number(window.screen.height/2-260),o=t.Ae(window.document,"INPUT","ac-share-twitter-data-input",void 0);if(0<o.length){var r=o[0];o=t.Ae(window.document,"FORM","ac-share-twitter-form",void 0)[0]}else{o=t.Re(window.document,"FORM"),t.Qj(o,"ac-share-twitter-form"),o.target="Map",o.method="POST",o.action=n.url,r=t.Re(window.document,"INPUT"),t.Qj(r,"ac-share-twitter-data-input"),r.type="hidden",r.name="data";var l=t.Re(window.document,"INPUT");l.type="hidden",l.name="dataType",l.value="svg",o.appendChild(r),o.appendChild(l),k("BODY")[0].appendChild(o)}t.p(o)&&t.p(r)&&(r.value=me.Nq(e,i,n.width,n.height),t.ll.open("","Map","status=0,title=0,height=520,width=600,scrollbars=1, width=600, height=520, top="+a+", left="+s)&&o.submit())},me.ME=function(e,i,n,s){var a=me.ic(e,"linkedin"),o=I({caption:n,description:s},n,a),r=t.ll.open("","_blank","scrollbars=yes, width=550, height=520, top="+Number(window.screen.height/2-260)+", left="+Number(window.screen.width/2-275));me.Hu(e,i,(function(t){(t={mini:"true",url:t}).title=o.caption,o.description&&(t.summary=o.description);var e,i="";for(e in t)i+=i?"&":"",i+=e+"="+t[e];r.location.href="https://www.linkedin.com/shareArticle?"+i}),void 0,!1,a.width,a.height)},me.NE=function(e,i,n,s){var a=me.ic(e,"pinterest"),o=I({link:n,description:s},n,a),r=t.ll.open("","_blank","scrollbars=yes, width=550, height=520, top="+Number(window.screen.height/2-260)+", left="+Number(window.screen.width/2-275));me.Hu(e,i,(function(t){t={media:t},o.link&&(t.url=o.link),o.description&&(t.description=o.description);var e,i="";for(e in t)i+=i?"&":"",i+=e+"="+t[e];r.location.href="https://pinterest.com/pin/create/link?"+i}),void 0,!1,a.width,a.height)},t.E("anychart.exports",me),t.E("anychart.exports.server",me.na)}.call(this,$)),_.data_adapter||(_.data_adapter=1,function(t){var e=function(t){try{return t.b?t.b.responseText:""}catch(e){return""}},i=function(e,s,a,o,r,l,h,c,u){var d=n("fromXml",a,u);d&&(s=(0,t.pa)(i.b,void 0,s,a,u,d),t.RW(e,s,o,r,l,h,c))},n=function(e,i,n){var s=t.ll.anychart;return s?(s=s[e])||(i&&i.call(n,500,t.gc("anychart.%s is not available.",e)),null):(i&&i.call(n,500,"AnyChart in not present on the page."),null)},s=function(e){return[t.XW(e)||null]},a=function(e){try{var i=e.b?e.b.responseXML:null}catch(n){i=null}return[t.eq.utils.xml2json(i).data]},o=function(e){for(var i=(e=t.XW(e)).feed.entry,n={title:e.feed.title.$t,rows:[]},s=0,a=i.length;s<a;s++){var o=i[s],r=o.gs$cell.$t,l=o.gs$cell.col-1;o=o.gs$cell.row-1,n.rows[o]||(n.rows[o]=[]),n.rows[o][l]=r}return n.header=n.rows.shift(),[n,e]},r=function(t){return[e(t)]},l=function(e,i,n,s,a){if(a=a.target,t.VW(a)){try{var o=e(a)}catch(r){n&&n.call(s,500,r)}i.apply(s,o)}else n&&n.call(s,a.i,t.YW(a))};t.eq.exports||t.il(4,null,["Exporting"]),i.b=function(i,n,s,a,o){if(o=o.target,t.VW(o)){try{var r=a(e(o))}catch(l){n&&n.call(s,500,l)}i?t.z(i)?(r.container(i),r.draw()):t.D(i)&&i.call(s,r):r.container()&&r.draw()}else n&&n.call(s,o.i,t.YW(o))},t.E("anychart.fromXmlFile",i),t.E("anychart.fromJsonFile",(function(e,s,a,o,r,l,h,c,u){var d=n("fromJson",a,u);d&&(s=(0,t.pa)(i.b,void 0,s,a,u,d),t.RW(e,s,o,r,l,h,c))})),t.E("anychart.data.parseHtmlTable",(function(e,i,n,s,a,o){var r,l=window.document.querySelector(e||"table");if(e=null,l){s=s||"tr:first-child th",n=n||"td, th",i=i||"tr",e={},(a=l.querySelector(a||"caption"))&&(r=o?o.call(void 0,a):a.innerText),r&&(e.title=r);var h=l.querySelectorAll(s),c=[];for(a=null,s=0,r=h.length;s<r;s++){var u=h[s];u&&!a&&(a=t.bf(u)),c.push(o?o.call(void 0,u):u.innerText)}if(c.length&&(e.header=c),(i=l.querySelectorAll(i))&&i.length){for(l=[],s=0,r=i.length;s<r;s++)if((c=i[s])!=a){if(h=[],(c=c.querySelectorAll(n))&&c.length){u=0;for(var d=c.length;u<d;u++){var p=c[u];o?h.push(o.call(void 0,p)):h.push(p.innerText)}}h.length&&l.push(h)}e.rows=l}}return e})),t.E("anychart.data.loadJsonFile",(function(e,i,n,a,o,r,h,c,u){i=(0,t.pa)(l,void 0,s,i,n,u),t.RW(e,i,a,o,r,h,c)})),t.E("anychart.data.loadXmlFile",(function(e,i,n,s,o,r,h,c,u){i=(0,t.pa)(l,void 0,a,i,n,u),t.RW(e,i,s,o,r,h,c)})),t.E("anychart.data.loadCsvFile",(function(e,i,n,s,a,o,h,c,u){i=(0,t.pa)(l,void 0,r,i,n,u),t.RW(e,i,s,a,o,h,c)})),t.E("anychart.data.loadGoogleSpreadsheet",(function(e,i,n,s,a){i=(0,t.pa)(l,void 0,o,i,n,a),t.z(e)?(n=e,e="od6"):(n=e.key,e=t.p(e.sheet)?e.sheet:"od6"),(e=new t.DW("https://spreadsheets.google.com/feeds/cells/"+n+"/"+e+"/public/values")).f.set("alt","json"),n=Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^(0,t.Ln)()).toString(36),e.f.set("zx",n),t.RW(e.toString(),i,"GET",null,null,s)}))}.call(this,$)),_.pyramid_funnel||(_.pyramid_funnel=1,function(t){var e=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e},i=function(e,i,n){t.Ez.call(this,null,[],[],i,n),this.ya=e,this.G=!x(this.ya),this.i=this.ya.g("connectorStroke")},n=function(e,i,n){t.Bx.call(this),this.ka(),this.re=e,this.Ga("pieFunnelPyramidBase",e),this.fd=null,this.D=[],this.He=null,this.na=1,this.i=this.Fa=null,this.state=new t.ix(this),this.data(i||null,n),e={},t.T(e,[["fill",528,1],["stroke",528,1],["hatchFill",528,1],["labels",0,0],["markers",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.de,this),e.kb(this),this.B(4096,1)})),this.ca.ta("markersAfterInitCallback",t.ty),e={},t.T(e,[["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0],["markers",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),t.T(this.ua,[["baseWidth",16,1],["neckHeight",16,1],["neckWidth",16,1],["pointsPadding",16,1],["reversed",16,1],["overlapMode",4096,1],["connectorLength",4100,9],["connectorStroke",16,1]]),this.da(!1)},s=function(e,i){var n=e.$().j("point");if(t.p(n)){var s=t.cm("fill",1,!0)(e,i,!1,!0);n.fill(s),s=t.cm("stroke",2,!0)(e,i,!1,!0),n.stroke(s)}},a=function(e,i){var n=e.$().j("hatchPoint");if(null!=n){var s=t.cm("hatchFill",3,!0)(e,i,!1);n.stroke(null).fill(s)}},o=function(t,e){var i=t.G,n=t.f.height,s=t.$a,a=t.Ba;return e>n-a||n==a?s:s+(n-a-e)/(n-a)*(i-s)},r=function(e){return 0>=(e=t.N(e))||!(0,window.isFinite)(e)},l=function(t){var e,i=t.$(),n=i.ma(),s=t.f,a=i.j("height")/2,r=i.j("startY"),l=i.j("height")+r,h=null;(e=t.Ka)&&(n?n==i.Hb()-1?(r+=e/2)>l&&(r=l-t.na):(r+=e/2)>(l-=e/2)&&(l=(r=i.j("startY")+a)+t.na):(l-=e/2)<r&&(l=t.na));var c=o(t,r);a=(n=t.b-c/2)+c,c=o(t,l),c=(e=t.b-c/2)+c,r+=s.top,l+=s.top,n=s.left+n,a=s.left+a,0<t.Ba&&r<t.Ha&&l>t.Ha&&(h=l,l=t.Ha,c=o(t,l),c=(e=t.b-c/2)+c),e=s.left+e,c=s.left+c,t.g("reversed")||(r=s.height-(r-s.top)+s.top,l=s.height-(l-s.top)+s.top,h=h?s.height-(h-s.top)+s.top:null,r=[l,l=r][0],n=[e,e=n][0],a=[c,c=a][0]),i.j("x1",n),i.j("x2",a),i.j("x3",e),i.j("x4",c),i.j("y1",r),i.j("y2",l),i.j("y3",h)},h=function(e,i,n,s){var a=e.labels();if(a.ka(),a.fontOpacity(i),a.W(),a.da(!1),s&&e.aa)for(i=0;i<e.aa.length;i++)(s=e.aa[i])&&(a=e.g("connectorStroke"),a=t.Ul(a,n),s.stroke(a))},c=function(e){var i=e.$(),n=i.ma(),o=t.eC(e.ue),r=t.eC(e.o);i.j("point",o),i.j("hatchPoint",r),l(e);var h=i.j("x1"),c=i.j("x2"),u=i.j("x3"),d=i.j("x4"),p=i.j("y1"),g=i.j("y2"),f=i.j("y3");o.moveTo(h,p).lineTo(c,p),f?o.lineTo(d,g).lineTo(d,f).lineTo(u,f).lineTo(u,g):o.lineTo(d,g).lineTo(u,g),o.close(),i.j("point",o),o.tag={index:n,X:e},i=t.nx(e.state,i.ma()),s(e,i),r&&(r.pe(o.F()),r.tag={index:n,X:e},a(e,i))},u=function(e,i,n){var s=k(e),a=e.$(),o=e.f,r=t.p(n)?!!(n&t.wo):null,l=t.p(n)?!r&&!!(n&t.vo):null,h=a.get("normal");h=t.p(h)?h.label:void 0;var c=a.get("hovered");c=t.p(c)?c.label:void 0;var u=a.get("selected");u=t.p(u)?u.label:void 0,h=t.Zo(h,a.get("label")),c=l?t.Zo(c,a.get("hoverLabel")):null,r=(u=r?t.Zo(u,a.get("selectLabel")):null)||c||h||{},h=t.N(a.j("x1")),u=t.N(a.j("x2")),c=t.N(a.j("y1")),l=t.N(a.j("y2"));var p=t.N(a.j("y3"));switch(a=u-h,c+=(l=p?p-c:l-c)/2,u=t.N(r.offsetY)||0,i?n=d(e,i,n):(n=e.labels().yl(e.Ic(),null,r),n=t.mn(n)),r=i&&i.g("anchor")||e.labels().g("anchor"),i&&(c=i.jc().value.y),i=c+u,n.height>l&&("left-center"==r||"center"==r||"right-center"==r)&&(c+n.height/2>o.top+o.height&&(c=o.top+o.height-n.height/2),c-n.height/2<o.top&&(c=o.top+n.height/2)),i=P(e,i),s){case"inside":h+=a/2;break;case"outside-left":h=e.b-i/2,h=o.left+h-e.ea-n.width/2;break;case"outside-left-in-column":h=o.left+n.width/2;break;case"outside-right":h=e.b+i/2,h=o.left+h+e.ea+n.width/2;break;case"outside-right-in-column":h=o.left+o.width-n.width/2}return"left-top"==r||"center-top"==r||"right-top"==r?c-=.5:"left-bottom"!=r&&"center-bottom"!=r&&"right-bottom"!=r||(c+=.5),{value:{x:h,y:c}}},d=function(e,i,n){var s=!!(n&t.wo),a=!s&&!!(n&t.vo);return n=e.data().get(i.ma(),"label"),a=a?e.data().get(i.ma(),"hoverLabel"):null,s=(s?e.data().get(i.ma(),"selectLabel"):null)||a||n||{},e.data().j(i.ma(),"labelWidthForced")&&((s=t.Qc(s)).width=i.width()),e.$().select(i.ma()),i.Hf(e.Ic()),e=e.labels().yl(i.Hf(),i.jc(),s),t.mn(e)},p=function(e,i){if("no-overlap"==e.g("overlapMode")&&!x(e)&&e.labels().enabled()){S(e),e.Za=0;var n=e.state.fk()|(i?t.nx(e.state,i.ma()):0);g(e,n,i)}},g=function(e,i,n){if(10!=e.Za){for(var s,a,o,r,l=e.$().Hb(),h=!1,c=e.g("reversed"),u=0;u<l-1;u++)if(s=c?u:l-1-u,(s=e.labels().be(s))&&0!=s.enabled()&&(a=d(e,s,i),o=c?f(e,s):m(e,s))){r=d(e,o,i);var p=b(e,s),S=b(e,o);p&&S&&p==S||!(r.top<=a.top+a.height)||(h=!0,p&&S?y(e,p,S):!p&&S?v(e,o,s):v(e,s,o))}h&&((0,t.Pe)(e.D,(function(e){if(2>e.labels.length){var i=e.ya;i.D.length&&(e.clear(),t.Fa(i.D,e))}else{for(var s,a,o=0,r=0,l=i=0,h=e.labels.length;l<h;l++)s=e.labels[l],a=e.ya.state.fk()|t.nx(e.ya.state,s.ma()),a=e.rd(s,a),s=(s=e.ya.data().j(s.ma(),"point")).rb(),l||(o=s.top),i+=a.height,r+=s.height;(o=o+(r+=e.ya.Ka*(h-1))/2-i/2)+i>(r=e.ya.f).top+r.height&&(o=r.top+r.height-i),o<r.top&&(o=r.top),e.y=o,A(e,n)}})),e.Za++,g(e,i,n))}},f=function(t,e){if(!e)return null;var i=t.$().Hb();if(e.ma()==i-1)return null;for(var n,s=e.ma()+1;s<=i-1;s++)if((n=t.labels().be(s))&&!1!==n.enabled())return n;return null},m=function(t,e){if(!e||0==e.ma())return null;for(var i,n=e.ma()-1;0<=n;n--)if((i=t.labels().be(n))&&!1!==i.enabled())return i;return null},v=function(t,e,i){var n=b(t,e);null===n?((n=new I(t)).iC(e),n.iC(i),t.D.push(n)):n.iC(i)},b=function(e,i){return e.D.length?t.ya(e.D,(function(e){return-1!==(0,t.za)(e.labels,i)})):null},y=function(e,i,n){var s=i.labels[0].ma(),a=n.labels[0].ma();i.labels=e.g("reversed")==s<a?t.Ga(i.labels,n.labels):t.Ga(n.labels,i.labels),t.Fa(e.D,n)},S=function(e){e.D.length&&((0,t.Pe)(e.D,(function(t){t.clear()})),e.D.length=0)},x=function(t){return"inside"==k(t)},w=function(t){return"outside-right-in-column"==(t=k(t))||"outside-left-in-column"==t},C=function(t){return"outside-left"==(t=k(t))||"outside-left-in-column"==t},T=function(t){return"outside-right"==(t=k(t))||"outside-right-in-column"==t},D=function(e){if(e.labels().enabled()&&!x(e)){l(e);var i=e.$();i.j("labelWidthForced",void 0);var n=e.f,s=i.get("label"),a=u(e),r=e.Ic();if(r=e.labels().yl(r,a,s),s=(r=t.mn(r)).left,a=r.left+r.width,r=e.g("reversed")?o(e,r.top-n.top):o(e,n.height-(r.top+r.height)+n.top),C(e)){var h=e.b-r/2;h=n.left+h;var c=e.G/2;c=n.width-e.b-c,w(e)?a+5>h&&((h=a+5-h)>c?(e.b+=c,h=e.b-r/2,h=n.left+h,i.j("labelWidthForced",h-5-s)):e.b+=h):s<n.left&&((h=Math.abs(n.left-s))>c?(e.b+=c,10>(e=(h=e.b-r/2)-e.ea)&&(e=10),i.j("labelWidthForced",e)):e.b+=h)}else T(e)&&(h=e.b+r/2,h+=n.left,c=e.G/2,c=n.width-(n.width-e.b)-c,w(e)?(0>s||s-5<h)&&(h=Math.abs(h-s+5),0>s||h>c?(e.b=e.b-c,h=e.b+r/2,h+=n.left,i.j("labelWidthForced",a-5-h)):e.b=e.b-h):a>n.left+n.width&&((h=a-(n.left+n.width))>c?(e.b=e.b-c,10>(e=n.left+n.width-s+c)&&(e=10),i.j("labelWidthForced",e)):e.b=e.b-h))}},k=function(e){return e=e.labels().g("position"),t.zk(U,"outside"==e?"outside-left":e,"outside-left-in-column")},$=function(t,e,i,n){var s=t.f,a=e.ma();a=t.data().j(a,"point").rb(),n=(e=d(t,e,n)).left;var o=e.top+e.height/2;a=a.top+a.height/2;var r=P(t,a);if(C(t)){n+=e.width;var l=t.b-r/2;n>(l+=s.left)&&5>Math.abs(a-o)&&(n=l-5)}else T(t)&&(l=t.b+r/2,n<(l+=s.left)&&5>Math.abs(a-o)&&(n=l+5));i.clear().moveTo(n,o).lineTo(l,a+.001)},O=function(e,i,n){var s=i.ma();if(e.aa[s])$(e,i,e.aa[s],n);else{var a=t.eC(e.ba);e.aa[s]=a,a.stroke(e.g("connectorStroke")),$(e,i,a,n)}},P=function(t,e){var i=t.f;return t.g("reversed")?o(t,e-i.top):o(t,i.height-e+i.top)},L=function(t){var e=t.Ua();t.gc("mousemove",t.GK),e.Lc()},I=function(t){this.ya=t,this.labels=[]},A=function(e,i){var n=0,s=0,a=null,o=null,r=null,l=e.ya.state.fk()|(i?t.nx(e.ya.state,i.ma()):0);(0,t.Pe)(e.labels,(function(t){var i=t.jc().value,h=e.rd(t,l),c=e.y+n+s+h.height/2;if(a&&o&&r){var u=r.y+o.height/2+(a.g("offsetY")||0),d=c-h.height/2+(t.g("offsetY")||0);d<u&&(c+=u-d)}t.jc({value:{x:i.x,y:c}}),t.W(),O(e.ya,t,l),n+=h.height,s+=t.g("offsetY")||0,a=t,o=h,r={x:i.x,y:c}}))},E=function(t,e){var i=new n("funnel",t,e);return i.$c(),i},G=function(t,e){var i=new n("pyramid",t,e);return i.$c(),i},U={yQ:"inside",uqa:"outside-left",vqa:"outside-left-in-column",wqa:"outside-right",xqa:"outside-right-in-column"};t.H(e,t.Ez),t.g=e.prototype,t.g.update=function(){this.b.length=this.f.length=0;for(var t=this.ya.cg();t.advance();)if(!t.j("missing")){var e=t.j("x1"),i=t.j("x2"),n=t.j("x3"),s=t.j("x4"),a=t.j("y1"),o=t.j("y2"),r=t.j("y3");t.j("neck",!!r),this.b.push(e,i,n,s,0,0,0),this.f.push(e,i,n,s,a,o,r||0)}},t.g.Jw=function(){h(this.ya,1e-5,1e-5,!x(this.ya))},t.g.en=function(){for(var e=this.ya.cg(),i=0;e.advance();)if(!e.j("missing")){e.j("x1",this.coords[i++]),e.j("x2",this.coords[i++]),e.j("x3",this.coords[i++]),e.j("x4",this.coords[i++]),e.j("y1",this.coords[i++]),e.j("y2",this.coords[i++]),e.j("y3",this.coords[i++]);var n=this.ya,s=e,a=s.j("point");a.clear();var o=s.j("x1"),r=s.j("x2"),l=s.j("x3"),h=s.j("x4"),c=s.j("y1"),u=s.j("y2"),d=s.j("y3");a.moveTo(o,c).lineTo(r,c),s.j("neck")?a.lineTo(h,u).lineTo(h,d).lineTo(l,d).lineTo(l,u):a.lineTo(h,u).lineTo(l,u),a.close(),(o=s.j("hatchPoint"))&&(n.$().select(s.ma()),o.clear(),o.pe(a.F()),s=t.nx(n.state,s.ma()),a=t.cm("hatchFill",3,!0),o.stroke(null).fill(a(n,s,!1)))}},t.g.cm=function(){this.en()},t.g.R=function(){e.u.R.call(this),this.ya=null},t.H(i,t.Ez),i.prototype.update=function(){this.b.length=this.f.length=0,this.b.push(1e-5,1e-5),this.f.push(1,this.i.opacity||1)},i.prototype.en=function(){h(this.ya,this.coords[0],this.coords[1],this.G)},i.prototype.cm=function(){this.en()},i.prototype.R=function(){i.u.R.call(this),this.i=this.ya=null,delete this.G},t.H(n,t.Bx),t.Gq(n,["fill","stroke","hatchFill"],"normal"),t.g=n.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.ra=16|t.Bx.prototype.ra,t.g.sa=28688|t.Bx.prototype.sa,t.g.Ue=function(){return[this]},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}if(this.Xf!==e){if(this.Xf=e,this.i!=e||null===e){if(t.qd(this.Yc),delete this.sd,t.J(e,t.Cr)){var s=e;this.Yc=null}else s=t.J(e,t.Mr)?(this.Yc=e).Yd():t.A(e)||t.z(e)?(this.Yc=new t.Mr(e,i)).Yd():(this.Yc=new t.Mr(null)).Yd();this.i=s.Ui()}t.qd(this.P),this.P=this.i,t.K(this.P,this.dd,this),this.B(29456,17)}return this}return this.P},t.g.dd=function(e){t.X(e,16)&&this.B(29456,17)},t.g.$=function(){return this.sd||(this.sd=this.P.$())},t.g.Ec=function(){return this.sd=this.P.$()},t.g.cg=function(){return this.P.$()},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.yI,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.HH,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)},t.g.yI=function(e){t.X(e,2)&&this.B(528,1)},t.g.HH=function(e){t.X(e,2)&&this.B(528,1)},t.g.remove=function(){S(this),this.ue&&this.ue.parent(null),n.u.remove.call(this)},t.g.pv=function(){var e=this.$();this.Fa&&t.J(this.Fa,t.Ms)&&t.Ns(this.Fa,e.Hb())},t.g.Qh=function(e){if(!this.pf()){this.pb();var i=this.$();if(this.J(4)&&this.B(4112),this.J(16)){this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ue.zIndex(30),this.ue.parent(this.Na)),this.o?this.o.clear():(this.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.o.parent(this.Na),this.o.zIndex(31).Dd(!0)),this.Ka=Math.abs(t.Tm(t.L(this.g("pointsPadding"),e.height),2)),this.G=Math.abs(t.Tm(t.L(this.g("baseWidth"),e.width),2)),this.$a=Math.abs(t.Tm(t.L(this.g("neckWidth"),e.width),2)),this.Ba=Math.abs(t.Tm(t.L(this.g("neckHeight"),e.height),2)),this.Ha=e.top+e.height-this.Ba,this.b=e.width/2,this.ea=t.L(this.g("connectorLength"),(e.width-this.G)/2),0>this.ea&&(this.ea=5),this.f=e;var n=0,s=i.Hb()-t.N(this.La("count")),a=t.Tm(this.Ka/e.height*100,2);for(i.reset();i.advance();){var o=i.get("value"),l=r(o);o=r(o)?0:t.N(o);var h=t.Tm(o/t.N(this.La("sum"))*100,2);l&&(h=a),(h=t.Tm(e.height/(100+s*a)*h,2))||(h=this.na),i.j("value",o),i.j("height",h),i.j("startY",n),i.j("missing",l),n+=h,D(this)}for(i.reset();i.advance();)n=i.ma(),"selected"==String(i.get("state")).toLowerCase()&&this.state.Lh(t.wo,n),c(this);if(this.aa)for(n=0;n<this.aa.length;n++)(o=this.aa[n])&&o.stroke(this.g("connectorStroke"));this.B(4096),this.B(8192),this.I(16)}if(this.J(8192)){for(this.Db().O()||this.Db().O(this.Na),this.Db().clear(),i.reset();i.advance();)this.gq(this.state.Gc|t.nx(this.state,i.ma()));this.Db().W(),this.I(8192)}if(this.J(4096)){for(this.labels().O()||this.labels().O(this.Na),this.labels().clear(),this.ba&&this.ba.clear(),n=x(this)?this.oa.insideLabels:this.oa.outsideLabels,this.labels().Kq(n.autoColor),this.labels().disablePointerEvents(n.disablePointerEvents),x(this)||(this.ea=t.L(this.g("connectorLength"),(e.width-this.G)/2),0>this.ea&&(this.ea=5),this.ba?this.ba.clear():(this.ba=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ba.parent(this.Na),this.ba.zIndex(32)),this.ba.clip(e),this.aa=[]),i.reset();i.advance();)x(this)&&i.j("labelWidthForced",void 0),this.ke(this.state.Gc|t.nx(this.state,i.ma()));p(this),this.labels().W(),this.labels().Vd().clip(e),this.I(4096)}}},t.g.UL=function(){var n=t.wr(this,"animation");if(n&&n.g("enabled")&&0<n.g("duration"))if(this.Og&&1==this.Og.dc)this.Og.update();else if(this.J(2048)){t.qd(this.Og),this.Og=new t.bC;var s=n.g("duration");n=s*(1-.85),s=new e(this,.85*s),n=new i(this,n),this.Og.add(s),this.Og.add(n),this.Og.wa("begin",(function(){this.bj=this.g("connectorStroke"),this.ta("connectorStroke","none"),t.vx(this,!0),t.Dp(this,{type:"animationstart",chart:this})}),!1,this),this.Og.wa("end",(function(){this.ta("connectorStroke",this.bj),t.vx(this,!1),t.Dp(this,{type:"animationend",chart:this})}),!1,this),this.Og.play(!1)}},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget);return e.pointIndex=t.N(i.index),e},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.ce=function(e){var i,n=new t.EA(this,e);return this.$().select(e)&&n.iy()&&!r(i=n.get("value"))&&(e=t.Tm(i/this.Rg("sum")*100,2),n.La("percentValue",e),n.La("yPercentOfTotal",e)),n},t.g.oq=function(){return[]},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Md=function(e){var i;if((i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()){var n;for(n=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.vo,n),(e=this.$()).reset();e.advance();)this.ke(t.nx(this.state,e.ma()));p(this),L(this)}},t.g.$i=function(e,i){if(!this.enabled())return this;if(t.A(e)){for(var n=t.sx(this.state,t.vo),s=0;s<n.length;s++)t.Aa(e,n[s])||this.state.Vh(t.vo,n[s]);for(t.qx(this.state,e),t.p(i)&&this.GK(i),n=this.Ec();n.advance();)this.ke(t.nx(this.state,n.ma()));p(this)}else if(t.ea(e)&&(this.Md(),t.qx(this.state,e),t.p(i)&&this.GK(i),this.f)){for(n=this.Ec();n.advance();)this.ke(t.nx(this.state,n.ma()));p(this,this.labels().be(e))}return this.$().select(e[0]||e),this},t.g.Zk=function(){this.enabled()&&(this.state.Lh(t.vo),p(this,null))},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.Gu=function(){this.enabled()&&(L(this),this.state.Lh(t.wo),p(this,null))},t.g.Ii=function(e,i){if(!this.enabled())return this;var n=!(i&&i.shiftKey);if(t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,n?t.vo:void 0)):t.ea(e)&&this.state.Lh(t.wo,e,n?t.vo:void 0),this.f){for(n=this.Ec();n.advance();)this.ke(t.nx(this.state,n.ma()));var s;t.ea(e)&&(s=this.labels().be(e)),p(this,s)}return this.$().select(e[0]||e),this},t.g.ie=function(e){if(this.enabled()){var i;for(i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i),(e=this.$()).reset();e.advance();)this.ke(t.nx(this.state,e.ma()));p(this)}},t.g.pk=function(t,e){return s(this,t),a(this,t),this.gq(t),e},t.g.pq=t.ia,t.g.wm=t.ia,t.g.ml=function(t){this.ke(t),s(this,t),a(this,t),this.gq(t)};var F={};t.rq(F,0,"baseWidth",t.Cq),t.rq(F,0,"neckHeight",t.Cq),t.rq(F,0,"neckWidth",t.Cq),t.rq(F,0,"pointsPadding",t.Cq),t.rq(F,0,"reversed",t.Cq),t.rq(F,0,"overlapMode",t.Uk),t.rq(F,0,"connectorLength",t.Cq),t.rq(F,1,"connectorStroke",t.Pq),t.U(n,F),t.g=n.prototype,t.g.sc=function(e,i,n,s,a,o,r){return a=0==i?this.ca:1==i?this.za:this.Ea,r?e=a.g(e):(r=n.get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),a.g(e))),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){return t.Yb(this.ve().nc(this.$().ma())||"diagonal-brick")},t.g.Yi=function(){var t=this.$();return{index:t.ma(),sourceHatchFill:this.Eh(),iterator:t}},t.g.Ge=function(t){var e=this.$();return{index:e.ma(),sourceColor:t||this.cc().nc(e.ma())||"blue",iterator:e}},t.g.labels=function(e){return t.p(e)?(this.ca.labels(e),this):this.ca.labels()},t.g.de=function(e){var i=0,n=0;t.X(e,1)&&(i|=4096,n|=1),t.X(e,8)&&(i|=4100,n|=9),this.B(i,n)},t.g.ke=function(e){var i=this.$(),n=!!(e&t.wo),s=!n&&!!(e&t.vo),a=i.get("normal");a=t.p(a)?a.label:void 0;var o=i.get("hovered");o=t.p(o)?o.label:void 0;var r=i.get("selected");r=t.p(r)?r.label:void 0,a=t.Zo(a,i.get("label")),o=s?t.Zo(o,i.get("hoverLabel")):null,r=n?t.Zo(r,i.get("selectLabel")):null;var l,h=i.ma(),c=null,d=this.lb().labels(),p=this.selected().labels();n?c=l=p:s?c=l=d:l=this.labels();var g=this.labels().be(h),f=a&&t.p(a.enabled)?a.enabled:null,m=o&&t.p(o.enabled)?o.enabled:null,v=r&&t.p(r.enabled)?r.enabled:null;if(d=s||n?s?null===m?null===d.enabled()?null===f?this.labels().enabled():f:d.enabled():m:null===v?null===p.enabled()?null===f?this.labels().enabled():f:p.enabled():v:null===f?this.labels().enabled():f,f=u(this,null,e),m=this.Ic(),p=x(this),v=!0,!s&&!n&&p&&"no-overlap"==this.g("overlapMode")){l=l.yl(m,f,a,h);var b,y=[(v=this.$()).j("x1"),v.j("y1"),v.j("x2"),v.j("y1"),v.j("x4"),v.j("y2"),v.j("x3"),v.j("y2")],S=!0,w=0;for(b=y.length;w<b-1;w+=2){var C=w==b-2?0:w+2,T=w==b-2?1:w+3,D=y[w],k=y[w+1],$=y[C],P=y[T],L=l[w],I=l[w+1];C=l[C],T=l[T],v.j("y3")&&4==w&&(k=t.N(v.j("y3")),P=t.N(v.j("y3"))),D==$&&($+=.01),S=(S=S&&1==t.cn(D,k,$,P,L,I))&&1==t.cn(D,k,$,P,C,T)}v=S}return d&&v?(g?(g.Hi(),g.Hf(m),g.jc(f)):g=this.labels().add(m,f,h),t.$u(g,c),g.td(a,s?o:r),i.j("labelWidthForced")&&(g.width(t.N(i.j("labelWidthForced"))),i=o&&o.anchor?o.anchor:null,r=r&&r.anchor?r.anchor:null,a&&a.anchor&&a.anchor||i||r||(f=u(this,g,e),g.jc(f))),g.W(),(s||n)&&!g.O()&&this.labels().Vd()&&(g.O(this.labels().Vd()),g.O().parent()||g.O().parent(this.labels().O()),g.W())):g&&g.clear(),d&&!p&&O(this,g,e),g},t.g.Db=function(e){return t.p(e)?(this.ca.Db(e),this):this.ca.Db()},t.g.Mn=function(e){t.X(e,1)&&this.B(8192,1)},t.g.Zv=function(){var e=t.cm("fill",1,!1)(this,t.gm,!0,!0);return t.Ul(e,1,!0)},t.g.qy=function(){return t.Ql(this.Zv())},t.g.gq=function(e){var i=this.$(),n=!!(e&t.wo);e=!n&&!!(e&t.vo);var s=i.get("normal");s=t.p(s)?s.marker:void 0;var a=i.get("hovered");a=t.p(a)?a.marker:void 0;var o=i.get("selected");o=t.p(o)?o.marker:void 0,s=t.Zo(s,i.get("marker")),a=t.Zo(a,i.get("hoverMarker")),o=t.Zo(o,i.get("selectMarker"));var r=this.$().ma(),l=this.lb().Db(),h=this.selected().Db();i=n?h:e?l:this.Db();var c=this.Db().jp(r),u=s&&t.p(s.enabled)?s.enabled:null,d=a&&t.p(a.enabled)?a.enabled:null,p=o&&t.p(o.enabled)?o.enabled:null;if(e||n?e?null===d?null===l.enabled()?null===u?this.Db().enabled():u:l.enabled():d:null===p?null===h.enabled()?null===u?this.Db().enabled():u:h.enabled():p:null===u?this.Db().enabled():u){u=s&&s.position?s.position:null,d=a&&a.position?a.position:null,p=o&&o.position?o.position:null,u=function(e,i){i=t.Dk(i);var n=e.f,s=e.$(),a=s.j("point").rb(),o=s.j("x1"),r=s.j("y1");switch(i){case"left-top":r=s.j("y1"),o=s.j("x1");break;case"left-center":r+=a.height/2,s=P(e,r),o=e.b-s/2,o+=n.left;break;case"left-bottom":r+=a.height,o=s.j("x3");break;case"center-top":o=e.b,o+=n.left;break;case"center":r+=a.height/2,P(e,r),o=e.b,o+=n.left;break;case"center-bottom":r+=a.height,P(e,r),o=e.b,o+=n.left;break;case"right-top":o+=s=P(e,r);break;case"right-center":r+=a.height/2,s=P(e,r),o=e.b+s/2,o+=n.left;break;case"right-bottom":o=s.j("x4"),r+=a.height}return{value:{x:o,y:r}}}(this,u=e&&(d||l.g("position"))||n&&(p||h.g("position"))||u||this.Db().g("position")),c?c.jc(u):c=this.Db().add(u,r);var g={};u="position anchor offsetX offsetY type size fill stroke enabled".split(" "),s&&(0,t.Pe)(u,(function(t){t in s&&(g[t]=s[t])})),u=s&&s.type,r=t.p(u)?u:this.Db().Ma()||this.Nf().nc(r),u=a&&a.type,u=t.p(u)?u:l.Ma(),d=o&&o.type,d=t.p(d)?d:h.Ma(),g.type=n&&t.p(d)?d:e&&t.p(u)?u:r,r=s&&s.fill,r=t.p(r)?r:this.Db().Tm()||this.Zv(),u=a&&a.fill,u=t.p(u)?u:l.Tm(),d=o&&o.fill,d=t.p(d)?d:h.Tm(),g.fill=n&&t.p(d)?d:e&&t.p(u)?u:r,r=s&&s.stroke,r=t.p(r)?r:this.Db().gk()||this.qy(),u=a&&a.stroke,l=t.p(u)?u:l.gk()||this.qy(),u=o&&o.stroke,h=t.p(u)?u:h.gk()||this.qy(),g.stroke=n&&t.p(h)?h:e&&t.p(l)?l:r,c.Hi(),t.gy(c,i),c.td(g,e?a:o),c.W()}else c&&c.clear()},t.g.xL=function(){var e=new t.ww(0);return t.W(this,"tooltip",e),e.ya(this),t.K(e,this.Bp,this),e},t.g.Bp=function(){this.Ua().W()},t.g.GK=function(e){var i=t.wr(this,"legend");if(!e||!i||e.target!=i){i=this.Ua();var n=this.Ic();e&&(t.Ow(i,e.clientX,e.clientY,n),this.wa("mousemove",this.GK))}},t.g.pb=function(){if(this.J(16384)){this.hJ();for(var e,i=this.data().$(),n=0,s=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=0;i.advance();)e=i.get("value"),r(e)?n++:(e=r(e)?0:t.N(e),s=Math.min(e,s),a=Math.max(e,a),o+=e);var l;(i=i.Hb()-n)?l=o/i:s=a=o=l=void 0,this.La("count",i),this.La("min",s),this.La("max",a),this.La("sum",o),this.La("average",t.Tm(l||window.NaN,t.Um(o||0))),this.I(16384)}},t.g.Ic=function(){var e=this.$();return this.oe||(this.oe=new t.Fw),this.oe.lg(e).Li([this.ce(e.ma()),this]),e={x:{value:e.get("x"),type:"string"},value:{value:e.get("value"),type:"number"},name:{value:e.get("name"),type:"string"},index:{value:e.ma(),type:"number"},chart:{value:this,type:""}},t.ov(this.oe,e),this.oe},t.g.Rk=function(){return this.Ic()},t.g.Ol=function(e,i){for(var n,s=[],a=this.$().reset();a.advance();){n=a.ma();var o=a.get("legendItem")||{},r=null;t.D(i)&&((r=this.Ic()).b=this.ce(n),r=i.call(r,r)),t.z(r)||(r=String(t.p(a.get("name"))?a.get("name"):a.get("x")));var l=t.cm("fill",1,!1),h=t.cm("stroke",2,!1),c=t.cm("hatchFill",3,!1);r={enabled:!0,meta:{pointIndex:n,pointValue:a.get("value"),X:this},iconType:"square",text:r,iconStroke:h(this,t.gm,!1),iconFill:l(this,t.gm,!1),iconHatchFill:c(this,t.gm,!1)},t.Sc(r,o),r.sourceUid=t.oa(this),r.sourceKey=n,s.push(r)}return s},t.g.Ms=function(){return!0},t.g.zr=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.wq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.vq=function(e,i){var n=e.Ki();e&&null==n&&!(0,window.isNaN)(n)||(n=t.so(i.domTarget))&&(n.X=this)},t.g.ej=function(){return null},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.yj=function(){return!this.$().Hb()},t.g.F=function(){var e=n.u.F.call(this);return e.data=this.data().F(),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),e.markerPalette=this.Nf().F(),e.tooltip=this.Ua().F(),t.Tq(this,F,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),{chart:e}},t.g.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,F,e),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.data(e.data),this.ve(e.hatchFillPalette),this.Nf(e.markerPalette),this.cc(e.palette),"tooltip"in e&&this.Ua().ga(!!i,e.tooltip)},t.g.R=function(){t.sd(this.Og,this.ca,this.za,this.Ea,this.Yc,this.i,this.P,this.Fa,this.fd,this.He,this.ue,this.o,this.ba),this.P=this.i=this.Yc=this.Ea=this.za=this.ca=this.Og=null,delete this.sd,this.ba=this.o=this.ue=this.He=this.fd=this.Fa=null,n.u.R.call(this)},I.prototype.iC=function(e){this.labels.push(e),this.ya.g("reversed")?t.Pa(this.labels,(function(t,e){return t.ma()-e.ma()})):t.Pa(this.labels,(function(t,e){return e.ma()-t.ma()}))},I.prototype.clear=function(){this.labels.length=0},I.prototype.rd=function(e,i){var n=!!(i&t.wo),s=!n&&!!(i&t.vo),a=this.ya.data().get(e.ma(),"label");return s=s?this.ya.data().get(e.ma(),"hoverLabel"):null,n=(n?this.ya.data().get(e.ma(),"selectLabel"):null)||s||a||{},this.ya.data().j(e.ma(),"labelWidthForced")&&((n=t.Qc(n)).width=e.width()),this.ya.$().select(e.ma()),e.Hf(this.ya.Ic()),n=this.ya.labels().yl(e.Hf(),e.jc(),n),t.mn(n)},n.prototype.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},n.prototype.qA=function(){return["name","value"]};var M=n.prototype;M.data=M.data,M.getType=M.Ma,M.palette=M.cc,M.tooltip=M.Ua,M.hatchFillPalette=M.ve,M.markerPalette=M.Nf,M.labels=M.labels,M.markers=M.Db,M.hover=M.Tj,M.unhover=M.Md,M.select=M.select,M.unselect=M.ie,M.getPoint=M.ce,M.normal=M.Qa,M.hovered=M.lb,M.selected=M.selected,t.Tp.funnel=E,t.Tp.pyramid=G,t.E("anychart.funnel",E),t.E("anychart.pyramid",G)}.call(this,$)),_.theme_color_scales||(_.theme_color_scales=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{defaultColorRange:{enabled:!1,stroke:"#B9B9B9",orientation:"bottom",title:{enabled:!1},colorLineSize:10,padding:{top:10,right:0,bottom:0,left:0},margin:0,align:"center",length:"50%",marker:{padding:3,positionFormatter:t.wN,enabled:!0,disablePointerEvents:!1,position:"center",rotation:0,anchor:"center",offsetX:0,offsetY:0,type:"triangle-down",fill:"#333 0.85",stroke:"none",size:7},labels:{offsetX:0,offsetY:0,fontSize:11,padding:0},ticks:{stroke:"#B9B9B9",position:"outside",length:5,enabled:!0},minorTicks:{stroke:"#B9B9B9",position:"outside",length:3,enabled:!1}},defaultOrdinalColorScale:{inverted:!1,ticks:{maxCount:100},autoColors:function(e){return t.Nl("#90caf9","#01579b",e)}},defaultLinearColorScale:{maxTicksCount:1e3,colors:["#90caf9","#01579b"],minimumGap:0,maximumGap:0}}),t.ra(t.fa.anychart.themes.defaultTheme.standalones,{colorRange:{enabled:!0,zIndex:50}})}.call(this,$)),_.theme_sunburst||(_.theme_sunburst=1,function(t){var e=function(){var e=this.chart.calculationMode();return this.name+("parent-dependent"==e||"parent-independent"==e?"\n"+t.vN(this.value):"")};t.ra(t.fa.anychart.themes.defaultTheme,{sunburst:{animation:{duration:2e3},title:{text:"Sunburst Chart"},interactivity:{selectionMode:"drill-down"},radius:"45%",innerRadius:0,startAngle:0,a11y:{titleFormat:t.ON},center:{fill:"none",stroke:"none"},calculationMode:"ordinal-from-root",tooltip:{enabled:!0,title:!1,separator:!1,titleFormat:t.xN,format:e},leaves:{enabled:null,normal:{labels:{padding:"10%",hAlign:"center",position:"radial",format:t.xN}}},sort:"none",normal:{fill:t.zN,stroke:"#fff",labels:{adjustFontSize:[!0,!0],maxFontSize:14,minFontSize:1,padding:[1,"5%",1,"5%"],enabled:!0,hAlign:"center",vAlign:"middle",position:"circular",anchor:"center",fontColor:"#ffffff",format:e}},hovered:{fill:t.FN,stroke:t.zN,labels:{enabled:null}},selected:{fill:"#333 0.85",stroke:t.zN,labels:{enabled:null}}}})}.call(this,$)),_.pert||(_.pert=1,function(t){var e=function(e){return t.zk(y,e,"circle")},i=function(){t.V.call(this),this.Xb=this.Y=this.JN=this.gb=null,t.T(this.ua,[["color",0,8192]]);var e={};t.T(e,[["fill",0,8192],["stroke",0,8192],["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsFactoryConstructor",t.oy),this.ca.ta("labelsAfterInitCallback",this.UD),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",this.UD),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",this.UD)},n=function(e){var i=e.Ua().F(),n=e.Ua().g("titleFormat");return e=e.Ua().g("format"),n&&n!=t.ep&&(i.titleFormat=n),e&&e!=t.ep&&(i.format=e),i},s=function(){i.call(this),this.Ga("milestones"),t.T(this.ua,[["size",0,1],["shape",0,1]])},a=function(){i.call(this),this.Ga("tasks"),t.uy(this.ca,[["dummyFill",0,8192],["dummyStroke",0,8192],["lowerLabels",0,0],["upperLabels",0,0]]),this.ca.ta("lowerLabelsAfterInitCallback",this.UD),this.za.ta("lowerLabelsAfterInitCallback",this.UD),this.Ea.ta("lowerLabelsAfterInitCallback",this.UD)},o=function(){t.V.call(this),this.Ga("criticalPath"),this.Kk=this.hk=null},r=function(){t.Bx.call(this),this.Ga("pert"),this.la=null,this.b={},this.o={},this.f=[],this.Sb=[],this.Za=[],this.Ha=this.ba=this.i=null,this.ea=[],this.D={},this.Ka=this.Kk=this.hk=this.na=this.Lf=this.$a=this.fb=this.aa=this.Ba=null,this.P=[],this.K=[],this.G={},this.Ca=[],this.Uc=this.sb=0,this.ec=[],this.gb=this.qc=null,t.su(this,this,this.If,this.hg,this.Mda,this.If,null,this.Sj),t.T(this.ua,[["expectedTimeCalculator",8192,1],["verticalSpacing",4,1],["horizontalSpacing",4,1]])},l=function(e,i,n){var s=e.Ua(),a=!0;t.da(e.qc.enabled)&&(a=e.qc.enabled),s.N(e.qc),i&&t.da(i.enabled)&&(a=i.enabled),s.N(i),n&&t.da(n.enabled)&&(a=n.enabled),s.N(n),s.enabled(a)},h=function(t){if(t.o={},t.Sb.length&&t.Za.length)for(var e=0;e<t.Sb.length;e++)c(t,String(t.Sb[e].get("id")));for(var i in e=0,t.o){var n=t.o[i];n.nP||(e+=n.JY)}t.La("pertChartCriticalPathStandardDeviation",Math.sqrt(e)),t.I(8192)},c=function(e,i){var n,s=e.b[i];if(!(i in e.o)){e.o[i]={};var a=Number(s.item.get("optimistic")),o=Number(s.item.get("pessimistic"));e.o[i].JY=t.Tm(Math.pow((o-a)/6,2),3)}if(a=e.o[i],t.p(a.duration)||(o=e.Ic(!1,s,a),a.duration=t.Tm(e.g("expectedTimeCalculator").call(o,o),3)),o=a.duration,!t.p(a.qT)){var r=0;for(n=0;n<s.Hk.length;n++){var l=String(s.Hk[n].get("id")),h=e.o[l];t.p(h)&&t.p(h.lA)||c(e,l),r=Math.max(r,e.o[l].lA)}a.qT=t.Tm(r,3),a.lA=t.Tm(r+o,3)}if(!t.p(a.VV)){if(s.gj.length)for(r=window.Infinity,n=0;n<s.gj.length;n++)l=String(s.gj[n].get("id")),h=e.o[l],t.p(h)&&t.p(h.MN)||c(e,l),r=Math.min(r,e.o[l].MN);else{for(r=-window.Infinity,n=0;n<e.Za.length;n++)s=String(e.Za[n].get("id")),l=e.o[s],t.p(l)&&t.p(l.lA)||c(e,s),r=Math.max(r,e.o[s].lA);e.La("pertChartProjectDuration",r)}a.VV=t.Tm(r,3),a.MN=t.Tm(r-o,3),a.nP=t.Tm(r-a.lA,3)}},u=function(e,i){e!=i&&(t.Ba(e.Ar,i),t.Ba(i.Em,e))},d=function(e,i,n,s){return i={label:s||"",id:"",gj:[],Hk:[],Em:[],Ar:[],level:-1,ff:!1,left:0,top:0,My:n,pG:i,yn:!1,Rm:!1,bk:[],index:-1},n="m"+t.oa(i),e.D[n]=i,i.id=n,i},p=function(e,i,n){var s={from:i,Je:n,yn:!1,Rm:!1,pz:null,id:"",ff:!1},a="e"+t.oa(s);return s.id=a,e.G[a]=s,t.Ba(i.bk,s),t.Ba(n.bk,s),s},g=function(t,e){var i,n,s=[];for(i in t.G){var a=t.G[i];if(!a.Rm&&a.yn==e){a.yn=!e;var o={TJ:{},bk:{}};o.TJ[a.from.id]=a.from,o.TJ[a.Je.id]=a.Je,o.bk[a.id]=a;var r=[];for(a.from.Rm||a.from.yn!=e||(a.from.yn=!e,r.push(a.from)),a.Je.Rm||a.Je.yn!=e||(a.Je.yn=!e,r.push(a.Je));r.length;){var l=r.pop();for(n=0;n<l.bk.length;n++)if(!(a=l.bk[n]).Rm&&a.yn==e){a.yn=!e,o.bk[a.id]=a;var h=a.from==l?a.Je:a.from;h.Rm||h.yn!=e||(h.yn=!e,r.push(h)),o.TJ[h.id]=h}}s.push(o)}a.yn=!e}for(i in t.D)t.D[i].yn=!e;return s},f=function(t,e){var i,n,s,a=null,o=window.Infinity;for(i=0;i<t.length;i++){var r=t[i],l=0,h=-1;for(n=0;n<e.length;n++){var c=e[n],u=!0;for(s in r.TJ){var d=r.TJ[s];if(d.Rm&&0>c.indexOf(d)){u=!1;break}}if(u&&(0>h&&(h=n),++l>=o))break}if(!l)throw"non planar!";l<o&&(a=[i,h],o=l)}return a},m=function(e,i,n,s){var a=Math.atan((s-i)/(n-e)),o=Math.atan(.3);return i=a-o,a+=o,[n-(e=t.gn(0,0,3,10))*Math.cos(i),s-e*Math.sin(i),n-e*Math.cos(a),s-e*Math.sin(a)]},v=function(e,i){return t.da(e.enabled())?e.enabled():i},b=function(){var e=new r;return e.ga(!0,t.nm("pert")),e},y={rQ:"circle",vra:"rhombus",q9:"rectangle"};t.H(i,t.V),t.Gq(i,["fill","stroke","labels"],"normal"),i.prototype.ra=28672|t.V.prototype.ra,i.prototype.sa=t.V.prototype.sa;var S={};t.rq(S,1,"color",t.Qq),t.U(i,S),t.g=i.prototype,t.g.g=t.ir,t.g.iH=function(e){var i=this.parent();return i?i[e&t.wo?"selected":e&t.vo?"hovered":"normal"]():null},t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.parent=function(e){return t.p(e)?(this.Y!=e&&(null===e?(t.kr(this.Y,this.Tc,this),this.Y=null):(this.Y&&t.kr(this.Y,this.Tc,this),this.Y=e,this.Ua().df().parent(this.Y.Ua()),t.K(this.Y,this.Tc,this))),this):this.Y},t.g.Tc=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=4,n|=8),t.X(e,32768)&&(i|=1,n|=1),this.Xb=null,this.B(i,n)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.Xv=function(t,e){return this.Fp("fill",t,e)},t.g.nr=function(t,e){return this.Fp("stroke",t,e)},t.g.Fp=function(e,i,n){return e=(0==i?this.ca:1==i?this.za:this.Ea).g(e),t.D(e)&&(n.sourceColor=this.g("color"),e=e.call(n)),e},t.g.UD=function(e){t.K(e,this.Kn,this)},t.g.Kn=function(){this.va(4096)},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),t.W(this,"tooltip",this.gb),t.K(this.gb,this.Bp,this)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.Bp=function(){this.va(16384)},t.g.TA=function(e){return t.p(e)?(this.JN!=e&&(this.JN=e,this.ca.labels().O(this.JN)),this):this.JN},t.g.wi=function(){return this.ca.labels().W(),this},t.g.oL=function(){return this.ca.labels().clear(),this},t.g.F=function(){var e=i.u.F.call(this);return t.Tq(this,S,e,"Pert visual element"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F(),e},t.g.U=function(e,n){i.u.U.call(this,e,n),t.Iq(this,S,e),this.ca.ga(!!n,e),this.ca.ga(!!n,e.normal),this.za.ga(!!n,e.hovered),this.Ea.ga(!!n,e.selected),"tooltip"in e&&this.Ua().ga(!!n,e.tooltip)},t.g.R=function(){t.sd(this.gb),i.u.R.call(this)};var x=i.prototype;x.tooltip=x.Ua,x.normal=x.Qa,x.hovered=x.lb,x.selected=x.selected,t.H(s,i),s.prototype.ra=1|i.prototype.ra;var w,C=(w={},t.sq(w,[[0,"size",function(e){return t.yo(e,80)||0}],[0,"shape",e]]),w);t.U(s,C),s.prototype.F=function(){var e=s.u.F.call(this);return t.Tq(this,C,e),e},s.prototype.U=function(e,i){s.u.U.call(this,e,i),t.Iq(this,C,e)},t.H(a,i),t.Gq(a,["dummyFill","dummyStroke","lowerLabels","upperLabels"],"normal"),a.prototype.ra=i.prototype.ra,a.prototype.TA=function(t){return a.u.TA.call(this,t),(t=a.u.TA.call(this))&&this.ca.Ck().O(t),t},a.prototype.wi=function(){return this.ca.Ck().W(),a.u.wi.call(this)},a.prototype.oL=function(){return this.ca.Ck().clear(),a.u.oL.call(this)},t.H(o,t.V),t.g=o.prototype,t.g.ra=12289|t.V.prototype.ra,t.g.Wc=function(e){return this.hk||(this.hk=new s,t.W(this,"milestones",this.hk)),t.p(e)?(this.hk.N(e),this):this.hk},t.g.Nc=function(e){return this.Kk||(this.Kk=new a,t.W(this,"tasks",this.Kk)),t.p(e)?(this.Kk.N(e),this):this.Kk},t.g.F=function(){var t=o.u.F.call(this);return t.tasks=this.Nc().F(),t.milestones=this.Wc().F(),t},t.g.U=function(t,e){o.u.U.call(this,t,e),"milestones"in t&&this.Wc().U(t.milestones,e),"tasks"in t&&this.Nc().U(t.tasks,e)};var T=o.prototype;T.tasks=T.Nc,T.milestones=T.Wc,t.H(r,t.Bx),t.g=r.prototype,t.g.ra=t.Bx.prototype.ra,t.g.sa=61440|t.Bx.prototype.sa,t.g.Ma=function(){return"pert"},t.g.Ic=function(e,i,n,s){this.i&&!e||(this.i=new t.Fw),e={};var a=null;if(i){e.item={value:i.item,type:""},a=i.item,e.name={value:i.item.get("name"),type:"string"};var o=i.item.get("pessimistic");t.p(o)&&(e.pessimistic={value:+o,type:"number"}),o=i.item.get("optimistic"),t.p(o)&&(e.optimistic={value:+o,type:"number"}),o=i.item.get("mostLikely"),t.p(o)&&(e.mostLikely={value:+o,type:"number"}),o=i.item.get("duration"),t.p(o)&&(e.duration={value:+o,type:"number"}),e.successors={value:i.gj,type:""},e.predecessors={value:i.Hk,type:""},e.isCritical={value:i.ff,type:"string"}}return n&&(e.earliestStart={value:n.qT,type:"number"},e.earliestFinish={value:n.lA,type:"number"},e.latestStart={value:n.MN,type:"number"},e.latestFinish={value:n.VV,type:"number"},t.p(e.duration)||(e.duration={value:n.duration,type:"number"}),e.slack={value:n.nP,type:"number"},e.variance={value:n.JY,type:"number"}),s&&(e.successors={value:s.gj,type:""},e.predecessors={value:s.Hk,type:""},e.isCritical={value:s.ff,type:"string"},s.pG&&(e.creator={value:s.pG.item,type:""}),e.isStart={value:s.My,type:"string"},e.index={value:s.index,type:"number"}),this.i.Li([this]).lg(a),t.ov(this.i,e)},t.g.xL=function(){var e=new t.ww(0);return e.ya(this),t.K(e,this.Bp,this),e},t.g.Bp=function(){this.Ua().W()},t.g.data=function(e,i,n){return t.p(e)?(t.J(e,t.au)||t.J(e,t.Yt)?this.la!=e&&(this.la&&t.kr(this.la,this.dd,this),this.la=e):(this.la&&t.kr(this.la,this.dd,this),this.la=new t.au(e,i,n)),t.K(this.la,this.dd,this),this.B(4352,1),this):this.la},t.g.az=function(){this.Ta().gr()&&this.B(-6145,9)},t.g.dd=function(){this.B(4356,1)},t.g.Ol=function(){return[]},t.g.Ue=function(){return[]},t.g.If=function(e){var i=e.domTarget,s=this.Ua(),a=i.tag,o=!0;if(a)if(null!=a.m){var r=a.m;a=this.Ic(!0,void 0,void 0,r);var h=r.ff?this.Me().Wc():this.Wc(),c=r.Ve?t.wo:t.vo;o=h.Xv(c,a),h=h.nr(c,a),i.fill(o).stroke(h),o=!1,i=r.ff?n(this.Me().Wc()):void 0,s.ka(),l(this,n(this.Wc()),i),t.Ow(s,e.clientX,e.clientY,a),s.da(!0),(e=r.oX)&&(i=!0,s=this.Wc().Qa().labels(),e.td(s.$d()),i=v(s,i),r.Ve?(s=this.Wc().selected().labels(),e.td(s.$d()),i=v(s,i)):(s=this.Wc().lb().labels(),e.td(s.$d()),i=v(s,i)),r.ff&&(s=this.Me().Wc().Qa().labels(),e.td(s.$d()),i=v(s,i),r.Ve?(s=this.Me().Wc().selected().labels(),e.td(s.$d()),i=v(s,i)):(s=this.Me().Wc().lb().labels(),e.td(s.$d()),i=v(s,i))),e.enabled(i),e.W())}else null!=a.w&&(r=a.w,i=this.o[r.id],a=this.Ic(!0,r,i,void 0),c=r.Ve?t.wo:t.vo,o=(h=r.ff?this.Me().Nc():this.Nc()).Xv(c,a),h=h.nr(c,a),r.pX.stroke(h),r.X_.fill(o).stroke(h),h=r.DY,o=r.aW,h&&(i=!0,c=this.Nc().Qa().Jm(),h.td(c.$d()),i=v(c,i),r.Ve?(c=this.Nc().selected().Jm(),h.td(c.$d()),i=v(c,i)):(c=this.Nc().lb().Jm(),h.td(c.$d()),i=v(c,i)),r.ff&&(c=this.Me().Nc().Qa().Jm(),h.td(c.$d()),i=v(c,i),r.Ve?(c=this.Me().Nc().selected().Jm(),h.td(c.$d()),i=v(c,i)):(c=this.Me().Nc().lb().Jm(),h.td(c.$d()),i=v(c,i))),h.enabled(i),h.W()),o&&(i=!0,h=this.Nc().Qa().Ck(),o.td(h.$d()),i=v(h,i),r.Ve?(h=this.Nc().selected().Ck(),o.td(h.$d()),i=v(h,i)):(h=this.Nc().lb().Ck(),o.td(h.$d()),i=v(h,i)),r.ff&&(h=this.Me().Nc().Qa().Ck(),o.td(h.$d()),i=v(h,i),r.Ve?(h=this.Me().Nc().selected().Ck(),o.td(h.$d()),i=v(h,i)):(h=this.Me().Nc().lb().Ck(),o.td(h.$d()),i=v(h,i))),o.enabled(i),o.W()),o=!1,i=r.ff?n(this.Me().Nc()):void 0,s.ka(),l(this,n(this.Nc()),i),t.Ow(s,e.clientX,e.clientY,a),s.da(!0));o&&this.Ua().Lc()},t.g.hg=function(e){var i=e.domTarget;if(e=i.tag)if(null!=e.m){var n=e.m;e=n.ff?this.Me().Wc():this.Wc();var s=this.Ic(!0,void 0,void 0,n),a=n.Ve?t.wo:t.gm,o=e.Xv(a,s);if(s=e.nr(a,s),a=n.oX){e=!0;var r=this.Wc().Qa().labels();a.td(r.$d()),e=v(r,e),n.Ve&&(r=this.Wc().selected().labels(),a.td(r.$d()),e=v(r,e)),n.ff&&(r=this.Me().Wc().Qa().labels(),a.td(r.$d()),e=v(r,e),n.Ve&&(n=this.Me().Wc().selected().labels(),a.td(n.$d()),e=v(n,e))),a.enabled(e),a.W()}i.fill(o).stroke(s)}else null!=e.w&&(i=e.w,s=this.Ic(!0,i,this.o[i.id],void 0),a=i.Ve?t.wo:t.gm,o=(e=i.ff?this.Me().Nc():this.Nc()).Xv(a,s),s=e.nr(a,s),i.pX.stroke(s),i.X_.fill(o).stroke(s),n=i.DY,o=i.aW,n&&(e=!0,s=this.Nc().Qa().Jm(),n.td(s.$d()),e=v(s,e),i.Ve&&(s=this.Nc().selected().Jm(),n.td(s.$d()),e=v(s,e)),i.ff&&(s=this.Me().Nc().Qa().Jm(),n.td(s.$d()),e=v(s,e),i.Ve&&(s=this.Me().Nc().selected().Jm(),n.td(s.$d()),e=v(s,e))),n.enabled(e),n.W()),o&&(e=!0,n=this.Nc().Qa().Ck(),o.td(n.$d()),e=v(n,e),i.Ve&&(n=this.Nc().selected().Ck(),o.td(n.$d()),e=v(n,e)),i.ff&&(n=this.Me().Nc().Qa().Ck(),o.td(n.$d()),e=v(n,e),i.Ve&&(i=this.Me().Nc().selected().Ck(),o.td(i.$d()),e=v(i,e))),o.enabled(e),o.W()))},t.g.Mda=function(e){var i,n,s=e.metaKey||e.ctrlKey,a=e.domTarget,o=a.tag;if(t.J(e.target,t.Pu)&&(o=e.target.be(e.labelIndex).tag),t.J(a,t.ig)){if(o&&(null!=o.m?i=o.m:null!=o.w&&(n=o.w)),i||n)if(s)i&&(i.Ve=!i.Ve,i.Ve?t.Ba(this.K,i):t.Fa(this.K,i)),n&&(n.Ve=!n.Ve,n.Ve?t.Ba(this.P,n):t.Fa(this.P,n));else{for(e=0;e<this.K.length;e++)this.K[e].Ve=!1;for(e=0;e<this.P.length;e++)this.P[e].Ve=!1;this.K.length=0,this.P.length=0,i&&(i.Ve=!0,this.K.push(i)),n&&(n.Ve=!0,this.P.push(n))}else{for(e=0;e<this.K.length;e++)this.K[e].Ve=!1;for(e=0;e<this.P.length;e++)this.P[e].Ve=!1;this.K.length=0,this.P.length=0}this.dispatchEvent(function(t){var e,i={type:"pointsselect",selectedTasks:[],selectedMilestones:[]};for(e=0;e<t.P.length;e++){var n=t.P[e],s=t.o[n.id];n={item:n.item,name:n.item.get("name"),successors:n.gj,predecessors:n.Hk,earliestStart:s.qT,earliestFinish:s.lA,latestStart:s.MN,latestFinish:s.VV,duration:s.duration,slack:s.nP,variance:s.JY},i.selectedTasks.push(n)}for(e=0;e<t.K.length;e++)s={successors:(n=t.K[e]).gj,predecessors:n.Hk,isCritical:n.ff,isStart:n.My},n.pG&&(s.creator=n.pG.item),i.selectedMilestones.push(s);return i}(this)),this.B(32768,1)}};var D=function(){var e={};return t.rq(e,0,"expectedTimeCalculator",t.Cq),t.rq(e,0,"verticalSpacing",(function(e){return t.yo(e,20)})),t.rq(e,0,"horizontalSpacing",(function(e){return t.yo(e,20)})),e}();t.U(r,D),t.g=r.prototype,t.g.pb=function(){if(this.J(4096)){if(this.b={},this.Sb.length=0,this.Za.length=0,this.la&&!this.la.md){for(var e=this.la.Uv(),i=0;i<e.length;i++){var n=e[i],s=String(n.get("id"));s in this.b||(this.b[s]={id:s,item:n,gj:[],Hk:[],level:-1,ff:!1,YS:[],ZS:[]},this.Za.push(n));var a=n.get("dependsOn");if(t.p(a)&&"array"==t.ka(a))for(var o=0;o<a.length;o++){var r=String(a[o]);if(r in this.b)r!=s&&(this.b[r].gj.push(n),this.b[s].Hk.push(this.b[r].item),t.Fa(this.Za,this.b[r].item),t.Ua(this.b[r].ZS,s),t.Ua(this.b[s].YS,r));else{var l=this.la.Eo("id",r)[0];if(l){var c=String(l.get("id"));this.b[c]={id:c,item:l,gj:[n],Hk:[],level:-1,ff:!1,YS:[],ZS:[]},t.Fa(this.Za,l),this.b[s].Hk.push(l),t.Ua(this.b[c].ZS,s),t.Ua(this.b[s].YS,r)}}}else this.Sb.push(n)}var m,v;for(v in h(this),this.ea.length=0,this.D={},this.Ha=d(this,null,!0,"Start"),this.Ha.ff=!0,this.ba=d(this,null,!1,"Finish"),this.ba.ff=!0,this.b){var b=this.b[v],y=this.o[v];if(b.Hp||(b.Hp=d(this,b,!0,"S"+b.item.get("name"))),b.Pm||(b.Pm=d(this,b,!1,"F"+b.item.get("name")),b.Pm.pG=b),t.Ba(b.Hp.gj,b.item),t.Ba(b.Pm.Hk,b.item),y.nP||(b.ff=!0,b.Hp.ff=!0,b.Pm.ff=!0),b.gj.length)for(m=0;m<b.gj.length;m++){var S=String(b.gj[m].get("id")),x=this.b[S];x.Hp||(x.Hp=d(this,x,!0,"S"+x.item.get("name"))),x.Pm||(x.Pm=d(this,x,!1,"F"+x.item.get("name"))),u(x.Hp,b.Pm)}else u(this.ba,b.Pm);if(b.Hk.length)for(m=0;m<b.Hk.length;m++){var w=String(b.Hk[m].get("id")),C=this.b[w];C.Hp||(C.Hp=d(this,C,!0,"Start: "+C.item.get("name"))),C.Pm||(C.Pm=d(this,C,!1,"Finish: "+C.item.get("name"))),u(b.Hp,C.Pm)}else u(b.Hp,this.Ha)}var T,D,k,$,O,P,L=[];for(T in this.D){var I=this.D[T],A={};for(D=0;D<I.Em.length;D++){var E=I.Em[D];if(1==E.gj.length&&2>E.Ar.length&&!E.Hk.length){var G=String(E.gj[0].get("id")),U=this.b[G],F=U.Pm;for(k=0;k<I.Em.length;k++)if(D!=k){var M=I.Em[k];if(1==M.gj.length){var _=String(M.gj[0].get("id"));this.b[_].Pm==F&&(A[F.id]=F)}}}else A[E.id]=E}for(D=L.length=0;D<I.Em.length;D++)if(!((E=I.Em[D]).id in A)){G=String(E.gj[0].get("id"));var N=(U=this.b[G]).Hp;U.Hp=I,t.Ba(I.gj,U.item),L.push(N)}for(D=0;D<L.length;D++){var R=L[D];t.Fa(I.Em,R),delete this.D[R.id]}}for(T in this.D){for(I=this.D[T],A={},D=0;D<I.Ar.length;D++){var j=I.Ar[D];if(1==j.Hk.length&&2>j.Em.length&&!j.gj.length){var B=String(j.Hk[0].get("id")),H=this.b[B],z=H.Hp;for(k=0;k<I.Ar.length;k++)if(D!=k){var V=I.Ar[k];if(1==V.Hk.length){var q=String(V.Hk[0].get("id"));this.b[q].Hp==z&&(A[j.id]=j)}}}else A[j.id]=j}for(D=L.length=0;D<I.Ar.length;D++)(j=I.Ar[D]).id in A||(B=String(j.Hk[0].get("id")),N=(H=this.b[B]).Pm,H.Pm=I,t.Ba(I.Hk,H.item),L.push(N));for(D=0;D<L.length;D++)R=L[D],t.Fa(I.Ar,R),delete this.D[R.id]}for($ in this.G={},this.D){var W,Y=this.D[$];for(W=0;W<Y.gj.length;W++){var K=String(Y.gj[W].get("id")),X=this.b[K],J=p(this,Y,X.Pm);J.pz=X,J.ff=X.ff}for(W=0;W<Y.Em.length;W++){var Z=Y.Em[W];(J=p(this,Y,Z)).ff=Y.ff&&Z.ff}}this.Ca.length=0,this.Ha.level=0;for(var Q=[this.Ha],tt=[];Q.length;){var et,it=Q.pop(),nt=it.level;for(tt.length>nt&&(tt.length=nt),tt.push(it),it==this.ba&&this.Ca.push(tt.slice(0)),et=it.gj.length;et--;){var st=String(it.gj[et].get("id")),at=this.b[st].Pm,ot=nt+1;at.level=Math.max(ot,at.level),this.sb=Math.max(at.level,this.sb),Q.push(at)}for(et=it.Em.length;et--;){var rt=it.Em[et];ot=nt+1,rt.level=Math.max(ot,rt.level),this.sb=Math.max(rt.level,this.sb),Q.push(rt)}}for(var lt in this.G){var ht=this.G[lt];if(!ht.qw){var ct=ht.from,ut=ht.Je,dt=ut.level-ct.level;if(1<dt){for(var pt,gt,ft,mt=null,vt=0;vt<dt-1;vt++){var bt=!mt;mt=mt||ct,(pt={qw:!0,id:null,label:"Fake milestone "+vt,level:ct.level+1+vt,ff:ht.ff,yn:!1,Rm:!1,bk:[],Jja:null,CP:null,Ar:[mt],Em:[],d5:ht,gj:[],Hk:[],Eb:0}).id="fm"+t.oa(pt),this.D[pt.id]=pt,bt?((ft={qw:!0,from:mt,Je:pt,yn:!1,Rm:!1,pz:ht.pz,id:null,ff:ht.ff,d5:ht}).id="fe"+t.oa(ft),this.G[ft.id]=ft):(ft=mt.CP).Je=pt,(gt={qw:!0,from:pt,Je:null,yn:!1,Rm:!1,pz:ht.pz,id:null,ff:ht.ff,d5:ht}).id="fe"+t.oa(gt),this.G[gt.id]=gt,pt.CP=gt,pt.Jja=ft,pt.bk=[gt,ft],mt.qw?(mt.Em.push(pt),mt.CP.Je=pt):(ht.pz||(t.Fa(mt.Em,ut),t.Ba(mt.Em,pt)),t.Fa(mt.bk,ht),t.Ba(mt.bk,ft)),mt=pt}gt.Je=ut,t.Fa(ut.Ar,ct),t.Ba(ut.Ar,pt),pt.Em.push(ut);var yt=(0,t.za)(ut.bk,ht);0>yt&&(yt=0),t.Ca(ut.bk,yt,1,gt),delete this.G[ht.id]}}}this.ec.length=0,this.Ha.Rm=this.ba.Rm=!0;for(var St,xt=!1,wt=g(this,xt),Ct=[[this.Ha,this.ba]];St=f(wt,Ct);){var Tt=void 0,Dt=Ct,kt=St[1],$t=wt[St[0]],Ot=null;for(Tt in $t.bk){var Pt=$t.bk[Tt].from;Pt.Rm&&(!Ot||Ot.level>Pt.level)&&(Ot=Pt)}var Lt=[Ot];for(Pt=Ot;Pt;){var It=Pt.bk,At=null;for(Tt=0;Tt<It.length;Tt++){var Et=It[Tt];if(Et.from==Pt&&!Et.Rm){Et.Rm=!0;var Gt=Et.Je;Lt.push(Gt),Gt.Rm||(Gt.Rm=!0,At=Gt);break}}Pt=At}var Ut=void 0,Ft=void 0,Mt=void 0,_t=void 0,Nt=Dt[kt],Rt=Lt,jt=Nt.indexOf(Rt[0]),Bt=Nt.indexOf(Rt[Rt.length-1]);jt<Bt?(_t=jt,Mt=Bt,Ft=!1):(_t=Bt,Mt=jt,Ft=!0);var Ht=Nt.slice(0,_t);if(Ft)for(Ut=Rt.length;Ut--;)Ht.push(Rt[Ut]);else Ht.push.apply(Ht,Rt);Ht.push.apply(Ht,Nt.slice(Mt+1));var zt=Nt.slice(_t+1,Mt);if(Ft)zt.push.apply(zt,Rt);else for(Ut=Rt.length;Ut--;)zt.push(Rt[Ut]);var Vt=[Ht,zt];t.Ca(Dt,kt,1,Vt[0],Vt[1]),wt=g(this,xt=!xt)}if(this.ec=Ct,this.ea[0]=[this.Ha],this.ea[this.sb]=[this.ba],this.Uc=1,2<this.ec.length)for(O=0;O<this.ec.length;O++){var qt=this.ec[O];t:{for(var Wt=window.Infinity,Yt=0,Kt=0;Kt<qt.length;Kt++){var Xt=qt[Kt];if(!Xt.level){var Jt=Kt;break t}Xt.level<Wt&&(Wt=Xt.level,Yt=Kt)}Jt=Yt}for(var Zt,Qt,te,ee=0;ee+=1,(Zt=(te=[qt[t.$a(Jt+ee,qt.length)],qt[t.$a(Jt-ee,qt.length)]])[0])!=(Qt=te[1])&&(Zt==Qt||Zt!=this.ba&&Qt!=this.ba);)Zt.bW=Qt,Qt.xla=Zt}for(P in this.D){var ie=this.D[P];if(ie!=this.Ha&&ie!=this.ba&&!ie.xla){var ne=ie.level;this.ea[ne]=[ie];for(var se=ie;se.bW;)this.ea[ne].push(se.bW),se=se.bW,this.Uc=Math.max(this.Uc,this.ea[ne].length)}}var ae=0;for(O=0;O<this.ea.length;O++){var oe=this.ea[O];for(P=0;P<oe.length;P++){var re=oe[P];re&&!re.qw&&(re.index=ae++)}}}this.I(4096)}},t.g.w4=function(e){var i=0;t.X(e,4096)&&(i|=16384),t.X(e,8192)&&(i|=32768),t.X(e,1)&&(i|=4),this.B(i,1)},t.g.A4=function(e){var i=0;t.X(e,4096)&&(i|=16384),t.X(e,8192)&&(i|=32768),this.B(i,1)},t.g.Wc=function(e){return this.hk||(this.hk=new s,t.W(this,"milestones",this.hk),t.K(this.hk,this.w4,this)),t.p(e)?(this.hk.N(e),this):this.hk},t.g.Nc=function(e){return this.Kk||(this.Kk=new a,t.W(this,"tasks",this.Kk),t.K(this.Kk,this.A4,this)),t.p(e)?(this.Kk.N(e),this):this.Kk},t.g.Me=function(e){return this.Ka||(this.Ka=new o,t.K(this.Ka.Wc(),this.w4,this),this.Ka.Wc().parent(this.Wc()),t.K(this.Ka.Nc(),this.A4,this),this.Ka.Nc().parent(this.Nc())),t.p(e)?(this.Ka.N(e),this):this.Ka},t.g.Tha=function(e){var i=e.tag;if(i&&null!=i.m){var n=i.m;i=n.ff?this.Me().Wc():this.Wc();var s=this.Ic(!0,void 0,void 0,n),a=n.Ve?t.wo:t.gm;n=i.Xv(a,s),i=i.nr(a,s),e.fill(n).stroke(i)}},t.g.Uha=function(t){if((t=t.tag)&&null!=t.m){var e=t.m,i=!0;if(t=e.oX){var n=this.Wc().Qa().labels();t.td(n.$d()),i=v(n,i),e.Ve&&(n=this.Wc().selected().labels(),t.td(n.$d()),i=v(n,i)),e.ff&&(n=this.Me().Wc().Qa().labels(),t.td(n.$d()),i=v(n,i),e.Ve&&(e=this.Me().Wc().selected().labels(),t.td(e.$d()),i=v(e,i))),t.enabled(i),t.W()}}},t.g.Jla=function(e){if((e=e.tag)&&null!=e.w){var i=(e=e.w).x3;i.clear(),i.oc(1,0,0,1,0,0);var n={width:null,height:null,rotation:0,padding:[0,0,0,0]},s=e.DY,a=e.aW;if(s){var o=!0,r=this.Nc().Qa().Jm();if(o=v(r,o),s.td(r.$d()),e.Ve){var l=this.Nc().selected().Jm();s.td(l.$d()),o=v(l,o)}e.ff&&(l=this.Me().Nc().Qa().Jm(),s.td(l.$d()),o=v(l,o),e.Ve&&(l=this.Me().Nc().selected().Jm(),s.td(l.$d()),o=v(l,o))),s.enabled(o),s.W(),o=t.Xu(r,s,void 0,n),i.moveTo(o.left,o.top).lineTo(o.left+o.width,o.top).lineTo(o.left+o.width,o.top+o.height).lineTo(o.left,o.top+o.height).close()}a&&(o=!0,s=this.Nc().Qa().Ck(),a.td(s.$d()),o=v(s,o),e.Ve&&(r=this.Nc().selected().Ck(),a.td(r.$d()),o=v(r,o)),e.ff&&(r=this.Me().Nc().Qa().Ck(),a.td(r.$d()),o=v(r,o),e.Ve&&(r=this.Me().Nc().selected().Ck(),a.td(r.$d()),o=v(r,o))),a.enabled(o),a.W(),n=t.Xu(s,a,void 0,n),i.moveTo(n.left,n.top).lineTo(n.left+n.width,n.top).lineTo(n.left+n.width,n.top+n.height).lineTo(n.left,n.top+n.height).close()),i.Du(e.rotation,"center")}},t.g.Ila=function(e){var i=e.tag;if(i)if(null!=i.w){var n=i.w,s=this.o[n.id],a=n.ff?this.Me().Nc():this.Nc();s=this.Ic(!0,n,s,void 0);var o=n.Ve?t.wo:t.gm;n=a.Xv(o,s),a=a.nr(o,s),i.a&&(t.C(a)&&delete(a=t.Qc(a)).dash,e.fill(n)),e.stroke(a)}else null!=i.d&&(a=i.d?this.Me().Nc():this.Nc(),s=this.Ic(!1,void 0,void 0,void 0),n=a.Fp("dummyFill",0,s),a=a.Fp("dummyStroke",0,s),i.a&&(t.C(a)&&delete(a=t.Qc(a)).dash,e.fill(n)),e.stroke(a))},t.g.Qh=function(e){if(this.pb(),this.J(8192)&&(h(this),this.I(8192)),this.na||(this.na=this.Na.Bd(),this.aa=new t.dC((function(){return t.qk()}),(function(t){t.clear(),t.tag=void 0})),this.aa.zIndex(1),this.aa.parent(this.na),this.fb=new t.dC((function(){var e=t.qk();return e.fill("none").stroke({color:"#fff",opacity:1e-4,thickness:6}),e}),(function(t){t.clear(),t.tag=void 0})),this.fb.zIndex(3),this.fb.parent(this.na),this.Ba=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.Ba.zIndex(3),this.Ba.parent(this.na),this.Lf=this.na.Bd(),this.Lf.zIndex(4),this.$a=new t.dC((function(){var e=t.qk();return e.fill({color:"#fff",opacity:1e-4}).stroke({color:"#fff",opacity:1e-4,thickness:2}),e}),(function(t){t.clear(),t.tag=void 0,t.oc(1,0,0,1,0,0)})),this.$a.zIndex(5),this.$a.parent(this.na),this.Wc().TA(this.Lf),this.Me().Wc().TA(this.Lf),this.Nc().TA(this.Lf),this.Me().Nc().TA(this.Lf),this.Wc().wi(),this.Nc().wi(),this.Me().Wc().wi(),this.Me().Nc().wi()),t.Aw(this.Ua(),this),t.Aw(this.Wc().Ua(),this),t.Aw(this.Nc().Ua(),this),t.Aw(this.Me().Wc().Ua(),this),t.Aw(this.Me().Nc().Ua(),this),this.J(4)){this.aa.clear(),this.fb.clear(),this.Ba.clear(),this.$a.clear(),this.Wc().oL(),this.Nc().oL();var i,n=t.L(this.g("verticalSpacing"),e.height),s=t.L(this.g("horizontalSpacing"),e.width),a=this.sb>=this.Uc?e.width:e.height,o=t.L(this.Me().Wc().g("size"),a),r=t.L(this.Wc().g("size"),a),l=Math.max(r,o);for(r=e.left+l/2,o=0;o<this.ea.length;o++){var c=this.ea[o];if(c){var u=e.top+l/2;for(i=0;i<c.length;i++){var d=c[i];if(d){if(!d.qw){var p=t.eC(this.Ba),g=d.ff?this.Me().Wc():this.Wc();g=d.Ve?g.selected().g("stroke"):g.Qa().g("stroke"),g=0==t.dp(g)%2?0:.5;var f=d.ff?this.Me().Wc():this.Wc(),v=t.L(f.g("size"),a),b=Math.round(v/2);switch(d.Eb=b,f.g("shape")){case"rhombus":p.moveTo(r+g-b,u+g).lineTo(r+g,u+g-b).lineTo(r+g+b,u+g).lineTo(r+g,u+g+b).close();break;case"rectangle":p.moveTo(r+g-b,u+g-b).lineTo(r+g+b,u+g-b).lineTo(r+g+b,u+g+b).lineTo(r+g-b,u+g+b).close();break;default:p.moveTo(r+g+b,u+g).arcTo(b,b,0,360)}p.tag={m:d},d.pX=p,f=this.Ic(!0,void 0,void 0,d),g=d.ff?this.Me().Wc():this.Wc(),(p=this.Wc().Qa().labels().add(f,{value:{x:r-b,y:u-b}})).td(g.Qa().labels().$d()),p.width(v),p.height(v),d.oX=p}d.left=r,d.top=u}u+=n}}r+=s}for(o in this.G)if(a=(f=this.G[o]).from,i=f.Je,s=(n=f.pz?f.pz:void 0)?this.o[n.id]:void 0,g=f.ff,!a.qw){l=t.eC(this.aa),d=t.eC(this.aa),c=t.eC(this.fb),l.tag=n?{w:n}:{d:g},d.tag=n?{w:n}:{d:g},d.tag.a=!0,c.tag=n?{w:n}:{d:g},g=f.ff?this.Me().Nc():this.Nc(),v=this.Ic(!0,n,s,void 0),n?(g=g.nr(n.Ve?t.wo:t.gm,v),n.pX=l,n.x3=t.eC(this.$a),n.x3.tag={w:n},n.X_=d):g=g.Fp("dummyStroke",0,v),g=0==t.dp(g)%2?0:.5,b=a.left+g+(a.Eb||0);var y=a.top+g;l.moveTo(b,y),c.moveTo(b,y),v=(b+i.left-i.Eb)/2,p=(i.top+y)/2;var S=Math.atan((i.top-a.top)/(i.left-i.Eb-a.left-a.Eb));if(n&&(n.rotation=180*S/Math.PI),f.qw){for(S=f.Je;S.qw;)r=S.left+g,u=S.top+g,l.lineTo(r,u),c.lineTo(r,u),S=(f=S.CP).Je;b=r,y=u,f=S.left+g-(S.Eb||0),S=S.top+g;var x=Math.atan((S-y)/(f-b)),w=m(b,y,f,S),C=f-10*Math.cos(x);x=S-10*Math.sin(x);var T=w[0],D=w[1],k=w[2];w=w[3],l.moveTo(b,y).lineTo(C,x)}else f=i.left+g-(i.Eb||0),S=i.top+g,x=Math.atan((S-y)/(f-b)),w=m(b,y,f,S),C=f-10*Math.cos(x),x=S-10*Math.sin(x),T=w[0],D=w[1],k=w[2],w=w[3],l.moveTo(b,y).lineTo(C,x);d.moveTo(C,x).lineTo(T,D).lineTo(f,S).lineTo(k,w).close(),c.lineTo(f,S),n&&(a=t.gn(0,0,i.left-i.Eb-a.left-a.Eb,i.top-a.top),f=this.Ic(!0,n,s,void 0),s=this.Nc().Qa().Jm().add(f,{value:{x:v+g,y:p+g}}),n.DY=s,s.width(a),s.height(e.height),s.rotation(n.rotation),s.tag={w:n},(g=this.Nc().Qa().Ck().add(f,{value:{x:v+g,y:p+g}})).width(a),g.height(e.height),n.aW=g,g.rotation(n.rotation),g.tag={w:n})}this.B(49152)}this.J(32768)&&(this.Ba.Pj(this.Tha,this),this.aa.Pj(this.Ila,this),this.B(16384),this.I(32768)),this.J(16384)&&(this.Wc().wi(),this.Nc().wi(),this.Me().Wc().wi(),this.Me().Nc().wi(),this.Ba.Pj(this.Uha,this),this.aa.Pj(this.Jla,this),this.I(16384))},t.g.yj=function(){return!this.la||!this.la.bc()},t.g.Zj=function(e,i){return t.qu(this.data(),i)},t.g.R=function(){this.Sb.length=0,this.Za.length=0,delete this.b,delete this.o,delete this.la,t.sd(this.Wc(),this.Nc(),this.Me()),t.sd(this.fb,this.$a,this.Ba,this.aa,this.Lf,this.na),this.na=this.Lf=this.aa=this.Ba=this.$a=this.fb=null,r.u.R.call(this)},t.g.F=function(){var e=r.u.F.call(this);return this.la&&(e.treeData=this.la.xB()),e.milestones=this.Wc().F(),e.tasks=this.Nc().F(),e.criticalPath=this.Me().F(),t.Tq(this,D,e),{chart:e}},t.g.U=function(e,i){r.u.U.call(this,e,i),this.qc=t.nm("defaultTooltip"),"treeData"in e&&this.data(t.cu(e.treeData)),"milestones"in e&&this.Wc().U(e.milestones,i),"tasks"in e&&this.Nc().U(e.tasks,i),"criticalPath"in e&&this.Me().U(e.criticalPath,i),t.Iq(this,D,e)};var k=r.prototype;k.getType=k.Ma,k.tasks=k.Nc,k.milestones=k.Wc,k.criticalPath=k.Me,k.data=k.data,k.toCsv=k.Zj,t.Tp.pert=b,t.E("anychart.pert",b)}.call(this,$)),_.theme_calendar||(_.theme_calendar=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{defaultMonthsLabelsSettings:{},calendar:{margin:0,padding:0,colorRange:{orientation:"top",enabled:!0},colorScale:{type:"linear-color"},background:{enabled:!1},years:{title:{enabled:!0,fontSize:40,width:"100%",fontColor:"#dfdfdf",orientation:"left",position:"center"},background:{enabled:!1},inverted:!1,underSpace:30,monthsPerRow:12,format:"{%year}"},months:{labels:{},stroke:"#0767b1",noDataStroke:"#c9c9c9",underSpace:5},weeks:{showWeekends:!0,labels:{width:"100%",position:"center",anchor:"center"},spacing:5},days:{noDataFill:"#f8f8f8",noDataStroke:"#fff",noDataHatchFill:{type:"backward-diagonal",color:"#e0e0e0",thickness:1,size:6},spacing:0,normal:{fill:function(){return this.scaledColor||this.sourceColor},stroke:"#fff",hatchFill:"backward-diagonal"},hovered:{fill:"#6363a3",stroke:"2 #6333a3"},selected:{}},tooltip:{titleFormat:"{%x}",format:"{%Value}"}}})}.call(this,$)),_.theme_scatter||(_.theme_scatter=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{scatter:{defaultSeriesType:"marker",legend:{enabled:!1},defaultSeriesSettings:{base:{clip:!0,color:null,tooltip:{titleFormat:function(){return this.seriesName},format:function(){return"x: "+this.x+"\ny: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix}},xScale:null,yScale:null,a11y:{enabled:!1,titleFormat:"Series named {%SeriesName} with {%SeriesPointsCount} points. Min value is {%SeriesYMin}, max value is {%SeriesYMax}"}},bubble:{normal:{negativeFill:t.EN,negativeStroke:t.EN,negativeHatchFill:null,labels:{anchor:"center"}},hovered:{negativeFill:t.EN,negativeStroke:t.EN,negativeHatchFill:void 0},displayNegative:!1,hatchFill:!1,tooltip:{format:function(){return"X: "+this.x+"\nY: "+this.valuePrefix+t.vN(this.value)+this.valuePostfix+"\nSize: "+t.vN(this.size)}}},line:{connectMissingPoints:!1},marker:{normal:{size:5},hovered:{size:7},selected:{size:7}}},defaultAnnotationSettings:{},defaultXAxisSettings:{orientation:"bottom",scale:0,title:{text:"X-Axis"}},defaultYAxisSettings:{orientation:"left",scale:1,title:{text:"Y-Axis"}},series:[],xGrids:[],yGrids:[],xMinorGrids:[],yMinorGrids:[],xAxes:[{}],yAxes:[{}],lineAxesMarkers:[],rangeAxesMarkers:[],textAxesMarkers:[],scales:[{type:"linear"},{type:"linear"}],xScale:0,yScale:1,maxBubbleSize:"20%",minBubbleSize:"5%",crosshair:{enabled:!1,displayMode:"float",xStroke:"#969EA5",yStroke:"#969EA5",zIndex:41,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},a11y:{titleFormat:t.QN},annotations:{annotationsList:[],zIndex:2e3}},marker:{},bubble:{},quadrant:{scales:[{type:"linear",minimum:0,maximum:100},{type:"linear",minimum:0,maximum:100}],xScale:0,yScale:1,defaultXAxisSettings:{ticks:!1,labels:!1,title:{enabled:!1,align:"left"},stroke:"3 #bbdefb"},defaultYAxisSettings:{ticks:!1,labels:!1,title:{enabled:!1,align:"left"},stroke:"3 #bbdefb"},xAxes:[{},{orientation:"top"}],yAxes:[{},{orientation:"right"}],crossing:{stroke:"#bbdefb"},quarters:{rightTop:{enabled:!0},leftTop:{enabled:!0},leftBottom:{enabled:!0},rightBottom:{enabled:!0}}}})}.call(this,$)),_.sunburst||(_.sunburst=1,function(t){var e=function(e){t.V.call(this),this.target=e,this.Xb=this.Y=null,this.I(4294967295),t.T(this.ua,[["thickness",0,1],["enabled",0,1]]),e={},t.T(e,[["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsFactoryConstructor",t.py),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.oha,this),e.kb(this),this.B(16,1)})),e={},t.T(e,[["labels",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.py),e={},t.T(e,[["labels",0,0]]),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.py),this.ca.labels().I(4294967295)},i=function(e,i){t.bD.call(this,e,i),this.Ga("sunburst"),this.state=new t.ix(this),this.P={},this.i=[],this.D=[],this.ec=[],this.Sb=[],this.aa=this.fd=this.Fa=null,this.me={},this.B(4294967295),t.T(this.ua,[["radius",4,1],["innerRadius",4,1],["startAngle",16,1],["calculationMode",16,1],["sort",16,1]]);var n={};t.T(n,[["fill",528,1],["stroke",528,1],["hatchFill",528,1],["labels",0,0]]),this.ca=new t.my(this,n,t.gm),this.ca.ta("labelsFactoryConstructor",t.py),this.ca.ta("labelsAfterInitCallback",(function(e){t.K(e,this.Kn,this),e.kb(this),this.B(16,1)})),n={},t.T(n,[["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0]]),this.za=new t.my(this,n,t.vo),this.za.ta("labelsFactoryConstructor",t.py),n={},t.T(n,[["fill",16,1],["stroke",16,1],["hatchFill",0,0],["labels",0,0]]),this.Ea=new t.my(this,n,t.wo),this.Ea.ta("labelsFactoryConstructor",t.py),this.Dk=(0,t.pa)(this.Vga,this)},n=function(e,i){var n=this.calculationMode(),s=!!e.j("isLeaf"),a=!!i.j("isLeaf");return s=t.N("parent-independent"==n?s?e.get("value"):e.j("sunburst_visibleLeavesSum"):e.get("value")),t.N("parent-independent"==n?a?i.get("value"):i.j("sunburst_visibleLeavesSum"):i.get("value"))-s},s=function(t,e){return-n.call(this,t,e)},a=function(t){for(var e=0;e<t.ba.length;e++){var i=t.ba[e];i&&i.j("labelIndex",void 0)}},o=function(e,i){if(!e)return t.Xl;var n=i+"|"+e+"|true",s=D[n];if(!s){switch(i){case 2:s=t.Zl;break;case 3:s=t.$l;break;default:s=t.am}D[n]=s=t.qa(r,e,s,3==i,!0)}return s},r=function(e,i,n,s,a,o,r,l){var h=a.$();if(o!=t.gm&&s){var c=a.sc(e,o,h.f,i,!1,void 0,r);if(n&&!0===c&&(c=i(a.Eh())),t.p(c)){if(!t.D(c))return c;if(n)return n=a.Yi(r),i(c.call(n,n))}}return e=a.sc(e,0,h.f,i,!1,void 0,r),l=t.p(l)?l:e,n&&!0===e&&(e=i(a.Eh())),t.D(e)&&((n=n?a.Yi(r):a.Ge(l,r)).sourceColor=i(n.sourceColor),e=i(e.call(n,n))),c&&(n=a.Ge(e,r),e=i(c.call(n,n))),i=e,t.C(i)&&i.hasOwnProperty("mode")&&i.hasOwnProperty("cx")&&null===e.mode&&(e.mode=a.lf?a.lf:null),e},l=function(t,e){var i=o("stroke",2)(t,e,!1,null);return e||t.$().f.j("stroke",i),i},h=function(e,i){var n=e.$(),s=n.j("path"),a=o("fill",1)(e,i,!1,null);i||e.$().f.j("fill",a);var r=l(e,i),h=o("hatchFill",3)(e,i,!1,null);i||e.$().f.j("hatchFill",h),h=h||null,t.p(s)&&(s.fill(a),s.stroke(r),a=n.j("hatchPath"),h||a)&&(a||(a=t.eC(e.o),n.j("hatchPath",a)),a.clear().pe(t.yg(s)),a.stroke(null).fill(h))},c=function(t,e){t.Ba=e;var i=Math.min(t.na.width/t.Ba.width,t.na.height/t.Ba.height);(0,window.isFinite)(i)||(i=0),t.f.ak.oc(i,0,0,i,t.na.left-t.Ba.left*i+(t.na.width-i*t.Ba.width)/2,t.na.top-t.Ba.top*i+(t.na.height-i*t.Ba.height)/2)},u=function(t){var e,i=t.P;for(t.Ka=window.NaN,t.sb=[],e=0;e<=t.fb;e++){var n=t.ec[e],s=t.Sb[t.fb-e],a=i[e]?i[e]:i[e]={},o=!0,r=window.NaN;if(n){var l=n.g("enabled");o=null!=l?!!l:o,r=null!=(n=n.g("thickness"))?n:r}s&&(o=null!=(l=s.g("enabled"))?!!l:o,r=null!=(n=s.g("thickness"))?n:r),a.display=o,a.dla=r,o&&t.sb.push(e)}},d=function(e){if(e.sb.length!=e.fb+1){var i=e.vw().g("enabled");i=null==i||i;for(var n=0;n<e.fb;n++){var s=e.P[n];if(s){var a=t.xa(e.sb,(function(t){return t>n})),o=e.P[e.sb[a]];t.Dc(s.LB,(function(e,s){for(var a=o&&o.LB?o.LB[s]:null,r=0;r<e.hf.length;r++){var l=e.hf[r],h=l.Sl(),c=[];if(a)for(var u=a.hf,d=0;d<u.length;d++){var p=u[d];(!p.j("isLeaf")||i)&&(p=p.j("pathFromRoot")[n+1])&&t.Aa(h,p)&&!t.Aa(c,p)&&c.push(p)}l.j("attendingOnNextVisLevel",c)}}))}}}},p=function(e,i,n){var s,a=0,o=i.bc();if(t.J(i,t.au)||t.J(i,t.Yt))for(s=0;s<o;s++){var r=i.xd(s);r.j("pathFromRoot",[r]),r=p(e,r,n),a=Math.max(a,r)}else{if(s=e.fh++,i.j("index",s).j("depth",n).j("isLeaf",!o),(r=i.getParent())&&((r=t.Ha(r.j("pathFromRoot"))).push(i),i.j("pathFromRoot",r)),e.ba[s]=i,e.Uc[s]=i,o){for(s=0;s<o;s++)r=i.xd(s),r=p(e,r,n+1),a=Math.max(a,r);a+=1}i.j("nodeMaxDepth",a)}return a},g=function(e,i){var n,s=0,a=0,o=0,r=0,l=i.bc();if(t.J(i,t.au)||t.J(i,t.Yt))for(n=0;n<l;n++){var h=i.xd(n),c=g(e,h);s+=c.WD,a+=c.N6,o+=c.dG}else{if(l){var u=0;for(n=0;n<l;n++)h=i.xd(n),s+=(c=g(e,h)).WD,a+=c.N6,o+=c.dG,r+=c.Dla,h.j("isLeaf")&&u++;c=t.N(i.get("value")),h=5,i.j("sunburst_leavesCount",a),i.j("sunburst_childrenLeavesCount",u)}else s=i.j("depth"),a=t.Aa(e.sb,s),s=c=t.N(i.get("value"))||0,h=0,a?(a=1,r=c,i.j("sunburst_leavesCount",1)):(r=a=0,i.j("sunburst_leavesCount",0)),i.j("sunburst_childrenLeavesCount",1);i.j("sunburst_value",c),i.j("sunburst_leavesSum",s),i.j("sunburst_childSum",o),i.j("sunburst_visibleLeavesSum",r),i.j("sunburst_type",h),l=e.P,o=t.N(i.get("value"));var d=i.j("depth");u=i.j("pathFromRoot")[0],n=(0,t.za)(e.i,u),u=!i.bc(),h=null==(h=e.vw().g("enabled"))||!!h,(l=l[d]?l[d]:l[d]={}).IJ=(l.IJ||0)+(u?h?o:0:o),l.Py=(l.Py||0)+1,l.oI=(l.oI||0)+(u&&h?1:0),l.Rz=(l.Rz||0)+(u?0:1),l.lv||(l.lv=[]),-1!=(0,t.za)(l.lv,n)||0==l.Rz&&!h||l.lv.push(n),(n=(l=l.LB?l.LB:l.LB={})[n]?l[n]:l[n]={}).IJ=(n.IJ||0)+(u?h?o:0:o),n.Py=(n.Py||0)+1,n.oI=(n.oI||0)+(u&&h?1:0),n.Rz=(n.Rz||0)+(u&&h?0:1),n.dG=(n.dG||0)+i.j("sunburst_childSum"),n.WD=(n.WD||0)+i.j("sunburst_leavesSum"),n.hf=n.hf?n.hf:n.hf=[],n.hf.push(i),o=c}return{dG:o,WD:s,N6:a,Dla:r}},f=function(e,i,n,s,a,o){if(i.j("sunburst_missing"))return 0;var r=i.j("depth"),c=s,u=i.j("index"),d=e.$();d.select(u);var p=e.$().f,g=null,m=null;if(e.aa){var v=e.aa.Jj;if(v){var b=e.aa.mL;if(b)for(var y=e.aa.state,S=0;S<b.length;S++){var x=(0,b[S])(p,y);x&&x in v&&(g=v[x],m=x)}}}p.j("statefulFill",g),p.j("statefulName",m),p=t.nx(e.state,u),u=i.bc(),m=(g=e.P[r]).display,g=g.Ef,i.j("isLeaf")&&(m=null!=(v=(b=e.vw()).g("enabled"))?m&&v:m,g=null!=(b=b.g("thickness"))?b:g),b=m,y=e.g("calculationMode"),S=i.bc(),x=i.j("depth"),v=-1!=(0,t.za)(e.D,i)?null:i.getParent();var w=i.j("depth"),C=(0,t.za)(e.i,i.j("pathFromRoot")[0]);if(w=e.P[w].LB[C],"parent-independent"==y){var T=(0,window.parseFloat)(i.j("sunburst_leavesSum"));n=T/n,!(0,window.isNaN)(n)&&b||(v?b?n=T/w.WD:(n=i.j("sunburst_visibleLeavesSum"),b=v.j("sunburst_visibleLeavesSum"),v=(v=v.j("attendingOnNextVisLevel"))&&v.length,n=(y=(y=i.j("attendingOnNextVisLevel"))&&y.length)&&v?n/b:0):(T=window.NaN,n=(n=e.P[e.Ka])?1/n.lv.length:0))}else"parent-dependent"==y?(b?(T=(0,window.parseFloat)(i.j("sunburst_value")),(0,window.isNaN)(T)&&(T=(0,window.parseFloat)(i.j("sunburst_leavesSum"))),n=(0,window.isNaN)(n)&&v?T/w.IJ:v?T/n:(n=e.P[e.Ka])?1/n.lv.length:0):n=S?x>=e.Ka?(T=(0,window.parseFloat)(i.j("sunburst_value")))/n:(n=e.P[x+1])&&n.display?1/n.lv.length:1:0,(0,window.isNaN)(n)&&(n=1)):"ordinal-from-root"==y?(y=null==(y=e.vw().g("enabled"))||y,n=e.P[e.Ka],S=v&&v.j("sunburst_childrenLeavesCount"),v?b?n=1/(v.bc()-(y?0:S)):(v=(v=v.j("attendingOnNextVisLevel"))&&v.length,n=(y=(y=i.j("attendingOnNextVisLevel"))&&y.length)&&v?1/v:0):n=n?1/n.lv.length:0):v?(n=i.j("sunburst_leavesCount"),n=(v=v.j("sunburst_leavesCount"))?n/v:0):n=(n=e.P[e.Ka])?1/n.lv.length:0;if(n=(T=[n,T])[0],T=T[1],a*=(0,window.isNaN)(n)?1:n,n=o,m?(m=l(e,0),m=t.dp(m),m=Math.floor(m/2),g=t.L(g,e.ud),(0,window.isNaN)(g)&&(g=e.Od),n=o+g,g=t.eC(e.ue),t.wi(g,e.Dc,e.uc,o+m,n-m,s,a),d.j("path",g),d.j("start",s),d.j("sweep",a),d.j("innerRadius",o),d.j("outerRadius",n),d.j("halfStrokeThickness",m),e.qC(g),e.ke(p),m=(o=e.$()).j("statefulFill"),(g=o.j("statefulName"))in e.me&&(g=e.me[g],v=l(e,p),g.fill(m),g.stroke(v),m=o.j("innerRadius"),v=o.j("outerRadius"),b=o.j("halfStrokeThickness"),y=o.j("start"),o=o.j("sweep"),t.wi(g,e.Dc,e.uc,m+b,v-b,y,o))):d.j("path",void 0),d.j("hatchPath",void 0),h(e,p),u)for(d=i.Sl(),e.qc&&t.Pa(d,e.qc),i=0;i<u;i++)c=t.ab(f(e,d[i],T,c,a,n));return r>=e.Ka?s+a:c},m=function(t,e){var i=e.j("pathFromRoot");return 1==t.i.length&&e!=t.i[0]?i[1]:i[0]},v=function(t,e,i){if(!e)return t.i;var n=e.j("depth"),s=e.j("nodeMaxDepth");if(s=n+s,i)if(n<t.sb[0])e=t.i;else{for(i=t.P[n].display;!i&&0<n;)--n,i=t.P[n].display,e=e.getParent();e=[e]}else for(e=[e];n<=s&&!(i=t.P[n].display);n++){i=[];for(var a=0;a<e.length;a++)i.push(e[a].Sl());e=i}return e},b=function(e,i){var n=t.ka(i);if(t.J(i,t.du)||t.J(i,t.$t))return e.ce(i.j("index"));if("array"==n){n=[];for(var s=0;s<i.length;s++)s in i&&(n[s]=b(e,i[s]))}else{if("object"!=n)return i;for(s in n={},i)if(i.hasOwnProperty(s)){var a=i[s];s in T&&(s=T[s]),n[s]=b(e,a)}}return n},y=function(e,n){var s=new i(e,n);return s.ga(!0,t.nm("sunburst")),s};t.H(e,t.V),t.Gq(e,["labels"],"normal"),e.prototype.ra=9;var S,x=(S={},t.rq(S,0,"thickness",(function(e){return null===e?e:t.yo(e)})),t.rq(S,0,"enabled",t.Zq),S);t.U(e,x),t.g=e.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.oha=function(t){this.ca.labels().I(4294967295),this.target.Kn(t)},t.g.g=t.ir,t.g.jg=function(e){return t.p(e)&&(this.Xb=e),this.Xb},t.g.bh=t.hr,t.g.Xd=function(){var e=[this.oa];return this.Y&&(e=t.Ga(e,this.Y.Xd())),e},t.g.Wd=function(){var e=[this.Pa];return this.Y&&(e=t.Ga(e,this.Y.Wd())),e},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){t.Iq(this,x,e),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.F=function(){var e={};return t.Tq(this,x,e,"Sunburst level"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.R=function(){t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,e.u.R.call(this)};var w=e.prototype;w.normal=w.Qa,w.hovered=w.lb,w.selected=w.selected,t.H(i,t.bD),t.Gq(i,["fill","stroke","hatchFill","labels"],"normal"),i.prototype.sa=40960|t.bD.prototype.sa;var C=function(){var e={};return t.sq(e,[[0,"sort",function(e){return t.D(e)?e:t.Mk(e)}],[0,"calculationMode",t.Cq],[0,"radius",function(e){return t.yo(e,"100%")}],[0,"innerRadius",function(e){return t.D(e)?e:t.yo(e)}],t.Z.zz]),e}();t.U(i,C);var T={IJ:"sum",Py:"nodesCount",oI:"leavesCount",Rz:"branchesCount",dG:"childSum",WD:"leavesSum",hf:"nodes",lv:"attendingRoots",display:"display",Ef:"thickness",LB:"statsByRoot"};t.g=i.prototype,t.g.Ma=function(){return"sunburst"},t.g.Vga=function(){if(!this.md){var e=this.O();(e=e?e.Ja():null)&&this.dg()?(e=e.Tl(),t.DE||(t.DE=t.Me("textarea"),t.DE.setAttribute("readonly","readonly"),t.uf(t.DE,{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",left:0,top:0,width:"1px"}),window.document.body.appendChild(t.DE),t.Ld(t.DE,["focus","focusin","select"],(function(t){t.preventDefault()}))),this.Ag=new t.SC(t.DE),this.Ag.K=!0,this.Ag.P=!0,this.Ag.G=!0,this.Ag.aa=!0,this.Ag.Al("drill_up",8),this.Ag.Al("drill_up",27),this.Ag.wa("shortcut",(function(e){t.DE.ya&&t.DE.ya!=this||"drill_up"==e.identifier&&this.OF(this.D[0].getParent())}),!1,this),this.yo=function(e){if(this.O()&&this.O().Ja()){var i=t.Zj(this.O().Ja()),n=this.ob();if(n&&e.clientX>=n.left+i.x&&e.clientX<=n.left+i.x+n.width&&e.clientY>=n.top+i.y&&e.clientY<=n.top+i.y+n.height){var s=t.Fe(t.ye(t.DE).b),a=s.scrollLeft,o=s.scrollTop;if(t.DE.select(),t.DE.ya=this,t.gd){var r=s.scrollLeft,l=s.scrollTop;(0,window.setTimeout)((function(){s.scrollLeft==r&&s.scrollTop==l&&t.ll.scrollTo(a,o)}),0)}else t.ll.scrollTo(a,o)}}},t.Ld(e,"mouseup",this.yo,!1,this)):(0,window.setTimeout)(this.Dk,100)}},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget).index;if(!t.p(i)&&t.mx(this.state,t.vo)){var n=t.sx(this.state,t.vo);n.length&&(i=n[0])}return i=t.N(i),(0,window.isNaN)(i)||(e.pointIndex=i),e},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}return"pointIndex"in e?i=e.pointIndex:"labelIndex"in e&&(i=e.labelIndex),i=t.N(i),e.pointIndex=i,{type:n,actualTarget:e.target,series:this,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.Tj=function(e){return t.p(e)?this.$i(e):this.Zk(),this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo,!0)},t.g.select=function(e){return this.enabled()?(t.p(e)?this.Ii(e):this.Gu(),this):this},t.g.Gu=function(){this.state.Lh(t.wo,!0)},t.g.ie=function(e){t.p(e)?this.state.Vh(t.wo,e):this.state.Vh(t.wo,!0)},t.g.pk=function(t){h(this,t),this.ke(t)},t.g.IE=function(e){e&&(this.D.length=0,t.A(e)?Array.prototype.push.apply(this.D,e):this.D.push(e),this.B(33300,1))},t.g.ay=function(){if(this.St(),this.D.length&&(this.D.length!=this.i.length||-1==(0,t.za)(this.i,this.D[0]))){var e=v(this,this.D[0].getParent(),!0);this.IE(e)}},t.g.Eq=function(e){if("drill-down"==this.gd().g("selectionMode")){if(e.button==t.Ri){var n,s=t.so(e.domTarget);if(t.J(e.target,t.Pu)){var a=e.target.Zi();a.aj&&a.aj()&&(n=a)}else n=s&&s.X,s=t.ea(s.index)?s.index:e.pointIndex;n&&!n.md&&n.enabled()&&t.D(n.Tg)?((n=this.$()).select(s),n=n.f,a=(s=-1!=(0,t.za)(this.i,n))&&1<this.i.length&&1==this.D.length,-1!=(0,t.za)(this.D,n)&&!s||a?this.OF(n.getParent()):n.j("isLeaf")?i.u.Eq.call(this,e):this.OF(n)):i.u.Eq.call(this,e)}}else i.u.Eq.call(this,e)},t.g.OF=function(e,i){if(i=i||{target:this},e){var n=e.j("depth")<this.D[0].j("depth");n=v(this,e,n)}else n=this.i;var s=t.cD(this,e);s={type:"drillchange",path:s,current:s[s.length-1]},this.Md(),this.ie(),this.hm&&(this.dispatchEvent(this.bl("selected",i,this.hm,!0)),this.hm=null),this.dispatchEvent(s)&&this.IE(n)},t.g.uA=function(){return this.St(),this.i?t.cD(this,this.D[0]):null},t.g.Rk=function(){return this.Ic()},t.g.Uu=function(){return!0},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(528,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Pf=function(e){t.X(e,2)&&this.B(528,1)};var D={};t.g=i.prototype,t.g.sc=function(e,i,n,s,a,o,r){var l=!!(i&t.vo),h=!!(i&t.wo);return o=h?this.Ea:l?this.za:this.ca,a=e.split("."),o=(0,t.Gg)(a,(function(t,e){return t[e]()}),o),r?e=o:(r=n.get(h?"selected":l?"hovered":"normal"),r=t.p(r)?(0,t.Gg)(a,(function(t,e){return t?t[e]:t}),r):void 0,e=t.Zo(r,n.get(t.hm(i,e)),o)),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){var e,n=this.$().f,s=n.j("pathFromRoot"),a=1<s.length?s[s.length-2]:null,o=n.j("depth");if(1<this.i.length)0>(n=(0,t.za)(this.i,n))&&(n=(0,t.za)(this.i,s[0]));else{var r=this.i[0];r==n?n=0:(n=r.Sl(),n=(0,t.za)(n,s[1])+1)}return s=this.ve().nc(n),e=a?a.j("hatchFill"):s,(a?1<this.i.length?a.j("hatchFill"):1==o?s:e:s)||i.b},t.g.Yi=function(e){var n,s=this.$(),a=s.f,o=a.j("index"),r=this.ve(),l=a.j("depth");e||(n=a.get("hatchFill"));var h,c,u,d=1<(e=a.j("pathFromRoot")).length?e[e.length-2]:null,p=m(this,a);if(1<this.i.length){var g=(0,t.za)(this.i,a);0>g&&(g=(0,t.za)(this.i,e[0]))}else(g=this.i[0])==a?g=0:(g=g.Sl(),g=(0,t.za)(g,e[1])+1);return r=r.nc(g),h=p!=a?p.j("hatchFill"):r,c=d?d.j("hatchFill"):r,u=d?1<this.i.length?d.j("hatchFill"):1==l?r:c:r,{index:s.ma(),level:a.j("depth"),isLeaf:0==a.bc(),parent:d,point:this.ce(o),path:e,mainColor:h,autoColor:r,parentColor:c,sourceHatchFill:n||u||i.b,iterator:s,series:this,chart:this}},t.g.Ge=function(e,i){var n,s=this.$(),a=s.f,o=a.j("index"),r=this.cc(),l=a.j("depth");i||(n=a.get("fill"));var h,c,u,d=a.j("pathFromRoot"),p=1<d.length?d[d.length-2]:null,g=m(this,a);if(1<this.i.length){var f=(0,t.za)(this.i,a);0>f&&(f=(0,t.za)(this.i,d[0]))}else(f=this.i[0])==a?f=0:(f=f.Sl(),f=(0,t.za)(f,d[1])+1);return f=r.nc(f),h=g!=a?g.j("fill"):e||f,c=p?p.j("fill"):e||f,u=p?1<this.i.length?p.j("fill"):1==l?f:c:f,{index:s.ma(),level:a.j("depth"),isLeaf:0==a.bc(),parent:p,point:this.ce(o),path:d,mainColor:h,autoColor:f,parentColor:c,sourceColor:e||n||u||r.nc(0),iterator:s,series:this,chart:this}},t.g.xca=function(){return this.aa||(this.aa=new t.Dx,this.aa.wa("statechange",(function(){this.B(16,1)}),void 0,this)),this.aa},t.g.Tp=function(e){return this.f||(this.f=new t.cC(this),t.K(this.f,this.Fda,this)),t.p(e)?(this.f.N(e),this):this.f},t.g.Fda=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=8196,n|=1),this.B(i,n)},t.g.kK=function(){var e=this.f.gi.rb();t.nb(e,this.Ba)||c(this,e)},t.g.kL=function(){this.B(4,1)},t.g.Kn=function(e){var i=0,n=0;t.X(e,1)&&(i|=16,n|=1),t.X(e,8)&&(i|=20,n|=9),this.B(i,n)},t.g.ek=function(e){this.Za||(this.Za=[]);var i=e.ma();return this.Za[i]||(this.Za[i]=t.mn(this.ca.labels().yl(e))),this.Za[i]},t.g.level=function(i,n){if(t.p(i)){if(i=t.N(i),(0,window.isNaN)(i))return this;if(0<=i)var s=this.ec;else s=this.Sb,i=Math.abs(i)-1;var a=s[i];return a||((a=s[i]=new e(this)).ga(!0,t.nm("sunburst.level")),t.K(a,this.H3,this)),t.p(n)?(a.N(n),this):a}return this},t.g.vw=function(i){return this.$a||(this.$a=new e(this),this.$a.ga(!0,t.nm("sunburst.level")),t.K(this.$a,this.H3,this)),t.p(i)?(this.$a.N(i),this):this.$a},t.g.H3=function(){this.B(32788,1)},t.g.Mm=function(e){this.bg=Math.min(e.width,e.height),this.nf=e.clone(),this.Ap=this.b=Math.min(this.bg/2,Math.max(t.L(this.g("radius"),this.bg),0)),this.Dc=this.nf.left+this.nf.width/2,this.uc=this.nf.top+this.nf.height/2,e=this.g("innerRadius"),this.G=Math.max(Math.floor(t.D(e)?e(this.b):t.L(e,this.b)),0),e=this.G/Math.pow(2,.5)*2,this.na=t.kn(this.Dc-e/2,this.uc-e/2,e,e),this.lf=new t.I(this.Dc-this.b,this.uc-this.b,2*this.b,2*this.b),this.ud=this.b-this.G,this.dn=0,this.bj=this.ud;var i=(e=this.vw()).g("enabled");i=null==i||i,e=e.g("thickness"),e=t.L(e,this.ud);for(var n,s,a=-1,o=this.ea,r=this.Hd+o,l=o;l<=r;l++){s=(n=this.P[l]).oI,n.Ef=Math.min(t.L(n.dla,this.ud),this.ud);var h=0==n.Rz&&!i;n.display&&!h&&(0<s&&(a=l),(0,window.isNaN)(n.Ef)&&this.dn++),n.display&&!(0,window.isNaN)(n.Ef)&&(this.bj-=n.Ef)}if(this.Od=Math.floor(this.bj/this.dn),0!=i&&!(0,window.isNaN)(e)){for(s=i=0,l=o;l<=a;l++)(n=this.P[l]).display&&(l==a?i+=Math.max(e,n.Rz&&l!=r?(0,window.isNaN)(n.Ef)?this.Od:n.Ef:0):(0,window.isNaN)(n.Ef)?(s++,i+=this.Od):i+=n.Ef);s&&(this.Od-=(i-this.ud)/s)}(e=this.ca.labels()).ka(),e.Dc(this.Dc),e.uc(this.uc),e.Ty(this.b),e.UE(this.Vl()),e.fz(360),e.ja(this.lf),e.da(!1),this.lb().labels().ja(this.lf)},t.g.St=function(){if(this.J(4096)){a(this),this.fh=0,this.ba=[],this.Uc=[],this.D.length=0;var e=this.data();e&&(this.P={},this.Ec(),this.i=e.Sl(),this.D=t.Ja(this.i,0),this.fb=p(this,e,0),this.D.length?this.Hd=(this.ea=this.D[0].j("depth"))||1==this.D.length?this.D[0].j("nodeMaxDepth"):this.fb:this.Hd=this.ea=0,u(this),this.Ka=this.sb[0],g(this,e),d(this),this.La("treeMaxDepth",this.fb),e=b(this,this.P),this.La("levels",e),this.La("currentMaxDepth",this.Hd),this.La("currentRootDepth",this.ea)),this.B(20),this.I(36864)}},t.g.pb=function(){if(this.St(),this.J(32768)){if(this.D.length){this.Hd=(this.ea=this.D[0].j("depth"))||1==this.D.length?this.D[0].j("nodeMaxDepth"):this.fb,this.P={},u(this),this.Ka=t.ya(this.sb,(function(t){return t>=this.ea}),this),(0,t.Pe)(this.D,(function(t){g(this,t)}),this),d(this);var e=b(this,this.P);this.La("levels",e),this.La("currentMaxDepth",this.Hd),this.La("currentRootDepth",this.ea)}this.I(32768)}},t.g.Qh=function(e){if(!this.pf()){if(this.pb(),function(e){e.ue||(e.ue=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.ue.zIndex(30),e.ue.parent(e.Na),e.Dk(),e.o=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),e.o.zIndex(31),e.o.parent(e.Na),e.o.Dd(!0),e.yg=e.Na.Bd(),e.yg.zIndex(32),e.yg.Dd(!0))}(this),this.J(8192)&&(this.f.ak&&(this.f.eG(),this.f.ak.parent(this.Na),this.f.ak.zIndex(25),this.f.ak&&(t.J(this.f.gi,t.ig)?this.f.ak.Ja().wa("renderfinish",this.kK,!1,this):t.J(this.f.gi,t.Y)&&this.f.ak.wa("chartdraw",this.kL,!1,this))),this.I(8192)),this.J(4)&&(this.Mm(e),this.ue.clip(this.lf),this.o.clip(this.lf),this.yg.clip(this.lf),this.B(16)),this.J(16)){this.ue.clear(),this.o.clear(),function(t){if(t.aa){var e=t.aa.Jj;if(e&&t.aa.mL)for(var i in e)i in t.me||((e=t.yg.path()).stroke(null),t.me[i]=e),t.me[i].clear()}}(this),(e=this.ca.labels()).clear(),this.ca.labels().O()||(e.O(this.Na),e.zIndex(32)),a(this);var i,o=this.Vl(),r=this.G;if(this.ca.labels().ka(),i="desc"==(e=this.g("sort"))?n:"asc"==e?s:t.D(e)?e:null,this.qc=i?(0,t.pa)(i,this):null,i=this.D.slice(),this.qc&&t.Pa(i,this.qc),(0,t.Pe)(i,(function(e){o=t.ab(f(this,e,window.NaN,o,360,r))}),this),this.ca.labels().da(!1),this.ca.labels().W(),this.G){i=this.f.g("fill"),e=this.f.g("stroke"),this.Ha||(this.Ha=t.nk());var l=this.G-t.$b(e)/2;this.Ha.parent(this.Na).zIndex(20).stroke(e).fill(i).Eb(l)}else this.Ha&&this.Ha.parent(null);this.I(16)}this.J(4)&&(e=this.f.gi,i=this.f.ak,t.J(e,t.ig)?(e=e.rb(),c(this,e),i.clip(null)):t.J(e,t.Y)&&(e.ja(this.na),e.da(!1),e.W(),i.oc(1,0,0,1,0,0),i.clip(t.nk(this.Dc,this.uc,this.G+2))),this.Ha&&this.G&&this.Ha.To(this.Dc).Uo(this.uc))}},t.g.ke=function(e){var i=(e=t.em(e))==t.vo,n=e==t.wo,s=this.$(),a=s.j("sweep"),o=s.j("innerRadius"),r=s.j("outerRadius");if(e=(r+o)/2*Math.sin(t.bb(a/2)),(180>=a?5<=e:10<=r)&&20<=r-o){var l=s.f;e=this.ca.labels();var h=n?this.Ea.labels():i?this.za.labels():null,c=l.get("normal");c=t.p(c)?c.label:void 0,c=t.Zo(c,l.get("label"));var u=n?l.get("selected"):i?l.get("hovered"):void 0;u=t.p(u)?u.label:void 0,u=n?t.Zo(u,l.get("selectLabel")):i?t.Zo(u,l.get("hoverLabel")):null;var d=s.ma();(s=e.be(d))||(s=e.add(null,null,d));var p=l.j("depth");if(d=this.ec[p],p=this.Sb[this.fb-p],d)var g=d.Qa().labels(),f=n?d.selected().labels():i?d.lb().labels():null;if(p)var m=p.Qa().labels(),v=n?p.selected().labels():i?p.lb().labels():null;if(l.j("isLeaf")){var b=this.vw(),y=b.Qa().labels();b=n?b.selected().labels():i?b.lb().labels():null}s.Hi(),t.bv(s,t.no([u,0,b,t.jo,v,t.jo,f,t.jo,h,t.jo,c,0,y,t.jo,m,t.jo,g,t.jo,e,t.jo,s,t.jo,b,t.ko,f,t.ko,v,t.ko,h,t.ko,y,t.ko,m,t.ko,g,t.ko,e,t.ko])),(i=s.ic("enabled"))&&(n=y=null,g=this.Bh(),f=this.Ic(!0),s.Hf(f),s.height(n).width(y),b=s.ic("position"),f=(new t.Hu).N(s.ic("padding")),r-=o,v=g.value.angle,m=g.value.radius,"circular"==b||"radial"==b&&360==a?360!=a||o?(o=s,y=this.$(),v=t.p(m)?m:o.jc().value.radius,b=y.j("sweep"),n=y.j("start"),n=360==b?-90:n,h=(new t.Hu).N(o.ic("padding")),c=2*Math.PI*v/360,y=n,n+=b,u=Math.abs(n-y),l=this.g("stroke"),c=(u-(h.Ng(u*c)-t.$b(l))/c)/2,t.qd(h),y+=c,n-=c,h=b,c=t.ab(y+h/2),(0,window.isNaN)(h)&&(h=b),360==h&&(c=(-90+h)/2),0<c&&180>c&&(b=y,y=n,n=b,"top"==(b=o.ic("vAlign"))?o.ta("vAlign","bottom"):"bottom"==b&&o.ta("vAlign","top")),h=t.bb(y),b=t.hn(h,v,this.Dc),h=t.jn(h,v,this.uc),(c=o.Rh().path())?c.clear():(c=t.qk(),t.rd(this,c)),n!=y&&c.moveTo(b,h).MR(v,v,y,n-y),o.Rh().path(c),o=c,s.Rh().path(o),a=Math.PI*m*a/180,y=f.Ng(a),n=f.Yh(r)-15):((o=(a=s.Rh()).path())&&a.path(null),y=n=2*r,y=f.Ng(y),n=f.Yh(n)):"radial"==b&&(o=s,h=(u=this.$()).f,n=t.p(v)?v:o.jc().value.angle,c=u.j("start"),b=u.j("sweep"),y=u.j("innerRadius"),v=u.j("outerRadius"),(h=h.getParent())&&360==h.j("sweep")?h=n:(h=t.ab(c+b/2),360==b&&(h=(-90+b)/2),(0,window.isNaN)(h)&&(h=n)),b=v-y,c=o.ic("padding"),v-=t.L(c.left,b),y+=t.L(c.right,b),90<h&&270>h&&(b=y,y=v,v=b,"start"==(b=o.ic("hAlign"))||"left"==b?o.ta("hAlign","end"):("end"==b||"right"==b)&&o.ta("hAlign","start")),h=t.bb(n),n=t.hn(h,y,this.Dc),y=t.jn(h,y,this.uc),b=t.hn(h,v,this.Dc),v=t.jn(h,v,this.uc),(o=o.Rh().path())?o.clear():(o=t.qk(),t.rd(this,o)),o.moveTo(n,y).lineTo(b,v),s.Rh().path(o),a=Math.PI*m*a/180,n=f.Yh(a),y=f.Ng(r)),t.qd(f),s.width(y).height(n).jc(g)),i?s.W():e.clear(s.ma())}},t.g.Ic=function(e){var i=this.$(),n=i.f;return this.oe&&!e||(this.oe=new t.Fw),this.oe.lg(i).Li([this.ce(i.ma()),this]),e=this.g("calculationMode"),i=!!n.j("isLeaf"),n={value:{value:t.N("parent-independent"==e?i?n.get("value"):n.j("sunburst_visibleLeavesSum"):n.get("value")),type:"number"},name:{value:n.get("name"),type:"string"},index:{value:n.j("index"),type:"number"},chart:{value:this,type:""},item:{value:n,type:""},depth:{value:n.j("depth"),type:"number"}},t.ov(this.oe,n)},t.g.Bh=function(){var e=this.$(),i=e.j("start"),n=e.j("sweep"),s=e.j("innerRadius");return e=e.j("outerRadius"),{value:{angle:i=t.ab(i+n/2),radius:n=360!=n||s?s+(e-s)/2:0,x:t.hn(t.bb(i),n,this.Dc),y:t.jn(t.bb(i),n,this.uc)}}},t.g.Vl=function(){return this.g("startAngle")+-90},t.g.yj=function(){return this.St(),!this.i.length},t.g.ZT=function(){return[this.Dc,this.uc]},t.g.L1=function(){return this.na},t.g.jx=function(e,i){var n=t.so(i.event.domTarget);if(t.J(i.target,t.Pu)){var s=this.$();s.select(n),n=s.f}else n=n.node;return s={},!n||!n.bc()||-1!=(0,t.za)(this.D,n)&&1==this.D.length||(s["drill-down-to"]={index:7,text:"Drill down",eventType:"anychart.drillTo",action:(0,t.pa)(this.OF,this,n)}),(0!=this.ea||-1!=(0,t.za)(this.i,this.D[0])&&1<this.i.length&&1==this.D.length)&&(s["drill-down-up"]={index:7,text:"Drill up",eventType:"anychart.drillUp",action:(0,t.pa)(this.OF,this,this.D[0].getParent())}),t.Jc(s)||(s["drill-down-separator"]={index:7.1}),t.Sc(s,e),s},t.g.F=function(){var e=i.u.F.call(this);if(t.Tq(this,C,e,"Sunburst"),e.palette=this.cc().F(),e.hatchFillPalette=this.ve().F(),e.center=this.Tp().F(),this.ec.length||this.Sb.length){var n=[];(0,t.Pe)(this.ec,(function(t,e){n.push({index:e,level:t.F()})})),(0,t.Pe)(this.Sb,(function(t,e){n.push({index:-(e+1),level:t.F()})})),e.levels=n}return this.$a&&(e.leaves=this.vw().F()),{chart:e}},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.f,this.Fa,this.fd,this.ec,this.Sb,this.$a,this.Ag),this.Ag=this.$a=this.Sb=this.ec=this.fd=this.Fa=this.Ea=this.za=this.ca=null,i.u.R.call(this)},t.g.U=function(e,n){i.u.U.call(this,e,n),t.Iq(this,C,e),this.cc(e.palette),this.ve(e.hatchFillPalette),this.Tp().ga(!!n,e.center),t.A(e.levels)&&(0,t.Pe)(e.levels,(function(t){this.level(t.index,t.level)}),this),this.vw().ga(!!n,e.leaves),"drillTo"in e&&this.jr(e.drillTo)};var k=i.prototype;k.getType=k.Ma,k.data=k.data,k.level=k.level,k.leaves=k.vw,k.center=k.Tp,k.normal=k.Qa,k.hovered=k.lb,k.selected=k.selected,k.drillTo=k.jr,k.drillUp=k.ay,k.getDrilldownPath=k.uA,k.palette=k.cc,k.hatchFillPalette=k.ve,k.toCsv=k.Zj,k.statefulColoring=k.xca,t.Tp.sunburst=y,t.E("anychart.sunburst",y)}.call(this,$)),_.annotations||(_.annotations=1,function(t){var e=function(t,e,i,n,s){var a,o,r=s.left+s.width,l=s.top+s.height,h=(n-e)/(i-t),c=!1;if((0,window.isNaN)(h))if(t<s.left||t>r||e<s.top||e>l)c=!0;else var u=a=t,d=o=e;else if(h)if((0,window.isFinite)(h)){var p=e-t*h,g=h*s.left+p,f=h*r+p;g<s.top&&f<s.top||g>l&&f>l?c=!0:(a=(s.top-p)/h,h=(l-p)/h,g<s.top?(u=a,d=s.top):g>l?(u=h,d=l):(u=s.left,d=g),f<s.top?o=s.top:f>l?(a=h,o=l):(a=r,o=f))}else t<s.left||t>r?c=!0:(u=a=t,d=s.top,o=l);else e<s.top||e>l?c=!0:(u=s.left,a=r,d=o=e);return c?null:((t>i||t==i&&e>n)&&(t=u,u=a,a=t,t=d,d=o,o=t),[u,d,a,o])},i=function(t,i,n,s,a){if(a=e(t,i,n,s,a)){if(n-=t){s=a[0]-t;var o=a[2]-t}else{if(!(n=s-i))return a;s=a[1]-i,o=a[3]-i}0>o*n?a=null:0>n*s&&(a[0]=t,a[1]=i)}return a},n=function(t,i,n,s,a){if(a=e(t,i,n,s,a)){var o;if(o=n-t)var r=a[0]-t,l=a[2]-t,h=a[0]-n,c=a[2]-n;else{if(!(o=s-i))return a;r=a[1]-i,l=a[3]-i,h=a[1]-s,c=a[3]-s}0>l*o||0<h*o?a=null:(0>r*o&&(a[0]=t,a[1]=i),0<c*o&&(a[2]=n,a[3]=s))}return a},s=function(e){function i(){return new t.dy(!0,!0,!0)}t.Y.call(this),this.Ga("chart.defaultAnnotationSettings.base"),this.sb=e,this.Aa=this.P=null,this.state=t.gm,this.Ba=0,this.ba=1&this.Ee?"xAnchor":null,this.ea=2&this.Ee?"valueAnchor":null,this.Za=7<=this.Ee,this.Oe=!1,this.coords={},this.coords.xAnchor=window.NaN,this.coords.valueAnchor=window.NaN,this.coords.secondXAnchor=window.NaN,this.coords.secondValueAnchor=window.NaN,this.coords.thirdXAnchor=window.NaN,this.coords.thirdValueAnchor=window.NaN,this.na=null,this.fa=new t.I(0,0,0,0),this.ec=!0,t.T(this.ua,Q),e={},t.T(e,this.ng()),this.ca=new t.my(this,e,t.gm),this.ca.ta("markersFactoryConstructor",(function(){return new t.dy(!0,!0)})),this.ca.ta("markersAfterInitCallback",t.ty),e={},t.T(e,this.ng()),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("markersFactoryConstructor",i),e={},t.T(e,this.ng()),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("markersFactoryConstructor",i)},a=function(t){t.pb(),t.ba&&(t.Pa[t.ba]=t.Ra().Mc((t.D-t.fa.left)/t.fa.width)),t.ea&&(t.Pa[t.ea]=t.bb().Mc((t.fa.Va()-t.G)/t.fa.height)),t.D=t.G=window.NaN,t.Ka=!1,t.B(64)},o=function(t,e,i,n,s){e&&(t.coords[e]=t.na[e]+n,t.Pa[e]=t.Ra().Mc((t.coords[e]-t.fa.left)/t.fa.width)),i&&(t.coords[i]=t.na[i]+s,t.Pa[i]=t.bb().Mc((t.fa.Va()-t.coords[i])/t.fa.height))},r=function(t){return t.pb(),!t.ba&&!t.ea},l=function(t,e){return t.fa.left+e*t.fa.width},h=function(t,e){return t.fa.Va()-e*t.fa.height},c=function(e,i){if(!e)return d;var n=i+"|"+e+"|true",s=yt[n];if(!s){switch(i){case 2:s=t.Zl;break;case 3:s=t.$l;break;default:s=t.am}yt[n]=s=t.qa(u,e,s,3==i,!0)}return s},u=function(e,i,n,s,a,o,r){if(o=t.em(o),s&&o!=t.gm){var l=a.sc(e,o,i);if(n&&!0===l&&(l=i(a.Eh())),t.p(l)){if(!t.D(l))return l;if(n)return n=a.Yi(),i(l.call(n,n))}}return e=a.sc(e,0,i),n&&!0===e&&(e=i(a.Eh())),t.D(e)&&(n=n?a.Yi():a.Ge(void 0,r),e=i(e.call(n,n))),l&&(n=a.Ge(e,r),e=i(l.call(n,n))),e},d=function(){return"none"},p=function(e){t.V.call(this),this.pa=e,this.i=this.b=null,this.o=!1,this.f=[],this.gv(!1)},g=function(e,i){if(e.o!=i){e.o=i,e.pa.ka();for(var n=0;n<e.f.length;n++){var s=e.f[n],a=i;s.aa!=a&&(s.aa=a,!a&&s.f&&(s.f.gc("mouseout",s.TU,!1,s),s.f.gc("mousedown",s.RU,!1,s),t.Yd(t.ll,"mouseup",s.UU,!1,s),t.Yd(t.ll,"mousemove",s.SU,!1,s)),s.B(128,1))}e.pa.da(!0)}},f=function(e,i){if(t.z(i))var n=i,s=void 0;else t.C(i)&&(n=i.type,s=i);return n=t.zk(X,n,"line"),(n=new J[n](e)).Ga("chart.defaultAnnotationSettings."+t.pm(n.Ma())),n.AB(),n.N(s),n},m=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},v=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},b=function(e){s.call(this,e),this.f=this.b=null,this.K=[],this.$a=c("stroke",2),this.qc=c("trend",2),this.fb=!1,t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),this.ca.ta("labelsAfterInitCallback",t.sy)},y=function(t,e){var i=t.nC().dg();return i=1-(e-i.top)/i.height,t.bb().Mc(i)},S=function(t,e){var i=t.nC().dg();return i=(e-i.left)/i.width,t.Ra().Mc(i)},x=function(t){b.call(this,t)},w=function(t){b.call(this,t),this.Ha=[],this.o=null,this.Sb=c("grid",2)},C=function(t){b.call(this,t)},T=function(t){b.call(this,t)},D=function(e){s.call(this,e),this.b=!1,this.Ca=null,this.K=c("stroke",2),this.f=c("fill",1),this.o=c("hatchFill",3),t.tq(this.ua,"channelWidth",320,1),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},k=function(t){var e=t.bb().Mc(.5),i=t.g("channelWidth");return(.5-t.bb().transform(e+i))*t.fa.height},$=function(t,e){var i=t.bb().Mc(.5),n=.5+e/t.fa.height;return i-(n=t.bb().Mc(n))},O=function(t){for(var e=0;e<t.Ca.length;e++)t.Ca[e].clear()},P=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,nt)},L=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},I=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},A=function(e){s.call(this,e),this.Ga("defaultFontSettings"),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,ut),t.Eq(this.ua,256,16,1,1),delete this.ua.fontFamily,delete this.ua.fontStyle,delete this.ua.fontVariant,delete this.ua.fontWeight,delete this.ua.fontSize,delete this.ua.fontColor,delete this.ua.fontOpacity},E=function(t){return"left-top"==t||"left-center"==t||"left-bottom"==t},G=function(t){return"right-top"==t||"right-center"==t||"right-bottom"==t},U=function(t){return"left-top"==t||"center-top"==t||"right-top"==t},F=function(t){return"left-bottom"==t||"center-bottom"==t||"right-bottom"==t},M=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},_=function(e){s.call(this,e),this.ec=!1,this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,ht)},N=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},R=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},j=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},B=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at),t.T(this.ua,rt)},H=function(e){s.call(this,e),this.Ca=null,this.b=c("stroke",2),t.T(this.ua,et)},z=function(e){s.call(this,e),this.Ca=null,this.o=c("stroke",2),this.b=c("fill",1),this.f=c("hatchFill",3),t.T(this.ua,et),t.T(this.ua,nt),t.T(this.ua,at)},V=function(e,i){t.Y.call(this),this.ib=e,e.f&&e.f.push(this),this.Ba=i,this.Sf=[],this.f=this.b=null,this.aa=!1,this.D=this.i=window.NaN,this.o=this.mf=null},q=function(e,i){var n=t.Zj(e.O().Ja());e.i=i.clientX-n.x,e.D=i.clientY-n.y},W=function(e,i,n){var s=!n||i!=e.o;n?(e.Sf.push(i),e.o=null,e.b&&i.O(e.b)):e.o=i;var a=i.P!=e;i.Ka=!n,i.P=e,a&&i.B(64),i.kb(e),t.K(i,e.VZ,e),s&&e.B(64,1)},Y=function(e,i){if(t.p(i)){if(t.sd(e.Sf),e.Sf.length=0,t.A(i))for(var n=0;n<i.length;n++)W(e,f(e.ib,i[n]),!0);return e}return(0,t.Wa)(e.Sf,(function(t){return t.F()}))},K=function(e){this.ib=e,this.b=null,this.i=window.NaN,t.ag.call(this,e.b.ia()),this.wa("start",this.qga,!1,this),this.wa("end",this.oga,!1,this)},X={pra:"ray",tt:"line",gpa:"infinite-line",Ssa:"vertical-line",epa:"horizontal-line",q9:"rectangle",j8:"ellipse",Csa:"triangle",Bsa:"trend-channel",Noa:"finite-trend-channel",fma:"andrews-pitchfork",Koa:"fibonacci-fan",Joa:"fibonacci-arc",Loa:"fibonacci-retracement",Moa:"fibonacci-timezones",av:"marker",opa:"label",fpa:"horizontal-range",Tsa:"vertical-range"},J={},Z={};t.rq(Z,0,"color",t.Sq),t.rq(Z,0,"allowEdit",t.Dq),t.rq(Z,0,"hoverGap",(function(e){return t.P(e,window.NaN,!0)}));var Q=[["color",16,1],["allowEdit",1024,1],["hoverGap",256,1]],tt={};t.rq(tt,0,"xAnchor",t.Cq);var et=[["xAnchor",192,1]],it={};t.rq(it,0,"valueAnchor",t.Cq);var nt=[["valueAnchor",192,1]],st={};t.rq(st,0,"secondXAnchor",t.Cq),t.rq(st,0,"secondValueAnchor",t.Cq);var at=[["secondXAnchor",192,1],["secondValueAnchor",192,1]],ot={};t.rq(ot,0,"thirdXAnchor",t.Cq),t.rq(ot,0,"thirdValueAnchor",t.Cq);var rt=[["thirdXAnchor",192,1],["thirdValueAnchor",192,1]],lt={};t.rq(lt,0,"markerType",t.Ok),t.rq(lt,0,"anchor",t.Dk),t.rq(lt,0,"offsetX",t.Bq),t.rq(lt,0,"offsetY",t.Bq);var ht=[["markerType",256,1],["anchor",256,1],["offsetX",256,1],["offsetY",256,1]],ct=t.vq();delete ct.fontFamily,delete ct.fontStyle,delete ct.fontVariant,delete ct.fontWeight,delete ct.fontSize,delete ct.fontColor,delete ct.fontOpacity,t.sq(ct,[[0,"text",t.zq],[0,"anchor",t.Dk],[0,"offsetX",t.Bq],[0,"offsetY",t.Bq],[0,"width",t.xq],[0,"height",t.xq]]);var ut=[["text",256,1],["anchor",256,1],["offsetX",256,1],["offsetY",256,1],["width",256,1],["height",256,1]],dt=[["stroke",272,1]],pt=[["grid",16,1]],gt=[["size",256,1]],ft=[["fontFamily",256,1],["fontStyle",256,1],["fontVariant",256,1],["fontWeight",256,1],["fontSize",256,1],["fontColor",16,1],["fontOpacity",16,1],["fontDecoration",256,1]],mt=t.Ga([["fill",16,1],["hatchFill",16,1]],dt),vt=t.Ga(dt,[["trend",16,1]]),bt=[["labels",0,0]];t.H(s,t.wu),t.Gq(s,["markers"],"normal"),t.U(s,Z),t.g=s.prototype,t.g.ng=function(){return[["markers",0,0]]},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.sc=function(t,e){return(0==e?this.ca:1==e?this.za:this.Ea).g(t)},t.g.sa=2e3|t.wu.prototype.sa,t.g.ra=t.wu.prototype.ra,t.g.Ee=0;var yt={};t.g=s.prototype,t.g.Fc=null,t.g.eb=null,t.g.Ma=function(){return this.type},t.g.xc=function(){return this.sb.xc()},t.g.nC=function(){return this.P&&this.P.Ba},t.g.bb=function(e){if(t.p(e)){var i=t.jt(this.Fc,e,null,15,null,this.YO,this);return(i||null===e)&&(e=this.Fc==i,i||t.kr(this.Fc,this.YO,this),(this.Fc=i)&&i.da(e),e||this.B(64,1)),this}return(this.Fc?this.Fc:this.nC()&&this.nC().bb())||null},t.g.Ra=function(e){if(t.p(e)){var i=e&&t.D(e.Ma)&&e.Ma(),n=(i="stock-scatter-date-time"==i||"stock-ordinal-date-time"==i)?e:t.jt(this.eb,e,null,15,null,this.YO,this);return(n||null===e)&&(e=this.eb==n,n||t.kr(this.eb,this.YO,this),(this.eb=n)&&!i&&n.da(e),e||this.B(64,1)),this}return this.eb||this.xc().Ra()},t.g.UB=function(t,e){this.D=t,this.G=e,this.B(128)},t.g.mJ=function(){this.na=this.coords,this.coords=t.Qc(this.coords)},t.g.KI=function(t,e,i){switch(t){case-1:3&this.Ee&&(o(this,1&this.Ee?"xAnchor":null,2&this.Ee?"valueAnchor":null,e,i),7&this.Ee&&(o(this,"secondXAnchor","secondValueAnchor",e,i),15&this.Ee&&o(this,"thirdXAnchor","thirdValueAnchor",e,i)));break;case 0:o(this,1&this.Ee?"xAnchor":null,2&this.Ee?"valueAnchor":null,e,i);break;case 1:o(this,"secondXAnchor","secondValueAnchor",e,i);break;case 2:o(this,"thirdXAnchor","thirdValueAnchor",e,i)}return this.B(768),this.W(),this},t.g.wt=function(t){this.state=t,this.B(528)},t.g.pb=function(){if(this.J(64)){var t,e,i,n,s,a=this.Ra(),o=this.bb();if(!a||!o)return!1;var r=t=e=i=n=s=window.NaN,c=0,u=0;1&this.Ee&&(r=l(this,a.transform(this.nd("xAnchor"),.5)),(0,window.isNaN)(r)?u|=1:c|=1),2&this.Ee&&(t=h(this,o.transform(this.nd("valueAnchor"),.5)),(0,window.isNaN)(t)?u|=2:c|=2),4&this.Ee&&(e=l(this,a.transform(this.nd("secondXAnchor"),.5)),i=h(this,o.transform(this.nd("secondValueAnchor"),.5)),(0,window.isNaN)(e)||(0,window.isNaN)(i)?u|=4:c|=4),8&this.Ee&&(n=l(this,a.transform(this.nd("thirdXAnchor"),.5)),s=h(this,o.transform(this.nd("thirdValueAnchor"),.5)),(0,window.isNaN)(n)||(0,window.isNaN)(s)?u|=8:c|=8),a=!1;var d=o=null;3&u?(o=1&this.Ee?"xAnchor":null,d=2&this.Ee?"valueAnchor":null,a=3<this.Ee,this.aa=3&this.Ee):4&u?(o="secondXAnchor",d="secondValueAnchor",a=7<this.Ee,this.aa=4):8&u?(o="thirdXAnchor",d="thirdValueAnchor",this.aa=8):this.aa=0,this.coords.xAnchor=r,this.coords.valueAnchor=t,this.coords.secondXAnchor=e,this.coords.secondValueAnchor=i,this.coords.thirdXAnchor=n,this.coords.thirdValueAnchor=s,this.Ba=c,this.ba=o,this.ea=d,this.Za=a,this.Oe=this.Qk(),(0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)||this.B(128),this.B(768),this.I(64)}return this.J(128)&&((0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)?this.i=this.Ba:(this.ba&&(this.coords[this.ba]=this.D),this.ea&&(this.coords[this.ea]=this.G),this.i=this.Ba|this.aa),this.B(768),this.I(128)),this.Oe||!(0,window.isNaN)(this.D)&&!(0,window.isNaN)(this.G)},t.g.Qk=function(){var t=this.fa;if(2==this.Ee){var e=this.coords.valueAnchor;return e>=t.top&&e<=t.Va()}(e=[]).push(this.coords.xAnchor),e.push(this.coords.secondXAnchor),e.push(this.coords.thirdXAnchor);for(var i=!0,n=!0,s=0;s<e.length;s++)(0,window.isNaN)(e[s])||(i=i&&e[s]<t.left,n=n&&e[s]>t.cb());return!i&&!n},t.g.W=function(){if(!this.zc())return this;this.ka(),this.J(4)&&(this.fa=this.ob(),this.B(64),this.I(4)),this.Fg();var t=this.pb();if(this.PO(),this.J(16)&&(this.wg(this.state),this.I(16)),this.J(256)){if(!t)return this.remove(),this.B(2),this.da(!1),this;15==this.Ee&&15==this.i?this.bM(this.coords.xAnchor,this.coords.valueAnchor,this.coords.secondXAnchor,this.coords.secondValueAnchor,this.coords.thirdXAnchor,this.coords.thirdValueAnchor):7<=this.Ee&&7<=this.i?this.cp(this.coords.xAnchor,this.coords.valueAnchor,this.coords.secondXAnchor,this.coords.secondValueAnchor):(3<=this.Ee&&3<=this.i||this.i==this.Ee)&&this.tm(this.coords.xAnchor,this.coords.valueAnchor),this.I(256)}if(this.J(1024)&&(this.Aa.Dd(!this.g("allowEdit")),this.I(1024)),this.J(512)){if(this.ec){t=this.Qa().Db();var e=this.lb().Db().enabled()||this.selected().Db().enabled();t.ka(),!1!==t.enabled()||e?(t.O(this.Aa),t.clear(),t.ja(this.fa),t.zh=5,this.YL(this.state)):(t.clear(),t.O(null)),t.W(),t.da(!1)}this.I(512)}return this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(this.O()),this.I(2)),this.da(!1),this},t.g.PO=function(){},t.g.zc=function(){var t=s.u.zc.call(this);return!t||this.P&&this.Ra()&&this.bb()||(this.remove(),this.B(2),t=!1),t},t.g.remove=function(){this.Aa&&this.Aa.remove();var t=this.Qa().Db();t.remove(),t.B(2)},t.g.Fg=function(){this.Aa||(this.Aa=t.ok(),this.Aa.cursor("move"),this.Aa.tag=this)},t.g.tm=function(){},t.g.cp=function(t,e){this.tm(t,e)},t.g.bM=function(t,e,i,n){this.cp(t,e,i,n)},t.g.wg=function(){},t.g.Ge=function(t){return{sourceColor:t||this.g("color")||"blue"}},t.g.Yi=function(){return{sourceHatchFill:this.Eh()}},t.g.Eh=function(){return t.Yb("diagonal-brick")},t.g.YO=function(e){t.X(e,2)&&this.B(64,1)},t.g.Mn=function(e){t.X(e,1)&&this.B(512,1)},t.g.qJ=t.ia,t.g.YL=function(e){var i=this.Qa().Db();switch(e=t.em(e)){case t.vo:e=this.lb().Db();break;case t.wo:e=this.selected().Db();break;default:e=null}if(e&&null!==e.enabled()?e.enabled():i.enabled())for(var n=this.SC(),s=0;s<n.length;s++){var a=n[s],o=i.jp(s);o?o.jc(a):o=i.add(a,s),o.Hi(),t.gy(o,e||i),o.td(),o.W(),this.qJ(o,s)}else i.clear()},t.g.SC=function(){var e=[];if(1==this.Ee){var i=this.coords.xAnchor;(0,window.isNaN)(i)||e.push({x:i,y:this.fa.top+this.fa.height/2})}else 2==this.Ee?(i=this.coords.valueAnchor,(0,window.isNaN)(i)||e.push({x:this.fa.left+this.fa.width/2,y:i})):this.Ee&this.i&3&&(e.push({x:this.coords.xAnchor,y:this.coords.valueAnchor}),this.Ee&this.i&4&&(e.push({x:this.coords.secondXAnchor,y:this.coords.secondValueAnchor}),this.Ee&this.i&8&&e.push({x:this.coords.thirdXAnchor,y:this.coords.thirdValueAnchor})));return(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.select=function(){this.P.ib.select(this)},t.g.ie=function(){this.P.ib.ie()},t.g.ph=function(t){return null!=this.Pa[t]},t.g.AB=function(){"label"==t.pm(this.Ma())&&this.ca.Ga("defaultFontSettings"),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.F=function(){var e=s.u.F.call(this);return e.type=this.Ma(),t.Tq(this,Z,e,"Annotation"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.U=function(e,i){s.u.U.call(this,e,i),t.Iq(this,Z,e),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.R=function(){t.qd(this.Aa),this.Aa=null,delete this.sb,this.Fc=this.eb=this.P=null,delete this.Pa,delete this.oa,s.u.R.call(this)};var St=s.prototype;St.getType=St.Ma,St.getChart=St.xc,St.getPlot=St.nC,St.yScale=St.bb,St.xScale=St.Ra,St.select=St.select,St.normal=St.Qa,St.hovered=St.lb,St.selected=St.selected,t.H(p,t.V),t.g=p.prototype,t.g.xc=function(){return this.pa},t.g.Tj=function(e){this.b!=e&&this.i!=e&&(this.Md(),e.wt(t.vo),this.gv()&&e.W()),this.i=e},t.g.Md=function(){this.i&&(this.i!=this.b&&(this.i.wt(t.gm),this.gv()&&this.i.W()),this.i=null)},t.g.select=function(e){if(this.b!=e){if(this.ie(),this.b)return this;this.pa.dispatchEvent({type:"annotationSelect",annotation:e})&&(this.b=e,e.wt(t.wo),this.gv()&&r(e)?e.W():g(this,!0))}return this},t.g.ie=function(){return this.b&&this.pa.dispatchEvent({type:"annotationUnselect",annotation:this.b})&&(this.b.wt(this.i==this.b?t.vo:t.gm),this.gv()&&this.b.W(),this.b=null,g(this,!1)),this},t.g.iaa=function(){return this.b},t.g.gv=function(e){return t.p(e)?(this.D=!!e,this):this.D},t.g.jaa=function(){for(var t=0;t<this.f.length;t++)this.f[t].WZ();return this},t.g.kaa=function(e){var i=e.P;return this.b==e&&(this.b=null,g(this,!1)),i?i.cR(e):t.qd(e),this},t.g.Gd=function(e){return this.gv()?(this.bR(),e=f(this,e),this.select(e),this.b||(t.qd(e),e=null),e):null},t.g.bR=function(){if(this.pa.ka(),this.b&&!r(this.b)){var e=this.b.P;e?e.cR(this.b):t.qd(this.b),this.b=null}g(this,!1),this.pa.da(!0)},t.g.R=function(){t.sd(this.f),this.f=null,p.u.R.call(this)};var xt=p.prototype;xt.startDrawing=xt.Gd,xt.cancelDrawing=xt.bR,xt.getSelectedAnnotation=xt.iaa,xt.removeAnnotation=xt.kaa,xt.removeAllAnnotations=xt.jaa,xt.select=xt.select,xt.unselect=xt.ie,t.E("anychart.annotations.ChartController",p),t.H(m,s),t.Gq(m,["stroke"],"normal"),t.U(m,tt),t.U(m,it),t.U(m,st),t.U(m,ot),J["andrews-pitchfork"]=m,t.g=m.prototype,t.g.type="andrews-pitchfork",t.g.Ee=15,t.g.ng=function(){var e=m.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){m.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(t,e,i,n){for(var s=0;s<this.Ca.length;s++){var a=this.Ca[s];a.clear(),a.moveTo(t,e).lineTo(t,e),a.moveTo(i,n).lineTo(i,n)}},t.g.bM=function(t,e,s,a,o,r){var l=(s+o)/2-t,h=(a+r)/2-e;for(l||h||(l=10),t=i(t,e,t+l,e+h,this.fa),e=i(s,a,s+l,a+h,this.fa),l=i(o,r,o+l,r+h,this.fa),s=n(s,a,o,r,this.fa),a=0;a<this.Ca.length;a++)(o=this.Ca[a]).clear(),r=!1,e&&(o.moveTo(e[2],e[3]).lineTo(e[0],e[1]),r=!0),s?(r?o.lineTo(s[0],s[1]):o.moveTo(s[0],s[1]),o.lineTo(s[2],s[3]),r=!0):r=!1,l&&(r?o.lineTo(l[0],l[1]):o.moveTo(l[0],l[1]),o.lineTo(l[2],l[3])),t&&o.moveTo(t[0],t[1]).lineTo(t[2],t[3])},t.g.wg=function(e){m.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){var t=m.u.Qk.call(this);if(!t){t=this.coords.xAnchor;var e=(this.coords.secondXAnchor+this.coords.thirdXAnchor)/2-t;t=!(0,window.isNaN)(e)&&!(t<this.fa.left&&0>=e||t>this.fa.cb()&&0<=e)}return t},t.g.F=function(){var e=m.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),t.Tq(this,ot,e,"Annotation"),e},t.g.U=function(e,i){t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e),t.Iq(this,ot,e),m.u.U.call(this,e,i)},t.g.R=function(){m.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(v,s),t.Gq(v,["fill","hatchFill","stroke"],"normal"),t.U(v,tt),t.U(v,it),t.U(v,st),t.U(v,ot),J.ellipse=v,t.g=v.prototype,t.g.type="ellipse",t.g.Ee=7,t.g.ng=function(){var e=v.u.ng.call(this);return t.Ga(e,mt)},t.g.Fg=function(){v.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(t,e,i,n){var s=(e+n)/2;for(i=(t-i)/2,e=(e-n)/2,n=0;n<this.Ca.length;n++){var a=this.Ca[n];a.clear(),a.moveTo(t,s),a.arcTo(i,e,0,360)}},t.g.wg=function(e){v.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=v.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){v.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){v.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(b,s),t.Gq(b,["stroke","trend","labels"],"normal"),t.U(b,tt),t.U(b,it),t.U(b,st),t.g=b.prototype,t.g.sa=6144|s.prototype.sa,t.g.Ee=7,t.g.pK=function(e){if(t.p(e)){if(t.A(e)){for(var i=this.K.length=0;i<e.length;i++){var n=t.N(e[i]);(0,window.isNaN)(n)||this.K.push(n)}this.B(6400,1)}return this}return t.Ja(this.K,0)},t.g.ng=function(){var e=b.u.ng.call(this);return t.Ga(e,bt,vt,bt)},t.g.wt=function(t){b.u.wt.call(this,t),this.B(2048)},t.g.Fg=function(){b.u.Fg.call(this),this.b||(this.b=[this.Aa.path(),this.Aa.path()],this.b[0].zIndex(2),this.b[1].zIndex(3))},t.g.PO=function(){if(this.J(4096)){var e;for(this.f||(this.f=[]),e=this.f.length;e<this.K.length;e++)this.f.push(this.Aa.path().zIndex(0));for(e=this.K.length;e<this.f.length;e++)t.qd(this.f[e]);this.f.length=this.K.length,this.B(2304),this.I(4096)}if(this.J(256)&&this.B(2048),this.J(2048)){this.fb=!1,e=this.Qa().labels();var i=this.lb().labels().enabled()||this.selected().labels().enabled();e.ka(),7!=this.i||!1===e.enabled()&&!i?(e.clear(),e.O(null)):(e.O(this.Aa),e.clear(),e.ja(this.fa),e.zh=4,this.fb=!0,this.B(256)),e.W(),(i=e.sl())&&i.Dd(!0),e.da(!1),this.I(2048)}},t.g.tm=function(t,e){for(var i=0;i<this.b.length;i++){var n=this.b[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,i,n,s){for(var a=0;a<this.b.length;a++){var o=this.b[a];o.clear(),o.moveTo(e,i).lineTo(n,s)}for(a=0;a<this.f.length;a++)this.f[a].clear();var r;e=this.Qa().labels(),r=this.state&t.wo?this.selected().labels():this.state&t.vo?this.lb().labels():null,i=!this.fb||r&&null!==r.enabled()?r.enabled():e.enabled(),e.ka(),this.mT(e,r,i),i||e.clear(),e.W(),e.da(!1)},t.g.mT=function(e,i,n){for(var s=0;s<this.K.length;s++){var a=this.f[s],o=a.stroke();this.JG(s,this.K[s],a,this.b[1],e,i,n,t.dp(o))}},t.g.JG=function(){},t.g.wg=function(e){b.u.wg.call(this,e);var i=this.qc(this,e);for(t.p(i)||(i=this.$a(this,e)),this.b[0].fill(null).stroke(i),this.b[1].fill(t.bm).stroke(t.bm,2*this.hoverGap()),i=0;i<this.f.length;i++)this.f[i].fill(null).stroke(this.$a(this,e,i))},t.g.Ge=function(e,i){var n=b.u.Ge.call(this,e,i);return t.p(i)&&(n.level=this.K[i]),n},t.g.de=function(e){t.X(e,1)&&this.B(2048,1)},t.g.Ic=function(e,i,n){return this.oe||(this.oe=new t.Fw),t.ov(this.oe,{annotation:{value:this,type:""},level:{value:e,type:"number"},levelValue:{value:n?i:this.bb().CE(i,2),type:n?"date-time":"number"},rawLevelValue:{value:i,type:n?"date-time":"number"}}),this.oe},t.g.tf=function(e,i,n,s,a,o){if(s&&a){var r=i.be(e);if(r?(r.Hf(s),r.jc(a)):r=i.add(s,a,e),r.Hi(),t.$u(r,n),o&&r.qk(o),r.W(),(e=i.yl(r))&&e.length){for((i=this.b[1]).moveTo(e[0],e[1]),n=2;n<e.length;n+=2)i.lineTo(e[n],e[n+1]);i.close()}}else i.clear(e)},t.g.AB=function(t){b.u.AB.call(this,t),this.pK(this.g("levels"))},t.g.F=function(){var e=b.u.F.call(this);return e.levels=this.pK(),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){b.u.U.call(this,e,i),this.pK(e.levels),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){b.u.R.call(this),t.sd(this.b),t.sd(this.f),this.f=this.b=null,delete this.$a,delete this.qc};var wt=b.prototype;wt.levels=wt.pK,t.H(x,b),J["fibonacci-arc"]=x,x.prototype.type="fibonacci-arc",x.prototype.JG=function(e,i,n,s,a,o,r){var l=this.coords.valueAnchor,h=this.coords.secondXAnchor,c=this.coords.secondValueAnchor,u=c+i*(l-c),d=t.gn(h+i*(this.coords.xAnchor-h),u,h,c);u<c?(n.Fe(h,c,d,d,180,180),s.Fe(h,c,d,d,180,180)):(n.Fe(h,c,d,d,0,180),s.Fe(h,c,d,d,0,180)),r&&(l<c?(s=c-d,n="center-bottom"):(s=c+d,n="center-top"),h={x:h,y:s},this.tf(e,a,o,this.Ic(i,y(this,s),!1),{value:h},n))},x.prototype.Qk=function(){var e=x.u.Qk.call(this);if(!e){var i=this.coords.xAnchor,n=this.coords.valueAnchor;e=this.coords.secondXAnchor;var s=this.coords.secondValueAnchor,a=Math.max.apply(Math,this.K);i=t.gn(e+a*(i-e),s+a*(n-s),e,s),e=!(0,window.isNaN)(i)&&!(e+i<this.fa.left||e-i>this.fa.cb())}return e},t.H(w,b),t.Gq(w,["grid"],"normal"),J["fibonacci-fan"]=w,t.g=w.prototype,t.g.type="fibonacci-fan",t.g.LP=function(e){if(t.p(e)){if(t.A(e)){for(var i=this.Ha.length=0;i<e.length;i++){var n=t.N(e[i]);(0,window.isNaN)(n)||this.Ha.push(n)}this.B(6400,1)}return this}return t.Ja(this.Ha,0)},t.g.ng=function(){var e=w.u.ng.call(this);return t.Ga(e,pt)},t.g.mT=function(e,s,a){var o,r;for(o=0;o<this.o.length;o++)this.o[o].clear();for(w.u.mT.call(this,e,s,a),o=0,r=this.K.length;o<this.Ha.length;o++,r++){var l=this.f[r],h=l.stroke(),c=r,u=this.Ha[o],d=l,p=this.b[1];l=e;var g=s,f=a,m=t.dp(h),v=this.coords.xAnchor;h=this.coords.valueAnchor;var b=this.coords.secondXAnchor,y=this.coords.secondValueAnchor,x=v+(b-v)*u,C=this.o[c],T=C.stroke();v==(b=x)&&(b=v=t.R(v,m)),x=t.R(x,t.dp(T)),m=i(v,h,b,y,this.fa),v=n(x,h,x,y,this.fa),m&&(d.moveTo(m[0],m[1]).lineTo(m[2],m[3]),p.moveTo(m[0],m[1]).lineTo(m[2],m[3])),v&&(C.moveTo(v[0],v[1]).lineTo(v[2],v[3]),p.moveTo(v[0],v[1]).lineTo(v[2],v[3])),f&&this.fa.left<=x&&x<=this.fa.cb()&&(d={value:{x:x,y:h}},this.tf(c,l,g,this.Ic(u,S(this,x),!0),d,h<y?"center-bottom":"center-top"))}},t.g.JG=function(e,s,a,o,r,l,h,c){var u=this.coords.xAnchor,d=this.coords.valueAnchor,p=this.coords.secondXAnchor,g=this.coords.secondValueAnchor,f=d+(g-d)*s,m=this.o[e],v=m.stroke();d==(g=f)&&(g=d=t.R(d,c)),f=t.R(f,t.dp(v)),c=i(u,d,p,g,this.fa),d=n(u,f,p,f,this.fa),c&&(a.moveTo(c[0],c[1]).lineTo(c[2],c[3]),o.moveTo(c[0],c[1]).lineTo(c[2],c[3])),d&&(m.moveTo(d[0],d[1]).lineTo(d[2],d[3]),o.moveTo(d[0],d[1]).lineTo(d[2],d[3])),h&&this.fa.left<=u&&u<=this.fa.cb()&&(a={value:{x:u,y:f}},this.tf(e,r,l,this.Ic(s,y(this,f),!1),a,u<p?"right-center":"left-center"))},t.g.Qk=function(){var t=w.u.Qk.call(this);if(!t){t=this.coords.xAnchor;var e=this.coords.secondXAnchor-t;t=!(0,window.isNaN)(e)&&!(t<this.fa.left&&0>=e||t>this.fa.cb()&&0<=e)}return t},t.g.wg=function(e){w.u.wg.call(this,e);for(var i=0;i<this.o.length;i++){var n=this.Sb(this,e,i);t.p(n)||(n=this.$a(this,e,i)),this.o[i].fill(null).stroke(n)}},t.g.Ge=function(e,i){var n={sourceColor:e||this.g("color")||"blue"};if(t.p(i)){n.isTimeLevel=i>=this.K.length;var s=n.isTimeLevel?this.Ha[i-this.K.length]:this.K[i];n.levelRatio=s,n.isTimeLevel?n.timeLevel=s:n.level=s}return n},t.g.Ic=function(e,i,n){return this.oe||(this.oe=new t.Fw),(e={annotation:{value:this,type:""},level:{value:e,type:"number"},levelRatio:{value:e,type:"number"},levelValue:{value:n?i:this.bb().CE(i,2),type:n?"date-time":"number"},rawLevelValue:{value:i,type:n?"date-time":"number"}}).isTimeLevel={value:n,type:""},t.ov(this.oe,e),this.oe},t.g.PO=function(){if(this.J(4096)){this.f||(this.f=[]),this.o||(this.o=[]);var e,i=this.K.length+this.Ha.length;for(e=this.f.length;e<i;e++)this.f.push(this.Aa.path().zIndex(0));for(e=i;e<this.f.length;e++)t.qd(this.f[e]);for(this.f.length=i,e=this.o.length;e<i;e++)this.o.push(this.Aa.path().zIndex(0));for(e=i;e<this.o.length;e++)t.qd(this.o[e]);this.o.length=i,this.B(2304),this.I(4096)}w.u.PO.call(this)},t.g.AB=function(t){w.u.AB.call(this,t),this.LP(this.g("timeLevels"))},t.g.F=function(){var t=w.u.F.call(this);return t.timeLevels=this.LP(),t},t.g.U=function(t,e){w.u.U.call(this,t,e),this.LP(t.timeLevels)},t.g.R=function(){w.u.R.call(this),t.sd(this.o),this.o=null,delete this.Sb};var Ct=w.prototype;Ct.timeLevels=Ct.LP,t.H(C,b),J["fibonacci-retracement"]=C,C.prototype.type="fibonacci-retracement",C.prototype.JG=function(e,n,s,a,o,r,l,h){var c=this.coords.secondValueAnchor,u=Math.min(this.coords.xAnchor,this.coords.secondXAnchor);h=t.R(c+(this.coords.valueAnchor-c)*n,h),(c=i(u,h,u+10,h,this.fa))&&(s.moveTo(c[0],c[1]).lineTo(c[2],c[3]),a.moveTo(c[0],c[1]).lineTo(c[2],c[3])),l&&(s={value:{x:u,y:h}},this.tf(e,o,r,this.Ic(n,y(this,h),!1),s))},C.prototype.Qk=function(){var t=C.u.Qk.call(this);return t||(t=Math.min(this.coords.xAnchor,this.coords.secondXAnchor),t=!(0,window.isNaN)(t)&&t<=this.fa.cb()),t},t.H(T,b),J["fibonacci-timezones"]=T,T.prototype.type="fibonacci-timezones",T.prototype.JG=function(e,i,n,s,a,o,r,l){var h=this.coords.secondXAnchor;if(l=t.R(h+Math.abs(this.coords.xAnchor-h)*i,l),this.fa.left<=l&&l<=this.fa.cb()){h=this.fa.top;var c=this.fa.Va();n.moveTo(l,h).lineTo(l,c),s.moveTo(l,h).lineTo(l,c),r&&(n={value:{x:l,y:c}},this.tf(e,a,o,this.Ic(i,S(this,l),!0),n,"left-bottom"))}},T.prototype.Qk=function(){var t=T.u.Qk.call(this);return t||(t=Math.min(this.coords.xAnchor,this.coords.secondXAnchor),t=!(0,window.isNaN)(t)&&t<=this.fa.cb()),t},t.H(D,s),J["finite-trend-channel"]=D,t.Gq(D,["fill","hatchFill","stroke"],"normal"),t.U(D,tt),t.U(D,it),t.U(D,st),D.prototype.Ee=7;var Tt={};t.rq(Tt,0,"channelWidth",t.Bq),t.U(D,Tt),t.g=D.prototype,t.g.type="finite-trend-channel",t.g.tm=function(t,e){O(this),this.Ca[0].moveTo(t,e).lineTo(t,e)},t.g.cp=function(t,e,i,n){r(this)&&this.b&&(this.ta("channelWidth",$(this,(n-e)/2)),this.b=!1),O(this);var s=this.Ca[0],a=k(this);for(s.moveTo(t,e).lineTo(i,n),s.moveTo(t,e+a).lineTo(i,n+a),s=1;s<this.Ca.length;s++){var o=this.Ca[s];o.moveTo(t,e),o.lineTo.apply(o,[i,n,i,n+a,t,e+a]),o.close()}},t.g.wg=function(e){D.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.K(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].stroke(null).fill(this.o(this,e)),this.Ca[3].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.mJ=function(){D.u.mJ.call(this),this.Ha=k(this)},t.g.KI=function(t,e,i){return 2>t?D.u.KI.call(this,t,e,i):(this.ta("channelWidth",$(this,this.Ha+i)),this.B(768),this.W(),this)},t.g.Fg=function(){D.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.SC=function(){var t=D.u.SC.call(this);if(!(0,window.isNaN)(this.coords.secondXAnchor)){var e=k(this);e={x:(e={x:(this.coords.xAnchor+this.coords.secondXAnchor)/2,y:(this.coords.valueAnchor+this.coords.secondValueAnchor)/2+e}).x,y:e.y},t.push({value:e})}return t},t.g.ng=function(){var e=D.u.ng.call(this);return t.Ga(e,mt)},t.g.U=function(e,i){D.u.U.call(this,e,i),t.Iq(this,Tt,e),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.F=function(){var e=D.u.F.call(this);return t.Tq(this,Tt,e,"Annotation"),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.R=function(){D.u.R.call(this),t.sd(this.Ca),delete this.K,delete this.f,delete this.o},t.g.UB=function(t,e){this.b=!0,D.u.UB.call(this,t,e)},t.H(P,s),t.Gq(P,["stroke"],"normal"),t.U(P,it),J["horizontal-line"]=P,t.g=P.prototype,t.g.type="horizontal-line",t.g.Ee=2,t.g.ng=function(){var e=P.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){P.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(e,i){i=t.R(i,t.dp(this.Ca[0].stroke()));for(var n=0;n<this.Ca.length;n++){var s=this.Ca[n];s.clear(),s.moveTo(this.fa.left,i).lineTo(this.fa.cb(),i)}},t.g.wg=function(e){P.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=P.u.F.call(this);return t.Tq(this,it,e,"Annotation"),e},t.g.U=function(e,i){P.u.U.call(this,e,i),t.Iq(this,it,e)},t.g.R=function(){P.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(L,s),t.Gq(L,["fill","hatchFill","stroke"],"normal"),t.U(L,tt),t.U(L,it),t.U(L,st),J["horizontal-range"]=L,t.g=L.prototype,t.g.type="horizontal-range",t.g.Ee=7,t.g.ng=function(){var e=L.u.ng.call(this);return t.Ga(e,mt)},t.g.pb=function(){if(this.J(64)){var t=this.Ra(),e=this.bb();if(!t||!e)return!1;var i=0,n=0;t=h(this,e.transform(this.nd("valueAnchor"),.5)),(0,window.isNaN)(t)?n|=3:i|=3,e=h(this,e.transform(this.nd("secondValueAnchor"),.5)),(0,window.isNaN)(e)?n|=4:i|=4;var s=!1,a=null;3&n?(a="valueAnchor",s=!0,this.aa=3):4&n?(a="secondValueAnchor",s=!1,this.aa=7):this.aa=0,this.coords.valueAnchor=t,this.coords.secondValueAnchor=e,this.Ba=i,this.ba=null,this.ea=a,this.Za=s,this.Oe=this.Qk(),(0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)||this.B(128),this.B(768),this.I(64)}return this.J(128)&&((0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)?this.i=this.Ba:(this.ba&&(this.coords[this.ba]=this.D),this.ea&&(this.coords[this.ea]=this.G),this.i=this.Ba|this.aa),this.I(128),this.B(768),this.I(128)),this.Oe||!(0,window.isNaN)(this.D)&&!(0,window.isNaN)(this.G)},t.g.SC=function(){var e=[],i=this.fa.left+this.fa.width/2;return this.Ee&this.i&3&&(e.push({x:i,y:this.coords.valueAnchor}),this.Ee&this.i&4&&e.push({x:i,y:this.coords.secondValueAnchor})),(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.Qk=function(){var t=[];t.push(this.coords.valueAnchor),t.push(this.coords.secondValueAnchor);for(var e=this.fa,i=!0,n=!0,s=0;s<t.length;s++)(0,window.isNaN)(t[s])||(i=i&&t[s]<e.top,n=n&&t[s]>e.Va());return!i&&!n},t.g.Fg=function(){L.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.qJ=function(t){t.Vd().cursor("ns-resize")},t.g.tm=function(e,i){i=t.R(i,t.dp(this.Ca[0].stroke())),this.Ca[0].clear(),this.Ca[0].moveTo(this.fa.left,i).lineTo(this.fa.cb(),i)},t.g.cp=function(e,i,n,s){e=t.dp(this.Ca[0].stroke()),i=t.R(i,e),s=t.R(s,e),e=this.fa.left,n=this.fa.cb();var a=this.Ca[0];a.clear().moveTo(e,i).lineTo(n,i).moveTo(e,s).lineTo(n,s);for(var o=1;o<this.Ca.length;o++)(a=this.Ca[o]).clear().moveTo(e,i).lineTo(n,i).lineTo(n,s).lineTo(e,s).close()},t.g.wg=function(e){L.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)).fill(null),this.Ca[1].stroke(null).fill(this.b(this,e)),this.Ca[2].stroke(null).fill(this.f(this,e)),this.Ca[3].stroke(t.bm,2*this.hoverGap()).fill(t.bm)},t.g.F=function(){var e=L.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){L.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){L.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(I,s),t.Gq(I,["stroke"],"normal"),t.U(I,tt),t.U(I,it),t.U(I,st),J["infinite-line"]=I,t.g=I.prototype,t.g.type="infinite-line",t.g.Ee=7,t.g.ng=function(){var e=I.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){I.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(i,n,s,a){var o=t.dp(this.Ca[0].stroke());for(i==s&&(i=s=t.R(i,o)),n==a&&(n=a=t.R(n,o)),i=e(i,n,s,a,this.fa),n=0;n<this.Ca.length;n++)(s=this.Ca[n]).clear(),i&&s.moveTo(i[0],i[1]).lineTo(i[2],i[3])},t.g.wg=function(e){I.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){return!0},t.g.F=function(){var e=I.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){I.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){I.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(A,s),t.U(A,tt),t.U(A,it),t.U(A,ct),t.Gq(A,"fontFamily fontStyle fontVariant fontWeight fontSize fontColor fontOpacity fontDecoration textShadow".split(" "),"normal"),J.label=A,t.g=A.prototype,t.g.type="label",t.g.Ee=3,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.K(this.Ia,this.vg,this),t.W(this,"background",this.Ia)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.K(this.Wa,this.fm,this),t.W(this,"padding",this.Wa)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.fm=function(e){t.X(e,2)&&this.B(256,1)},t.g.vg=function(e){t.X(e,1)&&this.B(256,1)},t.g.ng=function(){var e=A.u.ng.call(this);return t.Ga(e,ft)},t.g.wt=function(t){A.u.wt.call(this,t),this.B(256)},t.g.sc=function(t,e){var i=0==e?this.Qa():1==e?this.lb():this.selected(),n=this.Qa().g(t);return(e?i.g(t):n)||n},t.g.SC=function(){var e=[];return e.push({x:this.coords.xAnchor||0,y:this.coords.valueAnchor||0},{x:this.Ll.left||0,y:this.Ll.top||0},{x:this.Ll.cb()||0,y:this.Ll.top||0},{x:this.Ll.cb()||0,y:this.Ll.Va()||0},{x:this.Ll.left||0,y:this.Ll.Va()||0}),(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.Qk=function(){this.Fg(),this.J(256)&&(this.bi(this.state),this.Mm(0,0));var t=this.fa,e=Math.abs(this.Ll.width),i=this.coords.xAnchor,n=this.g("anchor");return E(n)?(n=i,e=i+e):"center-top"==n||"center"==n||"center-bottom"==n?(n=i-e/2,e=i+e/2):(n=i-e,e=i),!((0,window.isNaN)(e)||(0,window.isNaN)(n)||e<t.left||n>t.cb())},t.g.qJ=function(t,e){if(1>e)A.u.qJ.call(this,t,e);else{var i=0>this.Ll.width*this.Ll.height,n=i?"nesw-resize":"nwse-resize";i=i?"nwse-resize":"nesw-resize",t.Vd().cursor(e%2?n:i)}},t.g.mJ=function(){A.u.mJ.call(this),this.b=this.Ll.clone()},t.g.KI=function(t,e,i){if(1>t)return A.u.KI.call(this,t,e,i);var n=this.g("anchor");switch(t){case 1:this.Pa.width=this.b.width-e,this.Pa.height=this.b.height-i,E(n)&&(this.coords.xAnchor=this.na.xAnchor+e),U(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i);break;case 2:this.Pa.width=this.b.width+e,this.Pa.height=this.b.height-i,G(n)&&(this.coords.xAnchor=this.na.xAnchor+e),U(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i);break;case 3:this.Pa.width=this.b.width+e,this.Pa.height=this.b.height+i,G(n)&&(this.coords.xAnchor=this.na.xAnchor+e),F(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i);break;case 4:this.Pa.width=this.b.width-e,this.Pa.height=this.b.height+i,E(n)&&(this.coords.xAnchor=this.na.xAnchor+e),F(n)&&(this.coords.valueAnchor=this.na.valueAnchor+i)}return this.Pa.xAnchor=this.Ra().Mc((this.coords.xAnchor-this.fa.left)/this.fa.width),this.Pa.valueAnchor=this.bb().Mc((this.fa.Va()-this.coords.valueAnchor)/this.fa.height),this.B(768),this.W(),this},t.g.bi=function(e){var i=this.g("text"),n=this.g("useHtml");t.p(i)&&(n?this.ad.htmlText(i):this.ad.text(i)),this.ad.fontFamily(this.sc("fontFamily",e,null)),this.ad.fontStyle(this.sc("fontStyle",e,null)),this.ad.fontVariant(this.sc("fontVariant",e,null)),this.ad.fontWeight(this.sc("fontWeight",e,null)),this.ad.fontSize(this.sc("fontSize",e,null)),this.ad.er(this.sc("fontDecoration",e,null)),this.ad.textShadow(this.sc("textShadow",e,null)),this.ad.direction(this.g("textDirection")),this.ad.Xu(this.g("wordBreak")),this.ad.wordWrap(this.g("wordWrap")),this.ad.letterSpacing(this.g("letterSpacing")),this.ad.lineHeight(this.g("lineHeight")),this.ad.textIndent(this.g("textIndent")),this.ad.vAlign(this.g("vAlign")),this.ad.Bm(this.g("hAlign")),this.ad.textOverflow(this.g("textOverflow")),this.ad.Hm(this.g("selectable")),this.ad.Dd(this.g("disablePointerEvents"))},t.g.Fg=function(){A.u.Fg.call(this),this.ad||(this.ad=this.Aa.text(),this.ad.zIndex(2)),this.fu||(this.fu=this.Aa.rect(),this.fu.fill(t.bm).zIndex(3)),this.background().O(this.Aa).zIndex(0)},t.g.Mm=function(e,i){var n=this.ja(),s=this.g("width"),a=this.g("height"),o=0,r=0;if(n){var l=n.width;n=n.height,null!=s?(this.Oi=s=t.L(s,l),o=Math.abs(s),l=!1):(s=0,l=!0),null!=a?(this.Ni=a=t.L(a,n),r=Math.abs(a),n=!1):(a=0,n=!0)}else t.Do(s)?(l=!0,s=0):(l=!1,this.Oi=s=t.N(s),o=Math.abs(s)),t.Do(a)?(n=!0,a=0):(n=!1,this.Ni=a=t.N(a),r=Math.abs(a));var h=this.padding();this.ad.width(null),this.ad.height(null),l?(this.nn=s+=this.ad.rb().width,this.Oi=h.Lk(s)):this.nn=h.Ng(o),this.ad.width(this.nn),n?(this.ln=a+=this.ad.rb().height,this.Ni=h.$j(a)):this.ln=h.Yh(r),this.ad.height(this.ln),this.Lg=t.L(h.g("left"),this.Oi),this.Mg=t.L(h.g("top"),this.Ni),l=this.g("anchor"),a={x:e,y:i},s=t.Eo(t.kn(0,0,this.Oi,this.Ni),l),a.x-=s.x,a.y-=s.y,t.Yo(a,l,this.g("offsetX")||0,this.g("offsetY")||0),this.Lg+=a.x-(0>this.Oi?o:0),this.Mg+=a.y-(0>this.Ni?r:0),this.Ll=new t.I(a.x,a.y,this.Oi,this.Ni)},t.g.tm=function(e,i){this.bi(this.state),this.Mm(e,i),this.ad.x(this.Lg),this.ad.y(this.Mg),this.ad.clip(this.Ll),this.fu.stroke(t.bm,2*this.hoverGap()).Qf(this.Ll),this.background().ka().ja(this.Ll).W().da(!1),this.B(512)},t.g.wg=function(t){A.u.wg.call(this,t),this.ad.color(this.sc("fontColor",t,null)),this.ad.textShadow(this.sc("textShadow",t,null)),this.ad.opacity(this.sc("fontOpacity",t,null))},t.g.F=function(){var e=A.u.F.call(this);return t.Tq(this,ct,e,"Annotation"),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),e.background=this.background().F(),e.padding=this.padding().F(),e},t.g.AB=function(t){A.u.AB.call(this,t)},t.g.U=function(e,i){A.u.U.call(this,e,i),this.background().ga(!!i,e.background),this.padding().ga(!!i,e.padding),i?t.Hq(this.oa,ct,e):t.Iq(this,ct,e),t.Iq(this,tt,e),t.Iq(this,it,e)},t.g.R=function(){t.sd(this.ad,this.fu,this.Ia,this.Wa),A.u.R.call(this)},t.H(M,s),t.Gq(M,["stroke"],"normal"),t.U(M,tt),t.U(M,it),t.U(M,st),J.line=M,t.g=M.prototype,t.g.type="line",t.g.Ee=7,t.g.ng=function(){var e=M.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){M.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,i,s,a){var o=t.dp(this.Ca[0].stroke());for(e==s&&(e=s=t.R(e,o)),i==a&&(i=a=t.R(i,o)),e=n(e,i,s,a,this.fa),i=0;i<this.Ca.length;i++)(s=this.Ca[i]).clear(),e&&s.moveTo(e[0],e[1]).lineTo(e[2],e[3])},t.g.wg=function(e){M.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=M.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){M.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){M.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(_,s),t.Gq(_,["stroke","fill","hatchFill","size"],"normal"),t.U(_,tt),t.U(_,it),t.U(_,lt),J.marker=_,t.g=_.prototype,t.g.type="marker",t.g.Ee=3,t.g.ng=function(){return t.Ga(mt,gt)},t.g.wt=function(t){_.u.wt.call(this,t),this.B(256)},t.g.Fg=function(){_.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(e,i){var n;this.state&t.wo?n=this.Ea.g("size"):this.state&t.vo&&(n=this.za.g("size")),n=(0,window.isNaN)(n)?this.ca.g("size"):n;var s=t.zp(this.g("markerType")),a=this.g("anchor"),o={x:e,y:i};t.Yo(o,a,this.g("offsetX"),this.g("offsetY"));var r=n/2;switch(a){case"left-top":case"center-top":case"right-top":o.y+=r;break;case"left-bottom":case"center-bottom":case"right-bottom":o.y-=r}switch(a){case"left-top":case"left-center":case"left-bottom":o.x+=r;break;case"right-top":case"right-center":case"right-bottom":o.x-=r}for(a=t.dp(this.Ca[0].stroke()),r=0;r<this.Ca.length;r++){var l=this.Ca[r];l.clear(),s(l,o.x,o.y,n,a)}},t.g.wg=function(e){_.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=_.u.F.call(this);return t.Tq(this,lt,e,"Annotation"),t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),e},t.g.U=function(e,i){_.u.U.call(this,e,i),t.Iq(this,lt,e),t.Iq(this,tt,e),t.Iq(this,it,e)},t.g.R=function(){_.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(N,s),t.Gq(N,["stroke"],"normal"),t.U(N,tt),t.U(N,it),t.U(N,st),J.ray=N,t.g=N.prototype,t.g.type="ray",t.g.Ee=7,t.g.ng=function(){var e=N.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){N.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,n,s,a){var o=t.dp(this.Ca[0].stroke());for(e==s&&(e=s=t.R(e,o)),n==a&&(n=a=t.R(n,o)),e=i(e,n,s,a,this.fa),n=0;n<this.Ca.length;n++)(s=this.Ca[n]).clear(),e&&s.moveTo(e[0],e[1]).lineTo(e[2],e[3])},t.g.wg=function(e){N.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){var t=N.u.Qk.call(this);if(!t){t=this.coords.xAnchor;var e=this.coords.secondXAnchor-t;t=!(0,window.isNaN)(e)&&!(t<this.fa.left&&0>=e||t>this.fa.cb()&&0<=e)}return t},t.g.F=function(){var e=N.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){N.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){N.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(R,s),t.Gq(R,["fill","hatchFill","stroke"],"normal"),t.U(R,tt),t.U(R,it),t.U(R,st),J.rectangle=R,t.g=R.prototype,t.g.type="rectangle",t.g.Ee=7,t.g.ng=function(){var e=R.u.ng.call(this);return t.Ga(e,mt)},t.g.Fg=function(){R.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(e,i,n,s){var a=t.dp(this.Ca[0].stroke());for(e=t.R(e,a),i=t.R(i,a),n=t.R(n,a),s=t.R(s,a),a=0;a<this.Ca.length;a++){var o=this.Ca[a];o.clear(),o.moveTo(e,i).lineTo(n,i).lineTo(n,s).lineTo(e,s).close()}},t.g.wg=function(e){R.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=R.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){R.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){R.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(j,s),t.Gq(j,["fill","hatchFill","stroke"],"normal"),t.U(j,tt),t.U(j,it),t.U(j,st),t.U(j,ot),J["trend-channel"]=j,t.g=j.prototype,t.g.type="trend-channel",t.g.Ee=15,t.g.ng=function(){var e=j.u.ng.call(this);return t.Ga(e,mt)},t.g.Fg=function(){j.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++)this.Ca[i].clear();this.Ca[0].moveTo(t,e).lineTo(t,e),this.Ca[3].moveTo(t,e).lineTo(t,e)},t.g.cp=function(t,e,n,s){for(t=i(t,e,n,s,this.fa),e=0;e<this.Ca.length;e++)this.Ca[e].clear();t&&(this.Ca[0].moveTo(t[0],t[1]).lineTo(t[2],t[3]),this.Ca[3].moveTo(t[0],t[1]).lineTo(t[2],t[3]))},t.g.bM=function(t,i,s,a,o,r){var l=this.fa.left,h=this.fa.cb(),c=this.fa.top,u=this.fa.Va();if(s==t)a=a-i||1,t<l&&o<l||t>h&&o>h?s=r=a=c=null:(s=e(t,i,t,i+a,this.fa),r=e(o,r,o,r+a,this.fa),a=[i=Math.max(Math.min(t,o),l),c],c=[t=Math.min(Math.max(t,o),h),c,t,u,i,u,i,c]);else{var d=r-(a=(a-i)/(s-t))*o;(i-=a*t)>d&&(r=i,i=d,d=r),t=s>t?Math.min(t,o):Math.max(t,o),(o=s)>t&&t>h||o<t&&t<l?s=r=a=c=null:(o>t?(t=Math.max(t,l),o=h):(o=Math.min(t,h),t=l),s=a*t+i,l=a*o+i,h=a*o+d,(r=a*t+d)<c&&h<c||s>u&&l>u?s=r=a=c=null:(s=n(t,s,o,l,this.fa),r=n(t,r,o,h,this.fa),0>a?(h=Math.max(t,(u-i)/a),i=Math.min(o,(c-d)/a),s?(a=[s[0],s[1]],c=[s[2],s[3],i,s[3]]):(a=[t,c],c=[i,c]),r?c.push(i,r[3],r[0],r[1],h,r[1]):c.push(i,u,h,u)):0<a?(h=Math.max(t,(c-d)/a),i=Math.min(o,(u-i)/a),s?(a=[s[2],s[3]],c=[s[0],s[1],h,s[1]]):(a=[o,c],c=[h,c]),r?c.push(h,r[1],r[2],r[3],i,r[3]):c.push(h,u,i,u)):(a=[t,c=s?s[1]:c],c=[o,c,o,u=r?r[1]:u,t,u])))}for(u=0;u<this.Ca.length;u++)this.Ca[u].clear();if(u=this.Ca[0],s&&u.moveTo(s[0],s[1]).lineTo(s[2],s[3]),r&&u.moveTo(r[0],r[1]).lineTo(r[2],r[3]),a&&c)for(u=1;u<this.Ca.length;u++)(s=this.Ca[u]).moveTo(a[0],a[1]),s.lineTo.apply(s,c),s.close()},t.g.wg=function(e){j.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.o(this,e)),this.Ca[1].stroke(null).fill(this.b(this,e)),this.Ca[2].stroke(null).fill(this.f(this,e)),this.Ca[3].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.Qk=function(){if(15==this.Ba){var t=j.u.Qk.call(this),e=this.coords.secondXAnchor!=this.coords.xAnchor;return t||e}return!1},t.g.F=function(){var e=j.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),t.Tq(this,ot,e,"Annotation"),e},t.g.U=function(e,i){j.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e),t.Iq(this,ot,e)},t.g.R=function(){j.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(B,s),t.Gq(B,["fill","hatchFill","stroke"],"normal"),t.U(B,tt),t.U(B,it),t.U(B,st),t.U(B,ot),J.triangle=B,t.g=B.prototype,t.g.type="triangle",t.g.Ee=15,t.g.ng=function(){var e=B.u.ng.call(this);return t.Ga(e,mt)},t.g.Fg=function(){B.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(1),this.Ca[2].zIndex(3))},t.g.tm=function(t,e){for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(t,e).lineTo(t,e)}},t.g.cp=function(t,e,i,n){for(var s=0;s<this.Ca.length;s++){var a=this.Ca[s];a.clear(),a.moveTo(t,e).lineTo(i,n)}},t.g.bM=function(t,e,i,n,s,a){for(var o=0;o<this.Ca.length;o++){var r=this.Ca[o];r.clear(),r.moveTo(t,e).lineTo(i,n).lineTo(s,a).close()}},t.g.wg=function(e){B.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)),this.Ca[0].fill(this.b(this,e)),this.Ca[1].stroke(null).fill(this.f(this,e)),this.Ca[2].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=B.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),t.Tq(this,ot,e,"Annotation"),e},t.g.U=function(e,i){B.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e),t.Iq(this,ot,e)},t.g.R=function(){B.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(H,s),t.Gq(H,["stroke"],"normal"),t.U(H,tt),J["vertical-line"]=H,t.g=H.prototype,t.g.type="vertical-line",t.g.Ee=1,t.g.ng=function(){var e=H.u.ng.call(this);return t.Ga(e,dt)},t.g.Fg=function(){H.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(0),this.Ca[1].zIndex(3))},t.g.tm=function(e){e=t.R(e,t.dp(this.Ca[0].stroke()));for(var i=0;i<this.Ca.length;i++){var n=this.Ca[i];n.clear(),n.moveTo(e,this.fa.top).lineTo(e,this.fa.Va())}},t.g.wg=function(e){H.u.wg.call(this,e),this.Ca[0].fill(null).stroke(this.b(this,e)),this.Ca[1].fill(t.bm).stroke(t.bm,2*this.hoverGap())},t.g.F=function(){var e=H.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),e},t.g.U=function(e,i){H.u.U.call(this,e,i),t.Iq(this,tt,e)},t.g.R=function(){H.u.R.call(this),t.sd(this.Ca),delete this.b},t.H(z,s),t.Gq(z,["fill","hatchFill","stroke"],"normal"),t.U(z,tt),t.U(z,it),t.U(z,st),J["vertical-range"]=z,t.g=z.prototype,t.g.type="vertical-range",t.g.Ee=7,t.g.ng=function(){var e=z.u.ng.call(this);return t.Ga(e,mt)},t.g.pb=function(){if(this.J(64)){var t=this.Ra(),e=this.bb();if(!t||!e)return!1;var i=0,n=0;e=l(this,t.transform(this.nd("xAnchor"),.5)),(0,window.isNaN)(e)?n|=3:i|=3,t=l(this,t.transform(this.nd("secondXAnchor"),.5)),(0,window.isNaN)(t)?n|=4:i|=4;var s=!1,a=null;3&n?(a="xAnchor",s=!0,this.aa=3):4&n?(a="secondXAnchor",s=!1,this.aa=7):this.aa=0,this.coords.xAnchor=e,this.coords.secondXAnchor=t,this.Ba=i,this.ba=a,this.ea=null,this.Za=s,this.Oe=this.Qk(),(0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)||this.B(128),this.B(768),this.I(64)}return this.J(128)&&((0,window.isNaN)(this.D)||(0,window.isNaN)(this.G)?this.i=this.Ba:(this.ba&&(this.coords[this.ba]=this.D),this.ea&&(this.coords[this.ea]=this.G),this.i=this.Ba|this.aa),this.I(128),this.B(768),this.I(128)),this.Oe||!(0,window.isNaN)(this.D)&&!(0,window.isNaN)(this.G)},t.g.SC=function(){var e=[],i=this.fa.top+this.fa.height/2;return this.Ee&this.i&3&&(e.push({x:this.coords.xAnchor,y:i}),this.Ee&this.i&4&&e.push({x:this.coords.secondXAnchor,y:i})),(0,t.Wa)(e,(function(t){return{value:t}}))},t.g.Qk=function(){var t=[];t.push(this.coords.xAnchor),t.push(this.coords.secondXAnchor);for(var e=this.fa,i=!0,n=!0,s=0;s<t.length;s++)(0,window.isNaN)(t[s])||(i=i&&t[s]<e.left,n=n&&t[s]>e.cb());return!i&&!n},t.g.Fg=function(){z.u.Fg.call(this),this.Ca||(this.Ca=[this.Aa.path(),this.Aa.path(),this.Aa.path(),this.Aa.path()],this.Ca[0].zIndex(2),this.Ca[1].zIndex(0),this.Ca[2].zIndex(1),this.Ca[3].zIndex(3))},t.g.qJ=function(t){t.Vd().cursor("ew-resize")},t.g.tm=function(e){e=t.R(e,t.dp(this.Ca[0].stroke())),this.Ca[0].clear(),this.Ca[0].moveTo(e,this.fa.top).lineTo(e,this.fa.Va())},t.g.cp=function(e,i,n){i=t.dp(this.Ca[0].stroke()),e=t.R(e,i),n=t.R(n,i),i=this.fa.top;var s=this.fa.Va(),a=this.Ca[0];a.clear().moveTo(e,i).lineTo(e,s).moveTo(n,i).lineTo(n,s);for(var o=1;o<this.Ca.length;o++)(a=this.Ca[o]).clear().moveTo(e,i).lineTo(n,i).lineTo(n,s).lineTo(e,s).close()},t.g.wg=function(e){z.u.wg.call(this,e),this.Ca[0].stroke(this.o(this,e)).fill(null),this.Ca[1].stroke(null).fill(this.b(this,e)),this.Ca[2].stroke(null).fill(this.f(this,e)),this.Ca[3].stroke(t.bm,2*this.hoverGap()).fill(t.bm)},t.g.F=function(){var e=z.u.F.call(this);return t.Tq(this,tt,e,"Annotation"),t.Tq(this,it,e,"Annotation"),t.Tq(this,st,e,"Annotation"),e},t.g.U=function(e,i){z.u.U.call(this,e,i),t.Iq(this,tt,e),t.Iq(this,it,e),t.Iq(this,st,e)},t.g.R=function(){z.u.R.call(this),t.sd(this.Ca),delete this.o,delete this.b,delete this.f},t.H(V,t.Y),t.g=V.prototype,t.g.sa=192|t.Y.prototype.sa,t.g.MA=function(){for(var t=0;t<this.Sf.length;t++)this.Sf[t].B(64);this.o&&this.o.B(64),this.B(64)},t.g.W=function(){if(this.zc()){if(this.ka(),this.b||(this.b=t.ok(),this.b.Ce("mouseover",this.wr,!1,this),this.b.Ce("touchstart",this.wr,!1,this),this.b.wa("mouseover",this.hga,!1,this),this.b.wa("mouseout",this.gga,!1,this),this.b.wa("mousemove",this.fga,!1,this),this.f=t.mk(0,0,0,0),this.f.cursor("crosshair"),this.f.fill(t.bm),this.f.stroke(null),this.f.wa("mouseover",this.rga,!1,this),this.G=t.mk(0,0,0,0),this.G.fill(t.bm),this.G.stroke(null),this.G.zIndex(1e3)),this.J(4)&&(this.K=this.ja(),this.b.clip(this.K),this.f.Qf(this.K),this.G.Qf(this.K),this.B(64),this.I(4)),this.J(64)){for(var e=0,i=this.Sf.length;e<i;e++){var n=this.Sf[e];n.ka(),n.ja(this.K),n.O(this.b),n.W(),n.da(!1)}this.o&&(this.o.ka(),this.o.ja(this.K),this.o.O(this.b),this.o.W(),this.o.da(!1)),this.I(64)}this.J(2)&&(this.b.parent(this.O()),this.B(128),this.I(2)),this.J(8)&&(e=this.zIndex(),this.b.zIndex(e),this.f.zIndex(e+100),this.I(8)),this.J(128)&&(this.aa?this.f.parent(this.O()):this.f.remove(),this.I(128)),this.da(!1)}},t.g.wr=function(t){this.mf||(this.mf=new K(this),"touchstart"==t.type&&this.mf.lk(t.kf))},t.g.hga=function(e){e.stopPropagation(),e.Ju(),e.preventDefault(),e=e.target;for(var i;t.J(e,t.ig);){if(i=e.tag,t.J(i,s))return void this.ib.Tj(i);e=e.parent()}this.ib.Md()},t.g.gga=function(t){t.stopPropagation(),t.Ju(),t.preventDefault(),this.ib.Md()},t.g.fga=function(t){t.stopPropagation(),t.Ju(),t.preventDefault()},t.g.rga=function(e){var i=this.ib.b,n=i.P;n&&n!=this||(r(i)?g(this.ib,!1):(this.f.wa("mouseout",this.TU,!1,this),this.f.wa("mousedown",this.RU,!1,this),t.Ld(t.ll,"mousemove",this.SU,!1,this),e.stopPropagation(),e.Ju(),e.preventDefault(),q(this,e),this.na=!1,i.UB(this.i,this.D),i.nC()?i.W():W(this,i,!1)))},t.g.TU=function(e){if(this.f.gc("mouseout",this.TU,!1,this),this.f.gc("mousedown",this.RU,!1,this),e.stopPropagation(),e.Ju(),e.preventDefault(),q(this,e),this.na=!0,!this.P){if(t.Yd(t.ll,"mousemove",this.SU,!1,this),(e=this.ib.b).D=window.NaN,e.G=window.NaN,e.B(128),e.Ka){var i=null!=e.P;e.Ka=!0,e.P=null,i&&e.B(64),e.kb(null),t.kr(e,this.VZ,this),this.o=null,this.B(64,1)}e.W()}},t.g.RU=function(e){t.Ld(t.ll,"mouseup",this.UU,!1,this),e.stopPropagation(),e.Ju(),e.preventDefault(),q(this,e),this.ba=this.i,this.ea=this.D,this.P=!1,(e=this.ib.b).UB(this.i,this.D),e.W()},t.g.UU=function(e){t.Yd(t.ll,"mouseup",this.UU,!1,this),e.stopPropagation(),e.preventDefault(),q(this,e),this.ea=this.ba=window.NaN,this.P=!1,(e=this.ib.b).Ka&&W(this,e,!0),a(e);var i=!1;r(e)?i=!0:this.na||e.UB(this.i,this.D),e.W(),i&&(g(this.ib,!1),this.ib.xc().dispatchEvent({type:"annotationDrawingFinish",annotation:e}))},t.g.SU=function(t){t.stopPropagation(),t.preventDefault(),q(this,t),(t=this.ib.b).pb(),!t.Za||(0,window.isNaN)(this.ba)||(0,window.isNaN)(this.ea)||this.P?(t.UB(this.i,this.D),t.W()):16<=(this.ba-this.i)*(this.ba-this.i)+(this.ea-this.D)*(this.ea-this.D)&&(this.P=!0,t.Ka&&W(this,t,!0),a(t),t.UB(this.i,this.D),t.W())},t.g.remove=function(){this.b&&(this.b.remove(),this.f.remove())},t.g.select=function(t){return this.ib.select(t),this},t.g.ie=function(){return this.ib.ie(),this},t.g.maa=function(){return this.ib.b},t.g.xfa=function(t){return this.Sf[t]||null},t.g.yfa=function(){return this.Sf.length},t.g.cR=function(e){if(this.o==e)return this.o=null,t.qd(e),this;var i=this.ib;return i.b==e&&(i.b=null,g(i,!1)),this.i5((0,t.za)(this.Sf,e))},t.g.i5=function(e){var i=this.Sf[e];return i&&(t.Ca(this.Sf,e,1),t.qd(i),this.B(64,1)),this},t.g.WZ=function(){return this.Sf.length&&(t.sd(this.Sf),this.Sf.length=0,this.B(64,1)),this},t.g.Gd=function(e){return this.ib.gv()?(this.ib.xc().ka(),e=f(this.ib,e),W(this,e,!0),this.ib.select(e),this.ib.b||(t.qd(e),e=null),this.ib.xc().da(!0),e):null},t.g.add=function(t){return this.ib.xc().ka(),t=f(this.ib,t),W(this,t,!0),this.ib.xc().da(!0),t},t.g.laa=function(){this.ib.bR()},t.g.Tja=function(t){var e=f(this.ib,"ray");return e.N(t),W(this,e,!0),e},t.g.line=function(t){var e=f(this.ib,"line");return e.N(t),W(this,e,!0),e},t.g.Uga=function(t){var e=f(this.ib,"infinite-line");return e.N(t),W(this,e,!0),e},t.g.Bla=function(t){var e=f(this.ib,"vertical-line");return e.N(t),W(this,e,!0),e},t.g.Pga=function(t){var e=f(this.ib,"horizontal-line");return e.N(t),W(this,e,!0),e},t.g.Cla=function(t){var e=f(this.ib,"vertical-range");return e.N(t),W(this,e,!0),e},t.g.Qga=function(t){var e=f(this.ib,"horizontal-range");return e.N(t),W(this,e,!0),e},t.g.fJ=function(t){var e=f(this.ib,"rectangle");return e.N(t),W(this,e,!0),e},t.g.ellipse=function(t){var e=f(this.ib,"ellipse");return e.N(t),W(this,e,!0),e},t.g.rla=function(t){var e=f(this.ib,"triangle");return e.N(t),W(this,e,!0),e},t.g.qla=function(t){var e=f(this.ib,"trend-channel");return e.N(t),W(this,e,!0),e},t.g.jfa=function(t){var e=f(this.ib,"finite-trend-channel");return e.N(t),W(this,e,!0),e},t.g.haa=function(t){var e=f(this.ib,"andrews-pitchfork");return e.N(t),W(this,e,!0),e},t.g.efa=function(t){var e=f(this.ib,"fibonacci-fan");return e.N(t),W(this,e,!0),e},t.g.dfa=function(t){var e=f(this.ib,"fibonacci-arc");return e.N(t),W(this,e,!0),e},t.g.ffa=function(t){var e=f(this.ib,"fibonacci-retracement");return e.N(t),W(this,e,!0),e},t.g.gfa=function(t){var e=f(this.ib,"fibonacci-timezones");return e.N(t),W(this,e,!0),e},t.g.Br=function(t){var e=f(this.ib,"marker");return e.N(t),W(this,e,!0),e},t.g.label=function(t){var e=f(this.ib,"label");return e.N(t),W(this,e,!0),e},t.g.VZ=function(e){t.X(e,1)&&this.B(64,1)},t.g.F=function(){var t=V.u.F.call(this);return t.annotationsList=Y(this),t},t.g.Ie=function(e,i){return!!t.A(i)&&(Y(this,i),!0)},t.g.U=function(e,i){V.u.U.call(this,e,i);var n=e.annotationsList;t.A(n)&&Y(this,n)},t.g.RB=function(e){var i=this.md?{}:{annotationsList:Y(this)},n={defaultAnnotationSettings:this.ib.xc().PS()};return i=t.Bm(i,n)||{},e?t.ho(i):i},t.g.MP=function(e){var i=this.RB(!1);return t.qp(i,"annotations",e)},t.g.E1=function(e){var i;return t.z(e)?i=t.io(e):t.C(e)&&!t.D(e)&&(i=e),i=t.C(i)?i.annotationsList:i,Y(this,i),this},t.g.vfa=function(e){return e=t.np(e),this.E1(e),this},t.g.R=function(){var e=this.ib;e.f&&t.Fa(e.f,this),t.sd(this.Sf,this.o,this.f,this.b,this.mf,this.G),this.Sf.length=0,this.G=this.mf=this.b=this.f=this.o=null,V.u.R.call(this)},t.H(K,t.ag),t.g=K.prototype,t.g.lk=function(e){var i;if(i=!this.lp)t:{i=t.Qi(e.target,this.ib.b.Ja());for(var n,a=window.NaN;t.J(i,t.ig);){if(n=i.tag,t.Do(n)){if(t.J(n,s)){this.b=n,(0,window.isNaN)(a)&&(a=-1),this.i=a,i=!0;break t}}else a=t.N(n);i=i.parent()}this.b=null,this.i=window.NaN,i=!1}i&&(r(this.b)?this.ib.ib.xc().dispatchEvent({type:"annotationChangeStart",annotation:this.b})?(K.u.lk.call(this,e),this.lp&&e.stopPropagation()):(this.b=null,this.i=window.NaN,e.stopPropagation()):(this.ib.ib.select(this.b),this.b=null,this.i=window.NaN))},t.g.ar=function(){this.b.mJ(),this.deltaY=this.deltaX=0},t.g.ls=function(t,e){this.ib.ib.xc().dispatchEvent({type:"annotationChange",annotation:this.b})&&this.b.KI(this.i,t,e)},t.g.qga=function(){this.ib.ib.select(this.b);var t=this.ib;t.G.parent(t.b)},t.g.oga=function(){var t=this.b;this.b.B(64),this.b.W(),this.b=null,this.i=window.NaN,this.ib.G.remove(),this.ib.ib.xc().dispatchEvent({type:"annotationChangeFinish",annotation:t})};var Dt=V.prototype;Dt.add=Dt.add,Dt.startDrawing=Dt.Gd,Dt.cancelDrawing=Dt.laa,Dt.getAnnotationAt=Dt.xfa,Dt.getAnnotationsCount=Dt.yfa,Dt.removeAnnotation=Dt.cR,Dt.removeAnnotationAt=Dt.i5,Dt.removeAllAnnotations=Dt.WZ,Dt.getSelectedAnnotation=Dt.maa,Dt.select=Dt.select,Dt.unselect=Dt.ie,Dt.ray=Dt.Tja,Dt.line=Dt.line,Dt.infiniteLine=Dt.Uga,Dt.verticalLine=Dt.Bla,Dt.verticalRange=Dt.Cla,Dt.horizontalLine=Dt.Pga,Dt.horizontalRange=Dt.Qga,Dt.rectangle=Dt.fJ,Dt.ellipse=Dt.ellipse,Dt.triangle=Dt.rla,Dt.trendChannel=Dt.qla,Dt.finiteTrendChannel=Dt.jfa,Dt.andrewsPitchfork=Dt.haa,Dt.fibonacciFan=Dt.efa,Dt.fibonacciArc=Dt.dfa,Dt.fibonacciRetracement=Dt.ffa,Dt.fibonacciTimezones=Dt.gfa,Dt.marker=Dt.Br,Dt.label=Dt.label,Dt.fromJson=Dt.E1,Dt.toJson=Dt.RB,Dt.fromXml=Dt.vfa,Dt.toXml=Dt.MP,t.E("anychart.annotations.PlotController",V)}.call(this,$)),_.stock||(_.stock=1,function(t){var e=function(e,i){return t.zk(Ho,e,i||"line")},i=function(e,i){return t.zk(zo,e,i||"sma")},n=function(e,i,n){var s;if(t.ea(e))for(n=n?{}:[],s=0;s<e;s++)n[s]=i;else for(s in n={},e)n[s]=i;return n},s=function(e){var i=1;if(e=Math.floor(e)){for(var n=0;n<t.up.length;n++){var s=t.up[n],a=e/s.xe;if(1<=Math.floor(1.1*a)){var o=o||s;if(.15>a-Math.floor(a)){i=Math.floor(a);break}}}o!=s&&o.ds&&100<i&&(s=o,i=Math.round(20*e/s.xe)/20)}return{unit:s?s.Dg:"millisecond",count:i}},a=function(e,i){switch(e){case"log":return t.gt();case"linear":return t.ft();case"date-time":return t.ht();default:return i?null:t.ft()}},o=function(e){t.K(e,this.PC,this),e.kb(this)},r=function(e,i){switch(this.D=t.Zk(e),this.b=i||1,this.f=new Date(0),this.D){case"year":this.o=315576e5*this.b,this.i=this.daa,this.next=this.via;break;case"semester":this.o=315576e5*this.b/2,this.i=this.aaa,this.next=this.sia;break;case"quarter":this.o=315576e5*this.b/4,this.i=this.Z$,this.next=this.qia;break;case"month":this.o=315576e5*this.b/12,this.i=this.YQ,this.next=this.pia;break;case"third-of-month":this.o=315576e5*this.b/36,this.i=this.baa,this.next=this.tia;break;case"week":this.o=6048e5*this.b,this.i=this.caa,this.next=this.uia;break;default:this.o=864e5*this.b,this.i=this.V$,this.next=this.jia;break;case"hour":this.o=36e5*this.b,this.i=this.W$,this.next=this.lia;break;case"minute":this.o=6e4*this.b,this.i=this.Y$,this.next=this.oia;break;case"second":this.o=1e3*this.b,this.i=this.$$,this.next=this.ria;break;case"millisecond":this.o=this.b,this.i=this.X$,this.next=this.nia}},l=function(e,i,n){e.f.setTime(t.Oo(e.f.getTime(),i,n?n.getTime():Date.UTC(2e3,0))-i)},h=function(t){var e=t.getUTCDate();return 3*(12*t.getUTCFullYear()+t.getUTCMonth())+(10>=e?0:20>=e?1:2)},c=function(t,e){var i=t.sj()-e.sj();return i||e.b-t.b},u=function(){t.V.call(this),this.Ga("defaultGroupingSettings"),this.o=!0,this.D=!1,this.b=[],this.f=500,this.i=window.NaN,this.G={unit:"millisecond",count:1},this.K=!1},d=function(t){for(var e=[],i=0;i<t.b.length;i++)e.push(p(t.b[i]));return e},p=function(t){return{unit:t.D,count:t.b}},g=function(t,e){this.key=t,this.values=e,this.b=this.next=null,this.i=!1,this.o=Pr++},f=function(t,e){return t.key==e.key?t.o-e.o:t.key-e.key},m=function(t){return this-t.key},v=function(t){return this-t.key},b=function(t,e,i,n,s){this.Zc=t,this.ea=n,this.K=new g((0,window.isNaN)(e.Pw)?-1:e.Pw,[]),this.K.next=e.IT,this.aa=e.aJ,this.na=e.lastIndex-e.rj+1||0,this.ba=(this.i=s||null)?this.Nda:this.S$,this.Ba=this.i?this.zfa:this.Gfa,this.Ci=i,this.reset()},y=function(){this.f=[],this.i=!0,this.b=[],this.P=!0,this.D=[],this.o=0,this.K=[],this.G=0},S=function(e,i){return e.b.length?1<e.b.length?e.zi(t.Za(Math.round(e.Uf(i)),0,e.b.length-1)):e.b[0].key:window.NaN},x=function(t,e,i){i=Math.max(0,Math.floor(i));var n=t.b.length>i?t.b[i]:null;return e=Math.max(0,Math.ceil(e)),new D(e,t.b.length>e?t.b[e]:null,n,Math.min(i,t.b.length-1)-Math.min(e,t.b.length))},w=function(t){return t.b.length?t.b.length-1:window.NaN},C=function(e,i,n){var a,o,r,l,h=e.b.length,c={};if(h){for(l=0;l<e.K.length;l++){var u=e.K[(e.G-l-1+4)%4];if(u.ki==i&&u.Wi==n)return u}var d=e.Uf(i),p=e.Uf(n);if(u=Math.max(0,Math.ceil(d)),(0,window.isNaN)(u)||u>=h){var g=h-1;u=a=o=r=window.NaN}else if(a=Math.min(Math.floor(p),h-1),(0,window.isNaN)(a)||0>a)o=0,u=a=g=r=window.NaN;else if(u<=a){g=0<u?u-1:window.NaN,o=a<h-1?a+1:window.NaN,r=window.Infinity,l=(0,window.isNaN)(g)?u:g;for(var f=(0,window.isNaN)(o)?a:o,m=e.b[l];l<f;l++){var v=m;m=v.next,r=Math.min(r,m.key-v.key)}(0,window.isFinite)(r)||(r=window.NaN)}else g=a,o=u,u=a=window.NaN,r=(r=e.b[g]).next.key-r.key;f=T(e),m=t.Za(i,f[2],f[3]),v=t.Za(n,f[2],f[3]),l=e.Uf(m);for(var b,y,S=e.Uf(v);l<=S;l++)l<u?(b=t.Za(e.b[u].key,f[0],f[1]),y=t.Za(m,f[0],f[1]),l=u):l&&e.b[l]?(b=e.b[l].key,y=e.b[l-1].key):b=y=window.NaN,b-=y,(0,window.isNaN)(b)||0==b||(c[(y=s(b)).unit]?((y=c[y.unit]).count++,y.xe+=b):c[y.unit]={count:1,xe:b,Dg:y.unit});S>a&&(b=t.Za(v,f[0],f[1]),b-=y=t.Za(e.b[a].key,f[0],f[1]),(0,window.isNaN)(b)||0==b||(c[(y=s(b)).unit]?((y=c[y.unit]).count++,y.xe+=b):c[y.unit]={count:1,xe:b,Dg:y.Dg}))}else u=a=g=o=d=p=r=window.NaN;return u={Xm:c,ki:i,Wi:n,Cg:d,Nj:p,rj:u,Pw:g,lastIndex:a,kB:o,FI:r},h&&(e.K[e.G]=u,e.G=(e.G+1)%4),u},T=function(t){var e=t.b.length;if(e){var i=t.b[0].key;if(1==e)t=[i-1,i+1,i-1,i+1];else{var n=t.b[e-1].key;t=[i,n,i-(t.b[1].key-i)/2,n+(n-t.b[e-2].key)/2]}}else t=[window.NaN,window.NaN,window.NaN,window.NaN];return t},D=function(t,e,i,n){this.D={key:t-1,next:e},this.K=i?i.next:null,this.G=n,this.reset()},k=function(t){this.Zc=t,this.f=_t(t.Rd()),this.i=!0,this.b=ct(this.f),this.ib=null,this.D=!1,this.o=[],$(this)},$=function(t){for(var e=t.ib?t.ib.i.b.length:t.f.Hb();t.o.length<e;)t.o.push({})},O=function(t,e){var i=t.f.En(e);return i?new M(i,t.Zc,!t.i,e,t.o[e]):null},P=function(t,e,i,n){if(e>i){var s=e;e=i,i=s}return s=_t(t.Zc.Rd(),n),(t.D||s!=t.f||t.b.ki!=e||t.b.Wi!=i)&&(t.D=!1,t.f=s,t.i=!n,t.b=s.select(e,i),$(t)),t},L=function(t,e,i){return e?(i=t.ib?t.ib.Uf(e.key):i,new M(e,t.Zc,!t.i,i,t.o[i]||{})):null},I=function(t){return L(t,t.b.xO,t.b.Pw)},A=function(t){return L(t,t.b.aJ,t.b.kB)},E=function(e,i){var n=e.b.A3,s=e.b.lastIndex;if(t.p(i))for(var a=e.i?Ct(e.Zc,i):wt(e.Zc,i);n&&n!=e.b.xO&&(0,window.isNaN)(n.vj(a));)n=n.b,s--;return n==e.b.xO&&(n=null),L(e,n,s)},G=function(e,i,n){if("first-visible"==i){var s=e.b.IT,a=e.b.rj;if(t.p(n))for(n=e.i?Ct(e.Zc,n):wt(e.Zc,n);s&&s!=e.b.aJ&&(0,window.isNaN)(s.vj(n));)s=s.next,a++;s==e.b.aJ&&(s=null),e=L(e,s,a)}else if("last-visible"==i)e=E(e,n);else if("series-start"==i){if(a=_t(e.Zc.Rd()),t.p(n)){n=Ct(e.Zc,n),i=0;for(var o=a.Hb();i<o&&(s=a.En(i),(0,window.isNaN)(s.vj(n)));i++);}else s=a.En(0);e=s?new M(s,e.Zc,!1,0,null):null}else if("series-end"==i){if(s=_t(e.Zc.Rd()),t.p(n))for(n=Ct(e.Zc,n),i=s.Hb();i--&&(a=s.En(i),(0,window.isNaN)(a.vj(n))););else a=s.En(s.Hb()-1);e=a?new M(a,e.Zc,!1,0,null):null}else n=_t(e.Zc.Rd()),s=t.p(i)?ut(n,i,"exact"):0,e=(n=n.En(s))?new M(n,e.Zc,!1,s,null):null;return e},U=function(t,e){return t.i?Ct(t.Zc,e):wt(t.Zc,e)},F=function(t,e,i){return new b(t.Zc,t.b,t.o,!t.i,e&&t.ib?H(t.ib,!!i):null)},M=function(t,e,i,n,s){this.Af=t,this.Zc=e,this.b=i,this.Ad=n,this.Ci=s},_=function(){t.V.call(this),this.ea={},this.na={},this.Za={},this.aa={},this.Ba=this.i=this.f=new y,this.P={},this.b={Xm:{},ki:window.NaN,Wi:window.NaN,Cg:window.NaN,Nj:window.NaN,rj:window.NaN,Pw:window.NaN,lastIndex:window.NaN,kB:window.NaN,FI:window.NaN,Oka:window.NaN,Xea:window.NaN,Nka:window.NaN,Wea:window.NaN},this.ba={Xm:{},ki:window.NaN,Wi:window.NaN,Cg:window.NaN,Nj:window.NaN,rj:window.NaN,Pw:window.NaN,lastIndex:window.NaN,kB:window.NaN,FI:window.NaN,Oka:window.NaN,Xea:window.NaN,Nka:window.NaN,Wea:window.NaN},this.$a=this.D=this.o=this.sb=this.fb=window.NaN},N=function(e,i,n){var s=t.oa(i).toFixed(0);if(n=n?e.na:e.Za,!(s in e.ea)||!(s in n)){for(var a in e.ea[s]=i,n[s]=i,i.ib=e,i=i.pr().Rd(),(s=t.oa(i).toFixed(0))in e.aa||(e.aa[s]=i,t.K(i,e.t6,e)),e.f.i=!0,e.P)e.P[a].i=!0;e.B(16384,16)}},R=function(t){if(t.J(16384)){q(t);var e=T(t.f);if(t.o!=e[2]||t.D!=e[3])return t.fb=e[0],t.sb=e[1],t.o=e[2],t.D=e[3],!0}return!1},j=function(t,e,i,n,s){R(t),Y(t,s),Y(t,n);var a=t.o,o=t.D,r=t.J(16384);t.$a=e,e=0;var l=B(t,a,o,z(t),t.Za,t.Ba,t.ba,r);l&&(t.Ba=l[0],t.ba=l[1],e+=2),l=t.K.Cn(),eo(s,t.ba.ki,t.ba.Wi,l.unit,l.count,t.ba.Xm),l=t.b.ki;var h=t.b.Wi;return!r||i&&!J(t)&&!Z(t)||(0,window.isNaN)(t.Ka)||(0,window.isNaN)(t.Ha)||(0,window.isNaN)(a)||(0,window.isNaN)(o)||(l=s.Mc(t.Ka),h=s.Mc(t.Ha)),((0,window.isNaN)(l)||J(t)&&!(0,window.isNaN)(a)&&Z(t))&&(l=a),((0,window.isNaN)(h)||Z(t)&&!(0,window.isNaN)(o)&&J(t))&&(h=o),(0,window.isNaN)(l)||((i=B(t,l,h,t.G,t.na,t.i,t.b,r))&&(t.i=i[0],t.b=i[1],e+=1),W(t,n)),t.Ka=s.transform(t.b.ki),t.Ha=s.transform(t.b.Wi),t.I(16384),e},B=function(t,e,i,n,a,o,r,l){if(e>i){var h=e;e=i,i=h}1>i-e&&(i>t.o?e=i-1:i=e+1),r=e!=r.ki||i!=r.Wi;var c=t.$a,u=i-e,d=(h=C(t.f,e,i)).lastIndex-h.rj+1||0;h=h.FI,c=(0,window.isNaN)(n.f)?c/n.i:n.f;var g,f=-1;if(n.o&&0<n.b.length&&h&&(n.D||d>c)){for(d=0,f=n.b.length;d<f&&n.b[d].sj()<=h;)d++;u/=c,d=Math.max(d-1,0)||0,c=n.b.length,f=-1;for(var m=d;m<c;m++)if(n.b[m].sj()>=u){f=m;break}0>f&&d<c&&(f=c-1)}if(0>f?(u=null,n.G=h?s(h):{unit:"millisecond",count:1}):(u=n.b[f],n.G=p(u)),n.K=!!u,(n=u)?(h=n.D+n.b.toFixed(0))in t.P?g=t.P[h]:t.P[h]=g=new y:g=t.f,t=V(t,g,n)||l,r||g!=o||t){var v;if(o=C(g,e,i),g.P)for(v in a)t=a[v],l=e,r=i,h=o.Pw,u=o.kB,d=n,c=_t(t.Zc.Rd(),d),(t.D||c!=t.f||t.b.ki!=l||t.b.Wi!=r)&&(t.D=!1,t.f=c,t.i=!d,t.b=ht(c,l,r,h,u),$(t));else for(v in a)P(a[v],e,i,n);return[g,o]}return null},H=function(t,e,i,n){var s=e?t.Ba:t.i;return s.P&&!n?null:i?x(s,s.b.length?0:window.NaN,w(s)):(t=e?t.ba:t.b,x(s,t.rj,t.lastIndex))},z=function(e,i){return e.K||(e.K=new u,e.K.Ga("stock.scrollerGrouping"),e.K.U(e.K.oa,!0),t.K(e.K,e.B2,e)),t.p(i)?(e.K.N(i),e):e.K},V=function(t,e,i){if(e.yr()){for(var n in e.f.length=0,e.i=!0,t.aa){var s=_t(t.aa[n],i);e.f.push(s)}return e.update(),!0}return!1},q=function(t){V(t,t.f)},W=function(t,e){var i=t.Wm().Cn();eo(e,t.b.ki,t.b.Wi,i.unit,i.count,t.b.Xm)},Y=function(t,e){var i=t.D,n=t.fb,s=t.sb;e.ea=t.o,e.ba=i,e.i=n,e.aa=s,e.va(256)},K=function(t){return V(t,t.i),t.i.zi(t.b.rj)},X=function(t){return V(t,t.i),t.i.zi(t.b.lastIndex)},J=function(t){return(0,window.isNaN)(t.b.Pw)&&!(0,window.isNaN)(t.b.ki)},Z=function(t){return(0,window.isNaN)(t.b.kB)&&!(0,window.isNaN)(t.b.ki)},Q=function(e){t.hx.call(this,e),t.T(this.ua,[["scrollOnMouseWheel",0,0]])},tt=function(e,i){t.Y.call(this),this.Ga(t.ur.axis),this.b=e,this.Oa=this.Ia=this.rc=this.Da=null,this.f=!i,t.T(this.ua,[["height",4,9],["showHelperLabel",16,1],["overlapMode",16,1]])},et=function(){t.Y.call(this),this.D=this.G=this.o=this.K=null,t.T(this.ua,[["value",4,1],["valueField",4,1],["stroke",20,1],["fallingStroke",20,1],["risingStroke",20,1]])},it=function(e,i,n){i=t.p(i)?i:e.oa,e.o||(e.o=new t.Pu,t.K(e.o,e.AR,e),e.i=e.o.add(null,null,0),e.i.zIndex(1),e.o.I(4294967295)),e.G||(e.G=new t.Pu,t.K(e.G,e.AR,e),e.G.I(4294967295)),e.D||(e.D=new t.Pu,t.K(e.D,e.AR,e),e.D.I(4294967295)),e.o.ga(!!n,i.label),e.G.ga(!!n,i.risingLabel),e.D.ga(!!n,i.fallingLabel)},nt=function(){t.kz.call(this)},st=function(e){t.sD.call(this),this.b=e,this.P=null},at=function(t){this.pc=t,this.f=[],this.b=0},ot=function(t){this.b=[],this.P=t,this.Ha=[],this.na=0,this.Ba=[],this.ea=0,this.i=-1,this.G=null},rt=function(t){t.G=null,t.Ha.length=0,t.na=0,t.Ba.length=0,t.ea=0},lt=function(e,i,n,s,a,o,r){var l;if(t.ea(n)){var h=Math.min(i.values.length,n);for(l=0;l<h;l++)(n=t.N(i.values[l]))<s[l]&&(s[l]=n),n>a[l]&&(a[l]=n)}else for(l in n)(n=t.N(i.values[l]))<s[l]&&(s[l]=n),n>a[l]&&(a[l]=n);for(l=0;l<=e.i;l++)i.f&&((n=t.N(i.f[l]))<o[l]&&(o[l]=n),n>r[l]&&(r[l]=n))},ht=function(e,i,s,a,o){var r,l=e.b.length;if(l){for(r=0;r<e.Ha.length;r++){var h=e.Ha[(e.na-r-1+4)%4];if(h.ki==i&&h.Wi==s)return h}if((0,window.isNaN)(a))if((0,window.isNaN)(o))var c=0,u=l-1;else o?(c=0,u=o-1):c=u=window.NaN;else(0,window.isNaN)(o)?a==l-1?c=u=window.NaN:(c=a+1,u=l-1):1==o-a?c=u=window.NaN:(c=a+1,u=o-1);var d=e.b[a]||null;h=e.b[c]||null;var p=e.b[u]||null,g=e.b[o]||null}else h=p=d=g=null,c=u=a=o=window.NaN;var f,m,v,b,y=e.fU(),S=t.ea(y);if(d||h||g){var x=!d&&!g;if(x&&e.G)var w=f=e.G.UN,C=m=e.G.SN,T=v=e.G.fL,D=b=e.G.eL;else{for(w=n(y,window.Infinity,!0),C=n(y,-window.Infinity,!0),T=n(e.i+1,window.Infinity),D=n(e.i+1,-window.Infinity),f=d?d.next:h;f&&f!=g;)lt(e,f,y,w,C,T,D),f=f.next;if(f=t.Qc(w),m=t.Qc(C),v=t.Ja(T,0),b=t.Ja(D,0),d&&lt(e,d,y,f,m,v,b),g&&lt(e,g,y,f,m,v,b),S)for(r=0;r<y;r++)w[r]==Number.POSITIVE_INFINITY&&(w[r]=window.NaN),C[r]==Number.NEGATIVE_INFINITY&&(C[r]=window.NaN),f[r]==Number.POSITIVE_INFINITY&&(f[r]=window.NaN),m[r]==Number.NEGATIVE_INFINITY&&(m[r]=window.NaN);else for(r in y)w[r]==Number.POSITIVE_INFINITY&&(w[r]=window.NaN),C[r]==Number.NEGATIVE_INFINITY&&(C[r]=window.NaN),f[r]==Number.POSITIVE_INFINITY&&(f[r]=window.NaN),m[r]==Number.NEGATIVE_INFINITY&&(m[r]=window.NaN);for(r=0;r<=e.i;r++)T[r]==Number.POSITIVE_INFINITY&&(T[r]=window.NaN),D[r]==Number.NEGATIVE_INFINITY&&(D[r]=window.NaN),v[r]==Number.POSITIVE_INFINITY&&(v[r]=window.NaN),b[r]==Number.NEGATIVE_INFINITY&&(b[r]=window.NaN);x&&(e.G={UN:t.Qc(w),SN:t.Qc(C),fL:t.Ja(T,0),eL:t.Ja(D,0)})}}else w=C=f=m=n(y,window.NaN,!0),T=D=v=b=n(e.i,window.NaN);return h={ki:i,Wi:s,Pw:a,rj:c,lastIndex:u,kB:o,xO:d,IT:h,A3:p,aJ:g,UN:f,SN:m,eL:b,fL:v,d7:w,c7:C,Y6:D,Z6:T},l&&(e.Ha[e.na]=h,e.na=(e.na+1)%4),h},ct=function(t){var e=t.b.length;return e?ht(t,t.b[0].key,t.b[e-1].key,window.NaN,window.NaN):ht(t,window.NaN,window.NaN,window.NaN,window.NaN)},ut=function(e,i,n){n=n||"exact";for(var s=0;s<e.Ba.length;s++){var a=e.Ba[(e.ea-s-1+2)%2];if(a.key==i&&a.mode==n)return a.index}if(0>(s=t.Oa(e.b,m,i)))if(s=~s,"exact-or-next"==n)s=s<e.b.length?s:window.NaN;else if("exact-or-prev"==n)s=0<s?s-1:window.NaN;else{if("nearest"==n)return n=e.b.length,s?s<n?i-(e=e.b[s]).b.key<e.key-i?s-1:s:n?n-1:window.NaN:n?0:window.NaN;s=window.NaN}return e.Ba[e.ea]={key:i,mode:n,index:s},e.ea=(e.ea+1)%2,s},dt=function(t,e){ot.call(this,t),this.D=e||null,this.f=Br,this.o=0},pt=function(e,i,n,s,a,o){var r;if(a=a?e.o:n.length,i=t.p(o)?i[0<=(o=t.Oa(i,m,o))?o:~o]:i[0])if(o=e.b[e.b.length-1]||null,s){s.f.setTime(i.key),s.i();var l=s.next();do{for(var h=s.next(),c=!1;i&&((0,window.isNaN)(h)||i.key<h);){for(c=!0,r=0;r<a;r++){var u=n[r];u.b(i.values[u.o],i.values[u.D],i.values)}i=i.next}if(c){for(u=Array(a),r=0;r<a;r++)u[r]=n[r].f();r=new g(l,u),o&&(o.next=r),r.b=o,e.b.push(r),o=r}l=h}while(i)}else do{for(r=0;r<a;r++)(u=n[r]).b(i.values[u.o],i.values[u.D],i.values);for(u=Array(a),r=0;r<a;r++)u[r]=n[r].f();r=new g(i.key,u),o&&(o.next=r),r.b=o,e.b.push(r),o=r,i=i.next}while(i)},gt=function(e,i,n,s,a,o){ot.call(this,e),this.f=[],this.o=this.Z4,this.K=0,this.aa=!1,this.sb=t.z(i)?i:t.P(i,0,!0),this.Za=n,this.$a=t.N(s)||0,this.Ka=t.ma(a)?a.getTime():t.N(a),this.fb=o||null,this.ba=0,this.D=null},ft=function(e,i){if(t.A(i))i=t.Ja(i,0);else if(t.C(i)){var n=i;for(var s in i={},n)i[s]=n[s]}else i=null;return n=t.ps(i[e.sb],e.Za,(0,window.isNaN)(e.Ka)?null:new Date(e.Ka),e.fb),(s=!(!i||!n))&&(e.$a&&n.setTime(n.getTime()+36e5*e.$a),e.o(new g(n.getTime(),i))),s},mt=function(t){return t.o==t.iX&&(t.f.sort(f),t.o=t.X4),t.o!=t.Y4},vt=function(e,i){var n,s=e.b.length-1;if(0<=s)var a=e.b[s],o=a.key;else a=null,o=window.NaN;for(;n=i.next();)if(!n.i){var r;if(n.key==o?(e.b[s]=n,n.b=a.b):(e.b.push(n),n.b=a,o=n.key,s++),n.b&&(n.b.next=n),a=n,t.A(n.values)){if(n=n.values.length,e.ba<n){if(e.D)for(r=e.ba;r<n;r++)e.D[r]=!0;e.ba=n}}else{if(!e.D)for(e.D={},r=0;r<e.ba;r++)e.D[r]=!0;for(r in n.values)e.D[r]=!0}}a&&(a.next=null)},bt=function(e,i,n,s,a){this.pc=e||[],this.o=i||[],s=t.N(s),a=t.N(a),(0,window.isNaN)(a)?this.next=this.wia:(this.next=this.Ida,this.D=a),e=(0,window.isNaN)(s)?0:t.Oa(this.pc,m,s),this.f=this.pc[0>e?~e:e],n?(this.i=this.iia,this.b=(0,window.isNaN)(s)?0:t.Oa(this.o,m,s),0>this.b&&(this.b=~this.b)):(this.i=this.kia,this.b=(0,window.isNaN)(s)?this.o.length-1:t.Oa(this.o,v,s),0>this.b&&(this.b=~this.b-1))},yt=function(e,i){t.od.call(this),this.Zc=e,this.Ad=i,this.f={},this.b=t.ll,this.i=this.o=t.ia},St=function(t,e,i,n){M.call(this,t,e.Zc,i,n,{}),this.o=e},xt=function(e,i){if(t.V.call(this),this.gz=e,this.fD={},t.C(i)){for(var n in this.gz.ka(),i){var s=i[n];t.C(s)?this.Td(n,s.column,s.type,s.context||s.weights):(t.ea(s)||t.z(s))&&this.Td(n,s)}this.gz.da(!0)}},wt=function(t,e){return e in t.fD?t.fD[e].p5:window.NaN},Ct=function(t,e){return e in t.fD?t.fD[e].g6:window.NaN},Tt=function(e,i){t.od.call(this),this.o=e,this.D=t.p(i)?i:window.NaN,this.clear()},Dt=function(t){Tt.call(this,t)},kt=function(t,e){this.i=e,Tt.call(this,t)},$t=function(t,e,i){this.G=e,this.i=i,Tt.call(this,t)},Ot=function(t){Tt.call(this,t)},Pt=function(t){Tt.call(this,t)},Lt=function(t){Tt.call(this,t)},It=function(t){Tt.call(this,t)},At=function(t){Tt.call(this,t)},Et=function(t){Tt.call(this,t)},Gt=function(t){Tt.call(this,t)},Ut=function(t){Tt.call(this,t)},Ft=function(t,e){Tt.call(this,t,e)},Mt=function(e,i,n,s,a){t.V.call(this),this.pc=new gt(this,e,i,n,s,a),this.dv={},this.rS={},this.Wz={},this.kG=0,this.Xw=[],this.zF=[],this.Sx=[],this.lG=[]},_t=function(t,e){var i;if(e){var n=e.D+e.b.toFixed(0);n in t.dv?i=t.dv[n]:t.dv[n]=i=new dt(t,e)}else i=t.pc;return i.update(),i},Nt=function(e,i,n){for(var s in e.dv){var a=e.dv[s];(a.f|i)!=a.f?(a.f|=i,a=!0):a=!1,n=a||n}n&&(t.Pp++,e.va(16),t.Sp())},Rt=function(e,i,n,s){t.eB.call(this,e,i,n,s),this.f=this.D=this.aa=this.la=this.ba=null,this.K=!1,this.P=null,this.o0=!1},jt=function(e){var i,n=e.bb();e.check(64)&&!e.gh()&&t.J(n,t.Mt)&&"none"!=n.Vz()&&(i=G(e.la,n.x0(),e.bf.El)),e.Rx=Number(i&&i.get(e.bf.El))||0},Bt=function(e){e.f=null,e.K=!1,Ht(e,t.gm),e.$().reset()},Ht=function(e,i){if(e.G&&e.enabled()){var n=e.$();if(n.Iu(e.G.Af,e.G.ma()),e.ya.vt){e.eh()&&e.Rf.Mo(i,n.j("shapes"));var s=n.j(t.J(e.Rf,t.WA)?"shapes":"shapeNames");e.Rf.VB(i,s),e.bf.aF(n,i)}e.check(4194304)&&e.gq(n,i,!0),i==t.gm&&(e.G=null)}},zt=function(e,i){return"number"==typeof i?t.Bs(i,e.ba||void 0):i},Vt=function(){this.la=[],this.f=(0,t.pa)(this.f,this)},qt=function(t,e){return t.key-e.key||t.index-e.index},Wt=function(t,e,i,n){this.la=t,this.P=e,this.G=i,this.K=n,this.reset()},Yt=function(e,i){var n,s=t.Na(e.la,i,(function(t,e){return t-e.index}));if(n=0<=s){var a=e.la[s];e.b=s,e.o=a.PG,e.D=a.items.length,e.i=0}else e.D=0,e.b=e.la.length,e.i=0,e.o=window.NaN;return n},Kt=function(t){return t.b<t.la.length?t.la[t.b].index:window.NaN},Xt=function(e,i){t.Y.call(this),this.jf=e,this.index=i,this.xG=new Vt,this.jm=new t.WA(this,[t.RH,$r],!1),this.ca=new t.my(this,el,t.gm,Xr),this.ca.ta("connectorAfterInitCallback",o),this.za=new t.my(this,nl,t.gm,Xr),this.Ea=new t.my(this,nl,t.gm,Xr),this.Da=new t.Pu,this.Da.kb(this),t.T(this.ua,Yr),this.hB=[],this.Vda=t.cm("stroke",2,!0,!0)},Jt=function(t,e,i,n){e.j("positionHash")==i&&(t.Da.be(e.ma()).Vd().translate(0,n),e.j("shapes").path.translate(0,n),e.j("shapes").overlay.translate(0,n),e.j("offset",Number(e.j("offset"))-n))},Zt=function(e,i){var n,s=e.jf.xc().Ra(),a=e.$(),o=(n=Number(a.j("state"))||t.gm)?1==n?30:20:e.zIndex()+3e-6*a.ma(),r=e.sc("type",n,a,t.Rk,!1),l=e.tZ[r],h=e.sc("position",0,a,t.Tk,!1,void 0,!0),c=window.NaN,u=e.sc("direction",n,a,t.Sk,!1,void 0,!0),d="",p="";if("axis"!=h){d=e.sc("seriesId",0,a,t.zq,!1,void 0,!0);var g,f=e.jf.ef(d)||e.jf.Ai(0);if(f&&(g=O(f.la,Kt(a)))&&!g.j("missing")){if("zero"==h){p="zero";var m=0}else p=e.sc("fieldName",0,a,t.zq,!1,void 0,!0),m=Number(g.get(p));"series-positive"==h&&0>m||"series-negative"==h&&0<m?(m=0,c=Number(g.j("zero")),(0,window.isNaN)(c)&&(c=f.Qe(f.bb().transform(0),!1)),h=(c=t.Za(c,e.fa.top,e.fa.top+e.fa.height))==e.fa.top+e.fa.height?"axis":"zero"):(c=Number(g.j(p)),(0,window.isNaN)(c)&&!(0,window.isNaN)(m)&&(c=f.Qe(f.bb().transform(m),!1)),c=t.Za(c,e.fa.top,e.fa.top+e.fa.height)),"auto"==u&&(u=0>m||!m&&"series-negative"==h?"down":"up")}}(0,window.isNaN)(c)&&(c=e.fa.top+e.fa.height,h="axis",u="up"),u="down"!=u,h+="axis"==h?"":d+p+(u?"U":"D"),a.j("positionHash",h),p=s.transform(a.Gh(),.5)*e.fa.width+e.fa.left,s=(i?i[h]:Number(a.j("offset")))||0,a.j("offset",s),d=0;var v=e.Vda(e,n);if(!s&&v&&(s+=d=t.L(e.sc("length",n,a,t.br,!0),e.fa.height)),c+=u?-s:s,f={group:e,index:a.ma()},i){var b=e.jm.ed(n,null,o);g=b.path,m=b.overlay,a.j("shapes",b)}else g=(b=a.j("shapes")).path,m=b.overlay,e.jm.Mo(n,b),e.jm.zt(o,b),g.parent(e.O()),g.clear(),g.oc(1,0,0,1,0,0),m.parent(e.O()),m.clear(),m.oc(1,0,0,1,0,0);return b=t.$b(g.stroke()),p=t.R(p,b),c=t.R(c,b),g.tag=f,m.tag=f,d&&v&&((v=e.jf.qj().Jt(p,c,c-(u?-d:d),v,i?void 0:a.j("connectorPath"))).tag=f,a.j("connectorPath",v)),l(g,p,c,b=Math.round(t.L(e.sc("width",n,a,t.br,!1),e.fa.width)),v=Math.round(t.L(e.sc("height",n,a,t.br,!1),e.fa.height)),u),e.ke(a,n,r,p,c,b,v,u,o+1e-6,!i).Vd().tag=f,(0,e.tZ["flag"==r?"flag":"rect"])(m,p,c,b,v,u),s+=v,n=v+d-Number(a.j("totalHeight")||0),a.j("totalHeight",v+d),[h,i?s:u?-n:n]},Qt=function(e,i,n){for(var s=0;s<e.length;s++){var a=e[s];if(t.C(a)&&null!=(a=a[i]))return n(a)}},te=function(e,i){t.Y.call(this),this.Ga("stock.eventMarkers"),t.K(i,this.y4,this),this.f=e,this.b=[],this.i={},this.o=[],this.ca=new t.my(this,el,t.gm,Xr),this.ca.ta("connectorAfterInitCallback",o),this.ca.Ga("defaultFontSettings","stock.eventMarkers.normal"),this.za=new t.my(this,nl,t.gm,Xr),t.W(this,"hovered",this.za),this.Ea=new t.my(this,nl,t.gm,Xr),t.W(this,"selected",this.Ea),t.T(this.ua,Yr),this.hB=[],t.su(this,this)},ee=function(e,i,n,s){var a=4*Math.min(i,t.wo)+2*n+!s,o=e.hB[a];if(!o){if(o=e.f.xc().qj(),i)if(1==i)var r=e.za,l=o.lb();else r=e.Ea,l=o.selected();else r=e.ca,l=o.Qa();s&&(r=r.Zf(),l=l.Zf()),o=n?[i||s?null:e.oa,i||s?null:o.oa,r.oa,l.oa]:[i||s?null:e.Pa,i||s?null:o.Pa,r.Pa,l.Pa],e.hB[a]=o}return o},ie=function(t){t.Qn||(t.Qn=[]);for(var e;e=t.o.pop();)e.clear(),e.parent(null),t.Qn.push(e)},ne=function(e,i,n,s,a){var o=i.$();if(o.select(n)){if(n=Number(o.j("state")||0),t.p(a)&&n!=a)return!1;if(n!=s){if(o.j("state",s),s=(a=Zt(i))[1]){for(a=a[0],n=Kt(o);o.advance()&&Kt(o)==n;)Jt(i,o,a,s);for(var r=i.index+1;r<e.b.length;r++)if((i=e.b[r])&&i.enabled()&&Yt(o=i.$(),n))do{Jt(i,o,a,s)}while(o.advance()&&Kt(o)==n)}return!0}}return!1},se=function(e){t.od.call(this),this.D=e[0],this.Zc=e[1],this.Sa={},this.pa=this.f=null},ae=function(t,i,n,s){t.Sa[i]={X:null,kk:e(n,s),ZD:!1,mapping:null,qV:!1}},oe=function(i,n,s){return(n=i.Sa[n])?t.p(s)?((s=e(s,n.kk))!=n.X.kk()&&(n.kk=s,n.ZD=!1,n.qV=!0,re(i)),i):n.X:t.p(s)?i:null},re=function(e){for(var i in e.pa||(e.pa=e.D.xc()),e.f||(e.f=e.Cc(e.Zc,e.pa)),e.pa.ka(),e.Sa){var n=e.Sa[i];n.X||(n.X=e.D.Ae(n.kk),n.X.ba=2,n.ZD=!1),n.X.ka(),n.qV&&(n.X.kk(n.kk),n.qV=!1),n.mapping||(n.mapping=e.Zc.Rd().Yd(),e.Xn(n.mapping,e.f,i)),n.ZD||(n.X.data(n.mapping),t.D(n.X.name)&&n.X.name(e.Gf(i)),n.ZD=!0),n.X.da(!0)}e.D.xc().da(!0)},le=function(e){for(var i in e.Sa){var n=e.Sa[i];n.ZD=!1,t.qd(n.mapping),n.mapping=null}t.qd(e.f),e.f=null,re(e)},he=function(e){this.i=t.P(e,256,!1),this.pc=[],this.b=this.f=0},ce=function(t){return new he(t)},ue=function(){return{wd:0,dispose:function(){}}},de=function(t){t.wd=0},pe=function(t,e,i,n,s){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e)||(0,window.isNaN)(s))return window.NaN;var a=i-n,o=t.wd;return a&&(o+=(e-n-(i-e))/a*s,t.wd=o),o},ge=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=pe(i,n,s,a,o),e.set("result",n)},fe=function(t){return(t=t.Rd().Cc(t)).Cf({wd:0,dispose:function(){}}),t.Df(de),t.Bf(ge),t.cd("result"),t},me=function(t){se.call(this,t),ae(this,"main",t[2]),re(this)},ve=function(e,i,n){if(e=t.P(e,20,!1),(i=t.P(i,2,!1))>(n=t.P(n,30,!1))){var s=i;i=n,n=s}return{Wb:ce(e+1),ub:e,ix:n,Nv:i,zu:window.NaN,wd:window.NaN,dispose:function(){this.Wb.clear()}}},be=function(t){t.Wb.clear(),t.wd=window.NaN},ye=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s,a=(0,window.isNaN)(n);if(a||(s=i.Wb.enqueue(n)),a||i.Wb.Jg()<=i.ub)n=window.NaN;else{var o=2/(i.ix+1),r=2/(i.Nv+1);n=i.Wb.get(-1);var l=i.Wb.get(0);if(a=i.Wb.get(-2),(0,window.isNaN)(i.wd)||(0,window.isNaN)(i.zu)){for(i.zu=0,s=1;s<=i.ub;s++)i.zu+=Math.abs(i.Wb.get(s)-i.Wb.get(s-1));s=i.zu?(s=Math.abs(n-l)/i.zu)*(r-o)+o:o,n=a+s*s*(n-a)}else i.zu+=Math.abs(n-a)-Math.abs(l-s),s=i.zu?(s=Math.abs(n-l)/i.zu)*(r-o)+o:o,n=i.wd+s*s*(n-i.wd);i.wd=n}e.set("result",n)},Se=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(ve(e,i,n)),t.Df(be),t.Bf(ye),t.cd("result"),t},xe=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),this.o=t.P(e[4],30,!1),ae(this,"main",e[5]),re(this)},we=function(e){return e=t.P(e,20,!1),{Wb:ce(e),ub:e,wd:window.NaN,dispose:function(){this.Wb.clear()}}},Ce=function(t){t.Wb.clear(),t.wd=window.NaN},Te=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ke(i,n),e.set("result",n)},De=function(t,e){var i=t.Rd().Cc(t);return i.Cf(we(e)),i.Df(Ce),i.Bf(Te),i.cd("result"),i},ke=function(t,e){if((0,window.isNaN)(e))return window.NaN;var i;if(t.Wb.enqueue(e),t.Wb.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.wd)){for(var n=i=0;n<t.ub;n++)i+=t.Wb.get(n);i/=t.ub}else i=t.Wb.get(-1),i=t.wd+2/(t.ub+1)*(i-t.wd);return t.wd=i},$e=function(e){return e=t.P(e,20,!1),{Wb:ce(e),ub:e,wd:window.NaN,BG:window.NaN,dispose:function(){this.Wb.clear()}}},Oe=function(t){t.Wb.clear(),t.wd=window.NaN,t.BG=window.NaN},Pe=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=Ie(i,n),e.set("result",n)},Le=function(t,e){var i=t.Rd().Cc(t);return i.Cf($e(e)),i.Df(Oe),i.Bf(Pe),i.cd("result"),i},Ie=function(t,e){if((0,window.isNaN)(e))return t.BG=window.NaN;var i=t.Wb.enqueue(e);if(t.BG=i,t.Wb.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.wd)){for(var n=i=0;n<t.ub;n++)i+=t.Wb.get(n);i/=t.ub}else n=t.Wb.get(-1),i=t.wd+(n-i)/t.ub;return t.wd=i},Ae=function(e,n,s){if(e=t.P(e,5,!1),n=t.P(n,34,!1),"sma"==(s=i(s,"sma")))var a=$e,o=Ie;else a=we,o=ke;return{Mv:a(e),hx:a(n),vo:o,al:s,dispose:function(){this.Mv.dispose(),this.hx.dispose()}}},Ee=function(t){"sma"==t.al?(Oe(t.Mv),Oe(t.hx)):(Ce(t.Mv),Ce(t.hx))},Ge=function(t,e,i){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:(i=(e+i)/2,(e=t.vo(t.Mv,i))-(t=t.vo(t.hx,i)))},Ue=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Ge(i,n,s),e.set("result",n)},Fe=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Ae(e,i,n)),t.Df(Ee),t.Bf(Ue),t.cd("result"),t},Me=function(e){se.call(this,e),this.b=t.P(e[2],5,!1),this.i=t.P(e[3],34,!1),this.o=i(e[4],"sma"),ae(this,"main",e[5],"stick"),re(this);var n=new t.V;n.Ga("chart.defaultSeriesSettings.base.normal","stock.defaultPlotSettings.defaultSeriesSettings.base.normal","chart.defaultSeriesSettings.lineLike.normal","stock.defaultPlotSettings.defaultSeriesSettings.lineLike.normal","chart.defaultSeriesSettings.ohlc.normal","stock.defaultPlotSettings.defaultSeriesSettings.ohlc.normal"),e=n.oa.risingStroke,n=n.oa.fallingStroke,this.X().risingStroke(e),this.X().fallingStroke(n),this.X().risingFill(e),this.X().fallingFill(n)},_e=function(e){return(e=$e(t.P(e,14,!1))).yO=window.NaN,e},Ne=function(t){Oe(t),t.yO=window.NaN},Re=function(t,e,i,n){return(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e)?window.NaN:(i=Ie(t,Math.max(i,t.yO)-Math.min(n,t.yO)),t.yO=e,i)},je=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Re(i,n,s,a),e.set("result",n)},Be=function(t,e){var i=t.Rd().Cc(t);return i.Cf(_e(e)),i.Df(Ne),i.Bf(je),i.cd("result"),i},He=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),ae(this,"main",e[3]),re(this)},ze=function(e){return e=t.P(e,25,!1),{Ye:ce(e+1),Mf:ce(e+1),ub:e,dispose:function(){this.Ye.clear(),this.Mf.clear()}}},Ve=function(t){t.Ye.clear(),t.Mf.clear()},qe=function(t,e,i){var n=(0,window.isNaN)(e)||(0,window.isNaN)(i);if(n||(t.Ye.enqueue(e),t.Mf.enqueue(i)),e=t.Ye.Jg(),n||e<=t.ub)return[window.NaN,window.NaN];var s=0,a=t.Ye.get(0);for(n=1;n<e;n++)(i=t.Ye.get(n))>a&&(a=i,s=n);var o=100*s/t.ub;for(s=0,a=t.Mf.get(0),n=1;n<e;n++)(i=t.Mf.get(n))<a&&(a=i,s=n);return[o,100*s/t.ub]},We=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=qe(i,n,s),e.set("upResult",n[0]),e.set("downResult",n[1])},Ye=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ze(e)),i.Df(Ve),i.Bf(We),i.cd("upResult"),i.cd("downResult"),i},Ke=function(e){se.call(this,e),this.b=t.P(e[2],25,!1),this.o=e[3],this.i=e[4],ae(this,"range",e[5],"range-area"),re(this),this.DR().lowFill((function(){return t.Ul(t.Ql(this.sourceColor,.6),.65)})),this.DR().lowStroke((function(){return t.Ul(t.Ql(this.sourceColor),1)}))},Xe=function(e){return ze(t.P(e,25,!1))},Je=function(t){Ve(t)},Ze=function(t,e,i){return t=(e=qe(t,e,i))[0],e=e[1],(0,window.isNaN)(t)||(0,window.isNaN)(e)?window.NaN:t-e},Qe=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Ze(i,n,s),e.set("result",n)},ti=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Xe(e)),i.Df(Je),i.Bf(Qe),i.cd("result"),i},ei=function(e){se.call(this,e),this.b=t.P(e[2],25,!1),ae(this,"main",e[3],"area"),re(this)},ii=function(e,i){var n=$e(t.P(e,20,!1));return n.jo=t.P(i,2,!1),n.Qw=window.NaN,n},ni=function(t){Oe(t),t.Qw=window.NaN},si=function(t,e){var i=t.wd,n=Ie(t,e);if((0,window.isNaN)(n))return[window.NaN,window.NaN,window.NaN];var s,a=t.Wb,o=t.ub;if((0,window.isNaN)(i))for(i=s=0;i<o;i++){var r=a.get(i)-n;s+=r*r}else s=t.BG-i,r=a.get(-1)-n,a=i-n,s=t.Qw+o*a*a+a*(n+i)-2*t.BG*a+r*r-s*s;return 0>s&&(s=0),t.Qw=s,[n,n+(s=Math.sqrt(s/o)*t.jo),n-s]},ai=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s=(n=si(i,n))[1],a=n[2];e.set("middleResult",n[0]),e.set("upperResult",s),e.set("lowerResult",a)},oi=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(ii(e,i)),t.Df(ni),t.Bf(ai),t.cd("upperResult"),t.cd("lowerResult"),t.cd("middleResult"),t},ri=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),ae(this,"middle",e[4]),ae(this,"upper",e[5]),ae(this,"lower",e[6]),ae(this,"range",e[7],"range-area"),re(this)},li=function(e,i){var n=t.P(e,20,!1);return{Wb:ce(n),ub:n,jo:t.P(i,2,!1),wd:window.NaN,Qw:window.NaN,dispose:function(){this.Wb.clear()}}},hi=function(t){t.Wb.clear(),t.wd=window.NaN,t.Qw=window.NaN},ci=function(e,i){var n=i.Wb,s=i.ub,a=e.get("value");a=t.p(a)?a:e.get("close"),a=t.N(a);var o,r=(0,window.isNaN)(a);if(r||(o=n.enqueue(a)),a=0,r||n.Jg()<s)a=window.NaN;else{if((0,window.isNaN)(i.wd)){for(o=0;o<s;o++)a+=n.get(o);for(i.wd=a/s,o=a=0;o<s;o++)a+=(r=n.get(o)-i.wd)*r;0>a&&(a=0),i.Qw=Math.sqrt(a/s),a=i.Qw*i.jo}else{a=(n.get(-1)-o)/s;var l=i.wd;r=i.Qw,i.wd=l+a,a=r*r*s;var h=o-l;r=n.get(-1)-i.wd;var c=l-i.wd;0>(a=a+s*c*c+c*(i.wd+l)-2*o*c+r*r-h*h)&&(a=0),r=Math.sqrt(a/s),i.Qw=r,a=r*i.jo}s=i.wd+a,a=i.wd-a,a=(n.get(-1)-a)/(s-a)}e.set("result",a)},ui=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(li(e,i)),t.Df(hi),t.Bf(ci),t.cd("result"),t},di=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),ae(this,"main",e[4]),re(this)},pi=function(t){ni(t)},gi=function(t,e){var i=si(t,e);return(i[1]-i[2])/i[0]},fi=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),e.set("result",gi(i,n))},mi=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(ii(e,i)),t.Df(pi),t.Bf(fi),t.cd("result"),t},vi=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.b=t.P(e[3],2,!1),ae(this,"main",e[4]),re(this)},bi=function(e){return $e(t.P(e,20,!1))},yi=function(t){Oe(t)},Si=function(t,e,i,n){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e))return window.NaN;i=Ie(t,e=(i+n+e)/3);for(var s=n=0;s<t.ub;s++)n+=Math.abs(t.Wb.get(s)-t.wd);return(e-i)/(n/t.ub*.015)},xi=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Si(i,n,s,a),e.set("result",n)},wi=function(t,e){var i=t.Rd().Cc(t);return i.Cf(bi(e)),i.Df(yi),i.Bf(xi),i.cd("result"),i},Ci=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},Ti=function(e,n,s){if((e=t.P(e,3,!1))>(n=t.P(n,10,!1))){var a=e;e=n,n=a}if(a={wd:0,dispose:function(){}},"sma"==(s=i(s,"ema"))){e=$e(e),n=$e(n);var o=Ie}else e=we(e),n=we(n),o=ke;return{UQ:a,Mv:e,hx:n,vo:o,al:s,dispose:function(){this.UQ.dispose(),this.Mv.dispose(),this.hx.dispose()}}},Di=function(t){de(t.UQ),"sma"==t.al?(Oe(t.Mv),Oe(t.hx)):(Ce(t.Mv),Ce(t.hx))},ki=function(t,e,i,n,s){return(0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s)?window.NaN:(i=pe(t.UQ,e,i,n,s),(e=t.vo(t.Mv,i))-(t=t.vo(t.hx,i)))},$i=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=ki(i,n,s,a,o),e.set("result",n)},Oi=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Ti(e,i,n)),t.Df(Di),t.Bf($i),t.cd("result"),t},Pi=function(e){se.call(this,e),this.b=t.P(e[2],3,!1),this.i=t.P(e[3],10,!1),this.o=i(e[4],"ema"),ae(this,"main",e[5]),re(this)},Li=function(e){return e=t.P(e,20,!1),{bE:ce(e),Wu:ce(e),ub:e,Wy:window.NaN,mB:window.NaN,dispose:function(){this.bE.clear(),this.Wu.clear()}}},Ii=function(t){t.bE.clear(),t.Wu.clear(),t.Wy=window.NaN,t.mB=window.NaN},Ai=function(t,e,i,n,s){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e)||(0,window.isNaN)(s))return window.NaN;if(e=t.bE.enqueue(i==n?0:(e-n-(i-e))*s/(i-n)),s=t.Wu.enqueue(s),t.bE.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.Wy))for(t.Wy=0,s=t.mB=0;s<t.ub;s++)t.Wy+=t.bE.get(s),t.mB+=t.Wu.get(s);else t.Wy+=t.bE.get(-1)-e,t.mB+=t.Wu.get(-1)-s;return t.Wy/t.mB},Ei=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=Ai(i,n,s,a,o),e.set("result",n)},Gi=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Li(e)),i.Df(Ii),i.Bf(Ei),i.cd("result"),i},Ui=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},Fi=function(e){return e=t.P(e,20,!1),{Wb:ce(e+1),ub:e,dispose:function(){this.Wb.clear()}}},Mi=function(t){t.Wb.clear()},_i=function(t,e){var i=(0,window.isNaN)(e);return i||t.Wb.enqueue(e),i||t.Wb.Jg()<=t.ub?i=window.NaN:(i=t.Wb.get(0),i=100*(t.Wb.get(-1)-i)/i),i},Ni=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=_i(i,n),e.set("result",n)},Ri=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Fi(e)),i.Df(Mi),i.Bf(Ni),i.cd("result"),i},ji=function(e){return e=t.P(e,9,!1),{Wb:ce(e),ub:e,dispose:function(){this.Wb.clear()}}},Bi=function(t){t.Wb.clear()},Hi=function(t,e){if((0,window.isNaN)(e))return window.NaN;if(t.Wb.enqueue(e),t.Wb.Jg()<t.ub)return window.NaN;for(var i=2/(t.ub*(t.ub+1)),n=0,s=0;s<t.ub;s++)n+=t.Wb.get(s)*(s+1);return i*n},zi=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=Hi(i,n),e.set("result",n)},Vi=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ji(e)),i.Df(Bi),i.Bf(zi),i.cd("result"),i},qi=function(e,i,n){return{PY:ji(t.P(e,10,!1)),HT:Fi(t.P(i,11,!1)),CX:Fi(t.P(n,14,!1)),dispose:function(){this.PY.dispose(),this.HT.dispose(),this.CX.dispose()}}},Wi=function(t){Bi(t.PY),Mi(t.HT),Mi(t.CX)},Yi=function(t,e){var i=_i(t.HT,e),n=_i(t.CX,e);return(0,window.isNaN)(i)||(0,window.isNaN)(n)?window.NaN:(i=Hi(t.PY,i+n),(0,window.isNaN)(i)?window.NaN:i)},Ki=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=Yi(i,n),e.set("result",n)},Xi=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(qi(e,i,n)),t.Df(Wi),t.Bf(Ki),t.cd("result"),t},Ji=function(e){se.call(this,e),this.o=t.P(e[2],10,!1),this.b=t.P(e[3],11,!1),this.i=t.P(e[4],14,!1),ae(this,"main",e[5]),re(this)},Zi=function(e,i,n){return e=t.P(e,14,!1),i=t.P(i,14,!1),{Ye:ce(e+1),Mf:ce(e+1),Vo:ce(e+1),VQ:ce(i),ub:e,kC:i,XP:!t.p(n)||!!n,alpha:2/(e+1),T$:2/(i+1),xu:window.NaN,Gw:window.NaN,cv:window.NaN,YI:window.NaN,LI:window.NaN,SB:window.NaN,dispose:function(){this.Ye.clear(),this.Mf.clear(),this.Vo.clear(),this.VQ.clear()}}},Qi=function(t){t.Ye.clear(),t.Mf.clear(),t.Vo.clear(),t.VQ.clear(),t.xu=window.NaN,t.Gw=window.NaN,t.cv=window.NaN},tn=function(t,e,i,n,s,a,o,r,l){0>(n=i-n)&&(n=0),0>(a-=s)&&(a=0),n>a?a=0:n<a?n=0:a=n=0,(e=Math.max(Math.abs(i-s),Math.abs(i-e),Math.abs(s-e)))?(t.xu+=t.alpha*(100*n/e-t.xu),t.Gw+=t.alpha*(100*a/e-t.Gw)):(t.xu-=t.alpha*t.xu,t.Gw-=t.alpha*t.Gw),t.YI=t.YI+n-o,t.LI=t.LI+a-r,t.SB=t.SB+e-l},en=function(t,e,i,n){if((0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(e))return[window.NaN,window.NaN,window.NaN];var s=t.Ye,a=t.Mf,o=t.Vo,r=t.VQ;if(s.enqueue(i),a.enqueue(n),o.enqueue(e),s.Jg()<t.ub+1)return[window.NaN,window.NaN,window.NaN];if((0,window.isNaN)(t.xu))for(t.xu=0,t.Gw=0,t.YI=0,t.LI=0,t.SB=0,i=s.get(0),n=a.get(0),e=1;e<t.ub+1;e++){var l=i,h=n;i=s.get(e),n=a.get(e);var c=o.get(e-1);tn(t,c,i,l,n,h,0,0,0)}else i=s.get(-1),l=s.get(-2),n=a.get(-1),h=a.get(-2),c=o.get(-2),tn(t,c,i,l,n,h,t.YI/t.ub,t.LI/t.ub,t.SB/t.ub);if(t.XP?s=t.SB?0<(o=100*t.YI/t.SB)+(a=100*t.LI/t.SB)?100*Math.abs(o-a)/(o+a):0:a=o=0:(o=t.xu,a=t.Gw,s=100*Math.abs(o-a)/(o+a)),s=(o=[o,a,s])[0],a=o[1],o=o[2],(0,window.isNaN)(o))return[s,a,window.NaN];if(r.enqueue(o),r.Jg()<t.kC)return[s,a,window.NaN];if((0,window.isNaN)(t.cv)){for(e=o=0;e<t.kC;e++)o+=r.get(e);o/=t.kC,t.cv=o}else r=r.get(-1),t.cv=t.XP?t.cv+(r-t.cv)/t.kC:t.cv+t.T$*(r-t.cv);return[s,a,t.cv]},nn=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=en(i,n,s,a),e.set("pdiResult",n[0]),e.set("ndiResult",n[1]),e.set("adxResult",n[2])},sn=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Zi(e,i,n)),t.Df(Qi),t.Bf(nn),t.cd("pdiResult"),t.cd("ndiResult"),t.cd("adxResult"),t},an=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),this.i=t.P(e[3],14,!1),this.o=!t.p(e[4])||!!e[4],ae(this,"pdi",e[5]),ae(this,"ndi",e[6]),ae(this,"adx",e[7]),re(this)},on=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},rn=function(e,n,s){if(e=t.P(e,20,!1),n=t.P(n,10,!1),"ema"==(s=i(s,"ema")))var a=we,o=ke;else a=$e,o=Ie;return{ub:e,jo:n,al:s,wp:a(e),vo:o,dispose:function(){this.wp.dispose()}}},ln=function(t){"ema"==t.al?Ce(t.wp):Oe(t.wp)},hn=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN];var i=t.vo(t.wp,e);return[i*(1+t.jo/100),i*(1-t.jo/100)]},cn=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=hn(i,n),e.set("upperResult",n[0]),e.set("lowerResult",n[1])},un=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(rn(e,i,n)),t.Df(ln),t.Bf(cn),t.cd("upperResult"),t.cd("lowerResult"),t},dn=function(e){se.call(this,e),this.i=t.P(e[2],20,!1),this.o=t.P(e[3],10,!1),this.b=i(e[4],"ema"),ae(this,"upper",e[5]),ae(this,"lower",e[6]),re(this)},pn=function(){return{VI:ce(1),Vo:ce(1),dispose:function(){this.VI.clear(),this.Vo.clear()}}},gn=function(){this.VI.clear(),this.Vo.clear()},fn=function(t,e,i,n,s){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s))return[window.NaN,window.NaN,window.NaN,window.NaN];if(t.VI.Jg()){var a=t.VI.get(0),o=t.Vo.get(0);a=(a+o)/2,e=(e+i+n+s)/4,o=Math.max(i,a,e);var r=Math.min(n,a,e)}else a=e,o=i,r=n,e=(e+i+n+s)/4;return t.VI.enqueue(a),t.Vo.enqueue(e),[a,o,r,e]},mn=function(e,i){var n=t.N(e.get("open")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("close"));n=fn(i,n,s,a,o),e.set("haOpen",n[0]),e.set("haHigh",n[1]),e.set("haLow",n[2]),e.set("haClose",n[3])},vn=function(t){return(t=t.Rd().Cc(t)).Cf(pn()),t.Df(gn),t.Bf(mn),t.cd("haOpen"),t.cd("haHigh"),t.cd("haLow"),t.cd("haClose"),t},bn=function(t){se.call(this,t),ae(this,"main",t[2],"candlestick"),re(this)},yn=function(e,i,n){e=t.P(e,9,!1),i=t.P(i,26,!1),n=t.P(n,52,!1);var s=Math.max(e,i,n);return{rL:e,YF:i,NN:n,Ye:ce(s),Mf:ce(s),WV:ce(i),XV:ce(i),dispose:function(){this.Ye.clear(),this.Mf.clear(),this.WV.clear(),this.XV.clear()}}},Sn=function(t){t.Ye.clear(),t.Mf.clear(),t.WV.clear(),t.XV.clear()},xn=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low")),a=e.ma();n=Cn(i,n,s,a,e),e.set("conversionResult",n[0]),e.set("baseResult",n[1]),e.set("spanAResult",n[2]),e.set("spanBResult",n[3]),e.set("laggingResult",n[4])},wn=function(t,e,i,n){return Tl=t=t.Rd().Cc(t),t.Cf(yn(e,i,n)),t.Df(Sn),t.Bf(xn),t.cd("conversionResult"),t.cd("baseResult"),t.cd("spanAResult"),t.cd("spanBResult"),t.cd("laggingResult"),t},Cn=function(e,i,n,s,a){var o,r=window.NaN,l=window.NaN,h=window.NaN,c=window.NaN,u=window.NaN,d=a.Af;for(o=0;o<e.YF;o++)d=d&&d.next?d.next:null;if(d&&(u=t.N(new St(d,Tl,a.b,s).get("close"))),!(0,window.isNaN)(i)||!(0,window.isNaN)(n)){if(e.Ye.enqueue(i),e.Mf.enqueue(n),(s=e.Ye.Jg())>=e.rL){for(i=[],n=[],o=s-e.rL;o<s;o++)i.push(e.Ye.get(o)),n.push(e.Mf.get(o));r=((i=Math.max.apply(null,i))+(n=Math.min.apply(null,n)))/2}if(s>=e.YF){for(i=[],n=[],o=s-e.YF;o<s;o++)i.push(e.Ye.get(o)),n.push(e.Mf.get(o));l=((i=Math.max.apply(null,i))+(n=Math.min.apply(null,n)))/2}if(s>=e.NN){for(i=[],n=[],o=s-e.NN;o<s;o++)i.push(e.Ye.get(o)),n.push(e.Mf.get(o));i=Math.max.apply(null,i),n=Math.min.apply(null,n),h=e.WV.enqueue((r+l)/2),c=e.XV.enqueue((i+n)/2)}}return[r,l,h,c,u]},Tn=function(e){se.call(this,e),this.i=t.P(e[2],9,!1),this.b=t.P(e[3],26,!1),this.o=t.P(e[4],52,!1),ae(this,"conversion",e[5]),ae(this,"base",e[6]),ae(this,"leading",e[7],"range-area"),ae(this,"lagging",e[8]),re(this),this.D3().fill((function(){var e=this.getData("low");return this.getData("high")>=e?{color:this.sourceColor,opacity:.2}:{color:t.Ql(this.sourceColor,.7),opacity:.2}}))},Dn=function(e,n,s,a,o){if(e=t.P(e,14,!1),a=i(a,"sma"),n=t.P(n,1,!1),o=i(o,"sma"),s=t.P(s,3,!1),"sma"==a)var r=$e,l=Ie;else r=we,l=ke;if("sma"==o)var h=$e,c=Ie;else h=we,c=ke;return{Ye:ce(e),Mf:ce(e),TD:e,gI:a,GN:r(n),kha:l,vG:o,DL:h(s),fea:c,dispose:function(){this.Ye.clear(),this.Mf.clear(),this.GN.dispose(),this.DL.dispose()}}},kn=function(t){t.Ye.clear(),t.Mf.clear(),"sma"===t.gI?Oe(t.GN):Ce(t.GN),"sma"===t.vG?Oe(t.DL):Ce(t.DL)},$n=function(t,e,i,n){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n))return[window.NaN,window.NaN];var s,a=t.Ye,o=t.Mf;if(a.enqueue(i),o.enqueue(n),a.Jg()<t.TD)e=window.NaN;else{for(i=Number.MAX_VALUE,n=-Number.MIN_VALUE,s=0;s<t.TD;s++){var r=a.get(s),l=o.get(s);n<r&&(n=r),i>l&&(i=l)}e=100*(e-i)/(n-i)}return[e=t.kha(t.GN,e),t=t.fea(t.DL,e)]},On=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));s=(n=$n(i,n,s,a))[1],e.set("kResult",n[0]),e.set("dResult",s)},Pn=function(t,e,i,n,s,a){return(t=t.Rd().Cc(t)).Cf(Dn(e,i,n,s,a)),t.Df(kn),t.Bf(On),t.cd("kResult"),t.cd("dResult"),t},Ln=function(e,n,s,a,o,r,l){e=t.P(e,14,!1),a=i(a,"ema"),n=t.P(n,5,!1),o=i(o,"ema"),s=t.P(s,5,!1);var h=t.N(r);return r=(0,window.isNaN)(h)?-2:h,h=t.N(l),l=(0,window.isNaN)(h)?3:h,(e=Dn(e,n,s,a,o)).LV=r,e.NS=l,e},In=function(t){kn(t)},An=function(t,e,i,n){return(0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)?[window.NaN,window.NaN,window.NaN]:((e=$n(t,e,i,n)).push(t.LV*e[0]+t.NS*e[1]),e)},En=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));s=(n=An(i,n,s,a))[1],a=n[2],e.set("kResult",n[0]),e.set("dResult",s),e.set("jResult",a)},Gn=function(t,e,i,n,s,a,o,r){return(t=t.Rd().Cc(t)).Cf(Ln(e,i,n,s,a,o,r)),t.Df(In),t.Bf(En),t.cd("kResult"),t.cd("dResult"),t.cd("jResult"),t},Un=function(e){se.call(this,e),this.o=t.P(e[2],14,!1),this.b=t.P(e[3],5,!1),this.i=t.P(e[4],5,!1),this.K=i(e[5],"ema"),this.G=i(e[6],"ema");var n=t.N(e[7]);this.aa=(0,window.isNaN)(n)?-2:n,n=t.N(e[8]),this.P=(0,window.isNaN)(n)?3:n,ae(this,"kSeries",e[9]),ae(this,"dSeries",e[10]),ae(this,"jSeries",e[11]),re(this)},Fn=function(e,n,s,a){if(e=t.P(e,20,!1),n=t.P(n,10,!1),a=t.P(a,2,!1),"sma"==(s=i(s,"ema")))var o=$e,r=Ie;else o=we,r=ke;return{wp:o(e),vo:r,RR:_e(n),$N:a,rI:e,Y_:n,al:s,dispose:function(){this.wp.dispose(),this.RR.dispose()}}},Mn=function(t){"sma"==t.al?Oe(t.wp):Ce(t.wp),Ne(t.RR)},_n=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Rn(i,n,s,a),e.set("maResult",n[0]),e.set("upperResult",n[1]),e.set("lowerResult",n[2])},Nn=function(t,e,i,n,s){return(t=t.Rd().Cc(t)).Cf(Fn(e,i,n,s)),t.Df(Mn),t.Bf(_n),t.cd("maResult"),t.cd("upperResult"),t.cd("lowerResult"),t},Rn=function(t,e,i,n){var s=t.vo(t.wp,(i+n+e)/3);return e=Re(t.RR,e,i,n),[s,s+t.$N*e,s-t.$N*e]},jn=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),this.o=t.P(e[3],10,!1),this.i=i(e[4],"ema"),this.G=t.P(e[5],2,!1),ae(this,"ma",e[6]),ae(this,"range",e[7],"range-area"),re(this),this.A_().fill((function(){return t.Ul(this.sourceColor,.1)}))},Bn=function(e,i,n){if((e=t.P(e,12,!1))>(i=t.P(i,26,!1))){var s=e;e=i,i=s}return{yT:we(e),bY:we(i),XX:we(t.P(n,9,!1)),dispose:function(){this.yT.dispose(),this.bY.dispose(),this.XX.dispose()}}},Hn=function(t){Ce(t.yT),Ce(t.bY),Ce(t.XX)},zn=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s=(n=Vn(i,n))[1],a=n[2];e.set("macdResult",n[0]),e.set("signalResult",s),e.set("histogramResult",a)},Vn=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN,window.NaN];var i=ke(t.yT,e),n=ke(t.bY,e),s=ke(t.XX,i-n);if((0,window.isNaN)(s))var a=s=i=window.NaN;else a=i-n,i=i-n-s;return[a,s,i]},qn=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Bn(e,i,n)),t.Df(Hn),t.Bf(zn),t.cd("macdResult"),t.cd("signalResult"),t.cd("histogramResult"),t},Wn=function(e){se.call(this,e),this.b=t.P(e[2],12,!1),this.o=t.P(e[3],26,!1),this.i=t.P(e[4],9,!1),ae(this,"macd",e[5]),ae(this,"signal",e[6]),ae(this,"histogram",e[7],"column"),re(this)},Yn=function(e){return e=t.P(e,10,!1),{BO:ce(e),Wu:ce(e),ub:e,dispose:function(){this.BO.clear(),this.Wu.clear()}}},Kn=function(t){t.BO.clear(),t.Wu.clear(),t.wd=window.NaN},Xn=function(t,e,i,n,s){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s))return window.NaN;if(i=t.BO.enqueue(e+i+n),n=t.Wu.enqueue(s),s=t.BO,e=t.Wu,s.Jg()<t.ub)return window.NaN;if((0,window.isNaN)(t.wd)){var a=i=0;n=s.get(0);for(var o=1;o<t.ub;o++){var r=s.get(o),l=r*e.get(o);r!=n&&(r>n?i+=l:a+=l,n=r)}t.SV=0,t.mE=i,t.RI=a,s=100*i/(i+a)}else n*=i,0<t.SV?t.mE-=n:0>t.SV&&(t.RI-=n),n=s.get(-2),l=(r=s.get(-1))*e.get(-1),r>n?t.mE+=l:r<n&&(t.RI+=l),t.SV=s.get(0)-i,s=100*t.mE/(t.mE+t.RI);return t.wd=s},Jn=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low")),o=t.N(e.get("volume"));n=Xn(i,n,s,a,o),e.set("result",n)},Zn=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Yn(e)),i.Df(Kn),i.Bf(Jn),i.cd("result"),i},Qn=function(e){se.call(this,e),this.b=t.P(e[2],10,!1),ae(this,"series",e[3]),re(this)},ts=function(e){return e=t.P(e,20,!1),{Wb:ce(e),ub:e,wd:window.NaN,dispose:function(){this.Wb.clear()}}},es=function(t){t.Wb.clear(),t.wd=window.NaN},is=function(e,i){var n=e.get("value");if(n=t.p(n)?n:e.get("close"),n=t.N(n),(0,window.isNaN)(n))var s=window.NaN;else{s=i.ub;var a=i.Wb,o=i.wd;if(a.enqueue(n),a.Jg()<s)o=window.NaN;else if((0,window.isNaN)(o)){for(n=o=0;n<s;n++)o+=a.get(n);o/=s}else o+=((a=a.get(-1))-o)/s;s=o,i.wd=s}e.set("result",s)},ns=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ts(e)),i.Df(es),i.Bf(is),i.cd("result"),i},ss=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},as=function(e){return e=t.P(e,14,!1),{Wb:ce(e+1),ub:e,dispose:function(){this.Wb.clear()}}},os=function(t){t.Wb.clear(),t.wd=window.NaN},rs=function(t,e){if((0,window.isNaN)(e))return window.NaN;var i=t.Wb;return i.enqueue(e),i.Jg()<t.ub+1?window.NaN:(i=100*e/i.get(0),t.wd=i)},ls=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=rs(i,n),e.set("result",n)},hs=function(t,e){var i=t.Rd().Cc(t);return i.Cf(as(e)),i.Df(os),i.Bf(ls),i.cd("result"),i},cs=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),ae(this,"series",e[3]),re(this)},us=function(){return{Xy:window.NaN,cJ:window.NaN,dispose:function(){}}},ds=function(t){t.Xy=window.NaN,t.cJ=window.NaN},ps=function(e,i){var n=e.get("close");n=t.p(n)?n:e.get("value");var s=e.get("volume");s=t.N(s),n=t.N(n),n=fs(i,n,s),e.set("result",n)},gs=function(t){return(t=t.Rd().Cc(t)).Cf(us()),t.Df(ds),t.Bf(ps),t.cd("result"),t},fs=function(t,e,i){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:((0,window.isNaN)(t.Xy)?(t.cJ=e,t.Xy=i):(e>t.cJ?t.Xy+=i:e<t.cJ&&(t.Xy-=i),t.cJ=e),t.Xy)},ms=function(t){se.call(this,t),ae(this,"main",t[2]),re(this)},vs=function(e,i,n){return{c6:e=t.P(e,12,!1),J3:i=t.P(i,26,!1),e6:n=t.P(n,9,!1),WX:we(e),ZV:we(i),cY:we(n),dispose:function(){this.WX.dispose(),this.ZV.dispose(),this.cY.dispose()}}},bs=function(t){Ce(t.WX),Ce(t.ZV),Ce(t.cY)},ys=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN,window.NaN];var i=ke(t.WX,e),n=ke(t.ZV,e);return[i=(i-n)/n*100,n=ke(t.cY,i),i-n]},Ss=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ys(i,n),e.set("ppoResult",n[0]),e.set("signalResult",n[1]),e.set("histogramResult",n[2])},xs=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(vs(e,i,n)),t.Df(bs),t.Bf(Ss),t.cd("ppoResult"),t.cd("signalResult"),t.cd("histogramResult"),t},ws=function(e){se.call(this,e),this.i=t.P(e[2],12,!1),this.b=t.P(e[3],26,!1),this.o=t.P(e[4],9,!1),ae(this,"ppoSeries",e[5]),ae(this,"signalSeries",e[6]),ae(this,"histogramSeries",e[7],"column"),re(this)},Cs=function(e,i,n){return{Ye:ce(2),Mf:ce(2),ZQ:t.N(e)||.02,faa:t.N(i)||.02,TZ:t.N(n)||.2,dispose:function(){this.Ye.clear(),this.Mf.clear()}}},Ts=function(t){t.Ye.clear(),t.Mf.clear(),t.wd=window.NaN,t.$p=window.NaN,t.Yp=window.NaN,t.alpha=t.ZQ},Ds=function(t){t.alpha+=t.faa,t.alpha>t.TZ&&(t.alpha=t.TZ)},ks=function(t){var e=t.wd+t.alpha*(t.$p-t.wd);e>t.Mf.get(-2)?e=t.Mf.get(-2):!(0,window.isNaN)(t.aT)&&e>t.aT&&(e=t.aT),e>t.Mf.get(-1)&&(e=t.$p,t.$p=window.NaN,t.Yp=window.NaN,t.zN=!1,t.alpha=t.ZQ),t.wd=e},$s=function(t){var e=t.wd+t.alpha*(t.Yp-t.wd);e<t.Ye.get(-2)?e=t.Ye.get(-2):!(0,window.isNaN)(t.$S)&&e<t.$S&&(e=t.$S),e<t.Ye.get(-1)&&(e=t.Yp,t.$p=window.NaN,t.Yp=window.NaN,t.zN=!0,t.alpha=t.ZQ),t.wd=e},Os=function(t){var e=t.Ye.get(-2),i=t.Mf.get(-2);(0,window.isNaN)(t.$p)?t.$p=e:t.$p<e&&(t.$p=e,Ds(t)),((0,window.isNaN)(t.Yp)||t.Yp>i)&&(t.Yp=i)},Ps=function(t){var e=t.Ye.get(-2),i=t.Mf.get(-2);(0,window.isNaN)(t.Yp)?t.Yp=i:t.Yp>i&&(t.Yp=i,Ds(t)),((0,window.isNaN)(t.$p)||t.$p<e)&&(t.$p=e)},Ls=function(t,e,i){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:(e=t.$S=t.Ye.enqueue(e),t.aT=t.Mf.enqueue(i),2>t.Ye.Jg()?window.NaN:((0,window.isNaN)(t.wd)?(t.$p=window.NaN,t.Yp=window.NaN,t.zN=e<=t.Ye.get(0),t.zN?(Os(t),t.wd=t.$p,ks(t)):(Ps(t),t.wd=t.Yp,$s(t))):t.zN?(Os(t),ks(t)):(Ps(t),$s(t)),t.wd))},Is=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Ls(i,n,s),e.set("result",n)},As=function(t,e,i,n){return(t=t.Rd().Cc(t)).Cf(Cs(e,i,n)),t.Df(Ts),t.Bf(Is),t.cd("result"),t},Es=function(e){se.call(this,e),this.o=t.N(e[2])||.02,this.i=t.N(e[3])||.02,this.b=t.N(e[4])||.2,ae(this,"series",e[5],"marker"),re(this)},Gs=function(e){return e=t.P(e,20,!1),{Wb:ce(e+1),ub:e,dispose:function(){this.Wb.clear()}}},Us=function(t){t.Wb.clear()},Fs=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=_s(i,n),e.set("result",n)},Ms=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Gs(e)),i.Df(Us),i.Bf(Fs),i.cd("result"),i},_s=function(t,e){if((0,window.isNaN)(e))return window.NaN;var i=window.NaN;if(t.Wb.enqueue(e),t.Wb.Jg()>=t.ub+1){i=t.Wb.get(0);for(var n=0,s=1;s<t.ub+1;s++){var a=t.Wb.get(s);a>i&&n++,i=a}i=n/t.ub*100}return i},Ns=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},Rs=function(e){return e=t.P(e,20,!1),{Ye:ce(e),Mf:ce(e),ub:e,dispose:function(){this.Ye.clear(),this.Mf.clear()}}},js=function(t){t.Ye.clear(),t.Mf.clear()},Bs=function(t,e,i){if((0,window.isNaN)(e)||(0,window.isNaN)(i))return[window.NaN,window.NaN,window.NaN];var n=window.NaN,s=window.NaN,a=window.NaN;if(t.Ye.Jg()>=t.ub){n=t.Ye.get(0),a=t.Mf.get(0);for(var o,r=1;r<t.ub;r++)(s=t.Ye.get(r))>n&&(n=s),(o=t.Mf.get(r))<a&&(a=o);s=(n+a)/2}return t.Ye.enqueue(e),t.Mf.enqueue(i),[n,s,a]},Hs=function(e,i){var n=t.N(e.get("high")),s=t.N(e.get("low"));n=Bs(i,n,s),e.set("upperResult",n[0]),e.set("middleResult",n[1]),e.set("lowerResult",n[2])},zs=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Rs(e)),i.Df(js),i.Bf(Hs),i.cd("upperResult"),i.cd("middleResult"),i.cd("lowerResult"),i},Vs=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"middle",e[3]),ae(this,"range",e[4],"range-area"),re(this),this.B_().fill((function(){return t.Ul(this.sourceColor,.1)}))},qs=function(e){return{XR:t.P(e,0,!1),WG:window.NaN,dispose:function(){this.WG=window.NaN}}},Ws=function(){this.WG=window.NaN},Ys=function(e,i){var n=e.get("priceA");n=t.N(n);var s=e.get("priceB");s=t.N(s),n=Xs(i,n,s,e.Af.key),e.set("result",n)},Ks=function(t,e){var i=t.Rd().Cc(t);return i.Cf(qs(e)),i.Df(Ws),i.Bf(Ys),i.cd("result"),i},Xs=function(t,e,i,n){return(0,window.isNaN)(e)||(0,window.isNaN)(i)?window.NaN:((0,window.isNaN)(t.WG)&&n>=t.XR&&(t.WG=e/i),e/i/t.WG*100)},Js=function(e){se.call(this,e);var i=t.ps(e[2]);this.b=i?i.getTime():0,this.i=e[2]||0,ae(this,"main",e[3]),re(this)},Zs=function(e){return e=t.P(e,12,!1),{Wb:ce(e),ub:e,dispose:function(){this.Wb.clear()}}},Qs=function(t){t.Wb.clear()},ta=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ia(i,n),e.set("result",n)},ea=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Zs(e)),i.Df(Qs),i.Bf(ta),i.cd("result"),i},ia=function(t,e){if((0,window.isNaN)(e))return window.NaN;t.Wb.enqueue(e);var i=window.NaN;if(t.Wb.Jg()>=t.ub){i=0;for(var n=t.ub,s=0;s<n;s++){for(var a=n-s,o=t,r=n,l=o.Wb.get(s),h=1,c=0,u=0;u<r;u++){var d=o.Wb.get(u);l<d?h++:l==d&&c++}i+=Math.pow(a-(h+(c-1)/2),2)}i=100*(1-6*i/(t.ub*(Math.pow(t.ub,2)-1)))}return i},na=function(e){se.call(this,e),this.b=t.P(e[2],12,!1),ae(this,"main",e[3]),re(this)},sa=function(e){return e=t.P(e,14,!1),{Wb:ce(e+1),ub:e,lz:window.NaN,Xx:window.NaN,dispose:function(){this.Wb.clear()}}},aa=function(t){t.Wb.clear(),t.lz=window.NaN,t.Xx=window.NaN},oa=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n);var s=(0,window.isNaN)(n);if(s||i.Wb.enqueue(n),s||i.Wb.Jg()<i.ub+1)n=window.NaN;else{if((0,window.isNaN)(i.lz)){var a=0,o=0;s=i.Wb.get(0);for(var r=1;r<i.ub+1;r++)n=s,(s=i.Wb.get(r))>n?a+=s-n:s<n&&(o+=n-s);i.lz=a,i.Xx=o}else s=i.Wb.get(-1),n=i.Wb.get(-2),a=(i.ub-1)/i.ub,i.lz*=a,i.Xx*=a,s>n?i.lz+=s-n:s<n&&(i.Xx+=n-s);n=i.Xx?100-100/(1+i.lz/i.Xx):100}e.set("result",n)},ra=function(t,e){var i=t.Rd().Cc(t);return i.Cf(sa(e)),i.Df(aa),i.Bf(oa),i.cd("result"),i},la=function(e){se.call(this,e),this.b=t.P(e[2],14,!1),ae(this,"main",e[3]),re(this)},ha=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},ca=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),ae(this,"main",e[3]),re(this)},ua=function(e){se.call(this,e),this.o=t.P(e[2],14,!1),this.b=t.P(e[3],1,!1),this.i=t.P(e[4],3,!1),this.K=i(e[5],"sma"),this.G=i(e[6],"sma"),ae(this,"kSeries",e[7]),ae(this,"dSeries",e[8]),re(this)},da=function(e,i,n,s){if(e=t.P(e,15,!1),i=t.P(i,9,!1),"ema"===n){var a=Ce;n=ke;var o=we}else a=Oe,n=Ie,o=$e;if("ema"===s){var r=Ce;s=ke;var l=we}else r=Oe,s=Ie,l=$e;return{ub:e,mP:i,wd:window.NaN,GT:o(e),BX:o(e),KP:o(e),YX:l(i),vo:n,wha:s,xha:r,cW:a,dispose:function(){this.GT.dispose(),this.BX.dispose(),this.KP.dispose(),this.YX.dispose()}}},pa=function(t){t.wd=window.NaN,t.cW(t.GT),t.cW(t.BX),t.cW(t.KP),t.xha(t.YX)},ga=function(e,i){var n=e.get("value");n=t.p(n)?n:e.get("close"),n=t.N(n),n=ma(i,n),e.set("trix",n[0]),e.set("signal",n[1])},fa=function(t,e,i,n,s){return(t=t.Rd().Cc(t)).Cf(da(e,i,n,s)),t.Df(pa),t.Bf(ga),t.cd("trix"),t.cd("signal"),t},ma=function(t,e){if((0,window.isNaN)(e))return[window.NaN,window.NaN];t.wd=t.KP.wd;var i=t.vo(t.GT,e);return i=t.vo(t.BX,i),[i=(t.vo(t.KP,i)-t.wd)/t.wd*100,t.wha(t.YX,i)]},va=function(e){se.call(this,e),this.b=t.P(e[2],15,!1),this.i=t.P(e[3],9,!1),this.G=i(e[4],"ema"),this.o=i(e[5],"ema"),ae(this,"trix",e[6]),ae(this,"signal",e[7]),re(this)},ba=function(t){return{rG:0,qG:0,cL:window.NaN,ya:t,eaa:["hour","millisecond","minute","second"],dispose:function(){this.qG=this.rG=0}}},ya=function(t){t.rG=0,t.qG=0,t.cL=window.NaN},Sa=function(t,e,i,n,s){return(0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s)?window.NaN:(t.rG+=s,t.qG+=(e+i+n)*s/3,t.qG/t.rG)},xa=function(e,i){var n=t.N(e.Gh());if(((0,window.isNaN)(i.cL)||864e5<=n-i.cL)&&(n=new Date(n),i.cL=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),0,0,0),i.dispose()),n=i.ya.Wm().Cn().unit,-1===i.eaa.indexOf(n))e.set("vwapValue",window.NaN);else{n=t.N(e.get("high"));var s=t.N(e.get("low")),a=t.N(e.get("close")),o=t.N(e.get("volume"));n=Sa(i,n,s,a,o),e.set("vwapValue",n)}},wa=function(t,e){var i=t.Rd().Cc(t);return i.Cf(ba(e)),i.Df(ya),i.Bf(xa),i.cd("vwapValue"),i},Ca=function(t){se.call(this,t),ae(this,"vwapSeries",t[2]),re(this)},Ta=function(e,n){var s=t.P(e,20,!1),a=i(n,"sma");if("ema"==a)var o=we,r=ke;else o=$e,r=Ie;return{rI:s,al:a,wp:o(s),vo:r,dispose:function(){this.wp.dispose()}}},Da=function(t){"ema"==t.al?Ce(t.wp):Oe(t.wp)},ka=function(t,e){return(0,window.isNaN)(e)?[window.NaN,window.NaN]:[e,t.vo(t.wp,e)]},$a=function(e,i){var n=t.N(e.get("volume"));n=ka(i,n),e.set("volumeResult",n[0]),e.set("maResult",n[1])},Oa=function(t,e,i){return(t=t.Rd().Cc(t)).Cf(Ta(e,i)),t.Df(Da),t.Bf($a),t.cd("volumeResult"),t.cd("maResult"),t},Pa=function(e){se.call(this,e),this.b=t.P(e[2],20,!1),this.i=i(e[3],"sma"),ae(this,"volumeSeries",e[4],"stick"),ae(this,"maSeries",e[5]),re(this)},La=function(e){se.call(this,e),this.b=t.P(e[2],9,!1),ae(this,"main",e[3]),re(this)},Ia=function(e){return e=t.P(e,10,!1),{Vo:ce(e),Ye:ce(e),Mf:ce(e),ub:e,dispose:function(){this.Vo.clear(),this.Ye.clear(),this.Mf.clear()}}},Aa=function(t){t.Vo.clear(),t.Ye.clear(),t.Mf.clear(),t.wd=window.NaN},Ea=function(t,e,i,n){if((0,window.isNaN)(e)||(0,window.isNaN)(i)||(0,window.isNaN)(n))return window.NaN;if(t.Vo.enqueue(e),t.Ye.enqueue(i),t.Mf.enqueue(n),t.Vo.Jg()<t.ub)return window.NaN;for(i=Number.MAX_VALUE,e=-Number.MIN_VALUE,n=0;n<t.ub;n++){var s=t.Ye.get(n),a=t.Mf.get(n);e<s&&(e=s),i>a&&(i=a)}return e=-100*(e-t.Vo.get(-1))/(e-i),t.wd=e},Ga=function(e,i){var n=t.N(e.get("close")),s=t.N(e.get("high")),a=t.N(e.get("low"));n=Ea(i,n,s,a),e.set("result",n)},Ua=function(t,e){var i=t.Rd().Cc(t);return i.Cf(Ia(e)),i.Df(Aa),i.Bf(Ga),i.cd("result"),i},Fa=function(e){se.call(this,e),this.b=t.P(e[2],10,!1),ae(this,"series",e[3]),re(this)},Ma=function(e){function i(t){return function(e){for(var i=[this],n=0;n<arguments.length;n++)i[n+1]=arguments[n];return i=new Kl[t](i),this.ID.push(i),i}}for(var n in e=e.prototype,Kl)e[t.pm(n)]=i(n)},_a=function(e){t.Y.call(this),this.Ga("chart"),this.pa=e,this.$f=this.Ia=this.jb=null,this.Sa=[],this.ID=[],this.Fc=null,this.qf=[],this.Au=[],this.mc=null,this.og=[],this.rg=[],this.tg=[],this.Yg=[],this.Zg=[],this.jh=[],this.kh=[],this.Ql=this.Sf=this.Oj=null,this.kn={},this.j3=this.cI=this.l3=!1,this.Qj=void 0,this.rs=(0,t.pa)((function(){if(this.Qj=void 0,(0,window.isNaN)(this.wM))this.pa.BY();else{var t=this.pa,e=this.wM,i=this.RT,n=this.ofa,s=this.pfa;t.P=e,t.fb=i,t.Za=n,t.$a=s,t.Uc=this,Uo(t,e,i,n,s,this)}}),this),this.Tla=(0,t.pa)((function(){this.i7=void 0;var e=this.nQ.anchor,i=this.nQ.mo,n=this.nQ.eea;this.nQ=null;var s=this.pa,a=s.Ra();n=Math.min(n,1.9),t.J(a,ao)?(i*=a=e.lastIndex-e.rj,a=a*(1-n)/2,n=s.zi(e.rj-i-a),i=s.zi(e.lastIndex-i+a)):(i*=a=e.uw-e.qs,a=a*(1-n)/2,n=e.qs-i-a,i=e.uw-i+a),n==s.b.b.ki&&i==s.b.b.Wi||No(s,n,i,e,void 0)}),this),this.ax=null,this.cq("line"),t.T(this.ua,[["pointWidth",128,1,0,this.Ey],["maxPointWidth",128,1,0,this.Ey],["minPointLength",128,1,0,this.rB],["baseline",128,1,0,this.Zja],["weight",4,9]])},Na=function(e,i,n,s){var a=window.Infinity,o=0;if(n&&i){var r=i.bb();n=i.check(t.UG)?t.$o(n.get("close"),n.get("high"),n.get("low"),n.get("open")):i.check(t.fm)?n.get("high"):n.get("value"),n=t.N(n),(0,window.isNaN)(n)||(e=e.hh,a=i.ob(),i=1-r.transform(r.Lz(n,i.Rx)),o=(a.top+a.height*i-e.top)/e.height,a=Math.abs(o-s))}return{ratio:o,Tf:a}},Ra=function(t,e){t.wc.wa(e,["touchstart","mousedown"],t.Mha)},ja=function(e){var i;if(e.Kv(),e.J(128))for(i=0;i<e.Sa.length;i++){var n=e.Sa[i];n&&(n.P=E(n.la))}if(e.J(133124)){var s;n=e.ob(),(i=t.wr(e,"background"))&&i.ja(n),(i=t.wr(e,"title"))&&i.enabled()&&(i.ja(n),n=i.yd()),e.mc&&e.mc.enabled()&&(e.mc.ka(),e.mc.ja(n),e.mc.da(!1),n=e.mc.yd(),e.B(512)),s=e.J(2048)?(0,window.isNaN)(e.gN)?X(e.pa.b):e.gN:window.NaN;var a=e.eg();"outside"==a.g("positionMode")&&(Ba(e,n,s),e.va(64,!0),n=e.eg().yd());var o=0,r=0,l=!a.g("enabled"),h="left"==a.g("position"),c="right"==a.g("position");for(i=0;i<e.qf.length;i++){var u=e.qf[i];if(u){u.ka();var d=u.width();"left"==u.g("orientation")?l||!h?(u.ja(n.left-d-o,n.top,0,n.height),o+=d):(u.ja(n),n=u.yd()):"right"==u.g("orientation")&&(l||!c?(r+=d,u.ja(n.left,n.top,n.width+r,n.height)):(u.ja(n),n=u.yd())),u.da(!1)}}0>n.width&&(n.width=1),0>n.height&&(n.top+=n.height,n.height=-n.height),e.mc&&e.mc.enabled()&&(e.mc.ka(),e.mc.ja(n.left,n.top,n.width,n.height+e.mc.height()),e.mc.da(!1),n=e.mc.yd()),"inside"==a.g("positionMode")&&(Ba(e,n,s),e.va(64,!0)),e.hh=n,e.Oj.Qf(e.hh),e.mh().ja(n),e.Dy(!0,!0),e.I(2052)}},Ba=function(e,i,n,s,a){var o=e.eg();o.ka(),o.O(e.Oa),i&&o.ja(i),null===(i=a?"":e.d2(o.g("titleFormat"),n,s))||t.ew(o.title(),i),a?(t.Zw(o),o.RA(null)):o.RA()||o.RA(e),o.B(1040),o.W(),o.da(!1)},Ha=function(e,i){return(0,t.Wa)(e.Sa,(function(t){return{series:t,point:t&&t.enabled()&&t.la.search(i,"exact")||null}}))},za=function(t){return t.originalEvent.kf.kf.touches},Va=function(e,i){return t.p(i)?(e.l3=i,e):e.l3},qa=function(e,i){return t.p(i)?(e.cI=i,e):e.cI},Wa=function(e,i,n,s,a,o){var r,l,h,c=[];for(r=0;r<i.length;r++)if(h=i[r]){var u=h.F();if(l=h.scale()){var d=t.oa(l);a[d]?u.scale=(0,t.za)(s,a[d]):(a[d]=l.F(),s.push(a[d]),u.scale=s.length-1)}(d=h.axis())&&(l=t.oa(d),0>(l=(0,t.za)(o,l))?(l=d.scale(),"layout"in u||(h=!1,t.J(d,t.Sy)&&(h="left"==(d=d.g("orientation"))||"right"==d),u.layout=h?"horizontal":"vertical"),"scale"in u||(a[d=t.oa(l)]?u.scale=(0,t.za)(s,a[d]):(a[d]=l.F(),s.push(a[d]),u.scale=s.length-1))):u.axis=l),c.push(u)}c.length&&(n[e]=c)},Ya=function(e,i){t.ag.call(this,i.ia()),this.b=e,this.Qj=void 0,this.rs=(0,t.pa)((function(){this.Qj=void 0;var t=this.b.pa,e=this.ba,i=Ro(t,this.ea,e);i&&No(t,i[0],i[1],e,void 0)}),this),t.bg(this),this.wa("start",this.Uba,!1,this),this.wa("beforedrag",this.zda,!1,this),this.wa("end",this.Tba,!1,this)},Ka=function(t,e,i){this.b=this.i=this.o=this.ea=null,Rt.call(this,t,t,e,i)},Xa=function(){},Ja=function(){},Za=function(e){t.V.call(this),this.cl=1e3,this.K=6,this.b=e,this.Cw=this.Ps=this.xp=this.On=this.aa=this.i=this.ba=this.ea=window.NaN,this.Xm={},this.Kc=!1,this.o=this.P=null,this.jd=[],this.D=this.G=null,this.Ba=Qa(this,null),this.na=Qa(this,null),this.Xa(Zl)},Qa=function(e,i){var n=e.b.Wm().Cn();return n={unitType:n.unit,unitCount:n.count,intervalsCount:0},"object"==t.ka(i)&&(null!=i.unitType&&(n.unitType=t.Zk(i.unitType)),0<i.unitCount&&(n.unitCount=+i.unitCount),i.intervalsCount&&(n.intervalsCount=Math.max(0,i.intervalsCount))),n},to=function(t,e){return!!(t.G&&e<t.G.max||t.D&&e>t.D.min)},eo=function(e,i,n,s,a,o){i=t.Za(i,e.ea,e.ba),n=t.Za(n,e.ea,e.ba);var r=e.b.Uf(i),l=e.b.Uf(n);(0,window.isNaN)(r)||(0,window.isNaN)(l)?(e.On=window.NaN,e.xp=window.NaN):(e.On=i,e.xp=n),e.Ps=r,e.Cw=l,e.Dg=s,e.count=a,e.Kc=!1,e.Xm=o,e.va(512)},io=function(e){var i=null;if(t.z(e)){i=t.Zk(e,null);var n=1}else t.C(e)&&(i=t.Zk(e.unit,null),n=t.P(e.count));return i?[i,n]:null},no=function(t){this.qa=t,this.K=!0},so=function(e,i,n){e=(e=e.qa).b.zi(Math.ceil(e.b.Uf(i.getTime())));var s=i.getTime();return i.add(n),i.getTime()<=e&&(s=t.So(e,n,s),i.setTime(s),i.add(n)),s},ao=function(t){Za.call(this,t)},oo=function(e){t.GB.call(this),this.pa=e,this.Sa=[],this.ID=[],this.fd=this.Fa=this.wB=this.yB=this.mc=this.Fc=null,this.cq("line")},ro=function(t){for(var e=0;e<t.Sa.length;e++){var i=t.Sa[e];i&&i.B(1024)}t.mc&&t.mc.B(16),t.B(1536)},lo=function(){Mt.call(this)},ho=function(e,i,n,s){for(var a=new r(n.unitType,n.unitCount).sj(),o=[],l=s?1:-1,h=1;h<=n.intervalsCount;h++){var c=[i+h*l*a];s?o.push(c):t.Da(o,c,0)}return e.Yr(o),o},co=function(e){t.V.call(this),this.Ga("stock.eventMarkers"),this.pa=e,this.ca=new t.my(this,el,t.gm,Xr),this.ca.ta("connectorAfterInitCallback",o),this.ca.Ga("defaultFontSettings","stock.eventMarkers.normal"),this.za=new t.my(this,nl,t.gm,Xr),t.W(this,"hovered",this.za),this.Ea=new t.my(this,nl,t.gm,Xr),t.W(this,"selected",this.Ea),t.T(this.ua,Yr),e.wa("eventmarkermouseover",this.z_,!1,this),e.wa("eventmarkermousemove",this.z_,!1,this),e.wa("eventmarkermouseout",this.Zba,!1,this),e.wa("eventmarkerclick",this.Yba,!1,this)},uo=function(e,i,n,s,a,o){return{type:n?"eventmarkersselect":"eventmarkershover",status:(0,t.Wa)(s,(function(t){return t.group.jp(t.index)})),eventMarker:a.jp(o),actualTarget:a,target:e,originalEvent:i}},po=function(e,i){t.ag.call(this,e.ia()),this.hC=e,this.LY=i,this.b=null,this.i=0},go=function(e,i){t.qf.call(this),this.o=[],this.b=[],this.pa=i,this.i=[],this.Jc=e,this.Ad=0,this.G=[],this.aa=[],this.K=[],this.D={},this.P=e.path().stroke("none"),this.f=0},fo=function(e){t.V.call(this),this.ya=e,this.wb=this.ya.Na.Bd(),this.wb.Cd("data-name","stock-splitters-layer"),this.wb.zIndex(1e5),this.o=new go(this.wb,this.ya),this.o.wa("dragStart",(function(){this.b=!0}),void 0,this),this.o.wa("dragEnd",(function(){this.b=!1}),void 0,this),this.b=!1},mo=function(){t.V.call(this),t.T(this.ua,[["fill",0,0]])},vo=function(){t.V.call(this),t.T(this.ua,[["stroke",0,0]])},bo=function(){t.V.call(this),t.T(this.ua,[["stroke",0,1]])},yo=function(){t.V.call(this),this.za=this.ca=this.fi=null,t.T(this.ua,[["enabled",0,1]])},So=function(e){t.ux.call(this),this.Ga("stock"),this.f=[],this.i=null,this.b=new _,t.K(this.b,this.gea,this),this.na=!1,this.eb=null,this.Ka=this.sb=!1,this.G=this.$a=this.Za=this.fb=this.P=window.NaN,this.Ql=this.Sf=null,this.D=t.eq.annotations,this.Sb={},this.aa=null,this.ud=(0,t.pa)(this.qea,this),this.Hd=(0,t.pa)(this.rea,this),this.Ha=window.Infinity,this.qc=-1;var i=this.vt=!!e;e={};var n=4194304|t.QG;n|=i&&1048576,i=i?2:1,e.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e.candlestick={Fb:5,Kb:i,Lb:[t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e.column={Fb:6,Kb:i,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e["jump-line"]={Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.stick={Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.marker={Fb:9,Kb:i,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.ohlc={Fb:10,Kb:i,Lb:[t.BH,t.GH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-area"]={Fb:11,Kb:1,Lb:[t.nH,t.QH,t.MH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-column"]={Fb:12,Kb:i,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-spline-area"]={Fb:13,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH,t.LH,t.PH,t.sH,t.rH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e["range-step-area"]={Fb:14,Kb:1,Lb:[t.nH,t.MH,t.QH,t.qH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},e.spline={Fb:15,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e["spline-area"]={Fb:16,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e["step-area"]={Fb:17,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"zero"},e["step-line"]={Fb:18,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:n,Ab:"value",zb:"value"},e.hilo={Fb:31,Kb:2,Lb:[t.oH,t.MH,t.QH],Ob:null,Jb:null,Cb:n,Ab:"high",zb:"low"},this.fj=e,this.K=null,t.T(this.ua,[["plotsManualBounds",4100,9],["zoomMarqueeFill",0,0],["zoomMarqueeStroke",0,0]]),this.I(65536)},xo=function(e,i,n,s){var a=t.N(i);if((0,window.isNaN)(a)?a=0:(a=i,i=n),!(n=e.f[a])){var o=wo(e),r=0;if(o.length)for(n=0;n<o.length;n++){var l=o[n].g("weight");l&&(r+=l)}(n=new _a(e)).Ga("stock.defaultPlotSettings",e.W0()),n.mh().parent(e.mh()),n.Kg(!0),n.kb(e),r&&n.ta("weight",r/o.length),e.f[a]=n,t.K(n,e.Fja,e),a>e.qc&&((o=e.f[e.qc])&&qa(o,!1),qa(n,!0),e.qc=a),a<e.Ha&&((o=e.f[e.Ha])&&Va(o,!1),Va(n,!0),e.Ha=a),e.B(4100,9)}return t.p(i)?(n.ga(!!s,i),e):n},wo=function(t){for(var e=[],i=0;i<t.f.length;i++){var n=t.f[i];n&&n.enabled()&&!n.md&&e.push(n)}return e},Co=function(e,i){for(var n=(0,t.za)(e.f,i)-1;-1<n;n--){var s=e.f[n];if(s&&s.enabled())return s}return null},To=function(e,i,n){if(i!==n&&null!==i&&null!==n){var s=(0,t.za)(e.f,n);e.f[(0,t.za)(e.f,i)]=n,e.f[s]=i,qa(i)?(qa(i,!1),qa(n,!0)):qa(n)&&(qa(i,!0),qa(n,!1)),Va(i)?(Va(i,!1),Va(n,!0)):Va(n)&&(Va(i,!0),Va(n,!1)),e.B(4100,9)}},Do=function(t,e,i){t.ka();var n=t.Ra(),s=t.tC().Ra();R(t.b)&&(Y(t.b,n),Y(t.b,s)),t.b.select(e,i,s)&&(W(t.b,n),t.Dy()),t.da(!0)},ko=function(e,i,n,s,a){return t.p(s)?e.dispatchEvent({type:i,source:n,firstSelected:s,lastSelected:a,firstKey:e.b.o,lastKey:e.b.D}):(s=e.Wm(),e.dispatchEvent({type:i,source:n,firstSelected:e.b.b.ki,lastSelected:e.b.b.Wi,firstVisible:K(e.b),lastVisible:X(e.b),firstKey:e.b.o,lastKey:e.b.D,dataIntervalUnit:s.Cn().unit,dataIntervalUnitCount:s.Cn().count,dataIsGrouped:s.OD()}))},$o=function(e,i,n){var s=i.bb(),a=t.oa(s),o=i.Ec(),r=U(i.la,"value"),l=n[a];if(!l)for(l=n[a]=[],a=o.Hb(),n=0;n<a+2;n++)l.push({Sw:0,Cp:0,Iw:0,Rw:0,zp:0,Hw:0,pE:!1,cE:!1,Rs:!1});var h=(a="percent"==s.jn())?e.E4:e.Ala,c=l[n=0],u=I(i.la);if(u)if(u.j("stackedMissing",c.Rs),c.Rs=u.j("missing"))var d=window.NaN;else{var p=Number(u.lr(r));h.call(e,s,u,c,p,null,window.NaN),d=p}else d=window.NaN;for(o.reset();o.advance();){var g=c;c=l[++n],o.j("stackedMissing",c.Rs),(c.Rs=o.j("missing"))?(g.cE=!0,d=window.NaN):(p=Number(o.lr(r)),h.call(e,s,o,c,p,g,d),d=p)}return(u=A(i.la))&&(c=l[++n],u.j("stackedMissing",c.Rs),(c.Rs=u.j("missing"))||(p=Number(u.lr(r)),h.call(e,s,u,c,p,g,d))),a},Oo=function(t,e,i){t.j("missing")?(t.j("stackedPositiveZero",Number(t.j("stackedPositiveZero"))/i.Cp*100||0),t.j("stackedNegativeZero",Number(t.j("stackedNegativeZero"))/i.zp*100||0)):(0<=Number(t.j("stackedValue"))?(i=i.Cp,e.Xc(100)):(i=-i.zp,e.Xc(-100)),t.j("stackedZero",Number(t.j("stackedZero"))/i*100||0),t.j("stackedValue",Number(t.j("stackedValue"))/i*100||0))},Po=function(e,i,n){var s=t.oa(i),a=e.$();n=n[s],i.Xc(0);var o=I(e.la);o&&(s=n[0],Oo(o,i,s));var r=1;for(a.reset();a.advance();)s=n[r++],Oo(a,i,s);(o=A(e.la))&&(s=n[r],Oo(o,i,s))},Lo=function(e,i,n,s){var a=0,o=[],r=[],l=[],h=0,c=!1,u=n-i;for(n=0;n<e.length;n++){var d=e[n];d.ka();var p=t.L(d.minHeight(),s),g=t.L(d.maxHeight(),s),f=t.L(d.height(),s);(0,window.isNaN)(f)?(h++,(0,window.isNaN)(p)||(r[n]=p,c=!0),(0,window.isNaN)(g)||(l[n]=g,c=!0)):((0,window.isNaN)(p)||(f=Math.max(f,p)),(0,window.isNaN)(g)||(f=Math.min(f,g)),a+=f,o[n]=f)}if(c&&0<h){var m=[];d=h*h;do{for(c=!1,s=Math.max(3,(u-a)/h),n=0;n<e.length;n++)if(!(n in o))if(n in m){if(m[n]==r[n]&&r[n]<s){a-=r[n],h++,delete m[n],c=!0;break}if(m[n]==l[n]&&l[n]>s){a-=l[n],h++,delete m[n],c=!0;break}}else{if(n in r&&r[n]>s){a+=m[n]=r[n],h--,c=!0;break}if(n in l&&l[n]<s){a+=m[n]=l[n],h--,c=!0;break}}}while(c&&0<h&&d--)}for(s=Math.max(3,(u-a)/h),n=0;n<e.length;n++)d=e[n],f=n in o?o[n]:m&&n in m?m[n]:s,f=Math.round(f),h=(a=d).Kx!=i,a.Kx=i,h&&a.va(2),d.zB(f),d.da(!0),i+=f},Io=function(e,i){for(var n=!1,s=0;s<e.f.length;s++){var a=e.f[s];if(a&&!a.md){a=a.Ue();for(var o=0;o<a.length;o++)if(a[o].la==i){n=!0;break}}}if(!n&&(n=e.b,(s=t.oa(i).toFixed(0))in n.ea)){for(s in i.ib=null,delete n.ea[s],delete n.na[s],delete n.Za[s],a={},n.ea){o=n.ea[s].pr().Rd();var r=t.oa(o).toFixed(0);r in a||(a[r]=o)}for(s in n.aa)if(!(s in a)){t.kr(n.aa[s],n.t6,n);break}for(var l in n.aa=a,n.f.i=!0,n.P)n.P[l].i=!0;n.B(16384,16)}},Ao=function(t){t.Ka=!0,Mo(t)},Eo=function(t){t.Ka=!1,Go(t)},Go=function(t){(0,window.isNaN)(t.P)||Uo(t,t.P,t.fb,t.Za,t.$a,t.Uc)},Uo=function(e,i,n,s,a,o){if(!(e.Ka||0>i||1<i)){var r=e.Ra().Mc(i),l=S(e.b.i,r);if(!(0,window.isNaN)(l)){var h;for((i=o&&o.enabled()?Ha(o,l):null)&&(h=Fo(i,n)),n=0;n<e.f.length;n++)e.f[n]&&(i=e.f[n]).ro(l,r,o,a,i==o?h:void 0,i===o);if(e.sb=!0,n=e.Wm(),o={hoveredDate:{value:l,type:"date-time"},rawHoveredDate:{value:r,type:"date-time"},dataIntervalUnit:{value:n.Cn().unit,type:"string"},dataIntervalUnitCount:{value:n.Cn().count,type:"number"},isGrouped:{value:n.OD()}},i=e.Ua(),to(e.eb,r))i.Lc();else if("union"==i.g("displayMode")&&"point"!=i.g("positionMode")){for(h=[],e=(0,t.Wa)(e.f,(function(t){return{plot:t,infoBySeries:t&&t.enabled()?Ha(t,l):null}})),n=0;n<e.length;n++)if(e[n]&&(r=e[n].infoBySeries))for(var c=0;c<r.length;c++){var u=r[c].series;u&&h.push({series:u})}t.Nw(i,h,s,a,null,!1,o)}else"single"==i.g("displayMode")&&(h&&.03>h.distance?(e=h.series,t.Nw(i,[{series:e}],s,a,e,!1,o)):i.Lc())}}},Fo=function(t,e){for(var i,n=null,s=-1,a=window.Infinity,o=0;o<t.length;o++){var r=t[o],l=(r=Na(r.series.jf,r.series,r.point,e)).Tf;a>l&&(a=l,i=r.ratio,s=o)}return 0<=s&&((n=t[s]).distance=a,n.pointYRatio=i),n},Mo=function(t){if(t.sb){t.sb=!1;for(var e=0;e<t.f.length;e++){var i=t.f[e];i&&i.BY()}t.Ua().Lc()}},_o=function(t){switch(t){case"thumb-drag":return"scroller-thumb-drag";case"selected-range-drag":return"scroller-drag";default:return"scroller-click"}},No=function(t,e,i,n,s){ko(t,"selectedrangebeforechange",s||"plot-drag",e,i)&&(Do(t,e,i),n.rj=t.Uf(n.qs),n.lastIndex=t.Uf(n.uw),n.Ps=t.Uf(n.On),n.Cw=t.Uf(n.xp),ko(t,"selectedrangechange",s||"plot-drag"))},Ro=function(e,i,n){var s=e.Ra();return t.J(s,ao)?(s=n.lastIndex-n.rj,s*=i,i=e.zi(n.rj-s),n=e.zi(n.lastIndex-s)):(s=n.uw-n.qs,s*=i,i=n.qs-s,n=n.uw-s),i>n&&(s=i,i=n,n=s),i!=e.b.b.ki||n!=e.b.b.Wi?[i,n]:null},jo=function(e,i,n){if(e=e.Ra(),t.J(e,ao)){var s=n.lastIndex-n.rj;e=(n.Ps-n.rj)/s,n=(n.Cw-n.rj)/s}else s=n.uw-n.qs,e=(n.On-n.qs)/s,n=(n.xp-n.qs)/s;return-t.Za(-i,e,n-1)},Bo={j9:"no-overlap",cma:"allow-minor-overlap",bma:"allow-major-overlap",k7:"allow-overlap"},Ho={bC:"area",aZ:"candlestick",lF:"column",tt:"line",av:"marker",lZ:"ohlc",pZ:"range-area",FQ:"range-column",rZ:"range-spline-area",sZ:"range-step-area",vZ:"spline",wZ:"spline-area",CZ:"step-area",DZ:"step-line",Q8:"jump-line",k$:"stick",O8:"hilo"},zo={bsa:"sma",xoa:"ema",bta:"wma"},Vo={Eoa:"exact-or-prev",Coa:"exact",Doa:"exact-or-next",NEAREST:"nearest"},qo={name:"fill",Qb:"path",Yb:"fill",Zb:null,ac:!1,Ib:!1,zIndex:0},Wo={name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!1,Ib:!1,zIndex:2e-6},Yo={name:"hatchFill",Qb:"path",Yb:"hatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},Ko={name:"negativeHatchFill",Qb:"path",Yb:"negativeHatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},Xo={name:"negative",Qb:"path",Yb:"negativeFill",Zb:"negativeStroke",ac:!1,Ib:!1,zIndex:0},Jo={name:"rising",Qb:"path",Yb:"risingFill",Zb:"risingStroke",ac:!1,Ib:!1,zIndex:0},Zo={name:"risingHatchFill",Qb:"path",Yb:"risingHatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},Qo={name:"falling",Qb:"path",Yb:"fallingFill",Zb:"fallingStroke",ac:!1,Ib:!1,zIndex:0},tr={name:"fallingHatchFill",Qb:"path",Yb:"fallingHatchFill",Zb:null,ac:!1,Ib:!0,zIndex:1e-6},er={name:"highFill",Qb:"path",Yb:"highFill",Zb:null,ac:!1,Ib:!1,zIndex:0},ir={name:"lowFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!1,Ib:!1,zIndex:0},nr={name:"highFill",Qb:"path",Yb:"highFill",Zb:null,ac:!1,Ib:!1,zIndex:0},sr={name:"lowFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!1,Ik:!0,Ib:!1,zIndex:0},ar={name:"highHatchFill",Qb:"path",Yb:"highHatchFill",Zb:null,ac:!1,Ib:!1,zIndex:0},or={name:"lowHatchFill",Qb:"path",Yb:"lowFill",Zb:null,ac:!1,Ib:!1,zIndex:0},rr={name:"highHatchFill",Qb:"path",Yb:"highHatchFill",Zb:null,ac:!1,Ib:!1,zIndex:0},lr={name:"lowHatchFill",Qb:"path",Yb:"lowHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!1,zIndex:0},hr={name:"highStroke",Qb:"path",Yb:null,Zb:"highStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},cr={name:"lowStroke",Qb:"path",Yb:null,Zb:"lowStroke",ac:!1,Ib:!1,zIndex:2e-6},ur={name:"path",Qb:"path",Yb:"fill",Zb:"stroke",ac:!1,Ib:!1,zIndex:0},dr={name:"fill",Qb:"path",Yb:"fill",Zb:null,ac:!1,Ik:!0,Ib:!1,zIndex:0},pr={name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},gr={name:"hatchFill",Qb:"path",Yb:"hatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},fr={name:"negativeHatchFill",Qb:"path",Yb:"negativeHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},mr={name:"negative",Qb:"path",Yb:"negativeFill",Zb:"negativeStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},vr={name:"rising",Qb:"path",Yb:"risingFill",Zb:"risingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},br={name:"rising",Qb:"path",Yb:null,Zb:"risingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},yr={name:"negative",Qb:"path",Yb:null,Zb:"negativeStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},Sr={name:"risingHatchFill",Qb:"path",Yb:"risingHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},xr={name:"falling",Qb:"path",Yb:"fallingFill",Zb:"fallingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},wr={name:"falling",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},Cr={name:"fallingHatchFill",Qb:"path",Yb:"fallingHatchFill",Zb:null,ac:!1,Ik:!0,Ib:!0,zIndex:1e-6},Tr={name:"highStroke",Qb:"path",Yb:null,Zb:"highStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},Dr={name:"lowStroke",Qb:"path",Yb:null,Zb:"lowStroke",ac:!1,Ik:!0,Ib:!1,zIndex:2e-6},kr={name:"path",Qb:"path",Yb:"fill",Zb:"stroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},$r={name:"overlay",Qb:"path",Yb:!0,Zb:!0,ac:!1,Ib:!1,zIndex:2e-6};t.g=r.prototype,t.g.daa=function(e){this.f.setTime(Date.UTC(t.Oo(this.f.getUTCFullYear(),this.b,e?e.getUTCFullYear():2e3)-this.b,0))},t.g.aaa=function(t){var e=this.b;this.b*=6,this.YQ(t),this.b=e},t.g.Z$=function(t){var e=this.b;this.b*=3,this.YQ(t),this.b=e},t.g.YQ=function(e){var i=t.Oo(this.f.getUTCMonth()+12*this.f.getUTCFullYear(),this.b,e?e.getUTCMonth()+12*e.getUTCFullYear():24e3)-this.b;e=Math.floor(i/12),0>(i%=12)&&(i+=12),this.f.setTime(Date.UTC(e,i))},t.g.baa=function(e){e=t.Oo(h(this.f),this.b,e?h(e):72e3)-this.b;var i=Math.floor(e/36);e%=36;var n=Math.floor(e/3);0>n&&(n+=12),0>(e%=3)&&(e+=3),this.f.setTime(Date.UTC(i,n,1+10*e))},t.g.caa=function(t){l(this,6048e5*this.b,t||new Date(Date.UTC(2e3,0,2)))},t.g.V$=function(t){l(this,864e5*this.b,t)},t.g.W$=function(t){l(this,36e5*this.b,t)},t.g.Y$=function(t){l(this,6e4*this.b,t)},t.g.$$=function(t){l(this,1e3*this.b,t)},t.g.X$=function(t){l(this,this.b,t)},t.g.via=function(){return this.f.setUTCFullYear(this.f.getUTCFullYear()+this.b),this.f.getTime()},t.g.sia=function(){var t=this.f.getUTCMonth()+6*this.b,e=this.f.getUTCFullYear()+Math.floor(t/12);return 0>(t%=12)&&(t+=12),this.f.setUTCFullYear(e),this.f.setUTCMonth(t),this.f.getTime()},t.g.qia=function(){var t=this.f.getUTCMonth()+3*this.b,e=this.f.getUTCFullYear()+Math.floor(t/12);return 0>(t%=12)&&(t+=12),this.f.setUTCFullYear(e),this.f.setUTCMonth(t),this.f.getTime()},t.g.pia=function(){var t=this.f.getUTCMonth()+this.b,e=this.f.getUTCFullYear()+Math.floor(t/12);return 0>(t%=12)&&(t+=12),this.f.setUTCFullYear(e),this.f.setUTCMonth(t),this.f.getTime()},t.g.tia=function(){var t=this.f.getUTCDate(),e=3*(12*this.f.getUTCFullYear()+this.f.getUTCMonth())+(10>=t?0:20>=t?1:2)+this.b;t=Math.floor(e/36),e%=36;var i=Math.floor(e/3);return 0>i&&(i+=12),0>(e%=3)&&(e+=3),this.f.setTime(Date.UTC(t,i,1+10*e)),this.f.getTime()},t.g.uia=function(){var t=this.f.getTime()+6048e5*this.b;return this.f.setTime(t),t},t.g.jia=function(){var t=this.f.getTime()+864e5*this.b;return this.f.setTime(t),t},t.g.lia=function(){var t=this.f.getTime()+36e5*this.b;return this.f.setTime(t),t},t.g.oia=function(){var t=this.f.getTime()+6e4*this.b;return this.f.setTime(t),t},t.g.ria=function(){var t=this.f.getTime()+1e3*this.b;return this.f.setTime(t),t},t.g.nia=function(){var t=this.f.getTime()+this.b;return this.f.setTime(t),t},t.g.sj=function(){return this.o},t.H(u,t.V),t.g=u.prototype,t.g.ra=2,t.g.enabled=function(e){return t.p(e)?(e=!!e,this.o!=e&&(this.o=e,this.va(2)),this):this.o},t.g.D1=function(e){return t.p(e)?(e=!!e,this.D!=e&&(this.D=e,this.va(2)),this):this.D},t.g.CR=function(e){if(t.p(e)){if(this.b.length=0,t.A(e)){for(var i={},n=0;n<e.length;n++){var s=e[n];if(t.z(s))var a=s,o=1;else t.C(s)&&(a=String(s.unit),o=t.P(s.count,1,!1));if(a){var l=(s=new r(a,o)).D+s.b.toFixed(0);l in i||(i[l]=!0,this.b.push(s))}}t.Pa(this.b,c)}return this.va(2),this}return d(this)},t.g.U3=function(e){return t.p(e)?(e=Math.max(2,t.N(e)),(0,window.isNaN)(e)||this.f==e||(this.f=e,this.i=window.NaN,this.va(2)),this):this.f},t.g.Z3=function(e){return t.p(e)?(e=Math.max(.1,t.N(e)),(0,window.isNaN)(e)||this.i==e||(this.i=e,this.f=window.NaN,this.va(2)),this):this.i},t.g.Cn=function(){return this.G},t.g.OD=function(){return this.K},t.g.R=function(){u.u.R.call(this)},t.g.F=function(){var t=u.u.F.call(this);return t.enabled=this.o,t.forced=this.D,t.levels=d(this),t.maxVisiblePoints=(0,window.isNaN)(this.f)?null:this.f,t.minPixPerPoint=(0,window.isNaN)(this.i)?null:this.i,t},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:t.A(e)?{enabled:!0,levels:e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(this.enabled(i.enabled),"levels"in i&&this.CR(i.levels),!0)},t.g.U=function(t,e){u.u.U.call(this,t,e),this.enabled(t.enabled),this.D1(t.forced),this.CR(t.levels),this.U3(t.maxVisiblePoints),this.Z3(t.minPixPerPoint)};var Or=u.prototype;Or.enabled=Or.enabled,Or.forced=Or.D1,Or.levels=Or.CR,Or.maxVisiblePoints=Or.U3,Or.minPixPerPoint=Or.Z3,Or.getCurrentDataInterval=Or.Cn,Or.isGrouped=Or.OD,g.prototype.f=null;var Pr=0;g.prototype.vj=function(e){var i;return t.ea(e)&&0>e?this.f&&(i=this.f[~e]):i=this.values[e],i},t.g=b.prototype,t.g.reset=function(){return this.i&&this.i.reset(),this.b=this.K,this.o=this.i?this.i.i():this.K.key,this.G=!1,this.D=window.NaN,this.P=!0,this},t.g.advance=function(){return this.ba()},t.g.current=function(){return this.b},t.g.Iu=function(e,i){if(t.p(e))if(this.i)for(this.reset();this.advance()&&e!=this.current(););else this.b=e,this.G=!0,t.p(i)&&(this.o=i)},t.g.get=function(t){return this.lr(this.ea?wt(this.Zc,t):Ct(this.Zc,t))},t.g.j=function(t,e){var i=this.Ci[this.ma()];return i||(i=this.Ci[this.ma()]={}),1<arguments.length?(i[t]=e,this):i[t]},t.g.lr=function(e){var i;return this.G&&(t.ea(e)&&0>e?this.b.f&&(i=this.b.f[~e]):i=this.b.values[e]),i},t.g.Gh=function(){return this.D},t.g.ma=function(){return this.Ba()},t.g.Hb=function(){return this.na},t.g.Vba=function(){return this.D},t.g.Gfa=function(){return this.o},t.g.zfa=function(){return this.i.i()},t.g.S$=function(){if(this.b){if(this.o++,(this.b=this.b.next)&&this.b!=this.aa)return this.G=!0,this.D=this.b.key,!0;this.b=null,this.G=!1,this.o=this.D=window.NaN}return!1},t.g.Nda=function(){return this.i.advance()?(this.P&&(this.b=this.b.next),(this.P=!(!this.b||this.b.key!=this.i.f||this.b==this.aa))?(this.G=!0,this.D=this.b.key):(this.G=!1,this.D=this.i.f),!0):(this.b=null,this.D=window.NaN,this.G=!1)};var Lr=b.prototype;Lr.reset=Lr.reset,Lr.advance=Lr.advance,Lr.get=Lr.get,Lr.getKey=Lr.Vba,Lr.getIndex=Lr.ma,Lr.meta=Lr.j,t.g=y.prototype,t.g.zi=function(t){var e=this.b.length;if(2<=e&&!(0,window.isNaN)(t)){for(var i=0;i<this.D.length;i++){var n=this.D[(this.o-i-1+2)%2];if(n.index==t)return n.key}i=Math.floor(t),0>=(n=Math.ceil(t))?n=1+(i=0):i>=e-1&&(i=(n=e-1)-1),i==n?e=this.b[i].key:(e=this.b[i].key,n=this.b[i+1].key,e=Math.round((n-e)*(t-i)+e)),this.D[this.o]={key:e,index:t},this.o=(this.o+1)%2}else 1==e?(e=this.b[0].key,e=Math.round(t+e)):e=window.NaN;return e},t.g.Uf=function(e){var i=this.b.length;if(2<=i&&!(0,window.isNaN)(e)){for(var n=0;n<this.D.length;n++){var s=this.D[(this.o-n-1+2)%2];if(s.key==e)return s.index}0>(n=t.Oa(this.b,m,e))?(0>(n=~n-1)?n=0:n>=i-1&&(n=i-2),i=(e-(i=this.b[n].key))/(this.b[n+1].key-i)+n):i=n,this.D[this.o]={key:e,index:i},this.o=(this.o+1)%2}else i=1==i?e-(i=this.b[0].key):window.NaN;return i},t.g.$=function(t,e){return x(this,this.Uf(t),this.Uf(e))},t.g.yr=function(){return this.i},t.g.update=function(){if(this.i){if(this.o=this.D.length=0,this.G=this.K.length=0,this.f.length)if(1==this.f.length)this.b=this.f[0].b;else{var t,e={key:window.NaN,next:null},i=[],n=this.f[0].b,s=n.length?n[0]:null,a=(n=this.f[1].b).length?n[0]:null;for(n=e;s&&a;){var o=s.key<=a.key,r=s.key>=a.key;t={key:o?s.key:a.key,next:null},i.push(t),n=n.next=t,o&&(s=s.next),r&&(a=a.next)}for(s=s||a;s;)t={key:s.key,next:null},i.push(t),n=n.next=t,s=s.next;for(s=2;s<this.f.length;s++){for(a=(n=this.f[s].b).length?n[0]:null,i=i.length?i[0]:null,n=e,o=[];i&&a;)r=i.key>=a.key,i.key<=a.key?(t=i,i=i.next):t={key:a.key,next:null},o.push(t),n=n.next=t,r&&(a=a.next);for(n.next=i;i;)o.push(i),i=i.next;for(;a;)t={key:a.key,next:null},o.push(t),n=n.next=t,a=a.next;i=o}this.b=i}else this.b=[];for(this.i=!1,this.P=!0,s=0;s<this.f.length;s++)if(this.f[s].Hb()!=this.b.length){this.P=!1;break}}},D.prototype.reset=function(){this.b=this.D,this.f=window.NaN,this.o=this.D.key},D.prototype.advance=function(){if(this.b){if(this.o++,(this.b=this.b.next)&&this.b!=this.K)return this.f=this.b.key,!0;this.b=null,this.o=this.f=window.NaN}return!1},D.prototype.i=function(){return this.o},D.prototype.Hb=function(){return this.G},t.g=k.prototype,t.g.search=function(e,i){return O(this,ut(this.f,t.Xk(e),t.zk(Vo,i,"exact")))},t.g.select=function(e,i,n,s){return P(this,t.Xk(e),t.Xk(i),t.p(n)?new r(n,t.N(s)):void 0)},t.g.Xba=function(e,i){var n=t.p(e)?new r(e,t.N(i)):void 0,s=_t(this.Zc.Rd(),n);return this.f=s,this.i=!n,this.b=ct(s),$(this),this},t.g.$=function(){return F(this,!0)},t.g.pr=function(){return this.Zc},t.g=M.prototype,t.g.get=function(t){return this.lr(this.b?wt(this.Zc,t):Ct(this.Zc,t))},t.g.lr=function(t){return this.Af.vj(t)},t.g.ma=function(){return this.Ad},t.g.Gh=function(){return this.Af.key},t.g.j=function(t,e){return 1<arguments.length?(this.Ci&&(this.Ci[t]=e),this):this.Ci?this.Ci[t]:void 0},t.g.Wba=function(){return this.Af.key};var Ir=k.prototype;Ir.search=Ir.search,Ir.select=Ir.select,Ir.selectAll=Ir.Xba,Ir.getIterator=Ir.$,(Ir=M.prototype).meta=Ir.j,Ir.get=Ir.get,Ir.getKey=Ir.Wba,Ir.getColumn=Ir.lr,Ir.getIndex=Ir.ma,t.H(_,t.V),t.g=_.prototype,t.g.sa=16384,t.g.ra=16,t.g.select=function(t,e,i){return(0,window.isNaN)(t)&&(t=this.b.ki),(0,window.isNaN)(e)&&(e=this.b.Wi),!(0,window.isNaN)(t)&&!(0,window.isNaN)(e)&&(q(this),(t=B(this,t,e,this.Wm(),this.na,this.i,this.b,!1))&&(this.i=t[0],this.b=t[1],this.Ka=i.transform(this.b.ki),this.Ha=i.transform(this.b.Wi)),!!t)},t.g.Wm=function(e){return this.G||(this.G=new u,this.G.Ga("stock.grouping"),this.G.U(this.G.oa,!0),t.K(this.G,this.B2,this)),t.p(e)?(this.G.N(e),this):this.G},t.g.B2=function(){this.va(16)},t.g.t6=function(e){if(t.X(e,16)){for(var i in this.f.i=!0,this.P)this.P[i].i=!0;for(i in this.na)this.na[i].D=!0;this.B(16384,16)}},t.g.R=function(){t.sd(this.G,this.K),this.K=this.G=null,_.u.R.call(this)},t.g.zi=function(t){return q(this),this.i.zi(t)},t.g.Uf=function(t){return q(this),this.i.Uf(t)},t.g.EM=function(){return this.b.FI},t.H(Q,t.hx);var Ar={};t.sq(Ar,[[0,"allowPlotDrag",t.Dq],[0,"scrollOnMouseWheel",t.Dq]]),t.U(Q,Ar),Q.prototype.F=function(){var e=Q.u.F.call(this);return t.Tq(this,Ar,e),e},Q.prototype.U=function(e,i){Q.u.U.call(this,e,i),t.Iq(this,Ar,e)},t.H(tt,t.Y);var Er=tt.prototype,Gr={};t.sq(Gr,[[0,"height",t.Bq],[0,"showHelperLabel",t.Dq],[0,"overlapMode",function(e,i){return t.zk(Bo,e,i||"no-overlap")}]]),Er.zR=Gr,t.U(tt,tt.prototype.zR),t.g=tt.prototype,t.g.sa=80|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.W(this,"background",this.Ia),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(64,1)},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.de=function(e){var i=0,n=0;t.X(e,1)&&(i=16,n=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Xa=function(e){return this.mb||(this.mb=new t.Qy,this.mb.orientation("top"),this.mb.Ie(!0,!1),this.mb.kb(this),t.W(this,"ticks",this.mb),t.K(this.mb,this.y_,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.yb=function(e){return this.Rc||(this.Rc=new t.Qy,this.Rc.orientation("top"),this.Rc.Ie(!0,!1),this.Rc.kb(this),t.W(this,"minorTicks",this.Rc),t.K(this.Rc,this.y_,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.y_=function(){this.B(16,1)},t.g.scale=function(e){return t.p(e)?(this.qa!=e&&(this.qa&&t.kr(this.qa,this.ii,this),(this.qa=e)&&t.K(this.qa,this.ii,this),this.B(16,1)),this):this.qa},t.g.ii=function(e){t.X(e,512)&&this.B(16,1)},t.g.orientation=function(e){return t.p(e)?this:"bottom"},t.g.ob=function(){var e=this.ja();return e?(this.enabled()&&(e.top=e.top+e.height-this.g("height")+1),e):new t.I(0,0,0,0)},t.g.yd=function(){var e=this.ja();return e?(this.enabled()&&(e.height-=this.g("height")),e):new t.I(0,0,0,0)},t.g.Kt=function(e,i){var n,s=this.qa.Aha,a=this.qa.zha,o=this.qa.Yha,r=this.qa.Xha,l=null,h=[],c=null,u=[],d=[],p=[],g=[],f=[],m=[],v=[],b=this.mb&&this.mb.enabled()?t.Ry(this.mb):null,y=this.Rc&&this.Rc.enabled()?t.Ry(this.Rc):null,S=!(!this.Da||!this.Da.enabled()),x=!(!this.rc||!this.rc.enabled()),w=1,C=0;for(i.reset();i.advance();){var T=i.current;if((n=S&&i.o)&&b?b.call(this.mb,this.qa.NP(T),e,e,0,.5):y&&y.call(this.Rc,this.qa.NP(T),e,e,0,.5),"allow-overlap"==this.g("overlapMode"))n?(g.push(T),m.push(w),l||(l=this.rd(T,n,e,s,o,r,0))):x&&(f.push(T),v.push(C),h.push(this.rd(T,n,e,s,o,r,0)));else{var D=this.rd(T,n,e,s,o,r,n?w:C);if(n){if("allow-major-overlap"==this.g("overlapMode")||!c||!c.so(D)){for(c=d.length;c--&&D.so(d[c]);)u.pop(),d.pop(),p.pop();g.push(T),m.push(w),f.push.apply(f,u),v.push.apply(v,p),h.push.apply(h,d),c=D,l||(l=D)}u.length=d.length=p.length=0}else!x||c&&c.so(D)||"allow-minor-overlap"!=this.g("overlapMode")&&d.length&&d[d.length-1].so(D)||(u.push(T),p.push(C),d.push(D))}n?w++:C++}if(u.length&&(f.push.apply(f,u),v.push.apply(v,p),h.push.apply(h,d)),t.Yu(this.labels()),t.Yu(this.qb()),T=i.f,this.g("showHelperLabel")&&!(0,window.isNaN)(T)&&(D=this.rd(T,!0,e,s,o,r,0))&&(!l||!D.so(l))){if("allow-overlap"!=this.g("overlapMode")){for(c=0;c<h.length&&D.so(h[c]);c++);c&&(t.Ca(h,0,c),t.Ca(f,0,c),t.Ca(v,0,c))}this.ke(T,!0,e,s,a,o,r,0)}for(c=0;c<g.length;c++)this.ke(g[c],!0,e,s,a,o,r,m[c]);for(c=0;c<f.length;c++)this.ke(f[c],!1,e,s,a,o,r,v[c])},t.g.ke=function(e,i,n,s,a,o,r,l){i=i?this.labels():this.qb();var h=this.qa.Uf(e);"stock-ordinal-date-time"==this.qa.Ma()&&(h=Math.ceil(h)),a=this.qa.zi(h),h=this.qa.Kr(a,h),h=Math.round(n.left+h*n.width);var c=n.top;e=this.Am(e,a,s,o,r),s={value:{x:h,y:c}},o=i.measure(e,s,void 0,l),(0,window.isNaN)(o.left)||(0<(n=n.left-o.left)&&(s.value.x+=n),l=i.add(e,s,l),t.bv(l,[l.Pa,i.Pa,l.Nd,i.oa]),t.J(this.b,oo)||(n=i.g("position"),n=t.Ho(n),l.qk(0>n?"center-bottom":0<n?"center-top":"center")))},t.g.rd=function(t,e,i,n,s,a,o){if(!(e=e?this.labels():this.qb()).enabled())return null;var r=this.qa.Uf(t);"stock-ordinal-date-time"==this.qa.Ma()&&(r=Math.ceil(r));var l=this.qa.zi(r);r=this.qa.Kr(l,r),r=Math.round(i.left+r*i.width);var h=i.top;return t=this.Am(t,l,n,s,a),(o=e.measure(t,{value:{x:r,y:h}},void 0,o)).left=Math.max(o.left,i.left),o},t.g.Am=function(e,i,n,s,a){var o=t.vs(e),r=this.b.Wm();return e={dataIntervalUnit:{value:r.Cn().unit,type:"string"},dataIntervalUnitCount:{value:r.Cn().count,type:"number"},dataIsGrouped:{value:r.OD(),type:"string"},majorIntervalUnit:{value:n,type:"string"},majorIntervalUnitCount:{value:a,type:"number"},minorIntervalUnit:{value:s,type:"string"},minorIntervalUnitCount:{value:a,type:"number"},value:{value:o,type:"string"},tickValue:{value:e,type:"number"},dataValue:{value:i,type:"number"},max:{value:this.qa.iU(),type:"number"},min:{value:this.qa.jU(),type:"number"},scale:{value:this.qa,type:""}},(e=new t.Fw(e)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(e)},t.g.remove=function(){this.Oa&&this.Oa.remove()},t.g.W=function(){if(!this.zc())return this;this.Oa||(this.Oa=t.ok(),this.f||this.Oa.Dd(!0));var e=t.wr(this,"background"),i=t.wr(this,"labels"),n=t.wr(this,"minorLabels"),s=t.wr(this,"ticks"),a=t.wr(this,"minorTicks");if(e&&e.ka(),i&&i.ka(),n&&n.ka(),this.J(4)){if(e){var o=this.ja().clone().round();o.top=o.top+o.height-this.g("height"),o.height=this.g("height"),o.width=Math.ceil(t.R(o.cb(),1))-o.left,e.ja(o)}this.B(80),this.I(4)}return this.J(64)&&(e&&(e.O(this.Oa),e.W()),this.I(64)),this.J(16)&&(this.qa&&(e?o=e.yd():((o=this.ja()).top=o.top+o.height-this.g("height"),o.height=this.g("height")),i&&(i.clear(),t.Yu(i)),n&&(n.clear(),t.Yu(n)),s&&(s.O(this.Oa),s.W()),a&&(a.O(this.Oa),a.W()),s=i&&i.enabled(),a=n&&n.enabled(),(s||a)&&this.Kt(o,this.qa.Fn()),this.ti||(this.ti=t.tk()),this.ti.shape(o),i&&(i.O(this.Oa),i.W(),(o=i.sl())&&o.clip("outside"==i.g("position")?this.ti:null)),n&&(n.O(this.Oa),n.W(),(o=n.sl())&&o.clip("outside"==n.g("position")?this.ti:null))),this.I(16)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),e&&e.da(!1),i&&i.da(!1),n&&n.da(!1),this},t.g.Nb=function(){return!0},t.g.Iy=function(){return!0},t.g.R=function(){t.sd(this.Da,this.rc,this.mb,this.Rc,this.Ia,this.Oa,this.qa),this.qa=this.Oa=this.Ia=this.Rc=this.mb=this.rc=this.Da=null,tt.u.R.call(this)},t.g.F=function(){var e=tt.u.F.call(this);return t.Tq(this,this.zR,e),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e.background=this.background().F(),e},t.g.U=function(e,i){tt.u.U.call(this,e,i),t.Iq(this,this.zR,e,i),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Xa(e.ticks),this.yb(e.minorTicks),this.background(e.background)};var Ur=tt.prototype;Ur.labels=Ur.labels,Ur.minorLabels=Ur.qb,Ur.ticks=Ur.Xa,Ur.minorTicks=Ur.yb,Ur.background=Ur.background,t.H(et,t.Y),et.prototype.sa=208|t.Y.prototype.sa,et.prototype.ra=t.Y.prototype.ra;var Fr=et.prototype,Mr={};t.rq(Mr,0,"value",t.Yk),t.rq(Mr,0,"valueField",t.Cq),t.rq(Mr,1,"stroke",t.Pq),t.rq(Mr,1,"risingStroke",t.Pq),t.rq(Mr,1,"fallingStroke",t.Pq),Fr.LK=Mr,t.U(et,et.prototype.LK),t.g=et.prototype,t.g.bI=function(t){return"left-top"==(t=t.g("anchor"))||"left-center"==t||"left-bottom"==t},t.g.nq=function(e,i,n){if(!i)return null;var s=i.scale(),a=s.Ma();n=s.Mc(n);var o="number";switch(a){case"linear":case"log":var r=n;break;case"ordinal":r=String(n),o="string";break;case"stock-scatter-date-time":case"stock-ordinal-date-time":case"date-time":r=t.vs(n),o="string"}return i={series:{value:e,type:""},axis:{value:i,type:""},value:{value:r,type:o},tickValue:{value:n,type:"number"},scale:{value:s,type:""}},e=t.vB(e,new t.Fw,this.f),t.ov(e,t.Sc(t.nv(e),i))},t.g.label=function(e){return t.p(e)?(this.o.N(e),this):this.o},t.g.cfa=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.fka=function(e){return t.p(e)?(this.G.N(e),this):this.G},t.g.AR=function(){this.B(68,1)},t.g.X=function(e){if(t.p(e)){var i=e;return t.ea(e)?e=this.K.Ai(e):t.z(e)&&(e=this.K.ef(e)),this.Sa!==e&&(this.ba=i,this.Sa=e,this.B(134,1)),this}return this.Sa},t.g.axis=function(e){if(t.p(e)){var i=+e;return t.ea(e)&&(e=this.K.ij(e)),this.b!==e&&(this.aa=i,this.b=e,this.B(4,1)),this}return this.b},t.g.remove=function(){this.Aa.parent(null),this.B(2)},t.g.W=function(){if(!this.zc())return this;this.Aa||(this.Aa=t.ok());var e=this.Sa||this.K.Ai(0);if(e&&!e.md)var i=this.g("valueField")||e.bf.El,n=!!(e.bf.flags&t.UG),s=(this.f=G(e.la,this.g("value"),i))?this.f.get(i):null;if(this.I(128),!s)return this.remove(),this;i=this.line?this.line:this.line=t.qk().zIndex(0).parent(this.Aa);var a=this.g("stroke"),o=this.b||this.K.ij(0);s=o.scale().transform(s);var r=this.K.dg();if(n){var l=this.g("risingStroke"),h=this.g("fallingStroke"),c=this.f.get("open");this.f.get("close")>c?(a=l||a,l=this.G):(a=h||a,l=this.D)}if(h=t.$b(a)||1,this.J(2)&&(c=this.O(),this.Aa.parent(c),this.I(2)),this.J(8)&&(c=this.zIndex(),this.Aa.zIndex(c),this.I(8)),this.J(4)){if(c=r.Va()-s*r.height,c=t.R(c,h),i.clear(),i.moveTo(r.left,c).lineTo(r.cb(),c),i.clip(this.K.dg()),i.parent(this.Aa),this.i.ic("enabled")){r=c,h=this.K.dg();var u=o.ob(),d=o.enabled();switch(c=d?u.tb():h.cb(),u=d?u.cb():h.tb(),o.g("orientation")){case"left":var p=(this.bI(this.i),u);break;case"right":this.bI(this.i),p=c}r>=h.Vb()&&r<=h.Va()||(p=r=window.NaN),r={value:{x:p,y:r}},(0,window.isNaN)(r.value.x)?(this.P=!0,this.i.clear()):((this.P||n)&&(this.B(64),this.P=!1),p=this.nq(e,o,s),this.i.Hf(p),t.Yu(this.o),this.i.jc(r),this.i.qk("left"==o.g("orientation")?"right-center":"left-center"))}else this.i.clear(),this.P=!0;this.I(4)}return this.J(64)&&(this.i.ic("enabled")?(p=this.nq(e,o,s),this.i.Hf(p),t.Yu(this.o),this.i.qk("left"==o.g("orientation")?"right-center":"left-center"),e=[],n?e.push(l.Pa,this.o.Pa,this.i.Nd,this.o.Nd,l.oa,this.o.oa):e.push(this.o.Pa,this.i.Nd,this.o.Nd,this.o.oa),t.bv(this.i,e)):(this.i.clear(),this.P=!0),this.I(64)),this.J(16)&&(i.stroke(a),this.I(16)),this.P||(this.i.O(this.Aa),this.i.W()),this.o.I(4294967295),this.G.I(4294967295),this.D.I(4294967295),this},t.g.F=function(){var e=et.u.F.call(this);return t.Tq(this,this.LK,e,"Current price indicator"),(t.z(this.ba)||t.ea(this.ba))&&(e.series=this.ba),(0,window.isNaN)(this.aa)||(e.axis=this.aa),e.mainLabel=this.o.F(),e.risingLabel=t.TN(this.G),e.fallingLabel=t.TN(this.D),e},t.g.U=function(e,i){i?t.Hq(this.oa,this.LK,e):t.Iq(this,this.LK,e),this.X(e.series),this.axis(e.axis),it(this,e,i),et.u.U.call(this,e,i)},t.g.R=function(){this.Sa=this.b=this.K=null,this.remove(),this.line&&this.line.ld(),this.o.clear(),t.sd(this.o,this.G,this.D),this.D=this.G=this.o=null,et.u.R.call(this)};var _r=et.prototype;_r.label=_r.label,_r.fallingLabel=_r.cfa,_r.risingLabel=_r.fka,_r.axis=_r.axis,_r.series=_r.X,t.H(nt,t.kz),t.g=nt.prototype,t.g.zg=function(e){t.X(e,2)&&this.B(80,1)},t.g.KG=function(e){var i=this.ja().round()||t.kn(0,0,0,0);e=i.Va()-e*i.height,e=t.R(e,this.Uh().gl()),this.o.moveTo(t.R(i.tb(),1)-.5,e),this.o.lineTo(t.R(i.cb(),1)+.5,e)},t.g.LG=function(e){var i=this.ja().round()||t.kn(0,0,0,0);e=i.tb()+e*i.width,e=t.R(e,this.Uh().gl()),this.o.moveTo(e,t.R(i.Va(),1)-.5),this.o.lineTo(e,t.R(i.Vb(),1)+.5)},t.g.HG=function(e,i,n){if(!(0,window.isNaN)(i)){var s=this.ja().round()||t.kn(0,0,0,0),a=this.Uh().gl();i=s.Va()-i*s.height,i=t.R(i,a),e=s.Va()-e*s.height,e=t.R(e,a),n.moveTo(s.tb(),i),n.lineTo(s.cb(),i),n.lineTo(s.cb(),e),n.lineTo(s.tb(),e),n.close()}},t.g.IG=function(e,i,n){if(!(0,window.isNaN)(i)){var s=this.ja().round()||t.kn(0,0,0,0),a=this.Uh().gl();i=s.tb()+i*s.width,i=t.R(i,a),e=s.tb()+e*s.width,e=t.R(e,a),n.moveTo(i,s.Vb()),n.lineTo(e,s.Vb()),n.lineTo(e,s.Va()),n.lineTo(i,s.Va()),n.close()}},t.g.Lj=function(){var e=this.scale(),i=window.NaN,n=t.J(e,t.Qt),s=t.J(e,Za),a=this.g("isMinor");s?(a=e.Fn().ea(!a),a=t.Ga(window.NaN,a,window.NaN)):a=n?e.Xa().get():a?e.yb().get():e.Xa().get();var o=this.Nb()?[this.KG,this.HG]:[this.LG,this.IG];this.Sz(),this.Uh().clear();var r=(this.ja()||t.kn(0,0,0,0)).clone().round(),l=r.Va(),h=r.cb();l=Math.ceil(t.R(l,1)),h=Math.ceil(t.R(h,1)),r.width=h-r.left,r.height=l-r.top,this.Uh().clip(r),r=o[1],h=o[0];for(var c=1==t.$b(this.g("stroke"))%2,u=0,d=a.length;u<d;u++){var p=a[u];t.A(p)&&(p=p[0]),l=s?u?u==d-1?1:e.NP(p):0:e.transform(p),u&&(o=t.oz(this,u-1))&&r.call(this,l,i,o,c),u?u==d-1?(this.g("drawLastLine")||n)&&h.call(this,l,c):h.call(this,l,c):this.g("drawFirstLine")&&h.call(this,l,c),i=l}n&&t.p(p)&&(l=e.Ne()?0:1,this.g("drawLastLine")&&h.call(this,l,c),(o=t.oz(this,u-1))&&r.call(this,l,i,o,c))};var Nr=nt.prototype;Nr.isHorizontal=Nr.Nb,Nr.scale=Nr.scale,Nr.axis=Nr.axis,t.H(st,t.sD);var Rr={up:{tooltip:"Move plot up",icon:"ac ac-caret-up",fallbackSymbol:"▲",model:{type:"up"}},down:{tooltip:"Move plot down",icon:"ac ac-caret-down",fallbackSymbol:"▼",model:{type:"down"}},zoom:{tooltip:"Expand/Collapse plot",icon:"ac ac-enlarge",fallbackSymbol:"⛶",toggle:!0,model:{type:"zoom"}}},jr={single:[Rr.zoom],top:[Rr.down,Rr.zoom],center:[Rr.up,Rr.down,Rr.zoom],bottom:[Rr.up,Rr.zoom]};t.g=st.prototype,t.g.Ac=function(){st.u.Ac.call(this);var e=this.Ya();t.Qj(e,"anychart-plot-controls")},t.g.update=function(){if(this.xf){this.Gi(!0);var e=this.b.dg();t.uf(this.Ya(),{right:this.b.xc().padding().right()+"px",top:e.top+"px"}),e=jr[this.P];for(var i,n,s=this.b.aI(),a=0;a<e.length;a++)i=e[a],n=new t.LD,t.vD(n,"anychart-button-standard"),t.JD(n,i.tooltip),t.ND(n,i.icon),n.P=i.fallbackSymbol,n.dh=i.model,i.toggle&&(s?t.ND(n,"ac ac-dot-square-o"):t.ND(n,"ac ac-enlarge")),1!=e.length&&(a?a==e.length-1?t.KD(n,2):t.KD(n,3):t.KD(n,1)),this.hc(n,!0)}},t.g.Gg=function(){st.u.Gg.call(this),this.update();var e=t.Dy(this);e.wa(this,"enter",(function(){this.aa=!0})),e.wa(this,"leave",(function(){this.aa=!1,this.Lc()})),e.wa(this,"action",this.Sba)},t.g.Sba=function(e){if(e=e.target,t.J(e,t.LD)){var i=e.dh.type,n=this.b;"up"==i?n.i4():"down"==i?n.h4():"zoom"==i&&(n.L6(),n.aI()?t.ND(e,"ac ac-dot-square-o"):t.ND(e,"ac ac-enlarge")),this.aa=!1}},t.g.show=function(){t.Sj(this.Ya(),"anychart-plot-controls-hidden")},t.g.Lc=function(){this.aa||t.Qj(this.Ya(),"anychart-plot-controls-hidden")},t.g.Rba=function(){this.Sd()},t.g.Sd=function(){var e,i=this.b.xc();(e=(i=i.container()?i.container().getStage():null)&&i.container()?i.container():null)?st.u.Sd.call(this,e):(e=(0,t.pa)(this.Rba,this),this.b.xc().Ce("chartdraw",e,!1,this))},t.g=at.prototype,t.g.Tw=function(){ft(this.pc,this.f),this.f.length=0},t.g.fX=function(t,e){this.f.push(e),this.b++},t.g.start=function(){this.b=this.f.length=0},t.g.Kd=t.ia,t.g.AK=function(){this.f.length&&this.Tw()},t.g=ot.prototype,t.g.update=function(){var e=this.P.kG-1;if(this.i<e)if(this.b.length){for(var i=this.P.Sx,n=t.J(this,dt),s=0;s<i.length;s++)if(this.i<=this.P.lG[s]){var a=i[s];a.o.call(a.b,a.b);for(var o=0,r=this.b[0];r;){for(r.f||(r.f=[]);r.f.length<e;)r.f.push(void 0);a.i.call(a.b,new St(r,a,n,o),a.b),r=r.next,o++}}this.i=e,rt(this)}else this.i=e},t.g.select=function(t,e){var i=this.b.length;if(i){var n=(0,window.isNaN)(t)?0:ut(this,t,"exact-or-next");if((0,window.isNaN)(n)){var s=i-1;n=window.NaN}else{var a=(0,window.isNaN)(e)?i-1:ut(this,e,"exact-or-prev");(0,window.isNaN)(a)?(s=window.NaN,n=0):n<=a?(s=0<n?n-1:window.NaN,n=a<i-1?a+1:window.NaN):s=a}}else s=n=window.NaN;return ht(this,t,e,s,n)},t.g.search=function(t,e){return this.En(ut(this,t,e))},t.g.wO=function(e,i){var n,s=this.fU();if(t.ea(s))for(n=0;n<s;n++)n in e||(e[n]=i++);else for(n in s)n in e||(e[n]=i++);return i},t.g.En=function(t){return 0<=t&&t<this.b.length?this.b[t]:null},t.g.Hb=function(){return this.b.length},t.H(dt,ot);var Br=8;dt.prototype.fU=function(){return this.o},dt.prototype.update=function(){if(0!=this.f){var e=_t(this.P).b,i=this.P.zF;if(this.f>=Br)this.i=-1,this.b.length=0,pt(this,e,i,this.D,!1);else{if(2&this.f){this.i=-1;var n=e.length?e[0]:null;if(n){var s=this.b.length?this.b[0]:null,a=n.key;if(s&&!(s.key>=a)){for(var o,r=0;(o=s.next)&&o.key<a;)r++,s=o;if(o&&o.key==a)r++;else{for(a=n;a&&(!o||a.key<o.key);){for(n=0;n<this.o;n++){var l=i[n];l.b(a.values[l.o],a.values[l.D],a.values)}a=a.next}for(n=0;n<this.o;n++)s.values[n]=i[n].f()}0<r&&(t.Ca(this.b,0,r),this.b.length&&(this.b[0].b=null))}}else this.b.length=0}if(1&this.f&&(this.i=-1,s=this.D,(r=this.b[this.b.length-1])?(this.b.pop(),r.b&&(r.b.next=null),r=r.key):r=void 0,pt(this,e,i,s,!0,r)),4&this.f&&(e=e[0],a=this.b[0],e&&a)){s=this.o,r=i.length-1;do{for(n=a.next;e&&(!n||e.key<n.key);){for(o=s;o<=r;o++)(l=i[o]).b(e.values[l.o],e.values[l.D],e.values);e=e.next}for(a=a.values,o=s;o<=r;o++)a[o]=i[o].f();a=n}while(e)}}this.f=0,this.o=i.length,rt(this)}dt.u.update.call(this)},t.H(gt,ot),t.g=gt.prototype,t.g.kY=function(){this.aa&&t.kl(101),this.aa=!0},t.g.iG=function(){if(this.aa=!1,this.f.length||this.K){var e=mt(this),i=this.f.length,n=this.b.length,s=this.f[e?0:i-1];if(n=!i||!n||0<f(s,this.b[n-1]),i=0,n&&2>this.K){if(n&&(i|=1),this.K){i|=2;var a=0;for(n=(s=new bt(this.b,null,!0)).next();n&&n.i;)a++,n=s.next();t.Ca(this.b,0,a),(n=this.b[0])&&(n.b=null)}vt(this,new bt(null,this.f,e))}else s=new bt(this.b,this.f,e),this.b=[],vt(this,s),i=Br;this.f.length=0,this.o=this.Z4,this.i=-1,this.K=0,rt(this),Nt(this.P,i,!0)}},t.g.Yr=function(e,i,n){var s=!this.aa;if(s&&this.kY(),t.z(e)){var a=new at(this),o=new t.Lm;t.C(n)&&(o.lJ(n.rowsSeparator),o.hG(n.columnsSeparator),o.OH(n.ignoreTrailingSpaces),o.MH(n.ignoreFirstRow)),o.pC(e,a),!0===i&&(i=a.b)}else if(t.A(e)){for(a=n=0;a<e.length;a++)ft(this,e[a])&&n++;!0===i&&(i=n)}return i=t.N(i),(0,window.isNaN)(i)||this.MO(i),s&&this.iG(),this},t.g.remove=function(t,e){for(var i,n=new bt(this.b,this.f,mt(this),t,e);i=n.next();)i.i=!0;return this.K=2,this.aa||this.iG(),this},t.g.MO=function(e){e=t.P(e);for(var i,n=new bt(this.b,this.f,mt(this)),s=window.NaN;(i=n.next())&&0<e;)i.i||(i.key!=s&&e--,i.i=!0,s=i.key);return this.K||(this.K=1),this.aa||this.iG(),this},t.g.fU=function(){return this.D||this.ba},t.g.Z4=function(t){this.f.push(t),this.o=this.X4},t.g.X4=function(t){var e=this.f.length,i=this.f[e-1];i.key<t.key?this.f.push(t):i.key>t.key?(this.o=1==e?this.Y4:this.iX,this.f.push(t)):this.f[e-1]=t},t.g.Y4=function(t){var e=this.f.length,i=this.f[e-1];i.key>t.key?this.f.push(t):i.key<t.key?(this.o=this.iX,this.f.push(t)):i.key==t.key&&(this.f[e-1]=t)},t.g.iX=function(t){this.f.push(t)},t.g=bt.prototype,t.g.dE=function(){return null},t.g.iia=function(){var t=this.f,e=this.o[this.b];return t?e?0>f(t,e)?(this.f=this.f.next,t):(this.b++,e):(this.f=this.f.next,this.i=this.o4,t):e?(this.b++,this.i=this.gia,e):(this.next=this.dE,null)},t.g.kia=function(){var t=this.f,e=this.o[this.b];return t?e?0>f(t,e)?(this.f=this.f.next,t):(this.b--,e):(this.f=this.f.next,this.i=this.o4,t):e?(this.b--,this.i=this.hia,e):(this.next=this.dE,null)},t.g.o4=function(){var t=this.f;return t?(this.f=this.f.next,t):(this.next=this.dE,null)},t.g.gia=function(){var t=this.o[this.b++];return t||(this.next=this.dE,null)},t.g.hia=function(){var t=this.o[this.b--];return t||(this.next=this.dE,null)},t.g.Ida=function(){var t=this.i();return null===t||t.key>this.D?(this.next=this.dE,null):t},t.g.wia=function(){return this.i()},t.H(yt,t.od),t.g=yt.prototype,t.g.ma=function(){return this.Ad},t.g.HE=function(t){this.Ad=t},t.g.Rd=function(){return this.Zc.Rd()},t.g.cd=function(e,i){if(e in this.f)return t.il(202,void 0,[e]),window.NaN;t:{var n=this.Rd();if(this.Rd()!=n)n=window.NaN;else{var s=n.Xw.length,a=s?~n.Xw[0]:~n.kG;if(t.z(i)){if(i in n.Wz){t.il(201,void 0,[i]),n=window.NaN;break t}n.Wz[i]=a}n.lG[this.ma()]=Math.max(n.lG[this.ma()],~a),s?n.Xw.shift():n.kG++,n=a}}return(0,window.isNaN)(n)?window.NaN:this.f[e]=n},t.g.Ke=function(t){return t in this.f?this.f[t]:window.NaN},t.g.Cf=function(t){this.b=t},t.g.Df=function(e){this.o=t.D(e)?e:t.ia},t.g.Bf=function(e){this.i=t.D(e)?e:t.ia},t.g.R=function(){var e,i=this.Rd(),n=this.ma();for(i.Sx.splice(n,1),e=n;e<i.Sx.length;e++)i.Sx[e].HE(e);for(var s in i.lG.splice(n,1),n=[],this.f)n.push(this.f[s]);if(n.length){t.Pa(i.Xw),s=[];var a=Number.POSITIVE_INFINITY;for(e=0;e<n.length;e++){var o=~n[e];for(var r in a=Math.min(a,o),i.Xw.push(o),i.Wz)if(i.Wz[r]==n[e]){s.push(r);break}}for(t.Pa(i.Xw),e=i.Xw.length;e--&&i.Xw[e]==i.kG-1;)i.kG--,i.Xw.pop();for(e=0;e<s.length;e++)delete i.Wz[s[e]];for(var l in a--,i.pc.i=Math.min(i.pc.i,a),i.dv)i.dv[l].i=Math.min(i.dv[l].i,a)}t.C(this.b)&&t.D(this.b.dispose)&&this.b.dispose(),delete this.b,delete this.i,delete this.o,delete this.Zc,delete this.f,yt.u.R.call(this)},t.H(St,M),St.prototype.set=function(t,e){return this.i(this.o.Ke(t),e)},St.prototype.i=function(t,e){var i=!(0,window.isNaN)(t);return i&&(this.Af.f[~t]=e),i};var Hr=yt.prototype;Hr.addOutputField=Hr.cd,Hr.getFieldIndex=Hr.Ke,Hr.setContext=Hr.Cf,Hr.setStartFunction=Hr.Df,Hr.setCalculationFunction=Hr.Bf,Hr.dispose=Hr.ld,(Hr=St.prototype).set=Hr.set,Hr.setColumn=Hr.i,t.H(xt,t.V),xt.prototype.wL=function(){return new k(this)},xt.prototype.Td=function(e,i,n,s){if(t.ea(i))var a=Math.round(t.N(i));else{if(!t.z(i))return this;a=this.gz.Wz[i]||window.NaN,(0,window.isNaN)(a)&&(a=i)}if(t.ea(a)&&0>a)this.fD[e]={g6:a,p5:a};else if(t.z(a)||!(0,window.isNaN)(a)){if((i=t.C(n))&&!t.D(n)&&!("reset"in n&&"considerItem"in n&&"getResult"in n))return this;var o=i?n:function(t){switch(t=String(t).toLowerCase()){case"first":case"open":return"first";case"last":case"close":default:return"last";case"max":case"high":case"maximum":case"highest":return"max";case"min":case"low":case"minimum":case"lowest":return"min";case"average":case"avg":return"average";case"weightedaverage":case"weightedavg":case"wavg":case"weights":case"weighted":return"weighted-average";case"firstvalue":case"firstval":case"openvalue":case"openval":return"first-value";case"lastvalue":case"lastval":case"closevalue":case"closeval":case"fill":case"hoverfill":case"risingfill":case"hoverrisingfill":case"fallingfill":case"hoverfallingfill":case"stroke":case"hoverstroke":case"lowstroke":case"hoverlowstroke":case"highstroke":case"hoverhighstroke":case"risingstroke":case"hoverrisingstroke":case"fallingstroke":case"hoverfallingstroke":case"hatchfill":case"hoverhatchfill":case"risinghatchfill":case"hoverrisinghatchfill":case"fallinghatchfill":case"hoverfallinghatchfill":case"marker":case"hovermarker":return"last-value";case"sum":case"add":return"sum";case"list":case"group":case"array":return"list"}}(t.p(n)?n:e);i=s,"weighted-average"==o&&(t.ea(s)?i=Math.round(s):t.z(s)?(i=this.gz.Wz[s]||window.NaN,(0,window.isNaN)(i)&&(i=s)):i=window.NaN,t.ea(i)&&(0,window.isNaN)(i)&&(o="average")),this.gz.ka(),s=this.gz;var r=i;i=function(e,i,n){if(t.ea(i)&&(i=i.toFixed(0)),t.C(e))return t.oa(e)+"|"+i+"|"+t.qo(n);switch(e){case"average":return"a"+i;case"first":return"f"+i;case"first-value":return"o"+i;case"last-value":return"c"+i;case"list":return"g"+i;case"max":return"x"+i;case"min":return"n"+i;case"sum":return"s"+i;case"weighted-average":return t.ea(n)&&(n=n.toFixed(0)),"w"+i+":"+String(n);default:return"l"+i}}(o,n=a,r),i in s.rS?i=s.rS[i]:(n=function(e,i,n){if(t.D(e))return new $t(i,e,n);if(t.C(e))return new kt(i,e);switch(e){case"average":return new Dt(i);case"first":return new Ot(i);case"first-value":return new Pt(i);case"last-value":return new It(i);case"list":return new At(i);case"max":return new Et(i);case"min":return new Gt(i);case"sum":return new Ut(i);case"weighted-average":return new Ft(i,n);default:return new Lt(i)}}(o,n,r),s.rS[i]=i=s.zF.length,s.zF.push(n),Nt(s,4,!1)),this.fD[e]={g6:a,p5:i},this.gz.da(!0)}return this},xt.prototype.Rd=function(){return this.gz};var zr=xt.prototype;zr.addField=zr.Td,zr.createSelectable=zr.wL,t.H(Tt,t.od),Tt.prototype.clear=function(){this.value=void 0},Tt.prototype.f=function(){var t=this.value;return this.clear(),t},Tt.prototype.R=function(){delete this.value,Tt.u.R.call(this)},t.H(Dt,Tt),Dt.prototype.clear=function(){this.value=this.i=0},Dt.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||(this.value+=e,this.i++)},Dt.prototype.f=function(){var t=this.i?this.value/this.i:window.NaN;return this.clear(),t},t.H(kt,Tt),kt.prototype.clear=function(){this.i.reset()},kt.prototype.b=function(t,e,i){this.i.considerItem(t,i)},kt.prototype.f=function(){var t=this.i.getResult();return this.clear(),t},kt.prototype.R=function(){delete this.i,kt.u.R.call(this)},t.H($t,Tt),$t.prototype.clear=function(){this.value=[],this.rows=[]},$t.prototype.b=function(t,e,i){this.value.push(t),this.rows.push(i)},$t.prototype.f=function(){var t=this.G.call(this.i,this.value,this.rows);return this.clear(),t},$t.prototype.R=function(){delete this.G,delete this.i,$t.u.R.call(this)},t.H(Ot,Tt),Ot.prototype.clear=function(){this.value=window.NaN},Ot.prototype.b=function(e){(0,window.isNaN)(this.value)&&(this.value=t.N(e))},t.H(Pt,Tt),Pt.prototype.b=function(e){t.p(this.value)||(this.value=e)},t.H(Lt,Tt),Lt.prototype.clear=function(){this.value=window.NaN},Lt.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||(this.value=e)},t.H(It,Tt),It.prototype.b=function(e){t.p(e)&&(this.value=e)},t.H(At,Tt),At.prototype.clear=function(){this.value=[]},At.prototype.b=function(e){t.p(e)&&this.value.push(e)},t.H(Et,Tt),Et.prototype.clear=function(){this.value=window.NaN},Et.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||this.value>=e||(this.value=e)},t.H(Gt,Tt),Gt.prototype.clear=function(){this.value=window.NaN},Gt.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||this.value<=e||(this.value=e)},t.H(Ut,Tt),Ut.prototype.clear=function(){this.value=0},Ut.prototype.b=function(e){e=t.N(e),(0,window.isNaN)(e)||(this.value+=e)},t.H(Ft,Tt),Ft.prototype.clear=function(){this.value=this.i=0},Ft.prototype.b=function(e,i){e=t.N(e),i=t.N(i)||0,(0,window.isNaN)(e)||(this.value+=e*i,this.i+=i)},Ft.prototype.f=function(){var t=this.i?this.value/this.i:window.NaN;return this.clear(),t},t.H(Mt,t.V),t.g=Mt.prototype,t.g.ra=16,t.g.kY=function(){this.pc.kY()},t.g.iG=function(){this.pc.iG()},t.g.Yr=function(t,e,i){return this.pc.Yr(t,e,i),this},t.g.remove=function(e,i){return this.pc.remove(t.Xk(e),t.Xk(i)),this},t.g.MO=function(t){return this.pc.MO(t),this},t.g.Yd=function(e){return e=new xt(this,e),t.rd(this,e),e},t.g.Cc=function(e){if(t.J(e,xt)){if(e.Rd()!=this)return t.il(200),null}else e=this.Yd(e);return e=new yt(e,this.Sx.length),this.Sx.push(e),this.lG.push(-1),e},t.g.R=function(){this.ka(),delete this.pc,t.sd(this.zF,this.Sx),this.zF.length=0,this.dv={},this.Sx.length=0,this.da(!1),Mt.u.R.call(this)};var Vr=Mt.prototype;t.E("anychart.data.table",(function(t,e,i,n,s){return new Mt(t,e,i,n,s)})),Vr.addData=Vr.Yr,Vr.remove=Vr.remove,Vr.removeFirst=Vr.MO,Vr.mapAs=Vr.Yd,Vr.createComputer=Vr.Cc,t.H(Rt,t.eB),t.g=Rt.prototype,t.g.my=function(){var e=this.tl();return t.J(e,ao)?this.fa.width/(e.Cw-e.Ps):this.ya.EM()/(e.iU()-e.jU())*this.fa.width},t.g.ce=function(){return null},t.g.k2=function(){},t.g.LM=function(){var t=I(this.la);return t&&this.$().Iu(t.Af),t},t.g.KM=function(){var t=A(this.la);return t&&this.$().Iu(t.Af),t},t.g.gH=function(){return this.ya},t.g.jL=function(){return!1},t.g.data=function(e,i,n){if(t.p(e)){var s=this.gH();if(s.ka(),this.la){var a=this.la;this.la=null,Io(s,a)}return this.D&&(t.qd(this.D),this.D=null),this.aa=e,t.J(e,Mt)||t.J(e,xt)||(a=new Mt,e&&a.Yr(e,!1,n),this.D=e=a),t.J(e,Mt)&&(e=e.Yd(i),i||(e.Td("value",1,"average"),e.Td("size",2,"sum"),e.Td("open",1,"first"),e.Td("high",2,"max"),e.Td("low",3,"min"),e.Td("close",4,"last"),e.Td("volume",5,"sum")),this.D||(this.D=e)),t.J(e,xt)?(this.la=e.wL(),this.g5()):this.aa=null,s.da(!0),this}return this.aa},t.g.g5=function(){N(this.gH().b,this.la,!0)},t.g.cg=function(){return this.la.$()},t.g.z0=function(){return!0},t.g.Ge=function(e,i,n){var s,a=t.lB(this),o=i?this.cg():this.$(),r=o.ma();a.lg(o).Li([this.ce(r),this]),e=e||this.g("color")||"blue";var l=o.Gh();i=o.get("value");var h=t.p(o.get("name"))?o.get("name"):l;return o={x:{value:l,type:"date-time"},value:{value:i,type:"number"},index:{value:r,type:"number"},iterator:{value:o,type:""},autoColor:{value:e,type:""},chart:{value:this.ya,type:""},plot:{value:this.jf,type:""},series:{value:this,type:""},name:{value:h,type:"string"},isIntersection:{value:!!o.j("isIntersection"),type:"string"}},n=t.p(n)&&n,(r=this.kd())&&!n&&(t.p(i)&&(s=r.Qq(i)),o.scaledColor={value:s,type:""},o.colorScale={value:r,type:""}),o.sourceColor={value:s||e,type:""},t.ov(a,o)},t.g.Yi=function(e){var i=t.lB(this),n=(e=e?this.cg():this.$()).ma();i.lg(e).Li([this.ce(n),this]);var s=this.Eh(),a=e.Gh(),o=e.get("value"),r=t.p(e.get("name"))?e.get("name"):a;return t.ov(i,{x:{value:a,type:"date-time"},value:{value:o,type:"number"},index:{value:n,type:"number"},iterator:{value:e,type:""},sourceHatchFill:{value:s,type:""},plot:{value:this.jf,type:""},chart:{value:this.ya,type:""},series:{value:this,type:""},name:{value:r,type:"string"}})},t.g.uX=function(){if(!this.la)return null;for(var e=this.Be(),i=[],n=0;n<e.length;n++){var s=U(this.la,e[n]);if(!t.z(s)&&(0,window.isNaN)(s))return t.kl(201,void 0,[this.kk(),e[n]]),null;i.push(s)}return i},t.g.oH=function(e){var i=this.uX(),n=[];if(i){var s,a=this.bb(),o=i.length;for(s=0;s<o;s++){var r=i[s],l=this.la;l=t.ea(r)&&0>r?e?l.b.Z6[~r]:l.b.fL[~r]:e?l.b.d7[r]:l.b.UN[r],n.push(a.Lz(t.p(l)?l:window.NaN,this.Rx)),l=this.la,r=t.ea(r)&&0>r?e?l.b.Y6[~r]:l.b.eL[~r]:e?l.b.c7[r]:l.b.SN[r],n.push(a.Lz(t.p(r)?r:window.NaN,this.Rx))}}return n},t.g.kE=function(){var e=U(this.la,"label"),i=U(this.la,"minLabel"),n=U(this.la,"maxLabel");return t.z(e)||!(0,window.isNaN)(e)||t.z(i)||!(0,window.isNaN)(i)||t.z(n)||!(0,window.isNaN)(n)},t.g.vO=function(){var e=U(this.la,"marker");return t.z(e)||!(0,window.isNaN)(e)},t.g.gh=function(){return this.EP()&&"none"!=this.bb().jn()},t.g.ro=function(e,i){this.f=this.la.search(e,"exact"),this.K=!0,Ht(this,t.gm),this.G=this.f?this.f:this.la.search(i,"exact"),Ht(this,t.vo)},t.g.fk=function(){return this.Gc},t.g.Zk=function(){this.Gc&t.vo||(this.Gc=t.vo,this.B(2176,1))},t.g.Md=function(){return this.Gc!=t.gm&&(this.Gc=t.gm,this.B(2176,1)),this},t.g.rr=function(){return this.fk()},t.g.Rk=function(){return this.Qu||(this.Qu=new t.Fw),t.vB(this,this.Qu,this.K?this.f:this.P)},t.g.RC=function(e){if(this.qu||(this.qu=new t.Fw),this.qu=t.vB(this,this.qu,this.K?this.f:this.P),e){for(var i=t.nv(this.qu),n=0;n<e.length;n++)t.ra(i,e[n]);t.ov(this.qu)}return this.qu},t.g.ym=function(t,e){var i=this.ya.Wm(),n=Rt.u.ym.call(this,t,e);return n.defaultDecimalDigitsCount={value:this.ba,type:"number"},n.dataIntervalUnit={value:i.Cn().unit,type:"string"},n.dataIntervalUnitCount={value:i.Cn().count,type:"number"},n.isGrouped={value:i.OD(),type:""},n},t.g.p2=function(){return"date-time"},t.g.eH=function(e,i,n,s){if(!e&&this.check(t.UG)){if(e=s.open<s.close,2==i)e=e?"risingStroke":"fallingStroke";else if(3==i){if(this.check(8))return null;e=e?"risingHatchFill":"fallingHatchFill"}else this.check(8)?(e=e?"risingStroke":"fallingStroke",i=2):e=e?"risingFill":"fallingFill";return t.cm(e,i,!1)(this,t.gm,!0)}return Rt.u.eH.call(this,e,i,n,s)},t.g.pD=function(e,i){return"rising-falling"==String(e).toLowerCase()&&this.check(t.UG)?i.open<i.close?"triangle-up":"triangle-down":Rt.u.pD.call(this,e,i)},t.g.e2=function(e){if(this.check(t.UG)){var i=(0,window.isNaN)(e.high)||(0,window.isNaN)(e.low)||(0,window.isNaN)(e.open)||(0,window.isNaN)(e.close);e=": (O: "+zt(this,e.open)+"; H: "+zt(this,e.high)+"; L: "+zt(this,e.low)+"; C: "+zt(this,e.close)+")"}else this.check(t.fm)?(i=(0,window.isNaN)(e.high)||(0,window.isNaN)(e.low),e=": (H: "+zt(this,e.high)+"; L: "+zt(this,e.low)+")"):(i=(0,window.isNaN)(e.value),e=": "+zt(this,e.value));return this.name()+(i?"":e)},t.g.SZ=function(e){var i=this.Ma();return null!==(i=lh[i])?t.p(e)?this:i:(i=!!this.ya.wfa&&this.ya.vt,t.p(e)?(e=!!e,t.p(this.vt)||(this.vt=i),this.vt!=e&&(this.vt=e,e=this.ya.Vv(this.Ma())[1],this.Mz(e,!1),this.B(5664,this.ra)),this):t.p(this.vt)?this.vt:i)},t.g.Mz=function(e,i){var n=t.Qc(e),s=!t.J(this,Ka)&&this.SZ();n.Cb|=s&&1048576,n.Kb=s?2:1,Rt.u.Mz.call(this,n,i)},t.g.F=function(){return Rt.u.F.call(this)},t.g.U=function(t,e){Rt.u.U.call(this,t,e)},t.g.R=function(){if(this.la){var t=this.la;this.la=null,Io(this.gH(),t)}this.P=this.f=null,Rt.u.R.call(this)};var qr=Rt.prototype;qr.data=qr.data,qr.allowPointSettings=qr.SZ,Vt.prototype.getData=function(){return(0,t.Wa)(this.la||[],(function(t){return t.data}))},Vt.prototype.$=function(e,i,n,s){var a,o=(0,window.isNaN)(i)||(0,window.isNaN)(n);if(o)var r=0,l=this.la.length;else r=~t.Na(this.la,{key:i,index:-1},qt),l=~t.Na(this.la,{key:n,index:-window.Infinity},qt);if(this.b&&this.b.FJ==s&&this.b.rfa==r&&this.b.jla==l&&this.b.Hja==e.Hb())var h=this.b.data,c=this.b.vha,u=this.b.rj||0,d=this.b.count||0;else{if(h=[],c=[],d=0,s){u=window.NaN,n=r;var p=window.NaN,g=window.NaN,f=[];for(e.reset();e.advance()&&n<l;){for(var m;n<l&&(m=this.la[n]).key<e.f;)f.push(m),n++;if(f.length)if((0,window.isNaN)(p)&&!o)f.length=0;else{for(h.length||(u=n-f.length),a=0;a<f.length;a++)c.push(h.length);h.push({key:p,index:g,items:f,PG:n-f.length}),d+=f.length,f=[]}p=e.f,g=e.i()}if(!(0,window.isNaN)(p)||o){for(;n<l;)f.push(m),n++;if(f.length){for(h.length||(u=n-f.length),a=0;a<f.length;a++)c.push(h.length);h.push({key:p,index:g,items:f,PG:n-f.length}),d+=f.length}}e=e.Hb()}else{for(u=0,o=[],e.reset();e.advance();)o[e.i()]=e.f;e.reset(),g=m=window.NaN,f=0;var v=window.NaN;i=(0,window.isNaN)(i)?-window.Infinity:i;for(var b,y=(0,window.isNaN)(n)?window.Infinity:n;e.advance();){a=e.f,p=e.i(),(0,window.isNaN)(v)&&(v=p);var S=(o[p]-o[g])/2;for(n=0;n<this.la.length;n++){b=this.la[n].key<=y&&this.la[n].key>=i;var x=g==v&&this.la[n].key<m+S,w=o[p]+(o[p+1]-o[p])/2,C=o[p]-(o[p]-o[p-1])/2;w=(0,window.isNaN)(w)?y:w,C=this.la[n].key<=w&&this.la[n].key>=C,b&&(x||C)&&(h.push({key:this.la[n].key,index:C?p:g,items:[this.la[n]],PG:f}),c.push(f),f++,d++)}m=a,g=p}if(m==a&&g==v||(0,window.isNaN)(a))for(n=0;n<this.la.length;n++)(b=this.la[n].key<=y&&this.la[n].key>=i)&&(h.push({key:this.la[n].key,index:p||f,items:[this.la[n]],PG:f}),c.push(f),f++,d++);e=d}this.b={rfa:r,jla:l,data:h,vha:c,rj:u,count:d,Hja:e,FJ:s}}return new Wt(h,c,u,d)},Vt.prototype.f=function(e,i,n){var s=t.ps(i instanceof Date||!t.C(i)?i:i.date,this.o,(0,window.isNaN)(this.i)?null:new Date(this.i),this.D);return s&&e.push({index:n,key:+s,data:i,j:{}}),e},t.g=Wt.prototype,t.g.select=function(t){var e;if(e=this.G<=t&&t<this.G+this.K){this.o=t,this.b=this.P[t-this.G];var i=this.la[this.b];this.D=i.items.length,this.i=t-i.PG}else this.D=0,this.b=this.la.length,this.i=0,this.o=window.NaN;return e},t.g.Iu=function(t){this.select(t)},t.g.current=function(){return this.la[this.b].items[this.i].data},t.g.reset=function(){return this.o=this.G-1,this.b=-1,this.i=this.D=0,this},t.g.advance=function(){return++this.i>=this.D&&(this.i=0,this.b++,this.D=this.b<this.la.length?this.la[this.b].items.length:0),this.o++,this.i<this.D},t.g.Hb=function(){return this.K},t.g.ma=function(){return this.b<this.la.length?this.o:window.NaN},t.g.Gh=function(){return this.b<this.la.length?this.la[this.b].key:window.NaN},t.g.get=function(e){var i=this.la[this.b].items[this.i].data;return t.C(i)?i[e]:void 0},t.g.lr=function(){},t.g.j=function(e,i){var n=this.la[this.b].items[this.i].j;return t.p(i)?(n[e]=i,this):n[e]},t.H(Xt,t.Y);var Wr={};t.sq(Wr,[t.Z.dZ,t.Z.n8,t.Z.G9,t.Z.t8,t.Z.l$]),t.U(Xt,Wr);var Yr=[["direction",64,1],["position",64,1],["seriesId",64,1],["fieldName",64,1],["stickToLeft",64,1]],Kr=t.uq();Kr.push.apply(Kr,[t.Z.o8,t.Z.jK,t.Z.hK,t.Z.H8,t.Z.cC,t.Z.qF,t.Z.B8]);var Xr=Kr,Jr={};t.sq(Jr,Xr);var Zr,Qr=["connector"];for(Zr in Jr)Qr.push(Zr);t.Gq(Xt,Qr,"normal");var tl={};t.T(tl,[["type",64,1],["width",64,1],["height",64,1],["fill",64,1],["stroke",64,1],["format",64,1],["fontPadding",64,1],["connector",64,1]]),t.Eq(tl,64,64,1,1);var el=tl,il={};t.T(il,[["type",0,0],["width",0,0],["height",0,0],["fill",0,0],["stroke",0,0],["format",0,0],["fontPadding",0,0],["connector",0,0]]),t.Eq(il,0,0,0,0);var nl=il;t.g=Xt.prototype,t.g.sa=80|t.Y.prototype.sa,t.g.ra=1|t.Y.prototype.ra,t.g.PC=function(){this.B(80,1)},t.g.iH=function(t){var e=this.jf.qj();return t?1==t?e.lb():e.selected():e.Qa()},t.g.data=function(e){if(t.p(e)){if(t.C(e)&&!t.A(e)){var i=e.dateTimePattern,n=e.baseDate,s=e.locale;e=e.data}t.A(e)||(e=[]);var a=this.xG;return a.o=i,a.i=t.ma(n)?n.getTime():t.N(n),a.D=s||null,a.b=null,a.la=(0,t.Gg)(e,a.f,[]),a.la.sort(qt),this.B(64,1),this}return this.xG.getData()},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.W=function(){if(!this.zc())return this;if(this.ka(),this.Da.ka(),this.J(4)&&(this.fa=this.ja(),this.Mx=this.$g?this.$g.Ej(this.fa):this.fa,this.B(64),this.I(4)),this.J(16)&&(this.hB.length=0,this.B(64),this.I(16)),this.J(64)&&(this.sd=null,this.jm.uv(),this.Da.clear()),this.J(2)){var e=this.O();t.RA(this.jm,e),this.I(2)}if(this.J(64)){var i={};e=this.jf.qj();var n=this.$();for(n.reset();n.advance();){if(!n.i){i=Kt(n);var s=e.i[i];s||(s=e.i[i]={}),i=s}i[(s=Zt(this,i))[0]]=s[1]}this.I(72)}return this.J(8)&&this.I(8),this.ca.Zf().I(4294967295),this.Da.da(!1),this.da(!1),this},t.g.remove=function(){this.jm.uv(),this.B(64)},t.g.ke=function(e,i,n,s,a,o,r,l,h,c){i=this.bh(e,i,!1,!1);var u=e.ma();e.j("symbol",Qt(i,"format",t.zq).charAt(0)),e=new t.Fw(this.ym(e),e),t.ov(e);var d=a,p=r;return a={},l&&(p=-p),"flag"==n&&(s+=o/2),"pin"==n?(d+=3*p/5,a.height=Math.abs(4*p/5)):d+=p/2,a.value={x:s,y:d},c?((n=this.Da.be(u)).Hf(e),n.jc(a)):n=this.Da.add(e,a,u),n.zIndex(h),h=Qt(i,"fontPadding",t.br),r=a.height||r,o=t.Ga({positionFormatter:t.ep,anchor:"center",rotation:0,width:o-2*t.L(h,o/2),height:r-2*t.L(h,r/2)},i),t.bv(n,o),n.O(this.O()),n.W(),n},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="eventmarkermouseout";break;case"mouseover":n="eventmarkermouseover";break;case"mousemove":n="eventmarkermousemove";break;case"mousedown":n="eventmarkermousedown";break;case"mouseup":n="eventmarkermouseup";break;case"click":case"touchstart":n="eventmarkerclick";break;case"dblclick":n="eventmarkerdblclick";break;default:return null}return"eventMarkerIndex"in e?i=e.eventMarkerIndex:"labelIndex"in e&&(i=e.labelIndex+this.$().G),e.eventMarkerIndex=i=t.N(i),{type:n,target:this,group:this,index:i,originalEvent:e,eventMarker:this.jp(i)}},t.g.eh=function(){return!0},t.g.kt=function(){return!0},t.g.Ge=function(t){t=t||this.g("fill")||"#ccc";var e=this.$();return{index:e.ma(),sourceColor:t,iterator:e,group:this,chart:this.jf.xc(),plot:this.jf}},t.g.Eh=function(){return null},t.g.$=function(){return this.sd||(this.sd=this.cg()),this.sd},t.g.cg=function(e){var i=Qt(this.bh(null,0,!0,!1),"stickToLeft",t.Dq),n=this.jf.xc();return(e=[H(n.b,!1,!1,!0),e?window.NaN:n.b.b.ki,e?window.NaN:n.b.b.Wi]).push(i),this.xG.$.apply(this.xG,e)},t.g.Yi=function(){return null},t.g.bh=function(e,i,n,s,a){n?n=e=null:(n=e.get("normal"),t.p(n)||!s&&!a||((n={})[a=s?"connector":a||""]=e.get(a)),e=i?1==i?e.get("hovered"):e.get("selected"):null),a=2*(i=Math.min(i,t.wo))+s,s&&(t.C(n)&&(n=n.connector),t.C(e)&&(e=e.connector));var o=this.hB[a];if(o)i?(o[0]=e,o[6]=n):o[0]=n;else{var r=this.jf.qj();o=ee(r,t.gm,!0,s);var l=ee(r,t.gm,!1,s),h=s?this.ca.Zf():this.ca;if(i){var c=ee(r,i,!0,s);r=ee(r,i,!1,s),i=i==t.vo?this.za:this.Ea,i=s?i.Zf():i,o=t.Ga([e],i.Pa,r,[n],h.Pa,s?null:this.Pa,l,i.oa,c,h.oa,s?null:this.oa,o)}else o=t.Ga([n],h.Pa,s?null:this.Pa,l,h.oa,s?null:this.oa,o);this.hB[a]=o}return o},t.g.sc=function(t,e,i,n,s,a,o){return e=this.bh(i,e,!!o,s,t),Qt(e,t,n)},t.g.tZ=function(){function t(t,e,i,n,s,a){n/=2,t.moveTo(e,i).lineTo(e-n,i+a,e-n,i+s,e+n,i+s,e+n,i+a).close()}return{circle:function(t,e,i,n,s,a){s/=2,t.Fe(e,i+(a?-s:s),n/2,s,0,360)},rect:function(e,i,n,s,a,o){o&&(a=-a),t(e,i,n,s,a,0)},pin:function(e,i,n,s,a,o){o&&(a=-a),t(e,i,n,s,a,a/4)},flag:function(e,i,n,s,a,o){o&&(a=-a),t(e,i+s/2,n,s,a,0)}}}(),t.g.$T=function(e){var i,n=this.$();return n.select(e)?i=this.ym(n):n=null,e=new t.Fw(i,n),t.ov(e),e},t.g.ym=function(t){var e=this.jf.xc().Wm().Cn();return{date:{value:t.b<t.la.length?t.la[t.b].items[t.i].key:window.NaN,type:"date-time"},groupedDate:{value:t.Gh(),type:"date-time"},group:{value:this,type:""},index:{value:t.ma(),type:"number"},plot:{value:this.jf,type:""},chart:{value:this.jf.xc(),type:""},title:{value:t.get("title")||"",type:"string"},description:{value:t.get("description")||"",type:"string"},symbol:{value:t.j("symbol"),type:"string"},dataIntervalUnit:{value:e.unit,type:"string"},dataIntervalUnitCount:{value:e.count,type:"number"}}},t.g.jp=function(e){var i=this.cg(!0);return i.select(e)?(e=new t.Fw(this.ym(i),i),t.ov(e)):e=null,e},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df().parent(this.jf.qj().Ua()),this.gb.Ri().position("leftTop"),t.Aw(this.gb,this.jf)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e=Xt.u.F.call(this);return t.Tq(this,Wr,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F(),e.data=this.xG.getData(),e},t.g.Ie=function(e,i){return!!t.A(i)&&(this.data(i),!0)},t.g.U=function(e,i){Xt.u.U.call(this,e,i),t.p(e.data)&&this.data(e.data),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.Ua().ga(!!i,e.tooltip),t.Iq(this,Wr,e)},t.g.R=function(){t.sd(this.jm,this.ca,this.za,this.Ea,this.gb,this.Da),this.ca=this.za=this.Ea=this.jm=this.jf=this.gb=this.Da=null,Xt.u.R.call(this)};var sl=Xt.prototype;sl.data=sl.data,sl.tooltip=sl.Ua,sl.getMarker=sl.jp,sl.normal=sl.Qa,sl.hovered=sl.lb,sl.selected=sl.selected,t.H(te,t.Y),t.U(te,Wr),t.Gq(te,Qr,"normal"),t.g=te.prototype,t.g.sa=64|t.Y.prototype.sa,t.g.PC=function(){this.B(64,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.group=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.b[n];return a||((a=new Xt(this.f,n)).kb(this),a.zh=10+.01*this.b.length,this.b[n]=a,t.K(a,this.y4,this),this.B(64,1)),t.p(s)&&a.N(s),a},t.g.data=function(e){var i=this.group().data(e);return t.p(e)?this:i},t.g.W=function(){if(!this.zc())return this;this.Oa||(this.Oa=t.ok(),t.ru(this,this.Oa));var e=this.O();if(this.J(4)){this.fa=this.ja();var i=e.Ja();i=i?i.width():this.fa.width,this.Oa.clip(new t.I(0,this.fa.top,i,this.fa.height)),this.B(64),this.I(4)}if(this.J(64)){for(this.hB.length=0,this.i={},ie(this),i=0;i<this.b.length;i++){var n=this.b[i];n.ka(),n.ja(this.fa),n.O(this.Oa),n.B(64),n.W(),n.da(!1)}this.ca.Zf().I(4294967295),this.I(64)}return this.J(2)&&(this.Oa.parent(e),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this},t.g.y4=function(){this.B(64,1)},t.g.Jt=function(e,i,n,s,a){var o=a?a.clear():this.Qn.length?this.Qn.pop():t.qk();return t.C(s)&&"keys"in s&&!t.C(s.mode)&&((s=t.Sl(s)).mode=this.fa),o.stroke(s),o.fill(null),o.zIndex(0),a||(this.Oa.hc(o),this.o.push(o)),o.moveTo(e,i).lineTo(e,n),o},t.g.Ih=function(e){var i,n=t.so(e.domTarget);t.J(e.target,t.Pu)?(n=e.target.Zi(),t.J(n,Xt)&&(i=n)):t.C(n)&&!t.J(n,te)&&(i=n.group,e.eventMarkerIndex=n.index),i&&!i.md&&i.enabled()&&(e=i.Tg(e))&&i.dispatchEvent(e)},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df().parent(this.f.xc().qj().Ua())),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e=te.u.F.call(this);t.Tq(this,Wr,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F();for(var i=[],n=0;n<this.b.length;n++){var s=this.b[n];i.push(s?s.F():null)}return e.groups=i,e},t.g.U=function(e,i){var n,s;if(te.u.U.call(this,e,i),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),this.Ua().ga(!!i,e.tooltip),t.Iq(this,Wr,e),t.p(n=e.groups)){if(t.sd(this.b),this.b.length=0,ie(this),t.A(n))for(s=0;s<n.length;s++){var a=n[s];null!=a&&this.group(s,a)}}else t.p(s=e.data)&&this.data(s)},t.g.R=function(){t.sd(this.b,this.Oa,this.ca,this.za,this.Ea,this.gb),delete this.b,this.ca=this.za=this.Ea=this.Oa=this.f=this.gb=null,te.u.R.call(this)};var al=te.prototype;al.group=al.group,al.data=al.data,al.tooltip=al.Ua,al.normal=al.Qa,al.hovered=al.lb,al.selected=al.selected,t.H(se,t.od),se.prototype.Xn=function(t,e){t.Td("value",e.Ke("result"))},se.prototype.R=function(){for(var e in this.Sa){var i=this.Sa[e];i.X&&this.D.Ao(i.X.id()),t.qd(i.X),i.ZD=!1,t.qd(i.mapping),i.mapping=null}delete this.Sa,t.qd(this.f),this.f=null,delete this.D,delete this.Zc,delete this.pa,se.u.R.call(this)};var ol=se.prototype;ol.dispose=ol.ld,t.g=he.prototype,t.g.enqueue=function(t){var e=void 0;if(this.pc.length<this.i)this.pc.push(t),this.b++;else{var i=(this.f+this.b)%this.i;this.b<this.i?this.b++:(e=this.pc[i],this.f=(this.f+1)%this.pc.length),this.pc[i]=t}return e},t.g.mea=function(){if(this.b){var t=this.pc[this.f];this.f=(this.f+1)%this.pc.length,this.b--}return t},t.g.get=function(e){return e=(t.$a(+e,this.b)+this.f)%this.pc.length,(0,window.isNaN)(e)?void 0:this.pc[e]},t.g.Jg=function(){return this.b},t.g.clear=function(e){this.f=this.b=this.pc.length=0,this.i=t.P(e,this.i,!1)};var rl=he.prototype;t.E("anychart.math.cycledQueue",ce),t.E("anychart.calculations.cycledQueue",ce),rl.enqueue=rl.enqueue,rl.dequeue=rl.mea,rl.get=rl.get,rl.getLength=rl.Jg,rl.clear=rl.clear,t.E("anychart.math.adl.initContext",ue),t.E("anychart.math.adl.startFunction",de),t.E("anychart.math.adl.calculate",pe),t.E("anychart.math.adl.calculationFunction",ge),t.E("anychart.math.adl.createComputer",fe),t.H(me,se),me.prototype.Cc=function(t){return fe(t)},me.prototype.Gf=function(){return"ADL"},me.prototype.X=function(t){return oe(this,"main",t)};var ll=me.prototype;ll.series=ll.X,t.E("anychart.math.ama.initContext",ve),t.E("anychart.math.ama.startFunction",be),t.E("anychart.math.ama.calculationFunction",ye),t.E("anychart.math.ama.createComputer",Se),t.H(xe,se),t.g=xe.prototype,t.g.Cc=function(t){return Se(t,this.i,this.b,this.o)},t.g.Gf=function(){return"AMA("+this.i+","+this.b+","+this.o+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var hl=xe.prototype;hl.series=hl.X,hl.period=hl.ub,hl.fastPeriod=hl.Nv,hl.slowPeriod=hl.ix,t.E("anychart.math.ema.initContext",we),t.E("anychart.math.ema.startFunction",Ce),t.E("anychart.math.ema.calculate",ke),t.E("anychart.math.ema.calculationFunction",Te),t.E("anychart.math.ema.createComputer",De),t.E("anychart.math.sma.initContext",$e),t.E("anychart.math.sma.startFunction",Oe),t.E("anychart.math.sma.calculate",Ie),t.E("anychart.math.sma.calculationFunction",Pe),t.E("anychart.math.sma.createComputer",Le),t.E("anychart.math.ao.initContext",Ae),t.E("anychart.math.ao.startFunction",Ee),t.E("anychart.math.ao.calculate",Ge),t.E("anychart.math.ao.calculationFunction",Ue),t.E("anychart.math.ao.createComputer",Fe),t.H(Me,se),t.g=Me.prototype,t.g.Cc=function(t){return Fe(t,this.b,this.i,this.o)},t.g.Gf=function(){return"AO("+this.b+", "+this.i+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.al=function(e){return t.p(e)?((e=i(e,this.o))!=this.o&&(this.o=e,le(this)),this):this.o};var cl=Me.prototype;cl.series=cl.X,cl.fastPeriod=cl.Nv,cl.slowPeriod=cl.ix,cl.maType=cl.al,t.E("anychart.math.atr.initContext",_e),t.E("anychart.math.atr.startFunction",Ne),t.E("anychart.math.atr.calculate",Re),t.E("anychart.math.atr.calculationFunction",je),t.E("anychart.math.atr.createComputer",Be),t.H(He,se),He.prototype.Cc=function(t){return Be(t,this.b)},He.prototype.Gf=function(){return"ATR("+this.b+")"},He.prototype.X=function(t){return oe(this,"main",t)},He.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var ul=He.prototype;ul.series=ul.X,ul.period=ul.ub,t.E("anychart.math.aroon.initContext",ze),t.E("anychart.math.aroon.startFunction",Ve),t.E("anychart.math.aroon.calculate",qe),t.E("anychart.math.aroon.calculationFunction",We),t.E("anychart.math.aroon.createComputer",Ye),t.H(Ke,se),t.g=Ke.prototype,t.g.Cc=function(t){return Ye(t,this.b)},t.g.Gf=function(t){switch(t){case"upAroon":return"Aroon up";case"downAroon":return"Aroon down";case"range":return"Aroon"}return""},t.g.Xn=function(t,e,i){switch(i){case"upAroon":t.Td("value",e.Ke("upResult"));break;case"downAroon":t.Td("value",e.Ke("downResult"));break;case"range":t.Td("high",e.Ke("upResult")),t.Td("low",e.Ke("downResult"))}},t.g.ula=function(t){return null===oe(this,"upAroon")&&(ae(this,"upAroon",this.o),re(this)),oe(this,"upAroon",t)},t.g.sea=function(t){return null===oe(this,"downAroon")&&(ae(this,"downAroon",this.i),re(this)),oe(this,"downAroon",t)},t.g.DR=function(t){return oe(this,"range",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var dl=Ke.prototype;dl.period=dl.ub,dl.upSeries=dl.ula,dl.downSeries=dl.sea,dl.rangeSeries=dl.DR,t.E("anychart.math.aroonOscillator.initContext",Xe),t.E("anychart.math.aroonOscillator.startFunction",Je),t.E("anychart.math.aroonOscillator.calculate",Ze),t.E("anychart.math.aroonOscillator.calculationFunction",Qe),t.E("anychart.math.aroonOscillator.createComputer",ti),t.H(ei,se),ei.prototype.Cc=function(t){return ti(t,this.b)},ei.prototype.Gf=function(){return"Aroon Oscillator("+this.b+")"},ei.prototype.X=function(t){return oe(this,"main",t)},ei.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var pl=ei.prototype;pl.period=pl.ub,pl.series=pl.X,t.E("anychart.math.bbands.initContext",ii),t.E("anychart.math.bbands.startFunction",ni),t.E("anychart.math.bbands.calculate",si),t.E("anychart.math.bbands.calculationFunction",ai),t.E("anychart.math.bbands.createComputer",oi),t.H(ri,se),t.g=ri.prototype,t.g.Cc=function(t){return oi(t,this.i,this.b)},t.g.Gf=function(t){switch(t){case"upper":return"BBands U";case"lower":return"BBands L";case"middle":return"BBands M";case"range":return"BBands"}return""},t.g.Xn=function(t,e,i){switch(i){case"upper":t.Td("value",e.Ke("upperResult"));break;case"lower":t.Td("value",e.Ke("lowerResult"));break;case"middle":t.Td("value",e.Ke("middleResult"));break;case"range":t.Td("high",e.Ke("upperResult")),t.Td("low",e.Ke("lowerResult"))}},t.g.cca=function(t){return oe(this,"upper",t)},t.g.$ba=function(t){return oe(this,"lower",t)},t.g.aca=function(t){return oe(this,"middle",t)},t.g.bca=function(t){return oe(this,"range",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.jo=function(e){return t.p(e)?(e=t.P(e,this.b,!1),this.b!=e&&(this.b=e,le(this)),this):this.b};var gl=ri.prototype;gl.period=gl.ub,gl.deviation=gl.jo,gl.upperSeries=gl.cca,gl.lowerSeries=gl.$ba,gl.middleSeries=gl.aca,gl.rangeSeries=gl.bca,t.E("anychart.math.bbandsB.initContext",li),t.E("anychart.math.bbandsB.startFunction",hi),t.E("anychart.math.bbandsB.calculationFunction",ci),t.E("anychart.math.bbandsB.createComputer",ui),t.H(di,se),t.g=di.prototype,t.g.Cc=function(t){return ui(t,this.i,this.b)},t.g.Gf=function(){return"BBands %B("+this.i+","+this.b+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.jo=function(e){return t.p(e)?(e=t.P(e,this.b,!1),this.b!=e&&(this.b=e,le(this)),this):this.b};var fl=di.prototype;fl.period=fl.ub,fl.deviation=fl.jo,fl.series=fl.X,t.E("anychart.math.bbandsWidth.initContext",(function(t,e){return ii(t,e)})),t.E("anychart.math.bbandsWidth.startFunction",pi),t.E("anychart.math.bbandsWidth.calculate",gi),t.E("anychart.math.bbandsWidth.calculationFunction",fi),t.E("anychart.math.bbandsWidth.createComputer",mi),t.H(vi,se),t.g=vi.prototype,t.g.Cc=function(t){return mi(t,this.i,this.b)},t.g.Gf=function(){return"BBands Width("+this.i+","+this.b+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.jo=function(e){return t.p(e)?(e=t.P(e,this.b,!1),this.b!=e&&(this.b=e,le(this)),this):this.b};var ml=vi.prototype;ml.period=ml.ub,ml.deviation=ml.jo,ml.series=ml.X,t.E("anychart.math.cci.initContext",bi),t.E("anychart.math.cci.startFunction",yi),t.E("anychart.math.cci.calculate",Si),t.E("anychart.math.cci.calculationFunction",xi),t.E("anychart.math.cci.createComputer",wi),t.H(Ci,se),Ci.prototype.Cc=function(t){return wi(t,this.b)},Ci.prototype.Gf=function(){return"CCI("+this.b+")"},Ci.prototype.X=function(t){return oe(this,"main",t)},Ci.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var vl=Ci.prototype;vl.series=vl.X,vl.period=vl.ub,t.E("anychart.math.cho.initContext",Ti),t.E("anychart.math.cho.startFunction",Di),t.E("anychart.math.cho.calculate",ki),t.E("anychart.math.cho.calculationFunction",$i),t.E("anychart.math.cho.createComputer",Oi),t.H(Pi,se),t.g=Pi.prototype,t.g.Cc=function(t){return Oi(t,this.b,this.i,this.o)},t.g.Gf=function(){return"CHO("+this.b+","+this.i+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.al=function(e){return t.p(e)?((e=i(e,this.o))!=this.o&&(this.o=e,le(this)),this):this.o};var bl=Pi.prototype;bl.series=bl.X,bl.fastPeriod=bl.Nv,bl.slowPeriod=bl.ix,bl.maType=bl.al,t.E("anychart.math.cmf.initContext",Li),t.E("anychart.math.cmf.startFunction",Ii),t.E("anychart.math.cmf.calculate",Ai),t.E("anychart.math.cmf.calculationFunction",Ei),t.E("anychart.math.cmf.createComputer",Gi),t.H(Ui,se),Ui.prototype.Cc=function(t){return Gi(t,this.b)},Ui.prototype.Gf=function(){return"CMF("+this.b+")"},Ui.prototype.X=function(t){return oe(this,"main",t)},Ui.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var yl=Ui.prototype;yl.series=yl.X,yl.period=yl.ub,t.E("anychart.math.roc.initContext",Fi),t.E("anychart.math.roc.startFunction",Mi),t.E("anychart.math.roc.calculationFunction",Ni),t.E("anychart.math.roc.calculate",_i),t.E("anychart.math.roc.createComputer",Ri),t.E("anychart.math.wma.initContext",ji),t.E("anychart.math.wma.startFunction",Bi),t.E("anychart.math.wma.calculate",Hi),t.E("anychart.math.wma.calculationFunction",zi),t.E("anychart.math.wma.createComputer",Vi),t.E("anychart.math.coppockCurve.initContext",qi),t.E("anychart.math.coppockCurve.startFunction",Wi),t.E("anychart.math.coppockCurve.calculate",Yi),t.E("anychart.math.coppockCurve.calculationFunction",Ki),t.E("anychart.math.coppockCurve.createComputer",Xi),t.H(Ji,se),t.g=Ji.prototype,t.g.Cc=function(t){return Xi(t,this.o,this.b,this.i)},t.g.Gf=function(){return"Coppock Curve ("+this.o+", "+this.b+", "+this.i+")"},t.g.X=function(t){return oe(this,"main",t)},t.g.Hla=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.kfa=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.qka=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i};var Sl=Ji.prototype;Sl.series=Sl.X,Sl.wmaPeriod=Sl.Hla,Sl.firstRocPeriod=Sl.kfa,Sl.secondRocPeriod=Sl.qka,t.E("anychart.math.dmi.initContext",Zi),t.E("anychart.math.dmi.startFunction",Qi),t.E("anychart.math.dmi.calculate",en),t.E("anychart.math.dmi.calculationFunction",nn),t.E("anychart.math.dmi.createComputer",sn),t.H(an,se),t.g=an.prototype,t.g.Cc=function(t){return sn(t,this.b,this.i,this.o)},t.g.Gf=function(t){switch(t){case"pdi":return"+DI("+this.b+")";case"ndi":return"-DI("+this.b+")";case"adx":return"ADX("+this.i+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"pdi":t.Td("value",e.Ke("pdiResult"));break;case"ndi":t.Td("value",e.Ke("ndiResult"));break;case"adx":t.Td("value",e.Ke("adxResult"))}},t.g.xja=function(t){return oe(this,"pdi",t)},t.g.fia=function(t){return oe(this,"ndi",t)},t.g.U$=function(t){return oe(this,"adx",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.kC=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.XP=function(e){return t.p(e)?((e=!!e)!=this.o&&(this.o=e,le(this)),this):this.o};var xl=an.prototype;xl.pdiSeries=xl.xja,xl.ndiSeries=xl.fia,xl.adxSeries=xl.U$,xl.period=xl.ub,xl.adxPeriod=xl.kC,xl.useWildersSmoothing=xl.XP,t.H(on,se),on.prototype.Cc=function(t){return De(t,this.b)},on.prototype.Gf=function(){return"EMA("+this.b+")"},on.prototype.X=function(t){return oe(this,"main",t)},on.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var wl=on.prototype;wl.series=wl.X,wl.period=wl.ub,t.E("anychart.math.env.initContext",rn),t.E("anychart.math.env.startFunction",ln),t.E("anychart.math.env.calculate",hn),t.E("anychart.math.env.calculationFunction",cn),t.E("anychart.math.env.createComputer",un),t.H(dn,se),t.g=dn.prototype,t.g.Cc=function(t){return un(t,this.i,this.o,this.b)},t.g.Gf=function(t){switch(t){case"upper":return"ENV upper";case"lower":return"ENV lower"}return""},t.g.Xn=function(t,e,i){switch(i){case"upper":t.Td("value",e.Ke("upperResult"));break;case"lower":t.Td("value",e.Ke("lowerResult"))}},t.g.eca=function(t){return oe(this,"upper",t)},t.g.dca=function(t){return oe(this,"lower",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.al=function(e){return t.p(e)?((e=i(e,this.b))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.jo=function(e){return t.p(e)?(e=t.N(e),(0,window.isNaN)(e)||e==this.o||(this.o=e,le(this)),this):this.o};var Cl=dn.prototype;Cl.upperSeries=Cl.eca,Cl.lowerSeries=Cl.dca,Cl.period=Cl.ub,Cl.maType=Cl.al,Cl.deviation=Cl.jo,t.E("anychart.math.ha.initContext",pn),t.E("anychart.math.ha.startFunction",gn),t.E("anychart.math.ha.calculate",fn),t.E("anychart.math.ha.calculationFunction",mn),t.E("anychart.math.ha.createComputer",vn),t.H(bn,se),bn.prototype.Cc=function(t){return vn(t)},bn.prototype.Gf=function(){return"HA"},bn.prototype.Xn=function(t,e){t.Td("open",e.Ke("haOpen")),t.Td("high",e.Ke("haHigh")),t.Td("low",e.Ke("haLow")),t.Td("close",e.Ke("haClose"))},bn.prototype.X=function(t){return oe(this,"main",t)};var Tl,Dl=bn.prototype;Dl.series=Dl.X,t.E("anychart.math.ikh.initContext",yn),t.E("anychart.math.ikh.startFunction",Sn),t.E("anychart.math.ikh.calculate",Cn),t.E("anychart.math.ikh.calculationFunction",xn),t.E("anychart.math.ikh.createComputer",wn),t.H(Tn,se),t.g=Tn.prototype,t.g.Cc=function(t){return wn(t,this.i,this.b,this.o)},t.g.Gf=function(t){switch(t){case"conversion":return"Conversion Line("+this.i+")";case"base":return"Base Line("+this.b+")";case"leading":return"Leading Span("+this.o+")";case"lagging":return"Lagging Span("+this.b+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"conversion":t.Td("value",e.Ke("conversionResult"));break;case"base":t.Td("value",e.Ke("baseResult"));break;case"leading":t.Td("high",e.Ke("spanAResult")),t.Td("low",e.Ke("spanBResult"));break;case"lagging":t.Td("value",e.Ke("laggingResult"))}},t.g.aea=function(t){return oe(this,"conversion",t)},t.g.yda=function(t){return oe(this,"base",t)},t.g.D3=function(t){return oe(this,"leading",t)},t.g.pha=function(t){return oe(this,"lagging",t)},t.g.rL=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.YF=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.NN=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var kl=Tn.prototype;kl.conversionSeries=kl.aea,kl.baseSeries=kl.yda,kl.leadingSeries=kl.D3,kl.laggingSeries=kl.pha,kl.conversionPeriod=kl.rL,kl.basePeriod=kl.YF,kl.leadingPeriod=kl.NN,t.E("anychart.math.stochastic.initContext",Dn),t.E("anychart.math.stochastic.startFunction",kn),t.E("anychart.math.stochastic.calculate",$n),t.E("anychart.math.stochastic.calculationFunction",On),t.E("anychart.math.stochastic.createComputer",Pn),t.E("anychart.math.kdj.initContext",Ln),t.E("anychart.math.kdj.startFunction",In),t.E("anychart.math.kdj.calculate",An),t.E("anychart.math.kdj.calculationFunction",En),t.E("anychart.math.kdj.createComputer",Gn),t.H(Un,se),t.g=Un.prototype,t.g.Cc=function(t){return Gn(t,this.o,this.b,this.i,this.K,this.G,this.aa,this.P)},t.g.Gf=function(t){switch(t){case"kSeries":return"%K("+this.o+(1!=this.b?", "+this.b:"")+")";case"dSeries":return"%D("+this.i+")";case"jSeries":return"%J"}return""},t.g.Xn=function(t,e,i){switch(i){case"kSeries":t.Td("value",e.Ke("kResult"));break;case"dSeries":t.Td("value",e.Ke("dResult"));break;case"jSeries":t.Td("value",e.Ke("jResult"))}},t.g.ica=function(t){return oe(this,"kSeries",t)},t.g.gca=function(t){return oe(this,"dSeries",t)},t.g.jha=function(t){return oe(this,"jSeries",t)},t.g.TD=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.gI=function(e){return t.p(e)?((e=i(e,this.K))!=this.K&&(this.K=e,le(this)),this):this.K},t.g.hca=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.vG=function(e){return t.p(e)?((e=i(e,this.G))!=this.G&&(this.G=e,le(this)),this):this.G},t.g.fca=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.LV=function(e){return t.p(e)?(e=t.N(e),(0,window.isNaN)(e)||e==this.aa||(this.aa=e,le(this)),this):this.aa},t.g.NS=function(e){return t.p(e)?(e=t.N(e),(0,window.isNaN)(e)||e==this.P||(this.P=e,le(this)),this):this.P};var $l=Un.prototype;$l.kPeriod=$l.TD,$l.kMAType=$l.gI,$l.kMAPeriod=$l.hca,$l.dMAType=$l.vG,$l.dPeriod=$l.fca,$l.kMultiplier=$l.LV,$l.dMultiplier=$l.NS,$l.kSeries=$l.ica,$l.dSeries=$l.gca,$l.jSeries=$l.jha,t.E("anychart.math.keltnerChannels.initContext",Fn),t.E("anychart.math.keltnerChannels.startFunction",Mn),t.E("anychart.math.keltnerChannels.calculate",Rn),t.E("anychart.math.keltnerChannels.calculationFunction",_n),t.E("anychart.math.keltnerChannels.createComputer",Nn),t.H(jn,se),t.g=jn.prototype,t.g.Cc=function(t){return Nn(t,this.b,this.o,this.i,this.G)},t.g.Gf=function(t){switch(t){case"ma":return this.i.toUpperCase()+"("+this.b+")";case"range":return"KeltnerChannels"}return""},t.g.Xn=function(t,e,i){switch(i){case"ma":t.Td("value",e.Ke("maResult"));break;case"range":t.Td("high",e.Ke("upperResult")),t.Td("low",e.Ke("lowerResult"))}},t.g.jca=function(t){return oe(this,"ma",t)},t.g.A_=function(t){return oe(this,"range",t)},t.g.rI=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.al=function(e){return t.p(e)?((e=i(e,this.i))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.$N=function(e){return t.p(e)?((e=t.P(e,this.G,!1))!=this.G&&(this.G=e,le(this)),this):this.G},t.g.Y_=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var Ol=jn.prototype;Ol.maPeriod=Ol.rI,Ol.maType=Ol.al,Ol.atrPeriod=Ol.Y_,Ol.multiplier=Ol.$N,Ol.rangeSeries=Ol.A_,Ol.maSeries=Ol.jca,t.E("anychart.math.macd.initContext",Bn),t.E("anychart.math.macd.startFunction",Hn),t.E("anychart.math.macd.calculate",Vn),t.E("anychart.math.macd.calculationFunction",zn),t.E("anychart.math.macd.createComputer",qn),t.H(Wn,se),t.g=Wn.prototype,t.g.Cc=function(t){return qn(t,this.b,this.o,this.i)},t.g.Gf=function(t){switch(t){case"macd":return"MACD("+this.b+","+this.o+","+this.i+")";case"signal":return"Signal";case"histogram":return"Histogram"}return""},t.g.Xn=function(t,e,i){switch(i){case"macd":t.Td("value",e.Ke("macdResult"));break;case"signal":t.Td("value",e.Ke("signalResult"));break;case"histogram":t.Td("value",e.Ke("histogramResult"))}},t.g.yha=function(t){return oe(this,"macd",t)},t.g.lca=function(t){return oe(this,"signal",t)},t.g.kca=function(t){return oe(this,"histogram",t)},t.g.Nv=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.ix=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.mP=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i};var Pl=Wn.prototype;Pl.macdSeries=Pl.yha,Pl.signalSeries=Pl.lca,Pl.histogramSeries=Pl.kca,Pl.fastPeriod=Pl.Nv,Pl.slowPeriod=Pl.ix,Pl.signalPeriod=Pl.mP,t.E("anychart.math.mfi.initContext",Yn),t.E("anychart.math.mfi.startFunction",Kn),t.E("anychart.math.mfi.calculate",Xn),t.E("anychart.math.mfi.calculationFunction",Jn),t.E("anychart.math.mfi.createComputer",Zn),t.H(Qn,se),Qn.prototype.Cc=function(t){return Zn(t,this.b)},Qn.prototype.Gf=function(){return"MFI("+this.b+")"},Qn.prototype.X=function(t){return oe(this,"series",t)},Qn.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Ll=Qn.prototype;Ll.period=Ll.ub,Ll.series=Ll.X,t.E("anychart.math.mma.initContext",ts),t.E("anychart.math.mma.startFunction",es),t.E("anychart.math.mma.calculationFunction",is),t.E("anychart.math.mma.createComputer",ns),t.H(ss,se),ss.prototype.Cc=function(t){return ns(t,this.b)},ss.prototype.Gf=function(){return"MMA("+this.b+")"},ss.prototype.X=function(t){return oe(this,"main",t)},ss.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Il=ss.prototype;Il.series=Il.X,Il.period=Il.ub,t.E("anychart.math.momentum.initContext",as),t.E("anychart.math.momentum.startFunction",os),t.E("anychart.math.momentum.calculate",rs),t.E("anychart.math.momentum.calculationFunction",ls),t.E("anychart.math.momentum.createComputer",hs),t.H(cs,se),cs.prototype.Cc=function(t){return hs(t,this.b)},cs.prototype.Gf=function(){return"Momentum("+this.b+")"},cs.prototype.X=function(t){return oe(this,"series",t)},cs.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Al=cs.prototype;Al.period=Al.ub,Al.series=Al.X,t.E("anychart.math.obv.initContext",us),t.E("anychart.math.obv.startFunction",ds),t.E("anychart.math.obv.calculate",fs),t.E("anychart.math.obv.calculationFunction",ps),t.E("anychart.math.obv.createComputer",gs),t.H(ms,se),ms.prototype.Cc=function(t){return gs(t)},ms.prototype.Gf=function(){return"OBV"},ms.prototype.X=function(t){return oe(this,"main",t)};var El=ms.prototype;El.series=El.X,t.E("anychart.math.ppo.initContext",vs),t.E("anychart.math.ppo.startFunction",bs),t.E("anychart.math.ppo.calculate",ys),t.E("anychart.math.ppo.calculationFunction",Ss),t.E("anychart.math.ppo.createComputer",xs),t.H(ws,se),t.g=ws.prototype,t.g.Cc=function(t){return xs(t,this.i,this.b,this.o)},t.g.Gf=function(t){switch(t){case"ppoSeries":return"PPO("+this.i+","+this.b+","+this.o+")";case"signalSeries":return"Signal";case"histogramSeries":return"PPO Histogram"}return""},t.g.Xn=function(t,e,i){switch(i){case"ppoSeries":t.Td("value",e.Ke("ppoResult"));break;case"signalSeries":t.Td("value",e.Ke("signalResult"));break;case"histogramSeries":t.Td("value",e.Ke("histogramResult"))}},t.g.Ija=function(t){return oe(this,"ppoSeries",t)},t.g.nca=function(t){return oe(this,"signalSeries",t)},t.g.mca=function(t){return oe(this,"histogramSeries",t)},t.g.c6=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.J3=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.e6=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o};var Gl=ws.prototype;Gl.ppoSeries=Gl.Ija,Gl.signalSeries=Gl.nca,Gl.histogramSeries=Gl.mca,Gl.shortPeriod=Gl.c6,Gl.longPeriod=Gl.J3,Gl.smoothingPeriod=Gl.e6,t.E("anychart.math.psar.initContext",Cs),t.E("anychart.math.psar.startFunction",Ts),t.E("anychart.math.psar.calculate",Ls),t.E("anychart.math.psar.calculationFunction",Is),t.E("anychart.math.psar.createComputer",As),t.H(Es,se),t.g=Es.prototype,t.g.Cc=function(t){return As(t,this.o,this.i,this.b)},t.g.Gf=function(){return"PSAR("+this.o+", "+this.i+", "+this.b+")"},t.g.X=function(t){return oe(this,"series",t)},t.g.K$=function(e){return t.p(e)?((e=t.N(e)||this.b)!=this.o&&(this.o=e,le(this)),this):this.o},t.g.J$=function(e){return t.p(e)?((e=t.N(e)||this.b)!=this.b&&(this.b=e,le(this)),this):this.b},t.g.I$=function(e){return t.p(e)?((e=t.N(e)||this.i)!=this.i&&(this.i=e,le(this)),this):this.i};var Ul=Es.prototype;Ul.accelerationFactorStart=Ul.K$,Ul.accelerationFactorMaximum=Ul.J$,Ul.accelerationFactorIncrement=Ul.I$,Ul.series=Ul.X,t.E("anychart.math.psy.initContext",Gs),t.E("anychart.math.psy.startFunction",Us),t.E("anychart.math.psy.calculate",_s),t.E("anychart.math.psy.calculationFunction",Fs),t.E("anychart.math.psy.createComputer",Ms),t.H(Ns,se),Ns.prototype.Cc=function(t){return Ms(t,this.b)},Ns.prototype.Gf=function(){return"PSY("+this.b+")"},Ns.prototype.X=function(t){return oe(this,"main",t)},Ns.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Fl=Ns.prototype;Fl.series=Fl.X,Fl.period=Fl.ub,t.E("anychart.math.priceChannels.initContext",Rs),t.E("anychart.math.priceChannels.startFunction",js),t.E("anychart.math.priceChannels.calculate",Bs),t.E("anychart.math.priceChannels.calculationFunction",Hs),t.E("anychart.math.priceChannels.createComputer",zs),t.H(Vs,se),t.g=Vs.prototype,t.g.Cc=function(t){return zs(t,this.b)},t.g.Gf=function(t){switch(t){case"range":return"PriceChannels";case"middle":return"PriceChannels M"}return""},t.g.Xn=function(t,e,i){switch(i){case"range":t.Td("high",e.Ke("upperResult")),t.Td("low",e.Ke("lowerResult"));break;case"middle":t.Td("value",e.Ke("middleResult"))}},t.g.oca=function(t){return oe(this,"middle",t)},t.g.B_=function(t){return oe(this,"range",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Ml=Vs.prototype;Ml.period=Ml.ub,Ml.middleSeries=Ml.oca,Ml.rangeSeries=Ml.B_,t.E("anychart.math.rat.initContext",qs),t.E("anychart.math.rat.startFunction",Ws),t.E("anychart.math.rat.calculate",Xs),t.E("anychart.math.rat.calculationFunction",Ys),t.E("anychart.math.rat.createComputer",Ks),t.H(Js,se),Js.prototype.Cc=function(t){return Ks(t,this.b)},Js.prototype.Gf=function(){return"RAT"},Js.prototype.X=function(t){return oe(this,"main",t)},Js.prototype.XR=function(e){if(t.p(e)){var i=t.ps(e);return(i=i?i.getTime():0)!=this.b&&(this.b=i,this.i=e,le(this)),this}return this.b?this.i:0};var _l=Js.prototype;_l.series=_l.X,_l.baseDate=_l.XR,t.E("anychart.math.rci.initContext",Zs),t.E("anychart.math.rci.startFunction",Qs),t.E("anychart.math.rci.calculate",ia),t.E("anychart.math.rci.calculationFunction",ta),t.E("anychart.math.rci.createComputer",ea),t.H(na,se),na.prototype.Cc=function(t){return ea(t,this.b)},na.prototype.Gf=function(){return"RCI("+this.b+")"},na.prototype.X=function(t){return oe(this,"main",t)},na.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Nl=na.prototype;Nl.series=Nl.X,Nl.period=Nl.ub,t.E("anychart.math.rsi.initContext",sa),t.E("anychart.math.rsi.startFunction",aa),t.E("anychart.math.rsi.calculationFunction",oa),t.E("anychart.math.rsi.createComputer",ra),t.H(la,se),la.prototype.Cc=function(t){return ra(t,this.b)},la.prototype.Gf=function(){return"RSI("+this.b+")"},la.prototype.X=function(t){return oe(this,"main",t)},la.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Rl=la.prototype;Rl.series=Rl.X,Rl.period=Rl.ub,t.H(ha,se),ha.prototype.Cc=function(t){return Ri(t,this.b)},ha.prototype.Gf=function(){return"RoC("+this.b+")"},ha.prototype.X=function(t){return oe(this,"main",t)},ha.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var jl=ha.prototype;jl.series=jl.X,jl.period=jl.ub,t.H(ca,se),ca.prototype.Cc=function(t){return Le(t,this.b)},ca.prototype.Gf=function(){return"SMA("+this.b+")"},ca.prototype.X=function(t){return oe(this,"main",t)},ca.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Bl=ca.prototype;Bl.series=Bl.X,Bl.period=Bl.ub,t.H(ua,se),t.g=ua.prototype,t.g.Cc=function(t){return Pn(t,this.o,this.b,this.i,this.K,this.G)},t.g.Gf=function(t){switch(t){case"kSeries":return"%K("+this.o+(1!=this.b?", "+this.b:"")+")";case"dSeries":return"%D("+this.i+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"kSeries":t.Td("value",e.Ke("kResult"));break;case"dSeries":t.Td("value",e.Ke("dResult"))}},t.g.sca=function(t){return oe(this,"kSeries",t)},t.g.qca=function(t){return oe(this,"dSeries",t)},t.g.TD=function(e){return t.p(e)?((e=t.P(e,this.o,!1))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.gI=function(e){return t.p(e)?((e=i(e,this.K))!=this.K&&(this.K=e,le(this)),this):this.K},t.g.rca=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.vG=function(e){return t.p(e)?((e=i(e,this.G))!=this.G&&(this.G=e,le(this)),this):this.G},t.g.pca=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i};var Hl=ua.prototype;Hl.kPeriod=Hl.TD,Hl.kMAType=Hl.gI,Hl.kMAPeriod=Hl.rca,Hl.dMAType=Hl.vG,Hl.dPeriod=Hl.pca,Hl.kSeries=Hl.sca,Hl.dSeries=Hl.qca,t.E("anychart.math.trix.initContext",da),t.E("anychart.math.trix.startFunction",pa),t.E("anychart.math.trix.calculate",ma),t.E("anychart.math.trix.calculationFunction",ga),t.E("anychart.math.trix.createComputer",fa),t.H(va,se),t.g=va.prototype,t.g.Cc=function(t){return fa(t,this.b,this.i,this.G,this.o)},t.g.Gf=function(t){switch(t){case"trix":return"TRIX("+this.b+")";case"signal":return this.o.toUpperCase()+"("+this.i+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"trix":t.Td("value",e.Ke("trix"));break;case"signal":t.Td("value",e.Ke("signal"))}},t.g.sla=function(t){return oe(this,"trix",t)},t.g.tca=function(t){return oe(this,"signal",t)},t.g.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.mP=function(e){return t.p(e)?((e=t.P(e,this.i,!1))!=this.i&&(this.i=e,le(this)),this):this.i},t.g.Bka=function(e){return t.p(e)?((e=i(e,this.o))!=this.o&&(this.o=e,le(this)),this):this.o},t.g.al=function(e){return t.p(e)?((e=i(e,this.G))!=this.G&&(this.G=e,le(this)),this):this.G};var zl=va.prototype;zl.trixSeries=zl.sla,zl.signalSeries=zl.tca,zl.period=zl.ub,zl.signalPeriod=zl.mP,zl.signalMaType=zl.Bka,zl.maType=zl.al,t.E("anychart.math.vwap.initContext",ba),t.E("anychart.math.vwap.startFunction",ya),t.E("anychart.math.vwap.calculate",Sa),t.E("anychart.math.vwap.calculationFunction",xa),t.E("anychart.math.vwap.createComputer",wa),t.H(Ca,se),Ca.prototype.Cc=function(t,e){return wa(t,e)},Ca.prototype.Gf=function(){return"VWAP"},Ca.prototype.Xn=function(t,e){t.Td("value",e.Ke("vwapValue"))},Ca.prototype.X=function(t){return oe(this,"vwapSeries",t)};var Vl=Ca.prototype;Vl.series=Vl.X,t.E("anychart.math.volumeMA.initContext",Ta),t.E("anychart.math.volumeMA.startFunction",Da),t.E("anychart.math.volumeMA.calculate",ka),t.E("anychart.math.volumeMA.calculationFunction",$a),t.E("anychart.math.volumeMA.createComputer",Oa),t.H(Pa,se),t.g=Pa.prototype,t.g.Cc=function(t){return Oa(t,this.b,this.i)},t.g.Gf=function(t){switch(t){case"volumeSeries":return"Volume";case"maSeries":return this.i.toUpperCase()+"("+this.b+")"}return""},t.g.Xn=function(t,e,i){switch(i){case"volumeSeries":t.Td("value",e.Ke("volumeResult"));break;case"maSeries":t.Td("value",e.Ke("maResult"))}},t.g.Ela=function(t){return oe(this,"volumeSeries",t)},t.g.uca=function(t){return oe(this,"maSeries",t)},t.g.rI=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b},t.g.al=function(e){return t.p(e)?((e=i(e,this.i))!=this.i&&(this.i=e,le(this)),this):this.i};var ql=Pa.prototype;ql.maPeriod=ql.rI,ql.maType=ql.al,ql.maSeries=ql.uca,ql.volumeSeries=ql.Ela,t.H(La,se),La.prototype.Cc=function(t){return Vi(t,this.b)},La.prototype.Gf=function(){return"WMA("+this.b+")"},La.prototype.X=function(t){return oe(this,"main",t)},La.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Wl=La.prototype;Wl.series=Wl.X,Wl.period=Wl.ub,t.E("anychart.math.williamsR.initContext",Ia),t.E("anychart.math.williamsR.startFunction",Aa),t.E("anychart.math.williamsR.calculate",Ea),t.E("anychart.math.williamsR.calculationFunction",Ga),t.E("anychart.math.williamsR.createComputer",Ua),t.H(Fa,se),Fa.prototype.Cc=function(t){return Ua(t,this.b)},Fa.prototype.Gf=function(){return"Williams %R("+this.b+")"},Fa.prototype.X=function(t){return oe(this,"series",t)},Fa.prototype.ub=function(e){return t.p(e)?((e=t.P(e,this.b,!1))!=this.b&&(this.b=e,le(this)),this):this.b};var Yl=Fa.prototype;Yl.period=Yl.ub,Yl.series=Yl.X;var Kl={};Kl.adl=me,Kl.ama=xe,Kl.ao=Me,Kl.aroon=Ke,Kl["aroon-oscillator"]=ei,Kl.atr=He,Kl.bbands=ri,Kl["bbands-b"]=di,Kl["bbands-width"]=vi,Kl.cci=Ci,Kl.cho=Pi,Kl.cmf=Ui,Kl["coppock-curve"]=Ji,Kl.dmi=an,Kl.ema=on,Kl.env=dn,Kl.ha=bn,Kl.ikh=Tn,Kl.kdj=Un,Kl["keltner-channels"]=jn,Kl.macd=Wn,Kl.mfi=Qn,Kl.mma=ss,Kl.momentum=cs,Kl.obv=ms,Kl.ppo=ws,Kl["price-channels"]=Vs,Kl.psar=Es,Kl.psy=Ns,Kl.rat=Js,Kl.rci=na,Kl.roc=ha,Kl.rsi=la,Kl.sma=ca,Kl.stochastic=ua,Kl.trix=va,Kl.vwap=Ca,Kl["volume-ma"]=Pa,Kl["williams-r"]=Fa,Kl.wma=La,t.H(_a,t.wu),t.Jz(_a,"plot","dataarea"),_a.prototype.wM=window.NaN,_a.prototype.RT=window.NaN,_a.prototype.ra=68|t.wu.prototype.ra,_a.prototype.sa=17301440|t.wu.prototype.sa;var Xl={};t.sq(Xl,[[0,"pointWidth",t.yo],[0,"maxPointWidth",t.yo],[0,"minPointLength",t.yo],[0,"baseline",t.Bq],[0,"weight",t.Bq]]),t.U(_a,Xl),t.g=_a.prototype,t.g.co=function(){var t=this.La("chartElements")||{axes:{},grids:{}};t.series=this.Sa.length,t.axes.x=1,t.axes.y=0,t.grids.x=0,t.grids.y=0,t.grids.xMinor=0,t.grids.yMinor=0;for(var e=Math.max(this.qf.length,this.Yg.length,this.Zg.length,this.jh.length,this.kh.length);e--;)this.qf[e]&&t.axes.y++,this.Yg[e]&&t.grids.x++,this.Zg[e]&&t.grids.y++,this.jh[e]&&t.grids.xMinor++,this.kh[e]&&t.grids.yMinor++;this.La("chartElements",t)},t.g.La=function(e,i){return t.p(e)?t.p(i)?(this.kn[e.toLowerCase()]=i,this):this.kn[e.toLowerCase()]:this.kn},t.g.hJ=function(){this.kn={}},t.g.Rg=function(t){return this.co(),this.La(t)},t.g.zC=function(t,e,i){return this.Ae("area",t,e,i)},t.g.hS=function(t,e,i){return this.Ae("candlestick",t,e,i)},t.g.KC=function(t,e,i){return this.Ae("column",t,e,i)},t.g.KV=function(t,e,i){return this.Ae("jump-line",t,e,i)},t.g.FJ=function(t,e,i){return this.Ae("stick",t,e,i)},t.g.line=function(t,e,i){return this.Ae("line",t,e,i)},t.g.Br=function(t,e,i){return this.Ae("marker",t,e,i)},t.g.IW=function(t,e,i){return this.Ae("ohlc",t,e,i)},t.g.kX=function(t,e,i){return this.Ae("range-area",t,e,i)},t.g.lX=function(t,e,i){return this.Ae("range-column",t,e,i)},t.g.mX=function(t,e,i){return this.Ae("range-spline-area",t,e,i)},t.g.nX=function(t,e,i){return this.Ae("range-step-area",t,e,i)},t.g.fY=function(t,e,i){return this.Ae("spline",t,e,i)},t.g.gY=function(t,e,i){return this.Ae("spline-area",t,e,i)},t.g.pY=function(t,e,i){return this.Ae("step-area",t,e,i)},t.g.qY=function(t,e,i){return this.Ae("step-line",t,e,i)},t.g.cV=function(t,e,i){return this.Ae("hilo",t,e,i)},t.g.kl=function(t){var e=[],i=this.cq(),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.Ae(i,arguments[s]));else e.push(this.Ae(i,null));return this.da(!0),e},t.g.ty=function(e){return t.xa(this.Sa,(function(t){return t.id()==e}))},t.g.ef=function(t){return this.Ai(this.ty(t))},t.g.Ai=function(t){return this.Sa[t]||null},t.g.tj=function(){return this.Sa.length},t.g.Ao=function(t){return this.Rn(this.ty(t))},t.g.Rn=function(e){var i=this.Sa[e];return i&&(t.Pp++,t.Ca(this.Sa,e,1),t.qd(i),this.B(34944,1),t.Sp()),this},t.g.Dp=function(){if(this.Sa.length){t.Pp++;var e=this.Sa;this.Sa=[],t.sd(e),this.B(34944,1),t.Sp()}return this},t.g.Ue=function(){return this.Sa},t.g.ms=function(e){return this.Ti||(this.Ti=new t.Kz,t.W(this,"defaultSeriesSettings",this.Ti)),t.p(e)?(this.Ti.oa=e,this):this.Ti},t.g.zM=function(t){return t.check(32768)?31:30},t.g.Ae=function(e,i,n,s){var a=this.pa.Vv(e);return a?(e=new Rt(this.pa,this,e,a[1]),a=(a=this.Sa[this.Sa.length-1])?a.yh()+1:0,this.Sa.push(e),e.yh(a),t.fB(e),e.data(i||null,n,s),e.clip(!0),e.Kq(this.cc().nc(a)),t.kB(e,this.Nf().nc(a)),e.dx(this.ve().nc(a)),e.kb(this),t.K(e,this.nJ,this),this.B(2176,1)):e=null,e},Ma(_a),t.g=_a.prototype,t.g.cq=function(i){return t.p(i)?(this.US=i=e(i),this):this.US},t.g.xc=function(){return this.pa},t.g.fA=function(e){return t.p(e)?(this.aq=e,this):(this.aq||(this.aq=t.zm("stock.defaultPlotSettings.defaultGridSettings")),this.aq)},t.g.gA=function(e){return t.p(e)?(this.bq=e,this):(this.bq||(this.bq=t.zm("stock.defaultPlotSettings.defaultMinorGridSettings")),this.bq)},t.g.X0=function(e){return t.p(e)?(this.SS=e,this):(this.SS||(this.SS=t.zm("stock.defaultPlotSettings.defaultPriceIndicatorSettings")),this.SS)},t.g.Ey=function(){for(var t=this.Sa.length;t--;)this.Sa[t].sp()&&this.Sa[t].B(1024)},t.g.Zja=function(t){for(var e=0;e<this.Sa.length;e++){var i=this.Sa[e];i&&i.yE(),t||i.B(1024)}},t.g.rB=function(t){for(var e=0;e<this.Sa.length;e++){var i=this.Sa[e];i&&i.yE()}t||this.Ey()},t.g.Dy=function(e,i){var n,s=1024;for(e&&(s|=4),n=0;n<this.Sa.length;n++)this.Sa[n]&&this.Sa[n].B(s);for(this.Ql&&this.Ql.B(64),this.pa.D&&this.Nk().MA(),n=0;n<this.qf.length;n++)(s=this.qf[n])&&(s.ka(),s.uo(),s.da(!1));var a=t.Ga(this.Yg,this.Zg,this.jh,this.kh);for(n=0;n<a.length;n++)(s=a[n])&&s.B(64);for(a=t.Ga(this.og,this.rg,this.tg),n=0;n<a.length;n++)(s=a[n])&&s.B(20);for(s=16,e&&(s|=4),this.mc&&this.mc.B(s),!i&&this.Bi&&this.Bi.enabled()&&this.Bi.B(s),n=0;n<this.Au.length;n++)(s=this.Au[n])&&s.B(20);this.B(388992),t.nr(this,"plot","dataarea")},t.g.dg=function(){return ja(this),this.hh},t.g.mr=function(){return 32781},t.g.yv=function(e){return this.tn||(this.tn=new t.Lz,t.W(this,"dataArea",this.tn),t.K(this.tn,this.OS,this)),t.p(e)?(this.tn.N(e),this):this.tn},t.g.OS=function(e){t.X(e,1)&&t.nr(this,"plot","dataarea",1)},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.enabled(!1),this.Ia.zIndex(1),t.W(this,"background",this.Ia),this.Ia.Wj(!0),t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.eg=function(e){return this.Bi||(this.Bi=new t.Ww,t.K(this.Bi,this.Via,this),this.Bi.wa("dragstart",(function(){Ao(this.pa)}),!1,this),this.Bi.wa("dragend",(function(){Eo(this.pa)}),!1,this),this.Bi.kb(this),t.W(this,"legend",this.Bi)),t.p(e)?(this.Bi.N(e),this):this.Bi},t.g.bb=function(e){if(t.p(e)){if(e=t.jt(this.Fc,e,null,3,["Stock plot Y scale","scatter","linear, log"],this.Yu,this)){var i=this.Fc==e;this.Fc=e,this.Fc.da(i),i||(this.Dy(!1),this.pa.B(32768),this.va(1))}return this}return this.Fc||(this.Fc=t.ft(),t.K(this.Fc,this.Yu,this)),this.Fc},t.g.Yu=function(e){for(var i=0,n=0;n<this.Sa.length;n++){var s=this.Sa[n];s&&s.enabled()&&s.bb()==this.Fc&&(i|=s.B(1024))}i&&(i=1,t.X(e,4)&&(i|=4),this.B(128,i))},t.g.ij=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.qf[n];return a||(a=new t.Sy,this.qf[n]=a,a.Ga("stock.defaultPlotSettings.defaultYAxisSettings",this.zG),a.kb(this),t.K(a,this.Ola,this),this.B(260,1)),t.p(s)?(a.N(s),this):a},t.g.Q4=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Au[n];return a||((a=new et).Ga("stock.defaultPlotSettings.defaultPriceIndicatorSettings",this.X0()),it(a),this.Au[n]=a,a.zIndex(150),a.K=this,a.kb(this),t.K(a,this.Nja,this),this.B(16384,1)),t.p(s)?(a.N(s),this):a},t.g.$h=function(e){return this.mc||(this.mc=new tt(this.pa),this.mc.kb(this),this.mc.Ie(!0,!1),this.mc.zIndex(35),t.W(this,"xAxis",this.mc),t.K(this.mc,this.RY,this),this.B(516,1)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.ZG=function(t){return t?this.qf[t-1]:this.mc},t.g.uy=function(){return this.mc},t.g.wy=function(t){return this.qf[t]},t.g.ip=function(t){return t.oa.zIndex+.001*(this.Yg.length+this.Zg.length+this.jh.length+this.kh.length)},t.g.lm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Yg[n];return a||((a=new nt).Xj=this,t.mz(a,"vertical"),a.Ga("stock.defaultPlotSettings.defaultGridSettings",this.fA()),a.zIndex(this.ip(a)),this.Yg[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.nm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Zg[n];return a||((a=new nt).Xj=this,t.mz(a,"horizontal"),a.Ga("stock.defaultPlotSettings.defaultGridSettings",this.fA()),a.zIndex(this.ip(a)),this.Zg[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.Qr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jh[n];return a||((a=new nt).Ga("defaultMinorGridSettings","stock.defaultPlotSettings.defaultMinorGridSettings",this.gA()),a.Xj=this,t.mz(a,"vertical"),a.zIndex(this.ip(a)),this.jh[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.Tr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.kh[n];return a||((a=new nt).Xj=this,t.mz(a,"horizontal"),a.Ga("defaultMinorGridSettings","stock.defaultPlotSettings.defaultMinorGridSettings",this.gA()),a.zIndex(this.ip(a)),this.kh[n]=a,t.K(a,this.Qy,this),this.B(1024,1)),t.p(s)?(a.N(s),this):a},t.g.title=function(e){if(!this.jb){this.jb=new t.aw,this.jb.kb(this);var i=this.jb;t.p(!0)&&(i.r3=!0),t.W(this,"title",this.jb),this.jb.Wj(!0),t.K(this.jb,this.gB,this)}return t.p(e)?(this.jb.N(e),this):this.jb},t.g.gB=function(e){var i=131072,n=0;t.X(e,1)&&(n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.IL=function(e){return t.p(e)?(this.RS=e,this):this.RS||{}},t.g.NL=function(e){return t.p(e)?(this.VS=e,this):this.VS||{}},t.g.JL=function(e){return t.p(e)?(this.TS=e,this):this.TS||{}},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.og[n];return a||((a=new t.$z).pa=this,a.Ga("stock.defaultPlotSettings.defaultLineMarkerSettings",this.IL()),t.aA(a,"horizontal"),this.og[n]=a,a.kb(this),Ra(this,a),t.K(a,this.Kw,this),this.B(262144,1)),t.p(s)?(a.N(s),this):a},t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.rg[n];return a||((a=new t.cA).pa=this,a.Ga("stock.defaultPlotSettings.defaultRangeMarkerSettings",this.JL()),t.dA(a,"horizontal"),this.rg[n]=a,a.kb(this),Ra(this,a),t.K(a,this.Kw,this),this.B(262144,1)),t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.tg[n];return a||((a=new t.fA).pa=this,a.Ga("stock.defaultPlotSettings.defaultTextMarkerSettings",this.NL()),t.$y(a,"horizontal"),this.tg[n]=a,a.kb(this),Ra(this,a),t.K(a,this.Kw,this),this.B(262144,1)),t.p(s)?(a.N(s),this):a},t.g.Kw=function(e){t.X(e,4)&&this.pa.B(32768),this.B(262144,1)},t.g.remove=function(){this.Oa&&this.Oa.remove()},t.g.W=function(){if(!this.zc())return this;this.ka();var e=this.Gm().label(),i=this.yj();if(e.visible()!==i&&this.Oa&&(i=this.dispatchEvent({type:"datachanged",chart:this,hasData:!i})&&i),e.visible(i),this.Kv(),this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.J(8)&&(this.Oa.zIndex(this.zIndex()),this.I(8)),this.J(4096)){var n=this.cc(),s=this.Nf(),a=this.ve();for(i=0;i<this.Sa.length;i++){var o=this.Sa[i],r=o.yh();o.Kq(n.nc(r)),t.kB(o,s.nc(r)),o.dx(a.nc(r))}this.Dy(!1),this.I(4096)}if(this.J(256))for(i=0;i<this.qf.length;i++)(o=this.qf[i])&&(o.ka(),o.scale()||o.scale(this.bb()),o.da(!1));if(this.J(512)&&this.mc&&(this.mc.ka(),this.mc.scale(this.pa.Ra()),this.mc.da(!1)),ja(this),this.J(256)){for(i=0;i<this.qf.length;i++)(o=this.qf[i])&&(o.ka(),t.Yu(o.labels()),t.Yu(o.qb()),o.O(this.Oa),o.W(),o.da(!1));this.I(256)}if(this.J(512)&&(this.mc&&(this.mc.ka(),this.mc.O(this.Oa),this.mc.W(),this.mc.da(!1)),this.I(512)),this.J(1024)){for(o=t.Ga(this.Yg,this.Zg,this.jh,this.kh),i=0;i<o.length;i++)(n=o[i])&&(n.ka(),n.scale()||(n.Nb()?n.scale(this.bb()):n.scale(this.pa.Ra())),n.ja(this.hh),n.O(this.Oa),n.W(),n.da(!1));this.I(1024)}if(this.J(131072)&&((i=t.wr(this,"title"))&&(i.Wj(!1),i.ka(),i.O(this.Oa),i.W(),i.da(!1)),this.I(131072)),this.J(262144)){for(o=t.Ga(this.og,this.rg,this.tg),i=0;i<o.length;i++)(n=o[i])&&(n.ka(),n.scale()||n.WK(n.Nb()?this.bb():this.pa.Ra()),n.ja(this.hh),n.O(this.Oa),n.W(),n.da(!1));this.I(262144)}if(this.J(64)&&((i=t.wr(this,"background"))&&(i.Wj(!1),i.ka(),i.O(this.Oa),i.W(),i.da(!1)),this.I(64)),this.J(128)){for(n="direct"==this.bb().kx(),i=0;i<this.Sa.length;i++)(o=this.Sa[n?this.Sa.length-i-1:i])&&(o.ka(),o.ja(this.hh),o.O(this.Oa),o.W(),o.da(!1));this.rB(!0),this.I(128)}if(this.J(8192)&&(this.pa.D&&((i=this.Nk()).ka(),i.ja(this.hh),i.O(this.Oa),i.W(),i.da(!1)),this.I(8192)),this.J(65536)&&((i=this.qj()).ka(),i.ja(this.hh),i.O(this.Oa),i.zh=200,i.W(),i.da(!1),this.I(65536)),this.J(16384)){for(i=0;i<this.Au.length;i++)(o=this.Au[i])&&(o.ka(),o.ja(this.hh),o.O(this.Oa),o.W(),o.da(!1));this.I(16384)}for(this.J(16777216)&&((i=this.mh()).ka(),i.ja(this.dg()),i.O(this.Oa),i.$h(this.mc),i.W(),i.da(!1),this.I(16777216)),this.J(32768)&&(e.ka(),e.O(this.Oa),e.ja(this.hh),e.W(),e.da(!1),this.I(32768)),t.rr(this,"plot","dataarea")&&((e=this.yv()).ka(),e.O()||e.O(this.Oa),e.ja(this.hh),e.da(!1),e.W(),t.pr(this,"plot","dataarea")),this.da(!1),e=this.pa,o=i=0;o<e.f.length;o++)e.f[o]&&e.f[o].enabled()&&i++;return e=1==i?"single":Va(this)?"top":qa(this)?"bottom":"center",this.Vy||((i=this.Vy=new st(this)).P!=e&&(i.P=e),this.Vy.Sd(),this.Vy.Lc()),(i=this.Vy).P!=e&&(i.P=e),this.Vy.update(),this},t.g.oq=function(t){var e=t.offsetY,i=(t.offsetX-this.hh.left)/this.hh.width;t=(t.offsetY-this.hh.top)/this.hh.height,i=this.pa.Ra().Mc(i),i=S(this.pa.b.i,i);var n=[];(i=Ha(this,i)).sort((function(t,e){return e.series.zIndex()-t.series.zIndex()}));for(var s=0;s<i.length;s++){var a=i[s],o=a.point;if(a=a.series,o){var r=o.j("value"),l=o.j("zero"),h=o.j("high"),c=o.j("low"),u=!a.check(32768);h=e>=Math.min(h,c)&&e<=Math.max(h,c),r=e>=Math.min(r,l)&&e<=Math.max(r,l)&&u||h?0:Na(this,a,o,t).Tf*this.hh.height,n.push({series:a,nearestPointToCursor:{distance:r,index:o.ma()}})}}return n},t.g.ig=function(t){return(t=_a.u.ig.call(this,t)).seriesStatus=this.oq(t),t},t.g.Kv=function(){this.Oa||(this.Oa=t.ok(),t.ru(this,this.Oa),this.Oj=this.Oa.rect(),this.Oj.zIndex(199),this.Oj.fill(t.bm),this.Oj.stroke(null),this.wc.Ce(this,"mousedown",this.wr),this.wc.Ce(this,"touchstart",this.wr),this.wc.wa(this,"touchstart",this.Hga),this.wc.wa(this,"touchend",this.Gga),this.wc.wa(this,"mouseover",this.I2),this.wc.wa(this,"mousemove",this.I2),this.wc.wa(this,"mouseout",this.Dga),this.wc.wa(this,"mousedown",this.Cga))},t.g.Mha=function(e){var i=e.gE;!t.p(this.mf)||"mousedown"!==e.type&&"touchstart"!==e.type||this.mf.lk(i)},t.g.d2=function(e,i,n){var s;return i=i||((0,window.isNaN)(this.gN)?X(this.pa.b):this.gN),!(0,window.isNaN)(i)&&(s=e)&&(t.z(s)&&(s=t.Nu(t.Lu.Id(),s)),t.D(s))?(i={value:{value:i,type:"date-time"},rawValue:{value:n,type:"date-time"},hoveredDate:{value:i,type:"date-time"},dataIntervalUnit:{value:(e=this.pa.Wm()).Cn().unit,type:"string"},dataIntervalUnitCount:{value:e.Cn().count,type:"number"},isGrouped:{value:e.OD(),type:""}},i=t.ov(new t.Fw(i)),s.call(i,i)):null},t.g.Via=function(e){var i=0,n=1;t.X(e,1)&&(i|=2048),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Ol=function(e,i){for(var n=[],s=0;s<this.Sa.length;s++){var a=this.Sa[s];if(a){var o=a.qD(i);o.sourceUid=t.oa(this),o.sourceKey=a.id(),n.push(o)}}return n},t.g.Ms=function(t){return"default"==t},t.g.zr=function(t){t=t.Ki(),(t=this.ef(t))&&(t.enabled(!t.enabled()),t.enabled()?t.Zk():t.Md())},t.g.wq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Zk()},t.g.vq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.ef(e))&&t.Md()},t.g.NI=function(){return!0},t.g.ro=function(e,i,n,s,a,o){if(this.Oa&&this.hh&&this.enabled()){var r="sticky"==this.mh().g("displayMode"),l=r?e:i,h=this.pa.Ra().transform(l),c=t.$b(this.mh().g("yStroke")),u=this.hh.left+h*this.hh.width;for(u=t.R(u,c),r&&a&&(s=a.pointYRatio,a=t.Zj(this.O().Ja()),s=s*this.hh.height+this.hh.top+a.y),a=this.mh(),r=this.cI,t.p(r)&&(a.SY=r),a=this.mh(),r=this.cI,c=n!=this,n=s,a.enabled()&&(c?a.aV():t.p(n)&&(n-=(s=t.Zj(a.O().Ja())).y,s=t.kA(a),a.Kt(s,!1,u,n)),a.Zx(a.mc,!0,u,n||0),s=t.jA(a),a.Kt(s,!0,u,n||0,h,r)),h=0;h<this.Sa.length;h++)(n=this.Sa[h])&&(Bt(n),n.ro(l,e));this.Bi&&this.Bi.enabled()&&(l=to(this.pa.Ra(),l),Ba(this,null,e,i,l)),this.va(64),o&&this.Vy.show()}},t.g.BY=function(){if(this.enabled()){this.gN=window.NaN;for(var t=0;t<this.Sa.length;t++){var e=this.Sa[t];e&&Bt(e)}this.mh().Lc(),this.Bi&&this.Bi.enabled()&&Ba(this,null,X(this.pa.b)),this.va(64),this.Vy.Lc()}},t.g.sE=function(){this.mf&&this.mf.lp&&this.mf.sE(),this.wz&&this.pa.sE(this.wz.anchor)},t.g.wr=function(t){t=t.gE.kf,this.mf=new Ya(this,this.Oj),this.mf.lk(t)},t.g.Hga=function(e){var i=e.kf,n=za(e);if(n&&1<n.length&&(this.mf.ey(i),2==n.length)){i=[];for(var s={},a=0;2>a;a++){var o=n[a];i[a+a]=void 0!==o.clientX?o.clientX:o.pageX,i[a+a+1]=void 0!==o.clientY?o.clientY:o.pageY,s[o.identifier]=!0}this.wz={anchor:this.pa.cH(),x:(i[0]+i[2])/2,y:(i[1]+i[3])/2,Tf:t.gn.apply(null,i),Sga:s},t.Ld(t.Lp,"touchmove",this.K2,{capture:!0,passive:!1},this),e.preventDefault()}},t.g.K2=function(e){var i=za(e);if(this.wz&&i&&1<i.length){for(var n=[],s=0;s<i.length;s++){var a=i[s];a.identifier in this.wz.Sga&&(n[s+s]=void 0!==a.clientX?a.clientX:a.pageX,n[s+s+1]=void 0!==a.clientY?a.clientY:a.pageY)}i=(n[0]+n[2])/2,s=t.gn.apply(null,n),this.nQ={anchor:this.wz.anchor,x:i,y:(n[1]+n[3])/2,Tf:s,mo:(i-this.wz.x)/this.hh.width,eea:s/this.wz.Tf},t.p(this.i7)||(this.i7=t.ll.requestAnimationFrame(this.Tla)),e.preventDefault()}},t.g.Gga=function(e){var i=za(e);1==i.length&&(t.Yd(t.Lp,"touchmove",this.K2,{capture:!0,passive:!1},this),i=i[0],(e=new t.Bd(e.kf.kf)).clientX=void 0!==i.clientX?i.clientX:i.pageX,e.clientY=void 0!==i.clientY?i.clientY:i.pageY,e.screenX=i.screenX||0,e.screenY=i.screenY||0,this.wz=null,this.mf.lk(e))},t.g.I2=function(e){var i=this.Sf&&this.Sf.aa;if(this.hh&&!i){var n=t.Zj(this.O().Ja());if(i=e.clientX-n.x-this.hh.left,n=e.clientY-n.y-this.hh.top,0<=i&&i<=this.hh.width&&0<=n&&n<=this.hh.height){n=this.hh;var s=t.Zj(this.O().Ja());i=(e.clientX-s.x-n.left)/n.width,n=(e.clientY-s.y-n.top)/n.height,s=e.clientX,e=e.clientY,this.wM=i,this.RT=n,this.ofa=s,this.pfa=e,e=this.mh(),i=this.cI,t.p(i)&&(e.SY=i),t.p(this.Qj)||(this.Qj=t.ll.requestAnimationFrame(this.rs))}}},t.g.Dga=function(){this.RT=this.wM=window.NaN,t.p(this.Qj)||(this.Qj=t.ll.requestAnimationFrame(this.rs))},t.g.Cga=function(){this.pa.D&&this.Nk().ie()},t.g.aI=function(){return this.j3},t.g.i4=function(){var t=Co(this.pa,this);return To(this.pa,this,t),this},t.g.h4=function(){t:{for(var e=this.pa,i=(0,t.za)(e.f,this)+1;i<e.f.length;i++){var n=e.f[i];if(n&&n.enabled()){e=n;break t}}e=null}return To(this.pa,this,e),this},t.g.L6=function(){var e=this.pa,i=!this.aI();t.p(i)&&(this.j3=i),e.ka();for(var n=0;n<e.f.length;n++){var s=e.f[n];s!==this&&s.enabled(!i)}return e.da(!0),this},t.g.mh=function(e){return this.$f||(this.$f=new t.iA,this.$f.Yl=this,t.W(this,"crosshair",this.$f),t.K(this.$f,this.fB,this),this.B(16777216,1)),t.p(e)?(this.$f.N(e),this):this.$f},t.g.fB=function(){this.B(16777216,1)},t.g.Nk=function(e){return this.pa.D?this.Sf||(this.Sf=new this.pa.D.PlotController(this.pa.Nk(),this),t.K(this.Sf,this.aR,this),this.Sf.kb(this),this.Sf.N(this.oa.annotations)):t.il(4,null,["Annotations"]),t.p(e)?(this.Sf&&this.Sf.N(e),this):this.Sf||null},t.g.qj=function(e){return this.Ql||(this.Ql=new te(this,this.pa.qj()),t.K(this.Ql,this.afa,this),this.Ql.kb(this.pa.qj())),t.p(e)?(this.Ql.N(e),this):this.Ql},t.g.afa=function(){this.B(65536,1)},t.g.aR=function(){this.B(8192,1)},t.g.vg=function(){this.B(64,1)},t.g.nJ=function(e){var i=1,n=128;t.X(e,64)&&(n|=2048),t.X(e,4)&&(i|=4),this.B(n,i)},t.g.Ola=function(e){var i=256;t.X(e,8)&&(i|=4),this.B(i,1)},t.g.Nja=function(){this.B(16384,1)},t.g.RY=function(e){var i=512;t.X(e,8)&&(i|=4),this.B(i,1)},t.g.Qy=function(){this.B(1024,1)},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.Pf,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(4608,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(4096,1)},t.g.tL=function(){return new t.xv},t.g.FW=function(e){t.X(e,1)&&this.B(32768,1)},t.g.Gm=function(e){return this.Dq||(this.Dq=new t.pv(this),t.K(this.Dq,this.FW,this)),t.p(e)?(this.Dq.N(e),this):this.Dq},t.g.xN=function(t){var e=t.la;return e=e?e.f.Hb():0,!(!t.enabled()||!e)},t.g.yj=function(){for(var t=0,e=this.Sa.length,i=0;i<e&&!this.xN(this.Sa[i]);i++)t++;return t==e},t.g.R=function(){t.sd(this.Sf,this.jb,this.Ql,this.Ia,this.mc,this.qf,this.Dq,this.Oa,this.$f,this.Ti,this.aq,this.bq,this.zG,this.Bi,this.Yg,this.Zg,this.jh,this.kh,this.Sa,this.tn,this.ID,this.Au,this.og,this.rg,this.tg,this.Fa,this.He,this.fd),this.fd=this.He=this.Fa=this.tn=this.Bi=this.zG=this.bq=this.aq=this.Ti=this.$f=this.Oa=this.Dq=this.mc=this.Ia=this.Ql=this.jb=this.Sf=null,this.ID.length=0,this.Sa.length=0,this.qf.length=0,this.Yg.length=0,this.Zg.length=0,this.jh.length=0,this.kh.length=0,this.og.length=0,this.rg.length=0,this.tg.length=0,this.Au.length=0,_a.u.R.call(this);var e=this.pa;t.Fa(e.f,this)&&e.B(4100,9),delete this.pa},t.g.F=function(){var e,i,n=_a.u.F.call(this),s={},a=[],o=[];t.Tq(this,Xl,n),s[t.oa(this.bb())]=this.bb().F(),a.push(s[t.oa(this.bb())]),n.yScale=a.length-1,n.defaultSeriesType=this.cq(),n.background=this.background().F(),n.title=this.title().F(),n.noDataLabel=this.Gm().label().F(),n.dataArea=this.yv().F(),o.push(t.oa(this.$h())),n.xAxis=this.$h().F(),n.palette=this.cc().F(),n.markerPalette=this.Nf().F(),n.hatchFillPalette=this.ve().F(),n.crosshair=this.mh().F();var r=[];for(i=0;i<this.qf.length;i++){var l=this.qf[i],h=l.F();if(e=l.scale()){var c=t.oa(e);s[c]?h.scale=(0,t.za)(a,s[c]):(s[c]=e.F(),a.push(s[c]),h.scale=a.length-1)}o.push(t.oa(l)),r.push(h)}for(r.length&&(n.yAxes=r),h=[],i=0;i<this.Au.length;i++)(e=this.Au[i])&&(h[i]=e.F());for(h.length&&(n.priceIndicators=h),Wa("xGrids",this.Yg,n,a,s,o),Wa("yGrids",this.Zg,n,a,s,o),Wa("xMinorGrids",this.jh,n,a,s,o),Wa("yMinorGrids",this.kh,n,a,s,o),o=[],i=0;i<this.Sa.length;i++)h=(e=this.Sa[i]).F(),(e=e.bb())&&(s[c=t.oa(e)]?h.yScale=(0,t.za)(a,s[c]):(s[c]=e.F(),a.push(s[c]),h.yScale=a.length-1)),o.push(h);return o.length&&(n.series=o),a.length&&(n.scales=a),n},t.g.U=function(e,i){_a.u.U.call(this,e,i),t.Iq(this,Xl,e,i),"defaultGridSettings"in e&&this.fA(e.defaultGridSettings),"defaultPriceIndicatorSettings"in e&&this.X0(e.defaultPriceIndicatorSettings),"defaultLineMarkerSettings"in e&&this.IL(e.defaultLineMarkerSettings),"defaultRangeMarkerSettings"in e&&this.JL(e.defaultRangeMarkerSettings),"defaultTextMarkerSettings"in e&&this.NL(e.defaultTextMarkerSettings),"defaultMinorGridSettings"in e&&this.gA(e.defaultMinorGridSettings),"defaultYAxisSettings"in e&&(this.zG=e.defaultYAxisSettings),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings),this.Kg(i,e),this.yv(e.dataArea),this.cq(e.defaultSeriesType),this.cc(e.palette),this.Nf(e.markerPalette),this.ve(e.hatchFillPalette),this.Gm().label(e.noDataLabel),this.background(e.background),"title"in e&&this.title().ga(!!i,e.title),this.eg(e.legend);var n,s,a=e.priceIndicators;if(t.A(a))for(n=0;n<a.length;n++)(s=a[n])&&this.Q4(n,s);if(this.pa.D&&this.Nk(e.annotations),"crosshair"in e&&this.mh(e.crosshair),this.im(e.xGrids,this.lm),this.im(e.yGrids,this.nm),this.im(e.xMinorGrids,this.Qr),this.im(e.yMinorGrids,this.Tr),a=e.series,t.A(a))for(n=0;n<a.length;n++){var o=((s=a[n]).seriesType||this.cq()).toLowerCase();(o=this.Ae(o,s.data))&&(o.N(s),t.C(s)&&"yScale"in s&&1<s.yScale&&o.bb(this.ax[s.yScale]))}},t.g.KE=function(e){var i,n,s=t.Sl(this.vf("scales"));if(e&&e.scales){for(n=0;n<s.length;n++)e.scales[n]&&t.ra(s[n],e.scales[n]);e.scales.length>s.length&&(s=t.Ga(s,t.Ja(e.scales,s.length)))}var o={};if(t.A(s))for(i=0;i<s.length;i++){var r=s[i];t.z(r)&&(r={type:r}),(n=a(r.type,!1)).N(r),o[i]=n}else if(t.C(s))for(i in s)s.hasOwnProperty(i)&&(r=s[i],t.z(r)&&(r={type:r}),(n=a(r.type,!1)).N(r),o[i]=n);r=t.Sl(this.vf("yScale")),e&&t.p(e.yScale)&&("object"==t.ka(e.yScale)&&"object"==t.ka(r)?t.ra(r,e.yScale):r=e.yScale),t.ea(r)?n=o[r]:t.z(r)?(n=a(r,!0))||(n=o[r]):t.C(r)?(n=a(r.type,!1)).N(r):n=null,n&&this.bb(n),this.ax=o},t.g.Kg=function(t,e){this.KE(e),this.$h(),this.im((e||this.oa).yAxes,this.ij)},t.g.im=function(e,i,n){if(t.A(e))for(var s=0;s<e.length;s++){var a=e[s],o=i.call(this,s);t.Jc(a)||(n?o.N(a):o.Ga(a),0<(a=t.C(a)&&"scale"in a?a.scale:o.vf("scale"))&&o.scale(this.ax[a]))}},t.H(Ya,t.ag),t.g=Ya.prototype,t.g.Uba=function(){var e=this.b.pa,i=!e.jN()&&!!e.gd().g("allowPlotDrag")&&ko(e,"selectedrangechangestart","plot-drag");return i&&(e.ec=!0,Ao(e),t.uf(window.document.body,"cursor","ew-resize")),i},t.g.Tba=function(){t.p(this.Qj)&&(t.ll.cancelAnimationFrame(this.Qj),this.rs(0));var e=this.b.pa;e.ec=!1,t.uf(window.document.body,"cursor",""),ko(e,"selectedrangechangefinish","plot-drag"),Eo(e)},t.g.zda=function(t){return!!Ro(this.b.pa,t.left/this.b.hh.width,this.i)},t.g.sE=function(){this.b.pa.sE(this.i)},t.g.ar=function(){this.i=this.b.pa.cH(),this.deltaY=this.deltaX=0},t.g.ls=function(e){this.ea=e/this.b.hh.width,this.ba=this.i,t.p(this.Qj)||(this.Qj=t.ll.requestAnimationFrame(this.rs))},t.g.VA=function(t){var e=this.b.hh.width;return jo(this.b.pa,t/e,this.i)*e},t.g.xw=function(){return 0};var Jl=_a.prototype;Jl.crosshair=Jl.mh,Jl.background=Jl.background,Jl.title=Jl.title,Jl.legend=Jl.eg,Jl.area=Jl.zC,Jl.candlestick=Jl.hS,Jl.column=Jl.KC,Jl.jumpLine=Jl.KV,Jl.stick=Jl.FJ,Jl.line=Jl.line,Jl.marker=Jl.Br,Jl.ohlc=Jl.IW,Jl.rangeArea=Jl.kX,Jl.rangeColumn=Jl.lX,Jl.rangeSplineArea=Jl.mX,Jl.rangeStepArea=Jl.nX,Jl.spline=Jl.fY,Jl.splineArea=Jl.gY,Jl.stepArea=Jl.pY,Jl.stepLine=Jl.qY,Jl.hilo=Jl.cV,Jl.getSeries=Jl.ef,Jl.yScale=Jl.bb,Jl.yAxis=Jl.ij,Jl.xAxis=Jl.$h,Jl.xGrid=Jl.lm,Jl.yGrid=Jl.nm,Jl.xMinorGrid=Jl.Qr,Jl.yMinorGrid=Jl.Tr,Jl.defaultSeriesType=Jl.cq,Jl.addSeries=Jl.kl,Jl.getSeriesAt=Jl.Ai,Jl.getSeriesCount=Jl.tj,Jl.removeSeries=Jl.Ao,Jl.removeSeriesAt=Jl.Rn,Jl.removeAllSeries=Jl.Dp,Jl.palette=Jl.cc,Jl.markerPalette=Jl.Nf,Jl.hatchFillPalette=Jl.ve,Jl.annotations=Jl.Nk,Jl.eventMarkers=Jl.qj,Jl.priceIndicator=Jl.Q4,Jl.lineMarker=Jl.Ym,Jl.rangeMarker=Jl.gn,Jl.textMarker=Jl.mn,Jl.noData=Jl.Gm,Jl.getStat=Jl.Rg,Jl.dataArea=Jl.yv,Jl.moveUp=Jl.i4,Jl.moveDown=Jl.h4,Jl.toggleExpandedState=Jl.L6,Jl.isExpanded=Jl.aI,t.H(Ka,Rt),t.g=Ka.prototype,t.g.Mz=function(e,i){if(null===e.Ob||4&e.Cb)throw Error("Wrong config for scroller series");t.qd(this.i),t.qd(this.o),this.i=new t.PG[e.Fb](this),this.o=new(2==e.Kb?t.WA:t.XA)(this,e.Ob,!!(524288&e.Cb),"secondaryShapes",e.Jb),Ka.u.Mz.call(this,e,i)},t.g.g5=function(){N(this.gH().b,this.la,!1)},t.g.LM=function(){return null},t.g.KM=function(){return null},t.g.gH=function(){return this.ya.xc()},t.g.cg=function(){return F(this.la,!0,!0)},t.g.rr=function(){return t.gm},t.g.remove=function(){this.b&&this.b.remove(),Ka.u.remove.call(this)},t.g.Gd=function(){Ka.u.Gd.call(this),this.i.Gd(this.o)},t.g.wn=function(t,e){Ka.u.wn.call(this,t,e),this.i.wn(t,e)},t.g.Rl=function(){Ka.u.Rl.call(this),this.i.Rl()},t.g.cX=function(){Ka.u.cX.call(this),this.b||(this.b=t.ok()),this.b.zIndex(this.zIndex()),this.b.parent(this.ea),this.J(1024)&&this.o.uv(),t.RA(this.o,this.b)},t.g.xC=function(){var t=this.zIndex();this.Aa.zIndex(t),this.b.zIndex(t)},t.g.R=function(){this.remove(),t.sd(this.i,this.o),this.o=this.i=null,Ka.u.R.call(this)},Xa.prototype.N=function(e){this.yb=[],this.f=[],(0,t.Pe)(e,(function(e){t.ea(e)?this.f.push(e):t.C(e)&&(e.yta?this.yb:this.f).push(t.N(e.value))}),this),this.b=t.Ga(this.yb,this.f),t.Ka(this.b),t.Pa(this.b)},Xa.prototype.reset=function(){this.i=-1},Xa.prototype.advance=function(){return this.i++,this.current=this.b[this.i],this.o=t.Aa(this.f,this.current),this.K=t.Aa(this.yb,this.current),!!this.current},Xa.prototype.ea=function(){return this.b.slice()},Ja.prototype.N=function(t,e,i,n,s){this.start=t,this.P=s,this.end=e,this.D=i,this.G=n,this.ba=this.aa=null,this.reset()},Ja.prototype.reset=function(){var e=t.So(this.start,this.D,this.P),i=t.So(this.start,this.G,this.P);for(this.b=new t.On(new Date(e)),this.f=window.NaN,this.b.getTime()<this.start&&(this.f=this.b.getTime(),this.f>this.end&&(this.f=window.NaN),this.b.add(this.D)),this.i=new t.On(new Date(i));this.i.getTime()<this.start;)this.i.add(this.G)},Ja.prototype.advance=function(){var t=this.b.getTime(),e=this.i.getTime();return this.current=Math.min(t,e),this.o=t==this.current,this.K=e==this.current,(t=this.current<=this.end)&&(this.o&&this.b.add(this.D),this.K&&this.i.add(this.G)),t},Ja.prototype.ea=function(t){if(t){if(this.aa)return this.aa}else if(this.ba)return this.ba;var e=[];for(this.reset();this.advance();)(t&&this.o||!t&&this.K)&&e.push(this.current);return t?this.aa=e:this.ba=e,e},t.H(Za,t.V),t.g=Za.prototype,t.g.ra=784,t.g.Ma=function(){return"stock-scatter-date-time"},t.g.an=function(e){return t.p(e)?(e=t.P(e,1e3,!1),this.cl!=e&&(this.cl=e,this.Kc=!1,this.va(512)),this):this.cl},t.g.fla=function(e){return t.p(e)?(e=t.P(e,this.K,!1),this.K!=e&&(this.K=e,this.Kc=!1,this.va(512)),this):this.K},t.g.Qs=function(e){return t.p(e)&&(e=Qa(this,e),!t.Pc(this.Ba,e))?(this.Ba=e,this.va(16),this):this.Ba},t.g.Os=function(e){return t.p(e)&&(e=Qa(this,e),!t.Pc(this.na,e))?(this.na=e,this.va(16),this):this.na},t.g.Y1=function(){return this.ea},t.g.X1=function(){return this.ba},t.g.jU=function(){return this.On},t.g.iU=function(){return this.xp},t.g.zk=function(e){return(0,window.isNaN)(t.Xk(e))},t.g.transform=function(t){return this.Kr(t,window.NaN)},t.g.Mc=function(t){return Math.round(t*(this.xp-this.On)+this.On)},t.g.Px=function(){return!1},t.g.Fn=function(){return this.pb(),this.f?this.o:this.P},t.g.pb=function(){if(!this.Kc){if(this.u1(),this.xp<=this.i||this.On>=this.aa)var e=this.On,i=this.xp;else e=t.Za(this.On,this.i,this.aa),i=t.Za(this.xp,this.i,this.aa);var n=.25*(this.Cw-this.Ps+1),s=[];t.Dc(this.Xm,(function(t){t.count>n&&s.push(t)}));var a=(0,t.Gg)(s,(function(e,i){var n=t.tp(e.Dg,1),s=t.tp(i.Dg,1);if(n>=s){var a=e,o=i,r=n;n=s}else a=i,o=e,r=s;return 60<r/n?a:o}),s[0]);if(a){var o=a.xe,r=t.tp(a.Dg,1);t.Dc(this.Xm,(function(t){t!=a&&(o+=t.count*r)}))}else o=Math.abs(i-e);for(var l,h=Math.abs(o)/this.K,c=this.jd.length-1,u=0;u<c;u++)if(h<=this.jd[u].xe){l=this.jd[u];break}l||(l=this.jd[c]),this.f?(e={fullMin:this.i,fullMax:this.aa,min:e,max:i,ticksCount:this.K,scale:this},e=this.f.call(e,e),this.o.N(e)):this.P.N(e,i,t.Vo(l.tI,l.sI),t.Vo(l.JI,l.II),this.i),this.Aha=l.tI,this.zha=l.sI,this.Yha=l.JI,this.Xha=l.II,this.Kc=!0}},t.g.u1=function(){this.P||(this.P=new Ja),!this.o&&this.f&&(this.o=new Xa)},t.g.Kr=function(e){return(t.Xk(e)-this.On)/(this.xp-this.On)},t.g.NP=function(t){return this.transform(t)},t.g.li=function(e){t.X(e,2)&&(this.Kc=!1,this.va(512))},t.g.Xa=function(e){if(t.p(e)){if(t.D(e))this.f=e,this.Kc=!1,this.va(512);else{e=function(e){var i=[];if(t.A(e)){for(var n=0;n<e.length;n++){var s=e[n];if(t.C(s)){var a=io(s.minor);s=io(s.major),a&&s&&i.push({xe:t.tp(a[0],a[1]),JI:a[0],II:a[1],tI:s[0],sI:s[1]})}}i.sort((function(t,e){return t.xe-e.xe}))}return i}(e);for(var i=e.length,n=i&&i==this.jd.length,s=0;n&&s<i;s++){n=e[s];var a=this.jd[s];n=n.xe==a.xe&&n.JI==a.JI&&n.II==a.II&&n.tI==a.tI&&n.sI==a.sI}n||(this.jd=e,this.f=null,this.Kc=!1,this.va(512))}return this}return this.f?this.f:(0,t.Wa)(this.jd,(function(t){return{minor:{unit:t.JI,count:t.II},major:{unit:t.tI,count:t.sI}}}))},t.g.zi=function(t){return this.b.zi(t)},t.g.Uf=function(t){return this.b.Uf(t)};var Zl=[{minor:{unit:"millisecond",count:1},major:{unit:"millisecond",count:5}},{minor:{unit:"millisecond",count:5},major:{unit:"millisecond",count:20}},{minor:{unit:"millisecond",count:20},major:{unit:"millisecond",count:100}},{minor:{unit:"millisecond",count:100},major:{unit:"millisecond",count:500}},{minor:{unit:"millisecond",count:500},major:{unit:"second",count:2}},{minor:{unit:"second",count:2},major:{unit:"second",count:10}},{minor:{unit:"second",count:10},major:{unit:"second",count:30}},{minor:{unit:"second",count:30},major:{unit:"minute",count:2}},{minor:{unit:"minute",count:2},major:{unit:"minute",count:10}},{minor:{unit:"minute",count:10},major:{unit:"minute",count:30}},{minor:{unit:"minute",count:30},major:{unit:"hour",count:1}},{minor:{unit:"hour",count:1},major:{unit:"hour",count:3}},{minor:{unit:"hour",count:3},major:{unit:"hour",count:12}},{minor:{unit:"hour",count:12},major:{unit:"day",count:1}},{minor:{unit:"day",count:1},major:{unit:"week",count:1}},{minor:{unit:"day",count:2},major:{unit:"week",count:1}},{minor:{unit:"week",count:1},major:{unit:"month",count:1}},{minor:{unit:"month",count:1},major:{unit:"quarter",count:1}},{minor:{unit:"quarter",count:1},major:{unit:"semester",count:1}},{minor:{unit:"semester",count:1},major:{unit:"year",count:1}},{minor:{unit:"year",count:1},major:{unit:"year",count:2}},{minor:{unit:"year",count:2},major:{unit:"year",count:4}},{minor:{unit:"year",count:3},major:{unit:"year",count:6}},{minor:{unit:"year",count:4},major:{unit:"year",count:8}},{minor:{unit:"year",count:5},major:{unit:"year",count:10}},{minor:{unit:"year",count:6},major:{unit:"year",count:12}},{minor:{unit:"year",count:7},major:{unit:"year",count:14}},{minor:{unit:"year",count:8},major:{unit:"year",count:16}},{minor:{unit:"year",count:9},major:{unit:"year",count:18}},{minor:{unit:"year",count:10},major:{unit:"year",count:20}},{minor:{unit:"year",count:20},major:{unit:"year",count:40}},{minor:{unit:"year",count:25},major:{unit:"year",count:100}},{minor:{unit:"year",count:100},major:{unit:"year",count:500}}],Ql=Za.prototype;Ql.ticks=Ql.Xa,Ql.ticksCount=Ql.fla,Ql.getFullMinimum=Ql.Y1,Ql.getFullMaximum=Ql.X1,Ql.getMinimum=Ql.jU,Ql.getMaximum=Ql.iU,Ql.transform=Ql.transform,Ql.inverseTransform=Ql.Mc,Ql.minimumGap=Ql.Qs,Ql.maximumGap=Ql.Os,t.H(no,Ja),no.prototype.reset=function(){var e=t.So(this.start,this.D,this.P),i=t.So(this.start,this.G,this.P);for(this.b=new t.On(new Date(e)),this.f=window.NaN,this.b.getTime()<this.start&&(this.f=so(this,this.b,this.D),this.f>this.end&&(this.f=window.NaN)),this.i=new t.On(new Date(i));this.i.getTime()<this.start;)this.i.add(this.G)},no.prototype.advance=function(){var t=this.b.getTime(),e=so(this,this.i,this.G);return this.current=e,this.o=t<=e,(t=this.current<=this.end)&&this.o&&so(this,this.b,this.D),t},t.H(ao,Za),t.g=ao.prototype,t.g.Ma=function(){return"stock-ordinal-date-time"},t.g.transform=function(e){return this.Kr(e,this.b.Uf(t.Xk(e)))},t.g.Mc=function(t){return Math.round(this.b.zi(t*(this.Cw-this.Ps)+this.Ps))},t.g.Kr=function(t,e){return(e-this.Ps)/(this.Cw-this.Ps)},t.g.NP=function(e){return this.Kr(e,Math.ceil(this.b.Uf(t.Xk(e))))},t.g.u1=function(){this.P||(this.P=new no(this)),!this.o&&this.f&&(this.o=new Xa)};var th=ao.prototype;th.transform=th.transform,th.inverseTransform=th.Mc,t.H(oo,t.GB),t.g=oo.prototype,t.g.ra=4|t.GB.prototype.ra,t.g.sa=1536|t.GB.prototype.sa,t.g.r6=function(){return!1},t.g.fj={area:{Fb:1,Kb:1,Lb:[qo,Wo,Yo],Ob:[dr,pr,gr],Jb:null,Cb:0,Ab:"value",zb:"zero"},candlestick:{Fb:5,Kb:1,Lb:[Jo,Zo,Qo,tr],Ob:[vr,Sr,xr,Cr],Jb:null,Cb:0,Ab:"high",zb:"low"},column:{Fb:6,Kb:1,Lb:[ur,Yo,Xo,Ko,Jo,Zo,Qo,tr],Ob:[kr,gr,mr,fr,vr,Sr,xr,Cr],Jb:null,Cb:0,Ab:"value",zb:"zero"},"jump-line":{Fb:19,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,wr,br,yr],Jb:null,Cb:0,Ab:"value",zb:"value"},hilo:{Fb:31,Kb:2,Lb:[t.oH,t.MH,t.QH],Ob:[pr,Dr,Tr],Jb:null,Cb:0,Ab:"high",zb:"low"},stick:{Fb:20,Kb:2,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,wr,br,yr],Jb:null,Cb:0,Ab:"value",zb:"zero"},line:{Fb:8,Kb:1,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,wr,br,yr],Jb:null,Cb:0,Ab:"value",zb:"value"},marker:{Fb:9,Kb:1,Lb:[ur,Yo,Zo,tr,Ko,Jo,Qo,Xo],Ob:[kr,gr,Sr,Cr,fr,vr,xr,mr],Jb:null,Cb:0,Ab:"value",zb:"value"},ohlc:{Fb:10,Kb:1,Lb:[{name:"rising",Qb:"path",Yb:null,Zb:"risingStroke",ac:!1,Ib:!1,zIndex:0},{name:"falling",Qb:"path",Yb:null,Zb:"fallingStroke",ac:!1,Ib:!1,zIndex:0}],Ob:[br,wr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-area":{Fb:11,Kb:1,Lb:[qo,cr,hr,Yo,er,ir,ar,or],Ob:[dr,Dr,Tr,gr,nr,sr,rr,lr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-column":{Fb:12,Kb:1,Lb:[ur,Yo,{name:"high",Qb:"path",Yb:"highFill",Zb:"highStroke",ac:!1,Ib:!1,zIndex:0},{name:"low",Qb:"path",Yb:"lowFill",Zb:"lowStroke",ac:!1,Ib:!1,zIndex:0},ar,or],Ob:[kr,gr,{name:"high",Qb:"path",Yb:"highFill",Zb:"highStroke",ac:!1,Ib:!1,zIndex:0},{name:"low",Qb:"path",Yb:"lowFill",Zb:"lowStroke",ac:!1,Ik:!0,Ib:!1,zIndex:0},rr,lr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-spline-area":{Fb:13,Kb:1,Lb:[qo,cr,hr,Yo,er,ir,ar,or],Ob:[dr,Dr,Tr,gr,nr,sr,rr,lr],Jb:null,Cb:0,Ab:"high",zb:"low"},"range-step-area":{Fb:14,Kb:1,Lb:[qo,hr,cr,Yo],Ob:[dr,Tr,Dr,gr],Jb:null,Cb:0,Ab:"high",zb:"low"},spline:{Fb:15,Kb:1,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,wr,br,yr],Jb:null,Cb:0,Ab:"value",zb:"value"},"spline-area":{Fb:16,Kb:1,Lb:[qo,Wo,Yo],Ob:[dr,pr,gr],Jb:null,Cb:0,Ab:"value",zb:"zero"},"step-area":{Fb:17,Kb:1,Lb:[qo,Wo,Yo],Ob:[dr,pr,gr],Jb:null,Cb:0,Ab:"value",zb:"zero"},"step-line":{Fb:18,Kb:1,Lb:[t.oH,t.GH,t.BH,t.pH],Ob:[pr,wr,br,yr],Jb:null,Cb:0,Ab:"value",zb:"value"}},t.g.cq=function(i){return t.p(i)?(this.US=i=e(i),this):this.US},t.g.zC=function(t,e,i){return this.Ae("area",t,e,i)},t.g.hS=function(t,e,i){return this.Ae("candlestick",t,e,i)},t.g.KC=function(t,e,i){return this.Ae("column",t,e,i)},t.g.KV=function(t,e,i){return this.Ae("jump-line",t,e,i)},t.g.cV=function(t,e,i){return this.Ae("hilo",t,e,i)},t.g.FJ=function(t,e,i){return this.Ae("stick",t,e,i)},t.g.line=function(t,e,i){return this.Ae("line",t,e,i)},t.g.Br=function(t,e,i){return this.Ae("marker",t,e,i)},t.g.IW=function(t,e,i){return this.Ae("ohlc",t,e,i)},t.g.kX=function(t,e,i){return this.Ae("range-area",t,e,i)},t.g.lX=function(t,e,i){return this.Ae("range-column",t,e,i)},t.g.mX=function(t,e,i){return this.Ae("range-spline-area",t,e,i)},t.g.nX=function(t,e,i){return this.Ae("range-step-area",t,e,i)},t.g.fY=function(t,e,i){return this.Ae("spline",t,e,i)},t.g.gY=function(t,e,i){return this.Ae("spline-area",t,e,i)},t.g.pY=function(t,e,i){return this.Ae("step-area",t,e,i)},t.g.qY=function(t,e,i){return this.Ae("step-line",t,e,i)},t.g.kl=function(t){var e=[],i=this.cq(),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.Ae(i,arguments[s]));else e.push(this.Ae(i,null));return this.da(!0),e},t.g.ty=function(e){return t.xa(this.Sa,(function(t){return t.id()==e}))},t.g.ef=function(t){return this.Ai(this.ty(t))},t.g.Ai=function(t){return this.Sa[t]||null},t.g.tj=function(){return this.Sa.length},t.g.Ao=function(t){return this.Rn(this.ty(t))},t.g.Rn=function(e){var i=this.Sa[e];return i&&(t.Pp++,t.Ca(this.Sa,e,1),t.qd(i),this.B(512,1),t.Sp()),this},t.g.Dp=function(){if(this.Sa.length){var e=this.Sa;t.Pp++,this.Sa=[],t.sd(e),this.B(512,1),t.Sp()}return this},t.g.Ue=function(){return this.Sa},t.g.ms=function(e){return this.Ti||(this.Ti=new t.Kz,this.Ti.Ga("chart.defaultSeriesSettings","stock.scroller.defaultSeriesSettings")),t.p(e)?(this.Ti.oa=e,this):this.Ti},t.g.Vv=function(i){i=e(i);var n=this.fj[i];return n&&n.Fb in t.PG?i=[i,n]:(t.il(4,null,[i+" series"]),i=null),i},t.g.pb=t.ia,t.g.Jv=t.ia,t.g.zM=function(t){return t.check(32768)?31:30},t.g.Ae=function(e,i,n,s){var a=this.Vv(e);return a?(e=new Ka(this,e,a[1]),a=(a=this.Sa[this.Sa.length-1])?a.yh()+1:0,this.Sa.push(e),e.yh(a),e.data(i||null,n,s),t.fB(e),e.clip(!0),t.iB(e,.9),e.Kq(this.cc().nc(a)),e.dx(this.ve().nc(a)),e.kb(this),t.K(e,this.nJ,this),this.B(512,1)):e=null,e},t.g.nJ=function(e){var i=1;t.X(e,4)&&(i|=4),this.B(512,i)},t.g.rB=function(){for(var t=0;t<this.Sa.length;t++){var e=this.Sa[t];e&&e.yE()}},t.g.ow=function(){for(var t=0;t<this.Sa.length;t++)this.Sa[t].B(2116)},Ma(oo),t.g=oo.prototype,t.g.xc=function(){return this.pa},t.g.ob=function(){return this.fa},t.g.dg=function(){return this.ob()},t.g.Ra=function(e){return t.p(e)?(this.eb=e,ro(this),this):(this.eb||(this.eb=new ao(this)),this.eb)},t.g.VP=function(){oo.u.VP.call(this),ro(this)},t.g.EM=function(){return this.pa.b.ba.FI},t.g.Wm=function(){return this.pa.KK()},t.g.xa=function(){return!1},t.g.bb=function(e){if(t.p(e)){if(e=t.jt(this.Fc,e,null,3,["Scroller Y scale","scatter","linear, log"],this.Yu,this)){var i=this.Fc==e;if(this.Fc=e,this.Fc.da(i),!i){for(e=0;e<this.Sa.length;e++)(i=this.Sa[e])&&i.enabled()&&i.bb()==this.Fc&&(i.B(1024),this.B(512));this.va(1)}}return this}return this.Fc||(this.Fc=t.ft(),t.K(this.Fc,this.Yu,this)),this.Fc},t.g.Yu=function(e){for(var i=0,n=0;n<this.Sa.length;n++){var s=this.Sa[n];s&&s.enabled()&&s.bb()==this.Fc&&(i|=s.B(1024))}i&&(i=1,t.X(e,4)&&(i|=4),this.B(512,i))},t.g.$h=function(e){return this.mc||(this.mc=new tt(this,!0),this.mc.kb(this),this.mc.zIndex(52),t.W(this,"xAxis",this.mc),t.K(this.mc,this.RY,this),this.B(1024,1)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.RY=function(){this.B(1024,1)},t.g.uy=function(){return this.mc},t.g.wy=function(){return null},t.g.W=function(){if(oo.u.W.call(this),!this.zc())return this;if(this.yB||(this.yB=this.Aa.Bd(),this.yB.zIndex(1),this.yB.clip(this.dO),this.wB=this.Aa.Bd(),this.wB.Dd(!0),this.wB.zIndex(51),this.wB.clip(this.vB)),this.J(512)){for(var e=0;e<this.Sa.length;e++){var i=this.Sa[e];if(i){i.ka(),i.ja(this.fa),i.O(this.yB);var n=i,s=this.wB;t.p(s)&&n.ea!=s&&(n.ea=s,n.B(2,1)),i.Kq(this.cc().nc(e)),i.dx(this.ve().nc(e)),i.W(),i.da(!1)}}this.rB(),this.I(512)}return this.J(1024)&&(this.mc&&(this.mc.ka(),this.mc.scale(this.Ra()),this.mc.O(this.Aa),this.mc.ja(this.fa),this.mc.height(this.fa.height),this.mc.W(),this.mc.da(!1)),this.I(1024)),this},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(this.ow(),t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(512,1)}},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.Pf,this)),t.p(e)?(this.fd.N(e),this.ow(),this.B(512,1),this):this.fd},t.g.Pf=function(e){t.X(e,2)&&this.B(512,1)},t.g.zi=function(t){var e=this.pa.b;return q(e),e.Ba.zi(t)},t.g.Uf=function(t){var e=this.pa.b;return q(e),e.Ba.Uf(t)},t.g.N3=function(t,e,i,n){return{type:t,startRatio:e,endRatio:i,startKey:this.Ra().Mc(e),endKey:this.Ra().Mc(i),source:n}},t.g.R=function(){t.sd(this.Fa,this.fd,this.yB,this.wB,this.mc,this.eb,this.Fc,this.Sa,this.ID,this.Ti),this.Ti=this.Fc=this.eb=this.mc=this.wB=this.yB=this.fd=this.Fa=null,this.Sa.length=0,this.ID.length=0,delete this.pa,oo.u.R.call(this)},t.g.F=function(){var t=oo.u.F.call(this);return t.defaultSeriesType=this.cq(),t.palette=this.cc().F(),t.hatchFillPalette=this.ve().F(),t},t.g.U=function(e,i){oo.u.U.call(this,e,i),this.Kg(!1,e),"xAxis"in e&&this.$h(e.xAxis),this.cc(e.palette),this.ve(e.hatchFillPalette),this.cq(e.defaultSeriesType),"defaultSeriesSettings"in e&&this.ms(e.defaultSeriesSettings);var n=e.series;if(t.A(n))for(var s=0;s<n.length;s++){var a=n[s],o=(a.seriesType||this.cq()).toLowerCase();(o=this.Ae(o,a.data))&&(o.N(a),t.C(a)&&"yScale"in a&&1<a.yScale&&o.bb(this.ax[a.yScale]))}},t.g.KE=function(e){var i,n,s=t.Sl(this.vf("scales"));if(e&&e.scales){for(n=0;n<s.length;n++)e.scales[n]&&t.ra(s[n],e.scales[n]);e.scales.length>s.length&&(s=t.Ga(s,t.Ja(e.scales,s.length)))}var o={};if(t.A(s))for(i=0;i<s.length;i++){n=s[i],t.z(n)&&(n={type:n});var r=a(n.type,!1);r.N(n),o[i]=r}else if(t.C(s))for(i in s)s.hasOwnProperty(i)&&(n=s[i],t.z(n)&&(n={type:n}),(r=a(n.type,!1)).N(n),o[i]=r);n=t.Sl(this.vf("yScale")),e&&t.p(e.yScale)&&("object"==t.ka(e.yScale)&&"object"==t.ka(n)?t.ra(n,e.yScale):n=e.yScale),t.ea(n)?r=o[n]:t.z(n)?(r=a(n,!0))||(r=o[n]):t.C(n)?(r=a(n.type,!1)).N(n):r=null,r&&this.bb(r),this.ax=o},t.g.Kg=function(t,e){this.KE(e),this.$h()};var eh=oo.prototype;eh.area=eh.zC,eh.candlestick=eh.hS,eh.column=eh.KC,eh.stick=eh.FJ,eh.jumpLine=eh.KV,eh.hilo=eh.cV,eh.line=eh.line,eh.marker=eh.Br,eh.ohlc=eh.IW,eh.rangeArea=eh.kX,eh.rangeColumn=eh.lX,eh.rangeSplineArea=eh.mX,eh.rangeStepArea=eh.nX,eh.spline=eh.fY,eh.splineArea=eh.gY,eh.stepArea=eh.pY,eh.stepLine=eh.qY,eh.getSeries=eh.ef,eh.yScale=eh.bb,eh.xAxis=eh.$h,eh.defaultSeriesType=eh.cq,eh.addSeries=eh.kl,eh.getSeriesAt=eh.Ai,eh.getSeriesCount=eh.tj,eh.removeSeries=eh.Ao,eh.removeSeriesAt=eh.Rn,eh.removeAllSeries=eh.Dp,eh.palette=eh.cc,eh.hatchFillPalette=eh.ve,t.H(lo,Mt),t.H(co,t.V),t.U(co,Wr),t.Gq(co,Qr,"normal"),t.g=co.prototype,t.g.sa=64,t.g.ra=1,t.g.PC=function(){this.B(64,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.group=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;return this.pa.jf().qj().group(n,s)},t.g.data=function(e){var i=this.pa.jf().qj().group().data(e);return t.p(e)?this:i},t.g.z_=function(e){var i=e.group;if(i){var n=e.index;e=e.originalEvent,this.i==i&&this.o==n||(this.dispatchEvent(uo(this,e,!1,[{group:i,index:n}],i,n))&&ne(i.jf.qj(),i,n,t.vo,t.gm)?(this.i=i,this.o=n):(this.i=null,this.o=window.NaN)),t.Ow(i.Ua(),e.clientX,e.clientY,i.$T(n))}},t.g.Zba=function(e){var i=e.group;if(i){var n=e.index;this.dispatchEvent(uo(this,e.originalEvent,!1,[],i,n)),ne(i.jf.qj(),i,n,t.gm,t.vo),i.Ua().Lc(!0),this.i=null,this.o=window.NaN}},t.g.Yba=function(e){var i=e.group;if(i){var n=e.index;e=e.originalEvent;var s=this.b==i&&this.f==n;this.b&&this.dispatchEvent(uo(this,e,!0,[],this.b,this.f))&&ne(this.b.jf.qj(),this.b,this.f,s?t.vo:t.gm,t.wo),!s&&this.dispatchEvent(uo(this,e,!0,[{group:i,index:n}],i,n))&&ne(i.jf.qj(),i,n,t.wo)?(this.b=i,this.f=n):(this.b=null,this.f=window.NaN)}},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),t.W(this,"tooltip",this.gb)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e=co.u.F.call(this);return t.Tq(this,Wr,e),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e.tooltip=this.Ua().F(),e},t.g.U=function(e,i){var n;if(co.u.U.call(this,e,i),this.Ua().ga(!!i,e.tooltip),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected),t.Iq(this,Wr,e),t.p(n=e.groups)){var s=this.pa.jf().qj();if(t.sd(s.b),s.b.length=0,t.A(n))for(s=0;s<n.length;s++){var a=n[s];null!=a&&this.group(s,a)}}else t.p(s=e.data)&&this.data(s)},t.g.R=function(){t.sd(this.ca,this.za,this.Ea,this.gb),this.ca=this.za=this.Ea=this.pa=this.gb=null,co.u.R.call(this)};var ih=co.prototype;ih.group=ih.group,ih.data=ih.data,ih.tooltip=ih.Ua,ih.normal=ih.Qa,ih.hovered=ih.lb,ih.selected=ih.selected,t.H(po,t.ag),po.prototype.ar=function(){this.deltaY=this.deltaX=0},po.prototype.ls=function(t,e){this.hC.oc(1,0,0,1,0,e),this.LY.oc(1,0,0,1,0,e)},po.prototype.VA=function(){return 0},po.prototype.xw=function(e){var i=this.b.top+this.b.height,n=this.b.top,s=Number(this.hC.Cd("ac-top"));return e=t.Za(e,n-s,i-s),this.i=e+s,e},t.H(go,t.qf),t.g=go.prototype,t.g.wr=function(t){var e=t.target,i=e.tag;(e=new po(e,this.b[i])).b=this.G[i],e.wa("start",this.wca,!1,this),e.wa("drag",this.uea,!1,this),e.wa("end",this.vca,!1,this),this.i[i]=e,e.lk(t.kf)},t.g.wca=function(){this.dispatchEvent("dragStart")},t.g.uea=function(t){t=t.f;var e=Number(t.hC.Cd("ac-top")),i=t.b.left,n=t.b.left+t.b.width;this.f=t.i,this.P.fill(this.pa.SE().Ei().fill()).clear().moveTo(i,e).lineTo(n,e).lineTo(n,this.f).lineTo(i,this.f).close()},t.g.vca=function(t){this.P.clear(),this.dispatchEvent("dragEnd");var e=t.f;t=Number(e.hC.tag),e=e.b;var i=this.aa[t];e=(this.f-e.top+i)/(e.height+i+this.K[t]),i=(t=this.D[t]).V6.g("weight"),i+=t.K3.g("weight"),i-=e*=i,this.pa.Oz(!1),t.V6.weight(e),t.K3.weight(i),this.pa.Oz(!0)},t.g.reset=function(){for(var t=this.Ad=0;t<this.o.length;t++){var e=this.o[t];e.clear(),e.oc(1,0,0,1,0,0),(e=this.b[t]).clear(),e.oc(1,0,0,1,0,0)}},t.g.add=function(){var e=this.o[this.Ad],i=this.b[this.Ad];return e||((i=this.Jc.path()).zIndex(0),this.b.push(i),(e=this.Jc.path()).zIndex(1),e.stroke(t.bm,10),e.cursor("ns-resize"),this.o.push(e),e.tag=this.Ad,e.Ce("mousedown",this.wr,!1,this),e.wa("mousemove",this.Ika,!1,this),e.wa("mouseout",this.Jka,!1,this)),this.Ad++,i.stroke(this.pa.SE().Qa().stroke()),{hC:e,LY:i}},t.g.Ika=function(t){this.b[Number(t.target.tag)].stroke(this.pa.SE().lb().stroke())},t.g.Jka=function(t){this.b[Number(t.target.tag)].stroke(this.pa.SE().Qa().stroke())},t.g.R=function(){this.Jc=null,t.sd(this.o,this.i,this.b),this.o.length=0,this.b.length=0,this.i.length=0,this.D=null,go.u.R.call(this)},t.H(fo,t.V),fo.prototype.sync=function(){if(this.o.reset(),!this.ya.g("plotsManualBounds")&&!this.b){var e,i=wo(this.ya),n=!1;for(e=0;e<i.length;e++){var s=i[e];if(s.aI()){n=!0;break}}if(!n&&this.ya.SE().enabled()){for(e=0;e<i.length;e++)if(s=i[e],!Va(s)){n=s.ob();var a=Co(this.ya,s),o=a.ob(),r=this.o.add();r.hC.moveTo(n.left,n.top).lineTo(n.left+n.width,n.top).Cd("ac-top",n.top),r.LY.moveTo(n.left,n.top+.5).lineTo(n.left+n.width,n.top+.5),(r=this.o).D[r.Ad-1]={V6:a,K3:s},r=s.dg(),s=a.dg(),s=o.height-s.height+20,a=n.height-r.height+20,o&&n?(o=new t.I(o.left,o.top,o.width,o.height),t.pb(o,n)):o=null,o.top+=s,o.height-=s+a,r=(n=this.o).Ad-1;var l=n.i[r];l?l.b=o:n.G[r]=o,n.aa[r]=s,n.K[r]=a}for(e=(i=this.o).Ad;e<i.o.length;e++)i.o[e].clear(),i.b[e].clear()}}},fo.prototype.R=function(){this.ya=null,t.sd(this.wb,this.o),this.o=this.wb=null,fo.u.R.call(this)},t.H(mo,t.V);var nh={};t.sq(nh,[[1,"fill",t.Qq]]),t.U(mo,nh),mo.prototype.U=function(e,i){mo.u.U.call(this,e,i),t.Iq(this,nh,e,i)},mo.prototype.F=function(){var e=mo.u.F.call(this);return t.Tq(this,nh,e,void 0,void 0,!0),e},t.H(vo,t.V);var sh={};t.sq(sh,[[1,"stroke",t.Pq]]),t.U(vo,sh),vo.prototype.U=function(e,i){vo.u.U.call(this,e,i),t.Iq(this,sh,e,i)},vo.prototype.F=function(){var e=vo.u.F.call(this);return t.Tq(this,sh,e,void 0,void 0,!0),e},t.H(bo,t.V),bo.prototype.ra=1;var ah={};t.sq(ah,[[1,"stroke",t.Pq]]),t.U(bo,ah),bo.prototype.U=function(e,i){bo.u.U.call(this,e,i),t.Iq(this,ah,e,i)},bo.prototype.F=function(){var e=bo.u.F.call(this);return t.Tq(this,ah,e,void 0,void 0,!0),e},t.H(yo,t.V),t.Gq(yo,["stroke"],"normal"),yo.prototype.ra=1;var oh={};t.sq(oh,[[0,"enabled",t.Dq]]),t.U(yo,oh),t.g=yo.prototype,t.g.Ei=function(e){return this.fi||(this.fi=new mo,t.K(this.fi,this.e5,this),t.W(this,"preview",this.fi)),t.p(e)?(this.fi.N(e),this):this.fi},t.g.e5=function(){this.va(1)},t.g.Qa=function(e){return this.ca||(this.ca=new bo,this.ca.Ga(this.oa),t.W(this,"normal",this.ca),t.K(this.ca,this.e5,this)),t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return this.za||(this.za=new vo,t.W(this,"hovered",this.za)),t.p(e)?(this.za.N(e),this):this.za},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t,e){var i=this.Zd(e);return!!i&&(t?this.oa.enabled=i.enabled:this.enabled(i.enabled),!0)},t.g.U=function(e,i){yo.u.U.call(this,e,i),t.Iq(this,oh,e,i),"normal"in e&&this.Qa().ga(!!i,e.normal),"hovered"in e&&this.lb().ga(!!i,e.hovered),"preview"in e&&this.Ei().ga(!!i,e.normal)},t.g.F=function(){var e=yo.u.F.call(this);return t.Tq(this,oh,e,void 0,void 0,!0),this.ca&&(e.normal=this.ca.F()),this.za&&(e.hovered=this.za.F()),this.fi&&(e.preview=this.fi.F()),e},t.g.R=function(){t.sd(this.ca,this.za,this.fi),this.fi=this.za=this.ca=null,yo.u.R.call(this)};var rh=yo.prototype;rh.normal=rh.Qa,rh.hovered=rh.lb,rh.preview=rh.Ei,t.H(So,t.ux),So.prototype.ra=t.ux.prototype.ra,So.prototype.sa=258048|t.ux.prototype.sa;var lh={area:!1,candlestick:null,column:null,"jump-line":!0,stick:!0,line:!1,marker:null,ohlc:null,"range-area":!1,"range-column":null,"range-spline-area":!1,"range-step-area":!1,spline:!1,"spline-area":!1,"step-area":!1,"step-line":!1,hilo:!0};t.g=So.prototype,t.g.DP=function(){return!1},t.g.Ma=function(){return"stock"},t.g.Ue=function(){for(var t=[],e=0;e<this.f.length;e++){var i=this.f[e];i&&t.push.apply(t,i.Ue())}return t},t.g.Vv=function(i){i=e(i);var n=this.fj[i];return n&&n.Fb in t.PG?i=[i,n]:(t.il(4,null,[i+" series"]),i=null),i},t.g.xa=function(){return!1},t.g.pb=t.ia,t.g.eg=function(e){return t.il(51),t.p(e)?this:null},t.g.jf=function(e,i){return xo(this,e,i,!t.p(i))},t.g.tC=function(e){return this.i||(this.i=new oo(this),this.i.kb(this),t.W(this,"scroller",this.i),this.i.Kg(!0),t.K(this.i,this.Qba,this),this.wc.wa(this.i,"scrollerchangestart",this.pka),this.wc.wa(this.i,"scrollerchange",this.oka),this.wc.wa(this.i,"scrollerchangefinish",this.nka),this.B(8196,1)),t.p(e)?(this.i.N(e),this):this.i},t.g.G5=function(e,i,n,s){var a=this.b.D,o=window.NaN,r=t.zk(t.FE,e,t.p(null)?null:"max");if("points"==r){e=Math.max(+i||0,10);var l=t.fl(n);if(r=-1,"last-visible-date"==l){a=this.b;var h=X(this.b);q(a),a=a.f.Uf(h)}else"first-visible-date"==l?(a=this.b,r=K(this.b),q(a),a=a.f.Uf(r),r=1):"first-date"==l?(a=this.b.f.b.length?0:window.NaN,r=1):a=w(this.b.f);e=a+r*(e-1)+r/2,h=this.b,a-=r/2,q(h),a=h.f.zi(a),r=this.b,e=t.Za(e,this.b.f.b.length?0:window.NaN,w(this.b.f)),q(r),o=r.f.zi(e)}else if(r&&"unit"!=r)switch(l=new Date(a),r){case"ytd":o=Date.UTC(l.getUTCFullYear(),0);break;case"qtd":o=Date.UTC(l.getUTCFullYear(),3*Math.floor((l.getUTCMonth()+3)/3)-3,1);break;case"mtd":o=Date.UTC(l.getUTCFullYear(),l.getUTCMonth());break;case"max":o=this.b.o}else if(o=t.Zk(e,null)){e=i||1,r=-1,"last-visible-date"==(l=t.fl(n))?a=X(this.b):"first-visible-date"==l?(a=K(this.b),r=1):"first-date"==l&&(a=this.b.o,r=1),l=new Date(a);var c=new Date(a);if("year"==o)c.setUTCFullYear(l.getUTCFullYear()+r*e),o=c.getTime();else if("semester"==o||"quarter"==o||"month"==o){switch(o){case"semester":h=6*e;break;case"quarter":h=3*e;break;case"month":h=e}e=l.getUTCMonth()+r*h,r=l.getUTCFullYear()+Math.floor(e/12),0>(e%=12)&&(e+=12),c.setUTCFullYear(r),c.setUTCMonth(e),o=c.getTime()}else if("third-of-month"==o)h=l.getUTCDate(),h=3*(12*l.getUTCFullYear()+l.getUTCMonth())+(10>=h?0:20>=h?1:2)+r*e,r=Math.floor(h/36),h%=36,0>(e=Math.floor(h/3))&&(e+=12),0>(h%=3)&&(h+=3),o=Date.UTC(r,e,1+10*h);else{switch(o){case"week":h=6048e5*e;break;case"day":h=864e5*e;break;case"hour":h=36e5*e;break;case"minute":h=6e4*e;break;case"second":h=1e3*e;break;case"millisecond":h=e}o=a+r*h}}else a=t.Xk(e),o=t.Xk(i);return this.B(16384),Do(this,a,o),(t.da(i)&&i||t.da(n)&&n||s)&&ko(this,"selectedrangechange","select-range"),this},t.g.Lfa=function(){return{firstSelected:this.b.b.ki,lastSelected:this.b.b.Wi,firstVisible:K(this.b),lastVisible:X(this.b)}},t.g.Ra=function(e){if(t.p(e)){var i;t.z(e)?i=e:t.C(e)&&(i=e.type),e="stock-scatter-date-time"==(i=String(i).toLowerCase())||"scatter"==i,i=this.eb&&!t.J(this.eb,ao);var n=t.wr(this,"scroller");return n&&t.kr(n,this.TY,this),e!=i&&(e?(this.eb=new Za(this),n&&n.Ra(new Za(n))):(this.eb=new ao(this),n&&n.Ra(new ao(n))),t.W(this,"xScale",this.eb),this.eb.N(this.eb.oa),t.K(this.eb,this.TY,this),this.Dy()),this}return this.eb||(this.eb=new ao(this),t.W(this,"xScale",this.eb),this.eb.N(this.eb.oa),t.K(this.eb,this.TY,this)),this.eb},t.g.TY=function(e){t.X(e,16)&&(this.K&&this.K.remove(),this.B(81920,1))},t.g.Wm=function(e){return t.p(e)?(this.b.Wm(e),this):this.b.Wm()},t.g.KK=function(e){return t.p(e)?(z(this.b,e),this):z(this.b)},t.g.Kja=function(e){return t.p(e)?(this.na=!!e,this):this.na},t.g.W0=function(e){return t.p(e)?(this.bg=!!e,this):this.bg||{}},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.EM=function(){return this.b.EM()},t.g.Kfa=function(){for(var t=0,e=0;e<this.f.length;e++)this.f[e]&&t++;return t},t.g.q6=function(){return!1},t.g.wfa=function(){return this.vt},t.g.Qh=function(e){var i;if(this.D&&this.Nk().gv(!0),this.Ba||(this.Ba=new fo(this)),this.J(4)){if((i=t.wr(this,"scroller"))&&(i.ja(e),e=i.yd()),this.g("plotsManualBounds")){var n;i=0;for(var s=window.NaN,a=[],o=0;o<this.f.length;o++)if((n=this.f[o])&&n.enabled()){n.ja(e);var r=!1;null!==(n=n.Ta()).top()?s=t.L(n.top(),e.height):null!==n.bottom()&&(r=!0,a.push(n),s=t.L(n.bottom(),e.height,!0)),(0,window.isNaN)(s)||(a.length&&Lo(a,i,s,e.height),i=s,s=window.NaN,a.length=0),r||a.push(n)}a.length&&Lo(a,i,e.height,e.height)}else{var l=this.yg=e;i=wo(this),r=0;var h=[];if(s=l.height,a=i.length){var c=s/a,u=0;for(e=0;e<a;e++){(n=i[e]).ja(l);var d=window.NaN;o=n.Ta();var p=t.L(o.minHeight(),s),g=t.L(o.height(),s),f=t.L(o.maxHeight(),s);(0,window.isNaN)(p)||(d=Math.max(p,c),n.ta("weight",null)),(0,window.isNaN)(g)||(d=(0,window.isNaN)(d)?g:Math.max(g,d),n.ta("weight",null)),(0,window.isNaN)(f)||(d=(0,window.isNaN)(d)?Math.min(f,c):Math.min(f,d),n.ta("weight",null)),(0,window.isNaN)(d)?u+=1:r+=d,h.push(d),o.ka(),o.top(null).bottom(null).height(null).minHeight(null).maxHeight(null),o.da(!1)}for(o=r>s,l=0,d=[],e=0;e<a;e++)n=i[e],g=h[e],null!=(p=n.g("weight"))||(p=o?(0,window.isNaN)(g)?c:g:(0,window.isNaN)(g)?(s-r)/u:g),d.push(p),l+=p;for(e=r=0;e<a;e++)(o=(n=i[e]).Ta()).ka(),p=d[e],n.ta("weight",p),n=Math.round(p/l*s),c=(h=o).Kx!=r,h.Kx=r,c&&h.va(2),o.zB(n),r+=n,o.da(!0)}}for(this.G=window.Infinity,e=0;e<this.f.length;e++)(i=this.f[e])&&i.enabled()&&(ja(i),i=i.hh.width,this.G>i&&(this.G=i));(0,window.isFinite)(this.G)||(this.G=window.NaN),this.B(16384)}if(this.J(16384)||this.J(32768)){if(e=this.Ra(),i=this.tC().Ra(),s=j(this.b,this.G,this.ec||this.na,e,i),this.J(65536)&&(this.K||(this.K=new lo,N(this.b,this.K.Yd().wL(),!1)),s=this.K,o=(a=this.Ra()).X1(),n=a.Y1(),h=a.Qs(),r=a.Os(),s.ka(),h.intervalsCount?(h=(h=ho(s,n,h))[0][0],t.ea(h)?a.G={min:h,max:n}:a.G=null):t.ea(null)?a.G={min:null,max:void 0}:a.G=null,r.intervalsCount?(h=ho(s,o,r,!0),t.ea(o)?a.D={min:o,max:h[h.length-1][0]}:a.D=null):t.ea(null)?a.D={min:null,max:void 0}:a.D=null,s.da(!0),this.I(65536),s=j(this.b,this.G,this.ec||this.na,e,i)),1&s)for(this.Dy(),e=0;e<this.f.length;e++)(i=this.f[e])&&i.sE();2&s&&(ro(this.i),this.B(8192),ko(this,"selectedrangechange","data-update")),this.I(16384)}if(this.J(32768)){for(e=[],i=0;i<this.f.length;i++)if((a=this.f[i])&&a.enabled()){for(r="direct"==a.bb().kx(),s=t.Ga(a.og,a.rg,a.tg),o=a.Ue(),c={},u=!1,a=0;a<o.length;a++)h=o[r?o.length-a-1:a],jt(h),(n=h.bb()).Of()&&(n.Bg(),e.push(n)),h.enabled()&&(h.gh()?u=$o(this,h,c)||u:h.enabled()&&n.Xc.apply(n,h.oH()));if(u)for(a=0;a<o.length;a++)(h=o[a]).enabled()&&"percent"==(n=h.bb()).jn()&&Po(h,n,c);for(a=0;a<o.length;a++)if((h=o[a]).enabled())for(n=h.bb(),r=0;r<s.length;r++)c=(h=s[r]).Nb()?n:this.Ra(),c=h.scale()||c,h&&h.enabled()&&n==c&&"consider"==h.g("scaleRangeMode")&&n.Xc.apply(n,h.xs())}if((i=t.wr(this,"scroller"))&&i.Oe()){for(o=i.Ue(),c={},u=!1,a=0;a<o.length;a++)h=o[a],jt(h),(n=h.bb()).Of()&&(n.Bg(),e.push(n)),h.enabled()&&(h.gh()?u=$o(this,h,c)||u:h.enabled()&&n.Xc.apply(n,h.oH()));if(u)for(a=0;a<o.length;a++)(h=o[a]).enabled()&&"percent"==(n=h.bb()).jn()&&Po(h,n,c)}for(i=0;i<e.length;i++)e[i].Hg();this.I(32768)}if(this.J(8192)&&(e=this.tC(),i=this.b.b.ki,s=this.b.b.Wi,i=e.Ra().transform(i),i=(0,window.isNaN)(i)?0:t.Za(i,0,1),s=e.Ra().transform(s),s=(0,window.isNaN)(s)?1:t.Za(s,0,1),t.IB(e,i,s),e.O(this.Na).W(),this.I(8192)),this.J(4096)){for(s=!1,e=0;e<this.f.length;e++)(i=this.f[e])&&(i.enabled()&&(Va(i,!s),s=!0),i.O(this.Na).W());this.I(4096)}Go(this),this.J(131072)&&this.I(131072),this.Ba.sync(),this.aa||(this.aa=new t.Ex(this.O().Ja().Tl(),!1),this.aa.wa("mousewheel",this.Pba,!1,this)),this.qj().I(4294967295),this.qj().Qa().Zf().I(4294967295)},t.g.Ala=function(t,e,i,n,s,a){this.E4(t,e,i,n,s,a);var o=0<=n;i.PE=i.PE||{jB:window.NaN,dB:window.NaN},e.j("shared")||e.j("shared",i.PE),i.pE?o?(e.j("stackedZeroPrev",i.Sw),e.j("stackedValuePrev",i.Sw+n)):(e.j("stackedZeroPrev",i.Rw),e.j("stackedValuePrev",i.Rw+n)):(e.j("stackedZeroPrev",window.NaN),e.j("stackedValuePrev",window.NaN)),i.cE?o?(e.j("stackedZeroNext",i.Iw),e.j("stackedValueNext",i.Iw+n)):(e.j("stackedZeroNext",i.Hw),e.j("stackedValueNext",i.Hw+n)):(e.j("stackedZeroNext",window.NaN),e.j("stackedValueNext",window.NaN)),t.Xc(e.j("stackedValuePrev")),t.Xc(e.j("stackedValue")),t.Xc(e.j("stackedValueNext")),s&&(s.Rs?i.pE=!0:o?i.Sw+=n:i.Rw+=n,(0,window.isNaN)(a)||(0<=a?s.Iw+=a:s.Hw+=a))},t.g.E4=function(t,e,i,n){0<=n?(e.j("stackedZero",i.Cp),i.Cp+=n,e.j("stackedValue",i.Cp)):(e.j("stackedZero",i.zp),i.zp+=n,e.j("stackedValue",i.zp))},t.g.Fja=function(e){if(!t.X(e,64)){var i=4096;t.X(e,8)&&(i|=4),t.X(e,4)&&(i|=32768),this.B(i,1)}},t.g.Qba=function(e){var i=8192,n=1;t.X(e,8)&&(i|=32772,n|=8),t.X(e,4)&&(i|=32768),this.B(i,n)},t.g.gea=function(e){t.X(e,16)&&this.B(16384,1)},t.g.Dy=function(){for(var t=0;t<this.f.length;t++){var e=this.f[t];e&&e.Dy(!1)}this.B(45056,1)},t.g.zi=function(t){return this.b.zi(t)},t.g.Uf=function(t){return this.b.Uf(t)},t.g.Nk=function(e){return this.D?this.Sf||(this.Sf=new this.D.ChartController(this)):t.il(4,null,["Annotations"]),t.p(e)?(this.Sf&&this.Sf.N(e),this):this.Sf},t.g.PS=function(e){return t.p(e)?(this.Sb=e,this):this.Sb},t.g.qj=function(e){return this.Ql||(this.Ql=new co(this),this.Ql.kb(this),t.K(this.Ql,this.$ea,this)),t.p(e)?(this.Ql.N(e),this):this.Ql},t.g.$ea=function(){this.ka();for(var t=0;t<this.f.length;t++)this.f[t].qj().B(64,1);this.da(!0)},t.g.kO=t.ia,t.g.BY=function(){this.$a=this.Za=this.fb=this.P=window.NaN,this.Uc=null,Mo(this)},t.g.ES=function(){return new Q(this)},t.g.mh=function(e){return this.$f||(this.$f=new t.iA,this.$f.Wj(!0),t.W(this,"crosshair",this.$f),t.K(this.$f,this.fB,this),this.B(16777216,1)),t.p(e)?(this.$f.N(e),this):this.$f},t.g.fB=function(){this.B(16777216,1)},t.g.MM=function(){for(var t=[],e=0;e<this.f.length;e++){var i=this.f[e];t.push(i&&i.enabled()?i.dg():null)}return t},t.g.aA=function(t,e,i,n,s,a,o){t=So.u.aA.call(this,t,e,i,n,s,a,o),n=(i=this.f[e]).dg(),s=(t.left-n.left)/n.width,a=(t.left+t.width-n.left)/n.width,o=(t.top-n.top)/n.height;var r=(t.top+t.height-n.top)/n.height,l=this.Ra(),h=i.bb();return t.plot=i,t.plotIndex=e,t.plotBounds={left:n.left,top:n.top,width:n.width,height:n.height},t.leftX=l.Mc(s),t.rightX=l.Mc(a),t.maxValue=h.Mc(o),t.minValue=h.Mc(r),h.Ne()&&(e=t.minValue,t.minValue=t.maxValue,t.maxValue=e),t};var hh={};t.rq(hh,0,"plotsManualBounds",t.Dq),t.rq(hh,1,"zoomMarqueeFill",t.Qq),t.rq(hh,1,"zoomMarqueeStroke",t.Pq),t.U(So,hh),t.g=So.prototype,t.g.o6=function(e,i){return t.xx(this,this.sja,null,this.rja,this.MM(),"crosshair",e,this.g("zoomMarqueeStroke"),this.g("zoomMarqueeFill"),!i),this},t.g.sja=function(){return Ao(this),!0},t.g.rja=function(t,e,i,n){if(5<Math.abs(n)){var s=this.f[t].dg();t=this.Ra(),(i=(e-s.left)/s.width)>(e=(e+n-s.left)/s.width)&&(n=i,i=e,e=n),.05>e-i&&(i=(e=(i+e)/2)-.025,e+=.025),i=t.Mc(i),t=t.Mc(e),e=this.b.Uf(i),1>(n=this.b.Uf(t))-e&&(i=this.b.zi(Math.floor(e)),t=this.b.zi(Math.ceil(n))),(0,window.isNaN)(i)||(0,window.isNaN)(t)||i==this.b.b.ki&&t==this.b.b.Wi||!ko(this,"selectedrangechangestart","marquee")||!ko(this,"selectedrangebeforechange","marquee",i,t)||(Do(this,i,t),ko(this,"selectedrangechange","marquee"),ko(this,"selectedrangechangefinish","marquee"))}return Eo(this),!0},t.g.SE=function(e){return this.o||(this.o=new yo,t.W(this,"splitters",this.o),t.K(this.o,this.Kka,this)),t.p(e)?(this.o.N(e),this):this.o},t.g.Kka=function(){this.B(131072,1)},t.g.Pba=function(e){var i=this.MM(),n=t.Zj(this.O().Ja()),s=e.clientX-n.x;n=e.clientY-n.y;var a,o=!1;if(i&&i.length)for(var r=0;r<i.length;r++)if((a=i[r])&&a.left<=s&&s<=a.left+a.width&&a.top<=n&&n<=a.top+a.height){o=!0;break}i=t.wr(this,"scroller"),!o&&i&&i.Oe()&&(o=(a=i.ob())&&a.left<=s&&s<=a.left+a.width&&a.top<=n&&n<=a.top+a.height),o&&(Math.abs(e.deltaY)>Math.abs(e.deltaX)?(i=!(e.shiftKey||e.ctrlKey||e.metaKey),s=e.deltaY):(i=!1,s=e.deltaX),s=t.fb(s)*Math.min(Math.abs(s),21),n=this.gd(),i?!n.g("zoomOnMouseWheel")||(r=t.J(this.Ra(),ao),o=this.b.o,a=this.b.D,r?(o=this.b.Uf(o),a=this.b.Uf(a),i=this.b.b.Cg,n=this.b.b.Nj):(i=this.b.b.ki,n=this.b.b.Wi),(0,window.isNaN)(i)||(0,window.isNaN)(n)||((n+=s=.0125*s*(n-i))-(i-=s)>a-o?(i=o,n=a):(i<o&&(n+=o-i,i=o),n>a&&(i+=a-n,n=a)),r?(1>n-i&&(n=(i=Math.round(i))+1),i=this.b.zi(i),n=this.b.zi(n)):(s=this.b.Uf(i),1>(o=this.b.Uf(n))-s&&(o=(s=Math.round(s))+1,i=this.b.zi(s),n=this.b.zi(o))),i==this.b.b.ki&&n==this.b.b.Wi))||(e.preventDefault(),this.me=i,this.Od=n,t.p(this.ba)&&(t.ll.cancelAnimationFrame(this.ba),this.ud()),t.p(this.ea)||(this.ea=t.ll.requestAnimationFrame(this.Hd))):n.g("scrollOnMouseWheel")&&(i=this.cH(),!(0,window.isNaN)(i.rj)&&!(0,window.isNaN)(i.lastIndex)&&(s=jo(this,.025*-s,i)))&&(e.preventDefault(),this.fh=s,this.nf=i,t.p(this.ea)&&(t.ll.cancelAnimationFrame(this.ea),this.Hd()),t.p(this.ba)||(this.ba=t.ll.requestAnimationFrame(this.ud))))},t.g.rea=function(){this.ea=void 0,ko(this,"selectedrangechangestart","mouse-wheel")&&ko(this,"selectedrangebeforechange","mouse-wheel",this.me,this.Od)&&(Do(this,this.me,this.Od),ko(this,"selectedrangechange","mouse-wheel"),ko(this,"selectedrangechangefinish","mouse-wheel"))},t.g.qea=function(){if(this.ba=void 0,ko(this,"selectedrangechangestart","mouse-wheel")){var t=this.nf,e=Ro(this,this.fh,t);e&&No(this,e[0],e[1],t,"mouse-wheel"),ko(this,"selectedrangechangefinish","mouse-wheel")}};var ch={"zoom-marquee-start":{index:8,text:"Start zoom marquee",eventType:"anychart.startZoomMarquee",action:function(t){t.menuParent.o6(!1)}},"stock-specific-separator":{index:9.4}};t.g=So.prototype,t.g.jx=function(e){return t.Sc(e,t.Sl(ch)),e},t.g.pka=function(t){return(t=ko(this,"selectedrangechangestart",_o(t.source)))&&Ao(this),t},t.g.oka=function(t){t.preventDefault();var e=t.startKey,i=t.endKey;t=_o(t.source),ko(this,"selectedrangebeforechange",t,Math.min(e,i),Math.max(e,i))&&(Do(this,e,i),ko(this,"selectedrangechange",t))},t.g.nka=function(t){t.preventDefault(),ko(this,"selectedrangechangefinish",_o(t.source)),Eo(this)},t.g.cH=function(){var t=this.b,e=t.o,i=t.D,n=this.Uf(e),s=this.Uf(i);return{qs:t.b.ki,uw:t.b.Wi,rj:t.b.Cg,lastIndex:t.b.Nj,On:e,xp:i,Ps:n,Cw:s}},t.g.sE=function(t){var e=this.b,i=e.o,n=e.D,s=this.Uf(i),a=this.Uf(n),o=e.b.Wi,r=e.b.Cg,l=e.b.Nj;t.qs=e.b.ki,t.uw=o,t.rj=r,t.lastIndex=l,t.On=i,t.xp=n,t.Ps=s,t.Cw=a},t.g.R=function(){t.sd(this.f,this.i,this.b,this.Sf,this.Ql,this.aa,this.$f,this.o,this.Ba),this.Ba=this.o=this.$f=this.aa=this.Ql=this.Sf=this.i=this.f=null,delete this.b,delete this.Sb,So.u.R.call(this)},t.g.F=function(){var e=So.u.F.call(this);return delete e.noDataLabel,e.grouping=this.Wm().F(),e.scrollerGrouping=this.KK().F(),e.xScale=this.Ra().F(),e.scroller=this.tC().F(),e.plots=(0,t.Wa)(this.f,(function(t){return t?t.F():null})),e.crosshair=this.mh().F(),e.eventMarkers=this.qj().F(),t.Tq(this,hh,e),e.interactivity=this.gd().F(),e},t.g.U=function(e,i){var n;So.u.U.call(this,e,i),"xScale"in e&&this.Ra(e.xScale),this.Kg(i,e),this.mh(e.crosshair),"defaultPlotSettings"in e&&this.W0(e.defaultPlotSettings),this.tC(e.scroller),this.Wm(e.grouping),this.KK(e.scrollerGrouping),"defaultAnnotationSettings"in e&&this.PS(e.defaultAnnotationSettings),(n=e.eventMarkers)&&this.qj().ga(!!i,n),n=e.selectedRange,t.C(n)&&this.G5(n.start,n.end),t.Iq(this,hh,e),this.gd(e.interactivity)},t.g.Kg=function(e,i){var n=(i||this.oa).plots;if(t.A(n))for(var s=0;s<n.length;s++)xo(this,s,n[s],e)},t.g.m2=function(){var t,e=this.b.aa,i=[];for(t in e)i.push(_t(e[t]));return i},t.g.sA=function(){return["_","x"]},t.g.nD=function(e,i,n,s){var a=t.qo(e);return a in s?s=s[a]:(s=s[a]=n.length,n.push([e,i])),n[s]},t.g.VW=function(t,e,i){So.u.VW.call(this,t,e.values,i)},t.g.tA=function(t){return t.Gh()},t.g.rA=function(e,i){var n=i.la.pr().Rd().pc.Za||"yyyy-MM-ddTHH:mm:ss.SSS";return t.us(e.Gh(),n)},t.g.O1=function(t,e){switch(e){case"selected":var i=t.cg();break;case"grouped":var n=(i=t.la).ib?H(i.ib,!1,!0):null,s=i.f.b;if(s.length){var a=0,o=s.length-1,r=s[a];s=s[o]}else a=o=window.NaN,r=s=null;i=new b(i.Zc,{ki:window.NaN,Wi:window.NaN,Pw:window.NaN,rj:a,lastIndex:o,kB:window.NaN,xO:null,IT:r,A3:s,aJ:null,UN:{},SN:{},eL:[],fL:[],d7:{},c7:{},Z6:[],Y6:[]},i.o,!i.i,n);break;default:i=F(t.la.pr().wL(),!1)}return i},t.g.W2=function(){return""},t.g.DM=function(e){return(e=So.u.DM.call(this,e)).headers.shift(),e.data.sort((function(t,e){return t[0]-e[0]})),(0,t.Pe)(e.data,(function(t){t.shift()})),e};var uh=So.prototype;t.E("anychart.stock",(function(t){return(t=new So(t)).Kg(!0),t})),uh.plot=uh.jf,uh.crosshair=uh.mh,uh.scroller=uh.tC,uh.splitters=uh.SE,uh.xScale=uh.Ra,uh.selectRange=uh.G5,uh.getSelectedRange=uh.Lfa,uh.getType=uh.Ma,uh.legend=uh.eg,uh.grouping=uh.Wm,uh.scrollerGrouping=uh.KK,uh.annotations=uh.Nk,uh.eventMarkers=uh.qj,uh.getPlotsCount=uh.Kfa,uh.startZoomMarquee=uh.o6,uh.interactivity=uh.gd,uh.preserveSelectedRangeOnDataUpdate=uh.Kja}.call(this,$)),_.wordtree||(_.wordtree=1,function(t){var e=function(){t.V.call(this),t.T(this.ua,p)},i=function(e,i){t.ux.call(this),t.su(this,this,this.If,this.hg,this.Ds,this.If,null,null),this.Ir=null,this.Ou=[],this.Jh=[],this.ZO=this.dM=null,this.Xf=[],this.nt=[],t.T(this.ua,[["minFontSize",4,1],["maxFontSize",4,1],["postfix",4,1],["fontFamily",4,1],["fontStyle",16,1],["fontWeight",4,1],["fontColor",16,1],["fontOpacity",16,1],["fontDecoration",16,1]]),this.data(e,i)},n=function(t,e){var i=e.getParent();if(i){for(var s=0;s<i.bc();s++){var a=i.xd(s);a!=e&&a.j("hidden",!0)}n(t,i)}},s=function(t){for(var e=0;e<t.Jh.length;e++)t.Jh[e].j("hidden",!1)},a=function(t,e,i){if(i.length){for(var n=e.Sl(),s=!1,o=0;o<e.bc();o++)if(n[o].get("value")==i[0]){s=!0;break}return s?(i.shift(),e=n[o]):(e=e.hc({value:i[0]}),i.shift()),a(t,e,i)}return e},o=function(e){return e=e.split(/([!?,;:.&"-]+|\S*[A-Z]\.|\S*(?:[^!?,;:.\s&-]))/),(0,t.Ye)(e,(function(t){return t.length&&" "!=t}))},r=function(e,i){null!=e.la&&(t.kr(e.la,e.dd,e),e.la.ld()),e.la=i,t.K(e.la,e.dd,e),e.B(4100,1)},l=function(e,i,n){if(i){var s=i.get("fontSize");if(null==s){if((s=i.getParent())&&(1==s.bc()||n))return s=l(e,s,n),i.j("fontSize",s),s;n=e.g("maxFontSize"),e=e.g("minFontSize"),s=i.j("height")/1.5,s=t.Za(s,e,n),i.j("fontSize",s)}return s}return 0},h=function(t,e){if(e){var i=e.bc(),n=0;if(i)for(var s=0;s<i;s++)n+=h(t,e.xd(s));else n=e.get("weight")||1;return e.j("leafCount",n).j("weight",n),n}return 0},c=function(t,e,i,n,s,a){if(e){e.j("connectorInXPosition",i[0]).j("connectorInYPosition",i[1]).j("connectorOutXPosition",i[0]+t.HW(e)).j("connectorOutYPosition",i[1]);var o=t.kg.cb();if(n<o){i=t.nj();var r=e.bc(),l=i.g("length"),h=i.g("offset");i=i.g("curveFactor");var u=t.g("minFontSize");if(r){if(1<r){var d=u/10;s+=d,a-=d}d=s;for(var p,g=!1,f=0;f<r;f++)if((p=e.xd(f)).j("hidden")){g=!0;break}if((a-s)/r<1.5*u&&1<r){r="+"+e.j("leafCount")+" "+t.g("postfix");var m=(a+s)/2;h=n,m-=(n=t.$x(h,m,r,e.j("fontSize")||u,t.g("fontFamily"),t.g("fontWeight"))).rH()/2,n.y(m),n.tag.node=e,n.tag.o3=!0,h+(r=n.vU())>=o&&n.visible(!1),t.Jt(e.j("connectorOutXPosition"),e.j("connectorOutYPosition"),e.j("connectorOutXPosition")+20,(a+s)/2,i)}else for(g&&(n-=l+h),f=0;f<r;f++)if(!(p=e.xd(f)).j("hidden")){h=p.j("leafCount"),o=e.j("leafCount");var v=0;d=(u=d)+(o=g?a-s:(a-s)*Math.max(1,h)/Math.max(1,o));var b=[h=n,m=u+o/2];p.j("height",o).j("nodePositionX",h).j("nodePositionY",m),t.ZL(p,g),m=e.j("textHeight")/2,b[1]-=m,1!=p.bc()&&(v+=l),h=t.HW(p),m=[b[0],b[1]+m],v+=b[0]+h,c(t,p,m,v,u,u+o),1<e.bc()&&!g&&t.Jt(e.j("connectorOutXPosition"),e.j("connectorOutYPosition"),p.j("connectorInXPosition"),p.j("connectorInYPosition"),i)}}}}},u=function(t,e){var n=new i(t,e);return n.Ga("wordtree"),n};t.H(e,t.V);var d={};t.sq(d,[[0,"curveFactor",t.er],[0,"offset",t.br],[0,"length",t.br],[1,"stroke",t.Pq]]),t.U(e,d),e.prototype.ra=8201;var p=[["curveFactor",0,8],["offset",0,8],["length",0,8],["stroke",0,8192]];e.prototype.F=function(){var i=e.u.F.call(this);return t.Tq(this,d,i),i},e.prototype.U=function(i,n){e.u.U.call(this,i,n),t.Iq(this,d,i,n)},t.H(i,t.ux),i.prototype.ra=t.ux.prototype.ra,i.prototype.sa=4112|t.ux.prototype.sa;var g,f=(g={},t.sq(g,[[0,"minFontSize",t.br],[0,"maxFontSize",t.br],[0,"fontFamily",t.zq],[0,"fontStyle",t.cl],[0,"fontWeight",t.wq],[0,"fontColor",t.Aq],[0,"fontOpacity",t.Bq],[0,"fontDecoration",t.bl],[0,"postfix",function(e){if(t.p(e))return null===e&&(e=this.vf("postfix")),String(e)}]]),g);t.U(i,f),t.g=i.prototype,t.g.Ma=function(){return"wordtree"},t.g.yj=function(){return!(this.la&&(!this.la||this.la.bc()))},t.g.Ue=function(){return[]},t.g.ts=function(){return[this]},t.g.sV=function(t,e){return function(i){return t*(1-i)+e*i}},t.g.Zj=function(e,i){return t.qu(this.data(),i)},t.g.nj=function(i){return this.Kj||(this.Kj=new e,t.W(this,"connectors",this.Kj),t.K(this.Kj,this.Lia,this)),i?(this.Kj.N(i),this):this.Kj},t.g.Ux=function(e){this.Si||(this.Si=new t.Fw);var i={};return e&&(i.value={value:e.get("value"),type:"string"},i.weight={value:e.j("weight"),type:"number"}),this.Si.lg(e),t.ov(this.Si,i)},t.g.jr=function(e){if(e){if("array"==t.ka(e)&&(e=e[0]),!t.J(e,t.du)&&!(e=this.data().Eo("value",e)[0]))return;this.dM=e,n(this,e),this.B(20,1)}},t.g.ay=function(){return s(this),this.dM&&this.dM.getParent()&&this.jr(this.dM.getParent()),this},t.g.Lia=function(e){var i=0;t.X(e,8192)&&(i|=16),t.X(e,8)&&(i|=4),this.B(i,1)},t.g.dd=function(e){t.X(e,16)&&this.B(4100,9)},t.g.Ds=function(e){e.button==t.Ri&&(e=e.domTarget.tag)&&e.node&&(s(this),this.jr(e.node))},t.g.If=function(e){var i=e.domTarget.tag;if(i&&i.node&&!i.o3){var n=i.node;i=this.Ua(),t.Ow(i,e.clientX,e.clientY,this.Ux(n))}else this.Ua().Lc()},t.g.hg=function(){this.Ua().Lc()},t.g.QY=function(e){if("implicit"==this.re){if(t.p(e)){if(this.ZO!=e||this.C1){this.C1=!1,(null===e||/^[\s\xa0]*$/.test(e))&&(e=this.nw[0][0]),this.ZO=e;for(var i=[],n=0;n<this.nw.length;n++){var s=(0,t.za)(this.nw[n],e);-1!=s&&i.push(t.Ja(this.nw[n],s))}for(i.length||(i[0]=[e]),e=i[0][0],this.data().ka(),this.data().bc()&&this.data().Cj(0),n={value:e},n=this.data().Eg(n,0),s=0;s<i.length;s++){var o=i[s];o[0]==e&&(o.shift(),a(this,n,o))}this.data().da(!0)}return this}return this.ZO}return this},t.g.data=function(e,i){if(t.p(e)){if(t.J(e,t.au)||t.J(e,t.Yt))this.la!=e&&(this.la&&t.kr(this.la,this.dd,this),this.la=e,t.K(this.la,this.dd,this),this.re="explicit",this.B(4100,1));else if("array"==t.ka(e)&&"object"==t.ka(e[0]))this.data(t.ou(e,i));else if(null===e)this.la&&(t.kr(this.la,this.dd),this.la.ld()),this.la=null,this.B(4100,1);else{if(this.re="implicit",this.Xf=e,"array"==t.ka(e)&&e.length){if(this.nw=[],"array"==t.ka(e[0]))for(var n=0;n<e.length;n++)this.nw.push(o(e[n][0]));else if("string"==t.ka(e[0]))for(n=0;n<e.length;n++)this.nw.push(o(e[n]))}else if("string"==t.ka(e)){n=function(e){return e=e.split(/\s*(.+?(?:[?!]+|$|\.(?=\s+[A-Z]|$)))\s*/),(0,t.Ye)(e,(function(t){return!!t.length}))}(e);for(var s=[],a=0;a<n.length;a++)s.push(o(n[a]));this.nw=s}else this.nw=[[e.toString()]];this.la||r(this,t.ou()),this.C1=!0,this.QY(this.nw[0][0])}return this}return this.la},t.g.Rh=function(){return 0<this.nt.length?this.nt.pop():new t.Qh},t.g.HW=function(t){if(t){var e=t.j("textWidth"),i=this.nj().g("offset"),n=t.getParent();return n&&1<n.bc()&&(e+=i),1<t.bc()&&(e+=i),e}return 0},t.g.depth=function(t){if(t){var e=t.bc(),i=0,n=t.getParent();for(n&&(i=n.j("depth")+1),t.j("depth",i),i=0;i<e;i++)this.depth(t.xd(i))}},t.g.$x=function(t,e,i,n,s,a){var o=this.Rh();return o.tag||(o.tag={}),o.text(i),o.y(e),o.x(t),o.fontSize(n),o.fontFamily(s),o.fontWeight(a),o.width(null),o.visible(!0),this.Ou.push(o),o},t.g.Jt=function(t,e,i,n,s){var a=this.OC,o=this.sV(t,i),r=o(s);s=o(1-s),a.moveTo(t,e).Sk(r,e,s,n,i,n)},t.g.ZL=function(t,e){var i=0,n=t.getParent();n&&1<n.bc()&&(i+=this.nj().g("offset"));var s=t.get("value");1==t.bc()&&(s+=" "),i=t.j("nodePositionX")+i,n=t.j("nodePositionY");var a=t.get("fontFamily")||this.g("fontFamily"),o=t.get("fontWeight")||this.g("fontWeight"),r=l(this,t,e);(a=this.$x(i,n,s,r,a,o)).tag={node:t,type:"node",o3:!1},o=a.rH(),s=a.vU(),t.j("textHeight",o).j("textWidth",s),n-=o/2,(o=i+s)>(r=this.kg.cb())&&a.width(s-(o-r)-.05*s),a.x(i).y(n)},t.g.Qh=function(e){if(!this.pf())if(this.Aa||(this.Aa=this.Na.Bd(),this.OC=new t.Ag,this.Aa.zIndex(30)),this.yj())this.Aa.Gi();else{var i=this.Ir=this.la.xd(0);if(this.J(4096)&&(h(this,this.Ir),this.depth(this.Ir),this.Jh.length=0,this.Jh=this.data().aw().uC(),this.I(4096)),this.J(4)){this.Aa.Gi();var n=e.left,s=e.top;e=e.height;for(var a=this.nj(),o=a.g("offset"),r=0;r<this.Ou.length;r++){var l=this.Ou[r];this.nt.push(l)}for(this.Ou.length=0,this.OC.clear(),this.Aa.suspend(),l=[n+o,s+e/2],i.j("nodePositionX",l[0]).j("nodePositionY",l[1]).j("height",e),this.ZL(i,!1),n=n+o+this.HW(i)+(1<i.bc()?a.g("length"):0),c(this,i,l,n,s,s+e),this.OC.parent(this.Aa),this.I(4),r=0;r<this.Ou.length;r++)this.Ou[r].parent(this.Aa);this.Aa.resume(),this.B(16)}if(this.J(16)){for(this.Aa.suspend(),this.OC.stroke(this.nj().g("stroke")),s=this.g("fontColor"),n=this.g("fontDecoration"),e=this.g("fontStyle"),a=this.g("fontOpacity"),o=0;o<this.Ou.length;o++){if((i=this.Ou[o]).tag&&i.tag.node){var u=i.tag.node,d=u.get("fontColor")||s,p=u.get("fontDecoration")||n,g=u.get("fontStyle")||e;u=u.get("fontOpacity")||a}i.color(d),i.er(p),i.fontStyle(g),i.opacity(u),i.Hm(!1)}this.Aa.resume(),this.I(16)}}},t.g.F=function(){var e=i.u.F.call(this);return t.Tq(this,f,e),"implicit"==this.re&&(e.wordTreeRawData=JSON.stringify(this.Xf),e.word=this.ZO),e.treeData=this.data().xB(["hidden"]),e.connectors=this.nj().F(),{chart:e}},t.g.U=function(e,n){i.u.U.call(this,e,n),t.Iq(this,f,e,n),"wordTreeRawData"in e?(this.data(JSON.parse(e.wordTreeRawData)),"word"in e&&this.QY(e.word),"treeData"in e&&r(this,t.cu(e.treeData))):"treeData"in e&&this.data(t.cu(e.treeData)),"connectors"in e&&this.nj().ga(!!n,e.connectors)},t.g.R=function(){i.u.R.call(this),t.sd(this.Kj,this.OC,this.Ou,this.nt,this.la,this.Aa),this.la=this.OC=this.Kj=null,this.Ou.length=0,this.nt.length=0,this.Aa=null};var m=i.prototype;m.connectors=m.nj,m.word=m.QY,m.getType=m.Ma,m.drillTo=m.jr,m.drillUp=m.ay,m.toCsv=m.Zj,m.noData=m.Gm,t.Tp.wordtree=u,t.E("anychart.wordtree",u)}.call(this,$)),_.radar_polar_base||(_.radar_polar_base=1,function(t){var e,i,n,s,a,o;t.c4=function(){t.Qy.call(this)},e=function(){this.ka(),t.Y.call(this),this.Ga(t.ur.axis),this.ci=[],this.Fk=[],this.Pc=t.qk(),t.ru(this,this.Pc),this.sf=916,this.da(!1),t.T(this.ua,[["drawFirstLabel",this.sf,9],["drawLastLabel",this.sf,9],["overlapMode",this.sf,9],["stroke",this.sf,9],["startAngle",this.sf,9,0,function(){this.pj()}],["innerRadius",this.sf,9]])},i=function(e,i,n){if(t.p(i)){if(i=t.jt(e.qa,i,null,15,null,e.ii,e)){var s=e.qa==i;e.qa=i,e.qa.sN=!!n,e.qa.da(s),s||(e.pj(),e.B(e.sf,9))}return e}return e.qa},n=function(e,i,n){var s=t.ab(e.g("startAngle")-90),a=t.bb(s),o=(n=n?e.Xa():e.yb()).g("length"),r=n.g("stroke"),l=n.g("position"),h=t.Ho(l),c=r.thickness?(0,window.parseFloat)(r.thickness):1,u=t.dp(e.g("stroke"));r=l=0,s?90==s?r=0==c%2?0:-.5:180==s?l=0==c%2?0:.5:270==s&&(r=0==c%2?0:.5):l=0==c%2?0:-.5,i||(l*=-1,r*=-1),c=e.b+(e.UA-e.b)*i,i=e.tc+c*Math.cos(a),e=e.vc+c*Math.sin(a),180==s?(i=Math.floor(i),e=Math.floor(e)):(i=Math.ceil(i),e=Math.ceil(e)),s=t.bb(t.ab(90-s-270)),a=0>h?Math.ceil(u/2):Math.floor(u/2),a=h?h*a:-o/2,h=h?h*o:o,l=i+(o=a*Math.sin(s))+l,r=e+(a*=Math.cos(s))+r,o=h*Math.sin(s),a=h*Math.cos(s),n.hq(l,r,l+o,r+a)},s=function(){e.call(this)},t.g4=function(e){t.Qz.call(this,e),this.Yg=[],this.Zg=[],this.jh=[],this.kh=[],t.T(this.ua,[["startAngle",4,1],["innerRadius",32772,1,0,function(){for(var t=0;t<this.hb.length;t++)this.hb[t].B(1024)}]])},t.h4=function(e,i){var n=e.bu(),s=t.p(i)?i:e.oa,a=t.p(i);e.im(s.xGrids,e.lm,n,a),e.im(s.yGrids,e.nm,n,a),e.im(s.xMinorGrids,e.Qr,n,a),e.im(s.yMinorGrids,e.Tr,n,a)},a=function(e,i,n,s){var a=e.F();return t.Zz(a,"scale",e.scale(),i,n),s.push(t.oa(e)),a},t.i4=function(){t.kz.call(this),this.HL="circuit",t.T(this.ua,[["startAngle",4,9],["innerRadius",4,9]])},t.j4=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a)},t.Ipa=function(t,e,i,n,s){switch(t){case"left-center":case"center":case"right-center":t=(e+n)/2,i=(i+s)/2;break;case"left-bottom":case"center-bottom":case"right-bottom":t=n,i=s;break;default:t=e}return{x:t,y:i}},o={mra:"radial",ona:"circuit"},t.H(t.c4,t.Qy),t.c4.prototype.hq=function(t,e,i,n){this.path.moveTo(t,e),this.path.lineTo(i,n)},t.H(e,t.Y);var r,l=(r={},t.sq(r,[t.Z.zz,t.Z.dC,t.Z.Yn,t.Z.tQ,t.Z.uQ,[0,"innerRadius",function(e){return t.yo(e,this.g("innerRadius"))}]]),r);t.U(e,l),t.g=e.prototype,t.g.sa=912|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Pc=null,t.g.Er="axis",t.g.Da=null,t.g.rc=null,t.g.mb=null,t.g.Rc=null,t.g.qa=null,t.g.UA=window.NaN,t.g.ci=null,t.g.Fk=null,t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.Aba,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.Aba=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.Xa=function(e){return this.mb||(this.mb=new t.c4,t.W(this,"ticks",this.mb),this.mb.kb(this),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=276,n=1),this.pj(),this.B(i,n)},t.g.yb=function(e){return this.Rc||(this.Rc=new t.c4,t.W(this,"minorTicks",this.Rc),this.Rc.kb(this),t.K(this.Rc,this.Wha,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.Wha=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=256,n=1),this.pj(),this.B(i,n)},t.g.scale=function(t){return i(this,t)},t.g.ii=function(e){t.X(e,2)&&(this.pj(),this.B(this.sf,9))},t.g.uo=function(){this.B(this.sf,9)},t.g.pj=function(){this.o&&(this.o.length=0),this.ci.length=0,this.Fk.length=0,this.ik=null},t.g.sy=function(){if(!this.ik||this.J(512)){if("allow-overlap"==this.g("overlapMode"))return!1;var e=this.scale(),i=[],n=[];if(e){var s,a,o,r=-1,l=-1,h=-1,c=e.Xa().get(),u=c.length,d=this.labels().enabled(),p=this.g("drawFirstLabel"),g=this.g("drawLastLabel");if(t.J(e,t.kt)){for(var f,m=e.yb().get(),v=s=0,b=m.length,y=this.qb().enabled();s<u||v<b;){var S=c[s],x=m[v],w=e.transform(S);if(f=e.transform(x),x=S=a=null,-1==l&&d)for(o=s;-1==l&&o<u;){var C=this.rd(o,!0);-1!=r&&(x=this.rd(r,!0)),o!=u-1&&g&&(S=this.rd(u-1,!0)),t.bn(C,x)||t.bn(C,S)||(0>=(C=e.transform(c[o]))&&p||1<=C&&g||0<C&&1>C)&&(l=o),o++}w<=f&&s<u||v==b?(d&&s==l&&this.labels().enabled()?(r=s,l=-1,i.push(!0)):i.push(!1),s++,w==f&&(this.labels().enabled()||this.Xa().enabled())&&(n.push(!1),v++)):(y?(C=this.rd(v,!1),-1!=r&&(x=this.rd(r,!0)),-1!=l&&(S=this.rd(l,!0)),-1!=h&&(a=this.rd(h,!1)),w=!(w=this.qb().be(v))||!t.p(w.enabled())||w.enabled(),t.bn(C,x)||t.bn(C,S)||t.bn(C,a)||!w?n.push(!1):0>=(C=e.transform(m[v]))&&p||1<=C&&g||0<C&&1>C?(h=v,n.push(!0)):n.push(!1)):n.push(!1),v++)}y||(n=!1)}else if(t.J(e,t.Qt))for(s=0;s<u;s++)d?(C=this.rd(s,!0),-1!=r&&(x=this.rd(r,!0)),S=s!=u-1&&g?this.rd(u-1,!0):null,s?s==u-1?g?(r=s,i.push(!0)):i.push(!1):t.bn(C,x)||t.bn(C,S)?i.push(!1):(r=s,i.push(!0)):p?(r=s,i.push(!0)):i.push(!1)):i.push(!1)}d||(i=!1),this.ik={labels:i,qb:n},this.I(512)}return this.ik},t.g.rd=function(e,i){var n=i?this.ci:this.Fk;if(t.p(n[e]))return n[e];var s=i?this.Xa():this.yb(),a=s.g("position");a=t.Ho(a);var o=t.dp(this.g("stroke")),r=0>a?Math.ceil(o/2):Math.floor(o/2);o=(a=i?this.labels():this.qb()).g("position"),o=t.Ho(o);var l=this.scale(),h=(i?l.Xa():l.yb()).get()[e];if(t.A(h)){var c=(l.transform(h[0],0)+l.transform(h[1],1))/2;h=h[0]}else c=l.transform(h,.5);h=this.Am(e,h),l={value:{x:0,y:0}};var u=a.measure(h,l,void 0,e),d=this.b+(this.UA-this.b)*c,p=t.ab(this.g("startAngle")-90),g=t.bb(p);c=this.tc+d*Math.cos(g),d=this.vc+d*Math.sin(g);var f=t.bb(t.ab(90-p-270));s=(g=t.Io(s,o))*Math.sin(f),g*=Math.cos(f);var m=o*r*Math.sin(f);r=o*r*Math.cos(f),p=t.ab(p+90),f=u.width,u=u.height;var v=this.scale(),b=0,y=0;return t.J(v,t.kt)?p?0<p&&90>p?(b-=f/2,y-=u/2):90==p?y-=u/2:90<p&&180>p?(y-=u/2,b+=f/2):180==p?b+=f/2:180<p&&270>p?(y+=u/2,b+=f/2):270==p?y+=u/2:270<p&&(y+=u/2,b-=f/2):b-=f/2:t.J(v,t.Qt)&&(p?0<p&&45>p?b-=f/2:45==p?(b-=f/2,y-=u/2):45<p&&90>p||90==p||90<p&&135>p?y-=u/2:135==p?(y-=u/2,b+=f/2):135<p&&180>p||180==p||180<p&&225>p?b+=f/2:225==p?(y+=u/2,b+=f/2):225<p&&270>p||270==p||270<p&&315>p?y+=u/2:315==p?(y+=u/2,b-=f/2):315<p&&(b-=f/2):b-=f/2),l.value.x=c+b*o+s+m,l.value.y=d+y*o+g+r,n[e]=a.yl(h,l,void 0,e)},t.g.Am=function(e,i){var n=this.scale(),s=!0;if(t.J(n,t.Qt)){var a=n.Xa().names()[e],o=i;s=!1}else t.J(n,t.nt)?(a=t.vs(i),o=i):(a=(0,window.parseFloat)(i),o=(0,window.parseFloat)(i));return a={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:a,type:"number"},tickValue:{value:o,type:"number"},scale:{value:n,type:""}},s&&(a.max={value:t.p(n.max)?n.max:null,type:"number"},a.min={value:t.p(n.min)?n.min:null,type:"number"}),(n=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(n)},t.g.Zx=function(){var e=t.ab(this.g("startAngle")-90),i=t.bb(e),n=0,s=0,a=t.dp(this.g("stroke"));e?90==e?n=0==a%2?0:-.5:180==e?s=0==a%2?0:.5:270==e&&(n=0==a%2?0:.5):s=0==a%2?0:-.5,e=Math.round(this.tc+this.UA*Math.cos(i)),a=Math.round(this.vc+this.UA*Math.sin(i)),this.Pc.moveTo(Math.round(this.tc+this.b*Math.cos(i))+n,Math.round(this.vc+this.b*Math.sin(i))+s).lineTo(e+n,a+s)},t.g.ke=function(e,i){var n=this.scale();if(i){var s=n.Xa();n=this.labels()}else s=n.yb(),n=this.qb();s=s.get(),s=this.Am(e,s[e]);var a=t.mn(this.rd(e,i));n.add(s,{value:{x:a.left+a.width/2,y:a.top+a.height/2}},e)},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.Xa().B(2),this.yb().B(2),this.labels().B(2),this.qb().B(2),this.B(450)),!1))},t.g.Iy=function(){return!1},t.g.W=function(){var e=this.scale();if(!e)return t.il(2),this;if(!this.zc())return this;if(this.J(4)){this.pj();var i=this.ja();this.UA=Math.min(i.width,i.height)/2,this.b=t.L(this.g("innerRadius"),this.UA),this.b==this.UA&&this.b--,this.tc=Math.round(i.left+i.width/2),this.vc=Math.round(i.top+i.height/2)}if(this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka(),this.J(16)){this.Pc.clear(),this.Pc.stroke(this.g("stroke"));var s=this.Zx;this.I(16)}if(this.J(8)&&(i=this.zIndex(),this.Pc.zIndex(i),this.Xa().zIndex(i),this.yb().zIndex(i),this.labels().zIndex(i),this.qb().zIndex(i),this.I(8)),this.J(2)&&(i=this.O(),this.Pc.parent(i),this.Xa().O(i),this.yb().O(i),this.labels().O(i),this.qb().O(i),this.I(2)),this.J(256)){var a=this.Xa();a.W(),a=a.hq;var o=this.yb();o.W(),o=o.hq,this.I(256)}if(this.J(128)){var r=this.labels();r.O()||r.O(this.O()),r.ja(this.ja()),r.clear(),r=this.ke;var l=this.qb();l.O()||l.O(this.O()),l.ja(this.ja()),l.clear(),l=this.ke,this.I(128)}if(s&&s.call(this),i=(s=e.Xa().get()).length,t.J(e,t.kt)){if(a||r||o||l){var h=this.sy(void 0);if(t.C(h))var c=h.labels,u=h.qb;else c=!h,u=!h;for(var d,p,g=e.yb().get(),f=h=0,m=g.length;h<i||f<m;){var v=s[h],b=g[f];(v=e.transform(v))<=(d=e.transform(b))&&h<i||f==m?(b=t.A(c)?c[h]:c,(t.A(c)&&c[h]||t.da(c))&&a&&n(this,v,!0),b&&r.call(this,h,!0),p=v,h++):(b=t.A(u)?u[f]:u,(t.A(u)&&u[f]||t.da(u))&&o&&p!=d&&n(this,d,!1),b&&l&&p!=d&&r.call(this,f,!1),f++)}l&&this.qb().W()}}else if(t.J(e,t.Qt)&&(a||r))for(p=this.sy(void 0),c=t.C(p)?p.labels:!h,h=0;h<i;h++)v=s[h],f=t.A(v)?v[0]:v,v=e.transform(f,0),a&&(n(this,v,!0),h==i-1&&(v=e.transform(f,1),n(this,v,!0)),b=t.A(c)?c[h]:c,r&&b&&r.call(this,h,!0));return r&&this.labels().W(),this.labels().da(!1),this.qb().da(!1),this.Xa().da(!1),this.yb().da(!1),this},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.Xa().remove(),this.yb().remove(),this.Da&&this.Da.remove(),this.rc&&this.rc.remove()},t.g.F=function(){var i=e.u.F.call(this);return t.Tq(this,l,i),i.labels=this.labels().F(),i.minorLabels=this.qb().F(),i.ticks=this.Xa().F(),i.minorTicks=this.yb().F(),i},t.g.U=function(i,n){e.u.U.call(this,i,n),t.Iq(this,l,i,n),this.labels().ga(!!n,i.labels),this.qb().ga(!!n,i.minorLabels),this.Xa(i.ticks),this.yb(i.minorTicks)},t.g.R=function(){t.sd(this.Pc,this.Da,this.rc,this.mb,this.Rc),delete this.qa,this.rc=this.Da=this.Rc=this.mb=this.Pc=this.Fk=this.ci=null,e.u.R.call(this)},t.H(s,e),t.xu(s,e);var h=e.prototype;h.labels=h.labels,h.minorLabels=h.qb,h.ticks=h.Xa,h.minorTicks=h.yb,h.scale=h.scale,h=s.prototype,t.E("anychart.standalones.axes.radial",(function(){var t=new s;return t.Ga("standalones.radialAxis"),t})),h.draw=h.W,h.parentBounds=h.ja,h.container=h.O,t.H(t.g4,t.Qz),t.g4.prototype.sa=10485760|t.Qz.prototype.sa,t.g4.prototype.co=function(){t.g4.u.co.call(this);var e=this.La("chartElements");e.axes={x:1,y:1},e.grids={x:0,y:0,xMinor:0,yMinor:0};for(var i=Math.max(this.Yg.length,this.Zg.length,this.jh.length,this.kh.length);i--;)this.Yg[i]&&e.grids.x++,this.Zg[i]&&e.grids.y++,this.jh[i]&&e.grids.xMinor++,this.kh[i]&&e.grids.yMinor++;this.La("chartElements",e)};var c=function(){var e={};return t.rq(e,0,"startAngle",(function(e){return t.ab(t.N(e)||0)})),t.rq(e,0,"innerRadius",(function(e){return t.yo(e,this.g("innerRadius"))})),e}();t.U(t.g4,c),t.g=t.g4.prototype,t.g.dg=function(){return this.fc},t.g.ip=function(e){return(e?this.fA():this.gA()).zIndex+.001*t.Ga(this.Yg,this.Zg,this.jh,this.kh).length},t.g.lm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Yg[n];return a||((a=this.IF()).Xj=this,t.mz(a,"radial"),a.zIndex(this.ip(!0)),this.Yg[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.nm=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.Zg[n];return a||((a=this.IF()).Xj=this,t.mz(a,"circuit"),a.zIndex(this.ip(!0)),this.Zg[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.Qr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jh[n];return a||((a=this.IF()).Xj=this,t.mz(a,"radial"),a.Ga("defaultMinorGridSettings"),a.zIndex(this.ip(!1)),this.jh[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.Tr=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.kh[n];return a||((a=this.IF()).Xj=this,t.mz(a,"circuit"),a.Ga("defaultMinorGridSettings"),a.zIndex(this.ip(!1)),this.kh[n]=a,t.K(a,this.wu,this),this.B(8388608,1)),t.p(s)?(a.N(s),this):a},t.g.wu=function(){this.B(8388608,1)},t.g.fA=function(e){return this.aq||(this.aq=t.zm("defaultGridSettings")),t.p(e)?(this.aq=e,this):this.aq||{}},t.g.gA=function(e){return this.bq||(this.bq=t.zm("defaultMinorGridSettings")),t.p(e)?(this.bq=e,this):this.bq||{}},t.g.$h=function(e){return this.mc||(this.mc=this.R0(),t.W(this,"xAxis",this.mc),this.mc.kb(this),t.K(this.mc,this.xo,this),this.B(2097156)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.ij=function(i){return this.hl||(this.hl=new e,t.W(this,"yAxis",this.hl),this.hl.kb(this),t.K(this.hl,this.xo,this),this.B(2097156)),t.p(i)?(this.hl.N(i),this):this.hl},t.g.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=2097152,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.ZG=function(t){switch(t){case 0:return this.mc;case 1:return this.hl}},t.g.uy=function(){return this.mc},t.g.wy=function(){return this.hl},t.g.Z5=function(t){var e=this.g("startAngle");t.nd("startAngle")!=e&&(t.ta("startAngle",e),t.B(1024))},t.g.aL=function(){this.eT()},t.g.Qh=function(e){if(this.pb(),!this.pf()){var n=this.$h(),s=this.ij();t.xr(n,s);var a=!1,o=this.g("startAngle");if(this.J(2097156)){a=this.Ra();var r=this.bb();n.scale()&&!n.scale().sN||n.FK(a,!0),n.p_(),s.scale()&&!s.scale().sN||i(s,r,!0),s.Da&&t.Yu(s.Da),s.rc&&t.Yu(s.rc),a=e.clone().round(),n.startAngle(o),n.ja(a),a=n.yd().round(),e=this.J(4),t.nb(a,this.fc)&&!e||(this.fc=a,this.B(10518528)),a=!0}var l=this.g("innerRadius");if(this.J(8388608)){var h=t.Ga(this.Yg,this.Zg,this.jh,this.kh);for(e=0,r=h.length;e<r;e++){var c=h[e];c&&(c.ka(),a&&c.B(64),c.ja(this.fc),c.innerRadius(l),c.O(this.Na),c.startAngle(o),c.W(),c.da(!1))}this.I(8388608)}this.J(2097152)&&(n.O(this.Na),n.W(),s.O(this.Na),s.startAngle(o),s.innerRadius(l),s.ja(this.fc.clone()),s.W(),this.I(2097152)),t.Pz(this,0,0,0,0),t.zr(n,s)}},t.g.oq=function(e){var i=e.clientX;e=e.clientY;var n,s=t.Zj(this.O().Ja());i-=s.x,e-=s.y;var a=Math.round(this.fc.left+this.fc.width/2),o=Math.round(this.fc.top+this.fc.height/2);if(t.gn(a,o,i,e)>Math.min(this.fc.width,this.fc.height)/2)return null;s=[];var r=this.gd();if("by-spot"==r.g("hoverMode")){var l=r.g("spotRadius");for(a=0,o=this.hb.length;a<o;a++)if((r=this.hb[a]).enabled()){var h=[],c=window.Infinity,u=r.Be();for(n=r.cg();n.advance();)for(var d=n.j("x"),p=0;p<u.length;p++){var g=n.j(u[p]),f=t.gn(d,g,i,e);if(f<=l&&(g=n.ma(),h.push(g),f<c)){c=f;var m=g}}h.length&&s.push({X:r,vd:h,Ln:h[h.length-1],De:{index:m,Tf:c}})}}else if("by-x"==this.gd().g("hoverMode"))for(a=Math.PI/2+Math.atan2(e-o,-(i-a))+t.bb(this.g("startAngle")),l=1-(a=t.$a(a,2*Math.PI))/(2*Math.PI),a=0,o=this.hb.length;a<o;a++)if(n=(r=this.hb[a]).Ra().Mc(l),g=this.So?0<=(n=t.Wz(r,n))?[n]:[]:t.Er(r.data(),t.N(n),t.J(r.Ra(),t.Qt)),n=r.cg(),c=window.Infinity,g.length){for(h=[],p=0;p<g.length;p++)n.select(g[p])&&(f=n.j("x"),u=n.j("value"),(f=t.gn(f,u,i,e))<c&&(c=f,m=g[p]),h.push(g[p]));s.push({X:r,vd:h,Ln:h[g.length-1],De:{index:m,Tf:c}})}return s},t.g.nH=function(){return 10485760|t.g4.u.nH.call(this)},t.g.F=function(){return{chart:t.g4.u.F.call(this)}},t.g.ht=function(e,i,n){t.g4.u.ht.call(this,e,i,n),t.Iq(this,c,e);var s=e.xAxis;this.$h().ga(!!n,s),t.C(s)&&"scale"in s&&1<s.scale&&this.$h().scale(i[s.scale]),s=e.yAxis,this.ij().ga(!!n,s),t.C(s)&&"scale"in s&&1<s.scale&&this.ij().scale(i[s.scale]),t.h4(this,e)},t.g.ft=function(e,i,n){t.g4.u.ft.call(this,e,i,n);var s=[];t.Tq(this,c,e),e.xAxis=a(this.$h(),i,n,s),e.yAxis=a(this.ij(),i,n,s),t.Yz(this,e,"xGrids",this.Yg,this.HK,i,n,s),t.Yz(this,e,"yGrids",this.Zg,this.HK,i,n,s),t.Yz(this,e,"xMinorGrids",this.jh,this.HK,i,n,s),t.Yz(this,e,"yMinorGrids",this.kh,this.HK,i,n,s)},t.g.HK=function(i,n,s,a){var o=i.F();return t.Zz(o,"scale",i.Ra(),n,s),t.Zz(o,"scale",i.bb(),n,s),(i=i.axis())&&(0>(a=(0,t.za)(a,t.oa(i)))?("layout"in o||(o.layout=t.J(i,e)?"circuit":"radial"),"scale"in o||t.Zz(o,"scale",i.scale(),n,s)):o.axis=a),o},t.g.R=function(){t.sd(this.mc,this.hl,this.Yg,this.Zg,this.jh,this.kh),this.kh=this.jh=this.Zg=this.Yg=this.hl=this.mc=null,t.g4.u.R.call(this)};var u=t.g4.prototype;u.xScale=u.Ra,u.yScale=u.bb,u.xGrid=u.lm,u.yGrid=u.nm,u.xMinorGrid=u.Qr,u.yMinorGrid=u.Tr,u.xAxis=u.$h,u.yAxis=u.ij,u.getSeries=u.ef,u.palette=u.cc,u.markerPalette=u.Nf,u.hatchFillPalette=u.ve,u.addSeries=u.kl,u.getSeriesAt=u.Ai,u.getSeriesCount=u.tj,u.removeSeries=u.Ao,u.removeSeriesAt=u.Rn,u.removeAllSeries=u.Dp,u.getPlotBounds=u.dg,u.getXScales=u.vy,u.getYScales=u.xy,t.H(t.i4,t.kz);var d=function(){var e={};return t.sq(e,[t.Z.zz,[0,"innerRadius",function(e){return t.yo(e,this.g("innerRadius"))}]]),e}();t.U(t.i4,d),t.g=t.i4.prototype,t.g.q4=function(e){return t.zk(o,e,"circuit")},t.g.c2=function(i){return t.J(i,e)?"circuit":"radial"},t.g.bb=function(e){if(t.p(e)){if(e=t.jt(this.Fc,e,null,15,null,this.Pla,this)){var i=this.Fc==e;this.Fc=e,this.Fc.da(i),i||this.B(68,9)}return this}return this.Fc?this.Fc:this.Xj?this.Xj.bb():null},t.g.Pla=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(20,8|i)},t.g.Ra=function(e){if(t.p(e)){if(e=t.jt(this.eb,e,null,t.bt,null,this.Lla,this)){var i=this.eb==e;this.eb=e,this.eb.da(i),i||this.B(68,9)}return this}return this.eb?this.eb:this.Xj?this.Xj.Ra():null},t.g.Lla=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(84,8|i)},t.g.vN=function(){return"radial"==this.we()},t.g.u0=function(){var e=this.Ra(),i=this.bb();return!(!e||!this.vN()&&!i)||(t.il(2),!1)};var p=t.i4.prototype;p.isRadial=p.vN,p.yScale=p.bb,p.xScale=p.Ra,p.axis=p.axis,t.H(t.j4,t.xB),t.g=t.j4.prototype,t.g.L2=function(){return this.eh()&&!!this.f||this.gh()},t.g.T1=function(e){var i=this.g("startAngle");return i=i-90+360*this.$().j("xRatio"),e||(i+=180),this.bb().Ne()&&(i+=180),t.ab(i)},t.g.t0=function(e,i){var n=e.measure(i),s=i.qk();s=t.Jo(s,180);var a=t.Eo(n,s);n=a.x,a=a.y,(n-this.Dc)*(n-this.Dc)+(a-this.uc)*(a-this.uc)>this.Eb*this.Eb&&i.qk(s)},t.g.oG=function(e){var i=this.$(),n=i.j(this.Ah.Ab),s=i.j(this.Ah.Ab+"X"),a=i.j(this.Ah.zb);return i=i.j(this.Ah.zb+"X"),t.Ipa(e,s,n,i,a)},t.g.N0=function(e){var i=this.$(),n=i.j(e),s=i.j(e+"X");if(!t.p(n)||!t.p(s))if(s=i.j("x"),n=i.get(e),t.p(n)){this.gh()&&(n+=i.j("stackedZero"));var a=this.q_(s,n)}else s=n=window.NaN;return a||(a={x:s,y:n}),a},t.g.nE=function(){var e=this.fa,i=this.ya;this.Eb=Math.min(e.width,e.height)/2,this.f=t.L(i.g("innerRadius"),this.Eb),this.Dc=Math.round(e.left+e.width/2),this.uc=Math.round(e.top+e.height/2),t.j4.u.nE.call(this)},t.g.bJ=function(e,i){if(t.j4.u.bJ.call(this,e,i),this.Vj.push(this.Lha),t.PA(this)&&!this.f){var n=this.Zs(0,[0]);this.b=n[0],this.Mi=n[1]}},t.g.uI=function(e,i){t.j4.u.uI.call(this,e,i,window.NaN)},t.g.YD=function(t,e,i,n,s){return this.f?(e=this.Zs(s,[this.YY]),t.j("zeroX",e[0]),t.j("zero",e[1])):(t.j("zeroX",this.b),t.j("zero",this.Mi)),t.j("zeroMissing",!1),n},t.g.Lha=function(e,i,n,s,a){return e.j("xRatio",t.$a(a,1)),s},t.g.YA=function(e,i,n){for(var s in t.j4.u.YA.call(this,e,i,n),i)e.j(s+"Ratio",i[s])},t.g.Zs=function(e,i){for(var n=[],s=this.g("startAngle"),a=0;a<i.length;a++){var o=i[a],r=t.$a(s-90+360*e,360),l=t.Tm(t.bb(r),4),h=0;90==(r=Math.round(r))?h=-.5:270==r&&(h=.5),o=this.f+(this.Eb-this.f)*o,n.push(this.Dc+o*Math.cos(l)+h,this.uc+o*Math.sin(l))}return n},t.g.yU=function(){return 0},t.g.f6=function(){return!0},t.g.ig=function(e){var i=t.Y.prototype.ig.call(this,e);if(this.eh())i.pointIndex=t.N(t.so(i.domTarget).index);else if(this.f6()){var n=e.clientX;e=e.clientY;var s=t.Zj(this.O().Ja());n=Math.PI/2+Math.atan2(e-s.y-Math.round(this.fa.top+this.fa.height/2),-(n-s.x-Math.round(this.fa.left+this.fa.width/2)))+t.bb(this.g("startAngle")),n=1-(n=t.$a(n,2*Math.PI))/(2*Math.PI),n=this.Ra().Mc(n),0>(n=t.Wz(this,n))&&(n=window.NaN),i.pointIndex=n}return i},t.g.q_=function(t,e,i){var n=this.Ra(),s=this.bb();return{x:(t=this.Zs(n.transform(t,i||0),[s.transform(e,.5)]))[0],y:t[1]}};var g=t.j4.prototype;g.transformXY=g.q_}.call(this,$)),_.theme_sankey||(_.theme_sankey=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{sankey:{nodePadding:8,nodeWidth:24,curveFactor:.33,tooltip:{titleFormat:"{%name}",format:"{%Value}"},node:{normal:{fill:t.zN,stroke:"none",labels:{enabled:!0,format:"{%name}",fontColor:"black",fontSize:10,disablePointerEvents:!0}},hovered:{fill:t.zN},tooltip:{titleFormat:"{%name} ({%value})",format:function(){var t,e=[],i=this.income,n=this.outcome,s=this.dropoff;if(i.length)for(e.push("Income:"),t=0;t<i.length;t++){var a=i[t];e.push("- "+a.name+": "+a.value)}if(n.length)for(e.push("Outcome:"),t=0;t<n.length;t++)a=n[t],e.push("- "+a.name+": "+a.value);return s&&e.push("Dropoff: "+s),e.join("\n")}}},flow:{normal:{fill:"grey 0.3",stroke:"none",labels:{enabled:!1,disablePointerEvents:!0,fontColor:"#000",padding:0}},hovered:{fill:t.EN,labels:{enabled:!0}}},dropoff:{normal:{fill:{angle:-90,keys:[{color:"red",offset:0},{color:"white",offset:1}]},stroke:"none",labels:{enabled:!1,disablePointerEvents:!0,fontColor:"#000",padding:0}},hovered:{labels:{enabled:!0}}}}})}.call(this,$)),_.theme_mekko||(_.theme_mekko=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{mekko:{defaultSeriesType:"mekko",isVertical:!1,normal:{labels:{enabled:!0}},defaultSeriesSettings:{base:{normal:{fill:t.DN,stroke:t.IN,labels:{format:"{%Value}{decimalsCount:2}",position:"center",offsetY:0,fontColor:"#ffffff"},markers:{position:"center",anchor:"center"}},hovered:{fill:t.BN,stroke:function(){return t.Wl(t.Pl(this.sourceColor),1)}},legendItem:{iconStroke:"none"},isVertical:!1,tooltip:{anchor:"left-top"}},mekko:{}},defaultXAxisSettings:{orientation:"bottom",title:{text:"X-Axis",padding:{top:5,right:0,bottom:0,left:0}},labels:{format:"{%Value}"},scale:0},defaultYAxisSettings:{orientation:"left",title:{text:"Y-Axis",padding:{top:0,right:0,bottom:5,left:0}},labels:{format:"{%Value}%"},scale:1},xAxes:[{}],yAxes:[{}],scales:[{type:"ordinal"},{type:"linear",stackMode:"percent",stackDirection:"direct",minimumGap:0,maximumGap:0},{type:"ordinal"},{type:"ordinal"}],crosshair:{enabled:!1,displayMode:"float",xStroke:"#969EA5",yStroke:"#969EA5",zIndex:41,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},xScale:0,yScale:1,firstCategoriesScale:2,lastCategoriesScale:3,defaultAnnotationSettings:{},annotations:{annotationsList:[],zIndex:2e3},pointsPadding:0,barsPadding:0,barGroupsPadding:0},mosaic:{pointsPadding:5,defaultXAxisSettings:{stroke:0,ticks:{enabled:!1}},defaultYAxisSettings:{stroke:0,ticks:{enabled:!1},labels:{format:"{%Value}"}}},barmekko:{scales:[{type:"ordinal"},{type:"linear",stackMode:"value",softMinimum:0},{type:"ordinal"},{type:"ordinal"}],defaultSeriesSettings:{mekko:{normal:{fill:function(){var e=1<this.chart.getSeriesCount()?this.sourceColor:this.chart.palette().itemAt(this.iterator.ma());return e=e||this.sourceColor,t.Ul(e,.85,!0)},stroke:function(){var e=1<this.chart.getSeriesCount()?this.sourceColor:this.chart.palette().itemAt(this.iterator.ma());return e=e||this.sourceColor,t.Wl(e,1)},labels:{format:"{%Value}{decimalsCount:2}",anchor:"auto",position:"value",fontColor:"#7c868e"},markers:{position:"value",positionFormatter:t.wN}},hovered:{fill:function(){var e=1<this.chart.getSeriesCount()?this.sourceColor:this.chart.palette().itemAt(this.iterator.ma());return e=e||this.sourceColor,t.Ul(e,.65,!0)}}}},defaultYAxisSettings:{labels:{format:"{%Value}"}},normal:{labels:{enabled:!1}}}})}.call(this,$)),_.timeline||(_.timeline=1,function(t){var e=function(){t.Y.call(this),this.path=t.qk(),t.T(this.ua,[["stroke",0,1]])},i=function(){t.Y.call(this),this.G=0,this.ye=[],this.o=0,this.i=new t.Fw,t.T(this.ua,[["stroke",16,1],["fill",16,1],["height",276,5]])},n=function(){this.jd=[]},s=function(){t.V.call(this),t.T(this.ua,[["length",0,1],["stroke",0,1]])},a=function(e){t.JA.call(this,e)},o=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),this.f="up",t.T(this.ua,[["direction",2048,1,4294967295]])},r=function(e,i){return t.p(i)?(e.f=i,e):e.f},l=function(t){var e=t.g("direction");return"auto"==e||"odd-even"==e?t.f:e},h=function(t,e,i,n,s){o.call(this,t,e,i,n,s)},c=function(e){t.JA.call(this,e)},u=function(e,i,n,s,a){o.call(this,e,i,n,s,a),t.T(this.ua,[["height",0,0]])},d=function(){t.Mz.call(this),this.Ga("timeline"),this.eb=new t.st,t.W(this,"scale",this.eb),this.eb.vz([[{unit:"minute",count:10},{unit:"hour",count:1},{unit:"day",count:1}],[{unit:"hour",count:4},{unit:"hour",count:12},{unit:"day",count:1}],[{unit:"day",count:1},{unit:"day",count:2},{unit:"week",count:1}],[{unit:"day",count:2},{unit:"week",count:1},{unit:"month",count:1}],[{unit:"month",count:1},{unit:"quarter",count:1},{unit:"year",count:1}],[{unit:"quarter",count:1},{unit:"year",count:1},{unit:"year",count:10}],[{unit:"year",count:1},{unit:"year",count:10},{unit:"year",count:50}],[{unit:"year",count:10},{unit:"year",count:50},{unit:"year",count:200}]]),this.axis().scale(this.eb),t.K(this.eb,this.ii,this),this.og=[],this.tg=[],this.rg=[],this.wj=this.D=0,this.P={CC:0,GE:0},this.Za=this.$a=0,this.ea=[],this.fb=[]},p=function(t){t.scale().reset(),t.Ha=window.Infinity,t.Ka=-window.Infinity,t.f={dj:0,Mj:t.fc.width,sg:-t.fc.height/2,mg:t.fc.height/2},t.axis().B(400),m(t,0,0)},g=function(e){for(var i=e.length-1;0<=i;i--){var n=e[i];t.p(n)&&n.md&&t.Ca(e,i,1)}},f=function(t){return t.axis().enabled()?t.axis().g("height"):0},m=function(e,i,n){!t.p(i)||i==e.$a&&n==e.Za||(e.$a=i,e.Za=n,t.nr(e,"timelinechart","scroll",1))},v=function(t,e){var i=t.dj-e.dj;return 0==i?e.Mj-t.Mj:i},b=function(t,e){var i=t.dj-e.dj;return 0==i?t.Mj-e.Mj:i},y=function(t,e){t.f.dj=Math.min(t.f.dj,e.dj),t.f.Mj=Math.max(t.f.Mj,e.Mj),t.f.sg=Math.min(t.f.sg,e.sg),t.f.mg=Math.max(t.f.mg,e.mg)},S=function(t){var e=new d;e.Ga("timeline"),e.ta("defaultSeriesType","moment");for(var i=0,n=arguments.length;i<n;i++)e.moment(arguments[i]);return e};t.H(e,t.Y);var x={};t.sq(x,[t.Z.Yn]),t.U(e,x),e.prototype.W=function(){return this.path.clear(),this.path.stroke(this.g("stroke")),this.zc()?(this.J(8)&&(this.path.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.path.parent(this.O()),this.I(2)),this):this},e.prototype.hq=function(e,i){if(0!=i.height){var n=t.dp(this.g("stroke"));n=t.R(i.left+e*i.width,n);var s=Math.floor(t.R(i.top,1));this.path.moveTo(n,Math.ceil(t.R(i.Va(),1))).lineTo(n,s)}},e.prototype.remove=function(){this.path&&this.path.parent(null)},e.prototype.R=function(){t.sd(this.path),this.path=null,e.u.R.call(this)},t.H(i,t.Y);var w={};t.sq(w,[t.Z.Yn,t.Z.yz,[0,"height",t.Bq]]),t.U(i,w),t.g=i.prototype,t.g.sa=464|t.Y.prototype.sa,t.g.ra=4|t.Y.prototype.ra,t.g.offset=function(e){return t.p(e)?(this.o!=e&&(this.o=e,this.B(400)),this):this.o},t.g.scale=function(e){return t.p(e)?(e!=this.qa&&(this.qa&&t.kr(this.qa,this.ii,this),this.qa=e,t.K(this.qa,this.ii,this)),this):this.qa},t.g.ii=function(){this.B(400,0)},t.g.Xa=function(i){return this.mb||(this.mb=new e,t.W(this,"ticks",this.mb),t.K(this.mb,this.li,this)),t.p(i)?(this.mb.N(i),this):this.mb},t.g.li=function(){this.B(256,1)},t.g.labels=function(e){return this.zj||(this.zj=new t.Hx,t.K(this.zj,this.lI,this),t.W(this,"labels",this.zj)),t.p(e)?(this.zj.N(e),this):this.zj},t.g.lI=function(){this.B(128,1)},t.g.W=function(){var e=this.scale();if(this.Uw(),!e)return t.il(2),this;if(!this.zc())return this;if(this.Na||(this.Na=this.O().Bd(),this.f||(this.f=this.Na.path(),this.D=this.Na.path(),this.D.zIndex(37)),this.Na.hc(this.gU())),this.b||(this.b=new t.bz,this.b.labels(this.labels()),t.dz(this.b),t.wl(this.b),this.b.va(t.KE|t.LE)),this.J(2)&&(this.Na.parent(this.O()),this.I(2)),this.J(8)&&(this.Na.zIndex(this.zIndex()),this.I(8)),this.J(4)){var i=this.ja();this.G=i.top+i.height/2;var n=(i=this.ja()).left,s=this.g("height");this.K=new t.I(n,this.G-s/2,i.width,s),this.B(400),this.I(4)}if(this.J(16)){var a=this.ja(),o=this.G,r=(i=this.g("height"))/2;this.f.clear(),this.D.clear(),n=this.g("stroke"),s=this.g("fill");var l=t.dp(n),h=this.scale().uj(),c=this.scale().transform(h.min);h=this.scale().transform(h.max+this.o),c*=a.width,h*=a.width,c+=a.left,a=h+a.left,c=t.R(c,l),a=t.R(a,l),h=t.R(o-r,l),o=t.R(o+r,l),this.Na.clip(new t.I(Math.floor(c),Math.floor(h),Math.ceil(a)-Math.floor(c),Math.ceil(o)-Math.floor(h))),0!=i&&(this.f.moveTo(c,h).lineTo(a,h).lineTo(a,o).lineTo(c,o).close(),this.D.moveTo(c,h).lineTo(a,h).lineTo(a,o).lineTo(c,o).close(),this.D.stroke(n),this.f.fill(s),this.f.stroke("none")),this.I(16)}if(this.J(256)){if(i=t.wr(this,"ticks"))for(i.O(this.Na),i.W(),n=this.Fn(),s=this.scale().uj(),e.Uj()&&(n.length=1),e=0;e<n.length;e++)o=n[e],r=this.scale().transform(o.start),o.start>=s.min&&i.hq(r,this.K);this.I(256)}return this.J(64)&&this.I(64),this.J(128)&&(this.labels().enabled()?(this.Lf.parent(this.Na),this.wi()):this.Lf.parent(null),this.I(128)),this},t.g.Fn=function(){var e,i=this.scale(),n=t.Ht(i),s=i.sj();for(e=0;e<n.length;e++){var a=i.Fn(void 0,void 0,n[e].unit,n[e].count,s);if(10>=a.length){4>a.length&&0<e&&(i.Fn(void 0,void 0,n[e-1].unit,n[e-1].count,s),e--);break}}return e==n.length&&e--,a=n[e].unit,e=n[e].count,this.P={unit:a,count:e},s.min+=this.o,s.max+=this.o,i.Fn(void 0,void 0,a,e,s)},t.g.gU=function(){return this.Lf||(this.xl=t.mg().Wo(),this.Lf=t.uk(this.xl)),this.Lf},t.g.wi=function(){var e=this.Fn(),i=this.scale(),n=this.ja(),s=this.g("height"),a=i.uj(),o=this.labels(),r=this.P.unit,l=i.Uj();l&&(e.length=1),t.vl.measure(),t.ez(this.b);for(var h=0;h<e.length;h++){var c=this.ye[h];c.text(w),c.style(o.flatten()),c.Ij(),h<e.length-1&&t.Rx(this.ye[h+1]);var u=e[h];if(u.start<a.min)t.Px(c,null);else{switch(r){case"minute":var d="hour";break;case"hour":d="day";break;case"day":d="month";break;default:d="year"}l&&(r="day",d="year"),w=t.ts(t.rs(r,d,"timeline")),d=n.left+n.width*i.transform(u.start);for(var p,g=l?n.left+n.width:n.left+n.width*i.transform(u.end),f=this.labels().padding().Ng(g-d),m=!1,v=window.Infinity,b="yyyy/MM/dd'T'HH:mm:ss.SSS",y=0;y<w.length;y++){var S=w[y],x=this.b.pA;if(S in x){if((x=Math.ceil(x[S].width))<=f){p=S,m=!0;break}x<=v&&(v=x,b=S)}}m||(p=b),f={autoFormat:{value:p,type:"string"},value:{value:t.us(u.start,p),type:"string"},tickValue:{value:u.start,type:"number"}},f=t.ov(this.i,f);var w=this.labels().tk(f);c.text(w),c.style(o.flatten()),t.Mx(c),c.Ij(),f=i.transform(u.start),i.transform(Math.min(u.end,a.max+this.o)),0!=s?t.Px(c,this.xl):t.Px(c,null),u=this.labels().padding(),m=t.R(n.left+n.width*f,1),v=Math.floor(this.G-s/2),b=s,f=g-d,d=u.Ej(new t.I(m,v,f,b)),t.Wx(c,d,this.Na.Ja()),t.Qx(c)}}for(h=e.length;h<this.ye.length;h++)t.Px(this.ye[h],null)},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.B(450)),!1))},t.g.remove=function(){this.Na&&this.Na.parent(null)},t.g.Uw=function(){var e=this.Fn();if(!this.ye.length)for(var i=0;i<e.length;i++){var n=new t.Ix;this.ye.push(n)}if(this.ye.length<e.length)for(i=this.ye.length;i<e.length;i++)this.ye.push(new t.Ix);return this.ye},t.g.R=function(){t.sd(this.mb,this.f,this.D,this.zj,this.ye),this.zj=this.D=this.f=this.mb=null,this.ye.length=0,i.u.R.call(this)};var C=i.prototype;C.ticks=C.Xa,C.labels=C.labels,n.prototype.b=function(t,e){var i=t.dj-e.dj;return 0==i?0==(i=t.Mj-e.Mj)?-1:i:t.dj-e.dj},n.prototype.f=function(t,e){return 0==t.sg-e.sg?t.mg-e.mg:t.sg-e.sg},n.prototype.add=function(e,i){var n=e.mg-e.sg;e.sg=0,e.mg=n,t.Ua(this.jd,e,this.b);var s,a=[],o=!0;for(s=0;s<this.jd.length;s++){var r=this.jd[s];r!=e?(r.Mj>e.dj&&o||r.dj<e.Mj&&!o)&&t.Ua(a,r,this.f):o=!1}for(s=0;s<a.length;s++)r=a[s],(e.sg<=r.mg&&e.sg>=r.sg||e.mg<=r.mg&&e.mg>=r.sg||r.sg<=e.mg&&r.sg>=e.sg||r.mg<=e.mg&&r.mg>=e.sg)&&(i?e.mg=r.mg+n:(e.sg=r.mg,e.mg=e.sg+n))},t.H(s,t.V),s.prototype.ra=1|t.V.prototype.ra;var T={};t.sq(T,[t.Z.Yn,t.Z.iK]),t.U(s,T),t.H(a,t.JA),t.PG[34]=a,a.prototype.type=34,a.prototype.flags=521,a.prototype.ug=function(e,i){var n=this.bd,s=e.get(this.X.Be()[0]),a={};a[(s=this.nh(s,this.prevValue)).stroke]=!0,e.j("names",s),n=n.ed(i,a)[s.stroke],s=e.j("x"),a=e.j("zero");var o=e.j("minLength"),r=t.dp(n.stroke()),l=e.j("axisHeight"),h="up"==(e.get("direction")||e.j("direction"));a+=h?-l/2:l/2,s=t.R(s,r),t.HA(n,this.xa,s,a),t.IA(n,this.xa,s,h?a-o:a+o)},t.H(o,t.xB),o.prototype.sa=t.xB.prototype.sa;var D={};t.sq(D,[t.Z.dZ]),t.U(o,D),t.g=o.prototype,t.g.my=function(){return 0},t.g.aO=function(){return!1},t.g.RD=function(e){e=t.Xk(e.Gh());var i=this.ya.Ra().sj();return e>=i.min||e<=i.max},t.g.gh=function(){return!1},t.g.jX=t.ia,t.g.bU=function(e,i,n){var s=this.data();return s.$(),this.jX(e,i,n),this.B(512),this.pd={data:e,X:this,cO:0,N2:this.check(t.QG)&&(s.hd("normal")||s.hd("hovered")||s.hd("selected")||s.hd("label")||s.hd("hoverLabel")||s.hd("selectLabel")||s.hd("minLabel")||s.hd("hoverMinLabel")||s.hd("selectMinLabel")||s.hd("maxLabel")||s.hd("hoverMaxLabel")||s.hd("selectMaxLabel")),O2:this.check(4194304)&&(s.hd("normal")||s.hd("hovered")||s.hd("selected")||s.hd("marker")||s.hd("hoverMarker")||s.hd("selectMarker")),P2:this.check(256)&&(s.hd("outliers")||s.hd("normal")||s.hd("hovered")||s.hd("selected")||s.hd("outlierMarker")||s.hd("hoverOutlierMarker")||s.hd("selectOutlierMarker")),XU:!1,Q2:!1,M2:!1}},t.g.vI=function(t){var e=this.g("direction");"auto"!=e&&"odd-even"!=e||(e=r(this)),t.j("direction",e),e=this.ja(),t.j("zero",e.top+e.height/2)},t.g.bJ=function(){this.Vj.push(this.vI)},t.g.F=function(){var e=o.u.F.call(this);return t.Tq(this,D,e),e},t.g.U=function(e,i){o.u.U.call(this,e,i),t.Iq(this,D,e,i)},t.H(h,o),t.g=h.prototype,t.g.vI=function(e,i,n,s,a){h.u.vI.call(this,e,i,n,s,a),i=this.ja(),n=this.Zf().g("length"),e.j("length",t.L(n,i.height)),e.j("x",i.left+i.width*a)},t.g.XA=function(t,e,i){var n=this.tl().transform(t.Gh());t.j("xRatio",n);for(var s=0;s<this.Vj.length;s++)this.Vj[s].call(this,t,e,i,0,n)},t.g.Zf=function(e){return this.b||(this.b=new s,this.b.kb(this),t.K(this.b,this.PC,this),t.W(this,"connector",this.b)),t.p(e)?(this.b.N(e),this):this.b},t.g.PC=function(){this.B(2048,1)},t.g.jX=function(t,e,i){for(var n=this.data().$();n.advance();){var s=i(n.get("x")),a={},o={};a.x=s,o.rawIndex=n.ma(),e(t,{data:a,j:o})}},t.g.Jp=function(){var t=this.$(),e=t.j("minLength"),i=this.ja();i=i.top+i.height/2;var n="up"==(t.get("direction")||l(this));return t=t.j("axisHeight")/2,n?i-e-t:i+e+t},t.g.AE=function(){return"up"==(this.$().get("direction")||l(this))?"center-bottom":"center-top"},t.g.ym=function(e,i){var n=h.u.ym.call(this,e,i);return n.date={value:t.ps(i.get("x")),type:"date-time"},n},t.g.R=function(){this.b&&(t.kr(this.b,this.PC,this),t.sd(this.b),this.b=null),h.u.R.call(this)},t.H(c,t.JA),t.PG[35]=c,c.prototype.type=35,c.prototype.flags=1537,c.prototype.ug=function(e,i){var n=this.bd,s=e.get(this.X.Be()[0]),a={};a[(s=this.nh(s,this.prevValue)).path]=!0,e.j("names",s),n=n.ed(i,a)[s.path],s=e.j("startX"),a=e.j("endX");var o=e.j("zero"),r=e.j("axisHeight");e.j("stackLevel");var l=e.get("direction")||e.j("direction"),h=e.j("startY"),c=e.j("endY");r="up"==l?(o-=r/2)-h-c:(o+=r/2)+h+c,l=t.dp(n.stroke()),s=t.R(s,l),a=t.R(a,l),n.moveTo(s,o).lineTo(s,r).lineTo(a,r).lineTo(a,o).close()},t.H(u,o);var k={};t.sq(k,[t.Z.hK]),t.U(u,k),t.g=u.prototype,t.g.XA=function(t,e,i){var n=this.tl(),s=n.transform(t.get("start"));for(n=n.transform(t.get("end")),t.j("startXRatio",s),t.j("endXRatio",n),s=0;s<this.Vj.length;s++)this.Vj[s].call(this,t,e,i,0)},t.g.vI=function(e,i,n,s,a){u.u.vI.call(this,e,i,n,s,a),i=this.ja(),n=e.j("startXRatio"),n=i.left+i.width*n,s=e.j("endXRatio"),t.ea(s)&&!(0,window.isNaN)(s)||(a=(s=this.tl()).uj().max,s=s.transform(a)),s=i.left+i.width*s,e.j("startX",n),e.j("endX",s),i=t.L(this.g("height"),i.height),e.j("height",i)},t.g.jX=function(t,e,i){for(var n=this.data().$();n.advance();){var s=i(n.get("start")),a=i(n.get("end")),o={},r={};o.start=s,o.end=a,r.rawIndex=n.ma(),e(t,{data:o,j:r})}},t.g.Bh=function(){var t=this.$(),e=t.j("height"),i=t.j("zero"),n=t.j("axisHeight"),s=t.j("startX");return n/=2,e=t.j("endY")-e/2,i=i+((t="up"==(t.get("direction")||l(this)))?-n:n)+(t?-e:e),(t=this.ya.fc.clone().left+this.ya.wj)>s&&(s=t),{value:{x:s||0,y:i||0}}},t.g.ym=function(e,i){var n=u.u.ym.call(this,e,i);return n.start={value:t.ps(i.get("start")),type:"date-time"},n.end={value:t.ps(i.get("end")),type:"date-time"},n},t.g.O_=function(t,e){var i=this.cg();i.select(e);var n=i.j("startX"),s=this.ya.fc.clone().left+this.ya.wj;s>n&&(n=s),s=i.j("endX"),i=i.j("height"),t.width(s-n),t.height(i)},t.H(d,t.Mz);var $={},O=1572864|t.QG;$.moment={Fb:34,Kb:2,Lb:[t.oH],Ob:null,Jb:null,Cb:4194304|O,zb:"zero"},$.range={Fb:35,Kb:2,Lb:[t.RH],Ob:null,Jb:null,Cb:O,zb:"zero"},d.prototype.fj=$,t.Nz(d,d.prototype.fj),d.prototype.sa=543227904|t.Mz.prototype.sa,d.prototype.ra=t.Bx.prototype.ra,t.Jz(d,"timelinechart",["scroll"]),t.g=d.prototype,t.g.gn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.rg[n];if(!a){a=new t.cA,t.p(!0)&&(a.i=!0);var o=t.tr(t.sr(this),"defaultRangeMarkerSettings");a.Ga(o),a.pa=this,t.dA(a,"vertical"),this.rg[n]=a,a.kb(this),t.K(a,this.NK,this),t.pd(a,this.QN,this),this.B(4194304,1)}return t.p(s)?(a.N(s),this):a},t.g.mn=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.tg[n];if(!a){var o=a=new t.fA;t.p(!0)&&(o.G=!0),o=t.tr(t.sr(this),"defaultTextMarkerSettings"),a.Ga(o),a.pa=this,t.$y(a,"vertical"),this.tg[n]=a,a.kb(this),t.K(a,this.NK,this),t.pd(a,this.QN,this),this.B(4194304,1)}return t.p(s)?(a.N(s),this):a},t.g.Ym=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.og[n];if(!a){a=new t.$z,t.p(!0)&&(a.i=!0);var o=t.tr(t.sr(this),"defaultLineMarkerSettings");a.Ga(o),a.pa=this,t.aA(a,"vertical"),this.og[n]=a,a.kb(this),t.K(a,this.NK,this),t.pd(a,this.QN,this),this.B(4194304,1)}return t.p(s)?(a.N(s),this):a},t.g.NK=function(e){var i=4194304;t.X(e,4)&&(i|=65536),this.B(i,1)},t.g.QN=function(){this.B(65536,1)},t.g.K6=function(e){if(!this.o){this.o=new t.$z,t.p(!0)&&(this.o.i=!0);var i=t.tr(t.sr(this),"defaultLineMarkerSettings");this.o.Ga(i),t.W(this,"todayMarker",this.o),this.o.pa=this,t.aA(this.o,"vertical"),this.o.kb(this),t.K(this.o,this.NK,this),t.pd(this.o,this.QN,this),i=new Date,this.o.value(Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDay())),this.B(4259840,1)}return t.p(e)?(this.o.N(e),this):this.o},t.g.Qh=function(e){if(!this.pf()){this.G||(this.G=this.Na.Bd(),this.G.zIndex(1),this.wc.Ce(this,"chartdraw",this.Wga)),this.K||(this.K=this.Na.Bd(),this.K.zIndex(.5)),this.ba||(this.ba=this.Na.Bd(),this.ba.zIndex(1)),this.J(4)&&(this.fc=e.clone(),this.B(543195136),t.nr(this,"timelinechart","scroll"),this.I(4)),this.Re=[],this.Sb=[],this.sb=[];var i=f(this);if(0==this.tj())p(this),this.fb.length=0,this.ea.length=0;else if(this.J(98304)){this.fb=[],this.ea=[];for(var s=window.Infinity,a=-window.Infinity,o=0,h=0,c=["up","down"],u=0;u<this.hb.length;u++){var d=this.hb[u],S=d.kk();switch(d.g("direction")){case"odd-even":"range"==S?(r(d,c[1&o]),o++):"moment"==S&&(r(d,c[1&h]),h++);break;case"auto":("range"==S||"moment"==S)&&r(d,"up")}switch(S){case"moment":this.fb.push(d);break;case"range":this.ea.push(d)}var x=t.yB(d,!1,!0),w=d,C=window.Infinity,T=-window.Infinity,D=w.Ec(),k=w.kk();if("moment"==k)for(;D.advance();){var $=t.Xk(D.get("x"));C=Math.min(C,$),T=Math.max(T,$)}else if("range"==k)for(;D.advance();){var O=t.Xk(D.get("start")),P=t.Xk(D.get("end"));(0,window.isNaN)(O)||((0,window.isNaN)(P)||(C=Math.min(C,P),T=Math.max(T,P)),C=Math.min(C,O),T=Math.max(T,O))}var L=C,I=T;s=Math.min(s,L),a=Math.max(a,I),this.Re.push(x),"range"==S?this.Sb.push(x):this.sb.push(x)}var A=s,E=a;if(-window.Infinity===E&&window.Infinity===A)p(this);else{g(this.og),g(this.rg),g(this.tg),this.o&&this.o.md&&(this.o=void 0);for(var G=t.Ga(this.og,this.rg,this.tg,[this.o]),U=[],F=0;F<G.length;F++){var M=G[F];if(M&&M.enabled()&&"consider"==M.g("scaleRangeMode"))for(var _=M.xs(),N=0;N<_.length;N++)U.push(t.ps(_[N]).getTime())}var R=Math.min.apply(null,U),j=Math.max.apply(null,U);if((A=Math.min(A,R))==(E=Math.max(E,j))){var B=t.tp("day",1);A-=B/2,E+=B/2}this.Ka==A&&this.Ha==E||(this.Ka=A,this.Ha=E,t.ut(this.scale(),this.Ka,this.Ha),this.eb.QI?(this.eb.kj.apply(this.eb,this.eb.MI),this.eb.QI=!1,this.eb.MI=null):(this.scale().ka(),this.scale().Qm(),this.scale().da(!1)));for(var H,z,V,q,W=this.Re,Y=[],K=[],X=[],J=[],Z=[],Q=[],tt=[],et=0;et<W.length;et++){var it=(q=W[et]).X.kk();if("range"==it){for(var nt,st,at,ot=q,rt=ot.X,lt=ot.data,ht=[],ct=[],ut=[],dt=f(this),pt=this.scale().uj().max,gt=rt.Ec(),ft=0;ft<lt.length;ft++){gt.select(ft);var mt=lt[ft],vt=gt.get("start"),bt=gt.get("name")||gt.get("x");if(null==vt||(0,window.isNaN)(vt)||null==bt)gt.j("missing",!0);else{at=this.scale().transform(mt.data.start)*this.fc.width,st=(0,window.isNaN)(mt.data.end)?this.scale().transform(pt)*this.fc.width:this.scale().transform(mt.data.end)*this.fc.width,nt=t.L(rt.g("height"),this.fc.height);var yt=gt.get("direction")||l(rt),St={dj:at,Mj:st,sg:0,mg:nt,direction:yt,X:rt,ZI:ft,pd:ot};ht.push(St),"up"==yt?ct.push(St):ut.push(St),mt.j.axisHeight=dt}}H=ht,z=ct,V=ut,Y=t.Ga(Y,H),K=t.Ga(K,H),X=t.Ga(X,z),J=t.Ga(J,V)}else if("moment"==it){var xt=q,wt=xt.X,Ct=xt.data,Tt=[],Dt=[],kt=[],$t=f(this),Ot=wt.labels();t.Yu(Ot);for(var Pt=wt.Db(),Lt=Pt.enabled()?Pt.g("size"):0,It=wt.$(),At=0;At<Ct.length;At++)if(It.select(At),null!=It.get("value")&&null!=It.get("x")){var Et=Ot.be(At),Gt=t.vB(wt,new t.Fw);null===Et?Et=Ot.add(Gt,{value:{x:0,y:0}},At):Et.Hf(Gt),Et.b=null;var Ut=Ot.measure(Et),Ft=Ot.g("offsetX")||0,Mt=Ct[At],_t=this.scale().transform(Mt.data.x)*this.fc.width-Lt,Nt=_t+Ut.width+Ft+Lt,Rt=50-Ut.height/2,jt=50+Ut.height/2,Bt=It.get("direction")||l(wt),Ht={dj:_t,Mj:Nt,sg:Rt,mg:jt,direction:Bt,X:wt,ZI:At,pd:xt};Tt.push(Ht),"up"==Bt?Dt.push(Ht):kt.push(Ht),Mt.j.axisHeight=$t}else It.j("missing",!0);H=Tt,z=Dt,V=kt,Y=t.Ga(Y,H),Z=t.Ga(Z,H),Q=t.Ga(Q,z),tt=t.Ga(tt,V)}}var zt=X,Vt=J,qt=Q,Wt=tt;t.Pa(zt,v),t.Pa(Vt,v),t.Pa(qt,b),t.Pa(Wt,b);var Yt=this.scale().uj();this.f={dj:window.Infinity,Mj:-window.Infinity,sg:window.Infinity,mg:-window.Infinity},this.f.dj=Math.min(this.f.dj,this.scale().transform(Yt.min)*this.fc.width),this.f.Mj=Math.max(this.f.Mj,this.scale().transform(Yt.max)*this.fc.width);var Kt,Xt,Jt=[],Zt=new n;for(Xt=0;Xt<zt.length;Xt++){(Kt=zt[Xt])&&-1==Jt.indexOf(Kt.X)&&(Kt.X.zIndex(34-Jt.length/100),Jt.push(Kt.X));var Qt=Kt.ZI,te=Kt.pd.data[Qt];Zt.add(Kt,!0),y(this,Kt),te.j.startY=Kt.sg,te.j.endY=Kt.mg,te.j.stateZIndex=1-Kt.mg/1e6}for(Xt=qt.length-1;0<=Xt;Xt--)Qt=(Kt=qt[Xt]).ZI,Zt.add(Kt),y(this,Kt),(te=Kt.pd.data[Qt]).j.minLength=Kt.sg+(Kt.mg-Kt.sg)/2;var ee=new n;for(Jt=[],Xt=0;Xt<Vt.length;Xt++)(Kt=Vt[Xt])&&-1==Jt.indexOf(Kt.X)&&(Kt.X.zIndex(34-Jt.length/100),Jt.push(Kt.X)),Qt=Kt.ZI,te=Kt.pd.data[Qt],ee.add(Kt,!0),te.j.startY=Kt.sg,te.j.endY=Kt.mg,te.j.stateZIndex=1-Kt.mg/1e6,y(this,{dj:Kt.dj,Mj:Kt.Mj,sg:-Kt.mg,mg:-Kt.sg});for(Xt=Wt.length-1;0<=Xt;Xt--)Qt=(Kt=Wt[Xt]).ZI,ee.add(Kt),(te=Kt.pd.data[Qt]).j.minLength=Kt.sg+(Kt.mg-Kt.sg)/2,y(this,{dj:Kt.dj,Mj:Kt.Mj,sg:-Kt.mg,mg:-Kt.sg});var ie=i/2;this.f.sg-=ie,this.f.mg+=ie;var ne=t.wr(this,"scroller"),se=0,ae=0;if(ne&&ne.enabled()){var oe=ne.g("orientation"),re=ne.g("height");switch(oe){case"top":se=re;break;case"bottom":ae=re}}var le=this.fc.height/2,he=le-Math.abs(this.f.sg)-ae,ce=this.f.mg-le-se;if(this.f.mg-this.f.sg<=this.fc.height){var ue=qt.length+zt.length,de=Wt.length+Vt.length;ue&&!de?m(this,he,he):!ue&&de?m(this,ce,ce):ue&&de&&m(this,0,0)}else m(this,he,ce)}}var pe=t.wr(this,"scroller"),ge=t.wr(this,"axis");if(this.J(536870912)&&(pe&&(pe.O(this.Na),pe.ja(this.fc),pe.W()),this.I(536870912)),t.rr(this,"timelinechart","scroll")){var fe=this.G.kp(),me=this.P,ve=me.CC,be=me.GE,ye=ve*(this.fc.height-this.axis().height());.5==Math.abs(ve)&&(ye+=be),this.D=ye,this.f&&this.wj+this.fc.cb()>this.f.Mj+this.fc.left?this.wj=this.f.Mj-this.fc.cb()+this.fc.left:this.f&&this.wj+this.fc.tb()<this.f.dj+this.fc.left&&(this.wj=this.f.dj-this.fc.tb()+this.fc.left),this.D=t.Za(this.D,this.$a,this.Za),fe[4]=-this.wj,fe[5]=this.D,this.G.oc.apply(this.G,fe);var Se=this.fc.clone();Se.left+=this.wj,Se.top-=this.D,this.G.clip(Se),fe[5]=0,this.K.oc.apply(this.K,fe),Se.top=this.fc.top,this.K.clip(Se);var xe=this.D,we=0;ge&&(we=ge.g("height")/2);var Ce=0,Te=0;if(pe&&pe.enabled()){var De=pe.g("height"),ke=pe.g("orientation");"top"==ke?Ce=De:"bottom"==ke&&(Te=De)}(Se=this.fc.clone()).left+=this.wj,this.D>this.fc.height/2-we-Te?xe=this.fc.height/2-we-Te:this.D<-this.fc.height/2+we+Ce&&(xe=-this.fc.height/2+we+Ce),fe[5]=xe,this.ba.oc.apply(this.ba,fe),this.ba.clip(Se);for(var $e=0;$e<this.ea.length;$e++){var Oe=this.ea[$e];Oe.B(256),Oe.ja(this.fc),Oe.O(this.G),Oe.W()}t.pr(this,"timelinechart","scroll")}if(this.J(65536)&&(this.B(6324224),this.I(65536)),this.J(32768)){for($e=0;$e<this.hb.length;$e++)(Oe=this.hb[$e]).ja(this.fc),Oe.O(this.G),Oe.W();this.I(32768)}if(this.J(2097152)&&(ge&&(ge.ja(this.fc),ge.O(this.ba),ge.W()),this.I(2097152)),this.J(4194304)){var Pe=t.Ga(this.og,this.rg,this.tg,[this.o]);for($e=0;$e<Pe.length;$e++){var Le=Pe[$e];Le&&(Le.B(4),Le.ka(),Le.scale()||Le.WK(this.eb),Le.ja(this.fc),Le.O(this.K),Le.W(),Le.da(!1))}this.I(4194304)}}},t.g.J_=function(e){var i=this.scale().sj(),n=this.scale().uj(),s=e.deltaY;if(t.RC&&(s*=15),!e.shiftKey&&this.gd().g("zoomOnMouseWheel")){e.preventDefault();var a=0>e.deltaY;if(i.min<=n.min&&i.max>=n.max&&!a)return;i=e.clientX,this.scale().Mc((i+this.wj)/this.fc.width),this.scale().Mc(this.wj/this.fc.width),this.scale().Mc((this.wj+this.fc.width)/this.fc.width),this.ka(),n=t.Zj(this.O().Ja()),i=(i-this.fc.left-n.x)/this.fc.width,a?this.Vr(1.2,i):this.Wr(1.2,i),this.da(!0)}this.gd().g("scrollOnMouseWheel")&&(e.preventDefault(),this.move(0,s))},t.g.move=function(t,e){this.moveTo(this.wj+t,this.D-e)},t.g.moveTo=function(e,i){var n=this.scale().sj(),s=this.scale().uj(),a=e-this.wj,o=i-this.D;if(this.G){this.wj=e,this.D=i,0!=a&&(this.wj+this.fc.cb()>this.f.Mj+this.fc.left?this.wj=this.f.Mj-this.fc.cb()+this.fc.left:this.wj+this.fc.tb()<this.f.dj+this.fc.left&&(this.wj=this.f.dj-this.fc.tb()+this.fc.left)),0!=o&&(this.D=t.Za(i,this.$a,this.Za)),a=this.fc.height-f(this),o=this.D/a;var r=t.Za(o,-.5,.5);this.P.CC=r,this.P.GE=(o-r)*a,a=this.scale().Mc(this.wj/this.fc.width),o=this.scale().Mc((this.wj+this.fc.width)/this.fc.width),n=a-n.min,r=s.max-s.min,t.IB(this.K_(),(a-s.min)/r,(o-s.min)/r),this.ka(),this.B(2097152),this.axis().offset(n),t.nr(this,"timelinechart","scroll",1),this.da(!0)}},t.g.Wga=function(){this.aa||(this.aa=new t.Ex(this.O().Ja().Tl(),!1),this.aa.wa("mousewheel",this.J_,!1,this)),this.Na.wa("mousedown",this.e4,!0,this)},t.g.e4=function(e){var i=this.fc,n=t.wr(this,"scroller");n&&n.enabled()&&(i=n.yd()),n=t.Zj(this.O().Ja()),i&&e.clientX>=i.left+n.x&&e.clientX<=i.left+n.x+i.width&&e.clientY>=i.top+n.y&&e.clientY<=i.top+n.y+i.height&&(this.na=e.clientX,this.Ba=e.clientY,this.Na.wa("mousemove",this.bB,!0,this),t.Ld(t.Lp,"mouseup",this.cB,!0,this))},t.g.bB=function(t){this.move(this.na-t.clientX,this.Ba-t.clientY),this.na=t.clientX,this.Ba=t.clientY},t.g.cB=function(){this.Na.gc("mousemove",this.bB,!0,this),t.Yd(window.document,"mouseup",this.cB,!0,this)},t.g.axis=function(e){return this.b||(this.b=new i,t.K(this.b,this.I_,this),t.wl(this.b),t.W(this,"axis",this.b)),t.p(e)?(this.b.N(e),this):this.b},t.g.Ra=function(){return this.scale()},t.g.I_=function(e){var i=2097152;t.X(e,32772)&&(i|=32772),this.B(i,1)},t.g.scale=function(e){return t.p(e)?(this.eb.N(e),this):this.eb},t.g.ii=function(e){t.X(e,4)&&((e=this.scale()).uj(),e.sj(),this.moveTo(0,this.D),this.B(2162688,1))},t.g.Gt=function(t,e){return"moment"==t?new h(this,this,t,e,!0):new u(this,this,t,e,!0)},t.g.wy=function(){return null},t.g.uy=function(){return null},t.g.bb=function(){return this.Fc||(this.Fc=new t.Mt),this.Fc},t.g.xa=function(){return!1},t.g.kj=function(e,i){this.ka();var n=t.Xk(e),s=t.Xk(i);this.scale().kj(n,s);var a=t.wr(this,"scroller");if(a){var o=this.scale().uj(),r=o.max-o.min;t.IB(a,(n-o.min)/r,(s-o.min)/r)}return this.da(!0),this},t.g.Qm=function(){return this.ka(),this.scroll(0),this.scale().Qm(),this.B(65536,1),this.da(!0),this},t.g.scroll=function(e){return t.p(e)&&(e=+e,this.D!=e)?(this.moveTo(this.wj,e),this):this.D},t.g.KY=function(e){if(t.p(e)){var i=t.p(e.CC)?t.Za(e.CC,-.5,.5):0;return e=t.p(e.GE)&&.5==Math.abs(i)?e.GE:0,this.P.CC===i&&this.P.GE===e||(this.P={CC:i,GE:e},t.nr(this,"timelinechart","scroll")),this}return this.P},t.g.Ma=function(){return"timeline"},t.g.K_=function(e){return this.i||(this.i=new t.TB,this.i.kb(this),t.K(this.i,this.Yca,this),this.wc.wa(this.i,"scrollerchange",this.L_),this.wc.wa(this.i,"scrollerchangefinish",this.L_),t.W(this,"scroller",this.i),this.B(536870916,1)),t.p(e)?(this.i.N(e),this):this.i},t.g.Yca=function(e){var i=536870912,n=1;t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.L_=function(t){var e=this.scale().uj(),i=e.max-e.min;this.kj(e.min+t.startRatio*i,e.min+t.endRatio*i)},t.g.Fh=function(){return this},t.g.Vr=function(e,i){var n=this.scale(),s=n.sj(),a=t.p(i)?i:.5,o=n.uj().max-n.uj().min,r=n.Mc(this.wj/this.fc.width);return 2e-4>(r=(s={min:r,max:r+(s.max-s.min)}).max-s.min)/o||(r=Math.round(r*((e?1/e:.625)-1)),o=s.min-r*a,r=s.max+r*(1-a),6e4>=Math.abs(o-r)&&(o=(s=(s.min+s.max)/2)-6e4*a,r=s+6e4*(1-a)),n.kj(o,r)),this},t.g.Wr=function(e,i){e=e||1.6;var n=this.scale(),s=n.sj(),a=t.p(i)?i:.5,o=n.Mc(this.wj/this.fc.width);return s={min:o,max:o+(s.max-s.min)},o=Math.round((s.max-s.min)*(e-1)),n.kj(s.min-o*a,s.max+o*(1-a)),this},t.g.U=function(t,e){d.u.U.call(this,t,e),t.scale&&(this.scale(t.scale),this.Ka=t.scale.dataMinimum,this.Ha=t.scale.dataMaximum),t.axis&&this.axis(t.axis),this.KY(t.verticalRelativeOffset),this.Kg(t.lineAxesMarkers,this.Ym),this.Kg(t.textAxesMarkers,this.mn),this.Kg(t.rangeAxesMarkers,this.gn),t.todayMarker&&this.K6(t.todayMarker),this.kP(t)},t.g.kP=function(e){var i=e.series;if(t.A(i))for(var n=0;n<i.length;n++){var s=(e=i[n]).seriesType||this.g("defaultSeriesType");(s=this.Ae(s,e))&&s.N(e)}},t.g.Kg=function(t,e){for(var i=0;i<t.length;i++)e.call(this,i).N(t[i])},t.g.F=function(){var e,i=d.u.F.call(this);for(i.scale=this.scale().F(),i.axis=this.axis().F(),i.lineAxesMarkers=[],e=0;e<this.og.length;e++)i.lineAxesMarkers.push(this.og[e].F());for(i.textAxesMarkers=[],e=0;e<this.tg.length;e++)i.textAxesMarkers.push(this.tg[e].F());for(i.rangeAxesMarkers=[],e=0;e<this.rg.length;e++)i.rangeAxesMarkers.push(this.rg[e].F());return t.p(this.o)&&(i.todayMarker=this.o.F()),this.eP(i),i.type=this.Ma(),i.verticalRelativeOffset=this.KY(),{chart:i}},t.g.eP=function(t){var e,i=[];for(e=0;e<this.hb.length;e++){var n=this.hb[e].F();i.push(n)}i.length&&(t.series=i)},t.g.nfa=function(){var t=this.o2();return this.scale().Jr(t.min,t.max),this},t.g.o2=function(){var t=this.scale(),e=t.sj();return{min:t=t.Mc(this.wj/this.fc.width),max:t+(e.max-e.min)}},t.g.R=function(){t.kr(this.eb,this.ii,this),t.kr(this.b,this.I_,this),this.Na.gc("mousedown",this.e4,!0,this),this.Na.gc("mousemove",this.bB,!0,this),t.Yd(t.Lp,"mouseup",this.cB,!0,this),this.aa.gc("mousewheel",this.J_,!1,this),t.sd(this.b,this.eb,this.Fc,this.og,this.tg,this.rg,this.G,this.o,this.K),this.Fc=this.eb=this.b=null,this.og.length=0,this.tg.length=0,this.rg.length=0,this.K=this.G=this.o=null,d.u.R.call(this)};var P=d.prototype;P.axis=P.axis,P.scale=P.scale,P.fitAll=P.Qm,P.fit=P.Qm,P.zoomTo=P.kj,P.getType=P.Ma,P.getCurrentScene=P.Fh,P.zoomIn=P.Vr,P.zoomOut=P.Wr,P.getSeries=P.ef,P.addSeries=P.kl,P.getSeriesAt=P.Ai,P.getSeriesCount=P.tj,P.removeSeries=P.Ao,P.removeSeriesAt=P.Rn,P.removeAllSeries=P.Dp,P.scroll=P.scroll,P.lineMarker=P.Ym,P.textMarker=P.mn,P.rangeMarker=P.gn,P.todayMarker=P.K6,P.scroller=P.K_,P.forceScaleUpdate=P.nfa,P.getVisibleRange=P.o2,P.verticalRelativeOffset=P.KY,t.Tp.timeline=S,t.E("anychart.timeline",S)}.call(this,$)),_.theme_resource||(_.theme_resource=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{resource:{calendar:{},conflicts:{labels:{enabled:!0,anchor:"left-top",hAlign:"center",fontSize:"8pt",padding:0,fontColor:"#F4F4F4",format:"{%hours}{decimalsCount:1}h ({%percent}{decimalsCount:2}%)"},fill:"#dd2c00",stroke:"none",hatchFill:null,height:15,zIndex:100},overlay:{enabled:!1},activities:{normal:{labels:{enabled:!0,anchor:"left-top",fontColor:"#F4F4F4",format:"{%name} ({%hoursPerDayRounded}{decimalsCount:1}h)",position:"left-top"},fill:"#1976d2",stroke:null,hatchFill:!1},hovered:{labels:{enabled:null},fill:t.FN,stroke:t.zN,hatchFill:null},selected:{labels:{enabled:null},fill:"#333",stroke:t.zN,hatchFill:null}},resourceList:{oddFill:"none",evenFill:"none",enabled:!0,width:"100%",height:"100%",background:{enabled:!0,fill:"#F3F7FA",stroke:"none",cornerType:"none",corners:0},images:{borderRadius:10,opacity:1,align:"none",fittingMode:"meet",size:"25%",margin:{top:5,right:0,bottom:5,left:5}},baseSettings:{margin:{top:2,right:0,bottom:3,left:5},fontSize:15,textOverflow:"...",fontFamily:'"Helvetica Neue","Helvetica",sans-serif'},names:{margin:{top:5,right:0,bottom:3,left:5},fontSize:17,fontWeight:"bold",fontColor:"#000"},types:{fontSize:10,fontColor:"#212121"},descriptions:{fontSize:12,fontColor:"#959CA0",fontWeight:"bold"},tags:{fontSize:9,fontColor:"#212121",background:{enabled:!0,fill:"#eee",stroke:"#ccc",cornerType:"round",corners:4},padding:5,margin:{top:2,right:0,bottom:3,left:5}},drawTopLine:!1,drawRightLine:!1,drawBottomLine:!0,drawLeftLine:!1,stroke:"#ccc",zIndex:2,overlay:!0},logo:{enabled:!0,fill:"#E7ECF0",stroke:"none",bottomStroke:"#ccc",zIndex:2,overlay:!1},timeLine:{enabled:!0,background:{enabled:!1},overlay:{enabled:!1},zIndex:2,vAlign:"middle",hAlign:"center",textOverflow:"",fill:"none",stroke:"#ccc",padding:[2,10,2,10],fontSize:11,fontWeight:"bold",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',drawTopLine:!1,drawRightLine:!1,drawBottomLine:!0,drawLeftLine:!1},grid:{overlay:{enabled:!1},background:{enabled:!1,fill:"#F3F7FA"},oddFill:"#fff",evenFill:"#fff",oddHolidayFill:"#F4F4F4 .7",evenHolidayFill:"#F4F4F4 .7",oddHatchFill:null,evenHatchFill:null,oddHolidayHatchFill:null,evenHolidayHatchFill:null,horizontalStroke:"#ccc",verticalStroke:"#ccc",drawTopLine:!1,drawRightLine:!1,drawBottomLine:!0,drawLeftLine:!1,zIndex:2},xScale:{minimumGap:.01,maximumGap:.01},horizontalScrollBar:{enabled:!0,allowRangeChange:!1,autoHide:!0,orientation:"bottom",thumbs:!1,fill:null,zIndex:1010},verticalScrollBar:{enabled:!0,allowRangeChange:!1,autoHide:!0,orientation:"right",thumbs:!1,fill:null,zIndex:1010,inverted:!0},zoomLevels:[{id:"days",levels:[{unit:"day",count:1,formats:["MMM\ndd  EEEE"],format:function(){return this.value.toUpperCase()},hAlign:"left"}],unit:"day",count:1,unitPixSize:220},{id:"weeks",levels:[{unit:"day",count:1,formats:["dd EEE","dd"],hAlign:"left",fill:"#fff",fontColor:"#ABB6BC",format:function(){return this.value.toUpperCase()},height:30},{unit:"week",count:1,formats:["w MMM"],fill:"#F0F5F8",format:function(){return this.value.toUpperCase()}}],unit:"day",count:1,unitPixSize:100},{id:"months",levels:[{unit:"day",count:1,formats:["d EEE","d"],hAlign:"center",padding:[2,5,2,5],fill:"#fff",format:function(){return this.value.toUpperCase()},height:30},{unit:"week",count:1,formats:["w MMM"],fill:"#F0F5F8",format:function(){return this.value.toUpperCase()}}],unit:"day",count:1,unitPixSize:25}],zoomLevel:0,padding:0,margin:20,resourceListWidth:260,timeLineHeight:52,cellPadding:[2,2,2,2],minRowHeight:50,pixPerHour:25,defaultMinutesPerDay:60,splitterStroke:"#ccc",timeTrackingMode:"activity-per-resource",background:{enabled:!0,stroke:"#ccc"},tooltip:{allowLeaveScreen:!1,allowLeaveChart:!0,displayMode:"single",positionMode:"float",title:{enabled:!0,fontSize:13},separator:{enabled:!0},titleFormat:"{%name}",format:function(){return"Starts: "+t.vs(this.start)+"\nEnds: "+t.vs(this.end)}}}}),t.ra(t.fa.anychart.themes.defaultTheme.standalones,{resourceList:{width:"33%",height:"100%",background:{enabled:!0,fill:"#ccc",stroke:"#ccc",cornerType:"none",corners:0},rowHeight:null,minRowHeight:"20%",maxRowHeight:"50%",images:{borderRadius:10,opacity:1,align:"none",fittingMode:"meet",size:"25%",margin:{top:5,right:0,bottom:5,left:5}},baseSettings:{margin:{top:2,right:0,bottom:3,left:5},fontSize:15,textOverflow:"..."},names:{margin:{top:5,right:0,bottom:3,left:5}},types:{fontSize:10,fontColor:"#212121"},descriptions:{fontSize:12,fontColor:"#545f69",fontStyle:"oblique"},tags:{fontSize:9,fontColor:"#212121",background:{enabled:!0,fill:"#eee",stroke:"#ccc",cornerType:"round",corners:4},padding:5,margin:{top:2,right:0,bottom:3,left:5}}}})}.call(this,$)),_.theme_polar||(_.theme_polar=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{polar:{defaultSeriesType:"marker",defaultSeriesSettings:{base:{closed:!0,clip:!1},area:{},line:{},marker:{},column:{},rangeColumn:{}},xAxis:{scale:0,zIndex:25,fill:"none",labels:{position:"outside",vAlign:"middle",hAlign:"middle",anchor:"auto",zIndex:25},minorLabels:{anchor:"auto",zIndex:25},ticks:{zIndex:25},minorTicks:{zIndex:25}},yAxis:{scale:1},startAngle:0,spreadValues:"none",innerRadius:0,sortPointsByX:!1,xGrids:[{}],yGrids:[{}],minorGrids:[],scales:[{type:"linear"},{type:"linear"}],xScale:0,yScale:1,barsPadding:0,barGroupsPadding:0,a11y:{titleFormat:t.QN}}})}.call(this,$)),_.theme_surface||(_.theme_surface=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{surface:{rotationZ:17,rotationY:35,box:null,stroke:{color:""},colorScale:{type:"linear-color"},colorRange:{marker:{enabled:!1,type:"triangle-down"},labels:{useHtml:!0}},markers:{enabled:!1,type:"circle",size:4,fill:t.zN,stroke:t.EN,tooltip:{enabled:!0,format:"x: {%x}\ny: {%y}\nz: {%z}",titleFormat:"Marker: {%index}",separator:{enabled:!1},title:{enabled:!1}},droplines:{enabled:!1,stroke:"#CECECE"}},xAxis:{enabled:!0,orientation:"right",stroke:"red",labels:{useHtml:!0},ticks:{stroke:"red"},minorLabels:{useHtml:!0},minorTicks:{stroke:t.Pl("red")}},yAxis:{enabled:!0,orientation:"bottom",stroke:"green",labels:{useHtml:!0},minorLabels:{useHtml:!0},ticks:{stroke:"green"},minorTicks:{stroke:t.Pl("green")}},zAxis:{enabled:!0,orientation:"left",stroke:"blue",labels:{useHtml:!0},minorLabels:{useHtml:!0},ticks:{stroke:"blue"},minorTicks:{stroke:t.Pl("blue")}},xGrid:{zIndex:35,enabled:!0},yGrid:{zIndex:35,enabled:!0},zGrid:{zIndex:35,enabled:!0}}})}.call(this,$)),_.theme_wordtree||(_.theme_wordtree=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{wordtree:{maxFontSize:36,minFontSize:7,fontFamily:"Verdana, Helvetica, Arial, sans-serif",fontColor:"#7c868e",fontDecoration:"none",fontOpacity:1,fontStyle:"normal",fontWeight:400,postfix:"more",connectors:{stroke:"2 #888888",curveFactor:.5,length:30,offset:5},tooltip:{titleFormat:"{%Value}",format:"Weight: {%weight}"}}})}.call(this,$)),_.theme_cartesian||(_.theme_cartesian=1,function(t){var e=function(){return t.vs(this.x)},i=function(){return t.vs(this.tickValue)};t.ra(t.fa.anychart.themes.defaultTheme,{cartesian:{defaultSeriesType:"line",defaultSeriesSettings:{base:{xMode:"ordinal"}}},area:{defaultSeriesType:"area",tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"}},bar:{isVertical:!0,defaultSeriesType:"bar",defaultXAxisSettings:{orientation:"left"},defaultYAxisSettings:{orientation:"bottom"},scales:[{type:"ordinal",inverted:!0},{type:"linear",stackDirection:"reverse"}],tooltip:{displayMode:"single",position:"right-center",anchor:"left-center"},xScroller:{orientation:"left",inverted:!0},yScroller:{orientation:"bottom",inverted:!1}},column:{defaultSeriesType:"column",tooltip:{displayMode:"single",position:"center-top",anchor:"center-bottom",offsetX:0,offsetY:10},scales:[{type:"ordinal"},{type:"linear",softMinimum:0}]},line:{defaultSeriesType:"line",tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"}},box:{defaultSeriesType:"box"},financial:{defaultSeriesType:"candlestick",defaultSeriesSettings:{candlestick:{tooltip:{titleFormat:e},normal:{labels:{format:e}}},ohlc:{tooltip:{titleFormat:e},normal:{labels:{format:e}}}},xAxes:[{labels:{format:i},minorLabels:{format:i}}],scales:[{type:"date-time"},{type:"linear"}]},candlestick:{defaultSeriesType:"candlestick"},ohlc:{defaultSeriesType:"ohlc"},verticalLine:{isVertical:!0,defaultSeriesType:"line",defaultXAxisSettings:{orientation:"left"},defaultYAxisSettings:{orientation:"bottom"},scales:[{type:"ordinal",inverted:!0},{type:"linear"}],tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"},xScroller:{orientation:"left",inverted:!0},yScroller:{orientation:"bottom",inverted:!1}},verticalArea:{isVertical:!0,defaultSeriesType:"area",defaultXAxisSettings:{orientation:"left"},defaultYAxisSettings:{orientation:"bottom"},scales:[{type:"ordinal",inverted:!0},{type:"linear"}],tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"},xScroller:{orientation:"left",inverted:!0},yScroller:{orientation:"bottom",inverted:!1}}})}.call(this,$)),_.polar_part||(_.polar_part=1,function(t){var e=function(e,i,n,s,a,o,r,l,h,c,u,d,p,g){n=t.Tm(p+n*Math.PI*2,4),p=((r=t.Tm(p+r*Math.PI*2,4))-n)/3,n=t.Tm(n+p,4),r=t.Tm(r-p,4),s=d+(s+(p=(l-s)/3))*(u-d),u=d+(l-p)*(u-d),l=t.hn(n,s,h),d=t.jn(n,s,c),h=t.hn(r,u,h),c=t.jn(r,u,c),g.push((-5*e+18*l-9*h+2*a)/6,(-5*i+18*d-9*c+2*o)/6,(2*e-9*l+18*h-5*a)/6,(2*i-9*d+18*c-5*o)/6,a,o)},i=function(i,n,s,a,o,r,l,h,c,u,d,p,g,f){f?(s<l&&(s+=1),f=-.25):(l<s&&(l+=1),f=.25);var m=Math.ceil(s/f)*f,v=Math.floor(l/f)*f;s==m&&(m+=f),l==v&&(v-=f);for(var b=(l-s)/(h-a),y=[];0>=(m-v)*f;m+=f){var S=t.Tm(g+m*Math.PI*2,4),x=(m-s)/b+a,w=p+(d-p)*x,C=t.hn(S,w,c);S=t.jn(S,w,u),y.push(0==s%1?1:0),e(i,n,s,a,C,S,m,x,c,u,d,p,g,y),i=C,n=S,s=m,a=x}return y.push(0==s%1?1:0),e(i,n,s,a,o,r,l,h,c,u,d,p,g,y),y},n=function(i,n,s,a,o,r,l,h,c,u,d,p,g,f){f?(s<l&&(s+=1),f=-.25):(l<s&&(l+=1),f=.25);for(var m=(l-s)/(h-a),v=[],b=s+f;0>(b-l)*f;b+=f){var y=t.Tm(g+b*Math.PI*2,4),S=(b-s)/m+a,x=p+(d-p)*S,w=t.hn(y,x,c);y=t.jn(y,x,u),e(i,n,s,a,w,y,b,S,c,u,d,p,g,v),i=w,n=y,s=b,a=S}return e(i,n,s,a,o,r,l,h,c,u,d,p,g,v),v},s=function(){function e(){this.pj()}this.ka(),t.Y.call(this),this.Ga(t.ur.axis),this.ci=[],this.Fk=[],this.$n=t.qk(),this.Pc=t.qk(),t.ru(this,this.$n),t.ru(this,this.Pc),this.sf=404,this.da(!1),t.T(this.ua,[["overlapMode",this.sf,9,0,e],["fill",16,1],["stroke",this.sf,9,0,e],["startAngle",this.sf,9,0,e]])},a=function(e){if(e.J(4)){e.pj();var i=e.scale(),n=e.ja()||t.kn(0,0,0,0);e.Oc=Math.max(Math.round(Math.min(n.width,n.height)/2),0),e.tc=Math.round(n.left+n.width/2),e.vc=Math.round(n.top+n.height/2);var s=e.labels(),a=s.g("position"),h="normal"==a?1:t.Ho(a),c=e.qb(),u=s.g("position"),d="normal"==u?1:t.Ho(u);if(s.clear().ja(n),c.clear().ja(n),e.I(4),i&&e.Oc&&e.enabled()){var p=e.Xa(),g=t.J(i,t.Qt),f=s.enabled(),m=c.enabled(),v=t.dp(e.g("stroke")),b=t.Io(p);if(t.uo(b)){var y=!0;b=(0,window.parseFloat)(b)}var S=(0,window.parseFloat)(t.Io(p,h)),x=e.yb(),w=g?0:t.Io(x);t.uo(w)&&(w=(0,window.parseFloat)(w));var C=g?0:(0,window.parseFloat)(t.Io(x,d)),T=b||f?i.Xa().get():[],D=g||!w&&!m?[]:i.yb().get();g||l(0,T,i,0)||(1==l(D.length-1,D,i,1)&&D.pop(),1==l(T.length-1,T,i,1)&&T.pop());var k,$,O=[],P=[],L=[],I=v/2,A="none"!=e.g("fill"),E=A?e.Hda:e.Gda,G=g?e.g("overlapMode"):"no-overlap",U=window.NaN,F=0;do{var M=!1,_=k=0,N=l(_,T,i,.5);for($=l(k,D,i,.5);!(0,window.isNaN)(N)||!(0,window.isNaN)($);){if((0,window.isNaN)($)||N<=$)var R=N,j=!0,B=_,H=f,z=S,V=b,q=T,W=e.ci,Y=s,K=P,X=y;else R=$,j=!1,B=k,H=m,z=C,V=w,q=D,W=e.Fk,Y=c,K=L,X=!1;var J=g?e.Oc:e.Oc+z,Z=j?B:~B,Q=t.Tm(t.ab(e.g("startAngle")-90+360*R),4),tt=t.bb(Q),et=t.hn(tt,1),it=t.jn(tt,1);if(H){var nt=void 0,st=e,at=Y,ot=B,rt=q,lt=Q,ht=J,ct=I,ut=rt[ot],dt="none"!=st.g("fill"),pt=st.Am(ot,ut),gt=at.be(ot);gt?(gt.ka(),gt.Hf(pt),gt.state("pointState",null),gt.state("seriesState",null)):(gt=at.add(pt,null,ot)).ka(),gt.height(null);var ft={};if("normal"!=gt.ic("position")){var mt=gt.ic("padding"),vt=gt.ic("vAlign");if(0<lt&&180>lt&&("top"==gt.ic("vAlign")?gt.state("seriesState",{vAlign:"bottom"}):"bottom"==gt.ic("vAlign")&&gt.state("seriesState",{vAlign:"top"})),dt)ft.adjustFontSize=!1,nt=-("middle"==vt?ct/2:"bottom"==vt?ct-mt.bottom:mt.top);else{at.yl(gt),r(st,gt,ot,rt,ht,lt);var bt=gt.Rh().rH();nt=("middle"==vt?bt/2+mt.bottom:"bottom"==vt?mt.top:bt+mt.bottom)-ct}ht+=nt}else gt.Rh().path(null);gt.jc({value:{angle:lt,radius:ht,x:t.hn(t.bb(lt),ht,st.tc),y:t.jn(t.bb(lt),ht,st.vc)}}),"auto"==gt.ic("anchor")&&(ft.anchor=t.Go(lt-gt.ic("rotation"))),gt.state("pointState",ft),gt.da(!0);var yt=Y.be(B);if("normal"==yt.ic("position")||10<F){var St=Y.yl(yt);W[B]=St,I=Math.max(E.call(e,Q,et,it,St),I)}else{var xt=(new t.Hu).N(yt.ic("padding"));Y.yl(yt),r(e,yt,_,q);var wt=I;if(A)I=Math.min(Math.max(xt.$j(yt.Rh().rH()),I),J/1.25);else{var Ct=xt.NY(yt.Rh().rb());I+=Math.max(n.left-Ct.left,n.top-Ct.top,Ct.cb()-n.cb(),Ct.Va()-n.Va(),0)}t.qd(xt),xt=null;var Tt=I>wt;if(Tt)U=Z;else if(U==Z)break;M=M||Tt}F||O.push(Z)}if(V){if(g){var Dt=l(B,q,i,0),kt=t.Tm(t.ab(e.g("startAngle")-90+360*Dt),4);tt=t.bb(kt);var $t=t.hn(tt,1),Ot=t.jn(tt,1)}else kt=Q,$t=et,Ot=it;if(F||K.push(kt),!X){var Pt=e.Oc+V+v/2,Lt=$t*Pt+e.tc,It=Ot*Pt+e.vc;wt=I;var At=E.call(e,kt,$t,Ot,[Lt,It]);I=Math.max(At,I),(Tt=(I=Math.min(I,e.Oc))>wt)&&(U=window.NaN),M=M||Tt}}j&&N!=$||($=l(++k,D,i,.5)),j&&(N=l(++_,T,i,.5))}10<++F&&(M=!1)}while(M);e.b=e.Oc,e.Oc=Math.max(0,Math.floor(e.Oc-I)),e.f=P,e.i=L,I=Math.min(I,e.b);var Et=yt&&"normal"!=yt.ic("position")&&A;if(I){var Gt=I;for(_=0;_<O.length;_++){0>(B=O[_])?(B=~B,Y=c,W=e.Fk):(Y=s,W=e.ci);var Ut=(yt=Y.be(B)).jc();if(Q=Ut.value.angle,"normal"==yt.ic("position")){if(St=W[B],tt=t.bb(Q),et=t.hn(tt,1),it=t.jn(tt,1),A){var Ft=t.Ja(St,0);t:{var Mt=void 0,_t=void 0,Nt=void 0,Rt=Ft,jt=et,Bt=it,Ht=e.tc,zt=e.vc;if(jt&&Bt){var Vt=jt/Bt,qt=Bt/jt,Wt=((zt+Bt)*Ht-zt*(Ht+jt))/jt;for(Nt=0;Nt<Rt.length;Nt+=2)Rt[Nt]=_t=(Rt[Nt+1]+Rt[Nt]*Vt+Wt)/(Vt+qt),Rt[Nt+1]=_t*qt-Wt}else{if(jt)_t=zt,Mt=1;else{if(!Bt)break t;_t=Ht,Mt=0}for(Nt=0;Nt<Rt.length;Nt+=2)Rt[Nt+Mt]=_t}}var Yt=t.mn(Ft);Gt=I-(I-t.gn(0,0,Yt.width,Yt.height))/2}for(et*=Gt,it*=Gt,k=0;k<St.length;k+=2)St[k]-=et,St[k+1]-=it;Ut.value.radius-=Gt,et=t.hn(t.bb(Q),Ut.value.radius,e.tc),it=t.jn(t.bb(Q),Ut.value.radius,e.vc),Ut.value.x=et,Ut.value.y=it,yt.jc(null),yt.jc(Ut)}else yt.height(I)}}if("no-overlap"==G&&O.length&&!Et){var Kt=[O[0]],Xt=0>O[0]?window.NaN:0,Jt=Xt,Zt=(0,window.isNaN)(Xt)?null:o(e,Xt),Qt=o(e,O[0]);for(_=1;_<O.length;_++){var te=O[_],ee=o(e,te),ie=!1;if(0>te)Y=c,B=~te,ie=t.bn(ee,Qt)||t.bn(ee,o(e,Kt[Kt.length-1]));else if(Y=s,B=te,!(ie=!(0,window.isNaN)(Xt)&&(t.bn(ee,Zt)||t.bn(ee,o(e,Kt[Xt]))))){for(k=Kt.length;k--;){var ne=Kt[k];if(!(0>ne&&t.bn(ee,o(e,Kt[k]))))break;c.be(~ne).enabled(!1),Kt.pop()}for(k=0;k<Jt&&0>(ne=Kt[k])&&t.bn(ee,o(e,Kt[k]));k++)c.be(~ne).enabled(!1);0<k&&Kt.splice(0,k)}ie?Y.be(B).enabled(!1):(Kt.push(te),0<=te&&(Xt=Kt.length-1,Zt||(Jt=Xt,Zt=ee)))}}}else e.b=e.Oc,e.f=[],e.i=[]}},o=function(e,i){if(0>i){i=~i;var n=e.Fk,s=e.qb()}else n=e.ci,s=e.labels();if(n[i])s=n[i];else{var a=s.be(i);if(s=s.yl(a),"normal"!=a.ic("position"))if(s=a.Rh().rb(),a=a.ic("rotation")||0){var o=t.Eo(s,"center");a=t.Kb(t.bb(a),o.x,o.y),s=t.ln(s)||[],a.transform(s,0,s,0,4)}else s=t.ln(s)||[];n[i]=s}return s},r=function(e,i,n,s,a,o){var r=e.scale();a=t.p(a)?a:i.jc().value.radius;var h=t.p(o)?o:i.jc().value.angle,c=(new t.Hu).N(i.ic("padding")),u=2*Math.PI*a/360;t.J(r,t.Qt)?(o=e.g("startAngle")-90+360*l(n,s,r,0),n=e.g("startAngle")-90+360*l(n,s,r,1),s=e.Xa().g("stroke"),o+=u=((r=Math.abs(n-o))-(c.Ng(r*u)-t.$b(s))/u)/2,n-=u):(o=h-(n=360/s.length),n=h+n),t.qd(c),0<h&&180>h&&(h=o,o=n,n=h),c=t.bb(o),h=t.hn(c,a,e.tc),c=t.jn(c,a,e.vc),(u=i.Rh().path())?u.clear():(u=t.qk(),t.rd(e,u)),u.moveTo(h,c).MR(a,a,o,n-o),i.Rh().path(u)},l=function(t,e,i,n){return t<e.length?i.transform(e[t],n):window.NaN},h=function(e,i,n,s,a,o){var r=i.g("position"),l=t.Ho(r),h=t.bb(n);r=Math.sin(h),h=Math.cos(h);var c=0,u=0;s=0<=l?Math.floor(s/2):Math.ceil(s/2),a%2&&!(n%90)&&(u=-Math.round(h)/2,c=-Math.round(r)/2),n=e.Oc,a=l?l*s:-o/2,o=l?l*o:o,l=Math.round(e.tc+n*h+a*h)+c,e=Math.round(e.vc+n*r+a*r)+u,i.hq(l,e,l+o*h,e+o*r)},c=function(){s.call(this)},u=function(){t.i4.call(this)},d=function(t,e){var i=t.i+(t.Oc-t.i)*e;t.o.Fe(t.tc,t.vc,i,i,0,360)},p=function(e,i,n,s){if(!(0,window.isNaN)(n)){var a=e.i+(e.Oc-e.i)*i,o=t.bb(0);i=Math.round(e.tc+a*Math.cos(o)),o=Math.round(e.vc+a*Math.sin(o)),s.moveTo(i,o),s.Fe(e.tc,e.vc,a,a,0,360),a=e.i+(e.Oc-e.i)*n,o=t.bb(360),i=Math.round(e.tc+a*Math.cos(o)),o=Math.round(e.vc+a*Math.sin(o)),s.lineTo(i,o),s.Fe(e.tc,e.vc,a,a,360,-360),s.close()}},g=function(e,i,n,s,a,o){(0,window.isNaN)(s)&&(0,window.isNaN)(a)||(n=e.Ra().Ne()?n:-n,o.Fe(e.tc,e.vc,e.Oc,e.Oc,i,n),e.i?(i+=n,o.lineTo(e.tc+t.db(i,e.i),e.vc+t.eb(i,e.i)),o.Fe(e.tc,e.vc,e.i,e.i,i,-n)):o.lineTo(e.tc,e.vc),o.close())},f=function(t,e){var i=t.g("isMinor"),n="ordinal"===e.Ma();return(i&&!n?e.yb():e.Xa()).get()},m=function(){t.i4.call(this)},v=function(e){t.JA.call(this,e)},b=function(t,e,i,n){var s=e.fill,a=e.hatchFill;e.stroke.moveTo(i,n),s.moveTo(t.Dc,t.uc).lineTo(i,n),a.moveTo(t.Dc,t.uc).lineTo(i,n)},y=function(t,e,n,s,a){var o=t.bd.ed(t.Gc),r=o.stroke,l=o.fill,h=o.hatchFill,c=i(t.i,t.D,t.Ka,t.Za,e,n,s,a,t.Dc,t.uc,t.Eb,t.f,t.fb,t.na);t.$a&&c.length&&(c[0]=0),t.$a=!1;for(var u=t.i,d=t.D,p=0;p<c.length;p+=7)c[p]&&(S(t,o),r=(o=t.bd.yF(t.Gc)).stroke,l=o.fill,h=o.hatchFill,b(t,o,u,d)),r.Sk(c[p+1],c[p+2],c[p+3],c[p+4],c[p+5],c[p+6]),l.Sk(c[p+1],c[p+2],c[p+3],c[p+4],c[p+5],c[p+6]),h.Sk(c[p+1],c[p+2],c[p+3],c[p+4],c[p+5],c[p+6]),u=c[p+5],d=c[p+6];t.i=e,t.D=n,t.Ka=s,t.Za=a},S=function(t,e){var i=e.hatchFill;e.fill.lineTo(t.Dc,t.uc),i.lineTo(t.Dc,t.uc)},x=function(e){t.JA.call(this,e)},w=function(e){t.JA.call(this,e)},C=function(t,e,n,s,a){var o=t.bd.ed(t.Gc);o=o.stroke;var r=i(t.i,t.D,t.Ka,t.Za,e,n,s,a,t.Dc,t.uc,t.Eb,t.f,t.bg,t.me);t.$a&&r.length&&(r[0]=0),t.$a=!1;for(var l=t.i,h=t.D,c=0;c<r.length;c+=7)r[c]&&(o=(o=t.bd.yF(t.Gc)).stroke).moveTo(l,h),o.Sk(r[c+1],r[c+2],r[c+3],r[c+4],l=r[c+5],h=r[c+6]);t.i=e,t.D=n,t.Ka=s,t.Za=a},T=function(e){t.JA.call(this,e)},D=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a),t.T(this.ua,[["closed",1024,1,4294967295]])},k=function(){t.g4.call(this,!1),t.tq(this.ua,"spreadValues",32768,1,void 0,(function(){(0,t.Pe)(this.hb,(function(t){"marker"==t.Ma()&&t.B(4294967295)}))}),this),this.Ga("polar")},$=function(e){var i=new k;return i.$c(),t.h4(i),arguments.length&&i.kl.apply(i,arguments),i};t.QA.prototype.yF=t.ca(27,(function(t){return this.ed(t,void 0,void 0)})),t.XA.prototype.yF=t.ca(26,(function(e){return e=t.UA(this,e,void 0,void 0),this.b.gx.push(e),e})),t.It.prototype.eF=t.ca(9,(function(e){var i=this.dk();if(i.length){var n=Math.min.apply(null,i),s=Math.max.apply(null,i);if((n=t.Za(e,n,s))!=e)return n;for(s=0;s<i.length-1;s++){n=i[s];var a=i[s+1];if(e>=n-(a=(a-n)/2)&&e<n+a)return n}}return e})),t.Ot.prototype.eF=t.ca(8,(function(t){return t}));var O={NONE:"none",Psa:"valueEqual",Osa:"value50"},P={bC:"area",tt:"line",av:"marker",hra:"polygon",ira:"polyline",lF:"column",FQ:"range-column"};t.H(s,t.Y);var L={};t.sq(L,[t.Z.dC,t.Z.yz,t.Z.Yn,t.Z.zz]),t.U(s,L),t.g=s.prototype,t.g.sa=400|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Pc=null,t.g.$n=null,t.g.Er="axis",t.g.Da=null,t.g.mb=null,t.g.rc=null,t.g.Rc=null,t.g.qa=null,t.g.Oc=window.NaN,t.g.tc=window.NaN,t.g.vc=window.NaN,t.g.ci=null,t.g.Fk=null,t.g.p_=function(){this.Da&&t.Yu(this.Da),this.rc&&t.Yu(this.rc)},t.g.qb=function(e){return this.rc||(this.rc=new t.Pu,t.W(this,"minorLabels",this.rc),this.rc.kb(this),t.K(this.rc,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.rc.N(e),this):this.rc},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.yb=function(e){return this.Rc||(this.Rc=new t.c4,t.W(this,"minorTicks",this.Rc),this.Rc.kb(this),t.K(this.Rc,this.li,this)),t.p(e)?(this.Rc.N(e),this):this.Rc},t.g.Xa=function(e){return this.mb||(this.mb=new t.c4,t.W(this,"ticks",this.mb),this.mb.kb(this),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0,n=0;t.X(e,8)&&(i=this.sf,n=9),t.X(e,1)&&(i|=276,n|=1),this.pj(),this.B(i,n)},t.g.FK=function(e,i){if(t.p(e)){var n=t.jt(this.qa,e,null,15,null,this.ii,this);if(n){var s=this.qa==n;this.qa=n,this.qa.sN=!!i,this.qa.da(s),s||(this.pj(),this.B(this.sf,9))}return this}return this.qa},t.g.scale=function(t){return this.FK(t)},t.g.ii=function(e){t.X(e,2)&&(this.pj(),this.B(this.sf,9))},t.g.uo=function(){this.B(this.sf,9)},t.g.pj=function(){this.ci.length=0,this.Fk.length=0,this.ik=null},t.g.Hda=function(e,i,n,s){for(i=e=0;i<s.length;i+=2)e=Math.max(e,t.gn(this.tc,this.vc,s[i],s[i+1])-this.Oc);return e},t.g.Gda=function(e,i,n,s){var a=this.ja(),o=t.mn(s),r=o.left;s=o.top;var l=r+o.width;o=s+o.height;var h=0;return 90<e&&270>e?r<a.left&&(h=(a.left-r)/-i):l>(r=a.left+a.width)&&(h=(l-r)/i),0<e&&180>e?o>(e=a.top+a.height)&&(h=Math.max(h,(o-e)/n)):s<a.top&&(h=Math.max(h,(a.top-s)/-n)),h},t.g.yd=function(){var e=this.ja();return e?this.enabled()?(a(this),e=t.$b(this.g("stroke")),e=Math.floor(e/2),new t.I(this.tc-this.Oc+e,this.vc-this.Oc+e,2*(this.Oc-e),2*(this.Oc-e))):e:new t.I(0,0,0,0)},t.g.Am=function(e,i){var n=this.scale(),s=!0;if(t.J(n,t.Qt)){var a=n.Xa().names()[e],o=i;s=!1}else t.J(n,t.nt)?(a=t.vs(i),o=i):(a=(0,window.parseFloat)(i),o=(0,window.parseFloat)(i));return a={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:a,type:"number"},tickValue:{value:o,type:"number"},scale:{value:n,type:""}},s&&(a.min={value:t.p(n.min)?n.min:null,type:"number"},a.max={value:t.p(n.max)?n.max:null,type:"number"}),(n=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(n)},t.g.Iy=function(){return!1},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.Xa().B(2),this.labels().B(2),this.B(386)),!1))},t.g.W=function(){if(!this.scale())return t.il(2),this;if(!this.zc())return this;a(this),this.labels().ka(),this.qb().ka(),this.Xa().ka(),this.yb().ka();var e=this.g("stroke");if(this.J(16)&&(this.Pc.stroke(e),this.Pc.fill("none"),this.Pc.clear(),this.Pc.moveTo(this.tc+this.Oc,this.vc),this.Pc.Fe(this.tc,this.vc,this.Oc,this.Oc,0,360),this.$n.stroke("none"),this.$n.fill(this.g("fill")),this.$n.clear(),this.$n.moveTo(this.tc+this.Oc,this.vc),this.$n.Fe(this.tc,this.vc,this.Oc,this.Oc,0,360),this.$n.moveTo(this.tc+this.b,this.vc),this.$n.Fe(this.tc,this.vc,this.b,this.b,0,-360),this.I(16)),this.J(8)){var i=this.zIndex();this.$n.zIndex(i),this.Pc.zIndex(i),this.Xa().zIndex(i),this.yb().zIndex(i),this.labels().zIndex(i),this.qb().zIndex(i),this.I(8)}if(i=this.O(),this.J(2)&&(this.$n.parent(i),this.Pc.parent(i),this.Xa().O(i),this.labels().O(i),this.yb().O(i),this.qb().O(i),this.I(2)),this.J(256)){i=t.J(this.scale(),t.Qt),e=t.$b(e);var n=this.Xa();n.W();var s=t.$b(n.g("stroke")),o=n.g("length");for(t.uo(o)&&(o=i?t.L(o,this.b-this.Oc):(0,window.parseFloat)(o)),i=0;i<this.f.length;i++)h(this,n,this.f[i],e,s,o);for((n=this.yb()).W(),s=t.$b(n.g("stroke")),o=n.g("length"),t.uo(o)&&(o=(0,window.parseFloat)(o)),i=0;i<this.i.length;i++)h(this,n,this.i[i],e,s,o);this.I(256)}return this.J(128)&&(this.labels().W(),this.qb().W(),this.I(128)),this.labels().da(!1),this.Xa().da(!1),this.qb().da(!1),this.yb().da(!1),this},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.$n&&this.$n.parent(null),this.Xa().remove(),this.yb().remove(),this.Da&&this.Da.remove(),this.rc&&this.rc.remove()},t.g.F=function(){var e=s.u.F.call(this);return t.Tq(this,L,e),e.labels=this.labels().F(),e.minorLabels=this.qb().F(),e.ticks=this.Xa().F(),e.minorTicks=this.yb().F(),e},t.g.U=function(e,i){s.u.U.call(this,e,i),t.Iq(this,L,e,i),this.labels().ga(!!i,e.labels),this.qb().ga(!!i,e.minorLabels),this.Xa(e.ticks),this.yb(e.minorTicks)},t.g.R=function(){t.sd(this.rc,this.Da,this.Rc,this.mb,this.Pc,this.$n),delete this.qa,this.ci=this.Pc=this.$n=this.mb=this.Rc=this.Da=this.rc=null,s.u.R.call(this)},t.H(c,s),t.xu(c,s);var I=s.prototype;I.labels=I.labels,I.minorLabels=I.qb,I.ticks=I.Xa,I.minorTicks=I.yb,I.scale=I.scale,I.getRemainingBounds=I.yd,I=c.prototype,t.E("anychart.standalones.axes.polar",(function(){var t=new c;return t.Ga("standalones.polarAxis"),t})),I.draw=I.W,I.parentBounds=I.ja,I.container=I.O,t.H(u,t.i4),u.prototype.Lj=function(){var e=this.Ra(),i=this.bb();this.Sz(),this.Uh().clear();var n=this.ja();this.Oc=Math.min(n.width,n.height)/2,this.i=t.L(this.g("innerRadius"),this.Oc),this.i==this.Oc&&this.i--,this.tc=Math.round(n.left+n.width/2),this.vc=Math.round(n.top+n.height/2),this.Uh().clip(n);var s=this.g("startAngle")-90;if(this.vN()){var a=n=f(this,e),o="ordinal"==(i=this.Ra()).Ma(),r=a.length;o?i=r:(o=i.transform(a[0]),a=i.transform(a[r-1]),i=0==o&&1==a||1==o&&0==a?r-1:r),o=360/i;var l=window.NaN,h=window.NaN,c=(r=this.g("stroke")).thickness?r.thickness:1;for(r=0;r<i;r++){a=e.transform(n[r]);var u=t.ab(s+360*a);a=t.bb(u);var m=0,v=0;u?90==u?m=0==c%2?0:-.5:180==u?v=0==c%2?0:.5:270==u&&(m=0==c%2?0:.5):v=0==c%2?0:-.5;var b=Math.round(this.tc+this.Oc*Math.cos(a)),y=Math.round(this.vc+this.Oc*Math.sin(a));if(this.i)var S=Math.round(this.tc+this.i*Math.cos(a)),x=Math.round(this.vc+this.i*Math.sin(a));else S=this.tc,x=this.vc;r&&(a=t.oz(this,r-1),g(this,u,o,l,h,a)),(r||this.g("drawLastLine"))&&(a=S,l=x,h=m,this.o.moveTo(b+h,y+v),this.o.lineTo(a+h,l+v)),l=b,h=y}a=t.oz(this,r-1),u=t.ab(s),g(this,u,o,l,h,a)}else for(e=(n=f(this,i)).length,s="ordinal"==i.Ma(),o=window.NaN,r=0;r<e;r++)b=n[r],t.A(b)?(c=b[0],b=b[1]):c=b,c=i.transform(c),0!=r&&(a=t.oz(this,r-1)),r==e-1?s?(p(this,c,o,a),a=t.oz(this,r),p(this,i.transform(b,1),c,a),d(this,c),this.g("drawLastLine")&&d(this,i.transform(b,1))):(p(this,c,o,a),this.g("drawLastLine")&&d(this,c)):(p(this,c,o,a),(r||this.i)&&d(this,c)),o=c},t.H(m,u),t.xu(m,u);var A=m.prototype;t.E("anychart.standalones.grids.polar",(function(){var t=new m;return t.Ga("standalones.polarGrid"),t})),A.layout=A.we,A.draw=A.W,A.parentBounds=A.ja,A.container=A.O,t.H(v,t.JA),t.PG[26]=v,t.g=v.prototype,t.g.type=26,t.g.flags=193|t.dB,t.g.Kh={fill:"path",hatchFill:"path",stroke:"path"},t.g.Gd=function(e){v.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.fb=t.bb(t.$a(e.g("startAngle")-90,360)),this.na=e.iB(),this.ea=!!e.g("closed"),this.K=!1,this.Sb=this.sb=this.P=this.b=window.NaN},t.g.jA=function(t,e){(0,window.isNaN)(this.b)&&(this.K=!0),v.u.jA.call(this,t,e)},t.g.Qo=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("value"),s=t.j("xRatio");t=t.j("valueRatio"),b(this,e,i,n),(0,window.isNaN)(this.b)&&(this.b=i,this.P=n,this.sb=s,this.Sb=t),this.i=i,this.D=n,this.Ka=s,this.Za=t,this.$a=!0},t.g.ug=function(t){var e=t.j("x"),i=t.j("value"),n=t.j("xRatio");t=t.j("valueRatio"),y(this,e,i,n,t)},t.g.Km=function(){this.G&&S(this,this.bd.ed(this.Gc))},t.g.Rl=function(){this.ea&&!(0,window.isNaN)(this.b)&&(this.Ba||this.G&&!this.K)&&y(this,this.b,this.P,this.sb,this.Sb),v.u.Rl.call(this)},t.H(x,t.lC),t.PG[27]=x,x.prototype.type=27,x.prototype.Gd=function(e){x.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.i=t.bb(t.$a(e.g("startAngle")-90,360)),this.b=this.o/720},x.prototype.EF=function(e,i,s){var a=e.j("zeroRatio"),o=e.j("xRatio");e=e.j("valueRatio");var r=o-this.b;o+=this.b;var l=this.X.Zs(r,[a,e]),h=this.X.Zs(o,[a,e]);i.moveTo(l[2],l[3]),i.Sk.apply(i,n(l[2],l[3],r,e,h[2],h[3],o,e,this.Dc,this.uc,this.Eb,this.f,this.i,!1)),i.lineTo(h[0],h[1]),i.Sk.apply(i,n(h[0],h[1],o,a,l[0],l[1],r,a,this.Dc,this.uc,this.Eb,this.f,this.i,!0)),i.close(),s.pe(t.yg(i))},t.H(w,t.oC),t.PG[25]=w,t.g=w.prototype,t.g.type=25,t.g.Gd=function(e){w.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.bg=t.bb(t.$a(e.g("startAngle")-90,360)),this.me=this.X.iB()},t.g.Qo=function(t){var e=this.bd.ed(this.Gc),i=t.j("x"),n=t.j("value"),s=t.j("xRatio");t=t.j("valueRatio"),e.stroke.moveTo(i,n),(0,window.isNaN)(this.ea)&&(this.ea=i,this.fb=n,this.sb=s,this.Sb=t),this.i=i,this.D=n,this.Ka=s,this.Za=t,this.$a=!0},t.g.ug=function(t){var e=t.j("x"),i=t.j("value"),n=t.j("xRatio");t=t.j("valueRatio"),C(this,e,i,n,t)},t.g.QZ=function(){this.ud&&!(0,window.isNaN)(this.ea)&&(this.Ba||this.G&&!this.ec)&&C(this,this.ea,this.fb,this.sb,this.Sb)},t.H(T,t.tC),t.PG[28]=T,T.prototype.type=28,T.prototype.Gd=function(e){T.u.Gd.call(this,e),e=this.X,this.Dc=e.Dc,this.uc=e.uc,this.Eb=e.Eb,this.f=e.f,this.i=t.bb(t.$a(e.g("startAngle")-90,360)),this.b=this.o/720},T.prototype.ug=function(e,i){var s=this.X.Be(),a=e.get(s[1]);s=e.get(s[0]),a=this.nh(a,s),(s={})[a.path]=!0,s[a.qe]=!0,e.j("name",a.path),s=this.bd.ed(i,s);var o=e.j("lowRatio"),r=e.j("xRatio"),l=e.j("highRatio"),h=r-this.b;r+=this.b;var c=this.X.Zs(h,[o,l]),u=this.X.Zs(r,[o,l]),d=s[a.path];d.moveTo(c[2],c[3]),d.Sk.apply(d,n(c[2],c[3],h,l,u[2],u[3],r,l,this.Dc,this.uc,this.Eb,this.f,this.i,!1)),d.lineTo(u[0],u[1]),d.Sk.apply(d,n(u[0],u[1],r,o,c[0],c[1],h,o,this.Dc,this.uc,this.Eb,this.f,this.i,!0)),d.close(),s[a.qe].pe(t.yg(d))},t.H(D,t.j4);var E={};t.rq(E,0,"closed",t.Dq),t.U(D,E),t.g=D.prototype,t.g.my=function(e){return 360*((t.p(e)&&t.J(this.Ra(),t.Qt)?t.St(this.Ra())[e]:this.Ra().sD())||this.Ra().vH()/this.$().Hb())},t.g.n5=function(e){if("center"==e)return"center";var i=this.g("startAngle"),n=this.$().j("xRatio");return i=i-90+360*n,this.sp()&&(t.Mo(e)?i-=this.yu/2:t.No(e)&&(i+=this.yu/2)),i=t.Go(i),0<=(n=(0,t.za)(t.Fo,i))&&0<=(e=(0,t.za)(t.Fo,e))&&(i=t.Fo[(n+e)%8]),i},t.g.oG=function(e){var i=this.$();if(this.sp()&&"auto"!=e&&"center-top"!=e&&"center"!=e&&"center-bottom"!=e){var n=this.yu/720,s=i.j("xRatio"),a=i.j(this.Ah.Ab+"Ratio");i=i.j(this.Ah.zb+"Ratio"),s=t.Mo(e)?s-n:s+n,s=(a=this.Zs(s,[a,i]))[0],n=a[1],i=a[2],a=a[3]}else n=i.j(this.Ah.Ab),s=i.j(this.Ah.Ab+"X"),a=i.j(this.Ah.zb),i=i.j(this.Ah.zb+"X");return t.Ipa(e,s,n,i,a)},t.g.f6=function(){return this.ya.qP()},t.g.yU=function(){return this.g("xPointPosition")},t.g.YD=function(t,e,i,n,s){return t.j("zeroRatio",this.YY),D.u.YD.call(this,t,e,i,n,s)},t.g.F=function(){var e=D.u.F.call(this);return t.Tq(this,E,e),e},t.g.U=function(e,i){t.Iq(this,E,e),D.u.U.call(this,e,i)},t.g.YA=function(t,e,i){if("ordinal"==this.Ra().Ma()){var n=t.get("x"),s=t.get("value"),a=this.ya,o=s,r=this.Ma(),l=this.Ra(),h=this.bb();l=l.Ma();var c=a.g("spreadValues");"none"==c||"marker"!=r||"ordinal"!=l?a=1:(o="value50"===c?h.Xa().eF(o):o,a=a.b[n]&&++a.b[n][o].gaa),o=this.ya,r=this.Ma(),l=this.Ra(),h=this.bb(),l=l.Ma(),"none"==(c=o.g("spreadValues"))||"marker"!=r||"ordinal"!=l?s=1:(s="value50"===c?h.Xa().eF(s):s,s=o.b[n]&&o.b[n][s].count),n=a,a=s,i=(s=i-1/(2*(s=this.Ra().values().length)))+1/(a+1)*(i-s)*2*n}D.u.YA.call(this,t,e,i),t.j("xRatio",i)},t.H(k,t.g4);var G={};t.rq(G,0,"spreadValues",(function(e,i){return t.zk(O,e,i||"none")})),t.U(k,G);var U={},F=5767168|t.QG;U.area={Fb:26,Kb:1,Lb:[t.nH,t.oH,t.qH],Ob:null,Jb:null,Cb:F,Ab:"value",zb:"zero"},U.column={Fb:27,Kb:2,Lb:[t.RH,t.qH],Ob:null,Jb:null,Cb:F,Ab:"value",zb:"zero"},U.line={Fb:25,Kb:1,Lb:[t.oH],Ob:null,Jb:null,Cb:F,Ab:"value",zb:"value"},U.polygon={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:F,Ab:"value",zb:"zero"},U.polyline={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:F,Ab:"value",zb:"value"},U["range-column"]={Fb:28,Kb:2,Lb:[t.RH,t.qH,t.NH,t.OH,t.sH,t.rH],Ob:null,Jb:null,Cb:F,Ab:"high",zb:"low"},U.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:1572864|t.QG,Ab:"value",zb:"value"},k.prototype.fj=U,t.Nz(k,k.prototype.fj),t.g=k.prototype,t.g.qP=function(e){return t.p(e)?(e=!!e,this.So!=e&&(this.So=e,this.B(327680),t.Rz(this,this.Ra())),this):this.So},t.g.Ma=function(){return"polar"},t.g.Ss=function(e){return t.zk(P,e,"line")},t.g.IF=function(){return new u},t.g.R0=function(){return new s},t.g.ev=function(){return!1},t.g.zU=function(){return"linear"},t.g.Gt=function(t,e){return new D(this,this,t,e,!1)},t.g.pb=function(){k.u.pb.call(this),function(e){e.b={};var i=e.g("spreadValues");"none"!=i&&(0,t.Pe)(e.hb,(function(t){if(t.enabled()&&"marker"==t.Ma())for(var e=t.Ec(),n="value50"==i;e.advance();){var s=e.get("x"),a=e.get("value");a=n?t.bb().Xa().eF(a):a;var o=this.b[s]&&this.b[s][a];o||(this.b[s]||(this.b[s]={}),o=this.b[s][a]={count:0,gaa:0}),o.count++}}),e)}(this)},t.g.ht=function(t,e,i){k.u.ht.call(this,t,e,i),this.qP(t.sortPointsByX)},t.g.ft=function(t,e,i){k.u.ft.call(this,t,e,i),t.sortPointsByX=this.qP()};var M=k.prototype;M.getType=M.Ma,M.sortPointsByX=M.qP,t.Tp.polar=$,t.E("anychart.polar",$)}.call(this,$)),_.waterfall||(_.waterfall=1,function(t){var e=function(e,i){t.mr(e,i)&&(e.Nl[i]|=e.js[i].Ku)},i=function(t,e){e in t.Nl&&(t.Nl[e]=0)},n=function(){t.V.call(this),t.T(this.ua,[["stroke",0,8192]])},s=function(e){function i(){t.or(this,dt,[ct,ut])}t.Y.call(this),this.Ga("waterfall.arrow"),this.ib=e,t.T(this.ua,[["from",0,4,void 0,i,this],["to",0,4,void 0,i,this]]),this.b=new n,this.b.Ga("waterfall.arrow.connector"),t.K(this.b,this.Tda,this),this.o=!0},a=function(e,i){return t.p(i)&&(e.D=i),e.D},o=function(e,i){return t.p(i)?(e.o=i,e):e.o},r=function(t){return t.i||(t.i=t.O().path()),t.i},l=function(e){return t.p(e.f)||(e.f=e.O().path()),e.f},h=function(e){t.Y.call(this),this.pa=e,this.b=[],this.K=null,this.f=[],t.wl(this)},c=function(t){return t.xa()===t.pa.bb().Ne()},u=function(t,e){return t.pa.Ra().Yv(e)},d=function(t){return t.g("from")},p=function(t){return t.g("to")},g=function(t,e){var i=d(e);return i=u(t,i),0<=X(t.pa,i,"diff")},f=function(e,i,n){var s=n.Zf().g("stroke");s=t.dp(s)/2+2;var a=i.Ip.x>i.kq.x;return i=new t.I(a?i.kq.x:i.Ip.x,i.ur-s,a?i.Ip.x-i.kq.x:i.kq.x-i.Ip.x,2*s),s=n.tk().rb(),n=s.width,s=s.height,e=e.xa()?n:s,i.top-=e,i.height+=e,i},m=function(e,i){var n=W(e.pa,i);0>n.qd()&&(n=new t.I(n.tb(),n.Vb()+n.qd(),n.zd(),-n.qd()));var s=function(e,i){var n=et(e.pa,i);return n=(0,t.Ye)(n,(function(t){return!t.jc().connectorPoint})),(0,t.Wa)(n,(function(e){return e=this.ek(e),this.xa()?new t.I(e.Vb(),e.tb(),e.qd(),e.zd()):e}),e)}(e,i);return(0,t.Pe)(s,(function(e){t.pb(n,e)})),n},v=function(t){t.i=[];for(var e=0;e<K(t.pa);e++)t.i.push(m(t,e))},b=function(e){return t.p(e.i)||v(e),e.i},y=function(e){var i=[];(0,t.Pe)(e.b,(function(e){var n=d(e),s=p(e),a=u(this,n),r=u(this,s);n=!(0,window.isNaN)(a)&&!(0,window.isNaN)(r)&&n!==s,s=function(e,i,n){return null===t.ya(i,(function(t){return d(n)===d(t)&&p(n)===p(t)}),e)}(this,i,e),o(e,n&&s),i.push(e)}),e)},S=function(e,i,n){var s=t.Ha(b(e));n=(0,t.Wa)(n,(function(t){return f(this,a(t),t)}),e),function(e,i,n){var s=g(e,i),o=c(e),r=a(i),l={kq:r.kq,Ip:r.Ip,ur:r.ur,JV:r.JV},h=f(e,l,i);t.Pa(n,(function(t,e){return s===o?e.Va()-t.Va():t.Vb()-e.Vb()})),(0,t.Pe)(n,(function(t){var e=h;(t=t.so(e)?s===c(this)?t.Vb()-e.Va():t.Va()-e.Vb():0)&&(l.ur+=t,h=f(this,l,i))}),e),a(i,l)}(e,i,s=t.Ga(n,s))},x=function(t,e,i){var n=d(e);return e=p(e),n=u(t,n),t=u(t,e),Math.min(n,t,i)===i},w=function(e,i,n){var s=W(e.pa,n),o=s.zd()/(i.length+1);t.Pa(i,function(e,i){return(0,t.pa)((function(t,e){var n=x(this,t,i),s=x(this,e,i),o=g(this,t);return n!==s?n===(this.xa()!==this.pa.Ra().Ne())?-1:1:o===c(this)?a(t).ur-a(e).ur:a(e).ur-a(t).ur}),e)}(e,n)),(0,t.Pe)(i,(function(t,e){var i=d(t);i=u(this,i);var r=s.tb()+(e+1)*o;i===n?a(t).kq.x=r:a(t).Ip.x=r}),e)},C=function(e){v(e),e.f.length=0;var i=[];(0,t.Pe)(e.b,(function(e){if(e.enabled()&&o(e)){var i=d(e),n=p(e);i=u(this,i);var s=u(this,n),r=b(this);n=r[i],s=r[s],i=0<=X(this.pa,i,"diff"),r=c(this),n=new t.on(n.tb()+n.zd()/2,i===r?n.Vb():n.Va()),s=new t.on(s.tb()+s.zd()/2,i===r?s.Vb():s.Va()),r=i&&c(this)?Math.min(n.y,s.y)-15:Math.max(n.y,s.y)+15,a(e,{kq:n,Ip:s,ur:r,JV:i}),n=d(e),i=p(e),n=u(this,n),i=u(this,i),this.f[n]=this.f[n]||[],this.f[i]=this.f[i]||[],r=d(e),s=p(e),r=u(this,r),u(this,s)>r?(this.f[n].push(e),this.f[i].unshift(e)):(this.f[n].unshift(e),this.f[i].push(e))}}),e),function(e){(0,t.Pe)(e.f,(function(e,i){if(e&&1<e.length){var n=(0,t.Ye)(e,(function(t){return g(this,t)}),this),s=(0,t.Ye)(e,(function(t){return!g(this,t)}),this);w(this,n,i),w(this,s,i)}}),e)}(e),(0,t.Pe)(e.b,(function(t){t.enabled()&&o(t)&&(S(this,t,i),i.push(t))}),e)},T=function(e,i){var n=e.b[i];return!!t.p(n)&&(t.kr(n,e.W_,e),t.Ca(e.b,i,1),t.qd(n),!0)},D=function(e,i){var n=new s(e);return t.p(i)&&(n.N(i),t.K(n,e.W_,e)),e.b.push(n),t.or(e,"arrowsController",["appearance","recalculation"],1),n},k=function(e){return e.K||(e.K=t.ok(),e.K.zIndex(gt)),e.K},$=function(){t.V.call(this),t.T(this.ua,[["stroke",0,8192]])},O=function(e,i,n,s,a){t.xB.call(this,e,i,n,s,a)},P=function(t,e){var i=!!t.ya.xa(),n=e.value,s=i?-1:1,a=(i?n.y:n.x)+t.yu/2*s;return{value:i?{x:n.x,y:a+3*s}:{x:a+3*s,y:n.y},connectorPoint:{value:i?{x:n.x,y:a-2*s}:{x:a-2*s,y:n.y}}}},L=function(e,i,n,s){t.my.call(this,e,i,n,s)},I=function(e,i){t.xB.call(this,i,i,bt,{Fb:6,Kb:2,Lb:[t.RH,t.qH],Cb:1572864|t.QG,Ab:"value",zb:"zero"},!1),this.ib=e,t.T(this.ua,[["x",512,16,1048576]])},A=function(t){var e=[];if(t=t.data())for(t=t.$();t.advance();)e.push(t.get("x"));return e},E=function(e){t.Y.call(this),this.pa=e,this.wb=t.ok(),this.wb.zIndex(xt),this.b=[]},G=function(e,i){var n=e.b[i];return!!t.p(n)&&(e.b.splice(i,1),e.pa.ka(),t.qd(n),e.pa.da(!1),e.B(512,1),!0)},U=function(e,i){if(function(e,i){var n=i.name;return t.p(i.x)&&t.p(n)&&!(0,t.Qw)(e.b,(function(t){return t.name()===n}))}(e,i)){e.pa.ka();var n=new I(e,e.pa);return n.ka(),n.N(i),n.kb(e.pa),t.K(n,e.nla,e),n.da(!1),e.b.push(n),e.pa.da(!1),e.B(512,1),n}return null},F=function(t){for(var e=[],i=0;i<t.b.length;i++)e.push(t.b[i]);return e},M=function(){function i(){var t=st(this);e(this,"waterfall"),t.B(t.sa)}t.WB.call(this),this.Ga("waterfall"),this.re="waterfall",this.fh=[],this.nf=[],this.me=[],this.Od=[],t.T(this.ua,[["dataMode",360448,1,void 0,i],["drawTotalsAsAbsolute",360448,1,void 0,i]])},_=function(e){for(var i=[],n=0;n<e.hb.length;n++){var s=e.hb[n];if(s&&s.enabled()&&(s=s.data()))for(s=s.$();s.advance();){var a=s.get("x");t.Aa(i,a)||i.push(a)}}return i},N=function(t,e,i){return i/=2,e+(t.xa()^(t=t.Ra().Ne())?-i:i)},R=function(e,i,n){if(J(e,i)&&J(e,n)){var s=W(e,i);n=W(e,n);for(var a,o=e.Re.length-1;0<=o&&(a=e.Re[o].data[i].j.connectorValue,!t.p(a));o--);return i=N(e,t.sb(s).x,new t.lb(s.width,s.height).width),a=e.bb().transform(a),o=e.fc,e.xa()?(s=o.left,o=o.width):(s=o.Va(),o=-o.height),{from:{x:i,y:a=s+a*o},Je:{x:e=N(e,t.sb(n).x,-new t.lb(n.width,n.height).width),y:a}}}},j=function(t){var e=t.labels().g("position");return 1<t.tj()&&("auto"===e||"outside"===e)},B=function(t,e,i,n){for(t=!!t.xa();0<=i;i--){var s=e[i],a=s.Ta,o=t?a.left:a.top;if(a=t?a.width:a.height,(0,window.isNaN)(n))n=o+a;else{var r=a/2;o=(s=s.label).jc();var l=t?o.value.x:o.value.y;l-r<n?(r=n+r,n+=a,s.jc({value:t?{x:r,y:o.value.y}:{x:o.value.x,y:r},connectorPoint:o.connectorPoint}),s.W()):n=l+r}}},H=function(t,e,i,n){for(t=!!t.xa();i<e.length;i++){var s=e[i],a=s.Ta,o=(a=t?a.width:a.height)/2,r=(s=s.label).jc(),l=t?r.value.x:r.value.y;l+o>n?(o=n-o,n-=a,s.jc({value:t?{x:o,y:r.value.y}:{x:r.value.x,y:o},connectorPoint:r.connectorPoint}),s.W()):n=l-o}},z=function(e,i){var n=e.em[i],s=!!e.xa(),a=!!e.bb().Ne();if(n){var o=n.Uda,r=n.Lka;if(n=n.labels)if(o){o=s?o.mi:o.Pe;var l=s?r.left:r.top;r=s?r.width:r.height,t.Wm(o,l,1)?s^a?H(e,n,0,o):B(e,n,n.length-1,o):t.Wm(o,l+r,1)?s^a?B(e,n,n.length-1,o):H(e,n,0,o):(a=function(e,i,n){var s=!!e.xa();return t.Na(i,n,(function(t,e){var i=s?e.Ta.left:e.Ta.top,n=i+(s?e.Ta.width:e.Ta.height);return i>t?1:n<t?-1:0}))}(e,n,o),0<=a?(r=n[a],.5<=(o-(l=s?r.Ta.left:r.Ta.top))/(s?r.Ta.width:r.Ta.height)?(B(e,n,a-1,o),H(e,n,a,o)):(B(e,n,a,o),H(e,n,a+1,o))):(r=n[0],(l=s?r.Ta.left:r.Ta.top)>o?B(e,n,n.length-1,window.NaN):H(e,n,0,window.NaN)))}else B(e,n,n.length-1,window.NaN)}},V=function(e){var i=e.nf.pop()||new t.Fw;return e.me.push(i),i},q=function(e){var i=e.J(4)||t.rr(e,"waterfall","stackLabels"),n=e.yJ();i&&(n.clear(),(0,t.Gg)(e.hb,(function(t,e){return e.enabled()?t+1:t}),0)&&n.g("enabled")&&function(e){e.qc||(e.qc=e.Na.Bd(),e.qc.zIndex(40),e.i.O(e.qc)),e.qc.clip(e.fc);for(var i=e.i.anchor(),n=e.i.position(),s=0;s<e.Re[0].data.length;s++){for(var a=e,o=s,r=!1,l=0;l<a.Re.length;l++){var h=a.Re[l],c=h.X.Ma()===bt;r=r||c&&!h.data[o].j.missing}!r&&J(e,s)&&(a=e,r=s,"auto"===(o=n)&&(l=a.xa(),h=a.bb().Ne(),o=0<=X(a,r,"diff")?"center-top":"center-bottom",o=t.Jo(o,h?180:0),o=t.Jo(o,l?-90:0)),a="auto"===i?t.Jo(o,180):i,r=Y(e,s),o={value:{x:(o=t.Eo(r,o)).x,y:o.y}},l=s,h=V(r=e),c=X(r,l,"absolute"),r=t.ov(h,{index:{value:l,type:"number"},value:{value:c,type:"number"},total:{value:c,type:"number"},stack:{value:X(r,l,"diff",!0),type:"number"}}),(l=(l=e.i.be(s))?l:e.i.add(null,null,s)).Hf(r),l.jc(o),l.anchor(a))}e.i.W()}(e)),n.I(n.sa)},W=function(e,i){var n=(0,t.Gg)(e.Re,(function(t,e){return Math.max(e.X.yu,t)}),-window.Infinity),s=e.Re[0].data[i].j.valueX-n/2,a=Q(e,i),o=tt(e,i),r=a;return a=Math.min(a,o),o=Math.max(r,o),t.kn(s,a,n,o-a)},Y=function(e,i){for(var n,s=0;s<e.Re.length;s++){var a=e.Re[s].data[i].j;a.missing||(a=t.Ic(a.shapes,(function(t){return!!t.parent()})).rb(),(0,window.isNaN)(a.left)||(0,window.isNaN)(a.top)||(0,window.isNaN)(a.width)||(0,window.isNaN)(a.height)||(n=n||a.clone(),t.pb(n,a)))}return n},K=function(t){return t.Re.length?t.Re[0].data.length:0},X=function(e,i,n,s){for(var a=0,o=0;o<e.Re.length;o++){var r=e.Re[o].data[i];r.j.missing||(a+=s?e.mU(r):t.p(r.j[n])?r.j[n]:r.data.value)}return a},J=function(e,i){return(0,t.Gg)(e.Re,(function(t,e){return t||!(e.data[i].j.missing||e.data[i].j.skipDrawing)}),!1)},Z=function(e,i){return(0,t.Gg)(e.Re,(function(t,e){return t||e.data[i].j.isTotal||e.data[i].j.isSplit}),!1)&&!!i},Q=function(t,e){for(var i=-window.Infinity,n=0;n<t.Re.length;n++){var s=t.Re[n].data[e].j;s.missing||(i=Math.max(i,s.zero,s.value))}return i},tt=function(t,e){for(var i=window.Infinity,n=0;n<t.Re.length;n++){var s=t.Re[n].data[e].j;s.missing||(i=Math.min(i,s.zero,s.value))}return i},et=function(t,e){for(var i=[],n=0;n<t.Re.length;n++){var s=t.Re[n].data[e].j.label;s&&s.ic("enabled")&&i.push(s)}return(n=t.yJ()).enabled()&&(n=n.be(e))&&i.push(n),i},it=function(e){t.nr(e,"waterfall","totals"),st(e).B(512)},nt=function(e){return t.p(e.o)||(e.o=new h(e),t.K(e.o,e.vda,e)),e.o},st=function(e){return e.Hd||(e.Hd=new E(e),t.K(e.Hd,e.ola,e)),e.Hd},at=function(e){t.JA.call(this,e)},ot=function(t){var e=new M;e.Wg(),e.$c();for(var i=0,n=arguments.length;i<n;i++)e.waterfall(arguments[i]);return e},rt={Vla:"absolute",aoa:"diff"};t.H(n,t.V);var lt={};t.sq(lt,[[1,"stroke",t.Pq]]),t.U(n,lt),n.prototype.ra=8192,n.prototype.F=function(){var e=n.u.F.call(this);return t.Tq(this,lt,e),e},n.prototype.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,lt,e,i)},t.H(s,t.Y);var ht={};t.sq(ht,[[0,"from",t.Cq],[0,"to",t.Cq]]),t.U(s,ht);var ct="labels",ut="appearance",dt="waterfallArrow";t.Jz(s,dt,[ct,ut]),t.g=s.prototype,t.g.ra=40964,t.g.W=function(){if(this.zc()){if(this.J(4)&&(t.or(this,dt,[ct,ut]),this.I(4)),t.rr(this,dt,ut)&&o(this)){this.Jt(),l(this).clear();var e=this.Zf().g("stroke"),n=t.dp(e),s=a(this);n=new t.on(t.R(s.Ip.x,n),t.R(s.Ip.y,n));var r=l(this);s=s.JV===c(this.ib)?-10:10;var h=this.ib.xa();t.HA(r,h,n.x,n.y),t.IA(r,h,n.x-5,n.y+s),t.IA(r,h,n.x+5,n.y+s),t.IA(r,h,n.x,n.y),r.fill(e),r.stroke("none")}t.rr(this,dt,ct)&&o(this)&&this.tf(),o(this)||this.remove(),i(this,dt)}},t.g.Jt=function(){r(this).clear();var e=a(this),i=r(this);i.zIndex(gt);var n=this.Zf().g("stroke"),s=t.dp(n),o=new t.on(t.R(e.kq.x,s),t.R(e.kq.y,s)),l=new t.on(t.R(e.Ip.x,s),t.R(e.Ip.y,s));e=t.R(e.ur,s),i.stroke(n),n=this.ib.xa(),t.HA(i,n,o.x,o.y),t.IA(i,n,o.x,e),t.IA(i,n,l.x,e),t.IA(i,n,l.x,l.y)},t.g.tf=function(){var e=this.tk();if(this.label().enabled()){t.Px(e,this.ib.xl);var i=a(this);i=this.ib.xa()?new t.I(i.ur,i.kq.x,0,i.Ip.x-i.kq.x):new t.I(Math.min(i.kq.x,i.Ip.x),i.ur,Math.abs(i.Ip.x-i.kq.x),0),t.Wx(e,i),t.Qx(e)}else t.Px(e,null)},t.g.remove=function(){t.Px(this.tk(),null),r(this).clear(),l(this).clear()},t.g.label=function(e){return this.zj||(this.zj=new t.Hx,this.zj.Ga("defaultFontSettings","waterfall.arrow.label"),t.K(this.zj,this.lI,this)),t.p(e)?(this.zj.N(e),this):this.zj},t.g.lI=function(){t.or(this,dt,[ut,ct],4)},t.g.tk=function(){return t.p(this.kc)||(this.kc=new t.Ix),this.kc},t.g.Zf=function(){return this.b},t.g.Tda=function(){t.nr(this,dt,ut,8192)},t.g.U=function(e,i){s.u.U.call(this,e,i),this.label().ga(!!i,e.label),this.Zf().ga(!!i,e.connector),t.Iq(this,ht,e,i)},t.g.F=function(){var e=s.u.F.call(this);return t.Tq(this,ht,e,void 0,void 0,!0),e.label=this.label().F(),e.connector=this.Zf().F(),e},t.g.R=function(){this.ib=null,t.sd(this.i,this.f,this.kc,this.b),s.u.R.call(this)};var pt=s.prototype;pt.connector=pt.Zf,pt.label=pt.label,t.H(h,t.Y),h.prototype.ra=1|t.Y.prototype.ra|t.KE|t.LE,t.Jz(h,"arrowsController",["recalculation","appearance"]);var gt=41;t.g=h.prototype,t.g.xa=function(){return this.pa.xa()},t.g.ek=function(t){return t.Rh().rb()},t.g.Hx=function(){(0,t.Pe)(this.b,(function(e){if(o(e)){var i=e.label();i.Ug(),i=i.flatten();var n=e.label().g("anchor"),s=this.xa();i.anchor="auto"===n?s?"right-center":"center-top":n,n=e.label().g("position"),s=this.xa(),i.position="auto"===n?s?"left-center":"center":n,n=e.tk();var a=d(e);s=p(e),a=u(this,a);var r=u(this,s),l=this.pa;(s=V(l)).Li([l]),a=X(l,a,"absolute"),r=X(l,r,"absolute")-a,s=t.ov(s,{value:{value:r,type:"number"},absolute:{value:r,type:"number"},percent:{value:0==a?"-":r/Math.abs(a),type:0==a?"string":"percent"}}),e=e.label().tk(s),n.text(e),n.style(i),t.Mx(n),n.Ij()}}),this)},t.g.W=function(){if(this.b.length){if(function(e){e.Lf||(e.xl=t.mg().Wo(),e.Lf=t.uk(e.xl),e.Lf.zIndex(42));var i=e.Lf,n=k(e),s=e.sl();e.O().hc(s),s.hc(n).hc(i),s.clip(e.pa.dg())}(this),this.J(4)&&((0,t.Pe)(this.b,(function(t){t.ka(),t.B(4),t.da(!1)}),this),t.or(this,"arrowsController",["recalculation","appearance"]),this.I(4)),t.rr(this,"arrowsController","recalculation")&&(y(this),this.Hx(),this.va(t.LE|t.KE),t.vl.measure(),C(this),t.pr(this,"arrowsController","recalculation")),t.rr(this,"arrowsController","appearance")){var e=k(this);(0,t.Pe)(this.b,(function(i){i.O(e),t.jr(i),i.W()}),this)}i(this,"arrowsController")}else i(this,"arrowsController"),this.I(4294967295)},t.g.W_=function(i){var n=["appearance"];(t.X(i,4)||t.X(i,32768))&&(n.push("recalculation"),(0,t.Pe)(this.b,(function(t){t.ka(),e(t,"arrowsController"),t.da(!1)}),this)),t.or(this,"arrowsController",n,1)},t.g.sl=function(){return this.Oa||(this.Oa=t.ok(),this.Oa.zIndex(gt)),this.Oa},t.g.U=function(e,i){h.u.U.call(this,e,i),(0,t.Pe)(e,(function(t){D(this,t)}),this)},t.g.F=function(){var e=[];return(0,t.Pe)(this.b,(function(t){e.push(t.F())}),this),e},t.g.R=function(){t.sd(this.b,this.K,this.Lf),h.u.R.call(this)},t.g.Uw=function(){return(0,t.Wa)(this.b,(function(t){return t.tk()}),this)},t.H($,t.V);var ft={};t.sq(ft,[[1,"stroke",t.Pq]]),t.U($,ft),t.g=$.prototype,t.g.ra=12288,t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(){this.va(4096)},t.g.F=function(){var e=$.u.F.call(this);return t.Tq(this,ft,e),e.labels=this.labels().F(),e},t.g.U=function(e,i){$.u.U.call(this,e,i),this.labels().ga(!!i,e.labels),t.Iq(this,ft,e,i)},t.g.R=function(){t.qd(this.Da),$.u.R.call(this)};var mt=$.prototype;mt.labels=mt.labels,t.H(O,t.xB),t.g=O.prototype,t.g.sF={"%BubbleSize":"size","%RangeStart":"low","%RangeEnd":"high","%XValue":"x","%Diff":"diff","%Absolute":"absolute","%IsTotal":"isTotal"},t.g.AE=function(t,e){if("inside"==t||"outside"==t)return"center";if("auto"==t){if(1<this.ya.tj())return"center";t="value"}return O.u.AE.call(this,t,e)},t.g.Bh=function(t,e){return!j(this.ya)||"inside"!=t&&"outside"!=t||(t="center"),"auto"==t&&(t=1<this.ya.tj()?"center":"value"),O.u.Bh.call(this,t,e)},t.g.mha=function(t,e){return t&&e&&0<e.Ta.top-t.Ta.top?1:-1},t.g.nha=function(t,e){return t&&e&&0<e.Ta.left-t.Ta.left?1:-1},t.g.iA=function(e,i,n,s,a,o,r,l){return(e=O.u.iA.call(this,e,i,n,s,a,o,r,l,!0))&&a&&(n=(a=this.ya.ek(e)).width,s=a.height,i=t.oa(e),o=r.j("value"),l=r.j("zero"),o=Math.abs(o-l),o=(i={uid:i,fha:n=this.ya.xa()?n>o:s>o,label:e,Ta:a}).fha,l=e.ic("position"),n=e.jc(),a=(s=!!this.ya.xa())?"center-bottom":"left-center","outside"==l?(i=P(this,n),e.jc(i),e.qk(a)):"inside"==l?e.enabled(!o):o&&j(this.ya)&&(r=r.get("x"),this.ya.em[r]=this.ya.em[r]||{},this.ya.em[r].labels=this.ya.em[r].labels||[],this.ya.em[r].AY=this.ya.em[r].AY||{},(o=i.uid)in this.ya.em[r].AY||(this.ya.em[r].AY[o]=i,t.Ua(this.ya.em[r].labels,i,s?this.nha:this.mha)),i=P(this,n),e.jc(i),e.qk(a),this.ya.em.YH&&z(this.ya,r)),e.W()),e},t.g.ym=function(t,e){var i=O.u.ym.call(this,t,e);return i.diff={value:e.j("diff"),type:"number"},i.absolute={value:e.j("absolute"),type:"number"},i.isTotal={value:e.j("isTotal"),type:""},i},t.g.oV=function(){return{prevValue:0,C2:!1,Zha:"absolute"==this.ya.g("dataMode")}},t.g.XW=function(e,i,n){var s=-1<(0,t.za)(this.vm||[],i.j.rawIndex),a=e.get("isTotal"),o=!!i.j.missing||s;if(a=(s=!(n.C2||o))||(t.p(a)?!!a:o),!o||!s&&a){var r=this.ya.g("drawTotalsAsAbsolute");r=a&&r&&!o;var l=+i.data.value;o=n.Zha?o?n.prevValue:l:n.prevValue+(o?0:l),r&&(o=l),i.j.absolute=o,i.j.diff=r&&!s?0:o-n.prevValue,i.j.isTotal=a,i.j.missing=0,e=e.get("drawConnector"),i.j.drawConnector=!t.p(e)||e,n.C2=!0,n.prevValue=r&&!s?n.prevValue:o}else i.j.missing=1},t.g.jS=function(t){return"value"==t?0<=(Number(this.$().j("diff"))||0):O.u.jS.call(this,t)},t.g.kH=function(t){return t.j("isTotal")?t.get("value"):t.j("diff")},t.H(L,t.my),L.prototype.label=function(t){return this.labels(t)},L.prototype.U=function(t,e){L.u.U.call(this,t,e),"label"in t&&this.label(t.label)};var vt=L.prototype;vt.label=vt.label,t.H(I,t.xB);var bt="total",yt={};t.sq(yt,[[0,"x",t.zq]]),t.U(I,yt),t.Gq(I,["label"],"normal"),t.g=I.prototype,t.g.getData=function(){var e=[],i=_(this.ya),n=this.g("x"),s=this.name();if(function(e){var i=e.name();return!(0,t.Qw)(F(e.ib),(function(t){return!(t===e||!t.g("enabled")||i!==t.name())}))&&!(0,t.Qw)(_(e.ya),(function(t){return i===t}))}(this)){for(var a=this.ya,o=a.Ra().values(),r="diff"===a.g("dataMode"),l=!!a.g("drawTotalsAsAbsolute"),h=0,c=0;c<a.hb.length;c++){var u=a.hb[c];if(u&&u.enabled()){var d=u.data();if(d){d=d.$(),u=u.vm||[];for(var p=0,g=0;d.advance();){var f=d.ma();if((-1!==(0,t.za)(o,d.get("x"))||!o.length)&&-1===(0,t.za)(u,f)){if(f=d.get("value"),t.ea(f)){var m=d.get("isTotal");m=l&&m&&0<d.ma(),r?p+=m?0:f:g=m?g:f}if(n===d.get("x"))break}}h+=r?p:g}}}for(a=h,e.push({x:this.name(),name:s,isTotal:!0,value:a}),s=this.ya.hY(),i=i[i.length-1],o=_(this.ya),l=F(this.ib),r=0;r<l.length;r++)o.push(l[r].name());if(t.A(s)){for(l=!0,r=0;r<s.length;r++)c=(h=s[r]).value,h=h.name,c=t.ea(c)&&(0<=a&&0<=c||0>a&&0>c),d=t.p(h)&&-1===(0,t.za)(o,h),o.push(h),l=l&&d&&c;o=l}else o=!1;if(o&&i===n){for(n=[],o=i=0;o<s.length;o++)(r=s[o]).isSplit=!0,r.x=r.name,i+=r.value,n.push(r);for(n.length&&(Math.abs(i)>Math.abs(a)?n=[]:Math.abs(i)<Math.abs(a)&&((s={name:"Other",x:"Other",isSplit:!0}).value=-(i-a),n.push(s))),i=0;i<n.length;i++)e.push(n[i])}}return e},t.g.nN=function(t,e,i){return new L(t,e,i,void 0)},t.g.EP=function(){return!1},t.g.aO=function(){return!1},t.g.Ii=function(){return this},t.g.AE=function(e,i){return"auto"==e&&(e=0<=this.$().get("value")?"center-top":"center-bottom",e=t.Jo(e,this.g("isVertical")?-90:0),e=t.Jo(e,this.bb().Ne()?-180:0)),I.u.AE.call(this,e,i)},t.g.Bh=function(e,i){return"auto"===e&&(e=0<=this.$().get("value")?"center-top":"center-bottom",e=t.Jo(e,this.g("isVertical")?-90:0),e=t.Jo(e,this.bb().Ne()?-180:0)),I.u.Bh.call(this,e,i)},t.g.wU=function(){var t=I.u.wU.call(this);return t.push("waterfall.total"),t},t.g.oV=function(){return{$P:0}},t.g.XW=function(t,e,i){t=!!e.j.rawIndex,e.j.isSplit=t,e.j.isTotal=!t,t?(t=i.$P-e.data.value,e.j.valueOfPreviousPoint=t,i.$P=t):i.$P=e.data.value,e.j.connectorValue=i.$P},t.g.kH=function(t){return t.get("value")+(t.j("valueOfPreviousPoint")||0)},t.g.O3=function(t,e,i,n,s){i=this.bb();var a={};return a[e[0]]=i.transform(i.Lz(this.kH(t),this.Rx),.5),this.YA(t,a,s),n},t.g.YD=function(e,i,n,s,a){return I.u.YD.call(this,e,i,n,s,a),e.j("isSplit")&&(i=e.j("valueOfPreviousPoint"),i=t.Za(this.bb().transform(i,.5),0,1),e.j("zero",this.Zs(a,[i])[1])),s},t.g.ym=function(e,i){if(i.j("isSplit")){var n=i.get("value"),s=i.ma(),a=this.Ra().names();n={name:{value:t.p(a[s])?a[s]:i.get("name"),type:"string"},value:{value:n,type:"number"},index:{value:i.ma()-1,type:"number"},isSplit:{value:!0,type:""}}}else{n=F(this.ib),s=i.get("value"),a=i.ma();var o=this.Ra().names();n={name:{value:t.p(o[a])?o[a]:i.get("name"),type:"string"},value:{value:s,type:"number"},index:{value:(0,t.za)(n,this),type:"number"},x:{value:this.g("x"),type:"string"},isTotal:{value:!0,type:""}}}return n},t.g.vC=function(t,e,i,n){I.u.vC.call(this,t,e,i,n),this.name(t.name)},t.g.j4=function(){this.B(512,16)},t.g.F=function(){var e=I.u.F.call(this);return t.Tq(this,yt,e),e.normal=this.Qa().F(),e.hovered=this.lb().F(),e},t.g.R=function(){this.ib=null,I.u.R.call(this)},t.g.U=function(e,i){I.u.U.call(this,e,i),t.Iq(this,yt,e,i),this.Qa().U(e),"normal"in e&&this.Qa().U(e.normal,i),"hovered"in e&&this.lb().U(e.hovered,i)};var St=I.prototype;St.x=St.x,St.label=St.label,t.H(E,t.wu);var xt=30;t.g=E.prototype,t.g.ra=1,t.g.sa=516,t.g.W=function(){if(this.zc()){if(this.wb.parent()||this.wb.parent(this.O()),this.wb.clip(this.ja()),"ordinal"==this.pa.Ra().Ma()){t.xr(this.b);for(var e=this.pa.Ra().values(),i=0;i<this.b.length;i++){var n=this.b[i];n.ta("isVertical",this.pa.xa()),n.O(0<=(0,t.za)(e,n.g("x"))?this.wb:null),n.ja(this.ja())}for(t.zr(this.b),e=0;e<this.b.length;e++)this.b[e].W()}this.I(512)}},t.g.pb=function(){if(this.J(512)){for(var t=0;t<this.b.length;t++){var e=this.b[t];e.g("enabled")&&(e.ka(),e.data(e.getData()),e.da(!1))}this.I(512)}},t.g.nla=function(e){t.X(e,16)&&this.B(512),this.dispatchEvent(e)},t.g.R=function(){t.sd(this.wb,this.b),this.wb=null,this.b.length=0,E.u.R.call(this)},t.g.U=function(t,e){E.u.U.call(this,t,e);for(var i=0;i<t.length;i++)U(this,t[i])},t.g.F=function(){for(var t=E.u.F.call(this),e=[],i=0;i<this.b.length;i++)e.push(this.b[i].F());return t.totals=e,t},t.H(M,t.WB),t.Jz(M,"waterfall",["arrows","connectorsLabels","stackLabels","totals"]);var wt={};wt.waterfall={Fb:32,Kb:2,Lb:[t.AH,t.EH,t.FH,t.JH,t.RH,t.qH],Ob:null,Jb:null,Cb:5767168|t.QG,Ab:"value",zb:"zero"},M.prototype.fj=wt,t.Nz(M,M.prototype.fj),t.g=M.prototype,t.g.Ss=function(){return"waterfall"},t.g.uH=function(){return"value"},t.g.ps=function(){},t.g.mU=function(t){return+t.j[t.j.isTotal?"absolute":"diff"]},t.g.P4=function(t,e,i,n){var s,a=0,o=[];for(s=0;s<t.length;s++){var r=t[s];r.X.Ma()!==bt&&o.push(r)}if(t=o,e)for(s=0;s<t.length;s++){var l=t[s].data[e-1];a+=Number(l.j.diff)||0}for(this.bj=[],s=e;s<=i;s++){for(o=e=0;o<t.length;o++)(l=t[o].data[s]).j.isTotal||(l.j.stackedZero+=a,l.j.stackedValue+=a,l.j.stackedZeroPrev+=a,l.j.stackedValuePrev+=a,l.j.stackedZeroNext+=a,l.j.stackedValueNext+=a),n.Xc(l.j.stackedValue),n.Xc(l.j.stackedValuePrev),n.Xc(l.j.stackedValueNext),e+=l.j.missing?0:Number(l.j.diff)||0;a+=e,l.j.connectorValue=a,this.bj.push(a)}},t.g.pb=function(){st(this).pb(),M.u.pb.call(this)},t.g.Qh=function(e){M.u.Qh.call(this,e),(t.rr(this,"waterfall","totals")||this.J(4))&&((e=st(this)).O(this.Na),e.ja(this.fc),e.W(),t.pr(this,"waterfall","totals")),this.Jt(),this.wi(),e=nt(this),this.K||(this.K=this.Na.Bd(),this.K.zIndex(gt),e.O(this.K));var i=t.rr(this,"waterfall","arrows"),n=this.J(4);if(n&&e.B(4),(i||n)&&(e.W(),t.pr(this,"waterfall","arrows")),j(this)&&(e=this.Ra(),e=this.xn[String(t.oa(e))][0]))for(this.em.YH=!0,e=e.qt,i=0;i<e.length;i++)z(this,e[i])},t.g.aL=function(){M.u.aL.call(this),(0,t.Qw)(this.hb,(function(t){return!(!t||t.md||!t.zc())}))&&(this.em={YH:!1})},t.g.Jt=function(){this.P?this.P.clear():this.P=t.qk();var e=this.Ra();if((e=this.xn[String(t.oa(e))])&&e.length){e=this.nj().g("stroke"),this.P.stroke(e),e=t.$b(e),this.P.parent(this.O()),this.P.zIndex(1e3),this.P.clip(this.dg());for(var i,n=this.xa(),s=0;s<this.Re[0].data.length;s++)if(J(this,s)){if(t.p(i)){var a=this.Re[0].data[i].j.drawConnector;if(a=!t.p(a)||a){var o=R(this,i,s);a=this.Re[0].data[i].data.x;var r=o.from.x,l=o.from.y,h=o.Je.x;o=o.Je.y,t.HA(this.P,n,r,t.R(l,e)),t.IA(this.P,n,h,t.R(o,e)),r=n?{mi:l,Pe:r,Kla:o,Nla:h}:{mi:r,Pe:l,Kla:h,Nla:o},this.fh.push(r),this.em[a]=this.em[a]||{},this.em[a].Uda=r,this.em[a].Lka=W(this,i)}}i=s}}},t.g.Gt=function(t,e){return new O(this,this,t,e,!0)};var Ct={};t.rq(Ct,0,"dataMode",(function(e,i){return t.zk(rt,e,i||"absolute")})),t.rq(Ct,0,"drawTotalsAsAbsolute",t.Dq),t.U(M,Ct),t.g=M.prototype,t.g.CS=function(){var e=M.u.CS.call(this),i=this.PM();if(!t.Jc(i)){var n=t.oa(this.Ra()),s=st(this),a=i[n].Lp;n=i[n].qt,i=[];for(var o=0;o<s.b.length;o++){var r=s.b[o];r.g("enabled")&&-1!==(0,t.za)(n,r.name())&&i.push(t.AB(r,a,n,!1))}for(s=0;s<i.length;s++)e.push(i[s])}return e},t.g.PM=function(){var e=M.u.PM.call(this);if(!t.Jc(e)){var i=t.oa(this.Ra()),n=e[i].qt;i=e[i].Lp;for(var s=this.IR(),a={},o=0;o<s.length;o++){var r=s[o];if(r.g("enabled")){var l=r.g("x");a[l]||(a[l]=[]),a[l].push.apply(a[l],A(r))}}for(var h in a)o=a[h],-1!==(s=t.xa(n,(function(t){return h==t})))&&t.qa(t.Ca,n,s+1,0).apply(null,o);for(o=0;o<n.length;o++)i[a=t.qo(n[o])]=o}return e},t.g.ek=function(e){var i=e.Rh().rb();return e=e.ic("padding"),t.Ku(i,e)},t.g.wi=function(){!function(e){(0,t.Pe)(e.me,(function(t){this.nf.push(t)}),e),e.me.length=0}(this),q(this);var e=this.J(4)||t.rr(this,"waterfall","connectorsLabels"),i=this.nj().labels();if(e){if(this.nj().ka(),i.clear(),i.g("enabled")&&this.tj()){e=this.nj().labels(),this.sb||(this.sb=this.Na.Bd(),this.sb.zIndex(31),e.O(this.sb)),this.sb.clip(this.fc);for(var n,s,a=e.g("anchor"),o=e.g("position"),r=0;r<this.Re[0].data.length;r++)if(J(this,r)){if(n=r,t.p(s)&&!Z(this,n)){var l=X(this,r,"diff"),h=this.Re[0].qt[r],c=a,u=o,d=l;"auto"===c&&("auto"===u?(c=this.xa()?["left-center","right-center"]:["center-bottom","center-top"],c=0<=d?c[0]:c[1]):c="center"===u?"center":t.Jo(u,180)),d=c,"auto"===(c=o)?(c=this.xa()?["right-center","left-center"]:["center-top","center-bottom"],l=0<=l?c[0]:c[1]):l=c;var p=R(this,s,n);c=Math.min(p.from.x,p.Je.x),u=Math.min(p.from.y,p.Je.y);var g=Math.max(p.from.x,p.Je.x);p=Math.max(p.from.y,p.Je.y),c=this.xa()?t.kn(u,c,p-u,g-c):t.kn(c,u,g-c,p-u),l={value:t.Eo(c,l)},g=s,c=n,(s=V(this)).Li([this]),u=(c=X(this,c,"diff"))/Math.abs(X(this,g,"diff")),g=c/Math.abs(X(this,g,"absolute")),p=(0,window.isFinite)(u);var f=(0,window.isFinite)(g);s=t.ov(s,{value:{value:c,type:"number"},stack:{value:p?u:"-",type:p?"percent":"string"},total:{value:f?g:"-",type:f?"percent":"string"}}),(s=e.add(s,l,r)).ta("anchor",d),this.em[h]=this.em[h]||{},this.em[h].ota=s}s=n}e.W()}this.nj().da(!1)}i.I(i.sa),t.pr(this,"waterfall","connectorsLabels"),t.qr(this,"waterfall",["stackLabels","connectorsLabels"])},t.g.Kn=function(e){t.X(e,1)&&(t.jr(nt(this)),t.nr(this,"waterfall","arrows")),M.u.Kn.call(this,e)},t.g.Mka=function(){t.jr(nt(this)),t.or(this,"waterfall",["stackLabels","arrows"],1)},t.g.yJ=function(e){return this.i||(this.i=new t.Pu,t.W(this,"stackLabels",this.i),this.i.I(this.i.sa),t.K(this.i,this.Mka,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.i.N(e),this):this.i},t.g.Ms=function(){return!0},t.g.Ol=function(e,i){var n=[];if("categories"==e){this.ba={};for(var s,a,o,r=this.Ue(),l={},h=0,c=0;c<r.length;c++)s=r[c],a=(a=t.cm("risingFill",1,!1))(s,t.gm,!0,!0),(o=t.qo(a))in l?this.ba[l[o]].X.push(s):(l[o]=h,this.ba[h]={X:[s],type:"rising"},n.push({text:"Increase",categoryType:"increase",iconEnabled:!0,iconFill:a,sourceUid:t.oa(this),sourceKey:h++})),a=(a=t.cm("fallingFill",1,!1))(s,t.gm,!0,!0),(o=t.qo(a))in l?this.ba[l[o]].X.push(s):(l[o]=h,this.ba[h]={X:[s],type:"falling"},n.push({text:"Decrease",categoryType:"decrease",iconEnabled:!0,iconFill:a,sourceUid:t.oa(this),sourceKey:h++})),a=(a=t.cm("fill",1,!1))(s,t.gm,!0,!0),(o=t.qo(a))in l?this.ba[l[o]].X.push(s):(l[o]=h,this.ba[h]={X:[s],type:"total"},n.push({text:"Total",categoryType:"total",iconEnabled:!0,iconFill:a,sourceUid:t.oa(this),sourceKey:h++}))}else n=M.u.Ol.call(this,e,i);return n},t.g.wq=function(t,e){if("categories"!=this.eg().g("itemsSourceMode"))return M.u.wq.call(this,t,e);var i=t.Ki();if("total"===this.ba[i].type)for(var n=F(st(this)),s=0;s<n.length;s++)n[s].Tj();i=(n=this.ba[i]).X,n=n.type;for(var a,o,r,l,h,c=0;c<i.length;c++){for(a=(s=i[c]).cg(),h=[];a.advance();){var u=a.ma();a.j("missing")||(o=a.j("isTotal"),r=0<=a.j("diff")&&!o,l=0>a.j("diff")&&!o,(o=o&&"total"==n||r&&"rising"==n||l&&"falling"==n)&&h.push(u))}s.Tj(h)}},t.g.vq=function(t,e){if("categories"!=this.eg().g("itemsSourceMode"))return M.u.vq.call(this,t,e);this.Md()},t.g.zr=function(t,e){if("default"==this.eg().g("itemsSourceMode"))return M.u.zr.call(this,t,e)},t.g.FE=function(e){t.or(this,"waterfall",["arrows","stackLabels","totals"]),t.X(e,32788)&&st(this).B(512),M.u.FE.call(this,e)},t.g.uV=function(){M.u.uV.call(this),t.or(this,"waterfall",["stackLabels","connectorsLabels"])},t.g.kda=function(e,i,n,s,a){t.kl(405,null,["chart.connectorStroke()","chart.connectors().stroke()"],!0);var o=this.nj();return arguments.length?o.stroke.apply(o,arguments)&&this:o.stroke()},t.g.nj=function(e){return this.Kj||(this.Kj=new $,t.W(this,"connectors",this.Kj),t.K(this.Kj,this.Wda,this)),t.p(e)?(this.Kj.N(e),this):this.Kj},t.g.Wda=function(e){t.X(e,8192)&&this.B(32768,1),t.X(e,4096)&&t.nr(this,"waterfall","connectorsLabels",1)},t.g.jda=function(e){return t.C(e)?U(st(this),e):null},t.g.qda=function(e){var i=st(this);return G(i,(0,t.za)(i.b,e))},t.g.rda=function(t){return G(st(this),t)},t.g.nda=function(t){return st(this).b[t]||null},t.g.IR=function(){return F(st(this))},t.g.hY=function(i){return t.p(i)?(this.Od=i,e(this,"waterfall"),st(this).B(st(this).sa),this.B(this.sa,1),this):this.Od},t.g.ola=function(){e(this,"waterfall"),this.B(2589200,1)},t.g.iQ=function(t){it(this),M.u.iQ.call(this,t)},t.g.Yu=function(t){it(this),M.u.Yu.call(this,t)},t.g.Md=function(t){M.u.Md.call(this,t),t=F(st(this));for(var e=0;e<t.length;e++)t[e].Md()},t.g.oU=function(t,e,i){return t&&t.Ma()===bt?[{series:t,points:[e]}]:M.u.oU.call(this,t,e,i)},t.g.qU=function(){var t=M.u.qU.call(this),e=[];return e.push.apply(e,t),e.push.apply(e,this.IR()),e},t.g.Kw=function(t){it(this),M.u.Kw.call(this,t)},t.g.vda=function(){t.nr(this,"waterfall","arrows",1)},t.g.ida=function(t){return D(nt(this),t)},t.g.mda=function(t){return nt(this).b[t]||null},t.g.pda=function(t){return T(nt(this),t)},t.g.oda=function(e){var i=nt(this);return 0<=(e=(0,t.za)(i.b,e))&&T(i,e)},t.g.lda=function(){return t.Ha(nt(this).b)},t.g.F=function(){var e=M.u.F.call(this);return t.Tq(this,Ct,e.chart),e.chart.stackLabels=this.yJ().F(),e.chart.connectors=this.nj().F(),e.chart.totals=st(this).F(),e.chart.arrows=nt(this).F(),e.chart.totalSplits=this.Od,e},t.g.U=function(e,i){M.u.U.call(this,e,i);var n=e.stackLabels;n&&this.yJ().ga(!!i,n),e.arrows&&nt(this).ga(!!i,e.arrows),e.totals&&st(this).ga(!!i,e.totals),e.totalSplits&&this.hY(e.totalSplits),((n=e.connectors)||e.connectorStroke)&&((n=n||{}).stroke=n.stroke||e.connectorStroke,this.nj().ga(!!i,n)),t.Iq(this,Ct,e)},t.g.R=function(){t.sd(this.i,this.qc,this.P,this.sb,this.Kj,this.o,this.Hd),M.u.R.call(this)};var Tt=M.prototype;Tt.addTotal=Tt.jda,Tt.removeTotal=Tt.qda,Tt.removeTotalAt=Tt.rda,Tt.getTotalAt=Tt.nda,Tt.getAllTotals=Tt.IR,Tt.splitTotal=Tt.hY,Tt.stackLabels=Tt.yJ,Tt.xScale=Tt.Ra,Tt.yScale=Tt.bb,Tt.crosshair=Tt.mh,Tt.xGrid=Tt.lm,Tt.yGrid=Tt.nm,Tt.xMinorGrid=Tt.Qr,Tt.yMinorGrid=Tt.Tr,Tt.xAxis=Tt.$h,Tt.getXAxesCount=Tt.wD,Tt.yAxis=Tt.ij,Tt.getYAxesCount=Tt.yD,Tt.getSeries=Tt.ef,Tt.lineMarker=Tt.Ym,Tt.rangeMarker=Tt.gn,Tt.textMarker=Tt.mn,Tt.palette=Tt.cc,Tt.markerPalette=Tt.Nf,Tt.hatchFillPalette=Tt.ve,Tt.getType=Tt.Ma,Tt.addSeries=Tt.kl,Tt.getSeriesAt=Tt.Ai,Tt.getSeriesCount=Tt.tj,Tt.removeSeries=Tt.Ao,Tt.removeSeriesAt=Tt.Rn,Tt.removeAllSeries=Tt.Dp,Tt.getPlotBounds=Tt.dg,Tt.xZoom=Tt.Tq,Tt.yZoom=Tt.Uq,Tt.xScroller=Tt.Mp,Tt.yScroller=Tt.Ur,Tt.getStat=Tt.Rg,Tt.annotations=Tt.Nk,Tt.getXScales=Tt.vy,Tt.getYScales=Tt.xy,Tt.data=Tt.data,Tt.connectors=Tt.nj,Tt.addArrow=Tt.ida,Tt.getArrow=Tt.mda,Tt.removeArrowAt=Tt.pda,Tt.removeArrow=Tt.oda,Tt.getAllArrows=Tt.lda,Tt.connectorStroke=Tt.kda,t.H(at,t.lC),t.PG[32]=at,t.g=at.prototype,t.g.type=32,t.g.flags=263713,t.g.Kh={rising:"path",risingHatchFill:"path",falling:"path",fallingHatchFill:"path",path:"path",hatchFill:"path"},t.g.yt=function(t){var e=t.j("shapes");for(i in e)e[i].clear();var i=0<=t.j("diff");if(t.j("isTotal")){i="path";var n="hatchFill"}else i?(i="rising",n="risingHatchFill"):(i="falling",n="fallingHatchFill");this.EF(t,e[i],e[n])},t.g.ug=function(t,e){var i=0<=t.j("diff");if(t.j("isTotal")){i="path";var n="hatchFill"}else i?(i="rising",n="risingHatchFill"):(i="falling",n="fallingHatchFill");var s={};s[i]=s[n]=!0,s=this.bd.ed(e,s),this.EF(t,s[i],s[n])},t.Tp.waterfall=ot,t.E("anychart.waterfall",ot)}.call(this,$)),_.surface||(_.surface=1,function(t){var e=function(t,e){t*=Math.PI/180,e*=Math.PI/180;var i=Math.sin(t),n=Math.cos(t),s=Math.sin(e),a=Math.cos(e);return[n*a,-i*a,s,i,n,0,-s*n,i*s,a]},i=function(t,e){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[0]*t[3]+e[1]*t[4]+e[2]*t[5],e[0]*t[6]+e[1]*t[7]+e[2]*t[8]]},n=function(t,n){for(var s=i(e(0,t),[-1,0,0]),a=s[0],o=s[1],r=a*a+o*o+(s=s[2])*s,l=0,h=0;h<n.length;h++){var c=n[h];l+=Math.abs(a*c[0]+o*c[1]+s*c[2]-r)/Math.sqrt(r)}return l/n.length},s=function(t,e){var i=t[0],n=t[1],s=t[2],a=i*i+n*n+s*s;return Math.abs(i*e[0]+n*e[1]+s*e[2]-a)/Math.sqrt(a)},a=function(t,e){return(t=t.slice())[1]=e.left+t[1]*e.width/1.48+e.width/2,t[2]=e.top+t[2]*e.height/1.75+e.height/2,t},o=function(t,e){t=t.slice();for(var i=0;i<t.length;i++)t[i]=a(t[i],e);return t},r=function(){t.kz.call(this),this.G=null,this.P={FY:[],ST:[]},this.ba=!1},l=function(e){if(0==e.P.ST.length){var i=t.qk();return i.parent(e.O()).zIndex(e.zIndex()),i.stroke("none"),e.P.FY.push(i),i}return i=e.P.ST.pop(),e.P.FY.push(i),i.parent(e.O()),i},h=function(e,i){return t.p(i)?(e.ba=!!i,e):e.ba},c=function(e){return e.G=e.G?e.G:t.qk(),e.G},u=function(t,s){var a=t.ja(),r=e(t.K,t.i),l=[];if(l[0]=i(r,s[0]),l[1]=i(r,s[1]),n(t.i,[l[0]])>n(t.i,[l[1]])){var h=s[1];s[1]=s[0],s[0]=h,h=l[1],l[1]=l[0],l[0]=h}s[2]=[s[1][0],s[1][1],-.5],l[2]=i(r,s[2]),a=o(l,a),t.o.moveTo(a[0][1],a[0][2]),t.o.lineTo(a[1][1],a[1][2]),t.G.moveTo(a[1][1],a[1][2]),t.G.lineTo(a[2][1],a[2][2])},d=function(){t.Qy.call(this),this.D=[],this.P=[]},p=function(e,i,n){var s=e.D.slice(),a=e.P.slice(),o=e.g("length"),r=e.g("stroke"),l=t.dp(r),h=s[0]*(1-i)+i*a[0];i=s[1]*(1-i)+i*a[1]+n/2,i=t.R(i,1)-.5,h=t.R(h,l),e.path.moveTo(h,i),e.path.lineTo(h,i+o),e.path.stroke(r)},g=function(){t.Sy.call(this),this.b=[[-.5,-.5,.5],[-.5,.5,.5],[.5,.5,.5],[.5,-.5,.5]],this.f=[]},f=function(t){t.f=e(t.K,t.i)},m=function(t){f(t);for(var e=[],n=[0,0,0],s=[0,0,0],a=0;a<t.b.length;a++){var o=t.b[a];e.push(i(t.f,o)),e[a][1]<s[1]&&(n=o,s=e[a])}return n},v=function(e,s,a,r){s=i(e.f,s),a=i(e.f,a),e.D=s.slice(),e.P=a.slice();var l=o([s,a],r),h=l[0][1],c=l[0][2];r=l[1][1],l=l[1][2],s=e.zIndex()+2-n(e.i,[s,a]),(a=e.Bz()).clear(),a.moveTo(h,c).lineTo(r,l),a=e.Xa(),e=e.yb(),t.xr(a,e);var u=[h,c],d=[r,l];t.p(u)&&t.p(d)&&(a.D=u,a.P=d,a.va(1)),a.zIndex(s),h=[h,c],r=[r,l],t.p(h)&&t.p(r)&&(e.D=h,e.P=r,e.va(1)),e.zIndex(s),t.yr(a,e)},b=function(){g.call(this)},y=function(t,e,n){var s=t.ja(),a=t.Vt()?t.b[0]:t.TG(),r=[-.5==a[0]?.5:-.5,a[1],a[2]];if(-.5==r[0]){var l=a;a=r,r=l}return a=i(t.f,a),r=i(t.f,r),{x:(t=o([a,r],s))[0][1]*(1-e)+e*t[1][1],y:t[0][2]*(1-e)+e*t[1][2]+n}},S=function(){g.call(this)},x=function(t,e,n){var s=t.ja(),a=t.Vt()?t.b[0]:t.TG(),r=[a[0],-.5==a[1]?.5:-.5,a[2]];if(-.5==r[1]){var l=a;a=r,r=l}return a=i(t.f,a),r=i(t.f,r),{x:(t=o([a,r],s))[0][1]*(1-e)+e*t[1][1],y:t[0][2]*(1-e)+e*t[1][2]+n}},w=function(){g.call(this)},C=function(t,e,n){var s=t.ja(),a=t.Vt()?t.b[0]:m(t),r=[a[0],a[1],-.5];return a=i(t.f,a),r=i(t.f,r),s=(t=o([a,r],s))[0][2],a=t[1][2],r=Math.abs(s-a),{x:t[0][1]+n,y:Math.min(s,a)+r-r*e}},T=function(e,i){t.Y.call(this),this.ib=e,this.f=i,this.Oa=t.ok(),this.Sc=t.qk(),this.Sc.zIndex(2),this.f.O(this.Oa),this.Sc.parent(this.Oa),this.Sc.wa("mousemove",this.sq,!1,this),this.Sc.wa("mouseout",this.sq,!1,this),this.Sc.wa("mouseover",this.sq,!1,this)},D=function(e){t.Y.call(this),this.ib=e,this.Sc=t.qk(),this.Sc.zIndex(1)},k=function(){t.V.call(this),this.ua={},t.T(this.ua,[["enabled",0,32768],["stroke",0,8192]])},$=function(e){t.Y.call(this),this.pa=e,this.Bc=[],this.Zc={x:[0,"x"],y:[1,"y"],z:[2,"z"]},this.Oa=t.ok(),t.T(this.ua,[["enabled",0,1],["size",0,1],["fill",0,1],["stroke",0,1],["type",0,1]])},O=function(t,e,n){var o=e.data(),r=i(t.pa.Xg,G(t.pa,o)),l=a(r,n);l&&(e.b=l),e.zIndex(s(t.pa.n0,r)),o=i(t.pa.Xg,G(t.pa,[o[0],o[1],t.pa.$u().uh()])),n=a(o,n),t.eM(),e.f.b={from:l,Je:n}},P=function(t){if(!t.Bc.length&&t.la)for(var e=t.la.$();e.advance();){var i=+e.get("x"),n=+e.get("y"),s=+e.get("z");(0,window.isNaN)(i)||(0,window.isNaN)(n)||(0,window.isNaN)(s)||(i=t.jp({index:e.ma(),data:[i,n,s]}),t.Bc.push(i))}return t.Bc},L=function(t){var e=t.index();t=t.data();var i={};return i.index={type:"number",value:e},i.x={type:"number",value:t[0]},i.y={type:"number",value:t[1]},i.z={type:"number",value:t[2]},i},I=function(e,i,n){e.Si||(e.Si=new t.Fw),i=i.index();var s=e.$();return s.select(i),e.Si.lg(s),t.ov(e.Si,n)},A=function(e,i){function n(){var e=this.g("rotationZ"),i=this.g("rotationY"),n=t.wr(this,"xGrid"),s=t.wr(this,"yGrid"),a=t.wr(this,"zGrid"),o=t.wr(this,"xAxis"),r=t.wr(this,"yAxis"),l=t.wr(this,"zAxis");t.xr(o,r,l,n,s,a),n&&n.Do(e).Jq(i),s&&s.Do(e).Jq(i),a&&a.Do(e).Jq(i),l&&l.Do(e).Jq(i),o&&o.Do(e).Jq(i),r&&r.Do(e).Jq(i),t.zr(o,r,l,n,s,a)}t.Bx.call(this),this.Ga("surface"),this.Hr=["z","value"],this.HY=[],this.nz=[],this.IY=[],this.Ca=[],this.Qz=[],this.data(e||null,i),t.T(this.ua,[["rotationZ",10485776,1,null,n],["rotationY",10485776,1,null,n],["box",16,1],["stroke",16,1]])},E=function(e){function i(e){return e.length&&(0,t.lD)(e,(function(t){return null!==t&&""!==t}))}var n=[],s=[],a=(0,t.Qw)(e[0],(function(t){return(0,window.isNaN)(+t)}));return(0,t.Pe)(e,(function(t){n.push(t.slice(0,3)),s.push(t.slice(3,6))})),n=(0,t.Ye)(n,i),e=!(s=(0,t.Ye)(s,i)).length&&a&&(0,t.Qw)(n[0],(function(t){return-1!=t.indexOf("marker")})),a&&(n.splice(0,1),s.splice(0,1)),e?{s6:[],iW:n}:{s6:n,iW:s}},G=function(t,e){return[t.Ra().transform(e[0])-.5,t.bb().transform(e[1])-.5,1-t.$u().transform(e[2])-.5]},U=function(t,e){for(var i=0,n=0;n<e.length;n++)i+=s(t.n0,e[n]);return 2-(i/=e.length)},F=function(t){for(var e=0,i=0,n=0,s=0,a=-window.Infinity,o=0,r=window.Infinity,l=0,h=0;h<t.length;h++){t[h][1]<e&&(e=t[h][1],i=h),t[h][1]>n&&(n=t[h][1],s=h);var c=t[h][0];a<c&&(a=t[h][0],o=h),r>c&&(r=t[h][0],l=h)}return{left:t[i],right:t[s],sta:t[o],k4:t[l]}},M=function(e,i,n,s){var a=t.oa(i.scale());t.Aa(e,a)||(s[n].scale=i.scale().F())},_=function(t,e,i){i in e&&(t[i](e[i]),"scale"in e[i]&&t[i]().scale(e[i].scale))},N=function(t,e){var i=new A(t,e);return i.kd(i.vf("colorScale")),i};t.H(r,t.kz),t.g=r.prototype,t.g.Sz=function(){r.u.Sz.call(this);for(var t;t=this.P.FY.pop();)t.clear(),this.P.ST.push(t)},t.g.sK=function(){r.u.sK.call(this),c(this).stroke(this.g("stroke"))},t.g.TK=function(){r.u.TK.call(this);var t=this.O();c(this).parent(t)},t.g.xC=function(){var e=this.zIndex()-1,i=0>=this.i?e+2:e;this.Uh().zIndex(i),c(this).zIndex(e),t.Dc(this.D,(function(t){t.zIndex(i)}))},t.g.remove=function(){r.u.remove.call(this),c(this).parent(null)},t.g.Lj=function(){c(this).clear(),r.u.Lj.call(this)},t.g.KG=function(t){if(t-=.5,this.ba){var s=[[-.5,-.5,t=-t],[-.5,.5,t],[.5,.5,t],[.5,-.5,t]];t=e(this.K,this.i);for(var a=[],r=-window.Infinity,l=0,h=0;h<s.length;h++){a[h]=i(t,s[h]);var c=n(this.i,[a[h]]);c>r&&(r=c,l=h)}for(a=[[-(a=s[l])[0],a[1],a[2]],[a[0],a[1],a[2]],[a[0],-a[1],a[2]]],h=0;h<a.length;h++)a[h]=i(t,a[h]);t=this.ja(),t=o(a,t),this.G.moveTo(t[0][1],t[0][2]),this.G.lineTo(t[1][1],t[1][2]),this.G.lineTo(t[2][1],t[2][2])}else u(this,t=[[t,-.5,.5],[t,.5,.5]])},t.g.LG=function(t){u(this,[[-.5,t-=.5,.5],[.5,t,.5]])},t.g.HG=function(t,s,a){if(h(this)){var r=l(this),c=-(t-.5);t=-(s-.5);var u=[[-.5,-.5,c],[-.5,.5,c],[.5,.5,c],[.5,-.5,c]];c=e(this.K,this.i),s=[];for(var d=-window.Infinity,p=0,g=0;g<u.length;g++){s[g]=i(c,u[g]);var f=n(this.i,[s[g]]);f>d&&(d=f,p=g)}for(s=[[-(g=u[p])[0],g[1],g[2]],[g[0],g[1],g[2]],[g[0],-g[1],g[2]]],t=[[-g[0],g[1],t],[g[0],g[1],t],[g[0],-g[1],t]],g=0;g<s.length;g++)s[g]=i(c,s[g]),t[g]=i(c,t[g]);c=this.ja(),s=o(s,c),t=o(t,c),r.moveTo(s[0][1],s[0][2]),r.lineTo(s[1][1],s[1][2]),r.lineTo(s[2][1],s[2][2]),r.lineTo(t[2][1],t[2][2]),r.lineTo(t[1][1],t[1][2]),r.lineTo(t[0][1],t[0][2]),r.close(),r.fill(a.fill()),r.zIndex(20)}else{for(r=e(this.K,this.i),(t=[[t-=.5,-.5,.5],[t,.5,.5]]).push([s-=.5,.5,.5]),t.push([s,-.5,.5]),u=[],d=0;d<t.length;d++)u.push(i(r,t[d]));for(c=this.ja(),g=o(u,c),a.moveTo(g[0][1],g[0][2]),a.lineTo(g[1][1],g[1][2]),a.lineTo(g[2][1],g[2][2]),a.lineTo(g[3][1],g[3][2]),a.close(),g=l(this),p=[],u[0][0]>u[1][0]?p.push(t[0]):p.push(t[1]),p.push([p[0][0],p[0][1],-.5]),p.push([s,p[0][1],-.5]),p.push([s,p[0][1],.5]),s=[],d=0;d<t.length;d++)s.push(i(r,p[d]));r=o(s,c),g.moveTo(r[0][1],r[0][2]),g.lineTo(r[1][1],r[1][2]),g.lineTo(r[2][1],r[2][2]),g.lineTo(r[3][1],r[3][2]),g.close(),g.fill(a.fill()),g.zIndex(20)}},t.g.IG=function(t,n,s){var a=e(this.K,this.i);(t=[[-.5,t-=.5,.5],[.5,t,.5]]).push([.5,n-=.5,.5]),t.push([-.5,n,.5]);for(var r=[],h=0;h<t.length;h++)r.push(i(a,t[h]));var c=this.ja(),u=o(r,c);s.moveTo(u[0][1],u[0][2]),s.lineTo(u[1][1],u[1][2]),s.lineTo(u[2][1],u[2][2]),s.lineTo(u[3][1],u[3][2]),s.close(),(u=l(this)).clear();var d=[];for(r[0][0]>r[1][0]?d.push(t[0]):d.push(t[1]),d.push([d[0][0],d[0][1],-.5]),d.push([d[0][0],n,-.5]),d.push([d[0][0],n,.5]),n=[],h=0;h<t.length;h++)n.push(i(a,d[h]));a=o(n,c),u.moveTo(a[0][1],a[0][2]),u.lineTo(a[1][1],a[1][2]),u.lineTo(a[2][1],a[2][2]),u.lineTo(a[3][1],a[3][2]),u.close(),u.fill(s.fill()),u.zIndex(20)},t.g.Do=function(e){return t.p(e)?(this.K=+e,this.B(28,1),this):this.K},t.g.Jq=function(e){t.p(e)&&(this.i=+e,this.B(28,1))},t.g.R=function(){t.qd(this.G),this.G=null,r.u.R.call(this)},t.H(d,t.Qy),t.g=d.prototype,t.g.ra=t.Qy.prototype.ra,t.g.sa=16|t.Qy.prototype.sa,t.g.lT=function(e,i,n,s){i=this.g("length"),n=this.D.slice();var a=this.D[1],o=this.P[1],r=Math.abs(a-o);n[1]=Math.min(a,o)+r-r*e,e=this.g("stroke"),a=t.dp(e),s=n[0]-s/2,s=t.R(s,1)+.5,n=n[1],n=t.R(n,a),this.path.moveTo(s,n),this.path.lineTo(s-i,n),this.path.stroke(e)},t.g.hT=function(t,e,i,n){p(this,t,n)},t.g.nT=function(t,e,i,n){p(this,t,n)},t.H(g,t.Sy),t.g=g.prototype,t.g.TG=function(){f(this);for(var t=window.Infinity,e=0,s=0;s<this.b.length;s++){var a=n(this.i,[i(this.f,this.b[s])]);a<t&&(t=a,e=s)}return this.b[e]},t.g.iR=function(){g.u.iR.call(this);var t=this.zIndex()+2-n(this.i,[this.D,this.P]);this.line.zIndex(t),this.Xa().zIndex(t),this.yb().zIndex(t)},t.g.ol=function(){return new d},t.g.Jq=function(e){t.p(e)&&(e=Number(e),this.i!=e&&(this.i=e,this.B(16|this.se,9),this.ae()))},t.g.Do=function(e){return t.p(e)?(e=Number(e),this.K!=e&&(this.K=e,this.B(16|this.se,9),this.ae()),this):this.K},t.g.Vt=function(){return!1},t.H(b,g),t.g=b.prototype,t.g.cM=function(){var e=t.wr(this,"title");if(e){var i=this.Bz().rb().clone(),n=this.ja();t.dw(e,"bottom"),i.height=n.Va()-i.top,e.ja(i),e.W()}},t.g.lo=function(){f(this);var t=this.Vt()?this.b[0].slice():this.TG(),e=[-.5==t[0]?.5:-.5,t[1],t[2]];if(-.5==e[0]){var i=e;e=t,t=i}v(this,t,e,this.ja()),this.line.stroke(this.g("stroke"))},t.g.GM=function(t,e,i,n,s,a,o){return i=o?this.labels():this.qb(),s=this.zIndex()+(0>this.i?2:-2),i.zIndex(s),y(this,t,n+e.height/2)},t.g.BE=function(e,i,n){if(n=b.u.BE.call(this,e,i,n)){var s,a=this.Do();return n=0!=Math.floor(2*a/360)%2,a=t.ab(a),45>(a=n^this.scale().Ne()?a-180:a)&&(s=n?i.length-1:0),135<a&&(s=n?0:i.length-1),e!==s}return n},t.g.HM=function(t,e,i,n){return y(this,e,n)},t.g.Vt=function(){return!1},t.H(S,g),t.g=S.prototype,t.g.TG=function(){f(this);for(var t=window.Infinity,e=0,s=0;s<this.b.length;s++){var a=n(this.i,[i(this.f,this.b[s])]);a<t&&(t=a,e=s)}return this.b[e]},t.g.cM=function(){var e=t.wr(this,"title");if(e){var i=this.Bz().rb().clone(),n=this.ja();t.dw(e,"bottom"),i.height=n.Va()-i.top,e.ja(i),e.W()}},t.g.lo=function(){f(this);var t=this.Vt()?this.b[0]:this.TG(),e=[t[0],-.5==t[1]?.5:-.5,t[2]];if(-.5==e[1]){var i=e;e=t,t=i}v(this,t,e,this.ja()),this.line.stroke(this.g("stroke"))},t.g.BE=function(e,i,n){if(n=S.u.BE.call(this,e,i,n)){var s=this.Do();if(n=0!=Math.floor(2*s/360)%2,s=t.ab(s),45<=(s=n^this.scale().Ne()?s-180:s)&&90>=s||90<s&&135>s)var a=n?0:i.length-1;return e!==a}return n},t.g.GM=function(t,e,i,n,s,a,o){return i=o?this.labels():this.qb(),s=this.zIndex()+(0>this.i?2:-2),i.zIndex(s),x(this,t,n+e.height/2)},t.g.HM=function(t,e,i,n){return x(this,e,n)},t.H(w,g),w.prototype.cM=function(){var e=t.wr(this,"title");if(e){var i=this.Bz().rb().clone();t.dw(e,"left"),e.ja(i),e.W()}},w.prototype.lo=function(){f(this);var t=this.Vt()?this.b[0]:m(this);v(this,t,[t[0],t[1],-.5],this.ja()),this.line.stroke(this.g("stroke"))},w.prototype.GM=function(t,e,i,n,s,a,o){return i=o?this.labels():this.qb(),s=this.zIndex()+2,i.zIndex(s),C(this,t,-n-e.width/2)},w.prototype.HM=function(t,e,i,n){return C(this,e,-n)},t.H(T,t.Y),t.g=T.prototype,t.g.W=function(){if(this.ib.g("enabled")){this.Oa.parent(this.O()),this.f.W();var e=t.zp(this.ib.sc(this,"type")),i=this.ib.sc(this,"size");this.Sc.clear(),e(this.Sc,this.b[1],this.b[2],i,i),this.Sc.fill(this.ib.sc(this,"fill")),this.Sc.stroke(this.ib.sc(this,"stroke"))}else this.Oa.parent(null)},t.g.sq=function(e){var i=this.ib;"mousemove"===e.type||"mouseover"===e.type?t.Ow(i.Ua(),e.clientX,e.clientY,I(i,this,L(this))):"mouseout"===e.type&&i.Ua().Lc()},t.g.data=function(t){return t?(this.la=t,this):this.la},t.g.index=function(e){return t.p(e)?(this.Ad=e,this):this.Ad},t.g.R=function(){t.sd(this.Oa,this.Sc,this.f),this.Sc=this.Oa=this.f=null,T.u.R.call(this)},t.H(D,t.Y),D.prototype.Zx=function(){this.Sc.moveTo(this.b.from[1],this.b.from[2]),this.Sc.lineTo(this.b.Je[1],this.b.Je[2])},D.prototype.W=function(){this.ib.g("enabled")?(this.Sc.clear(),this.Sc.parent(this.O()),this.Zx(),this.Sc.stroke(this.ib.Fp(this))):this.Sc.parent(null)},D.prototype.R=function(){t.qd(this.Sc),this.Sc=null,D.u.R.call(this)},t.H(k,t.V),k.prototype.ra=40960;var R={};t.sq(R,[[0,"enabled",t.Dq],[1,"stroke",t.Pq]]),t.U(k,R),k.prototype.Fp=function(){return this.g("stroke")},k.prototype.F=function(){var e={};return t.Tq(this,R,e),e},k.prototype.U=function(e,i){t.Iq(this,R,e,i)},t.H($,t.Y),$.prototype.ra=17;var j={};t.sq(j,[[0,"enabled",t.Dq],[0,"type",t.cr],[0,"size",function(e){return t.D(e)?e:Number(e)}],[1,"fill",t.Nq],[1,"stroke",t.Jq]]),t.U($,j),t.g=$.prototype,t.g.$ga=function(){this.va(1)},t.g.eM=function(e){return this.b||(this.b=new k,t.W(this,"droplines",this.b),t.K(this.b,this.$ga,this)),t.p(e)?(this.b.N(e),this):this.b},t.g.jp=function(t){var e=new T(this,new D(this.eM()));return e.data(t.data),e.index(t.index),e},t.g.W=function(t){this.J(2)&&(this.Oa.parent(this.O()),this.I(2)),this.Oa.Gi();for(var e,i=P(this),n=0;n<i.length;n++)e=i[n],O(this,e,t);for(i.sort((function(t,e){return e.zIndex()-t.zIndex()})),n=0;n<i.length;n++)(e=i[n]).O(this.Oa),e.W()},t.g.$=function(){return this.la.$()},t.g.dd=function(){t.sd(this.Bc),this.Bc.length=0,this.va(16)},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,this.la&&t.kr(this.la,this.dd,this),t.sd(this.la,this.Yc),t.J(e,t.Cr)?this.la=e.Ui():this.la=t.J(e,t.Mr)?e.Yd(this.Zc):(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(this.Zc),t.K(this.la,this.dd,this),this.dd()),this):this.la},t.g.sc=function(e,i){var n=this.$();if(n.select(e.index()),n=n.get(i)||this.g(i),t.D(n)){var s=L(e);return s.sourceColor={type:"",value:this.pa.Fp(e.data()[2])},s=I(this,e,s),n.call(s,s)}return n},t.g.Ua=function(e){return this.gb||(this.gb=new t.ww(0),this.gb.df(),t.W(this,"tooltip",this.gb),this.gb.parent(this.pa.Ua()),this.gb.ya(this.pa)),t.p(e)?(this.gb.N(e),this):this.gb},t.g.F=function(){var e={};t.Tq(this,j,e);var i=this.data();return i&&(e.data=i.F()),this.b&&(e.droplines=this.b.F()),e},t.g.U=function(e,i){t.Iq(this,j,e,i);var n=e.data;n&&this.data(n),(n=e.droplines)&&this.eM(n)},t.g.R=function(){t.sd(this.Bc,this.b,this.Oa),this.Bc.length=0,this.pa=null};var B=$.prototype;B.droplines=B.eM,B.tooltip=B.Ua,t.H(A,t.Bx);var H,z=(H={},t.sq(H,[[0,"rotationZ",t.Bq],[0,"rotationY",function(e){return e=Number(e),t.Za(e,-90,90)}],[1,"box",t.Pq],[1,"stroke",t.Pq]]),H);t.U(A,z),t.g=A.prototype,t.g.ra=t.Bx.prototype.ra,t.g.sa=10580496|t.Bx.prototype.sa,t.g.VY=function(e){return this.Zu||(this.Zu=new w,t.K(this.Zu,this.xo,this),this.Zu.Do(this.g("rotationZ")),this.Zu.Jq(this.g("rotationY")),t.W(this,"zAxis",this.Zu)),t.p(e)?(this.Zu.N(e),this):this.Zu},t.g.$h=function(e){return this.mc||(this.mc=new b,t.K(this.mc,this.xo,this),this.mc.Do(this.g("rotationZ")),this.mc.Jq(this.g("rotationY")),t.W(this,"xAxis",this.mc)),t.p(e)?(this.mc.N(e),this):this.mc},t.g.ij=function(e){return this.hl||(this.hl=new S,t.K(this.hl,this.xo,this),this.hl.Do(this.g("rotationZ")),this.hl.Jq(this.g("rotationY")),t.W(this,"yAxis",this.hl)),t.p(e)?(this.hl.N(e),this):this.hl},t.g.xo=function(){this.B(2097152,1)},t.g.cg=function(){return this.la.$()},t.g.Ec=function(){return this.sd=this.la.$()},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.yj=function(){return!this.la.$().Hb()},t.g.data=function(e,i){if(t.p(e)){if(this.Xf!==e){if(this.Xf=e,this.la&&t.kr(this.la,this.dd,this),t.qd(this.la),t.qd(this.Yc),t.J(e,t.Cr))this.la=e.Ui();else if(t.J(e,t.Mr))this.la=e.Yd();else{var n=null;t.z(e)?n=E(t.Sr(e,i)):t.A(e)&&(n=E(e)),n&&n.iW.length&&(this.Db().enabled(!0),this.Db().data(n.iW)),this.la=(this.Yc=new t.Mr(n?n.s6:n)).Yd()}t.K(this.la,this.dd,this),this.B(4608,1)}return this}return this.la},t.g.dd=function(){this.B(4352,1)},t.g.CT=function(e,i,n){return(0,t.za)(n,e)===i},t.g.pb=function(){if(this.J(4096)){this.B(16384);var e=this.data().$();e.reset();for(var i=[],n=[],s=[];e.advance();){var a=t.N(e.get("x")),o=t.N(e.get("y")),r=t.N(e.get("z"));i.push(a),n.push(o),s.push(r)}i=(0,t.Ye)(i,this.CT),n=(0,t.Ye)(n,this.CT),s=(0,t.Ye)(s,this.CT),this.HY=i,this.nz=n,this.IY=s,3e3<(e=e.Hb())&&t.kl(800,null,[e],!0),(i.length*n.length!=e||4>e)&&0!=e?(t.il(400),this.S4=!0):this.S4=!1,this.I(4096)}n=this.Ra(),e=this.bb(),s=this.$u(),i=!1,n.Of()&&n.Bg(),e.Of()&&e.Bg(),s.Of()&&s.Bg(),a=[],o=[],r=[];var l=t.wr(this,"markers");if(l){l=P(l);for(var h=0;h<l.length;h++){var c=l[h].data();a.push(c[0]),o.push(c[1]),r.push(c[2])}}n.Xc.apply(n,t.Ga(this.HY,a)),e.Xc.apply(e,t.Ga(this.nz,o)),s.Xc.apply(s,t.Ga(this.IY,r)),n.Of()&&(i|=n.Hg()),e.Of()&&(i|=e.Hg()),s.Of()&&(i|=s.Hg()),this.J(16384)&&this.vb&&(n=t.Ga(this.IY,r),this.vb.Of()?(this.vb.Bg(),this.vb.Xc.apply(this.vb,n),this.vb.Hg()):(this.vb.Co(),this.vb.Xc.apply(this.vb,n)),t.J(this.vb,t.iz)&&t.Pt(this.vb.Xa()),this.B(16),this.I(16384)),i&&this.B(65536)},t.g.Ol=function(){this.pb();for(var e=this.$u().Xa().get(),i=[],n=0;n<e.length;n++){var s=this.Fp(e[n]);s={index:0,text:e[n],iconEnabled:!0,iconType:"square",iconStroke:t.Wl(s,1),iconFill:s,disabled:!this.enabled()},i.push(s)}return i},t.g.Ue=function(){return[]},t.g.Ra=function(e){return t.p(e)?((e=t.jt(this.eb,e,null,15))&&(this.eb=e,this.eb.da(!1),this.B(16,1)),t.K(this.eb,this.fE,this),this):(this.eb||(this.eb=t.ft(),t.K(this.eb,this.fE,this)),this.eb)},t.g.bb=function(e){return t.p(e)?((e=t.jt(this.Fc,e,null,15))&&(this.Fc=e,this.Fc.da(!1),this.B(16,1)),t.K(this.Fc,this.fE,this),this):(this.Fc||(this.Fc=t.ft(),t.K(this.Fc,this.fE,this)),this.Fc)},t.g.$u=function(e){return t.p(e)?((e=t.jt(this.sz,e,null,15))&&(this.sz=e,this.sz.da(!1),this.B(16,1)),t.K(this.sz,this.fE,this),this):(this.sz||(this.sz=t.ft(),t.K(this.sz,this.fE,this)),this.sz)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(16400,1);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||this.B(16400,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(16896,1)},t.g.fE=function(){this.B(16,1)},t.g.Fp=function(t){var e=this.kd();return e?e.Qq(t):this.cc().nc(0)},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),this.Mb.ga(!0,this.Mb.oa),this.Mb.Br().Ga("defaultMarkerFactory","surface.colorRange.marker"),this.Mb.Br().ga(!0,this.Mb.Br().oa),this.Mb.kb(this),this.Mb.O(this.Na),t.K(this.Mb,this.Tz,this),this.B(8196,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=8208,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Eq=function(e){e.button==t.Ri&&(this.g4=!0,this.Pka=e.clientX,this.Qka=e.clientY,this.Ska=this.g("rotationY"),this.Tka=this.g("rotationZ"))},t.g.Ih=function(t){"mouseup"==t.type&&(this.g4=!1)},t.g.If=function(t){if(this.g4){this.ka();var e=this.ob();this.rotationY(this.Ska-(this.Qka-t.clientY)/e.height*110),this.rotationZ(this.Tka+(this.Pka-t.clientX)/e.width*110),this.da(!0)}},t.g.Qh=function(n){if(!this.pf()){var s=this.g("rotationZ"),a=this.g("rotationY"),r=[-1,0,0];this.n0=r=i(e(0,a),r),s*=Math.PI/180,a*=Math.PI/180,r=Math.sin(s),s=Math.cos(s);var l=Math.sin(a);a=Math.cos(a),this.Xg=[s*a,-r*a,l,r,s,0,-l*s,r*l,a],a=t.wr(this,"xGrid"),r=t.wr(this,"yGrid"),s=t.wr(this,"zGrid"),l=t.wr(this,"xAxis");var h=t.wr(this,"yAxis"),c=t.wr(this,"zAxis");this.Oa||(this.Oa=this.Na.Bd(),this.Oa.zIndex(36),this.XE=this.Oa.Bd(),this.XE.zIndex(36));var u=t.wr(this,"colorRange");this.pb(),this.J(65536)&&(c&&!c.scale()&&c.scale(this.$u()),l&&!l.scale()&&l.scale(this.Ra()),h&&!h.scale()&&h.scale(this.bb()),a&&a.scale(this.Ra()),r&&r.scale(this.bb()),s&&s.scale(this.$u()),this.I(65536)),this.J(8192)&&u&&(u.ka(),u.scale(this.kd()),u.target(this),u.da(!1),this.B(4)),this.J(4)&&(u?(u.ja(n.clone()),this.lf=u.yd()):this.lf=n.clone(),this.lf.left+=10,this.lf.width-=10,c&&c.ja(this.lf),h&&h.ja(this.lf),l&&l.ja(this.lf),a&&a.ja(this.lf),r&&r.ja(this.lf),s&&s.ja(this.lf),this.B(512),this.I(4)),this.J(8192)&&(u&&(u.ka(),u.O(this.Na),u.W(),u.da(!1)),this.I(8192)),n=this.lf;var d=[[-.5,-.5,.5],[-.5,.5,.5],[.5,.5,.5],[.5,-.5,.5]];if(c=[[-.5,-.5,-.5],[-.5,.5,-.5],[.5,.5,-.5],[.5,-.5,-.5]],0==this.Qz.length)for(h=0;12>h;h++)this.Qz[h]=this.Oa.path();else for(h=0;h<this.Qz.length;h++)this.Qz[h].clear();l=this.g("box");var p=[],g=[];for(h=0;h<d.length;h++)p[h]=i(this.Xg,d[h]),g[h]=i(this.Xg,c[h]);c=(h=F(p)).k4,u=F(g).k4;var f=h.left,m=[];for(h=0;h<p.length;h++){var v=h==p.length-1?0:h+1,b=p[v],y=p[h],S=Math.abs(d[h][0]-d[v][0]),x=Math.abs(d[h][1]-d[v][1]),w=t.wr(this,"xAxis"),C=t.wr(this,"yAxis");v=t.wr(this,"zAxis"),w&&w.enabled()&&w.Vt()&&h==p.length-1||C&&C.enabled()&&C.Vt()&&0==h||w&&w.enabled()&&S>x&&0<=[y,b].indexOf(c)||C&&C.enabled()&&x>S&&0<=[y,b].indexOf(c)||m.push([p[h],b])}for(h=0;h<g.length;h++)b=h==g.length-1?g[0]:g[h+1],m.push([g[h],b]);for(h=0;h<p.length;h++)v&&v.enabled()&&(v.Vt()&&0==h||p[h]==f)||m.push([p[h],g[h]]);for(h=0;h<m.length;h++)v=m[h][0],d=m[h][1],p=Math.min(U(this,[v]),U(this,[d])),v!=c&&d!=c&&v!=u&&d!=u||(p=100),this.lo(this.Qz[h],o(m[h],n),p,l);if(this.J(8388608)&&(a&&(a.O(this.Na),a.W()),r&&(r.O(this.Na),r.W()),s&&(s.O(this.Na),s.W()),this.I(8388608)),this.J(16)){if(v=this.lf,(a=this.data().$()).reset(),r=this.g("stroke"),this.XE.Gi(),!this.S4){for(this.Oa.suspend(),s=0;s<this.HY.length-1;s++)for(n=0;n<this.nz.length-1;n++){for(h=s*(this.nz.length-1)+n,(l=this.Ca[h])?(l.parent(this.XE),l.clear()):(l=this.Ca[h]=this.XE.path()).stroke(null),a.select(s*this.nz.length+n),h=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))],a.select((s+1)*this.nz.length+n),c=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))],a.select((s+1)*this.nz.length+n+1),u=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))],a.select(s*this.nz.length+n+1),d=[h,c,u,m=[t.N(a.get("x")),t.N(a.get("y")),t.N(a.get("z"))]],p=(g=this.$u()).uh(),g=g.di(),f=(b=this.bb()).uh(),b=b.di(),y=(S=this.Ra()).uh(),S=S.di(),x=0,w=[],C=0;C<d.length;C++){var T=d[C];T[2]>=p&&T[2]<=g&&T[1]<=b&&T[1]>=f&&T[0]>=y&&T[0]<=S||(x++,(T[2]<p||T[2]>g)&&(T[2]=Math.max(Math.min(T[2],g),p)),(T[1]<b||T[1]>f)&&(T[1]=Math.max(Math.min(T[1],b),f)),(T[0]>y||T[0]<S)&&(T[0]=Math.max(Math.min(T[0],S),y))),w.push(T)}(d=x==d.length?null:w)&&(p=i(this.Xg,G(this,d[0])),g=i(this.Xg,G(this,d[1])),f=i(this.Xg,G(this,d[2])),b=i(this.Xg,G(this,d[3])),d=36+U(this,[p,g,f,b]),p=o([p,g,f,b],v),h=this.Fp((h[2]+c[2]+u[2]+m[2])/4),this.lo(l,p,d,r),l.close(),l.fill(h||"white"))}this.Oa.resume()}(v=t.wr(this,"markers"))&&(v.O(this.Oa),v.W(this.lf)),this.I(16)}this.J(2097152)&&(this.WL(),this.I(2097152))}},t.g.WL=function(){var e=t.wr(this,"xAxis"),i=t.wr(this,"yAxis"),n=t.wr(this,"zAxis");e&&e.O(this.Na).W(),i&&i.O(this.Na).W(),n&&n.O(this.Na).W()},t.g.lo=function(t,e,i,n){t.clear(),t.moveTo(e[0][1],e[0][2]);for(var s=1;s<e.length;s++)t.lineTo(e[s][1],e[s][2]);t.zIndex(i),t.stroke(n)},t.g.lm=function(e){return this.rt||(this.rt=new r,this.rt.Xj=this,t.K(this.rt,this.Qy,this),this.rt.Do(this.g("rotationZ")),this.rt.Jq(this.g("rotationY")),t.W(this,"xGrid",this.rt),this.B(8388608,1)),t.p(e)?(this.rt.N(e),this):this.rt},t.g.nm=function(e){return this.Rr||(this.Rr=new r,this.Rr.Xj=this,t.K(this.Rr,this.Qy,this),this.Rr.Do(this.g("rotationZ")),this.Rr.Jq(this.g("rotationY")),t.mz(this.Rr,"vertical"),t.W(this,"yGrid",this.Rr),this.B(8388608,1)),t.p(e)?(this.Rr.N(e),this):this.Rr},t.g.aK=function(e){return this.Vq||(this.Vq=new r,this.Vq.Xj=this,t.K(this.Vq,this.Qy,this),this.Vq.Do(this.g("rotationZ")),this.Vq.Jq(this.g("rotationY")),t.mz(this.Vq,"horizontal"),h(this.Vq,!0),t.W(this,"zGrid",this.Vq),this.B(8388608,1)),t.p(e)?(this.Vq.N(e),this):this.Vq},t.g.Qy=function(){this.B(8388624,1)},t.g.Mn=function(e){var i=8388624;t.X(e,16)&&(i|=65536),this.lm().B(this.lm().sa),this.nm().B(this.nm().sa),this.aK().B(this.aK().sa),this.B(i,1)},t.g.Db=function(e){return this.Bc||(this.Bc=new $(this),t.W(this,"markers",this.Bc),t.K(this.Bc,this.Mn,this)),t.p(e)?(this.Bc.N(e),this):this.Bc},t.g.xc=function(){return this},t.g.ce=function(){return null},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(16,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(16,1)},t.g.Ma=function(){return"surface"},t.g.F=function(){var e=A.u.F.call(this);this.la&&(e.data=this.data().F());var i=[];return this.eb&&(e.xScale=this.Ra().F(),i.push(t.oa(this.Ra()))),this.Fc&&(e.yScale=this.bb().F(),i.push(t.oa(this.bb()))),this.sz&&(e.zScale=this.$u().F(),i.push(t.oa(this.$u()))),this.mc&&(e.xAxis=this.$h().F(),M(i,this.$h(),"xAxis",e)),this.hl&&(e.yAxis=this.ij().F(),M(i,this.ij(),"yAxis",e)),this.Zu&&(e.zAxis=this.VY().F(),M(i,this.VY(),"zAxis",e)),this.rt&&(e.xGrid=this.lm().F(),M(i,this.lm(),"xGrid",e)),this.Rr&&(e.yGrid=this.nm().F(),M(i,this.nm(),"yGrid",e)),this.Vq&&(e.zGrid=this.aK().F(),M(i,this.aK(),"zGrid",e)),e.colorScale=this.vb?this.kd().F():null,this.Mb&&(e.colorRange=this.Qi().F()),(i=t.wr(this,"markers"))&&(e.markers=i.F()),t.Tq(this,z,e),{chart:e}},t.g.U=function(e,i){A.u.U.call(this,e,i),"data"in e&&this.data(e.data),_(this,e,"xScale"),_(this,e,"yScale"),_(this,e,"zScale"),_(this,e,"xAxis"),_(this,e,"yAxis"),_(this,e,"zAxis"),_(this,e,"xGrid"),_(this,e,"yGrid"),_(this,e,"zGrid"),"colorScale"in e&&this.kd(e.colorScale),"colorRange"in e&&this.Qi(e.colorRange),"markers"in e&&this.Db(e.markers),t.Iq(this,z,e,i)},t.g.R=function(){t.sd(this.Bc,this.mc,this.hl,this.Zu,this.Ca,this.rt,this.Rr,this.Vq,this.Qz,this.XE,this.Oa,this.Mb,this.Fa,this.la,this.Yc),this.Qz.length=0,this.Ca.length=0,this.Vq=this.Rr=this.rt=this.Zu=this.hl=this.mc=this.Yc=this.la=this.Fa=this.Mb=this.Oa=this.XE=null,A.u.R.call(this)},t.g.ts=function(){var t=[];return this.data().Hb()&&t.push(this),this.Bc&&this.Bc.data()&&this.Bc.data().Hb()&&t.push(this.Bc),t},t.g.nD=function(t,e,i){return t=[],i.push(t),t},t.g.M4=function(t,e,i,n){for(var s=0;s<i.length;s++)t.push(this.$W(i[s],e[n],n+1,i.length))},t.g.$W=function(e,i){return t.J(i,A)?e:"marker "+e},t.g.qA=function(){return["x","y","z"]};var V=A.prototype;V.colorScale=V.kd,V.colorRange=V.Qi,V.xGrid=V.lm,V.yGrid=V.nm,V.zGrid=V.aK,V.xAxis=V.$h,V.yAxis=V.ij,V.zAxis=V.VY,V.xScale=V.Ra,V.yScale=V.bb,V.zScale=V.$u,V.getType=V.Ma,V.palette=V.cc,V.markers=V.Db,t.Tp.surface=N,t.E("anychart.surface",N)}.call(this,$)),_.theme_pareto||(_.theme_pareto=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{pareto:{defaultSeriesType:"column",tooltip:{displayMode:"union"},interactivity:{hoverMode:"by-x"},yAxes:[{orientation:"left"},{orientation:"right",labels:{format:"{%Value}%"}}]}})}.call(this,$)),_.theme_annotations||(_.theme_annotations=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme.chart,{defaultAnnotationSettings:{base:{enabled:!0,normal:{fill:t.CN,stroke:t.zN,hatchFill:null,markers:{enabled:!1,size:5,type:"square",fill:"#ffff66",stroke:"#333333"},labels:{enabled:!0,position:"center-top",anchor:"center-top",format:function(){return this.level}}},hovered:{fill:t.AN,stroke:t.EN,markers:{enabled:null},labels:{enabled:null}},selected:{fill:t.AN,stroke:t.EN,markers:{enabled:!0},labels:{enabled:null}},color:"#e06666",allowEdit:!0,hoverGap:5},ray:{},line:{},infiniteLine:{},verticalLine:{},horizontalLine:{},rectangle:{},ellipse:{},triangle:{},trendChannel:{},finiteTrendChannel:{channelWidth:0},andrewsPitchfork:{},fibonacciFan:{levels:[0,.382,.5,.618,1],timeLevels:[0,.382,.5,.618,1],labels:{anchor:null}},fibonacciArc:{levels:[.236,.382,.5,.618,.764,1],labels:{anchor:null}},fibonacciRetracement:{levels:[0,.236,.382,.5,.618,.764,1,1.236,1.382,1.5,1.618,1.764,2.618,4.236],normal:{labels:{position:"left-center",anchor:"right-center"}}},fibonacciTimezones:{levels:[0,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169],labels:{anchor:"left-bottom"}},marker:{markerType:"arrow-up",normal:{size:20},anchor:"center-top",offsetX:0,offsetY:0},label:{text:"Label",offsetX:0,offsetY:0,anchor:"left-top",hAlign:"start",vAlign:"top",width:null,height:null,background:{enabled:!0,fill:"#eee 0.4",stroke:t.Ql("#eee")},padding:5,normal:{markers:{size:3}}},horizontalRange:{},verticalRange:{}}})}.call(this,$)),_.radar_part||(_.radar_part=1,function(t){var e=function(){this.ka(),t.Y.call(this),this.Ga(t.ur.axis),this.ci=[],this.Pc=t.qk(),t.ru(this,this.Pc),this.sf=404,this.da(!1),t.T(this.ua,[["stroke",this.sf,9],["startAngle",this.sf,9]])},i=function(e){if(!e.$b||e.J(4)){var i=e.ja();if(i){e.Oc=Math.round(Math.min(i.width,i.height)/2),e.tc=Math.round(i.left+i.width/2),e.vc=Math.round(i.top+i.height/2);var n=e.scale(),s=e.labels(),a=e.Xa();if(n){var o=0;if(e.enabled()){var r,l=n.Xa().get(),h=l.length,c=t.ab(e.g("startAngle")-90),u=o=window.NaN,d=window.NaN,p=window.NaN,g=window.NaN,f=window.NaN,m=window.NaN,v=window.NaN,b=window.NaN,y=window.NaN,S=window.NaN,x=window.NaN;for(e.pj(),e.rC=window.NaN,r=0;r<h;r++){var w=l[r];w=n.transform(w);var C=(w=t.ab(c+360*w))*Math.PI/180,T=s.g("position");T=t.Ho(T);var D=t.Io(a);if(s.enabled()&&0<=T){var k=e.rd(r);T=k.tb();var $=k.Vb(),O=k.cb();if(k=k.Va(),a.enabled()&&D){var P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1;a.enabled()&&a.g("length"),D=e.Oc+D+P/2,P=Math.round(e.tc+D*Math.cos(C)),C=Math.round(e.vc+D*Math.sin(C)),T=Math.min(T,P),O=Math.max(O,P),$=Math.min($,C),k=Math.max(k,C)}}else a.enabled()&&D?(P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1,a.enabled()&&a.g("length"),D=e.Oc+D+P/2):(P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1,D=e.Oc+P/2),T=O=Math.round(e.tc+D*Math.cos(C)),$=k=Math.round(e.vc+D*Math.sin(C));((0,window.isNaN)(o)||T<o)&&(o=T,g=r,b=w),((0,window.isNaN)(u)||$<u)&&(u=$,f=r,y=w),((0,window.isNaN)(d)||O>d)&&(d=O,m=r,S=w),((0,window.isNaN)(p)||k>p)&&(p=k,v=r,x=w)}if(r=a=s=n=0,o=Math.round(o),u=Math.round(u),d=Math.round(d),p=Math.round(p),o<i.tb()&&(b=180>b?Math.sin((b-90)*Math.PI/180):Math.cos((b-180)*Math.PI/180),n=Math.round((i.tb()-o)/b)),u<i.Vb()&&(b=270>y?Math.sin((y-180)*Math.PI/180):Math.cos((y-270)*Math.PI/180),s=Math.round((i.Vb()-u)/b)),d>i.cb()&&(b=360>S?Math.sin((S-270)*Math.PI/180):Math.cos(S*Math.PI/180),a=Math.round((d-i.cb())/b)),p>i.Va()&&(b=90>x?Math.sin(x*Math.PI/180):Math.cos((x-90)*Math.PI/180),r=Math.round((p-i.Va())/b)),0<(o=Math.max(n,s,a,r))){if(e.Oc-=o,0>e.Oc){if(u=e.Oc=0,e.labels().enabled()){if(u=window.NaN,o==n){u=g;var L=!0}else o==s?(u=f,L=!1):o==a?(u=m,L=!0):o==r&&(u=v,L=!1);g=e.rd(u),u=L?g.width:g.height}P=e.Pc.stroke().thickness?e.Pc.stroke().thickness:1,e.rC=Math.min(i.width,i.height)/2-u-P}e.pj()}}L=2*(i=e.Oc+o),e.$b=new t.tu(e.tc-i,e.vc-i,L,L)}else e.$b=new t.tu(e.tc-e.Oc,e.vc-e.Oc,2*e.Oc,2*e.Oc)}else e.$b=new t.tu(0,0,0,0);e.I(4)}},n=function(t,e){var i=e.width,n=e.height,s={x:0,y:0};return t?0<t&&90>t?(s.x+=i/2,s.y+=n/2):90==t?s.y+=n/2:90<t&&180>t?(s.y+=n/2,s.x-=i/2):180==t?s.x-=i/2:180<t&&270>t?(s.y-=n/2,s.x-=i/2):270==t?s.y-=n/2:270<t&&(s.y-=n/2,s.x+=i/2):s.x+=i/2,s},s=function(t,e){var i=t.Xa().g("stroke"),n=0,s=0;return i=0==(i.thickness?(0,window.parseFloat)(i.thickness):1)%2?0:.5,e?90==e?n=-i:180==e?s=i:270==e&&(n=i):s=-i,[n,s]},a=function(){e.call(this)},o=function(){t.i4.call(this)},r=function(e,i){var n=e.Ra().Xa().get(),s=n.length;if(0!=s){for(var a,o,r=e.i+(e.Oc-e.i)*i,l=e.g("startAngle")-90,h=0;h<s;h++)a=e.Ra().transform(n[h]),a=t.ab(l+360*a),o=t.bb(a),a=Math.round(e.tc+r*Math.cos(o)),o=Math.round(e.vc+r*Math.sin(o)),h?e.o.lineTo(a,o):e.o.moveTo(a,o);a=t.ab(l),o=t.bb(a),a=Math.round(e.tc+r*Math.cos(o)),o=Math.round(e.vc+r*Math.sin(o)),e.o.lineTo(a,o)}},l=function(e,i,n,s){if(!(0,window.isNaN)(n)){var a=e.Ra().Xa().get(),o=a.length;if(0!=o){var r=e.g("startAngle")-90,l=e.i+(e.Oc-e.i)*i;for(i=0;i<o;i++){var h=e.Ra().transform(a[i]);h=t.ab(r+360*h);var c=t.bb(h);h=Math.round(e.tc+l*Math.cos(c));var u=Math.round(e.vc+l*Math.sin(c));i?s.lineTo(h,u):s.moveTo(h,u)}for(h=t.ab(r),c=t.bb(h),h=Math.round(e.tc+l*Math.cos(c)),u=Math.round(e.vc+l*Math.sin(c)),s.lineTo(h,u),l=e.i+(e.Oc-e.i)*n,h=Math.round(e.tc+l*Math.cos(c)),u=Math.round(e.vc+l*Math.sin(c)),s.lineTo(h,u),i=o-1;0<=i;i--)h=e.Ra().transform(a[i]),h=t.ab(r+360*h),c=t.bb(h),h=Math.round(e.tc+l*Math.cos(c)),u=Math.round(e.vc+l*Math.sin(c)),s.lineTo(h,u);s.close()}}},h=function(){t.i4.call(this)},c=function(){t.g4.call(this,!0),this.Ga("radar")},u=function(e){var i=new c;return i.$c(),t.h4(i),arguments.length&&i.kl.apply(i,arguments),i},d={bC:"area",tt:"line",av:"marker"};t.H(e,t.Y);var p={};t.sq(p,[t.Z.Yn,t.Z.zz]),t.U(e,p),t.g=e.prototype,t.g.sa=400|t.Y.prototype.sa,t.g.ra=t.Y.prototype.ra,t.g.Pc=null,t.g.Er="axis",t.g.Da=null,t.g.mb=null,t.g.qa=null,t.g.$b=null,t.g.Oc=window.NaN,t.g.rC=window.NaN,t.g.tc=window.NaN,t.g.vc=window.NaN,t.g.ci=null,t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,t.W(this,"labels",this.Da),this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=128,n=1),this.pj(),this.B(i,n)},t.g.Xa=function(e){return this.mb||(this.mb=new t.c4,t.W(this,"ticks",this.mb),this.mb.kb(this),t.K(this.mb,this.li,this)),t.p(e)?(this.mb.N(e),this):this.mb},t.g.li=function(e){var i=0,n=0;t.X(e,8)?(i=this.sf,n=9):t.X(e,1)&&(i=276,n=1),this.B(i,n)},t.g.FK=function(e,i){if(t.p(e)){var n=t.jt(this.qa,e,null,15,null,this.ii,this);if(n){var s=this.qa==n;this.qa=n,this.qa.sN=!!i,this.qa.da(s),s||(this.pj(),this.B(this.sf,9))}return this}return this.qa},t.g.scale=function(t){return this.FK(t)},t.g.ii=function(e){t.X(e,2)&&(this.pj(),this.B(this.sf,9))},t.g.uo=function(){this.B(this.sf,9)},t.g.pj=function(){this.o&&(this.o.length=0),this.ci.length=0,this.ik=null},t.g.yd=function(){var e=this.ja();return e?this.enabled()?(i(this),e=this.Pc.stroke().thickness?this.Pc.stroke().thickness:1,e=Math.floor(e/2),new t.I(this.tc-this.Oc+e,this.vc-this.Oc+e,2*(this.Oc-e),2*(this.Oc-e))):e:new t.I(0,0,0,0)},t.g.zba=function(e,i,n){var a=this.Xa(),o=a.g("position");o=t.Ho(o);var r=t.bb(e),l=Math.sin(r);r=Math.cos(r);var h=s(this,e);e=h[0],h=h[1];var c=this.Oc+(o?0:-n/2),u=Math.round(this.tc+c*r)+e,d=Math.round(this.vc+c*l)+h;c=this.Oc+(o?o*(n+i):n/2),a.hq(u,d,Math.round(this.tc+c*r)+e,Math.round(this.vc+c*l)+h)},t.g.Zx=function(e,i){var n=t.bb(i),s=Math.round(this.tc+this.Oc*Math.cos(n));n=Math.round(this.vc+this.Oc*Math.sin(n)),e?this.Pc.lineTo(s,n):this.Pc.moveTo(s,n)},t.g.ke=function(e,i,a){var o=this.labels(),r=o.g("position");r=t.Ho(r);var l=this.Xa(),h=t.Io(l,r),c=n(i,this.rd(e));l=c.x*r,c=c.y*r;var u=t.bb(i);i=s(this,i),r=this.Oc+h+r*a,a=Math.round(this.tc+r*Math.cos(u))+i[0]+l,i=Math.round(this.vc+r*Math.sin(u))+i[1]+c,r=this.scale().Xa().get(),r=this.Am(e,r[e]),o.add(r,{value:{x:a,y:i}},e)},t.g.Iy=function(){return!1},t.g.zc=function(){return!this.pf()&&(this.enabled()?(this.I(1),!0):(this.J(1)&&(this.remove(),this.I(1),this.Xa().B(2),this.labels().B(2),this.B(386)),!1))},t.g.W=function(){var e=this.scale();if(!e)return t.il(2),this;if(!this.zc())return this;var n=this.Xa(),s=this.labels();if(s.ka(),n.ka(),this.J(16)){this.Pc.clear(),this.Pc.stroke(this.g("stroke"));var a=this.Zx;this.I(16)}if(this.J(8)){var o=this.zIndex();this.Pc.zIndex(o),n.zIndex(o),s.zIndex(o),this.I(8)}if(this.J(2)&&(o=this.O(),this.Pc.parent(o),n.O(o),s.O(o),this.I(2)),this.J(256)){n.W();var r=this.zba;this.I(256)}if(this.J(128)){s.O()||s.O(this.O()),s.ja(this.ja()),s.clear();var l=this.ke;this.I(128)}if(t.p(r)||t.p(a)||t.p(l)){i(this);var h=(o=e.Xa().get()).length,c=t.ab(this.g("startAngle")-90),u=n.enabled()?(0,window.isNaN)(this.rC)?n.g("length"):this.rC:0,d=this.Pc.stroke().thickness?this.Pc.stroke().thickness:1,p=Math.floor(d/2);for(d=0;d<h;d++){var g=o[d];g=e.transform(g),g=t.ab(c+360*g),a&&a.call(this,d,g),r&&r.call(this,g,p,u),l&&l.call(this,d,g,p,u)}0!=d&&this.Pc.close(),s.W()}return s.da(!1),n.da(!1),this},t.g.remove=function(){this.Pc&&this.Pc.parent(null),this.Xa().remove(),this.Da&&this.Da.remove()},t.g.rd=function(e){var i=this.ci;if(t.p(i[e]))return i[e];var s=this.Pc.stroke().thickness?this.Pc.stroke().thickness:1,a=this.Xa(),o=this.labels(),r=this.scale(),l=r.Xa().get()[e],h=r.transform(l);r=o.g("position"),r=t.Ho(r);var c=t.Io(a,r),u=(h=t.ab(this.g("startAngle")-90+360*h))*Math.PI/180;return a=a.enabled()?(0,window.isNaN)(this.rC)?c:this.rC:0,a=this.Oc+a+s/2,s=Math.round(this.tc+a*Math.cos(u)),a=Math.round(this.vc+a*Math.sin(u)),l=this.Am(e,l),o=o.measure(l,{value:{x:s,y:a}},void 0,e),h=(l=n(h,o)).y*r,o.left+=l.x*r,o.top+=h,i[e]=o},t.g.Am=function(e,i){var n=this.scale(),s=!0;if(t.J(n,t.Qt)){var a=n.Xa().names()[e],o=i;s=!1}else t.J(n,t.nt)?(a=t.vs(i),o=i):(a=(0,window.parseFloat)(i),o=(0,window.parseFloat)(i));return a={axis:{value:this,type:""},index:{value:e,type:"number"},value:{value:a,type:"number"},tickValue:{value:o,type:"number"},scale:{value:n,type:""}},s&&(a.min={value:t.p(n.min)?n.min:null,type:"number"},a.max={value:t.p(n.max)?n.max:null,type:"number"}),(n=new t.Fw(a)).Im({"%AxisScaleMax":"max","%AxisScaleMin":"min"}),t.ov(n)},t.g.p_=function(){this.Da&&t.Yu(this.Da)},t.g.F=function(){var i=e.u.F.call(this);return t.Tq(this,p,i),i.labels=this.labels().F(),i.ticks=this.Xa().F(),i},t.g.U=function(i,n){e.u.U.call(this,i,n),t.Iq(this,p,i,n),this.labels().ga(!!n,i.labels),this.Xa(i.ticks)},t.g.R=function(){delete this.qa,this.ci.length=0,t.sd(this.Pc,this.mb,this.Da,this.$b),this.Da=this.$b=this.mb=this.Pc=null,e.u.R.call(this)},t.H(a,e),t.xu(a,e);var g=e.prototype;g.labels=g.labels,g.ticks=g.Xa,g.scale=g.scale,g.getRemainingBounds=g.yd,g=a.prototype,t.E("anychart.standalones.axes.radar",(function(){var t=new a;return t.Ga("standalones.radarAxis"),t})),g.draw=g.W,g.parentBounds=g.ja,g.container=g.O,t.H(o,t.i4),o.prototype.Lj=function(){var e=this.Ra(),i=this.bb();this.Sz(),this.Uh().clear();var n=this.ja();this.Oc=Math.min(n.width,n.height)/2,this.i=t.L(this.g("innerRadius"),this.Oc),this.i==this.Oc&&this.i--,this.tc=Math.round(n.left+n.width/2),this.vc=Math.round(n.top+n.height/2),this.Uh().clip(n);var s,a=this.g("startAngle")-90;if(this.vN()){var o,h=(n=(n=e.Xa()).get()).length,c=window.NaN,u=window.NaN,d=this.g("stroke"),p=d.thickness?d.thickness:1;for(s=0;s<h;s++){var g=e.transform(n[s]),f=(i=t.ab(a+360*g))*Math.PI/180,m=o=0;if(i?90==i?o=0==p%2?0:-.5:180==i?m=0==p%2?0:.5:270==i&&(o=0==p%2?0:.5):m=0==p%2?0:-.5,i=Math.round(this.tc+this.Oc*Math.cos(f)),g=Math.round(this.vc+this.Oc*Math.sin(f)),this.i){var v=Math.round(this.tc+this.i*Math.cos(f));f=Math.round(this.vc+this.i*Math.sin(f))}else v=this.tc,f=this.vc;if(s){d=t.oz(this,s-1);var b=v,y=f;(0,window.isNaN)(c)&&(0,window.isNaN)(u)||(d.moveTo(i,g),d.lineTo(b,y),d.lineTo(c,u),d.close())}(s||this.g("drawLastLine"))&&(d=v,u=f,this.o.moveTo(i+o,g+m),this.o.lineTo(d,u)),c=i,u=g}d=t.oz(this,s-1),f=(i=t.ab(a))*Math.PI/180,i=Math.round(this.tc+this.Oc*Math.cos(f)),g=Math.round(this.vc+this.Oc*Math.sin(f)),this.i?(v=Math.round(this.tc+this.i*Math.cos(f)),f=Math.round(this.vc+this.i*Math.sin(f))):(v=this.tc,f=this.vc),n=v,h=f,s=c,e=u,(0,window.isNaN)(s)&&(0,window.isNaN)(e)||(d.moveTo(i,g),d.lineTo(n,h),d.lineTo(s,e),d.close())}else for(h=(n=(n=(e=t.J(i,t.Qt))?i.Xa():this.g("isMinor")?i.yb():i.Xa()).get()).length,a=window.NaN,s=0;s<h;s++)u=n[s],t.A(u)?(g=u[0],u=u[1]):g=u,g=i.transform(g),s&&(d=t.oz(this,s-1)),s==h-1?e?(l(this,g,a,d),d=t.oz(this,s),l(this,i.transform(u,1),g,d),r(this,g),this.g("drawLastLine")&&r(this,i.transform(u,1))):(l(this,g,a,d),this.g("drawLastLine")&&r(this,g)):(l(this,g,a,d),(s||this.i)&&r(this,g)),a=g},t.H(h,o),t.xu(h,o);var f=h.prototype;t.E("anychart.standalones.grids.radar",(function(){var t=new h;return t.Ga("standalones.radarGrid"),t})),f.layout=f.we,f.draw=f.W,f.parentBounds=f.ja,f.container=f.O,t.H(c,t.g4);var m={},v=5767168|t.QG;m.area={Fb:1,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH,t.nH,t.IH,t.DH,t.vH,t.qH,t.JH,t.EH,t.KH],Ob:null,Jb:null,Cb:v,Ab:"value",zb:"zero"},m.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:v,Ab:"value",zb:"value"},m.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:1572864|t.QG,Ab:"value",zb:"value"},c.prototype.fj=m,t.Nz(c,c.prototype.fj),t.g=c.prototype,t.g.Ma=function(){return"radar"},t.g.Ss=function(e){return t.zk(d,e,"line")},t.g.IF=function(){return new o},t.g.R0=function(){return new e},t.g.CA=function(){return t.bt},t.g.xD=function(){return["Radar chart X scale","ordinal"]},t.g.tH=function(){return"linear"},t.g.sH=function(){return 15},t.g.SM=function(){return["Chart scale","ordinal, linear, log, date-time"]},t.g.Gt=function(e,i){var n=new t.j4(this,this,e,i,!0);return n.ta("closed",!0),n};var b=c.prototype;b.getType=b.Ma,t.Tp.radar=u,t.E("anychart.radar",u)}.call(this,$)),_.resource||(_.resource=1,function(t){var e=function(t,e){return(0,window.isNaN)(t)?(0,window.isNaN)(e)?0:1:(0,window.isNaN)(e)?-1:e-t},i=function(e){t.V.call(this),this.pa=e,this.i=this.f=this.o=this.b=null,e={},t.T(e,[["fill",16,1],["stroke",16,1],["hatchFill",16,1],["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),e={},t.T(e,[["fill",0,0],["stroke",0,0],["hatchFill",0,0],["labels",0,0]]),this.za=new t.my(this,e,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.Ea=new t.my(this,e,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),t.T(this.ua,[["color",16,1]])},n=function(e,i){if(!e)return a;var n=i+"|"+e+"|true",o=K[n];if(!o){switch(i){case 2:o=t.Zl;break;case 3:o=t.$l;break;default:o=t.am}K[n]=o=t.qa(s,e,o,3==i,!0)}return o},s=function(e,i,n,s,a,o,r,l){if((l=t.em(l))!=t.gm&&s){var h=a.sc(e,l,o,i);if(n&&!0===h&&(h=W),t.p(h)){if(!t.D(h))return h;if(n)return n=a.Yi(r,o),i(h.call(n,n))}}return e=a.sc(e,0,o,i),n&&!0===e&&(e=W),t.D(e)&&(n=n?a.Yi(r,o):a.Ge(r,o),e=i(e.call(n,n))),h&&(n=a.Ge(r,o,e),e=i(h.call(n,n))),e},a=function(){return"none"},o=function(e){this.D=!0,this.f=this.o=this.b=this.i=this.K=null;var i=e.isWorking;switch(this.D=!t.p(i)||i,i=t.zk(V,e.each,"none")){case"year":var n=e.on,s=e.from,a=e.to;this.P=this.sda,(n=t.ps(n,J,Z))?(this.G=this.mW,this.b=new t.On(2e3,n.getUTCMonth(),n.getUTCDate()),a=l(s,a),this.o=a[0],this.f=a[1]):(this.G=this.m5,this.b=null,n=(n=t.ps(s,J,Z))?new t.On(n):Q,this.o=new t.On(2e3,n.getUTCMonth(),n.getUTCDate()),n=(n=t.ps(a,J,Z))?new t.On(n):tt,this.f=new t.On(2e3,n.getUTCMonth(),n.getUTCDate()),this.f.add(et));break;case"week":r(this,e.on,e.from,e.to);break;case"day":r(this,window.NaN,e.from,e.to);break;default:n=e.on,s=e.from,a=e.to,this.P=this.OY,(n=t.ps(n))?(this.G=this.mW,this.b=new t.On(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),a=l(s,a),this.o=a[0],this.f=a[1]):(this.G=this.m5,this.b=null,n=(n=t.ps(s))?new t.On(n):Q,this.o=new t.On(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),n=(n=t.ps(a))?new t.On(n):tt,this.f=new t.On(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()),this.f.add(et))}"none"==i?this.b?(this.K=this.b.clone(),this.i=this.b.clone(),this.i.add(et)):(this.K=this.o.clone(),this.i=this.f.clone()):(this.K=(i=t.ps(e.starts))?new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()):Q,(i=t.ps(e.ends))?(this.i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),this.i.add(et)):this.i=tt)},r=function(e,i,n,s){e.P=e.tda,e.G=e.mW,i=Math.min(t.P(i,window.NaN,!0),6),e.b=(0,window.isNaN)(i)?null:i,i=l(n,s),e.o=i[0],e.f=i[1]},l=function(e,i){if(t.z(e))var n=e.split(":",2),s=[Math.min(t.P(n[0],0,!0),23),2==n.length?Math.min(t.P(n[1],0,!0),59):0];else s=t.ea(e)?[Math.max(0,Math.min(23,Math.floor(e))),0]:null;if(t.z(i)){n=i.split(":",2);var a=[Math.min(t.P(n[0],23,!0),23),2==n.length?Math.min(t.P(n[1],0,!0),59):0]}else a=t.ea(i)&&!(0,window.isNaN)(i)?[Math.max(0,Math.min(23,Math.floor(i))),0]:null;return s&&a?[s,a]:[[0,0],[23,59]]},h=function(e){t.V.call(this),this.f=[],this.i=[],this.Y=e||null,this.o=0,this.D={},this.b=null,this.P=!0,this.Y?t.K(this.Y,this.H2,this):(e=t.Qo(t.Ro()),this.b=t.Ha(e.weekendRange))},c=function(e,i,n){for(i=new Date(i),i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate());i.getTime()<n;){if(g(e,i).length)return!0;i.add(et)}return!1},u=function(e,i,n,s,a){if((0,window.isNaN)(i)||(0,window.isNaN)(n))return[];i=new Date(i);for(var o=(i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate())).getTime(),r=[];o<n;){i.add(s);var l=i.getTime(),h=e,c=l,u=new Date(o);u=new t.On(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate());for(var d=[];u.getTime()<c;){for(var p=g(h,u),f=0;f<p.length;f++){var m=p[f];d.push([m[0]-6e4*h.o,m[1]-6e4*h.o])}u.add(et)}h=d,a&&!h.length||r.push({start:o,end:l,workingTime:h}),o=l}return r},d=function(e,i,n){if(i=new Date(i),i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),!e.K){var s=Q.getTime();if(!e.b||0==e.b[0]&&6==e.b[1])for(var a=0;a<e.f.length;a++){var o=e.f[a];o.HA||(s=Math.max(s,o.i.getTime()))}else s=tt.getTime();e.K=s}for(s=5e3,a=i.getTime();a<=e.K&&--s;){if(i.add(n),o=i.getTime(),c(e,a,o))return a;a=o}return s&&e.Y?d(e.Y,i.getTime(),n):window.NaN},p=function(e,i,n){if(i=new Date(i),i=new t.On(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),!e.G){var s=tt.getTime();if(!e.b||0==e.b[0]&&6==e.b[1])for(var a=0;a<e.f.length;a++){var o=e.f[a];o.HA||(s=Math.min(s,o.K.getTime()))}else s=Q.getTime();e.G=s}for(s=5e3,a=i.getTime();a>=e.G&&--s;){if(i.add(n),o=i.getTime(),c(e,o,a))return o;a=o}return s&&e.Y?p(e.Y,i.getTime(),n):window.NaN},g=function(e,i){var n=t.Mn.prototype.NJ.call(i),s=e.D[n];if(t.p(s))return s;s=null;for(var a=0;a<e.f.length;a++){var o=e.f[a],r=i;s=o.P(r)?o.G(s||[],r):s}return!s&&e.b&&(s=[],((a=(i.UM()+6)%7)<e.b[0]||a>e.b[1])&&s.push([i.getTime(),i.getTime()+864e5-6e4])),!s&&e.Y&&(s=g(e.Y,i)),s||(s=[]),e.D[n]=s},f=function(t){t.D={},t.K=null,t.G=null},m=function(e){t.Y.call(this),this.pa=e,this.f=new t.dC((function(){return t.mk()})),this.o=new t.dC((function(){return t.mk()})),this.D=t.ok(),this.gg=t.tk(),this.Oa=t.ok(),this.f.parent(this.Oa),this.o.parent(this.Oa),this.D.parent(this.Oa),this.Oa.clip(this.gg),this.G=[],this.i=null,t.T(this.ua,[["fill",16,1],["stroke",16,1],["hatchFill",16,1],["height",0,2]])},v=function(e,i,n,s,a){if(n&&n.lC>n.mz){var o=e.Ic(i,n,s),r=t.Wu(e.Da,e.Da.g("format"),o,++e.P);if(e.b){if(e.b.text==r)return;b(e,i)}e.b={index:e.P,text:r,start:i,FO:o,lta:n,Jta:s,top:a}}else b(e,i)},b=function(t,e){t.b&&(t.b.end=e,t.G.push(t.b),t.b=null)},y=function(e,i){var n=i.start,s=i.end,a=e.g("stroke"),o=e.pa.Ra(),r=t.$b(a),l=t.$b(e.pa.r_().g("verticalStroke")),h=l/2+r/2;n=t.Za(t.R(o.un(n)+e.K.left,l)+h,e.K.left,e.K.cb()),s=t.Za(t.R(o.un(s)+e.K.left,l)-h,e.K.left,e.K.cb()),o=t.R(i.top+r/2,r),l=t.R(i.top+e.g("height")-r/2,r),(h=t.eC(e.f)).Ho(n).Io(o).Go(s-n).Fo(l-o).fill(e.g("fill")).stroke(a),(a=e.g("hatchFill"))&&(h=t.eC(e.f)).Ho(n+r/2).Io(o+r/2).Go(s-n-r).Fo(l-o-r).fill(a).stroke(null),e.tf(i.index,i.FO,new t.I(n,o,s-n,l-o))},S=function(){t.Y.call(this),this.ab=this.G=this.D=this.ba=this.Ba=this.aa=this.na=this.ea=this.Ha=this.K=this.P=this.b=this.f=null,this.Ia=new t.yu,t.K(this.Ia,this.Gba,this),this.o=new t.mI,t.K(this.o,this.Iba,this),this.eb=null,this.i=[],this.Ka=0,t.T(this.ua,[["horizontalStroke",16],["verticalStroke",16],["oddFill",16],["evenFill",16],["oddHolidayFill",16],["evenHolidayFill",16],["oddHatchFill",16],["evenHatchFill",16],["oddHolidayHatchFill",16],["evenHolidayHatchFill",16],["drawTopLine",128],["drawRightLine",128],["drawBottomLine",128],["drawLeftLine",128]])},x=function(){t.yu.call(this),this.o=new t.mI,t.K(this.o,this.Kba,this)},w=function(e,i){t.V.call(this),this.pa=e,this.Ad=i,this.je=null,this.b=[],this.i={},this.f=0,this.o=!1,this.Bb=null,this.B(4294967295)},C=function(t,e,i,n,s){if(e=t.b[e])for(var a=0;a<e.Xm.length;a++){var o=e.Xm[a];(0,window.isNaN)(o.bQ)||D(t,e,o,i,n,s)}},T=function(t){return t.pb(),t.f},D=function(e,i,s,a,o,r){var l=e.pa.Az(),h=s.shape,c=s.ZU,u=i.data;l.b||(l.b=n("fill",1));var d=l.b(l,u,s,a);u=i.data,l.o||(l.o=n("stroke",2));var p=l.o(l,u,s,a);u=i.data,l.f||(l.f=n("hatchFill",3));var g=l.f(l,u,s,a),f=t.$b(p);h?u=t.$b(h.stroke())==f:(h=s.shape=t.eC(o),u=!0),h.fill(d),h.stroke(p),d=!1,g?(c||((c=s.ZU=t.eC(o)).Dd(!0),d=!0),c.fill(g),c.stroke("none")):c&&c.fill("none"),o=e.Bb,g=e.pa.Ra(),e.pa.Od?((p=e.pa).pb(),p=p.dn):p=e.f;var m=p,v=t.p(s.top)?s.top:i.top,b=r/2+f/2;p=t.R(g.un(s.start)+o.left,r)+b,r=t.R(g.un(s.end+864e5)+o.left,r)-b,g=t.R(v/m*o.height+o.top+f/2,f),v&&g++,f=t.R((v+s.Ny)/m*o.height+o.top-f/2,f),u&&(h.clear().moveTo(p,g).lineTo(r,g).lineTo(r,f).lineTo(p,f).close(),h.tag={X:e.pa,index:s.TM}),d&&c.clear().moveTo(p,g).lineTo(r,g).lineTo(r,f).lineTo(p,f).close(),l.tf(s.bQ,a,l.Ic(s,i.data),new t.I(p,g,r-p,f-g),i.data)},k=function(){t.V.call(this)},$=function(){t.V.call(this),t.T(this.ua,[["size",0,1],["borderRadius",0,1],["opacity",0,1],["align",0,1],["fittingMode",0,1]])},O=function(e){t.Y.call(this),this.P=e,this.i=this.D=this.K=this.G=this.o=this.Aa=null,this.coords={wk:{x:0,y:0,height:0},name:{x:0,y:0,height:0},type:{x:0,y:0,height:0},description:{x:0,y:0,height:0}},this.aa={fontColor:"color",fontOpacity:"opacity",fontDecoration:"decoration",textDirection:"direction"},this.index=window.NaN,t.T(this.ua,[["width",0,0],["imageSrc",0,0],["name",0,0],["type",0,0],["description",0,1],["tags",0,1]])},P=function(e,i,n){var s=e.g(i);for(e=e.vf(i),t.A(n)||(n=[n]),i=0;i<n.length;i++)s=s?s[n[i]]:void 0,e=e?e[n[i]]:void 0;if(!t.p(e))return s;if(!t.p(s))return e;if(null===s||(0,window.isNaN)(s)&&!t.C(s))return s;if(t.ka(s)!=t.ka(e))return s;if(t.A(s)){n=[];var a=Math.max(e.length,s.length);for(i=0;i<a;i++)n[i]=t.p(s[i])?s[i]:e[i]}else n={},t.ra(n,e),t.ra(n,s);return n},L=function(e,i,n,s,a,o){e=e.g("width");var r=t.L(a.top,o)||0,l=t.L(a.right,e)||0;o=t.L(a.bottom,o)||0,n.x=s+(t.L(a.left,e)||0),n.y+=r,i.width(e-n.x-l),n.height=i.qd()+o},I=function(){t.V.call(this),t.T(this.ua,[["fontSize",0,1],["fontFamily",0,1],["fontColor",0,1],["fontOpacity",0,1],["fontDecoration",0,1],["fontStyle",0,1],["fontVariant",0,1],["fontWeight",0,1],["letterSpacing",0,1],["textDirection",0,1],["lineHeight",0,1],["textIndent",0,1],["vAlign",0,1],["hAlign",0,1],["wordWrap",0,1],["wordBreak",0,1],["textOverflow",0,1],["textShadow",0,1],["selectable",0,1],["useHtml",0,1],["disablePointerEvents",0,1]])},A=function(){I.call(this)},E=function(){t.Y.call(this),this.G=new t.mI,t.K(this.G,this.Lba,this),this.f=this.Aa=null,this.o=[],this.Ub=[],this.Ka=this.Ha=0,t.T(this.ua,[["stroke",16],["oddFill",16],["evenFill",16],["drawTopLine",256],["drawRightLine",256],["drawBottomLine",256],["drawLeftLine",256]])},G=function(e,i,n){var s,a={};if(e.length)for(s in i){var o=i[s].hX,r=o.charAt(0).toUpperCase()+o.substr(1);r=e+r,r=n.get(r),t.p(r)&&(a[o]=r)}else for(s in i)o=i[s].hX,r=n.get(o),t.p(r)&&(a[o]=r);return a},U=function(t,e,i){for(var n=0;n<t.Ub.length;n++)t.Ub[n].oa[e]=i},F=function(){E.call(this),this.data(null),t.T(this.ua,[["rowHeight",0],["minRowHeight",0],["maxRowHeight",0]])},M=function(){t.kt.call(this),this.je=null,this.o=!1,this.G=60,this.f="day",this.b=1,this.K=Date.UTC(2e3,0),this.D={},this.i=null,this.P=0},_=function(t){if(t.J(1)){var e=t.f+t.b.toFixed(0);t.i=t.D[e],t.i||(t.D[e]=t.i=new N(t)),t.B(2),t.I(1)}t.J(2)&&(t.P=R(t.i,t.K),t.I(2))},N=function(e){this.je=e.calendar(),this.Hz=e.aY();var i=e.Dg(),n=e.count();e=e.zP(),this.Dv=vt[i]*n||window.NaN,!this.Hz&&this.Dv?this.b=t.Uo(e,i,n,2e3):(this.Dv=window.NaN,this.LF=this.zn=t.Vo(i,n),this.Yq=this.zn.b(-1),this.Hz?(e=t.So(e,this.zn,2e3),this.b=d(this.je,e,this.zn),(0,window.isNaN)(this.b)&&(this.b=p(this.je,e,this.Yq),this.zn=null),(0,window.isNaN)(this.b)?(this.xm=this.Bk=null,i=window.NaN):(this.Bk=new t.On(new Date(this.b)),this.Bk.add(this.LF),this.xm=[this.b,this.Bk.getTime()],i=p(this.je,this.b,this.Yq)),(0,window.isNaN)(i)?this.Yq=this.$k=this.rm=null:((n=new t.On(new Date(i))).add(this.LF),this.rm=[n.getTime(),i],this.$k=new t.On(new Date(i)))):(this.b=t.Uo(e,i,n,2e3),this.Bk=new t.On(new Date(this.b)),this.Bk.add(this.zn),this.xm=[this.b,this.Bk.getTime()],this.$k=new t.On(new Date(this.b)),this.$k.add(this.Yq),this.rm=[this.b,this.$k.getTime()]))},R=function(i,n){if(i.Dv)return(n-i.b)/i.Dv;var s;if(i.xm&&!i.Dv)if(n>=i.b){if(i.zn&&i.Bk.getTime()<n)if(i.Hz){var a=u(i.je,i.Bk.getTime(),n,i.zn,!0);for(s=0;s<a.length;s++){var o=a[s];i.xm.push(o.start,o.end)}a.length&&i.Bk.setTime(a[a.length-1].end),i.Bk.getTime()<n&&(i.zn=null)}else{s=i.Bk.getTime();do{a=s,i.Bk.add(i.zn),s=i.Bk.getTime(),i.xm.push(a,s)}while(s<n)}}else if(i.rm&&i.Yq&&i.$k.getTime()>n)if(i.Hz){for(s=(a=u(i.je,n,i.$k.getTime()-1,i.LF,!0)).length;s--;)o=a[s],i.rm.push(o.end,o.start);a.length&&i.$k.setTime(a[0].start),i.$k.getTime()>n&&(i.Yq=null)}else{s=i.$k.getTime();do{a=s,i.$k.add(i.Yq),s=i.$k.getTime(),i.rm.push(a,s)}while(s>n)}return i.xm?n==i.b?0:n>i.b?i.Bk.getTime()<=n?i.xm.length/2:0<=(a=t.Na(i.xm,n))?Math.round(a/2):1&(a=~a)?(a>>1)+(n-i.xm[a-1])/(i.xm[a]-i.xm[a-1]):a>>1:i.rm?i.$k.getTime()>=n?-i.rm.length/2:0<=(a=t.Na(i.rm,n,e))?-Math.round(a/2)||0:1&(a=~a)?-((a>>1)+(n-i.rm[a-1])/(i.rm[a]-i.rm[a-1])):-(a>>1)||0:0:window.NaN},j=function(e,n){t.ux.call(this),this.Ga("resource"),this.gd().hoverMode("single").selectionMode("multi-select"),this.state=new t.ix(this),this.Sb=new t.I(0,0,0,0),this.G=new E,this.G.target(this),t.K(this.G,this.Ega,this),this.qc=new t.I(0,0,0,0),this.ea=new t.oI,t.K(this.ea,this.Fga,this),this.ud=new t.I(0,0,0,0),this.fb=new x,t.K(this.fb,this.xga,this),this.Ka=new t.mI,t.K(this.Ka,this.Fba,this),this.f=new S,t.K(this.f,this.uga,this),this.yg=new t.I(0,0,0,0),this.D=new t.GB(!0),t.W(this,"horizontalScrollBar",this.D),this.D.wa("scrollerchange",this.Jga,!1,this),t.K(this.D,this.Kga,this),this.bj=new t.I(0,0,0,0),this.o=new t.GB(!0),t.W(this,"verticalScrollBar",this.o),this.o.ta("inverted",!0),this.o.wa("scrollerchange",this.Lga,!1,this),t.K(this.o,this.Mga,this),this.je=new h,this.eb=new M,this.eb.calendar(this.je),t.K(this.eb,this.Dba,this),this.ta("currentStartDate",window.NaN),this.sb=this.$a=window.NaN,this.Ap=this.i=null,this.Ba=this.b=0,this.mf=this.Oj=null,this.Dk=0,this.ba=[],this.P=[],this.bg=[],this.ec=null,this.dn=0,this.Hd=this.Od=!1,this.nf=null,this.Za=new t.Hu,t.K(this.Za,this.jga,this),this.Uc=new i(this),t.K(this.Uc,this.dga,this),this.na=new m(this),t.K(this.na,this.lga,this),this.data(e||null,n),t.su(this,this,this.If,this.hg,null,this.If,null,this.Sj),t.T(this.ua,[["pixPerHour",524288,1],["minRowHeight",524288,1],["resourceListWidth",4,9],["timeLineHeight",4,9],["defaultMinutesPerDay",524288,1],["currentStartDate",262144,1],["splitterStroke",16777216,1]])},B=function(e,i,n){t.ag.call(this,i.ia()),this.b=n,this.pa=e,this.Qj=void 0,this.rs=(0,t.pa)((function(){this.Qj=void 0;var t=this.pa,e=this.Ha,i=t.eb.Ow(this.ea-t.sb);e/=t.b,t.ka(),i!=t.g("currentStartDate")&&(t.ta("currentStartDate",i),t.B(262144,1)),e!=t.Ba&&(t.Ba=e,t.B(1048576,1)),t.da(!0)}),this),t.bg(this),this.wa("start",this.ba,!1,this),this.wa("end",this.i,!1,this)},H=function(t){this.pa=t,this.reset()},z=function(e,i){var n=new j(e,i);return n.ga(!0,t.nm("resource")),n};t.Mn.prototype.NJ=t.ca(6,(function(e){return[this.getUTCFullYear(),t.uc(this.getUTCMonth()+1,2),t.uc(this.getUTCDate(),2)].join(e?"-":"")})),t.Nn.prototype.NJ=t.ca(5,(function(e){var i=t.Mn.prototype.NJ.call(this,e);return e?i+" "+t.uc(this.getUTCHours(),2)+":"+t.uc(this.getUTCMinutes(),2)+":"+t.uc(this.BU(),2):i+"T"+t.uc(this.getUTCHours(),2)+t.uc(this.getUTCMinutes(),2)+t.uc(this.BU(),2)}));var V={gta:"year",Zsa:"week",Tna:"day",NONE:"none"},q={tma:"availability-per-chart",uma:"availability-per-resource",Xla:"activity-per-chart",Yla:"activity-per-resource"};t.H(i,t.V),t.Gq(i,["fill","stroke","hatchFill","labels"],"normal"),t.g=i.prototype,t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.sa=16,t.g.ra=1;var W=t.Yb("diagonal-brick");t.g=i.prototype,t.g.de=function(e){t.X(e,1)&&this.B(16,1)},t.g.Ic=function(e,i){return this.i||(this.i=new t.Fw),t.ov(this.i,{start:{value:e.start,type:"date-time"},end:{value:e.end,type:"date-time"},minutesPerDay:{value:e.Ny,type:"number"},hoursPerDay:{value:e.Ny/60,type:"number"},hoursPerDayRounded:{value:Math.ceil(e.Ny/30)/2,type:"number"},name:{value:i.name||"Unnamed Activity",type:"string"},activityName:{value:i.name,type:"string"},activityInfo:{value:i,type:""}})},t.g.tf=function(e,i,n,s,a){var o=this.ca.labels(),r=0==i?"normal":1==i?"hovered":"selected",l=a.normal?a.normal.label:void 0,h=l||a.label;l=void 0,i!=t.gm&&(l=(l=a[r]?a[r].label:void 0)||a[i==t.vo?"hoverLabel":"selectLabel"]),a=h&&t.p(h.enabled)?h.enabled:null,r=l&&t.p(l.enabled)?l.enabled:null,i=i==t.wo?this.selected().labels():i==t.vo?this.lb().labels():null,(null===r?i&&null!==i.enabled()&&t.p(i.enabled())?i.enabled():null===a?o.enabled():a:r)?(a=l&&l.position||i&&i.g("position")||h&&h.position||o.g("position"),a={value:t.Eo(s,a)},(r=o.be(e))?(r.Hf(n),r.jc(a)):r=o.add(n,a,e),r.Hi(),t.$u(r,i),r.td(h,l),r.width(s.width),r.height(s.height),r.clip(s),r.W()):o.clear(e)},t.g.oE=function(e,i){var n=this.ca.labels();n.ka(),this.D||(this.D=t.ok(),this.D.zIndex(4).parent(e),this.gg=t.tk(),this.D.clip(this.gg)),n.O(this.D),n.clear(),n.ja(i),n.zh=0,this.gg.shape(i)},t.g.wi=function(){var t=this.ca.labels();t.W();var e=t.sl();e&&e.Dd(!0),t.da(!1),this.I(16)};var Y={};t.rq(Y,0,"color",t.Sq),t.U(i,Y);var K={};t.g=i.prototype,t.g.Ge=function(t,e,i){return{sourceColor:i||this.g("color")||"blue",start:t.start,end:t.end,minutesPerDay:t.Ny,activityName:e.name,activityInfo:e}},t.g.Yi=function(t,e){return{sourceHatchFill:W,start:t.start,end:t.end,minutesPerDay:t.Ny,activityName:e.name,activityInfo:e}},t.g.ph=function(t){return null!=this.Pa[t]},t.g.sc=function(e,i,n,s){var a=0==i?this.ca:1==i?this.za:this.Ea,o=n[0==i?"normal":1==i?"hovered":"selected"];return i=(o?o[e]:void 0)||n[t.hm(i,e)],t.p(i)?i=s(i):null==(i=a.nd(e))&&(i=a.vf(e),t.p(i)&&(i=s(i))),i},t.g.F=function(){var e=i.u.F.call(this);return t.Tq(this,Y,e,"Activities"),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),e},t.g.U=function(e,n){i.u.U.call(this,e),t.Iq(this,Y,e),this.ca.ga(!!n,e),this.ca.ga(!!n,e.normal),this.za.ga(!!n,e.hovered),this.Ea.ga(!!n,e.selected)},t.g.R=function(){this.o=this.b=this.f=null,t.sd(this.ca,this.za,this.Ea,this.gg),this.gg=this.Ea=this.za=this.ca=null,i.u.R.call(this)};var X=i.prototype;X.normal=X.Qa,X.hovered=X.lb,X.selected=X.selected,t.g=o.prototype,t.g.OY=function(t){return t.getTime()>=this.K.getTime()&&t.getTime()<=this.i.getTime()},t.g.tda=function(t){return this.OY(t)&&(null===this.b||(t.UM()+6)%7==this.b)},t.g.sda=function(t){if(!this.OY(t))return!1;if(this.b)return t.getUTCMonth()==this.b.getUTCMonth()&&t.getUTCDate()==this.b.getUTCDate();var e=t.getUTCFullYear();t=t.getTime();var i=this.o.clone();i.CU(e);var n=this.f.clone();return n.CU(e),t>=i.getTime()&&t<=n.getTime()},t.g.mW=function(t,e){var i=this.o,n=e.getTime()+36e5*i[0]+6e4*i[1];i=this.f;for(var s=e.getTime()+36e5*i[0]+6e4*i[1],a=[],o=0;(i=t[o])&&i[1]<n;)a.push(i),o++;if(o<t.length){if(i[0]>s)this.D&&a.push([n,s]);else{for(this.D?n=Math.min(n,i[0]):(i[0]<n&&a.push([i[0],n]),n=s);i&&i[1]<=s;)i=t[++o];o<t.length&&i[0]<=s&&(a.push([n,i[1]]),o++)}for(;o<t.length;o++)a.push(t[o])}else this.D&&a.push([n,s]);return a},t.g.m5=function(t,e){return t.length=0,this.D&&t.push([e.getTime(),e.getTime()+864e5-6e4]),t},t.H(h,t.V),h.prototype.sa=0,h.prototype.ra=2;var J="dd.MM",Z=new Date(Date.UTC(2e3,0)),Q=new t.On(0,0,1),tt=new t.On(9999,11,31),et=new t.En(0,0,1);t.g=h.prototype,t.g.g7=function(e){if(t.p(e)){var i;if(t.A(e)){var n=t.P(e[0],window.NaN,!0);n=t.Za(n,0,6),e=t.P(e[1],window.NaN,!0),e=t.Za(e,0,6),(0,window.isNaN)(n)?i=(0,window.isNaN)(e)?null:[e,e]:(0,window.isNaN)(e)?i=[n,n]:(n>e&&(i=n,n=e,e=i),i=[n,e])}else i=null;return this.P=!1,this.b=i,f(this),this.va(2),this}return this.b},t.g.E6=function(e){return t.p(e)?(this.o=t.N(e),f(this),this.va(2),this):this.o},t.g.$_=function(e){if(t.p(e)){for(this.i=t.A(e)?e.slice():[],e=this.f.length=0;e<this.i.length;e++)this.f.push(new o(this.i[e]));return f(this),this.va(2),this}return this.i},t.g.vD=function(e,i,n,s){return u(this,t.Xk(e),t.Xk(i),t.Vo(t.Zk(n,"day",!0),t.P(s)))},t.g.H2=function(e){t.X(e,2)&&!this.b&&f(this)},t.g.F=function(){var t=h.u.F.call(this);return this.P||(t.weekendRange=this.b?[this.b[0],this.b[1]]:null),t.timezoneOffset=this.o,t.availabilities=this.i.slice(),t},t.g.U=function(t){h.u.U.call(this,t),this.g7(t.weekendRange),this.E6(t.timezoneOffset),this.$_(t.availabilities)},t.g.R=function(){this.i=null,this.Y&&t.kr(this.Y,this.H2,this),this.Y=null,h.u.R.call(this)};var it=h.prototype;t.E("anychart.scales.calendar",(function(t){return new h(t)})),it.weekendRange=it.g7,it.timezoneOffset=it.E6,it.availabilities=it.$_,it.getWorkingSchedule=it.vD,t.H(m,t.Y),t.g=m.prototype,t.g.sa=208|t.Y.prototype.sa,t.g.ra=2|t.Y.prototype.ra,t.g.clear=function(){this.f.clear(),this.o.clear(),this.labels().clear(),this.G.length=0,this.b=null,this.P=-1,this.B(192)},t.g.W=function(){if(this.zc()){if(this.J(4)&&(this.K=this.ja(),this.gg.shape(this.K),this.I(4)),this.J(128)){for(var t=0;t<this.G.length;t++)y(this,this.G[t]);this.I(144)}if(this.J(64)){(t=this.labels()).ka(),t.O(this.D),t.ja(this.K),t.zh=0,this.gg.shape(this.K),t.W();var e=t.sl();e&&e.Dd(!0),t.da(!1),this.I(64)}if(this.J(16)){var i=this.g("fill"),n=this.g("stroke");this.f.Pj((function(t){t.fill(i),t.stroke(n)}));var s=this.g("hatchFill");this.o.Pj((function(t){t.fill(s),t.stroke(null)})),this.I(16)}this.J(2)&&(t=this.O(),this.Oa.parent(t),this.I(2)),this.J(8)&&(t=this.zIndex(),this.Oa.zIndex(t),this.I(8))}},t.g.labels=function(e){return this.Da||(this.Da=new t.Pu,this.Da.kb(this),t.K(this.Da,this.de,this)),t.p(e)?(!t.C(e)||"enabled"in e||(e.enabled=!0),this.Da.N(e),this):this.Da},t.g.de=function(e){t.X(e,1)&&this.B(16,1)},t.g.Ic=function(e,i,n){return this.i||(this.i=new t.Fw),i={minutes:{value:e=i.lC-i.mz,type:"number"},hours:{value:e/60,type:"number"},hoursRounded:{value:Math.ceil(e/30)/2,type:"number"},percent:{value:e/i.mz*100,type:"number"},allocated:{value:i.lC,type:"number"},vacant:{value:i.mz,type:"number"},activities:{value:(0,t.Wa)(i.Az,(function(t){return(t=n.b[t]||null)?t.data:null})),type:""}},t.ov(this.i,i)},t.g.tf=function(t,e,i,n){var s=this.labels();if(e){var a=s.be(t),o={value:{x:i.left,y:i.top}};a?(a.Hf(e),a.jc(o)):a=s.add(e,o,t),a.Hi(),a.td(n),a.width(i.width),a.height(i.height),a.clip(i),a.W()}else s.clear(t)};var nt={};t.rq(nt,1,"fill",t.Qq),t.rq(nt,1,"stroke",t.Pq),t.rq(nt,1,"hatchFill",t.Rq),t.rq(nt,0,"height",t.Bq),t.U(m,nt),t.g=m.prototype,t.g.ph=function(t){return null!=this.Pa[t]},t.g.sc=function(e,i,n){return i=i[e],t.p(i)?i=n(i):null==(i=this.Pa[e])&&(i=this.oa[e],t.p(i)&&(i=n(i))),i},t.g.F=function(){var e=m.u.F.call(this);return t.Tq(this,nt,e,"Resource Conflicts"),e},t.g.U=function(e,i){m.u.U.call(this,e),t.Iq(this,nt,e),this.labels().ga(!!i,e.labels)},t.g.R=function(){t.sd(this.f,this.o,this.gg),this.f=this.o=this.gg=null,m.u.R.call(this)};var st=m.prototype;st.labels=st.labels,t.H(S,t.wu),S.prototype.sa=976|t.wu.prototype.sa,S.prototype.ra=t.wu.prototype.ra;var at={};t.rq(at,1,"horizontalStroke",t.Pq),t.rq(at,1,"verticalStroke",t.Pq),t.rq(at,1,"oddFill",t.Qq),t.rq(at,1,"evenFill",t.Qq),t.rq(at,1,"oddHolidayFill",t.Qq),t.rq(at,1,"evenHolidayFill",t.Qq),t.rq(at,1,"oddHatchFill",t.Rq),t.rq(at,1,"evenHatchFill",t.Rq),t.rq(at,1,"oddHolidayHatchFill",t.Rq),t.rq(at,1,"evenHolidayHatchFill",t.Rq),t.rq(at,0,"drawTopLine",t.Dq),t.rq(at,0,"drawRightLine",t.Dq),t.rq(at,0,"drawBottomLine",t.Dq),t.rq(at,0,"drawLeftLine",t.Dq),t.U(S,at),t.g=S.prototype,t.g.background=function(e){return t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.Hba=function(e){return t.p(e)?(this.o.N(e),this.B(512,1),this):this.o},t.g.Ra=function(e){return t.p(e)?(this.eb!=e&&(this.eb&&t.kr(this.eb,this.t_,this),(this.eb=e)&&t.K(this.eb,this.t_,this),this.B(128,1)),this):this.eb},t.g.t_=function(){this.B(128,1)},t.g.Gba=function(){this.B(64,1)},t.g.Iba=function(){this.B(512,1)},t.g.W=function(){if(this.zc()){if(this.f||(this.f=t.ok(),this.b=this.f.Bd(),this.gg=t.tk(),this.f.clip(this.gg),this.P=this.b.path(),this.P.stroke(null),this.K=this.b.path(),this.K.stroke(null),this.Ha=this.b.path(),this.Ha.stroke(null),this.ea=this.b.path(),this.ea.stroke(null),this.na=this.b.path(),this.na.stroke(null),this.aa=this.b.path(),this.aa.stroke(null),this.Ba=this.b.path(),this.Ba.stroke(null),this.ba=this.b.path(),this.ba.stroke(null),this.D=this.b.path(),this.D.fill(null),this.D.eq(!0),this.G=this.b.path(),this.G.fill(null),this.G.eq(!0)),this.J(4)&&(this.ab=this.ob(),t.Xo(this.ab,0),this.gg.shape(this.ab),this.B(960),this.I(4)),this.J(64)&&(this.b.zIndex(this.Ia.zIndex()+1),this.Ia.ja(this.ab),this.Ia.O(this.f),this.Ia.W(),this.I(64)),this.J(16)&&(this.P.fill(this.g("oddFill")),this.K.fill(this.g("evenFill")),this.Ha.fill(this.g("oddHolidayFill")),this.ea.fill(this.g("evenHolidayFill")),this.na.fill(this.g("oddHatchFill")),this.aa.fill(this.g("evenHatchFill")),this.Ba.fill(this.g("oddHolidayHatchFill")),this.ba.fill(this.g("evenHolidayHatchFill")),this.D.stroke(this.g("horizontalStroke")),this.G.stroke(this.g("verticalStroke")),this.I(16)),this.J(128)){if(this.P.clear(),this.K.clear(),this.Ha.clear(),this.ea.clear(),this.na.clear(),this.aa.clear(),this.Ba.clear(),this.ba.clear(),this.D.clear(),this.G.clear(),this.eb){for(var e=this.eb.Fn(0,this.ab.width),i=this.i.length-1,n=e.length-1,s=t.$b(this.D.stroke()),a=t.$b(this.G.stroke()),o=t.R(0,s),r=0,l=!!this.g("drawTopLine"),h=!!this.g("drawRightLine"),c=!!this.g("drawBottomLine"),u=!!this.g("drawLeftLine"),d=0;d<=i;d++){var p=d==i;r=t.R(o+this.i[d]-(p?s:0),s);for(var g=0;g<=n;g++){var f=g==n,m=e[g],v=t.R(this.eb.un(m.start)+this.ab.left,a),b=t.R(this.eb.un(m.end)+this.ab.left-(f?a:0),a);if(m=m.holiday,1&d)if(m){m=this.ea;var y=this.ba}else m=this.K,y=this.aa;else m?(m=this.Ha,y=this.Ba):(m=this.P,y=this.na);var S=u&&!g?Math.ceil(v):Math.floor(v),x=h||!f?Math.floor(b):Math.ceil(b),w=l&&!d?Math.ceil(o):Math.floor(o),C=c||!p?Math.floor(r):Math.ceil(r);m.moveTo(S,w).lineTo(x,w).lineTo(x,C).lineTo(S,C).close(),y.moveTo(S,w).lineTo(x,w).lineTo(x,C).lineTo(S,C).close(),u&&!g&&this.G.moveTo(v,w).lineTo(v,C),!h&&f||this.G.moveTo(b,w).lineTo(b,C),l&&!d&&this.D.moveTo(S,o).lineTo(x,o),!c&&p||this.D.moveTo(S,r).lineTo(x,r)}o=r}this.Za=r}else this.Za=!1;this.I(128)}this.J(256)&&(this.b.oc(1,0,0,1,0,Math.round(this.ab.top-this.Ka*this.Za)),this.I(256)),this.J(512)&&(this.o.target(this.O().Ja().Tl()),this.o.Qf(this.ob()),this.o.W(),this.I(512)),this.J(2)&&(this.f.parent(this.O()),this.I(2)),this.J(8)&&(this.f.zIndex(this.zIndex()),this.I(8))}},t.g.remove=function(){this.f&&this.f.parent(null)},t.g.ph=function(t){return null!=this.Pa[t]},t.g.ys=function(){return 1},t.g.F=function(){var e=S.u.F.call(this);return t.Tq(this,at,e,"Resource Grid"),e.background=this.Ia.F(),e.overlay=this.o.F(),e},t.g.U=function(e,i){S.u.U.call(this,e,i),t.Iq(this,at,e),t.p(this.Ia)&&this.Ia.ga(!!i,e.background),this.o.ga(!!i,e.overlay)},t.g.R=function(){t.qd(this.Ia),this.Ia=null,t.qd(this.f),this.G=this.D=this.ba=this.Ba=this.aa=this.na=this.ea=this.Ha=this.K=this.P=this.b=this.f=null,t.qd(this.o),this.o=null,S.u.R.call(this)};var ot=S.prototype;ot.background=ot.background,ot.overlay=ot.Hba,t.H(x,t.yu),t.g=x.prototype,t.g.sa=128|t.yu.prototype.sa,t.g.ra=t.yu.prototype.ra,t.g.Jba=function(e){return t.p(e)?(this.o.N(e),this.B(128,1),this):this.o},t.g.Kba=function(){this.B(128,1)},t.g.W=function(){return this.J(4)&&this.B(128),x.u.W.call(this),this.J(128)&&(this.o.target(this.O().Ja().Tl()),this.o.Qf(this.ob()),this.o.W(),this.I(128)),this},t.g.F=function(){var t=x.u.F.call(this);return t.overlay=this.o.F(),t},t.g.U=function(t,e){x.u.U.call(this,t,e),this.o.ga(!!e,t.overlay)},t.g.R=function(){x.u.R.call(this),t.qd(this.o),this.o=null};var rt=x.prototype;rt.overlay=rt.Jba,t.H(w,t.V),t.g=w.prototype,t.g.sa=3,t.g.ra=0,t.g.calendar=function(e){return t.p(e)?(this.je||(this.je=new h(this.pa.calendar())),this.je.N(e),this):this.je||this.pa.calendar()},t.g.W=function(e,i,n,s,a,o){if(this.pb(),this.o){for(var r=Math.floor(i/864e5),l=Math.floor(n/864e5),h=this.pa.uS();r<=l;r++)v(h,864e5*r,this.i[r],this,a.top);v(h,864e5*r,null,this,a.top),l=h.g("height")+1,a.top+=l,a.height-=l}for(this.Bb=a,a=0;a<this.b.length;a++){l=this.b[a],h=i,r=n;for(var c=s,u=o,d=e.TM++,p=0;p<l.Xm.length;p++){var g=l.Xm[p];g.shape=null,g.ZU=null,g.TM=d,g.end+864e5<h||g.start>r?g.bQ=window.NaN:(g.bQ=e.h5.length,e.h5.push(d),D(this,l,g,t.nx(this.pa.state,e.TM),c,u))}}return e},t.g.pb=function(){if(this.J(1)){this.b.length=0;var e,i=this.pa.la.$();if(!i.select(this.Ad)||!(e=i.get("activities"))||!t.A(e))return;for(i=0;i<e.length;i++){var n=e[i];if(t.C(n)){var s=n.intervals;t.A(s)||(s=[n]);for(var a=this.pa.g("defaultMinutesPerDay"),o=[],r=0;r<s.length;r++){var l=s[r];if(l){var h=t.ps(l.start),c=t.ps(l.end);if(h&&c){if(h.getTime()>c.getTime()){var u=h;h=c,c=u}h=Date.UTC(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),c=Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u=t.P(l.totalMinutes,window.NaN,!1),o.push({start:h,end:c,Ny:(0,window.isNaN)(u)?t.P(l.minutesPerDay,a,!1):u/((c-h)/864e5+1),shape:null,ZU:null,bQ:window.NaN})}}}n=o.length?{data:n,top:0,Xm:o}:null}else n=null;n&&this.b.push(n)}this.B(2),this.I(1)}if(this.J(2)){for(this.i={},this.f=0,this.o=!1,e=this.pa.Hd,i=0;i<this.b.length;i++)for(n=(n=this.b[i]).Xm,s=0;s<n.length;s++){for(l=n[s],a=Math.floor(l.start/864e5),o=Math.floor(l.end/864e5),c=l.Ny,h=0,r=a;r<=o;r++){var d=this.i[r];if(!d){u=r,d=this.calendar(),u=new Date(u),u=new t.On(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d=g(d,u);for(var p=u=0;p<d.length;p++){var f=d[p];u+=f[1]-f[0]}d=u/6e4,this.i[r]=d={mz:d,lC:0,Az:d?[]:null,bottom:0}}d.mz&&(d.Az[d.Az.length-1]!=i&&d.Az.push(i),d.lC+=c,d.lC>d.mz&&(this.o=!0),d.bottom>h&&(h=d.bottom))}for(l.top=h,l=h+c,r=a;r<=o;r++)this.i[r].bottom=l,e&&this.f<d.mz&&(this.f=d.mz),this.f<d.bottom&&(this.f=d.bottom)}this.I(2)}},t.g.F=function(){return w.u.F.call(this)},t.g.U=function(t){w.u.U.call(this,t)},t.g.R=function(){t.sd(this.je),this.i=this.je=this.pa=this.b=null,w.u.R.call(this)},t.H(k,t.V),t.g=k.prototype,t.g.margin=function(e,i,n,s){return this.Qc||(this.Qc=new t.Mv,t.K(this.Qc,this.$A,this)),t.p(e)?(this.Qc.N.apply(this.Qc,arguments),this):this.Qc},t.g.$A=function(){this.va(1)},t.g.ra=1,t.g.U=function(t,e){k.u.U.call(this,t,e),this.margin().ga(!!e,t.margin)},t.g.F=function(){var t=k.u.F.call(this);return t.margin=this.margin().F(),t},t.g.R=function(){t.qd(this.Qc),k.u.R.call(this)};var lt=k.prototype;lt.margin=lt.margin,t.H($,k);var ht={};t.sq(ht,[[0,"size",t.br],[1,"borderRadius",t.fr],[0,"opacity",t.er],[0,"align",t.zq],[0,"fittingMode",t.zq]]),t.U($,ht),$.prototype.U=function(e,i){$.u.U.call(this,e,i),t.Iq(this,ht,e,i)},$.prototype.F=function(){var e=$.u.F.call(this);return t.Tq(this,ht,e),e},t.H(O,t.Y),O.prototype.ra=t.Y.prototype.ra,O.prototype.sa=t.Y.prototype.sa;var ct={};t.sq(ct,[[0,"width",t.br],[0,"imageSrc",t.zq],[0,"name",t.zq],[0,"type",t.zq],[0,"description",t.zq],[1,"tags",t.fr]]),t.U(O,ct),t.g=O.prototype,t.g.Ij=function(t,e){var i;for(i in e){var n=e[i];i in this.aa&&(i=this.aa[i]),t[i]&&t[i](n)}},t.g.offsetY=function(e){return t.p(e)?(this.fO!=e&&(this.fO=e),this):this.fO},t.g.w_=function(e){var i={};if(e){var n=e.target,s=(0,t.za)(this.i,n);return i.type=e.type,i.target=n,i.index=s,i.text=n.text(),this.dispatchEvent(i)}return!1},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.W=function(){if(!this.zc())return this;var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();n&&i.suspend(),this.Aa||(this.Aa=t.ok()),this.o||(this.o=this.Aa.wk(),this.o.zIndex(1)),this.G||(this.G=this.Aa.text(),this.G.zIndex(1)),this.K||(this.K=this.Aa.text(),this.K.zIndex(1)),this.D||(this.D=this.Aa.text(),this.D.zIndex(1)),this.i||(this.i=[]),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(e),this.I(2));var s,a=this.g("imageSrc");if(this.o.src(a),this.Ij(this.o,P(this,"imageSettings",[])),e=this.g("name"),P(this,"nameSettings","useHtml")?this.G.htmlText(e):this.G.text(e),this.Ij(this.G,P(this,"nameSettings",[])),e=this.g("type"),P(this,"typeSettings","useHtml")?this.K.htmlText(e):this.K.text(e),this.Ij(this.K,P(this,"typeSettings",[])),e=this.g("description"),P(this,"descriptionSettings","useHtml")?this.D.htmlText(e):this.D.text(e),this.Ij(this.D,P(this,"descriptionSettings",[])),e=this.g("tags"),this.i.length){for(s=0;s<this.i.length;s++){var o=this.i[s];this.wc.gc(o,"click",this.w_),t.qd(o)}this.i=[]}var r=P(this,"tagSettings",[]);for(r.background=P(this,"tagSettings","background"),r.padding=P(this,"tagSettings","padding"),s=0;s<e.length;s++)o=new t.xv,this.wc.wa(o,"click",this.w_),o.N(r),o.sl().cursor("pointer"),o.O(this.Aa),o.zIndex(1),o.text(e[s]),this.i.push(o);if(this.J(4)){var l=this.g("height");e=this.P.u_(this,l),r=this.P.g2(l);var h=this.P.f2(l);l=this.g("width"),(0,window.isNaN)(e)||((0,window.isNaN)(h)||(e=Math.min(e,h)),(0,window.isNaN)(r)||(e=Math.max(e,r))),o=P(this,"imageSettings","margin"),this.coords.wk.x=t.L(o.left,l)||0;var c=t.L(o.right,l)||0;this.coords.wk.y=t.L(o.top,e)||0,s=t.L(P(this,"imageSettings","size"),l)||0,this.o.width(s),this.o.height(s);var u=0,d=0;""!=a&&(this.o.clip(function(e){var i=e.o.width();e.b||(e.b=t.mk(0,0)),e.b.Go(i).Fo(i);var n=0,s=0,a=0,o=0,r=P(e,"imageSettings","borderRadius");if(t.A(r)||(r=[r]),r&&r.length){for(var l=0;l<r.length;l++)r[l]=Math.min(r[l],i/2);1==r.length?(n=r[0],s=r[0],a=r[0],o=r[0]):2==r.length?(n=r[0],s=r[1],a=r[0],o=r[1]):3==r.length?(n=r[0],s=r[1],a=r[2],o=r[1]):4==r.length&&(n=r[0],s=r[1],a=r[2],o=r[3])}return e.b.round(n,s,a,o),e.b}(this)),u=this.coords.wk.x+s+c,d=this.coords.wk.y+s+t.L(o.bottom,e)||0),this.coords.name.x=0,this.coords.name.y=0,this.coords.name.height=0,null!=this.g("name")&&(o=P(this,"nameSettings","margin"),L(this,this.G,this.coords.name,u,o,e)),this.coords.type.y=this.coords.name.y+this.coords.name.height,null!=this.g("type")&&(o=P(this,"typeSettings","margin"),L(this,this.K,this.coords.type,u,o,e)),this.coords.description.y=this.coords.type.y+this.coords.type.height,null!=this.g("description")&&(o=P(this,"descriptionSettings","margin"),L(this,this.D,this.coords.description,u,o,e)),a=l-u;var p=this.coords.description.y+this.coords.description.height;if(o=p,this.i.length){o=P(this,"tagSettings","margin");var g=t.L(o.left,l);c=t.L(o.right,l);var f=t.L(o.bottom,e)||0,m=t.L(o.top,e)||0,v=u+g;p+=m;var b=!1;for(s=0;s<this.i.length;s++){var y=(o=this.i[s]).yi();b&&v+y.width+c-u>a&&(v=u+g,p=p+y.height+f+m),o.offsetX(v),o.offsetY(p),o.W(),b=!0,v+=y.width+c+g}o=p+y.height+f}(0,window.isNaN)(e)?(this.f=Math.max(d,o),(0,window.isNaN)(h)||(this.f=Math.min(this.f,h)),(0,window.isNaN)(r)||(this.f=Math.max(this.f,r))):this.f=e,this.Bb=t.kn(0,0,l,this.f),this.o.oc(1,0,0,1,this.coords.wk.x,this.coords.wk.y),this.G.oc(1,0,0,1,this.coords.name.x,this.coords.name.y),this.K.oc(1,0,0,1,this.coords.type.x,this.coords.type.y),this.D.oc(1,0,0,1,this.coords.description.x,this.coords.description.y),this.Aa.clip(this.Bb),this.I(4)}return this.Aa.oc(1,0,0,1,0,this.fO),n&&i.resume(),this},t.g.F=function(){return O.u.F.call(this)},t.g.U=function(t,e){O.u.U.call(this,t,e)},t.g.R=function(){this.P=null,t.sd(this.i),this.i=null,t.qd(this.D),this.D=null,t.qd(this.K),this.K=null,t.qd(this.G),this.G=null,t.qd(this.o),this.o=null,t.qd(this.Aa),this.Aa=null,O.u.R.call(this)},t.H(I,k);var ut={};t.sq(ut,[[0,"fontSize",t.zq],[0,"fontFamily",t.zq],[0,"fontColor",t.zq],[0,"fontOpacity",t.er],[0,"fontDecoration",t.bl],[0,"fontStyle",t.cl],[0,"fontVariant",t.dl],[0,"fontWeight",t.wq],[0,"letterSpacing",t.wq],[0,"textDirection",t.el],[0,"lineHeight",t.wq],[0,"textIndent",t.Bq],[0,"vAlign",t.al],[0,"hAlign",t.$k],[0,"wordWrap",t.Cq],[0,"wordBreak",t.Cq],[0,"textOverflow",t.zq],[0,"textShadow",t.Zb],[0,"selectable",t.Dq],[0,"useHtml",t.Dq],[0,"disablePointerEvents",t.Dq]]),t.U(I,ut),I.prototype.U=function(e,i){I.u.U.call(this,e,i),t.Iq(this,ut,e,i)},I.prototype.F=function(){var e=I.u.F.call(this);return t.Tq(this,ut,e),e},t.H(A,I),t.g=A.prototype,t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,this.Ia.P=!1,t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(){this.va(1)},t.g.padding=function(e,i,n,s){return this.Wa||(this.Wa=new t.Hu,t.K(this.Wa,this.fm,this)),t.p(e)?(this.Wa.N.apply(this.Wa,arguments),this):this.Wa},t.g.fm=function(){this.va(1)},t.g.U=function(t,e){A.u.U.call(this,t,e),this.padding().ga(!!e,t.padding),this.background().ga(!!e,t.background)},t.g.F=function(){var t=A.u.F.call(this);return t.padding=this.padding().F(),t.background=this.background().F(),t.position="left-top",t.anchor="left-top",t.rotation="0",t},t.g.R=function(){t.sd(this.Wa,this.Ia),A.u.R.call(this)};var dt=A.prototype;dt.background=dt.background,dt.padding=dt.padding,t.H(E,t.wu),E.prototype.ra=t.Y.prototype.ra,E.prototype.sa=65488|t.Y.prototype.sa;var pt={};t.sq(pt,[[1,"stroke",t.Pq],[1,"oddFill",t.Qq],[1,"evenFill",t.Qq],[0,"drawTopLine",t.Dq],[0,"drawRightLine",t.Dq],[0,"drawBottomLine",t.Dq],[0,"drawLeftLine",t.Dq]]),t.U(E,pt),t.g=E.prototype,t.g.ph=function(t){return null!=this.Pa[t]},t.g.ys=function(){return 1},t.g.target=function(e){return t.p(e)?(this.b!=e&&(this.b=e,this.B(512,1)),this):this.b},t.g.background=function(e){return this.Ia||(this.Ia=new t.yu,t.K(this.Ia,this.vg,this)),t.p(e)?(this.Ia.N(e),this):this.Ia},t.g.vg=function(e){t.X(e,1)&&this.B(64,1)},t.g.Tga=function(){this.B(1024,1)},t.g.JF=function(e){return this.P||(this.P=new $,t.K(this.P,this.Tga,this)),t.p(e)?(this.P.N(e),this):this.P},t.g.eia=function(){this.B(2048,1)},t.g.names=function(e){return this.aa||(this.aa=new I,t.K(this.aa,this.eia,this)),t.p(e)?(this.aa.N(e),this):this.aa},t.g.tla=function(){this.B(4096,1)},t.g.KF=function(e){return this.ea||(this.ea=new I,t.K(this.ea,this.tla,this)),t.p(e)?(this.ea.N(e),this):this.ea},t.g.nea=function(){this.B(8192,1)},t.g.CG=function(e){return this.K||(this.K=new I,t.K(this.K,this.nea,this)),t.p(e)?(this.K.N(e),this):this.K},t.g.Uka=function(){this.B(16384,1)},t.g.hz=function(e){return this.ba||(this.ba=new A,t.K(this.ba,this.Uka,this)),t.p(e)?(this.ba.N(e),this):this.ba},t.g.v_=function(e){return t.p(e)?(e=t.Za(t.N(e),0,1),this.Ha!=e&&(this.Ha=e,this.B(128,1)),this):this.Ha},t.g.xR=function(e){return t.p(e)?(this.G.N(e),this.B(32768,1),this):this.G},t.g.Lba=function(){this.B(32768,1)},t.g.$=function(){return this.b?this.b.la.$():null},t.g.u_=function(t){return this.i[t.index]},t.g.g2=function(){return window.NaN},t.g.f2=function(){return window.NaN},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.W=function(){if(!this.zc())return this;var e=this.O(),i=e?e.Ja():null,n=i&&!i.yf();if(n&&i.suspend(),this.Aa||(this.Aa=t.ok(),this.f=this.Aa.Bd(),this.f.zIndex(1),this.Ba=this.f.path(),this.Ba.stroke(null),this.Ba.zIndex(0),this.na=this.f.path(),this.na.stroke(null),this.na.zIndex(0),this.D=this.f.path(),this.D.fill(null),this.D.zIndex(1)),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(e),this.I(2)),this.J(4)&&(this.nl=this.ob(),this.Aa.clip(this.nl),this.B(33216),this.I(4)),this.J(16)&&(this.D.stroke(this.g("stroke")),this.na.fill(this.g("evenFill")),this.Ba.fill(this.g("oddFill")),this.I(16)),this.J(64)&&((e=this.background()).ka(),e.zIndex(0),e.ja(this.nl.clone()),this.enabled()&&e.O(this.Aa),e.da(!1),e.W(),this.I(64)),this.J(32768)&&(this.G.target(this.O().Ja().Tl()),this.G.Qf(this.ob()),this.G.W(),this.I(32768)),this.J(512)){var s=this.$();for(s.Hb()>this.Ub.length&&this.B(31744),s.reset();s.advance();){var a=s.ma();this.Ub[a]?e=this.Ub[a]:((e=this.o.pop())||(e=new O(this)),this.Ub.push(e),e.index=a);var o=G("image",ht,a=s),r=a.get("imageMargin");t.p(r)&&(o.margin=t.Gm(r)),e.ta("imageSettings",o),o=G("name",ut,a),r=a.get("nameMargin"),t.p(r)&&(o.margin=t.Gm(r)),e.ta("nameSettings",o),o=G("type",ut,a),r=a.get("typeMargin"),t.p(r)&&(o.margin=t.Gm(r)),e.ta("typeSettings",o),o=G("description",ut,a),r=a.get("descriptionMargin"),t.p(r)&&(o.margin=t.Gm(r)),e.ta("descriptionSettings",o),o=G("tags",ut,a),r=a.get("tagsMargin"),t.p(r)&&(o.margin=t.Gm(r)),r=a.get("tagsPadding"),t.p(r)&&(o.padding=t.Gm(r)),r=a.get("tagsBackground"),t.p(r)&&(o.background=r),e.ta("tagSettings",o),e.ta("width",this.nl.width),e.ta("height",this.nl.height),e.ta("imageSrc",a.get("image")||""),e.ta("name",a.get("name")||null),e.ta("type",a.get("type")||null),e.ta("description",a.get("description")||null),r=(r=a.get("tags"))?t.A(r)?r.slice():[r]:[],e.ta("tags",r),a=a.get("enabled"),a=!(t.p(a)&&!(0,window.isNaN)(a)&&!a),e.enabled(a).kb(this.hz())}for(e=(e=s.Hb())||0;this.Ub.length!=e;)(s=this.Ub.pop()).ka().enabled(!1).da(!1).W(),this.o.push(s);this.B(256),this.I(512)}if(this.J(31744)){this.hz().background().I(4294967295),a=this.JF().F(),r=this.names().F(),o=this.KF().F();var l=this.CG().F(),h=this.hz().F();for(s=0;s<this.Ub.length;s++)(e=this.Ub[s]).oa.itemSettings=void 0,e.oa.imageSettings=a,e.oa.nameSettings=r,e.oa.typeSettings=o,e.oa.descriptionSettings=l,e.oa.tagSettings=h;this.B(256),this.I(31744)}if(this.J(1024)&&(U(this,"imageSettings",this.JF().F()),this.B(256),this.I(1024)),this.J(2048)&&(U(this,"nameSettings",this.names().F()),this.B(256),this.I(2048)),this.J(4096)&&(U(this,"typeSettings",this.KF().F()),this.B(256),this.I(4096)),this.J(8192)&&(U(this,"descriptionSettings",this.CG().F()),this.B(256),this.I(8192)),this.J(16384)&&(this.hz().background().I(4294967295),U(this,"tagSettings",this.hz().F()),this.B(256),this.I(16384)),this.J(256)){s=t.$b(this.D.stroke()),a=t.R(0,s),r=t.R(this.nl.width-s,s),h=0;var c=!!this.g("drawTopLine"),u=!!this.g("drawRightLine"),d=!!this.g("drawBottomLine"),p=!!this.g("drawLeftLine");o=t.R(h,s);var g=this.Ub.length,f=g-1;for(this.D.clear(),this.na.clear(),this.Ba.clear(),l=0;l<g;l++){var m=l==f;(e=this.Ub[l]).ta("width",this.nl.width),e.ta("height",this.nl.height),e.B(4);var v=h;e.ka().O(this.f).offsetY(v).da(!1).W(),v=e.enabled()?e.f:0,e=t.R(o+v-(l==g-1?s:0),s);var b=p?Math.ceil(a):Math.floor(a),y=u?Math.floor(r):Math.ceil(r),S=c&&!l?Math.ceil(o):Math.floor(o),x=d||!m?Math.floor(e):Math.ceil(e);(1&l?this.na:this.Ba).moveTo(b,S).lineTo(y,S).lineTo(y,x).lineTo(b,x).close(),p&&this.D.moveTo(a,S).lineTo(a,x),u&&this.D.moveTo(r,S).lineTo(r,x),c&&!l&&this.D.moveTo(b,o).lineTo(y,o),!d&&m||this.D.moveTo(b,e).lineTo(y,e),h+=v,o=e}this.Ka=h,this.I(256)}return this.J(128)&&(this.f.oc(1,0,0,1,this.nl.left,Math.round(this.nl.top-this.Ka*this.Ha)),this.I(128)),n&&i.resume(),this},t.g.F=function(){var e=E.u.F.call(this);return t.Tq(this,pt,e,"Resource list"),e.background=this.background().F(),e.images=this.JF().F(),e.names=this.names().F(),e.types=this.KF().F(),e.descriptions=this.CG().F(),e.tags=this.hz().F(),e.overlay=this.xR().F(),e},t.g.U=function(e,i){E.u.U.call(this,e,i),t.Iq(this,pt,e,i),this.background().ga(!!i,e.background),this.JF().ga(!!i,e.images),this.names().ga(!!i,e.names),this.KF().ga(!!i,e.types),this.CG().ga(!!i,e.descriptions),this.hz().ga(!!i,e.tags),this.xR().ga(!!i,e.overlay)},t.g.R=function(){t.sd(this.o),t.sd(this.Ub),t.qd(this.f),this.f=null,t.qd(this.Ia),this.Ia=null,t.qd(this.Aa),this.Aa=null,t.qd(this.Za),this.Za=null,t.qd(this.P),this.P=null,t.qd(this.aa),this.aa=null,t.qd(this.ea),this.ea=null,t.qd(this.K),this.K=null,t.qd(this.ba),this.ba=null,t.qd(this.G),this.G=null,E.u.R.call(this)},t.H(F,E),t.xu(F,E);var gt={};t.rq(gt,0,"rowHeight",t.br),t.rq(gt,0,"minRowHeight",t.br),t.rq(gt,0,"maxRowHeight",t.br),t.U(F,gt),t.g=F.prototype,t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():this.la=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(524288,1)),this):this.la},t.g.dd=function(e){t.X(e,16)&&this.B(512,1)},t.g.$=function(){return this.la?this.la.$():null},t.g.u_=function(e,i){var n=this.g("rowHeight");return t.L(n,i)},t.g.g2=function(e){var i=this.g("minRowHeight");return t.L(i,e)},t.g.f2=function(e){var i=this.g("maxRowHeight");return t.L(i,e)},t.g.F=function(){var t=F.u.F.call(this);return t.data=this.la?this.la.F():null,t},t.g.U=function(t,e){F.u.U.call(this,t,e),this.data(e?t.data:null)},t.g.R=function(){t.qd(this.Yc),this.Yc=null,delete this.la,this.Xf=null,F.u.R.call(this)};var ft=E.prototype;ft.target=ft.target,ft.background=ft.background,ft.images=ft.JF,ft.names=ft.names,ft.types=ft.KF,ft.descriptions=ft.CG,ft.tags=ft.hz,ft.overlay=ft.xR,ft=F.prototype,t.E("anychart.standalones.resourceList",(function(e){var i=new F;return i.U(t.nm("standalones.resourceList"),!0),i.data(e),i})),ft.data=ft.data,ft.draw=ft.W,ft.parentBounds=ft.ja,ft.container=ft.O,ft.verticalScrollBarPosition=ft.v_,t.H(M,t.kt),t.g=M.prototype,t.g.sa=3,t.g.ra=6,t.g.calendar=function(e){return t.p(e)?(this.je!=e&&(this.je&&t.kr(this.je,this.FA,this),(this.je=e)&&t.K(this.je,this.FA,this),this.D={},this.i=null,this.B(1,6)),this):(this.je||(this.je=new h,t.K(this.je,this.FA,this)),this.je)},t.g.aY=function(e){return t.p(e)?(e=!!e,this.o!=e&&(this.o=e,this.D={},this.i=null,this.B(1,6)),this):this.o},t.g.U6=function(e){return t.p(e)?(e=t.Bo(e),this.G!=e&&(this.G=e,this.B(2,6)),this):this.G},t.g.Dg=function(e){return t.p(e)?(e=t.Zk(e,"day",!0),this.f!=e&&(this.f=e,this.B(1,6)),this):this.f},t.g.count=function(e){return t.p(e)?(e=t.P(e),this.b!=e&&(this.b=e,this.B(1,6)),this):this.b},t.g.zP=function(e){return t.p(e)?(e=t.Xk(e),this.K!=e&&(this.K=e,this.B(2,2)),this):this.K},t.g.Ma=function(){return"date-time-with-calendar"},t.g.un=function(e){return _(this),(R(this.i,t.Xk(e))-this.P)*this.G},t.g.Ow=function(t){_(this);var e=this.i;if(t=t/this.G+this.P,e.Dv)e=Math.floor(t*e.Dv+e.b);else{var i,n=t;if(e.xm&&!e.Dv)if(0<=n){if(n=2*Math.ceil(n)+2,e.zn)if(e.Hz)for(;e.xm.length<n;){var s=d(e.je,e.Bk.getTime(),e.zn);if((0,window.isNaN)(s)){e.zn=null;break}e.Bk.setTime(s),e.Bk.add(e.zn),e.xm.push(s,e.Bk.getTime())}else for(i=e.Bk.getTime();e.xm.length<n;)s=i,e.Bk.add(e.zn),i=e.Bk.getTime(),e.xm.push(s,i)}else if(e.rm&&e.Yq)if(n=2*Math.ceil(-n)+2,e.Hz)for(;e.rm.length<n;){if(s=p(e.je,e.$k.getTime()-1,e.Yq),(0,window.isNaN)(s)){e.Yq=null;break}e.$k.setTime(s),e.$k.add(e.LF),e.rm.push(e.$k.getTime(),s),e.$k.setTime(s)}else for(i=e.$k.getTime();e.rm.length<n;)s=i,e.$k.add(e.Yq),i=e.$k.getTime(),e.rm.push(s,i);0>t?(t=-t,n=e.rm):n=e.xm,t-=s=Math.floor(t),s*=2,e=n?n.length>s?Math.floor(n[s]+(t&&(n[s+1]-n[s])*t)):n[n.length-1]:e.b}return e},t.g.Fn=function(e,i,n,s){_(this);var a=[];for(e=t.Uo(this.Ow(e),n||this.f,s||this.b,2e3),i=this.Ow(i),e=new t.On(new Date(e)),n=t.Vo(n||this.f,s||this.b),s=e.getTime();s<i;){var o=s;e.add(n),s=e.getTime();var r=c(this.je,o,s);this.o&&!r||a.push({start:o,end:s,holiday:!r})}return a},t.g.transform=function(){return window.NaN},t.g.Mc=function(){return window.NaN},t.g.sJ=function(){if(this.Pn&&(this.min=t.Uo(this.min,this.f,this.b,2e3)),this.Nn){this.max=t.Uo(this.max,this.f,this.b,2e3);var e=new t.On(new Date(this.max));e.add(t.Vo(this.f,this.b)),this.max=e.getTime()}},t.g.Xc=function(e){for(var i=0;i<arguments.length;i++)M.u.Xc.call(this,t.ps(arguments[i]));return this},t.g.FA=function(e){t.X(e,2)&&(this.D={},this.i=null,this.B(1,2))},t.g.F=function(){var t=M.u.F.call(this);return t.skipHolidays=this.o,t},t.g.U=function(t){M.u.U.call(this,t),this.aY(t.skipHolidays)},t.g.R=function(){t.qd(this.je),this.je=null,M.u.R.call(this)};var mt={millisecond:1};mt.second=1e3*mt.millisecond,mt.minute=60*mt.second,mt.hour=60*mt.minute,mt.day=24*mt.hour,mt.week=7*mt.day;var vt=mt;t.g=N.prototype,t.g.je=null,t.g.Hz=!1,t.g.Bk=null,t.g.$k=null,t.g.Dv=window.NaN,t.g.zn=null,t.g.LF=null,t.g.Yq=null,t.g.xm=null,t.g.rm=null;var bt=M.prototype;bt.dateToPix=bt.un,bt.pixToDate=bt.Ow,bt.calendar=bt.calendar,bt.skipHolidays=bt.aY,bt.unitPixSize=bt.U6,bt.unit=bt.Dg,bt.count=bt.count,bt.startDate=bt.zP,bt.getTicks=bt.Fn,bt.softMinimum=bt.KB,bt.softMaximum=bt.JB,bt.minimumGap=bt.Qs,bt.maximumGap=bt.Os,bt.minimum=bt.uh,bt.maximum=bt.di,t.H(j,t.ux),j.prototype.sa=67104768|t.ux.prototype.sa,j.prototype.Ma=function(){return"resource"},j.prototype.Ue=function(){return[]};var yt,St=(yt={},t.rq(yt,0,"pixPerHour",(function(e){return e=t.N(e),(0,window.isNaN)(e)?this.g("pixPerHour"):e})),t.rq(yt,0,"minRowHeight",(function(e){return e=t.N(e),(0,window.isNaN)(e)?this.g("minRowHeight"):e})),t.rq(yt,0,"resourceListWidth",(function(e){return null===(e=t.yo(e))?this.g("resourceListWidth"):e})),t.rq(yt,0,"timeLineHeight",(function(e){return null===(e=t.yo(e))?this.g("timeLineHeight"):e})),t.rq(yt,0,"defaultMinutesPerDay",(function(e){return t.P(e,60)})),t.rq(yt,0,"currentStartDate",(function(e){return(e=t.ps(e))?e.getTime():this.g("currentStartDate")})),t.rq(yt,1,"splitterStroke",t.Pq),yt);t.U(j,St),t.g=j.prototype,t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():this.la=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(524544,1)),this):this.la},t.g.Ra=function(e){return t.p(e)?(this.eb.N(e),this):this.eb},t.g.vY=function(e){if(t.p(e)){var i=t.zk(q,e,"activity-per-resource");return e="availability-per-chart"==i||"activity-per-chart"==i,i="availability-per-chart"==i||"availability-per-resource"==i,this.Od==e&&this.Hd==i||(this.Od=e,this.Hd=i,this.B(524288,1)),this}return this.Od?this.Hd?"availability-per-chart":"activity-per-chart":this.Hd?"availability-per-resource":"activity-per-resource"},t.g.Bba=function(e,i,n,s){return t.p(e)?(this.Za.N.apply(this.Za,arguments),this):this.Za},t.g.Az=function(e){return t.p(e)?(this.Uc.N(e),this):this.Uc},t.g.uS=function(e){return t.p(e)?(this.na.N(e),this):this.na},t.g.calendar=function(e){return t.p(e)?(this.je.N(e),this):this.je},t.g.gla=function(e){return t.p(e)?(this.ea.N(e),this):this.ea},t.g.uha=function(e){return t.p(e)?(this.fb.N(e),this):this.fb},t.g.r_=function(e){return t.p(e)?(this.f.N(e),this):this.f},t.g.tq=function(e){return t.p(e)?(this.D.N(e),this):this.D},t.g.vx=function(e){return t.p(e)?(this.o.N(e),this):this.o},t.g.vz=function(e){if(t.p(e)){if(t.A(e)){for(var i=[],n=0;n<e.length;n++){var s=e[n],a=s.levels;if(t.A(a)&&a.length){for(var o=[],r=0;r<a.length;r++){var l=t.Qc(a[r]);l.unit=t.Zk(l.unit,"day",!0),l.count=t.P(l.count),o.push(l)}s={id:s.id?String(s.id):void 0,unit:t.Zk(s.unit,o[0].unit,!0),count:t.P(s.count,o[0].count,!1),unitPixSize:t.N(s.unitPixSize)||50,levels:o}}else s=null;s&&i.push(s)}i.length&&(this.me=i,this.bK(this.bK()))}return this}return t.Sl(this.me)},t.g.bK=function(e){if(t.p(e)){var i=window.NaN;if(t.z(e))for(var n=0;n<this.me.length;n++){var s=this.me[n];if(s.id==e){i=n;break}}return(0,window.isNaN)(i)&&(i=t.P(e,0,!0)),(s=this.me[i])&&(this.Dk=i,e=s,this.ka(),this.eb.Dg(e.unit),this.eb.count(e.count),this.eb.U6(e.unitPixSize),this.ea.MX(e.levels),this.da(!0)),this}return(s=this.me[this.Dk])&&s.id?s.id:this.Dk},t.g.Eba=function(e){return t.p(e)?(this.Ka.N(e),this.B(8388608,1),this):this.Ka},t.g.aka=function(e){return t.p(e)?(this.G.N(e),this.B(8388608,1),this):this.G},t.g.dd=function(e){t.X(e,16)&&this.B(256,1)},t.g.Dba=function(e){var i=0;t.X(e,4)&&(i|=393216),t.X(e,2)&&(i|=90112),this.B(i,1)},t.g.Ega=function(){this.B(4096,1)},t.g.Fga=function(){this.B(8192,1)},t.g.xga=function(){this.B(4194304,1)},t.g.uga=function(){this.B(65536,1)},t.g.Kga=function(){this.B(16384,1)},t.g.Mga=function(){this.B(32768,1)},t.g.Fba=function(){this.B(8388608,1)},t.g.jga=function(){this.B(524288,1)},t.g.dga=function(){this.B(2097152,1)},t.g.lga=function(e){var i=33554432;t.X(e,2)&&(i|=4),this.B(i,1)},t.g.Jga=function(t){return this.ta("currentStartDate",this.eb.Ow(t.startRatio*this.$a-this.sb)),this.B(262144,1),!1},t.g.Lga=function(t){return this.Ba=t.startRatio,this.B(1048576,1),!1},t.g.Cba=function(e){var i=e.deltaX,n=e.deltaY,s=!1;t.RC?(i*=15,n*=15):i&&(s=!0),i=-this.sb-i,n=-this.Ba*this.b-n,i=-t.Za(i,-this.$a+this.kg.width,0),n=-t.Za(n,-this.b+this.kg.height,0),i=this.eb.Ow(i-this.sb),n/=this.b,this.ka(),i!=this.g("currentStartDate")&&(this.ta("currentStartDate",i),this.B(262144,1)),n!=this.Ba&&(s=!0,this.Ba=n,this.B(1048576,1)),s&&e.preventDefault(),this.da(!0)},t.g.wr=function(t){this.mf=new B(this,this.Ha,this.Oj),this.mf.lk(t.kf)},t.g.s_=function(){if(!this.bz){var e,i=this.O();i&&(e=i.Ja())?(this.bz=!0,this.aa=new t.Ex(e.Tl()),this.wc.wa(this.aa,"mousewheel",this.Cba)):this.yo||(this.yo=(0,t.pa)(this.s_,this),(0,window.setTimeout)(this.yo,0))}},t.g.$=function(){return this.Ys||(this.Ys=new H(this)),this.Ys},t.g.Ec=function(){return this.$().reset()},t.g.pb=function(){if(this.J(524288)){this.eb.Bg();var e=this.la.$();e.reset();for(var i,n=0,s=0;e.advance();){(i=this.ba[n])?i.B(1):this.ba[n]=i=new w(this,n);var a=i,o=this.eb;a.pb();for(var r=0;r<a.b.length;r++)for(var l=a.b[r].Xm,h=0;h<l.length;h++){var c=l[h];o.Xc(c.start,c.end)}s=Math.max(s,T(i)),n++}for(n=e.Hb();n<this.ba.length;n++)t.qd(this.ba[n]);for(this.ba.length=e.Hb(),this.eb.Hg(),this.dn=s,this.i=[],this.Ap=[],this.b=0,e=this.P.length=0,a=this.na.g("height"),n=0;n<this.ba.length;n++)i=this.ba[n],o=this.Od?s:T(i),o=Math.max(this.g("pixPerHour")*o/60,this.g("minRowHeight")),o=this.Za.$j(o),i.o&&(o+=a+1),this.b+=o,this.i.push(o),this.Ap.push(this.b),e+=i.b.length,this.P.push(e);this.G.i=this.i,this.G.B(512),this.B(1179648),this.I(524288)}},t.g.aG=function(e){e=j.u.aG.call(this,e),e=t.Xo(e,0);var i=this.g("splitterStroke");i=i?t.$b(i):0;var n=t.L(this.g("timeLineHeight"),e.height),s=t.L(this.g("resourceListWidth"),e.width),a=t.R(e.top+n,0),o=t.R(e.left+s+i,0);return n=a-e.top,s=o-e.left-i,this.qc.top=e.top,this.qc.left=o,this.qc.width=e.left+e.width-o,this.qc.height=n,this.Sb.left=e.left,this.Sb.top=a,this.Sb.width=s,this.Sb.height=e.top+e.height-a,this.ud.top=e.top,this.ud.left=e.left,this.ud.width=s,this.ud.height=n,e.left=o,e.top=a,e.width=this.qc.width,e.height=this.Sb.height,e},t.g.Qh=function(e){if(this.pb(),!this.pf()){if(t.xr(this.D,this.o,this.ea,this.G,this.f,this.na),this.Ha||(this.Ha=this.Na.Bd(),this.Ha.zIndex(3),this.wc.Ce(this.Ha,"mousedown",this.wr),this.wc.Ce(this.Ha,"touchstart",this.wr),this.nf=t.tk(),this.Ha.clip(this.nf),this.Oj=this.Ha.rect(),this.Oj.zIndex(-1),this.Oj.fill(t.bm),this.Oj.stroke(null),this.ec=new t.dC((function(){return t.qk()}),(function(t){t.clear()})),this.ec.parent(this.Ha),this.ec.zIndex(3),this.Bu=this.Na.path(),this.Bu.zIndex(3)),this.s_(),this.J(393220)&&(this.nf.shape(e),this.Oj.Qf(e),this.B(66449408)),this.J(131072)){(0,window.isNaN)(this.g("currentStartDate"))&&(this.ta("currentStartDate",this.eb.uh()),this.eb.zP(this.g("currentStartDate")));var i=this.eb.un(this.eb.uh()),n=this.eb.un(this.eb.di());this.$a=n-i;var s=this.eb.un(this.g("currentStartDate"));(0,window.isNaN)(s)&&(s=i);var a=s+e.width;a>n&&(e.width<this.$a?s=n-e.width:(s=i,a=i+this.$a)),this.ta("currentStartDate",this.eb.Ow(s)),this.I(131072)}if(this.J(262144)&&(this.eb.zP(this.g("currentStartDate")),this.sb=-this.eb.un(this.eb.uh()),t.IB(this.D,this.sb/this.$a,(this.sb+e.width)/this.$a)),this.J(1048576)&&((a=(s=this.Ba*this.b)+e.height)>this.b&&(e.height<this.b?s=(a=this.b)-e.height:(s=0,a=this.b)),this.Ba=s/this.b||0,this.G.v_(this.Ba),function(e,i){t.p(i)&&(e.Ka=i,e.B(256,1))}(this.f,this.Ba),t.IB(this.o,this.Ba,a/this.b||0),this.B(35753984)),this.J(1310720)&&(this.D.ja(e),this.o.ja(this.D.yd()),s=this.o.yd(),this.yg=s.clone(),this.yg.height=e.height,this.bj=s.clone(),this.bj.width=e.width,this.I(1310720)),this.J(16384)&&(this.D.O(this.Na),this.D.ja(this.yg),this.D.W(),this.I(16384)),this.J(32768)&&(this.o.O(this.Na),this.o.ja(this.bj),this.o.W(),this.I(32768)),this.J(4194304)&&(this.fb.O(this.Na),this.fb.ja(this.ud),this.fb.W(),this.I(4194304)),this.J(8192)&&(this.ea.Ra(this.Ra()),this.ea.O(this.Na),this.ea.ja(this.qc),this.ea.W(),this.I(8192)),this.J(16777216)&&(a=(s=this.g("splitterStroke"))?t.$b(s):0,a=t.R(this.Sb.cb()+a/2,a),this.Bu.clear().moveTo(a,this.qc.top).lineTo(a,e.Va()).stroke(s),this.I(16777216)),this.J(8388608)&&(this.Ka.target(this.O().Ja().Tl()),this.Ka.Qf(this.ob()),this.Ka.W(),this.I(8388608)),this.J(4096)&&(this.G.ja(this.Sb),this.G.O(this.Na),this.G.W(),this.I(4096)),this.J(65536)&&(this.f.Ra(this.Ra()),this.f.O(this.Ha),this.f.ja(e),function(e,i){t.p(i)&&(e.i=i,e.B(128,1))}(this.f,this.i),this.f.W(),this.I(65536)),this.J(35651584)){s=t.$b(this.f.g("horizontalStroke")),a=e.clone(),i=this.eb.Ow(0),n=this.eb.Ow(e.width);var o=t.R(Math.round(e.top-this.Ba*this.b),s);this.ec.clear(),this.na.clear(),this.Uc.oE(this.Ha,e),this.bg.length=0;for(var r={TM:0,h5:this.bg},l=t.$b(this.f.g("verticalStroke")),h=0;h<this.ba.length;h++){var c=this.i[h],u=o;o=t.R(o+c,s);var d=t.L(this.Za.g("top"),c);c=t.L(this.Za.g("bottom"),c),a.top=u+s/2+d,a.height=o-s/2-c-a.top,r=this.ba[h].W(r,i,n,this.ec,a.clone(),l)}this.Uc.wi(),this.na.O(this.Ha),this.na.ja(e),this.na.W(),this.I(35651584)}t.zr(this.D,this.o,this.ea,this.G,this.f,this.na)}},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.ej=function(e){return t.p(e)?((e=t.Bk(e))!=this.fh&&(this.fh=e),this):this.fh},t.g.aj=function(){return!0},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.ce=function(){return null},t.g.ml=function(e){var i=this.$(),n=+i.b;i=i.o;var s=t.$b(this.f.g("verticalStroke"));C(this.ba[n],i,e,this.ec,s)},t.g.pk=function(e,i){var n=this.$(),s=+n.b;n=n.o;var a=t.$b(this.f.g("verticalStroke"));return C(this.ba[s],n,e,this.ec,a),i},t.g.wm=t.ia,t.g.pq=t.ia,t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget);return i=t.N(i.index),(0,window.isNaN)(i)||(e.pointIndex=i),e},t.g.Tg=function(e){var i=e.type;switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":i="pointmousemove";break;case"mousedown":i="pointmousedown";break;case"mouseup":i="pointmouseup";break;case"click":case"touchstart":i="pointclick";break;case"dblclick":i="pointdblclick";break;default:return null}var n=window.NaN;"pointIndex"in e?n=t.N(e.pointIndex):("labelIndex"in e?n=e.labelIndex:"markerIndex"in e&&(n=e.markerIndex),n=this.bg[t.N(n)]),e.pointIndex=n;var s=this.$();if(s.select(n)){var a=+s.b;s=s.o;var o=this.ba[a].b[s]||null}else a=s=window.NaN,o=null;return{type:i,actualTarget:e.target,target:this,originalEvent:e,resourceIndex:a,activityIndex:s,pointIndex:n,data:o.data,chart:this}},t.g.Tj=function(t,e){return this.$i((this.P[t-1]||0)+e),this},t.g.$i=function(e){return this.Md(),t.qx(this.state,e),this},t.g.Md=function(e,i){this.state.Vh(t.vo,t.p(e)?(this.P[+e-1]||0)+ +i:window.NaN)},t.g.select=function(t,e){return this.Ii((this.P[t-1]||0)+e),this},t.g.Ii=function(e,i){return this.state.Lh(t.wo,e,i&&i.shiftKey?void 0:t.vo),this},t.g.ie=function(e,i){this.state.Vh(t.wo,t.p(e)?(this.P[+e-1]||0)+ +i:window.NaN)},t.g.Uu=function(){return!0},t.g.Rk=function(){this.Qu||(this.Qu=new t.Fw);var e=this.$(),i=+e.b,n=e.o,s=(this.ba[i]||null).b[n]||null;(e=this.la.$()).select(i);for(var a=window.Infinity,o=-window.Infinity,r=[],l=0;l<s.Xm.length;l++){var h=s.Xm[l];a=Math.min(a,h.start),o=Math.max(o,h.end),r.push({start:h.start,end:h.end,minutesPerDay:h.Ny})}return i={chart:{value:this,type:""},resourceIndex:{value:i,type:"number"},activityIndex:{value:n,type:"number"},activity:{value:s.data,type:""},name:{value:s.data.name,type:"string"},intervals:{value:r,type:""},start:{value:a,type:"number"},end:{value:o,type:"number"},minutesPerDay:{value:1==r.length?r[0].minutesPerDay:window.NaN,type:"number"}},a={"%start":{value:new Date(a),type:"date-time"},"%end":{value:new Date(o),type:"date-time"}},this.Qu.Li([this]).lg(e).Dl(a),t.ov(this.Qu,i)},t.g.yj=function(){return!this.la.$().Hb()},t.g.F=function(){var e=j.u.F.call(this);return e.data=this.la?this.la.F():null,e.zoomLevels=this.vz(),e.zoomLevel=this.bK(),e.timeLine=this.ea.F(),e.calendar=this.je.F(),e.xScale=this.eb.F(),e.resourceList=this.G.F(),e.horizontalScrollBar=this.D.F(),e.verticalScrollBar=this.o.F(),e.grid=this.f.F(),e.timeTrackingMode=this.vY(),e.overlay=this.Ka.F(),e.cellPadding=this.Za.F(),e.conflicts=this.na.F(),t.Tq(this,St,e),{chart:e}},t.g.U=function(e,i){j.u.U.call(this,e),"cellPadding"in e&&this.Za.N(e.cellPadding),this.Uc.ga(!!i,e.activities),this.data(e.data),this.fb.ga(!!i,e.logo),this.Ka.ga(!!i,e.overlay),this.ea.ga(!!i,e.timeLine),this.je.N(e.calendar),this.eb.N(e.xScale),this.G.N(e.resourceList),this.D.N(e.horizontalScrollBar),this.o.N(e.verticalScrollBar),this.f.N(e.grid),this.vz(e.zoomLevels),this.bK(e.zoomLevel),this.vY(e.timeTrackingMode),this.uS(e.conflicts),t.Iq(this,St,e)},t.g.R=function(){t.sd(this.mf,this.Oj,this.Yc,this.ea,this.fb,this.G,this.D,this.o,this.f,this.ba,this.je,this.eb,this.Ka,this.na),delete this.la,this.mf=this.Oj=this.Yc=this.Xf=this.ea=this.fb=this.G=this.D=this.o=this.f=this.ba=this.je=this.eb=this.Ka=this.na=null,j.u.R.call(this)},t.H(B,t.ag),B.prototype.ba=function(){return!0},B.prototype.i=function(){t.p(this.Qj)&&(t.ll.cancelAnimationFrame(this.Qj),this.rs(0))},B.prototype.ar=function(){var t=this.b.zd();this.deltaX=-this.pa.sb,this.f.left=-this.pa.$a+t,this.f.width=this.pa.$a-t,t=this.b.qd(),this.deltaY=-this.pa.Ba*this.pa.b,this.f.top=-this.pa.b+t,this.f.height=this.pa.b-t},B.prototype.ls=function(e,i){this.ea=-e,this.Ha=-i,t.p(this.Qj)&&t.ll.cancelAnimationFrame(this.Qj),this.Qj=t.ll.requestAnimationFrame(this.rs)},t.H(H,t.Br),t.g=H.prototype,t.g.reset=function(){return this.b=0,this.o=this.i=-1,this},t.g.select=function(e){this.i=e;var i=t.Na(this.pa.P,e);if(0>i)this.b=~i;else{for(;this.pa.P[++i]==e;);this.b=i}return this.o=this.i-(this.pa.P[this.b-1]||0),this.b<this.pa.P.length},t.g.advance=function(){this.i++;for(var t,e=this.pa.P.length,i=window.NaN;this.b<e&&this.i>=(t=this.pa.P[this.b]);)i=t,this.b++;return(0,window.isNaN)(i)&&(i=this.pa.P[this.b-1]||0),this.o=this.i-i,this.b<e},t.g.ma=function(){return this.i},t.g.Hb=function(){return this.pa.P[this.pa.P.length-1]||0},t.g.get=function(){throw"Cannot use get on ActivityIterator"},t.g.j=function(){throw"Cannot use meta on ActivityIterator"},j.prototype.ts=function(){return[this]},j.prototype.Zj=function(e,i){var n=t.Ax(this);return t.kp(n.headers,n.data,i)};var xt=j.prototype;xt.getType=xt.Ma,xt.data=xt.data,xt.timeTrackingMode=xt.vY,xt.cellPadding=xt.Bba,xt.zoomLevels=xt.vz,xt.zoomLevel=xt.bK,xt.xScale=xt.Ra,xt.horizontalScrollBar=xt.tq,xt.verticalScrollBar=xt.vx,xt.grid=xt.r_,xt.logo=xt.uha,xt.timeLine=xt.gla,xt.calendar=xt.calendar,xt.overlay=xt.Eba,xt.activities=xt.Az,xt.conflicts=xt.uS,xt.resourceList=xt.aka,xt.hover=xt.Tj,xt.hoverPoint=xt.$i,xt.unhover=xt.Md,xt.select=xt.select,xt.selectPoint=xt.Ii,xt.unselect=xt.ie,xt.noData=xt.Gm,t.Tp.resource=z,t.E("anychart.resource",z)}.call(this,$)),_.bullet||(_.bullet=1,function(t){var e=function(e,i){return t.zk(t.Pk,e,i||"bar")},i=function(){t.Y.call(this),this.Ga("defaultRangeMarkerSettings"),this.b=null,t.T(this.ua,[["type",4,9],["value",4,9],["layout",4,9],["fill",16,1],["stroke",16,1]])},n=function(i,n){t.p(n)&&(n=e(n,i.vf("type")),i.vf("type")!=n&&(i.oa.type=n,t.p(i.nd("type"))||i.B(4,9)))},s=function(e,i){t.ux.call(this),this.Ga("bullet"),this.jd=[],this.Bc=[],this.Ax=!0,this.data(e||null,i),t.tq(this.ua,"layout",114820,9)},a=function(e,s){var a=s.ma(),o=new i;o.Ga(e.vf("defaultMarkerSettings")),o.ka(),e.Bc[a]=o,o.scale(e.scale()),o.O(e.Na),n(o,e.Nf().nc(a)),o.value(s.get("value")),o.type(s.get("type")),o.mq(s.get("gap")),o.fill(s.get("fill")),o.stroke(s.get("stroke")),o.da(!1),t.K(o,e.naa,e)},o=function(t,e){return new s(t,e)};t.H(i,t.Y);var r={};t.sq(r,[[0,"type",e],[0,"value",t.N],[0,"layout",t.Gk],[1,"fill",t.Qq],[1,"stroke",t.Pq]]),t.U(i,r);var l={x:"30%",line:"30%",ellipse:"30%",bar:"50%"};t.g=i.prototype,t.g.ra=t.Y.prototype.ra,t.g.sa=20|t.Y.prototype.sa,t.g.mq=function(e){return t.p(e)?(this.b!=e&&(this.b=e,this.B(4,9)),this):null===this.b?l[this.g("type")]:this.b},t.g.Nb=function(){return"horizontal"==this.g("layout")},t.g.scale=function(e){if(t.p(e)){if(e=t.jt(this.qa,e,null,3,null,this.dja,this)){var i=this.qa==e;this.qa=e,e.da(i),i||this.B(4,9)}return this}return this.qa},t.g.dja=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(4,8|i)},t.g.W=function(){if(!this.scale())return t.il(2),this;if(!this.zc())return this;var e=this.O()?this.O().Ja():null,i=e&&!e.yf();if(i&&e.suspend(),this.Sc||(this.Sc=t.qk()),this.J(8)){var n=this.zIndex();this.Sc.zIndex(n),this.I(8)}return this.J(2)&&(n=this.O(),this.Sc.parent(n),this.I(2)),this.J(16)&&(this.Sc.stroke(this.g("stroke")),this.Sc.fill(this.g("fill")),this.I(16)),this.J(4)&&(n=this.g("value"),n=this.scale().transform(n,0),this.Sc.clear(),(0,window.isNaN)(n)||(n=t.Za(n,0,1),function(e,i){if("horizontal"==e)switch(i){default:case"bar":return function(e,i){var n=this.scale().transform(0);n=(0,window.isNaN)(n)?0:t.Za(n,0,1);var s=this.ja(),a=this.mq(),o=t.uo(a)?t.L(a,s.height):s.height*a;a=s.left+n*s.width;var r=s.top+o/2;n=(i-n)*s.width,s=s.height-o,e.clear().moveTo(a,r).lineTo(a+n,r).lineTo(a+n,r+s).lineTo(a,r+s).close()};case"line":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width*i),o=Math.round(n.top+n.height/2);n=n.height-(t.uo(s)?t.L(s,n.height):n.height*s),e.clear().moveTo(a-1,o-n/2).lineTo(a-1,o+n/2).lineTo(a+1,o+n/2).lineTo(a+1,o-n/2).close()};case"ellipse":return function(e,i){var n=this.ja(),s=this.mq(),a=n.left+n.width*i,o=n.top+n.height/2;s=(n=(n.height-(t.uo(s)?t.L(s,n.height):n.height*s))/2)/4,e.clear(),e.Fe(a,o,s,n,0,360).close()};case"x":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width*i),o=Math.round(n.top+n.height/2);s=(n=(n.height-(t.uo(s)?t.L(s,n.height):n.height*s))/2)/1.5,e.clear().moveTo(a-s-1,o-n).lineTo(a+s-1,o+n).lineTo(a+s+1,o+n).lineTo(a-s+1,o-n).moveTo(a+s-1,o-n).lineTo(a-s-1,o+n).lineTo(a-s+1,o+n).lineTo(a+s+1,o-n).close()}}else switch(i){default:case"bar":return function(e,i){var n=this.scale().transform(0);n=(0,window.isNaN)(n)?0:t.Za(n,0,1);var s=this.ja(),a=this.mq(),o=t.uo(a)?t.L(a,s.width):s.width*a;a=s.left+o/2;var r=s.Va()-s.height*i;o=s.width-o,n=(i-n)*s.height,e.clear().moveTo(a-.25,r-.5).lineTo(a+o+.25,r-.5).lineTo(a+o+.25,r+n-.5).lineTo(a-.25,r+n-.5).close()};case"line":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width/2),o=Math.round(n.Va()-n.height*i);n=n.width-(t.uo(s)?t.L(s,n.width):n.width*s),e.clear().moveTo(a-n/2,o-1).lineTo(a+n/2,o-1).lineTo(a+n/2,o+1).lineTo(a-n/2,o+1).close()};case"ellipse":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width/2),o=Math.round(n.Va()-n.height*i);s=(n=(n.width-(t.uo(s)?t.L(s,n.width):n.width*s))/2)/4,e.clear(),e.Fe(a,o,n,s,0,360).close()};case"x":return function(e,i){var n=this.ja(),s=this.mq(),a=Math.round(n.left+n.width/2),o=Math.round(n.Va()-n.height*i);s=(n=(n.width-(t.uo(s)?t.L(s,n.width):n.width*s))/2)/1.5,e.clear().moveTo(a-n-1,o-s).lineTo(a+n-1,o+s).lineTo(a+n+1,o+s).lineTo(a-n+1,o-s).moveTo(a+n-1,o-s).lineTo(a-n-1,o+s).lineTo(a-n+1,o+s).lineTo(a+n+1,o-s).close()}}}(this.g("layout"),this.g("type")).call(this,this.Sc,n)),this.I(4)),i&&e.resume(),this},t.g.remove=function(){this.Sc&&this.Sc.parent(null)},t.g.R=function(){t.qd(this.Sc),this.Sc=null,i.u.R.call(this)},t.H(s,t.ux),s.prototype.sa=126976|t.ux.prototype.sa,s.prototype.Ma=function(){return"bullet"},s.prototype.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.J(e,t.Cr)?this.la=e.Ui():t.J(e,t.Mr)?this.la=e.Yd():(e=t.A(e)||t.z(e)?e:null,this.la=new t.Mr(e,i).Yd()),t.K(this.la,this.dd,this),this.B(127232,1)),this):this.la},s.prototype.dd=function(e){t.X(e,16)&&this.B(127232,1)};var h={};t.rq(h,0,"layout",t.Gk),t.U(s,h),t.g=s.prototype,t.g.Nb=function(){return"horizontal"==this.g("layout")},t.g.scale=function(e){if(!this.qa&&!t.p(e)){var i=this.vf("scale");this.qa=t.jt(this.qa,i,"linear",3),this.qa.da(!1)}return t.p(e)?((e=t.jt(this.qa,e,"linear",3))&&(this.qa=e,e.da(!1),this.B(122880,1)),this):this.qa},t.g.axis=function(e){return this.b||(this.b=new t.Sy,this.b.kb(this),t.K(this.b,this.xo,this),t.W(this,"axis",this.b),this.B(114692,9)),t.p(e)?(this.b.N(e),this):this.b},t.g.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=16384,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.xe=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var a=this.jd[n];return a||((a=new t.cA).Ga(this.vf("defaultRangeMarkerSettings")),this.jd[n]=a,t.K(a,this.aja,this),this.B(32768,1)),t.p(s)?(a.N(s),this):a},t.g.aja=function(){this.B(32768,1)},t.g.IO=function(e){return this.f||(this.f=new t.Gs,t.K(this.f,this.$ia,this),t.W(this,"rangePalette",this.f),this.f.Gp(!1)),t.p(e)?(this.f.N(e),this):this.f},t.g.$ia=function(e){t.X(e,2)&&this.B(32768,1)},t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.K(this.He,this.Zia,this),t.W(this,"markerPalette",this.He)),t.p(e)?(this.He.N(e),this):this.He},t.g.Zia=function(e){t.X(e,2)&&this.B(65536,1)},t.g.pb=function(){var t,e=this.scale();e.Of()&&e.Bg();var i=0;for(t=this.Bc.length;i<t;i++){var n=this.Bc[i];null!=n&&(n.scale(e),"bar"==n.g("type")&&e.Xc(0),e.Xc(n.g("value")))}for(i=0,t=this.jd.length;i<t;i++)null!=(n=this.jd[i])&&(n.scale(e),e.Xc(n.g("from")),e.Xc(n.g("to"))),e.Of()&&e.Hg();this.axis().scale(this.scale())},t.g.Lj=function(){var e=this.Nb(),i=this.title(),n=this.axis();return e?(t.Ty(n,"bottom"),t.dw(i,"left")):(t.Ty(n,"left"),t.dw(i,"bottom")),s.u.Lj.call(this)},t.g.Qh=function(e){if(this.zc()){this.J(4096)&&(function(e){(0,t.Pe)(e.Bc,(function(e){t.qd(e)})),e.Bc.length=0;var i=e.la.$().reset();for(i.Hb();i.advance();)a(e,i)}(this),this.I(4096)),this.J(8192)&&(this.pb(),this.I(8192));var i=this.axis();this.J(16388)&&(i.ka(),!i.O()&&i.enabled()&&i.O(this.Na),i.ja(e),i.padding(0),i.da(!1),i.W(),this.I(16384));var s=i.enabled()?i.yd():e;if(this.J(32772)){for(e=0,i=this.jd.length;e<i;e++){var o=this.jd[e];if(o){o.ka(),t.dA(o,this.Nb()?"vertical":"horizontal");var r=o,l=this.IO().nc(e);(l=t.Ub(l))!=r.vf("fill")&&(t.Hq(r.oa,t.ZG,{fill:l}),r.B(16,1)),o.ja(s),o.O(this.Na),o.Qp(0),o.W(),o.da(!1)}}this.I(32768)}if(this.J(65540)){for(e=0,i=this.Bc.length;e<i;e++)(o=this.Bc[e]).ka(),o.ja(s),n(o,this.Nf().nc(e)),r=o,l=this.g("layout"),t.p(l)&&(l=t.Gk(l,r.vf("layout")),r.vf("layout")!=l&&(r.oa.layout=l,t.p(r.nd("layout"))||r.B(4,9))),o.W(),o.da(!1);this.I(65536)}}},t.g.naa=function(){this.B(65536,1)},t.g.Tg=function(e){var i;"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i;var n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}var s=this.data().$();return s.select(i)||s.reset(),{type:n,actualTarget:e.target,pie:this,iterator:s,sliceIndex:i,pointIndex:i,target:this,originalEvent:e}},t.g.Ii=function(){return this},t.g.$i=function(){return this},t.g.Ue=function(){return[this]},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.yj=function(){for(var t=this.la?this.la.$().Hb():0,e=0,i=this.Bc.length,n=0;n<i;n++){var s=this.Bc[n];if(!s||s.enabled())break;e++}return!t||!i||e==i},t.g.F=function(){var e=s.u.F.call(this);t.Tq(this,h,e),e.data=this.data().F(),e.rangePalette=this.IO().F(),e.markerPalette=this.Nf().F(),e.scale=this.scale().F(),e.axis=this.axis().F();for(var i=[],n=0;n<this.jd.length;n++)i.push(this.jd[n].F());return e.ranges=i,{chart:e}},t.g.U=function(e,i){s.u.U.call(this,e,i),this.data(e.data),t.Iq(this,h,e),this.IO().ga(!!i,e.rangePalette),this.Nf().ga(!!i,e.markerPalette);var n=e.scale;if(t.z(n))var a=t.dt(n,null);else t.C(n)?(a=t.dt(n.type,!1)).N(n):a=null;if(a&&this.scale(a),this.axis(e.axis),n=e.ranges,t.A(n))for(a=0;a<n.length;a++)this.xe(a,n[a])},t.g.R=function(){t.sd(this.jd,this.Bc,this.b,this.f,this.He),this.jd.length=0,this.Bc.length=0,this.He=this.f=this.b=null,s.u.R.call(this)};var c=s.prototype;c.data=c.data,c.rangePalette=c.IO,c.markerPalette=c.Nf,c.scale=c.scale,c.axis=c.axis,c.range=c.xe,c.isHorizontal=c.Nb,c.getType=c.Ma,c.noData=c.Gm,t.Tp.bullet=o,t.E("anychart.bullet",o)}.call(this,$)),_.tag_cloud_part||(_.tag_cloud_part=1,function(t){var e=function(e){var i=new t.uh;return i.parent(e),i},i=function(t,e){t.bo=e,t.bo.push("#000"),t.eW=!!e,t.reset()},n=function(e,i){t.Bx.call(this),this.Ga("tagCloud"),this.Hr=["x","value"],this.ea="category",this.Ka=this.P=window.NaN;var n=[t.Z.u8,t.Z.m$],s={};t.T(s,[["fill",16,1],["stroke",16,1],["fontFamily",16388,1],["fontStyle",16388,1],["fontVariant",16388,1],["fontWeight",16388,1],["fontSize",16388,1]]);var a={};t.T(a,[["fill",0,0],["stroke",0,0],["fontFamily",0,0],["fontStyle",0,0],["fontVariant",0,0],["fontWeight",0,0],["fontSize",0,0]]),this.ca=new t.my(this,s,t.gm,n),this.za=new t.my(this,a,t.vo,n),this.Ea=new t.my(this,a,t.wo,n),this.ca.Ga(this.oa),t.W(this,"normal",this.ca),t.W(this,"hovered",this.za),t.W(this,"selected",this.Ea),this.state=new t.ix(this),this.data(e||null,i),t.T(this.ua,[["mode",4,1],["fromAngle",8192,1],["toAngle",8192,1],["anglesCount",8192,1],["textSpacing",4,1]]),this.Ua()},s=function(e,i){t.z(i)?(e.Cd("fill",i),e.Cd("fill-opacity",1)):(e.Cd("fill",i.color),e.Cd("fill-opacity",i.opacity))},a=function(e,i){t.z(i)?(e.Cd("stroke",i),e.Cd("stroke-opacity",1),e.Cd("stroke-width",1)):(e.Cd("stroke",i.color),e.Cd("stroke-opacity",i.opacity||1),e.Cd("stroke-width",i.thickness||1))},o=function(e,i,n){if(n!=t.gm){var s=n==t.vo?e.za:e.Ea;s=s.g(i);var a=t.uo(s);if(null!=s&&!t.D(s)&&!a)return s}var o=e.$().j("item");n=e.ca.g(i);var r=t.uo(n);if(null==n||r){switch(i){case"fontFamily":var l=o.font;break;case"fill":l=o.fill;break;case"stroke":l=o.stroke;break;case"fontStyle":l=o.style;break;case"fontVariant":l=o.variant;break;case"fontWeight":l=o.weight;break;case"fontSize":l=o.size}n=l}else t.D(n)&&("fill"==i||"stroke"==i?l=e.Ge():(l=e.Ic()).sourceValue=n,n=n.call(l,l));return s?a?n*(0,window.parseFloat)(s)/100:("fill"==i||"stroke"==i?l=e.Ge(n):(l=e.Ic()).sourceValue=n,s.call(l,l)):n},r=function(e,i,n,s,a){if(!n.TE){var o=i.context,r=i.ratio;o.clearRect(0,0,2048/r,2048/r);var l=i=0,h=0,c=s.length;--a;for(var u=e.g("textSpacing");++a<c;){n=s[a],o.save(),e="","normal"!=n.style&&(e+=n.style+" "),"normal"!=n.weight&&(e+=n.weight+" "),"normal"!=n.variant&&(e+=n.variant+" "),o.font=e+~~((n.size+1)/r)+"px "+n.font,e=o.measureText(n.text).width*r;var d=n.size<<1;if(n.rotate){var p=Math.sin(t.bb(n.rotate)),g=Math.cos(t.bb(n.rotate)),f=e*g,m=e*p;g*=d,e=d*p,e=Math.max(Math.abs(f+e),Math.abs(f-e))+31>>5<<5,d=~~Math.max(Math.abs(m+g),Math.abs(m-g))}else e=e+31>>5<<5;if(d>h&&(h=d),2048<=i+e&&(i=0,l+=h,h=0),2048<=l+d)break;o.translate((i+(e>>1))/r,(l+(d>>1))/r),n.rotate&&o.rotate(t.bb(n.rotate)),o.fillText(n.text,0,0),u&&(o.lineWidth=2*u,o.strokeText(n.text,0,0)),o.restore(),n.width=e,n.height=d,n.Mla=i,n.Qla=l,n.mi=e>>1,n.Pe=d>>1,n.Hj=-n.mi,n.ze=-n.Pe,n.R2=!0,i+=e}for(o=o.getImageData(0,0,2048/r,2048/r).data,r=[];0<=--a;)if((n=s[a]).R2){for(h=(e=n.width)>>5,d=n.Pe-n.ze,c=0;c<d*h;c++)r[c]=0;if(null==(i=n.Mla))break;for(l=n.Qla,u=0,f=-1,m=0;m<d;m++){for(c=0;c<e;c++)p=o[2048*(l+m)+(i+c)<<2]?1<<31-c%32:0,r[h*m+(c>>5)]|=p,u|=p;u?f=m:(n.ze++,d--,m--,l++)}n.Pe=n.ze+f,n.TE=r.slice(0,(n.Pe-n.ze)*h)}}},l=function(t,e){var i=t[0],n=t[1];e.x+e.Hj<i.x&&(i.x=e.x+e.Hj),e.y+e.ze<i.y&&(i.y=e.y+e.ze),e.x+e.mi>n.x&&(n.x=e.x+e.mi),e.y+e.Pe>n.y&&(n.y=e.y+e.Pe)},h=function(t,e,i,n,s){for(var a,o,r=i.x,l=i.y,h=0;(a=t.$a(h))&&(h+=1,o=~~a[0],a=~~a[1],!(Math.min(Math.abs(o),Math.abs(a))>=s));){if(i.x=r+o,i.y=l+a,!(o=0>i.x+i.Hj||0>i.y+i.ze||i.x+i.mi>t.f||i.y+i.Pe>t.i)&&(o=n))t:{o=t.f,o>>=5,a=i.TE;for(var c=i.width>>5,u=i.x-(c<<4),d=127&u,p=32-d,g=i.Pe-i.ze,f=(i.y+i.ze)*o+(u>>5),m=0;m<g;m++){for(var v=u=0;v<=c;v++)if((u<<p|(v<c?(u=a[m*c+v])>>>d:0))&e[f+v]){o=!0;break t}f+=o}o=!1}if(!o&&(!n||i.x+i.mi>n[0].x&&i.x+i.Hj<n[1].x&&i.y+i.Pe>n[0].y&&i.y+i.ze<n[1].y)){for(n=i.TE,s=i.width>>5,t=t.f>>5,l=32-(r=127&(o=i.x-(s<<4))),h=i.Pe-i.ze,o=(i.y+i.ze)*t+(o>>5),c=0;c<h;c++){for(d=a=0;d<=s;d++)e[o+d]=e[o+d]|a<<l|(d<s?(a=n[c*s+d])>>>r:0);o+=t}return delete i.TE,!0}}return!1},c=function(e){var i=e.$(),n=e.Bn(),s=e.qa,a=e.bo,r=(0,window.parseFloat)(i.get("value")),l=i.get("category"),h=i.ma();if(t.J(n,t.iz)&&t.p(l)){var c=l;i.j("category",l),i=e.ca.g("fill"),t.D(i)&&(e={sourceColor:e.cc().nc(h),category:l},i=i.call(e,e)),a.push(t.Ub(i))}else e.vb?c=r:(i.j("category",void 0),c=t.Ub(o(e,"fill",0)),a.push(c),c=t.C(c)?c.color:c,i.j("category",c));n.Xc(c),s.Xc(r)},u=function(t,e){var i=new n(t,e);return i.KE(i.oa),i},d={hsa:"spiral",p9:"rect"};t.H(n,t.Bx),t.Gq(n,"fill stroke fontFamily fontStyle fontVariant fontWeight fontSize".split(" "),"normal"),n.prototype.sa=258064|t.Bx.prototype.sa;var p={};t.sq(p,[[0,"mode",function(e,i){return t.zk(d,e,i||"spiral")}],[0,"fromAngle",t.Bq],[0,"toAngle",t.Bq],[0,"anglesCount",t.Bq],[0,"textSpacing",t.Bq]]),t.U(n,p),t.g=n.prototype,t.g.Ma=function(){return"tag-cloud"},t.g.xc=function(){return this},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.aj=function(){return!0},t.g.Ue=function(){return[this]},t.g.ce=function(e){var i=new t.EA(this,e);return this.$().select(e)&&i.iy()&&(e=i.get("value")/this.Rg("sum"),i.La("yPercentOfTotal",t.Tm(100*e,2)),i.La("percentValue",e)),i},t.g.oq=function(){return null},t.g.$=function(){return this.sd||(this.sd=this.la.$())},t.g.Ec=function(){return this.sd=this.la.$()},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(512,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(65536,129)},t.g.Ge=function(e){var i=this.$(),n=i.ma();e=e||this.cc().nc(n)||"blue",n={};var s=this.Bn(),a=i.get("value");if(i=i.j("category"),n.value=a,n.category=i,s){if(a=t.J(s,t.iz)&&t.p(i)?i:a,this.vb||t.p(i))var o=s.Qq(a);t.Sc(n,{scaledColor:o,colorScale:this.vb})}return n.sourceColor=e,n},t.g.Bn=function(){return this.vb||this.Za||(this.Za=t.jz())},t.g.Ic=function(){var e=this.$();return this.oe||(this.oe=new t.Fw),this.oe.lg(e).Li([this.ce(e.ma()),this]),e={x:{value:e.get("x"),type:"string"},value:{value:e.get("value"),type:"number"},name:{value:e.get("name"),type:"string"},index:{value:e.ma(),type:"number"},chart:{value:this,type:""}},t.ov(this.oe,e),this.oe},t.g.Rk=function(){return this.Ic()},t.g.Bh=function(){var t=this.$().j("item");return{value:{x:this.na+t.x*this.Ha,y:this.Ba+t.y*this.Ha}}},t.g.ml=function(){},t.g.pk=function(e,i){var n=this.$().j("item");if(n&&n.bD){var r=t.em(e),l=t.Ub(o(this,"fill",r)),h=t.Wb(o(this,"stroke",r)),c=o(this,"fontFamily",r),u=o(this,"fontStyle",r),d=o(this,"fontVariant",r),p=o(this,"fontWeight",r),g=o(this,"fontSize",r),f=this.O()?this.O().Ja():null,m=f&&!f.yf();return m&&f.suspend(),s(n.Xh,l),a(n.Xh,h),n.Xh.Cd("font-family",c),n.Xh.Cd("font-style",u),n.Xh.Cd("font-variant",d),n.Xh.Cd("font-weight",p),n.Xh.Cd("font-size",g),n.Xh.zIndex(r==t.gm?0:1e-6),m&&f.resume(),i}},t.g.pq=t.ia,t.g.TL=function(e){var i=this.Qi();if(e=t.A(e)?e.length?e[0]:window.NaN:e,i&&i.target()&&!(0,window.isNaN)(e)){var n=i.target().$();n.select(e),e=this.Bn(),n=t.J(e,t.iz)?n.j("category"):n.get(this.Hr[1]),t.aO(i,n)}},t.g.hA=function(){var e=this.Qi();e&&e.enabled()&&t.bO(e)},t.g.Tg=function(e){var i,n=e.type;switch(n){case"mouseout":n="pointmouseout";break;case"mouseover":n="pointmouseover";break;case"mousemove":n="pointmousemove";break;case"mousedown":n="pointmousedown";break;case"mouseup":n="pointmouseup";break;case"click":n="pointclick";break;case"dblclick":n="pointdblclick";break;default:return null}return"pointIndex"in e?i=e.pointIndex:"labelIndex"in e?i=e.labelIndex:"markerIndex"in e&&(i=e.markerIndex),i=t.N(i),e.pointIndex=i,{type:n,actualTarget:e.target,series:this,pointIndex:i,target:this,originalEvent:e,point:this.ce(i)}},t.g.ig=function(e){e=t.Y.prototype.ig.call(this,e);var i=t.so(e.domTarget).index;if(!t.p(i)&&t.mx(this.state,t.vo)){var n=t.sx(this.state,t.vo);n.length&&(i=n[0])}return i=t.N(i),(0,window.isNaN)(i)||(e.pointIndex=i),e},t.g.wm=function(){},t.g.Xl=function(e){return t.p(e)?((e=t.Ak(e))!=this.K&&(this.K=e),this):this.K},t.g.ej=function(e){return t.p(e)?(this.gd().selectionMode(e),this):this.gd().g("selectionMode")},t.g.Ii=function(e,i){if(!this.enabled())return this;var n=this.O()?this.O().Ja():null,s=n&&!n.yf();s&&n.suspend();var a=!(i&&i.shiftKey);return t.A(e)?(i||this.ie(),this.state.Lh(t.wo,e,a?t.vo:void 0)):t.ea(e)&&this.state.Lh(t.wo,e,a?t.vo:void 0),s&&n.resume(),this},t.g.ie=function(e){if(this.enabled()){var i,n=this.O()?this.O().Ja():null,s=n&&!n.yf();s&&n.suspend(),i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i),s&&n.resume()}},t.g.$i=function(e){if(!this.enabled())return this;var i=this.O()?this.O().Ja():null,n=i&&!i.yf();if(n&&i.suspend(),t.A(e)){for(var s=t.sx(this.state,t.vo),a=0;a<s.length;a++)t.Aa(e,s[a])||this.state.Vh(t.vo,s[a]);t.qx(this.state,e)}else t.ea(e)&&(this.Md(),t.qx(this.state,e));return n&&i.resume(),this},t.g.Md=function(e){var i;if((i=t.mx(this.state,t.vo))||(i=!!(this.state.fk()&t.vo)),i&&this.enabled()){var n,s=(i=this.O()?this.O().Ja():null)&&!i.yf();s&&i.suspend(),n=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.vo,n),s&&i.resume()}},t.g.data=function(e,i){if(t.p(e)){if(e){var n=e.title||e.caption;n&&this.title(n),e.rows&&(e=e.rows)}return this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),t.J(e,t.Cr)?this.la=this.Yc=e.Ui():t.J(e,t.Mr)?this.la=this.Yc=e.Yd():this.la=(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),t.K(this.la,this.dd,this),this.B(4352,1)),this}return this.la},t.g.dd=function(){this.B(4352,1)},t.g.UZ=function(e){return t.p(e)?(e=t.A(e)?t.Ha(e):null,this.D!=e&&(this.D=e,this.B(16388,1)),this):this.D},t.g.scale=function(e){if(t.p(e)){if(e=t.jt(this.qa,e,null,3,null,this.zg,this)){var i=this.qa==e;this.qa=e,this.qa.da(i),i||this.B(131072,1)}return this}return this.qa},t.g.zg=function(){this.B(131072,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(65536,129);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||(t.XN(this.Qi()),this.B(65536,129))}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(65536,129)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,t.W(this,"colorRange",this.Mb),t.K(this.Mb,this.Tz,this),this.B(32772,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=32772,n|=1),t.X(e,8)&&(i|=4,n|=8),t.X(e,2)&&(i|=32768,n|=8),this.B(i,n)},t.g.$q=function(e){return t.to(this.Qi(),e)},t.g.Ol=function(e){var i,n,s=[];if("categories"==e&&(n=t.J(this.Bn(),t.iz)?this.Bn():void 0)){var a=n.sr();for(e=0,i=a.length;e<i;e++){var o=a[e];"default"!==o.name&&s.push({text:o.name,iconEnabled:!0,iconType:"square",iconFill:o.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:e,meta:{X:this,scale:n,xe:o}})}}return s},t.g.Ms=function(t){return"categories"==t},t.g.zr=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){var o=[];n=n.xe;for(var r=s.Ec();r.advance();){var l=r.get("value"),h=r.j("category");n==a.Dn(t.p(h)?h:l)&&o.push(r.ma())}"single"==this.gd().g("hoverMode")?i.fg={X:s,vd:o}:i.fg=[{X:s,vd:o,Ln:o[o.length-1],De:{index:o[o.length-1],Tf:0}}]}}},t.g.wq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){n=n.xe;for(var o=s.Ec(),r=[];o.advance();){var l=o.get("value"),h=o.j("category");n==a.Dn(t.p(h)?h:l)&&r.push(o.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:r}:a.fg=[{X:s,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]),(s=t.wr(this,"colorRange"))&&s.enabled()&&s.target()&&t.aO(s,t.p(n.gp)?n.gp:(n.start+n.end)/2)}}},t.g.vq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){if("single"==this.gd().g("hoverMode")){var s=t.so(i.domTarget);s&&(s.X=n.X)}(n=t.wr(this,"colorRange"))&&n.enabled()&&n.target()&&t.bO(n)}},t.g.uda=function(t){return[this.f/this.i*(t*=.1)*Math.cos(t),t*Math.sin(t)]},t.g.getContext=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);return t.width=2048/e,t.height=2048/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}},t.g.pb=function(){var e=this.qa;if(e){var n,s=this.Bn();if(this.J(8192)){var a=this.g("anglesCount"),r=this.g("fromAngle"),l=this.g("toAngle");for(l-=r,this.ba=[],n=0;n<a;n++)this.ba.push(r+l/(1==a?a:a-1)*n);this.D||this.B(16388),this.I(8192)}if(this.J(4096)){var h=this.Ec();for(this.aa=[],this.b&&this.b.forEach((function(t,e){t.Xh.parent(null),t.ql.parent(null),t.ql.Bl(),this.aa[e]=t}),this),this.b=[],this.bo=[],e.Bg(),s.Bg();h.advance();){n=String(h.get("x")).toLowerCase(),r=(0,window.parseFloat)(h.get("value")),l=h.get("category");var u=h.ma(),d=this.aa[u]?this.aa[u]:{};d.rowIndex=u,d.text=n,d.value=r,d.bD=!1,d.nta=l,this.b.push(d),h.j("item",d),c(this)}e.Hg(),s.Hg(),this.vb||(t.Ka(this.bo,void 0,(function(e){return t.C(e)?e.color+" "+e.opacity:e})),i(s,this.bo)),t.Ra(this.b,(function(t,e){return e.value-t.value})),this.B(16388),this.I(200704)}if(this.J(196608)){for(this.bo=[],h=this.Ec(),e.Bg(),s.Bg();h.advance();)c(this);s.Hg(),this.vb||(t.Ka(this.bo,void 0,(function(e){return t.C(e)?e.color+" "+e.opacity:e})),i(s,this.bo)),this.J(65536)&&this.B(49680),this.J(131072)&&this.B(49156),this.I(196608)}if(this.J(16384)){var p=this.D?this.D:this.ba,g=Math.max((0,t.za)(p,0),0);a=p.length,e=this.b.length?this.b[0].value:window.NaN,h=this.$(),s=this.b.length;var f=0;this.b.forEach((function(e,i){var n=t.em(t.nx(this.state,e.rowIndex));h.select(e.rowIndex);var s=o(this,"fontFamily",n),r=o(this,"fontStyle",n),l=o(this,"fontVariant",n),c=o(this,"fontWeight",n),u=t.Ub(o(this,"fill",n));n=t.Wb(o(this,"stroke",n)),e.font=s,e.style=r,e.variant=l,e.weight=c,e.fill=u,e.stroke=n,e.rotate=p[(i+g+a)%a],f+=e.value}),this),this.La("sum",f),this.La("max",e),this.La("min",this.b.length?this.b[s-1].value:window.NaN),this.La("average",f/s),this.La("pointsCount",s),this.I(16384)}}},t.g.pv=function(){this.pb()},t.g.Qh=function(i){var n=this.scale(),c=t.wr(this,"colorRange");if(this.J(32768)&&c&&(c.ka(),c.scale(this.Bn()),c.target(this),c.kb(this),c.da(!1),c.enabled()&&this.B(4)),this.J(4)){c&&c.enabled()?(c.ja(i.clone().round()),this.o=c.yd()):this.o=i.clone(),this.f=this.o.width,this.i=this.o.height,this.$a="spiral"==this.g("mode")?this.uda:function(t){var e=4*t.f/t.i,i=0,n=0;return function(t){var s=0>t?-1:1;switch(Math.sqrt(1+4*s*t)-s&3){case 0:i+=e;break;case 1:n+=4;break;case 2:i-=e;break;default:n-=4}return[i,n]}}(this),i=this.b.length;var u=this.b[0],d=-1,p=null,g=this.getContext(this.canvas?this.canvas:this.canvas=window.document.createElement("canvas")),f=function(t){for(var e=[],i=-1;++i<t;)e[i]=0;return e}((this.f>>5)*this.i),m=Math.sqrt(this.f*this.f+this.i*this.i);for(function(e,i){if(i){var n=e.f/3,s=e.i/3,a=e.i/50,o=t.Va(a,1+~~s),r=t.Oa(o,(function(e){e=t.mg().measure(i.text,{fontStyle:i.style,fontFamily:i.font,fontSize:e,fontWeight:i.weight,fontVariant:i.variant});var a=t.Eo(e,"center");return a=t.Kb(t.bb(i.rotate),a.x,a.y),e=t.ln(e)||[],a.transform(e,0,e,0,4),a=(e=t.mn(e)).width,e=e.height,a>n||e>s?-1:a==n||e==s?0:1}));0>r&&(r=~r-1),e.P=a,e.Ka=o[t.Za(r,0,o.length)]}}(this,u),this.b.forEach((function(e){this.$().select(e.rowIndex),delete e.size,delete e.TE;var i=t.em(t.nx(this.state,e.rowIndex));i=o(this,"fontSize",i);var s=t.Za(n.transform(e.value),0,1);s=~~(this.P+s*(this.Ka-this.P)),e.size=null!=i?t.uo(i)?s*(0,window.parseFloat)(i)/100:i:s}),this);++d<i;)(u=this.b[d]).x=this.f>>1,u.y=this.i>>1,r(this,g,u,this.b,d),u.R2&&h(this,f,u,p,m)&&(p?l(p,u):p=[{x:u.x+u.Hj,y:u.y+u.ze},{x:u.x+u.mi,y:u.y+u.Pe}],u.x-=this.f>>1,u.y-=this.i>>1);i=p?Math.min(this.f/Math.abs(p[1].x-this.f/2),this.f/Math.abs(p[0].x-this.f/2),this.i/Math.abs(p[1].y-this.i/2),this.i/Math.abs(p[0].y-this.i/2))/2:1,this.wb||(this.wb=this.Na.Bd()),(d=t.wr(this,"background"))&&this.wb.zIndex((d.zIndex()||0)+1),this.G||(this.G=this.wb.Bd(),t.ru(this,this.G)),this.ye||(this.ye=this.wb.Bd()),this.na=this.o.left+(this.f>>1),this.Ba=this.o.top+(this.i>>1),this.Ha=i,this.wb.oc(i,0,0,i,this.na,this.Ba);var v=this.wb.Pd;this.b.forEach((function(i){var n=[i.x,i.y];if(v.transform(n,0,n,0,1),n[0]+i.Hj<this.o.left||n[0]+i.mi>this.o.cb()||n[1]+i.ze<this.o.top||n[1]+i.Pe>this.o.Va())i.bD&&(i.Xh.parent(null),i.ql.parent(null)),i.bD=!1;else{i.bD||(i.Xh=i.Xh?i.Xh.parent(this.ye):e(this.ye),i.Xh.Cd("text-anchor","middle"),i.Xh.Dd(!0),i.Xh.text(i.text.toLowerCase()),i.Xh.cursor("default"),i.ql=i.ql?i.ql.parent(this.G):e(this.G),i.ql&&(i.ql.tag={X:this,index:i.rowIndex}),i.ql.Cd("fill","#fff"),i.ql.Cd("opacity",1e-6),i.ql.Cd("text-anchor","middle"),i.ql.text(i.text.toLowerCase()),i.ql.cursor("default"),i.bD=!0);var r=t.em(t.nx(this.state,i.rowIndex));this.$().select(i.rowIndex),n=t.Ub(o(this,"fill",r));var l=t.Wb(o(this,"stroke",r)),h=o(this,"fontFamily",r),c=o(this,"fontStyle",r),u=o(this,"fontVariant",r),d=o(this,"fontWeight",r);r=o(this,"fontSize",r),s(i.Xh,n),a(i.Xh,l),i.Xh.Cd("font-family",h),i.Xh.Cd("font-style",c),i.Xh.Cd("font-variant",u),i.Xh.Cd("font-weight",d),i.Xh.Cd("font-size",r),i.Xh.Cd("transform","translate("+[i.x,i.y]+")rotate("+i.rotate+")"),i.Xh.zIndex(0),i.ql.Cd("font-family",h),i.ql.Cd("font-style",c),i.ql.Cd("font-variant",u),i.ql.Cd("font-weight",d),i.ql.Cd("font-size",r),i.ql.Cd("transform","translate("+[i.x,i.y]+")rotate("+i.rotate+")"),i.ql.zIndex(0)}}),this),this.I(16),this.I(4)}if(this.J(32768)&&(c&&(c.ka(),c.O(this.Na),c.W(),c.da(!1)),this.I(32768)),this.J(16)){var b=this.Ec();this.b.forEach((function(e){var i=t.em(t.nx(this.state,e.rowIndex));b.select(e.rowIndex),e.bD&&e.Xh&&(s(e.Xh,t.Ub(o(this,"fill",i))),a(e.Xh,t.Wb(o(this,"stroke",i))))}),this),this.I(16)}},t.g.sA=function(){return["x"]},t.g.tA=function(t){return t.get("x")},t.g.rA=function(e){return e=e.get("name"),t.z(e)?e:null},t.g.qA=function(){return this.data().hd("category")?["value","category"]:["value"]},t.g.yj=function(){return!this.$().Hb()},t.g.$v=function(e){var i;return t.z(e)?(i=t.dt(e,null))||(i=null):t.C(e)?(i=t.dt(e.type,!0)).N(e):i=null,i},t.g.KE=function(t){var e=t.scale;(e=this.$v(e))&&this.scale(e),e=t.colorScale,(e=this.$v(e))&&this.kd(e)},t.g.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,p,e,i),this.KE(e),this.data(e.data),this.UZ(e.angles),this.cc(e.palette),this.Qi().ga(!!i,e.colorRange),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},t.g.F=function(){var e=n.u.F.call(this);return t.Tq(this,p,e),e.data=this.data().F(),t.p(this.D)&&(e.angles=this.D),e.scale=this.scale().F(),this.kd()&&(e.colorScale=this.kd().F()),e.colorRange=this.Qi().F(),e.palette=this.cc().F(),e.normal=this.ca.F(),e.hovered=this.za.F(),e.selected=this.Ea.F(),{chart:e}},t.g.R=function(){for(var e=0;e<this.b.length;e++){var i=this.b[e];t.qd(i.Xh),t.qd(i.ql),t.qd(i.TE)}t.sd(this.ye,this.G,this.wb,this.ca,this.za,this.Ea,this.Mb,this.state,this.Fa,this.la,this.Yc),this.Fa=this.state=this.qa=this.vb=this.Mb=this.Ea=this.za=this.ca=this.wb=this.G=this.ye=null,delete this.la,this.Yc=null,n.u.R.call(this)};var g=n.prototype;g.getType=g.Ma,g.data=g.data,g.angles=g.UZ,g.scale=g.scale,g.colorScale=g.kd,g.colorRange=g.Qi,g.palette=g.cc,g.normal=g.Qa,g.hovered=g.lb,g.selected=g.selected,g.hover=g.$i,g.unhover=g.Md,g.select=g.Ii,g.unselect=g.ie,g.getPoint=g.ce,t.Tp["tag-cloud"]=u,t.E("anychart.tagCloud",u)}.call(this,$)),_.theme_sparkline||(_.theme_sparkline=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{sparkline:{background:{enabled:!0},title:{enabled:!1,padding:0,margin:0,orientation:"right",rotation:0},margin:0,padding:0,hatchFill:null,markers:{},interactivity:{hoverMode:"by-x"},firstMarkers:{fill:"#64b5f6"},lastMarkers:{fill:"#64b5f6"},negativeMarkers:{fill:"#ef6c00"},minMarkers:{fill:"#455a64"},maxMarkers:{fill:"#dd2c00"},labels:{},firstLabels:{},lastLabels:{},negativeLabels:{},minLabels:{fontSize:9,padding:{top:3,right:0,bottom:3,left:0},fontColor:"#303f46"},maxLabels:{fontSize:9,padding:{top:3,right:0,bottom:3,left:0},fontColor:"#9b1f00"},lineAxesMarkers:[],rangeAxesMarkers:[],textAxesMarkers:[],scales:[{type:"ordinal"},{type:"linear"}],xScale:0,yScale:1,clip:!0,seriesType:"line",connectMissingPoints:!1,pointWidth:"95%",tooltip:{title:!1,separator:!1,titleFormat:function(){return this.x},format:function(){return"x: "+this.x+"\ny: "+t.vN(this.value)},allowLeaveChart:!0},defaultSeriesSettings:{base:{markers:{enabled:!1,position:"center",anchor:"center",type:"circle",size:1.8,stroke:"none"},hoverMarkers:{enabled:!0},labels:{enabled:!1,fontSize:8,background:{enabled:!1},position:"center",anchor:"center-bottom"},minLabels:{position:"center-bottom",anchor:"center-bottom"},maxLabels:{position:"center-top",anchor:"center-top"},color:"#64b5f6"},area:{stroke:"#64b5f6",fill:"#64b5f6 0.5"},column:{markers:{position:"center-top"},labels:{position:"center-top",anchor:"center-bottom"},negativeMarkers:{position:"center-bottom"},negativeLabels:{position:"center-bottom",anchor:"center-top"},fill:"#64b5f6",negativeFill:"#ef6c00"},line:{stroke:"#64b5f6"},winLoss:{markers:{position:"center-top",anchor:"center-top"},labels:{position:"center-top",anchor:"center-top"},negativeMarkers:{position:"center-bottom",anchor:"center-bottom"},negativeLabels:{position:"center-bottom",anchor:"center-bottom"},fill:"#64b5f6",negativeFill:"#ef6c00"}}}})}.call(this,$)),_.theme_linear_gauge||(_.theme_linear_gauge=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{linearGauge:{padding:10,markerPalette:{items:"circle diamond square triangle-down triangle-up triangle-left triangle-right diagonal-cross pentagon cross v-line star5 star4 trapezium star7 star6 star10".split(" ")},globalOffset:"0%",layout:"vertical",tooltip:{titleFormat:function(){return this.name},format:function(){return this.high?t.KN.call(this):"Value: "+t.vN(this.value)}},scales:[{type:"linear"}],defaultAxisSettings:{enabled:!0,width:"10%",offset:"0%"},defaultScaleBarSettings:{enabled:!0,width:"10%",offset:"0%",from:"min",to:"max",colorScale:{type:"ordinal-color",inverted:!1,ticks:{maxCount:100}},points:[{height:0,left:0,right:0},{height:1,left:0,right:0}]},defaultPointerSettings:{base:{enabled:!0,selectionMode:"single",width:"10%",offset:"0%",legendItem:{enabled:!0},normal:{stroke:t.HN,fill:t.zN,hatchFill:null,labels:{zIndex:0,position:"center-top"}},hovered:{stroke:t.JN,fill:t.FN,labels:{enabled:null}},selected:{stroke:t.EN,fill:t.EN,labels:{enabled:null}}},bar:{},rangeBar:{normal:{labels:{format:function(){return t.vN(this.high)}}}},marker:{width:"3%"},tank:{normal:{emptyFill:"#fff 0.3",emptyHatchFill:null},hovered:{emptyFill:t.zN},selected:{emptyFill:t.zN}},thermometer:{normal:{fill:function(){var e=this.sourceColor,i=t.Ql(e);return{angle:this.isVertical?0:90,keys:[{color:i},{color:e},{color:i}]}}},width:"3%",bulbRadius:"120%",bulbPadding:"3%"},led:{dimmer:function(e){return t.Ql(e)},gap:"1%",size:"2%",count:null,colorScale:{type:"ordinal-color",inverted:!1,ticks:{maxCount:100}}}}},thermometer:{},tank:{},led:{}})}.call(this,$)),_.treemap_part||(_.treemap_part=1,function(t){var e=function(e,i){function n(t){t.enabled(null)}t.bD.call(this,e,i),this.Ga("treeMap"),this.b=null,this.P=[],this.i=[],this.state=new t.ix(this),this.D={},this.G={},this.data(e,i);var s={};t.T(s,[["fill",16,65],["stroke",16,65],["hatchFill",16,65],["labels",0,0],["markers",0,0],["headers",0,0]]),this.ca=new t.my(this,s,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),this.ca.ta("markersFactoryConstructor",t.ry),this.ca.ta("markersAfterInitCallback",(function(e){e.kb(this),e.WF="star5",t.K(e,this.Mn,this)})),s={},t.T(s,[["fill",16,65],["stroke",16,65],["hatchFill",16,65],["labels",0,0],["markers",0,0]]),this.Ea=new t.my(this,s,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",n),this.za=new t.my(this,s,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.Jk("headers",[0,0]),this.za.ta("labelsAfterInitCallback",n),t.T(this.ua,[["maxDepth",16912,129],["hintDepth",16400,1],["hintOpacity",65536,1],["maxHeadersHeight",16,1],["sort",16,1],["headersDisplayMode",16,1],["labelsDisplayMode",16,1]])},i=function(t,e){var i=t.j(v);return e.j(v)-i},n=function(t,e){return-i(t,e)},s=function(t){for(var e=0;e<t.ba.length;e++){var i=t.ba[e];i&&(i.j("labelIndex",void 0),i.j("markerIndex",void 0))}t.D={},t.G={}},a=function(e,i,n){i.j("index",e.fh++).j("depth",n),e.ba.push(i);var s=i.bc();if(s){for(var o,r=0,l=0,h=0;h<s;h++)r+=(o=a(e,i.xd(h),n+1))[0],l+=o[1];n=r,e.zk(l)&&i.j(S,!0)}else n=i.get("value"),l=i.get("size"),n=t.N(n),l=t.N(l)||n,e.zk(l)&&(i.j(S,!0),l=n=0);return i.j(v,l),i.j(b,n),[n,l]},o=function(t,e,i,n,s,a){var o,r=0;for(o=n;o<=s;o++)r+=t[o].GY;for(a?(e=i/r,i=r/i):(i=e/r,e=r/e),o=n;o<=s;o++)n=t[o],a?(n.IH=e*n.GY,n.ZJ=i):(n.ZJ=i*n.GY,n.IH=e);return n=t[s],Math.max(n.IH/n.ZJ,n.ZJ/n.IH)},r=function(e){return t.J(e,t.$t)&&(e=e.Tk),e==e.Pq().xd(0)},l=function(e,i){var n=e.$().f,s=n.j("treemap_pointBounds"),a=n.j(y);if(0==a||2==a){var o=!!(i&t.wo);a=!o&&!!(i&t.vo);var r=e.Qa().Db(),l=e.lb().Db(),h=e.selected().Db(),c=o?h:a?l:r,u=n.get("normal");u=t.p(u)?u.marker:void 0;var d=n.get("hovered");d=t.p(d)?d.marker:void 0;var p=n.get("selected");p=t.p(p)?p.marker:void 0,u=t.Zo(u,n.get("marker")),d=t.Zo(d,n.get("hoverMarker")),p=t.Zo(p,n.get("selectMarker"));var g=n.j("markerIndex");g=t.p(g)?r.jp(g):null;var f=u&&t.p(u.enabled)?u.enabled:null,m=d&&t.p(d.enabled)?d.enabled:null,v=p&&t.p(p.enabled)?p.enabled:null;(a||o?a?null===m?l&&null===l.enabled()?null===f?r.enabled():f:l.enabled():m:null===v?h&&null===h.enabled()?null===f?r.enabled():f:h.enabled():v:null===f?r.enabled():f)?(h=e.$().f,l=!(o=!!(i&t.wo))&&!!(i&t.vo),m=h.get("normal"),m=t.p(m)?m.marker:void 0,v=h.get("hovered"),v=t.p(v)?v.marker:void 0,f=h.get("selected"),f=t.p(f)?f.marker:void 0,m=t.Zo(m,h.get("marker"),null),v=t.Zo(v,h.get("hoverMarker"),null),h=t.Zo(f,h.get("selectMarker"),null),f=m&&m.position?m.position:null,m=v&&v.position?v.position:null,h=h&&h.position?h.position:null,o=l&&(m||e.lb().Db().g("position"))||o&&(h||e.selected().Db().g("position"))||f||e.Qa().Db().g("position"),o=t.Dk(o),s={value:t.Eo(s,o)},g?g.jc(s):(g=r.add(s),n.j("markerIndex",g.ma()),e.G[g.ma()]=n.j("index")),g.Hi(),t.gy(g,c),g.td(u,a?d:p),g.W()):g&&(r.clear(g.ma()),n.j("markerIndex",void 0))}},h=function(e,i){var n=null===e||e&&t.p(e.enabled)&&!e.enabled||t.da(e)&&!e,s=!i.enabled();return n||s},c=function(e,i){var n=e.$().f,s=n.j(x);if(s){var a=n.j(y),o=n.j(b);n=t.cm("fill",1,!0)(e,i,!1),2==a?n=t.Ul(n,e.g("hintOpacity"),!0):4==a&&(n=e.f?e.f.Qq(o):n),a=t.cm("stroke",2,!0)(e,i,!1),s.stroke(a),s.fill(n)}},u=function(e,i){var n=e.$().f.j("treemap_hatchShape");if(null!=n){var s=t.cm("hatchFill",3,!0)(e,i,!1);n.stroke(null).fill(s)}},d=function(e,i,n,s){if(!(i.j(S)||(n=n.clone(),1>n.width||1>n.height))){var a=i.bc(),r=i.Sl(),p=null,g=i.j(y);if(0==g||4==g)p=n.clone(),i.j("treemap_pointBounds",p);else{if(1==g){p=n;var f=i.j("index"),m=i.get("header"),b=e.Qa().headers();if(h(m,b))p=t.kn(p.left,p.top,p.width,0);else{(m=m||{}).width||(m.width=p.width),e.$().select(f);var w=e.Ic();f=t.L(e.g("maxHeadersHeight"),p.height),(m=b.measure(w,void 0,m)).height>f&&(m.height=f),p=t.kn(p.left,p.top,p.width,m.height)}m=t.kn(n.left,n.top+p.height,n.width,n.height-p.height),i.j("treemap_pointBounds",p),i.j("treemap_contentBounds",m)}for(2!=g&&3!=g||(p=n.clone(),i.j("treemap_pointBounds",p),i.j("treemap_contentBounds",p)),function(e,i,n){"none"!=e.g("sort")&&i.sort(e.qc),e=Array(i.length);var s=n.left,a=n.top,r=n.width,l=n.height,h=r,c=l,u=(0,t.Gg)(i,(function(t,e){return t+e.j(v)}),0);n=e.length;var d=r*l/u;for(u=0;u<n;u++)e[u]||(e[u]={}),e[u].GY=t.Tm(i[u].j(v)*d,4);var p=d=0,g=h>c;u=Number.MAX_VALUE;for(var f,m,b=0,y=0;p<n;)if((f=o(e,h,c,d,p,g))>u){for(c=h=0,u=d;u<p;u++)(m=e[u]).x=s+b+h,m.y=a+y+c,g?c+=m.height:h+=m.width;g?b+=e[d].width:y+=e[d].height,g=(h=r-b)>(c=l-y),p=d=p,u=Number.MAX_VALUE}else{for(u=d;u<=p;u++)(m=e[u]).width=1>m.ZJ?1:t.Tm(m.ZJ,4),m.height=1>m.IH?1:t.Tm(m.IH,4);u=f,p++}for(l=r=0,u=d;u<p;u++)(m=e[u]).x=s+b+r,m.y=a+y+l,g?l+=m.height:r+=m.width;for(u=0;u<n;u++)m=e[u],i[u].j("treemap_pointBounds",t.kn(m.x,m.y,m.width,m.height))}(e,r,m||p),n=0;n<a;n++)p=(r=i.xd(n)).j("treemap_pointBounds"),d(e,r,p,s+1)}if(i=i.j("index"),e.$().select(i),i=t.nx(e.state,i),3!=g)if(1==g)e.ke(i);else{r=(s=e.$().f).j("treemap_pointBounds"),a=s.j(y),n=t.eC(e.ue),s.j(x,n),c(e,i),r=t.kn(t.Tm(r.left,4),t.Tm(r.top,4),t.Tm(r.width,4),t.Tm(r.height,4));var C=0;(p=n.stroke())&&(C=t.$b(p)),r.left+=C/2,r.width-=C,r.top+=C/2,r.height-=C,m=(p=t.R(r.left,C))-r.left,f=(b=t.R(r.width,C))-r.width;var T=(w=t.R(r.top,C))-r.top,D=(C=t.R(r.height,C))-r.height;r.left=p,r.width=b-m-f,r.top=w,r.height=C-T-D,n.Qf(r),(e.ca.g("hatchFill")||e.za.g("hatchFill")||e.Ea.g("hatchFill"))&&((r=t.eC(e.o)).pe(n.F()),s.j("treemap_hatchShape",r),u(e,i)),4!=a&&e.qC(n),4!=g&&(e.ke(i),l(e,i))}}},p=function(t,e,i){var n=t.g("maxDepth"),s=t.g("hintDepth");if(!(i>n+s)){var a;n=e.bc(),s=t.g("maxDepth");var o=t.g("hintDepth");if(n?i<s?a=1:i==s?a=o?2:0:i>s&&(a=i==s+o?4:3):a=i<=s?0:4,e.j(y,a),t.Uc[e.j("index")]=e,n=e.bc())for(s=0;s<n;s++)p(t,e.xd(s),i+1);e=e.j(b),0==a||2==a?t.P.push(e):4==a&&t.i.push(e)}},g=function(i,n){var s=new e(i,n);return s.ga(!0,t.nm("treeMap")),s};t.H(e,t.bD),t.Gq(e,"fill stroke hatchFill labels markers headers".split(" "),"normal"),e.prototype.ra=128|t.bD.prototype.ra,e.prototype.sa=122880|t.bD.prototype.sa;var f,m=(f={},t.sq(f,[[0,"maxDepth",function(e){return t.P(e,1,!1)}],[0,"hintDepth",function(e){return t.P(e,0,!1)}],[0,"hintOpacity",t.er],[0,"maxHeadersHeight",t.Cq],[0,"sort",function(e){return t.Mk(e,"desc")}],[0,"headersDisplayMode",t.UN],[0,"labelsDisplayMode",t.UN]]),f);t.U(e,m),t.g=e.prototype,t.g.Ma=function(){return"tree-map"},t.g.pk=function(e,i){var n=this.$().f;if(t.p(n)&&!n.j(S)){if(1!=n.j(y))return n.j(x)&&(c(this,e),u(this,e)),this.ke(e),l(this,e),i;this.ke(e)}},t.g.Tg=function(e){var i=e.type;switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":i="pointmousemove";break;case"mousedown":i="pointmousedown";break;case"mouseup":i="pointmouseup";break;case"click":i="pointclick";break;case"dblclick":i="pointdblclick";break;default:return null}if("pointIndex"in e)var n=e.pointIndex;else if("labelIndex"in e){n=e.labelIndex;var s=e.target===this.Qa().headers();n=t.p(n)&&this.D?this.D[(s?"h":"l")+n]:null}else"markerIndex"in e&&(n=e.markerIndex,n=t.p(n)&&this.G?this.G[n]:null);return n=t.N(n),e.pointIndex=n,{type:i,actualTarget:e.target,series:this,pointIndex:n,target:this,originalEvent:e,point:this.ce(n)}},t.g.TL=function(e,i){if(e=t.A(e)&&e.length?e[0]:e,this.Mb&&this.Mb.target()){var n=this.Mb.target();n==i&&((n=n.$()).select(e),n=n.j(b),t.aO(this.Mb,n))}},t.g.hA=function(){this.Mb&&this.Mb.enabled()&&t.bO(this.Mb)},t.g.$q=function(e){return t.J(e,t.WN)},t.g.OK=function(e,i){i=i||{target:this};var n=t.cD(this,e);n={type:"drillchange",path:n,current:n[n.length-1]},this.ie(),this.hm&&(this.dispatchEvent(this.bl("selected",i,this.hm,!0)),this.hm=null),this.dispatchEvent(n)&&this.IE(e)},t.g.Sj=function(i){if(i.button==t.Ri&&!t.J(i.target,t.Ww)&&!this.$q(i.target)){var n,s=t.so(i.domTarget),a=t.J(i.target,t.Pu),o=t.J(i.target,t.dy);if(a||o){var l=i.target.Zi();if(l.aj&&l.aj()&&(n=l),a){var h=i.target===this.Qa().headers();h=this.D[(h?"h":"l")+s]}else o&&(h=this.G[s])}else n=s&&s.X,h=t.ea(s.index)?s.index:i.pointIndex;n&&!n.md&&n.enabled()&&t.D(n.Tg)&&((s=this.$()).select(h),(s=s.f)==this.b?r(s)||this.OK(s.getParent()):s.bc()?this.OK(s):e.u.Sj.call(this,i))}},t.g.uA=function(){return this.St(),this.b?t.cD(this,this.b):null},t.g.ie=function(e){var i;this.enabled()&&(i=t.p(e)?e:this.state.Gc==t.gm?window.NaN:void 0,this.state.Vh(t.wo,i))},t.g.Uu=function(){return!0},t.g.ay=function(){this.St(),this.b&&!r(this.b)&&this.IE(this.b.getParent())},t.g.Ms=function(t){return"categories"==t},t.g.wq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){var s=n.X,a=n.scale;if(a&&s){n=n.xe;for(var o=s.Ec(),r=[];o.advance();){var l=o.get(b);n==a.Dn(l)&&r.push(o.ma())}(a=t.so(i.domTarget))&&("single"==this.gd().g("hoverMode")?a.fg={X:s,vd:r}:a.fg=[{X:s,vd:r,Ln:r[r.length-1],De:{index:r[r.length-1],Tf:0}}]),this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.aO(this.Mb,(n.start+n.end)/2)}}},t.g.vq=function(e,i){var n=e.j();if("categories"==this.eg().g("itemsSourceMode")){if("single"==this.gd().g("hoverMode")){var s=t.so(i.domTarget);s&&(s.X=n.X)}this.Mb&&this.Mb.enabled()&&this.Mb.target()&&t.bO(this.Mb)}},t.g.Ol=function(e){var i,n=[];if(this.pb(),"categories"==e){var s=this.kd();if(s&&t.J(s,t.iz)){var a=s.sr();for(e=0,i=a.length;e<i;e++){var o=a[e];"default"!==o.name&&n.push({text:o.name,iconEnabled:!0,iconType:"square",iconFill:o.color,disabled:!this.enabled(),sourceUid:t.oa(this),sourceKey:e,meta:{X:this,scale:s,xe:o}})}}}return n},t.g.xc=function(){return this};var v="treemap_size",b="treemap_value",y="treemap_type",S="treemap_missing",x="treemap_shape";t.g=e.prototype,t.g.zk=function(t){return(0,window.isNaN)(t)||0>=t},t.g.IE=function(t){this.b=t,this.B(16912,129)},t.g.Nga=function(e){t.X(e,1)&&this.B(16,1)},t.g.de=function(e){t.X(e,1)&&this.B(16,1)},t.g.Mn=function(e){t.X(e,1)&&this.B(16,1)},t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(8704,1);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,t.qd(this.f),this.vb?this.f=t.dt(this.vb.Ma(),null):this.f=null,this.vb.da(i),i||this.B(8704,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(8704,1)},t.g.Qi=function(e){return this.Mb||(this.Mb=new t.WN,this.Mb.df(),this.Mb.kb(this),t.K(this.Mb,this.Tz,this),this.B(32772,1)),t.p(e)?(this.Mb.N(e),this):this.Mb},t.g.Tz=function(e){var i=0,n=0;t.X(e,1)&&(i|=32784,n|=1),t.X(e,8)&&(i|=4,n|=8),this.B(i,n)},t.g.Ic=function(e){this.oe&&!e||(this.oe=new t.Fw);var i=this.$();return e=i.f,i={chart:{value:this,type:""},index:{value:i.ma(),type:"number"},name:{value:e.get("name"),type:"string"},value:{value:e.j(b),type:"number"},size:{value:e.j(v),type:"number"}},this.oe.lg(e).Li([this]),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.Bh=function(e){var i=this.$().j("treemap_pointBounds");return e=t.Ek(e),{value:t.Eo(i,e)}},t.g.ke=function(e){var i,n=this.$().f,s=n.j("treemap_pointBounds"),a=n.j(y);if(0==a||2==a)a=!1;else{if(1!=a)return;a=!0}i=a?this.Qa().headers():this.Qa().labels();var o,r=a?this.g("headersDisplayMode"):this.g("labelsDisplayMode"),l=a,c=this.$().f,u=c.j("index"),d="label",p="hoverLabel",g="selectLabel";if(l){var f=this.Qa().headers(),m=this.lb().headers(),v=null;d="header",p="hoverHeader",g=null}else f=this.Qa().labels(),m=this.lb().labels(),v=this.selected().labels();var b=!!(e&t.wo),S=!b&&!!(e&t.vo),x=c.j("labelIndex");x=t.p(x)?f.be(x):null;var w,C=null;b?C=w=v:S?C=w=m:w=f;var T=c.get("normal");T=t.p(T)?T[d]:void 0;var D=c.get("hovered");D=t.p(D)?D[d]:void 0;var k,$=c.get("selected");if($=t.p($)?l?void 0:$[d]:void 0,d=t.Zo(T,c.get(d)),p=S?t.Zo(D,c.get(p)):null,g=b?t.Zo($,c.get(g)):null,$=d&&t.p(d.enabled)?d.enabled:null,D=g&&t.p(g.enabled)?g.enabled:null,T=p&&t.p(p.enabled)?p.enabled:null,k=l?!h(S?p:d,w):S||b?S?null===T?null===m.enabled()?null===$?f.enabled():$:m.enabled():T:null===D?null===v.enabled()?null===$?f.enabled():$:v.enabled():D:null===$?f.enabled():$){b=this.$().f;var O="label";D="hoverLabel",$="selectLabel",l?(w=this.Qa().headers(),k=this.lb().headers(),m=null,O="header",D="hoverHeader",$=null):(w=this.Qa().labels(),k=this.lb().labels(),m=this.selected().labels()),e=!(v=!!(e&t.wo))&&!!(e&t.vo);var P=b.get("normal");P=t.p(P)?P[O]:void 0;var L=b.get("hovered");L=t.p(L)?L[O]:void 0,T=b.get("selected"),T=t.p(T)?l?void 0:T[O]:void 0,O=t.Zo(P,b.get(O)),D=e?t.Zo(L,b.get(D)):null,b=v?t.Zo(T,b.get($)):null,$=O&&O.position?O.position:null,D=D&&D.position?D.position:null,b=b&&b.position?b.position:null,e=e||v?e?D||(k.g("position")?k.g("position"):$||w.g("position")):b||(m.g("position")?m.g("position"):$||w.g("position")):$||w.g("position"),e=this.Bh(e),w=this.Ic(),x?(t.Yu(f,u),x.Hf(w),x.jc(e)):(x=f.add(w,e,u),c.j("labelIndex",x.ma()),this.D[(l?"h":"l")+x.ma()]=c.j("index")),x.Hi(),t.$u(x,C),x.td(d,S?p:g),l=x}else x&&(f.clear(x.ma()),c.j("labelIndex",void 0)),l=null;l&&((u=(c=t.Uu(l)).adjustByHeight||c.adjustByHeight)&&"same"==t.Ou(i)&&(o=t.iv(l,s.width,s.height,c.minFontSize,c.maxFontSize,c.adjustByWidth,c.adjustByHeight)),u?t.SN(i,o):t.SN(i,null),c.width=null,c.height=null,(c.adjustByWidth||c.adjustByHeight)&&(c.fontSize=t.Zu(l).Nd.fontSize),o=i.measure(l.Hf(),l.jc(),c),o=!(s.left<=o.left&&s.cb()>=o.cb()&&s.top<=o.top&&s.Va()>=o.Va()),a&&(l.width(s.width),l.height(s.height)),o&&"drop"==r&&(i.clear(l.ma()),n.j("labelIndex",void 0),l=null),l&&("always-show"!=r?(l.width(s.width),l.height(s.height),l.clip(s)):(a||(l.width(null),l.height(null)),l.clip(null)),l.W()))},t.g.Eh=function(){return t.Yb(t.nm("hatchFillPalette.items.0"))},t.g.Yi=function(){var t=this.$(),e=this.Eh();return{index:t.ma(),sourceHatchFill:e}},t.g.Ge=function(e){var i=this.$().f;return e=e||t.nm("palette.items.0"),{value:i.j(b),sourceColor:e,colorScale:this.kd()}},t.g.sc=function(e,i,n,s,a,o,r){return a=(0==i?this.ca:1==i?this.za:this.Ea).g(e),r?e=a:(r=(n=n.f).get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),a)),t.p(e)&&(e=s(e)),e},t.g.St=function(){if(this.J(4096)){s(this),this.fh=0,this.ba=[],this.Uc=[],this.P=[],this.i=[],this.b=null,this.I(4096);var e=this.data();if(e){var i=e.bc();if(1<i)t.kl(18);else if(!i)return;e=e.xd(0),this.b||(this.b=e),a(this,e,0),this.B(24592)}}},t.g.pb=function(){this.St(),this.b&&(this.J(16384)&&(this.P=[],this.i=[],this.Uc=[],p(this,this.b,0),this.Ec(),this.I(16384),this.B(8192)),this.J(8192)&&(this.vb&&(this.vb.Of()?(this.vb.Bg(),this.vb.Xc.apply(this.vb,this.P),this.vb.Hg()):(this.vb.Co(),this.vb.Xc.apply(this.vb,this.P)),t.J(this.vb,t.iz)&&t.Pt(this.vb.Xa()),this.f.N(this.vb.F())),this.f&&(this.f.Of()?(this.f.Bg(),this.f.Xc.apply(this.f,this.i),this.f.Hg()):(this.f.Co(),this.f.Xc.apply(this.f,this.i))),this.B(16),this.I(8192)))},t.g.Qh=function(e){if(!this.pf()&&(this.pb(),this.b)){this.J(32768)&&this.Mb&&(this.Mb.ka(),this.Mb.scale(this.kd()),this.Mb.target(this),this.Mb.da(!1),this.B(4));var a=this.Qa();if(this.J(4)&&(this.Mb?(this.Mb.ja(e.clone().round()),this.lf=this.Mb.yd()):this.lf=e.clone(),this.ue&&this.ue.clip(this.lf),a.headers()&&a.headers().clip(this.lf)),this.J(32768)&&(this.Mb&&(this.Mb.ka(),this.Mb.O(this.Na),this.Mb.zIndex(50),this.Mb.W(),this.Mb.da(!1)),this.I(32768)),this.J(16)&&(this.ue?this.ue.clear():(this.ue=new t.dC((function(){return t.mk()}),t.ia),this.ue.clip(this.lf),this.ue.zIndex(30),this.ue.parent(this.Na),a.headers().O(this.Na).zIndex(41),a.headers().clip(this.lf),a.labels().O(this.Na).zIndex(40),a.Db().O(this.Na).zIndex(40)),this.o?this.o.clear():(this.o=new t.dC((function(){return t.mk()}),t.ia),this.o.zIndex(31),this.o.parent(this.Na),this.o.Dd(!0)),a.headers().clear(),a.labels().clear(),a.Db().clear(),s(this),"desc"==(e=this.g("sort"))?this.qc=i:"asc"==e&&(this.qc=n),d(this,this.b,this.lf,0),a.headers().W(),a.labels().W(),a.Db().W(),this.I(65552)),this.J(65536)){for((a=this.$()).reset();a.advance();)if(2==a.j(y)&&(e=a.j(x))){var o=t.cm("fill",1,!1)(this,t.gm,!1);o=t.Ul(o,this.g("hintOpacity"),!0),e.fill(o)}this.I(65536)}}},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.jx=function(e,i){var n,s=t.so(i.event.domTarget);n=t.J(i.target,t.Pu)||t.J(i.target,t.dy)?this.ba[s]:s.node,s={};var a=1==n.j(y);return!n.bc()||a&&n==this.b||(s["drill-down-to"]={index:7,text:"Drill down",eventType:"anychart.drillTo",action:(0,t.pa)(this.OK,this,n)}),r(this.b)||(s["drill-down-up"]={index:7,text:"Drill up",eventType:"anychart.drillUp",action:(0,t.pa)(this.OK,this,this.b.getParent())}),t.Jc(s)||(s["drill-down-separator"]={index:7.1}),t.Sc(s,t.Sl(t.mG["select-marquee"]),e),s},t.g.yj=function(){if(this.St(),this.b){var t=this.b.j(v),e=this.b.j(b);return this.b.j(S)||!t&&!e}return!0},t.g.U=function(i,n){if(e.u.U.call(this,i,n),"colorScale"in i){var s=i.colorScale,a=null;t.z(s)?a=t.dt(s,null):t.C(s)&&(a=t.dt(s.type,null))&&a.N(s),a&&this.kd(a)}t.Iq(this,m,i),this.Xl(i.hoverMode),this.ej(i.selectionMode),"colorRange"in i&&this.Qi(i.colorRange)},t.g.F=function(){var i=e.u.F.call(this);return this.kd()&&(i.colorScale=this.kd().F()),i.colorRange=this.Qi().F(),t.Tq(this,m,i,"TreeMap"),{chart:i}},t.g.R=function(){t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,e.u.R.call(this)};var w=e.prototype;w.getType=w.Ma,w.data=w.data,w.selectionMode=w.ej,w.hoverMode=w.Xl,w.normal=w.Qa,w.hovered=w.lb,w.selected=w.selected,w.colorScale=w.kd,w.colorRange=w.Qi,w.drillTo=w.jr,w.drillUp=w.ay,w.getDrilldownPath=w.uA,w.toCsv=w.Zj,t.Tp["tree-map"]=g,t.E("anychart.treeMap",g)}.call(this,$)),_.theme_pyramid_funnel||(_.theme_pyramid_funnel=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{funnel:{title:{text:"Funnel Chart"},neckWidth:"30%",neckHeight:"25%",reversed:!0,normal:{labels:{position:"outside-left-in-column"}}},pyramid:{title:{text:"Pyramid Chart"},legend:{inverted:!0},normal:{labels:{position:"outside-left-in-column"}},reversed:!1}})}.call(this,$)),_.theme_gantt||(_.theme_gantt=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{ganttDefaultSimpleLabelsSettings:{fontSize:11,vAlign:"middle",height:"100%",padding:{left:4,top:0,right:4,bottom:0}},defaultLevelsLabelsSettings:{fontSize:10,format:function(){return this.value},textOverflow:!0},defaultGanttHeader:{stroke:"#cecece",background:{fill:"#f7f7f7",enabled:!0}},defaultLevelSettings:{height:null},defaultDataGrid:{isStandalone:!0,headerHeight:25,fixedColumns:!1,backgroundFill:"none",columnStroke:"#cecece",rowHoverFill:t.zN,rowSelectedFill:t.zN,rowStroke:"#cecece",rowOddFill:"none",rowEvenFill:"none",rowFill:"none",onEditStart:function(){return 1>this.columnIndex?{cancelEdit:!0}:{value:this.value}},onEditEnd:function(){return 1==this.columnIndex?{itemMap:{name:this.value}}:{cancelEdit:!0}},buttons:{padding:[0,0,0,0],width:15,height:15,cursor:"pointer",normal:{hAlign:"center",vAlign:"middle",fontColor:"#7c868e",fontSize:12,content:"▸",background:{fill:"#fff 0.00001",stroke:"none"}},hovered:{},selected:{content:"▾"}},zIndex:5,headerFill:"#f7f7f7",tooltip:{padding:5,title:{enabled:!0,fontSize:"14px",fontWeight:"normal",fontColor:"#e5e5e5"},separator:{enabled:!0},format:"{%name}"},defaultColumnSettings:{width:90,buttonCursor:"pointer",depthPaddingMultiplier:0,collapseExpandButtons:!1,title:{text:"Column",enabled:!0,margin:0,vAlign:"middle",hAlign:"center",background:{enabled:!1},wordWrap:"normal",wordBreak:"normal"}},columns:[{width:50,title:{text:"#"}},{width:170,collapseExpandButtons:!0,depthPaddingMultiplier:15,title:{text:"Name"}}]},defaultTimeline:{isStandalone:!0,columnStroke:"#cecece",backgroundFill:"none",rowHoverFill:t.zN,rowSelectedFill:t.zN,rowStroke:"#cecece",rowOddFill:"none",rowEvenFill:"none",rowFill:"none",workingFill:"none",notWorkingFill:"lightblue 0.5",holidaysFill:"#cecece 0.5",weekendsFill:"#cecece 0.5",zIndex:5,headerHeight:70,elements:{enabled:!0,anchor:"auto",position:"left-center",offset:0,height:"70%",normal:{fill:t.zN,stroke:t.zN},selected:{fill:t.zN,stroke:t.zN},labels:{enabled:null},rendering:{drawer:function(){t.dF.vector.primitives.roundedRect(this.shapes.path,this.predictedBounds,0)},shapes:[{name:"path",shapeType:"path",zIndex:10,disablePointerEvents:!1}]},edit:{thumbs:{fill:"#eaeaea",stroke:"#545f69",size:3,enabled:!0},connectorThumbs:{fill:"#eaeaea",stroke:"#545f69",size:10,type:"circle",verticalOffset:0,horizontalOffset:0,enabled:!0},fill:{color:"#fff",opacity:1e-5},stroke:{color:"#aaa",dash:"3 3"}},tooltip:{padding:5,title:{enabled:!0,fontSize:"14px",fontWeight:"normal",fontColor:"#e5e5e5"},separator:{enabled:!0}},startMarker:{enabled:!1,anchor:"center",size:6,offsetX:0,offsetY:0,rotation:0,position:"left-center",type:"triangle-right"},endMarker:{enabled:!1,anchor:"center",size:6,offsetX:0,offsetY:0,rotation:0,position:"right-center",type:"triangle-left"}},tasks:{progress:{height:"100%",anchor:"left-center",drawOverEnd:!0,rendering:{shapes:[{name:"path",shapeType:"path",zIndex:11,disablePointerEvents:!0}]},edit:{fill:"#eaeaea",stroke:"#545f69"}}},groupingTasks:{progress:{height:"100%",anchor:"left-center",rendering:{shapes:[{name:"path",shapeType:"path",zIndex:11,disablePointerEvents:!0}]},edit:{fill:"#eaeaea",stroke:"#545f69"}},rendering:{drawer:function(){var t=this.predictedBounds,e=t.left+t.width,i=t.top+t.height,n=t.top+1.4*t.height;this.shapes.path.moveTo(t.left,t.top).lineTo(e,t.top).lineTo(e,n).lineTo(e-1,n).lineTo(e-1,i).lineTo(t.left+1,i).lineTo(t.left+1,n).lineTo(t.left,n).close()}}},milestones:{rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)}},preview:{enabled:!1,rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)},shapes:[{name:"path",shapeType:"path",zIndex:12,disablePointerEvents:!1}]},labels:{enabled:!1,format:"{%Name}",background:{enabled:!0,fill:"white 0.7"}},depth:null,drawOnCollapsedOnly:!1,position:"left-center",markerType:"diamond"},markerType:"diamond"},baselineMilestones:{rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)}},preview:{enabled:!1,rendering:{drawer:function(){var e=this.predictedBounds,i=e.width/2;t.zp(this.markerType)(this.shapes.path,e.left+i,e.top+i,i)},shapes:[{name:"path",shapeType:"path",zIndex:12,disablePointerEvents:!1}]},labels:{enabled:!1,format:"{%Name}",background:{enabled:!0,fill:"white 0.7"}},depth:null,drawOnCollapsedOnly:!1,position:"left-center",markerType:"diamond"},markerType:"diamond"},baselines:{above:!1,disableWithRelatedTask:!1,progress:{height:"50%",anchor:"left-bottom",position:"left-bottom",drawOverEnd:!0,rendering:{shapes:[{name:"path",shapeType:"path",zIndex:11,disablePointerEvents:!0}]},labels:{format:"{%baselineProgress}"},edit:{fill:"#eaeaea",stroke:"#545f69"}}},allowConnectorCaps:!0,connectors:{previewStroke:{color:"#545f69",dash:"3 3"},normal:{fill:t.zN,stroke:t.zN},selected:{fill:t.zN,stroke:t.zN}},tooltip:{padding:5,title:{enabled:!0,fontSize:"14px",fontWeight:"normal",fontColor:"#e5e5e5"},separator:{enabled:!0},zIndex:100},labels:{enabled:!0,anchor:"left-center",position:"right-center",padding:{top:3,right:5,bottom:3,left:5},vAlign:"middle",background:null,fontSize:11,zIndex:40,disablePointerEvents:!0},markers:{anchor:"center",zIndex:50,type:"star5",fill:"#ff0",stroke:"2 red"},defaultLineMarkerSettings:{layout:"vertical",zIndex:1.5},defaultRangeMarkerSettings:{layout:"vertical",zIndex:1},defaultTextMarkerSettings:{layout:"vertical",zIndex:2},zoomOnMouseWheel:!1,connectBy:""},ganttBase:{defaultRowHoverFill:"#f8fafb",defaultRowSelectedFill:"#ebf1f4",splitterPosition:"30%",headerHeight:70,rowStroke:"#cecece",rowFill:"none",rowHoverFill:t.zN,rowSelectedFill:t.zN,edit:{fill:{color:"#4285F4",opacity:.2},stroke:{color:"#4285F4",thickness:2},placementStroke:{color:"#4285F4",dash:"4 4"},enabled:!1},title:{enabled:!1},legend:{enabled:!1},background:{fill:"#fff"},margin:0,padding:0,dataGrid:{isStandalone:!1,backgroundFill:"none",tooltip:{zIndex:100}},timeline:{isStandalone:!1,cropLabels:!1,labels:{padding:[0,4,0,4]}}},ganttResource:{dataGrid:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}"}},timeline:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}"},labels:{format:"{%Name}",position:"center",anchor:"center",enabled:!1},milestones:{labels:{anchor:"left-center",position:"right-center",enabled:null},tooltip:{format:"{%start}"}},baselines:{labels:{position:"right-center",anchor:"left-center",format:"Baseline Label",enabled:!1},tooltip:{format:"Start Date: {%start}\nEnd Date: {%end}\nBaseline Start: {%baselineStart}\nBaseline End: {%baselineEnd}"}}}},ganttProject:{dataGrid:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}\nComplete: {%progress}"}},timeline:{elements:{labels:{format:"{%Progress}",position:"right-center",anchor:"left-center",enabled:null},tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}\nComplete: {%progress}"}},tasks:{progress:{labels:{format:"{%Progress}",enabled:!1}}},groupingTasks:{progress:{labels:{format:"{%Progress}",enabled:!1}}},baselines:{labels:{position:"right-center",anchor:"left-center",format:"Baseline Label",enabled:!1},tooltip:{format:"Start Date: {%start}\nEnd Date: {%end}\nBaseline Start: {%baselineStart}\nBaseline End: {%baselineEnd}\nComplete: {%progress}\nBaseline Progress: {%baselineProgress}"}},milestones:{labels:{format:"{%Name}",anchor:"left-center",position:"right-center",enabled:null},tooltip:{format:"{%start}"}},baselineMilestones:{labels:{format:"{%Name}",anchor:"left-center",position:"right-center",enabled:null},tooltip:{titleFormat:"{%Name}",format:"{%baselineStart}"}}}}}),t.ra(t.fa.anychart.themes.defaultTheme.standalones,{projectTimeline:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%start}\nComplete: {%progress}"}},resourceTimeline:{tooltip:{titleFormat:"{%Name}",format:"Start Date: {%start}\nEnd Date: {%end}"}},dataGrid:{enabled:!0,zIndex:0}})}.call(this,$)),_.theme_circle_packing||(_.theme_circle_packing=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{circlePacking:{normal:{fill:t.zN,stroke:t.EN,labels:{format:"{%name}",enabled:!0,hAlign:"center",vAlign:"middle",anchor:"center-top",position:"center-top",fontSize:14,fontColor:"#fff",textShadow:"2px 2px 0px black",disablePointerEvents:!0,width:null,height:null}},labelsMode:"roots",hovered:{fill:t.FN,stroke:t.HN},selected:{fill:"#333 0.85",stroke:"#fff"},tooltip:{titleFormat:"{%name}",format:"Value: {%value}"}}})}.call(this,$)),_.ui||(_.ui=1,function(t){var e=function(e,i){e.Y&&e.Y.D&&(t.Lc(e.Y.D,e.he),t.Mc(e.Y.D,i,e)),e.he=i},i=function(t,e){t.dh=e},n=function(t,e){t.i.ew(t.Ya(),e),t.Qd=e},s=function(e,i){return new t.gb(e.x-i.x,e.y-i.y)},a=function(e){if(t.hd&&!t.dd(8))return e.offsetParent;var i=t.te(e),n=t.Af(e,"position"),s="fixed"==n||"absolute"==n;for(e=e.parentNode;e&&e!=i;e=e.parentNode)if(11==e.nodeType&&e.host&&(e=e.host),n=t.Af(e,"position"),!(s=s&&"static"==n&&e!=i.documentElement&&e!=i.body)&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight||"fixed"==n||"absolute"==n||"relative"==n))return e;return null},o=function(e){for(var i=new t.kb(0,window.Infinity,window.Infinity,0),n=t.ye(e),s=n.b.body,o=n.b.documentElement,r=t.Fe(n.b);e=a(e);)if(!(t.hd&&0==e.clientWidth||t.xd&&0==e.clientHeight&&e==s)&&e!=s&&e!=o&&"visible"!=t.Af(e,"overflow")){var l=t.Ff(e),h=new t.gb(e.clientLeft,e.clientTop);l.x+=h.x,l.y+=h.y,i.top=Math.max(i.top,l.y),i.right=Math.min(i.right,l.x+e.clientWidth),i.bottom=Math.min(i.bottom,l.y+e.clientHeight),i.left=Math.max(i.left,l.x)}return s=r.scrollLeft,r=r.scrollTop,i.left=Math.max(i.left,s),i.top=Math.max(i.top,r),n=t.Ee(t.Ge(n.b)||window),i.right=Math.min(i.right,s+n.width),i.bottom=Math.min(i.bottom,r+n.height),0<=i.top&&0<=i.left&&i.bottom>i.top&&i.right>i.left?i:null},r=function(e,i){var n=i||t.Fe(window.document),s=n||t.Fe(window.document),a=t.Ff(e),o=t.Ff(s),r=t.Vf(s);if(s==t.Fe(window.document)){var l=a.x-s.scrollLeft;a=a.y-s.scrollTop,t.hd&&!t.dd(10)&&(l+=r.left,a+=r.top)}else l=a.x-o.x-r.left,a=a.y-o.y-r.top;r=t.Jf(e),o=s.clientHeight-r.height;var h=s.scrollLeft,c=s.scrollTop;h+=Math.min(l,Math.max(l-(s.clientWidth-r.width),0)),c+=Math.min(a,Math.max(a-o,0)),s=new t.gb(h,c),n.scrollLeft=s.x,n.scrollTop=s.y},l=function(e,i){t.qf.call(this),this.f=e||1,this.b=i||t.Cj,this.i=(0,t.pa)(this.ela,this),this.o=(0,t.Ln)()},h=function(e,i){var n="";i&&(n=i.id),t.zy(e,"activedescendant",n)},c=function(){this.f=[]},u=function(t,e){var i=t.f[e];if(!i){switch(e){case 0:i=t.Hh()+"-highlight";break;case 1:i=t.Hh()+"-checkbox";break;case 2:i=t.Hh()+"-content"}t.f[e]=i}return i},d=function(t,e,i){return t=u(t,2),i.Ac("DIV",t,e)},p=function(e,i){var n=e.Gn(i);if(n){n=n.firstChild;var s=u(e,1);return!!n&&t.af(n)&&t.Lj(n,s)}return!1},g=function(e,i,n,s){t.gD(e,n,i.lH()),t.jD(e,i,n),s!=p(e,n)&&(s?t.Qj(n,"anychart-option"):t.Sj(n,"anychart-option"),n=e.Gn(n),s?(e=u(e,1),n.insertBefore(i.f.Ac("DIV",e),n.firstChild||null)):n.removeChild(n.firstChild))},f=function(e,i,n,s){t.sD.call(this,e,s||c.Id(),n),this.dh=i},m=function(t,e,i,n){f.call(this,t,e,i,n),this.P=!1},v=function(t){this.b=t},b=function(t,e){t&&(t.tabIndex=e?0:-1)},y=function(e,i,n){if(n)for(var s,a=n.firstChild;a&&a.parentNode==n;){if(s=a.nextSibling,1==a.nodeType){var o=e.bH(a);o&&(o.Ed=a,i.isEnabled()||o.Dj(!1),i.hc(o),o.Bs(a))}else a.nodeValue&&""!=(0,t.vc)(a.nodeValue)||n.removeChild(a);a=s}},S=function(e,i,n){t.By.call(this,n),this.dw=i||v.Id(),this.vh=e||this.dw.R1()},x=function(t){return t.NV||t.Ya()},w=function(e,i){var n=t.Dy(e),s=x(e);i?n.wa(s,"focus",e.YM).wa(s,"blur",e.XM).wa(e.Zl||(e.Zl=new t.Jp(x(e))),"key",e.oo):n.gc(s,"focus",e.YM).gc(s,"blur",e.XM).gc(e.Zl||(e.Zl=new t.Jp(x(e))),"key",e.oo)},C=function(t,e){var i=e.Ya();i=i.id||(i.id=e.oy()),t.tv||(t.tv={}),t.tv[i]=e},T=function(t,e){if(t.Ya())throw Error("Component already rendered");t.vh=e},D=function(t,e){e!=t.kD&&t.xf&&w(t,e),t.kD=e,t.DA&&t.hj&&b(x(t),e)},k=function(t){return t.xd(t.ul)},$=function(e){L(e,(function(t,e){return(t+1)%e}),t.Fy(e)-1)},O=function(t){L(t,(function(t,e){return(t+1)%e}),t.ul)},P=function(t){L(t,(function(t,e){return 0>--t?e-1:t}),t.ul)},L=function(e,i,n){n=0>n?e.Kf(e.dm):n;var s=t.Fy(e);n=i.call(e,n,s);for(var a=0;a<=s;){var o=e.xd(n);if(o&&e.p0(o)){e.Wn(n);break}a++,n=i.call(e,n,s)}},I=function(){},A=function(e,i,n){t.sD.call(this,e,n||I.Id(),i),this.hn(1,!1),this.hn(2,!1),this.hn(4,!1),this.hn(32,!1),this.dc=1},E=function(){},G=function(e,i){t.sD.call(this,null,e||E.Id(),i),this.hn(1,!1),this.hn(2,!1),this.hn(4,!1),this.hn(32,!1),this.dc=1},U=function(t){this.b=t||"menu"},F=function(t){G.call(this,E.Id(),t)},M=function(t,e){S.call(this,ge,e||U.Id(),t),D(this,!1)},_=function(t,e){(t.CF=e)&&D(t,!0)},N=function(t,e){M.call(this,t,e),this.P=null},R=function(e,i,n,a,r,l,h,c,u){var d=j(n),p=t.Of(e),g=o(e);if(g){var f=new t.I(g.left,g.top,g.right-g.left,g.bottom-g.top);g=Math.max(p.left,f.left);var m=Math.min(p.left+p.width,f.left+f.width);if(g<=m){var v=Math.max(p.top,f.top);v<=(f=Math.min(p.top+p.height,f.top+f.height))&&(p.left=g,p.top=v,p.width=m-g,p.height=f-v)}}if(g=t.ye(e),v=t.ye(n),g.b!=v.b){m=g.b.body,v=t.Ge(v.b),f=new t.gb(0,0);var b=(b=t.te(m))?t.Ge(b):window;if(t.Zc(b,"parent")){var y=m;do{var S=b==v?t.Ff(y):t.Gf(y);f.x+=S.x,f.y+=S.y}while(b&&b!=v&&b!=b.parent&&(y=b.frameElement)&&(b=b.parent))}m=s(f,t.Ff(m)),!t.hd||t.dd(9)||t.De(g.b)||(m=s(m,t.He(g.b))),p.left+=m.x,p.top+=m.y}if(e=H(e,i),i=p.left,4&e?i+=p.width:2&e&&(i+=p.width/2),p=new t.gb(i,p.top+(1&e?p.height:0)),p=s(p,d),r&&(p.x+=(4&e?-1:1)*r.x,p.y+=(1&e?-1:1)*r.y),h)if(u)var x=u;else(x=o(n))&&(x.top-=d.y,x.right-=d.x,x.bottom-=d.y,x.left-=d.x);return B(p,n,a,l,x,h,c)},j=function(e){if(e=e.offsetParent){var i="HTML"==e.tagName||"BODY"==e.tagName;if(!i||"static"!=t.Af(e,"position")){var n=t.Ff(e);if(!i){var a;if(a=i=t.Qf(e)){a=t.bE&&0<=t.xc(t.tda,10);var o=t.lda&&0<=t.xc(t.pda,10);a=t.gd||a||o}i=a?-e.scrollLeft:!i||t.gda&&t.bd("8")||"visible"==t.Af(e,"overflowX")?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft,n=s(n,new t.gb(i,e.scrollTop))}}}return n||new t.gb},B=function(e,i,n,s,a,o,r){e=e.clone();var l=H(i,n);n=t.Lf(i),r=r?r.clone():n.clone(),e=e.clone(),r=r.clone();var h=0;if((s||0!=l)&&(4&l?e.x-=r.width+(s?s.right:0):2&l?e.x-=r.width/2:s&&(e.x+=s.left),1&l?e.y-=r.height+(s?s.bottom:0):s&&(e.y+=s.top)),o){if(a){if(s=e,l=r,h=0,65==(65&o)&&(s.x<a.left||s.x>=a.right)&&(o&=-2),132==(132&o)&&(s.y<a.top||s.y>=a.bottom)&&(o&=-5),s.x<a.left&&1&o&&(s.x=a.left,h|=1),16&o){var c=s.x;s.x<a.left&&(s.x=a.left,h|=4),s.x+l.width>a.right&&(l.width=Math.min(a.right-s.x,c+l.width-a.left),l.width=Math.max(l.width,0),h|=4)}s.x+l.width>a.right&&1&o&&(s.x=Math.max(a.right-l.width,a.left),h|=1),2&o&&(h|=(s.x<a.left?16:0)|(s.x+l.width>a.right?32:0)),s.y<a.top&&4&o&&(s.y=a.top,h|=2),32&o&&(c=s.y,s.y<a.top&&(s.y=a.top,h|=8),s.y+l.height>a.bottom&&(l.height=Math.min(a.bottom-s.y,c+l.height-a.top),l.height=Math.max(l.height,0),h|=8)),s.y+l.height>a.bottom&&4&o&&(s.y=Math.max(a.bottom-l.height,a.top),h|=2),8&o&&(h|=(s.y<a.top?64:0)|(s.y+l.height>a.bottom?128:0)),a=h}else a=256;h=a}return(o=new t.I(0,0,0,0)).left=e.x,o.top=e.y,o.width=r.width,o.height=r.height,496&(a=h)||(t.Cf(i,new t.gb(o.left,o.top)),r=new t.lb(o.width,o.height),t.mb(n,r)||(n=r,e=t.De(t.ye(t.te(i)).b),!t.hd||t.bd("10")||e&&t.bd("8")?(i=i.style,t.gd?i.MozBoxSizing="border-box":t.xd?i.WebkitBoxSizing="border-box":i.boxSizing="border-box",i.width=Math.max(n.width,0)+"px",i.height=Math.max(n.height,0)+"px"):(r=i.style,e?(e=t.Uf(i,"padding"),i=t.Vf(i),r.pixelWidth=n.width-i.left-e.left-e.right-i.right,r.pixelHeight=n.height-i.top-e.top-e.bottom-i.bottom):(r.pixelWidth=n.width,r.pixelHeight=n.height)))),a},H=function(e,i){return-9&(8&i&&t.Qf(e)?4^i:i)},z=function(){},V=function(t,e,i){this.element=t,this.i=e,this.K=i},q=function(t,e,i,n){V.call(this,t,e),this.o=i?5:0,this.D=n||void 0},W=function(t,e){return 48&t&&(e^=4),192&t&&(e^=1),e},Y=function(){this.f=[]},K=function(t,e,i){var n=e.f.Ac("SPAN");n.className="anychart-submenu-arrow",X(e,n),t.Gn(i).appendChild(n)},X=function(e,i){t.Ey(e)?(t.Qj(i,"anychart-submenu-arrow-rtl"),t.df(i,"◄")):(t.Sj(i,"anychart-submenu-arrow-rtl"),t.df(i,"►"))},J=function(t,e,i,n){f.call(this,t,e,i,n||Y.Id())},Z=function(t){t.getParent().Pj((function(t){t!=this&&"function"==typeof t.Pl&&(t.Pl(),t.Vp())}),t)},Q=function(e,i){!i&&et(e)&&et(e).Wn(-1),e.dispatchEvent(t.Cy(64,i));var n=et(e);if(i!=e.MU){var s=e.Ya();i?t.Qj(s,"anychart-submenu-open"):t.Sj(s,"anychart-submenu-open")}if(i!=n.Oe()&&(i&&(n.xf||n.Sd(),n.Wn(-1)),n.Ji(i),i)){n=new q(e.Ya(),12,!1);var a=(s=et(e)).Ya();s.Oe()||(a.style.visibility="hidden",t.Pf(a,!0)),n.b(a,8),s.Oe()||(t.Pf(a,!1),a.style.visibility="visible")}e.MU=i},tt=function(e,i,n){var s=t.Dy(e);(n?s.wa:s.gc).call(s,i,"enter",e.aga)},et=function(t){return t.Wl?t.$M&&t.Wl.getParent()!=t&&t.Wl.fl(t):it(t,new M(t.f)),t.Wl.Ya()||t.Wl.Ac(),t.Wl},it=function(t,e){var i=t.Wl;e!=i&&(i&&(t.Pl(),t.xf&&tt(t,i,!1)),t.Wl=e,t.$M=!1,e&&(e.fl(t),e.Ji(!1,!0),_(e,!1),D(e,!1),t.xf&&tt(t,e,!0)))},nt=function(){this.f=[]},st=function(t,e,i){(e=e.f.Ac("span")).className="anychart-submenu-arrow",e.innerHTML="&nbsp;",t.Gn(i).appendChild(e)},at=function(t,e,i){f.call(this,t,void 0,void 0,nt.Id()),this.P=i||!1,this.b=e||null},ot=function(t){t.getParent().Pj((function(t){t!=this&&"function"==typeof t.Pl&&(t.Pl(),t.Vp())}),t)},rt=function(e,i){!i&&ht(e)&&ht(e).Wn(-1),e.dispatchEvent(t.Cy(64,i));var n=ht(e);if(i!=e.FR){var s=e.Ya();i?t.Qj(s,"anychart-submenu-open"):t.Sj(s,"anychart-submenu-open")}if(i!=n.Oe()&&(i&&(n.xf||n.Sd(e.b),n.Wn(-1)),n.Ji(i),i)){n=new q(e.Ya(),12,!1);var a=ht(e),o=a.Ya();a.Oe()||(o.style.visibility="hidden",t.Pf(o,!0)),n.b(o,8),a.Oe()||(t.Pf(o,!1),o.style.visibility="visible"),n=t.Ee(window),s=t.Of(o),o=t.Hf(o),a=a.P;var r=t.Of(a);a.style.maxHeight=n.height-o.y-(s.height-r.height)-15+"px"}e.FR=i},lt=function(e,i,n){var s=t.Dy(e);(n?s.wa:s.gc).call(s,i,"enter",e.hda)},ht=function(t){if(t.Kl)t.RK&&t.Kl.getParent()!=t&&t.Kl.fl(t);else{var e=t.P?xt.Id():void 0;e=new N(t.f,e);var i=t.Kl;e!=i&&(i&&(t.Pl(),t.xf&&lt(t,i,!1)),t.Kl=e,t.RK=!1,e&&(e.fl(t),e.Ji(!1,!0),_(e,!1),D(e,!1),t.xf&&lt(t,e,!0)))}return t.Kl.Ya()||t.Kl.Ac(),t.Kl},ct=function(e,i){this.i=e instanceof t.gb?e:new t.gb(e,i)},ut=function(t,e){ct.call(this,t,e)},dt=function(t,e,i,n){q.call(this,t,e,i||n),(i||n)&&this.f(65|(n?32:132))},pt=function(e,i){M.call(this,e,i),_(this,!0),this.Ji(!1,!0),this.i=new t.ZB},gt=function(e,i,n,s){var a=e.Oe();e.Oe()||(0,t.Ln)(),e.dispatchEvent("beforeshow")&&(n=void 0!==n?n:8,a||(e.Ya().style.visibility="hidden"),t.Pf(e.Ya(),!0),i.b(e.Ya(),n,s),a||(e.Ya().style.visibility="visible"),e.Wn(-1),e.Ji(!0))},ft=function(e,i){for(var n=e.i.Yt(),s=0;s<n.length;s++){var a=e.i.get(n[s]);if(a.Ed==i.currentTarget){n=e,(s=t.p(a.v6)?new q(a.Ed,a.v6,!0):new ut(i.clientX,i.clientY)).f&&s.f(5),gt(n,s,a.Qha,a.Qc),i.preventDefault(),i.stopPropagation();break}}},mt=function(){pt.call(this),this.K=!1,this.b=this.Aj=this.qL=null,this.na=!1,this.ba=t.Me("div",{id:"anychart-menu-wrapper"}),this.aa=function(t){return t},this.ea=function(){return{}},i(this,{}),this.Ha=(0,t.pa)(this.show,this),this.wa("action",(function(e){var i=e.target.dh;e={type:i.eventType||"action",event:e,target:this.qL,item:i},this.Aj&&(e.menuParent=this.Aj,t.D(this.Aj.getSelectedPoints)&&(e.selectedPoints=this.Aj.getSelectedPoints()||[])),t.D(i.action)&&i.action.call(e,e),i.eventType&&this.dispatchEvent(e)}))},vt=function(e,i,n){if(i={event:i,target:n,menu:e},e.Aj){if(null===(n=e.Aj.container()?e.Aj.container().getStage():null)||"none"==t.zf(n.domElement(),"border-style"))return!1;i.menuParent=e.Aj,i.chart=e.Aj,t.D(e.Aj.getSelectedPoints)&&(i.selectedPoints=e.Aj.getSelectedPoints()||[]),i=e.Aj.uO(i)}return n=t.Sl(e.ea.call(i,i)),i=e.aa.call(n,n,i),e.dh=i,e.na=!0,!t.Jc(i)},bt=function(e,i,n){var s,a=[];for(s in n){var o=n[s];n.hasOwnProperty(s)&&t.Ua(a,o,e.iha)}for(s=0;s<a.length;s++){if(null!=(n=a[s]))var r=t.z(n.classNames)?n.classNames.split(" "):n.classNames||[];o=t.qs(n.text)||"",n.text?n.subMenu?(o=new at(o,e.ba),r.length&&t.vD(o,r.join(" ")),t.da(n.enabled)&&o.Dj(n.enabled),bt(e,o,n.subMenu),yt(i,o),t.p(n.iconClass)&&St(o,n.iconClass)):(n.href&&(o=t.Me("A",{href:n.href,target:n.target||"_blank"},o),r.unshift("anychart-menuitem-link")),o=new m(o,n),r.length&&t.vD(o,r.join(" ")),t.da(n.enabled)&&o.Dj(n.enabled),t.da(n.scrollable)&&o.b(n.scrollable),yt(i,o),t.p(n.iconClass)&&St(o,n.iconClass)):yt(i,new F)}},yt=function(e,i){t.J(e,at)?e.QK(i):e.hc(i,!0)},St=function(e,i){var n=e.Ya();if(n){var s=t.Ae(window.document,"I",null,n)[0];i?s?(s.className=i,t.Pf(s,!0)):(s=t.Me("I",i),t.zy(s,"hidden",!0),t.We(n,s,0)):s&&t.Pf(s,!1)}},xt=function(t){U.call(this,t)},wt=function(){},Ct=function(e,i){if(e)for(var n,s=i?e.firstChild:e.lastChild;s&&s.parentNode==e&&(n=i?s.nextSibling:s.previousSibling,3==s.nodeType);){var a=s.nodeValue;if(""!=(0,t.vc)(a)){s.nodeValue=i?t.nc(a):a.replace(/[\s\xa0]+$/,"");break}e.removeChild(s),s=n}},Tt=function(){},Dt=function(){},kt=function(){},$t=function(e,i,n,s,a){t.ID.call(this,e,n||Tt.Id(),s),this.hn(64,!0),this.aa=new dt(null,9),i&&Ot(this,i),this.P=new l(500),!t.$D&&!t.aE||t.bd("533.17.9")||(this.tN=!0),this.Ha=a||U.Id()},Ot=function(e,i){var n=e.b;i!=n&&(n&&(e.Cl(!1),e.xf&&Lt(e,n,!1),delete e.b),e.xf&&t.zy(e.Ed,"haspopup",!!i),i&&(e.b=i,i.fl(e),i.Ji(!1),_(i,e.tN),e.xf&&Lt(e,i,!0)))},Pt=function(e){if(e.b.xf){var i=e.Ka||e.Ya(),n=e.aa;e.aa.element=i,i=e.b.Ya(),e.b.Oe()||(i.style.visibility="hidden",t.Pf(i,!0)),!e.ba&&e.aa.G&&32&e.aa.o&&(e.ba=t.Lf(i)),n.b(i,1^n.i,null,e.ba),e.b.Oe()||(t.Pf(i,!1),i.style.visibility="visible")}},Lt=function(e,i,n){var s=t.Dy(e);(n=n?s.wa:s.gc).call(s,i,"action",e.yga),n.call(s,i,"close",e.Yfa),n.call(s,i,"highlight",e.Zfa),n.call(s,i,"unhighlight",e.$fa)},It=function(e,i){var n=t.Dy(e);(i?n.wa:n.gc).call(n,e.Ya(),"keydown",e.vga)},At=function(e,i){var n=e.Ya(),s=i.getAttribute("aria-activedescendant");if(!(s=t.te(i).getElementById(null==s||null==s?"":String(s))||i).id){var a=t.Ay.Id();s.id=":"+(a.b++).toString(36)}h(n,s),t.zy(n,"owns",s.id)},Et=function(t,e,i,n){$t.call(this,t,e,i||Dt.Id(),n)},Gt=function(t,e,i,n){Et.call(this,t,e,i||kt.Id(),n)},Ut=function(){},Ft=function(){},Mt=function(t,e){G.call(this,t||Ft.Id(),e)},_t=function(){this.b="toolbar"},Nt=function(t,e,i){S.call(this,e,t||_t.Id(),i)},Rt=function(){Nt.call(this)},jt=function(){},Bt=function(e,i,n){t.ID.call(this,e,i||jt.Id(),n)},Ht=function(){Nt.call(this),this.ea="us-letter a0 a1 a2 a3 a4 a5 a6".split(" "),this.K="all",this.b=[],this.i=[],Vt(this),this.hc(new Mt,!0),this.P=new N(void 0,xt.Id());var e=new m("SVG");t.vD(e,"anychart-toolbar-saveAsSvg"),e.dh={Wt:"saveAsSvg",icon:"ac-file-code-o",text:"SVG"},this.P.hc(e,!0),Wt(e,!0,!0),this.i.push(e),e=new m("PNG"),t.vD(e,"anychart-toolbar-saveAsPng"),e.dh={Wt:"saveAsPng",icon:"ac-file-image-o",text:"PNG"},this.P.hc(e,!0),Wt(e,!0,!0),this.i.push(e),e=new m("JPG"),t.vD(e,"anychart-toolbar-saveAsJpg"),e.dh={Wt:"saveAsJpg",icon:"ac-file-image-o",text:"JPG"},this.P.hc(e,!0),Wt(e,!0,!0),this.i.push(e),e=new at("PDF",void 0,!0),t.vD(e,"anychart-toolbar-saveAsPdf");for(var i=1;i<this.ea.length;i++){var n=this.ea[i],s=new m(n.toUpperCase());s.dh={Wt:"saveAsPdf",V_:[n]},t.vD(s,"anychart-toolbar-saveAsPdf"),e.QK(s)}this.P.hc(e,!0),e.dh={icon:"ac-file-pdf-o",text:"PDF"},Wt(e,!0,!0),this.i.push(e),e=Yt("saveAs"),i=new Gt(e,this.P),t.vD(i,"anychart-toolbar-saveAs"),i.dh={id:"saveAs",text:e,icon:"ac-save"},this.hc(i,!0),this.b.push(i),this.hc(new Mt,!0),e=Yt("zoomIn"),i=new Bt(e),t.vD(i,"anychart-toolbar-zoomIn"),i.dh={id:"zoomIn",Wt:"zoomIn",text:e,icon:"ac-zoom-in"},this.hc(i,!0),this.b.push(i),e=Yt("zoomOut"),i=new Bt(e),t.vD(i,"anychart-toolbar-zoomOut"),i.dh={id:"zoomOut",Wt:"zoomOut",text:e,icon:"ac-zoom-out"},this.hc(i,!0),this.b.push(i),e=Yt("fitAll"),i=new Bt(e),t.vD(i,"anychart-toolbar-fitAll"),i.dh={id:"fitAll",Wt:"fitAll",text:e,icon:"ac-dot-square-o"},this.hc(i,!0),this.b.push(i),this.hc(new Mt,!0),e=Yt("expandAll"),i=new Bt(e),t.vD(i,"anychart-toolbar-expandAll"),i.dh={id:"expandAll",Wt:"expandAll",text:e,icon:"ac-expand"},this.hc(i,!0),this.b.push(i),e=Yt("collapseAll"),i=new Bt(e),t.vD(i,"anychart-toolbar-collapseAll"),i.dh={id:"collapseAll",Wt:"collapseAll",text:e,icon:"ac-collapse"},this.hc(i,!0),this.b.push(i),this.CO={xe:be,we:ve},this.aa=null,this.wa("action",this.cga)},zt=function(e,i,n,s,a){i=new at(i,void 0,!0);var o=(0,t.Wa)(n,(function(t){var e=t.value;return(t=new m(t.caption)).dh=e,t.hn(8,!0),t.rJ(e==a),t}));return(0,t.Pe)(o,i.QK,i),i.wa("action",(function(e){var i=e.target,n=i.vj();(0,t.Pe)(o,(function(t){t.rJ(t==i)})),s.call(this,n),e.stopPropagation()}),void 0,e),i},Vt=function(e){e.Xs=new N(void 0,xt.Id());var n=zt(e,Yt("changeLayout"),[{caption:Yt("landscape"),value:ve},{caption:Yt("portrait"),value:"portrait"}],(function(t){this.CO.we=t,this.Xs.Ji(!0,!0)}),ve),s=zt(e,Yt("changeRange"),[{caption:Yt("allDates"),value:"full"},{caption:Yt("visibleDates"),value:be}],(function(t){this.CO.xe=t,this.Xs.Ji(!0,!0)}),be);e.Xs.hc(n,!0),e.Xs.hc(s,!0),e.Xs.hc(new F,!0),n=Yt("print"),e.ba=new Gt(n,e.Xs),t.vD(e.ba,"anychart-toolbar-print"),i(e.ba,{id:"print",text:n,icon:"ac-print"}),e.hc(e.ba,!0),e.b.push(e.ba)},qt=function(t){for(var e,i=0;i<t.b.length;i++)switch(e=t.b[i],t.K){case"all":Wt(e,!0,!0);break;case"icon":Wt(e,!0,!1);break;case"text":Wt(e,!1,!0)}for(i=0;i<t.i.length;i++)switch(e=t.i[i],t.K){case"text":Wt(e,!1,!0);break;case"all":case"icon":Wt(e,!0,!0)}},Wt=function(e,i,s){var a=e.Ya(),o=e.dh,r=o.icon,l=o.text,h=t.J(e,Gt)||t.J(e,Bt);if(a){o=t.Ae(window.document,"I","anychart-toolbar-item-icon",a)[0];var c=t.Ae(window.document,"SPAN","anychart-toolbar-item-text",a)[0];o&&c||(o||(o=t.Me("I",["anychart-toolbar-item-icon",r]),t.zy(o,"hidden",!0)),c||(c=t.Me("SPAN","anychart-toolbar-item-text"),t.df(c,l||"")),h?(a=t.Me("DIV"),t.We(a,o,0),t.We(a,c,1),n(e,a)):(n(e,c),t.We(a,o,0))),t.da(s)&&t.Pf(c,s),t.da(i)&&t.Pf(o,i)}},Yt=function(e){return t.qs(me[e])},Kt=function(){t.By.call(this)},Xt=function(e,i){var n=e.f,s=i||e.Ya();t.Qj(s,"anychart-loader"),n=n.Ac("DIV","anychart-loader-rotating-cover",n.Ac("DIV","anychart-loader-rotating-plane",n.Ac("DIV","anychart-loader-chart-row",n.Ac("DIV",["anychart-loader-chart-col","anychart-loader-green"]),n.Ac("DIV",["anychart-loader-chart-col","anychart-loader-orange"]),n.Ac("DIV",["anychart-loader-chart-col","anychart-loader-red"])))),e.hj=!1,t.Pf(e.Ya(),e.hj),s.appendChild(n)},Jt=function(t){try{return"number"==typeof t.selectionStart}catch(e){return!1}},Zt=function(){t.By.call(this),this.b=null,this.QT="yyyy MMM dd",this.ba=null,this.na="From:",this.P=null,this.Ha="To:",this.Za=!1,this.Ka=this.Ba=window.NaN},Qt=function(e){e.i&&t.My(e.i,t.eq.format.dateTime(e.Ba,e.format())),e.K&&t.My(e.K,t.eq.format.dateTime(e.Ka,e.format()))},te=function(e){var i=e.f,n=e.Ya();t.Qj(n,"anychart-range-picker"),e.Za&&t.Qj(n,"anychart-range-picker-inside"),e.ba=i.Ac("LABEL",["anychart-inline-block","anychart-input-label"],t.eq.format.getMessage(e.na)),n.appendChild(e.ba),e.i=new t.Hy,e.hc(e.i,!0),t.Rj(e.i.Ya(),["anychart-label-input"]),e.P=i.Ac("LABEL",["anychart-inline-block","anychart-input-label"],t.eq.format.getMessage(e.Ha)),n.appendChild(e.P),e.K=new t.Hy,e.hc(e.K,!0),t.Rj(e.K.Ya(),["anychart-label-input"]),e.b&&e.ER(e.b.getSelectedRange())},ee=function(e){return e&&t.D(e.getType)&&"stock"==e.getType()},ie=function(e,i,n){t.LD.call(this,e,i,n),t.vD(this,"anychart-inline-block"),t.vD(this,"anychart-button-standard"),t.vD(this,we),this.hn(16,!0),this.mv&=-17},ne=function(e){t.qf.call(this),this.Ub=[],se(this,e)},se=function(e,i){i&&((0,t.Pe)(i,(function(t){oe(this,t,!1)}),e),t.Ia(e.Ub,i))},ae=function(t,e){e!=t.CH&&(oe(t,t.CH,!1),t.CH=e,oe(t,e,!0)),t.dispatchEvent("select")},oe=function(t,e,i){e&&("function"==typeof t.LU?t.LU(e,i):"function"==typeof e.rJ&&e.rJ(i))},re=function(){t.By.call(this),this.b=null,this.aa=!1,this.K=null,this.P="Zoom:",this.jd=[],this.Yy([{type:"unit",unit:"Day",count:10,text:"10D"},{type:"unit",unit:"Month",count:1,text:"1M"},{type:"unit",unit:"Month",count:3,text:"3M"},{type:"ytd",text:"YTD"},{type:"unit",unit:"Year",count:1,text:"1Y"},{type:"unit",unit:"Year",count:2,text:"2Y"},{type:"unit",unit:"Year",count:5,text:"5Y"},{type:"max",text:"MAX"}]),this.i=new ne,this.i.LU=this.eda},le=function(e){var i=e.Ya();t.Qj(i,"anychart-range-selector"),e.aa&&t.Qj(i,"anychart-range-selector-inside"),e.K=t.Me("LABEL",["anychart-inline-block","anychart-input-label"],t.eq.format.getMessage(e.P)),i.appendChild(e.K)},he=function(e){return e&&t.D(e.getType)&&"stock"==e.getType()},ce=function(){t.By.call(this),this.b=null},ue=function(e){var i=e.Ya();t.Qj(i,"anychart-zoom"),e.i=new t.LD,e.i.dh={type:"fitAll"},t.JD(e.i,"Fit All"),t.vD(e.i,"anychart-zoom-zoomFitAll"),t.ND(e.i,"ac ac-dot-square-o disable-selection"),e.hc(e.i,!0),e.K=new t.LD,e.K.dh={type:"zoomIn"},t.JD(e.K,"Zoom In"),t.vD(e.K,"anychart-zoom-zoomIn"),t.ND(e.K,"ac ac-plus disable-selection"),e.hc(e.K,!0),e.P=new t.LD,e.P.dh={type:"zoomOut"},t.JD(e.P,"Zoom Out"),t.vD(e.P,"anychart-zoom-zoomOut"),t.ND(e.P,"ac ac-minus disable-selection"),e.hc(e.P,!0)},de=function(e){return e&&t.D(e.getType)&&"map"==e.getType()};t.dD.prototype.ew=t.ca(36,(function(e,i){var n=this.Gn(e);if(n&&(t.Ve(n),i))if(t.z(i))t.df(n,i);else{var s=function(e){if(e){var i=t.te(n);n.appendChild(t.z(e)?i.createTextNode(e):e)}};t.A(i)?(0,t.Pe)(i,s):!t.la(i)||"nodeType"in i?s(i):(0,t.Pe)(t.Ha(i),s)}})),t.dD.prototype.qH=t.ca(35,(function(e){if(!this.i){this.b||t.mD(this);var i,n=this.b,s={};for(i in n)s[n[i]]=i;this.i=s}return e=(0,window.parseInt)(this.i[e],10),(0,window.isNaN)(e)?0:e})),t.dD.prototype.Xk=t.ca(34,(function(i,n){n.id&&e(i,n.id);var s=this.Gn(n);s&&s.firstChild?function(t,e){t.Qd=e}(i,s.firstChild.nextSibling?t.Ha(s.childNodes):s.firstChild):i.Qd=null;var a=0,o=this.Hh(),r=this.Hh(),l=!1,h=!1,c=!1,u=t.Ha(t.Kj(n));(0,t.Pe)(u,(function(e){l||e!=o?h||e!=r?a|=this.qH(e):h=!0:(l=!0,r==o&&(h=!0)),1==this.qH(e)&&t.gf(s)&&t.jf(s)&&t.ff(s,!1)}),this),i.dc=a,l||(u.push(o),r==o&&(h=!0)),h||u.push(r);var d=i.Cs;if(d&&u.push.apply(u,d),t.hd&&!t.bd("7")){var p=t.eD(u);0<p.length&&(u.push.apply(u,p),c=!0)}return l&&h&&!d&&!c||(n.className=u.join(" ")),n})),t.nD.prototype.Xk=t.ca(33,(function(e,i){return i=t.nD.u.Xk.call(this,e,i),e.SX(this.vj(i)),e.gb=i.title,t.hD(e,16)&&this.Tu(i,16,t.iD(e,16)),i})),t.HD.prototype.Xk=t.ca(32,(function(e,i){if(t.uD(e,!1),e.mv&=-256,e.hn(32,!1),i.disabled){var n=this.$G(1);t.Qj(i,n)}return t.HD.u.Xk.call(this,e,i)})),t.dD.prototype.yH=t.ca(31,(function(){return!0})),t.HD.prototype.yH=t.ca(30,(function(t){return"BUTTON"==t.tagName||"INPUT"==t.tagName&&("button"==t.type||"submit"==t.type||"reset"==t.type)})),t.By.prototype.pl=t.ca(22,(function(t){this.Ed=t})),t.Hy.prototype.pl=t.ca(21,(function(e){t.Hy.u.pl.call(this,e),this.i||(this.i=e.getAttribute("label")||"");var i=t.te(e);try{var n=i&&i.activeElement,s=n&&n.nodeName?n:null}catch(a){s=null}s==e&&(this.GH=!0,e=this.Ya(),t.Sj(e,"label-input-label")),t.Jy()&&(this.Ya().placeholder=this.i),e=this.Ya(),t.zy(e,"label",this.i)})),t.sD.prototype.pl=t.ca(20,(function(e){this.Ed=e=this.i.Xk(this,e),t.gD(this.i,e,this.lH()),this.i.GU(e,!1),this.hj="none"!=e.style.display})),t.By.prototype.xH=t.ca(19,(function(){return!0})),t.sD.prototype.xH=t.ca(18,(function(t){return this.i.yH(t)})),t.By.prototype.Bs=t.ca(17,(function(e){if(this.xf)throw Error("Component already rendered");if(!e||!this.xH(e))throw Error("Invalid element to decorate");this.fb=!0;var i=t.te(e);this.f&&this.f.b==i||(this.f=t.ye(e)),this.pl(e),this.Gg()})),t.ux.prototype.uO=t.ca(16,(function(t){return t})),t.H(l,t.qf),t.g=l.prototype,t.g.enabled=!1,t.g.bw=null,t.g.ela=function(){if(this.enabled){var e=(0,t.Ln)()-this.o;0<e&&e<.8*this.f?this.bw=this.b.setTimeout(this.i,this.f-e):(this.bw&&(this.b.clearTimeout(this.bw),this.bw=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}},t.g.start=function(){this.enabled=!0,this.bw||(this.bw=this.b.setTimeout(this.i,this.f),this.o=(0,t.Ln)())},t.g.stop=function(){this.enabled=!1,this.bw&&(this.b.clearTimeout(this.bw),this.bw=null)},t.g.R=function(){l.u.R.call(this),this.stop(),delete this.b},t.H(c,t.dD),t.ja(c),t.g=c.prototype,t.g.zH=function(){return"menuitem"},t.g.Ac=function(e){var i=e.f.Ac("DIV",t.kD(this,e).join(" "),d(this,e.Qd,e.f));return g(this,e,i,t.hD(e,8)||t.hD(e,16)),i},t.g.Gn=function(t){return t&&t.firstChild},t.g.Xk=function(e,i){var n=t.$e(i),s=u(this,2);return n&&t.Lj(n,s)||i.appendChild(d(this,i.childNodes,e.f)),t.Lj(i,"anychart-option")&&(e.hn(16,!0),e&&i&&g(this,e,i,!0)),c.u.Xk.call(this,e,i)},t.g.ew=function(t,e){var i=this.Gn(t),n=p(this,t)?i.firstChild:null;c.u.ew.call(this,t,e),n&&!p(this,t)&&i.insertBefore(n,i.firstChild||null)},t.g.$G=function(t){switch(t){case 2:return u(this,0);case 16:case 8:return"anychart-option-selected";default:return c.u.$G.call(this,t)}},t.g.qH=function(t){var e=u(this,0);switch(t){case"anychart-option-selected":return 16;case e:return 2;default:return c.u.qH.call(this,t)}},t.g.Hh=function(){return"anychart-menuitem"},t.H(f,t.sD),t.g=f.prototype,t.g.vj=function(){var t=this.dh;return null!=t?t:this.AM()},t.g.hn=function(e,i){switch(f.u.hn.call(this,e,i),e){case 8:t.iD(this,16)&&!i&&t.CD(this,!1);var n=this.Ya();n&&this&&n&&g(this.i,this,n,i);break;case 16:(n=this.Ya())&&this&&n&&g(this.i,this,n,i)}},t.g.AM=function(){var e=this.Qd;return t.A(e)?(e=(0,t.Wa)(e,(function(e){return t.af(e)&&(t.Lj(e,"anychart-menuitem-accel")||t.Lj(e,"anychart-menuitem-mnemonic-separator"))?"":t.lf(e)})).join(""),t.lc(e)):f.u.AM.call(this)},t.g.tr=function(e){var i=this.getParent();if(i){var n=i.Ba;if(i.Ba=null,n&&t.ea(e.clientX)&&t.ib(n,new t.gb(e.clientX,e.clientY)))return}f.u.tr.call(this,e)},t.g.EA=function(t){return!(t.keyCode!=this.VN||!this.Vs(t))||f.u.EA.call(this,t)},t.g.Hfa=function(){return this.VN},t.qD("anychart-menuitem",(function(){return new f(null)})),f.prototype.lH=function(){return t.hD(this,16)?"menuitemcheckbox":t.hD(this,8)?"menuitemradio":f.u.lH.call(this)},f.prototype.getParent=function(){return t.sD.prototype.getParent.call(this)},f.prototype.Zi=function(){return t.sD.prototype.Zi.call(this)},t.H(m,f),m.prototype.b=function(e){return t.p(e)?(this.P=e,this):this.P},m.prototype.vE=function(e,i){this.b()&&t.p(this.getParent().Ka)?m.u.vE.call(this,this.getParent().P,i):m.u.vE.call(this,e,i)},t.ja(v),t.g=v.prototype,t.g.Ac=function(t){return t.f.Ac("DIV",function(t,e){var i=t.BD(),n=[i,e.vh==pe?i+"-horizontal":i+"-vertical"];return e.isEnabled()||n.push(i+"-disabled"),n}(this,t).join(" "))},t.g.DU=function(t){return"DIV"==t.tagName},t.g.bH=function(e){t:{for(var i=0,n=(e=t.Kj(e)).length;i<n;i++){var s=e[i];if(s=s in t.pD?t.pD[s]():null){e=s;break t}}e=null}return e},t.g.EU=function(e){e=e.Ya(),t.Sf(e,!0,t.gd),t.hd&&(e.hideFocus=!0);var i=this.b;i&&t.xy(e,i)},t.g.BD=function(){return"anychart-container"},t.g.R1=function(){return ge},t.H(S,t.By);var pe="horizontal",ge="vertical";t.g=S.prototype,t.g.NV=null,t.g.Zl=null,t.g.dw=null,t.g.vh=null,t.g.hj=!0,t.g.DA=!0,t.g.kD=!0,t.g.ul=-1,t.g.dm=null,t.g.vu=!1,t.g.tv=null,t.g.Ac=function(){this.Ed=this.dw.Ac(this)},t.g.AD=function(){return this.Ya()},t.g.xH=function(t){return this.dw.DU(t)},t.g.pl=function(i){this.Ed=function(i,n,s){s.id&&e(n,s.id);var a=i.BD(),o=!1,r=t.Kj(s);return r&&(0,t.Pe)(r,(function(t){t==a?o=!0:t&&(t==a+"-disabled"?n.Dj(!1):t==a+"-horizontal"?T(n,pe):t==a+"-vertical"&&T(n,ge))}),i),o||t.Qj(s,a),y(i,n,s),s}(this.dw,this,i),"none"==i.style.display&&(this.hj=!1)},t.g.Gg=function(){S.u.Gg.call(this),this.Pj((function(t){t.xf&&C(this,t)}),this);var e=this.Ya();this.dw.EU(this),this.Ji(this.hj,!0),t.Dy(this).wa(this,"enter",this.FH).wa(this,"highlight",this.Vfa).wa(this,"unhighlight",this.Wfa).wa(this,"open",this.Bga).wa(this,"close",this.Ufa).wa(e,t.xD.oF,this.Sj).wa(t.te(e),[t.xD.pF,t.xD.nF],this.nga).wa(e,[t.xD.oF,t.xD.pF,t.xD.nF,"mouseover","mouseout","contextmenu"],this.kga),this.kD&&w(this,!0)},t.g.Dh=function(){this.Wn(-1),this.dm&&this.dm.Cl(!1),this.vu=!1,S.u.Dh.call(this)},t.g.R=function(){S.u.R.call(this),this.Zl&&(this.Zl.ld(),this.Zl=null),this.dw=this.dm=this.tv=this.NV=null},t.g.FH=function(){return!0},t.g.Vfa=function(e){var i=this.Kf(e.target);if(-1<i&&i!=this.ul){var n=k(this);n&&n.rq(!1),this.ul=i,n=k(this),this.vu&&t.BD(n,!0),this.dm&&n!=this.dm&&(t.hD(n,64)?n.Cl(!0):this.dm.Cl(!1))}i=this.Ya(),null!=e.target.Ya()&&t.zy(i,"activedescendant",e.target.Ya().id)},t.g.Wfa=function(t){t.target==k(this)&&(this.ul=-1),this.Ya().removeAttribute("aria-activedescendant")},t.g.Bga=function(t){(t=t.target)&&t!=this.dm&&t.getParent()==this&&(this.dm&&this.dm.Cl(!1),this.dm=t)},t.g.Ufa=function(e){e.target==this.dm&&(this.dm=null);var i=this.Ya(),n=e.target.Ya();i&&t.iD(e.target,2)&&n&&h(i,n)},t.g.Sj=function(e){this.DA&&(this.vu=!0);var i=x(this);i&&t.gf(i)&&t.jf(i)?i.focus():e.preventDefault()},t.g.nga=function(){this.vu=!1},t.g.kga=function(e){t:{var i=e.target;if(this.tv)for(var n=this.Ya();i&&i!==n;){var s=i.id;if(s in this.tv){i=this.tv[s];break t}i=i.parentNode}i=null}if(i)switch(e.type){case t.xD.oF:i.Sj(e);break;case t.xD.pF:case t.xD.nF:i.tr(e);break;case"mouseover":i.po(e);break;case"mouseout":i.hg(e);break;case"contextmenu":i.BH(e)}},t.g.YM=function(){},t.g.XM=function(){this.Wn(-1),this.vu=!1,this.dm&&this.dm.Cl(!1)},t.g.oo=function(e){return!(!this.isEnabled()||!this.Oe()||0==t.Fy(this)&&!this.NV||!this.FU(e)||(e.preventDefault(),e.stopPropagation(),0))},t.g.FU=function(e){var i=k(this);if(i&&"function"==typeof i.oo&&i.oo(e)||this.dm&&this.dm!=i&&"function"==typeof this.dm.oo&&this.dm.oo(e))return!0;if(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)return!1;switch(e.keyCode){case 27:if(!this.kD)return!1;x(this).blur();break;case 36:$(this);break;case 35:!function(t){L(t,(function(t,e){return 0>--t?e-1:t}),0)}(this);break;case 38:if(this.vh!=ge)return!1;P(this);break;case 37:if(this.vh!=pe)return!1;t.Ey(this)?O(this):P(this);break;case 40:if(this.vh!=ge)return!1;O(this);break;case 39:if(this.vh!=pe)return!1;t.Ey(this)?P(this):O(this);break;default:return!1}return!0},t.g.hc=function(t,e){S.u.hc.call(this,t,e)},t.g.Eg=function(e,i,n){e.EJ|=2,e.EJ|=64,e.hn(32,!1),t.uD(e,!1);var s=e.getParent()==this?this.Kf(e):-1;S.u.Eg.call(this,e,i,n),e.xf&&this.xf&&C(this,e),-1==(e=s)&&(e=t.Fy(this)),e==this.ul?this.ul=Math.min(t.Fy(this)-1,i):e>this.ul&&i<=this.ul?this.ul++:e<this.ul&&i>this.ul&&this.ul--},t.g.removeChild=function(e,i){if(e=t.z(e)?t.Gy(this,e):e){var n=this.Kf(e);-1!=n&&(n==this.ul?(e.rq(!1),this.ul=-1):n<this.ul&&this.ul--),(n=e.Ya())&&n.id&&this.tv&&t.Lc(this.tv,n.id)}return e=S.u.removeChild.call(this,e,i),t.uD(e,!0),e},t.g.Oe=function(){return this.hj},t.g.Ji=function(e,i){if(i||this.hj!=e&&this.dispatchEvent(e?"show":"hide")){this.hj=e;var n=this.Ya();return n&&(t.Pf(n,e),this.kD&&b(x(this),this.DA&&this.hj),i||this.dispatchEvent(this.hj?"aftershow":"afterhide")),!0}return!1},t.g.isEnabled=function(){return this.DA},t.g.Dj=function(t){this.DA!=t&&this.dispatchEvent(t?"enable":"disable")&&(t?(this.DA=!0,this.Pj((function(t){t.e7?delete t.e7:t.Dj(!0)}))):(this.Pj((function(t){t.isEnabled()?t.Dj(!1):t.e7=!0})),this.vu=this.DA=!1),this.kD&&b(x(this),t&&this.hj))},t.g.Wn=function(t){(t=this.xd(t))?t.rq(!0):-1<this.ul&&k(this).rq(!1)},t.g.p0=function(e){return e.Oe()&&e.isEnabled()&&t.hD(e,2)},t.H(I,t.dD),t.ja(I),I.prototype.Hh=function(){return"anychart-menuheader"},t.H(A,t.sD),t.qD("anychart-menuheader",(function(){return new A(null)})),t.H(E,t.dD),t.ja(E),E.prototype.Ac=function(t){return t.f.Ac("DIV",this.Hh())},E.prototype.Xk=function(i,n){if(n.id&&e(i,n.id),"HR"==n.tagName){var s=n;n=this.Ac(i),s.parentNode&&s.parentNode.insertBefore(n,s),t.Xe(s)}else t.Qj(n,this.Hh());return n},E.prototype.ew=function(){},E.prototype.Hh=function(){return"anychart-menuseparator"},t.H(G,t.sD),G.prototype.Gg=function(){G.u.Gg.call(this);var e=this.Ya();t.xy(e,"separator")},t.qD("anychart-menuseparator",(function(){return new G})),t.H(U,v),t.ja(U),t.g=U.prototype,t.g.DU=function(t){return"UL"==t.tagName||U.u.DU.call(this,t)},t.g.bH=function(t){return"HR"==t.tagName?new G:U.u.bH.call(this,t)},t.g.cr=function(e,i){return t.cf(e.Ya(),i)},t.g.BD=function(){return"anychart-menu"},t.g.EU=function(e){U.u.EU.call(this,e),e=e.Ya(),t.zy(e,"haspopup","true")},t.H(F,G),t.qD("anychart-menuseparator",(function(){return new G})),t.H(M,S),t.g=M.prototype,t.g.CF=!0,t.g.cr=function(e){if(this.dw.cr(this,e))return!0;for(var i=0,n=t.Fy(this);i<n;i++){var s=this.xd(i);if("function"==typeof s.cr&&s.cr(e))return!0}return!1},t.g.QK=function(t){this.hc(t,!0)},t.g.py=function(t){return this.xd(t)},t.g.zm=function(){var t=[];return this.Pj((function(e){t.push(e)})),t},t.g.setPosition=function(e,i){var n=this.Oe();n||t.Pf(this.Ya(),!0);var s=this.Ya(),a=e,o=i,r=t.Ff(s);a instanceof t.gb&&(o=a.y,a=a.x),t.Cf(s,s.offsetLeft+(a-r.x),s.offsetTop+(Number(o)-r.y)),n||t.Pf(this.Ya(),!1)},t.g.Ji=function(e,i,n){return(i=M.u.Ji.call(this,e,i))&&e&&this.xf&&this.CF&&x(this).focus(),e&&n&&t.ea(n.clientX)?this.Ba=new t.gb(n.clientX,n.clientY):this.Ba=null,i},t.g.FH=function(t){return this.CF&&x(this).focus(),M.u.FH.call(this,t)},t.g.p0=function(e){return e.isEnabled()&&e.Oe()&&t.hD(e,2)},t.g.pl=function(e){for(var i=this.dw,n=t.Ae(this.f.b,"DIV",i.BD()+"-content",e),s=n.length,a=0;a<s;a++)y(i,this,n[a]);M.u.pl.call(this,e)},t.g.FU=function(t){var e=M.u.FU.call(this,t);return e||this.Pj((function(i){!e&&i.Hfa&&i.VN==t.keyCode&&(this.isEnabled()&&this.Wn(this.Kf(i)),e=i.oo(t))}),this),e},t.g.Wn=function(t){M.u.Wn.call(this,t),(t=this.xd(t))&&r(t.Ya(),this.Ya())},t.H(N,M),N.prototype.FH=function(){if(this.CF){var t=x(this);0!=t.offsetWidth&&t.focus()}return!0},N.prototype.Ka=function(){return this.P},N.prototype.Ac=function(){N.u.Ac.call(this),this.P=this.f.Ac("DIV","anychart-menu-scrollable"),t.We(this.Ya(),this.P,0)},N.prototype.Wn=function(t){N.u.Wn.call(this,t),(t=this.xd(t))&&r(t.Ya(),this.P)},z.prototype.b=function(){},t.H(V,z),V.prototype.b=function(t,e,i){R(this.element,this.i,t,e,void 0,i,this.K)},t.H(q,V),q.prototype.G=function(){return this.o},q.prototype.f=function(t){this.o=t},q.prototype.b=function(t,e,i,n){var s=R(this.element,this.i,t,e,null,i,10,n,this.D);if(496&s){var a=W(s,this.i);e=W(s,e),496&(s=R(this.element,a,t,e,null,i,10,n,this.D))&&(a=W(s,a),e=W(s,e),R(this.element,a,t,e,null,i,this.o,n,this.D))}},t.H(Y,c),t.ja(Y),Y.prototype.Ac=function(e){var i=Y.u.Ac.call(this,e);return t.Qj(i,"anychart-submenu"),K(this,e,i),i},Y.prototype.Xk=function(e,i){i=Y.u.Xk.call(this,e,i),t.Qj(i,"anychart-submenu"),K(this,e,i);var n=t.Ae(window.document,"DIV","anychart-menu",i);if(n.length){var s=new M(e.f);n=n[0],t.Pf(n,!1),e.f.b.body.appendChild(n),s.Bs(n),it(e,s)}return i},Y.prototype.ew=function(e,i){var n=this.Gn(e),s=n&&n.lastChild;Y.u.ew.call(this,e,i),s&&n.lastChild!=s&&t.Lj(s,"anychart-submenu-arrow")&&n.appendChild(s)},Y.prototype.CD=function(e){Y.u.CD.call(this,e);var i=e.AD(),n=t.Ae(e.f.b,"SPAN","anychart-submenu-arrow",i)[0];X(e,n),n!=i.lastChild&&i.appendChild(n),e=e.Ya(),t.zy(e,"haspopup","true")},t.H(J,f),t.g=J.prototype,t.g.DH=null,t.g.OU=null,t.g.MU=!1,t.g.Wl=null,t.g.$M=!1,t.g.Gg=function(){J.u.Gg.call(this),t.Dy(this).wa(this.getParent(),"hide",this.A2),this.Wl&&tt(this,this.Wl,!0)},t.g.Dh=function(){t.Dy(this).gc(this.getParent(),"hide",this.A2),this.Wl&&(tt(this,this.Wl,!1),this.$M||(this.Wl.Dh(),t.Xe(this.Wl.Ya()))),J.u.Dh.call(this)},t.g.R=function(){this.Wl&&!this.$M&&this.Wl.ld(),this.Wl=null,J.u.R.call(this)},t.g.rq=function(e){J.u.rq.call(this,e),e||(this.DH&&t.Ej(this.DH),this.DH=t.Dj(this.Pl,218,this))},t.g.NU=function(){var t=this.getParent();t&&k(t)==this&&(Q(this,!0),Z(this))},t.g.Pl=function(){var t=this.Wl;t&&t.getParent()==this&&(Q(this,!1),t.Pj((function(t){"function"==typeof t.Pl&&t.Pl()})))},t.g.Vp=function(){this.DH&&t.Ej(this.DH),this.OU&&t.Ej(this.OU)},t.g.Ji=function(t,e){var i=J.u.Ji.call(this,t,e);return i&&!this.Oe()&&this.Pl(),i},t.g.oo=function(e){var i=e.keyCode,n=t.Ey(this)?37:39,s=t.Ey(this)?39:37;if(this.MU){if(!et(this).oo(e)){if(i!=s)return!1;this.Pl()}}else{if(!this.isEnabled()||i!=n&&i!=this.VN)return!1;this.NU(),$(et(this)),this.Vp()}return e.preventDefault(),!0},t.g.aga=function(){if(this.Wl.getParent()==this){this.Vp();var t=this.Zi();t.Wn(t.Kf(this)),Z(this)}},t.g.A2=function(t){t.target==this.Zi()&&(this.Pl(),this.Vp())},t.g.po=function(e){this.isEnabled()&&(this.Vp(),this.OU=t.Dj(this.NU,218,this)),J.u.po.call(this,e)},t.g.Vs=function(e){return this.Vp(),t.hD(this,8)||t.hD(this,16)?J.u.Vs.call(this,e):(this.NU(),!0)},t.g.py=function(t){return et(this).xd(t)},t.g.zm=function(){return et(this).zm()},t.g.cr=function(t){return et(this).cr(t)},t.qD("anychart-submenu",(function(){return new J(null)})),t.H(nt,c),t.ja(nt),t.g=nt.prototype,t.g.Ac=function(e){var i=nt.u.Ac.call(this,e);return t.Qj(i,"anychart-submenu"),st(this,e,i),i},t.g.Xk=function(e,i){i=nt.u.Xk.call(this,e,i),t.Qj(i,"anychart-submenu"),st(this,e,i);var n=t.Ae(window.document,"div","anychart-menu",i);if(n.length){var s=new N(e.f);n=n[0],t.Pf(n,!1),e.f.b.body.appendChild(n),s.Bs(n),it(e,s)}return i},t.g.ew=function(e,i){var n=this.Gn(e),s=n&&n.lastChild;nt.u.ew.call(this,e,i),s&&n.lastChild!=s&&t.Lj(s,"anychart-submenu-arrow")&&n.appendChild(s)},t.g.CD=function(e){nt.u.CD.call(this,e);var i=e.AD(),n=t.Ae(e.f.b,"span","anychart-submenu-arrow",i)[0];n.innerHTML="&nbsp;",n!=i.lastChild&&i.appendChild(n),e=e.Ya(),t.zy(e,"haspopup","true")},t.g.Gn=function(t){return"I"==(t=t&&t.firstChild).tagName?t.nextSibling:t},t.H(at,f),t.g=at.prototype,t.g.QF=null,t.g.HR=null,t.g.FR=!1,t.g.Kl=null,t.g.RK=!1,t.g.Gg=function(){at.u.Gg.call(this),t.Dy(this).wa(this.getParent(),"hide",this.N_),this.Kl&&lt(this,this.Kl,!0)},t.g.Dh=function(){t.Dy(this).gc(this.getParent(),"hide",this.N_),this.Kl&&(lt(this,this.Kl,!1),this.RK||(this.Kl.Dh(),t.Xe(this.Kl.Ya()))),at.u.Dh.call(this)},t.g.R=function(){this.b=null,this.Kl&&!this.RK&&this.Kl.ld(),this.Kl=null,at.u.R.call(this)},t.g.rq=function(e){at.u.rq.call(this,e),e||(this.QF&&t.Ej(this.QF),this.QF=t.Dj(this.Pl,218,this))},t.g.GR=function(){var t=this.getParent();t&&k(t)==this&&(rt(this,!0),ot(this))},t.g.Pl=function(){var t=this.Kl;t&&t.getParent()==this&&(rt(this,!1),t.Pj((function(t){"function"==typeof t.Pl&&t.Pl()})))},t.g.Vp=function(){this.QF&&t.Ej(this.QF),this.HR&&t.Ej(this.HR)},t.g.Ji=function(t,e){var i=at.u.Ji.call(this,t,e);return i&&!this.Oe()&&this.Pl(),i},t.g.oo=function(e){var i=e.keyCode,n=t.Ey(this)?37:39,s=t.Ey(this)?39:37;if(this.FR){if(!ht(this).oo(e)){if(i!=s)return!1;this.Pl()}}else{if(!this.isEnabled()||i!=n&&i!=this.VN)return!1;this.GR(),$(ht(this)),this.Vp()}return e.preventDefault(),!0},t.g.hda=function(){if(this.Kl.getParent()==this){this.Vp();var t=this.Zi();t.Wn(t.Kf(this)),ot(this)}},t.g.N_=function(t){t.target==this.Zi()&&(this.Pl(),this.Vp())},t.g.po=function(e){this.isEnabled()&&(this.Vp(),this.HR=t.Dj(this.GR,218,this)),at.u.po.call(this,e)},t.g.Vs=function(e){return this.Vp(),t.hD(this,8)||t.hD(this,16)?at.u.Vs.call(this,e):(this.GR(),!0)},t.g.QK=function(t){ht(this).hc(t,!0)},t.g.py=function(t){return ht(this).xd(t)},t.g.cr=function(t){return ht(this).cr(t)},t.H(ct,z),ct.prototype.b=function(e,i,n,s){var a=t.te(e),o=a.body;a=a.documentElement,a=new t.gb(o.scrollLeft||a.scrollLeft,o.scrollTop||a.scrollTop),o=this.i.x+a.x,a=this.i.y+a.y;var r=j(e);o-=r.x,a-=r.y,B(new t.gb(o,a),e,i,n,null,null,s)},t.H(ut,ct),ut.prototype.o=0,ut.prototype.f=function(t){this.o=t},ut.prototype.b=function(e,i,n,s){var a=t.Df(e);a=o(a);var r=t.Fe(t.ye(e).b);r=new t.gb(this.i.x+r.scrollLeft,this.i.y+r.scrollTop);var l=i,h=B(r,e,l,n,a,10,s);0!=(496&h)&&((16&h||32&h)&&(l^=4),(64&h||128&h)&&(l^=1),0!=(496&(h=B(r,e,l,n,a,10,s)))&&B(r,e,i,n,a,this.o,s))},t.H(dt,q),t.H(pt,M),t.g=pt.prototype,t.g.pl=function(t){pt.u.pl.call(this,t),(t=t.getAttribute("for")||t.htmlFor)&&this.JU(this.f.Ya(t),1)},t.g.Gg=function(){pt.u.Gg.call(this),this.i.forEach(this.Z_,this);var e=t.Dy(this);e.wa(this,"action",this.Dia),e.wa(this.f.b,"mousedown",this.Qia,!0)},t.g.JU=function(e,i,n,s,a){var o;(o=!e)||(o=t.oa(e),o=!t.$B(this.i.f,o)),o&&(e?(i={Ed:e,v6:i,Qha:n,xT:s?"contextmenu":"mousedown",Qc:a},this.i.set(t.oa(e),i)):i=null,this.xf&&this.Z_(i),e=t.qa(this.Wia,e),this.Ya()&&t.Dy(this).wa(this.Ya(),"keydown",e))},t.g.Wia=function(e,i){if(27==i.keyCode)e.focus();else{var n=this.xd(this.ul);if(n){n=n.Ya();var s=new t.Bd(i.kf,n);s.target=n,32!=i.keyCode&&13!=i.keyCode||(t.Ed(n)?t.sf(n,"keydown",!1,s):t.ee(n,"keydown",!1,s)),32==i.keyCode&&this.Lc()}}},t.g.Z_=function(e){t.Dy(this).wa(e.Ed,e.xT,this.z4),"contextmenu"!=e.xT&&t.Dy(this).wa(e.Ed,"keydown",this.mja)},t.g.KU=function(e){var i;if((i=!e)||(i=t.oa(e),i=!t.$B(this.i.f,i)),i)throw Error("Menu not attached to provided element, unable to detach.");e=t.oa(e),this.xf&&(i=this.i.get(e),t.Dy(this).gc(i.Ed,i.xT,this.z4)),this.i.remove(e)},t.g.Lc=function(){this.Oe()&&(this.Ji(!1),this.Oe()||(0,t.Ln)())},t.g.Dia=function(){this.Lc()},t.g.z4=function(t){ft(this,t)},t.g.mja=function(t){32!=t.keyCode&&13!=t.keyCode&&40!=t.keyCode||ft(this,t),40==t.keyCode&&$(this)},t.g.Qia=function(t){this.Oe()&&!this.cr(t.target)&&this.Lc()},t.g.XM=function(t){pt.u.XM.call(this,t),this.Lc()},t.g.R=function(){pt.u.R.call(this),this.i&&(this.i.clear(),delete this.i)},t.H(mt,pt),t.g=mt.prototype,t.g.FH=function(){if(this.CF){var t=x(this);0!=t.offsetWidth&&t.focus()}return!0},t.g.mM=!0,t.g.enabled=function(e){return t.p(e)?(this.mM!=e&&(this.mM=e),this):this.mM},t.g.M_=function(e){e&&(this.b?t.Aa(this.b,e)||this.b.push(e):this.b=[e]),this.Ya()&&this.b&&this.b.length&&t.Rj(this.Ya(),this.b)},t.g.ada=function(e){e&&this.b&&t.Fa(this.b,e)&&(this.Ya()&&t.Sj(this.Ya(),e),this.b.length||(this.b=null))},t.g.items=function(t){return null!=t?(this.s3((function(){return t})),t.length||this.Lc(),this.dh=t,this):this.dh},t.g.s3=function(e){return t.D(e)?(this.ea!=e&&(this.ea=e,this.na=!1),this):this.ea},t.g.$ca=function(e){return t.p(e)?(this.aa!=e&&(this.aa=e),this):this.aa},t.g.EH=function(e){this.mM&&(this.pa&&this.pa.Ua().Lc(),this.qL=e.target,vt(this,e,this.qL),t.C(this.items())&&!t.Jc(this.items())&&(t.D(e.getOriginalEvent)?e.getOriginalEvent().preventDefault():e.preventDefault(),this.Aj&&t.D(this.Aj.getType)&&"map"==this.Aj.getType()?(0,window.setTimeout)(this.Ha,0,e.clientX,e.clientY):this.show(e.clientX,e.clientY)))},t.g.Sd=function(e){mt.u.Sd.call(this,e),this.b&&this.b.length&&t.Rj(this.Ya(),this.b)},t.g.JU=function(e,i){return e&&!this.K&&(this.K=!0,t.C(e)&&t.D(e.listen)?(this.Aj=e,this.Aj.listen("contextmenu",this.EH,i,this)):t.Dy(this).wa(e,"contextmenu",this.EH,i)),this},t.g.KU=function(e,i){return this.K&&(null!=this.Aj&&t.D(this.Aj.unlisten)?this.K=!this.Aj.unlisten("contextmenu",this.EH,i,this):t.be(e,"contextmenu",this.EH,i,this)&&(t.Dy(this).gc(e,"contextmenu",this.EH,i),this.K=!1),this.K||this.Lc()),this},t.g.show=function(e,i){if(this.na&&!t.Jc(this.items())||vt(this,null,this.Aj)){var n=this.Aj?this.Aj.O().Ja():null;for(n=n&&n.fullScreen()?n.Tl():t.Lp.body,this.ba.parentNode!=n&&n.appendChild(this.ba),this.xf||this.Sd(this.ba);this.o&&0!=this.o.length;)n=this.xd(0),this.removeChild(n),n.ld();bt(this,this,this.items()),(n=new ut(e,i)).f(197),gt(this,n)}},t.g.iha=function(e,i){return t.ea(e.index)?t.ea(i.index)?e.index-i.index||1:-1:1},t.g.R=function(){null!=this.Aj&&this.KU(),this.ba=this.b=this.Aj=this.qL=null,mt.u.R.call(this)},t.g.F=function(){var e={};return e.enabled=this.enabled(),this.b&&(e.extraClassNames=t.Ha(this.b)),e},t.g.N=function(e){return t.p(e)&&!this.Ie(e)&&t.C(e)&&this.U(e),this},t.g.Zd=function(e){return t.da(e)||null===e?{enabled:!!e}:null},t.g.Ie=function(t){return!!(t=this.Zd(t))&&(this.enabled(t.enabled),!0)},t.g.U=function(t){if(this.enabled(!("enabled"in t)||t.enabled),t=t.extraClassNames)for(var e=0,i=t.length;e<i;e++)this.M_(t[e])};var fe=mt.prototype;t.E("anychart.ui.contextMenu",(function(){return new mt})),fe.serialize=fe.F,fe.setup=fe.N,fe.enabled=fe.enabled,fe.addClassName=fe.M_,fe.removeClassName=fe.ada,fe.attach=fe.JU,fe.detach=fe.KU,fe.listen=fe.wa,fe.unlisten=fe.gc,fe.show=fe.show,fe.hide=fe.Lc,fe.items=fe.items,fe.itemsProvider=fe.s3,fe.itemsFormatter=fe.$ca,t.H(xt,U),t.ja(xt),xt.prototype.BD=function(){return"anychart-toolbar-menu"},t.H(wt,t.nD),t.ja(wt),t.g=wt.prototype,t.g.Ac=function(e){var i=t.kD(this,e);return i=e.f.Ac("DIV","anychart-inline-block "+i.join(" "),this.sL(e.Qd,e.f)),t.oD(i,e.gb),i},t.g.zH=function(){return"button"},t.g.Gn=function(t){return t&&t.firstChild&&t.firstChild.firstChild},t.g.sL=function(t,e){return e.Ac("DIV","anychart-inline-block "+this.Hh()+"-outer-box",e.Ac("DIV","anychart-inline-block "+this.Hh()+"-inner-box",t))},t.g.yH=function(t){return"DIV"==t.tagName},t.g.Xk=function(e,i){Ct(i,!0),Ct(i,!1);var n=e.f.W1(i),s=this.Hh()+"-outer-box";return(n=!!(n&&t.Lj(n,s)&&(n=e.f.W1(n),s=this.Hh()+"-inner-box",n&&t.Lj(n,s))))||i.appendChild(this.sL(i.childNodes,e.f)),t.Rj(i,["anychart-inline-block",this.Hh()]),wt.u.Xk.call(this,e,i)},t.g.Hh=function(){return"anychart-custom-button"},t.H(Tt,wt),t.ja(Tt),t.g=Tt.prototype,t.g.Gn=function(t){return Tt.u.Gn.call(this,t&&t.firstChild)},t.g.Xk=function(e,i){var n=t.Ae(window.document,"*","anychart-menu",i)[0];if(n){t.Pf(n,!1),t.te(n).body.appendChild(n);var s=new M;s.Bs(n),Ot(e,s)}return Tt.u.Xk.call(this,e,i)},t.g.sL=function(t,e){return Tt.u.sL.call(this,[e.Ac("DIV","anychart-inline-block "+this.Hh()+"-caption",t),this.G0(e)],e)},t.g.G0=function(t){return t.Ac("DIV","anychart-inline-block "+this.Hh()+"-dropdown"," ")},t.g.Hh=function(){return"anychart-menu-button"},t.H(Dt,Tt),t.ja(Dt),Dt.prototype.Hh=function(){return"anychart-toolbar-menu-button"},t.H(kt,Dt),t.ja(kt),kt.prototype.G0=function(t){return(t=t.Ac("DIV","anychart-inline-block "+this.Hh()+"-dropdown")).innerHTML="&nbsp;",t},t.H($t,t.ID),t.g=$t.prototype,t.g.tN=!1,t.g.Gg=function(){$t.u.Gg.call(this),It(this,!0),this.b&&Lt(this,this.b,!0),t.zy(this.Ed,"haspopup",!!this.b)},t.g.Dh=function(){if($t.u.Dh.call(this),It(this,!1),this.b){this.Cl(!1),this.b.Dh(),Lt(this,this.b,!1);var e=this.b.Ya();e&&t.Xe(e)}},t.g.R=function(){$t.u.R.call(this),this.b&&(this.b.ld(),delete this.b),delete this.Ka,this.P.ld()},t.g.Sj=function(e){$t.u.Sj.call(this,e),this.uq()&&(this.Cl(!t.iD(this,64),e),this.b&&(this.b.vu=t.iD(this,64)))},t.g.tr=function(t){$t.u.tr.call(this,t),this.b&&!this.uq()&&(this.b.vu=!1)},t.g.Vs=function(){return t.BD(this,!1),!0},t.g.mga=function(t){this.b&&this.b.Oe()&&!this.cr(t.target)&&this.Cl(!1)},t.g.cr=function(e){return e&&t.cf(this.Ya(),e)||this.b&&this.b.cr(e)||!1},t.g.EA=function(t){if(32==t.keyCode){if(t.preventDefault(),"keyup"!=t.type)return!0}else if("key"!=t.type)return!1;if(this.b&&this.b.Oe()){var e=13==t.keyCode||32==t.keyCode,i=this.b.oo(t);return 27==t.keyCode||e?(this.Cl(!1),!0):i}return(40==t.keyCode||38==t.keyCode||32==t.keyCode||13==t.keyCode)&&(this.Cl(!0,t),!0)},t.g.yga=function(){this.Cl(!1)},t.g.zga=function(){this.uq()||this.Cl(!1)},t.g.ZM=function(t){this.tN||this.Cl(!1),$t.u.ZM.call(this,t)},t.g.py=function(t){return this.b?this.b.xd(t):null},t.g.Ji=function(t,e){var i=$t.u.Ji.call(this,t,e);return i&&!this.Oe()&&this.Cl(!1),i},t.g.Dj=function(t){$t.u.Dj.call(this,t),this.isEnabled()||this.Cl(!1)},t.g.Cl=function(e,i){if($t.u.Cl.call(this,e),this.b&&t.iD(this,64)==e){if(e)this.b.xf||this.b.Sd(),this.Ba=o(this.Ya()),this.ea=t.Of(this.Ya()),Pt(this),!i||40!=i.keyCode&&38!=i.keyCode?this.b.Wn(-1):$(this.b);else{t.BD(this,!1),this.b.vu=!1;var n=this.Ya();n&&(t.zy(n,"activedescendant",""),t.zy(n,"owns","")),null!=this.ba&&(this.ba=void 0,(n=this.b.Ya())&&t.If(n,"",""))}if(this.b.Ji(e,!1,i),!this.md){n=t.Dy(this);var s=e?n.wa:n.gc;s.call(n,this.f.b,"mousedown",this.mga,!0),this.tN&&s.call(n,this.b,"blur",this.zga),s.call(n,this.P,"tick",this.nja),e?this.P.start():this.P.stop()}}this.b&&this.b.Ya()&&this.b.Ed.removeAttribute("aria-hidden")},t.g.nja=function(){var e,i=t.Of(this.Ya()),n=o(this.Ya());(e=!t.nb(this.ea,i))||(e=!((e=this.Ba)==n||e&&n&&e.top==n.top&&e.right==n.right&&e.bottom==n.bottom&&e.left==n.left)),e&&(this.ea=i,this.Ba=n,Pt(this))},t.g.Zfa=function(t){(t=t.target.Ya())&&At(this,t)},t.g.vga=function(e){t.hD(this,32)&&this.Ya()&&this.b&&this.b.Oe()&&e.stopPropagation()},t.g.$fa=function(){if(!k(this.b)){var e=this.Ya();t.zy(e,"activedescendant",""),t.zy(e,"owns","")}},t.g.Yfa=function(e){if(t.iD(this,64)&&e.target instanceof f){var i=(e=e.target).Ya();e.Oe()&&t.iD(e,2)&&null!=i&&At(this,i)}},t.qD("anychart-menu-button",(function(){return new $t(null)})),t.H(Et,$t),t.qD("anychart-toolbar-menu-button",(function(){return new Et(null)})),t.H(Gt,Et),Gt.prototype.EA=function(t){if(32==t.keyCode){if(t.preventDefault(),"keyup"!=t.type)return!0}else if("key"!=t.type)return!1;var e;return this.b||Ot(this,new M(this.f,this.Ha)),(e=this.b||null)&&e.Oe()?e.oo(t):(40==t.keyCode||38==t.keyCode||32==t.keyCode||13==t.keyCode)&&(this.Cl(!0,t),!0)},t.H(Ut,E),t.ja(Ut),Ut.prototype.Ac=function(e){return e.f.Ac("DIV",t.kD(this,e).join(" ")+" anychart-inline-block"," ")},Ut.prototype.Xk=function(e,i){return i=Ut.u.Xk.call(this,e,i),t.Qj(i,"anychart-inline-block"),i},Ut.prototype.Hh=function(){return"anychart-toolbar-separator"},t.H(Ft,Ut),t.ja(Ft),Ft.prototype.Ac=function(e){return(e=e.f.Ac("DIV",t.kD(this,e).join(" ")+" anychart-inline-block")).innerHTML="&nbsp;",e},t.H(Mt,G),t.H(_t,v),t.ja(_t),_t.prototype.bH=function(t){return"HR"==t.tagName?new G(Ut.Id()):_t.u.bH.call(this,t)},_t.prototype.BD=function(){return"anychart-toolbar"},_t.prototype.R1=function(){return pe},t.H(Nt,S),Nt.prototype.YM=function(t){Nt.u.YM.call(this,t),this.vu||$(this)},t.H(Rt,Nt),Rt.prototype.O=function(e){return t.p(e)?(e=t.ze(window.document,e),this.Jc!=e&&(this.Dh(),this.Jc=e,this.W()),this):this.Jc},Rt.prototype.target=function(e){return t.p(e)?(this.na=e,this):this.na},Rt.prototype.W=function(){if(this.Jc)if(this.Jc.firstChild){var e=this.Jc.firstChild;this.vE(e.parentNode,e)}else this.Sd(this.Jc);else t.kl(13);return this},t.H(jt,wt),t.ja(jt),jt.prototype.Hh=function(){return"anychart-toolbar-button"},t.H(Bt,t.ID),t.qD("anychart-toolbar-button",(function(){return new Bt(null)})),t.H(Ht,Rt);var me={print:"Print",changeLayout:"Layout",changeRange:"Range",allDates:"All dates",visibleDates:"Visible dates",portrait:"Portrait",landscape:"Landscape",saveAs:"Save As",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitAll:"Fit All",expandAll:"Expand All",collapseAll:"Collapse All"},ve="landscape",be="visible";t.g=Ht.prototype,t.g.Cda=function(e){return t.p(e)?(e!=this.K&&(this.K=e,qt(this)),this):this.K},t.g.cga=function(e){var i=(e=e.target.dh).Wt,n=e&&e.V_||[];if(e=this.target(),"print"==i)if(i=this.CO.xe,n=[n[0],"landscape"==this.CO.we],t.D(this.aa))n.push(i),this.aa.apply(null,t.Ga([e],n));else if(e){var s=e.print;if(t.D(s)){var a=e.wf().scale().sj();"full"==i&&e.Qm(),s.apply(e,n),e.kj(a.min,a.max)}else t.kl(14,null,["print"])}else t.kl(15);else e?(s=e[i],t.D(s)?s.apply(e,n):t.kl(14,null,[i])):t.kl(15)},t.g.R4=function(e){if(t.p(e)){for(this.ea=e;3<t.Fy(this.Xs);)this.Xs.Cj(3,!0);return this.Dh(),this.W(),this}return this.ea},t.g.W=function(){if(qt(this),!this.xf){for(var e=this.R4(),i=0;i<e.length;i++){var n=e[i],s=new m("us-letter"==n?"US Letter":t.zc(n));s.dh={Wt:"print",V_:[n]},t.vD(s,"anychart-toolbar-print-"+n),this.Xs.hc(s,!0)}return Ht.u.W.call(this)}return this},t.g.Oja=function(e){return t.p(e)?(this.aa=e,this):this.aa},t.g.vla=function(){for(var t=this.b,e=0;e<t.length;e++){var i=t[e],s=i.dh,a=Yt(s.id);a&&(n(i,a),s.text=a)}return i=this.Xs.xd(0),t=this.Xs.xd(1),n(i,Yt("changeLayout")),n(t,Yt("changeRange")),e=i.py(0),i=i.py(1),n(e,Yt("landscape")),n(i,Yt("portrait")),e=t.py(0),t=t.py(1),n(e,Yt("allDates")),n(t,Yt("visibleDates")),qt(this),this},t.E("anychart.ui.ganttToolbar",(function(){return new Ht}));var ye=Ht.prototype;ye.draw=ye.W,ye.printPaperSizes=ye.R4,ye.container=ye.O,ye.target=ye.target,ye.buttonsMode=ye.Cda,ye.printFunction=ye.Oja,ye.updateLocalizedCaptions=ye.vla,t.H(Kt,t.By),t.g=Kt.prototype,t.g.hj=!1,t.g.visible=function(e){return t.p(e)?(e==this.hj||(e?(this.xf||this.Sd(),this.hj=!0):this.hj=!1,t.Pf(this.Ya(),this.hj)),this):this.hj},t.g.Ac=function(){Kt.u.Ac.call(this),Xt(this)},t.g.pl=function(t){Kt.u.pl.call(this,t),Xt(this,t)},t.g.Gg=function(){Kt.u.Gg.call(this)},t.g.Dh=function(){Kt.u.Dh.call(this)},t.g.R=function(){Kt.u.R.call(this)};var Se=Kt.prototype;t.E("anychart.ui.preloader",(function(){return new Kt})),Se.render=Se.Sd,Se.decorate=Se.Bs,Se.visible=Se.visible,t.H(Zt,t.By),t.g=Zt.prototype,t.g.target=function(t){this.b=t},t.g.ER=function(t){this.Ba=t.firstVisible,this.Ka=t.lastVisible,Qt(this)},t.g.format=function(e){return t.p(e)&&(this.QT=e,Qt(this)),this.QT||t.eq.format.outputDateTimeFormat()},t.g.Ac=function(){Zt.u.Ac.call(this),te(this)},t.g.bda=function(t){this.Sd(t)},t.g.pl=function(t){ee(t)?this.Sd(t):(Zt.u.pl.call(this,t),te(this))},t.g.ufa=function(e){return t.p(e)?(this.na!=e&&(this.na=e,this.ba&&t.df(this.ba,t.eq.format.getMessage(this.na))),this):this.na},t.g.mla=function(e){return t.p(e)?(this.Ha!=e&&(this.Ha=e,this.P&&t.df(this.P,t.eq.format.getMessage(this.Ha))),this):this.Ha},t.g.Sd=function(e){if(e=e||this.b,ee(e)){this.target(e),this.Za=!0;var i=this.b.container()?this.b.container().getStage():null;e=i&&i.container()?i.container():null}i=!!this.b&&!(0,window.isNaN)(this.b.getSelectedRange().firstSelected),e&&i?Zt.u.Sd.call(this,e):(e=(0,t.pa)(this.bda,this,e||this.b),this.b.Ce("chartdraw",e,!1,this))},t.g.Gg=function(){if(Zt.u.Gg.call(this),this.b){if(this.Za){var e=(t.Wf(this.Ya()).height||21)+15,i=this.b.padding().bottom();e>i&&this.b.padding().bottom(i+e)}this.b.listen("selectedrangechange",this.ER,!1,this),(e=t.Dy(this)).wa(this.i.Ya(),"blur",this.MW),e.wa(this.K.Ya(),"blur",this.MW),this.aa||(this.aa=new t.Jp(this.i.Ya()),e.wa(this.aa,"key",this.lO)),this.ea||(this.ea=new t.Jp(this.K.Ya()),e.wa(this.ea,"key",this.lO))}},t.g.MW=function(){var e=this.i.vj(),i=this.K.vj(),n=this.format();if(e=t.eq.format.parseDateTime(e,n),i=t.eq.format.parseDateTime(i,n),e&&i){n=e.getTime();var s=i.getTime();if(n>s&&(e=[i,i=e][0],n=[s,s=n][0]),n!=this.Ba||s!=this.Ka)return this.Ba=n,this.Ka=s,void this.b.selectRange(e,i,!0)}t.My(this.i,t.eq.format.dateTime(this.Ba,this.format())),t.My(this.K,t.eq.format.dateTime(this.Ka,this.format()))},t.g.lO=function(e){if(13==e.keyCode){var i;e=e.target.u3.Ya();t:{var n=i=0;if(Jt(e))i=e.selectionStart,n=-1;else if(t.hd&&!t.bd("9")){var s=e.ownerDocument||e.document,a=s.selection.createRange();if("textarea"==e.type?(s=s.body.createTextRange()).moveToElementText(e):s=e.createTextRange(),a=(s=[s,a])[0],s=s[1],a.inRange(s)){if(a.setEndPoint("EndToStart",s),"textarea"==e.type){for(s.duplicate(),n=i=a.text,s=!1;!s;)0==a.compareEndPoints("StartToEnd",a)?s=!0:(a.moveEnd("character",-1),a.text==i?n+="\r\n":s=!0);i=[n.length,-1];break t}i=a.text.length,n=-1}}i=[i,n]}i=i[0],this.MW(),Jt(e)?(e.selectionStart=i,e.selectionEnd=i):t.hd&&!t.bd("9")&&("textarea"==e.type&&(i=t.hc(e.value.substring(0,i)).length),(e=e.createTextRange()).collapse(!0),e.move("character",i),e.select())}},t.g.Dh=function(){Zt.u.Dh.call(this)},t.g.R=function(){this.b.unlisten("selectedrangechange",this.ER,!1,this),this.b=null,this.P&&(t.Xe(this.ba),this.ba=null),this.P&&(t.Xe(this.P),this.P=null),this.aa&&(t.Dy(this).gc(this.aa,"key",this.lO),this.aa.ld(),this.aa=null),this.ea&&(t.Dy(this).gc(this.ea,"key",this.lO),this.ea.ld(),this.ea=null),Zt.u.R.call(this)};var xe=Zt.prototype;t.E("anychart.ui.rangePicker",(function(){return new Zt})),xe.render=xe.Sd,xe.decorate=xe.Bs,xe.target=xe.target,xe.format=xe.format,xe.dispose=xe.ld,xe.getElement=xe.Ya,xe.toLabelText=xe.mla,xe.fromLabelText=xe.ufa,t.H(ie,t.LD);var we="anychart-button-toggle";t.H(ne,t.qf),t.g=ne.prototype,t.g.CH=null,t.g.LU=null,t.g.py=function(t){return this.Ub[t]||null},t.g.zm=function(){return t.Ha(this.Ub)},t.g.clear=function(){var e=this.Ub;if(!t.A(e))for(var i=e.length-1;0<=i;i--)delete e[i];e.length=0,this.CH=null},t.g.R=function(){ne.u.R.call(this),delete this.Ub,this.CH=null},t.H(re,t.By),t.g=re.prototype,t.g.target=function(t){this.b=t},t.g.PK=function(e){e.firstSelected==e.firstKey&&e.lastSelected==e.lastKey&&(e=t.Gy(this,"max"))?ae(this.i,e):ae(this.i,null)},t.g.eda=function(e,i){e&&t.CD(e,i)},t.g.Yy=function(e){return t.p(e)&&t.A(e)&&(this.jd=(0,t.Gg)(e,(function(e,i){i=t.Qc(i);var n=t.p(i.startDate)&&t.p(i.endDate);return"unit"==i.type||"points"==i.type?(i.count=i.count||1,i.anchor=t.fl(i.anchor),e.push(i)):n?(i.type="range",e.push(i)):"range"!=i.type&&e.push(i),e}),[]),this.update()),this.jd},t.g.Ac=function(){re.u.Ac.call(this),le(this)},t.g.pl=function(t){he(t)?this.Sd(t):(re.u.pl.call(this,t),le(this))},t.g.update=function(){this.xf&&(this.Gi(!0),this.i.clear(),(0,t.Pe)(this.jd,(function(i,n){var s=new ie(i.text);s.dh=i,"max"==i.type&&e(s,"max"),s.mv&=-17;var a=this.i,o=a.Ub.length;s&&(oe(a,s,!1),t.Da(a.Ub,s,o)),n?n==this.jd.length-1?t.KD(s,1):t.KD(s,3):t.KD(s,2),this.hc(s,!0)}),this))},t.g.Rla=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.K&&t.df(this.K,t.eq.format.getMessage(this.P))),this):this.P},t.g.cda=function(t){this.Sd(t)},t.g.Sd=function(e){if(e=e||this.b,he(e)){this.target(e),this.aa=!0;var i=this.b.container()?this.b.container().getStage():null;e=i&&i.container()?i.container():null}i=!!this.b&&!(0,window.isNaN)(this.b.getSelectedRange().firstSelected),e&&i?(re.u.Sd.call(this,e),(e=this.b?this.b.cH():null)&&this.PK({firstKey:e.On,lastKey:e.xp,firstSelected:e.qs,lastSelected:e.uw})):(e=(0,t.pa)(this.cda,this,e||this.b),this.b.Ce("chartdraw",e,!1,this))},t.g.Bs=function(t){re.u.Bs.call(this,t),this.b&&(t=this.b?this.b.cH():null)&&this.PK({firstKey:t.On,lastKey:t.xp,firstSelected:t.qs,lastSelected:t.uw})},t.g.Gg=function(){if(re.u.Gg.call(this),this.b){if(this.update(),this.aa){var e=(t.Wf(this.Ya()).height||21)+15,i=this.b.padding().bottom();e>i&&this.b.padding().bottom(i+e)}this.b.listen("selectedrangechange",this.PK,!1,this),t.Dy(this).wa(this,"action",this.dda)}},t.g.dda=function(e){var i=e.target.dh,n=t.zk(t.FE,i.type,t.p(null)?null:"max");"unit"==n?this.b.selectRange(i.unit,i.count,i.anchor,!0):"points"==n?this.b.selectRange("points",i.count,i.anchor,!0):"ytd"==n||"qtd"==n||"mtd"==n||"max"==n?this.b.selectRange(n,!0):(n=t.eq.format.parseDateTime(i.startDate),i=t.eq.format.parseDateTime(i.endDate),n&&i&&this.b.selectRange(n,i,!0)),ae(this.i,e.target)},t.g.Dh=function(){re.u.Dh.call(this)},t.g.R=function(){this.b.unlisten("selectedrangechange",this.PK,!1,this),this.b=null,this.i.clear(),this.K&&(t.Xe(this.K),this.K=null),re.u.R.call(this)};var Ce=re.prototype;t.E("anychart.ui.rangeSelector",(function(){return new re})),Ce.render=Ce.Sd,Ce.decorate=Ce.Bs,Ce.target=Ce.target,Ce.ranges=Ce.Yy,Ce.dispose=Ce.ld,Ce.getElement=Ce.Ya,Ce.zoomLabelText=Ce.Rla,t.H(ce,t.By),t.g=ce.prototype,t.g.target=function(t){this.b=t},t.g.Ac=function(){ce.u.Ac.call(this),ue(this)},t.g.pl=function(t){de(t)?this.Sd(t):(ce.u.pl.call(this,t),ue(this))},t.g.fda=function(t){this.Sd(t)},t.g.Sd=function(e){var i;e=e||this.b,(i=de(e))||(i=(i=e)&&t.D(i.getType)&&"timeline"==i.getType()),i||(i=(i=e)&&t.D(i.getType)&&"graph"==i.getType()),i&&(this.target(e),e=(i=this.b.container()?this.b.container().getStage():null)&&i.container()?i.container():null),e?ce.u.Sd.call(this,e):(e=(0,t.pa)(this.fda,this,e||this.b),this.b.listenOnce("chartdraw",e,!1,this))},t.g.Gg=function(){ce.u.Gg.call(this),this.b&&t.Dy(this).wa(this,"action",this.gda)},t.g.gda=function(t){t=t.target.dh,this.b.Fl=100;var e=this.b.getCurrentScene();switch(t.type){case"fitAll":e.fitAll();break;case"zoomIn":e.zoomIn();break;case"zoomOut":e.zoomOut()}},t.g.Dh=function(){ce.u.Dh.call(this)},t.g.R=function(){this.b=null,this.i.ld(),this.i=null,this.K.ld(),this.K=null,this.P.ld(),this.P=null,ce.u.R.call(this)};var Te=ce.prototype;t.E("anychart.ui.zoom",(function(){return new ce})),Te.render=Te.Sd,Te.decorate=Te.Bs,Te.target=Te.target,Te.dispose=Te.ld}.call(this,$)),_.theme_circular_gauge||(_.theme_circular_gauge=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{circularGauge:{defaultPointerType:"needle",title:{enabled:!1},defaultAxisSettings:{startAngle:null,labels:{position:"inside",adjustFontSize:!0,offsetY:0},minorLabels:{position:"inside",adjustFontSize:!0,offsetY:0},fill:"#CECECE",ticks:{hatchFill:!1,type:"line",position:"center",length:null,fill:"#545f69",stroke:"none"},minorTicks:{hatchFill:!1,type:"line",position:"center",length:null,fill:"#545f69",stroke:"none"},zIndex:10,cornersRounding:"0%"},defaultPointerSettings:{base:{enabled:!0,fill:"#545f69",stroke:"#545f69",hatchFill:!1,axisIndex:0},bar:{position:"center",barDrawer:function(){this.path.clear(),this.path.circularArc(this.centerX,this.centerY,this.radius-this.width/2,this.radius-this.width/2,this.startAngle,this.sweepAngle),this.path.circularArc(this.centerX,this.centerY,this.radius+this.width/2,this.radius+this.width/2,this.startAngle+this.sweepAngle,-this.sweepAngle,!0),this.path.close()}},marker:{size:"4%",hoverSize:6,selectSize:6,position:"inside",type:"triangle-up"},knob:{fill:"#CECECE",stroke:"#c1c1c1",verticesCount:6,verticesCurvature:.5,topRatio:.5,bottomRatio:.5},needle:{startRadius:"-20%",startWidth:"3%",middleWidth:"1%"}},defaultRangeSettings:{enabled:!0,axisIndex:0,fill:"#7c868e 0.7",position:"center",startSize:0,endSize:"10%",cornersRounding:"0%"},fill:"#f5f5f5",stroke:"#EAEAEA",startAngle:0,sweepAngle:360,cap:{enabled:!1,fill:"#EAEAEA",stroke:"#CECECE",hatchFill:!1,radius:"15%",zIndex:50},circularPadding:"10%",encloseWithStraightLine:!1,axes:[{}],bars:[],markers:[],needles:[],knobs:[],ranges:[],tooltip:{title:{enabled:!1},separator:{enabled:!1},titleFormat:function(){return this.index},format:function(){return"Value: "+t.vN(this.value)}}}})}.call(this,$)),_.cartesian_3d||(_.cartesian_3d=1,function(t){var e=function(t,e,i){(t=t.f[e])&&(t.zIndex=i)},i=function(e){return t.oa(e.tl())+"_"+t.oa(e.bb())},n=function(){t.kz.call(this)},s=function(){t.kz.call(this)},a=function(){t.$z.call(this)},o=function(){t.cA.call(this)},r=function(){t.fA.call(this)},l=function(e){t.JA.call(this,e)},h=function(e){t.JA.call(this,e)},c=function(t,e,i){if(!e.j("skipDrawing")){var n=e.j("x"),s=e.j("zero"),a=e.j("value");t.xa||(n+=t.f,s-=t.b,a-=t.b),e=i.bottom;var o=i.back,r=i.left,l=i.right,h=i.front,c=i.top,u=i.rightHatch,d=i.frontHatch;i=i.topHatch;var p=t.i,g=t.D,f=h.stroke().thickness%2/2||0;if(t.xa){var m=t.o,v=Math.min(s,a)+t.f;n=n-m/2-t.b,t=Math.abs(s-a),s=f,a=0}else v=n-(t=t.o)/2,n=Math.min(s,a),m=Math.abs(s-a),a=s=-f;e.moveTo(v+f,n+m).lineTo(v+t,n+m).lineTo(v+t+p-f,n+m-g+f).lineTo(v+p,n+m-g).close(),o.moveTo(v+p,n-g).lineTo(v+p+t,n-g).lineTo(v+p+t,n-g+m).lineTo(v+p,n-g+m).close(),r.moveTo(v,n).lineTo(v+p+s,n-g+f).lineTo(v+p,n+m-g).lineTo(v,n+m-f).close(),l.moveTo(v+t,n).lineTo(v+t+p+a,n-g+f).lineTo(v+t+p,n+m-g).lineTo(v+t,n+m-f).close(),u.moveTo(v+t,n).lineTo(v+t+p+a,n-g+f).lineTo(v+t+p,n+m-g).lineTo(v+t,n+m-f).close(),h.moveTo(v,n).lineTo(v+t,n).lineTo(v+t,n+m).lineTo(v,n+m).close(),d.moveTo(v,n).lineTo(v+t,n).lineTo(v+t,n+m).lineTo(v,n+m).close(),c.moveTo(v+f,n).lineTo(v+t,n).lineTo(v+t+p-f,n-g+f).lineTo(v+p,n-g).close(),i.moveTo(v+f,n).lineTo(v+t,n).lineTo(v+t+p-f,n-g+f).lineTo(v+p,n-g).close()}},u=function(e){t.JA.call(this,e)},d=function(){t.WB.call(this),this.Ga("cartesian","cartesian3dBase","cartesian3d"),this.K=0,this.re="cartesian-3d"},p=function(e){var i=t.so(e.domTarget);if(i&&i.X&&i.X.check(4)){var n=t.so(e.relatedDomTarget);n&&n.X&&n.X==i.X&&n.index==i.index||(i=i.X)&&!i.md&&i.enabled()&&(n=i.Zi(),i.kb(null),i.oh(e.gE),i.kb(n))}},g=function(e,i,n){var s,a,o,r=t.cm("fill",1,!0)(e,n);n=t.C(r)?r.opacity:1;var l=t.C(r)?r.color:r;if(null===(r=t.Ll(l)))e=l=s=a=o=r="none";else{l=r.vk;var h=t.Cl(l);a=t.Il(h,.2),r=t.Il(h,.25),o=t.Hl([255,255,255],h,.1),s=t.Tb(t.Hl(h,a,.7)),o=t.Tb(t.Hl(a,o,.1)),h=t.Tb(t.Hl(h,a,.1)),e={angle:e.g("isVertical")?0:90,opacity:n,keys:[t.Pl(s,.2),t.Pl(l,.3)]},l=t.Pl(h,.2),s=t.Pl(s,.2),a=t.Tb(a),r=t.Tb(r)}i.bottom.fill({color:a,opacity:n}),i.back.fill({color:o,opacity:n}),i.left.fill({color:r,opacity:n}),i.right.fill({color:l,opacity:n}),i.top.fill({color:s,opacity:n}),i.front.fill(e)},f=function(){var e=new d;return e.ta("defaultSeriesType","column"),e.$c(),t.BA(e),e.Wg(),e},m=function(t,e){var i=b(t),n=t.i,s=t.oi;return!e&&t.g("zDistribution")&&(s=(s-n*(i-1))/i),s},v=function(t,e){var i=b(t),n=t.o,s=t.Mh;return!e&&t.g("zDistribution")&&(s=(s-n*(i-1))/i),s},b=function(e){return function(e,i){var n=0;return(0,t.Pe)(e,(function(t,e,s){i.call(void 0,t,e,s)&&++n}),void 0),n}(e.hb,(function(e){return!!(e&&e.enabled()&&e.check(t.tB))}))},y=function(e,i){for(var n=0,s=0,a=Math.min(e.hb.length-1,i);s<=a;s++){var o=e.hb[s];o&&o.enabled()&&o.check(t.tB)&&n++}return n-1},S=function(e){var i=new d;return i.Ga("area3d"),i.re="area-3d",i.ta("defaultSeriesType","area"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},x=function(e){var i=new d;return i.Ga("bar","bar3d"),i.re="bar-3d",i.ta("defaultSeriesType","bar"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},w=function(e){var i=new d;return i.Ga("column","column3d"),i.re="column-3d",i.ta("defaultSeriesType","column"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},C=function(e){var i=new d;return i.Ga("line3d"),i.re="line-3d",i.ta("defaultSeriesType","line"),i.$c(),i.Wg(),t.BA(i),arguments.length&&i.kl.apply(i,arguments),i},T={bC:"area",kF:"bar",lF:"column",tt:"line",spa:"line-2d"},D={name:"top",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:3e-6},k={name:"bottom",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:2e-6},$={name:"left",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:1e-6},O={name:"right",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:4e-6},P={name:"back",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:0},L={name:"frontHatch",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:8e-6},I={name:"rightHatch",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:7e-6},A={name:"topHatch",Qb:"path",Yb:"hatchFill",Zb:null,ac:!0,Ib:!0,zIndex:6e-6};t.H(n,t.kz),t.g=n.prototype,t.g.zg=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)&&(i|=1),this.B(20,8|i)},t.g.KG=function(e){var i=this.ja()||t.kn(0,0,0,0);e=Math.round(i.Va()-e*i.height);var n=this.Uh().stroke();n=t.dp(n),e=t.R(e,n),n=i.tb()+this.oi;var s=e-this.Mh;this.o.moveTo(i.tb(),e).lineTo(n,s).lineTo(i.cb()+this.oi,s)},t.g.LG=function(e){var i=this.ja()||t.kn(0,0,0,0);e=Math.round(i.tb()+e*i.width);var n=this.Uh().stroke();n=t.dp(n),n=(e=t.R(e,n))+this.oi;var s=Math.ceil(t.R(i.Va()-this.Mh,1));this.o.moveTo(e,Math.ceil(t.R(i.Va(),1))).lineTo(n,s).lineTo(n,i.Vb()-this.Mh)},t.g.HG=function(e,i,n,s){if(!(0,window.isNaN)(i)){var a=this.ja()||t.kn(0,0,0,0),o=Math.round(a.Va()-i*a.height),r=Math.round(a.Va()-e*a.height);1==e?r-=s:r+=s,1==i?o-=s:o+=s,n.moveTo(a.tb(),o).lineTo(a.tb()+this.oi,o-this.Mh).lineTo(a.cb()+this.oi,o-this.Mh).lineTo(a.cb()+this.oi,r-this.Mh).lineTo(a.tb()+this.oi,r-this.Mh).lineTo(a.tb(),r).close()}},t.g.IG=function(e,i,n,s){if(!(0,window.isNaN)(i)){var a=this.ja()||t.kn(0,0,0,0),o=Math.round(a.tb()+i*a.width),r=Math.round(a.tb()+e*a.width);1==e?r+=s:r-=s,1==i?o+=s:o-=s,n.moveTo(o+this.oi,a.Vb()-this.Mh).lineTo(r+this.oi,a.Vb()-this.Mh).lineTo(r+this.oi,a.Va()-this.Mh).lineTo(r,a.Va()).lineTo(o,a.Va()).lineTo(o+this.oi,a.Va()-this.Mh).close()}},t.H(s,n),t.xu(s,n);var E=n.prototype;E.isHorizontal=E.Nb,E.scale=E.scale,E.axis=E.axis,E=s.prototype,t.E("anychart.standalones.grids.linear3d",(function(){var e=new s;return e.N(t.nm("standalones.linearGrid")),e})),E.layout=E.we,E.draw=E.W,E.parentBounds=E.ja,E.container=E.O,t.H(a,t.$z),a.prototype.fs=function(){var e=t.Za(this.scale().transform(this.value(),.5),0,1);if(!(0,window.isNaN)(e)){var i=0==t.Oy(this).gl()%2?0:-.5,n=this.ja(),s=this.Qp();t.Oy(this).clear();var a=this.xc().oi,o=this.xc().Mh;if("horizontal"==this.we()){var r=Math.round(n.Vb()+n.height-e*n.height);1==e?r-=i:r+=i,t.Oy(this).moveTo(n.tb(),r).lineTo(n.tb()+a,r-o).lineTo(n.cb()+a,r-o)}else"vertical"==this.we()&&(r=Math.round(n.tb()+e*n.width),1==e?r+=i:r-=i,t.Oy(this).moveTo(r+a,n.Vb()-o).lineTo(r+a,n.Va()-o).lineTo(r,n.Va()));n.top-=o,n.height+=o,n.width+=a,t.Oy(this).clip(s.Ej(n))}},t.H(o,t.cA),o.prototype.fs=function(){var e=this.we(),i=this.g("from"),n=this.g("to");this.g("from")>this.g("to")&&(i=this.g("to"),n=this.g("from"));var s=t.Za(this.scale().transform(i,0),0,1),a=t.Za(this.scale().transform(n,1),0,1);if(!(0,window.isNaN)(s)&&!(0,window.isNaN)(a)){n=this.ja(),i=this.Qp(),t.Oy(this).clear();var o=this.xc().oi,r=this.xc().Mh;if("horizontal"==e){a=Math.floor(n.Va()-n.height*a),s=Math.ceil(n.Va()-n.height*s),e=n.tb();var l=n.cb();t.Oy(this).moveTo(e,a).lineTo(e+o,a-r).lineTo(l+o,a-r).lineTo(l+o,s-r).lineTo(e+o,s-r).lineTo(e,s).close()}else"vertical"==e&&(e=n.Va(),l=n.Vb(),s=Math.floor(n.tb()+n.width*s),a=Math.ceil(n.tb()+n.width*a),t.Oy(this).moveTo(s,e).lineTo(s+o,e-r).lineTo(s+o,l-r).lineTo(a+o,l-r).lineTo(a+o,e-r).lineTo(a,e).close());n.top-=r,n.height+=r,n.width+=o,t.Oy(this).clip(i.Ej(n))}},t.H(r,t.fA),r.prototype.ja=function(e,i,n,s){return i=r.u.ja.call(this,e,i,n,s),t.p(e)||(e=this.xc().oi,n=this.xc().Mh,i.top-=n,i.height+=n,i.width+=e),i},t.H(l,t.JA),t.PG[2]=l,t.g=l.prototype,t.g.type=2,t.g.flags=33|t.dB|t.tB|0,t.g.Kh={top:"path",bottom:"path",left:"path",right:"path",back:"path",front:"path",cap:"path",frontHatch:"path"},t.g.uK=function(){for(var t=this.X.cg();t.advance();){var e=t.j("shapes");if(e){var i=t.j("zIndex");this.bd.zt(i+1e-8*t.ma(),e)}}},t.g.Gd=function(t){l.u.Gd.call(this,t),this.ea=!0,t=this.X.ya;var n=this.X.ma(),s=this.X.gh(),a=i(this.X);this.Za=!s||n==t.z3[a],this.Ka=t.QM(n,s),this.P=t.RM(n,s),this.b=m(t,s),this.i=v(t,s),t.Ra().Ne()?(e(this.bd,"left",4e-6),e(this.bd,"right",1e-6)):(e(this.bd,"left",1e-6),e(this.bd,"right",4e-6)),t.bb().Ne()?(e(this.bd,"top",2e-6),e(this.bd,"bottom",3e-6)):(e(this.bd,"top",3e-6),e(this.bd,"bottom",2e-6))},t.g.Qo=function(t){var e=this.bd.ed(this.Gc,null,this.X.zIndex()),i=t.j("x")+this.Ka,n=t.j("zero")-this.P,s=t.j("zeroMissing");t=t.j("value")-this.P,e.front.moveTo(i,n).lineTo(i,t),e.frontHatch.moveTo(i,n).lineTo(i,t),this.X.gh()?this.f=[i,n,s]:(e.back.moveTo(i+this.b,n-this.i).lineTo(i+this.b,t-this.i),e.bottom.moveTo(i,n).lineTo(i+this.b,n-this.i),"none"==this.X.bb().jn()&&t>=n&&e.cap.moveTo(i,n).lineTo(i+this.b,n-this.i),e.left.moveTo(i,n).lineTo(i,t).lineTo(i+this.b,t-this.i).lineTo(i+this.b,n-this.i).close()),this.D=i,this.K=t,this.Mi=this.na=n},t.g.ug=function(t){var e=this.bd.ed(this.Gc),i=t.j("x")+this.Ka,n=t.j("zero")-this.P,s=t.j("zeroMissing");if(t=t.j("value")-this.P,this.X.gh()?this.f.push(i,n,s):(e.bottom.lineTo(i+this.b,n-this.i),e.back.lineTo(i+this.b,t-this.i)),s=e.front.HZ(),this.Za&&(this.ea?e.top.moveTo(s.x,s.y).lineTo(s.x+this.b,s.y-this.i).lineTo(i+this.b,t-this.i).lineTo(i,t).close():e.top.moveTo(s.x,s.y).lineTo(i,t).lineTo(i+this.b,t-this.i).lineTo(s.x+this.b,s.y-this.i).close(),this.ea=!this.ea),"none"==this.X.bb().jn()){var a=(n-s.y)*(i-s.x)/(t-s.y)+s.x;0<t-s.y&&s.y<=n&&t>n?e.cap.moveTo(a,n).lineTo(a+this.b,n-this.i):0>t-s.y&&s.y>n&&t<=n&&e.cap.lineTo(a+this.b,n-this.i).lineTo(a,n).close()}e.front.lineTo(i,t),e.frontHatch.lineTo(i,t),this.D=i,this.K=t,this.na=n},t.g.Km=function(){if(this.G){var t=this.bd.ed(this.Gc),e=t.front,i=t.frontHatch;if(this.f){for(var n=window.NaN,s=window.NaN,a=!1,o=this.f.length-1;0<=o;o-=3){var r=this.f[o-2],l=this.f[o-1],h=this.f[o];h&&!(0,window.isNaN)(n)?(e.lineTo(n,l),i.lineTo(n,l)):a&&!(0,window.isNaN)(s)&&(e.lineTo(r,s),i.lineTo(r,s)),e.lineTo(r,l),i.lineTo(r,l),n=r,s=l,a=h}e.close(),i.close(),this.f=null}else(0,window.isNaN)(this.D)||(e.lineTo(this.D,this.Mi).close(),i.lineTo(this.D,this.Mi).close(),t.back.lineTo(this.D+this.b,this.Mi-this.i).close(),t.bottom.lineTo(this.D,this.Mi).close(),"none"==this.X.bb().jn()&&this.K>=this.X.Mi&&t.cap.lineTo(this.D+this.b,this.Mi-this.i).lineTo(this.D,this.Mi).close());(0,window.isNaN)(this.D)||t.right.moveTo(this.D,this.na).lineTo(this.D,this.K).lineTo(this.D+this.b,this.K-this.i).lineTo(this.D+this.b,this.na-this.i).close()}},t.H(h,t.JA),t.PG[7]=h,t.g=h.prototype,t.g.type=7,t.g.flags=263717|t.tB,t.g.Kh={top:"path",bottom:"path",left:"path",right:"path",back:"path",front:"path",frontHatch:"path",rightHatch:"path",topHatch:"path"},t.g.Gd=function(t){h.u.Gd.call(this,t),t=this.X.ya;var e=this.X.ma(),i=this.X.gh();this.f=t.QM(e,i),this.b=t.RM(e,i),this.i=m(t,i),this.D=v(t,i)},t.g.uK=function(t){for(var e=this.X.cg();e.advance();){var i=e.j("shapes");i&&(t=e.j("zIndex"),this.bd.zt(t+1e-8*e.ma(),i))}},t.g.ug=function(t,e){var i=t.j("zIndex")+1e-8*(t.j("directIndex")+t.ma());i=this.bd.ed(e,null,i),c(this,t,i)},t.g.yt=function(t){var e,i=t.j("shapes");for(e in i)i[e].clear();c(this,t,i)},t.H(u,t.JA),t.PG[33]=u,t.g=u.prototype,t.g.type=33,t.g.flags=64|t.dB|t.tB|32768,t.g.Kh={path:"path"},t.g.uK=function(){for(var t=this.X.cg();t.advance();){var e=t.j("shapes");if(e){var i=t.j("zIndex");this.bd.zt(i+1e-8*t.ma(),e)}}},t.g.Gd=function(t){u.u.Gd.call(this,t),this.K=!0,t=this.X.ya;var e=this.X.ma();this.P=t.QM(e,!1),this.ea=t.RM(e,!1),this.i=m(t,!1),this.D=v(t,!1)},t.g.Qo=function(t){this.b=t.j("x")+this.P,this.f=t.j("value")-this.ea},t.g.ug=function(t){var e=this.bd.ed(this.Gc),i=t.j("x")+this.P;t=t.j("value")-this.ea,this.K?e.path.moveTo(this.b,this.f).lineTo(this.b+this.i,this.f-this.D).lineTo(i+this.i,t-this.D).lineTo(i,t).close():e.path.moveTo(this.b,this.f).lineTo(i,t).lineTo(i+this.i,t-this.D).lineTo(this.b+this.i,this.f-this.D).close(),this.K=!this.K,this.b=i,this.f=t},t.H(d,t.WB),d.prototype.If=function(t){p(t),d.u.If.call(this,t)},d.prototype.hg=function(t){p(t),d.u.hg.call(this,t)},d.prototype.Sj=function(t){p(t),d.u.Sj.call(this,t)},d.prototype.Ih=function(t){p(t),d.u.Ih.call(this,t)};var G={},U=5767168|t.QG;G.area={Fb:2,Kb:1,Lb:[{name:"top",Qb:"path",Yb:null,Zb:null,ac:!1,Ib:!1,zIndex:3e-6},k,$,O,P,t.SH,{name:"cap",Qb:"path",Yb:null,Zb:null,ac:!1,Ib:!1,zIndex:35e-7},L],Ob:null,Jb:function(e,i,n){var s,a,o,r;n=t.cm("fill",1,!0)(e,n),e=t.C(n)?n.opacity:1;var l=t.C(n)?n.color:n;if(null===(n=t.Ll(l)))l=s=a=o=r=n="none";else{l=n.vk,o=t.Cl(l);var h=t.Il(o,.2);a=t.Il(o,.3),n=t.Il(o,.25),r=t.Hl([255,255,255],o,.1),s=t.Tb(t.Hl(o,h,.7)),a=t.Tb(t.Hl(o,a,.7)),r=t.Tb(t.Hl(h,r,.1)),o=t.Tb(t.Hl(o,h,.1)),l={angle:90,opacity:e,keys:[t.Pl(s,.2),t.Pl(l,.3)]},s=t.Pl(a,.2),a=o=t.Pl(o,.2),n=t.Tb(n)}i.bottom.fill({color:o,opacity:e}),i.back.fill({color:r,opacity:e}),i.left.fill({color:n,opacity:e}),i.right.fill({color:a,opacity:e}),i.top.fill({color:s,opacity:e}),i.cap.fill({color:o,opacity:e}),i.front.fill(l),i.top.stroke({color:s,thickness:.8})},Cb:U,Ab:"value",zb:"zero"},G.bar={Fb:7,Kb:2,Lb:[D,k,$,O,P,t.SH,L,I,A],Ob:null,Jb:g,Cb:U,Ab:"value",zb:"zero"},G.column={Fb:7,Kb:2,Lb:[D,k,$,O,P,t.SH,L,I,A],Ob:null,Jb:g,Cb:U,Ab:"value",zb:"zero"},G.line={Fb:33,Kb:1,Lb:[{name:"path",Qb:"path",Yb:null,Zb:null,ac:!1,Ib:!1,zIndex:0}],Ob:null,Jb:function(e,i,n){n=t.cm("fill",1,!0)(e,n),e=t.C(n)?n.opacity:1,n=t.C(n)?n.color:n,null===(n=t.Ll(n))?n="none":(n=n.vk,n=t.Cl(n),n=t.Tb(t.Hl(n,t.Il(n,.3),.7)),n=t.Pl(n,.2)),i.path.fill({color:n,opacity:e}).stroke({color:n,thickness:.8})},Cb:U,Ab:"value",zb:"value"},G["line-2d"]={Fb:8,Kb:1,Lb:[{name:"stroke",Qb:"path",Yb:null,Zb:"stroke",ac:!0,Ib:!1,zIndex:9e-6}],Ob:null,Jb:null,Cb:2097152|U,Ab:"value",zb:"value"},d.prototype.fj=G,t.Nz(d,d.prototype.fj),t.Tp["cartesian-3d"]=f,t.g=d.prototype,t.g.Ss=function(e){return t.zk(T,e,"column")},t.g.uN=function(){return!0},t.g.QM=function(t,e){if(e||!this.g("zDistribution"))var i=0;else i=(i=b(this))-(t=y(this,t))-1,i*=m(this,e)+this.i;return i},t.g.RM=function(t,e){if(e||!this.g("zDistribution"))var i=0;else i=(i=b(this))-(t=y(this,t))-1,i*=v(this,e)+this.o;return i},t.g.DF=function(){return new n},t.g.a_=function(){var t=new a;return t.pa=this,t},t.g.b_=function(){var t=new o;return t.pa=this,t},t.g.c_=function(){var t=new r;return t.pa=this,t},t.g.aX=function(){this.z3={};for(var e,n=this.Ue(),s="none"!=this.bb().jn(),a="direct"==this.bb().kx(),o=[30],r=!0,l=1;l<n.length;l++)n[l].Ma()==n[l-1].Ma()?o.push(o[l-1]):(o.push(1-1/(l+1)+30),r=!1);for(l=0;l<n.length;l++){var h=1-1/(l+1)+30;e=n.length-l-1;var c=s&&a?e:l;if((e=n[c])&&e.enabled())if(e.check(t.tB)){if(e.eh())for(c=e.Ec();c.advance();){var u=e,d=l,p=n.length,g=o[l],f=r,m=u.$(),v=t.N(m.get("value")),b=m.ma();d+=1;var y=.01,S="none"!=this.bb().jn(),x=this.Ra().Ne();b=x?m.Hb()-b:b+1,g=this.g("zDistribution")?1-1/d+30:f?30:g,this.bb().Ne()^0>v&&(d=-d),u.g("isVertical")?S||this.g("zDistribution")?(u=b,b=d,d=u,u=1-1/Math.abs(b),g=0<b?g+y*(d+u):g-y*(p-d+u)):(x&&(d=p-Math.abs(d)+1),g+=y*=b=b*p-p+Math.abs(d),this.bb().Ne()&&(v=-v),0>v&&(y=-y),g+=y):(S||this.g("zDistribution")||(x&&(d=p-Math.abs(d)+1),b=b*p-p+Math.abs(d)),g+=y*=b),m.j("zIndex",g),m.j("directIndex",b*d),h<(p=g)&&(h=p)}else e.zIndex()!=e.zh&&e.zIndex()!=h&&(h=e.zIndex()),e.EP()&&(this.z3[i(e)]=c);e.zIndex(h)}else h=1e-5*e.yh()+32,e.zh=h}},t.g.M1=function(e){e=e.clone().round();var i=this.mD(e),n=b(this),s=this.g("zAngle"),a=this.g("zAspect"),o=this.g("zPadding"),r=this.g("zDistribution"),l=t.bb(s);if(s=t.bb(90-s),t.uo(a)){var h=(0,window.parseFloat)(a)/100;a=h*Math.sin(s);for(var c,u=h*Math.sin(l),d=h=0,p=this.Ue(),g=0;g<p.length;g++)if((c=p[g])&&c.enabled()&&c.check(t.tB)){var f=c.Ra();f=1/("ordinal"==f.Ma()?f.values().length:c.$().Hb());var m=this.g("barsPadding"),v=this.g("barGroupsPadding");f*=m=c.gh()||r?1/(1+v):1/(n+(n-1)*m+v),!c.gh()&&r?(h+=f*a,d+=f*u):h||(h=f*a,d=f*u)}this.i=Math.round(o*Math.sin(s)),this.o=Math.round(o*Math.sin(l)),o=this.Ks?i.height/(1+h):i.width/(1+h),this.oi=o*h,this.Mh=o*d,!this.FD&&r&&(this.oi+=this.i*(n-1),this.Mh+=this.o*(n-1)),this.oi=Math.round(this.oi),this.Mh=Math.round(this.Mh)}else this.K=!this.FD&&r?a*n+o*(n-1):t.N(a),this.oi=Math.round(this.K*Math.sin(s)),this.Mh=Math.round(this.K*Math.sin(l)),o*(r=n-1)>=this.K&&(o=(this.K-n)/r),this.i=Math.round(o*Math.sin(s)),this.o=Math.round(o*Math.sin(l));return this.oi=Math.max(this.oi,0)||0,this.Mh=Math.max(this.Mh,0)||0,this.i=Math.max(this.i,0)||0,this.o=Math.max(this.o,0)||0,e.top+=this.Mh,e.height-=this.Mh,e.width-=this.oi,e},t.g.SL=function(e,i,n){if(!this.FD&&this.g("zDistribution")){if(0<e)for(var s=1/(e=1+this.g("barGroupsPadding")),a=0;a<i.length;a++)(e=i[a].X).check(262144)&&n^e.g("isVertical")&&(t.jB(e,.5),t.iB(e,s))}else d.u.SL.call(this,e,i,n)},t.g.ig=function(e){var i=t.so(e.target);return(i=i&&i.X)&&!i.md&&i.enabled()?i.ig(e):d.u.ig.call(this,e)},t.g.U=function(t,e){d.u.U.call(this,t,e)};var F=d.prototype;t.E("anychart.cartesian3d",f),F.xScale=F.Ra,F.yScale=F.bb,F.crosshair=F.mh,F.xGrid=F.lm,F.yGrid=F.nm,F.xMinorGrid=F.Qr,F.yMinorGrid=F.Tr,F.xAxis=F.$h,F.getXAxesCount=F.wD,F.yAxis=F.ij,F.getYAxesCount=F.yD,F.getSeries=F.ef,F.zIndex=F.zIndex,F.lineMarker=F.Ym,F.rangeMarker=F.gn,F.textMarker=F.mn,F.palette=F.cc,F.markerPalette=F.Nf,F.hatchFillPalette=F.ve,F.getType=F.Ma,F.addSeries=F.kl,F.getSeriesAt=F.Ai,F.getSeriesCount=F.tj,F.removeSeries=F.Ao,F.removeSeriesAt=F.Rn,F.removeAllSeries=F.Dp,F.getPlotBounds=F.dg,F.xZoom=F.Tq,F.yZoom=F.Uq,F.xScroller=F.Mp,F.yScroller=F.Ur,F.getStat=F.Rg,F.getXScales=F.vy,F.getYScales=F.xy,t.Tp["area-3d"]=S,t.Tp["bar-3d"]=x,t.Tp["column-3d"]=w,t.Tp["line-3d"]=C,t.E("anychart.area3d",S),t.E("anychart.bar3d",x),t.E("anychart.column3d",w),t.E("anychart.line3d",C)}.call(this,$)),_.theme_timeline||(_.theme_timeline=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{timeline:{interactivity:{zoomOnMouseWheel:!0,scrollOnMouseWheel:!0},defaultRangeMarkerSettings:{zIndex:30.1,scaleRangeMode:"consider"},defaultLineMarkerSettings:{zIndex:30.2,scaleRangeMode:"consider"},defaultTextMarkerSettings:{zIndex:30.3,scaleRangeMode:"consider",align:"top"},legend:{enabled:!1},axis:{enabled:!0,zIndex:35,height:32,stroke:"#004e72",fill:"#004e72",ticks:{enabled:!0,stroke:"2 #60899b",zIndex:36},labels:{padding:7.5,fontSize:12,fontColor:"#d6f8ff",textOverflow:!0,format:"{%Value}",selectable:!1}},defaultSeriesSettings:{base:{direction:"auto",clip:!1},moment:{direction:"odd-even",connector:{length:"4%"},normal:{stroke:function(){return{color:t.Pl(this.sourceColor),thickness:1,dash:"2 2"}},markers:{enabled:!0},labels:{fontColor:"#212121",padding:5,enabled:!0,anchor:"left-center",width:120,background:{enabled:!0,fill:"#f2f8ff .7",corners:2,stroke:"#CECECE"},fontSize:11,offsetX:5}},zIndex:33,tooltip:{titleFormat:function(){return t.vs(this.x)}}},range:{direction:"up",zIndex:34,height:25,normal:{labels:{enabled:!0,anchor:"left-center",format:"{%x}",fontColor:"#000"},fill:function(){return this.sourceColor+" 0.3"}},tooltip:{format:"Start: {%start}{type:date}\nEnd: {%end}{type:date}"}}}}})}.call(this,$)),_.theme_stock||(_.theme_stock=1,function(t){var e=function(){var e=this.defaultDecimalDigitsCount||void 0;return this.seriesName+":\n  Open: "+t.vN(this.open,e)+"\n  High: "+t.vN(this.high,e)+"\n  Low: "+t.vN(this.low,e)+"\n  Close: "+t.vN(this.close,e)},i=function(){return t.us(this.x,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")))},n=function(){return t.us(this.hoveredDate,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")))};t.ra(t.fa.anychart.themes.defaultTheme,{defaultGroupingSettings:{enabled:!0,forced:!1,levels:[{unit:"millisecond",count:1},{unit:"millisecond",count:5},{unit:"millisecond",count:10},{unit:"millisecond",count:25},{unit:"millisecond",count:50},{unit:"millisecond",count:100},{unit:"millisecond",count:250},{unit:"millisecond",count:500},{unit:"second",count:1},{unit:"second",count:5},{unit:"second",count:10},{unit:"second",count:20},{unit:"second",count:30},{unit:"minute",count:1},{unit:"minute",count:5},{unit:"minute",count:15},{unit:"minute",count:30},{unit:"hour",count:1},{unit:"hour",count:2},{unit:"hour",count:6},{unit:"hour",count:12},{unit:"day",count:1},{unit:"week",count:1},{unit:"month",count:1},{unit:"month",count:3},{unit:"month",count:6},{unit:"year",count:1}],maxVisiblePoints:500,minPixPerPoint:window.NaN},stock:{grouping:{},scrollerGrouping:{levels:[{unit:"millisecond",count:1},{unit:"millisecond",count:2},{unit:"millisecond",count:5},{unit:"millisecond",count:10},{unit:"millisecond",count:25},{unit:"millisecond",count:50},{unit:"millisecond",count:100},{unit:"millisecond",count:250},{unit:"millisecond",count:500},{unit:"second",count:1},{unit:"second",count:2},{unit:"second",count:5},{unit:"second",count:10},{unit:"second",count:20},{unit:"second",count:30},{unit:"minute",count:1},{unit:"minute",count:2},{unit:"minute",count:5},{unit:"minute",count:10},{unit:"minute",count:20},{unit:"minute",count:30},{unit:"hour",count:1},{unit:"hour",count:2},{unit:"hour",count:3},{unit:"hour",count:4},{unit:"hour",count:6},{unit:"hour",count:12},{unit:"day",count:1},{unit:"day",count:2},{unit:"day",count:4},{unit:"week",count:1},{unit:"week",count:2},{unit:"month",count:1},{unit:"month",count:2},{unit:"month",count:3},{unit:"month",count:6},{unit:"year",count:1}],maxVisiblePoints:window.NaN,minPixPerPoint:1},defaultAnnotationSettings:{},defaultPlotSettings:{defaultLineMarkerSettings:{zIndex:200.2},defaultTextMarkerSettings:{zIndex:200.3},annotations:{annotationsList:[],zIndex:2e3},background:{enabled:!1},title:{text:"Plot Title",padding:[5,5,2,5],fontSize:12},defaultSeriesSettings:{base:{pointWidth:"75%",tooltip:{format:function(){var e=t.vN(this.value,this.defaultDecimalDigitsCount||void 0);return this.seriesName+": "+this.valuePrefix+e+this.valuePostfix},titleFormat:n},legendItem:{iconStroke:"none"},normal:{labels:{offsetY:10}}},areaLike:{normal:{labels:{format:i}},hovered:{markers:{enabled:null}},selected:{markers:{enabled:null}}},lineLike:{normal:{labels:{format:i}},hovered:{markers:{enabled:null}},selected:{markers:{enabled:null}}},rangeLike:{normal:{labels:{format:i}},tooltip:{format:function(){var e=this.defaultDecimalDigitsCount||void 0;return this.seriesName+":\n  High: "+t.vN(this.high,e)+"\n  Low: "+t.vN(this.low,e)}}},candlestick:{normal:{labels:{format:i}},tooltip:{format:e}},column:{normal:{labels:{format:i},stroke:"none"}},rangeColumn:{normal:{labels:{format:i},stroke:"none"}},ohlc:{normal:{labels:{format:i}},tooltip:{format:e}}},defaultGridSettings:{scale:0},defaultMinorGridSettings:{scale:0},defaultYAxisSettings:{enabled:!0,orientation:"left",title:{enabled:!1,text:"Y-Axis"},staggerMode:!1,staggerLines:null,ticks:{enabled:!0},width:50,labels:{fontSize:"11px",padding:{top:0,right:5,bottom:0,left:5}},minorLabels:{fontSize:"11px",padding:{top:0,right:5,bottom:0,left:5}},scale:0},defaultPriceIndicatorSettings:{label:{enabled:!0,background:{enabled:!0,fill:"#000"},fontColor:"#fff",padding:[2,9],hAlign:"center",fontSize:"11px"},stroke:"black"},xAxis:{enabled:!0,orientation:"bottom",background:{stroke:"#cecece",fill:"#F7F7F7"},height:25,showHelperLabel:!0,scale:0,ticks:{enabled:!1,position:"inside",length:"20%"},labels:{enabled:!0,fontSize:"11px",padding:5,anchor:"center-top",format:function(){return t.us(this.dataValue,t.ss(t.rs(this.majorIntervalUnit)))}},minorLabels:{enabled:!0,anchor:"center-top",fontSize:"11px",padding:{top:5,right:0,bottom:5,left:0},format:function(){return t.us(this.dataValue,t.ss(t.rs(this.minorIntervalUnit,this.majorIntervalUnit)))}}},dateTimeHighlighter:"#B9B9B9",legend:{enabled:!0,vAlign:"bottom",iconSize:13,position:"top",titleFormat:function(){return t.us(this.value,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")))},align:"left",padding:10,title:{enabled:!0,fontSize:12,text:"",background:{enabled:!1,fill:{keys:["#fff","#f3f3f3","#fff"],angle:"90"},stroke:{keys:["#ddd","#d0d0d0"],angle:"90"}},margin:{top:0,right:15,bottom:0,left:0},padding:0,orientation:"left",align:"left",hAlign:"left",rotation:0,wordBreak:"break-all"},titleSeparator:{enabled:!1,width:"100%",height:1,margin:{top:3,right:0,bottom:3,left:0},orientation:"top",fill:["#000 0","#000","#000 0"],stroke:"none"}},scales:[{type:"linear"}],yScale:0,zIndex:10,yAxes:[{}],crosshair:{zIndex:201,xLabels:[{enabled:null}],yLabels:[{enabled:null}]},dataArea:{zIndex:10,background:{fill:"none"}},baseline:0,weight:null},padding:[20,30,20,60],plots:[{}],eventMarkers:{stickToLeft:!0,normal:{type:"circle",width:22,height:22,fill:"#515151",stroke:"#515151",fontColor:"#fff",adjustFontSize:!0,minFontSize:6,maxFontSize:20,fontSize:null,format:"A",hAlign:"center",vAlign:"middle",fontPadding:2,connector:{length:5,stroke:"#455a64"}},hovered:{fill:t.FN},selected:{fill:"#dd2c00"},tooltip:{title:{fontColor:"#fff",enabled:!0},titleFormat:function(){var e=t.us(this.date,t.ss(t.rs(this.dataIntervalUnit,void 0,"full")));return this.title?this.title+" ("+e+")":e},format:function(){return this.description||this.symbol},fontColor:"#fff",separator:!0},direction:"auto",position:"axis",seriesId:"0",fieldName:"value"},scroller:{defaultSeriesSettings:{base:{enabled:!0,normal:{fill:"#999 0.6",stroke:"#999 0.6",lowStroke:"#999 0.6",highStroke:"#999 0.6"},selected:{fill:t.zN,stroke:t.zN,lowStroke:t.zN,highStroke:t.zN},pointWidth:"75%"},marker:{normal:{fill:"#999 0.6",stroke:"#999 0.6"},selected:{fill:t.zN,stroke:t.zN}},areaLike:{normal:{fill:"#999 0.6"}},barLike:{normal:{fill:"#999 0.6"}},candlestick:{normal:{risingFill:"#999 0.6",risingStroke:"#999 0.6",fallingFill:"#999 0.6",fallingStroke:"#999 0.6"},selected:{risingFill:"#64b5f6",risingStroke:"#64b5f6",fallingFill:"#ef6c00",fallingStroke:"#ef6c00"}},ohlc:{normal:{risingStroke:"#999 0.6",fallingStroke:"#999 0.6"},selected:{risingStroke:"#64b5f6",fallingStroke:"#ef6c00"}},stick:{normal:{stroke:"#999 0.6"},selected:{stroke:t.IN}},jumpLine:{normal:{stroke:"#999 0.6"},selected:{stroke:t.IN}}},enabled:!0,fill:"none",selectedFill:"#1976d2 0.2",outlineStroke:"#cecece",height:40,minHeight:null,maxHeight:null,zIndex:40,xAxis:{background:{enabled:!1},labels:{enabled:!0,fontSize:"11px",padding:5,anchor:"left-top",format:function(){return t.us(this.dataValue,t.ss(t.rs(this.majorIntervalUnit)))}},minorLabels:{enabled:!0,anchor:"left-top",fontSize:"11px",padding:5,format:function(){return t.us(this.dataValue,t.ss(t.rs(this.minorIntervalUnit,this.majorIntervalUnit)))}},ticks:{position:"center",length:"100%"},minorTicks:{enabled:!0,stroke:"#cecece",position:"center",length:"100%"},zIndex:75,showHelperLabel:!0}},splitters:{enabled:!0,normal:{stroke:"1 #ddd 0.5"},hovered:{stroke:"1 #ddd 0.8"},preview:{fill:"#000 0.1"}},plotsManualBounds:!1,tooltip:{allowLeaveScreen:!0,displayMode:"union",title:{fontSize:13},titleFormat:n},a11y:{titleFormat:t.NN},zoomMarqueeFill:"#d3d3d3 0.4",zoomMarqueeStroke:"#d3d3d3",interactivity:{allowPlotDrag:!0,zoomOnMouseWheel:!1,scrollOnMouseWheel:!1},crosshair:{enabled:!0,displayMode:"sticky",xLabels:[{enabled:null}],yLabels:[{enabled:null}],xStroke:"#969EA5",yStroke:"#969EA5"}}})}.call(this,$)),_.theme_treemap||(_.theme_treemap=1,function(t){t.ra(t.fa.anychart.themes.defaultTheme,{treeMap:{sort:"desc",labelsDisplayMode:"clip",headersDisplayMode:"always-show",colorRange:{zIndex:50},colorScale:{type:"ordinal-color"},tooltip:{enabled:!0,titleFormat:t.xN,format:t.wN},legend:{itemsSourceMode:"categories"},maxDepth:1,hintDepth:0,hintOpacity:.4,maxHeadersHeight:"25",normal:{fill:function(){return this.colorScale?this.colorScale.valueToColor(this.value):t.Ul(this.sourceColor,.85,!0)},stroke:"#e0e0e0",hatchFill:!1,labels:{enabled:!0,hAlign:"center",vAlign:"middle",position:"center",anchor:"center",fontColor:"#212121",format:function(){return(this.name||this.getData("id"))+"\n"+t.vN(this.value)}},markers:{enabled:!1,position:"center",size:6,fill:"#dd2c00",type:"circle"},headers:{enabled:!0,hAlign:"center",vAlign:"middle",position:"center",anchor:"center",background:{enabled:!0,fill:"#F7F7F7",stroke:"#e0e0e0"},format:t.xN}},hovered:{fill:t.FN,stroke:t.EN,hatchFill:!1,labels:{enabled:null,fontWeight:"bold"},markers:{enabled:null,size:8},headers:{enabled:!0,fontColor:"#333 0.85",background:{fill:"#e0e0e0",stroke:"#e0e0e0"}}},selected:{fill:"#333 0.85",stroke:"1.5 #212121",hatchFill:!1,labels:{enabled:null,fontColor:"#fafafa"},markers:{enabled:null,size:8,fill:"#333 0.85",stroke:"1.5 #212121"}}}})}.call(this,$)),_.linear_gauge_part||(_.linear_gauge_part=1,function(t){var e=function(e,i){return t.zk(A,e,i||"bar")},i=function(e){t.ix.call(this,e)},n=function(){t.Sy.call(this),t.T(this.ua,[["width",this.se,9],["offset",16,9]])},s=function(e,i){t.EA.call(this,e,i)},a=function(e){t.Y.call(this),this.Wk=e,t.T(this.ua,[["width",16,9],["offset",16,9],["from",20,9],["to",20,9],["points",16,1],["fill",16,1],["stroke",16,1]])},o=function(t,e){return t.height-e.height},r=function(t,e,i,n){var s=t.xa();if(s){e=t.Qe(e,n,!s);var a=t.Qe(i,n,s)}else a=t.Qe(e,n,!s),e=t.Qe(i,n,s);return[e,a]},l=function(){t.Y.call(this),this.Hr=["value"],this.state=new i(this),this.o=t.kn(0,0,0,0),this.b=this.path=null,this.qc=8208,t.T(this.ua,[["name",0,64],["width",16,9],["offset",16,9]]);var e={};t.T(e,[["fill",16,65],["stroke",16,65],["hatchFill",16,65],["labels",0,0]]),this.ca=new t.my(this,e,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),e={},t.T(e,[["fill",0,0],["stroke",0,0],["hatchFill",0,0],["labels",0,0]]),this.za=new t.my(this,e,t.vo),this.Ea=new t.my(this,e,t.wo),this.Uc=t.cm("fill",1,!0),this.ud=t.cm("stroke",2,!0),this.ec=t.cm("hatchFill",3,!0),this.data(null)},h=function(){l.call(this)},c=function(){function e(t){return function(){g(this,t)}}function i(t,e){return e!=t&&e}l.call(this),this.D={},this.qc|=1048576,this.K="",t.T(this.ua,[["dimmer",16,1,0],["gap",16,1,0,e("g"),this,i],["size",16,1,0,e("s"),this,i],["count",16,1,0,e("c"),this,function(t,e){return e!=t&&!(0,window.isNaN)(e)}]])},u=function(e){for(var i in e.D)t.qd(e.D[i][0]);e.D={}},d=function(t,e){var i=t.ja();if(t.xa()){var n=i.Va();i=-i.height}else n=i.left,i=i.width;return(e-n)/i},p=function(e){var i=e.g("gap"),n=e.g("size"),s=e.g("count");t.p(i)&&null!==i&&g(e,"g"),t.p(n)&&null!==n&&g(e,"s"),t.p(s)&&null!==s&&g(e,"c")},g=function(t,e){var i=t.K;if(2>i.length)t.K+=e;else if(i.charAt(1)!=e){var n=i.charAt(0);if(i=(i+e).slice(1),t.K=i,n!=e)switch(n){case"g":t.ta("gap",null);break;case"s":t.ta("size",null);break;case"c":t.ta("count",null)}}},f=function(){l.call(this)},m=function(e,i){return t.p(i)?(e.WF=i,e):e.WF},v=function(){l.call(this),this.Hr=["high","low"]},b=function(){l.call(this),this.ea=this.fb=this.$a=this.sb=this.ba=this.Ha=this.Ba=this.na=this.Ka=this.aa=this.G=this.D=null,t.uy(this.ca,[["emptyFill",16,65],["emptyHatchFill",16,65]]);var e=[["emptyFill",0,0],["emptyHatchFill",0,0]];t.uy(this.za,e),t.uy(this.Ea,e),this.Od=t.cm("emptyFill",1,!0),this.me=t.cm("emptyHatchFill",3,!0)},y=function(t){return 0>=t?0:t*Math.round(1e15*Math.sin(90*Math.PI/180))/1e15},S=function(t,e,i){if(t.xa()){t=i.width/2;var n=.1488095238*i.width,s=i.left+i.width,a=i.top+i.height;e.moveTo(i.left,i.top).Ff(s,i.top,t,n,!1,!0).lineTo(s,a).Ff(i.left,a,t,n,!1,!0)}else t=.1488095238*i.height,n=i.height/2,s=i.top+i.height/2+y(n),e.moveTo(i.left+(0>=t?0:t*Math.round(1e15*Math.cos(90*Math.PI/180))/1e15),s).Ff(i.left,i.top,t,n,!0,!0).lineTo(i.left+i.width,i.top).Ff(i.left+i.width,s,t,n,!1,!0)},x=function(t,e,i){if(t.xa()){t=i.width/2;var n=.1488095238*i.width;e.moveTo(i.left,i.top),e.Ff(i.left,i.top-.1,t,n,!0,!1)}else{t=.1488095238*i.height,n=i.height/2;var s=i.top+i.height/2+y(n);e.moveTo(i.left+i.width+1.5,i.top+1),e.Ff(i.left+i.width+1.5,s,t,n,!0,!1)}},w=function(t,e,i){if(t.xa())e.moveTo(i.left,i.top),e.Ff(i.left,i.top-.1,i.width/2,.1488095238*i.width,!0,!1);else{t=.1488095238*i.height;var n=i.height/2;e.moveTo(i.left+i.width-1,i.top),e.Ff(i.left+i.width-1+.1,i.top,t,n,!0,!1)}},C=function(){l.call(this),t.T(this.ua,[["bulbRadius",16,9],["bulbPadding",16,9]])},T=function(e,i){t.Bx.call(this),this.Ga("linearGauge"),this.f=[],this.b=[],this.o=[],this.D=0,this.data(e||null,i),t.T(this.ua,[["globalOffset",4,1],["layout",4,1],["defaultPointerType",0,0]]),t.wr(this,"tooltip")},D=function(e,i){return t.xa(e.b,(function(t){return t.id()==i}))},k=function(t){for(var e=t.b.length;e--;)t.b[e].B(1056784)},$=function(t,e){return new s(t,e)},O=function(t,e){var i=new T;return i.data(t,e),i.ta("defaultPointerType","bar"),i.re="linear-gauge",i},P=function(t,e){var i=new T;return i.Ga("thermometer"),i.data(t,e),i.ta("defaultPointerType","thermometer"),i.re="thermometer",i},L=function(t,e){var i=new T;return i.Ga("tank"),i.data(t,e),i.ta("defaultPointerType","tank"),i.re="tank",i},I=function(t,e){var i=new T;return i.Ga("led"),i.data(t,e),i.ta("defaultPointerType","led"),i.re="led",i},A={kF:"bar",qZ:"range-bar",av:"marker",usa:"thermometer",ssa:"tank",rpa:"led"};t.H(i,t.ix),i.prototype.Lh=function(e,i,n){var s;if(t.p(i)){var a=this.target.$().Hb(),o=!0;if(t.A(i))for(t.Pa(i),s=i.length;s--;){var r=+i[s];r<a&&(t.lx(this,e,r,n),o=!1)}else+i<a&&(t.lx(this,e,+i,n),o=!1);o||this.target.wm()}else if(!(this.Gc&e)){for(i=t.gm,e==t.gm||e==t.vo?i=t.vo:e==t.wo&&(i=t.wo|t.vo),s=this.b.length;s--;)t.px(this,i,s)&&(this.target.$().select(this.f[s])&&this.target.pk(t.gm),t.Ca(this.b,s,1),t.Ca(this.f,s,1));this.target.wm(),t.kx(this)&&(this.target.pf()&&t.kx(this,0)&&this.target.ml(e),this.Gc=e)}},i.prototype.Vh=function(e,i){var n;if(t.p(i)){if(t.A(i))for(t.Pa(i),n=i.length;n--;)t.rx(this,e,+i[n]);else if((0,window.isNaN)(i))for(n=this.f.length;n--;)t.jx(this,e,n);else t.rx(this,e,+i);this.target.wm(),this.target.eh()||"single"!=this.target.Xl()||this.target.ml(t.mx(this,t.wo)?t.wo:t.mx(this,t.vo)?t.vo:t.gm)}else{for(n=this.b.length;n--;)t.px(this,e,n)&&(this.target.$().select(this.f[n])&&this.target.pk(t.gm),t.Ca(this.f,n,1),t.Ca(this.b,n,1));this.target.wm(),this.Gc&=~e,this.target.pf()&&t.kx(this,0)&&this.target.ml(this.Gc)}},t.H(n,t.Sy),n.prototype.bG=function(t){return t},n.prototype.WT=function(){return 7};var E={};t.sq(E,[[0,"width",t.zo],[0,"offset",t.zo]]),t.U(n,E),n.prototype.F=function(){var e=n.u.F.call(this);return t.Tq(this,E,e,"Axis"),e},n.prototype.U=function(e,i){n.u.U.call(this,e,i),t.Iq(this,E,e,i)},t.H(s,t.EA),s.prototype.lb=function(e){var i=this.xc().nU(this.index),n=t.tx(i.state,t.vo,0);return t.p(e)&&n!=e?(e?i.$i():i.Md(),this):n},s.prototype.selected=function(e){var i=this.xc().nU(this.index),n=t.tx(i.state,t.wo,0);return t.p(e)&&n!=e?(e?i.Ii():i.ie(),this):n};var G=s.prototype;G.hovered=G.lb,G.selected=G.selected,t.H(a,t.Y),a.prototype.sa=16|t.Y.prototype.sa;var U={};t.sq(U,[[0,"width",t.zo],[0,"offset",t.zo],[0,"from",t.Cq],[0,"to",t.Cq],[0,"points",t.Cq],[1,"fill",t.Qq],[1,"stroke",t.Pq]]),t.U(a,U),t.g=a.prototype,t.g.scale=function(e){return t.p(e)?t.J(e,t.kt)?(this.qa!=e&&(this.qa&&t.kr(this.qa,this.ii,this),(this.qa=e)&&t.K(this.qa,this.ii,this),this.B(16,5)),this):(t.il(5,void 0,["ScaleBar scale","scatter","linear, log"]),this):(this.qa||(this.qa=this.Wk.scale(),t.K(this.qa,this.ii,this)),this.qa)},t.g.ii=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)?i|=1:this.va(i),this.B(16,i)},t.g.kd=function(e){if(t.p(e)){if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,this.vb.da(i),i||this.B(16,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(16,1)},t.g.uo=function(){this.B(20)},t.g.we=function(e){return t.p(e)?(this.f=e,this):this.f},t.g.xa=function(){return"vertical"==this.f},t.g.remove=function(){this.Aa&&this.Aa.parent(null)},t.g.vj=function(e,i){var n=this.scale();return t.z(e)?"min"==(e=e.toLowerCase())?n.transform(n.uh()):"max"==e?n.transform(n.di()):(0,window.parseFloat)(t.zo(e))/100:t.ea(e)?(e=n.transform(e),t.Za(e,0,1)):i},t.g.Qe=function(e,i,n){return i=t.p(i)?i:this.ja(),(t.p(n)?n:this.xa())?(n=i.Va(),i=-i.height):(n=i.left,i=i.width),n+e*i},t.g.W=function(){if(!this.zc())return this;var e,i=this.O();this.Aa||(this.Aa=t.ok());var n=this.g("points");if(n||(n=[],this.ta("points",n)),t.Pa(n,o),n[0]&&0==n[0].height||n.unshift({height:0,left:0,right:0}),n[n.length-1]&&1==n[n.length-1].height||n.push({height:1,left:0,right:0}),this.J(8)&&(this.Aa.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(i),this.I(2)),this.J(4)){if((i=this.vj(this.g("from"),0))>(n=this.vj(this.g("to"),1))){var s=i;i=n,n=s}this.o=this.Qe(i),this.D=this.Qe(n),this.I(4)}var a=this.kd();if(this.J(16)){if(this.i?this.i.clear():this.i=t.qk(),this.b)for(e=0;e<this.b.length;e++)this.b[e].clear();else this.b=[];var l,h=this.ja(),c=this.xa();if(c){s=(i=h.left)+(e=h.width),n=this.D,h=this.o;var u=Math.abs(h-n)}else i=this.o,s=this.D,e=Math.abs(i-s),h=(n=h.top)+(u=h.height);!function(t,e){var i,n=t.scale().Ne(),s=t.g("points"),a=n?1-s[0].left:s[0].left,o=n?1-s[0].height:s[0].height;for(o=r(t,a,o,e),t.i.moveTo(o[0],o[1]),i=1;i<s.length;i++)a=n?1-s[i].left:s[i].left,o=n?1-s[i].height:s[i].height,o=r(t,a,o,e),t.i.lineTo(o[0],o[1]);for(i=s.length;i--;)a=n?s[i].right:1-s[i].right,o=n?1-s[i].height:s[i].height,o=r(t,a,o,e),t.i.lineTo(o[0],o[1]);t.i.close()}(this,t.kn(i,n,e,u)),a&&(l=a.Jj());var d=this.scale().Ne();if(e=this.g("fill"),u=this.g("stroke"),null!=e||null!=u)(a=this.b[0]?this.b[0]:this.b[0]=this.Aa.path()).moveTo(i,n).lineTo(s,n).lineTo(s,h).lineTo(i,h).lineTo(i,n).close(),a.fill(e||null),a.stroke(u||null),a.clip(this.i);else if(t.J(a,t.fz)){var p=(0,t.Wa)(l,(function(t){return t.offset}));l=d?a.Jj().reverse():a.Jj(),d&&(l=(0,t.Wa)(l,(function(t,e){var i={};return i.color=t.color,i.offset=p[e],i.opacity=t.opacity,i}))),(e=t.Ub(l)).angle=c?90:0,(a=this.b[0]?this.b[0]:this.b[0]=this.Aa.path()).moveTo(i,n).lineTo(s,n).lineTo(s,h).lineTo(i,h).lineTo(i,n).close(),a.fill(e).stroke("none"),a.clip(this.i)}else if(t.J(a,t.iz)){a.Of()&&a.Bg().Xc(0,1).Hg(),u=a.sr(),d=this.scale();var g=u.length-1;for(e=0;e<g;e++){var f=u[e],m=f.color||l[f.sourceIndex]||l[l.length-1];(a=this.b[e]?this.b[e]:this.b[e]=this.Aa.path()).clear();var v=t.p(f.start)?f.start:d.uh();f=t.p(f.end)?f.end:d.di(),v=this.Qe(d.transform(v)),f=this.Qe(d.transform(f)),(0,window.isNaN)(v)||(0,window.isNaN)(f)||(c?a.moveTo(i,v).lineTo(i,f+.5).lineTo(s,f+.5).lineTo(s,v).close():a.moveTo(v,n).lineTo(f+.5,n).lineTo(f+.5,h).lineTo(v,h).close(),a.fill(m).stroke("none"))}this.Aa.clip(this.i)}this.I(16)}return this},t.g.F=function(){var e=a.u.F.call(this);return t.Tq(this,U,e,"ScaleBar"),this.kd()&&(e.colorScale=this.kd().F()),e},t.g.U=function(e,i){if(a.u.U.call(this,e,i),t.Iq(this,U,e,i),"colorScale"in e){var n=e.colorScale,s=null;t.z(n)?s=t.dt(n,null):t.C(n)&&(s=t.dt(n.type,null))&&s.N(n),s&&this.kd(s)}},t.g.R=function(){this.b&&(t.sd(this.b),this.b=null),t.qd(this.vb),this.vb=null,t.qd(this.i),this.i=null,this.qa&&t.kr(this.qa,this.ii,this),this.qa=null,a.u.R.call(this)};var F=a.prototype;F.scale=F.scale,F.colorScale=F.kd,t.H(l,t.Y),t.Gq(l,["fill","stroke","hatchFill","labels"],"normal"),t.g=l.prototype,t.g.ra=68|t.Y.prototype.ra,t.g.sa=8208|t.Y.prototype.sa,t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.gm),this.sd=null,t.J(e,t.Cr)?this.i=this.gm=e.Ui():t.J(e,t.Mr)?this.i=this.gm=e.Yd():this.i=null===e?null:(this.gm=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.i&&t.K(this.i,this.dd,this),this.B(1048592,5)),this):this.i},t.g.dd=function(e){t.X(e,16)&&this.B(16,1)},t.g.xs=function(){var t=this.$(),e=[];if(t.select(this.Ch()))for(var i=0;i<this.Hr.length;i++)e.push(t.get(this.Hr[i]));return e},t.g.ma=function(){return this.md?-1:(0,t.za)(this.Te.Ue(),this)},t.g.yh=function(e){return t.p(e)?(this.Wq=e,this):this.Wq},t.g.id=function(e){return t.p(e)?(this.he=e,this):this.he||String(this.Wq)},t.g.Ch=function(e){return t.p(e)?(this.P!=e&&(this.P=e,this.B(16,1)),this):null!=this.P?this.P:this.i?0:this.yh()},t.g.Ffa=function(){return this.Wk()},t.g.Wk=function(e){return t.p(e)?(this.Te!=e&&(this.Te=e),this):this.Te},t.g.$=function(){return this.i?this.sd||(this.sd=this.i.$()):this.Te.$()},t.g.Ec=function(){return this.i?this.sd=this.i.$():this.Te.Ec()},t.g.we=function(e){return t.p(e)?(this.f=e,this):this.f},t.g.scale=function(e){return t.p(e)?t.J(e,t.kt)?(this.qa!=e&&(this.qa&&t.kr(this.qa,this.zg,this),(this.qa=e)&&t.K(this.qa,this.zg,this),this.B(16,1)),this):(t.il(5,void 0,["Pointer scale","scatter","linear, log"]),this):(this.qa||this.scale(this.Te.scale()),this.qa)},t.g.zg=function(e){var i=0;t.X(e,4)&&(i|=4),t.X(e,2)?i|=1:this.va(i),this.B(16,i)},t.g.xa=function(){return"vertical"==this.f},t.g.zk=function(){var t=this.$().get("value");return(0,window.isNaN)(this.scale().transform(t))},t.g.vR=function(){var t=this.scale(),e=t.uh();return t.transform(e)},t.g.iv=function(){var e=this.$();return e.select(this.Ch()),e=e.get("value"),t.Za(this.scale().transform(e),0,1)},t.g.de=function(e){t.X(e,1)&&this.B(8192,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.sc=function(e,i,n,s,a,o,r){return a=(0==i?this.ca:1==i?this.za:this.Ea).g(e),r?e=a:(r=n.get(0==i?"normal":1==i?"hovered":"selected"),e=t.Zo(t.p(r)?r[e]:void 0,n.get(t.hm(i,e)),a)),t.p(e)&&(e=s(e)),e},t.g.Eh=function(){return this.VF||t.Yb("diagonal-brick")},t.g.Yi=function(){return{index:this.$().ma(),isVertical:this.xa(),sourceHatchFill:this.Eh()}},t.g.Ge=function(t){return{index:this.$().ma(),isVertical:this.xa(),sourceColor:t=t||this.color()}},t.g.color=function(e,i,n,s,a,o,r){if(t.p(e)){var l=null===e?null:t.Ub.apply(null,arguments);return this.Sb!=l&&(this.Sb=l,this.B(16,65)),this}return this.Sb||this.Hd||"blue"},t.g.Kq=function(t){this.Hd=t},t.g.dx=function(e){this.VF=t.Yb(e)},t.g.uo=function(){this.B(this.qc)},t.g.Qe=function(t){var e=this.ja();if(this.xa()){var i=e.Va();e=-e.height}else i=e.left,e=e.width;return i+t*e},t.g.pU=function(){return[0,0,0,0]},t.g.qD=function(e){var i=this.Ls();i.I(i.sa);var n=i.F(),s={sourceColor:this.color()};if(t.D(i.Gs())&&(n.iconFill=i.Gs().call(s,s)),t.D(i.Is())&&(n.iconStroke=i.Is().call(s,s)),t.D(i.Hs())&&(s.sourceColor=this.VF,n.iconHatchFill=i.Hs().call(s,s)),t.D(e)){i=this.RC();var a=e.call(i,i)}return t.z(a)||(a=t.p(this.g("name"))?this.g("name"):"Pointer: "+this.yh()),n.iconType=this.pD(n.iconType),e={meta:{},text:a,iconEnabled:!0,iconStroke:this.ud(this,t.gm,!0),iconFill:this.Uc(this,t.gm,!0),iconHatchFill:this.ec(this,t.gm,!0),disabled:!this.enabled()},t.Sc(e,n),e},t.g.pD=function(e){return t.Vk(e)},t.g.RC=function(){return this.qu||(this.qu=new t.Fw(void 0,void 0,[this])),this.qu},t.g.Ls=function(e){return this.vp||(this.vp=new t.cB,t.W(this,"legendItem",this.vp),t.K(this.vp,this.NW,this)),t.p(e)?(this.vp.N(e),this):this.vp},t.g.NW=function(e){var i=64,n=!1;t.X(e,8)&&(i|=8,n=!0),this.va(i,n)},t.g.remove=function(){this.Aa&&this.Aa.parent(null),this.Qa().labels()&&this.Qa().labels().remove()},t.g.Lt=t.ia,t.g.aD=t.ia,t.g.fG=function(t){var e=this.Uc(this,t,!1),i=this.ud(this,t,!1);t=this.ec(this,t,!1),this.path.fill(e),this.path.stroke(i),this.b.fill(t),this.b.stroke("none")},t.g.FS=function(){this.path?this.path.clear():(this.path=this.Aa.path(),this.qC(this.path)),this.b?this.b.clear():(this.b=this.Aa.path(),this.b.Dd(!0))},t.g.tf=function(e){var i,n=this.$(),s=!!(e&t.wo),a=!s&&!!(e&t.vo),o=this.Qa().labels(),r=this.lb().labels(),l=this.selected().labels();i=s?l:a?r:null;var h=this.Qa().labels().be(0),c=n.get("normal");c=t.p(c)?c.label:void 0;var u=n.get("hovered");u=t.p(u)?u.label:void 0;var d=n.get("selected");d=t.p(d)?d.label:void 0,c=t.Zo(c,n.get("label")),u=a?t.Zo(u,n.get("hoverLabel")):null,n=s?t.Zo(d,n.get("selectLabel")):null,d=c&&t.p(c.enabled)?c.enabled:null;var p=n&&t.p(n.enabled)?n.enabled:null,g=u&&t.p(u.enabled)?u.enabled:null;if(a||s?a?null===g?null===r.enabled()?null===d?o.enabled():d:r.enabled():g:null===p?null===l.enabled()?null===d?o.enabled():d:l.enabled():p:null===d?o.enabled():d){e=!(s=!!(e&t.wo))&&!!(e&t.vo),d=(r=this.$()).get("normal"),d=t.p(d)?d.label:void 0,p=r.get("hovered"),p=t.p(p)?p.label:void 0,l=r.get("selected"),l=t.p(l)?l.label:void 0,d=t.Zo(d,r.get("label")),p=e?t.Zo(p,r.get("hoverLabel")):null,g=s?t.Zo(l,r.get("selectLabel")):null,r=d&&d.position?d.position:null,l=p&&p.position?p.position:null,d=g&&g.position?g.position:null,p=this.Qa().labels(),g=this.lb().labels();var f=this.selected().labels();s=e||s?e?l||(g.g("position")?g.g("position"):r||p.g("position")):d||(f.g("position")?f.g("position"):r||p.g("position")):r||p.g("position"),s=function(t,e){var i=t.scale().Ne();if(t.xa()){if(!i)return e;switch(e){case"left-top":return"left-bottom";case"left-center":return"left-center";case"left-bottom":return"left-top";case"center-top":return"center-bottom";case"center":return"center";case"center-bottom":return"center-top";case"right-top":return"right-bottom";case"right-center":return"right-center";case"right-bottom":return"right-top"}}switch(e){case"left-top":return i?"left-top":"right-top";case"left-center":return"center-top";case"left-bottom":return i?"right-top":"left-top";case"center-top":return i?"left-center":"right-center";case"center":return"center";case"center-bottom":return i?"right-center":"left-center";case"right-top":return i?"left-bottom":"right-bottom";case"right-center":return"center-bottom";case"right-bottom":return i?"right-bottom":"left-bottom"}return e}(this,t.Ek(s)),s={value:t.Eo(this.o,s)},e=this.Ic(),h?(t.Yu(o,0),h.Hf(e),h.jc(s)):h=o.add(e,s,0),h.Hi(),t.$u(h,i),h.td(c,a?u:n),h.W()}else h&&o.clear(h.ma())},t.g.W=function(){if(!this.zc())return this;var e=this.O();this.Aa||(this.Aa=t.ok(),t.ru(this,this.Aa));var i=this.Qa().labels();return this.J(8)&&(this.Aa.zIndex(this.zIndex()),i&&i.zIndex(this.zIndex()),this.I(8)),this.J(2)&&(this.Aa.parent(e),i&&i.O(e),this.I(2)),this.J(4)&&this.I(4),e=this.$(),this.J(16)&&(this.FS(),e.select(this.Ch())&&!this.zk()&&(this.xa()?this.Lt():this.aD(),this.fG(t.nx(this.state,0))),this.I(16)),this.J(8192)&&(e.select(this.Ch())?(this.tf(t.nx(this.state,0)),i.W()):i.clear(),this.I(8192)),this},t.g.Xl=function(e){return t.p(e)?this:this.Te.gd().g("hoverMode")},t.g.ej=function(e){return t.p(e)?((e=null===e?null:t.Bk(e))!=this.et&&(this.et=e),this):this.et},t.g.eh=function(){return!0},t.g.Ak=function(){return!1},t.g.ml=function(t){this.fG(t)},t.g.pk=function(t,e){return this.fG(t),this.tf(t),e},t.g.pq=t.ia,t.g.wm=t.ia,t.g.aj=function(){return!0},t.g.qC=function(t){t&&(t.tag={X:this,index:0})},t.g.Ih=function(t){(t=this.Tg(t))&&this.dispatchEvent(t)},t.g.Tg=function(t){var e=t.type;switch(e){case"mouseout":e="pointmouseout";break;case"mouseover":e="pointmouseover";break;case"mousemove":e="pointmousemove";break;case"mousedown":e="pointmousedown";break;case"mouseup":e="pointmouseup";break;case"click":case"touchstart":e="pointclick";break;case"dblclick":e="pointdblclick";break;default:return null}t.pointIndex=0;var i=this.Ec();return i.select(this.Ch())||i.reset(),{type:e,actualTarget:t.target,series:this,iterator:i,pointIndex:0,target:this,originalEvent:t}},t.g.Ic=function(e){this.$().select(this.Ch()),this.oe&&!e||(this.oe=new t.Fw);var i={pointer:{value:this,type:""},index:{value:(e=this.$()).ma(),type:"number"},value:{value:e.get("value"),type:"number"},name:{value:this.g("name")||"Pointer "+this.yh(),type:"string"},high:{value:e.get("high"),type:"number"},low:{value:e.get("low"),type:"number"}};return this.oe.lg(e),t.ov(this.oe,i)},t.g.Rk=function(){return this.Ic()},t.g.Md=function(){var e;return(e=!t.mx(this.state,t.vo))&&(e=!(this.state.fk()&t.vo)),e||!this.enabled()||this.state.Vh(t.vo,this.state.Gc==t.gm?window.NaN:void 0),this},t.g.$i=function(e){return this.enabled()?(null!=e||(e=0),t.ea(e)&&(this.Md(),t.qx(this.state,0)),this):this},t.g.Zk=function(){this.enabled()&&this.state.Lh(t.vo)},t.g.ie=function(){return this.enabled()?(this.state.Vh(t.wo,this.state.Gc==t.gm?window.NaN:void 0),this):this},t.g.Ii=function(e,i){return this.enabled()?(null!=e||(e=0),t.p(i)&&(n=!(i&&i.shiftKey)),t.ea(e)&&this.state.Lh(t.wo,0,n?t.vo:void 0),this):this;var n},t.g.Gu=function(){this.enabled()&&this.state.Lh(t.wo)};var M={};t.sq(M,[[0,"name",t.Cq],[0,"width",t.zo],[0,"offset",t.zo]]),t.U(l,M),l.prototype.F=function(){var e=l.u.F.call(this);return t.Tq(this,M,e,"Pointer"),e.pointerType=this.Ma(),this.i&&(e.data=this.data().F()),t.p(this.P)&&(e.dataIndex=this.P),e.legendItem=this.Ls().F(),this.he&&(e.id=this.id()),this.Wq!=this.ma()&&(e.autoIndex=this.yh()),this.Sb&&(e.color=t.Rl(this.Sb)),e.normal=this.Qa().F(),e.hovered=this.lb().F(),e.selected=this.selected().F(),e},l.prototype.U=function(e,i){l.u.U.call(this,e,i),this.id(e.id),this.yh(e.autoIndex),this.Ch(e.dataIndex),"data"in e&&this.data(e.data||null),this.Ls().N(e.legendItem),t.Iq(this,M,e,i),this.color(e.color),this.ca.ga(!!i,e),this.ca.ga(!!i,e.normal),this.za.ga(!!i,e.hovered),this.Ea.ga(!!i,e.selected)},l.prototype.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},l.prototype.R=function(){t.sd(this.path,this.b),this.b=this.path=null,t.qd(this.Aa),this.Aa=null,this.qa&&t.kr(this.qa,this.zg,this),this.qa=null,t.sd(this.ca,this.za,this.Ea),this.Ea=this.za=this.ca=null,t.qd(this.vp),this.vp=null,l.u.R.call(this)};var _=l.prototype;_.scale=_.scale,_.legendItem=_.Ls,_.id=_.id,_.dataIndex=_.Ch,_.getGauge=_.Ffa,_.color=_.color,_.data=_.data,_.normal=_.Qa,_.hovered=_.lb,_.selected=_.selected,_.hover=_.$i,_.unhover=_.Md,_.select=_.Ii,_.unselect=_.ie,t.H(h,l),h.prototype.Ma=function(){return"bar"},h.prototype.xs=function(){var t=h.u.xs.call(this);return t.push(0),t},h.prototype.Lt=function(){var t=this.ja(),e=this.xa(),i=this.scale().Ne();if(e){var n=(e=t.left)+t.width,s=this.Qe(this.iv());t=this.Qe(this.vR()),this.o.left=e,this.o.top=i?t:s}else e=this.Qe(this.vR()),n=this.Qe(this.iv()),t=(s=t.top)+t.height,this.o.left=i?n:e,this.o.top=s;this.o.width=Math.abs(n-e),this.o.height=Math.abs(s-t),this.path.clear().moveTo(e,s).lineTo(n,s).lineTo(n,t).lineTo(e,t).lineTo(e,s).close(),this.b.pe(this.path.F())},h.prototype.aD=h.prototype.Lt,t.H(c,l),t.g=c.prototype,t.g.sa=1048576|l.prototype.sa,t.g.FS=function(){u(this),this.b?this.b.clear():this.b=this.Aa.path().zIndex(99),this.G||(this.G=this.Aa.rect().zIndex(100).stroke("none").fill(t.bm)),this.qC(this.G)},t.g.Lt=function(){u(this),this.J(1048576)&&(this.vb&&(this.vb.Of()?(this.vb.Bg(),this.vb.Xc(this.scale().uh(),this.scale().di()),this.vb.Hg()):(this.vb.Co(),this.vb.Xc(this.scale().uh(),this.scale().di()))),this.I(1048576));var e=this.ja();this.o=e,this.G.Qf(e);var i=this.xa(),n=i?e.height:e.width,s=t.L(this.g("gap"),n),a=t.L(this.g("size"),n),o=t.L(this.g("count"),n);if((0,window.isNaN)(s)||(0,window.isNaN)(a))(0,window.isNaN)(s)||(0,window.isNaN)(o)?(0,window.isNaN)(a)||(0,window.isNaN)(o)||(s=(n-o*a)/(o-1)):a=(n-(o-1)*s)/o;else{var r=n/(n-(n-((o=Math.floor((n+s)/(a+s)))*(a+s)-s)));a*=r,s*=r}var l=null;if(i){n=e.left;var h=e.left+e.width,c=e.top+e.height-a;e=c+a}else h=(n=e.left)+a,c=e.top,e=e.top+e.height;for(var p=this.iv(),g=0;g<o;g++){var f=t.Tm(t.Za(d(this,i?e:n),0,1),7);r=t.Tm(t.Za(d(this,i?c:h),0,1),7);var m=this.qa.Mc(r);m=this.vb.Qq(m),(r=this.qa.Ne()?r<=p:f>=p)&&(f=this.g("dimmer"),m=t.D(f)?f.call({color:m},m):f),f=t.Tl(m),null===m&&(m="none"),null!==l&&m==l||(l=m,f in this.D?this.D[f][0].clear():this.D[f]=[this.Aa.path(),m]),(m=this.D[f][0]).moveTo(n,c).lineTo(h,c).lineTo(h,e).lineTo(n,e).lineTo(n,c),r||this.b.moveTo(n,c).lineTo(h,c).lineTo(h,e).lineTo(n,e).lineTo(n,c),i?c=(e=c-s)-a:h=(n=h+s)+a}},t.g.aD=c.prototype.Lt,t.g.fG=function(t){var e;for(e in this.D){var i=this.D[e];i[0].stroke("none").fill(i[1])}t=this.ec(this,t,!1),this.b.stroke("none").fill(t)},t.g.Ma=function(){return"led"};var N=function(){function e(e){return t.zo(e,!0)}var i={};return t.sq(i,[[0,"dimmer",t.am],[0,"gap",e],[0,"size",e],[0,"count",function(e){return t.P(e,window.NaN)}]]),i}();t.U(c,N),t.g=c.prototype,t.g.kd=function(e){if(t.p(e)){if(null===e&&this.vb)this.vb=null,this.B(1048592,1);else if(e=t.jt(this.vb,e,null,48,null,this.Wp,this)){var i=this.vb==e;this.vb=e,t.W(this,"colorScale",this.vb),this.vb.da(i),i||this.B(1048592,1)}return this}return this.vb},t.g.Wp=function(e){t.X(e,6)&&this.B(1048592,1)},t.g.F=function(){var e=c.u.F.call(this);return e.colorScale=this.kd().F(),t.Tq(this,N,e,"Led pointer"),e},t.g.U=function(e,i){if(c.u.U.call(this,e,i),t.Iq(this,N,e,i),p(this),"colorScale"in e){var n=e.colorScale,s=null;t.z(n)?s=t.dt(n,null):t.C(n)&&(s=t.dt(n.type,null))&&s.N(n),s&&this.kd(s)}},t.g.R=function(){t.qd(this.G),this.G=null,u(this),c.u.R.call(this)};var R=c.prototype;R.colorScale=R.kd,t.H(f,l),t.g=f.prototype,t.g.Lt=function(){var e=this.ja(),i=t.zp(this.type()),n=this.xa();if(n)var s=e.left+e.width/2,a=this.Qe(this.iv());else s=this.Qe(this.iv()),a=e.top+e.height/2;e=n?e.width:e.height,this.o.left=s-e/2,this.o.top=a-e/2,this.o.width=e,this.o.height=e,this.path.clear(),i.call(null,this.path,s,a,e/2),this.b.pe(this.path.F())},t.g.aD=f.prototype.Lt,t.g.Ma=function(){return"marker"},t.g.type=function(e){return t.p(e)?(this.re!=e&&(null===e||(e=t.Ok(e,"star5")),this.re=e,this.B(16,1)),this):this.re||this.WF},t.g.U=function(t,e){f.u.U.call(this,t,e),this.type(t.type)},t.g.F=function(){var t=f.u.F.call(this);return this.re&&(t.type=this.type()),t};var j=f.prototype;j.type=j.type,t.H(v,h),t.g=v.prototype,t.g.Ma=function(){return"range-bar"},t.g.zk=function(){var t=this.$(),e=this.scale();return(0,window.isNaN)(e.transform(t.get("high")))||(0,window.isNaN)(e.transform(t.get("low")))},t.g.vR=function(){var e=this.$();return e.select(this.Ch()),e=e.get("low"),t.Za(this.scale().transform(e),0,1)},t.g.iv=function(){var e=this.$();return e.select(this.Ch()),e=e.get("high"),t.Za(this.scale().transform(e),0,1)},t.g.xs=function(){var t=v.u.xs.call(this);return t.pop(),t},t.H(b,l),t.Gq(b,["emptyFill","emptyHatchFill"],"normal"),t.g=b.prototype,t.g.Ma=function(){return"tank"},t.g.pU=function(e){var i,n,s;e=.1488095238*t.L(this.g("width"),e);var a=i=n=s=0;return this.xa()?i=s=e:a=n=e,[a,i,n,s]},t.g.Mm=function(){var e=this.xa(),i=this.ja(),n=this.scale(),s=n.Ne(),a=this.Qe(this.iv()),o=this.Qe(n.transform(n.uh()));n=this.Qe(n.transform(n.di())),e?s?(this.K=t.kn(i.left,o,i.width,a-o),this.Za=t.kn(i.left,a,i.width,n-a)):(this.K=t.kn(i.left,a,i.width,o-a),this.Za=t.kn(i.left,n,i.width,a-n)):s?(this.K=t.kn(a,i.top,o-a,i.height),this.Za=t.kn(n,i.top,a-n,i.height)):(this.K=t.kn(o,i.top,a-o,i.height),this.Za=t.kn(a,i.top,n-a,i.height)),this.o=this.K},t.g.FS=function(){this.D||(this.D=this.Aa.Bd()),this.G||(this.G=this.Aa.Bd()),this.scale().Ne()?(this.G.zIndex(0),this.D.zIndex(1)):(this.D.zIndex(0),this.G.zIndex(1)),this.aa?this.aa.clear():this.aa=this.D.path().zIndex(0),this.Ka?this.Ka.clear():this.Ka=this.D.path().zIndex(1),this.na?this.na.clear():this.na=this.D.path().zIndex(2),this.Ba?this.Ba.clear():this.Ba=this.D.path().zIndex(3),this.Ha?this.Ha.clear():this.Ha=this.D.path().zIndex(4),this.ba?this.ba.clear():this.ba=this.G.path().zIndex(0),this.sb?this.sb.clear():this.sb=this.G.path().zIndex(1),this.$a?this.$a.clear():this.$a=this.G.path().zIndex(2),this.fb?this.fb.clear():this.fb=this.G.path().zIndex(3),this.b?this.b.clear():this.b=this.Aa.path(),this.ea?this.ea.clear():this.ea=this.G.path(),this.qC(this.Aa)},t.g.Lt=function(){this.Mm(),S(this,this.aa,this.K),x(this,this.Ka,this.K);var t=this.na,e=this.K;if(this.xa()){var i=e.width/2,n=.1488095238*e.width,s=e.left+e.width,a=e.top+e.height;t.moveTo(e.left,a-1),t.Ff(s,a,i,n,!1,!1)}else i=.1488095238*e.height,n=e.height/2,s=e.top+e.height/2+y(n),t.moveTo(e.left+1,e.top),t.Ff(e.left,s,i,n,!1,!1);S(this,this.Ba,this.K),w(this,this.Ha,this.K),S(this,this.ba,this.Za),x(this,this.sb,this.Za),S(this,this.$a,this.Za),w(this,this.fb,this.Za),this.b.pe(this.aa.F()),this.ea.pe(this.ba.F())},t.g.aD=b.prototype.Lt;var B={thickness:1,opacity:.3,color:"#FFFFFF"},H={angle:0,keys:[{color:"#FFFFFF",offset:"0",opacity:0},{color:"#FFFFFF",offset:"0.2",opacity:Number(160/255)},{color:"#FFFFFF",offset:"0.25",opacity:Number(140/255)},{color:"#FFFFFF",offset:"0.3",opacity:Number(30/255)},{color:"#FFFFFF",offset:"0.35",opacity:0},{color:"#FFFFFF",offset:"1",opacity:0}]},z={angle:0,keys:[{color:"#FFFFFF",offset:"0",opacity:0},{color:"#FFFFFF",offset:"0.2",opacity:.3*Number(160/255)},{color:"#FFFFFF",offset:"0.25",opacity:.3*Number(140/255)},{color:"#FFFFFF",offset:"0.3",opacity:.3*Number(30/255)},{color:"#FFFFFF",offset:"0.35",opacity:0},{color:"#FFFFFF",offset:"1",opacity:0}]};b.prototype.fG=function(e){var i=this.xa(),n=i?0:90,s=this.Uc(this,e,!1),a=t.Vl(s),o=t.Ql(s);o=t.z(o)?o:o.color,s=t.Pl(s),s={angle:n,keys:[{color:o,offset:"0",opacity:a},{color:o,offset:"0.05",opacity:a},{color:s=t.z(s)?s:s.color,offset:"0.85",opacity:a},{color:s,offset:"0.85",opacity:a},{color:o,offset:"1",opacity:a}]},this.aa.fill(s),this.aa.stroke("none"),this.Ka.fill("none"),this.Ka.stroke(B),H.angle=n,this.Ba.fill(H),this.Ba.stroke("none"),s={angle:i?50:140,keys:[{color:"#FFFFFF",offset:"0",opacity:.1},{color:o,offset:"1",opacity:1}]},this.Ha.fill(s),this.Ha.stroke("none"),this.na.fill("none"),this.na.stroke(B),a=this.Od(this,e,!1),o=t.Ql(a),o=t.z(o)?o:o.color,s=t.Pl(a),s=t.z(s)?s:s.color,s={angle:-n,keys:[{color:o,offset:"0",opacity:a=t.Vl(a)},{color:o,offset:"0.05",opacity:a},{color:s,offset:"0.85",opacity:a},{color:s,offset:"0.85",opacity:a},{color:o,offset:"1",opacity:a}]},this.ba.fill(s),this.ba.stroke("none"),this.sb.fill("none"),this.sb.stroke(B),z.angle=n,this.$a.fill(z),this.$a.stroke("none"),s={angle:i?50:140,keys:[{color:"#FFFFFF",offset:"0",opacity:.1*a},{color:o,offset:"1",opacity:a}]},this.fb.fill(s),this.fb.stroke("none"),i=this.ec(this,e,!1),this.b.fill(i),this.b.stroke("none"),i=this.me(this,e,!1),this.ea.fill(i),this.ea.stroke("none")},b.prototype.R=function(){this.fb=this.$a=this.sb=this.ba=this.Ha=this.Ba=this.na=this.Ka=this.aa=null,t.sd(this.D,this.G,this.ea),this.ea=this.G=this.D=null,b.u.R.call(this)},t.H(C,l),C.prototype.Lt=function(){var t=this.ja(),e=this.scale().Ne(),i=t.left,n=t.left+t.width,s=this.Qe(this.iv());t=e?t.top-this.D:t.top+t.height+this.D,this.o.left=i,this.o.top=e?t:s,this.o.width=Math.abs(n-i),this.o.height=Math.abs(t-s),this.path.clear().moveTo(i,s).lineTo(n,s).lineTo(n,t).Ff(i,t,this.Gq,this.Gq,!0,!e).lineTo(i,s).close(),this.b.pe(this.path.F())},C.prototype.aD=function(){var t=this.ja(),e=this.scale().Ne(),i=t.top,n=t.top+t.height,s=this.Qe(this.iv());t=e?t.left+t.width+this.D:t.left-this.D,this.o.left=e?s:t,this.o.top=i,this.o.width=Math.abs(t-s),this.o.height=Math.abs(n-i),this.path.clear().moveTo(s,i).lineTo(s,n).lineTo(t,n).Ff(t,i,this.Gq,this.Gq,!0,!e).lineTo(s,i).close(),this.b.pe(this.path.F())},C.prototype.Ma=function(){return"thermometer"},C.prototype.pU=function(e,i){var n,s,a=t.L(this.g("width"),e),o=t.L(this.g("bulbRadius"),a),r=t.L(this.g("bulbPadding"),i);o<a/2&&(o=a/2),this.Gq=o,this.D=r,a=o+Math.sqrt(3)*o/2+r,o=r=n=s=0;var l=this.scale().Ne();return this.xa()?l?r=a:s=a:l?n=a:o=a,[o,r,n,s]};var V={};t.sq(V,[[0,"bulbRadius",t.zo],[0,"bulbPadding",t.zo]]),t.U(C,V),C.prototype.U=function(e,i){C.u.U.call(this,e,i),t.Iq(this,V,e,i)},C.prototype.F=function(){var e=C.u.F.call(this);return t.Tq(this,V,e,"Thermometer"),e},t.H(T,t.Bx),T.prototype.ra=t.Bx.prototype.ra,T.prototype.sa=15503360|t.Bx.prototype.sa;var q={};q.bar=h,q.led=c,q.marker=f,q["range-bar"]=v,q.tank=b,q.thermometer=C;var W={};t.sq(W,[[0,"globalOffset",t.zo],[0,"layout",t.Gk],[0,"defaultPointerType",e]]),t.U(T,W),t.g=T.prototype,t.g.Nf=function(e){return this.He||(this.He=new t.Ls,t.W(this,"markerPalette",this.He),t.K(this.He,this.yI,this)),t.p(e)?(this.He.N(e),this):this.He},t.g.yI=function(e){t.X(e,2)&&this.B(524800,1)},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(2097664,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(2097664,1)},t.g.ve=function(e){return this.fd||(this.fd=new t.Hs,t.W(this,"hatchFillPalette",this.fd),t.K(this.fd,this.HH,this)),t.p(e)?(this.fd.N(e),this):this.fd},t.g.HH=function(e){t.X(e,2)&&this.B(4194816,1)},t.g.xa=function(e){return t.p(e)?(this.ta("layout",e?"vertical":"horizontal"),this):"vertical"==this.g("layout")},t.g.az=function(){this.Ta().gr()&&this.B(4,9)},t.g.Ue=function(){return this.b},t.g.ts=function(){return[this]},t.g.$z=function(i,n,s){i=e(i);var a=q[i];return a?(a=new a,t.ea(n)?a.Ch(n):a.data(n,s),n=(n=this.b[this.b.length-1])?n.yh()+1:0,this.b.push(a),a.zh=t.Tm(1e-5*n,5),a.yh(n),a.Kq(this.cc().nc(n)),t.J(a,f)&&m(a,this.Nf().nc(this.D++)),a.dx(this.ve().nc(n)),a.Wk(this),a.kb(this),n=this.vf("defaultPointerSettings"),a.Ga(n.base),a.Ga(n[t.pm(i)]),t.D(a.kd)&&(a.kd(a.vf("colorScale")),p(a)),a.$c(),t.K(a,this.Gja,this),this.B(266756,1)):a=null,a},t.g.jba=function(t){var e=[],i=this.g("defaultPointerType"),n=arguments.length;if(this.ka(),n)for(var s=0;s<n;s++)e.push(this.$z(i,arguments[s]));return this.da(!0),e},t.g.mba=function(t){return this.o_(D(this,t))},t.g.o_=function(e){var i=this.b[e];return i&&(t.Pp++,t.Ca(this.b,e,1),t.qd(i),this.B(266752,1),t.Sp()),this},t.g.lba=function(){if(this.b.length){t.Pp++;var e=this.b;this.b=[],this.D=0,t.sd(e),this.B(266752,1),t.Sp()}return this},t.g.CK=function(t){return this.n_(D(this,t))},t.g.n_=function(t){return this.b[t]||null},t.g.nU=function(e){return t.ya(this.b,(function(t){return t.yh()==e}))},t.g.kba=function(){return this.b.length},t.g.data=function(e,i){return t.p(e)?(this.Xf!==e&&(this.Xf=e,t.qd(this.Yc),this.sd=null,t.J(e,t.Cr)?this.i=this.Yc=e.Ui():this.i=t.J(e,t.Mr)?this.Yc=e.Yd():(this.Yc=new t.Mr(t.A(e)||t.z(e)?e:null,i)).Yd(),this.la=this.i,t.K(this.la,this.dd,this),k(this),this.B(266496,5)),this):this.la},t.g.dd=function(e){t.X(e,16)&&(k(this),this.B(266496,1))},t.g.$=function(){return this.sd||this.Ec()},t.g.Ec=function(){return this.sd=this.la.$()},t.g.Ol=function(e,i){var n,s=[],a=0;for(n=this.b.length;a<n;a++){var o=this.b[a],r=o.qD(i);r.sourceUid=t.oa(this),r.sourceKey=o.id(),s.push(r)}return s},t.g.zr=function(t){t=t.Ki(),(t=this.CK(t))&&(t.enabled(!t.enabled()),t.enabled()?t.Zk():t.Md())},t.g.wq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.CK(e))&&t.Zk()},t.g.vq=function(t){var e=t.Ki();(!t||null!=e||(0,window.isNaN)(e))&&(t=this.CK(e))&&t.Md()},t.g.NM=function(){for(var e,i=[],n=this.Ue(),s=0;s<n.length;s++)(e=n[s])&&e.state&&e.enabled()&&t.sx(e.state,t.wo).length&&i.push($(this,e.yh()));return i},t.g.XD=function(e,i,n){if(e.length){var s=e[e.length-1],a=s.X,o=a.yh();s=t.Aa(s.vd,0)}return(a={index:o,series:a})[i]=n?!s:s,a},t.g.bl=function(t,e,i,n,s){var a=this.XD(i,t,n),o=$(this,a.index),r=[];if(!n)for(var l=0,h=i.length;l<h;l++){var c=i[l].X;r.push($(this,c.yh()))}return t={type:"hovered"==t?"pointshover":"pointsselect",seriesStatus:this.mG(i,n),currentPoint:a,actualTarget:e.target,target:this,point:o,points:r,originalEvent:e},s&&(t.PT=!0),t},t.g.Uu=function(){return!0},t.g.axis=function(e,i){var s=t.N(e);if((0,window.isNaN)(s)){s=0;var a=e}else s=e,a=i;var o=this.f[s];return o||((o=new n).Ga(this.vf("defaultAxisSettings")),o.kb(this),this.f[s]=o,t.K(o,this.xo,this),this.B(32772,1)),t.p(a)?(o.N(a),this):o},t.g.xo=function(e){var i=0,n=0;t.X(e,1)&&(i|=32768,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.scale=function(e){return t.p(e)?((e=t.jt(this.qa,e,"linear",7,["Linear gauge scale","scatter","linear, log, date-time"]))&&(this.qa=e,this.qa.da(!1),this.B(262144,1)),this):(this.qa||(this.qa=t.ft()),this.qa)},t.g.xX=function(e,i){var n=t.N(e);if((0,window.isNaN)(n)){n=0;var s=e}else n=e,s=i;var o=this.o[n];if(!o){o=new a(this);var r=this.vf("defaultScaleBarSettings");o.Ga(r),o.kd(r.colorScale),o.kb(this),this.o[n]=o,t.K(o,this.cja,this),this.B(8388612,1)}return t.p(s)?(o.N(s),this):o},t.g.cja=function(e){var i=0,n=0;t.X(e,1)&&(i|=8388608,n|=1),t.X(e,8)&&(i|=4),this.B(i,n)},t.g.pb=function(){var e,i,n=this.b.length;if(this.J(262144)){var s=!1;if((0,t.Pe)(this.b,(function(t){(t=t.scale()).Bg(),s=s||t.Of()})),s)for(i=0;i<n;i++)if((e=this.b[i])&&e.enabled()){var a=e.scale();a.Xc.apply(a,e.xs())}(0,t.Pe)(this.b,(function(t){t.scale().Hg()})),this.B(32772),this.I(262144)}},t.g.co=function(){T.u.co.call(this);for(var t=this.La("chartElements")||{},e=0,i=this.f.length;i--;)this.f[i]&&e++;t.axes=e,this.La("chartElements",t)},t.g.pv=function(){if(!this.pf()){var e,i=0,n=this.xa();if(this.J(6815744)){for(t.xr(this.b),e=0;e<this.b.length;e++){var s=this.b[e],a=s.yh();s.Kq(this.cc().nc(a)),s.dx(this.ve().nc(a)),t.J(s,f)&&m(s,this.Nf().nc(i++))}this.B(4096),k(this),this.I(6815744),t.zr(this.b),this.D=i}for(s=n?"left":"top",e=0;e<this.f.length;e++)(i=this.f[e])&&(t.Ty(i,s),i.scale()||i.scale(this.scale()));for(s=this.g("layout"),e=0;e<this.b.length;e++)(i=this.b[e]).we(s),i.scale()||i.scale(this.scale()),t.J(i,f)&&-1!=String(m(i)).toLowerCase().indexOf("triangle")&&m(i,n?"triangle-left":"triangle-up");for(e=0;e<this.o.length;e++)(i=this.o[e])&&(i.we(s),i.scale()||i.scale(this.scale()))}},t.g.Qh=function(e){if(!this.pf()){var i,n=this.b.length;if(this.pb(),t.xr(this.f,this.b,this.o),this.J(32772)){var s,a=0;for(i=this.f.length;a<i;a++)(s=this.f[a])&&(t.Yu(s.labels()),t.Yu(s.qb()))}if(this.Aa||(this.Aa=this.Na.Bd().zIndex(2)),this.J(4)){var o,r,l,h=r=l=o=0;if(i=this.xa()){var c=e.width;s=e.height}else c=e.height,s=e.width;for(a=0;a<n;a++){var u=this.b[a];u=u.pU(c,s),o=Math.max(o,u[0]),h=Math.max(h,u[1]),r=Math.max(r,u[2]),l=Math.max(l,u[3])}for((e=e.clone()).top+=h,e.height-=h+l,e.left+=o,e.width-=o+r,e=e.round(),h=t.kn(i?0:e.left,i?e.top:0,i?0:e.width,i?e.height:0),c=i?e.width:e.height,s=i?e.height:e.width,r=t.L("100%",s),l=t.Ga(this.f,this.b,this.o),a=0;a<l.length;a++)(s=l[a])&&s.enabled()&&(o=t.L(t.zo(s.g("width")),c),u=t.L(t.zo(s.g("offset")),c),o=i?t.kn(u,e.top,o,r):t.kn(e.left,u,r,o),t.pb(h,o),s.ja(o));i?(a=e.left+(e.width-h.width)/2-h.left,e=t.L(this.g("globalOffset"),e.width)):(a=e.top+(e.height-h.height)/2-h.top,e=t.L(this.g("globalOffset"),e.height)),a+=e,this.Aa.oc(1,0,0,1,i?a:0,i?0:a),this.B(8425472)}if(this.J(32768)){for(a=0,i=this.f.length;a<i;a++)(e=this.f[a])&&(e.O(this.Aa),e.W());this.I(32768)}if(this.J(4096)){for(a=0;a<n;a++)(u=this.b[a])&&(u.O(this.Aa),u.W());this.I(4096)}if(this.J(8388608)){for(a=0;a<this.o.length;a++)(n=this.o[a])&&(n.O(this.Aa),n.W());this.I(8388608)}t.zr(this.f,this.b,this.o)}},t.g.yj=function(){for(var t=this.$().Hb(),e=0,i=this.b.length,n=0;n<i;n++){var s=this.b[n];if(!s||s.enabled())break;e++}return!t||!i||e==i},t.g.F=function(){var e=T.u.F.call(this);e.palette=this.cc().F(),e.markerPalette=this.Nf().F(),e.hatchFillPalette=this.ve().F(),t.Tq(this,W,e),e.data=this.data().F();var i={},n=[],s=this.scale(),a=t.oa(s);i[a]=s.F(),n.push(i[a]),e.scale=n.length-1;var o,r=[];for(o=0;o<this.f.length;o++)if(s=this.f[o]){var l=s.F();(s=s.scale())&&(i[a=t.oa(s)]?l.scale=(0,t.za)(n,i[a]):(i[a]=s.F(),n.push(i[a]),l.scale=n.length-1)),r.push(l)}for(r.length&&(e.axes=r),r=[],o=0;o<this.b.length;o++)l=(s=this.b[o]).F(),(s=s.scale())&&(i[a=t.oa(s)]?l.scale=(0,t.za)(n,i[a]):(i[a]=s.F(),n.push(i[a]),l.scale=n.length-1)),r.push(l);for(r.length&&(e.pointers=r),r=[],o=0;o<this.o.length;o++)l=(s=this.o[o]).F(),(s=s.scale())&&(i[a=t.oa(s)]?l.scale=(0,t.za)(n,i[a]):(i[a]=s.F(),n.push(i[a]),l.scale=n.length-1)),r.push(l);return r.length&&(e.scaleBars=r),n.length&&(e.scales=n),{gauge:e}},t.g.U=function(e,i){T.u.U.call(this,e,i),t.Iq(this,W,e),this.data(e.data),"palette"in e&&this.cc(e.palette),"markerPalette"in e&&this.Nf(e.markerPalette),"hatchFillPalette"in e&&this.ve(e.hatchFillPalette);var n,s=e.axes,a=e.pointers,o=e.scaleBars,r=e.scales,l=this.Ma(),h={};if(t.A(r))for(n=0;n<r.length;n++){var c=r[n];t.z(c)&&(c={type:c}),c=t.qm(c,n,l);var u=t.dt(c.type,!1);u.N(c),h[n]=u}else if(t.C(r))for(n in r)r.hasOwnProperty(n)&&(c=r[n],t.z(c)&&(c={type:c}),c=t.qm(c,n,l),(u=t.dt(c.type,!1)).N(c),h[n]=u);if(c=e.scale,t.ea(c)?u=h[c]:t.z(c)?(u=t.dt(c,null))||(u=h[c]):t.C(c)?(u=t.dt(c.type,!1)).N(c):u=null,u&&this.scale(u),t.A(s))for(n=0;n<s.length;n++)c=s[n],this.axis(n,c),t.C(c)&&"scale"in c&&0<c.scale&&this.axis(n).scale(h[c.scale]);if(t.A(a))for(n=0;n<a.length;n++)s=(c=a[n]).pointerType||this.g("defaultPointerType"),u=c.data||null,(s=this.$z(s,c.dataIndex))&&(s.data(u),s.N(c),t.C(c)&&"scale"in c&&0<c.scale&&s.scale(h[c.scale]));if(t.A(o))for(n=0;n<o.length;n++)c=o[n],this.xX(n,c),t.C(c)&&"scale"in c&&0<c.scale&&this.xX(n).scale(h[c.scale])},t.g.R=function(){t.sd(this.Yc,this.i,this.la,this.b,this.f,this.o,this.Fa,this.He,this.fd),this.sd=this.la=this.i=this.Yc=null,this.b.length=0,this.f.length=0,this.o.length=0,this.fd=this.He=this.Fa=null,T.u.R.call(this)},t.g.Gja=function(e){var i=4096,n=1;t.X(e,8)&&(i|=4,n|=8),t.X(e,64)&&(i|=512),t.X(e,4)&&(i|=262144),this.B(i,n)},function(){function e(t){return function(e,i){return this.$z(t,e,i)}}var i,n=T.prototype;for(i in A)n[t.pm(A[i])]=e(A[i])}();var Y=T.prototype;Y.getType=Y.Ma,Y.palette=Y.cc,Y.markerPalette=Y.Nf,Y.hatchFillPalette=Y.ve,Y.isVertical=Y.xa,Y.addPointer=Y.jba,Y.removePointer=Y.mba,Y.removePointerAt=Y.o_,Y.removeAllPointers=Y.lba,Y.getPointer=Y.CK,Y.getPointerAt=Y.n_,Y.getPointersCount=Y.kba,Y.getSelectedPoints=Y.NM,Y.data=Y.data,Y.axis=Y.axis,Y.scaleBar=Y.xX,Y.scale=Y.scale,t.Up["linear-gauge"]=O,t.Up.bullet=function(t,e){var i=new T;return i.Ga("bullet"),i.data(t,e),i.ta("defaultPointerType","bar"),i.re="bullet",i},t.Up.thermometer=P,t.Up.tank=L,t.Up.led=I,t.E("anychart.gauges.linear",O),t.E("anychart.gauges.thermometer",P),t.E("anychart.gauges.tank",L),t.E("anychart.gauges.led",I)}.call(this,$)),_.scatter||(_.scatter=1,function(t){var e=function(){t.wA.call(this,!1),this.Ga("scatter"),this.ta("defaultSeriesType","marker"),this.re="scatter"},i=function(t){var i=new e;i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.marker(arguments[n]);return i},n=function(t){var i=new e;i.Ga("marker"),i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.marker(arguments[n]);return i},s=function(t){var i=new e;i.Ga("bubble"),i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.bubble(arguments[n]);return i},a=function(t){var i=new e;i.Ga("quadrant"),i.re="quadrant",i.Wg(),i.$c();for(var n=0,s=arguments.length;n<s;n++)i.marker(arguments[n]);return i},o={qQ:"bubble",tt:"line",av:"marker"};t.H(e,t.wA);var r={},l=7864320|t.QG;r.bubble={Fb:4,Kb:2,Lb:[t.tH,t.uH,t.xH,t.zH],Ob:null,Jb:null,Cb:l,Ab:"value",zb:"value"},r.line={Fb:8,Kb:1,Lb:[t.oH,t.HH,t.CH,t.wH],Ob:null,Jb:null,Cb:l,Ab:"value",zb:"value"},r.marker={Fb:9,Kb:2,Lb:[t.RH,t.qH,t.yH,t.KH,t.AH,t.EH,t.FH,t.JH],Ob:null,Jb:null,Cb:3670016|t.QG,Ab:"value",zb:"value"},e.prototype.fj=r,t.Nz(e,e.prototype.fj),e.prototype.ev=function(){return!1},e.prototype.Gt=function(e,i){return new t.xB(this,this,e,i,!1)},e.prototype.Ss=function(e){return t.zk(o,e,"line")},e.prototype.F=function(){return{chart:e.u.F.call(this)}};var h=e.prototype;h.crosshair=h.mh,h.xScale=h.Ra,h.yScale=h.bb,h.xGrid=h.lm,h.yGrid=h.nm,h.xMinorGrid=h.Qr,h.yMinorGrid=h.Tr,h.xAxis=h.$h,h.yAxis=h.ij,h.getSeries=h.ef,h.lineMarker=h.Ym,h.rangeMarker=h.gn,h.textMarker=h.mn,h.palette=h.cc,h.markerPalette=h.Nf,h.hatchFillPalette=h.ve,h.getType=h.Ma,h.addSeries=h.kl,h.getSeriesAt=h.Ai,h.getSeriesCount=h.tj,h.removeSeries=h.Ao,h.removeSeriesAt=h.Rn,h.removeAllSeries=h.Dp,h.getPlotBounds=h.dg,h.annotations=h.Nk,h.getXScales=h.vy,h.getYScales=h.xy,h.quarters=h.HO,h.crossing=h.zL,t.Tp.bubble=s,t.Tp.marker=n,t.Tp.quadrant=a,t.Tp.scatter=i,t.E("anychart.bubble",s),t.E("anychart.scatter",i),t.E("anychart.marker",n),t.E("anychart.quadrant",a),t.E("anychart.scatterChart",i)}.call(this,$)),_.circle_packing_part||(_.circle_packing_part=1,function(t){var e=function(t,e){return t&&e&&0<e.value-t.value?1:-1},i=function(e){var n={left:0,right:0,top:0,bottom:0,Eb:0};if(e&&e.length){var s,a=e[0];a.Kp=0,a.Rq=0,n.left=-a.weight,n.right=a.weight,n.top=-a.weight,n.bottom=a.weight,n.Eb=a.weight;var o=e[1];for(o&&(o.Kp=a.Kp+a.weight+o.weight,o.Rq=a.Rq,n.right=o.Kp+o.weight,n.Eb=n.right),a=[{kS:a,lS:o,$I:1}],s=e[o=2];s;){var r=a[0],l=r.kS,h=r.lS,c=r.$I,u=s.weight,d=l.weight+h.weight,p=u+l.weight;for(u=(p*p+d*d-(u+=h.weight)*u)/(2*p*d),u=t.Za(u,-1,1),u=Math.acos(u),d=(h.Kp-l.Kp)/d,d=t.Za(d,-1,1),d=u+c*(0<=(h.Rq-l.Rq)/(l.weight+h.weight)?1:-1)*Math.acos(d),s.Kp=l.Kp+p*Math.cos(d),s.Rq=l.Rq+c*p*Math.sin(d),d=!1,p=0;p<e.length;p++){var g;if(g=(u=e[p])!==s){g=Math.abs(u.Kp-s.Kp);var f=Math.abs(u.Rq-s.Rq);g=-1e-6>Math.sqrt(g*g+f*f)-Math.abs(u.weight+s.weight)}if(g){d=!0;break}}d?1===c?r.$I=-1:(r.$I=1,s=a.shift(),a.push(s)):(r={kS:l,lS:s,$I:1},h={kS:s,lS:h,$I:1},n.top=Math.min(n.top,s.Rq-s.weight),n.bottom=Math.max(n.bottom,s.Rq+s.weight),n.left=Math.min(n.left,s.Kp-s.weight),n.right=Math.max(n.right,s.Kp+s.weight),n.Eb=Math.max(n.Eb,Math.sqrt(s.Kp*s.Kp+s.Rq*s.Rq)+s.weight),a.push(r,h),o+=1),s=e[o]}for(p=0;p<e.length;p++)(s=e[p]).h7=i(s.children)}return n},n=function(i,s){var a,o=[],r=window.NaN,l=window.NaN;for(a=0;a<i.length;a++){var h=i[a],c=s,u=Number(h.get("value")),d=(0,window.isNaN)(u)||0>u;c={index:0,HV:!1,Ly:!1,weight:0,name:String(h.get("name")),value:u,item:h,parent:c,depth:c.depth+1},h.bc()?(h=h.Uv(),n(h,c),d||(c.value=u)):c.Ly=!0,(u=c.Ly&&!d||!c.Ly&&c.children&&c.children.length&&!(0,window.isNaN)(Number(c.value))?c:null)&&(t.Ua(o,u,e),r=(0,window.isNaN)(r)?0:r,l=(0,window.isNaN)(l)?0:l,r+=u.value,l+=Math.sqrt(u.value/Math.PI))}for(a=0;a<o.length;a++)(u=o[a]).weight=1===o.length?.9:Math.sqrt(u.value/Math.PI)/l,u.index=a;s.value=r,s.children=o},s=function(e,i,n){if(e&&e.length){var a=i&&i.HV,o=n;if(o.width!==o.height){n=o.left+o.width/2;var r=o.top+o.height/2,l=Math.min(o.width,o.height);(o=o.clone()).width=l,o.height=l,o.left=n-l/2,o.top=r-l/2,n=o}else n=o;for(i.Ta=n,l=(i=i.h7).right+Math.abs(i.left),o=i.bottom+Math.abs(i.top),r=Math.abs(l-o)/2,l>o?(i.top-=r,i.bottom+=r):(i.left-=r,i.right+=r),r=Math.max(l,o),r+=2*(a=Math.min(l/r,o/r)*(a?0:Math.min(i.Eb,r/2))*(2-Math.sqrt(2))/2),i.top-=a,i.bottom+=a,i.left-=a,i.right+=a,a=n.width/r,l=0;l<e.length;l++){(o=e[l]).Dc=n.left+n.width/r*(o.Kp+Math.abs(i.left)),o.uc=n.top+n.height/r*(o.Rq+Math.abs(i.top)),o.Eb=o.weight*a;var h=new t.I(o.Dc-o.Eb,o.uc-o.Eb,2*o.Eb,2*o.Eb);o.Ta=h,s(o.children,o,h)}}},a=function(e,i){function n(t){t.enabled(null)}t.Bx.call(this),t.su(this,this,this.If,this.hg,this.Ds,this.If,this.uaa,null),this.Ga("circlePacking"),this.f=this.Fa=null,this.o=[],this.b=[],this.data(e,i),t.T(this.ua,[["labelsMode",256,1]]);var s={};t.T(s,[["fill",16,65],["stroke",16,65],["labels",0,0]]),this.ca=new t.my(this,s,t.gm),this.ca.ta("labelsAfterInitCallback",t.sy),s={},t.T(s,[["fill",16,65],["stroke",16,65],["labels",256,65]]),this.Ea=new t.my(this,s,t.wo),this.Ea.ta("labelsFactoryConstructor",t.oy),this.Ea.ta("labelsAfterInitCallback",n),this.za=new t.my(this,s,t.vo),this.za.ta("labelsFactoryConstructor",t.oy),this.za.ta("labelsAfterInitCallback",n)},o=function(t,e,i){if(e){var n=d(t,e,"fill",i);t=d(t,e,"stroke",i),(e=e.c1).fill(n),e.stroke(t)}},r=function(e){var i=e.O();if(i){i.suspend();for(var n=0;n<e.b.length;n++)o(e,e.b[n],t.gm);e.b.length=0,i.resume()}},l=function(e,i){if(i&&i.length)for(var n=0;n<i.length;n++){var s=i[n],a=t.eC(e.ue);s.c1=a,a.To(s.Dc),a.Uo(s.uc),a.Eb(s.Eb),a.zIndex(31),a.tag={WN:s},l(e,s.children)}},h=function(e,i){if(i&&i.length)for(var n=0;n<i.length;n++){var s=i[n],a=d(e,s,"fill",t.gm),o=d(e,s,"stroke",t.gm),r=s.c1;r.fill(a),r.stroke(o),h(e,s.children)}},c=function(t,e){for(var i=[],n=0;n<e.length;n++){var s=e[n];s.Ly?i.push(s):(s=c(t,s.children),i=i.concat(i,s))}return i},u=function(e,i){return i.parent.HV?e.cc().nc(i.index):t.Pl(u(e,i.parent))},d=function(e,i,n,s){return n=e[s===t.gm?"normal":s===t.vo?"hovered":"selected"]().g(n),t.D(n)?(e={sourceColor:u(e,i),item:i.item,value:i.value,name:i.name,depth:i.depth,index:i.index,weight:i.weight,isLeaf:i.Ly},n.call(e,e)):n},p=function(t){for(var e=t.f,i=0;i<t.o.length;i++)e=e.children[t.o[i]];return e},g=function(t,e){var i=new a(t,e);return i.$c(),i},f={yra:"roots",qpa:"leaves"};t.H(a,t.Bx),t.Gq(a,["fill","stroke","labels"],"normal");var m={};t.sq(m,[[0,"labelsMode",function(e,i){return t.zk(f,e,i||"roots")}]]),t.U(a,m),t.g=a.prototype,t.g.ra=16|t.Bx.prototype.ra,t.g.sa=4368|t.Bx.prototype.sa,t.g.data=function(e,i){return t.p(e)?(t.J(e,t.au)||t.J(e,t.Yt)?e!=this.la&&(this.la&&t.kr(this.la,this.dd,this),this.la=e,t.K(this.la,this.dd,this)):(this.la&&t.kr(this.la,this.dd,this),this.la=new t.au(e,i),t.K(this.la,this.dd,this)),r(this),this.B(4352,1),this):this.la},t.g.dd=function(e){t.X(e,16)&&this.B(4352,1)},t.g.$c=function(){this.ca.Ga(this.oa),t.W(this,"normal",this.ca),this.ca.ga(!0,{}),t.W(this,"hovered",this.za),this.za.ga(!0,{}),t.W(this,"selected",this.Ea),this.Ea.ga(!0,{})},t.g.cc=function(e){return t.J(e,t.Ms)?(this.Hc(t.Ms,e),this):t.J(e,t.Gs)?(this.Hc(t.Gs,e),this):(t.C(e)&&"range"==e.type?this.Hc(t.Ms):(t.C(e)||null==this.Fa)&&this.Hc(t.Gs),t.p(e)?(this.Fa.N(e),this):this.Fa)},t.g.Hc=function(e,i){if(t.J(this.Fa,e))i&&this.Fa.N(i);else{var n=!!this.Fa;t.qd(this.Fa),this.Fa=new e,t.W(this,"palette",this.Fa),this.Fa.Gp(),i&&this.Fa.N(i),t.K(this.Fa,this.Pf,this),n&&this.B(16,1)}},t.g.Pf=function(e){t.X(e,2)&&this.B(16,1)},t.g.Qa=function(e){return t.p(e)?(this.ca.N(e),this):this.ca},t.g.lb=function(e){return t.p(e)?(this.za.N(e),this):this.za},t.g.selected=function(e){return t.p(e)?(this.Ea.N(e),this):this.Ea},t.g.labels=function(e){return t.p(e)?(this.ca.labels(e),this):this.ca.labels()},t.g.de=function(e){t.X(e,1)&&this.B(256,1)},t.g.Ue=function(){return[]},t.g.rl=function(t){var e=t.domTarget;e=e&&e.tag&&e.tag.WN;var i=t.type;if(e){switch(i){case"mouseout":i="pointmouseout";break;case"mouseover":i="pointmouseover";break;case"mousemove":case"touchmove":i="pointmousemove";break;case"mousedown":case"touchstart":i="pointmousedown";break;case"mouseup":case"touchend":i="pointmouseup";break;case"click":i="pointclick";break;case"dblclick":i="pointdblclick"}return(t={type:i,actualTarget:t.target,target:this,originalEvent:t}).index=e.index,t.isLeaf=e.Ly,t.weight=e.weight,t.name=e.name,t.value=e.value,t.point=e.item,t.cx=e.Dc,t.cy=e.uc,t.radius=e.Eb,t.bounds=e.Ta,t.depth=e.depth,t}return null},t.g.If=function(e){var i=this.rl(e);if(i&&this.dispatchEvent(i)){var n=(i=e.domTarget)&&i.tag&&i.tag.WN;n&&(t.Aa(this.b,n)||o(this,n,t.vo),i=this.Ua(),n=this.Ic(n),t.Ow(i,e.originalEvent.clientX,e.originalEvent.clientY,n))}},t.g.hg=function(e){var i=this.rl(e);i&&this.dispatchEvent(i)&&((e=(e=e.domTarget)&&e.tag&&e.tag.WN)&&!t.Aa(this.b,e)&&o(this,e,t.gm),this.Ua().Lc())},t.g.uaa=function(t){(t=this.rl(t))&&this.dispatchEvent(t)},t.g.Ds=function(e){var i=this.rl(e);for(i&&this.dispatchEvent(i)&&(i=(i=e.domTarget)&&i.tag&&i.tag.WN)?!t.Ad&&e.ctrlKey||t.Ad&&e.metaKey?t.Aa(this.b,i)?(t.Fa(this.b,i),o(this,i,t.gm)):(this.b.push(i),o(this,i,t.wo)):(r(this),this.b.push(i),o(this,i,t.wo)):r(this),e={type:"pointsselect",points:[]},i=0;i<this.b.length;i++)e.points.push(this.b[i].item);this.dispatchEvent(e)},t.g.pb=function(){if(this.J(4096)){var t=this.data(),e={index:0,Ly:!1,HV:!0,parent:null,depth:-1};n(t.Uv(),e),e.h7=i(e.children),this.f=e,this.B(4)}},t.g.Ic=function(e){this.i||(this.i=new t.Fw);var i={item:{value:e.item,type:""},value:{value:e.value,type:"number"},name:{value:e.name,type:"string"},depth:{value:e.depth,type:"number"},index:{value:e.index,type:"number"},weight:{value:e.weight,type:"number"},isLeaf:{value:e.Ly,type:"string"}};return this.i.lg(e.item),t.ov(this.i,i)},t.g.Kt=function(e){var i=this.labels();if(i.clear(),i.ka(),i.enabled()&&e){var n=i.$d().adjustFontSize;e=n.width,n=n.height;var s=i.g("width"),a=i.g("height"),o=i.xA("anchor"),r=i.xA("position"),l="leaves"===this.g("labelsMode"),h=p(this).children;"leaves"===this.g("labelsMode")&&(h=c(this,h));for(var u=0;u<h.length;u++){var d=h[u],g=this.Ic(d);if(g=i.add(g,null),l){var f=g.xA("anchor")||o||"center",m=g.xA("position")||r||"center";g.anchor(f),g.position(m)}s=s||(e?"70%":s),a=a||(n?"70%":a),f=t.L(a,d.Ta.height),g.width(t.L(s,d.Ta.width)),g.height(f),f=t.Dk(g.ic("position")),d={value:t.Eo(d.Ta,f)},g.jc(d),g.W()}}i.da(!0),i.W()},t.g.Qh=function(e){if(!this.pf()){!function(e){e.ue||(e.ue=new t.dC((function(){return t.nk()}),t.ia),e.ue.zIndex(30),e.ue.parent(e.Na),e.Lf=e.Na.Bd(),e.Lf.zIndex(32),e.Qa().labels().O(e.Lf))}(this),this.pb();var i=p(this);this.J(4)&&(s(i.children,i,e),this.ue.clear(),l(this,this.f.children)),this.J(16)&&(h(this,this.f.children),this.I(16)),this.J(256)&&(this.Kt(i),this.I(256))}},t.g.F=function(){var t=a.u.F.call(this);return t.data=this.data().F(),t.tooltip=this.Ua().F(),t.palette=this.cc().F(),t.normal=this.Qa().F(),t.hovered=this.lb().F(),t.selected=this.selected().F(),t},t.g.U=function(t,e){a.u.U.call(this,t,e),"data"in t&&this.data(t.data),"tooltip"in t&&this.Ua().ga(!!e,t.tooltip),"normal"in t&&this.Qa().ga(!!e,t.normal),"hovered"in t&&this.lb().ga(!!e,t.hovered),"selected"in t&&this.selected().ga(!!e,t.selected),"palette"in t&&this.cc(t.palette)},t.g.Zj=function(e,i){return t.qu(this.data(),i)};var v=a.prototype;v.data=v.data,v.labels=v.labels,v.palette=v.cc,v.tooltip=v.Ua,v.getType=v.Ma,v.toCsv=v.Zj,v.normal=v.Qa,v.hovered=v.lb,v.selected=v.selected,t.Tp["circle-packing"]=g,t.E("anychart.circlePacking",g)}.call(this,$)),$_=window.anychart,$_.$=$,$_._=_},wrapper=function(t){if(!t.document)throw Error("AnyChart requires a window with a document");factory.call(t,t,t.document);try{t.acgraph.isNodeJS="[object process]"==Object.prototype.toString.call(global2.process)}catch(e){}return t.anychart},module.exports=global2.document?wrapper(global2):wrapper})(anychartBundle_min);var anychart=anychartBundle_min.exports,AnyChartDial_vue_vue_type_style_index_0_lang="";const _sfc_main$l=defineComponent({name:"DialChart",props:{options:{type:Object,default:()=>null}},setup(t){const e=ref$1(null),i=ref$1(null),n=computed((()=>t.options));function s(){if(!e.value&&t.options){var n=[t.options.value];e.value=anychart.gauges.linear(),e.value.background().fill(!1),e.value.data(n),e.value.layout("vertical");var s=anychart.scales.ordinalColor().ranges(t.options.colors||[{from:0,to:30,color:["#14BE64"]},{from:30,to:70,color:["#FFB100"]},{from:70,to:100,color:["#fd666d"]}]),a=e.value.scaleBar(0);a.width("60%"),a.offset("32.5%"),a.colorScale(s);var o=e.value.marker(0);o.offset("86%"),o.type("triangle-left"),o.width("20%"),o.zIndex(10);var r=e.value.scale();r.minimum(t.options.min),r.maximum(t.options.max);const h=t.options.max+-1*t.options.min;r.ticks().interval(h/t.options.ticks||5),r.minorTicks().interval(h/t.options.ticks/t.options.minorTicks||2);var l=e.value.axis();l.minorTicks(!0),l.minorTicks().stroke("#cecece").length(5).stroke(t.options.textColor||"#000000"),l.width(34),l.padding([1,0]),l.orientation("left"),l.stroke(null),l.ticks().length(10).stroke(t.options.textColor||"#000000"),l.labels().format((function(){return Math.round(this.value)})),l.labels().fontColor(t.options.textColor||"#000000"),e.value.padding([10,2,10,20]),e.value.container(i.value),e.value.draw()}}return onMounted((()=>{!e.value&&t.options&&s()})),onUnmounted((()=>{e.value&&(e.value.dispose(),e.value=null)})),watch(n,(async(t,i)=>{!e.value&&t||(e.value.dispose(),e.value=null),s()})),{gaugeElement:i}}}),_hoisted_1$e={class:"dial-chart",style:{height:"100%","max-width":"170px"},ref:"gaugeElement"};function _sfc_render$k(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$e,null,512)}var AnyChartDial=_export_sfc(_sfc_main$l,[["render",_sfc_render$k]]),Led_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$k=defineComponent({name:"LedEl",props:{item:{type:Object},active:{type:Boolean,default:!1},blink:{type:Boolean,default:!1},blinkInterval:{type:Number,default:700},offColor:{type:String,default:"#940303"},onColor:{type:String,default:"#940303"},icon:{type:String,default:"toggle_off"},textAlign:{type:String,default:"left"},label:{type:String,default:""},brightness:{type:Number,default:1}},setup(t){const e=ref$1(!1),i=ref$1(null);function n(){!1===e.value?e.value=!0:e.value=!1}watchEffect((()=>{t.blink?(i.value&&clearInterval(i.value),i.value=setInterval(n,t.blinkInterval)):!t.blink&&i.value&&clearInterval(i.value)})),onUnmounted((()=>{i.value&&clearInterval(i.value)}));return{opacity:computed((()=>t.brightness?.3+.7*t.brightness:0)),blinkVal:e}}}),_hoisted_1$d={class:"led-container"},_hoisted_2$5={width:"100%",height:"100%",version:"1.2",viewBox:"-10 -5 35.456 39.618",xmlns:"http://www.w3.org/2000/svg"},_hoisted_3$3=["fill"],_hoisted_4$2=["fill"],_hoisted_5$1={class:"led-label"};function _sfc_render$j(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$d,[(openBlock(),createElementBlock("svg",_hoisted_2$5,[e[1]||(e[1]=createStaticVNode('<filter id="light1" x="-0.8" y="-0.8" height="2.2" width="2.8" data-v-1ed9f06a><feGaussianBlur stdDeviation="2" data-v-1ed9f06a></feGaussianBlur></filter><filter id="light2" x="-0.8" y="-0.8" height="2.2" width="2.8" data-v-1ed9f06a><feGaussianBlur stdDeviation="4" data-v-1ed9f06a></feGaussianBlur></filter><rect x="2.5099" y="20.382" width="2.1514" height="9.8273" fill="#8c8c8c" data-v-1ed9f06a></rect><path d="m12.977 30.269c0-1.1736-0.86844-2.5132-1.8916-3.4024-0.41616-0.3672-1.1995-1.0015-1.1995-1.4249v-5.4706h-2.1614v5.7802c0 1.0584 0.94752 1.8785 1.9462 2.7482 0.44424 0.37584 1.3486 1.2496 1.3486 1.7694" fill="#8c8c8c" data-v-1ed9f06a></path><path d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z" opacity=".3" data-v-1ed9f06a></path><path d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z" fill="#e6e6e6" opacity=".5" data-v-1ed9f06a></path><path d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z" fill="#d1d1d1" opacity=".9" data-v-1ed9f06a></path><g data-v-1ed9f06a><path d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z" opacity=".7" data-v-1ed9f06a></path><path d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v3.1054c1.4738 1.6502 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586-7.4e-4 -1.1412-0.47444-2.2025-1.283-3.1047z" opacity=".25" data-v-1ed9f06a></path><ellipse cx="7.0877" cy="16.106" rx="7.087" ry="4.9608" opacity=".25" data-v-1ed9f06a></ellipse></g><polygon points="2.2032 16.107 3.1961 16.107 3.1961 13.095 6.0156 13.095 10.012 8.8049 3.407 8.8049 2.2032 9.648" fill="#666666" data-v-1ed9f06a></polygon><polygon points="11.215 9.0338 7.4117 13.095 11.06 13.095 11.06 16.107 11.974 16.107 11.974 8.5241 10.778 8.5241" fill="#666666" data-v-1ed9f06a></polygon>',10)),createBaseVNode("path",{d:"m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z",fill:!t.blink&&t.active||t.blink&&t.blinkVal?t.onColor:t.offColor,opacity:".65"},null,8,_hoisted_3$3),e[2]||(e[2]=createBaseVNode("g",{fill:"#ffffff"},[createBaseVNode("path",{d:"m10.388 3.7541 1.4364-0.2736c-0.84168-1.1318-2.0822-1.9577-3.5417-2.2385l0.25416 1.0807c0.76388 0.27072 1.4068 0.78048 1.8511 1.4314z",opacity:".5"}),createBaseVNode("path",{d:"m0.76824 19.926v1.5199c0.64872 0.5292 1.4335 0.97632 2.3076 1.3169v-1.525c-0.8784-0.33624-1.6567-0.78194-2.3076-1.3118z",opacity:".5"}),createBaseVNode("path",{d:"m11.073 20.21c-0.2556 0.1224-0.52992 0.22968-0.80568 0.32976-0.05832 0.01944-0.11736 0.04032-0.17784 0.05832-0.56376 0.17928-1.1614 0.31896-1.795 0.39456-0.07488 0.0094-0.1512 0.01872-0.22464 0.01944-0.3204 0.03024-0.64368 0.05832-0.97056 0.05832-0.14832 0-0.30744-0.01512-0.4716-0.02376-1.2002-0.05688-2.3306-0.31464-3.2976-0.73944l-2e-5 -8.3895v-4.8254c0-1.471 0.84816-2.7295 2.0736-3.3494l-0.02232-0.05328-1.2478-1.512c-1.6697 1.003-2.79 2.8224-2.79 4.9118v11.905c-0.04968-0.04968-0.30816-0.30888-0.48024-0.52992l-0.30744 0.6876c1.4011 1.4818 3.8088 2.4617 6.5426 2.4617 1.6798 0 3.2371-0.37368 4.5115-1.0022l-0.52704-0.40896-0.01006 0.0072z",opacity:".5"})],-1)),createBaseVNode("g",{class:"light",style:normalizeStyle$1("display: "+(!t.blink&&t.active||t.blink&&t.blinkVal?"":"none"))},[createBaseVNode("ellipse",{cx:"8",cy:"10",rx:"10",ry:"10",fill:t.onColor,filter:"url(#light2)",style:normalizeStyle$1(`opacity: ${t.opacity}`)},null,12,_hoisted_4$2),e[0]||(e[0]=createBaseVNode("ellipse",{cx:"8",cy:"10",rx:"2",ry:"2",fill:"white",filter:"url(#light1)"},null,-1)),createBaseVNode("ellipse",{cx:"8",cy:"10",rx:"3",ry:"3",fill:"white",filter:"url(#light1)",style:normalizeStyle$1(`opacity: ${t.opacity}`)},null,4)],4)])),createBaseVNode("span",_hoisted_5$1,toDisplayString(t.label),1)])}var LedEl=_export_sfc(_sfc_main$k,[["render",_sfc_render$j],["__scopeId","data-v-1ed9f06a"]]),Boiler_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$i=defineComponent({name:"BoilerEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$i=()=>{useCssVars((t=>({"43748e6e":t.fillColor})))},__setup__$i=__default__$i.setup;__default__$i.setup=__setup__$i?(t,e)=>(__injectCSSVars__$i(),__setup__$i(t,e)):__injectCSSVars__$i;const _sfc_main$j=__default__$i;function _sfc_render$i(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",height:"100%",width:"100%",version:"1.1",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createBaseVNode("path",{style:{fill:"currentColor","fill-opacity":"1","fill-rule":"nonzero",stroke:"#000000","stroke-width":"1","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"},d:"m 2,15 8,-7 0,-7 12,0 0,7 8,7 0,16 -28,0 z"},null,-1)])],2)}var Boiler=_export_sfc(_sfc_main$j,[["render",_sfc_render$i],["__scopeId","data-v-33e9983a"]]),Enthalpy_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$h=defineComponent({name:"EnthalpyEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$h=()=>{useCssVars((t=>({"8e28cea4":t.fillColor})))},__setup__$h=__default__$h.setup;__default__$h.setup=__setup__$h?(t,e)=>(__injectCSSVars__$h(),__setup__$h(t,e)):__injectCSSVars__$h;const _sfc_main$i=__default__$h,_hoisted_1$c={height:"100%",width:"100%",version:"1.1",viewBox:"0 0 10.221108 22.472175","xmlns:xlink":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",class:"object-svg"};function _sfc_render$h(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$c,[e[0]||(e[0]=createStaticVNode('<defs data-v-4247d06e><linearGradient id="linearGradient4194" data-v-4247d06e><stop style="stop-color:#ffff00;stop-opacity:1;" offset="0" id="stop4196" data-v-4247d06e></stop><stop id="stop4148" offset="0.3598454" style="stop-color:#ffff00;stop-opacity:1;" data-v-4247d06e></stop><stop id="stop4144" offset="0.59441435" style="stop-color:#00ffff;stop-opacity:1;" data-v-4247d06e></stop><stop style="stop-color:#00ffff;stop-opacity:1;" offset="1" id="stop4198" data-v-4247d06e></stop></linearGradient><linearGradient xlink:href="#linearGradient4194" id="linearGradient4219" x1="15.955305" y1="9.504283" x2="16.127491" y2="24.826317" gradientUnits="userSpaceOnUse" gradientTransform="translate(-10.896808,-9.4127998)" data-v-4247d06e></linearGradient></defs><rect style="fill:url(#linearGradient4219);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1px;" x="3.660192" y="0.5" width="2.901" height="14.505" id="rect3012" data-v-4247d06e></rect>',2)),createBaseVNode("path",{style:normalizeStyle$1(`fill: ${t.fillColor}; stroke: #000000; stroke-width: 0.889176px`),d:"m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z"},null,4),e[1]||(e[1]=createStaticVNode('<g transform="translate(-10.733726,-9.4127998)" data-v-4247d06e><g transform="translate(8.1630559,0.95878887)" data-v-4247d06e><circle style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" id="path4137" cx="6.4061227" cy="28.129852" r="0.77312505" data-v-4247d06e></circle><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" d="M 6.4061205,27.157211 V 23.65349" data-v-4247d06e></path></g><path style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" d="m 17.270488,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" data-v-4247d06e></path><path style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" d="m 17.270488,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" data-v-4247d06e></path></g>',1))])}var Enthalpy=_export_sfc(_sfc_main$i,[["render",_sfc_render$h],["__scopeId","data-v-4247d06e"]]),Flow_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$g=defineComponent({name:"EnthalpyEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$g=()=>{useCssVars((t=>({67850018:t.fillColor})))},__setup__$g=__default__$g.setup;__default__$g.setup=__setup__$g?(t,e)=>(__injectCSSVars__$g(),__setup__$g(t,e)):__injectCSSVars__$g;const _sfc_main$h=__default__$g,_hoisted_1$b={version:"1.1",height:"100%",width:"100%",viewBox:"0 0 10.221108 21.334512","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:osb":"http://www.openswatchbook.org/uri/2009/osb",class:"object-svg"};function _sfc_render$g(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$b,[...e[0]||(e[0]=[createBaseVNode("defs",null,[createBaseVNode("linearGradient",{id:"linearGradient4194","osb:paint":"gradient"},[createBaseVNode("stop",{style:{"stop-color":"#ffff00","stop-opacity":"1"},offset:"0"}),createBaseVNode("stop",{style:{"stop-color":"currentColor","stop-opacity":"1"},offset:"1"})])],-1),createStaticVNode('<path style="fill:currentColor;stroke:#000000;stroke-width:0.889176px;" d="m 9.7077419,16.908637 -2.298594,3.981286 H 2.8119599 L 0.51336587,16.908637 2.8119599,12.927351 h 4.597188 z" data-v-1cc0a844></path><g transform="matrix(0.83920236,0,0,0.83920236,-8.3130944,-6.3365267)" data-v-1cc0a844><path id="path4146" d="m 14.917284,30.513877 v -5.217284 h 2.569115" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.824475px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" data-v-1cc0a844></path><path d="m 14.956808,27.549512 h 2.529591" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.824475px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" data-v-1cc0a844></path></g><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" d="M 5.1629049,12.964256 V 0.5 H 0.56071887" data-v-1cc0a844></path><path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;" d="m 5.0190869,8.889403 h 2.205215 v 4.122792" data-v-1cc0a844></path>',4)])])}var Flow=_export_sfc(_sfc_main$h,[["render",_sfc_render$g],["__scopeId","data-v-1cc0a844"]]),Heatpump_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$f=defineComponent({name:" HeatpumpEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$f=()=>{useCssVars((t=>({"39d70710":t.fillColor})))},__setup__$f=__default__$f.setup;__default__$f.setup=__setup__$f?(t,e)=>(__injectCSSVars__$f(),__setup__$f(t,e)):__injectCSSVars__$f;const _sfc_main$g=__default__$f;function _sfc_render$f(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{"xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#",xmlns:"http://www.w3.org/2000/svg","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",viewBox:"0 0 32 32",height:"100%",width:"100%",version:"1.1",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g class="heat-pump" stroke-linejoin="round" stroke="#000" transform="translate(39 -2.3842e-7)" fill="currentColor" data-v-0c089198><rect class="inner" height="27.718" width="27.718" y="2.141" x="-36.859" stroke-width="1.0868" data-v-0c089198></rect><g transform="matrix(1.0276 0 0 1.0276 -39.441 -.44130)" stroke-linecap="round" stroke-miterlimit="1" stroke-width="1.3509" data-v-0c089198><path d="m16.234 16.944 8.6837-6.894-8.6837-6.894v3.447h-13.152v6.894h13.152z" fill="#ce2824" data-v-0c089198></path><path d="m15.766 28.844-8.6837-6.894 8.6837-6.894v3.447h13.152v6.894h-13.152z" fill="#3238db" data-v-0c089198></path></g></g>',1)])],2)}var Heatpump=_export_sfc(_sfc_main$g,[["render",_sfc_render$f],["__scopeId","data-v-0c089198"]]),Pump_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$e=defineComponent({name:" PumpEl",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$e=()=>{useCssVars((t=>({"37ee0c66":t.fillColor})))},__setup__$e=__default__$e.setup;__default__$e.setup=__setup__$e?(t,e)=>(__injectCSSVars__$e(),__setup__$e(t,e)):__injectCSSVars__$e;const _sfc_main$f=__default__$e;function _sfc_render$e(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 20.921802 20.921802",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g fill="currentColor" transform="translate(-5.4940996,-5.5390997)" data-v-6cb1d00e><g class="pump" data-v-6cb1d00e><circle stroke="#000000" cy="16" cx="15.955" r="9.9609003" class="pump-background" data-v-6cb1d00e></circle><g transform="translate(16,16)" data-v-6cb1d00e><path d="M -5,8.1369 V -8.1191 L 9.078,0.0091 Z" class="rotating-middle" stroke="#000000" stroke-width="0.96719" data-v-6cb1d00e></path></g></g></g>',1)])],2)}var Pump=_export_sfc(_sfc_main$f,[["render",_sfc_render$e],["__scopeId","data-v-6cb1d00e"]]),ValveThreeWay_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$d=defineComponent({name:"ValveThreeWay",props:{inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$d=()=>{useCssVars((t=>({"798b3aaf":t.fillColor})))},__setup__$d=__default__$d.setup;__default__$d.setup=__setup__$d?(t,e)=>(__injectCSSVars__$d(),__setup__$d(t,e)):__injectCSSVars__$d;const _sfc_main$e=__default__$d;function _sfc_render$d(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{"xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#",xmlns:"http://www.w3.org/2000/svg","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",viewBox:"0 0 23.197666 18.43317",version:"1.1",height:"100%",width:"100%",class:normalizeClass(["object-svg",{"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g transform="matrix(1,0,0,-1,-4.3773334,22.894063)" data-v-ae2fc2b6><g stroke-linejoin="round" stroke="#000000" class="twv" fill="currentColor" data-v-ae2fc2b6><g stroke-linecap="round" data-v-ae2fc2b6><path d="M 16,16 4.925,22.3941 V 9.6061 Z" data-v-ae2fc2b6></path><path d="m 16,16 11.075,6.3941 V 9.6061 Z" data-v-ae2fc2b6></path><path d="M 16,16 9.606,4.925 h 12.788 z" data-v-ae2fc2b6></path></g><g class="blocker-wrapper" data-v-ae2fc2b6><g class="blocker" fill="#000000" data-v-ae2fc2b6><path stroke-width="0.80716" d="m 0,-9.6108 a 8.8788,8.8788 0 0 0 -6.0273,2.375 l 1.6172,2.8008 A 5.7576,5.7576 0 0 1 0,-6.4897 5.7576,5.7576 0 0 1 4.4062,-4.4292 L 6.0293,-7.2397 A 8.8788,8.8788 0 0 0 0,-9.6108 Z" data-v-ae2fc2b6></path></g></g></g><path d="M 6.7797,10.576 V 21.084" stroke="#000000" stroke-width="1px" fill="none" data-v-ae2fc2b6></path></g>',1)])],2)}var ValveThreeWay=_export_sfc(_sfc_main$e,[["render",_sfc_render$d],["__scopeId","data-v-ae2fc2b6"]]),ValveTwoWay_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$c=defineComponent({name:"ValveTwoWay",props:{fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$c=()=>{useCssVars((t=>({cf7d4cea:t.fillColor})))},__setup__$c=__default__$c.setup;__default__$c.setup=__setup__$c?(t,e)=>(__injectCSSVars__$c(),__setup__$c(t,e)):__injectCSSVars__$c;const _sfc_main$d=__default__$c,_hoisted_1$a={viewBox:"0 0 22.956221 13.906571",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$c(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$a,[...e[0]||(e[0]=[createBaseVNode("g",{"stroke-linejoin":"round","fill-rule":"nonzero",transform:"translate(-3.8922957,-7.3951286)",stroke:"#000000","stroke-linecap":"round","stroke-dasharray":"none","stroke-miterlimit":"4","stroke-width":"1",fill:"currentColor"},[createBaseVNode("path",{d:"M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z",transform:"translate(5.3992957,6.473236)"}),createBaseVNode("path",{d:"M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z",transform:"matrix(-1,0,0,1,25.341517,6.354592)"})],-1)])])}var ValveTwoWay=_export_sfc(_sfc_main$d,[["render",_sfc_render$c],["__scopeId","data-v-6e99103d"]]),Humidity_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$b=defineComponent({name:"ValveTwoWay",props:{fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$b=()=>{useCssVars((t=>({a4652ae4:t.fillColor})))},__setup__$b=__default__$b.setup;__default__$b.setup=__setup__$b?(t,e)=>(__injectCSSVars__$b(),__setup__$b(t,e)):__injectCSSVars__$b;const _sfc_main$c=__default__$b,_hoisted_1$9={version:"1.1",viewBox:"0 0 10.221108 22.472175","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$b(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$9,[...e[0]||(e[0]=[createBaseVNode("defs",null,[createBaseVNode("linearGradient",{"inkscape:swatch":"gradient"},[createBaseVNode("stop",{style:{"stop-color":"#ffff00","stop-opacity":"1"},offset:"0"}),createBaseVNode("stop",{style:{"stop-color":"currentColor","stop-opacity":"1"},offset:"1"})])],-1),createStaticVNode('<rect style="fill:#00d1ff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1px;" x="3.660192" y="0.5" width="2.901" height="14.505" data-v-97bce89c></rect><path style="fill:#659dc5;stroke:#000000;stroke-width:0.889176px;" d="m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z" data-v-97bce89c></path><g transform="translate(-10.962785,-9.3157224)" data-v-97bce89c><g data-v-97bce89c><path d="m 17.43357,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-97bce89c></path><path d="m 17.43357,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-97bce89c></path></g><g transform="translate(0,0.107786)" data-v-97bce89c><path d="m 14.710621,24.560747 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-97bce89c></path><path d="m 14.710621,27.770688 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-97bce89c></path></g></g>',3)])])}var Humidity=_export_sfc(_sfc_main$c,[["render",_sfc_render$b],["__scopeId","data-v-97bce89c"]]),Pressure_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$a=defineComponent({name:"PressureEl",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$a=()=>{useCssVars((t=>({"19d19e16":t.fillColor})))},__setup__$a=__default__$a.setup;__default__$a.setup=__setup__$a?(t,e)=>(__injectCSSVars__$a(),__setup__$a(t,e)):__injectCSSVars__$a;const _sfc_main$b=__default__$a,_hoisted_1$8={version:"1.1",viewBox:"0 0 28.852817 27.05043","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$a(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$8,[...e[0]||(e[0]=[createStaticVNode('<path style="fill:currentColor;stroke:#000000;stroke-width:1.29098px;" d="M 21.101011,20.624556 17.76371,26.404938 H 11.089107 L 7.7518058,20.624556 11.089107,14.844174 h 6.674603 z" data-v-f50cc138></path><g transform="matrix(0.39332133,0,0,0.5366036,8.3312906,37.286552)" data-v-f50cc138><g transform="translate(0,0.03745956)" data-v-f50cc138><path style="fill:none;stroke:#000000;stroke-width:1.30927;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;" d="m 16.929663,-31.088307 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" data-v-f50cc138></path><path style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;" d="M 27.541431,-31.088307 H 18.912663" data-v-f50cc138></path></g><path d="m 15.532379,-39.152447 v 16.2032" style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;" data-v-f50cc138></path><g transform="matrix(-1,0,0,1,-1.8983044,-0.27118644)" data-v-f50cc138><path style="fill:none;stroke:#000000;stroke-width:1.30927;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;" d="m -15.961713,-30.779661 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" data-v-f50cc138></path><path style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;" d="M -5.3499446,-30.779661 H -13.978713" data-v-f50cc138></path></g></g><g transform="translate(-1.5131572,-0.15657804)" data-v-f50cc138><path d="M 2.0131572,0.15657804 V 6.9638416 H 14.573291 v 8.3199894" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-f50cc138></path><path d="M 29.865974,0.15657812 V 6.9638416 H 17.305841 v 8.3199894" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;" data-v-f50cc138></path></g>',3)])])}var Pressure=_export_sfc(_sfc_main$b,[["render",_sfc_render$a],["__scopeId","data-v-f50cc138"]]),ThermalWheel_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$9=defineComponent({name:" ThermalWheel",props:{active:{type:Boolean,required:!1,default:!1},inAlarm:{type:Boolean,required:!1,default:!1},fillColor:{type:String,default:"currentColor"}}}),__injectCSSVars__$9=()=>{useCssVars((t=>({"27c11bd7":t.fillColor})))},__setup__$9=__default__$9.setup;__default__$9.setup=__setup__$9?(t,e)=>(__injectCSSVars__$9(),__setup__$9(t,e)):__injectCSSVars__$9;const _sfc_main$a=__default__$9;function _sfc_render$9(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 26.777448 31.905044",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createStaticVNode('<g stroke="#000000" fill="currentColor" transform="translate(-2.370089)" data-v-5183fb99><rect class="thermal-wheel-background" height="40" width="25.5" y="-4" x="3" fill="inherit" stroke-width="1" data-v-5183fb99></rect><g class="thermal-wheel" stroke-width="1" data-v-5183fb99><line x1="3" x2="28.5" y1="-4" y2="-4" data-v-5183fb99></line><line x1="3" x2="28.5" y1="0" y2="0" data-v-5183fb99></line><line x1="3" x2="28.5" y1="4" y2="4" data-v-5183fb99></line><line x1="3" x2="28.5" y1="8" y2="8" data-v-5183fb99></line><line x1="3" x2="28.5" y1="12" y2="12" data-v-5183fb99></line><line x1="3" x2="28.5" y1="16" y2="16" data-v-5183fb99></line><line x1="3" x2="28.5" y1="20" y2="20" data-v-5183fb99></line><line x1="3" x2="28.5" y1="24" y2="24" data-v-5183fb99></line><line x1="3" x2="28.5" y1="28" y2="28" data-v-5183fb99></line><line x1="3" x2="28.5" y1="32" y2="32" data-v-5183fb99></line><line x1="3" x2="28.5" y1="36" y2="36" data-v-5183fb99></line></g></g>',1)])],2)}var ThermalWheel=_export_sfc(_sfc_main$a,[["render",_sfc_render$9],["__scopeId","data-v-5183fb99"]]),RoomHumidity_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$8=defineComponent({name:"RoomHumidity",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$8=()=>{useCssVars((t=>({"751f89c1":t.fillColor})))},__setup__$8=__default__$8.setup;__default__$8.setup=__setup__$8?(t,e)=>(__injectCSSVars__$8(),__setup__$8(t,e)):__injectCSSVars__$8;const _sfc_main$9=__default__$8,_hoisted_1$7={version:"1.1",viewBox:"0 0 18.016948 18.016948","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$8(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$7,[...e[0]||(e[0]=[createBaseVNode("g",{transform:"translate(-6.9915256,-6.9915256)"},[createBaseVNode("circle",{r:"8.6263752",cy:"16",cx:"16",style:{opacity:"1",fill:"currentColor","fill-opacity":"1","fill-rule":"nonzero",stroke:"#000000","stroke-width":"0.764198","stroke-linecap":"butt","stroke-linejoin":"round","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),createBaseVNode("g",{transform:"matrix(0.29971746,0,0,0.29971746,20.655088,20.220855)",style:{"font-style":"normal","font-weight":"normal","font-size":"51.4601px","line-height":"125%","font-family":"Sans","letter-spacing":"0px","word-spacing":"0px",fill:"#000000","fill-opacity":"1",stroke:"none","stroke-width":"1px","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-opacity":"1"}},[createBaseVNode("path",{d:"m -29.828843,-32.840076 h 5.075651 v 15.377717 h 18.4432096 v -15.377717 h 5.0756516 V 4.6745172 H -6.3099824 V -13.190771 H -24.753192 V 4.6745172 h -5.075651 z"})])],-1)])])}var RoomHumidity=_export_sfc(_sfc_main$9,[["render",_sfc_render$8],["__scopeId","data-v-3a2e328a"]]),RoomTemperature_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$7=defineComponent({name:"RoomTemperature",props:{fillColor:{type:String,default:"#659dc5"}}}),__injectCSSVars__$7=()=>{useCssVars((t=>({b221370a:t.fillColor})))},__setup__$7=__default__$7.setup;__default__$7.setup=__setup__$7?(t,e)=>(__injectCSSVars__$7(),__setup__$7(t,e)):__injectCSSVars__$7;const _sfc_main$8=__default__$7,_hoisted_1$6={version:"1.1",viewBox:"0 0 18.016949 18.016949","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",height:"100%",width:"100%",class:"object-svg"};function _sfc_render$7(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",_hoisted_1$6,[...e[0]||(e[0]=[createBaseVNode("g",{transform:"matrix(0.76419842,0,0,0.76419842,-3.2187002,-3.2187002)"},[createBaseVNode("circle",{r:"11.288136",cy:"16",cx:"16",style:{opacity:"1",fill:"currentColor","fill-opacity":"1","fill-rule":"nonzero",stroke:"#000000","stroke-width":"1","stroke-linecap":"butt","stroke-linejoin":"round","stroke-miterlimit":"4","stroke-dasharray":"none","stroke-opacity":"1"}}),createBaseVNode("g",{transform:"translate(32.100664,13.086915)",style:{"font-style":"normal","font-weight":"normal","font-size":"20.2897px","line-height":"125%","font-family":"Sans","letter-spacing":"0px","word-spacing":"0px",fill:"#000000","fill-opacity":"1",stroke:"none","stroke-width":"1px","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-opacity":"1"}},[createBaseVNode("path",{d:"m -22.356997,-4.4825641 h 12.5126658 v 1.6842067 H -15.095093 V 10.308734 h -2.011141 V -2.7983574 h -5.250763 z"})])],-1)])])}var RoomTemperature=_export_sfc(_sfc_main$8,[["render",_sfc_render$7],["__scopeId","data-v-b4df1150"]]),Wall_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$6=defineComponent({name:"WallEl",props:{bgColor:{type:String,default:"#666666"}},setup:()=>({})}),__injectCSSVars__$6=()=>{useCssVars((t=>({"0f15edb2":t.bgColor})))},__setup__$6=__default__$6.setup;__default__$6.setup=__setup__$6?(t,e)=>(__injectCSSVars__$6(),__setup__$6(t,e)):__injectCSSVars__$6;const _sfc_main$7=__default__$6,_hoisted_1$5={class:"wall-element"};function _sfc_render$6(t,e,i,n,s,a){return openBlock(),createElementBlock("div",_hoisted_1$5)}var Wall=_export_sfc(_sfc_main$7,[["render",_sfc_render$6],["__scopeId","data-v-a3c57510"]]),WeldType_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$5=defineComponent({name:"WeldType",components:{Duct:DuctEl,Fan:FanEl,CoolingCoil:CoolingCoil,HeatingCoil:HeatingCoil,FilterEl:FilterEl,Humidifier:HumidifierEl,Damper:Damper,TextEl:TextEl,BoxEl:BoxEl,IconBasic:IconBasic,IconValue:IconValue,IconSwitch:IconSwitch,ValueEl:ValueEl,Temperature:Temperature,GaugeChart:GaugeChart,DialChart:AnyChartDial,LedEl:LedEl,Boiler:Boiler,Enthalpy:Enthalpy,Flow:Flow,Heatpump:Heatpump,Pump:Pump,ValveThreeWay:ValveThreeWay,ValveTwoWay:ValveTwoWay,Humidity:Humidity,Pressure:Pressure,ThermalWheel:ThermalWheel,RoomHumidity:RoomHumidity,RoomTemperature:RoomTemperature,Wall:Wall},props:{item:{type:Object,required:!0},showArrows:{type:Boolean,default:!1}},emits:["autoManualToggle","objectClicked","changeValue"],setup(t,{emit:e}){const i=computed((()=>{var e;return IdxUtils.getEntryRange(null==(e=null==t?void 0:t.item)?void 0:e.t3Entry)})),n=computed((()=>{var e,i,n,s,a,o,r,l,h,c,u,d,p,g,f,m,v,b,y,S,x,w,C,T,D,k;if(!(null==(e=null==t?void 0:t.item)?void 0:e.t3Entry))return"";const $=IdxUtils.getEntryRange(null==(i=null==t?void 0:t.item)?void 0:i.t3Entry);if("value"===(null==(s=null==(n=null==t?void 0:t.item)?void 0:n.settings)?void 0:s.t3EntryDisplayField)||"control"===(null==(o=null==(a=null==t?void 0:t.item)?void 0:a.settings)?void 0:o.t3EntryDisplayField)){if(void 0!==(null==(l=null==(r=null==t?void 0:t.item)?void 0:r.t3Entry)?void 0:l.value)&&(null==(c=null==(h=null==t?void 0:t.item)?void 0:h.t3Entry)?void 0:c.range)>100){const e=null==(u=null==$?void 0:$.options)?void 0:u.find((e=>{var i,n;return 1e3*(null==e?void 0:e.value)===(null==(n=null==(i=null==t?void 0:t.item)?void 0:i.t3Entry)?void 0:n.value)}));return null==e?void 0:e.name}if(void 0!==(null==(p=null==(d=null==t?void 0:t.item)?void 0:d.t3Entry)?void 0:p.value)&&1===(null==(f=null==(g=null==t?void 0:t.item)?void 0:g.t3Entry)?void 0:f.digital_analog))return(null==(v=null==(m=null==t?void 0:t.item)?void 0:m.t3Entry)?void 0:v.value)/1e3+" "+$.unit;if(void 0!==(null==(y=null==(b=null==t?void 0:t.item)?void 0:b.t3Entry)?void 0:y.control)&&0===(null==(x=null==(S=null==t?void 0:t.item)?void 0:S.t3Entry)?void 0:x.digital_analog))return(null==(C=null==(w=null==t?void 0:t.item)?void 0:w.t3Entry)?void 0:C.control)?$.on:$.off}return(null==(k=null==t?void 0:t.item)?void 0:k.t3Entry[null==(D=null==(T=null==t?void 0:t.item)?void 0:T.settings)?void 0:D.t3EntryDisplayField])||""})),s=computed((()=>{var e,i,n,s;const a=null==t?void 0:t.item;return["Gauge","Dial"].includes(a.type)?"Gauge"===a.type?null==(i=null==(e=null==a?void 0:a.settings)?void 0:e.colors)?void 0:i.map((t=>[t.offset/100,t.color])):null==(s=null==(n=null==a?void 0:a.settings)?void 0:n.colors)?void 0:s.map(((t,e)=>{var i;return{from:e?null==(i=null==a?void 0:a.settings)?void 0:i.colors[e-1].offset:0,to:t.offset,color:[t.color]}})):null}));const a=ref$1(null);return{range:i,dispalyText:n,processedColors:s,changeValue:function(i){var n,s,a,o,r,l,h,c,u,d,p,g,f,m,v,b,y,S,x,w,C,T,D,k,$,O;if(0===(null==(s=null==(n=null==t?void 0:t.item)?void 0:n.t3Entry)?void 0:s.auto_manual))return;let P=!1,L=null==(o=null==(a=null==t?void 0:t.item)?void 0:a.t3Entry)?void 0:o.value;const I=IdxUtils.getEntryRange(null==(r=null==t?void 0:t.item)?void 0:r.t3Entry);if(void 0!==(null==(h=null==(l=null==t?void 0:t.item)?void 0:l.t3Entry)?void 0:h.value)&&(null==(u=null==(c=null==t?void 0:t.item)?void 0:c.t3Entry)?void 0:u.range)>100){const e=null==(d=null==I?void 0:I.options)?void 0:d.filter((t=>1===t.status)),n=e.findIndex((e=>{var i,n;return 1e3*e.value===(null==(n=null==(i=null==t?void 0:t.item)?void 0:i.t3Entry)?void 0:n.value)}));if("decrease"===i&&n<(null==e?void 0:e.length)-1)L=1e3*e[n+1].value;else{if(!("increase"===i&&n>0))return;L=1e3*e[n-1].value}}else if(void 0!==(null==(g=null==(p=null==t?void 0:t.item)?void 0:p.t3Entry)?void 0:g.value)&&1===(null==(m=null==(f=null==t?void 0:t.item)?void 0:f.t3Entry)?void 0:m.digital_analog))L="increase"===i?(null==(b=null==(v=null==t?void 0:t.item)?void 0:v.t3Entry)?void 0:b.value)+1e3:(null==(S=null==(y=null==t?void 0:t.item)?void 0:y.t3Entry)?void 0:S.value)-1e3;else if(void 0!==(null==(w=null==(x=null==t?void 0:t.item)?void 0:x.t3Entry)?void 0:w.control)&&0===(null==(T=null==(C=null==t?void 0:t.item)?void 0:C.t3Entry)?void 0:T.digital_analog))if(P=!0,"decrease"===i&&0===(null==(k=null==(D=null==t?void 0:t.item)?void 0:D.t3Entry)?void 0:k.control))L=1;else{if("increase"!==i||1!==(null==(O=null==($=null==t?void 0:t.item)?void 0:$.t3Entry)?void 0:O.control))return;L=0}e("changeValue",null==t?void 0:t.item,L,P)},refresh:function(){var e,i;a.value&&"Duct"===(null==(e=null==t?void 0:t.item)?void 0:e.type)&&(null==(i=null==a?void 0:a.value)||i.refresh())},objectRef:a}}}),__injectCSSVars__$5=()=>{useCssVars((t=>{var e,i,n,s,a,o,r,l,h,c;return{"007015e0":null==(i=null==(e=t.item)?void 0:e.settings)?void 0:i.titleColor,"4e592049":null==(s=null==(n=t.item)?void 0:n.settings)?void 0:s.bgColor,"98df4cbe":null==(o=null==(a=t.item)?void 0:a.settings)?void 0:o.textColor,ad056e70:(null==(l=null==(r=t.item)?void 0:r.settings)?void 0:l.fontSize)+"px","240b9f3e":null==(c=null==(h=t.item)?void 0:h.settings)?void 0:c.justifyContent}}))},__setup__$5=__default__$5.setup;__default__$5.setup=__setup__$5?(t,e)=>(__injectCSSVars__$5(),__setup__$5(t,e)):__injectCSSVars__$5;const _sfc_main$6=__default__$5,_hoisted_1$4={class:"relative"},_hoisted_2$4={key:26,class:"flex flex-col flex-nowrap justify-center"},_hoisted_3$2={class:"text-center font-bold pl-8 pb-2"},_hoisted_4$1=["src"];function _sfc_render$5(t,e,i,n,s,a){var o,r,l,h,c,u,d,p,g,f,m,v,b,y,S,x,w,C,T,D,k,$,O,P,L,I,A,E,G,U,F,M,_,N,R,j,B,H,z,V,q,W,Y,K,X,J,Z,Q,tt,et,it,nt,st,at,ot,rt,lt,ht,ct,ut,dt,pt,gt,ft,mt,vt,bt,yt,St,xt,wt,Ct,Tt,Dt,kt,$t,Ot,Pt,Lt,It,At,Et,Gt,Ut,Ft,Mt,_t,Nt,Rt,jt,Bt,Ht,zt,Vt,qt,Wt,Yt,Kt,Xt;const Jt=resolveComponent("fan"),Zt=resolveComponent("duct"),Qt=resolveComponent("cooling-coil"),te=resolveComponent("heating-coil"),ee=resolveComponent("filter-el"),ie=resolveComponent("humidifier"),ne=resolveComponent("humidity"),se=resolveComponent("Pressure"),ae=resolveComponent("ThermalWheel"),oe=resolveComponent("damper"),re=resolveComponent("boiler"),le=resolveComponent("heatpump"),he=resolveComponent("pump"),ce=resolveComponent("ValveThreeWay"),ue=resolveComponent("ValveTwoWay"),de=resolveComponent("enthalpy"),pe=resolveComponent("flow"),ge=resolveComponent("text-el"),fe=resolveComponent("box-el"),me=resolveComponent("icon-value"),ve=resolveComponent("icon-basic"),be=resolveComponent("icon-switch"),ye=resolveComponent("led-el"),Se=resolveComponent("value-el"),xe=resolveComponent("temperature"),we=resolveComponent("gauge-chart"),Ce=resolveComponent("dial-chart"),Te=resolveComponent("RoomHumidity"),De=resolveComponent("RoomTemperature"),ke=resolveComponent("Wall");return openBlock(),createElementBlock("div",{class:normalizeClass(["moveable-item",{"flex flex-col flex-nowrap":!["Dial","Gauge","Value"].includes(t.item.type),"overflow-hidden":"Text"===(null==(o=t.item)?void 0:o.type),[t.item.type]:null==(r=t.item)?void 0:r.type,"with-bg":null==(h=null==(l=t.item)?void 0:l.settings)?void 0:h.bgColor,"with-title":(null==(u=null==(c=t.item)?void 0:c.settings)?void 0:u.title)||(null==(d=t.item)?void 0:d.t3Entry)&&"none"!==(null==(g=null==(p=t.item)?void 0:p.settings)?void 0:g.t3EntryDisplayField)}])},[(null==(m=null==(f=t.item)?void 0:f.settings)?void 0:m.title)?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null==(v=t.item)?void 0:v.type)}]),onClick:e[0]||(e[0]=e=>t.$emit("objectClicked"))},toDisplayString(null==(y=null==(b=t.item)?void 0:b.settings)?void 0:y.title),3)):(null==(S=t.item)?void 0:S.t3Entry)&&"none"!==(null==(w=null==(x=t.item)?void 0:x.settings)?void 0:w.t3EntryDisplayField)?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null==(C=t.item)?void 0:C.type)}])},[createBaseVNode("div",_hoisted_1$4,[t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(null==(D=null==(T=t.item)?void 0:T.settings)?void 0:D.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==($=null==(k=t.item)?void 0:k.t3Entry)?void 0:$.auto_manual),onClick:e[1]||(e[1]=e=>t.changeValue("increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",null,[createBaseVNode("span",{onClick:e[2]||(e[2]=e=>t.$emit("objectClicked"))},toDisplayString(t.dispalyText||(null==(P=null==(O=t.item)?void 0:O.t3Entry)?void 0:P.id)),1),void 0!==(null==(I=null==(L=t.item)?void 0:L.t3Entry)?void 0:I.auto_manual)?(openBlock(),createElementBlock("span",{key:0,class:"mode-icon ml-2 text-lg",onClick:e[3]||(e[3]=e=>t.$emit("autoManualToggle"))},[(null==(E=null==(A=t.item)?void 0:A.t3Entry)?void 0:E.auto_manual)?(openBlock(),createBlock(QIcon,{key:1,name:"swipe_up"},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[7]||(e[7]=[createTextVNode(" In manual mode ",-1)])])),_:1})])),_:1})):(openBlock(),createBlock(QIcon,{key:0,name:"motion_photos_auto"},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[6]||(e[6]=[createTextVNode(" In auto mode ",-1)])])),_:1})])),_:1}))])):createCommentVNode("",!0)]),t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(null==(U=null==(G=t.item)?void 0:G.settings)?void 0:U.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(F=t.item.t3Entry)?void 0:F.auto_manual),onClick:e[4]||(e[4]=e=>t.changeValue("decrease"))},null,8,["disable"])):createCommentVNode("",!0)])],2)):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass(["flex justify-center object-container relative",{grow:!["Icon","Switch"].includes(null==(M=t.item)?void 0:M.type)}]),onClick:e[5]||(e[5]=e=>t.$emit("objectClicked"))},["Fan"===(null==(_=t.item)?void 0:_.type)?(openBlock(),createBlock(Jt,mergeProps({key:0,class:"fan"},null==(N=t.item)?void 0:N.settings),null,16)):"Duct"===(null==(R=t.item)?void 0:R.type)?(openBlock(),createBlock(Zt,mergeProps({key:1,class:"duct"},null==(j=t.item)?void 0:j.settings,{ref:"objectRef"}),null,16)):"CoolingCoil"===(null==(B=t.item)?void 0:B.type)?(openBlock(),createBlock(Qt,mergeProps({key:2,class:"cooling-coil"},null==(H=t.item)?void 0:H.settings),null,16)):"HeatingCoil"===(null==(z=t.item)?void 0:z.type)?(openBlock(),createBlock(te,mergeProps({key:3,class:"heating-coil"},null==(V=t.item)?void 0:V.settings),null,16)):"Filter"===(null==(q=t.item)?void 0:q.type)?(openBlock(),createBlock(ee,mergeProps({key:4,class:"filter"},null==(W=t.item)?void 0:W.settings),null,16)):"Humidifier"===(null==(Y=t.item)?void 0:Y.type)?(openBlock(),createBlock(ie,mergeProps({key:5,class:"humidifier"},null==(K=t.item)?void 0:K.settings),null,16)):"Humidity"===(null==(X=t.item)?void 0:X.type)?(openBlock(),createBlock(ne,mergeProps({key:6,class:"humidity"},null==(J=t.item)?void 0:J.settings),null,16)):"Pressure"===(null==(Z=t.item)?void 0:Z.type)?(openBlock(),createBlock(se,mergeProps({key:7,class:"pressure"},null==(Q=t.item)?void 0:Q.settings),null,16)):"ThermalWheel"===(null==(tt=t.item)?void 0:tt.type)?(openBlock(),createBlock(ae,mergeProps({key:8,class:"thermal-wheel"},null==(et=t.item)?void 0:et.settings),null,16)):"Damper"===(null==(it=t.item)?void 0:it.type)?(openBlock(),createBlock(oe,mergeProps({key:9,class:"damper",item:t.item},null==(nt=t.item)?void 0:nt.settings),null,16,["item"])):"Boiler"===(null==(st=t.item)?void 0:st.type)?(openBlock(),createBlock(re,mergeProps({key:10,class:"boiler"},null==(at=t.item)?void 0:at.settings),null,16)):"Heatpump"===(null==(ot=t.item)?void 0:ot.type)?(openBlock(),createBlock(le,mergeProps({key:11,class:"heatpump"},null==(rt=t.item)?void 0:rt.settings),null,16)):"Pump"===(null==(lt=t.item)?void 0:lt.type)?(openBlock(),createBlock(he,mergeProps({key:12,class:"heatpump"},null==(ht=t.item)?void 0:ht.settings),null,16)):"ValveThreeWay"===(null==(ct=t.item)?void 0:ct.type)?(openBlock(),createBlock(ce,mergeProps({key:13,class:"valve-threeway"},null==(ut=t.item)?void 0:ut.settings),null,16)):"ValveTwoWay"===(null==(dt=t.item)?void 0:dt.type)?(openBlock(),createBlock(ue,mergeProps({key:14,class:"valve-threeway"},null==(pt=t.item)?void 0:pt.settings),null,16)):"Enthalpy"===(null==(gt=t.item)?void 0:gt.type)?(openBlock(),createBlock(de,mergeProps({key:15,class:"enthalpy"},null==(ft=t.item)?void 0:ft.settings),null,16)):"Flow"===(null==(mt=t.item)?void 0:mt.type)?(openBlock(),createBlock(pe,mergeProps({key:16,class:"flow"},null==(vt=t.item)?void 0:vt.settings),null,16)):"Text"===(null==(bt=t.item)?void 0:bt.type)?(openBlock(),createBlock(ge,mergeProps({key:17,class:"text"},null==(yt=t.item)?void 0:yt.settings),null,16)):"Box"===(null==(St=t.item)?void 0:St.type)?(openBlock(),createBlock(fe,mergeProps({key:18,class:"box"},null==(xt=t.item)?void 0:xt.settings),null,16)):"Icon"===(null==(wt=t.item)?void 0:wt.type)?(openBlock(),createBlock(me,mergeProps({key:19,class:"icon-value",item:t.item,"show-arrows":t.showArrows},null==(Ct=t.item)?void 0:Ct.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"IconBasic"===(null==(Tt=t.item)?void 0:Tt.type)?(openBlock(),createBlock(ve,mergeProps({key:20,class:"icon-basic",item:t.item},null==(Dt=t.item)?void 0:Dt.settings),null,16,["item"])):"Switch"===(null==(kt=t.item)?void 0:kt.type)?(openBlock(),createBlock(be,mergeProps({key:21,class:"icon-switch",item:t.item,"show-arrows":t.showArrows},null==($t=t.item)?void 0:$t.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"LED"===(null==(Ot=t.item)?void 0:Ot.type)?(openBlock(),createBlock(ye,mergeProps({key:22,class:"led-el",item:t.item},null==(Pt=t.item)?void 0:Pt.settings),null,16,["item"])):"Value"===(null==(Lt=t.item)?void 0:Lt.type)?(openBlock(),createBlock(Se,mergeProps({key:23,class:"value",item:t.item,"show-arrows":t.showArrows},null==(It=t.item)?void 0:It.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"Temperature"===(null==(At=t.item)?void 0:At.type)?(openBlock(),createBlock(xe,mergeProps({key:24,class:"temperature"},null==(Et=t.item)?void 0:Et.settings),null,16)):"Gauge"===(null==(Gt=t.item)?void 0:Gt.type)?(openBlock(),createBlock(we,mergeProps({key:25,class:"gauge-object gauge"},null==(Ut=t.item)?void 0:Ut.settings,{unit:null==(Ft=t.range)?void 0:Ft.unit,colors:t.processedColors,value:(null==(Mt=t.item.t3Entry)?void 0:Mt.value)/1e3||0}),null,16,["unit","colors","value"])):"Dial"===(null==(_t=t.item)?void 0:_t.type)?(openBlock(),createElementBlock("div",_hoisted_2$4,[createVNode(Ce,{class:"gauge-object dial",options:{value:(null==(Nt=t.item.t3Entry)?void 0:Nt.value)/1e3||0,unit:t.range.unit,...t.item.settings,colors:t.processedColors}},null,8,["options"]),createBaseVNode("div",_hoisted_3$2,toDisplayString((null==(Rt=t.item.t3Entry)?void 0:Rt.value)/1e3||0)+" "+toDisplayString(t.range.unit),1)])):"RoomHumidity"===(null==(jt=t.item)?void 0:jt.type)?(openBlock(),createBlock(Te,mergeProps({key:27,class:"room-humidity"},null==(Bt=t.item)?void 0:Bt.settings),null,16)):"RoomTemperature"===(null==(Ht=t.item)?void 0:Ht.type)?(openBlock(),createBlock(De,mergeProps({key:28,class:"room-temperature"},null==(zt=t.item)?void 0:zt.settings),null,16)):"Wall"===(null==(Vt=t.item)?void 0:Vt.type)?(openBlock(),createBlock(ke,mergeProps({key:29,class:"room-temperature"},null==(qt=t.item)?void 0:qt.settings),null,16)):(null==(Yt=null==(Wt=t.item)?void 0:Wt.type)?void 0:Yt.startsWith("IMG-"))?(openBlock(),createElementBlock("img",{key:30,class:"img-object",src:null==(Xt=null==(Kt=t.item)?void 0:Kt.image)?void 0:Xt.path},null,8,_hoisted_4$1)):createCommentVNode("",!0)],2)],2)}var WeldType=_export_sfc(_sfc_main$6,[["render",_sfc_render$5],["__scopeId","data-v-81b7d37e"]]),Weld_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$4=defineComponent({name:"WeldEl",components:{WeldType:WeldType},props:{weldModel:{type:Object,default:()=>{}}},emits:["updateWeldModel"],setup(t,{emit:e}){const i=computed((()=>t.weldModel));let n=i.value.width,s=i.value.height;const a=i.value.settings.fillColor,o=i.value.settings.weldItems,r=()=>{if(0===o.length)return o;var t={widthScale:i.value.width/n,heightScale:i.value.height/s,tranXScale:i.value.translate[0]/n,tranYScale:i.value.translate[1]/s};const e=o[0],r=e.translate[0],l=e.translate[1];return o.map(((e,n)=>(0===n?(e.width=e.width*t.widthScale,e.height=e.height*t.heightScale,e.translate[0]=0,e.translate[1]=0):(e.width=e.width*t.widthScale,e.height=e.height*t.heightScale,e.translate[0]*=t.widthScale,e.translate[1]*=t.heightScale,e.translate[0]-=r*t.widthScale,e.translate[1]-=l*t.heightScale),i.value.settings.fillColor!==a&&("Duct"===e.type?e.settings.bgColor=i.value.settings.fillColor:e.settings.fillColor=i.value.settings.fillColor),e)))},l=computed((()=>{var t=r();return e("updateWeldModel",i.value,t),n=i.value.width,s=i.value.height,t}));return onMounted((()=>{})),{itemList:l,weldData:i}}}),__injectCSSVars__$4=()=>{useCssVars((t=>{var e,i,n;return{"20142b12":null==(e=t.settings)?void 0:e.bgColor,"02b3d62a":null==(i=t.settings)?void 0:i.textColor,b36d0ade:(null==(n=t.settings)?void 0:n.fontSize)+"px"}}))},__setup__$4=__default__$4.setup;__default__$4.setup=__setup__$4?(t,e)=>(__injectCSSVars__$4(),__setup__$4(t,e)):__injectCSSVars__$4;const _sfc_main$5=__default__$4,_hoisted_1$3={class:"weld-element flex justify-center object-container"},_hoisted_2$3=["id"];function _sfc_render$4(t,e,i,n,s,a){const o=resolveComponent("weld-type");return openBlock(),createElementBlock("div",_hoisted_1$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(t.itemList,((t,e)=>(openBlock(),createElementBlock("div",{key:t.id,style:normalizeStyle$1(`position: absolute; transform: translate(${t.translate[0]}px, ${t.translate[1]}px) rotate(${t.rotate}deg) scaleX(${t.scaleX}) scaleY(${t.scaleY}); width: ${t.width}px; height: ${t.height}px; z-index: ${t.zindex};`),class:normalizeClass(`weld-item-index-${e}`),id:`weld-item-${t.id}`},[(openBlock(),createBlock(o,{ref_for:!0,ref:"objectsRef",item:t,key:t.id+t.type},null,8,["item"]))],14,_hoisted_2$3)))),128))])}var Weld=_export_sfc(_sfc_main$5,[["render",_sfc_render$4],["__scopeId","data-v-6622e7a3"]]),Circle_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$3=defineComponent({name:"CircleEl",props:{bgColor:{type:String,default:"black"},fillColor:{type:String,default:"#659dc5"}},setup:()=>({})}),__injectCSSVars__$3=()=>{useCssVars((t=>({"0deed5f4":t.fillColor})))},__setup__$3=__default__$3.setup;__default__$3.setup=__setup__$3?(t,e)=>(__injectCSSVars__$3(),__setup__$3(t,e)):__injectCSSVars__$3;const _sfc_main$4=__default__$3;function _sfc_render$3(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 20.921802 20.921802",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createBaseVNode("g",{fill:"currentColor",transform:"translate(-5.4940996,-5.5390997)"},[createBaseVNode("g",{class:"circle"},[createBaseVNode("circle",{stroke:"#000000",cy:"16",cx:"15.955",r:"9.9609003"})])],-1)])],2)}var VueCircle=_export_sfc(_sfc_main$4,[["render",_sfc_render$3],["__scopeId","data-v-64b009ab"]]),Rectangle_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$2=defineComponent({name:"RectangleEl",props:{bgColor:{type:String,default:"black"},fillColor:{type:String,default:"#659dc5"}},setup:()=>({})}),__injectCSSVars__$2=()=>{useCssVars((t=>({65967445:t.fillColor})))},__setup__$2=__default__$2.setup;__default__$2.setup=__setup__$2?(t,e)=>(__injectCSSVars__$2(),__setup__$2(t,e)):__injectCSSVars__$2;const _sfc_main$3=__default__$2;function _sfc_render$2(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 30 20",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[...e[0]||(e[0]=[createBaseVNode("g",{fill:"currentColor",transform:"translate(-5.4940996,-5.5390997)"},[createBaseVNode("g",{class:"rectangle"},[createBaseVNode("rect",{x:"7",y:"7",width:"27",height:"15",stroke:"#000000"})])],-1)])],2)}var RectangleEl=_export_sfc(_sfc_main$3,[["render",_sfc_render$2],["__scopeId","data-v-0a5eeb18"]]),Step_vue_vue_type_style_index_0_scoped_true_lang="";const __default__$1=defineComponent({name:"StepEl",props:{bgColor:{type:String,default:"black"},fillColor:{type:String,default:"#659dc5"}},setup:()=>({})}),__injectCSSVars__$1=()=>{useCssVars((t=>({"49a90a3d":t.fillColor})))},__setup__$1=__default__$1.setup;__default__$1.setup=__setup__$1?(t,e)=>(__injectCSSVars__$1(),__setup__$1(t,e)):__injectCSSVars__$1;const _sfc_main$2=__default__$1,_hoisted_1$2={fill:"currentColor",transform:"translate(-1,-1)"},_hoisted_2$2={class:"step"},_hoisted_3$1=["fill"];function _sfc_render$1(t,e,i,n,s,a){return openBlock(),createElementBlock("svg",{viewBox:"0 0 32 32",version:"1.1","xmlns:sodipodi":"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg",height:"100%",width:"100%",class:normalizeClass(["object-svg",{active:t.active,"in-alarm":t.inAlarm}])},[createBaseVNode("g",_hoisted_1$2,[createBaseVNode("g",_hoisted_2$2,[createBaseVNode("path",{d:"M 1.6 5.4 L 25.6 5.4 L 30.4 15 L 25.6 24.6 L 1.6 24.6 L 6.4 15 Z",fill:t.fillColor,stroke:"#000000"},null,8,_hoisted_3$1)])])],2)}var StepEl=_export_sfc(_sfc_main$2,[["render",_sfc_render$1],["__scopeId","data-v-18317c40"]]),ObjectType_vue_vue_type_style_index_0_scoped_true_lang="";const __default__=defineComponent({name:"ObjectType",components:{Duct:DuctEl,Fan:FanEl,CoolingCoil:CoolingCoil,HeatingCoil:HeatingCoil,FilterEl:FilterEl,Humidifier:HumidifierEl,Damper:Damper,TextEl:TextEl,BoxEl:BoxEl,IconBasic:IconBasic,IconValue:IconValue,IconSwitch:IconSwitch,ValueEl:ValueEl,Temperature:Temperature,GaugeChart:GaugeChart,DialChart:AnyChartDial,LedEl:LedEl,Boiler:Boiler,Enthalpy:Enthalpy,Flow:Flow,Heatpump:Heatpump,Pump:Pump,ValveThreeWay:ValveThreeWay,ValveTwoWay:ValveTwoWay,Humidity:Humidity,Pressure:Pressure,ThermalWheel:ThermalWheel,RoomHumidity:RoomHumidity,RoomTemperature:RoomTemperature,Wall:Wall,Weld:Weld,CircleEl:VueCircle,RectangleEl:RectangleEl,StepEl:StepEl},props:{item:{type:Object,required:!0},showArrows:{type:Boolean,default:!1}},emits:["autoManualToggle","objectClicked","objectDoubleClicked","changeValue","updateWeldModel","click-right"],setup(t,{emit:e}){const i=computed((()=>{var e;return IdxUtils.getEntryRange(null==(e=t.item)?void 0:e.t3Entry)})),n=computed((()=>t.item.t3Entry?"description"===t.item.settings.t3EntryDisplayField?t.item.t3Entry.description||"":"label"===t.item.settings.t3EntryDisplayField?t.item.t3Entry.label||"":"value"===t.item.settings.t3EntryDisplayField||"control"===t.item.settings.t3EntryDisplayField?"":t.item.t3Entry[t.item.settings.t3EntryDisplayField]||"":"")),s=computed((()=>{if(!t.item.t3Entry)return"";const e=IdxUtils.getEntryRange(t.item.t3Entry),i=()=>{var i;if(t.item.t3Entry.range>100){const n=null==(i=e.options)?void 0:i.find((e=>e.value===t.item.t3Entry.value));return(null==n?void 0:n.name)||""}if(1===t.item.t3Entry.digital_analog){return(t.item.t3Entry.value||"")+" "+((null==e?void 0:e.unit)||"")}return 0===t.item.t3Entry.digital_analog?t.item.t3Entry.control?(null==e?void 0:e.on)||"":(null==e?void 0:e.off)||"":""};return"description"===t.item.settings.t3EntryDisplayField||"label"===t.item.settings.t3EntryDisplayField||"value"===t.item.settings.t3EntryDisplayField||"control"===t.item.settings.t3EntryDisplayField?i():""})),a=computed((()=>{const t=n.value,e=s.value;return t&&e?t+" "+e:t||(e||"")})),o=computed((()=>{const e=t.item;return["Gauge","Dial"].includes(e.type)?"Gauge"===e.type?e.settings.colors.map((t=>[t.offset/100,t.color])):e.settings.colors.map(((t,i)=>({from:i?e.settings.colors[i-1].offset:0,to:t.offset,color:[t.color]}))):null}));const r=ref$1(null);return{range:i,displayDescription:n,displayValueText:s,dispalyText:a,processedColors:o,changeValue:function(i){var n,s;if(0===t.item.t3Entry.auto_manual)return;let a=!1,o=t.item.t3Entry.value;const r=IdxUtils.getEntryRange(null==(n=t.item)?void 0:n.t3Entry);if(void 0!==t.item.t3Entry.value&&t.item.t3Entry.range>100){const e=null==(s=r.options)?void 0:s.filter((t=>1===t.status)),n=e.findIndex((e=>e.value===t.item.t3Entry.value));if("decrease"===i&&n<e.length-1)o=e[n+1].value;else{if(!("increase"===i&&n>0))return;o=e[n-1].value}}else if(void 0!==t.item.t3Entry.value&&1===t.item.t3Entry.digital_analog)o="increase"===i?t.item.t3Entry.value+1:t.item.t3Entry.value-1;else if(void 0!==t.item.t3Entry.control&&0===t.item.t3Entry.digital_analog)if(a=!0,"decrease"===i&&0===t.item.t3Entry.control)o=1;else{if("increase"!==i||1!==t.item.t3Entry.control)return;o=0}e("changeValue",t.item,o,a)},refresh:function(){var e;r.value&&"Duct"===(null==(e=t.item)?void 0:e.type)&&r.value.refresh()},objectRef:r,updateWeldModel:(t,i)=>{e("updateWeldModel",t,i)},handleTitleRightClick:t=>{e("click-right",t)}}}}),__injectCSSVars__=()=>{useCssVars((t=>({d97b6fa8:t.item.settings.bgColor,"62cf14c4":t.item.settings.textColor,"4a0444aa":t.item.settings.fontSize+"px","3908bf1d":t.item.settings.titleColor,bcf93c0a:t.item.settings.justifyContent})))},__setup__=__default__.setup;__default__.setup=__setup__?(t,e)=>(__injectCSSVars__(),__setup__(t,e)):__injectCSSVars__;const _sfc_main$1=__default__,_hoisted_1$1={key:26,class:"flex flex-col flex-nowrap justify-center"},_hoisted_2$1={class:"text-center font-bold pl-8 pb-2"},_hoisted_3=["src"],_hoisted_4={class:"relative"},_hoisted_5={class:"content-with-icon"},_hoisted_6={key:0,class:"description-text"},_hoisted_7={key:1,class:"value-text"},_hoisted_8={key:2};function _sfc_render(t,e,i,n,s,a){var o,r,l,h,c,u,d,p,g,f,m,v,b,y,S,x,w,C,T,D,k,$,O,P,L,I,A,E,G,U,F,M,_,N,R,j,B,H,z,V,q,W,Y,K,X,J,Z,Q,tt,et,it,nt,st,at,ot,rt,lt,ht,ct,ut,dt,pt,gt,ft,mt,vt,bt,yt,St,xt,wt,Ct,Tt,Dt,kt,$t,Ot,Pt,Lt,It,At,Et,Gt,Ut,Ft,Mt,_t,Nt,Rt,jt;const Bt=resolveComponent("fan"),Ht=resolveComponent("duct"),zt=resolveComponent("cooling-coil"),Vt=resolveComponent("heating-coil"),qt=resolveComponent("filter-el"),Wt=resolveComponent("humidifier"),Yt=resolveComponent("humidity"),Kt=resolveComponent("Pressure"),Xt=resolveComponent("ThermalWheel"),Jt=resolveComponent("damper"),Zt=resolveComponent("boiler"),Qt=resolveComponent("heatpump"),te=resolveComponent("pump"),ee=resolveComponent("ValveThreeWay"),ie=resolveComponent("ValveTwoWay"),ne=resolveComponent("enthalpy"),se=resolveComponent("flow"),ae=resolveComponent("text-el"),oe=resolveComponent("box-el"),re=resolveComponent("icon-value"),le=resolveComponent("icon-basic"),he=resolveComponent("icon-switch"),ce=resolveComponent("led-el"),ue=resolveComponent("value-el"),de=resolveComponent("temperature"),pe=resolveComponent("gauge-chart"),ge=resolveComponent("dial-chart"),fe=resolveComponent("RoomHumidity"),me=resolveComponent("RoomTemperature"),ve=resolveComponent("Wall"),be=resolveComponent("Weld"),ye=resolveComponent("CircleEl"),Se=resolveComponent("RectangleEl"),xe=resolveComponent("StepEl");return openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",{class:normalizeClass(["moveable-item",{"overflow-hidden":"Text"===(null!=(r=null==(o=t.item)?void 0:o.type)?r:""),[t.item.type]:null!=(h=null==(l=t.item)?void 0:l.type)?h:"","with-bg":t.item.settings.bgColor,"with-title":t.item.settings.title||t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField}])},[createBaseVNode("div",{class:normalizeClass(["shape-container flex justify-center object-container relative",{grow:!["Icon","Switch"].includes(null!=(u=null==(c=t.item)?void 0:c.type)?u:"")}]),onClick:e[0]||(e[0]=e=>t.$emit("objectClicked")),onDblclick:e[1]||(e[1]=e=>t.$emit("objectDoubleClicked")),onContextmenu:e[2]||(e[2]=withModifiers(((...e)=>t.handleTitleRightClick&&t.handleTitleRightClick(...e)),["right"]))},["Fan"===(null!=(p=null==(d=t.item)?void 0:d.type)?p:"")?(openBlock(),createBlock(Bt,mergeProps({key:0,class:"fan"},t.item.settings),null,16)):"Duct"===(null!=(f=null==(g=t.item)?void 0:g.type)?f:"")?(openBlock(),createBlock(Ht,mergeProps({key:1,class:"duct"},t.item.settings,{ref:"objectRef"}),null,16)):"CoolingCoil"===(null!=(v=null==(m=t.item)?void 0:m.type)?v:"")?(openBlock(),createBlock(zt,mergeProps({key:2,class:"cooling-coil"},t.item.settings),null,16)):"HeatingCoil"===(null!=(y=null==(b=t.item)?void 0:b.type)?y:"")?(openBlock(),createBlock(Vt,mergeProps({key:3,class:"heating-coil"},t.item.settings),null,16)):"Filter"===(null!=(x=null==(S=t.item)?void 0:S.type)?x:"")?(openBlock(),createBlock(qt,mergeProps({key:4,class:"filter"},t.item.settings),null,16)):"Humidifier"===(null!=(C=null==(w=t.item)?void 0:w.type)?C:"")?(openBlock(),createBlock(Wt,mergeProps({key:5,class:"humidifier"},t.item.settings),null,16)):"Humidity"===(null!=(D=null==(T=t.item)?void 0:T.type)?D:"")?(openBlock(),createBlock(Yt,mergeProps({key:6,class:"humidity"},t.item.settings),null,16)):"Pressure"===(null!=($=null==(k=t.item)?void 0:k.type)?$:"")?(openBlock(),createBlock(Kt,mergeProps({key:7,class:"pressure"},t.item.settings),null,16)):"ThermalWheel"===(null!=(P=null==(O=t.item)?void 0:O.type)?P:"")?(openBlock(),createBlock(Xt,mergeProps({key:8,class:"thermal-wheel"},t.item.settings),null,16)):"Damper"===(null!=(I=null==(L=t.item)?void 0:L.type)?I:"")?(openBlock(),createBlock(Jt,mergeProps({key:9,class:"damper",item:t.item},t.item.settings),null,16,["item"])):"Boiler"===(null!=(E=null==(A=t.item)?void 0:A.type)?E:"")?(openBlock(),createBlock(Zt,mergeProps({key:10,class:"boiler"},t.item.settings),null,16)):"Heatpump"===(null!=(U=null==(G=t.item)?void 0:G.type)?U:"")?(openBlock(),createBlock(Qt,mergeProps({key:11,class:"heatpump"},t.item.settings),null,16)):"Pump"===(null!=(M=null==(F=t.item)?void 0:F.type)?M:"")?(openBlock(),createBlock(te,mergeProps({key:12,class:"heatpump"},t.item.settings),null,16)):"ValveThreeWay"===(null!=(N=null==(_=t.item)?void 0:_.type)?N:"")?(openBlock(),createBlock(ee,mergeProps({key:13,class:"valve-threeway"},t.item.settings),null,16)):"ValveTwoWay"===(null!=(j=null==(R=t.item)?void 0:R.type)?j:"")?(openBlock(),createBlock(ie,mergeProps({key:14,class:"valve-threeway"},t.item.settings),null,16)):"Enthalpy"===(null!=(H=null==(B=t.item)?void 0:B.type)?H:"")?(openBlock(),createBlock(ne,mergeProps({key:15,class:"enthalpy"},t.item.settings),null,16)):"Flow"===(null!=(V=null==(z=t.item)?void 0:z.type)?V:"")?(openBlock(),createBlock(se,mergeProps({key:16,class:"flow"},t.item.settings),null,16)):"Text"===(null!=(W=null==(q=t.item)?void 0:q.type)?W:"")?(openBlock(),createBlock(ae,mergeProps({key:17,class:"text"},t.item.settings),null,16)):"Box"===(null!=(K=null==(Y=t.item)?void 0:Y.type)?K:"")?(openBlock(),createBlock(oe,mergeProps({key:18,class:"box"},t.item.settings),null,16)):"Icon"===(null!=(J=null==(X=t.item)?void 0:X.type)?J:"")?(openBlock(),createBlock(re,mergeProps({key:19,class:"icon-value",item:t.item,"show-arrows":t.showArrows},t.item.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"IconBasic"===(null!=(Q=null==(Z=t.item)?void 0:Z.type)?Q:"")?(openBlock(),createBlock(le,mergeProps({key:20,class:"icon-basic",item:t.item},t.item.settings),null,16,["item"])):"Switch"===(null!=(et=null==(tt=t.item)?void 0:tt.type)?et:"")?(openBlock(),createBlock(he,mergeProps({key:21,class:"icon-switch",item:t.item,"show-arrows":t.showArrows},t.item.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"LED"===(null!=(nt=null==(it=t.item)?void 0:it.type)?nt:"")?(openBlock(),createBlock(ce,mergeProps({key:22,class:"led-el",item:t.item},t.item.settings),null,16,["item"])):"Value"===(null!=(at=null==(st=t.item)?void 0:st.type)?at:"")?(openBlock(),createBlock(ue,mergeProps({key:23,class:"value",item:t.item,"show-arrows":t.showArrows},t.item.settings,{onChangeValue:t.changeValue}),null,16,["item","show-arrows","onChangeValue"])):"Temperature"===(null!=(rt=null==(ot=t.item)?void 0:ot.type)?rt:"")?(openBlock(),createBlock(de,mergeProps({key:24,class:"temperature"},t.item.settings),null,16)):"Gauge"===(null!=(ht=null==(lt=t.item)?void 0:lt.type)?ht:"")?(openBlock(),createBlock(pe,mergeProps({key:25,class:"gauge-object gauge"},t.item.settings,{unit:t.range.unit,colors:t.processedColors,value:(null==(ct=t.item.t3Entry)?void 0:ct.value)||0}),null,16,["unit","colors","value"])):"Dial"===(null!=(dt=null==(ut=t.item)?void 0:ut.type)?dt:"")?(openBlock(),createElementBlock("div",_hoisted_1$1,[createVNode(ge,{class:"gauge-object dial",options:{value:(null==(pt=t.item.t3Entry)?void 0:pt.value)||0,unit:t.range.unit,...t.item.settings,colors:t.processedColors}},null,8,["options"]),createBaseVNode("div",_hoisted_2$1,toDisplayString((null==(gt=t.item.t3Entry)?void 0:gt.value)||0)+" "+toDisplayString(t.range.unit),1)])):"RoomHumidity"===(null!=(mt=null==(ft=t.item)?void 0:ft.type)?mt:"")?(openBlock(),createBlock(fe,mergeProps({key:27,class:"room-humidity"},t.item.settings),null,16)):"RoomTemperature"===(null!=(bt=null==(vt=t.item)?void 0:vt.type)?bt:"")?(openBlock(),createBlock(me,mergeProps({key:28,class:"room-temperature"},t.item.settings),null,16)):"Wall"===(null!=(St=null==(yt=t.item)?void 0:yt.type)?St:"")?(openBlock(),createBlock(ve,mergeProps({key:29,class:"room-temperature"},t.item.settings),null,16)):"Weld"===(null!=(wt=null==(xt=t.item)?void 0:xt.type)?wt:"")?(openBlock(),createBlock(be,{key:30,class:"weld",weldModel:t.item,onUpdateWeldModel:t.updateWeldModel},null,8,["weldModel","onUpdateWeldModel"])):"string"==typeof(null==(Ct=t.item)?void 0:Ct.type)&&t.item.type.startsWith("IMG-")?(openBlock(),createElementBlock("img",{key:31,class:"img-object",src:null==(Dt=null==(Tt=t.item)?void 0:Tt.image)?void 0:Dt.path},null,8,_hoisted_3)):"G_Circle"===(null!=($t=null==(kt=t.item)?void 0:kt.type)?$t:"")?(openBlock(),createBlock(ye,mergeProps({key:32,class:"circle"},t.item.settings),null,16)):"G_Rectangle"===(null!=(Pt=null==(Ot=t.item)?void 0:Ot.type)?Pt:"")?(openBlock(),createBlock(Se,mergeProps({key:33,class:"rectangle"},t.item.settings),null,16)):"G_Step"===(null!=(It=null==(Lt=t.item)?void 0:Lt.type)?It:"")?(openBlock(),createBlock(xe,mergeProps({key:34,class:"step"},t.item.settings),null,16)):createCommentVNode("",!0)],34)],2),t.item.settings.title||t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField?(openBlock(),createElementBlock("div",{key:0,class:"title-overlay",onContextmenu:e[10]||(e[10]=withModifiers(((...e)=>t.handleTitleRightClick&&t.handleTitleRightClick(...e)),["right"]))},[t.item.settings.title?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null!=(Et=null==(At=t.item)?void 0:At.type)?Et:"")}]),onClick:e[3]||(e[3]=e=>t.$emit("objectClicked")),onDblclick:e[4]||(e[4]=e=>t.$emit("objectDoubleClicked"))},toDisplayString(t.item.settings.title),35)):t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(["object-title",{grow:["Icon","Switch"].includes(null!=(Ut=null==(Gt=t.item)?void 0:Gt.type)?Ut:"")}])},[createBaseVNode("div",_hoisted_4,[t.showArrows&&"Switch"!==(null!=(Mt=null==(Ft=t.item)?void 0:Ft.type)?Mt:"")&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(_t=t.item.t3Entry)?void 0:_t.auto_manual),onClick:e[5]||(e[5]=e=>t.changeValue("increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",null,[createBaseVNode("div",_hoisted_5,[void 0!==t.item.t3Entry.auto_manual?(openBlock(),createElementBlock("span",{key:0,class:"mode-icon-left",onClick:e[6]||(e[6]=e=>t.$emit("autoManualToggle"))},[t.item.t3Entry.auto_manual?(openBlock(),createBlock(QIcon,{key:1,name:"lock",style:{"font-size":"large",color:"#659dc5"}},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[12]||(e[12]=[createTextVNode(" In manual mode ",-1)])])),_:1})])),_:1})):(openBlock(),createBlock(QIcon,{key:0},{default:withCtx((()=>[createVNode(QTooltip,{anchor:"top middle",self:"center middle"},{default:withCtx((()=>[...e[11]||(e[11]=[createTextVNode(" In auto mode ",-1)])])),_:1})])),_:1}))])):createCommentVNode("",!0),createBaseVNode("div",{onClick:e[7]||(e[7]=e=>t.$emit("objectClicked")),onDblclick:e[8]||(e[8]=e=>t.$emit("objectDoubleClicked")),class:"text-display"},[t.displayDescription?(openBlock(),createElementBlock("span",_hoisted_6,toDisplayString(t.displayDescription),1)):createCommentVNode("",!0),t.displayValueText?(openBlock(),createElementBlock("span",_hoisted_7,toDisplayString(t.displayValueText),1)):createCommentVNode("",!0),t.displayDescription||t.displayValueText?createCommentVNode("",!0):(openBlock(),createElementBlock("span",_hoisted_8,toDisplayString(t.item.t3Entry.id),1))],32)])]),t.showArrows&&"Switch"!==(null!=(Rt=null==(Nt=t.item)?void 0:Nt.type)?Rt:"")&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(jt=t.item.t3Entry)?void 0:jt.auto_manual),onClick:e[9]||(e[9]=e=>t.changeValue("decrease"))},null,8,["disable"])):createCommentVNode("",!0)])],2)):createCommentVNode("",!0)],32)):createCommentVNode("",!0)],64)}var ObjectType=_export_sfc(_sfc_main$1,[["render",_sfc_render],["__scopeId","data-v-334f41eb"]]);class PageMain{constructor(){this.ResetLeftPanel=t=>{const e=document.getElementById(HvConstant.DocumentAreaModel.LEFT_PANEL_ID),i=t?0:HvConstant.DocumentAreaModel.LEFT_PANEL_WIDTH;e.setAttribute("style",`width: ${i}px`);const n=document.getElementById(HvConstant.DocumentAreaModel.WORK_AREA_ID),s=t?0:HvConstant.DocumentAreaModel.WORK_AREA_PADDING_LEFT;n.setAttribute("style",`padding-left: ${s}px`),LogUtil.Debug("ResetLeftPanel=>",`isLocked=${t}`,`newWidth=${i}`,`newPaddingLeft=${s}`)},this.ResetZoom=()=>{LogUtil.Debug("ResetZoom=>")},this.UpdateExteriorWallStroke=(t,e,i)=>{if(!t)return;const n=this.GetExteriorWallStrokeWidth(i);t.value.items[e].settings.strokeWidth=n},this.GetExteriorWallHeight=t=>.5128205128205128*t,this.GetExteriorWallStrokeWidth=t=>1.95*t,this.ClearItemsWithZeroWidth=t=>{if(!t)return;const e=t.value.items.filter((t=>0!==t.width));t.value.items=lodash.exports.cloneDeep(e),null!=t.value.activeItemIndex&&(t.value.activeItemIndex=t.value.items.length-1)},this.SetWallDimensionsVisible=(t,e,i,n)=>{if("all"==t&&i.value.items.forEach((t=>{"Int_Ext_Wall"===t.type&&(t.showDimensions=n)})),"select"===t){if(e)return;{const t=i.value.selectedTargets.map((t=>i.value.items.findIndex((e=>`moveable-item-${e.id}`===t.id&&"Int_Ext_Wall"===e.type))));i.value.items.forEach(((e,i)=>{"Int_Ext_Wall"===e.type&&(e.showDimensions=t.includes(i))}))}}},this.GetPreviousItem=t=>{let e=t.value.activeItemIndex-1;for(;e>=0&&0===t.value.items[e].width;)e--;return e>=0?e:-1},this.StartAutoJoinWall=(t,e)=>{LogUtil.Debug("AutoJoinWall StartAutoJoinWall=>",t.value.items,t.value.activeItemIndex,e);const i=t.value.items[t.value.activeItemIndex],n=this.GetPreviousItem(t),s=t.value.items[n];LogUtil.Debug("AutoJoinWall StartAutoJoinWall Current item:",i),LogUtil.Debug("AutoJoinWall StartAutoJoinWall Previous item:",s),null!=s&&(s.joinWall?s.joinWall.push(lodash.exports.cloneDeep(i)):s.joinWall=[lodash.exports.cloneDeep(i)])},this.AutoJoinWall=(t,e,i,n,s)=>{var a;LogUtil.Debug("AutoJoinWall=>",t.value.items,t.value.activeItemIndex,e,i,n,s);const o=this.GetPreviousItem(t),r=t.value.items[o];null!=r&&(null==(a=null==r?void 0:r.joinWall)||a.forEach((t=>{t.x=e,t.y=i,t.rotate=n,t.width=s})))}}}class T3Gv{}T3Gv.maxUndo=25,T3Gv.arrowHlkTable=[],T3Gv.arrowHsTable=[];class NvConstant{}NvConstant.TextElemLastOpt={Init:-1,Char:0,BS:1,DEL:2,Style:3,Cut:4,Copy:5,Paste:6,Select:7,Timeout:8},NvConstant.RulerUnit={None:0,Inches:1,Feet:2,Mm:3,Cm:4,M:5},NvConstant.Colors={White:"#FFFFFF",Black:"#000000",Hilite:"#0099FF",Select:"#00FF00",Trans:4294967295,Gray:"#C0C0C0"},NvConstant.FillTypes={Transparent:0,Solid:1,Gradient:2,Texture:3,Image:4,RichGradient:5},NvConstant.GraphType={Unset:-1,Bar:0,StackedBar:1,Line:2,Pie:3,LineArpie:4,StackedLine:5},NvConstant.GraphFlags={SequenceByCategory:4},NvConstant.AxisFlags={DaxHideMinorTicks:4,DaxShowGridLineMajor:32},NvConstant.LegendType={DaxLegendFull:0,DaxLegendNone:1,DaxLegendNames:2,DaxLegendSwatches:3},NvConstant.HopDimX=[6,8,10],NvConstant.HopDimY=[4,5,6],NvConstant.HopStyle={Box:0,Arc:1},NvConstant.DimensionFlags={EndPts:1,AllSeg:2,Total:4,Select:8,Always:16,Area:32,AreaSel:64,Standoff:128,Exterior:256,ShowFractionalInches:512,RectWithAndHeight:1024,ShowLineAngles:2048,InteriorAngles:4096,HideHookedObjDimensions:8192,ShowFeetAsInches:16384},NvConstant.TextGrowBehavior={ProPortional:0,Horizontal:1,Vertical:2,FSize:3},NvConstant.StyleDefaults={Default:"Style1",DefThick:1,DefFont:"Arial"},NvConstant.LayerFlags={Visible:1,Active:2,NoAdd:4,AllowCellEdit:8,UseEdges:16},NvConstant.LayerTypes={None:0,WebPage:4,Background:7},NvConstant.LayerMoveType={Bottom:0,Before:1,After:2,Top:3},NvConstant.ContainerListArrangements={Row:0,Column:1},NvConstant.ContainerListFlags={AllowOnlyContainers:1,AllowOnlyNonContainers:2,Sparse:4,LeftChanged:8,TopChanged:16,Adjust:32},NvConstant.EditState={Default:1,Stamp:2,Text:3,FormatPaint:4,LinkConnect:5,LinkJoin:6,Edit:7,DragControl:8,DragShape:9,Grab:10},NvConstant.Geometry={PI:3.14159265358979},NvConstant.ObjFlags={Select:1,Hide:2,Erase:4,EraseOnGrow:8,Lock:16,Bounds:128,ImageOnly:256,TextOnly:512,Assoc:8192,Obj1:16384,ContConn:32768,UseConnect:131072,DropOnBorder:262144,DropOnTable:524288,LineHop:1048576,LineMod:2097152,NoTableLink:4194304,NoLinking:16777216,NotVisible:268435456,NoMaintainLink:536870912},NvConstant.TextFlags={AttachB:4,AttachA:8,None:16,AttachC:32,HorizText:128,OneClick:512,FormCR:2048,NoSpell:4096,Clickhere:8192,AttachD:16384,TitleBlock:32768},NvConstant.SessionMoreFlags={NoActionButton:16,HideLayerTabs:1024},NvConstant.HookFlags={LcShape:1,LcLine:2,LcHOnly:4,LcVOnly:8,LcCHook:16,LcArrayMod:32,LcMoveTarget:128,LcAttachToLine:256,LcNoSnaps:512,LcShapeOnLine:1024,LcAutoInsert:8192,LcForceEnd:16384,LcHookNoExtra:131072,LcHookReverse:262144,LcNoContinuous:524288,LcTableRows:1048576},NvConstant.ListCodes={CircTarg:1,MoveTarg:2,MoveHook:3,TargOnly:4,ChildrenOnly:5,TopOnly:6,LinesOnly:7,MoveTargAndLines:8},NvConstant.FloatingPointDim={Width:16,Height:32},NvConstant.HitCodes={Border:40,Inside:41,PLApp:73,InContainer:101},NvConstant.GuideDistanceTypes={Room:1,Horizontal_Wall:2,Vertical_Wall:3,PolyWall:4},NvConstant.SegLDir={Ktc:5,Kbc:6,Klc:7,Krc:8},NvConstant.FNObjectTypes={None:0,PictContainer:1,Frame:2,CauseEffectMain:9,FlWall:16,Annotation:32,UiElement:33,NgEvent:35,NgEventLabel:36,D3Symbol:37,Multiplicity:39,ShapeContainer:55,FrameContainer:75,ExtraTextLable:80,GanttBar:10},NvConstant.ObjectSubTypes={SubtMultiplicityFilpped:80},NvConstant.ImageScales={AlwaysFit:0,CropToFit:1,PropFit:2};class OptConstant{}OptConstant.CSType={Rect:1,RRect:2,Oval:3,Line:4,Polyline:5,Polygon:6,Path:7,Text:8,Image:9,Group:10,Layer:11,Symbol:12,PolylineContainer:13,PolyPolyline:14,ShapeCopy:15,ShapeContainer:16,ForeignObject:17},OptConstant.ShapeType={Rect:"Rect",RRect:"RRect",Oval:"Oval",Polygon:"Polygon",VectorSymbol:"VectorSymbol",BitmapSymbol:"BitmapSymbol",GroupSymbol:"GroupSymbol",SvgSymbol:"SvgSymbol",D3Symbol:"D3Symbol",ForeignObject:"ForeignObject"},OptConstant.EventBehavior={Normal:"visiblePainted",Inside:"visibleFill",Outside:"visibleStroke",ALL:"visible",Hidden:"painted",HiddenIn:"fill",HiddenOut:"stroke",HiddenAll:"all",None:"none"},OptConstant.ExportType={None:0,PNG:2,SVG:3,JPEG:13},OptConstant.LineTypes={LsNone:0,LsComm:1,LsDigi:2,LsChord:3,LsWall:4,LsMeasuringTape:5},OptConstant.SVGPathSeg={PATHSEG_UNKNOWN:0,PATHSEG_CLOSEPATH:1,PATHSEG_MOVETO_ABS:2,PATHSEG_MOVETO_REL:3,PATHSEG_LINETO_ABS:4,PATHSEG_LINETO_REL:5,PATHSEG_CURVETO_CUBIC_ABS:6,PATHSEG_CURVETO_CUBIC_REL:7,PATHSEG_CURVETO_QUADRATIC_ABS:8,PATHSEG_CURVETO_QUADRATIC_REL:9,PATHSEG_ARC_ABS:10,PATHSEG_ARC_REL:11,PATHSEG_LINETO_HORIZONTAL_ABS:12,PATHSEG_LINETO_HORIZONTAL_REL:13,PATHSEG_LINETO_VERTICAL_ABS:14,PATHSEG_LINETO_VERTICAL_REL:15,PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:16,PATHSEG_CURVETO_CUBIC_SMOOTH_REL:17,PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:18,PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:19},OptConstant.LineType={LINE:1,ARCLINE:2,SEGLINE:3,ARCSEGLINE:4,POLYLINE:5,PARABOLA:6,FREEHAND:7,NURBS:501,NURBSSEG:502,ELLIPSE:503,ELLIPSEEND:504,QUADBEZ:505,QUADBEZCON:506,CUBEBEZ:507,CUBEBEZCON:508,SPLINE:509,SPLINECON:510,MOVETO:600,MOVETO_NEWPOLY:601},OptConstant.ArcQuad={PLA_TL:0,PLA_BL:1,PLA_BR:2,PLA_TR:3},OptConstant.ObjMoreFlags={FixedRR:64,Container:128,UseInfoNoteIcon:256,ContainerChild:512,AutoContainer:1024,FrameAllowNesting:2048,FrameGroup:4096},OptConstant.Common={EdgeSlop:5,DimMax:3e4,MetricConv:2.54,ConnPointDim:7,ConnPointLineDim:16,JoinPointLineDim:32,MinWidth:1,MaxPolyPoints:100,RoundFactor:.292893218,LongIntMax:2147483647,HorizOnly:1,VertOnly:2,SegMinLen:4,SegMinSeg:4,SegDefLen:25,Slop:7,SlopShapeExtra:10,ConnectorSlop:25,FlowConnectorSlop:75,FlowRadialSlop:150,FlowConnectorDisp:50,KnobSize:9,RKnobSize:7,CKnobSize:14,MinDim:4,Action:"act_",HitAreas:"hitareas_",GraphTextHit:"graph_texthit",EllipseAxes:"axes_",MaxPolySegs:500,MaxSteps:100,DimDefaultStandoff:25,DimDefaultNonStandoff:5,DimDefaultTextGap:3,DimLineColor:"#000000",CoordinateLineDefaultStandoff:-2.5,CoordinateLineDefaultNonStandoff:0,CoordinateLineDefaultTextGap:3,CoordinateLineColor:"blue",FindObjectMinHitSpot:5,DefTextMargin:2,TextBlockStyle:"Text Block",DefMargin:50,DNull:4294967295,DefRRect:.2,DefFixedRRect:.05,ShapeWidth:120,ShapeHeight:50,ShapeSquare:60,MaxHops:32,MaxWorkDimX:32e4,MaxWorkDimY:32e4,CITreeSpaceExtra:16,ConPlusPath:"plus.svg",ConMinusPath:"minus.svg",ConMoveVerticalPath:"move-vertical.svg",ConMoveHorizontalPath:"move-horizontal.svg",WallOpenId:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",ActionArrowSizeH:20,ActionArrowSizeV:13,BaseArrowSlop:7,ConnectorArrowSlop:25,MinSidePointLength:40,DefaultRulerMajor:100,AnnoHotDist:200,RRectFixedDim:100,MinLineDisDeterminOri:.2,IconShapeBottomOffset:2,iconShapeRightOffset:2,DefaultLayerName:"Layer-1",PenStylingDefault:{Line:{Thickness:1,Paint:{Opacity:1,Color:"#000000",FillType:1}}},HighlighterStylingDefault:{Line:{Thickness:5,Paint:{Opacity:.35,Color:"#FFE536",FillType:1}}},MaxTotalLayers:32,MaxLongDim:1e7,MinLineDrawGap:20},OptConstant.ExtraFlags={NoColor:1,FlipHoriz:8,FlipVert:16,NoRotate:32,SideKnobs:1048576,ConnToConn:2097152,NoDelete:8388608,CollapseConn:134217728,DeleteOnUnhook:2147483648},OptConstant.DrawObjectBaseClass={Shape:0,Line:1,Connector:3},OptConstant.ActionArrow={Up:1,Left:2,Down:3,Right:4,Slop:5,Custom:6,Enter:7,CoManger:8,Assistant:9,AddParents:10,AddDescendants:11},OptConstant.SVGElementClass={Shape:1,Slop:2,Hatch:3,Text:4,TextBackground:5,DimText:6,DimLine:7,BackgroundImage:8,Icon:9,NoteText:10,ActionArrow:11,DimTextNoEdit:12,AreaDimLine:13,CoordinateLine:21},OptConstant.ContentType={None:1,Text:2,Table:3},OptConstant.GrowBehavior={All:0,Horiz:1,Vertical:2,ProPortional:3},OptConstant.LineOrientation={None:1,Horizontal:2,Vertical:3,DiagonalTLRB:4,DiagonalTRBL:5},OptConstant.HitAreaType={ConnCollapse:1,ConnExpand:2,EditDimText:3},OptConstant.ShapeIconType={HyperLink:"HYPERLINK",Notes:"NOTES",Attachment:"ATTACHMENT",FieldData:"FIELDDATA",ExpandTable:"EXPANDTABLE",CollapseTable:"COLLAPSETABLE",DataAction:"DATAACTION",ExpandedView:"EXPANDEDVIEW",Comment:"COMMENT"},OptConstant.ActionTriggerType={TopLeft:1,TopCenter:2,TopRight:3,CenterRight:4,BottomRight:5,BottomCenter:6,BottomLeft:7,CenterLeft:8,Rotate:9,ModifyShape:10,LineStart:11,LineEnd:12,AttachPoint:13,SeglOne:14,SeglTwo:15,SeglThree:16,PolyNode:17,PolyAdj:18,PolyEnd:19,ConnectorHook:20,ConnectorRerp:21,ConnectorAdj:22,MovePolySeg:23,Flip:24,LineLength:31,SeglPreserve:32,LineThickness:33,DimLineAdj:34,UpdateLinks:35,ContainerAdj:36,TableSelect:27},OptConstant.CollabSVGEventTypes={ObjectMove:1,ShapeGrow:2,TableGrowColumn:3,TextEntry:4},OptConstant.LineAngleDimensionDefs={ArrowHeadSize:10,ArrowHeadWidth:4,PreferredArrowStemMin:4,PreferredBisectorLen:75},OptConstant.ArrayFlags={LeaveACl:1,LeaveACr:1},OptConstant.AStyles={StartLeft:1,BothSides:2,Stagger:4,PerpConn:8,Linear:16,Radial:32,ReverseCol:64,EndConn:128,MinZero:256,CoManager:512,FlowConn:1024,GenoConn:2048,MatchSize:4096,MinInvisible:8192,MinOne:16384,Timeline:32768},OptConstant.ConnectorDefines={DefaultHt:25,DefaultWd:25,ABk:0,ACl:1,ACr:2,NSkip:3,StubHookPt:-3,Normal:0,Above:-2,Below:-3,Parent:-4},OptConstant.SessionFlags={LLink:8,SLink:16,AttLink:256,FreeHand:1024,NoTreeOverlap:2048,AllowHops:4096,AutoFormat:524288,HideConnExpand:1048576,IsFlowChart:2097152,NoStepFormatting:1073741824},OptConstant.HeaderFlags={Pages:1024,NoAuto:4096,ShowRulers:65536,ShowGrid:131072,SnapToGridTL:262144,SnapToGridC:524288,SnapToShapesOff:1048576,ShowPageDividers:2097152,AutoGrowTopLeft:4194304},OptConstant.HookPts={KTL:1,KTR:2,KTC:5,KBC:6,KLC:7,KRC:8,LL:20,LR:21,LT:22,LB:23,KCTL:201,KCTR:202,KCBL:203,KCBR:204,KCT:205,KCB:206,KCL:207,KCR:208,KCC:209,KAT:220,KATD:221,AK:300,AKCT:305,AKCB:306,AKCL:307,AKCR:308,WTL:321,WTR:322,WBL:323,WBR:324,CustomBase:500},OptConstant.LineSubclass={LCH:0,LCD:1,LCV:2},OptConstant.SeglTypes={Line:0,Arc:1},OptConstant.OptTypes={None:0,Stamp:1,Draw:2,DragDrop:3,StampTextOnTap:4,AddCorner:5,DrawPolyline:6,FormatPainter:7,SplitWall:8};class RulerConfig{constructor(){this.useInches=!0,this.majorScale=1,this.units=NvConstant.RulerUnit.Inches,this.nTics=12,this.nMid=1,this.nGrid=12,this.originx=0,this.originy=0,this.major=OptConstant.Common.DefaultRulerMajor,this.metricConv=OptConstant.Common.MetricConv,this.dp=2,this.showpixels=!1,this.denom=1}}var jquery={exports:{}},global2,factory;
/*!
 * jQuery JavaScript Library v3.7.1
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2023-08-28T13:37Z
 */global2="undefined"!=typeof window?window:commonjsGlobal,factory=function(t,e){var i=[],n=Object.getPrototypeOf,s=i.slice,a=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},o=i.push,r=i.indexOf,l={},h=l.toString,c=l.hasOwnProperty,u=c.toString,d=u.call(Object),p={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},f=function(t){return null!=t&&t===t.window},m=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function b(t,e,i){var n,s,a=(i=i||m).createElement("script");if(a.text=t,e)for(n in v)(s=e[n]||e.getAttribute&&e.getAttribute(n))&&a.setAttribute(n,s);i.head.appendChild(a).parentNode.removeChild(a)}function y(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[h.call(t)]||"object":typeof t}var S="3.7.1",x=/HTML$/i,w=function(t,e){return new w.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,i=y(t);return!g(t)&&!f(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}w.fn=w.prototype={jquery:S,constructor:w,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=w.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return w.each(this,t)},map:function(t){return this.pushStack(w.map(this,(function(e,i){return t.call(e,i,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:i.sort,splice:i.splice},w.extend=w.fn.extend=function(){var t,e,i,n,s,a,o=arguments[0]||{},r=1,l=arguments.length,h=!1;for("boolean"==typeof o&&(h=o,o=arguments[r]||{},r++),"object"==typeof o||g(o)||(o={}),r===l&&(o=this,r--);r<l;r++)if(null!=(t=arguments[r]))for(e in t)n=t[e],"__proto__"!==e&&o!==n&&(h&&n&&(w.isPlainObject(n)||(s=Array.isArray(n)))?(i=o[e],a=s&&!Array.isArray(i)?[]:s||w.isPlainObject(i)?i:{},s=!1,o[e]=w.extend(h,a,n)):void 0!==n&&(o[e]=n));return o},w.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==h.call(t)||(e=n(t))&&("function"!=typeof(i=c.call(e,"constructor")&&e.constructor)||u.call(i)!==d))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,i){b(t,{nonce:e&&e.nonce},i)},each:function(t,e){var i,n=0;if(C(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},text:function(t){var e,i="",n=0,s=t.nodeType;if(!s)for(;e=t[n++];)i+=w.text(e);return 1===s||11===s?t.textContent:9===s?t.documentElement.textContent:3===s||4===s?t.nodeValue:i},makeArray:function(t,e){var i=e||[];return null!=t&&(C(Object(t))?w.merge(i,"string"==typeof t?[t]:t):o.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:r.call(e,t,i)},isXMLDoc:function(t){var e=t&&t.namespaceURI,i=t&&(t.ownerDocument||t).documentElement;return!x.test(e||i&&i.nodeName||"HTML")},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;n<i;n++)t[s++]=e[n];return t.length=s,t},grep:function(t,e,i){for(var n=[],s=0,a=t.length,o=!i;s<a;s++)!e(t[s],s)!==o&&n.push(t[s]);return n},map:function(t,e,i){var n,s,o=0,r=[];if(C(t))for(n=t.length;o<n;o++)null!=(s=e(t[o],o,i))&&r.push(s);else for(o in t)null!=(s=e(t[o],o,i))&&r.push(s);return a(r)},guid:1,support:p}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=i[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var D=i.pop,k=i.sort,$=i.splice,O="[\\x20\\t\\r\\n\\f]",P=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");w.contains=function(t,e){var i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(t.contains?t.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}w.escapeSelector=function(t){return(t+"").replace(L,I)};var A=m,E=o;!function(){var e,n,a,o,l,h,u,d,g,f,m=E,v=w.expando,b=0,y=0,S=tt(),x=tt(),C=tt(),L=tt(),I=function(t,e){return t===e&&(l=!0),0},G="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",U="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",F="\\[[\\x20\\t\\r\\n\\f]*("+U+")(?:"+O+"*([*^$|!~]?=)"+O+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+U+"))|)"+O+"*\\]",M=":("+U+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",_=new RegExp(O+"+","g"),N=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),R=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),j=new RegExp(O+"|>"),B=new RegExp(M),H=new RegExp("^"+U+"$"),z={ID:new RegExp("^#("+U+")"),CLASS:new RegExp("^\\.("+U+")"),TAG:new RegExp("^("+U+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+G+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,W=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),X=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},J=function(){lt()},Z=dt((function(t){return!0===t.disabled&&T(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(i=s.call(A.childNodes),A.childNodes),i[A.childNodes.length].nodeType}catch(yt){m={apply:function(t,e){E.apply(t,s.call(e))},call:function(t){E.apply(t,s.call(arguments,1))}}}function Q(t,e,i,n){var s,a,o,r,l,c,u,f=e&&e.ownerDocument,b=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return i;if(!n&&(lt(e),e=e||h,d)){if(11!==b&&(l=W.exec(t)))if(s=l[1]){if(9===b){if(!(o=e.getElementById(s)))return i;if(o.id===s)return m.call(i,o),i}else if(f&&(o=f.getElementById(s))&&Q.contains(e,o)&&o.id===s)return m.call(i,o),i}else{if(l[2])return m.apply(i,e.getElementsByTagName(t)),i;if((s=l[3])&&e.getElementsByClassName)return m.apply(i,e.getElementsByClassName(s)),i}if(!(L[t+" "]||g&&g.test(t))){if(u=t,f=e,1===b&&(j.test(t)||R.test(t))){for((f=Y.test(t)&&rt(e.parentNode)||e)==e&&p.scope||((r=e.getAttribute("id"))?r=w.escapeSelector(r):e.setAttribute("id",r=v)),a=(c=ct(t)).length;a--;)c[a]=(r?"#"+r:":scope")+" "+ut(c[a]);u=c.join(",")}try{return m.apply(i,f.querySelectorAll(u)),i}catch(y){L(t,!0)}finally{r===v&&e.removeAttribute("id")}}}return bt(t.replace(P,"$1"),e,i,n)}function tt(){var t=[];return function e(i,s){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=s}}function et(t){return t[v]=!0,t}function it(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(yt){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function nt(t){return function(e){return T(e,"input")&&e.type===t}}function st(t){return function(e){return(T(e,"input")||T(e,"button"))&&e.type===t}}function at(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Z(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ot(t){return et((function(e){return e=+e,et((function(i,n){for(var s,a=t([],i.length,e),o=a.length;o--;)i[s=a[o]]&&(i[s]=!(n[s]=i[s]))}))}))}function rt(t){return t&&void 0!==t.getElementsByTagName&&t}function lt(t){var e,i=t?t.ownerDocument||t:A;return i!=h&&9===i.nodeType&&i.documentElement?(u=(h=i).documentElement,d=!w.isXMLDoc(h),f=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&A!=h&&(e=h.defaultView)&&e.top!==e&&e.addEventListener("unload",J),p.getById=it((function(t){return u.appendChild(t).id=w.expando,!h.getElementsByName||!h.getElementsByName(w.expando).length})),p.disconnectedMatch=it((function(t){return f.call(t,"*")})),p.scope=it((function(){return h.querySelectorAll(":scope")})),p.cssHas=it((function(){try{return h.querySelector(":has(*,:jqfake)"),!1}catch(yt){return!0}})),p.getById?(n.filter.ID=function(t){var e=t.replace(K,X);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(K,X);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var i,n,s,a=e.getElementById(t);if(a){if((i=a.getAttributeNode("id"))&&i.value===t)return[a];for(s=e.getElementsByName(t),n=0;a=s[n++];)if((i=a.getAttributeNode("id"))&&i.value===t)return[a]}return[]}}),n.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},n.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&d)return e.getElementsByClassName(t)},g=[],it((function(t){var e;u.appendChild(t).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+G+")"),t.querySelectorAll("[id~="+v+"-]").length||g.push("~="),t.querySelectorAll("a#"+v+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll(":checked").length||g.push(":checked"),(e=h.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),u.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")")})),p.cssHas||g.push(":has"),g=g.length&&new RegExp(g.join("|")),I=function(t,e){if(t===e)return l=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!p.sortDetached&&e.compareDocumentPosition(t)===i?t===h||t.ownerDocument==A&&Q.contains(A,t)?-1:e===h||e.ownerDocument==A&&Q.contains(A,e)?1:o?r.call(o,t)-r.call(o,e):0:4&i?-1:1)},h):h}for(e in Q.matches=function(t,e){return Q(t,null,null,e)},Q.matchesSelector=function(t,e){if(lt(t),d&&!L[e+" "]&&(!g||!g.test(e)))try{var i=f.call(t,e);if(i||p.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(yt){L(e,!0)}return Q(e,h,null,[t]).length>0},Q.contains=function(t,e){return(t.ownerDocument||t)!=h&&lt(t),w.contains(t,e)},Q.attr=function(t,e){(t.ownerDocument||t)!=h&&lt(t);var i=n.attrHandle[e.toLowerCase()],s=i&&c.call(n.attrHandle,e.toLowerCase())?i(t,e,!d):void 0;return void 0!==s?s:t.getAttribute(e)},Q.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},w.uniqueSort=function(t){var e,i=[],n=0,a=0;if(l=!p.sortStable,o=!p.sortStable&&s.call(t,0),k.call(t,I),l){for(;e=t[a++];)e===t[a]&&(n=i.push(a));for(;n--;)$.call(t,i[n],1)}return o=null,t},w.fn.uniqueSort=function(){return this.pushStack(w.uniqueSort(s.apply(this)))},(n=w.expr={cacheLength:50,createPseudo:et,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,X),t[3]=(t[3]||t[4]||t[5]||"").replace(K,X),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Q.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Q.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return z.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&B.test(i)&&(e=ct(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(K,X).toLowerCase();return"*"===t?function(){return!0}:function(t){return T(t,e)}},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+O+"|$)"))&&S(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var s=Q.attr(n,t);return null==s?"!="===e:!e||(s+="","="===e?s===i:"!="===e?s!==i:"^="===e?i&&0===s.indexOf(i):"*="===e?i&&s.indexOf(i)>-1:"$="===e?i&&s.slice(-i.length)===i:"~="===e?(" "+s.replace(_," ")+" ").indexOf(i)>-1:"|="===e&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,s){var a="nth"!==t.slice(0,3),o="last"!==t.slice(-4),r="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,d,p,g=a!==o?"nextSibling":"previousSibling",f=e.parentNode,m=r&&e.nodeName.toLowerCase(),y=!l&&!r,S=!1;if(f){if(a){for(;g;){for(u=e;u=u[g];)if(r?T(u,m):1===u.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[o?f.firstChild:f.lastChild],o&&y){for(S=(d=(h=(c=f[v]||(f[v]={}))[t]||[])[0]===b&&h[1])&&h[2],u=d&&f.childNodes[d];u=++d&&u&&u[g]||(S=d=0)||p.pop();)if(1===u.nodeType&&++S&&u===e){c[t]=[b,d,S];break}}else if(y&&(S=d=(h=(c=e[v]||(e[v]={}))[t]||[])[0]===b&&h[1]),!1===S)for(;(u=++d&&u&&u[g]||(S=d=0)||p.pop())&&(!(r?T(u,m):1===u.nodeType)||!++S||(y&&((c=u[v]||(u[v]={}))[t]=[b,S]),u!==e)););return(S-=s)===n||S%n==0&&S/n>=0}}},PSEUDO:function(t,e){var i,s=n.pseudos[t]||n.setFilters[t.toLowerCase()]||Q.error("unsupported pseudo: "+t);return s[v]?s(e):s.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,i){for(var n,a=s(t,e),o=a.length;o--;)t[n=r.call(t,a[o])]=!(i[n]=a[o])})):function(t){return s(t,0,i)}):s}},pseudos:{not:et((function(t){var e=[],i=[],n=vt(t.replace(P,"$1"));return n[v]?et((function(t,e,i,s){for(var a,o=n(t,null,s,[]),r=t.length;r--;)(a=o[r])&&(t[r]=!(e[r]=a))})):function(t,s,a){return e[0]=t,n(e,null,a,i),e[0]=null,!i.pop()}})),has:et((function(t){return function(e){return Q(t,e).length>0}})),contains:et((function(t){return t=t.replace(K,X),function(e){return(e.textContent||w.text(e)).indexOf(t)>-1}})),lang:et((function(t){return H.test(t||"")||Q.error("unsupported lang: "+t),t=t.replace(K,X).toLowerCase(),function(e){var i;do{if(i=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===u},focus:function(t){return t===function(){try{return h.activeElement}catch(t){}}()&&h.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:at(!1),disabled:at(!0),checked:function(t){return T(t,"input")&&!!t.checked||T(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return q.test(t.nodeName)},input:function(t){return V.test(t.nodeName)},button:function(t){return T(t,"input")&&"button"===t.type||T(t,"button")},text:function(t){var e;return T(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ot((function(){return[0]})),last:ot((function(t,e){return[e-1]})),eq:ot((function(t,e,i){return[i<0?i+e:i]})),even:ot((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:ot((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:ot((function(t,e,i){var n;for(n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t})),gt:ot((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=nt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=st(e);function ht(){}function ct(t,e){var i,s,a,o,r,l,h,c=x[t+" "];if(c)return e?0:c.slice(0);for(r=t,l=[],h=n.preFilter;r;){for(o in i&&!(s=N.exec(r))||(s&&(r=r.slice(s[0].length)||r),l.push(a=[])),i=!1,(s=R.exec(r))&&(i=s.shift(),a.push({value:i,type:s[0].replace(P," ")}),r=r.slice(i.length)),n.filter)!(s=z[o].exec(r))||h[o]&&!(s=h[o](s))||(i=s.shift(),a.push({value:i,type:o,matches:s}),r=r.slice(i.length));if(!i)break}return e?r.length:r?Q.error(t):x(t,l).slice(0)}function ut(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function dt(t,e,i){var n=e.dir,s=e.next,a=s||n,o=i&&"parentNode"===a,r=y++;return e.first?function(e,i,s){for(;e=e[n];)if(1===e.nodeType||o)return t(e,i,s);return!1}:function(e,i,l){var h,c,u=[b,r];if(l){for(;e=e[n];)if((1===e.nodeType||o)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||o)if(c=e[v]||(e[v]={}),s&&T(e,s))e=e[n]||e;else{if((h=c[a])&&h[0]===b&&h[1]===r)return u[2]=h[2];if(c[a]=u,u[2]=t(e,i,l))return!0}return!1}}function pt(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function gt(t,e,i,n,s){for(var a,o=[],r=0,l=t.length,h=null!=e;r<l;r++)(a=t[r])&&(i&&!i(a,n,s)||(o.push(a),h&&e.push(r)));return o}function ft(t,e,i,n,s,a){return n&&!n[v]&&(n=ft(n)),s&&!s[v]&&(s=ft(s,a)),et((function(a,o,l,h){var c,u,d,p,g=[],f=[],v=o.length,b=a||function(t,e,i){for(var n=0,s=e.length;n<s;n++)Q(t,e[n],i);return i}(e||"*",l.nodeType?[l]:l,[]),y=!t||!a&&e?b:gt(b,g,t,l,h);if(i?i(y,p=s||(a?t:v||n)?[]:o,l,h):p=y,n)for(c=gt(p,f),n(c,[],l,h),u=c.length;u--;)(d=c[u])&&(p[f[u]]=!(y[f[u]]=d));if(a){if(s||t){if(s){for(c=[],u=p.length;u--;)(d=p[u])&&c.push(y[u]=d);s(null,p=[],c,h)}for(u=p.length;u--;)(d=p[u])&&(c=s?r.call(a,d):g[u])>-1&&(a[c]=!(o[c]=d))}}else p=gt(p===o?p.splice(v,p.length):p),s?s(null,o,p,h):m.apply(o,p)}))}function mt(t){for(var e,i,s,o=t.length,l=n.relative[t[0].type],h=l||n.relative[" "],c=l?1:0,u=dt((function(t){return t===e}),h,!0),d=dt((function(t){return r.call(e,t)>-1}),h,!0),p=[function(t,i,n){var s=!l&&(n||i!=a)||((e=i).nodeType?u(t,i,n):d(t,i,n));return e=null,s}];c<o;c++)if(i=n.relative[t[c].type])p=[dt(pt(p),i)];else{if((i=n.filter[t[c].type].apply(null,t[c].matches))[v]){for(s=++c;s<o&&!n.relative[t[s].type];s++);return ft(c>1&&pt(p),c>1&&ut(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(P,"$1"),i,c<s&&mt(t.slice(c,s)),s<o&&mt(t=t.slice(s)),s<o&&ut(t))}p.push(i)}return pt(p)}function vt(t,e){var i,s=[],o=[],r=C[t+" "];if(!r){for(e||(e=ct(t)),i=e.length;i--;)(r=mt(e[i]))[v]?s.push(r):o.push(r);r=C(t,function(t,e){var i=e.length>0,s=t.length>0,o=function(o,r,l,c,u){var p,g,f,v=0,y="0",S=o&&[],x=[],C=a,T=o||s&&n.find.TAG("*",u),k=b+=null==C?1:Math.random()||.1,$=T.length;for(u&&(a=r==h||r||u);y!==$&&null!=(p=T[y]);y++){if(s&&p){for(g=0,r||p.ownerDocument==h||(lt(p),l=!d);f=t[g++];)if(f(p,r||h,l)){m.call(c,p);break}u&&(b=k)}i&&((p=!f&&p)&&v--,o&&S.push(p))}if(v+=y,i&&y!==v){for(g=0;f=e[g++];)f(S,x,r,l);if(o){if(v>0)for(;y--;)S[y]||x[y]||(x[y]=D.call(c));x=gt(x)}m.apply(c,x),u&&!o&&x.length>0&&v+e.length>1&&w.uniqueSort(c)}return u&&(b=k,a=C),S};return i?et(o):o}(o,s)),r.selector=t}return r}function bt(t,e,i,s){var a,o,r,l,h,c="function"==typeof t&&t,u=!s&&ct(t=c.selector||t);if(i=i||[],1===u.length){if((o=u[0]=u[0].slice(0)).length>2&&"ID"===(r=o[0]).type&&9===e.nodeType&&d&&n.relative[o[1].type]){if(!(e=(n.find.ID(r.matches[0].replace(K,X),e)||[])[0]))return i;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(a=z.needsContext.test(t)?0:o.length;a--&&(r=o[a],!n.relative[l=r.type]);)if((h=n.find[l])&&(s=h(r.matches[0].replace(K,X),Y.test(o[0].type)&&rt(e.parentNode)||e))){if(o.splice(a,1),!(t=s.length&&ut(o)))return m.apply(i,s),i;break}}return(c||vt(t,u))(s,e,!d,i,!e||Y.test(t)&&rt(e.parentNode)||e),i}ht.prototype=n.filters=n.pseudos,n.setFilters=new ht,p.sortStable=v.split("").sort(I).join("")===v,lt(),p.sortDetached=it((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),w.find=Q,w.expr[":"]=w.expr.pseudos,w.unique=w.uniqueSort,Q.compile=vt,Q.select=bt,Q.setDocument=lt,Q.tokenize=ct,Q.escape=w.escapeSelector,Q.getText=w.text,Q.isXML=w.isXMLDoc,Q.selectors=w.expr,Q.support=w.support,Q.uniqueSort=w.uniqueSort}();var G=function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&w(t).is(i))break;n.push(t)}return n},U=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},F=w.expr.match.needsContext,M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function _(t,e,i){return g(e)?w.grep(t,(function(t,n){return!!e.call(t,n,t)!==i})):e.nodeType?w.grep(t,(function(t){return t===e!==i})):"string"!=typeof e?w.grep(t,(function(t){return r.call(e,t)>-1!==i})):w.filter(e,t,i)}w.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?w.find.matchesSelector(n,t)?[n]:[]:w.find.matches(t,w.grep(e,(function(t){return 1===t.nodeType})))},w.fn.extend({find:function(t){var e,i,n=this.length,s=this;if("string"!=typeof t)return this.pushStack(w(t).filter((function(){for(e=0;e<n;e++)if(w.contains(s[e],this))return!0})));for(i=this.pushStack([]),e=0;e<n;e++)w.find(t,s[e],i);return n>1?w.uniqueSort(i):i},filter:function(t){return this.pushStack(_(this,t||[],!1))},not:function(t){return this.pushStack(_(this,t||[],!0))},is:function(t){return!!_(this,"string"==typeof t&&F.test(t)?w(t):t||[],!1).length}});var N,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||N,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:R.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof w?e[0]:e,w.merge(this,w.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),M.test(n[1])&&w.isPlainObject(e))for(n in e)g(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(s=m.getElementById(n[2]))&&(this[0]=s,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==i.ready?i.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,N=w(m);var j=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),i=e.length;return this.filter((function(){for(var t=0;t<i;t++)if(w.contains(this,e[t]))return!0}))},closest:function(t,e){var i,n=0,s=this.length,a=[],o="string"!=typeof t&&w(t);if(!F.test(t))for(;n<s;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(o?o.index(i)>-1:1===i.nodeType&&w.find.matchesSelector(i,t))){a.push(i);break}return this.pushStack(a.length>1?w.uniqueSort(a):a)},index:function(t){return t?"string"==typeof t?r.call(w(t),this[0]):r.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),w.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return G(t,"parentNode")},parentsUntil:function(t,e,i){return G(t,"parentNode",i)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return G(t,"nextSibling")},prevAll:function(t){return G(t,"previousSibling")},nextUntil:function(t,e,i){return G(t,"nextSibling",i)},prevUntil:function(t,e,i){return G(t,"previousSibling",i)},siblings:function(t){return U((t.parentNode||{}).firstChild,t)},children:function(t){return U(t.firstChild)},contents:function(t){return null!=t.contentDocument&&n(t.contentDocument)?t.contentDocument:(T(t,"template")&&(t=t.content||t),w.merge([],t.childNodes))}},(function(t,e){w.fn[t]=function(i,n){var s=w.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=w.filter(n,s)),this.length>1&&(B[t]||w.uniqueSort(s),j.test(t)&&s.reverse()),this.pushStack(s)}}));var z=/[^\x20\t\r\n\f]+/g;function V(t){return t}function q(t){throw t}function W(t,e,i,n){var s;try{t&&g(s=t.promise)?s.call(t).done(e).fail(i):t&&g(s=t.then)?s.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(a){i.apply(void 0,[a])}}w.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return w.each(t.match(z)||[],(function(t,i){e[i]=!0})),e}(t):w.extend({},t);var e,i,n,s,a=[],o=[],r=-1,l=function(){for(s=s||t.once,n=e=!0;o.length;r=-1)for(i=o.shift();++r<a.length;)!1===a[r].apply(i[0],i[1])&&t.stopOnFalse&&(r=a.length,i=!1);t.memory||(i=!1),e=!1,s&&(a=i?[]:"")},h={add:function(){return a&&(i&&!e&&(r=a.length-1,o.push(i)),function e(i){w.each(i,(function(i,n){g(n)?t.unique&&h.has(n)||a.push(n):n&&n.length&&"string"!==y(n)&&e(n)}))}(arguments),i&&!e&&l()),this},remove:function(){return w.each(arguments,(function(t,e){for(var i;(i=w.inArray(e,a,i))>-1;)a.splice(i,1),i<=r&&r--})),this},has:function(t){return t?w.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return s=o=[],a=i="",this},disabled:function(){return!a},lock:function(){return s=o=[],i||e||(a=i=""),this},locked:function(){return!!s},fireWith:function(t,i){return s||(i=[t,(i=i||[]).slice?i.slice():i],o.push(i),e||l()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},w.extend({Deferred:function(e){var i=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],n="pending",s={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(t){return s.then(null,t)},pipe:function(){var t=arguments;return w.Deferred((function(e){w.each(i,(function(i,n){var s=g(t[n[4]])&&t[n[4]];a[n[1]]((function(){var t=s&&s.apply(this,arguments);t&&g(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,s?[t]:arguments)}))})),t=null})).promise()},then:function(e,n,s){var a=0;function o(e,i,n,s){return function(){var r=this,l=arguments,h=function(){var t,h;if(!(e<a)){if((t=n.apply(r,l))===i.promise())throw new TypeError("Thenable self-resolution");h=t&&("object"==typeof t||"function"==typeof t)&&t.then,g(h)?s?h.call(t,o(a,i,V,s),o(a,i,q,s)):(a++,h.call(t,o(a,i,V,s),o(a,i,q,s),o(a,i,V,i.notifyWith))):(n!==V&&(r=void 0,l=[t]),(s||i.resolveWith)(r,l))}},c=s?h:function(){try{h()}catch(t){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(t,c.error),e+1>=a&&(n!==q&&(r=void 0,l=[t]),i.rejectWith(r,l))}};e?c():(w.Deferred.getErrorHook?c.error=w.Deferred.getErrorHook():w.Deferred.getStackHook&&(c.error=w.Deferred.getStackHook()),t.setTimeout(c))}}return w.Deferred((function(t){i[0][3].add(o(0,t,g(s)?s:V,t.notifyWith)),i[1][3].add(o(0,t,g(e)?e:V)),i[2][3].add(o(0,t,g(n)?n:q))})).promise()},promise:function(t){return null!=t?w.extend(t,s):s}},a={};return w.each(i,(function(t,e){var o=e[2],r=e[5];s[e[1]]=o.add,r&&o.add((function(){n=r}),i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),o.add(e[3].fire),a[e[0]]=function(){return a[e[0]+"With"](this===a?void 0:this,arguments),this},a[e[0]+"With"]=o.fireWith})),s.promise(a),e&&e.call(a,a),a},when:function(t){var e=arguments.length,i=e,n=Array(i),a=s.call(arguments),o=w.Deferred(),r=function(t){return function(i){n[t]=this,a[t]=arguments.length>1?s.call(arguments):i,--e||o.resolveWith(n,a)}};if(e<=1&&(W(t,o.done(r(i)).resolve,o.reject,!e),"pending"===o.state()||g(a[i]&&a[i].then)))return o.then();for(;i--;)W(a[i],r(i),o.reject);return o.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&Y.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},w.readyException=function(e){t.setTimeout((function(){throw e}))};var K=w.Deferred();function X(){m.removeEventListener("DOMContentLoaded",X),t.removeEventListener("load",X),w.ready()}w.fn.ready=function(t){return K.then(t).catch((function(t){w.readyException(t)})),this},w.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==t&&--w.readyWait>0||K.resolveWith(m,[w]))}}),w.ready.then=K.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?t.setTimeout(w.ready):(m.addEventListener("DOMContentLoaded",X),t.addEventListener("load",X));var J=function(t,e,i,n,s,a,o){var r=0,l=t.length,h=null==i;if("object"===y(i))for(r in s=!0,i)J(t,e,r,i[r],!0,a,o);else if(void 0!==n&&(s=!0,g(n)||(o=!0),h&&(o?(e.call(t,n),e=null):(h=e,e=function(t,e,i){return h.call(w(t),i)})),e))for(;r<l;r++)e(t[r],i,o?n:n.call(t[r],r,e(t[r],i)));return s?t:h?e.call(t):l?e(t[0],i):a},Z=/^-ms-/,Q=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(Z,"ms-").replace(Q,tt)}var it=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function nt(){this.expando=w.expando+nt.uid++}nt.uid=1,nt.prototype={cache:function(t){var e=t[this.expando];return e||(e={},it(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,s=this.cache(t);if("string"==typeof e)s[et(e)]=i;else for(n in e)s[et(n)]=e[n];return s},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(et):(e=et(e))in n?[e]:e.match(z)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||w.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!w.isEmptyObject(e)}};var st=new nt,at=new nt,ot=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rt=/[A-Z]/g;function lt(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(rt,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:ot.test(t)?JSON.parse(t):t)}(i)}catch(s){}at.set(t,e,i)}else i=void 0;return i}w.extend({hasData:function(t){return at.hasData(t)||st.hasData(t)},data:function(t,e,i){return at.access(t,e,i)},removeData:function(t,e){at.remove(t,e)},_data:function(t,e,i){return st.access(t,e,i)},_removeData:function(t,e){st.remove(t,e)}}),w.fn.extend({data:function(t,e){var i,n,s,a=this[0],o=a&&a.attributes;if(void 0===t){if(this.length&&(s=at.get(a),1===a.nodeType&&!st.get(a,"hasDataAttrs"))){for(i=o.length;i--;)o[i]&&0===(n=o[i].name).indexOf("data-")&&(n=et(n.slice(5)),lt(a,n,s[n]));st.set(a,"hasDataAttrs",!0)}return s}return"object"==typeof t?this.each((function(){at.set(this,t)})):J(this,(function(e){var i;if(a&&void 0===e)return void 0!==(i=at.get(a,t))||void 0!==(i=lt(a,t))?i:void 0;this.each((function(){at.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){at.remove(this,t)}))}}),w.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=st.get(t,e),i&&(!n||Array.isArray(i)?n=st.access(t,e,w.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=w.queue(t,e),n=i.length,s=i.shift(),a=w._queueHooks(t,e);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete a.stop,s.call(t,(function(){w.dequeue(t,e)}),a)),!n&&a&&a.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return st.get(t,i)||st.access(t,i,{empty:w.Callbacks("once memory").add((function(){st.remove(t,[e+"queue",i])}))})}}),w.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?w.queue(this[0],t):void 0===e?this:this.each((function(){var i=w.queue(this,t,e);w._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&w.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){w.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,s=w.Deferred(),a=this,o=this.length,r=function(){--n||s.resolveWith(a,[a])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(i=st.get(a[o],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(r));return r(),s.promise(e)}});var ht=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ct=new RegExp("^(?:([+-])=|)("+ht+")([a-z%]*)$","i"),ut=["Top","Right","Bottom","Left"],dt=m.documentElement,pt=function(t){return w.contains(t.ownerDocument,t)},gt={composed:!0};dt.getRootNode&&(pt=function(t){return w.contains(t.ownerDocument,t)||t.getRootNode(gt)===t.ownerDocument});var ft=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&pt(t)&&"none"===w.css(t,"display")};function mt(t,e,i,n){var s,a,o=20,r=n?function(){return n.cur()}:function(){return w.css(t,e,"")},l=r(),h=i&&i[3]||(w.cssNumber[e]?"":"px"),c=t.nodeType&&(w.cssNumber[e]||"px"!==h&&+l)&&ct.exec(w.css(t,e));if(c&&c[3]!==h){for(l/=2,h=h||c[3],c=+l||1;o--;)w.style(t,e,c+h),(1-a)*(1-(a=r()/l||.5))<=0&&(o=0),c/=a;c*=2,w.style(t,e,c+h),i=i||[]}return i&&(c=+c||+l||0,s=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=h,n.start=c,n.end=s)),s}var vt={};function bt(t){var e,i=t.ownerDocument,n=t.nodeName,s=vt[n];return s||(e=i.body.appendChild(i.createElement(n)),s=w.css(e,"display"),e.parentNode.removeChild(e),"none"===s&&(s="block"),vt[n]=s,s)}function yt(t,e){for(var i,n,s=[],a=0,o=t.length;a<o;a++)(n=t[a]).style&&(i=n.style.display,e?("none"===i&&(s[a]=st.get(n,"display")||null,s[a]||(n.style.display="")),""===n.style.display&&ft(n)&&(s[a]=bt(n))):"none"!==i&&(s[a]="none",st.set(n,"display",i)));for(a=0;a<o;a++)null!=s[a]&&(t[a].style.display=s[a]);return t}w.fn.extend({show:function(){return yt(this,!0)},hide:function(){return yt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ft(this)?w(this).show():w(this).hide()}))}});var St,xt,wt=/^(?:checkbox|radio)$/i,Ct=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Tt=/^$|^module$|\/(?:java|ecma)script/i;St=m.createDocumentFragment().appendChild(m.createElement("div")),(xt=m.createElement("input")).setAttribute("type","radio"),xt.setAttribute("checked","checked"),xt.setAttribute("name","t"),St.appendChild(xt),p.checkClone=St.cloneNode(!0).cloneNode(!0).lastChild.checked,St.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!St.cloneNode(!0).lastChild.defaultValue,St.innerHTML="<option></option>",p.option=!!St.lastChild;var Dt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function kt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?w.merge([t],i):i}function $t(t,e){for(var i=0,n=t.length;i<n;i++)st.set(t[i],"globalEval",!e||st.get(e[i],"globalEval"))}Dt.tbody=Dt.tfoot=Dt.colgroup=Dt.caption=Dt.thead,Dt.th=Dt.td,p.option||(Dt.optgroup=Dt.option=[1,"<select multiple='multiple'>","</select>"]);var Ot=/<|&#?\w+;/;function Pt(t,e,i,n,s){for(var a,o,r,l,h,c,u=e.createDocumentFragment(),d=[],p=0,g=t.length;p<g;p++)if((a=t[p])||0===a)if("object"===y(a))w.merge(d,a.nodeType?[a]:a);else if(Ot.test(a)){for(o=o||u.appendChild(e.createElement("div")),r=(Ct.exec(a)||["",""])[1].toLowerCase(),l=Dt[r]||Dt._default,o.innerHTML=l[1]+w.htmlPrefilter(a)+l[2],c=l[0];c--;)o=o.lastChild;w.merge(d,o.childNodes),(o=u.firstChild).textContent=""}else d.push(e.createTextNode(a));for(u.textContent="",p=0;a=d[p++];)if(n&&w.inArray(a,n)>-1)s&&s.push(a);else if(h=pt(a),o=kt(u.appendChild(a),"script"),h&&$t(o),i)for(c=0;a=o[c++];)Tt.test(a.type||"")&&i.push(a);return u}var Lt=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function At(){return!1}function Et(t,e,i,n,s,a){var o,r;if("object"==typeof e){for(r in"string"!=typeof i&&(n=n||i,i=void 0),e)Et(t,r,i,n,e[r],a);return t}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=At;else if(!s)return t;return 1===a&&(o=s,s=function(t){return w().off(t),o.apply(this,arguments)},s.guid=o.guid||(o.guid=w.guid++)),t.each((function(){w.event.add(this,e,s,n,i)}))}function Gt(t,e,i){i?(st.set(t,e,!1),w.event.add(t,e,{namespace:!1,handler:function(t){var i,n=st.get(this,e);if(1&t.isTrigger&&this[e]){if(n)(w.event.special[e]||{}).delegateType&&t.stopPropagation();else if(n=s.call(arguments),st.set(this,e,n),this[e](),i=st.get(this,e),st.set(this,e,!1),n!==i)return t.stopImmediatePropagation(),t.preventDefault(),i}else n&&(st.set(this,e,w.event.trigger(n[0],n.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=It)}})):void 0===st.get(t,e)&&w.event.add(t,e,It)}w.event={global:{},add:function(t,e,i,n,s){var a,o,r,l,h,c,u,d,p,g,f,m=st.get(t);if(it(t))for(i.handler&&(i=(a=i).handler,s=a.selector),s&&w.find.matchesSelector(dt,s),i.guid||(i.guid=w.guid++),(l=m.events)||(l=m.events=Object.create(null)),(o=m.handle)||(o=m.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),h=(e=(e||"").match(z)||[""]).length;h--;)p=f=(r=Lt.exec(e[h])||[])[1],g=(r[2]||"").split(".").sort(),p&&(u=w.event.special[p]||{},p=(s?u.delegateType:u.bindType)||p,u=w.event.special[p]||{},c=w.extend({type:p,origType:f,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&w.expr.match.needsContext.test(s),namespace:g.join(".")},a),(d=l[p])||((d=l[p]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,g,o)||t.addEventListener&&t.addEventListener(p,o)),u.add&&(u.add.call(t,c),c.handler.guid||(c.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,c):d.push(c),w.event.global[p]=!0)},remove:function(t,e,i,n,s){var a,o,r,l,h,c,u,d,p,g,f,m=st.hasData(t)&&st.get(t);if(m&&(l=m.events)){for(h=(e=(e||"").match(z)||[""]).length;h--;)if(p=f=(r=Lt.exec(e[h])||[])[1],g=(r[2]||"").split(".").sort(),p){for(u=w.event.special[p]||{},d=l[p=(n?u.delegateType:u.bindType)||p]||[],r=r[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=d.length;a--;)c=d[a],!s&&f!==c.origType||i&&i.guid!==c.guid||r&&!r.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(a,1),c.selector&&d.delegateCount--,u.remove&&u.remove.call(t,c));o&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,g,m.handle)||w.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)w.event.remove(t,p+e[h],i,n,!0);w.isEmptyObject(l)&&st.remove(t,"handle events")}},dispatch:function(t){var e,i,n,s,a,o,r=new Array(arguments.length),l=w.event.fix(t),h=(st.get(this,"events")||Object.create(null))[l.type]||[],c=w.event.special[l.type]||{};for(r[0]=l,e=1;e<arguments.length;e++)r[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(o=w.event.handlers.call(this,l,h),e=0;(s=o[e++])&&!l.isPropagationStopped();)for(l.currentTarget=s.elem,i=0;(a=s.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==a.namespace&&!l.rnamespace.test(a.namespace)||(l.handleObj=a,l.data=a.data,void 0!==(n=((w.event.special[a.origType]||{}).handle||a.handler).apply(s.elem,r))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var i,n,s,a,o,r=[],l=e.delegateCount,h=t.target;if(l&&h.nodeType&&!("click"===t.type&&t.button>=1))for(;h!==this;h=h.parentNode||this)if(1===h.nodeType&&("click"!==t.type||!0!==h.disabled)){for(a=[],o={},i=0;i<l;i++)void 0===o[s=(n=e[i]).selector+" "]&&(o[s]=n.needsContext?w(s,this).index(h)>-1:w.find(s,this,null,[h]).length),o[s]&&a.push(n);a.length&&r.push({elem:h,handlers:a})}return h=this,l<e.length&&r.push({elem:h,handlers:e.slice(l)}),r},addProp:function(t,e){Object.defineProperty(w.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[w.expando]?t:new w.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return wt.test(e.type)&&e.click&&T(e,"input")&&Gt(e,"click",!0),!1},trigger:function(t){var e=this||t;return wt.test(e.type)&&e.click&&T(e,"input")&&Gt(e,"click"),!0},_default:function(t){var e=t.target;return wt.test(e.type)&&e.click&&T(e,"input")&&st.get(e,"click")||T(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},w.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},w.Event=function(t,e){if(!(this instanceof w.Event))return new w.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?It:At,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&w.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:At,isPropagationStopped:At,isImmediatePropagationStopped:At,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=It,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=It,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=It,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(t,e){function i(t){if(m.documentMode){var i=st.get(this,"handle"),n=w.event.fix(t);n.type="focusin"===t.type?"focus":"blur",n.isSimulated=!0,i(t),n.target===n.currentTarget&&i(n)}else w.event.simulate(e,t.target,w.event.fix(t))}w.event.special[t]={setup:function(){var n;if(Gt(this,t,!0),!m.documentMode)return!1;(n=st.get(this,e))||this.addEventListener(e,i),st.set(this,e,(n||0)+1)},trigger:function(){return Gt(this,t),!0},teardown:function(){var t;if(!m.documentMode)return!1;(t=st.get(this,e)-1)?st.set(this,e,t):(this.removeEventListener(e,i),st.remove(this,e))},_default:function(e){return st.get(e.target,t)},delegateType:e},w.event.special[e]={setup:function(){var n=this.ownerDocument||this.document||this,s=m.documentMode?this:n,a=st.get(s,e);a||(m.documentMode?this.addEventListener(e,i):n.addEventListener(t,i,!0)),st.set(s,e,(a||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,s=m.documentMode?this:n,a=st.get(s,e)-1;a?st.set(s,e,a):(m.documentMode?this.removeEventListener(e,i):n.removeEventListener(t,i,!0),st.remove(s,e))}}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){w.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,s=t.relatedTarget,a=t.handleObj;return s&&(s===n||w.contains(n,s))||(t.type=a.origType,i=a.handler.apply(this,arguments),t.type=e),i}}})),w.fn.extend({on:function(t,e,i,n){return Et(this,t,e,i,n)},one:function(t,e,i,n){return Et(this,t,e,i,n,1)},off:function(t,e,i){var n,s;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,w(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(s in t)this.off(s,e,t[s]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=At),this.each((function(){w.event.remove(this,t,i,e)}))}});var Ut=/<script|<style|<link/i,Ft=/checked\s*(?:[^=]|=\s*.checked.)/i,Mt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function _t(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Nt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Rt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var i,n,s,a,o,r;if(1===e.nodeType){if(st.hasData(t)&&(r=st.get(t).events))for(s in st.remove(e,"handle events"),r)for(i=0,n=r[s].length;i<n;i++)w.event.add(e,s,r[s][i]);at.hasData(t)&&(a=at.access(t),o=w.extend({},a),at.set(e,o))}}function Bt(t,e,i,n){e=a(e);var s,o,r,l,h,c,u=0,d=t.length,f=d-1,m=e[0],v=g(m);if(v||d>1&&"string"==typeof m&&!p.checkClone&&Ft.test(m))return t.each((function(s){var a=t.eq(s);v&&(e[0]=m.call(this,s,a.html())),Bt(a,e,i,n)}));if(d&&(o=(s=Pt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===s.childNodes.length&&(s=o),o||n)){for(l=(r=w.map(kt(s,"script"),Nt)).length;u<d;u++)h=s,u!==f&&(h=w.clone(h,!0,!0),l&&w.merge(r,kt(h,"script"))),i.call(t[u],h,u);if(l)for(c=r[r.length-1].ownerDocument,w.map(r,Rt),u=0;u<l;u++)h=r[u],Tt.test(h.type||"")&&!st.access(h,"globalEval")&&w.contains(c,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?w._evalUrl&&!h.noModule&&w._evalUrl(h.src,{nonce:h.nonce||h.getAttribute("nonce")},c):b(h.textContent.replace(Mt,""),h,c))}return t}function Ht(t,e,i){for(var n,s=e?w.filter(e,t):t,a=0;null!=(n=s[a]);a++)i||1!==n.nodeType||w.cleanData(kt(n)),n.parentNode&&(i&&pt(n)&&$t(kt(n,"script")),n.parentNode.removeChild(n));return t}w.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,s,a,o,r,l,h,c=t.cloneNode(!0),u=pt(t);if(!(p.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||w.isXMLDoc(t)))for(o=kt(c),n=0,s=(a=kt(t)).length;n<s;n++)r=a[n],l=o[n],h=void 0,"input"===(h=l.nodeName.toLowerCase())&&wt.test(r.type)?l.checked=r.checked:"input"!==h&&"textarea"!==h||(l.defaultValue=r.defaultValue);if(e)if(i)for(a=a||kt(t),o=o||kt(c),n=0,s=a.length;n<s;n++)jt(a[n],o[n]);else jt(t,c);return(o=kt(c,"script")).length>0&&$t(o,!u&&kt(t,"script")),c},cleanData:function(t){for(var e,i,n,s=w.event.special,a=0;void 0!==(i=t[a]);a++)if(it(i)){if(e=i[st.expando]){if(e.events)for(n in e.events)s[n]?w.event.remove(i,n):w.removeEvent(i,n,e.handle);i[st.expando]=void 0}i[at.expando]&&(i[at.expando]=void 0)}}}),w.fn.extend({detach:function(t){return Ht(this,t,!0)},remove:function(t){return Ht(this,t)},text:function(t){return J(this,(function(t){return void 0===t?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Bt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||_t(this,t).appendChild(t)}))},prepend:function(){return Bt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=_t(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(w.cleanData(kt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return w.clone(this,t,e)}))},html:function(t){return J(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ut.test(t)&&!Dt[(Ct.exec(t)||["",""])[1].toLowerCase()]){t=w.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(w.cleanData(kt(e,!1)),e.innerHTML=t);e=0}catch(s){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Bt(this,arguments,(function(e){var i=this.parentNode;w.inArray(this,t)<0&&(w.cleanData(kt(this)),i&&i.replaceChild(e,this))}),t)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){w.fn[t]=function(t){for(var i,n=[],s=w(t),a=s.length-1,r=0;r<=a;r++)i=r===a?this:this.clone(!0),w(s[r])[e](i),o.apply(n,i.get());return this.pushStack(n)}}));var zt=new RegExp("^("+ht+")(?!px)[a-z%]+$","i"),Vt=/^--/,qt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Wt=function(t,e,i){var n,s,a={};for(s in e)a[s]=t.style[s],t.style[s]=e[s];for(s in n=i.call(t),e)t.style[s]=a[s];return n},Yt=new RegExp(ut.join("|"),"i");function Kt(t,e,i){var n,s,a,o,r=Vt.test(e),l=t.style;return(i=i||qt(t))&&(o=i.getPropertyValue(e)||i[e],r&&o&&(o=o.replace(P,"$1")||void 0),""!==o||pt(t)||(o=w.style(t,e)),!p.pixelBoxStyles()&&zt.test(o)&&Yt.test(e)&&(n=l.width,s=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=o,o=i.width,l.width=n,l.minWidth=s,l.maxWidth=a)),void 0!==o?o+"":o}function Xt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){h.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",dt.appendChild(h).appendChild(c);var e=t.getComputedStyle(c);n="1%"!==e.top,l=12===i(e.marginLeft),c.style.right="60%",o=36===i(e.right),s=36===i(e.width),c.style.position="absolute",a=12===i(c.offsetWidth/3),dt.removeChild(h),c=null}}function i(t){return Math.round(parseFloat(t))}var n,s,a,o,r,l,h=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(p,{boxSizingReliable:function(){return e(),s},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,i,n,s;return null==r&&(e=m.createElement("table"),i=m.createElement("tr"),n=m.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="box-sizing:content-box;border:1px solid",i.style.height="1px",n.style.height="9px",n.style.display="block",dt.appendChild(e).appendChild(i).appendChild(n),s=t.getComputedStyle(i),r=parseInt(s.height,10)+parseInt(s.borderTopWidth,10)+parseInt(s.borderBottomWidth,10)===i.offsetHeight,dt.removeChild(e)),r}}))}();var Jt=["Webkit","Moz","ms"],Zt=m.createElement("div").style,Qt={};function te(t){var e=w.cssProps[t]||Qt[t];return e||(t in Zt?t:Qt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Jt.length;i--;)if((t=Jt[i]+e)in Zt)return t}(t)||t)}var ee=/^(none|table(?!-c[ea]).+)/,ie={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"};function se(t,e,i){var n=ct.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function ae(t,e,i,n,s,a){var o="width"===e?1:0,r=0,l=0,h=0;if(i===(n?"border":"content"))return 0;for(;o<4;o+=2)"margin"===i&&(h+=w.css(t,i+ut[o],!0,s)),n?("content"===i&&(l-=w.css(t,"padding"+ut[o],!0,s)),"margin"!==i&&(l-=w.css(t,"border"+ut[o]+"Width",!0,s))):(l+=w.css(t,"padding"+ut[o],!0,s),"padding"!==i?l+=w.css(t,"border"+ut[o]+"Width",!0,s):r+=w.css(t,"border"+ut[o]+"Width",!0,s));return!n&&a>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-a-l-r-.5))||0),l+h}function oe(t,e,i){var n=qt(t),s=(!p.boxSizingReliable()||i)&&"border-box"===w.css(t,"boxSizing",!1,n),a=s,o=Kt(t,e,n),r="offset"+e[0].toUpperCase()+e.slice(1);if(zt.test(o)){if(!i)return o;o="auto"}return(!p.boxSizingReliable()&&s||!p.reliableTrDimensions()&&T(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===w.css(t,"display",!1,n))&&t.getClientRects().length&&(s="border-box"===w.css(t,"boxSizing",!1,n),(a=r in t)&&(o=t[r])),(o=parseFloat(o)||0)+ae(t,e,i||(s?"border":"content"),a,n,o)+"px"}function re(t,e,i,n,s){return new re.prototype.init(t,e,i,n,s)}w.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Kt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,a,o,r=et(e),l=Vt.test(e),h=t.style;if(l||(e=te(r)),o=w.cssHooks[e]||w.cssHooks[r],void 0===i)return o&&"get"in o&&void 0!==(s=o.get(t,!1,n))?s:h[e];"string"==(a=typeof i)&&(s=ct.exec(i))&&s[1]&&(i=mt(t,e,s),a="number"),null!=i&&i==i&&("number"!==a||l||(i+=s&&s[3]||(w.cssNumber[r]?"":"px")),p.clearCloneStyle||""!==i||0!==e.indexOf("background")||(h[e]="inherit"),o&&"set"in o&&void 0===(i=o.set(t,i,n))||(l?h.setProperty(e,i):h[e]=i))}},css:function(t,e,i,n){var s,a,o,r=et(e);return Vt.test(e)||(e=te(r)),(o=w.cssHooks[e]||w.cssHooks[r])&&"get"in o&&(s=o.get(t,!0,i)),void 0===s&&(s=Kt(t,e,n)),"normal"===s&&e in ne&&(s=ne[e]),""===i||i?(a=parseFloat(s),!0===i||isFinite(a)?a||0:s):s}}),w.each(["height","width"],(function(t,e){w.cssHooks[e]={get:function(t,i,n){if(i)return!ee.test(w.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?oe(t,e,n):Wt(t,ie,(function(){return oe(t,e,n)}))},set:function(t,i,n){var s,a=qt(t),o=!p.scrollboxSize()&&"absolute"===a.position,r=(o||n)&&"border-box"===w.css(t,"boxSizing",!1,a),l=n?ae(t,e,n,r,a):0;return r&&o&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-ae(t,e,"border",!1,a)-.5)),l&&(s=ct.exec(i))&&"px"!==(s[3]||"px")&&(t.style[e]=i,i=w.css(t,e)),se(0,i,l)}}})),w.cssHooks.marginLeft=Xt(p.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Kt(t,"marginLeft"))||t.getBoundingClientRect().left-Wt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(t,e){w.cssHooks[t+e]={expand:function(i){for(var n=0,s={},a="string"==typeof i?i.split(" "):[i];n<4;n++)s[t+ut[n]+e]=a[n]||a[n-2]||a[0];return s}},"margin"!==t&&(w.cssHooks[t+e].set=se)})),w.fn.extend({css:function(t,e){return J(this,(function(t,e,i){var n,s,a={},o=0;if(Array.isArray(e)){for(n=qt(t),s=e.length;o<s;o++)a[e[o]]=w.css(t,e[o],!1,n);return a}return void 0!==i?w.style(t,e,i):w.css(t,e)}),t,e,arguments.length>1)}}),w.Tween=re,re.prototype={constructor:re,init:function(t,e,i,n,s,a){this.elem=t,this.prop=i,this.easing=s||w.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=a||(w.cssNumber[i]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,i=re.propHooks[this.prop];return this.options.duration?this.pos=e=w.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=w.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){w.fx.step[t.prop]?w.fx.step[t.prop](t):1!==t.elem.nodeType||!w.cssHooks[t.prop]&&null==t.elem.style[te(t.prop)]?t.elem[t.prop]=t.now:w.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},w.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},w.fx=re.prototype.init,w.fx.step={};var le,he,ce=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function de(){he&&(!1===m.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(de):t.setTimeout(de,w.fx.interval),w.fx.tick())}function pe(){return t.setTimeout((function(){le=void 0})),le=Date.now()}function ge(t,e){var i,n=0,s={height:t};for(e=e?1:0;n<4;n+=2-e)s["margin"+(i=ut[n])]=s["padding"+i]=t;return e&&(s.opacity=s.width=t),s}function fe(t,e,i){for(var n,s=(me.tweeners[e]||[]).concat(me.tweeners["*"]),a=0,o=s.length;a<o;a++)if(n=s[a].call(i,e,t))return n}function me(t,e,i){var n,s,a=0,o=me.prefilters.length,r=w.Deferred().always((function(){delete l.elem})),l=function(){if(s)return!1;for(var e=le||pe(),i=Math.max(0,h.startTime+h.duration-e),n=1-(i/h.duration||0),a=0,o=h.tweens.length;a<o;a++)h.tweens[a].run(n);return r.notifyWith(t,[h,n,i]),n<1&&o?i:(o||r.notifyWith(t,[h,1,0]),r.resolveWith(t,[h]),!1)},h=r.promise({elem:t,props:w.extend({},e),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},i),originalProperties:e,originalOptions:i,startTime:le||pe(),duration:i.duration,tweens:[],createTween:function(e,i){var n=w.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(s)return this;for(s=!0;i<n;i++)h.tweens[i].run(1);return e?(r.notifyWith(t,[h,1,0]),r.resolveWith(t,[h,e])):r.rejectWith(t,[h,e]),this}}),c=h.props;for(function(t,e){var i,n,s,a,o;for(i in t)if(s=e[n=et(i)],a=t[i],Array.isArray(a)&&(s=a[1],a=t[i]=a[0]),i!==n&&(t[n]=a,delete t[i]),(o=w.cssHooks[n])&&"expand"in o)for(i in a=o.expand(a),delete t[n],a)i in t||(t[i]=a[i],e[i]=s);else e[n]=s}(c,h.opts.specialEasing);a<o;a++)if(n=me.prefilters[a].call(h,t,c,h.opts))return g(n.stop)&&(w._queueHooks(h.elem,h.opts.queue).stop=n.stop.bind(n)),n;return w.map(c,fe,h),g(h.opts.start)&&h.opts.start.call(t,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),w.fx.timer(w.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h}w.Animation=w.extend(me,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return mt(i.elem,t,ct.exec(e),i),i}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(z);for(var i,n=0,s=t.length;n<s;n++)i=t[n],me.tweeners[i]=me.tweeners[i]||[],me.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,s,a,o,r,l,h,c,u="width"in e||"height"in e,d=this,p={},g=t.style,f=t.nodeType&&ft(t),m=st.get(t,"fxshow");for(n in i.queue||(null==(o=w._queueHooks(t,"fx")).unqueued&&(o.unqueued=0,r=o.empty.fire,o.empty.fire=function(){o.unqueued||r()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,w.queue(t,"fx").length||o.empty.fire()}))}))),e)if(s=e[n],ce.test(s)){if(delete e[n],a=a||"toggle"===s,s===(f?"hide":"show")){if("show"!==s||!m||void 0===m[n])continue;f=!0}p[n]=m&&m[n]||w.style(t,n)}if((l=!w.isEmptyObject(e))||!w.isEmptyObject(p))for(n in u&&1===t.nodeType&&(i.overflow=[g.overflow,g.overflowX,g.overflowY],null==(h=m&&m.display)&&(h=st.get(t,"display")),"none"===(c=w.css(t,"display"))&&(h?c=h:(yt([t],!0),h=t.style.display||h,c=w.css(t,"display"),yt([t]))),("inline"===c||"inline-block"===c&&null!=h)&&"none"===w.css(t,"float")&&(l||(d.done((function(){g.display=h})),null==h&&(c=g.display,h="none"===c?"":c)),g.display="inline-block")),i.overflow&&(g.overflow="hidden",d.always((function(){g.overflow=i.overflow[0],g.overflowX=i.overflow[1],g.overflowY=i.overflow[2]}))),l=!1,p)l||(m?"hidden"in m&&(f=m.hidden):m=st.access(t,"fxshow",{display:h}),a&&(m.hidden=!f),f&&yt([t],!0),d.done((function(){for(n in f||yt([t]),st.remove(t,"fxshow"),p)w.style(t,n,p[n])}))),l=fe(f?m[n]:0,n,d),n in m||(m[n]=l.start,f&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?me.prefilters.unshift(t):me.prefilters.push(t)}}),w.speed=function(t,e,i){var n=t&&"object"==typeof t?w.extend({},t):{complete:i||!i&&e||g(t)&&t,duration:t,easing:i&&e||e&&!g(e)&&e};return w.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in w.fx.speeds?n.duration=w.fx.speeds[n.duration]:n.duration=w.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){g(n.old)&&n.old.call(this),n.queue&&w.dequeue(this,n.queue)},n},w.fn.extend({fadeTo:function(t,e,i,n){return this.filter(ft).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=w.isEmptyObject(t),a=w.speed(e,i,n),o=function(){var e=me(this,w.extend({},t),a);(s||st.get(this,"finish"))&&e.stop(!0)};return o.finish=o,s||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,s=null!=t&&t+"queueHooks",a=w.timers,o=st.get(this);if(s)o[s]&&o[s].stop&&n(o[s]);else for(s in o)o[s]&&o[s].stop&&ue.test(s)&&n(o[s]);for(s=a.length;s--;)a[s].elem!==this||null!=t&&a[s].queue!==t||(a[s].anim.stop(i),e=!1,a.splice(s,1));!e&&i||w.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=st.get(this),n=i[t+"queue"],s=i[t+"queueHooks"],a=w.timers,o=n?n.length:0;for(i.finish=!0,w.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=a.length;e--;)a[e].elem===this&&a[e].queue===t&&(a[e].anim.stop(!0),a.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),w.each(["toggle","show","hide"],(function(t,e){var i=w.fn[e];w.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(ge(e,!0),t,n,s)}})),w.each({slideDown:ge("show"),slideUp:ge("hide"),slideToggle:ge("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){w.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),w.timers=[],w.fx.tick=function(){var t,e=0,i=w.timers;for(le=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||w.fx.stop(),le=void 0},w.fx.timer=function(t){w.timers.push(t),w.fx.start()},w.fx.interval=13,w.fx.start=function(){he||(he=!0,de())},w.fx.stop=function(){he=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(e,i){return e=w.fx&&w.fx.speeds[e]||e,i=i||"fx",this.queue(i,(function(i,n){var s=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(s)}}))},function(){var t=m.createElement("input"),e=m.createElement("select").appendChild(m.createElement("option"));t.type="checkbox",p.checkOn=""!==t.value,p.optSelected=e.selected,(t=m.createElement("input")).value="t",t.type="radio",p.radioValue="t"===t.value}();var ve,be=w.expr.attrHandle;w.fn.extend({attr:function(t,e){return J(this,w.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){w.removeAttr(this,t)}))}}),w.extend({attr:function(t,e,i){var n,s,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===t.getAttribute?w.prop(t,e,i):(1===a&&w.isXMLDoc(t)||(s=w.attrHooks[e.toLowerCase()]||(w.expr.match.bool.test(e)?ve:void 0)),void 0!==i?null===i?void w.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:null==(n=w.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!p.radioValue&&"radio"===e&&T(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,s=e&&e.match(z);if(s&&1===t.nodeType)for(;i=s[n++];)t.removeAttribute(i)}}),ve={set:function(t,e,i){return!1===e?w.removeAttr(t,i):t.setAttribute(i,i),i}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(t,e){var i=be[e]||w.find.attr;be[e]=function(t,e,n){var s,a,o=e.toLowerCase();return n||(a=be[o],be[o]=s,s=null!=i(t,e,n)?o:null,be[o]=a),s}}));var ye=/^(?:input|select|textarea|button)$/i,Se=/^(?:a|area)$/i;function xe(t){return(t.match(z)||[]).join(" ")}function we(t){return t.getAttribute&&t.getAttribute("class")||""}function Ce(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(z)||[]}w.fn.extend({prop:function(t,e){return J(this,w.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[w.propFix[t]||t]}))}}),w.extend({prop:function(t,e,i){var n,s,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&w.isXMLDoc(t)||(e=w.propFix[e]||e,s=w.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=w.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||Se.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(w.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(t){var e,i,n,s,a,o;return g(t)?this.each((function(e){w(this).addClass(t.call(this,e,we(this)))})):(e=Ce(t)).length?this.each((function(){if(n=we(this),i=1===this.nodeType&&" "+xe(n)+" "){for(a=0;a<e.length;a++)s=e[a],i.indexOf(" "+s+" ")<0&&(i+=s+" ");o=xe(i),n!==o&&this.setAttribute("class",o)}})):this},removeClass:function(t){var e,i,n,s,a,o;return g(t)?this.each((function(e){w(this).removeClass(t.call(this,e,we(this)))})):arguments.length?(e=Ce(t)).length?this.each((function(){if(n=we(this),i=1===this.nodeType&&" "+xe(n)+" "){for(a=0;a<e.length;a++)for(s=e[a];i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");o=xe(i),n!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(t,e){var i,n,s,a,o=typeof t,r="string"===o||Array.isArray(t);return g(t)?this.each((function(i){w(this).toggleClass(t.call(this,i,we(this),e),e)})):"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):(i=Ce(t),this.each((function(){if(r)for(a=w(this),s=0;s<i.length;s++)n=i[s],a.hasClass(n)?a.removeClass(n):a.addClass(n);else void 0!==t&&"boolean"!==o||((n=we(this))&&st.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":st.get(this,"__className__")||""))})))},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+xe(we(i))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;w.fn.extend({val:function(t){var e,i,n,s=this[0];return arguments.length?(n=g(t),this.each((function(i){var s;1===this.nodeType&&(null==(s=n?t.call(this,i,w(this).val()):t)?s="":"number"==typeof s?s+="":Array.isArray(s)&&(s=w.map(s,(function(t){return null==t?"":t+""}))),(e=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))}))):s?(e=w.valHooks[s.type]||w.valHooks[s.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(s,"value"))?i:"string"==typeof(i=s.value)?i.replace(Te,""):null==i?"":i:void 0}}),w.extend({valHooks:{option:{get:function(t){var e=w.find.attr(t,"value");return null!=e?e:xe(w.text(t))}},select:{get:function(t){var e,i,n,s=t.options,a=t.selectedIndex,o="select-one"===t.type,r=o?null:[],l=o?a+1:s.length;for(n=a<0?l:o?a:0;n<l;n++)if(((i=s[n]).selected||n===a)&&!i.disabled&&(!i.parentNode.disabled||!T(i.parentNode,"optgroup"))){if(e=w(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,n,s=t.options,a=w.makeArray(e),o=s.length;o--;)((n=s[o]).selected=w.inArray(w.valHooks.option.get(n),a)>-1)&&(i=!0);return i||(t.selectedIndex=-1),a}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=w.inArray(w(t).val(),e)>-1}},p.checkOn||(w.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var De=t.location,ke={guid:Date.now()},$e=/\?/;w.parseXML=function(e){var i,n;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(s){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||w.error("Invalid XML: "+(n?w.map(n.childNodes,(function(t){return t.textContent})).join("\n"):e)),i};var Oe=/^(?:focusinfocus|focusoutblur)$/,Pe=function(t){t.stopPropagation()};w.extend(w.event,{trigger:function(e,i,n,s){var a,o,r,l,h,u,d,p,v=[n||m],b=c.call(e,"type")?e.type:e,y=c.call(e,"namespace")?e.namespace.split("."):[];if(o=p=r=n=n||m,3!==n.nodeType&&8!==n.nodeType&&!Oe.test(b+w.event.triggered)&&(b.indexOf(".")>-1&&(y=b.split("."),b=y.shift(),y.sort()),h=b.indexOf(":")<0&&"on"+b,(e=e[w.expando]?e:new w.Event(b,"object"==typeof e&&e)).isTrigger=s?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:w.makeArray(i,[e]),d=w.event.special[b]||{},s||!d.trigger||!1!==d.trigger.apply(n,i))){if(!s&&!d.noBubble&&!f(n)){for(l=d.delegateType||b,Oe.test(l+b)||(o=o.parentNode);o;o=o.parentNode)v.push(o),r=o;r===(n.ownerDocument||m)&&v.push(r.defaultView||r.parentWindow||t)}for(a=0;(o=v[a++])&&!e.isPropagationStopped();)p=o,e.type=a>1?l:d.bindType||b,(u=(st.get(o,"events")||Object.create(null))[e.type]&&st.get(o,"handle"))&&u.apply(o,i),(u=h&&o[h])&&u.apply&&it(o)&&(e.result=u.apply(o,i),!1===e.result&&e.preventDefault());return e.type=b,s||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),i)||!it(n)||h&&g(n[b])&&!f(n)&&((r=n[h])&&(n[h]=null),w.event.triggered=b,e.isPropagationStopped()&&p.addEventListener(b,Pe),n[b](),e.isPropagationStopped()&&p.removeEventListener(b,Pe),w.event.triggered=void 0,r&&(n[h]=r)),e.result}},simulate:function(t,e,i){var n=w.extend(new w.Event,i,{type:t,isSimulated:!0});w.event.trigger(n,null,e)}}),w.fn.extend({trigger:function(t,e){return this.each((function(){w.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var i=this[0];if(i)return w.event.trigger(t,e,i,!0)}});var Le=/\[\]$/,Ie=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;function Ge(t,e,i,n){var s;if(Array.isArray(e))w.each(e,(function(e,s){i||Le.test(t)?n(t,s):Ge(t+"["+("object"==typeof s&&null!=s?e:"")+"]",s,i,n)}));else if(i||"object"!==y(e))n(t,e);else for(s in e)Ge(t+"["+s+"]",e[s],i,n)}w.param=function(t,e){var i,n=[],s=function(t,e){var i=g(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!w.isPlainObject(t))w.each(t,(function(){s(this.name,this.value)}));else for(i in t)Ge(i,t[i],e,s);return n.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=w.prop(this,"elements");return t?w.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!w(this).is(":disabled")&&Ee.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!wt.test(t))})).map((function(t,e){var i=w(this).val();return null==i?null:Array.isArray(i)?w.map(i,(function(t){return{name:e.name,value:t.replace(Ie,"\r\n")}})):{name:e.name,value:i.replace(Ie,"\r\n")}})).get()}});var Ue=/%20/g,Fe=/#.*$/,Me=/([?&])_=[^&]*/,_e=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ne=/^(?:GET|HEAD)$/,Re=/^\/\//,je={},Be={},He="*/".concat("*"),ze=m.createElement("a");function Ve(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,a=e.toLowerCase().match(z)||[];if(g(i))for(;n=a[s++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function qe(t,e,i,n){var s={},a=t===Be;function o(r){var l;return s[r]=!0,w.each(t[r]||[],(function(t,r){var h=r(e,i,n);return"string"!=typeof h||a||s[h]?a?!(l=h):void 0:(e.dataTypes.unshift(h),o(h),!1)})),l}return o(e.dataTypes[0])||!s["*"]&&o("*")}function We(t,e){var i,n,s=w.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((s[i]?t:n||(n={}))[i]=e[i]);return n&&w.extend(!0,t,n),t}ze.href=De.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:De.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(De.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?We(We(t,w.ajaxSettings),e):We(w.ajaxSettings,t)},ajaxPrefilter:Ve(je),ajaxTransport:Ve(Be),ajax:function(e,i){"object"==typeof e&&(i=e,e=void 0),i=i||{};var n,s,a,o,r,l,h,c,u,d,p=w.ajaxSetup({},i),g=p.context||p,f=p.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),b=w.Callbacks("once memory"),y=p.statusCode||{},S={},x={},C="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(h){if(!o)for(o={};e=_e.exec(a);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return h?a:null},setRequestHeader:function(t,e){return null==h&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,S[t]=e),this},overrideMimeType:function(t){return null==h&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)T.always(t[T.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||C;return n&&n.abort(e),D(0,e),this}};if(v.promise(T),p.url=((e||p.url||De.href)+"").replace(Re,De.protocol+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(z)||[""],null==p.crossDomain){l=m.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=ze.protocol+"//"+ze.host!=l.protocol+"//"+l.host}catch(k){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=w.param(p.data,p.traditional)),qe(je,p,i,T),h)return T;for(u in(c=w.event&&p.global)&&0==w.active++&&w.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ne.test(p.type),s=p.url.replace(Fe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ue,"+")):(d=p.url.slice(s.length),p.data&&(p.processData||"string"==typeof p.data)&&(s+=($e.test(s)?"&":"?")+p.data,delete p.data),!1===p.cache&&(s=s.replace(Me,"$1"),d=($e.test(s)?"&":"?")+"_="+ke.guid+++d),p.url=s+d),p.ifModified&&(w.lastModified[s]&&T.setRequestHeader("If-Modified-Since",w.lastModified[s]),w.etag[s]&&T.setRequestHeader("If-None-Match",w.etag[s])),(p.data&&p.hasContent&&!1!==p.contentType||i.contentType)&&T.setRequestHeader("Content-Type",p.contentType),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+He+"; q=0.01":""):p.accepts["*"]),p.headers)T.setRequestHeader(u,p.headers[u]);if(p.beforeSend&&(!1===p.beforeSend.call(g,T,p)||h))return T.abort();if(C="abort",b.add(p.complete),T.done(p.success),T.fail(p.error),n=qe(Be,p,i,T)){if(T.readyState=1,c&&f.trigger("ajaxSend",[T,p]),h)return T;p.async&&p.timeout>0&&(r=t.setTimeout((function(){T.abort("timeout")}),p.timeout));try{h=!1,n.send(S,D)}catch(k){if(h)throw k;D(-1,k)}}else D(-1,"No Transport");function D(e,i,o,l){var u,d,m,S,x,C=i;h||(h=!0,r&&t.clearTimeout(r),n=void 0,a=l||"",T.readyState=e>0?4:0,u=e>=200&&e<300||304===e,o&&(S=function(t,e,i){for(var n,s,a,o,r=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(s in r)if(r[s]&&r[s].test(n)){l.unshift(s);break}if(l[0]in i)a=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){a=s;break}o||(o=s)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),i[a]}(p,T,o)),!u&&w.inArray("script",p.dataTypes)>-1&&w.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),S=function(t,e,i,n){var s,a,o,r,l,h={},c=t.dataTypes.slice();if(c[1])for(o in t.converters)h[o.toLowerCase()]=t.converters[o];for(a=c.shift();a;)if(t.responseFields[a]&&(i[t.responseFields[a]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=a,a=c.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(o=h[l+" "+a]||h["* "+a]))for(s in h)if((r=s.split(" "))[1]===a&&(o=h[l+" "+r[0]]||h["* "+r[0]])){!0===o?o=h[s]:!0!==h[s]&&(a=r[0],c.unshift(r[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(k){return{state:"parsererror",error:o?k:"No conversion from "+l+" to "+a}}}return{state:"success",data:e}}(p,S,T,u),u?(p.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(w.lastModified[s]=x),(x=T.getResponseHeader("etag"))&&(w.etag[s]=x)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=S.state,d=S.data,u=!(m=S.error))):(m=C,!e&&C||(C="error",e<0&&(e=0))),T.status=e,T.statusText=(i||C)+"",u?v.resolveWith(g,[d,C,T]):v.rejectWith(g,[T,C,m]),T.statusCode(y),y=void 0,c&&f.trigger(u?"ajaxSuccess":"ajaxError",[T,p,u?d:m]),b.fireWith(g,[T,C]),c&&(f.trigger("ajaxComplete",[T,p]),--w.active||w.event.trigger("ajaxStop")))}return T},getJSON:function(t,e,i){return w.get(t,e,i,"json")},getScript:function(t,e){return w.get(t,void 0,e,"script")}}),w.each(["get","post"],(function(t,e){w[e]=function(t,i,n,s){return g(i)&&(s=s||n,n=i,i=void 0),w.ajax(w.extend({url:t,type:e,dataType:s,data:i,success:n},w.isPlainObject(t)&&t))}})),w.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),w._evalUrl=function(t,e,i){return w.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){w.globalEval(t,e,i)}})},w.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=w(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){w(this).wrapInner(t.call(this,e))})):this.each((function(){var e=w(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(i){w(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(t){return!w.expr.pseudos.visible(t)},w.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Ye={0:200,1223:204},Ke=w.ajaxSettings.xhr();p.cors=!!Ke&&"withCredentials"in Ke,p.ajax=Ke=!!Ke,w.ajaxTransport((function(e){var i,n;if(p.cors||Ke&&!e.crossDomain)return{send:function(s,a){var o,r=e.xhr();if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)r[o]=e.xhrFields[o];for(o in e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest"),s)r.setRequestHeader(o,s[o]);i=function(t){return function(){i&&(i=n=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===t?r.abort():"error"===t?"number"!=typeof r.status?a(0,"error"):a(r.status,r.statusText):a(Ye[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=i(),n=r.onerror=r.ontimeout=i("error"),void 0!==r.onabort?r.onabort=n:r.onreadystatechange=function(){4===r.readyState&&t.setTimeout((function(){i&&n()}))},i=i("abort");try{r.send(e.hasContent&&e.data||null)}catch(l){if(i)throw l}},abort:function(){i&&i()}}})),w.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return w.globalEval(t),t}}}),w.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),w.ajaxTransport("script",(function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,s){e=w("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&s("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){i&&i()}}}));var Xe,Je=[],Ze=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||w.expando+"_"+ke.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,i,n){var s,a,o,r=!1!==e.jsonp&&(Ze.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ze.test(e.data)&&"data");if(r||"jsonp"===e.dataTypes[0])return s=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(Ze,"$1"+s):!1!==e.jsonp&&(e.url+=($e.test(e.url)?"&":"?")+e.jsonp+"="+s),e.converters["script json"]=function(){return o||w.error(s+" was not called"),o[0]},e.dataTypes[0]="json",a=t[s],t[s]=function(){o=arguments},n.always((function(){void 0===a?w(t).removeProp(s):t[s]=a,e[s]&&(e.jsonpCallback=i.jsonpCallback,Je.push(s)),o&&g(a)&&a(o[0]),o=a=void 0})),"script"})),p.createHTMLDocument=((Xe=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Xe.childNodes.length),w.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(p.createHTMLDocument?((n=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(n)):e=m),a=!i&&[],(s=M.exec(t))?[e.createElement(s[1])]:(s=Pt([t],e,a),a&&a.length&&w(a).remove(),w.merge([],s.childNodes)));var n,s,a},w.fn.load=function(t,e,i){var n,s,a,o=this,r=t.indexOf(" ");return r>-1&&(n=xe(t.slice(r)),t=t.slice(0,r)),g(e)?(i=e,e=void 0):e&&"object"==typeof e&&(s="POST"),o.length>0&&w.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done((function(t){a=arguments,o.html(n?w("<div>").append(w.parseHTML(t)).find(n):t)})).always(i&&function(t,e){o.each((function(){i.apply(this,a||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,i){var n,s,a,o,r,l,h=w.css(t,"position"),c=w(t),u={};"static"===h&&(t.style.position="relative"),r=c.offset(),a=w.css(t,"top"),l=w.css(t,"left"),("absolute"===h||"fixed"===h)&&(a+l).indexOf("auto")>-1?(o=(n=c.position()).top,s=n.left):(o=parseFloat(a)||0,s=parseFloat(l)||0),g(e)&&(e=e.call(t,i,w.extend({},r))),null!=e.top&&(u.top=e.top-r.top+o),null!=e.left&&(u.left=e.left-r.left+s),"using"in e?e.using.call(t,u):c.css(u)}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],s={top:0,left:0};if("fixed"===w.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===w.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((s=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),s.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-s.top-w.css(n,"marginTop",!0),left:e.left-s.left-w.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||dt}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;w.fn[t]=function(n){return J(this,(function(t,n,s){var a;if(f(t)?a=t:9===t.nodeType&&(a=t.defaultView),void 0===s)return a?a[e]:t[n];a?a.scrollTo(i?a.pageXOffset:s,i?s:a.pageYOffset):t[n]=s}),t,n,arguments.length)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Xt(p.pixelPosition,(function(t,i){if(i)return i=Kt(t,e),zt.test(i)?w(t).position()[e]+"px":i}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){w.fn[n]=function(s,a){var o=arguments.length&&(i||"boolean"!=typeof s),r=i||(!0===s||!0===a?"margin":"border");return J(this,(function(e,i,s){var a;return f(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+t],a["scroll"+t],e.body["offset"+t],a["offset"+t],a["client"+t])):void 0===s?w.css(e,i,r):w.style(e,i,s,r)}),e,o?s:void 0,o)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){w.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}));var Qe=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(t,e){var i,n,a;if("string"==typeof e&&(i=t[e],e=t,t=i),g(t))return n=s.call(arguments,2),a=function(){return t.apply(e||this,n.concat(s.call(arguments)))},a.guid=t.guid=t.guid||w.guid++,a},w.holdReady=function(t){t?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=T,w.isFunction=g,w.isWindow=f,w.camelCase=et,w.type=y,w.now=Date.now,w.isNumeric=function(t){var e=w.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},w.trim=function(t){return null==t?"":(t+"").replace(Qe,"$1")};var ti=t.jQuery,ei=t.$;return w.noConflict=function(e){return t.$===w&&(t.$=ei),e&&t.jQuery===w&&(t.jQuery=ti),w},void 0===e&&(t.jQuery=t.$=w),w},jquery.exports=global2.document?factory(global2,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return factory(t)};var $$1=jquery.exports;class Point$1{constructor(t,e){this.x=t||0,this.y=e||0}}class Style{constructor(t){this.element=t,this.width=0,this.height=0}static DefineColor(t,e,i){return t=Math.min(255,Math.max(0,t)),e=Math.min(255,Math.max(0,e)),i=Math.min(255,Math.max(0,i)),"#"+t.toString(16).padStart(2,"0")+e.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")}static CalcImageSize(t,e,i,n){const s=T3Gv.docUtil?T3Gv.docUtil.svgDoc:null,a=Style.GetCachedImageSize(t);if(a)return s&&s.ImageLoadAddRef(),void setTimeout((()=>{e(a.width,a.height,null,i),s&&s.ImageLoadDecRef()}),0);void 0===n&&(n="SVG"===t.slice(-3).toUpperCase()),Style.imageSizeRequest=Style.imageSizeRequest||{};const o=t.toUpperCase();Style.imageSizeRequest[o]?Style.imageSizeRequest[o].push({callback:e,data:i}):(Style.imageSizeRequest[o]=[{callback:e,data:i}],n?Style.GetSVGDimensions(t):Style.GetBitmapDimensions(t,e,i))}static CacheImageSize(t,e,i){Style.imageSizeCache=Style.imageSizeCache||{},Style.imageSizeCache[t.toUpperCase()]={width:e,height:i}}static GetCachedImageSize(t){return Style.imageSizeCache&&Style.imageSizeCache[t.toUpperCase()]||null}static ProcessImageSizeRequest(t,e,i,n){if(Style.imageSizeRequest){const s=t.toUpperCase(),a=Style.imageSizeRequest[s];if(a){delete Style.imageSizeRequest[s];for(let t=0;t<a.length;t++){const s=a[t];s&&s.callback&&s.callback(e,i,n,s.data)}}}}static GetBitmapDimensions(t,e,i){const n=new Image,s=T3Gv.docUtil?T3Gv.docUtil.svgDoc:null;s&&s.ImageLoadAddRef(),n.onload=function(){this.width&&this.height?(Style.CacheImageSize(t,this.width,this.height),Style.ProcessImageSizeRequest(t,this.width,this.height,null),e&&e(this.width,this.height,null,i)):(s&&s.ImageLoadDecRef(),Style.GetSVGDimensions(t,e,i)),s&&s.ImageLoadDecRef()},n.onerror=function(n){Style.ProcessImageSizeRequest(t,0,0,{success:!1}),e&&e(0,0,{success:!1},i),s&&s.ImageLoadDecRef()},n.src=t}static GetSVGDimensions(t,e,i){const n=T3Gv.docUtil?T3Gv.docUtil.svgDoc:null;n&&n.ImageLoadAddRef(),$$1.ajax({type:"GET",url:t,async:!0,contentType:"image/svg",dataType:"text",success:function(s){const a=Style.ExtractSVGSize(s);Style.CacheImageSize(t,a.width,a.height),Style.ProcessImageSizeRequest(t,a.width,a.height,null),e&&e(a.width,a.height,null,i),n&&n.ImageLoadDecRef()},error:function(s){Style.ProcessImageSizeRequest(t,0,0,{success:!1}),e&&e(0,0,{success:!1},i),n&&n.ImageLoadDecRef()}})}static ExtractSVGSize(t){const e={width:100,height:100},i=t.match(/<svg([\s\S]*?)>/i);if(!i||!i[1])return e;const n=i[1];let s=0,a=0;function o(t,e){let i=0;if(!e||!t)return t;switch(e){case"in":i=100*t;break;case"mm":i=100*t/25.4;break;case"cm":i=100*t/2.54;break;case"pt":i=100*t/72;break;case"pc":i=100*t/6;break;default:i=t}return i}const r=n.match(/width=["'](\d*\.?\d+)(\w*)["']/i);r&&r[1]&&(s=o(parseFloat(r[1]),r[2]));const l=n.match(/height=["'](\d*\.?\d+)(\w*)["']/i);if(l&&l[1]&&(a=o(parseFloat(l[1]),l[2])),!s||!a){const t=n.match(/viewbox=["'](\d*\.?\d+)\s+(\d*\.?\d+)\s+(\d*\.?\d+)\s+(\d*\.?\d+)["']/i);t&&t[3]&&t[4]&&(s=parseFloat(t[3]),a=parseFloat(t[4]))}return s&&a?{width:s,height:a}:e}}class StateConstant{}StateConstant.StateOperationType={CREATE:1,UPDATE:2,DELETE:3},StateConstant.StoredObjectType={BaseDrawObject:"BaseDrawObject",TextObject:"TextObject",NotesObject:"NotesObject",SDDataObject:"SDData",TEDataObject:"TEData",SelectedListObject:"SelectedList",LinkListObject:"Links",LayersManagerObject:"LayersManager",HNativeObject:"hNative",HNativeWinObject:"hNativeWindows",BlobBytesObject:"BlobBytes",STDataObject:"STData",ExpandedViewObject:"ExpandedView",CommentBlock:"CommentBlock",CommentThread:"CommentThread",CommentList:"CommentList"};class DataObj{constructor(t,e,i,n,s,a){if(this.Delete=()=>{T3Gv.stdObj.DeleteObject(this.ID)},this.ID=t===parseInt(t,10)&&t>=0?t:-1,this.Dirty=n||!1,this.Type=e||null,this.Data=i||null,this.IsPersisted=!1!==s,this.stateOptTypeId=null,this.Data&&Utils1.IsObject(this.Data)&&(this.Data.BlockID=t),void 0===a||!1===a||null===a)return this;if(void 0!==T3Gv.stdObj&&!0===this.IsPersisted)if(-1!==this.ID){const t=T3Gv.stdObj.GetObject(this.ID);if(void 0!==t)return null==t?null:(t.Type=e?this.Type:t.Type,t.Data=i?this.Data:t.Data,t.Dirty=n?this.Dirty:t.Dirty,t.stateOptTypeId=StateConstant.StateOperationType.UPDATE,t.IsPersisted=this.IsPersisted,t.Delete=this.Delete,T3Gv.stdObj.SaveObject(t),t)}else this.stateOptTypeId=StateConstant.StateOperationType.CREATE,T3Gv.stdObj.SaveObject(this)}}class SegmentData{constructor(){this.angle=0,this.origSeg={start:{x:0,y:0},end:{x:0,y:0}},this.clipSeg={start:{x:0,y:0},end:{x:0,y:0}},this.extSeg={startRay:{x:0,y:0},startExt:{x:0,y:0},start:{x:0,y:0},end:{x:0,y:0},endExt:{x:0,y:0},endRay:{x:0,y:0}}}}class Utils1{static Alert(t,e,i){let n="Error: ";t&&(n=t),e&&(n+=e),Dialog.create({title:"Alert",message:n,ok:{label:"OK",color:"primary",handler:()=>{"function"==typeof i&&i()}},persistent:!0})}static IsObject(t){return null!==t&&"object"==typeof t}static CloneBlock(t){const e=Utils1.GetObjectInstance;if(null===t||"object"!=typeof t)throw new Error("Parameter is not an object");const i=e(t),n=Utils1.DeepCopy({...i,...t});return null!==t.Data&&t.Data instanceof Object&&(n.Data=Utils1.DeepCopy(t.Data)),n}static GetObjectInstance(t){if(null===t||"object"!=typeof t)throw new Error("Parameter is not an object");let e;if(t.constructor===DataObj)e=new DataObj(null,null,null,!1,!1,!0);else if(t instanceof Array)e=[];else{e=void 0;for(const[n,s]of Object.entries(StateConstant.StoredObjectType))try{if(t.Type===s){e=new t.constructor({});break}}catch(i){throw i}}return e}static GenerateObjectID(){return T3Gv.currentObjSeqId+=1,T3Gv.currentObjSeqId}static PatchArrayBufferSlice(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(t,e){const i=new Uint8Array(this);void 0===e&&(e=i.length);const n=e-t,s=new ArrayBuffer(n),a=new Uint8Array(s);for(let o=0;o<n;o++)a[o]=i[o+t];return s})}static IsStateOpen(){return T3Gv.state.currentStateId>0&&T3Gv.state.states[T3Gv.state.currentStateId].IsOpen}static DeepCopy(t){if(null==t)return null;const e=typeof t;if(t instanceof Array){const e=[],i=t.length;for(let n=0;n<i;n++)e.push(Utils1.DeepCopy(t[n]));return e}if("string"===e||"number"===e||"boolean"===e||"function"===e)return t;if(t instanceof Blob){return t.slice()}if(t instanceof Uint8Array)return t;if("object"===e){const e=new t.constructor;for(const i in t){const n=t[i],s=typeof n;if(null==n)e[i]=n;else if("string"===s||"number"===s||"boolean"===s)e[i]=n;else if(n instanceof Array){null==e[i]&&(e[i]=[]);const t=n.length;for(let s=0;s<t;s++)e[i].push(Utils1.DeepCopy(n[s]))}else"function"!==s&&(e[i]=Utils1.DeepCopy(n))}return e}return null}static GenerateUUID(){let t=(new Date).getTime(),e=performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(i){let n=16*Math.random();return t>0?(n=(t+n)%16|0,t=Math.floor(t/16)):(n=(e+n)%16|0,e=Math.floor(e/16)),("x"===i?n:3&n|8).toString(16)}))}static CalcAngleFromPoints(t,e){let i,n=e.x-t.x,s=e.y-t.y;return 0===s?i=n>=0?0:180:0===n?i=s>0?90:270:(i=Math.atan(s/n)*(180/Math.PI),n<0?i+=180:s<0&&(i+=360)),i}static RoundCoord(t){const e=Math.round(1e3*Number(t))/1e3;return isNaN(e)?t:e}static RoundCoordExt(t){const e=Math.round(100*Number(t))/100;return isNaN(e)?t:e}static RoundCoordLP(t){const e=Math.round(10*Number(t))/10;return isNaN(e)?t:e}static ResolveHyperlink(t){return null}static ResolveHyperlinkForDisplay(t){let e=t||"";if(e.indexOf("\r")>=0){const t=e.split("\r");e=t[0]}else 0===e.indexOf("/#")&&(e=e.slice(2));return e}static CopyObj(t){return t?JSON.parse(JSON.stringify(t)):null}static ToTitleCase(t){return t.replace(/([^\W_]+[^\s-]*) */g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))}static StrEscapeRegExp(t){return t.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1")}static StrReplaceAll(t,e,i){return i.replace(new RegExp(this.StrEscapeRegExp(t),"g"),e)}static CloneToDoc(t,e){const i=document.createElementNS(t.namespaceURI,t.nodeName);for(let n=0,s=t.attributes.length;n<s;++n){const s=t.attributes[n],a=s.nodeName;if(a.length){const t=a[0]>="A"&&a[0]<="Z"?a.toLowerCase():a;e?""!==s.nodeValue&&"xmlns"!==t&&i.setAttribute(t,s.nodeValue):""!==s.nodeValue&&i.setAttribute(t,s.nodeValue)}}for(let n=0,s=t.childNodes.length;n<s;++n){const s=t.childNodes[n];1===s.nodeType?i.insertBefore(this.CloneToDoc(s,e),null):i.insertBefore(document.createTextNode(s.nodeValue),null)}return i}static CalcSegmentAngle(t,e){const i=e.x-t.x,n=e.y-t.y;let s;if(0===n)s=i>=0?0:180;else if(0===i)s=n>0?90:270;else{const t=n/i;s=180*Math.atan(t)/Math.PI,i<0?s+=180:n<0&&(s+=360)}return s}static RotatePoint(t,e,i){var n,s,a,o;const r=Math.PI*-i/180;let l=Math.sin(r),h=Math.cos(r);Math.abs(l)<1e-4&&(l=0),Math.abs(h)<1e-4&&(h=0);const c=e.x-(null!=(n=null==t?void 0:t.x)?n:0),u=e.y-(null!=(s=null==t?void 0:t.y)?s:0);return{x:c*h+u*l+(null!=(a=null==t?void 0:t.x)?a:0),y:-c*l+u*h+(null!=(o=null==t?void 0:t.y)?o:0)}}static OffsetPointAtAngle(t,e,i){const n=Utils1.DeepCopy(t);if(0!==i){n.x+=i;return this.RotatePoint(t,n,e)}return n}static CalcExtendedOffsetSegment(t,e,i,n){const s=this.CalcSegmentAngle(t.origSeg.start,t.origSeg.end),a=s-90;t.extSeg.start=this.OffsetPointAtAngle(t.origSeg.start,a,e),t.extSeg.end=this.OffsetPointAtAngle(t.origSeg.end,a,e),t.extSeg.startExt=this.OffsetPointAtAngle(t.extSeg.start,s,-e*i),t.extSeg.startRay=this.OffsetPointAtAngle(t.extSeg.start,s,-n),t.extSeg.endExt=this.OffsetPointAtAngle(t.extSeg.end,s,e*i),t.extSeg.endRay=this.OffsetPointAtAngle(t.extSeg.end,s,n),t.extSeg.start=this.OffsetPointAtAngle(t.extSeg.start,s,-1),t.extSeg.end=this.OffsetPointAtAngle(t.extSeg.end,s,1),t.angle=s}static CalcSegmentIntersect(t,e,i,n,s){const a=(n.y-i.y)*(e.x-t.x)-(n.x-i.x)*(e.y-t.y),o=((n.x-i.x)*(t.y-i.y)-(n.y-i.y)*(t.x-i.x))/a,r=((e.x-t.x)*(t.y-i.y)-(e.y-t.y)*(t.x-i.x))/a;if(0===a){if(0===o&&0===r){let n,a,o,r;if(t.x<=e.x?(n=t.x,a=e.x):(n=e.x,a=t.x),t.y<=e.y?(o=t.y,r=e.y):(o=e.y,r=t.y),i.x>=n&&i.x<=a&&i.y>=o&&i.y<=r)return s.x=(i.x+e.x)/2,s.y=(i.y+e.y)/2,!0}return!1}return!(o<0||o>1||r<0||r>1)&&(s.x=t.x+o*(e.x-t.x),s.y=t.y+o*(e.y-t.y),!0)}static GetSegmentCenterPoint(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}static CompareAngle(t,e){let i;return i=t===e?0:t>e?t<e+180?1:-1:t<e-180?1:-1,i}static DeltaAngle(t,e){let i=t-e;return i>180?i-=360:i<-180&&(i+=360),i}static DeltaPoints(t,e){const i=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y);return i>n?i:n}static GetSegmentsDeltaAngle(t,e,i,n){let s=0,a=i;for(;a!==n;)a--,a<0&&(a=e-1),s+=this.DeltaAngle(t[i].angle,t[a].angle),i=a;return s}static AreSegmentsObtuse(t,e,i,n){return this.GetSegmentsDeltaAngle(t,e,i,n)>0}static AreSegmentsAjacent(t,e,i){i<0&&(i=t-1);return i===e-1}static InsertSegment(t,e,i,n,s,a,o){const r=new SegmentData;r.extSeg.start=i,r.extSeg.end=n,r.clipSeg.start=i,r.clipSeg.end=n,r.angle=this.CalcSegmentAngle(i,n),r.extSeg.startExt=this.OffsetPointAtAngle(i,r.angle,-s*a),r.extSeg.startRay=this.OffsetPointAtAngle(i,r.angle,-o),r.extSeg.endExt=this.OffsetPointAtAngle(n,r.angle,s*a),r.extSeg.endRay=this.OffsetPointAtAngle(n,r.angle,o),t.splice(e,0,r)}static SegmentsInAlignment(t,e,i,n){const s=-t[n].angle,a=t[n].extSeg.start,o=this.RotatePoint(a,t[n].extSeg.end,s),r=this.RotatePoint(a,t[i].extSeg.start,s),l=this.RotatePoint(a,t[i].extSeg.end,s);return r.x>o.x&&l.x>o.x&&r.x<=l.x}static IsEmptySeg(t){return t.start.x===t.end.x&&t.start.y===t.end.y}static IsStart(t,e){return 0===t&&!e}static IsEnd(t,e,i){return t===e-1&&!i}static TrimTrailing(t){return t.replace(/\s+$/g,"")}static TrimLeading(t){return t.replace(/^\s+/g,"")}static CleanGraphics(){}static MakeGuid(){return"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa".replace(/a/g,(function(){return Math.floor(16*Math.random()).toString(16)}))}}class Utils2{static HasFlag(t,e){return"number"==typeof t&&"number"==typeof e&&(t&e)===e}static AddFlag(t,e){return"number"!=typeof t||"number"!=typeof e?t:t|e}static RemoveFlag(t,e){return"number"!=typeof t||"number"!=typeof e?t:t&~e}static SetFlag(t,e,i){let n=t;return i?n|=e:t&e&&(n&=~e),n}static CopyRect(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height}static pointInRect(t,e){return e.x>=t.x&&e.x<t.x+t.width&&e.y>=t.y&&e.y<t.y+t.height}static EqualPt(t,e){return this.IsEqual(t.x,e.x)&&this.IsEqual(t.y,e.y)}static TrimDP(t,e){const i=t.toFixed(e);return parseFloat(i)}static Pt2CPoint(t,e){const i={};return e?(i.h=t.y,i.v=t.x):(i.h=t.x,i.v=t.y),i}static Rect2CRect(t,e){const i={h:0,v:0,hdist:0,vdist:0};return e?(i.h=t.y,i.v=t.x,i.hdist=t.height,i.vdist=t.width):(i.h=t.x,i.hdist=t.width,i.v=t.y,i.vdist=t.height),i}static CRect2Rect(t,e){const i={x:0,y:0,width:0,height:0};return e?(i.x=t.v,i.y=t.h,i.width=t.vdist,i.height=t.hdist):(i.x=t.h,i.y=t.v,i.width=t.hdist,i.height=t.vdist),i}static Pt2Rect(t,e){const i={x:0,y:0,width:0,height:0};if(null==t||null==e)return null;i.x=t.x,i.y=t.y,e.x<i.x&&(i.x=e.x),e.y<i.y&&(i.y=e.y),i.width=t.x-i.x;const n=e.x-i.x;n>i.width&&(i.width=n),i.height=t.y-i.y;const s=e.y-i.y;return s>i.height&&(i.height=s),i}static Add2Rect(t,e){t.x-=e.left,t.width+=e.right+e.left,t.y-=e.top,t.height+=e.bottom+e.top}static SubRect(t,e){t.x+=e.left,t.width-=e.right+e.left,t.y+=e.top,t.height-=e.bottom+e.top}static GetPolyRect(t,e){const i=e.length;if(i){t.x=e[0].x,t.y=e[0].y;let n=t.x,s=t.y;t.width=0,t.height=0;for(let a=1;a<i;a++)e[a].x<t.x&&(t.x=e[a].x),e[a].x>n&&(n=e[a].x),e[a].y<t.y&&(t.y=e[a].y),e[a].y>s&&(s=e[a].y);t.width=n-t.x,t.height=s-t.y}}static GetPolyRectExt(t,e,i,n){t.x=0,t.y=0,t.width=0,t.height=0;const s=e.length;if(0!==s){void 0===i&&(i=0),void 0===n&&(n=s),t.x=e[i].x,t.y=e[i].y;for(let s=1+i;s<n;s++){let i;e[s].x<t.x?(i=t.x-e[s].x,t.x=e[s].x,t.width+=i):e[s].x>t.x+t.width&&(i=e[s].x-(t.x+t.width),t.width+=i),e[s].y<t.y?(i=t.y-e[s].y,t.y=e[s].y,t.height+=i):e[s].y>t.y+t.height&&(i=e[s].y-(t.y+t.height),t.height+=i)}}}static IsRectEmpty(t){return t.width<=0||t.height<=0}static InflateRect(t,e,i){t.x-=e,t.width+=2*e,t.y-=i,t.height+=2*i}static OffsetRect(t,e,i){t.x+=e,t.y+=i}static EqualRect(t,e,i=.001){return!(Math.abs(t.x-e.x)>i||Math.abs(t.y-e.y)>i||Math.abs(t.width-e.width)>i||Math.abs(t.height-e.height)>i)}static InflatePoint(t,e){const i=e/2,n={x:0,y:0,width:0,height:0};return n.x=t.x-i,n.width=2*i,n.y=t.y-i,n.height=2*i,n}static Sqrt(t){return t<1e-9?0:Math.sqrt(t)}static UnionRect(t,e,i){const n={x:0,y:0,width:0,height:0};n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y);const s=t.x+t.width,a=e.x+e.width;n.width=Math.max(s,a)-n.x;const o=t.y+t.height,r=e.y+e.height;return n.height=Math.max(o,r)-n.y,i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height,i}static IntersectRect(t,e){let i,n;t.y<=e.y?(i=t,n=e):(i=e,n=t);const s=i.x+i.width,a=n.x+n.width,o=i.y+i.height,r=n.y+n.height;if(n.y>=i.y&&n.y-o<-.01)if(i.x>=n.x){if(i.x-a<-.01)return{x:i.x,width:Math.min(s,a)-i.x,y:n.y,height:Math.min(o,r)-n.y}}else if(n.x-s<-.01)return{x:n.x,width:Math.min(s,a)-n.x,y:n.y,height:Math.min(o,r)-n.y};return null}static RectInsideRect(t,e){const i=t.x+t.width,n=e.x+e.width,s=t.y+t.height,a=e.y+e.height;return e.x>=t.x&&n<=i&&e.y>=t.y&&a<=s}static CNUnionRect(t,e,i){const n={h:0,v:0,hdist:0,vdist:0};n.h=Math.min(t.h,e.h),n.v=Math.min(t.v,e.v);const s=t.h+t.hdist,a=e.h+e.hdist;n.hdist=Math.max(s,a)-n.h;const o=t.v+t.vdist,r=e.v+e.vdist;return n.vdist=Math.max(o,r)-n.v,i.h=n.h,i.v=n.v,i.hdist=n.hdist,i.vdist=n.vdist,i}static SetRect(t,e,i,n){const s={x:0,y:0,width:0,height:0};return s.x=t,s.width=i-t,s.y=e,s.height=n-e,s}static PolyFromRect(t){const e=[];return e.push(new Point$1(t.x,t.y)),e.push(new Point$1(t.x+t.width,t.y)),e.push(new Point$1(t.x+t.width,t.y+t.height)),e.push(new Point$1(t.x,t.y+t.height)),e.push(new Point$1(t.x,t.y)),e}static GetRectFromDiagonal(t,e){let i,n,s;return this.IsEqual(t.height,0)?(n=e,s=0):this.IsEqual(t.width,0)?(n=0,s=e):(i=t.height/t.width,n=this.Sqrt(e*e/(1+i*i)),s=i*n),{width:n,height:s}}static IsPointInPoly(t,e){let i=!1;const n=t.length;for(let s=0,a=n-1;s<n;a=s++)(t[s].y<=e.y&&e.y<t[a].y||t[a].y<=e.y&&e.y<t[s].y)&&e.x<(t[a].x-t[s].x)*(e.y-t[s].y)/(t[a].y-t[s].y)+t[s].x&&(i=!i);return i}static IsFrameCornersInPoly(t,e){const i={x:0,y:0};return i.x=e.x,i.y=e.y,!!Utils2.IsPointInPoly(t,i)||(i.x+=e.width,!!Utils2.IsPointInPoly(t,i)||(i.y+=e.height,!!Utils2.IsPointInPoly(t,i)||(i.x-=e.width,Utils2.IsPointInPoly(t,i))))}static IsAllFrameCornersInPoly(t,e){const i={x:0,y:0};return i.x=e.x,i.y=e.y,!!Utils2.IsPointInPoly(t,i)&&(i.x+=e.width,!!Utils2.IsPointInPoly(t,i)&&(i.y+=e.height,!!Utils2.IsPointInPoly(t,i)&&(i.x-=e.width,Utils2.IsPointInPoly(t,i))))}static IsAllPolyPointsInPoly(t,e){const i=e.length;for(let n=0;n<i;n++)if(!Utils2.IsPointInPoly(t,e[n]))return!1;return!0}static StringtoCSV(t){const e=t.split('"'),i=e.length;if(i<2)return t;let n="";for(let s=0;s<i-1;s++)n=n+e[s]+'""';return n+=e[i-1],n}static IsEqual(t,e,i){const n=void 0!==i?i:.5;return Math.abs(t-e)<n}static SpliceArray(t,e,i,n){let s=[];const a=t.length;if(e>=a)s=t.concat(n);else{const o=t.slice(0,e),r=t.slice(e+i,a);s=o.concat(n).concat(r)}return s}static EqualDate(t,e){return t.year===e.year?t.month===e.month?t.day===e.day?0:t.day<e.day?-1:1:t.month<e.month?-1:1:t.year<e.year?-1:1}static ArrayToString(t){let e="";const i=t.length;for(let n=0;n<i;n++)e+=t[n];return e}static BrowserDetect(){}static PolyYCurve(t,e,i,n,s,a,o,r,l,h){let c,u,d,p,g,f,m,v={x:0,y:0};c=(e.bottom-e.top)/2,u=e.right-e.left,d=(2*c-a-o)/(i-1);for(let b=0;b<i;++b){p=d*b+a,n&&p<n&&(p=n),g=c-p,s&&g-s<-c&&(g=-(c-s)),v.y=e.top+(c-g),f=c?g/c:0,m=this.Sqrt(1-f*f)*u,v.x=r?e.right-m:e.left+m;const i=Utils1.DeepCopy(v);l&&(i.x/=l),h&&(i.y/=h),t.push(i)}return t}static ArrayBufferToBase64(t){let e="";const i=new Uint8Array(t),n=i.byteLength;for(let s=0;s<n;s++)e+=String.fromCharCode(i[s]);return window.btoa(e)}static UInt8ToString(t){const e=[];for(let i=0;i<t.length;i+=32768)e.push(String.fromCharCode.apply(null,t.subarray(i,i+32768)));return e.join("")}static RegExpEscape(t){const e=["$","*","^","?","+"];let i="";for(let n=0;n<t.length;n++)e.includes(t[n])?i+="\\"+t[n]:i+=t[n];return i}static StopPropagationAndDefaults(t){t.preventDefault(),t.stopPropagation(),t.gesture&&(t.gesture.preventDefault(),t.gesture.stopPropagation())}static UTF8ToB64(t){let e;try{e=window.btoa(unescape(encodeURIComponent(t)))}catch(i){throw e="",i}return e}static B64ToUTF8(t){let e;try{e=decodeURIComponent(escape(window.atob(t)))}catch(i){throw e="",i}return e}static ArrayBufferToString(t){const e=new Uint8Array(t),i=e.length;let n="";for(let s=0;s<i;s+=65535){const t=Math.min(65535,i-s);n+=String.fromCharCode.apply(null,e.subarray(s,s+t))}return n}static ParseSVGDimensions(t){const e=Utils2.UInt8ToString(t);return Style.ExtractSVGSize(e)}static ObjectDiff(t,e,i,n,s){if(t===e)return{changed:"equal",value:t};const a={};let o=!0;for(const r in t)if(void 0!==t[r])if(r in e)if(t[r]===e[r])i||(a[r]={changed:"equal",value:t[r]});else{const l=typeof t[r],h=typeof e[r];if(!t[r]||!e[r]||"object"!==l&&"function"!==l||"object"!==h&&"function"!==h){if(n&&i&&!isNaN(t[r])&&!isNaN(e[r])&&Math.round(t[r])===Math.round(e[r]))continue;o=!1,a[r]={changed:"primitive change",removed:t[r],added:e[r]}}else{const l=Utils2.ObjectDiff(t[r],e[r],i,n,s);"equal"===l.changed?i||(a[r]={changed:"equal",value:t[r]}):(o=!1,a[r]=l)}}else o=!1,a[r]={changed:"removed",value:t[r]};if(!i||!s)for(const r in e)void 0===e[r]||r in t||(o=!1,a[r]={changed:"added",value:e[r]});return o?{changed:"equal",value:t}:{changed:"object change",value:a}}static FlipDate(t){let e,i=0,n=0,s=null,a="";for(n=t.length,i=0;i<n;i++)if(isNaN(parseInt(t[i]))){s=t[i];break}if(!s)return null;const o=t.split(s);if(o.length<2)return null;e=o.splice(1,1),o.unshift(e[0]);for(let r=0;r<o.length;r++)a.length>0&&(a+=s),a+=o[r];return a}static QualifyURL(t){return t&&t.length>0&&"/#"!==t.substring(0,2)&&-1===t.indexOf("http://")&&-1===t.indexOf("https://")&&(t="http://"+t),t}static GetDistanceBetween2Points(t,e){const i=e.x-t.x,n=e.y-t.y;return this.Sqrt(i*i+n*n)}static IsRectangular(t){let e,i,n,s;e=t.length;for(let a=0;a<e-1;a++){if(n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(t[a],t[a+1]),a>0&&(s=n-i,s<0&&(s+=2*Math.PI),s>Math.PI&&(s-=Math.PI),!(s>=Math.PI/2-.052&&s<=Math.PI/2+.052)))return!1;i=n}return!0}static GetPathExtension(t){if(null==t)return null;const e=t.length;if(e>4){const i=t.lastIndexOf(".");if(i>=0){let n=t.slice(i,e);const s=n.indexOf("?");return s>=0&&(n=n.slice(0,s)),n.toLowerCase()}}return null}static RemoveExtension(t){if(null==t)return null;const e=t.lastIndexOf(".");return-1===e?t:t.slice(0,e)}static HtmlEncode(t){return $$1("<div>").text(t).html()}static IsRectangleFullyEnclosed(t,e){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}}const Instance={Basic:null,Shape:null};function initializeInstance(t,e){Instance.Basic=t,Instance.Shape=e}class RightClickMd{constructor(){this.targetId=-1,this.segment=-1,this.hitPoint={x:0,y:0},this.locked=!1,this.context=0}}class T3Constant{}T3Constant.CursorDisplayMode={None:0,Show:1,Hide:2},T3Constant.DocContext={CurrentTextAlignment:"center",SpacebarDown:!1,CanTypeInWorkArea:!0,CurrentWidth:"0",CurrentHeight:"0"},T3Constant.ClipboardType={None:0,Text:1,LM:2,Image:4},T3Constant.GradientStyle={GradMiddle:1,GradHoriz:4,GradVert:2,GradTlbr:8,GradTrbl:16,GradRev:32,GradShape:64,GradRadial:128},T3Constant.DataSource={FFI_SYNC:1,REALTIME:2,HISTORICAL:3,MANUAL:4},T3Constant.CreatedBy={FFI_SYNC_SERVICE:1,FRONTEND:2,BACKEND:3,API:4};class MouseUtil{static IsRightClick(t){LogUtil.Debug("= u.MouseUtil: IsRightClick - Input:",t);let e=!1;return t.gesture&&(t=t.gesture.srcEvent),t instanceof MouseEvent?e=3===t.which||t.ctrlKey&&t.metaKey:"onpointerdown"in window&&t instanceof PointerEvent&&(e=3===t.which),LogUtil.Debug("= u.MouseUtil: IsRightClick - Output:",e),e}}class DSConstant{}var TransformationType,TransformationType2;DSConstant.LinkFlags={DeleteTarget:1,DeleteLink:2,Change:4,Break:8,Move:16,WasMoved:32},DSConstant.Contexts={None:-1,All:0,Text:1,Table:2,Automation:3,DimensionText:4,FloorPlan:5,Note:6,Navigation:7,AutomationNoCtrl:8,ReadOnly:9},DSConstant.PolyListFlags={FreeHand:1,OneStep:2,NoMiddleControlPoints:4,TimelineControlPoint:8,NoControl:16,WasExplict:32,HasMoveTo:64,HasPolyPoly:128},DSConstant.PolySegFlags={Select:1,Hide:2,Temp:4,TempSave:8,VA:16,NVA:32,NoLine:64,NoFill:128},function(t,e){var i=function t(e,i){return new t.Instance(e,i||{})},n=!1,s={},a=i.DIRECTION_DOWN="down",o=i.DIRECTION_LEFT="left",r=i.DIRECTION_UP="up",l=i.DIRECTION_RIGHT="right",h=i.POINTER_MOUSE="mouse",c=i.POINTER_TOUCH="touch",u=i.POINTER_PEN="pen",d=i.EVENT_START="start",p=i.EVENT_MOVE="move",g=i.EVENT_END="end",f=i.EVENT_RELEASE="release",m=i.EVENT_TOUCH="touch";i.defaults={behavior:{userSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},i.DOCUMENT=document,i.CALCULATE_INTERVAL=25,i.READY=!1,i.gestures=i.gestures||{},i.classType="Hammer";var v,b,y=i.utils={classType:"Utils",extend:function(t,i,n){for(var s in i)i.hasOwnProperty(s)&&(t[s]===e||n)&&(t[s]=i[s]);return t},on:function(t,e,i){t.addEventListener(e,i,!1)},off:function(t,e,i){t.removeEventListener(e,i,!1)},each:function(t,i,n){var s,a;if("forEach"in t)t.forEach(i,n);else if(t.length!==e){for(s=0,a=t.length;s<a;s++)if(!1===i.call(n,t[s],s,t))return}else for(s in t)if(t.hasOwnProperty(s)&&!1===i.call(n,t[s],s,t))return},inStr:function(t,e){return t.indexOf(e)>-1},inArray:function(t,e){if(t.indexOf){var i=t.indexOf(e);return-1!==i&&i}for(var n=0,s=t.length;n<s;n++)if(t[n]===e)return n;return!1},inGestureArray:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i].gesture==e.gesture)return i;return!1},toArray:function(t){return Array.prototype.slice.call(t,0)},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){var e=[],i=[],n=[],s=[],a=Math.min,o=Math.max;return 1===t.length?{pageX:t[0].pageX,pageY:t[0].pageY,clientX:t[0].clientX,clientY:t[0].clientY}:(this.each(t,(function(t){e.push(t.pageX),i.push(t.pageY),n.push(t.clientX),s.push(t.clientY)})),{pageX:(a.apply(Math,e)+o.apply(Math,e))/2,pageY:(a.apply(Math,i)+o.apply(Math,i))/2,clientX:(a.apply(Math,n)+o.apply(Math,n))/2,clientY:(a.apply(Math,s)+o.apply(Math,s))/2})},getVelocity:function(t,e,i){return{x:Math.abs(e/t)||0,y:Math.abs(i/t)||0}},getAngle:function(t,e){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(t,e){return Math.abs(t.clientX-e.clientX)>=Math.abs(t.clientY-e.clientY)?t.clientX-e.clientX>0?o:l:t.clientY-e.clientY>0?r:a},getDistance:function(t,e){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(i*i+n*n)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==r||t==a},setPrefixedCss:function(t,i,n,s){var a=[""];i=this.toCamelCase(i);for(var o=0;o<a.length;o++){var r=i;if(a[o]&&(r=a[o]+i.charAt(0).toUpperCase()+i.slice(1)),r in t.style){t.style[r]=(s===e||s)&&n||"";break}}},toggleBehavior:function(t,e,i){if(e&&t&&t.style){this.each(e,(function(e,n){this.setPrefixedCss(t,n,e,i)}),this);var n=i&&function(t){var e=t.target||t.srcElement;return!(e&&"textarea"==e.localName)};"none"==e.userSelect&&(t.onselectstart=n),"none"==e.userDrag&&(t.ondragstart=n)}},toCamelCase:function(t){return t.replace(/[_-]([a-z])/g,(function(t){return t[1].toUpperCase()}))},inWksBar:function(t){if(!window.docUtil)return!1;var e=document.getElementById("svg-area"),i=e[0];if(t.currentTarget==i){var n=e.css("overflow-x"),s=e.css("overflow-y");if("scroll"===n){var a=t.clientY-e.offset().top;if(t.currentTarget.clientHeight-a<=0)return!0}if("scroll"===s){var o=t.clientX-e.offset().left;if(t.currentTarget.clientWidth-o<=0)return!0}}return!1}},S=i.event={classType:"Event",started:!1,shouldDetect:!1,on:function(t,e,i,n){var s=e.split(" ");y.each(s,(function(e){y.on(t,e,i),n&&n(e)}))},off:function(t,e,i,n){var s=e.split(" ");y.each(s,(function(e){y.off(t,e,i),n&&n(e)}))},onTouch:function(t,e,i){var n=this,a=function(s){var a;window.docUtil&&e==d&&y.inWksBar(s)||(e==d&&(n.shouldDetect=!0),e!=g&&n.shouldDetect&&x.updatePointer(e,s),n.shouldDetect&&(a=n.doDetect.call(n,s,e,t,i,0)),a==g&&(n.shouldDetect=!1,x.reset()),e==g&&x.updatePointer(e,s))};return this.on(t,s[e],a),a},doDetect:function(t,e,i,n,s){var a=this.getTouchList(t,e),o=a.length,r=e,l=a.trigger,h=o;e===d?l=m:e===g&&(l=f,h=a.length-(t.changedTouches?t.changedTouches.length:1)),h>0&&this.started&&(r=p),this.started=!0;var c=this.collectEventData(i,r,a,t);return e!==g&&n.call(w,c),l&&(c.changedLength=h,c.eventType=l,n.call(w,c),c.eventType=r,delete c.changedLength),r===g&&(n.call(w,c),this.started=!1),r},determineEventTypes:function(){var t=["pointerdown","pointermove","pointerup pointercancel lostpointercapture"];return s[d]=t[0],s[p]=t[1],s[g]=t[2],s},getTouchList:function(t,e){return x.getTouchList()},collectEventData:function(t,e,i,n){var s=c;return y.inStr(n.type,"mouse")||x.matchType(h,n)?s=h:x.matchType(u,n)&&(s=u),{center:y.getCenter(i),timeStamp:Date.now(),target:n.target,touches:i,eventType:e,pointerType:s,srcEvent:n,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return w.stopDetect()}}}},x=i.PointerEvent={classType:"PointerEvent",pointers:{},getTouchList:function(){var t=[];return y.each(this.pointers,(function(e){t.push(e)})),t},updatePointer:function(t,e){t==g?delete this.pointers[e.pointerId]:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e)},matchType:function(t,e){if(!e.pointerType)return!1;var i=e.pointerType,n={};return n[h]=i===h,n[c]=i===c,n[u]=i===u,n[t]},reset:function(){this.pointers={}}},w=i.detection={classType:"Detection",gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:y.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);var e=this.current.inst,i=e.options;return y.each(this.gestures,(function(n){!this.stopped&&e.enabled&&i[n.name]&&n.handler.call(n,t,e)}),this),this.current&&(this.current.lastEvent=t),t.eventType==g&&this.stopDetect(),t}},stopDetect:function(){this.previous=y.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,n,s,a){var o=this.current,r=!1,l=o.lastCalcEvent,h=o.lastCalcData;l&&t.timeStamp-l.timeStamp>i.CALCULATE_INTERVAL&&(e=l.center,n=t.timeStamp-l.timeStamp,s=t.center.clientX-l.center.clientX,a=t.center.clientY-l.center.clientY,r=!0),t.eventType!=m&&t.eventType!=f&&(o.futureCalcEvent=t),o.lastCalcEvent&&!r||(h.velocity=y.getVelocity(n,s,a),h.angle=y.getAngle(e,t.center),h.direction=y.getDirection(e,t.center),o.lastCalcEvent=o.futureCalcEvent||t,o.futureCalcEvent=t),t.velocityX=h.velocity.x,t.velocityY=h.velocity.y,t.interimAngle=h.angle,t.interimDirection=h.direction},extendEventData:function(t){var e=this.current,i=e.startEvent,n=e.lastEvent||i;t.eventType!=m&&t.eventType!=f&&(i.touches=[],y.each(t.touches,(function(t){i.touches.push({clientX:t.clientX,clientY:t.clientY})})));var s=t.timeStamp-i.timeStamp,a=t.center.clientX-i.center.clientX,o=t.center.clientY-i.center.clientY;return this.getCalculatedData(t,n.center,s,a,o),y.extend(t,{startEvent:i,deltaTime:s,deltaX:a,deltaY:o,distance:y.getDistance(i.center,t.center),angle:y.getAngle(i.center,t.center),direction:y.getDirection(i.center,t.center),scale:y.getScale(i.touches,t.touches),rotation:y.getRotation(i.touches,t.touches)}),t},register:function(t){var n=t.defaults||{};return n[t.name]===e&&(n[t.name]=!0),y.extend(i.defaults,n,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort((function(t,e){return t.index<e.index?-1:t.index>e.index?1:0})),this.gestures}};(i.Instance=function(t,e){var n=this;i.READY||(S.determineEventTypes(),y.each(i.gestures,(function(t){w.register(t)})),S.onTouch(i.DOCUMENT,p,w.detect),S.onTouch(i.DOCUMENT,g,w.detect),i.READY=!0),this.element=t,this.enabled=!0,y.each(e,(function(t,i){delete e[i],e[y.toCamelCase(i)]=t})),this.options=y.extend(y.extend({},i.defaults),e||{}),this.options.behavior&&y.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=S.onTouch(t,d,(function(t){n.enabled&&t.eventType==d?w.startDetect(n,t):t.eventType==m&&w.detect(t)})),this.eventHandlers=[]}).prototype={classType:"Hammer.Instance",on:function(t,e){var i,n=this,s=n.eventHandlers.length,a=null;for(i=0;i<s;++i)n.eventHandlers[i].gesture===t&&(a=n.eventHandlers[i].handler);return a&&this.off(t,a),S.on(n.element,t,e,(function(t){n.eventHandlers.push({gesture:t,handler:e})})),n},off:function(t,e){var i=this,n=t.split(" ");return y.each(n,(function(t){var e,n=i.eventHandlers.length,s=null;for(e=0;e<n;++e)if(i.eventHandlers[e].gesture===t){s=i.eventHandlers[e].handler;break}s&&S.off(i.element,t,s,(function(t){var e=y.inGestureArray(i.eventHandlers,{gesture:t});!1!==e&&i.eventHandlers.splice(e,1)}))})),i},trigger:function(t,e){e=e||{};var n=i.DOCUMENT.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e;var s=this.element;return y.hasParent(e.target,s)&&(s=e.target),s.dispatchEvent(n),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(y.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)y.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],S.off(this.element,s[d],this.eventStartHandler),null}},i.gestures.Drag={name:"drag",index:50,handler:function(t,e){var i=w.current;if(e.options.dragMaxTouches>0&&t.touches.length>e.options.dragMaxTouches)n=!1;else switch(t.eventType){case d:n||(e.trigger("dragstart",t),n=!0),e.trigger("drag",t),t.srcEvent.stopPropagation(),t.srcEvent.preventDefault();break;case p:if(t.srcEvent.stopPropagation(),t.srcEvent.preventDefault(),t.distance<e.options.dragMinDistance&&"drag"!=i.name)return void t.srcEvent.preventDefault();var s=i.startEvent.center;if("drag"!=i.name&&(i.name="drag",e.options.dragDistanceCorrection&&t.distance>0)){var a=Math.abs(e.options.dragMinDistance/t.distance);s.pageX+=t.deltaX*a,s.pageY+=t.deltaY*a,s.clientX+=t.deltaX*a,s.clientY+=t.deltaY*a,t=w.extendEventData(t)}e.trigger("drag",t);break;case f:n&&t.changedLength<=e.options.dragMaxTouches&&(e.trigger("dragend",t),n=!1)}},defaults:{dragMinDistance:1,dragDistanceCorrection:!0,dragMaxTouches:1}},v="hold",i.gestures.Hold={name:v,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:function(t,e){var i=e.options,n=w.current;switch(t.eventType){case d:clearTimeout(b),n.name=v,b=setTimeout((function(){!n||n.name!==v&&"drag"!==n.name||e.trigger(v,t)}),i.holdTimeout);break;case p:t.distance>i.holdThreshold&&clearTimeout(b);break;case f:clearTimeout(b)}}},function(t){var e=!1;i.gestures.Tap={name:t,index:100,handler:function(i,n){var s,a,o=n.options,r=w.current,l=w.previous;switch(i.eventType){case d:e=!1;break;case p:e=e||i.distance>o.tapMaxDistance;break;case g:!y.inStr(i.srcEvent.type,"cancel")&&i.deltaTime<o.tapMaxTime&&!e&&(s=l&&l.lastEvent&&i.timeStamp-l.lastEvent.timeStamp,a=!1,l&&l.name==t&&s&&s<o.doubleTapInterval&&i.distance<o.doubleTapDistance&&(n.trigger("doubletap",i),a=!0),a&&!o.tapAlways||(r.name=t,n.trigger(r.name,i)))}},defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!1,doubleTapDistance:20,doubleTapInterval:300}}}("tap"),function(t){var e=!1;i.gestures.Transform={name:t,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:function(i,n){switch(i.eventType){case d:e=!1;break;case p:if(i.touches.length<2)return;var s=Math.abs(1-i.scale),a=Math.abs(i.rotation);if(s<n.options.transformMinScale&&a<n.options.transformMinRotation)return;w.current.name=t,e||(n.trigger("transformstart",i),e=!0),n.trigger(t,i),a>n.options.transformMinRotation&&n.trigger("rotate",i),s>n.options.transformMinScale&&(n.trigger("pinch",i),n.trigger("pinch"+(i.scale<1?"in":"out"),i));break;case g:e&&i.changedLength<2&&(n.trigger("transformend",i),e=!1)}}}}("transform"),t.Hammer=i}(window),TransformationType2=TransformationType||(TransformationType={}),TransformationType2[TransformationType2.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",TransformationType2[TransformationType2.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",TransformationType2[TransformationType2.CLASS_TO_CLASS=2]="CLASS_TO_CLASS";var MetadataStorage=function(){function t(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return t.prototype.addTypeMetadata=function(t){this._typeMetadatas.has(t.target)||this._typeMetadatas.set(t.target,new Map),this._typeMetadatas.get(t.target).set(t.propertyName,t)},t.prototype.addTransformMetadata=function(t){this._transformMetadatas.has(t.target)||this._transformMetadatas.set(t.target,new Map),this._transformMetadatas.get(t.target).has(t.propertyName)||this._transformMetadatas.get(t.target).set(t.propertyName,[]),this._transformMetadatas.get(t.target).get(t.propertyName).push(t)},t.prototype.addExposeMetadata=function(t){this._exposeMetadatas.has(t.target)||this._exposeMetadatas.set(t.target,new Map),this._exposeMetadatas.get(t.target).set(t.propertyName,t)},t.prototype.addExcludeMetadata=function(t){this._excludeMetadatas.has(t.target)||this._excludeMetadatas.set(t.target,new Map),this._excludeMetadatas.get(t.target).set(t.propertyName,t)},t.prototype.findTransformMetadatas=function(t,e,i){return this.findMetadatas(this._transformMetadatas,t,e).filter((function(t){return!t.options||(!0===t.options.toClassOnly&&!0===t.options.toPlainOnly||(!0===t.options.toClassOnly?i===TransformationType.CLASS_TO_CLASS||i===TransformationType.PLAIN_TO_CLASS:!0!==t.options.toPlainOnly||i===TransformationType.CLASS_TO_PLAIN))}))},t.prototype.findExcludeMetadata=function(t,e){return this.findMetadata(this._excludeMetadatas,t,e)},t.prototype.findExposeMetadata=function(t,e){return this.findMetadata(this._exposeMetadatas,t,e)},t.prototype.findExposeMetadataByCustomName=function(t,e){return this.getExposedMetadatas(t).find((function(t){return t.options&&t.options.name===e}))},t.prototype.findTypeMetadata=function(t,e){return this.findMetadata(this._typeMetadatas,t,e)},t.prototype.getStrategy=function(t){var e=this._excludeMetadatas.get(t),i=e&&e.get(void 0),n=this._exposeMetadatas.get(t),s=n&&n.get(void 0);return i&&s||!i&&!s?"none":i?"excludeAll":"exposeAll"},t.prototype.getExposedMetadatas=function(t){return this.getMetadata(this._exposeMetadatas,t)},t.prototype.getExcludedMetadatas=function(t){return this.getMetadata(this._excludeMetadatas,t)},t.prototype.getExposedProperties=function(t,e){return this.getExposedMetadatas(t).filter((function(t){return!t.options||(!0===t.options.toClassOnly&&!0===t.options.toPlainOnly||(!0===t.options.toClassOnly?e===TransformationType.CLASS_TO_CLASS||e===TransformationType.PLAIN_TO_CLASS:!0!==t.options.toPlainOnly||e===TransformationType.CLASS_TO_PLAIN))})).map((function(t){return t.propertyName}))},t.prototype.getExcludedProperties=function(t,e){return this.getExcludedMetadatas(t).filter((function(t){return!t.options||(!0===t.options.toClassOnly&&!0===t.options.toPlainOnly||(!0===t.options.toClassOnly?e===TransformationType.CLASS_TO_CLASS||e===TransformationType.PLAIN_TO_CLASS:!0!==t.options.toPlainOnly||e===TransformationType.CLASS_TO_PLAIN))})).map((function(t){return t.propertyName}))},t.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},t.prototype.getMetadata=function(t,e){var i,n=t.get(e);n&&(i=Array.from(n.values()).filter((function(t){return void 0!==t.propertyName})));for(var s=[],a=0,o=this.getAncestors(e);a<o.length;a++){var r=o[a],l=t.get(r);if(l){var h=Array.from(l.values()).filter((function(t){return void 0!==t.propertyName}));s.push.apply(s,h)}}return s.concat(i||[])},t.prototype.findMetadata=function(t,e,i){var n=t.get(e);if(n){var s=n.get(i);if(s)return s}for(var a=0,o=this.getAncestors(e);a<o.length;a++){var r=o[a],l=t.get(r);if(l){var h=l.get(i);if(h)return h}}},t.prototype.findMetadatas=function(t,e,i){var n,s=t.get(e);s&&(n=s.get(i));for(var a=[],o=0,r=this.getAncestors(e);o<r.length;o++){var l=r[o],h=t.get(l);h&&h.has(i)&&a.push.apply(a,h.get(i))}return a.slice().reverse().concat((n||[]).slice().reverse())},t.prototype.getAncestors=function(t){if(!t)return[];if(!this._ancestorsMap.has(t)){for(var e=[],i=Object.getPrototypeOf(t.prototype.constructor);void 0!==i.prototype;i=Object.getPrototypeOf(i.prototype.constructor))e.push(i);this._ancestorsMap.set(t,e)}return this._ancestorsMap.get(t)},t}(),defaultMetadataStorage=new MetadataStorage;function getGlobal(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}function isPromise(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}var __spreadArray=globalThis&&globalThis.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,s=0,a=e.length;s<a;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))};function instantiateArrayType(t){var e=new t;return e instanceof Set||"push"in e?e:[]}var TransformOperationExecutor=function(){function t(t,e){this.transformationType=t,this.options=e,this.recursionStack=new Set}return t.prototype.transform=function(t,e,i,n,s,a){var o=this;if(void 0===a&&(a=0),Array.isArray(e)||e instanceof Set){var r=n&&this.transformationType===TransformationType.PLAIN_TO_CLASS?instantiateArrayType(n):[];return e.forEach((function(e,n){var s=t?t[n]:void 0;if(o.options.enableCircularCheck&&o.isCircular(e))o.transformationType===TransformationType.CLASS_TO_CLASS&&(r instanceof Set?r.add(e):r.push(e));else{var l=void 0;if("function"!=typeof i&&i&&i.options&&i.options.discriminator&&i.options.discriminator.property&&i.options.discriminator.subTypes){if(o.transformationType===TransformationType.PLAIN_TO_CLASS){l=i.options.discriminator.subTypes.find((function(t){return t.name===e[i.options.discriminator.property]}));var h={newObject:r,object:e,property:void 0},c=i.typeFunction(h);l=void 0===l?c:l.value,i.options.keepDiscriminatorProperty||delete e[i.options.discriminator.property]}o.transformationType===TransformationType.CLASS_TO_CLASS&&(l=e.constructor),o.transformationType===TransformationType.CLASS_TO_PLAIN&&(e[i.options.discriminator.property]=i.options.discriminator.subTypes.find((function(t){return t.value===e.constructor})).name)}else l=i;var u=o.transform(s,e,l,void 0,e instanceof Map,a+1);r instanceof Set?r.add(u):r.push(u)}})),r}if(i!==String||s){if(i!==Number||s){if(i!==Boolean||s){if((i===Date||e instanceof Date)&&!s)return e instanceof Date?new Date(e.valueOf()):null==e?e:new Date(e);if(getGlobal().Buffer&&(i===Buffer||e instanceof Buffer)&&!s)return null==e?e:Buffer.from(e);if(isPromise(e)&&!s)return new Promise((function(t,n){e.then((function(e){return t(o.transform(void 0,e,i,void 0,void 0,a+1))}),n)}));if(s||null===e||"object"!=typeof e||"function"!=typeof e.then){if("object"==typeof e&&null!==e){i||e.constructor===Object||(Array.isArray(e)||e.constructor!==Array)&&(i=e.constructor),!i&&t&&(i=t.constructor),this.options.enableCircularCheck&&this.recursionStack.add(e);var l=this.getKeys(i,e,s),h=t||{};t||this.transformationType!==TransformationType.PLAIN_TO_CLASS&&this.transformationType!==TransformationType.CLASS_TO_CLASS||(h=s?new Map:i?new i:{});for(var c=function(n){if("__proto__"===n||"constructor"===n)return"continue";var o=n,r=n,l=n;if(!u.options.ignoreDecorators&&i)if(u.transformationType===TransformationType.PLAIN_TO_CLASS)(c=defaultMetadataStorage.findExposeMetadataByCustomName(i,n))&&(l=c.propertyName,r=c.propertyName);else if(u.transformationType===TransformationType.CLASS_TO_PLAIN||u.transformationType===TransformationType.CLASS_TO_CLASS){var c;(c=defaultMetadataStorage.findExposeMetadata(i,n))&&c.options&&c.options.name&&(r=c.options.name)}var d=void 0;d=u.transformationType===TransformationType.PLAIN_TO_CLASS?e[o]:e instanceof Map?e.get(o):e[o]instanceof Function?e[o]():e[o];var p=void 0,g=d instanceof Map;if(i&&s)p=i;else if(i){var f=defaultMetadataStorage.findTypeMetadata(i,l);if(f){var m={newObject:h,object:e,property:l},v=f.typeFunction?f.typeFunction(m):f.reflectedType;f.options&&f.options.discriminator&&f.options.discriminator.property&&f.options.discriminator.subTypes?e[o]instanceof Array?p=f:(u.transformationType===TransformationType.PLAIN_TO_CLASS&&(p=void 0===(p=f.options.discriminator.subTypes.find((function(t){if(d&&d instanceof Object&&f.options.discriminator.property in d)return t.name===d[f.options.discriminator.property]})))?v:p.value,f.options.keepDiscriminatorProperty||d&&d instanceof Object&&f.options.discriminator.property in d&&delete d[f.options.discriminator.property]),u.transformationType===TransformationType.CLASS_TO_CLASS&&(p=d.constructor),u.transformationType===TransformationType.CLASS_TO_PLAIN&&d&&(d[f.options.discriminator.property]=f.options.discriminator.subTypes.find((function(t){return t.value===d.constructor})).name)):p=v,g=g||f.reflectedType===Map}else if(u.options.targetMaps)u.options.targetMaps.filter((function(t){return t.target===i&&!!t.properties[l]})).forEach((function(t){return p=t.properties[l]}));else if(u.options.enableImplicitConversion&&u.transformationType===TransformationType.PLAIN_TO_CLASS){var b=Reflect.getMetadata("design:type",i.prototype,l);b&&(p=b)}}var y=Array.isArray(e[o])?u.getReflectedType(i,l):void 0,S=t?t[o]:void 0;if(h.constructor.prototype){var x=Object.getOwnPropertyDescriptor(h.constructor.prototype,r);if((u.transformationType===TransformationType.PLAIN_TO_CLASS||u.transformationType===TransformationType.CLASS_TO_CLASS)&&(x&&!x.set||h[r]instanceof Function))return"continue"}if(u.options.enableCircularCheck&&u.isCircular(d)){if(u.transformationType===TransformationType.CLASS_TO_CLASS){C=d;(void 0!==(C=u.applyCustomTransformations(C,i,n,e,u.transformationType))||u.options.exposeUnsetFields)&&(h instanceof Map?h.set(r,C):h[r]=C)}}else{var w=u.transformationType===TransformationType.PLAIN_TO_CLASS?r:n,C=void 0;u.transformationType===TransformationType.CLASS_TO_PLAIN?(C=e[w],C=u.applyCustomTransformations(C,i,w,e,u.transformationType),C=e[w]===C?d:C,C=u.transform(S,C,p,y,g,a+1)):void 0===d&&u.options.exposeDefaultValues?C=h[r]:(C=u.transform(S,d,p,y,g,a+1),C=u.applyCustomTransformations(C,i,w,e,u.transformationType)),(void 0!==C||u.options.exposeUnsetFields)&&(h instanceof Map?h.set(r,C):h[r]=C)}},u=this,d=0,p=l;d<p.length;d++){c(p[d])}return this.options.enableCircularCheck&&this.recursionStack.delete(e),h}return e}return e}return null==e?e:Boolean(e)}return null==e?e:Number(e)}return null==e?e:String(e)},t.prototype.applyCustomTransformations=function(t,e,i,n,s){var a=this,o=defaultMetadataStorage.findTransformMetadatas(e,i,this.transformationType);return void 0!==this.options.version&&(o=o.filter((function(t){return!t.options||a.checkVersion(t.options.since,t.options.until)}))),(o=this.options.groups&&this.options.groups.length?o.filter((function(t){return!t.options||a.checkGroups(t.options.groups)})):o.filter((function(t){return!t.options||!t.options.groups||!t.options.groups.length}))).forEach((function(e){t=e.transformFn({value:t,key:i,obj:n,type:s,options:a.options})})),t},t.prototype.isCircular=function(t){return this.recursionStack.has(t)},t.prototype.getReflectedType=function(t,e){if(t){var i=defaultMetadataStorage.findTypeMetadata(t,e);return i?i.reflectedType:void 0}},t.prototype.getKeys=function(t,e,i){var n=this,s=defaultMetadataStorage.getStrategy(t);"none"===s&&(s=this.options.strategy||"exposeAll");var a=[];if(("exposeAll"===s||i)&&(a=e instanceof Map?Array.from(e.keys()):Object.keys(e)),i)return a;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&t){var o=defaultMetadataStorage.getExposedProperties(t,this.transformationType),r=defaultMetadataStorage.getExcludedProperties(t,this.transformationType);a=__spreadArray(__spreadArray([],o,!0),r,!0)}if(!this.options.ignoreDecorators&&t){o=defaultMetadataStorage.getExposedProperties(t,this.transformationType);this.transformationType===TransformationType.PLAIN_TO_CLASS&&(o=o.map((function(e){var i=defaultMetadataStorage.findExposeMetadata(t,e);return i&&i.options&&i.options.name?i.options.name:e}))),a=this.options.excludeExtraneousValues?o:a.concat(o);var l=defaultMetadataStorage.getExcludedProperties(t,this.transformationType);l.length>0&&(a=a.filter((function(t){return!l.includes(t)}))),void 0!==this.options.version&&(a=a.filter((function(e){var i=defaultMetadataStorage.findExposeMetadata(t,e);return!i||!i.options||n.checkVersion(i.options.since,i.options.until)}))),a=this.options.groups&&this.options.groups.length?a.filter((function(e){var i=defaultMetadataStorage.findExposeMetadata(t,e);return!i||!i.options||n.checkGroups(i.options.groups)})):a.filter((function(e){var i=defaultMetadataStorage.findExposeMetadata(t,e);return!(i&&i.options&&i.options.groups&&i.options.groups.length)}))}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(a=a.filter((function(t){return n.options.excludePrefixes.every((function(e){return t.substr(0,e.length)!==e}))}))),a=a.filter((function(t,e,i){return i.indexOf(t)===e}))},t.prototype.checkVersion=function(t,e){var i=!0;return i&&t&&(i=this.options.version>=t),i&&e&&(i=this.options.version<e),i},t.prototype.checkGroups=function(t){return!t||this.options.groups.some((function(e){return t.includes(e)}))},t}(),defaultOptions={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},__assign=globalThis&&globalThis.__assign||function(){return __assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},__assign.apply(this,arguments)},ClassTransformer=function(){function t(){}return t.prototype.instanceToPlain=function(t,e){return new TransformOperationExecutor(TransformationType.CLASS_TO_PLAIN,__assign(__assign({},defaultOptions),e)).transform(void 0,t,void 0,void 0,void 0,void 0)},t.prototype.classToPlainFromExist=function(t,e,i){return new TransformOperationExecutor(TransformationType.CLASS_TO_PLAIN,__assign(__assign({},defaultOptions),i)).transform(e,t,void 0,void 0,void 0,void 0)},t.prototype.plainToInstance=function(t,e,i){return new TransformOperationExecutor(TransformationType.PLAIN_TO_CLASS,__assign(__assign({},defaultOptions),i)).transform(void 0,e,t,void 0,void 0,void 0)},t.prototype.plainToClassFromExist=function(t,e,i){return new TransformOperationExecutor(TransformationType.PLAIN_TO_CLASS,__assign(__assign({},defaultOptions),i)).transform(t,e,void 0,void 0,void 0,void 0)},t.prototype.instanceToInstance=function(t,e){return new TransformOperationExecutor(TransformationType.CLASS_TO_CLASS,__assign(__assign({},defaultOptions),e)).transform(void 0,t,void 0,void 0,void 0,void 0)},t.prototype.classToClassFromExist=function(t,e,i){return new TransformOperationExecutor(TransformationType.CLASS_TO_CLASS,__assign(__assign({},defaultOptions),i)).transform(e,t,void 0,void 0,void 0,void 0)},t.prototype.serialize=function(t,e){return JSON.stringify(this.instanceToPlain(t,e))},t.prototype.deserialize=function(t,e,i){var n=JSON.parse(e);return this.plainToInstance(t,n,i)},t.prototype.deserializeArray=function(t,e,i){var n=JSON.parse(e);return this.plainToInstance(t,n,i)},t}();function Type(t,e){return void 0===e&&(e={}),function(i,n){var s=Reflect.getMetadata("design:type",i,n);defaultMetadataStorage.addTypeMetadata({target:i.constructor,propertyName:n,reflectedType:s,typeFunction:t,options:e})}}var classTransformer=new ClassTransformer,Reflect$1,Reflect2;function plainToInstance(t,e,i){return classTransformer.plainToInstance(t,e,i)}
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */Reflect2=Reflect$1||(Reflect$1={}),function(t){var e="object"==typeof globalThis?globalThis:"object"==typeof commonjsGlobal?commonjsGlobal:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),i=n(Reflect2);function n(t,e){return function(i,n){Object.defineProperty(t,i,{configurable:!0,writable:!0,value:n}),e&&e(i,n)}}void 0!==e.Reflect&&(i=n(e.Reflect,i)),function(t,e){var i=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,s=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,r={__proto__:[]}instanceof Array,l=!o&&!r,h={create:o?function(){return ut(Object.create(null))}:r?function(){return ut({__proto__:null})}:function(){return ut({})},has:l?function(t,e){return i.call(t,e)}:function(t,e){return e in t},get:l?function(t,e){return i.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),u="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:lt(),d="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:ht(),p="function"==typeof WeakMap?WeakMap:ct(),g=n?Symbol.for("@reflect-metadata:registry"):void 0,f=st(),m=at(f);function v(t,e,i,n){if(M(i)){if(!q(t))throw new TypeError;if(!Y(e))throw new TypeError;return $(t,e)}if(!q(t))throw new TypeError;if(!R(e))throw new TypeError;if(!R(n)&&!M(n)&&!_(n))throw new TypeError;return _(n)&&(n=void 0),O(t,e,i=V(i),n)}function b(t,e){function i(i,n){if(!R(i))throw new TypeError;if(!M(n)&&!K(n))throw new TypeError;E(t,e,i,n)}return i}function y(t,e,i,n){if(!R(i))throw new TypeError;return M(n)||(n=V(n)),E(t,e,i,n)}function S(t,e,i){if(!R(e))throw new TypeError;return M(i)||(i=V(i)),P(t,e,i)}function x(t,e,i){if(!R(e))throw new TypeError;return M(i)||(i=V(i)),L(t,e,i)}function w(t,e,i){if(!R(e))throw new TypeError;return M(i)||(i=V(i)),I(t,e,i)}function C(t,e,i){if(!R(e))throw new TypeError;return M(i)||(i=V(i)),A(t,e,i)}function T(t,e){if(!R(t))throw new TypeError;return M(e)||(e=V(e)),G(t,e)}function D(t,e){if(!R(t))throw new TypeError;return M(e)||(e=V(e)),U(t,e)}function k(t,e,i){if(!R(e))throw new TypeError;if(M(i)||(i=V(i)),!R(e))throw new TypeError;M(i)||(i=V(i));var n=rt(e,i,!1);return!M(n)&&n.OrdinaryDeleteMetadata(t,e,i)}function $(t,e){for(var i=t.length-1;i>=0;--i){var n=(0,t[i])(e);if(!M(n)&&!_(n)){if(!Y(n))throw new TypeError;e=n}}return e}function O(t,e,i,n){for(var s=t.length-1;s>=0;--s){var a=(0,t[s])(e,i,n);if(!M(a)&&!_(a)){if(!R(a))throw new TypeError;n=a}}return n}function P(t,e,i){if(L(t,e,i))return!0;var n=it(e);return!_(n)&&P(t,n,i)}function L(t,e,i){var n=rt(e,i,!1);return!M(n)&&H(n.OrdinaryHasOwnMetadata(t,e,i))}function I(t,e,i){if(L(t,e,i))return A(t,e,i);var n=it(e);return _(n)?void 0:I(t,n,i)}function A(t,e,i){var n=rt(e,i,!1);if(!M(n))return n.OrdinaryGetOwnMetadata(t,e,i)}function E(t,e,i,n){rt(i,n,!0).OrdinaryDefineOwnMetadata(t,e,i,n)}function G(t,e){var i=U(t,e),n=it(t);if(null===n)return i;var s=G(n,e);if(s.length<=0)return i;if(i.length<=0)return s;for(var a=new d,o=[],r=0,l=i;r<l.length;r++){var h=l[r];a.has(h)||(a.add(h),o.push(h))}for(var c=0,u=s;c<u.length;c++)h=u[c],a.has(h)||(a.add(h),o.push(h));return o}function U(t,e){var i=rt(t,e,!1);return i?i.OrdinaryOwnMetadataKeys(t,e):[]}function F(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function M(t){return void 0===t}function _(t){return null===t}function N(t){return"symbol"==typeof t}function R(t){return"object"==typeof t?null!==t:"function"==typeof t}function j(t,e){switch(F(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var i=3===e?"string":5===e?"number":"default",n=J(t,s);if(void 0!==n){var a=n.call(t,i);if(R(a))throw new TypeError;return a}return B(t,"default"===i?"number":i)}function B(t,e){if("string"===e){var i=t.toString;if(W(i)&&!R(s=i.call(t)))return s;if(W(n=t.valueOf)&&!R(s=n.call(t)))return s}else{var n;if(W(n=t.valueOf)&&!R(s=n.call(t)))return s;var s,a=t.toString;if(W(a)&&!R(s=a.call(t)))return s}throw new TypeError}function H(t){return!!t}function z(t){return""+t}function V(t){var e=j(t,3);return N(e)?e:z(e)}function q(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function W(t){return"function"==typeof t}function Y(t){return"function"==typeof t}function K(t){switch(F(t)){case 3:case 4:return!0;default:return!1}}function X(t,e){return t===e||t!=t&&e!=e}function J(t,e){var i=t[e];if(null!=i){if(!W(i))throw new TypeError;return i}}function Z(t){var e=J(t,a);if(!W(e))throw new TypeError;var i=e.call(t);if(!R(i))throw new TypeError;return i}function Q(t){return t.value}function tt(t){var e=t.next();return!e.done&&e}function et(t){var e=t.return;e&&e.call(t)}function it(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var i=t.prototype,n=i&&Object.getPrototypeOf(i);if(null==n||n===Object.prototype)return e;var s=n.constructor;return"function"!=typeof s||s===t?e:s}function nt(){var t,i,n,s;M(g)||void 0===e.Reflect||g in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=ot(e.Reflect));var a=new p,o={registerProvider:r,getProvider:h,setProvider:f};return o;function r(e){if(!Object.isExtensible(o))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case M(i):i=e;break;case i===e:break;case M(n):n=e;break;case n===e:break;default:void 0===s&&(s=new d),s.add(e)}}function l(e,a){if(!M(i)){if(i.isProviderFor(e,a))return i;if(!M(n)){if(n.isProviderFor(e,a))return i;if(!M(s))for(var o=Z(s);;){var r=tt(o);if(!r)return;var l=Q(r);if(l.isProviderFor(e,a))return et(o),l}}}if(!M(t)&&t.isProviderFor(e,a))return t}function h(t,e){var i,n=a.get(t);return M(n)||(i=n.get(e)),M(i)?(M(i=l(t,e))||(M(n)&&(n=new u,a.set(t,n)),n.set(e,i)),i):i}function c(t){if(M(t))throw new TypeError;return i===t||n===t||!M(s)&&s.has(t)}function f(t,e,i){if(!c(i))throw new Error("Metadata provider not registered.");var n=h(t,e);if(n!==i){if(!M(n))return!1;var s=a.get(t);M(s)&&(s=new u,a.set(t,s)),s.set(e,i)}return!0}}function st(){var t;return!M(g)&&R(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[g]),M(t)&&(t=nt()),!M(g)&&R(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,g,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}function at(t){var e=new p,i={isProviderFor:function(t,i){var n=e.get(t);return!M(n)&&n.has(i)},OrdinaryDefineOwnMetadata:o,OrdinaryHasOwnMetadata:s,OrdinaryGetOwnMetadata:a,OrdinaryOwnMetadataKeys:r,OrdinaryDeleteMetadata:l};return f.registerProvider(i),i;function n(n,s,a){var o=e.get(n),r=!1;if(M(o)){if(!a)return;o=new u,e.set(n,o),r=!0}var l=o.get(s);if(M(l)){if(!a)return;if(l=new u,o.set(s,l),!t.setProvider(n,s,i))throw o.delete(s),r&&e.delete(n),new Error("Wrong provider for target.")}return l}function s(t,e,i){var s=n(e,i,!1);return!M(s)&&H(s.has(t))}function a(t,e,i){var s=n(e,i,!1);if(!M(s))return s.get(t)}function o(t,e,i,s){n(i,s,!0).set(t,e)}function r(t,e){var i=[],s=n(t,e,!1);if(M(s))return i;for(var a=Z(s.keys()),o=0;;){var r=tt(a);if(!r)return i.length=o,i;var l=Q(r);try{i[o]=l}catch(h){try{et(a)}finally{throw h}}o++}}function l(t,i,s){var a=n(i,s,!1);if(M(a))return!1;if(!a.delete(t))return!1;if(0===a.size){var o=e.get(i);M(o)||(o.delete(s),0===o.size&&e.delete(o))}return!0}}function ot(t){var e=t.defineMetadata,i=t.hasOwnMetadata,n=t.getOwnMetadata,s=t.getOwnMetadataKeys,a=t.deleteMetadata,o=new p;return{isProviderFor:function(t,e){var i=o.get(t);return!(M(i)||!i.has(e))||!!s(t,e).length&&(M(i)&&(i=new d,o.set(t,i)),i.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:s,OrdinaryDeleteMetadata:a}}function rt(t,e,i){var n=f.getProvider(t,e);if(!M(n))return n;if(i){if(f.setProvider(t,e,m))return m;throw new Error("Illegal state.")}}function lt(){var t={},e=[],i=function(){function t(t,e,i){this._index=0,this._keys=t,this._values=e,this._selector=i}return t.prototype["@@iterator"]=function(){return this},t.prototype[a]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var i=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var i=this._find(t,!0);return this._values[i]=e,this},e.prototype.delete=function(e){var i=this._find(e,!1);if(i>=0){for(var n=this._keys.length,s=i+1;s<n;s++)this._keys[s-1]=this._keys[s],this._values[s-1]=this._values[s];return this._keys.length--,this._values.length--,X(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new i(this._keys,this._values,n)},e.prototype.values=function(){return new i(this._keys,this._values,s)},e.prototype.entries=function(){return new i(this._keys,this._values,o)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[a]=function(){return this.entries()},e.prototype._find=function(t,e){if(!X(this._cacheKey,t)){this._cacheIndex=-1;for(var i=0;i<this._keys.length;i++)if(X(this._keys[i],t)){this._cacheIndex=i;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function n(t,e){return t}function s(t,e){return e}function o(t,e){return[t,e]}}function ht(){return function(){function t(){this._map=new u}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[a]=function(){return this.keys()},t}()}function ct(){var t=16,e=h.create(),n=s();return function(){function t(){this._key=s()}return t.prototype.has=function(t){var e=a(t,!1);return void 0!==e&&h.has(e,this._key)},t.prototype.get=function(t){var e=a(t,!1);return void 0!==e?h.get(e,this._key):void 0},t.prototype.set=function(t,e){return a(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=a(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=s()},t}();function s(){var t;do{t="@@WeakMap@@"+l()}while(h.has(e,t));return e[t]=!0,t}function a(t,e){if(!i.call(t,n)){if(!e)return;Object.defineProperty(t,n,{value:h.create()})}return t[n]}function o(t,e){for(var i=0;i<e;++i)t[i]=255*Math.random()|0;return t}function r(t){if("function"==typeof Uint8Array){var e=new Uint8Array(t);return"undefined"!=typeof crypto?crypto.getRandomValues(e):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(e):o(e,t),e}return o(new Array(t),t)}function l(){var e=r(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var i="",n=0;n<t;++n){var s=e[n];4!==n&&6!==n&&8!==n||(i+="-"),s<16&&(i+="0"),i+=s.toString(16).toLowerCase()}return i}}function ut(t){return t.__=void 0,delete t.__,t}t("decorate",v),t("metadata",b),t("defineMetadata",y),t("hasMetadata",S),t("hasOwnMetadata",x),t("getMetadata",w),t("getOwnMetadata",C),t("getMetadataKeys",T),t("getOwnMetadataKeys",D),t("deleteMetadata",k)}(i,e),void 0===e.Reflect&&(e.Reflect=Reflect2)}();class TextureScale{constructor(){this.Units=0,this.Scale=0,this.RWidth=0,this.AlignmentScalar=0,this.Flags=0}}var __defProp$f=Object.defineProperty,__getOwnPropDesc$f=Object.getOwnPropertyDescriptor,__decorateClass$f=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$f(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$f(e,i,a),a};class PaintData{constructor(t){this.FillType=NvConstant.FillTypes.Solid,this.Color=t,this.EndColor=NvConstant.Colors.White,this.GradientFlags=0,this.Texture=0,this.TextureScale=new TextureScale,this.Opacity=1,this.EndOpacity=1}}__decorateClass$f([Type((()=>TextureScale))],PaintData.prototype,"TextureScale",2);class OutsideEffectData{constructor(){this.OutsideType=0,this.OutsideExtent_Right=0,this.OutsideExtent_Left=0,this.OutsideExtent_Top=0,this.OutsideExtent_Bottom=0,this.Color=NvConstant.Colors.Black,this.LParam=0,this.WParam=0}}var __defProp$e=Object.defineProperty,__getOwnPropDesc$e=Object.getOwnPropertyDescriptor,__decorateClass$e=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$e(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$e(e,i,a),a};class TextFmtData{constructor(){this.SetPaint=t=>(this.Paint=t,this),this.Paint=new PaintData(NvConstant.Colors.Black),this.FontName="Arial",this.FontType="sanserif",this.FontId=1,this.FontSize=10,this.Face=0,this.Effect=new OutsideEffectData}}__decorateClass$e([Type((()=>PaintData))],TextFmtData.prototype,"Paint",2),__decorateClass$e([Type((()=>OutsideEffectData))],TextFmtData.prototype,"Effect",2);class StyleConstant{}StyleConstant.ColorFilters={NCFill:1,NCTexture:2,NCLine:4,NCLineThick:8,NCLinePat:16,NCLineArrow:32,NCText:64,NCOutSide:128,NCEffect:256,NCStyle:512,NCAll:1023,NCResize:1024},StyleConstant.FillEffect={None:0,Gloss:1,Bevel:2,InShadow:3,InGlow:4},StyleConstant.OutEffect={None:0,Drop:1,Cast:2,Glow:3,Refl:4},StyleConstant.ParaStyleCodes={Just:100,Spacing:101,Leading:102,Tracking:103,Lindent:104,Rindent:105,Pindent:106,Bindent:107,Bullet:108,TabSpace:109,Hyphen:110},StyleConstant.FormatPainterModes={None:0,Object:1,Text:2,Table:3},StyleConstant.ImageDir={Meta:113,Jpg:124,Png:125,Svg:143,Store:123},StyleConstant.RichGradientTypes={Linear:0,BR:1,BL:2,RadialCenter:3,RadialBC:4,RadialTC:5,RadialTR:6,RadialTL:7,RectBR:8,RectBL:9,RectCenter:10,RectTR:11,RectTL:12,Shape:13};class RulerUtil{static GetLengthInRulerUnits(t,e,i,n){LogUtil.Debug("O.Opt GetLengthInRulerUnits - Input:",{lengthInUnits:t,skipFeetConversion:e,offset:i,displayFlags:n});const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let a="",o=0,r=0,l=0,h=0,c=0,u=0,d="",p=1;const g=!!n&&(n&NvConstant.DimensionFlags.ShowFractionalInches)>0,f=!!n&&(n&NvConstant.DimensionFlags.ShowFeetAsInches)>0;if(i&&(i*=100,T3Gv.docUtil.rulerConfig.useInches||(i/=OptConstant.Common.MetricConv),t-=i),T3Gv.docUtil.rulerConfig.showpixels)return a=String(Math.round(t)),LogUtil.Debug("O.Opt GetLengthInRulerUnits - Output:",a),a;if(h=this.GetLengthInUnits(t),T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet&&!e){if(h<0&&(p=-1,h=-h),o=Math.floor(h),r=12*(h-o),g&&(l=r-Math.floor(r),r=Math.floor(r)),"12"===Number(r).toFixed()&&(r=0,o++),f&&(r+=12*o,o=0),l>0&&(u=this.GetFractionStringGranularity(s),c=Math.round(l/u),c>=1&&(c=0,12!=++r||f||(o++,r=0)),c>0)){let t=c,e=Math.floor(1/u);for(;t%2==0&&e%2==0;)t/=2,e/=2;d=t+"/"+e}o*=p,0!==o&&(a=o+"'"),d.length>0?(a+=" "+Number(r).toFixed(),a+=" "+d,a+='"'):r>0&&(r=Math.round(r),a+=" "+r+'"')}else T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.Inches&&T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.M&&T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.Cm&&T3Gv.docUtil.rulerConfig.units!==NvConstant.RulerUnit.Mm||(a=h.toFixed(T3Gv.docUtil.rulerConfig.dp));return LogUtil.Debug("O.Opt GetLengthInRulerUnits - Output:",a),a}static GetLengthInUnits(t){LogUtil.Debug("O.Opt GetLengthInUnits - Input:",{length:t});const e=t*this.GetToUnits();return LogUtil.Debug("O.Opt GetLengthInUnits - Output:",e),e}static GetToUnits(){LogUtil.Debug("O.Opt GetToUnits - Input");const t=T3Gv.docUtil.rulerConfig.major;let e=T3Gv.docUtil.rulerConfig.majorScale/t;return T3Gv.docUtil.rulerConfig.useInches||(e*=T3Gv.docUtil.rulerConfig.metricConv),LogUtil.Debug("O.Opt GetToUnits - Output:",e),e}static GetFractionStringGranularity(t){return T3Gv.docUtil.rulerConfig.denom>=1?1/T3Gv.docUtil.rulerConfig.denom:T3Gv.docUtil.rulerConfig.majorScale<=1?1/16:T3Gv.docUtil.rulerConfig.majorScale<=2?1/8:T3Gv.docUtil.rulerConfig.majorScale<=4?1/4:T3Gv.docUtil.rulerConfig.majorScale<=8?.5:1}static GetFractionDenominator(){let t;const e=T3Gv.docUtil.rulerConfig.majorScale;return t=e<=1?16:e<=2?8:e<=4?4:e<=8?2:1,t}}class CursorConstant{}CursorConstant.CursorType={Default:"cur-default",Pointer:"cur-pointer",Cross:"cur-cross",Text:"cur-text",Move:"cur-move",ResizeT:"cur-n-resize",ResizeR:"cur-e-resize",ResizeB:"cur-s-resize",ResizeL:"cur-w-resize",ResizeTB:"cur-ns-resize",ResizeLR:"cur-ew-resize",ResizeRT:"cur-ne-resize",ResizeLT:"cur-nw-resize",ResizeRB:"cur-se-resize",ResizeLB:"cur-sw-resize",NeswResize:"cur-nesw-resize",NwseResize:"cur-nwse-resize",Anchor:"cur-anchor",Paint:"cur-paint",Rotate:"cur-rotate",Edit:"cur-pencil",EditClose:"cur-pencil-close",Add:"cur-add",Stamp:"cur-stamp",AddRight:"cur-add-right",AddLeft:"cur-add-left",AddUp:"cur-add-up",AddDown:"cur-add-down",AddPlus:"cur-add-plus",Grab:"cur-grab"},CursorConstant.CursorTypes={Default:"DEFAULT",Plus:"PLUS",Move:"MOVE",Grow:"GROW"},CursorConstant.Knob={Path:"assets/img/knob/",DiagonLeft:"diagon_left.svg",DiagonRight:"diagon_right.svg",ExpandHoriz:"expand_horiz.svg",ExpandVert:"expand_vert.svg"},CursorConstant.CursorState={None:0,EditOnly:1,EditLink:2,LinkOnly:3};class DynamicGuides{constructor(){this.above_left=null,this.below_left=null,this.above_right=null,this.below_right=null,this.left_top=null,this.right_top=null,this.left_bottom=null,this.right_bottom=null,this.above_center=null,this.below_center=null,this.left_center=null,this.right_center=null,this.wall_left=null,this.wall_right=null,this.wall_top=null,this.wall_bottom=null}}class SelectionAttr{constructor(){this.tselect=-1,this.nselect=0,this.nlineselected=0,this.nshapeselected=0,this.nconnectorselected=0,this.ngroupsselected=0,this.nimageselected=0,this.IsTargetTable=!1,this.paste=0,this.undo=!1,this.redo=!1,this.allowalign,this.width=0,this.height=0,this.left=0,this.top=0,this.widthstr="",this.heightstr="",this.leftstr="",this.topstr="",this.fontid=0,this.fontsize=12,this.bold=!1,this.italic=!1,this.underline=!1,this.superscript=!1,this.subscript=!1,this.TextDirection=!0,this.ncells_selected=0,this.NTableRows=4,this.NTableCols=3,this.cell_notext=!1,this.celltype=0,this.cellselected=!1,this.cellflags=0,this.ntablesselected=0,this.bInNoteEdit=!1,this.allowcopy=!1,this.selectionhastext=!1,this.subtype=0,this.objecttype=0,this.datasetElemID=-1,this.projectTableSelected=!1,this.lockedTableSelected=!1,this.fixedCornerRadius=0,this.lineCornerRadius=0,this.colorfilter=0,this.SelectionBusinessManager=null,this.WallThickness=0}}const _KeyboardConstant=class{};let KeyboardConstant=_KeyboardConstant;KeyboardConstant.Contexts={None:-1,All:0,Text:1,Automation:3,DimensionText:4,WallOpt:5,Note:6,Navigation:7,AutomationNoCtrl:8,ReadOnly:9},KeyboardConstant.ModifierKeys={None:0,Ctrl:1,Shift:2,Alt:3,Ctrl_Alt:4,Ctrl_Shift:5,Shift_Alt:6},KeyboardConstant.Keys={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Caps_Lock:20,Escape:27,Space:32,Page_Up:33,Page_Down:34,End:35,Home:36,Left_Arrow:37,Up_Arrow:38,Right_Arrow:39,Down_Arrow:40,Insert:45,Delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,Left_Window_Key:91,Right_Window_Key:92,Select_Key:93,Numpad_0:96,Numpad_1:97,Numpad_2:98,Numpad_3:99,Numpad_4:100,Numpad_5:101,Numpad_6:102,Numpad_7:103,Numpad_8:104,Numpad_9:105,Multiply:106,Add:107,Subtract:109,Decimal_Point:110,Divide:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Num_Lock:144,Scroll_Lock:145,Semi_Colon:186,Equal_Sign:187,Comma:188,Dash:189,Period:190,Forward_Slash:191,Grave_Accent:192,Open_Bracket:219,Back_Slash:220,Close_Bracket:221,Single_Quote:222},KeyboardConstant.NonTextKeys=[_KeyboardConstant.Keys.Backspace,_KeyboardConstant.Keys.Tab,_KeyboardConstant.Keys.Enter,_KeyboardConstant.Keys.Left_Arrow,_KeyboardConstant.Keys.Up_Arrow,_KeyboardConstant.Keys.Right_Arrow,_KeyboardConstant.Keys.Down_Arrow,_KeyboardConstant.Keys.Delete,_KeyboardConstant.Keys.Escape];var __defProp$d=Object.defineProperty,__getOwnPropDesc$d=Object.getOwnPropertyDescriptor,__decorateClass$d=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$d(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$d(e,i,a),a};class FillData{constructor(){this.SetPaint=t=>(this.Paint=t,this),this.Paint=new PaintData(NvConstant.Colors.White),this.Hatch=0,this.FillEffect=0,this.EffectColor=null,this.WParam=0,this.LParam=0}}__decorateClass$d([Type((()=>PaintData))],FillData.prototype,"Paint",2);var __defProp$c=Object.defineProperty,__getOwnPropDesc$c=Object.getOwnPropertyDescriptor,__decorateClass$c=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$c(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$c(e,i,a),a};class LineData{constructor(){this.SetPaint=t=>(this.Paint=t,this),this.Paint=new PaintData(NvConstant.Colors.Black),this.Hatch=0,this.LineEffect=0,this.Thickness=NvConstant.StyleDefaults.DefThick,this.LinePattern=0,this.BThick=0,this.EdgeColor=null,this.LParam=0,this.WParam=0}}__decorateClass$c([Type((()=>PaintData))],LineData.prototype,"Paint",2);var __defProp$b=Object.defineProperty,__getOwnPropDesc$b=Object.getOwnPropertyDescriptor,__decorateClass$b=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$b(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$b(e,i,a),a};class QuickStyle{constructor(){this.Name="t3",this.Fill=new FillData,this.Border=new LineData,this.OutsideEffect=new OutsideEffectData,this.Text=new TextFmtData,this.Line=new LineData}}__decorateClass$b([Type((()=>LineData))],QuickStyle.prototype,"Border",2),__decorateClass$b([Type((()=>FillData))],QuickStyle.prototype,"Fill",2),__decorateClass$b([Type((()=>LineData))],QuickStyle.prototype,"Line",2),__decorateClass$b([Type((()=>OutsideEffectData))],QuickStyle.prototype,"OutsideEffect",2),__decorateClass$b([Type((()=>TextFmtData))],QuickStyle.prototype,"Text",2);class Utils3{static LineDStyleHit(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g,f,m,v,b=-1,y=0,S={x:0,y:0,width:0,height:0};c=i+12+n;const x=t.length;for(let w=0;w<x-1;w++)S=Utils2.Pt2Rect(t[w],t[w+1]),Utils2.InflateRect(S,c,c),Utils2.pointInRect(S,e)&&(t[w].x===t[w+1].x?(S=t[w].y<t[w+1].y?Utils2.SetRect(t[w].x-c,t[w].y,t[w].x+c,t[w+1].y):Utils2.SetRect(t[w].x-c,t[w+1].y,t[w].x+c,t[w].y),Utils2.pointInRect(S,e)&&(y=NvConstant.HitCodes.Border,b=w,m=t[w].x,v=e.y)):t[w].y===t[w+1].y?(S=t[w].x<t[w+1].x?Utils2.SetRect(t[w].x,t[w].y-c,t[w+1].x,t[w].y+c):Utils2.SetRect(t[w+1].x,t[w].y-c,t[w].x,t[w].y+c),Utils2.pointInRect(S,e)&&(y=NvConstant.HitCodes.Border,b=w,v=t[w].y,m=e.x)):(d=Math.abs(t[w].x-t[w+1].x),p=Math.abs(t[w].y-t[w+1].y),g=Utils2.Sqrt(p*p+d*d),f=e.x-t[w].x,p/d<1?(t[w].x<=t[w+1].x?(r=t[w].y,l=t[w+1].y):(l=t[w].y,r=t[w+1].y,f=e.x-t[w+1].x),o=r>l?r-p*f/d:r+p*f/d,u=(d?g/d:1)*c,e.y<=o+u&&e.y>=o-u&&(y=NvConstant.HitCodes.Border,b=w,v=o,m=e.x)):(t[w].x<=t[w+1].x?(r=t[w].y,l=t[w+1].y,h=t[w].x):(l=t[w].y,r=t[w+1].y,h=t[w+1].x),a=r>l?h+d*(r-e.y)/p:h+d*(e.y-r)/p,u=(p?g/p:1)*c,e.x<=a+u&&e.x>=a-u&&(y=NvConstant.HitCodes.Border,b=w,m=a,v=e.y))));return void 0!==m&&(e.x=m),void 0!==v&&(e.y=v),s&&(s.lpHit=b),y}static CloneToDoc(t,e){const i=document.createElementNS(t.namespaceURI,t.nodeName);for(let n=0,s=t.attributes.length;n<s;++n){const s=t.attributes[n];let a=s.nodeName;a.length&&(a[0]>="A"&&a[0]<="Z"&&(a=a.toLowerCase()),e?""!==s.nodeValue&&"xmlns"!==a&&i.setAttribute(a,s.nodeValue):""!==s.nodeValue&&i.setAttribute(a,s.nodeValue))}for(let n=0,s=t.childNodes.length;n<s;++n){const s=t.childNodes[n];1===s.nodeType?i.insertBefore(this.CloneToDoc(s,e),null):i.insertBefore(document.createTextNode(s.nodeValue),null)}return i}static XmlToStr(t){try{return(new XMLSerializer).serializeToString(t)}catch(e){try{return t.xml}catch(i){throw i}}}static StrEscapeRegExp(t){return t.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1")}static StrReplaceAll(t,e,i){return i.replace(new RegExp(this.StrEscapeRegExp(t),"g"),e)}static RotatePointsAboutPoint(t,e,i){if(0===e)return;const n=Math.sin(e),s=Math.cos(e),a=Math.abs(s)<1e-4?0:s,o=Math.abs(n)<1e-4?0:n;for(let r=0;r<i.length;r++){const e=i[r].x-t.x,n=i[r].y-t.y;i[r].x=e*a+n*o+t.x,i[r].y=-e*o+n*a+t.y}}static RotatePointsAboutCenter(t,e,i){if(0===e)return;const n={x:(t.x+t.x+t.width)/2,y:(t.y+t.y+t.height)/2};Utils3.RotatePointsAboutPoint(n,e,i)}static GetModifierKeys(t){let e=KeyboardConstant.ModifierKeys.None;return t.ctrlKey||t.metaKey?(e=KeyboardConstant.ModifierKeys.Ctrl,t.shiftKey?e=KeyboardConstant.ModifierKeys.Ctrl_Shift:t.altKey&&(e=KeyboardConstant.ModifierKeys.Ctrl_Alt)):t.shiftKey?(e=KeyboardConstant.ModifierKeys.Shift,t.altKey&&(e=KeyboardConstant.ModifierKeys.Shift_Alt)):t.altKey&&(e=KeyboardConstant.ModifierKeys.Alt),e}static FindStyle(t){return new QuickStyle}static MakeShortUniqueID(){return"aaaaaaaaaaaaaaaa".replace(/a/g,(()=>Math.floor(16*Math.random()).toString(16)))}static ConvertToFeet(t){let e="",i="",n="",s=0,a=0,o=[],r=1;if(o=t.trim().split(" "),o[o.length-1].indexOf("/")>=0){if(e=o[o.length-1],o.length>=2){let t=o[o.length-2];"'"===t.substr(t.length-1,1)&&(n=o[o.length-2],i="")}o.length>=3&&(n=o[o.length-3])}else 2===o.length?(n=o[0],i=o[1]):'"'===o[0].charAt(o[0].length-1)?i=o[0]:n=o[0];if("'"===n.charAt(n.length-1)&&(n=n.substring(0,n.length-1)),'"'===i.charAt(i.length-1)&&(i=i.substring(0,i.length-1)),'"'===e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),n.length>0&&(s=parseFloat(n)),i.length>0&&(a=parseFloat(i)),s<0&&(s=-s,r=-1),e.length>0){let t=e.split("/");a+=parseInt(t[0],10)/parseInt(t[1],10)}return(s+a/12)*r}static NumberIsFloat(t,e){const i="9".charCodeAt(0),n="0".charCodeAt(0),s=".".charCodeAt(0),a="-".charCodeAt(0);t=t.trim();for(let o=0;o<t.length;o++){const r=t.charCodeAt(o),l=r===s,h=e&&r===a;if(!(r<=i&&r>=n||l||h))return!1}return!0}}class BConstant{}BConstant.GradientStyle={Linear:"linear",Radial:"radial",Radialfill:"radialfill"},BConstant.GradientPos={LeftTop:"ltop",Top:"top",RightTop:"rtop",Right:"right",RightBottom:"rbottom",Bottom:"bottom",LeftBottom:"lbottom",Left:"left",Center:"center"},BConstant.Placeholder={FillColor:"##FillColor",EndColor:"##EndColor",FillTrans:"##FillTrans",LineColor:"##LineColor",LineTrans:"##LineTrans",LineThick:"##LineThick",SolidFill:"##SolidFill",StrokeColor:"##StrokeColor",Terminator:"##"},BConstant.PlaceholderDefault={"##FillColor":"#FFFFFF","##EndColor":"#FFFFFF","##FillTrans":1,"##LineColor":"#000000","##LineTrans":1,"##LineThick":1,"##SolidFill":"#000000","##StrokeColor":"#000000"},BConstant.EffectType={DROPSHADOW:{id:"SHD",outside:!0},CASTSHADOW:{id:"SHC",outside:!0},GLOW:{id:"GLW",outside:!0},REFLECT:{id:"REFL",outside:!0},BEVEL:{id:"BVL",inside:!0},GLOSS:{id:"GLOSS",inside:!0},INNERGLOW:{id:"IGLW",inside:!0},INNERSHADOW:{id:"ISHD",inside:!0},RECOLOR:{id:"RCLR",inside:!0}},BConstant.FilterDirection={LEFT:"L",LEFTTOP:"LT",TOP:"T",RIGHTTOP:"RT",RIGHT:"R",RIGHTBOTTOM:"RB",BOTTOM:"B",LEFTBOTTOM:"LB",CENTER:"C"},BConstant.BevelType={HARD:"H",SOFT:"S",BUMP:"B"},BConstant.GlossType={Hard:"H",Soft:"S"},BConstant.EffectSize={Default:{id:"D",percentage:.1},Small:{id:"S",percentage:.05},Medium:{id:"M",percentage:.25},Large:{id:"L",percentage:.1},Giant:{id:"G",percentage:.05}},BConstant.WordState={Wrong:0,Correct:1,NotProcessed:2},BConstant.Globals={MaxWordSize:100,MaxServerListSize:1400},BConstant.DictMap={en:"24941","en-gb":"25202","en-ca":"25441","pt-br":"28770",da:"25697",nl:"25717",fi:"26217",fr:"26226",de:"26469",it:"26996",legal:"27745",medical:"28001",no:"25442",pt:"28783",es:"29552",sv:"29559"},BConstant.SpellFlags={IgnoreInitCaps:1,IgnoreAllCaps:2,IgnoreMixedAlphaNum:4,IgnoreMixedCase:8};var SVG={ns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",did:0,create:function(t){return document.createElementNS(this.ns,t)},extend:function(t,e){for(var i in e)t.prototype[i]=e[i]},svg:function(t){return new SVG.Doc(t)},Element:function(t){t&&(this.node=t,this.type=t.nodeName),this.attrs={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,fill:"#000",stroke:"#000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0},this.trans={x:0,y:0,scaleX:1,scaleY:1,rotation:0,skewX:0,skewY:0}}};SVG.extend(SVG.Element,{move:function(t,e){return this.attr({x:t,y:e})},center:function(t,e){var i=this.bbox();return this.move(t-i.width/2,e-i.height/2)},size:function(t,e){return this.attr({width:t,height:e})},clone:function(){var t;if(this instanceof SVG.Wrap)(t=this.parent[this.child.node.nodeName]()).attrs=this.attrs,t.child.trans=this.child.trans,t.child.attr(this.child.attrs).transform({}),t.plot&&t.plot(this.child.attrs[this.child instanceof SVG.Path?"d":"points"]);else{const e=safeNodeAccess((()=>this.node.nodeName),{component:"T3Svg",function:"clone"});if(!e)return null;(t="rect"==e?this.parent[e](this.attrs.width,this.attrs.height):"ellipse"==e?this.parent[e](2*this.attrs.rx,2*this.attrs.ry):"image"==e?this.parent[e](this.src):"text"==e?this.parent[e](this.content):"g"==e?this.parent.group():this.parent[e]()).attr(this.attrs)}return t.trans=this.trans,t.transform({}),t},remove:function(){return null!=this.parent?this.parent.remove(this):void 0},doc:function(){return this._parent(SVG.Doc)},nested:function(){return this._parent(SVG.Nested)},attr:function(t,e,i){if(arguments.length<2){if("object"!=typeof t)return this._isStyle(t)?"text"==t?this.content:"leading"==t?this[t]:this.style[t]:this.attrs[t];for(var n in t)this.attr(n,t[n])}else{if(this.attrs[t]=e,"x"==t&&this._isText())for(var s=this.lines.length-1;s>=0;s--)this.lines[s].attr(t,e);else{const n=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"attr"});n&&(null!=i?n.setAttributeNS(i,t,e):n.setAttribute(t,e))}this._isStyle(t)&&("text"==t?this.text(e):"leading"==t?this[t]=e:this.style[t]=e,this.text(this.content))}return this},transform:function(t){if("string"==typeof t)return this.trans[t];var e=[];for(var i in t)null!=t[i]&&(this.trans[i]=t[i]);if(0!=(t=this.trans).rotation){var n=this.bbox();e.push("rotate("+t.rotation+","+(null!=t.cx?t.cx:n.cx)+","+(null!=t.cy?t.cy:n.cy)+")")}return e.push("scale("+t.scaleX+","+t.scaleY+")"),0!=t.skewX&&e.push("skewX("+t.skewX+")"),0!=t.skewY&&e.push("skewY("+t.skewY+")"),e.push("translate("+t.x+","+t.y+")"),this.attr("transform",e.join(" "))},data:function(t,e){if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(i){return this.attr("data-"+t)}else{const i=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"data"});i&&(null===e?i.removeAttribute("data-"+t):this.attr("data-"+t,JSON.stringify(e)))}return this},bbox:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"bbox"});if(!t||"function"!=typeof t.getBBox)return{x:0,y:0,cx:0,cy:0,width:0,height:0};try{var e=t.getBBox();return{x:e.x+this.trans.x,y:e.y+this.trans.y,cx:e.x+this.trans.x+e.width/2,cy:e.y+this.trans.y+e.height/2,width:e.width,height:e.height}}catch(i){return ErrorHandler.getInstance().handleError(i,{component:"T3Svg",function:"bbox",userAction:"Getting bounding box"}),{x:0,y:0,cx:0,cy:0,width:0,height:0}}},rbox:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"rbox"});if(!t||"function"!=typeof t.getBoundingClientRect)return{x:0,y:0,width:0,height:0};try{var e=t.getBoundingClientRect();return{x:e.left,y:e.top,width:e.width,height:e.height}}catch(i){return ErrorHandler.getInstance().handleError(i,{component:"T3Svg",function:"rbox",userAction:"Getting client rectangle"}),{x:0,y:0,width:0,height:0}}},inside:function(t,e){var i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height},show:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"show"});return t&&t.style&&(t.style.display=""),this},hide:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"hide"});return t&&t.style&&(t.style.display="none"),this},visible:function(){const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"visible"});return!(!t||!t.style)&&"none"!=t.style.display},_parent:function(t){for(var e=this;null!=e&&!(e instanceof t);)e=e.parent;return e},_isStyle:function(t){return"string"==typeof t&&this._isText()&&/^font|text|leading/.test(t)},_isText:function(){return this instanceof SVG.Text}}),SVG.Container=function(t){this.constructor.call(this,t)},SVG.Container.prototype=new SVG.Element,SVG.extend(SVG.Container,{add:function(t,e){if(!this.has(t)){e=null==e?this.children().length:e,this.children().splice(e,0,t);const i=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"add"}),n=safeNodeAccess((()=>t.node),{component:"T3Svg",function:"add"});i&&n&&i.insertBefore(n,i.childNodes[e]||null),t.parent=this}return this},put:function(t,e){return this.add(t,e),t},has:function(t){return this.children().indexOf(t)>=0},children:function(){return this._children||(this._children=[])},each:function(t){var e,i=this.children();for(e=0,length=i.length;e<length;e++)i[e]instanceof SVG.Shape&&t.apply(i[e],[e,i]);return this},remove:function(t){return this.removeAt(this.children().indexOf(t))},removeAt:function(t){if(0<=t&&t<this.children().length){var e=this.children()[t];this.children().splice(t,1);const i=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"removeAt"}),n=safeNodeAccess((()=>e.node),{component:"T3Svg",function:"removeAt"});i&&n&&i.removeChild(n),e.parent=null}return this},defs:function(){return this._defs||(this._defs=this.put(new SVG.Defs,0))},level:function(){return this.remove(this.defs()).put(this.defs(),0)},group:function(){return this.put(new SVG.G)},rect:function(t,e){return this.put((new SVG.Rect).size(t,e))},circle:function(t){return this.ellipse(t)},ellipse:function(t,e){return this.put((new SVG.Ellipse).size(t,e))},polyline:function(t){return this.put(new SVG.Wrap(new SVG.Polyline)).plot(t)},polygon:function(t){return this.put(new SVG.Wrap(new SVG.Polygon)).plot(t)},path:function(t){return this.put(new SVG.Wrap(new SVG.Path)).plot(t)},image:function(t,e,i){return e=null!=e?e:100,this.put((new SVG.Image).load(t).size(e,null!=i?i:e))},text:function(t){return this.put((new SVG.Text).text(t))},nested:function(){return this.put(new SVG.Nested)},gradient:function(t,e){return this.defs().gradient(t,e)},pattern:function(t,e,i){return this.defs().pattern(t,e,i)},mask:function(){return this.defs().put(new SVG.Mask)},first:function(){return this.children()[0]instanceof SVG.Defs?this.children()[1]:this.children()[0]},last:function(){return this.children()[this.children().length-1]},clear:function(){this._children=[];const t=safeNodeAccess((()=>this.node),{component:"T3Svg",function:"clear"});if(t)for(;t.hasChildNodes();){const e=safeNodeAccess((()=>t.lastChild),{component:"T3Svg",function:"clear"});if(!e)break;t.removeChild(e)}return this}}),SVG.FX=function(t){this.target=t},SVG.extend(SVG.FX,{animate:function(t,e){t=null==t?1e3:t,e=e||"<>";var i,n,s,a=this.target,o=this,r=(new Date).getTime(),l=r+t;return this.interval=setInterval((function(){var h,c=(new Date).getTime(),u=c>l?1:(c-r)/t;if(null==i)for(var d in i=[],o.attrs)i.push(d);if(null==n){for(var p in n=[],o.trans)n.push(p);s={}}h="<>"===e?-Math.cos(u*Math.PI)/2+.5:">"===e?Math.sin(u*Math.PI/2):"<"===e?1-Math.cos(u*Math.PI/2):"-"===e?u:"function"==typeof e?e(u):u,o._move?a.move(o._at(o._move.x,h),o._at(o._move.y,h)):o._center&&a.move(o._at(o._center.x,h),o._at(o._center.y,h)),o._size&&a.size(o._at(o._size.width,h),o._at(o._size.height,h));for(var g=i.length-1;g>=0;g--)a.attr(i[g],o._at(o.attrs[i[g]],h));if(n.length>0){for(g=n.length-1;g>=0;g--)s[n[g]]=o._at(o.trans[n[g]],h);a.transform(s)}c>l&&(clearInterval(o.interval),o._after?o._after.apply(a,[o]):o.stop())}),t>10?10:t),this},attr:function(t,e){if("object"==typeof t)for(var i in t)this.attr(i,t[i]);else this.attrs[t]={from:this.target.attr(t),to:e};return this},transform:function(t){for(var e in t)this.trans[e]={from:this.target.trans[e],to:t[e]};return this},move:function(t,e){var i=this.target.bbox();return this._move={x:{from:i.x,to:t},y:{from:i.y,to:e}},this},size:function(t,e){var i=this.target.bbox();return this._size={width:{from:i.width,to:t},height:{from:i.height,to:e}},this},center:function(t,e){var i=this.target.bbox();return this._move={x:{from:i.cx,to:t},y:{from:i.cy,to:e}},this},after:function(t){return this._after=t,this},stop:function(){return clearInterval(this.interval),this.attrs={},this.trans={},this._move=null,this._size=null,this._after=null,this},_at:function(t,e){return"number"==typeof t.from?t.from+(t.to-t.from)*e:t.to.r||/^#/.test(t.to)?this._color(t,e):e<1?t.from:t.to},_color:function(t,e){var i=this._h2r(t.from||"#000"),n=this._h2r(t.to);return this._r2h({r:~~(i.r+(n.r-i.r)*e),g:~~(i.g+(n.g-i.g)*e),b:~~(i.b+(n.b-i.b)*e)})},_h2r:function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(this._fh(t));return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:{r:0,g:0,b:0}},_r2h:function(t){return"#"+this._c2h(t.r)+this._c2h(t.g)+this._c2h(t.b)},_c2h:function(t){var e=t.toString(16);return 1==e.length?"0"+e:e},_fh:function(t){return 4==t.length?"#"+t.substring(1,2)+t.substring(1,2)+t.substring(2,3)+t.substring(2,3)+t.substring(3,4)+t.substring(3,4):t}}),SVG.extend(SVG.Element,{animate:function(t,e){return(this._fx||(this._fx=new SVG.FX(this))).stop().animate(t,e)},stop:function(){return this._fx.stop(),this}}),SVG.on=function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,i)},SVG.off=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)},SVG.extend(SVG.Element,{on:function(t,e){return SVG.on(this.node,t,e),this},off:function(t,e){return SVG.off(this.node,t,e),this}}),SVG.G=function(){this.constructor.call(this,SVG.create("g"))},SVG.G.prototype=new SVG.Container,SVG.extend(SVG.G,{defs:function(){return this.doc().defs()}}),SVG.extend(SVG.Element,{siblings:function(){return this.parent.children()},position:function(){return this.siblings().indexOf(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){return this.parent.remove(this).put(this,this.position()+1)},backward:function(){let t;return this.parent.level(),t=this.position(),t>1&&this.parent.remove(this).add(this,t-1),this},front:function(){return this.parent.remove(this).put(this)},back:function(){return this.parent.level(),this.position()>1&&this.parent.remove(this).add(this,0),this}}),SVG.Defs=function(){this.constructor.call(this,SVG.create("defs"))},SVG.Defs.prototype=new SVG.Container,SVG.Mask=function(){this.constructor.call(this,SVG.create("mask")),this.attr("id",this.id="svgjs_element_"+SVG.did++)},SVG.Mask.prototype=new SVG.Container,SVG.extend(SVG.Element,{maskWith:function(t){return this.mask=t instanceof SVG.Mask?t:this.parent.mask().add(t),this.attr("mask","url(#"+this.mask.id+")")}}),SVG.Pattern=function(){this.constructor.call(this,SVG.create("pattern")),this.attr("id",this.id="svgjs_element_"+SVG.did++)},SVG.Pattern.prototype=new SVG.Container,SVG.extend(SVG.Pattern,{fill:function(){return"url(#"+this.id+")"}}),SVG.extend(SVG.Defs,{pattern:function(t,e,i){var n=this.put(new SVG.Pattern);return i(n),n.attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"}),n}}),SVG.Gradient=function(t){this.constructor.call(this,SVG.create(t+"Gradient")),this.attr("id",this.id="svgjs_element_"+SVG.did++),this.type=t},SVG.Gradient.prototype=new SVG.Container,SVG.extend(SVG.Gradient,{from:function(t,e){return"radial"==this.type?this.attr({fx:t+"%",fy:e+"%"}):this.attr({x1:t+"%",y1:e+"%"})},to:function(t,e){return"radial"==this.type?this.attr({cx:t+"%",cy:e+"%"}):this.attr({x2:t+"%",y2:e+"%"})},radius:function(t){return"radial"==this.type?this.attr({r:t+"%"}):this},at:function(t){return this.put(new SVG.Stop(t))},update:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return t(this),this},fill:function(){return"url(#"+this.id+")"}}),SVG.extend(SVG.Defs,{gradient:function(t,e){var i=this.put(new SVG.Gradient(t));return e(i),i}}),SVG.Stop=function(t){this.constructor.call(this,SVG.create("stop")),this.update(t)},SVG.Stop.prototype=new SVG.Element,SVG.extend(SVG.Stop,{update:function(t){var e,i="",n=["opacity","color"];for(e=n.length-1;e>=0;e--)null!=t[n[e]]&&(i+="stop-"+n[e]+":"+t[n[e]]+";");return this.attr({offset:(null!=t.offset?t.offset:this.attrs.offset||0)+"%",style:i})}}),SVG.Doc=function(t){this.constructor.call(this,SVG.create("svg")),this.parent="string"==typeof t?document.getElementById(t):t,this.attr({xmlns:SVG.ns,version:"1.1",width:"100%",height:"100%"}).attr("xmlns:xlink",SVG.xlink).attr("xlink",SVG.xlink,SVG.ns).defs(),this.stage()},SVG.Doc.prototype=new SVG.Container,SVG.Doc.prototype.stage=function(){const t=this.parent,e=document.createElement("div");e.style.cssText="position:relative;height:100%;",t?t.appendChild(e):(this.parent=document.createElement("div"),this.parent.appendChild(e)),e.appendChild(this.node);const i=()=>{"complete"===document.readyState?(this.attr("style","position:absolute;overflow:hidden;"),setTimeout((()=>{this.attr("style","position:relative;overflow:hidden;");try{t.removeChild(this.node.parentNode),this.node.parentNode.removeChild(this.node),t.appendChild(this.node)}catch(e){}}),5)):setTimeout(i,10)};return i(),this},SVG.Shape=function(t){this.constructor.call(this,t)},SVG.Shape.prototype=new SVG.Element,SVG.Wrap=function(t){this.constructor.call(this,SVG.create("g")),this.node.insertBefore(t.node,null),this.child=t,this.type=t.node.nodeName},SVG.Wrap.prototype=new SVG.Shape,SVG.extend(SVG.Wrap,{move:function(t,e){return this.transform({x:t,y:e})},size:function(t,e){var i=t/this._b.width;return this.child.transform({scaleX:i,scaleY:null!=e?e/this._b.height:i}),this},center:function(t,e){return this.move(t+this._b.width*this.child.trans.scaleX/-2,e+this._b.height*this.child.trans.scaleY/-2)},attr:function(t,e,i){if("object"==typeof t)for(var n in t)this.attr(n,t[n]);else{if(arguments.length<2)return"transform"==t?this.attrs[t]:this.child.attrs[t];"transform"==t?(this.attrs[t]=e,null!=i?this.node.setAttributeNS(i,t,e):this.node.setAttribute(t,e)):this.child.attr(t,e,i)}return this},plot:function(t){return this.child.plot(t),this._b=this.child.bbox(),this.child.transform({x:-this._b.x,y:-this._b.y}),this}}),SVG.Rect=function(){this.constructor.call(this,SVG.create("rect"))},SVG.Rect.prototype=new SVG.Shape,SVG.extend(SVG.Rect,{move:function(t,e){return this.attr({x:t,y:e})},size:function(t,e){return this.attr({width:t,height:e})},center:function(t,e){return this.move(t-this.attr("width")/2,e-this.attr("height")/2)}}),SVG.Ellipse=function(){this.constructor.call(this,SVG.create("ellipse"))},SVG.Ellipse.prototype=new SVG.Shape,SVG.extend(SVG.Ellipse,{move:function(t,e){return this.attrs.x=t,this.attrs.y=e,this.center()},size:function(t,e){return this.attr({rx:t/2,ry:(null!=e?e:t)/2}).center()},center:function(t,e){return this.attr({cx:t||(this.attrs.x||0)+(this.attrs.rx||0),cy:e||(this.attrs.y||0)+(this.attrs.ry||0)})}}),SVG.Line=function(){this.constructor.call(this,SVG.create("line"))},SVG.Line.prototype=new SVG.Shape,SVG.extend(SVG.Line,{move:function(t,e){var i=this.bbox();return this.attr({x1:this.attr("x1")-i.x+t,y1:this.attr("y1")-i.y+e,x2:this.attr("x2")-i.x+t,y2:this.attr("y2")-i.y+e})},center:function(t,e){var i=this.bbox();return this.move(t-i.width/2,e-i.height/2)},size:function(t,e){var i=this.bbox();return this.attr(this.attr("x1")<this.attr("x2")?"x2":"x1",i.x+t),this.attr(this.attr("y1")<this.attr("y2")?"y2":"y1",i.y+e),this}}),SVG.extend(SVG.Container,{line:function(t,e,i,n){return this.put((new SVG.Line).attr({x1:t,y1:e,x2:i,y2:n}))}}),SVG.Poly={plot:function(t){return this.attr("points",t||"0,0"),this}},SVG.Polyline=function(){this.constructor.call(this,SVG.create("polyline"))},SVG.Polyline.prototype=new SVG.Shape,SVG.extend(SVG.Polyline,SVG.Poly),SVG.Polygon=function(){this.constructor.call(this,SVG.create("polygon"))},SVG.Polygon.prototype=new SVG.Shape,SVG.extend(SVG.Polygon,SVG.Poly),SVG.Path=function(){this.constructor.call(this,SVG.create("path"))},SVG.Path.prototype=new SVG.Shape,SVG.extend(SVG.Path,{move:function(t,e){this.transform({x:t,y:e})},plot:function(t){return this.attr("d",t||"M0,0")}}),SVG.Image=function(){this.constructor.call(this,SVG.create("image"))},SVG.Image.prototype=new SVG.Shape,SVG.extend(SVG.Image,{load:function(t){return this.src=t,t?this.attr("xlink:href",t,SVG.xlink):this}});var fontProperties=["size","family","weight","stretch","variant","style"];function SVGTSpan(){this.constructor.call(this,SVG.create("tspan"))}SVG.Text=function(){this.constructor.call(this,SVG.create("text")),this.style={"font-size":16,"font-family":"Helvetica","text-anchor":"start"},this.leading=1.2},SVG.Text.prototype=new SVG.Shape,SVG.extend(SVG.Text,{text:function(t){this.content=t=t||"text",this.lines=[];var e=this._style();this.doc();for(var i=t.split("\n"),n=this.style["font-size"];this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);for(var s=0,a=i.length;s<a;s++){var o=(new SVGTSpan).text(i[s]).attr({dy:n*this.leading-(0===s?.3*n:0),x:this.attrs.x||0,style:e});this.node.appendChild(o.node),this.lines.push(o)}return this.attr("style",e)},_style:function(){for(var t="",e=fontProperties.length-1;e>=0;e--){var i=fontProperties[e];null!=this.style["font-"+i]&&(t+="font-"+i+":"+this.style["font-"+i]+";")}return t+="text-anchor:"+this.style["text-anchor"]+";"}}),SVGTSpan.prototype=new SVG.Shape,SVG.extend(SVGTSpan,{text:function(t){return this.node.appendChild(document.createTextNode(t)),this}}),SVG.Nested=function(){this.constructor.call(this,SVG.create("svg")),this.attr("overflow","visible")},SVG.Nested.prototype=new SVG.Container,SVG._stroke=["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],SVG._fill=["color","opacity","rule"];var formatAttributeName=function(t,e){return"color"===e?t:t+"-"+e};["fill","stroke"].forEach((function(t){SVG.Shape.prototype[t]=function(e){var i;if("string"==typeof e)this.attr(t,e);else{var n=SVG["_"+t];for(i=n.length-1;i>=0;i--){var s=n[i];null!=e[s]&&this.attr(formatAttributeName(t,s),e[s])}}return this}})),[SVG.Element,SVG.FX].forEach((function(t){t&&SVG.extend(t,{rotate:function(t){return this.transform({rotation:t||0})},skew:function(t,e){return this.transform({skewX:t||0,skewY:e||0})},scale:function(t,e){return this.transform({scaleX:t,scaleY:null==e?t:e})},opacity:function(t){return this.attr("opacity",t)}})})),SVG.G&&SVG.extend(SVG.G,{move:function(t,e){return this.transform({x:t,y:e})}}),SVG.Text&&SVG.extend(SVG.Text,{font:function(t){var e,i={};for(e in t)"leading"===e?i[e]=t[e]:"anchor"===e?i["text-anchor"]=t[e]:fontProperties.indexOf(e)>-1&&(i["font-"+e]=t[e]);return this.attr(i).text(this.content)}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchend","touchmove","touchcancel"].forEach((function(t){SVG.Element.prototype[t]=function(e){const i=this;return this.node["on"+t]="function"==typeof e?function(){return e.apply(i,arguments)}:null,this}})),SVG.ForeignObject=function(){this.constructor.call(this,SVG.create("foreignObject"))},SVG.ForeignObject.prototype=new SVG.Container,SVG.extend(SVG.ForeignObject,{move:function(t,e){return this.attr({x:t,y:e})},size:function(t,e){return this.attr({width:t,height:e})},html:function(t){if("string"==typeof t){const e=document.createElement("div");e.textContent=t,this.node.innerHTML=e.innerHTML}else t instanceof HTMLElement&&(this.node.innerHTML="",this.node.appendChild(t));return this}}),SVG.extend(SVG.Container,{foreignObject:function(t,e){return this.put((new SVG.ForeignObject).size(t,e))}});const T3Svg=SVG;class BoundInfo{constructor(){this.x=0,this.y=0,this.width=0,this.height=0}}class Effects{constructor(t){this.element=t,this.curBounds=new BoundInfo}SetEffects(t,e){let i=this.GetEffectsID(t,!1),n=[],s=BConstant.EffectSize.Default,a=BConstant.EffectSize.Default,o=!1,r=0,l=0;t&&(l=t.length||0),e=e||this.curBounds,this.curBounds=e,e&&(s=e.width<500?BConstant.EffectSize.Small:e.width<1500?BConstant.EffectSize.Medium:e.width<3e3?BConstant.EffectSize.Large:BConstant.EffectSize.Giant,a=e.height<500?BConstant.EffectSize.Small:e.height<1500?BConstant.EffectSize.Medium:e.height<3e3?BConstant.EffectSize.Large:BConstant.EffectSize.Giant);for(let h=0;h<l;h++)Effects.IsSecondaryEffect(t[h])?n.push(t[h]):r++;if(r&&!this.FilterLimitNeeded(e,s,a)||(this.element.svgObj.node.removeAttribute("filter"),this.element.svgObj.attr.filter&&delete this.element.svgObj.filter,o=!0),!n.length&&this.element.externalEffects){for(let t=0;t<this.element.externalEffects.length;t++)this.element.parent.RemoveElement(this.element.externalEffects[t],!0);this.element.externalEffects=null}if(!o||n.length){if(!o){if(i+=s.id+a.id,!this.element.doc.DefExists(i)){let e=new T3Svg.Container(T3Svg.create("filter")),n="SourceGraphic",o=[];e.attr("id",i),e.attr("x",-s.percentage),e.attr("y",-a.percentage),e.attr("width",1+2*s.percentage),e.attr("height",1+2*a.percentage);for(let i=0;i<l;i++)t[i].type.inside&&this.DefineEffect(e,t[i].type,t[i].params,n,"sourceEffect")&&(n="sourceEffect");for(let i=0;i<l;i++)if(t[i].type.outside)if(t[i].type.id==BConstant.EffectType.CASTSHADOW.id||t[i].type.id==BConstant.EffectType.REFLECT.id)t[i];else{let s="oEffect"+i;this.DefineEffect(e,t[i].type,t[i].params,n,s)&&o.push(s)}let r=new T3Svg.Container(T3Svg.create("feMerge")),h=o.length;for(let t=0;t<h;t++){let e=new T3Svg.Element(T3Svg.create("feMergeNode"));e.attr("in",o[t]),r.add(e)}let c=new T3Svg.Element(T3Svg.create("feMergeNode"));c.attr("in",n),r.add(c),e.add(r),this.element.doc.Defs().add(e)}this.element.SetEffect(i)}if(n.length){for(let t=0;t<n.length;t++){let e=n[t];e.effectID=this.GetEffectsID([e],!0)}if(this.element.externalEffects)for(let t=this.element.externalEffects.length-1;t>=0;t--){let e=this.element.externalEffects[t],i=e.GetID();for(let t=0;t<n.length;t++){let s=n[t];if(i==s.effectID){s.elem=e;break}}this.element.parent.RemoveElement(this.element.externalEffects[t],!0)}this.element.externalEffects=[];for(let t=0;t<n.length;t++){let i=n[t],o=i.elem;o||(o=this.CreateSecondaryEffectElement(i,e,s,a),o.SetID(i.effectID)),o&&(this.element.externalEffects.push(o),this.element.parent.AddElement(o,t,!0))}}}}CreateSecondaryEffectElement(t,e,i,n){let s;return Effects.IsSecondaryEffect(t)&&(s=this.element.doc.CreateShape(OptConstant.CSType.ShapeCopy),s&&(s.SetElementSource(this.element),s.Effects().SetSecondaryEffect(t,e,i,n),s.svgObj.attr("sfx",1))),s}SetSecondaryEffect(t,e,i,n){}ClearEffects(){this.SetEffects()}FilterLimitNeeded(t,e,i){if(!t)return!1;let n=this.element.doc.GetWorkArea(),s=1+2*e.pct,a=1+2*i.pct,o=t.width*n.docToScreenScale*s,r=t.height*n.docToScreenScale*a;return o>4096||r>4096}GetEffectsID(t,e){let i="T3",n=0,s=0,a=t&&t.length||0;if(!a)return i+"_NONE";e=e||!1;for(let o=0;o<a;o++)if(t[o].type.outside){if(Effects.IsSecondaryEffect(t[o])!==e)continue;i+="_"+t[o].type.id,void 0!==t[o].params.xOff&&(i+="."+t[o].params.xOff),void 0!==t[o].params.yOff&&(i+="."+t[o].params.yOff),void 0!==t[o].params.size&&(i+="."+t[o].params.size),void 0!==t[o].params.color&&(i+=t[o].params.color),n++}for(let o=0;o<a;o++)t[o].type.inside&&(i+="_"+t[o].type.id,void 0!==t[o].params.size&&(i+="."+t[o].params.size),void 0!==t[o].params.type&&(i+="."+t[o].params.type),void 0!==t[o].params.dir&&(i+="."+t[o].params.dir),void 0!==t[o].params.color&&(i+=t[o].params.color),s++);return n||s||(i+="_NONE"),i}DefineEffect(t,e,i,n,s){let a=!0;switch(e.id){case BConstant.EffectType.DROPSHADOW.id:this.DefineDropShadow(t,i,n,s);break;case BConstant.EffectType.CASTSHADOW.id:this.DefineCastShadow(t,i,n,s);break;case BConstant.EffectType.REFLECT.id:this.DefineReflect(t,i,n,s);break;case BConstant.EffectType.GLOW.id:this.DefineGlow(t,i,n,s);break;case BConstant.EffectType.BEVEL.id:this.DefineBevel(t,i,n,s);break;case BConstant.EffectType.GLOSS.id:this.DefineGloss(t,i,n,s);break;case BConstant.EffectType.INNERGLOW.id:this.DefineInnerGlow(t,i,n,s);break;case BConstant.EffectType.INNERSHADOW.id:this.DefineInnerShadow(t,i,n,s);break;case BConstant.EffectType.RECOLOR.id:this.DefineRecolor(t,i,n,s);break;default:a=!1}return a}DefineDropShadow(t,e,i,n){let s,a=e.xOff||0,o=e.yOff||0,r=e.color||"#000",l=e.size||2;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color",r),s.attr("flood-opacity",.3),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in","flood"),s.attr("in2","SourceAlpha"),s.attr("operator","in"),s.attr("result","mask"),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr("in","mask"),s.attr("stdDeviation",l),t.add(s),s=new T3Svg.Element(T3Svg.create("feOffset")),s.attr("dx",a),s.attr("dy",o),s.attr("result",n),t.add(s)}DefineCastShadow(t,e,i,n){let s,a=e.size||2;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color","#FFF"),s.attr("flood-opacity",.3),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in2","flood"),s.attr("in","SourceAlpha"),s.attr("operator","in"),s.attr("result","mask"),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr("in","mask"),s.attr("stdDeviation",a),t.add(s)}DefineReflect(t,e,i,n){let s;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color","#FFF"),s.attr("flood-opacity",.3),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in2","flood"),s.attr("in",i),s.attr("operator","in"),s.attr("result","mask"),n&&s.attr("result",n),t.add(s)}DefineGlow(t,e,i,n){let s,a=e.color||"#fff",o=e.size||2;s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr("flood-color",a),s.attr("result","flood"),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr("in","flood"),s.attr("in2","SourceAlpha"),s.attr("operator","in"),s.attr("result","mask"),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr("in","mask"),s.attr("stdDeviation",o),s.attr("result",n),t.add(s)}DefineBevel(t,e,i,n){let s,a,o=e.size||1,r=6,l=0;switch(e.dir||BConstant.FilterDirection.LEFTTOP){case BConstant.FilterDirection.RIGHT:l=0;break;case BConstant.FilterDirection.RIGHTBOTTOM:l=45;break;case BConstant.FilterDirection.BOTTOM:l=90;break;case BConstant.FilterDirection.LEFTBOTTOM:l=135;break;case BConstant.FilterDirection.LEFT:l=180;break;case BConstant.FilterDirection.LEFTTOP:l=225;break;case BConstant.FilterDirection.TOP:l=270;break;case BConstant.FilterDirection.RIGHTTOP:l=315}e.type==BConstant.BevelType.HARD&&(r=20),e.type==BConstant.BevelType.BUMP?(s=new T3Svg.Element(T3Svg.create("feMorphology")),s.attr({in:"SourceAlpha",operator:"erode",radius:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({stdDeviation:o,result:"blur"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:"blur",in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"inner"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:"blur",in2:"inner",operator:"in"}),t.add(s)):(s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in"}),t.add(s)),s=new T3Svg.Container(T3Svg.create("feDiffuseLighting")),s.attr({surfaceScale:r,"lighting-color":"white",diffuseConstant:"1",result:"hilite"}),a=new T3Svg.Element(T3Svg.create("feDistantLight")),a.attr({azimuth:l,elevation:"40"}),s.add(a),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:i,in2:"hilite",k1:1.5,operator:"arithmetic",result:n}),t.add(s)}DefineGloss(t,e,i,n){let s,a,o=e.size||2,r=e.dir||BConstant.FilterDirection.LEFTTOP,l=e.type||BConstant.GlossType.Soft,h=e.color||"#ffffff",c=1,u=0;switch(r){case BConstant.FilterDirection.RIGHT:u=0;break;case BConstant.FilterDirection.RIGHTBOTTOM:u=45;break;case BConstant.FilterDirection.BOTTOM:u=90;break;case BConstant.FilterDirection.LEFTBOTTOM:u=135;break;case BConstant.FilterDirection.LEFT:u=180;break;case BConstant.FilterDirection.LEFTTOP:u=225;break;case BConstant.FilterDirection.TOP:u=270;break;case BConstant.FilterDirection.RIGHTTOP:u=315}l==BConstant.GlossType.Hard&&(c=1.2),o/=4,o=Math.max(Math.min(o,20),2),s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in"}),t.add(s),s=new T3Svg.Container(T3Svg.create("feSpecularLighting")),s.attr({surfaceScale:20,"lighting-color":"white",specularConstant:c,specularExponent:2,result:"hilite"}),a=new T3Svg.Element(T3Svg.create("feDistantLight")),a.attr({azimuth:u,elevation:"40"}),s.add(a),t.add(s),s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":h,"flood-opacity":.7}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in",result:"flood"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in:"hilite",in2:"flood",k1:1.5,operator:"arithmetic"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feBlend")),s.attr({in2:i,mode:"lighten",result:n}),t.add(s)}DefineInnerGlow(t,e,i,n){let s,a=e.color||"#fff",o=e.size||0;s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"shadowdiff"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":a,"flood-opacity":1}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"shadowdiff",operator:"in"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:i,operator:"over",result:n}),t.add(s)}DefineInnerShadow(t,e,i,n){let s,a=e.dir||BConstant.FilterDirection.LEFTTOP,o=e.size||0,r=0,l=0;switch(a){case BConstant.FilterDirection.RIGHT:r=-o,l=0;break;case BConstant.FilterDirection.RIGHTBOTTOM:r=-o,l=-o;break;case BConstant.FilterDirection.BOTTOM:r=0,l=-o;break;case BConstant.FilterDirection.LEFTBOTTOM:r=o,l=-o;break;case BConstant.FilterDirection.LEFT:r=o,l=0;break;case BConstant.FilterDirection.LEFTTOP:r=o,l=o;break;case BConstant.FilterDirection.TOP:r=0,l=o;break;case BConstant.FilterDirection.RIGHTTOP:r=-o,l=o}s=new T3Svg.Element(T3Svg.create("feGaussianBlur")),s.attr({in:"SourceAlpha",stdDeviation:o}),t.add(s),s=new T3Svg.Element(T3Svg.create("feOffset")),s.attr({dx:r,dy:l}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"arithmetic",k2:"-1",k3:"1",result:"shadowdiff"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":"black","flood-opacity":1}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"shadowdiff",operator:"in"}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:i,operator:"over",result:n}),t.add(s)}DefineRecolor(t,e,i,n){let s,a=e.color||"#000000";s=new T3Svg.Element(T3Svg.create("feFlood")),s.attr({"flood-color":a,"flood-opacity":1}),t.add(s),s=new T3Svg.Element(T3Svg.create("feComposite")),s.attr({in2:"SourceAlpha",operator:"in",result:n}),t.add(s)}static CalcSecondaryEffectOffset(t,e){let i=Math.abs(e),n=Math.max(-i,2*t);n=Math.min(n,i);let s=n/i*45;return i/Math.tan((90-s)*Math.PI/180)}static IsSecondaryEffect(t){return!(!t||!t.type)&&(t.params.asSecondary||t.type.id===BConstant.EffectType.CASTSHADOW.id||t.type.id===BConstant.EffectType.REFLECT.id)}}class BBoxModel{constructor(){this.x=0,this.y=0,this.width=-1,this.height=-1}}class TextConstant{}TextConstant.TextFace={Bold:1,Italic:2,Underline:4,Superscript:16,Subscript:32,Strike:64},TextConstant.TextFlags={BadSpell:32},TextConstant.TextStyleCodes={Font:0,Size:1,Face:2,Flags:3,Color:4,StyleId:5,Extra:7,LinkId:10,DataId:11,PaintType:20,SizeFloat:25},TextConstant.TextJust={Left:0,Right:2,Center:6,Top:0,Bottom:8},TextConstant.TextAlign={Left:"left",Center:"center",Right:"right",TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},TextConstant.TextureAlign={TopLeft:1,TopCenter:2,TopRight:3,CenterLeft:4,Center:5,CenterRight:6,BottomLeft:7,BottomCenter:8,BottomRight:9};class Element$1{constructor(){this.doc=null,this.parent=null,this.svgObj=null}InitElement(t,e){this.doc=t,this.parent=e,this.svgObj.SDGObj=this,this.ID=null,this.style=null,this.effects=null,this.userData=null,this.cursor=null,this.strokeWidth=0,this.mirrored=!1,this.flipped=!1,this.geometryBBox=new BBoxModel,this.fillPatternData=null,this.strokePatternData=null,this.internalID=null}CreateElement(t,e){throw this.InitElement(t,e)}Document(){return this.doc}Parent(){return this.parent}DOMElement(){return this.svgObj?this.svgObj.node:null}InDocument(){if(!this.svgObj)return!1;let t=this.svgObj.parent;for(;t;){if("svg"===t.type)return!0;t=t.parent}return!1}SetID(t){this.ID=t}ExcludeFromExport(t){t?this.svgObj.node.setAttribute("no-export","1"):this.svgObj.node.removeAttribute("no-export")}SetCustomAttribute(t,e){e?this.svgObj.node.setAttribute(t,e):this.svgObj.node.removeAttribute(t)}GetCustomAttribute(t){return this.svgObj.node.getAttribute(t)}SetHyperlinkAttribute(t){}GetID(){return this.ID}GetInternalID(){return this.internalID||(this.internalID=Utils1.MakeGuid())}SetInternalID(){const t=this.GetInternalID();return this.svgObj.attr("id",t),t}SetUserData(t){this.userData=t}GetUserData(){return this.userData}SetEventProxy(t){this.eventProxy=t}GetEventProxy(){return this.eventProxy}SetSize(t,e){t=Utils1.RoundCoord(t),e=Utils1.RoundCoord(e),this.svgObj.size(t,e),this.UpdateTransform(),this.geometryBBox.width=t,this.geometryBBox.height=e,this.RefreshPaint()}SetPos(t,e){t=Utils1.RoundCoord(t),e=Utils1.RoundCoord(e),this.svgObj.transform({x:t,y:e}),this.GetRotation()&&this.SetRotation(this.GetRotation()),this.UpdateTransform(),this.RefreshPaint(!0)}GetPos(){return{x:this.svgObj.trans.x,y:this.svgObj.trans.y}}SetCenter(t,e){const i=this.CalcBBox(),n=t-i.width/2,s=e-i.height/2;this.SetPos(n,s)}SetRotation(t,e,i){let n;void 0===e&&(n=this.CalcBBox(),e=n.cx),void 0===i&&(n=n||this.CalcBBox(),i=n.cy),e=Utils1.RoundCoord(e),i=Utils1.RoundCoord(i),t=Utils1.RoundCoord(t),this.svgObj.transform({rotation:t,cx:e,cy:i}),this.UpdateTransform()}GetRotation(){const t=this.svgObj.trans.rotation;return"number"==typeof t?t:0}SetMirror(t){this.mirrored=t,this.UpdateTransform()}GetMirror(){return this.mirrored}SetFlip(t){this.flipped=t,this.UpdateTransform()}GetFlip(){return this.flipped}SetScale(t,e){this.GetScaleElement().transform({scaleX:t,scaleY:e}),this.UpdateTransform()}GetScale(){const t=this.GetScaleElement();return{scaleX:t.trans.scaleX||1,scaleY:t.trans.scaleY||1}}SetVisible(t){t?this.svgObj.show():this.svgObj.hide()}GetVisible(){return this.svgObj.visible()}GetBBox(){let t,e=null;return this.parent||(e=this.doc.GetFormattingLayer(),e.AddElement(this)),t=this.svgObj.bbox(),e&&e.RemoveElement(this),t}CalcBBox(){const t=this.CalcElementFrame(!0);return{...t,cx:t.x+t.width/2,cy:t.y+t.height/2}}GetRBox(){let t=null;this.parent||(t=this.doc.GetFormattingLayer(),t.AddElement(this));const e=this.svgObj.rbox();return t&&t.RemoveElement(this),e}UpdateTransform(){LogUtil.Debug("= B.Element: UpdateTransform - Starting transformation update for element",this.ID);let t=null;this.parent||(LogUtil.Debug("= B.Element: UpdateTransform - No parent found, using formatting layer"),t=this.doc.GetFormattingLayer(),t.AddElement(this));const e=this.GetScaleElement();if(e.transform({}),this.mirrored||this.flipped){let t;const i=this.CalcBBox(),n=e.trans.scaleX||1,s=e.trans.scaleY||1;LogUtil.Debug("= B.Element: UpdateTransform - Processing mirror/flip with scales",{horizontalScale:n,verticalScale:s}),t=e.node.transform.baseVal.consolidate().matrix,i.width/=n,i.height/=s,this.mirrored&&(LogUtil.Debug("= B.Element: UpdateTransform - Applying horizontal mirroring"),t=t.flipX().translate(-i.width,0)),this.flipped&&(LogUtil.Debug("= B.Element: UpdateTransform - Applying vertical flipping"),t=t.flipY().translate(0,-i.height));const a=`matrix(${Utils1.RoundCoord(t.a)} ${Utils1.RoundCoord(t.b)} ${Utils1.RoundCoord(t.c)} ${Utils1.RoundCoord(t.d)} ${Utils1.RoundCoord(t.e)} ${Utils1.RoundCoord(t.f)})`;e.attr("transform",a),LogUtil.Debug("= B.Element: UpdateTransform - Applied transformation matrix",a)}t&&(t.RemoveElement(this),LogUtil.Debug("= B.Element: UpdateTransform - Removed from temporary formatting layer")),LogUtil.Debug("= B.Element: UpdateTransform - Completed transformation update")}GetScaleElement(){return this.svgObj}CalcElementFrame(t){for(var e=this.GetGeometryBBox(),i={x:e.x,y:e.y,width:e.width,height:e.height},n=this.svgObj;n&&n!==this.doc.svgObj&&(i.x+=n.trans.x,i.y+=n.trans.y,n=n.parent,!t););return i}GetGeometryBBox(){if(this.geometryBBox.width<0||this.geometryBBox.height<0){const t=this.doc.GetFormattingLayer(),e={x:this.svgObj.trans.x,y:this.svgObj.trans.y},i=this.svgObj.trans.rotation,n=this.svgObj.parent;let s=0;n&&(s=this.svgObj.position(),n.remove(this.svgObj)),t.svgObj.add(this.svgObj),this.svgObj.transform({x:0,y:0,rotation:0});const a=this.svgObj.rbox();t.svgObj.remove(this.svgObj);const o=this.doc.ConvertWindowToDocCoords(a.x,a.y);this.geometryBBox.x=o.x,this.geometryBBox.y=o.y,this.geometryBBox.width=a.width,this.geometryBBox.height=a.height,this.svgObj.transform({x:e.x,y:e.y,rotation:i}),n&&n.add(this.svgObj,s),this.UpdateTransform()}return this.geometryBBox}GetArrowheadBounds(){return[]}SetTooltip(t){Element$1.SetTooltipOnElement(this.svgObj,t)}Style(){return this.style||(this.style=new Style(this)),this.style}SetFillColor(t){this.svgObj.attr("fill",t),this.ClearColorData(!0)}SetImageFill(t,e){if(e=e||{},this.ClearColorData(!0),this.fillPatternData={},this.fillPatternData.options={},this.fillPatternData.options.cropRect=e.cropRect||{x:0,y:0,width:0,height:0},this.fillPatternData.options.scaleType=e.scaleType||"PROPFILL",this.fillPatternData.url=t,this.fillPatternData.ID=Utils1.MakeGuid(),this.fillPatternData.imgWidth=e.imageWidth||0,this.fillPatternData.imgHeight=e.imageHeight||0,this.fillPatternData.patternElem=null,this.fillPatternData.imageElem=null,this.fillPatternData.isImage=!0,!this.fillPatternData.imgWidth||!this.fillPatternData.imgHeight){const e=Style.GetCachedImageSize(t);e?(this.fillPatternData.imgWidth=e.width,this.fillPatternData.imgHeight=e.height):Style.CalcImageSize(t,(function(t,e,i,n){i||n.elem&&n.elem.fillPatternData&&(n.elem.fillPatternData.imgWidth=t,n.elem.fillPatternData.imgHeight=e,n.elem.UpdatePattern(n.ID,n.fill))}),{ID:this.fillPatternData.ID,elem:this,fill:!0})}this.UpdatePattern(this.fillPatternData.ID,!0)}UpdateImageFill(t={}){this.fillPatternData&&this.fillPatternData.isImage&&(this.fillPatternData.options.cropRect=t.cropRect||this.fillPatternData.options.cropRect,this.fillPatternData.options.scaleType=t.scaleType||this.fillPatternData.options.scaleType,this.UpdatePattern(this.fillPatternData.ID,!0))}SetTextureFill(t){t&&t.url&&(this.ClearColorData(!0),this.fillPatternData={options:{scale:t.scale||1,alignment:t.alignment||0},url:t.url,ID:Utils1.MakeGuid(),imgWidth:t.dim.x,imgHeight:t.dim.y,patternElem:null,imageElem:null,isTexture:!0},this.UpdatePattern(this.fillPatternData.ID,!0))}SetGradientFill(t){if(t&&t.stops&&t.stops.length){this.ClearColorData(!0),this.fillGradientData={},this.fillGradientData.settings={},this.fillGradientData.settings.stops=[],this.fillGradientData.settings.type=t.type||BConstant.GradientStyle.Linear,this.fillGradientData.settings.startPos=t.startPos||BConstant.GradientPos.LeftTop,this.fillGradientData.settings.angle=t.angle;const e=t.stops;for(let t=0;t<e.length;t++)this.fillGradientData.settings.stops.push({offset:e[t].offset||0,color:e[t].color||"#fff",opacity:void 0!==e[t].opacity?e[t].opacity:1});this.fillGradientData.ID=Utils1.MakeGuid(),this.fillGradientData.gradientElem=null,this.UpdateGradient(this.fillGradientData.ID,!0)}}ClearColorData(t){let e,i;t?(e=this.fillPatternData,i=this.fillGradientData):(e=this.strokePatternData,i=this.strokeGradientData),e&&e.patternElem&&(this.svgObj.remove(e.patternElem),e.patternElem=null,e.imageElem=null),i&&i.gradientElem&&(this.svgObj.remove(i.gradientElem),i.gradientElem=null),t?(this.fillPatternData=null,this.fillGradientData=null):(this.strokePatternData=null,this.strokeGradientData=null)}UpdatePattern(t,e){const i=e?this.fillPatternData:this.strokePatternData;if(i&&i.ID===t){i.patternElem||(i.patternElem=new T3Svg.Pattern,i.imageElem=new T3Svg.Image,i.imageElem.load(i.url),i.patternElem.add(i.imageElem),i.patternElem.attr("id",i.ID),this.svgObj.add(i.patternElem,0)),i.isImage?this.UpdateImagePattern(i):i.isTexture&&this.UpdateTexturePattern(i);const t=e?"fill":"stroke";this.svgObj.attr(t,"url(#"+i.ID+")")}}UpdateImagePattern(t){const e=this.CalcElementFrame();if(t.patternElem&&t.imageElem&&t.isImage){const i=t.imgWidth||e.width,n=t.imgHeight||e.height,s={x:t.options.cropRect.x,y:t.options.cropRect.y,width:t.options.cropRect.width||i,height:t.options.cropRect.height||n};if(t.imgWidth||t.imgHeight||(s.x=0,s.y=0),s.x<i&&s.y<n){s.width=Math.min(s.width,i-s.x),s.height=Math.min(s.height,n-s.y);let a=e.width/s.width,o=e.height/s.height;"PROPFILL"===t.options.scaleType?a>o?o=a:a=o:"PROPFIT"===t.options.scaleType?a<o?o=a:a=o:"NONE"===t.options.scaleType&&(a=1,o=1),s.x*=a,s.y*=o,s.width*=a,s.height*=o;const r=(e.width-s.width)/2-s.x,l=(e.height-s.height)/2-s.y;let h=s.width-r,c=s.height-l;h<e.width&&(h=e.width),c<e.height&&(c=e.height);const u=Utils1.RoundCoord(r/a),d=Utils1.RoundCoord(l/o),p=Utils1.RoundCoord(h+1),g=Utils1.RoundCoord(c+1),f=Utils1.RoundCoord(a),m=Utils1.RoundCoord(o);t.patternElem.attr({x:0,y:0,width:p,height:g,patternUnits:"userSpaceOnUse",preserveAspectRatio:"none meet",viewBox:"0 0 "+p+" "+g}),t.patternElem.node.setAttribute("_isImage_",!0),t.imageElem.attr({x:0,y:0,width:i,height:n,transform:"scale("+f+","+m+") translate("+u+","+d+")",preserveAspectRatio:"none"})}}}UpdateTexturePattern(t){const e=this.CalcElementFrame();let i,n,s;if(t.patternElem&&t.imageElem&&t.isTexture&&t.imgWidth&&t.imgHeight){switch(i=t.options.scale,n={x:0,y:0,width:t.imgWidth*i,height:t.imgHeight*i},s={x:0,y:0,width:n.width,height:n.height},t.options.alignment){case TextConstant.TextureAlign.TopLeft:break;case TextConstant.TextureAlign.TopCenter:s.x+=e.width/2;break;case TextConstant.TextureAlign.TopRight:s.x=e.width-n.width;break;case TextConstant.TextureAlign.CenterLeft:s.y+=e.height/2;break;case TextConstant.TextureAlign.Center:s.x+=e.width/2,s.y+=e.height/2;break;case TextConstant.TextureAlign.CenterRight:s.x=e.width-n.width,s.y+=e.height/2;break;case TextConstant.TextureAlign.BottomLeft:s.y=e.height-n.height;break;case TextConstant.TextureAlign.BottomCenter:s.x+=e.width/2,s.y=e.height-n.height;break;case TextConstant.TextureAlign.BottomRight:s.x=e.width-n.width,s.y=e.height-n.height;break;default:s.x=-e.x,s.y=-e.y}t.imageElem.attr({x:0,y:0,width:n.width,height:n.height,preserveAspectRatio:"none"}),t.patternElem.attr({x:s.x,y:s.y,width:s.width,height:s.height,patternUnits:"userSpaceOnUse",preserveAspectRatio:"none meet",viewBox:"0 0 "+n.width+" "+n.height})}}UpdateGradient(t,e){const i=this.GetGeometryBBox();let n={x:0,y:0},s={x:0,y:0},a=Math.sqrt(i.width*i.width+i.height*i.height),o=!0;const r=e?this.fillGradientData:this.strokeGradientData;if(r&&r.ID===t){if(!r.gradientElem){let t;switch(r.settings.type){case BConstant.GradientStyle.Radialfill:case BConstant.GradientStyle.Radial:t="radial";break;default:t="linear"}r.gradientElem=new T3Svg.Gradient(t),r.gradientElem.attr("id",r.ID);for(let e=0;e<r.settings.stops.length;e++){const t=r.settings.stops[e];r.gradientElem.at({offset:t.offset,color:t.color,opacity:t.opacity})}this.svgObj.add(r.gradientElem,0)}switch(o=r.settings.type===BConstant.GradientStyle.Linear,n.x=i.x,n.y=i.y,s.x=n.x+i.width,s.y=n.y+i.height,r.settings.startPos){case BConstant.GradientPos.Top:n.x+=i.width/2,s.x=n.x,a=i.height;break;case BConstant.GradientPos.RightTop:n.x=s.x,s.x=i.x;break;case BConstant.GradientPos.Right:n.x=s.x,n.y+=i.height/2,s.x=i.x,s.y=n.y,a=i.width;break;case BConstant.GradientPos.RightBottom:n.x=s.x,n.y=s.y,s.x=i.x,s.y=i.y;break;case BConstant.GradientPos.Bottom:n.x+=i.width/2,n.y=s.y,s.x=n.x,s.y=i.y,a=i.height;break;case BConstant.GradientPos.LeftBottom:n.y=s.y,s.y=i.y;break;case BConstant.GradientPos.Left:n.y+=i.height/2,s.y=n.y,a=i.width;break;case BConstant.GradientPos.Center:o&&(n.x+=i.width/2,n.y+=i.height/2,s.x=n.x,s.y=n.y,a=Math.max(i.width,i.height)/2)}if(void 0!==r.settings.angle){let t=r.settings.angle/10;if(t%=360,t<0&&(t+=360),0===t)n.x=i.x,n.y=i.y+i.height/2,s.x=i.x+i.width,s.y=i.y+i.height/2;else if(180===t)n.x=i.x+i.width,n.y=i.y+i.height/2,s.x=i.x,s.y=i.y+i.height/2;else if(90===t)n.x=i.x+i.width/2,n.y=i.y,s.x=i.x+i.width/2,s.y=i.y+i.height;else if(270===t)n.x=i.x+i.width/2,n.y=i.y+i.height,s.x=i.x+i.width/2,s.y=i.y;else{let e,a,o,r;const l=Math.tan(t*Math.PI/180),h=Math.tan((t+90)*Math.PI/180),c=i.x+i.width/2,u=i.y+i.height/2-c*l;t<90?(e=i.x,a=i.y,o=i.x+i.width,r=i.y+i.height):t<180?(e=i.x+i.width,a=i.y,o=i.x,r=i.y+i.height):t<270?(e=i.x+i.width,a=i.y+i.height,o=i.x,r=i.y):(e=i.x,a=i.y+i.height,o=i.x+i.width,r=i.y);const d=a-e*h,p=r-o*h;n.x=(d-u)/(l-h),n.y=n.x*l+u,s.x=(p-u)/(l-h),s.y=s.x*l+u}}o?r.gradientElem.attr({x1:n.x,y1:n.y,x2:s.x,y2:s.y,gradientUnits:"userSpaceOnUse"}):r.gradientElem.attr({cx:n.x,cy:n.y,r:a,gradientUnits:"userSpaceOnUse"}),e?this.svgObj.attr("fill","url(#"+r.ID+")"):this.svgObj.attr("stroke","url(#"+r.ID+")")}}RefreshPaint(t){this.fillPatternData?this.UpdatePattern(this.fillPatternData.ID,!0):this.fillGradientData&&this.UpdateGradient(this.fillGradientData.ID,!0),this.strokePatternData?this.UpdatePattern(this.strokePatternData.ID,!1):this.strokeGradientData&&this.UpdateGradient(this.strokeGradientData.ID,!1)}GetImageFillSize(){let t={width:0,height:0};return this.fillPatternData&&this.fillPatternData.isImage&&(t.width=this.fillPatternData.imgWidth,t.height=this.fillPatternData.imgHeight),t}SetStrokeColor(t){this.svgObj.attr("stroke",t),this.ClearColorData(!1)}SetTextureStroke(t){t&&t.url&&(this.ClearColorData(!1),this.strokePatternData={},this.strokePatternData.options={},this.strokePatternData.options.scale=t.scale||1,this.strokePatternData.options.alignment=t.alignment||0,this.strokePatternData.url=t.url,this.strokePatternData.ID=Utils1.MakeGuid(),this.strokePatternData.imgWidth=t.dim.x,this.strokePatternData.imgHeight=t.dim.y,this.strokePatternData.patternElem=null,this.strokePatternData.imageElem=null,this.strokePatternData.isTexture=!0,this.UpdatePattern(this.strokePatternData.ID,!1))}SetGradientStroke(t){if(t&&t.stops&&t.stops.length){this.ClearColorData(!1),this.strokeGradientData={},this.strokeGradientData.settings={},this.strokeGradientData.settings.stops=[],this.strokeGradientData.settings.type=t.type||BConstant.GradientStyle.Linear,this.strokeGradientData.settings.startPos=t.startPos||BConstant.GradientPos.LeftTop,this.strokeGradientData.settings.angle=t.angle;for(let e=0;e<t.stops.length;e++){const i=t.stops[e];this.strokeGradientData.settings.stops.push({offset:i.offset||0,color:i.color||"#fff",opacity:void 0!==i.opacity?i.opacity:1})}this.strokeGradientData.ID=Utils1.MakeGuid(),this.strokeGradientData.gradientElem=null,this.UpdateGradient(this.strokeGradientData.ID,!1)}}SetStrokeWidth(t){this.svgObj.attr("stroke-width",t),isNaN(Number(t))&&(t=Instance.Basic.Symbol.ParsePlaceholder(t,BConstant.Placeholder.LineThick)),this.strokeWidth=Number(t),this.svgObj.attr("stroke-dasharray",this.GetStrokePatternForWidth())}SetStrokePattern(t){this.strokeDashArray=t;const e=this.GetStrokePatternForWidth();this.svgObj.attr("stroke-dasharray",e)}GetStrokePatternForWidth(){const t=this.strokeWidth;let e=[];if(this.strokeDashArray&&(e=this.strokeDashArray.split(",").map((t=>Number(t.trim())))),!e.length||!t)return"none";return e.map((e=>e*t)).join(",")}SetOpacity(t){this.svgObj.attr("opacity",t)}SetFillOpacity(t){this.svgObj.attr("fill-opacity",t)}SetStrokeOpacity(t){this.svgObj.attr("stroke-opacity",t)}SetFillRule(t){this.svgObj.attr("fill-rule",t)}SetDisplayVisibility(t){const e=t?"":"hidden";this.svgObj.attr("visibility",e)}Effects(){return this.effects||(this.effects=new Effects(this)),this.effects}SetEffect(t){this.svgObj.attr("filter",`url(#${t})`)}SetEventBehavior(t){this.svgObj.attr("pointer-events",t)}GetEventBehavior(){return this.svgObj.attr("pointer-events")}ClearEventBehavior(){this.svgObj.node.removeAttribute("pointer-events")}SetCursor(t){this.cursor=t,t?this.svgObj.node.setAttribute("class",t):this.svgObj.node.removeAttribute("class")}GetCursor(){return this.cursor}ClearAllCursors(){Element$1.RemoveCursorsOnSVGObj(this.svgObj)}static RemoveCursorsOnSVGObj(t){if(t.SDGObj&&(t.SDGObj.cursor=null),t.node&&t.node.removeAttribute("class"),t instanceof T3Svg.Container){const e=t.children();for(let t=0;t<e.length;t++)Element$1.RemoveCursorsOnSVGObj(e[t])}}static SetTooltipOnElement(t,e){if(t&&t instanceof T3Svg.Container){const i=new T3Svg.Element(T3Svg.create("title"));i.node.textContent=e,t.add(i)}}}class CRect{constructor(t,e,i,n){this.h=t||0,this.v=e||0,this.hdist=i||0,this.vdist=n||0}}class DefaultStyle{constructor(){this.font="Arial",this.type="sanserif",this.size=10,this.weight="normal",this.style="normal",this.baseOffset="none",this.decoration="none",this.color="#000",this.colorTrans=1,this.spError=!1,this.dataField=null,this.hyperlink=-1}}class ParagraphFormat{constructor(){this.just="center",this.bullet="none",this.spacing=0,this.lindent=0,this.rindent=0,this.pindent=0,this.tabspace=0,this.vjust="middle"}}class PolySeg{constructor(t,e,i){this.LineType=t||OptConstant.LineType.LINE,this.dataclass=0,this.ShortRef=0,this.param=0,this.weight=0,this.dimDeflection=0,this.flags=0,this.pt={x:0,y:0},this.UserData=null,e&&(this.pt.x=e),i&&(this.pt.y=i),this.dimTextAltPositioning=!1}}var __defProp$a=Object.defineProperty,__getOwnPropDesc$a=Object.getOwnPropertyDescriptor,__decorateClass$a=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$a(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$a(e,i,a),a};class PolyList{constructor(){this.dim={x:0,y:0},this.offset={x:0,y:0},this.flags=0,this.closed=0,this.wasline=!0,this.Shape_Rotation=0,this.Shape_DataID=-1,this.Shape_TableID=-1,this.segs=[]}}__decorateClass$a([Type((()=>PolySeg))],PolyList.prototype,"segs",2);class Rectangle{constructor(t,e,i,n){this.x=t||0,this.y=e||0,this.width=i||0,this.height=n||0}}class TextObject{constructor(t){t=t||{},this.Type=StateConstant.StoredObjectType.TextObject,this.runtimeText=t.runtimeText||null,this.selrange=t.selrange||{start:0,end:0,line:0}}}const TextParams={minWidth:null,maxWidth:null,minHeight:null};class Layer$1{constructor(){this.name="",this.flags=NvConstant.LayerFlags.Visible,this.n=0,this.index=0,this.layertype=NvConstant.LayerTypes.None,this.zList=[]}}var __defProp$9=Object.defineProperty,__getOwnPropDesc$9=Object.getOwnPropertyDescriptor,__decorateClass$9=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$9(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$9(e,i,a),a};class LayersManager{constructor(){this.Type=StateConstant.StoredObjectType.LayersManagerObject,this.nlayers=0,this.layers=new Array,this.activelayer=0,this.swimlanelist=[]}}__decorateClass$9([Type((()=>Layer$1))],LayersManager.prototype,"layers",2);class Link{constructor(t,e,i){this.targetid=t||0,this.hookid=e||0,this.flags=0,this.cellid=i}}class MarginModel{constructor(t,e,i,n){this.left=t,this.top=e,this.right=i,this.bottom=n}}var __defProp$8=Object.defineProperty,__getOwnPropDesc$8=Object.getOwnPropertyDescriptor,__decorateClass$8=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$8(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$8(e,i,a),a};class PageSetting{constructor(){const t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.papersize=new Point$1(t,e),this.minsize=new Point$1(1e3,750),this.margins=new MarginModel(50,50,50,50)}}__decorateClass$8([Type((()=>Point$1))],PageSetting.prototype,"papersize",2),__decorateClass$8([Type((()=>Point$1))],PageSetting.prototype,"minsize",2),__decorateClass$8([Type((()=>MarginModel))],PageSetting.prototype,"margins",2);class FontRecord{constructor(){this.fontName="Arial",this.fontType="sanserif",this.fontSize=10,this.face=0}}var __defProp$7=Object.defineProperty,__getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$7=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$7(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$7(e,i,a),a};class SDDefault{constructor(){this.style=new QuickStyle,this.just="center",this.vjust="center",this.lf=new FontRecord,this.textflags=0,this.textgrow=NvConstant.TextGrowBehavior.ProPortional,this.fsize_min=8,this.tmargins={left:OptConstant.Common.DefTextMargin,top:OptConstant.Common.DefTextMargin,right:OptConstant.Common.DefTextMargin,bottom:OptConstant.Common.DefTextMargin},this.flags=0,this.h_arraywidth=50,this.v_arraywidth=50,this.lastcommand=0,this.arrayht=25,this.arraywd=25,this.wallThickness=0,this.curveparam=0,this.rrectparam=OptConstant.Common.DefFixedRRect,this.pen={},this.highlighter={}}}__decorateClass$7([Type((()=>QuickStyle))],SDDefault.prototype,"style",2),__decorateClass$7([Type((()=>FontRecord))],SDDefault.prototype,"lf",2);var __defProp$6=Object.defineProperty,__getOwnPropDesc$6=Object.getOwnPropertyDescriptor,__decorateClass$6=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$6(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$6(e,i,a),a};class SDGraphDefault{constructor(){this.type=NvConstant.GraphType.Bar,this.flags=NvConstant.GraphFlags.SequenceByCategory,this.pointflags=0,this.catAxisflags=NvConstant.AxisFlags.DaxShowGridLineMajor|NvConstant.AxisFlags.DaxHideMinorTicks,this.magAxisflags=NvConstant.AxisFlags.DaxShowGridLineMajor,this.legendType=NvConstant.LegendType.DaxLegendFull,this.legendlayoutflags=0,this.imagevaluerep=-1,this.quadrant=0,this.style=new QuickStyle,this.areaStyle=new QuickStyle,this.gridStyle=new QuickStyle,this.titleStyle=new QuickStyle,this.legendStyle=new QuickStyle,this.legendTitleStyle=new QuickStyle,this.catAxisStyle=new QuickStyle,this.catAxisTitleStyle=new QuickStyle,this.magAxisStyle=new QuickStyle,this.magAxisTitleStyle=new QuickStyle,this.pointStyle=new QuickStyle,this.pointLabelStyle=new QuickStyle}}__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"style",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"areaStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"gridStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"titleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"legendStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"legendTitleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"catAxisStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"catAxisTitleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"magAxisStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"magAxisTitleStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"pointStyle",2),__decorateClass$6([Type((()=>QuickStyle))],SDGraphDefault.prototype,"pointLabelStyle",2);var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$5=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$5(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$5(e,i,a),a};class SDData{constructor(){const t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.dim={x:t,y:e},this.Type=StateConstant.StoredObjectType.SDDataObject,this.flags=OptConstant.SessionFlags.LLink|OptConstant.SessionFlags.FreeHand|OptConstant.SessionFlags.NoTreeOverlap,this.tselect=-1,this.dupdisp={x:0,y:0},this.def=new SDDefault,this.graphDef=new SDGraphDefault,this.RefCon=0,this.d_sarrow=0,this.d_sarrowdisp=!1,this.d_earrow=0,this.d_earrowdisp=!1,this.d_arrowsize=1,this.centersnapalign=!0,this.hopdimindex=1,this.hopdim={x:NvConstant.HopDimX[1],y:NvConstant.HopDimY[1]},this.hopstyle=NvConstant.HopStyle.Arc,this.dimensions=NvConstant.DimensionFlags.Total,this.shapedimensions=0,this.background=new FillData,this.background.Paint.FillType=NvConstant.FillTypes.Transparent,this.bkdir=0,this.bkid=-1,this.bkcroprect={left:0,top:0,right:0,bottom:0},this.bkflags=0,this.addCount=0,this.sequencemask=0,this.sequencestep=-1,this.nsequencesteps=0,this.sequenceflags=0,this.libSelectedRestore=void 0,this.chartdirection=0,this.copyPasteTrialVers=0,this.taskmanagementflags=0,this.taskdays=7,this.forcedotted=!1,this.moreflags=0,this.fieldmask=0,this.CurrentTheme="",this.EnableSpellCheck=!0,this.rulerConfig=new RulerConfig,this.Page=new PageSetting,this.commentListId=-1,this.commentId=-1}}__decorateClass$5([Type((()=>SDDefault))],SDData.prototype,"def",2),__decorateClass$5([Type((()=>SDGraphDefault))],SDData.prototype,"graphDef",2),__decorateClass$5([Type((()=>FillData))],SDData.prototype,"background",2),__decorateClass$5([Type((()=>RulerConfig))],SDData.prototype,"rulerConfig",2),__decorateClass$5([Type((()=>PageSetting))],SDData.prototype,"Page",2);class TextureList{constructor(){this.Textures=[],this.Categories=[]}}class WinSetting{constructor(){this.updated=0,this.worigin={x:0,y:0},this.wscale=0,this.wscalemode=0,this.leftpanelmode=0}}class WResult{constructor(){this.error=0,this.coordScaleFactor=1,this.sdp=null,this.tLMB=null,this.ctp=null,this.WinSetting=new WinSetting,this.docDpi=100,this.fontlist=[],this.lpStyles=[],this.UniqueMap=[],this.zList=[],this.links=[],this.textlinks=[],this.polyid=0,this.nsegl=0,this.arrayid=0,this.GroupOffset={x:0,y:0},this.rulerConfig=null,this.WriteBlocks=!1,this.noTables=!1,this.WriteGroupBlock=!1,this.selectonly=!1,this.nblocks=0,this.BlockAction=0,this.state=0,this.delta=0,this.TextureList=[],this.LibraryPathTarget="",this.richGradients=[],this.KeepSegDir=!1,this.WriteWin32=!1}}class BaseStateOpt{constructor(){this.currentStateId=-1,this.historyState=0,this.droppedStates=0,this.states=[]}PreserveState(){}SyncObjectsWithCreateStates(){}GetUndoState(){}ExceptionCleanup(){}RestorePrevState(){}RestoreNextState(){}RestoreDataStoreFromState(){}GetCurrentState(){return null}AddToCurrentState(t){}CurrentStateReplace(t,e){}CurrentStateDelete(t){}ReplaceInCurrentState(t,e){}ResetUndoStates(){this.currentStateId=-1,this.droppedStates=0,this.historyState=0,this.states=[]}ResetToSpecificState(t){}ClearFutureUndoStates(){}DumpStates(t){}}class StateBase{constructor(t,e,i,n){this.ID=null!=t?t:-1,this.CreatedBy=e||null,this.StateType=i||null,this.IsOpen=!1,this.currentObjSeqId=T3Gv.currentObjSeqId}}class State extends StateBase{constructor(t,e,i,n,s){super(t,e,n,s),this.storedObjects=i||[]}AddStoredObject(t){if(null==t)throw new Error("Stored object is null");if(null==t.Type)throw new Error("Stored object type is null");this.storedObjects.push(Utils1.CloneBlock(t))}SetStoredObjects(t){if(null==t)throw new Error("Stored objects array is null");const e=t.map((t=>Utils1.CloneBlock(t)));this.storedObjects=e}GetStoredObjects(){return this.storedObjects.map((t=>Utils1.CloneBlock(t)))}}class StateOpt extends BaseStateOpt{constructor(){super(),this.maxUndo=T3Gv.maxUndo}PreserveState(){this.SyncObjectsWithCreateStates(),this.states[this.currentStateId].IsOpen=!1}SyncObjectsWithCreateStates(){const t=StateConstant.StateOperationType,e=Utils1.CloneBlock,i=this.states[this.currentStateId],n=i.storedObjects.length;for(let s=0;s<n;++s){const n=i.storedObjects[s];if(n.stateOptTypeId===t.CREATE){const a=e(T3Gv.stdObj.GetObject(n.ID));a.stateOptTypeId=t.CREATE,i.storedObjects[s]=a}}}GetUndoState(){const t={undo:!1,redo:!1},e=this.states.length-1;return t.undo=this.currentStateId>0,t.redo=this.currentStateId<e,t}ExceptionCleanup(){this.currentStateId>0&&this.states[this.currentStateId].IsOpen&&(this.states[this.currentStateId].IsOpen=!1,T3Gv.currentObjSeqId=this.states[this.currentStateId].currentObjSeqId,this.RestoreDataStoreFromState(),this.currentStateId--,this.currentStateId<this.states.length-1&&(this.states=this.states.slice(0,this.currentStateId+1)))}RestorePrevState(){this.currentStateId>0&&(this.RestoreDataStoreFromState(),this.currentStateId--)}RestoreNextState(){this.currentStateId<this.states.length-1&&(this.currentStateId++,this.RestoreDataStoreFromState())}RestoreDataStoreFromState(){const t=StateConstant.StateOperationType,e=Utils1.CloneBlock;try{const i=this.states[this.currentStateId],n=i.storedObjects,s=n.length;for(let a=0;a<s;++a){const s=n[a];switch(s.stateOptTypeId){case t.CREATE:if(T3Gv.stdObj.GetObject(s.ID))T3Gv.stdObj.DeleteObject(s.ID,!1);else{const t=e(s);T3Gv.stdObj.SaveObject(t,!1)}break;case t.DELETE:if(T3Gv.stdObj.GetObject(s.ID))T3Gv.stdObj.DeleteObject(s.ID,!1);else{const i=e(s);i.stateOptTypeId=t.CREATE,T3Gv.stdObj.SaveObject(i,!1)}break;case t.UPDATE:const n=e(s),o=T3Gv.stdObj.GetObject(s.ID),r=e(o);o.stateOptTypeId===t.CREATE&&(r.stateOptTypeId=t.UPDATE),T3Gv.stdObj.SaveObject(n,!1),i.storedObjects[a]=r}}}catch(i){throw i}}GetCurrentState(){return this.states[this.currentStateId]}AddToCurrentState(t){const e=State,i=StateConstant.StateOperationType;let n=!0;const s=this.GetCurrentState();let a=null;if(void 0!==s&&!0===s.IsOpen){n=!1;let e=!1,a=null;if($$1.each(s.storedObjects,((i,n)=>{if(n.ID===t.ID)return e=!0,a=n,!1})),e)switch(a.stateOptTypeId){case i.CREATE:switch(t.stateOptTypeId){case i.CREATE:this.CurrentStateReplace(t,!1);break;case i.DELETE:this.CurrentStateDelete(t);case i.UPDATE:}break;case i.DELETE:switch(t.stateOptTypeId){case i.CREATE:t.stateOptTypeId=i.UPDATE,this.CurrentStateReplace(t,!1);break;case i.DELETE:this.CurrentStateReplace(t,!1);break;case i.UPDATE:t.stateOptTypeId=i.UPDATE,this.CurrentStateReplace(t,!1)}break;case i.UPDATE:switch(t.stateOptTypeId){case i.CREATE:this.CurrentStateReplace(t,!1);break;case i.DELETE:this.CurrentStateReplace(t,!0);case i.UPDATE:}}else s.AddStoredObject(t)}if(!0===n)if(this.currentStateId<this.states.length-1&&(this.states=this.states.slice(0,this.currentStateId+1)),this.maxUndo){a=new e(this.currentStateId+1,"T3"),a.AddStoredObject(t),this.states.push(a),this.currentStateId=a.ID;let i=this.states.length;if(i>this.maxUndo){this.states.shift(),this.currentStateId--,this.droppedStates++,i=this.states.length;for(let t=0;t<i;++t)this.states[t].ID--}}else 0===this.states.length&&(a=new e(T3Gv.state.currentStateId+1,"T3"),a.AddStoredObject(t),this.states.push(a),this.currentStateId=a.ID)}CurrentStateReplace(t,e){const i=t.ID,n=Utils1.CloneBlock;if(0!==this.states.length){const s=this.states[this.currentStateId],a=s.storedObjects.length;for(let o=0;o<a;o++)if(s.storedObjects[o].ID===i){if(e)s.storedObjects[o].stateOptTypeId=t.stateOptTypeId;else{const e=n(t);s.storedObjects[o]=e}return}}}CurrentStateDelete(t){if(0!==this.states.length){const e=this.states[this.currentStateId],i=e.storedObjects.length;for(let n=0;n<i;++n)if(e.storedObjects[n].ID===t.ID)return void e.storedObjects.splice(n,1)}}GetObjectFromState(t,e){if(this.states.length>t){const i=this.states[t],n=i.storedObjects.length;for(let t=0;t<n;t++)if(i.storedObjects[t].ID===e)return i.storedObjects[t]}}ReplaceInCurrentState(t,e){if(0===this.states.length)return;const i=this.states[this.currentStateId],n=i.storedObjects.length;for(let s=0;s<n;s++)if(i.storedObjects[s].ID===t){i.storedObjects[s].Data=Utils1.DeepCopy(e.Data);break}}ResetUndoStates(){this.currentStateId=-1,this.droppedStates=0,this.historyState=0,this.states=[]}ResetToSpecificState(t){this.currentStateId=t,this.droppedStates=0,this.historyState=0,this.states=[this.states[t]]}AddToHistoryState(){this.historyState++}ClearFutureUndoStates(){this.currentStateId<this.states.length-1&&(this.states=this.states.slice(0,this.currentStateId+1))}}class DataStore{constructor(){this.storedObjects=[]}SaveObject(t,e){if(null==t)throw new Error("storedObject is null");if(null==t.Type)throw new Error("storedObject type is null");let i=void 0===e||e;try{if(-1!==t.ID){const e=this.GetObject(t.ID);null!==e?(e.Type=t.Type,e.Data=t.Data,e.Dirty=!0,e.stateOptTypeId=t.stateOptTypeId,t=e):(t.Dirty=!0,this.storedObjects.push(t))}else t.ID=this.storedObjects.length>0?Utils1.GenerateObjectID():0,t.Data&&Utils1.IsObject(t.Data)&&(t.Data.BlockID=t.ID),this.storedObjects.push(t);return i&&T3Gv.state.AddToCurrentState(t),t.ID}catch(n){throw n}}GetObject(t){if(null==t)return null;for(let e=0;e<this.storedObjects.length;e++)if(this.storedObjects[e].ID===t)return this.storedObjects[e];return null}GetObjects(t){return null!=t?this.storedObjects.filter((e=>e.Type===t)):this.storedObjects}DeleteObject(t,e){if(null==t)throw new Error("Object ID is null");const i=void 0===e||e;let n=-1;try{if(this.storedObjects.forEach(((e,i)=>{if(e.ID===t)return n=i,!1})),n>=0){const e=this.GetObject(t);e.stateOptTypeId=StateConstant.StateOperationType.DELETE,i&&T3Gv.state.AddToCurrentState(e),this.storedObjects.splice(n,1)}}catch(s){throw s}}PreserveBlock(t){return new DataObj(t,null,null,null,null,!0)}CreateBlock(t,e){return new DataObj(-1,t,e,!0,!0,!0)}SetStoredObjects(t){if(null==t)throw new Error("Stored objects is null");if(!(t instanceof Array))throw new Error("Stored objects is not an array");this.storedObjects=t}}class DataStoreFactory{Create(t){let e=new DataStore;return Array.isArray(t)&&(e.storedObjects=t),{Set:function(t){if(null===t)throw new Error("Stored objects cannot be null");if(!Array.isArray(t))throw new Error("Stored objects is not an array");e.storedObjects=t},Get:function(){return e.storedObjects},Clear:function(){e.storedObjects=[]}}}}class TEData{constructor(){this.Type=StateConstant.StoredObjectType.TDataObject,this.theActiveTextEditObjectID=-1,this.theTEWasResized=!1,this.theTEWasEdited=!1,this.theTELastOp=NvConstant.TextElemLastOpt.Init,this.theActiveTableObjectID=-1,this.theActiveTableObjectIndex=-1,this.theActiveOutlineObjectID=-1,this.theActiveGraphObjectID=-1,this.EditorID=0}}class DataOpt{static InitStoredData(){this.InitClipboard(),this.InitState(),this.InitDataStore(),this.InitCurrentSequenceId()}static InitClipboard(){}static InitState(){const t=this.LoadData(this.STATE_KEY);if(null===t)return;const e=plainToInstance(StateOpt,t);for(let i=0;i<e.states.length;i++){const t=plainToInstance(State,e.states[i]);for(let e=0;e<t.storedObjects.length;e++){const i=this.ConvertStoredObject(t.storedObjects[e]);t.storedObjects[e]=i}e.states[i]=t}T3Gv.state=e}static InitDataStore(){const t=this.LoadData(this.OBJECT_STORE_KEY);if(null===t)return;const e=plainToInstance(DataStore,t);for(let i=0;i<e.storedObjects.length;i++){const t=this.ConvertStoredObject(e.storedObjects[i]);e.storedObjects[i]=t}T3Gv.stdObj=e}static InitCurrentSequenceId(){const t=this.LoadData(this.CURRENT_OBJECT_SEQ_ID_KEY);null!==t&&(T3Gv.currentObjSeqId=t)}static ConvertStoredObject(t){const e=plainToInstance(DataObj,t),i=e.Data;if("SDData"===i.Type){const t=plainToInstance(SDData,i);e.Data=t}if("LayersManager"===i.Type){const t=plainToInstance(LayersManager,i);e.Data=t}if("TEData"===i.Type){const t=plainToInstance(TEData,i);e.Data=t}if("BaseDrawObject"===i.Type){if(1===i.DrawingObjectBaseClass)if("PolyLineContainer"===(null==i?void 0:i.T3Type)){const t=plainToInstance(Instance.Shape.PolyLineContainer,i);e.Data=t}else{const t=i.LineType;if(t==OptConstant.LineType.LINE){const t=plainToInstance(Instance.Shape.Line,i);e.Data=t}if(t==OptConstant.LineType.ARCLINE){const t=plainToInstance(Instance.Shape.ArcLine,i);e.Data=t}if(t==OptConstant.LineType.SEGLINE){const t=plainToInstance(Instance.Shape.SegmentedLine,i);e.Data=t}if(t==OptConstant.LineType.ARCSEGLINE){const t=plainToInstance(Instance.Shape.ArcSegmentedLine,i);e.Data=t}if(t==OptConstant.LineType.POLYLINE){const t=plainToInstance(Instance.Shape.PolyLine,i);e.Data=t}if(t==OptConstant.LineType.FREEHAND){const t=plainToInstance(Instance.Shape.FreehandLine,i);e.Data=t}}if(0===i.DrawingObjectBaseClass){if("Oval"===i.ShapeType){const t=plainToInstance(Instance.Shape.Oval,i);e.Data=t}if("Rect"===i.ShapeType){const t=plainToInstance(Instance.Shape.Rect,i);e.Data=t}if("Polygon"===i.ShapeType){const t=plainToInstance(Instance.Shape.Polygon,i);e.Data=t}if("GroupSymbol"===i.ShapeType){const t=plainToInstance(Instance.Shape.GroupSymbol,i);e.Data=t}if("SvgSymbol"===i.ShapeType){const t=plainToInstance(Instance.Shape.SvgSymbol,i);e.Data=t}if("ForeignObject"===i.ShapeType){const t=plainToInstance(Instance.Shape.ForeignObject,i);e.Data=t}}if(3===i.DrawingObjectBaseClass){const t=plainToInstance(Instance.Shape.Connector,i);e.Data=t}}return e}static ConvertPlanObjectToShape(t){let e;if("BaseDrawObject"===t.Type){if(1===t.DrawingObjectBaseClass)if("PolyLineContainer"===(null==t?void 0:t.T3Type)){e=plainToInstance(Instance.Shape.PolyLineContainer,t)}else{const i=t.LineType;if(i==OptConstant.LineType.LINE){e=plainToInstance(Instance.Shape.Line,t)}if(i==OptConstant.LineType.ARCLINE){e=plainToInstance(Instance.Shape.ArcLine,t)}if(i==OptConstant.LineType.SEGLINE){e=plainToInstance(Instance.Shape.SegmentedLine,t)}if(i==OptConstant.LineType.ARCSEGLINE){e=plainToInstance(Instance.Shape.ArcSegmentedLine,t)}if(i==OptConstant.LineType.POLYLINE){e=plainToInstance(Instance.Shape.PolyLine,t)}if(i==OptConstant.LineType.FREEHAND){e=plainToInstance(Instance.Shape.FreehandLine,t)}}if(0===t.DrawingObjectBaseClass){if("Oval"===t.ShapeType){e=plainToInstance(Instance.Shape.Oval,t)}if("Rect"===t.ShapeType){e=plainToInstance(Instance.Shape.Rect,t)}if("Polygon"===t.ShapeType){e=plainToInstance(Instance.Shape.Polygon,t)}if("GroupSymbol"===t.ShapeType){e=plainToInstance(Instance.Shape.GroupSymbol,t)}if("SvgSymbol"===t.ShapeType){e=plainToInstance(Instance.Shape.SvgSymbol,t)}if("ForeignObject"===t.ShapeType){e=plainToInstance(Instance.Shape.ForeignObject,t)}}if(3===t.DrawingObjectBaseClass){e=plainToInstance(Instance.Shape.Connector,t)}}return e}static SaveToLocalStorage(){LayerUtil.VisibleZList(),this.SaveData(this.CLIPBOARD_KEY,T3Gv.clipboard),this.SaveData(this.STATE_KEY,T3Gv.state),this.SaveData(this.OBJECT_STORE_KEY,T3Gv.stdObj),this.SaveData(this.CURRENT_OBJECT_SEQ_ID_KEY,T3Gv.currentObjSeqId),this.SaveDocSettingData(),this.SaveAppStateV2()}static SaveDocSettingData(){const t={docConfig:T3Gv.docUtil.docConfig,rulerConfig:T3Gv.docUtil.rulerConfig,docInfo:T3Gv.docUtil.svgDoc.docInfo};this.SaveData(this.DOC_INFO_KEY,t)}static LoadDocSettingData(){return this.LoadData(this.DOC_INFO_KEY)}static PrepareSaveData(){const t=lodash.exports.cloneDeep(toRaw(appStateV2.value));return t.itemsCount=t.items.filter((t=>0!==t.width)).length,t.selectedTargets=[],t.elementGuidelines=[],t.rulersGridVisible=rulersGridVisible.value,t}static SaveToT3000(){const t=this.PrepareSaveData();if(isBuiltInEdge.value)Hvac$1.WebClient.SaveGraphicData(null,null,t);else{if(globalMsg.value.find((t=>"get_initial_data"===t.msgType)))return;const e=Hvac$1.DeviceOpt.getCurrentDevice(),i=null==e?void 0:e.deviceId,n=null==e?void 0:e.graphic;i&&n&&Hvac$1.WsClient.SaveGraphic(i,n,t)}}static LoadData(t){const e=localStorage.getItem(t);return e?JSON.parse(e):null}static SaveData(t,e){e&&localStorage.setItem(t,JSON.stringify(e))}static SaveDataWithoutStringify(t,e){e&&localStorage.setItem(t,e)}static InitStateAndStore(){T3Gv.state=new StateOpt,T3Gv.stdObj=new DataStore,T3Gv.currentObjSeqId=0,T3Gv.clipboard=(new DataStoreFactory).Create()}static SaveAppStateV2(){const t=appStateV2.value;this.SaveData(this.APP_STATE_V2,t)}static LoadAppStateV2(){const t=this.LoadData(this.APP_STATE_V2);t&&(appStateV2.value=t)}static ClearT3LocalStorage(){localStorage.removeItem(this.CLIPBOARD_KEY),localStorage.removeItem(this.STATE_KEY),localStorage.removeItem(this.OBJECT_STORE_KEY),localStorage.removeItem(this.CURRENT_OBJECT_SEQ_ID_KEY),localStorage.removeItem(this.APP_STATE_V2),localStorage.removeItem(this.DRAW_KEY),localStorage.removeItem(this.DOC_INFO_KEY)}static LoadT3Config(){return this.LoadData(this.GLOBAL_CONFIG_KEY)||{}}static SaveT3Config(t){this.SaveData(this.GLOBAL_CONFIG_KEY,t)}static LoadT3Library(){return this.LoadData(this.LIBRARY_KEY)||[]}static SaveT3Library(t){this.SaveDataWithoutStringify(this.LIBRARY_KEY,t)}static GetSDDataDimensions(){const t=this.LoadData(this.OBJECT_STORE_KEY);if(null===t)return{x:0,y:0};const e=[];if(t.storedObjects&&Array.isArray(t.storedObjects))for(let i=0;i<t.storedObjects.length;i++){const n=t.storedObjects[i];n.Data&&"SDData"===n.Data.Type&&n.Data.dim&&"number"==typeof n.Data.dim.x&&"number"==typeof n.Data.dim.y&&e.push({x:n.Data.dim.x,y:n.Data.dim.y})}return e.reduce(((t,e)=>({x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)})),{x:0,y:0})}static SaveGrpSwitch(t){let e=this.LoadData(this.GRP_SWITCH_KEY)||[];Array.isArray(e)||(e=[]),e.push(t),this.SaveData(this.GRP_SWITCH_KEY,e)}static LoadGrpSwitch(){const t=this.LoadData(this.GRP_SWITCH_KEY);return Array.isArray(t)&&t.length>0?t[t.length-1]:null}static RemoveLatestGrpSwitch(){let t=this.LoadData(this.GRP_SWITCH_KEY)||[];if(!Array.isArray(t)||0===t.length)return null;const e=t.pop();return this.SaveData(this.GRP_SWITCH_KEY,t),e}static ClearGrpSwitch(){localStorage.removeItem(this.GRP_SWITCH_KEY)}}DataOpt.CLIPBOARD_KEY="t3.clipboard",DataOpt.STATE_KEY="t3.state",DataOpt.OBJECT_STORE_KEY="t3.dataStore",DataOpt.CURRENT_OBJECT_SEQ_ID_KEY="t3.currentObjSeqId",DataOpt.APP_STATE_V2="t3.stateV2",DataOpt.DRAW_KEY="t3.draw",DataOpt.DOC_INFO_KEY="t3.doc",DataOpt.GLOBAL_CONFIG_KEY="t3.config",DataOpt.LIBRARY_KEY="t3.library",DataOpt.GRP_SWITCH_KEY="t3.grpSwitch";class T3Util{static Log(t,...e){"prd"!==HvConstant.Default.Environment.toLowerCase()&&(null==e||e.length)}static Debug(t,...e){"prd"!==HvConstant.Default.Environment.toLowerCase()&&(null==e||e.length)}static Error(t,...e){null==e||e.length}}const _ShapeUtil=class{static LineIsReversed(t,e,i){if(null==t)return!1;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line)switch(t.LineType){case OptConstant.LineType.ARCLINE:case OptConstant.LineType.LINE:if(Math.abs(t.EndPoint.x-t.StartPoint.x)<.01)return t.EndPoint.y<t.StartPoint.y;const n=Utils2.Pt2Rect(t.EndPoint,t.StartPoint);if(Math.abs(t.EndPoint.x-n.x)<.01&&Math.abs(t.EndPoint.y-n.y)<.01||Math.abs(t.EndPoint.x-n.x)<.01&&Math.abs(t.EndPoint.y-(n.y+n.height))<.01)return!0;break;case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:if(i)break;if(e&&e.KeepSegDir)return!1;if(Math.abs(t.StartPoint.x-t.EndPoint.x)<=1){if(t.StartPoint.y>t.EndPoint.y)return!0}else if(t.StartPoint.x>t.EndPoint.x)return!0}return!1}static TextAlignToWin(t){const e={just:TextConstant.TextJust.Center,vjust:TextConstant.TextJust.Center};switch(t){case TextConstant.TextAlign.Left:e.just=TextConstant.TextJust.Left;break;case TextConstant.TextAlign.Right:e.just=TextConstant.TextJust.Right;break;case TextConstant.TextAlign.TopLeft:e.just=TextConstant.TextJust.Left,e.vjust=TextConstant.TextJust.Top;break;case TextConstant.TextAlign.TopCenter:e.vjust=TextConstant.TextJust.Top;break;case TextConstant.TextAlign.TopRight:e.just=TextConstant.TextJust.Right,e.vjust=TextConstant.TextJust.Top;break;case TextConstant.TextAlign.BottomLeft:e.just=TextConstant.TextJust.Left,e.vjust=TextConstant.TextJust.Bottom;break;case TextConstant.TextAlign.BottomCenter:e.vjust=TextConstant.TextJust.Bottom;break;case TextConstant.TextAlign.BottomRight:e.just=TextConstant.TextJust.Right,e.vjust=TextConstant.TextJust.Bottom}return e}static ToSDWinCoords(t,e){return e>1?Math.round(e*t):t}static GetLineText(t,e,i,n){let s,a,o=-1;for(a=t.lineswithtext.length,s=0;s<a;s++)if(e===t.lineswithtext[s].x&&(!i||i===t.lineswithtext[s].z))return o=t.lineswithtext[s].y,n&&(n.TextGrow=t.lineswithtext[s].TextGrow,n.TextWrapWidth=t.lineswithtext[s].TextWrapWidth,n.TextAlign=t.lineswithtext[s].TextAlign,n.just=t.lineswithtext[s].just,n.vjust=t.lineswithtext[s].vjust,n.Paint=t.lineswithtext[s].Paint),t.lineswithtext.splice(s,1),o;return-1}static ReadSymbolFromBuffer(t,e,i,n,s,a,o,r,l,h,c,u,d,p){let g,f,m,v,b,y,S,x,w,C=!1,T=new _ShapeUtil.Result,D=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),k=[];T.isTemplate=!1,T.IgnoreHeader=!0,T.sdp=new SDData,T.sdp.def.style=Utils1.DeepCopy(D.def.style),T.isSymbol=0!==p,T.tLMB=new LayersManager,T.AllowAddEMFHash=u,_ShapeUtil.FragmentLoad_RefCount=0,c&&(0==(c.ObjectAttributeFlags&DSConstant.LibraryFlags.SEDL_NoColor)&&(T.SetColorChanges=!0,T.ColorFilter=c.ColorFilter),C=!0),h&&(T.NoTextBlocks=!0),null!=e&&(T.SymbolPosition.x=e),null!=i&&(T.SymbolPosition.y=i);let $=_ShapeUtil.ReadBuffer(t,T,n,!1,_ShapeUtil.ReadSymbolFromBufferComplete);if($&&$!=_ShapeUtil.Errors.WaitingForCallBack)return s?T.error:$;if(T.WarnMeta){if(s)return _ShapeUtil.Errors.WarnMeta;LogUtil.Debug("Metafile not read")}if(d&&$!==_ShapeUtil.Errors.WaitingForCallBack&&(d.x=T.sdp.dim.x,d.y=T.sdp.dim.y),$!==_ShapeUtil.Errors.WaitingForCallBack){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0);for(g=T.zList.length,f=0;f<g;f++){let e;v=ObjectUtil$1.GetObjectPtr(T.zList[f],!1),e=t.layers[t.activelayer].zList,v.Layer=t.activelayer,e.push(T.zList[f]),ObjectUtil$1.AddToDirtyList(T.zList[f]),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&o.selectedList.push(T.zList[f]),null==T.STData&&(v.datasetTableID=-1,v.datasetElemID=-1,v.datasetID=-1,v.datasetType=-1,v.dataStyleOverride=null)}if(k.length&&ObjectUtil$1.DeleteObjects(k),T.STData&&T3Gv.opt.STData_Transfer&&T3Gv.opt.STData_Transfer(T.zList,T.STData,C),m=T.links.length,!l&&m>0){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);for(f=0;f<m;f++)t.push(T.links[f]);t.sort((function(t,e){return t.targetid-e.targetid}))}let n=0;for(f=0;f<g;f++)v=ObjectUtil$1.GetObjectPtr(T.zList[f],!1),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&(0===n?b=new Rectangle(v.r.x,v.r.y,v.r.width,v.r.height):Utils2.UnionRect(v.r,b,b),n++);if(b){if(r?T3Gv.opt.header.ClipboardType!==T3Constant.ClipboardType.LM?(y=b.x<0?-b.x:0,S=b.y<0?-b.y:0,y+=20,S+=20):(y=e-b.x,S=i-b.y):(y=0,S=0),LogUtil.Debug("= u.ShapeUtil: ReadSymbolFromBuffer/ offsetX:",y,"offsetY:",S,"PositionX:",e,"PositionY:",i,"clipboardType:",T3Gv.opt.header.ClipboardType),y||S)for(f=0;f<g;f++)v=ObjectUtil$1.GetObjectPtr(T.zList[f],!1),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&v.OffsetShape(y,S);if(r){b.x+=y,b.y+=S,y=0,S=0,x=0,w=0;const t={x:D.dim.x,y:D.dim.y};if(b.x+b.width>D.dim.x&&(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto?(y=b.x+b.width-D.dim.x,x=0):(x=b.x+b.width,D.dim.x=x)),b.y+b.height>D.dim.y&&(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto?S=b.y+b.height-D.dim.y:(w=b.y+b.height,D.dim.y=w)),x||w){const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.nlayers;let n=!1,s=!1;for(e.layers[e.activelayer].flags&NvConstant.LayerFlags.UseEdges&&(n=!0),f=0;f<i;f++)if(e.layers[f].flags&NvConstant.LayerFlags.UseEdges&&e.layers[f].flags&NvConstant.LayerFlags.Visible||n){s=!0;break}s&&T3Gv.opt.UpdateEdgeLayers([],t,D.dim),T3Gv.docUtil.ResizeDocument(D.dim.x,D.dim.y)}else if(y||S)for(f=0;f<g;f++)v=ObjectUtil$1.GetObjectPtr(T.zList[f],!1),v&&0==(v.flags&NvConstant.ObjFlags.NotVisible)&&v.OffsetShape(-y,-S)}}return!l&&r&&T3Gv.opt.UpdateLinks(),a?SvgUtil.RenderDirtySVGObjects():1===g&&T3Gv.opt.RenderDirtySVGObjectsNoSetMouse(),T.error}}static ReadBuffer(t,e,i,n,s){let a=null;try{if("string"==typeof t)if(t.startsWith("t3.draw")){const e=localStorage.getItem(t);e&&(a=JSON.parse(e))}else a=JSON.parse(t);else"object"==typeof t&&(a=t)}catch(o){return T3Util.Error("= u.ShapeUtil: ReadBuffer/ Error parsing JSON data:",o),e.error=_ShapeUtil.Errors.UnknownFile,e.error}return a&&a.signature&&a.signature===_ShapeUtil.Signature?(e.PVersion=a.version,e.FVersion=a.version,e.coordScaleFactor=1,e.updatetext=!0,a.rulerConfig&&(e.rulerConfig=a.rulerConfig),a.isBlockFormat&&(e.ReadBlocks=!0),s&&e.ValidateHashesAsync?_ShapeUtil.Errors.WaitingForCallBack:(_ShapeUtil.ReadSymbolFromBufferComplete(a,e,n),e.error)):(e.error=_ShapeUtil.Errors.UnknownFile,e.error)}static ReadSymbolFromBufferComplete(t,e,i){try{OptConstant.Common.DimMax;const n=OptConstant.ConnectorDefines.NSkip;let s,a,o,r,l,h,c,u;for(t.data&&t.data.header&&"fullDocument"===t.data.header.type&&(t.data.header.panelName&&(T3Gv.opt.header.panelName=t.data.header.panelName),t.data.header.importSourcePath&&(T3Gv.opt.header.importSourcePath=t.data.header.importSourcePath)),t.data&&t.data.structuredData&&(e.STData=t.data.structuredData),t.data&&t.data.drawing&&(t.data.drawing.styles&&t.data.drawing.styles.length>0&&(e.lpStyles=t.data.drawing.styles.map((t=>new QuickStyle(t)))),t.data.drawing.layers&&t.data.drawing.layers.length>0&&(e.tLMB.layers=t.data.drawing.layers,e.tLMB.nlayers=t.data.drawing.layers.length,e.tLMB.activelayer=t.data.drawing.activeLayer||0),t.data.drawing.objects&&t.data.drawing.objects.length>0&&t.data.drawing.objects.forEach((t=>{const i=DataOpt.ConvertPlanObjectToShape(t),n=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.BaseDrawObject,i);n.Data=Utils1.DeepCopy(n.Data),e.zList.push(n.ID),e.IDMap[t.UniqueID]=n.ID}))),0===e.error&&e.links&&e.links.length>0&&_ShapeUtil.ReMapLinks(e.IDMap,e.links,e,i),s=e.zList.length,a=0;a<s;a++){if(r=e.zList[a],l=ObjectUtil$1.GetObjectPtr(r,!1),!l)continue;l.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Texture&&void 0===l.StyleRecord.Fill.Paint.Texture&&(l.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent);let t=l.DrawingObjectBaseClass;switch(t===OptConstant.DrawObjectBaseClass.Line&&l.LineType===OptConstant.LineType.POLYLINE&&l.polylist&&l.polylist.closed&&(t=OptConstant.DrawObjectBaseClass.Shape),t){case OptConstant.DrawObjectBaseClass.Line:switch(l.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:const t={x:l.Frame.x,y:l.Frame.y};(t.x<0||t.y<0)&&l.SetShapeOrigin(3e4,3e4),l.SegLFormat(l.EndPoint,OptConstant.ActionTriggerType.SeglPreserve,0),l.CalcFrame(),(t.x<0||t.y<0)&&l.SetShapeOrigin(t.x,t.y)}break;case OptConstant.DrawObjectBaseClass.Connector:if(0===l.hooks.length&&l.arraylist&&l.arraylist.hook){if(h=l.arraylist.hook.length,c=h-n,c<0&&(c=0),h>=n)for(o=1;o<n;o++)l.arraylist.hook[o].id>=0&&c++;0===c&&e.DeleteList.push(r)}break;case OptConstant.DrawObjectBaseClass.Shape:if(l.StyleRecord.Line.BThick&&l.polylist&&l.polylist.closed&&l.polylist.segs&&l.polylist.segs.length){let t,e=[];const i=l.StyleRecord.Line.Thickness/2;if(l instanceof Instance.Shape.Polygon&&r.polylist){const e={Frame:l.Frame,inside:l.inside};t=new Instance.Shape.PolyLine(e),t.polylist=l.polylist,t.StartPoint=l.StartPoint,t.EndPoint=l.EndPoint}else t=l;const n=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,e);let s=[];if(e.length>0)for(s.push(new Point$1(n[0].x,n[0].y)),o=0;o<e.length;o++)s.push(new Point$1(n[e[o]].x,n[e[o]].y));else s=Utils1.DeepCopy(n);const a=T3Gv.opt.InflateLine(s,i,!0,!0);if(!a||0===a.length)break;l.StartPoint.x=a[0].x,l.StartPoint.y=a[0].y,l.EndPoint.x=a[a.length-1].x,l.EndPoint.y=a[a.length-1].y;const h=Utils1.DeepCopy(l.polylist.segs);for(l.polylist.segs=[],o=0;o<n.length;o++)l.polylist.segs.push(new PolySeg(1,a[o].x-l.StartPoint.x,a[o].y-l.StartPoint.y)),o<h.length&&(l.polylist.segs[o].LineType=h[o].LineType,l.polylist.segs[o].ShortRef=h[o].ShortRef,l.polylist.segs[o].dataclass=h[o].dataclass,l.polylist.segs[o].dimDeflection=h[o].dimDeflection,l.polylist.segs[o].flags=h[o].flags,l.polylist.segs[o].param=h[o].param,l.polylist.segs[o].weight=h[o].weight);if(l instanceof Instance.Shape.BaseLine)l.CalcFrame();else if(l instanceof Instance.Shape.Polygon&&l.polylist){const t=l.StyleRecord.Line.BThick;let e=l.Frame.width;e<=0&&(e=1);const i=(e+2*t)/e;let n=l.Frame.height;n<=0&&(n=1);const s=(n+2*t)/n,a=-(l.Frame.x*i-l.Frame.x+t),o=-(l.Frame.y*s-l.Frame.y+t);l.ScaleObject(a,o,null,0,i,s,!1),T3Gv.opt.CalcPolyVertices(l)}}else(e.AddEMFHash||e.isTemplate||e.isSymbol)&&l.UpdateFrame(l.Frame)}l.DataID>=0&&e.updatetext&&(SvgUtil.AddSVGObject(null,r,!0,!1),TextUtil.TextResizeCommon(r,!1,!0),u=T3Gv.opt.svgObjectLayer.GetElementById(r),u&&T3Gv.opt.svgObjectLayer.RemoveElement(u))}return e.error}catch(n){return T3Util.Error("= u.ShapeUtil: ReadSymbolFromBufferComplete/ Error processing JSON data:",n),e.error=_ShapeUtil.Errors.BadFormat,e.error}}static ReMapLinks(t,e,i,n){let s,a,o,r,l,h,c,u=[],d=DSConstant.LinkFlags.Move,p=OptConstant.ConnectorDefines.NSkip,g={};for(OptConstant.Common.DimMax,s=t.length,a=e.length-1;a>=0;a--)(t[e[a].hookid]<0||t[e[a].targetid]<0)&&e.splice(a,1);for(let f=0;f<s;f++)if(t[f]){if(r=t[f],o=ObjectUtil$1.GetObjectPtr(r,!1),o&&o.hooks)for(l=o.hooks.length,h=l-1;h>=0;h--)t[o.hooks[h].objid]&&t[o.hooks[h].objid]>0?(o.hooks[h].objid=t[o.hooks[h].objid],0!==e.length||n||(null==c&&(c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0)),T3Gv.opt.InsertLink(c,r,h,DSConstant.LinkFlags.Move))):(o.hooks.splice(h,1),o.moreflags=Utils2.SetFlag(o.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!1));if(o&&o.associd>=0&&(t[o.associd]&&t[o.associd]>0?o.associd=t[o.associd]:o.associd=-1),o&&o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&o.arraylist){l=o.arraylist.hook.length;let e=o.arraylist.styleflags&OptConstant.AStyles.Linear;if(p=OptConstant.ConnectorDefines.NSkip,e)for(h=l-1;h>p;h--)o.arraylist.hook[h].textid=o.arraylist.hook[h-1].textid,o.arraylist.hook[h-1].textid=-1;for(h=0;h<l;h++)65535===o.arraylist.hook[h].id?o.arraylist.hook[h].id=-1:o.arraylist.hook[h].id>=0&&(o.arraylist.hook[h].id=t[o.arraylist.hook[h].id]),o.arraylist.hook[h].textid>=0&&(i.ReadBlocks||i.ReadGroupBlock||(o.arraylist.hook[h].textid=_ShapeUtil.GetLineText(i,f,o.arraylist.hook[h].textid,g),g.Paint&&(o.StyleRecord.Fill.Paint=g.Paint)));n||(u.push(o),o.flags=Utils2.SetFlag(o.flags,NvConstant.ObjFlags.Obj1,!0))}if(o&&o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&o.ContainerList){l=o.ContainerList.List.length;const e=o.ContainerList.List;for(h=0;h<l;h++)null==e[h].id&&(e[h].id=-1),e[h].id>=0&&(e[h].id=t[e[h].id])}}for(a=0;a<e.length;a++)e[a].targetid=t[e[a].targetid],e[a].hookid=t[e[a].hookid],e[a].flags=d;if(e.sort((function(t,e){return t.targetid-e.targetid})),!n){const t=u.length;for(a=0;a<t;a++)o=u[a],l=o.arraylist.hook.length,l<p&&o.PrFormat(o.BlockID)}}static TextAlignToJust(t){var e={just:"center",vjust:"middle"};switch(t){case TextConstant.TextAlign.Left:e.just="left";break;case TextConstant.TextAlign.Right:e.just="right";break;case TextConstant.TextAlign.TopLeft:e.just="left",e.vjust="top";break;case TextConstant.TextAlign.TopCenter:e.vjust="top";break;case TextConstant.TextAlign.TopRight:e.just="right",e.vjust="top";break;case TextConstant.TextAlign.BottomLeft:e.just="left",e.vjust="bottom";break;case TextConstant.TextAlign.BottomCenter:e.vjust="bottom";break;case TextConstant.TextAlign.BottomRight:e.just="right",e.vjust="bottom"}return e}static WriteSelect(t,e,i,n,s){const a=new WResult;return a.sdp=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),a.tLMB=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),a.ctp=T3Gv.opt.header,a.selectonly=!0,n&&(a.KeepSegDir=!0),T3Gv.docUtil.svgDoc.GetWorkArea(),a.docDpi=T3Gv.docUtil.svgDoc.docInfo.docDpi,a.zList=t,a.noTables=e,a.richGradients=T3Gv.opt.richGradients,LayerUtil.UpdateObjectLayerIndices(a),LogUtil.Debug("= U.ShapeUtil WriteSelect result=",a),_ShapeUtil.WriteBuffer(a,!0,!0,s)}static WriteBuffer(t,e,i,n){try{const n={signature:_ShapeUtil.Signature,version:t.WriteWin32?_ShapeUtil.FVERSION2015:T3Gv.opt.FileVersion,platform:"JSON",timestamp:(new Date).getTime(),isSelectOnly:e,data:{}};t.coordScaleFactor=t.WriteWin32?_ShapeUtil.DRAWRES/T3Gv.docUtil.svgDoc.docInfo.docDpi:1,n.rulerConfig={...T3Gv.docUtil.rulerConfig,show:T3Gv.docUtil.docConfig.showRulers},t.rulerConfig=n.rulerConfig,n.data.header=e?{type:"selectOnly"}:{type:"fullDocument",panelName:T3Gv.opt.header.panelName,importSourcePath:T3Gv.opt.header.importSourcePath,BusinessModule:T3Gv.opt.header.BusinessModule,SymbolSearchString:T3Gv.opt.header.SymbolSearchString,orgcharttable:T3Gv.opt.header.orgcharttable,lpName:T3Gv.opt.header.lpName,ParentPageID:T3Gv.opt.header.ParentPageID};const s={objects:[],styles:[],layers:[]};_ShapeUtil.BuildStyleList(t),s.styles=t.lpStyles.map((t=>JSON.parse(JSON.stringify(t)))),t.tLMB&&t.tLMB.layers&&(s.layers=t.tLMB.layers.map((t=>({name:t.name,flags:t.flags,layertype:t.layertype,zList:t.zList?[...t.zList]:[]}))),s.activeLayer=t.tLMB.activelayer);const a=t.zList.length;for(let e=0;e<a;e++){const i=t.zList[e],n=ObjectUtil$1.GetObjectPtr(i,!1);if(n){const t=JSON.parse(JSON.stringify(n));if(n.DataID>0){const e=ObjectUtil$1.GetObjectPtr(n.DataID,!1);e&&(t.textContent=e.runtimeText||"")}s.objects.push(t)}}n.data.drawing=s;const o=JSON.stringify(n),r="t3.draw";return localStorage.setItem(r,o),e||i?o:r}catch(s){return T3Util.Error("= u.ShapeUtil: WriteBuffer/ Error serializing drawing to JSON:",s),null}}static BuildStyleList(t){let e,i,n,s,a,o,r,l;function h(e){let i,n,s;for(n=t.lpStyles.length,i=0;i<n;i++)if(e.Name===t.lpStyles[i].Name)return i;return s=Utils1.DeepCopy(e),t.lpStyles.push(s),n}e=t.zList.length;const c=new QuickStyle,u=Utils1.DeepCopy(c),d=Utils1.DeepCopy(c);for(null==c.Line&&(u.Line=Utils1.DeepCopy(c.Border),d.Line=Utils1.DeepCopy(c.Border)),u.Line.Thickness=0,u.Fill.Paint.FillType=NvConstant.FillTypes.Solid,u.Fill.Paint.Color=t.sdp.background.Paint.Color,a=0,s=0;s<e;s++){i=ObjectUtil$1.GetObjectPtr(t.zList[s],!1),i.tstyleindex=h(i.StyleRecord),t.UniqueMap.push(t.zList[s]),a++,(i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line||i.TextFlags&NvConstant.TextFlags.AttachB||i.TextFlags&NvConstant.TextFlags.AttachA)&&i.DataID>0&&(t.UniqueMap.push(-i.DataID),a++,null==t.TextStyleIndex&&(t.TextStyleIndex=h(u)),o=new Link(a-1,a,null),t.textlinks.push(o));const e=i.GetTextIDs();for(n=e.length,r=a,l=0;l<n;l++)t.UniqueMap.push(-e[l]),a++,null==t.TextStyleIndex&&(t.TextStyleIndex=h(u)),o=new Link(r,a,null),t.textlinks.push(o)}}static PointSizeToFontSize(t){return t*T3Gv.opt.svgDoc.GetWorkArea().docDpi/72}};let ShapeUtil=_ShapeUtil;ShapeUtil.Result=function(){this.error=0,this.ConvertOnSave=!1,this.isTemplate=!1,this.isSymbol=!1,this.IgnoreHeader=!1,this.PVersion=0,this.FVersion=0,this.coordScaleFactor=1,this.sdp=null,this.GroupOffset={x:0,y:0},this.ReadingGroup=!1,this.WinSetting=new WinSetting,this.DefTStyle={},this.DefRun={},this.DefFSize=10,this.DefLine={},this.DefBorder={},this.DefFill={},this.fontlist=[],this.zList=[],this.lpStyles=[],this.links=[],this.IDMap=[],this.textids=[],this.usedtextids=[],this.noteids=[],this.usednoteids=[],this.nativeids=[],this.imageids=[],this.usedimageids=[],this.tableids=[],this.usedtableids=[],this.graphids=[],this.usedgraphids=[],this.expandedviewids=[],this.usedexpandedviewids=[],this.Threads=[],this.ThreadIDs=[],this.objectcount=0,this.textonline=-1,this.textonlineid=-1,this.lineswithtext=[],this.SymbolPosition={x:100,y:100},this.SetSymbolOrigin=!1,this.WarnMeta=!1,this.gHash=null,this.AddEMFHash=!1,this.AllowAddEMFHash=!1,this.ValidateHashesAsync=!1,this.shapetoolindex=null,this.linetoolindex=null,this.swimlaneformat=null,this.autocontainer=null,this.actascontainer=null,this.swimlanenlanes=null,this.swimlanenvlanes=null,this.swimlanerotate=null,this.swimlanetitle=null,this.collapsetools=null,this.TextureList=new TextureList,this.NoTextBlocks=!1,this.ReadBlocks=!1,this.ReadGroupBlock=!1,this.tLMB=null,this.BlockzList=[],this.DeleteList=[],this.richGradients=[],this.hasBlockDirectory=!1,this.updatetext=!1,this.LibraryPathTarget="",this.SetColorChanges=!1,this.ColorFilter=0,this.HashRecords=[],this.PaperType="letter",this.ReadTexture=-1,this.STData=null,this.FromWindows=!1,this.SearchLibs=[],this.CurrentSymbol=null,this.SearchResults=[],this.LoadBlockList=!1,this.PaletteStatus={}},ShapeUtil.Errors={WaitingForCallBack:-2,WarnMeta:9,BadFormat:3,UnknownFile:1,Version:2},ShapeUtil.Signature="00000000";class ShapeConstant{}ShapeConstant.ObjectTypes={Shape:0,LineD:1,SegL:2,Array:3,PolyL:4,Nurbs:501,NurbsSeg:502,Ellipse:503,EllipseEnd:504,Quadbez:505,QuadbezCon:506,Cubebez:507,CubebezCon:508,Spline:509,SplineCon:510,MoveTo:600,MoveToNewPoly:601,Freehand:7,NgEvent:35,NgEventLabel:36,NgTimeLine:34,ShapeContainer:55};class HitResult{constructor(t,e,i){this.objectid=t||0,this.hitcode=e||0,this.cellid=i||0,this.segment=-1,this.pt={x:0,y:0}}}class Hook{constructor(t,e,i,n,s){this.objid=t||0,this.cellid=e||null,this.cellindex=i||0,this.hookpt=n||0,this.connect={x:0,y:0},s&&(this.connect.x=s.x||0,this.connect.y=s.y||0)}}class HookUtil{static UpdateHook(t,e,i,n,s,a){LogUtil.Debug("O.Opt UpdateHook - Input:",{objectId:t,hookIndex:e,targetObjectId:i,hookPointType:n,connectionPoint:s,cellId:a});let o,r,l,h=null,c=!1,u=!1;const d=ObjectUtil$1.GetObjectPtr(t,!0);if(null==d)return LogUtil.Debug("O.Opt UpdateHook - Output: Failed to get source object"),1;l=d.hooks.length,d.hooks.length>e&&e>=0&&(h=d.hooks[e].cellId);const p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);if(null==p)return LogUtil.Debug("O.Opt UpdateHook - Output: Failed to get links list"),1;if(i>=0){if(o=ObjectUtil$1.GetObjectPtr(i,!0),null==o)return LogUtil.Debug("O.Opt UpdateHook - Output: Failed to get target object"),1}else a=null;return e<0?d.hooks.length<d.maxhooks&&i>=0&&(e=d.hooks.length,c=!0):l>e&&(d.hooks[e].objid==i&&h==a||(r=ObjectUtil$1.GetObjectPtr(d.hooks[e].objid,!0),r&&r.ChangeTarget(d.hooks[e].objid,t,h,e,s,!1),l=d.hooks.length,this.DeleteLink(p,d.hooks[e].objid,t,h,0,!1),u=!0,l===d.hooks.length&&d.hooks.splice(e,1),e=d.hooks.length,c=!0)),i>=0&&e>=0?(e>=d.hooks.length&&d.hooks.length<d.maxhooks?d.hooks[d.hooks.length]=new Hook(i,a,-1,n,s):(d.hooks[e].connect.x=s.x,d.hooks[e].connect.y=s.y,d.hooks[e].hookpt=n,d.hooks[e].objid=i),d.ChangeHook(e,!0,s),c&&this.InsertLink(p,t,e,0),o.ChangeTarget(i,t,h,e,s,!0)):u&&(d.extraflags&OptConstant.ExtraFlags.DeleteOnUnhook&&ObjectUtil$1.DeleteObjects([d.BlockID]),d.objecttype===NvConstant.FNObjectTypes.NgEvent&&d&&d.datasetElemID>-1&&(TODO.STData.DeleteRow(d.datasetElemID),d.datasetElemID=-1)),2!==d.hooks.length&&2!==l||!d.Dimensions||ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("O.Opt UpdateHook - Output: Hook updated successfully"),0}static CNChangeHook(t,e,i,n){let s,a,o,r,l,h,c,u;LogUtil.Debug("O.Opt CNChangeHook - Input:",{sourceObjectId:t.BlockID,hookIndex:e,isAdding:i,hasHookData:!!n});let d={},p=[];if(i){if(t.hooks&&t.hooks[e]&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(o=OptAhUtil.GetParentConnector(t.BlockID,null),o>=0)){if(s=ObjectUtil$1.GetObjectPtr(o,!1),!s)return void LogUtil.Debug("O.Opt CNChangeHook - Output: Failed (no connector object)");if(s.IsFlowChartConnector())return void LogUtil.Debug("O.Opt CNChangeHook - Output: Skipped (flowchart connector)");if(l=s.arraylist.styleflags&OptConstant.AStyles.CoManager,l&&s.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip>=1)return void LogUtil.Debug("O.Opt CNChangeHook - Output: Skipped (co-manager limit reached)");if(s.IsAsstConnector())return void LogUtil.Debug("O.Opt CNChangeHook - Output: Skipped (assistant connector)");if(h=s.objecttype,c=s.subtype,a=T3Gv.opt.FindChildArray(t.BlockID,-1),a<0){if(r=OptAhUtil.GetChildConnectorStyle(t),a=OptAhUtil.AddConnector(100,100,r,t.BlockID),a>=0&&(u=ObjectUtil$1.GetObjectPtr(a,!0)),!u)return void LogUtil.Debug("O.Opt CNChangeHook - Output: Failed to create child connector");u.objecttype=h,u.subtype=c,l?(d.x=0,d.y=-OptConstant.AStyles.CoManager):d=r.connect,HookUtil.UpdateHook(a,-1,t.BlockID,r.hookpt,d,null),OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),u.PrFormat(a),ObjectUtil$1.AddToDirtyList(a)}}}else if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){const e={lindex:-1,id:-1,hookpt:0};for(;T3Gv.opt.FindChildArrayByIndex(t.BlockID,e)>=0;)a=e.id,a>=0&&0===T3Gv.opt.CN_GetNShapes(a)&&(p.push(a),ObjectUtil$1.DeleteObjects(p,!1))}LogUtil.Debug("O.Opt CNChangeHook - Output: Operation completed")}static RemoveHook(t,e,i){LogUtil.Debug("O.Opt RemoveHook - Input:",{objectId:t,targetObjectId:e,targetCellId:i});const n=ObjectUtil$1.GetObjectPtr(t,!0);if(null==n)return LogUtil.Debug("O.Opt RemoveHook - Output: Failed to get object (1)"),1;for(let s=0;s<n.hooks.length;s++)if(n.hooks[s].objid==e){if(null!==i&&i!==n.hooks[s].cellid)continue;n.ChangeHook(s,0,n.hooks[s].connect),n.hooks.splice(s,1);break}return LogUtil.Debug("O.Opt RemoveHook - Output: Hook removed successfully (0)"),0}static AddToHookList(t,e,i,n,s,a,o){let r,l,h,c,u,d;LogUtil.Debug("O.Opt AddToHookList - Input:",{linksListLength:t.length,hookListCount:e.length,startLinkIndex:i,targetId:n,listCode:s,recursionLevel:a,hasBoundingRect:!!o});let p={},g=!1;for(;i<t.length&&t[i].targetid==n;){if(r=t[i].hookid,d=ObjectUtil$1.GetObjectPtr(r,!1),d){switch(l=-1,s){case NvConstant.ListCodes.MoveHook:case NvConstant.ListCodes.MoveTarg:if(2==d.hooks.length&&(u=d.hooks[0].objid===n?d.hooks[1].objid:d.hooks[0].objid,g=!1,e.indexOf(u)<0))break;g=!0;break;case NvConstant.ListCodes.CircTarg:case NvConstant.ListCodes.TopOnly:case NvConstant.ListCodes.MoveTargAndLines:g=!0}if(e.indexOf(r)>=0&&(g=!1),g){if(l<0)for(h=0;h<d.hooks.length;h++)if(d.hooks[h].objid==n){l=h;break}if(l>=0&&d.hooks[l].objid==n){e.push(r);const i=d.GetListOfEnclosedObjects(!0);if(i.length&&this.JoinHookList(e,i),!o||d.flags&NvConstant.ObjFlags.NotVisible||(p=d.GetMoveRect(!0,!0),o=Utils2.UnionRect(o,p,o)),s!==NvConstant.ListCodes.TopOnly&&(c=OptCMUtil.FindLink(t,r,!0),c>=0&&(e=this.AddToHookList(t,e,c,r,s,a+1,o)),d.hooks.length>1&&s!==NvConstant.ListCodes.CircTarg&&(e=this.GetTargetList(r,t,e,o,s))),s===NvConstant.ListCodes.CircTarg&&0===a&&d.hooks.length>1)for(h=0;h<d.hooks.length;h++)if(h!==l){if(d.hooks[h].objid==d.hooks[l].objid)break;e.push(d.hooks[l].objid)}}}}i++}return LogUtil.Debug("O.Opt AddToHookList - Output: Updated hook list with",e.length,"items"),e}static HandleHookedObjectMoving(t,e){LogUtil.Debug("O.Opt HandleHookedObjectMoving - Input:",{drawingObjectId:t.BlockID,boundingBox:e});let i=0,n=0,s=null;if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0&&(s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1))&&s.HookedObjectMoving&&s.HookedObjectMoving({linkParams:T3Gv.opt.linkParams,movingShapeID:t.BlockID,movingShapeBBox:e}),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndexHistory.length>0)for(n=T3Gv.opt.linkParams.ConnectIndexHistory.length,i=0;i<n;i++)T3Gv.opt.linkParams.ConnectIndexHistory[i]!==T3Gv.opt.linkParams.ConnectIndex&&(s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndexHistory[i],!1),s&&s.HookedObjectMoving&&s.HookedObjectMoving({linkParams:T3Gv.opt.linkParams,movingShapeID:t.BlockID,movingShapeBBox:e}));LogUtil.Debug("O.Opt HandleHookedObjectMoving - Output: Notified connected objects")}static HiliteConnect(t,e,i,n,s,a){LogUtil.Debug("O.Opt HiliteConnect - Input:",{objectId:t,connectIndex:e,shouldHighlight:i,connectPoint:n,hookPointType:s,cellId:a});let o=t,r=null,l=null,h=null,c=null;if(r=ObjectUtil$1.GetObjectPtr(t,!1),null==r)return void LogUtil.Debug("O.Opt HiliteConnect - Output: No drawing object found");const u=!!(r.flags&NvConstant.ObjFlags.ContConn||null!=a);if(l=T3Gv.opt.svgObjectLayer.GetElementById(o),null!=l&&null!=l.GetElementById(OptConstant.SVGElementClass.Shape))if(c="hilite_"+o,h=T3Gv.opt.svgHighlightLayer.GetElementById(c),null==h&&i)if(h=r.CreateConnectHilites(T3Gv.opt.svgDoc,t,e,n,s,a),null!=h){T3Gv.opt.svgHighlightLayer.AddElement(h);try{u||h.SetRotation(r.RotationAngle)}catch(d){throw d}LogUtil.Debug("O.Opt HiliteConnect - Output: Highlight added")}else LogUtil.Debug("O.Opt HiliteConnect - Output: Failed to create highlight");else null==h||i?LogUtil.Debug("O.Opt HiliteConnect - Output: No change needed"):(T3Gv.opt.svgHighlightLayer.RemoveElement(h),LogUtil.Debug("O.Opt HiliteConnect - Output: Highlight removed"));else LogUtil.Debug("O.Opt HiliteConnect - Output: No SVG element found")}static MoveLinks(t,e,i,n){let s,a,o,r,l,h,c,u,d,p;LogUtil.Debug("O.Opt MoveLinks - Input:",{targetObjectId:t,sourceObjectId:e,linkIndices:i?i.length:"null",hasHookResults:!!n});let g=[],f={},m=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0);if(null==m)return LogUtil.Debug("O.Opt MoveLinks - Output: Failed (no links list)"),1;if(l=m.length,null==ObjectUtil$1.GetObjectPtr(e,!1))return LogUtil.Debug("O.Opt MoveLinks - Output: Failed (source object not found)"),1;if(null==(a=ObjectUtil$1.GetObjectPtr(t,!1)))return LogUtil.Debug("O.Opt MoveLinks - Output: Failed (target object not found)"),1;if(null==i&&(i=[],d=OptCMUtil.FindLink(m,e,!0),d>=0))for(;d<l&&m[d].targetid===e;)i.push(d),d++;if(i.length>=0){for(let s=0;s<i.length;s++)if(r=i[s],h=m[r].hookid,h>=0){if(c=ObjectUtil$1.GetObjectPtr(h,!0),null==c)continue;if(c.flags&NvConstant.ObjFlags.NoMaintainLink)continue;for(u=0;u<c.hooks.length;u++)if(c.hooks[u].objid===e){if(o=c.HookToPoint(c.hooks[u].hookpt,null),n){f={pt:o,obj:c,index:u},n.push(f);continue}c.objecttype!==NvConstant.FNObjectTypes.Multiplicity?(g=a.GetTargetPoints(o,NvConstant.HookFlags.LcNoSnaps,null),g&&g.length&&(c.hooks[u].connect.x=g[0].x,c.hooks[u].connect.y=g[0].y),c.hooks[u].objid=t,m[r].targetid=t):(m[r].flags=Utils2.SetFlag(m[r].flags,DSConstant.LinkFlags.Move,!0),c.hooks[u].objid=t,m[r].targetid=t)}}do{for(p=!1,u=0;u<l-1;u++)m[u].targetid>m[u+1].targetid&&(p=!0,s=m[u+1],m[u+1]=m[u],m[u]=s)}while(p)}return LogUtil.Debug("O.Opt MoveLinks - Output: Links moved successfully"),0}static InsertLink(t,e,i,n){LogUtil.Debug("O.Opt InsertLink - Input:",{linksList:null==t?void 0:t.length,hookObjectId:e,hookIndex:i,flagValue:n});const s=ObjectUtil$1.GetObjectPtr(e,!1);if(null==s)return LogUtil.Debug("O.Opt InsertLink - Output: Failed to get hook object (1)"),1;if(i<0||i>=s.hooks.length)return LogUtil.Debug("O.Opt InsertLink - Output: Invalid hook index (1)"),1;const a=s.hooks[i].objid;let o=OptCMUtil.FindLink(t,a,!1);if(o>=0){for(;o<t.length&&t[o].targetid===a;){if(t[o].hookid==e)return LogUtil.Debug("O.Opt InsertLink - Output: Link already exists (1)"),1;o++}const r=new Link(a,e,s.hooks[i].cellid);n&&(r.flags=n),t.splice(o,0,r)}return LogUtil.Debug("O.Opt InsertLink - Output: Link inserted successfully (0)"),0}static MoveConnectHilite(t,e,i){let n,s;LogUtil.Debug("O.Opt MoveConnectHilite - Input:",{objectId:t,connectionPoint:e,hookPointType:i});let a=null,o=null,r=null,l=[],h=T3Gv.opt.svgDoc.docInfo.docToScreenScale,c=0;n=t,T3Gv.opt.svgDoc.docInfo.docScale<=.5&&(h*=2),a=ObjectUtil$1.GetObjectPtr(t,!1),null!=a&&(c=a instanceof Instance.Shape.BaseLine?OptConstant.Common.ConnPointLineDim/h:OptConstant.Common.ConnPointDim/h,l.push(e),s=a.GetPerimPts(t,l,null,!1,i,-1),null!=T3Gv.opt.svgObjectLayer.GetElementById(n).GetElementById(OptConstant.SVGElementClass.Shape)&&(r="hilite_"+n,o=T3Gv.opt.svgHighlightLayer.GetElementById(r),o&&o.SetPos(s[0].x-c,s[0].y-c))),LogUtil.Debug("O.Opt MoveConnectHilite - Output: Highlight moved to",s?s[0]:"null")}static DeleteLink(t,e,i,n,s,a){LogUtil.Debug("O.Opt DeleteLink - Input:",{targetId:e,hookObjectId:i,cellId:n,hookPointType:s,skipHookRemoval:a});let o=OptCMUtil.FindLink(t,e,!0),r=!1,l=-1;if(void 0===e&&(i=-1),o>=0)for(;o<t.length&&t[o].targetid===e;)-1===i||t[o].hookid===i?(r=!0,l=t[o].hookid,null!=n&&(r=n===t[o].cellid),l>=0&&0!==s&&(r=this.IsHookType(l,e,s)),r?(l>=0&&!a&&this.RemoveHook(l,e,n),t.splice(o,1)):o++):o++;return LogUtil.Debug("O.Opt DeleteLink - Output: Links deleted successfully"),0}static HasExistingLink(t,e){function i(t,e){const i=ObjectUtil$1.GetObjectPtr(t,!1);for(let n=0;n<i.hooks.length;n++)if(i.hooks[n].objid==e)return!0;return!1}LogUtil.Debug("O.Opt HasExistingLink - Input:",{objectId1:t,objectId2:e});const n=!(!i(t,e)&&!i(e,t));return LogUtil.Debug("O.Opt HasExistingLink - Output:",n),n}static VerifyLink(t,e){LogUtil.Debug("O.Opt VerifyLink - Input:",{sourceObjectId:t.BlockID,linkData:e});const i=ObjectUtil$1.GetObjectPtr(e.targetid,!1),n=DSConstant.LinkFlags;if(null==i)return e.flags=Utils2.SetFlag(e.flags,n.DeleteLink,!0),LogUtil.Debug("O.Opt VerifyLink - Output: Target object doesn't exist (-1)"),-1;for(let s=0;s<t.hooks.length;s++)if(t.hooks[s].objid===e.targetid&&t.hooks[s].cellid===e.cellid)return null===t.hooks[s].cellid?(LogUtil.Debug("O.Opt VerifyLink - Output: Valid link found at index",s),s):(e.flags=Utils2.SetFlag(e.flags,n.DeleteLink,!0),LogUtil.Debug("O.Opt VerifyLink - Output: Cell doesn't exist (-1)"),-1);return LogUtil.Debug("O.Opt VerifyLink - Output: No matching hook found (-1)"),-1}static CleanupHooks(t,e){LogUtil.Debug("O.Opt CleanupHooks - Input:",{connectorId:t,shapeId:e});const i=ObjectUtil$1.GetObjectPtr(t,!1),n=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&!(i.arraylist.styleflags&OptConstant.AStyles.FlowConn)>0&&n&&n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){const i=T3Gv.opt.FindChildArray(e,t);if(i>=0&&0===T3Gv.opt.CN_GetNShapes(i)){const t=[];return t.push(i),ObjectUtil$1.DeleteObjects(t,!1),void LogUtil.Debug("O.Opt CleanupHooks - Output: Deleted orphaned connector",i)}}LogUtil.Debug("O.Opt CleanupHooks - Output: No cleanup needed")}static FindAllChildConnectors(t,e){LogUtil.Debug("O.Opt FindAllChildConnectors - Input:",{objectId:t,linksList:e});const i={lindex:-1,id:-1,hookpt:0},n=[];for(;T3Gv.opt.FindChildArrayByIndex(t,i,e)>0;)n.push(i.id);return LogUtil.Debug("O.Opt FindAllChildConnectors - Output:",n),n}static MaintainLink(t,e,i,n,s){let a,o;LogUtil.Debug("O.Opt MaintainLink - Input:",{targetId:t,drawingObject:e.BlockID,triggerType:n,maintainMode:s});let r=0,l={},h=[],c=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0);if(c&&e.AllowMaintainLink())if(a=OptCMUtil.FindLink(c,t,!0),a<0)LogUtil.Debug("O.Opt MaintainLink - Output: No links found for targetId",t);else{for(;a<c.length&&c[a].targetid===t;)if(o=ObjectUtil$1.GetObjectPtr(c[a].hookid,!1),o)if(o.associd===t&&o.flags&NvConstant.ObjFlags.Assoc)a++;else if(o.flags&NvConstant.ObjFlags.NoMaintainLink)a++;else{for(let u=0;u<o.hooks.length;u++)if(o.hooks[u].objid===t){let d=s;if(2===s&&(d=!(o.hooks[u].hookpt!==OptConstant.HookPts.KAT||o.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape||e instanceof Instance.Shape.PolyLineContainer)),l=o.HookToPoint(o.hooks[u].hookpt,null),!1===e.MaintainPoint(l,t,i,o,n)){a++;continue}if(d||(r=NvConstant.HookFlags.LcNoSnaps,r=Utils2.SetFlag(r,NvConstant.HookFlags.LcShapeOnLine,!(o instanceof Instance.Shape.BaseLine)),h=e.GetTargetPoints(l,r,null),h&&(o.hooks[u].connect.x=h[0].x,o.hooks[u].connect.y=h[0].y)),e.TextFlags&NvConstant.TextFlags.HorizText&&o instanceof Instance.Shape.BaseShape){let t=e.GetApparentAngle(l);t%=180;let i=o.RotationAngle,n=(t+180)%360;t=T3Gv.opt.GetAngleSmallestDiff(t,i)<T3Gv.opt.GetAngleSmallestDiff(n,i)?t:n,Math.abs(i-t)>2&&Math.abs(i-Math.abs(t-180))>2&&(T3Gv.stdObj.PreserveBlock(c[a].hookid),o.RotationAngle=t,ObjectUtil$1.AddToDirtyList(o.BlockID))}}a++}else a++;LogUtil.Debug("O.Opt MaintainLink - Output: Links maintained successfully")}else LogUtil.Debug("O.Opt MaintainLink - Output: No links or link maintenance not allowed")}static ResizeSetLinkFlag(t,e){LogUtil.Debug("O.Opt ResizeSetLinkFlag - Input:",{objectId:t,flagValue:e});const i=ObjectUtil$1.GetObjectPtr(t,!1);if(i&&i.hooks.length){const t=i.hooks[0].objid,e=ObjectUtil$1.GetObjectPtr(t,!1);e&&(e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||e instanceof Instance.Shape.ShapeContainer)&&OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move)}OptCMUtil.SetLinkFlag(t,e),LogUtil.Debug("O.Opt ResizeSetLinkFlag - Output: Link flags updated")}static MoveGetHookPoints(t,e,i,n){LogUtil.Debug("O.Opt MoveGetHookPoints - Input:",{objectId:t,drawingObject:e?e.BlockID:null,deltaX:i,deltaY:n});const s=[],a=[];let o=!1,r=!1,l=!1;const h=OptConstant.ExtraFlags,c=OptConstant.Common.DimMax;if(null==e)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (No drawing object)"),null;if(null==T3Gv.opt.linkParams)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (No link parameters)"),null;if(e.hooks&&2===e.hooks.length)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (Object already has 2 hooks)"),null;if(e.flags&NvConstant.ObjFlags.Assoc)return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (Object is associated)"),null;if(e.PreventLink())return LogUtil.Debug("O.Opt MoveGetHookPoints - Output: null (Object prevents linking)"),null;!e.AllowLink()&&T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ArraysOnly=!0);const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(u&&(o=u.flags&OptConstant.SessionFlags.AttLink&&e.hookflags&NvConstant.HookFlags.LcAttachToLine,r=u.flags&OptConstant.SessionFlags.FreeHand,l=DrawUtil.AllowAutoInsert()),o=!!(e.flags&NvConstant.ObjFlags.DropOnBorder||e.flags&NvConstant.ObjFlags.DropOnTable),o||l){if(o&&(T3Gv.opt.linkParams.DropOnLine=!0),s.push(new Point$1(e.attachpoint.x,e.attachpoint.y)),e.extraflags&(h.FlipHoriz|h.FlipVert)){const t=new Rectangle(0,0,c,c);T3Gv.opt.FlipPoints(t,e.extraflags,s)}T3Gv.opt.linkParams.cpt=e.GetPerimPts(t,s,OptConstant.HookPts.KAT,!1,null,-1),T3Gv.opt.linkParams.cpt&&T3Gv.opt.linkParams.cpt.length>0&&(T3Gv.opt.linkParams.cpt[0].id=OptConstant.HookPts.KAT,T3Gv.opt.linkParams.cpt[0].x+=i,T3Gv.opt.linkParams.cpt[0].y+=n)}e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(a.push(new Point$1(c/2,0)),T3Gv.opt.linkParams.ContainerPt=e.GetPerimPts(t,a,OptConstant.HookPts.KAT,!1,null,-1),T3Gv.opt.linkParams.ContainerPt&&T3Gv.opt.linkParams.ContainerPt.length>0&&(T3Gv.opt.linkParams.ContainerPt[0].id=OptConstant.HookPts.KAT,T3Gv.opt.linkParams.ContainerPt[0].x+=i,T3Gv.opt.linkParams.ContainerPt[0].y+=n)),T3Gv.opt.linkParams.AllowJoin=r&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line;const d=e.GetHookPoints(!0),p=e.GetPerimPts(t,d,0,!1,null,-1);for(let g=0;g<p.length;g++)p[g].x+=i,p[g].y+=n;return LogUtil.Debug("O.Opt MoveGetHookPoints - Output:",{pointCount:p.length,allowDropOnLine:T3Gv.opt.linkParams.DropOnLine,allowJoin:T3Gv.opt.linkParams.AllowJoin}),p}static HandleMultipleSelectionHooks(){LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);if(t.length<=1)return LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Output: false (Only one object selected)"),!1;let e,i,n,s,a,o,r,l=null,h=[],c=[];const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);if(T3Gv.opt.linkParams.ConnectIndex>=0){if(l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1),l&&l instanceof Instance.Shape.ShapeContainer){i=T3Gv.opt.linkParams.ConnectIndex,s=t.length;const d=l.ContainerList.flags&NvConstant.ContainerListFlags.Sparse;if(u.hooks.length&&u.hooks[0].objid===i){for(a=0;a<s;a++)if(n=t[a],n!==T3Gv.opt.dragTargetId&&(e=ObjectUtil$1.GetObjectPtr(n,!1),e.hooks.length&&e.hooks[0].objid===i))if(d){const t=T3Gv.opt.linkParams.ConnectPt.x-u.hooks[0].connect.x,i=T3Gv.opt.linkParams.ConnectPt.y-u.hooks[0].connect.y;(t||i)&&(h.push(n),o=e.hooks[0].connect.x+t,r=e.hooks[0].connect.y+i,o<0&&(o=0),c.push({x:o,y:r}))}else o=T3Gv.opt.linkParams.ConnectPt.x,o<0&&(o=0),h.push(n),c.push({x:o,y:T3Gv.opt.linkParams.ConnectPt.y+h.length})}else for(a=0;a<s;a++)n=t[a],n!==T3Gv.opt.dragTargetId&&(e=ObjectUtil$1.GetObjectPtr(n,!1),l.IsShapeContainer(e)&&(h.push(n),o=T3Gv.opt.linkParams.ConnectPt.x,o<0&&(o=0),c.push({x:o,y:T3Gv.opt.linkParams.ConnectPt.y+h.length})))}}else if(u.hooks.length>0&&(i=u.hooks[0].objid,l=ObjectUtil$1.GetObjectPtr(i,!1),l&&l instanceof Instance.Shape.ShapeContainer))for(s=t.length,a=0;a<s;a++)n=t[a],n!==T3Gv.opt.dragTargetId&&(e=ObjectUtil$1.GetObjectPtr(n,!1),e.hooks.length&&e.hooks[0].objid===i&&(h.push(n),c.push(e.hooks[0].connect)));const d=h.length;if(d>0){for(h.unshift(T3Gv.opt.dragTargetId),c.unshift(T3Gv.opt.linkParams.ConnectPt),a=0;a<d+1;a++)n=h[a],this.UpdateHook(n,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,c[a],T3Gv.opt.linkParams.ConnectInside),OptCMUtil.SetLinkFlag(T3Gv.opt.linkParams.ConnectIndex,DSConstant.LinkFlags.Move),this.CleanupHooks(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectIndex);return LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Output: true (Multiple hooks updated)"),!0}return LogUtil.Debug("O.Opt HandleMultipleSelectionHooks - Output: false (No matching objects found)"),!1}static JoinHookList(t,e){if(LogUtil.Debug("O.Opt JoinHookList - Input:",{targetList:t,sourceList:e}),null!=t&&null!=e)for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i]);LogUtil.Debug("O.Opt JoinHookList - Output: Lists joined")}static GetHookList(t,e,i,n,s,a){LogUtil.Debug("O.Opt GetHookList - Input:",{objectId:i,listCode:s,hookListLength:e?e.length:0,boundsRect:a});let o=!1,r=!1,l=-1,h={};switch(s===NvConstant.ListCodes.ChildrenOnly&&(r=!0,s=NvConstant.ListCodes.CircTarg),s===NvConstant.ListCodes.LinesOnly&&(r=!0,s=NvConstant.ListCodes.TopOnly),s){case NvConstant.ListCodes.MoveTarg:if((n.hooks.length>1||1===n.hooks.length&&n.flags&NvConstant.ObjFlags.Assoc)&&(s=NvConstant.ListCodes.MoveHook),e.indexOf(i)>=0)return LogUtil.Debug("O.Opt GetHookList - Output: Object already in list",e),e;break;case NvConstant.ListCodes.MoveHook:if(e.indexOf(i)>=0)return LogUtil.Debug("O.Opt GetHookList - Output: Object already in list",e),e;break;case NvConstant.ListCodes.MoveTargAndLines:case NvConstant.ListCodes.CircTarg:break;case NvConstant.ListCodes.TargOnly:o=!0,l=-1}if(o||(l=OptCMUtil.FindLink(t,i,!0)),e.indexOf(i)<0&&!r){e.push(i),!a||n.flags&NvConstant.ObjFlags.NotVisible||(h=n.GetMoveRect(!0,!0),1===e.length?Utils2.CopyRect(a,h):a=Utils2.UnionRect(a,h,a));const t=n.GetListOfEnclosedObjects(!0);t.length&&T3Gv.opt.JoinHookList(e,t)}return l>=0&&this.AddToHookList(t,e,l,i,s,0,a),s===NvConstant.ListCodes.MoveHook&&(n.hooks.length>=2||n.flags&NvConstant.ObjFlags.Assoc)&&this.GetTargetList(i,t,e,a,s),LogUtil.Debug("O.Opt GetHookList - Output: Hook list updated",{hookListLength:e.length,boundsRect:a}),e}static UpdateLineHops(t){LogUtil.Debug("O.Opt UpdateLineHops - Input:",{forceUpdate:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(e.flags&OptConstant.SessionFlags.AllowHops){this.HideHopTargets();const i=LayerUtil.VisibleZList(),n=i.length,s=[],a=[],o=e.hopdim.x;let r=0,l=0,h=-1,c=0;for(let e=0;e<n;e++){const n=i[e],o=ObjectUtil$1.GetObjectPtr(n,!1);o instanceof Instance.Shape.BaseLine&&!(o instanceof Instance.Shape.PolyLine)&&((o.flags&NvConstant.ObjFlags.LineMod||t)&&-1===h&&(h=-2),s.push(n),r++,o.flags&NvConstant.ObjFlags.LineHop&&(-2===h&&(c=l,h=-3),a.push(n),l++),o.flags=Utils2.SetFlag(o.flags,NvConstant.ObjFlags.LineMod,!1))}if(l&&-3===h)for(let t=c;t<l;t++){const e=a[t],i=ObjectUtil$1.GetObjectPtr(e,!1);i.hoplist.nhops=0,i.hoplist.hops=[];for(let t=0;t<r&&s[t]!==e;t++){let n=!1;for(let e of i.hooks)if(e.objid===s[t]){n=!0;break}if(!n){const i=ObjectUtil$1.GetObjectPtr(s[t],!1);for(let t of i.hooks)if(t.objid===e){n=!0;break}}if(!n){const e={},n={};Utils2.CopyRect(e,i.r),Utils2.CopyRect(n,ObjectUtil$1.GetObjectPtr(s[t],!1).r),0===e.width&&(e.width=1),0===e.height&&(e.height=1),0===n.width&&(n.width=1),0===n.height&&(n.height=1),Utils2.IntersectRect(e,n)&&i.CalcLineHops(ObjectUtil$1.GetObjectPtr(s[t],!1),0)}}if(i.hoplist.nhops>1){i.hoplist.hops.sort(this.Hop_Compare);for(let t=i.hoplist.nhops-1;t>0;t--){const e=i.hoplist.hops[t-1].pt.x-i.hoplist.hops[t].pt.x,n=i.hoplist.hops[t-1].pt.y-i.hoplist.hops[t].pt.y;Utils2.Sqrt(e*e+n*n)<3*o&&(i.hoplist.hops[t-1].cons=!0)}}if(i.hoplist.nhops||i.hoplist.hops.length){const t=Utils2.Pt2Rect(i.StartPoint,i.EndPoint);for(let e=0;e<i.hoplist.nhops;e++)i.hoplist.hops[e].pt.x-=t.x,i.hoplist.hops[e].pt.y-=t.y;ObjectUtil$1.AddToDirtyList(e)}}}LogUtil.Debug("O.Opt UpdateLineHops - Output: Completed updating line hops")}static FixAnyCircularHooks(t){LogUtil.Debug("O.Opt FixAnyCircularHooks - Input:",{initialLinkObject:t});const e=t?[t.BlockID]:(()=>{const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);let e=[];const i=t.length;for(let n=0;n<i;n++)e.includes(t[n].hookid)||e.push(t[n].hookid);return e})();let i=[];const n=e.length;for(let r=0;r<n;r++)s(i,e[r]);function s(t,e,i=[]){i.push(e);const n=ObjectUtil$1.GetObjectPtr(e,!1);if(!n)return;const r=n.hooks.length;for(let l=0;l<r;l++){const r=n.hooks[l].objid;i.indexOf(r)>=0?o(t,e,r):s(t,r,a(i))}}function a(t){let e=[];for(let i=0;i<t.length;i++)e[i]=t[i];return e}function o(t,e,i){t.some((t=>t.objectId===e&&t.hookObjectId===i))||t.push({objectId:e,hookObjectId:i})}!function(t){const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),i=t.length;for(let n=0;n<i;n++){const i=ObjectUtil$1.GetObjectPtr(t[n].objectId,!0),s=ObjectUtil$1.GetObjectPtr(t[n].hookObjectId);if(s instanceof Instance.Shape.Connector){ObjectUtil$1.DeleteObjects([s.BlockID],!1);continue}i.hooks=i.hooks.filter((e=>e.objid!=t[n].hookObjectId));const a=T3Gv.opt.FindExactLink(e,t[n].hookObjectId,t[n].objectId);a>=0&&(e[a].flags=Utils2.SetFlag(e[a].flags,DSConstant.LinkFlags.DeleteTarget,!0))}}(i),LogUtil.Debug("O.Opt FixAnyCircularHooks - Output: Circular hooks fixed",{circularHookPairs:i})}}class ToolAct2Util{static GroupSelectedShapes(t,e,i,n,s){let a,o=!1,r=[],l=LayerUtil.ActiveVisibleZList();i&&(l=LayerUtil.ZList());let h=l.length;if(0===h)return!1;if((e||T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data).length<=1)return!1;const c=e||SelectUtil.GetMoveList(-1,!0,!0,!1,{},!1),u=function(t){const e=[];for(let i=0,n=t.length;i<n;i++){const n=ObjectUtil$1.GetObjectPtr(t[i],!0);(n.Dimensions&NvConstant.DimensionFlags.Always||n.Dimensions&NvConstant.DimensionFlags.Select)&&(e.push({index:i,dimensions:n.Dimensions}),n.Dimensions=0,n.UpdateFrame())}return e}(c),d=T3Gv.opt.GetListSRect(c);!function(t,e){for(let i=0,n=e.length;i<n;i++){const n=ObjectUtil$1.GetObjectPtr(t[e[i].index],!0);n.Dimensions=e[i].dimensions,n.UpdateFrame()}}(c,u);const p=[];for(a=0;a<h;a++)-1!==c.indexOf(l[a])&&p.push(l[a]);const g=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);let f=null;const m=p.length;for(a=0;a<m;a++){f=ObjectUtil$1.GetObjectPtr(p[a],!0),f.commentId>=0&&r.push(f.commentId);const t=f.Frame;if(t.x-=d.x,t.y-=d.y,f.NoRotate()&&(o=!0),f.bInGroup=!0,(f instanceof Instance.Shape.BaseLine||f instanceof Instance.Shape.Connector||void 0!==f.StartPoint&&void 0!==f.EndPoint)&&(f.StartPoint.x-=d.x,f.StartPoint.y-=d.y,f.EndPoint.x-=d.x,f.EndPoint.y-=d.y),f.NativeID>=0&&f.ShapeType===OptConstant.ShapeType.GroupSymbol){const t=T3Gv.stdObj.PreserveBlock(f.NativeID);t&&t.Delete(),f.NativeID=-1}f.UpdateFrame(t)}const v={Frame:{x:d.x,y:d.y,width:d.width,height:d.height},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ShapesInGroup:p,InitialGroupBounds:{x:d.x,y:d.y,width:d.width,height:d.height}},b=new Instance.Shape.GroupSymbol(v);o&&(b.extraflags=Utils2.SetFlag(b.extraflags,OptConstant.ExtraFlags.NoRotate,!0)),LayerUtil.ZListPreserve();const y=DrawUtil.AddNewObject(b,!0,!1);for(b.StyleRecord&&(b.StyleRecord.Line&&(b.StyleRecord.Line.Thickness=0),b.StyleRecord.OutsideEffect&&(b.StyleRecord.OutsideEffect.OutsideType=0,b.StyleRecord.OutsideEffect.OutsideExtent_Bottom=0,b.StyleRecord.OutsideEffect.OutsideExtent_Left=0,b.StyleRecord.OutsideEffect.OutsideExtent_Right=0,b.StyleRecord.OutsideEffect.OutsideExtent_Top=0),b.UpdateFrame()),a=0;a<m;a++)LayerUtil.RemoveFromAllZLists(p[a]),HookUtil.DeleteLink(g,p[a],-1,null,0,!0);return r.length&&T3Gv.opt.CommentGroup(r),l=LayerUtil.ActiveVisibleZList(),h=l.length,b.ConvertToNative(T3Gv.opt.richGradients,i),DrawUtil.CompleteOperation([l[h-1]],t),n||i||SvgUtil.RenderAllSVGObjects(),T3Gv.opt.moveList=null,y}static UngroupShape(t,e){let i,n,s,a=[],o=null,r=null,l=[],h=OptConstant.ExtraFlags.FlipVert,c=OptConstant.ExtraFlags.FlipHoriz,u=ObjectUtil$1.GetObjectPtr(t,!0),d=[],p=u.Frame,g={x:p.x+p.width/2,y:p.y+p.height/2},f=u.ShapesInGroup,m=f.length;if(0===m)return;let v=null,b=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);LayerUtil.ZListPreserve();let y=p.x,S=p.y,x=p.width/u.InitialGroupBounds.width;isNaN(x)&&(x=1);let w=p.height/u.InitialGroupBounds.height;for(isNaN(w)&&(w=1),i=0;i<m;++i){if(v=ObjectUtil$1.GetObjectPtr(f[i],!0),v.commentId>=0&&a.push(v.commentId),v instanceof Instance.Shape.ShapeContainer&&d.push(v.BlockID),o=new Instance.Shape.BaseDrawObject(null),o=Utils1.DeepCopy(v),o.Frame.x+=y,o.Frame.y+=S,o.StartPoint&&(o.StartPoint.x+=y,o.StartPoint.y+=S),o.EndPoint&&(o.EndPoint.x+=y,o.EndPoint.y+=S),l.push(o),v instanceof Instance.Shape.GroupSymbol&&v.NativeID<0&&v.ConvertToNative(T3Gv.opt.richGradients,!1),v.ScaleObject(y,S,g,u.RotationAngle,x,w,!0),n=0,u.extraflags&h&&v.Flip(h),u.extraflags&c&&(n=u.Frame.width-(v.Frame.x+v.Frame.width-u.Frame.x)-v.Frame.x+u.Frame.x,v.Flip(c)),n&&v.OffsetShape(n,0),-1!==v.DataID&&1!==w){let t=ObjectUtil$1.GetObjectPtr(v.DataID,!0).runtimeText.styles,e=t.length;for(s=0;s<e;++s)t[s].size*=w}v.bInGroup=!1,ObjectUtil$1.AddToDirtyList(f[i]),T3Gv.opt.RebuildLinks(b,f[i])}for(LayerUtil.InsertObjectsIntoLayerAt(t,f),i=0;i<l.length;i++){T3Gv.opt.ob=l[i],r=ObjectUtil$1.GetObjectPtr(l[i].BlockID,!1);let t=!!e&&2;HookUtil.MaintainLink(l[i].BlockID,r,T3Gv.opt.ob,OptConstant.ActionTriggerType.Flip,t)}T3Gv.opt.ob={};let C=d.length;for(i=0;i<C;i++)OptCMUtil.SetLinkFlag(d[i],DSConstant.LinkFlags.Move);T3Gv.opt.UpdateLinks(),u.ShapesInGroup=[],ObjectUtil$1.DeleteObjects([t],!1),SvgUtil.RenderDirtySVGObjects()}static UngroupSelectedShapes(){let t,e;if(0===LayerUtil.ActiveVisibleZList().length)return!1;const i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,n=i.length;if(0===n)return!1;let s=!1,a=null;for(t=0;t<n;++t){if(a=ObjectUtil$1.GetObjectPtr(i[t],!1),a instanceof Instance.Shape.GroupSymbol){s=!0;break}if(a.NativeID>=0){s=!0;break}}if(s){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0).slice(0);let o=[];for(t=0;t<n;++t){a=ObjectUtil$1.GetObjectPtr(i[t],!1);const n=i[t];a instanceof Instance.Shape.GroupSymbol?(s=!0,o=o.concat(a.ShapesInGroup),this.UngroupShape(n)):a.NativeID>=0?(e=T3Gv.opt.UngroupNative(n,!1,!0),e&&(ObjectUtil$1.DeleteObjects([n],!1),o=o.concat(e),s=!0)):o.push(n)}s&&(SvgUtil.RenderAllSVGObjects(),SelectUtil.SelectObjects(o),DrawUtil.CompleteOperation(o))}}}var base64Js={};base64Js.byteLength=byteLength,base64Js.toByteArray=toByteArray,base64Js.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function byteLength(t){var e=getLens(t),i=e[0],n=e[1];return 3*(i+n)/4-n}function _byteLength(t,e,i){return 3*(e+i)/4-i}function toByteArray(t){var e,i,n=getLens(t),s=n[0],a=n[1],o=new Arr(_byteLength(t,s,a)),r=0,l=a>0?s-4:s;for(i=0;i<l;i+=4)e=revLookup[t.charCodeAt(i)]<<18|revLookup[t.charCodeAt(i+1)]<<12|revLookup[t.charCodeAt(i+2)]<<6|revLookup[t.charCodeAt(i+3)],o[r++]=e>>16&255,o[r++]=e>>8&255,o[r++]=255&e;return 2===a&&(e=revLookup[t.charCodeAt(i)]<<2|revLookup[t.charCodeAt(i+1)]>>4,o[r++]=255&e),1===a&&(e=revLookup[t.charCodeAt(i)]<<10|revLookup[t.charCodeAt(i+1)]<<4|revLookup[t.charCodeAt(i+2)]>>2,o[r++]=e>>8&255,o[r++]=255&e),o}function tripletToBase64(t){return lookup[t>>18&63]+lookup[t>>12&63]+lookup[t>>6&63]+lookup[63&t]}function encodeChunk(t,e,i){for(var n,s=[],a=e;a<i;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(tripletToBase64(n));return s.join("")}function fromByteArray(t){for(var e,i=t.length,n=i%3,s=[],a=16383,o=0,r=i-n;o<r;o+=a)s.push(encodeChunk(t,o,o+a>r?r:o+a));return 1===n?(e=t[i-1],s.push(lookup[e>>2]+lookup[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],s.push(lookup[e>>10]+lookup[e>>4&63]+lookup[e<<2&63]+"=")),s.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;class T3Clipboard{static Init(t){if(this.isMobileDevice=/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),this.isSafariBrowser=navigator.appVersion.includes("Safari")&&!navigator.appVersion.includes("Chrome")&&!navigator.appVersion.includes("CrMo")&&!navigator.appVersion.includes("CriOS"),this.isMacOS=/(mac os x)/i.test(navigator.userAgent)&&!T3Clipboard.isMobileDevice,this.isInternetExplorer=navigator.userAgent.toLowerCase().includes("msie")||navigator.userAgent.toLowerCase().includes("trident"),this.isFirefox=navigator.userAgent.toLowerCase().includes("firefox"),this.isIOSDevice=/ip(ad|hone|od)/i.test(navigator.userAgent),this.IEclipboardDiv=$$1("#_IEclipboardDiv"),this.clipboardInputElement=$$1("#_clipboardInput"),this.isMacOS&&this.isMobileDevice&&this.isSafariBrowser&&this.isIOSDevice){T3Clipboard.clipboardInputElement.attr("readonly","readonly");const t=$$1("#_crossTabClipboardDiv");t.css("left","-100px"),t.css("top","-100px")}this.lastCutCopyTimestamp=-1,(this.isInternetExplorer||this.isFirefox)&&document.addEventListener("beforepaste",(()=>{T3Clipboard.FocusOnIEclipboardDiv()})),this.clipboardInputElement[0].addEventListener("input",(t=>{this.clipboardInputElement.val(),this.isSafariBrowser?(this.clipboardInputElement.focus(),setTimeout(this.FocusOnClipboardInput,0)):this.FocusOnClipboardInput()})),["cut","copy","paste"].forEach((t=>{document.addEventListener(t,(e=>{if(T3Gv.docUtil.IsReadOnly())return;if(("cut"===t||"copy"===t)&&$$1("#_clipboardInput:focus,#_IEclipboardDiv:focus,#T3TouchProxy:focus").length<=0)return;if("paste"===t&&($$1("input:focus").length>0||$$1("textarea:focus").length>0)&&$$1("#_clipboardInput:focus,#_IEclipboardDiv:focus,#T3TouchProxy:focus").length<=0)return;let i;void 0!==e.clipboardData?i=e.clipboardData:void 0!==e.originalEvent.clipboardData?i=e.originalEvent.clipboardData:void 0!==window.clipboardData&&(i=window.clipboardData);const n=$$1("#T3TouchProxy:focus").length>0;if("cut"===t||"copy"===t){const n=!T3Clipboard.GetCutCopyText(),s=T3Clipboard.CanUseAsyncClipboard();s&&n?T3Clipboard.GenerateImageInfo().then((n=>{T3Clipboard.DoCutCopy(e,t,s,i,n)})):T3Clipboard.DoCutCopy(e,t,s,i)}"paste"===t&&T3Clipboard.PasteFromSystemEvent(i),n&&e.preventDefault()}))})),$$1(document).mouseup(T3Clipboard.FocusOnClipboardInput),T3Clipboard.FocusOnClipboardInput()}static CanUseAsyncClipboard(){return!(T3Clipboard.isInternetExplorer||T3Clipboard.isFirefox||T3Clipboard.isSafariBrowser)}static DoCutCopy(t,e,i,n,s){if(T3Gv.opt.htmlClipboard=this.GetCutCopyHTML(),"cut"===e?ToolActUtil.CutObjects(!0):"copy"===e&&ToolActUtil.CopyObjects(),this.lastCutCopyTimestamp=(new Date).getTime(),i){if(!T3Clipboard.ValidateAsyncClipboardApi())return;navigator&&navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"clipboard-write"}).then((()=>{}));const e=this.GetCutCopyText();if(e){const t={"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([this.GetCutCopyHTML()],{type:"text/html"})},i=new ClipboardItem(t);navigator.clipboard.write([i]),this.FocusOnClipboardInput()}else if(s){const t=`<img src="${s.base64ImageData}"/>`,e={"image/png":s.imageBlob,"text/html":new Blob([this.GetCutCopyHTML(t)],{type:"text/html"})},i=new ClipboardItem(e);navigator.clipboard.write([i])}t.preventDefault()}else{if(this.isInternetExplorer)return n.setData("Text",this.GetCutCopyText()),this.IEclipboardDiv.html(this.GetCutCopyHTML()),T3Clipboard.FocusOnIEclipboardDiv(),void setTimeout((()=>{this.FocusOnClipboardInput(),this.IEclipboardDiv.empty()}),0);n.setData("text/plain",this.GetCutCopyText()),n.setData("text/html",this.GetCutCopyHTML()),t.preventDefault(),LogUtil.Debug("= T3Clipboard: DoCutCopy/ data copied to system clipboard and the data is: ",n)}}static GenerateImageInfo1(){const t={},e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);return e&&0!==e.length?(i=e,new Promise((t=>T3Gv.opt.GeneratePreviewPNG(i,1/0,1/0,{zList:i,fillBackground:!0})))).then((e=>(t.imageBlob=e,function(t){const e=new FileReader;return e.readAsDataURL(t),new Promise((t=>{e.onloadend=()=>t(e.result)}))}(e)))).then((e=>(t.base64ImageData=e,t))).catch((t=>{throw t})):Promise.resolve(null);var i}static GenerateImageInfo(){const t={},e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);return e&&0!==e.length?(i=e,new Promise((t=>T3Gv.opt.GeneratePreviewPNG(i,1/0,1/0,{zList:i,fillBackground:!0})))).then((e=>(t.imageBlob=e,function(t){const e=new FileReader;return e.readAsDataURL(t),new Promise((t=>{e.onloadend=()=>t(e.result)}))}(e)))).then((e=>(t.base64ImageData=e,t))).catch((t=>{})):Promise.resolve(null);var i}static ValidateAsyncClipboardApi(){return!!navigator.clipboard}static PlainTextToSDObj(t){return"string"!=typeof t||null===t||0===t.length?t:{text:t,charStyles:[],hyperlinks:[],paraInfo:[],styles:[],vAlign:"middle"}}static PasteFromSystemEvent(t){LogUtil.Debug("= T3Clipboard: PasteFromSystemEvent/ Pasting from system event: ",t);const e=[{matches:this.isInternetExplorer,handler:this.PasteIE},{matches:this.isFirefox,handler:this.PasteFF},{matches:this.isSafariBrowser,handler:this.PasteSafari},{matches:!0,handler:this.PasteChrome}];this.ClearInteralClipboard();const i=e.find((t=>t.matches));i&&i.handler.call(this,t)}static PasteFF(t){T3Gv.opt.textClipboard=T3Clipboard.PlainTextToSDObj(t.getData("Text"));const e=t.getData("text/html");null!=e&&e.length>0&&(T3Gv.opt.htmlClipboard=e),T3Clipboard.FocusOnIEclipboardDiv(),setTimeout((()=>{if(T3Clipboard.IEclipboardDiv.html().match(/<img src=['"]data/gi)){const t=$$1(T3Clipboard.IEclipboardDiv[0].childNodes[0]).attr("src"),[e,i]=t.split(","),n=e.split(":")[1].split(";")[0],s=atob(i),a=new ArrayBuffer(s.length),o=new Uint8Array(a);for(let r=0;r<s.length;r++)o[r]=s.charCodeAt(r);T3Gv.opt.imageClipboard=new Blob([o],{type:n})}T3Clipboard.Paste(),T3Clipboard.IEclipboardDiv.empty(),T3Clipboard.FocusOnClipboardInput()}),0)}static PasteSafari(t){return this.PasteChrome(t)}static PasteIE(t){T3Gv.opt.textClipboard=T3Clipboard.PlainTextToSDObj(t.getData("Text"));const e=t.files;for(let i=0;i<e.length;i++)0===e[i].type.indexOf("image")&&(T3Gv.opt.imageClipboard=e[i].slice(0,e[i].size-1));this.IEclipboardDiv.empty(),setTimeout((()=>{T3Gv.opt.htmlClipboard=this.IEclipboardDiv.html(),this.Paste(),this.IEclipboardDiv.empty(),this.FocusOnClipboardInput()}),0)}static PasteChrome(t){void 0!==t.types&&null!=t.types&&Array.prototype.forEach.call(t.types,((e,i)=>{e.match(/image.*/)||void 0!==t.items&&t.items[i].type.match(/image.*/)?T3Gv.opt.imageClipboard=t.items[i].getAsFile():e.match(/text\/plain/)||void 0!==t.items&&t.items[i].type.match(/text\/plain/)?t.items[i].getAsString((t=>{T3Gv.opt.textClipboard=T3Clipboard.PlainTextToSDObj(t)})):(e.match(/text\/html/)||t.items[i].type.match(/text\/html/))&&t.items[i].getAsString((t=>{T3Gv.opt.htmlClipboard=t}))})),setTimeout(T3Clipboard.Paste,10)}static ClearInteralClipboard(){T3Gv.opt.textClipboard=null,T3Gv.opt.htmlClipboard=null,T3Gv.opt.imageClipboard=null}static PasteFromUIaction(){this.isMobileDevice||this.IsSameSystemPaste()?ToolActUtil.PasteObjects():(this.ClearInteralClipboard(),this.PasteUsingAsynchClipboardAPI((()=>{}),(t=>{throw t})))}static PasteUsingAsynchClipboardAPI(t,e){if(this.isFirefox||this.isSafariBrowser){const t="Use ctrl+v to paste this information";return LogUtil.Debug(t),!1}return this.PasteUsingAsynchClipboardAPIDoPaste(t,e)}static PasteUsingAsynchClipboardAPIDoPaste(t,e){const i=[{typeRegex:/text\/html/,handler:t=>t.text().then((t=>(T3Gv.opt.htmlClipboard=t,!0)))},{typeRegex:/text\/plain/,handler:t=>t.text().then((t=>(T3Gv.opt.textClipboard=T3Clipboard.PlainTextToSDObj(t),!0)))},{typeRegex:/image.*/,handler:t=>(T3Gv.opt.imageClipboard=t,!0)}];return!!T3Clipboard.ValidateAsyncClipboardApi()&&navigator.clipboard.read().then((t=>{const n=[];for(const s of t)for(const t of s.types){const a=s.getType(t).then((n=>{const s=i.find((e=>t.match(e.typeRegex)));if(s)return s.handler(n);e(`Cannot process clipboard content type: ${t}`)})).catch((t=>e(t)));n.push(a)}return Promise.all(n)})).then((()=>{setTimeout(this.Paste,1),t(!0)})).catch((t=>e(t)))}static FocusOnClipboardInput(){const t=$$1("input:focus").length>0,e=$$1("select:focus").length>0,i=$$1("textarea:focus").length>0;t||e||i||(T3Clipboard.clipboardInputElement.val(" "),T3Clipboard.clipboardInputElement.focus().select())}static FocusOnIEclipboardDiv(){if(/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent)){T3Clipboard.IEclipboardDiv.focus();const t=document.createRange();t.selectNodeContents(T3Clipboard.IEclipboardDiv.get(0));const e=window.getSelection();e.removeAllRanges(),e.addRange(t)}}static OnIECBEvent(t,e){const i=window.clipboardData;if("cut"!==t&&"copy"!==t||(i.setData("Text",this.GetCutCopyText()),this.IEclipboardDiv.html(this.GetCutCopyHTML()),this.FocusOnIEclipboardDiv(),setTimeout((()=>{this.FocusOnClipboardInput(),this.IEclipboardDiv.empty()}),0)),"paste"===t){const t=i.getData("Text");this.IEclipboardDiv.empty(),setTimeout((()=>{const e=this.IEclipboardDiv.html();this.Paste(t,e,T3Gv.opt.imageClipboard),this.IEclipboardDiv.empty(),this.FocusOnClipboardInput()}),0)}}static OnCBEvent(t,e){const i=e.originalEvent.clipboardData;if("cut"!==t&&"copy"!==t||(i.setData("text/plain",this.GetCutCopyText()),i.setData("text/html",this.GetCutCopyHTML())),"paste"===t){const t=i.getData("text/plain"),e=i.getData("text/html");this.Paste(t,e,null)}}static Paste(){/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);const t=T3Clipboard.GetHTMLAsObject(T3Gv.opt.htmlClipboard);let e=null;if(null!==t&&(e=T3Clipboard.GetHeaderFromHTML(t)),null===t&&T3Gv.opt.htmlClipboard)return T3Clipboard.lastCutCopyTimestamp=-1,T3Gv.opt.imageClipboard&&T3Gv.opt.imageClipboard.size>0?T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Image:T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Text,T3Gv.opt.header.ClipboardBuffer=null,T3Gv.opt.header.clipboardJson=null,void ToolActUtil.PasteObjects();null!==e&&ToolActUtil.PasteObjects()}static GetCutCopyText(){/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);const t=T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Text,e=T3Gv.opt.textClipboard;return t&&null!=e?e.text:""}static GetCutCopyHTML(t=""){/mobile|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);let e="";if(T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Text&&T3Gv.opt.textClipboard&&(e+=T3Gv.opt.textClipboard?T3Gv.opt.textClipboard.text:""),T3Gv.opt.header.ClipboardType,this.lastCutCopyTimestamp,t&&(e+=`<div>${t}</div>`),T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Text){const t=JSON.stringify(T3Gv.opt.textClipboard),i=new Uint8Array(t.length);for(let e=0;e<t.length;e++)i[e]=t.charCodeAt(e);e+=base64Js.fromByteArray(i)}if(T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.LM){const t=new Uint8Array(T3Gv.opt.header.ClipboardBuffer);e+=base64Js.fromByteArray(t)}return e+="'/>",e+="</div>",e}static GetHTMLAsObject(t){var e;const i=null==(e=null==t?void 0:t.replace("\x3c!--",""))?void 0:e.replace("--\x3e","");return $$1("<html><body>"+i+"</body></html>")}static GetHeaderFromHTML(t){return""}static IsSameSystemPaste(){return!0}}class ToolActUtil{static Undo(t,e){if(LogUtil.Debug("O.Opt Undo - Input:",{restoreSequence:t,cancelModalOperation:e}),e)OptCMUtil.CancelOperation();else if(T3Gv.opt.crtOpt!==OptConstant.OptTypes.None)return LogUtil.Debug("O.Opt Undo - Output:",!1),!1;if(null===T3Gv.state)throw new Error("state is null");if(T3Gv.opt.nudgeOpen&&T3Gv.opt.CloseOpenNudge(),T3Gv.state.currentStateId<=0)return LogUtil.Debug("O.Opt Undo - Output:",!1),!1;const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),n=(i.EnableSpellCheck,ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1));n.layers[n.activelayer].layertype;const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);-1!==s.theActiveTextEditObjectID&&s.theTELastOp!==NvConstant.TextElemLastOpt.Init&&s.theTELastOp!==NvConstant.TextElemLastOpt.Timeout&&s.theTELastOp!==NvConstant.TextElemLastOpt.Select&&(this.FlushTextToLMBlock(),ObjectUtil$1.PreserveUndoState(!1)),Utils1.IsStateOpen(),t&&(T3Gv.currentObjSeqId=T3Gv.state.states[T3Gv.state.currentStateId].currentObjSeqId),T3Gv.state.RestorePrevState(),t||T3Gv.state.AddToHistoryState();const a=T3Gv.state.currentStateId;OptCMUtil.RebuildURLs(a+1,!1),UIUtil.ResizeSVGDocument(),HookUtil.UpdateLineHops(!0);ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).EnableSpellCheck;const o=T3Gv.docUtil.rulerConfig;T3Gv.docUtil.RulersNotEqual(i.rulerConfig,o)&&T3Gv.docUtil.SetRulers(i.rulerConfig,!0),T3Gv.docUtil.PagesNotEqual(i.Page,T3Gv.opt.header.Page)&&(T3Gv.opt.header.Page=Utils1.DeepCopy(i.Page));const r=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==l.theActiveOutlineObjectID&&0===r.length){const t=[];t.push(l.theActiveOutlineObjectID),SelectUtil.SelectObjects(t,!1,!1)}TextUtil.TEUnregisterEvents(!0),T3Gv.opt.noUndo=!0,SvgUtil.RenderAllSVGObjects(),T3Gv.opt.noUndo=!1,-1!==l.theActiveTextEditObjectID&&this.ResetActiveTextEditAfterUndo();const h=SelectUtil.GetTargetSelect();if(h>=0){const t=ObjectUtil$1.GetObjectPtr(h,!1);let e=null;t&&(e=t.GetDimensionsForDisplay(),UIUtil.ShowFrame(!0)),UIUtil.UpdateDisplayCoordinates(e,null,null,t)}else UIUtil.ShowFrame(!1);return SelectUtil.UpdateSelectionAttributes(r),LogUtil.Debug("O.Opt Undo - Output:",!0),!0}static Redo(t){if(LogUtil.Debug("O.Opt Redo - Input:",{shouldCancelModalOperation:t}),null===T3Gv.state)throw new Error("state is null");if(t)OptCMUtil.CancelOperation();else if(T3Gv.state.currentStateId+1>=T3Gv.state.states.length)return LogUtil.Debug("O.Opt Redo - Output: false (already at last state)"),!1;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).EnableSpellCheck;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);-1!==e.theActiveTextEditObjectID&&e.theTELastOp!==NvConstant.TextElemLastOpt.Init&&e.theTELastOp!==NvConstant.TextElemLastOpt.Timeout&&e.theTELastOp!==NvConstant.TextElemLastOpt.Select&&(this.FlushTextToLMBlock(),ObjectUtil$1.PreserveUndoState(!1));const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);i.layers[i.activelayer].layertype,this.RedoDeleteURLs(),Utils1.IsStateOpen(),T3Gv.state.RestoreNextState(),T3Gv.state.AddToHistoryState(),T3Gv.state.currentStateId,OptCMUtil.RebuildURLs(T3Gv.state.currentStateId-1,!0),UIUtil.ResizeSVGDocument(),HookUtil.UpdateLineHops(!0);const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),s=T3Gv.docUtil.rulerConfig;T3Gv.docUtil.RulersNotEqual(n.rulerConfig,s)&&T3Gv.docUtil.SetRulers(n.rulerConfig,!0),T3Gv.docUtil.PagesNotEqual(n.Page,T3Gv.opt.header.Page)&&(T3Gv.opt.header.Page=Utils1.DeepCopy(n.Page));const a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==o.theActiveOutlineObjectID&&0===a.length){const t=[];t.push(o.theActiveOutlineObjectID),SelectUtil.SelectObjects(t,!1,!1)}TextUtil.TEUnregisterEvents(!0),T3Gv.opt.InUndo=!0,SvgUtil.RenderAllSVGObjects(),T3Gv.opt.InUndo=!1,ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),-1!==o.theActiveTextEditObjectID&&this.ResetActiveTextEditAfterUndo();const r=SelectUtil.GetTargetSelect();if(r>=0){const t=ObjectUtil$1.GetObjectPtr(r,!1);let e=null;t&&(e=t.GetDimensionsForDisplay(),UIUtil.ShowFrame(!0)),UIUtil.UpdateDisplayCoordinates(e,null,null,t)}else UIUtil.ShowFrame(!1);const l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);return l.layers[l.activelayer].layertype,SelectUtil.UpdateSelectionAttributes(a),LogUtil.Debug("O.Opt Redo - Output: true"),!0}static RedoDeleteURLs(){const t=T3Gv.state.currentStateId;if(t+1>=T3Gv.state.states.length)return;const e=T3Gv.state.states[t+1],i=e.storedObjects.length;for(let n=0;n<i;n++){const t=e.storedObjects[n];if(t.Type===StateConstant.StoredObjectType.BaseDrawObject)if(t.stateOptTypeId===StateConstant.StateOperationType.DELETE){const e=T3Gv.stdObj.GetObject(t.ID);if(e){const t=e.Data;OptCMUtil.IsBlobURL(t.ImageURL)&&OptCMUtil.DeleteURL(t.ImageURL)}}else{const e=T3Gv.stdObj.GetObject(t.ID);if(e){const i=e.Data;OptCMUtil.IsBlobURL(i.ImageURL)&&t.Data.ImageURL!==i.ImageURL&&OptCMUtil.DeleteURL(i.ImageURL)}}}}static MakeSameSize(t){LogUtil.Debug("O.Opt MakeSameSize - Input:",{sizeOption:t});const e=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,i=e.length;if(i<=1)return void LogUtil.Debug("O.Opt MakeSameSize - Output:","Not enough objects selected");const n=SelectUtil.GetTargetSelect();if(-1===n)return void LogUtil.Debug("O.Opt MakeSameSize - Output:","No target object selected");const s=ObjectUtil$1.GetObjectPtr(n,!1),a=Utils1.DeepCopy(s.Frame),o=a.height,r=a.width;for(let l=0;l<i;++l){const i=e[l];if(i===n)continue;const s=ObjectUtil$1.GetObjectPtr(i,!0),a=Utils1.DeepCopy(s.Frame);switch(t){case 1:s.SetSize(null,o,0);break;case 2:s.SetSize(r,null,0);break;case 3:s.SetSize(r,o,0)}if(T3Gv.docUtil.docConfig.centerSnap&&T3Gv.docUtil.docConfig.enableSnap||!1===T3Gv.docUtil.docConfig.enableSnap){const t=(s.Frame.width-a.width)/2,e=(s.Frame.height-a.height)/2;(t||e)&&this.OffsetShape(i,-t,-e,0)}s.rflags&&(s.rflags=Utils2.SetFlag(s.rflags,NvConstant.FloatingPointDim.Width,!1),s.rflags=Utils2.SetFlag(s.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(i,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(i)}DrawUtil.CompleteOperation(),LogUtil.Debug("O.Opt MakeSameSize - Output:","Completed")}static FlipShapes(t){LogUtil.Debug("O.Opt FlipShapes - Input:",{flipType:t});const e=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,i=e.length;if(0!==i){let s,a=0,o=null,r=!1;for(s=t===OptConstant.ExtraFlags.FlipVert?OptConstant.ExtraFlags.FlipHoriz:OptConstant.ExtraFlags.FlipVert,a=0;a<i;a++)if(o=ObjectUtil$1.GetObjectPtr(e[a],!1),o.NoFlip()){r=!0;break}if(r);else{for(a=0;a<i;a++)o=ObjectUtil$1.GetObjectPtr(e[a],!0),OptCMUtil.SetLinkFlag(e[a],DSConstant.LinkFlags.Move),o.hooks.length&&OptCMUtil.SetLinkFlag(o.hooks[0].objid,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(e[a]),n=o,!(Math.abs(n.RotationAngle%180)<20)&&Math.abs(n.RotationAngle%90)<20?o.Flip(s):o.Flip(t);DrawUtil.CompleteOperation()}}var n;LogUtil.Debug("O.Opt FlipShapes - Output: completed")}static FlipVertexArray(t,e){LogUtil.Debug("O.Opt FlipVertexArray - Input:",{vertices:t,flipFlags:e});const i=t.length;for(let n=0;n<i;n++)e&OptConstant.ExtraFlags.FlipHoriz&&(t[n].x=1-t[n].x),e&OptConstant.ExtraFlags.FlipVert&&(t[n].y=1-t[n].y);return LogUtil.Debug("O.Opt FlipVertexArray - Output:",t),t}static SendToBackOf(){LogUtil.Debug("O.Opt SendToBackOf - Input: no parameters");const t=LayerUtil.GetFrontBackLayersForSelected();t.result&&this.SendToBackOfSpecificLayer(t.backmostindex),LogUtil.Debug("O.Opt SendToBackOf - Output: completed")}static SendToBackOfSpecificLayer(t,e){LogUtil.Debug("O.Opt SendToBackOfSpecificLayer - Input:",{targetLayerIndex:t,updateSelectedBlock:e});let i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data;if(0!==i.length){const n=T3Gv.opt.AddAssoctoList(i,!0);let s=n.length;if(0!==s){const i=LayerUtil.VisibleZList();if(i.length>=1){const a=[];for(let t=0;t<s;t++){const e=n[t],s=$$1.inArray(e,i);a.push(s)}a.sort(((t,e)=>t-e));const o=LayerUtil.ZListPreserveForLayer(t),r=[];for(let t=0;t<s;t++){const e=i[a[t]];r.push(e)}for(let t=r.length-1;t>=0;t--){const e=r[t];LayerUtil.RemoveFromAllZLists(e),o.unshift(e)}if(HookUtil.UpdateLineHops(!0),null==e){T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId).Data=n}SvgUtil.RenderAllSVGObjects(),DrawUtil.CompleteOperation()}}}LogUtil.Debug("O.Opt SendToBackOfSpecificLayer - Output: completed")}static PasteObjects(t){LogUtil.Debug("O.Opt PasteObjects - Input:",t);try{let t;if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID||T3Gv.opt.bInNoteEdit){if(T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text){if(T3Clipboard.isInternetExplorer){const t=T3Gv.opt.textClipboard.text.length;t>=2&&"\r"===T3Gv.opt.textClipboard.text[t-2]&&"\n"===T3Gv.opt.textClipboard.text[t-1]&&(T3Gv.opt.textClipboard.text=T3Gv.opt.textClipboard.text.slice(0,-2))}t=T3Gv.opt.svgDoc.GetActiveEdit(),t&&(TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Paste),t.Paste(T3Gv.opt.textClipboard,!0),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout))}return void LogUtil.Debug("O.Opt PasteObjects - Output: Text pasted in text editor")}if(T3Gv.opt.bInDimensionEdit)return T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text&&(t=T3Gv.opt.svgDoc.GetActiveEdit(),t&&t.Paste(T3Gv.opt.textClipboard,!0)),void LogUtil.Debug("O.Opt PasteObjects - Output: Text pasted in dimension editor");if(T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text&&"\r\n"!==T3Gv.opt.textClipboard.text&&-1!==SelectUtil.GetTargetSelect())return TextUtil.TargetPasteText(),void LogUtil.Debug("O.Opt PasteObjects - Output: Text pasted to target");if(T3Gv.opt.imageClipboard&&T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.Image)return T3Gv.opt.SetBackgroundImage(T3Gv.opt.imageClipboard,0),void LogUtil.Debug("O.Opt PasteObjects - Output: Image pasted as background");T3Gv.opt.CloseEdit(!1),T3Gv.opt.header.ClipboardBuffer&&T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.LM?(this.PasteLM(T3Gv.opt.header.ClipboardBuffer,T3Gv.opt.header.clipboardJson),LogUtil.Debug("O.Opt PasteObjects - Output: LM content pasted")):(this.PasteLM(T3Gv.opt.header.ClipboardBuffer,T3Gv.opt.header.clipboardJson),LogUtil.Debug("O.Opt PasteObjects - Output: No pasteable content found"))}catch(e){throw LogUtil.Debug("O.Opt PasteObjects - Error:",e),e}}static DeleteSelectedObjects(){this.DeleteSelectedObjectsCommon()}static DeleteSelectedObjectsCommon(t,e,i,n){LogUtil.Debug("O.Opt DeleteSelectedObjectsCommon - Input:",{objectIds:t,suppressCompleteOperation:e,preserveSelection:i,suppressCollabMessage:n});let s=0;if(t&&(s=t.length),SelectUtil.AreSelectedObjects()||0!==s){i||T3Gv.opt.CloseEdit();let n,s=OptAhUtil.GetNextSelect(),a=[];const o=T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId).Data,r=t||o;return n=T3Gv.opt.AddtoDelete(r,!1,null),n>=0&&(s=n),r.length,ObjectUtil$1.DeleteObjects(r,!1),i||(o.splice(0),s>=0?a.push(s):SelectUtil.SetTargetSelect(-1,!0)),e||DrawUtil.CompleteOperation(a),LogUtil.Debug("O.Opt DeleteSelectedObjectsCommon - Output:",!0),!0}}static AlignShapes(t){let e,i;LogUtil.Debug("O.Opt AlignShapes - Input:",{alignmentType:t});let n=!1;const s=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,a=s.length;if(0!==a){const o=SelectUtil.GetTargetSelect();let r=null,l=0;if(-1!==o){const h=ObjectUtil$1.GetObjectPtr(o,!1);let c,u;r=h.GetAlignRect(),l=h.StyleRecord.Line.Thickness;let d=null;for(let p=0;p<a;++p)if(s[p]!==o&&(u=null,d=ObjectUtil$1.GetObjectPtr(s[p],!1),!d.hooks.length)){switch(n=!0,d=ObjectUtil$1.GetObjectPtr(s[p],!0),d.FramezList&&d.FramezList.length&&(u=d.FramezList),OptCMUtil.SetLinkFlag(s[p],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(s[p],!0),c=d.GetAlignRect(),t){case"lefts":e=r.x-l/2-(c.x-d.StyleRecord.Line.Thickness/2),i=0;break;case"centers":e=r.x+r.width/2-c.width/2-c.x,i=0;break;case"rights":e=r.x+r.width+l/2-(c.x+c.width+d.StyleRecord.Line.Thickness/2),i=0;break;case"tops":i=r.y-l/2-(c.y-d.StyleRecord.Line.Thickness/2),e=0;break;case"middles":i=r.y+r.height/2-c.height/2-c.y,e=0;break;case"bottoms":i=r.y+r.height+l/2-(c.y+c.height+d.StyleRecord.Line.Thickness/2),e=0;break;default:e=0,i=0}d.OffsetShape(e,i,u),e=0,i=0,d.r.x<0&&(e=-d.r.x),d.r.y<0&&(i=-d.r.y),(e||i)&&d.OffsetShape(e,i)}n?DrawUtil.CompleteOperation():LogUtil.Debug("O.Opt AlignShapes - Output: AlignHooked & UnBlockMessages")}}LogUtil.Debug("O.Opt AlignShapes - Output:",{alignmentPerformed:n})}static RotateShapes(t,e){LogUtil.Debug("O.Opt RotateShapes - Input:",{angleDegrees:t,selectionOverride:e});let i,n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e&&(n=e);let a=n.length;if(0!==a){let o,r,l,h=0,c=0;for(h=0;h<a&&(i=ObjectUtil$1.GetObjectPtr(n[h],!1),!i.NoRotate());h++);if(i&&i.NoRotate())LogUtil.Debug("O.Opt RotateShapes - NoRotate");else{for(h=0;h<n.length;h++)if(i=ObjectUtil$1.GetObjectPtr(n[h],!1),i instanceof Instance.Shape.PolyLineContainer){let t=i.GetListOfEnclosedObjects(!1);t.length>0&&(DrawUtil.AllowGroup(t)||LogUtil.Debug("O.Opt RotateShapes - GroupNotAllowed"),T3Gv.opt.IsLinkedOutside(t)&&LogUtil.Debug("O.Opt RotateShapes - LinkedOutside"),T3Gv.opt.IsGroupNonDelete()&&LogUtil.Debug("O.Opt RotateShapes - GroupNonDelete"))}for(h=0;h<n.length;h++)if(i=ObjectUtil$1.GetObjectPtr(n[h],!0),i instanceof Instance.Shape.PolyLine&&i.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),i instanceof Instance.Shape.PolyLineContainer){if(OptCMUtil.SetLinkFlag(n[h],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(n[h]),r=i.RotateAllInContainer(i.BlockID,t),r&&r.length)for(c=n.length-1;c>=0;c--)r.indexOf(n[c])>=0&&n[c]!==i.BlockID&&n.splice(c,1);if(i instanceof Instance.Shape.PolyLineContainer||i.objecttype===NvConstant.FNObjectTypes.FlWall)for(c=n.length-1;c>=0;c--)l=ObjectUtil$1.GetObjectPtr(n[c],!1),l&&l.hooks.length&&l.hooks[0].objid===i.BlockID&&n.splice(c,1)}for(a=n.length,h=0;h<a;h++)if(i=ObjectUtil$1.GetObjectPtr(n[h],!0),!(i instanceof Instance.Shape.PolyLineContainer))if(OptCMUtil.SetLinkFlag(n[h],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(n[h]),i instanceof Instance.Shape.BaseLine)if(i instanceof Instance.Shape.PolyLine){let e={x:i.Frame.x+i.Frame.width/2,y:i.Frame.y+i.Frame.height/2};o=2*Math.PI*((360-t)/360);let n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils3.RotatePointsAboutPoint(e,o,n);let s=n.length;for(i.StartPoint.x=n[0].x,i.StartPoint.y=n[0].y,c=0;c<s;c++)i.polylist.segs[c].pt.x=n[c].x-i.StartPoint.x,i.polylist.segs[c].pt.y=n[c].y-i.StartPoint.y;i.EndPoint.x=n[s-1].x,i.EndPoint.y=n[s-1].y,i.CalcFrame()}else{T3Gv.opt.ob=Utils1.DeepCopy(i);let e=(i.StartPoint.x+i.EndPoint.x)/2,n=(i.StartPoint.y+i.EndPoint.y)/2,s=Math.sqrt(Math.pow(i.EndPoint.x-i.StartPoint.x,2)+Math.pow(i.EndPoint.y-i.StartPoint.y,2));o=2*Math.PI*(t/360),s/=2,i.StartPoint.x=e-Math.cos(o)*s,i.StartPoint.y=n-Math.sin(o)*s,i.EndPoint.x=e+Math.cos(o)*s,i.EndPoint.y=n+Math.sin(o)*s,i.AfterRotateShape(i.BlockID),T3Gv.opt.ob={}}else if(i.RotationAngle=t,i.UpdateFrame(i.Frame),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){let t=i.r.x+i.r.width,e=i.r.y+i.r.height,n=0,a=0;t>s.dim.x&&(n=s.dim.x-t),e>s.dim.y&&(a=s.dim.y-e),i.r.x<0&&(n=-i.r.x),i.r.y<0&&(a=-i.r.y),(n||a)&&i.OffsetShape(n,a)}null==e&&DrawUtil.CompleteOperation()}}LogUtil.Debug("O.Opt RotateShapes - Output: Rotation applied on selection, remaining count:",n.length)}static DuplicateObjects(t,e){LogUtil.Debug("O.Opt DuplicateObjects - Input:",{fromMove:t,editOverride:e});const i={selectedList:[]};if(T3Gv.opt.CloseEdit(),SelectUtil.AreSelectedObjects()){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!T3Gv.opt.lastOpDuplicate&&!e);t?(n.dupdisp.x=0,n.dupdisp.y=0):e?(n.dupdisp.x=e.Data.dupdisp.x,n.dupdisp.y=e.Data.dupdisp.y):T3Gv.opt.lastOpDuplicate||(n.dupdisp.x=50,n.dupdisp.y=50);const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);e||(Utils1.DeepCopy(n.dupdisp),Utils1.DeepCopy(s),Utils1.DeepCopy(n.tselect));const a=this.CopyObjectsCommon(!0);if(a&&a.buffer){const s=ObjectUtil$1.GetObjectPtr(a.zList[0],!1).Frame;ShapeUtil.ReadSymbolFromBuffer(a.buffer,s.x+n.dupdisp.x,s.y+n.dupdisp.y,0,!1,!0,i,!t,!1,!1,!1,!1),t||(DrawUtil.CompleteOperation(i.selectedList),e||(T3Gv.opt.lastOpDuplicate=!0))}}return LogUtil.Debug("O.Opt DuplicateObjects - Output:",i.selectedList),i.selectedList}static CopyObjects(){LogUtil.Debug("O.Opt CopyObjects - Input:");let t;if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID||T3Gv.opt.bInNoteEdit||T3Gv.opt.bInDimensionEdit){const e=T3Gv.opt.svgDoc.GetActiveEdit();if(e){const t=e.Copy(!0);t&&(T3Gv.opt.textClipboard=t),T3Gv.opt.header.ClipboardBuffer=null,T3Gv.opt.header.clipboardJson=null,T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Text}return t=T3Gv.opt.textClipboard,LogUtil.Debug("O.Opt CopyObjects - Output:",t),t}if(!SelectUtil.AreSelectedObjects())return void LogUtil.Debug("O.Opt CopyObjects - Output: No selected objects");T3Gv.opt.CloseEdit(),this.CopyObjectsCommon(!1),T3Gv.opt.textClipboard=null;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);return SelectUtil.UpdateSelectionAttributes(e),t=T3Gv.opt.header.ClipboardBuffer,t=T3Gv.opt.header.clipboardJson,LogUtil.Debug("O.Opt CopyObjects - Output:",t),t}static PasteLM(t,e){LogUtil.Debug("O.Opt PasteLM - Input:",t);const i={selectedList:[]},n=T3Gv.opt.PastePoint||this.GetPastePosition();return ShapeUtil.ReadSymbolFromBuffer(t,n.x,n.y,0,!1,!0,i,!0,!1,!1,!1,!1),T3Gv.opt.PastePoint=null,DrawUtil.CompleteOperation(i.selectedList),LogUtil.Debug("O.Opt PasteLM - Output:",i.selectedList),i.selectedList}static GetPastePosition(){LogUtil.Debug("= u.ToolActUtil: GetPastePosition/ - Input: no parameters");const t=100,e=T3Gv.docUtil.svgDoc.GetWorkArea();let i=T3Gv.docUtil.svgDoc.docInfo.docToScreenScale;null!=i&&0!==i||(i=1);let n={x:(e.scrollX+t)/i,y:(e.scrollY+t)/i};return e.scrollX===T3Gv.opt.topLeftPasteScrollPos.x&&e.scrollY===T3Gv.opt.topLeftPasteScrollPos.y?(n=T3Gv.opt.topLeftPastePos,n.x+=50,n.y+=50,T3Gv.opt.pasteCount++,T3Gv.opt.pasteCount>5&&(T3Gv.opt.pasteCount=0,n={x:(e.scrollX+t)/i,y:(e.scrollY+t)/i})):T3Gv.opt.pasteCount=0,T3Gv.opt.topLeftPastePos={x:n.x,y:n.y},T3Gv.opt.topLeftPasteScrollPos={x:e.scrollX,y:e.scrollY},LogUtil.Debug("O.Opt GetPastePosition - Output:",n),n}static CutObjects(t){LogUtil.Debug("O.Opt CutObjects - Input:",{isFromCutButton:t});try{if(T3Gv.opt.cutFromButton&&t)return T3Gv.opt.cutFromButton=!1,void LogUtil.Debug("O.Opt CutObjects - Output:","Cut cancelled due to active cut button state.");T3Gv.opt.cutFromButton=!t;if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID||T3Gv.opt.bInNoteEdit||T3Gv.opt.bInDimensionEdit){const t=T3Gv.opt.svgDoc.GetActiveEdit();return t&&(T3Gv.opt.textClipboard=t.Copy(!0),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Cut),t.Delete(),T3Gv.opt.header.ClipboardBuffer=null,T3Gv.opt.header.clipboardJson=null,T3Gv.opt.header.ClipboardType=T3Constant.ClipboardType.Text,TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)),void LogUtil.Debug("O.Opt CutObjects - Output:","Text cut completed.")}if(!SelectUtil.AreSelectedObjects())return void LogUtil.Debug("O.Opt CutObjects - Output:","No selected objects to cut.");T3Gv.opt.CloseEdit(),this.CopyObjectsCommon(!1),this.DeleteSelectedObjectsCommon(),LogUtil.Debug("O.Opt CutObjects - Output:","Graphic objects cut completed.")}catch(e){throw T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("O.Opt CutObjects - Output:","Error occurred during cut operation."),e}}static CopyObjectsCommon(t){LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - Input:",{returnBuffer:t});const e=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data;T3Gv.opt.AddtoDelete(e,!0,{connectors:!1});const i=LayerUtil.ZList(),n=e.length;if(0!==n){const t=[];for(let o=0;o<n;o++){const n=e[o],s=$$1.inArray(n,i);t.push(s)}t.sort(((t,e)=>t-e));const s=[];for(let e=0;e<n;e++){const n=i[t[e]];s.push(n)}T3Gv.opt.header.ClipboardBuffer=ShapeUtil.WriteSelect(s,!1,!0,!1),LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - ClipboardType: ",T3Gv.opt.header.ClipboardType);const a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);for(let e=a.length-1;e>=0;e--){const t=ObjectUtil$1.GetObjectPtr(a[e],!1);t&&t.flags&NvConstant.ObjFlags.NotVisible&&a.splice(e,1)}LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - Output: Clipboard updated")}else LogUtil.Debug("= u.ToolActUtil: CopyObjectsCommon/ - Output: No objects selected");return{buffer:T3Gv.opt.header.ClipboardBuffer,zList:i}}static UngroupShape(t,e){LogUtil.Debug("O.Opt UngroupShape - Input:",{groupId:t,maintainLinksFlag:e});let i,n,s,a=[],o=[],r=[],l=null,h=null,c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);const u=OptConstant.ExtraFlags.FlipVert,d=OptConstant.ExtraFlags.FlipHoriz,p=ObjectUtil$1.GetObjectPtr(t,!0),g=p.Frame,f={x:g.x+g.width/2,y:g.y+g.height/2},m=p.ShapesInGroup,v=m.length;if(0===v)return void LogUtil.Debug("O.Opt UngroupShape - Output: No shapes in group");const b=g.x,y=g.y;let S=g.width/p.InitialGroupBounds.width;isNaN(S)&&(S=1);let x=g.height/p.InitialGroupBounds.height;for(isNaN(x)&&(x=1),LayerUtil.ZListPreserve(),i=0;i<v;++i){const t=ObjectUtil$1.GetObjectPtr(m[i],!0);if(t.commentId>=0&&a.push(t.commentId),t instanceof Instance.Shape.ShapeContainer&&o.push(t.BlockID),l=new Instance.Shape.BaseDrawObject(null),l=Utils1.DeepCopy(t),l.Frame.x+=b,l.Frame.y+=y,t.StartPoint&&(l.StartPoint.x+=b,l.StartPoint.y+=y),t.EndPoint&&(l.EndPoint.x+=b,l.EndPoint.y+=y),r.push(l),t instanceof Instance.Shape.GroupSymbol&&t.NativeID<0&&t.ConvertToNative(T3Gv.opt.richGradients,!1),t.ScaleObject(b,y,f,p.RotationAngle,S,x,!0),n=0,p.extraflags&u&&t.Flip(u),p.extraflags&d&&(n=g.width-(t.Frame.x+t.Frame.width-g.x)-t.Frame.x+g.x,t.Flip(d)),n&&t.OffsetShape(n,0),-1!==t.DataID&&1!==x){const e=ObjectUtil$1.GetObjectPtr(t.DataID,!0).runtimeText.styles,i=e.length;for(s=0;s<i;++s)e[s].size*=x}t.bInGroup=!1,ObjectUtil$1.AddToDirtyList(m[i]),T3Gv.opt.RebuildLinks(c,m[i])}for(LayerUtil.InsertObjectsIntoLayerAt(t,m),i=0;i<r.length;i++){T3Gv.opt.ob=r[i],h=ObjectUtil$1.GetObjectPtr(r[i].BlockID,!1);const t=!!e&&2;HookUtil.MaintainLink(r[i].BlockID,h,T3Gv.opt.ob,OptConstant.ActionTriggerType.Flip,t)}T3Gv.opt.ob={};const w=o.length;for(i=0;i<w;i++)OptCMUtil.SetLinkFlag(o[i],DSConstant.LinkFlags.Move);T3Gv.opt.UpdateLinks(),p.ShapesInGroup=[],ObjectUtil$1.DeleteObjects([t],!1),a.length&&T3Gv.opt.CommentUngroup(a),SvgUtil.RenderDirtySVGObjects(),LogUtil.Debug("O.Opt UngroupShape - Output: Successfully ungrouped",v,"shapes")}static GroupSelected(t,e,i,n,s){ToolAct2Util.GroupSelectedShapes(t,e,i,n,s)}static UnGroupSelected(){ToolAct2Util.UngroupSelectedShapes()}static RotateRect(t,e,i){LogUtil.Debug("O.Opt RotateRect - Input:",{rectangle:t,centerPoint:e,angleDegrees:i});const n=[],s={x:0,y:0,width:0,height:0};if(n.push(new Point$1(t.x,t.y)),n.push(new Point$1(t.x+t.width,t.y)),n.push(new Point$1(t.x+t.width,t.y+t.height)),n.push(new Point$1(t.x,t.y+t.height)),n.push(new Point$1(t.x,t.y)),n&&n.length){if(i){const s=-2*Math.PI*(i/360);e.x=(t.x+t.x+t.width)/2,e.y=(t.y+t.y+t.height)/2,Utils3.RotatePointsAboutPoint(e,s,n)}Utils2.GetPolyRect(s,n)}return LogUtil.Debug("O.Opt RotateRect - Output:",s),s}static RotateRectAboutCenter(t,e,i){LogUtil.Debug("O.Opt RotateRectAboutCenter - Input:",{rectangle:t,centerPoint:e,angleDegrees:i});const n=[],s={x:0,y:0,width:0,height:0};if(n.push(new Point$1(t.x,t.y)),n.push(new Point$1(t.x+t.width,t.y)),n.push(new Point$1(t.x+t.width,t.y+t.height)),n.push(new Point$1(t.x,t.y+t.height)),n.push(new Point$1(t.x,t.y)),n&&n.length){if(i){const t=-2*Math.PI*(i/360);Utils3.RotatePointsAboutPoint(e,t,n)}Utils2.GetPolyRect(s,n)}return LogUtil.Debug("O.Opt RotateRectAboutCenter - Output:",s),s}static OffsetShape(t,e,i,n){LogUtil.Debug("O.Opt OffsetShape - Input:",{shapeId:t,offsetX:e,offsetY:i,hasAutoGrowSettings:!!n});let s={x:0,y:0},a=T3Gv.stdObj.PreserveBlock(t);DrawUtil.InitializeAutoGrowDrag(n);let o=a.Data;o.OffsetShape(e,i),s.x=o.r.x+o.r.width,s.y=o.r.y+o.r.height,DrawUtil.DoAutoGrowDrag(s),(e||i)&&(OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t,!0)),LogUtil.Debug("O.Opt OffsetShape - Output: Shape offset applied",s)}}class OptAhUtil{static GetGvSviOpt(t,e){return T3Gv.wallOpt}static FindTreeTop(t,e,i){if(!t)return i.foundtree;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line)return!1;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?(i.topconnector=t.BlockID,i.foundtree=!0,e&&OptCMUtil.SetLinkFlag(t.BlockID,e)):(i.topshape=t.BlockID,null!=i.level&&i.level++,e&&OptCMUtil.SetLinkFlag(t.BlockID,e)),t.hooks.length)if(t.hooks[0].objid===t.BlockID)t.hooks.splice(0,1);else{const n=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1);n&&this.FindTreeTop(n,e,i)}else if(i.foundtree){if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){const t=T3Gv.opt.FindChildArray(i.topshape,-1);t>=0&&(i.secondconnector=t)}}else{const n=T3Gv.opt.FindChildArray(t.BlockID,-1);n>=0&&(i.topconnector=n,i.foundtree=!0,e&&OptCMUtil.SetLinkFlag(n,e))}return i.foundtree}static SelectContainerParent(t){const e=ObjectUtil$1.GetObjectPtr(t,!1);return e&&e instanceof Instance.Shape.ShapeContainer&&e.hooks.length&&null!=e.hooks[0].cellid?e.hooks[0].objid:t}static ShapeCannotHaveActionButtons(t){return!0}static GetNextSelect(){const t=SelectUtil.GetTargetSelect(),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let i=-1;if(t>=0){const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.hooks.length){const s=n.hooks[0].objid,a=ObjectUtil$1.GetObjectPtr(s,!1);if(a&&a.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){if(a.IsFlowChartConnector())return-1;i=OptAhUtil.GetConnectorNextSelect(a,t,e)}else if(a&&a instanceof Instance.Shape.ShapeContainer){const e=a.ContainerList,n=e.List,s=e.flags&NvConstant.ContainerListFlags.Sparse,o=n.length;let r=-1;for(let i=0;i<o;i++)if(n[i].id===t){r=i;break}if(s){if(i>=0)return i;if(i<0){for(let t=r-1;t>=0;t--)if(n[t].id>=0)return n[t].id;for(let t=r+1;t<o;t++)if(n[t].id>=0)return n[t].id}}else r>=0&&(r>0?i=n[r-1].id:o>1&&(i=n[r+1].id))}return i}const s=T3Gv.opt.FindChildArray(t,-1);s>=0&&ObjectUtil$1.GetObjectPtr(s,!1)}return i}static GetParentConnector(t,e){let i=-1;const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.hooks.length){const t=n.hooks[0].objid;if(t>=0){const s=ObjectUtil$1.GetObjectPtr(t,!1);s&&s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(i=t,e&&(e.x=n.hooks[0].connect.x,e.y=n.hooks[0].connect.y))}}return i}static HasContainerParent(t){if(t&&t.hooks.length){const e=t.hooks[0].objid,i=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i instanceof Instance.Shape.ShapeContainer)return e}return!1}static ShiftConnectedShapes(t,e,i,n,s,a,o){let r,l,h,c,u=[],d=[],p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),g=OptConstant.ActionArrow;OptAhUtil.GetLineTree(e,i,u),r=OptAhUtil.FilterChartShapes(t,n,u,s);let f,m=0,v=0,b=ObjectUtil$1.GetObjectPtr(i,!1),y=ObjectUtil$1.GetObjectPtr(t,!1);if(s&&null!=a){let t=ObjectUtil$1.GetObjectPtr(a,!1);if(t)if(t.flags&NvConstant.ObjFlags.UseConnect&&t.ConnectPoints){let e=Utils1.DeepCopy(t);f=e.AdjustAutoInsertShape(e.Frame,n===g.Up||n===g.Down,!0)?{width:e.Frame.height,height:e.Frame.width}:t.Frame}else f=t.Frame}switch(null==f&&(f=y.Frame),n){case g.Right:null!=o?(m=o,c=20):(m=f.width+p.def.h_arraywidth,c=p.def.g_arraywidth),h=Math.abs(b.EndPoint.x-b.StartPoint.x),!s&&h-m<c&&(m=h-c);break;case g.Left:m=null!=o?o:f.width+p.def.h_arraywidth,h=Math.abs(b.EndPoint.x-b.StartPoint.x),!s&&h-m<p.def.h_arraywidth&&(m=h-p.def.h_arraywidth),m=-m;break;case g.Down:null!=o?(v=o,c=20):(v=f.height+p.def.v_arraywidth,c=p.def.v_arraywidth),h=Math.abs(b.EndPoint.y-b.StartPoint.y),!s&&h-v<c&&(v=h-c);break;case g.Up:v=null!=o?o:f.height+p.def.v_arraywidth,h=Math.abs(b.EndPoint.y-b.StartPoint.y),!s&&h-v<p.def.v_arraywidth&&(v=h-p.def.v_arraywidth),v=-v}if(!s&&(m=-m,v=-v,OptAhUtil.GetLineTree(e,-1,d),l=OptAhUtil.FilterChartShapes(t,n,d,s),l.remainframe&&r.shiftframe)){r.shiftframe.x+=m,r.shiftframe.y+=v;const t=20;switch(n){case g.Right:if(r.shiftframe.x<l.remainframe.x+l.remainframe.width+t)return-1;break;case g.Left:if(r.shiftframe.x+r.shiftframe.width+t>l.remainframe.x)return-1;break;case g.Down:if(r.shiftframe.y<l.remainframe.y+l.remainframe.height+t)return-1;break;case g.Up:if(r.shiftframe.y+r.shiftframe.height+t>l.remainframe.y)return-1}}let S=r.newlist,x=S.length;for(let w=0;w<x;w++)ToolActUtil.OffsetShape(S[w],m,v,0)}static GetLineTree(t,e,i){i.indexOf(t)<0&&i.push(t);const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.hooks.length&&i.indexOf(n.hooks[0].objid)<0){const e=ObjectUtil$1.GetObjectPtr(n.hooks[0].objid,!1);if(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)OptAhUtil.GetConnectorTree(e.BlockID,i,!0);else{let s=t;switch(e.objecttype){case ShapeConstant.ObjectTypes.NgTimeLine:s=n.hooks[0].objid;break;case ShapeConstant.ObjectTypes.NgEvent:e.hooks.length>0&&(s=e.hooks[0].objid)}i.indexOf(s)<0&&i.push(s)}}const s=HookUtil.FindAllChildConnectors(t);for(let r=0;r<s.length;r++)i.indexOf(s[r])<0&&OptAhUtil.GetConnectorTree(s[r],i,!0);let a;const o=T3Gv.opt.FindAllChildLines(t);for(let r=0;r<o.length;r++)if(o[r]!==e&&i.indexOf(o[r])<0){i.push(o[r]);const e=ObjectUtil$1.GetObjectPtr(o[r],!1);if(e&&2===e.hooks.length)for(let n=0;n<2;n++){const s=e.hooks[n].objid;if(s!==t){const t=ObjectUtil$1.GetObjectPtr(s,!1);t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&OptAhUtil.GetLineTree(s,o[r],i)}}else e.objecttype===ShapeConstant.ObjectTypes.NgEvent&&(a=e.associd,a>=0&&i.indexOf(a)<0&&i.push(a))}}static FilterChartShapes(t,e,i,n){let s,a,o=ObjectUtil$1.GetObjectPtr(t,!1),r=[],l=OptConstant.ActionArrow;if(o){let h,c,u,d,p=i.length,g=o.Frame.x+o.Frame.width,f=o.Frame.y+o.Frame.height;for(h=0;h<p;h++)if(u=i[h],u!==t&&(c=ObjectUtil$1.GetObjectPtr(u,!1),c&&c.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)){switch(d=!1,e){case l.Right:c.Frame.x>g&&(r.push(u),d=!0);break;case l.Left:c.Frame.x+c.Frame.width<o.Frame.x&&(r.push(u),d=!0);break;case l.Down:c.Frame.y>f&&(r.push(u),d=!0);break;case l.Up:c.Frame.y+c.Frame.height<o.Frame.y&&(r.push(u),d=!0);break;default:r.push(u),d=!0}n||(d?null==s?s=Utils1.DeepCopy(c.r):Utils2.UnionRect(s,c.r,s):null==a?a=Utils1.DeepCopy(c.r):Utils2.UnionRect(a,c.r,a))}}return{newlist:r,shiftframe:s,remainframe:a}}static GetConnectorTree(t,e,i){e.indexOf(t)<0&&e.push(t);const n=ObjectUtil$1.GetObjectPtr(t,!1);if(n&&n.arraylist){const t=n.arraylist.hook.length;for(let s=1;s<t;s++){const t=n.arraylist.hook[s].id;if(t>=0){if(e.indexOf(t)<0){e.push(t);const i=ObjectUtil$1.GetObjectPtr(t,!1);i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&OptAhUtil.GetConnectorTree(t,e)}const n=HookUtil.FindAllChildConnectors(t),s=n.length;for(let t=0;t<s;t++)this.GetConnectorTree(n[t],e,i);if(i){const i=T3Gv.opt.FindAllChildLines(t),n=i.length;for(let s=0;s<n;s++)if(e.indexOf(i[s])<0){e.push(i[s]);const n=ObjectUtil$1.GetObjectPtr(i[s],!1);if(n&&2===n.hooks.length)for(let a=0;a<2;a++){const o=n.hooks[a].objid;if(o!==t){const t=ObjectUtil$1.GetObjectPtr(o,!1);t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&OptAhUtil.GetLineTree(o,i[s],e)}}}}}}}}}class SelectUtil{static SelectObjectFromClick(t,e,i){LogUtil.Debug("O.Opt SelectObjectFromClick - Input:",{event:t,svgElement:e,preserveSelection:i}),OptCMUtil.CancelOperation();const n=LayerUtil.ActiveVisibleZList().length;if(NvConstant.FNObjectTypes.ShapeContainer,0===n)return LogUtil.Debug("O.Opt SelectObjectFromClick - Output: false (no visible objects)"),!1;if(null===e)return LogUtil.Debug("O.Opt SelectObjectFromClick - Output: false (no SVG element)"),!1;const s=e.GetID(),a=ObjectUtil$1.GetObjectPtr(s,!1);if(!(a&&a instanceof Instance.Shape.BaseDrawObject))return LogUtil.Debug("O.Opt SelectObjectFromClick - Output: false (not a drawing object)"),!1;let o=t.gesture.srcEvent.shiftKey||t.gesture.srcEvent.ctrlKey||T3Constant.DocContext.SelectionToolMultiple;t.gesture.srcEvent.ctrlKey&&t.gesture.srcEvent.metaKey&&(o=!1);const r=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data.indexOf(s);let l=[];return l.push(s),-1==r?(this.SelectObjects(l,o,!1),LogUtil.Debug("O.Opt SelectObjectFromClick - Output: true (object selected)"),!0):!o||(this.SelectObjects(l,o,!1),!!i)}static SelectObjects(t,e,i){LogUtil.Debug("O.Opt SelectObjects - Input:",{objectsToSelect:t,isMultipleSelection:e,preserveSelectionState:i});let n=-1;if(t&&t.length>0){-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID&&TextUtil.DeactivateTextEdit(!1,!0);const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,i);if(n=SelectUtil.GetTargetSelect(),e||(T3Gv.opt.SetDimensionVisibility(s,!1),s.length=0),n>=0){const t=s.indexOf(n);e?t>=0&&(n=-1):t<0&&(n=-1)}for(let i=0;i<t.length;i++){let a=t[i];if(ObjectUtil$1.GetObjectPtr(a,!1)){const t=s.indexOf(a);if(-1===t)n<0&&(n=a),s.push(a);else if(e){const e=ObjectUtil$1.GetObjectPtr(a,!1);e&&e.ShowOrHideDimensions(!1),s.splice(t,1)}}}if(n>=0){s.indexOf(n)<0&&(n=-1)}n<0&&s.length>0&&(n=s[0]),SelectUtil.SetTargetSelect(n,i),T3Gv.opt.lastOpDuplicate=!1,this.UpdateSelectionAttributes(s),SvgUtil.HideAllSVGSelectionStates(),SvgUtil.RenderAllSVGSelectionStates()}return LogUtil.Debug("O.Opt SelectObjects - Output:",{selectedIndex:n,selectedCount:(null==t?void 0:t.length)||0}),n}static GetTargetSelect(){LogUtil.Debug("O.Opt GetTargetSelect - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let e=-1;if(t.tselect>=0){const i=ObjectUtil$1.GetObjectPtr(t.tselect,!1);i&&i instanceof Instance.Shape.BaseDrawObject&&(e=t.tselect)}return LogUtil.Debug("O.Opt GetTargetSelect - Output:",e),e}static SetTargetSelect(t,e){LogUtil.Debug("O.Opt SetTargetSelect - Input:",{targetId:t,preserveSession:e});let i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,e);i.tselect=t;let n=null;if(t>0){const e=ObjectUtil$1.GetObjectPtr(t,!1);e&&e instanceof Instance.Shape.BaseDrawObject?n=e.GetDimensionsForDisplay():(t=-1,i.tselect=t)}n?(UIUtil.ShowFrame(!0),UIUtil.UpdateDisplayCoordinates(n,null,null,null)):UIUtil.ShowFrame(!1),LogUtil.Debug("O.Opt SetTargetSelect - Output:",{targetId:i.tselect,dimensions:n})}static UpdateSelectionAttributes(t){if(LogUtil.Debug("O.Opt UpdateSelectionAttributes - Input:",t),!t)return void LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output: No selection objects provided, exiting early");let e,i,n,s,a=0;const o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);t&&(a=t.length)&&t[0],this.ResetSelectionState();const r=T3Gv.state.GetUndoState();let l=T3Gv.opt.selectionState;if(l.undo=r.undo,l.redo=r.redo,T3Gv.opt.bInDimensionEdit)return T3Gv.opt.HandleDimensionEditMode(o),void LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output: Dimension edit mode handled");if(0===a||T3Gv.opt.bInNoteEdit)return T3Gv.opt.HandleEmptySelectionOrNoteEditMode(o),void LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output: Empty selection or note edit mode handled");for(e=SelectUtil.GetTargetSelect(),l.nselect=a,e>=0&&(s=ObjectUtil$1.GetObjectPtr(e,!1),s&&s instanceof Instance.Shape.BaseDrawObject||(e=-1,o.tselect=-1)),e>=0&&T3Gv.opt.ProcessTargetObject(e,s),i=0;i<a;i++){const s=t[i];if(s!==e&&(l.allowalign=!0),n=ObjectUtil$1.GetObjectPtr(s,!1),!(n instanceof Instance.Shape.BaseDrawObject))continue;const a=n;T3Gv.opt.ProcessSelectedObject(n,a,i)}T3Gv.opt.moveList=null,l.allowcopy=l.nselect>0;const h=Object.assign(new SelectionAttr,Utils1.DeepCopy(l));T3Gv.docUtil.rulerConfig.showpixels&&h.fontsize>=0&&(h.fontsize=OptCMUtil.PixelstoPoints(h.fontsize)),LogUtil.Debug("O.Opt UpdateSelectionAttributes - Output:",{nselect:l.nselect,nshapeselected:l.nshapeselected,nlineselected:l.nlineselected,nconnectorselected:l.nconnectorselected,hastext:l.selectionhastext})}static ResetSelectionState(){LogUtil.Debug("O.Opt ResetSelectionState - Input: No parameters");const t=T3Gv.opt.selectionState;t.nselect=0,t.nlineselected=0,t.nshapeselected=0,t.nconnectorselected=0,t.ngroupsselected=0,t.nimageselected=0,t.ntablesselected=0,t.npolylinecontainerselected=0,t.ncells_selected=0,t.nsegs=0,t.IsTargetTable=!1,t.allowalign=0,t.allowcopy=!1,t.selectionhastext=!1,t.cell_notext=!1,t.cellselected=!1,t.projectTableSelected=!1,t.lockedTableSelected=!1,t.polyclosed=!1,t.iswallselected=!1,t.bInNoteEdit=T3Gv.opt.bInNoteEdit,t.connectorCanHaveCurve=!1,t.isJiraCard=!1,t.width=0,t.widthstr="",t.height=0,t.heightstr="",t.left=0,t.leftstr="",t.top=0,t.topstr="",t.WallThickness=0,t.fixedCornerRadius=-2,t.lineCornerRadius=-2,t.TextDirection=0,t.dimensions=0,t.celltype=0,t.cellflags=0,t.subtype=0,t.objecttype=0,t.datasetElemID=-1,t.tselect=-1,t.paste=OptCMUtil.GetClipboardType(),t.csOptMng=T3Gv.wallOpt,LogUtil.Debug("O.Opt ResetSelectionState - Output: Selection state reset")}static RemoveFromSelectedList(t){LogUtil.Debug("O.Opt RemoveFromSelectedList - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1).indexOf(t);if(-1!==e){ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0).splice(e,1);if(t===ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).tselect){ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0).tselect=-1}}LogUtil.Debug("O.Opt RemoveFromSelectedList - Output: Object removed from selection")}static StartOptSltSelect(t){LogUtil.Debug("O.Opt StartOptSltSelect - Input event:",t);try{if(T3Gv.docUtil.IsReadOnly())return void LogUtil.Debug("O.Opt StartOptSltSelect - Document is read-only; aborting.");if(T3Gv.opt.crtOpt===OptConstant.OptTypes.FormatPainter){if(T3Gv.opt.formatPainterSticky)return void LogUtil.Debug("O.Opt StartOptSltSelect - formatPainterSticky active; aborting.");UIUtil.SetFormatPainter(!0,!1)}ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),T3Gv.opt.CloseEdit();const e=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Rect);e.SetStrokeColor("black"),e.SetFillColor("black"),e.SetFillOpacity(.03);const i=1/T3Gv.docUtil.GetZoomFactor();e.SetStrokeWidth(1*i);{const t=2*i+","+i;e.SetStrokePattern(t)}const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);T3Gv.opt.optSltStartX=n.x,T3Gv.opt.optSltStartY=n.y,e.SetSize(1,1),e.SetPos(n.x,n.y),T3Gv.opt.svgOverlayLayer.AddElement(e),LogUtil.Debug("O.Opt StartOptSltSelect - Opt Slt shape created:",e),T3Gv.opt.optSlt=e,T3Gv.opt.EndStampSession(),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_OptSltDrag),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_OptSltDragEnd),LogUtil.Debug("O.Opt StartOptSltSelect - Output opt slt set successfully:",T3Gv.opt.optSlt)}catch(e){throw LogUtil.Debug("O.Opt StartOptSltSelect - Error:",e),this.OptSltSelectExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),e}}static SelectAllInRect(t,e){LogUtil.Debug("O.Opt SelectAllInRect - Input:",{selectionRect:t,allowMultipleSelection:e});const i=LayerUtil.ActiveVisibleZList(),n=T3Gv.opt.RemoveNotVisible(i),s=n.length,a=NvConstant.FNObjectTypes.ShapeContainer;if(0!==s){const i={x:t.x,y:t.y,width:t.width,height:t.height},o=[];for(let t=0;t<s;++t){const e=T3Gv.stdObj.GetObject(n[t]);if(null!=e){const s=e.Data;if(s.objecttype!==a){let e=s.Frame;if(s.RotationAngle){const t={x:e.x+e.width/2,y:e.y+e.height/2};e=ToolActUtil.RotateRectAboutCenter(e,t,s.RotationAngle)}Utils2.IsRectangleFullyEnclosed(i,e)&&o.push(n[t])}}}0===o.length?(LogUtil.Debug("O.Opt SelectAllInRect - No objects found in selection rectangle"),this.ClearSelectionClick()):(LogUtil.Debug("O.Opt SelectAllInRect - Found objects:",o.length),SelectUtil.SelectObjects(o,e,!1))}else LogUtil.Debug("O.Opt SelectAllInRect - No visible objects to select");LogUtil.Debug("O.Opt SelectAllInRect - Output: Selection processing completed")}static OptSltSelectMoveCommon(t,e){if(LogUtil.Debug("O.Opt OptSltSelectMoveCommon - Input:",{mouseX:t,mouseY:e}),null===T3Gv.opt.optSlt)return;const i=t,n=e,s=T3Gv.opt.optSltStartX,a=T3Gv.opt.optSltStartY;i>=s&&n>=a?(T3Gv.opt.optSlt.SetSize(i-s,n-a),T3Gv.opt.optSltFrame={x:s,y:a,width:i-s,height:n-a}):n<a?i>=s?(T3Gv.opt.optSlt.SetSize(i-s,a-n),T3Gv.opt.optSlt.SetPos(s,n),T3Gv.opt.optSltFrame={x:s,y:n,width:i-s,height:a-n}):(T3Gv.opt.optSlt.SetSize(s-i,a-n),T3Gv.opt.optSlt.SetPos(i,n),T3Gv.opt.optSltFrame={x:i,y:n,width:s-i,height:a-n}):i<s&&(T3Gv.opt.optSlt.SetSize(s-i,n-a),T3Gv.opt.optSlt.SetPos(i,a),T3Gv.opt.optSltFrame={x:i,y:a,width:s-i,height:n-a}),LogUtil.Debug("O.Opt OptSltSelectMoveCommon - Output:",{optSltFrame:T3Gv.opt.optSltFrame})}static UnbindOptSltHammerEvents(){LogUtil.Debug("O.Opt UnbindOptSltHammerEvents - Input"),T3Gv.opt.WorkAreaHammer&&(T3Gv.opt.WorkAreaHammer.off("drag"),T3Gv.opt.WorkAreaHammer.off("dragend")),LogUtil.Debug("O.Opt UnbindOptSltHammerEvents - Output: done")}static OptSltSelectExceptionCleanup(t){LogUtil.Debug("O.Opt OptSltSelectExceptionCleanup - Input:",t);try{this.UnbindOptSltHammerEvents(),DrawUtil.ResetAutoScrollTimer(),T3Gv.opt.optSlt&&T3Gv.opt.svgOverlayLayer.RemoveElement(T3Gv.opt.optSlt),T3Gv.opt.optSlt=null,T3Gv.opt.optSltStartX=0,T3Gv.opt.optSltStartY=0,T3Gv.opt.optSltFrame={x:0,y:0,width:0,height:0},T3Gv.opt.noUndo=!1}catch(e){throw T3Util.Error("= u.SelectUtil: OptSltSelectExceptionCleanup/ - Cleanup Error:",e),e}throw LogUtil.Debug("O.Opt OptSltSelectExceptionCleanup - Output: Cleanup completed"),t}static ClearAnySelection(t){LogUtil.Debug("O.Opt ClearAnySelection - Input:",{preserveBlock:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,t);0!==e.length&&(SelectUtil.SetTargetSelect(-1,t),SvgUtil.HideAllSVGSelectionStates(),e.length=0),LogUtil.Debug("O.Opt ClearAnySelection - Output: selection cleared")}static ClearSelectionClick(){LogUtil.Debug("O.Opt ClearSelectionClick: input"),T3Gv.opt.CloseEdit(),this.ClearAnySelection(!1),SelectUtil.UpdateSelectionAttributes(null),LogUtil.Debug("O.Opt ClearSelectionClick: output")}static OptSltSelectCancel(t){LogUtil.Debug("O.Opt OptSltSelectCancel - Input:",t),T3Gv.opt.optSlt&&(T3Gv.opt.WorkAreaHammer.off("drag"),T3Gv.opt.WorkAreaHammer.off("dragend"),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),DrawUtil.ResetAutoScrollTimer(),T3Gv.opt.svgOverlayLayer.RemoveElement(T3Gv.opt.optSlt),T3Gv.opt.optSlt=null,T3Gv.opt.optSltStartX=0,T3Gv.opt.optSltStartY=0,T3Gv.opt.optSltFrame={x:0,y:0,width:0,height:0}),LogUtil.Debug("O.Opt OptSltSelectCancel - Output: Opt slt selection canceled")}static SelectAllObjects(t){let e,i;LogUtil.Debug("U.Util1 SelectAllObjects - Input:",{typeFilter:t});const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);let s,a=0;if(ShapeConstant.ObjectTypes.ShapeContainer,n.theActiveTextEditObjectID>=0){e=T3Gv.opt.svgObjectLayer.GetElementById(n.theActiveTextEditObjectID);const t=e.textElem;if(t&&(a=t.GetText().length,t.SetSelectedRange(0,a)),!(0===a&&n.theActiveTableObjectID>=0))return void LogUtil.Debug("U.Util1 SelectAllObjects - Output: All text selected");T3Gv.opt.CloseEdit(!0)}const o=[];let r=LayerUtil.ActiveVisibleZList();r=T3Gv.opt.RemoveNotVisible(r);const l=r.length;let h=0,c=!1;for(t&&(h=t.length),s=0;s<l;++s)i=ObjectUtil$1.GetObjectPtr(r[s],!1),h>0&&(c=!!(-1!==t.indexOf(OptConstant.DrawObjectBaseClass.Shape)&&i instanceof Instance.Shape.PolyLineContainer&&i.polylist&&i.polylist.closed),-1===t.indexOf(i.DrawingObjectBaseClass)&&!c)||(o.push(r[s]),SelectUtil.SelectObjects(o,!1,!1),LogUtil.Debug("U.Util1 SelectAllObjects - Output: Selected",o.length,"objects"))}static GetSelectionContext(){let t;LogUtil.Debug("O.Opt GetSelectionContext - Input:",{});let e=[];if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID)return t=OptAhUtil.GetGvSviOpt(),t?(e.push(DSConstant.Contexts.Text),e.push(T3Gv.opt.GetAutomationContext(t)),LogUtil.Debug("O.Opt GetSelectionContext - Output:",e),e):(LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.Text),DSConstant.Contexts.Text);const i=T3Gv.opt.svgDoc.GetActiveEdit();if(null!==i&&i.ID===OptConstant.SVGElementClass.DimText)return LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.DimensionText),DSConstant.Contexts.DimensionText;if(null!==i&&i.ID===OptConstant.SVGElementClass.NoteText)return LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.Note),DSConstant.Contexts.Note;let n=SelectUtil.GetTargetSelect();if(0===n&&(n=-1),-1!==n){t=OptAhUtil.GetGvSviOpt();const i=T3Gv.stdObj.GetObject(n).Data;if(t&&e.push(DSConstant.Contexts.Automation),i.AllowTextEdit())return e.length?(e.push(DSConstant.Contexts.Text),LogUtil.Debug("O.Opt GetSelectionContext - Output:",e),e):(LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.Text),DSConstant.Contexts.Text)}return LogUtil.Debug("O.Opt GetSelectionContext - Output:",DSConstant.Contexts.None),DSConstant.Contexts.None}static FindAllChildObjects(t,e,i){LogUtil.Debug("O.Opt FindAllChildObjects - Input:",{targetObjectId:t,filterDrawingBaseClass:e,filterObjectType:i});const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),s=OptCMUtil.FindLink(n,t,!0),a=[],o=n.length;if(s>=0)for(let r=s;r<o&&n[r].targetid===t;r++){const t=n[r].hookid,s=ObjectUtil$1.GetObjectPtr(t,!1);s&&(null!=e&&s.DrawingObjectBaseClass!==e||null!=i&&s.objecttype!==i||a.push(t))}return LogUtil.Debug("O.Opt FindAllChildObjects - Output:",{childObjectIds:a}),a}static AreSelectedObjects(){LogUtil.Debug("O.Opt AreSelectedObjects - Input: No parameters");const t=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId),e=null!==t&&0!==t.Data.length;return LogUtil.Debug("O.Opt AreSelectedObjects - Output:",e),e}static FindConnect(t,e,i,n,s,a,o){LogUtil.Debug("O.Opt FindConnect - Input:",{targetObjectId:t,drawingObject:e?e.BlockID:null,hookPointsCount:i?i.length:0,showVisuals:n,isAttachMode:s,allowJoin:a,eventPosition:o});let r,l,h,c,u,d,p=0,g=-1,f=!1,m={},v=[],b=[],y=1e30,S=0,x={x:0,y:0},w={x:0,y:0},C=[],T=[],D=null,k=0,$=NvConstant.HookFlags.LcHookNoExtra,O=OptConstant.HookPts,P=!1;const L=t=>{switch(t){case O.KTC:case O.KBC:case O.KRC:case O.KLC:return!0;default:if(t>=O.CustomBase&&t<O.CustomBase+100)return!0}return!1},I=e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line;if(null==i)return LogUtil.Debug("O.Opt FindConnect - Output: false (No hook points)"),!1;const A=T3Gv.opt.linkParams.lpCircList;if(null==A)return LogUtil.Debug("O.Opt FindConnect - Output: false (No circular list)"),!1;x.x=T3Gv.opt.linkParams.ConnectPt.x,x.y=T3Gv.opt.linkParams.ConnectPt.y,S=e.hookflags,S=Utils2.SetFlag(S,NvConstant.HookFlags.LcAttachToLine,!1);const E=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);E&&(k=E.flags),s?(C.push(OptConstant.DrawObjectBaseClass.Line),D=C):T3Gv.opt.linkParams.ArraysOnly&&(e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?(C.push(OptConstant.DrawObjectBaseClass.Shape),D=C):e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape?(C.push(OptConstant.DrawObjectBaseClass.Connector),k&OptConstant.SessionFlags.LLink&&C.push(OptConstant.DrawObjectBaseClass.Line),D=C):D=C),a&&T.push(OptConstant.DrawObjectBaseClass.Line),T3Gv.opt.fromOverlayLayer&&(C.push(OptConstant.DrawObjectBaseClass.Shape),D=C),T3Gv.opt.linkParams.JoinIndex=-1;for(let G=0;G<i.length;G++){if(p=0,(a||(m=new HitResult(-1,0,null),e.ClosePolygon(t,i,m)&&(a=!0)))&&a&&(m=new HitResult(-1,0,null),e.ClosePolygon(t,i,m)||(m=this.FindObject(i[G],A,T,!1,!0,null)),m&&m.hitcode===NvConstant.HitCodes.PLApp)){T3Gv.opt.linkParams.JoinIndex=m.objectid,T3Gv.opt.linkParams.JoinData=m.segment,T3Gv.opt.linkParams.JoinSourceData=i[G].id,r=m.pt.x-i[G].x,l=m.pt.y-i[G].y,T3Gv.opt.dragDeltaX=r,T3Gv.opt.dragDeltaY=l,T3Gv.opt.linkParams.JoinData===OptConstant.HookPts.KTL?(T3Gv.opt.linkParams.ConnectPt.x=0,T3Gv.opt.linkParams.ConnectPt.y=0):(T3Gv.opt.linkParams.ConnectPt.x=OptConstant.Common.DimMax,T3Gv.opt.linkParams.ConnectPt.y=OptConstant.Common.DimMax);break}if(T3Gv.opt.linkParams.PrevConnect>=0){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.PrevConnect,!1);if(t){const n=Utils1.DeepCopy(T3Gv.opt.linkParams.ContainerPt[0]);if(t.IsShapeContainer(e,n)){const i=t.GetHitTestFrame(e);Utils2.pointInRect(i,n)&&(m.objectid=T3Gv.opt.linkParams.PrevConnect,m.hitcode=NvConstant.HitCodes.InContainer,m.cellid=null)}else Utils2.pointInRect(t.r,i[G])&&(p=t.Hit(i[G],I,!1,null),p&&(null==m&&(m={cellid:null}),m.objectid=T3Gv.opt.linkParams.PrevConnect,m.hitcode=p,m.cellid=null))}}if(0===p&&(m=this.FindObject(i[G],A,D,I,!1,e)),m&&m.hitcode){if(u=ObjectUtil$1.GetObjectPtr(m.objectid,!1),null==u)return LogUtil.Debug("O.Opt FindConnect - Output: false (Target object not found)"),!1;if(m.hitcode===NvConstant.HitCodes.InContainer&&(P=!0,d=m.theContainerPt),!P)if(s){if(T3Gv.opt.linkParams.AutoInsert){if(e.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape)continue;let t=!1;for(let i=0;i<u.hooks.length;i++)if(u.hooks[i].objid==e.BlockID){t=!0;break}if(t)continue;if(u.LineType!==OptConstant.LineType.SEGLINE)continue}if(0==(u.targflags&NvConstant.HookFlags.LcAttachToLine))continue}else{let t=u.targflags;if(T3Gv.opt.linkParams.ArraysOnly||0!=(k&OptConstant.SessionFlags.SLink)?T3Gv.opt.linkParams.ArraysOnly&&u.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line&&(t=Utils2.SetFlag(t,NvConstant.HookFlags.LcShape,!0)):t=Utils2.SetFlag(t,NvConstant.HookFlags.LcShape,!1),0==(S&t))continue}if(S=Utils2.SetFlag(S,NvConstant.HookFlags.LcShapeOnLine,s),e.objecttype===NvConstant.FNObjectTypes.FlWall&&(S=Utils2.SetFlag(S,NvConstant.HookFlags.LcNoSnaps,!0)),b=u.GetTargetPoints(i[G],S|$,t),!b||0===b.length)return LogUtil.Debug("O.Opt FindConnect - Output: false (No target points)"),!1;v=u.GetPerimPts(m.objectid,b,null,!1,b[0].cellid,t);let n=i[G];P&&(w=n=d,c=d.id);for(let t=0;t<v.length;t++){const e=v[t].x-n.x,i=v[t].y-n.y;h=e*e+i*i,h<y&&(y=h,g=t)}if(u.polylist&&m.segment>=0){const t=this.FindObject(v[g],A,D,!1,!1,e);if(!t)return LogUtil.Debug("O.Opt FindConnect - Output: false (Segment check failed)"),!1;if(t.segment!=m.segment)return LogUtil.Debug("O.Opt FindConnect - Output: false (Segment mismatch)"),!1}if(P||(c=i[G].id,c=u.GetBestHook(t,i[G].id,b[g]),c!=i[G].id?(w=e.HookToPoint(c,null),w.x+=o.x-T3Gv.opt.dragStartX,w.y+=o.y-T3Gv.opt.dragStartY):w=i[G]),-1===g)return;const a=(r=v[g].x-w.x)*r+(l=v[g].y-w.y)*l;if(!u.AllowHook(i[G],t,a))continue;if(T3Gv.opt.dragDeltaX=r,T3Gv.opt.dragDeltaY=l,s&&T3Gv.opt.linkParams.AutoInsert){T3Gv.opt.linkParams.AutoPoints=[];let t=Utils1.DeepCopy(e.Frame);if(Math.floor((e.RotationAngle+45)/90)){const e=90/(180/NvConstant.Geometry.PI),i=[];i.push(new Point$1(t.x,t.y)),i.push(new Point$1(t.x+t.width,t.y+t.height)),Utils3.RotatePointsAboutCenter(t,e,i),t=Utils2.Pt2Rect(i[0],i[1])}if(t.x+=r,t.y+=l,!u.GetFrameIntersects(t,e,T3Gv.opt.linkParams.AutoPoints,T3Gv.opt.linkParams))continue}f=!0,T3Gv.opt.linkParams.ConnectIndex=m.objectid,T3Gv.opt.linkParams.ConnectIndex>=0&&T3Gv.opt.linkParams.ConnectIndexHistory.indexOf(T3Gv.opt.linkParams.ConnectIndex)<0&&T3Gv.opt.linkParams.ConnectIndexHistory.push(T3Gv.opt.linkParams.ConnectIndex),T3Gv.opt.linkParams.ConnectPt.x=b[g].x,T3Gv.opt.linkParams.ConnectPt.y=b[g].y,T3Gv.opt.linkParams.ConnectInside=b[g].cellid,T3Gv.opt.linkParams.HookIndex=c,T3Gv.opt.linkParams.AutoInsert&&s&&!T3Gv.opt.linkParams.AutoSinglePoint?T3Gv.opt.linkParams.ConnectHookFlag=NvConstant.HookFlags.LcAutoInsert:T3Gv.opt.linkParams.ArraysOnly&&u.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&L(c)?T3Gv.opt.linkParams.ConnectHookFlag=NvConstant.HookFlags.LcHookReverse:T3Gv.opt.linkParams.ConnectHookFlag=0;break}}if(f||(T3Gv.opt.linkParams.ConnectIndex>=0&&T3Gv.opt.linkParams.ConnectIndexHistory.indexOf(T3Gv.opt.linkParams.ConnectIndex)<0&&T3Gv.opt.linkParams.ConnectIndexHistory.push(T3Gv.opt.linkParams.ConnectIndex),T3Gv.opt.linkParams.ConnectIndex=-1),T3Gv.opt.linkParams.JoinIndex!=T3Gv.opt.linkParams.HiliteJoin&&n&&(T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,t,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.JoinIndex>=0&&T3Gv.opt.linkParams.HiliteJoin<0?OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkJoin&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!0):T3Gv.opt.linkParams.JoinIndex<0&&T3Gv.opt.linkParams.HiliteJoin>=0&&T3Gv.opt.UndoEditMode(),T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,t,null),T3Gv.opt.linkParams.HiliteJoin=-1,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.JoinIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.ConnectPt,!0,!0,t,null),T3Gv.opt.linkParams.HiliteJoin=T3Gv.opt.linkParams.JoinIndex,OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkJoin&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!0))),T3Gv.opt.linkParams.HiliteConnect==T3Gv.opt.linkParams.ConnectIndex&&T3Gv.opt.linkParams.HiliteInside==T3Gv.opt.linkParams.ConnectInside||!n)f&&n&&T3Gv.opt.linkParams.HiliteConnect===T3Gv.opt.linkParams.ConnectIndex&&T3Gv.opt.linkParams.HiliteInside===T3Gv.opt.linkParams.ConnectInside&&1===v.length&&(x.x==T3Gv.opt.linkParams.ConnectPt.x&&x.y==T3Gv.opt.linkParams.ConnectPt.y||HookUtil.MoveConnectHilite(T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside));else{if(T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,t,null),T3Gv.opt.linkParams.HiliteJoin=-1,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.ConnectIndex>=0&&T3Gv.opt.linkParams.HiliteConnect<0)OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkConnect&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkConnect,null,!0);else if(T3Gv.opt.linkParams.ConnectIndex<0&&T3Gv.opt.linkParams.HiliteConnect>=0){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.HiliteConnect,!1);e.OnDisconnect(t,i,T3Gv.opt.linkParams.HookIndex,v[g]),T3Gv.opt.UndoEditMode()}T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,t,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null,T3Gv.opt.UndoEditMode()),T3Gv.opt.linkParams.ConnectIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.ConnectPt,!0,!1,t,T3Gv.opt.linkParams.ConnectInside),T3Gv.opt.linkParams.HiliteConnect=T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HiliteInside=T3Gv.opt.linkParams.ConnectInside,e.OnConnect(t,u,T3Gv.opt.linkParams.HookIndex,v[g],o),OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkConnect&&OptCMUtil.SetEditMode(NvConstant.EditState.LinkConnect,null,!0))}return LogUtil.Debug("O.Opt FindConnect - Output:",f),f}static FindObject(t,e,i,n,s,a){let o,r;LogUtil.Debug("O.Opt FindObject - Input:",{point:t,objectIdFilter:e,classFilter:i,hitTestOptions:n,usePreciseHitTest:s,containerObject:a});const l=new HitResult(-1,0,null),h=LayerUtil.ActiveVisibleZList();if(null==h)return LogUtil.Debug("O.Opt FindObject - Output: no visible objects"),-1;for(let c=h.length-1;c>=0;c--)if(!(r=e&&-1!==e.indexOf(h[c]))){if(o=ObjectUtil$1.GetObjectPtr(h[c],!1),null!=o){if(a&&a instanceof Instance.Shape.ShapeContainer&&o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)continue;(o.flags&NvConstant.ObjFlags.Lock||o.flags&NvConstant.ObjFlags.NoLinking)&&(o=null)}if(null!=o){if(o.flags&NvConstant.ObjFlags.NotVisible)continue;if(o.extraflags&OptConstant.ExtraFlags.ConnToConn)continue;if(a&&a.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&T3Gv.opt.FindChildArray(h[c],-1)>=0)continue;i&&(r=-1===i.indexOf(o.DrawingObjectBaseClass));const e=o.GetHitTestFrame(a);if(e.width<OptConstant.Common.FindObjectMinHitSpot&&(e.width=OptConstant.Common.FindObjectMinHitSpot,e.x-=OptConstant.Common.FindObjectMinHitSpot/2),e.height<OptConstant.Common.FindObjectMinHitSpot&&(e.height=OptConstant.Common.FindObjectMinHitSpot,e.y-=OptConstant.Common.FindObjectMinHitSpot/2),o instanceof Instance.Shape.ShapeContainer){const t=Utils1.DeepCopy(T3Gv.opt.linkParams.ContainerPt[0]);if(o.IsShapeContainer(a,t)&&Utils2.pointInRect(e,t))return l.objectid=h[c],l.hitcode=NvConstant.HitCodes.InContainer,l.theContainerPt=t,LogUtil.Debug("O.Opt FindObject - Output:",l),l;continue}if(!r&&Utils2.pointInRect(e,t)&&(l.objectid=h[c],l.hitcode=o.Hit(t,n,s,l),l.hitcode))return LogUtil.Debug("O.Opt FindObject - Output:",l),l}}return LogUtil.Debug("O.Opt FindObject - Output: result null"),null}static GetMoveList(t,e,i,n,s,a){let o,r,l,h,c,u,d,p,g;LogUtil.Debug("O.Opt GetMoveList - Input:",{objectId:t,useSelectedList:e,includeEnclosedObjects:i,useVisibleList:n,boundsRect:s,targetOnlyMode:a}),T3Gv.opt.moveList=[];const f=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(null==f)return LogUtil.Debug("O.Opt GetMoveList - Output: No links found, returning empty list"),T3Gv.opt.moveList;if(c=a?NvConstant.ListCodes.TargOnly:NvConstant.ListCodes.MoveTarg,t>=0&&(r=ObjectUtil$1.GetObjectPtr(t,!1),r&&(h=r.GetHookFlags(),h&NvConstant.HookFlags.LcMoveTarget&&e&&r.hooks.length&&(t=this.GetTargetNode(r.hooks[0].objid)))),e||n)for(l=n?LayerUtil.ActiveVisibleZList().slice(0):ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1).slice(0),o=0;o<l.length;o++)if(r=ObjectUtil$1.GetObjectPtr(l[o],!1),r){if(r.objecttype===NvConstant.FNObjectTypes.NgEventLabel){-1===l.indexOf(r.associd)&&l.push(r.associd);continue}(0===r.hooks.length||i)&&(T3Gv.opt.moveList=HookUtil.GetHookList(f,T3Gv.opt.moveList,l[o],r,c,s))}if(t>=0&&(r=ObjectUtil$1.GetObjectPtr(t,!1),r&&(0===r.hooks.length||i)&&(T3Gv.opt.moveList=HookUtil.GetHookList(f,T3Gv.opt.moveList,t,r,c,s))),i)for(u=T3Gv.opt.moveList.length,o=0;o<u;o++)for(r=ObjectUtil$1.GetObjectPtr(T3Gv.opt.moveList[o],!1),d=r.GetListOfEnclosedObjects(!0),p=d.length,g=0;g<p;g++){const t=d[g];T3Gv.opt.moveList.indexOf(t)<0&&T3Gv.opt.moveList.push(t)}return LogUtil.Debug("O.Opt GetMoveList - Output:",{objectCount:T3Gv.opt.moveList.length,moveList:T3Gv.opt.moveList}),T3Gv.opt.moveList}static GetSelectedObject(){let t=SelectUtil.GetTargetSelect();return{selectedId:t,selectedObject:ObjectUtil$1.GetObjectPtr(t,!1)}}static GetSelectedObjectList(){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);LogUtil.Debug("O.Opt GetSelectedObjectList - Input: No parameters");const e=[];for(let i=0;i<t.length;i++){const n=t[i],s=ObjectUtil$1.GetObjectPtr(n,!1);s&&e.push(s)}return LogUtil.Debug("O.Opt GetSelectedObjectList - Output:",{selectedCount:t.length,objectCount:e.length}),{selectedList:t,selectedObjects:e}}}class PolygonConstant{}PolygonConstant.ShapeTypes={PHOTO:-2,TABLE:-1,TEXT:0,IMAGE:1,DOCUMENT:7,RECTANGLE:2,ROUNDED_RECTANGLE:3,OVAL:4,CIRCLE:9,DIAMOND:6,TRIANGLE:14,TRIANGLE_BOTTOM:15,PARALLELOGRAM:5,TRAPEZOID:17,TRAPEZOID_BOTTOM:18,OCTAGON:19,HEXAGON:21,PENTAGON:22,PENTAGON_LEFT:23,POLYGON:26,TERMINAL:8,INPUT:16,STORAGE:20,DELAY:24,DISPLAY:25,ARROW_RIGHT:10,ARROW_LEFT:11,ARROW_TOP:12,ARROW_BOTTOM:13,MEASURE_AREA:27,LAST_SHAPE:27,ForeignObject:28};class PolyUtil{static ArcToPoly(t,e,i,n,s,a,o,r){LogUtil.Debug("O.Opt: ArcToPoly inputs:",{segments:t,center:{x:e.x,y:e.y},radius:i,startY:n,endY:s,targetX:a,flipArc:o,isComplexArc:r});let l,h,c,u=[];return r?(n>s?(c=e.y-i,h=e.y+i):(h=e.y-i,c=e.y+i),l=a<e.x,o=!1,this.ArcToPolySeg(u,t/2,e,i,n,h,a,o,!l),this.ArcToPolySeg(u,t,e,i,h,c,e.x,o,l),this.ArcToPolySeg(u,t/2,e,i,c,s,a,o,!l)):(l=a>=e.x,this.ArcToPolySeg(u,t,e,i,n,s,a,o,l)),LogUtil.Debug("O.Opt: ArcToPoly output points:",u.length),u}static ArcToPolySeg(t,e,i,n,s,a,o,r,l){LogUtil.Debug("O.Opt: ArcToPolySeg inputs:",{segments:e,center:{x:i.x,y:i.y},radius:n,startY:s,endY:a,targetX:o,flipArc:r,isRightSide:l});const h=n*n,c=(a-s)/e;for(let u=0;u<e;u++){const e=c*u,n=i.y-(s+e),a=Utils2.Sqrt(h-n*n),d=new Point$1(0,0);if(d.y=i.y-n,l){d.x=i.x+a;const t=d.x-o;r&&(d.x=o-t)}else{d.x=i.x-a;const t=o-d.x;r&&(d.x=o+t)}t.push(d)}return LogUtil.Debug("O.Opt: ArcToPolySeg output points count:",t.length),t}static PolyGetIntersect(t,e,i,n,s){LogUtil.Debug("O.Opt PolyGetIntersect - Input:",{pointCount:t.length,intersectValue:e,isHorizontal:s});let a,o,r,l,h,c,u,d,p,g=0,f=1,m=!1,v=0,b=t.length,y=0,S={x:0,y:0},x={x:0,y:0};for(;f<b+1;f++){let r=f;if(S=t[g],f===b?(x=t[0],r=0):x=t[f],!Utils2.IsEqual(x.x,S.x)||!Utils2.IsEqual(x.y,S.y))if(g=f,a=x.x-S.x,o=x.y-S.y,s){if(S.x<x.x?(l=S.x,h=x.x):(l=x.x,h=S.x),e<l||e>h)continue;if(0===a&&(a=1),u=o/a*(e-S.x)+S.y,S.y<x.y?(d=S.y,p=x.y):(p=S.y,d=x.y),u>=d&&u<=p){if(y>0)for(v=0;v<y;v++)m=Math.abs(u-i[v])>1;else m=!0;if(m){if(y>=2)return LogUtil.Debug("O.Opt PolyGetIntersect - Output: Too many intersections",y+1),y+1;i[y]=u,n&&(n[y]=r),y++}}}else{if(S.y<x.y?(l=S.y,h=x.y):(l=x.y,h=S.y),e<l||e>h)continue;if(0===o&&(o=1),c=a/o*(e-S.y)+S.x,S.x<x.x?(d=S.x,p=x.x):(p=S.x,d=x.x),c>=d&&c<=p){if(y>0)for(v=0;v<y;v++)m=Math.abs(c-i[v])>1;else m=!0;if(m){if(y>=2)return LogUtil.Debug("O.Opt PolyGetIntersect - Output: Too many intersections",y+1),y+1;i[y]=c,n&&(n[y]=r),y++}}}}return 2===y&&i[0]>i[1]&&(r=i[1],i[1]=i[0],i[0]=r,n&&(r=n[1],n[1]=n[0],n[0]=r)),LogUtil.Debug("O.Opt PolyGetIntersect - Output: Found",y,"intersections"),y}static ArcToChord(t,e,i,n,s){const a={x:(e.x+t.x)/2,y:(e.y+t.y)/2},o=e.x-t.x,r=e.y-t.y,l=Math.sqrt(o*o+r*r),h=r/l,c=o/l,u=Math.abs(h)<1e-4?0:h,d=Math.abs(o)<1e-4?0:o,p=Math.asin(u),g=Math.acos(c);let f,m={x:0,y:0};f=d<0&&r<0?-g:p>0&&d<0?-p:p;const v=Math.sin(f),b=Math.cos(f);let y=t.x-a.x,S=t.y-a.y;m.x=y*b+S*v+a.x,m.y=-y*v+S*b+a.y,y=e.x-a.x,S=e.y-a.y;const x={x:s.StartPoint.x,y:s.StartPoint.y},w={x:s.EndPoint.x,y:s.EndPoint.y};y=x.x-a.x,S=x.y-a.y,x.x=y*b+S*v+a.x,x.y=-y*v+S*b+a.y,y=w.x-a.x,S=w.y-a.y,w.x=y*b+S*v+a.x,w.y=-y*v+S*b+a.y,y=i.x-a.x,S=i.y-a.y;const C={x:y*b+S*v+a.x,y:-y*v+S*b+a.y};let T={x:0,y:0},D=!1;n&&(y=n.center.x-a.x,S=n.center.y-a.y,T.x=y*b+S*v+a.x,T.y=-y*v+S*b+a.y,D=a.y<T.y?C.y<T.y:C.y>T.y,D&&(x.x<w.x?C.x>x.x&&C.x<w.x&&(w.x-C.x<C.x-x.x?C.x=w.x:C.x=x.x):C.x>w.x&&C.x<x.x&&(x.x-C.x<C.x-w.x?C.x=x.x:C.x=w.x))),C.y=a.y,y=C.x-a.x,S=C.y-a.y;const k=Math.sin(-f),$=Math.cos(-f);return C.x=y*$+S*k+a.x,C.y=-y*k+S*$+a.y,y=m.x-a.x,S=m.y-a.y,m.x=y*$+S*k+a.x,m.y=-y*k+S*$+a.y,n&&(C.x=2*Math.round((C.x+.5)/2),!0===D&&C.x--),C}static ChordToArc(t,e,i,n,s,a,o,r){const l=e.x-t.x,h=e.y-t.y,c=h/Math.sqrt(l*l+h*h),u=Math.abs(c)<1e-4?0:c;let d=Math.asin(u);(d>0&&l<0||d<0&&l<0&&h<0)&&(d=-d);let p=Math.sin(d),g=Math.cos(d),f={x:0,y:0},m={x:0,y:0},v=t.x-i.x,b=t.y-i.y;i.x,i.y,v=e.x-i.x,b=e.y-i.y,i.x,i.y,v=r.x-i.x,b=r.y-i.y,f.x=v*g+b*p+i.x,f.y=-v*p+b*g+i.y,v=t.x-i.x,b=t.y-i.y,m.x=v*g+b*p+i.x,m.y=-v*p+b*g+i.y;let y=m.y>i.y&&!o||m.y<=i.y&&o;a&&(y=!y),v=f.x-i.x,Math.abs(v)>n&&(v=n);const S=Utils2.Sqrt(n*n-v*v);if(y){if(f.y=i.y+S,s){const t=m.y-f.y;f.y=m.y+t}}else if(f.y=i.y-S,s){const t=m.y-f.y;f.y=m.y+t}v=f.x-i.x,b=f.y-i.y;const x=Math.sin(-d),w=Math.cos(-d);return f.x=v*w+b*x+i.x,f.y=-v*x+b*w+i.y,f}static ArcIntersect(t,e,i){t.EndPoint.x,t.StartPoint.x,t.EndPoint.y,t.StartPoint.y;let n=t.IsReversed?t.CalcRadiusAndCenter(t.EndPoint.x,t.EndPoint.y,t.StartPoint.x,t.StartPoint.y,t.CurveAdjust,t.IsReversed):t.CalcRadiusAndCenter(t.StartPoint.x,t.StartPoint.y,t.EndPoint.x,t.EndPoint.y,t.CurveAdjust,t.IsReversed),s=n.centerX,a=n.centerY,o=n.radius,r=e.EndPoint.x-e.StartPoint.x,l=e.EndPoint.y-e.StartPoint.y,h=0===r,c=h?1:l/r,u=e.StartPoint.x,d=e.StartPoint.y,p=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);if(0===c){let n=e.StartPoint.y-a,r=o*o-n*n;if(r<0)return!1;let l=Utils2.Sqrt(r),h=l+s;if(i.x=h,i.y=d,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i))return!0;let c=-l+s;return i.x=c,i.y=d,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i)}if(h){let n=e.StartPoint.x-s,r=o*o-n*n;if(r<0)return!1;let l=Utils2.Sqrt(r),h=l+a;if(i.x=u,i.y=h,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i))return!0;let c=-l+a;return i.x=u,i.y=c,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i)}{let e=c*c+1,n=d-c*u-a,r=2*c*n-2*s,l=r*r-4*e*(s*s+n*n-o*o);if(l<0)return!1;let h=Utils2.Sqrt(l),g=(-r+h)/(2*e),f=d+c*(g-u);if(i.x=g,i.y=f,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i))return!0;let m=(-r-h)/(2*e),v=d+c*(m-u);return i.x=m,i.y=v,Utils3.LineDStyleHit(p,i,t.StyleRecord.lineThickness,0,null)||Utils2.pointInRect(t.Frame,i)}}static LinesMaintainDist(t,e,i,n){let s,a,o,r,l,h,c,u,d,p={startpt:0,endpt:0},g={x:0,y:0},f={x:0,y:0};if(null===e&&(e=t),p=e.GetConnectLine(),p?(c=p.startpt,u=p.endpt):(c=e.StartPoint,u=e.EndPoint),s=u.x-c.x,a=u.y-c.y,g.x=n.x,g.y=n.y,e.LineType===OptConstant.LineType.ARCLINE&&(g=this.ArcToChord(c,u,g,p,e)),i===OptConstant.ActionTriggerType.LineStart?(s=g.x-u.x,a=g.y-u.y):(s=g.x-c.x,a=g.y-c.y),o=Math.sqrt(s*s+a*a),p=t.GetConnectLine(),p?(c=p.startpt,u=p.endpt):(c=t.StartPoint,u=t.EndPoint),i===OptConstant.ActionTriggerType.LineStart?(d=u,s=-(u.x-c.x),a=-(u.y-c.y)):(d=c,s=u.x-c.x,a=u.y-c.y),r=Math.sqrt(s*s+a*a),o>r&&(o=r),r<1?(n.x=c.x,n.y=c.y):(l=a/r,h=s/r,n.x=d.x+h*o,n.y=d.y+l*o),t.LineType===OptConstant.LineType.ARCLINE){const e=t.CalcRadiusAndCenter(t.StartPoint.x,t.StartPoint.y,t.EndPoint.x,t.EndPoint.y,t.CurveAdjust,t.IsReversed),i=!1,s=!p&&t.IsReversed;f.x=e.centerX,f.y=e.centerY,n=this.ChordToArc(c,u,f,e.radius,s,i,e.centerInside,n)}}static GetMaxDim(t){return t.x=OptConstant.Common.MaxLongDim,t.y=OptConstant.Common.MaxLongDim,!0}static LinesAddCurve(t,e,i,n,s,a){let o,r=[],l=[],h={x:0,y:0,width:0,height:0};if(t)if(e>0&&i>0)for(h.x=n,h.y=s,h.width=a,h.height=-2*a,Utils2.PolyYCurve(l,h,20,0,0,0,-a,!0),o=l.length-1;o>=0;o--)r.push(l[o]);else e<0&&i>0?(h.x=n,h.y=s+2*a,h.width=a,h.height=-2*a,Utils2.PolyYCurve(r,h,20,0,0,-a,0,!0)):e>0&&i<0?(h.x=n,h.y=s-2*a,h.width=-a,h.height=2*a,Utils2.PolyYCurve(r,h,20,0,0,a,0,!0)):e<0&&i<0&&(h.x=n,h.y=s+2*a,h.width=-a,h.height=-2*a,Utils2.PolyYCurve(r,h,20,0,0,-a,0,!0));else if(e>0&&i>0)h.x=n-a,h.y=s,h.width=a,h.height=2*a,Utils2.PolyYCurve(r,h,20,0,0,0,a,!1);else if(e<0&&i>0)h.x=n,h.y=s,h.width=a,h.height=2*a,Utils2.PolyYCurve(r,h,20,0,0,0,a,!0);else if(e>0&&i<0)h.x=n-a,h.y=s,h.width=a,h.height=-2*a,Utils2.PolyYCurve(r,h,20,0,0,0,-a,!1);else if(e<0&&i<0)for(h.x=n,h.y=s-2*a,h.width=a,h.height=2*a,Utils2.PolyYCurve(l,h,20,0,0,a,0,!0),o=l.length-1;o>=0;o--)r.push(l[o]);return r}static PolyLJoin(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g,f,m,v,b=null,y=null,S=null,x=null,w=[],C=[],T=!1,D=!1,k=OptConstant.ActionTriggerType.LineEnd,$={x:0,y:0};const O=OptConstant.Common.KnobSize;let P,L,I=-1,A=LayerUtil.ActiveVisibleZList();if(b=ObjectUtil$1.GetObjectPtr(t,!0),null==b)return-1;if(y=ObjectUtil$1.GetObjectPtr(i,!0),null==y)return-1;if(g=b.DataID,y.DataID>=0&&(g=y.DataID),f=b.NoteID,y.NoteID>=0&&(f=y.NoteID),m=b.commentId,y.commentId>=0&&(m=y.commentId),v=b.HyperlinkText,y.HyperlinkText&&(v=y.HyperlinkText),n!==OptConstant.HookPts.WTL&&n!==OptConstant.HookPts.WTR||(n=OptConstant.HookPts.KTL),t===i&&b.LineType===OptConstant.LineType.POLYLINE){T=b.polylist.closed,b.polylist.closed=!0,a=b.polylist.segs.length,b.polylist.segs[a-1].pt.x=b.polylist.segs[0].pt.x,b.polylist.segs[a-1].pt.y=b.polylist.segs[0].pt.y,b.EndPoint.x=b.StartPoint.x,b.EndPoint.y=b.StartPoint.y,b.objecttype!==NvConstant.FNObjectTypes.FlWall&&this.OpenShapeEdit(t);let e=-1;return b instanceof Instance.Shape.PolyLineContainer&&!T&&!0!==s&&(b.MaintainDimensionThroughPolygonOpennessChange(b.polylist.closed),e=-2),b.CalcFrame(),ObjectUtil$1.AddToDirtyList(b.BlockID),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),HookUtil.MaintainLink(t,b,null,k,!1),e}if(b.LineType===OptConstant.LineType.POLYLINE)S=b,x=y,w.push(i),c=t;else if(y.LineType===OptConstant.LineType.POLYLINE){S=y,x=b;let s=e;e=n,n=s,w.push(t),c=i}if(null==S){w.push(i),w.push(t),I=Math.min(A.indexOf(i),A.indexOf(t));let e={Frame:{x:b.Frame.x,y:b.Frame.x,width:b.Frame.width,height:b.Frame.height},inside:{x:b.inside.x,y:b.inside.x,width:b.inside.width,height:b.inside.height},StartPoint:{x:b.StartPoint.x,y:b.StartPoint.y},EndPoint:{x:b.EndPoint.x,y:b.EndPoint.y},flags:NvConstant.ObjFlags.Erase|NvConstant.ObjFlags.EraseOnGrow,extraflags:OptConstant.ExtraFlags.SideKnobs,StartArrowID:y.StartArrowID,EndArrowID:y.EndArrowID,StartArrowDisp:y.StartArrowDisp,EndArrowDisp:y.EndArrowDisp,ArrowSizeIndex:y.ArrowSizeIndex,TextFlags:b.TextFlags,objecttype:b.objecttype,Dimensions:b.Dimensions,dataclass:PolygonConstant.ShapeTypes.POLYGON,polylist:new PolyList};0===y.StartArrowID&&b.StartArrowID>0&&(e.StartArrowID=b.StartArrowID,e.StartArrowDisp=b.StartArrowDisp,e.ArrowSizeIndex=b.ArrowSizeIndex),0===y.EndArrowID&&b.EndArrowID>0&&(e.EndArrowID=b.EndArrowID,e.EndArrowDisp=b.EndArrowDisp,e.ArrowSizeIndex=b.ArrowSizeIndex),e.StyleRecord=Utils1.DeepCopy(b.StyleRecord),e.objecttype===NvConstant.FNObjectTypes.FlWall&&(e.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent),e.StyleRecord.Fill.Hatch=0;let n=b.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),s=n.length;for(let t=0;t<s;t++){let i=0===t||b.LineType===OptConstant.LineType.SEGLINE?OptConstant.LineType.LINE:b.LineType;if(e.polylist.segs.push(new PolySeg(i,n[t].x-b.StartPoint.x,n[t].y-b.StartPoint.y)),i===OptConstant.LineType.ARCLINE)e.polylist.segs[e.polylist.segs.length-1].param=b.IsReversed?b.CurveAdjust:-b.CurveAdjust;else if(i===OptConstant.LineType.ARCSEGLINE){let i=this.PolyLinePrPolyLGetArcQuadrant(n[t-1],n[t],0);e.polylist.segs[e.polylist.segs.length-1].param=i.param,e.polylist.segs[e.polylist.segs.length-1].ShortRef=i.ShortRef}}S=T3Gv.wallOpt.AddNewPolyLine(b.objecttype,e)||new Instance.Shape.PolyLine(e),x=y,D=!0}P=e===OptConstant.HookPts.KTL?{x:S.StartPoint.x,y:S.StartPoint.y}:{x:S.EndPoint.x,y:S.EndPoint.y},L=n===OptConstant.HookPts.KTL?{x:x.StartPoint.x,y:x.StartPoint.y}:{x:x.EndPoint.x,y:x.EndPoint.y},o=P.x-L.x,r=P.y-L.y,x.StartPoint.x+=o,x.StartPoint.y+=r,x.EndPoint.x+=o,x.EndPoint.y+=r;let E=x.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);h=E.length;let G=S.polylist.segs.length;if(h+G>OptConstant.Common.MaxPolySegs)return-1;if(e===OptConstant.HookPts.KTL){if(k=OptConstant.ActionTriggerType.LineStart,n===OptConstant.HookPts.KTL){o=S.StartPoint.x-E[h-1].x,r=S.StartPoint.y-E[h-1].y;for(let t=0;t<G;t++)S.polylist.segs[t].pt.x+=o,S.polylist.segs[t].pt.y+=r;S.StartPoint.x=E[h-1].x,S.StartPoint.y=E[h-1].y;for(let t=1;t<h;t++){switch(x.LineType){case OptConstant.LineType.POLYLINE:$.x=S.polylist.segs[0].pt.x,$.y=S.polylist.segs[0].pt.y,S.polylist.segs[0]=Utils1.DeepCopy(x.polylist.segs[t]),S.polylist.segs[0].pt.x=$.x,S.polylist.segs[0].pt.y=$.y,S.polylist.segs[0].param=-S.polylist.segs[0].param;break;case OptConstant.LineType.ARCLINE:S.polylist.segs[0].LineType=x.LineType,S.polylist.segs[0].param=x.IsReversed?-x.CurveAdjust:x.CurveAdjust;break;case OptConstant.LineType.ARCSEGLINE:S.polylist.segs[0].LineType=x.LineType,S.polylist.segs[0].param=0,u=S.PrPolyLGetArcQuadrant(E[t],E[t-1],0),S.polylist.segs[0].param=u.param,S.polylist.segs[0].ShortRef=u.ShortRef;break;default:S.polylist.segs[0].LineType=OptConstant.LineType.LINE}S.polylist.segs.unshift(new PolySeg(OptConstant.LineType.LINE,E[t].x-S.StartPoint.x,E[t].y-S.StartPoint.y))}}else{o=S.StartPoint.x-E[0].x,r=S.StartPoint.y-E[0].y;for(let t=0;t<G;t++)S.polylist.segs[t].pt.x+=o,S.polylist.segs[t].pt.y+=r;switch(S.StartPoint.x=E[0].x,S.StartPoint.y=E[0].y,x.LineType){case OptConstant.LineType.POLYLINE:$.x=S.polylist.segs[0].pt.x,$.y=S.polylist.segs[0].pt.y,S.polylist.segs[0]=Utils1.DeepCopy(x.polylist.segs[h-1]),S.polylist.segs[0].pt.x=$.x,S.polylist.segs[0].pt.y=$.y;break;case OptConstant.LineType.ARCLINE:S.polylist.segs[0].LineType=x.LineType,S.polylist.segs[0].param=x.IsReversed?x.CurveAdjust:-x.CurveAdjust;break;case OptConstant.LineType.ARCSEGLINE:S.polylist.segs[0].LineType=x.LineType,S.polylist.segs[0].param=0,u=S.PrPolyLGetArcQuadrant(E[h-2],E[h-1],0),S.polylist.segs[0].param=u.param,S.polylist.segs[0].ShortRef=u.ShortRef;break;default:S.polylist.segs[0].LineType=OptConstant.LineType.LINE}for(let t=h-2;t>=0;t--)if(S.polylist.segs.unshift(new PolySeg(OptConstant.LineType.LINE,E[t].x-S.StartPoint.x,E[t].y-S.StartPoint.y)),t>0)switch(x.LineType){case OptConstant.LineType.POLYLINE:$.x=S.polylist.segs[0].pt.x,$.y=S.polylist.segs[0].pt.y,S.polylist.segs[0]=Utils1.DeepCopy(x.polylist.segs[t]),S.polylist.segs[0].pt.x=$.x,S.polylist.segs[0].pt.y=$.y;break;case OptConstant.LineType.ARCSEGLINE:S.polylist.segs[0].LineType=x.LineType,E[t].x,S.StartPoint.x,E[t].y,S.StartPoint.y,S.polylist.segs[0].param=0,u=S.PrPolyLGetArcQuadrant(E[t-1],E[t],0),S.polylist.segs[0].param=u.param,S.polylist.segs[0].ShortRef=u.ShortRef}}p=Utils2.InflatePoint(S.polylist.segs[0].pt,O),!S.polylist.closed&&Utils2.pointInRect(p,S.polylist.segs[S.polylist.segs.length-1].pt)&&(S.polylist.closed=!0,S.polylist.segs[S.polylist.segs.length-1].pt.x=S.polylist.segs[0].pt.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=S.polylist.segs[0].pt.y,S.EndPoint.x=S.StartPoint.x,S.EndPoint.y=S.StartPoint.y,S instanceof Instance.Shape.PolyLine&&!0!==s&&S.MaintainDimensionThroughPolygonOpennessChange(S.polylist.closed),S.objecttype!==NvConstant.FNObjectTypes.FlWall&&this.OpenShapeEdit(S.BlockID),ObjectUtil$1.AddToDirtyList(S.BlockID))}else{if(n===OptConstant.HookPts.KTL){for(let t=1;t<h;t++){switch(x.LineType){case OptConstant.LineType.POLYLINE:l=x.polylist.segs[t].LineType;break;case OptConstant.LineType.ARCLINE:case OptConstant.LineType.ARCSEGLINE:l=x.LineType;break;default:l=OptConstant.LineType.LINE}switch(S.polylist.segs.push(new PolySeg(l,E[t].x-S.StartPoint.x,E[t].y-S.StartPoint.y)),x.LineType){case OptConstant.LineType.ARCLINE:S.polylist.segs[S.polylist.segs.length-1].param=x.IsReversed?x.CurveAdjust:-x.CurveAdjust;break;case OptConstant.LineType.POLYLINE:S.polylist.segs[S.polylist.segs.length-1]=Utils1.DeepCopy(x.polylist.segs[t]),S.polylist.segs[S.polylist.segs.length-1].pt.x=E[t].x-S.StartPoint.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=E[t].y-S.StartPoint.y;break;case OptConstant.LineType.ARCSEGLINE:E[t].x,S.StartPoint.x,E[t].y,S.StartPoint.y,d=S.polylist.segs.length,S.polylist.segs[d-1].param=0,u=S.PrPolyLGetArcQuadrant(E[t-1],E[t],0),S.polylist.segs[d-1].param=u.param,S.polylist.segs[d-1].ShortRef=u.ShortRef}}S.EndPoint.x=E[h-1].x,S.EndPoint.y=E[h-1].y}else{for(let t=h-2;t>=0;t--){switch(x.LineType){case OptConstant.LineType.POLYLINE:l=x.polylist.segs[t+1].LineType;break;case OptConstant.LineType.ARCLINE:case OptConstant.LineType.ARCSEGLINE:l=x.LineType;break;default:l=OptConstant.LineType.LINE}switch(S.polylist.segs.push(new PolySeg(l,E[t].x-S.StartPoint.x,E[t].y-S.StartPoint.y)),x.LineType){case OptConstant.LineType.ARCLINE:S.polylist.segs[S.polylist.segs.length-1].param=x.IsReversed?-x.CurveAdjust:x.CurveAdjust;break;case OptConstant.LineType.POLYLINE:S.polylist.segs[S.polylist.segs.length-1]=Utils1.DeepCopy(x.polylist.segs[t+1]),S.polylist.segs[S.polylist.segs.length-1].pt.x=E[t].x-S.StartPoint.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=E[t].y-S.StartPoint.y,S.polylist.segs[S.polylist.segs.length-1].param=-S.polylist.segs[S.polylist.segs.length-1].param;break;case OptConstant.LineType.ARCSEGLINE:d=S.polylist.segs.length,S.polylist.segs[d-1].param=0,u=S.PrPolyLGetArcQuadrant(E[t+1],E[t],0),S.polylist.segs[d-1].param=u.param,S.polylist.segs[d-1].ShortRef=u.ShortRef}}S.EndPoint.x=E[0].x,S.EndPoint.y=E[0].y}p=Utils2.InflatePoint(S.polylist.segs[S.polylist.segs.length-1].pt,O),Utils2.pointInRect(p,S.polylist.segs[0].pt)&&(S.polylist.closed=!0,S.polylist.segs[S.polylist.segs.length-1].pt.x=S.polylist.segs[0].pt.x,S.polylist.segs[S.polylist.segs.length-1].pt.y=S.polylist.segs[0].pt.y,S.EndPoint.x=S.StartPoint.x,S.EndPoint.y=S.StartPoint.y,S.objecttype!==NvConstant.FNObjectTypes.FlWall&&this.OpenShapeEdit(S.BlockID),S instanceof Instance.Shape.PolyLine&&!0!==s&&S.MaintainDimensionThroughPolygonOpennessChange(S.polylist.closed),ObjectUtil$1.AddToDirtyList(S.BlockID))}if(S.CalcFrame(),D)c=DrawUtil.AddNewObject(S,!1,!0),D=!0,ObjectUtil$1.AddToDirtyList(c);else{let t=LayerUtil.VisibleZList().indexOf(c);t>=0&&SvgUtil.AddSVGObject(t,c,!0,!0)}S=ObjectUtil$1.GetObjectPtr(c,!1),S&&(S.DataID<0&&(S.DataID=g,b.DataID===g?(S.TextDirection=b.TextDirection,b.DataID=-1):y.DataID===g&&(S.TextDirection=y.TextDirection,y.DataID=-1),S.TextFlags=Utils2.SetFlag(S.TextFlags,NvConstant.TextFlags.HorizText,!S.TextDirection)),S&&S.NoteID<0&&(S.NoteID=f,b.NoteID===f?b.NoteID=-1:y.NoteID===f&&(y.NoteID=-1),S.TextFlags=Utils2.SetFlag(S.TextFlags,NvConstant.TextFlags.HorizText,!S.TextDirection)),S&&S.commentId<0&&(S.commentId=m,b.commentId===m?b.commentId=-1:y.commentId===m&&(y.commentId=-1),S.TextFlags=Utils2.SetFlag(S.TextFlags,NvConstant.TextFlags.HorizText,!S.TextDirection)),S&&!S.HyperlinkText&&(S.HyperlinkText=v));for(let U=0;U<w.length;U++)HookUtil.MoveLinks(c,w[U],null,null);if(ObjectUtil$1.DeleteObjects(w,!1),OptCMUtil.SetLinkFlag(c,DSConstant.LinkFlags.Move),HookUtil.MaintainLink(c,S,null,k,!1),T3Gv.opt.UpdateLinks(),C.push(c),SelectUtil.SelectObjects(C,!1,!0),D&&I>=0){let t=A.indexOf(c);A.splice(t,1),A.splice(I,0,c),D=!0,ObjectUtil$1.AddToDirtyList(c)}return S instanceof Instance.Shape.PolyLineContainer&&S.MoveBehindAllLinked()&&(D=!0),D&&(LayerUtil.IsTopMostVisibleLayer()?SvgUtil.RenderDirtySVGObjects():SvgUtil.RenderAllSVGObjects()),c}static PolyLinePrPolyLGetArcQuadrant(t,e,i){LogUtil.Debug("O.Opt PolyLinePrPolyLGetArcQuadrant - Input:",{startPoint:t,endPoint:e,arcAngle:i});const n={param:0,ShortRef:0};let s=[],a={x:0,y:0};if(s.push(new Point$1(t.x,t.y)),s.push(new Point$1(e.x,e.y)),a.x=t.x,a.y=t.y,Math.abs(i)>=.01){const t=Math.sin(i),e=Math.cos(i),n=Math.asin(t),o=e<0?-n:n;Utils3.RotatePointsAboutPoint(a,o,s)}const o=s[0],r=s[1];return r.x>o.x?r.y>o.y?(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_BL,e.notclockwise&&(n.param=0)):(n.ShortRef=OptConstant.ArcQuad.PLA_TL,e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_TR,n.param=NvConstant.Geometry.PI/2)):r.y>o.y?(n.ShortRef=OptConstant.ArcQuad.PLA_BR,e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_BL,n.param=NvConstant.Geometry.PI/2)):(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_TR,e.notclockwise&&(n.param=0)),LogUtil.Debug("O.Opt PolyLinePrPolyLGetArcQuadrant - Output:",n),n}static PolyYCurve(t,e,i,n,s,a,o,r){LogUtil.Debug("O.Opt PolyYCurve - Input:",{pointCount:t.length,rect:e,segmentCount:i,minOffset:n,maxOffset:s,startOffset:a,endOffset:o,isRightSide:r});const l=e.height/2;let h=e.width;i<2&&(i=2);const c=(2*l-a-o)/(i-1);let u=!1,d=!1;for(let p=0;p<i;p++){let i=c*p+a;if(n&&i<n){if(u)continue;i=n,u=!0}let o=l-i;if(s&&o-s<-l){if(d)break;o=-(l-s),d=!0}const g=new Point$1(0,0);g.y=e.y+(l-o);let f=0;l?f=o/l:h=0;const m=Utils2.Sqrt(1-f*f)*h;g.x=r?e.x+e.width-m:e.x+m,t.push(g)}return LogUtil.Debug("O.Opt PolyYCurve - Output: Generated points:",t.length),t}static PolyPtInPolygon(t,e){LogUtil.Debug("O.Opt PolyPtInPolygon - Input:",{polygonPointsCount:t.length,testPoint:e});const i=[{},{},{}];let n=0;i[0]=t[0];const s=t.length;for(let o=1;o<s-1;o++){let s=!0;i[1]=t[o],i[2]=t[o+1];for(let t=0;t<3;t++){const n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[t],e),a=t-1>=0?t-1:2,o=t+1<3?t+1:0,r=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[t],i[a]),l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[t],i[o]),h=r>l?r:l,c=NvConstant.Geometry.PI-h,u=T3Gv.opt.NormalizeAngle(r,c),d=T3Gv.opt.NormalizeAngle(l,c);let p=u,g=d;u>d&&(p=d,g=u);const f=T3Gv.opt.NormalizeAngle(n,c);if(f<p||f>g){s=!1;break}}s&&n++}const a=n%2!=0;return LogUtil.Debug("O.Opt PolyPtInPolygon - Output:",a),a}static PolyLIntersect(t,e,i,n){let s,a,o,r,l,h,c,u,d,p,g,f,m=null,v=-1,b=-1,y={x:0,y:0},S={x:0,y:0},x=0,w=Math.abs(e.x-t.x);if(Math.abs(e.y-t.y)<1&&w>=1){for(s=1;s<n;s++)if(i[s].y>i[s-1].y?(r=i[s-1].y,l=i[s].y):(r=i[s].y,l=i[s-1].y),e.y>=r&&e.y<l){v=s,S.y=e.y;break}if(v>=0)return x=v,i[v].x-i[v-1].x==0?(S.x=i[v].x,{bSuccess:!0,ipt:S,lpseg:x}):i[v].y-i[v-1].y==0?(i[v].x>i[v-1].x?(a=i[v-1].x,o=i[v].x):(a=i[v].x,o=i[v-1].x),S.x<a&&(S.x=a),S.x>o&&(S.x=o),{bSuccess:!0,ipt:S,lpseg:x}):(h=i[v].x-i[v-1].x,d=(i[v].y-i[v-1].y)/h,u=i[v].y-d*i[v].x,S.x=(S.y-u)/d,{bSuccess:!0,ipt:S,lpseg:x})}else if(w<1){for(s=1;s<n;s++)if(i[s].x>i[s-1].x?(a=i[s-1].x,o=i[s].x):(a=i[s].x,o=i[s-1].x),e.x>=a&&e.x<o){b=s,S.x=e.x;break}if(b>=0)return x=b,i[b].y-i[b-1].y==0?(S.y=i[b].y,{bSuccess:!0,ipt:S,lpseg:x}):i[b].x-i[b-1].x==0?(i[b].y>i[b-1].y?(r=i[b-1].y,l=i[b].y):(r=i[b].y,l=i[b-1].y),S.y<r&&(S.y=r),S.y>l&&(S.y=l),{bSuccess:!0,ipt:S,lpseg:x}):(h=i[b].x-i[b-1].x,d=(i[b].y-i[b-1].y)/h,u=i[b].y-d*i[b].x,S.y=d*S.x+u,{bSuccess:!0,ipt:S,lpseg:x})}else for(h=e.x-t.x,c=(e.y-t.y)/h,u=e.y-c*e.x,s=1;s<n;s++){if(i[s].x-i[s-1].x==0)y.x=i[s].x,y.y=c*y.x+u;else if(i[s].y-i[s-1].y==0)y.y=i[s].y,y.x=(y.y-u)/c;else{if(h=i[s].x-i[s-1].x,d=(i[s].y-i[s-1].y)/h,u=i[s].y-d*i[s].x,p=c-d,g=u-u,Math.abs(p)<.001)continue;f=g/p,y.x=f,y.y=c*f+u}if(m=Utils2.Pt2Rect(i[s],i[s-1]),m.y+m.height==m.y&&m.height++,m.x+m.width==m.x&&m.width++,Utils2.pointInRect(m,y))return{bSuccess:!0,ipt:y,lpseg:s}}return{bSuccess:!1,ipt:S,lpseg:x}}static EllipseToPoints(t,e,i,n,s,a,o){const r=Math.abs(n-i),l=Math.abs(a-s),h=l*l;let c,u;e<2&&(e=100);let d=1;a>s?n>i?o?(c=i,u=a):(c=n,u=s,d=-1):o?(c=n,u=s):(c=i,u=a,d=-1):n>i?o?(c=n,u=s,d=-1):(c=i,u=a):o?(c=i,u=a,d=-1):(c=n,u=s);const p=(a-s)/(e-1);for(let g=0;g<e;g++){const e=s+p*g,i=e-u,n=Utils2.Sqrt(1-i*i/h)*r,a=new Point$1(c+n*d,e);t.push(a)}return t}static GetClockwiseAngleBetween2PointsInRadians(t,e){const i=NvConstant.Geometry.PI,n=e.x-t.x,s=e.y-t.y;let a;return a=0===n?s>=0?i/2:-i/2:0===s?n>=0?0:i:Math.atan2(s,n),a<0&&(a+=2*i),a}}class TextUtil{static DeactivateTextEdit(t,e){let i;LogUtil.Debug("O.Opt DeactivateTextEdit - Input:",{preventCompleteOperation:t,shouldCloseTable:e});let n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),s=!1;if(null!=T3Gv.opt.textEntryTimer&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)),-1!=n.theActiveTextEditObjectID){let e;n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!0);let a=!1,o=!1,r=T3Gv.opt.svgDoc.GetActiveEdit(),l=null,h=n.theActiveTableObjectID<0,c=ObjectUtil$1.GetObjectPtr(n.theActiveTextEditObjectID,!0);if(c&&(c.TableID<0&&(h=!0),c.DataID,n.theTEWasResized&&(OptCMUtil.SetLinkFlag(n.theActiveTextEditObjectID,DSConstant.LinkFlags.Move),c.hooks.length&&OptCMUtil.SetLinkFlag(c.hooks[0].objid,DSConstant.LinkFlags.Move),n.theTEWasResized=!1,n.theTEWasEdited=!0,n.theActiveTableObjectID<0&&ObjectUtil$1.AddToDirtyList(n.theActiveTextEditObjectID)),c instanceof Instance.Shape.D3Symbol&&(h=!1)),r&&(l=r.GetRuntimeText())){e=r.GetSelectedRange(),a=r.HasDataFields()?0===r.GetTextMinDimensions().width:0===r.GetTextMinDimensions().width||" "===r.GetText();const t=r.formatter.GetFormatAtOffset(0);h&&this.TextStyleToText(c.StyleRecord.Text,t.style),o=!!(c.flags&NvConstant.ObjFlags.TextOnly);{let t=ObjectUtil$1.GetObjectPtr(i,!1);t&&(t.runtimeText=l,t.selrange=e,t=ObjectUtil$1.GetObjectPtr(i,!0),n.theActiveTableObjectID<0&&ObjectUtil$1.AddToDirtyList(n.theActiveTextEditObjectID))}}if(this.TEUnregisterEvents(),a)if(o){ObjectUtil$1.DeleteObjects([n.theActiveTextEditObjectID],!1),c=null;const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0),e=t.indexOf(n.theActiveTextEditObjectID);e>=0&&(t.splice(e,1),SelectUtil.GetTargetSelect()===n.theActiveTextEditObjectID&&SelectUtil.SetTargetSelect(-1,!0)),n.theTEWasEdited=!0}else{const t=T3Gv.stdObj.GetObject(i);c=ObjectUtil$1.GetObjectPtr(n.theActiveTextEditObjectID,!0),c&&c.SetTextObject(-1),t&&t.Delete(),n.theActiveTableObjectID<0&&ObjectUtil$1.AddToDirtyList(n.theActiveTextEditObjectID),n.theTEWasEdited=!0}n.theTEWasEdited&&(s=!0),n.theActiveTextEditObjectID=-1,n.theTEWasEdited=!1,n.theTEWasResized=!1,n.theTELastOp=NvConstant.TextElemLastOpt.Init,this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Init),s&&!t?DrawUtil.CompleteOperation():(ObjectUtil$1.PreserveUndoState(!1),SvgUtil.RenderDirtySVGObjects())}LogUtil.Debug("O.Opt DeactivateTextEdit - Output: Text edit deactivated")}static RegisterLastTEOp(t){if(LogUtil.Debug("O.Opt RegisterLastTEOp - Input:",{lastOp:t}),!T3Gv.opt.bInNoteEdit){const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),i=e.theTELastOp;null!=T3Gv.opt.textEntryTimer&&t!==NvConstant.TextElemLastOpt.Char&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)),e.theTELastOp=t,t!==NvConstant.TextElemLastOpt.Init&&(e.theTEWasEdited=!0);if((e=>{if(t!==NvConstant.TextElemLastOpt.Init)switch(t){case NvConstant.TextElemLastOpt.Char:if(e!==t)return!0;break;case NvConstant.TextElemLastOpt.Select:return!1;default:return!0}return!1})(i)){const i=T3Gv.opt.svgDoc.GetActiveEdit();let n=null,s=null;const a=ObjectUtil$1.GetObjectPtr(e.theActiveTextEditObjectID,!1);if(a&&a.DataID>=0&&i){const o=a.DataID;if(n=i.GetRuntimeText(),s=i.GetSelectedRange(),n){ObjectUtil$1.PreserveUndoState(!1);let a=ObjectUtil$1.GetObjectPtr(o,!1);if(a&&(a.runtimeText=n,a.selrange=s,t!==NvConstant.TextElemLastOpt.Timeout&&(TextParams.minWidth=i.formatter.limits.minWidth,TextParams.maxWidth=i.formatter.limits.maxWidth,TextParams.minHeight=i.minHeight,ObjectUtil$1.GetObjectPtr(e.theActiveTextEditObjectID,!0),a=ObjectUtil$1.GetObjectPtr(o,!0)),t===NvConstant.TextElemLastOpt.Timeout)){const t={};t.BlockID=e.theActiveTextEditObjectID;const i=ObjectUtil$1.GetObjectPtr(t.BlockID,!1);i&&i instanceof Instance.Shape.Connector&&(t.DataID=i.DataID),t.runtimeText=Utils1.DeepCopy(n),t.selrange=Utils1.DeepCopy(s),t.minWidth=TextParams.minWidth,t.maxWidth=TextParams.maxWidth,t.minHeight=TextParams.minHeight,TextParams.minWidth=null}}}}t===NvConstant.TextElemLastOpt.Char&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,T3Gv.opt.textEntryTimer=setTimeout(T3Gv.opt.TextEdit_PauseTyping,1e3))}LogUtil.Debug("O.Opt RegisterLastTEOp - Output: Completed")}static TextStyleToText(t,e){LogUtil.Debug("O.Opt TextStyleToText - Input:",{sdText:t,textStyle:e}),t.FontSize=Math.round(72*e.size/100),t.FontId=-1,t.FontName=e.font,t.Face=0,"bold"===e.weight&&(t.Face+=TextConstant.TextFace.Bold),"italic"===e.style&&(t.Face+=TextConstant.TextFace.Italic),"sub"===e.baseOffset?t.Face+=TextConstant.TextFace.Subscript:"super"===e.baseOffset&&(t.Face+=TextConstant.TextFace.Superscript),"underline"===e.decoration?t.Face+=TextConstant.TextFace.Underline:"line-through"===e.decoration&&(t.Face+=TextConstant.TextFace.Strike),t.Paint.Color=e.color,t.Paint.Opacity=e.colorTrans,LogUtil.Debug("O.Opt TextStyleToText - Output:",t)}static TEUnregisterEvents(t){LogUtil.Debug("O.Opt TEUnregisterEvents - Input:",t),T3Gv.opt.svgDoc.ClearActiveEdit(t),null!=T3Gv.opt.textEntryTimer&&(clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null),T3Gv.opt.textHammer&&(T3Gv.opt.textHammer.off("dragstart"),T3Gv.opt.textHammer.dispose(),T3Gv.opt.textHammer=null),T3Gv.opt.clickAreaHammer&&(T3Gv.opt.clickAreaHammer.off("dragstart"),T3Gv.opt.clickAreaHammer.dispose(),T3Gv.opt.clickAreaHammer=null),T3Gv.opt.decAreaHammer&&(T3Gv.opt.decAreaHammer.off("dragstart"),T3Gv.opt.decAreaHammer.dispose(),T3Gv.opt.decAreaHammer=null),T3Gv.opt.TEWorkAreaHammer&&(T3Gv.opt.TEWorkAreaHammer.off("drag"),T3Gv.opt.TEWorkAreaHammer.off("dragend"),T3Gv.opt.TEWorkAreaHammer.dispose(),T3Gv.opt.TEWorkAreaHammer=null),LogUtil.Debug("O.Opt TEUnregisterEvents - Output: done")}static CalcDefaultInitialTextStyle(t){LogUtil.Debug("O.Opt CalcDefaultInitialTextStyle - Input:",t);const e=new DefaultStyle,i=TextConstant.TextFace;return e.font=t.FontName,e.size=ShapeUtil.PointSizeToFontSize(t.FontSize),e.type=t.FontType,e.color=t.Paint.Color,e.colorTrans=t.Paint.Opacity,e.weight=t.Face&i.Bold?"bold":"normal",e.style=t.Face&i.Italic?"italic":"normal",e.decoration=t.Face&i.Underline?"underline":"none",LogUtil.Debug("O.Opt CalcDefaultInitialTextStyle - Output:",e),e}static TextResizeCommon(t,e,i,n,s){var a;LogUtil.Debug("O.Opt: TextResizeCommon inputs:",{shapeId:t,constrainWidth:e,allowResize:i,svgElementType:(null==(a=null==n?void 0:n.constructor)?void 0:a.name)||"unknown",skipLinkFlagUpdate:s});const o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),r=ObjectUtil$1.GetObjectPtr(t,!1);if(r instanceof Instance.Shape.BaseShape){let e=n||T3Gv.opt.svgObjectLayer.GetElementById(t);if(e){const n=e.textElem;if(null!=n){let a=r.GetTextParams(!0),l=a.trect,h=r.sizedim.width,c=r.sizedim.height,u=a.tsizedim.width,d=a.tsizedim.height,p=n.GetTextMinDimensions(),g=p.width;g<u&&(g=u);let f=p.height;f<d&&(f=d);let m=new Rectangle(l.x,l.y,g,f);if(r.TextFlags&NvConstant.TextFlags.AttachA||r.TextFlags&NvConstant.TextFlags.AttachB){if(r.TextFlags&NvConstant.TextFlags.AttachA){switch(r.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,-p.height-r.TMargins.top);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(r.Frame.width-p.width,-p.height-r.TMargins.top);break;default:n.SetPos(r.Frame.width/2-p.width/2,-p.height-r.TMargins.top)}T3Gv.opt.SetShapeR(r)}else if(r.TextFlags&NvConstant.TextFlags.AttachB){switch(r.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,r.Frame.height);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(r.Frame.width-p.width,r.Frame.height);break;default:n.SetPos(r.Frame.width/2-p.width/2,r.Frame.height)}T3Gv.opt.SetShapeR(r)}}else{let u,p=Utils1.DeepCopy(r.Frame),v=null;r.GetGraph(!1);const b=!0===r.bInGroup;switch(b&&(i=!0),r.TextGrow){case NvConstant.TextGrowBehavior.Horizontal:if(!Utils2.IsEqual(g,l.width)||!Utils2.IsEqual(f,l.height)){v=Utils1.DeepCopy(r.Frame),r.TRectToFrame(m,!1);let g=r.Frame.width-v.width;Utils2.IsEqual(g,0)&&(g=0);let f=r.Frame.height-v.height;if(Utils2.IsEqual(f,0)&&(f=0),g)switch(r.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:v.width+=g;break;case TextConstant.TextAlign.TopCenter:case TextConstant.TextAlign.Center:case TextConstant.TextAlign.BottomCenter:u=v.x+v.width/2,v.width+=g,u-=v.width/2,b&&0===r.RotationAngle||(v.x=u);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:v.width+=g,b&&0===r.RotationAngle||(v.x-=g)}if(f&&(v.height+=f),i||this.TextPinFrame(v,d)){if(v.width<h&&(v.x=r.Frame.x+r.Frame.width/2-h/2,v.width=h),v.height<c&&(v.y=r.Frame.y+r.Frame.height/2-c/2,v.height=c),(g||f)&&(r.UpdateFrame(v),o.theTEWasResized=!0),n){a=r.GetTextParams(!1),l=a.trect;let t=r.GetSVGFrame(v);n.SetPos(l.x-t.x,l.y-t.y),n.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,l.width,l.height)}if(r.ResizeInTextEdit(e,v),this.TextResizeNeedPageResize(r,v.x+v.width,v.y+v.height),b&&0!==r.RotationAngle){let t={x:p.x+p.width/2,y:p.y+p.height/2},e=ToolActUtil.RotateRect(p,t,r.RotationAngle);t={x:v.x+v.width/2,y:v.y+v.height/2};let i=ToolActUtil.RotateRect(v,t,r.RotationAngle);g=e.x-i.x,f=e.y-i.y,r.OffsetShape(g,f)}s||HookUtil.ResizeSetLinkFlag(t,DSConstant.LinkFlags.Move)}}case NvConstant.TextGrowBehavior.Vertical:case NvConstant.TextGrowBehavior.ProPortional:}}}}}else r.AdjustTextEditBackground(t,n);LogUtil.Debug("O.Opt: TextResizeCommon completed for shape:",t)}static ResetActiveTextEditAfterUndo(t){LogUtil.Debug("O.Opt: ResetActiveTextEditAfterUndo called with text override:",t?"provided":"none");const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==e.theActiveTextEditObjectID){const i=ObjectUtil$1.GetObjectPtr(e.theActiveTextEditObjectID,!1);if(!i)return void LogUtil.Debug("O.Opt: ActiveTextObject not found, aborting");const n=i.DataID;if(-1!==n){const s=ObjectUtil$1.GetObjectPtr(n,!1);if(s){let n=s.runtimeText;const a=s.selrange;t&&(n=t),t||(ObjectUtil$1.AddToDirtyList(e.theActiveTextEditObjectID),SvgUtil.RenderDirtySVGObjects());const o=T3Gv.opt.svgObjectLayer.GetElementById(e.theActiveTextEditObjectID);if(o&&o.textElem){this.TextRegisterEvents(o.textElem);const t=T3Gv.opt.svgDoc.GetActiveEdit();t&&(t.SetRuntimeText(n),t.SetSelectedRange(a.start,a.end,a.line,a.anchor)),""===n.text&&(LogUtil.Debug("O.Opt: Initializing empty text formatting"),this.InitEmptyText(i,o))}}}e.TELastOp=NvConstant.TextElemLastOpt.Init,SvgUtil.ShowSVGSelectionState(e.theActiveTextEditObjectID,!1)}LogUtil.Debug("O.Opt: ResetActiveTextEditAfterUndo complete")}static GuessTextIndents(t,e){let i,n,s,a,o,r,l,h,c,u,d,p,g,f,m;LogUtil.Debug("O.Opt GuessTextIndents - Input:",{polygonPoints:t,shapeFrame:e});let v,b=!1,y=!1,S=10,x=[{x:0,y:0},{x:0,y:0}],w=[{x:0,y:0},{x:0,y:0}],C={},T={},D={};i=e.width,i<1&&(i=1),n=e.height,n<1&&(n=1),s=i,a=n;let k=Utils2.SetRect(0,0,e.width,e.height);o=a/20;for(let $=0;$<S;$++){r=.8*$*s/S;let e=PolyUtil.PolyGetIntersect(t,r,x,null,!0);if(2===e)for(let i=0;i<S-$;i++)l=(1-i/S*.8)*s,e=PolyUtil.PolyGetIntersect(t,l,w,null,!0),2===e&&(h=w[0]>x[0]?w[0]:x[0],c=w[1]<x[1]?w[1]:x[1],h<c&&(p=h,e=PolyUtil.PolyGetIntersect(t,p+1,w,null,!1),e>2&&(p=h+=o,e=PolyUtil.PolyGetIntersect(t,p+1,w,null,!1)),p=c,2===e&&(e=PolyUtil.PolyGetIntersect(t,p-1,w,null,!1),e>2&&(p=c-=o,e=PolyUtil.PolyGetIntersect(t,p-1,w,null,!1))),2===e&&c>h&&(p=h+(c-h)/2,u=r,d=l,e=PolyUtil.PolyGetIntersect(t,p-1,w,null,!1),2===e&&(w[0]>r&&(u=w[0]),w[1]<l&&(d=w[1])),g=(d-u)*(c-h),(!1===b||f<g)&&(b=!0,f=g,C=Utils2.SetRect(u,h,d,c)))))}b&&(m=f,Utils2.CopyRect(T,C),y=!0),o=s/20;for(let $=0;$<S;$++)if(r=.8*$*a/S,v=PolyUtil.PolyGetIntersect(t,r,x,null,!1),2===v)for(let e=0;e<S-$;e++)l=(1-e/S*.8)*a,v=PolyUtil.PolyGetIntersect(t,l,w,null,!1),2===v&&(h=w[0]>x[0]?w[0]:x[0],c=w[1]<x[1]?w[1]:x[1],h<c&&(p=h,v=PolyUtil.PolyGetIntersect(t,p+1,w,null,!0),v>2&&(p=h+=o,v=PolyUtil.PolyGetIntersect(t,p+1,w,null,!0)),p=c,2===v&&(v=PolyUtil.PolyGetIntersect(t,p-1,w,null,!0),v>2&&(p=c-=o,v=PolyUtil.PolyGetIntersect(t,p-1,w,null,!0))),2===v&&c>h&&(p=h+(c-h)/2,u=r,d=l,v=PolyUtil.PolyGetIntersect(t,p-1,w,null,!0),2===v&&(w[0]>r&&(u=w[0]),w[1]<l&&(d=w[1])),g=(d-u)*(c-h),(!1===b||f<g)&&(b=!0,y=!0,f=g,C=Utils2.SetRect(h,u,c,d)))));for(y&&b&&m>f&&Utils2.CopyRect(C,T),b?(D.left_sindent=(C.x+0)/i,D.right_sindent=(k.x+k.width-(C.x+C.width)-0)/i,D.top_sindent=(C.y+0)/n,D.bottom_sindent=(k.y+k.height-(C.y+C.height)-0)/n):(D.left_sindent=.2,D.right_sindent=.2,D.top_sindent=.2,D.bottom_sindent=.2);D.left_sindent+D.right_sindent>.8;)D.left_sindent>.4&&(D.left_sindent-=.1),D.right_sindent>.4&&(D.right_sindent-=.1);for(;D.top_sindent+D.bottom_sindent>.8;)D.top_sindent>.4&&(D.top_sindent-=.1),D.bottom_sindent>.4&&(D.bottom_sindent-=.1);return LogUtil.Debug("O.Opt GuessTextIndents - Output:",D),D}static FontSizeToPoints(t){if(LogUtil.Debug("O.Opt FontSizeToPoints - Input:",t),!t)return LogUtil.Debug("O.Opt FontSizeToPoints - Output:",-1),-1;const{rulerConfig:e,svgDoc:i}=T3Gv.docUtil,n=i.docInfo.docDpi,s=e.showpixels?72*t/n:Math.round(72*t/n);return LogUtil.Debug("O.Opt FontSizeToPoints - Output:",s),s}static TextRegisterEvents(t,e,i){LogUtil.Debug("O.Opt TextRegisterEvents - Input:",{textEditorWrapper:t,activationEvent:e,additionalOptions:i}),null!=t&&(T3Gv.opt.SetVirtualKeyboardLifter(t),t.Activate(e,i),T3Gv.opt.textHammer=new Hammer(t.editor.parent.textElem.node),T3Gv.opt.clickAreaHammer=new Hammer(t.editor.parent.clickAreaElem.node),T3Gv.opt.decAreaHammer=new Hammer(t.editor.parent.decorationAreaElem.node),T3Gv.opt.TEWorkAreaHammer=new Hammer(document.getElementById("svg-area")),T3Gv.opt.textHammer.on("dragstart",this.TEDragStartFactory(t.editor)),T3Gv.opt.clickAreaHammer.on("dragstart",this.TEClickAreaDragStartFactory(t.editor)),T3Gv.opt.decAreaHammer.on("dragstart",this.TEClickAreaDragStartFactory(t.editor)),T3Gv.opt.TEWorkAreaHammer.on("drag",this.TEDragFactory(t.editor)),T3Gv.opt.TEWorkAreaHammer.on("dragend",this.TEDragEndFactory(t.editor))),LogUtil.Debug("O.Opt TextRegisterEvents - Output: Registered events")}static TargetPasteText(){if(LogUtil.Debug("O.Opt TargetPasteText - Input: no parameters"),!T3Gv.opt.textClipboard)return LogUtil.Debug("O.Opt TargetPasteText - Output: false (text clipboard does not exist)"),!1;if(null==T3Gv.opt.textClipboard.text)return LogUtil.Debug("O.Opt TargetPasteText - Output: false (text clipboard text is null)"),!1;const t=SelectUtil.GetTargetSelect();if(-1!==t){const e=ObjectUtil$1.GetObjectPtr(t,!1);if(e&&e.AllowTextEdit()){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);this.ActivateTextEdit(e);const i=T3Gv.opt.svgDoc.GetActiveEdit(),n=i.GetText().length;return i.SetSelectedRange(0,n),this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Paste),i.Paste(T3Gv.opt.textClipboard,!0),this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout),LogUtil.Debug("O.Opt TargetPasteText - Output: true (text pasted successfully)"),!0}}return LogUtil.Debug("O.Opt TargetPasteText - Output: false (invalid target or text editing not allowed)"),!1}static GetActiveTextEdit(){LogUtil.Debug("O.Opt GetActiveTextEdit - Input: No parameters");let t=null;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);return-1!=e.theActiveTextEditObjectID&&(t=e.theActiveTextEditObjectID),LogUtil.Debug("O.Opt GetActiveTextEdit - Output:",t),t}static ActivateTextEdit(t,e,i,n){let s,a,o,r,l;LogUtil.Debug("O.Opt ActivateTextEdit - Input:",{drawingElementId:null==t?void 0:t.ID,hasEvent:!!e,preventSelectionChange:i,hasTextData:!!n});const h=t.ID;let c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);const u=[];let d={};if(!(r=ObjectUtil$1.GetObjectPtr(h,!1))||!(r instanceof Instance.Shape.BaseDrawObject)||r.flags&NvConstant.ObjFlags.Lock)return void LogUtil.Debug("O.Opt ActivateTextEdit - Output: Object invalid or locked");if(d.BlockID=h,null==n){if(h==c.theActiveTextEditObjectID)return;-1!=c.theActiveTextEditObjectID&&T3Gv.opt.CloseEdit();const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);-1===t.indexOf(h)||t.length>1?(u.push(h),SelectUtil.SelectObjects(u,!1,!0),s=t[0]):s=h}else d=n.Data;let p=ObjectUtil$1.GetObjectPtr(h,!0);const g=p.GetTextObject(e,!1,d);if(null!=g){if(null==n)c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!0);else{ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).EditorID=n.EditorID,c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!0)}const t=T3Gv.opt.svgObjectLayer.GetElementById(h);if(-1==g){if(p=ObjectUtil$1.GetObjectPtr(h,!0),o=new TextObject({}),a=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TextObject,o),null===a)return void LogUtil.Debug("O.Opt ActivateTextEdit - Output: Failed to create text block");if(!p.SetTextObject(a.ID))return;p.LMAddSVGTextObject(T3Gv.opt.svgDoc,t),o=a.Data}else o=ObjectUtil$1.GetObjectPtr(g,!0),null==t.textElem&&p.LMAddSVGTextObject(T3Gv.opt.svgDoc,t);if(null==n&&(c.theActiveTextEditObjectID=h,c.theTEWasResized=!1,c.theTEWasEdited=!1),null==n&&(r.TextFlags&NvConstant.TextFlags.AttachA||r.TextFlags&NvConstant.TextFlags.AttachB||T3Gv.opt.svgObjectLayer.MoveElementToFront(t)),null==n){e&&e.gesture?this.TextRegisterEvents(t.textElem,e.gesture.srcEvent,i):this.TextRegisterEvents(t.textElem,e);const n=T3Gv.opt.svgDoc.GetActiveEdit();if(l=n.GetSelectedRange(),d.theSelectedRange=Utils1.DeepCopy(l),null==e){const t=n.GetText().length;d.theSelectedRange.start=0,d.theSelectedRange.anchor=0,d.theSelectedRange.end=t}}else n&&n.EditorID===cl.EditorID&&(l=n.Data.theSelectedRange);if(""===t.textElem.GetText()){if(g<0){const e={},i=p.GetTextDefault(e);d.TextStyle=Utils1.DeepCopy(i);const n=this.CalcDefaultInitialTextStyle(i);d.theDefaultStyle=Utils1.DeepCopy(n);const s=e.vjust;d.vjust=s,T3Gv.opt.svgDoc.GetActiveEdit(),d.theSelectedRange=l,t.textElem.SetText(" "),t.textElem.SetFormat(n),t.textElem.SetParagraphStyle(e),p instanceof Instance.Shape.BaseShape&&t.textElem.SetVerticalAlignment(s),t.textElem.SetText(""),o.runtimeText=t.textElem.GetRuntimeText()}p.TextFlags=Utils2.SetFlag(p.TextFlags,NvConstant.TextFlags.Clickhere,!1)}l&&(o.selrange=l),null==n&&(t.SetCursor(CursorConstant.CursorType.Text),s&&SvgUtil.ShowSVGSelectionState(s,!1),this.RegisterLastTEOp(NvConstant.TextElemLastOpt.Init)),ObjectUtil$1.PreserveUndoState(!1)}LogUtil.Debug("O.Opt ActivateTextEdit - Output: Text editing activated for object",h)}static CheckTextHyperlinkHit(t,e){if(LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Input:",{drawingObject:t.BlockID,eventPosition:e}),-1===t.DataID&&-1===t.TableID)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (no text data)"),!1;if(t.flags&NvConstant.ObjFlags.Lock)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (object locked)"),!1;if(OptCMUtil.GetEditMode()!==NvConstant.EditState.Default)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (not in default edit mode)"),!1;const i=T3Gv.opt.svgObjectLayer.GetElementById(t.tag),n=i?i.textElem:null;if(!n)return LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (no text element)"),!1;return!!n.GetHyperlinkAtLocation(e)||(LogUtil.Debug("O.Opt CheckTextHyperlinkHit - Output: false (no hyperlink found)"),!1)}static NoteIsShowing(t,e){LogUtil.Debug("O.Opt NoteIsShowing - Input:",{noteShapeId:t,noteTableCell:e});return LogUtil.Debug("O.Opt NoteIsShowing - Output:",false),false}static CreateTextBlock(t,e,i,n){const s={},a=t.GetTextDefault(s);if(!a)return-1;const o=TextUtil.CalcDefaultInitialTextStyle(a),r=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text);if(r.SetText(e),r.SetFormat(o),r.SetParagraphStyle(s),t instanceof Instance.Shape.BaseShape){if(null===t.vjust){const e=ShapeUtil.TextAlignToJust(t.TextAlign);t.vjust=e.vjust}r.SetVerticalAlignment(t.vjust)}if(i){const t=r.CalcTextFit(32e3);i.height=t.height,i.width=t.width}const l=r.GetRuntimeText(),h=r.GetSelectedRange(),c=new TextObject({});return c.runtimeText=l,c.selrange=h,T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TextObject,c).ID}static UpdateFieldDataTooltipPos(t,e){}static HandleDataTooltipClose(t){}static ClearFieldDataDatePicker(){}static HandleTextFormatAttributes(t,e){LogUtil.Debug("O.Opt HandleTextFormatAttributes - Input:",{textObject:t,objectIndex:e});const i=TextConstant.TextFace,n={hasText:!1},s=t.GetTextFormat(!0,n);n.hasText&&(T3Gv.opt.selectionState.selectionhastext=!0),0===e?(T3Gv.opt.selectionState.fontid=s.FontId,T3Gv.opt.selectionState.fontsize=s.FontSize,T3Gv.opt.selectionState.bold=(s.Face&i.Bold)>0,T3Gv.opt.selectionState.italic=(s.Face&i.Italic)>0,T3Gv.opt.selectionState.underline=(s.Face&i.Underline)>0,T3Gv.opt.selectionState.superscript=(s.Face&i.Superscript)>0,T3Gv.opt.selectionState.subscript=(s.Face&i.Subscript)>0):(T3Gv.opt.selectionState.fontid!==s.FontId&&(T3Gv.opt.selectionState.fontid=-1),T3Gv.opt.selectionState.fontsize!==s.FontSize&&(T3Gv.opt.selectionState.fontsize=-1),T3Gv.opt.selectionState.bold!==(s.Face&i.Bold)>0&&(T3Gv.opt.selectionState.bold=!1),T3Gv.opt.selectionState.italic!==(s.Face&i.Italic)>0&&(T3Gv.opt.selectionState.italic=!1),T3Gv.opt.selectionState.underline!==(s.Face&i.Underline)>0&&(T3Gv.opt.selectionState.underline=!1),T3Gv.opt.selectionState.superscript!==(s.Face&i.Superscript)>0&&(T3Gv.opt.selectionState.superscript=!1),T3Gv.opt.selectionState.subscript!==(s.Face&i.Subscript)>0&&(T3Gv.opt.selectionState.subscript=!1)),LogUtil.Debug("O.Opt HandleTextFormatAttributes - Output: Text format attributes processed")}static TEDragStartFactory(t){return LogUtil.Debug("O.Opt TEDragStartFactory - Input:",{mouseDragHandler:t}),function(e){return LogUtil.Debug("O.Opt TEDragStartHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseDown(e),LogUtil.Debug("O.Opt TEDragStartHandler - Output: Mouse down handled"),!1}}static TEClickAreaDragStartFactory(t){return LogUtil.Debug("O.Opt TEClickAreaDragStartFactory - Input:",{clickAreaHandler:t}),function(e){return LogUtil.Debug("O.Opt TEClickAreaDragStartHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseDown(e),LogUtil.Debug("O.Opt TEClickAreaDragStartHandler - Output: Mouse down handled"),!1}}static TEDragFactory(t){return LogUtil.Debug("O.Opt TEDragFactory - Input:",{dragMoveHandler:t}),function(e){return LogUtil.Debug("O.Opt TEDragHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseMove(e),LogUtil.Debug("O.Opt TEDragHandler - Output: Mouse move handled"),!1}}static TEDragEndFactory(t){return LogUtil.Debug("O.Opt TEDragEndFactory - Input:",{dragEndHandler:t}),function(e){return LogUtil.Debug("O.Opt TEDragEndHandler - Input:",{pointerEvent:e}),e.preventDefault(),e.stopPropagation(),e.gesture.preventDefault(),e.gesture.stopPropagation(),t.HandleMouseUp(e),LogUtil.Debug("O.Opt TEDragEndHandler - Output: Mouse up handled and messages unblocked"),!1}}static DeleteTargetTextObject(t){if(null==t&&(t=SelectUtil.GetTargetSelect()),t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!0),i=e.DataID;if(-1!=i){const t=T3Gv.stdObj.GetObject(i);e.SetTextObject(-1),t&&t.Delete()}}}static TextAutoScroll(t){if(-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);if(e&&e.textElem){const t=e.textElem.GetInputCursorPos();if(t){const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.x2,t.y2);T3Gv.docUtil.ScrollToPosition(e.x,e.y)}}}}static TextPinFrame(t,e){const i=OptConstant.Common.EdgeSlop;if(t.x<i&&(t.x=i),t.y<i&&(t.y=i),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let s=t.x+t.width-n.dim.x+i;s>0&&t.x>=s&&(t.x-=s),s=t.y+t.height-n.dim.y+i,s>0&&(t.y-e>=s||LogUtil.Debug("O.Opt TextPinFrame - Error: Frame cannot be pinned within bounds"),t.y-=s)}return!0}static TextResizeNeedPageResize(t,e,i){if(!(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto)){let t,n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e>n.dim.x&&(n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),t={x:n.dim.x+T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),y:n.dim.y},T3Gv.opt.UpdateEdgeLayers([],n.dim,t),n.dim.x+=T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),UIUtil.ResizeSVGDocument()),i>n.dim.y&&(n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),t={x:n.dim.x,y:n.dim.y+T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom)},T3Gv.opt.UpdateEdgeLayers([],n.dim,t),n.dim.y+=T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom),UIUtil.ResizeSVGDocument())}}static InitEmptyText(t,e){const i={},n=t.GetTextDefault(i),s=this.CalcDefaultInitialTextStyle(n),a=i.vjust;e.textElem.SetText(" "),e.textElem.SetFormat(s),e.textElem.SetParagraphStyle(i),t instanceof Instance.Shape.BaseShape&&e.textElem.SetVerticalAlignment(a),e.textElem.SetText("")}}class LinkParameters{constructor(){this.ConnectIndex=-1,this.ConnectPt={x:0,y:0},this.ConnectInside=null,this.ConnectHookFlag=0,this.HookIndex=-1,this.InitialHook=-1,this.PrevConnect=-1,this.ConnectIndexHistory=[],this.SConnectIndex=-1,this.SConnectInside=null,this.SConnectHookFlag=0,this.SConnectPt={x:0,y:0},this.HiliteConnect=-1,this.HiliteInside=null,this.HiliteHookFlag=0,this.SHiliteConnect=-1,this.SHiliteInside=null,this.SHiliteHookFlag=0,this.JoinIndex=-1,this.JoinData=0,this.JoinSourceData=0,this.SJoinIndex=-1,this.SJoinData=0,this.SJoinSourceData=0,this.HiliteJoin=-1,this.SHiliteJoin=-1,this.ArraysOnly=!1,this.lpCircList=[],this.DropOnLine=!1,this.AutoInsert=!1,this.AutoPoints=[],this.AutoSeg=0,this.AutoSinglePoint=0,this.AutoHeal=!1,this.AutoHealID=-1,this.cpt=[],this.ContainerPt=[],this.AllowJoin=0,this.savedEditState=NvConstant.EditState.Default}}class DynamicHit{constructor(t,e,i,n,s,a,o){this.otherhits=[],this.ID=t,this.snap=e,this.edge=i,this.distance=n,this.leftright=s,this.aboveleft=a,this.label=o,this.pt=null,this.otherhits=[]}}class DynamicUtil{static DynamicSnapsGetSnapObjects(t,e,i,n,s,a){let o,r,l,h,c,u,d,p,g;const f=TextConstant.TextJust,m=LayerUtil.ActiveVisibleZList();o=m.length;const v=function(t,e,n,s,a,o,r,l,h){const c=n-s,p=Math.abs(c);u=[];const g=i[t];if(g&&(u=g.otherhits),p<=5)if(null==g||o<g.distance)g&&u.push(g),d=new DynamicHit(e,c,a,o,r,l,a===f.Center),d.otherhits=u,i[t]=d;else{const t=new DynamicHit(e,c,a,o,r,l,a===f.Center);g.otherhits.push(t)}},b=function(t){let e,n=!1;for(e in i){const s=i[e];if(t&&s&&t.ID==s.ID&&!0===s.label){n=!0;break}}n||(t.label=!0)},y=function(t){let i,n;o=t.otherhits.length;let s,a=[];for(r=0;r<o;r++)i=t.otherhits[r],Utils2.IsEqual(i.snap,t.snap,.5)&&a.push(i);for(t.otherhits=a,o=t.otherhits.length,o>1&&t.otherhits.sort((function(t,e){return t.distance===e.distance?0:t.distance<e.distance?-1:1})),r=o-1;r>=0;r--)if(i=t.otherhits[r],ObjectUtil$1.GetObjectPtr(i.ID,!1).GetSnapRect(),r>0?(n=t.otherhits[r-1],s=ObjectUtil$1.GetObjectPtr(n.ID,!1).GetSnapRect()):(n=t,s=ObjectUtil$1.GetObjectPtr(t.ID,!1).GetSnapRect()),t.leftright)if(t.aboveleft)switch(i.distance-=n.distance+s.height,t.edge){case f.Left:i.pt={x:e.x,y:s.y};break;case f.Right:i.pt={x:l,y:s.y};break;case f.Center:i.pt={x:p,y:s.y}}else switch(i.distance-=n.distance+s.height,t.edge){case f.Left:i.pt={x:e.x,y:s.y+s.height};break;case f.Right:i.pt={x:l,y:s.y+s.height};break;case f.Center:i.pt={x:p,y:s.y+s.height}}else if(t.aboveleft)switch(i.distance-=n.distance+s.width,t.edge){case f.Top:i.pt={x:s.x,y:s.y};break;case f.Bottom:i.pt={x:s.x,y:h};break;case f.Center:i.pt={x:s.x,y:g}}else switch(i.distance-=n.distance+s.width,t.edge){case f.Top:i.pt={x:s.x+s.width,y:s.y};break;case f.Bottom:i.pt={x:s.x+s.width,y:h};break;case f.Center:i.pt={x:s.x+s.width,y:g}}},S=function(t,i,n,s,a){let o,r,c,u,d,p,g,f=0,m=[],v=[];const b=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);let y=PolyUtil.PolyLIntersect(t,i,b,b.length);for(;y.bSuccess&&(m.push(y.ipt),f+=y.lpseg,!(f>b.length-1));){const e=b.slice(f);y=PolyUtil.PolyLIntersect(t,i,e,e.length)}if(s){for(r=m.length,o=0;o<r;o++)m[o].y<=e.y?(c=e.y-m[o].y,(void 0===u||c<u)&&(u=c,p=o)):m[o].y>=h&&(c=m[o].y-h,(void 0===d||c<d)&&(d=c,g=o));(void 0!==u&&void 0!==d||!a)&&(void 0!==u&&v.push({pt:m[p],dist:u}),void 0!==d&&v.push({pt:m[g],dist:d}))}else{for(r=m.length,o=0;o<r;o++)m[o].x<=e.x?(c=e.x-m[o].x,(void 0===u||c<u)&&(u=c,p=o)):m[o].x>=l&&(c=m[o].x-l,(void 0===d||c<d)&&(d=c,g=o));(void 0!==u&&void 0!==d||!a)&&(void 0!==u&&v.push({pt:m[p],dist:u}),void 0!==d&&v.push({pt:m[g],dist:d}))}return v},x=function(t,n,s){let a,o;const r=e.x,l=e.y,h=e.x+e.width,c=e.y+e.height,u=e.x+e.width/2,d=e.y+e.height/2,p=TextConstant.TextJust;if(s===NvConstant.GuideDistanceTypes.Room){let e=Utils1.DeepCopy(t.Frame);const s=t.StyleRecord.Line.BThick;if(Utils2.InflateRect(e,-s,-s),Utils2.IsRectangleFullyEnclosed(e,n)){const e=S(t,{x:r,y:d},0,!1,!0),n=S(t,{x:u,y:l},0,!0,!0);2===e.length&&(a=e[0].dist,(null==i.wall_left||i.wall_left.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-1,!0),o.pt=e[0].pt,i.wall_left=o),a=e[1].dist,(null==i.wall_right||i.wall_right.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-2,!0),o.pt=e[1].pt,i.wall_right=o)),2===n.length&&(a=n[0].dist,(null==i.wall_top||i.wall_top.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-1,!0),o.pt=n[0].pt,i.wall_top=o),a=n[1].dist,(null==i.wall_bottom||i.wall_bottom.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-2,!0),o.pt=n[1].pt,i.wall_bottom=o))}}if(s===NvConstant.GuideDistanceTypes.PolyWall||s===NvConstant.GuideDistanceTypes.Room){if(d>=l&&d<=c){const e=S(t,{x:r,y:d},0,!1,!1);2===e.length&&(null!=e[0].pt&&(a=e[0].dist,(null==i.wall_left||i.wall_left.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-1,!0),o.pt=e[0].pt,i.wall_left=o)),null!=e[1].pt&&(a=e[1].dist,(null==i.wall_right||i.wall_right.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-2,!0),o.pt=e[1].pt,i.wall_right=o)))}if(u>=r&&u<=h){const e=S(t,{x:u,y:l},0,!0,!1);2===e.length&&(null!=e[0].pt&&(a=e[0].dist,(null==i.wall_top||i.wall_top.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-1,!0),o.pt=e[0].pt,i.wall_top=o)),null!=e[1].pt&&(a=e[1].dist,(null==i.wall_bottom||i.wall_bottom.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-2,!0),o.pt=e[1].pt,i.wall_bottom=o)))}}else if(s===NvConstant.GuideDistanceTypes.Vertical_Wall){let e=Utils1.DeepCopy(t.Frame);const s=t.StyleRecord.Line.BThick;Utils2.InflateRect(e,-s,0),e.y<=d&&e.y+e.height>=d&&(n.x>e.x+e.width?(a=n.x-(e.x+e.width),(null==i.wall_left||i.wall_left.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-1,!0),i.wall_left=o)):h<e.x&&(a=e.x-h,(null==i.wall_right||i.wall_right.distance>a)&&(o=new DynamicHit(t.BlockID,null,p.Center,a,!1,-2,!0),i.wall_right=o)))}else if(s===NvConstant.GuideDistanceTypes.Horizontal_Wall){let e=Utils1.DeepCopy(t.Frame);const s=t.StyleRecord.Line.BThick;Utils2.InflateRect(e,0,-s),e.x<=u&&e.x+e.width>=u&&(n.y>e.y+e.height?(a=n.y-(e.y+e.height),o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-1,!0),i.wall_top=o):c<e.y&&(a=e.y-c,o=new DynamicHit(t.BlockID,null,p.Center,a,!0,-2,!0),i.wall_bottom=o))}};if(null!=ObjectUtil$1.GetObjectPtr(t,!1)){let l;const h=e.x+e.width,u=e.y+e.height,d=e.x+e.width/2,p=e.y+e.height/2;let g,S=!1;n&&n.distanceonly&&(S=!0);for(let i=0;i<o;i++){const n=m[i];if(n!==t&&!a){const t=ObjectUtil$1.GetObjectPtr(n,!1);if(t){const i=t.GetSnapRect(),s=i.x+i.width,a=i.x,o=i.y,r=i.y+i.height,g=i.x+i.width/2,m=i.y+i.height/2;l=t.GuideDistanceOnly(),l&&x(t,e,l),t&&t.IsSnapTarget()&&!S&&(a>=e.x-5&&a<=e.x+5&&(r<e.y?(c=e.y-r,v("above_left",n,a,e.x,f.Left,c,!0,!0)):o>u&&(c=o-u,v("below_left",n,a,e.x,f.Left,c,!0,!1))),s>=e.x-5&&s<=e.x+5&&(r<e.y?(c=e.y-r,v("above_left",n,s,e.x,f.Left,c,!0,!0)):o>u&&(c=o-u,v("below_left",n,s,e.x,f.Left,c,!0,!1))),s>=h-5&&s<=h+5&&(r<e.y?(c=e.y-r,v("above_right",n,s,h,f.Right,c,!0,!0)):o>u&&(c=o-u,v("below_right",n,s,h,f.Right,c,!0,!1))),a>=h-5&&a<=h+5&&(r<e.y?(c=e.y-r,v("above_right",n,a,h,f.Right,c,!0,!0)):o>u&&(c=o-u,v("below_right",n,a,h,f.Right,c,!0,!1))),o>=e.y-5&&o<=e.y+5&&(s<e.x?(c=e.x-s,v("left_top",n,o,e.y,f.Top,c,!1,!0)):a>h&&(c=a-h,v("right_top",n,o,e.y,f.Top,c,!1,!1))),r>=e.y-5&&r<=e.y+5&&(s<e.x?(c=e.x-s,v("left_top",n,r,e.y,f.Top,c,!1,!0)):a>h&&(c=a-h,v("right_top",n,r,e.y,f.Top,c,!1,!1))),r>=u-5&&r<=u+5&&(s<e.x?(c=e.x-s,v("left_bottom",n,r,u,f.Bottom,c,!1,!0)):a>h&&(c=a-h,v("right_bottom",n,r,u,f.Bottom,c,!1,!1))),o>=u-5&&o<=u+5&&(s<e.x?(c=e.x-s,v("left_bottom",n,o,u,f.Bottom,c,!1,!0)):a>h&&(c=a-h,v("right_bottom",n,o,u,f.Bottom,c,!1,!1))),g>=d-5&&g<=d+5&&(r<e.y?(c=e.y-r,v("above_center",n,g,d,f.Center,c,!0,!0)):o>u&&(c=o-u,v("below_center",n,g,d,f.Center,c,!0,!1))),m>=p-5&&m<=p+5&&(s<e.x?(c=e.x-s,v("left_center",n,m,p,f.Center,c,!1,!0)):a>h&&(c=a-h,v("right_center",n,m,p,f.Center,c,!1,!1))))}}}const w={x:null,y:null},C={x:0,y:0};if(s){let t,e;const n=s.length;for(e=0;e<n;e++){g=s[e];const t=i[g];t&&(t.leftright?(w.x=t.snap,C.x=t.snap):(w.y=t.snap,C.y=t.snap))}for(g in i){const n=i[g];if(null!=n&&s.indexOf(g)<0)if(n.leftright){if("above_center"===g||"below_center"===g)if(s.indexOf("above_right")>=0||s.indexOf("below_right")>=0)for(n.snap-=C.x/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap-=C.x/2;else if(s.indexOf("above_left")>=0||s.indexOf("below_left")>=0)for(n.snap+=-C.x/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap+=-C.x/2;Utils2.IsEqual(n.snap,0,.5)||(i[g]=null)}else{if("left_center"===g||"right_center"===g)if(s.indexOf("left_bottom")>=0||s.indexOf("right_bottom")>=0)for(n.snap-=C.y/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap-=C.y/2;else if(s.indexOf("left_top")>=0||s.indexOf("right_top")>=0)for(n.snap+=-C.y/2,t=n.otherhits.length,e=0;e<t;e++)n.otherhits[e].snap+=-C.y/2;Utils2.IsEqual(n.snap,0,.5)||(i[g]=null)}}for(g in i){const t=i[g];null!=t&&(b(t),y(t))}}else{const t={x:null,y:null};if(T3Gv.docUtil.docConfig.centerSnap){const e=["above_center","below_center","left_center","right_center"];for(o=e.length,r=0;r<o;r++){g=e[r];const n=i[g];null!=n&&null!=n.snap&&(n.leftright?(null==t.x||Math.abs(n.snap)<Math.abs(t.x))&&(t.x=n.snap,w.x=n.snap):(null==t.y||Math.abs(n.snap)<Math.abs(t.x))&&(t.y=n.snap,w.y=n.snap))}}for(g in i){const e=i[g];switch(null!=e&&null!=e.snap&&(e.leftright&&null==t.x?(null==w.x||Math.abs(e.snap)<Math.abs(w.x))&&(w.x=e.snap):null==t.y&&(null==w.y||Math.abs(e.snap)<Math.abs(w.y))&&(w.y=e.snap)),g){case"wall_left":i.left_center&&(i[g]=null);break;case"wall_right":i.right_center&&(i[g]=null);break;case"wall_top":i.above_center&&(i[g]=null);break;case"wall_bottom":i.below_center&&(i[g]=null)}}for(g in i){const t=i[g];null!=t&&null!=t.snap&&(t.leftright?null==w.x||Utils2.IsEqual(t.snap,w.x,.5)||(i[g]=null):null==w.y||Utils2.IsEqual(t.snap,w.y,.5)||(i[g]=null))}for(g in i){const t=i[g];null!=t&&(b(t),y(t))}}return w}}static DynamicSnapsUpdateGuides(t,e,i){if(null!=ObjectUtil$1.GetObjectPtr(e,!1)){let e,n,s,a,o;const r=T3Gv.opt.dynamicGuides,l=TextConstant.TextJust;n=i.y+i.height,s=i.x+i.width,a=i.x+i.width/2,o=i.y+i.height/2;const h={x:0,y:0},c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),u="#2C75F9",d=Utils1.DeepCopy(T3Gv.opt.header.DimensionFontStyle);d.color=u;const p=T3Gv.opt.svgDoc.docInfo.docToScreenScale;d.size/=p;const g=function(t){const e=t+"label",i=t+"back",n=T3Gv.opt.svgHighlightLayer.GetElementById(t),s=T3Gv.opt.svgHighlightLayer.GetElementById(e),a=T3Gv.opt.svgHighlightLayer.GetElementById(i);n&&T3Gv.opt.svgHighlightLayer.RemoveElement(n),s&&T3Gv.opt.svgHighlightLayer.RemoveElement(s),a&&T3Gv.opt.svgHighlightLayer.RemoveElement(a)},f=function(e,r){const p=ObjectUtil$1.GetObjectPtr(e.ID,!1);if(null!=p){let g,f,m;const v=p.GetSnapRect(),b=v.y+v.height,y=v.x+v.width,S=1/T3Gv.opt.svgDoc.GetWorkArea().docScale,x=3*S+","+6*S,w=12*S+","+6*S;let C,T=T3Gv.opt.svgHighlightLayer.GetElementById(r),D=!1,k=null;if(e.leftright?e.edge===l.Left?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.x=i.x),e.aboveleft?null!=e.pt?(g={x:i.x,y:e.pt.y},f={x:i.x,y:v.y},h.y=e.pt.y-e.distance/2):(g={x:i.x,y:n},f={x:i.x,y:v.y},h.y=i.y-e.distance/2):null!=e.pt?(g={x:i.x,y:e.pt.y},f={x:i.x,y:b},h.y=e.pt.y+e.distance/2):(m=t.above_left?n:i.y,g={x:i.x,y:m},f={x:i.x,y:b},h.y=n+e.distance/2)):e.edge===l.Right?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.x=s),e.aboveleft?null!=e.pt?(g={x:s,y:e.pt.y},f={x:s,y:v.y},h.y=e.pt.y-e.distance/2):(g={x:s,y:n},f={x:s,y:v.y},h.y=i.y-e.distance/2):null!=e.pt?(g={x:s,y:e.pt.y},f={x:s,y:b},h.y=e.pt.y+e.distance/2):(m=t.above_left?n:i.y,g={x:s,y:m},f={x:s,y:b},h.y=n+e.distance/2)):e.edge===l.Center&&(D=!0,h.x=a,-1===e.aboveleft?(null!=e.pt?(g={x:a,y:i.y},f={x:a,y:e.pt.y}):(g={x:a,y:i.y},f={x:a,y:v.y}),h.y=i.y-e.distance/2):-2===e.aboveleft?(null!=e.pt?(g={x:a,y:n},f={x:a,y:e.pt.y}):(g={x:a,y:n},f={x:a,y:b}),h.y=n+e.distance/2):e.aboveleft?null!=e.pt?(g={x:a,y:e.pt.y},f={x:a,y:b},h.y=e.pt.y-e.distance/2):(g={x:a,y:i.y},f={x:a,y:b},h.y=i.y-e.distance/2):null!=e.pt?(g={x:a,y:e.pt.y},f={x:a,y:v.y},h.y=e.pt.y+e.distance/2):(g={x:a,y:n},f={x:a,y:v.y},h.y=n+e.distance/2),k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0)):e.edge===l.Top?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.y=i.y),e.aboveleft?null!=e.pt?(g={x:e.pt.x,y:i.y},f={x:v.x,y:i.y},h.x=e.pt.x-e.distance/2):(g={x:s,y:i.y},f={x:v.x,y:i.y},h.x=i.x-e.distance/2):null!=e.pt?(g={x:e.pt.x,y:i.y},f={x:y,y:i.y},h.x=e.pt.x+e.distance/2):(m=t.left_top?s:i.x,g={x:m,y:i.y},f={x:y,y:i.y},h.x=s+e.distance/2)):e.edge===l.Bottom?(e.label&&(k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0),h.y=n),e.aboveleft?null!=e.pt?(g={x:e.pt.x,y:n},f={x:v.x,y:n},h.x=e.pt.x-e.distance/2):(g={x:s,y:n},f={x:v.x,y:n},h.x=i.x-e.distance/2):null!=e.pt?(g={x:e.pt.x,y:n},f={x:y,y:n},h.x=e.pt.x+e.distance/2):(m=t.left_bottom?s:i.x,g={x:m,y:n},f={x:y,y:n},h.x=s+e.distance/2)):e.edge===l.Center&&(D=!0,h.y=o,-1===e.aboveleft?(null!=e.pt?(g={x:i.x,y:o},f={x:e.pt.x,y:o}):(g={x:i.x,y:o},f={x:v.x,y:o}),h.x=i.x-e.distance/2):-2===e.aboveleft?(null!=e.pt?(g={x:s,y:o},f={x:e.pt.x,y:o}):(g={x:s,y:o},f={x:y,y:o}),h.x=s+e.distance/2):e.aboveleft?null!=e.pt?(g={x:e.pt.x,y:o},f={x:y,y:o},h.x=e.pt.x-e.distance/2):(g={x:i.x,y:o},f={x:y,y:o},h.x=i.x-e.distance/2):null!=e.pt?(g={x:e.pt.x,y:o},f={x:v.x,y:o},h.x=e.pt.x+e.distance/2):(g={x:s,y:o},f={x:v.x,y:o},h.x=s+e.distance/2),k=RulerUtil.GetLengthInRulerUnits(e.distance,!1,0,0)),g){null==T&&(T=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Line),T.SetFillColor("none"),T.SetStrokeColor(u),T.SetStrokeWidth(S),T.SetStrokePattern(D?w:x),T.SetID(r),T3Gv.opt.svgHighlightLayer.AddElement(T)),T.SetPoints(g.x,g.y,f.x,f.y);const t=r+"label",e=r+"back";if(k){C=T3Gv.opt.svgHighlightLayer.GetElementById(t);let i=T3Gv.opt.svgHighlightLayer.GetElementById(e);if(null==C){i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Rect),i.SetID(e),i.SetStrokeWidth(0);const n=c.background.Paint.Color;i.SetFillColor(n),T3Gv.opt.svgHighlightLayer.AddElement(i),C=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),T3Gv.opt.svgHighlightLayer.AddElement(C),C.SetID(t),C.SetRenderingEnabled(!1),C.SetText(k),C.SetFormat(d)}else C.SetRenderingEnabled(!1),C.SetText(k);C.SetRenderingEnabled(!0);const n=C.GetTextMinDimensions();i.SetPos(h.x-n.width/2-2,h.y-n.height/2-2),i.SetSize(n.width+4,n.height+4),C.SetPos(h.x-n.width/2,h.y-n.height/2)}else{C=T3Gv.opt.svgHighlightLayer.GetElementById(t);const i=T3Gv.opt.svgHighlightLayer.GetElementById(e);C&&T3Gv.opt.svgHighlightLayer.RemoveElement(C),i&&T3Gv.opt.svgHighlightLayer.RemoveElement(i)}}}};for(e in t){let i,n,s;const a=[];if(null!=t[e]){for(f(t[e],e),n=t[e].otherhits.length,i=0;i<n;i++)s=t[e].otherhits[i],s.label=t[e].label,a.push(s.ID),f(t[e].otherhits[i],e+s.ID.toString());if(r&&null!=r[e])for(n=r[e].otherhits.length,i=0;i<n;i++)s=r[e].otherhits[i],a.indexOf(s.ID)<0&&g(e+s.ID.toString())}else if(r&&null!=r[e]&&(g(e),r[e].otherhits))for(n=r[e].otherhits.length,i=0;i<n;i++)s=r[e].otherhits[i],g(e+s.ID.toString())}T3Gv.opt.dynamicGuides=t}}static DynamicSnapsRemoveGuides(t){let e,i,n,s;if(t)for(e in t)if(t[e]){const a=e+"label",o=e+"back",r=T3Gv.opt.svgHighlightLayer.GetElementById(e),l=T3Gv.opt.svgHighlightLayer.GetElementById(a),h=T3Gv.opt.svgHighlightLayer.GetElementById(o);if(r&&T3Gv.opt.svgHighlightLayer.RemoveElement(r),l&&T3Gv.opt.svgHighlightLayer.RemoveElement(l),h&&T3Gv.opt.svgHighlightLayer.RemoveElement(h),t[e].otherhits)for(i=t[e].otherhits.length,n=0;n<i;n++){s=t[e].otherhits[n];const i=e+s.ID.toString()+"label",a=e+s.ID.toString()+"back",o=T3Gv.opt.svgHighlightLayer.GetElementById(e+s.ID.toString()),r=T3Gv.opt.svgHighlightLayer.GetElementById(i),l=T3Gv.opt.svgHighlightLayer.GetElementById(a);o&&T3Gv.opt.svgHighlightLayer.RemoveElement(o),r&&T3Gv.opt.svgHighlightLayer.RemoveElement(r),l&&T3Gv.opt.svgHighlightLayer.RemoveElement(l)}}t=null}}class LMEvtUtil{static LMStampPostRelease(t){let e;LogUtil.Debug("= U.LMEvtUtil LMStampPostRelease - Input:",{completeOperation:t}),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,T3Gv.opt.dragTargetId,null),T3Gv.opt.linkParams.HiliteJoin=-1),OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.JoinIndex>=0?PolyUtil.PolyLJoin(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.JoinData,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.JoinSourceData,!1):T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.InitialHook>=0)&&(T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcAutoInsert?this.SD_AutoInsertShape(T3Gv.opt.actionStoredObjectId,T3Gv.opt.linkParams.ConnectIndex):T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcHookReverse?this.LM_ReverseHook(T3Gv.opt.actionStoredObjectId):(e=HookUtil.UpdateHook(T3Gv.opt.actionStoredObjectId,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside),!1==(0!==e&&void 0!==e)&&OptCMUtil.SetLinkFlag(T3Gv.opt.linkParams.ConnectIndex,DSConstant.LinkFlags.Move)))),T3Gv.opt.linkParams=null,LogUtil.Debug("= U.LMEvtUtil LMStampPostRelease - Output: Operation completed")}static LMStampPreTrack(){LogUtil.Debug("= U.LMEvtUtil LMStampPreTrack - Input: No parameters"),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),T3Gv.opt.linkParams=new LinkParameters,T3Gv.opt.linkParams.AutoInsert=DrawUtil.AllowAutoInsert(),T3Gv.opt.drawShape&&T3Gv.opt.drawShape.flags&&T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.DropOnBorder&&(T3Gv.opt.linkParams.DropOnLine=!0),LogUtil.Debug("= U.LMEvtUtil LMStampPreTrack - Output: Link parameters initialized",{autoInsert:T3Gv.opt.linkParams.AutoInsert,dropOnLine:T3Gv.opt.linkParams.DropOnLine||!1})}static LMStampDuringTrack(t,e){let i;if(LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Input:",{position:t,drawingObject:null==e?void 0:e.BlockID}),T3Gv.opt.actionStoredObjectId<0)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No action object ID",t),t;if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: Using move list, returning original position",t),t;if(null==e)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No drawing object",t),t;if(i=HookUtil.MoveGetHookPoints(T3Gv.opt.actionStoredObjectId,e,0,0),!i)return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No hook points",t),t;T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0;const n=T3Gv.opt.linkParams;if((n.DropOnLine||n.AutoInsert)&&SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,e,n.cpt,!0,!0,!1,t)){const e={x:t.x+T3Gv.opt.dragDeltaX,y:t.y+T3Gv.opt.dragDeltaY};return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: Drop-on-line adjusted position",e),e}if(T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,T3Gv.opt.dragStartX=t.x,T3Gv.opt.dragStartY=t.y,SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,e,i,!0,!1,n.AllowJoin,t)||n.JoinIndex>=0){const e={x:t.x+T3Gv.opt.dragDeltaX,y:t.y+T3Gv.opt.dragDeltaY};return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: Connection/join adjusted position",e),e}return LogUtil.Debug("= U.LMEvtUtil LMStampDuringTrack - Output: No adjustments needed",t),t}static LMMoveDuringTrack(t){let e,i,n,s,a,o;LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Input:",t);let r={},l=[];if(T3Gv.opt.dragTargetId<0)return LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output: Invalid drag target"),t;if(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1),null==i)return LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output: Target object not found"),t;if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.AutoHeal&&(a=Math.abs(t.x-T3Gv.opt.dragStartX),o=Math.abs(t.y-T3Gv.opt.dragStartY),a>50||o>50||T3Gv.opt.linkParams.AutoInsert&&T3Gv.opt.linkParams.ConnectIndex>=0)){s=this.HealLine(i,!1,l),T3Gv.opt.linkParams.AutoHeal=!1,T3Gv.opt.linkParams.AutoHealID=i.BlockID,s>=0&&(l.push(s),ObjectUtil$1.DeleteObjects(l,!1));let t=T3Gv.opt.dirtyList.indexOf(T3Gv.opt.dragTargetId);t>=0&&(T3Gv.opt.dirtyList.splice(t,1),SvgUtil.RenderDirtySVGObjects(),ObjectUtil$1.AddToDirtyList(T3Gv.opt.dragTargetId)),SelectUtil.GetMoveList(T3Gv.opt.dragTargetId,!0,!0,!1,T3Gv.opt.moveBounds,!1)}if(T3Gv.opt.pinRect&&this.PinMoveRect(t),n=HookUtil.MoveGetHookPoints(T3Gv.opt.dragTargetId,i,t.x-T3Gv.opt.dragStartX,t.y-T3Gv.opt.dragStartY),n){if(T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,T3Gv.opt.linkParams.DropOnLine||T3Gv.opt.linkParams.AutoInsert){r=Utils1.DeepCopy(i.Frame),r.x+=t.x-T3Gv.opt.dragStartX,r.y+=t.y-T3Gv.opt.dragStartY;const n=i.Frame;if(i.Frame=r,e=SelectUtil.FindConnect(T3Gv.opt.dragTargetId,i,T3Gv.opt.linkParams.cpt,!0,!0,!1,t),i.Frame=n,e)return t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY,LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output (drop connection):",t),t}T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,e=SelectUtil.FindConnect(T3Gv.opt.dragTargetId,i,n,!0,!1,T3Gv.opt.linkParams.AllowJoin,t),(e||T3Gv.opt.linkParams.JoinIndex>=0)&&(t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY)}return LogUtil.Debug("= U.LMEvtUtil LMMoveDuringTrack - Output:",t),t}static LMMoveTrack(t,e){if(LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Input:",{event:t,skipScrolling:e}),Date.now()-T3Gv.opt.eventTimestamp<250)return void LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Output: Throttled (skipping)");if(!T3Gv.opt.dragGotMove){let e=T3Gv.opt.moveList;if(e&&e.length){if(DrawUtil.DragDuplicate(t)){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0),i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);t.length=0;for(let r=0;r<e.length;r++)t.push(e[r]);const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);let s=-1,a=null;n&&(a=n.Frame,s=n.DrawingObjectBaseClass);const o=ToolActUtil.DuplicateObjects(!0);t.length=0;for(let e=0;e<o.length;e++)t.push(o[e]);T3Gv.opt.MoveDuplicated=!0,T3Gv.opt.moveList.length=0,T3Gv.opt.dragElementList.length=0,T3Gv.opt.dragBBoxList.length=0,T3Gv.opt.linkParams.lpCircList=[],T3Gv.opt.linkParams.InitialHook=-1;for(let e=o.length-1;e>=0;e--){const t=ObjectUtil$1.GetObjectPtr(o[e],!1);if(t){T3Gv.opt.moveList.push(o[e]),T3Gv.opt.linkParams.lpCircList.push(o[e]),T3Gv.opt.dragElementList.push(o[e]);const n=t.GetSVGFrame();a&&Utils2.EqualRect(n,a,2)&&t.DrawingObjectBaseClass===s&&(T3Gv.opt.dragTargetId=o[e],i.tselect=o[e]),T3Gv.opt.dragBBoxList.push(n)}}e=T3Gv.opt.moveList}const i=e.length;for(let t=0;t<i;t++){const i=e[t],n=ObjectUtil$1.GetObjectPtr(i,!1);if(n){const t=T3Gv.opt.svgObjectLayer.GetElementById(i);n.RemoveDimensionLines(t)}}}}T3Gv.opt.dragGotMove=!0;const i=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;if(e)DrawUtil.ResetAutoScrollTimer();else if(!DrawUtil.AutoScrollCommon(t,!i,"HandleObjectDragDoAutoScroll"))return void LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Output: Auto-scroll in progress");const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),s=this.LMMoveDuringTrack(n,t);T3Gv.opt.HandleObjectDragMoveCommon(s.x,s.y,e,t),LogUtil.Debug("= U.LMEvtUtil LMMoveTrack - Output: Objects moved to",s)}static LMMoveRelease(t,e){LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Input:",{event:t,moveData:e});let i=!1;if(!e&&(Utils2.StopPropagationAndDefaults(t),T3Gv.opt.UnbindShapeMoveHammerEvents(),DrawUtil.ResetAutoScrollTimer(),OptCMUtil.SetEditMode(NvConstant.EditState.Default),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,!T3Gv.opt.dragGotMove||DrawUtil.CheckDragIsOverCustomLibrary(t)))return this.LMMovePostRelease(!1),SvgUtil.RenderAllSVGSelectionStates(),T3Gv.opt.moveList=null,void LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Output: Early exit condition met");const n=T3Gv.opt.moveList?T3Gv.opt.moveList.length:0;if(0===n)return void LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Output: No objects to move");let s=null,a={};T3Gv.opt.dragDeltaX,T3Gv.opt.MoveDuplicated;for(let o=0;o<n;o++){const t=T3Gv.opt.moveList[o],i=T3Gv.stdObj.GetObject(t).Data;if(e)a=e.Data.thePointList[o];else{if(s=T3Gv.opt.dragBBoxList[o],!s)continue;a={x:s.x+T3Gv.opt.dragDeltaX,y:s.y+T3Gv.opt.dragDeltaY}}if(i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&null===i.polylist&&i.StyleRecord.Line.BThick&&(a.x+=i.StyleRecord.Line.BThick,a.y+=i.StyleRecord.Line.BThick),e){const e="note_"+t,n=T3Gv.opt.svgHighlightLayer.GetElementById(e);if(n){const t=n.GetPos(),e=a.x-i.Frame.x,s=a.y-i.Frame.y;t.x+=e,t.y+=s,n.SetPos(t.x,t.y)}}T3Gv.opt.SetShapeOriginNoDirty(t,a.x,a.y),T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcAutoInsert&&i.UpdateFrame(i.Frame),(i.Dimensions&NvConstant.DimensionFlags.Always||i.Dimensions&NvConstant.DimensionFlags.Select||e||i.Dimensions&NvConstant.DimensionFlags.Area)&&ObjectUtil$1.AddToDirtyList(t)}if(this.LMMovePostRelease(!0,e),!e&&T3Gv.opt.lastOpDuplicate){i=!0;const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);t.dupdisp.x+=T3Gv.opt.dragDeltaX,t.dupdisp.y+=T3Gv.opt.dragDeltaY}DrawUtil.CompleteOperation(),e||(i&&(T3Gv.opt.lastOpDuplicate=!0),T3Gv.opt.moveList=null),LogUtil.Debug("= U.LMEvtUtil LMMoveRelease - Output: Move operation completed")}static LMMovePostRelease(t,e){var i,n;LogUtil.Debug("= U.LMEvtUtil LMMovePostRelease - Input:",{completeOperation:t,moveData:e});let s=!1;const a=[];if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,T3Gv.opt.dragTargetId,null),T3Gv.opt.linkParams.HiliteJoin=-1),e||OptCMUtil.SetEditMode(NvConstant.EditState.Default),t){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId);if(t.objecttype===NvConstant.FNObjectTypes.NgEvent||t.objecttype===NvConstant.FNObjectTypes.NgEventLabel){let t=T3Gv.opt.dragDeltaX,a=T3Gv.opt.moveList;null!=(null==(i=null==e?void 0:e.Data)?void 0:i.dragDeltaX)&&(t=e.Data.dragDeltaX),null!=(null==(n=null==e?void 0:e.Data)?void 0:n.moveList)&&(a=e.Data.moveList),s=this.TimelineMoveEvent(T3Gv.opt.dragTargetId,a,t,!0)}else if(T3Gv.opt.linkParams.JoinIndex>=0)PolyUtil.PolyLJoin(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.JoinData,T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.JoinSourceData,!1);else if(T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.InitialHook>=0))s||(T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcAutoInsert?this.SD_AutoInsertShape(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectIndex):T3Gv.opt.linkParams.ConnectHookFlag===NvConstant.HookFlags.LcHookReverse?this.LM_ReverseHook(T3Gv.opt.dragTargetId):(s=HookUtil.HandleMultipleSelectionHooks(),s||(HookUtil.UpdateHook(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside),OptCMUtil.SetLinkFlag(T3Gv.opt.linkParams.ConnectIndex,DSConstant.LinkFlags.Move),HookUtil.CleanupHooks(T3Gv.opt.dragTargetId,T3Gv.opt.linkParams.ConnectIndex))));else{const t=OptAhUtil.GetGvSviOpt(T3Gv.opt.dragTargetId)||T3Gv.wallOpt;t instanceof WallOpt&&t.EnsureCubicleBehindOutline(T3Gv.opt.dragTargetId)}e||null==T3Gv.opt.postMoveSelectId||(a.push(T3Gv.opt.postMoveSelectId),SelectUtil.SelectObjects(a,!1,!1),T3Gv.opt.postMoveSelectId=null)}t&&T3Gv.opt.UpdateLinks(),e||(T3Gv.opt.linkParams=null,T3Gv.opt.ob={},T3Gv.opt.dragEnclosingRect=null,T3Gv.opt.dragElementList=[],T3Gv.opt.dragBBoxList=[]),LogUtil.Debug("= U.LMEvtUtil LMMovePostRelease - Output: Move post-processing completed")}static LMSetupMove(t){let e,i,n;LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Input:",t);let s=null,a=null,o=!1;if(T3Gv.opt.MoveDuplicated=!1,e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget),!e)return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (No SVG element found)"),!1;i=e.GetTargetForEvent(t),T3Gv.opt.eventTimestamp=Date.now(),Utils2.StopPropagationAndDefaults(t);const r=e.GetID(),l=ObjectUtil$1.GetObjectPtr(r,!1);if(!(l&&l instanceof Instance.Shape.BaseDrawObject))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Not a valid drawing object)"),!1;if(T3Gv.opt.bInDimensionEdit)return T3Gv.opt.CloseEdit(!1,!0),T3Gv.opt.bInDimensionEdit=!1,LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Was in dimension edit)"),!1;if(i instanceof Text&&(i.ID===OptConstant.SVGElementClass.DimText||i.ID===OptConstant.SVGElementClass.DimTextNoEdit))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Is dimension text)"),!1;if(i instanceof Image&&this.UserDataisIcon(i.GetUserData()))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Is icon element)"),!1;if(T3Gv.opt.crtOpt===OptConstant.OptTypes.FormatPainter){if(n=e.GetID(),this.FormatPainterClick(n,t))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Format painter handled click)"),!1;e=T3Gv.opt.svgObjectLayer.GetElementById(n)}const h=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);if(T3Gv.opt.crtOpt!==OptConstant.OptTypes.FormatPainter||T3Gv.opt.formatPainterMode!==StyleConstant.FormatPainterModes.Object){const i=e.GetTargetForEvent(t);let n=i.GetID();i.GetUserData(),T3Gv.opt.dragTargetId=e.GetID(),T3Gv.opt.dragTargetId=this.GetEventShapeParent(T3Gv.opt.dragTargetId),T3Gv.opt.dragTargetId=OptAhUtil.SelectContainerParent(T3Gv.opt.dragTargetId),s=T3Gv.stdObj.GetObject(T3Gv.opt.dragTargetId);const r=MouseUtil.IsRightClick(t);if(s)if(a=s.Data,o=(a.TextFlags&NvConstant.TextFlags.OneClick)>0,r)o=!1;else if(a.flags&NvConstant.ObjFlags.Lock)return SelectUtil.SelectObjectFromClick(t,e),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Object is locked)"),!1;switch(n){case OptConstant.SVGElementClass.BackgroundImage:n="";break;case OptConstant.SVGElementClass.Slop:T3Gv.opt.DeactivateAllTextEdit(!1),o=!1}switch(n){case OptConstant.SVGElementClass.BackgroundImage:break;case OptConstant.Common.HitAreas:const e=i.GetUserData();return this.LM_HitAreaClick(T3Gv.opt.dragTargetId,e),t.gesture&&t.gesture.stopDetect(),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Hit area click)"),!1}if(o)return TextUtil.ActivateTextEdit(e.svgObj.SDGObj,t,!1),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Activated text edit)"),!1}if(!SelectUtil.SelectObjectFromClick(t,e,!0))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Selection failed)"),!1;if(s=T3Gv.stdObj.GetObject(T3Gv.opt.dragTargetId),null==s)return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Target object is null)"),!1;if(a=s.Data,SvgUtil.HideAllSVGSelectionStates(),DrawUtil.InitializeAutoGrowDrag(),a.InterceptMoveOperation(t))return LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: false (Move intercepted by object)"),!1;const c={},u={};T3Gv.opt.IsConnectorEndShape(a,null,c)?T3Gv.opt.dragTargetId=c.id:T3Gv.opt.IsGenogramPartner(a,u)&&(T3Gv.opt.dragTargetId=u.id),T3Gv.opt.moveBounds={x:0,y:0,width:0,height:0},T3Gv.opt.pinRect=null,T3Gv.opt.dynamicGuides=new DynamicGuides;let d=[];d=SelectUtil.GetMoveList(T3Gv.opt.dragTargetId,!0,!0,!1,T3Gv.opt.moveBounds,!1),T3Gv.opt.dragStartX=h.x,T3Gv.opt.dragStartY=h.y;let p=d?d.length:0;T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.dragGotMove=!1;let g=[];for(let f=0;f<p;++f){const t=d[f],e=ObjectUtil$1.GetObjectPtr(t,!1);!e||e instanceof Instance.Shape.Connector||e.flags&NvConstant.ObjFlags.NotVisible||g.push(t)}for(let f=0;f<p;++f){const t=d[f],e=ObjectUtil$1.GetObjectPtr(t,!1);if(e instanceof Instance.Shape.Connector)if(e.arraylist.styleflags&OptConstant.AStyles.FlowConn)g.push(t);else if(e.hooks.length){const i=e.hooks[0].objid;ObjectUtil$1.GetObjectPtr(i)instanceof Instance.Shape.Connector?e.flags&NvConstant.ObjFlags.NotVisible||g.push(t):e.flags&NvConstant.ObjFlags.NotVisible&&(!e.hooks||-1===g.indexOf(i))||g.push(t)}else e.flags&NvConstant.ObjFlags.NotVisible||g.push(t)}d=g,p=d.length,T3Gv.opt.moveList=d;for(let f=0;f<p;++f){const t=d[f],e=ObjectUtil$1.GetObjectPtr(t,!1).GetSVGFrame();T3Gv.opt.dragBBoxList.push(e),T3Gv.opt.dragElementList.push(t),T3Gv.docUtil.docConfig.enableSnap&&t===T3Gv.opt.dragTargetId&&(T3Gv.opt.dragTargetBBox=Utils1.DeepCopy(e))}return T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&(T3Gv.opt.dragEnclosingRect=T3Gv.opt.GetListSRect(T3Gv.opt.moveList)),this.LMMovePreTrack(d,t),LogUtil.Debug("= U.LMEvtUtil LMSetupMove - Output: true (Move setup complete)"),!0}static LMMoveExceptionCleanup(t){throw LogUtil.Debug("= U.LMEvtUtil LMMoveExceptionCleanup - Input:",t),T3Gv.opt.linkParams=null,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.moveList=null,T3Gv.opt.dragEnclosingRect=null,T3Gv.opt.dragGotMove=!1,T3Gv.opt.UnbindShapeMoveHammerEvents(),DrawUtil.ResetAutoScrollTimer(),LogUtil.Debug("= U.LMEvtUtil LMMoveExceptionCleanup - Output: Cleanup completed"),t}static LMMoveClick(t){if(LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Input:",t),this.IsWheelClick(t)||T3Constant.DocContext.SpacebarDown)return EvtUtil.Evt_WorkAreaHammerDragStart(t),Utils2.StopPropagationAndDefaults(t),void LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Wheel click or spacebar down detected, redirected to WorkAreaHammerDragStart");Utils2.StopPropagationAndDefaults(t);try{T3Constant.DocContext.HTMLFocusControl&&T3Constant.DocContext.HTMLFocusControl.blur&&T3Constant.DocContext.HTMLFocusControl.blur(),T3Gv.opt.nudgeOpen&&T3Gv.opt.CloseOpenNudge();const e=this.LMSetupMove(t);if(!0!==e)return-1===e?void LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Setup failed with -1, unlocked messages"):void LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Setup failed, unlocked and unblocked messages");T3Gv.opt.crtOpt===OptConstant.OptTypes.None&&OptCMUtil.SetEditMode(NvConstant.EditState.DragShape),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ShapeDrag),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ShapeDragEnd);MouseUtil.IsRightClick(t)||UIUtil.ShowContextMenu(!1,"WorkArea","Default"),LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Output: Move operation set up successfully")}catch(e){throw this.LMMoveExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("= U.LMEvtUtil LMMoveClick - Error:",e),e}}static IsCtrlClick(t){LogUtil.Debug("= U.LMEvtUtil IsCtrlClick - Input:",t);let e=!1;return t.gesture&&(t=t.gesture.srcEvent),(t instanceof MouseEvent||"onpointerdown"in window&&t instanceof PointerEvent)&&(e=t.ctrlKey),LogUtil.Debug("= U.LMEvtUtil IsCtrlClick - Output:",e),e}static IsWheelClick(t){LogUtil.Debug("= U.LMEvtUtil IsWheelClick - Input:",t);let e=!1;return t.gesture&&(t=t.gesture.srcEvent),(t instanceof MouseEvent||"onpointerdown"in window&&t instanceof PointerEvent)&&(e=2===t.which),LogUtil.Debug("= U.LMEvtUtil IsWheelClick - Output:",e),e}static HandleKeyDown(t,e,i){LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Input:",{eventType:t.type,keyCode:e,altKey:i});let n=T3Gv.opt.svgDoc.GetActiveEdit();if(n&&n.IsActive()){if(!T3Gv.opt.bInNoteEdit){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(-1!==t.theActiveTextEditObjectID)switch(e){case KeyboardConstant.Keys.Left_Arrow:case KeyboardConstant.Keys.Right_Arrow:case KeyboardConstant.Keys.Up_Arrow:case KeyboardConstant.Keys.Down_Arrow:t.theTELastOp!==NvConstant.TextElemLastOpt.Init&&TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Select);break;case KeyboardConstant.Keys.Backspace:case KeyboardConstant.Keys.Delete:TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char)}}if(n.HandleKeyDownEvent(t))return LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Output: true (activeEdit handled event)"),!0}else if(32===e){const e=SelectUtil.GetTargetSelect();if(-1!==e){const i=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i.AllowTextEdit()){const i=T3Gv.opt.svgObjectLayer.GetElementById(e);TextUtil.ActivateTextEdit(i),n=T3Gv.opt.svgDoc.GetActiveEdit();const s=n.GetText().length;return n.SetSelectedRange(s,s),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char),n.HandleKeyDownEvent(t),LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Output: true (space activated text edit)"),!0}}}return LogUtil.Debug("= U.LMEvtUtil HandleKeyDown - Output: false"),!1}static HandleKeyPress(t,e){LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Input:",{eventType:t.type,keyCode:e});let i=T3Gv.opt.svgDoc.GetActiveEdit();if(i&&i.IsActive()){if(!T3Gv.opt.bInNoteEdit){-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID&&TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char)}if(i.HandleKeyPressEvent(t))return t.preventDefault(),LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Output: true (activeEdit handled event)"),!0}else{const e=SelectUtil.GetTargetSelect();if(-1!==e){const n=ObjectUtil$1.GetObjectPtr(e,!1);if(n&&n.AllowTextEdit()){const n=T3Gv.opt.svgObjectLayer.GetElementById(e);if(TextUtil.ActivateTextEdit(n),i=T3Gv.opt.svgDoc.GetActiveEdit(),i){const e=i.GetText().length;return i.SetSelectedRange(0,e),TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Char),i.HandleKeyPressEvent(t),LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Output: true (activated text edit)"),!0}}}}return LogUtil.Debug("= U.LMEvtUtil HandleKeyPress - Output: false"),!1}static LMMovePreTrack(t,e){LogUtil.Debug("= U.LMEvtUtil LMMovePreTrack - Input:",{objectsToMove:t,event:e}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i=e.gesture&&e.gesture.srcEvent&&e.gesture.srcEvent.altKey;if(T3Gv.opt.linkParams=new LinkParameters,T3Gv.opt.linkParams.AutoInsert=DrawUtil.AllowAutoInsert(),T3Gv.opt.linkParams.AutoInsert){ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1).length>1&&(T3Gv.opt.linkParams.AutoInsert=!1),e.gesture&&e.gesture.srcEvent&&e.gesture.srcEvent.altKey}const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);if(n){T3Gv.opt.ob=Utils1.DeepCopy(n),1===n.hooks.length&&0==(n.GetHookFlags()&NvConstant.HookFlags.LcMoveTarget)&&t.indexOf(n.hooks[0].objid)<0&&(T3Gv.opt.linkParams.ConnectIndex=n.hooks[0].objid,T3Gv.opt.linkParams.PrevConnect=n.hooks[0].objid,T3Gv.opt.linkParams.ConnectIndexHistory.push(n.hooks[0].objid),T3Gv.opt.linkParams.ConnectPt.x=n.hooks[0].connect.x,T3Gv.opt.linkParams.ConnectPt.y=n.hooks[0].connect.y,T3Gv.opt.linkParams.ConnectInside=n.hooks[0].cellid,T3Gv.opt.linkParams.HookIndex=n.hooks[0].hookpt,T3Gv.opt.linkParams.InitialHook=0);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(T3Gv.opt.linkParams.lpCircList=HookUtil.GetHookList(e,T3Gv.opt.linkParams.lpCircList,T3Gv.opt.dragTargetId,n,NvConstant.ListCodes.CircTarg,{}),HookUtil.JoinHookList(T3Gv.opt.linkParams.lpCircList,t),T3Gv.opt.linkParams.AutoInsert&&n instanceof Instance.Shape.BaseShape&&this.HealLine(n,!0,null)>0&&i&&(T3Gv.opt.linkParams.lpCircList=[],T3Gv.opt.linkParams.lpCircList.push(T3Gv.opt.dragTargetId),T3Gv.opt.moveList=[],T3Gv.opt.moveList.push(T3Gv.opt.dragTargetId),T3Gv.opt.linkParams.AutoHeal=!0),DrawUtil.AllowSnapToShapes()){const t=n.GetSnapRect(),e=Utils1.DeepCopy(t);e.x+=T3Gv.opt.dragDeltaX,e.y+=T3Gv.opt.dragDeltaY;const i={},s=n.CanSnapToShapes(i);if(s>=0){const t=ObjectUtil$1.GetObjectPtr(s,!1).GetSnapRect(),e=Utils1.DeepCopy(t),n=new DynamicGuides,a=[T3Gv.opt.dragTargetId];DynamicUtil.DynamicSnapsGetSnapObjects(s,e,n,a,null,i),n&&DynamicUtil.DynamicSnapsUpdateGuides(n,s,e)}}}LogUtil.Debug("= U.LMEvtUtil LMMovePreTrack - Output: Link parameters initialized")}static UnbindActionClickHammerEvents(){LogUtil.Debug("= U.LMEvtUtil UnbindActionClickHammerEvents - Input:");const t=T3Gv.opt.WorkAreaHammer;t&&(t.off("drag"),t.off("dragend"),t.off("doubletap")),LogUtil.Debug("= U.LMEvtUtil UnbindActionClickHammerEvents - Output: Events unbound")}static GetEventShapeParent(t){LogUtil.Debug("= U.LMEvtUtil GetEventShapeParent - Input:",t);const e=ObjectUtil$1.GetObjectPtr(t);if(e&&e.objecttype===NvConstant.FNObjectTypes.NgEventLabel){const t=ObjectUtil$1.GetObjectPtr(e.associd);if(t&&t.objecttype===NvConstant.FNObjectTypes.NgEvent)return LogUtil.Debug("= U.LMEvtUtil GetEventShapeParent - Output:",e.associd),e.associd}return LogUtil.Debug("= U.LMEvtUtil GetEventShapeParent - Output:",t),t}}class BlobBytes{constructor(t,e){this.ImageDir=t,this.Bytes=e}}var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$4=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$4(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$4(e,i,a),a};class BaseDrawObject$1{constructor(t){t=t||{},this.Type=StateConstant.StoredObjectType.BaseDrawObject,this.Frame=t.Frame||{x:0,y:0,width:0,height:0},this.r=t.r||{x:0,y:0,width:0,height:0},this.inside=t.inside||{x:0,y:0,width:0,height:0},this.trect=t.trect||{x:0,y:0,width:0,height:0},this.rtop=t.rtop||0,this.rleft=t.rleft||0,this.rbottom=t.rbottom||0,this.rright=t.rright||0,this.rwd=t.rwd||0,this.rht=t.rht||0,this.rflags=t.rflags||0,this.RotationAngle=t.RotationAngle||0,this.ShortRef=t.ShortRef||0,this.StyleRecord=t.StyleRecord||null,this.Dimensions=t.Dimensions||0,this.bOverrideDefaultStyleOnDraw=t.bOverrideDefaultStyleOnDraw||!1,this.UniqueID=null==t.UniqueID?-1:t.UniqueID,this.flags=t.flags||0,this.extraflags=t.extraflags||0,this.hookflags=t.hookflags||[],this.targflags=t.targflags||[],this.hooks=t.hooks||[],this.maxhooks=t.maxhooks||1,this.associd=t.associd||-1,this.attachpoint=t.attachpoint||{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax/2},this.hookdisp={x:0,y:0},this.TextFlags=t.TextFlags||0,this.DrawingObjectBaseClass=t.DrawingObjectBaseClass||OptConstant.DrawObjectBaseClass.Shape,this.objecttype=t.objecttype||0,this.subtype=t.subtype||0,this.dataclass=t.dataclass||0,this.Layer=t.Layer||0,this.SequenceNumber=t.SequenceNumber||-1,this.BusinessObjectID=t.BusinessObjectId||-1,this.NoteID=t.NoteID||-1,this.ExpandedViewID=t.ExpandedViewID||-1,this.DataID=t.DataID||-1,this.tindent=t.tindent||{top:0,left:0,bottom:0,right:0},this.TMargins=t.TMargins||{top:0,left:0,bottom:0,right:0},this.left_sindent=t.left_sindent||0,this.right_sindent=t.right_sindent||0,this.top_sindent=t.top_sindent||0,this.bottom_sindent=t.bottom_sindent||0,this.TableID=t.TableID||-1,this.GraphID=t.GraphID||-1,this.ImageID=t.ImageID||-1,this.ContentType=t.ContentType||OptConstant.ContentType.None,this.ContentID=t.ContentID||-1,this.commentId=t.commentId||-1,this.TextParams=t.TextParams||null,this.TextGrow=t.TextGrow||NvConstant.TextGrowBehavior.ProPortional,this.TextAlign=t.TextAlign||TextConstant.TextAlign.Center,this.colorfilter=t.colorfilter||0,this.colorchanges=t.colorchanges||0,this.moreflags=t.moreflags||0,this.sizedim=t.sizedim||{width:0,height:0},this.ConnectPoints=t.ConnectPoints||[],this.ObjGrow=t.ObjGrow||OptConstant.GrowBehavior.All,t.ResizeAspectConstrain=this.ObjGrow===OptConstant.GrowBehavior.ProPortional,this.datasetType=t.datasetType||-1,this.datasetID=t.datasetID||-1,this.datasetTableID=t.datasetTableID||-1,this.datasetElemID=t.datasetElemID||-1,this.fieldDataDatasetID=t.fieldDataDatasetID||-1,this.fieldDataTableID=t.fieldDataTableID||-1,this.fieldDataElemID=t.fieldDataElemID||-1,this.dataStyleOverride=null,this.SymbolURL=t.SymbolURL||"",this.ImageURL=t.ImageURL||"",this.ImageDir=t.ImageDir||null,this.BlobBytesID=t.BlobBytesID||-1,this.EMFHash=t.EMFHash||null,this.EMFBlobBytesID=t.EMFBlobBytesID||-1,this.OleBlobBytesID=t.OleBlobBytesID||-1,this.NativeID=t.NativeID||-1,this.SymbolData=null,this.nativeDataArrayBuffer=null,this.EMFBuffer=null,this.EMFBufferType=t.EMFBufferType||null,this.SymbolID=t.SymbolID,this.SVGFragment=t.SVGFragment||null,this.ShapesInGroup=t.ShapesInGroup||[],this.InitialGroupBounds=t.InitialGroupBounds||{x:0,y:0,width:0,height:0},this.ImageHeader=t.ImageHeader||null,this.OleHeader=t.OleHeader||null,this.nIcons=t.nIcons||0,this.iconSize=t.iconSize||18,this.iconShapeBottomOffset=t.iconShapeBottomOffset||OptConstant.Common.IconShapeBottomOffset,this.iconShapeRightOffset=t.iconShapeRightOffset||OptConstant.Common.iconShapeRightOffset,this.HyperlinkText=t.HyperlinkText||"",this.AttachmentInfo=t.AttachmentInfo||"",this.ResizeAspectConstrain=t.ResizeAspectConstrain||!1,this.ob={},this.prevBBox=t.prevBBox||{x:0,y:0,width:0,height:0},this.bInGroup=!1,this.LineTextX=t.LineTextX||0,this.LineTextY=t.LineTextX||0,this.actionArrowHideTimerID=-1,this.FramezList=null,this.ParentFrameID=-1,this.uniType=t.uniType||"",this.drawSetting=t.drawSetting||{},this.uniqueId=Utils1.GenerateUUID()}GenericKnob(t){LogUtil.Debug("= S.BaseDrawObject: GenericKnob input:",t);let e=t.svgDoc.CreateShape(t.shapeType);if(t.shapeType===OptConstant.CSType.Polygon){if(t.polyPoints)e.SetPoints(t.polyPoints),t.polyPoints=null;else if("vertical"===t.polyType){const i=[{x:0,y:0},{x:t.knobSize/2,y:-t.knobSize},{x:t.knobSize,y:0},{x:t.knobSize/2,y:t.knobSize}];e.SetPoints(i)}else if("horizontal"===t.polyType){const i=[{x:-t.knobSize/2,y:0},{x:t.knobSize/2,y:-t.knobSize/2},{x:3*t.knobSize/2,y:0},{x:t.knobSize/2,y:t.knobSize/2}];e.SetPoints(i)}else{const i=[{x:0,y:t.knobSize/2},{x:t.knobSize/2,y:0},{x:t.knobSize,y:t.knobSize/2},{x:t.knobSize/2,y:t.knobSize}];e.SetPoints(i)}e.SetEventBehavior(OptConstant.EventBehavior.ALL)}return t.locked?(e.SetFillColor("gray"),e.SetID(0)):(e.SetFillColor(t.fillColor),e.SetID(t.knobID),e.SetCursor(t.cursorType)),e.SetSize(t.knobSize,t.knobSize),e.SetPos(t.x,t.y),e.SetFillOpacity(t.fillOpacity),e.SetStrokeWidth(t.strokeSize),e.SetStrokeColor(t.strokeColor),LogUtil.Debug("= S.BaseDrawObject: GenericKnob output:",e),e}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: CreateActionTriggers input:",{inputElement:t,triggerType:e,additionalInfo:i,options:n});return LogUtil.Debug("= S.BaseDrawObject: CreateActionTriggers output:",null),null}CreateShape(t,e){LogUtil.Debug("= S.BaseDrawObject: CreateShape input:",{shapeType:t,options:e});const i={type:t,options:e||{}};return LogUtil.Debug("= S.BaseDrawObject: CreateShape output:",i),i}MoveSVG(){LogUtil.Debug("= S.BaseDrawObject: MoveSVG input, BlockID:",this.BlockID);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){const e=this.GetSVGFrame();LogUtil.Debug("= S.BaseDrawObject: MoveSVG retrieved frame:",e),t.SetPos(e.x,e.y),LogUtil.Debug(`= S.BaseDrawObject: MoveSVG output, SVG element position set to x: ${e.x}, y: ${e.y}`)}else LogUtil.Debug("= S.BaseDrawObject: MoveSVG output, no SVG element found for BlockID:",this.BlockID)}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: CreateConnectHilites input:",{hiliteElements:t,triggerType:e,additionalInfo:i,options:n,extraParam1:s,extraParam2:a});return LogUtil.Debug("= S.BaseDrawObject: CreateConnectHilites output:",null),null}CreateDimensionAdjustmentKnobs(t,e,i){LogUtil.Debug("= S.BaseDrawObject: CreateDimensionAdjustmentKnobs input:",t,e,i);let n=Utils1.DeepCopy(i);const s=n.knobSize/2;n.knobID=OptConstant.ActionTriggerType.DimLineAdj;let a=T3Gv.opt.svgDoc.docInfo.docToScreenScale;T3Gv.opt.svgDoc.docInfo.docScale<=.5&&(a*=2),n.knobSize=OptConstant.Common.KnobSize/a,n.shapeType=OptConstant.CSType.Polygon,n.fillColor="black",n.fillOpacity=1;let o=this.GetDimensionPoints();const r=o.length;for(let l=1;l<r;l++){let i=this.GetDimensionLineDeflectionKnobUserData(e,l,o,s,n.knobSize/2);if(i){n.x=i.knobPoint.x,n.y=i.knobPoint.y;let e=Utils1.CalcAngleFromPoints(o[l-1],o[l]);if(n.polyPoints=[{x:0,y:n.knobSize/2},{x:n.knobSize/2,y:0},{x:n.knobSize,y:n.knobSize/2},{x:n.knobSize/2,y:n.knobSize}],0!==e){let t={x:0,y:0,width:0,height:0};Utils2.GetPolyRect(t,n.polyPoints),Utils3.RotatePointsAboutCenter(t,-e/(180/NvConstant.Geometry.PI),n.polyPoints)}let s=e;this.RotationAngle&&0!==this.RotationAngle&&(s+=this.RotationAngle,s%=360),n.cursorType=this.CalcCursorForAngle(s,!0);let a=this.GenericKnob(n);a.SetUserData(i),t.AddElement(a)}}LogUtil.Debug("= S.BaseDrawObject: CreateDimensionAdjustmentKnobs output: created knobs for",r-1,"segments")}HitAreaClick(t){LogUtil.Debug("= S.BaseDrawObject: HitAreaClick input:",t),LogUtil.Debug("= S.BaseDrawObject: HitAreaClick output: no action taken")}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: ChangeTarget input:",{currentTarget:t,newTarget:e,action:i,options:n,extra1:s,extra2:a}),LogUtil.Debug("= S.BaseDrawObject: ChangeTarget output: completed")}OnConnect(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: OnConnect input:",{connectionPoint:t,targetObject:e,connectionData:i,options:n,context:s}),LogUtil.Debug("= S.BaseDrawObject: OnConnect output: completed")}OnDisconnect(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: OnDisconnect input:",{connectionPoint:t,targetObject:e,disconnectData:i,options:n}),LogUtil.Debug("= S.BaseDrawObject: OnDisconnect output: completed")}GetDimensionsRect(){LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect input, Dimensions:",this.Dimensions,"Frame:",this.Frame);let t=new Rectangle,e=[];if(!(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect output, dimension flags not set. Result:",t),t;const i=this.GetDimensionPoints();if(i.length<2)return LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect output, not enough dimension points. Result:",t),t;for(let s=1;s<i.length;s++){let t=this.GetDimensionFloatingPointValue(s);t||(t=this.GetDimensionTextForPoints(i[s-1],i[s]));const n=Utils1.CalcAngleFromPoints(i[s-1],i[s]),a=this.GetPointsForDimension(n,t,i[s-1],i[s],s);a&&(e.push(a.left),e.push(a.right),e.push(a.textFrame))}const n=this.GetBoundingBoxesForSecondaryDimensions();e=e.concat(n);for(let s=0;s<e.length;s++)0===t.width&&0===t.height?Utils2.CopyRect(t,e[s]):t=Utils2.UnionRect(t,e[s],t);return t.x+=this.Frame.x,t.y+=this.Frame.y,LogUtil.Debug("= S.BaseDrawObject: GetDimensionsRect output, result:",t),t}GetBoundingBoxesForSecondaryDimensions(){LogUtil.Debug("= S.BaseDrawObject: GetBoundingBoxesForSecondaryDimensions input");const t=[];return LogUtil.Debug("= S.BaseDrawObject: GetBoundingBoxesForSecondaryDimensions output:",t),t}AddDimensionsToR(){LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR input");let t=this.GetDimensionsRect();LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR - dimensionsRect:",t),0!==t.width?(this.r=Utils2.UnionRect(this.r,t,this.r),LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR - updated r:",this.r)):LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR - dimensionsRect.width is 0, no updates made"),LogUtil.Debug("= S.BaseDrawObject: AddDimensionsToR output",this.r)}UpdateFrame(t){LogUtil.Debug("= S.BaseDrawObject: UpdateFrame input:",t),t&&(Utils2.CopyRect(this.Frame,t),Utils2.CopyRect(this.r,t),Utils2.CopyRect(this.inside,t),Utils2.CopyRect(this.trect,t)),LogUtil.Debug("= S.BaseDrawObject: UpdateFrame output:",{Frame:this.Frame,r:this.r,inside:this.inside,trect:this.trect})}SetSize(t,e){LogUtil.Debug("= S.BaseDrawObject: SetSize input:",{width:t,height:e}),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),LogUtil.Debug("= S.BaseDrawObject: SetSize output:",{rflags:this.rflags})}OffsetShape(t,e){LogUtil.Debug("= S.BaseDrawObject: OffsetShape input:",{dx:t,dy:e}),this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.inside.x+=t,this.inside.y+=e,this.trect.x+=t,this.trect.y+=e,LogUtil.Debug("= S.BaseDrawObject: OffsetShape output:",{Frame:this.Frame,r:this.r,inside:this.inside,trect:this.trect})}SetShapeOrigin(t,e,i){LogUtil.Debug("= S.BaseDrawObject: SetShapeOrigin input:",{newX:t,newY:e,origin:i});const n=null!=t?t-this.Frame.x:0,s=null!=e?e-this.Frame.y:0;this.OffsetShape(n,s),LogUtil.Debug("= S.BaseDrawObject: SetShapeOrigin output: new Frame:",this.Frame)}ApplyCurvature(t){LogUtil.Debug("= S.BaseDrawObject: ApplyCurvature input:",t),LogUtil.Debug("= S.BaseDrawObject: ApplyCurvature output: completed")}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("= S.BaseDrawObject: ScaleObject input:",{posOffsetX:t,posOffsetY:e,rotateCenter:i,rotationAngle:n,scaleX:s,scaleY:a,updateContainerStyle:o});let r=this.Frame;if(r.x=t+r.x*s,r.y=e+r.y*a,r.width*=s,r.height*=a,this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),n){const t={x:r.x+r.width/2,y:r.y+r.height/2},e=2*Math.PI*(n/360),s=T3Gv.opt.RotatePointAroundPoint(i,t,e);r.x=s.x-r.width/2,r.y=s.y-r.height/2,this.RotationAngle+=n,this.RotationAngle>=360&&(this.RotationAngle-=360)}if(o){let t=s;a>t&&(t=a),this.StyleRecord.Line.Thickness*=t,this.StyleRecord.Line.BThick*=t}if(this.ContainerList){const t=this.ContainerList;t.HorizontalSpacing*=s,t.VerticalSpacing*=s,t.MinWidth*=s,t.MinHeight*=s,t.childwidth*=s,t.childheight*=s}this.UpdateFrame(r),this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height,LogUtil.Debug("= S.BaseDrawObject: ScaleObject output:",{Frame:this.Frame,RotationAngle:this.RotationAngle,sizedim:this.sizedim})}GetDragR(){let t=new Rectangle;return Utils2.CopyRect(t,this.r),LogUtil.Debug("= S.BaseDrawObject: GetDragR output:",t),t}GetHitTestFrame(){LogUtil.Debug("= S.BaseDrawObject: GetHitTestFrame input");let t=new Rectangle;return Utils2.CopyRect(t,this.r),LogUtil.Debug("= S.BaseDrawObject: GetHitTestFrame output:",t),t}GetSVGFrame(t){LogUtil.Debug("= S.BaseDrawObject: GetSVGFrame - input:",t);const e=new Rectangle;return null==t&&(t=this.Frame),Utils2.CopyRect(e,t),LogUtil.Debug("= S.BaseDrawObject: GetSVGFrame - output:",e),e}LinkGrow(t,e){LogUtil.Debug("= S.BaseDrawObject: LinkGrow input:",{inputElement:t,growthFactor:e}),LogUtil.Debug("= S.BaseDrawObject: LinkGrow output: completed")}GetMoveRect(t){LogUtil.Debug("= S.BaseDrawObject: GetMoveRect input:",{useRelative:t});let e={};return t?(Utils2.CopyRect(e,this.r),Utils2.InflateRect(e,0,0)):Utils2.CopyRect(e,this.Frame),LogUtil.Debug("= S.BaseDrawObject: GetMoveRect output:",e),e}GetPositionRect(){LogUtil.Debug("= S.BaseDrawObject: GetPositionRect input");const t={};return Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseDrawObject: GetPositionRect output:",t),t}AdjustPinRect(t,e){LogUtil.Debug("= S.BaseDrawObject: AdjustPinRect input:",{inputRect:t,adjustment:e});const i=t;return LogUtil.Debug("= S.BaseDrawObject: AdjustPinRect output:",i),i}GetArrayRect(t){LogUtil.Debug("= S.BaseDrawObject: GetArrayRect input:",{useAlternateMapping:t});const e=this.StyleRecord.Line.BThick?2*this.StyleRecord.Line.BThick:this.StyleRecord.Line.Thickness/2;let i=Utils1.DeepCopy(this.Frame);Utils2.InflateRect(i,e,e);const n=new CRect;return t?(n.h=i.y,n.v=i.x,n.hdist=i.height,n.vdist=i.width):(n.h=i.x,n.hdist=i.width,n.v=i.y,n.vdist=i.height),LogUtil.Debug("= S.BaseDrawObject: GetArrayRect output:",n),n}GetTargetRect(t,e){LogUtil.Debug("= S.BaseDrawObject: GetTargetRect input:",{input:t,options:e});const i={x:0,y:0,width:0,height:0};return LogUtil.Debug("= S.BaseDrawObject: GetTargetRect output:",i),i}GetHookFlags(){LogUtil.Debug("= S.BaseDrawObject: GetHookFlags input");return LogUtil.Debug("= S.BaseDrawObject: GetHookFlags output:",0),0}AllowLink(){LogUtil.Debug("= S.BaseDrawObject: AllowLink input: none");return LogUtil.Debug("= S.BaseDrawObject: AllowLink output:",0),0}AllowSpell(){LogUtil.Debug("= S.BaseDrawObject: AllowSpell input, bInGroup:",this.bInGroup,"TextFlags:",this.TextFlags);const t=!this.bInGroup&&0==(this.TextFlags&NvConstant.TextFlags.NoSpell);return LogUtil.Debug("= S.BaseDrawObject: AllowSpell output:",t),t}PreventLink(){LogUtil.Debug("= S.BaseDrawObject: PreventLink input");return LogUtil.Debug("= S.BaseDrawObject: PreventLink output:",false),false}AllowHeal(){LogUtil.Debug("= S.BaseDrawObject: AllowHeal input: none");return LogUtil.Debug("= S.BaseDrawObject: AllowHeal output:",false),false}AllowMaintainLink(){LogUtil.Debug("= S.BaseDrawObject: AllowMaintainLink input, no parameters");return LogUtil.Debug("= S.BaseDrawObject: AllowMaintainLink output:",true),true}GetHookPoints(){LogUtil.Debug("= S.BaseDrawObject: GetHookPoints input");return LogUtil.Debug("= S.BaseDrawObject: GetHookPoints output:",null),null}GetBestHook(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetBestHook - input:",{inputHook:t,targetHook:e,attachmentData:i});const n=e;return LogUtil.Debug("= S.BaseDrawObject: GetBestHook - output:",n),n}SetHookAlign(t,e){LogUtil.Debug("= S.BaseDrawObject: SetHookAlign input:",{hook:t,alignment:e}),LogUtil.Debug("= S.BaseDrawObject: SetHookAlign output: completed")}GetTargetPoints(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetTargetPoints input:",{targetPoint:t,hookFlags:e,extraParam:i});return LogUtil.Debug("= S.BaseDrawObject: GetTargetPoints output:",null),null}AllowHook(t,e,i){LogUtil.Debug("= S.BaseDrawObject: AllowHook input:",{hookData:t,target:e,attachment:i});return LogUtil.Debug("= S.BaseDrawObject: AllowHook output:",true),true}ConnectToHook(t,e){LogUtil.Debug("= S.BaseDrawObject: ConnectToHook input:",{sourceHook:t,targetHook:e});const i=e;return LogUtil.Debug("= S.BaseDrawObject: ConnectToHook output:",i),i}HookToPoint(t,e){LogUtil.Debug("= S.BaseDrawObject: HookToPoint input:",{point:t,target:e});const i={x:0,y:0};return LogUtil.Debug("= S.BaseDrawObject: HookToPoint output:",i),i}IsCoManager(t){LogUtil.Debug("= S.BaseDrawObject: IsCoManager input:",t);return LogUtil.Debug("= S.BaseDrawObject: IsCoManager output:",false),false}LinkNotVisible(){LogUtil.Debug("= S.BaseDrawObject: LinkNotVisible input: no parameters");const t=(this.flags&NvConstant.ObjFlags.NotVisible)>0;return LogUtil.Debug("= S.BaseDrawObject: LinkNotVisible output:",t),t}IsAsstConnector(){LogUtil.Debug("= S.BaseDrawObject: IsAsstConnector input:");return LogUtil.Debug("= S.BaseDrawObject: IsAsstConnector output:",false),false}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: GetPerimPts input:",{unusedId:t,points:e,unusedParam:i,skipRotation:n,optionalParam:s,anotherOptionalParam:a});const o=e.length,r=[],l=PolygonConstant.ShapeTypes.TRIANGLE,h=OptConstant.Common.DimMax;for(let c=0;c<o;c++){r[c]={x:0,y:0,id:0},r[c].x=e[c].x/h*this.Frame.width+this.Frame.x;const t=this.dataclass===l?h-e[c].y:e[c].y;r[c].y=t/h*this.Frame.height+this.Frame.y,null!=e[c].id&&(r[c].id=e[c].id)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,r)}return LogUtil.Debug("= S.BaseDrawObject: GetPerimPts output:",r),r}ChangeHook(t,e,i){LogUtil.Debug("= S.BaseDrawObject: ChangeHook input:",{sourceHook:t,targetHook:e,additionalData:i}),HookUtil.CNChangeHook(this,t,e,i),LogUtil.Debug("= S.BaseDrawObject: ChangeHook output:","Hook change applied")}ChangeShape(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: ChangeShape input:",{e:t,t:e,a:i,r:n,i:s});return LogUtil.Debug("= S.BaseDrawObject: ChangeShape output:",false),false}GetLineChangeFrame(){LogUtil.Debug("= S.BaseDrawObject: GetLineChangeFrame input:",this.Frame);let t=Utils1.DeepCopy(this.Frame);return t.width<OptConstant.Common.SegDefLen&&(t.width=OptConstant.Common.SegDefLen),t.height<OptConstant.Common.SegDefLen&&(t.height=OptConstant.Common.SegDefLen),LogUtil.Debug("= S.BaseDrawObject: GetLineChangeFrame output:",t),t}DeleteObject(){LogUtil.Debug("= S.BaseDrawObject: DeleteObject input:",{TableID:this.TableID,DataID:this.DataID,NoteID:this.NoteID,NativeID:this.NativeID,BlobBytesID:this.BlobBytesID,EMFBlobBytesID:this.EMFBlobBytesID,OleBlobBytesID:this.OleBlobBytesID,commentId:this.commentId});let t=null,e=[];if(-1!==this.DataID&&(t=T3Gv.stdObj.GetObject(this.DataID),t&&t.Delete()),-1!==this.NoteID&&(t=T3Gv.stdObj.GetObject(this.NoteID),t&&t.Delete()),-1!==this.NativeID&&(t=T3Gv.stdObj.GetObject(this.NativeID),t&&t.Delete()),-1!==this.BlobBytesID&&(t=T3Gv.stdObj.GetObject(this.BlobBytesID),t&&t.Delete(),OptCMUtil.IsBlobURL(this.ImageURL)&&OptCMUtil.DeleteURL(this.ImageURL)),-1!==this.EMFBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.EMFBlobBytesID),t&&t.Delete()),-1!==this.OleBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.OleBlobBytesID),t&&t.Delete()),this.RemoveFieldData(!0),this.hooks.length>0){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(t&&t.objecttype===NvConstant.FNObjectTypes.FlWall&&!(t.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)){e=Utils1.DeepCopy(this.hooks),this.hooks=[];const i=T3Gv.opt.svgObjectLayer.GetElementById(t.BlockID);t.UpdateDimensionLines(i),this.hooks=e}}this.commentId>=0&&T3Gv.opt.CommentObjectDelete(this),LogUtil.Debug("= S.BaseDrawObject: DeleteObject output: object deleted")}GetTextIDs(){LogUtil.Debug("= S.BaseDrawObject: GetTextIDs input");const t=[];return LogUtil.Debug("= S.BaseDrawObject: GetTextIDs output:",t),t}GetSegLFace(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetSegLFace input:",{segmentIndex:t,someParam:e,anotherParam:i});return LogUtil.Debug("= S.BaseDrawObject: GetSegLFace output:",0),0}GetSpacing(){LogUtil.Debug("= S.BaseDrawObject: GetSpacing input");const t={width:null,height:null};return LogUtil.Debug("= S.BaseDrawObject: GetSpacing output:",t),t}GetShapeConnectPoint(){LogUtil.Debug("= S.BaseDrawObject: GetShapeConnectPoint input:");const t={x:0,y:0};return LogUtil.Debug("= S.BaseDrawObject: GetShapeConnectPoint output:",t),t}ClosePolygon(t,e,i){LogUtil.Debug("= S.BaseDrawObject: ClosePolygon input:",{e:t,t:e,a:i});return LogUtil.Debug("= S.BaseDrawObject: ClosePolygon output:",false),false}Hit(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: Hit input:",{point:t,param2:e,param3:i,param4:n});const s=Utils2.pointInRect(this.Frame,t)?NvConstant.HitCodes.Border:0;return LogUtil.Debug("= S.BaseDrawObject: Hit output:",s),s}AfterModifyShape(t,e){LogUtil.Debug("= S.BaseDrawObject: AfterModifyShape input:",{shape:t,additionalData:e}),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseDrawObject: AfterModifyShape output: links updated")}AfterRotateShape(t){LogUtil.Debug("= S.BaseDrawObject: AfterRotateShape input:",t),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseDrawObject: AfterRotateShape output: links updated")}PolyGetTargetPointList(t){LogUtil.Debug("= S.BaseDrawObject: PolyGetTargetPointList input:",t);let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null);if(0!==this.RotationAngle){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,e)}return LogUtil.Debug("= S.BaseDrawObject: PolyGetTargetPointList output:",e),e}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: GetPolyPoints input:",{dummy:t,applyAbsoluteOffset:e,unused:i,inflateRect:n,unused2:s});let a=[],o=new Rectangle;const r=this.StyleRecord.Line.Thickness/2;if(Utils2.CopyRect(o,this.Frame),n&&Utils2.InflateRect(o,r,r),a.push(new Point$1(0,0)),a.push(new Point$1(o.width,0)),a.push(new Point$1(o.width,o.height)),a.push(new Point$1(0,o.height)),a.push(new Point$1(0,0)),!e)for(let l=0;l<a.length;l++)a[l].x+=o.x,a[l].y+=o.y;return LogUtil.Debug("= S.BaseDrawObject: GetPolyPoints output:",a),a}RightClick(t){LogUtil.Debug("= S.BaseDrawObject: RightClick input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("= S.BaseDrawObject: Converted window to doc coords:",e);const i=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);return LogUtil.Debug("= S.BaseDrawObject: Found SVG element:",i),SelectUtil.SelectObjectFromClick(t,i)?(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=i.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,LogUtil.Debug("= S.BaseDrawObject: Right click param set to:",T3Gv.opt.rClickParam),T3Gv.docUtil.IsReadOnly()?UIUtil.ShowContextMenu(!0,"DrawObject","ReadOnly"):UIUtil.ShowContextMenu(!0,"DrawObject","Editable"),LogUtil.Debug("= S.BaseDrawObject: RightClick output: Contextual menu shown"),!0):(LogUtil.Debug("= S.BaseDrawObject: RightClick output: Object selection failed"),!1)}AdjustTextEditBackground(t,e){LogUtil.Debug("= s.BaseDrawObject: AdjustTextEditBackground input:",{e:t,t:e})}SetTextContent(t){if(LogUtil.Debug("= S.BaseDrawObject: SetTextContent input:",t),t){const e=new TextObject({runtimeText:t}),i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TextObject,e);if(null===i)throw"error: AddNewObject got a null new text block allocation";this.DataID=i.ID}LogUtil.Debug("= S.BaseDrawObject: SetTextContent output, DataID:",this.DataID)}SetNoteContent(t){if(LogUtil.Debug("= S.BaseDrawObject: SetNoteContent input:",t),t){const e=new TextObject({runtimeText:t}),i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.NotesObject,e);if(null===i)throw T3Util.Error("= s.BaseDrawObject: SetNoteContent error: null new text block allocation"),"error: AddNewObject got a null new text block allocation";this.NoteID=i.ID,LogUtil.Debug("= S.BaseDrawObject: SetNoteContent output: NoteID set to",this.NoteID)}else LogUtil.Debug("= S.BaseDrawObject: SetNoteContent output: no note content provided")}GetArrowheadFormat(){LogUtil.Debug("= S.BaseDrawObject: GetArrowheadFormat input:");return LogUtil.Debug("= S.BaseDrawObject: GetArrowheadFormat output:",null),null}GetTextParaFormat(t){LogUtil.Debug("= S.BaseDrawObject: GetTextParaFormat input:",t);let e={};e.just=this.TextAlign,e.bullet="none",e.spacing=0;const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(this.DataID&&this.DataID>=0){const n=i.textElem;if(n){const i=n.GetVerticalAlignment(),s=n.GetSelectedParagraphStyle();if(s)if(e=new ParagraphFormat,e.bullet=s.bullet,e.spacing=s.spacing,this instanceof Instance.Shape.BaseShape)if(e.vjust=i,t)switch(i){case"bottom":case"top":e.just=i+"-"+s.just;break;default:e.just=s.just}else e.just=s.just;else e.just=this.TextAlign}}return LogUtil.Debug("= S.BaseDrawObject: GetTextParaFormat output:",e),e}GetTextFormat(t,e){let i,n,s,a,o;LogUtil.Debug("= S.BaseDrawObject: GetTextFormat input:",{returnTextFormat:t,textOptions:e});let r=null;const l=TextConstant.TextFace;let h=new TextFmtData,c=new DefaultStyle;const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(h=Utils1.DeepCopy(this.StyleRecord.Text),h.FontId=-1,h.FontName=u.def.lf.fontName,null!==this.DataID&&this.DataID>=0){const u=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(u&&(r=u.textElem),e&&(e.hastext=!0),r){r.GetText();const e=r.GetSelectedFormat();if(e)return t?(h.FontSize=TextUtil.FontSizeToPoints(e.size),h.FontId=-1,h.FontName=e.font,i="bold"===e.weight,h.Face=Utils2.SetFlag(h.Face,l.Bold,i),n="italic"===e.style,h.Face=Utils2.SetFlag(h.Face,l.Italic,n),s="underline"===e.decoration,h.Face=Utils2.SetFlag(h.Face,l.Underline,s),a="super"===e.baseOffset,h.Face=Utils2.SetFlag(h.Face,l.Superscript,a),o="sub"===e.baseOffset,h.Face=Utils2.SetFlag(h.Face,l.Subscript,o),h.Paint.Color=e.color?e.color:"",e.colorTrans&&(h.Paint.Opacity=e.colorTrans),LogUtil.Debug("= S.BaseDrawObject: GetTextFormat output (TxtFmtData):",h),h):(c.font=e.font,c.size=e.size,c.weight=e.weight,c.style=e.style,c.decoration=e.decoration,c.baseOffset=e.baseOffset,c.color=e.color,c.colorTrans=e.colorTrans,LogUtil.Debug("= S.BaseDrawObject: GetTextFormat output (DefaultStyle):",c),c)}}return LogUtil.Debug("= S.BaseDrawObject: GetTextFormat output:",t?h:null),t?h:null}UseTextBlockColor(){LogUtil.Debug("= S.BaseDrawObject: UseTextBlockColor input: none");return LogUtil.Debug("= S.BaseDrawObject: UseTextBlockColor output:",false),false}SetTextObject(t){return LogUtil.Debug("= S.BaseDrawObject: SetTextObject input:",t),this.DataID=t,LogUtil.Debug("= S.BaseDrawObject: SetTextObject output: DataID set to",this.DataID),!0}GetTextObject(t,e){LogUtil.Debug("= S.BaseDrawObject: GetTextObject input:",{input:t,options:e});const i=this.DataID;return LogUtil.Debug("= S.BaseDrawObject: GetTextObject output:",i),i}SetTextFormat(t,e){LogUtil.Debug("= S.BaseDrawObject: SetTextFormat input:",{textFormat:t,options:e}),LogUtil.Debug("= S.BaseDrawObject: SetTextFormat output: completed")}ExtendLines(){LogUtil.Debug("= S.BaseDrawObject: ExtendLines input:"),LogUtil.Debug("= S.BaseDrawObject: ExtendLines output: complete")}ExtendCell(t,e,i){LogUtil.Debug("= S.BaseDrawObject: ExtendCell input:",{inputCell:t,additionalParam:e,anotherParam:i});return LogUtil.Debug("= S.BaseDrawObject: ExtendCell output:",null),null}SetShapeProperties(t){LogUtil.Debug("= S.BaseDrawObject: SetShapeProperties input:",t);let e=!1;switch(t.ClickFlag){case NvConstant.TextFlags.OneClick:0==(this.TextFlags&NvConstant.TextFlags.OneClick)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.OneClick,!0),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.None,!1),e=!0);break;case NvConstant.TextFlags.None:0==(this.TextFlags&NvConstant.TextFlags.None)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.OneClick,!1),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.None,!0),e=!0);break;case 0:(this.TextFlags&NvConstant.TextFlags.None||this.TextFlags&NvConstant.TextFlags.OneClick)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.OneClick,!1),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.None,!1),e=!0)}switch(t.PositionFlag){case NvConstant.TextFlags.AttachA:0==(this.TextFlags&NvConstant.TextFlags.AttachA)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachA,!0),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachB,!1),e=!0);break;case NvConstant.TextFlags.AttachB:0==(this.TextFlags&NvConstant.TextFlags.AttachB)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachB,!0),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachA,!1),e=!0);break;case 0:0==(this.TextFlags&NvConstant.TextFlags.AttachB)&&0==(this.TextFlags&NvConstant.TextFlags.AttachA)||(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachB,!1),this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.AttachA,!1),e=!0)}return!0===t.CRFlag?0==(this.TextFlags&NvConstant.TextFlags.FormCR)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.FormCR,!0),e=!0):!1===t.CRFlag&&0!=(this.TextFlags&NvConstant.TextFlags.FormCR)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.FormCR,!1),e=!0),!1===t.AllowSpell?0==(this.TextFlags&NvConstant.TextFlags.NoSpell)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.NoSpell,!0),e=!0):!0===t.AllowSpell&&0!=(this.TextFlags&NvConstant.TextFlags.NoSpell)&&(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.NoSpell,!1),e=!0),LogUtil.Debug("= S.BaseDrawObject: SetShapeProperties output:",e),e}SetShapeConnectionPoints(t,e,i){LogUtil.Debug("= S.BaseDrawObject: SetShapeConnectionPoints input:",{shape:t,connectionPoint:e,additionalInfo:i});return LogUtil.Debug("= S.BaseDrawObject: SetShapeConnectionPoints output:",false),false}GetClosestConnectPoint(t){LogUtil.Debug("= S.BaseDrawObject: GetClosestConnectPoint input:",t);return LogUtil.Debug("= S.BaseDrawObject: GetClosestConnectPoint output:",false),false}ScaleEndPoints(){LogUtil.Debug("= S.BaseDrawObject: ScaleEndPoints input:",{polylist:this.polylist,startPoint:this.StartPoint,endPoint:this.EndPoint}),this.polylist&&this.StartPoint&&this.EndPoint&&this.PolyLineScaleEndPoints(),LogUtil.Debug("= S.BaseDrawObject: ScaleEndPoints output: completed")}PolyLineScaleEndPoints(){LogUtil.Debug("= S.BaseDrawObject: PolyLineScaleEndPoints input:",{polylist:this.polylist,Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});const t=this.Frame.width/this.polylist.dim.x,e=this.Frame.height/this.polylist.dim.y,i=this.Frame.x+this.Frame.width/2,n=this.Frame.y+this.Frame.height/2;if(1===t&&1===e)return void LogUtil.Debug("= S.BaseDrawObject: PolyLineScaleEndPoints output: no scaling required");let s=i-this.StartPoint.x;this.StartPoint.x=i-s*t;let a=n-this.StartPoint.y;this.StartPoint.y=n-a*e,s=i-this.EndPoint.x,this.EndPoint.x=i-s*t,a=n-this.EndPoint.y,this.EndPoint.y=n-a*e,LogUtil.Debug("= S.BaseDrawObject: PolyLineScaleEndPoints output:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}ChangeLineThickness(t){LogUtil.Debug("= S.BaseDrawObject: ChangeLineThickness input:",t),this.UpdateFrame(null),LogUtil.Debug("= S.BaseDrawObject: ChangeLineThickness output: thickness changed")}ChangeEffect(){LogUtil.Debug("= S.BaseDrawObject: ChangeEffect input: no parameters"),this.UpdateFrame(null),LogUtil.Debug("= S.BaseDrawObject: ChangeEffect output: effect changed")}ChangeTextAttributes(t,e,i,n,s,a,o,r){LogUtil.Debug("= S.BaseDrawObject: ChangeTextAttributes input:",{fillColor:t,strokeColor:e,isBold:i,isItalic:n,paramI:s,paramN:a,paramO:o,paramS:r}),(t||e||i||n||r)&&T3Gv.opt.ChangeObjectTextAttributes(this.BlockID,t,e,s,n,a,o,r),LogUtil.Debug("= S.BaseDrawObject: ChangeTextAttributes output: text attributes changed")}SetObjectStyle(t){LogUtil.Debug("= S.BaseDrawObject: SetObjectStyle input:",t);const e=T3Gv.opt.ApplyColorFilter(t,this,this.StyleRecord,this.colorfilter),i=this.StyleRecord.Line.Thickness;return e.StyleRecord&&e.StyleRecord.Fill&&e.StyleRecord.Fill.Paint&&e.StyleRecord.Fill.Paint.Color&&void 0===e.StyleRecord.Name&&void 0===e.StyleRecord.Fill.Paint.FillType&&(this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Gradient?this.StyleRecord.Fill.Paint.Color.toUpperCase()===e.StyleRecord.Fill.Paint.Color.toUpperCase()&&(e.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid):e.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid),T3Gv.opt.ApplyProperties(e,this),e.StyleRecord&&(e.StyleRecord.Line&&e.StyleRecord.Line.Thickness&&this.ChangeLineThickness(i),e.StyleRecord.OutsideEffect&&this.ChangeEffect()),LogUtil.Debug("= S.BaseDrawObject: SetObjectStyle output:",e),e}GetTextDefault(t){if(t&&($$1.extend(!0,t,new ParagraphFormat),t.bullet="none",t.spacing=0,t.just="center",t.vjust="middle",this.TextAlign)){const e=this.TextAlign.indexOf("-");e>=0?(t.vjust=this.TextAlign.slice(0,e),t.just=this.TextAlign.slice(e+1,this.TextAlign.length)):t.just=this.TextAlign}const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),i=Utils1.DeepCopy(this.StyleRecord.Text);return i.FontId=-1,i.FontName=e.def.lf.fontName,i}GetListOfEnclosedObjects(t){LogUtil.Debug("= S.BaseDrawObject: GetListOfEnclosedObjects input:",t);const e=[];return LogUtil.Debug("= S.BaseDrawObject: GetListOfEnclosedObjects output:",e),e}InterceptMoveOperation(t){LogUtil.Debug("= S.BaseDrawObject: InterceptMoveOperation input:",t);return LogUtil.Debug("= S.BaseDrawObject: InterceptMoveOperation output:",false),false}SetupInterceptMove(t){LogUtil.Debug("= S.BaseDrawObject: SetupInterceptMove input:",t);return LogUtil.Debug("= S.BaseDrawObject: SetupInterceptMove output:",false),false}IsSelected(){LogUtil.Debug("= S.BaseDrawObject: IsSelected input: none");const t=this.BlockID,e=T3Gv.opt.selectObjsBlockId.Data,i=$$1.inArray(t,e)>=0;return LogUtil.Debug("= S.BaseDrawObject: IsSelected output:",i),i}RemoveDimensionLines(t){if(LogUtil.Debug("= S.BaseDrawObject: RemoveDimensionLines input:",t),null!=t){const e=[OptConstant.SVGElementClass.DimLine,OptConstant.SVGElementClass.DimText,OptConstant.SVGElementClass.AreaDimLine,OptConstant.SVGElementClass.DimTextNoEdit];for(let i=0;i<e.length;i++){const n=t.GetElementListWithId(e[i]);for(let e=0;e<n.length;e++)t.RemoveElement(n[e])}}LogUtil.Debug("= S.BaseDrawObject: RemoveDimensionLines output: completed")}RemoveCoordinateLines(t){if(LogUtil.Debug("= S.BaseDrawObject: RemoveCoordinateLines input:",t),null!=t){const e=[OptConstant.SVGElementClass.CoordinateLine];for(let i=0;i<e.length;i++){const n=t.GetElementListWithId(e[i]);for(let e=0;e<n.length;e++)t.RemoveElement(n[e])}}LogUtil.Debug("= S.BaseDrawObject: RemoveCoordinateLines output: completed")}SetDimensionLinesVisibility(t,e){function i(t,e,i){const n=t.GetElementListWithId(e);for(let s=0;s<n.length;s++)n[s].SetVisible(i)}LogUtil.Debug("= S.BaseDrawObject: SetDimensionLinesVisibility input:",{svgDoc:t,isVisible:e});const n=this.Dimensions===NvConstant.DimensionFlags.Always||this.Dimensions===NvConstant.DimensionFlags.Select;t&&n&&(i(t,OptConstant.SVGElementClass.DimLine,e),i(t,OptConstant.SVGElementClass.DimText,e),i(t,OptConstant.SVGElementClass.DimTextNoEdit,e)),LogUtil.Debug("= S.BaseDrawObject: SetDimensionLinesVisibility output: visibility set to",e)}NeedsAddLineThicknessToDimension(t){LogUtil.Debug("= S.BaseDrawObject: NeedsAddLineThicknessToDimension input:",t);return LogUtil.Debug("= S.BaseDrawObject: NeedsAddLineThicknessToDimension output:",false),false}GetLengthInRulerUnits(t,e){LogUtil.Debug("= S.BaseDrawObject: GetLengthInRulerUnits input:",{length:t,offset:e});const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);let n="",s=0,a=0,o=0,r=0,l=0,h="",c=1;const u=Math.pow(10,T3Gv.docUtil.rulerConfig.dp);if(e&&(e*=100,T3Gv.docUtil.rulerConfig.useInches||(e/=OptConstant.Common.MetricConv),t-=e),T3Gv.docUtil.rulerConfig.showpixels)return n=Math.round(t).toString(),LogUtil.Debug("= S.BaseDrawObject: GetLengthInRulerUnits output:",n),n;if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet){let e=this.GetLengthInUnits(t,!0);if(e<0&&(c=-1,e=-e),s=Math.floor(e/12),a=Math.floor(e%12),o=e-(12*s+a),this.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches&&(a+=12*s,s=0),o>0&&(l=this.GetFractionStringGranularity(i),r=Math.round(o/l),r>=1/l&&(r=0,12==++a&&(a=0,s++)),r>0)){for(;r%2==0;)r/=2,l*=2;h=`${r}/${Math.floor(1/l)}`}0!==s&&(n=s*c+"'"),(a>0||0===h.length)&&(n+=`${0!==s?" ":""}${a}`),h.length>0&&(n+=`${0!==s||0!==a?" ":""}${h}`),n+='"'}else if(T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Inches){const e=this.GetLengthInUnits(t);n=(Math.round(e*u)/u).toString()}else{const e=this.GetLengthInUnits(t);T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.M||T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Cm?n=(Math.round(e*u)/u).toString():T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Mm&&(n=Math.round(e).toString())}return LogUtil.Debug("= S.BaseDrawObject: GetLengthInRulerUnits output:",n),n}GetDimensionTextForPoints(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints input:",{startPoint:t,endPoint:e});const i=360-Utils1.CalcAngleFromPoints(t,e),n=2*Math.PI*(i/360),s=[new Point$1(t.x,t.y),new Point$1(e.x,e.y)];Utils3.RotatePointsAboutCenter(this.Frame,-n,s);const a=Math.abs(s[0].x-s[1].x),o=RulerUtil.GetLengthInRulerUnits(a);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints output:",o),o}UpdateDimensionFromTextObj(t){if(LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromTextObj input:",t),t&&t.userData){const{segment:e,hookedObjectInfo:i}=t.userData,n=t.GetText();i?this.UpdateDimensionsFromTextForHookedObject(t,n,i):e&&e.angleChange?this.UpdateLineAngleDimensionFromText(t,n,e):this.UpdateDimensionFromText(t,n,e)}LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromTextObj output: completed")}UpdateDimensionFromText(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromText input:",{textObject:t,text:e,segment:i}),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionFromText output: completed")}MaintainProportions(t,e){LogUtil.Debug("= S.BaseDrawObject: MaintainProportions input:",{width:t,height:e});return LogUtil.Debug("= S.BaseDrawObject: MaintainProportions output:",null),null}CanUseRFlags(){LogUtil.Debug("= S.BaseDrawObject: CanUseRFlags input: none");return LogUtil.Debug("= S.BaseDrawObject: CanUseRFlags output:",true),true}UpdateDimensionsFromTextForHookedObject(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionsFromTextForHookedObject input:",{textObject:t,text:e,hookedObjectInfo:i});const n=i.segment;SvgUtil.ShowSVGSelectionState(this.BlockID,!1);const s=this.GetDimensionLengthFromString(e,n);if(s<=0)return ObjectUtil$1.AddToDirtyList(this.BlockID),void SvgUtil.RenderDirtySVGObjects();const a=ObjectUtil$1.GetObjectPtr(i.hookedObjectID,!0);if(!a)return void LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionsFromTextForHookedObject output: hooked object not found");const o=a.hooks[0].connect,r=this.GetPerimPts(this.BlockID,[o],a.hooks[0].hookpt,!1,-1,a.BlockID),l=new Point$1(i.start.x,i.start.y),h=new Point$1(i.end.x,i.end.y),c=[l,h],u=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(l,h);Utils3.RotatePointsAboutCenter(this.Frame,-u,c);let d=s-Math.abs(c[1].x-c[0].x);1===i.side&&(d=-d);const p=this.GetDimensionPoints();for(let b=0;b<p.length;b++)p[b].x+=this.inside.x,p[b].y+=this.inside.y;const g=[p[n-1],p[n],r[0]];Utils3.RotatePointsAboutCenter(this.Frame,-u,g),d>0&&g[2].x+d-a.Frame.width/2>g[1].x?g[2].x=g[1].x-a.Frame.width/2-5:d<0&&g[2].x+d-a.Frame.width/2<g[0].x?g[2].x=g[0].x+a.Frame.width/2+5:g[2].x+=d,Utils3.RotatePointsAboutCenter(this.Frame,u,g);const f=Utils1.DeepCopy(this.Frame);Utils2.InflateRect(f,3,3);const m=Utils2.pointInRect(f,r[0]),v=this.GetTargetPoints(r[0],NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcHookNoExtra|NvConstant.HookFlags.LcShapeOnLine,null);v&&m?(HookUtil.UpdateHook(a.BlockID,0,this.BlockID,a.hooks[0].hookpt,v[0]),OptCMUtil.SetLinkFlag(a.BlockID,DSConstant.LinkFlags.Move),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),HookUtil.UpdateHook(a.BlockID,0,this.BlockID,a.hooks[0].hookpt,v[0])):setTimeout((()=>{}),250),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionsFromTextForHookedObject output: completed")}UpdateDimensions(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateDimensions input:",{inputElement:t,triggerType:e,additionalInfo:i}),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensions output: completed")}GetDimensions(){LogUtil.Debug("= S.BaseDrawObject: GetDimensions input: none");const t={width:this.Frame.width,height:this.Frame.height};return LogUtil.Debug("= S.BaseDrawObject: GetDimensions output:",t),t}GetDimensionsForDisplay(){LogUtil.Debug("= S.BaseDrawObject: GetDimensionsForDisplay input: none");const t={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};return LogUtil.Debug("= S.BaseDrawObject: GetDimensionsForDisplay output:",t),t}CreateDimension(t,e,i,n,s,a,o,r,l,h,c){let u,d=[],p=[],g=[],f=[],m=[];new Rectangle;let v=new Rectangle,b={left:-1,top:-1,right:-1,bottom:-1},y=this.flags&NvConstant.ObjFlags.Lock,S=this.RotationAngle+n,x={segment:r,hookedObjectInfo:null,textFramePts:[]};if(c&&(x.hookedObjectInfo=c),t){if(u=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),t.AddElement(u),u.SetRenderingEnabled(!1),u.SetText(s),Utils2.HasFlag(this.Dimensions,NvConstant.DimensionFlags.Select)&&u.ExcludeFromExport(!0),u.SetUserData(x),this.LineType!==OptConstant.LineType.LINE&&(i||this.Dimensions&NvConstant.DimensionFlags.Total||this.Dimensions&NvConstant.DimensionFlags.EndPts||this.NoGrow())?u.SetID(OptConstant.SVGElementClass.DimTextNoEdit):(u.SetID(OptConstant.SVGElementClass.DimText),u.SetEditCallback(this.DimensionEditCallback,this)),u.SetFormat(T3Gv.opt.header.DimensionFontStyle),u.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),u.SetRenderingEnabled(!0),i){if(this.GetDimensionAreaTextInfo(u,n,d,p,g,f,m),d.length>0&&(Utils2.GetPolyRect(v,d),v.width>=this.Frame.width))return void t.RemoveElement(u);x.textFramePts=d,this.CreateDimensionLineArrowHead(t,e,p,b),this.CreateDimensionLineArrowHead(t,e,g,b),this.CreateDimensionLineArrowHead(t,e,f,b),this.CreateDimensionLineArrowHead(t,e,m,b)}else{if(this.GetDimensionTextInfo(a,o,n,u,r,d,p,g,h),x.textFramePts=Utils1.DeepCopy(d),l&&Utils2.Sqrt((o.x-a.x)**2+(o.y-a.y)**2)<u.geometryBBox.width)return void t.RemoveElement(u);this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()&&!h?(this.CreateDimensionLineSegment(e,i,p,b),this.CreateDimensionLineSegment(e,i,g,b)):(this.CreateDimensionLineArrowHead(t,e,p,b,x),this.CreateDimensionLineArrowHead(t,e,g,b,x))}S>=360&&(S-=360);let c=[new Point$1(d[0].x,d[0].y)];if(S>=89&&S<270){let t=360-n,e=2*Math.PI*(t/360);Utils3.RotatePointsAboutCenter(this.Frame,-e,d),v={x:0,y:0,width:0,height:0},Utils2.GetPolyRect(v,d);let i={x:v.x+v.width,y:v.y+v.height};c=[new Point$1(i.x,i.y)],Utils3.RotatePointsAboutCenter(this.Frame,e,c),(n+=180)>360&&(n-=360)}u.SetPos(c[0].x,c[0].y);try{u.SetRotation(n,c[0].x,c[0].y)}catch(w){throw w}if(!i&&!y&&!this.NoGrow()){let t=Hammer(u.svgObj.SDGObj.DOMElement());t.on("tap",EvtUtil.Evt_DimensionTextTapFactory(this,x,!1)),t.on("doubletap",EvtUtil.Evt_DimensionTextTapFactory(this,x,!0)),u.SetEventProxy(t)}}}CreateCoordinateLine(t,e,i,n,s,a,o,r,l,h,c){let u,d=[],p=[],g=[],f=[],m=[];new Rectangle;let v=new Rectangle,b={left:-1,top:-1,right:-1,bottom:-1},y=this.flags&NvConstant.ObjFlags.Lock,S=this.RotationAngle+n,x={segment:r,hookedObjectInfo:null,textFramePts:[]};if(c&&(x.hookedObjectInfo=c),!t)return;u=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),t.AddElement(u),u.SetRenderingEnabled(!1),u.SetText(n);Utils2.HasFlag(this.Dimensions,NvConstant.DimensionFlags.Select)&&u.ExcludeFromExport(!0),u.SetUserData(x);const w=this.LineType!==OptConstant.LineType.LINE,C=this.Dimensions&NvConstant.DimensionFlags.Total||this.Dimensions&NvConstant.DimensionFlags.EndPts;if(w&&(i||C||this.NoGrow())?u.SetID(OptConstant.SVGElementClass.DimTextNoEdit):(u.SetID(OptConstant.SVGElementClass.DimText),u.SetEditCallback(this.DimensionEditCallback,this)),u.SetFormat(T3Gv.opt.header.DimensionFontStyle),u.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),u.SetRenderingEnabled(!0),i){if(this.GetDimensionAreaTextInfo(u,n,d,p,g,f,m),d.length>0&&(Utils2.GetPolyRect(v,d),v.width>=this.Frame.width))return void t.RemoveElement(u);x.textFramePts=d,this.CreateDimensionLineArrowHead(t,e,p,b),this.CreateDimensionLineArrowHead(t,e,g,b),this.CreateDimensionLineArrowHead(t,e,f,b),this.CreateDimensionLineArrowHead(t,e,m,b)}else{this.GetCoordinateTextInfo(a,o,n,u,r,d,p,g,h),x.textFramePts=Utils1.DeepCopy(d);const s=Utils2.Sqrt((o.x-a.x)**2+(o.y-a.y)**2)<u.geometryBBox.width;if(l&&s)return void t.RemoveElement(u);this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()&&!h?(LogUtil.Debug("=== wall CreateCoordinateLine.leftArrowPoints=",p),LogUtil.Debug("=== wall CreateCoordinateLine.rightArrowPoints=",g),this.CreateCoordinateLineSegment(e,i,p,b),this.CreateCoordinateLineSegment(e,i,g,b)):(this.CreateDimensionLineArrowHead(t,e,p,b,x),this.CreateDimensionLineArrowHead(t,e,g,b,x))}S>=360&&(S-=360);let T=[new Point$1(d[0].x,d[0].y)];if(S>=89&&S<270){let t=360-n,e=2*Math.PI*(t/360);Utils3.RotatePointsAboutCenter(this.Frame,-e,d),v={x:0,y:0,width:0,height:0},Utils2.GetPolyRect(v,d);let i={x:v.x+v.width,y:v.y+v.height};T=[new Point$1(i.x,i.y)],Utils3.RotatePointsAboutCenter(this.Frame,e,T),(n+=180)>360&&(n-=360)}u.SetPos(T[0].x,T[0].y);try{u.SetRotation(n,T[0].x,T[0].y)}catch(D){throw D}if(!i&&!y&&!this.NoGrow()){let t=Hammer(u.svgObj.SDGObj.DOMElement());t.on("tap",EvtUtil.Evt_DimensionTextTapFactory(this,x,!1)),t.on("doubletap",EvtUtil.Evt_DimensionTextTapFactory(this,x,!0)),u.SetEventProxy(t)}}DrawDimensionAngle(t,e,i,n){let s,a,o;LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngle input:",{container:t,pathCreator:e,segmentIndex:i,dimensionPoints:n});const r={angleChange:1,segment:i};if(s=this.GetDimensionAngleInfo(i,n),s){if(t.AddElement(s.text),s.text.SetRenderingEnabled(!1),s.text.SetUserData(r),s.text.SetID(OptConstant.SVGElementClass.DimText),s.text.SetEditCallback(this.DimensionEditCallback,this),s.text.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),s.text.SetRenderingEnabled(!0),s.text.SetPos(s.textRect.x,s.textRect.y),0!==this.RotationAngle&&s.text.SetRotation(-this.RotationAngle),o=Utils2.GetDistanceBetween2Points(s.baseLinePts[1],s.targetLinePts[1]),a=s.text.GetTextMinDimensions(),o>a.width){const t=s.text.svgObj.SDGObj.DOMElement(),e=Hammer(t);e.on("tap",EvtUtil.Evt_DimensionTextTapFactory(this,r,!1)),e.on("doubletap",EvtUtil.Evt_DimensionTextTapFactory(this,r,!0)),s.text.SetEventProxy(e)}else t.RemoveElement(s.text);o>a.width+2*OptConstant.LineAngleDimensionDefs.ArrowHeadSize&&(Utils2.InflateRect(s.textRect,2,2),this.DrawDimensionAngleArc(t,e,s.targetLinePts[0],s.targetLinePts[1],s.textRect,s.baseLinePts[1]),this.DrawDimensionAngleArc(t,e,s.targetLinePts[0],s.targetLinePts[1],s.textRect,s.targetLinePts[1])),this.Dimensions&NvConstant.DimensionFlags.InteriorAngles||(e.MoveTo(s.baseLinePts[0].x,s.baseLinePts[0].y),e.LineTo(s.baseLinePts[1].x,s.baseLinePts[1].y))}LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngle output: completed")}UpdateLineAngleDimensionFromText(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateLineAngleDimensionFromText input:",{textObject:t,text:e,segment:i});let n=parseFloat(e);isNaN(n)||n<-360||n>360?this.UpdateDimensionLines(t):(n<0&&(n+=360),this.SetSegmentAngle(t,i.segment,n)),LogUtil.Debug("= S.BaseDrawObject: UpdateLineAngleDimensionFromText output: completed")}SetSegmentAngle(t,e,i){LogUtil.Debug("= S.BaseDrawObject: SetSegmentAngle input:",{segment:t,angle:e,additionalData:i}),LogUtil.Debug("= S.BaseDrawObject: SetSegmentAngle output: completed")}DrawDimensionAngleArrowhead(t,e,i){LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArrowhead input:",{container:t,angle:e,point:i});const n=[],s=new Rectangle;n.push(new Point$1(i.x,i.y)),n.push(new Point$1(i.x-OptConstant.LineAngleDimensionDefs.ArrowHeadSize,i.y+OptConstant.LineAngleDimensionDefs.ArrowHeadWidth)),n.push(new Point$1(i.x-OptConstant.LineAngleDimensionDefs.ArrowHeadSize,i.y-OptConstant.LineAngleDimensionDefs.ArrowHeadWidth)),Utils3.RotatePointsAboutPoint(i,e,n),Utils2.GetPolyRect(s,n);const a=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polygon);a.SetPoints(n),a.SetEventBehavior(OptConstant.EventBehavior.All),a.SetID(OptConstant.SVGElementClass.DimLine),a.SetPos(0,0),a.SetSize(s.width,s.height),a.SetFillColor(OptConstant.Common.DimLineColor),t.AddElement(a),LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArrowhead output: arrowhead drawn")}GetPerpendicularAngle(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetPerpendicularAngle input:",{point1:t,point2:e,isClockwise:i});let n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(t,e);return n+=i?Math.PI/2:-Math.PI/2,n<0&&(n+=2*Math.PI),n>2*Math.PI&&(n-=2*Math.PI),LogUtil.Debug("= S.BaseDrawObject: GetPerpendicularAngle output:",n),n}DrawDimensionAngleArc(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArc input:",{container:t,pathCreator:e,startPoint:i,endPoint:n,textRect:s,centerPoint:a});let o=Utils2.GetDistanceBetween2Points(i,n),r={x:s.x+s.width/2,y:s.y+s.height/2},l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i,r),h=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i,a);l>Math.PI&&0===h&&(h=2*Math.PI),h-=l,h<0&&(h+=2*Math.PI);let c=h<=Math.PI,u=this.GetPerpendicularAngle(i,a,c),d=Utils3.RotatePointsAboutPoint(i,-u,a),p=this.StyleRecord.Line.Thickness/2;d.x-=p,d=Utils3.RotatePointsAboutPoint(i,u,d);let g=c?d:r,f=c?r:d,m=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i,g),v=PolyUtil.ArcToPoly(OptConstant.Common.MaxPolyPoints,i,o,g.y,f.y,i.x,!1);v=Utils3.RotatePointsAboutPoint(i,-(Math.PI/2-m),v);for(let S=1;S<v.length;S++)e.MoveTo(v[S-1].x,v[S-1].y),e.LineTo(v[S].x,v[S].y);let b=c?v[0]:v[v.length-1];for(let S=0;S<v.length;S++){let t=c?S:v.length-1-S;if(Utils2.GetDistanceBetween2Points(b,v[t])>OptConstant.LineAngleDimensionDefs.ArrowHeadSize){b=v[t];break}}let y=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(b,v[0]);this.DrawDimensionAngleArrowhead(t,y,v[0]),LogUtil.Debug("= S.BaseDrawObject: DrawDimensionAngleArc output: completed")}GetDimensionAngleInfo(t,e){let i,n,s,a,o;LogUtil.Debug("= S.BaseDrawObject: GetDimensionAngleInfo input:",{segmentIndex:t,points:e});let r="",l=null,h=new Rectangle(0,0,0,0),c=[],u=[],d=[],p=0,g=0,f=0;u.push(new Point$1(e[t-1].x,e[t-1].y)),u.push(new Point$1(e[t].x,e[t].y));const m=this.polylist?this.polylist.closed:e.length>2&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;if(this.Dimensions&NvConstant.DimensionFlags.InteriorAngles&&1===t&&!m)return null;if(this.polylist&&t>=1&&t<this.polylist.segs.length){const e=t>1?t-1:this.polylist.segs.length-1;if(this.polylist.segs[t].LineType!==OptConstant.LineType.LINE||this.polylist.segs[e].LineType!==OptConstant.LineType.LINE)return null}for(c.push(new Point$1(u[0].x,u[0].y)),this.Dimensions&NvConstant.DimensionFlags.InteriorAngles?1===t?c.push(new Point$1(e[e.length-2].x,e[e.length-2].y)):c.push(new Point$1(e[t-2].x,e[t-2].y)):(p=Utils2.GetDistanceBetween2Points(u[0],u[1]),c.push(new Point$1(c[0].x+p,c[0].y))),i=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(u[0],u[1]),n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(c[0],c[1]),i-=n,i<0&&(i+=2*Math.PI),g=i/2,i>Math.PI&&(i=2*Math.PI-i,g+=Math.PI,g>=2*Math.PI&&(g-=2*Math.PI)),i+=n,i>=2*Math.PI&&(i-=2*Math.PI),g+=n,g>=2*Math.PI&&(g-=2*Math.PI),d.push(new Point$1(u[0].x,u[0].y)),d.push(new Point$1(u[1].x,u[1].y)),Utils3.RotatePointsAboutPoint(u[0],-i,d),s=Math.min(Utils2.GetDistanceBetween2Points(u[0],u[1]),Utils2.GetDistanceBetween2Points(c[0],c[1])),a=OptConstant.LineAngleDimensionDefs.PreferredBisectorLen<s?OptConstant.LineAngleDimensionDefs.PreferredBisectorLen:s,d[1].x=d[0].x+a,Utils3.RotatePointsAboutPoint(u[0],g,d),f=Math.abs(i/(2*Math.PI)*360),f=Math.round(f),r=f.toString()+"°",l=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),l.SetFormat(T3Gv.opt.header.DimensionFontStyle),l.SetText(r),o=l.GetTextMinDimensions();a<s&&Math.tan(i/2)*a<o.width/2+OptConstant.LineAngleDimensionDefs.PreferredArrowStemMin+OptConstant.LineAngleDimensionDefs.ArrowHeadSize;)a+=OptConstant.LineAngleDimensionDefs.PreferredBisectorLen,a>=s&&(a=s);T3Gv.opt.SetLineLength(u[0],u[1],a),T3Gv.opt.SetLineLength(c[0],c[1],a),T3Gv.opt.SetLineLength(d[0],d[1],a),h=Utils2.SetRect(0,0,o.width,o.height),Utils2.OffsetRect(h,d[1].x,d[1].y),Utils2.OffsetRect(h,-o.width/2,-o.height/2);const v={text:l,textRect:h,baseLinePts:c,targetLinePts:u};return LogUtil.Debug("= S.BaseDrawObject: GetDimensionAngleInfo output:",v),v}GetPointsForDimension(t,e,i,n,s,a){let o;LogUtil.Debug("= S.BaseDrawObject: GetPointsForDimension input:",{angle:t,text:e,startPoint:i,endPoint:n,segmentIndex:s,isStandoff:a});const r=[],l=[],h=[],c=new Rectangle,u=new Rectangle,d=new Rectangle;o=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Text),o.SetText(e),o.SetFormat(T3Gv.opt.header.DimensionFontStyle),o.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),this.GetDimensionTextInfo(i,n,t,o,s,h,r,l,a),o=null,Utils2.GetPolyRect(c,r),Utils2.GetPolyRect(u,l),Utils2.GetPolyRect(d,h);const p={left:c,textFrame:d,right:u};return LogUtil.Debug("= S.BaseDrawObject: GetPointsForDimension output:",p),p}GetAreaDimension(t){let e;return LogUtil.Debug("= S.BaseDrawObject: GetAreaDimension input:",t),this.Dimensions&NvConstant.DimensionFlags.Area?e=this.GetAreaDimensionText(t):this.Dimensions&NvConstant.DimensionFlags.RectWithAndHeight&&(e=this.GetAreaWidthAndHeightText(t)),LogUtil.Debug("= S.BaseDrawObject: GetAreaDimension output:",e),e}GetAreaDimensionText(t){LogUtil.Debug("= S.BaseDrawObject: GetAreaDimensionText input:",t);let e=0,i="";e=t?this.CalculatePolygonArea(t):this.Frame.width*this.Frame.height;const n=T3Gv.docUtil.rulerConfig.showpixels?e:this.GetLengthInUnits(e);return i=RulerUtil.GetLengthInRulerUnits(n),LogUtil.Debug("= S.BaseDrawObject: GetAreaDimensionText output:",i),i}CalculatePolygonArea(t){let e=0,i=t.length-1;for(let n=0;n<t.length;n++)e+=(t[i].x+t[n].x)*(t[i].y-t[n].y),i=n;return Math.abs(e/2)}GetAreaWidthAndHeightText(t){LogUtil.Debug("= S.BaseDrawObject: GetAreaWidthAndHeightText input:",t);return LogUtil.Debug("= S.BaseDrawObject: GetAreaWidthAndHeightText output:",null),null}GetDimensionPoints(){LogUtil.Debug("= S.BaseDrawObject: GetDimensionPoints input");let t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);if(this.RotationAngle){const e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t)}return LogUtil.Debug("= S.BaseDrawObject: GetDimensionPoints output:",t),t}GetCoordinateLinePoints(){LogUtil.Debug("= S.BaseDrawObject: GetCoordinateLinePoints input");let t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);if(this.RotationAngle){const e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t)}return LogUtil.Debug("= S.BaseDrawObject: GetCoordinateLinePoints output:",t),t}GetHookedObjectDescList(t,e){LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDescList input:",{dimensionPoints:t,context:e});let i=[],n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),s=new Rectangle(0,0,0,0),a=[],o=null,r={x:0,y:0},l=0;if(n){let t=OptCMUtil.FindLink(n,this.BlockID,!0),e=n.length;for(;t>=0&&t<e&&n[t].targetid===this.BlockID;){if(o=ObjectUtil$1.GetObjectPtr(n[t].hookid,!1),o)for(let e=0;e<o.hooks.length;e++)if(o.hooks[e].objid===this.BlockID){a.push(n[t].hookid);break}t++}}if(e&&e.linkParams){if(e.linkParams.ConnectIndex!==this.BlockID&&(e.linkParams.PrevConnect===this.BlockID||e.linkParams.ConnectIndexHistory.indexOf(this.BlockID)>=0)){let t=a.indexOf(e.movingShapeID);t>=0&&a.splice(t,1)}e.linkParams.ConnectIndex===this.BlockID&&a.indexOf(e.movingShapeID)<0&&a.push(e.movingShapeID)}for(let h=0;h<a.length;h++)if(o=ObjectUtil$1.GetObjectPtr(a[h],!1),o instanceof Instance.Shape.BaseShape&&!(e&&e.linkParams&&e.movingShapeID===o.BlockID&&e.linkParams.ConnectIndex<0&&e.linkParams.PrevConnect===this.BlockID)){if(e&&e.linkParams&&e.movingShapeID===o.BlockID)r=e.linkParams.ConnectPt;else{if(!(o.hooks.length>0))continue;r=o.hooks[0].connect}let n=this.GetPerimPts(this.BlockID,[r]),a=this.Hit(n[0],!0,!1,{});if(!a){if(!(this instanceof Instance.Shape.BaseLine)||this instanceof Instance.Shape.PolyLine)continue;if(Utils2.IsEqual(n[0].x,this.StartPoint.x,2)&&Utils2.IsEqual(n[0].y,this.StartPoint.y,2))a.segment=0;else{if(!Utils2.IsEqual(n[0].x,this.EndPoint.x,2)||!Utils2.IsEqual(n[0].y,this.EndPoint.y,2))continue;a.segment=t.length>2?t.length-2:0}}let h=a.segment+1;if(h-1>=t.length)continue;let c=[new Point$1(t[h-1].x,t[h-1].y),new Point$1(t[h].x,t[h].y)],u=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(c[0],c[1]);Utils3.RotatePointsAboutCenter(s,-u,c);let d=e&&e.movingShapeID===o.BlockID?Utils2.PolyFromRect(e.movingShapeBBox):o.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),p=e&&e.movingShapeID===o.BlockID?u:-o.RotationAngle/(180/NvConstant.Geometry.PI),g=Utils2.GetPolyRect({},d),f=Utils1.DeepCopy(n[0]);Utils3.RotatePointsAboutCenter(g,p,[f]),Utils2.OffsetRect(g,n[0].x-f.x,n[0].y-f.y),d=Utils2.PolyFromRect(g),p&&Utils3.RotatePointsAboutPoint(n[0],-p,d);for(let t=0;t<d.length;t++)d[t].x-=this.Frame.x,d[t].y-=this.Frame.y;Utils3.RotatePointsAboutCenter(s,-u,d);let m=Utils2.GetPolyRect({},d),v=new Point$1(m.x,c[0].y),b=new Point$1(m.x+m.width,c[0].y);l=v.x,Utils3.RotatePointsAboutCenter(s,u,[v,b]),i.push({id:o.BlockID,segment:h,segmentSortValue:l,start:{x:v.x,y:v.y},end:{x:b.x,y:b.y}})}return i.sort(((t,e)=>t.segment!==e.segment?t.segment<e.segment?-1:1:t.segmentSortValue<e.segmentSortValue?-1:1)),LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDescList output:",i),i}GetHookedObjectDimensionInfo(t){LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDimensionInfo input:",t);let e=-1,i=new Point$1(0,0);const n=[],s=this.GetDimensionPoints(),a=this.GetHookedObjectDescList(s,t),o=a.length;for(let r=0;r<o;r++){const t=a[r];t.segment>e?(i=s[(e=t.segment)-1],n.push({hookedObjID:t.id,side:0,segment:e,start:{x:i.x,y:i.y},end:{x:t.start.x,y:t.start.y}})):n.length>0&&(n[n.length-1].end=t.start),n.push({hookedObjID:t.id,side:1,segment:e,start:{x:t.end.x,y:t.end.y},end:{x:s[e].x,y:s[e].y}}),i=t.end}return LogUtil.Debug("= S.BaseDrawObject: GetHookedObjectDimensionInfo output:",n),n}DimensionLineDeflectionAdjust(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: DimensionLineDeflectionAdjust input:",{element:t,segmentIndex:e,knobPoint:i,ccAngleRadians:n,adjustForKnob:s});let a=this.GetDimensionPoints(),o=this.GetDimensionDeflectionValue(e),r=new Point$1(i.x+this.Frame.x-s,i.y+this.Frame.y-s),l=[a[e-1],a[e],r,new Point$1(t.x,t.y)];Utils3.RotatePointsAboutCenter(this.Frame,-n,l),this.IsReverseWinding()&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,l);let h=l[3].y-l[2].y;return this.polylist&&this.polylist.segs[e].dimTextAltPositioning?o-=h:o+=h,LogUtil.Debug("= S.BaseDrawObject: DimensionLineDeflectionAdjust output:",o),o}GetDimensionLineDeflectionKnobUserData(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflectionKnobUserData input:",{element:t,segmentIndex:e,dimensionPoints:i,knobRadius:n,knobOffset:s});let a,o,r,l,h=null,c=!1;const u=[],d=t.GetElementListWithId(OptConstant.SVGElementClass.DimText);for(let b=0;b<d.length;b++)if(d[b].userData.segment===e&&void 0===d[b].userData.side){h=d[b];break}if(!h)return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflectionKnobUserData output: null"),null;a=h.CalcBBox();const p={x:a.x+a.width+25,y:a.y+a.height/2};if(o=360-h.GetRotation(),360===o&&(o=0),r=2*Math.PI*(o/360),Utils3.RotatePointsAboutPoint({x:a.x,y:a.y},r,[p]),u.push(new Point$1(i[e-1].x,i[e-1].y)),u.push(new Point$1(i[e].x,i[e].y)),u[0].x,u[1].x,u[0].y,u[1].y,l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(i[e-1],i[e]),this instanceof Instance.Shape.Polygon&&this.polylist){const t=Utils1.DeepCopy(this),e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t);e&&e.IsReverseWinding&&e.IsReverseWinding()&&(c=!0)}this.IsReverseWinding&&this.IsReverseWinding()&&(c=!0),c&&(l+=Math.PI,l%=2*Math.PI),u.push(new Point$1(p.x,p.y));const g=new Rectangle(0,0,0,0);Utils2.GetPolyRect(g,u),Utils3.RotatePointsAboutCenter(g,-l,u),u[2].y,u[0].y;const f=Math.max(u[0].x,u[1].x),m=Math.min(u[0].x,u[1].x);(u[2].x>f||u[2].x<m)&&(u[2].x=Math.abs(l-r)<2?f:m,Utils3.RotatePointsAboutCenter(g,l,u),p.x=u[2].x,p.y=u[2].y),p.x+=n-s,p.y+=n-s;const v={segmentIndex:e,knobPoint:p,ccAngleRadians:l,originalDeflection:this.GetDimensionDeflectionValue(e),adjustForKnob:n-s};return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflectionKnobUserData output:",v),v}GetDimensionDeflectionValue(t){LogUtil.Debug("= S.BaseDrawObject: GetDimensionDeflectionValue input:",t);let e=0;return e=1===t?this.dimensionDeflectionH?this.dimensionDeflectionH:0:this.dimensionDeflectionV?this.dimensionDeflectionV:0,LogUtil.Debug("= S.BaseDrawObject: GetDimensionDeflectionValue output:",e),e}GetDimensionLineDeflection(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflection input:",{knobPoint:t,x:e,y:i,deflectionData:n});let s=[],a=new Point$1(0,0),o=this.GetDimensionPoints();for(let h=0;h<o.length;h++)o[h].x+=this.inside.x,o[h].y+=this.inside.y;a.x=n.knobPoint.x+this.Frame.x-n.adjustForKnob,a.y=n.knobPoint.y+this.Frame.y-n.adjustForKnob,s.push(o[n.segmentIndex-1]),s.push(o[n.segmentIndex]),s.push(new Point$1(a.x,a.y)),s.push(new Point$1(e,i)),Utils3.RotatePointsAboutCenter(this.Frame,-n.ccAngleRadians,s),this.IsReverseWinding()&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,s);let r=s[3].y-s[2].y,l=this.polylist&&this.polylist.segs[n.segmentIndex].dimTextAltPositioning?n.originalDeflection-r:n.originalDeflection+r;return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLineDeflection output:",l),l}UpdateDimensionLines(t,e){if(LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionLines input:",{container:t,triggerType:e}),T3Gv.opt.bBuildingSymbols)return t;if(null!=t){this.RemoveDimensionLines(t);(this.Dimensions&NvConstant.DimensionFlags.Area||this.Dimensions&NvConstant.DimensionFlags.RectWithAndHeight)&&this.UpdateAreaDimensionLines(t);return(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select||e)&&this.UpdateEdgeDimensionLines(t,e),LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionLines output:",t),t}return LogUtil.Debug("= S.BaseDrawObject: UpdateDimensionLines output: null"),null}UpdateCoordinateLines(t,e){if(LogUtil.Debug("= S.BaseDrawObject: UpdateCoordinateLines input:",{container:t,triggerType:e}),T3Gv.opt.bBuildingSymbols)return t;if(null!=t){this.RemoveCoordinateLines(t);return(this.Dimensions&NvConstant.DimensionFlags.Area||this.Dimensions&NvConstant.DimensionFlags.RectWithAndHeight)&&this.UpdateAreaDimensionLines(t),this.Dimensions&NvConstant.DimensionFlags.Always||(this.Dimensions,NvConstant.DimensionFlags.Select),LogUtil.Debug("= S.BaseDrawObject: UpdateCoordinateLines output:",t),t}return LogUtil.Debug("= S.BaseDrawObject: UpdateCoordinateLines output: null"),null}UpdateHookedObjectDimensionLines(t,e,i){if(LogUtil.Debug("= S.BaseDrawObject: UpdateHookedObjectDimensionLines input:",{container:t,pathCreator:e,dimensionInfo:i}),this.Dimensions&NvConstant.DimensionFlags.AllSeg){const n=this.GetHookedObjectDimensionInfo(i);for(let i=0;i<n.length;i++)if(!Utils2.EqualPt(n[i].start,n[i].end)){const s=Utils1.CalcAngleFromPoints(n[i].start,n[i].end),a=this.GetDimensionTextForPoints(n[i].start,n[i].end);this.CreateDimension(t,e,!1,s,a,n[i].start,n[i].end,n[i].segment,!0,!0,n[i])}}LogUtil.Debug("= S.BaseDrawObject: UpdateHookedObjectDimensionLines output: completed")}UpdateEdgeDimensionLines(t,e){let i,n,s,a,o;LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeDimensionLines input:",{container:t,triggerType:e});let r=0,l=0,h="";if(!t)return void LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeDimensionLines output: container is null");i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Path),t.AddElement(i),n=i.PathCreator(),i.SetID(OptConstant.SVGElementClass.DimLine),i.SetFillColor("none"),i.SetStrokeColor(OptConstant.Common.DimLineColor),i.SetStrokeOpacity(1),i.SetStrokeWidth(1),n.BeginPath();const c=this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select;if(s=this.GetDimensionPoints(),a=s.length,o=this instanceof Instance.Shape.Polygon,c)for(l=1;l<a;l++)Utils2.EqualPt(s[l-1],s[l])||(r=Utils1.CalcAngleFromPoints(s[l-1],s[l]),h=this.GetDimensionFloatingPointValue(l)||this.GetDimensionTextForPoints(s[l-1],s[l]),this.CreateDimension(t,n,!1,r,h,s[l-1],s[l],l,!1,o));this.UpdateSecondaryDimensions(t,n,e),this.ShowOrHideDimensions(!1,e),n.Apply(),LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeDimensionLines output: completed")}UpdateEdgeCoordinateLines(t,e){let i,n,s;LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeCoordinateLines input:",{shapeContainer:t,triggerType:e}),t?(i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Path),t.AddElement(i),n=i.PathCreator(),i.SetID(OptConstant.SVGElementClass.CoordinateLine),i.SetFillColor("none"),i.SetStrokeColor(OptConstant.Common.CoordinateLineColor),i.SetStrokeOpacity(1),i.SetStrokeWidth(1),i.SetStrokePattern("5,5"),n.BeginPath(),s=this.GetCoordinateLinePoints(),LogUtil.Debug("= S.BaseDrawObject: coordinateLinePoints:",s),s.length,Instance.Shape.Polygon,this.UpdateSecondaryDimensions(t,n,e),this.ShowOrHideDimensions(!1,e),n.Apply(),LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeCoordinateLines output: completed")):LogUtil.Debug("= S.BaseDrawObject: UpdateEdgeCoordinateLines output: shapeContainer is null")}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("= S.BaseDrawObject: UpdateSecondaryDimensions input:",{container:t,pathCreator:e,triggerType:i}),LogUtil.Debug("= S.BaseDrawObject: UpdateSecondaryDimensions output: completed")}HideOrShowSelectOnlyDimensions(t,e){let i;LogUtil.Debug("= S.BaseDrawObject: HideOrShowSelectOnlyDimensions input:",{show:t,context:e});let n=0,s=null,a=null,o=!1,r=!1;const l=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(null!==l){const h=[OptConstant.SVGElementClass.DimLine,OptConstant.SVGElementClass.DimText,OptConstant.SVGElementClass.AreaDimLine,OptConstant.SVGElementClass.DimTextNoEdit];for(n=l.ElementCount()-1;n>=1;n--)s=l.GetElementByIndex(n),i=s.GetID(),h.indexOf(i)>=0&&(o=!1,e&&(a=s.GetUserData())&&a.hookedObjectInfo&&a.hookedObjectInfo.hookedObjID===e.movingShapeID&&(o=!0),r=t,r=!!o||!!(this.Dimensions&NvConstant.DimensionFlags.Always)||!!(this.Dimensions&NvConstant.DimensionFlags.Select)&&t,s.SetOpacity(r?1:0))}LogUtil.Debug("= S.BaseDrawObject: HideOrShowSelectOnlyDimensions output: completed")}ShowOrHideDimensions(t,e){LogUtil.Debug("= S.BaseDrawObject: ShowOrHideDimensions input:",{show:t,context:e});let i=null;this.HideOrShowSelectOnlyDimensions(t,e),this.hooks.length>0&&e&&e.movingShapeID===this.BlockID&&(i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),(!i||i.objecttype!==NvConstant.FNObjectTypes.FlWall||i.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)&&i.HideOrShowSelectOnlyDimensions(t,e)),LogUtil.Debug("= S.BaseDrawObject: ShowOrHideDimensions output: completed")}GetPointsForAreaDimension(){LogUtil.Debug("= S.BaseDrawObject: GetPointsForAreaDimension input: none");const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);return LogUtil.Debug("= S.BaseDrawObject: GetPointsForAreaDimension output:",t),t}UpdateAreaDimensionLines(t){LogUtil.Debug("= S.BaseDrawObject: UpdateAreaDimensionLines input:",t);const e=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Path);if(null!=t){t.AddElement(e);const i=e.PathCreator();e.SetID(OptConstant.SVGElementClass.AreaDimLine),e.SetFillColor("none"),e.SetStrokeColor(OptConstant.Common.DimLineColor),e.SetStrokeOpacity(1),e.SetStrokeWidth(1),i.BeginPath();const n=this.GetPointsForAreaDimension(),s=this.GetAreaDimension(n);s&&""!==s&&this.CreateDimension(t,i,!0,0,s),e.SetFillColor("#0000FF"),e.SetStrokeWidth(0),i.Apply()}LogUtil.Debug("= S.BaseDrawObject: UpdateAreaDimensionLines output: completed")}GetDimensionFloatingPointValue(t){LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue input:",t);let e=0;const i=this.rflags&NvConstant.FloatingPointDim.Width,n=this.rflags&NvConstant.FloatingPointDim.Height;if(i||n){if(1===t&&i){e=this.GetDimensionLengthFromValue(this.rwd);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue output:",t),t}if(2===t&&n){e=this.GetDimensionLengthFromValue(this.rht);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue output:",t),t}}return LogUtil.Debug("= S.BaseDrawObject: GetDimensionFloatingPointValue output: null"),null}IsTextFrameOverlap(t,e){LogUtil.Debug("= S.BaseDrawObject: IsTextFrameOverlap input:",{textFrame:t,angle:e});return LogUtil.Debug("= S.BaseDrawObject: IsTextFrameOverlap output:",false),false}GetExteriorDimensionMeasurementLineThicknessAdjustment(t){LogUtil.Debug("= S.BaseDrawObject: GetExteriorDimensionMeasurementLineThicknessAdjustment input:",t);return LogUtil.Debug("= S.BaseDrawObject: GetExteriorDimensionMeasurementLineThicknessAdjustment output:",0),0}CanUseStandOffDimensionLines(){LogUtil.Debug("= S.BaseDrawObject: CanUseStandOffDimensionLines input: none");return LogUtil.Debug("= S.BaseDrawObject: CanUseStandOffDimensionLines output:",true),true}GetDimensionLengthFromString(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromString input:",{input:t,someParam:e});let i=this.GetDimensionValueFromString(t,e),n=i<0?i:this.GetDimensionLengthFromValue(i);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromString output:",n),n}GetDimensionValueFromString(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString input:",{input:t,someParam:e});let i=0;if(0===(t=t.trim()).length)return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1;if(!t.match(/^[0-9. \/\'\"]+$/))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1;if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet&&!T3Gv.docUtil.rulerConfig.showpixels){if(i=this.ConvertToFeet(t),i<0||isNaN(i))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1}else{if(!this.NumberIsFloat(t))return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",-1),-1;i=parseFloat(t)}const n=isNaN(i)?-1:i;return LogUtil.Debug("= S.BaseDrawObject: GetDimensionValueFromString output:",n),n}GetDimensionLengthFromValue(t){LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromValue input:",t);let e=0;return e=T3Gv.docUtil.rulerConfig.showpixels?t:this.UnitsToCoord(t,0),(isNaN(e)||e>4e5)&&(e=-1),LogUtil.Debug("= S.BaseDrawObject: GetDimensionLengthFromValue output:",e),e}AdjustDimensionLength(t){LogUtil.Debug("= S.BaseDrawObject: AdjustDimensionLength input:",t);const e=t;return LogUtil.Debug("= S.BaseDrawObject: AdjustDimensionLength output:",e),e}GetDimensionAreaTextInfo(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: GetDimensionAreaTextInfo input:",{textShape:t,textFramePoints:e,leftArrowPoints:i,rightArrowPoints:n,topArrowPoints:s,bottomArrowPoints:a});const o=t.GetTextMinDimensions(),r={width:o.width,height:o.height,x:this.Frame.width/2-o.width/2,y:this.Frame.height/2-o.height/2};this.Frame2Poly(r,e);const l=.5*r.height,h=.5*l,c={x:0,y:0};c.x=r.x-h,c.y=r.y+(r.height-l)/2,i.push(new Point$1(c.x,c.y)),c.y+=l,i.push(new Point$1(c.x,c.y)),c.x-=l,c.y=r.y+r.height/2,i.push(new Point$1(c.x,c.y)),i.push(new Point$1(i[0].x,i[0].y)),c.x=r.x+r.width+h,c.y=r.y+(r.height-l)/2,n.push(new Point$1(c.x,c.y)),c.y+=l,n.push(new Point$1(c.x,c.y)),c.x+=l,c.y=r.y+r.height/2,n.push(new Point$1(c.x,c.y)),n.push(new Point$1(n[0].x,n[0].y)),c.x=r.x+r.width/2-h/2,c.y=r.y-h,s.push(new Point$1(c.x,c.y)),c.x+=h,s.push(new Point$1(c.x,c.y)),c.x-=h/2,c.y-=h,s.push(new Point$1(c.x,c.y)),s.push(new Point$1(s[0].x,s[0].y)),c.x=r.x+r.width/2-h/2,c.y=r.y+r.height+h,a.push(new Point$1(c.x,c.y)),c.x+=h,a.push(new Point$1(c.x,c.y)),c.x-=h/2,c.y+=h,a.push(new Point$1(c.x,c.y)),a.push(new Point$1(a[0].x,a[0].y)),LogUtil.Debug("= S.BaseDrawObject: GetDimensionAreaTextInfo output:",{textFramePoints:e,leftArrowPoints:i,rightArrowPoints:n,topArrowPoints:s,bottomArrowPoints:a})}GetFrameIntersects(t,e,i){LogUtil.Debug("= S.BaseDrawObject: GetFrameIntersects input:",{frame:t,point:e,tolerance:i});return LogUtil.Debug("= S.BaseDrawObject: GetFrameIntersects output:",false),false}AdjustAutoInsertShape(t){LogUtil.Debug("= S.BaseDrawObject: AdjustAutoInsertShape input:",t);return LogUtil.Debug("= S.BaseDrawObject: AdjustAutoInsertShape output:",false),false}GetDimensionTextInfo1(t,e,i,n,s,a,o,r,l){let h,c,u;LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextInfo1 input:",{startPoint:t,endPoint:e,angle:i,textShape:n,segmentIndex:s,textFramePoints:a,leftArrowPoints:o,rightArrowPoints:r,isStandoff:l});const d=[];let p,g,f={x:0,y:0},m={x:0,y:0,width:0,height:0},v=0,b=!1,y=0,S=!1;u=n.GetTextMinDimensions(),m.height=u.height,m.width=u.width,d.push(new Point$1(t.x,t.y)),d.push(new Point$1(e.x,e.y)),h=360-i,c=2*Math.PI*(h/360),Utils3.RotatePointsAboutCenter(this.Frame,-c,d),d[0].x<d[1].x?(p=Utils1.DeepCopy(d[0]),g=Utils1.DeepCopy(d[1])):(p=Utils1.DeepCopy(d[1]),g=Utils1.DeepCopy(d[0])),m.x=p.x+(g.x-p.x)/2,m.y=p.y+(g.y-p.y)/2,m.x-=m.width/2,m.y-=m.height/2,m.y-=m.height/2;if((this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(m.y-=this.StyleRecord.Line.Thickness),S=0!=(this.Dimensions&NvConstant.DimensionFlags.Standoff)&&this.CanUseStandOffDimensionLines(),!l&&!(this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)&&this instanceof Instance.Shape.BaseLine&&this.ShortRef!=OptConstant.LineTypes.LsMeasuringTape&&this.objecttype===NvConstant.FNObjectTypes.FlWall){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);t&&OptCMUtil.FindLink(t,this.BlockID,!0)>=0&&(S=!0)}l&&(S=!1);const x=S?OptConstant.Common.DimDefaultStandoff:OptConstant.Common.DimDefaultNonStandoff;if(m.y-=x,v=OptConstant.Common.DimDefaultTextGap,(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(v+=this.StyleRecord.Line.Thickness),this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){const t=Math.floor((c-.01)/(Math.PI/2));b=1===t||2===t}else if(this.polylist&&!this.polylist.closed&&l){const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),e=[t[s-1],t[s]];Utils3.RotatePointsAboutCenter(this.Frame,-c,e),e.push({x:m.x+m.width/2,y:m.y+m.height/2}),e[2].x=e[0].x+(e[1].x-e[0].x)/2,Utils3.RotatePointsAboutCenter(this.Frame,c,e),Utils2.IsPointInPoly(t,e[2])&&(b=!0)}else this.IsTextFrameOverlap(m,i)&&(b=!0);b&&(m.y+=x,m.y+=m.height,this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(m.y+=2*this.StyleRecord.Line.Thickness),m.y+=x);let w=this.Dimensions&NvConstant.DimensionFlags.Standoff;if(w&&!this.CanUseStandOffDimensionLines()&&(w=!1),l&&(w=!1),w&&(y=(this instanceof Instance.Shape.PolyLine||this instanceof Instance.Shape.Polygon)&&this.polylist&&this.polylist.segs&&this.polylist.segs.length>s?this.polylist.segs[s].dimDeflection:this instanceof Instance.Shape.BaseLine?this.dimensionDeflectionH?this.dimensionDeflectionH:0:Math.abs(i%180)<5?this.dimensionDeflectionH:this.dimensionDeflectionV||0,m.y=b?m.y+y:m.y-y,this.polylist&&this.polylist.segs&&this.polylist.segs.length>s&&(this.polylist.segs[s].dimTextAltPositioning=b)),this.Frame2Poly(m,a),this.Dimensions&w)f.x=p.x,f.y=p.y>m.y?p.y-v:p.y+v,o.push(new Point$1(f.x,f.y)),f.y=m.y+m.height/2,o.push(new Point$1(f.x,f.y)),f.x=m.x-OptConstant.Common.DimDefaultTextGap,o.push(new Point$1(f.x,f.y)),f.x=m.x+m.width+OptConstant.Common.DimDefaultTextGap,r.push(new Point$1(f.x,f.y)),f.x=g.x,r.push(new Point$1(f.x,f.y)),f.y=g.y>m.y?g.y-v:g.y+v,r.push(new Point$1(f.x,f.y));else{const t=.5*m.height,e=.5*t;f.x=m.x-e,f.y=m.y+(m.height-t)/2,o.push(new Point$1(f.x,f.y)),f.y+=t,o.push(new Point$1(f.x,f.y)),f.x-=t,f.y=m.y+m.height/2,o.push(new Point$1(f.x,f.y)),o.push(new Point$1(o[0].x,o[0].y)),f.x=m.x+m.width+e,f.y=m.y+(m.height-t)/2,r.push(new Point$1(f.x,f.y)),f.y+=t,r.push(new Point$1(f.x,f.y)),f.x+=t,f.y=m.y+m.height/2,r.push(new Point$1(f.x,f.y)),r.push(new Point$1(r[0].x,r[0].y))}Utils3.RotatePointsAboutCenter(this.Frame,c,a),Utils3.RotatePointsAboutCenter(this.Frame,c,o),Utils3.RotatePointsAboutCenter(this.Frame,c,r),LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextInfo1 output:",{textDim:m,textFramePoints:a,leftArrowPoints:o,rightArrowPoints:r})}GetDimensionTextInfo(t,e,i,n,s,a,o,r,l){var h,c,u,d=[],p={x:0,y:0},g={x:0,y:0},f={x:0,y:0},m={x:0,y:0,width:0,height:0},v=0,b=!1,y=0,S=!1;u=n.GetTextMinDimensions(),m.height=u.height,m.width=u.width,d.push(new Point$1(t.x,t.y)),d.push(new Point$1(e.x,e.y)),h=360-i,c=2*Math.PI*(h/360),Utils3.RotatePointsAboutCenter(this.Frame,-c,d),d[0].x<d[1].x?(p=Utils1.DeepCopy(d[0]),g=Utils1.DeepCopy(d[1])):(p=Utils1.DeepCopy(d[1]),g=Utils1.DeepCopy(d[0])),m.x=p.x+(g.x-p.x)/2,m.y=p.y+(g.y-p.y)/2,m.x-=m.width/2,m.y-=m.height/2,m.y-=m.height/2;(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(m.y-=this.StyleRecord.Line.Thickness);S=0!=(this.Dimensions&NvConstant.DimensionFlags.Standoff)&&this.CanUseStandOffDimensionLines();const x=this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions;if(!l&&!x&&this instanceof Instance.Shape.BaseLine&&this.ShortRef!=OptConstant.LineTypes.LsMeasuringTape&&this.objecttype===NvConstant.FNObjectTypes.FlWall){var w=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(w){OptCMUtil.FindLink(w,this.BlockID,!0)>=0&&(S=!0)}}l&&(S=!1);const C=S?OptConstant.Common.DimDefaultStandoff:OptConstant.Common.DimDefaultNonStandoff;if(m.y-=C,v=OptConstant.Common.DimDefaultTextGap,this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(v+=this.StyleRecord.Line.Thickness),this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){var T=Math.floor((c-.01)/(Math.PI/2));b=1==T||2==T}else if(this.polylist&&!this.polylist.closed&&l){var D=[(d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null))[s-1],d[s]];Utils3.RotatePointsAboutCenter(this.Frame,-c,D),D.push({x:m.x+m.width/2,y:m.y+m.height/2}),D[2].x=D[0].x+(D[1].x-D[0].x)/2,Utils3.RotatePointsAboutCenter(this.Frame,c,D),Utils2.IsPointInPoly(d,D[2])&&(b=!0)}else this.IsTextFrameOverlap(m,i)&&(b=!0);b&&(m.y+=C,m.y+=m.height,this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(m.y+=2*this.StyleRecord.Line.Thickness),m.y+=C);let k=!1;var $=this.Dimensions&NvConstant.DimensionFlags.Standoff;if($&&!this.CanUseStandOffDimensionLines()&&(k=!1),l&&(k=!1),k&&(y=(this instanceof Instance.Shape.PolyLine||this instanceof Instance.Shape.Polygon)&&this.polylist&&this.polylist.segs&&this.polylist.segs.length>s?this.polylist.segs[s].dimDeflection:this instanceof Instance.Shape.BaseLine?this.dimensionDeflectionH?this.dimensionDeflectionH:0:Math.abs(i%180)<5?this.dimensionDeflectionH:this.dimensionDeflectionV||0,b?m.y+=y:m.y-=y,this.polylist&&this.polylist.segs&&this.polylist.segs.length>s&&(this.polylist.segs[s].dimTextAltPositioning=b)),this.Frame2Poly(m,a),this.Dimensions&$)f.x=p.x,f.y=p.y>m.y?p.y-v:p.y+v,o.push(new Point$1(f.x,f.y)),f.y=m.y+m.height/2,o.push(new Point$1(f.x,f.y)),f.x=m.x-OptConstant.Common.DimDefaultTextGap,o.push(new Point$1(f.x,f.y)),f.x=m.x+m.width+OptConstant.Common.DimDefaultTextGap,r.push(new Point$1(f.x,f.y)),f.x=g.x,r.push(new Point$1(f.x,f.y)),f.y=g.y>m.y?g.y-v:g.y+v,r.push(new Point$1(f.x,f.y));else{var O=.5*m.height,P=.5*O;f.x=m.x-P,f.y=m.y+(m.height-O)/2,o.push(new Point$1(f.x,f.y)),f.y+=O,o.push(new Point$1(f.x,f.y)),f.x-=O,f.y=m.y+m.height/2,o.push(new Point$1(f.x,f.y)),o.push(new Point$1(o[0].x,o[0].y)),f.x=m.x+m.width+P,f.y=m.y+(m.height-O)/2,r.push(new Point$1(f.x,f.y)),f.y+=O,r.push(new Point$1(f.x,f.y)),f.x+=O,f.y=m.y+m.height/2,r.push(new Point$1(f.x,f.y)),r.push(new Point$1(r[0].x,r[0].y))}Utils3.RotatePointsAboutCenter(this.Frame,c,a),Utils3.RotatePointsAboutCenter(this.Frame,c,o),Utils3.RotatePointsAboutCenter(this.Frame,c,r)}GetCoordinateTextInfo(t,e,i,n,s,a,o,r,l){var h,c,u,d=[],p={x:0,y:0},g={x:0,y:0},f={x:0,y:0},m={x:0,y:0,width:0,height:0},v=0,b=!1,y=0,S=!1;u=n.GetTextMinDimensions(),m.height=u.height,m.width=u.width,d.push(new Point$1(t.x,t.y)),d.push(new Point$1(e.x,e.y)),h=360-i,c=2*Math.PI*(h/360),Utils3.RotatePointsAboutCenter(this.Frame,-c,d),d[0].x<d[1].x?(p=Utils1.DeepCopy(d[0]),g=Utils1.DeepCopy(d[1])):(p=Utils1.DeepCopy(d[1]),g=Utils1.DeepCopy(d[0])),m.x=p.x+(g.x-p.x)/2,m.y=p.y+(g.y-p.y)/2,m.x-=m.width/2,m.y-=m.height/2,m.y-=m.height/2;(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(m.y-=this.StyleRecord.Line.Thickness);S=0!=(this.Dimensions&NvConstant.DimensionFlags.Standoff)&&this.CanUseStandOffDimensionLines();const x=this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions;if(!l&&!x&&this instanceof Instance.Shape.BaseLine&&this.ShortRef!=OptConstant.LineTypes.LsMeasuringTape&&this.objecttype===NvConstant.FNObjectTypes.FlWall){var w=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(w){OptCMUtil.FindLink(w,this.BlockID,!0)>=0&&(S=!0)}}l&&(S=!1);const C=S?OptConstant.Common.CoordinateLineDefaultStandoff:OptConstant.Common.CoordinateLineDefaultNonStandoff;m.y-=C,v=OptConstant.Common.CoordinateLineDefaultTextGap;(this.Dimensions&NvConstant.DimensionFlags.Exterior||this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness)&&(v+=this.StyleRecord.Line.Thickness);if(this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){var T=Math.floor((c-.01)/(Math.PI/2));b=1==T||2==T}else if(this.polylist&&!this.polylist.closed&&l){var D=[(d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null))[s-1],d[s]];Utils3.RotatePointsAboutCenter(this.Frame,-c,D),D.push({x:m.x+m.width/2,y:m.y+m.height/2}),D[2].x=D[0].x+(D[1].x-D[0].x)/2,Utils3.RotatePointsAboutCenter(this.Frame,c,D),Utils2.IsPointInPoly(d,D[2])&&(b=!0)}else this.IsTextFrameOverlap(m,i)&&(b=!0);b&&(m.y+=C,m.y+=m.height,this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness&&(m.y+=2*this.StyleRecord.Line.Thickness),m.y+=C);let k=!1;var $=this.Dimensions&NvConstant.DimensionFlags.Standoff;if($&&!this.CanUseStandOffDimensionLines()&&(k=!1),l&&(k=!1),k&&(y=(this instanceof Instance.Shape.PolyLine||this instanceof Instance.Shape.Polygon)&&this.polylist&&this.polylist.segs&&this.polylist.segs.length>s?this.polylist.segs[s].dimDeflection:this instanceof Instance.Shape.BaseLine?this.dimensionDeflectionH?this.dimensionDeflectionH:0:Math.abs(i%180)<5?this.dimensionDeflectionH:this.dimensionDeflectionV||0,b?m.y+=y:m.y-=y,this.polylist&&this.polylist.segs&&this.polylist.segs.length>s&&(this.polylist.segs[s].dimTextAltPositioning=b)),this.Frame2Poly(m,a),this.Dimensions&$)f.x=p.x,f.y=p.y>m.y?p.y-v:p.y+v,o.push(new Point$1(f.x,f.y)),f.x=m.x-OptConstant.Common.CoordinateLineDefaultTextGap,o.push(new Point$1(f.x,f.y)),f.x=m.x+m.width+OptConstant.Common.CoordinateLineDefaultTextGap,r.push(new Point$1(f.x,f.y)),f.x=g.x,f.y=g.y>m.y?g.y-v:g.y+v,r.push(new Point$1(f.x,f.y));else{var O=.5*m.height,P=.5*O;f.x=m.x-P,f.y=m.y+(m.height-O)/2,o.push(new Point$1(f.x,f.y)),f.y+=O,o.push(new Point$1(f.x,f.y)),f.x-=O,f.y=m.y+m.height/2,o.push(new Point$1(f.x,f.y)),o.push(new Point$1(o[0].x,o[0].y)),f.x=m.x+m.width+P,f.y=m.y+(m.height-O)/2,r.push(new Point$1(f.x,f.y)),f.y+=O,r.push(new Point$1(f.x,f.y)),f.x+=O,f.y=m.y+m.height/2,r.push(new Point$1(f.x,f.y)),r.push(new Point$1(r[0].x,r[0].y))}Utils3.RotatePointsAboutCenter(this.Frame,c,a),Utils3.RotatePointsAboutCenter(this.Frame,c,o),Utils3.RotatePointsAboutCenter(this.Frame,c,r)}CreateDimensionLineSegment(t,e,i,n){LogUtil.Debug("=== wall ========================================================"),LogUtil.Debug("=== wall CreateDimensionLineSegment path,points,bounds",e,i,n);for(let s=0;s<i.length;s++)0===s?t.MoveTo(i[s].x,i[s].y):t.LineTo(i[s].x,i[s].y),(i[s].x<n.left||-1===n.left)&&(n.left=i[s].x),i[s].x>n.right&&(n.right=i[s].x),(i[s].y<n.top||-1===n.top)&&(n.top=i[s].y),i[s].y>n.bottom&&(n.bottom=i[s].y)}CreateCoordinateLineSegment(t,e,i,n){LogUtil.Debug("=== wall CreateCoordinateLineSegment points/bounds",i,n);for(let s=0;s<i.length;s++)0===s?t.MoveTo(i[s].x,i[s].y):t.LineTo(i[s].x,i[s].y),(i[s].x<n.left||-1===n.left)&&(n.left=i[s].x),i[s].x>n.right&&(n.right=i[s].x),(i[s].y<n.top||-1===n.top)&&(n.top=i[s].y),i[s].y>n.bottom&&(n.bottom=i[s].y)}CreateDimensionLineArrowHead(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: CreateDimensionLineArrowHead - Input:",{container:t,polygonCreator:e,arrowPoints:i,bounds:n,userData:s});const a=Utils1.DeepCopy(i),o=a.length;for(let h=0;h<o;h++)n.left=Math.min(n.left,a[h].x),n.right=Math.max(n.right,a[h].x),n.top=Math.min(n.top,a[h].y),n.bottom=Math.max(n.bottom,a[h].y);const r=new Rectangle(0,0,0,0);Utils2.GetPolyRect(r,a);for(let h=0;h<o;h++)a[h].x-=r.x,a[h].y-=r.y;const l=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polygon);l.SetPoints(i),l.SetEventBehavior(OptConstant.EventBehavior.All),l.SetID(OptConstant.SVGElementClass.DimLine),l.SetPos(0,0),l.SetSize(r.width,r.height),l.SetFillColor("black"),Utils2.HasFlag(this.Dimensions,NvConstant.DimensionFlags.Select)&&l.ExcludeFromExport(!0),s&&l.SetUserData(s),t.AddElement(l),LogUtil.Debug("= S.BaseDrawObject: CreateDimensionLineArrowHead - Output: Polygon shape created",l)}ConvertToNative(t,e){LogUtil.Debug("= S.BaseDrawObject: ConvertToNative - Input:",{inputData:t,conversionOptions:e});return LogUtil.Debug("= S.BaseDrawObject: ConvertToNative - Output:",null),null}ContainsText(){LogUtil.Debug("= S.BaseDrawObject: ContainsText - Input: none");const t=this.DataID>=0;return LogUtil.Debug("= S.BaseDrawObject: ContainsText - Output:",t),t}GetToUnits(){LogUtil.Debug("= S.BaseDrawObject: GetToUnits - Input: none");const t=T3Gv.docUtil.rulerConfig.major;let e=T3Gv.docUtil.rulerConfig.majorScale/t;return T3Gv.docUtil.rulerConfig.useInches||(e*=T3Gv.docUtil.rulerConfig.metricConv),LogUtil.Debug("= S.BaseDrawObject: GetToUnits - Output:",e),e}GetLengthInUnits(t,e=!1){LogUtil.Debug("= S.BaseDrawObject: GetLengthInUnits input:",{value:t,round:e});let i=t*this.GetToUnits();if(!e){const t=Math.pow(10,T3Gv.docUtil.rulerConfig.dp);i=Math.round(i*t)/t}return LogUtil.Debug("= S.BaseDrawObject: GetLengthInUnits output:",i),i}GetFractionStringGranularity(t){LogUtil.Debug("= S.BaseDrawObject: GetFractionStringGranularity input:",{input:t});const e=T3Gv.docUtil.rulerConfig;let i;return i=e.denom>=1?1/e.denom:e.majorScale<=1?1/16:e.majorScale<=2?1/8:e.majorScale<=4?1/4:e.majorScale<=8?.5:1,LogUtil.Debug("= S.BaseDrawObject: GetFractionStringGranularity output:",i),i}NumberIsFloat(t){LogUtil.Debug("= S.BaseDrawObject: NumberIsFloat input:",t);const e="9".charCodeAt(0),i="0".charCodeAt(0),n=".".charCodeAt(0);for(let s=0;s<t.length;s++){const a=t.charCodeAt(s);if(!(a>=i&&a<=e||a===n))return LogUtil.Debug("= S.BaseDrawObject: NumberIsFloat output:",!1),!1}return LogUtil.Debug("= S.BaseDrawObject: NumberIsFloat output:",!0),!0}ParseInchesString(t){LogUtil.Debug("= S.BaseDrawObject: ParseInchesString input:",t);let e=0;const i=(t=t.trim()).indexOf(" ");if(i>=0){const n=t.substring(0,i),s=t.substring(i+1),a=parseFloat(n);e=isNaN(a)?0:a;const o=s.indexOf("/");if(o>=0){const t=s.substring(0,o),i=s.substring(o+1),n=parseFloat(t),a=parseFloat(i);isNaN(n)||isNaN(a)||0===a||(e+=n/a)}else{const t=parseFloat(s);isNaN(t)||(e+=t)}}else e=parseFloat(t);return LogUtil.Debug("= S.BaseDrawObject: ParseInchesString output:",e),e}ConvertToFeet(t){LogUtil.Debug("= S.BaseDrawObject: ConvertToFeet - Input:",t);let e=t.trim(),i=e.indexOf("'");i>=0&&i<e.length-1&&" "!==e.charAt(i+1)&&(e=e.substr(0,i+1)+" "+e.substr(i+1));const n=e.split(" ");let s="",a="",o="";n[n.length-1].indexOf("/")>=0?(s=n[n.length-1],n.length>=2&&n[n.length-2].endsWith("'")&&(o=n[n.length-2],a=""),n.length>=3&&(o=n[n.length-3])):2===n.length?(o=n[0],a=n[1]):n[0].endsWith('"')?a=n[0]:o=n[0],o.endsWith("'")&&(o=o.substring(0,o.length-1)),a.endsWith('"')&&(a=a.substring(0,a.length-1)),s.endsWith('"')&&(s=s.substring(0,s.length-1));let r=o.length>0?parseFloat(o):0,l=a.length>0?parseFloat(a):0;if(s.length>0){const t=s.split("/"),e=parseInt(t[0],10),i=parseInt(t[1],10);0!==e&&0!==i&&(l+=e/i)}return l>=12&&0===r?this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.ShowFeetAsInches,!0):r>0&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.ShowFeetAsInches,!1)),r+=l/12,LogUtil.Debug("= S.BaseDrawObject: ConvertToFeet - Output:",r),r}UnitsToCoord(t,e){LogUtil.Debug("= S.BaseDrawObject: UnitsToCoord - Input:",{value:t,offset:e}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i=this.GetToUnits(),n=(t+=e*T3Gv.docUtil.rulerConfig.majorScale)/i;return LogUtil.Debug("= S.BaseDrawObject: UnitsToCoord - Output:",n),n}ConvToUnits(t,e){LogUtil.Debug("= S.BaseDrawObject: ConvToUnits input:",{value:t,offset:e}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i=t*this.GetToUnits()-e*T3Gv.docUtil.rulerConfig.majorScale;return LogUtil.Debug("= S.BaseDrawObject: ConvToUnits output:",i),i}Frame2Poly(t,e){e.push(new Point$1(t.x,t.y)),e.push(new Point$1(t.x+t.width,t.y)),e.push(new Point$1(t.x+t.width,t.y+t.height)),e.push(new Point$1(t.x,t.y+t.height))}SetBackgroundImageURL(t){}CalcTextPosition(t){LogUtil.Debug("= S.BaseDrawObject: CalcTextPosition - Input:",t);const e={x:0,y:0};return LogUtil.Debug("= S.BaseDrawObject: CalcTextPosition - Output:",e),e}GetBlobBytes(){LogUtil.Debug("= S.BaseDrawObject: GetBlobBytes input: none");let t=null;return this.BlobBytesID>=0&&(t=ObjectUtil$1.GetObjectPtr(this.BlobBytesID,!1)),LogUtil.Debug("= S.BaseDrawObject: GetBlobBytes output:",t),t}GetEMFBlobBytes(){LogUtil.Debug("= S.BaseDrawObject: GetEMFBlobBytes input: EMFBlobBytesID =",this.EMFBlobBytesID);let t=null;return this.EMFBlobBytesID>=0&&(t=ObjectUtil$1.GetObjectPtr(this.EMFBlobBytesID,!1)),LogUtil.Debug("= S.BaseDrawObject: GetEMFBlobBytes output:",t),t}GetOleBlobBytes(){LogUtil.Debug("= S.BaseDrawObject: GetOleBlobBytes input:",{OleBlobBytesID:this.OleBlobBytesID});let t=null;return this.OleBlobBytesID>=0&&(t=ObjectUtil$1.GetObjectPtr(this.OleBlobBytesID,!1)),LogUtil.Debug("= S.BaseDrawObject: GetOleBlobBytes output:",t),t}GetGraph(t=!1){LogUtil.Debug("= S.BaseDrawObject: GetGraph input:",{preserve:t});let e=null;return this.GraphID>=0&&(e=ObjectUtil$1.GetObjectPtr(this.GraphID,t)),LogUtil.Debug("= S.BaseDrawObject: GetGraph output:",e),e}SetGraph(t){if(LogUtil.Debug("= S.BaseDrawObject: SetGraph input:",t),this.GraphID>=0)if(null==t){const t=T3Gv.stdObj.GetObject(this.GraphID);t&&t.Delete(),this.GraphID=-1}else{const e=T3Gv.stdObj.PreserveBlock(this.GraphID);e&&(e.Data=t)}else{const e=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.GraphObject,t);e&&(this.GraphID=e.ID)}LogUtil.Debug("= S.BaseDrawObject: SetGraph output:",this.GraphID)}Flip(t){LogUtil.Debug("= S.BaseDrawObject: Flip - Input:",{isHorizontalFlip:t}),LogUtil.Debug("= S.BaseDrawObject: Flip - Output: Completed")}NoFlip(){LogUtil.Debug("= S.BaseDrawObject: NoFlip - Input: {}");const t=this.hooks.length>0;return LogUtil.Debug("= S.BaseDrawObject: NoFlip - Output:",t),t}NoRotate(){LogUtil.Debug("= S.BaseDrawObject: NoRotate - Input: none");return LogUtil.Debug("= S.BaseDrawObject: NoRotate - Output:",false),false}NoGrow(){LogUtil.Debug("= S.BaseDrawObject: NoGrow input: none");const t=(this.colorfilter&StyleConstant.ColorFilters.NCResize)>0;return LogUtil.Debug("= S.BaseDrawObject: NoGrow output:",t),t}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: MaintainPoint - Input:",{currentPoint:t,targetPoint:e,adjustmentX:i,adjustmentY:n,shouldApply:s});return LogUtil.Debug("= S.BaseDrawObject: MaintainPoint - Output:",false),false}AllowTextEdit(){return LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Input:",{TextFlags:this.TextFlags,objecttype:this.objecttype,flags:this.flags,FromEditShapeOutline:this.FromEditShapeOutline}),(this.TextFlags&NvConstant.TextFlags.None)>0?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (None flag is set)"),!1):this.objecttype===NvConstant.FNObjectTypes.ShapeContainer&&0==(this.TextFlags&NvConstant.TextFlags.AttachA)&&0==(this.TextFlags&NvConstant.TextFlags.AttachB)?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (Shape container without attach flags)"),!1):this.flags&NvConstant.ObjFlags.Lock?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (Object is locked)"),!1):this.FromEditShapeOutline?(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: false (FromEditShapeOutline is true)"),!1):(LogUtil.Debug("= S.BaseDrawObject: AllowTextEdit - Output: true (No table present)"),!0)}AllowDoubleClick(){return!1}ChangeBackgroundColor(t,e){LogUtil.Debug("= S.BaseDrawObject: ChangeBackgroundColor - Input:",{desiredColor:t,applyImmediately:e});return LogUtil.Debug("= S.BaseDrawObject: ChangeBackgroundColor - Output:",false),false}UseEdges(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: UseEdges - Input:",{edgeData:t,threshold:e,isActive:i,radius:n,importance:s,extraParam:a});return LogUtil.Debug("= S.BaseDrawObject: UseEdges - Output:",false),false}ApplyStyle(t,e){LogUtil.Debug("= S.BaseDrawObject: ApplyStyle - Input:",{style:t,applyTextStyle:e});let i=Utils1.DeepCopy(t),n=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);if(!(this.colorfilter&StyleConstant.ColorFilters.NCStyle)){let t={Color:i.Text.Paint.Color},s={color:i.Text.Paint.Color};e&&(this.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape?(i.Fill=Utils1.DeepCopy(this.StyleRecord.Fill),i.Text=Utils1.DeepCopy(n.Text),t={Color:n.Text.Paint.Color},s={color:n.Text.Paint.Color}):this.UseTextBlockColor()&&(i.Text=Utils1.DeepCopy(n.Text),t={Color:n.Text.Paint.Color},s={color:n.Text.Paint.Color})),this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent&&(i.Fill.Paint.FillType=NvConstant.FillTypes.Transparent,i.Fill.Hatch=0),0===this.StyleRecord.Line.Thickness&&(i.Line.Thickness=0),0===i.Line.LinePattern&&(i.Line.LinePattern=this.StyleRecord.Line.LinePattern),i.Fill.Paint.Opacity=this.StyleRecord.Fill.Paint.Opacity,i.Fill.Paint.EndOpacity=this.StyleRecord.Fill.Paint.EndOpacity,i.Line.Paint.Opacity=this.StyleRecord.Line.Paint.Opacity,i.Line.Paint.EndOpacity=this.StyleRecord.Line.Paint.EndOpacity,i.Text.Paint.Opacity=this.StyleRecord.Text.Paint.Opacity,i.Text.Paint.EndOpacity=this.StyleRecord.Text.Paint.EndOpacity,this.ChangeTextAttributes(s,t),this.StyleRecord=i}LogUtil.Debug("= S.BaseDrawObject: ApplyStyle - Output:",{StyleRecord:this.StyleRecord})}GenericIcon(t){LogUtil.Debug("= S.BaseDrawObject: GenericIcon - Input:",t);const e=t.svgDoc.CreateShape(OptConstant.CSType.Image);return null!=t.userData?e.SetUserData(t.userData):e.SetUserData(OptConstant.SVGElementClass.Icon),e.SetSize(t.iconSize,t.iconSize),e.SetPos(t.x,t.y),e.SetURL(t.imageURL),e.SetFillOpacity(1),e.SetStrokeWidth(0),e.SetID(t.iconID),e.SetCursor(t.cursorType),e.ExcludeFromExport(!0),LogUtil.Debug("= S.BaseDrawObject: GenericIcon - Output:",e),e}AddIcon(t,e,i){if(LogUtil.Debug("= S.BaseDrawObject: AddIcon - Input:",{svgDoc:t,container:e,iconParams:i}),e){const t=this.Frame;i.x=t.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=t.height-this.iconShapeBottomOffset-this.iconSize;const n=this.GenericIcon(i);return this.nIcons++,e.AddElement(n),LogUtil.Debug("= S.BaseDrawObject: AddIcon - Output:",n),n}return LogUtil.Debug("= S.BaseDrawObject: AddIcon - Output: container not provided"),null}GetIconShape(){return this.BlockID}HasIcons(){}AddIcons(t,e){if(LogUtil.Debug("= S.BaseDrawObject: AddIcons - Input:",{svgDoc:t,container:e}),e){this.nIcons=0;let i={svgDoc:t,iconSize:this.iconSize,cursorType:CursorConstant.CursorType.Pointer};if(this.nIcons=0,!this.bInGroup){if(this.commentId>=0){i.iconID=OptConstant.ShapeIconType.Comment,i.imageURL=Constants.FilePath_Icons+Constants.Icon_Comment;const n=this.AddIcon(t,e,i),s=OptConstant.SVGElementClass.Icon+"."+this.BlockID;n.SetUserData(s)}if(this.HyperlinkText&&Utils1.ResolveHyperlink(this.HyperlinkText)){i.iconID=OptConstant.ShapeIconType.HyperLink,i.imageURL=Constants.FilePath_Icons+Constants.Icon_Hyperlink;const n=this.AddIcon(t,e,i);n.SetHyperlinkAttribute(this.HyperlinkText),n.SetTooltip(Utils1.ResolveHyperlinkForDisplay(this.HyperlinkText))}if(this.AttachmentInfo&&(i.iconID=OptConstant.ShapeIconType.Attachment,i.imageURL="../../../Styles/Img/Icons/attachment_icon.png",this.AddIcon(t,e,i)),this.ExpandedViewID>=0){i.iconID=OptConstant.ShapeIconType.ExpandedView,i.imageURL=Constants.FilePath_Icons+Constants.Icon_ExpandedView;this.AddIcon(t,e,i).SetCustomAttribute("_expextendtt_",this.ExpandedViewID)}if(-1!==this.NoteID||TextUtil.NoteIsShowing(this.BlockID,null)){let n,s;i.iconID=OptConstant.ShapeIconType.Notes,i.imageURL=Constants.FilePath_Icons+Constants.Icon_Note,this.moreflags&OptConstant.ObjMoreFlags.UseInfoNoteIcon&&(i.imageURL=Constants.FilePath_Icons+Constants.Icon_Info),n=this.AddIcon(t,e,i),n.SetCustomAttribute("_expnotett_",this.NoteID);const a=this,o=n.DOMElement();$$1(o).hover((function(){s=setTimeout((()=>{T3Gv.opt.bInNoteEdit||T3Gv.opt.ShowNote(a.BlockID,null)}),750)}),(function(){T3Gv.opt.bInNoteEdit||T3Gv.opt.HideNote(a.BlockID,null),clearTimeout(s)}))}}}LogUtil.Debug("= S.BaseDrawObject: AddIcons - Output: Completed")}HideAllIcons(t,e){LogUtil.Debug("= S.BaseDrawObject: HideAllIcons - Input: svgLayer =",e),this.nIcons=0;const i=e.GetElementById(OptConstant.ShapeIconType.HyperLink),n=e.GetElementById(OptConstant.ShapeIconType.Notes),s=e.GetElementById(OptConstant.ShapeIconType.Comment),a=e.GetElementById(OptConstant.ShapeIconType.FieldData);i&&e.RemoveElement(i),n&&e.RemoveElement(n),s&&e.RemoveElement(s),a&&e.RemoveElement(a),LogUtil.Debug("= S.BaseDrawObject: HideAllIcons - Output: Icons hidden")}GetHyperlink(t){if(LogUtil.Debug("= S.BaseDrawObject: GetHyperlink - Input:",t),t&&"string"==typeof t&&t.split){const e=t.split(".");e[1]&&parseInt(e[1],10)}let e;return e=this.HyperlinkText,LogUtil.Debug("= S.BaseDrawObject: GetHyperlink - Output:",e),e}SetCursors(){LogUtil.Debug("= S.BaseDrawObject: SetCursors - Input: BlockID =",this.BlockID);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e=!1;if(this.flags&NvConstant.ObjFlags.Lock||!t)this.ClearCursors();else if(OptCMUtil.GetEditMode()===NvConstant.EditState.Default){const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&(this.objecttype===NvConstant.FNObjectTypes.FrameContainer?i.SetCursor(CursorConstant.CursorType.Default):i.SetCursor(CursorConstant.CursorType.Add));let n=t.GetElementById(OptConstant.ShapeIconType.HyperLink);n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.Notes),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.ExpandedView),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.Comment),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.Attachment),n&&n.SetCursor(CursorConstant.CursorType.Pointer),n=t.GetElementById(OptConstant.ShapeIconType.FieldData),n&&n.SetCursor(CursorConstant.CursorType.Pointer);const s=t.GetElementById(OptConstant.SVGElementClass.Slop);s&&s.SetCursor(CursorConstant.CursorType.Add);const a=T3Gv.opt.svgDoc.GetActiveEdit();if(this.DataID&&this.DataID>=0&&t.textElem&&(t.textElem===a?(i&&i.SetCursor(CursorConstant.CursorType.Text),t.textElem.SetCursorState(CursorConstant.CursorState.EditLink)):t.textElem.SetCursorState(CursorConstant.CursorState.LinkOnly)),(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&this.IsSelected()){const n=t.GetElementListWithId(OptConstant.SVGElementClass.DimText);for(let t=0;t<n.length;t++)n[t].SetCursorState(CursorConstant.CursorState.EditOnly),n[t]===a&&(e=!0);e&&(i&&i.SetCursor(null),s&&s.SetCursor(null))}}else this.ClearCursors();LogUtil.Debug("= S.BaseDrawObject: SetCursors - Output: Completed")}ClearCursors(){LogUtil.Debug("= S.BaseDrawObject: ClearCursors - Input: {}");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&(t.ClearAllCursors(),t.textElem&&t.textElem.SetCursorState(CursorConstant.CursorState.None)),LogUtil.Debug("= S.BaseDrawObject: ClearCursors - Output: Completed")}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.BaseDrawObject PostCreateShapeCallback - Input:",{shape:t,container:e,config:i,additionalInfo:n}),LogUtil.Debug("= S.BaseDrawObject PostCreateShapeCallback - Output: completed")}SVGTokenizerHook(t){if(LogUtil.Debug("= S.BaseDrawObject: SVGTokenizerHook - Input:",t),T3Gv.opt.bTokenizeStyle){const e=this.colorfilter;if(t=Utils1.DeepCopy(t),e===StyleConstant.ColorFilters.NCAll)return LogUtil.Debug("= S.BaseDrawObject: SVGTokenizerHook - Output (NCAll):",t),t;e&StyleConstant.ColorFilters.NCFill||(t.Fill.Paint.FillType===NvConstant.FillTypes.Gradient&&(t.Fill.Paint.FillType=NvConstant.FillTypes.Solid),t.Fill.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.FillColor,t.Fill.Paint.Color)),e&StyleConstant.ColorFilters.NCLine||(t.Line.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineColor,t.Line.Paint.Color)),e&StyleConstant.ColorFilters.NCLineThick||(t.Line.Thickness=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineThick,t.Line.Thickness))}return LogUtil.Debug("= S.BaseDrawObject: SVGTokenizerHook - Output:",t),t}CancelObjectDraw(){return LogUtil.Debug("= S.BaseDrawObject: CancelObjectDraw - Input: {}"),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseDrawObject: CancelObjectDraw - Output: true"),!0}GetAlignRect(){LogUtil.Debug("= S.BaseDrawObject: GetAlignRect - Input:",{Frame:this.Frame});const t=Utils1.DeepCopy(this.Frame);return LogUtil.Debug("= S.BaseDrawObject: GetAlignRect - Output:",{alignRect:t}),t}GetCustomConnectPointsDirection(){return null}GetTextures(t){LogUtil.Debug("= S.BaseDrawObject: GetTextures - Input:",{textures:t});const e=NvConstant.FillTypes.Texture;if(this.StyleRecord.Fill.Paint.FillType===e){const e=this.StyleRecord.Fill.Paint.Texture;-1===t.indexOf(e)&&t.push(e)}if(this.StyleRecord.Line.Paint.FillType===e){const e=this.StyleRecord.Line.Paint.Texture;-1===t.indexOf(e)&&t.push(e)}if(this.StyleRecord.Text.Paint.FillType===e){const e=this.StyleRecord.Text.Paint.Texture;-1===t.indexOf(e)&&t.push(e)}LogUtil.Debug("= S.BaseDrawObject: GetTextures - Output:",{textures:t})}GetContrastingColorName(t){LogUtil.Debug("= S.BaseDrawObject: GetContrastingColorName - Input:",t);const e=this.StyleRecord.Line.Paint.Color,i=(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=128?"black":"white";return LogUtil.Debug("= S.BaseDrawObject: GetContrastingColorName - Output:",i),i}SetRuntimeEffects(t){LogUtil.Debug("= S.BaseDrawObject: SetRuntimeEffects - Input:",{effectParams:t});const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);e&&this.ApplyEffects(e,t,!1),LogUtil.Debug("= S.BaseDrawObject: SetRuntimeEffects - Output: Completed")}ApplyEffects(t,e,i){}SetEffects(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: SetEffects - Input:",{targetElement:t,flagOverrideGlow:e,isSecondary:i,styleOverride:n,skipOutsideEffects:s,skipInsideEffects:a});const o=this.Frame;let r=[],l=null;if(t){const h=n||this.StyleRecord;if(null!=h){this.dataStyleOverride&&this.dataStyleOverride.glowColor&&(l=this.dataStyleOverride.glowColor);const n=this.CalcEffectSettings(o,h,i);s||(n.outside.type&&(e&&n.outside.type.id===BConstant.EffectType.GLOW.id?r.push({type:n.outside.type,params:n.outside.settings}):e||r.push({type:n.outside.type,params:n.outside.settings})),e?r.push({type:BConstant.EffectType.GLOW,params:{color:"#FFD64A",size:4,asSecondary:!0}}):this.collabGlowColor?r.push({type:BConstant.EffectType.GLOW,params:{color:this.collabGlowColor,size:6,asSecondary:!0}}):l&&r.push({type:BConstant.EffectType.GLOW,params:{color:l,size:4,asSecondary:!0}})),n.inside.type&&!a&&r.push({type:n.inside.type,params:n.inside.settings}),t.Effects().SetEffects(r,o)}}LogUtil.Debug("= S.BaseDrawObject: SetEffects - Output:",{appliedEffects:r,frame:o})}CalcEffectSettings(t,e,i){let n,s,a;LogUtil.Debug("= S.BaseDrawObject CalcEffectSettings - Input:",{frame:t,style:e,isSecondary:i});const o=t.width,r=t.height,l={left:0,top:0,right:0,bottom:0},h={};let c=e.Line.Thickness;i&&c<2&&(c=2);let u=o+c,d=r+c;if(n=Math.min(u,d),n=i?c:Math.min(n,50),h.inside={},h.outside={},e.OutsideEffect&&e.OutsideEffect.OutsideType)switch(h.outside.settings={},e.OutsideEffect.OutsideType){case StyleConstant.OutEffect.Drop:l.left=n*e.OutsideEffect.OutsideExtent_Left,l.top=n*e.OutsideEffect.OutsideExtent_Top,l.right=n*e.OutsideEffect.OutsideExtent_Right,l.bottom=n*e.OutsideEffect.OutsideExtent_Bottom,i&&(l.left&&(l.left=Math.min(l.left,2)),l.top&&(l.top=Math.min(l.top,2)),l.right&&(l.right=Math.min(l.right,2)),l.bottom&&(l.bottom=Math.min(l.bottom,2))),h.outside.type=BConstant.EffectType.DROPSHADOW,h.outside.settings.size=Math.min(Math.max((l.left+l.right)/2,2),50),h.outside.settings.xOff=l.right/2-l.left/2,h.outside.settings.yOff=l.bottom/2-l.top/2,h.outside.settings.color=e.OutsideEffect.Color,h.outside.settings.asSecondary=!0,l.left=Math.max(-h.outside.settings.xOff+h.outside.settings.size,0),l.top=Math.max(-h.outside.settings.yOff+h.outside.settings.size,0),l.right=Math.max(h.outside.settings.xOff+h.outside.settings.size,0),l.bottom=Math.max(h.outside.settings.yOff+h.outside.settings.size,0);break;case StyleConstant.OutEffect.Glow:l.left=l.top=l.right=l.bottom=Math.max(n*e.OutsideEffect.OutsideExtent_Left,2),h.outside.type=BConstant.EffectType.GLOW,h.outside.settings.size=Math.min(Math.max((l.left+l.right)/2,2),50),h.outside.settings.color=e.OutsideEffect.Color,h.outside.settings.asSecondary=!0,l.left=l.top=l.right=l.bottom=h.outside.settings.size;break;case StyleConstant.OutEffect.Refl:l.left=u*e.OutsideEffect.OutsideExtent_Left,l.right=u*e.OutsideEffect.OutsideExtent_Right,l.bottom=d*e.OutsideEffect.OutsideExtent_Bottom,h.outside.type=BConstant.EffectType.REFLECT,h.outside.settings.xOff=l.right-l.left,h.outside.settings.yOff=l.bottom,h.outside.settings.asSecondary=!0,s=Element$1.Effects.CalcSecondaryEffectOffset(h.outside.settings.xOff,h.outside.settings.yOff),l.left=Math.max(-s,0),l.right=Math.max(s,0);break;case StyleConstant.OutEffect.Cast:l.left=u*e.OutsideEffect.OutsideExtent_Left,l.right=u*e.OutsideEffect.OutsideExtent_Right,l.bottom=d*e.OutsideEffect.OutsideExtent_Bottom,h.outside.type=BConstant.EffectType.CASTSHADOW,h.outside.settings.xOff=l.right-l.left,h.outside.settings.yOff=l.bottom,h.outside.settings.size=Math.min(Math.max(.1*Math.abs(l.bottom),2),25),h.outside.settings.asSecondary=!0,s=Element$1.Effects.CalcSecondaryEffectOffset(h.outside.settings.xOff,h.outside.settings.yOff),l.left=Math.max(-s+h.outside.settings.size,0),l.right=Math.max(s+h.outside.settings.size,0),l.bottom=Math.max(h.outside.settings.yOff+h.outside.settings.size,0)}if(e.Fill.FillEffect&&!i)switch(n=Math.min(u,d),h.inside.settings={},e.Fill.FillEffect){case StyleConstant.FillEffect.Gloss:if(h.inside.type=BConstant.EffectType.GLOSS,h.inside.settings.size=Math.min(u,d),h.inside.settings.type=Element$1.Effects.GlossType.Soft,h.inside.settings.dir=Element$1.Effects.FilterDirection.TOP,h.inside.settings.color=e.Fill.EffectColor,e.Fill.LParam)switch(e.Fill.LParam){case 1:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP;break;case 2:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHTTOP;break;case 3:h.inside.settings.dir=Element$1.Effects.FilterDirection.CENTER}e.Fill.WParam&&(h.inside.settings.type=Element$1.Effects.GlossType.Hard);break;case StyleConstant.FillEffect.Bevel:if(n=Math.max(Math.min(n,50)/10,2),h.inside.type=BConstant.EffectType.BEVEL,h.inside.settings.size=n,h.inside.settings.type=Element$1.Effects.BevelType.SOFT,h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP,void 0!==e.Fill.WParam)switch(e.Fill.WParam){case 0:h.inside.settings.type=Element$1.Effects.BevelType.HARD;break;case 1:h.inside.settings.type=Element$1.Effects.BevelType.SOFT;break;case 2:h.inside.settings.type=Element$1.Effects.BevelType.BUMP}switch(e.Fill.LParam){case 0:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFT;break;case 1:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP;break;case 2:h.inside.settings.dir=Element$1.Effects.FilterDirection.TOP;break;case 3:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHTTOP;break;case 4:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHT;break;case 5:h.inside.settings.dir=Element$1.Effects.FilterDirection.RIGHTBOTTOM;break;case 6:h.inside.settings.dir=Element$1.Effects.FilterDirection.BOTTOM;break;case 7:h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTBOTTOM;break;case 8:h.inside.settings.dir=Element$1.Effects.FilterDirection.CENTER}break;case StyleConstant.FillEffect.InShadow:n=Math.min(n,50)/2,e.Fill.WParam?(a=e.Fill.WParam,(a<0||a>100)&&(a=20),n=n*a/100):n/=5,h.inside.type=Effects.EffectType.INNERSHADOW,h.inside.settings.size=n,h.inside.settings.dir=Element$1.Effects.FilterDirection.LEFTTOP;break;case StyleConstant.FillEffect.InGlow:n=Math.min(n,50)/2,e.Fill.WParam?(a=e.Fill.WParam,(a<0||a>100)&&(a=20),n=n*a/100):n/=5,h.inside.type=Effects.EffectType.INNERGLOW,h.inside.settings.size=n,h.inside.settings.color=e.Fill.EffectColor}return h.extent=l,LogUtil.Debug("= S.BaseDrawObject CalcEffectSettings - Output:",h),h}CreateGradientRecord(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject: CreateGradientRecord - Input:",{flags:t,color1:e,opacity1:i,color2:n,opacity2:s});let a={type:BConstant.GradientStyle.Linear,startPos:BConstant.GradientPos.LeftTop,stops:[]},o={color:e,opacity:i},r={color:n,opacity:s};return t&T3Constant.GradientStyle.GradRev&&(o={color:n,opacity:s},r={color:e,opacity:i}),t&T3Constant.GradientStyle.GradMiddle?(a.stops.push({offset:0,color:o.color,opacity:o.opacity}),a.stops.push({offset:50,color:r.color,opacity:r.opacity}),a.stops.push({offset:100,color:o.color,opacity:o.opacity})):(a.stops.push({offset:0,color:o.color,opacity:o.opacity}),a.stops.push({offset:100,color:r.color,opacity:r.opacity})),t&T3Constant.GradientStyle.GradRadial?(a.type=BConstant.GradientStyle.Radial,a.startPos=BConstant.GradientPos.Center):t&T3Constant.GradientStyle.GradShape?(a.type=BConstant.GradientStyle.Radialfill,a.startPos=BConstant.GradientPos.Center):(a.type=BConstant.GradientStyle.Linear,t&T3Constant.GradientStyle.GradTlbr?a.startPos=BConstant.GradientPos.LeftTop:t&T3Constant.GradientStyle.GradTrbl?a.startPos=BConstant.GradientPos.RightTop:t&T3Constant.GradientStyle.GradVert?a.startPos=BConstant.GradientPos.Top:t&T3Constant.GradientStyle.GradHoriz?a.startPos=BConstant.GradientPos.Left:a.startPos=BConstant.GradientPos.LeftTop),LogUtil.Debug("= S.BaseDrawObject: CreateGradientRecord - Output:",a),a}CreateRichGradientRecord(t){if(LogUtil.Debug("= S.BaseDrawObject: CreateRichGradientRecord - Input:",{index:t}),t<0||t>=T3Gv.opt.richGradients.length)return LogUtil.Debug("= S.BaseDrawObject: CreateRichGradientRecord - Output:",null,"(Invalid index)"),null;const e=T3Gv.opt.richGradients[t];let i={type:BConstant.GradientStyle.Linear,startPos:BConstant.GradientPos.LeftTop,stops:[]};switch(e.gradienttype){case StyleConstant.RichGradientTypes.Linear:i.type=BConstant.GradientStyle.Linear,i.angle=e.angle;break;case StyleConstant.RichGradientTypes.BR:case StyleConstant.RichGradientTypes.RectBR:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.RightBottom;break;case StyleConstant.RichGradientTypes.BL:case StyleConstant.RichGradientTypes.RectBL:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.LeftBottom;break;case StyleConstant.RichGradientTypes.RadialCenter:case StyleConstant.RichGradientTypes.RectCenter:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.Center;break;case StyleConstant.RichGradientTypes.RadialTR:case StyleConstant.RichGradientTypes.RectTR:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.RightTop;break;case StyleConstant.RichGradientTypes.RadialTL:case StyleConstant.RichGradientTypes.RectTL:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.LeftTop;break;case StyleConstant.RichGradientTypes.RadialBC:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.Bottom;break;case StyleConstant.RichGradientTypes.RadialTC:i.type=BConstant.GradientStyle.Radial,i.startPos=BConstant.GradientPos.Top;break;case StyleConstant.RichGradientTypes.Shape:i.type=BConstant.GradientStyle.Radialfill,i.startPos=BConstant.GradientPos.Center}for(let n=0;n<e.stops.length;n++){const t=e.stops[n];i.stops.push({color:t.color,opacity:t.opacity,offset:t.stop})}return LogUtil.Debug("= S.BaseDrawObject: CreateRichGradientRecord - Output:",i),i}CalcLineHops(t){}AddHopPoint(t,e,i,n,s,a){LogUtil.Debug("= S.BaseDrawObject: AddHopPoint input:",{pointA:t,pointB:e,hopIndex:i,radius:n,angle:s,flag:a});const o={bSuccess:!1,tindex:-1};return LogUtil.Debug("= S.BaseDrawObject: AddHopPoint output:",o),o}ResetAutoScrollTimer(){LogUtil.Debug("= S.BaseDrawObject: ResetAutoScrollTimer - Input: {}"),-1!==T3Gv.opt.autoScrollTimerId?(T3Gv.opt.autoScrollTimer.clearTimeout(T3Gv.opt.autoScrollTimerId),T3Gv.opt.autoScrollTimer.obj=T3Gv.opt,T3Gv.opt.autoScrollTimerId=-1,LogUtil.Debug("= S.BaseDrawObject: ResetAutoScrollTimer - Output: Timer has been reset")):LogUtil.Debug("= S.BaseDrawObject: ResetAutoScrollTimer - Output: No active timer to reset")}GetActionButtons(){return null}GetArrowheadSelection(t){LogUtil.Debug("= S.BaseDrawObject: GetArrowheadSelection - Input:",{selection:t});return LogUtil.Debug("= S.BaseDrawObject: GetArrowheadSelection - Output:",false),false}SetRolloverActions(t,e){if(LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - Input:",{rolloverElement:t,eventObj:e}),-1!==T3Gv.opt.curHiliteShape&&T3Gv.opt.curHiliteShape!==this.BlockID){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.curHiliteShape,!1);t&&(LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - Clearing previous shape:",T3Gv.opt.curHiliteShape),t.SetRuntimeEffects(!1),t.ClearCursors())}this.SetRuntimeEffects(!0),this.SetCursors(),T3Gv.opt.curHiliteShape=this.BlockID;const i=this;e.svgObj.mouseout((function(){LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - MouseOut Triggered for BlockID:",i.BlockID),i.SetRuntimeEffects(!1),i.ClearCursors(),T3Gv.opt.curHiliteShape===i.BlockID&&(T3Gv.opt.curHiliteShape=-1),LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - MouseOut Completed for BlockID:",i.BlockID)})),LogUtil.Debug("= S.BaseDrawObject SetRolloverActions - Output: Completed setup for BlockID",this.BlockID)}CalcCursorForAngle(t,e){LogUtil.Debug("= S.BaseDrawObject: CalcCursorForAngle - Input:",{angle:t,swap:e}),t=10*Math.round(t/10);let i=CursorConstant.CursorType.ResizeLR;if(t>0&&t<90||t>180&&t<270?i=CursorConstant.CursorType.NwseResize:t>90&&t<180||t>270&&t<360?i=CursorConstant.CursorType.NeswResize:90!==t&&270!==t||(i=CursorConstant.CursorType.ResizeTB),e)switch(i){case CursorConstant.CursorType.ResizeLR:i=CursorConstant.CursorType.ResizeTB;break;case CursorConstant.CursorType.ResizeTB:i=CursorConstant.CursorType.ResizeLR;break;case CursorConstant.CursorType.NwseResize:i=CursorConstant.CursorType.NeswResize;break;case CursorConstant.CursorType.NeswResize:i=CursorConstant.CursorType.NwseResize}return LogUtil.Debug("= S.BaseDrawObject: CalcCursorForAngle - Output:",i),i}FoundText(t,e,i){if(LogUtil.Debug("= S.BaseDrawObject FoundText - Input:",{searchText:t,selectionLength:e,targetBlockId:i}),this.BlockID===i)return LogUtil.Debug("= S.BaseDrawObject FoundText - Output:",!1,"Same BlockID"),!1;let n=!1;if(this.DataID>=0){const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(i){const s=i.textElem;if(s){const a=s.GetText(0).search(t);a>=0&&(TextUtil.ActivateTextEdit(i),s.SetSelectedRange(a,a+e),n=!0)}}}return LogUtil.Debug("= S.BaseDrawObject FoundText - Output:",n),n}MoveBehindAllLinked(){LogUtil.Debug("= S.BaseDrawObject MoveBehindAllLinked - Input: {}");let t=!1,e=LayerUtil.FrontMostLayerZListPreserve(),i=this.BlockID,n=$$1.inArray(i,e),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0);if(s){let a=OptCMUtil.FindLink(s,i,!0);for(;a>=0&&a<s.length&&s[a].targetid===i;){let o=s[a].hookid,r=$$1.inArray(o,e);n>r&&(e[r]=i,e[n]=o,n=r,t=!0),a++}}return LogUtil.Debug("= S.BaseDrawObject MoveBehindAllLinked - Output: { hasMoved: "+t+" }"),t}HookedObjectMoving(t){LogUtil.Debug("= S.BaseDrawObject HookedObjectMoving - Input:",{event:t});return LogUtil.Debug("= S.BaseDrawObject HookedObjectMoving - Output:",false),false}CustomSnap(t,e,i,n,s){LogUtil.Debug("= S.BaseDrawObject CustomSnap - Input:",{snapTarget:t,snapOptions:e,tolerance:i,additionalData:n,flag:s});return LogUtil.Debug("= S.BaseDrawObject CustomSnap - Output:",false),false}GetSnapRect(){LogUtil.Debug("= S.BaseDrawObject GetSnapRect - Input:",{frame:this.Frame});const t={};return Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseDrawObject GetSnapRect - Output:",t),t}CanSnapToShapes(){LogUtil.Debug("= S.BaseDrawObject CanSnapToShapes - Input: {}");return LogUtil.Debug("= S.BaseDrawObject CanSnapToShapes - Output:",-1),-1}IsSnapTarget(){LogUtil.Debug("= S.BaseDrawObject IsSnapTarget - Input:",{});return LogUtil.Debug("= S.BaseDrawObject IsSnapTarget - Output:",false),false}GuideDistanceOnly(){LogUtil.Debug("= S.BaseDrawObject GuideDistanceOnly - Input:",{});return LogUtil.Debug("= S.BaseDrawObject GuideDistanceOnly - Output:",false),false}ActionApplySnaps(t,e){LogUtil.Debug("= S.BaseDrawObject ActionApplySnaps - Input:",{snapTarget:t,snapOptions:e});return LogUtil.Debug("= S.BaseDrawObject ActionApplySnaps - Output:",null),null}GetNotePos(t,e){LogUtil.Debug("= S.BaseDrawObject GetNotePos - Input:",{source:t,container:e});let i=Utils1.DeepCopy(t.Frame);e&&(i.x+=e.frame.x,i.y+=e.frame.y,i.width=e.frame.width-5,i.height=e.frame.height-6);const n=i.width,s=i.height,a={x:i.x+n,y:i.y+s+t.StyleRecord.Line.Thickness/2+1};return LogUtil.Debug("= S.BaseDrawObject GetNotePos - Output:",a),a}RefreshFromRuleChange(t,e){LogUtil.Debug("= S.BaseDrawObject RefreshFromRuleChange - Input:",{fieldDataTableID:t,fieldDataElementID:e}),this.HasFieldDataRecord(t,e,!0)?(this.GetFieldDataStyleOverride(),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("= S.BaseDrawObject RefreshFromRuleChange - Output: Rule change refreshed",{BlockID:this.BlockID})):LogUtil.Debug("= S.BaseDrawObject RefreshFromRuleChange - Output: No matching field data record",{fieldDataTableID:t,fieldDataElementID:e})}IsShapeContainer(t){LogUtil.Debug("= S.BaseDrawObject IsShapeContainer - Input:",t);return LogUtil.Debug("= S.BaseDrawObject IsShapeContainer - Output:",false),false}HasFieldData(){}HasFieldDataForTable(t){}HasFieldDataInText(t){}SetFieldDataRecord(t,e,i){}NewFieldDataRecord(t){}HasFieldDataRecord(t,e,i){}ChangeFieldDataTable(t){}RemoveFieldData(t,e){}GetFieldDataTable(){}GetFieldDataRecord(){}HasFieldDataRules(t){}GetFieldDataStyleOverride(){if(LogUtil.Debug("= S.BaseDrawObject: GetFieldDataStyleOverride input"),this.HasFieldData()&&this.fieldDataElemID>=0?this.dataStyleOverride=TODO.STData.FieldedDataProcessRulesForRecord(this.fieldDataTableID,this.fieldDataElemID):this.dataStyleOverride=null,this.bInGroup){const t=T3Gv.opt.FindParentGroup(this.BlockID);if(t){const e=t.GetFieldDataStyleOverride();if(e){const t=Utils1.DeepCopy(e);t.glowColor=null,t.iconID=null,this.dataStyleOverride?this.dataStyleOverride=$$1.extend(!0,{},t,this.dataStyleOverride):this.dataStyleOverride=t}}}return LogUtil.Debug("= S.BaseDrawObject: GetFieldDataStyleOverride output:",this.dataStyleOverride),this.dataStyleOverride}RefreshFromFieldData(t){}RefreshFromRuleChange(t,e){}RemapDataFields(t){}RegisterForDataDrop(t){}GetFieldDataStyleOverride(){}SetBlobBytes(t,e){var i=new BlobBytes(e,t);if(this.BlobBytesID>=0){var n=T3Gv.stdObj.PreserveBlock(this.BlobBytesID);n&&(n.Data=i)}else{var s=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.BlobBytesObject,i);s&&(this.BlobBytesID=s.ID)}}}__decorateClass$4([Type((()=>QuickStyle))],BaseDrawObject$1.prototype,"StyleRecord",2),__decorateClass$4([Type((()=>Point$1))],BaseDrawObject$1.prototype,"prevBBox",2),__decorateClass$4([Type((()=>Point$1))],BaseDrawObject$1.prototype,"StartPoint",2),__decorateClass$4([Type((()=>Point$1))],BaseDrawObject$1.prototype,"EndPoint",2),__decorateClass$4([Type((()=>PolyList))],BaseDrawObject$1.prototype,"polylist",2);const _T3Timer=class{constructor(t){this.context=t||window}setInterval(t,e){const i=_T3Timer.getNewTimerId();if(_T3Timer.timerRegistry[i]={},"string"==typeof t){const n=t;_T3Timer.timerRegistry[i].timer=window.setInterval((()=>{this.context&&this.context[n]&&this.context[n]()}),e)}else _T3Timer.timerRegistry[i].timer=window.setInterval((()=>{t.call(this.context)}),e);return i}setTimeout(t,e,...i){const n=_T3Timer.getNewTimerId();if(_T3Timer.timerRegistry[n]={},"string"==typeof t){const s=t;_T3Timer.timerRegistry[n].timer=window.setTimeout((()=>{this.context&&this.context[s]&&this.context[s](...i),_T3Timer.timerRegistry[n]=null}),e)}else _T3Timer.timerRegistry[n].timer=window.setTimeout((()=>{t.call(this.context,...i),_T3Timer.timerRegistry[n]=null}),e);return n}clearInterval(t){_T3Timer.timerRegistry[t]&&(window.clearInterval(_T3Timer.timerRegistry[t].timer),_T3Timer.timerRegistry[t]=null)}clearTimeout(t){_T3Timer.timerRegistry[t]&&(window.clearTimeout(_T3Timer.timerRegistry[t].timer),_T3Timer.timerRegistry[t]=null)}static getNewTimerId(){let t=0;for(;_T3Timer.timerRegistry[t];)t++;return t}};let T3Timer=_T3Timer;T3Timer.timerRegistry=[];class ActionUtil{static ClearAllActionArrowTimers(){LogUtil.Debug("O.Opt ClearAllActionArrowTimers: input");const t=LayerUtil.VisibleZList();for(let e=0;e<t.length;e++){const i=ObjectUtil$1.GetObjectPtr(t[e],!1);i&&-1!==i.actionArrowHideTimerID&&(T3Gv.opt.actionArrowHideTimer.clearTimeout(i.actionArrowHideTimerID),i.actionArrowHideTimerID=-1)}LogUtil.Debug("O.Opt ClearAllActionArrowTimers: output")}static RemoveAllActionArrows(){LogUtil.Debug("O.Opt RemoveAllActionArrows - Input: no parameters");const t=LayerUtil.VisibleZList();for(let e=0;e<t.length;e++)this.RemoveActionArrows(t[e],!0);LogUtil.Debug("O.Opt RemoveAllActionArrows - Output: Removed arrows from",t.length,"objects")}static ClearActionArrowTimer(t){if(LogUtil.Debug("O.Opt ClearActionArrowTimer - Input:",t),t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!1);e?e.actionArrowHideTimerID>=0?(T3Gv.opt.actionArrowHideTimer.clearTimeout(e.actionArrowHideTimerID),e.actionArrowHideTimerID=-1,LogUtil.Debug("O.Opt ClearActionArrowTimer - Timer cleared for object",t)):LogUtil.Debug("O.Opt ClearActionArrowTimer - No active timer for object",t):LogUtil.Debug("O.Opt ClearActionArrowTimer - No target object found for id",t)}else LogUtil.Debug("O.Opt ClearActionArrowTimer - Invalid objectId:",t);LogUtil.Debug("O.Opt ClearActionArrowTimer - Output: Completed")}static RemoveActionArrows(t,e){LogUtil.Debug("O.Opt RemoveActionArrows - Input:",{objectId:t,clearTimer:e});const i="actionArrow"+t;if(e)this.ClearActionArrowTimer(t);else{const e=ObjectUtil$1.GetObjectPtr(t,!1);e&&(e.actionArrowHideTimerID=-1)}T3Gv.opt.fromOverlayLayer?setTimeout((()=>{this.SetActionArrowTimer(t)}),0):SvgUtil.ClearOverlayElementsByID(i),LogUtil.Debug("O.Opt RemoveActionArrows - Output: Completed")}static SetActionArrowTimer(t){if(LogUtil.Debug("O.Opt SetActionArrowTimer - Input:",t),t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!1);e?(this.ClearActionArrowTimer(t),e.actionArrowHideTimerID=T3Gv.opt.actionArrowHideTimer.setTimeout("RemoveActionArrows",500,t),LogUtil.Debug("O.Opt SetActionArrowTimer - Timer set for object",t)):LogUtil.Debug("O.Opt SetActionArrowTimer - No target object found for id",t)}else LogUtil.Debug("O.Opt SetActionArrowTimer - Invalid objectId:",t);LogUtil.Debug("O.Opt SetActionArrowTimer - Output: Completed")}}class GlobalMsgModel{constructor(t,e,i,n,s={}){this.type=t||"info",this.message=e||"",this.isShow=i||!1,this.msgType=n||"",this.extral=s||{}}}class QuasarUtil{initQuasar(t){this.$q=t}setGlobalMsg(t,e,i,n,s){const a=globalMsg.value.findIndex((t=>t.msgType===n));if(-1!==a)globalMsg.value[a].type=t,globalMsg.value[a].message=e,globalMsg.value[a].isShow=i,globalMsg.value[a].msgType=n,globalMsg.value[a].extral=s||{};else{const a=new GlobalMsgModel;a.type=t||"info",a.message=e||"",a.isShow=i||!1,a.msgType=n||"",a.extral=s||{},globalMsg.value.push(a)}LogUtil.Debug("= U.QuasarUtil setGlobalMsg",{...globalMsg.value})}clearGlobalMsg(t){globalMsg.value=globalMsg.value.filter((e=>e.msgType!==t)),LogUtil.Debug("= U.QuasarUtil clearGlobalMsg",{...globalMsg.value})}clearAllGlobalMsg(){globalMsg.value=[]}ShowLOAD_GRAPHIC_ENTRY_RESSuccess(){LogUtil.Debug("= U.QuasarUtil Graphic loaded successfully")}ShowGET_INITIAL_DATA_RESSuccess(){LogUtil.Debug("= U.QuasarUtil Initial data loaded successfully")}ShowWebSocketError(t){this.$q.notify({message:t,color:"negative",icon:"error",actions:[{label:"Dismiss",color:"white",handler:()=>{}}]})}setLocalSettings(t,e){localSettings.value[t]=e,localStorage.setItem("localSettings",JSON.stringify(localSettings.value))}getLocalSettings(t){const e=localStorage.getItem("localSettings");if(e)return JSON.parse(e)[t]}static ShowContextMenu(t,e,i){LogUtil.Debug("= u.QuasarUtil ShowContextMenu/","isShow,from,type,rClickParam=>",t,e,i,T3Gv.opt.rClickParam),ctxMenuConfig.value={isShow:t,from:e,type:i},objectConfigShow.value=!1}static ShowObjectConfig(t){LogUtil.Debug("= U.QuasarUtil ShowObjectConfig","show=>",t),objectConfigShow.value=t}static UpdateCurrentObjectPos(t){var e,i,n;if(t){const s=null!=(n=null==(i=null==(e=appStateV2)?void 0:e.value)?void 0:i.activeItemIndex)?n:"-1";if("-1"!==s){let e=appStateV2.value.items[s];void 0!==e&&null!=e&&(appStateV2.value.items[s].translate=[t.x,t.y],appStateV2.value.items[s].width=t.width,appStateV2.value.items[s].height=t.height,appStateV2.value.items[s].rotate=t.rotate)}}}static LinkT3EntryDialogActionV2(){var t,e;LogUtil.Debug("= U.QuasarUtil P.IDX2 linkT3EntryDialogAction","open linkT3EntryDialog V2"),linkT3EntryDialogV2.value.active=!0,(null==(t=appStateV2.value.items[appStateV2.value.activeItemIndex])?void 0:t.t3Entry)&&(linkT3EntryDialogV2.value.data=lodash.exports.cloneDeep(null==(e=appStateV2.value.items[appStateV2.value.activeItemIndex])?void 0:e.t3Entry))}static LinkT3EntrySaveV2(){LogUtil.Debug("= U.QuasarUtil Idx linkT3EntrySave linkT3EntryDialog.value.data=",linkT3EntryDialogV2.value.data),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField||(void 0===appStateV2.value.items[appStateV2.value.activeItemIndex].label?appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="description":appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="label");if(void 0!==linkT3EntryDialogV2.value.data.value&&null!==linkT3EntryDialogV2.value.data.value&&linkT3EntryDialogV2.value.data.value>=1e3&&(linkT3EntryDialogV2.value.data.value=linkT3EntryDialogV2.value.data.value/1e3),appStateV2.value.items[appStateV2.value.activeItemIndex].t3Entry=lodash.exports.cloneDeep(toRaw(linkT3EntryDialogV2.value.data)),"Icon"===appStateV2.value.items[appStateV2.value.activeItemIndex].type){let t="fa-solid fa-camera-retro";"GRP"===linkT3EntryDialogV2.value.data.type?t="fa-solid fa-camera-retro":"SCHEDULE"===linkT3EntryDialogV2.value.data.type?t="schedule":"PROGRAM"===linkT3EntryDialogV2.value.data.type?t="fa-solid fa-laptop-code":"HOLIDAY"===linkT3EntryDialogV2.value.data.type&&(t="calendar_month"),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.icon=t}IdxUtils.refreshObjectStatus(appStateV2.value.items[appStateV2.value.activeItemIndex]),linkT3EntryDialogV2.value.data=null,linkT3EntryDialogV2.value.active=!1,DataOpt.SaveAppStateV2(),SvgUtil.RenderAllSVGObjects(),LogUtil.Debug("= U.QuasarUtil P.IDX2 linkT3EntryDialogAction","close linkT3EntryDialog V2",appStateV2.value)}static AddCurrentObjectToAppState(){let t=SelectUtil.GetTargetSelect();var e=ObjectUtil$1.GetObjectPtr(t,!1);LogUtil.Debug("= U.QuasarUtil AddCurrentObjectToAppState targetObject:",e);var i={x:e.Frame.x,y:e.Frame.y,width:e.Frame.width,height:e.Frame.height},n=e.uniqueId,s=e.uniType;LogUtil.Debug("= U.QuasarUtil AddCurrentObjectToAppState uniqueId:|uniType:",i,n,s);const a=NewTool.find((t=>t.name===s));this.AddToAppStateV2(i,a,n),this.SetAppStateV2SelectIndex(a),DataOpt.SaveAppStateV2()}static AddToAppStateV2(t,e,i){const n={width:t.width,height:t.height},s={clientX:t.x,clientY:t.y,top:t.x,left:t.y},a=this.drawObject(n,s,e,i);LogUtil.Debug("= U.QuasarUtil AddToAppStateV2",a,appStateV2.value)}static drawObject(t,e,i,n){var s;const a=lodash.exports.cloneDeep(null==(s=NewTool.find((t=>t.name===(null==i?void 0:i.name))))?void 0:s.settings)||{},o=Object.keys(a).reduce(((t,e)=>(t[e]=a[e].value,t)),{}),r={title:null,active:!1,type:null==i?void 0:i.name,translate:[e.clientX,e.clientY],width:t.width,height:t.height,rotate:0,scaleX:1,scaleY:1,settings:o,zindex:1,t3Entry:null,showDimensions:!0};return this.addObject(r,n)}static addObject(t,e,i,n=!0){return appStateV2.value.itemsCount++,t.id=appStateV2.value.itemsCount,t.uniqueId=e,t.group=i,t.settings.titleColor=t.settings.titleColor||"inherit",t.settings.bgColor=t.settings.bgColor||"inherit",t.settings.textColor=t.settings.textColor||"inherit",t.settings.fontSize=t.settings.fontSize||13,appStateV2.value.items.push(t),appStateV2.value.elementGuidelines=[],t}static SetAppStateV2SelectIndex(t){var e,i;let n="";if(t)n=null!=(e=null==t?void 0:t.name)?e:"";else{let t=SelectUtil.GetTargetSelect();var s=ObjectUtil$1.GetObjectPtr(t,!1);s&&(n=null!=(i=null==s?void 0:s.uniqueId)?i:"")}appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((t=>`${t.uniqueId}`===n)),LogUtil.Debug("= U.QuasarUtil SetAppStateV2SelectIndex",appStateV2.value)}static GetItemFromAPSV2(t){let e=appStateV2.value.items.find((e=>e.uniqueId===t));return e||(LogUtil.Debug(`= U.QuasarUtil Item with id ${t} not found in appStateV2`),null)}static UpdateSvgElementSettings(t,e){LogUtil.Debug("= U.QuasarUtil UpdateSvgElementSettings Input: key,value",t,e,T3Gv.stdObj);var i=SelectUtil.GetSelectedObject(),n=i.selectedObject.GetDrawSetting();(n=n||{})[t]=e,LogUtil.Debug(`= U.QuasarUtil Updated drawSetting: ${t}=${e}`,n),i.selectedObject.SetDrawSetting(n)}}class BaseShape extends BaseDrawObject$1{constructor(t){LogUtil.Debug("= S.BaseShape - constructor input:",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Shape,0!==t.hookflags&&(t.hookflags=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcAttachToLine),0!==t.targflags&&(t.targflags=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcLine),super(t),this.ShapeType=t.ShapeType,this.shapeparam=t.shapeparam||0,this.SVGDim=t.SVGDim||{},LogUtil.Debug("= S.BaseShape - constructor output:",this)}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.BaseShape - CreateActionTriggers input:",{svgDocument:t,triggerIdentifier:e,rotationProvider:i,comparisonTrigger:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL],a=t.CreateShape(OptConstant.CSType.Group),o=OptConstant.Common.KnobSize,r=OptConstant.Common.RKnobSize;let l=this.extraflags&OptConstant.ExtraFlags.SideKnobs&&this.dataclass===PolygonConstant.ShapeTypes.POLYGON;const h=OptConstant.Common.MinSidePointLength;let c=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(c*=2);const u=o/c,d=r/c,p=this.Frame;let g=p.width+u,f=p.height+u;const m=Utils1.DeepCopy(p);m.x-=u/2,m.y-=u/2,m.width+=u,m.height+=u;let v=i.GetRotation()+22.5;v>=360&&(v=0);const b=Math.floor(v/45),y=s.slice(b).concat(s.slice(0,b));let S=!0,x=!l,w=!l;switch(this.ObjGrow){case OptConstant.GrowBehavior.Horiz:S=!1,w=!1;break;case OptConstant.GrowBehavior.Vertical:S=!1,x=!1;break;case OptConstant.GrowBehavior.ProPortional:S=!0,x=!1,w=!1}const C={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:u,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1};if(e!==n&&(C.fillColor="white",C.strokeSize=1,C.strokeColor="black",C.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock)C.fillColor="gray",C.locked=!0,l=!1;else if(this.NoGrow()){C.fillColor="red",l=!1,C.strokeColor="red";for(let t=0;t<8;t++)y[t]=CursorConstant.CursorType.Default}let T;S&&(C.knobID=OptConstant.ActionTriggerType.TopLeft,C.cursorType=y[0],T=this.GenericKnob(C),a.AddElement(T),C.x=g-u,C.y=0,C.cursorType=y[2],C.knobID=OptConstant.ActionTriggerType.TopRight,T=this.GenericKnob(C),a.AddElement(T),C.x=g-u,C.y=f-u,C.cursorType=y[4],C.knobID=OptConstant.ActionTriggerType.BottomRight,T=this.GenericKnob(C),a.AddElement(T),C.x=0,C.y=f-u,C.cursorType=y[6],C.knobID=OptConstant.ActionTriggerType.BottomLeft,T=this.GenericKnob(C),a.AddElement(T)),w&&(C.x=g/2-u/2,C.y=0,C.cursorType=y[1],C.knobID=OptConstant.ActionTriggerType.TopCenter,T=this.GenericKnob(C),a.AddElement(T),C.x=g/2-u/2,C.y=f-u,C.cursorType=y[5],C.knobID=OptConstant.ActionTriggerType.BottomCenter,T=this.GenericKnob(C),a.AddElement(T)),x&&(C.x=0,C.y=f/2-u/2,C.cursorType=y[7],C.knobID=OptConstant.ActionTriggerType.CenterLeft,T=this.GenericKnob(C),a.AddElement(T),C.x=g-u,C.y=f/2-u/2,C.cursorType=y[3],C.knobID=OptConstant.ActionTriggerType.CenterRight,T=this.GenericKnob(C),a.AddElement(T));const D=function(t){let e=null;if(t.hooks.length){const i=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1);i&&(i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||i&&i instanceof Instance.Shape.ShapeContainer)&&(e=i.PrGetShapeConnectorInfo(t.hooks[0]))}return e}(this);if(D&&D.length){const e={svgDoc:t,iconSize:14,imageURL:null,iconID:0,userData:0,cursorType:0};for(let t=0,i=D.length;t<i;t++)"right"===D[t].position?e.x=g-14-1-u:e.x=u+1,"bottom"===D[t].position?e.y=f-14-1-u:e.y=u+1,e.cursorType=D[t].cursorType,e.iconID=D[t].knobID,e.imageURL="vertical"===D[t].polyType?OptConstant.Common.ConMoveVerticalPath:OptConstant.Common.ConMoveHorizontalPath,e.userData=D[t].knobData,T=this.GenericIcon(e),a.AddElement(T),e.x+=16}if(l){const t=Utils1.DeepCopy(this);t.inside=Utils1.DeepCopy(t.Frame);const e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,[]);if(e){C.shapeType=OptConstant.CSType.Oval,C.knobID=OptConstant.ActionTriggerType.MovePolySeg,C.fillColor="green",C.strokeColor="green";for(let t=1,i=e.length;t<i;t++){const i=e[t].x-e[t-1].x,n=e[t].y-e[t-1].y;Utils2.Sqrt(i*i+n*n)>h&&(C.cursorType=i*i>n*n?CursorConstant.CursorType.ResizeTB:CursorConstant.CursorType.ResizeLR,C.x=e[t-1].x+i/2,C.y=e[t-1].y+n/2,T=this.GenericKnob(C),T.SetUserData(t),a.AddElement(T))}}}const k=p.width<44;let $=this.hooks.length>0;if($){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&t.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Connector&&($=!1)}if(!(this.NoRotate()||this.NoGrow()||C.locked||k||$)){const t=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal&&this.flags&NvConstant.ObjFlags.TextOnly&&ShapeUtil.TextAlignToWin(this.TextAlign).just===TextConstant.TextJust.Left;C.shapeType=OptConstant.CSType.Oval,C.x=t?g+d:g-3*d,C.y=f/2-d/2,C.cursorType=CursorConstant.CursorType.Rotate,C.knobID=OptConstant.ActionTriggerType.Rotate,C.fillColor="white",C.fillOpacity=.001,C.strokeSize=1.5,C.strokeColor="black",T=this.GenericKnob(C),a.AddElement(T)}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(a,t,C)}return a.SetSize(g,f),a.SetPos(m.x,m.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.BaseShape - CreateActionTriggers output:",a),a}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.BaseShape - CreateConnectHilites input:",{svgDoc:t,triggerId:e,targetParam:i,additionalParam:n,extraParam:s,connectionHint:a});const o=t.CreateShape(OptConstant.CSType.Group);let r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);const l=OptConstant.Common.ConnPointDim/r;let h=[];this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;const c=this.flags&NvConstant.ObjFlags.ContConn||null!=a;if(c)h.push(i);else if(h=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps,null),null==h)return;const u=this.GetPerimPts(e,h,null,!c,a,s),d=this.Frame;let p=d.width,g=d.height;const f=Utils1.DeepCopy(d);f.x-=l/2,f.y-=l/2,f.width+=l,f.height+=l,p+=l,g+=l;const m={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:0,y:0,knobSize:l,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",KnobID:0,cursorType:CursorConstant.CursorType.Anchor};let v;if(c)f.x=u[0].x,f.y=u[0].y,f.x-=l,f.y-=l,m.x=l/2,m.y=l/2,v=this.GenericKnob(m),o.AddElement(v),o.SetSize(f.width,f.height),o.SetPos(f.x,f.y);else{for(let t=0;t<u.length;t++)m.x=u[t].x-this.Frame.x,m.y=u[t].y-this.Frame.y,v=this.GenericKnob(m),o.AddElement(v);o.SetSize(p,g),o.SetPos(f.x,f.y)}return o.isShape=!0,o.SetEventBehavior(OptConstant.EventBehavior.None),o.SetID("hilite_"+e),LogUtil.Debug("= S.BaseShape - CreateConnectHilites output:",o),o}SetCursors(){LogUtil.Debug("= S.BaseShape - SetCursors input, BlockID:",this.BlockID);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.TextFlags,NvConstant.TextFlags.OneClick;switch(OptCMUtil.GetEditMode()){case NvConstant.EditState.Default:super.SetCursors();break;case NvConstant.EditState.FormatPaint:{LogUtil.Debug("= S.BaseShape - SetCursors: FORMATPAINT mode");const e=t.GetElementById(OptConstant.SVGElementClass.Shape);e&&e.SetCursor(CursorConstant.CursorType.Paint);const i=t.GetElementById(OptConstant.SVGElementClass.Slop);i&&i.SetCursor(CursorConstant.CursorType.Paint);break}default:LogUtil.Debug("= S.BaseShape - SetCursors: Default mode, calling super.SetCursors()"),super.SetCursors()}LogUtil.Debug("= S.BaseShape - SetCursors output, BlockID:",this.BlockID)}GetTextObject(t,e){LogUtil.Debug("= S.BaseShape - GetTextObject input:",{clickEvent:t,skipTableRelease:e});const i=this.GetGraph(!1);if(i){this.DataID=i.selectedText;const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&(t.textElem=t.GetElementById(OptConstant.SVGElementClass.Text,this.DataID))}else this.DataID>=0&&null==ObjectUtil$1.GetObjectPtr(this.DataID,!1)&&(this.DataID=-1);return LogUtil.Debug("= S.BaseShape - GetTextObject output:",{DataID:this.DataID}),this.DataID}UseTextBlockColor(){LogUtil.Debug("= S.BaseShape - UseTextBlockColor input:",{TextFlags:this.TextFlags,FillPaintType:this.StyleRecord.Fill.Paint.FillType,TextPaintColor:this.StyleRecord.Text.Paint.Color,FillColor:this.StyleRecord.Fill.Paint.Color});const t=this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB,e=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent,i=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Solid&&this.StyleRecord.Text.Paint.Color.toUpperCase()===this.StyleRecord.Fill.Paint.Color.toUpperCase(),n=t||e||i;return LogUtil.Debug("= S.BaseShape - UseTextBlockColor output:",n),n}SetTextObject(t){if(LogUtil.Debug("= S.BaseShape - SetTextObject input:",t),this.UseTextBlockColor()){const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);t&&(this.StyleRecord.Text.Paint=Utils1.DeepCopy(t.Text.Paint))}return this.DataID=t,LogUtil.Debug("= S.BaseShape - SetTextObject output:",this.DataID),!0}GetTextParams(t){LogUtil.Debug("= S.BaseShape - GetTextParams input:",{eventData:t});let e={};const i=this.GetGraph(!1);return i&&i.selectedText>=0?e=T3Gv.opt.Graph_GetTRect(this,i,t):(e.trect=Utils1.DeepCopy(this.trect),e.sizedim=Utils1.DeepCopy(this.sizedim),e.tsizedim={width:this.sizedim.width-(this.Frame.width-this.trect.width),height:this.sizedim.height-(this.Frame.height-this.trect.height)}),LogUtil.Debug("= S.BaseShape - GetTextParams output:",e),e}GetTextDefault(t){LogUtil.Debug("= S.BaseShape - GetTextDefault input:",{eventData:t});const e=super.GetTextDefault(t);return LogUtil.Debug("= S.BaseShape - GetTextDefault output:",e),e}SetTextGrow(t){if(LogUtil.Debug("= S.BaseShape - SetTextGrow input:",t),this.TextGrow=t,this.DataID>=0){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){const e=t.textElem;if(this.TextGrow===NvConstant.TextGrowBehavior.Horizontal)e.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,this.trect.width,this.trect.height),LogUtil.Debug("= S.BaseShape - SetTextGrow applied Horizontal constraints");else{const t=Utils1.DeepCopy(this),i=Utils1.DeepCopy(this.Frame);i.width=this.sizedim.width,t.UpdateFrame(i),e.SetConstraints(t.trect.width,t.trect.width,this.trect.height),LogUtil.Debug("= S.BaseShape - SetTextGrow applied Vertical constraints")}}T3Gv.opt.TextResizeCommon(this.BlockID,!0),LogUtil.Debug("= S.BaseShape - SetTextGrow: TextResizeCommon called"),LogUtil.Debug("= S.BaseShape - SetTextGrow output:",this.TextGrow)}}ChangeShape(t,e,i,n,s){let a,o,r;LogUtil.Debug("= S.BaseShape - ChangeShape input:",{newDataClass:t,newShapeType:e,shapeParam:n,preserveAspect:s});const l=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(this.SymbolURL&&this.SymbolURL.length>0)return LogUtil.Debug("= S.BaseShape - ChangeShape output: SymbolURL exists, returning false"),!1;if(t!==this.dataclass||e===PolygonConstant.ShapeTypes.RECTANGLE){const h=Utils1.DeepCopy(this);if(s){const t=h.Frame.x+h.Frame.width/2,e=h.Frame.y+h.Frame.height/2;h.Frame.width>h.Frame.height?(h.Frame.x=t-h.Frame.height/2,h.Frame.width=h.Frame.height):(h.Frame.y=e-h.Frame.width/2,h.Frame.height=h.Frame.width)}switch(e){case PolygonConstant.ShapeTypes.RECTANGLE:case PolygonConstant.ShapeTypes.MEASURE_AREA:a=new Instance.Shape.Rect(h);break;case PolygonConstant.ShapeTypes.ROUNDED_RECTANGLE:h.shapeparam=l.def.rrectparam,a=new Instance.Shape.RRect(h),a.moreflags=Utils2.SetFlag(a.moreflags,OptConstant.ObjMoreFlags.FixedRR,!0),n=l.def.rrectparam;break;case PolygonConstant.ShapeTypes.OVAL:case PolygonConstant.ShapeTypes.CIRCLE:a=new Instance.Shape.Oval(h);break;case PolygonConstant.ShapeTypes.POLYGON:const t=i(this.Frame,n);h.VertexArray=t,a=new Instance.Shape.Polygon(h),a.NeedsSIndentCount=!0}if(o=T3Gv.stdObj.PreserveBlock(this.BlockID),a.dataclass=t,a.shapeparam=n,a.ResizeAspectConstrain=s,""===a.ImageURL&&(a.extraflags=Utils2.SetFlag(a.extraflags,OptConstant.ExtraFlags.FlipHoriz|OptConstant.ExtraFlags.FlipVert,!1)),a.ObjGrow=s?OptConstant.GrowBehavior.ProPortional:OptConstant.GrowBehavior.All,a.BlockID=o.Data.BlockID,a.left_sindent=0,a.top_sindent=0,a.right_sindent=0,a.bottom_sindent=0,o.Data=a,a.moreflags=Utils2.SetFlag(a.moreflags,OptConstant.ObjMoreFlags.FixedRR,!1),a.DataID>=0){a.UpdateFrame(a.Frame),a.sizedim.width=a.Frame.width,a.sizedim.height=a.Frame.height;const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e;if(t&&(e=t.textElem),r=Utils1.DeepCopy(a.trect),e){let t=e.CalcTextFit(r.width);t.height>r.height?(t=T3Gv.opt.FitProp(a,e,t.height-r.height,-1),a.Frame.width=t.x,a.Frame.height=t.y):a.TRectToFrame(r,!1)}}return a.SetSize(a.Frame.width,a.Frame.height,0),LogUtil.Debug("= S.BaseShape - ChangeShape output:",{result:!0,newShape:a}),!0}return LogUtil.Debug("= S.BaseShape - ChangeShape output: condition not met, returning false"),!1}SetShapeProperties(t){LogUtil.Debug("= S.BaseShape - SetShapeProperties input:",t);let e=!1,i=0,n=0,s=!1;const a=this.TextFlags,o=NvConstant.TextFlags;if(super.SetShapeProperties(t)&&(e=!0,(this.TextFlags&o.AttachA+o.AttachB)!=(a&o.AttachA+o.AttachB)&&this.DataID>=0)){let t;s=!0,t=this.TextFlags&o.AttachA+o.AttachB?Utils3.FindStyle(OptConstant.Common.TextBlockStyle):ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).def.style;const e={StyleRecord:{Text:{Paint:{Color:t.Text.Paint.Color}}}},i={Color:e.StyleRecord.Text.Paint.Color},n={color:e.StyleRecord.Text.Paint.Color};this.ChangeTextAttributes(n,i)}if(null!=t.tmargin&&this.TMargins.left!==t.tmargin){this.TMargins.left=t.tmargin,this.TMargins.right=t.tmargin,this.TMargins.top=t.tmargin,this.TMargins.bottom=t.tmargin,e=!0;const a=Utils1.DeepCopy(this.Frame);this.UpdateFrame(a),this.trect.width<0&&(i=-this.trect.width),this.trect.height<0&&(n=-this.trect.height),(i||n)&&(Utils2.InflateRect(this.trect,i/2,n/2),this.TRectToFrame(this.trect,!0),ObjectUtil$1.AddToDirtyList(this.BlockID)),this.DataID>=0&&(s=!0),e=!0}return null!=t.SideConn&&this.ShapeType===OptConstant.ShapeType.Polygon&&t.AdjSides!==(this.extraflags&OptConstant.ExtraFlags.SideKnobs)>0&&(this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.SideKnobs,t.SideConn),ObjectUtil$1.AddToDirtyList(this.BlockID),e=!0),null!=t.Container&&t.Container!==(this.moreflags&OptConstant.ObjMoreFlags.SED_MF_Container)>0&&(this.moreflags=Utils2.SetFlag(this.moreflags,OptConstant.ObjMoreFlags.SED_MF_Container,t.Container),e=!0),null!=t.ObjGrow&&t.ObjGrow!==this.ObjGrow&&(this.ObjGrow=t.ObjGrow,ObjectUtil$1.AddToDirtyList(this.BlockID),e=!0,this.ResizeAspectConstrain=this.ObjGrow===OptConstant.GrowBehavior.ProPortional),null!=t.TextGrow&&t.TextGrow!==this.TextGrow&&(this.SetTextGrow(t.TextGrow),e=!0,s=!1),s&&(this.SetTextGrow(this.TextGrow),e=!0),LogUtil.Debug("= S.BaseShape - SetShapeProperties output:",e),e}ApplyStyle(t,e){LogUtil.Debug("= S.BaseShape - ApplyStyle input:",{style:t,options:e});let i=null;this.objecttype!==NvConstant.FNObjectTypes.ShapeContainer&&(t&&t.Line&&t.Border&&(i=Utils1.DeepCopy(t.Line),t.Line=Utils1.DeepCopy(t.Border)),super.ApplyStyle(t,e),null!=i&&(t.Line=Utils1.DeepCopy(i))),LogUtil.Debug("= S.BaseShape - ApplyStyle output:",{style:t,options:e})}SetObjectStyle(t){LogUtil.Debug("= S.BaseShape.SetObjectStyle input:",t);let e=null;t.StyleRecord&&t.StyleRecord.Line&&t.StyleRecord.Border&&(e=Utils1.DeepCopy(t.StyleRecord.Line),t.StyleRecord.Line=Utils1.DeepCopy(t.StyleRecord.Border));const i=super.SetObjectStyle(t);return i.StyleRecord&&i.StyleRecord.Line&&i.StyleRecord.Line.Thickness&&this.SetSize(this.Frame.width,this.Frame.height,OptConstant.ActionTriggerType.LineThickness),null!=e&&(t.StyleRecord.Line=Utils1.DeepCopy(e)),i.StyleRecord&&i.StyleRecord.Fill&&i.StyleRecord.Fill.FillType&&(T3Gv.opt.ClearImage(this.BlockID,!1,!0),this.flags&NvConstant.ObjFlags.TextOnly&&this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Transparent&&(this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.TextOnly,!1))),LogUtil.Debug("= S.BaseShape.SetObjectStyle output:",i),i}SetShapeConnectionPoints(t,e,i){LogUtil.Debug("= S.BaseShape - SetShapeConnectionPoints input:",{connectionType:t,connectionPoints:e,newAttachPoint:i});let n=!1;switch(this.attachpoint.x===i.x&&this.attachpoint.y===i.y||(this.attachpoint.x=i.x,this.attachpoint.y=i.y,n=!0),t){case NvConstant.ObjFlags.ContConn:0==(this.flags&t)&&(this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.UseConnect,!1),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.ContConn,!0),n=!0);break;case NvConstant.ObjFlags.UseConnect:this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.ContConn,!1),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.UseConnect,!0),this.ConnectPoints=Utils1.DeepCopy(e),n=!0;break;default:(this.flags&NvConstant.ObjFlags.ContConn||this.flags&NvConstant.ObjFlags.UseConnect)&&(this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.UseConnect,!1),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.ContConn,!1),n=!0)}return LogUtil.Debug("= S.BaseShape - SetShapeConnectionPoints output:",n),n}GetClosestConnectPoint(t){LogUtil.Debug("= S.BaseShape - GetClosestConnectPoint input:",t);const e=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;let i=[];const n=OptConstant.Common.DimMax;if(e){const t={x:0,y:0,width:n,height:n};if(i=Utils1.DeepCopy(this.ConnectPoints),T3Gv.opt.FlipPoints(t,this.extraflags,i),0!==this.RotationAngle){const e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(t,e,i)}}if(e){let e,n;for(let s=0;s<i.length;s++){const a=i[s],o=t.x-a.x,r=t.y-a.y,l=o*o+r*r;(void 0===e||l<e)&&(e=l,n=a)}return t.x=n.x,t.y=n.y,LogUtil.Debug("= S.BaseShape - GetClosestConnectPoint output:",t),!0}return LogUtil.Debug("= S.BaseShape - GetClosestConnectPoint output:",!1),!1}GetPolyList(){let t;LogUtil.Debug("= S.BaseShape - GetPolyList input:",{});let e,i,n=new PolyList;const s=PolygonConstant.ShapeTypes,a=OptConstant.LineType;switch(this.dataclass){case s.RECTANGLE:t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.segs.push(t);break;case s.ROUNDED_RECTANGLE:e=this.Frame.width,this.Frame.height<e&&(e=this.Frame.height),i=this.GetCornerSize(),t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-2*i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,i),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,this.inside.height-i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height-i),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,-i,i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),n.segs.push(t),n.offset.x=i,n.offset.y=0;break;case s.OVAL:case s.CIRCLE:t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width/2,this.inside.height/2),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t.param=-Math.PI/2,t=new PolySeg(a.ARCSEGLINE,0,this.inside.height),t.ShortRef=OptConstant.ArcQuad.PLA_BL,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-this.inside.width/2,this.inside.height/2),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=-Math.PI/2,t=new PolySeg(a.ARCSEGLINE,0,0),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.offset.x=this.inside.width/2,n.offset.y=0;break;case s.DOCUMENT:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width,this.inside.height-i),n.segs.push(t),t=new PolySeg(a.ARCLINE,this.inside.width/2,this.inside.height-i),t.param=i,n.segs.push(t),t=new PolySeg(a.ARCLINE,0,this.inside.height-i),t.param=-i,n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.segs.push(t);break;case s.TERMINAL:this.inside.width>this.inside.height?(i=this.inside.height/2,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-2*i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,i),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height-i),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.segs.push(t)):(i=this.inside.width/2,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,i),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,this.inside.height-i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height-i),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.LINE,-i,i),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.segs.push(t)),n.offset.x=i,n.offset.y=0;break;case s.STORAGE:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=-Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,-i,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_BL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,0,0),t.ShortRef=OptConstant.ArcQuad.PLA_TL,n.segs.push(t),n.offset.x=i,n.offset.y=0;break;case s.DELAY:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.offset.x=0,n.offset.y=0;break;case s.DISPLAY:i=this.shapeparam,t=new PolySeg(a.LINE,0,0),n.segs.push(t),t=new PolySeg(a.LINE,this.inside.width-2*i,0),n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-i,this.inside.height/2),t.ShortRef=OptConstant.ArcQuad.PLA_TL,t.param=Math.PI/2,n.segs.push(t),t=new PolySeg(a.ARCSEGLINE,this.inside.width-2*i,this.inside.height),n.segs.push(t),t.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,t=new PolySeg(a.LINE,0,this.inside.height),n.segs.push(t),t=new PolySeg(a.LINE,-i,this.inside.height/2),n.segs.push(t),t=new PolySeg(a.LINE,0,0),n.offset.x=i,n.offset.y=0;break;default:const o=this.Frame;this.Frame=this.inside;const r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);if(this.Frame=o,r.length>0){n.offset.x=r[0].x,n.offset.y=r[0].y;for(let e=0;e<r.length;e++)t=new PolySeg(a.LINE,r[e].x-n.offset.x,r[e].y-n.offset.y),n.segs.push(t)}}return n.closed=!0,n.dim.x=this.inside.width,n.dim.y=this.inside.height,n.wasline=!1,LogUtil.Debug("= S.BaseShape - GetPolyList output:",n),n}GetListOfEnclosedObjects(t){LogUtil.Debug("= S.BaseShape - GetListOfEnclosedObjects input:",{isRecursive:t});let e=[];const i=OptConstant.ObjMoreFlags.SED_MF_Container;if(this.moreflags&i){let n=LayerUtil.VisibleZList(),s={};const a=n.length;let o=this.trect,r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);if(0!==this.RotationAngle){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,r)}let l=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent;l=!1;let h=0;if(!l)for(let t=0;t<a;t++)if(n[t]===this.BlockID){h=t+1;break}let c=[];for(let u=h;u<a;u++){const a=n[u];if(a!==this.BlockID){let n,l,h=ObjectUtil$1.GetObjectPtr(a,!1);if(0!==h.RotationAngle){n=h.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);const t=-h.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(h.Frame,t,n),Utils2.GetPolyRect(s,n)}else l=Utils1.DeepCopy(h.Frame),s=l;let u=!1;if(u=0!==this.RotationAngle?0!==h.RotationAngle?Utils2.IsAllPolyPointsInPoly(r,n):Utils2.IsAllFrameCornersInPoly(r,s):0!==h.RotationAngle?Utils2.IsAllPolyPointsInPoly(r,n):Utils2.RectInsideRect(o,s),u&&(e.push(a),2===h.hooks.length&&c.push(a),h.moreflags&i&&t)){const t=h.GetListOfEnclosedObjects(!0);t.length&&(e=e.concat(t))}}}for(let t=0;t<c.length;t++){const i=ObjectUtil$1.GetObjectPtr(c[t],!1),n=i.hooks[0].objid,s=i.hooks[1].objid;if((e.indexOf(n)<0||e.indexOf(s)<0)&&e.indexOf(c[t])>=0){const i=e.indexOf(c[t]);e.splice(i,1)}}}return LogUtil.Debug("= S.BaseShape - GetListOfEnclosedObjects output:",e),e}PinProportional(t){LogUtil.Debug("= S.BaseShape PinProportional - Input:",t);const e=OptConstant.Common.KnobSize;let i={};if(0!==this.RotationAngle){const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t),Utils2.GetPolyRect(i,t)}else i=this.Frame;const n={left:i.x-this.r.x+e/2,top:i.y-this.r.y+e/2,right:this.r.x+this.r.width-(i.x+i.width),bottom:this.r.y+this.r.height-(i.y+i.height)};if(t.y<n.top){const e=n.top-t.y,i=e*(T3Gv.opt.actionAspectRatioWidth/T3Gv.opt.actionAspectRatioHeight);t.height-=e,t.width-=i,t.y=n.left}if(t.x<n.left){const e=n.left-t.x,i=e*(T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth);t.height-=i,t.width-=e,t.x=n.left}LogUtil.Debug("= S.BaseShape PinProportional - Output:",t)}HandleActionTriggerTrackCommon(t,e,i){let n,s,a,o,r={x:t,y:e};let l=t-T3Gv.opt.actionStartX,h=e-T3Gv.opt.actionStartY;const c=Utils1.DeepCopy(T3Gv.opt.actionBBox),u=Utils1.DeepCopy(T3Gv.opt.actionBBox),d=this,p=T3Gv.opt.OverrideSnaps(i),g=function(t){let e;if(d.RotationAngle){const i=Utils2.PolyFromRect(t),n=-d.RotationAngle/(180/NvConstant.Geometry.PI);e=Utils1.DeepCopy(t),Utils3.RotatePointsAboutCenter(d.Frame,n,i),Utils2.GetPolyRect(e,i)}else e=t;if(Math.floor(e.x)<0)return!0;if(Math.floor(e.y)<0)return!0;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(e.x+e.width>t.dim.x)return!0;if(e.y+e.height>t.dim.y)return!0}return!1};switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.TopLeft:if(n=u.x-t,s=u.y-e,u.x=t,u.y=e,u.width+=n,u.height+=s,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0?(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=a):(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height-a,u.height=a),this.PinProportional(u)):(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.TopCenter:if(s=u.y-e,u.y=e,u.height=u.height+s,T3Gv.opt.actionLockAspectRatio?(u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height),o=u.height*T3Gv.opt.actionAspectRatioWidth/T3Gv.opt.actionAspectRatioHeight,u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width/2-o/2,u.width=o,this.PinProportional(u)):u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.TopRight:if(s=u.y-e,u.y=e,u.height=u.height+s,u.width=t-u.x,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=t,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0?(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=a):(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height-a,u.height=a),this.PinProportional(u)):(u.width<0&&(u.x=t,u.width=-u.width),u.height<0&&(u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.CenterRight:if(u.width=t-u.x,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=t,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height/2-a/2,u.height=a,this.PinProportional(u)):u.width<0&&(u.x=t,u.width=-u.width),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.BottomRight:if(u.width=t-u.x,u.height=e-u.y,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=t,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0&&(u.y=c.y-a),u.height=a,this.PinProportional(u)):(u.width<0&&(u.x=t,u.width=-u.width),u.height<0&&(u.y=e,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.BottomCenter:if(u.height=e-u.y,T3Gv.opt.actionLockAspectRatio?(u.height<0&&(u.y=e,u.height=-u.height),o=u.height*T3Gv.opt.actionAspectRatioWidth/T3Gv.opt.actionAspectRatioHeight,u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width/2-o/2,u.width=o,this.PinProportional(u)):u.height<0&&(u.y=e,u.height=-u.height),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.MovePolySeg:r.x=t,r.y=e;let d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);const f=Utils1.DeepCopy(d.Frame);T3Gv.docUtil.docConfig.enableSnap&&!p&&(r=T3Gv.docUtil.SnapToGrid(r)),OptCMUtil.ShapeToPolyLine(this.BlockID,!0,!0),d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1),d.MovePolySeg(T3Gv.opt.actionSvgObject,r.x,r.y,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData),T3Gv.opt.PolyLineToShape(d.BlockID,!0),d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);const m=d.trect,v=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal?T3Gv.opt.header.MaxWorkDim.x:m.width;if(T3Gv.opt.actionSvgObject&&T3Gv.opt.actionSvgObject.textElem){const t=T3Gv.opt.actionSvgObject.textElem.CalcTextFit(v),e=t.width;if(t.height>m.height||e>m.width){OptCMUtil.ShapeToPolyLine(this.BlockID,!0,!0);const t=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);r.x=T3Gv.opt.actionTableLastX,r.y=T3Gv.opt.actionTableLastY,t.MovePolySeg(T3Gv.opt.actionSvgObject,r.x,r.y,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData),T3Gv.opt.PolyLineToShape(this.BlockID,!0),d=ObjectUtil$1.GetObjectPtr(this.BlockID,!1)}}if(T3Gv.opt.actionNewBBox=Utils1.DeepCopy(d.Frame),d.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,OptConstant.ActionTriggerType.MovePolySeg,r),T3Gv.opt.actionTableLastX=r.x,T3Gv.opt.actionTableLastY=r.y,d.RotationAngle){const t=T3Gv.opt.actionSvgObject.GetRotation(),e=Utils1.DeepCopy(d.Frame),i=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(f,e,t),n=T3Gv.opt.actionSvgObject.GetPos();n.x+=i.x,n.y+=i.y,T3Gv.opt.actionSvgObject.SetPos(n.x,n.y),T3Gv.opt.actionBBox.x+=i.x,T3Gv.opt.actionBBox.y+=i.y,T3Gv.opt.actionStartX+=i.x,T3Gv.opt.actionStartY+=i.y,d.Frame.x+=i.x,d.Frame.y+=i.y}break;case OptConstant.ActionTriggerType.BottomLeft:if(u.height=e-u.y,n=u.x-t,u.x=t,u.width+=n,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.height<0&&(u.y=c.y-a),u.height=a,this.PinProportional(u)):(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),u.height<0&&(u.y=e,u.height=-u.height)),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.CenterLeft:if(n=u.x-t,u.x=t,u.width+=n,T3Gv.opt.actionLockAspectRatio?(u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),a=u.width*T3Gv.opt.actionAspectRatioHeight/T3Gv.opt.actionAspectRatioWidth,u.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height/2-a/2,u.height=a,this.PinProportional(u)):u.width<0&&(u.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,u.width=-u.width),g(u))break;T3Gv.opt.actionNewBBox=Utils1.DeepCopy(u),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,r);break;case OptConstant.ActionTriggerType.ContainerAdj:let b,y,S,x;for(b=T3Gv.opt.dragElementList.length,T3Gv.opt.theActionContainerArrangement===NvConstant.ContainerListArrangements.Column?(-h>T3Gv.opt.actionOldExtra&&(h=-T3Gv.opt.actionOldExtra),T3Gv.opt.actionTableLastY=h,l=0):(-l>T3Gv.opt.actionOldExtra&&(l=-T3Gv.opt.actionOldExtra),T3Gv.opt.actionTableLastY=l,h=0),y=0;y<b;y++)x=T3Gv.opt.dragBBoxList[y],S=SvgUtil.GetSVGDragElement(y),S&&S.SetPos(x.x+l,x.y+h);break;case OptConstant.ActionTriggerType.Rotate:let w=0;const C=t-T3Gv.opt.rotatePivotX,T=e-T3Gv.opt.rotatePivotY;if(0===C&&0===T)w=0;else if(0===C)w=T>0?90:270;else if(C>=0&&T>=0)w=Math.atan(T/C)*(180/NvConstant.Geometry.PI);else if(C<0&&(T>=0||T<0)){w=180+Math.atan(T/C)*(180/NvConstant.Geometry.PI)}else if(C>=0&&T<0){w=360+Math.atan(T/C)*(180/NvConstant.Geometry.PI)}if(T3Gv.docUtil.docConfig.enableSnap&&!p){const t=T3Gv.opt.EnhanceSnaps(i)?T3Gv.opt.enhanceRotateSnap:T3Gv.opt.rotateSnap;w=Math.round(w/t)*t}const D=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),k=-w/(180/NvConstant.Geometry.PI),$={};if(Utils3.RotatePointsAboutCenter(this.Frame,k,D),Utils2.GetPolyRect($,D),$.x<0)break;if($.y<0)break;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if($.x+$.width>t.dim.x)break;if($.y+$.height>t.dim.y)break}T3Gv.opt.rotateEndRotation=w,this.Rotate(T3Gv.opt.actionSvgObject,w);break;case OptConstant.ActionTriggerType.DimLineAdj:this.DimensionLineDeflectionAdjust(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData)}}HandleActionTriggerCallResize(t,e,i,n){let s;this.prevBBox=n?Utils1.DeepCopy(n):Utils1.DeepCopy(this.Frame);const a=Utils1.DeepCopy(this.Frame);if(t.width<OptConstant.Common.MinDim&&(t.width=OptConstant.Common.MinDim),t.height<OptConstant.Common.MinDim&&(t.height=OptConstant.Common.MinDim),this.UpdateFrame(t),e===OptConstant.ActionTriggerType.LineLength&&(e=0),e===OptConstant.ActionTriggerType.LineThickness&&(e=0),T3Gv.opt.actionStoredObjectId===this.BlockID&&i&&UIUtil.UpdateDisplayCoordinates(t,i,CursorConstant.CursorTypes.Grow,this),-1===e&&(e=!0),-1!==this.DataID&&!(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){let i;const n=t.textElem;s=this.trect;const o=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal?T3Gv.opt.header.MaxWorkDim.x:s.width;i=n?n.CalcTextFit(o):{width:0,height:0};const r=Utils2.TrimDP(i.width,T3Gv.docUtil.rulerConfig.dp),l=Utils2.TrimDP(i.height,T3Gv.docUtil.rulerConfig.dp),h=Utils2.TrimDP(i.width,0),c=Utils2.TrimDP(i.height,0),u=Utils2.TrimDP(s.height,0),d=Utils2.TrimDP(s.width,0);let p=c,g=h;if(0!==c&&Math.abs(u-c)<=1&&(p=u),0!==h&&Math.abs(d-h)<=1&&(g=d),p>u||g>d)return e||(s=Utils1.DeepCopy(this.trect),l>s.height&&(s.height=l),r>s.width&&(s.width=r),this.TRectToFrame(s,e)),void this.UpdateFrame(a)}}if(e&&T3Gv.opt.actionSvgObject&&T3Gv.opt.actionStoredObjectId===this.BlockID){const t=this.Resize(T3Gv.opt.actionSvgObject,T3Gv.opt.actionNewBBox,this,e);T3Gv.opt.actionBBox.x+=t.x,T3Gv.opt.actionBBox.y+=t.y,T3Gv.opt.actionStartX+=t.x,T3Gv.opt.actionStartY+=t.y,this.Frame.x+=t.x,this.Frame.y+=t.y,this.inside.x+=t.x,this.inside.y+=t.y,this.trect.x+=t.x,this.trect.y+=t.y}}HandleActionTriggerDoAutoScroll(){T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleActionTriggerDoAutoScroll",100);let t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);if(this.PinAction(t),t=DrawUtil.DoAutoGrowDrag(t),T3Gv.docUtil.ScrollToPosition(t.x,t.y),T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.Rotate&&T3Gv.opt.rotateObjectRadians){let e=t.x,i=t.y;const n={x:e,y:i},s={},a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1).Frame;s.x=a.x+a.width/2,s.y=a.y+a.height/2;const o=T3Gv.opt.RotatePointAroundPoint(s,n,T3Gv.opt.rotateObjectRadians);e=o.x,i=o.y,t.x=e,t.y=i}this.HandleActionTriggerTrackCommon(t.x,t.y)}AutoScrollCommon(t,e,i){LogUtil.Debug("= S.BaseShape - AutoScrollCommon input:",{event:t,enableSnap:e,autoScrollCallback:i});let n=!1;T3Gv.opt.OverrideSnaps(t)&&(e=!1);const s=t.gesture.center.clientX,a=t.gesture.center.clientY;let o=s,r=a;const l=T3Gv.opt.svgDoc.docInfo;if(s>=l.dispX+l.dispWidth-4?(n=!0,o=l.dispX+l.dispWidth-4+32):s<l.dispX&&(n=!0,o=l.dispX-32),a>=l.dispY+l.dispHeight-4?(n=!0,r=l.dispY+l.dispHeight-4+32):a<l.dispY&&(n=!0,r=l.dispY-32),n){if(e&&T3Gv.docUtil.docConfig.enableSnap){const t=T3Gv.docUtil.SnapToGrid({x:o,y:r});o=t.x,r=t.y}return T3Gv.opt.autoScrollXPos=o,T3Gv.opt.autoScrollYPos=r,-1!==T3Gv.opt.autoScrollTimerId?(LogUtil.Debug("= S.BaseShape - AutoScrollCommon output: false (timer already set)"),!1):(T3Gv.opt.autoScrollTimer=new T3Timer(this),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout(i,0),LogUtil.Debug("= S.BaseShape - AutoScrollCommon output: false (timer started)"),!1)}return this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseShape - AutoScrollCommon output: true"),!0}PinAction(t){LogUtil.Debug("= S.BaseShape - PinAction input:",t);const e=OptConstant.Common.KnobSize;let i={},n={};if(0!==this.RotationAngle){const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),e=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,e,t),Utils2.GetPolyRect(n,t)}else n=this.Frame;if(i.left=n.x-this.r.x+e/2,i.top=n.y-this.r.y+e/2,i.right=this.r.x+this.r.width-(n.x+n.width)+e/2,i.bottom=this.r.y+this.r.height-(n.y+n.height)+e/2,t.x<i.left&&(t.x=i.left),t.y<i.top&&(t.y=i.top),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const e=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;t.x>e.dim.x-i.right&&(t.x=e.dim.x-i.right),t.y>e.dim.y-i.bottom&&(t.y=e.dim.y-i.bottom)}return LogUtil.Debug("= S.BaseShape - PinAction output:",t),t}ActionApplySnaps(t,e){LogUtil.Debug("= S.BaseShape - ActionApplySnaps input:",{coords:t,triggerType:e});let i=this.GetSnapRect(),n=!1,s=[],a={},o={x:null,y:null};const r=OptConstant.ActionTriggerType;let l;const h=e=>{a.x=e.x,a.y=e.y,a.width=e.width,a.height=t.y-e.y,a.height<0?(a.y=t.y,a.height=e.y-t.y,s.push("left_top","right_top")):s.push("left_bottom","right_bottom"),n=!0},c=e=>{a.x=e.x,a.y=t.y,a.width=e.width,a.height=e.y+e.height-t.y,a.height<0?(a.y=e.y,a.height=t.y-e.y,s.push("left_bottom","right_bottom")):s.push("left_top","right_top"),n=!0},u=e=>{a.y=e.y,a.x=t.x,a.height=e.height,a.width=e.x+e.width-t.x,a.width<0?(a.x=e.x,a.width=t.x-e.x,s.push("above_right","below_right")):s.push("above_left","below_left"),n=!0},d=e=>{a.y=e.y,a.x=e.x,a.height=e.height,a.width=t.x-e.x,a.width<0?(a.x=t.x,a.width=e.x-t.x,s.push("above_left","below_left")):s.push("above_right","below_right"),n=!0};if(DrawUtil.AllowSnapToShapes()){switch(e){case r.BottomCenter:h(i);break;case r.BottomLeft:h(i),u(Utils1.DeepCopy(a));break;case r.BottomRight:h(i),d(Utils1.DeepCopy(a));break;case r.CenterLeft:u(i);break;case r.CenterRight:d(i);break;case r.TopCenter:c(i);break;case r.TopRight:c(i),d(Utils1.DeepCopy(a));break;case r.TopLeft:c(i),u(Utils1.DeepCopy(a))}n&&(l=new DynamicGuides,this.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(o=DynamicUtil.DynamicSnapsGetSnapObjects(this.BlockID,a,l,null,s),null!==o.x&&(t.x+=o.x),null!==o.y&&(t.y+=o.y)))}if(T3Gv.docUtil.docConfig.enableSnap){const e=T3Gv.docUtil.SnapToGrid(t);null===o.x&&(t.x=e.x),null===o.y&&(t.y=e.y)}return LogUtil.Debug("= S.BaseShape - ActionApplySnaps output:",l),l}LMActionTrack(t){if(Utils2.StopPropagationAndDefaults(t),-1==T3Gv.opt.actionStoredObjectId)return!1;let e=null;const i=OptConstant.ActionTriggerType;e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1),T3Gv.opt.actionTriggerId!=OptConstant.ActionTriggerType.Rotate&&e.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!1);const n=e.Frame;let s=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);this.PinAction(s),s=DrawUtil.DoAutoGrowDrag(s);const a=T3Gv.opt.OverrideSnaps(t);let o=!1;switch(T3Gv.opt.actionTriggerId){case i.MODIFYSHAPE:case i.ROTATE:o=!0}let r=null;o||a||(r=this.ActionApplySnaps(s,T3Gv.opt.actionTriggerId));let l=s.x,h=s.y;if(T3Gv.opt.actionTriggerId!=OptConstant.ActionTriggerType.Rotate&&T3Gv.opt.rotateObjectRadians){const t={x:l,y:h},e={x:n.x+n.width/2,y:n.y+n.height/2},i=T3Gv.opt.RotatePointAroundPoint(e,t,T3Gv.opt.rotateObjectRadians);l=i.x,h=i.y,s.x=l,s.y=h}if(this.AutoScrollCommon(t,!0,"HandleActionTriggerDoAutoScroll")&&(s=this.LMActionDuringTrack(s),this.HandleActionTriggerTrackCommon(s.x,s.y,t),T3Gv.opt.actionTriggerId!=OptConstant.ActionTriggerType.Rotate&&e&&e.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!0),r)){const t=Utils1.DeepCopy(this.Frame);this.Frame=T3Gv.opt.actionNewBBox;const e=this.GetSnapRect();this.Frame=t,DynamicUtil.DynamicSnapsUpdateGuides(r,this.BlockID,e)}}LMActionRelease(t,e){LogUtil.Debug("S.BasicShape - LMActionRelease input:",{event:t,additionalData:e});try{let t=!1,i=!1;const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1);if(null==n)return;if(null==e){if(LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),null==T3Gv.opt.actionSvgObject)return;if(T3Gv.opt.actionStoredObjectId<0)return;let t;switch(i=!1,t={BlockID:T3Gv.opt.actionStoredObjectId,ActionTriggerID:T3Gv.opt.actionTriggerId,ActionData:T3Gv.opt.actionTriggerData},t.Frame=Utils1.DeepCopy(n.Frame),t.rotateEndRotation=T3Gv.opt.rotateEndRotation,DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.MovePolySeg:i=!0;{const e=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);t.left_sindent=e.left_sindent,t.right_sindent=e.right_sindent,t.top_sindent=e.top_sindent,t.bottom_sindent=e.bottom_sindent,t.tindent={},t.tindent.left=e.tindent.left,t.tindent.right=e.tindent.right,t.tindent.top=e.tindent.top,t.tindent.bottom=e.tindent.bottom,e.polylist&&(t.polylist=Utils1.DeepCopy(e.polylist)),e.VertexArray&&(t.VertexArray=Utils1.DeepCopy(e.VertexArray))}break;case OptConstant.ActionTriggerType.DimLineAdj:t.dimensionDeflectionH=this.dimensionDeflectionH,t.dimensionDeflectionV=this.dimensionDeflectionV;break;case OptConstant.ActionTriggerType.ContainerAdj:t.actionTableLastY=T3Gv.opt.actionTableLastY}n.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!1)}else T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.MovePolySeg&&(i=!0);if(T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.ContainerAdj)T3Gv.opt.moveList=[],T3Gv.opt.dragElementList.length=0,T3Gv.opt.dragBBoxList.length=0,T3Gv.opt.actionOldExtra=0,this.PrUpdateExtra(T3Gv.opt.actionTableLastY);else if(T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate)T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateEndRotation%360,T3Gv.opt.SetObjectAttributes(T3Gv.opt.actionStoredObjectId,{RotationAngle:T3Gv.opt.rotateEndRotation}),T3Gv.opt.SetObjectFrame(T3Gv.opt.actionStoredObjectId,n.Frame),this.UpdateDimensionLines(T3Gv.opt.actionSvgObject);else if(!i){const e=Utils1.DeepCopy(n.Frame);T3Gv.opt.SetObjectFrame(T3Gv.opt.actionStoredObjectId,e),this.polylist&&this.ShapeType===OptConstant.ShapeType.Polygon&&this.ScaleObject(0,0,0,0,0,0),t=!0}this.LMActionPostRelease(T3Gv.opt.actionStoredObjectId),null==e&&n.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!0),(""!==this.HyperlinkText||-1!==this.NoteID||this.HasFieldData())&&ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LayerUtil.ShowOverlayLayer(),DrawUtil.CompleteOperation(),LogUtil.Debug("S.BasicShape - LMActionRelease output: completed")}catch(i){throw this.LMActionClickExpCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}LMActionPreTrack(t,e){this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1))}LMActionDuringTrack(t){return t}LMActionPostRelease(t){switch(T3Gv.opt.linkParams=null,OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.CenterLeft:case OptConstant.ActionTriggerType.CenterRight:this.sizedim.width=this.Frame.width;break;case OptConstant.ActionTriggerType.TopCenter:case OptConstant.ActionTriggerType.BottomCenter:this.sizedim.height=this.Frame.height;break;default:this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height}}LMSetupActionClick(t,e,i,n,s){let a;T3Gv.opt.eventTimestamp=Date.now();const o=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),r=DrawUtil.DoAutoGrowDrag(o),l=r.x,h=r.y;if(n){const t=ObjectUtil$1.GetObjectPtr(i,!1);t&&t.RotationAngle}else{const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(null===e)return!1;const s=e.GetID();i=parseInt(s.substring(OptConstant.Common.Action.length,s.length),10);const o=e.GetTargetForEvent(t);if(null==o)return!1;n=o.GetID(),a=o.GetUserData(),T3Gv.opt.SetControlDragMode(o)}T3Gv.opt.actionStoredObjectId=i;const c=ObjectUtil$1.GetObjectPtr(i,!0);T3Gv.opt.actionTriggerId=n,T3Gv.opt.actionTriggerData=a;const u=OptConstant.ActionTriggerType;switch(n){case u.CONNECTOR_PERP:case u.CONNECTOR_ADJ:case u.CONNECTOR_HOOK:case u.LINESTART:case u.LINEEND:const e=this.getConnectedObject();return e&&(T3Gv.opt.actionStoredObjectId=e.BlockID,this.ConnectorLMActionClick(t,!0)),!1}n===OptConstant.ActionTriggerType.MovePolySeg&&(T3Gv.opt.actionTriggerData={hitSegment:a,moveAngle:9999}),T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(i),c.SetDimensionLinesVisibility(T3Gv.opt.actionSvgObject,!1),this.LMActionPreTrack(i,n),(""!==this.HyperlinkText||-1!==this.NoteID||this.HasFieldData())&&this.HideAllIcons(T3Gv.opt.svgDoc,T3Gv.opt.actionSvgObject),T3Gv.opt.actionLockAspectRatio=t.gesture.srcEvent.shiftKey,this.ResizeAspectConstrain&&(T3Gv.opt.actionLockAspectRatio=!T3Gv.opt.actionLockAspectRatio);const d=c.Frame;if(T3Gv.opt.actionLockAspectRatio&&(0===d.height?T3Gv.opt.actionLockAspectRatio=!1:(T3Gv.opt.actionAspectRatioWidth=d.width,T3Gv.opt.actionAspectRatioHeight=d.height)),T3Gv.opt.actionBBox=Utils1.DeepCopy(d),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(d),LayerUtil.HideOverlayLayer(),T3Gv.opt.rotateObjectRadians=-this.RotationAngle/(180/NvConstant.Geometry.PI),T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.ContainerAdj){const t={x:l,y:h};T3Gv.opt.actionStartX=t.x,T3Gv.opt.actionStartY=t.y;const e=this.PrGetAdjustShapeList();if(!e)return!1;T3Gv.opt.moveList=e.list,T3Gv.opt.dragElementList=e.svglist,T3Gv.opt.dragBBoxList=e.framelist,T3Gv.opt.actionTableLastY=0,T3Gv.opt.actionOldExtra=e.oldextra,T3Gv.opt.theActionContainerArrangement=e.arrangement}else if(T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate)T3Gv.opt.rotateKnobCenterDivisor=this.RotateKnobCenterDivisor(),T3Gv.opt.rotateStartRotation=this.RotationAngle,T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateStartRotation,T3Gv.opt.rotatePivotX=d.x+d.width/T3Gv.opt.rotateKnobCenterDivisor.x,T3Gv.opt.rotatePivotY=d.y+d.height/T3Gv.opt.rotateKnobCenterDivisor.y,T3Gv.opt.actionStartX=l,T3Gv.opt.actionStartY=h;else{const t={x:l,y:h},e={x:d.x+d.width/2,y:d.y+d.height/2},i=T3Gv.opt.RotatePointAroundPoint(e,t,T3Gv.opt.rotateObjectRadians);T3Gv.opt.actionStartX=i.x,T3Gv.opt.actionStartY=i.y,T3Gv.opt.actionTableLastX=i.x,T3Gv.opt.actionTableLastY=i.y}return!0}getConnectedObject(){if(this.hooks.length){const t=this.hooks[0].objid;return ObjectUtil$1.GetObjectPtr(t,!1)}return null}ConnectorLMActionClick(t,e){LogUtil.Debug("= S.BaseShape - ConnectorLMActionClick input:",{event:t,triggerElement:e}),this.BaseLineLMActionClick(t,e),LogUtil.Debug("= S.BaseShape - ConnectorLMActionClick output")}BaseLineLMActionClick(t,e){LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick input:",{event:t,triggerElement:e});try{const i=this.BlockID,n=ObjectUtil$1.GetObjectPtr(i,!1);if(!(n&&n instanceof BaseDrawObject$1))return LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick output: base object not valid"),!1;if(DrawUtil.InitializeAutoGrowDrag(0,this.BlockID),!this.LMSetupActionClick(t,e))return void LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick output: LMSetupActionClick failed");const s=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ActionTrackHandlerFactory(s)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ActionReleaseHandlerFactory(s)),LogUtil.Debug("= S.BaseShape - BaseLineLMActionClick output: completed successfully")}catch(i){throw this.LMActionClickExpCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}LMActionClickExpCleanup(t){LogUtil.Debug("= S.BaseShape - LMActionClickExpCleanup input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),T3Gv.opt.ob={},T3Gv.opt.linkParams=null,T3Gv.opt.actionTriggerId=-1,T3Gv.opt.actionTriggerData=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LayerUtil.HideOverlayLayer(),LogUtil.Debug("= S.BaseShape - LMActionClickExpCleanup output: cleanup complete")}LMActionClick(t,e,i,n,s){LogUtil.Debug("= S.BaseShape - LMActionClick input:",{event:t,triggerElement:e,additionalId:i,autoGrowParam:n,extraParam:s}),Utils2.StopPropagationAndDefaults(t);try{const a=this.BlockID,o=ObjectUtil$1.GetObjectPtr(a,!1);if(!(o&&o instanceof BaseDrawObject$1))return LogUtil.Debug("= S.BaseShape - LMActionClick output: Invalid drawing object"),!1;if(DrawUtil.InitializeAutoGrowDrag(n),!this.LMSetupActionClick(t,e,i,n,s))return void LogUtil.Debug("= S.BaseShape - LMActionClick output: LMSetupActionClick failed");const r=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ActionTrackHandlerFactory(r)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ActionReleaseHandlerFactory(r)),LogUtil.Debug("= S.BaseShape - LMActionClick output: completed successfully")}catch(a){throw this.LMActionClickExpCleanup(a),T3Gv.opt.ExceptionCleanup(a),a}}StartNewObjectDrawTrackCommon(t,e,i){LogUtil.Debug("= S.BaseShape - StartNewObjectDrawTrackCommon input:",{currentX:t,currentY:e,event:i});let n=t-T3Gv.opt.actionStartX,s=e-T3Gv.opt.actionStartY,a=Utils1.DeepCopy(T3Gv.opt.actionBBox);a.width=a.width+n,a.height=a.height+s;let o={x:a.x+a.width,y:a.y+a.height},r=T3Gv.opt.OverrideSnaps(i);T3Gv.docUtil.docConfig.enableSnap&&!r&&(o=T3Gv.docUtil.SnapToGrid(o),a.width=o.x-a.x,a.height=o.y-a.y),a.width<0&&(a.x=t,a.width=-a.width),a.height<0&&(a.y=e,a.height=-a.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(a),this.UpdateFrame(T3Gv.opt.actionNewBBox),this.Resize(T3Gv.opt.actionSvgObject,a,this),LogUtil.Debug("= S.BaseShape - StartNewObjectDrawTrackCommon output:",T3Gv.opt.actionNewBBox)}StartNewObjectDrawDoAutoScroll(){LogUtil.Debug("= S.BaseShape - StartNewObjectDrawDoAutoScroll input"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("StartNewObjectDrawDoAutoScroll",100);let t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);t=DrawUtil.DoAutoGrowDrag(t),T3Gv.docUtil.ScrollToPosition(t.x,t.y),this.StartNewObjectDrawTrackCommon(t.x,t.y,null),LogUtil.Debug("= S.BaseShape - StartNewObjectDrawDoAutoScroll output:",t)}LMDrawTrack(t){if(LogUtil.Debug("= S.BaseShape - LMDrawTrack input:",t),-1===T3Gv.opt.actionStoredObjectId)return LogUtil.Debug("= S.BaseShape - LMDrawTrack output: No action stored object, returning false"),!1;let e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=T3Gv.opt.OverrideSnaps(t);T3Gv.docUtil.docConfig.enableSnap&&!i&&(e=T3Gv.docUtil.SnapToGrid(e)),e=DrawUtil.DoAutoGrowDrag(e);let n=e.x,s=e.y;this.AutoScrollCommon(t,!0,"StartNewObjectDrawDoAutoScroll")&&(this.LMDrawDuringTrack(n,s),this.StartNewObjectDrawTrackCommon(n,s,t)),LogUtil.Debug("= S.BaseShape - LMDrawTrack output:",{posX:n,posY:s})}LMDrawRelease(t){LogUtil.Debug("= S.BaseShape - LMDrawRelease input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer();const e={x:T3Gv.opt.actionNewBBox.x,y:T3Gv.opt.actionNewBBox.y,width:T3Gv.opt.actionNewBBox.width,height:T3Gv.opt.actionNewBBox.height};T3Gv.opt.SetObjectFrame(T3Gv.opt.actionStoredObjectId,e),this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId);DrawUtil.PostObjectDraw(),LogUtil.Debug("= S.BaseShape - LMDrawRelease output:",{newBoundingBox:e,collaborationData:{}})}LMDrawPreTrack(){LogUtil.Debug("= S.BaseShape - LMDrawPreTrack - Input:");return LogUtil.Debug("= S.BaseShape - LMDrawPreTrack - Output:",true),true}LMDrawDuringTrack(t,e){LogUtil.Debug("= S.BaseShape - LMDrawDuringTrack input:",{posX:t,posY:e});const i={x:t,y:e};return LogUtil.Debug("= S.BaseShape - LMDrawDuringTrack output:",i),i}LMDrawPostRelease(){}LMDrawClickExceptionCleanup(t){LogUtil.Debug("= S.BaseShape - LMDrawClickExceptionCleanup input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),T3Gv.opt.linkParams=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),LogUtil.Debug("= S.BaseShape - LMDrawClickExceptionCleanup output: cleanup complete")}LMDrawClick(t,e){LogUtil.Debug("= S.BaseShape - LMDrawClick input:",{initialX:t,initialY:e});try{this.Frame.x=t,this.Frame.y=e,this.prevBBox=Utils1.DeepCopy(this.Frame),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_DrawReleaseHandlerFactory(this)),LogUtil.Debug("= S.BaseShape - LMDrawClick output:",{Frame:this.Frame,prevBBox:this.prevBBox})}catch(i){throw this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}RotateKnobCenterDivisor(){LogUtil.Debug("= S.BaseShape - RotateKnobCenterDivisor input: no parameters");const t={x:2,y:2};return LogUtil.Debug("= S.BaseShape - RotateKnobCenterDivisor output:",t),t}OffsetShape(t,e,i,n){if(LogUtil.Debug("= S.BaseShape - OffsetShape input:",{offsetX:t,offsetY:e,childShapes:i,linkFlags:n}),this.moreflags&OptConstant.ObjMoreFlags.Container&&i)for(let s=0;s<i.length;s++){const a=i[s],o=ObjectUtil$1.GetObjectPtr(a,!0);if(o){const i=n?n[o.BlockID]:null;o.OffsetShape(t,e,i),OptCMUtil.SetLinkFlag(a,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(a)}}this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.inside.x+=t,this.inside.y+=e,this.trect.x+=t,this.trect.y+=e,this.GetGraph(!0)&&T3Gv.opt.GraphShift(this,t,e),LogUtil.Debug("= S.BaseShape - OffsetShape output:",{Frame:this.Frame,r:this.r,inside:this.inside,trect:this.trect})}SetShapeOrigin(t,e,i){LogUtil.Debug("= S.BaseShape - SetShapeOrigin input:",{newX:t,newY:e,childShapes:i});let n=0,s=0;null!=t&&(n=t-this.Frame.x),null!=e&&(s=e-this.Frame.y),this.OffsetShape(n,s,i),LogUtil.Debug("= S.BaseShape - SetShapeOrigin output:",{offsetX:n,offsetY:s})}SetShapeIndent(t){LogUtil.Debug("= S.BaseShape - SetShapeIndent input:",{applyIndents:t});let e=this.inside.width,i=this.inside.height,n=1,s=1,a=1,o=1;t&&(n=1-(this.left_sindent+this.right_sindent),s=1-(this.bottom_sindent+this.top_sindent),a=1-(this.left_sindent+this.right_sindent),o=1-(this.bottom_sindent+this.top_sindent)),this.tindent.left=this.left_sindent*e/n,this.tindent.top=this.top_sindent*i/s,this.tindent.right=this.right_sindent*e/a,this.tindent.bottom=this.bottom_sindent*i/o,LogUtil.Debug("= S.BaseShape - SetShapeIndent output:",this.tindent)}UpdateFrame(t){LogUtil.Debug("= S.BaseShape - UpdateFrame input:",t);let e=0,i=0;t&&super.UpdateFrame(t),Utils2.CopyRect(this.r,this.Frame),this.StyleRecord&&(this.objecttype!==NvConstant.FNObjectTypes.FlWall&&(this.StyleRecord.Line.BThick=0),this.StyleRecord.Line.BThick?null==this.polylist?e=0:i=this.StyleRecord.Line.Thickness/2:i=e=this.StyleRecord.Line.Thickness/2,this.CalcEffectSettings(this.Frame,this.StyleRecord,!1)),T3Gv.opt.SetShapeR(this),Utils2.CopyRect(this.inside,this.Frame),Utils2.InflateRect(this.inside,-e,-e),Utils2.CopyRect(this.trect,this.Frame),Utils2.InflateRect(this.trect,-i,-i),this.SetShapeIndent(!1),Utils2.SubRect(this.trect,this.tindent),LogUtil.Debug("= S.BaseShape - UpdateFrame output:",{r:this.r,inside:this.inside,trect:this.trect,Frame:this.Frame})}GetSVGFrame(t=this.Frame){LogUtil.Debug("= S.BaseShape - GetSVGFrame input:",t);const e={};return Utils2.CopyRect(e,t),this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(e,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),LogUtil.Debug("= S.BaseShape - GetSVGFrame output:",e),e}GetSnapRect(){LogUtil.Debug("= S.BaseShape - GetSnapRect input");const t={};if(0!==this.RotationAngle){const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,i,e),Utils2.GetPolyRect(t,e)}else Utils2.CopyRect(t,this.Frame);return LogUtil.Debug("= S.BaseShape - GetSnapRect output:",t),t}CanSnapToShapes(){LogUtil.Debug("= S.BaseShape - CanSnapToShapes input");const t=NvConstant.FNObjectTypes;let e;if(this.objecttype===t.ShapeContainer)e=-1;else e=this.BlockID;return LogUtil.Debug("= S.BaseShape - CanSnapToShapes output:",e),e}IsSnapTarget(){LogUtil.Debug("= S.BaseShape - IsSnapTarget input");const t=NvConstant.FNObjectTypes;let e;if(this.objecttype===t.ShapeContainer)e=!1;else e=!(this.hooks.length||T3Gv.opt.FindChildArray(this.BlockID,-1)>=0);return LogUtil.Debug("= S.BaseShape - IsSnapTarget output:",e),e}GetAlignRect(){LogUtil.Debug("= S.BaseShape - GetAlignRect input");const t=Utils1.DeepCopy(this.Frame);if(0!==this.RotationAngle){const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,i,e),Utils2.GetPolyRect(t,e)}return LogUtil.Debug("= S.BaseShape - GetAlignRect output:",t),t}GetCustomConnectPointsDirection(t){LogUtil.Debug("= S.BaseShape - GetCustomConnectPointsDirection input:",{direction:t});let e,i=-1,n=null,s=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints,a=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcForceEnd,null),o=1,r=1,l=1,h=1;const c=OptConstant.Common.DimMax,u=OptConstant.ActionArrow;let d={x:0,y:0,width:c,height:c};if(this.RotationAngle){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(d,t,a)}const p=(t,s)=>{null===n?(i=s,n=Math.abs(t-c/2)):(e=Math.abs(t-c/2),e<n&&(i=s,n=e))};if(a.length,s){o=r=l=h=0,d=new Rectangle(0,0,0,0);const e=a.length;Utils2.GetPolyRect(d,a);for(let t=0;t<e;t++)a[t].x-=d.x,a[t].y-=d.y;if(d.width<1e3&&Utils2.InflateRect(d,1e3,0),d.height<1e3&&Utils2.InflateRect(d,0,1e3),d.height>d.width)for(let i=0;i<e;i++)a[i].y<d.height/6?(o++,t===u.Up&&p(a[i].x,i)):a[i].y>=5*d.height/6?(r++,t===u.Down&&p(a[i].x,i)):a[i].x<d.width/6?(l++,t===u.Left&&p(a[i].y,i)):a[i].x>=5*d.width/6&&(h++,t===u.Right&&p(a[i].y,i));else for(let i=0;i<e;i++)a[i].x<d.width/6?(l++,t===u.Left&&p(a[i].y,i)):a[i].x>=5*d.width/6?(h++,t===u.Right&&p(a[i].y,i)):a[i].y<d.height/6?(o++,t===u.Up&&p(a[i].x,i)):a[i].y>=5*d.height/6&&(r++,t===u.Down&&p(a[i].x,i))}const g={left:l,right:h,top:o,bottom:r,index:i};return LogUtil.Debug("= S.BaseShape - GetCustomConnectPointsDirection output:",g),g}AdjustAutoInsertShape(t,e,i){LogUtil.Debug("= S.BaseShape - AdjustAutoInsertShape input:",{event:t,isVertical:e,isRotated:i});let n=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints,s=0,a=0,o=0,r=0,l=!1,h=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcForceEnd,null),c=h.length<2,u=!1,d=[this.BlockID];if(c?(T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.AutoSinglePoint=!0),l=!0):(T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.AutoSinglePoint=!1),l=!1),n){let t=new Rectangle(0,0,0,0),n=h.length;Utils2.GetPolyRect(t,h);for(let e=0;e<n;e++)h[e].x-=t.x,h[e].y-=t.y;if(t.width<1e3&&Utils2.InflateRect(t,1e3,0),t.height<1e3&&Utils2.InflateRect(t,0,1e3),t.height>t.width){for(let e=0;e<n;e++)h[e].y<t.height/6?s++:h[e].y>=5*t.height/6?a++:h[e].x<t.width/6?o++:h[e].x>=5*t.width/6&&r++;(0===o&&0===r&&s&&a||0===o&&0===r&&l&&(s||a))&&(u=!0)}else{for(let e=0;e<n;e++)h[e].x<t.width/6?o++:h[e].x>=5*t.width/6?r++:h[e].y<t.height/6?s++:h[e].y>=5*t.height/6&&a++;(0===s&&0===a&&o&&r||0===s&&0===a&&l&&(o||r))&&(u=!0)}if(!l)if(u){if(e){if(0!==this.RotationAngle&&180!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(0,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,0)}u=!0}}else if(-90!==this.RotationAngle&&90!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(-90,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,-90)}u=!0}}else if(e){if(-90!==this.RotationAngle&&90!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(-90,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,-90)}u=!0}}else if(0!==this.RotationAngle&&180!==this.RotationAngle){if(!i){ToolActUtil.RotateShapes(0,d);let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&this.Rotate(t,0)}u=!0}}return LogUtil.Debug("= S.BaseShape - AdjustAutoInsertShape output:",u),u}TRectToFrame(t,e){LogUtil.Debug("= S.BaseShape - TRectToFrame input:",{rect:t,maintainSize:e});let i=0,n=0,s=0;this.StyleRecord.Line.BThick&&null==this.polylist?(this.StyleRecord.Line.Thickness,i=0):i=this.StyleRecord.Line.Thickness/2,this.trect=Utils1.DeepCopy(t);const a=Utils1.DeepCopy(this.Frame);if(this.inside=new Rectangle(t.x,t.y,t.width,t.height),this.SetShapeIndent(!0),Utils2.Add2Rect(this.inside,this.tindent),this.Frame=Utils1.DeepCopy(this.inside),Utils2.InflateRect(this.Frame,i,i),e||(this.Frame.width<this.sizedim.width&&(n=this.sizedim.width-this.Frame.width,this.Frame.x=a.x),this.Frame.height<this.sizedim.height&&(s=this.sizedim.height-this.Frame.height,this.Frame.y=a.y)),n>0||s>0){const t=Utils1.DeepCopy(this.Frame);t.width+=n,t.height+=s,this.UpdateFrame(t)}else Utils2.CopyRect(this.r,this.Frame),T3Gv.opt.SetShapeR(this);LogUtil.Debug("= S.BaseShape - TRectToFrame output:",{Frame:this.Frame,r:this.r,inside:this.inside})}SetSize(t,e,i){LogUtil.Debug("= S.BaseShape - SetSize input:",{newWidth:t,newHeight:e,actionType:i});let n={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};if(t&&(n.width=t),e&&(n.height=e),t||e){const s=T3Gv.opt.actionBBox,a=T3Gv.opt.actionNewBBox;T3Gv.opt.actionBBox=Utils1.DeepCopy(this.Frame),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(this.Frame),this.HandleActionTriggerCallResize(n,i,null),T3Gv.opt.actionBBox=s,T3Gv.opt.actionNewBBox=a,i!==OptConstant.ActionTriggerType.LineThickness&&(t&&(this.sizedim.width=this.Frame.width),e&&(this.sizedim.height=this.Frame.height)),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let t=0;t<this.hooks.length;t++)OptCMUtil.SetLinkFlag(this.hooks[t].objid,DSConstant.LinkFlags.Move);if(this instanceof Instance.Shape.Polygon){const t=this.RegenerateVectors(n.width,n.height);t&&(this.VertexArray=t),this.polylist&&this.ShapeType===OptConstant.ShapeType.Polygon&&this.ScaleObject(0,0,0,0,0,0)}ObjectUtil$1.AddToDirtyList(this.BlockID),this.rflags&&(t&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1)),e&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)))}LogUtil.Debug("= S.BaseShape - SetSize output:",{Frame:this.Frame,sizedim:this.sizedim,rflags:this.rflags})}UpdateDimensions(t,e,i){LogUtil.Debug("= S.BaseShape - UpdateDimensions input:",{newWidth:t,newHeight:e,maintainAspectRatio:i});const n={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};t&&(n.width=t),e&&(n.height=e),this.UpdateFrame(n),LogUtil.Debug("= S.BaseShape - UpdateDimensions output:",n)}GetHookFlags(){LogUtil.Debug("= S.BaseShape - GetHookFlags input");const t=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcArrayMod|NvConstant.HookFlags.LcAttachToLine;return LogUtil.Debug("= S.BaseShape - GetHookFlags output:",t),t}AllowLink(){LogUtil.Debug("= S.BaseShape - AllowLink input");let t,e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),i=this.flags&NvConstant.ObjFlags.DropOnTable;return e&&(t=e.flags&OptConstant.SessionFlags.SLink||e.flags&OptConstant.SessionFlags.AttLink||i),LogUtil.Debug("= S.BaseShape - AllowLink output:",t),t}GetHookPoints(){LogUtil.Debug("= S.BaseShape - GetHookPoints input");let t=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;if(t){let t=this.ConnectPoints,e=[];for(let i=0;i<t.length;i++)e.push({x:t[i].x,y:t[i].y,id:OptConstant.HookPts.CustomBase+i});return LogUtil.Debug("= S.BaseShape - GetHookPoints output:",e),e}let e=[{x:OptConstant.Common.DimMax/2,y:0,id:OptConstant.HookPts.KTC},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/2,id:OptConstant.HookPts.KRC},{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax,id:OptConstant.HookPts.KBC},{x:0,y:OptConstant.Common.DimMax/2,id:OptConstant.HookPts.KLC}];return LogUtil.Debug("= S.BaseShape - GetHookPoints output:",e),e}SetHookAlign(t,e){let i,n,s;switch(LogUtil.Debug("= S.BaseShape - SetHookAlign input:",{hookPoint:t,alignType:e}),t){case OptConstant.HookPts.AKCL:i=T3Gv.opt.FindChildArray(this.BlockID,-1),i>=0&&(n=ObjectUtil$1.GetObjectPtr(i,!1),n&&(s=n.arraylist.styleflags&OptConstant.AStyles.FlowConn&&!(n.arraylist.styleflags&OptConstant.AStyles.Linear),n.hooks.length&&0===n.hooks[0].connect.x&&!s&&n.SetDirection(!0,!1,!1)));break;case OptConstant.HookPts.AKCR:i=T3Gv.opt.FindChildArray(this.BlockID,-1),i>=0&&(n=ObjectUtil$1.GetObjectPtr(i,!1),n&&(s=n.arraylist.styleflags&OptConstant.AStyles.FlowConn&&!(n.arraylist.styleflags&OptConstant.AStyles.Linear),n.hooks.length&&n.hooks[0].connect.x===OptConstant.Common.DimMax&&!s&&n.SetDirection(!0,!1,!1)))}LogUtil.Debug("= S.BaseShape - SetHookAlign output")}HookToPoint(t,e){LogUtil.Debug("= S.BaseShape - HookToPoint input:",{hookId:t,hookFlags:e});let i=[],n=[{x:0,y:0}],s={},a=-1,o=0;const r=OptConstant.HookPts,l=OptConstant.Common.DimMax,h=NvConstant.HookFlags;if(this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat&&this.PrFormat(this.BlockID),t===r.KAT)n[0].x=this.attachpoint.x,n[0].y=this.attachpoint.y,this.extraflags&OptConstant.ExtraFlags.FlipHoriz&&(n[0].x=l-n[0].x),this.extraflags&OptConstant.ExtraFlags.FlipVert&&(n[0].y=l-n[0].y);else if(t===r.KATD)n[0].x=this.attachpoint.x,n[0].y=this.attachpoint.y;else switch(t){case r.KCTL:n[0].x=0,n[0].y=0;break;case r.KCTR:n[0].x=l,n[0].y=0;break;case r.KCBL:n[0].x=0,n[0].y=l;break;case r.KCBR:n[0].x=l,n[0].y=l;break;case r.KCT:n[0].x=l/2,n[0].y=0,o=h.LcVOnly;break;case r.KCB:n[0].x=l/2,n[0].y=l,o=h.LcVOnly;break;case r.KCL:n[0].x=0,n[0].y=l/2,o=h.LcHOnly;break;case r.KCC:n[0].x=l/2,n[0].y=l/2;break;case r.KCR:n[0].x=l,n[0].y=l/2,o=h.LcHOnly;break;default:if(i=this.GetHookPoints(),!i)return null;for(let e=0;e<i.length;e++)if(t===i[e].id){a=e,n[0].x=i[e].x,n[0].y=i[e].y;break}if(a<0)switch(t){case 1:a=1,n[0].x=l/2,n[0].y=0;break;case 2:a=1,n[0].x=l,n[0].y=l/2;break;case 3:a=1,n[0].x=l/2,n[0].y=l;break;case 4:a=1,n[0].x=0,n[0].y=l/2}if(a<0)return null}return this.RotationAngle||(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,OptConstant.ExtraFlags.FlipVert),s=this.GetPerimPts(-1,n,t,!1,null,-1),t===r.KATD&&(s[0].x-=this.hookdisp.x,s[0].y-=this.hookdisp.y),LogUtil.Debug("= S.BaseShape - HookToPoint output:",s[0]),s[0]}IsCoManager(t){LogUtil.Debug("= S.BaseShape - IsCoManager input:",t);let e=!1;if(this.hooks&&this.hooks.length){const i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(e=i.IsCoManager(t))}return LogUtil.Debug("= S.BaseShape - IsCoManager output:",e),e}RRectGetCornerSize(t){LogUtil.Debug("= S.BaseShape - RRectGetCornerSize input:",{customSize:t});let e=this.Frame.width,i=this.Frame.height,n=e;if(i<n&&(n=i),t&&(n=t),this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let t=OptConstant.Common.RRectFixedDim*this.shapeparam,e=.4*n;return t>e&&(t=e),LogUtil.Debug("= S.BaseShape - RRectGetCornerSize output:",t),t}let s=n*this.shapeparam;return LogUtil.Debug("= S.BaseShape - RRectGetCornerSize output:",s),s}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseShape - GetPerimPts input:",{points:t,targetPoints:e,hookId:i,rotate:n,table:s,needRotate:a});let o=0,r=[],l={};if(this.ShapeType===OptConstant.ShapeType.Rect&&(o=this.RRectGetCornerSize(),o>0))return this.RRectGetPerimPts(t,e,i,n,s,a);if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(l))return r.push(new Point$1(l.x,l.y)),null!=e[0].id&&(r[0].id=e[0].id),LogUtil.Debug("= S.BaseShape - GetPerimPts output:",r),r;for(let h=0;h<e.length;h++)r[h]={x:e[h].x/OptConstant.Common.DimMax*this.Frame.width+this.Frame.x,y:e[h].y/OptConstant.Common.DimMax*this.Frame.height+this.Frame.y,id:null!=e[h].id?e[h].id:0};if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,r)}return LogUtil.Debug("= S.BaseShape - GetPerimPts output:",r),r}RRectGetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseShape - RRectGetPerimPts input:",{e:t,targetPoints:e,hookId:i,rotate:n,table:s,needRotate:a});let o,r,l,h=[0,0];const c=OptConstant.Common.DimMax;let u=[],d={};if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(d))return u.push(new Point$1(d.x,d.y)),null!=e[0].id&&(u[0].id=e[0].id),LogUtil.Debug("= S.BaseShape - RRectGetPerimPts output:",u),u;if(i===OptConstant.HookPts.KAT&&null==s)return u=new BaseDrawObject$1(this).GetPerimPts(t,e,i,!1,s,a),LogUtil.Debug("= S.BaseShape - RRectGetPerimPts output:",u),u;if(this.flags&NvConstant.ObjFlags.UseConnect)for(let p=0;p<e.length;p++)u[p]={x:e[p].x/c*this.Frame.width+this.Frame.x,y:e[p].y/c*this.Frame.height+this.Frame.y,id:null!=e[p].id?e[p].id:0};else{u=new BaseDrawObject$1(this).GetPerimPts(t,e,i,!0,s,a),o=this.GetCornerSize()*OptConstant.Common.RoundFactor,r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);for(let t=0;t<u.length;t++)0===e[t].x&&0===e[t].y?(u[t].x+=o,u[t].y+=o):0===e[t].x&&e[t].y===c?(u[t].x+=o,u[t].y-=o):e[t].x===c&&0===e[t].y?(u[t].x-=o,u[t].y+=o):e[t].x===c&&e[t].y===c?(u[t].x-=o,u[t].y-=o):e[t].x<c/4?(l=PolyUtil.PolyGetIntersect(r,u[t].y,h,null,!1),l&&(u[t].x=h[0],l>1&&h[1]<u[t].x&&(u[t].x=h[1]))):e[t].x>3*c/4?(l=PolyUtil.PolyGetIntersect(r,u[t].y,h,null,!1),l&&(u[t].x=h[0],l>1&&h[1]>u[t].x&&(u[t].x=h[1]))):e[t].y<c/4?(l=PolyUtil.PolyGetIntersect(r,u[t].x,h,null,!0),l&&(u[t].y=h[0],l>1&&h[1]<u[t].y&&(u[t].y=h[1]))):e[t].y>3*c/4&&(l=PolyUtil.PolyGetIntersect(r,u[t].x,h,null,!0),l&&(u[t].y=h[0],l>1&&h[1]>u[t].y&&(u[t].y=h[1]))),null!=e[t].id&&(u[t].id=e[t].id)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,u)}return LogUtil.Debug("= S.BaseShape - RRectGetPerimPts output:",u),u}ChangeTarget(t,e,i,n,s,a){if(LogUtil.Debug("= S.BaseShape - ChangeTarget input:",{eventType:t,targetID:e,additionalData:i,flag:n,coordinates:s,needChangeTarget:a}),a){let t=OptAhUtil.GetGvSviOpt(this.BlockID);null===t&&(t=T3Gv.wallOpt)}LogUtil.Debug("= S.BaseShape - ChangeTarget output")}GetTargetPoints(t,e,i){LogUtil.Debug("= S.BaseShape - GetTargetPoints input:",{event:t,triggerType:e,objectID:i});const n=[{x:0,y:0},{x:OptConstant.Common.DimMax/4,y:0},{x:OptConstant.Common.DimMax/2,y:0},{x:3*OptConstant.Common.DimMax/4,y:0},{x:OptConstant.Common.DimMax,y:0},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/4},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/2},{x:OptConstant.Common.DimMax,y:3*OptConstant.Common.DimMax/4},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax},{x:3*OptConstant.Common.DimMax/4,y:OptConstant.Common.DimMax},{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax},{x:OptConstant.Common.DimMax/4,y:OptConstant.Common.DimMax},{x:0,y:OptConstant.Common.DimMax},{x:0,y:3*OptConstant.Common.DimMax/4},{x:0,y:OptConstant.Common.DimMax/2},{x:0,y:OptConstant.Common.DimMax/4}];let s=[];const a=this.flags&NvConstant.ObjFlags.ContConn&&null!==t,o=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints,r=OptConstant.Common.DimMax;if(i>=0&&ObjectUtil$1.GetObjectPtr(i,!1),a){const i=this.PolyGetTargets(t,e,this.Frame);return LogUtil.Debug("= S.BaseShape - GetTargetPoints output:",i),i}if(o){const t=this.ConnectPoints;for(let e=0;e<t.length;e++)s.push({x:t[e].x,y:t[e].y});if(this.extraflags&(OptConstant.ExtraFlags.FlipHoriz|OptConstant.ExtraFlags.FlipVert)){const t=new Rectangle(0,0,r,r);T3Gv.opt.FlipPoints(t,this.extraflags,s)}return LogUtil.Debug("= S.BaseShape - GetTargetPoints output:",s),s}return LogUtil.Debug("= S.BaseShape - GetTargetPoints output:",n),n}GetSegLFace(t,e,i){LogUtil.Debug("= S.BaseShape - GetSegLFace input:",{point:t,table:e,hookFlags:i});const n=OptConstant.Common.DimMax,s=(t,e)=>{const i=t.x-e.x,n=t.y-e.y;return i*i+n*n};let a=this.RotationAngle,o={...t};if(a){const t=-a/(180/NvConstant.Geometry.PI),e={x:0,y:0,width:n,height:n};Utils3.RotatePointsAboutCenter(e,t,[o])}const r=this.flags&NvConstant.ObjFlags.UseConnect;let l=[];if(r){if(l=this.ConnectPoints,a){const t=-a/(180/NvConstant.Geometry.PI),e={x:0,y:0,width:n,height:n};Utils3.RotatePointsAboutCenter(e,t,l)}const t=new Rectangle(0,0,0,0);Utils2.GetPolyRect(t,l);const e=[{x:n/2,y:0},{x:n/2,y:n},{x:0,y:n/2},{x:n,y:n/2}],i=[{x:t.x+t.width/2,y:t.y},{x:t.x+t.width/2,y:t.y+t.height},{x:t.x,y:t.y+t.height/2},{x:t.x+t.width,y:t.y+t.height/2}],r=t.height<1e3||t.width<1e3?e:i;let h=n*n*n,c=0;for(let n=0;n<r.length;n++){const t=s(r[n],o);t<h&&(h=t,c=n)}const u=OptConstant.HookPts.KTC+c;return LogUtil.Debug("= S.BaseShape - GetSegLFace output:",u),u}const h=o.x,c=n-o.x,u=o.y,d=n-o.y;let p=NvConstant.SegLDir.Klc;return c<h?(p=NvConstant.SegLDir.Krc,u<c?(p=NvConstant.SegLDir.Ktc,d<u&&(p=NvConstant.SegLDir.Kbc)):d<c&&(p=NvConstant.SegLDir.Kbc)):u<h?(p=NvConstant.SegLDir.Ktc,d<u&&(p=NvConstant.SegLDir.Kbc)):d<h&&(p=NvConstant.SegLDir.Kbc),LogUtil.Debug("= S.BaseShape - GetSegLFace output:",p),p}Resize(t,e,i,n,s){if(LogUtil.Debug("= S.BaseShape - Resize input:",{element:t,newSize:e,drawingObject:i,actionType:n,previousBBox:s}),null!=t){i.SetDimensionLinesVisibility(t,!1);const a=t.GetRotation();null==s&&(s=this.prevBBox),Utils1.DeepCopy(this.trect);const o=Utils1.DeepCopy(s),r=Utils1.DeepCopy(e),l=Utils1.DeepCopy(e),h=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(o,r,a);if(this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(l,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),n!==OptConstant.ActionTriggerType.MovePolySeg){t.SetSize(l.width,l.height),t.SetPos(l.x+h.x,l.y+h.y);let e=0;this.ShapeType===OptConstant.ShapeType.Rect&&(e=this.RRectGetCornerSize());const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i.SetSize(l.width,l.height);const n=t.GetElementById(OptConstant.SVGElementClass.Slop);n&&n.SetSize(l.width,l.height);const s=t.GetElementById(OptConstant.SVGElementClass.Hatch);s&&s.SetSize(l.width,l.height),e>0&&i.SetRRectSize&&(i.SetRRectSize(l.width,l.height,e,e),n&&n.SetRRectSize&&n.SetRRectSize(l.width,l.height,e,e),s&&s.SetRRectSize&&s.SetRRectSize(l.width,l.height,e,e))}const c=this.GetGraph(!0);return c?(T3Gv.opt.GraphFormat(this,c,this.Frame,!0),ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects()):this.LMResizeSVGTextObject(t,i,e),t.SetRotation(a),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseShape - Resize output:",h),h}}ResizeInTextEdit(t,e){LogUtil.Debug("= S.BaseShape - ResizeInTextEdit input:",{element:t,newSize:e});const i=t.GetRotation();this.SetDimensionLinesVisibility(t,!1);const n=Utils1.DeepCopy(this.Frame),s=Utils1.DeepCopy(e),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(n,s,i);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(a,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);let r=0;this.ShapeType===OptConstant.ShapeType.Rect&&(r=this.RRectGetCornerSize());const l=t.GetElementById(OptConstant.SVGElementClass.Shape);l&&l.SetSize(a.width,a.height);const h=t.GetElementById(OptConstant.SVGElementClass.Slop);h&&h.SetSize(a.width,a.height);const c=t.GetElementById(OptConstant.SVGElementClass.Hatch);return c&&c.SetSize(e.width,e.height),r>0&&(l&&l.SetRRectSize&&l.SetRRectSize(a.width,a.height,r,r),h&&h.SetRRectSize&&h.SetRRectSize(a.width,a.height,r,r),c&&c.SetRRectSize&&c.SetRRectSize(a.width,a.height,r,r)),t.SetRotation(i),UIUtil.UpdateDisplayCoordinates(e,null,null,this),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseShape - ResizeInTextEdit output:",o),o}Rotate(t,e){LogUtil.Debug("= S.BaseShape - Rotate input:",{element:t,angle:e}),t.SetRotation(e),LogUtil.Debug("= S.BaseShape - Rotate output")}ApplyStyles(t,e){LogUtil.Debug("= S.BaseShape - ApplyStyles input:",{element:t,styleRecord:e});let i=e.Fill.Paint.FillType,n=e.Line.Paint.FillType;const s=""!==this.ImageURL;let a=e.Fill.Paint.Color,o=e.Line.Paint.Color;if(!this.SymbolURL)if(s){let i="PROPFILL";const n={x:0,y:0,width:0,height:0};if(this.ImageHeader&&(this.ImageHeader.croprect&&(n.x=this.ImageHeader.croprect.left,n.y=this.ImageHeader.croprect.top,n.width=this.ImageHeader.croprect.right-this.ImageHeader.croprect.left,n.height=this.ImageHeader.croprect.bottom-this.ImageHeader.croprect.top),void 0!==this.ImageHeader.imageflags&&(this.ImageHeader.imageflags===NvConstant.ImageScales.AlwaysFit?i="NOPROP":this.ImageHeader.imageflags===NvConstant.ImageScales.PropFit&&(i="PROPFIT"))),-1!==this.BlobBytesID){const e=ObjectUtil$1.GetObjectPtr(this.BlobBytesID,!1);e&&e.ImageDir===StyleConstant.ImageDir.Svg?(null==this.SVGDim.width&&(this.SVGDim=Utils2.ParseSVGDimensions(e.Bytes)),t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n,imageWidth:this.SVGDim.width,imageHeight:this.SVGDim.height})):t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n})}else"SVG"===this.ImageURL.slice(-3).toUpperCase()?t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n,imageWidth:this.SVGDim.width,imageHeight:this.SVGDim.height}):t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n});const s=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,a=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;s&&t.SetMirror(s),a&&t.SetFlip(a),t.SetFillOpacity(e.Fill.Paint.Opacity)}else{switch(i){case NvConstant.FillTypes.Gradient:t.SetGradientFill(this.CreateGradientRecord(e.Fill.Paint.GradientFlags,a,e.Fill.Paint.Opacity,e.Fill.Paint.EndColor,e.Fill.Paint.EndOpacity));break;case NvConstant.FillTypes.RichGradient:t.SetGradientFill(this.CreateRichGradientRecord(e.Fill.Paint.GradientFlags));break;case NvConstant.FillTypes.Texture:const i={url:"",scale:1,alignment:e.Fill.Paint.TextureScale.AlignmentScalar},n=e.Fill.Paint.Texture;T3Gv.opt.TextureList.Textures[n]&&(i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.scale=T3Gv.opt.CalcTextureScale(e.Fill.Paint.TextureScale,i.dim.x),e.Fill.Paint.TextureScale.Scale=i.scale,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),t.SetTextureFill(i),t.SetFillOpacity(e.Fill.Paint.Opacity));break;case NvConstant.FillTypes.Transparent:t.SetFillColor("none");break;default:0===e.Fill.Paint.Color.indexOf("#0102")?(t.SetFillColor("none"),T3Gv.opt.Test3DGraph(t.parent,this.Frame.width,this.Frame.height,e.Fill.Paint.Color)):(t.SetFillColor(a),t.SetFillOpacity(e.Fill.Paint.Opacity))}switch(n){case NvConstant.FillTypes.Gradient:t.SetGradientStroke(this.CreateGradientRecord(e.Line.Paint.GradientFlags,o,e.Line.Paint.Opacity,e.Line.Paint.EndColor,e.Line.Paint.EndOpacity));break;case NvConstant.FillTypes.RichGradient:t.SetGradientStroke(this.CreateRichGradientRecord(e.Line.Paint.GradientFlags));break;case NvConstant.FillTypes.Texture:const i={url:"",scale:e.Line.Paint.TextureScale.Scale,alignment:e.Line.Paint.TextureScale.AlignmentScalar},n=e.Line.Paint.Texture;i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),t.SetTextureStroke(i),t.SetStrokeOpacity(e.Line.Paint.Opacity);break;default:t.SetStrokeColor(o),t.SetStrokeOpacity(e.Line.Paint.Opacity)}}LogUtil.Debug("= S.BaseShape - ApplyStyles output")}SetFillHatch(t,e,i){if(LogUtil.Debug("= S.BaseShape - SetFillHatch input:",{element:t,hatchType:e,color:i}),-1!==e&&0!==e){let n=e-1;const s={},a=[];n<10&&(n="0"+n),s.url=Constants.FilePath_Hatches+Constants.HatchName+n+".png",s.scale=1,s.alignment=0,s.dim={x:128,y:128},t.SetTextureFill(s);let o=this.StyleRecord.Line.Paint.Color;i&&(o=i),a.push({type:BConstant.EffectType.RECOLOR,params:{color:o}}),t.Effects().SetEffects(a,this.Frame)}else t.SetFillColor("none");LogUtil.Debug("= S.BaseShape - SetFillHatch output")}IsTransparent(){LogUtil.Debug("= S.BaseShape - IsTransparent input");const t=this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent;return LogUtil.Debug("= S.BaseShape - IsTransparent output:",t),t}GetTargetRect(){LogUtil.Debug("= S.BaseShape - GetTargetRect input");const t={};return Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseShape - GetTargetRect output:",t),t}Hit(t,e,i,n){let s,a,o;LogUtil.Debug("= S.BaseShape - Hit input:",{point:t,isBorderOnly:e,isTransparent:i,hitResult:n});const r=[{x:t.x,y:t.y}];let l={};const h=this.StyleRecord.Line.Thickness/2;this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints&&(e=!1),0!==this.RotationAngle&&(s=this.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,s,r));const c={x:r[0].x,y:r[0].y};return Utils2.CopyRect(l,this.Frame),Utils2.InflateRect(l,h,h),o=Utils2.pointInRect(l,c)?NvConstant.HitCodes.Border:0,o&&(a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),T3Gv.opt.fromOverlayLayer||PolyUtil.PolyPtInPolygon(a,c)?(o=NvConstant.HitCodes.Inside,(this.IsTransparent()||e)&&(o=0,e=!0),a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e&&Utils3.LineDStyleHit(a,c,h,0,null)&&(o=NvConstant.HitCodes.Border)):o=0),n&&(n.hitcode=o),LogUtil.Debug("= S.BaseShape - Hit output:",o),o}AllowMaintainLink(){LogUtil.Debug("= S.BaseShape - AllowMaintainLink input");const t=!!(this instanceof Instance.Shape.Polygon&&this.hookflags&NvConstant.HookFlags.LcAttachToLine);return LogUtil.Debug("= S.BaseShape - AllowMaintainLink output:",t),t}PolyGetTargetPointList(t){LogUtil.Debug("= S.BaseShape - PolyGetTargetPointList input:",{rotationAngle:t});let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=0;return 0!==t&&(i=-t/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,i,e)),LogUtil.Debug("= S.BaseShape - PolyGetTargetPointList output:",e),e}PolyGetTargets(t,e,i){LogUtil.Debug("= S.BaseShape - PolyGetTargets input:",{event:t,hookFlags:e,frame:i});let n=-1,s=OptConstant.Common.LongIntMax;const a=[{x:0,y:0}],o=[],r={x:t.x,y:t.y},l={...i},h=this.PolyGetTargetPointList(e);if(!t)return null;!T3Gv.docUtil.docConfig.enableSnap||e&NvConstant.HookFlags.LcNoSnaps||(r.x=T3Gv.docUtil.SnapToGrid(r).x,r.y=T3Gv.docUtil.SnapToGrid(r).y,r.y=Math.max(r.y,i.y),r.y=Math.min(r.y,i.y+i.height),r.x=Math.max(r.x,i.x),r.x=Math.min(r.x,i.x+i.width));for(let c=1;c<h.length;c++){const t=h[c-1],e=h[c];if(Utils2.EqualPt(t,e))continue;const i=e.x-t.x||1,o=e.y-t.y||1;let l,u,d;Math.abs(o/i)>1?(u=r.y,l=t.x+(u-t.y)*(i/o),d=Math.abs(l-r.x)):(l=r.x,u=t.y+(l-t.x)*(o/i),d=Math.abs(u-r.y));const p=Utils2.Pt2Rect(t,e);Utils2.InflateRect(p,1,1),Utils2.pointInRect(p,{x:l,y:u})&&d<s&&(s=d,n=c,a[0].x=l,a[0].y=u)}if(n>=0){if(0!==this.RotationAngle){const t=this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(l,t,a)}const t=(a[0].x-i.x)/i.width*OptConstant.Common.DimMax,e=(a[0].y-i.y)/i.height*OptConstant.Common.DimMax;return o.push(new Point$1(t,e)),LogUtil.Debug("= S.BaseShape - PolyGetTargets output:",o),o}return LogUtil.Debug("= S.BaseShape - PolyGetTargets output: null"),null}LMAddSVGTextObject(t,e){LogUtil.Debug("= S.BaseShape - LMAddSVGTextObject input:",{svgDocument:t,targetElement:e});const i=Utils1.DeepCopy(this.Frame),n=Utils1.DeepCopy(this.trect);const s=T3Gv.stdObj.GetObject(this.DataID);if(null!=s){const a=t.CreateShape(OptConstant.CSType.Text);a.SetRenderingEnabled(!1),a.SetID(OptConstant.SVGElementClass.Text),a.SetUserData(-1);const o=this.StyleRecord;o.Line.BThick&&null==this.polylist&&Utils2.InflateRect(i,o.Line.BThick,o.Line.BThick),a.SetSpellCheck(this.AllowSpell()),a.InitDataSettings(this.fieldDataTableID,this.fieldDataElemID,this.dataStyleOverride),this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB||(a.SetPos(n.x-i.x,n.y-i.y),a.SetSize(n.width,n.height)),e&&(e.AddElement(a),e.isText=!0,e.textElem=a),s.Data.runtimeText?a.SetRuntimeText(s.Data.runtimeText):(a.SetText(""),a.SetParagraphAlignment(this.TextAlign),a.SetVerticalAlignment("middle")),s.Data.runtimeText||(s.Data.runtimeText=a.GetRuntimeText());let r=null;if(this.bInGroup&&a.DisableHyperlinks(!0),this.TextFlags&NvConstant.TextFlags.AttachA)switch(a.SetRenderingEnabled(!0),a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),r=a.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:a.SetPos(0,-r.height-this.TMargins.top),a.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:a.SetPos(this.Frame.width-r.width,-r.height-this.TMargins.top),a.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:a.SetPos(this.Frame.width/2-r.width/2,-r.height-this.TMargins.top),a.SetParagraphAlignment(TextConstant.TextAlign.Center)}else if(this.TextFlags&NvConstant.TextFlags.AttachB)switch(a.SetRenderingEnabled(!0),a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0),r=a.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:a.SetPos(0,this.Frame.height+this.TMargins.bottom),a.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:a.SetPos(this.Frame.width-r.width,this.Frame.height+this.TMargins.bottom),a.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:a.SetPos(this.Frame.width/2-r.width/2,this.Frame.height+this.TMargins.bottom),a.SetParagraphAlignment(TextConstant.TextAlign.Center)}else this.TextGrow==NvConstant.TextGrowBehavior.Horizontal?a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,n.width,n.height):a.SetConstraints(n.width,n.width,n.height);a.SetRenderingEnabled(!0),a.SetEditCallback(T3Gv.opt.TextCallback,e),LogUtil.Debug("= S.BaseShape - LMAddSVGTextObject output:",{textElement:a})}}LMResizeSVGTextObject(t,e,i){if(LogUtil.Debug("= S.BaseShape - LMResizeSVGTextObject input:",{svgElement:t,drawingObject:e,newDimensions:i}),-1!==e.DataID){const n=t.GetElementById(OptConstant.SVGElementClass.Text);if(n){const t=e.trect;let s=null;if(this.TextFlags&NvConstant.TextFlags.AttachA){switch(s=n.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,-s.height-this.TMargins.top),n.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(i.width-s.width,-s.height-this.TMargins.top),n.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:n.SetPos(i.width/2-s.width/2,-s.height-this.TMargins.top),n.SetParagraphAlignment(TextConstant.TextAlign.Center)}n.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0)}else if(this.TextFlags&NvConstant.TextFlags.AttachB){switch(s=n.GetTextMinDimensions(),this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.SetPos(0,i.height+this.TMargins.bottom),n.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.SetPos(i.width-s.width,i.height+this.TMargins.bottom),n.SetParagraphAlignment(TextConstant.TextAlign.Right);break;default:n.SetPos(i.width/2-s.width/2,i.height+this.TMargins.bottom),n.SetParagraphAlignment(TextConstant.TextAlign.Center)}n.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,0)}else{n.SetPos(t.x-i.x,t.y-i.y);let e=t.width;this.TextGrow==NvConstant.TextGrowBehavior.Horizontal&&(e=T3Gv.opt.header.MaxWorkDim.x),n.SetConstraints(e,t.width,t.height)}}}LogUtil.Debug("= S.BaseShape - LMResizeSVGTextObject output:",{textResized:!0})}GetIconShape(){return this.BlockID}PostCreateShapeCallback(t,e,i,n){this.UpdateDimensionLines(e),this.AddIcons(t,e)}GetDimensionPoints(){LogUtil.Debug("= S.BaseShape - GetDimensionPoints input:",{});let t=[];t.push(new Point$1(this.Frame.x,this.Frame.y)),this.Frame.width>0&&t.push(new Point$1(this.Frame.x+this.Frame.width,this.Frame.y)),this.Frame.height>0&&t.push(new Point$1(this.Frame.x+this.Frame.width,this.Frame.y+this.Frame.height)),this.RotationAngle;for(let e=0;e<t.length;e++)t[e].x-=this.Frame.x,t[e].y-=this.Frame.y;return LogUtil.Debug("= S.BaseShape - GetDimensionPoints output:",t),t}GetDimensionLineDeflection(t,e,i,n){LogUtil.Debug("S.BaseShape - GetDimensionLineDeflection input:",{unusedSvgElement:t,pointX:e,pointY:i,deflectionConfig:n});let s,a,o=0,r=[],l=new Point$1(0,0),h=this.GetDimensionPoints();for(s=h.length,o=0;o<s;o++)h[o].x+=this.inside.x,h[o].y+=this.inside.y;l.x=n.knobPoint.x+this.Frame.x-n.adjustForKnob,l.y=n.knobPoint.y+this.Frame.y-n.adjustForKnob,r.push(h[n.segmentIndex-1]),r.push(h[n.segmentIndex]),r.push(new Point$1(l.x,l.y)),r.push(new Point$1(e,i)),Utils3.RotatePointsAboutCenter(this.Frame,-n.ccAngleRadians,r),Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,r),a=r[3].y-r[2].y;const c=n.originalDeflection+a;return LogUtil.Debug("S.BaseShape - GetDimensionLineDeflection output:",c),c}DimensionLineDeflectionAdjust(t,e,i,n,s){LogUtil.Debug("= S.BaseShape - DimensionLineDeflectionAdjust input:",{svgElement:t,xCoord:e,yCoord:i,additionalParam:n,segmentInfo:s});const a=this.GetDimensionLineDeflection(t,e,i,s);1===s.segmentIndex?this.dimensionDeflectionH=a:this.dimensionDeflectionV=a,this.UpdateDimensionLines(t),this.Dimensions&NvConstant.DimensionFlags.Select&&this.HideOrShowSelectOnlyDimensions(!0),LogUtil.Debug("= S.BaseShape - DimensionLineDeflectionAdjust output:",{dimensionDeflectionH:this.dimensionDeflectionH,dimensionDeflectionV:this.dimensionDeflectionV})}MaintainProportions(t,e){LogUtil.Debug("= S.BaseShape - MaintainProportions input:",{newWidth:t,newHeight:e});const i=this.Frame.width,n=this.Frame.height;let s=null;if(this.ResizeAspectConstrain){if(null!=t&&i>0)return s=t*(n/i),LogUtil.Debug("= S.BaseShape - MaintainProportions output:",s),s;if(null!=e&&n>0)return s=e*(i/n),LogUtil.Debug("= S.BaseShape - MaintainProportions output:",s),s}return LogUtil.Debug("= S.BaseShape - MaintainProportions output:",s),s}UpdateDimensionFromTextObj(t,e){let i,n;LogUtil.Debug("= S.BaseShape - UpdateDimensionFromTextObj input:",{textComponent:t,textData:e}),T3Gv.stdObj.PreserveBlock(this.BlockID);let s,a,o=-1,r=null,l=null;if(e?(s=e.text,a=e.userData):(s=t.GetText(),a=t.GetUserData()),i=a.segment,n=this.GetDimensionValueFromString(s,i),n>=0&&(o=this.GetDimensionLengthFromValue(n)),o<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects(),void LogUtil.Debug("= S.BaseShape - UpdateDimensionFromTextObj output: Invalid dimension length");1===i?(r=this.MaintainProportions(o,null),this.SetSize(o,r,OptConstant.ActionTriggerType.LineLength),this.GetDimensionsForDisplay().width===o&&(this.rwd=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0))):(l=this.MaintainProportions(null,o),this.SetSize(l,o,OptConstant.ActionTriggerType.LineLength),this.GetDimensionsForDisplay().height===o&&(this.rht=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!0))),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let h=0,c=this.hooks.length;h<c;h++)OptCMUtil.SetLinkFlag(this.hooks[h].objid,DSConstant.LinkFlags.Move);ObjectUtil$1.AddToDirtyList(this.BlockID),(this.Frame.x<0||this.Frame.y<0)&&T3Gv.opt.ScrollObjectIntoView(this.BlockID,!1),DrawUtil.CompleteOperation(),LogUtil.Debug("= S.BaseShape - UpdateDimensionFromTextObj output: update complete")}DimensionEditCallback(t,e,i,n){LogUtil.Debug("S.BaseShape - DimensionEditCallback input:",{actionType:t,eventData:e,textObject:i,shapeObject:n});let s=n;switch(t){case"edit":break;case"keyend":if(e.keyCode===KeyboardConstant.Keys.Tab||e.keyCode===KeyboardConstant.Keys.Enter)return T3Gv.opt.CloseEdit(),void LogUtil.Debug("S.BaseShape - DimensionEditCallback output:",!0);break;case"charfilter":if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet){if(-1===e.search(/(\d|\.|'|"| )/))return void LogUtil.Debug("S.BaseShape - DimensionEditCallback output:",!1)}else if(-1===e.search(/(\d|\.)/))return void LogUtil.Debug("S.BaseShape - DimensionEditCallback output:",!1);break;case"activate":{let t=i.svgObj.SDGObj.svgObj.trans.rotation;if(t+=s.RotationAngle,t>=360&&(t-=360),0!==t){let t=s.GetDimensionPoints(),e=[],n=i.userData.segment,a=Utils1.CalcAngleFromPoints(t[n-1],t[n]);s.GetDimensionTextInfo(t[n-1],t[n],a,i,n,e,[],[]);let o=360-s.RotationAngle,r=2*Math.PI*(o/360);Utils3.RotatePointsAboutCenter(s.Frame,r,e);let l={};Utils2.GetPolyRect(l,e);let h={},c=[];h.x=l.x+l.width/2-i.lastFmtSize.width/2,h.y=l.y+l.height/2-i.lastFmtSize.height/2,c.push(new Point$1(h.x,h.y)),Utils3.RotatePointsAboutCenter(s.Frame,-r,c),i.SetPos(c[0].x,c[0].y),i.SetRotation(-s.RotationAngle,c[0].x,c[0].y)}break}case"deactivate":T3Gv.opt.bInDimensionEdit=!1;Utils1.DeepCopy(i.GetUserData());s.BlockID,i.GetText(),ObjectUtil$1.GetObjectPtr(s.BlockID,!0),s=ObjectUtil$1.GetObjectPtr(s.BlockID,!1),s.UpdateDimensionFromTextObj(i);break}LogUtil.Debug("S.BaseShape - DimensionEditCallback output: completed")}NoFlip(){let t;return LogUtil.Debug("= S.BaseShape - NoFlip input:"),t=this.hooks.length?this.hooks[0].hookpt!==OptConstant.HookPts.KAT&&!(this.hooks[0].hookpt>OptConstant.HookPts.AK):Boolean(this.extraflags&OptConstant.ExtraFlags.NoRotate),LogUtil.Debug("= S.BaseShape - NoFlip output:",t),t}Flip(t){if(LogUtil.Debug("= S.BaseShape - Flip input:",{flipFlags:t}),""!==this.SymbolURL||""!==this.ImageURL){if(t&OptConstant.ExtraFlags.FlipHoriz){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,!t)}if(t&OptConstant.ExtraFlags.FlipVert){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipVert);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipVert,!t)}LogUtil.Debug("= S.BaseShape - Flip output:",{extraflags:this.extraflags})}else LogUtil.Debug("= S.BaseShape - Flip output: no symbol or image found, nothing flipped")}NoRotate(){LogUtil.Debug("= S.BaseShape: NoRotate input: {}");const t=HookUtil.FindAllChildConnectors(this.BlockID);let e;if(this.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1))&&e.objecttype===NvConstant.FNObjectTypes.ShapeContainer)return LogUtil.Debug("= S.BaseShape: NoRotate output: true (hook object is a SHAPECONTAINER)"),!0;if(this.extraflags&OptConstant.ExtraFlags.NoRotate)return LogUtil.Debug("= S.BaseShape: NoRotate output: true (extraflags SEDE_NoRotate set)"),!0;const i=t.length;for(let n=0;n<i;n++)if(e=ObjectUtil$1.GetObjectPtr(t[n],!1),!e.IsFlowChartConnector()&&e.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip>0)return LogUtil.Debug("= S.BaseShape: NoRotate output: true (child connector condition met at index "+n+")"),!0;return LogUtil.Debug("= S.BaseShape: NoRotate output: false"),!1}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.BaseShape - MaintainPoint input:",{currentPoint:t,targetPoint:e,deltaValue:i,mode:n,extraFlag:s});return LogUtil.Debug("= S.BaseShape - MaintainPoint output:",false),false}AddIcon(t,e,i){if(LogUtil.Debug("= S.BaseShape - AddIcon input:",{iconData:t,containerElement:e,iconPosition:i}),e){let t=e.GetID(),n=this.Frame;if(t!==this.BlockID){const e=ObjectUtil$1.GetObjectPtr(t,!1);e&&(n=e.Frame)}i.x=n.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize;const s=this.GenericIcon(i);return this.nIcons++,e.AddElement(s),LogUtil.Debug("= S.BaseShape - AddIcon output:",s),s}return LogUtil.Debug("= S.BaseShape - AddIcon output:",null),null}GetActionButtons(){LogUtil.Debug("= S.BaseShape - GetActionButtons input:",{});if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).moreflags&NvConstant.SessionMoreFlags.NoActionButton)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;if(this.flags&NvConstant.ObjFlags.Lock)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(this.BlockID===t.theActiveTextEditObjectID||this.BlockID===t.theActiveTableObjectID||this.BlockID===t.theActiveOutlineObjectID)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);if(e&&e.layers[e.activelayer].flags&NvConstant.LayerFlags.UseEdges)return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",null),null;let i=OptAhUtil.GetGvSviOpt(this.BlockID);null==i&&(i=T3Gv.wallOpt);let n=null,s=!1,a=!1,o=!1,r=!1,l=!1;i&&!OptAhUtil.ShapeCannotHaveActionButtons(this)&&(n=i.AllowActionButtons(this),n&&(s=n.up,a=n.down,o=n.left,r=n.right,n.custom&&(l=!0),n.table&&(l=!0)));const h=s||a||o||r||l?{left:o,right:r,up:s,down:a,custom:l}:null;return LogUtil.Debug("= S.BaseShape - GetActionButtons output:",h),h}SetRolloverActions(t,e,i){LogUtil.Debug("S.BaseShape - SetRolloverActions input:",{svgEvent:t,rolloverElement:e,domEvent:i});const n=ObjectUtil$1.GetObjectPtr(this.BlockID,!1);if(n&&n instanceof BaseDrawObject$1){const n=NvConstant.FNObjectTypes;switch(this.objecttype){case n.FrameContainer:if(i){const e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(i.currentTarget).GetTargetForEvent(i);e.GetID()===OptConstant.SVGElementClass.Slop&&super.SetRolloverActions(t,e)}return this.SetCursors(),void LogUtil.Debug("S.BaseShape - SetRolloverActions output:","Handled SWIMLANE/FRAME_CONTAINER rollover");case n.ShapeContainer:return}if(-1!==T3Gv.opt.curHiliteShape&&T3Gv.opt.curHiliteShape!==this.BlockID){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.curHiliteShape,!1);t&&(t.SetRuntimeEffects(!1),t.ClearCursors())}const s="actionArrow"+this.BlockID;this.actionArrowHideTimerID>=0&&T3Gv.opt.ClearActionArrowTimer(this.BlockID),ActionUtil.RemoveActionArrows(this.BlockID,!0);const a=this.GetActionButtons();if(a){const i=!(a.up||a.left||a.down||a.right||a.custom);if(this.flags&NvConstant.ObjFlags.TextOnly||i)super.SetRolloverActions(t,e);else{const i=this.BlockID,n=this;this.SetRuntimeEffects(!0),this.SetCursors(),T3Gv.opt.curHiliteShape=this.BlockID;let o=[],r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);const l=OptConstant.Common.BaseArrowSlop/r,h=OptConstant.Common.ConnectorArrowSlop/r;let c=0;const u=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);u&&-1!==u.indexOf(i)&&(c=OptConstant.Common.KnobSize/2);let d=0,p=0;if(-1!==T3Gv.opt.actionStoredObjectId||0!==T3Gv.opt.dragBBoxList.length||T3Gv.opt.optSlt)e.svgObj.mouseout((()=>{n.SetRuntimeEffects(!1),n.ClearCursors(),T3Gv.opt.curHiliteShape=-1}));else{let u=l,g=l,f=l,m=l,v=null;const b={lindex:-1,id:-1,hookpt:0};for(;T3Gv.opt.FindChildArrayByIndex(this.BlockID,b)>0;){v=ObjectUtil$1.GetObjectPtr(b.id,!1);const t=(v.arraylist.styleflags&OptConstant.AStyles.CoManager)>0,e=v.IsChildOfAssistant(),i=v.IsFlowChartConnector();let n=v.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip;if(n<0&&(n=0),0!==n&&!i&&!t&&!e&&b.hookpt)switch(b.hookpt){case OptConstant.HookPts.LL:g=h,d+=h-l;break;case OptConstant.HookPts.LR:u=h,d-=h-l;break;case OptConstant.HookPts.LT:m=h,p+=h-l;break;case OptConstant.HookPts.LB:f=h,p-=h-l}}const y=t.CreateShape(OptConstant.CSType.Group);y.SetID(s),y.SetUserData(i);const S=OptConstant.Common.ActionArrowSizeV/r,x=OptConstant.Common.ActionArrowSizeH/r;let w;w.x-=S+g+c,w.y-=S+f+c,w.width+=2*S+(g+u)+2*c,w.height+=2*S+(f+m)+2*c;const C=w.width/2-d/2,T=w.height/2-p/2;if(a.custom){const e=(new LineDraw).CreateCustomActionButtons(t,this,0,this.BlockID);if(e){Utils1.DeepCopy(this.Frame);for(let t=0;t<e.length;t++){const n=e[t];n.SetID(OptConstant.ActionArrow.Custom+t),n.SetUserData(i),y.AddElement(n),o.push(n.DOMElement())}}}if(a.left){let e=(new LineDraw).CreateActionButton(t,g,T,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(0,T),i.LineTo(S,T-x/2),i.LineTo(S,T+x/2),i.LineTo(0,T),i.ClosePath(),i.Apply(),e.SetFillColor("#FF0000"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddLeft)}e.SetID(OptConstant.ActionArrow.Left),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}if(a.up){let e=(new LineDraw).CreateActionButton(t,C,f,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(C,0),i.LineTo(C-x/2,S),i.LineTo(C+x/2,S),i.LineTo(C,0),i.ClosePath(),i.Apply(),e.SetFillColor("#FFD64A"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddUp)}e.SetID(OptConstant.ActionArrow.Up),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}if(a.right){let e=(new LineDraw).CreateActionButton(t,w.width-g,T,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(w.width,T),i.LineTo(w.width-S,T-x/2),i.LineTo(w.width-S,T+x/2),i.LineTo(w.width,T),i.ClosePath(),i.Apply(),e.SetFillColor("#FFD64A"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddRight)}e.SetID(OptConstant.ActionArrow.Right),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}if(a.down){let e=(new LineDraw).CreateActionButton(t,C,w.height-f,this.BlockID);if(null==e){e=t.CreateShape(OptConstant.CSType.Path);const i=e.PathCreator();i.BeginPath(),i.MoveTo(C,w.height),i.LineTo(C-x/2,w.height-S),i.LineTo(C+x/2,w.height-S),i.LineTo(C,w.height),i.ClosePath(),i.Apply(),e.SetFillColor("#FFD64A"),e.SetStrokeWidth(0),e.SetCursor(CursorConstant.CursorType.AddDown)}e.SetID(OptConstant.ActionArrow.Down),e.SetUserData(i),y.AddElement(e),o.push(e.DOMElement())}y.SetSize(w.width,w.height),y.SetPos(w.x,w.y),(new LineDraw).RotateActionButtons()&&y.SetRotation(this.RotationAngle),T3Gv.opt.svgOverlayLayer.AddElement(y);const D=function(t){Utils2.StopPropagationAndDefaults(t);const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(e){const i=e.GetTargetForEvent(t);if(i){const n=i.GetID(),s=e.GetUserData(),a=ObjectUtil$1.GetObjectPtr(s,!1);a&&a instanceof BaseDrawObject$1&&null!=n&&null!=s&&(new LineDraw).ActionClick(t,s,n,null)}}},k=function(t){if(LMEvtUtil.IsWheelClick(t)||T3Constant.DocContext.SpacebarDown)return EvtUtil.Evt_WorkAreaHammerDragStart(t),Utils2.StopPropagationAndDefaults(t),!1;T3Constant.DocContext.HTMLFocusControl&&T3Constant.DocContext.HTMLFocusControl.blur&&T3Constant.DocContext.HTMLFocusControl.blur();const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(e){const i=e.GetTargetForEvent(t);if(i){const n=i.GetID(),s=e.GetUserData(),a=ObjectUtil$1.GetObjectPtr(s,!1);if(!(a&&a instanceof BaseDrawObject$1))return!1;switch(n){case OptConstant.ActionArrow.Up:AddAbove(t,s);break;case OptConstant.ActionArrow.Left:AddLeft(t,s);break;case OptConstant.ActionArrow.Down:AddBelow(t,s);break;case OptConstant.ActionArrow.Right:AddRight(t,s);break;default:n>=OptConstant.ActionArrow.Custom&&AddCustom(t,s,n-OptConstant.ActionArrow.Custom)}return!1}}},$=function(t){ActionUtil.SetActionArrowTimer(i)},O=function(t){ActionUtil.ClearActionArrowTimer(i)};for(let t=0;t<o.length;t++){const e=o[t],i=new Hammer(e);i.on("dragstart",k),i.on("click",D),e.onmouseout=$,e.onmouseover=O}e.svgObj.mouseout((()=>{ActionUtil.SetActionArrowTimer(i),n.SetRuntimeEffects(!1),n.ClearCursors(),T3Gv.opt.curHiliteShape=-1}))}}}else super.SetRolloverActions(t,e)}LogUtil.Debug("S.BaseShape - SetRolloverActions output:","Completed rollover actions setup")}UseEdges(t,e,i,n,s,a){let o;LogUtil.Debug("S.ArcSegmentedLine - UseEdges input:",{isHorizontalExplicit:t,isVerticalExplicit:e,horizontalCondition:i,verticalCondition:n,oldPoint:s,newPoint:a});let r=0,l=0,h=0,c=0,u=0,d=0,p=!1;if(s.x!==a.x&&(t&&i?(r=a.x-s.x,p=!0):(o=this.Frame.x+this.Frame.width/2,Math.abs(o-s.x/2)<100?(u=(a.x-s.x)/2,p=!0):this.Frame.x>s.x/2&&(u=a.x-s.x,p=!0))),s.y!==a.y&&(e&&n?(l=a.y-s.y,p=!0):(o=this.Frame.y+this.Frame.height/2,Math.abs(o-s.y/2)<100?(d=(a.y-s.y)/2,p=!0):this.Frame.y>s.y/2&&(d=a.y-s.y,p=!0))),p){ObjectUtil$1.GetObjectPtr(this.BlockID,!0),(u||d)&&this.OffsetShape(u,d);const t=this.Frame.y+this.Frame.height;return(r||l)&&(r&&(h=this.Frame.width+r),l&&(c=this.Frame.height+l),this.SetSize(h,c,OptConstant.ActionTriggerType.LineLength),this.objecttype===NvConstant.FNObjectTypes.Annotation&&(d=t-(this.Frame.y+this.Frame.height),u=0,(u||d)&&this.OffsetShape(u,d))),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.ArcSegmentedLine - UseEdges output:",!0),!0}return LogUtil.Debug("S.ArcSegmentedLine - UseEdges output:",!1),!1}PrUpdateExtra(t){LogUtil.Debug("S.BaseShape - prUpdateExtra input:",{extraAmount:t,currentBlockId:this.BlockID});const e=this.BlockID,i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!0);if(i&&i instanceof Instance.Shape.ShapeContainer){const n=i.ContainerList;if(!(n.flags&NvConstant.ContainerListFlags.Sparse)){const s=n.List.length;for(let a=0;a<s;a++)if(n.List[a].id===e)return n.List[a].extra+=t,n.List[a].extra<0&&(n.List[a].extra=0),OptCMUtil.SetLinkFlag(i.BlockID,DSConstant.LinkFlags.Move),i.flags=Utils2.SetFlag(i.flags,NvConstant.ObjFlags.Obj1,!0),void LogUtil.Debug("S.BaseShape - prUpdateExtra output:",{updatedExtra:n.List[a].extra})}}LogUtil.Debug("S.BaseShape - prUpdateExtra output: no update performed")}PrGetAdjustShapeList(){LogUtil.Debug("S.ArcSegmentedLine - PrGetAdjustShapeList input:");let t=[],e=[],i=[],n=!1;const s=function(n){const s=ObjectUtil$1.GetObjectPtr(n,!1);if(s){const a=s.GetSVGFrame();i.push(a),t.push(n),e.push(n)}};if(this.hooks.length>0){const a=this.BlockID;let o=0;const r=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(r&&r instanceof Instance.Shape.ShapeContainer){const l=r.ContainerList;if(!(l.flags&NvConstant.ContainerListFlags.Sparse)){const r=l.List.length;for(let t=0;t<r;t++)l.List[t].id===a?(o=l.List[t].extra,s(a),n=!0):n&&s(l.List[t].id);return LogUtil.Debug("S.ArcSegmentedLine - PrGetAdjustShapeList output:",{list:t,svglist:e,framelist:i,oldextra:o,arrangement:l.Arrangement}),{list:t,svglist:e,framelist:i,oldextra:o,arrangement:l.Arrangement}}}}return LogUtil.Debug("S.ArcSegmentedLine - PrGetAdjustShapeList output: null"),null}OnDisconnect(t,e,i,n){if(LogUtil.Debug("S.ArcSegmentedLine - OnDisconnect input:",{elementId:t,container:e,disconnectData:i,reason:n}),e instanceof Instance.Shape.ShapeContainer&&null!=this.zListIndex&&this.zListIndex>=0){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);e&&(T3Gv.opt.svgObjectLayer.RemoveElement(e),T3Gv.opt.svgObjectLayer.AddElement(e,this.zListIndex),this.zListIndex=-1)}LogUtil.Debug("S.ArcSegmentedLine - OnDisconnect output: completed")}RightClick(t){LogUtil.Debug("= s.BaseShape: RightClick/ - RightClick input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=OptConstant.ShapeType,n=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);let s=n.GetID(),a=ObjectUtil$1.GetObjectPtr(s,!1);if(a&&a instanceof BaseDrawObject$1){if(!SelectUtil.SelectObjectFromClick(t,n))return!1;if(T3Gv.docUtil.IsReadOnly())return T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=n.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,UIUtil.ShowContextMenu(!0,"Shape","ReadOnly"),!1;const o=n.GetID(),r=n.GetTargetForEvent(t).GetID();if(a=ObjectUtil$1.GetObjectPtr(o,!1),a){let e=(a.TextFlags&NvConstant.TextFlags.OneClick)>0&&r!==OptConstant.SVGElementClass.Slop;if((a.AllowTextEdit()||(e=!1))&&(a.GetTextObject(t,!0)>=0||e)){const i=n.textElem;let s=-1;(i||e)&&(i&&(s=i.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)),(s>=0||e)&&TextUtil.ActivateTextEdit(n,t,!0))}}T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=n.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0;if(null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();e.GetSelectedRange(),e&&e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)}else switch(T3Gv.opt.rClickParam.targetId=s,a=ObjectUtil$1.GetObjectPtr(s,!1),a.objecttype){case NvConstant.FNObjectTypes.FrameContainer:UIUtil.ShowContextMenu(!0,"FrameContainer","Default");break;case NvConstant.FNObjectTypes.Multiplicity:UIUtil.ShowContextMenu(!0,"Multiplicity","Default");break;case NvConstant.FNObjectTypes.ShapeContainer:UIUtil.ShowContextMenu(!0,"ShapeContainer","Default");default:if(a.ShapeType===i.RRect)a.ImageURL&&a.ImageURL.length||a.EMFHash&&a.EMFHash.length?QuasarUtil.ShowContextMenu(!0,"Image","Default"):QuasarUtil.ShowContextMenu(!0,"RRect","Default");else UIUtil.ShowContextMenu(!0,"Shape","Default"),LogUtil.Debug("S.BaseShape - RightClick: Displayed Quasar context menu")}}}}class Rect$1 extends BaseShape{constructor(t){LogUtil.Debug("= S.Rect constructor Input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.Rect,t.moreflags|=OptConstant.ObjMoreFlags.FixedRR,t.uniType="Rect",super(t),this.dataclass=t.dataclass||PolygonConstant.ShapeTypes.RECTANGLE,this.nativeDataArrayBuffer=t.nativeDataArrayBuffer||null,this.SymbolData=t.SymbolData||null,LogUtil.Debug("= S.Rect constructor Output:",this)}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n={...this.Frame},s=this.StyleRecord;s.Line.BThick&&null===this.polylist&&Utils2.InflateRect(n,s.Line.BThick,s.Line.BThick);const a=this.SVGTokenizerHook(s),o=a.Line.Paint.Color,r=a.Line.Thickness,l=a.Line.LinePattern,h=a.Line.Paint.Opacity,c=n.width,u=n.height;i.SetSize(c,u),i.SetPos(n.x,n.y);const d=this.RRectGetCornerSize();let p;if(this.SymbolURL){const e=t.CreateShape(OptConstant.CSType.Rect);e.SetID(OptConstant.SVGElementClass.Shape),e.SetSize(c,u),e.SetImageFill(this.SymbolURL,{scaleType:"NOPROP"});const n=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,s=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;n&&e.SetMirror(n),s&&e.SetFlip(s),i.AddElement(e),this.GetFieldDataStyleOverride()}else d>0?(p=t.CreateShape(OptConstant.CSType.RRect),p.SetRRectSize(c,u,d,d)):p=t.CreateShape(OptConstant.CSType.Rect),p.SetStrokeColor(o),p.SetStrokeOpacity(h),p.SetStrokeWidth(r),0!==l&&p.SetStrokePattern(l),p.SetID(OptConstant.SVGElementClass.Shape),p.SetSize(c,u),i.AddElement(p);if(this.ApplyStyles(p,a),this.ApplyEffects(i,!1,!1),!(this instanceof Instance.Shape.ShapeContainer)){let n=OptConstant.Common.Slop;const s=u,o=c;let l;if(d>0?(l=t.CreateShape(OptConstant.CSType.RRect),l.SetRRectSize(o,s,d,d)):l=t.CreateShape(OptConstant.CSType.Rect),l.SetStrokeColor("white"),l.SetFillColor("none"),l.SetOpacity(0),l.SetStrokeWidth(r+n),e){const t=this.SymbolURL||a.Fill.Paint.FillType===NvConstant.FillTypes.Transparent&&this.DataID>=0;l.SetEventBehavior(t?OptConstant.EventBehavior.HiddenAll:OptConstant.EventBehavior.HiddenOut)}else l.SetEventBehavior(OptConstant.EventBehavior.None);l.SetID(OptConstant.SVGElementClass.Slop),l.ExcludeFromExport(!0),l.SetSize(o||1,s),i.AddElement(l)}const g=a.Fill.Hatch;if(g&&0!==g){let e;d>0?(e=t.CreateShape(OptConstant.CSType.RRect),e.SetRRectSize(c,u,d,d)):e=t.CreateShape(OptConstant.CSType.Rect),e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(c,u),e.SetStrokeWidth(0),this.SetFillHatch(e,g),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),i}GetCornerSize(t){LogUtil.Debug("= S.Rect GetCornerSize Input:",t);const e=this.RRectGetCornerSize(t);return LogUtil.Debug("= S.Rect GetCornerSize Output:",e),e}RRectGetCornerSize(t){LogUtil.Debug("= S.Rect RRectGetCornerSize Input:",t);let e=this.Frame.width,i=this.Frame.height,n=e<i?e:i;if(t&&(n=t),this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let t=OptConstant.Common.RRectFixedDim*this.shapeparam,e=.4*n;return t>e&&(t=e),LogUtil.Debug("= S.Rect RRectGetCornerSize Output:",t),t}let s=n*this.shapeparam;return LogUtil.Debug("= S.Rect RRectGetCornerSize Output:",s),s}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.Rect GetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});let a;return a=this.RRectGetCornerSize()>0?this.RRectGetPolyPoints(t,e,i,n,s):this.BaseDrawingObjectGetPolyPoints(t,e,i,n,s),LogUtil.Debug("= S.Rect GetPolyPoints Output:",a),a}RRectGetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.Rect RRectGetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});let a=[],o={},r={};Utils2.CopyRect(o,this.Frame);let l=this.StyleRecord.Line.Thickness/2;n&&Utils2.InflateRect(o,l,l);let h=this.GetCornerSize();if(r.x=0,r.y=0,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,h,!0),r.x=0,r.y=o.height-2*h,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,h,0,!0),r.x=o.width-h,r.y=o.height,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,-h,!1),r.x=o.width-h,r.y=2*h,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,-h,0,!1),a.push(new Point$1(a[0].x,a[0].y)),!e)for(let c=0,u=a.length;c<u;c++)a[c].x+=o.x,a[c].y+=o.y;return LogUtil.Debug("= S.Rect RRectGetPolyPoints Output:",a),a}BaseDrawingObjectGetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.Rect BaseDrawingObjectGetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});let a=[],o={};Utils2.CopyRect(o,this.Frame);let r=this.StyleRecord.Line.Thickness/2;if(n&&Utils2.InflateRect(o,r,r),a.push(new Point$1(0,0)),a.push(new Point$1(o.width,0)),a.push(new Point$1(o.width,o.height)),a.push(new Point$1(0,o.height)),a.push(new Point$1(0,0)),!e)for(let l=0,h=a.length;l<h;l++)a[l].x+=o.x,a[l].y+=o.y;return LogUtil.Debug("= S.Rect BaseDrawingObjectGetPolyPoints Output:",a),a}ExtendLines(t){LogUtil.Debug("= S.Rect ExtendLines Input:",t),this.RRectGetCornerSize(),LogUtil.Debug("= S.Rect ExtendLines Output")}SetShapeIndent(t){LogUtil.Debug("= S.Rect SetShapeIndent Input:",t);let e;return this.RRectGetCornerSize()>0?e=this.RRectSetShapeIndent(t):(this.left_sindent=0,this.right_sindent=0,this.top_sindent=0,this.bottom_sindent=0,e=super.SetShapeIndent(t)),LogUtil.Debug("= S.Rect SetShapeIndent Output:",e),e}RRectSetShapeIndent(t){LogUtil.Debug("= S.Rect RRectSetShapeIndent Input:",t);let e=this.inside.width,i=this.inside.height,n=e<i?e:i,s=this.shapeparam;if(this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let e=n;t&&(e+=this.GetCornerSize()*OptConstant.Common.RoundFactor*2,e=n+this.GetCornerSize(e)*OptConstant.Common.RoundFactor*2),s=this.GetCornerSize(e)/e}this.left_sindent=s*OptConstant.Common.RoundFactor,this.top_sindent=this.left_sindent,this.right_sindent=this.left_sindent,this.bottom_sindent=this.left_sindent;let a=1,o=1,r=1,l=1;t&&(a=o=r=l=1-2*this.left_sindent),this.tindent.left=this.left_sindent*e/a,this.tindent.top=this.top_sindent*i/o,this.tindent.right=this.right_sindent*e/r,this.tindent.bottom=this.bottom_sindent*i/l,LogUtil.Debug("= S.Rect RRectSetShapeIndent Output:",{left_sindent:this.left_sindent,top_sindent:this.top_sindent,right_sindent:this.right_sindent,bottom_sindent:this.bottom_sindent,tindent:this.tindent})}SetShapeProperties(t){LogUtil.Debug("= S.Rect SetShapeProperties Input:",t);let e=!1;const i=OptConstant.ObjMoreFlags.FixedRR;if(t.hasrrectselected){const n=(this.moreflags&i)>0!==t.rrectfixed,s=t.rrectparam!==this.shapeparam;(n||s)&&(this.moreflags=Utils2.SetFlag(this.moreflags,i,t.rrectfixed),this.shapeparam=t.rrectparam,0===this.shapeparam&&(this.left_sindent=0,this.top_sindent=0,this.right_sindent=0,this.bottom_sindent=0,this.tindent.left=0,this.tindent.top=0,this.tindent.right=0,this.tindent.bottom=0),this.SetSize(this.Frame.width,0,OptConstant.ActionTriggerType.LineLength),0===this.shapeparam&&this.ExtendLines(!0),e=!0)}return Instance.Shape.BaseShape.prototype.SetShapeProperties.call(this,t)&&(e=!0),LogUtil.Debug("= S.Rect SetShapeProperties Output:",e),e}ApplyCurvature(t){LogUtil.Debug("= S.Rect ApplyCurvature Input:",t);var e={hasrrectselected:!0,rrectfixed:!0,rrectparam:t};this.SetShapeProperties(e),LogUtil.Debug("= S.Rect ApplyCurvature Output: Shape properties updated")}}class ArrowheadRecord{constructor(){this.StartArrowID=0,this.StartArrowDisp=!1,this.EndArrowID=0,this.EndArrowDisp=!1,this.ArrowSizeIndex=1}}class BaseLine extends BaseDrawObject$1{constructor(t){LogUtil.Debug("= S.BaseLine: constructor called with input:",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Line,t.maxhooks=2,void 0===t.targflags&&(t.targflags=NvConstant.HookFlags.LcLine|NvConstant.HookFlags.LcAttachToLine),void 0===t.hookflags&&(t.hookflags=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcLine),super(t),this.LineType=t.LineType,this.linetrect={x:0,y:0,width:0,height:0},this.theMinTextDim={width:0,height:0},this.TextWrapWidth=0,this.iconShapeBottomOffset=20,this.iconShapeRightOffset=0,LogUtil.Debug("= S.BaseLine: constructor output:",this)}checkIfPolyLine(t){LogUtil.Debug("= S.BaseLine: checkIfPolyLine called with input:",t);const e=t instanceof Instance.Shape.PolyLine;return LogUtil.Debug("= S.BaseLine: checkIfPolyLine output:",e),e}CalcFrame(t){LogUtil.Debug("= S.BaseLine: CalcFrame called with inputFlag =",t);let e=!1;this.Frame=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),LogUtil.Debug("= S.BaseLine: Initial Frame calculated as",this.Frame),this.LineType===OptConstant.LineType.SEGLINE&&(e=!0,LogUtil.Debug("= S.BaseLine: LineType is SEGLINE, setting isSegLine to",e));const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,e,!1,null);LogUtil.Debug("= S.BaseLine: Retrieved polyPoints:",i),i&&i.length&&(Utils2.GetPolyRect(this.Frame,i),LogUtil.Debug("= S.BaseLine: Updated Frame using polyPoints:",this.Frame)),this.UpdateFrame(this.Frame,t),LogUtil.Debug("= S.BaseLine: Final Frame after UpdateFrame:",this.Frame)}GetArrowheadFormat(){LogUtil.Debug("= S.BaseLine: GetArrowheadFormat called"),LogUtil.Debug("= S.BaseLine: Input this =",this);const t=new ArrowheadRecord;return ShapeUtil.LineIsReversed(this,null,!1)?(LogUtil.Debug("= S.BaseLine: Line is reversed"),t.StartArrowID=this.EndArrowID,t.EndArrowID=this.StartArrowID,t.StartArrowDisp=this.EndArrowDisp,t.EndArrowDisp=this.StartArrowDisp):(LogUtil.Debug("= S.BaseLine: Line is not reversed"),t.StartArrowID=this.StartArrowID,t.EndArrowID=this.EndArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowDisp=this.EndArrowDisp),t.ArrowSizeIndex=this.ArrowSizeIndex,LogUtil.Debug("= S.BaseLine: Output ArrowheadRecord =",t),t}GetSVGFrame(t){LogUtil.Debug("= S.BaseLine: GetSVGFrame called with input:",t);let e={};return null!=t?Utils2.CopyRect(e,t):e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),LogUtil.Debug("= S.BaseLine: GetSVGFrame output:",e),e}GetPositionRect(){LogUtil.Debug("= S.BaseLine: GetPositionRect called with StartPoint:",this.StartPoint,"and EndPoint:",this.EndPoint);const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);return LogUtil.Debug("= S.BaseLine: GetPositionRect output:",t),t}AdjustPinRect(t,e,i){LogUtil.Debug("= S.BaseLine: AdjustPinRect called with",{pinRect:t,offset:e,additional:i});const n=t;return LogUtil.Debug("= S.BaseLine: AdjustPinRect output:",n),n}GetDimensions(){LogUtil.Debug("= S.BaseLine: GetDimensions called with StartPoint:",this.StartPoint,"and EndPoint:",this.EndPoint);const t=this.EndPoint.x-this.StartPoint.x,e=this.EndPoint.y-this.StartPoint.y,i={x:Utils2.Sqrt(t*t+e*e),y:0};return LogUtil.Debug("= S.BaseLine: GetDimensions output:",i),i}GetDimensionsForDisplay(){LogUtil.Debug("= S.BaseLine: GetDimensionsForDisplay called with no input parameters");const t=this.GetDimensions();LogUtil.Debug("= S.BaseLine: Dimensions retrieved:",t);const e={x:this.Frame.x,y:this.Frame.y,width:t.x,height:t.y};return LogUtil.Debug("= S.BaseLine: GetDimensionsForDisplay output:",e),e}GetSnapRect(){LogUtil.Debug("= S.BaseLine: GetSnapRect called with no input");let t={};if(Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseLine: Initial snapRect copied from Frame:",t),this.objecttype===NvConstant.FNObjectTypes.FlWall){let e=0,i=0;0===t.width&&(e=this.StyleRecord.Line.Thickness/2),0===t.height&&(i=this.StyleRecord.Line.Thickness/2),Utils2.InflateRect(t,e,i),LogUtil.Debug("= S.BaseLine: snapRect after inflation for wall opt wall:",t)}return LogUtil.Debug("= S.BaseLine: GetSnapRect returning:",t),t}CanSnapToShapes(t){if(LogUtil.Debug("= S.BaseLine: CanSnapToShapes called with input:",t),t&&this.objecttype===NvConstant.FNObjectTypes.FlWall){if(Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x,this.StyleRecord.Line.BThick))return t.distanceonly=NvConstant.GuideDistanceTypes.Vertical_Wall,LogUtil.Debug("= S.BaseLine: CanSnapToShapes output:",this.BlockID,"for Vertical_Wall"),this.BlockID;if(Utils2.IsEqual(this.StartPoint.y,this.EndPoint.y,this.StyleRecord.Line.BThick))return t.distanceonly=NvConstant.GuideDistanceTypes.Horizontal_Wall,LogUtil.Debug("= S.BaseLine: CanSnapToShapes output:",this.BlockID,"for Horizontal_Wall"),this.BlockID}return LogUtil.Debug("= S.BaseLine: CanSnapToShapes output: -1"),-1}IsSnapTarget(){LogUtil.Debug("= S.BaseLine: IsSnapTarget called with no input");return LogUtil.Debug("= S.BaseLine: IsSnapTarget output:",false),false}GuideDistanceOnly(){LogUtil.Debug("= S.BaseLine: GuideDistanceOnly called");const t=!!(this.objecttype===NvConstant.FNObjectTypes.FlWall)&&NvConstant.GuideDistanceTypes.PolyWall;return LogUtil.Debug("= S.BaseLine: GuideDistanceOnly returning",t),t}CreateDimension(t,e,i,n,s,a,o,r,l,h,c){if(LogUtil.Debug("= S.BaseLine: CreateDimension called with input:",{startPoint:t,endPoint:e,dimensionParam:i,extraParam1:n,extraParam2:s,extraParam3:a,extraParam4:o,extraParam5:r,extraParam6:l,extraParam7:h,extraParam8:c}),!i||this instanceof Instance.Shape.PolyLine&&this.polylist&&this.polylist.closed){const u=super.CreateDimension(t,e,i,n,s,a,o,r,l,h,c);return LogUtil.Debug("= S.BaseLine: CreateDimension output:",u),u}LogUtil.Debug("= S.BaseLine: CreateDimension condition not met, returning undefined.")}GetDimensionTextForPoints(t,e){LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints input:",{startPoint:t,endPoint:e});let i=0;if(this.Dimensions&NvConstant.DimensionFlags.Total){const t=this.GetPolyPoints(200,!0,!1,!1,null);for(let e=1;e<t.length;e++){const n=Math.abs(t[e].x-t[e-1].x),s=Math.abs(t[e].y-t[e-1].y);0===n&&0===s||(i+=Math.sqrt(n*n+s*s))}}else{const n=360-Utils1.CalcAngleFromPoints(t,e),s=2*Math.PI*(n/360),a=[new Point$1(t.x,t.y),new Point$1(e.x,e.y)];Utils3.RotatePointsAboutCenter(this.Frame,-s,a),i=Math.abs(a[0].x-a[1].x)}const n=RulerUtil.GetLengthInRulerUnits(i);return LogUtil.Debug("= S.BaseDrawObject: GetDimensionTextForPoints output:",n),n}EnforceMinimum(t){LogUtil.Debug("= S.BaseDrawObject: EnforceMinimum input:",{isPrimary:t,StartPoint:this.StartPoint,EndPoint:this.EndPoint});const e=OptConstant.Common.MinDim;if(Utils2.IsEqual(this.EndPoint.x,this.StartPoint.x)){const i=this.EndPoint.y-this.StartPoint.y;Math.abs(i)<e&&this.hooks.length<2&&(i>=0?t?this.StartPoint.y=this.EndPoint.y-e:this.EndPoint.y=this.StartPoint.y+e:t?this.StartPoint.y=this.EndPoint.y+e:this.EndPoint.y=this.StartPoint.y-e)}else if(Utils2.IsEqual(this.EndPoint.y,this.StartPoint.y)){const i=this.EndPoint.x-this.StartPoint.x;Math.abs(i)<e&&this.hooks.length<2&&(i>=0?t?this.StartPoint.x=this.EndPoint.x-e:this.EndPoint.x=this.StartPoint.x+e:t?this.StartPoint.x=this.EndPoint.x+e:this.EndPoint.x=this.StartPoint.x-e)}else{const i=this.EndPoint.x-this.StartPoint.x,n=this.EndPoint.y-this.StartPoint.y;Math.abs(i)<e&&Math.abs(n)<e&&this.hooks.length<2&&(Math.abs(i)>=Math.abs(n)?i>=0?t?this.StartPoint.x=this.EndPoint.x-e:this.EndPoint.x=this.StartPoint.x+e:t?this.StartPoint.x=this.EndPoint.x+e:this.EndPoint.x=this.StartPoint.x-e:n>=0?t?this.StartPoint.y=this.EndPoint.y-e:this.EndPoint.y=this.StartPoint.y+e:t?this.StartPoint.y=this.EndPoint.y+e:this.EndPoint.y=this.StartPoint.y-e)}LogUtil.Debug("= S.BaseDrawObject: EnforceMinimum output:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateDimensions(t,e,i){LogUtil.Debug("= S.BaseLine: UpdateDimensions called with input:",{newLength:t,unusedParam1:e,unusedParam2:i});let n=0,s=0,a=0,o=0,r=0;const l=[],h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);l.push(new Point$1(this.StartPoint.x-h.x,this.StartPoint.y-h.y)),l.push(new Point$1(this.EndPoint.x-h.x,this.EndPoint.y-h.y)),n=360-Utils1.CalcAngleFromPoints(l[0],l[1]);const c=2*Math.PI*(n/360);Utils3.RotatePointsAboutCenter(this.Frame,-c,l),l[0].x<l[1].x?l[1].x=l[0].x+t:l[1].x=l[0].x-t,Utils3.RotatePointsAboutCenter(this.Frame,c,l),s=l[1].x+h.x,a=l[1].y+h.y,s<0&&(o=-s,s=0),a<0&&(r+=-a,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(r+=OptConstant.Common.DimDefaultStandoff),a+=r);const u=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.AdjustLineEnd(u,s,a,OptConstant.ActionTriggerType.LineEnd,!0),(o>0||r>0)&&(s=this.StartPoint.x+o,a=this.StartPoint.y+r,this.AdjustLineStart(u,s,a,OptConstant.ActionTriggerType.LineStart,!0)),LogUtil.Debug("= S.BaseLine: UpdateDimensions output: StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}OffsetShape(t,e){LogUtil.Debug("= S.BaseLine: OffsetShape called with offsetX:",t,"offsetY:",e),this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.StartPoint.x+=t,this.StartPoint.y+=e,this.EndPoint.x+=t,this.EndPoint.y+=e,this.CalcFrame(),LogUtil.Debug("= S.BaseLine: OffsetShape updated Frame:",this.Frame,"StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}SetShapeOrigin(t,e,i){LogUtil.Debug("= S.BaseLine: SetShapeOrigin called with newX:",t,"newY:",e,"additionalParam:",i);const n=this.GetSVGFrame();let s=0,a=0;null!=t&&(s=n.x-t),null!=e&&(a=n.y-e),this.StartPoint.x-=s,this.StartPoint.y-=a,this.EndPoint.x-=s,this.EndPoint.y-=a,this.CalcFrame(),LogUtil.Debug("= S.BaseLine: SetShapeOrigin updated StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}UpdateFrame(t,e){var i,n,s;let a,o;LogUtil.Debug("= S.BaseLine: UpdateFrame called with inputFrame:",t,"shouldRedraw:",e);let r=t||this.Frame,l=this.LineTextX?Utils1.DeepCopy(this.trect):null,h=(null==(n=null==(i=this.StyleRecord)?void 0:i.Line)?void 0:n.Thickness)||0,c=Math.max(h,OptConstant.Common.MinWidth);super.UpdateFrame(r);let u=Utils1.DeepCopy(this.linetrect);if(u.x+=this.Frame.x,u.y+=this.Frame.y,null==(null==(s=this.StartPoint)?void 0:s.x)&&(e=!1),T3Gv.opt&&(o=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),e?(o&&T3Gv.opt.svgObjectLayer.RemoveElement(o),o=this.CreateShape(T3Gv.opt.svgDoc,!1)):o&&(r=this.GetSVGFrame(),o=o.GetElementById(OptConstant.SVGElementClass.Shape)),o&&(a=o.GetArrowheadBounds(),a&&a.length)))for(let d=0;d<a.length;d++)a[d].x+=r.x,a[d].y+=r.y,this.r=Utils2.UnionRect(a[d],this.r,this.r);if(Utils2.InflateRect(this.r,c/2,c/2),this.StyleRecord){let t=this.CalcEffectSettings(this.Frame,this.StyleRecord,!1);t&&Utils2.Add2Rect(this.r,t.extent)}if(this.DataID>=0&&this.linetrect.width&&(this.r=Utils2.UnionRect(u,this.r,this.r)),this.AddDimensionsToR(),this.TextGrow===NvConstant.TextGrowBehavior.Vertical&&!this.LineTextX){let t=this.GetTextOnLineParams(this.BlockID),e=Utils2.Pt2Rect(t.StartPoint,t.EndPoint);if(!this.TextWrapWidth){let t=Math.sqrt(r.width**2+r.height**2);this.TextWrapWidth=t/2}let i=e.width-this.TextWrapWidth;switch(ShapeUtil.TextAlignToWin(this.TextAlign).just){case TextConstant.TextJust.Left:this.trect.x=e.x,this.trect.width=this.TextWrapWidth;break;case TextConstant.TextJust.Right:this.trect.x=e.x+e.width-this.TextWrapWidth,this.trect.width=this.TextWrapWidth;break;default:this.trect.x=e.x+i/2,this.trect.width=this.TextWrapWidth}}l&&(this.trect.width=l.width,this.trect.height=l.height),LogUtil.Debug("= S.BaseLine: UpdateFrame output:",this.Frame,this.r)}GetHitTestFrame(){LogUtil.Debug("= S.BaseLine: GetHitTestFrame called");let t={};Utils2.CopyRect(t,this.Frame),LogUtil.Debug("= S.BaseLine: Initial hitTestFrame copied from Frame:",t);const e=OptConstant.Common.KnobSize;return Utils2.InflateRect(t,e/2,e/2),LogUtil.Debug("= S.BaseLine: Inflated hitTestFrame by knob size:",t),t=Utils2.UnionRect(t,this.r,t),LogUtil.Debug("= S.BaseLine: Final hitTestFrame after union with main rectangle:",t),t}GetMoveRect(t){LogUtil.Debug("= S.BaseLine: GetMoveRect called with includeInflation:",t);const e={};return t?(Utils2.CopyRect(e,this.r),Utils2.InflateRect(e,0,0)):Utils2.CopyRect(e,this.Frame),LogUtil.Debug("= S.BaseLine: GetMoveRect output:",e),e}SetSize(t,e,i){LogUtil.Debug("= S.BaseLine: SetSize called with newWidth:",t,"newHeight:",e,"actionType:",i);let n=!1,s=0,a=0;if(i!==OptConstant.ActionTriggerType.LineLength||null==t){null!=t&&(s=t-this.Frame.width),null!=e&&(a=e-this.Frame.height),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),(this.StartPoint.x<this.EndPoint.x||Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x)&&this.StartPoint.y<this.EndPoint.y)&&(n=!0);const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);n?this.AdjustLineEnd(i,this.EndPoint.x+s,this.EndPoint.y+a,0,!0):this.AdjustLineStart(i,this.StartPoint.x+s,this.StartPoint.y+a,0,!0),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}else this.UpdateDimensions(t);LogUtil.Debug("= S.BaseLine: SetSize completed with updated StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}AdjustForLineAngleSnap(t,e){LogUtil.Debug("= S.BaseLine: AdjustForLineAngleSnap called with startPoint:",t,"endPoint:",e);let i=Utils1.CalcAngleFromPoints(t,e),n=!1;return(i>=358||i<=3||i>=178&&i<=183)&&(e.y=t.y,n=!0),(i>=88&&i<=93||i>=268&&i<=273)&&(e.x=t.x,n=!0),LogUtil.Debug("= S.BaseLine: AdjustForLineAngleSnap output endPoint:",e,"adjusted:",n),n}GetAngle(t){LogUtil.Debug("= S.BaseLine: GetAngle called with params:",t);let e=0;const i=this.GetTextOnLineParams(t);let n=i.StartPoint,s=i.EndPoint;if(this.LineType===OptConstant.LineType.LINE){n.x>s.x&&(n=i.EndPoint,s=i.StartPoint);const t=Math.abs(n.x-s.x),a=Math.abs(n.y-s.y);if(a<1)e=0;else if(t<1)e=90;else{const i=Math.atan(a/t);e=n.y<s.y?180-(e=180*i/Math.PI):180*i/Math.PI}}else e=T3Gv.opt.GetClockwiseAngleBetween2PointsInDegrees(n,s);return LogUtil.Debug("= S.BaseLine: GetAngle output:",e),e}GetDrawNormalizedAngle(t,e){LogUtil.Debug("= S.BaseLine: GetDrawNormalizedAngle called with startPoint:",t,"endPoint:",e);let i=Utils1.CalcAngleFromPoints(t,e),n=!1;return this.polylist?this.checkIfPolyLine(this)?n=this.IsReverseWinding():void 0!==this.IsReversed&&(n=this.IsReversed):i>=180&&(n=!0),n&&(i-=180,i<0&&(i+=360)),LogUtil.Debug("= S.BaseLine: GetDrawNormalizedAngle output:",i),i}GetApparentAngle(t){LogUtil.Debug("= S.BaseLine: GetApparentAngle called with params:",t);const e=this.GetDrawNormalizedAngle(this.StartPoint,this.EndPoint);return LogUtil.Debug("= S.BaseLine: GetApparentAngle output:",e),e}IsReverseWinding(){LogUtil.Debug("= S.BaseLine: IsReverseWinding called");let t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);if(LogUtil.Debug("= S.BaseLine: Retrieved points:",t),2===t.length){const e=t[0].x>t[1].x;return LogUtil.Debug("= S.BaseLine: IsReverseWinding output (2 points):",e),e}let e=0;for(let n=0,s=t.length-1;n<t.length;s=n++)e+=(t[s].x+t[n].x)*(t[s].y-t[n].y);const i=.5*e>=0;return LogUtil.Debug("= S.BaseLine: IsReverseWinding output:",i),i}LinkGrow(t,e,i){switch(LogUtil.Debug("= S.BaseLine: LinkGrow called with blockID:",t,"hookPoint:",e,"newPoint:",i),e){case OptConstant.HookPts.KTL:this.StartPoint.x=i.x,this.StartPoint.y=i.y;break;case OptConstant.HookPts.KTR:this.EndPoint.x=i.x,this.EndPoint.y=i.y}this.CalcFrame(!0),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("= S.BaseLine: LinkGrow updated StartPoint:",this.StartPoint,"EndPoint:",this.EndPoint)}HandleActionTriggerTrackCommon(t,e,i,n){LogUtil.Debug("= S.BaseLine: HandleActionTriggerTrackCommon called with input:",{newX:t,newY:e,redrawFlag:i,eventObj:n}),T3Gv.opt.actionStartX,T3Gv.opt.actionStartY,Utils1.DeepCopy(T3Gv.opt.actionBBox);let s={};function a(t,e,i){const n={x:t,y:e};return i.x<0&&(n.x-=i.x),i.y<0&&(n.y-=i.y),n}switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.LineStart:this.AdjustLineStart(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,i),(this.r.x<0||this.r.y<0)&&(s=a(this.StartPoint.x,this.StartPoint.y,this.r),this.AdjustLineStart(T3Gv.opt.actionSvgObject,s.x,s.y,T3Gv.opt.actionTriggerId,i));break;case OptConstant.ActionTriggerType.PolyEnd:case OptConstant.ActionTriggerType.LineEnd:this.AdjustLineEnd(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,i),(this.r.x<0||this.r.y<0)&&(s=a(this.EndPoint.x,this.EndPoint.y,this.r),this.AdjustLineEnd(T3Gv.opt.actionSvgObject,s.x,s.y,T3Gv.opt.actionTriggerId,i));break;case OptConstant.ActionTriggerType.Rotate:this.AdjustRotate(t,e,n);break;case OptConstant.ActionTriggerType.ModifyShape:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:case OptConstant.ActionTriggerType.PolyNode:case OptConstant.ActionTriggerType.PolyAdj:case OptConstant.ActionTriggerType.TopLeft:case OptConstant.ActionTriggerType.TopRight:case OptConstant.ActionTriggerType.BottomLeft:case OptConstant.ActionTriggerType.BottomRight:this.ModifyShape(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData,i),this.UpdateFrame(),(this.r.x<0||this.r.y<0)&&(s=a(t,e,this.r),this.ModifyShape(T3Gv.opt.actionSvgObject,s.x,s.y,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData),this.UpdateFrame());break;case OptConstant.ActionTriggerType.MovePolySeg:this.MovePolySeg(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData);break;case OptConstant.ActionTriggerType.DimLineAdj:this.DimensionLineDeflectionAdjust(T3Gv.opt.actionSvgObject,t,e,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData)}LogUtil.Debug("= S.BaseLine: HandleActionTriggerTrackCommon completed with updated StartPoint:",this.StartPoint,"and EndPoint:",this.EndPoint)}AdjustRotate(t,e,i){LogUtil.Debug("= S.BaseLine: AdjustRotate called with mouseX:",t,"mouseY:",e,"event:",i);let n=t-T3Gv.opt.rotatePivotX,s=e-T3Gv.opt.rotatePivotY,a=0;0===n&&0===s?a=0:0===n?a=s>0?90:270:n>=0&&s>=0?a=Math.atan(s/n)*(180/NvConstant.Geometry.PI):n<0&&s>=0||n<0&&s<0?a=180+Math.atan(s/n)*(180/NvConstant.Geometry.PI):n>=0&&s<0&&(a=360+Math.atan(s/n)*(180/NvConstant.Geometry.PI));const o=T3Gv.opt.OverrideSnaps(i);if(T3Gv.docUtil.docConfig.enableSnap&&!o){const t=T3Gv.opt.EnhanceSnaps(i)?T3Gv.opt.enhanceRotateSnap:T3Gv.opt.rotateSnap;a=Math.round(a/t)*t}this.Rotate(T3Gv.opt.actionSvgObject,a)&&(T3Gv.opt.rotateEndRotation=a),LogUtil.Debug("= S.BaseLine: AdjustRotate output angle:",a)}DimensionLineDeflectionAdjust(t,e,i,n,s){LogUtil.Debug("= S.BaseLine: DimensionLineDeflectionAdjust called with",{svgDoc:t,mouseX:e,mouseY:i,actionTriggerID:n,triggerData:s}),this.dimensionDeflectionH=this.GetDimensionLineDeflection(t,e,i,s),LogUtil.Debug("= S.BaseLine: Calculated dimensionDeflectionH:",this.dimensionDeflectionH),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseLine: Dimension lines updated");const a=this.Dimensions&NvConstant.DimensionFlags.Select;LogUtil.Debug("= S.BaseLine: isDimSelect:",a),a&&(this.HideOrShowSelectOnlyDimensions(!0),LogUtil.Debug("= S.BaseLine: Select-only dimensions shown")),LogUtil.Debug("= S.BaseLine: DimensionLineDeflectionAdjust completed")}ScaleObject(t,e,i,n,s,a,o){if(LogUtil.Debug("= S.BaseLine: ScaleObject called with",{offsetX:t,offsetY:e,rotationCenter:i,rotationAngle:n,scaleX:s,scaleY:a,adjustThickness:o}),this.StartPoint.x=t+this.StartPoint.x*s,this.StartPoint.y=e+this.StartPoint.y*a,this.EndPoint.x=t+this.EndPoint.x*s,this.EndPoint.y=e+this.EndPoint.y*a,n){const t=2*Math.PI*(n/360);this.StartPoint=T3Gv.opt.RotatePointAroundPoint(i,this.StartPoint,t),this.EndPoint=T3Gv.opt.RotatePointAroundPoint(i,this.EndPoint,t)}if(this.CurveAdjust&&(this.CurveAdjust*=(s+a)/2),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),o){const t=Math.max(s,a);this.StyleRecord.Line.Thickness*=t,this.StyleRecord.Line.BThick*=t}this.CalcFrame(),LogUtil.Debug("= S.BaseLine: ScaleObject output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,CurveAdjust:this.CurveAdjust,StyleRecord:this.StyleRecord})}CanUseStandOffDimensionLines(){LogUtil.Debug("= S.BaseLine: CanUseStandOffDimensionLines called");return LogUtil.Debug("= S.BaseLine: CanUseStandOffDimensionLines output:",true),true}GetDimensionLineDeflection(t,e,i,n){LogUtil.Debug("= S.BaseLine: GetDimensionLineDeflection called with",{svgDoc:t,mouseX:e,mouseY:i,triggerData:n});let s=0;const a=[],o=new Point$1(0,0),r=this.GetDimensionPoints();for(let l=0;l<r.length;l++)r[l].x+=this.inside.x,r[l].y+=this.inside.y;if(o.x=n.knobPoint.x+this.Frame.x-n.adjustForKnob,o.y=n.knobPoint.y+this.Frame.y-n.adjustForKnob,a.push(r[n.segmentIndex-1]),a.push(r[n.segmentIndex]),a.push(new Point$1(o.x,o.y)),a.push(new Point$1(e,i)),Utils3.RotatePointsAboutCenter(this.Frame,-n.ccAngleRadians,a),this instanceof Instance.Shape.BaseLine&&(!this.polylist||2===this.polylist.segs.length)){const t=Math.floor((n.ccAngleRadians-.01)/(Math.PI/2));1!==t&&2!==t&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,a)}else this.polylist&&this.IsReverseWinding()&&Utils3.RotatePointsAboutCenter(this.Frame,Math.PI,a);return s=a[3].y-a[2].y,s=this.polylist&&this.polylist.segs[n.segmentIndex].dimTextAltPositioning?n.originalDeflection-s:n.originalDeflection+s,LogUtil.Debug("= S.BaseLine: GetDimensionLineDeflection output:",s),s}HandleActionTriggerCallResize(t,e){LogUtil.Debug("= S.BaseLine: HandleActionTriggerCallResize called with event:",t,"triggerData:",e);const i=this.Resize(T3Gv.opt.actionSvgObject,T3Gv.opt.actionNewBBox);T3Gv.opt.actionBBox.x+=i.x,T3Gv.opt.actionBBox.y+=i.y,T3Gv.opt.actionStartX+=i.x,T3Gv.opt.actionStartY+=i.y,LogUtil.Debug("= S.BaseLine: HandleActionTriggerCallResize output resizeAdjustment:",i)}HandleActionTriggerDoAutoScroll(){LogUtil.Debug("= S.BaseLine: HandleActionTriggerDoAutoScroll called"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleActionTriggerDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);LogUtil.Debug("= S.BaseLine: Converted document coordinates:",t),T3Gv.opt.pinRect&&T3Gv.opt.PinTrackPoint(t);const e=DrawUtil.DoAutoGrowDrag(t);LogUtil.Debug("= S.BaseLine: Adjusted coordinates after auto-grow drag:",e),T3Gv.docUtil.ScrollToPosition(e.x,e.y),this.HandleActionTriggerTrackCommon(e.x,e.y),LogUtil.Debug("= S.BaseLine: HandleActionTriggerDoAutoScroll completed")}AutoScrollCommon(t,e,i){let n,s;LogUtil.Debug("= S.BaseLine: AutoScrollCommon called with event:",t,"enableSnap:",e,"autoScrollCallback:",i);let a=!1;T3Gv.opt.OverrideSnaps(t)&&(e=!1),t.gesture?(n=t.gesture.center.clientX,s=t.gesture.center.clientY):(n=t.clientX,s=t.clientY);let o=n,r=s;const l=T3Gv.opt.svgDoc.docInfo;if(n>=l.dispX+l.dispWidth-4&&(a=!0,o=l.dispX+l.dispWidth-4+32),n<l.dispX&&(a=!0,o=l.dispX-32),s>=l.dispY+l.dispHeight-4&&(a=!0,r=l.dispY+l.dispHeight-4+32),s<l.dispY&&(a=!0,r=l.dispY-4-32),a){if(e&&T3Gv.docUtil.docConfig.enableSnap){const t=T3Gv.docUtil.SnapToGrid({x:o,y:r});o=t.x,r=t.y}return T3Gv.opt.autoScrollXPos=o,T3Gv.opt.autoScrollYPos=r,-1===T3Gv.opt.autoScrollTimerId&&(T3Gv.opt.autoScrollTimer=new T3Timer(this),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout(i,0)),LogUtil.Debug("= S.BaseLine: AutoScrollCommon output: shouldAutoScroll = false"),!1}return this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseLine: AutoScrollCommon output: shouldAutoScroll = true"),!0}LMActionTrack(t){let e;if(LogUtil.Debug("= S.BaseLine: LMActionTrack called with event:",t),Utils2.StopPropagationAndDefaults(t),-1==T3Gv.opt.actionStoredObjectId)return!1;const i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),n=t.gesture.srcEvent.altKey;T3Gv.opt.pinRect&&T3Gv.opt.PinTrackPoint(i);const s=DrawUtil.DoAutoGrowDrag(i);let a=this.LMActionDuringTrack(s);if(e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0,T3Gv.opt.OverrideSnaps(t)&&(e=!0),T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.ModifyShape&&T3Gv.docUtil.docConfig.enableSnap&&!e){const t=a.x-T3Gv.opt.actionStartX,e=a.y-T3Gv.opt.actionStartY,i=T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.MovePolySeg;T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate||this.CustomSnap(this.Frame.x,this.Frame.y,t,e,i,a)||i||(a=T3Gv.docUtil.SnapToGrid(a))}this.AutoScrollCommon(t,!e,"HandleActionTriggerDoAutoScroll")&&this.HandleActionTriggerTrackCommon(a.x,a.y,n,t),LogUtil.Debug("= S.BaseLine: LMActionTrack completed with updated coordinates:",a)}LMActionRelease(t,e){switch(LogUtil.Debug("= S.BaseLine: LMActionRelease called with event:",t,"isSecondary:",e),e||(LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer()),T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.Rotate:this.AfterRotateShape(T3Gv.opt.actionStoredObjectId);break;case OptConstant.ActionTriggerType.ModifyShape:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:case OptConstant.ActionTriggerType.PolyNode:case OptConstant.ActionTriggerType.PolyAdj:case OptConstant.ActionTriggerType.PolyEnd:case OptConstant.ActionTriggerType.MovePolySeg:this.AfterModifyShape(T3Gv.opt.actionStoredObjectId,T3Gv.opt.actionTriggerId);break;default:T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(T3Gv.opt.actionStoredObjectId,this,T3Gv.opt.ob,T3Gv.opt.actionTriggerId),T3Gv.opt.ob={},OptCMUtil.SetLinkFlag(T3Gv.opt.actionStoredObjectId,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks())}this.LMActionPostRelease(T3Gv.opt.actionStoredObjectId),(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),e||(T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null),LayerUtil.ShowOverlayLayer(),DrawUtil.CompleteOperation(),LogUtil.Debug("= S.BaseLine: LMActionRelease completed")}LMActionPreTrack(t,e){LogUtil.Debug("= S.BaseLine: LMActionPreTrack called with actionStoredObjectID:",t,"actionTriggerID:",e);let i,n,s,a=-1;if(i=ObjectUtil$1.GetObjectPtr(t,!1),!i)return void LogUtil.Debug("= S.BaseLine: LMActionPreTrack - objectPtr not found");switch(T3Gv.opt.ob=Utils1.DeepCopy(i),e){case OptConstant.ActionTriggerType.LineStart:for(let t=0;t<i.hooks.length;t++)if(i.hooks[t].hookpt===OptConstant.HookPts.KTL||i.hooks[t].hookpt===OptConstant.HookPts.WTL||i.hooks[t].hookpt===OptConstant.HookPts.WTR){a=t;break}break;case OptConstant.ActionTriggerType.LineEnd:for(let t=0;t<i.hooks.length;t++)if(i.hooks[t].hookpt===OptConstant.HookPts.KTR||i.hooks[t].hookpt===OptConstant.HookPts.WBL||i.hooks[t].hookpt===OptConstant.HookPts.WBR){a=t;break}break;default:return void LogUtil.Debug("= S.BaseLine: LMActionPreTrack - invalid actionTriggerID")}this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),s=new LinkParameters,T3Gv.opt.linkParams=s,n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),this.AllowLink()||(s.ArraysOnly=!0),n&&(s.AllowJoin=n.flags&OptConstant.SessionFlags.FreeHand),a>=0&&(s.ConnectIndex=i.hooks[a].objid,s.PrevConnect=i.hooks[a].objid,s.ConnectPt.x=i.hooks[a].connect.x,s.ConnectPt.y=i.hooks[a].connect.y,s.ConnectInside=i.hooks[a].cellid,s.HookIndex=i.hooks[a].hookpt,s.InitialHook=a);const o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);return s.lpCircList=HookUtil.GetHookList(o,s.lpCircList,t,i,NvConstant.ListCodes.CircTarg,{}),a<0&&1===i.hooks.length&&s.lpCircList&&s.lpCircList.push(i.hooks[0].objid),LogUtil.Debug("= S.BaseLine: LMActionPreTrack completed with linkParams:",s),!0}LMActionDuringTrack(t){LogUtil.Debug("= S.BaseLine: LMActionDuringTrack called with event:",t);const e=[{x:0,y:0}];return T3Gv.opt.linkParams&&(e[0].x=t.x,e[0].y=t.y,this.objecttype===NvConstant.FNObjectTypes.FlWall&&(e[0].id=T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart?OptConstant.HookPts.KTL:OptConstant.HookPts.KTR,T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,this,e,!0,!1,T3Gv.opt.linkParams.AllowJoin,t)&&(t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY))),LogUtil.Debug("= S.BaseLine: LMActionDuringTrack output event:",t),t}AfterRotateShape(t){if(LogUtil.Debug("= S.BaseLine: AfterRotateShape called with blockID:",t),this.r.x<0||this.r.y<0)return LogUtil.Debug("= S.BaseLine: Rectangle coordinates are negative, performing undo operation"),void ToolActUtil.Undo();T3Gv.opt.ob.Frame&&(LogUtil.Debug("= S.BaseLine: Maintaining link with frame:",T3Gv.opt.ob.Frame),HookUtil.MaintainLink(t,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),T3Gv.opt.ob={}),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseLine: AfterRotateShape completed for blockID:",t)}AfterModifyShape(t,e){if(LogUtil.Debug("= S.BaseLine: AfterModifyShape called with blockID:",t,"actionTriggerID:",e),T3Gv.opt.actionSvgObject){const t=T3Gv.opt.actionSvgObject.GetElementById(OptConstant.Common.EllipseAxes);null!=t&&(T3Gv.opt.actionSvgObject.RemoveElement(t),LogUtil.Debug("= S.BaseLine: Removed ellipseAxesElement:",t))}T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(t,this,T3Gv.opt.ob,e),T3Gv.opt.ob={},LogUtil.Debug("= S.BaseLine: Maintained link and reset ob.Frame")),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1),LogUtil.Debug("= S.BaseLine: Reset floating point dimensions flags")),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),LogUtil.Debug("= S.BaseLine: Set link flag and updated links"),this.arcobj&&(this.arcobj=null,LogUtil.Debug("= S.BaseLine: Reset arcobj to null")),LogUtil.Debug("= S.BaseLine: AfterModifyShape completed for blockID:",t)}LMActionPostRelease(t){LogUtil.Debug("= S.BaseLine: LMActionPostRelease called with blockID:",t),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.HiliteConnect>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteConnect,T3Gv.opt.linkParams.ConnectPt,!1,!1,this.BlockID,T3Gv.opt.linkParams.HiliteInside),T3Gv.opt.linkParams.HiliteConnect=-1,T3Gv.opt.linkParams.HiliteInside=null),T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,this.BlockID,null),T3Gv.opt.linkParams.HiliteJoin=-1),T3Gv.opt.linkParams.JoinIndex>=0?PolyUtil.PolyLJoin(T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.JoinData,t,T3Gv.opt.linkParams.JoinSourceData,!1):(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.InitialHook>=0)&&HookUtil.UpdateHook(t,T3Gv.opt.linkParams.InitialHook,T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.HookIndex,T3Gv.opt.linkParams.ConnectPt,T3Gv.opt.linkParams.ConnectInside),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),T3Gv.opt.linkParams=null),LogUtil.Debug("= S.BaseLine: LMActionPostRelease completed for blockID:",t)}LMSetupActionClick(t,e){let i,n,s;if(LogUtil.Debug("= S.BaseLine: LMSetupActionClick called with event:",t,"isSecondary:",e),e)i=T3Gv.opt.actionStoredObjectId,n=T3Gv.opt.actionTriggerId,T3Gv.opt.pinRect=null,T3Gv.stdObj.PreserveBlock(i);else{T3Gv.opt.eventTimestamp=Date.now(),t.stopPropagation();const e=T3Gv.opt.svgOverlayLayer.FindElementByDOMElement(t.currentTarget);if(null===e)return!1;const a=e.GetID();if(i=parseInt(a.substring(OptConstant.Common.Action.length),10),T3Gv.opt.actionStoredObjectId=i,s=e.GetTargetForEvent(t),null==s)return!1;T3Gv.stdObj.PreserveBlock(i),n=s.GetID(),T3Gv.opt.actionTriggerId=n,T3Gv.opt.actionTriggerData=s.GetUserData(),T3Gv.opt.pinRect=null}e||T3Gv.opt.SetControlDragMode(s),this.LMActionPreTrack(i,n),T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(i),(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&this.HideAllIcons(T3Gv.opt.svgDoc,T3Gv.opt.actionSvgObject);let a=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),o=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;T3Gv.opt.OverrideSnaps(t)&&(o=!0),T3Gv.docUtil.docConfig.enableSnap&&!o&&(a=T3Gv.docUtil.SnapToGrid(a)),a=DrawUtil.DoAutoGrowDrag(a);const r=a.x,l=a.y;T3Gv.opt.actionLockAspectRatio=t.gesture.srcEvent.shiftKey,this.ResizeAspectConstrain&&(T3Gv.opt.actionLockAspectRatio=!T3Gv.opt.actionLockAspectRatio);const h=this.GetSVGFrame();return T3Gv.opt.actionLockAspectRatio&&(0===h.height?T3Gv.opt.actionLockAspectRatio=!1:(T3Gv.opt.actionAspectRatioWidth=h.width,T3Gv.opt.actionAspectRatioHeight=h.height)),T3Gv.opt.actionBBox=Utils1.DeepCopy(h),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(h),LayerUtil.HideOverlayLayer(),T3Gv.opt.actionStartX=r,T3Gv.opt.actionStartY=l,T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.Rotate?this.BeforeRotate(h):T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.ModifyShape&&T3Gv.opt.actionTriggerId!==OptConstant.ActionTriggerType.PolyAdj||this.BeforeModifyShape(r,l,T3Gv.opt.actionTriggerData),LogUtil.Debug("= S.BaseLine: LMSetupActionClick output:",!0),!0}BeforeRotate(t){LogUtil.Debug("= S.BaseLine: BeforeRotate called with frame:",t),T3Gv.opt.rotateKnobCenterDivisor=this.RotateKnobCenterDivisor();const e=this.EndPoint.x-this.StartPoint.x,i=this.EndPoint.y-this.StartPoint.y;T3Gv.opt.rotateStartRotation=180*Math.atan2(i,e)/Math.PI,T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateStartRotation,T3Gv.opt.rotatePivotX=t.x+t.width/T3Gv.opt.rotateKnobCenterDivisor.x,T3Gv.opt.rotatePivotY=t.y+t.height/T3Gv.opt.rotateKnobCenterDivisor.y,T3Gv.opt.rotateStartPoint=Utils1.DeepCopy(this.StartPoint),T3Gv.opt.rotateEndPoint=Utils1.DeepCopy(this.EndPoint),LogUtil.Debug("= S.BaseLine: BeforeRotate output:",{rotateStartRotation:T3Gv.opt.rotateStartRotation,rotateEndRotation:T3Gv.opt.rotateEndRotation,rotatePivotX:T3Gv.opt.rotatePivotX,rotatePivotY:T3Gv.opt.rotatePivotY,rotateStartPoint:T3Gv.opt.rotateStartPoint,rotateEndPoint:T3Gv.opt.rotateEndPoint})}LMActionClickExpCleanup(t){LogUtil.Debug("= S.BaseLine: LMActionClickExpCleanup called with error:",t),LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer(),T3Gv.opt.ob={},T3Gv.opt.linkParams=null,T3Gv.opt.actionTriggerId=-1,T3Gv.opt.actionTriggerData=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LogUtil.Debug("= S.BaseLine: LMActionClickExpCleanup completed")}LMActionClick(t,e){LogUtil.Debug("= S.BaseLine: LMActionClick called with event:",t,"isSecondary:",e);try{const i=this.BlockID,n=ObjectUtil$1.GetObjectPtr(i,!1);if(!(n&&n instanceof BaseDrawObject$1))return LogUtil.Debug("= S.BaseLine: LMActionClick - objectPtr is not an instance of BaseDrawObject"),!1;if(DrawUtil.InitializeAutoGrowDrag(0,i),!this.LMSetupActionClick(t,e))return void LogUtil.Debug("= S.BaseLine: LMActionClick - LMSetupActionClick returned false");const s=ObjectUtil$1.GetObjectPtr(i,!1);T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_ActionTrackHandlerFactory(s)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_ActionReleaseHandlerFactory(s)),LogUtil.Debug("= S.BaseLine: LMActionClick setup completed for blockID:",i)}catch(i){throw T3Util.Error("= s.BaseLine: LMActionClick encountered an error:",i),this.LMActionClickExpCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}Rotate(t,e){LogUtil.Debug("= S.BaseLine: Rotate called with svgElement:",t,"endRotation:",e);const i={x:T3Gv.opt.rotatePivotX,y:T3Gv.opt.rotatePivotY},n=(e-T3Gv.opt.rotateStartRotation)/(180/NvConstant.Geometry.PI),s=T3Gv.opt.RotatePointAroundPoint(i,T3Gv.opt.rotateStartPoint,n),a=T3Gv.opt.RotatePointAroundPoint(i,T3Gv.opt.rotateEndPoint,n);if(LogUtil.Debug("= S.BaseLine: Rotated points calculated as rotatedStartPoint:",s,"rotatedEndPoint:",a),s.x<0||s.y<0||a.x<0||a.y<0)return LogUtil.Debug("= S.BaseLine: Rotation resulted in negative coordinates, returning false"),!1;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(s.x>t.dim.x||s.y>t.dim.y||a.x>t.dim.x||a.y>t.dim.y)return LogUtil.Debug("= S.BaseLine: Rotation resulted in coordinates outside session dimensions, returning false"),!1}return this.AdjustLineStart(t,s.x,s.y,0,!0),this.AdjustLineEnd(t,a.x,a.y,OptConstant.ActionTriggerType.LineEnd,!0),LogUtil.Debug("= S.BaseLine: Rotate completed successfully"),!0}RotateKnobCenterDivisor(){LogUtil.Debug("= S.BaseLine: RotateKnobCenterDivisor called");const t={x:2,y:2};return LogUtil.Debug("= S.BaseLine: RotateKnobCenterDivisor output:",t),t}GetHookFlags(){LogUtil.Debug("= S.BaseLine: GetHookFlags called");const t=NvConstant.HookFlags.LcShape|NvConstant.HookFlags.LcLine|NvConstant.HookFlags.LcCHook;return LogUtil.Debug("= S.BaseLine: GetHookFlags output:",t),t}AllowLink(){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),i=t&&t.activelayer>=0&&t.layers[t.activelayer].flags&NvConstant.LayerFlags.UseEdges,n=T3Gv.opt.fromOverlayLayer,s=e&&e.flags&OptConstant.SessionFlags.LLink;return!i&&(n||s)}GetHookPoints(){LogUtil.Debug("= S.BaseLine: GetHookPoints called");const t=OptConstant.Common.DimMax,e=[{x:0,y:0,id:OptConstant.HookPts.KTL},{x:t,y:t,id:OptConstant.HookPts.KTR}];return LogUtil.Debug("= S.BaseLine: GetHookPoints output:",e),e}PrGetWidthAdjustment(){LogUtil.Debug("= S.BaseLine: PrGetWidthAdjustment called");const t=this.StyleRecord.Line.Thickness/2;let e=this.GetAngle(null);e>=90&&(e=180-e);const i=e/180*Math.PI,n={deltax:Math.sin(i)*t,deltay:Math.cos(i)*t};return LogUtil.Debug("= S.BaseLine: PrGetWidthAdjustment output:",n),n}GetConnectLine(){LogUtil.Debug("= S.BaseLine: GetConnectLine called");return LogUtil.Debug("= S.BaseLine: GetConnectLine output:",null),null}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: GetPerimPts called with",{hookPoints:t,targetPoints:e,targetID:i,isRelative:n,additionalParam:s,hookIndex:a});let o=[],r={},l={};const h=OptConstant.HookPts,c=e.length;if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&a<0&&c>1){this.StyleRecord.Line.Thickness;const t=this.PrGetWidthAdjustment();for(let i=0;i<c;i++){let n={};switch(e[i].id){case h.WTL:n={x:this.StartPoint.x-t.deltax,y:this.StartPoint.y-t.deltay,id:e[i].id};break;case h.WTR:n={x:this.StartPoint.x+t.deltax,y:this.StartPoint.y-t.deltay,id:e[i].id};break;case h.WBL:n={x:this.EndPoint.x-t.deltax,y:this.EndPoint.y+t.deltay,id:e[i].id};break;case h.WBR:n={x:this.EndPoint.x+t.deltax,y:this.EndPoint.y+t.deltay,id:e[i].id};break;case h.KTL:n={x:this.StartPoint.x,y:this.StartPoint.y,id:e[i].id};break;case h.KTR:n={x:this.EndPoint.x,y:this.EndPoint.y,id:e[i].id}}o.push(n)}return LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}if(a>=0){const t=ObjectUtil$1.GetObjectPtr(a,!1);if(t&&t.objecttype===NvConstant.FNObjectTypes.Multiplicity){let i=5,n=5;i+=t.Frame.width/2;let s=this.GetAngle(null);s>=90&&(s=180-s);const a=s/180*Math.PI;let r=0;if(s<=45)t.subtype==NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(n=-t.Frame.height-5),r=Math.tan(a)*i,0===e[0].x?this.StartPoint.y<this.EndPoint.y?n-=r:n+=r:this.StartPoint.y<this.EndPoint.y?n+=r:n-=r,n=-n,this.StartPoint.x>=this.EndPoint.x&&(i=-i);else{t.subtype==NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(i=-i);const s=Math.tan(Math.PI/2-a);0===e[0].x?(this.StartPoint.y>=this.EndPoint.y?n=-n:n+=t.Frame.height,r=s*Math.abs(n),this.StartPoint.x<this.EndPoint.x?i+=r:i-=r):(this.StartPoint.y>=this.EndPoint.y?n+=t.Frame.height:n=-n,r=s*Math.abs(n),this.StartPoint.x<this.EndPoint.x?i-=r:i+=r,i=-i)}return 0===e[0].x?(o.push(new Point$1(this.StartPoint.x+i,this.StartPoint.y+n)),o[0].id=e[0].id):(o.push(new Point$1(this.EndPoint.x-i,this.EndPoint.y+n)),o[0].id=e[0].id),LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}if(t&&t.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===c){const t=e[0].x/OptConstant.Common.DimMax,i=this.GetPointOnLine(t);return o.push(i),o[0].id=e[0].id,LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}}const u=this.GetConnectLine();u?(r=u.startpt,l=u.endpt):(r=this.StartPoint,l=this.EndPoint);for(let d=0;d<c;d++){if(o[d]={x:0,y:0,id:0},0===e[d].x&&0===e[d].y)o[d].x=r.x,o[d].y=r.y;else if(e[d].x===OptConstant.Common.DimMax&&e[d].y===OptConstant.Common.DimMax)o[d].x=l.x,o[d].y=l.y;else{const t=l.x-r.x,i=l.y-r.y;o[d].x=e[d].x/OptConstant.Common.DimMax*t+r.x,o[d].y=e[d].y/OptConstant.Common.DimMax*i+r.y}null!=e[d].id&&(o[d].id=e[d].id)}return LogUtil.Debug("= S.BaseLine: GetPerimPts output:",o),o}GetPointOnLine(t){LogUtil.Debug("= S.BaseLine: GetPointOnLine called with proportion:",t);const e=(t,e)=>{const i=t.x-e.x,n=t.y-e.y;return Utils2.Sqrt(i*i+n*n)},i={x:this.StartPoint.x,y:this.StartPoint.y},n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),s=[];let a=0;for(let l=1;l<n.length;l++){const t=n[l-1],i=n[l],o=e(t,i);s.push({pt1:t,pt2:i,len:o}),a+=o}const o=(t=Math.max(0,Math.min(1,t)))*a;let r=0;for(const l of s){const{pt1:t,pt2:e,len:n}=l;if(r+n>=o){const s=(o-r)/n;i.x=t.x+(e.x-t.x)*s,i.y=t.y+(e.y-t.y)*s;break}r+=n}return LogUtil.Debug("= S.BaseLine: GetPointOnLine output:",i),i}GetTargetPoints(t,e,i){LogUtil.Debug("= S.BaseLine: GetTargetPoints called with",{hookPoint:t,hookFlags:e,targetID:i});let n=!1,s=!1;const a=[{x:0,y:0}];let o={x:0,y:0};const r=OptConstant.HookPts;if(null!=i&&i>=0){if(ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case r.SED_KTC:case r.SED_KBC:case r.SED_KRC:case r.SED_KLC:const t=ShapeUtil.LineIsReversed(this,null,!1);if(0===this.hooks.length)return t?(a[0].x=OptConstant.Common.DimMax,a[0].y=OptConstant.Common.DimMax,a.push({x:0,y:0})):(a[0].x=0,a[0].y=0,a.push({x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax})),LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a;if(1===this.hooks.length){if(this.hooks[0].hookpt===r.SED_KTR)return a[0].x=0,a[0].y=0,LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a;if(this.hooks[0].hookpt===r.SED_KTL)return a[0].x=OptConstant.Common.DimMax,a[0].y=OptConstant.Common.DimMax,LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a}return[]}}let l=this.EndPoint.x-this.StartPoint.x;Utils2.IsEqual(l,0)&&(l=0),0===l&&(n=!0);let h=this.EndPoint.y-this.StartPoint.y;Utils2.IsEqual(h,0)&&(h=0),0===h&&(s=!0);let c=n?0:h/l;if(o.x=t.x,o.y=t.y,n||Math.abs(c)>1||e&NvConstant.HookFlags.LcHOnly&&!s){if(T3Gv.docUtil.docConfig.enableSnap&&!(e&NvConstant.HookFlags.LcNoSnaps)){o=T3Gv.docUtil.SnapToGrid(o);const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);o.y<t.y&&(o.y=t.y),o.y>t.y+t.height&&(o.y=t.y+t.height)}const t=o.y-this.StartPoint.y;var u=n?t:t/c}else{if(T3Gv.docUtil.docConfig.enableSnap&&!(e&NvConstant.HookFlags.LcNoSnaps)){o=T3Gv.docUtil.SnapToGrid(o);const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);o.x<t.x&&(o.x=t.x),o.x>t.x+t.width&&(o.x=t.x+t.width)}var d=(o.x-this.StartPoint.x)*c}return s||(a[0].y=d/h*OptConstant.Common.DimMax),a[0].x=n?a[0].y:u/l*OptConstant.Common.DimMax,s&&(a[0].y=a[0].x),a[0].x>OptConstant.Common.DimMax&&(a[0].x=OptConstant.Common.DimMax),a[0].y>OptConstant.Common.DimMax&&(a[0].y=OptConstant.Common.DimMax),a[0].x<0&&(a[0].x=0),a[0].y<0&&(a[0].y=0),LogUtil.Debug("= S.BaseLine: GetTargetPoints output:",a),a}AllowHook(t,e,i){LogUtil.Debug("= S.BaseLine: AllowHook called with hookPoint:",t,"targetID:",e,"distance:",i);const n=OptConstant.HookPts;if(null!=e&&e>=0){if(ObjectUtil$1.GetObjectPtr(e,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case n.KTC:case n.KBC:case n.KRC:case n.KLC:if(i>200)return LogUtil.Debug("= S.BaseLine: AllowHook output: false (distance > 200)"),!1;break;default:if(t.id>=n.CustomBase&&t.id<n.CustomBase+100&&i>200)return LogUtil.Debug("= S.BaseLine: AllowHook output: false (custom hook point and distance > 200)"),!1}}return LogUtil.Debug("= S.BaseLine: AllowHook output: true"),!0}DeleteObject(){if(LogUtil.Debug("= S.BaseLine: DeleteObject called"),super.DeleteObject(),this.objecttype===NvConstant.FNObjectTypes.NgEvent)LogUtil.Debug("= S.BaseLine: Handling NgEvent"),this.hooks.length&&ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);else LogUtil.Debug("= S.BaseLine: No specific handling for objecttype:",this.objecttype);LogUtil.Debug("= S.BaseLine: DeleteObject completed")}GetSegLFace(t,e,i){let n;return LogUtil.Debug("= S.BaseLine: GetSegLFace called with objectType:",t,"point:",e,"referencePoint:",i),n=this.Frame.width>=this.Frame.height?e.y>=i.y?OptConstant.HookPts.KBC:OptConstant.HookPts.KTC:e.x>=i.x?OptConstant.HookPts.KRC:OptConstant.HookPts.KLC,LogUtil.Debug("= S.BaseLine: GetSegLFace output:",n),n}GetSpacing(){LogUtil.Debug("= S.BaseLine: GetSpacing called");const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),e={width:null,height:null};if(2===this.hooks.length){const i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),n=ObjectUtil$1.GetObjectPtr(this.hooks[1].objid,!1);t.width<t.height?(e.height=Math.abs(this.StartPoint.y-this.EndPoint.y),i&&n&&(e.height=i.Frame.y<n.Frame.y?n.Frame.y-(i.Frame.y+i.Frame.height):i.Frame.y-(n.Frame.y+n.Frame.height))):(e.width=Math.abs(this.StartPoint.x-this.EndPoint.x),i&&n&&(e.width=i.Frame.x<n.Frame.x?n.Frame.x-(i.Frame.x+i.Frame.width):i.Frame.x-(n.Frame.x+n.Frame.width)))}return LogUtil.Debug("= S.BaseLine: GetSpacing output:",e),e}GetShapeConnectPoint(t){LogUtil.Debug("= S.BaseLine: GetShapeConnectPoint called with hookPointID:",t);const e={x:0,y:0},i={x:0,y:0},n=OptConstant.Common.DimMax,s=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);s.width<s.height?(e.x=n/2,i.x=n/2,this.EndPoint.y<this.StartPoint.y?(e.y=n,i.y=0):(e.y=0,i.y=n)):(e.y=n/2,i.y=n/2,this.EndPoint.x<this.StartPoint.x?(e.x=n,i.x=0):(e.x=0,i.x=n));const a=t===OptConstant.HookPts.KTL?i:e;return LogUtil.Debug("= S.BaseLine: GetShapeConnectPoint output:",a),a}GetBestHook(t,e,i){const n=OptConstant.Common.DimMax,s=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),a=OptConstant.HookPts;let o=!1;const r=ObjectUtil$1.GetObjectPtr(t,!1);if(r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(e){case a.KTC:case a.KBC:case a.KRC:case a.KLC:return s.width<s.height?(o=s.y===this.EndPoint.y,(null==i?void 0:i.y)<n/2?o?a.KTC:a.KBC:o?a.KBC:a.KTC):(o=s.x===this.EndPoint.x,(null==i?void 0:i.x)<n/2?o?a.KLC:a.KRC:o?a.KRC:a.KLC);default:return e}return e}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: CreateConnectHilites called with",{svgDoc:t,targetPoint:e,hookPoint:i,isJoin:n,hookIndex:s,additionalParam:a});const o=t.CreateShape(OptConstant.CSType.Group);let r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);let l=OptConstant.Common.ConnPointLineDim/r;n&&(l=OptConstant.Common.JoinPointLineDim/r);const h=[],c={x:0,y:0,width:0,height:0};if(null!=i){h.push(i);const a=this.GetPerimPts(e,h,null,!0,null,s);n&&(0===i.x&&0===i.y?(a[0].x=this.StartPoint.x,a[0].y=this.StartPoint.y):i.x===OptConstant.Common.DimMax&&i.y===OptConstant.Common.DimMax&&(a[0].x=this.EndPoint.x,a[0].y=this.EndPoint.y)),c.x=a[0].x-l,c.y=a[0].y-l,c.width=l,c.height=l;let r=null;r={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:l/2,y:l/2,knobSize:l,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",KnobID:0,cursorType:CursorConstant.CursorType.Anchor},n&&(r.fillColor="none",r.strokeSize=1,r.strokeColor="black",r.cursorType=CursorConstant.CursorType.Default);const u=this.GenericKnob(r);return o.AddElement(u),o.SetPos(c.x,c.y),o.SetSize(c.width,c.height),o.isShape=!0,o.SetID("hilite_"+e),LogUtil.Debug("= S.BaseLine: CreateConnectHilites output:",o),o}}HookToPoint(t,e){LogUtil.Debug("= S.BaseLine: HookToPoint input, hookId:",t,"outRect:",e);let i={x:0,y:0,id:0};const n=OptConstant,s=this.PrGetWidthAdjustment();switch(t){case n.HookPts.KTL:i.x=this.StartPoint.x,i.y=this.StartPoint.y;break;case n.HookPts.KTR:i.x=this.EndPoint.x,i.y=this.EndPoint.y;break;case n.HookPts.WTL:i.x=this.StartPoint.x-s.deltax,i.y=this.StartPoint.y-s.deltay;break;case n.HookPts.WTR:i.x=this.StartPoint.x+s.deltax,i.y=this.StartPoint.y-s.deltay;break;case n.HookPts.WBL:i.x=this.EndPoint.x-s.deltax,i.y=this.EndPoint.y+s.deltay;break;case n.HookPts.WBR:i.x=this.EndPoint.x+s.deltax,i.y=this.EndPoint.y+s.deltay;break;default:i.x=this.EndPoint.x,i.y=this.EndPoint.y}if(e){const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}return LogUtil.Debug("= S.BaseLine: HookToPoint output, resultPoint:",i,"outRect:",e),i}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.BaseLine: MaintainPoint input:",{point:t,targetId:e,distance:i,lineObj:n,offset:s});let a=-1,o=n;const r={};let l={};if(o.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line){switch(o.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:for(let t=0;t<o.hooks.length;t++)if(o.hooks[t].targetid===e){o.HookToPoint(o.hooks[t].hookpt,r),a=0;break}if(0!==a)return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true early (no matching hook)"),!0;l=Utils1.DeepCopy(o),Utils2.CopyRect(l.Frame,r),l.StartPoint.x=r.x,l.StartPoint.y=r.y,l.EndPoint.x=r.x+r.width,l.EndPoint.y=r.y+r.height,o=l}if(T3Gv.opt.LineCheckPoint(this,t))return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true early (LineCheckPoint true)"),!0;if(T3Gv.opt.LinesIntersect(this,o,t))return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true early (LinesIntersect true)"),!0;PolyUtil.LinesMaintainDist(this,i,s,t)}else PolyUtil.LinesMaintainDist(this,i,s,t);return LogUtil.Debug("= S.BaseLine: MaintainPoint output: returning true"),!0}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: ChangeTarget called with e:",t,"targetId:",e,"a:",i,"r:",n,"i:",s,"n:",a);let o=0,r=ObjectUtil$1.GetObjectPtr(e,!1);if(this.TextFlags&NvConstant.TextFlags.HorizText&&r instanceof Instance.Shape.BaseShape){o=this.GetApparentAngle(-1),o=Math.abs(o)%180;let t=Math.abs(r.RotationAngle%180);LogUtil.Debug("= S.BaseLine: ChangeTarget computed apparentAngle:",o,"targetRotation:",t),Math.abs(t-o)>2&&Math.abs(t-(o-180))>2?(r.RotationAngle=o,OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),ObjectUtil$1.AddToDirtyList(e),LogUtil.Debug("= S.BaseLine: ChangeTarget updated targetObj.RotationAngle to:",o)):LogUtil.Debug("= S.BaseLine: ChangeTarget rotation difference within tolerance, no update performed")}ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("= S.BaseLine: ChangeTarget completed for BlockID:",this.BlockID)}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.BaseLine: GetPolyPoints called with:",{numPoints:t,isRelative:e,a:i,r:n,i:s});const a=[new Point$1(this.StartPoint.x,this.StartPoint.y),new Point$1(this.EndPoint.x,this.EndPoint.y)];if(e)for(const o of a)o.x-=this.Frame.x,o.y-=this.Frame.y;return LogUtil.Debug("= S.BaseLine: GetPolyPoints output:",a),a}Hit(t,e,i,n,s){let a,o,r;LogUtil.Debug("= S.BaseLine: Hit called with input:",{point:t,t:e,isKnob:i,hitResult:n,hookPointID:s});const l=OptConstant.Common.KnobSize;let h=T3Gv.opt.svgDoc.docInfo.docToScreenScale;if(T3Gv.opt.svgDoc.docInfo.docScale<=.5&&(h*=2),i){const e=2*l/h;if(o=Utils2.InflatePoint(this.StartPoint,e),r=Utils2.InflatePoint(this.EndPoint,e),s&&(s===OptConstant.HookPts.KTL&&(o=null),s===OptConstant.HookPts.KTR&&(r=null)),this.hooks)for(let t=0;t<this.hooks.length;t++)this.hooks[t].hookpt===OptConstant.HookPts.KTL&&(o=null),this.hooks[t].hookpt===OptConstant.HookPts.KTR&&(r=null);if(o&&Utils2.pointInRect(o,t)){const t=ObjectUtil$1.GetObjectPtr(n.objectid,!1);if(!(t&&t.polylist&&t.polylist.closed))return n&&(n.hitcode=NvConstant.HitCodes.PLApp,n.segment=OptConstant.HookPts.KTL,n.pt.x=this.StartPoint.x,n.pt.y=this.StartPoint.y),LogUtil.Debug("= S.BaseLine: Hit output:",NvConstant.HitCodes.PLApp),NvConstant.HitCodes.PLApp}if(r&&Utils2.pointInRect(r,t)){const t=ObjectUtil$1.GetObjectPtr(n.objectid,!1);if(!(t&&t.polylist&&t.polylist.closed))return n&&(n.hitcode=NvConstant.HitCodes.PLApp,n.segment=OptConstant.HookPts.KTR,n.pt.x=this.EndPoint.x,n.pt.y=this.EndPoint.y),LogUtil.Debug("= S.BaseLine: Hit output:",NvConstant.HitCodes.PLApp),NvConstant.HitCodes.PLApp}}const c=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,[]),u={x:t.x,y:t.y},d={};if(a=Utils3.LineDStyleHit(c,u,this.StyleRecord.Line.Thickness,0,d),void 0!==d.lpHit&&n){for(let t=0;t<c.length;t++)if(d.lpHit<c[t]){d.lpHit=t;break}n.segment=d.lpHit}return n&&(n.hitcode=a),LogUtil.Debug("= S.BaseLine: Hit output:",a),a}StartNewObjectDrawDoAutoScroll(){LogUtil.Debug("= S.BaseLine: StartNewObjectDrawDoAutoScroll called"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("StartNewObjectDrawDoAutoScroll",100),LogUtil.Debug("= S.BaseLine: autoScrollTimerId set to",T3Gv.opt.autoScrollTimerId);let t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);LogUtil.Debug("= S.BaseLine: Converted window coords to docCoords:",t),t=DrawUtil.DoAutoGrowDrag(t),LogUtil.Debug("= S.BaseLine: After DoAutoGrowDrag, docCoords:",t),T3Gv.docUtil.ScrollToPosition(t.x,t.y),LogUtil.Debug("= S.BaseLine: Scrolled to position:",t),this.StartNewObjectDrawTrackCommon(t.x,t.y,null),LogUtil.Debug("= S.BaseLine: Called StartNewObjectDrawTrackCommon with coords:",t.x,t.y)}StartNewObjectDrawTrackCommon(t,e,i){LogUtil.Debug("= S.BaseLine: StartNewObjectDrawTrackCommon called with x:",t,"y:",e,"extraFlag:",i);const n=t-T3Gv.opt.actionStartX,s=e-T3Gv.opt.actionStartY,a=Math.sqrt(n*n+s*s);LogUtil.Debug("= S.BaseLine: Computed deltaX:",n,"deltaY:",s,"distance:",a);const o=Utils1.DeepCopy(T3Gv.opt.actionBBox);LogUtil.Debug("= S.BaseLine: actionBBox:",o),this.AdjustLineEnd(T3Gv.opt.actionSvgObject,t,e,OptConstant.ActionTriggerType.LineEnd,i),LogUtil.Debug("= S.BaseLine: AdjustLineEnd called with x:",t,"y:",e,"trigger:",OptConstant.ActionTriggerType.LineEnd,"extraFlag:",i)}LMDrawTrack(t){let e;LogUtil.Debug("= S.BaseLine: LMDrawTrack called with event:",t),Utils2.StopPropagationAndDefaults(t);let i=0;if(-1===T3Gv.opt.actionStoredObjectId)return LogUtil.Debug("= S.BaseLine: LMDrawTrack aborted, actionStoredObjectId is -1"),!1;t.gesture?(e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=t.gesture.srcEvent.altKey):e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY),LogUtil.Debug("= S.BaseLine: LMDrawTrack input point (before track):",e),e=this.LMDrawDuringTrack(e),LogUtil.Debug("= S.BaseLine: After LMDrawDuringTrack, trackPoint:",e);let n=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;if(T3Gv.opt.OverrideSnaps(t)&&(n=!0),T3Gv.docUtil.docConfig.enableSnap&&!n){const t=e.x-T3Gv.opt.actionStartX,i=e.y-T3Gv.opt.actionStartY;LogUtil.Debug("= S.BaseLine: Calculated delta for snapping:",{deltaX:t,deltaY:i}),this.CustomSnap(this.Frame.x,this.Frame.y,t,i,!1,e)||(e=T3Gv.docUtil.SnapToGrid(e),LogUtil.Debug("= S.BaseLine: After SnapToGrid, trackPoint:",e))}e=DrawUtil.DoAutoGrowDrag(e),LogUtil.Debug("= S.BaseLine: After DoAutoGrowDrag, trackPoint:",e),this.AutoScrollCommon(t,!n,"StartNewObjectDrawDoAutoScroll")?(LogUtil.Debug("= S.BaseLine: AutoScrollCommon returned true. Calling StartNewObjectDrawTrackCommon with:",{x:e.x,y:e.y,altKey:i}),this.StartNewObjectDrawTrackCommon(e.x,e.y,i)):LogUtil.Debug("= S.BaseLine: AutoScrollCommon returned false, not calling StartNewObjectDrawTrackCommon"),LogUtil.Debug("= S.BaseLine: LMDrawTrack completed with final trackPoint:",e)}CancelObjectDraw(){return LogUtil.Debug("= S.BaseLine: CancelObjectDraw called"),LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.lineStamp&&(T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.off("mousemove"),T3Gv.opt.lineStamp=!1),T3Gv.opt.fromOverlayLayer=!1,T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),LogUtil.Debug("= S.BaseLine: CancelObjectDraw completed with output: true"),!0}LMDrawRelease(t,e){LogUtil.Debug("= S.BaseLine: LMDrawRelease called with input:",{event:t,touch:e});try{let i,n={x:0,y:0};let s,a,o=OptConstant.Common.SegDefLen;e?(n={x:e.x,y:e.y},i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e.x,e.y)):t.gesture?(n={x:t.gesture.center.clientX,y:t.gesture.center.clientY},i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY)):(n={x:t.clientX,y:t.clientY},i=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY)),LogUtil.Debug("= S.BaseLine: LMDrawRelease - pointerPos:",n,"conversionPoint:",i),t&&Utils2.StopPropagationAndDefaults(t);const r=2*OptConstant.Common.MinDim;if(T3Gv.opt.fromOverlayLayer?(s=T3Gv.opt.lineDrawStartX-i.x,a=T3Gv.opt.lineDrawStartY-i.y,o-=20):(s=T3Gv.opt.drawStartX-i.x,a=T3Gv.opt.drawStartY-i.y),LogUtil.Debug("= S.BaseLine: LMDrawRelease - deltaX:",s,"deltaY:",a,"minLength:",o),!T3Gv.opt.lineStamp&&Math.abs(s)<r&&Math.abs(a)<r)return T3Gv.opt.lineStamp=!0,T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.on("mousemove",EvtUtil.Evt_DrawTrackHandlerFactory(this)),void LogUtil.Debug("= S.BaseLine: LMDrawRelease - negligible movement; early exit.");T3Gv.opt.WorkAreaHammer&&(LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick)),t&&t.gesture&&t.gesture.stopDetect(),this.ResetAutoScrollTimer();Utils1.DeepCopy(T3Gv.opt.linkParams);const l=this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId);T3Gv.opt.fromOverlayLayer,l?DrawUtil.PostObjectDraw(null):DrawUtil.PostObjectDraw(this.LMDrawRelease),T3Gv.opt.lineStamp&&(T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.off("mousemove"),T3Gv.opt.lineStamp=!1),T3Gv.opt.fromOverlayLayer&&(T3Gv.opt.fromOverlayLayer=!1),LogUtil.Debug("= S.BaseLine: LMDrawRelease output: completed successfully")}catch(i){throw OptCMUtil.CancelOperation(),this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),T3Util.Error("= s.BaseLine: LMDrawRelease encountered error:",i),i}}LMDrawPreTrack(t){LogUtil.Debug("= S.BaseLine: LMDrawPreTrack called with event:",t);let e,i=this.GetHookFlags(),n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),s=[{x:0,y:0}],a={};return this.AllowLink()?(T3Gv.opt.linkParams=new LinkParameters,n&&(T3Gv.opt.fromOverlayLayer||(T3Gv.opt.linkParams.AllowJoin=n.flags&OptConstant.SessionFlags.FreeHand)),i&NvConstant.HookFlags.LcCHook&&(s[0].id=OptConstant.HookPts.KTL,s[0].x=t.x,s[0].y=t.y,T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,this,s,!1,!1,T3Gv.opt.linkParams.AllowJoin,t)?(T3Gv.opt.linkParams.SConnectIndex=T3Gv.opt.linkParams.ConnectIndex,T3Gv.opt.linkParams.SConnectHookFlag=T3Gv.opt.linkParams.ConnectHookFlag,T3Gv.opt.linkParams.SConnectInside=T3Gv.opt.linkParams.ConnectInside,T3Gv.opt.linkParams.SConnectPt.x=T3Gv.opt.linkParams.ConnectPt.x,T3Gv.opt.linkParams.SConnectPt.y=T3Gv.opt.linkParams.ConnectPt.y,T3Gv.opt.linkParams.ConnectIndex=-1,T3Gv.opt.linkParams.Hookindex=-1,T3Gv.opt.linkParams.ConnectInside=0,T3Gv.opt.linkParams.ConnectHookFlag=0,t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY,this.StartPoint.x+=T3Gv.opt.dragDeltaX,this.StartPoint.y+=T3Gv.opt.dragDeltaY,this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y,T3Gv.opt.linkParams.lpCircList=HookUtil.GetHookList(e,T3Gv.opt.linkParams.lpCircList,T3Gv.opt.linkParams.SConnectIndex,this,NvConstant.ListCodes.TargOnly,a)):T3Gv.opt.linkParams.JoinIndex>=0&&(T3Gv.opt.linkParams.SJoinIndex=T3Gv.opt.linkParams.JoinIndex,T3Gv.opt.linkParams.SJoinData=T3Gv.opt.linkParams.JoinData,T3Gv.opt.linkParams.SJoinSourceData=T3Gv.opt.linkParams.JoinSourceData,T3Gv.opt.linkParams.SConnectPt.x=T3Gv.opt.linkParams.ConnectPt.x,T3Gv.opt.linkParams.SConnectPt.y=T3Gv.opt.linkParams.ConnectPt.y,T3Gv.opt.linkParams.JoinIndex=-1,T3Gv.opt.linkParams.JoinData=0,T3Gv.opt.linkParams.JoinSourceData=0,T3Gv.opt.linkParams.lpCircList=HookUtil.GetHookList(e,T3Gv.opt.linkParams.lpCircList,T3Gv.opt.linkParams.SJoinIndex,this,NvConstant.ListCodes.CircTarg,a)))):n&&(this instanceof Instance.Shape.PolyLine||n.flags&OptConstant.SessionFlags.FreeHand)&&(T3Gv.opt.linkParams=new LinkParameters,T3Gv.opt.linkParams.ArraysOnly=!0,T3Gv.opt.linkParams.AllowJoin=n.flags&OptConstant.SessionFlags.FreeHand),LogUtil.Debug("= S.BaseLine: LMDrawPreTrack returning:",!0),!0}LMDrawDuringTrack(t){let e;LogUtil.Debug("= S.BaseLine: LMDrawDuringTrack called with input:",t);let i=[{x:0,y:0}],n=!1;if(null==T3Gv.opt.linkParams)return LogUtil.Debug("= S.BaseLine: LMDrawDuringTrack output (no linkParams):",t),t;if(i[0].x=t.x,i[0].y=t.y,i[0].id=OptConstant.HookPts.KTR,T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0,SelectUtil.FindConnect(T3Gv.opt.actionStoredObjectId,this,i,!0,!1,T3Gv.opt.linkParams.AllowJoin,t)&&(t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY),T3Gv.opt.linkParams.SJoinIndex>=0&&T3Gv.opt.linkParams.JoinIndex<0){let i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.SJoinIndex);this.checkIfPolyLine(i)&&(e=new HitResult(-1,0,null),e.hitcode=i.Hit(t,!1,!0,e),e&&e.hitcode===NvConstant.HitCodes.PLApp&&T3Gv.opt.linkParams.SJoinData!=e.segment&&(n=!0),n?(T3Gv.opt.linkParams.JoinIndex=i.BlockID,T3Gv.opt.linkParams.JoinData=e.segment,T3Gv.opt.linkParams.HiliteJoin<0&&(T3Gv.opt.linkParams.hiliteJoin=i.BlockID,OptCMUtil.GetEditMode()!=NvConstant.EditState.LinkJoin&&(OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!1),i.SetCursors(),OptCMUtil.SetEditMode(NvConstant.EditState.LinkJoin,null,!1)))):(T3Gv.opt.linkParams.HiliteJoin>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.HiliteJoin,T3Gv.opt.linkParams.ConnectPt,!1,!0,this.BlockID,null),T3Gv.opt.linkParams.HiliteJoin=-1),OptCMUtil.SetEditMode(NvConstant.EditState.Default)))}return LogUtil.Debug("= S.BaseLine: LMDrawDuringTrack output:",t),t}LMDrawPostRelease(t){if(LogUtil.Debug("= S.BaseLine: LMDrawPostRelease input:",t),null!=T3Gv.opt.linkParams){const e=T3Gv.opt.linkParams;if(e.SHiliteConnect>=0&&(HookUtil.HiliteConnect(e.SHiliteConnect,e.SConnectPt,!1,!1,this.BlockID,e.SHiliteInside),e.SHiliteConnect=-1,e.SHiliteInside=null),e.HiliteConnect>=0&&(HookUtil.HiliteConnect(e.HiliteConnect,e.ConnectPt,!1,!1,this.BlockID,e.HiliteInside),e.HiliteConnect=-1,e.HiliteInside=null),e.SHiliteJoin>=0&&(HookUtil.HiliteConnect(e.SHiliteJoin,e.SConnectPt,!1,!0,this.BlockID,null),e.SHiliteJoin=-1),e.HiliteJoin>=0&&(HookUtil.HiliteConnect(e.HiliteJoin,e.ConnectPt,!1,!0,this.BlockID,null),e.HiliteJoin=-1),OptCMUtil.SetEditMode(NvConstant.EditState.Default),e.SJoinIndex>=0){let i=PolyUtil.PolyLJoin(e.SJoinIndex,e.SJoinData,t,e.SJoinSourceData,!1);if(i!==t&&i>=0){t=i,e.ConnectIndex>=0&&(e.ConnectIndex=-1);const n=ObjectUtil$1.GetObjectPtr(i,!1);Utils2.EqualPt(this.EndPoint,n.StartPoint)?e.JoinSourceData=1:e.JoinSourceData=2}}let i=0;return e.JoinIndex>=0?i=-2===PolyUtil.PolyLJoin(e.JoinIndex,e.JoinData,t,e.JoinSourceData,!1)?1:0:e.ConnectIndex>=0&&HookUtil.UpdateHook(t,e.InitialHook,e.ConnectIndex,e.HookIndex,e.ConnectPt,e.ConnectInside),this.hookflags=Utils2.SetFlag(this.hookflags,NvConstant.HookFlags.LcNoContinuous,!1),T3Gv.opt.UpdateLinks(),T3Gv.opt.linkParams=null,LogUtil.Debug("= S.BaseLine: LMDrawPostRelease output:",i),i}return 0}LMDrawClickExceptionCleanup(t){LogUtil.Debug("= S.BaseLine: LMDrawClickExceptionCleanup called with input:",t),LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.lineStamp&&(T3Gv.opt.WorkAreaHammer&&T3Gv.opt.WorkAreaHammer.off("mousemove"),T3Gv.opt.lineStamp=!1),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),T3Gv.opt.linkParams=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,T3Gv.opt.lineStamp=!1,T3Gv.opt.fromOverlayLayer=!1,T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),LogUtil.Debug("= S.BaseLine: LMDrawClickExceptionCleanup output: cleanup complete")}LMDrawClick(t,e){LogUtil.Debug("3 ========= LMDrawClick 1 draw click e=>",t,e);try{this.Frame.x=t,this.Frame.y=e,this.StartPoint={x:t,y:e},this.EndPoint={x:t,y:e},T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_DrawReleaseHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.off("tap")}catch(i){throw LogUtil.Debug("3 ========= LMDrawClick 2 eRRdraw click e=>",i),this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}ChangeBackgroundColor(t,e){LogUtil.Debug("= S.BaseLine: ChangeBackgroundColor called with newColor:",t,"currentColor:",e),this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Transparent&&this.StyleRecord.Fill.Paint.Color===e?(LogUtil.Debug("= S.BaseLine: Condition met. Updating background color."),ObjectUtil$1.GetObjectPtr(this.BlockID,!0),this.StyleRecord.Fill.Paint.Color=t,LogUtil.Debug("= S.BaseLine: Background color updated to:",this.StyleRecord.Fill.Paint.Color)):LogUtil.Debug("= S.BaseLine: Condition not met. Background color remains:",this.StyleRecord.Fill.Paint.Color)}ResizeInTextEdit(t,e){LogUtil.Debug("= S.BaseLine: ResizeInTextEdit called with input:",{textObject:t,newSize:e});const i={x:0,y:0};return LogUtil.Debug("= S.BaseLine: ResizeInTextEdit output:",i),i}CalcTextPosition(t){LogUtil.Debug("= S.BaseLine: CalcTextPosition input:",t);const e=t.Frame.x+t.Frame.width/2,i=t.Frame.y+t.Frame.height/2,n=[{x:this.StartPoint.x,y:this.StartPoint.y},{x:this.EndPoint.x,y:this.EndPoint.y}],s={x:this.Frame.x+this.Frame.width/2,y:this.Frame.y+this.Frame.height/2},a=this.GetAngle(null);let o=t.RotationAngle;this.LineType===OptConstant.LineType.LINE&&(o=a+o,o%=180,Math.abs(o)<1&&(o=0));const r=this.EndPoint.x-this.StartPoint.x,l=this.EndPoint.y-this.StartPoint.y,h=a%180;Utils2.IsEqual(h,0)||0!==o||(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!0));const c=Math.sqrt(r*r+l*l);this.TextWrapWidth=c;const u=-a*NvConstant.Geometry.PI/180;Utils3.RotatePointsAboutPoint(s,u,n),this.LineTextX=(e-n[0].x)/c,this.LineTextX<0&&(this.LineTextX=1+this.LineTextX),this.LineTextY=i-n[0].y,this.LineTextX&&(this.trect=Utils1.DeepCopy(t.trect)),LogUtil.Debug("= S.BaseLine: CalcTextPosition output:",{LineTextX:this.LineTextX,LineTextY:this.LineTextY,TextWrapWidth:this.TextWrapWidth,trect:this.trect})}SetTextObject(t){LogUtil.Debug("= S.BaseLine: SetTextObject called with newDataId =",t),this.DataID=t;const e=ShapeUtil.TextAlignToWin(this.TextAlign),i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);return this.StyleRecord.Fill.Paint.Color=i.background.Paint.Color,e.vjust===TextConstant.TextJust.Center?(this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid,this.StyleRecord.Fill.Paint.Opacity=1):this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent,LogUtil.Debug("= S.BaseLine: SetTextObject output, DataID =",this.DataID,"StyleRecord.Fill =",this.StyleRecord.Fill),!0}GetTextOnLineParams(t){LogUtil.Debug("= S.BaseLine: GetTextOnLineParams called with input:",t);let e={Frame:new Rect$1,StartPoint:new Point$1,EndPoint:new Point$1};return e.StartPoint.x=this.StartPoint.x,e.StartPoint.y=this.StartPoint.y,e.EndPoint.x=this.EndPoint.x,e.EndPoint.y=this.EndPoint.y,e.Frame=Utils2.Pt2Rect(e.StartPoint,e.EndPoint),0!==this.LineTextX&&(e.CenterProp=this.LineTextX,e.Displacement=this.LineTextY),LogUtil.Debug("= S.BaseLine: GetTextOnLineParams output:",e),e}TextDirectionCommon(t,e,i,n){LogUtil.Debug("= S.BaseLine: TextDirectionCommon input:",{textObj:t,bgObj:e,useOriginal:i,extraParam:n});let s=t.GetTextMinDimensions(),a=s.width,o=s.height,r=this.GetTextOnLineParams(n),l=r.StartPoint.x,h=r.Frame.x,c=r.EndPoint.x,u=r.StartPoint.y,d=r.Frame.y,p=r.EndPoint.y,g=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(r.StartPoint,r.EndPoint),f=g*(180/NvConstant.Geometry.PI),m=!1,v=.5,b={},y=0,S=0,x=0,w=0;if(t.SetVerticalAlignment("top"),this.linetrect=Utils1.DeepCopy(this.Frame),this.LineTextY&&(y=this.LineTextY*Math.cos(g),S=-this.LineTextY*Math.sin(g)),f>90&&f<270&&(f-=180,m=!0),!i&&this.TextDirection){g=0,f=0;var C=this.TextAlign,T=this.TextDirection}if(this.LineTextX||this.LineTextY){if(s){this.theMinTextDim.width=a,this.theMinTextDim.height=o,i&&(this.TextAlign=C);let n=ShapeUtil.TextAlignToJust(this.TextAlign);if(m&&this.LineType===OptConstant.LineType.LINE)switch(n.just){case TextConstant.TextAlign.Left:n.just=TextConstant.TextAlign.Right;break;case TextConstant.TextAlign.Right:n.just=TextConstant.TextAlign.Left}e&&e.SetSize(a+2,o+2),v=D.CenterProp=r.CenterProp;let s=l+(c-l)*v-h+S,g=u+(p-u)*v-d+y;0===this.trect.height&&(this.trect.height=3*o);let T=this.trect.height>o?this.trect.height:o;if(x=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal?s-a/2:s-this.trect.width/2,w=g-T/2,t.SetPos(x,w),t.SetVerticalAlignment(n.vjust),t.SetParagraphAlignment(n.just),this.TextDirection?t.SetRotation(f,s,g):t.SetRotation(0,s,g),b={x:s,y:g},e){let t={};switch(n.just){case TextConstant.TextAlign.Left:t.x=x-1;break;case TextConstant.TextAlign.Right:t.x=x-1+this.trect.width-a;break;default:t.x=s-a/2-1}switch(n.vjust){case"top":t.y=w-1-T/2;break;case"bottom":t.y=w-o/2-1+T/2;break;default:t.y=w-o/2-1}e.SetPos(t.x,t.y)}this.linetrect.x=x+this.Frame.x,this.linetrect.y=w+this.Frame.y,this.linetrect.width=a+2,this.linetrect.height=o+2,this.TextDirection?(e&&e.SetRotation(f,s,g),this.linetrect=ToolActUtil.RotateRect(this.linetrect,b,f)):e&&e.SetRotation(0,s,g),this.UpdateFrame()}}else if(s){switch(this.theMinTextDim.width=a,this.theMinTextDim.height=o,e.SetSize(a+2,o+2),this.TextAlign){case TextConstant.TextAlign.TopLeft:x=l-h+a/2*Math.cos(g),w=u-d+a/2*Math.sin(g),e.SetPos(x-a/2-1,w-o-this.StyleRecord.Line.Thickness/2-2),x-=a/2,w=w-o-this.StyleRecord.Line.Thickness/2-1,t.SetPos(x,w),t.SetRotation(f,x+a/2,w+o/2),b={x:x+a/2,y:w+o/2},e.SetRotation(f,x+a/2,w+o/2),this.TextGrow===NvConstant.TextGrowBehavior.Vertical&&(m=!1),m?t.SetParagraphAlignment(TextConstant.TextAlign.Right):t.SetParagraphAlignment(TextConstant.TextAlign.Left);break;case TextConstant.TextAlign.Left:x=l-h+a/2*Math.cos(g),w=u-d+a/2*Math.sin(g),e.SetPos(x-a/2-1,w-o/2-1),x-=a/2,w-=o/2,t.SetPos(x,w),t.SetRotation(f,x+a/2,w+o/2),b={x:x+a/2,y:w+o/2},e.SetRotation(f,x+a/2,w+o/2),this.TextGrow===NvConstant.TextGrowBehavior.Vertical&&(m=!1),m?t.SetParagraphAlignment(TextConstant.TextAlign.Right):t.SetParagraphAlignment(TextConstant.TextAlign.Left);break;default:x=(l+c)/2-h,w=(u+p)/2-d,e.SetPos(x,w),t.SetPos(x,w),t.SetRotation(f,x,w),b={x:x,y:w},e.SetRotation(f,x,w),t.SetParagraphAlignment(TextConstant.TextAlign.Center)}this.linetrect.x=x+this.Frame.x,this.linetrect.y=w+this.Frame.y,this.linetrect.width=a,this.linetrect.height=o,b.x+=this.Frame.x,b.y+=this.Frame.y,this.linetrect=ToolActUtil.RotateRect(this.linetrect,b,f),Utils1.DeepCopy(this.linetrect),TextUtil.TextPinFrame(this.linetrect,o),this.linetrect.x=this.linetrect.x-this.Frame.x,this.linetrect.y=this.linetrect.y-this.Frame.y,this.UpdateFrame()}i&&(this.TextDirection=T,this.TextAlign=C),LogUtil.Debug("= S.BaseLine: TextDirectionCommon output:",{linerect:this.linetrect})}LMAddSVGTextObject(t,e){LogUtil.Debug("= S.BaseLine: LMAddSVGTextObject input:",{svgDoc:t,container:e});const i=this.trect,n=t.CreateShape(OptConstant.CSType.Rect);n.SetID(OptConstant.SVGElementClass.TextBackground),n.SetStrokeWidth(0);let s=this.StyleRecord.Fill.Paint.Color;n.SetFillColor(s),this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent?n.SetOpacity(0):n.SetOpacity(this.StyleRecord.Fill.Paint.Opacity);const a=t.CreateShape(OptConstant.CSType.Text);a.SetID(OptConstant.SVGElementClass.Text),a.SetRenderingEnabled(!1),a.SetSize(i.width,i.height),a.SetSpellCheck(this.AllowSpell()),e.isText=!0,e.textElem=a;const o=T3Gv.stdObj.GetObject(this.DataID);o.Data.runtimeText?a.SetRuntimeText(o.Data.runtimeText):(a.SetText(""),a.SetParagraphAlignment(this.TextAlign),a.SetVerticalAlignment("top")),o.Data.runtimeText||(o.Data.runtimeText=a.GetRuntimeText()),this.TextGrow!==NvConstant.TextGrowBehavior.Vertical&&a.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,i.height),this.bInGroup&&a.DisableHyperlinks(!0),a.SetRenderingEnabled(!0);const r=a.GetTextMinDimensions();r.height;if(this.TextDirection&&this.StyleRecord.Line.Thickness>=r.height&&n&&(s=this.StyleRecord.Line.Paint.Color,n.SetOpacity(0)),this.LineTextY||this.LineTextX){switch(ShapeUtil.TextAlignToWin(this.TextAlign).vjust){case TextConstant.TextJust.Top:case TextConstant.TextJust.Bottom:this.trect.height,this.LineTextY;break;default:this.LineTextY}}n&&e.AddElement(n),e.AddElement(a),this.TextDirectionCommon(a,n,!1,null),a.SetEditCallback(T3Gv.opt.TextCallback,e),LogUtil.Debug("= S.BaseLine: LMAddSVGTextObject output:",{addedTextElement:a})}LMResizeSVGTextObject(t,e,i){if(LogUtil.Debug("= S.BaseLine: LMResizeSVGTextObject called with input:",{svgDoc:t,textContainer:e,extraData:i}),-1!==e.DataID){const i=t.GetElementById(OptConstant.SVGElementClass.TextBackground),n=t.GetElementById(OptConstant.SVGElementClass.Text);n&&e.TextDirectionCommon(n,i,!1,null)}LogUtil.Debug("= S.BaseLine: LMResizeSVGTextObject completed")}AdjustTextEditBackground(t,e){if(LogUtil.Debug("= S.BaseLine: AdjustTextEditBackground called with input:",{elementId:t,container:e}),-1!==this.DataID){const i=e||T3Gv.opt.svgObjectLayer.GetElementById(t);LogUtil.Debug("= S.BaseLine: Retrieved svgContainer:",i);const n=i.GetElementById(OptConstant.SVGElementClass.TextBackground),s=i.GetElementById(OptConstant.SVGElementClass.Text);if(LogUtil.Debug("= S.BaseLine: Retrieved textBackgroundElement:",n,"and textElement:",s),s){const t=null==e;this.TextDirectionCommon(s,n,t,null),LogUtil.Debug("= S.BaseLine: TextDirectionCommon applied with useOriginal =",t)}else LogUtil.Debug("= S.BaseLine: No text element found in the SVG container.")}else LogUtil.Debug("= S.BaseLine: Skipped AdjustTextEditBackground because DataID is -1.");LogUtil.Debug("= S.BaseLine: AdjustTextEditBackground completed.")}AddCorner(t,e){LogUtil.Debug("= S.BaseLine: AddCorner called with input:",{cornerIndex:t,cornerData:e}),LogUtil.Debug("= S.BaseLine: AddCorner completed with no output (void)")}SVGTokenizerHook(t){return LogUtil.Debug("= S.BaseLine: SVGTokenizerHook called with input:",t),T3Gv.opt.bTokenizeStyle&&((t=Utils1.DeepCopy(t)).Fill.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.SolidFill,t.Fill.Paint.Color),t.Line.Paint.Color=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineColor,t.Line.Paint.Color),0===this.StartArrowID&&0===this.EndArrowID&&(t.Line.Thickness=Basic.Symbol.CreatePlaceholder(Basic.Symbol.Placeholder.LineThick,t.Line.Thickness))),LogUtil.Debug("= S.BaseLine: SVGTokenizerHook output:",t),t}GetDimensionPoints(){LogUtil.Debug("= S.BaseLine: GetDimensionPoints called, input: none");const t=[],e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);LogUtil.Debug("= S.BaseLine: Computed rect =",e);const i=new Point$1(this.StartPoint.x-e.x,this.StartPoint.y-e.y);LogUtil.Debug("= S.BaseLine: Computed relative start point =",i);const n=new Point$1(this.EndPoint.x-e.x,this.EndPoint.y-e.y);return LogUtil.Debug("= S.BaseLine: Computed relative end point =",n),t.push(i),t.push(n),LogUtil.Debug("= S.BaseLine: GetDimensionPoints output =",t),t}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.BaseLine: PostCreateShapeCallback input:",{svgDoc:t,shapeContainer:e,flag:i,extra:n});const s=e.GetElementById(OptConstant.SVGElementClass.Shape),a=e.GetElementById(OptConstant.SVGElementClass.Slop);LogUtil.Debug("= S.BaseLine: Retrieved shapeElement and slopElement",{shapeElement:s,slopElement:a});let o=T3Gv.arrowHlkTable[this.StartArrowID],r=T3Gv.arrowHlkTable[this.EndArrowID];const l=T3Gv.arrowHsTable[this.ArrowSizeIndex];LogUtil.Debug("= S.BaseLine: Arrow lookup:",{startArrow:o,endArrow:r,arrowSize:l}),0===o.id&&(o=null),0===r.id&&(r=null),LogUtil.Debug("= S.BaseLine: Arrow after check:",{startArrow:o,endArrow:r}),o||r?(s.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp),LogUtil.Debug("= S.BaseLine: Arrowheads set on shapeElement and slopElement")):LogUtil.Debug("= S.BaseLine: No arrowheads to set (both null)"),this.DataID>=0?(this.LMAddSVGTextObject(t,e),LogUtil.Debug("= S.BaseLine: SVG text object added")):LogUtil.Debug("= S.BaseLine: DataID is invalid, skipping text object addition"),this.UpdateDimensionLines(e,null),LogUtil.Debug("= S.BaseLine: Dimension lines updated"),LogUtil.Debug("= S.BaseLine: Coordinate lines updated"),LogUtil.Debug("= S.BaseLine: PostCreateShapeCallback completed")}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.BaseLine: CreateActionTriggers input:",{svgDoc:t,triggerTarget:e,unusedParam:i,secondaryTarget:n});let s,a=!0,o=t.CreateShape(OptConstant.CSType.Group),r=OptConstant.Common.KnobSize,l=OptConstant.Common.RKnobSize;if(!(this instanceof Instance.Shape.Line&&this.objecttype===NvConstant.FNObjectTypes.FlWall&&(T3Gv.wallOpt&&T3Gv.wallOpt.IsAddingWalls&&T3Gv.wallOpt.IsAddingWalls()||T3Constant.DocContext.UsingWallTool))){let i=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(i*=2);const h=r/i*(this.objecttype===NvConstant.FNObjectTypes.FlWall?2:1),c=l/i,u=this.Frame;let d=u.width+h,p=u.height+h,g=Utils1.DeepCopy(u);g.x-=h/2,g.y-=h/2,g.width+=h,g.height+=h;let f,m={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:h,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};e!==n&&(m.fillColor="white",m.strokeSize=1,m.strokeColor="black",m.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(m.fillColor="gray",m.locked=!0):this.NoGrow()&&(m.fillColor="red",m.strokeColor="red",m.cursorType=CursorConstant.CursorType.Default),m.x=this.StartPoint.x-this.Frame.x,m.y=this.StartPoint.y-this.Frame.y,m.knobID=OptConstant.ActionTriggerType.LineStart;const v=ObjectUtil$1.GetObjectPtr(e,!1);if(v&&v.hooks)for(f=0;f<v.hooks.length;f++)if(v.hooks[f].hookpt===OptConstant.HookPts.KTL){m.shapeType=OptConstant.CSType.Oval,a=!1;break}if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&(m.shapeType=OptConstant.CSType.Image),s=this.GenericKnob(m),this.objecttype===NvConstant.FNObjectTypes.FlWall&&s.SetURL&&(s.SetURL(m.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),s.ExcludeFromExport(!0)),o.AddElement(s),m.shapeType=OptConstant.CSType.Rect,v&&v.hooks)for(f=0;f<v.hooks.length;f++)if(v.hooks[f].hookpt===OptConstant.HookPts.KTR){m.shapeType=OptConstant.CSType.Oval,a=!1;break}if(m.x=this.EndPoint.x-this.Frame.x,m.y=this.EndPoint.y-this.Frame.y,m.knobID=OptConstant.ActionTriggerType.LineEnd,this.objecttype===NvConstant.FNObjectTypes.FlWall&&(m.shapeType=OptConstant.CSType.Image),s=this.GenericKnob(m),this.objecttype===NvConstant.FNObjectTypes.FlWall&&s.SetURL&&(s.SetURL(m.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),s.ExcludeFromExport(!0)),o.AddElement(s),a&&!m.locked&&!this.NoGrow()){m.shapeType=OptConstant.CSType.Oval;let t=Math.atan((this.EndPoint.y-this.StartPoint.y)/(this.EndPoint.x-this.StartPoint.x));t<0&&(t=Math.abs(t)),this.EndPoint.x>=this.StartPoint.x?m.x=this.EndPoint.x-3*c*Math.cos(t)-this.Frame.x+h/2-c/2:m.x=this.EndPoint.x+3*c*Math.cos(t)-this.Frame.x+h/2-c/2,this.EndPoint.y>=this.StartPoint.y?m.y=this.EndPoint.y-3*c*Math.sin(t)-this.Frame.y+h/2-c/2:m.y=this.EndPoint.y+3*c*Math.sin(t)-this.Frame.y+h/2-c/2,m.cursorType=CursorConstant.CursorType.Rotate,m.knobID=OptConstant.ActionTriggerType.Rotate,m.fillColor="white",m.fillOpacity=.001,m.strokeSize=2.5,m.knobSize=c,m.strokeColor="white",s=this.GenericKnob(m),o.AddElement(s),m.strokeSize=1,m.strokeColor="black",s=this.GenericKnob(m),o.AddElement(s),m.knobSize=h}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(o,t,m)}return o.SetSize(d,p),o.SetPos(g.x,g.y),o.isShape=!0,o.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.BaseLine: CreateActionTriggers output:",o),o}}CalcCursorForSegment(t,e,i){LogUtil.Debug("= S.BaseLine: CalcCursorForSegment input:",{startPoint:t,endPoint:e,flag:i});const n=Utils1.CalcAngleFromPoints(t,e);LogUtil.Debug("= S.BaseLine: Calculated angle:",n);const s=this.CalcCursorForAngle(n,i);return LogUtil.Debug("= S.BaseLine: CalcCursorForSegment output:",{cursor:s}),s}NoRotate(){LogUtil.Debug("= S.BaseLine: NoRotate called, input: none");const t=this.hooks.length>1;return LogUtil.Debug("= S.BaseLine: NoRotate output:",t),t}SetRuntimeEffects(t){LogUtil.Debug("= S.BaseLine: SetRuntimeEffects called with input:",t);const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);e?(LogUtil.Debug("= S.BaseLine: Retrieved SVG element for BlockID",this.BlockID,":",e),this.ApplyEffects(e,t,!0),LogUtil.Debug("= S.BaseLine: Applied runtime effects with input:",t)):LogUtil.Debug("= S.BaseLine: No SVG element found for BlockID",this.BlockID)}ApplyStyles(t,e){LogUtil.Debug("= S.BaseLine: ApplyStyles called with input:",{element:t,styleObj:e});const i=e.Fill.Paint.FillType,n=e.Line.Paint.FillType,s=""!==this.ImageURL;if(this.polylist&&this.polylist.closed){if(s){let i="PROPFILL",n={x:0,y:0,width:0,height:0};this.ImageHeader&&(this.ImageHeader.croprect&&(n.x=this.ImageHeader.croprect.left,n.y=this.ImageHeader.croprect.top,n.width=this.ImageHeader.croprect.right-this.ImageHeader.croprect.left,n.height=this.ImageHeader.croprect.bottom-this.ImageHeader.croprect.top),void 0!==this.ImageHeader.imageflags&&this.ImageHeader.imageflags===NvConstant.ImageScales.AlwaysFit&&(i="NOPROP")),LogUtil.Debug("= S.BaseLine: Applying image fill with",{url:this.ImageURL,scaleType:i,cropRect:n}),t.SetImageFill(this.ImageURL,{scaleType:i,cropRect:n}),t.SetFillOpacity(e.Fill.Paint.Opacity)}}else if(i===NvConstant.FillTypes.Gradient){const i=this.CreateGradientRecord(e.Fill.Paint.GradientFlags,e.Fill.Paint.Color,e.Fill.Paint.Opacity,e.Fill.Paint.EndColor,e.Fill.Paint.EndOpacity);LogUtil.Debug("= S.BaseLine: Applying gradient fill with record:",i),t.SetGradientFill(i)}else if(i===NvConstant.FillTypes.RichGradient){const i=this.CreateRichGradientRecord(e.Fill.Paint.GradientFlags);LogUtil.Debug("= S.BaseLine: Applying rich gradient fill with record:",i),t.SetGradientFill(i)}else if(i===NvConstant.FillTypes.Texture){const i={url:"",scale:1,alignment:e.Fill.Paint.TextureScale.AlignmentScalar},n=e.Fill.Paint.Texture;T3Gv.opt.TextureList.Textures[n]&&(i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.scale=T3Gv.opt.CalcTextureScale(e.Fill.Paint.TextureScale,i.dim.x),e.Fill.Paint.TextureScale.Scale=i.scale,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),LogUtil.Debug("= S.BaseLine: Applying texture fill with params:",i),t.SetTextureFill(i),t.SetFillOpacity(e.Fill.Paint.Opacity))}else i===NvConstant.FillTypes.Transparent?(LogUtil.Debug("= S.BaseLine: Applying transparent fill"),t.SetFillColor("none")):(LogUtil.Debug("= S.BaseLine: Applying solid fill with color:",e.Fill.Paint.Color),t.SetFillColor(e.Fill.Paint.Color),t.SetFillOpacity(e.Fill.Paint.Opacity));if(n===NvConstant.FillTypes.Gradient){const i=this.CreateGradientRecord(e.Line.Paint.GradientFlags,e.Line.Paint.Color,e.Line.Paint.Opacity,e.Line.Paint.EndColor,e.Line.Paint.EndOpacity);LogUtil.Debug("= S.BaseLine: Applying gradient stroke with record:",i),t.SetGradientStroke(i)}else if(n===NvConstant.FillTypes.RichGradient){const i=this.CreateRichGradientRecord(e.Line.Paint.GradientFlags);LogUtil.Debug("= S.BaseLine: Applying rich gradient stroke with record:",i),t.SetGradientStroke(i)}else if(n===NvConstant.FillTypes.Texture){const i={url:"",scale:e.Line.Paint.TextureScale.Scale,alignment:e.Line.Paint.TextureScale.AlignmentScalar},n=e.Line.Paint.Texture;i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.url||(i.url=Constants.FilePath_CMSRoot+Constants.FilePath_Textures+T3Gv.opt.TextureList.Textures[n].filename),LogUtil.Debug("= S.BaseLine: Applying texture stroke with params:",i),t.SetTextureStroke(i),t.SetStrokeOpacity(e.Line.Paint.Opacity)}else n===NvConstant.FillTypes.Solid?(LogUtil.Debug("= S.BaseLine: Applying solid stroke with color:",e.Line.Paint.Color),t.SetStrokeColor(e.Line.Paint.Color),t.SetStrokeOpacity(e.Line.Paint.Opacity)):(LogUtil.Debug("= S.BaseLine: No stroke to apply, setting stroke color to none"),t.SetStrokeColor("none"));LogUtil.Debug("= S.BaseLine: ApplyStyles completed for element:",t)}CalcLineHops(t,e){LogUtil.Debug("= S.BaseLine: CalcLineHops called with targetShape =",t,"and hopData =",e);const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);let n=i.length,s=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),a=s.length;for(let o=0;o<n;++o){if(this.hoplist.nhops>OptConstant.Common.MaxHops)return void LogUtil.Debug("= S.BaseLine: Maximum hop count exceeded, exiting CalcLineHops");let t,n;o>0?(t=i[o-1],n=i[o]):(t=i[o],n=i[o+1],o++),LogUtil.Debug("= S.BaseLine: Processing base segment between",t,"and",n);let r=this.AddHopPoint(t,n,s,a,o,e);if(null==r){LogUtil.Debug("= S.BaseLine: AddHopPoint returned null, breaking out of loop");break}if(LogUtil.Debug("= S.BaseLine: AddHopPoint result =",r),r.bSuccess){let i=r.tindex;if(i>=1&&a>2){if(LogUtil.Debug("= S.BaseLine: First hop success with tindex =",i,"; refining target poly points"),s=s.slice(i),a-=i,r=this.AddHopPoint(t,n,s,a,o,e),null==r){LogUtil.Debug("= S.BaseLine: Second AddHopPoint returned null, breaking out of loop");break}i=r.tindex,LogUtil.Debug("= S.BaseLine: Refined hop result, new tindex =",i)}if(i<a-1){if(LogUtil.Debug("= S.BaseLine: tindex =",i,"is less than targetPointCount - 1 =",a-1,"; further refining target poly points"),s=s.slice(i),a-=i,r=this.AddHopPoint(t,n,s,a,o,e),null==r){LogUtil.Debug("= S.BaseLine: Third AddHopPoint returned null, breaking out of loop");break}i=r.tindex,LogUtil.Debug("= S.BaseLine: Final hop refinement, new tindex =",i)}}}LogUtil.Debug("= S.BaseLine: CalcLineHops completed")}DebugLineHops(t){LogUtil.Debug("= S.BaseLine: DebugLineHops called with input:",t);const e=this.hoplist.nhops;let i=null,n=!1;const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(0!=(s.flags&OptConstant.SessionFlags.AllowHops)){let a=s.hopdim.x,o=0,r=0,l=0;for(let h=0;h<e;h++)if(i=this.hoplist.hops[h],i.cons)n=!0,l++,o+=i.pt.x,r+=i.pt.y;else{let e;n?(e="green",a=3*s.hopdim.x,l++,o+=i.pt.x,r+=i.pt.y,o/=l,r/=l,n=!1):(e="red",a=s.hopdim.x,o=i.pt.x,r=i.pt.y);const h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),c={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:h.x+(o-a/2),y:h.y+(r-a/2),knobSize:a,fillColor:"none",fillOpacity:1,strokeSize:1,strokeColor:e,KnobID:0,cursorType:CursorConstant.CursorType.Cross};LogUtil.Debug("= S.BaseLine: DebugLineHops knobParams:",c);const u=this.GenericKnob(c);u.SetID("hoptarget"),T3Gv.opt.svgOverlayLayer.AddElement(u),o=0,r=0,l=0}}LogUtil.Debug("= S.BaseLine: DebugLineHops completed")}AddHopPoint(t,e,i,n,s,a){LogUtil.Debug("= S.BaseLine: AddHopPoint called with input:",{startPoint:t,endPoint:e,polyPoints:i,numPoints:n,segmentIndex:s,hopIndex:a});let o,r,l,h,c,u=0,d=0;if(this.hoplist.nhops>OptConstant.Common.MaxHops)return LogUtil.Debug("= S.BaseLine: Maximum hops exceeded, no hop added."),{bSuccess:!1,tindex:0};const p=i;i=p.slice(u);let g=T3Gv.opt.PolyLIntersect(t,e,i,n);for(r=g.ipt,c=g.lpseg;g.bSuccess;){if(o=Utils2.Pt2Rect(t,e),Utils2.InflateRect(o,2,2),r.x>=o.x&&r.x<=o.x+o.width&&r.y>=o.y&&r.y<=o.y+o.height){c+=u,l=r.x-e.x,h=r.y-e.y;const t={segment:s,index:a,pt:r,dist:Utils2.Sqrt(l*l+h*h),cons:!1};this.hoplist.hops.push(t),this.hoplist.nhops++;const i={bSuccess:!0,tindex:c};return LogUtil.Debug("= S.BaseLine: AddHopPoint output:",i),i}if(u+=c,u>n-1)break;if(++d>n)break;n=(i=p.slice(u)).length,g=T3Gv.opt.PolyLIntersect(t,e,i,n),c=g.lpseg,r=g.ipt}const f={bSuccess:!1,tindex:c};return LogUtil.Debug("= S.BaseLine: AddHopPoint output:",f),f}RightClick(t){LogUtil.Debug("= S.BaseLine: RightClick called with input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("= S.BaseLine: Converted document coords:",e);const i=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(LogUtil.Debug("= S.BaseLine: Found target element:",i),!SelectUtil.SelectObjectFromClick(t,i))return LogUtil.Debug("= S.BaseLine: RightClick - selection failed, returning false"),!1;const n=i.GetID();let s=ObjectUtil$1.GetObjectPtr(n,!1);if(LogUtil.Debug("= S.BaseLine: Retrieved object:",s),s&&s.GetTextObject()>=0){const e=i.textElem;if(e){const n=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("= S.BaseLine: Spell index at location:",n),n>=0&&TextUtil.ActivateTextEdit(i,t,!0)}}if(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=i.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,LogUtil.Debug("= S.BaseLine: Set Right click param:",T3Gv.opt.rClickParam),null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();let i=-1;e&&(i=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)),LogUtil.Debug("= S.BaseLine: Active edit spell index:",i),i>=0?T3Gv.opt.svgDoc.GetSpellCheck().ShowSpellMenu(e,i,t.gesture.center.clientX,t.gesture.center.clientY):UIUtil.ShowContextMenu(!0,"Line","Default")}else UIUtil.ShowContextMenu(!0,"Line","Default");LogUtil.Debug("= S.BaseLine: RightClick completed")}SetObjectStyle(t){LogUtil.Debug("= S.BaseLine: SetObjectStyle called with input:",t);let e=Utils1.DeepCopy(t),i=!1;this.LineType!==OptConstant.LineType.SEGLINE&&null!=e.segl&&delete e.segl,null==t.EndArrowID&&null==t.StartArrowID||(this.StartPoint.x<this.EndPoint.x?i=!1:(this.StartPoint.x>this.EndPoint.x||this.StartPoint.y>this.EndPoint.y)&&(i=!0),i&&(e.EndArrowID=this.EndArrowID,e.StartArrowID=this.StartArrowID,e.EndArrowDisp=this.EndArrowDisp,e.StartArrowDisp=this.StartArrowDisp,null!=t.EndArrowID&&(e.StartArrowID=t.EndArrowID,e.StartArrowDisp=t.EndArrowDisp),null!=t.StartArrowID&&(e.EndArrowID=t.StartArrowID,e.EndArrowDisp=t.StartArrowDisp))),this.polylist&&this.polylist.closed||e&&e.StyleRecord&&e.StyleRecord.Fill&&e.StyleRecord.Fill.Hatch&&(e.StyleRecord.Fill.Hatch=0);let n=super.SetObjectStyle(e);return n.StyleRecord&&n.StyleRecord.Fill&&(this.ImageURL=""),LogUtil.Debug("= S.BaseLine: SetObjectStyle output:",n),n}GetArrowheadSelection(t){if(LogUtil.Debug("= S.BaseLine: GetArrowheadSelection - input:",t),t){(function(t){if(Math.abs(t.EndPoint.x-t.StartPoint.x)<.01)return t.EndPoint.y<t.StartPoint.y;const e=Utils2.Pt2Rect(t.EndPoint,t.StartPoint);return Math.abs(t.EndPoint.x-e.x)<.01&&Math.abs(t.EndPoint.y-e.y)<.01||Math.abs(t.EndPoint.x-e.x)<.01&&Math.abs(t.EndPoint.y-(e.y+e.height))<.01})(this)?(t.StartArrowID=this.EndArrowID,t.StartArrowDisp=this.EndArrowDisp,t.EndArrowID=this.StartArrowID,t.EndArrowDisp=this.StartArrowDisp):(t.StartArrowID=this.StartArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowID=this.EndArrowID,t.EndArrowDisp=this.EndArrowDisp),t.ArrowSizeIndex=this.ArrowSizeIndex}return LogUtil.Debug("= S.BaseLine: GetArrowheadSelection - output:",t),!0}UpdateDimensionFromTextObj(t,e){LogUtil.Debug("= S.BaseLine: UpdateDimensionFromTextObj called with input:",{sourceElement:t,textData:e});let i="",n=-1;T3Gv.stdObj.PreserveBlock(this.BlockID),SvgUtil.ShowSVGSelectionState(this.BlockID,!1);const s=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);LogUtil.Debug("= S.BaseLine: Retrieved SVG element for BlockID",this.BlockID,s),e?(i=e.text,n=e.userData):(i=t.GetText(),n=t.GetUserData()),LogUtil.Debug("= S.BaseLine: Determined text content and userData:",{textContent:i,userData:n}),this.UpdateDimensionFromText(s,i,n),LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText completed"),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("= S.BaseLine: Set link flag for BlockID",this.BlockID);for(let a=0;a<this.hooks.length;a++)OptCMUtil.SetLinkFlag(this.hooks[a].objid,DSConstant.LinkFlags.Move),LogUtil.Debug("= S.BaseLine: Set link flag for hook object with id",this.hooks[a].objid);(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&(ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("= S.BaseLine: Added BlockID to dirty list",this.BlockID)),DrawUtil.CompleteOperation(),LogUtil.Debug("= S.BaseLine: Completed operation for BlockID",this.BlockID),(this.Frame.x<0||this.Frame.y<0)&&(T3Gv.opt.ScrollObjectIntoView(this.BlockID,!1),LogUtil.Debug("= S.BaseLine: Scrolled object into view for BlockID",this.BlockID)),LogUtil.Debug("= S.BaseLine: UpdateDimensionFromTextObj completed for BlockID",this.BlockID)}UpdateDimensionFromText(t,e,i){let n,s,a;LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText called with input:",{inputElement:t,textValue:e,options:i});let o=-1;if(i.hookedObjectInfo){const n=this.UpdateDimensionsFromTextForHookedObject(t,e,i);LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText (hooked) output:",n)}else{if(s=i.segment,n=this.GetDimensionValueFromString(e,s),n>=0&&(o=this.GetDimensionLengthFromValue(n)),o<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects(),void LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText output: invalid dimensionLength (< 0), early return");for(this.UpdateDimensions(o,null,null),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),a=0;a<this.hooks.length;a++)OptCMUtil.SetLinkFlag(this.hooks[a].objid,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change);T3Gv.opt.UpdateLinks(),this.GetDimensionsForDisplay().width===o&&(this.rwd=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0)),this.UpdateDimensionLines(t),LogUtil.Debug("= S.BaseLine: UpdateDimensionFromText completed, output dimensionLength:",o)}}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("= S.BaseLine: UpdateSecondaryDimensions called with input:",{container:t,creator:e,forcedUpdate:i});const n=this.objecttype===NvConstant.FNObjectTypes.FlWall,s=!(this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions),a=Boolean(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select||i);n&&s&&a&&this.UpdateHookedObjectDimensionLines(t,e,i),LogUtil.Debug("= S.BaseLine: UpdateSecondaryDimensions completed")}GetBoundingBoxesForSecondaryDimensions(){LogUtil.Debug("= S.BaseLine: GetBoundingBoxesForSecondaryDimensions called, input: none");const t=this.GetHookedObjectDimensionInfo();LogUtil.Debug("= S.BaseLine: Retrieved hookedInfo:",t);const e=[];if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&!(this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions)&&this.Dimensions&NvConstant.DimensionFlags.AllSeg){LogUtil.Debug("= S.BaseLine: Conditions met for processing secondary dimensions.");for(let i=0,n=t.length;i<n;i++){const n=t[i];if(LogUtil.Debug(`= S.BaseLine: Processing hookedInfo[${i}]:`,n),Utils2.EqualPt(n.start,n.end)){LogUtil.Debug(`= S.BaseLine: Skipping index ${i} as start and end points are equal.`);continue}const s=Utils1.CalcAngleFromPoints(n.start,n.end);LogUtil.Debug(`= S.BaseLine: Calculated angle at index ${i}:`,s);const a=this.GetDimensionTextForPoints(n.start,n.end);LogUtil.Debug(`= S.BaseLine: Retrieved dimensionText at index ${i}:`,a);const o=this.GetPointsForDimension(s,a,n.start,n.end,n.segment,!0);LogUtil.Debug(`= S.BaseLine: Retrieved dimensionPoints at index ${i}:`,o),o&&(e.push(o.left),e.push(o.right),e.push(o.textFrame),LogUtil.Debug(`= S.BaseLine: Added bounding boxes from index ${i}.`))}}else LogUtil.Debug("= S.BaseLine: Conditions not met for processing secondary dimensions.");return LogUtil.Debug("= S.BaseLine: GetBoundingBoxesForSecondaryDimensions output:",e),e}AddIcon(t,e,i){let n,s;LogUtil.Debug("= S.BaseLine: AddIcon called with input:",{eventData:t,svgContainer:e,iconPositionCoords:i});const a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0),o=a.length;if(this.DataID>=0)2===o?(n=a[1].x,s=a[1].y):3===o?(n=a[2].x,s=a[2].y):(n=a[o-1].x,s=a[o-1].y),this instanceof Instance.Shape.Line||Instance.Shape.ArcLine,n-=this.iconSize,i.y=s-2*this.iconSize,i.x=n-this.iconSize*this.nIcons;else{if(2===o)n=(a[0].x+a[1].x)/2,s=(a[0].y+a[1].y)/2;else if(3===o)n=a[1].x,s=a[1].y;else{const t=Math.floor(o/2);n=a[t].x,s=a[t].y}this instanceof Instance.Shape.Line?(n+=this.iconSize/2,i.y=s+this.iconSize/4):this instanceof Instance.Shape.ArcLine?(n+=this.iconSize/2,i.y=s+this.iconSize/2):this instanceof Instance.Shape.SegmentedLine?i.y=s+this.iconSize/2:i.y=s-this.iconSize/2,i.x=n-this.iconSize*this.nIcons}const r=this.GenericIcon(i);return this.nIcons++,e.AddElement(r),LogUtil.Debug("= S.BaseLine: AddIcon output:",r),r}GetNotePos(t,e){LogUtil.Debug("= S.BaseLine: GetNotePos called with input:",{event:t,param:e});const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0),n=i.length;let s,a,o,r={x:0,y:0};if(this.DataID>=0){2===n?(s=i[1].x,a=i[1].y):3===n?(s=i[2].x,a=i[2].y):(s=i[n-1].x,a=i[n-1].y),this instanceof Instance.Shape.Line||Instance.Shape.ArcLine,s-=this.iconSize,r.y=a-2*this.iconSize,r.x=s-this.iconSize*this.nIcons,1===this.nIcons&&(r.x+=2*this.iconSize),o=this.GetSVGFrame();const t={x:o.x+r.x,y:o.y+r.y+this.iconSize};return LogUtil.Debug("= S.BaseLine: GetNotePos output (DataID valid):",t),t}{if(2===n)s=(i[0].x+i[1].x)/2,a=(i[0].y+i[1].y)/2;else if(3===n)s=i[1].x,a=i[1].y;else{const t=Math.floor(n/2);s=i[t].x,a=i[t].y}this instanceof Instance.Shape.Line?(s+=this.iconSize/2,r.y=a+this.iconSize/4):this instanceof Instance.Shape.ArcLine?(s+=this.iconSize/2,r.y=a+this.iconSize/2):this instanceof Instance.Shape.SegmentedLine?r.y=a+this.iconSize/2:r.y=a-this.iconSize/2,1===this.nIcons&&(s+=this.iconSize),r.x=s,o=this.GetSVGFrame();const t={x:o.x+r.x,y:o.y+r.y+this.iconSize};return LogUtil.Debug("= S.BaseLine: GetNotePos output (DataID invalid):",t),t}}PolyLinePrPolyLGetArcQuadrant(t,e,i){LogUtil.Debug("= S.BaseLine: PolyLinePrPolyLGetArcQuadrant - input:",{startPoint:t,endPoint:e,angle:i});let n={param:0,ShortRef:0},s=[new Point$1(t.x,t.y),new Point$1(e.x,e.y)];LogUtil.Debug("= S.BaseLine: Points array before rotation:",s);let a={x:t.x,y:t.y};if(LogUtil.Debug("= S.BaseLine: Center of rotation:",a),Math.abs(i)>=.01){const t=Math.sin(i),e=Math.cos(i);let n=Math.asin(t);e<0&&(n=-n),LogUtil.Debug("= S.BaseLine: rotationAngle computed:",n),Utils3.RotatePointsAboutPoint(a,n,s),LogUtil.Debug("= S.BaseLine: Points array after rotation:",s)}else LogUtil.Debug("= S.BaseLine: Angle less than threshold, no rotation applied.");const o=s[0],r=s[1];return LogUtil.Debug("= S.BaseLine: Rotated start point:",o),LogUtil.Debug("= S.BaseLine: Rotated end point:",r),r.x>o.x?r.y>o.y?(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_BL,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x > rotatedStart.x and rotatedEnd.y > rotatedStart.y"),e.notclockwise&&(n.param=0,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.param to 0"))):(n.ShortRef=OptConstant.ArcQuad.PLA_TL,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x > rotatedStart.x and rotatedEnd.y <= rotatedStart.y"),e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_TR,n.param=NvConstant.Geometry.PI/2,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.ShortRef to SD_PLA_TR and result.param to PI/2"))):r.y>o.y?(n.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x <= rotatedStart.x and rotatedEnd.y > rotatedStart.y"),e.notclockwise&&(n.ShortRef=OptConstant.ArcQuad.PLA_BL,n.param=NvConstant.Geometry.PI/2,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.ShortRef to SD_PLA_BL and result.param to PI/2"))):(n.param=-NvConstant.Geometry.PI/2,n.ShortRef=OptConstant.ArcQuad.PLA_TR,LogUtil.Debug("= S.BaseLine: Condition: rotatedEnd.x <= rotatedStart.x and rotatedEnd.y <= rotatedStart.y"),e.notclockwise&&(n.param=0,LogUtil.Debug("= S.BaseLine: endPoint.notclockwise is true, setting result.param to 0"))),LogUtil.Debug("= S.BaseLine: PolyLinePrPolyLGetArcQuadrant - output:",n),n}FieldDataAllowed(){LogUtil.Debug("= S.BaseLine: FieldDataAllowed called, input: none");return LogUtil.Debug("= S.BaseLine: FieldDataAllowed output:",false),false}}var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$3(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$3(e,i,a),a};const _PolyLine=class extends BaseLine{constructor(t){LogUtil.Debug("S.PolyLine: constructor input",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Line,t.LineType=t.LineType||OptConstant.LineType.POLYLINE,super(t),this.polylist=t.polylist||new PolyList,this.polylist.flags=DSConstant.PolyListFlags.FreeHand,this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.RotateKnobPt={x:0,y:0},this.TextDirection=t.TextDirection||!1,this.CalcFrame(),LogUtil.Debug("S.PolyLine: constructor output",this)}CreateShape(t,e){var i;if(LogUtil.Debug("S.PolyLine: CreateShape input",t,e),this.flags&NvConstant.ObjFlags.NotVisible)return null;const n=t.CreateShape(OptConstant.CSType.ShapeContainer),s=t.CreateShape(OptConstant.CSType.Path);s.SetID(OptConstant.SVGElementClass.Shape);const a=t.CreateShape(OptConstant.CSType.Polyline);a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),this.CalcFrame();const o=this.Frame;let r=this.StyleRecord;r=this.SVGTokenizerHook(r)||(null==(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1))?void 0:i.def.style);const l=r.Line.Paint.Color;let h=r.Line.Thickness;h>0&&h<1&&(h=1);const c=r.Line.Paint.Opacity,u=r.Line.LinePattern,d=o.width,p=o.height;n.SetSize(d,p),n.SetPos(o.x,o.y),s.SetSize(d,p);const g=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);this.UpdateSVG(s,g),s.SetFillColor("none"),s.SetStrokeColor(l),s.SetStrokeOpacity(c),s.SetStrokeWidth(h),0!==u&&s.SetStrokePattern(u),a.SetSize(d,p),this.UpdateSVG(a,g),a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),a.SetEventBehavior(e?OptConstant.EventBehavior.HiddenOut:OptConstant.EventBehavior.None),a.SetStrokeWidth(h+OptConstant.Common.Slop),n.AddElement(s),n.AddElement(a),this.ApplyStyles(s,r),this.ApplyEffects(n,!1,!0);const f=r.Fill.Hatch;if(f&&0!==f&&this.polylist&&this.polylist.closed){const e=t.CreateShape(OptConstant.CSType.Polygon);e.SetPoints(g),e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(d,p),e.SetStrokeWidth(0),this.SetFillHatch(e,f),n.AddElement(e)}return n.isShape=!0,this.AddIcons(t,n),LogUtil.Debug("S.PolyLine: CreateShape output",n),n}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.PolyLine PostCreateShapeCallback input",t,e,i,n);const s=e.GetElementById(OptConstant.SVGElementClass.Shape),a=e.GetElementById(OptConstant.SVGElementClass.Slop);let o=T3Gv.arrowHlkTable[this.StartArrowID],r=T3Gv.arrowHlkTable[this.EndArrowID];const l=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===o.id&&(o=null),0===r.id&&(r=null),(o||r)&&(s.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(o,l,r,l,this.StartArrowDisp,this.EndArrowDisp)),this.DataID>=0&&this.LMAddSVGTextObject(t,e),this.polylist&&this.polylist.segs&&this.polylist.segs.length>1&&this.UpdateDimensionLines(e),LogUtil.Debug("= S.PolyLine PostCreateShapeCallback output",e)}UpdateSVG(t,e){LogUtil.Debug("S.PolyLine: UpdateSVG input",t,e);const i=e.length;if(t&&t.PathCreator){const n=t.PathCreator();if(n.BeginPath(),i>1){n.MoveTo(e[0].x,e[0].y);for(let t=1;t<i;t++)n.LineTo(e[t].x,e[t].y)}this.polylist.closed&&n.ClosePath(),n.Apply()}LogUtil.Debug("S.PolyLine: UpdateSVG output",t)}SetFillHatch(t,e,i){if(LogUtil.Debug("S.PolyLine: SetFillHatch input",t,e,i),-1!==e&&0!==e){let n=e-1,s={},a=[];n<10&&(n="0"+n),s.url=Constants.FilePath_Hatches+Constants.HatchName+n+".png",s.scale=1,s.alignment=0,s.dim={x:128,y:128},t.SetTextureFill(s);let o=this.StyleRecord.Line.Paint.Color;i&&(o=i),a.push({type:BConstant.EffectType.RECOLOR,params:{color:o}}),t.Effects().SetEffects(a,this.Frame)}else t.SetFillColor("none");LogUtil.Debug("S.PolyLine: SetFillHatch output",t)}GetDimensionPoints(){LogUtil.Debug("S.PolyLine: GetDimensionPoints input");var t=[],e=[],i=0,n=0,s=0,a={},o={};if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.EndPts)t.push(new Point$1(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y)),t.push(new Point$1(this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y));else if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.Total){e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(var r=1;r<e.length;r++)n=Math.abs(e[r-1].x-e[r].x),s=Math.abs(e[r-1].y-e[r].y),i+=Math.sqrt(n*n+s*s);var l={x:this.Frame.width/2,y:this.Frame.height/2};a.x=l.x-i/2,a.y=l.y,t.push(new Point$1(a.x,a.y)),o.x=l.x+i/2,o.y=l.y,t.push(new Point$1(o.x,o.y));var h=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(new Point$1(0,0),new Point$1(this.Frame.width,this.Frame.height));Utils3.RotatePointsAboutPoint(l,h,t)}else t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);return LogUtil.Debug("S.PolyLine: GetDimensionPoints output",t),t}AdjustDimensionLineDeflection(t,e,i,n,s){LogUtil.Debug("S.PolyLine: adjustDimensionLineDeflection input",t,e,i,n,s);const a=s.segmentIndex;this.polylist&&this.polylist.segs&&0!==this.polylist.segs.length&&a>=0&&a<this.polylist.segs.length&&(this.polylist.segs[a].dimDeflection=this.getDimensionLineDeflection(t,e,i,s),this.updateDimensionLines(t),this.Dimensions&NvConstant.DimensionFlags.Select&&this.hideOrShowSelectOnlyDimensions(!0)),LogUtil.Debug("S.PolyLine: adjustDimensionLineDeflection output",this.polylist)}GetDimensionDeflectionValue(t){if(LogUtil.Debug("S.PolyLine: GetDimensionDeflectionValue input",t),this.polylist&&this.polylist.segs&&this.polylist.segs.length>0&&t>=0&&t<this.polylist.segs.length){const e=this.polylist.segs[t].dimDeflection;return LogUtil.Debug("S.PolyLine: GetDimensionDeflectionValue output",e),e}return LogUtil.Debug("S.PolyLine: GetDimensionDeflectionValue output",null),null}GetDimensionFloatingPointValue(t){LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue input",t);let e=0,i={};if(!(this.rflags&NvConstant.FloatingPointDim.Width||this.rflags&NvConstant.FloatingPointDim.Height))return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",null),null;if(!this.GetPolyRectangularInfo(i))return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",null),null;if(i.wdDim===t||i.wdDim+2===t){if(this.rflags&NvConstant.FloatingPointDim.Width){e=this.GetDimensionLengthFromValue(this.rwd);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",t),t}}else if((i.htDim===t||i.htDim+2===t)&&this.rflags&NvConstant.FloatingPointDim.Height){e=this.GetDimensionLengthFromValue(this.rht);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",t),t}return LogUtil.Debug("S.PolyLine: GetDimensionFloatingPointValue output",null),null}UpdateDrawing(t){LogUtil.Debug("S.PolyLine: UpdateDrawing input",t),LogUtil.Debug("S.PolyLine: UpdateDrawing - Starting update of dimensions and lines");const e=t.GetElementById(OptConstant.SVGElementClass.Shape),i=t.GetElementById(OptConstant.SVGElementClass.Slop);this.CalcFrame();const n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),e.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(e,n),i.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(i,n);const s=t.GetElementById(OptConstant.SVGElementClass.Hatch);s&&(s.SetPoints(n),s.SetSize(this.Frame.width,this.Frame.height)),null!=this.polylist&&null!=this.polylist.segs&&this.polylist.segs.length>1&&this.UpdateDimensionLines(t),LogUtil.Debug("S.PolyLine: UpdateDrawing output",t)}ScaleEndPoints(){LogUtil.Debug("S.PolyLine: ScaleEndPoints input",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});let t=this.Frame.width/this.polylist.dim.x,e=this.Frame.height/this.polylist.dim.y;if(1===t&&1===e)return void LogUtil.Debug("S.PolyLine: ScaleEndPoints output - no scaling performed",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});let i=this.Frame.x+this.Frame.width/2,n=this.Frame.y+this.Frame.height/2,s=i-this.StartPoint.x;this.StartPoint.x=i-s*t;let a=n-this.StartPoint.y;this.StartPoint.y=n-a*e,s=i-this.EndPoint.x,this.EndPoint.x=i-s*t,a=n-this.EndPoint.y,this.EndPoint.y=n-a*e,LogUtil.Debug("S.PolyLine: ScaleEndPoints output",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateFrame(t){LogUtil.Debug("S.PolyLine: UpdateFrame input",t),super.UpdateFrame(t),this.polylist.closed&&this.StyleRecord&&this.StyleRecord.Line,LogUtil.Debug("S.PolyLine: UpdateFrame output",this.Frame)}CalcFrame(){let t;LogUtil.Debug("S.PolyLine: CalcFrame input");let e=[],i={};this.polylist&&(this.polylist.dim.x=0,this.polylist.dim.y=0,e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e&&e.length&&(Utils2.GetPolyRect(i,e),i.width<1&&(i.width=1),i.height<1&&(i.height=1),this.polylist.closed?(this.polylist.dim.x=i.width,this.polylist.dim.y=i.height,this.StyleRecord&&this.StyleRecord.Line&&(this.StyleRecord.Line.BThick||this instanceof Instance.Shape.PolyLineContainer)?(this.inside=Utils1.DeepCopy(i),this.Frame=Utils1.DeepCopy(i),t=this.StyleRecord.Line.Thickness,Utils2.InflateRect(this.inside,-t/2,-t/2)):(this.inside=Utils1.DeepCopy(i),this.Frame=Utils1.DeepCopy(i),this.StyleRecord&&this.StyleRecord.Line&&(t=this.StyleRecord.Line.Thickness))):this.Frame=Utils1.DeepCopy(i))),this.UpdateFrame(this.Frame),LogUtil.Debug("S.PolyLine: CalcFrame output",this.Frame)}GetSVGFrame(t){LogUtil.Debug("S.PolyLine:GetSVGFrame input:",t);let e={};return null==t&&(t=this.Frame),Utils2.CopyRect(e,t),LogUtil.Debug("S.PolyLine:GetSVGFrame output:",e),e}GetDimensions(){LogUtil.Debug("S.PolyLine: GetDimensions input - Frame:",this.Frame);const t={x:this.Frame.width,y:this.Frame.height};return LogUtil.Debug("S.PolyLine: GetDimensions output:",t),t}SetSize(t,e,i){LogUtil.Debug("S.PolyLine: SetSize input",{newWidth:t,newHeight:e,extraParam:i});let n=1,s=1,a=!1,o=!1,r=0,l=0;const h=this.polylist.segs.length,c={x:0,y:0};if(t&&!Utils2.IsEqual(this.Frame.width,0)&&(n=t/this.Frame.width),e&&!Utils2.IsEqual(this.Frame.height,0)&&(s=e/this.Frame.height),1!==n||1!==s)for(let u=0;u<h;u++)this.polylist.segs[u].pt.x*=n,this.polylist.segs[u].pt.y*=s;this.StartPoint.x<=this.EndPoint.x&&(a=!0),this.StartPoint.y<=this.EndPoint.y&&(o=!0),c.x=this.EndPoint.x,c.y=this.EndPoint.y,this.EndPoint.x=this.StartPoint.x+this.polylist.segs[h-1].pt.x,this.EndPoint.y=this.StartPoint.y+this.polylist.segs[h-1].pt.y,a||(r=c.x-this.EndPoint.x,r&&(this.StartPoint.x+=r,this.EndPoint.x+=r)),o||(l=c.y-this.EndPoint.y,l&&(this.StartPoint.y+=l,this.EndPoint.y+=l)),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),this.CalcFrame(),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("S.PolyLine: SetSize output",{frame:this.Frame,startPoint:this.StartPoint,endPoint:this.EndPoint})}UpdateDimensions(t,e,i){LogUtil.Debug("S.PolyLine: UpdateDimensions input",{svgDocument:t,xOffset:e,yOffset:i});const n=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),s=e?this.StartPoint.x+e:this.EndPoint.x,a=i?this.StartPoint.y+i:this.EndPoint.y;this.AdjustLineEnd(n,s,a,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("S.PolyLine: UpdateDimensions output",{newX:s,newY:a})}GetApparentAngle(t){LogUtil.Debug("S.PolyLine: GetApparentAngle input:",t);const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),i=this.PolyHitSeg(t);let n=0;return n=i<0?0:this.GetDrawNormalizedAngle(e[i-1],e[i]),LogUtil.Debug("S.PolyLine: GetApparentAngle output:",n),n}SnapPointToSegment(t,e){LogUtil.Debug("S.PolyLine: SnapPointToSegment input",{segmentIndex:t,pointToSnap:e});const i={},n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);let s=360-Utils1.CalcAngleFromPoints(n[t-1],n[t]);s>=360&&(s=0);const a=2*Math.PI*(s/360);Utils2.GetPolyRect(i,n),Utils3.RotatePointsAboutCenter(i,-a,n),Utils3.RotatePointsAboutCenter(i,-a,[e]),e.y=n[t].y,Utils3.RotatePointsAboutCenter(i,a,[e]),LogUtil.Debug("S.PolyLine: SnapPointToSegment output",{pointToSnap:e})}CalcTextPosition(t){LogUtil.Debug("S.PolyLine: CalcTextPosition input",{svgShape:t});let e,i,n=0,s=[],a={},o={},r={},l={},h={},c=[],u=0,d=Utils1.DeepCopy(this);d.BlockID=-1;const p=d.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,s),g={x:t.Frame.x+t.Frame.width/2,y:t.Frame.y+t.Frame.height/2};e=s.length;const f=(t,e,i)=>{let n,s,a=0;for(let o=e;o<i;o++)n=t[o-1].x-t[o].x,s=t[o-1].y-t[o].y,a+=Utils2.Sqrt(n*n+s*s);return a};let m=0;for(let v=0;v<e;v++){let e;if(0===v)a.x=p[0].x,a.y=p[0].y,e=0;else{if(s[v]===s[v-1])continue;a.x=p[s[v-1]].x,a.y=p[s[v-1]].y,e=s[v-1]}o.x=p[s[v]].x,o.y=p[s[v]].y;const d=s[v]+1;let b={};if(Utils2.GetPolyRect(b,p,e,d),n=f(p,e+1,d),0===b.width&&Utils2.InflateRect(b,5,0),0===b.height&&Utils2.InflateRect(b,0,5),r.x=g.x,r.y=b.y,l.x=b.x,l.y=g.y,Utils2.pointInRect(b,r)||Utils2.pointInRect(b,l)){let s=0;for(let n=e+1;n<d;n++){a.x=p[n-1].x,a.y=p[n-1].y,o.x=p[n].x,o.y=p[n].y;const e=a.x-o.x,r=a.y-o.y,l=Math.sqrt(e*e+r*r);h={x:(a.x+o.x)/2,y:(a.y+o.y)/2},c=[],c.push({...a});const u=Utils1.DeepCopy(g);c.push(u),c.push({...o});let d=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(a,o),f=d*(180/NvConstant.Geometry.PI)%180;Utils2.IsEqual(f,0)||0!==t.RotationAngle||(this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!0)),Utils3.RotatePointsAboutPoint(h,d,c);let v=c[1].y-c[0].y;(void 0===i||Math.abs(v)<Math.abs(i))&&(i=v,m=0+s+(c[1].x-a.x)),s+=l}u+=n}else u+=n}0===m&&(m=u/2),this.LineTextX=m/u,this.LineTextY=i,this.LineTextX&&(this.trect=Utils1.DeepCopy(t.trect)),LogUtil.Debug("S.PolyLine: CalcTextPosition output",{LineTextX:this.LineTextX,LineTextY:this.LineTextY,trect:this.trect})}GetTextOnLineParams(t){LogUtil.Debug("S.PolyLine: GetTextOnLineParams input:",{textPositionFactor:t});let e,i,n={Frame:new Instance.Shape.Rect,StartPoint:new Point$1,EndPoint:new Point$1},s=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),a=s.length;s[0].x<s[a-1].x?(e=0,i=a-2):(e=a-2,i=0);let o=Math.round((a-1.1)/2),r=.5,l=this.TextAlign;switch(this.LineTextX&&(r=this.LineTextX,l=TextConstant.TextAlign.Center),l){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:n.StartPoint.x=s[e].x,n.StartPoint.y=s[e].y,n.EndPoint.x=s[e+1].x,n.EndPoint.y=s[e+1].y;break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:n.StartPoint.x=s[i].x,n.StartPoint.y=s[i].y,n.EndPoint.x=s[i+1].x,n.EndPoint.y=s[i+1].y;break;default:o=function(t,e){let i=0,n=[];for(let r=1;r<a;r++){let t=s[r],e=s[r-1],a=t.x-e.x,o=t.y-e.y,l=Utils2.Sqrt(a*a+o*o);n.push(l),i+=l}let o=t*i;for(let s=0;s<a-1;s++){if(o<n[s])return e.CenterProp=o/n[s],s;o-=n[s]}return Math.round((a-1.1)/2)}(r,n),n.StartPoint.x=s[o].x,n.StartPoint.y=s[o].y,n.EndPoint.x=s[o+1].x,n.EndPoint.y=s[o+1].y}return n.Frame=Utils1.DeepCopy(this.Frame),LogUtil.Debug("S.PolyLine: GetTextOnLineParams output:",n),n}AddCorner(t,e){let i,n,s,a,o,r,l,h,c,u;LogUtil.Debug("S.PolyLine: AddCorner - input:",{svgElement:t,cornerPoint:e});let d=!1;const p=this.PolyHitSeg(e),g=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);let f=[];if(null==t&&(t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID)),null!=t&&void 0!==this.polylist.segs[p]){for(f=HookUtil.GetHookList(g,f,this.BlockID,this,NvConstant.ListCodes.MoveHook,{}),u=0;u<f.length;u++)T3Gv.stdObj.PreserveBlock(f[u]);if(this.polylist.segs[p].LineType===OptConstant.LineType.LINE&&this.SnapPointToSegment(p,e),a=p+1,this.polylist.closed||1===p&&(a=1,d=!0)||p===this.polylist.segs.length-1&&(d=!0)){const t=[],i={x:this.polylist.segs[p-1].pt.x,y:this.polylist.segs[p-1].pt.y};t.push(i);const n={x:this.polylist.segs[p].pt.x,y:this.polylist.segs[p].pt.y};t.push(n);const a={x:e.x-this.StartPoint.x,y:e.y-this.StartPoint.y};t.push(a),c=Utils1.CalcAngleFromPoints(t[0],t[1]);let r=360-c;if(r>=360&&(r-=360),o=2*Math.PI*(r/360),Utils3.RotatePointsAboutCenter(this.Frame,-o,t),s=new PolySeg(this.polylist.segs[p].LineType,e.x-this.StartPoint.x,e.y-this.StartPoint.y),this.polylist.segs.splice(p,0,s),1===p){t[0].x=t[2].x,t[0].y+=50,Utils3.RotatePointsAboutCenter(this.Frame,o,t);const e=t[0].x+this.StartPoint.x,i=t[0].y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,e,i,OptConstant.ActionTriggerType.LineStart)}else{t[1].x=t[2].x,t[1].y+=50,Utils3.RotatePointsAboutCenter(this.Frame,o,t);const e=t[1].x+this.StartPoint.x,i=t[1].y+this.StartPoint.y;this.AdjustLineEnd(null,e,i,OptConstant.ActionTriggerType.LineEnd)}}else{switch(s=new PolySeg(this.polylist.segs[p].LineType,e.x-this.StartPoint.x,e.y-this.StartPoint.y),this.polylist.segs.splice(p,0,s),d||(s=new PolySeg(this.polylist.segs[p].LineType,e.x-this.StartPoint.x,e.y-this.StartPoint.y),this.polylist.segs.splice(p,0,s)),r=Number(T3Gv.docUtil.rulerConfig.majorScale),T3Gv.docUtil.rulerConfig.units){case NvConstant.RulerUnit.Feet:l=Math.abs(r-this.polylist.segs.length),l%=r,l++,h=l.toString()+"'";break;case NvConstant.RulerUnit.Inches:l=Math.abs(r-this.polylist.segs.length),l%=r,l++,h=l.toString()+'"';break;default:l=Math.abs(r-this.polylist.segs.length),l%=r,l++,h=l.toString()}const i=this.Dimensions;this.UpdateDimensionFromText(t,h,{segment:a}),this.Dimensions=i}OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);const m=this.hooks.length;for(u=0;u<m;u++)OptCMUtil.SetLinkFlag(this.hooks[u].objid,DSConstant.LinkFlags.Move);if(T3Gv.opt.ActionTriggerData=p,this.Frame.x<0||this.Frame.y<0){const t=this.Frame;t.x<0&&(i=-t.x,t.x+=i),t.y<0&&(n=-t.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(n+=OptConstant.Common.DimDefaultStandoff),t.y+=n),this.StartPoint.x+=i,this.StartPoint.y+=n,this.EndPoint.x+=i,this.EndPoint.y+=n,T3Gv.opt.SetObjectFrame(this.BlockID,t)}if(this.UpdateDrawing(t),-1!=this.DataID){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.LMResizeSVGTextObject(t,this,this.Frame)}SvgUtil.ShowSVGSelectionState(t.GetID(),!0),DrawUtil.CompleteOperation()}LogUtil.Debug("S.PolyLine: AddCorner - output: Corner added successfully")}GetKnobSize(t){LogUtil.Debug("S.PolyLine: GetKnobSize input",t);const e=OptConstant.Common.KnobSize;return LogUtil.Debug("S.PolyLine: GetKnobSize output",e),e}GetCornerKnobImages(){LogUtil.Debug("S.PolyLine: GetCornerKnobImages input");return LogUtil.Debug("S.PolyLine: GetCornerKnobImages output",null),null}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.PolyLine: CreateActionTriggers input",{svgDocument:t,targetObject:e,additionalData:i,actionId:n}),this.NoRotate();let s=this.GetCornerKnobImages(),a=this.GetKnobSize(t);const o=OptConstant.Common.RKnobSize;let r=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(r*=2);let l=a/r,h=o/r,c=this.polylist&&this.polylist.segs?this.polylist.segs.length:0,u=t.CreateShape(OptConstant.CSType.Group),d=this.Frame,p=Utils1.DeepCopy(d);p.x-=l/2,p.y-=l/2,p.width+=l,p.height+=l;let g=ObjectUtil$1.GetObjectPtr(e,!1),f=d.width+l,m=d.height+l;Utils1.DeepCopy(d);let v={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:l,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};if(s&&(v.strokeSize=0,delete v.strokeColor,delete v.fillColor,v.shapeType=OptConstant.CSType.Image),e!==n&&(v.fillColor="white",v.fillOpacity=0,v.strokeSize=1,v.strokeColor="black"),this.flags&NvConstant.ObjFlags.Lock?(v.fillColor="gray",v.locked=!0):this.NoGrow()&&(v.fillColor="red",v.strokeColor="red",v.cursorType=CursorConstant.CursorType.Default),!this.polylist.closed){if(v.x=this.StartPoint.x-d.x,v.y=this.StartPoint.y-d.y,v.knobID=OptConstant.ActionTriggerType.LineStart,c>1&&(v.cursorType=this.CalcCursorForSegment(this.polylist.segs[0].pt,this.polylist.segs[1].pt,!1)),g&&g.hooks)for(let e=0;e<g.hooks.length;e++)if(g.hooks[e].hookpt===OptConstant.HookPts.KTL){v.shapeType=OptConstant.CSType.Oval;break}this.NoGrow()&&(v.cursorType=CursorConstant.CursorType.Default);let t=this.GenericKnob(v);s&&t&&t.SetURL&&t.SetURL(v.cursorType===CursorConstant.CursorType.NwseResize?s.nwse:s.nesw),u.AddElement(t)}if(v.shapeType=OptConstant.CSType.Rect,s&&(v.shapeType=OptConstant.CSType.Image),g&&g.hooks)for(let w=0;w<g.hooks.length;w++)if(g.hooks[w].hookpt===OptConstant.HookPts.KTR){v.shapeType=OptConstant.CSType.Oval;break}v.x=this.EndPoint.x-d.x,v.y=this.EndPoint.y-d.y,this.polylist.closed?(v.knobID=OptConstant.ActionTriggerType.PolyEnd,c>3?v.cursorType=this.CalcCursorForSegment(this.polylist.segs[1].pt,this.polylist.segs[c-2].pt,!0):c>1&&(v.cursorType=this.CalcCursorForSegment(this.polylist.segs[c-1].pt,this.polylist.segs[c-2].pt,!1))):(v.knobID=OptConstant.ActionTriggerType.LineEnd,c>1&&(v.cursorType=this.CalcCursorForSegment(this.polylist.segs[c-1].pt,this.polylist.segs[c-2].pt,!1))),this.NoGrow()&&(v.cursorType=CursorConstant.CursorType.Default);let b=this.GenericKnob(v);s&&b.SetURL&&(b.SetURL(v.cursorType===CursorConstant.CursorType.NwseResize?s.nwse:s.nesw),b.ExcludeFromExport(!0)),u.AddElement(b),v.shapeType=OptConstant.CSType.Rect,s&&(v.shapeType=OptConstant.CSType.Image);for(let w=1;w<c-1;w++){if(1===w)switch(this.polylist.segs[w].LineType){case OptConstant.LineType.QUADBEZ:case OptConstant.LineType.CUBEBEZ:case OptConstant.LineType.NURBS:case OptConstant.LineType.ELLIPSE:case OptConstant.LineType.SPLINE:continue}if(2===w)switch(this.polylist.segs[w].LineType){case OptConstant.LineType.NURBSSEG:case OptConstant.LineType.SPLINECON:continue}v.x=this.polylist.segs[w].pt.x+this.StartPoint.x-d.x,v.y=this.polylist.segs[w].pt.y+this.StartPoint.y-d.y,v.cursorType=this.CalcCursorForSegment(this.polylist.segs[w-1].pt,this.polylist.segs[w+1].pt,!0),this.NoGrow()&&(v.cursorType=CursorConstant.CursorType.Default),v.knobID=OptConstant.ActionTriggerType.PolyNode;let t=this.GenericKnob(v);t&&(t.SetUserData(w),s&&t.SetURL&&(t.SetURL(v.cursorType===CursorConstant.CursorType.NwseResize?s.nwse:s.nesw),t.ExcludeFromExport(!0)),u.AddElement(t))}let y={StartPoint:new Point$1(0,0),EndPoint:new Point$1(0,0)};y.StartPoint.x=0,y.StartPoint.y=0,y.EndPoint.x=0,y.EndPoint.y=0;let S=d.x,x=d.y;d&&this.StartPoint&&(S=this.StartPoint.x-d.x,x=this.StartPoint.y-d.y),v.shapeType=OptConstant.CSType.Oval,v.knobID=OptConstant.ActionTriggerType.PolyAdj,v.fillColor="white",v.fillOpacity=.001,v.strokeSize=1,v.strokeColor="green";for(let w=1;w<c;w++)if(this.polylist.segs[w].LineType===OptConstant.LineType.ARCLINE){y.StartPoint.x=1*this.polylist.segs[w-1].pt.x+S,y.StartPoint.y=1*this.polylist.segs[w-1].pt.y+x,y.EndPoint.x=1*this.polylist.segs[w].pt.x+S,y.EndPoint.y=1*this.polylist.segs[w].pt.y+x,this.polylist.segs[w].param>=0?(y.CurveAdjust=this.polylist.segs[w].param,y.IsReversed=!0):(y.CurveAdjust=-this.polylist.segs[w].param,y.IsReversed=!1),y.FromPolygon=!0;let t=new Instance.Shape.ArcLine(y);t.Frame=Utils2.Pt2Rect(y.StartPoint,y.EndPoint);let e=t.CalcRadiusAndCenter(t.StartPoint.x,t.StartPoint.y,t.EndPoint.x,t.EndPoint.y,t.CurveAdjust,t.IsReversed);v.x=e.actionX,v.y=e.actionY;let i=this.GenericKnob(v);i.SetUserData(w),u.AddElement(i)}else if(this.polylist.segs[w].LineType===OptConstant.LineType.PARABOLA){let t=this.PrPolyLGetParabolaAdjPoint(!0,w);if(t){v.x=t.x+this.StartPoint.x-d.x,v.y=t.y+this.StartPoint.y-d.y;let e=this.GenericKnob(v);e.SetUserData(w),u.AddElement(e)}}else if(this.polylist.segs[w].LineType===OptConstant.LineType.ARCSEGLINE){let t=this.PrPolyLGetEllipseAdjPoint(!0,w);v.x=t.x+this.StartPoint.x-d.x,v.y=t.y+this.StartPoint.y-d.y;let e=this.GenericKnob(v);e.SetUserData(w),u.AddElement(e)}if(!v.locked&&!this.NoGrow()){v.shapeType=OptConstant.CSType.Oval,d.width<d.height?(v.x=d.width/2,v.y=d.height-2*h):(v.y=d.height/2,v.x=d.width-2*h),this.RotateKnobPt.x=v.x+d.x,this.RotateKnobPt.y=v.y+d.y,v.cursorType=CursorConstant.CursorType.Rotate,v.knobID=OptConstant.ActionTriggerType.Rotate,v.fillColor="white",v.fillOpacity=.5,v.strokeSize=1.5,v.strokeColor="black",v.knobSize=h;let t=this.GenericKnob(v);u.AddElement(t),v.knobSize=l}return this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()&&this.CreateDimensionAdjustmentKnobs(u,i,v),u.SetSize(f,m),u.SetPos(p.x,p.y),u.isShape=!0,u.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.PolyLine: CreateActionTriggers output",u),u}ScaleObject(t,e,i,n,s,a,o){let r,l,h,c;LogUtil.Debug("S.PolyLine: ScaleObject input",{offsetX:t,offsetY:e,rotationCenter:i,rotationAngleDegrees:n,scaleX:s,scaleY:a,adjustLineThickness:o});let u={x:0,y:0},d={x:0,y:0},p={x:0,y:0},g=[];if(0===s){if(!(this.polylist.dim.x>0&&this.polylist.dim.y>0))return;s=this.inside.width/this.polylist.dim.x,a=this.inside.height/this.polylist.dim.y,this.StartPoint.x=this.Frame.x+this.polylist.offset.x,this.StartPoint.y=this.Frame.y+this.polylist.offset.y}if(this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),1!==s||1!==a){if(o){let t=s;a>t&&(t=a),this.StyleRecord.Line.Thickness=t*this.StyleRecord.Line.Thickness,this.StyleRecord.Line.BThick=t*this.StyleRecord.Line.BThick}for(u.x=this.StartPoint.x-this.Frame.x,u.y=this.StartPoint.y-this.Frame.y,d.x=u.x*s,d.y=u.y*a,l=this.polylist.segs.length,r=1;r<l;r++)switch(this.polylist.segs[r].LineType){case OptConstant.LineType.PARABOLA:0!==this.polylist.segs[r].param&&r>0&&(h=this.PrPolyLGetParabolaAdjPoint(!0,r),h?(h.x+=this.StartPoint.x,h.y+=this.StartPoint.y,g[r]=new Point$1(h.x,h.y)):(this.polylist.segs[r].param=0,this.polylist.segs[r].ShortRef=0));break;case OptConstant.LineType.ARCLINE:0!==this.polylist.segs[r].param&&r>0&&(c=this.PrPolyLGetArc(r,u),g[r]=c.pt)}for(this.StartPoint.x=this.StartPoint.x*s,this.StartPoint.y=this.StartPoint.y*a,this.EndPoint.x=this.EndPoint.x*s,this.EndPoint.y=this.EndPoint.y*a,r=0;r<l;r++)switch(this.polylist.segs[r].LineType){case OptConstant.LineType.PARABOLA:if(this.polylist.segs[r].pt.x*=s,this.polylist.segs[r].pt.y*=a,0!==this.polylist.segs[r].param&&r>0){let t={x:g[r].x*s,y:g[r].y*a};this.PrPolyLGetParabolaParam(t,r)}break;case OptConstant.LineType.ARCLINE:this.polylist.segs[r].pt.x*=s,this.polylist.segs[r].pt.y*=a,0!==this.polylist.segs[r].param&&r>0&&(c=this.PrPolyLGetArc(r,d),p.x=g[r].x*s,p.y=g[r].y*a,this.PrPolyLGetArcParam(c.arcobj,p,r));break;default:this.polylist.segs[r].pt.x*=s,this.polylist.segs[r].pt.y*=a}if(this instanceof BaseShape)return this.polylist.offset.x=d.x,this.polylist.offset.y=d.y,this.polylist.dim.x=this.inside.width,this.polylist.dim.y=this.inside.height,void LogUtil.Debug("S.PolyLine: ScaleObject output (BaseShape scaling applied)",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}else if(this instanceof BaseShape)return;let f=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);for(l=f.length,r=0;r<l;r++)f[r].x+=t,f[r].y+=e;if(n){let t=2*Math.PI*(n/360);Utils3.RotatePointsAboutPoint(i,2*Math.PI-t,f)}for(this.StartPoint.x=f[0].x,this.StartPoint.y=f[0].y,r=0;r<l;r++)this.polylist.segs[r].pt.x=f[r].x-this.StartPoint.x,this.polylist.segs[r].pt.y=f[r].y-this.StartPoint.y;this.EndPoint.x=f[l-1].x,this.EndPoint.y=f[l-1].y,this.CalcFrame(),LogUtil.Debug("S.PolyLine: ScaleObject output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}GetScale(){let t,e,i;LogUtil.Debug("S.PolyLine: GetScale input",{});let n={x:0,y:0};return this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y?(t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y,t<1&&(t=1),i=this.inside.width/t,this.inside.height):i=1,n.x=i,n.y=i,LogUtil.Debug("S.PolyLine: GetScale output",n),n}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.PolyLine: GetPolyPoints input",{pointCount:t,includeFrameOffset:e,includeAllSegments:i,includeClosedSegments:n,segmentIndices:s});let a=[],o=1,r=1,l=this.StartPoint.x-this.Frame.x,h=this.StartPoint.y-this.Frame.y;if(this.polylist&&this.polylist.segs.length){if(this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y){let t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y;t=t<1?1:t,o=this.inside.width/t,r=this.inside.height/e}const n=this.polylist.segs.length;if(i)for(let t=0;t<n;t++)a.push(new Point$1(this.polylist.segs[t].pt.x*o+l,this.polylist.segs[t].pt.y*r+h));else{a.push(new Point$1(this.polylist.segs[0].pt.x*o+l,this.polylist.segs[0].pt.y*r+h));for(let e=1;e<n;e++){switch(this.polylist.segs[e].LineType){case OptConstant.LineType.LINE:case OptConstant.LineType.MOVETO:case OptConstant.LineType.MOVETO_NEWPOLY:a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));break;case OptConstant.LineType.NURBS:if(e<n-1&&this.polylist.segs[e+1].LineType==OptConstant.LineType.NURBSSEG){let i=0;for(let t=e;t<n&&this.polylist.segs[t].LineType==OptConstant.LineType.NURBSSEG;t++){let e=this.polylist.segs[t].pt.x-this.polylist.segs[t-1].pt.x,n=this.polylist.segs[t].pt.y-this.polylist.segs[t-1].pt.y;i+=Math.sqrt(e*e+n*n)}const s=T3Gv.opt.svgDoc.docInfo.docScale;let c=Math.floor(i/8*s);c=c<t?t:c;const u=this.PrGetNURBSPoints(e,c,l,h,o,r);a=a.concat(u)}break;case OptConstant.LineType.QUADBEZ:const i=this.PrGetQuadraticBezierPoints(e,t,l,h,o,r);a=a.concat(i);break;case OptConstant.LineType.CUBEBEZ:const s=this.PrGetCubicBezierPoints(e,t,l,h,o,r);a=a.concat(s);break;case OptConstant.LineType.ELLIPSE:const c=this.PrGetEllipticalArcPoints(e,t,l,h,o,r);a=a.concat(c);break;case OptConstant.LineType.SPLINE:if(e<n-1&&this.polylist.segs[e+1].LineType==OptConstant.LineType.SPLINECON){let i=0;for(let t=e;t<n&&this.polylist.segs[t].LineType==OptConstant.LineType.SPLINECON;t++){let e=this.polylist.segs[t].pt.x-this.polylist.segs[t-1].pt.x,n=this.polylist.segs[t].pt.y-this.polylist.segs[t-1].pt.y;i+=Math.sqrt(e*e+n*n)}const s=T3Gv.opt.svgDoc.docInfo.docScale;let c=Math.floor(i/8*s);c=c<t?t:c;const u=this.PrGetSPLINEPoints(e,c,l,h,o,r);a=a.concat(u)}break;case OptConstant.LineType.PARABOLA:const u=this.PrGetParabolaPoints(t,!0,e,this.polylist.segs[e].param,this.polylist.segs[e].ShortRef,o,r);a=a.concat(u),a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));break;case OptConstant.LineType.ARCSEGLINE:const d=this.PrGetEllipsePoints(t,!0,e,this.polylist.segs[e].param,this.polylist.segs[e].ShortRef,o,r);a=a.concat(d),a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));break;case OptConstant.LineType.ARCLINE:if(0===this.polylist.segs[e].param)a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h));else{const t={StartPoint:new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y),EndPoint:new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y),CurveAdjust:Math.abs(this.polylist.segs[e].param),IsReversed:this.polylist.segs[e].param>=0,FromPolygon:!0},i=new Instance.Shape.ArcLine(t);i.Frame=Utils2.Pt2Rect(t.StartPoint,t.EndPoint);const n=i.GetPolyPoints(Math.ceil(OptConstant.Common.MaxPolyPoints/2),!1,!1,!1,null);for(let e=0;e<n.length;e++)n[e].x=n[e].x*o+l,n[e].y=n[e].y*r+h;a=a.concat(n),a.push(new Point$1(this.polylist.segs[e].pt.x*o+l,this.polylist.segs[e].pt.y*r+h))}}s&&s.push(a.length-1)}}if(!e)for(let t=0;t<a.length;t++)a[t].x+=this.Frame.x,a[t].y+=this.Frame.y}else a=super.GetPolyPoints(t,e,!0);return LogUtil.Debug("S.PolyLine: GetPolyPoints output",a),a}BeforeModifyShape(t,e,i){LogUtil.Debug("S.PolyLine: BeforeModifyShape input",{event:t,x:e,y:i});let n,s,a,o,r,l={};if(n=this.polylist&&this.polylist.segs?this.polylist.segs.length:0,0!==n){if(this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y){let t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y;t=t<1?1:t,s=this.Frame.width/t,a=this.Frame.height/e}else s=1,a=1;if(o=this.StartPoint.x,r=this.StartPoint.y,i>0&&i<=n-1)switch(this.polylist.segs[i].LineType){case OptConstant.LineType.PARABOLA:break;case OptConstant.LineType.ARCLINE:l.StartPoint=new Point$1(this.polylist.segs[i-1].pt.x*s+o,this.polylist.segs[i-1].pt.y*a+r),l.EndPoint=new Point$1(this.polylist.segs[i].pt.x*s+o,this.polylist.segs[i].pt.y*a+r);let n=this.polylist.segs[i].param;n>=0?(l.CurveAdjust=n,l.IsReversed=!0):(l.CurveAdjust=-n,l.IsReversed=!1),l.FromPolygon=!0,this.arcobj=new Instance.Shape.ArcLine(l),this.arcobj.Frame=Utils2.Pt2Rect(l.StartPoint,l.EndPoint),this.arcobj.BeforeModifyShape(t,e,i)}}LogUtil.Debug("S.PolyLine: BeforeModifyShape output",{arcParams:l})}SnapNewPointTo90Degrees(t,e){LogUtil.Debug("S.PolyLine: SnapNewPointTo90Degrees input",{segmentIndex:t,newPoint:e});let i=-1,n=-1,s=!1;if(!window.event||!window.event.ctrlKey){const a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);t-1>=0?i=t-1:this.polylist.closed&&this.polylist.segs.length>2&&(i=this.polylist.segs.length-2),i>=0&&this.AdjustForLineAngleSnap(a[i],e)&&(s=!0),n=t+1,n>=this.polylist.segs.length&&(n=this.polylist.closed?1:-1),n>=0&&this.AdjustForLineAngleSnap(a[n],e)&&(s=!0)}return LogUtil.Debug("S.PolyLine: SnapNewPointTo90Degrees output",s),s}ModifyShape(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: ModifyShape input",{event:t,x:e,y:i,actionType:n,segmentIndex:s,snapToGrid:a});let o=this.polylist&&this.polylist.segs?this.polylist.segs.length:0,r={},l=null;if(0!==o){if(n===OptConstant.ActionTriggerType.PolyNode)s>=1&&s<o&&(l=new Point$1(e,i),!a&&this.SnapNewPointTo90Degrees(s,l)&&(e=l.x,i=l.y),this.polylist.segs[s].pt.x=e-this.StartPoint.x,this.polylist.segs[s].pt.y=i-this.StartPoint.y,this.polylist.segs[s].LineType===OptConstant.LineType.ARCSEGLINE&&(r=this.PrPolyLGetArcQuadrant(this.polylist.segs[s-1].pt,this.polylist.segs[s].pt,this.polylist.segs[s].param),this.polylist.segs[s].ShortRef=r.ShortRef),s<o-1&&this.polylist.segs[s+1].LineType===OptConstant.LineType.ARCSEGLINE&&(r=this.PrPolyLGetArcQuadrant(this.polylist.segs[s].pt,this.polylist.segs[s+1].pt,this.polylist.segs[s+1].param),this.polylist.segs[s+1].ShortRef=r.ShortRef));else if(n===OptConstant.ActionTriggerType.PolyAdj&&s>0&&s<=o-1)switch(this.polylist.segs[s].LineType){case OptConstant.LineType.PARABOLA:r.x=e,r.y=i,this.PrPolyLGetParabolaParam(r,s);break;case OptConstant.LineType.ARCSEGLINE:r.x=e,r.y=i,this.PrPolyLGetEllipseParam(r,s,t);break;case OptConstant.LineType.ARCLINE:this.arcobj&&(this.arcobj.ModifyShape(null,e,i,n,s),this.polylist.segs[s].param=this.arcobj.IsReversed?this.arcobj.CurveAdjust:-this.arcobj.CurveAdjust)}const h={x:e,y:i},c=this.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(c,h,CursorConstant.CursorTypes.Grow,this),this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)}LogUtil.Debug("S.PolyLine: ModifyShape output",{polylist:this.polylist,Frame:this.Frame})}BeforeRotate(t){LogUtil.Debug("S.PolyLine: BeforeRotate input",t);const e=this.Frame;T3Gv.opt.rotateKnobCenterDivisor=this.RotateKnobCenterDivisor(),T3Gv.opt.rotateStartRotation=0,T3Gv.opt.rotateEndRotation=T3Gv.opt.rotateStartRotation,T3Gv.opt.rotateStartPoint.x=this.RotateKnobPt.x,T3Gv.opt.rotateStartPoint.y=this.RotateKnobPt.y,T3Gv.opt.rotatePivotX=e.x+e.width/T3Gv.opt.rotateKnobCenterDivisor.x,T3Gv.opt.rotatePivotY=e.y+e.height/T3Gv.opt.rotateKnobCenterDivisor.y,LogUtil.Debug("S.PolyLine: BeforeRotate output",{rotateKnobCenterDivisor:T3Gv.opt.rotateKnobCenterDivisor,rotateStartRotation:T3Gv.opt.rotateStartRotation,rotateEndRotation:T3Gv.opt.rotateEndRotation,rotateStartPoint:T3Gv.opt.rotateStartPoint,rotatePivotX:T3Gv.opt.rotatePivotX,rotatePivotY:T3Gv.opt.rotatePivotY})}AdjustRotate(t,e,i){let n;LogUtil.Debug("S.PolyLine: AdjustRotate input",{mouseX:t,mouseY:e,event:i});const s=T3Gv.opt.rotatePivotX,a=T3Gv.opt.rotatePivotY,o=T3Gv.opt.rotateStartPoint.x,r=T3Gv.opt.rotateStartPoint.y;let l=t-s,h=e-a;if(o===s)Math.abs(h)<1e-4&&(h=1e-4),n=180*-Math.atan(l/h)/NvConstant.Geometry.PI,h<0&&(n+=180);else{if(r!==a)return;Math.abs(l)<1e-4&&(l=1e-4),n=180*Math.atan(h/l)/NvConstant.Geometry.PI,l<0&&(n+=180)}const c=T3Gv.opt.OverrideSnaps(i);T3Gv.docUtil.docConfig.enableSnap&&!c&&(n=Math.round(n/T3Gv.opt.rotateSnap)*T3Gv.opt.rotateSnap),n<0&&(n+=360);const u=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils3.RotatePointsAboutCenter(this.Frame,n/360*(2*Math.PI),u);const d={};if(Utils2.GetPolyRect(d,u),d.x>=0&&d.y>=0){if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(d.x+d.width>t.dim.x||d.y+d.height>t.dim.y)return}T3Gv.opt.rotateEndRotation=n,this.Rotate(T3Gv.opt.actionSvgObject,n)}LogUtil.Debug("S.PolyLine: AdjustRotate output",{rotationAngle:n})}Rotate(t,e){LogUtil.Debug("S.PolyLine: Rotate input",{svgElement:t,rotationAngle:e}),t.SetRotation(e,T3Gv.opt.rotatePivotX,T3Gv.opt.rotatePivotY),LogUtil.Debug("S.PolyLine: Rotate output",{svgElement:t,rotationAngle:e})}AfterRotateShape(t,e){LogUtil.Debug("S.PolyLine: AfterRotateShape input",{event:t,actionType:e});const i=T3Gv.opt.rotateEndRotation,n={x:T3Gv.opt.rotatePivotX,y:T3Gv.opt.rotatePivotY},s=-(i-T3Gv.opt.rotateStartRotation)/(180/NvConstant.Geometry.PI);T3Gv.opt.RotatePointAroundPoint(n,T3Gv.opt.rotateStartPoint,s);const a=this.polylist.segs.length;for(let l=0;l<a;++l)this.polylist.segs[l].LineType===OptConstant.LineType.ELLIPSE&&(this.polylist.segs[l].weight+=10*i);const o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils3.RotatePointsAboutPoint(n,s,o);const r=o.length;this.StartPoint.x=o[0].x,this.StartPoint.y=o[0].y;for(let l=0;l<r;l++)this.polylist.segs[l].pt.x=o[l].x-this.StartPoint.x,this.polylist.segs[l].pt.y=o[l].y-this.StartPoint.y;if(this.EndPoint.x=o[r-1].x,this.EndPoint.y=o[r-1].y,e!==OptConstant.ActionTriggerType.MovePolySeg){if(this.CalcFrame(),ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects(),this.UpdateFrame(),this.r.x<0||this.r.y<0)return void ToolActUtil.Undo();T3Gv.opt.ob&&T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(t,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),T3Gv.opt.ob={}),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),ObjectUtil$1.AddToDirtyList(t)}LogUtil.Debug("S.PolyLine: AfterRotateShape output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}IsAdjustingToClosed(t,e){LogUtil.Debug("S.PolyLine: isAdjustingToClosed input",{x:t,y:e});const i=new HitResult(-1,0,null),n={id:T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart?OptConstant.HookPts.KTL:OptConstant.HookPts.KTR,x:t,y:e},s=this.ClosePolygon(this.BlockID,[n],i);return LogUtil.Debug("S.PolyLine: isAdjustingToClosed output",s),s}AdjustLine(t,e,i,n,s){LogUtil.Debug("S.PolyLine: AdjustLine input",{event:t,newX:e,newY:i,actionType:n,snapToGrid:s});let a=this.polylist.segs.length,o={},r=new Point$1(e,i);switch(this.polylist.closed&&n===OptConstant.ActionTriggerType.PolyEnd&&(n=OptConstant.ActionTriggerType.LineStart),n){case OptConstant.ActionTriggerType.LineEnd:!s&&this.SnapNewPointTo90Degrees(a-1,r)&&(e=r.x,i=r.y),this.polylist.segs[a-1].pt.x=e-this.StartPoint.x,this.polylist.segs[a-1].pt.y=i-this.StartPoint.y,this.EndPoint.x=e,this.EndPoint.y=i,this.polylist.segs[a-1].LineType===OptConstant.LineType.ARCSEGLINE&&(o=this.PrPolyLGetArcQuadrant(this.polylist.segs[a-2].pt,this.polylist.segs[a-1].pt,this.polylist.segs[a-1].param),this.polylist.segs[a-1].ShortRef=o.ShortRef);break;case OptConstant.ActionTriggerType.LineStart:!s&&this.SnapNewPointTo90Degrees(0,r)&&(e=r.x,i=r.y);let t=e-this.StartPoint.x,n=i-this.StartPoint.y;this.StartPoint.x=e,this.StartPoint.y=i;for(let e=1;e<a;e++)this.polylist.segs[e].pt.x-=t,this.polylist.segs[e].pt.y-=n;switch(this.polylist.closed&&(this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y,this.polylist.segs[a-1].pt.x=0,this.polylist.segs[a-1].pt.y=0),this.polylist.segs[1].LineType){case OptConstant.LineType.ARCSEGLINE:o=this.PrPolyLGetArcQuadrant(this.polylist.segs[0].pt,this.polylist.segs[1].pt,this.polylist.segs[1].param),this.polylist.segs[1].ShortRef=o.ShortRef;break;case OptConstant.LineType.QUADBEZ:case OptConstant.LineType.CUBEBEZ:case OptConstant.LineType.ELLIPSE:this.polylist.segs[1].pt.x=this.polylist.segs[0].pt.x,this.polylist.segs[1].pt.y=this.polylist.segs[0].pt.y;break;case OptConstant.LineType.NURBS:case OptConstant.LineType.SPLINE:this.polylist.segs[1].pt.x=this.polylist.segs[0].pt.x,this.polylist.segs[1].pt.y=this.polylist.segs[0].pt.y,this.polylist.segs[2].pt.x=this.polylist.segs[0].pt.x,this.polylist.segs[2].pt.y=this.polylist.segs[0].pt.y}}t?(this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)):this.CalcFrame();const l=this.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(l,r,CursorConstant.CursorTypes.Grow,this),LogUtil.Debug("S.PolyLine: AdjustLine output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,Frame:this.Frame})}AdjustLineEnd(t,e,i,n,s){if(LogUtil.Debug("S.PolyLine: AdjustLineEnd input",{event:t,newX:e,newY:i,actionType:n,snapToGrid:s}),2===this.polylist.segs.length){const t={x:this.EndPoint.x,y:this.EndPoint.y};this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1),e=this.EndPoint.x,i=this.EndPoint.y,this.EndPoint.x=t.x,this.EndPoint.y=t.y}this.AdjustLine(t,e,i,n,s),LogUtil.Debug("S.PolyLine: AdjustLineEnd output",{EndPoint:this.EndPoint})}AdjustLineStart(t,e,i,n,s){if(LogUtil.Debug("S.PolyLine: AdjustLineStart input",{event:t,newX:e,newY:i,actionType:n,snapToGrid:s}),2===this.polylist.segs.length){const t={x:this.StartPoint.x,y:this.StartPoint.y};this.StartPoint.x=e,this.StartPoint.y=i,this.EnforceMinimum(!0),e=this.StartPoint.x,i=this.StartPoint.y,this.StartPoint.x=t.x,this.StartPoint.y=t.y}this.AdjustLine(t,e,i,OptConstant.ActionTriggerType.LineStart,s),LogUtil.Debug("S.PolyLine: AdjustLineStart output",{StartPoint:this.StartPoint})}Flip(t,e){LogUtil.Debug("S.PolyLine: Flip input",{flags:t,isTemporary:e});let i,n,s,a,o=!1;const r=[],l=[],h={};if(e||(T3Gv.opt.ob=Utils1.DeepCopy(this)),i=this.polylist.segs.length,n=this.Frame,this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y?(s=this.polylist.dim.x,a=this.polylist.dim.y,this instanceof Instance.Shape.Polygon&&(this.StartPoint.x=this.Frame.x+this.polylist.offset.x,this.StartPoint.y=this.Frame.y+this.polylist.offset.y)):(s=n.width,a=n.height),t&OptConstant.ExtraFlags.FlipVert){o=!0;const t=this.StartPoint.y-n.y;for(let s=0;s<i;s++)r.push(new Point$1(this.polylist.segs[s].pt.x,this.polylist.segs[s].pt.y+t)),this.polylist.segs[s].LineType===OptConstant.LineType.PARABOLA&&(l[s]=this.PrPolyLGetParabolaAdjPoint(!1,s),l[s].y-=n.y);for(let s=0;s<i;s++)r[s].y=a-r[s].y,l[s]&&(l[s].y=a-l[s].y,l[s].y+=n.y);const e=r[0].y;for(let n=0;n<i;n++)this.polylist.segs[n].pt.y=r[n].y-e;this.StartPoint.y=r[0].y+this.Frame.y,this.EndPoint.y=r[i-1].y+this.Frame.y}if(t&OptConstant.ExtraFlags.FlipHoriz){o=!0;const t=this.StartPoint.x-n.x;for(let s=0;s<i;s++)r.push(new Point$1(this.polylist.segs[s].pt.x+t,this.polylist.segs[s].pt.y)),this.polylist.segs[s].LineType===OptConstant.LineType.PARABOLA&&s>0&&(l[s]=this.PrPolyLGetParabolaAdjPoint(!1,s),l[s].x-=n.x);for(let a=0;a<i;a++)r[a].x=s-r[a].x,l[a]&&(l[a].x=s-l[a].x,l[a].x+=n.x);const e=r[0].x;for(let n=0;n<i;n++)this.polylist.segs[n].pt.x=r[n].x-e;this.StartPoint.x=r[0].x+this.Frame.x,this.EndPoint.x=r[i-1].x+this.Frame.x}if(o){for(let t=0;t<i;t++)switch(this.polylist.segs[t].LineType){case OptConstant.LineType.ARCLINE:this.polylist.segs[t].param=-this.polylist.segs[t].param;break;case OptConstant.LineType.ARCSEGLINE:const e=this.PrPolyLGetArcQuadrant(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt,this.polylist.segs[t].param);this.polylist.segs[t].ShortRef=e.ShortRef;break;case OptConstant.LineType.PARABOLA:l[t]&&(h.x=l[t].x,h.y=l[t].y,this.PrPolyLGetParabolaParam(h,t));break;case OptConstant.LineType.ELLIPSE:let i=this.polylist.segs[t].weight;i=3600-i,this.polylist.segs[t].weight=i}e||(T3Gv.opt.ob&&T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Flip),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)),this.polylist.closed&&(this.polylist.offset.x=this.StartPoint.x-this.Frame.x,this.polylist.offset.y=this.StartPoint.y-this.Frame.y)}T3Gv.opt.ob={},LogUtil.Debug("S.PolyLine: Flip output",this)}LinkGrow(t,e,i){switch(LogUtil.Debug("S.PolyLine: LinkGrow input",{blockID:t,hookPoint:e,newPoint:i}),e){case OptConstant.HookPts.KTL:this.AdjustLineStart(null,i.x,i.y);break;case OptConstant.HookPts.KTR:this.AdjustLineEnd(null,i.x,i.y,OptConstant.ActionTriggerType.LineEnd)}OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("S.PolyLine: LinkGrow output",{blockID:t,hookPoint:e,newPoint:i})}ClosePolygon(t,e,i){if(LogUtil.Debug("S.PolyLine: ClosePolygon input",{blockID:t,hookPoints:e,hitResult:i}),e&&e.length&&this.polylist&&this.polylist.segs.length>3&&!this.polylist.closed&&(this.Hit(e[0],!1,!0,i,e[0].id),i.hitcode===NvConstant.HitCodes.PLApp)){if(e[0].id===OptConstant.HookPts.KTL&&i.segment===OptConstant.HookPts.KTR)return i.objectid=t,i.pt.x=this.polylist.segs[this.polylist.segs.length-1].pt.x+this.StartPoint.x,i.pt.y=this.polylist.segs[this.polylist.segs.length-1].pt.y+this.StartPoint.y,LogUtil.Debug("S.PolyLine: ClosePolygon output",!0),!0;if(e[0].id===OptConstant.HookPts.KTR&&i.segment===OptConstant.HookPts.KTL)return i.objectid=t,i.pt.x=this.polylist.segs[0].pt.x+this.StartPoint.x,i.pt.y=this.polylist.segs[0].pt.y+this.StartPoint.y,LogUtil.Debug("S.PolyLine: ClosePolygon output",!0),!0}return LogUtil.Debug("S.PolyLine: ClosePolygon output",!1),!1}PolyGetTargetPointList(t){LogUtil.Debug("S.PolyLine: PolyGetTargetPointList input",{hookFlags:t});let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!0,null),i=[],n=0;if(this.polylist&&this.polylist.closed&&this.StyleRecord.Line.BThick&&!(t&NvConstant.HookFlags.LcShapeOnLine)){let t=T3Gv.opt.InflateLine(e,this.StyleRecord.Line.BThick,!0,!0),n=T3Gv.opt.InflateLine(e,this.StyleRecord.Line.BThick,!0,!1);i=t.concat(n),e=e.concat(i)}else 0!==this.RotationAngle&&(n=-this.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,n,e));return LogUtil.Debug("S.PolyLine: PolyGetTargetPointList output",e),e}GetTargetPoints(t,e,i){LogUtil.Debug("S.PolyLine: GetTargetPoints input",{hookPoint:t,hookFlags:e,targetObjectID:i});const n=OptConstant.HookPts;if(null!=i&&i>=0&&ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case n.KTC:case n.KBC:case n.KRC:case n.KLC:return LogUtil.Debug("S.PolyLine: GetTargetPoints output",null),null}const s=this.BaseShapePolyGetTargets(t,e,this.Frame);return LogUtil.Debug("S.PolyLine: GetTargetPoints output",s),s}BaseShapePolyGetTargets(t,e,i){LogUtil.Debug("S.PolyLine: BaseShapePolyGetTargets input",{hookPoint:t,hookFlags:e,targetFrame:i});let n=-1,s=OptConstant.Common.LongIntMax,a={x:0,y:0};const o=this.PolyGetTargetPointList(e);if(!t)return null;let r={x:t.x,y:t.y};const l=T3Gv.docUtil.docConfig.enableSnap&&!(e&NvConstant.HookFlags.LcNoSnaps);l&&(r=T3Gv.docUtil.SnapToGrid(r),r.y=Math.max(i.y,Math.min(r.y,i.y+i.height)),r.x=Math.max(i.x,Math.min(r.x,i.x+i.width)));for(let h=1;h<o.length;h++){const e=o[h-1],i=o[h];if(Utils2.EqualPt(e,i))continue;let c,u={x:t.x,y:t.y};if(Math.abs((i.y-e.y)/(i.x-e.x))>1){l&&(u.y=r.y);const t=(i.x-e.x)/(i.y-e.y)*(u.y-e.y)+e.x;if(c=Math.abs(t-u.x),u.x=t,t<Math.min(e.x,i.x)||t>Math.max(e.x,i.x))c=OptConstant.Common.LongIntMax;else{const t=Utils2.Pt2Rect(e,i);Utils2.InflateRect(t,1,1),Utils2.pointInRect(t,u)||(c=OptConstant.Common.LongIntMax)}}else{l&&(u.x=r.x);const t=(i.y-e.y)/(i.x-e.x)*(u.x-e.x)+e.y;if(c=Math.abs(t-u.y),u.y=t,t<Math.min(e.y,i.y)||t>Math.max(e.y,i.y))c=OptConstant.Common.LongIntMax;else{const t=Utils2.Pt2Rect(e,i);Utils2.InflateRect(t,1,1),Utils2.pointInRect(t,u)||(c=OptConstant.Common.LongIntMax)}}c<s&&(n=h,s=c,a={x:u.x,y:u.y})}if(n>=0){const t=[{x:a.x,y:a.y}];if(0!==this.RotationAngle){const e=this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(i,e,t)}const e=i.width,n=i.height,s=0===e?0:(t[0].x-i.x)/e,o=0===n?0:(t[0].y-i.y)/n,r=[new Point$1(s*OptConstant.Common.DimMax,o*OptConstant.Common.DimMax)];return LogUtil.Debug("S.PolyLine: BaseShapePolyGetTargets output",r),r}return LogUtil.Debug("S.PolyLine: BaseShapePolyGetTargets output",null),null}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: GetPerimeterPoints input",{event:t,hookPoints:e,hookPointID:i,rotationAngle:n,scaleFactor:s,targetObjectID:a});let o=[],r=this.Frame;if(e&&2===e.length&&e[0].id===OptConstant.HookPts.KTL&&e[1].id===OptConstant.HookPts.KTR)return o.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),o[0].id=e[0].id,o.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),o[1].id=e[1].id,LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o;let l=ObjectUtil$1.GetObjectPtr(a,!1);if(l&&l.objecttype===NvConstant.FNObjectTypes.Multiplicity&&e){let r,l=this.GetPolyPoints(1,!1,!0,!1,null),h={},c=l.length;return 0===e[0].x?(h.StartPoint=l[0],h.EndPoint=l[1],h.LineType=OptConstant.LineType.LINE,r=new BaseLine(h),r.StartPoint=h.StartPoint,r.EndPoint=h.EndPoint,r.Frame=Utils2.Pt2Rect(h.StartPoint,h.EndPoint),o=super.GetPerimeterPoints(t,e,i,n,s,a)):(h.StartPoint=l[c-2],h.EndPoint=l[c-1],h.LineType=OptConstant.LineType.LINE,r=new BaseLine(h),r.StartPoint=h.StartPoint,r.EndPoint=h.EndPoint,r.Frame=Utils2.Pt2Rect(h.StartPoint,h.EndPoint),o=super.GetPerimeterPoints(t,e,i,n,s,a)),LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o}if(l&&l.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===e.length)return o=super.GetPerimeterPoints(t,e,i,n,s,a),LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o;if(i>=OptConstant.HookPts.KCTL&&i<=OptConstant.HookPts.KCC){if(0===e[0].x)return o[0]={x:this.StartPoint.x,y:this.StartPoint.y,id:e[0].id||0},LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o;if(e[0].x===OptConstant.Common.DimMax)return o[0]={x:this.EndPoint.x,y:this.EndPoint.y,id:e[0].id||0},LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o}for(let h=0;h<e.length;h++){o[h]={x:0,y:0,id:0};let t=r.width,i=r.height;o[h].x=e[h].x/OptConstant.Common.DimMax*t+r.x,o[h].y=e[h].y/OptConstant.Common.DimMax*i+r.y,null!=e[h].id&&(o[h].id=e[h].id)}return LogUtil.Debug("S.PolyLine: GetPerimeterPoints output",o),o}HookToPoint(t,e){let i;LogUtil.Debug("S.PolyLine: HookToPoint input",{hookPoint:t,rect:e});const n={x:0,y:0},s={x:0,y:0};if(t===OptConstant.HookPts.KTL){if(n.x=this.StartPoint.x,n.y=this.StartPoint.y,s.x=this.StartPoint.x+this.polylist.segs[1].pt.x,s.y=this.StartPoint.y+this.polylist.segs[1].pt.y,e){const t=Utils2.Pt2Rect(this.StartPoint,s);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}}else if(n.x=this.EndPoint.x,n.y=this.EndPoint.y,i=this.polylist.segs.length,s.x=this.StartPoint.x+this.polylist.segs[i-2].pt.x,s.y=this.StartPoint.y+this.polylist.segs[i-2].pt.y,e){const t=Utils2.Pt2Rect(this.EndPoint,s);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}return LogUtil.Debug("S.PolyLine: HookToPoint output",n),n}GetSegmentLineFace(t,e,i){LogUtil.Debug("S.PolyLine: GetSegmentLineFace input",{event:t,targetPoint:e,anchorPoint:i});let n=0;const s={x:i.x,y:i.y},a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),o={};if(Utils3.LineDStyleHit(a,s,this.StyleRecord.Line.Thickness,0,o)&&o.lpHit>=0){const t=Utils2.Pt2Rect(a[o.lpHit],a[o.lpHit+1]);n=t.width>=t.height?e.y>=i.y?OptConstant.HookPts.KBC:OptConstant.HookPts.KTC:e.x>=i.x?OptConstant.HookPts.KRC:OptConstant.HookPts.KLC}return LogUtil.Debug("S.PolyLine: GetSegmentLineFace output",n),n}PolyHitSeg(t){LogUtil.Debug("S.PolyLine: PolyHitSeg input",{point:t});let e=[],i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,e),n={},s={x:t.x,y:t.y};if(Utils3.LineDStyleHit(i,s,this.StyleRecord.Line.Thickness,0,n)&&n.lpHit>=0){let t=e.length;for(let s=0;s<t;s++)if(n.lpHit<e[s]){n.lpHit=s;break}const i=n.lpHit+1;return LogUtil.Debug("S.PolyLine: PolyHitSeg output",i),i}return LogUtil.Debug("S.PolyLine: PolyHitSeg output",-1),-1}MaintainPoint(t,e,i,n,s){LogUtil.Debug("S.PolyLine: MaintainPoint input",{point:t,targetID:e,targetObject:i,drawingObject:n,actionType:s});let a,o,r,l={},h={},c=[],u={};if(n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line)switch(n.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:for(a=-1,o=0;o<n.hooks.length;o++)if(n.hooks[o].objid===e){n.HookToPoint(n.hooks[o].hookpt,l),a=0;break}if(0!==a)return!0;h=Utils1.DeepCopy(n),Utils2.CopyRect(h.Frame,l),h.StartPoint.x=l.x,h.StartPoint.y=l.y,h.EndPoint.x=l.x+l.width,h.EndPoint.y=l.y+l.height,n=h}let d=i.PolyHitSeg(t);if(i.polylist.segs.length!==this.polylist.segs.length||s===OptConstant.ActionTriggerType.Flip?(a=this.PolyHitSeg(t),a<0&&(a=i.PolyHitSeg(t)),a>=this.polylist.segs.length&&(a=this.polylist.segs.length-1)):a=d,r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),this.polylist&&this.polylist.closed&&this.StyleRecord.Line.BThick&&n instanceof BaseLine){let e={},n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),s=Utils3.LineDStyleHit(n,{x:t.x,y:t.y},2,-12,e);if(!s||e.lpHit<0){let a=T3Gv.opt.InflateLine(n,i.StyleRecord.Line.BThick,!0,!1);if(s=Utils3.LineDStyleHit(a,{x:t.x,y:t.y},2,-12,e),s&&e.lpHit>=0)r=T3Gv.opt.InflateLine(r,this.StyleRecord.Line.BThick,!0,!1);else{let a=T3Gv.opt.InflateLine(n,i.StyleRecord.Line.BThick,!0,!0);s=Utils3.LineDStyleHit(a,{x:t.x,y:t.y},2,-12,e),s&&e.lpHit>=0&&(r=T3Gv.opt.InflateLine(r,this.StyleRecord.Line.BThick,!0,!0))}}}if(a>=0&&d>=0){if(l=Utils2.Pt2Rect(r[a],r[a-1]),h=Utils1.DeepCopy(this),Utils2.CopyRect(h.Frame,l),h.StartPoint.x=r[a-1].x,h.StartPoint.y=r[a-1].y,h.EndPoint.x=r[a].x,h.EndPoint.y=r[a].y,c=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),u=Utils1.DeepCopy(i),l=Utils2.Pt2Rect(c[d],c[d-1]),Utils2.CopyRect(u.Frame,l),u.StartPoint.x=c[d-1].x,u.StartPoint.y=c[d-1].y,u.EndPoint.x=c[d].x,u.EndPoint.y=c[d].y,n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)return T3Gv.opt.LineCheckPoint(h,t)||PolyUtil.LinesMaintainDist(h,u,s,t),!0;switch(s){case OptConstant.ActionTriggerType.PolyNode:s=T3Gv.opt.actionTriggerData!==a-1&&T3Gv.opt.actionTriggerData!==a||h.StartPoint.x!==r[T3Gv.opt.actionTriggerData].x||h.StartPoint.y!==r[T3Gv.opt.actionTriggerData].y?OptConstant.ActionTriggerType.LineEnd:OptConstant.ActionTriggerType.LineStart;break;case OptConstant.ActionTriggerType.Rotate:return PolyUtil.LinesMaintainDist(h,u,s,t),!0;default:s=OptConstant.ActionTriggerType.LineEnd}return!!T3Gv.opt.LineCheckPoint(h,t)||(i.polylist.segs.length===this.polylist.segs.length?(T3Gv.opt.LinesMaintainDistWithinSegment(this,i,a,t),!0):(T3Gv.opt.LinesIntersect(h,n,t)||PolyUtil.LinesMaintainDist(h,u,s,t),!0))}return LogUtil.Debug("S.PolyLine: MaintainPoint output",!0),!0}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: ChangeTarget input",{objectHookID:t,objectTargetID:e,paramA:i,paramR:n,paramI:s,paramN:a});let o=0,r=null;const l={};let h=null,c=0;if(r=ObjectUtil$1.GetObjectPtr(e,!1),this.TextFlags&NvConstant.TextFlags.HorizText&&r instanceof BaseShape){for(c=0;c<r.hooks.length;c++)if(r.hooks[c].objid===t){h=r.HookToPoint(r.hooks[c].hookpt,l);break}if(null!=h&&this.PolyHitSeg(h)>=0){o=this.GetApparentAngle(h),o=Math.abs(o)%180;const t=Math.abs(r.RotationAngle%180);Math.abs(t-o)>2&&Math.abs(t-(o-180))>2&&(r.RotationAngle=o,OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),ObjectUtil$1.AddToDirtyList(e))}}ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.PolyLine: ChangeTarget output",{angle:o,hookedPoint:h,loopIndex:c})}LMDrawPreTrack(t){return LogUtil.Debug("S.PolyLine: LMDrawPreTrack input",{event:t}),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.JoinIndex>=0)?(this.LMDrawRelease(),LogUtil.Debug("S.PolyLine: LMDrawPreTrack output",!1),!1):(super.LMDrawPreTrack(t),LogUtil.Debug("S.PolyLine: LMDrawPreTrack output",!0),!0)}LMDrawClickExceptionCleanup(t){LogUtil.Debug("S.PolyLine: LMDrawClickExceptionCleanup input",{event:t}),LMEvtUtil.UnbindActionClickHammerEvents(),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),T3Gv.opt.linkParams=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),LogUtil.Debug("S.PolyLine: LMDrawClickExceptionCleanup output",{})}LMDrawClick(t,e){LogUtil.Debug("S.PolyLine: LMDrawClick input",{initialX:t,initialY:e});try{this.Frame.x=t,this.Frame.y=e,this.Frame.width=0,this.Frame.height=0,this.StartPoint={x:t,y:e},this.EndPoint={x:t,y:e};const i=this;T3Gv.opt.WorkAreaHammer.off("dragstart"),T3Gv.opt.WorkAreaHammer.on("doubletap",EvtUtil.Evt_DrawReleaseHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_PolyLineDrawExtendHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_PolyLineDrawExtendHandlerFactory(this)),$$1(window).bind("mousemove",(function(t){try{i.LMDrawTrack(t)}catch(e){throw i.LMDrawClickExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),e}})),LogUtil.Debug("S.PolyLine: LMDrawClick output",{message:"Click handled successfully"})}catch(i){throw this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}LMDrawRelease(t){LogUtil.Debug("S.PolyLine: LMDrawRelease input",{event:t}),t&&t.gesture&&t.gesture.stopDetect(),LMEvtUtil.UnbindActionClickHammerEvents(),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick);const e=this.polylist.segs.length,i=this.polylist.segs[e-2].pt.x-this.polylist.segs[e-1].pt.x,n=this.polylist.segs[e-2].pt.y-this.polylist.segs[e-1].pt.y,s=Math.sqrt(i*i+n*n);e>2&&s<5&&this.polylist.segs.pop(),this.ResetAutoScrollTimer(),this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId),DrawUtil.PostObjectDraw(),LogUtil.Debug("S.PolyLine: LMDrawRelease output",{segmentCount:e,segmentDistance:s})}LMDrawExtend(t){if(LogUtil.Debug("S.PolyLine: LMDrawExtend input",t),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.JoinIndex>=0))this.LMDrawRelease(t);else{let e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=this.polylist.segs.length,n={x:this.polylist.segs[i-2].pt.x+this.StartPoint.x,y:this.polylist.segs[i-2].pt.y+this.StartPoint.y},s=e.x-n.x,a=e.y-n.y;if(Math.sqrt(s*s+a*a)>=10){let i=e.x-this.StartPoint.x,n=e.y-this.StartPoint.y;this.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,i,n)),this.polylist.segs.length>=OptConstant.Common.MaxPolySegs&&this.LMDrawRelease(t)}}LogUtil.Debug("S.PolyLine: LMDrawExtend output",{polySegments:this.polylist.segs})}RightClick(t){let e,i;const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),s=new HitResult(-1,0,null),a=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(!SelectUtil.SelectObjectFromClick(t,a))return!1;const o=a.GetID();if((e=ObjectUtil$1.GetObjectPtr(o,!1))&&e.GetTextObject()>=0){const e=a.textElem;e&&(i=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY),i>=0&&TextUtil.ActivateTextEdit(a,t,!0))}T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=a.GetID(),T3Gv.opt.rClickParam.hitPoint.x=n.x,T3Gv.opt.rClickParam.hitPoint.y=n.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,this.Hit(n,!1,!1,s),s.hitcode&&(T3Gv.opt.rClickParam.segment=s.segment);if(null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();i=-1,e&&(i=e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY))}else this.objecttype,NvConstant.FNObjectTypes.FlWall}PrGetNURBSPoints(t,e,i,n,s,a){function o(){let t=(g[d-1]-g[0])/e,i=0,n=g[0];for(let s=0;s<e;s++){for(;n>=g[i];)i++;let e=i-1+l*s;b[e]=1;for(let t=2;t<=c;t++){let s=i-t+1;s<0&&(s=0);for(let a=s;a<=i-1;a++){let i=g[a+t-1]-g[a],s=g[a+t]-g[a+1];0===i&&(i=1e-11),0===s&&(s=1e-11),a+e+1<b.length&&(b[a+e]=b[a+e]*(n-g[a])/i+b[a+1+e]*(g[a+t]-n)/s)}}let a=0;for(let t=0;t<p;t++)a+=u[t]*b[t+e];for(let t=0;t<p;t++)b[t+e]=u[t]*b[t+e]/a;n+=t}return b}LogUtil.Debug("S.PolyLine: PrGetNURBSPoints input",{startSegmentIndex:t,numPoints:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});let r=t,l=0,h=!1;for(r=t;r<this.polylist.segs.length&&(this.polylist.segs[r].LineType===OptConstant.LineType.NURBS||this.polylist.segs[r].LineType===OptConstant.LineType.NURBSSEG);r++){if(this.polylist.segs[r].LineType===OptConstant.LineType.NURBS){if(h)break;h=!0}this.polylist.segs[r].LineType===OptConstant.LineType.NURBSSEG&&l++}let c=this.polylist.segs[t].ShortRef+1,u=[];for(let T=0;T<l;T++)u.push(this.polylist.segs[T+t+1].weight);let d,p=l,g=[];if(-1===this.polylist.segs[t].param){let t=0;for(let i=0;i<c;i++)g.push(t),t++;t++;for(let i=c;i<l+1;i++)g.push(t),t++;let e=g[g.length-1]-g[0];for(let i=1;i<c;i++)g.push(e);d=g.length}else{for(let n=0;n<l-1;n++)g.push(this.polylist.segs[n+t+1].param);g.push(this.polylist.segs[t].param);let e=this.polylist.segs[l+t+1].param;g.push(e);let i=e-g[0];for(let t=0;t<c-1;t++)g.push(g[t+1]+i);d=l+c}let f=[],m=[];for(let T=0;T<l;T++)f.push(this.polylist.segs[T+t+1].pt.x),m.push(this.polylist.segs[T+t+1].pt.y);const v=p*e;let b=new Float64Array(v),y=new Float64Array(f),S=new Float64Array(m);u=new Float64Array(u),g=new Float64Array(g);let x=g[0],w=g[d-1]-x;for(let T=0;T<d;T++)g[T]=(g[T]-x)/w;for(let T=0;T<g.length;T++)g[T]=Math.floor(1e4*g[T])/1e4,T>0?g[T]<g[T-1]&&(g[T]=g[T-1]):g[0]>g[1]&&(g[0]=0);this.polylist.closed?o():null==this.polylist.segs[t].UserData||this.polylist.segs[t].UserData.nPoints!==e||0===this.polylist.segs[t].UserData.basis.length?(o(),this.polylist.segs[t].UserData={nPoints:e,basis:b}):b=this.polylist.segs[t].UserData.basis;let C=[];{let t=(g[d-1]-g[0])/e,o=(Math.floor((g[c-1]-g[0])/t)+1)*p,r=0,l=0;for(let e=0;e<p;e++){let t=u[e]*b[e+o];r+=y[e]*t,l+=S[e]*t}C.push(new Point$1(r*s+i,l*a+n));for(let e=c-1;e<p;e++)if(Math.floor((g[e+1]-g[0])/t),o+=p,o+p-1<v){r=0,l=0;for(let t=0;t<p;t++){let e=b[t+o];r+=y[t]*e,l+=S[t]*e}C.push(new Point$1(r*s+i,l*a+n))}}return LogUtil.Debug("S.PolyLine: PrGetNURBSPoints output",C),C}PrGetSPLINEPoints(t,e,i,n,s,a){function o(){let t,i,n,s,a=(g[d-1]-g[0])/e;i=0,n=g[0];for(let o=0;o<e;o++){for(;n>=g[i];)i++;let e=i-1+m*o;b[e]=1;for(let s=2;s<=c;s++){let a=i-s+1;for(a<0&&(a=0),t=a;t<=i-1;t++){let i=g[t+s-1]-g[t],a=g[t+s]-g[t+1];0===i&&(i=1e-11),0===a&&(a=1e-11),t+e+1<v&&(b[t+e]=b[t+e]*(n-g[t])/i+b[t+1+e]*(g[t+s]-n)/a)}}s=0;for(let t=0;t<u;t++)s+=p[t]*b[t+e];for(let t=0;t<u;t++)b[t+e]=p[t]*b[t+e]/s;n+=a}}let r;LogUtil.Debug("S.PolyLine: PrGetSPLINEPoints input",{startSegmentIndex:t,numPoints:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});let l=[],h=[],c=this.polylist.segs[t].ShortRef+1,u=1;for(r=t+1;r<this.polylist.segs.length&&this.polylist.segs[r].LineType===OptConstant.LineType.SPLINECON;r++)u++;let d,p=[];for(r=0;r<u;r++)p.push(1);let g=[];g.push(this.polylist.segs[t].param),g.push(this.polylist.segs[t].weight);const f=this.polylist.segs[t].dataclass;for(r=2;r<u;r++)g.push(this.polylist.segs[r+t].weight);for(g.push(f),r=0;r<c-1;r++)g.push(f);d=g.length;const m=u;for(l.push(this.polylist.segs[t].pt.x),h.push(this.polylist.segs[t].pt.y),r=1;r<u;r++)l.push(this.polylist.segs[r+t].pt.x),h.push(this.polylist.segs[r+t].pt.y);const v=u*e;let b=new Float64Array(v);const y=new Float64Array(l),S=new Float64Array(h);p=new Float64Array(p);let x=(g=g.map((t=>t)))[0],w=g[d-1]-x;for(r=0;r<d;r++)g[r]=(g[r]-x)/w;for(r=0;r<g.length;r++)g[r]=Math.floor(1e4*g[r])/1e4,r>0&&g[r]<g[r-1]?g[r]=g[r-1]:0===r&&g[0]>g[1]&&(g[0]=0);this.polylist.closed?o():null==this.polylist.segs[t].UserData||this.polylist.segs[t].UserData.nPoints!==e||0===this.polylist.segs[t].UserData.basis.length?(o(),this.polylist.segs[t].UserData={nPoints:e,basis:b}):b=this.polylist.segs[t].UserData.basis;let C=[];{g[d-1],g[0];let t=0,o=0,l=(Math.floor((g[c-1]-g[0])/e)+1)*m;for(r=0;r<u;r++){let e=p[r]*b[r+l];t+=y[r]*e,o+=S[r]*e}C.push(new Point$1(t*s+i,o*a+n))}return LogUtil.Debug("S.PolyLine: PrGetSPLINEPoints output",C),C}PrGetQuadraticBezierPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: PrGetQuadraticBezierPoints input",{startIndex:t,pointCount:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});const o=this.polylist.segs[t].pt.x,r=this.polylist.segs[t].pt.y,l=this.polylist.segs[t+1].pt.x,h=this.polylist.segs[t+1].pt.y,c=this.polylist.segs[t+2].pt.x,u=this.polylist.segs[t+2].pt.y,d=[],p=1/(e-1);let g=0;for(let f=0;f<e;f++){const t=1-g,e=t*t*o+2*t*g*l+g*g*c,f=t*t*r+2*t*g*h+g*g*u;d.push(new Point$1(e*s+i,f*a+n)),g+=p}return LogUtil.Debug("S.PolyLine: PrGetQuadraticBezierPoints output",d),d}PrGetCubicBezierPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: PrGetCubicBezierPoints input",{startSegmentIndex:t,pointCount:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});const o=this.polylist.segs[t].pt.x,r=this.polylist.segs[t].pt.y,l=this.polylist.segs[t+1].pt.x,h=this.polylist.segs[t+1].pt.y,c=this.polylist.segs[t+2].pt.x,u=this.polylist.segs[t+2].pt.y,d=this.polylist.segs[t+3].pt.x,p=this.polylist.segs[t+3].pt.y,g=1/(e-1);let f=0;const m=[];for(let v=0;v<e;v++){const t=1-f,e=t*t,v=e*t,b=f*f,y=b*f,S=new Point$1((v*o+3*e*f*l+3*t*b*c+y*d)*s+i,(v*r+3*e*f*h+3*t*b*u+y*p)*a+n);m.push(S),f+=g}return LogUtil.Debug("S.PolyLine: PrGetCubicBezierPoints output",m),m}PrGetEllipticalArcPoints(t,e,i,n,s,a){LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints input",{segmentIndex:t,pointCount:e,xOffset:i,yOffset:n,scaleX:s,scaleY:a});const o=[];let r=Math.floor(this.polylist.segs[t].pt.x),l=Math.floor(this.polylist.segs[t].pt.y),h=Math.floor(this.polylist.segs[t+1].pt.x),c=Math.floor(this.polylist.segs[t+1].pt.y),u=Math.floor(this.polylist.segs[t+2].pt.x),d=Math.floor(this.polylist.segs[t+2].pt.y);if(h===r&&c===l||h===u&&c===d)return o.push(new Point$1(r*s+i,l*a+n)),o.push(new Point$1(u*s+i,d*a+n)),LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints output",o),o;const p=this.polylist.segs[t].weight/10,g=this.polylist.segs[t].param,f=((t,e,i,n,s,a)=>{if(t=Math.floor(t),e=Math.floor(e),i=Math.floor(i),n=Math.floor(n),s=Math.floor(s),a=Math.floor(a),t===i)return s<t?n>e?1:-1:s>t?n>e?-1:1:0;if(e===n)return a<e?i>t?-1:1:a>e?i>t?1:-1:0;const o=(n-e)/(i-t),r=o*s+(e-o*t);return Math.abs(a-r)>.001&&0!==o?a>r?i>t?1:-1:i>t?-1:1:0})(r,l,u,d,h,c);if(0===f)return o.push(new Point$1(h*s+i,c*a+n)),o.push(new Point$1(u*s+i,d*a+n)),LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints output",o),o;const m=((t,e,i,n,s,a,o,r)=>{const l={},h=2*Math.PI*(o/360),c=Math.sqrt(t*t+e*e),u=Math.atan2(e,t),d=c*Math.cos(u-h),p=c*Math.sin(u-h),g=Math.sqrt(i*i+n*n),f=Math.atan2(n,i),m=g*Math.cos(f-h),v=g*Math.sin(f-h),b=Math.sqrt(s*s+a*a),y=Math.atan2(a,s),S=b*Math.cos(y-h),x=b*Math.sin(y-h);let w=(d-m)*(d+m)*(v-x)-(m-S)*(m+S)*(p-v)+r*r*(p-v)*(v-x)*(p-x),C=(d-m)*(m-S)/(r*r)+(m-S)*(p-v)*(p+v)-(d-m)*(v-x)*(v+x);const T=d,D=p;w/=2*((d-m)*(v-x)-(m-S)*(p-v)),C/=2*((m-S)*(p-v)-(d-m)*(v-x));const k=Math.sqrt(w*w+C*C);w=k*Math.cos(Math.atan2(C,w)+h),C=k*Math.sin(Math.atan2(C,w)+h);const $=Math.sqrt((T-w)*(T-w)+(D-C)*(D-C)*(r*r)),O=$/r;return l.centerX=w,l.centerY=C,l.majorAxis=$,l.minorAxis=O,l.angle=h,l.eccentricity=r,l})(r,l,u,d,h,c,p,g),v=m.centerX,b=m.centerY,y=m.majorAxis,S=m.minorAxis;let x,w;const C=-2*Math.PI*(p/360),T=2*Math.PI;if(0===C)x=Math.atan2(b-l,(r-v)/g),w=Math.atan2(b-d,(u-v)/g);else{const t=[{x:r,y:l},{x:h,y:c},{x:u,y:d}];!function(t,e,i){for(let n=0;n<i.length;n++){const s=i[n].x-t.x,a=i[n].y-t.y,o=Math.cos(e),r=Math.sin(e);i[n].x=s*o-a*r+t.x,i[n].y=s*r+a*o+t.y}}({x:v,y:b},-C,t),x=Math.atan2(b-t[0].y,(t[0].x-v)/g),w=Math.atan2(b-t[2].y,(t[2].x-v)/g)}w<x&&(w+=T);const D=((t,e,o,r,l,h,c,u,d)=>{const p=[];let g;g=u?(c-h)/(d-1):-(T-(c-h))/(d-1);let f=h;for(let m=0;m<d;m++){const h=o+t*Math.cos(f)*Math.cos(l)-e*Math.sin(f)*Math.sin(l),c=r+t*Math.cos(f)*Math.sin(-l)-e*Math.sin(f)*Math.cos(l);p.push(new Point$1(h*s+i,c*a+n)),f+=g}return p})(y,S,v,b,C,x,w,1===f,e);return LogUtil.Debug("S.PolyLine: PrGetEllipticalArcPoints output",D),D}PrGetParabolaPoints(t,e,i,n,s,a,o){LogUtil.Debug("S.PolyLine: PrGetParabolaPoints input",{numPoints:t,isClosed:e,segmentIndex:i,param:n,shortRef:s,scaleX:a,scaleY:o});let r,l,h,c={},u=!1,d=[],p=[],g=this.StartPoint.x-this.Frame.x,f=this.StartPoint.y-this.Frame.y;if(e||(g=this.StartPoint.x,f=this.StartPoint.y),Math.abs(n)<1)return p.push(new Point$1(this.polylist.segs[i-1].pt.x*a+g,this.polylist.segs[i-1].pt.y*o+f)),p.push(new Point$1(this.polylist.segs[i].pt.x*a+g,this.polylist.segs[i].pt.y*o+f)),LogUtil.Debug("S.PolyLine: PrGetParabolaPoints output",p),p;if(d.push(new Point$1(this.polylist.segs[i-1].pt.x*a+g,this.polylist.segs[i-1].pt.y*o+f)),d.push(new Point$1(this.polylist.segs[i].pt.x*a+g,this.polylist.segs[i].pt.y*o+f)),r=d[1].x-d[0].x,l=d[1].y-d[0].y,h=Math.sqrt(r*r+l*l),h<1)return LogUtil.Debug("S.PolyLine: PrGetParabolaPoints output",p),p;if(Math.round(6*Math.abs(l))>=1){u=!0;const t=l/h,e=r/h;let i=Math.asin(t);e<0&&(i=-i,n=-n,s=-s),c.x=(d[0].x+d[1].x)/2,c.y=(d[0].y+d[1].y)/2,Utils3.RotatePointsAboutPoint(c,i,d)}d.push(new Point$1((d[0].x+d[1].x)/2,d[0].y+n));const m=d[2].x,v=d[2].y;for(let x=0;x<3;x++)d[x].x-=m,d[x].y-=v;c.x=(d[0].x+d[1].x)/2,c.y=(d[0].y+d[1].y)/2;const b=d[0].y/(d[0].x*d[0].x),y=s/n,S=(d[1].x-d[0].x)/(t-1);for(let x=0;x<t;x++){let t=d[0].x+S*x;t+=y*(n+b*t*t);let e=b*t*t;if(u){const i={x:t,y:e};Utils3.RotatePointsAboutPoint(c,-rotationAngle,[i]),t=i.x,e=i.y}p.push(new Point$1(t+m+g,e+v+f))}return LogUtil.Debug("S.PolyLine: PrGetParabolaPoints output",p),p}PrPolyLGetParabolaAdjPoint(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaAdjPoint input",{event:t,segmentIndex:e});let i,n,s,a,o,r={},l=!1,h=[],c={};if(h.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),h.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),i=h[1].x-h[0].x,n=h[1].y-h[0].y,s=Math.sqrt(i*i+n*n),s<1)return LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaAdjPoint output",c),c;if(a=this.polylist.segs[e].param,o=this.polylist.segs[e].ShortRef,Math.abs(n)>=1){l=!0;const t=n/s,e=i/s;let c=Math.asin(t);e<0&&(c=-c,a=-a,o=-o),r.x=(h[0].x+h[1].x)/2,r.y=(h[0].y+h[1].y)/2,Utils3.RotatePointsAboutPoint(r,c,h)}return h.push(new Point$1((h[0].x+h[1].x)/2+o,h[0].y+a)),l&&Utils3.RotatePointsAboutPoint(r,-rotationAngle,h),c.x=h[2].x,c.y=h[2].y,t||(c.x+=this.StartPoint.x,c.y+=this.StartPoint.y),LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaAdjPoint output",c),c}PrPolyLGetParabolaParam(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaParam input",{event:t,segmentIndex:e});let i,n,s,a,o={},r=1,l=[];if(l.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),l.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),i=l[1].x-l[0].x,n=l[1].y-l[0].y,s=Math.sqrt(i*i+n*n),s>=1){const h=t.x-this.StartPoint.x,c=t.y-this.StartPoint.y;l.push(new Point$1(h,c)),Math.abs(n)>=1?(a=Math.asin(n/s),i<0&&(a=-a,r=-r),o.x=(l[0].x+l[1].x)/2,o.y=(l[0].y+l[1].y)/2,Utils3.RotatePointsAboutPoint(o,a,l)):a=0;const u=(l[0].x+l[1].x)/2,d=l[0].y;this.polylist.segs[e].param=(l[2].y-d)*r,this.polylist.segs[e].ShortRef=(l[2].x-u)*r;let p=6*this.polylist.segs[e].ShortRef;p=Math.floor(p),this.polylist.segs[e].ShortRef=p/6}LogUtil.Debug("S.PolyLine: PrPolyLGetParabolaParam output",{param:this.polylist.segs[e].param,ShortRef:this.polylist.segs[e].ShortRef})}PrPolyLGetArc(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetArc input",{segmentIndex:t,offset:e});let i,n,s={},a={},o={},r={arcObject:null,point:{x:0,y:0}};s.x=this.polylist.segs[t-1].pt.x+e.x,s.y=this.polylist.segs[t-1].pt.y+e.y,a.x=this.polylist.segs[t].pt.x+e.x,a.y=this.polylist.segs[t].pt.y+e.y,i=this.polylist.segs[t].param>=0?{StartPoint:s,EndPoint:a,CurveAdjust:this.polylist.segs[t].param,IsReversed:!0,FromPolygon:!0}:{StartPoint:s,EndPoint:a,CurveAdjust:-this.polylist.segs[t].param,IsReversed:!1,FromPolygon:!0};const l=new Instance.Shape.ArcLine(i);return l.Frame=Utils2.Pt2Rect(s,a),n=l.CalcRadiusAndCenter(s.x,s.y,a.x,a.y,i.CurveAdjust,i.IsReversed),o.x=n.actionX,o.y=n.actionY,l.BeforeModifyShape(o.x,o.y,0),r.arcObject=l,r.point=o,LogUtil.Debug("S.PolyLine: PrPolyLGetArc output",r),r}PrPolyLGetArcParam(t,e,i){LogUtil.Debug("S.PolyLine: PrPolyLGetArcParam input",{shape:t,targetPoint:e,segmentIndex:i}),t&&(t.ModifyShape(null,e.x,e.y,-1,0),t.IsReversed?this.polylist.segs[i].param=t.CurveAdjust:this.polylist.segs[i].param=-t.CurveAdjust),LogUtil.Debug("S.PolyLine: PrPolyLGetArcParam output",this.polylist.segs[i].param)}PrGetEllipsePoints(t,e,i,n,s,a,o){LogUtil.Debug("S.PolyLine: PrGetEllipsePoints input",{numPoints:t,isClosed:e,segmentIndex:i,rotationAngle:n,arcQuadrant:s,scaleX:a,scaleY:o});let r,l,h,c,u,d,p={},g=[],f=[],m={},v=this.StartPoint.x-this.Frame.x,b=this.StartPoint.y-this.Frame.y;if(g.push(new Point$1(this.polylist.segs[i-1].pt.x+v,this.polylist.segs[i-1].pt.y+b)),g.push(new Point$1(this.polylist.segs[i].pt.x+v,this.polylist.segs[i].pt.y+b)),r=g[1].x-g[0].x,l=g[1].y-g[0].y,h=Math.sqrt(r*r+l*l),p.x=this.polylist.segs[i-1].pt.x,p.y=this.polylist.segs[i-1].pt.y,e||(v=this.StartPoint.x,b=this.StartPoint.y),h<1)return f.push(new Point$1(this.polylist.segs[i-1].pt.x*a+v,this.polylist.segs[i-1].pt.y*o+b)),f.push(new Point$1(this.polylist.segs[i].pt.x*a+v,this.polylist.segs[i].pt.y*o+b)),LogUtil.Debug("S.PolyLine: PrGetEllipsePoints output",f),f;Math.abs(n)>=.01&&(c=Math.sin(n),u=Math.cos(n),d=Math.asin(c),Utils3.RotatePointsAboutPoint(p,d,g));let y,S,x=1;switch(s){case OptConstant.ArcQuad.PLA_TL:case OptConstant.ArcQuad.PLA_TR:y=g[1].x,S=g[0].y,x=-1;break;case OptConstant.ArcQuad.PLA_BR:default:y=g[1].x,S=g[0].y}for(let D=0;D<2;D++)g[D].x-=y,g[D].y-=S;let w=Math.abs(g[1].x-g[0].x),C=Math.abs(g[1].y-g[0].y);if(w*=w,w<1e-4)return f.push(new Point$1(this.polylist.segs[i-1].pt.x*a+v,this.polylist.segs[i-1].pt.y*o+b)),f.push(new Point$1(this.polylist.segs[i].pt.x*a+v,this.polylist.segs[i].pt.y*o+b)),LogUtil.Debug("S.PolyLine: PrGetEllipsePoints output",f),f;let T=(g[1].x-g[0].x)/(t-1);for(let D=0;D<t;D++){let t=g[0].x+T*D,e=x*Math.sqrt(1-t*t/w)*C;Math.abs(n)>=.01?(m.x=(t+y-p.x)*u-(e+S-p.y)*c+p.x,m.y=(t+y-p.x)*c+(e+S-p.y)*u+p.y):(m.x=t+y,m.y=e+S),f.push(new Point$1(m.x*a+v,m.y*o+b))}return LogUtil.Debug("S.PolyLine: PrGetEllipsePoints output",f),f}PrPolyLGetEllipseAdjPoint(t,e){LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseAdjPoint input",{event:t,segmentIndex:e});let i,n,s,a=[],o={},r={};a.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),a.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),o.x=this.polylist.segs[e-1].pt.x,o.y=this.polylist.segs[e-1].pt.y;const l=this.polylist.segs[e].param;return Math.abs(l)>=.01&&(i=Math.sin(l),n=Math.cos(l),s=Math.asin(i),n<0&&(s=-s),Utils3.RotatePointsAboutPoint(o,s,a)),a.push(new Point$1(a[1].x,a[0].y)),Math.abs(l)>=.01&&Utils3.RotatePointsAboutPoint(o,-s,a),r.x=a[2].x,r.y=a[2].y,t||(r.x+=this.StartPoint.x,r.y+=this.StartPoint.y),LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseAdjPoint output",r),r}PrPolyLGetEllipseParam(t,e,i){LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseParam input",{event:t,segmentIndex:e,svgDocument:i});let n,s,a,o,r,l,h=[],c={},u={};if(h.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),h.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),n=h[1].x-h[0].x,s=h[1].y-h[0].y,Math.sqrt(n*n+s*s)>=1&&Math.abs(s)>1){const d=t.x-this.StartPoint.x,p=t.y-this.StartPoint.y;h.push(new Point$1(d,p)),s=h[2].y-h[0].y,n=h[2].x-h[0].x,Math.abs(n)<.001?o=NvConstant.Geometry.PI/2:(a=s/n,o=Math.atan(a)),this.polylist.segs[e].param=o,r=this.PrPolyLGetArcQuadrant(h[0],h[1],o),r.ShortRef!==this.polylist.segs[e].ShortRef&&(this.polylist.segs[e].ShortRef=r.ShortRef),l=this.PrPolyLGetEllipseAdjPoint(!0,e),h.pop(),h.splice(1,0,l),Utils2.GetPolyRect(c,h);const g=this.StartPoint.x-this.Frame.x,f=this.StartPoint.y-this.Frame.y,m=OptConstant.Common.EllipseAxes;if(u=i.GetElementById(m),u||(u=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polyline),u.SetFillColor("none"),u.SetStrokeColor("green"),u.SetStrokePattern("4,2"),u.SetID(m),i.AddElement(u)),u){u.SetSize(c.width,c.height);for(let t=0;t<h.length;t++)h[t].x+=g,h[t].y+=f;u.SetPoints(h)}}LogUtil.Debug("S.PolyLine: PrPolyLGetEllipseParam output",{polyPoints:h,boundingRect:c,ellipseAxesElement:u})}PrPolyLGetArcQuadrant(t,e,i){LogUtil.Debug("S.PolyLine: PrPolyLGetArcQuadrant input",{startPoint:t,endPoint:e,angle:i});let n,s,a,o=[],r={param:0,ShortRef:0},l={};o.push(new Point$1(t.x,t.y)),o.push(new Point$1(e.x,e.y)),l.x=t.x,l.y=t.y,Math.abs(i)>=.01&&(n=Math.sin(i),s=Math.cos(i),a=Math.asin(n),s<0&&(a=-a),Utils3.RotatePointsAboutPoint(l,a,o));const h=o[0],c=o[1];return c.x>h.x?c.y>h.y?(r.param=-NvConstant.Geometry.PI/2,r.ShortRef=OptConstant.ArcQuad.PLA_BL,e.notclockwise&&(r.param=0)):(r.ShortRef=OptConstant.ArcQuad.PLA_TL,e.notclockwise&&(r.ShortRef=OptConstant.ArcQuad.PLA_TR,r.param=NvConstant.Geometry.PI/2)):c.y>h.y?(r.ShortRef=OptConstant.ArcQuad.SD_PLA_BR,e.notclockwise&&(r.ShortRef=OptConstant.ArcQuad.PLA_BL,r.param=NvConstant.Geometry.PI/2)):(r.param=-NvConstant.Geometry.PI/2,r.ShortRef=OptConstant.ArcQuad.PLA_TR,e.notclockwise&&(r.param=0)),LogUtil.Debug("S.PolyLine: PrPolyLGetArcQuadrant output",r),r}NeedsAddLineThicknessToDimension(t,e){LogUtil.Debug("S.PolyLine: NeedsAddLineThicknessToDimension input",{event:t,target:e});const i=!!this.polylist.closed;return LogUtil.Debug("S.PolyLine: NeedsAddLineThicknessToDimension output",i),i}GetExteriorDimensionMeasurementLineThicknessAdjustment(t){LogUtil.Debug("S.PolyLine: GetExteriorDimensionMeasurementLineThicknessAdjustment input",{segmentIndex:t});let e=this.ConvToUnits(this.StyleRecord.Line.Thickness,T3Gv.docUtil.rulerConfig.originx);return e/=2,this.IsTerminalSegment(t)||(e*=2),LogUtil.Debug("S.PolyLine: GetExteriorDimensionMeasurementLineThicknessAdjustment output",e),e}CanUseStandOffDimensionLines(){LogUtil.Debug("S.PolyLine: CanUseStandOffDimensionLines input");const t=!(!this.polylist.closed&&(this.Dimensions&NvConstant.DimensionFlags.Total||this.Dimensions&NvConstant.DimensionFlags.EndPts));return LogUtil.Debug("S.PolyLine: CanUseStandOffDimensionLines output",t),t}GetDimensionTextForPoints(t,e){LogUtil.Debug("S.PolyLine: GetDimensionTextForPoints input",{startPoint:t,endPoint:e});let i=[],n=0,s=0,a=0,o=0,r=0;if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.Total){i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);for(let t=1;t<i.length;t++)s=Math.abs(i[t-1].x-i[t].x),a=Math.abs(i[t-1].y-i[t].y),n+=Math.sqrt(s*s+a*a)}else o=360-Utils1.CalcAngleFromPoints(t,e),r=2*Math.PI*(o/360),i.push(new Point$1(t.x,t.y)),i.push(new Point$1(e.x,e.y)),Utils3.RotatePointsAboutCenter(this.Frame,-r,i),n=Math.abs(i[0].x-i[1].x);const l=RulerUtil.GetLengthInRulerUnits(n);return LogUtil.Debug("S.PolyLine: GetDimensionTextForPoints output",l),l}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("S.PolyLine: UpdateSecondaryDimensions input",{event:t,target:e,additionalData:i});let n=[],s=0;const a=this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select;if((this.objecttype!==NvConstant.FNObjectTypes.FlWall||this.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions||(a||i)&&this.UpdateHookedObjectDimensionLines(t,e,i))&&a&&this.Dimensions&NvConstant.DimensionFlags.ShowLineAngles&&this.polylist){n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),s=n.length;for(let i=1;i<s;i++)this.DrawDimensionAngle(t,e,i,n)}LogUtil.Debug("S.PolyLine: UpdateSecondaryDimensions output",{polyPoints:n,pointCount:s})}GetBoundingBoxesForSecondaryDimensions(){LogUtil.Debug("S.PolyLine: GetBoundingBoxesForSecondaryDimensions input");let t=super.GetBoundingBoxesForSecondaryDimensions();if(!(this.Dimensions&NvConstant.DimensionFlags.ShowLineAngles))return LogUtil.Debug("S.PolyLine: GetBoundingBoxesForSecondaryDimensions output",t),t;const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),i=e.length;for(let n=1;n<i;n++){const i=this.GetDimensionAngleInfo(n,e);i&&(i.text=null,t.push(i.textRect))}return LogUtil.Debug("S.PolyLine: GetBoundingBoxesForSecondaryDimensions output",t),t}GetAreaWidthAndHeightText(t){LogUtil.Debug("S.PolyLine: GetAreaWidthAndHeightText input",{polyPoints:t});let e,i,n,s,a,o="";return this.polylist&&this.polylist.closed&&T3Gv.opt.IsRectangularPolygon(t)&&(a=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(t[0],t[1]),a<Math.PI/4||a>1.5*Math.PI||a>.75*Math.PI&&a<1.25*Math.PI?(n=1,s=2):(n=2,s=1),e=Utils2.GetDistanceBetween2Points(t[n-1],t[n]),i=Utils2.GetDistanceBetween2Points(t[s-1],t[s]),o=RulerUtil.GetLengthInRulerUnits(i)+" x "+RulerUtil.GetLengthInRulerUnits(e)),LogUtil.Debug("S.PolyLine: GetAreaWidthAndHeightText output",o),o}SetSegmentAngle(t,e,i){LogUtil.Debug("S.PolyLine: SetSegmentAngle input",{event:t,segmentIndex:e,angle:i});let n,s,a=[],o=[],r=-1,l=0,h=0;if(e<=0||e>=this.polylist.segs.length)return void LogUtil.Debug("S.PolyLine: SetSegmentAngle output",!1);ObjectUtil$1.GetObjectPtr(this.BlockID,!0);const c=Utils1.DeepCopy(this);if(a.push(new Point$1(this.polylist.segs[e-1].pt.x,this.polylist.segs[e-1].pt.y)),a.push(new Point$1(this.polylist.segs[e].pt.x,this.polylist.segs[e].pt.y)),a[0].x+=this.StartPoint.x,a[1].x+=this.StartPoint.x,a[0].y+=this.StartPoint.y,a[1].y+=this.StartPoint.y,new Point$1(a[1].x,a[1].y),n=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(a[0],a[1]),Utils3.RotatePointsAboutPoint(a[0],-n,a),this.Dimensions&NvConstant.DimensionFlags.InteriorAngles){if(o.push(new Point$1(a[0].x,a[0].y)),1===e){if(!this.polylist.closed)return void LogUtil.Debug("S.PolyLine: SetSegmentAngle output",!1);o.push(new Point$1(this.polylist.segs[this.polylist.segs.length-2].pt.x,this.polylist.segs[this.polylist.segs.length-2].pt.y))}else o.push(new Point$1(this.polylist.segs[e-2].pt.x,this.polylist.segs[e-2].pt.y));o[1].x+=this.StartPoint.x,o[1].y+=this.StartPoint.y,s=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(o[0],o[1]),Utils3.RotatePointsAboutPoint(a[0],s,a)}else s=0;let u=i/360*(2*Math.PI),d=n-s;d<0&&(d+=2*Math.PI),d>Math.PI&&(u=2*Math.PI-u),Utils3.RotatePointsAboutPoint(a[0],u,a),e===this.polylist.segs.length-1?(r=this.polylist.closed?OptConstant.ActionTriggerType.PolyEnd:OptConstant.ActionTriggerType.LineEnd,this.AdjustLineEnd(t,a[1].x,a[1].y,r)):0===e?this.AdjustLineStart(t,a[1].x,a[1].y,OptConstant.ActionTriggerType.LineStart):this.ModifyShape(t,a[1].x,a[1].y,OptConstant.ActionTriggerType.PolyNode,e),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let p=0;p<this.hooks.length;p++)OptCMUtil.SetLinkFlag(this.hooks[p].objid,DSConstant.LinkFlags.Move);if(T3Gv.opt.ActionTriggerData=e,HookUtil.MaintainLink(this.BlockID,this,c,OptConstant.ActionTriggerType.PolyNode),this.Frame.x<0||this.Frame.y<0){const t=this.Frame;t.x<0&&(l=-t.x,t.x+=l),t.y<0&&(h=-t.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(h+=OptConstant.Common.DimDefaultStandoff),t.y+=h),this.StartPoint.x+=l,this.StartPoint.y+=h,this.EndPoint.x+=l,this.EndPoint.y+=h,T3Gv.opt.SetObjectFrame(this.BlockID,t)}this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("S.PolyLine: SetSegmentAngle output",!0)}IsTextFrameOverlap(t,e){LogUtil.Debug("S.PolyLine: IsTextFrameOverlap input",{textFrame:t,rotationAngle:e});const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),n=360-e,s=2*Math.PI*(n/360);Utils3.RotatePointsAboutCenter(this.Frame,-s,i);const a=Utils2.IsFrameCornersInPoly(i,t);return LogUtil.Debug("S.PolyLine: IsTextFrameOverlap output",a),a}IsTerminalSegment(t){LogUtil.Debug("S.PolyLine: IsTerminalSegment input",{segmentIndex:t});const e=!this.polylist.closed&&(1===t||t===this.polylist.segs.length-1);return LogUtil.Debug("S.PolyLine: IsTerminalSegment output",e),e}UpdateDimensionFromTextObj(t,e){LogUtil.Debug("S.PolyLine: UpdateDimensionFromTextObj input",{event:t,textObject:e});let i="",n=null;T3Gv.stdObj.PreserveBlock(this.BlockID),e?(i=e.text,n=e.userData):(i=t.GetText(),n=t.GetUserData());const s=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.UpdateDimensionFromText(s,i,n),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let a=0;a<this.hooks.length;a++)OptCMUtil.SetLinkFlag(this.hooks[a].objid,DSConstant.LinkFlags.Move);(""!==this.HyperlinkText||-1!==this.NoteID||-1!==this.commentId||this.HasFieldData())&&ObjectUtil$1.AddToDirtyList(this.BlockID),DrawUtil.CompleteOperation(),LogUtil.Debug("S.PolyLine: UpdateDimensionFromTextObj output",{text:i,userData:n})}UpdateEndPointDimensionFromText(t,e){LogUtil.Debug("S.PolyLine: UpdateEndPointDimensionFromText input",{event:t,dimensionLength:e});const i=[this.StartPoint,this.EndPoint];if(!this.closed){let t=Utils1.CalcAngleFromPoints(this.StartPoint,this.EndPoint);t=360-t;const n=2*Math.PI*(t/360);Utils3.RotatePointsAboutCenter(this.Frame,-n,i),i[1].x=i[0].x+e,Utils3.RotatePointsAboutCenter(this.Frame,n,i),this.AdjustLineEnd(null,i[1].x,i[1].y,OptConstant.ActionTriggerType.LineEnd)}LogUtil.Debug("S.PolyLine: UpdateEndPointDimensionFromText output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateTotalDimensionFromText(t,e){LogUtil.Debug("S.PolyLine: UpdateTotalDimensionFromText input",{event:t,dimensionLength:e});let i=0,n=0,s=0,a=0;const o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(let c=1;c<o.length;c++)n=Math.abs(o[c-1].x-o[c].x),s=Math.abs(o[c-1].y-o[c].y),a=Math.sqrt(n*n+s*s),i+=a;const r=e/i;let l=-(this.Frame.x*r-this.Frame.x);l-=(this.Frame.width*r-this.Frame.width)/2;let h=-(this.Frame.y*r-this.Frame.y);h-=(this.Frame.height*r-this.Frame.height)/2,this.ScaleObject(l,h,null,0,r,r,!1),LogUtil.Debug("S.PolyLine: UpdateTotalDimensionFromText output",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint})}UpdateSegmentDimensionFromText(t,e,i){let n,s,a,o,r,l,h,c,u,d;LogUtil.Debug("S.PolyLine: UpdateSegmentDimensionFromText input",{event:t,dimensionLength:e,segmentIndex:i});const p=new HitResult(-1,0,null);if(T3Gv.opt.ob=Utils1.DeepCopy(this),n=Utils1.CalcAngleFromPoints(this.polylist.segs[i-1].pt,this.polylist.segs[i].pt),this.polylist.segs[i-1].pt.x===this.polylist.segs[i].pt.x&&this.polylist.segs[i-1].pt.y===this.polylist.segs[i].pt.y){const t=1===i?2:i-1;n=Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),n=n+90>=360?n-270:n+90}s=360-n;const g=2*Math.PI*(s/360);a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),o=this.polylist.closed&&this instanceof Instance.Shape.PolyLineContainer?T3Gv.opt.InflateLine(a,this.StyleRecord.Line.BThick,this.polylist.closed,this.Dimensions&NvConstant.DimensionFlags.Exterior):Utils1.DeepCopy(a),o.forEach((t=>{t.x+=this.Frame.x,t.y+=this.Frame.y}));let f=i,m=i-1;if(!this.polylist.closed&&1===i&&o.length>2&&(f=0,m=1),r=o[f].x,l=o[f].y,Utils3.RotatePointsAboutCenter(this.Frame,-g,o),o[m].x=o[f].x<o[m].x?o[f].x+e:o[f].x-e,Utils3.RotatePointsAboutCenter(this.Frame,g,o),h=o[f].x,c=o[f].y,i===this.polylist.segs.length-1){if(this.AdjustLineEnd(null,h,c,this.polylist.closed?OptConstant.ActionTriggerType.PolyEnd:OptConstant.ActionTriggerType.LineEnd),!this.polylist.closed){const t=[{id:OptConstant.HookPts.KTR,x:h,y:c}];this.ClosePolygon(this.BlockID,t,p)&&(this.polylist.segs[this.polylist.segs.length-1].pt=Utils1.DeepCopy(this.polylist.segs[0].pt),this.polylist.closed=!0,this instanceof _PolyLine&&this.MaintainDimensionThroughPolygonOpennessChange(this.polylist.closed))}}else if(this.polylist.closed||1!==i)if(u=h-r,d=c-l,this.polylist.closed&&this.polylist.dim.x&&this.polylist.dim.y){const t=this.polylist.dim.x,e=this.polylist.dim.y<1?1:this.polylist.dim.y,n=this.Frame.width/t,s=this.Frame.height/e;this.polylist.segs[i].pt.x+=u*n,this.polylist.segs[i].pt.y+=d*s}else this.polylist.segs[i].pt.x+=u,this.polylist.segs[i].pt.y+=d;else{this.AdjustLineStart(null,h,c,OptConstant.ActionTriggerType.LineStart);const t=[{id:OptConstant.HookPts.KTL,x:h,y:c}];this.ClosePolygon(this.BlockID,t,p)&&(this.polylist.segs[0].pt=Utils1.DeepCopy(this.polylist.segs[this.polylist.segs.length-1].pt),this.polylist.closed=!0,this instanceof _PolyLine&&this.MaintainDimensionThroughPolygonOpennessChange(this.polylist.closed))}LogUtil.Debug("S.PolyLine: UpdateSegmentDimensionFromText output",{polylist:this.polylist,Frame:this.Frame})}UpdateDimensionFromText(t,e,i){LogUtil.Debug("S.PolyLine: UpdateDimensionFromText input",{event:t,dimensionText:e,dimensionData:i});let n=-1,s=0,a=0;if(i.angleChange)return void this.UpdateLineAngleDimensionFromText(t,e,i);const o=i.segment;SvgUtil.ShowSVGSelectionState(this.BlockID,!1);const r=this.GetDimensionValueFromString(e,o);if(r>=0&&(n=this.GetDimensionLengthFromValue(r)),n<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),void SvgUtil.RenderDirtySVGObjects();const l=Utils1.DeepCopy(this);if(!(this.Dimensions&NvConstant.DimensionFlags.AllSeg)&&(this.Dimensions&NvConstant.DimensionFlags.EndPts||this.Dimensions&NvConstant.DimensionFlags.Total))this.Dimensions&NvConstant.DimensionFlags.EndPts?this.UpdateEndPointDimensionFromText(t,n):this.Dimensions&NvConstant.DimensionFlags.Total&&this.UpdateTotalDimensionFromText(t,n);else{this.UpdateSegmentDimensionFromText(t,n,o);const e={wdDim:-1,htDim:-1};this.GetPolyRectangularInfo(e)?o===e.wdDim||o===e.wdDim+2?(this.rwd=r,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0)):o!==e.htDim&&o!==e.htDim+2||(this.rht=r,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!0)):(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1))}OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let h=0;h<this.hooks.length;h++)OptCMUtil.SetLinkFlag(this.hooks[h].objid,DSConstant.LinkFlags.Move);if(T3Gv.opt.ActionTriggerData=o,HookUtil.MaintainLink(this.BlockID,this,l,OptConstant.ActionTriggerType.PolyNode),this.Frame.x<0||this.Frame.y<0){const t=this.Frame;t.x<0&&(s=-t.x,t.x+=s),t.y<0&&(a=-t.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(a+=OptConstant.Common.DimDefaultStandoff),t.y+=a),this.StartPoint.x+=s,this.StartPoint.y+=a,this.EndPoint.x+=s,this.EndPoint.y+=a,T3Gv.opt.SetObjectFrame(this.BlockID,t)}this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("S.PolyLine: UpdateDimensionFromText output",{Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint})}GetLineChangeFrame(){LogUtil.Debug("S.PolyLine: GetLineChangeFrame input");let t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);return t.width<OptConstant.Common.SegDefLen&&(t.width=OptConstant.Common.SegDefLen),t.height<OptConstant.Common.SegDefLen&&(t.height=OptConstant.Common.SegDefLen),LogUtil.Debug("S.PolyLine: GetLineChangeFrame output",t),t}CancelObjectDraw(){return LogUtil.Debug("S.PolyLine: CancelObjectDraw input"),LMEvtUtil.UnbindActionClickHammerEvents(),T3Gv.opt.WorkAreaHammer.off("doubletap"),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),ObjectUtil$1.AddToDirtyList(this.BlockID),SvgUtil.RenderDirtySVGObjects(),SelectUtil.SelectObjects([this.BlockID],!1,!0),LogUtil.Debug("S.PolyLine: CancelObjectDraw output",!0),!0}GetBoundingBox(){LogUtil.Debug("S.PolyLine: GetBoundingBox input");const t=this.Frame;return LogUtil.Debug("S.PolyLine: GetBoundingBox output",t),t}IsRightAngle(t,e){LogUtil.Debug("S.PolyLine: IsRightAngle input",{segmentIndex:t,tolerance:e});let i=t-1;if(i<0){if(!this.polylist.closed)return LogUtil.Debug("S.PolyLine: IsRightAngle output",!1),!1;i=this.polylist.segs.length-1}let n=t+1;if(n>this.polylist.segs.length-1){if(!this.polylist.closed)return LogUtil.Debug("S.PolyLine: IsRightAngle output",!1),!1;n=1}const s=Utils1.CalcAngleFromPoints(this.polylist.segs[i].pt,this.polylist.segs[t].pt),a=Utils1.CalcAngleFromPoints(this.polylist.segs[t].pt,this.polylist.segs[n].pt),o=Math.abs(s-a),r=Math.abs(90-o)<=e||Math.abs(270-o)<=e;return LogUtil.Debug("S.PolyLine: IsRightAngle output",r),r}GetPolyRectangularInfo(t){LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo input:",t);let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),i=!0;if(5!==this.polylist.segs.length||!this.polylist.closed)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;let n=[];const s=e.length;for(let p=0;p<s;p++)p<s-1&&e[p].x===e[p+1].x&&e[p].y===e[p+1].y||n.push(e[p]);if(e=n,5!==e.length)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;let a=0;for(let p=0;p<e.length-1&&i;p++){let t=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(e[p],e[p+1]);if(p>0){let e=t-a;e<0&&(e+=2*Math.PI),e>Math.PI&&(e-=Math.PI),e>=Math.PI/2-.052&&e<=Math.PI/2+.052||(i=!1)}a=t}let o=Utils2.GetDistanceBetween2Points(e[0],e[1]),r=Utils2.GetDistanceBetween2Points(e[2],e[3]),l=o/r;if(l<=.99||l>=1.01)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;o=Utils2.GetDistanceBetween2Points(e[1],e[2]),r=Utils2.GetDistanceBetween2Points(e[3],e[4]);let h=o/r;if(h<=.99||h>=1.01)return LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!1),!1;let c,u,d=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(e[0],e[1]);return d<Math.PI/4||d>1.5*Math.PI||d>.75*Math.PI&&d<1.25*Math.PI?(c=1,u=2):(c=2,u=1),t&&(t.wdDim=c,t.htDim=u),LogUtil.Debug("S.PolyLine: GetPolyRectangularInfo output:",!0),!0}GetSegmentsBeforeAndAfter(t,e){LogUtil.Debug("S.PolyLine: GetSegmentsBeforeAndAfter input:",{segmentIndex:t,segmentsInfo:e}),e.segAfter=t+1,e.segAfter>=this.polylist.segs.length&&(e.segAfter=this.polylist.closed?1:-1),e.segBefore=t-1,0===e.segBefore&&(e.segBefore=this.polylist.closed?this.polylist.segs.length-1:-1),LogUtil.Debug("S.PolyLine: GetSegmentsBeforeAndAfter output:",e)}MaintainDimensionThroughPolygonOpennessChange(t){LogUtil.Debug("S.PolyLine: MaintainDimensionThroughPolygonOpennessChange input:",t),t&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total|NvConstant.DimensionFlags.EndPts,!1),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,!0)),LogUtil.Debug("S.PolyLine: MaintainDimensionThroughPolygonOpennessChange output:",this.Dimensions)}GetUnrotatedBoundingBoxOfProposedFrame(t){LogUtil.Debug("S.PolyLine: GetUnrotatedBoundingBoxOfProposedFrame input:",t);let e=Utils1.DeepCopy(t),i=this.GetDimensionsRect(),n=0,s=0;return i.width>0?(n=i.width-this.Frame.width,s=i.height-this.Frame.height):this.StyleRecord&&this.StyleRecord.Line&&this.StyleRecord.Line.Thickness>OptConstant.Common.KnobSize?(n=this.StyleRecord.Line.Thickness,s=this.StyleRecord.Line.Thickness):(n=OptConstant.Common.KnobSize,s=OptConstant.Common.KnobSize),Utils2.InflateRect(e,n/2,s/2),LogUtil.Debug("S.PolyLine: GetUnrotatedBoundingBoxOfProposedFrame output:",e),e}AdjustPolySeg(t,e,i,n,s,a,o,r,l){LogUtil.Debug("S.PolyLine: AdjustPolylineSegment input:",{event:t,initialX:e,initialY:i,newPointX:n,newPointY:s,moveData:a,offsetEnabled:o,minDistance:r,maxDistance:l});let h=Utils1.DeepCopy(this.polylist),c=Utils1.DeepCopy(this.Frame),u=Utils1.DeepCopy(this.StartPoint),d=Utils1.DeepCopy(this.EndPoint);const p=this.GetUnrotatedBoundingBoxOfProposedFrame(this.Frame),g=p.x<0||p.y<0;let f=[];const m={x:e,y:i},v={x:n,y:s};f.push(m),f.push(v);let b=a.moveAngle;const y=a.hitSegment;9999===b&&(b=this.GetSegmentAdjustAngle(y),a.moveAngle=b),b=360-b;const S=2*Math.PI*b/360;let x=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);const w=x[y].x,C=x[y].y;if(Utils3.RotatePointsAboutCenter(this.Frame,-S,x),Utils3.RotatePointsAboutCenter(this.Frame,-S,f),Math.abs(f[1].x-f[0].x)<r)return LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output: false (<minDistance)"),!1;if(l&&l>0&&Math.abs(f[1].x-f[0].x)>l)return LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output: false (>maxDistance)"),!1;if(isNaN(f[1].x-f[0].x))return LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output: false (NaN difference)"),!1;const T=f[1].x-f[0].x;x[y-1].x+=T,x[y].x+=T,Utils3.RotatePointsAboutCenter(this.Frame,S,x);const D=x[y].x-w,k=x[y].y-C,$=this.GetScale();if(y-1!=0){const t={x:this.polylist.segs[y-1].pt.x+D/$.x,y:this.polylist.segs[y-1].pt.y+k/$.y};this.polylist.segs[y-1].pt=Utils1.DeepCopy(t)}if(y!==this.polylist.segs.length-1){const t={x:this.polylist.segs[y].pt.x+D/$.x,y:this.polylist.segs[y].pt.y+k/$.y};this.polylist.segs[y].pt=Utils1.DeepCopy(t)}const O=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let P=!1;y-1==0&&(this.AdjustLineStart(O,x[y-1].x,x[y-1].y,OptConstant.ActionTriggerType.LineStart),P=!0),y===this.polylist.segs.length-1&&(this.AdjustLineEnd(O,x[y].x,x[y].y,this.polylist.closed?OptConstant.ActionTriggerType.PolyEnd:OptConstant.ActionTriggerType.LineEnd),P=!0),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),P?this.CalcFrame():(this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame));const L=this.GetUnrotatedBoundingBoxOfProposedFrame(this.Frame);if(!g&&(L.x<0||L.y<0))if(o){let e={x:0,y:0};L.x<0&&(e.x=-L.x),L.y<0&&(e.y=-L.y),this.OffsetShape(e.x,e.y);const i=this.GetListOfEnclosedObjects(!1);for(let t=0;t<i.length;t++)ObjectUtil$1.GetObjectPtr(i[t],!0).OffsetShape(e.x,e.y),OptCMUtil.SetLinkFlag(i[t],DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(i[t]);this.UpdateDrawing(t)}else this.polylist=Utils1.DeepCopy(h),this.Frame=Utils1.DeepCopy(c),this.StartPoint=Utils1.DeepCopy(u),this.EndPoint=Utils1.DeepCopy(d),this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame);const I=this.GetDimensionsForDisplay(),A=new SelectionAttr;return A.width=I.width,A.height=I.height,A.left=I.x,A.top=I.y,UIUtil.UpdateDisplayCoordinates(I,v,CursorConstant.CursorTypes.Grow,this),LogUtil.Debug("S.PolyLine: AdjustPolylineSegment output:",{polylist:this.polylist,Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint}),!0}GetSegmentAdjustAngle(t){LogUtil.Debug("S.PolyLine: GetSegmentAdjustAngle input:",t);let e=9999,i={segBefore:0,segAfter:0},n=0;if(this.polylist.segs.length<=5){this.GetSegmentsBeforeAndAfter(t,i);let s=i.segAfter;if(n=i.segBefore,-1!=n&&(this.GetSegmentsBeforeAndAfter(n,i),-1!=i.segBefore&&this.IsRightAngle(i.segBefore,3)&&(e=Utils1.CalcAngleFromPoints(this.polylist.segs[n-1].pt,this.polylist.segs[n].pt))),9999===e&&-1!=s&&this.IsRightAngle(s,3)&&(e=Utils1.CalcAngleFromPoints(this.polylist.segs[s-1].pt,this.polylist.segs[s].pt)),9999!==e){((t,e)=>{let i=90-t;return t+=i,(e+=i)>=360&&(e-=360),e<0&&(e+=360),Math.abs(90-e)<5||Math.abs(180-e)<5})(Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),e)&&(e=9999)}}return 9999===e&&(e=Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),e+=90,e>=360&&(e-=360)),LogUtil.Debug("S.PolyLine: GetSegmentAdjustAngle output:",e),e}};let PolyLine$1=_PolyLine;__decorateClass$3([Type((()=>PolyList))],PolyLine$1.prototype,"polylist",2);class PolyLineContainer extends PolyLine$1{constructor(t){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t),(t=t||{}).Dimensions=void 0===t.Dimensions?NvConstant.DimensionFlags.Always:t.Dimensions,t.objecttype=void 0===t.objecttype?NvConstant.FNObjectTypes.FlWall:t.objecttype,t.TextFlags=void 0===t.TextFlags?0:t.TextFlags,t.TextFlags=Utils2.SetFlag(t.TextFlags,NvConstant.TextFlags.None,!0),super(t),this.T3Type="PolyLineContainer",null!==this.StyleRecord&&void 0!==this.StyleRecord||(this.StyleRecord=new QuickStyle),LogUtil.Debug("= S.PolyLineContainer: Output instance:",this)}CreateShape(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e);const i=super.CreateShape(t,e);return LogUtil.Debug("= S.PolyLineContainer: Output result:",i),i}NoRotate(){LogUtil.Debug("= S.PolyLineContainer: Checking if rotation is allowed");const t=this.polylist.closed;return LogUtil.Debug("= S.PolyLineContainer: Rotation allowed:",t),!t}GetKnobSize(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t);const e=1*OptConstant.Common.KnobSize/1*2;return LogUtil.Debug("= S.PolyLineContainer: Output knobSize:",e),e}GetCornerKnobImages(){LogUtil.Debug("= S.PolyLineContainer: Fetching corner knob images");const t={nwse:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft,nesw:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight};return LogUtil.Debug("= S.PolyLineContainer: Corner knob images:",t),t}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n);let s,a=0,o=0,r=null,l=null,h=0;const c=-1!=navigator.userAgent.toLowerCase().indexOf("firefox");if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&(wallOpt&&wallOpt.IsAddingWalls&&wallOpt.IsAddingWalls()||T3Constant.DocContext.UsingWallTool))return null;a=this.GetKnobSize(t);let u=t.docInfo.docToScreenScale;if(t.docInfo.docScale<=.5&&(u*=2),a/=u,!(l=super.CreateActionTriggers.call(this,t,e,i,n)))return null;h=a/2;const d={svgDoc:t,shapeType:OptConstant.CSType.Image,knobSize:a,fillOpacity:1,strokeSize:0,knobID:OptConstant.ActionTriggerType.MovePolySeg,cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};if(this.flags&NvConstant.ObjFlags.Lock?(d.fillColor="gray",d.locked=!0):this.NoGrow()&&(d.fillColor="red",d.strokeColor="red",d.cursorType=CursorConstant.CursorType.Default),0!==(s=this.polylist.segs.length)){if(s>2&&0==(this.flags&NvConstant.ObjFlags.Lock))for(let t=1;t<s;t++){switch(d.cursorType=this.CalcCursorForAngle(this.GetSegmentAdjustAngle(t)),this.NoGrow()&&(d.cursorType=CursorConstant.CursorType.Default),this.polylist.segs[t].LineType){case OptConstant.LineType.LINE:d.x=this.polylist.segs[t-1].pt.x+(this.polylist.segs[t].pt.x-this.polylist.segs[t-1].pt.x)/2+h+(this.StartPoint.x-this.Frame.x),d.y=this.polylist.segs[t-1].pt.y+(this.polylist.segs[t].pt.y-this.polylist.segs[t-1].pt.y)/2+h+(this.StartPoint.y-this.Frame.y),d.x-=a/2,d.y-=a/2;break;case OptConstant.LineType.ARCLINE:case OptConstant.LineType.PARABOLA:case OptConstant.LineType.ARCSEGLINE:const e=l.GetElementById(OptConstant.ActionTriggerType.PolyAdj,t);if(e){const i=e.GetPos(),n=[new Point$1(this.polylist.segs[t-1].pt.x,this.polylist.segs[t-1].pt.y),i,new Point$1(this.polylist.segs[t].pt.x,this.polylist.segs[t].pt.y)];o=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(n[0],n[2]),Utils3.RotatePointsAboutPoint(n[1],-o,n);const s=new Point$1(n[1].x,n[1].y),a=e.GetGeometryBBox();s.x+=a.width+3,n.push(s),Utils3.RotatePointsAboutPoint(n[1],o,n),d.x=n[3].x,d.y=n[3].y}}r=this.GenericKnob(d),r.SetUserData({hitSegment:t,moveAngle:9999}),r&&r.SetURL&&(r.SetURL(CursorConstant.Knob.Path+CursorConstant.Knob.ExpandVert),r.ExcludeFromExport(!0)),o=Utils1.CalcAngleFromPoints(this.polylist.segs[t-1].pt,this.polylist.segs[t].pt),0!==o&&(c?(o>=45&&o<=135||o>=235&&o<315)&&r&&r.SetURL&&r.SetURL(CursorConstant.Knob.Path+CursorConstant.Knob.ExpandHoriz):r.SetRotation(o)),l.AddElement(r)}return LogUtil.Debug("= S.PolyLineContainer: Output actionTriggers:",l),l}}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n);const s=super.PostCreateShapeCallback(t,e,i,n);return LogUtil.Debug("= S.PolyLineContainer: Output result:",s),s}UpdateSVG(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e);const i=t.PathCreator();if(i.BeginPath(),e.length>1){i.MoveTo(e[0].x,e[0].y);for(let t=1;t<e.length;t++)i.LineTo(e[t].x,e[t].y)}this.polylist.closed&&i.ClosePath(),i.Apply(),LogUtil.Debug("= S.PolyLineContainer: Updated SVG path")}MostlyContains(t){LogUtil.Debug("= S.PolyLineContainer: Input shape:",t);let e=0,i=!1;const n={},s=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1);if(LayerUtil.ActiveVisibleZList().indexOf(t.BlockID)<0)return!1;0!==t.RotationAngle&&(e=-t.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(t.Frame,e,s));const a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1),o=s.length;for(let h=0;h<o;h++)if(PolyUtil.PolyPtInPolygon(a,s[h])){i=!0;break}if(!i)return!1;if(!Utils2.GetPolyRect(n,s))return!1;0===n.width&&(n.width=1),0===n.height&&(n.height=1);const r=Utils2.IntersectRect(this.Frame,n),l=!!r&&r.width*r.height>n.width*n.height*.75;return LogUtil.Debug("= S.PolyLineContainer: Output result:",l),l}InterceptMoveOperation(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t);let e,i=[],n=LayerUtil.ZList(),s=!1;try{if(e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget),!e)return!1;const a=e.GetTargetForEvent(t).GetID(),o=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);if(a===OptConstant.SVGElementClass.DimText)return!0;if(-1===this.PolyHitSeg(o)&&(s=!0),s){SelectUtil.ClearSelectionClick(),i.push(this.BlockID);for(let t=0;t<n.length;t++){const e=ObjectUtil$1.GetObjectPtr(n[t],!1);this.BlockID===e.BlockID||e.hooks.length||this.MostlyContains(e)&&i.push(e.BlockID)}return SelectUtil.SelectObjects(i,!1,!1),T3Gv.opt.postMoveSelectId=this.BlockID,SvgUtil.HideAllSVGSelectionStates(),LogUtil.Debug("= S.PolyLineContainer: Output selectedObjects:",i),!1}return!1}catch(a){throw this.LMActionClickExpCleanup(a),T3Gv.opt.ExceptionCleanup(a),a}}SetupInterceptMove(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t),T3Gv.opt.eventTimestamp=Date.now(),t.stopPropagation();const e=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(null===e)return!1;const i=e.ID;T3Gv.opt.actionStoredObjectId=i,T3Gv.stdObj.PreserveBlock(i);const n=OptConstant.ActionTriggerType.MovePolySeg;T3Gv.opt.actionTriggerId=n,this.LMActionPreTrack(i,n),T3Gv.opt.actionSvgObject=e;let s=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);s=DrawUtil.DoAutoGrowDrag(s);const a=new HitResult(-1,0,null);this.Hit(s,!1,!1,a),T3Gv.opt.actionTriggerData={hitSegment:a.segment+1,moveAngle:9999};const o=s.x,r=s.y,l=this.GetSVGFrame();T3Gv.opt.actionBBox=Utils1.DeepCopy(l),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(l),SvgUtil.HideAllSVGSelectionStates(),T3Gv.opt.actionStartX=o,T3Gv.opt.actionStartY=r;const h=new HitResult(-1,0,null);return this.Hit(s,!1,!1,h),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0),!0}Inflate(t,e,i){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i);const n={},s=[],a=Utils1.DeepCopy(t);function o(t,e){const i=t.x-e.x,n=t.y-e.y;return Utils2.Sqrt(i*i+n*n)}function r(t,e,i){for(let n=e+1;n<t.length;n++)if(o(t[e],t[n])>1e-5)return n;return i&&e===t.length-1&&o(t[e],t[1])>1e-5?1:-1}function l(t,e){for(let i=e-1;i>=0;i--)if(o(t[e],t[i])>1e-5)return i;return-1}function h(t,e,i,n){const s=360-Utils1.CalcAngleFromPoints(e,i),a=2*Math.PI*(s/360),o=[{x:e.x,y:e.y},{x:i.x,y:i.y}];return Utils3.RotatePointsAboutCenter(t,-a,o),o[0].y+=n,o[1].y+=n,Utils3.RotatePointsAboutCenter(t,a,o),o}function c(t,e){const i={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2},n=360-Utils1.CalcAngleFromPoints(t[0],t[1]),s=2*Math.PI*(n/360);Utils3.RotatePointsAboutPoint(i,-s,t);const a=Math.abs(e);t[0].x<t[1].x?(t[0].x-=a,t[1].x+=a):(t[0].x+=a,t[1].x-=a),Utils3.RotatePointsAboutPoint(i,s,t)}function u(t,e,i,n){const s=360-Utils1.CalcAngleFromPoints(t[i],t[e]);return 360-Utils1.CalcAngleFromPoints(t[i],t[n])-s}Utils2.GetPolyRect(n,t);for(let d=0;d<t.length;d++){const t=l(a,d),o=r(a,d,i),p=t>=0?h(n,a[t],a[d],e):[],g=o>=0?h(n,a[d],a[o],e):[],f=[];if(t>=0&&o>=0){let i=u(a,t,d,o);if(i<0&&(i+=360),i>=30&&i<=330){const t={x:0,y:0};T3Gv.opt.GetIntersectPt(p[0],p[1],g[0],g[1],null,t)&&f.push(new Point$1(t.x,t.y))}else c(p,e),f.push(new Point$1(p[1].x,p[1].y)),c(g,e),f.push(new Point$1(g[0].x,g[0].y))}0===f.length&&(t>=0?f.push(new Point$1(p[1].x,p[1].y)):o>=0&&f.push(new Point$1(g[0].x,g[0].y))),s.push(...f)}return i&&s.length>0&&(s[0]=s[s.length-1]),LogUtil.Debug("= S.PolyLineContainer: Output inflatedPoints:",s),s}InflatePolyLine(t,e,i){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i);let n=this.Inflate(t,-e,i);return Utils2.IsPointInPoly(t,n[1])&&(n=this.Inflate(t,e,i)),LogUtil.Debug("= S.PolyLineContainer: Output inflatedPoints:",n),n}MovePolySeg(t,e,i,n,s){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n,s);const a=this.AdjustPolySeg(t,T3Gv.opt.actionStartX,T3Gv.opt.actionStartY,e,i,s,!1,2,1e3);a&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1),T3Gv.opt.actionStartX=e,T3Gv.opt.actionStartY=i),LogUtil.Debug("= S.PolyLineContainer: Output adjusted:",a)}AfterModifyShape(t,e){if(LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e),e===OptConstant.ActionTriggerType.MovePolySeg){(t=>{let e=0,i=-1,n=!1;const s=this.StyleRecord.Line.Thickness;let a=T3Gv.opt.actionTriggerData.moveAngle;const o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),r=o.length;if(0!==a){a=360-a;const t=2*Math.PI*(a/360);Utils3.RotatePointsAboutCenter(this.Frame,-t,o)}const l=o[t].x;if(this.polylist.closed){let t=!0;for(let e=0;e<r;e++)if(!Utils2.IsEqual(o[e].x,l,s)){t=!1;break}if(t)return}for(let c=t+1;c<r&&Utils2.IsEqual(o[c].x,l,s);c++)e++;let h=!0;if(0===e&&1===t&&Utils2.IsEqual(o[r-1].x,l,s)&&Utils2.IsEqual(o[r-2].x,l,s)&&(t=r-2,e=1,Utils2.IsEqual(o[0].y,o[r-2].y,s)||(h=!1)),e>0&&h&&(this.polylist.segs.splice(t,e),n=!0,t+1+e>=r&&1===e&&this.polylist.closed&&Utils2.IsEqual(o[0].x,l,s))){this.polylist.segs.splice(0,1);const t=this.polylist.segs[0].pt.x+this.StartPoint.x,e=this.polylist.segs[0].pt.y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,t,e,OptConstant.ActionTriggerType.LineStart)}for(let c=t-2;c>0&&Utils2.IsEqual(o[c].x,l,s);c--)i=c;if(!this.polylist.closed&&t===r-1&&3===r&&i<0&&Utils2.IsEqual(o[0].x,l,s)&&(i=0),this.polylist.closed&&1===i?Utils2.IsEqual(o[0].x,l,s)&&(i=0):1===i&&this.polylist.segs.length>2&&Utils2.IsEqual(o[0].x,l,s)&&(i=0),i>=0&&(this.polylist.segs.splice(i+1,t-1-i),n=!0),this.polylist.closed&&0===e&&i<0&&(t===r-1||t<=2)){const e=o[2].x;let i=!0;if(2!==t||Utils2.IsEqual(o[1].y,o[0].y,s)||(i=!1),Utils2.IsEqual(o[1].x,e,s)&&Utils2.IsEqual(o[0].x,e,s)&&i){this.polylist.segs.splice(0,2),n=!0;const t=this.polylist.segs[0].pt.x+this.StartPoint.x,e=this.polylist.segs[0].pt.y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,t,e,OptConstant.ActionTriggerType.LineStart)}else if(t===r-1){const e=o[t].x;if(Utils2.IsEqual(o[1].x,e,s)&&Utils2.IsEqual(o[0].x,e,s)){this.polylist.segs.splice(0,1),n=!0;const t=this.polylist.segs[0].pt.x+this.StartPoint.x,e=this.polylist.segs[0].pt.y+this.StartPoint.y;this.polylist.segs[0].pt.x=0,this.polylist.segs[0].pt.y=0,this.AdjustLineStart(null,t,e,OptConstant.ActionTriggerType.LineStart)}}else 2===t&&Utils2.IsEqual(o[1].x,e,s)&&Utils2.IsEqual(o[0].x,e,s)&&(this.polylist.segs.splice(1,1),n=!0)}n&&ObjectUtil$1.AddToDirtyList(this.BlockID)})(T3Gv.opt.actionTriggerData.hitSegment)}this.BaseLineAfterModifyShape(t,e),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}BaseLineAfterModifyShape(t,e){if(LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e),T3Gv.opt.actionSvgObject){const t=T3Gv.opt.actionSvgObject.GetElementById(OptConstant.Common.EllipseAxes);null!=t&&T3Gv.opt.actionSvgObject.RemoveElement(t)}T3Gv.opt.ob.Frame&&(HookUtil.MaintainLink(t,this,T3Gv.opt.ob,e),T3Gv.opt.ob={}),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),this.arcobj&&(this.arcobj=null),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}UpdateDimensionFromText(t,e,i){let n,s,a,o,r,l,h,c,u;LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i);let d={hitSegment:0,moveAngle:0},p=Utils1.DeepCopy(this),g=this.polylist.closed,f=!1,m=-1;if(i.hookedObjectInfo)return this.UpdateDimensionsFromTextForHookedObject(t,e,i);if(i.angleChange)return this.UpdateLineAngleDimensionFromText(t,e,i);if(a=i.segment,T3Gv.opt.ob=p,ObjectUtil$1.GetObjectPtr(this.BlockID,!0),SvgUtil.ShowSVGSelectionState(this.BlockID,!1),n=this.GetDimensionValueFromString(e,a),n>=0&&(s=this.GetDimensionLengthFromValue(n)),s<=0||n<0)return ObjectUtil$1.AddToDirtyList(this.BlockID),void SvgUtil.RenderDirtySVGObjects();d.hitSegment=a+1,d.hitSegment>=this.polylist.segs.length&&(d.hitSegment=g?1:a,f=!g),g||1!==a&&a!==this.polylist.segs.length-1||(d.hitSegment=a,f=!0),d.moveAngle=this.GetSegmentAdjustAngle(d.hitSegment),l=360-d.moveAngle,h=2*Math.PI*(l/360),o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),r=g&&this instanceof PolyLineContainer?T3Gv.opt.InflateLine(o,this.StyleRecord.Line.BThick,g,this.Dimensions&NvConstant.DimensionFlags.Exterior):Utils1.DeepCopy(o);for(let w=0;w<r.length;w++)r[w].x+=this.Frame.x,r[w].y+=this.Frame.y;c=r[a].x,u=r[a].y,Utils3.RotatePointsAboutCenter(this.Frame,-h,r);let v=Math.abs(r[a].y-r[a-1].y);if(Math.abs(s)<=v||f)return this.Dimensions&NvConstant.DimensionFlags.AllSeg||(m=this.Dimensions,this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,!0),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total,!1),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.EndPts,!1)),super.UpdateDimensionFromText(t,e,i),void(m>0&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,m&NvConstant.DimensionFlags.AllSeg),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total,m&NvConstant.DimensionFlags.Total),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.EndPts,m&NvConstant.DimensionFlags.EndPts)));let b=0===v?s:Math.sqrt(Math.pow(s,2)-Math.pow(v,2));r[a].x=r[a].x>r[a-1].x?r[a-1].x+b:r[a-1].x-b,Utils3.RotatePointsAboutCenter(this.Frame,h,r);let y=r[a].x,S=r[a].y;this.AdjustPolySeg(t,c,u,y,S,d,!0,0),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);for(let w=0;w<this.hooks.length;w++)OptCMUtil.SetLinkFlag(this.hooks[w].objid,DSConstant.LinkFlags.Move);T3Gv.opt.ActionTriggerData=a,HookUtil.MaintainLink(this.BlockID,this,p,OptConstant.ActionTriggerType.PolyNode);let x={wdDim:-1,htDim:-1};if(this.GetPolyRectangularInfo(x)?a===x.wdDim||a===x.wdDim+2?(this.rwd=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!0)):a!==x.htDim&&a!==x.htDim+2||(this.rht=n,this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!0)):(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),this.Frame.x<0||this.Frame.y<0){let t={x:0,y:0};this.Frame.x<0&&(t.x=-this.Frame.x,this.Frame.x+=t.x),this.Frame.y<0&&(t.y=-this.Frame.y,(this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&(t.y+=OptConstant.Common.DimDefaultStandoff),this.Frame.y+=t.y),this.StartPoint.x+=t.x,this.StartPoint.y+=t.y,this.EndPoint.x+=t.x,this.EndPoint.y+=t.y,T3Gv.opt.SetObjectFrame(this.BlockID,this.Frame)}this.UpdateDrawing(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}GetDimensionsForDisplay(){if(LogUtil.Debug("= S.PolyLineContainer: Getting dimensions for display"),this.objecttype!==NvConstant.FNObjectTypes.FlWall){const t=this.BaseLineGetDimensions();return LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",t),t}const t=this.GetDimensionPoints(),e={};Utils2.GetPolyRect(e,t);const i={x:e.x,y:e.y,width:e.width,height:e.height};return LogUtil.Debug("= S.PolyLineContainer: Output result:",i),i}BaseLineGetDimensions(){LogUtil.Debug("= S.PolyLineContainer: Getting base line dimensions");let t=this.EndPoint.x-this.StartPoint.x,e=this.EndPoint.y-this.StartPoint.y,i={x:Utils2.Sqrt(t*t+e*e),y:0};return LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",i),i}CanSnapToShapes(t){let e;return LogUtil.Debug("= S.PolyLineContainer: Input shape:",t),t&&!this.polylist.closed?(t.distanceonly=NvConstant.GuideDistanceTypes.PolyWall,e=this.BlockID):e=this.BlockID,LogUtil.Debug("= S.PolyLineContainer: Output result:",e),e}IsSnapTarget(){LogUtil.Debug("= S.PolyLineContainer: Checking if it is a snap target");return LogUtil.Debug("= S.PolyLineContainer: Output result:",false),false}GuideDistanceOnly(){LogUtil.Debug("= S.PolyLineContainer: Checking guide distance type");const t=this.polylist.closed?NvConstant.GuideDistanceTypes.Room:NvConstant.GuideDistanceTypes.PolyWall;return LogUtil.Debug("= S.PolyLineContainer: Output guide distance type:",t),t}SetCursors(){LogUtil.Debug("= S.PolyLineContainer: Setting cursors");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(T3Gv.opt.crtOpt===OptConstant.OptTypes.AddCorner){const e=t.GetElementById(OptConstant.SVGElementClass.Slop);e&&e.SetCursor(CursorConstant.CursorType.Cross)}else this.BaseShapeSetCursors();LogUtil.Debug("= S.PolyLineContainer: Cursors set")}BaseShapeSetCursors(){LogUtil.Debug("= S.PolyLineContainer: Setting cursors");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),e=(this.TextFlags&NvConstant.TextFlags.OneClick)>0;switch(OptCMUtil.GetEditMode()){case NvConstant.EditState.Default:if(this.BaseDrawingObjectSetCursors(),e){const e=t.GetElementById(OptConstant.SVGElementClass.Shape);e&&e.SetCursor(CursorConstant.CursorType.Text),t.GetElementById(OptConstant.SVGElementClass.Slop)}break;case NvConstant.EditState.FormatPaint:const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&i.SetCursor(CursorConstant.CursorType.Paint);const n=t.GetElementById(OptConstant.SVGElementClass.Slop);n&&n.SetCursor(CursorConstant.CursorType.Paint);break;default:this.BaseDrawingObjectSetCursors()}LogUtil.Debug("= S.PolyLineContainer: Cursors set")}BaseDrawingObjectSetCursors(){LogUtil.Debug("= S.PolyLineContainer: Setting cursors");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e=!1;if(!(this.flags&NvConstant.ObjFlags.Lock)&&t)if(OptCMUtil.GetEditMode()===NvConstant.EditState.Default){const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&(this.objecttype===NvConstant.FNObjectTypes.FrameContainer?i.SetCursor(CursorConstant.CursorType.Default):i.SetCursor(CursorConstant.CursorType.Add));[OptConstant.ShapeIconType.HyperLink,OptConstant.ShapeIconType.Notes,OptConstant.ShapeIconType.ExpandedView,OptConstant.ShapeIconType.Comment,OptConstant.ShapeIconType.Attachment,OptConstant.ShapeIconType.FieldData].forEach((e=>{const i=t.GetElementById(e);i&&i.SetCursor(CursorConstant.CursorType.Pointer)}));const n=t.GetElementById(OptConstant.SVGElementClass.Slop);n&&n.SetCursor(CursorConstant.CursorType.Add);const s=T3Gv.opt.svgDoc.GetActiveEdit();if(this.DataID&&this.DataID>=0&&t.textElem&&(t.textElem===s?(i.SetCursor(CursorConstant.CursorType.Text),t.textElem.SetCursorState(CursorConstant.CursorState.EditLink)):t.textElem.SetCursorState(CursorConstant.CursorState.LinkOnly)),this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select&&this.IsSelected()){t.GetElementListWithId(OptConstant.SVGElementClass.DimText).forEach((t=>{t.SetCursorState(CursorConstant.CursorState.EditOnly),t===s&&(e=!0)})),e&&(i.SetCursor(null),n&&n.SetCursor(null))}}else this.ClearCursors();LogUtil.Debug("= S.PolyLineContainer: Cursors set")}GetListOfEnclosedObjects(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e);const i=LayerUtil.ActiveVisibleZList(),n=[];if(!this.polylist.closed)return LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",n),n;this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!0,null);for(let s=0;s<i.length;s++){const a=ObjectUtil$1.GetObjectPtr(i[s],!1);if(this.BlockID!==a.BlockID){const i=e&&1===a.hooks.length&&a.hooks[0].objid===this.BlockID;(!t&&a.hooks.length||this.MostlyContains(a)||i)&&n.push(a.BlockID)}}return LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",n),n}AfterRotateShape(t){LogUtil.Debug("= S.PolyLineContainer: Input event:",t);const e=T3Gv.opt.rotateEndRotation;this.RotateAllInContainer(t,e),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects(),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0)}RotateAllInContainer(t,e){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e),LayerUtil.ActiveVisibleZList();let i=[];T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId);let n=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,s=Utils1.DeepCopy(n);if(SelectUtil.ClearSelectionClick(),i=this.GetListOfEnclosedObjects(!1,!0),i.push(this.BlockID),i.length<=1){let n=T3Gv.opt.rotateStartRotation,s=T3Gv.opt.rotateEndRotation;return T3Gv.opt.ob=Utils1.DeepCopy(this),T3Gv.opt.rotateStartRotation=0,T3Gv.opt.rotateEndRotation=e,T3Gv.opt.rotateStartPoint.x=this.RotateKnobPt.x,T3Gv.opt.rotateStartPoint.y=this.RotateKnobPt.y,T3Gv.opt.rotatePivotX=this.Frame.x+this.Frame.width/2,T3Gv.opt.rotatePivotY=this.Frame.y+this.Frame.height/2,super.AfterRotateShape(t),T3Gv.opt.rotateStartRotation=n,T3Gv.opt.rotateEndRotation=s,SelectUtil.SelectObjects(i,!1,!1),T3Gv.opt.ob={},LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",i),i}SelectUtil.SelectObjects(i,!1,!1);let a=ToolActUtil.GroupSelected(!0,null,!1,!1,!1);n=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data;let o=ObjectUtil$1.GetObjectPtr(a,!0);if(null===o)return;T3Gv.opt.svgObjectLayer.GetElementById(o.BlockID).SetRotation(e),o.RotationAngle=e,ToolActUtil.UngroupShape(a,!0);let r=i.pop();SelectUtil.SelectObjects(s,!1,!1);let l=ObjectUtil$1.GetObjectPtr(r,!1);return l.UpdateFrame(),l&&(l.r.x<0||l.r.y<0)&&ToolActUtil.Undo(),LogUtil.Debug("= S.PolyLineContainer: Output enclosedObjects:",i),i}GetPointsForAreaDimension(){LogUtil.Debug("= S.PolyLineContainer: Getting points for area dimension");const t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e=this.Dimensions&NvConstant.DimensionFlags.Exterior?T3Gv.opt.InflateLine(t,this.StyleRecord.Line.BThick,this.polylist.closed,!0):T3Gv.opt.InflateLine(t,this.StyleRecord.Line.BThick,this.polylist.closed,!1);return LogUtil.Debug("= S.PolyLineContainer: Output points for area dimension:",e),e}GetDimensionPoints(){LogUtil.Debug("= S.PolyLineContainer: Getting dimension points");let t=[],e=[],i=0,n=0,s=0,a={x:this.Frame.width/2,y:this.Frame.height/2},o={},r={};if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.EndPts)t.push(new Point$1(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y)),t.push(new Point$1(this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y));else if(!this.polylist.closed&&this.Dimensions&NvConstant.DimensionFlags.Total){e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(let t=1;t<e.length;t++)n=Math.abs(e[t-1].x-e[t].x),s=Math.abs(e[t-1].y-e[t].y),i+=Math.sqrt(n*n+s*s);o.x=a.x-i/2,o.y=a.y,t.push(new Point$1(o.x,o.y)),r.x=a.x+i/2,r.y=a.y,t.push(new Point$1(r.x,r.y));const l=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(new Point$1(0,0),new Point$1(this.Frame.width,this.Frame.height));Utils3.RotatePointsAboutPoint(a,l,t)}else e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),t=this.polylist.closed?T3Gv.opt.InflateLine(e,this.StyleRecord.Line.BThick,this.polylist.closed,this.Dimensions&NvConstant.DimensionFlags.Exterior):Utils1.DeepCopy(e);return LogUtil.Debug("= S.PolyLineContainer: Output dimension points:",t),t}CustomSnap(t,e,i,n,s,a){var o,r;LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n,s,a);let l=32768,h=32768,c=32768,u=-1;const d=LayerUtil.ZList(),p=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);for(let f=0;f<p.length;f++)p[f].x+=t,p[f].y+=e;if(a){const t={};Utils3.LineDStyleHit(p,{x:a.x+i,y:a.y+n},this.StyleRecord.Line.Thickness,0,t)&&t.lpHit>=0&&(u=t.lpHit)}for(let f=0;f<p.length;f++)p[f].x+=i,p[f].y+=n;const g={};Utils2.GetPolyRect(g,p);for(let f=0;f<d.length;f++)if(d[f]!==this.BlockID){if(T3Gv.opt.moveList&&T3Gv.opt.moveList.includes(d[f]))continue;const t=ObjectUtil$1.GetObjectPtr(d[f],!1);if(t instanceof PolyLineContainer){const e=u>=0?u:1,i=u>=0?u+1:p.length;for(let n=e;n<i;n++){const e=new HitResult(-1,0,null);let i={x:null==(o=p[n-1])?void 0:o.x,y:null==(r=p[n-1])?void 0:r.y};if(!t.Hit(i,!1,!1,e)&&(i={x:p[n].x,y:p[n].y},!t.Hit(i,!1,!1,e)))continue;const s=e.segment+1,a=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),u=90-Utils1.CalcAngleFromPoints(p[n-1],p[n])+Utils1.CalcAngleFromPoints(a[s-1],a[s]);if(Math.abs(90-u)<=1||Math.abs(270-u)<=1){const e={x:i.x,y:i.y};t.SnapPointToSegment(s,e);const a=e.x-i.x,o=e.y-i.y;let r=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(p[n-1],p[n])/(2*Math.PI)*360;r>180&&(r-=180),r%90<1||r%90>89?r>=89&&r<=91?(Math.abs(a)>.02&&Math.abs(h)>Math.abs(a)&&(h=a),c=32768,Math.abs(t.Frame.y-g.y)<10?c=t.Frame.y-g.y:Math.abs(t.Frame.y-(g.y+g.height))<10?c=t.Frame.y-(g.y+g.height):Math.abs(t.Frame.y+t.Frame.height-g.y)<10?c=t.Frame.y+t.Frame.height-g.y:Math.abs(t.Frame.y+t.Frame.height-(g.y+g.height))<10&&(c=t.Frame.y+t.Frame.height-(g.y+g.height)),Math.abs(l)>Math.abs(c)&&(l=c)):Math.abs(o)>.02&&Math.abs(l)>Math.abs(o)&&(l=o,h=32768,Math.abs(t.Frame.x-g.x)<10?h=t.Frame.x-g.x:Math.abs(t.Frame.x-(g.x+g.width))<10?h=t.Frame.x-(g.x+g.width):Math.abs(t.Frame.x+t.Frame.width-g.x)<10?h=t.Frame.x+t.Frame.width-g.x:Math.abs(t.Frame.x+t.Frame.width-(g.x+g.width))<10&&(h=t.Frame.x+t.Frame.width-(g.x+g.width)),Math.abs(h),Math.abs(h)):(Math.abs(a)>.02||Math.abs(o)>.02)&&(Math.abs(h)>Math.abs(a)&&(h=a),Math.abs(l)>Math.abs(o)&&(l=o))}}}}return 32768!==h||32768!==l?(h<32768&&(a.x+=h),l<32768&&(a.y+=l),LogUtil.Debug("= S.PolyLineContainer: Output result:",!0),!0):(LogUtil.Debug("= S.PolyLineContainer: Output result:",!1),!1)}CanUseRFlags(){LogUtil.Debug("= S.PolyLineContainer: Checking if RFlags can be used");const t=this.GetPolyRectangularInfo(null);return LogUtil.Debug("= S.PolyLineContainer: Output result:",t),t}SetSize(t,e,i){if(LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i),null!==t){if(null===e&&1===Math.abs(t-this.Frame.width))return!0}else if(null!==e&&null===t&&1===Math.abs(e-this.Frame.height))return!0;this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1));const n=super.SetSize(t,e,i);return LogUtil.Debug("= S.PolyLineContainer: Output result:",n),n}AdjustDimensionLength(t){LogUtil.Debug("= S.PolyLineContainer: Input dimensionLength:",t);let e=t;if(this.polylist&&this.polylist.closed&&null!==this.GetPolyRectangularInfo(null)){const i=this.Dimensions&NvConstant.DimensionFlags.Exterior?-this.StyleRecord.Line.Thickness:this.StyleRecord.Line.Thickness;null!==t&&(e+=i)}return LogUtil.Debug("= S.PolyLineContainer: Output adjustedLength:",e),e}GetDimensionsForDisplay(){LogUtil.Debug("= S.PolyLineContainer: Getting dimensions for display");const t={width:this.Frame.width,height:this.Frame.height,x:this.Frame.x,y:this.Frame.y};return this.polylist&&this.polylist.closed&&(this.Dimensions&NvConstant.DimensionFlags.Exterior?(t.x-=this.StyleRecord.Line.Thickness/2,t.y-=this.StyleRecord.Line.Thickness/2,t.width+=this.StyleRecord.Line.Thickness,t.height+=this.StyleRecord.Line.Thickness):(t.x+=this.StyleRecord.Line.Thickness/2,t.y+=this.StyleRecord.Line.Thickness/2,t.width-=this.StyleRecord.Line.Thickness,t.height-=this.StyleRecord.Line.Thickness)),LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",t),t}GetSnapRect(){LogUtil.Debug("= S.PolyLineContainer: Getting snap rect");const t=this.GetDimensionsForDisplay();return LogUtil.Debug("= S.PolyLineContainer: Output dimensions:",t),t}GetDragR(){LogUtil.Debug("= S.PolyLineContainer: Getting drag rectangle");let t=new Rectangle;if(Utils2.CopyRect(t,this.r),this.polylist&&this.polylist.closed&&this.StyleRecord&&this.StyleRecord.Line){const e=this.StyleRecord.Line.BThick;Utils2.InflateRect(t,2*e,2*e)}return LogUtil.Debug("= S.PolyLineContainer: Output drag rectangle:",t),t}SetShapeOrigin(t,e,i,n){LogUtil.Debug("= S.PolyLineContainer: Input parameters:",t,e,i,n);let s=this.GetSVGFrame(),a=0,o=0;this.polylist&&this.polylist.closed&&n&&(this.Dimensions&NvConstant.DimensionFlags.Exterior?(s.x-=this.StyleRecord.Line.Thickness/2,s.y-=this.StyleRecord.Line.Thickness/2,s.width+=this.StyleRecord.Line.Thickness,s.height+=this.StyleRecord.Line.Thickness):(s.x+=this.StyleRecord.Line.Thickness/2,s.y+=this.StyleRecord.Line.Thickness/2,s.width-=this.StyleRecord.Line.Thickness,s.height-=this.StyleRecord.Line.Thickness)),null!==t&&(a=s.x-t),null!==e&&(o=s.y-e),this.StartPoint.x-=a,this.StartPoint.y-=o,this.EndPoint.x-=a,this.EndPoint.y-=o,this.CalcFrame(),LogUtil.Debug("= S.PolyLineContainer: Output frame:",s)}MaintainDimensionThroughPolygonOpennessChange(t){LogUtil.Debug("= S.PolyLineContainer: Input isClosed:",t);let e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1),i=!1;t&&(this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.Total|NvConstant.DimensionFlags.EndPts,!1),this.Dimensions=Utils2.SetFlag(this.Dimensions,NvConstant.DimensionFlags.AllSeg,!0)),i=t?!(this.Dimensions&NvConstant.DimensionFlags.Exterior):this.Dimensions&NvConstant.DimensionFlags.Exterior;let n=T3Gv.opt.InflateLine(e,this.StyleRecord.Line.Thickness/2,!0,i);if(n&&n.length===this.polylist.segs.length){this.StartPoint.x=n[0].x,this.StartPoint.y=n[0].y,this.EndPoint.x=n[n.length-1].x,this.EndPoint.y=n[n.length-1].y;for(let t=0;t<this.polylist.segs.length;t++)this.polylist.segs[t].pt.x=n[t].x-this.StartPoint.x,this.polylist.segs[t].pt.y=n[t].y-this.StartPoint.y}LogUtil.Debug("= S.PolyLineContainer: Output inflatedPoints:",n)}ChangeLineThickness(t){LogUtil.Debug("= S.PolyLineContainer: Input newThickness:",t);let e,i,n,s,a,o=[],r=[],l=this.StyleRecord.Line.Thickness;if(this.UpdateFrame(null),a=(l-t)/2,s=this,s.StyleRecord.Line.BThick&&s.polylist&&s.polylist.closed&&s.polylist.segs&&s.polylist.segs.length){if(s instanceof Instance.Shape.Polygon){let t={};t.Frame=s.Frame,i=new Instance.Shape.PolyLine(t),i.polylist=s.polylist,i.StartPoint=s.StartPoint,i.EndPoint=s.EndPoint}else i=s;if(n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,r),r.length>0)for(o.push(new Point$1(n[0].x,n[0].y)),e=0;e<r.length;e++)o.push(new Point$1(n[r[e]].x,n[r[e]].y));else o=Utils1.DeepCopy(n);n=T3Gv.opt.InflateLine(o,Math.abs(a),!0,a>=0),s.StartPoint.x=n[0].x,s.StartPoint.y=n[0].y,s.EndPoint.x=n[n.length-1].x,s.EndPoint.y=n[n.length-1].y;let t=Utils1.DeepCopy(s.polylist.segs);for(s.polylist.segs=[],e=0;e<n.length;e++)s.polylist.segs.push(new PolySeg(1,n[e].x-s.StartPoint.x,n[e].y-s.StartPoint.y)),e<t.length&&(s.polylist.segs[e].LineType=t[e].LineType,s.polylist.segs[e].ShortRef=t[e].ShortRef,s.polylist.segs[e].dataclass=t[e].dataclass,s.polylist.segs[e].dimDeflection=t[e].dimDeflection,s.polylist.segs[e].flags=t[e].flags,s.polylist.segs[e].param=t[e].param,s.polylist.segs[e].weight=t[e].weight);if(s instanceof Instance.Shape.BaseLine)s.CalcFrame();else if(s instanceof Instance.Shape.Polygon){l=s.StyleRecord.Line.BThick;let t=s.Frame.width/(s.Frame.width+2*l),e=s.Frame.height/(s.Frame.height+2*l),i=s.Frame.x*t-s.Frame.x+l,n=s.Frame.y*e-s.Frame.y+l;s.ScaleObject(i,n,null,0,t,e,!1)}}this.UpdateFrame(null),LogUtil.Debug("= S.PolyLineContainer: Output updated thickness:",t)}ChangeLineThickness(t){LogUtil.Debug("= S.PolyLineContainer: Input newThickness:",t);let e,i,n,s,a,o=[],r=[];const l=this.StyleRecord.Line.Thickness;if(this.UpdateFrame(null),a=(l-t)/2,s=this,s.StyleRecord.Line.BThick&&s.polylist&&s.polylist.closed&&s.polylist.segs&&s.polylist.segs.length){if(s instanceof Instance.Shape.Polygon){let t={};t.Frame=s.Frame,i=new Instance.Shape.PolyLine(t),i.polylist=s.polylist,i.StartPoint=s.StartPoint,i.EndPoint=s.EndPoint}else i=s;if(n=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,r),r.length>0)for(o.push(new Point$1(n[0].x,n[0].y)),e=0;e<r.length;e++)o.push(new Point$1(n[r[e]].x,n[r[e]].y));else o=Utils1.DeepCopy(n);n=T3Gv.opt.InflateLine(o,Math.abs(a),!0,a>=0),s.StartPoint.x=n[0].x,s.StartPoint.y=n[0].y,s.EndPoint.x=n[n.length-1].x,s.EndPoint.y=n[n.length-1].y;let t=Utils1.DeepCopy(s.polylist.segs);for(s.polylist.segs=[],e=0;e<n.length;e++)s.polylist.segs.push(new PolySeg(1,n[e].x-s.StartPoint.x,n[e].y-s.StartPoint.y)),e<t.length&&(s.polylist.segs[e].LineType=t[e].LineType,s.polylist.segs[e].ShortRef=t[e].ShortRef,s.polylist.segs[e].dataclass=t[e].dataclass,s.polylist.segs[e].dimDeflection=t[e].dimDeflection,s.polylist.segs[e].flags=t[e].flags,s.polylist.segs[e].param=t[e].param,s.polylist.segs[e].weight=t[e].weight);if(s instanceof Instance.Shape.BaseLine)s.CalcFrame();else if(s instanceof Instance.Shape.Polygon){const t=s.StyleRecord.Line.BThick,e=s.Frame.width/(s.Frame.width+2*t),i=s.Frame.height/(s.Frame.height+2*t),n=s.Frame.x*e-s.Frame.x+t,a=s.Frame.y*i-s.Frame.y+t;s.ScaleObject(n,a,null,0,e,i,!1)}}this.UpdateFrame(null),LogUtil.Debug("= S.PolyLineContainer: Output updated thickness:",t)}}class Line$1 extends BaseLine{constructor(t={}){(t=t||{}).LineType=OptConstant.LineType.LINE,super(t),this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.FixedPoint=t.FixedPoint||[0,0],this.LineOrientation=t.LineOrientation||OptConstant.LineOrientation.None,this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.ShortRef=t.ShortRef||0,this.shapeparam=t.shapeparam||0,this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.TextDirection=t.TextDirection||!1,this.CalcFrame()}GetLineShapePolyPoints(t,e){LogUtil.Debug("S.Line - Input:",{numPoints:t,adjustForFrame:e});let i=[],n=this.shapeparam,s=this.ShortRef;n<.01&&(s=0);let a=this.EndPoint.x-this.StartPoint.x,o=this.EndPoint.y-this.StartPoint.y,r=!1;switch(s){case 0:case OptConstant.LineTypes.LsMeasuringTape:i.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),i.push(new Point$1(this.EndPoint.x,this.EndPoint.y));break;case 1:case 2:2===s&&(r=!0);let t=Math.sqrt(a*a+o*o);if(0===t)break;let e=o/t,l=a/t,h=n*(t>200?200:t)/2,c=(t-2*h)/2,u=new Point$1(this.StartPoint.x,this.StartPoint.y);i.push(u);let d=new Point$1(this.StartPoint.x+c*l,this.StartPoint.y+c*e);i.push(d);let p=new Point$1(d.x+h*e,d.y-h*l);if(r){i.push(p);let t=new Point$1(p.x+h*l,p.y+h*e);i.push(t);let n=new Point$1(t.x-2*h*e,t.y+2*h*l);i.push(n);let s=new Point$1(n.x+h*l,n.y+h*e);i.push(s);let a=new Point$1(this.EndPoint.x,this.EndPoint.y);i.push(a)}else{let t=new Point$1(p.x+h*l-h*l/2,p.y+h*e-h*e/2);i.push(t);let n=new Point$1(t.x-2*h*e+2*h*l/2,t.y+2*h*l+2*h*e/2);i.push(n);let s=new Point$1(n.x+h*l,n.y+h*e);i.push(s);let a=new Point$1(this.EndPoint.x,this.EndPoint.y);i.push(a)}}if(e)for(let l=0;l<i.length;l++)i[l].x-=this.Frame.x,i[l].y-=this.Frame.y;return LogUtil.Debug("S.Line - Output:",i),i}CreateShape(t,e){if(LogUtil.Debug("S.Line - Input:",{svgContainer:t,isHidden:e}),this.flags&NvConstant.ObjFlags.NotVisible)return null;let i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=null,s=this.ShortRef,a="#000000",o=1,r=1,l=0;this.shapeparam<.01&&(s=0);let h=(0===s||s==OptConstant.LineTypes.LsMeasuringTape)&&0===this.hoplist.nhops;n=h?t.CreateShape(OptConstant.CSType.Line):t.CreateShape(OptConstant.CSType.Polyline),n.SetID(OptConstant.SVGElementClass.Shape);let c=h?t.CreateShape(OptConstant.CSType.Line):t.CreateShape(OptConstant.CSType.Polyline);c.SetID(OptConstant.SVGElementClass.Slop),c.ExcludeFromExport(!0),this.CalcFrame();let u=this.Frame,d=this.StyleRecord;if(null==d){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);t&&(d=t.def.style)}d&&(a=d.Line.Paint.Color,o=d.Line.Thickness,o>0&&o<1&&(o=1),r=d.Line.Paint.Opacity,l=d.Line.LinePattern);let p=u.width,g=u.height;i.SetSize(p,g),i.SetPos(this.Frame.x,this.Frame.y),n.SetSize(p,g);let f=[];if(h)n.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y);else{if(f=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),0!==this.hoplist.nhops){let t=T3Gv.opt.InsertHops(this,f,f.length);f=f.slice(0,t.npts)}n.SetPoints(f)}return n.SetFillColor("none"),n.SetStrokeColor(a),n.SetStrokeOpacity(r),n.SetStrokeWidth(o),0!==l&&n.SetStrokePattern(l),c.SetSize(p,g),h?c.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):c.SetPoints(f),c.SetStrokeColor("white"),c.SetFillColor("none"),c.SetOpacity(0),e?c.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):c.SetEventBehavior(OptConstant.EventBehavior.None),c.SetStrokeWidth(o+OptConstant.Common.Slop),i.AddElement(n),i.AddElement(c),this.ApplyStyles(n,d),this.ApplyEffects(i,!1,!0),i.isShape=!0,this.AddIcons(t,i),LogUtil.Debug("S.Line - Output:",i),i}SetCursors(){let t;LogUtil.Debug("S.Line - Input:",{crtOpt:T3Gv.opt.crtOpt});const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);T3Gv.opt.crtOpt===OptConstant.OptTypes.AddCorner?(t=e.GetElementById(OptConstant.SVGElementClass.Slop),t&&t.SetCursor(CursorConstant.CursorType.Cross)):this.BaseDrawingObjectSetCursors(),LogUtil.Debug("S.Line - Output:",{shapeElement:t})}BaseDrawingObjectSetCursors(){LogUtil.Debug("S.Line - Input:",{BlockID:this.BlockID,flags:this.flags});const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);let e=!1;if(!(this.flags&NvConstant.ObjFlags.Lock)&&t)if(OptCMUtil.GetEditMode()===NvConstant.EditState.Default){const i=t.GetElementById(OptConstant.SVGElementClass.Shape);i&&(this.objecttype===NvConstant.FNObjectTypes.FrameContainer?i.SetCursor(CursorConstant.CursorType.Default):i.SetCursor(CursorConstant.CursorType.Add));const n=t.GetElementById(OptConstant.ShapeIconType.HyperLink);n&&n.SetCursor(CursorConstant.CursorType.Pointer);const s=t.GetElementById(OptConstant.ShapeIconType.Notes);s&&s.SetCursor(CursorConstant.CursorType.Pointer);const a=t.GetElementById(OptConstant.ShapeIconType.ExpandedView);a&&a.SetCursor(CursorConstant.CursorType.Pointer);const o=t.GetElementById(OptConstant.ShapeIconType.Comment);o&&o.SetCursor(CursorConstant.CursorType.Pointer);const r=t.GetElementById(OptConstant.ShapeIconType.Attachment);r&&r.SetCursor(CursorConstant.CursorType.Pointer);const l=t.GetElementById(OptConstant.ShapeIconType.FieldData);l&&l.SetCursor(CursorConstant.CursorType.Pointer);const h=t.GetElementById(OptConstant.SVGElementClass.Slop);h&&h.SetCursor(CursorConstant.CursorType.Add);const c=T3Gv.opt.svgDoc.GetActiveEdit();if(this.DataID&&this.DataID>=0&&t.textElem&&(t.textElem===c?(i.SetCursor(CursorConstant.CursorType.Text),t.textElem.SetCursorState(CursorConstant.CursorState.EditLink)):t.textElem.SetCursorState(CursorConstant.CursorState.LinkOnly)),this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select&&this.IsSelected()){const n=t.GetElementListWithId(OptConstant.SVGElementClass.DimText);for(let t=0;t<n.length;t++)n[t].SetCursorState(CursorConstant.CursorState.EditOnly),n[t]===c&&(e=!0);e&&(i.SetCursor(null),h&&h.SetCursor(null))}}else this.ClearCursors();LogUtil.Debug("S.Line - Output:",{shapeContainer:t,isDimensionTextActive:e})}AdjustLineStart(t,e,i,n,s,a){LogUtil.Debug("S.Line - Input:",{svgContainer:t,startX:e,startY:i,endX:n,endY:s,enforceMinimum:a});let o=[],r=t.GetElementById(OptConstant.SVGElementClass.Shape),l=t.GetElementById(OptConstant.SVGElementClass.Slop);this.StartPoint.x=e,this.StartPoint.y=i,a||this.EnforceMinimum(!0);let h=!1;T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0&&(h=!0),s&&(h=!0),h||this.AdjustForLineAngleSnap(this.EndPoint,this.StartPoint),this.CalcFrame(),t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),r.SetSize(this.Frame.width,this.Frame.height);let c=[],u=(0===this.ShortRef||this.ShortRef==OptConstant.LineTypes.LsMeasuringTape)&&0===this.hoplist.nhops;u?r.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(c=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),r.SetPoints(c)),l.SetSize(this.Frame.width,this.Frame.height),u?l.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):l.SetPoints(c),this.CalcFrame(),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),r.SetSize(this.Frame.width,this.Frame.height),u?r.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(c=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),r.SetPoints(c)),l.SetSize(this.Frame.width,this.Frame.height),u?l.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):l.SetPoints(c),this.UpdateDimensionLines(t),new SelectionAttr;let d=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);o.push(new Point$1(this.StartPoint.x-d.x,this.StartPoint.y-d.y)),o.push(new Point$1(this.EndPoint.x-d.x,this.EndPoint.y-d.y));let p=o[0].x-o[1].x,g=o[0].y-o[1].y;Utils2.Sqrt(p*p+g*g),UIUtil.UpdateDisplayCoordinates(this.Frame,this.StartPoint,CursorConstant.CursorTypes.Grow,this),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("S.Line - Output:",{shapeElement:r,slopElement:l,points:o})}AdjustLineEnd(t,e,i,n,s){LogUtil.Debug("S.Connector - Input:",{svgContainer:t,newEndPointX:e,newEndPointY:i,unusedParam:n,forceAngleSnap:s});let a,o,r=[];t&&(a=t.GetElementById(OptConstant.SVGElementClass.Shape),o=t.GetElementById(OptConstant.SVGElementClass.Slop)),this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1);const l=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0;if((s||l)&&this.AdjustForLineAngleSnap(this.StartPoint,this.EndPoint),this.CalcFrame(),t){t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),a.SetSize(this.Frame.width,this.Frame.height);let e=[];const i=(0===this.ShortRef||this.ShortRef===OptConstant.LineTypes.LsMeasuringTape)&&0===this.hoplist.nhops;i?a.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(e=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),a.SetPoints(e)),o.SetSize(this.Frame.width,this.Frame.height),i?o.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):o.SetPoints(e),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),this.CalcFrame(),t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),a.SetSize(this.Frame.width,this.Frame.height),i?a.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):(e=this.GetLineShapePolyPoints(OptConstant.Common.MaxPolyPoints,!0),a.SetPoints(e)),o.SetSize(this.Frame.width,this.Frame.height),i?o.SetPoints(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y,this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y):o.SetPoints(e),this.UpdateDimensionLines(t),new SelectionAttr;const n=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);r.push(new Point$1(this.StartPoint.x-n.x,this.StartPoint.y-n.y)),r.push(new Point$1(this.EndPoint.x-n.x,this.EndPoint.y-n.y));const s=r[0].x-r[1].x,l=r[0].y-r[1].y;Utils2.Sqrt(s*s+l*l);const h=Utils1.DeepCopy(this.EndPoint);if(UIUtil.UpdateDisplayCoordinates(this.Frame,h,CursorConstant.CursorTypes.Grow,this),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&(h.x!==this.EndPoint.x||h.y!==this.EndPoint.y)){const t=new Error("bounds error");throw t.name="1",t}-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)}LogUtil.Debug("S.Connector - Output:",{shapeElement:t?t.GetElementById(OptConstant.SVGElementClass.Shape):null,slopElement:t?t.GetElementById(OptConstant.SVGElementClass.Slop):null})}Flip(t){let e;LogUtil.Debug("S.Line - Input:",{flipFlags:t});let i=!1;if(T3Gv.opt.ob=Utils1.DeepCopy(this),t&OptConstant.ExtraFlags.FlipVert&&(e=this.StartPoint.y,this.StartPoint.y=this.EndPoint.y,this.EndPoint.y=e,i=!0),t&OptConstant.ExtraFlags.FlipHoriz&&(e=this.StartPoint.x,this.StartPoint.x=this.EndPoint.x,this.EndPoint.x=e,i=!0),i){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.UpdateDimensionLines(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}T3Gv.opt.ob={},LogUtil.Debug("S.Line - Output:",{swapped:i})}AddCorner(t,e){LogUtil.Debug("S.Line - Input:",{event:t,point:e});let i,n=[],s=[],a=!1;T3Gv.opt.ob=Utils1.DeepCopy(this),n=[{x:this.StartPoint.x,y:this.StartPoint.y},{x:this.EndPoint.x,y:this.EndPoint.y}],n.push(new Point$1(e.x,e.y)),i=360-Utils1.CalcAngleFromPoints(n[0],n[1]),i>=360&&(i-=360);const o=2*Math.PI*(i/360);if(Utils3.RotatePointsAboutCenter(this.Frame,-o,n),Math.abs(n[1].y-n[2].y)<=this.StyleRecord.Line.Thickness){n[2].y=n[0].y,Math.abs(n[1].x-n[2].x)>Math.abs(n[0].x-n[2].x)&&(a=!0);const t=i>=0&&i<=180?50:-50;n.push(new Point$1(n[2].x,n[2].y+t)),Utils3.RotatePointsAboutCenter(this.Frame,o,n),s.push(new Point$1(n[2].x,n[2].y)),s.push(new Point$1(n[3].x,n[3].y)),a?(this.StartPoint.x=s[0].x,this.StartPoint.y=s[0].y):(this.EndPoint.x=s[0].x,this.EndPoint.y=s[0].y),this.CalcFrame(),HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.ModifyShape),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),T3Gv.opt.UpdateLinks();const e={StartPoint:{x:s[0].x,y:s[0].y},EndPoint:{x:s[1].x,y:s[1].y},Dimensions:this.Dimensions,TextFlags:this.TextFlags,objecttype:this.objecttype,StyleRecord:Utils1.DeepCopy(this.StyleRecord)},r=new Instance.Shape.Line(e),l=DrawUtil.AddNewObject(r,!1,!0),h=a?PolyUtil.PolyLJoin(l,OptConstant.HookPts.KTL,this.BlockID,OptConstant.HookPts.KTL,!1):PolyUtil.PolyLJoin(l,OptConstant.HookPts.KTL,this.BlockID,OptConstant.HookPts.KTR,!1),c=ObjectUtil$1.GetObjectPtr(h,!1),u=T3Gv.opt.svgObjectLayer.GetElementById(h);let d=Number(T3Gv.docUtil.rulerConfig.majorScale).toString();switch(T3Gv.docUtil.rulerConfig.units){case NvConstant.RulerUnit.Feet:this.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches?d=12*T3Gv.docUtil.rulerConfig.majorScale+'"':d+="'";break;case NvConstant.RulerUnit.Inches:d+='"'}c.UpdateDimensionFromText(u,d,{segment:2}),ObjectUtil$1.AddToDirtyList(this.BlockID),DrawUtil.CompleteOperation()}LogUtil.Debug("S.Line - Output:",{newPoints:n,tempPoints:s,isStartPoint:a})}UseEdges(t,e,i,n,s,a){LogUtil.Debug("S.Line - Input:",{enableX:t,enableY:e,alignX:i,alignY:n,startPoint:s,endPoint:a});let o=0,r=0,l=0,h=0,c=0,u=0,d=!1;if(s.x!==a.x)if(t&&i)Utils2.IsEqual(this.StartPoint.y,this.EndPoint.y)&&(o=a.x-s.x,d=!0);else{const t=this.Frame.x+this.Frame.width/2;Math.abs(t-s.x/2)<100?(c=(a.x-s.x)/2,d=!0):this.Frame.x>s.x/2&&(c=a.x-s.x,d=!0)}if(s.y!==a.y)if(e&&n)Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x)&&(r=a.y-s.y,d=!0);else{const t=this.Frame.y+this.Frame.height/2;Math.abs(t-s.y/2)<100?(u=(a.y-s.y)/2,d=!0):this.Frame.y>s.y/2&&(u=a.y-s.y,d=!0)}return d&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),(c||u)&&this.OffsetShape(c,u),(o||r)&&(o&&(l=this.Frame.width+o),r&&(h=this.Frame.height+r),this.SetSize(l,h,0)),ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.Line - Output:",{offsetX:o,offsetY:r,newWidth:l,newHeight:h,deltaX:c,deltaY:u,shouldAdjust:d}),d}}class WallOpt{AllowActionButtons(t){LogUtil.Debug("= U.WallUtil AllowActionButtons input:",t);return LogUtil.Debug("= U.WallUtil AllowActionButtons output:",null),null}ShapeSaveData(t,e){LogUtil.Debug("= U.WallUtil ShapeSaveData input:",{shapeObject:t,targetData:e}),LogUtil.Debug("= U.WallUtil ShapeSaveData completed")}AddWall(t,e){let i;LogUtil.Debug("= U.WallUtil AddWall input:",{event:t,additionalData:e});const n=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;n.def.wallThickness=8.33325;const s=Utils1.DeepCopy(n.def.style),a=T3Gv.opt.GetDrawingScale(T3Gv.docUtil.rulerConfig);T3Gv.docUtil.rulerConfig.useInches?n.def.wallThickness>0?s.Line.Thickness=n.def.wallThickness:(i=48,s.Line.Thickness=8.33333*i/a):n.def.wallThickness>0?s.Line.Thickness=n.def.wallThickness:(i=50,s.Line.Thickness=11.811023622047243*i/a),s.Line.BThick=s.Line.Thickness/2,s.Line.LinePattern=0,s.Line.Paint.Color="#000000",LogUtil.Debug("= WallOpt AddWall o",s);const o=n.dimensions,r=Utils2.SetFlag(o,NvConstant.DimensionFlags.Area,!1),l={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StyleRecord:s,bOverrideDefaultStyleOnDraw:!0,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:!1,Dimensions:r,TextFlags:NvConstant.TextFlags.HorizText|NvConstant.TextFlags.None,objecttype:NvConstant.FNObjectTypes.FlWall},h=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),c=Utils1.DeepCopy(h),u=new Line$1(l);DrawUtil.DrawNewObject(u,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Edit),SelectUtil.SelectObjects(c,!1,!1),LogUtil.Debug("= U.WallUtil AddWall output:",{wallLine:u})}StopAddingWalls(t){LogUtil.Debug("= U.WallUtil StopAddingWalls input:",t);const e=OptConstant.OptTypes;if(this.IsAddingWalls()){this.ToggleAddingWalls();let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);t&&t.length>0?(DrawUtil.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook()):OptCMUtil.CancelOperation(),OptCMUtil.SetEditMode(NvConstant.EditState.Default);let e=[];t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),t&&t.length>0&&(e=Utils1.DeepCopy(t),SelectUtil.SelectObjects(e))}else if(T3Gv.opt.crtOpt===e.AddCorner)T3Gv.wallOpt.AddCornerCancel();else OptCMUtil.CancelOperation();LogUtil.Debug("= U.WallUtil StopAddingWalls output: completed")}CancelObjectDraw(){LogUtil.Debug("= U.WallUtil CancelObjectDraw input: none"),this.StopAddingWalls(),LogUtil.Debug("= U.WallUtil CancelObjectDraw output: completed")}ToggleAddingWalls(t){LogUtil.Debug("= U.WallUtil ToggleAddingWalls input:",t),this.addingWalls=void 0!==t?t:!this.addingWalls,LogUtil.Debug("= U.WallUtil ToggleAddingWalls output:",this.addingWalls)}IsAddingWalls(){LogUtil.Debug("= U.WallUtil IsAddingWalls input: none");const t=this.addingWalls;return LogUtil.Debug("= U.WallUtil IsAddingWalls output:",t),t}AddNewPolyLine(t,e){if(LogUtil.Debug("= U.WallUtil AddNewPolyLine input:",{objectType:t,parameters:e}),t!==NvConstant.FNObjectTypes.FlWall)return LogUtil.Debug("= U.WallUtil AddNewPolyLine output: null"),null;const i=new PolyLineContainer(e);return LogUtil.Debug("= U.WallUtil AddNewPolyLine output:",i),i}AddCornerCancel(){LogUtil.Debug("= U.WallUtil AddCornerCancel input: none"),OptCMUtil.SetEditMode(NvConstant.EditState.Default),OptCMUtil.CancelOperation(),DrawUtil.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook(),OptCMUtil.SetEditMode(NvConstant.EditState.Default),LogUtil.Debug("= U.WallUtil AddCornerCancel output: completed")}AddCorner(t){LogUtil.Debug("= U.WallUtil AddCorner input:",t);try{let e,i,n;t.stopPropagation(),t.preventDefault(),t.gesture?(e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),n=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget),i=n.GetID()):(e=Utils1.DeepCopy(T3Gv.opt.rClickParam.hitPoint),i=T3Gv.opt.rClickParam.targetId,n=T3Gv.opt.svgObjectLayer.GetElementById(i));const s=ObjectUtil$1.GetObjectPtr(i,!0);return s&&"function"==typeof s.AddCorner&&s.AddCorner(n,e),OptCMUtil.SetEditMode(NvConstant.EditState.Default),OptCMUtil.CancelOperation(),DrawUtil.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook(),OptCMUtil.SetEditMode(NvConstant.EditState.Default),LogUtil.Debug("= U.WallUtil AddCorner output: false"),!1}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}}AddCornerStart(t){LogUtil.Debug("= U.WallUtil AddCornerStart input:",t),this.StopAddingWalls(),T3Gv.opt.CloseEdit(),OptCMUtil.CancelOperation(),OptCMUtil.SetEditMode(NvConstant.EditState.Edit);const e=LayerUtil.ActiveVisibleZList();for(let i=0;i<e.length;i++){const t=e[i],n=ObjectUtil$1.GetObjectPtr(t,!1);n.flags&NvConstant.ObjFlags.Lock||n.objecttype===NvConstant.FNObjectTypes.FlWall&&T3Gv.opt.svgObjectLayer.GetElementById(t).svgObj.SDGObj.GetEventProxy().on("dragstart",this.AddCorner)}UIUtil.SetModalOperation(OptConstant.OptTypes.AddCorner),LogUtil.Debug("= U.WallUtil AddCornerStart output: completed")}PostObjectDrawHook(t){LogUtil.Debug("= U.WallUtil PostObjectDrawHook input:",t),this.addingWalls&&(t===BaseLine.prototype.LMDrawRelease?this.AddWall():this.StopAddingWalls()),LogUtil.Debug("= U.WallUtil PostObjectDrawHook output: completed")}NotifySetEditMode(t){if(LogUtil.Debug("= U.WallUtil NotifySetEditMode input:",t),t===NvConstant.EditState.Edit||t===NvConstant.EditState.Default||t===NvConstant.EditState.LinkConnect||t===NvConstant.EditState.LinkJoin)return LogUtil.Debug("= U.WallUtil NotifySetEditMode output:",!1),!1;this.addingWalls&&this.StopAddingWalls(),LogUtil.Debug("= U.WallUtil NotifySetEditMode output: completed")}AlwaysShowLayers(){LogUtil.Debug("= U.WallUtil AlwaysShowLayers input: none");return LogUtil.Debug("= U.WallUtil AlwaysShowLayers output:",true),true}EnsureCubicleBehindOutline(t){LogUtil.Debug("= U.WallUtil EnsureCubicleBehindOutline input:",t);const e=LayerUtil.ActiveVisibleZList();let i=null;const n=ObjectUtil$1.GetObjectPtr(t,!1);function s(t,e){const i=e.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);let n=!1;for(let o=0;o<i.length;o++){const e=new HitResult(-1,0,null);if(e.hitcode=t.Hit(i[o],!1,!0,e),e&&e.hitcode===NvConstant.HitCodes.Border){n=!0;break}}if(!n)return!1;const s=Utils2.IntersectRect(t.Frame,e.Frame);if(!s)return!1;const a=e.Frame;return!(Math.abs(s.x-a.x)>1e-4||Math.abs(s.y-a.y)>1e-4||Math.abs(s.width-a.width)>1e-4||Math.abs(s.height-a.height)>1e-4)}if(n instanceof PolyLineContainer)for(let a=0;a<e.length;a++){const o=e[a];if(t!==o&&(i=ObjectUtil$1.GetObjectPtr(o,!1),i instanceof PolyLineContainer&&s(i,n))){const t=e.indexOf(n.BlockID);if(t<0)return;if(t<a)return;return void T3Gv.opt.PutBehindObject(i.BlockID,n.BlockID)}}LogUtil.Debug("= U.WallUtil EnsureCubicleBehindOutline output: completed")}AllowAutoInsert(){LogUtil.Debug("= U.WallUtil AllowAutoInsert input: none");return LogUtil.Debug("= U.WallUtil AllowAutoInsert output:",false),false}GetAutomationContext(){LogUtil.Debug("= U.WallUtil GetAutomationContext input: none");const t=KeyboardConstant.Contexts.WallOpt;return LogUtil.Debug("= U.WallUtil GetAutomationContext output:",t),t}}class PolygonUtil{constructor(){}static generateParallelogram(t,e){let i=e/t.width;return i>1&&(i=1),[{x:i,y:0},{x:1,y:0},{x:1-i,y:1},{x:0,y:1},{x:i,y:0}]}static generateDiamond(t,e){return[{x:.5,y:0},{x:1,y:.5},{x:.5,y:1},{x:0,y:.5},{x:.5,y:0}]}static generateDocument(t,e){const i=[],n=t.width,s=t.height,a=e;i.push({x:0,y:(s-a)/s}),i.push({x:0,y:(s-a)/s}),i.length=85,i[84]={x:0,y:(s-a)/s},i[1]={x:0,y:0},i[2]={x:1,y:0},i[3]={x:1,y:(s-a-0)/s};const o=n/4,r=a,l=2*o/40;for(let h=1;h<=40;h++){let t=l*h,e=n-t,c=(o-t)/o,u=s-a-0-Math.sqrt(1-c*c)*r;i[h+3]={x:e/n,y:u/s}}for(let h=1;h<=40;h++){let t=l*h,e=n-(t+2*o),c=(o-t)/o,u=s-a+Math.sqrt(1-c*c)*r;i[h+43]={x:e/n,y:u/s}}return i}static generateTerminal(t,e){let i=[];const n=t.width,s=t.height;let a,o;return a=Math.floor(s/2),a>n/2&&(a=Math.floor(n/2)),o={left:0,top:0,right:a,bottom:2*a},i=Utils2.PolyYCurve(i,o,40,0,0,0,a,!0,n,s),o={left:0,top:s-2*a,right:a,bottom:s},i=Utils2.PolyYCurve(i,o,40,0,0,a,0,!0,n,s),o={left:n-a,top:s,right:n,bottom:s-2*a},i=Utils2.PolyYCurve(i,o,40,0,0,0,-a,!1,n,s),o={left:n-a,top:2*a,right:n,bottom:0},i=Utils2.PolyYCurve(i,o,40,0,0,-a,0,!1,n,s),i.push(new Point$1(i[0].x,i[0].y)),i}static generateRightArrow(t,e){let i=e/t.width;return i>1&&(i=1),[{x:0,y:.15},{x:1-i,y:.15},{x:1-i,y:0},{x:1,y:.5},{x:1-i,y:1},{x:1-i,y:.85},{x:0,y:.85},{x:0,y:.15}]}static generateLeftArrow(t,e){let i=e/t.width;return i>1&&(i=1),[{x:0,y:.5},{x:i,y:0},{x:i,y:.15},{x:1,y:.15},{x:1,y:.85},{x:i,y:.85},{x:i,y:1},{x:0,y:.5}]}static generateTopArrow(t,e){let i=e/t.height;return i>1&&(i=1),[{x:.5,y:0},{x:0,y:i},{x:.15,y:i},{x:.15,y:1},{x:.85,y:1},{x:.85,y:i},{x:1,y:i},{x:.5,y:0}]}static generateBottomArrow(t,e){let i=e/t.height;return i>1&&(i=1),[{x:.15,y:0},{x:.15,y:1-i},{x:0,y:1-i},{x:.5,y:1},{x:1,y:1-i},{x:.85,y:1-i},{x:.85,y:0},{x:.15,y:0}]}static generateTriangle(t,e){return[{x:.5,y:0},{x:1,y:1},{x:0,y:1},{x:.5,y:0}]}static generateTriangleDown(t,e){return[{x:0,y:0},{x:1,y:0},{x:.5,y:1},{x:0,y:0}]}static generateInput(t,e){let i=e/t.height;return i>1&&(i=1),[{x:0,y:i},{x:1,y:0},{x:1,y:1},{x:0,y:1},{x:0,y:i}]}static generateTrapezoid(t,e){let i=e/t.width;return i>.5&&(i=.5),[{x:i,y:0},{x:1-i,y:0},{x:1,y:1},{x:0,y:1},{x:i,y:0}]}static generateTrapezoidDown(t,e){let i=e/t.width;return i>.5&&(i=.5),[{x:0,y:0},{x:1,y:0},{x:1-i,y:1},{x:i,y:1},{x:0,y:0}]}static generateOctagon(t,e,i){return[{x:e,y:0},{x:1-e,y:0},{x:1,y:i},{x:1,y:1-i},{x:1-e,y:1},{x:e,y:1},{x:0,y:1-i},{x:0,y:i},{x:e,y:0}]}static generateStorage(t,e,i){let n=[];const s=t.width,a=t.height,o=e,r={x:o/s,y:1};n.push(r);let l={left:0,top:0,right:o,bottom:a};n.length=42,n=Utils2.PolyYCurve(n,l,40,0,0,0,0,!0,s,a);for(let h=0;h<40;h++)n[40-h]=n[42+h];return n[41]={x:o/s,y:0},n[42]={x:1,y:0},l={left:s-o,top:0,right:s,bottom:a},o?(l.left-=0,l.right-=0,n.length=43,n=Utils2.PolyYCurve(n,l,40,0,0,0,0,!0,s,a),n.push({x:1,y:1})):(l.top+=0,l.bottom-=0,n=Utils2.PolyYCurve(n,l,40,0,0,0,0,!0,s,a),n.push({x:1,y:(a-0)/a}),n.push({x:1,y:1})),n}static generateHexagon(t,e){let i=e/t.width;return i>.5&&(i=.5),[{x:i,y:0},{x:1-i,y:0},{x:1,y:.5},{x:1-i,y:1},{x:i,y:1},{x:0,y:.5},{x:i,y:0}]}static generatePentagon(t,e){let i=e/t.height;return i>1&&(i=1),[{x:0,y:1-i},{x:0,y:0},{x:1,y:0},{x:1,y:1-i},{x:.5,y:1},{x:0,y:1-i}]}static generatePentagonLeft(t,e){let i=e/t.width;return i>1&&(i=1),[{x:i,y:0},{x:1,y:0},{x:1,y:1},{x:i,y:1},{x:0,y:.5},{x:i,y:0}]}static generateDelay(t,e){let i=[];const n=t.width,s=t.height,a=e;i[0]={x:0,y:1},i[1]={x:0,y:0},i[2]={x:(n-a)/n,y:0};const o={left:n-a,top:0,right:n,bottom:s};return i=Utils2.PolyYCurve(i,o,80,0,0,0,0,!1,n,s),i.push({x:(n-a)/n,y:1}),i}static generateDisplay(t,e){let i=[];const n=t.width,s=t.height,a=e;i[0]={x:a/n,y:1},i[1]={x:0,y:.5},i[2]={x:a/n,y:0},i[3]={x:(n-a)/n,y:0};const o={left:n-a,top:0,right:n,bottom:s};return i=Utils2.PolyYCurve(i,o,80,0,0,0,0,!1,n,s),i.push({x:(n-a)/n,y:1}),i.push({x:a/n,y:1}),i}}class Polygon$1 extends BaseShape{constructor(t){LogUtil.Debug("S.Polygon: Constructor input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.Polygon,super(t),this.VertexArray=t.VertexArray||[],this.FixedPoint=t.FixedPoint||[0,0],this.LineOrientation=t.LineOrientation||OptConstant.LineOrientation.None,this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.dataclass=PolygonConstant.ShapeTypes.POLYGON,LogUtil.Debug("S.Polygon: Constructor output:",this)}ScaleGeometries(t,e,i,n){LogUtil.Debug("S.Polygon: scaleGeometries input:",{svgDoc:t,points:e,width:i,height:n});let s=null,a=null,o=null,r=null,l=null,h=0;const c=this.Geometries.length;for(let u=0;u<c;u++){const c=this.Geometries[u];if(s!==c.shapeid&&(a&&a.Apply(),o=t.GetElementById(OptConstant.SVGElementClass.Shape,c.shapeid),s=c.shapeid,o&&(o.SetSize(i,n),a=o.PathCreator(),a.BeginPath())),!c.NoFill||0===c.MoveTo.length){let t=e[c.Offset];a.MoveTo(t.x,t.y);for(let i=1;i<c.NPoints;i++)t=e[c.Offset+i],a.LineTo(t.x,t.y)}if(c.Closed&&a.ClosePath(),c.MoveTo.length>0){const a=`${s}.${h}`;if(h++,l=t.GetElementById(OptConstant.SVGElementClass.Shape,a),!l)continue;l.SetSize(i,n),r=l.PathCreator(),r.BeginPath();let o=0,u=1,d=e[c.Offset];for(;o<=c.MoveTo.length;){r.MoveTo(d.x,d.y);const t=o<c.MoveTo.length?c.MoveTo[o]:c.NPoints;for(let i=u;i<t;i++)d=e[c.Offset+i],r.LineTo(d.x,d.y);o++,o<c.MoveTo.length&&(d=e[c.MoveTo[o-1]+c.Offset],u=o<c.MoveTo.length?c.MoveTo[o]:c.NPoints)}r.Apply()}}a&&a.Apply(),LogUtil.Debug("S.Polygon: scaleGeometries output:",{svgDoc:t,points:e,width:i,height:n})}CreateShape(t,e){if(LogUtil.Debug("S.Polygon: CreateShape input:",{svgDoc:t,isInteractive:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.Polygon: CreateShape output: null (not visible)"),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer);let n=t.CreateShape(OptConstant.CSType.Polygon);n.SetID(OptConstant.SVGElementClass.Shape);const s=Utils1.DeepCopy(this.Frame);let a=this.StyleRecord;a.Line.BThick&&null==this.polylist&&Utils2.InflateRect(s,a.Line.BThick,a.Line.BThick),a=this.SVGTokenizerHook(a);const o=a.Line.Paint.Color;a.Line.Paint.Opacity;const r=a.Line.Thickness,l=a.Line.LinePattern;this.GetFieldDataStyleOverride();const h=s.width,c=s.height;i.SetSize(h,c),i.SetPos(s.x,s.y),n.SetSize(h,c);const u=this.VertexArray,d=u.length,p=[];for(let m=0;m<d;++m){const t=u[m];p.push({x:t.x*h,y:t.y*c})}if(this.Geometries&&this.Geometries.length){let e=1,n=0;const s=this.Geometries.length;let u=t.CreateShape(OptConstant.CSType.Path);u.SetID(OptConstant.SVGElementClass.Shape),u.SetUserData(e),u.SetSize(h,c);let d=u.PathCreator();d.BeginPath();let g=this.Geometries[0].NoFill,f=this.Geometries[0].NoLine||this.Geometries[0].MoveTo.length>0;for(let a=0;a<s;a++){const s=this.Geometries[a];if(s.NoFill===g&&(s.NoLine||s.MoveTo.length>0)===f||(d&&1===d.pathSegs.length&&"z"===d.pathSegs[0]?d=null:d&&d.Apply(),f?u.SetStrokeWidth(0):(u.SetStrokeColor(o),u.SetStrokeWidth(r),0!==l&&u.SetStrokePattern(l)),i.AddElement(u),u=t.CreateShape(OptConstant.CSType.Path),u.SetID(OptConstant.SVGElementClass.Shape),e++,u.SetUserData(e),u.SetSize(h,c),d=u.PathCreator(),d.BeginPath(),g=s.NoFill,f=s.NoLine||s.MoveTo.length>0),!g||0===s.MoveTo.length){const t=p[s.Offset];d.MoveTo(t.x,t.y);for(let e=1;e<s.NPoints;e++){const t=p[s.Offset+e];d.LineTo(t.x,t.y)}}if(s.Closed&&d.ClosePath(),s.MoveTo.length>0){const a=t.CreateShape(OptConstant.CSType.Path);a.SetID(OptConstant.SVGElementClass.Shape);const o=e+"."+n;n++,a.SetUserData(o),a.SetSize(h,c);const r=a.PathCreator();r.BeginPath();let l=0,u=1,d=p[s.Offset];for(;l<=s.MoveTo.length;){r.MoveTo(d.x,d.y);const t=l<s.MoveTo.length?s.MoveTo[l]:s.NPoints;for(let e=u;e<t;e++)d=p[s.Offset+e],r.LineTo(d.x,d.y);l++,l<s.MoveTo.length&&(d=p[s.MoveTo[l-1]+s.Offset],u=l<s.MoveTo.length?s.MoveTo[l]:s.NPoints)}r.Apply(),i.AddElement(a)}}d&&d.Apply(),f?u.SetStrokeWidth(0):(u.SetStrokeColor(o),u.SetStrokeWidth(r),0!==l&&u.SetStrokePattern(l)),i.AddElement(u),g?u.SetFillColor("none"):this.ApplyStyles(u,a)}else n.SetPoints(p),n.SetStrokeColor(o),n.SetStrokeWidth(r),0!==l&&n.SetStrokePattern(l),i.AddElement(n),this.ApplyStyles(n,a);this.ApplyEffects(i,!1,!1);const g=t.CreateShape(OptConstant.CSType.Polygon);g.SetPoints(p),g.SetStrokeColor("white"),g.SetFillColor("none"),g.SetOpacity(0),g.SetStrokeWidth(r+OptConstant.Common.Slop),e?g.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):g.SetEventBehavior(OptConstant.EventBehavior.None),g.SetID(OptConstant.SVGElementClass.Slop),g.ExcludeFromExport(!0),g.SetSize(h,c),i.AddElement(g);const f=a.Fill.Hatch;if(f&&0!==f){const e=t.CreateShape(OptConstant.CSType.Polygon);e.SetPoints(p),e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(h,c),e.SetStrokeWidth(0),this.SetFillHatch(e,f),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("S.Polygon: CreateShape output:",i),i}Resize(t,e,i,n){if(LogUtil.Debug("S.Polygon: Resize input:",{svgDoc:t,newSize:e,actionTriggerType:i,prevBBox:n}),null!=t){const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=Utils1.DeepCopy(e),r=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);if(this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(o,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),i!==OptConstant.ActionTriggerType.MovePolySeg){t.SetSize(o.width,o.height),t.SetPos(o.x+r.x,o.y+r.y);const i=t.GetElementById(OptConstant.SVGElementClass.Shape),n=this.RegenerateVectors(o.width,o.height);n&&(this.VertexArray=n);const s=this.VertexArray.map((t=>({x:t.x*o.width,y:t.y*o.height})));this.Geometries&&this.Geometries.length?this.ScaleGeometries(t,s,o.width,o.height):(i.SetPoints(s),i.SetSize(o.width,o.height));const a=t.GetElementById(OptConstant.SVGElementClass.Slop);a&&(a.SetPoints(s),a.SetSize(o.width,o.height));const l=t.GetElementById(OptConstant.SVGElementClass.Hatch);l&&(l.SetPoints(s),l.SetSize(e.width,e.height))}return this.LMResizeSVGTextObject(t,i,e),t.SetRotation(n),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("S.Polygon: Resize output:",r),r}}ResizeInTextEdit(t,e){LogUtil.Debug("S.Polygon: ResizeInTextEdit input:",{svgDoc:t,newSize:e});const i=t.GetRotation();this.SetDimensionLinesVisibility(t,!1);const n=Utils1.DeepCopy(this.Frame),s=Utils1.DeepCopy(e),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(n,s,i);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(a,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape),l=this.RegenerateVectors(a.width,a.height);l&&(this.VertexArray=l),this.polylist&&this.ScaleObject(0,0,0,0,0,0);const h=this.VertexArray.map((t=>({x:t.x*a.width,y:t.y*a.height})));r&&(this.Geometries&&this.Geometries.length?this.ScaleGeometries(t,h,a.width,a.height):r.SetPoints(h),r.SetSize(a.width,a.height));const c=t.GetElementById(OptConstant.SVGElementClass.Slop);c&&(c.SetPoints(h),c.SetSize(a.width,a.height));const u=t.GetElementById(OptConstant.SVGElementClass.Hatch);return u&&(u.SetPoints(h),u.SetSize(e.width,e.height)),t.SetRotation(i),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("S.Polygon: ResizeInTextEdit output:",o),o}GetTargetPoints(t,e,i){LogUtil.Debug("S.Polygon: GetTargetPoints input:",{target:t,hookFlags:e,objectID:i});const n=[{x:OptConstant.Common.DimMax/2,y:0},{x:OptConstant.Common.DimMax,y:OptConstant.Common.DimMax/2},{x:OptConstant.Common.DimMax/2,y:OptConstant.Common.DimMax},{x:0,y:OptConstant.Common.DimMax/2}],s=this.flags&NvConstant.ObjFlags.ContConn&&null!==t&&0==(e&NvConstant.HookFlags.LcNoContinuous),a=this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints;if(OptConstant.Common.DimMax,i>=0&&ObjectUtil$1.GetObjectPtr(i,!1),s){const i=this.PolyGetTargets(t,e,this.Frame);return LogUtil.Debug("S.Polygon: GetTargetPoints output:",i),i}if(a){const t=a?this.ConnectPoints:T3Gv.opt.TableGetRowConnectPoints(this,table),e=Utils1.DeepCopy(t);return LogUtil.Debug("S.Polygon: GetTargetPoints output:",e),e}return LogUtil.Debug("S.Polygon: GetTargetPoints output:",n),n}ExtendLines(){}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.Polygon: GetPerimeterPoints input:",{event:t,pointsArray:e,hookType:i,rotateFlag:n,tableID:s,additionalParams:a});let o,r,l=[],h={},c=[0,0];const u=OptConstant.Common.DimMax;if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(h))return l.push(new Point(h.x,h.y)),null!=e[0].id&&(l[0].id=e[0].id),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l;if(i===OptConstant.HookPts.KAT||i===OptConstant.HookPts.KATD)return l=this.BaseDrawingObject_GetPerimPts(t,e,i,!1,s),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l;const d=e.length;if(this.flags&NvConstant.ObjFlags.UseConnect)for(let p=0;p<d;p++)l[p]={x:0,y:0,id:0},l[p].x=e[p].x/u*this.Frame.width+this.Frame.x,l[p].y=e[p].y/u*this.Frame.height+this.Frame.y,null!=e[p].id&&(l[p].id=e[p].id);else{if(this.flags&NvConstant.ObjFlags.ContConn&&!T3Gv.opt.fromOverlayLayer)return l=this.BaseDrawingObject_GetPerimPts(t,e,i,n,s,a),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l;l=this.BaseDrawingObject_GetPerimPts(t,e,i,!0,s,a);const r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),h=r.length;Utils2.EqualPt(r[0],r[h-1])||r.push(new Point(r[0].x,r[0].y));for(let t=0;t<d;t++)e[t].x<u/4?(o=PolyUtil.PolyGetIntersect(r,l[t].y,c,null,!1),o&&(l[t].x=c[0],o>1&&c[1]<l[t].x&&(l[t].x=c[1]))):e[t].x>3*u/4?(o=PolyUtil.PolyGetIntersect(r,l[t].y,c,null,!1),o&&(l[t].x=c[0],o>1&&c[1]>l[t].x&&(l[t].x=c[1]))):e[t].y<u/4?(o=PolyUtil.PolyGetIntersect(r,l[t].x,c,null,!0),o&&(l[t].y=c[0],o>1&&c[1]<l[t].y&&(l[t].y=c[1]))):e[t].y>3*u/4&&(o=PolyUtil.PolyGetIntersect(r,l[t].x,c,null,!0),o&&(l[t].y=c[0],o>1&&c[1]>l[t].y&&(l[t].y=c[1]))),null!=e[t].id&&(l[t].id=e[t].id)}return n||(r=-this.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutCenter(this.Frame,r,l)),LogUtil.Debug("S.Polygon: GetPerimeterPoints output:",l),l}BaseDrawingObject_GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("S.Polygon: BaseDrawingObject_GetPerimPts input:",{event:t,pointsArray:e,hookType:i,rotateFlag:n,tableID:s,additionalParams:a});const o=[],r=e.length,l=PolygonConstant.ShapeTypes.TRIANGLE,h=OptConstant.Common.DimMax;for(let c=0;c<r;c++){o[c]={x:0,y:0,id:0},o[c].x=e[c].x/h*this.Frame.width+this.Frame.x;const t=this.dataclass===l?h-e[c].y:e[c].y;o[c].y=t/h*this.Frame.height+this.Frame.y,null!=e[c].id&&(o[c].id=e[c].id)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("S.Polygon: BaseDrawingObject_GetPerimPts output:",o),o}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.Polygon: GetPolyPoints input:",{numPoints:t,includeFrameOffset:e,inflate:i,adjustForLineThickness:n,additionalParams:s});let a,o,r={},l=[];Utils2.CopyRect(r,this.Frame);const h=this.StyleRecord.Line.Thickness/2;n&&Utils2.InflateRect(r,h,h);for(let c=0;c<this.VertexArray.length;++c)a=this.VertexArray[c],o={x:a.x*r.width,y:a.y*r.height},l.push(o);if(!e)for(let c=0;c<l.length;c++)l[c].x+=r.x,l[c].y+=r.y;return LogUtil.Debug("S.Polygon: GetPolyPoints output:",l),l}SetShapeIndent(t){LogUtil.Debug("S.Polygon: SetShapeIndent input:",{isIndentNeeded:t});let e,i,n=1,s=1,a=1,o=1,r=[],l={};e=this.inside.width,i=this.inside.height,this.NeedsSIndentCount&&(r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),l=TextUtil.GuessTextIndents(r,this.Frame),this.left_sindent=l.left_sindent,this.right_sindent=l.right_sindent,this.top_sindent=l.top_sindent,this.bottom_sindent=l.bottom_sindent,this.NeedsSIndentCount=!1),t&&(n=1-(this.left_sindent+this.right_sindent),s=1-(this.left_sindent+this.right_sindent),a=1-(this.bottom_sindent+this.top_sindent),o=1-(this.bottom_sindent+this.top_sindent)),this.tindent.left=this.left_sindent*e/n,this.tindent.top=this.top_sindent*i/a,this.tindent.right=this.right_sindent*e/s,this.tindent.bottom=this.bottom_sindent*i/o,LogUtil.Debug("S.Polygon: SetShapeIndent output:",{left:this.tindent.left,top:this.tindent.top,right:this.tindent.right,bottom:this.tindent.bottom})}Flip(t){LogUtil.Debug("S.Polygon: Flip input:",{flipType:t});let e=!0;const i=PolygonConstant.ShapeTypes,n=OptConstant.Common.DimMax;if(this.VertexArray=ToolActUtil.FlipVertexArray(this.VertexArray,t),this.polylist&&Instance.Shape.PolyLine.prototype.Flip.call(this,t),t&OptConstant.ExtraFlags.FlipVert&&null!=this.dataclass){switch(this.dataclass){case i.ARROW_TOP:this.dataclass=i.ARROW_BOTTOM;break;case i.ARROW_BOTTOM:this.dataclass=i.ARROW_TOP;break;case i.TRIANGLE:this.dataclass=i.TRIANGLE_BOTTOM;break;case i.TRIANGLE_BOTTOM:this.dataclass=i.TRIANGLE;break;case i.TRAPEZOID:this.dataclass=i.TRAPEZOID_BOTTOM;break;case i.TRAPEZOID_BOTTOM:this.dataclass=i.TRAPEZOID;break;case i.POLYGON:case i.MEASURE_AREA:e=!1;break;default:this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipVert,!(this.extraflags&OptConstant.ExtraFlags.FlipVert)),e=!1}if(e&&this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints)for(let t=0;t<this.ConnectPoints.length;t++)this.ConnectPoints[t].y=n-this.ConnectPoints[t].y}if(t&OptConstant.ExtraFlags.FlipHoriz&&null!=this.dataclass){switch(this.dataclass){case i.ARROW_LEFT:this.dataclass=i.ARROW_RIGHT;break;case i.ARROW_RIGHT:this.dataclass=i.ARROW_LEFT;break;case i.POLYGON:case i.MEASURE_AREA:e=!1;break;default:this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,!(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)),e=!1}if(e&&this.flags&NvConstant.ObjFlags.UseConnect&&this.ConnectPoints)for(let t=0;t<this.ConnectPoints.length;t++)this.ConnectPoints[t].x=n-this.ConnectPoints[t].x}OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),this.hooks.length&&OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move),this.NeedsSIndentCount=!0,this.UpdateFrame(this.Frame),this.Resize(T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),this.Frame,this),LogUtil.Debug("S.Polygon: Flip output:",{flipType:t})}RegenerateVectors(t,e){LogUtil.Debug("S.Polygon: RegenerateVectors input:",{width:t,height:e});let i,n,s,a=null,o=this.shapeparam;switch(this.dataclass){case PolygonConstant.ShapeTypes.PARALLELOGRAM:a=PolygonUtil.generateParallelogram(this.Frame,o);break;case PolygonConstant.ShapeTypes.TERMINAL:a=PolygonUtil.generateTerminal(this.Frame,o);break;case PolygonConstant.ShapeTypes.PENTAGON:i=t/2,o=t/2*(o/i),a=PolygonUtil.generatePentagon(this.Frame,o);break;case PolygonConstant.ShapeTypes.PENTAGON_LEFT:i=e/2,o=e/2*(o/i),a=PolygonUtil.generatePentagonLeft(this.Frame,o);break;case PolygonConstant.ShapeTypes.HEXAGON:i=e/2,o=e/2*(o/i),a=PolygonUtil.generateHexagon(this.Frame,o);break;case PolygonConstant.ShapeTypes.OCTAGON:n=o*e,s=o*t,n<s&&(s=n),e&&(s=e*(s/e)),o=s/t,n=s/e,a=PolygonUtil.generateOctagon(this.Frame,o,n);break;case PolygonConstant.ShapeTypes.ARROW_RIGHT:a=PolygonUtil.generateRightArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.ARROW_LEFT:a=PolygonUtil.generateLeftArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.ARROW_TOP:a=PolygonUtil.generateTopArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.ARROW_BOTTOM:a=PolygonUtil.generateBottomArrow(this.Frame,o);break;case PolygonConstant.ShapeTypes.TRAPEZOID:a=PolygonUtil.generateTrapezoid(this.Frame,o);break;case PolygonConstant.ShapeTypes.TRAPEZOID_BOTTOM:a=PolygonUtil.generateTrapezoidDown(this.Frame,o);break;case PolygonConstant.ShapeTypes.INPUT:a=PolygonUtil.generateInput(this.Frame,o);break;case PolygonConstant.ShapeTypes.STORAGE:s=o,a=PolygonUtil.generateStorage(this.Frame,o,s);break;case PolygonConstant.ShapeTypes.DELAY:a=PolygonUtil.generateDelay(this.Frame,o);break;case PolygonConstant.ShapeTypes.DISPLAY:a=PolygonUtil.generateDisplay(this.Frame,o)}const r=this.extraflags;return r&(OptConstant.ExtraFlags.FlipHoriz|OptConstant.ExtraFlags.FlipVert)&&a&&(a=ToolActUtil.FlipVertexArray(a,r)),LogUtil.Debug("S.Polygon: RegenerateVectors output:",a),a}GetParabolaAdjustmentPoint(t,e){LogUtil.Debug("S.Polygon: GetParabolaAdjustmentPoint input:",{point:t,adjustment:e});const i=Instance.Shape.PolyLine.prototype.PrPolyLGetParabolaAdjPoint.call(this,t,e);return LogUtil.Debug("S.Polygon: GetParabolaAdjustmentPoint output:",i),i}GetArcParameters(t,e){LogUtil.Debug("S.Polygon: GetArcParameters input:",{startPoint:t,endPoint:e});const i=Instance.Shape.PolyLine.prototype.PrPolyLGetArc.call(this,t,e);return LogUtil.Debug("S.Polygon: GetArcParameters output:",i),i}GetParabolaParameters(t,e){LogUtil.Debug("S.Polygon: GetParabolaParameters input:",{event:t,target:e});const i=Instance.Shape.PolyLine.prototype.PrPolyLGetParabolaParam.call(this,t,e);return LogUtil.Debug("S.Polygon: GetParabolaParameters output:",i),i}GetArcParameters(t,e,i){LogUtil.Debug("S.Polygon: GetArcParameters input:",{event:t,target:e,additionalParams:i});const n=Instance.Shape.PolyLine.prototype.PrPolyLGetArcParam.call(this,t,e,i);return LogUtil.Debug("S.Polygon: GetArcParameters output:",n),n}GetArcQuadrant(t,e,i){LogUtil.Debug("S.Polygon: GetArcQuadrant input:",{event:t,target:e,additionalParams:i});const n=Instance.Shape.PolyLine.prototype.PrPolyLGetArcQuadrant.call(this,t,e,i);return LogUtil.Debug("S.Polygon: GetArcQuadrant output:",n),n}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("S.Polygon: ScaleObject input:",{x:t,y:e,rotation:i,center:n,scaleX:s,scaleY:a,adjustLineThickness:o});let r=Utils1.DeepCopy(this.Frame);if(s&&a&&(r.x=t+r.x*s,r.y=e+r.y*a,r.width*=s,r.height*=a),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),i){const t={x:r.x+r.width/2,y:r.y+r.height/2},e=2*Math.PI*(i/360),s=T3Gv.opt.RotatePointAroundPoint(n,t,e);r.x=s.x-r.width/2,r.y=s.y-r.height/2,this.RotationAngle+=i,this.RotationAngle>=360&&(this.RotationAngle-=360)}if(o){let t=s;a>t&&(t=a),this.StyleRecord.Line.Thickness*=t,this.StyleRecord.Line.BThick*=t}this.UpdateFrame(r);const l=this.RegenerateVectors(r.width,r.height);l&&(this.VertexArray=l),this.polylist&&Instance.Shape.PolyLine.prototype.ScaleObject.call(this,0,0,0,0,0,0),s&&a&&(this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height),LogUtil.Debug("S.Polygon: ScaleObject output:",{frameCopy:r,regeneratedVectors:l})}UpdateSecondaryDimensions(t,e,i){LogUtil.Debug("S.Polygon: UpdateSecondaryDimensions input:",{svgDoc:t,dimensions:e,polyPoints:i});let n=[],s=0;if((this.Dimensions&NvConstant.DimensionFlags.Always||this.Dimensions&NvConstant.DimensionFlags.Select)&&this.Dimensions&NvConstant.DimensionFlags.ShowLineAngles&&this.polylist){n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),s=n.length;for(let i=1;i<s;i++)this.DrawDimensionAngle(t,e,i,n)}LogUtil.Debug("S.Polygon: UpdateSecondaryDimensions output:",{pointsArray:n,pointsCount:s})}SetSegmentAngle(t,e,i){LogUtil.Debug("S.Polygon: SetSegmentAngle input:",{segmentIndex:t,angle:e,additionalParams:i}),T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0);ObjectUtil$1.GetObjectPtr(this.BlockID,!1).SetSegmentAngle(t,e,i),T3Gv.opt.PolyLineToShape(this.BlockID),LogUtil.Debug("S.Polygon: SetSegmentAngle output:",{segmentIndex:t,angle:e,additionalParams:i})}DimensionLineDeflectionAdjust(t,e,i,n,s){if(LogUtil.Debug("S.Polygon: DimensionLineDeflectionAdjust input:",{event:t,target:e,angle:i,radius:n,index:s}),!this.polylist){const a=Instance.Shape.BaseShape.prototype.DimensionLineDeflectionAdjust.call(this,t,e,i,n,s);return LogUtil.Debug("S.Polygon: DimensionLineDeflectionAdjust output:",a),a}T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0);ObjectUtil$1.GetObjectPtr(this.BlockID,!1).DimensionLineDeflectionAdjust(t,e,i,n,s),T3Gv.opt.PolyLineToShape(this.BlockID),LogUtil.Debug("S.Polygon: DimensionLineDeflectionAdjust output: completed")}GetDimensionDeflectionValue(t){if(LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue input:",{segmentIndex:t}),this.polylist){if(!this.polylist.segs||0===this.polylist.segs.length||t<0||t>=this.polylist.segs.length)return void LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue output: undefined");const e=this.polylist.segs[t].dimDeflection;return LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue output:",e),e}{const e=Instance.Shape.BaseShape.prototype.GetDimensionDeflectionValue.call(this,t);return LogUtil.Debug("S.Polygon: GetDimensionDeflectionValue output:",e),e}}UpdateDimensionFromTextObj(t,e){let i,n;LogUtil.Debug("S.Polygon: UpdateDimensionFromTextObj input:",{textObj:t,textData:e}),T3Gv.stdObj.PreserveBlock(this.BlockID),e?(i=e.text,n=e.userData):(i=t.GetText(),n=t.GetUserData());const s=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(n.angleChange)return this.UpdateLineAngleDimensionFromText(s,i,n),ObjectUtil$1.AddToDirtyList(this.BlockID),(this.Frame.x<0||this.Frame.y<0)&&T3Gv.opt.ScrollObjectIntoView(this.BlockID,!1),DrawUtil.CompleteOperation(),void LogUtil.Debug("S.Polygon: UpdateDimensionFromTextObj output: angleChange handled");this.polylist&&(this.extraflags&OptConstant.ExtraFlags.SideKnobs)>0?(T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0),ObjectUtil$1.GetObjectPtr(this.BlockID,!1).UpdateDimensionFromText(s,i,n),T3Gv.opt.PolyLineToShape(this.BlockID)):Instance.Shape.BaseShape.prototype.UpdateDimensionFromTextObj.call(this,t,e),LogUtil.Debug("S.Polygon: UpdateDimensionFromTextObj output: dimension updated")}GetDimensionPoints(){let t;if(LogUtil.Debug("S.Polygon: GetDimensionPoints input"),this.polylist&&(this.extraflags&OptConstant.ExtraFlags.SideKnobs)>0){let e=Utils1.DeepCopy(this);e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,e),t=e.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null)}else t=Instance.Shape.BaseShape.prototype.GetDimensionPoints.call(this);return LogUtil.Debug("S.Polygon: GetDimensionPoints output:",t),t}GetPolyRectangularInfo(){LogUtil.Debug("S.Polygon: GetPolyRectangularInfo input");let t,e,i,n=[];if(!this.polylist)return null;if(n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),5!==this.polylist.segs.length||!this.polylist.closed)return null;let s=[];const a=n.length;for(let u=0;u<a;u++)u<a-1&&n[u].x===n[u+1].x&&n[u].y===n[u+1].y||s.push(n[u]);if(n=s,!Utils2.IsRectangular(n)||5!==n.length)return null;const o=Utils2.GetDistanceBetween2Points(n[0],n[1]),r=Utils2.GetDistanceBetween2Points(n[2],n[3]);if(o/r<=.99||o/r>=1.01)return null;const l=Utils2.GetDistanceBetween2Points(n[1],n[2]),h=Utils2.GetDistanceBetween2Points(n[3],n[4]);if(l/h<=.99||l/h>=1.01)return null;i=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(n[0],n[1]),i<Math.PI/4||i>1.5*Math.PI||i>.75*Math.PI&&i<1.25*Math.PI?(t=1,e=2):(t=2,e=1);const c={wdDim:t,htDim:e};return LogUtil.Debug("S.Polygon: GetPolyRectangularInfo output:",c),c}GetDimensionFloatingPointValue(t){LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue input:",{dimensionType:t});let e=0;if(!this.polylist)return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null (no polylist)"),null;if(!(this.rflags&NvConstant.FloatingPointDim.Width||this.rflags&NvConstant.FloatingPointDim.Height))return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null (no floating point dimensions)"),null;const i=this.GetPolyRectangularInfo();if(!i)return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null (no poly rectangular info)"),null;if(i.wdDim===t||i.wdDim+2===t){if(this.rflags&NvConstant.FloatingPointDim.Width){e=this.GetDimensionLengthFromValue(this.rwd);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output:",t),t}}else if((i.htDim===t||i.htDim+2===t)&&this.rflags&NvConstant.FloatingPointDim.Height){e=this.GetDimensionLengthFromValue(this.rht);const t=RulerUtil.GetLengthInRulerUnits(e);return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output:",t),t}return LogUtil.Debug("S.Polygon: GetDimensionFloatingPointValue output: null"),null}IsTextFrameOverlap(t,e){if(LogUtil.Debug("S.Polygon: IsTextFrameOverlap input:",{textFrame:t,rotationAngle:e}),!this.polylist)return LogUtil.Debug("S.Polygon: IsTextFrameOverlap output: false (no polylist)"),!1;const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),n=360-e,s=2*Math.PI*(n/360);Utils3.RotatePointsAboutCenter(this.Frame,-s,i);const a=Utils2.IsFrameCornersInPoly(i,t);return LogUtil.Debug("S.Polygon: IsTextFrameOverlap output:",a),a}}class RRect$1 extends BaseShape{constructor(t){LogUtil.Debug("= S.RRect: constructor input:",t);const e=t||{};e.ShapeType=OptConstant.ShapeType.RRect,e.uniType="RRect",super(e),this.dataclass=PolygonConstant.ShapeTypes.ROUNDED_RECTANGLE,LogUtil.Debug("= S.RRect: constructor output:",this)}GetCornerSize(t){LogUtil.Debug("= S.RRect: GetCornerSize input:",t);const e=this.Frame.width,i=this.Frame.height;let n=e;if(i<n&&(n=i),t&&(n=t),this.moreflags&OptConstant.ObjMoreFlags.FixedRR){let t=OptConstant.Common.RRectFixedDim*this.shapeparam;const e=.4*n;return t>e&&(t=e),LogUtil.Debug("= S.RRect: GetCornerSize output:",t),t}const s=n*this.shapeparam;return LogUtil.Debug("= S.RRect: GetCornerSize output:",s),s}CreateShape(t,e){if(LogUtil.Debug("= S.RRect: CreateShape input:",{svgDoc:t,addEventSlop:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("= S.RRect: CreateShape output:",null),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.RRect);n.SetID(OptConstant.SVGElementClass.Shape);const s=Utils1.DeepCopy(this.Frame);let a=this.StyleRecord;a.Line.BThick&&Utils2.InflateRect(s,a.Line.BThick,a.Line.BThick),a=this.SVGTokenizerHook(a);const o=a.Line.Paint.Color,r=a.Line.Thickness,l=a.Line.LinePattern,h=s.width,c=s.height;i.SetSize(h,c),i.SetPos(s.x,s.y),n.SetSize(h,c);const u=this.GetCornerSize();n.SetRRectSize(h,c,u,u),n.SetStrokeColor(o),n.SetStrokeWidth(r),0!==l&&n.SetStrokePattern(l),i.AddElement(n),this.ApplyStyles(n,a),this.ApplyEffects(i,!1,!1);const d=t.CreateShape(OptConstant.CSType.RRect);d.SetStrokeColor("white"),d.SetFillColor("none"),d.SetOpacity(0),d.SetStrokeWidth(r+OptConstant.Common.Slop),e?d.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):d.SetEventBehavior(OptConstant.EventBehavior.None),d.SetID(OptConstant.SVGElementClass.Slop),d.ExcludeFromExport(!0),d.SetRRectSize(h,c,u,u),i.AddElement(d);const p=a.Fill.Hatch;if(p&&0!==p){const e=t.CreateShape(OptConstant.CSType.RRect);e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(h,c),e.SetRRectSize(h,c,u,u),e.SetStrokeWidth(0),this.SetFillHatch(e,p),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("= S.RRect: CreateShape output:",i),i}Resize(t,e,i){LogUtil.Debug("= S.RRect: Resize input:",{svgElement:t,newDimensions:e,drawingContainer:i}),i.SetDimensionLinesVisibility(t,!1);const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=Utils1.DeepCopy(e),r=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(o,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(o.width,o.height),t.SetPos(o.x+r.x,o.y+r.y);const l=t.GetElementById(OptConstant.SVGElementClass.Shape);l.SetSize(o.width,o.height);const h=t.GetElementById(OptConstant.SVGElementClass.Slop);h&&h.SetSize(o.width,o.height);const c=t.GetElementById(OptConstant.SVGElementClass.Hatch);c&&c.SetSize(e.width,e.height);const u=this.GetCornerSize();return l.SetRRectSize(o.width,o.height,u,u),c&&c.SetRRectSize(o.width,o.height,u,u),h&&h.SetRRectSize(o.width,o.height,u,u),this.LMResizeSVGTextObject(t,i,e),t.SetRotation(n),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("= S.RRect: Resize output:",r),r}ResizeInTextEdit(t,e){LogUtil.Debug("= S.RRect: ResizeInTextEdit input:",{svgElement:t,newDimensions:e});const i=t.GetRotation();this.SetDimensionLinesVisibility(t,!1);const n=Utils1.DeepCopy(this.Frame),s=Utils1.DeepCopy(e),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(n,s,i);this.StyleRecord.Line.BThick&&null==this.polylist&&Utils2.InflateRect(a,this.StyleRecord.Line.BThick,this.StyleRecord.Line.BThick),t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape);r&&r.SetSize(a.width,a.height);const l=t.GetElementById(OptConstant.SVGElementClass.Slop);l&&l.SetSize(a.width,a.height);const h=t.GetElementById(OptConstant.SVGElementClass.Hatch);h&&h.SetSize(a.width,a.height),this.shapeparam;let c=a.width;a.height<c&&(c=a.height);const u=this.GetCornerSize();return r&&r.SetRRectSize(a.width,a.height,u,u),h&&h.SetRRectSize(a.width,a.height,u,u),l&&l.SetRRectSize(a.width,a.height,u,u),t.SetRotation(i),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(e,null,null,this),LogUtil.Debug("= S.RRect: ResizeInTextEdit output:",o),o}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.RRect: GetPolyPoints input:",{divisionCount:t,applyPositionOffset:e,unusedParamA:i,shouldInflateFrame:n,unusedParamI:s});const a=[],o={},r={};Utils2.CopyRect(o,this.Frame);const l=this.StyleRecord.Line.Thickness/2;n&&Utils2.InflateRect(o,l,l);const h=this.GetCornerSize();if(r.x=0,r.y=0,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,h,!0),r.x=0,r.y=o.height-2*h,r.width=h,r.height=2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,h,0,!0),r.x=o.width-h,r.y=o.height,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,0,-h,!1),r.x=o.width-h,r.y=2*h,r.width=h,r.height=-2*h,PolyUtil.PolyYCurve(a,r,t/2,0,0,-h,0,!1),a.push(new Point$1(a[0].x,a[0].y)),!e)for(let c=0;c<a.length;c++)a[c].x+=o.x,a[c].y+=o.y;return LogUtil.Debug("= S.RRect: GetPolyPoints output:",a),a}ExtendLines(){}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.RRect: GetPerimPts input:",{eventObj:t,hookPoints:e,anchorType:i,keepRotation:n,optionalParam:s,eventData:a});let o=[];const r={},l=[0,0],h=OptConstant.Common.DimMax,c=e.length;if(1===c&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager(r))return o.push(new Point$1(r.x,r.y)),null!=e[0].id&&(o[0].id=e[0].id),LogUtil.Debug("= S.RRect: GetPerimPts output:",o),o;if(i===OptConstant.HookPts.KAT&&null==s)return LogUtil.Debug("= S.RRect: GetPerimPts output:",o),new Instance.Shape.BaseDrawObject(this).GetPerimPts(t,e,i,!1,s,a);if(!!(this.flags&NvConstant.ObjFlags.UseConnect))for(let u=0;u<c;u++)o[u]={x:0,y:0,id:0},o[u].x=e[u].x/OptConstant.Common.DimMax*this.Frame.width+this.Frame.x,o[u].y=e[u].y/OptConstant.Common.DimMax*this.Frame.height+this.Frame.y,null!=e[u].id&&(o[u].id=e[u].id);else{o=new BaseDrawObject(this).GetPerimPts(t,e,i,!0,s,a);let n=this.Frame.width;this.Frame.height<n&&(n=this.Frame.height);const r=this.GetCornerSize()*OptConstant.Common.RoundFactor,c=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null);for(let t=0;t<o.length;t++){if(0===e[t].x&&0===e[t].y)o[t].x+=r,o[t].y+=r;else if(0===e[t].x&&e[t].y===h)o[t].x+=r,o[t].y-=r;else if(e[t].x===h&&0===e[t].y)o[t].x-=r,o[t].y+=r;else if(e[t].x===h&&e[t].y===h)o[t].x-=r,o[t].y-=r;else if(e[t].x<h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].y,l,null,!1);e&&(o[t].x=l[0],e>1&&l[1]<o[t].x&&(o[t].x=l[1]))}else if(e[t].x>3*h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].y,l,null,!1);e&&(o[t].x=l[0],e>1&&l[1]>o[t].x&&(o[t].x=l[1]))}else if(e[t].y<h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].x,l,null,!0);e&&(o[t].y=l[0],e>1&&l[1]<o[t].y&&(o[t].y=l[1]))}else if(e[t].y>3*h/4){const e=PolyUtil.PolyGetIntersect(c,o[t].x,l,null,!0);e&&(o[t].y=l[0],e>1&&l[1]>o[t].y&&(o[t].y=l[1]))}null!=e[t].id&&(o[t].id=e[t].id)}}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("= S.RRect: GetPerimPts output:",o),o}SetShapeIndent(t){LogUtil.Debug("= S.RRect: SetShapeIndent input:",t);const e=this.inside.width,i=this.inside.height,n=i>e?e:i;let s=this.shapeparam;const a=OptConstant.Common.RoundFactor;let o=n;this.moreflags&OptConstant.ObjMoreFlags.FixedRR&&(o=n,t&&(o=n+2*this.GetCornerSize()*a,o=n+2*this.GetCornerSize(o)*a),s=this.GetCornerSize(o)/o);const r=s*a;this.left_sindent=r,this.top_sindent=r,this.right_sindent=r,this.bottom_sindent=r;let l=1,h=1;t&&(l=1-2*this.left_sindent,h=l),this.tindent.left=this.left_sindent*e/l,this.tindent.top=this.top_sindent*i/h,this.tindent.right=this.right_sindent*e/l,this.tindent.bottom=this.bottom_sindent*i/h,LogUtil.Debug("= S.RRect: SetShapeIndent output:",{left_sindent:this.left_sindent,top_sindent:this.top_sindent,right_sindent:this.right_sindent,bottom_sindent:this.bottom_sindent,tint:this.tindent})}SetShapeProperties(t){LogUtil.Debug("= S.RRect: SetShapeProperties input:",t);let e=!1;const i=OptConstant.ObjMoreFlags.FixedRR;return t.hasrrectselected&&((this.moreflags&i)>0===t.rrectfixed&&t.rrectparam===this.shapeparam||(this.moreflags=Utils2.SetFlag(this.moreflags,i,t.rrectfixed),this.shapeparam=t.rrectparam,this.SetSize(this.Frame.width,0,OptConstant.ActionTriggerType.LineLength),e=!0)),super.SetShapeProperties(t)&&(e=!0),LogUtil.Debug("= S.RRect: SetShapeProperties output:",e),e}}class Oval$1 extends BaseShape{constructor(t){(t=t||{}).ShapeType=OptConstant.ShapeType.Oval,t.Frame,t.uniType="Oval",LogUtil.Debug("S.Oval: Input options:",t),super(t),this.dataclass=this.ObjGrow===OptConstant.GrowBehavior.ProPortional?PolygonConstant.ShapeTypes.CIRCLE:PolygonConstant.ShapeTypes.OVAL,LogUtil.Debug("S.Oval: Output dataclass:",this.dataclass)}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;LogUtil.Debug("S.Oval: Input renderer:",t,"isHidden:",e);const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=Utils1.DeepCopy(this.Frame),s=this.StyleRecord;s.Line.BThick&&Utils2.InflateRect(n,s.Line.BThick,s.Line.BThick);const a=s.Line.Paint.Color,o=s.Line.Thickness,r=s.Line.LinePattern,l=n.width,h=n.height;i.SetSize(l,h),i.SetPos(n.x,n.y);const c=t.CreateShape(OptConstant.CSType.Oval);c.SetSize(l,h),c.SetStrokeColor(a),c.SetStrokeWidth(o),0!==r&&c.SetStrokePattern(r),c.SetID(OptConstant.SVGElementClass.Shape),i.AddElement(c),this.ApplyStyles(c,s),this.ApplyEffects(i,!1,!1);const u=t.CreateShape(OptConstant.CSType.Oval);u.SetStrokeColor("white"),u.SetFillColor("none"),u.SetOpacity(0),u.SetStrokeWidth(o+OptConstant.Common.Slop),e?u.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):u.SetEventBehavior(OptConstant.EventBehavior.None),u.SetID(OptConstant.SVGElementClass.Slop),u.ExcludeFromExport(!0),u.SetSize(l,h),i.AddElement(u);const d=s.Fill.Hatch;if(d&&0!==d){const e=t.CreateShape(OptConstant.CSType.Oval);e.SetID(OptConstant.SVGElementClass.Hatch),e.SetSize(l,h),e.SetStrokeWidth(0),this.SetFillHatch(e,d),i.AddElement(e)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("S.Oval: Output shapeContainer:",i),i}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.Oval: Input parameters:",{curveType:t,frame:e,inflate:i,isClosed:n,isReversed:s});let a=[],o={},r=this.StyleRecord.Line.Thickness/2;Utils2.CopyRect(o,this.Frame),i&&Utils2.InflateRect(o,r,r);let l={x:o.width/2,y:0,width:o.width/2,height:o.height};PolyUtil.PolyYCurve(a,l,t,0,0,0,0,!1),a.pop();let h={x:0,y:o.height,width:o.width/2,height:-o.height};if(PolyUtil.PolyYCurve(a,h,t,0,0,0,0,!0),a.pop(),!e)for(let c=0;c<a.length;c++)a[c].x+=o.x,a[c].y+=o.y;return LogUtil.Debug("S.Oval: Output points:",a),a}ExtendLines(){LogUtil.Debug("S.Oval: ExtendLines called")}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.Oval: Input parameters:",{event:t,points:e,hookType:i,isClosed:n,tableIndex:s,isReversed:a});let o=[],r=this.Frame.width,l=this.Frame.height,h=r/2,c=l/2,u=OptConstant.Common.DimMax;if(1===e.length&&e[0].y===-OptConstant.AStyles.CoManager&&this.IsCoManager({}))return o.push(new Point$1(this.Frame.x,this.Frame.y)),null!=e[0].id&&(o[0].id=e[0].id),LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o;if(i===OptConstant.HookPts.KAT)return o=this.BaseDrawingObject_GetPerimPts(t,e,i,!1,s,a),LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o;if(this.flags&NvConstant.ObjFlags.UseConnect)for(let d=0;d<e.length;d++)o[d]={x:e[d].x/u*r+this.Frame.x,y:e[d].y/u*l+this.Frame.y,id:e[d].id||0};else for(let d=0;d<e.length;d++){let t=r*(e[d].x-u/2)/u,i=l*(e[d].y-u/2)/u;if(0!==t&&0!==i){let e=i<0?-1:1,n=1/(t/i*(t/i)/(h*h)+1/(c*c));t=t/i*(i=Math.sqrt(n)*e)}o.push(new Point$1(t+(this.Frame.x+this.Frame.x+r)/2,i+(this.Frame.y+this.Frame.y+l)/2)),null!=e[d].id&&(o[d].id=e[d].id)}if(!n){let t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o}BaseDrawingObject_GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("S.Oval: Input parameters:",{event:t,points:e,hookType:i,isClosed:n,tableIndex:s,isReversed:a});const o=[],r=e.length,l=PolygonConstant.ShapeTypes.TRIANGLE,h=OptConstant.Common.DimMax;for(let c=0;c<r;c++){const t={x:e[c].x/h*this.Frame.width+this.Frame.x,y:(this.dataclass===l?h-e[c].y:e[c].y)/h*this.Frame.height+this.Frame.y,id:e[c].id||0};o.push(t)}if(!n){const t=-this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(this.Frame,t,o)}return LogUtil.Debug("S.Oval: Output perimeterPoints:",o),o}SetShapeIndent(t){LogUtil.Debug("S.Oval: Input isIndented:",t);const e=OptConstant.Common.RoundFactor/2,i=this.inside.width,n=this.inside.height;this.leftIndent=e,this.topIndent=e,this.rightIndent=e,this.bottomIndent=e;let s=1,a=1,o=1,r=1;t&&(s=o=1-2*this.leftIndent,a=r=s),this.tindent.left=this.leftIndent*i/s,this.tindent.top=this.topIndent*n/a,this.tindent.right=this.rightIndent*i/o,this.tindent.bottom=this.bottomIndent*n/r,LogUtil.Debug("S.Oval: Output tindent:",this.tindent)}}class BaseSymbol extends BaseShape{constructor(t){LogUtil.Debug("S.BaseSymbol - Constructor input:",t),(t=t||{}).ObjGrow=OptConstant.GrowBehavior.All,t.ResizeAspectConstrain=!0,super(t),this.nativeDataArrayBuffer=t.nativeDataArrayBuffer||null,this.SymbolData=t.SymbolData||null,LogUtil.Debug("S.BaseSymbol - Constructor output:",this)}CreateActionTriggers2(t,e,i,n){LogUtil.Debug("S.BaseSymbol - CreateActionTriggers2 input:",{svgDocument:t,triggerId:e,actionHandler:i,releaseHandler:n});const s=super.CreateActionTriggers(t,e,i,n);return LogUtil.Debug("S.BaseSymbol - CreateActionTriggers2 output:",s),s}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.BaseSymbol - CreateActionTriggers input:",{svgDocument:t,triggerId:e,actionHandler:i,releaseHandler:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL],a=t.CreateShape(OptConstant.CSType.Group),o=OptConstant.Common.KnobSize,r=OptConstant.Common.RKnobSize;let l=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(l*=2);const h=o/l,c=r/l,u=this.Frame;let d=u.width,p=u.height;d+=h,p+=h;const g=Utils1.DeepCopy(u);g.x-=h/2,g.y-=h/2,g.width+=h,g.height+=h;let f=i.GetRotation()+22.5;f>=360&&(f=0);const m=Math.floor(f/45),v=s.slice(m).concat(s.slice(0,m)),b={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:h,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1};if(e!==n&&(b.fillColor="white",b.strokeSize=1,b.strokeColor="black",b.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock)b.fillColor="gray",b.locked=!0;else if(this.NoGrow()){b.fillColor="red",b.strokeColor="red";for(let t=0;t<8;t++)v[t]=CursorConstant.CursorType.Default}b.knobID=OptConstant.ActionTriggerType.TopLeft,b.cursorType=v[0];let y=this.GenericKnob(b);return a.AddElement(y),b.x=d-h,b.y=0,b.cursorType=v[2],b.knobID=OptConstant.ActionTriggerType.TopRight,y=this.GenericKnob(b),a.AddElement(y),b.x=d-h,b.y=p-h,b.cursorType=v[4],b.knobID=OptConstant.ActionTriggerType.BottomRight,y=this.GenericKnob(b),a.AddElement(y),b.x=0,b.y=p-h,b.cursorType=v[6],b.knobID=OptConstant.ActionTriggerType.BottomLeft,y=this.GenericKnob(b),a.AddElement(y),b.locked||this.NoGrow()||(b.shapeType=OptConstant.CSType.Oval,b.x=d-3*c,b.y=p/2-c/2,b.cursorType=CursorConstant.CursorType.Rotate,b.knobID=OptConstant.ActionTriggerType.Rotate,b.fillColor="white",b.fillOpacity=.001,b.strokeSize=1.5,b.strokeColor="#555555",y=this.GenericKnob(b),a.AddElement(y)),a.SetSize(d,p),a.SetPos(g.x,g.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.BaseSymbol - CreateActionTriggers output:",a),a}ChangeShape(t,e,i,n,s){LogUtil.Debug("S.BaseSymbol - ChangeShape input:",{event:t,targetElement:e,newProperties:i,previousState:n,additionalData:s});return LogUtil.Debug("S.BaseSymbol - ChangeShape output:",false),false}Flip(t){if(LogUtil.Debug("S.BaseSymbol - Flip input:",t),T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),t&OptConstant.ExtraFlags.FlipHoriz){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipHoriz,!t)}if(t&OptConstant.ExtraFlags.FlipVert){const t=0!=(this.extraflags&OptConstant.ExtraFlags.FlipVert);this.extraflags=Utils2.SetFlag(this.extraflags,OptConstant.ExtraFlags.FlipVert,!t)}LogUtil.Debug("S.BaseSymbol - Flip output:",this.extraflags)}LMActionPreTrack(t,e){LogUtil.Debug("S.BaseSymbol - LMActionPreTrack input:",{event:t,trigger:e}),-1!==this.DataID&&(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)&&T3Gv.opt.actionSvgObject.textElem.SetVisible(!1),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),LogUtil.Debug("S.BaseSymbol - LMActionPreTrack output: completed")}LMActionPostRelease(t){LogUtil.Debug("S.BaseSymbol - LMActionPostRelease input:",t),-1!==this.DataID&&(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)&&T3Gv.opt.actionSvgObject.textElem.SetVisible(!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.UpdateLinks(),T3Gv.opt.linkParams=null,this.sizedim.width=this.Frame.width,this.sizedim.height=this.Frame.height,LogUtil.Debug("S.BaseSymbol - LMActionPostRelease output: completed")}}var LockOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},LockOutlinedSvg=LockOutlined$2;function _objectSpread$1(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?Object(arguments[e]):{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})))),n.forEach((function(e){_defineProperty$1(t,e,i[e])}))}return t}function _defineProperty$1(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var LockOutlined=function(t,e){var i=_objectSpread$1({},t,e.attrs);return createVNode(AntdIcon,_objectSpread$1({},i,{icon:LockOutlinedSvg}),null)};LockOutlined.displayName="LockOutlined",LockOutlined.inheritAttrs=!1;var LockOutlined$1=LockOutlined,UnlockOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},UnlockOutlinedSvg=UnlockOutlined$2;function _objectSpread(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?Object(arguments[e]):{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})))),n.forEach((function(e){_defineProperty(t,e,i[e])}))}return t}function _defineProperty(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var UnlockOutlined=function(t,e){var i=_objectSpread({},t,e.attrs);return createVNode(AntdIcon,_objectSpread({},i,{icon:UnlockOutlinedSvg}),null)};UnlockOutlined.displayName="UnlockOutlined",UnlockOutlined.inheritAttrs=!1;var UnlockOutlined$1=UnlockOutlined;class AntdUtil{static ShowNotification(t,e,i){notification[t]({message:e,description:i,style:{fontSize:"12px"},duration:730,placement:"topRight",onClick:()=>{LogUtil.Debug("= u.AntdUtil: ShowNotification/ Message callback clicked")}})}static ShowTopAlert(t,e,i){globalMsgShow.value=!0,commonMsg.value=i;const n=globalMsgShow.value?AdjustVlScrollHeight:0;T3Gv.docUtil&&T3Gv.docUtil.UpdateWorkArea(n)}static CloseGlobalMsg(){globalMsgShow.value=!1;const t=globalMsgShow.value?AdjustVlScrollHeight:0;T3Gv.docUtil&&T3Gv.docUtil.UpdateWorkArea(t)}static ShowMessage(t,e){switch(t){case"error":message.error(e);break;case"warning":message.warning(e);break;case"success":message.success(e)}}}const insertT3EntryDialog=ref$1({active:!1,data:null});class IdxPage2{constructor(){var t;this.webview=null==(t=window.chrome)?void 0:t.webview}initPage(){}initQuasar(t){this.$q=t,Hvac$1.WebClient.initQuasar(this.$q),Hvac$1.QuasarUtil.initQuasar(this.$q)}initGlobalNav(){globalNav.value.title="HVAC Drawer",globalNav.value.back=null,globalNav.value.home="/"}restoreAppState(){var t;if(null==(t=this.webview)?void 0:t.postMessage)return;const e=Hvac$1.LsOpt.loadParsedAppStateLS();e&&(appStateV2.value=e)}isLoggedIn(){this.$q.cookies.has("token")?(liveApi.get("hvacTools").then((async t=>{const e=await t.json();e.length>0&&(null==e||e.forEach((t=>{this.addOnlineLibImage(t)})))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("hvacObjectLibs").then((async t=>{const e=await t.json();e.length>0&&e.forEach((t=>{library.value.objLib.push({id:t.id,label:t.label,items:t.items,online:!0})}))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("me").then((async t=>{user.value=await t.json()})).catch((t=>{}))):user.value=null}static autoManualToggle(t){LogUtil.Debug("5555555 IndexPage2.vue->autoManualToggle->item, locked value",t),t.t3Entry.auto_manual=t.t3Entry.auto_manual?0:1,this.T3UpdateEntryField("auto_manual",t)}static T3UpdateEntryField(t,e){if(!e.t3Entry)return;let i=e.t3Entry[t];const n=i;Math.abs(i)>=1e3&&(i/=1e3),"value"!==t&&"control"!==t||IdxUtils.refreshObjectStatus(e);const s={action:3,field:t,value:i,panelId:e.t3Entry.pid,entryIndex:e.t3Entry.index,entryType:T3_Types[e.t3Entry.type]};isBuiltInEdge.value?Hvac$1.WebClient.UpdateEntry(s):Hvac$1.WsClient.UpdateEntry(s),LogUtil.Debug("= Idx T3UpdateEntryField to T3 before, after",n,i)}initFetchPanelEntryInterval(){var t;(null==(t=this.webview)?void 0:t.postMessage)&&(this.getPanelsInterval=setInterval((()=>{Hvac$1.WebClient.GetPanelsList()}),1e4),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(t.length<=0)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac$1.WebClient.GetEntries(null,null,e)}),1e4))}initMessageClient(){if(isBuiltInEdge.value)return Hvac$1.WebClient.GetInitialData(),Hvac$1.WebClient.GetPanelsList(),void this.initFetchPanelEntryInterval();isBuiltInEdge.value||this.initExternalBrowserOpt()}initExternalBrowserOpt(){isBuiltInEdge.value||(Hvac$1.WsClient.initQuasar(this.$q),Hvac$1.WsClient.connect(),setTimeout((()=>{const t=Hvac$1.DeviceOpt.getCurrentDevice();t?(deviceModel.value.active=!1,deviceModel.value.data=t,Hvac$1.WsClient.GetInitialData(t.deviceId,t.graphic,!0)):deviceModel.value.active=!0}),1e3),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(0===t.length)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac$1.WsClient.GetEntries(e)}),1e4))}save(t=!1,e=!1){LogUtil.Debug("= Idx2 save to local storage",(new Date).toLocaleString()),savedNotify.value=t,DataOpt.SaveToLocalStorage(),e&&DataOpt.SaveToT3000()}saveToLocal(){const t=this.prepareSaveData();Hvac$1.LsOpt.saveAppState(t),isBuiltInEdge.value||Hvac$1.DeviceOpt.saveDeviceAppState(deviceAppState,deviceModel,t)}saveToT3000(){const t=this.prepareSaveData();if(isBuiltInEdge.value)Hvac$1.WebClient.SaveGraphicData(null,null,t);else{if(globalMsg.value.find((t=>"get_initial_data"===t.msgType)))return void LogUtil.Debug("= Idx save to T3000 with initial data status error, cancel auto save");const e=Hvac$1.DeviceOpt.getCurrentDevice(),i=null==e?void 0:e.deviceId,n=null==e?void 0:e.graphic;i&&n?Hvac$1.WsClient.SaveGraphic(i,n,t):LogUtil.Debug("= Idx save to T3000 current device is null")}}initAutoSaveInterval(){setTimeout((()=>{this.autoSaveInterval=setInterval((()=>{this.save(!0,!0)}),15e3)}),1e4)}prepareSaveData(){const t=lodash.exports.cloneDeep(toRaw(appStateV2.value));return t.itemsCount=t.items.filter((t=>0!==t.width)).length,t.selectedTargets=[],t.elementGuidelines=[],t.rulersGridVisible=rulersGridVisible.value,t}T3UpdateEntryField(t,e){if(LogUtil.Debug("idx page 2  T3UpdateEntryField appState before",appStateV2.value),!e.t3Entry)return;let i=e.t3Entry[t];const n=i;Math.abs(i)>=1e3&&(i/=1e3),"value"!==t&&"control"!==t||IdxUtils.refreshObjectStatus(e);const s={action:3,field:t,value:i,panelId:e.t3Entry.pid,entryIndex:e.t3Entry.index,entryType:T3_Types[e.t3Entry.type]};isBuiltInEdge.value?Hvac$1.WebClient.UpdateEntry(s):Hvac$1.WsClient.UpdateEntry(s),LogUtil.Debug("= Idx T3UpdateEntryField to T3 before, after",n,i)}addOnlineLibImage(t){const e=library.value.images.findIndex((e=>e.id==="IMG-"+t.id));-1!==e&&library.value.images.splice(e,1),library.value.images.push({id:"IMG-"+t.id,dbId:t.id,name:t.name,path:{}.API_URL+"/file/"+t.file.path,online:!0})}addToNewLibrary(){if(appStateV2.value.selectedTargets.length<1||locked.value)return;const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`))));let e=!1;const i=lodash.exports.cloneDeep(t);library.value.objLibItemsCount++;let n=null;user.value&&(e=!0,liveApi.post("hvacObjectLibs",{json:{label:"Item "+library.value.objLibItemsCount,items:i.map((t=>(delete t.id,t)))}}).then((async t=>{n=await t.json(),AntdUtil.ShowMessage("success","Successfully saved to library"),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:n.items,online:e}),IdxUtils.saveNewLib()})).catch((t=>{AntdUtil.ShowMessage("error",t.message)}))),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:i,online:e}),IdxUtils.saveNewLib()}viewportLeftClick(t){t.preventDefault();if(!locked.value&&"Pointer"!==selectedTool.value.name&&"Wall"!=selectedTool.value.name&&!isDrawing.value&&"Int_Ext_Wall"!=selectedTool.value.name&&"Duct"!=selectedTool.value.name){var e={rect:{width:60,height:60,top:t.clientY,left:t.clientX},clientX:t.clientX,clientY:t.clientY};onSelectoDragEnd(e),this.selectTool(tools[0])}}selectTool(t,e="default"){LogUtil.Debug("= IdxPage selectTool",t,e),selectedTool.value=t,"string"==typeof t&&(selectedTool.value=tools.find((e=>e.name===t))),selectedTool.value.type=e,Hvac$1.UI.evtOpt.HandleSidebarToolEvent(selectedTool)}viewportRightClick(t){t.preventDefault(),this.selectTool(tools[0]),isDrawing.value&&(isDrawing.value=!1,this.undoAction(),setTimeout((()=>{this.refreshObjects()}),10),Hvac$1.PageMain.ClearItemsWithZeroWidth(appStateV2),Hvac$1.PageMain.SetWallDimensionsVisible("all",isDrawing.value,appStateV2,!1))}undoAction(){undoHistory.value.length<1||(redoHistory.value.unshift({title:lastAction,state:lodash.exports.cloneDeep(appStateV2.value)}),appStateV2.value=lodash.exports.cloneDeep(undoHistory.value[0].state),undoHistory.value.shift(),Hvac$1.IdxPage.refreshMoveable())}redoAction(){redoHistory.value.length<1||(undoHistory.value.unshift({title:lastAction,state:lodash.exports.cloneDeep(appStateV2.value)}),appStateV2.value=lodash.exports.cloneDeep(redoHistory.value[0].state),redoHistory.value.shift(),Hvac$1.IdxPage.refreshMoveable())}updateWeldModelCanvas(t,e){appStateV2.value.items.map((i=>{var n,s,a;if(("Weld_General"===i.type||"Weld_Duct"===i.type)&&i.id===t.id){const t=null==(n=null==i?void 0:i.weldItems[0])?void 0:n.translate[0],o=null==(s=null==i?void 0:i.weldItems[0])?void 0:s.translate[1];null==(a=null==i?void 0:i.weldItems)||a.forEach((i=>{const n=null==e?void 0:e.find((t=>{var e;return(null==(e=null==t?void 0:t.item)?void 0:e.id)===(null==i?void 0:i.id)}));n&&(i.width=n.newPos.width,i.height=n.newPos.height,i.translate[0]=t+n.newPos.trsx,i.translate[1]=o+n.newPos.trsy)}))}}))}updateWeldModel(t,e){appStateV2.value.items.map((i=>{"Weld"===i.type&&i.id===t.id&&(i.settings.weldItems=e)}))}toggleRulersGrid(t){rulersGridVisible.value="Enable"===t,appStateV2.value.rulersGridVisible=rulersGridVisible.value,this.save(!1,!1)}convertObjectType(t,e){var i;if(t||(t=appStateV2.value.items[appStateV2.value.activeItemIndex]),!t)return;addActionToHistory("Convert object to "+e);const n=lodash.exports.cloneDeep(null==(i=tools.find((t=>t.name===e)))?void 0:i.settings)||{},s=Object.keys(n).reduce(((t,e)=>(t[e]=n[e].value,t)),{}),a={};for(const r in s)Object.hasOwnProperty.call(s,r)&&(void 0!==t.settings[r]?a[r]=t.settings[r]:a[r]=s[r]);const o=["bgColor","textColor","title","t3EntryDisplayField"];for(const r of o)void 0===a[r]&&(a[r]=t.settings[r]);t.type=e,t.settings=a}deleteLibImage(t){t.online&&liveApi.delete("hvacTools/"+t.dbId||t.id.slice(4)).then((async()=>{this.$q.notify({type:"positive",message:"Successfully deleted"})})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}));const e=library.value.images.findIndex((e=>e.name===t.name));if(-1!==e&&(library.value.images.splice(e,1),!t.online)){if(library.value.images.length<=0)return;const t=lodash.exports.cloneDeep(library.value.images[e].path);isBuiltInEdge.value?Hvac$1.WebClient.DeleteImage(toRaw(t)):Hvac$1.WsClient.DeleteImage(toRaw(t)),IdxUtils.saveLib()}}renameLibItem(t,e){user.value&&t.online&&liveApi.patch("hvacObjectLibs/"+t.id,{json:{label:e}}).then((async()=>{this.$q.notify({type:"positive",message:"Successfully updated"})})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}));const i=library.value.objLib.findIndex((e=>e.name===t.name));-1!==i&&(library.value.objLib[i].label=e),IdxUtils.saveLib()}deleteLibItem(t){user.value&&t.online&&liveApi.delete("hvacObjectLibs/"+t.id).then((async()=>{this.$q.notify({type:"positive",message:"Successfully deleted"})})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}));const e=library.value.objLib.findIndex((e=>e.name===t.name));-1!==e&&library.value.objLib.splice(e,1),IdxUtils.saveLib()}pasteFromClipboard(){if(locked.value)return;let t=[];const e=localStorage.getItem("clipboard");if(e&&(t=JSON.parse(e)),!t)return;this.addActionToHistory("Paste");const i=[],n=[];t.forEach((t=>{n.push(this.cloneObject(t))})),setTimeout((()=>{n.forEach((t=>{const e=document.querySelector(`#moveable-item-${t.id}`);i.push(e)})),appStateV2.value.selectedTargets=i,selecto.value.setSelectedTargets(i),appStateV2.value.activeItemIndex=null}),10)}saveSelectedToClipboard(){if(locked.value)return;if(0===appStateV2.value.selectedTargets.length)return;const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`))));localStorage.setItem("clipboard",JSON.stringify(t)),clipboardFull.value=!0}rotate90Selected(t=!1){moveable.value.request("rotatable",{deltaRotate:t?-90:90},!0),Hvac$1.IdxPage.refreshMoveable()}sendSelectedToBack(){this.addActionToHistory("Send selected objects to back");appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))).forEach((t=>{t.zindex=t.zindex-1}))}bringSelectedToFront(){this.addActionToHistory("Bring selected objects to front");appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))).forEach((t=>{t.zindex=t.zindex+1}))}objectSettingsUnchanged(){undoHistory.value.shift()}addToLibrary(){if(appStateV2.value.selectedTargets.length<1||locked.value)return;const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`))));let e=!1;const i=lodash.exports.cloneDeep(t);library.value.objLibItemsCount++;let n=null;user.value&&(e=!0,liveApi.post("hvacObjectLibs",{json:{label:"Item "+library.value.objLibItemsCount,items:i.map((t=>(delete t.id,t)))}}).then((async t=>{n=await t.json(),this.$q.notify({type:"positive",message:"Successfully saved to library"}),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:n.items,online:e}),IdxUtils.saveLib()})).catch((t=>{this.$q.notify({type:"negative",message:t.message})}))),library.value.objLib.push({id:(null==n?void 0:n.id)||library.value.objLibItemsCount,label:"Item "+library.value.objLibItemsCount,items:i,online:e}),IdxUtils.saveLib()}navGoBack(){if(grpNav.value.length>1){const t=grpNav.value[grpNav.value.length-2],e={action:7,panelId:t.pid,entryIndex:t.index};isBuiltInEdge.value?Hvac$1.WebClient.LoadGraphicEntry(e):Hvac$1.WsClient.LoadGraphicEntry(e)}else if(isBuiltInEdge.value)Hvac$1.WebClient.GetInitialData();else{const t=Hvac$1.DeviceOpt.getCurrentDevice(),e=t.panelId,i=t.graphic;Hvac$1.WsClient.GetInitialData(e,i,!0)}}setTheSettingContextMenuVisible(){if(appStateV2.value.selectedTargets.length>1)topContextToggleVisible.value=!1,toggleValueShow.value=!1,toggleNumberShow.value=!1;else if(1===appStateV2.value.selectedTargets.length){const t=appStateV2.value.items.find((t=>`moveable-item-${t.id}`===appStateV2.value.selectedTargets[0].id));null!==t.t3Entry?(topContextToggleVisible.value=!0,this.ObjectRightClicked(t,null)):(topContextToggleVisible.value=!1,toggleValueShow.value=!1,toggleNumberShow.value=!1)}}toggleClicked(t,e,i){"mode"===e&&("Auto"===toggleModeValue.value?(toggleValueDisable.value=!0,toggleNumberDisable.value=!0):(toggleValueDisable.value=!1,toggleNumberDisable.value=!1),t.t3Entry.auto_manual="Auto"===toggleModeValue.value?0:1,this.T3UpdateEntryField("auto_manual",t)),"value"==e&&(t.t3Entry.control="Off"===toggleValueValue.value?0:1,this.T3UpdateEntryField("control",t)),"number-value"===e&&(t.t3Entry.value=1*toggleNumberValue.value,this.T3UpdateEntryField("value",t)),this.save(!1,!0)}ObjectRightClicked(t,e){null!==t.t3Entry?(showSettingMenu.value=!0,1===t.t3Entry.auto_manual?(toggleModeValue.value="Manual",toggleValueDisable.value=!1,toggleNumberDisable.value=!1):(toggleModeValue.value="Auto",toggleValueDisable.value=!0,toggleNumberDisable.value=!0),0===t.t3Entry.digital_analog?toggleValueShow.value=!0:toggleValueShow.value=!1,1===t.t3Entry.control?toggleValueValue.value="On":toggleValueValue.value="Off",1===t.t3Entry.digital_analog&&101!==t.t3Entry.range?(toggleNumberShow.value=!0,toggleNumberValue.value=1*t.t3Entry.value):toggleNumberShow.value=!1):showSettingMenu.value=!1}changeEntryValue(t,e,i){const n=i?"control":"value",s=appStateV2.value.items.find((e=>e.id===t.id));s.t3Entry[n]=e,this.T3UpdateEntryField(n,s)}autoManualToggle(t){LogUtil.Debug("5555555 IndexPage.vue->autoManualToggle->item, locked value",t),t.t3Entry.auto_manual=t.t3Entry.auto_manual?0:1,this.T3UpdateEntryField("auto_manual",t)}objectClicked(t){var e,i,n,s,a;if(LogUtil.Debug("= P.IDX2 objectClicked"),this.setTheSettingContextMenuVisible(),locked.value)if("GRP"===(null==(e=t.t3Entry)?void 0:e.type)){const e={action:7,panelId:t.t3Entry.pid,entryIndex:t.t3Entry.index};isBuiltInEdge.value?Hvac$1.WebClient.LoadGraphicEntry(e):Hvac$1.WsClient.LoadGraphicEntry(e)}else if(["SCHEDULE","PROGRAM","HOLIDAY"].includes(null==(i=t.t3Entry)?void 0:i.type)){const e={action:8,panelId:t.t3Entry.pid,entryType:T3_Types[t.t3Entry.type],entryIndex:t.t3Entry.index};isBuiltInEdge.value?Hvac$1.WebClient.OpenEntryEditWindow(e):Hvac$1.WsClient.OpenEntryEditWindow(e)}else 1===(null==(n=t.t3Entry)?void 0:n.auto_manual)&&0===(null==(s=t.t3Entry)?void 0:s.digital_analog)&&(null==(a=t.t3Entry)?void 0:a.range)&&(t.t3Entry.control=1===t.t3Entry.control?0:1,this.T3UpdateEntryField("control",t))}lockToggle(){appStateV2.value.activeItemIndex=null,appStateV2.value.selectedTargets=[],locked.value=!locked.value,locked.value&&this.selectTool("Pointer"),Hvac$1.IdxPage.restDocumentAreaPosition()}entryLabel(t){let e=t.description&&t.id!==t.description||!t.description&&t.id!==t.label?t.id+" - ":"";return e=t.description||t.label?e:t.id,e+(t.description||t.label||"")}reloadPanelsData(){T3000_Data.value.loadingPanel=null,isBuiltInEdge.value?Hvac$1.WebClient.GetPanelsList():Hvac$1.WsClient.GetPanelsList()}duplicateSelected(){if(appStateV2.value.selectedTargets.length<1)return;this.addActionToHistory("Duplicate the selected objects");const t=[],e={};appStateV2.value.selectedTargets.forEach((i=>{const n=appStateV2.value.items.find((t=>`moveable-item-${t.id}`===i.id));if(n){let i;n.group&&(e[`${n.group}`]||(appStateV2.value.groupCount++,e[`${n.group}`]=appStateV2.value.groupCount),i=e[`${n.group}`]);const s=this.cloneObject(n,i);setTimeout((()=>{const e=document.querySelector(`#moveable-item-${s.id}`);t.push(e)}),10)}})),setTimeout((()=>{appStateV2.value.selectedTargets=t,selecto.value.setSelectedTargets(t),appStateV2.value.activeItemIndex=null}),20)}executeImportFromJson(){var t,e;const i=JSON.parse(importJsonDialog.value.data);(null==(t=i.items)?void 0:t[0].type)?(null==(e=appStateV2.value.items)?void 0:e.length)>0?this.$q.dialog({dark:!0,title:"You have unsaved drawing!",message:"Before proceeding with the import, please note that any unsaved drawing will be lost,\n           and your undo history will also be erased. Are you sure you want to proceed?",cancel:!0,persistent:!0}).onOk((()=>{undoHistory.value=[],redoHistory.value=[],importJsonDialog.value.active=!1,appStateV2.value=i,importJsonDialog.value.data=null,setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100),Hvac$1.IdxPage.refreshMoveable()})).onCancel((()=>{importJsonDialog.value.active=!1})):(undoHistory.value=[],redoHistory.value=[],importJsonDialog.value.active=!1,appStateV2.value=i,importJsonDialog.value.data=null,setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100),Hvac$1.IdxPage.refreshMoveable()):this.$q.notify({message:"Error, Invalid json file",color:"negative",icon:"error",actions:[{label:"Dismiss",color:"white",handler:()=>{}}]})}async saveLibImage(t){if(user.value)return LogUtil.Debug("= Idx saveLibImage file",t),LogUtil.Debug("= Idx saveLibImage user",user.value),void liveApi.post("hvacTools",{json:{name:t.name,fileId:t.id}}).then((async t=>{this.$q.notify({color:"positive",message:"Image successfully saved"});const e=await t.json();this.addOnlineLibImage(e)})).catch((t=>{this.$q.notify({color:"negative",message:t.message})}));library.value.imagesCount++;const e={action:9,filename:t.name,fileLength:t.size,fileData:await this.readFile(t.data)};isBuiltInEdge.value?Hvac$1.WebClient.SaveImage(e):Hvac$1.WsClient.SaveImage(e)}drawObject(t,e,i){var n;if("libItem"===(i=i||selectedTool.value).type)return void this.addLibItem(i.items,t,e);const s=1/appStateV2.value.viewportTransform.scale,a=lodash.exports.cloneDeep(null==(n=tools.find((t=>t.name===i.name)))?void 0:n.settings)||{},o=Object.keys(a).reduce(((t,e)=>(t[e]=a[e].value,t)),{});"G_Rectangle"===i.name&&(t.width=100);const r={title:null,active:!1,type:i.name,translate:[(e.left-viewportMargins.left-appStateV2.value.viewportTransform.x)*s,(e.top-viewportMargins.top-appStateV2.value.viewportTransform.y)*s],width:t.width*s,height:t.height*s,rotate:0,scaleX:1,scaleY:1,settings:o,zindex:1,t3Entry:null,showDimensions:!0};if("Image"===i.type&&(r.image=i,r.type=i.id),i.cat){const[t]=i.cat;r.cat=t}const l=this.addObject(r);return["Value","Icon","Switch"].includes(i.name)&&(linkT3EntryDialog.value.active=!0),setTimeout((()=>{locked.value||(appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((t=>t.id===l.id)))}),10),setTimeout((()=>{if(locked.value)return;const t=document.querySelector(`#moveable-item-${l.id}`);appStateV2.value.selectedTargets=[t],selecto.value.setSelectedTargets([t])}),100),l}toolDropped(t,e){LogUtil.Debug("toolDropped->tool",t,e)}ungroupSelected(){appStateV2.value.selectedTargets.length<2||(this.addActionToHistory("Ungroup the selected objects"),appStateV2.value.selectedTargets.length>0&&appStateV2.value.selectedTargets.forEach((t=>{const e=appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.id));e&&(e.group=void 0)})))}groupSelected(){appStateV2.value.selectedTargets.length<2||(this.addActionToHistory("Group the selected objects"),appStateV2.value.selectedTargets.length>0&&(appStateV2.value.groupCount++,appStateV2.value.selectedTargets.forEach((t=>{const e=appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.id));e&&(e.group=appStateV2.value.groupCount)}))))}exportToJsonAction(){const t=lodash.exports.cloneDeep(toRaw(appStateV2.value));t.selectedTargets=[],t.elementGuidelines=[];const e=document.createElement("a"),i=new Blob([JSON.stringify(t)],{type:"application/json"});e.href=URL.createObjectURL(i),e.download="HVAC_Drawer_Project.json",e.click()}gaugeSettingsSave(t){const e=appStateV2.value.items.findIndex((e=>e.id===t.id));appStateV2.value.items[e]=t,gaugeSettingsDialog.value.active=!1,gaugeSettingsDialog.value.data={}}gaugeSettingsDialogAction(t){gaugeSettingsDialog.value.active=!0,gaugeSettingsDialog.value.data=t}readFile(t){return new Promise(((e,i)=>{var n=new FileReader;n.onload=()=>{e(n.result)},n.onerror=i,n.readAsDataURL(t)}))}weldSelected(){if(appStateV2.value.selectedTargets.length<2)return;if(appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))).some((t=>"Weld"===t.type)))return void this.$q.notify({type:"warning",message:"Currently not supported!"});this.addActionToHistory("Weld selected objects");const t=appStateV2.value.items.filter((t=>appStateV2.value.selectedTargets.some((e=>e.id===`moveable-item-${t.id}`)))),e=t.every((t=>"General"===t.cat)),i=t.every((t=>"Duct"===t.type));e||i?this.drawWeldObjectCanvas(t):this.drawWeldObject(t),t.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>e.id===t.id));-1!==e&&appStateV2.value.items.splice(e,1)})),Hvac$1.IdxPage.refreshMoveable()}checkIsOverlap(t){const e=[];return t.map((t=>{const i=document.querySelector(`#moveable-item-${t.id} .duct-start`),n=document.querySelector(`#moveable-item-${t.id} .duct-end`),s=this.isDuctOverlap(i),a=this.isDuctOverlap(n);e.push({id:t.id,isStartOverlap:s,isEndOverlap:a})})),e}isDuctOverlap(t){const e=t.closest(".moveable-item.Duct"),i=getElementInfo(t),n=document.querySelectorAll(".moveable-item.Duct");for(const s of Array.from(n)){if(e.isSameNode(s))continue;const t=getElementInfo(s),n=getDuctPoints(i),a=getDuctPoints(t);if(getOverlapSize(n,a)>0)return!0}return!1}getDuctPoints(t){const{left:e,top:i,pos1:n,pos2:s,pos3:a,pos4:o}=t;return[n,s,o,a].map((t=>[e+t[0],i+t[1]]))}drawWeldObjectCanvas(t){const e=1/appStateV2.value.viewportTransform.scale,i=t[0].translate[0];t[0].translate[1];const n=Math.min(...t.map((t=>t.translate[0])));let s=Math.min(...t.map((t=>t.translate[1])));const a=Math.max(...t.map((t=>t.translate[0]+t.width))),o=Math.max(...t.map((t=>t.translate[1]+t.height)));let r=i<n?i:n;const l=t.reduce(((t,e)=>{const i=e.rotate*Math.PI/180,n=Math.cos(i),s=Math.sin(i);return[{x:e.translate[0],y:e.translate[1]},{x:e.translate[0]+e.width*n,y:e.translate[1]+e.width*s},{x:e.translate[0]-e.height*s,y:e.translate[1]+e.height*n},{x:e.translate[0]+e.width*n-e.height*s,y:e.translate[1]+e.width*s+e.height*n}].forEach((e=>{t.minX=Math.min(t.minX,e.x),t.minY=Math.min(t.minY,e.y),t.maxX=Math.max(t.maxX,e.x),t.maxY=Math.max(t.maxY,e.y)})),t}),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});l.minX,l.minY,l.maxX,l.minX,l.maxY,l.minY;const h=t.map((t=>{var e;return null!=(e=null==t?void 0:t.type)?e:""})).join("-");let c=t[0].zindex;t.forEach((t=>{t.zindex=c-1,c=t.zindex}));const u=t.every((t=>"Duct"===t.type));if(u){const e=this.checkIsOverlap(t);t.forEach((t=>{const i=e.find((e=>e.id===t.id));i&&(t.overlap={isStartOverlap:i.isStartOverlap,isEndOverlap:i.isEndOverlap})}))}const d={title:`Weld-${h}`,active:!1,cat:"General",type:u?"Weld_Duct":"Weld_General",translate:[r,s],width:(a-n)*e+8,height:(o-s)*e+8,rotate:0,scaleX:1,scaleY:1,settings:{active:!1,fillColor:"#659dc5",fontSize:16,inAlarm:!1,textColor:"inherit",titleColor:"inherit"},weldItems:lodash.exports.cloneDeep(t),zindex:1,t3Entry:null,id:appStateV2.value.itemsCount+1};this.addObject(d)}addObject(t,e,i=!0){var n;i&&this.addActionToHistory(`Add ${null!=(n=null==t?void 0:t.type)?n:""}`),appStateV2.value.itemsCount++,t.id=appStateV2.value.itemsCount,t.group=e,t.settings.titleColor||(t.settings.titleColor="inherit"),t.settings.bgColor||(t.settings.bgColor="inherit"),t.settings.textColor||(t.settings.textColor="inherit"),t.settings.fontSize||(t.settings.fontSize=16),appStateV2.value.items.push(t);const s=document.querySelectorAll(".moveable-item");return appStateV2.value.elementGuidelines=[],Array.from(s).forEach((function(t){appStateV2.value.elementGuidelines.push(t)})),t}drawWeldObject(t){const e=1/appStateV2.value.viewportTransform.scale,i=t[0].translate[0];t[0].translate[1];const n=Math.min(...t.map((t=>t.translate[0]))),s=Math.min(...t.map((t=>t.translate[1]))),a=Math.max(...t.map((t=>t.translate[0]+t.width))),o=Math.max(...t.map((t=>t.translate[1]+t.height))),r=i<n?i:n,l=t.map((t=>{var e;return null!=(e=null==t?void 0:t.type)?e:""})).join("-");let h=t[0].zindex;t.forEach((t=>{t.zindex=h-1,h=t.zindex}));const c={title:`Weld-${l}`,active:!1,type:"Weld",translate:[r,s],width:(a-n)*e,height:(o-s)*e,rotate:0,scaleX:1,scaleY:1,settings:{active:!1,fillColor:"#659dc5",fontSize:16,inAlarm:!1,textColor:"inherit",titleColor:"inherit",weldItems:lodash.exports.cloneDeep(t)},zindex:1,t3Entry:null,id:appStateV2.value.itemsCount+1};this.addObject(c)}deleteSelected(){this.addActionToHistory("Remove selected objects"),appStateV2.value.selectedTargets.length>0&&(appStateV2.value.selectedTargets.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.id));-1!==e&&appStateV2.value.items.splice(e,1)})),appStateV2.value.selectedTargets=[],appStateV2.value.activeItemIndex=null)}newProject(){var t;(null==(t=appStateV2.value.items)?void 0:t.length)>0?this.$q.dialog({dark:!0,title:"Do you want to clear the drawing and start over?",message:"This will also erase your undo history",cancel:!0,persistent:!0}).onOk((()=>{Hvac$1.IdxPage.newProject()})).onCancel((()=>{})):Hvac$1.IdxPage.newProject()}insertT3EntryOnSave(){if(this.addActionToHistory("Link object to T3000 entry"),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField||(void 0===appStateV2.value.items[appStateV2.value.activeItemIndex].label?appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="description":appStateV2.value.items[appStateV2.value.activeItemIndex].settings.t3EntryDisplayField="label"),appStateV2.value.items[appStateV2.value.activeItemIndex].t3Entry=lodash.exports.cloneDeep(toRaw(insertT3EntryDialog.value.data)),"Icon"===appStateV2.value.items[appStateV2.value.activeItemIndex].type){let t="fa-solid fa-camera-retro";"GRP"===insertT3EntryDialog.value.data.type?t="fa-solid fa-camera-retro":"SCHEDULE"===insertT3EntryDialog.value.data.type?t="schedule":"PROGRAM"===insertT3EntryDialog.value.data.type?t="fa-solid fa-laptop-code":"HOLIDAY"===insertT3EntryDialog.value.data.type&&(t="calendar_month"),appStateV2.value.items[appStateV2.value.activeItemIndex].settings.icon=t}IdxUtils.refreshObjectStatus(appStateV2.value.items[appStateV2.value.activeItemIndex]),insertT3EntryDialog.value.data=null,insertT3EntryDialog.value.active=!1}insertT3EntrySelect(t){this.addActionToHistory("Insert object to T3000 entry");const e={clientX:300,clientY:100,top:100,left:200+80*insertCount.value},i=tools.find((t=>"Pump"===t.name)),n=this.drawObject({width:60,height:60},e,i),s=appStateV2.value.items.findIndex((t=>t.id===n.id));appStateV2.value.activeItemIndex=s,this.insertT3EntryOnSave(),insertCount.value++}selectPanelFilterFn(t,e){e(""!==t?()=>{const e=t.toUpperCase();selectPanelOptions.value=T3000_Data.value.panelsData.filter((t=>{var i,n;return t.command.toUpperCase().indexOf(e)>-1||(null==(i=t.description)?void 0:i.toUpperCase().indexOf(e))>-1||(null==(n=t.label)?void 0:n.toUpperCase().indexOf(e))>-1}))}:()=>{selectPanelOptions.value=T3000_Data.value.panelsData})}rotate90(t,e=!1){t&&(this.addActionToHistory("Rotate object"),t.rotate=e?t.rotate-90:t.rotate+90,Hvac$1.IdxPage.refreshMoveable())}flipH(t){this.addActionToHistory("Flip object H"),1===t.scaleX?t.scaleX=-1:t.scaleX=1,Hvac$1.IdxPage.refreshMoveable()}flipV(t){this.addActionToHistory("Flip object V"),1===t.scaleY?t.scaleY=-1:t.scaleY=1,Hvac$1.IdxPage.refreshMoveable()}bringToFront(t){this.addActionToHistory("Bring object to front"),t.zindex=t.zindex+1}sendToBack(t){this.addActionToHistory("Send object to back"),t.zindex=t.zindex-1}removeObject(t){this.addActionToHistory("Remove object");const e=appStateV2.value.items.findIndex((e=>e.id===t.id));appStateV2.value.activeItemIndex=null,appStateV2.value.items.splice(e,1),appStateV2.value.selectedTargets=[]}duplicateObject(t){this.addActionToHistory(`Duplicate ${t.type}`),appStateV2.value.activeItemIndex=null;const e=this.cloneObject(t);appStateV2.value.selectedTargets=[],setTimeout((()=>{this.selectObject(e)}),10)}cloneObject(t,e){const i=lodash.exports.cloneDeep(t);i.translate[0]=i.translate[0]+5,i.translate[1]=i.translate[1]+5;return this.addObject(i,e,!1)}selectObject(t){const e=document.querySelector(`#moveable-item-${t.id}`);appStateV2.value.selectedTargets=[e],appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((e=>e.id===t.id))}addLibItem(t,e,i){const n=[],s=[];appStateV2.value.groupCount++,t.forEach((t=>{s.push(this.cloneObject(t,appStateV2.value.groupCount))})),setTimeout((()=>{s.forEach((t=>{const e=document.querySelector(`#moveable-item-${t.id}`);n.push(e)})),appStateV2.value.selectedTargets=n,selecto.value.setSelectedTargets(n),appStateV2.value.activeItemIndex=null;const t=1/appStateV2.value.viewportTransform.scale;setTimeout((()=>{moveable.value.request("draggable",{x:(i.clientX-viewportMargins.left-appStateV2.value.viewportTransform.x)*t-e.width*t,y:(i.clientY-viewportMargins.top-appStateV2.value.viewportTransform.y)*t-e.height*t},!0),setTimeout((()=>{Hvac$1.IdxPage.refreshMoveable()}),1)}),10)}),10)}onRotateGroupStart(t){this.addActionToHistory("Rotate Group"),t.events.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));t.set(appStateV2.value.items[e].rotate),t.dragStart&&t.dragStart.set(appStateV2.value.items[e].translate)}))}onRotateGroup(t){t.events.forEach(((t,e)=>{const i=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));appStateV2.value.items[i].translate=t.drag.beforeTranslate,appStateV2.value.items[i].rotate=t.rotate}))}onResizeGroup(t){t.events.forEach(((t,e)=>{t.target.style.width=`${t.width}px`,t.target.style.height=`${t.height}px`,t.target.style.transform=t.drag.transform}))}onResizeGroupEnd(t){t.events.forEach((t=>{const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.lastEvent.target.id));appStateV2.value.items[e].width=t.lastEvent.width,appStateV2.value.items[e].height=t.lastEvent.height,appStateV2.value.items[e].translate=t.lastEvent.drag.beforeTranslate})),this.refreshObjects(),keepRatio.value=!1}onRotate(t){appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id)).rotate=t.rotate}onResizeEnd(t){if(null===t.lastEvent||void 0===t.lastEvent)return;const e=appStateV2.value.items.findIndex((e=>{var i,n;return`moveable-item-${e.id}`===(null==(n=null==(i=null==t?void 0:t.lastEvent)?void 0:i.target)?void 0:n.id)}));appStateV2.value.items[e].width=t.lastEvent.width,appStateV2.value.items[e].height=t.lastEvent.height,appStateV2.value.items[e].translate=t.lastEvent.drag.beforeTranslate,Hvac$1.PageMain.UpdateExteriorWallStroke(appStateV2,e,t.lastEvent.height),this.refreshObjects()}onResize(t){const e=appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id));t.target.style.width=`${t.width}px`,t.target.style.height=`${t.height}px`,t.target.style.transform=`translate(${t.drag.beforeTranslate[0]}px, ${t.drag.beforeTranslate[1]}px) rotate(${e.rotate}deg) scaleX(${e.scaleX}) scaleY(${e.scaleY})`}onDrag(t){appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id)),t.target.style.transform=t.transform}onDragEnd(t){if(t.lastEvent){appStateV2.value.items.find((e=>`moveable-item-${e.id}`===t.target.id)).translate=t.lastEvent.beforeTranslate,this.save(!1,!1),this.refreshObjects()}else undoHistory.value.shift()}onDragGroupStart(t){this.addActionToHistory("Move Group"),t.events.forEach(((t,e)=>{const i=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));t.set(appStateV2.value.items[i].translate)}))}onDragGroup(t){t.events.forEach(((t,e)=>{const i=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));appStateV2.value.items[i].translate=t.beforeTranslate}))}onDragGroupEnd(t){t.lastEvent?this.refreshObjects():undoHistory.value.shift()}onSelectoDragStart(t){const e=t.inputEvent.target;(moveable.value.isMoveableElement(e)||appStateV2.value.selectedTargets.some((t=>t===e||t.contains(e))))&&t.stop()}onSelectoSelectEnd(t){var e;if(appStateV2.value.selectedTargets=t.selected,(null==t?void 0:t.selected)&&!(null==(e=null==t?void 0:t.inputEvent)?void 0:e.ctrlKey)){const e=appStateV2.value.items.filter((e=>t.selected.some((t=>t.id===`moveable-item-${e.id}`))));[...new Set(e.filter((t=>t.group)).map((t=>t.group)))].forEach((t=>{this.selectGroup(t)}))}1===appStateV2.value.selectedTargets.length?appStateV2.value.activeItemIndex=appStateV2.value.items.findIndex((t=>`moveable-item-${t.id}`===appStateV2.value.selectedTargets[0].id)):appStateV2.value.activeItemIndex=null,t.isDragStart&&(t.inputEvent.preventDefault(),setTimeout((()=>{moveable.value.dragStart(t.inputEvent)}))),appStateV2.value.selectedTargets.length>1&&!locked.value?setTimeout((()=>{ctxMenuConfig.value.isShow=!0}),100):ctxMenuConfig.value.isShow=!1,IdxUtils.refreshMoveableGuides(),setTimeout((()=>{Hvac$1.PageMain.SetWallDimensionsVisible("select",isDrawing.value,appStateV2,null)}),100)}selectGroup(t){const e=[];appStateV2.value.items.filter((e=>e.group===t&&!appStateV2.value.selectedTargets.some((t=>t.id===`moveable-item-${e.id}`)))).forEach((t=>{const i=document.querySelector(`#moveable-item-${t.id}`);e.push(i)})),appStateV2.value.selectedTargets=appStateV2.value.selectedTargets.concat(e),selecto.value.setSelectedTargets(appStateV2.value.selectedTargets)}onResizeStart(t){this.addActionToHistory("Resize object");const e=appStateV2.value.items.findIndex((e=>`moveable-item-${e.id}`===t.target.id));t.setOrigin(["%","%"]),t.dragStart&&t.dragStart.set(appStateV2.value.items[e].translate)}addActionToHistory(t){"Move Object"!==t&&setTimeout((()=>{this.save(!1,!1),this.refreshObjects()}),200),redoHistory.value=[],undoHistory.value.unshift({title:t,state:lodash.exports.cloneDeep(appStateV2.value)}),undoHistory.value.length>20&&undoHistory.value.pop()}viewportMouseMoved(t){cursorIconPos.value.x=t.clientX-viewportMargins.left,cursorIconPos.value.y=t.clientY-viewportMargins.top;const e=1/appStateV2.value.viewportTransform.scale;if(isDrawing.value&&continuesObjectTypes.includes(selectedTool.value.name)&&null!==appStateV2.value.activeItemIndex){const i=t.ctrlKey,n=(t.clientX-viewportMargins.left-appStateV2.value.viewportTransform.x)*e,s=(t.clientY-viewportMargins.top-appStateV2.value.viewportTransform.y)*e,a=n-startTransform.value[0],o=s-startTransform.value[1];let r=Math.atan2(o,a)*(180/Math.PI);i&&(r=5*Math.round(r/5));const l=Math.sqrt(a*a+o*o);appStateV2.value.items[appStateV2.value.activeItemIndex].rotate=r,appStateV2.value.items[appStateV2.value.activeItemIndex].width=l,this.refreshObjects()}}refreshObjects(){if(objectsRef.value)for(const t of objectsRef.value)t.refresh&&t.refresh()}showMoreDevices(){Hvac$1.DeviceOpt.clearDirtyCurrentDevice(),deviceModel.value.active=!0,appStateV2.value.selectedTarget=[],appStateV2.value.selectedTargets=[],appStateV2.value.activeItemIndex=null,Hvac$1.DeviceOpt.refreshGraphicPanelElementCount(deviceModel.value.data)}updateDeviceModel(t,e){deviceModel.value.active=t,deviceModel.value.data=e}}var ObjectType3_vue_vue_type_style_index_0_scoped_true_lang="";const _hoisted_1={key:1,class:"object-title"},_hoisted_2={class:"relative"},_sfc_main=defineComponent({__name:"ObjectType3",props:{item:{},showArrows:{type:Boolean,default:!1}},emits:["autoManualToggle1","objectClicked","changeValue","updateWeldModel"],setup(t,{emit:e}){useCssVars((t=>({"0ffe0833":t.item.settings.titleColor,d92cf254:t.item.settings.bgColor,"13bd5e24":t.item.settings.textColor,"670e5b56":t.item.settings.fontSize+"px"})));const i=t,n=e;LogUtil.Debug("= v.ObjectType3 init",i.item),computed((()=>{var t;return IdxUtils.getEntryRange(null==(t=i.item)?void 0:t.t3Entry)}));const s=computed((()=>{var t,e,n;if(!i.item.t3Entry)return"";const s=IdxUtils.getEntryRange(i.item.t3Entry);if(LogUtil.Debug("= Ot range,t3e",s,i.item.t3Entry),"description"===i.item.settings.t3EntryDisplayField){const e=i.item.t3Entry.description||"",n=i.item.t3Entry.value||"";let a="";if(i.item.t3Entry.range>100){const e=null==(t=s.options)?void 0:t.find((t=>t.value===i.item.t3Entry.value));a=(null==e?void 0:e.name)||""}else 1===i.item.t3Entry.digital_analog?a=(n||"")+" "+((null==s?void 0:s.unit)||""):0===i.item.t3Entry.digital_analog&&(a=i.item.t3Entry.control?(null==s?void 0:s.on)||"":(null==s?void 0:s.off)||"");return e+" "+a}if("label"===i.item.settings.t3EntryDisplayField){const t=i.item.t3Entry.label||"",n=i.item.t3Entry.value||"";let a="";if(i.item.t3Entry.range>100){const t=null==(e=s.options)?void 0:e.find((t=>t.value===i.item.t3Entry.value));a=(null==t?void 0:t.name)||""}else 1===i.item.t3Entry.digital_analog?a=(n||"")+" "+((null==s?void 0:s.unit)||""):0===i.item.t3Entry.digital_analog&&(a=i.item.t3Entry.control?(null==s?void 0:s.on)||"":(null==s?void 0:s.off)||"");return t+" "+a}if("value"===i.item.settings.t3EntryDisplayField||"control"===i.item.settings.t3EntryDisplayField){if(void 0!==i.item.t3Entry.value&&i.item.t3Entry.range>100){const t=null==(n=s.options)?void 0:n.find((t=>t.value===i.item.t3Entry.value));return null==t?void 0:t.name}if(void 0!==i.item.t3Entry.value&&1===i.item.t3Entry.digital_analog)return i.item.t3Entry.value+" "+s.unit;if(void 0!==i.item.t3Entry.control&&0===i.item.t3Entry.digital_analog)return i.item.t3Entry.control?s.on:s.off}const a=i.item.settings.t3EntryDisplayField;return i.item.t3Entry[a]||""}));function a(t){var e,s;if(!i.item.t3Entry||0===i.item.t3Entry.auto_manual)return;let a=!1,o=i.item.t3Entry.value||0;const r=IdxUtils.getEntryRange(null==(e=i.item)?void 0:e.t3Entry);if(void 0!==i.item.t3Entry.value&&i.item.t3Entry.range>100){const e=null==(s=r.options)?void 0:s.filter((t=>1===t.status));if(!e)return;const n=e.findIndex((t=>t.value===i.item.t3Entry.value));if("decrease"===t&&n<e.length-1)o=e[n+1].value;else{if(!("increase"===t&&n>0))return;o=e[n-1].value}}else if(void 0!==i.item.t3Entry.value&&1===i.item.t3Entry.digital_analog)o="increase"===t?i.item.t3Entry.value+1:i.item.t3Entry.value-1;else if(void 0!==i.item.t3Entry.control&&0===i.item.t3Entry.digital_analog)if(a=!0,"decrease"===t&&0===i.item.t3Entry.control)o=1;else{if("increase"!==t||1!==i.item.t3Entry.control)return;o=0}n("changeValue",i.item,o,a)}function o(t){Utils2.StopPropagationAndDefaults(t),IdxPage2.autoManualToggle(i.item),DataOpt.SaveToLocalStorage()}return computed((()=>{const t=i.item;return["Gauge","Dial"].includes(t.type)&&t.settings.colors?"Gauge"===t.type?t.settings.colors.map((t=>[t.offset/100,t.color])):t.settings.colors.map(((e,i)=>({from:i?t.settings.colors[i-1].offset:0,to:e.offset,color:[e.color]}))):null})),ref$1(null),(t,e)=>{var i,n;return openBlock(),createElementBlock("div",null,[t.item.settings.title?(openBlock(),createElementBlock("div",{key:0,class:"object-title",onClick:e[0]||(e[0]=withModifiers((e=>t.$emit("objectClicked")),["stop"]))},toDisplayString(t.item.settings.title),1)):t.item.t3Entry&&"none"!==t.item.settings.t3EntryDisplayField?(openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:0,class:"up-btn absolute",size:"sm",icon:"keyboard_arrow_up",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(i=t.item.t3Entry)?void 0:i.auto_manual),onClick:e[1]||(e[1]=t=>a("increase"))},null,8,["disable"])):createCommentVNode("",!0),createBaseVNode("div",null,[createBaseVNode("span",{onClick:e[2]||(e[2]=e=>t.$emit("objectClicked"))},toDisplayString(s.value||t.item.t3Entry.id),1),void 0!==t.item.t3Entry.auto_manual?(openBlock(),createElementBlock("span",{key:0,class:"mode-icon ml-2 text-lg",onClick:o},[t.item.t3Entry.auto_manual?(openBlock(),createBlock(unref(ATooltip),{key:1,title:"In manual mode"},{default:withCtx((()=>[createVNode(unref(UnlockOutlined$1))])),_:1})):(openBlock(),createBlock(unref(ATooltip),{key:0,title:"In auto mode"},{default:withCtx((()=>[createVNode(unref(LockOutlined$1))])),_:1}))])):createCommentVNode("",!0)]),t.showArrows&&"Switch"!==t.item.type&&["value","control"].includes(t.item.settings.t3EntryDisplayField)?(openBlock(),createBlock(QBtn,{key:1,class:"down-btn absolute",size:"sm",icon:"keyboard_arrow_down",color:"grey-4","text-color":"black",dense:"",disable:0===(null==(n=t.item.t3Entry)?void 0:n.auto_manual),onClick:e[3]||(e[3]=t=>a("decrease"))},null,8,["disable"])):createCommentVNode("",!0)])])):createCommentVNode("",!0)])}}});var ObjectType3=_export_sfc(_sfc_main,[["__scopeId","data-v-4955f3d4"]]);class ForeignObjUtil{static CreateVueCircle(t){let e=null==t?T3Gv.opt.svgDoc:t;const i=e.CreateVueComponent(60,60,VueCircle,{message:"Hello from SVG!",color:"blue"});i.SetPos(0,-50);const n=e.CreateShape(OptConstant.CSType.ShapeContainer);return n.AddElement(i),n.SetID(111),n.SetSize(100,100),n.SetPos(0,0),i}static CreateVueObjectType(t,e){let i=null==t?T3Gv.opt.svgDoc:t;LogUtil.Debug("ForeignObjUtil=CreateVueObjectType",e);var n=e.width;const s=i.CreateVueComponent(n,40,ObjectType3,{item:{title:"==== Test Pump ====",active:!1,type:"Pump",translate:[284,72],width:60,height:60,rotate:0,scaleX:1,scaleY:1,settings:{fillColor:"#659dc5",active:!0,inAlarm:!0,titleColor:"inherit",bgColor:"inherit",textColor:"inherit",fontSize:16,t3EntryDisplayField:"description"},zindex:1,t3Entry:{auto_manual:1,calibration_h:0,calibration_l:0,calibration_sign:1,command:"199IN1",control:1,decom:1,description:"V",digital_analog:1,filter:5,id:"IN1",index:0,label:"IN1",pid:199,range:19,type:"INPUT",unit:19,value:30},showDimensions:!0,cat:"Pipe",id:2},showArrows:!0});s.SetPos(0,-50);const a=i.CreateShape(OptConstant.CSType.ShapeContainer);return a.AddElement(s),a.SetSize(n,40),a.SetPos(0,0),a}static CreateVueObject(t,e,i){let n=null==t?T3Gv.opt.svgDoc:t;var s={item:i,showArrows:!1};const a=n.CreateVueComponent(300,30,ObjectType3,s);a.SetPos(0,-40);const o=n.CreateShape(OptConstant.CSType.ShapeContainer);return o.AddElement(a),o.SetSize(300,30),o.SetPos(0,0),o}}class SvgSymbol extends BaseSymbol{constructor(t){(t=t||{}).ShapeType=OptConstant.ShapeType.SvgSymbol,t.drawSetting=t.drawSetting||{},super(t),LogUtil.Debug("= S.SvgSymbol | Constructor Input/Output:",t.this)}CreateShape(t,e){if(LogUtil.Debug("= S.SvgSymbol | CreateShape Input:",{svgDocument:t,enableEvents:e}),this.flags&NvConstant.ObjFlags.NotVisible)return null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.Symbol);n.SetDrawSetting(this.drawSetting),n.SetSymbolName(this.uniType),n.InitSymbolSource(),n.SetID(OptConstant.SVGElementClass.Shape);const s=this.Frame,a=this.StyleRecord;let o=a.Line.Paint.Color;const r=a.Line.Thickness;let l=this.GetFieldDataStyleOverride();l&&l.strokeColor&&(o=l.strokeColor),(l||this.colorchanges&(StyleConstant.ColorFilters.NCLine|StyleConstant.ColorFilters.NCStyle))&&n.SetStrokeColor(o),this.colorchanges&(StyleConstant.ColorFilters.NCLineThick|StyleConstant.ColorFilters.NCStyle)&&n.SetStrokeWidth(r),n.SetFillOpacity(a.Fill.Paint.Opacity),n.SetStrokeOpacity(a.Line.Paint.Opacity);const h=s.width,c=s.height;n.SetSize(h,c),n.SetScale(h/this.InitialGroupBounds.width,c/this.InitialGroupBounds.height),i.SetSize(h,c),i.SetPos(s.x,s.y);const u=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,d=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;u&&n.SetMirror(u),d&&n.SetFlip(d),i.AddElement(n),this.ApplyStyles(n,a),this.ApplyEffects(i,!1,!1);const p=t.CreateShape(OptConstant.CSType.Rect);p.SetStrokeColor("white"),p.SetFillColor("none"),p.SetOpacity(0),p.SetStrokeWidth(0),e?p.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):p.SetEventBehavior(OptConstant.EventBehavior.None),p.SetID(OptConstant.SVGElementClass.Slop),p.ExcludeFromExport(!0),p.SetSize(h,c),i.AddElement(p),i.isShape=!0;var g=QuasarUtil.GetItemFromAPSV2(this.uniqueId);if(LogUtil.Debug("= S.SvgSymbol | CreateShape apsItem:",g),g&&g.t3Entry){LogUtil.Debug("= S.SvgSymbol | CreateShape apsItem:",g);const e=ForeignObjUtil.CreateVueObject(t,s,g);i.AddElement(e)}return-1!==this.DataID&&this.LMAddSVGTextObject(t,i),LogUtil.Debug("= S.SvgSymbol | CreateShape Output:",i),i}ApplyStyles(t,e){LogUtil.Debug("S.SvgSymbol | ApplyStyles Input:",{shapeElement:t,styleRecord:e});const i=this.GetFieldDataStyleOverride(),n=i&&i.fillColor;if(n||this.colorchanges&(StyleConstant.ColorFilters.NCFill|StyleConstant.ColorFilters.NCStyle)){let s=e.Fill.Paint.FillType,a=e.Fill.Paint.Color;n&&(s=NvConstant.FillTypes.Solid,a=i.fillColor),s===NvConstant.FillTypes.Gradient?(t.SetFillColor(e.Fill.Paint.Color),t.SetGradientFill(this.CreateGradientRecord(e.Fill.Paint.GradientFlags,a,e.Fill.Paint.Opacity,e.Fill.Paint.EndColor,e.Fill.Paint.EndOpacity)),t.fillPaintType=s):s===NvConstant.FillTypes.Transparent?t.SetFillColor("none"):(t.SetFillColor(a),t.SetFillOpacity(e.Fill.Paint.Opacity))}LogUtil.Debug("S.SvgSymbol | ApplyStyles Output:",{shapeElement:t})}Resize(t,e,i){LogUtil.Debug("= S.SvgSymbol | Resize Input:",{shapeElement:t,newBoundingBox:e,eventInfo:i});const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);t.SetSize(a.width,a.height),t.SetPos(a.x+o.x,a.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape);r.SetSize(a.width,a.height),r.SetScale(a.width/this.InitialGroupBounds.width,a.height/this.InitialGroupBounds.height);const l=t.GetElementById(OptConstant.SVGElementClass.Slop);return l&&l.SetSize(a.width,a.height),this.LMResizeSVGTextObject(t,i,a),t.SetRotation(n),this.UpdateDimensionLines(t),LogUtil.Debug("= S.SvgSymbol | Resize Output:",{offset:o,shapeElement:t}),o}ResizeInTextEdit(t,e){if(LogUtil.Debug("= S.SvgSymbol | ResizeInTextEdit Input:",{shapeElement:t,newBoundingBox:e}),t){const i=t.GetID();if(i>=0){const n=ObjectUtil$1.GetObjectPtr(i,!1);this.prevBBox=Utils1.DeepCopy(this.Frame);const s=this.Resize(t,e,n);return LogUtil.Debug("= S.SvgSymbol | ResizeInTextEdit Output:",{offset:s}),s}}const i={x:0,y:0};return LogUtil.Debug("= S.SvgSymbol | ResizeInTextEdit Output:",{offset:i}),i}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.SvgSymbol | CreateActionTriggers Input:",{svgDocument:t,triggerType:e,actionHandler:i,additionalParameters:n});const s=super.CreateActionTriggers2(t,e,i,n);return LogUtil.Debug("= S.SvgSymbol | CreateActionTriggers Output:",s),s}BaseShapeCreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.SvgSymbol | BaseShapeCreateActionTriggers Input:",{svgDoc:t,triggerId:e,shape:i,additionalParams:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL];let a,o,r=t.CreateShape(OptConstant.CSType.Group),l=OptConstant.Common.KnobSize,h=OptConstant.Common.RKnobSize,c=this.extraflags&OptConstant.ExtraFlags.SideKnobs&&this.dataclass===PolygonConstant.ShapeTypes.POLYGON,u=OptConstant.Common.MinSidePointLength,d=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(d*=2);const p=l/d,g=h/d;let{x:f,y:m,width:v,height:b}=this.Frame;v+=p,b+=p;const y=Utils1.DeepCopy(this.Frame);y.x-=p/2,y.y-=p/2,y.width+=p,y.height+=p;let S=i.GetRotation()+22.5;S>=360&&(S=0);const x=Math.floor(S/45);let w=s.slice(x).concat(s.slice(0,x)),C=!0,T=!c,D=!c;switch(this.ObjGrow){case OptConstant.GrowBehavior.Horiz:C=!1,D=!1;break;case OptConstant.GrowBehavior.Vertical:C=!1,T=!1;break;case OptConstant.GrowBehavior.ProPortional:C=!0,T=!1,D=!1}const k={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:p,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1};if(e!==n&&(k.fillColor="white",k.strokeSize=1,k.strokeColor="black",k.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(k.fillColor="gray",k.locked=!0,c=!1):this.NoGrow()&&(k.fillColor="red",c=!1,k.strokeColor="red",w=[CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default]),C){k.knobID=OptConstant.ActionTriggerType.TopLeft,k.cursorType=w[0];let t=this.GenericKnob(k);r.AddElement(t),k.x=v-p,k.y=0,k.cursorType=w[2],k.knobID=OptConstant.ActionTriggerType.TopRight,t=this.GenericKnob(k),r.AddElement(t),k.x=v-p,k.y=b-p,k.cursorType=w[4],k.knobID=OptConstant.ActionTriggerType.BottomRight,t=this.GenericKnob(k),r.AddElement(t),k.x=0,k.y=b-p,k.cursorType=w[6],k.knobID=OptConstant.ActionTriggerType.BottomLeft,t=this.GenericKnob(k),r.AddElement(t)}if(D){k.x=v/2-p/2,k.y=0,k.cursorType=w[1],k.knobID=OptConstant.ActionTriggerType.TopCenter;let t=this.GenericKnob(k);r.AddElement(t),k.x=v/2-p/2,k.y=b-p,k.cursorType=w[5],k.knobID=OptConstant.ActionTriggerType.BottomCenter,t=this.GenericKnob(k),r.AddElement(t)}if(T){k.x=0,k.y=b/2-p/2,k.cursorType=w[7],k.knobID=OptConstant.ActionTriggerType.CenterLeft;let t=this.GenericKnob(k);r.AddElement(t),k.x=v-p,k.y=b/2-p/2,k.cursorType=w[3],k.knobID=OptConstant.ActionTriggerType.CenterRight,t=this.GenericKnob(k),r.AddElement(t)}if(a=function(t){let e,i=null;return t.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1),(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||e&&e instanceof Instance.Shape.ShapeContainer)&&(i=e.PrGetShapeConnectorInfo(t.hooks[0]))),i}(this),a&&a.length){const e={svgDoc:t,iconSize:14,imageURL:null,iconID:0,userData:0,cursorType:0};for(let t=a.length,i=0;i<t;i++)"right"===a[i].position?e.x=v-14-1-p:"bottom"===a[i].position?e.y=b-14-1-p:(e.x=p+1,e.y=p+1),e.cursorType=a[i].cursorType,e.iconID=a[i].knobID,e.imageURL="vertical"===a[i].polyType?OptConstant.Common.ConMoveVerticalPath:OptConstant.Common.ConMoveHorizontalPath,e.userData=a[i].knobData,o=this.GenericIcon(e),r.AddElement(o),e.x+=16}if(c){const t=Utils1.DeepCopy(this);t.inside=Utils1.DeepCopy(t.Frame);const e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,[]);if(e)for(let i=1,n=e.length;i<n;i++){const t=e[i].x-e[i-1].x,n=e[i].y-e[i-1].y;if(Utils2.Sqrt(t*t+n*n)>u){k.cursorType=t*t>n*n?CursorConstant.CursorType.ResizeTB:CursorConstant.CursorType.ResizeLR,k.x=e[i-1].x+t/2,k.y=e[i-1].y+n/2;const s=this.GenericKnob(k);s.SetUserData(i),r.AddElement(s)}}}const $=this.Frame.width<44,O=this.hooks.length>0&&!!ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1)&&ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector;if(!(this.NoRotate()||this.NoGrow()||k.locked||$||O)){const t=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal&&this.flags&NvConstant.ObjFlags.TextOnly&&ShapeUtil.TextAlignToWin(this.TextAlign).just===TextConstant.TextJust.Left;k.shapeType=OptConstant.CSType.Oval,k.x=t?v+g:v-3*g,k.y=b/2-g/2,k.cursorType=CursorConstant.CursorType.Rotate,k.knobID=OptConstant.ActionTriggerType.Rotate,k.fillColor="white",k.fillOpacity=.001,k.strokeSize=1.5,k.strokeColor="black";const e=this.GenericKnob(k);r.AddElement(e)}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID.toString());this.CreateDimensionAdjustmentKnobs(r,t,k)}return r.SetSize(v,b),r.SetPos(y.x,y.y),r.isShape=!0,r.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.SvgSymbol | BaseShapeCreateActionTriggers Output:",r),r}SetFillColor(t){var e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(e){var i=e.GetElementById(OptConstant.SVGElementClass.Shape);i.SetFillColor(t);var n=i.GetSvgSymbol();LogUtil.Debug("= S.SvgSymbol | SetFillColor Output 1:",this.SVGFragment),LogUtil.Debug("= S.SvgSymbol | SetFillColor Output 2:",n)}}GetDrawSetting(){return this.drawSetting}SetDrawSetting(t){LogUtil.Debug("= S.SvgSymbol | SetDrawSetting Input: setting",t),this.drawSetting=t;var e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(e){var i=e.GetElementById(OptConstant.SVGElementClass.Shape);i.SetDrawSetting(t),i.RefreshDrawSetting()}}AddDynamicCSS(t,e){LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS Input:",{cssStyles:t,targetSelector:e});const i=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(!i)return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: SVG element not found"),!1;const n=i.GetElementById(OptConstant.SVGElementClass.Shape);if(!n)return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: Shape element not found"),!1;const s=n.GetSvgSymbol();if(!s)return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: SVG DOM element not found"),!1;try{if("string"==typeof t){let e=s.querySelector("style[data-dynamic-css]");e||(e=document.createElement("style"),e.setAttribute("data-dynamic-css","true"),s.appendChild(e)),e.textContent=t}else if("object"==typeof t){(e?Array.from(s.querySelectorAll(e)):[s]).forEach((e=>{for(const[i,n]of Object.entries(t)){i.replace(/([A-Z])/g,"-$1").toLowerCase();e.style[i]=n}}))}return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS: CSS applied successfully"),!0}catch(a){return LogUtil.Debug("= S.SvgSymbol | AddDynamicCSS Error:",a),!1}}}class ToolConstant{}ToolConstant.Tools={Symbol:-1,Select:0,Shape:1,Line:2,Text:3,Wall:4,StyledLine:5};class ToolDuctT1SvgData{static GetSvgFrame(t){var e={width:60,height:60};switch(t){case"Duct1":case"Duct3":case"Duct5":e={width:68.5,height:29.67};break;case"Duct2":e={width:76,height:21.83};break;case"Duct4":e={width:68.5,height:30.67};break;case"Duct6":e={width:66.33,height:38.5};break;case"Duct7":case"Duct8":e={width:30,height:60};break;case"Duct9":e={width:60,height:60};break;case"Duct10":case"Duct11":case"Duct12":e={width:0,height:0}}return e}static Duct1Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1) translate(48.333,14.5)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.333) scale(1,1) translate(19.333,0)">\n        <g width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" stroke="##LineColor=#000000##"\n            stroke-width="##LineThick=1##" stroke-dasharray="none" fill="##FillColor=#FFFFFF##" fill-opacity="1"\n            stroke-opacity="1">\n            <ellipse rx="14.3335" ry="14.3335" cx="14.3335" cy="14.3335" />\n        </g>\n    </g>\n    <g width="20.333" height="20.333" transform="scale(1,1) translate(23.5,4.167)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,20.333\nL20.333,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,19.333L1,19.333L1,21.333L-1,21.333z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="20.333" height="20.333" transform="scale(1,1) translate(23.5,4.167)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0\nL20.333,20.333" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct2Data(){return'\n<g>\n    <g width="35.833" height="20.833" transform="scale(1,1) translate(19.5,0)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="35.833" height="20.833" transform="scale(1,1)\ntranslate(0,0)" fill="##FillColor=#FFFFFF##" fill-opacity="1" stroke-opacity="1">\n            <rect width="35.833" height="20.833" />\n        </g>\n    </g>\n    <g width="28.167" height="0" transform="scale(1,1)\ntranslate(0.5,10.333)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L28.167,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.167" height="0" transform="scale(1,1) translate(46.333,10.333)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L28.167,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct3Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.833)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="##LineThick=1##" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1)\ntranslate(48.333,14.833)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="##LineThick=1##" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.833) scale(1,1) translate(19.333,0.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="28.667" height="28.667" />\n        </g>\n    </g>\n</g>\n    '}static Duct4Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.833)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1) translate(48.333,14.833)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.833) scale(1,1) translate(19.333,0.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="28.667" height="28.667" />\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="scale(1,1) translate(19.333,0.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0\nL28.667,28.667" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct5Data(){return'\n<g>\n    <g width="19.833" height="0" transform="scale(1,1) translate(0.5,14.833)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L19.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="18.667" height="0" transform="scale(1,1) translate(48.333,14.833)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,0 L18.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="rotate(270,33.667,14.833) scale(1,1) translate(19.333,0.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="28.667" height="28.667" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="28.667" height="28.667" />\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="scale(1,1) translate(19.333,0.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0\nL28.667,28.667" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="28.667" height="28.667" transform="scale(1,1) translate(19.333,0.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,28.667\nL28.667,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,27.667L1,27.667L1,29.667L-1,29.667z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static Duct6Data(){return'\n<g>\n    <g width="17.833" height="0" transform="scale(1,1) translate(42.5,21.167)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L17.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M17.833,0L17.833,-7" stroke-width="0.5" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="30.833" height="31.5" transform="scale(1,1) translate(11.167,5.5)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="30.833" height="31.5" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="30.833" height="31.5" />\n        </g>\n    </g>\n    <g width="30.833" height="31.5" transform="scale(1,1) translate(11.167,5.5)">\n        <g transform="scale(1,1)\ntranslate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##" stroke-opacity="1">\n            <path d="M0,31.5 L30.833,0" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,30.5L1,30.5L1,32.5L-1,32.5z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="30.833" height="31.5" transform="scale(1,1)\ntranslate(11.167,5.5)">\n        <g transform="scale(1,1) translate(0,0)" fill="##LineColor=#000000##" stroke="##LineColor=#000000##"\n            stroke-opacity="1">\n            <path d="M0,0 L30.833,31.5" fill="none" stroke-width="1" stroke-dasharray="none" />\n            <g>\n                <g stroke-dasharray="none">\n                    <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                </g>\n            </g>\n        </g>\n    </g>\n    <g width="16.833" height="15.625" transform="scale(1,1) translate(0,0)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=0##" stroke-dasharray="none"\n            width="16.833" height="15.625" transform="scale(1,1) translate(0,0)" fill="none" stroke-opacity="1">\n            <rect width="16.833" height="15.625" />\n        </g>\n        <g width="16.833333333333332" height="15.624999046325684" transform="scale(1,1)\ntranslate(0,0)"><text width="16.833333333333332" height="15.624999046325684" transform="scale(1,1)\ntranslate(0,0)" xml:space="preserve">\n                <tspan xml:space="preserve" text-rendering="optimizeSpeed" font-size="13.88888888888889"\n                    font-weight="normal" font-style="normal" fill="#000000" opacity="1" x="0" text-anchor="start"\n                    y="12.5" textLength="6.794277667999268" style="font-family: Arial, Helvetica Neue, Helvetica,\nsans-serif;">F</tspan>\n            </text></g>\n    </g>\n</g>\n    '}static Duct7Data(){return'\n    <g>\n        <g>\n            <g width="30" height="60" transform="rotate(0,0) scale(1,1) translate(0,0)">\n                <g stroke="#000000" opacity="1" stroke-width="1" stroke-dasharray="none" width="30" height="60"\n                    transform="scale(1,1) translate(0,0)" fill="#FFFFFF" fill-opacity="1" stroke-opacity="1">\n                    <rect width="30" height="60" />\n                </g>\n            </g>\n            <g width="30" height="60" transform="scale(1,1) translate(0,0)">\n                <g transform="scale(1,1) translate(0,0)" fill="#000000" stroke="#000000" stroke-opacity="1">\n                    <path d="M0,0 L30,60" fill="none" stroke-width="1" stroke-dasharray="none" />\n                    <g>\n                        <g stroke-dasharray="none">\n                            <path d="M-1,-1L1,-1L1,1L-1,1z" stroke-width="0" fill="none" />\n                        </g>\n                    </g>\n                </g>\n            </g>\n        </g>\n    </g>\n    '}static Duct8Data(){return'\n    <g width="30" height="60" transform="scale(1,1) translate(0,0)">\n        <g transform="scale(1,1) translate(0,0)" fill="#FFFFFF" stroke="#000000" stroke-width="1" stroke-opacity="1">\n            <path d="M 0,0 L30,0 L30,60 L0,60 L0,0" />\n        </g>\n    </g>\n    '}static Duct9Data(){return'\n   <g width="60" height="60" transform="scale(1,1) translate(0,0)">\n        <g transform="scale(1,1) translate(0,0)" fill="#FFFFFF" stroke="#000000" stroke-width="1" stroke-opacity="1">\n\n<path d="\n    M 0,0\n    L 30,0\n    A 30,30 0 0,0 60,30\n    L 60,60\n    A 60,60 0 0,1 0,0\n    " />\n        </g>\n    </g>\n    '}static Duct10Data(){return"\n\n    "}static Duct11Data(){return"\n\n    "}static Duct12Data(){return"\n\n    "}}const _ToolSvgData=class{static GetSvgData(t){var e=_ToolSvgData.DuctSvg.GetSvgFrame(t);let i=-1e3,n=e.width,s=e.height,a=e.width,o=e.height,r=new SvgSymbol({Frame:{x:i,y:-1e3,width:n,height:s},InitialGroupBounds:{x:i,y:i,width:a,height:o},StyleRecord:new QuickStyle,uniType:t,drawSetting:{}}),l="";switch(t){case"Box":l=this.BoxSvgData();break;case"Text":l=this.TextSvgData();break;case"Icon":l=this.IconSvgData();break;case"SwitchIcon":l=this.SwitchIconSvgData();break;case"Led":l=this.LedSvgData();break;case"RoomHumidity":l=this.RoomHumiditySvgData();break;case"RoomTemperature":l=this.RoomTemperatureSvgData();break;case"Temperature":l=this.TemperatureSvgData();break;case"Boiler":l=this.BoilerSvgData();break;case"Heatpump":l=this.HeatpumpSvgData();break;case"Pump":l=this.PumpSvgData();break;case"ValveThreeWay":l=this.ValveThreeWaySvgData();break;case"ValveTwoWay":l=this.ValveTwoWaySvgData();break;case"Duct":l=_ToolSvgData.DuctSvgData();break;case"Fan":l=this.FanSvgData();break;case"CoolingCoil":l=this.CoolingCoilSvgData();break;case"HeatingCoil":l=this.HeatingCoilSvgData();break;case"Filter":l=this.FilterSvgData();break;case"Humidifier":l=this.HumidifierSvgData();break;case"Humidity":l=this.HumiditySvgData();break;case"Pressure":l=this.PressureSvgData();break;case"Damper":l=this.DamperSvgData();break;case"Temperature2":l=this.Temperature2SvgData();break;case"ThermalWheel":l=this.ThermalWheelSvgData();break;case"Enthalpy":l=this.EnthalpySvgData();break;case"Flow":l=this.FlowSvgData();break;case"Guage":l=this.GuageSvgData();break;case"Dial":l=this.DialSvgData();break;case"Value":l=this.ValueSvgData();break;case"IconWithTitle":l=this.IconWithTitleSvgData();break;case"Test1":l=this.Test1SvgData();break;case"Duct1":l=_ToolSvgData.DuctSvg.Duct1Data();break;case"Duct2":l=_ToolSvgData.DuctSvg.Duct2Data();break;case"Duct3":l=_ToolSvgData.DuctSvg.Duct3Data();break;case"Duct4":l=_ToolSvgData.DuctSvg.Duct4Data();break;case"Duct5":l=_ToolSvgData.DuctSvg.Duct5Data();break;case"Duct6":l=_ToolSvgData.DuctSvg.Duct6Data();break;case"Duct7":l=_ToolSvgData.DuctSvg.Duct7Data();break;case"Duct8":l=_ToolSvgData.DuctSvg.Duct8Data();break;case"Duct9":l=_ToolSvgData.DuctSvg.Duct9Data();break;case"Duct10":l=_ToolSvgData.DuctSvg.Duct10Data();break;case"Duct11":l=_ToolSvgData.DuctSvg.Duct11Data();break;case"Duct12":l=_ToolSvgData.DuctSvg.Duct12Data();break;default:return""}return r.SVGFragment=l,r}static GetSvgDataString(t){let e="";switch(t){case"Box":e=this.BoxSvgData();break;case"Text":e=this.TextSvgData();break;case"Icon":e=this.IconSvgData();break;case"SwitchIcon":e=this.SwitchIconSvgData();break;case"Led":e=this.LedSvgData();break;case"RoomHumidity":e=this.RoomHumiditySvgData();break;case"RoomTemperature":e=this.RoomTemperatureSvgData();break;case"Temperature":e=this.TemperatureSvgData();break;case"Boiler":e=this.BoilerSvgData();break;case"Heatpump":e=this.HeatpumpSvgData();break;case"Pump":e=this.PumpSvgData();break;case"ValveThreeWay":e=this.ValveThreeWaySvgData();break;case"ValveTwoWay":e=this.ValveTwoWaySvgData();break;case"Duct":e=_ToolSvgData.DuctSvgData();break;case"Fan":e=this.FanSvgData();break;case"CoolingCoil":e=this.CoolingCoilSvgData();break;case"HeatingCoil":e=this.HeatingCoilSvgData();break;case"Filter":e=this.FilterSvgData();break;case"Humidifier":e=this.HumidifierSvgData();break;case"Humidity":e=this.HumiditySvgData();break;case"Pressure":e=this.PressureSvgData();break;case"Damper":e=this.DamperSvgData();break;case"Temperature2":e=this.Temperature2SvgData();break;case"ThermalWheel":e=this.ThermalWheelSvgData();break;case"Enthalpy":e=this.EnthalpySvgData();break;case"Flow":e=this.FlowSvgData();break;case"Guage":e=this.GuageSvgData();break;case"Dial":e=this.DialSvgData();break;case"Value":e=this.ValueSvgData();break;case"IconWithTitle":e=this.IconWithTitleSvgData();break;case"Test1":e=this.Test1SvgData();break;case"Duct1":e=_ToolSvgData.DuctSvg.Duct1Data();break;case"Duct2":e=_ToolSvgData.DuctSvg.Duct2Data();break;case"Duct3":e=_ToolSvgData.DuctSvg.Duct3Data();break;case"Duct4":e=_ToolSvgData.DuctSvg.Duct4Data();break;case"Duct5":e=_ToolSvgData.DuctSvg.Duct5Data();break;case"Duct6":e=_ToolSvgData.DuctSvg.Duct6Data();break;case"Duct7":e=_ToolSvgData.DuctSvg.Duct7Data();break;case"Duct8":e=_ToolSvgData.DuctSvg.Duct8Data();break;case"Duct9":e=_ToolSvgData.DuctSvg.Duct9Data();break;case"Duct10":e=_ToolSvgData.DuctSvg.Duct10Data();break;case"Duct11":e=_ToolSvgData.DuctSvg.Duct11Data();break;case"Duct12":e=_ToolSvgData.DuctSvg.Duct12Data();break;default:return""}return e}static GetSvgActiveClassName(t){let e="";switch(t){case"Box":e=this.BoxSvgData();break;case"Text":e=this.TextSvgData();break;case"Icon":e=this.IconSvgData();break;case"SwitchIcon":e=this.SwitchIconSvgData();break;case"Led":e=this.LedSvgData();break;case"RoomHumidity":e=this.RoomHumiditySvgData();break;case"RoomTemperature":e=this.RoomTemperatureSvgData();break;case"Temperature":e=this.TemperatureSvgData();break;case"Boiler":e=this.BoilerSvgData();break;case"Heatpump":e=this.HeatpumpSvgData();break;case"Pump":e=this.PumpSvgData();break;case"ValveThreeWay":e=this.ValveThreeWaySvgData();break;case"ValveTwoWay":e=this.ValveTwoWaySvgData();break;case"Duct":e=_ToolSvgData.DuctSvgData();break;case"Fan":e=this.FanSvgData();break;case"CoolingCoil":e=this.CoolingCoilSvgData();break;case"HeatingCoil":e=this.HeatingCoilSvgData();break;case"Filter":e=this.FilterSvgData();break;case"Humidifier":e=this.HumidifierSvgData();break;case"Humidity":e=this.HumiditySvgData();break;case"Pressure":e=this.PressureSvgData();break;case"Damper":e=this.DamperSvgData();break;case"Temperature2":e=this.Temperature2SvgData();break;case"ThermalWheel":e=this.ThermalWheelSvgData();break;case"Enthalpy":e=this.EnthalpySvgData();break;case"Flow":e=this.FlowSvgData();break;case"Guage":e=this.GuageSvgData();break;case"Dial":e=this.DialSvgData();break;case"Value":e=this.ValueSvgData();break;case"IconWithTitle":e=this.IconWithTitleSvgData();break;case"Test1":e=this.Test1SvgData();break;default:return""}return e}static BoxSvgData(){return""}static TextSvgData(){return""}static IconSvgData(){return""}static SwitchIconSvgData(){return'\n<g transform="scale(0.08,0.08) translate(-370,3)">\n    <use style="fill:##FillColor=#659dc5##" xlink:href="icons.svg#toggle_off1"></use>\n</g>\n      '}static LedSvgData(){return'\n<g transform="scale(1.8,1.8) translate(9,2)">\n    <filter id="light1" x="-0.8" y="-0.8" height="2.2" width="2.8">\n        <feGaussianBlur stdDeviation="2" />\n    </filter>\n    <filter id="light2" x="-0.8" y="-0.8" height="2.2" width="2.8">\n        <feGaussianBlur stdDeviation="4" />\n    </filter>\n    <rect x="2.5099" y="20.382" width="2.1514" height="9.8273" fill="##FillColor=#8c8c8c##" />\n    <path\n        d="m12.977 30.269c0-1.1736-0.86844-2.5132-1.8916-3.4024-0.41616-0.3672-1.1995-1.0015-1.1995-1.4249v-5.4706h-2.1614v5.7802c0 1.0584 0.94752 1.8785 1.9462 2.7482 0.44424 0.37584 1.3486 1.2496 1.3486 1.7694"\n        fill="##FillColor=#8c8c8c##" />\n\n    <path\n        d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z"\n        opacity=".3" />\n    <path\n        d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z"\n        fill="##FillColor=#e6e6e6##" opacity=".5" />\n    <path\n        d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z"\n        fill="##FillColor=#d1d1d1##" opacity=".9" />\n    <g>\n        <path\n            d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v4.6296c1.4738 1.6517 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586l-4e-5 -1.5235c-7e-4 -1.1419-0.4744-2.2032-1.283-3.1054z"\n            opacity=".7" />\n        <path\n            d="m14.173 13.001v3.1054c0 2.7389-3.1658 4.9651-7.0855 4.9651-3.9125 2e-5 -7.0877-2.219-7.0877-4.9651v3.1054c1.4738 1.6502 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8586-7.4e-4 -1.1412-0.47444-2.2025-1.283-3.1047z"\n            opacity=".25" />\n        <ellipse cx="7.0877" cy="16.106" rx="7.087" ry="4.9608" opacity=".25" />\n    </g>\n    <polygon points="2.2032 16.107 3.1961 16.107 3.1961 13.095 6.0156 13.095 10.012 8.8049 3.407 8.8049 2.2032 9.648"\n        fill="##FillColor=#666666##" />\n    <polygon points="11.215 9.0338 7.4117 13.095 11.06 13.095 11.06 16.107 11.974 16.107 11.974 8.5241 10.778 8.5241"\n        fill="##FillColor=#666666##" />\n    <path\n        d="m14.173 13.001v-5.9126c0-3.9132-3.168-7.0884-7.0855-7.0884-3.9125 0-7.0877 3.1694-7.0877 7.0884v13.649c1.4738 1.651 4.0968 2.7526 7.0877 2.7526 4.6195 0 8.3686-2.6179 8.3686-5.8594v-1.5235c-7.4e-4 -1.1426-0.47444-2.2039-1.283-3.1061z"\n        fill="##FillColor=#01c16e##" opacity=".65" />\n    <g fill="##FillColor=#ffffff##">\n        <path\n            d="m10.388 3.7541 1.4364-0.2736c-0.84168-1.1318-2.0822-1.9577-3.5417-2.2385l0.25416 1.0807c0.76388 0.27072 1.4068 0.78048 1.8511 1.4314z"\n            opacity=".5" />\n        <path\n            d="m0.76824 19.926v1.5199c0.64872 0.5292 1.4335 0.97632 2.3076 1.3169v-1.525c-0.8784-0.33624-1.6567-0.78194-2.3076-1.3118z"\n            opacity=".5" />\n        <path\n            d="m11.073 20.21c-0.2556 0.1224-0.52992 0.22968-0.80568 0.32976-0.05832 0.01944-0.11736 0.04032-0.17784 0.05832-0.56376 0.17928-1.1614 0.31896-1.795 0.39456-0.07488 0.0094-0.1512 0.01872-0.22464 0.01944-0.3204 0.03024-0.64368 0.05832-0.97056 0.05832-0.14832 0-0.30744-0.01512-0.4716-0.02376-1.2002-0.05688-2.3306-0.31464-3.2976-0.73944l-2e-5 -8.3895v-4.8254c0-1.471 0.84816-2.7295 2.0736-3.3494l-0.02232-0.05328-1.2478-1.512c-1.6697 1.003-2.79 2.8224-2.79 4.9118v11.905c-0.04968-0.04968-0.30816-0.30888-0.48024-0.52992l-0.30744 0.6876c1.4011 1.4818 3.8088 2.4617 6.5426 2.4617 1.6798 0 3.2371-0.37368 4.5115-1.0022l-0.52704-0.40896-0.01006 0.0072z"\n            opacity=".5" />\n    </g>\n</g>\n'}static RoomHumiditySvgData(){return'\n<g transform="scale(2.8,2.8) translate(2,2)">\n    <g transform="translate(-6.9915256,-6.9915256)">\n        <circle r="8.6263752" cy="16" cx="16" style="\n          opacity: 1;\n          fill: ##FillColor=#659dc5##;\n          fill-opacity: 1;\n          fill-rule: nonzero;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.764198;\n          stroke-linecap: butt;\n          stroke-linejoin: round;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <g transform="matrix(0.29971746,0,0,0.29971746,20.655088,20.220855)" style="\n          font-style: normal;\n          font-weight: normal;\n          font-size: 51.4601px;\n          line-height: 125%;\n          font-family: Sans;\n          letter-spacing: 0px;\n          word-spacing: 0px;\n          fill: ##StrokeColor=#000000##;\n          fill-opacity: 1;\n          stroke: none;\n          stroke-width: 1px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        ">\n            <path\n                d="m -29.828843,-32.840076 h 5.075651 v 15.377717 h 18.4432096 v -15.377717 h 5.0756516 V 4.6745172 H -6.3099824 V -13.190771 H -24.753192 V 4.6745172 h -5.075651 z" />\n        </g>\n    </g>\n</g>\n    '}static RoomTemperatureSvgData(){return'\n<g transform="scale(2.8,2.8) translate(2,2)">\n    <g transform="matrix(0.76419842,0,0,0.76419842,-3.2187002,-3.2187002)">\n        <circle r="11.288136" cy="16" cx="16" style="\n          opacity: 1;\n          fill: ##FillColor=#659dc5##;\n          fill-opacity: 1;\n          fill-rule: nonzero;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: round;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <g transform="translate(32.100664,13.086915)" style="\n          font-style: normal;\n          font-weight: normal;\n          font-size: 20.2897px;\n          line-height: 125%;\n          font-family: Sans;\n          letter-spacing: 0px;\n          word-spacing: 0px;\n          fill: ##StrokeColor=#000000##;\n          fill-opacity: 1;\n          stroke: none;\n          stroke-width: 1px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        ">\n            <path\n                d="m -22.356997,-4.4825641 h 12.5126658 v 1.6842067 H -15.095093 V 10.308734 h -2.011141 V -2.7983574 h -5.250763 z" />\n        </g>\n    </g>\n</g>\n    '}static TemperatureSvgData(){return'\n<g transform="scale(2.8,2.8) translate(6,0)">\n    <g id="layer1" stroke="##StrokeColor=#000000##" stroke-width="1px" transform="translate(-10.804626,-9.2243756)">\n        <rect id="rect3012" height="14.505" width="2.901" y="9.9127998" x="14.557" fill="#ffff00" />\n        <path id="path3010" stroke-width="1.2px" transform="matrix(0.74098,0,0,0.74098,7.3047,15.679)"\n            fill="##FillColor=#659dc5##"\n            d="m 17.949,15.898 -3.1021,5.373 H 8.6427 L 5.5406,15.898 8.6427,10.525 h 6.2042 z" />\n    </g>\n    <g id="g4141" transform="translate(-1.2033861,-8.1217684)">\n        <circle r="0.77312505" cy="28.129852" cx="6.4061227" id="path4137" style="\n          fill: none;\n          fill-opacity: 1;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <path id="path4139" d="M 6.4061205,27.157211 V 23.65349" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n    </g>\n</g>\n    '}static BoilerSvgData(){return'\n<g transform="scale(1.6,1.6) translate(3,3)">\n    <path style="\n        fill: ##FillColor=#659dc5##;\n        fill-opacity: 1;\n        fill-rule: nonzero;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1;\n        stroke-linecap: butt;\n        stroke-linejoin: miter;\n        stroke-miterlimit: 4;\n        stroke-dasharray: none;\n        stroke-opacity: 1;\n      " d="m 2,15 8,-7 0,-7 12,0 0,7 8,7 0,16 -28,0 z"></path>\n</g>\n  '}static HeatpumpSvgData(){return'\n<g transform="scale(1.6,1.6) translate(3,3)">\n    <g class="heat-pump" stroke-linejoin="round" stroke="##StrokeColor=#000000##" transform="translate(39 -2.3842e-7)"\n        fill="##FillColor=#659dc5##">\n        <rect class="inner" height="27.718" width="27.718" y="2.141" x="-36.859" stroke-width="1.0868"></rect>\n        <g transform="matrix(1.0276 0 0 1.0276 -39.441 -.44130)" stroke-linecap="round" stroke-miterlimit="1"\n            stroke-width="1.3509">\n            <path d="m16.234 16.944 8.6837-6.894-8.6837-6.894v3.447h-13.152v6.894h13.152z" fill="#ce2824">\n            </path>\n            <path d="m15.766 28.844-8.6837-6.894 8.6837-6.894v3.447h13.152v6.894h-13.152z" fill="#3238db">\n            </path>\n        </g>\n    </g>\n</g>\n    '}static PumpSvgData(){return'\n<g transform="scale(2.5,2.5) translate(1,1)">\n    <g fill="##FillColor=#659dc5##" transform="translate(-5.4940996,-5.5390997)">\n        <g class="pump">\n            <circle stroke="##StrokeColor=#000000##" cy="16" cx="15.955" r="9.9609003" class="pump-background" />\n            <g transform="translate(16,16)">\n                <path d="M -5,8.1369 V -8.1191 L 9.078,0.0091 Z" class="rotating-middle" stroke="##StrokeColor=#000000##"\n                    stroke-width="0.96719" />\n            </g>\n        </g>\n    </g>\n</g>\n    '}static ValveThreeWaySvgData(){return'\n<g transform="scale(2,2.3) translate(4,4)">\n    <g transform="matrix(1,0,0,-1,-4.3773334,22.894063)">\n        <g stroke-linejoin="round" stroke="##StrokeColor=#000000##" class="twv" fill="##FillColor=#659dc5##">\n            <g stroke-linecap="round">\n                <path d="M 16,16 4.925,22.3941 V 9.6061 Z" />\n                <path d="m 16,16 11.075,6.3941 V 9.6061 Z" />\n                <path d="M 16,16 9.606,4.925 h 12.788 z" />\n            </g>\n            <g class="blocker-wrapper">\n                <g class="blocker" fill="#000000" transform="translate(16,16)">\n                    <path stroke-width="0.80716"\n                        d="m 0,-9.6108 a 8.8788,8.8788 0 0 0 -6.0273,2.375 l 1.6172,2.8008 A 5.7576,5.7576 0 0 1 0,-6.4897 5.7576,5.7576 0 0 1 4.4062,-4.4292 L 6.0293,-7.2397 A 8.8788,8.8788 0 0 0 0,-9.6108 Z" />\n                </g>\n            </g>\n        </g>\n        <path d="M 6.7797,10.576 V 21.084" stroke="##StrokeColor=#000000##" stroke-width="1px" fill="none" />\n    </g>\n</g>\n    '}static ValveTwoWaySvgData(){return'\n<g transform="scale(2.2,2.9) translate(2,4)">\n    <g stroke-linejoin="round" fill-rule="nonzero" transform="translate(-3.8922957,-7.3951286)"\n        stroke="##StrokeColor=#000000##" stroke-linecap="round" stroke-dasharray="none" stroke-miterlimit="4"\n        stroke-width="1" fill="##FillColor=#659dc5##">\n        <path d="M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z" transform="translate(5.3992957,6.473236)" />\n        <path d="M 10.068,7.9344 -1.007,14.3285 V 1.5405 Z" transform="matrix(-1,0,0,1,25.341517,6.354592)" />\n    </g>\n</g>\n    '}static DuctSvgData(){return""}static FanSvgData(){return'\n<g transform="scale(1.6,1.6) translate(2,6)">\n    <g fill="##FillColor=#659dc5##" transform="matrix(1, 0, 0, 1, -0.231, -4.151388)">\n        <g class="fan">\n            <g id="g8">\n                <path class="fan-background"\n                    d="m12.297 5.154c-6.117 0-11.066 4.9492-11.066 11.066 0 6.117 4.9492 11.066 11.066 11.066 5.7137 0 10.408-4.3091 11.003-9.8647h7.525v-12.268h-18.148c-0.12601-0.0043-0.25236 0-0.37941 0z"\n                    fill-rule="evenodd" stroke="##StrokeColor=#000000##" stroke-width="1px"\n                    fill="##FillColor=#659dc5##" />\n            </g>\n            <g id="g4148" transform="translate(12.464 16.395)">\n                <g id="g4162" stroke="##StrokeColor=#000000##" stroke-width="1.5" fill="none" class="rotating-middle">\n                    <path id="use3009" d="m-1.8112-3.9787 3.6227-4.4971" />\n                    <path id="use3011" d="m0.87376-4.2835 5.5741-1.5089" />\n                    <path id="use3013" d="m3.2243-2.9521 5.3965 2.0557" />\n                    <path id="use3015" d="m4.3433-0.4935 3.1575 4.835" />\n                    <path id="use3017" d="m3.8043 2.1547-0.28747 5.7676" />\n                    <path id="use3019" d="m1.8113 3.9787-3.6227 4.4971" />\n                    <path id="use3021" d="m-0.87324 4.2837-5.5741 1.5089" />\n                    <path id="use3023" d="m-3.2242 2.9527-5.3965-2.0559" />\n                    <path id="use3025" d="m-4.3432 0.4935-3.158-4.8353" />\n                    <path id="use3027" d="m-3.8032-2.1541 0.2875-5.7676" />\n                </g>\n            </g>\n        </g>\n    </g>\n</g>\n    '}static CoolingCoilSvgData(){return'\n<g transform="scale(2,2) translate(5.5,0)">\n    <g stroke="##StrokeColor=#000000##" transform="matrix(1, 0, 0, 1, -6.058399, -1.3729)">\n        <rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="##FillColor=#659dc5##" />\n        <g transform="translate(24.9334,29.6232) rotate(180)">\n            <rect id="rect4367" class="cooling-coil" height="27.246" width="17.875" x="0" y="0"\n                fill="##FillColor=#659dc5##" stroke="none" />\n        </g>\n        <rect id="rect4367" height="27.246" width="17.868" x="7.066" y="2.3772" fill="none" />\n        <path id="path3001" d="m7.322 2.3729 17.424 27.254" stroke-width="1px" fill="none" />\n        <path id="path3003" d="m24.929 2.3734-17.642 27.182" stroke-width="1px" fill="none" />\n    </g>\n</g>\n    '}static HeatingCoilSvgData(){return'\n<g transform="scale(2,2) translate(5.5,0)">\n    <defs id="defs3">\n        <rect id="heating-coil-rect" height="27.246" width="17.868" x="0" y="0" />\n    </defs>\n    <g stroke="##StrokeColor=#000000##" id="g15" transform="translate(-6.129206,-1.5327875)">\n        <use xlink:href="#heating-coil-rect" fill="##FillColor=#659dc5##" stroke="none" x="7.066" y="2.3771999"\n            id="use6" />\n        <g transform="rotate(180,12.4667,14.8116)" id="g10">\n            <use xlink:href="#heating-coil-rect" class="heating-coil" x="0" y="0" fill="##FillColor=#659dc5##"\n                stroke="none" id="use8" />\n        </g>\n        <use xlink:href="#heating-coil-rect" stroke-width="1" fill="none" x="7.066" y="2.3771999" id="use12" />\n        <path id="path3003" stroke-linejoin="miter" d="M 24.929,2.3734 7.2868,29.555" stroke="##StrokeColor=#000000##"\n            stroke-linecap="butt" stroke-width="1px" fill="none" />\n    </g>\n</g>\n    '}static FilterSvgData(){return'\n<g transform="scale(2,2) translate(9,0)">\n    <g stroke="##StrokeColor=#000000##" stroke-width="1" transform="matrix(1, 0, 0, 1, -9.37, -1.3252)">\n        <rect id="rect4367" height="27.35" width="11.26" y="2.3252" x="10.37" fill="##FillColor=#659dc5##" />\n        <path id="path3756" stroke-linejoin="miter"\n            d="m11.892,2.6997,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334,8.2165,4.4334-8.2165,4.4334"\n            stroke-linecap="round" stroke-miterlimit="4" stroke-dasharray="none" stroke-width="1.2694304" fill="none" />\n    </g>\n</g>\n    '}static HumidifierSvgData(){return'\n<g transform="scale(2.2,2.2) translate(5,2)">\n    <g class="duct-humidifier" transform="matrix(1, 0, 0, 1, -3.324199, -7.877)">\n        <g id="g11" transform="translate(0 5.1505)">\n            <g id="g13" stroke="##StrokeColor=#000000##" stroke-width=".5" class="water-drops"\n                fill="#00f0ff">\n                <path id="path4150"\n                    d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                <g id="g4236" transform="translate(0 .17167)">\n                    <path id="path4150-7"\n                        d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                    <path id="path4150-7-1"\n                        d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                </g>\n            </g>\n            <g id="g19" transform="translate(0,8)">\n                <g id="g21" stroke="##StrokeColor=#000000##" stroke-width=".5" class="water-drops water-drops-2"\n                    fill="#00f0ff">\n                    <path id="path23"\n                        d="m14.291 6.7851c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                    <g id="g25" transform="translate(0 .17167)">\n                        <path id="path27"\n                            d="m18.179 5.3612c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                        <path id="path29"\n                            d="m18.234 7.8656c0.46542-0.0958 0.69019-0.27099 0.99164-0.49615 0.10429-0.07789 0.23068-0.12587 0.37088-0.12587 0.34281 0 0.62078 0.27918 0.62078 0.62199s-0.27796 0.61956-0.62078 0.61956c-0.13834 0-0.26988-0.0428-0.37088-0.1222-0.29895-0.23498-0.52493-0.40696-0.99168-0.49732z" />\n                    </g>\n                </g>\n            </g>\n        </g>\n        <path id="rect4136-6" class="humidifier-body"\n            d="m4.3242 8.877v22.586h4.0059v-9.883h4.3789v-2.617h-4.3789v-5.721h4.3789v-2.617h-4.3789v-1.748h-4.0059z"\n            stroke="##StrokeColor=#000000##" fill="##FillColor=#659dc5##" />\n    </g>\n</g>\n    '}static HumiditySvgData(){return'\n<g transform="scale(2.5,2.5) translate(8,0)">\n    <rect style="\n        fill: #00d1ff;\n        fill-opacity: 1;\n        fill-rule: nonzero;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n      " x="3.660192" y="0.5" width="2.901" height="14.505" />\n    <path style="fill: ##FillColor=#659dc5##; stroke: ##StrokeColor=#000000##; stroke-width: 0.889176px"\n        d="m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z" />\n    <g transform="translate(-10.962785,-9.3157224)">\n        <g>\n            <path\n                d="m 17.43357,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n            <path\n                d="m 17.43357,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n        </g>\n        <g transform="translate(0,0.107786)">\n            <path\n                d="m 14.710621,24.560747 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n            <path\n                d="m 14.710621,27.770688 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z"\n                style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " />\n        </g>\n    </g>\n</g>\n    '}static PressureSvgData(){return'\n<g transform="scale(1.5,1.6) translate(6,6)">\n    <path style="fill: ##FillColor=#659dc5##; stroke: ##StrokeColor=#000000##; stroke-width: 1.29098px"\n        d="M 21.101011,20.624556 17.76371,26.404938 H 11.089107 L 7.7518058,20.624556 11.089107,14.844174 h 6.674603 z" />\n    <g transform="matrix(0.39332133,0,0,0.5366036,8.3312906,37.286552)">\n        <g transform="translate(0,0.03745956)">\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1.30927;\n            stroke-linecap: round;\n            stroke-linejoin: round;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="m 16.929663,-31.088307 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" />\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1;\n            stroke-linecap: butt;\n            stroke-linejoin: miter;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="M 27.541431,-31.088307 H 18.912663" />\n        </g>\n        <path d="m 15.532379,-39.152447 v 16.2032" style="\n          fill: none;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n        " />\n        <g transform="matrix(-1,0,0,1,-1.8983044,-0.27118644)">\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1.30927;\n            stroke-linecap: round;\n            stroke-linejoin: round;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="m -15.961713,-30.779661 4.3966,-1.150699 v 2.301399 z" stroke-miterlimit="4" />\n            <path style="\n            fill: none;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 1;\n            stroke-linecap: butt;\n            stroke-linejoin: miter;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n          " d="M -5.3499446,-30.779661 H -13.978713" />\n        </g>\n    </g>\n    <g transform="translate(-1.5131572,-0.15657804)">\n        <path d="M 2.0131572,0.15657804 V 6.9638416 H 14.573291 v 8.3199894" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n        <path d="M 29.865974,0.15657812 V 6.9638416 H 17.305841 v 8.3199894" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        " />\n    </g>\n</g>\n      '}static DamperSvgData(){return'\n<g transform="scale(2,2) translate(10,0)">\n    <rect class="damper" height="27.5" width="12" stroke="##StrokeColor=#000000##" stroke-miterlimit="4" x="0.69481522"\n        y="0.67645228" stroke-dasharray="none" stroke-width="1" fill="##FillColor=#659dc5##" />\n    <g stroke="##StrokeColor=#000000##" stroke-width="1.5px" transform="translate(-9.3051848,-1.5735477)">\n        <g transform="translate(16,7)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n        <g transform="translate(16,13)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n        <g transform="translate(16,19)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n        <g transform="translate(16,25)">\n            <line x1="-5" x2="5" y1="0" y2="0" transform="rotate(-35)" class="damper-line" />\n        </g>\n    </g>\n    <g stroke-linejoin="miter" transform="matrix(1.2268237,0,0,0.94845469,-13.299764,-1.1862851)"\n        stroke="##StrokeColor=#000000##" stroke-linecap="butt" fill="none">\n        <path stroke-width="1.06273px" d="m 16.298,2.2402 v 28.442" />\n    </g>\n</g>\n    '}static Temperature2SvgData(){return""}static ThermalWheelSvgData(){return'\n<g transform="scale(1.4,1.2) translate(9,8)">\n    <g stroke="##StrokeColor=#000000##" fill="##FillColor=#659dc5##" transform="translate(-2.370089)">\n        <rect class="thermal-wheel-background" height="40" width="25.5" y="-4" x="3" fill="inherit" stroke-width="1" />\n        <g class="thermal-wheel" stroke-width="1">\n            <line x1="3" x2="28.5" y1="-4" y2="-4" />\n            <line x1="3" x2="28.5" y1="0" y2="0" />\n            <line x1="3" x2="28.5" y1="4" y2="4" />\n            <line x1="3" x2="28.5" y1="8" y2="8" />\n            <line x1="3" x2="28.5" y1="12" y2="12" />\n            <line x1="3" x2="28.5" y1="16" y2="16" />\n            <line x1="3" x2="28.5" y1="20" y2="20" />\n            <line x1="3" x2="28.5" y1="24" y2="24" />\n            <line x1="3" x2="28.5" y1="28" y2="28" />\n            <line x1="3" x2="28.5" y1="32" y2="32" />\n            <line x1="3" x2="28.5" y1="36" y2="36" />\n        </g>\n    </g>\n</g>\n    '}static EnthalpySvgData(){return'\n<g transform="scale(2.8,2.4) translate(5,1)">\n    <defs>\n        <linearGradient id="linearGradient4194">\n            <stop style="stop-color: #ffff00; stop-opacity: 1" offset="0" id="stop4196" />\n            <stop id="stop4148" offset="0.3598454" style="stop-color:#ffff00; stop-opacity: 1" />\n            <stop id="stop4144" offset="0.59441435" style="stop-color: #00ffff; stop-opacity: 1" />\n            <stop style="stop-color: #00ffff; stop-opacity: 1" offset="1" id="stop4198" />\n        </linearGradient>\n        <linearGradient xlink:href="#linearGradient4194" id="linearGradient4219" x1="15.955305" y1="9.504283"\n            x2="16.127491" y2="24.826317" gradientUnits="userSpaceOnUse"\n            gradientTransform="translate(-10.896808,-9.4127998)" />\n    </defs>\n    <rect style="\n        fill: url(#linearGradient4219);\n        fill-opacity: 1;\n        fill-rule: nonzero;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n      " x="3.660192" y="0.5" width="2.901" height="14.505" id="rect3012" />\n    <path style="fill: ##FillColor=#659dc5## ; stroke: ##StrokeColor=#000000##; stroke-width: 0.889176px"\n        d="m 9.7077419,18.0463 -2.298594,3.981286 H 2.8119599 L 0.51336587,18.0463 2.8119599,14.065014 h 4.597188 z" />\n    <g transform="translate(-10.733726,-9.4127998)">\n        <g transform="translate(8.1630559,0.95878887)">\n            <circle style="\n            fill: none;\n            fill-opacity: 1;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " id="path4137" cx="6.4061227" cy="28.129852" r="0.77312505" />\n            <path style="\n            fill: none;\n            fill-rule: evenodd;\n            stroke: ##StrokeColor=#000000##;\n            stroke-width: 0.5;\n            stroke-linecap: butt;\n            stroke-linejoin: miter;\n            stroke-miterlimit: 4;\n            stroke-dasharray: none;\n            stroke-opacity: 1;\n          " d="M 6.4061205,27.157211 V 23.65349" />\n        </g>\n        <path style="\n          fill: none;\n          stroke:##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        "\n            d="m 17.270488,24.668533 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" />\n        <path style="\n          fill: none;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.5;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        "\n            d="m 17.270488,27.878474 c 0.0958,0.465416 0.27099,0.690186 0.496151,0.991638 0.07789,0.10429 0.125868,0.230683 0.125868,0.370878 0,0.342813 -0.279183,0.620776 -0.621988,0.620776 -0.342814,0 -0.619564,-0.277963 -0.619564,-0.620776 0,-0.138342 0.0428,-0.269876 0.1222,-0.370878 0.234976,-0.29895 0.406955,-0.524932 0.497324,-0.991677 z" />\n    </g>\n</g>\n    '}static FlowSvgData(){return'\n<g transform="scale(2.7,2.5) translate(7,2)">\n    <defs>\n        <linearGradient id="linearGradient4194">\n            <stop style="stop-color: #ffff00; stop-opacity: 1" offset="0" />\n            <stop style="stop-color: currentColor; stop-opacity: 1" offset="1" />\n        </linearGradient>\n    </defs>\n    <path style="fill: ##FillColor=#659dc5##; stroke: ##StrokeColor=#000000##; stroke-width: 0.889176px"\n        d="m 9.7077419,16.908637 -2.298594,3.981286 H 2.8119599 L 0.51336587,16.908637 2.8119599,12.927351 h 4.597188 z" />\n    <g transform="matrix(0.83920236,0,0,0.83920236,-8.3130944,-6.3365267)">\n        <path id="path4146" d="m 14.917284,30.513877 v -5.217284 h 2.569115" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.824475px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        " />\n        <path d="m 14.956808,27.549512 h 2.529591" style="\n          fill: none;\n          fill-rule: evenodd;\n          stroke: ##StrokeColor=#000000##;\n          stroke-width: 0.824475px;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-opacity: 1;\n        " />\n    </g>\n    <path style="\n        fill: none;\n        fill-rule: evenodd;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n        stroke-linecap: butt;\n        stroke-linejoin: miter;\n        stroke-opacity: 1;\n      " d="M 5.1629049,12.964256 V 0.5 H 0.56071887" />\n    <path style="\n        fill: none;\n        fill-rule: evenodd;\n        stroke: ##StrokeColor=#000000##;\n        stroke-width: 1px;\n        stroke-linecap: butt;\n        stroke-linejoin: miter;\n        stroke-opacity: 1;\n      " d="m 5.0190869,8.889403 h 2.205215 v 4.122792" />\n</g>\n    '}static GuageSvgData(){return""}static DialSvgData(){return""}static ValueSvgData(){return""}static IconWithTitleSvgData(){return""}static TestSvg(){}static Test1SvgData(){return'\n<g>\n    <g width="13.667" height="10.167" transform="scale(1,1) translate(0,20.833)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="13.667" height="10.167" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="13.667" height="10.167" />\n        </g>\n    </g>\n    <g width="13.667" height="10.167" transform="scale(1,1) translate(56.833,21.167)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="13.667" height="10.167" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="13.667" height="10.167" />\n        </g>\n    </g>\n    <g width="13.667" height="10.167" transform="rotate(270,34.667,6.75) scale(1,1) translate(27.833,1.667)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="13.667" height="10.167" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="13.667" height="10.167" />\n        </g>\n    </g>\n    <g width="46.167" height="25.5" transform="scale(1,1) translate(12,12.667)">\n        <g stroke="##LineColor=#000000##" opacity="1" stroke-width="##LineThick=1##" stroke-dasharray="none"\n            width="46.167" height="25.5" transform="scale(1,1) translate(0,0)" fill="##FillColor=#FFFFFF##"\n            fill-opacity="1" stroke-opacity="1">\n            <rect width="46.167" height="25.5" />\n        </g>\n    </g>\n</g>\n    '}};let ToolSvgData=_ToolSvgData;ToolSvgData.DuctSvg=ToolDuctT1SvgData;class ToolUtil{SetSelectionTool(t,e){LogUtil.Debug("O.ActiveSelection.SetSelectionTool - Input:",{toolType:t,isSticky:e}),SvgUtil.RenderAllSVGSelectionStates()}CancelOperation(t){return LogUtil.Debug("O.ToolOpt CancelOperation input:",t),this.SetSelectionTool(ToolConstant.Tools.Select,!1),OptCMUtil.CancelOperation(),LogUtil.Debug("O.ToolOpt CancelOperation output: false"),!1}SetDefaultWallThickness(t,e){LogUtil.Debug("O.ToolOpt SetDefaultWallThickness input:",t,e);var i=1;T3Gv.docUtil.rulerConfig.useInches||(i=OptConstant.Common.MetricConv),e&&(t=e.Data.thick);var n=t*T3Gv.docUtil.rulerConfig.major/(T3Gv.docUtil.rulerConfig.majorScale*i),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(!Utils2.IsEqual(s.def.wallThickness,n,.01)||e){T3Gv.opt.CloseEdit(!0,!0),s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),e||(s.def.wallThickness=n);s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);DrawUtil.CompleteOperation()}LogUtil.Debug("O.ToolOpt SetDefaultWallThickness output: void")}DrawNewWallShape(t,e){var i;LogUtil.Debug("O.ToolOpt DrawNewWallShape input:",t,e);var n=null!=e,s=T3Gv.wallOpt;if(s&&s.AddWall&&(T3Gv.opt.CloseEdit(),s.ToggleAddingWalls(!0),i=s.AddWall(n,e)),n)return LogUtil.Debug("O.ToolOpt DrawNewWallShape output:",i),i;LogUtil.Debug("O.ToolOpt DrawNewWallShape output: undefined")}StampOrDragDropNewShape(t,e,i){LogUtil.Debug("U.ToolUtil.StampOrDragDropNewShape - Input:",t,e),DrawUtil.PreDragDropOrStamp();let n=this.StampOrDragDropCallback;T3Gv.opt.stampTimeout=window.setTimeout(n,200,this,e,i),LogUtil.Debug("U.ToolUtil.StampOrDragDropNewShape - Output: stampTimeout set")}DrawNewLineShape(t,e,i,n){LogUtil.Debug("O.ToolOpt DrawNewLineShape input:",t,e,i,n);let s=!1,a=null;switch(t){case"line":a=this.DrawNewLine(i,0,s,n);break;case"commline":a=this.DrawNewLine(i,1,s,n);break;case"digiline":a=this.DrawNewLine(i,2,s,n);break;case"arcLine":a=this.DrawNewArcLine(s,i,n);break;case"segLine":a=this.DrawNewSegLine(s,i,n);break;case"arcSegLine":a=this.DrawNewArcSegLine(s,i,n);break;case"polyLine":a=this.DrawNewPolyLine(s,i,n);break;case"polyLineContainer":a=this.DrawNewPolyLineContainer(s,i,n);break;case"freehandLine":a=this.DrawNewFreehandLine(s,i,n);break;case"moveWall":a=T3Gv.wallOpt&&T3Gv.wallOpt.AddWall?T3Gv.wallOpt.AddWall(s,n):this.DrawNewLine(i,0,s,n)}LogUtil.Debug("O.ToolOpt DrawNewLineShape output:",a)}DrawNewLine(t,e,i,n){LogUtil.Debug("O.ToolOpt DrawNewLine input:",t,e,i,n);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o,r=s.d_sarrow,l=s.d_earrow,h=s.d_sarrowdisp,c=s.d_earrowdisp,u=0;switch(e){case OptConstant.LineTypes.LsComm:case OptConstant.LineTypes.LsDigi:u=.25}r>0!=l>0&&(0===l&&(l=r,c=h),r=0,h=!1),o=n?Utils1.DeepCopy(n.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:r,StartArrowDisp:h,EndArrowID:l,EndArrowDisp:c,ArrowSizeIndex:s.d_arrowsize,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,ShortRef:e,shapeparam:u,bOverrideDefaultStyleOnDraw:!0};const d=new Line$1(o);let p=Utils1.DeepCopy(s.def.style);if(n&&n.Data&&n.Data.attributes&&n.Data.attributes.StyleRecord?p=Utils1.DeepCopy(n.Data.attributes.StyleRecord):(Utils3.FindStyle(OptConstant.Common.TextBlockStyle),p.Text.Paint.Color="#000000"),d.StyleRecord=p,s.flags&OptConstant.SessionFlags.AllowHops&&(d.flags=Utils2.SetFlag(d.flags,NvConstant.ObjFlags.LineHop,!0)),i)return LogUtil.Debug("O.ToolOpt DrawNewLine output:",d),d;DrawUtil.DrawNewObject(d,t),LogUtil.Debug("O.ToolOpt DrawNewLine output: void")}StampOrDragDropCallback(t,e,i){var n;LogUtil.Debug("O.ToolOpt StampOrDragDropCallback input:",t,e);var s=PolygonConstant.ShapeTypes;switch(T3Gv.opt.stampTimeout=null,n=!0,e){case"textLabel":t.StampTextLabel(!1,!1);break;case s.RECTANGLE:t.DrawRectangle(n,!1);break;case s.ROUNDED_RECTANGLE:t.StampRoundRect(n,!1);break;case s.CIRCLE:t.DrawCircle(n,!0);break;case s.OVAL:t.DrawCircle(n,!1);break;case s.ForeignObject:t.StampVueComponent(n,i);break;default:t.StampShape(e,n)}LogUtil.Debug("O.ToolOpt StampOrDragDropCallback output: void")}DrawRectangle(t,e){ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const i={Frame:{x:-1e3,y:-1e3,width:e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeWidth,height:e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeHeight},TextGrow:NvConstant.TextGrowBehavior.ProPortional,shapeparam:0,moreflags:OptConstant.ObjMoreFlags.FixedRR,ObjGrow:OptConstant.GrowBehavior.All};e&&(i.ObjGrow=OptConstant.GrowBehavior.ProPortional);const n=new Rect$1(i);DrawUtil.MouseDrawNewShape(n,!0,!0,!0,null,null)}StampRoundRect(t,e){let i,n;LogUtil.Debug("O.ToolOpt StampRoundRect input:",t,e);const s=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e?(i=OptConstant.Common.ShapeSquare,n=OptConstant.Common.ShapeSquare):(i=OptConstant.Common.ShapeWidth,n=OptConstant.Common.ShapeHeight);const a={Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional,shapeparam:s.def.rrectparam,moreflags:OptConstant.ObjMoreFlags.FixedRR,ObjGrow:OptConstant.GrowBehavior.All};e&&(a.ObjGrow=OptConstant.GrowBehavior.ProPortional);const o=new RRect$1(a);DrawUtil.MouseDrawNewShape(o,!0,!0,!0,null,null),LogUtil.Debug("O.ToolOpt StampRoundRect output: void")}DrawCircle(t,e){let i=e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeWidth,n=e?OptConstant.Common.ShapeSquare:OptConstant.Common.ShapeHeight;let s=e?{Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ObjGrow:OptConstant.GrowBehavior.ProPortional}:{Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional};const a=new Oval$1(s);DrawUtil.MouseDrawNewShape(a,!0,!0,!0,null,null)}StampVueComponent(t,e){let i,n;LogUtil.Debug("U.ToolUtil StampVueComponent:",t,e),i=OptConstant.Common.ShapeWidth,n=OptConstant.Common.ShapeHeight;let s=null;s={Frame:{x:-1e3,y:-1e3,width:i,height:n},TextGrow:NvConstant.TextGrowBehavior.ProPortional,uniType:e};var a={item:{title:"==== Test Pump ====",active:!1,type:"Pump",translate:[284,72],width:60,height:60,rotate:0,scaleX:1,scaleY:1,settings:{fillColor:"#659dc5",active:!0,inAlarm:!0,titleColor:"inherit",bgColor:"inherit",textColor:"inherit",fontSize:16,t3EntryDisplayField:"description"},zindex:1,t3Entry:{auto_manual:1,calibration_h:0,calibration_l:0,calibration_sign:1,command:"199IN1",control:1,decom:1,description:"V",digital_analog:1,filter:5,id:"IN1",index:0,label:"IN1",pid:199,range:19,type:"INPUT",unit:19,value:30},showDimensions:!0,cat:"Pipe",id:2},showArrows:!0},o=QuasarUtil.GetItemFromAPSV2(e);LogUtil.Debug("apsItem",o);var r=this.CreateForeignObjectWithVue(T3Gv.opt.svgDoc,ObjectType,a,s);DrawUtil.MouseDrawNewShape(r,!0,!0,!0,null,null),LogUtil.Debug("U.ToolUtil StampVueComponent output: void")}CreateForeignObjectWithVue(t,e,i,n){const s=new Instance.Shape.ForeignObject({vueComponent:e,vueProps:i,...n});return LogUtil.Debug("ToolUtil->CreateForeignObjectWithVue After",s),s}StampTextLabel(t,e){LogUtil.Debug("O.ToolOpt StampTextLabel input:",t,e);const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if(e||-1==i.theActiveTextEditObjectID){if(!e){const t=SelectUtil.GetTargetSelect();if(t>=0){const e=ObjectUtil$1.GetObjectPtr(t,!1);if(e&&e.AllowTextEdit()){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);return TextUtil.ActivateTextEdit(e)}}}}else TextUtil.DeactivateTextEdit();const n=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;let s=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);null==s&&(s=n.def.style);const a={StyleRecord:Utils1.DeepCopy(s),Frame:{x:0,y:0,width:0,height:0},TMargins:{top:0,left:0,bottom:0,right:0},TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:TextConstant.TextAlign.Left,flags:NvConstant.ObjFlags.TextOnly};null==a.StyleRecord.Line&&(a.StyleRecord.Line=Utils1.DeepCopy(s.Border)),a.StyleRecord.Line.Thickness=0;const o=new Instance.Shape.Rect(a),r=Utils1.DeepCopy(n.def.style);r.Text.Paint=Utils1.DeepCopy(s.Text.Paint),o.StyleRecord.Text=r.Text;const l=TextUtil.CalcDefaultInitialTextStyle(o.StyleRecord.Text),h=T3Gv.opt.svgDoc.CalcStyleMetrics(l);T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=h.ascent,o.Frame.height=h.height,t||TextUtil.DeactivateTextEdit(!1),DrawUtil.StampNewTextShapeOnTap(o,!1,!1,!1,t,this.StampCallback,{bActivateText:!0}),LogUtil.Debug("O.ToolOpt StampTextLabel output: void")}StampCallback(t,e){if(e.bActivateText){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);TextUtil.ActivateTextEdit(e)}}StampShape(t,e){let i;LogUtil.Debug("U.ToolUtil.StampShape - Input:",t,e);const n=PolygonConstant.ShapeTypes,s={x:-1e3,y:-1e3,width:OptConstant.Common.ShapeWidth,height:OptConstant.Common.ShapeHeight},a=T3Gv.opt.GetShapeParams(t,s),o={Frame:s,TextGrow:NvConstant.TextGrowBehavior.ProPortional,dataclass:a.dataclass,shapeparam:a.shapeparam};switch(a.bIsSquare&&(o.ObjGrow=OptConstant.GrowBehavior.ProPortional),a.dataclass){case n.RECTANGLE:i=new Rect$1(o);break;case n.ROUNDED_RECTANGLE:i=new RRect$1(o);break;case n.OVAL:i=new Oval$1(o);break;default:const t=a.polyVectorMethod(s,a.shapeparam);o.VertexArray=t,i=new Polygon$1(o),i.dataclass=a.dataclass}DrawUtil.MouseDrawNewShape(i,!0,!0,!0,null,null),LogUtil.Debug("U.ToolUtil.StampShape - Output: Shape stamped successfully")}RotateShapes(t){LogUtil.Debug("O.ToolOpt RotateShapes input:",t);try{T3Gv.opt.CloseEdit(),ToolActUtil.RotateShapes(parseInt(t,10))}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}LogUtil.Debug("O.ToolOpt RotateShapes output: void")}AlignShapes(t){LogUtil.Debug("O.ToolOpt AlignShapes input:",t);try{T3Gv.opt.CloseEdit(),ToolActUtil.AlignShapes(t)}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}LogUtil.Debug("O.ToolOpt AlignShapes output: void")}DeleteSelectedObjects(){LogUtil.Debug("O.ToolOpt DeleteSelectedObjects input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.DeleteSelectedObjects()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt DeleteSelectedObjects output: void")}Undo(){LogUtil.Debug("O.ToolOpt Undo input: no parameters");try{ToolActUtil.Undo()}catch(t){throw t}LogUtil.Debug("O.ToolOpt Undo output: void")}Redo(){LogUtil.Debug("O.ToolOpt Redo input: no parameters");try{ToolActUtil.Redo()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt Redo output: void")}Copy(){LogUtil.Debug("O.ToolOpt Copy input: no parameters");try{let e=!1;try{e=document.execCommand("copy")}catch(t){throw t}e||T3Gv.opt.CopyObjects()}catch(t){throw T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt Copy output: void")}Cut(){LogUtil.Debug("O.ToolOpt Cut input: no parameters");try{let e=!1;try{e=document.execCommand("cut")}catch(t){throw t}e||ToolActUtil.CutObjects()}catch(t){throw T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt Cut output: void")}Paste(t){LogUtil.Debug("= u.ToolUtil: Paste/ input isRightClick:",t);try{T3Gv.opt.PastePoint=null,t&&T3Gv.opt.rClickParam&&(T3Gv.opt.PastePoint=T3Gv.opt.rClickParam.hitPoint),T3Clipboard.PasteFromUIaction()}catch(e){throw T3Gv.opt.ExceptionCleanup(e),e}}SendToBackOf(){LogUtil.Debug("O.ToolOpt SendToBackOf input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.SendToBackOf()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt SendToBackOf output: void")}BringToFrontOf(){LogUtil.Debug("O.ToolOpt BringToFrontOf input: no parameters");try{T3Gv.opt.CloseEdit(),DrawUtil.BringToFrontOf()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt BringToFrontOf output: void")}GroupSelected(){LogUtil.Debug("O.ToolOpt GroupSelected input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.GroupSelected(!1,null,!1,!1,!0)}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt GroupSelected output: void")}UnGroupSelected(){LogUtil.Debug("O.ToolOpt UnGroupSelected input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.UnGroupSelected()}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt UnGroupSelected output: void")}FlipHorizontal(){LogUtil.Debug("O.ToolOpt FlipHorizontal input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.FlipShapes(OptConstant.ExtraFlags.FlipHoriz)}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt FlipHorizontal output: void")}FlipVertical(){LogUtil.Debug("O.ToolOpt FlipVertical input: no parameters");try{T3Gv.opt.CloseEdit(),ToolActUtil.FlipShapes(OptConstant.ExtraFlags.FlipVert)}catch(t){throw T3Gv.opt.ExceptionCleanup(t),t}LogUtil.Debug("O.ToolOpt FlipVertical output: void")}MakeSameSize(t){LogUtil.Debug("O.ToolOpt MakeSameSize input:",t);try{T3Gv.opt.CloseEdit(),ToolActUtil.MakeSameSize(parseInt(t,10))}catch(e){T3Gv.opt.ExceptionCleanup(e)}LogUtil.Debug("O.ToolOpt MakeSameSize output: void")}GetSelectionContext(){LogUtil.Debug("O.ToolOpt GetSelectionContext input: no parameters");try{const t=SelectUtil.GetSelectionContext();return LogUtil.Debug("O.ToolOpt GetSelectionContext output:",t),t}catch(t){T3Gv.opt.ExceptionCleanup(t)}}IsActiveTextEdit(){LogUtil.Debug("O.ToolOpt IsActiveTextEdit input: no parameters");try{const t=-1!==ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1).theActiveTextEditObjectID;return LogUtil.Debug("O.ToolOpt IsActiveTextEdit output:",t),t}catch(t){T3Gv.opt.ExceptionCleanup(t),LogUtil.Debug("O.ToolOpt IsActiveTextEdit output: undefined (error)")}}HandleKeyDown(t,e,i){LogUtil.Debug("O.ToolOpt HandleKeyDown input:",t,e,i);try{const n=LMEvtUtil.HandleKeyDown(t,e,i);return LogUtil.Debug("O.ToolOpt HandleKeyDown output:",n),n}catch(n){T3Gv.opt.ExceptionCleanup(n),LogUtil.Debug("O.ToolOpt HandleKeyDown output: undefined (error)")}}Duplicate(){LogUtil.Debug("O.ToolOpt Duplicate input: no parameters");try{ToolActUtil.DuplicateObjects(),LogUtil.Debug("O.ToolOpt Duplicate output: void")}catch(t){T3Gv.opt.RestorePrimaryStateManager(),T3Gv.opt.ExceptionCleanup(t),LogUtil.Debug("O.ToolOpt Duplicate output: void (error)")}}HandleKeyPress(t,e){LogUtil.Debug("O.ToolOpt HandleKeyPress input:",t,e);try{const i=LMEvtUtil.HandleKeyPress(t,e);return LogUtil.Debug("O.ToolOpt HandleKeyPress output:",i),i}catch(i){T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("O.ToolOpt HandleKeyPress output: undefined (error)")}}DragDropSymbol(t,e){LogUtil.Debug("U.ToolUtil.dragDropSymbol - Input:",t,e),this.StampOrDragDropNewSymbol(t,e),LogUtil.Debug("U.ToolUtil.dragDropSymbol - Output: void")}StampOrDragDropNewSymbol(t,e){LogUtil.Debug("O.ToolOpt StampOrDragDropNewSymbol input:",t,e);const i='\n      <path\n        style="\n          fill: ##FillColor=#28c3c6##;\n          fill-opacity: 1;\n          fill-rule: nonzero;\n          stroke:##LineColor=#000000##;\n          stroke-width: 1;\n          stroke-linecap: butt;\n          stroke-linejoin: miter;\n          stroke-miterlimit: 4;\n          stroke-dasharray: none;\n          stroke-opacity: 1;\n        "\n        d="m 3.714,27.855 14.856,-12.999 0,-12.999 22.284,0 0,12.999 14.856,12.999 0,29.712 -51.996,0 z"\n      ></path>\n    ',n=new SvgSymbol({Frame:{x:-1e3,y:-1e3,width:60,height:60},hookflags:257,moreflags:64,targflags:3,InitialGroupBounds:{x:0,y:0,width:30,height:30}});n.StyleRecord=new QuickStyle;const s=i.replace(/\n\s*/g," ").trim();LogUtil.Debug("D.D testSvgString",s),n.Frame={x:-1e3,y:-1e3,width:60,height:60},n.InitialGroupBounds={width:60,height:60,x:-1e3,y:-1e3};n.SVGFragment='\n        <g transform="translate(0,0)">\n            <circle r="30" cy="30" cx="30"\n            style="\n                    opacity: 1;\n                    fill: ##FillColor=#FFFFFF##;\n                    fill-opacity: 1;\n                    fill-rule: nonzero;\n                    stroke:##FillColor=#000000##;\n                    stroke-width: 0.764198;\n                    stroke-linecap: butt;\n                    stroke-linejoin: round;\n                    stroke-miterlimit: 4;\n                    stroke-dasharray: none;\n                    stroke-opacity: 1;\n                  "/>\n            <g transform="matrix(1,0,0,1,46,43)"\n            style="\n                    font-style: normal;\n                    font-weight: normal;\n                    font-size: 51px;\n                    line-height: 125%;\n                    font-family: Sans;\n                    letter-spacing: 0px;\n                    word-spacing: 0px;\n                    fill:##FillColor=#000000##;\n                    fill-opacity: 1;\n                    stroke: none;\n                    stroke-width: 1px;\n                    stroke-linecap: butt;\n                    stroke-linejoin: miter;\n                    stroke-opacity: 1;\n                  ">\n                <path\n                    d="m -29.828843,-32.840076 h 5.075651 v 15.377717 h 18.4432096 v -15.377717 h 5.0756516 V 4.6745172 H -6.3099824 V -13.190771 H -24.753192 V 4.6745172 h -5.075651 z" />\n            </g>\n        </g>\n      ',n&&DrawUtil.DragDropNewShape(n,!0,!0,!1,null,null),LogUtil.Debug("O.ToolOpt StampOrDragDropNewSymbol output: void")}ToolDragDropSymbol(t,e){var i=ToolSvgData.GetSvgData(t);this.ToolDragDropNewSymbol(i,e),LogUtil.Debug("= U.ToolUtil.dragDropSymbol - Input/Output:",t,e)}ToolDragDropNewSymbol(t,e){DrawUtil.DragDropNewShape(t,!0,!0,!1,null,null),LogUtil.Debug("= U.ToolUtil ToolDragDropNewSymbol input/output:",t,e)}DrawNewSegLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewSegLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),n=i?Utils1.DeepCopy(i.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,curveparam:s.def.curveparam,bOverrideDefaultStyleOnDraw:!0};const c=new Instance.Shape.SegmentedLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,s.flags&OptConstant.SessionFlags.AllowHops&&(c.flags=Utils2.SetFlag(c.flags,NvConstant.ObjFlags.LineHop,!0)),t)return LogUtil.Debug("O.ToolOpt DrawNewSegLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewSegLine output: void")}DrawNewArcSegLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewArcSegLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),n=i?Utils1.DeepCopy(i.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,bOverrideDefaultStyleOnDraw:!0};const c=new Instance.Shape.ArcSegmentedLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,s.flags&OptConstant.SessionFlags.AllowHops&&(c.flags=Utils2.SetFlag(c.flags,NvConstant.ObjFlags.LineHop,!0)),t)return LogUtil.Debug("O.ToolOpt DrawNewArcSegLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewArcSegLine output: void")}DrawNewPolyLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewPolyLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),i?n=Utils1.DeepCopy(i.Data.attributes):(n={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,polylist:new PolyList,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,extraflags:OptConstant.ExtraFlags.SideKnobs,bOverrideDefaultStyleOnDraw:!0},n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)),n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)));const c=new Instance.Shape.PolyLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,t)return LogUtil.Debug("O.ToolOpt DrawNewPolyLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewPolyLine output: void")}DrawNewPolyLineContainer(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewPolyLineContainer input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);i?n=Utils1.DeepCopy(i.Data.attributes):(n={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:s.d_sarrow,EndArrowID:s.d_earrow,StartArrowDisp:s.d_sarrowdisp,EndArrowDisp:s.d_earrowdisp,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,polylist:new PolyList,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions},n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)),n.polylist.segs.push(new PolySeg(OptConstant.LineType.LINE,0,0)));const o=new Instance.Shape.PolyLineContainer(n);if(t)return LogUtil.Debug("O.ToolOpt DrawNewPolyLineContainer output:",o),o;DrawUtil.DrawNewObject(o,e),LogUtil.Debug("O.ToolOpt DrawNewPolyLineContainer output: void")}DrawNewFreehandLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewFreehandLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;i?n=Utils1.DeepCopy(i.Data.attributes):(n={Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},pointlist:[],bOverrideDefaultStyleOnDraw:!0},n.pointlist.push({x:0,y:0}));const a=new Instance.Shape.FreehandLine(n);let o=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord&&(o=Utils1.DeepCopy(i.Data.attributes.StyleRecord)),a.StyleRecord=o,t)return LogUtil.Debug("O.ToolOpt DrawNewFreehandLine output:",a),a;DrawUtil.DrawNewObject(a,e),LogUtil.Debug("O.ToolOpt DrawNewFreehandLine output: void")}DrawNewArcLine(t,e,i){let n;LogUtil.Debug("O.ToolOpt DrawNewArcLine input:",t,e,i);const s=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data,a=0==(s.def.textflags&NvConstant.TextFlags.HorizText);let o=s.d_sarrow,r=s.d_earrow,l=s.d_sarrowdisp,h=s.d_earrowdisp;o>0!=r>0&&(0===r&&(r=o,h=l),o=0,l=!1),n=i?Utils1.DeepCopy(i.Data.attributes):{Frame:{x:0,y:0,width:1,height:1},StartPoint:{x:0,y:0},EndPoint:{x:0,y:0},StartArrowID:o,EndArrowID:r,StartArrowDisp:l,EndArrowDisp:h,ArrowSizeIndex:s.d_arrowsize,CurveAdjust:7,TextGrow:NvConstant.TextGrowBehavior.Horizontal,TextAlign:T3Constant.DocContext.CurrentTextAlignment,TextDirection:a,Dimensions:s.dimensions,bOverrideDefaultStyleOnDraw:!0};const c=new Instance.Shape.ArcLine(n);let u=Utils1.DeepCopy(s.def.style);if(i&&i.Data&&i.Data.attributes&&i.Data.attributes.StyleRecord)u=Utils1.DeepCopy(i.Data.attributes.StyleRecord);else{const t=Utils3.FindStyle(OptConstant.Common.TextBlockStyle);u.Text.Paint.Color=t.Text.Paint.Color}if(c.StyleRecord=u,s.flags&OptConstant.SessionFlags.AllowHops&&(c.flags=Utils2.SetFlag(c.flags,NvConstant.ObjFlags.LineHop,!0)),t)return LogUtil.Debug("O.ToolOpt DrawNewArcLine output:",c),c;DrawUtil.DrawNewObject(c,e),LogUtil.Debug("O.ToolOpt DrawNewArcLine output: void")}SelectAllObjects(){LogUtil.Debug("O.ToolOpt SelectAllObjects input: no parameters");try{SelectUtil.SelectAllObjects()}catch(t){T3Gv.opt.ExceptionCleanup(t)}LogUtil.Debug("O.ToolOpt SelectAllObjects output: void")}Save(){T3Gv.opt.CloseEdit(),DataOpt.SaveToLocalStorage()}VueForeignObject(){this.tul.StampOrDragDropNewShape(event,shapeType)}ClearAndRest(){DataOpt.ClearT3LocalStorage(),DrawUtil.ClearDrawArea()}}class ToolOpt{constructor(){this.tul=new ToolUtil}SelectAct(t){LogUtil.Debug("= O.ToolOpt SelectAct - Input:",{event:t}),this.tul.CancelOperation()}SelectAllObjects(){LogUtil.Debug("= O.ToolOpt SelectAllObjects - Input:",{event:event}),this.tul.SelectAllObjects()}DrawWall(t){this.tul.SetDefaultWallThickness(.5,null),this.tul.DrawNewWallShape(null,null),LogUtil.Debug("= O.ToolOpt DrawWall - Output: Initialized wall drawing with thickness",.5)}StampShapeFromToolAct(t,e,i){this.tul.StampOrDragDropNewShape(t,e,i),LogUtil.Debug("= O.ToolOpt StampShapeFromToolAct - Output:",{event:t,shapeType:e,uniShapeType:i})}ToolLineAct(t,e){this.tul.DrawNewLineShape(t,!1,!1),LogUtil.Debug("= O.ToolOpt ToolLineAct - Output: Drew new line shape","line type=",t)}RotateAct(t,e){this.tul.RotateShapes(e)}ShapeAlignAct(t){LogUtil.Debug("= O.ToolOpt ShapeAlignAct - Input:",{alignmentType:t}),this.tul.AlignShapes(t)}GroupAct(t){this.tul.GroupSelected(),LogUtil.Debug("= O.ToolOpt GroupAct - Output: Grouped selected shapes")}UnGroupAct(t){this.tul.UnGroupSelected(),LogUtil.Debug("= O.ToolOpt UngroupAct - Output: Ungrouped selected shapes")}ShapeFlipHorizontalAct(t){this.tul.FlipHorizontal(),LogUtil.Debug("= O.ToolOpt ShapeFlipHorizontalAct - Output: Flipped shapes horizontally")}ShapeFlipVerticalAct(t){this.tul.FlipVertical(),LogUtil.Debug("= O.ToolOpt ShapeFlipVerticalAct - Output: Flipped shapes vertically")}MakeSameSizeAct(t,e){this.tul.MakeSameSize(e),LogUtil.Debug("= O.ToolOpt MakeSameSizeAct - Output: Made shapes same size with option",e)}ShapeBringToFrontAct(t){this.tul.BringToFrontOf(),LogUtil.Debug("= O.ToolOpt ShapeBringToFrontAct - Output: Brought shapes to front")}ShapeSendToBackAct(t){this.tul.SendToBackOf(),LogUtil.Debug("= O.ToolOpt ShapeSendToBackAct - Output: Sent shapes to back")}PasteAct(t){this.tul.Paste(false),LogUtil.Debug("= O.ToolOpt PasteAct - Output: Pasted objects isRightClick",false)}PasteActRightClickAct(t){this.tul.Paste(true),LogUtil.Debug("= O.ToolOpt PasteActRightClickAct - Output: Pasted objects with right click context menu",true)}CopyAct(t){this.tul.Copy(),LogUtil.Debug("= O.ToolOpt CopyAct - Output: Copied selected objects")}CutAct(t){this.tul.Cut(),LogUtil.Debug("= O.ToolOpt CutAct - Output: Cut selected objects")}DeleteAct(t){this.tul.DeleteSelectedObjects(),LogUtil.Debug("= O.ToolOpt DeleteAct - Output: Deleted selected objects")}UndoAct(t){this.tul.Undo(),LogUtil.Debug("= O.ToolOpt UndoAct - Output: Undid last operation")}RedoAct(t){this.tul.Redo(),LogUtil.Debug("= O.ToolOpt RedoAct - Output: Redid last undone operation")}SaveAct(){this.tul.Save()}DuplicateAct(t){this.tul.Duplicate(),LogUtil.Debug("= O.ToolOpt DuplicateAct - Output: Duplicated selected objects")}ClickSymbolAct(t){const e="d6e019b9-110d-4990-8897-eade69451d92";this.tul.StampOrDragDropNewSymbol(e,!1),LogUtil.Debug("= O.ToolOpt ClickSymbolAct - Output: Pre-loaded symbol",e)}DragDropSymbolAct(t){this.tul.DragDropSymbol(t,!0),LogUtil.Debug("= O.ToolOpt DragDropSymbolAct - Output: Handled symbol drag and drop")}LibSetBackgroundImageAct(t,e){LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Input:",{event:t,isLayerImage:e});try{T3Gv.opt.CloseEdit(!0,!0);const t="C:\\Users\\Double\\Desktop\\RE5cNdq.jpg",i=document.createElement("input");i.type="file",i.accept="image/*",i.onchange=t=>{var n;const s=null==(n=i.files)?void 0:n[0];if(!s)return void LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: No file selected");const a=new FileReader;a.onload=()=>{a.result;e?T3Gv.opt.ImportBackgroundLayerImage(s):T3Gv.opt.SetBackgroundImage(s),LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Output: Set background image",{asLayer:e})},a.onerror=()=>{LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: Failed to read file")},a.readAsDataURL(s)},i.click();let n=t;e?T3Gv.opt.ImportBackgroundLayerImage(n):T3Gv.opt.SetBackgroundImage(n),LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Output: Set background image",{asLayer:e})}catch(i){T3Gv.opt.ExceptionCleanup(i)}}LibLockAct(t){var e;try{const i=t?null==(e=T3Gv.opt.rClickParam)?void 0:e.targetId:SelectUtil.GetTargetSelect();T3Gv.opt.CloseEdit(!0),T3Gv.opt.Lock(i,!0),LogUtil.Debug("= O.ToolOpt LibLockAct - Input/Output: Locked object with ID",t,i)}catch(i){T3Gv.opt.ExceptionCleanup(i)}}LibUnlockAct(t){var e;try{const i=t?null==(e=T3Gv.opt.rClickParam)?void 0:e.targetId:SelectUtil.GetTargetSelect();T3Gv.opt.CloseEdit(!0),T3Gv.opt.Lock(i,!1),LogUtil.Debug("= O.ToolOpt LibUnlockAct - Input/Output: Unlocked object with ID",t,i)}catch(i){T3Gv.opt.ExceptionCleanup(i)}}LibSetBackgroundColorAct(t){try{T3Gv.opt.CloseEdit(!0,!0);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);let i=e.background.Paint.Color;e.background.Paint.FillType===NvConstant.FillTypes.Transparent&&(i=NvConstant.Colors.White);let n=t;t===NvConstant.Colors.Trans&&(n=NvConstant.Colors.White),UIUtil.ChangeBackgroundTextColor(n,i),t===NvConstant.Colors.Trans?(e.background.Paint.FillType=NvConstant.FillTypes.Transparent,e.background.Paint.Color=NvConstant.Colors.White):(e.background.Paint.FillType=NvConstant.FillTypes.Solid,e.background.Paint.Color=t),e.background.Paint.Opacity=1,UIUtil.SetBackgroundColor(),DrawUtil.CompleteOperation(),LogUtil.Debug("= O.ToolOpt LibSetBackgroundColorAct - Output: Set background color",t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}LibImportSvgSymbolAct(t){try{T3Gv.opt.CloseEdit();const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=e=>{var i;const n=null==(i=t.files)?void 0:i[0];if(!n)return void LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: No file selected");const s=new FileReader;s.onload=()=>{s.result;T3Gv.opt.ImportSvgSymbol(n),LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Output: Set background image",{e:e})},s.onerror=()=>{LogUtil.Debug("= O.ToolOpt LibSetBackgroundImageAct - Error: Failed to read file")},s.readAsDataURL(n)},t.click()}catch(e){T3Gv.opt.ExceptionCleanup(e)}}LibToolShape(t,e){this.tul.ToolDragDropSymbol(t,e)}LibAddNoteAct(){}LibAddCommentAct(){}LibHyperlinkAct(){}VueForeignObjectAct(t,e,i){LogUtil.Debug("= = O.ToolOpt VueForeignObjectAct - Iutput: Created shape of type",t,e,i),this.tul.StampOrDragDropNewShape(t,e,i)}SetX(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.SetTopLeft(t,!0)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetY(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.SetTopLeft(t,!1)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetWidth(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.ChangeWidth(t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetHeight(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.ChangeHeight(t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetBackgroundColor(t){try{T3Gv.opt.CloseEdit(),T3Gv.opt.SetBackgroundColor(t)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}AddToLibraryAct(){try{T3Gv.opt.CloseEdit(),T3Gv.opt.AddToLibrary()}catch(t){T3Gv.opt.ExceptionCleanup(t)}}LoadLibraryAct(){try{T3Gv.opt.CloseEdit(),T3Gv.opt.LoadLibrary()}catch(t){T3Gv.opt.ExceptionCleanup(t)}}ResetScaleAct(t){try{T3Gv.opt.CloseEdit(),T3Gv.docUtil.SetZoomLevel(100*HvConstant.T3Config.Zoom.Default),T3Gv.docUtil.UpdateRefZoomScale(HvConstant.T3Config.Zoom.Default)}catch(e){T3Gv.opt.ExceptionCleanup(e)}}ClearAct(){try{T3Gv.opt.CloseEdit(),this.tul.ClearAndRest(),LogUtil.Debug("= O.ToolOpt ClearAct - Output: Cleared all shapes and data")}catch(t){T3Gv.opt.ExceptionCleanup(t)}}ClearContextMenu(){try{QuasarUtil.ShowContextMenu(!1,"DocumentArea","Default")}catch(t){T3Gv.opt.ExceptionCleanup(t)}}}const _EvtOpt=class{BindElemCtlEvent(){$$1(document).ready((()=>{this.BindVueForeignObjectEvent(),this.BindSelectEvent(),this.BindSelectAllEvent(),this.BindLibraryEvent(),this.BindLineEvent(),this.BindLine1Event(),this.BindWallEvent(),this.BindRectEvent(),this.BindOvalEvent(),this.BindImageEvent(),this.BindCircleEvent(),this.BindTextEvent(),this.BindArrREvent(),this.BindArrLEvent(),this.BindArrTEvent(),this.BindArrBEvent(),this.BindRoate45Event(),this.BindRoate90Event(),this.BindAlignLeftEvent(),this.BindAlignCentersEvent(),this.BindAlignTopsEvent(),this.BindAlignMiddlesEvent(),this.BindAlignBottomsEvent(),this.BindAlignRightsEvent(),this.BindGroupEvent(),this.BindUngroupEvent(),this.BindFlipHorizontalEvent(),this.BindFlipVerticalEvent(),this.BindSameHeightEvent(),this.BindSameWidthEvent(),this.BindSameBothEvent(),this.BindBringToFrontEvent(),this.BindSendToBackEvent(),this.BindCopyEvent(),this.BindCutEvent(),this.BindPasteEvent(),this.BindDeleteEvent(),this.BindUndoEvent(),this.BindRedoEvent(),this.BindSaveEvent(),this.BindDuplicateEvent(),this.BindClearEvent(),this.BindLibSelectEvent(),this.BindLibBoxEvent(),this.BindLibTextEvent(),this.BindLibIconEvent(),this.BindLibSwitchIconEvent(),this.BindLibLedEvent(),this.BindLibRoomHumidityEvent(),this.BindLibRoomTemperatureEvent(),this.BindLibTemperatureEvent(),this.BindLibBoilerEvent(),this.BindLibHeatpumpEvent(),this.BindLibPumpEvent(),this.BindLibValveThreeWayEvent(),this.BindLibValveTwoWayEvent(),this.BindLibDuctEvent(),this.BindLibFanEvent(),this.BindLibCoolingCoilEvent(),this.BindLibHeatingCoilEvent(),this.BindLibFilterEvent(),this.BindLibHumidifierEvent(),this.BindLibHumidityEvent(),this.BindLibPressureEvent(),this.BindLibDamperEvent(),this.BindLibTemperature2Event(),this.BindLibThermalWheelEvent(),this.BindLibEnthalpyEvent(),this.BindLibFlowEvent(),this.BindLibGuageEvent(),this.BindLibDialEvent(),this.BindLibValueEvent(),this.BindLibIconWithTitleEvent(),this.BindLibSetBackgroundColorEvent(),this.BindLibSetBackgroundImageEvent(),this.BindLibImportSvgSymbolEvent(),this.BindLibLockEvent(),this.BindLibUnLockEvent(),this.BindLibAddNoteEvent(),this.BindLibAddCommentEvent(),this.BindLibHyperlinkEvent(),this.BindSetXEvent(),this.BindSetYEvent(),this.BindSetWidthEvent(),this.BindSetHeightEvent(),this.BindAddToLibraryEvent(),this.BindLoadLibraryEvent(),this.BindDuct1Event(),this.BindDuct2Event(),this.BindDuct3Event(),this.BindDuct4Event(),this.BindDuct5Event(),this.BindDuct6Event(),this.BindDuct7Event(),this.BindDuct8Event(),this.BindDuct9Event(),this.BindDuct10Event(),this.BindDuct11Event(),this.BindDuct12Event(),this.BindResetScaleEvent(),this.BindDocumentAreaEvent()}))}BindSelectEvent(){$$1("#btn_try_select").on("click",(t=>{_EvtOpt.toolOpt.SelectAct(t)}))}BindSelectAllEvent(){$$1("#btn_try_select_all").on("click",(t=>{_EvtOpt.toolOpt.SelectAllObjects()}))}BindLibraryEvent(){$$1("#btn_try_library").on("click",(t=>{_EvtOpt.toolOpt.DragDropSymbolAct(t)}))}BindLineEvent(){$$1("#btn_try_line").on("pointerdown",(t=>{_EvtOpt.toolOpt.ToolLineAct("line",t)}))}BindLine1Event(){$$1("#btn_try_line1").on("pointerdown",(t=>{_EvtOpt.toolOpt.ToolLineAct("arcLine",t)}))}BindWallEvent(){$$1("#btn_try_wall").on("pointerdown",(t=>{_EvtOpt.toolOpt.DrawWall(t)}))}BindRectEvent(){$$1("#btn_try_Rect").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,2,"Rect")}))}BindOvalEvent(){$$1("#btn_try_Oval").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,4,"Oval")}))}BindImageEvent(){$$1("#btn_try_Image").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,1,"Image")}))}BindCircleEvent(){$$1("#btn_try_Circ").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,9,"Circle")}))}BindTextEvent(){$$1("#btn_try_Text").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,"textLabel","Text")}))}BindArrREvent(){$$1("#btn_try_ArrR").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,10,"ArrR")}))}BindArrLEvent(){$$1("#btn_try_ArrL").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,11,"ArrL")}))}BindArrTEvent(){$$1("#btn_try_ArrT").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,12,"ArrT")}))}BindArrBEvent(){$$1("#btn_try_ArrB").on("pointerdown",(t=>{_EvtOpt.toolOpt.StampShapeFromToolAct(t,13,"ArrB")}))}BindRoate45Event(){$$1("#btn_try_Roate45").on("pointerdown",(t=>{_EvtOpt.toolOpt.RotateAct(t,45)}))}BindRoate90Event(){$$1("#btn_try_Roate90").on("pointerdown",(t=>{_EvtOpt.toolOpt.RotateAct(t,90)}))}BindAlignLeftEvent(){$$1("#btn_try_Align_lefts").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("lefts")}))}BindAlignCentersEvent(){$$1("#btn_try_Align_centers").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("centers")}))}BindAlignTopsEvent(){$$1("#btn_try_Align_tops").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("tops")}))}BindAlignMiddlesEvent(){$$1("#btn_try_Align_middles").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("middles")}))}BindAlignBottomsEvent(){$$1("#btn_try_Align_bottoms").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("bottoms")}))}BindAlignRightsEvent(){$$1("#btn_try_Align_rights").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeAlignAct("rights")}))}BindGroupEvent(){$$1("#btn_try_Group").on("pointerdown",(t=>{_EvtOpt.toolOpt.GroupAct(t)}))}BindUngroupEvent(){$$1("#btn_try_UnGroup").on("pointerdown",(t=>{_EvtOpt.toolOpt.UnGroupAct(t)}))}BindFlipHorizontalEvent(){$$1("#btn_try_Flip_Horizontal").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeFlipHorizontalAct(t)}))}BindFlipVerticalEvent(){$$1("#btn_try_Flip_Vertical").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeFlipVerticalAct(t)}))}BindSameHeightEvent(){$$1("#btn_try_Same_Height").on("pointerdown",(t=>{_EvtOpt.toolOpt.MakeSameSizeAct(t,1)}))}BindSameWidthEvent(){$$1("#btn_try_Same_Width").on("pointerdown",(t=>{_EvtOpt.toolOpt.MakeSameSizeAct(t,2)}))}BindSameBothEvent(){$$1("#btn_try_Same_Both").on("pointerdown",(t=>{_EvtOpt.toolOpt.MakeSameSizeAct(t,3)}))}BindBringToFrontEvent(){$$1("#btn_try_BringToFront").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeBringToFrontAct(t)}))}BindSendToBackEvent(){$$1("#btn_try_SendToBack").on("pointerdown",(t=>{_EvtOpt.toolOpt.ShapeSendToBackAct(t)}))}BindPasteEvent(){$$1("#btn_try_Paste").on("pointerdown",(t=>{_EvtOpt.toolOpt.PasteAct(t)}))}BindCopyEvent(){$$1("#btn_try_Copy").on("pointerdown",(t=>{_EvtOpt.toolOpt.CopyAct(t)}))}BindCutEvent(){$$1("#btn_try_Cut").on("pointerdown",(t=>{_EvtOpt.toolOpt.CutAct(t)}))}BindDeleteEvent(){$$1("#btn_try_Delete").on("pointerdown",(t=>{_EvtOpt.toolOpt.DeleteAct(t)}))}BindUndoEvent(){$$1("#btn_try_Undo").on("pointerdown",(t=>{_EvtOpt.toolOpt.UndoAct(t)}))}BindRedoEvent(){$$1("#btn_try_Redo").on("pointerdown",(t=>{_EvtOpt.toolOpt.RedoAct(t)}))}BindSaveEvent(){$$1("#btn_try_Save").on("pointerdown",(t=>{_EvtOpt.toolOpt.SaveAct()}))}BindDuplicateEvent(){$$1("#btn_try_Duplicate").on("pointerdown",(t=>{_EvtOpt.toolOpt.DuplicateAct(t)}))}BindClearEvent(){$$1("#btn_try_Clear").on("pointerdown",(t=>{_EvtOpt.toolOpt.ClearAct()}))}BindLibSelectEvent(){$$1("#btn_try_Lib_Select").on("pointerdown",(t=>{_EvtOpt.toolOpt.SelectAct(t)}))}BindLibBoxEvent(){$$1("#btn_try_Lib_Box").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Box",!0)}))}BindLibTextEvent(){$$1("#btn_try_Lib_Text").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Text",!0)}))}BindLibIconEvent(){$$1("#btn_try_Lib_Icon").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Icon",!0)}))}BindLibSwitchIconEvent(){$$1("#btn_try_Lib_SwitchIcon").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("SwitchIcon",!0)}))}BindLibLedEvent(){$$1("#btn_try_Lib_Led").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Led",!0)}))}BindLibRoomHumidityEvent(){$$1("#btn_try_Lib_RoomHumidity").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("RoomHumidity",!0)}))}BindLibRoomTemperatureEvent(){$$1("#btn_try_Lib_RoomTemperature").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("RoomTemperature",!0)}))}BindLibTemperatureEvent(){$$1("#btn_try_Lib_Temperature").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Temperature",!0)}))}BindLibBoilerEvent(){$$1("#btn_try_Lib_Boiler").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Boiler",!0)}))}BindLibHeatpumpEvent(){$$1("#btn_try_Lib_Heatpump").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Heatpump",!0)}))}BindLibPumpEvent(){$$1("#btn_try_Lib_Pump").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Pump",!0)}))}BindLibValveThreeWayEvent(){$$1("#btn_try_Lib_ValveThreeWay").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("ValveThreeWay",!0)}))}BindLibValveTwoWayEvent(){$$1("#btn_try_Lib_ValveTwoWay").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("ValveTwoWay",!0)}))}BindLibDuctEvent(){$$1("#btn_try_Lib_Duct").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct",!0)}))}BindLibFanEvent(){$$1("#btn_try_Lib_Fan").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Fan",!0)}))}BindLibCoolingCoilEvent(){$$1("#btn_try_Lib_CoolingCoil").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("CoolingCoil",!0)}))}BindLibHeatingCoilEvent(){$$1("#btn_try_Lib_HeatingCoil").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("HeatingCoil",!0)}))}BindLibFilterEvent(){$$1("#btn_try_Lib_Filter").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Filter",!0)}))}BindLibHumidifierEvent(){$$1("#btn_try_Lib_Humidifier").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Humidifier",!0)}))}BindLibHumidityEvent(){$$1("#btn_try_Lib_Humidity").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Humidity",!0)}))}BindLibPressureEvent(){$$1("#btn_try_Lib_Pressure").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Pressure",!0)}))}BindLibDamperEvent(){$$1("#btn_try_Lib_Damper").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Damper",!0)}))}BindLibTemperature2Event(){$$1("#btn_try_Lib_Temperature2").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Temperature2",!0)}))}BindLibThermalWheelEvent(){$$1("#btn_try_Lib_ThermalWheel").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("ThermalWheel",!0)}))}BindLibEnthalpyEvent(){$$1("#btn_try_Lib_Enthalpy").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Enthalpy",!0)}))}BindLibFlowEvent(){$$1("#btn_try_Lib_Flow").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Flow",!0)}))}BindLibGuageEvent(){$$1("#btn_try_Lib_Guage").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Guage",!0)}))}BindLibDialEvent(){$$1("#btn_try_Lib_Dial").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Dial",!0)}))}BindLibValueEvent(){$$1("#btn_try_Lib_Value").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Value",!0)}))}BindLibIconWithTitleEvent(){$$1("#btn_try_Lib_IconWithTitle").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("IconWithTitle",!0)}))}BindLibSetBackgroundColorEvent(){$$1("#btn_try_Lib_SetBackgroundColor").on("pointerdown",(t=>{"#FFFFFF"==T3Gv.docUtil.docConfig.backgroundColor?(_EvtOpt.toolOpt.LibSetBackgroundColorAct("#20b2aa"),T3Gv.docUtil.docConfig.backgroundColor="#20b2aa"):(_EvtOpt.toolOpt.LibSetBackgroundColorAct("#FFFFFF"),T3Gv.docUtil.docConfig.backgroundColor="#FFFFFF")}))}BindLibSetBackgroundImageEvent(){$$1("#btn_try_Lib_SetBackgroundImage").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibSetBackgroundImageAct(t,!1)}))}BindLibImportSvgSymbolEvent(){$$1("#btn_try_Lib_ImportSvgSymbol").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibImportSvgSymbolAct(t)}))}BindLibLockEvent(){$$1("#btn_try_Lib_Lock").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibLockAct(t)}))}BindLibUnLockEvent(){$$1("#btn_try_Lib_UnLock").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibUnlockAct(t)}))}BindLibAddNoteEvent(){$$1("#btn_try_Lib_AddNote").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibAddNoteAct()}))}BindLibAddCommentEvent(){$$1("#btn_try_Lib_AddComment").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibAddCommentAct()}))}BindLibHyperlinkEvent(){$$1("#btn_try_Lib_Hyperlink").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibHyperlinkAct()}))}HandleSidebarToolEvent(t){LogUtil.Debug("Selected tool: ",t),"Temperature"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Temperature",!0),"Boiler"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Boiler",!0),"Heatpump"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Heatpump",!0),"Pump"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Pump",!0),"ValveThreeWay"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("ValveThreeWay",!0),"ValveTwoWay"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("ValveTwoWay",!0),t.value.name,"Fan"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Fan",!0),"CoolingCoil"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("CoolingCoil",!0),"HeatingCoil"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("HeatingCoil",!0),"Filter"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Filter",!0),"Humidifier"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Humidifier",!0),"Humidity"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Humidity",!0),"Pressure"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Pressure",!0),"Damper"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Damper",!0),"ThermalWheel"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("ThermalWheel",!0),"Enthalpy"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Enthalpy",!0),"Flow"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Flow",!0),"RoomHumidity"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("RoomHumidity",!0),"RoomTemperature"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("RoomTemperature",!0),t.value.name,t.value.name,t.value.name,"Wall"==t.value.name&&_EvtOpt.toolOpt.DrawWall(event),"Line"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("line",event),"ArcLine"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("arcLine",event),"SegLine"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("segLine",event),"PolyLine"==t.value.name&&_EvtOpt.toolOpt.ToolLineAct("polyLine",event),"G_Circle"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,9,"G_Circle"),"G_Rectangle"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,2,"G_Rectangle"),"ArrowRight"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,10,"g_arr_right"),"ArrowLeft"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,11,"g_arr_left"),"ArrowTop"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,12,"g_arr_top"),"ArrowBottom"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,13,"g_arr_bottom"),"Oval"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,4,"Oval"),"Switch"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("SwitchIcon",!0),"LED"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Led",!0),"Text"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,"textLabel","Text"),"Box"==t.value.name&&_EvtOpt.toolOpt.StampShapeFromToolAct(event,2,"Box"),"Pointer"==t.value.name&&_EvtOpt.toolOpt.SelectAct(event),"Duct1"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct1",!0),"Duct2"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct2",!0),"Duct3"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct3",!0),"Duct4"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct4",!0),"Duct5"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct5",!0),"Duct6"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct6",!0),"Duct7"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct7",!0),"Duct8"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct8",!0),"Duct9"==t.value.name&&_EvtOpt.toolOpt.LibToolShape("Duct9",!0)}BindVueForeignObjectEvent(){$$1("#btn_try_vue_foreignObject").on("pointerdown",(t=>{_EvtOpt.toolOpt.VueForeignObjectAct(t,PolygonConstant.ShapeTypes.ForeignObject,"Boiler")}))}BindSetXEvent(){$$1("#btn_try_x").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetX("1.5")}))}BindSetYEvent(){$$1("#btn_try_y").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetY("2.3")}))}BindSetWidthEvent(){$$1("#btn_try_w").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetWidth("3.2")}))}BindSetHeightEvent(){$$1("#btn_try_h").on("pointerdown",(t=>{_EvtOpt.toolOpt.SetHeight("2.5")}))}BindAddToLibraryEvent(){$$1("#btn_try_Add_To_Library").on("pointerdown",(t=>{_EvtOpt.toolOpt.AddToLibraryAct()}))}BindLoadLibraryEvent(){$$1("#btn_try_Load_Library").on("pointerdown",(t=>{_EvtOpt.toolOpt.LoadLibraryAct()}))}BindDuct1Event(){$$1("#btn_try_Duct_1").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct1",!0)}))}BindDuct2Event(){$$1("#btn_try_Duct_2").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct2",!0)}))}BindDuct3Event(){$$1("#btn_try_Duct_3").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct3",!0)}))}BindDuct4Event(){$$1("#btn_try_Duct_4").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct4",!0)}))}BindDuct5Event(){$$1("#btn_try_Duct_5").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct5",!0)}))}BindDuct6Event(){$$1("#btn_try_Duct_6").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct6",!0)}))}BindDuct7Event(){$$1("#btn_try_Duct_7").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct7",!0)}))}BindDuct8Event(){$$1("#btn_try_Duct_8").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct8",!0)}))}BindDuct9Event(){$$1("#btn_try_Duct_9").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct9",!0)}))}BindDuct10Event(){$$1("#btn_try_Duct_10").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct10",!0)}))}BindDuct11Event(){$$1("#btn_try_Duct_11").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct11",!0)}))}BindDuct12Event(){$$1("#btn_try_Duct_12").on("pointerdown",(t=>{_EvtOpt.toolOpt.LibToolShape("Duct12",!0)}))}BindResetScaleEvent(){$$1("#btn_try_Reset_Scale").on("pointerdown",(t=>{_EvtOpt.toolOpt.ResetScaleAct(t)}))}BindDocumentAreaEvent(){$$1("#document-area").on("pointerdown",(t=>{_EvtOpt.toolOpt.ClearContextMenu()}))}};let EvtOpt=_EvtOpt;EvtOpt.toolOpt=new ToolOpt;class DrawUtil{static CancelObjectStamp(t){LogUtil.Debug("O.Opt CancelObjectStamp - Input:",{shouldUnbindEvents:t}),UIUtil.SetModalOperation(OptConstant.OptTypes.None),T3Constant.DocContext.SelectionToolSticky=!1,LMEvtUtil.LMStampPostRelease(!1),T3Gv.opt.actionStoredObjectId>=0&&(ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates(),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null),OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&($$1(window).unbind("mousedown"),$$1(window).unbind("click"),$$1(window).unbind("mousemove",EvtUtil.Evt_MouseStampObjectMove),T3Gv.opt.WorkAreaHammer.enable(!0)),T3Gv.opt.moveList=null,T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampSticky=!1,LogUtil.Debug("O.Opt CancelObjectStamp - Output: Object stamp canceled")}static CancelObjectStampTextOnTap(t){LogUtil.Debug("O.Opt CancelObjectStampTextOnTap - Input:",t),UIUtil.SetModalOperation(OptConstant.OptTypes.None),LMEvtUtil.LMStampPostRelease(!1),OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.moveList=null,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.drawShape=null,T3Gv.opt.moveList=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LogUtil.Debug("O.Opt CancelObjectStampTextOnTap - Output: Completed")}static CancelObjectDragDrop(t){if(LogUtil.Debug("O.Opt CancelObjectDragDrop - Input:",{shouldUnbindEvents:t}),UIUtil.SetModalOperation(OptConstant.OptTypes.None),LMEvtUtil.LMStampPostRelease(!1),T3Gv.opt.actionStoredObjectId>=0){const t=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId);t&&T3Gv.opt.svgObjectLayer.RemoveElement(t),ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates(),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null}OptCMUtil.SetEditMode(NvConstant.EditState.Default),t&&T3Gv.opt.UnbindDragDropOrStamp(),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.moveList=null,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,LogUtil.Debug("O.Opt CancelObjectDragDrop - Output: Drag and drop canceled")}static CancelObjectDraw(){LogUtil.Debug("O.Opt CancelObjectDraw - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1),e=t instanceof Instance.Shape.PolyLine||t instanceof Instance.Shape.PolyLineContainer;UIUtil.SetModalOperation(OptConstant.OptTypes.None),LMEvtUtil.LMStampPostRelease(!1),T3Gv.opt.actionStoredObjectId>=0&&!e?(ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates(),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null):ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.UnbindDragDropOrStamp(),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),t&&t.CancelObjectDraw(),T3Gv.wallOpt.CancelObjectDraw&&T3Gv.wallOpt.CancelObjectDraw(),LogUtil.Debug("O.Opt CancelObjectDraw - Output: Object draw canceled.")}static DragDropNewShape(t,e,i,n,s,a){LogUtil.Debug("= U.DrawUtil DragDropNewShape - Input:",{drawingShape:t?t.BlockID:null,horizontalCenter:e,verticalCenter:i,useDefaultStyle:n,hasCallback:!!s});try{UIUtil.SetModalOperation(OptConstant.OptTypes.DragDrop),ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),T3Gv.opt.CloseEdit(),T3Gv.opt.stampCompleteCallback=s||null,T3Gv.opt.stampCompleteUserData=a||null,T3Gv.opt.stampHCenter=e,T3Gv.opt.stampVCenter=i,T3Gv.opt.useDefaultStyle=n,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.newObjectVisible=!1,T3Gv.opt.drawShape=t,t.flags&NvConstant.ObjFlags.TextOnly?OptCMUtil.SetEditMode(NvConstant.EditState.Text):OptCMUtil.SetEditMode(NvConstant.EditState.Stamp),T3Gv.Evt_StampObjectDragEnd=EvtUtil.Evt_StampObjectDragEndFactory(n),T3Gv.opt.mainAppHammer||this.PreDragDropOrStamp(),T3Gv.opt.WorkAreaHammer.enable(!1),T3Gv.opt.mainAppHammer.on("mousemove",EvtUtil.Evt_StampObjectDrag),T3Gv.opt.mainAppHammer.on("mouseup",T3Gv.Evt_StampObjectDragEnd),LMEvtUtil.LMStampPreTrack(),this.InitializeAutoGrowDrag(),LogUtil.Debug("= U.DrawUtil DragDropNewShape - Output: Drag and drop initialized")}catch(o){throw LogUtil.Debug("= U.DrawUtil DragDropNewShape - Error:",o),OptCMUtil.CancelOperation(),T3Gv.opt.ExceptionCleanup(o),o}}static AllowAutoInsert(){LogUtil.Debug("O.Opt AllowAutoInsert - Input: No parameters");const t=T3Gv.wallOpt.AllowAutoInsert();return LogUtil.Debug("O.Opt AllowAutoInsert - Output:",t),t}static InitializeAutoGrowDrag(t,e){LogUtil.Debug("O.Opt InitializeAutoGrowDrag - Input:",{actionType:t,shouldCloseEdit:e}),T3Gv.opt.dragGotAutoResizeRight=!1,T3Gv.opt.dragGotAutoResizeBottom=!1,T3Gv.opt.dragGotAutoResizeOldX=[],T3Gv.opt.dragGotAutoResizeOldY=[],LogUtil.Debug("O.Opt InitializeAutoGrowDrag - Output: Auto grow drag initialized")}static MouseDrawNewShape(t,e,i,n,s,a){LogUtil.Debug("= u.DrawUtil: MouseDrawNewShape - Input:",{drawingShape:t?t.BlockID:null,centerHorizontally:e,centerVertically:i,useDefaultStyle:n,hasCallback:!!s,hasUserData:!!a}),UIUtil.SetModalOperation(OptConstant.OptTypes.Stamp),ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),TextUtil.DeactivateTextEdit(!1),T3Gv.opt.stampCompleteCallback=s||null,T3Gv.opt.stampCompleteUserData=a||null,T3Gv.opt.stampHCenter=e,T3Gv.opt.stampVCenter=i,T3Gv.opt.useDefaultStyle=n,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.newObjectVisible=!1,T3Gv.opt.drawShape=t,t.flags&NvConstant.ObjFlags.TextOnly?OptCMUtil.SetEditMode(NvConstant.EditState.Text):OptCMUtil.SetEditMode(NvConstant.EditState.Stamp,CursorConstant.CursorType.Stamp),T3Gv.opt.WorkAreaHammer.enable(!1),$$1(window).bind("mousemove",EvtUtil.Evt_MouseStampObjectMove),T3Gv.Evt_LMMouseStpObjectDone=EvtUtil.Evt_MouseStampObjectDoneFactory(n),$$1(window).bind("mousedown",T3Gv.Evt_LMMouseStpObjectDone),$$1(window).bind("click",T3Gv.Evt_LMMouseStpObjectDone),LMEvtUtil.LMStampPreTrack(),this.InitializeAutoGrowDrag()}static MouseStampObjectDone(t,e){LogUtil.Debug("O.Opt MouseStampObjectDone - Input:",{event:t,additionalData:e});try{const e=T3Gv.opt.svgDoc.docInfo;let i=!1;const n=[];if(this.ResetAutoScrollTimer(),(t.clientX>=e.dispX+e.dispWidth||t.clientX<T3Gv.opt.svgDoc.docInfo.dispX||t.clientY<T3Gv.opt.svgDoc.docInfo.dispY)&&(i=!0),i)return this.CancelObjectStamp(!0),void LogUtil.Debug("O.Opt MouseStampObjectDone - Output: Canceled (outside work area)");if(T3Gv.opt.actionStoredObjectId<0)return void LogUtil.Debug("O.Opt MouseStampObjectDone - Output: No object created yet");SelectUtil.ClearAnySelection(!0);const s={FrameList:[]};let a=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY);const o=T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly;if(!o){const e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,i=T3Gv.opt.OverrideSnaps(t);!T3Gv.docUtil.docConfig.enableSnap||e||i||(a=T3Gv.docUtil.SnapToGrid(a))}let r=a.x;T3Gv.opt.stampHCenter&&(r-=T3Gv.opt.drawShape.Frame.width/2);let l,h,c=a.y;if(T3Gv.opt.stampVCenter&&(c-=T3Gv.opt.drawShape.Frame.height/2),T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let t=0;t<T3Gv.opt.moveList.length;t++){const e=T3Gv.opt.moveList[t],i=ObjectUtil$1.GetObjectPtr(e,!0);i&&(i.UpdateFrame(i.Frame),h=Utils1.DeepCopy(i.Frame),s.FrameList.push(h),i.dataStyleOverride=null)}else{if(T3Gv.opt.drawShape){if(T3Gv.opt.drawShape.sizedim.width=T3Gv.opt.drawShape.Frame.width,T3Gv.opt.drawShape.sizedim.height=T3Gv.opt.drawShape.Frame.height,T3Gv.opt.drawShape.objecttype===NvConstant.FNObjectTypes.Frame){const t=LayerUtil.ZListPreserve();l=this.ReplaceSpecialObject(T3Gv.opt.drawShape,T3Gv.opt.actionStoredObjectId,t,T3Gv.opt.drawShape.objecttype),s.ReplaceSpecialObjectID=l}T3Gv.opt.drawShape.UpdateFrame(T3Gv.opt.drawShape.Frame),h=Utils1.DeepCopy(T3Gv.opt.drawShape.Frame),s.FrameList.push(h)}ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0)}if(s.linkParams=Utils1.DeepCopy(T3Gv.opt.linkParams),T3Gv.opt.SetLinkFlagsOnFilledClosedPolylines(),T3Gv.wallOpt instanceof WallOpt&&T3Gv.wallOpt.EnsureCubicleBehindOutline(T3Gv.opt.actionStoredObjectId),OptCMUtil.SetEditMode(NvConstant.EditState.Default),$$1(window).unbind("mousedown"),$$1(window).unbind("click"),$$1(window).unbind("mousemove",EvtUtil.Evt_MouseStampObjectMove),T3Gv.opt.WorkAreaHammer.enable(!0),o||n.push(T3Gv.opt.actionStoredObjectId),T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(n.length=0,n.push(...T3Gv.opt.moveList),T3Gv.opt.actionStoredObjectId=-1):ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),l){const t=[l];ObjectUtil$1.DeleteObjects(t,!1)}LayerUtil.IsTopMostVisibleLayer()||LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),SvgUtil.RenderDirtySVGObjects(),T3Gv.opt.moveList=null,T3Gv.opt.stampCompleteCallback&&T3Gv.opt.actionStoredObjectId>=0&&T3Gv.opt.stampCompleteCallback(T3Gv.opt.actionStoredObjectId,T3Gv.opt.stampCompleteUserData),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,LMEvtUtil.LMStampPostRelease(!0),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,UIUtil.SetModalOperation(OptConstant.OptTypes.None),this.CompleteOperation(n),QuasarUtil.AddCurrentObjectToAppState(),LogUtil.Debug("O.Opt MouseStampObjectDone - Output: Stamp operation completed successfully")}catch(i){LogUtil.Debug("O.Opt MouseStampObjectDone - Error:",i),OptCMUtil.CancelOperation(),this.DragDrop_ExceptionCleanup(),T3Gv.opt.ExceptionCleanup(i)}}static MouseAddNewShape(t){let e;LogUtil.Debug("O.Opt MouseAddNewShape - Input:",{useDefaultStyle:t});let i=null!==T3Gv.opt.drawShape.nativeDataArrayBuffer,n=0,s=!1;if((e=this.AddNewObject(T3Gv.opt.drawShape,t,!1))>=0){T3Gv.opt.actionStoredObjectId=e;let t=LayerUtil.VisibleZList();if(T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let e=0;e<T3Gv.opt.moveList.length;e++){let i=T3Gv.opt.moveList[e],a=ObjectUtil$1.GetObjectPtr(i,!1);if(a){let e=a.GetSVGFrame();a instanceof Instance.Shape.PolyLine&&a.polylist&&a.polylist.closed&&a.StyleRecord&&a.StyleRecord.Line&&a.StyleRecord.Line.BThick&&e.x<0&&e.y<0&&(n=-2*a.StyleRecord.Line.BThick,s=a instanceof Instance.Shape.PolyLineContainer),e.y+=n,e.x+=n,s||(n=0),T3Gv.opt.dragBBoxList.push(e);let o=t.indexOf(i);SvgUtil.AddSVGObject(o,i,!0,!1),T3Gv.opt.dragElementList.push(i),T3Gv.docUtil.docConfig.enableSnap&&i===T3Gv.opt.actionStoredObjectId&&(T3Gv.opt.dragTargetBBox=Utils1.DeepCopy(e)),T3Gv.opt.dragEnclosingRect=T3Gv.opt.GetListSRect(T3Gv.opt.moveList,!1,!0)}}else if(i){let i=ObjectUtil$1.GetObjectPtr(e,!1),n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),s=i.ImageURL&&i.ImageURL.length>0;i&&i.SymbolID!==OptConstant.Common.WallOpenId&&!s&&i.ApplyCurvature(n.def.rrectparam);let a=t.indexOf(T3Gv.opt.actionStoredObjectId);SvgUtil.AddSVGObject(a,e,!0,!1)}T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.lpCircList.push(T3Gv.opt.actionStoredObjectId),UIUtil.ShowFrame(!0)}LogUtil.Debug("O.Opt MouseAddNewShape - Output: New object created with ID:",e)}static MouseStampObjectMove(t){LogUtil.Debug("O.Opt MouseStampObjectMove - Input:",t);const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY);if(T3Gv.opt.actionStoredObjectId<0){if(!(t.clientX>=T3Gv.opt.svgDoc.docInfo.dispX&&t.clientY>=T3Gv.opt.svgDoc.docInfo.dispY))return void LogUtil.Debug("O.Opt MouseStampObjectMove - Output: Cursor outside document boundaries");this.MouseAddNewShape(T3Gv.opt.useDefaultStyle),T3Gv.opt.newObjectVisible=!0,LogUtil.Debug("O.Opt MouseStampObjectMove - Created new shape with ID:",T3Gv.opt.actionStoredObjectId)}this.AutoScrollCommon(t,!0,"HandleStampDragDoAutoScroll")&&this.StampObjectMoveCommon(e.x,e.y,t),LogUtil.Debug("O.Opt MouseStampObjectMove - Output: Movement processed")}static StampObjectMoveCommon(t,e,i){var n,s,a,o;let r,l,h,c,u,d,p,g,f;LogUtil.Debug("O.Opt StampObjectMoveCommon - Input:",{mouseX:t,mouseY:e,event:i});let m,v=0,b=0,y={},S={x:t,y:e},x=null;const w=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(t,e);if(!w)return void LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: No valid window coordinates");if(T3Gv.opt.actionStoredObjectId>0){if(w.x<T3Gv.opt.svgDoc.docInfo.dispX||w.y<T3Gv.opt.svgDoc.docInfo.dispY){if(T3Gv.opt.newObjectVisible){if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let t=0;t<T3Gv.opt.moveList.length;++t)c=T3Gv.opt.moveList[t],p=SvgUtil.GetSVGDragElement(t),p&&p.SetVisible(!1);else T3Gv.opt.actionSvgObject&&T3Gv.opt.actionSvgObject.SetVisible(!1);T3Gv.opt.newObjectVisible=!1,UIUtil.ShowFrame(!1)}return void LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: Object outside viewport, hidden")}if(!T3Gv.opt.newObjectVisible){if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(let t=0;t<T3Gv.opt.moveList.length;++t)c=T3Gv.opt.moveList[t],p=SvgUtil.GetSVGDragElement(t),p&&p.SetVisible(!0);else T3Gv.opt.actionSvgObject&&T3Gv.opt.actionSvgObject.SetVisible(!0);T3Gv.opt.newObjectVisible=!0,UIUtil.ShowFrame(!0)}}if(r=ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!1),!r)return void LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: No valid drawing object");const C=T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly,T=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,D=T3Gv.opt.OverrideSnaps(i)||T;let k,$;if(!T3Gv.opt.moveList&&!C&&this.AllowSnapToShapes()){const t={};if(k=r.CanSnapToShapes(t),k>=0){const e=new DynamicGuides,i=ObjectUtil$1.GetObjectPtr(k,!1).GetSnapRect();$=Utils1.DeepCopy(i),$.x=S.x-i.width/2,$.y=S.y-i.height/2;const n=DynamicUtil.DynamicSnapsGetSnapObjects(k,$,e,T3Gv.opt.moveList,null,t);null!==n.x&&($.x+=n.x,S.x+=n.x),null!==n.y&&($.y+=n.y,S.y+=n.y)}}if(T3Gv.docUtil.docConfig.enableSnap&&!D&&!C){let t,e;if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(l=T3Gv.opt.moveList.indexOf(T3Gv.opt.actionStoredObjectId),e=Utils1.DeepCopy(T3Gv.opt.dragBBoxList[l]),t=r.GetSnapRect()):(e=Utils1.DeepCopy(T3Gv.opt.actionBBox),t=r.GetSnapRect()),x=T3Gv.opt.dragEnclosingRect?Utils1.DeepCopy(T3Gv.opt.dragEnclosingRect):t,x&&e){u=x.x-e.x,d=x.y-e.y,x.x=S.x-x.width/2,x.y=S.y-x.height/2;const i={x:x.x-u,y:x.y-d},n=Utils1.DeepCopy(t);if(n.x=S.x-t.width/2,n.y=S.y-t.height/2,r.CustomSnap(i.x,i.y,0,0,!1,S));else if(T3Gv.docUtil.docConfig.centerSnap){const t=T3Gv.docUtil.SnapToGrid(S);S.x=t.x,S.y=t.y}else{const t=T3Gv.docUtil.SnapRect(n);S.x+=t.x,S.y+=t.y}}}if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length){h=T3Gv.opt.moveList.length,l=T3Gv.opt.moveList.indexOf(T3Gv.opt.actionStoredObjectId),m=T3Gv.opt.dragEnclosingRect;let t={x:S.x+m.width/2,y:S.y+m.height/2};t=this.DoAutoGrowDrag(t),S.x=t.x-m.width/2,S.y=t.y-m.height/2,u=S.x-m.x-m.width/2,d=S.y-m.y-m.height/2,m.x+u<0&&(u=-m.x),m.y+d<0&&(d=-m.y),m=T3Gv.opt.dragBBoxList[l],r.SetShapeOrigin((null!=(n=null==m?void 0:m.x)?n:0)+u,(null!=(s=null==m?void 0:m.y)?s:0)+d),S=LMEvtUtil.LMStampDuringTrack(S,r);const e=r.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(e,S,CursorConstant.CursorTypes.Plus,r);const i=new SelectionAttr;i.left=e.x,i.top=e.y;const a=r.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches;i.widthstr=T3Constant.DocContext.CurrentWidth,i.heightstr=T3Constant.DocContext.CurrentHeight,i.leftstr=RulerUtil.GetLengthInRulerUnits(i.left,!1,T3Gv.docUtil.rulerConfig.originx,a),i.topstr=RulerUtil.GetLengthInRulerUnits(i.top,!1,T3Gv.docUtil.rulerConfig.originy,a);for(let n=0;n<h;++n){c=T3Gv.opt.moveList[n];const t=ObjectUtil$1.GetObjectPtr(c);if(t){if(c!==T3Gv.opt.actionStoredObjectId){if(m=T3Gv.opt.dragBBoxList[n],!m)continue;t.SetShapeOrigin(m.x+u,m.y+d)}p=SvgUtil.GetSVGDragElement(n),!p&&t.ShapeType===OptConstant.ShapeType.SvgSymbol&&t.SVGFragment&&(g||(g=LayerUtil.VisibleZList()),f=g.indexOf(c),SvgUtil.AddSVGObject(f,c,!0,!1),p=T3Gv.opt.svgObjectLayer.GetElementById(c)),p&&p.SetPos(m.x+u,m.y+d)}}}else{m=Utils1.DeepCopy(T3Gv.opt.actionBBox),x=Utils1.DeepCopy(T3Gv.opt.dragEnclosingRect);let t={x:S.x+x.width/2,y:S.y+x.height/2};t=this.DoAutoGrowDrag(t),S.x=t.x-x.width/2,S.y=t.y-x.height/2,u=S.x-x.x-x.width/2,d=S.y-x.y-x.height/2,u=m.x+u<0?-x.x:S.x-m.x-m.width/2,d=m.y+d<0?-x.y:S.y-m.y-m.height/2,r.SetShapeOrigin(m.x+u,m.y+d),S=LMEvtUtil.LMStampDuringTrack(S,r);const e=r.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(e,S,CursorConstant.CursorTypes.Move,r);const i=new SelectionAttr;i.left=e.x,i.top=e.y;const n=r.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches;i.widthstr=T3Constant.DocContext.CurrentWidth,i.heightstr=T3Constant.DocContext.CurrentHeight,i.leftstr=RulerUtil.GetLengthInRulerUnits(i.left,!1,T3Gv.docUtil.rulerConfig.originx,n),i.topstr=RulerUtil.GetLengthInRulerUnits(i.top,!1,T3Gv.docUtil.rulerConfig.originy,n),u=S.x-x.x-x.width/2,d=S.y-x.y-x.height/2,x.x+u-v<0?(u=-x.x+v,v=0):u=S.x-m.x-m.width/2,x.y+d-b<0?(d=-x.y+b,b=0):d=S.y-m.y-m.height/2,r.SetShapeOrigin((null!=(a=null==m?void 0:m.x)?a:0)+u,(null!=(o=null==m?void 0:m.y)?o:0)+d),T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.ConnectIndexHistory.length>0)&&(y=Utils1.DeepCopy(m),y.x+=u,y.y+=d,HookUtil.HandleHookedObjectMoving(r,y)),T3Gv.opt.actionSvgObject.SetPos(m.x+u-v,m.y+d-b);const s=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,l=new DynamicGuides;l&&(s?T3Gv.opt.dynamicGuides&&(DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null):DynamicUtil.DynamicSnapsUpdateGuides(l,k,$))}LogUtil.Debug("O.Opt StampObjectMoveCommon - Output: Object positioned at",S)}static DragDropObjectDone(t,e){LogUtil.Debug("DragDropObjectDone - Input:",{event:t,additionalData:e}),T3Gv.opt.WorkAreaHammer.enable(!0);try{Utils2.StopPropagationAndDefaults(t),this.ResetAutoScrollTimer();let e,i,n,s,a=!1;const o=T3Gv.opt.svgDoc.docInfo;let r=!1;const l=[];if(t.clientX>=o.dispX+o.dispWidth&&(r=!0),t.clientX<T3Gv.opt.svgDoc.docInfo.dispX&&(r=!0),t.clientY<T3Gv.opt.svgDoc.docInfo.dispY&&(r=!0),r)return this.CancelObjectDragDrop(!0),void LogUtil.Debug("DragDropObjectDone - Output: Canceled (outside work area)");if(null==T3Gv.opt.linkParams)return this.CancelObjectDragDrop(!0),void LogUtil.Debug("DragDropObjectDone - Output: Canceled (no link parameters)");let h=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.clientX,t.clientY);if(T3Gv.opt.drawShape&&(a=!!(T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly)),!a){const e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,i=T3Gv.opt.OverrideSnaps(t);!T3Gv.docUtil.docConfig.enableSnap||e||i||(h=T3Gv.docUtil.SnapToGrid(h))}let c=h.x;T3Gv.opt.stampHCenter&&(c-=T3Gv.opt.drawShape.Frame.width/2);let u,d,p=h.y;T3Gv.opt.stampVCenter&&(p-=T3Gv.opt.drawShape.Frame.height/2);const g={FrameList:[]};if(T3Gv.opt.moveList&&T3Gv.opt.moveList.length)for(u=T3Gv.opt.moveList[0],i=T3Gv.opt.moveList.length,e=0;e<i;e++)n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.moveList[e],!0),n&&(n.UpdateFrame(n.Frame),d=Utils1.DeepCopy(n.Frame),g.FrameList.push(d)),n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.moveList[e],!0);else{if(T3Gv.opt.drawShape){if(u=T3Gv.opt.drawShape.BlockID,T3Gv.opt.drawShape.sizedim.width=T3Gv.opt.drawShape.Frame.width,T3Gv.opt.drawShape.sizedim.height=T3Gv.opt.drawShape.Frame.height,T3Gv.opt.drawShape.objecttype===NvConstant.FNObjectTypes.Frame){const t=LayerUtil.ZListPreserve();s=this.ReplaceSpecialObject(T3Gv.opt.drawShape,T3Gv.opt.actionStoredObjectId,t,T3Gv.opt.drawShape.objecttype)}T3Gv.opt.drawShape.UpdateFrame(T3Gv.opt.drawShape.Frame),d=Utils1.DeepCopy(T3Gv.opt.drawShape.Frame),g.FrameList.push(d)}ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0)}OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.UnbindDragDropOrStamp(),a||l.push(T3Gv.opt.actionStoredObjectId);let f=OptAhUtil.GetGvSviOpt(u);if(null==f&&(f=T3Gv.wallOpt),f instanceof WallOpt&&f.EnsureCubicleBehindOutline(T3Gv.opt.actionStoredObjectId),T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(l.length=0,l.push(...T3Gv.opt.moveList),T3Gv.opt.actionStoredObjectId=-1):ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),s){const t=[s];ObjectUtil$1.DeleteObjects(t,!1)}LayerUtil.IsTopMostVisibleLayer()||LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),SvgUtil.RenderDirtySVGObjects(),T3Gv.opt.SetLinkFlagsOnFilledClosedPolylines(),T3Gv.opt.moveList=null,T3Gv.opt.stampCompleteCallback&&T3Gv.opt.actionStoredObjectId>=0&&T3Gv.opt.stampCompleteCallback(T3Gv.opt.actionStoredObjectId,T3Gv.opt.stampCompleteUserData),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,LMEvtUtil.LMStampPostRelease(!0),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.dragBBoxList=[],T3Gv.opt.dragElementList=[],T3Gv.opt.actionSvgObject=null,UIUtil.SetModalOperation(OptConstant.OptTypes.None),this.CompleteOperation(l),QuasarUtil.AddCurrentObjectToAppState(),LogUtil.Debug("DragDropObjectDone - Output: Drag-drop operation completed successfully")}catch(i){throw LogUtil.Debug("DragDropObjectDone - Error:",i),OptCMUtil.CancelOperation(),this.DragDrop_ExceptionCleanup(),T3Gv.opt.ExceptionCleanup(i),i}}static ReplaceSpecialObject(t,e,i,n){let s,a,o,r;for(LogUtil.Debug("O.Opt ReplaceSpecialObject - Input:",{drawingObject:t,targetObjectId:e,zList:i,objectType:n}),LayerUtil.VisibleZList(),a=i.length,s=0;s<a;s++)if(r=i[s],o=ObjectUtil$1.GetObjectPtr(r,!1),o&&o.objecttype===n&&r!==e)return i[s]=e,i[a-1]===e&&(i[a-1]=r),t.Frame=Utils1.DeepCopy(o.Frame),o.extraflags=Utils2.SetFlag(o.extraflags,OptConstant.ExtraFlags.NoDelete,!1),o.flags&NvConstant.ObjFlags.Lock&&(t.flags=Utils2.SetFlag(t.flags,NvConstant.ObjFlags.Lock,!0)),LogUtil.Debug("O.Opt ReplaceSpecialObject - Output: Replaced object ID:",r),r;return LogUtil.Debug("O.Opt ReplaceSpecialObject - Output: No object replaced"),0}static DragDrop_ExceptionCleanup(){LogUtil.Debug("O.Opt DragDrop_ExceptionCleanup - Input: No parameters"),T3Gv.opt.emptyEMFList=[],T3Gv.opt.emptySymbolList=[],LogUtil.Debug("O.Opt DragDrop_ExceptionCleanup - Output: Cleanup completed")}static StampObjectMove(t){LogUtil.Debug("O.Opt StampObjectMove - Input:",t),Utils2.StopPropagationAndDefaults(t);let e=0,i=0;t.gesture?(e=t.gesture.center.clientX,i=t.gesture.center.clientY):(e=t.clientX,i=t.clientY);const n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e,i);if(LogUtil.Debug("O.Opt StampObjectMove - Converted coordinates:",n),T3Gv.opt.actionStoredObjectId<0){if(e<T3Gv.opt.svgDoc.docInfo.dispX||i<T3Gv.opt.svgDoc.docInfo.dispY)return void LogUtil.Debug("O.Opt StampObjectMove - Output: Cursor outside document boundaries");this.MouseAddNewShape(T3Gv.opt.useDefaultStyle),T3Gv.opt.newObjectVisible=!0,LogUtil.Debug("O.Opt StampObjectMove - Created new shape with ID:",T3Gv.opt.actionStoredObjectId)}this.AutoScrollCommon(t,!0,"HandleStampDragDoAutoScroll")&&this.StampObjectMoveCommon(n.x,n.y,t),LogUtil.Debug("O.Opt StampObjectMove - Output: Movement processed")}static PreDragDropOrStamp(){LogUtil.Debug("O.Opt PreDragDropOrStamp - Input: No parameters"),T3Gv.opt.mainAppHammer&&T3Gv.opt.UnbindDragDropOrStamp(),T3Gv.opt.mainAppHammer=new Hammer(T3Gv.opt.mainAppElement),LogUtil.Debug("O.Opt PreDragDropOrStamp - Output: Hammer manager created for drag/drop operations")}static DrawNewObject(t,e){LogUtil.Debug("O.Opt DrawNewObject - Input:",{newShape:t,clearExistingSection:e}),UIUtil.SetModalOperation(OptConstant.OptTypes.Draw),ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1),T3Gv.opt.CloseEdit(),T3Gv.opt.lineDrawId=-1,T3Gv.opt.drawShape=t,SelectUtil.ClearAnySelection(!e),OptCMUtil.SetEditMode(NvConstant.EditState.Edit),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDrawStart),LogUtil.Debug("O.Opt DrawNewObject - Output: Draw new object initialized")}static StartNewObjectDraw(t){if(LogUtil.Debug("O.Opt StartNewObjectDraw - Input:",t),T3Gv.opt.lineStamp)return void LogUtil.Debug("O.Opt StartNewObjectDraw - Output: lineStamp active, aborting draw");let e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("O.Opt StartNewObjectDraw: Client coords and Doc coords",t.gesture.center.clientX,t.gesture.center.clientY,e),T3Gv.opt.drawStartX=e.x,T3Gv.opt.drawStartY=e.y,LogUtil.Debug("O.Opt StartNewObjectDraw: Draw start coordinates set",T3Gv.opt.drawStartX,T3Gv.opt.drawStartY);if(!T3Gv.opt.drawShape.LMDrawPreTrack(e))return void LogUtil.Debug("O.Opt StartNewObjectDraw - Output: Pre-track check failed");let i=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0,n=T3Gv.opt.OverrideSnaps(t);i=i||n;if(T3Gv.docUtil.docConfig.enableSnap&&!i){let t=T3Gv.opt.drawShape.GetSnapRect(),i=T3Gv.opt.dragEnclosingRect?Utils1.DeepCopy(T3Gv.opt.dragEnclosingRect):t,n=Utils1.DeepCopy(T3Gv.opt.actionBBox),s=i.x-n.x,a=i.y-n.y;i.x=e.x-i.width/2,i.y=e.y-i.height/2;let o={x:i.x-s,y:i.y-a};if(!T3Gv.opt.drawShape.CustomSnap(o.x,o.y,0,0,!1,e))if(T3Gv.docUtil.docConfig.centerSnap){let t=T3Gv.docUtil.SnapToGrid(e);e.x=t.x,e.y=t.y}else{let i=Utils1.DeepCopy(t);i.x=e.x-t.width/2,i.y=e.y-t.height/2;let n=T3Gv.docUtil.SnapRect(i);e.x+=n.x,e.y+=n.y}}let s=e.x,a=e.y;SelectUtil.ClearAnySelection(!0),T3Gv.opt.actionStartX=s,T3Gv.opt.actionStartY=a,T3Gv.opt.actionBBox={x:s,y:a,width:1,height:1},T3Gv.opt.actionNewBBox={x:s,y:a,width:1,height:1};let o=T3Gv.opt.drawShape;this.InitializeAutoGrowDrag(),UIUtil.ShowFrame(!0),o.LMDrawClick(s,a),this.AddNewObject(o,!o.bOverrideDefaultStyleOnDraw,!1);let r=LayerUtil.ActiveLayerZList(),l=r.length;T3Gv.opt.actionStoredObjectId=r[l-1],T3Gv.opt.linkParams&&T3Gv.opt.linkParams.lpCircList&&T3Gv.opt.linkParams.lpCircList.push(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.SConnectIndex,T3Gv.opt.linkParams.SConnectPt,!0,!1,o.BlockID,T3Gv.opt.linkParams.SConnectInside),T3Gv.opt.linkParams.SHiliteConnect=T3Gv.opt.linkParams.SConnectIndex,T3Gv.opt.linkParams.SHiliteInside=T3Gv.opt.linkParams.SConnectInside),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SJoinIndex>=0&&(HookUtil.HiliteConnect(T3Gv.opt.linkParams.SJoinIndex,T3Gv.opt.linkParams.SConnectPt,!0,!0,o.BlockID,null),T3Gv.opt.linkParams.SHiliteJoin=T3Gv.opt.linkParams.SJoinIndex),LogUtil.Debug("O.Opt StartNewObjectDraw - Output: New object drawn with ID",T3Gv.opt.actionStoredObjectId)}static StampTextObjectOnTapDone(t,e){LogUtil.Debug("O.Opt StampTextObjectOnTapDone - Input:",{event:t,optionalParam:e});let i=[],n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),s=T3Gv.opt.drawShape.flags&NvConstant.ObjFlags.TextOnly;if(!s){let e=T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0;T3Gv.opt.OverrideSnaps(t)&&(e=!0),T3Gv.docUtil.docConfig.enableSnap&&!e&&(n=T3Gv.docUtil.SnapToGrid(n))}let a=n.x-T3Gv.opt.drawShape.Frame.width/2,o=n.y-T3Gv.opt.drawShape.Frame.height/2;T3Gv.opt.drawShape.Frame.x=a-T3Gv.opt.stampShapeOffsetX,T3Gv.opt.drawShape.Frame.y=o-T3Gv.opt.stampShapeOffsetY,T3Gv.opt.drawShape.sizedim.width=T3Gv.opt.drawShape.Frame.width,T3Gv.opt.drawShape.sizedim.height=T3Gv.opt.drawShape.Frame.height,T3Gv.opt.drawShape.UpdateFrame(T3Gv.opt.drawShape.Frame),ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.moveList&&T3Gv.opt.moveList.length?(ObjectUtil$1.DeleteObjects(i,!1),i=T3Gv.opt.moveList.slice(0),T3Gv.opt.actionStoredObjectId=-1):ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId),SvgUtil.RenderDirtySVGObjects(),T3Gv.opt.moveList=null,T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.CompleteOperation(i),T3Gv.opt.stampCompleteCallback&&T3Gv.opt.actionStoredObjectId>=0&&T3Gv.opt.stampCompleteCallback(T3Gv.opt.actionStoredObjectId,T3Gv.opt.stampCompleteUserData),T3Gv.opt.stampCompleteCallback=null,T3Gv.opt.stampCompleteUserData=null,T3Gv.opt.stampHCenter=!1,T3Gv.opt.stampVCenter=!1,T3Gv.opt.stampShapeOffsetX=0,T3Gv.opt.stampShapeOffsetY=0,LMEvtUtil.LMStampPostRelease(!0),s||i.push(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,UIUtil.SetModalOperation(OptConstant.OptTypes.None),LogUtil.Debug("O.Opt StampTextObjectOnTapDone - Output:",{stampedShapeId:T3Gv.opt.actionStoredObjectId,objectIdsToSelect:i})}static StampNewTextShapeOnTap(t,e,i,n,s,a,o){LogUtil.Debug("O.Opt StampNewTextShapeOnTap - Input:",{shape:t,hCenter:e,vCenter:i,operation:n,isSticky:s,completeCallback:a,completeUserData:o}),UIUtil.SetModalOperation(OptConstant.OptTypes.StampTextOnTap),T3Gv.opt.stampCompleteCallback=a||null,T3Gv.opt.stampCompleteUserData=o||null,T3Gv.opt.stampHCenter=e,T3Gv.opt.stampVCenter=i,T3Gv.opt.stampSticky=s,T3Gv.opt.drawShape=t,SelectUtil.ClearAnySelection(!1),OptCMUtil.SetEditMode(NvConstant.EditState.Text);T3Gv.opt.WorkAreaHammer.on("tap",(e=>{try{this.AddNewObject(t,n,!1);const i=LayerUtil.ActiveLayerZList(),s=i.length;T3Gv.opt.actionStoredObjectId=i[s-1],T3Gv.opt.actionSvgObject=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.actionStoredObjectId),this.StampTextObjectOnTapDone(e,n)}catch(i){throw OptCMUtil.CancelOperation(),T3Gv.opt.ExceptionCleanup(i),i}})),LMEvtUtil.LMStampPreTrack(),LogUtil.Debug("O.Opt StampNewTextShapeOnTap - Output: Completed")}static BringToFrontOf(){LogUtil.Debug("O.Opt BringToFrontOf - Input: no parameters");const t=LayerUtil.GetFrontBackLayersForSelected();t.result&&this.BringToFrontOfSpecificLayer(t.frontmostindex),LogUtil.Debug("O.Opt BringToFrontOf - Output: completed")}static BringToFrontOfSpecificLayer(t,e){LogUtil.Debug("O.Opt BringToFrontOfSpecificLayer - Input:",{targetLayerIndex:t,updateSelectedBlock:e});const i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId);let n=Utils1.DeepCopy(i.Data);if(0!==n.length){const i=T3Gv.opt.AddAssoctoList(n),s=i.length;if(0!==s){const n=LayerUtil.VisibleZList();if(n.length<1)return void LogUtil.Debug("O.Opt BringToFrontOfSpecificLayer - Output:","No visible objects found");let a=[];for(let t=0;t<s;t++){const e=i[t],s=n.indexOf(e);a.push(s)}a.sort(((t,e)=>t-e));let o=[];for(let t=0;t<s;t++){const e=n[a[t]];o.push(e)}const r=LayerUtil.ZListPreserveForLayer(t);for(let t=0;t<s;t++){const e=o[t];LayerUtil.RemoveFromAllZLists(e),r.push(e)}if(HookUtil.UpdateLineHops(!0),null==e){T3Gv.stdObj.PreserveBlock(T3Gv.opt.selectObjsBlockId).Data=i}SvgUtil.RenderAllSVGObjects(),this.CompleteOperation(),LogUtil.Debug("O.Opt BringToFrontOfSpecificLayer - Output:","Operation completed")}}}static AllowGroup(t){LogUtil.Debug("O.Opt AllowGroup - Input:",t);for(const e of t){const i=ObjectUtil$1.GetObjectPtr(e,!1);if(i){if(i.flags&NvConstant.ObjFlags.Lock)return LogUtil.Debug("O.Opt AllowGroup - Output: false"),!1;for(const e of i.hooks)if(t.indexOf(e.objid)<0)return LogUtil.Debug("O.Opt AllowGroup - Output: false"),!1}}return LogUtil.Debug("O.Opt AllowGroup - Output: true"),!0}static ResetObjectDraw(){LogUtil.Debug("O.Opt ResetObjectDraw - Input: No parameters"),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,ObjectUtil$1.GetObjectPtr(T3Gv.opt.actionStoredObjectId,!0),OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),UIUtil.SetModalOperation(OptConstant.OptTypes.None),LogUtil.Debug("O.Opt ResetObjectDraw - Output: Object draw state reset")}static PostObjectDraw(t){LogUtil.Debug("O.Opt PostObjectDraw - Input:",t);let e=[],i=T3Gv.stdObj.GetObject(T3Gv.opt.actionStoredObjectId);return null!=i?(null==i.Data.Frame||i.Data.Frame.width<10&&i.Data.Frame.height<10?(ToolActUtil.Undo(!0),ObjectUtil$1.ClearFutureUndoStates()):(i.Data.sizedim.width=i.Data.Frame.width,i.Data.sizedim.height=i.Data.Frame.height,T3Gv.state.ReplaceInCurrentState(T3Gv.opt.actionStoredObjectId,i),i.Data.objecttype!==NvConstant.FNObjectTypes.FlWall&&e.push(T3Gv.opt.actionStoredObjectId),LayerUtil.IsTopMostVisibleLayer()||LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),ObjectUtil$1.AddToDirtyList(T3Gv.opt.actionStoredObjectId)),this.PostObjectDrawCommon(e,t),LogUtil.Debug("O.Opt PostObjectDraw - Output:",e.length),e.length):(this.PostObjectDrawCommon(null,t),LogUtil.Debug("O.Opt PostObjectDraw - Output: 0"),0)}static PostObjectDrawCommon(t,e){LogUtil.Debug("O.Opt PostObjectDrawCommon - Input:",{affectedObjects:t,event:e}),this.CompleteOperation(t),this.ResetObjectDraw(),T3Gv.wallOpt.PostObjectDrawHook&&T3Gv.wallOpt.PostObjectDrawHook(e),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null,LogUtil.Debug("O.Opt PostObjectDrawCommon - Output: Operation completed")}static AddNewObject(t,e,i,n){LogUtil.Debug("O.Opt AddNewObject - Input:",{drawingObject:t,shouldStyleCopy:e,renderSelection:i,textContent:n});let s=16;if(n=n||null,null==t)throw new Error("The drawing object is null");const a=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;if(void 0===e&&(e=!0),e){t.StyleRecord=Utils1.DeepCopy(a.def.style),t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(t.StyleRecord.Line=Utils1.DeepCopy(t.StyleRecord.Border),t.TMargins=Utils1.DeepCopy(a.def.tmargins),t.TextFlags=Utils2.SetFlag(t.TextFlags,NvConstant.TextFlags.FormCR,(a.def.textflags&NvConstant.TextFlags.FormCR)>0));let e=a.def.just;"middle"!==a.def.vjust&&"center"!==a.def.vjust&&(e=a.def.vjust+"-"+a.def.just),t.TextAlign=e}T3Gv.opt.forcedotted&&t.StyleRecord&&(t.StyleRecord.Line.LinePattern=T3Gv.opt.forcedotted,T3Gv.opt.forcedotted=null),t.UpdateFrame(t.Frame),t.sizedim.width=t.Frame.width,t.sizedim.height=t.Frame.height,t.UniqueID=T3Gv.opt.uniqueId++,t.objecttype===NvConstant.FNObjectTypes.FlWall&&(s=NvConstant.LayerFlags.UseEdges),t.DataID=n?TextUtil.CreateTextBlock(t,n):-1;const o=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.BaseDrawObject,t);if(null==o)throw new Error("AddNewObject got a null new graphics block allocation");LayerUtil.ZListPreserve(s).push(o.ID);const r=t instanceof Instance.Shape.BaseLine;ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);return LayerUtil.IsTopMostVisibleLayer()||r?SvgUtil.RenderLastSVGObject(i):(SvgUtil.RenderLastSVGObject(i),LayerUtil.MarkAllAllVisibleHigherLayerObjectsDirty(),SvgUtil.RenderDirtySVGObjectsNoSetMouse()),T3Gv.opt.actionBBox=Utils1.DeepCopy(t.Frame),T3Gv.opt.dragEnclosingRect=t.GetDragR(),LogUtil.Debug("O.Opt AddNewObject - Output:",o.ID),o.ID}static DragDuplicate(t){if(LogUtil.Debug("O.Opt DragDuplicate - Input:",t),null==t)return LogUtil.Debug("O.Opt DragDuplicate - Output: false (null event)"),!1;let e=t.ctrlKey;if(t.gesture&&t.gesture.srcEvent&&(e=t.gesture.srcEvent.ctrlKey),e){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1);t&&t.datasetElemID>=0&&(e=!1)}return LogUtil.Debug("O.Opt DragDuplicate - Output:",e),e}static CheckDragIsOverCustomLibrary(t){return!1}static AutoScrollCommon(t,e,i){let n,s;LogUtil.Debug("O.Opt AutoScrollCommon - Input:",{event:t,snapEnabled:e,callback:i});let a=!1;T3Gv.opt.OverrideSnaps(t)&&(e=!1),t.gesture?(n=t.gesture.center.clientX,s=t.gesture.center.clientY):(n=t.clientX,s=t.clientY);let o=n,r=s;const l=T3Gv.opt.svgDoc.docInfo,h=l.dispX,c=l.dispY,u=l.dispWidth,d=l.dispHeight;if(n>=h+u-8&&(a=!0,o=h+u-8+32),n<h&&(a=!0,o=h-32),s>=c+d-8&&(a=!0,r=c+d-8+32),s<c&&(a=!0,r=c-32),a){if(e&&T3Gv.docUtil.docConfig.enableSnap){let t={x:o,y:r};t=T3Gv.docUtil.SnapToGrid(t),o=t.x,r=t.y}return T3Gv.opt.autoScrollXPos=o,T3Gv.opt.autoScrollYPos=r,-1!==T3Gv.opt.autoScrollTimerId?(LogUtil.Debug("O.Opt AutoScrollCommon - Output: Auto scroll already scheduled"),!1):(T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout(i,0),LogUtil.Debug("O.Opt AutoScrollCommon - Output: Auto scroll timer set",{newX:o,newY:r}),!1)}return DrawUtil.ResetAutoScrollTimer(),LogUtil.Debug("O.Opt AutoScrollCommon - Output: No auto scroll needed, timer reset"),!0}static ResetAutoScrollTimer(){LogUtil.Debug("O.Opt ResetAutoScrollTimer - Input:"),-1!==T3Gv.opt.autoScrollTimerId&&(T3Gv.opt.autoScrollTimer.clearTimeout(T3Gv.opt.autoScrollTimerId),T3Gv.opt.autoScrollTimerId=-1),LogUtil.Debug("O.Opt ResetAutoScrollTimer - Output: Timer reset")}static DoAutoGrowDrag(t){LogUtil.Debug("O.Opt DoAutoGrowDrag - Input:",t),t.x<0&&(t.x=0),t.y<0&&(t.y=0);let e=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto)return t.x>e.dim.x&&(t.x=e.dim.x),t.y>e.dim.y&&(t.y=e.dim.y),LogUtil.Debug("O.Opt DoAutoGrowDrag - Output:",t),t;{let i;return t.x>e.dim.x?(T3Gv.opt.dragGotAutoResizeOldX.push(e.dim.x),e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:e.dim.x+T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),y:e.dim.y},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.x+=T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,T3Gv.opt.dragGotAutoResizeRight=!0):T3Gv.opt.dragGotAutoResizeRight&&t.x<T3Gv.opt.dragGotAutoResizeOldX.slice(-1).pop()&&(e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:T3Gv.opt.dragGotAutoResizeOldX.pop(),y:e.dim.y},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.x=i.x,T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,0===T3Gv.opt.dragGotAutoResizeOldX.length&&(T3Gv.opt.dragGotAutoResizeRight=!1)),t.y>e.dim.y?(T3Gv.opt.dragGotAutoResizeOldY.push(e.dim.y),e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:e.dim.x,y:e.dim.y+T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom)},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.y+=T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom),T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,T3Gv.opt.dragGotAutoResizeBottom=!0):T3Gv.opt.dragGotAutoResizeBottom&&t.y<T3Gv.opt.dragGotAutoResizeOldY.slice(-1).pop()&&(e=T3Gv.stdObj.PreserveBlock(T3Gv.opt.sdDataBlockId).Data,i={x:e.dim.x,y:T3Gv.opt.dragGotAutoResizeOldY.pop()},T3Gv.opt.UpdateEdgeLayers([],e.dim,i),e.dim.y=i.y,T3Gv.opt.inAutoScroll=!0,UIUtil.ResizeSVGDocument(),T3Gv.opt.inAutoScroll=!1,0===T3Gv.opt.dragGotAutoResizeOldY.length&&(T3Gv.opt.dragGotAutoResizeBottom=!1)),LogUtil.Debug("O.Opt DoAutoGrowDrag - Output:",t),t}}static CompleteOperation(t,e,i,n){LogUtil.Debug("= u.DrawUtil: CompleteOperation - Input:",{objectIdsToSelect:t,preserveUndoState:e,fitOption:i,unusedParameter:n}),SvgUtil.HideAllSVGSelectionStates(),DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null,T3Gv.opt.UpdateLinks(),HookUtil.UpdateLineHops(!0),SvgUtil.RenderDirtySVGObjects(),UIUtil.FitDocumentWorkArea(!1,!1,!1,i),t?SelectUtil.SelectObjects(t,!1,!0):SvgUtil.RenderAllSVGSelectionStates(),e||ObjectUtil$1.PreserveUndoState(!1),ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),T3Gv.docUtil.ShowCoordinates(!0),T3Gv.opt.lastOpDuplicate=!1,T3Gv.opt.ScrollObjectIntoView(-1,!1),T3Clipboard&&T3Clipboard.FocusOnClipboardInput&&T3Clipboard.FocusOnClipboardInput(),this.UpdateAppStateV2Frame(),LogUtil.Debug("O.Opt CompleteOperation - Output: Operation completed.")}static AllowSnapToShapes(){LogUtil.Debug("O.Opt AllowSnapToShapes - Input: No parameters"),ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const t=T3Gv.docUtil.docConfig.snapToShapes;return LogUtil.Debug("O.Opt AllowSnapToShapes - Output:",t),t}static GetSelectObjectCoords(){let t=SelectUtil.GetTargetSelect();var e=ObjectUtil$1.GetObjectPtr(t,!1);if(null==e)return null;var i=e.GetDimensionsForDisplay();return i.rotate=e.RotationAngle,i}static UpdateAppStateV2Frame(){var t=this.GetSelectObjectCoords();null!=t&&(QuasarUtil.UpdateCurrentObjectPos(t),EvtOpt.toolOpt.SaveAct(),LogUtil.Debug("= U.UIUtil QuasarUtil.UpdateCurrentObjectPos",!0,t,t.x,t.y,t.width,t.height))}static ClearDrawArea(){T3Gv.opt.CloseEdit(!0),LayerUtil.ClearSVGHighlightLayer(),LayerUtil.ClearSVGOverlayLayer(),LayerUtil.ClearSVGObjectLayer(),ObjectUtil$1.ClearDirtyList(),SelectUtil.ClearAnySelection(!0),UIUtil.SetBackgroundColor(),LogUtil.Info("= u.DrawUtil: ClearDrawArea, Draw area cleared and background color set.")}}class DSUtil{static GetImageDir(t){var e=0;switch(t){case"image/jpeg":e=StyleConstant.ImageDir.Jpg;break;case"image/png":e=StyleConstant.ImageDir.Png;break;case"image/svg+xml":e=StyleConstant.ImageDir.Svg;break;case"image/wmf":e=StyleConstant.ImageDir.Meta}return e}}class OptCMUtil{static GetClipboardType(){LogUtil.Debug("O.Opt GetClipboardType - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);let e;T3Gv.clipboard.Get();const i=-1!==t.theActiveTextEditObjectID,n=T3Gv.opt.bInNoteEdit;return e=i||n?T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text?T3Constant.ClipboardType.Text:T3Constant.ClipboardType.None:T3Gv.opt.header.ClipboardBuffer&&T3Gv.opt.header.ClipboardType===T3Constant.ClipboardType.LM?T3Constant.ClipboardType.LM:SelectUtil.GetTargetSelect()>=0&&T3Gv.opt.textClipboard&&T3Gv.opt.textClipboard.text?T3Constant.ClipboardType.Text:T3Constant.ClipboardType.None,LogUtil.Debug("O.Opt GetClipboardType - Output:",e),e}static PixelstoPoints(t){return Math.floor(100*t/72+.5)}static SetLinkFlag(t,e){LogUtil.Debug("O.Opt SetLinkFlag - Input:",{targetId:t,flagValue:e});const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1);if(null==i)return LogUtil.Debug("O.Opt SetLinkFlag - Output: 1 (links not found)"),1;let n=this.FindLink(i,t,!0);if(n>=0){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!0),s=ObjectUtil$1.GetObjectPtr(t,!0);if(null==s)return LogUtil.Debug("O.Opt SetLinkFlag - Output: 1 (target object not found)"),1;for(s.ChangeTarget(t,null,null,null,null,!1);n<i.length&&i[n].targetid==t;)i[n].flags=Utils2.SetFlag(i[n].flags,e,!0),n++}return LogUtil.Debug("O.Opt SetLinkFlag - Output: 0 (success)"),0}static FindLink(t,e,i){if(LogUtil.Debug("O.Opt FindLink - Input:",{links:t,targetId:e,exactMatchOnly:i}),0===t.length){const t=i?-1:0;return LogUtil.Debug("O.Opt FindLink - Output (empty links):",t),t}for(let s=0;s<t.length;s++){if(t[s].targetid===e)return LogUtil.Debug("O.Opt FindLink - Output (exact match):",s),s;if(!i&&t[s].targetid>e)return LogUtil.Debug("O.Opt FindLink - Output (insertion point):",s),s}const n=i?-1:t.length;return LogUtil.Debug("O.Opt FindLink - Output (no match):",n),n}static SetEditMode(t,e,i,n){LogUtil.Debug("O.Opt SetEditMode - Input:",{stateMode:t,cursorType:e,shouldAddToList:i,preserveExisting:n});let s=e;if(T3Gv.opt.editModeList&&(i||n)||(T3Gv.opt.editModeList=[]),T3Gv.wallOpt&&T3Gv.wallOpt.NotifySetEditMode&&T3Gv.wallOpt.NotifySetEditMode(t),!s)switch(t){case NvConstant.EditState.Stamp:s=CursorConstant.CursorType.Stamp;break;case NvConstant.EditState.Text:s=CursorConstant.CursorType.Text;break;case NvConstant.EditState.FormatPaint:s=CursorConstant.CursorType.Paint;break;case NvConstant.EditState.LinkConnect:s=CursorConstant.CursorType.Anchor;break;case NvConstant.EditState.LinkJoin:s=CursorConstant.CursorType.EditClose;break;case NvConstant.EditState.Edit:s=CursorConstant.CursorType.Edit;break;case NvConstant.EditState.DragControl:s=CursorConstant.CursorType.NeswResize;break;case NvConstant.EditState.DragShape:s=CursorConstant.CursorType.Move;break;case NvConstant.EditState.Grab:s=CursorConstant.CursorType.Grab;break;default:s=CursorConstant.CursorType.Default}if(T3Gv.opt.svgDoc.SetCursor(s),i||!T3Gv.opt.editModeList.length?T3Gv.opt.editModeList.push({mode:t,cursor:s}):(T3Gv.opt.editModeList[T3Gv.opt.editModeList.length-1].mode=t,T3Gv.opt.editModeList[T3Gv.opt.editModeList.length-1].cursor=s),T3Gv.opt.curHiliteShape>=0){const t=T3Gv.stdObj.GetObject(T3Gv.opt.curHiliteShape);t&&t.Data.SetCursors()}LogUtil.Debug("O.Opt SetEditMode - Output:",{mode:t,cursor:s})}static CancelOperation(t){switch(LogUtil.Debug("O.Opt CancelOperation - Input: crtOpt =",T3Gv.opt.crtOpt),T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:break;case OptConstant.OptTypes.Stamp:DrawUtil.CancelObjectStamp(!0);break;case OptConstant.OptTypes.StampTextOnTap:DrawUtil.CancelObjectStampTextOnTap(!0);break;case OptConstant.OptTypes.DragDrop:DrawUtil.CancelObjectDragDrop(!0);break;case OptConstant.OptTypes.Draw:DrawUtil.CancelObjectDraw();break;case OptConstant.OptTypes.FormatPainter:UIUtil.SetFormatPainter(!0,!1);break;case OptConstant.OptTypes.AddCorner:T3Gv.wallOpt&&T3Gv.wallOpt.AddCorner&&this.ResetHammerGesture("dragstart",T3Gv.wallOpt.AddCorner,T3Gv.Evt_ShapeDragStart)}LogUtil.Debug("O.Opt CancelOperation - Output: completed")}static ResetHammerGesture(t,e,i){LogUtil.Debug("O.Opt ResetHammerGesture - Input:",{eventType:t,currentHandler:e,newHandler:i});const n=LayerUtil.ActiveVisibleZList();for(let s=0;s<n.length;s++){const a=T3Gv.opt.svgObjectLayer.GetElementByID(n[s]).svgObj.SDGObj.GetEventProxy();let o=!1;for(let t=0;t<a.eventHandlers.length;t++)if(a.eventHandlers[t].handler===e){o=!0;break}o&&a.on(t,i)}LogUtil.Debug("O.Opt ResetHammerGesture - Output: Hammer gestures reset")}static RebuildURLs(t,e){let i,n,s,a,o,r,l,h;if(LogUtil.Debug("O.Opt RebuildURLs - Input:",{stateId:t,isNextState:e}),e)for(i=T3Gv.state.states[t+1].storedObjects.length,n=0;n<i;n++)s=T3Gv.state.states[t+1].storedObjects[n],s.Type===StateConstant.StoredObjectType.BaseDrawObject&&s.stateOptTypeId===StateConstant.StateOperationType.CREATE&&(o=s.Data,this.IsBlobURL(o.ImageURL)&&(a=T3Gv.stdObj.GetObject(s.ID),a&&(o=a.Data,r=o.GetBlobBytes(),l=DSUtil.GetImageBlobType(r.ImageDir),o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l))));for(i=T3Gv.state.states[t].storedObjects.length,n=0;n<i;n++)s=T3Gv.state.states[t].storedObjects[n],s.Type===StateConstant.StoredObjectType.BaseDrawObject&&(s.stateOptTypeId===StateConstant.StateOperationType.DELETE?e||(a=T3Gv.stdObj.GetObject(s.ID),a&&(o=a.Data,o.BlobBytesID>=0&&this.IsBlobURL(o.ImageURL)&&(r=o.GetBlobBytes(),l=DSUtil.GetImageBlobType(r.ImageDir),o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l)))):(h=s.Data,a=T3Gv.stdObj.GetObject(s.ID),this.IsBlobURL(h.ImageURL)?a?(o=a.Data,h.ImageURL!==o.ImageURL&&(this.DeleteURL(h.ImageURL),this.IsBlobURL(o.ImageURL)&&(r=o.GetBlobBytes(),r&&(l=DSUtil.GetImageBlobType(r.ImageDir),this.IsBlobURL(o.ImageURL)&&(o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l)))))):this.DeleteURL(h.ImageURL):a&&(o=a.Data,this.IsBlobURL(o.ImageURL)&&(r=o.GetBlobBytes(),r&&(l=DSUtil.GetImageBlobType(r.ImageDir),this.IsBlobURL(o.ImageURL)&&(o.ImageURL=DSUtil.MakeURL(null,r.Bytes,l)))))));LogUtil.Debug("O.Opt RebuildURLs - Output: URLs rebuilt for state:",t)}static IsBlobURL(t){LogUtil.Debug("O.Opt IsBlobURL - Input:",t);const e=!!(t&&t.length>0&&"blob:"===t.substring(0,5));return LogUtil.Debug("O.Opt IsBlobURL - Output:",e),e}static ShapeToPolyLine(t,e,i,n){let s,a,o,r=!1;const l=[];let h={};if(n)s=n,r=!0,h=Utils1.DeepCopy(s.Frame);else{s=ObjectUtil$1.GetObjectPtr(t,!1),null==s.polylist?(s.polylist=s.GetPolyList(),s.StartPoint={},s.EndPoint={}):r=!0;const e=T3Gv.stdObj.PreserveBlock(t);if(null==e)return;s=e.Data,h=Utils1.DeepCopy(s.Frame)}if(r){if(!s.polylist)return null;if(T3Gv.opt.GetClosedPolyDim(s),!Utils2.IsEqual(s.polylist.dim.x,h.width)){const t=Utils2.DeepCopy(s);t.inside=Utils1.DeepCopy(s.Frame),Instance.Shape.PolyLine.prototype.ScaleObject.call(t,0,0,0,0,0,0),s.polylist=t.polylist}}return o=s.polylist.segs.length,s.StartPoint.x=s.Frame.x+s.polylist.segs[0].pt.x+s.polylist.offset.x,s.StartPoint.y=s.Frame.y+s.polylist.segs[0].pt.y+s.polylist.offset.y,s.EndPoint.x=s.Frame.x+s.polylist.segs[o-1].pt.x+s.polylist.offset.x,s.EndPoint.y=s.Frame.y+s.polylist.segs[o-1].pt.y+s.polylist.offset.y,a=e?new Instance.Shape.PolyLineContainer(s):new Instance.Shape.PolyLine(s),a.BlockID=s.BlockID,a.polylist.Shape_Rotation=s.RotationAngle,a.polylist.Shape_DataID=s.DataID,a.RotationAngle=0,a.DataID=-1,n||(preservedBlock.Data=a),i||(ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects(),l.push(t),SelectUtil.SelectObjects(l,!1,!0)),a.inside=Utils1.DeepCopy(s.Frame),a}static PutInFrontofObject(t,e){const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0),n=i.layers[i.activelayer].zList,s=n.indexOf(t),a=n.indexOf(e);if(!(s<0||a<0))if(a<s){for(let t=a;t<s;t++)n[t]=n[t+1],ObjectUtil$1.AddToDirtyList(n[t]);n[s]=e,ObjectUtil$1.AddToDirtyList(e)}else{for(let t=a;t>s+1;t--)n[t]=n[t-1],ObjectUtil$1.AddToDirtyList(n[t]);n[s+1]=e,ObjectUtil$1.AddToDirtyList(e)}}static InsertHops(t,e,i){let n,s,a,o,r,l,h,c,u,d,p=new Point$1,g=new Point$1,f=new Point$1,m=new Point$1,v=[];const b=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);c=b.hopdim.x,u=b.hopdim.y;for(n=t.hoplist.nhops-1;n>=0;n--)if(!t.hoplist.hops[n].cons){for(s=t.hoplist.hops[n].segment,a=n,l=n;a>0&&t.hoplist.hops[a-1].cons;)s=t.hoplist.hops[a-1].segment,l=a-1,a--;if(s>=i)return{bSuccess:!1,npts:i};if(d=this.InsertPoints(e,i,s,2),i=d.npts,d.bSuccess){if(e[s]={x:t.hoplist.hops[l].pt.x,y:t.hoplist.hops[l].pt.y},e[s+1]={x:t.hoplist.hops[n].pt.x,y:t.hoplist.hops[n].pt.y},s<s){for(o=s;o<i;o++)e[s+o-s]={x:e[o].x,y:e[o].y};i-=s-s}if(r=s+1,o=h=s+1,d=this.PolyTrimForArrow(e,0,h,c,c,p,g,!1),h=d.npts,p=d.spt,g=d.ept,h<o){for(;o<i;o++)e[h+o-o]={x:e[o].x,y:e[o].y};i-=o-h,r-=o-h}if(f={x:p.x,y:p.y},o=h=i-r,d=this.PolyTrimForArrow(e,r,h,c,c,p,g,!0),h=d.npts,p=d.spt,h<o&&(i-=o-h),m={x:(g=d.ept).x,y:g.y},d=this.BuildHop(b.hopstyle,u,f,m,h),v=d.pts,h=d.npts,d=this.InsertPoints(e,i,h,h),i=d.npts,d.bSuccess)for(o=0;o<h;o++)e[h+o]={x:v[o].x,y:v[o].y}}}return{bSuccess:!0,npts:i}}static PolyTrimForArrow(t,e,i,n,s,a,o,r){let l=new Point$1,h={findpt:l,npts:i},c={spt:{},ept:{},pts:[],npts:0};return h=this.PolyFindLength(t,e,i,s,r,!1,l),l=h.findpt,i=h.npts,r?(c.spt={x:t[e].x,y:t[e].y},c.ept={x:l.x,y:l.y}):(c.ept={x:t[e+i-1].x,y:t[e+i-1].y},c.spt={x:l.x,y:l.y}),h=this.PolyFindLength(t,e,i,n,r,!0,l),l=h.findpt,i=h.npts,c.pts=h.pts,c.npts=i,c}static InsertPoints(t,e,i,n){if(e+n>OptConstant.Common.MaxPolyPoints)return{bSuccess:!1,npts:e};for(let s=0;s<n;++s){const e=new Point$1;t.push(e)}for(let s=e-1;s>=i;s--)t[s+n]={x:t[s].x,y:t[s].y};e+=n;for(let s=i;s<i+n;s++)t[s]={x:s-i,y:s-i};return{bSuccess:!0,npts:e}}static GetEditMode(){LogUtil.Debug("= O.Opt GetEditMode - Input");const t=T3Gv.opt.editModeList||[];let e=NvConstant.EditState.Default;return t.length&&(e=t[t.length-1].mode),LogUtil.Debug("= O.Opt GetEditMode - Output:",e),e}static DeleteURL(t){const e=window.URL||window.webkitURL;e&&e.revokeObjectURL&&e.revokeObjectURL(t)}}class UIUtil{static ShowContextMenu(t,e,i){LogUtil.Debug("= u.UIUtil: ShowContextMenu - Input:",{isShow:t,from:e,type:i}),QuasarUtil.ShowContextMenu(t,e,i)}static ShowObjectConfig(t){QuasarUtil.ShowObjectConfig(t)}static ShowFrame(t){LogUtil.Debug("= U.UIUtil: ShowFrame - Input:",{isShowFrame:t});T3Gv.docUtil.docConfig.showRulers?LogUtil.Debug("= U.UIUtil: ShowFrame - Output: Frame visibility set to",t):LogUtil.Debug("= U.UIUtil: ShowFrame - Output: Rulers are not shown")}static UpdateDisplayCoordinates(t,e,i,n){var s,a;if(T3Gv.docUtil.docConfig.showRulers){let i=0,l=0;const h=T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units===NvConstant.RulerUnit.Feet;if(h&&(i=l=NvConstant.DimensionFlags.ShowFractionalInches,n&&(l=Utils2.SetFlag(i,NvConstant.DimensionFlags.ShowFeetAsInches,(n.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches)>0))),t){const e=RulerUtil.GetLengthInRulerUnits(t.x,!1,T3Gv.docUtil.rulerConfig.originx,i),n=RulerUtil.GetLengthInRulerUnits(t.y,!1,T3Gv.docUtil.rulerConfig.originy,i),s=RulerUtil.GetLengthInRulerUnits(t.width,!1,null,l),a=RulerUtil.GetLengthInRulerUnits(t.height,!1,null,l);LogUtil.Debug("= U.UIUtil: Formatted Values: Origin x,y,w,h",e,n,s,a),LogUtil.Debug("= U.UIUtil: Formatted Values: Dimension x,y,w,h",t.x,t.y,t.width,t.height);const c=r(o(e,h)),u=r(o(n,h)),d=r(o(s,h)),p=r(o(a,h));LogUtil.Debug("= U.UIUtil: Formatted Values: After x,y,w,h",c,u,d,p),t.x,t.y,t.width,t.height}if(e){e.x=Math.max(0,e.x),e.y=Math.max(0,e.y);const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);e.x=Math.min(null==(s=null==t?void 0:t.dim)?void 0:s.x,null==e?void 0:e.x),e.y=Math.min(null==(a=null==t?void 0:t.dim)?void 0:a.y,null==e?void 0:e.y)}}function o(t,e){let i=t,n=2;if(n=T3Gv.docUtil.rulerConfig.dp,e)return t;if(T3Gv.docUtil.rulerConfig.showpixels)return t.toFixed(0);if(null!=t.toFixed&&(i=t.toFixed(n)),e){const t=i.indexOf('"'),e=i.indexOf("'");if(t<0)i+="    ";else for(let n=e-t;n<4;n++)i+=" ";for(let n=e;n<4;n++)i+=" "}else{let t=i.indexOf(".");if(t<0&&(i+=".",t=i.length-1),t>=0){for(let e=n,s=i.length-t-1;e<s;e++)i+="0";for(let e=t;e<4;e++)i+=" "}}return i}function r(t){const e=t.length;let i=t.trim();for(let n=i.length;n<e;n++)i+=" ";return i}LogUtil.Debug("= U.UIUtil: UpdateDisplayCoordinates - Output: Coordinates updated in UI")}static ShowXY(t){}static GetDocDirtyState(){LogUtil.Debug("= U.UIUtil: GetDocDirtyState - Input: no parameters");const t=T3Gv.opt.header.DocIsDirty;return LogUtil.Debug("= U.UIUtil: GetDocDirtyState - Output:",t),t}static SetDocDirtyState(t,e){LogUtil.Debug("= U.UIUtil: SetDocDirtyState - Input:",{isDirty:t,allowReplaceWhenClean:e}),T3Gv.opt.header.DocIsDirty=t,t?T3Gv.opt.header.AllowReplace=!1:!0===e&&(T3Gv.opt.header.AllowReplace=!0),LogUtil.Debug("= U.UIUtil: SetDocDirtyState - Output: Document dirty state set to",t)}static SetFormatPainter(t,e){let i,n;if(LogUtil.Debug("= U.UIUtil: SetFormatPainter - Input:",{shouldDisable:t,makeSticky:e}),T3Gv.opt.crtOpt===OptConstant.OptTypes.FormatPainter)return T3Gv.opt.crtOpt=OptConstant.OptTypes.None,OptCMUtil.SetEditMode(NvConstant.EditState.Default),T3Gv.opt.formatPainterSticky=!1,void LogUtil.Debug("= U.UIUtil: SetFormatPainter - Output: Format painter disabled");if(!t){OptCMUtil.CancelOperation();if(null!=TextUtil.GetActiveTextEdit()){T3Gv.opt.crtOpt=OptConstant.OptTypes.FormatPainter,T3Gv.opt.formatPainterMode=StyleConstant.FormatPainterModes.Text,T3Gv.opt.formatPainterSticky=e;const t=T3Gv.opt.svgDoc.GetActiveEdit();t&&(T3Gv.opt.formatPainterText=t.GetSelectedFormat(),T3Gv.opt.formatPainterStyle={StyleRecord:{}},T3Gv.opt.formatPainterStyle.Text=new TextFmtData,TextUtil.TextStyleToText(T3Gv.opt.formatPainterStyle.Text,T3Gv.opt.formatPainterText),OptCMUtil.SetEditMode(NvConstant.EditState.FormatPaint))}else(i=SelectUtil.GetTargetSelect())>=0&&(n=ObjectUtil$1.GetObjectPtr(i,!1))&&(T3Gv.opt.crtOpt=OptConstant.OptTypes.FormatPainter,T3Gv.opt.formatPainterSticky=e,T3Gv.opt.formatPainterMode=StyleConstant.FormatPainterModes.Object,T3Gv.opt.formatPainterStyle=Utils1.DeepCopy(n.StyleRecord),T3Gv.opt.formatPainterStyle.Border=Utils1.DeepCopy(n.StyleRecord.Line),!(n.ImageURL||n.SymbolURL||n instanceof Instance.Shape.GroupSymbol)||n instanceof Instance.Shape.SvgSymbol||(delete T3Gv.opt.formatPainterStyle.Fill,delete T3Gv.opt.formatPainterStyle.Name,(0===n.StyleRecord.Line.Thickness||n instanceof Instance.Shape.GroupSymbol)&&(delete T3Gv.opt.formatPainterStyle.Line,delete T3Gv.opt.formatPainterStyle.Border)),T3Gv.opt.formatPainterText=n.GetTextFormat(!1,null),null===T3Gv.opt.formatPainterText&&(T3Gv.opt.formatPainterText=TextUtil.CalcDefaultInitialTextStyle(T3Gv.opt.formatPainterStyle.Text)),T3Gv.opt.formatPainterParaFormat=n.GetTextParaFormat(!1),T3Gv.opt.formatPainterArrows=n.GetArrowheadFormat(),OptCMUtil.SetEditMode(NvConstant.EditState.FormatPaint))}LogUtil.Debug("= U.UIUtil: SetFormatPainter - Output:",{mode:T3Gv.opt.formatPainterMode,isSticky:T3Gv.opt.formatPainterSticky,crtOpt:T3Gv.opt.crtOpt})}static InitSvgDocument(t=!1){const e=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;LogUtil.Debug("InitSvgDoc dim from T3Gv.stdObj without load storage data",T3Gv.opt.sdDataBlockId,T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data);const i=DataOpt.GetSDDataDimensions(),n=null==i||0===i.x&&0===i.y;LogUtil.Debug("InitSvgDoc dim from storage data",i);const s=this.GetScreenDimensions();e.dim.x=n?s.width:i.x,e.dim.y=n?s.height:i.y,LogUtil.Debug("InitSvgDoc set the block data with previous dim",T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data);var a=e.dim.x,o=e.dim.y;const r={svgAreaId:T3Gv.opt.svgDocId,documentWidth:a,documentHeight:o,documentDPI:100};T3Gv.docUtil.InitializeWorkArea(r,t)}static InitT3GvOpt(){T3Gv.opt.svgDoc=T3Gv.docUtil.DocObject(),T3Gv.opt.svgObjectLayer=T3Gv.opt.svgDoc.AddLayer("svg-object-layer"),T3Gv.opt.svgDoc.SetDocumentLayer("svg-object-layer"),T3Gv.opt.svgOverlayLayer=T3Gv.opt.svgDoc.AddLayer("svg-overlay-layer"),T3Gv.opt.svgOverlayLayer.ExcludeFromExport(!0),T3Gv.opt.svgHighlightLayer=T3Gv.opt.svgDoc.AddLayer("svg-highlight-layer"),T3Gv.opt.svgHighlightLayer.ExcludeFromExport(!0),T3Gv.opt.svgCollabLayer=T3Gv.opt.svgDoc.AddLayer("svg-collab-layer"),T3Gv.opt.svgCollabLayer.ExcludeFromExport(!0),T3Gv.opt.svgCollabLayer.AllowScaling(!1),T3Gv.opt.mainAppElement=document.getElementById("main-app"),T3Gv.opt.workAreaElement=document.getElementById("svg-area"),T3Gv.opt.documentElement=document.getElementById("document-area"),T3Gv.opt.WorkAreaHammer=new Hammer(T3Gv.opt.workAreaElement),T3Gv.opt.documentElementHammer=new Hammer(T3Gv.opt.documentElement),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),T3Gv.opt.WorkAreaHammer.on("wheel",EvtUtil.Evt_WorkAreaMouseWheel),T3Gv.opt.documentElementHammer.on("wheel",EvtUtil.Evt_WorkAreaMouseWheel),T3Gv.opt.WorkAreaHammer.on("dragstart",EvtUtil.Evt_WorkAreaHammerDragStart)}static SetModalOperation(t){LogUtil.Debug("= U.UIUtil: SetModalOperation - Input:",{operation:t}),t!==OptConstant.OptTypes.None&&T3Gv.opt.crtOpt!==OptConstant.OptTypes.None&&T3Gv.opt.crtOpt!==t&&OptCMUtil.CancelOperation(),T3Gv.opt.crtOpt=t,LogUtil.Debug("= U.UIUtil: SetModalOperation - Output:",{crtOpt:t})}static ResizeSVGDocument(){LogUtil.Debug("= U.UIUtil: ResizeSVGDocument - Input: No parameters");const t=T3Gv.stdObj.GetObject(T3Gv.opt.sdDataBlockId).Data;T3Gv.docUtil.ResizeDocument(t.dim.x,t.dim.y),LogUtil.Debug("= U.UIUtil: ResizeSVGDocument - Output: Document resized to",t.dim)}static SetBackgroundColor(){LogUtil.Debug("= U.UIUtil: SetBackgroundColor - Input:",{});const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),e=T3Gv.docUtil.GetBackground();if(t&&e){const i=t.background.Paint;if(i.FillType===NvConstant.FillTypes.Solid)i.Color===NvConstant.Colors.White||0===i.Opacity?e.SetFillColor("none"):e.SetFillColor(i.Color);else if(i.FillType===NvConstant.FillTypes.Gradient){const t=new Instance.Shape.BaseShape;e.SetGradientFill(t.CreateGradientRecord(i.GradientFlags,i.Color,i.Opacity,i.EndColor,i.EndOpacity))}else if(i.FillType===NvConstant.FillTypes.RichGradient){const t=new Instance.Shape.BaseShape;e.SetGradientFill(t.CreateRichGradientRecord(i.GradientFlags))}else i.FillType===NvConstant.FillTypes.Texture?(i.TextureScale.AlignmentScalar,i.Texture):e.SetFillColor("none");e.ExcludeFromExport(this.GetBackgroundTransparent())}const i=LayerUtil.VisibleZList();for(let n=0,s=i.length;n<s;n++){const t=i[n],e=ObjectUtil$1.GetObjectPtr(t,!1);e&&e.DataID>=0&&ObjectUtil$1.AddToDirtyList(t)}LogUtil.Debug("= U.UIUtil: SetBackgroundColor - Output:",{})}static GetBackgroundTransparent(){LogUtil.Debug("= U.UIUtil: GetBackgroundTransparent - Input: no parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),e=T3Gv.docUtil.GetBackground();let i=!0;if(t&&e){const e=t.background.Paint;switch(e.FillType){case NvConstant.FillTypes.Solid:i=e.Color===NvConstant.Colors.White||0===e.Opacity;break;case NvConstant.FillTypes.Gradient:case NvConstant.FillTypes.RichGradient:case NvConstant.FillTypes.Texture:i=!1;break;default:i=!0}}return LogUtil.Debug("= U.UIUtil: GetBackgroundTransparent - Output:",i),i}static SetDocumentScale(t,e){LogUtil.Debug("= u.UIUtil: SetDocumentScale/ input",{scaleFactor:t,skipCentering:e}),T3Gv.opt.svgDoc&&T3Gv.docUtil.SetZoomFactor(t,e)}static UpdateDocumentScale(){if(LogUtil.Debug("= U.UIUtil: UpdateDocumentScale: input"),T3Gv.opt.svgDoc){T3Gv.opt.svgDoc.GetActiveEdit()||(SvgUtil.HideAllSVGSelectionStates(),SvgUtil.RenderAllSVGSelectionStates())}}static IsPlanningDocument(){return!1}static GetUIAdaptation(t){LogUtil.Debug("= U.UIUtil: GetUIAdaptation - Input:",t);let e=!1;return t.gesture?"onpointerdown"in window?t.gesture.srcEvent instanceof PointerEvent&&"touch"==t.gesture.srcEvent.pointerType&&(e=!0):"ontouchstart"in window&&-1!=t.gesture.srcEvent.type.indexOf("touch")?e=!0:"mousedown"==t.gesture.srcEvent.type&&(e=!1):"onpointerdown"in window?t instanceof PointerEvent&&"touch"==t.pointerType&&(e=!0):"ontouchstart"in window&&-1!=t.type.indexOf("touch")?e=!0:"mousedown"==t.type&&(e=!1),LogUtil.Debug("= U.UIUtil: GetUIAdaptation - Output:",e),e}static FitDocumentWorkArea(t,e,i,n){let s,a,o,r,l;LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Input:",{preserveState:t,forceFlag:e,allowOverride:i,fitOptions:n});let h=!1,c=!1,u=!1,d=!1;if(!T3Gv.opt)return;const p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);for(p.layers[p.activelayer].flags&NvConstant.LayerFlags.UseEdges&&(h=!0,r=p.layers[p.activelayer].flags&NvConstant.LayerFlags.Visible),o=p.nlayers,a=0;a<o;a++)if(p.layers[a].flags&NvConstant.LayerFlags.UseEdges&&p.layers[a].flags&NvConstant.LayerFlags.Visible||h){c=!0;break}let g,f;s=T3Gv.opt.CalcAllObjectEnclosingRect(c&&!h,n);let m=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),v=T3Gv.opt.header.Page.papersize,b=T3Gv.opt.header.Page.margins,y=v.x-(b.left+b.right),S=v.y-(b.top+b.bottom),x={x:0,y:0};if(s.x<0&&(s.x=0),s.y<0&&(s.y=0),g=Math.floor(s.x+s.width),f=Math.floor(s.y+s.height),c&&!h&&(f<T3Gv.opt.header.Page.minsize.y&&(f=T3Gv.opt.header.Page.minsize.y,u=!0),g<T3Gv.opt.header.Page.minsize.x&&(g=T3Gv.opt.header.Page.minsize.x,d=!0)),T3Gv.opt.header.flags&OptConstant.HeaderFlags.Pages&&!h){let t,i,n=Math.ceil(g/y),s=Math.ceil(f/S);if(n<1&&(n=1),s<1&&(s=1),c?(t=Math.ceil(m.dim.x/y),i=Math.ceil(m.dim.y/S)):(t=Math.round(m.dim.x/y),i=Math.round(m.dim.y/S)),t<1&&(t=1),i<1&&(i=1),g<=m.dim.x&&f<=m.dim.y&&!e&&n>=t&&s>=i&&1===t&&1===i)return void LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Output: No resize needed");x={x:n*y,y:s*S},d&&(x.x=g),u&&(x.y=f),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&(x.x<m.dim.x&&(x.x=m.dim.x),x.y<m.dim.y&&(x.y=m.dim.y))}else h&&(s.width+=12,s.height+=12),x.x=s.x+s.width,x.y=s.y+s.height,!h||Utils2.IsEqual(x.x,m.dim.x,2)&&Utils2.IsEqual(x.y,m.dim.y,2)||(r?(x.x<y&&(x.x=y),x.y<S&&(x.y=S),T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto||(T3Gv.opt.header.Page.minsize.y=x.y,T3Gv.opt.header.Page.minsize.x=x.x)):(T3Gv.opt.header.Page.minsize.x=y,T3Gv.opt.header.Page.minsize.y=S)),x.x<T3Gv.opt.header.Page.minsize.x&&(x.x=T3Gv.opt.header.Page.minsize.x),x.y<T3Gv.opt.header.Page.minsize.y&&(x.y=T3Gv.opt.header.Page.minsize.y);l=Utils2.IsEqual(x.x,m.dim.x)&&Utils2.IsEqual(x.y,m.dim.y);const w=x.x>m.dim.x||x.y>m.dim.y;if(l)T3Gv.docUtil.CheckScaleToFit()&&this.ResizeSVGDocument();else{if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto&&!i&&(!w||function(t,e,i){const n=t.x%e;return Utils2.IsEqual(n,0)}(m.dim,y))){if(w){const t=new Error("bounds error");throw t.name="1",t}return void LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Output: No resize needed (NoAuto constraint)")}let e=!0;t&&(e=!1),m=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,e),T3Gv.opt.UpdateEdgeLayers([],m.dim,x),m.dim.x=x.x,m.dim.y=x.y,this.ResizeSVGDocument()}LogUtil.Debug("= U.UIUtil: FitDocumentWorkArea - Output:",{newSize:x,documentSizeChanged:l,isGrowing:w})}static ChangeBackgroundTextColor(t,e){if(t!==e){const i=LayerUtil.ZList(),n=i.length;for(let s=0;s<n;s++){const n=ObjectUtil$1.GetObjectPtr(i[s],!1);n&&n.ChangeBackgroundColor(t,e)}}}static GetScreenDimensions(){const t={width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight};return LogUtil.Debug("= U.UIUtil: GetScreenDimensions - Output:",t),t}}class SvgUtil{static RenderAllSVGSelectionStates(){LogUtil.Debug("= U.SvgUtil: RenderAllSVGSelectionStates - Input: No parameters");const t=LayerUtil.ActiveVisibleZList(),e=t.length,i=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,n=SelectUtil.GetTargetSelect(),s=[OptConstant.SVGElementClass.DimLine,OptConstant.SVGElementClass.DimText,OptConstant.SVGElementClass.AreaDimLine,OptConstant.SVGElementClass.DimTextNoEdit],a=function(t){return function(e){return t.LMActionClick(e),!1}};for(let r=0;r<e;++r){const e=t[r],l=i.indexOf(e);if(l<0)continue;const h=ObjectUtil$1.GetObjectPtr(e,!1);if(null===h||h.flags&NvConstant.ObjFlags.NotVisible)continue;const c=T3Gv.opt.svgObjectLayer.GetElementById(e);if(null===c||null===c.GetElementById(OptConstant.SVGElementClass.Shape))continue;const u=OptConstant.Common.Action+e;let d=T3Gv.opt.svgOverlayLayer.GetElementById(u);if(null===d&&null!==(d=h.CreateActionTriggers(T3Gv.opt.svgDoc,e,c,n))){T3Gv.opt.svgOverlayLayer.AddElement(d);try{d.SetRotation(h.RotationAngle)}catch(o){throw o}const t=0==(h.flags&NvConstant.ObjFlags.Lock),e=!T3Gv.docUtil.IsReadOnly(),i=!h.NoGrow();if(t&&e&&i){const t=d.DOMElement(),e=new Hammer(t);e.on("tap",EvtUtil.Evt_ActionTriggerTap),e.on("dragstart",a(h)),d.SetEventProxy(e)}}if(h.Dimensions&NvConstant.DimensionFlags.Select)for(let t=c.ElementCount()-1;t>=1;t--){const e=c.GetElementByIndex(t),i=e.GetID();s.indexOf(i)>=0&&e.SetOpacity(l>=0?1:0)}}LogUtil.Debug("= U.SvgUtil: RenderAllSVGSelectionStates - Output: Selection states rendered")}static HideAllSVGSelectionStates(){LogUtil.Debug("= U.SvgUtil: HideAllSVGSelectionStates: input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);T3Gv.opt.SetDimensionVisibility(t,!1),T3Gv.opt.fromOverlayLayer||T3Gv.opt.svgOverlayLayer.RemoveAll(),ActionUtil.ClearAllActionArrowTimers(),LayerUtil.ShowOverlayLayer(),LogUtil.Debug("= U.SvgUtil: HideAllSVGSelectionStates: output")}static RenderDirtySVGObjects(){this.RenderDirtySVGObjectsCommon(!0)}static RenderDirtySVGObjectsCommon(t){if(LogUtil.Debug("= U.SvgUtil: RenderDirtySVGObjectsCommon - Input:",{renderSelectionStates:t}),0!==T3Gv.opt.dirtyList.length){const e=LayerUtil.VisibleZList(),i=LayerUtil.ActiveVisibleZList(),n=function(t){const e=[],i=NvConstant.ObjFlags.NotVisible;for(let n=0;n<t.length;n++){const s=ObjectUtil$1.GetObjectPtr(t[n],!1);s&&0==(s.flags&i)&&e.push(t[n])}return e}(e);T3Gv.opt.dirtyList.sort(((t,i)=>e.indexOf(t)<e.indexOf(i)?-1:1));const s=T3Gv.opt.dirtyList.length;for(let a=0;a<s;a++){let s=!1;const o=T3Gv.opt.dirtyList[a],r=T3Gv.opt.dirtyListMoveOnly[o];let l=n.indexOf(o);if(l<0&&(l=e.indexOf(o)),l>=0)if(t&&(s=-1!==i.indexOf(o)),r){const t=ObjectUtil$1.GetObjectPtr(o,!1);t&&t.MoveSVG()}else this.AddSVGObject(l,o,!0,s)}if(T3Gv.opt.dirtyListReOrder){const t=n.length;for(let e=0;e<t;e++){const t=n[e],i=T3Gv.opt.svgObjectLayer.GetElementById(t.toString());i&&(T3Gv.opt.svgObjectLayer.RemoveElement(i),T3Gv.opt.svgObjectLayer.AddElement(i,e))}}ObjectUtil$1.ClearDirtyList()}LogUtil.Debug("= U.SvgUtil: RenderDirtySVGObjectsCommon - Output: Completed rendering dirty SVG objects")}static AddSVGObject(t,e,i,n){LogUtil.Info("= U.SvgUtil: AddSVGObject - Input:",{containerElement:t,objectId:e,removeExisting:i,renderCallback:n});let s=T3Gv.opt.svgDoc,a=T3Gv.stdObj.GetObject(e);if(LogUtil.Info("= u.SvgUtil: AddSVGObject / stdObj's object: objectId,stdObj,drawingObj",e,T3Gv.stdObj,a),!a)return void LogUtil.Info("= U.SvgUtil: AddSVGObject - Output: No drawing object found.");let o,r=a.Data;r.tag=e;let l=r.CreateShape(s,n);if(l){l.SetID(e),i?(o=T3Gv.opt.svgObjectLayer.GetElementById(e),l&&T3Gv.opt.svgObjectLayer.AddElement(l,t),o&&T3Gv.opt.svgObjectLayer.RemoveElement(o)):l&&T3Gv.opt.svgObjectLayer.AddElement(l),l&&r.PostCreateShapeCallback(s,l,n);try{l.SetRotation(r.RotationAngle,r.Frame.x+r.Frame.width/2,r.Frame.y+r.Frame.height/2)}catch(h){throw LogUtil.Info("= U.SvgUtil: AddSVGObject - SetRotation error:",h),h}if(null!==l)if(n){let t=l.DOMElement(),e=new Hammer(t),i=EvtUtil.Evt_ShapeTapFactory(r);e.on("tap",i),T3Gv.docUtil.IsReadOnly()||(T3Gv.Evt_ShapeDragStart=EvtUtil.Evt_ShapeDragStartFactory(r),e.on("dragstart",T3Gv.Evt_ShapeDragStart),(r.AllowTextEdit()||r.AllowDoubleClick())&&(T3Gv.Evt_LMShapeDoubleTap=EvtUtil.Evt_ShapeDoubleTapFactory(r),e.on("doubletap",T3Gv.Evt_LMShapeDoubleTap)),l.SetEventProxy(e)),T3Gv.docUtil.IsReadOnly()||l.svgObj.mouseover((function(t){let e=this.SDGObj.GetID(),i=ObjectUtil$1.GetObjectPtr(e,!1);i&&i.SetRolloverActions(s,l,t)})),r.RegisterForDataDrop(l)}else l.SetEventBehavior(OptConstant.EventBehavior.None)}LogUtil.Info("= U.SvgUtil: AddSVGObject - Output: Completed adding SVG object for objectId",e)}static RenderAllSVGObjects(){LogUtil.Debug("= U.SvgUtil: RenderAllSVGObjects - Input: no parameters");const t=LayerUtil.VisibleZList(),e=LayerUtil.ActiveVisibleZList(),i=t.length;LayerUtil.ClearSVGHighlightLayer(),LayerUtil.ClearSVGOverlayLayer(),LayerUtil.ClearSVGObjectLayer(),UIUtil.SetBackgroundColor();for(let n=0;n<i;++n){const i=t[n],s=-1!==e.indexOf(i);SvgUtil.AddSVGObject(n,i,!1,s)}SvgUtil.RenderAllSVGSelectionStates(),ObjectUtil$1.ClearDirtyList(),LogUtil.Debug("= U.SvgUtil: RenderAllSVGObjects - Output: rendering complete")}static GetSVGDragElement(t){if(LogUtil.Debug("= U.SvgUtil: GetSVGDragElement - Input:",t),!T3Gv.opt.dragElementList||t<0||t>=T3Gv.opt.dragElementList.length)return LogUtil.Debug("= U.SvgUtil: GetSVGDragElement - Output: null (invalid index)"),null;const e=T3Gv.opt.svgObjectLayer.GetElementById(T3Gv.opt.dragElementList[t]);return LogUtil.Debug("= U.SvgUtil: GetSVGDragElement - Output:",e?"Element found":"null"),e}static ShowSVGSelectionState(t,e){LogUtil.Debug("= U.SvgUtil: ShowSVGSelectionState - Input:",{objectId:t,isSelected:e});const i=OptConstant.Common.Action+t,n=SelectUtil.GetTargetSelect();let s=T3Gv.opt.svgOverlayLayer.GetElementById(i);const a=T3Gv.opt.svgObjectLayer.GetElementById(t.toString()),o=ObjectUtil$1.GetObjectPtr(t,!1);if(null!==o){if(null===s&&e){if(s=o.CreateActionTriggers(T3Gv.opt.svgDoc,t,a,n),null!==s){T3Gv.opt.svgOverlayLayer.AddElement(s);try{s.SetRotation(o.RotationAngle)}catch(l){throw l}if(!o.NoGrow()){const t=s.DOMElement(),e=Hammer(t);e.on("tap",EvtUtil.Evt_ActionTriggerTap),e.on("dragstart",(r=o,t=>(r.LMActionClick(t),!1))),s.SetEventProxy(e)}}}else null===s||e||T3Gv.opt.svgOverlayLayer.RemoveElement(s);if(o.Dimensions&NvConstant.DimensionFlags.Select)for(let t=a.ElementCount()-1;t>=1;t--){const i=a.GetElementByIndex(t);i.GetID()!==OptConstant.SVGElementClass.DimLine&&i.GetID()!==OptConstant.SVGElementClass.DimText||i.SetOpacity(e?1:0)}}var r;LogUtil.Debug("= U.SvgUtil: ShowSVGSelectionState - Output:",{objectId:t,isSelected:e})}static ClearOverlayElementsByID(t,e){LogUtil.Debug("= U.SvgUtil: ClearOverlayElementsByID - Input:",{elementID:t,resetHighlight:e});const i=T3Gv.opt.svgOverlayLayer.GetElementListWithId(t),n=i.length;for(let s=0;s<n;++s)T3Gv.opt.svgOverlayLayer.RemoveElement(i[s]);if(e&&-1!==T3Gv.opt.curHiliteShape){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.curHiliteShape,!1);t&&(t.SetRuntimeEffects(!1),t.ClearCursors())}LogUtil.Debug("= U.SvgUtil: ClearOverlayElementsByID - Output: Completed")}static RenderLastSVGObject(t){LogUtil.Debug("= U.SvgUtil: RenderLastSVGObject shouldRenderSelectionStates",t),T3Gv.opt.fromOverlayLayer;const e=LayerUtil.ActiveLayerZList(),i=e[e.length-1];SvgUtil.AddSVGObject(void 0,i,!1,t),t&&SvgUtil.RenderAllSVGSelectionStates()}static RenderDirtySVGObjectsNoSetMouse(){this.RenderDirtySVGObjectsCommon(!1)}}class LayerUtil{static ActiveVisibleZList(){LogUtil.Debug("U.LayerUtil ActiveVisibleZList: input");const t=T3Gv.opt.layersManagerBlockId,e=ObjectUtil$1.GetObjectPtr(t,!1),i=e.layers,n=e.nlayers,s=e.activelayer;let a=[];for(let o=n-1;o>=0;o--){const t=i[o];(o===s||t.flags&NvConstant.LayerFlags.Visible&&t.flags&NvConstant.LayerFlags.Active)&&(a=a.concat(t.zList))}return LogUtil.Debug("U.LayerUtil ActiveVisibleZList: output",a),a}static ShowOverlayLayer(){LogUtil.Debug("O.Opt ShowOverlayLayer: input"),T3Gv.opt.svgOverlayLayer.SetVisible(!0),LogUtil.Debug("O.Opt ShowOverlayLayer: output")}static VisibleZList(){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers,i=t.nlayers,n=t.activelayer;let s=[];for(let a=i-1;a>=0;a--){const t=e[a];(a===n||t.flags&NvConstant.LayerFlags.Visible)&&(s=s.concat(t.zList))}return LogUtil.Debug("= U.LayerUtil VisibleZList: output | visibleZList",s),s}static RemoveFromAllZLists(t){LogUtil.Debug("O.Opt RemoveFromAllZLists - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0),i=e.nlayers;for(let n=0;n<i;++n){const i=e.layers[n].zList,s=i.indexOf(t);if(-1!=s)return i.splice(s,1),void LogUtil.Debug("O.Opt RemoveFromAllZLists - Output: Removed object from layer",n)}LogUtil.Debug("O.Opt RemoveFromAllZLists - Output: Object not found in any layer")}static ClearSVGHighlightLayer(){LogUtil.Debug("O.Opt ClearSVGHighlightLayer - Input: none"),null!==T3Gv.opt.svgOverlayLayer?(T3Gv.opt.svgHighlightLayer.RemoveAll(),LogUtil.Debug("O.Opt ClearSVGHighlightLayer - Output: SVG highlight layer cleared")):LogUtil.Debug("O.Opt ClearSVGHighlightLayer - Output: svgOverlayLayer is null, no action taken")}static ClearSVGOverlayLayer(){LogUtil.Debug("O.Opt ClearSVGOverlayLayer - Input: none"),null!==T3Gv.opt.svgOverlayLayer?(T3Gv.opt.svgOverlayLayer.RemoveAll(),LogUtil.Debug("O.Opt ClearSVGOverlayLayer - Output: SVG overlay layer cleared")):LogUtil.Debug("O.Opt ClearSVGOverlayLayer - Output: svgOverlayLayer is null, no action taken")}static ClearSVGObjectLayer(){LogUtil.Debug("O.Opt ClearSVGObjectLayer - Input: none"),null!==T3Gv.opt.svgObjectLayer?(T3Gv.opt.svgObjectLayer.RemoveAll(),LogUtil.Debug("O.Opt ClearSVGObjectLayer - Output: SVG object layer cleared")):LogUtil.Debug("O.Opt ClearSVGObjectLayer - Output: svgObjectLayer is null, no action taken")}static UpdateObjectLayerIndices(t){LogUtil.Debug("O.Opt UpdateObjectLayerIndices - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.layers,n=e.nlayers;for(let s=0;s<n;s++){const e=i[s].zList;for(let i=0,n=e.length;i<n;i++){const n=ObjectUtil$1.GetObjectPtr(e[i],!1);n&&(n.Layer=s,n.GetTextures(t.TextureList))}}LogUtil.Debug("O.Opt UpdateObjectLayerIndices - Output: Completed")}static InsertObjectsIntoLayerAt(t,e){LogUtil.Debug("O.Opt InsertObjectsIntoLayerAt - Input:",{objectId:t,insertList:e});const i=this.FindLayerForShapeID(t);if(i>=0){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers;let s=n[i].zList;const a=s.indexOf(t),o=s.slice(a+1);s.splice(a+1,s.length-a-1),n[i].zList=s.concat(e,o)}LogUtil.Debug("O.Opt InsertObjectsIntoLayerAt - Output:",{objectId:t,insertList:e})}static ZListPreserveForLayer(t){LogUtil.Debug("O.Opt ZListPreserveForLayer - Input:",{layerIndex:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers[t].zList;return LogUtil.Debug("O.Opt ZListPreserveForLayer - Output:",e),e}static FindLayerForShapeID(t){LogUtil.Debug("O.Opt FindLayerForShapeID - Input:",{shapeId:t});const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.layers,n=e.nlayers;for(let s=0;s<n;s++){if(-1!==i[s].zList.indexOf(t))return LogUtil.Debug("O.Opt FindLayerForShapeID - Output:",{result:s}),s}return LogUtil.Debug("O.Opt FindLayerForShapeID - Output:",{result:-1}),-1}static GetFrontBackLayersForSelected(){LogUtil.Debug("O.Opt GetFrontBackLayersForSelected - Input:",{});const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers,i=t.nlayers;let n=-1,s=0;const a=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1),o=a.length;if(0===o){const t={result:!1,frontmostname:e[0].name,frontmostindex:0,backmostname:e[i-1].name,backmostindex:i};return LogUtil.Debug("O.Opt GetFrontBackLayersForSelected - Output:",t),t}for(let l=0;l<o;l++){const t=this.FindLayerForShapeID(a[l]);(t<n||-1===n)&&(n=t),t>s&&(s=t)}const r={result:!0,frontmostname:e[n].name,frontmostindex:n,backmostname:e[s].name,backmostindex:s};return LogUtil.Debug("O.Opt GetFrontBackLayersForSelected - Output:",r),r}static FrontMostLayerZListPreserve(){LogUtil.Debug("O.Opt FrontMostLayerZListPreserve - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers[0].zList;return LogUtil.Debug("O.Opt FrontMostLayerZListPreserve - Output: Retrieved front-most layer Z-list with",t.length,"objects"),t}static HideOverlayLayer(){LogUtil.Debug("O.Opt HideOverlayLayer - Input: No parameters"),T3Gv.opt.svgOverlayLayer.SetVisible(!1),LogUtil.Debug("O.Opt HideOverlayLayer - Output: Overlay layer hidden")}static IsTopMostVisibleLayer(){LogUtil.Debug("O.Opt isTopMostVisibleLayer - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1).activelayer===this.GetTopMostVisibleLayer();return LogUtil.Debug("O.Opt isTopMostVisibleLayer - Output:",t),t}static GetTopMostVisibleLayer(){LogUtil.Debug("O.Opt getTopMostVisibleLayer - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers,i=t.nlayers;for(let n=0;n<i;++n)if(e[n].flags&NvConstant.LayerFlags.Visible)return LogUtil.Debug("O.Opt getTopMostVisibleLayer - Output:",n),n;return LogUtil.Debug("O.Opt getTopMostVisibleLayer - Output:",-1),-1}static ActiveLayerZList(){LogUtil.Debug("O.Opt ActiveLayerZList - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),e=t.layers[t.activelayer].zList;return LogUtil.Debug("O.Opt ActiveLayerZList - Output:",e),e}static ZListPreserve(t){LogUtil.Debug("O.Opt zListPreserve - Input:",t);const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0),i=e.layers,n=e.activelayer;let s=i[n];if(s.flags&NvConstant.LayerFlags.NoAdd||s.flags&t){const t=i.length;for(let e=0;e<t;e++)if(0==(i[e].flags&NvConstant.LayerFlags.NoAdd)){this.MakeLayerActiveByIndex(e),this.DirtyObjectsOnLayer(n,s),this.DirtyObjectsOnLayer(e,i[e]),SvgUtil.RenderDirtySVGObjects(),s=i[e];break}}return LogUtil.Debug("O.Opt zListPreserve - Output:",s.zList),s.zList}static DirtyObjectsOnLayer(t,e){var i;const n=e.zList,s=null!=(i=null==n?void 0:n.length)?i:0;for(let a=0;a<s;++a)ObjectUtil$1.AddToDirtyList(n[a])}static MarkAllAllVisibleHigherLayerObjectsDirty(){let t,e;const i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);for(t=i.activelayer-1;t>=0;t--)if(i.layers[t].flags&NvConstant.LayerFlags.Visible)for(e=0;e<i.layers[t].zList.length;e++)ObjectUtil$1.AddToDirtyList(i.layers[t].zList[e])}static ZList(){LogUtil.Debug("O.Opt ZList - Input: No parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1);let e=[];for(let i=t.nlayers-1;i>=0;i--)e=e.concat(t.layers[i].zList);return LogUtil.Debug("O.Opt ZList - Output: Retrieved",e.length,"objects"),e}static MakeLayerActiveByIndex(t){LogUtil.Debug("O.Opt MakeLayerActiveByIndex - Input:",{layerIndex:t}),ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),T3Gv.opt.CloseEdit();if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).moreflags&NvConstant.SessionMoreFlags.HideLayerTabs){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);t.moreflags=Utils2.SetFlag(t.moreflags,NvConstant.SessionMoreFlags.HideLayerTabs,!1)}const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),i=e.nlayers,n=e.layers;if(n[e.activelayer].layertype,t>=0&&t<i){ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).activelayer=t,n[t].layerType,this.AdjustSelectedListAfterLayerChange()}LogUtil.Debug("O.Opt MakeLayerActiveByIndex - Output: Layer activated")}static AdjustSelectedListAfterLayerChange(){LogUtil.Debug("O.Opt AdjustSelectedListAfterLayerChange - Input");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!0),e=SelectUtil.GetTargetSelect(),i=t.length,n=[];T3Gv.opt.CloseEdit();const s=this.ActiveVisibleZList();for(let o=0;o<i;++o){const e=t[o];-1!==s.indexOf(e)&&n.push(e)}-1===s.indexOf(e)&&SelectUtil.SetTargetSelect(-1);const a=n.length;if(i!==a){t.length=0;for(let e=0;e<a;++e)t.push(n[e])}LogUtil.Debug("O.Opt AdjustSelectedListAfterLayerChange - Output: Selection adjusted")}static AddNewLayerAtFront(t,e,i){const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0);if(n.nlayers>=OptConstant.Common.MaxTotalLayers)return!1;const s=new Instance.Basic.Layer;return s.name=t,s.flags=0,e&&(s.flags|=NvConstant.LayerFlags.Visible),i&&(s.flags|=NvConstant.LayerFlags.Active),n.layers.unshift(s),n.nlayers++,!0}static RotateLayerStack(t){T3Gv.opt.CloseEdit();const e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!0).layers,i=e.shift();e.push(i),this.AdjustSelectedListAfterLayerChange(),SvgUtil.RenderAllSVGObjects(),t||DrawUtil.CompleteOperation()}}class ObjectUtil{static GetObjectPtr(t,e){const i=T3Gv.stdObj.GetObject(t);if(null==i||t<0)return null;return e?T3Gv.stdObj.PreserveBlock(t).Data:i.Data}static AddToDirtyList(t,e){LogUtil.Debug("O.Opt AddToDirtyList - Input:",{objectId:t,isMoveOnly:e}),T3Gv.opt.dirtyList.indexOf(t)<0?(T3Gv.opt.dirtyList.push(t),T3Gv.opt.dirtyListMoveOnly[t]=!!e):e||(T3Gv.opt.dirtyListMoveOnly[t]=!1),LogUtil.Debug("O.Opt AddToDirtyList - Output: Dirty list updated")}static DeleteObjects(t,e){let i,n,s,a,o,r,l,h,c,u;if(LogUtil.Debug("O.Opt DeleteObjects - Input:",{objectIds:t,forceDelete:e}),this.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),null!=t)for(n=t.length?t.length:0,i=n-1;i>=0;i--){s=t[i];const n=T3Gv.stdObj.GetObject(s);if(n){if(l=n.Data,l.extraflags&OptConstant.ExtraFlags.NoDelete&&!e)continue;LayerUtil.RemoveFromAllZLists(s),SelectUtil.RemoveFromSelectedList(s),OptCMUtil.SetLinkFlag(s,DSConstant.LinkFlags.DeleteTarget),h=l.hooks.length;for(let t=0;t<h;t++)c=l.hooks[t].objid,c>0&&(u=this.GetObjectPtr(c,!0),u&&u.ChangeTarget(c,s,l.hooks[t].cellid,l.hooks[t].updhook,l.hooks[t].connect,!1));l.DeleteObject(),n.Delete()}a=T3Gv.opt.svgObjectLayer.GetElementById(s),a&&T3Gv.opt.svgObjectLayer.RemoveElement(a),o=OptConstant.Common.Action+s,r=T3Gv.opt.svgOverlayLayer.GetElementById(o),null!=r&&T3Gv.opt.svgOverlayLayer.RemoveElement(r)}LogUtil.Debug("O.Opt DeleteObjects - Output: Objects deleted:",n)}static PreserveUndoState(t){if(LogUtil.Debug("O.Opt PreserveUndoState - Input:",{shouldKeepStateOpen:t}),!T3Gv.opt.noUndo){if(null===T3Gv.state)throw new Error("state is null");if(T3Gv.state.currentStateId>=0){const e=Utils1.IsStateOpen();T3Gv.state.PreserveState(),e&&T3Gv.state.AddToHistoryState(),!t&&e&&UIUtil.SetDocDirtyState(!0)}}LogUtil.Debug("O.Opt PreserveUndoState - Output: State preserved")}static ClearDirtyList(){LogUtil.Debug("O.Opt ClearDirtyList - Input: No parameters"),T3Gv.opt.dirtyList=[],T3Gv.opt.dirtyListMoveOnly=[],T3Gv.opt.dirtyListReOrder=!1,LogUtil.Debug("O.Opt ClearDirtyList - Output: Dirty list cleared")}static ClearFutureUndoStates(){T3Gv.state.ClearFutureUndoStates()}static ClearT3GvState(){DataOpt.InitStateAndStore()}static ClearUndoRedo(){T3Gv.state.ResetUndoStates()}}var ObjectUtil$1=ObjectUtil;const _EvtUtil=class{static initialize(){if(this.isInitialized)LogUtil.Warn("EvtUtil already initialized");else try{this.cleanup(),this.setupEventHandlers(),this.isInitialized=!0,LogUtil.Info("EvtUtil initialized successfully")}catch(t){LogUtil.Error("Failed to initialize EvtUtil:",t)}}static cleanup(){try{this.eventHandlers.forEach(((t,e)=>{document.removeEventListener(e,t)})),this.eventHandlers.clear(),$$1(document).off(".t3000-evt"),$$1("#svg-area").off(".t3000-evt"),this.hammerInstances.forEach(((t,e)=>{t&&"function"==typeof t.destroy&&t.destroy()})),this.hammerInstances.clear(),this.isInitialized=!1,LogUtil.Info("EvtUtil cleanup completed")}catch(t){LogUtil.Error("Error during EvtUtil cleanup:",t)}}static setupEventHandlers(){const t=this.Evt_MouseMove.bind(this),e=this.Evt_WorkAreaMouseWheel.bind(this);this.eventHandlers.set("mousemove",t),this.eventHandlers.set("wheel",e),document.addEventListener("mousemove",t),document.addEventListener("wheel",e,{passive:!1}),this.setupHammerHandlers()}static setupHammerHandlers(){if(document.getElementById("svg-area"))try{LogUtil.Info("Hammer.js setup placeholder - implement when library is available")}catch(t){LogUtil.Error("Failed to setup Hammer handlers:",t)}else LogUtil.Warn("svg-area element not found, skipping Hammer setup")}static Evt_MouseMove(t){var e;try{const i=null==(e=T3Gv.opt)?void 0:e.svgDoc;if(!i)return;const n=i.docInfo;if(!n)return void LogUtil.Warn("SVG document info not available");if("number"!=typeof t.clientX||"number"!=typeof t.clientY)return void LogUtil.Error("Invalid mouse event coordinates");if(t.clientX>=n.dispX&&t.clientY>=n.dispY&&t.clientX<n.dispX+n.dispWidth&&t.clientY<n.dispY+n.dispHeight){const e=i.ConvertWindowToDocCoords(t.clientX,t.clientY);e&&(UIUtil.ShowXY(!0),UIUtil.UpdateDisplayCoordinates(null,e,null,null))}else UIUtil.ShowXY(!1)}catch(i){LogUtil.Error("Error in Evt_MouseMove:",i)}}static Evt_WorkAreaHammerClick(t){LogUtil.Debug("E.Evt WorkAreaHammerClick input:",t),Utils2.StopPropagationAndDefaults(t);const e=MouseUtil.IsRightClick(t);return e||(SelectUtil.ClearSelectionClick(),UIUtil.ShowContextMenu(!1,"WorkArea","Default"),UIUtil.ShowObjectConfig(!1)),T3Constant.DocContext.CanTypeInWorkArea=!0,e&&(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.hitPoint=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),SelectUtil.ClearSelectionClick(),UIUtil.ShowContextMenu(!0,"WorkArea","Default")),LogUtil.Debug("E.Evt WorkAreaHammerClick output:",e?"right-click menu shown":"selection cleared","rClickParam:",T3Gv.opt.rClickParam),!1}static Evt_WorkAreaMouseWheel(t){LogUtil.Debug("E.Evt WorkAreaMouseWheel input:",t);let e=T3Gv.docUtil;if(t.ctrlKey){const i=t.clientX,n=t.clientY,s=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(i,n);t.deltaY>0?e.ZoomInAndOut(!1,!0):t.deltaY<0&&e.ZoomInAndOut(!0,!0),Utils2.StopPropagationAndDefaults(t);const a=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(s.x,s.y),o=i-a.x,r=n-a.y,l=$$1("#svg-area"),h=l.scrollLeft(),c=l.scrollTop();T3Gv.docUtil.SetScroll(h-o,c-r),LogUtil.Debug("E.Evt WorkAreaMouseWheel output: zoom adjusted, focus maintained")}}static Evt_WorkAreaHammerDragStart(t){LogUtil.Debug("E.Evt WorkAreaHammerDragStart input:",t);const e=$$1("#svg-area"),i=e.offset(),n=t.gesture.center.clientX-i.left,s=t.gesture.center.clientY-i.top,a=e[0].clientWidth,o=e[0].clientHeight;if(!(n>=a||s>=o))return Utils2.StopPropagationAndDefaults(t),MouseUtil.IsRightClick(t)?(t.preventDefault(),t.stopPropagation(),UIUtil.ShowContextMenu(!1,"WorkArea","Default"),LogUtil.Debug("E.Evt WorkAreaHammerDragStart output: right-click handled"),!1):(SelectUtil.StartOptSltSelect(t),LogUtil.Debug("E.Evt WorkAreaHammerDragStart output: opt slt selection started"),!1)}static Evt_OptSltDrag(t){LogUtil.Debug("E.Evt OptSltDrag input:",t),Utils2.StopPropagationAndDefaults(t);try{if(!DrawUtil.AutoScrollCommon(t,!1,"OptSltSelectDoAutoScroll"))return;const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);LogUtil.Debug("E.Evt OptSltDrag processing: coordinates",e),SelectUtil.OptSltSelectMoveCommon(e.x,e.y),LogUtil.Debug("E.Evt OptSltDrag output: opt slt updated")}catch(e){throw SelectUtil.OptSltSelectExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt OptSltDrag error:",e),e}}static Evt_OptSltDragEnd(t){LogUtil.Debug("E.Evt OptSltDragEnd input:",t),Utils2.StopPropagationAndDefaults(t);try{SelectUtil.UnbindOptSltHammerEvents(),DrawUtil.ResetAutoScrollTimer();const e=T3Gv.opt.optSltFrame;SelectUtil.SelectAllInRect(e,t.gesture.srcEvent.shiftKey),T3Gv.opt.svgOverlayLayer.RemoveElement(T3Gv.opt.optSlt),LogUtil.Debug("E.Evt OptSltDragEnd processing: resetting opt slt state"),T3Gv.opt.optSlt=null,T3Gv.opt.optSltStartX=0,T3Gv.opt.optSltStartY=0,T3Gv.opt.optSltFrame={x:0,y:0,width:0,height:0},LogUtil.Debug("E.Evt OptSltDragEnd output: selection completed")}catch(e){throw SelectUtil.OptSltSelectExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt OptSltDragEnd error:",e),e}}static Evt_WorkAreaHammerDrawStart(t){LogUtil.Debug("E.Evt WorkAreaHammerDrawStart input:",t),t.stopPropagation(),t.preventDefault();return MouseUtil.IsRightClick(t)?LogUtil.Debug("E.Evt WorkAreaHammerDrawStart output: right-click ignored"):(DrawUtil.StartNewObjectDraw(t),LogUtil.Debug("E.Evt WorkAreaHammerDrawStart output: drawing started")),!1}static Evt_DrawTrackHandlerFactory(t){return LogUtil.Debug("E.Evt DrawTrackHandlerFactory input:",t),function(e){LogUtil.Debug("E.Evt DrawTrack input:",e);try{t.LMDrawTrack(e),LogUtil.Debug("E.Evt DrawTrack output: drawing tracked")}catch(i){throw t.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt DrawTrack error:",i),i}}}static Evt_DrawReleaseHandlerFactory(t){return LogUtil.Debug("E.Evt DrawReleaseHandlerFactory input:",t),function(e){LogUtil.Debug("E.Evt DrawRelease input:",e);try{t.LMDrawRelease(e),LogUtil.Debug("E.Evt DrawRelease output: drawing completed")}catch(i){throw OptCMUtil.CancelOperation(),t.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt DrawRelease error:",i),i}}}static Evt_ShapeTapFactory(t){let e;return LogUtil.Debug("= U.EvtUtil: ShapeTapFactory input:",t),function(i){LogUtil.Debug("= U.EvtUtil: ShapeTap input:",i),Utils2.StopPropagationAndDefaults(i);const n=MouseUtil.IsRightClick(i);if(T3Gv.docUtil.IsReadOnly()){if(n)return t.RightClick(i),LogUtil.Debug("= U.EvtUtil: ShapeTap output: right-click menu in read-only mode"),!1}else if(n)return t.RightClick(i),LogUtil.Debug("= U.EvtUtil: ShapeTap output: right-click menu shown"),!1;switch(T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:return TextUtil.CheckTextHyperlinkHit(t,i)||UIUtil.GetUIAdaptation(i)&&!T3Gv.docUtil.IsReadOnly()&&(e=T3Gv.opt.svgObjectLayer.GetElementById(t.tag),t.SetRolloverActions(T3Gv.opt.svgDoc,e)),UIUtil.ShowObjectConfig(!0),QuasarUtil.SetAppStateV2SelectIndex(null),LogUtil.Debug("= U.EvtUtil: ShapeTap output: normal tap processed"),!1;case OptConstant.OptTypes.Draw:case OptConstant.OptTypes.DrawPolyline:return LogUtil.Debug("= U.EvtUtil: ShapeTap output: ignored in draw mode"),!1;case OptConstant.OptTypes.StampTextOnTap:return T3Gv.opt.stampSticky||DrawUtil.CancelObjectStampTextOnTap(!0),t.AllowTextEdit()&&(e=T3Gv.opt.svgObjectLayer.GetElementById(t.tag),TextUtil.ActivateTextEdit(e.svgObj.SDGObj,i,!1)),LogUtil.Debug("= U.EvtUtil: ShapeTap output: text edit activated in stamp mode"),!1}}}static Evt_ShapeDragStartFactory(t){return LogUtil.Debug("E.Evt ShapeDragStartFactory input:",t),function(t){if(LogUtil.Debug("E.Evt ShapeDragStart input:",t),T3Gv.opt.crtOpt===OptConstant.OptTypes.Draw)return LogUtil.Debug("E.Evt ShapeDragStart output: prevented in draw mode"),!1;if(T3Gv.opt.crtOpt===OptConstant.OptTypes.Stamp)return t.stopPropagation(),t.gesture.stopPropagation(),LogUtil.Debug("E.Evt ShapeDragStart output: prevented in stamp mode"),!1;if(MouseUtil.IsRightClick(t))return t.preventDefault(),t.stopPropagation(),t.gesture.preventDefault(),t.gesture.stopPropagation(),LogUtil.Debug("E.Evt ShapeDragStart output: right-click prevented"),!1;switch(T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:case OptConstant.OptTypes.FormatPainter:return Utils2.StopPropagationAndDefaults(t),LMEvtUtil.LMMoveClick(t),LogUtil.Debug("E.Evt ShapeDragStart output: move operation started"),!1;case OptConstant.OptTypes.Draw:return LogUtil.Debug("E.Evt ShapeDragStart output: forwarded to draw handler"),_EvtUtil.Evt_WorkAreaHammerDrawStart(t);case OptConstant.OptTypes.DrawPolyline:case OptConstant.OptTypes.StampTextOnTap:return LogUtil.Debug("E.Evt ShapeDragStart output: prevented in special mode"),!1}}}static Evt_ShapeHoldFactory(t){return LogUtil.Debug("E.Evt ShapeHoldFactory input:",t),function(e){switch(LogUtil.Debug("E.Evt ShapeHold input:",e),T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:e.gesture.stopDetect(),Utils2.StopPropagationAndDefaults(e),t.RightClick(e);try{LMEvtUtil.LMMoveRelease(e)}catch(i){throw LMEvtUtil.LMMoveExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt ShapeHold error:",i),i}return LogUtil.Debug("E.Evt ShapeHold output: context menu displayed"),!1;case OptConstant.OptTypes.Draw:case OptConstant.OptTypes.DrawPolyline:case OptConstant.OptTypes.StampTextOnTap:return LogUtil.Debug("E.Evt ShapeHold output: prevented in special mode"),!1}}}static Evt_ShapeDoubleTapFactory(t){return LogUtil.Debug("E.Evt ShapeDoubleTapFactory input:",t),function(e){LogUtil.Debug("E.Evt ShapeDoubleTap input:",e);const i=t.BlockID,n=ObjectUtil$1.GetObjectPtr(i,!1);if(!(n&&n instanceof Instance.Shape.BaseDrawObject))return LogUtil.Debug("E.Evt ShapeDoubleTap output: invalid object"),!1;switch(T3Gv.opt.crtOpt){case OptConstant.OptTypes.None:if(T3Gv.opt.bInNoteEdit)return LogUtil.Debug("E.Evt ShapeDoubleTap output: prevented during note edit"),!1;if(t.GetGraph(!1),t instanceof Instance.Shape.ShapeContainer)return t.DoubleClick(e),LogUtil.Debug("E.Evt ShapeDoubleTap output: container double-click handled"),!1;const i=T3Gv.opt.svgObjectLayer.GetElementById(t.tag);return TextUtil.ActivateTextEdit(i.svgObj.SDGObj,e),LogUtil.Debug("E.Evt ShapeDoubleTap output: text editor activated"),!1;case OptConstant.OptTypes.Draw:case OptConstant.OptTypes.DrawPolyline:case OptConstant.OptTypes.StampTextOnTap:return LogUtil.Debug("E.Evt ShapeDoubleTap output: prevented in special mode"),!1}}}static Evt_ShapeDrag(t){LogUtil.Debug("E.Evt ShapeDrag input:",t),Utils2.StopPropagationAndDefaults(t);try{let e=DrawUtil.CheckDragIsOverCustomLibrary(t);LMEvtUtil.LMMoveTrack(t,e),LogUtil.Debug("E.Evt ShapeDrag output: shape position updated")}catch(e){throw LMEvtUtil.LMMoveExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt ShapeDrag error:",e),e}}static Evt_ShapeDragEnd(t){LogUtil.Debug("E.Evt ShapeDragEnd input:",t),Utils2.StopPropagationAndDefaults(t);try{LMEvtUtil.LMMoveRelease(t),LogUtil.Debug("E.Evt ShapeDragEnd output: shape movement completed")}catch(e){throw LMEvtUtil.LMMoveExceptionCleanup(e),T3Gv.opt.ExceptionCleanup(e),LogUtil.Debug("E.Evt ShapeDragEnd error:",e),e}}static Evt_ActionTrackHandlerFactory(t){return LogUtil.Debug("E.Evt ActionTrackHandlerFactory input:",t),function(e){return LogUtil.Debug("E.Evt ActionTrack input:",e),t.LMActionTrack(e),LogUtil.Debug("E.Evt ActionTrack output: action tracked"),!1}}static Evt_ActionReleaseHandlerFactory(t){return LogUtil.Debug("E.Evt ActionReleaseHandlerFactory input:",t),function(e){return LogUtil.Debug("E.Evt ActionRelease input:",e),t.LMActionRelease(e),LogUtil.Debug("E.Evt ActionRelease output: action completed"),!1}}static Evt_StampObjectDrag(t){return LogUtil.Debug("E.Evt StampObjectDrag input:",t),DrawUtil.StampObjectMove(t),LogUtil.Debug("E.Evt StampObjectDrag output: stamp object position updated"),!0}static Evt_MouseStampObjectMove(t){LogUtil.Debug("E.Evt MouseStampObjectMove input:",t),DrawUtil.MouseStampObjectMove(t),LogUtil.Debug("E.Evt MouseStampObjectMove output: stamp object position updated")}static Evt_MouseStampObjectDoneFactory(t){return LogUtil.Debug("E.Evt MouseStampObjectDoneFactory input:",t),function(e){return LogUtil.Debug("E.Evt MouseStampObjectDone input:",e),DrawUtil.MouseStampObjectDone(e,t),LogUtil.Debug("E.Evt MouseStampObjectDone output: object placement completed"),!0}}static Evt_StampObjectDragEndFactory(t){return LogUtil.Debug("E.Evt StampObjectDragEndFactory input:",t),function(e){return LogUtil.Debug("E.Evt StampObjectDragEnd input:",e),DrawUtil.DragDropObjectDone(e,t),LogUtil.Debug("E.Evt StampObjectDragEnd output: object placement completed"),!0}}static Evt_ActionTriggerTap(t){return LogUtil.Debug("E.Evt ActionTriggerTap input:",t),t.preventDefault(),t.gesture.stopPropagation(),t.stopPropagation(),LogUtil.Debug("E.Evt ActionTriggerTap output: propagation stopped"),!1}static Evt_WorkAreaHammerPinchIn(t){if(LogUtil.Debug("E.Evt WorkAreaHammerPinchIn input:",t),t.gesture.scale>.666)return!1;Utils2.StopPropagationAndDefaults(t),t.gesture.stopDetect(),SelectUtil.OptSltSelectCancel(),T3Gv.opt.moveList&&T3Gv.opt.moveList.length&&LMEvtUtil.LMMoveRelease(t),T3Gv.docUtil.svgDoc.GetWorkArea();const e=t.gesture.center.clientX,i=t.gesture.center.clientY,n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e,i);let s=Math.round(100*T3Gv.docUtil.GetZoomFactor());if(s>50){s=Math.max(50,s-50),T3Gv.docUtil.SetZoomFactor(s/100);const t=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(n.x,n.y),a=e-t.x,o=i-t.y,r=$$1("#svgarea"),l=r.scrollLeft(),h=r.scrollTop();T3Gv.docUtil.SetScroll(l-a,h-o)}return LogUtil.Debug("E.Evt WorkAreaHammerPinchIn output: zoom out completed",{newZoomFactor:s/100}),!1}static Evt_WorkAreaHammerPinchOut(t){if(LogUtil.Debug("E.Evt WorkAreaHammerPinchOut input:",t),t.gesture.scale<1.333)return!1;Utils2.StopPropagationAndDefaults(t),t.gesture.stopDetect(),T3Gv.opt.OptSltSelectCancel(),T3Gv.opt.moveList&&T3Gv.opt.moveList.length&&LMEvtUtil.LMMoveRelease(t),T3Gv.docUtil.svgDoc.GetWorkArea();const e=t.gesture.center.clientX,i=t.gesture.center.clientY,n=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(e,i);let s=Math.round(100*T3Gv.docUtil.GetZoomFactor());if(s<400){s=Math.min(400,s+50),T3Gv.docUtil.SetZoomFactor(s/100);const t=T3Gv.opt.svgDoc.ConvertDocToWindowCoords(n.x,n.y),a=e-t.x,o=i-t.y,r=$$1("#svgarea"),l=r.scrollLeft(),h=r.scrollTop();T3Gv.docUtil.SetScroll(l-a,h-o)}return LogUtil.Debug("E.Evt WorkAreaHammerPinchOut output: zoom in completed",{newZoomFactor:s/100}),!1}static Evt_WorkAreaHammerPinchEnd(t){LogUtil.Debug("E.Evt WorkAreaHammerPinchEnd input:",t),LogUtil.Debug("E.Evt WorkAreaHammerPinchEnd output: touch pan state reset")}static Evt_DimensionTextKeyboardLifter(t,e){LogUtil.Debug("E.Evt DimensionTextKeyboardLifter input:",{element:t,keyboardEvent:e}),T3Gv.opt.VirtualKeyboardLifter(t,e),LogUtil.Debug("E.Evt DimensionTextKeyboardLifter output: UI adjusted for virtual keyboard")}static Evt_DimensionTextDoubleTapFactory(t,e){return LogUtil.Debug("E.Evt DimensionTextDoubleTapFactory input:",{shape:t,textId:e}),function(i){let n,s;if(LogUtil.Debug("E.Evt DimensionTextDoubleTap input:",i),T3Gv.opt.crtOpt==OptConstant.OptTypes.None){const a=T3Gv.opt.svgObjectLayer.GetElementById(t.BlockID);if(null!=a){s=a.ElementCount();for(let t=0;t<s;++t)if(n=a.GetElementByIndex(t),n.GetID()==OptConstant.SVGElementClass.DimText&&n.GetUserData()==e)return T3Gv.opt.bInDimensionEdit=!0,SelectUtil.UpdateSelectionAttributes(null),i.gesture?TextUtil.TextRegisterEvents(n.svgObj.SDGObj,i.gesture.srcEvent):TextUtil.TextRegisterEvents(n.svgObj.SDGObj,i),i.stopPropagation(),LogUtil.Debug("E.Evt DimensionTextDoubleTap output: dimension text editing activated"),!1}return LogUtil.Debug("E.Evt DimensionTextDoubleTap output: dimension text element not found"),!1}return LogUtil.Debug("E.Evt DimensionTextDoubleTap output: prevented in modal operation"),!1}}static Evt_DimensionTextTapFactory(t,e,i){return LogUtil.Debug("E.Evt DimensionTextTapFactory input:",{shape:t,textId:e,preventPropagation:i}),function(n){if(LogUtil.Debug("E.Evt DimensionTextTap input:",n),T3Gv.opt.crtOpt==OptConstant.OptTypes.None){const s=T3Gv.opt.svgObjectLayer.GetElementById(t.BlockID);if(null!=s)for(let t=0;t<s.ElementCount();++t){const a=s.GetElementByIndex(t);if(a.GetID()==OptConstant.SVGElementClass.DimText&&a.GetUserData()==e)return T3Gv.opt.bInDimensionEdit&&T3Gv.opt.svgDoc.GetActiveEdit()==a?(i&&n.stopPropagation(),LogUtil.Debug("E.Evt DimensionTextTap output: already editing this dimension"),!1):(T3Gv.opt.CloseEdit(!1,!0),T3Gv.opt.bInDimensionEdit=!0,SelectUtil.UpdateSelectionAttributes(null),n.gesture?TextUtil.TextRegisterEvents(a,n.gesture.srcEvent):TextUtil.TextRegisterEvents(a,n),n.stopPropagation(),LogUtil.Debug("E.Evt DimensionTextTap output: dimension text editing activated"),!1)}return LogUtil.Debug("E.Evt DimensionTextTap output: dimension text element not found"),!1}return LogUtil.Debug("E.Evt DimensionTextTap output: prevented in modal operation"),!1}}static Evt_PolyLineDrawExtendHandlerFactory(t){return LogUtil.Debug("E.Evt PolyLineDrawExtendHandlerFactory input:",t),function(e){LogUtil.Debug("E.Evt PolyLineDrawExtend input:",e);try{t.LMDrawExtend(e),LogUtil.Debug("E.Evt PolyLineDrawExtend output: polyline extended")}catch(i){OptCMUtil.CancelOperation(),t.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),LogUtil.Debug("E.Evt PolyLineDrawExtend error:",i)}}}static Evt_PolyLineDrawDragStart(t){return LogUtil.Debug("E.Evt PolyLineDrawDragStart input:",t),LogUtil.Debug("E.Evt PolyLineDrawDragStart output: drag prevented during polyline drawing"),!1}};let EvtUtil=_EvtUtil;EvtUtil.eventHandlers=new Map,EvtUtil.hammerInstances=new Map,EvtUtil.isInitialized=!1,EvtUtil.Evt_DrawExtendHandler=null;class Rect extends Element$1{constructor(){super(),this.svgObj=null,this.shapeElem=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.shapeElem=new T3Svg.Rect,this.svgObj.add(this.shapeElem),this.InitElement(t,e),this.svgObj}SetSize(t,e){const i=Utils1.RoundCoord(t),n=Utils1.RoundCoord(e);this.geometryBBox.width=i,this.geometryBBox.height=n,this.svgObj.size(i,n),this.shapeElem.size(i,n),this.UpdateTransform(),this.RefreshPaint()}}class Container extends Element$1{constructor(){super()}AddElement(t,e){void 0!==e&&this.svgObj instanceof T3Svg.Doc&&e++,this.svgObj.add(t.svgObj,e),t.svgObj.parent===this.svgObj&&(t.parent=this,t.RefreshPaint(!0))}RemoveElement(t){t&&t.svgObj.parent===this.svgObj&&(this.svgObj.remove(t.svgObj),t.parent=null)}RemoveAll(){let t=this.svgObj instanceof T3Svg.Doc?1:0,e=this.svgObj.children().length;for(let i=t;i<e;i++)this.svgObj.removeAt(t)}RemoveElementByInternalId(t){const e=this.svgObj.children();for(let i=this.svgObj instanceof T3Svg.Doc?1:0;i<e.length;i++){const n=e[i].SDGObj;if(n&&n.internalID===t){this.svgObj.removeAt(i);break}}}ElementCount(){let t=this.svgObj.children().length;return this.svgObj instanceof T3Svg.Doc&&t--,t}GetElementByIndex(t){const e=this.svgObj.children();return this.svgObj instanceof T3Svg.Doc&&t++,t<0||t>=e.length?null:e[t].SDGObj}GetElementById(t,e){const i=this.svgObj.children();for(let n=this.svgObj instanceof T3Svg.Doc?1:0;n<i.length;n++){const s=i[n].SDGObj;if(s&&s.ID===t){if(e&&s.userData!==e)continue;return s}}return null}GetElementByIdInGroup(t){function e(i){const n=i.svgObj.children();let s=null;for(let a=0;a<n.length;a++){const i=n[a].SDGObj;if(i){if(i.ID===t){s=i;break}if(s=e(i),s)break}}return s}const i=this.svgObj.children();for(let n=0;n<i.length;n++){const s=i[n].SDGObj;if(s){if(s.ID===t)return s;const i=e(s);if(i)return i}}return null}GetElementListWithId(t){const e=this.svgObj.children(),i=[];for(let n=this.svgObj instanceof T3Svg.Doc?1:0;n<e.length;n++){const s=e[n].SDGObj;s&&s.ID===t&&i.push(s)}return i}GetElementByInternalId(t){const e=this.svgObj.children();for(let i=this.svgObj instanceof T3Svg.Doc?1:0;i<e.length;i++){const n=e[i].SDGObj;if(n&&n.internalID===t)return n}return null}FindElement(t){const e=this.svgObj.children();for(let i=0;i<e.length;i++){const n=e[i].SDGObj;if(n){if(n.ID===t)return n;if(n instanceof Container){const e=n.FindElement(t);if(e)return e}}}return null}FindElementByDOMElement(t){const e=this.svgObj.children();for(let i=this.svgObj instanceof T3Svg.Doc?1:0;i<e.length;i++){const n=e[i].SDGObj;if(n){if(n.DOMElement()===t)return n;if(n instanceof Container){const e=n.FindElementByDOMElement(t);if(e)return e}}}return null}GetElementIndex(t){let e=this.svgObj.children().indexOf(t.svgObj);return e>0&&this.svgObj instanceof T3Svg.Doc&&e--,e}MoveElementForward(t){this.GetElementIndex(t)<this.ElementCount()-1&&t.svgObj.forward()}MoveElementBackward(t){this.GetElementIndex(t)>0&&t.svgObj.backward()}MoveElementToFront(t){t.svgObj.front()}MoveElementToBack(t){t.svgObj.back(),t.svgObj.level()}}"undefined"!=typeof window&&("SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,n,s,a,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=n,this._y1=s,this._x2=a,this._y2=o},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,n,s,a,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=n,this._y1=s,this._x2=a,this._y2=o},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=n,this._y1=s},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=n,this._y1=s},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,n,s,a,o,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=n,this._r2=s,this._angle=a,this._largeArcFlag=o,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,n,s,a,o,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=n,this._r2=s,this._angle=a,this._largeArcFlag=o,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=n,this._y2=s},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=n,this._y2=s},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,n,s,a){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,n,s,a)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,n,s,a){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,n,s,a)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,n,s,a,o){return new window.SVGPathSegArcAbs(void 0,t,e,i,n,s,a,o)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,n,s,a,o){return new window.SVGPathSegArcRel(void 0,t,e,i,n,s,a,o)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";var e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));var i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(this._pathElement){var e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){var e="",i=!0;return t.forEach((function(t){i?(i=!1,e+=t._asPathString()):e+=" "+t._asPathString()})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];var e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};var n=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};n.prototype._isCurrentSpace=function(){var t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},n.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},n.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},n.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},n.prototype.peekSegmentType=function(){var t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},n.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},n.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},n.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},n.prototype._parseNumber=function(){var t=0,e=0,i=1,n=0,s=1,a=1,o=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,s=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var r=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r)for(var l=this._currentIndex-1,h=1;l>=r;)e+=h*(this._string.charAt(l--)-"0"),h*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,n+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=o&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,a=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var c=e+n;if(c*=s,t&&(c*=Math.pow(10,a*t)),o!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),c}},n.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}},n.prototype.parseSegment=function(){var t=this._string[this._currentIndex],i=this._pathSegTypeFromChar(t);if(i==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((i=this._nextCommandHelper(t,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=i,i){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,n.x,n.y,n.x1,n.y1,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return n={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,n.x,n.y,n.x2,n.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,n.x,n.y,n.x1,n.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return n={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,n.x,n.y,n.x1,n.y1,n.arcAngle,n.arcLarge,n.arcSweep);default:throw"Unknown path seg type."}};var s=new i,a=new n(t);if(!a.initialCommandIsMoveTo())return[];for(;a.hasMoreData();){var o=a.parseSegment();if(!o)return[];s.appendSegment(o)}return s.pathSegList}));class Creator{constructor(t){this.element=t,this.pathSegs=[],this.curPosX=0,this.curPosY=0}BeginPath(){this.pathSegs=[],this.curPosX=0,this.curPosY=0}MoveTo(t,e,i){const n=Utils1.RoundCoord(t),s=Utils1.RoundCoord(e),a=`${i?"m":"M"}${n},${s}`;this.pathSegs.push(a),i?(this.curPosX+=n,this.curPosY+=s):(this.curPosX=n,this.curPosY=s)}LineTo(t,e,i){const n=i?"l":"L",s=Utils1.RoundCoord(t),a=Utils1.RoundCoord(e),o=`${n}${s},${a}`;this.pathSegs.push(o),i?(this.curPosX+=s,this.curPosY+=a):(this.curPosX=s,this.curPosY=a)}CurveTo(t,e,i,n,s){const a=Utils1.RoundCoord(t),o=Utils1.RoundCoord(e),r=Utils1.RoundCoord(i),l=Utils1.RoundCoord(n),h=`${s?"q":"Q"}${a},${o} ${r},${l}`;this.pathSegs.push(h),s?(this.curPosX+=r,this.curPosY+=l):(this.curPosX=r,this.curPosY=l)}SimpleArcTo(t,e,i,n){let s=t,a=e;n&&(s+=this.curPosX,a+=this.curPosY);const o=Math.abs(s-this.curPosX),r=Math.abs(a-this.curPosY);o&&r?this.ArcTo(t,e,o,r,0,i,!1,n):this.LineTo(t,e,n)}ArcTo(t,e,i,n,s,a,o,r){const l=Utils1.RoundCoord(t),h=Utils1.RoundCoord(e),c=`${r?"a":"A"}${Utils1.RoundCoord(i)},${Utils1.RoundCoord(n)} ${s} ${o?1:0},${a?1:0} ${l},${h}`;this.pathSegs.push(c),r?(this.curPosX+=l,this.curPosY+=h):(this.curPosX=l,this.curPosY=h)}ClosePath(){this.pathSegs.push("z")}ToString(){return this.pathSegs.join(" ")}Apply(){const t=this.ToString();this.element&&this.element instanceof Path&&this.element.SetPath(t)}}class Path extends Container{constructor(){super(),this.pathCreator=null,this.svgObj=null,this.pathElem=null,this.arrowAreaElem=null,this.arrowElems=[],this.sArrowRec=null,this.eArrowRec=null,this.origPathData=null,this.strokeWidth=0,this.sArrowSize=0,this.eArrowSize=0,this.sArrowDisp=!1,this.eArrowDisp=!1,this.sArrowMetrics={},this.eArrowMetrics={},this.arrowheadBounds=[]}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.pathElem=new T3Svg.Path,this.svgObj.add(this.pathElem),this.arrowAreaElem=new T3Svg.Container(T3Svg.create("g")),this.svgObj.add(this.arrowAreaElem),this.InitElement(t,e),this.svgObj}SetArrowheads(t,e,i,n,s,a){this.IsClosed()||(this.sArrowRec=t,this.eArrowRec=i,this.sArrowSize=e,this.eArrowSize=n,this.sArrowDisp=s||!1,this.eArrowDisp=a||!1,this.UpdateArrowheads())}SetStrokeWidth(t){isNaN(t)&&"string"==typeof t&&(t=Instance.Basic.Symbol.ParsePlaceholder(t,BConstant.Placeholder.LineThick)),t=Utils1.RoundCoord(t),this.pathElem.attr("stroke-width",t),this.strokeWidth=Number(t),this.pathElem.attr("stroke-dasharray",this.GetStrokePatternForWidth()),this.UpdateArrowheads()}SetStrokeColor(t){this.svgObj.attr("stroke",t),this.IsClosed()||(this.svgObj.attr("fill",t),this.pathElem.attr("fill","none")),this.ClearColorData(!1)}UpdatePattern(t,e){let i;Instance.Basic.Element.prototype.UpdatePattern.call(this,t,e),e||(i=this.svgObj.attr("stroke"),this.IsClosed()||(this.svgObj.attr("fill",i),this.pathElem.attr("fill","none")))}UpdateGradient(t,e){let i;Instance.Basic.Element.prototype.UpdateGradient.call(this,t,e),e||(i=this.svgObj.attr("stroke"),this.IsClosed()||(this.svgObj.attr("fill",i),this.pathElem.attr("fill","none")))}SetStrokePattern(t){this.strokeDashArray=t,this.pathElem.attr("stroke-dasharray",this.GetStrokePatternForWidth())}SetSize(t,e){}GetArrowheadBounds(){return[...this.arrowheadBounds]}UpdateArrowheads(){const t=this.sArrowRec,e=this.eArrowRec,i=this.sArrowSize,n=this.eArrowSize;let s=null,a=null;for(;this.arrowAreaElem.children().length;)this.arrowAreaElem.removeAt(0);if(this.arrowElems.length=0,this.arrowheadBounds=[],!this.IsClosed()&&this.origPathData){this.pathElem.plot(this.origPathData);const o=t||this.EmptyArrowhead(),r=e||this.EmptyArrowhead();o&&(this.sArrowMetrics=this.CalcArrowheadDim(o,i,this.sArrowDisp)),r&&(this.eArrowMetrics=this.CalcArrowheadDim(r,n,this.eArrowDisp)),this.CalcArrowheadPlacement(o,r),o&&(s=this.CreateArrowheadElem(o,this.sArrowMetrics,!0,this.arrowheadBounds)),r&&(a=this.CreateArrowheadElem(r,this.eArrowMetrics,!1,this.arrowheadBounds)),o&&this.sArrowMetrics.trimAmount&&this.TrimPath("start",this.sArrowMetrics.trimAmount),r&&this.eArrowMetrics.trimAmount&&this.TrimPath("end",this.eArrowMetrics.trimAmount),s&&(this.arrowElems.push(s),this.arrowAreaElem.add(s)),a&&(this.arrowElems.push(a),this.arrowAreaElem.add(a))}}CalcArrowheadDim(t,e,i){let n,s;const a={width:0,height:0,scaleFactor:0,attachX:0,attachY:0,endX:0,endY:0,trimAmount:0};return s=2*(this.strokeWidth+e),t.fixedSizeScale&&(s=this.strokeWidth*t.fixedSizeScale),n=s/t.defArea.height,a.width=t.defArea.width*n,a.height=s,a.scaleFactor=n,a.attachX=t.attachPt.x*n,a.attachY=t.attachPt.y*n,a.endX=t.endPt.x*n,a.endY=t.endPt.y*n,t.centered&&(a.endX=a.attachX,a.endY=a.attachY),a.trimAmount=a.endX-a.attachX,i&&!t.centered&&(a.trimAmount+=10),a}CreateArrowheadElem(t,e,i,n){let s=this.pathElem.attr("stroke-width");isNaN(s)&&(s=Number(Instance.Basic.Symbol.ParsePlaceholder(s,Instance.Basic.Symbol.Placeholder.LineThick)));let a=this.svgObj.attr("stroke-opacity");isNaN(a)&&(a=1);const o={x:e.offsetX,y:e.offsetY},r=e.rotatePt,l=e.angle,h=e.scaleFactor,c=t.geometry,u=new T3Svg.Container(T3Svg.create("g"));u.parts=[];let d=c;i&&t.flippedGeometry&&(d=t.flippedGeometry);for(let p=0;p<d.length;p++){let t=!1,e=null,i="";const n=d[p];switch(n.type){case"RECT":{e=new T3Svg.Path,i="M";const s=n.pathData.x*h+o.x,a=n.pathData.y*h+o.y,c=n.pathData.width*h,u=n.pathData.height*h;let d=Utils1.RotatePoint(r,{x:s,y:a},l);i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"L",d=Utils1.RotatePoint(r,{x:s+c,y:a},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"L",d=Utils1.RotatePoint(r,{x:s+c,y:a+u},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"L",d=Utils1.RotatePoint(r,{x:s,y:a+u},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"z",e.plot(i),t=!0;break}case"OVAL":{e=new T3Svg.Path,i="M";let s=n.pathData.x*h+o.x,a=n.pathData.y*h+o.y;const c=n.pathData.width*h/2,u=n.pathData.height*h/2;a+=u-.5;let d=Utils1.RotatePoint(r,{x:s,y:a},l);i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"A",i+=Utils1.RoundCoord(c)+","+Utils1.RoundCoord(u)+" "+Utils1.RoundCoord(l)+" 1 1 ",d=Utils1.RotatePoint(r,{x:s,y:a+1},l),i+=Utils1.RoundCoord(d.x)+","+Utils1.RoundCoord(d.y)+"z",e.plot(i),t=!0;break}case"PATH":{e=new T3Svg.Path,i="";const s=n.pathData;if(!Array.isArray(s))continue;for(let e=0;e<s.length;e++){const n=s[e];if(!Array.isArray(n)||n.length<1){i="";break}switch(n[0]){case"M":case"L":{if(n.length<3)break;const t=n[1]*h+o.x,e=n[2]*h+o.y,s=Utils1.RotatePoint(r,{x:t,y:e},l);i+=n[0]+Utils1.RoundCoord(s.x)+","+Utils1.RoundCoord(s.y);break}case"A":{if(n.length<8)break;const t=n[6]*h+o.x,e=n[7]*h+o.y,s=n[1]*h,a=n[2]*h;let c=Utils1.RotatePoint(r,{x:t,y:e},l);i+="A"+Utils1.RoundCoord(s)+","+Utils1.RoundCoord(a)+" "+Utils1.RoundCoord(n[3]+l)+" "+n[4]+" "+n[5]+" "+Utils1.RoundCoord(c.x)+","+Utils1.RoundCoord(c.y);break}case"z":i+="z",t=!0}}e.plot(i);break}default:e=null}n.noWhiteFill&&(t=!1),e&&(u.add(e),u.parts.push({elem:e,filled:n.filled}),n.filled?(e.attr("stroke","none"),e.attr("fill-opacity",a)):(e.attr("stroke-width",s*n.stroke),t?(e.attr("fill-opacity",1),e.attr("fill","#FFFFFF")):e.attr("fill","none")))}if(u.attr("stroke-dasharray","none"),n&&"empty"!==t.desc){let e=o.x,i=o.y,s=t.defArea.width*h,a=t.defArea.height*h;if(l){let t=Utils1.RotatePoint(r,{x:e,y:i},l),n=t.x,o=t.x,h=t.y,c=t.y;t=Utils1.RotatePoint(r,{x:e+s,y:i},l),n=t.x<n?t.x:n,o=t.x>o?t.x:o,h=t.y<h?t.y:h,c=t.y>c?t.y:c,t=Utils1.RotatePoint(r,{x:e,y:i+a},l),n=t.x<n?t.x:n,o=t.x>o?t.x:o,h=t.y<h?t.y:h,c=t.y>c?t.y:c,t=Utils1.RotatePoint(r,{x:e+s,y:i+a},l),n=t.x<n?t.x:n,o=t.x>o?t.x:o,h=t.y<h?t.y:h,c=t.y>c?t.y:c,e=n,i=h,s=o-n,a=c-h}n.push({x:e,y:i,width:s,height:a})}return u}CalcArrowheadPlacement(t,e){if(t||e)try{const i=this.pathElem.node.getTotalLength();let n=this.pathElem.node.getPointAtLength(0),s=this.pathElem.node.getPointAtLength(i),a=t?this.sArrowMetrics.trimAmount:0,o=e?this.eArrowMetrics.trimAmount:0;if(a+o>=i){const t=this.pathElem.node.getPointAtLength(i/2);a&&o?(this.sArrowMetrics.trimAmount=i/2,this.eArrowMetrics.trimAmount=i/2,a=o=i/2):a?(this.sArrowMetrics.trimAmount=i,a=i):(this.eArrowMetrics.trimAmount=i,o=i),n=t,s=t}let r=t?t.centered?this.pathElem.node.getPointAtLength(i/2):this.pathElem.node.getPointAtLength(a):null,l=e?e.centered?this.pathElem.node.getPointAtLength(i/2):this.pathElem.node.getPointAtLength(i-o):null;if(t){let e=r.x===n.x&&r.y===n.y?i<2?{x:n.x+2,y:n.y}:this.pathElem.node.getPointAtLength(2):r;t.centered&&i>=4&&(n=this.pathElem.node.getPointAtLength(i/2-2)),this.sArrowMetrics.angle=t.noRotate?0:Utils1.CalcAngleFromPoints(e,n),this.sArrowMetrics.rotatePt=r,this.sArrowMetrics.offsetX=r.x-this.sArrowMetrics.attachX,this.sArrowMetrics.offsetY=r.y-this.sArrowMetrics.attachY}if(e){let t=l.x===s.x&&l.y===s.y?i<2?{x:s.x-2,y:s.y}:this.pathElem.node.getPointAtLength(i-2):l;e.centered&&i>=4&&(s=this.pathElem.node.getPointAtLength(i/2+2)),this.eArrowMetrics.angle=e.noRotate?0:Utils1.CalcAngleFromPoints(t,s),this.eArrowMetrics.rotatePt=l,this.eArrowMetrics.offsetX=l.x-this.eArrowMetrics.attachX,this.eArrowMetrics.offsetY=l.y-this.eArrowMetrics.attachY}}catch(i){LogUtil.Error("= b.Path: CalcArrowheadPlacement/ Error in CalcArrowheadPlacement:",i)}}EmptyArrowhead(){return{id:0,desc:"empty",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!1,noRotate:!0,geometry:[{type:"RECT",filled:!1,noWhiteFill:!0,stroke:0,pathData:{x:0,y:0,width:10,height:10}}]}}TrimPath(t,e){const i=this.pathElem.node.pathSegList.numberOfItems,n=this.pathElem.node.getTotalLength();let s={x:0,y:0};if(e)if(e>=n)this.pathElem.plot();else{const a="start"===t?e:n-e,o=this.pathElem.node.getPathSegAtLength(a);let r=this.pathElem.node.getPointAtLength(a);r={x:Utils1.RoundCoord(r.x),y:Utils1.RoundCoord(r.y)};const l=this.pathElem.node.pathSegList.getItem(o);if("start"===t){const t=this.IsSegmentAbs(l);t||(s=this.CalcSegEndpoint(this.pathElem,o),s.x=Utils1.RoundCoord(s.x),s.y=Utils1.RoundCoord(s.y));for(let i=1;i<o;i++)this.pathElem.node.pathSegList.removeItem(1);const e=this.pathElem.node.createSVGPathSegMovetoAbs(r.x,r.y);if(this.pathElem.node.pathSegList.replaceItem(e,0),!t){let t;switch(l.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:t=this.pathElem.node.createSVGPathSegLinetoAbs(s.x,s.y);break;case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_REL:t=this.pathElem.node.createSVGPathSegArcAbs(s.x,s.y,l.r1,l.r2,l.angle,l.largeArcFlag,l.sweepFlag);break;default:t=null}t&&this.pathElem.node.pathSegList.replaceItem(t,1)}}else{for(let e=o+1;e<i;e++)this.pathElem.node.pathSegList.removeItem(o+1);let t;switch(l.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:t=this.pathElem.node.createSVGPathSegLinetoAbs(r.x,r.y);break;case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_REL:t=this.pathElem.node.createSVGPathSegArcAbs(r.x,r.y,l.r1,l.r2,l.angle,l.largeArcFlag,l.sweepFlag);break;default:t=null}t&&this.pathElem.node.pathSegList.replaceItem(t,o)}}}CalcSegEndpoint(t,e){let i={x:0,y:0};for(let n=0;n<=e;n++){const e=t.node.pathSegList.getItem(n);switch(e.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_MOVETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:void 0!==e.x&&(i.x=e.x),void 0!==e.y&&(i.y=e.y);break;case OptConstant.SVGPathSeg.PATHSEG_MOVETO_REL:0===n?(i.x=e.x,i.y=e.y):(i.x+=e.x,i.y+=e.y);break;default:void 0!==e.x&&(i.x+=e.x),void 0!==e.y&&(i.y+=e.y)}}return i}GetGeometryBBox(){if(this.geometryBBox.width<0||this.geometryBBox.height<0){const t=this.doc.GetFormattingLayer(),e=new T3Svg.Path;e.plot(this.origPathData),t.svgObj.add(e);const i=e.node.getBBox();t.svgObj.remove(e),this.geometryBBox.x=i.x,this.geometryBBox.y=i.y,this.geometryBBox.width=i.width,this.geometryBBox.height=i.height}return this.geometryBBox}IsSegmentAbs(t){let e=!1;switch(t.pathSegType){case OptConstant.SVGPathSeg.PATHSEG_MOVETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_LINETO_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:case OptConstant.SVGPathSeg.PATHSEG_ARC_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case OptConstant.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:e=!0}return e}IsClosed(){const t=this.pathElem.node.pathSegList.numberOfItems;if(t<1)return!1;return this.pathElem.node.pathSegList.getItem(t-1).pathSegType===OptConstant.SVGPathSeg.PATHSEG_CLOSEPATH}SetPath(t,e){this.origPathData=t,this.pathElem.plot(t),this.UpdateArrowheads(),this.UpdateTransform(),e?(this.geometryBBox.x=e.x,this.geometryBBox.y=e.y,this.geometryBBox.width=e.width,this.geometryBBox.height=e.height):(this.geometryBBox.width=-1,this.geometryBBox.height=-1),this.RefreshPaint()}PathCreator(){return this.pathCreator||(this.pathCreator=new Creator(this)),this.pathCreator}}class RRect extends Path{constructor(){super(),this.rx=0,this.ry=0}SetRRectSize(t,e,i,n){i>=t/2&&(i=(t-1)/2),n>=e/2&&(n=(e-1)/2),this.rx=i,this.ry=n;const s=this.PathCreator(),a=t-2*i,o=e-2*n;s.BeginPath(),i&&n?(s.MoveTo(0,n),s.SimpleArcTo(i,-n,!0,!0),s.LineTo(a,0,!0),s.SimpleArcTo(i,n,!0,!0),s.LineTo(0,o,!0),s.SimpleArcTo(-i,n,!0,!0),s.LineTo(-a,0,!0),s.SimpleArcTo(-i,-n,!0,!0),s.ClosePath()):(s.MoveTo(0,0),s.LineTo(t,0,!0),s.LineTo(0,e,!0),s.LineTo(-t,0,!0),s.ClosePath());const r=s.ToString();this.SetPath(r,{x:0,y:0,width:t,height:e})}SetSize(t,e){this.SetRRectSize(t,e,this.rx,this.ry)}}class Oval extends Element$1{constructor(){super(),this.svgObj=null,this.shapeElem=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.shapeElem=new T3Svg.Ellipse,this.svgObj.add(this.shapeElem),this.InitElement(t,e),this.svgObj}SetSize(t,e){const i=Utils1.RoundCoord(t),n=Utils1.RoundCoord(e);this.geometryBBox.width=i,this.geometryBBox.height=n,this.svgObj.size(i,n),this.shapeElem.size(i,n),this.UpdateTransform(),this.RefreshPaint()}}class Line extends Path{constructor(){super()}SetPoints(t,e,i,n){const s=this.PathCreator();s.BeginPath(),s.MoveTo(t,e),s.LineTo(i,n);const a=s.ToString();this.SetPath(a,{x:Math.min(t,i),y:Math.min(e,n),width:Math.abs(i-t),height:Math.abs(n-e)})}}class PolyLine extends Path{constructor(){super()}SetPoints(t){const e=this.PathCreator(),i={x:0,y:0},n={x:0,y:0},s=t.length;if(e.BeginPath(),s>1){const s=t[0];e.MoveTo(s.x,s.y),i.x=n.x=s.x,i.y=n.y=s.y}for(let r=1;r<s;r++){const s=t[r];e.LineTo(s.x,s.y),i.x=Math.min(i.x,s.x),i.y=Math.min(i.y,s.y),n.x=Math.max(n.x,s.x),n.y=Math.max(n.y,s.y)}const a=e.ToString(),o={x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y};this.SetPath(a,o)}}class PolyPolyLine extends Path{constructor(){super(),this.pList=[],this.arrowElems=[]}Clear(){this.pList=[],this.BuildPath()}AddPolyLine(t,e,i){this.pList.push({points:t,sArrowFlag:e,eArrowFlag:i})}BuildPath(){for(;this.arrowAreaElem.children().length;)this.arrowAreaElem.removeAt(0);this.arrowElems.length=0;const t=this.PathCreator();t.BeginPath(),this.arrowheadBounds=[];let e=null;const i={x:0,y:0},n={x:0,y:0};let s=!0,a=!1;const o=this.pList.length;for(let l=0;l<o;l++){let o=null,r=null;const h=this.pList[l].points.length;for(let c=0;c<h-1;c++){const u=0===c,d=c===h-2,p=this.pList[l].points[c];let g=this.pList[l].points[c+1];u&&this.pList[l].sArrowFlag&&this.sArrowRec&&(o={arrowRec:this.sArrowRec,arrowSize:this.sArrowSize,arrowDisp:this.sArrowDisp}),d&&this.pList[l].eArrowFlag&&this.eArrowRec&&(r={arrowRec:this.eArrowRec,arrowSize:this.eArrowSize,arrowDisp:this.eArrowDisp}),(o||r)&&(this.GenerateArrowheads(p,g,o,r),a=!0),s?(i.x=Math.min(p.x,g.x),i.y=Math.min(p.y,g.y),n.x=Math.max(p.x,g.x),n.y=Math.max(p.y,g.y)):(i.x=Math.min(i.x,p.x,g.x),i.y=Math.min(i.y,p.y,g.y),n.x=Math.max(n.x,p.x,g.x),n.y=Math.max(n.y,p.y,g.y)),s=!1,e=o?o.segPt:p,r&&(g=r.segPt),u?t.MoveTo(e.x,e.y):d||t.LineTo(e.x,e.y),d&&t.LineTo(g.x,g.y)}o&&(this.arrowAreaElem.add(o.arrowElem),this.arrowElems.push(o.arrowElem)),r&&(this.arrowAreaElem.add(r.arrowElem),this.arrowElems.push(r.arrowElem))}if(!a&&e){const t={arrowRec:this.EmptyArrowhead(),arrowSize:this.sArrowSize,arrowDisp:!1,arrowElem:null};this.GenerateArrowheads(e,e,t,null),this.arrowAreaElem.add(t.arrowElem),this.arrowElems.push(t.arrowElem)}const r=t.ToString();this.origPathData=r,this.pathElem.plot(r),this.UpdateTransform(),this.geometryBBox.x=i.x,this.geometryBBox.y=i.y,this.geometryBBox.width=n.x-i.x,this.geometryBBox.height=n.y-i.y,this.RefreshPaint()}UpdateArrowheads(){this.BuildPath()}GenerateArrowheads(t,e,i,n){let s,a,o,r,l,h,c,u;if(i&&(i.segPt={x:t.x,y:t.y},i.attachPt={x:t.x,y:t.y},i.offset={x:t.x,y:t.y},i.arrowElem=null,i.angle=180),n&&(n.segPt={x:e.x,y:e.y},n.attachPt={x:e.x,y:e.y},n.offset={x:e.x,y:e.y},n.arrowElem=null,n.angle=0),s=e.x-t.x,a=e.y-t.y,o=Math.sqrt(s*s+a*a),i&&(r=this.CalcArrowheadDim(i.arrowRec,i.arrowSize,i.arrowDisp)),n&&(l=this.CalcArrowheadDim(n.arrowRec,n.arrowSize,n.arrowDisp)),h=(r?r.trimAmount:0)+(l?l.trimAmount:0),h>o?(c=(r?r.trimAmount:0)/h*o,u=(l?l.trimAmount:0)/h*o):(c=r?r.trimAmount:0,u=l?l.trimAmount:0),o){const h=s/o,d=a/o;i&&(i.segPt.x=t.x+c*h,i.segPt.y=t.y+c*d,i.attachPt.x=i.arrowRec.centered?t.x+o/2*h:i.segPt.x,i.attachPt.y=i.arrowRec.centered?t.y+o/2*d:i.segPt.y,i.angle=i.arrowRec.noRotate?0:Utils1.CalcAngleFromPoints(e,t),i.offset.x=i.attachPt.x-r.attachX,i.offset.y=i.attachPt.y-r.attachY),n&&(n.segPt.x=t.x+(o-u)*h,n.segPt.y=t.y+(o-u)*d,n.attachPt.x=n.arrowRec.centered?t.x+o/2*h:n.segPt.x,n.attachPt.y=n.arrowRec.centered?t.y+o/2*d:n.segPt.y,n.angle=n.arrowRec.noRotate?0:Utils1.CalcAngleFromPoints(t,e),n.offset.x=n.attachPt.x-l.attachX,n.offset.y=n.attachPt.y-l.attachY),r&&(r.offsetX=i.offset.x,r.offsetY=i.offset.y,r.angle=i.angle,r.rotatePt=i.attachPt,i.arrowElem=this.CreateArrowheadElem(i.arrowRec,r,!0,this.arrowheadBounds)),l&&(l.offsetX=n.offset.x,l.offsetY=n.offset.y,l.angle=n.angle,l.rotatePt=n.attachPt,n.arrowElem=this.CreateArrowheadElem(n.arrowRec,l,!1,this.arrowheadBounds))}}}class Polygon extends Path{constructor(){super()}SetPoints(t){let e=this.PathCreator(),i={x:0,y:0},n={x:0,y:0},s=t.length;e.BeginPath(),s>1&&(e.MoveTo(t[0].x,t[0].y),i.x=n.x=t[0].x,i.y=n.y=t[0].y);for(let o=1;o<s;o++)e.LineTo(t[o].x,t[o].y),i.x=Math.min(i.x,t[o].x),i.y=Math.min(i.y,t[o].y),n.x=Math.max(n.x,t[o].x),n.y=Math.max(n.y,t[o].y);s>1&&e.ClosePath();let a=e.ToString();this.SetPath(a,{x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y})}}class Group extends Container{constructor(){super()}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.clipElem=null,this.InitElement(t,e),this.svgObj}GetGeometryBBox(){if(this.geometryBBox.width<0||this.geometryBBox.height<0){let t,e,i=this.doc.GetFormattingLayer(),n=[],s={x:this.svgObj.trans.x,y:this.svgObj.trans.y},a=this.svgObj.trans.rotation,o=this.svgObj.parent,r=0;o&&(r=this.svgObj.position(),o.remove(this.svgObj)),this.RemoveNodesRecursively(this.svgObj.node,n),i.svgObj.add(this.svgObj),this.svgObj.transform({x:0,y:0,rotation:0}),t=this.svgObj.rbox(),i.svgObj.remove(this.svgObj),e=this.doc.ConvertWindowToDocCoords(t.x,t.y),this.geometryBBox.x=e.x,this.geometryBBox.y=e.y,this.geometryBBox.width=t.width,this.geometryBBox.height=t.height,this.svgObj.transform({x:s.x,y:s.y,rotation:a});for(let l=0;l<n.length;l++){let t=n[l];t.parent.insertBefore(t.node,t.sibling)}o&&o.add(this.svgObj,r),this.UpdateTransform()}return this.geometryBBox}RemoveNodesRecursively(t,e){const i=t.parentNode;if(t.hasAttribute&&t.removeAttribute&&"ELEMENT_NODE"===t.nodeType){if(t.hasAttribute("no-export")||t.hasAttribute("sfx"))return e.push({node:t,parent:i,sibling:t.nextSibling}),void i.removeChild(t);if("pattern"===t.nodeName)return e.push({node:t,parent:i,sibling:t.nextSibling}),void i.removeChild(t);for(let i=t.childNodes.length-1;i>=0;i--)this.RemoveNodesRecursively(t.childNodes[i],e)}}SetClipRect(t,e,i,n){if(this.ClearClipRect(),i&&n){const s=Utils1.MakeGuid(),a=new T3Svg.Container(T3Svg.create("clipPath"));a.attr("id",s);const o=new T3Svg.Rect;o.transform({x:Utils1.RoundCoord(t),y:Utils1.RoundCoord(e)}),o.size(Utils1.RoundCoord(i),Utils1.RoundCoord(n)),a.add(o),this.svgObj.add(a),this.svgObj.attr("clip-path","url(#"+s+")"),this.clipElem=a}}ClearClipRect(){this.clipElem&&(this.svgObj.remove(this.clipElem),this.svgObj.node.removeAttribute("clip-path"),this.clipElem=null)}GetTargetForEvent(t){if(!(t&&this instanceof Container))return this;let e=t.target||t.srcElement;const i=this.DOMElement();if(!e||e===i)return this;let n=this.FindElementByDOMElement(e);for(;e&&!n;)e=e.parentNode,n=e===i?this:this.FindElementByDOMElement(e);return n||this}RefreshPaint(t){if(this.fillPatternData?this.UpdatePattern(this.fillPatternData.ID,!0):this.fillGradientData&&this.UpdateGradient(this.fillGradientData.ID,!0),this.strokePatternData?this.UpdatePattern(this.strokePatternData.ID,!1):this.strokeGradientData&&this.UpdateGradient(this.strokeGradientData.ID,!1),t&&this instanceof Group){const e=this.ElementCount();for(let i=0;i<e;i++){const e=this.GetElementByIndex(i);e&&e.RefreshPaint(t)}}}}class Layer extends Container{constructor(){super(),this.scaleOKFlag=!0,this.dpiScaleOnlyFlag=!1}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.InitElement(t,e),this.svgObj}AllowScaling(t){this.scaleOKFlag=t,t&&(this.dpiScaleOnlyFlag=!1)}AllowDpiScalingOnly(t){this.dpiScaleOnlyFlag=t,t&&(this.scaleOKFlag=!1)}IsScalingAllowed(){return this.scaleOKFlag}IsDpiScalingAllowed(){return this.dpiScaleOnlyFlag}}class Symbol$1 extends Element$1{constructor(){super()}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.shapeElem=new T3Svg.Container(T3Svg.create("g")),this.svgObj.add(this.shapeElem),this.InitElement(t,e),this.fillColors=[],this.lineColors=[],this.lineWidths=[],this.solidFills=[],this.fillTrans=[],this.lineTrans=[],this.srcSymbolSvg="",this.strokeColors=[],this.svgObj}InitSymbolSource(){var t=this.GetSymbolSource(),e="object-svg";if(this.drawSetting&&(this.drawSetting.active&&this.drawSetting.inAlarm?e=`${e} active in-alarm`:this.drawSetting.active?e=`${e} active`:this.drawSetting.inAlarm&&(e=`${e} in-alarm`)),""!==e){t=`\n          <g class="${e}">\n                    ${t}\n          </g>\n        `}this.drawSetting&&this.drawSetting.fillColor?(this.SetSymbolSource(t),this.SetFillColor(this.drawSetting.fillColor,!0)):(this.SetSymbolSource(t),this.RebuildSymbol())}GetSymbolSource(t){return null==t||""===t?ToolSvgData.GetSvgDataString(this.symbolName):t}SetSymbolSource(t){if(this.srcSymbolSvg=t,this.fillColors=Symbol$1.GetPlaceholders(BConstant.Placeholder.FillColor,t),this.lineColors=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineColor,t),this.lineWidths=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineThick,t),this.solidFills=Symbol$1.GetPlaceholders(BConstant.Placeholder.SolidFill,t),this.fillTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.FillTrans,t),this.lineTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineTrans,t),this.strokeColors=Symbol$1.GetPlaceholders(BConstant.Placeholder.StrokeColor,t),t){t=t.replace(/fill-opacity="[\d.]*"/g,"").replace(/stroke-opacity="[\d.]*"/g,"");const e=Symbol$1.CreatePlaceholder(BConstant.Placeholder.FillTrans,BConstant.PlaceholderDefault[BConstant.Placeholder.FillTrans]);t=t.replace(new RegExp('fill="##FillColor',"g"),'fill-opacity="'+e+'" fill="##FillColor'),this.fillTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.FillTrans,t);const i=Symbol$1.CreatePlaceholder(BConstant.Placeholder.LineTrans,BConstant.PlaceholderDefault[BConstant.Placeholder.LineTrans]);t=t.replace(new RegExp('stroke="##LineColor',"g"),'stroke-opacity="'+i+'" stroke="##LineColor').replace(new RegExp('fill="##LineColor',"g"),'fill-opacity="'+i+'" fill="##LineColor'),this.lineTrans=Symbol$1.GetPlaceholders(BConstant.Placeholder.LineTrans,t),this.srcSymbolSvg=t}}RebuildSymbol(){let t=`<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>${this.srcSymbolSvg}</svg>`;const e=new DOMParser;this.shapeElem.clear(),this.svgObj.clear(),this.svgObj.add(this.shapeElem),t=Symbol$1.ReplacePlaceholder(this.fillColors,t),t=Symbol$1.ReplacePlaceholder(this.lineColors,t),t=Symbol$1.ReplacePlaceholder(this.lineWidths,t),t=Symbol$1.ReplacePlaceholder(this.solidFills,t),t=Symbol$1.ReplacePlaceholder(this.fillTrans,t),t=Symbol$1.ReplacePlaceholder(this.lineTrans,t),t=Symbol$1.ReplacePlaceholder(this.strokeColors,t),e.async=!1;let i=e.parseFromString(t,"text/xml").documentElement.firstChild;for(;i;)this.shapeElem.node.appendChild(this.svgObj.node.ownerDocument.importNode(i,!0)),i=i.nextSibling;this.svgContent=t}GetScaleElement(){return this.shapeElem}SetFillColor(t,e){LogUtil.Debug("= B.Symbol SetFillColor | color,skipClear",t,e);let i=!1;e||this.ClearColorData(!0);for(let n=0;n<this.fillColors.length;n++)this.fillColors[n].val=t,i=!0;if(t.startsWith("#"))for(let n=0;n<this.solidFills.length;n++)this.solidFills[n].val=t,i=!0;i&&this.RebuildSymbol()}SetTextureFill(t){Instance.Basic.Element.SetTextureFill.call(this,t);const e=this.svgObj.attr("fill");this.svgObj.attr("fill",""),this.fillPatternData&&this.fillPatternData.patternElem&&(this.svgObj.remove(this.fillPatternData.patternElem),this.SetFillColor(e,!0),this.svgObj.add(this.fillPatternData.patternElem,0))}SetGradientFill(t){Instance.Basic.Element.SetGradientFill.call(this,t);const e=this.svgObj.attr("fill");this.svgObj.attr("fill",""),this.fillGradientData&&this.fillGradientData.gradientElem&&(this.svgObj.remove(this.fillGradientData.gradientElem),this.SetFillColor(e,!0),this.svgObj.add(this.fillGradientData.gradientElem,0))}SetStrokeColor(t,e){e||this.ClearColorData(!1);for(let i=0;i<this.strokeColors.length;i++)this.strokeColors[i].val=t;this.strokeColors.length&&this.RebuildSymbol()}SetTextureStroke(t){Instance.Basic.Element.SetTextureStroke.call(this,t);const e=this.svgObj.attr("stroke");this.svgObj.attr("stroke",""),this.strokePatternData&&this.strokePatternData.patternElem&&(this.svgObj.remove(this.strokePatternData.patternElem),this.SetStrokeColor(e,!0),this.svgObj.add(this.strokePatternData.patternElem,0))}SetGradientStroke(t){Instance.Basic.Element.SetGradientStroke.call(this,t);const e=this.svgObj.attr("stroke");this.svgObj.attr("stroke",""),this.strokeGradientData&&this.strokeGradientData.gradientElem&&(this.svgObj.remove(this.strokeGradientData.gradientElem),this.SetStrokeColor(e,!0),this.svgObj.add(this.strokeGradientData.gradientElem,0))}SetStrokeWidth(t){isNaN(Number(t))&&(t=Number(Symbol$1.ParsePlaceholder(t,BConstant.Placeholder.LineThick)));for(let e=0;e<this.lineWidths.length;e++)this.lineWidths[e].val=t;this.lineWidths.length&&this.RebuildSymbol()}SetFillOpacity(t){for(let e=0;e<this.fillTrans.length;e++)this.fillTrans[e].val=t;this.fillTrans.length&&this.RebuildSymbol()}SetStrokeOpacity(t){for(let e=0;e<this.lineTrans.length;e++)this.lineTrans[e].val=t;this.lineTrans.length&&this.RebuildSymbol()}SetStrokePattern(t){}SetAttributes(t){this.svgObj.attr("background-color",t),this.shapeElem.attr("background-color",t)}GetSvgSymbol(){return this.svgContent}SetInActive(t){}SetDrawSetting(t){this.drawSetting=t,LogUtil.Debug("= B.Symbol SetDrawSetting Input/Output drawSetting",t)}RefreshDrawSetting(){LogUtil.Debug("= B.Symbol RefreshDrawSetting src-symbol-svg",this.srcSymbolSvg),this.InitSymbolSource()}SetSymbolName(t){this.symbolName=t}static CreatePlaceholder(t,e=""){return`${t}=${e}${BConstant.Placeholder.Terminator}`}static ParsePlaceholder(t,e){const i=t.indexOf("=")+1,n=t.lastIndexOf(BConstant.Placeholder.Terminator);let s=BConstant.PlaceholderDefault[e];return i>0&&n>i&&(s=t.slice(i,n)),s}static GetPlaceholders(t,e){const i=[];if(!e)return i;try{const n=e.match(new RegExp(`${t}.*?##`,"g"));if(n)for(let e=0;e<n.length;e++)i.push({placeholder:n[e],val:Symbol$1.ParsePlaceholder(n[e],t)})}catch(n){T3Util.Error("= b.Symbol: GetPlaceholders/ Error getting placeholders:",n)}return i}static ReplacePlaceholder(t,e){let i=e;if(!e)return i;for(let n=0;n<t.length;n++)i=i.replace(new RegExp(t[n].placeholder,"g"),t[n].val);return i}}class ShapeContainer$1 extends Group{constructor(){super()}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.InitElement(t,e),this.shapeGroup=new Group,this.shapeGroup.CreateElement(t,e),super.AddElement(this.shapeGroup),this.svgObj}AddElement(t,e,i){return i?super.AddElement(t,e):this.shapeGroup?this.shapeGroup.AddElement(t,e):void 0}RemoveElement(t,e){return e?super.RemoveElement(t):this.shapeGroup?this.shapeGroup.RemoveElement(t):void 0}RemoveAll(t){return t?super.RemoveAll():this.shapeGroup?this.shapeGroup.RemoveAll():void 0}RemoveElementByInternalId(t,e){return e?super.RemoveElementByInternalId(t):this.shapeGroup?this.shapeGroup.RemoveElementByInternalId(t):void 0}ElementCount(t){return t?super.ElementCount():this.shapeGroup?this.shapeGroup.ElementCount():0}GetElementByIndex(t,e){return e?super.GetElementByIndex(t):this.shapeGroup?this.shapeGroup.GetElementByIndex(t):null}GetElementById(t,e,i){return e?super.GetElementById(t,i):this.shapeGroup?this.shapeGroup.GetElementById(t,i):null}GetElementByIdInGroup(t,e){return e?super.GetElementByIdInGroup(t):this.shapeGroup?this.shapeGroup.GetElementByIdInGroup(t):null}GetElementListWithId(t,e){return e?super.GetElementListWithId(t):this.shapeGroup?this.shapeGroup.GetElementListWithId(t):[]}GetElementByInternalId(t,e){return e?super.GetElementByInternalId(t):this.shapeGroup?this.shapeGroup.GetElementByInternalId(t):null}FindElement(t,e){return e?super.FindElement(t):this.shapeGroup?this.shapeGroup.FindElement(t):null}FindElementByDOMElement(t,e){return e?super.FindElementByDOMElement(t):this.shapeGroup?this.shapeGroup.FindElementByDOMElement(t):null}GetElementIndex(t,e){return e?super.GetElementIndex(t):this.shapeGroup?this.shapeGroup.GetElementIndex(t):-1}MoveElementForward(t,e){return e?super.MoveElementForward(t):this.shapeGroup?this.shapeGroup.MoveElementForward(t):void 0}MoveElementBackward(t,e){return e?super.MoveElementBackward(t):this.shapeGroup?this.shapeGroup.MoveElementBackward(t):void 0}MoveElementToFront(t,e){return e?super.MoveElementToFront(t):this.shapeGroup?this.shapeGroup.MoveElementToFront(t):void 0}MoveElementToBack(t,e){return e?super.MoveElementToBack(t):this.shapeGroup?this.shapeGroup.MoveElementToBack(t):void 0}}class ShapeCopy extends Element$1{constructor(){super(),this.svgObj=null,this.shapeElem=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("use")),this.InitElement(t,e),this.svgObj}SetElementSource(t){const e=t.SetInternalID();this.svgObj.attr("xlink:href",`#${e}`,"http://www.w3.org/1999/xlink")}}class DefaultFmtText{constructor(){this.width=0,this.height=0,this.fmtWidth=0,this.text="",this.paragraphs=[],this.styles=[],this.hyperlinks=[]}}class DefaultRtText{constructor(){this.text="",this.charStyles=[],this.styleRuns=[],this.styles=[new DefaultStyle],this.hyperlinks=[]}}class Formatter{constructor(t){this.parent=t,this.limits={minWidth:0,maxWidth:0},this.fmtText=new DefaultFmtText,this.rtData=new DefaultRtText,this.renderedLines=[],this.wordList=null,this.renderingEnabled=!0,this.deferredRenderNeeded=!1,this.contentVersion=0,this.spellCheckEnabled=!1,this.dataNameEnabled=!1}SetLimits(t){this.limits.minWidth=void 0!==t.minWidth?t.minWidth:this.limits.minWidth,this.limits.maxWidth=void 0!==t.maxWidth?t.maxWidth:this.limits.maxWidth,this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)}SetRenderingEnabled(t){let e=[];if(this.renderingEnabled=t,t&&this.deferredRenderNeeded){for(let t=0;t<this.rtData.styleRuns.length;t++)e.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[t].pStyle)});this.BuildRuntimeRuns(this.rtData,e),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits),this.UpdateSpellCheckFormatting(),this.deferredRenderNeeded=!1}}SetText(t,e,i,n,s){let a="",o=this.DefaultPStyle(),r=[],l=-1,h=-1,c=!1,u="",d="";t=String(t).replace(/(\r\n|\r|\u2028|\u2029)/g,"\n").replace(/([\u0000-\u0008]|[\u000B-\u001F])/g,""),null==i?i=0:(i<0||i>this.rtData.text.length)&&(i=this.rtData.text.length),(null==n||n>this.rtData.text.length-i)&&(n=this.rtData.text.length-i),"number"==typeof e?l=e:!this.rtData.text.length||i>=this.rtData.text.length-1?(l=Math.max(this.rtData.styles.length-1,0),c=!0):n>0?(l=this.GetFormatAtOffset(i).id,h=this.GetFormatAtOffset(i+n).id):(l=this.GetFormatAtOffset(i-1).id,h=this.GetFormatAtOffset(i).id),0===i&&(c=!0),h<0&&(h=l);const p=this.GetTextParagraphCount(t),g=this.GetParagraphAtOffset(i);g>=0&&(o=this.rtData.styleRuns[g].pStyle);for(let f=0;f<p;f++)r.push({pStyle:Utils1.CopyObj(o)});if(r=this.MergeParagraphInfo(r,i,n),i===this.rtData.text.length?a=this.rtData.text+t:(i>0&&(u=this.rtData.text.slice(0,i)),i+n<this.rtData.text.length&&(d=this.rtData.text.slice(i+n)),a=u+t+d),s||!1!==this.parent.CallEditCallback("onbeforeinsert",a)){this.rtData.text=a,this.contentVersion++,this.rtData.styles.length||(this.rtData.styles=[new DefaultStyle]);let s=this.GetFormatByID(l),o=this.GetFormatByID(h);if(s.hyperlink!==o.hyperlink&&(c=!0),(s.dataField||c)&&(s=Utils1.CopyObj(s),s.dataField=null,c&&(s.hyperlink=-1),l=this.FindAddStyle(s)),t.length){const s=new Array(t.length).fill(l);this.rtData.charStyles.splice(i,n,...s),e&&"object"==typeof e&&this.SetFormat(e,i,t.length)}else if(n&&(this.rtData.charStyles.splice(i,n),!this.rtData.text.length)){e&&"object"==typeof e&&(e.hyperlink=-1,e.dataField=null,l=this.SetFormat(e,0,0));const t=this.GetFormatByID(l);this.rtData.styles=[Utils1.CopyObj(t)]}const u=this.renderingEnabled;this.SetRenderingEnabled(!1),this.BuildRuntimeRuns(this.rtData,r),this.AdjustSpellCheck(t),u&&this.SetRenderingEnabled(!0)}}GetText(t,e){let i="";return this.rtData.text.length&&(null==t?t=0:t>=this.rtData.text.length&&(t=this.rtData.text.length-1),(!e||t+e>this.rtData.text.length)&&(e=this.rtData.text.length-t),i=this.rtData.text.substr(t,e)),i}SetRuntimeText(t,e,i,n){let s="",a="",o="",r=[],l=[];if(t.styles&&t.styles.length){null==e?e=0:(e<0||e>this.rtData.text.length)&&(e=this.rtData.text.length),(null==i||i>this.rtData.text.length-e)&&(i=this.rtData.text.length-e);const h=0===e&&i===this.rtData.text.length;if(e===this.rtData.text.length?s=this.rtData.text+t.text:(e>0&&(a=this.rtData.text.slice(0,e)),e+i<this.rtData.text.length&&(o=this.rtData.text.slice(e+i)),s=a+t.text+o),!1!==this.parent.CallEditCallback("onbeforeinsert",s)){if(this.rtData.text=s,this.contentVersion++,l=this.MergeParagraphInfo(t.paraInfo,e,i),t.hyperlinks.forEach((t=>{this.rtData.hyperlinks.push(String(t)),r.push(this.rtData.hyperlinks.length-1)})),t.styles.forEach((t=>{t.hyperlink>=0&&t.hyperlink<r.length?t.hyperlink=r[t.hyperlink]:t.hyperlink=-1})),t.text.length){let n=Utils1.CopyObj(t.charStyles),s=new Array(t.styles.length),a=n.length;for(let e=0;e<a;e++){let i=n[e],a=s[i];void 0===a&&(i<t.styles.length?(a=this.FindAddStyle(t.styles[i]),s[i]=a):(a=0,s[i]=a)),n[e]=a}this.rtData.charStyles.splice(e,i,...n)}else i?this.rtData.charStyles.splice(e,i):this.rtData.styles[0]=Utils1.DeepCopy(t.styles[0]);n||(this.parent.vAlign=t.vAlign),!this.parent.internalID&&t.internalID&&(this.parent.internalID=t.internalID),h&&(this.contentVersion=t.contentVersion);const a=this.renderingEnabled;this.SetRenderingEnabled(!1),this.BuildRuntimeRuns(this.rtData,l),this.AdjustSpellCheck(),a&&this.SetRenderingEnabled(!0)}}else this.SetText(t.text,null,e,i)}GetRuntimeText(t,e){let i={text:"",charStyles:[],styles:[],hyperlinks:[],paraInfo:[],vAlign:"",internalID:"",contentVersion:0};null==t?t=0:t>=this.rtData.text.length&&(t=this.rtData.text.length-1),(!e||t+e>this.rtData.text.length)&&(e=this.rtData.text.length-t);const n=t+e,s=this.GetParagraphAtOffset(t),a=this.GetParagraphAtOffset(n);this.rtData.styles.forEach((t=>{i.styles.push(Utils1.CopyObj(t))})),i.styles.length||i.styles.push(new DefaultStyle),this.rtData.hyperlinks.forEach((t=>{i.hyperlinks.push(Utils1.CopyObj(t))})),i.text=this.rtData.text.substr(t,e),i.charStyles=this.rtData.charStyles.slice(t,t+e);const o=Math.max(this.GetBulletIndent(),8);for(let r=s;r<=a;r++){let t=Utils1.CopyObj(this.rtData.styleRuns[r].pStyle);t.bindent="none"===t.bullet?0:o,i.paraInfo.push({pStyle:t,offset:this.rtData.styleRuns[r].start})}for(let r=0;r<i.styles.length;r++)if(i.styles[r].spError){let t=Utils1.CopyObj(i.styles[r]);t.spError=!1;let e=this.FindAddStyle(t,!0);if(e<0)i.styles[r].spError=!1;else for(let n=0;n<i.charStyles.length;n++)i.charStyles[n]===r&&(i.charStyles[n]=e)}return this.TrimUnusedStyles(i),i.vAlign=this.parent.GetVerticalAlignment(),i.internalID=this.parent.internalID,i.contentVersion=this.contentVersion,i}DeleteText(t,e){this.SetText("",null,t,e)}GetTextLength(){return this.rtData.text.length}GetTextFormatSize(){let t=Math.max(this.fmtText.width,this.limits.minWidth);return this.limits.maxWidth&&(t=Math.min(t,this.limits.maxWidth)),{width:t,height:this.fmtText.height}}GetContentVersion(){return this.contentVersion}GetSpellCheckEnabled(){return this.spellCheckEnabled}SpellCheckValid(){return this.spellCheckEnabled&&this.parent.doc.spellChecker&&this.parent.doc.spellChecker.GetActive()&&this.parent.IsActive()}SetSpellCheck(t){this.spellCheckEnabled=t,t||this.UpdateSpellCheckFormatting()}UpdateSpellCheck(t){if(!this.SpellCheckValid())return this.UpdateSpellCheckFormatting(),void this.parent.CallEditCallback("spellcheck");const e=this.GetWordList();this.MergeWordLists(t,e),this.UpdateSpellCheckFormatting(),this.parent.CallEditCallback("spellcheck")}UpdateSpellCheckFormatting(){if(!this.SpellCheckValid())return this.SetFormat({spError:!1}),void(this.wordList=null);const t=this.GetWordList(),e=t.list.length;this.SetFormat({spError:!1},null,null,!0);for(let i=0;i<e;i++){const e=t.list[i].start,n=t.list[i].end;t.list[i].status!==BConstant.WordState.Wrong||this.IsDataFieldInRange(e,n)||this.SetFormat({spError:!0},e,t.list[i].word.length,!0)}if(this.renderingEnabled){const t=[];for(let e=0;e<this.rtData.styleRuns.length;e++)t.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[e].pStyle)});this.BuildRuntimeRuns(this.rtData,t),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)}}AdjustSpellCheck(t){let e=t&&1===t.length&&t.search(/[^\u0000-\u2FFF]|[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u0386-\u04FF\u1E00-\u1FFF]/)>=0,i=!1;if(this.SpellCheckValid()&&this.parent.IsActive()){let t=this.GetWordList();if(!e)for(let e=0;e<t.list.length;e++)if(t.list[e].status===BConstant.WordState.NotProcessed){i=!0;break}i?this.parent.DoSpellCheck():this.UpdateSpellCheckFormatting()}else this.wordList=null}GetSpellAtPoint(t){let e=null,i=null,n=-1;if(t.y<0||t.y>this.fmtText.height)return-1;for(let s=0;s<this.renderedLines.length;s++)if(t.y>=this.renderedLines[s].top&&t.y<=this.renderedLines[s].bottom){if(t.x<this.renderedLines[s].left||t.x>this.renderedLines[s].right)break;for(let n=0;n<this.renderedLines[s].runs.length;n++)if(t.x<=this.renderedLines[s].runs[n].right){e=this.renderedLines[s],i=this.renderedLines[s].runs[n];break}break}if(e&&i){this.BuildRuntimeCharPos(e,i);let s=i.charPos,a=i.left;n=i.runRec.dispStart;for(let e=0;e<s.length;e++){if(s[e]>t.x){(a+s[e])/2<t.x&&n++;break}a=s[e],n++}let o=this.GetFormatAtOffset(n);o&&o.style&&o.style.spError||(n=-1)}return n}CalcTextFit(t){let e,i={maxWidth:0};return t&&(i.maxWidth=t),e=this.CalcFromRuntime(this.rtData,i),{width:e.dispMinWidth,height:e.height}}CalcTextWrap(t){LogUtil.Debug("B.Text.Formatter: CalcTextWrap input:",t);let e={maxWidth:0};t&&(e.maxWidth=t);const i=this.CalcFromRuntime(this.rtData,e);let n,s,a;const o=[];for(n=0;n<i.paragraphs.length;n++){const t=i.paragraphs[n];for(t.lines.length||(a=t.start,o.push(a)),s=0;s<t.lines.length;s++)a=t.lines[s].start,o.push(a)}return LogUtil.Debug("B.Text.Formatter: CalcTextWrap output:",o),o}CalcFormatChange(t){LogUtil.Debug("B.Text.Formatter: CalcFormatChange input:",t);let e=Utils1.CopyObj(this.rtData),i=[];for(let a=0;a<e.styles.length;a++)e.styles[a]=this.MergeStyles(t,e.styles[a]);for(let a=this.fmtText.paragraphs.length-1;a>=0;a--){let t=this.fmtText.paragraphs[a];for(let i=t.lines.length-1;i>0;i--){let n=t.lines[i].start;0!==n&&(e.text=e.text.slice(0,n)+"\n"+e.text.slice(n),e.charStyles.splice(n,0,e.charStyles[n-1]))}}for(let a=0;a<this.rtData.styleRuns.length;a++)i.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[a].pStyle)});this.BuildRuntimeRuns(e,i);let n=this.CalcFromRuntime(e,{maxWidth:32e3}),s={width:n.width,height:n.height};return LogUtil.Debug("B.Text.Formatter: CalcFormatChange output:",s),s}GetHitInfo(t){LogUtil.Debug("B.Text.Formatter: GetHitInfo input:",t);let e=t.x,i=t.y,n=-1,s=-1,a={index:0,rLine:0,rRun:0,pRun:0,fPara:0,fLine:0,fRun:0,inDataField:!1,dataFieldInfo:null};if(i<0)return LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;if(i>this.fmtText.height)return a.index=this.fmtText.text.length,a.rLine=this.renderedLines.length,a.fPara=this.fmtText.paragraphs.length,LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;for(let d=0;d<this.renderedLines.length;d++)if(i>=this.renderedLines[d].top&&i<=this.renderedLines[d].bottom){n=d,s=-1;let t=this.renderedLines[d].runs.length;for(let i=0;i<t;i++)if(e<this.renderedLines[d].runs[i].right){s=i;break}break}if(n<0)return LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;a.rLine=n,a.rRun=s;let o=this.renderedLines[n],r=o.paraIndex,l=o.lineIndex;if(a.fPara=r,a.fLine=l,s<0)return a.pRun=0,a.rRun=0,this.fmtText.paragraphs[r].lines[l].runs.length>0?a.index=this.fmtText.paragraphs[r].lines[l].runs[0].dispStart:a.index=this.fmtText.paragraphs[r].lines[l].start,this.IsDataFieldAtPos(a.index)&&(a.inDataField=!0,a.dataFieldInfo=this.GetDataField(a.index)),LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a;let h=o.runs[s];a.fRun=h.runIndex,this.BuildRuntimeCharPos(o,h);let c=h.charPos.length,u=this.fmtText.paragraphs[r].lines[l].runs[h.runIndex];if(e<=h.left)a.index=u.dispStart;else{let t=u.dispStart,i=h.left;for(let n=0;n<c;n++){if(h.charPos[n]>e){(i+h.charPos[n])/2<e&&t++;break}i=h.charPos[n],t++}a.index=t}return LogUtil.Debug("B.Text.Formatter: GetHitInfo output:",a),a}GetAdjacentChar(t,e,i,n){LogUtil.Debug("B.Text.Formatter: GetAdjacentChar input:",{index:t,line:e,direction:i,event:n});let s,a,o,r,l,h=t,c=e,u=n&&n.ctrlKey,d=!0,p={x:0,y:0},g={index:h,line:c};if("prev"===i||"next"===i)switch(s=this.GetRenderedCharInfo(h,c),s.rLine>=0&&(a=this.renderedLines[s.rLine],a&&a.runs.length&&(r=a.runs[0].runRec.dispStart,l=a.runs[a.runs.length-1].runRec.dispStart+a.runs[a.runs.length-1].runRec.dispLen)),i){case"prev":h>0&&(u?(g.index=Formatter.FindPrevNextWord(this.fmtText.text,h,!0),g.index<r&&g.line--):g.index--),d=!1;break;case"next":h<this.fmtText.text.length&&(u?(g.index=Formatter.FindPrevNextWord(this.fmtText.text,h,!1),g.index>l&&g.line++):g.index++)}else if("home"===i||"end"===i)if(u)switch(g.line=void 0,i){case"home":g.index=0,d=!1;break;case"end":g.index=this.fmtText.text.length}else{if(s=this.GetRenderedCharInfo(h,c),s.rLine<0)return g;if(g.line=s.rLine,a=this.renderedLines[s.rLine],!a||!a.runs.length)return g;switch(r=a.runs[0].runRec.dispStart,l=a.runs[a.runs.length-1].runRec.dispStart+a.runs[a.runs.length-1].runRec.dispLen,i){case"home":g.index=r,d=!1;break;case"end":g.index=l}}else{if(s=this.GetRenderedCharInfo(h,c),s.rLine<0)return g;switch(r=h,l=h,u&&this.renderedLines[s.rLine]&&this.renderedLines[s.rLine].runs.length&&(a=this.renderedLines[s.rLine],r=a.runs[0].runRec.dispStart,l=a.runs[a.runs.length-1].runRec.dispStart+a.runs[a.runs.length-1].runRec.dispLen),i){case"up":if(s.rLine>0)if(a=this.renderedLines[s.rLine-1],u)r===h?a.runs.length&&(o=a.runs[0].runRec,g.index=o.dispStart,g.line=s.rLine-1):(g.index=r,g.line=s.rLine);else{let t=a.lineRec;p.x=s.left,p.y=t.yOffset+t.height/2;let e=this.GetHitInfo(p);e.index>=0&&(g.index=e.index,g.line=s.rLine-1)}else u&&(g.index=r,g.line=s.rLine);d=!1;break;case"down":if(s.rLine<this.renderedLines.length-1)if(a=this.renderedLines[s.rLine+1],u)a.runs.length&&(o=a.runs[0].runRec,g.index=o.dispStart,g.line=s.rLine+1);else{let t=a.lineRec;p.x=s.left,p.y=t.yOffset+t.height/2;let e=this.GetHitInfo(p);e.index>=0&&(g.index=e.index,g.line=s.rLine+1)}else u&&(g.index=l,g.line=s.rLine)}}if(g.index>0&&g.index<this.fmtText.text.length){let t=this.GetDataField(g.index);if(t){let e=g.index;d?g.index>t.startPos&&(g.index=t.endPos):g.index=t.startPos,e!==g.index&&(s=this.GetRenderedCharInfo(g.index),s.rLine>=0&&(d&&s.rLine>g.line||!d&&s.rLine<g.line)&&(g.line=s.rLine))}}return LogUtil.Debug("B.Text.Formatter: GetAdjacentChar output:",g),g}GetRenderedCharInfo(t,e){let i,n,s,a;LogUtil.Debug("B.Text.Formatter: GetRenderedCharInfo input:",{charIndex:t,lineIndex:e});const o=this.GetTextFormatSize(),r={rLine:-1,rRun:-1,rChar:-1,left:0,right:0,top:0,bottom:0};if(t<0){if(void 0===e)return r;r.rLine=e,n=(i=this.renderedLines[e]).lineRec}else for(let l=0;l<this.renderedLines.length&&(r.rLine=l,n=(i=this.renderedLines[l]).lineRec,!(t<n.start+n.length));l++);if(r.rLine<0)return r;if(r.rLine>0&&t>=0&&t<i.dispStart&&(r.rLine--,n=(i=this.renderedLines[r.rLine]).lineRec),(void 0===e||e<0)&&(e=-2),t===n.start&&e===r.rLine-1&&(r.rLine=e,n=(i=this.renderedLines[r.rLine]).lineRec),r.top=Math.max(0,Math.min(o.height,i.top)),r.bottom=Math.max(0,Math.min(o.height,i.bottom)),t<0)return r.left=Math.max(0,Math.min(o.width,i.left)),r.right=Math.max(0,Math.min(o.width,i.right)),LogUtil.Debug("B.Text.Formatter: GetRenderedCharInfo output:",r),r;for(let l=0;l<i.runs.length&&(r.rRun=l,s=(a=i.runs[l]).runRec,!(t<s.start+s.length));l++);return r.rRun<0?(r.left=i.left,r.right=i.left):t>=n.start+n.length?(r.left=i.right,r.right=i.right,r.rChar=n.length):(this.BuildRuntimeCharPos(i,a),r.rChar=t-s.dispStart,r.rChar<0?(r.rChar=-1,r.left=a.left,r.right=a.left):r.rChar>=a.charPos.length?(r.rChar=a.charPos.length,r.rChar>0?(r.left=a.charPos[r.rChar-1],r.right=r.left):(r.left=a.right,r.right=a.right)):(r.left=a.left,r.right=a.charPos[r.rChar],r.rChar>0&&(r.left=a.charPos[r.rChar-1]))),r.left=Math.max(0,Math.min(o.width,r.left)),r.right=Math.max(0,Math.min(o.width,r.right)),LogUtil.Debug("B.Text.Formatter: GetRenderedCharInfo output:",r),r}GetRenderedRange(t,e){LogUtil.Debug("B.Text.Formatter: GetRenderedRange input:",{startIndex:t,endIndex:e});let i=[];if(t>e||t<0||e<0)return i;let n=this.GetRenderedCharInfo(t),s=this.GetRenderedCharInfo(e);if(n.rLine===s.rLine)i.push({left:n.left,top:n.top,right:s.left,bottom:s.bottom});else for(let a=n.rLine;a<=s.rLine;a++){let t=this.GetRenderedCharInfo(-1,a),e={left:t.left,top:t.top,right:t.right,bottom:t.bottom};a===n.rLine?e.left=n.left:a===s.rLine&&(e.right=s.left),i.push(e)}for(let a=0;a<i.length;a++)i[a].left<0&&(i[a].left=0),i[a].right<i[a].left&&(i[a].right=i[a].left),this.limits.maxWidth&&i[a].right>this.limits.maxWidth&&(i[a].right=this.limits.maxWidth);return LogUtil.Debug("B.Text.Formatter: GetRenderedRange output:",i),i}BuildRuntimeCharPos(t,e){LogUtil.Debug("B.Text.Formatter: BuildRuntimeCharPos input:",{line:t,run:e});let i=[],n=e.left;const s=e.elem?e.elem.node:null,a=e.runRec;e.isTab&&t.pStyle.tabspace&&(n-=n%t.pStyle.tabspace);for(let o=0;s&&o<a.dispLen;o++)e.isTab?n+=t.pStyle.tabspace:n=e.left+Formatter.GetRunPositionForChar(s,o,!1,e.cache,e.left),i.push(n);for(let o=a.length-(a.dispStart-a.start),r=i.length;r<o;r++){const s=a.dispStart+r;if(e.isTab)n+=t.pStyle.tabspace;else{if(" "!==this.fmtText.text[s])break;n+=a.space}i.push(n)}e.charPos=i,LogUtil.Debug("B.Text.Formatter: BuildRuntimeCharPos output:",e.charPos)}GetWordAtIndex(t){LogUtil.Debug("B.Text.Formatter: GetWordAtIndex input:",t);let e=this.GetWordList(),i={start:t,end:t};for(let n=0;n<e.list.length;n++)if(t>=e.list[n].start&&t<e.list[n].end){i.start=e.list[n].start,i.end=e.list[n].end;break}return LogUtil.Debug("B.Text.Formatter: GetWordAtIndex output:",i),i}GetWordList(){let t;return LogUtil.Debug("B.Text.Formatter: GetWordList input"),this.wordList&&this.wordList.sessionID===this.GetContentVersion()?(LogUtil.Debug("B.Text.Formatter: GetWordList output:",this.wordList),this.wordList):(t=this.wordList,this.wordList=this.BuildWordList(),t&&this.MergeWordLists(t,this.wordList),LogUtil.Debug("B.Text.Formatter: GetWordList output:",this.wordList),this.wordList)}MergeWordLists(t,e){LogUtil.Debug("B.Text.Formatter: MergeWordLists input:",{newWordList:t,currentWordList:e});for(let i=0;i<t.list.length;i++){const n=t.list[i];for(let t=0;t<e.list.length;t++){const i=e.list[t];if(i.word===n.word){i.status=n.status,i.auto=n.auto,i.needSuggest=n.needSuggest,i.suggestions=n.suggestions;break}}}LogUtil.Debug("B.Text.Formatter: MergeWordLists output:",e)}BuildWordList(){let t;LogUtil.Debug("B.Text.Formatter: BuildWordList input");const e={textID:this.parent.GetInternalID(),sessionID:this.GetContentVersion(),list:[]},i=/(([^\u0000-\u2FFF]|[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u0386-\u04FF\u1E00-\u1FFF])+)(([\u0027\u0060\u2018\u2019\u2032](([^\u0000-\u2FFF]|[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F\u0386-\u04FF\u1E00-\u1FFF])+))*)/g;for(;null!==(t=i.exec(this.rtData.text));){const i=t[0].replace(/[\u0027\u0060\u2018\u2019\u2032]/g,"'");e.list.push({word:i,start:t.index,end:t.index+t[0].length,status:BConstant.WordState.NotProcessed,auto:!1,needSuggest:!0,suggestions:null})}return LogUtil.Debug("B.Text.Formatter: BuildWordList output:",e),e}SetFormat(t,e,i,n){LogUtil.Debug("B.Text.Formatter: SetFormat input:",{format:t,start:e,length:i,skipCallback:n});let s=-1,a=!1;if(0===t.size)return-1;if(null==e?e=0:e>=this.rtData.text.length&&(e=this.rtData.text.length-1),(null==i||e+i>this.rtData.text.length)&&(i=this.rtData.text.length-e),t.font&&!t.type&&(t.type=this.parent.doc.GetFontType(t.font)),i<=0){if(s=this.SetRuntimeCharFormat(e,t,!1),0===this.rtData.text.length){const t=this.rtData.styles[s];this.rtData.styles=[t],s=0}return LogUtil.Debug("B.Text.Formatter: SetFormat output:",s),s}for(let r=0;r<i;r++){const i=r+e;this.rtData.charStyles[i]!==this.SetRuntimeCharFormat(i,t,!0)&&(a=!0)}if(n||!a)return LogUtil.Debug("B.Text.Formatter: SetFormat output: No format change"),-1;s=this.rtData.styles.length-1;for(let r=0;r<this.rtData.charStyles.length;r++)if(0===r)s=this.rtData.charStyles[r];else if(this.rtData.charStyles[r]!==s){s=-1;break}if(s>=0){const t=this.rtData.styles[s];this.rtData.styles=[t];for(let e=0;e<this.rtData.charStyles.length;e++)this.rtData.charStyles[e]=0}const o=[];return this.rtData.styleRuns.forEach((t=>{o.push({pStyle:t.pStyle})})),this.BuildRuntimeRuns(this.rtData,o),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits),this.parent.CallEditCallback("select"),LogUtil.Debug("B.Text.Formatter: SetFormat output:",-1),-1}GetFormatAtOffset(t,e){LogUtil.Debug("B.Text.Formatter: GetFormatAtOffset input:",{offset:t,runtimeData:e});let i=0,n=new DefaultStyle;t>=(e=e||this.rtData).charStyles.length&&(t=e.charStyles.length-1),t<0&&(t=0),t<e.charStyles.length?(i=e.charStyles[t],i<e.styles.length&&(n=e.styles[i])):e.styles.length>0&&(i=e.styles.length-1,n=e.styles[i]);const s={id:i,style:n};return LogUtil.Debug("B.Text.Formatter: GetFormatAtOffset output:",s),s}GetFormatByID(t){LogUtil.Debug("B.Text.Formatter: GetFormatByID input:",t);let e=new DefaultStyle;return t>=0&&t<this.rtData.styles.length&&(e=this.rtData.styles[t]),LogUtil.Debug("B.Text.Formatter: GetFormatByID output:",e),e}SetParagraphStyle(t,e,i){let n,s;if(LogUtil.Debug("B.Text.Formatter: SetParagraphStyle input:",{paragraphStyle:t,startOffset:e,length:i}),null==e?e=0:e>this.rtData.text.length&&(e=this.rtData.text.length),(null==i||e+i>this.rtData.text.length)&&(i=this.rtData.text.length-e),n=this.GetParagraphAtOffset(e),s=this.GetParagraphAtOffset(e+i),n>=0){t.bullet&&"none"!==t.bullet&&(t.lindent=0,t.pindent=0);for(let e=n;e<=s;e++)void 0!==t.just&&(this.rtData.styleRuns[e].pStyle.just=t.just),void 0!==t.bullet&&(this.rtData.styleRuns[e].pStyle.bullet=t.bullet),void 0!==t.spacing&&(this.rtData.styleRuns[e].pStyle.spacing=Number(t.spacing)),void 0!==t.pindent&&(this.rtData.styleRuns[e].pStyle.pindent=Number(t.pindent)),void 0!==t.lindent&&(this.rtData.styleRuns[e].pStyle.lindent=Number(t.lindent)),void 0!==t.rindent&&(this.rtData.styleRuns[e].pStyle.rindent=Number(t.rindent)),void 0!==t.tabspace&&(this.rtData.styleRuns[e].pStyle.tabspace=Number(t.tabspace));this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)}LogUtil.Debug("B.Text.Formatter: SetParagraphStyle output:",this.fmtText)}GetParagraphStyle(t){LogUtil.Debug("B.Text.Formatter: GetParagraphStyle input:",t);let e=this.DefaultPStyle();const i=this.GetParagraphAtOffset(t);return i>=0&&(e=Utils1.CopyObj(this.rtData.styleRuns[i].pStyle)),LogUtil.Debug("B.Text.Formatter: GetParagraphStyle output:",e),e}GetParagraphAtOffset(t){LogUtil.Debug("B.Text.Formatter: GetParagraphAtOffset input:",t);for(let i=0;i<this.rtData.styleRuns.length;i++)if(t<this.rtData.styleRuns[i].start+this.rtData.styleRuns[i].nChars)return LogUtil.Debug("B.Text.Formatter: GetParagraphAtOffset output:",i),i;const e=this.rtData.styleRuns.length-1;return LogUtil.Debug("B.Text.Formatter: GetParagraphAtOffset output:",e),e}GetParagraphCount(){LogUtil.Debug("B.Text.Formatter: GetParagraphCount input");const t=this.rtData.styleRuns.length;return LogUtil.Debug("B.Text.Formatter: GetParagraphCount output:",t),t}GetParagraphPosition(t){LogUtil.Debug("B.Text.Formatter: GetParagraphPosition input:",t);const e=t<this.rtData.styleRuns.length?this.rtData.styleRuns[t].start:-1;return LogUtil.Debug("B.Text.Formatter: GetParagraphPosition output:",e),e}GetCommonFormatForRange(t,e){LogUtil.Debug("B.Text.Formatter: GetCommonFormatForRange input:",{startIndex:t,length:e});let i,n,s={};if((void 0===t||t<0)&&(t=0),(void 0===e||e<0||e>this.rtData.charStyles.length-t)&&(e=Math.max(this.rtData.charStyles.length-t,0)),!e||t>=this.rtData.charStyles.length)s=Utils1.CopyObj(this.GetFormatAtOffset(t-1).style);else{i=this.rtData.charStyles[t],i>=0&&i<this.rtData.styles.length&&(s=Utils1.CopyObj(this.rtData.styles[i]));for(let a=1;a<e;a++)n=this.rtData.charStyles[t+a],n!==i&&(i=n,s=this.AndStyles(s,this.rtData.styles[n]))}return LogUtil.Debug("B.Text.Formatter: GetCommonFormatForRange output:",s),s}GetFormatRangeAtIndex(t,e){LogUtil.Debug("B.Text.Formatter: GetFormatRangeAtIndex input:",{format:t,index:e});let i=e,n=e,s=-1;const a=this.rtData.charStyles.length;if(!this.IsFormatAtIndex(t,e))return LogUtil.Debug("B.Text.Formatter: GetFormatRangeAtIndex output:",{start:-1,end:-1}),{start:-1,end:-1};for(let r=e-1;r>=0;r--){const e=this.rtData.charStyles[r];if(e!==s&&!this.IsFormatAtIndex(t,r))break;i=r,s=e}s=-1;for(let r=e+1;r<a;r++){const e=this.rtData.charStyles[r];if(e!==s&&!this.IsFormatAtIndex(t,r))break;n=r,s=e}const o={start:i,end:n};return LogUtil.Debug("B.Text.Formatter: GetFormatRangeAtIndex output:",o),o}IsFormatAtIndex(t,e){LogUtil.Debug("B.Text.Formatter: IsFormatAtIndex input:",{format:t,index:e});const i=this.GetFormatAtOffset(e),n=this.MatchPartialStyles(i.style,t);return LogUtil.Debug("B.Text.Formatter: IsFormatAtIndex output:",n),n}GetFormatTextMinDimensions(){LogUtil.Debug("B.Text.Formatter: GetFormatTextMinDimensions input");const t={width:this.fmtText.width,height:this.fmtText.height};return LogUtil.Debug("B.Text.Formatter: GetFormatTextMinDimensions output:",t),t}SetHyperlink(t,e,i){LogUtil.Debug("B.Text.Formatter: SetHyperlink input:",{url:t,startOffset:e,length:i});let n,s,a,o,r=!1;null==e?e=0:e>=this.rtData.text.length&&(e=this.rtData.text.length-1),o=null==i||e+i>this.rtData.text.length?this.rtData.text.length:e+i,a=this.GetHyperlinkAtOffset(e),a&&(s=this.GetFormatRangeAtIndex({hyperlink:a.id},e),e=s.start,s.end>=o&&(o=s.end+1,r=!0)),o>e+1&&!r&&(a=this.GetHyperlinkAtOffset(o-1),a&&(s=this.GetFormatRangeAtIndex({hyperlink:a.id},o-1),o=s.end+1)),e==o&&(n=this.GetWordAtIndex(e),e=n.start,o=n.end),e==o&&o++;for(let h=e;h<o;h++){let t=this.GetFormatAtOffset(h).style;t.hyperlink>=0&&this.RemoveHyperlink(t.hyperlink)}let l=this.rtData.hyperlinks.length;this.rtData.hyperlinks.push(t),i=o-e,this.SetFormat({hyperlink:l},e,i),LogUtil.Debug("B.Text.Formatter: SetHyperlink output:",{url:t,startOffset:e,length:i})}GetHyperlinkAtOffset(t){LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtOffset input:",t);const e=this.GetFormatAtOffset(t).style;let i=null;return void 0!==e.hyperlink&&e.hyperlink>=0&&e.hyperlink<this.rtData.hyperlinks.length&&(i={url:this.rtData.hyperlinks[e.hyperlink],id:e.hyperlink}),LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtOffset output:",i),i}GetHyperlinkAtPoint(t){LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtPoint input:",t);let e,i,n=-1;if(t.y<0||t.y>this.fmtText.height)return LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtPoint output:",null),null;for(e=0;e<this.renderedLines.length;e++)if(t.y>=this.renderedLines[e].top&&t.y<=this.renderedLines[e].bottom){if(t.x<this.renderedLines[e].left||t.x>this.renderedLines[e].right)break;for(i=0;i<this.renderedLines[e].runs.length;i++)if(t.x<=this.renderedLines[e].runs[i].right){n=this.renderedLines[e].runs[i].runRec.style;break}break}let s=null;if(n>=0){const t=this.fmtText.styles[n].hyperlink;void 0!==t&&t>=0&&t<this.rtData.hyperlinks.length&&(s={url:this.rtData.hyperlinks[t],id:t})}return LogUtil.Debug("B.Text.Formatter: GetHyperlinkAtPoint output:",s),s}ClearHyperlink(t){LogUtil.Debug("B.Text.Formatter: ClearHyperlink input:",t);const e=this.GetHyperlinkAtOffset(t);e&&(this.RemoveHyperlink(e.id),this.fmtText=this.CalcFromRuntime(this.rtData,this.limits)),LogUtil.Debug("B.Text.Formatter: ClearHyperlink output:",this.fmtText)}RemoveHyperlink(t){if(LogUtil.Debug("B.Text.Formatter: RemoveHyperlink input:",t),t>=0&&t<this.rtData.hyperlinks.length){this.rtData.hyperlinks.splice(t,1);for(let e=0;e<this.rtData.styles.length;e++)this.rtData.styles[e].hyperlink===t?this.rtData.styles[e].hyperlink=-1:this.rtData.styles[e].hyperlink>t&&this.rtData.styles[e].hyperlink--}LogUtil.Debug("B.Text.Formatter: RemoveHyperlink output:",this.rtData.hyperlinks)}SetHyperlinkCursor(){let t,e,i,n;for(LogUtil.Debug("B.Text.Formatter: SetHyperlinkCursor input"),t=0;t<this.renderedLines.length;t++)for(e=0;e<this.renderedLines[t].runs.length;e++)i=this.renderedLines[t].runs[e].runRec.style,this.rtData.styles[i].hyperlink>=0&&(n=this.renderedLines[t].runs[e].elem,n&&n.node.setAttribute("class",CursorConstant.CursorType.Pointer));LogUtil.Debug("B.Text.Formatter: SetHyperlinkCursor output")}RenderFormattedText(t,e){let i,n,s,a,o,r,l,h,c,u;LogUtil.Debug("B.Text.Formatter: RenderFormattedText input:",{textContainer:t,formattingLayer:e});let d,p,g=[],f=[];(d=t.parent)&&(p=t.position(),d.remove(t)),t.clear(),t.attr("xml:space","preserve"),this.renderedLines=[],this.renderedDataFields=[],e.clear(),this.fmtText.paragraphs.forEach(((d,p)=>{r=null,"none"!==d.pStyle.bullet&&d.bindent&&(r={bullet:d.pStyle.bullet,xPos:0,yPos:d.yOffset,indent:d.bindent,height:d.height,ascent:d.height/2,hasText:!1,style:this.GetBulletStyle(p)}),d.lines.forEach(((e,m)=>{switch(s=0,a=e.width+d.bindent,o=this.fmtText.fmtWidth-(e.indent+d.pStyle.rindent),d.pStyle.just){case"center":s=(o-a)/2;break;case"right":s=o-a}s+=e.indent,r&&0===m&&(r.xPos=s,r.yPos=e.yOffset,r.ascent=e.ascent),s+=e.bindent,l={paraIndex:p,lineIndex:m,lineRec:e,left:s,right:s,top:e.yOffset,bottom:e.yOffset+e.height,dispStart:e.start,pStyle:d.pStyle,runs:[]};for(let t=0;t<e.spErrors.length;t++)f.push({x:s+e.spErrors[t].startPos,y:e.yOffset+e.ascent,width:e.spErrors[t].endPos-e.spErrors[t].startPos});for(let t=0;t<e.dataFields.length;t++)this.renderedDataFields.push({x:s+e.dataFields[t].startPos,y:e.yOffset,width:e.dataFields[t].endPos-e.dataFields[t].startPos,height:e.height,fieldID:e.dataFields[t].fieldID});e.runs.forEach(((a,o)=>{r&&(r.hasText=a.width>0),h=null,c=null,i=this.fmtText.styles[a.style],n=this.fmtText.text.substr(a.dispStart,a.dispLen);let d=!1,p=this.parent.dataStyleOverride||{};p._curFieldDecoration=null,p._curFieldStyle=null,a.dispLen>0&&!a.isTab&&(i.dataField&&(p._curFieldStyle=this.parent.GetDataStyle(i.dataField)),h=Formatter.CreateTextRunElem(n,i,this.parent.doc,this.parent.linksDisabled,p),h.attr("x",Utils1.RoundCoord(s)),h.attr("text-anchor","start"),h.attr("y",Utils1.RoundCoord(e.yOffset+e.ascent+a.extraYOffset)),h.attr("textLength",a.dispWidth),this.parent.linksDisabled||(this.AttachHyperlinkToRun(h,i)?d=!0:i.hyperlink=-1),t.add(h),c=this.parent.doc.GetTextRunCache(i,n));("underline"===(p._curFieldDecoration||i.decoration)||d)&&a.extraYOffset<=0&&(u=d?"#0000FF":i.color,g.push({x:s,y:e.yOffset+e.ascent,width:a.width,color:u})),l.runs.length||(l.dispStart=a.dispStart),l.runs.push({runIndex:o,runRec:a,left:s,right:s+a.width,isTab:a.isTab,elem:h,cache:c}),s+=a.width})),l.right=s,this.renderedLines.push(l)})),r&&r.hasText&&this.RenderBullet(r,e)}));for(let m=0;m<g.length;m++)this.RenderUnderline(g[m],e);if(this.SpellCheckValid())for(let m=0;m<f.length;m++)this.RenderSpellError(f[m],e);this.parent.IsActive()&&this.RenderDataFieldHilites(e),d&&d.add(t,p),LogUtil.Debug("B.Text.Formatter: RenderFormattedText output:",this.renderedLines)}AttachHyperlinkToRun(t,e){if(LogUtil.Debug("B.Text.Formatter: AttachHyperlinkToRun input:",{element:t,style:e}),void 0!==e.hyperlink&&e.hyperlink>=0&&e.hyperlink<this.fmtText.hyperlinks.length){const t=this.fmtText.hyperlinks[e.hyperlink];Utils1.ResolveHyperlinkForDisplay(t)}return LogUtil.Debug("B.Text.Formatter: AttachHyperlinkToRun output:",!1),!1}RenderUnderline(t,e){LogUtil.Debug("B.Text.Formatter: RenderUnderline input:",{underline:t,formattingLayer:e});const i=new T3Svg.Path,n=Utils1.RoundCoord(t.x),s=Utils1.RoundCoord(t.y)+2,a=Utils1.RoundCoord(t.width);i.plot(`M${n},${s}h${a}`),i.attr("stroke-width",1),i.attr("stroke",t.color),i.attr("fill","none"),e.add(i),LogUtil.Debug("B.Text.Formatter: RenderUnderline output")}RenderSpellError(t,e){LogUtil.Debug("B.Text.Formatter: RenderSpellError input:",{spellError:t,formattingLayer:e});const i=new T3Svg.Path;let n=t.x,s=t.y+2,a=1;const o=n+t.width;let r=`M${n},${s+a}`;for(;n<o;)r+=`L${n+=2},${s+=a=-a}`;i.plot(r),i.attr("stroke-width",1),i.attr("stroke-opacity",.7),i.attr("stroke","#FF0000"),i.attr("fill","none"),i.node.setAttribute("no-export","1"),e.add(i),LogUtil.Debug("B.Text.Formatter: RenderSpellError output")}RenderDataFieldHilites(t){let e,i,n;if(LogUtil.Debug("B.Text.Formatter: RenderDataFieldHilites input:",t),this.renderedDataFields){this.ClearDataFieldHilites(t);for(let s=0;s<this.renderedDataFields.length;s++)e=this.renderedDataFields[s],i=this.parent.GetDataText(e.fieldID,!0),n=new T3Svg.Container(T3Svg.create("rect")),n.move(e.x,e.y),n.size(e.width,e.height),n.attr("fill","#A6F8CD"),n.attr("stroke-width",0),n.attr("fill-opacity",.4),n.attr("pointer-events","fill"),n.node.setAttribute("no-export","1"),Instance.Basic.Element.SetTooltipOnElement(n,i),t.add(n),e.elem=n}LogUtil.Debug("B.Text.Formatter: RenderDataFieldHilites output")}ClearDataFieldHilites(t){if(LogUtil.Debug("B.Text.Formatter: ClearDataFieldHilites input:",t),this.renderedDataFields)for(let e=0;e<this.renderedDataFields.length;e++){const i=this.renderedDataFields[e].elem;i&&(t.remove(i),this.renderedDataFields[e].elem=null)}LogUtil.Debug("B.Text.Formatter: ClearDataFieldHilites output")}RenderBullet(t,e){LogUtil.Debug("B.Text.Formatter: RenderBullet input:",{bulletInfo:t,formattingLayer:e});let i,n,s,a=!1,o=!1;const r=Math.max(4,t.indent/2);switch(s=t.style.color,t.bullet){case"hround":i=this.parent.doc.CreateShape(OptConstant.CSType.Oval).SetSize(r,r),o=!0;break;case"sround":i=this.parent.doc.CreateShape(OptConstant.CSType.Oval).SetSize(r,r),a=!0;break;case"hsquare":i=this.parent.doc.CreateShape(OptConstant.CSType.Rect).SetSize(r,r),o=!0;break;case"ssquare":i=this.parent.doc.CreateShape(OptConstant.CSType.Rect).SetSize(r,r),a=!0;break;case"diamond":i=this.parent.doc.CreateShape(OptConstant.CSType.Polygon).SetPoints([{x:r/2,y:0},{x:r,y:r/2},{x:r/2,y:r},{x:0,y:r/2}]),a=!0;break;case"chevron":i=this.parent.doc.CreateShape(OptConstant.CSType.Polygon).SetPoints([{x:0,y:0},{x:r,y:r/2},{x:0,y:r},{x:r/2,y:r/2}]),a=!0;break;case"check":i=this.parent.doc.CreateShape(OptConstant.CSType.Polyline).SetPoints([{x:0,y:r-r/4},{x:r/4,y:r},{x:r,y:0}]),o=!0;break;case"plus":n=this.parent.doc.CreateShape(OptConstant.CSType.Path).PathCreator(),n.MoveTo(0,r/2).LineTo(r,r/2),n.MoveTo(r/2,0).LineTo(r/2,r),n.Apply(),i=n,o=!0}if(i){const n=(t.indent-r)/2,l=r<t.ascent?t.ascent-r:r<t.height?0:(t.height-r)/2;i.SetPos(t.xPos+n,t.yPos+l),a?i.SetFillColor(s):i.SetFillColor("none"),o?i.SetStrokeColor(s).SetStrokeWidth(1):i.SetStrokeColor("none").SetStrokeWidth(0),e.add(i.svgObj)}LogUtil.Debug("B.Text.Formatter: RenderBullet output")}SetRuntimeCharFormat(t,e,i){LogUtil.Debug("B.Text.Formatter: SetRuntimeCharFormat input:",{charIndex:t,format:e,apply:i});let n=this.GetFormatAtOffset(t).style,s=this.MergeStyles(e,n),a=this.FindAddStyle(s);return i&&(this.rtData.charStyles[t]=a),LogUtil.Debug("B.Text.Formatter: SetRuntimeCharFormat output:",a),a}CalcFromRuntime(t,e){LogUtil.Debug("B.Text.Formatter: CalcFromRuntime input:",{runtimeData:t,limits:e});let i=new DefaultFmtText,n=e?e.maxWidth:0,s=e?e.minWidth:0,a=0,o=null;if(i.text=String(t.text),t.styles.forEach((t=>{i.styles.push(t)})),i.hyperlinks=Utils1.CopyObj(t.hyperlinks),n||(n=32e3),i.fmtWidth=s,this.renderingEnabled){let e=Math.max(this.GetBulletIndent(),8);i.width=0,i.dispMinWidth=0,t.styleRuns.forEach(((s,r)=>{let l={pStyle:Utils1.CopyObj(s.pStyle),width:0,height:0,start:s.start,length:s.nChars,bindent:0,yOffset:a,dispMinWidth:0,lines:[]},h=0;l.pStyle.bullet&&"none"!==l.pStyle.bullet&&(h=e);let c=h/2+2;l.bindent=h,o||(o=new T3Svg.Container(T3Svg.create("text")),o.attr("xml:space","preserve"),o.attr("fill-opacity",0),this.parent.doc.GetFormattingLayer().svgObj.add(o));let u,d=this.CalcParagraphRunMetrics(t,s,o,this.parent.doc.GetFormattingLayer()),p=null;do{let e=l.lines.length?l.pStyle.lindent:l.pStyle.pindent;h&&(e=0);let i=n-(h+l.pStyle.rindent+e);if(u=this.BuildLineForDisplay(d,i,p,l.pStyle),u.runs.length){let i={width:0,height:0,start:s.start,length:0,bindent:l.bindent,indent:e,yOffset:a,ascent:0,descent:0,dispMinWidth:0,runs:[],spErrors:[],dataFields:[]};if(e+=h,l.lines.length&&(i.start=u.runs[0].start),u.runs.forEach((e=>{let n=e.source;delete e.source,i.runs.push(e),t.spErrors&&n&&e.extraYOffset<=0&&!e.isTab&&t.spErrors.forEach((t=>{let s=t.startIndex,a=t.startIndex+t.nChars-1;if(s<e.dispStart+e.dispLen&&a>=e.dispStart){let t={startIndex:Math.max(s,e.dispStart),endIndex:Math.min(a,e.dispStart+e.dispLen-1),startPos:0,endPos:0},o=t.startIndex-e.start+n.startRunChar;t.startPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,o,!0,n.cache);let r=t.endIndex-e.start+n.startRunChar;t.endPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,r,!1,n.cache),i.spErrors.push(t)}})),t.dataFields&&n&&!e.isTab&&t.dataFields.forEach((t=>{let s=t.startIndex,a=t.startIndex+t.nChars-1;if(s<e.dispStart+e.dispLen&&a>=e.dispStart){let o={fieldID:t.fieldID,startIndex:Math.max(s,e.dispStart),endIndex:Math.min(a,e.dispStart+e.dispLen-1),startPos:0,endPos:0},r=o.startIndex-e.start+n.startRunChar;o.startPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,r,!0,n.cache);let l=o.endIndex-e.start+n.startRunChar;o.endPos=i.width+Formatter.GetRunPositionForChar(n.runElem.node,l,!1,n.cache),i.dataFields.push(o)}})),i.descent=Math.max(i.descent,e.descent),i.ascent=Math.max(i.ascent,e.ascent),i.length+=e.length,i.width+=e.width,i.dispMinWidth+=e.dispMinWidth})),i.height=i.ascent+i.descent,r<t.styleRuns.length-1||u.nextRunInfo&&u.runs.length)if(l.pStyle.spacing<0){let t=-l.pStyle.spacing-i.height;t>0&&(i.height+=t)}else i.height+=i.height*l.pStyle.spacing;l.width=Math.max(l.width,i.width+e),l.dispMinWidth=Math.max(l.dispMinWidth,i.dispMinWidth+e),l.height+=i.height,a+=i.height,l.lines.push(i)}p=u.nextRunInfo}while(p&&u.runs.length);if(this.parent.doc.GetFormattingLayer().svgObj.remove(o),i.height+=l.height,h>0&&l.lines.length&&l.height<c){let t=(c-l.height)/2;l.lines.forEach((e=>{e.yOffset+=t})),a+=c-l.height,i.height+=c-l.height}i.paragraphs.push(l),i.width=Math.max(i.width,l.width),i.dispMinWidth=Math.max(i.dispMinWidth,l.dispMinWidth)})),i.fmtWidth=Math.max(i.fmtWidth,i.width)}else this.deferredRenderNeeded=!0;return LogUtil.Debug("B.Text.Formatter: CalcFromRuntime output:",i),i}BuildLineForDisplay(t,e,i,n){LogUtil.Debug("B.Text.Formatter: BuildLineForDisplay input:",{paragraphRunMetrics:t,availableWidth:e,nextRunInfo:i,paragraphStyle:n});let s=0,a=0,o=0,r=0,l=!i;i&&(s=i.curRun||0,a=i.curChar||0,o=i.curPos||0,a<t[s].startDispIndex&&(a=t[s].startDispIndex),o<t[s].startDispPos&&(o=t[s].startDispPos),i=null);const h={runs:[],nextRunInfo:null},c={runIndex:-1,startChar:0,endChar:0,startPos:0,endPos:0,isRunEnd:!1,breakRec:null};for(;s<t.length;){const i=t[s],l=Math.max(i.endDispPos-o,0);if(l>e)break;const u={width:Math.min(i.width-o,e),height:i.runRT.metrics.height,start:i.startIndex+a,length:i.nChars-a,dispStart:i.startIndex+a,dispLen:Math.max(i.endDispIndex-a,0),dispWidth:l,dispMinWidth:l,space:i.runRT.metrics.width,ascent:i.runRT.metrics.ascent,descent:i.runRT.metrics.descent,extraYOffset:i.runRT.metrics.extraYOffset,isTab:i.isTab,style:i.runRT.style,source:{runElem:i.runElem,cache:i.cache,startRunChar:a,startRunPos:o}};if(u.isTab&&n.tabspace>0){const t=r-r%n.tabspace;u.width=t+n.tabspace*u.length-r}if(i.hasCR&&u.length++,u.width>0){const t=i.breaks[i.breaks.length-1];t&&t.startIndex>=a&&(c.runIndex=h.runs.length,c.startChar=t.startIndex-a,c.endChar=t.endIndex-a,c.startPos=t.startPos-o,c.endPos=t.endPos-o,c.breakRec=t,c.rtRunIndex=s,c.rtRunPos=o,c.rtRunChar=a,c.isRunEnd=t.endIndex===i.nChars),h.runs.push(u)}e-=u.width,r+=u.width,s++,o=0,a=0}if(s<t.length){if(i={curRun:s,curChar:a,curPos:o},e>0){const n=t[s];let r=null;for(let t=n.breaks.length-1;t>=0;t--){const s=n.breaks[t];if(s.startPos-o<=e){i.curChar=s.endIndex,i.curPos=s.endPos,r={width:Math.min(i.curPos-o,e),height:n.runRT.metrics.height,start:n.startIndex+a,length:i.curChar-a,dispStart:n.startIndex+a,dispLen:s.startIndex-a,dispWidth:s.startPos-o,dispMinWidth:s.startPos-o,space:n.runRT.metrics.width,ascent:n.runRT.metrics.ascent,descent:n.runRT.metrics.descent,extraYOffset:n.runRT.metrics.extraYOffset,isTab:n.isTab,style:n.runRT.style,source:{runElem:n.runElem,cache:n.cache,startRunChar:a,startRunPos:o}},h.runs.push(r);break}}if(!r)if(c.runIndex>=0){if(!c.isRunEnd){for(;h.runs.length>c.runIndex+1;)h.runs.pop();r=h.runs[c.runIndex],r.width=c.endPos,r.length=c.endChar,r.dispLen=c.startChar,r.dispWidth=c.startPos,r.dispMinWidth=c.startPos,i.curRun=c.rtRunIndex,i.curChar=c.endChar+c.rtRunChar,i.curPos=c.endPos+c.rtRunPos}}else{r={width:0,height:n.runRT.metrics.height,start:n.startIndex+a,length:0,dispStart:n.startIndex+a,dispLen:0,dispWidth:0,dispMinWidth:0,space:n.runRT.metrics.width,ascent:n.runRT.metrics.ascent,descent:n.runRT.metrics.descent,extraYOffset:n.runRT.metrics.extraYOffset,isTab:n.isTab,style:n.runRT.style,source:{runElem:n.runElem,cache:n.cache,startRunChar:a,startRunPos:o}};let t=0;for(;a<n.nChars&&t<e;)t=Formatter.GetRunPositionForChar(n.runElem.node,a,!1,n.cache)-o,(t<=e||!h.runs.length&&!r.length)&&(r.width=t,r.dispWidth=t,r.dispMinWidth=t,r.length++,r.dispLen++,a++,i.curChar++,i.curPos=o+t);r.length&&h.runs.push(r)}}}else if(t.length>0&&!h.runs.length&&l){const e=t[0],i={width:0,height:e.runRT.metrics.height,start:e.startIndex,length:0,dispStart:e.startIndex,dispLen:0,dispWidth:0,dispMinWidth:0,space:e.runRT.metrics.width,ascent:e.runRT.metrics.ascent,descent:e.runRT.metrics.descent,extraYOffset:e.runRT.metrics.extraYOffset,isTab:e.isTab,style:e.runRT.style,source:{runElem:e.runElem,cache:e.cache,startRunChar:0,startRunPos:0}};e.hasCR&&i.length++,h.runs.push(i)}return h.nextRunInfo=i,LogUtil.Debug("B.Text.Formatter: BuildLineForDisplay output:",h),h}CalcParagraphRunMetrics(t,e,i,n){LogUtil.Debug("B.Text.Formatter: CalcParagraphRunMetrics input:",{runtimeData:t,styleRun:e,formattingLayer:i,docFormattingLayer:n});const s=/(\s+)/g,a=/(\t+)/g;let o=[],r=[];for(let l=0;l<e.runs.length;l++){const i=e.runs[l].start,n=e.runs[l].nChars,s=e.runs[l].style;let o,h=[],c=n?t.text.substr(i,n):"";for(;null!==(o=a.exec(c));)h.push({start:o.index,end:o.index+o[0].length,nChars:o[0].length});if(h.length){h[0].start>0&&r.push({start:i,nChars:h[0].start,style:s,metrics:e.runs[l].metrics});for(let t=0;t<h.length;t++)r.push({start:i+h[t].start,nChars:h[t].nChars,style:s,metrics:e.runs[l].metrics,isTab:!0}),h[t].end<n&&(t<h.length-1?r.push({start:i+h[t].end,nChars:h[t+1].start-h[t].end,style:s,metrics:e.runs[l].metrics}):r.push({start:i+h[t].end,nChars:n-h[t].end,style:s,metrics:e.runs[l].metrics}))}else r.push({start:i,nChars:n,style:s,metrics:e.runs[l].metrics})}for(let l=0;l<r.length;l++){const e=r[l].start;let n=r[l].nChars;const a=t.styles[r[l].style],h=n&&"\n"===t.text[e+n-1];h&&n--;let c,u=n?t.text.substr(e,n):"",d=[];for(;null!==(c=s.exec(u));)d.push({startIndex:c.index,endIndex:c.index+c[0].length,startPos:0,endPos:0});let p={startIndex:e,endIndex:e+n,nChars:n,style:a,breaks:d,str:u,startDispIndex:0,endDispIndex:n,width:0,startDispPos:0,endDispPos:0,hasCR:h,runRT:r[l],isTab:r[l].isTab};d.length&&!a.dataField&&(0===d[0].startIndex&&(p.startDispIndex=d[0].endIndex),d[d.length-1].endIndex===n&&(p.endDispIndex=d[d.length-1].startIndex));let g=null,f=null;n&&!p.isTab&&(u+=".",g=Formatter.CreateTextRunElem(u,a,this.parent.doc,this.parent.linksDisabled,null),g.attr("x",0),g.attr("text-anchor","start"),g.attr("y",0),i.add(g),f=this.parent.doc.GetTextRunCache(a,u)),p.runElem=g,p.cache=f,o.push(p)}n.svgObj.add(i);for(let l=0;l<o.length;l++){const t=o[l],e=t.runElem;if(e){const i=t.endIndex-t.startIndex-1,n=Formatter.GetRunPositionForChar(e.node,i,!1,t.cache);t.width=n,t.endDispPos=n;for(let s=0;s<t.breaks.length;s++){const i=t.breaks[s];if(i.startIndex>0){const n=Formatter.GetRunPositionForChar(e.node,i.startIndex,!0,t.cache);i.startPos=n}if(i.endIndex===t.nChars)i.endPos=n;else{const n=Formatter.GetRunPositionForChar(e.node,i.endIndex,!0,t.cache);i.endPos=n}0!==s||0!==i.startIndex||t.style.dataField||(t.startDispPos=i.endPos),s!==t.breaks.length-1||i.endIndex!==t.nChars||t.style.dataField||(t.endDispPos=i.startPos)}}}return LogUtil.Debug("B.Text.Formatter: CalcParagraphRunMetrics output:",o),o}GetTextParagraphCount(t){LogUtil.Debug("B.Text.Formatter: GetTextParagraphCount input:",t);let e=1;const i=t.match(/\n/g);return i&&(e+=i.length),LogUtil.Debug("B.Text.Formatter: GetTextParagraphCount output:",e),e}MergeParagraphInfo(t,e,i){LogUtil.Debug("B.Text.Formatter: MergeParagraphInfo input:",{paragraphStyles:t,startOffset:e,length:i});let n,s=this.GetParagraphAtOffset(e),a=this.GetParagraphAtOffset(e+i),o=[];s<0&&(s=0,a=0);for(let r=0;r<s;r++)o.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[r].pStyle)});s<this.rtData.styleRuns.length&&(!t.length||e!==this.rtData.styleRuns[s].start||i<this.rtData.styleRuns[s].nChars-1||i<this.rtData.styleRuns[s].nChars&&s===this.rtData.styleRuns.length-1)&&(n={pStyle:Utils1.CopyObj(this.rtData.styleRuns[s].pStyle)}),void 0===n&&t.length>0&&(n=t[0]),void 0!==n&&o.push(n);for(let r=1;r<t.length;r++)o.push(t[r]);for(let r=a+1;r<this.rtData.styleRuns.length;r++)o.push({pStyle:Utils1.CopyObj(this.rtData.styleRuns[r].pStyle)});return LogUtil.Debug("B.Text.Formatter: MergeParagraphInfo output:",o),o}BuildRuntimeRuns(t,e){LogUtil.Debug("B.Text.Formatter: BuildRuntimeRuns input:",{runtimeData:t,paragraphStyles:e});let i=[],n=this.DefaultPStyle(),s=t.text.length;i.push(0);for(let a=0;a<s;a++)"\n"===t.text[a]&&i.push(a+1);if(t.styleRuns=[],t.spErrors=[],t.dataFields=[],this.parent.doc)for(let a=0;a<i.length;a++){let o=i[a],r=a<i.length-1?i[a+1]-o:s-o,l=t.styleRuns.length<e.length?t.styleRuns.length:0,h=e[l]?e[l].pStyle:n,c={pStyle:Utils1.CopyObj(h),runs:[],start:o,nChars:r};if(this.renderingEnabled)if(r){let e=null,i=null,n=null;for(let s=o;s<o+r;s++){let a=this.GetFormatAtOffset(s,t);if(e&&this.MatchStylesNoSpell(a.style,e.style))c.runs[c.runs.length-1].nChars++;else{let t={style:a.id,start:s,nChars:1,metrics:this.parent.doc.CalcStyleMetrics(a.style)};c.runs.push(t)}e=a,a.style.spError?i?i.nChars++:(i={startIndex:s,nChars:1},t.spErrors.push(i)):i=null,a.style.dataField?n&&n.fieldID===a.style.dataField?n.nChars++:(n={fieldID:a.style.dataField,startIndex:s,nChars:1},t.dataFields.push(n)):n=null}}else{let e=this.GetFormatAtOffset(o,t),i={style:e.id,start:o,nChars:0,metrics:this.parent.doc.CalcStyleMetrics(e.style)};c.runs.push(i)}else this.deferredRenderNeeded=!0;t.styleRuns.push(c)}LogUtil.Debug("B.Text.Formatter: BuildRuntimeRuns output:",t.styleRuns)}GetBulletPIndex(){LogUtil.Debug("B.Text.Formatter: GetBulletPIndex input");let t=0;if(this.rtData.styleRuns)for(let e=0;e<this.rtData.styleRuns.length;e++){const i=this.rtData.styleRuns[e].pStyle;if(i&&i.bullet&&"none"!==i.bullet){t=e;break}}return LogUtil.Debug("B.Text.Formatter: GetBulletPIndex output:",t),t}GetBulletIndent(){LogUtil.Debug("B.Text.Formatter: GetBulletIndent input");let t=0;const e=this.GetBulletPIndex();return this.rtData.styleRuns&&e<this.rtData.styleRuns.length&&this.rtData.styleRuns[e].runs&&this.rtData.styleRuns[e].runs.length&&(t=this.rtData.styleRuns[e].runs[0].metrics.ascent),LogUtil.Debug("B.Text.Formatter: GetBulletIndent output:",t),t}GetBulletStyle(t){LogUtil.Debug("B.Text.Formatter: GetBulletStyle input:",t);let e=new DefaultStyle;if((void 0===t||t<0||this.rtData.styleRuns&&t>=this.rtData.styleRuns.length)&&(t=this.GetBulletPIndex()),this.rtData.styleRuns&&t<this.rtData.styleRuns.length&&this.rtData.styleRuns[t].runs&&this.rtData.styleRuns[t].runs.length){const i=this.rtData.styleRuns[t].runs[0].style;e=this.rtData.styles[i]}return LogUtil.Debug("B.Text.Formatter: GetBulletStyle output:",e),e}FindAddStyle(t,e){LogUtil.Debug("B.Text.Formatter: FindAddStyle input:",{style:t,skipAdd:e});let i=-1;const n=this.rtData.styles.length;if(!t)return LogUtil.Debug("B.Text.Formatter: FindAddStyle output:",0),0;for(let s=0;s<n;s++)if(this.MatchStyles(t,this.rtData.styles[s])){i=s;break}return i<0&&!e&&(this.rtData.styles.push(t),i=n),LogUtil.Debug("B.Text.Formatter: FindAddStyle output:",i),i}TrimUnusedStyles(t){LogUtil.Debug("B.Text.Formatter: TrimUnusedStyles input:",t);let e=[],i=[];const n=t.styles.length,s=t.charStyles.length;if(n){e=new Array(n).fill(!1);for(let i=0;i<s;i++)e[t.charStyles[i]]=!0;for(let a=0;a<n;a++)if(e[a]){const e=i.length;i.push(t.styles[a]);for(let i=0;i<s;i++)t.charStyles[i]===a&&(t.charStyles[i]=e)}!i.length&&t.styles.length>0&&i.push(t.styles[t.styles.length-1]),t.styles=i}LogUtil.Debug("B.Text.Formatter: TrimUnusedStyles output:",t)}MergeStyles(t,e){LogUtil.Debug("B.Text.Formatter: MergeStyles input:",{newStyle:t,baseStyle:e});const i={font:void 0!==t.font?t.font:e.font,type:void 0!==t.type?t.type:e.type,size:void 0!==t.size?t.size:e.size,weight:void 0!==t.weight?t.weight:e.weight,style:void 0!==t.style?t.style:e.style,baseOffset:void 0!==t.baseOffset?t.baseOffset:e.baseOffset,decoration:void 0!==t.decoration?t.decoration:e.decoration,spError:void 0!==t.spError?t.spError:e.spError,color:void 0!==t.color?t.color:e.color,colorTrans:void 0!==t.colorTrans?t.colorTrans:e.colorTrans,dataField:void 0!==t.dataField?t.dataField:e.dataField,hyperlink:void 0!==t.hyperlink?t.hyperlink:e.hyperlink};return LogUtil.Debug("B.Text.Formatter: MergeStyles output:",i),i}AndStyles(t,e){LogUtil.Debug("B.Text.Formatter: AndStyles input:",{style1:t,style2:e});const i={font:t.font===e.font?t.font:void 0,type:t.type===e.type?t.type:void 0,size:t.size===e.size?t.size:void 0,weight:t.weight===e.weight?t.weight:void 0,style:t.style===e.style?t.style:void 0,baseOffset:t.baseOffset===e.baseOffset?t.baseOffset:void 0,decoration:t.decoration===e.decoration?t.decoration:void 0,spError:t.spError===e.spError?t.spError:void 0,color:t.color===e.color?t.color:void 0,colorTrans:t.colorTrans===e.colorTrans?t.colorTrans:void 0,dataField:t.dataField===e.dataField?t.dataField:void 0,hyperlink:t.hyperlink===e.hyperlink?t.hyperlink:void 0};return LogUtil.Debug("B.Text.Formatter: AndStyles output:",i),i}MatchStyles(t,e){LogUtil.Debug("B.Text.Formatter: MatchStyles input:",{style1:t,style2:e});const i=t.font===e.font&&t.type===e.type&&t.size===e.size&&t.weight===e.weight&&t.style===e.style&&t.baseOffset===e.baseOffset&&t.decoration===e.decoration&&t.spError===e.spError&&t.color===e.color&&t.colorTrans===e.colorTrans&&t.dataField===e.dataField&&t.hyperlink===e.hyperlink;return LogUtil.Debug("B.Text.Formatter: MatchStyles output:",i),i}MatchStylesNoSpell(t,e){LogUtil.Debug("B.Text.Formatter: MatchStylesNoSpell input:",{style1:t,style2:e});const i=t.font===e.font&&t.type===e.type&&t.size===e.size&&t.weight===e.weight&&t.style===e.style&&t.baseOffset===e.baseOffset&&t.decoration===e.decoration&&t.color===e.color&&t.colorTrans===e.colorTrans&&t.dataField===e.dataField&&t.hyperlink===e.hyperlink;return LogUtil.Debug("B.Text.Formatter: MatchStylesNoSpell output:",i),i}MatchPartialStyles(t,e){LogUtil.Debug("B.Text.Formatter: MatchPartialStyles input:",{style1:t,style2:e});const i=!(void 0!==t.font&&void 0!==e.font&&t.font!==e.font||void 0!==t.type&&void 0!==e.type&&t.type!==e.type||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.weight&&void 0!==e.weight&&t.weight!==e.weight||void 0!==t.style&&void 0!==e.style&&t.style!==e.style||void 0!==t.baseOffset&&void 0!==e.baseOffset&&t.baseOffset!==e.baseOffset||void 0!==t.decoration&&void 0!==e.decoration&&t.decoration!==e.decoration||void 0!==t.spError&&void 0!==e.spError&&t.spError!==e.spError||void 0!==t.color&&void 0!==e.color&&t.color!==e.color||void 0!==t.colorTrans&&void 0!==e.colorTrans&&t.colorTrans!==e.colorTrans||void 0!==t.dataField&&void 0!==e.dataField&&t.dataField!==e.dataField||void 0!==t.hyperlink&&void 0!==e.hyperlink&&t.hyperlink!==e.hyperlink);return LogUtil.Debug("B.Text.Formatter: MatchPartialStyles output:",i),i}DefaultPStyle(){return{just:"left",bullet:"none",spacing:0,pindent:0,lindent:0,rindent:0,tabspace:0}}SetDataNameDisplay(t){LogUtil.Debug("B.Text.Formatter: SetDataNameDisplay input:",t),this.dataNameEnabled=t,LogUtil.Debug("B.Text.Formatter: SetDataNameDisplay output:",this.dataNameEnabled)}GetDataNameDisplay(){LogUtil.Debug("B.Text.Formatter: GetDataNameDisplay input");const t=this.dataNameEnabled;return LogUtil.Debug("B.Text.Formatter: GetDataNameDisplay output:",t),t}GetDataField(t){if(LogUtil.Debug("B.Text.Formatter: GetDataField input:",t),!this.HasDataFields()||!this.IsDataFieldAtPos(t))return LogUtil.Debug("B.Text.Formatter: GetDataField output:",null),null;let e=null;for(let i=0;i<this.rtData.dataFields.length;i++){const n=this.rtData.dataFields[i].startIndex,s=n+this.rtData.dataFields[i].nChars;if(t>=n&&t<s){e={fieldID:this.rtData.dataFields[i].fieldID,startPos:n,endPos:s};break}}return LogUtil.Debug("B.Text.Formatter: GetDataField output:",e),e}IsDataFieldAtPos(t){LogUtil.Debug("B.Text.Formatter: IsDataFieldAtPos input:",t);const e=!!this.GetFormatAtOffset(t).style.dataField;return LogUtil.Debug("B.Text.Formatter: IsDataFieldAtPos output:",e),e}IsDataFieldInRange(t,e){if(LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange input:",{startIndex:t,endIndex:e}),!this.HasDataFields())return LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange output:",!1),!1;for(let i=t;i<=e;i++)if(this.IsDataFieldAtPos(i))return LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange output:",!0),!0;return LogUtil.Debug("B.Text.Formatter: IsDataFieldInRange output:",!1),!1}HasDataFields(){LogUtil.Debug("B.Text.Formatter: HasDataFields input");const t=this.rtData.dataFields&&this.rtData.dataFields.length>0;return LogUtil.Debug("B.Text.Formatter: HasDataFields output:",t),t}HasDataField(t){if(LogUtil.Debug("B.Text.Formatter: HasDataField input:",t),!this.HasDataFields())return LogUtil.Debug("B.Text.Formatter: HasDataField output:",!1),!1;const e=Formatter.FormatDataFieldID(t,!1);for(let i=0;i<this.rtData.dataFields.length;i++)if(Formatter.FormatDataFieldID(this.rtData.dataFields[i].fieldID,!1)===e)return LogUtil.Debug("B.Text.Formatter: HasDataField output:",!0),!0;return LogUtil.Debug("B.Text.Formatter: HasDataField output:",!1),!1}ClearDataFieldRun(t){if(LogUtil.Debug("B.Text.Formatter: ClearDataFieldRun input:",t),this.HasDataFields())if(t){for(let e=0;e<this.rtData.dataFields.length;e++)if(Formatter.FormatDataFieldID(this.rtData.dataFields[e].fieldID,!1)===t){const t=this.rtData.dataFields[e].startIndex,i=this.rtData.dataFields[e].nChars;this.SetFormat({dataField:null},t,i)}}else this.SetFormat({dataField:null});LogUtil.Debug("B.Text.Formatter: ClearDataFieldRun output")}RebuildFromData(){if(LogUtil.Debug("B.Text.Formatter: RebuildFromData input"),this.HasDataFields()){const t=Utils1.CopyObj(this.rtData.dataFields);for(let e=t.length-1;e>=0;e--){const i=t[e].fieldID,n=this.parent.GetDataText(i,this.dataNameEnabled),s=t[e].startIndex,a=t[e].nChars,o=n&&n.length?{dataField:i}:null;this.SetText(n,o,s,a,!0)}}LogUtil.Debug("B.Text.Formatter: RebuildFromData output")}RemapDataFields(t){if(LogUtil.Debug("B.Text.Formatter: RemapDataFields input:",t),this.HasDataFields()){const e=e=>{const[i,n]=e.split("_");for(let s=0;s<t.length;s++)if(t[s].srcFieldID===i)return`${t[s].dstFieldID}_${n}`;return e};if(this.rtData){for(let t=0;t<this.rtData.styles.length;t++)this.rtData.styles[t].dataField&&(this.rtData.styles[t].dataField=e(this.rtData.styles[t].dataField));for(let t=0;t<this.rtData.dataFields.length;t++)this.rtData.dataFields[t].fieldID&&(this.rtData.dataFields[t].fieldID=e(this.rtData.dataFields[t].fieldID))}if(this.fmtText){for(let t=0;t<this.fmtText.styles.length;t++)this.fmtText.styles[t].dataField&&(this.fmtText.styles[t].dataField=e(this.fmtText.styles[t].dataField));this.fmtText.paragraphs.forEach((t=>{t.lines.forEach((t=>{for(let i=0;i<t.dataFields.length;i++)t.dataFields[i].fieldID&&(t.dataFields[i].fieldID=e(t.dataFields[i].fieldID))}))}))}if(this.renderedDataFields)for(let t=0;t<this.renderedDataFields.length;t++)this.renderedDataFields[t].fieldID&&(this.renderedDataFields[t].fieldID=e(this.renderedDataFields[t].fieldID))}LogUtil.Debug("B.Text.Formatter: RemapDataFields output")}static CreateTextRunElem(t,e,i,n,s){LogUtil.Debug("B.Text.Formatter: CreateTextRunElem input:",{text:t,style:e,doc:i,linksDisabled:n,fieldStyleOverride:s});let a=1;const o=new T3Svg.Container(T3Svg.create("tspan"));let r=String(t).replace(/\n/g,"");r.length||(r="."),o.node.textContent=r.replace(/ /g," "),o.attr("xml:space","preserve"),o.attr("text-rendering","optimizeSpeed");let l=e.color,h=e.weight,c=e.style,u=e.decoration;const d=e.hyperlink>=0;if(s&&(s.textColor&&(l=s.textColor),s._curFieldStyle)){const t=s._curFieldStyle;for(let e=0;e<t.length;e++)switch(t[e].name){case"color":l=t[e].val;break;case"font-weight":h=t[e].val;break;case"font-style":c=t[e].val;break;case"text-decoration":"underline"===t[e].val?(s._curFieldDecoration=t[e].val,u=null):u=t[e].val}}if(e){"sub"!==e.baseOffset&&"super"!==e.baseOffset||(a=.8);for(const t in e)switch(t){case"font":e.mappedFont||(e.mappedFont=[]),$$1(o.node).css("font-family",e.mappedFont);break;case"size":let i=e[t];isNaN(i)||(i*=a,o.attr("font-size",i));break;case"weight":o.attr("font-weight",h);break;case"style":o.attr("font-style",c);break;case"decoration":u&&o.attr("text-decoration",u);break;case"color":d&&!n||o.attr("fill",l);break;case"colorTrans":o.attr("opacity",e[t])}d&&!n&&o.attr("fill","#0000FF")}return LogUtil.Debug("B.Text.Formatter: CreateTextRunElem output:",o),o}static GetRunPositionForChar(t,e,i,n,s){if(LogUtil.Debug("B.Text.Formatter: GetRunPositionForChar input:",{element:t,charIndex:e,isStart:i,cache:n,offset:s}),e<0)return-1;let a;if(s=s||0,n&&n.startOffsets&&n.endOffsets&&n.startOffsets.length>e){a=(i?n.startOffsets:n.endOffsets)[e]}if(void 0===a){a=-1;try{if(a=(i?t.getStartPositionOfChar(e):t.getEndPositionOfChar(e)).x-s,n){(i?n.startOffsets:n.endOffsets)[e]=a}}catch(o){throw o}}return LogUtil.Debug("B.Text.Formatter: GetRunPositionForChar output:",a),a}static CalcStyleMetrics(t,e){LogUtil.Debug("B.Text.Formatter: CalcStyleMetrics input:",{style:t,doc:e});let i=null;const n={height:0,width:0,ascent:0,descent:0,extraYOffset:0};let s=!1,a=!1;const o=new T3Svg.Container(T3Svg.create("text"));o.attr("xml:space","preserve"),o.attr("text-anchor","start");const r=Formatter.CreateTextRunElem(" .",t,e,!1,null);o.add(r),o.attr("fill-opacity",0);const l=e.GetFormattingLayer();l.svgObj.add(o);const h=o.node.getExtentOfChar(0);if(l.svgObj.remove(o),n.height=h.height,n.width=h.width,n.ascent=-h.y,n.descent=n.height-n.ascent,n.extraYOffset=0,t&&(s="sub"===t.baseOffset,a="super"===t.baseOffset),s||a){i=Utils1.CopyObj(t),i.baseOffset=void 0;const s=e.CalcStyleMetrics(i);if(a){const t=s.ascent/2,e=t+n.ascent+s.descent;e>s.height&&(s.height=e),n.height=s.height,n.ascent=s.height-s.descent,n.descent=s.descent,n.extraYOffset=-t}else{const t=n.ascent/2;s.descent<n.descent+t&&(s.descent=n.descent+t),n.height=s.ascent+s.descent,n.ascent=s.ascent,n.descent=s.descent,n.extraYOffset=t}}return LogUtil.Debug("B.Text.Formatter: CalcStyleMetrics output:",n),n}static MakeIDFromStyle(t){LogUtil.Debug("B.Text.Formatter: MakeIDFromStyle input:",t);const e=(t.font+"_"+t.size+"_"+t.weight+"_"+t.style+"_"+t.baseOffset).replace(/ /g,"");return LogUtil.Debug("B.Text.Formatter: MakeIDFromStyle output:",e),e}static FindPrevNextWord(t,e,i){LogUtil.Debug("B.Text.Formatter: FindPrevNextWord input:",{text:t,position:e,isPrevious:i});const n=t.length,s=/[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/,a=/[`~!@#$%\^&?*()_\-+={}\[\]|\\;:'",.<>\/]/,o=/[^\s`~!@#$%\^&?*()_\-+={}\[\]|\\;:'",.<>\/]/,r=t=>s.test(t)?s:a.test(t)?a:o.test(t)?o:null;let l;if(i&&e>0){for(e--;s.test(t[e])&&e>0;)e--;if(l=r(t[e]),l&&e>0)for(;l.test(t[e-1])&&e>0;)e--}else if(e<n){for(l=r(t[e]);l&&l.test(t[e])&&e<n;)e++;for(!l&&e<n&&e++;s.test(t[e])&&e<n;)e++}return LogUtil.Debug("B.Text.Formatter: FindPrevNextWord output:",e),e}static FormatDataFieldID(t,e){LogUtil.Debug("B.Text.Formatter: FormatDataFieldID input:",{fieldID:t,generateUnique:e});let i=t;const n=i.indexOf("_")>0;return e?n||(i+="_"+Utils3.MakeShortUniqueID()):n&&(i=i.split("_")[0]),LogUtil.Debug("B.Text.Formatter: FormatDataFieldID output:",i),i}}class Edit{constructor(t){this.parent=t,this.isActive=!1,this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.inActiveSel=!1,this.activeSelPos=-1,this.cursorPos=-1,this.cursorLine=void 0,this.curHit=null,this.lastClickTime=0,this.inWordSelect=!1,this.anchorWord=null,this.savedCursorState=this.parent.cursorState,this.TableDrag=!1}BeginTableDrag(){this.TableDrag=!0,this.DeactivateCursor(),this.ClearSelection(),this.parent.SetSelectionVisible(!1),this.parent.ClearDataFieldHilites(),this.curHit=null}SetVirtualKeyboardHook(t,e){this.virtualKeyboardHook=t,this.InitTextEntry(e)}Activate(t,e){this.isActive=!0,this.inActiveSel=!1,this.lastClickTime=0,this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.parent.decorationAreaElem.attr("pointer-events",OptConstant.EventBehavior.None),this.parent.clickAreaElem.attr("pointer-events",OptConstant.EventBehavior.HiddenAll),this.parent.CallEditCallback("activate"),this.savedCursorState=this.parent.cursorState,this.parent.cursorState=CursorConstant.CursorState.None,this.activateInit=!0,this.lastKeyProcessed=!1,setTimeout((()=>{this.activateInit=!1}),10),this.textEntryField&&this.InitTextEntry(this.textEntryField),t?(t.gesture={center:{clientX:t.clientX,clientY:t.clientY}},this.HandleMouseDown(t),e?this.parent.DoSpellCheck():this.HandleMouseUp(t),this.virtualKeyboardHook&&this.virtualKeyboardHook(this.parent,!0)):(this.SetInsertPos(this.parent.GetTextLength()),this.virtualKeyboardHook&&this.virtualKeyboardHook(this.parent,!0),this.parent.DoSpellCheck()),this.parent.SetCursorState(CursorConstant.CursorState.EditLink),this.UpdateTextEntryField(!1),this.parent.RenderDataFieldHilites()}Deactivate(t){this.isActive=!1,this.inActiveSel=!1,this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.activateInit=!1,t||(this.parent.DoSpellCheck(),this.parent.UpdateTextObject()),this.parent.clickAreaElem.node.removeAttribute("pointer-events"),this.parent.cursorState===CursorConstant.CursorState.EditLink&&this.parent.SetCursorState(this.savedCursorState),this.savedCursorState=this.parent.cursorState,this.DeactivateCursor(),this.ClearSelection(),this.parent.ClearDataFieldHilites(),this.parent.CallEditCallback("deactivate"),this.virtualKeyboardHook&&this.virtualKeyboardHook(this.parent,!1),this.textEntryField&&this.textEntryField.off("input")}IsActive(){return this.isActive}SetSelection(t,e,i,n,s){t>=0&&t===e?this.SetInsertPos(t,{rLine:i}):(this.selStart=t,this.selEnd=e,this.selAnchor=void 0!==n?n:t,this.UpdateSelection()),s||this.UpdateTextEntryField(!0)}ClearSelection(){this.selStart=-1,this.selEnd=-1,this.selAnchor=-1,this.UpdateSelection()}GetSelection(){return{start:this.selStart,end:this.selEnd,line:this.cursorLine,anchor:this.selAnchor}}SetInsertPos(t,e,i){this.selStart=t,this.selEnd=t,this.selAnchor=t,this.UpdateSelection(),this.cursorPos=t,this.cursorLine=e?e.rLine:void 0,this.UpdateCursor(),i||this.UpdateTextEntryField(!0),this.parent.CallEditCallback("select")}UpdateSelection(){let t,e;if(e=new Creator,this.DeactivateCursor(),this.selStart<0||this.selEnd<0||this.selStart===this.selEnd)this.parent.HideSelection();else if(t=this.parent.formatter.GetRenderedRange(this.selStart,this.selEnd),t.length){for(let n=0;n<t.length;n++)e.MoveTo(t[n].left,t[n].top),e.LineTo(t[n].right,t[n].top),e.LineTo(t[n].right,t[n].bottom),e.LineTo(t[n].left,t[n].bottom),e.ClosePath();const i=e.ToString();this.parent.ShowSelection(i)}else this.parent.HideSelection()}DeactivateCursor(){this.parent.HideInputCursor(),this.cursorPos=-1,this.cursorLine=void 0}UpdateCursor(){if(this.cursorPos<0)this.DeactivateCursor();else{const t=this.parent.formatter.GetRenderedCharInfo(this.cursorPos,this.cursorLine);this.parent.ShowInputCursor(t.left,t.top,t.bottom)}}HandleMouseDown(t){const e=t&&(t.shiftKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey),i=MouseUtil.IsRightClick(t),n=Date.now();if(this.activateInit=!1,this.isActive&&!i){const i=t.gesture.center.clientX,s=t.gesture.center.clientY,a=this.parent.doc.ConvertWindowToElemCoords(i,s,this.parent.textElem.node);if(!this.parent.linksDisabled&&(this.parent.cursorState===CursorConstant.CursorState.EditLink||this.parent.cursorState===CursorConstant.CursorState.LinkOnly)){const t=this.parent.formatter.GetHyperlinkAtPoint(a);if(t)return this.parent.CallEditCallback("hyperlink",t.url),!1}const o=this.parent.formatter.GetHitInfo(a);if(this.DeactivateCursor(),this.parent.activeEditStyle=-1,this.inActiveSel=!0,this.activeSelPos=o.index,this.selStart>=0&&this.selAnchor>=0&&e)return this.HandleMouseMove(t),this.parent.CallEditCallback("click"),!1;if(this.selStart=o.index,this.selEnd=o.index,this.selAnchor=o.index,this.curHit=o,this.lastClickTime+300<n)this.inWordSelect=!1,this.anchorWord=null;else{const t=this.parent.formatter.GetWordAtIndex(o.index);t.end>t.start&&(this.inWordSelect=!0,this.anchorWord=t,this.selStart=t.start,this.selEnd=t.end,this.selAnchor=t.start)}if(this.inWordSelect){let t=this.parent.formatter.GetDataField(this.selStart);t&&(this.selStart=t.startPos,this.selAnchor=t.startPos),t=this.parent.formatter.GetDataField(this.selEnd),t&&(this.selEnd=t.endPos)}else{const t=this.parent.formatter.GetDataField(this.selStart);t&&t.startPos!==this.selStart&&(this.selStart=t.startPos,this.selEnd=t.endPos,this.selAnchor=t.startPos)}return this.lastClickTime=n,this.SetSelection(this.selStart,this.selEnd,void 0,this.selAnchor),this.parent.CallEditCallback("click"),!1}}HandleMouseMove(t){let e,i,n;const s={x:0,y:0};if(this.inActiveSel){this.activateInit=!1;const a=t.gesture.center.clientX,o=t.gesture.center.clientY,r=this.parent.doc.ConvertWindowToElemCoords(a,o,this.parent.textElem.node);s.x=r.x,s.y=r.y;const l=this.parent.textElem.trans.x,h=this.parent.textElem.trans.y;s.x+=l,s.y+=h;const c=this.parent.GetPos();if(s.x<0||s.x>this.parent.geometryBBox.width||s.y<0||s.y>this.parent.geometryBBox.height){const t={x:c.x+s.x,y:c.y+s.y};this.parent.CallEditCallback("dragoutside",t)}return e=this.parent.formatter.GetHitInfo(r),this.curHit=e,this.activeSelPos=Math.max(e.index,0),this.inWordSelect?(i=this.parent.formatter.GetWordAtIndex(this.activeSelPos),this.activeSelPos>=this.anchorWord.start?(this.selStart=this.anchorWord.start,this.selEnd=i.end):(this.selStart=i.start,this.selEnd=this.anchorWord.end)):this.selAnchor<=this.activeSelPos?(this.selStart=this.selAnchor,this.selEnd=this.activeSelPos):(this.selStart=this.activeSelPos,this.selEnd=this.selAnchor),n=this.parent.formatter.GetDataField(this.selStart),n&&(this.selStart=n.startPos),n=this.parent.formatter.GetDataField(this.selEnd),n&&n.startPos!==this.selEnd&&(this.selEnd=n.endPos),this.SetSelection(this.selStart,this.selEnd,void 0,this.selAnchor),!1}}HandleMouseUp(t){if(this.inActiveSel)return this.activateInit=!1,this.TableDrag?(this.TableDrag=!1,this.inActiveSel=!1,this.parent.CallEditCallback("dragoutside_mouseup"),!1):(this.inActiveSel=!1,this.selStart===this.selEnd?(this.SetInsertPos(this.selStart,this.curHit),this.parent.DoSpellCheck()):(this.parent.CallEditCallback("select"),this.parent.CallEditCallback("selectrange")),this.curHit=null,!1)}HandleKeyPress(t){const e=t.charCode?t.charCode:t.keyCode;let i=String.fromCharCode(e);const n=t&&(t.shiftKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey),s=t&&(t.ctrlKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.ctrlKey),a={keyCode:i,shiftKey:n,ctrlKey:s},o=this.activateInit;if(this.activateInit=!1,this.lastKeyProcessed=!1,i!==t.key&&t.key&&1===t.key.length&&(i=t.key),"\t"===i)return this.parent.CallEditCallback("keyend",a),this.lastKeyProcessed=!0,!0;if("\r"===i||"\n"===i){if(a.keyCode=KeyboardConstant.Keys.Enter,this.parent.CallEditCallback("keyend",a))return this.lastKeyProcessed=!0,!0;if(!o&&s)return this.lastKeyProcessed=!0,this.parent.Paste(i,!1),!0}return!1===this.parent.CallEditCallback("charfilter",i)?(this.lastKeyProcessed=!0,!0):!!o&&(this.lastKeyProcessed=!0,this.parent.Paste(i,!1),!0)}HandleKeyDown(t){const e=t&&(t.shiftKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.shiftKey),i=t&&(t.ctrlKey||t.gesture&&t.gesture.srcEvent&&t.gesture.srcEvent.ctrlKey);switch(this.activateInit=!1,this.lastKeyProcessed=!1,t.keyCode){case 8:case 46:this.lastKeyProcessed=!0,this.HandleDeleteKey(t.keyCode);break;case 9:case 35:case 36:case 37:case 38:case 39:case 40:this.lastKeyProcessed=!0,this.HandleCursorKey(t.keyCode,e,i);break;case 13:case 32:return this.HandleKeyPress(t);default:return!1}return!0}HandleDeleteKey(t){const e=this.selStart,i=this.selEnd-this.selStart;e<0||(i>0?this.parent.Delete():46===t?e<this.parent.GetTextLength()&&(this.selEnd=e+1,this.parent.Delete()):8===t&&e>0&&(this.selStart--,this.parent.Delete()))}HandleCursorKey(t,e,i){let n={index:-1,line:void 0},s=-1,a=!1;const o=this.selStart!==this.selEnd,r={keyCode:t,shiftKey:e,ctrlKey:i};switch(e&&!this.inWordSelect?s=this.selAnchor===this.selStart?this.selEnd:this.selStart:(s=this.selEnd,this.selAnchor=this.selStart,this.inWordSelect=!1),t){case KeyboardConstant.Keys.Tab:n.index=-1;break;case KeyboardConstant.Keys.End:n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"end",r),a=!0;break;case KeyboardConstant.Keys.Home:n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"home",r),a=!0;break;case KeyboardConstant.Keys.Left_Arrow:o&&!e&&(s=this.selStart),n=!o||e||i?this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"prev",r):{index:s};break;case KeyboardConstant.Keys.Up_Arrow:o&&!e&&(s=this.selStart),n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"up",r);break;case KeyboardConstant.Keys.Right_Arrow:o&&!e&&(s=this.selEnd),n=!o||e||i?this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"next",r):{index:s};break;case KeyboardConstant.Keys.Down_Arrow:o&&!e&&(s=this.selEnd),n=this.parent.formatter.GetAdjacentChar(s,this.cursorLine,"down",r);break;default:return}n.index!==s||a||o?(e?(s===this.selStart?this.selStart=n.index:this.selEnd=n.index,this.selStart>this.selEnd&&([this.selStart,this.selEnd]=[this.selEnd,this.selStart])):(this.selStart=n.index,this.selEnd=n.index,this.selAnchor=n.index),this.parent.activeEditStyle=-1,this.SetSelection(this.selStart,this.selEnd,n.line,this.selAnchor),this.parent.CallEditCallback("select"),this.parent.DoSpellCheck()):this.parent.CallEditCallback("keyend",r)}InitTextEntry(t){this.textEntryField=$$1(t),this.textEntrySelStart=0,this.textEntrySelEnd=0,this.textEntryField.off("input"),this.textEntryField.on("input",this,(t=>{const e=t.data;return e&&e.HandleTextEntryFieldUpdate(),!1})),this.ResetTextEntry()}ResetTextEntry(){if(this.isActive&&this.textEntryField&&"hidden"!==this.textEntryField.css("visibility")){if(null==this.inputFocusTimer&&(this.inputFocusTimer=setInterval((()=>{this.ResetTextEntry()}),10)),!this.textEntryField.is(":focus")){const t=document.activeElement;null!=t&&t!==document.body&&t!==window&&t!==document&&t!==$$1("#_clipboardInput")[0]&&t!==$$1("#_IEclipboardDiv")[0]||this.textEntryField.focus()}}else null!=this.inputFocusTimer&&(clearInterval(this.inputFocusTimer),this.inputFocusTimer=void 0)}UpdateTextEntryField(t){if(this.isActive&&this.textEntryField&&void 0!==this.textEntryField[0]){const e=this.textEntryField[0];this.ResetTextEntry(),t||e.value===this.parent.formatter.rtData.text||this.textEntryField.val(this.parent.formatter.rtData.text);const i=e.value.length,n=Math.min(Math.max(this.selStart,0),i),s=Math.min(Math.max(this.selEnd,n),i);e.selectionStart===n&&e.selectionEnd===s||Edit.SetInputSelection(e,n,s),this.textEntrySelStart=n,this.textEntrySelEnd=s}}ValidateEdit(t,e,i){const n=this.selStart,s=this.selEnd-this.selStart;let a="",o="",r="";return n>=e.length?r=e+t:(n>0&&(a=e.slice(0,n)),n+s<e.length&&(o=e.slice(n+s)),r=a+t+o),r===i}HandleTextEntryFieldUpdate(){if(this.isActive&&this.textEntryField)if(this.activateInit=!1,this.lastKeyProcessed)this.UpdateTextEntryField();else{const t=this.textEntryField[0],e=t.value,i=this.parent.formatter.rtData.text;let n=t.selectionStart,s=t.selectionEnd,a="";this.selStart=this.textEntrySelStart,this.selEnd=this.textEntrySelEnd,n=Math.min(n,e.length),s=Math.min(s,e.length),s>0&&(a=s>this.selStart?e.slice(this.selStart,s):e.slice(s-1,s));let o=null;if(this.ValidateEdit(a,i,e)||(o=!1,this.selStart=o.pos,this.selEnd=o.pos+o.replace,a=o.str),a){if(!1===this.parent.CallEditCallback("charfilter",a))return t.value!==this.parent.formatter.rtData.text&&this.textEntryField.val(this.parent.formatter.rtData.text),void(t.selectionStart===this.textEntrySelStart&&t.selectionEnd===this.textEntrySelEnd||Edit.SetInputSelection(t,this.textEntrySelStart,this.textEntrySelEnd));this.parent.Paste(a,!1,!0)}else o&&o.replace&&this.parent.Delete(!0);this.SetSelection(s,s,void 0,s,!0),Edit.SetInputSelection(t,n,s),this.textEntrySelStart=n,this.textEntrySelEnd=s}}static SetInputSelection(t,e,i){t.selectionStart=e,t.selectionEnd=i}}class Text$1 extends Element$1{constructor(){super()}CreateElement(t,e){return this.formatter=new Formatter(this),this.editor=new Edit(this),this.svgObj=new T3Svg.Container(T3Svg.create("g")),this.InitElement(t,e),this.textElem=new T3Svg.Container(T3Svg.create("text")),this.selectElem=new T3Svg.Path,this.cursorElem=new T3Svg.Line,this.clickAreaElem=new T3Svg.Rect,this.decorationAreaElem=new T3Svg.Container(T3Svg.create("g")),this.cursorTimer=void 0,this.cursorPos=void 0,this.cursorState=CursorConstant.CursorState.LinkOnly,this.clickAreaElem.attr("stroke-width",0),this.clickAreaElem.attr("fill","none"),this.clickAreaElem.attr("visibility","hidden"),this.clickAreaElem.node.setAttribute("no-export","1"),this.selectElem.node.setAttribute("no-export","1"),this.cursorElem.node.setAttribute("no-export","1"),this.svgObj.add(this.clickAreaElem),this.svgObj.add(this.textElem),this.svgObj.add(this.decorationAreaElem),this.minHeight=0,this.vAlign="top",this.textElemOffset=0,this.activeEditStyle=-1,this.selectHidden=!1,this.linksDisabled=!1,this.editCallback=null,this.editCallbackData=null,this.dataTableID=-1,this.dataRecordID=-1,this.dataStyleOverride=null,this.lastFmtSize={width:0,height:0},this.SetText(""),this.svgObj}SetText(t,e,i,n,s){LogUtil.Debug("B.Text: SetText input:",{newText:t,formatStyle:e,startPos:i,preserveFormatting:n,updateTextEntry:s});const a=i||0,o=t.length;this.editor.IsActive()&&this.editor.ClearSelection(),!e&&this.activeEditStyle>=0&&(e=this.activeEditStyle),this.activeEditStyle=-1,this.formatter.SetText(t,e,i,n),this.UpdateTextObject(),this.editor.IsActive()&&(s||this.editor.UpdateTextEntryField(!1),this.editor.SetInsertPos(a+o,null,s)),LogUtil.Debug("B.Text: SetText output: text updated successfully")}GetText(t,e){LogUtil.Debug("B.Text: GetText input:",{startIndex:t,textLength:e});const i=this.formatter.GetText(t,e);return LogUtil.Debug("B.Text: GetText output:",i),i}GetTextLength(){LogUtil.Debug("B.Text: GetTextLength input: none");const t=this.formatter.GetTextLength();return LogUtil.Debug("B.Text: GetTextLength output:",t),t}SetRuntimeText(t,e,i,n,s){LogUtil.Debug("B.Text: SetRuntimeText input:",{textData:t,startPos:e,textLength:i,preserveFormatting:n,updateTextEntry:s});const a=e||0,o=t.text.length;this.editor.IsActive()&&this.editor.ClearSelection(),this.activeEditStyle=-1,this.formatter.SetRuntimeText(t,e,i,n),this.UpdateTextObject(),this.editor.IsActive()&&(s||this.editor.UpdateTextEntryField(!1),this.editor.SetInsertPos(a+o,null,s)),LogUtil.Debug("B.Text: SetRuntimeText output: text updated successfully")}GetRuntimeText(t,e){LogUtil.Debug("B.Text: GetRuntimeText input:",{startIndex:t,textLength:e});const i=this.formatter.GetRuntimeText(t,e);return LogUtil.Debug("B.Text: GetRuntimeText output:",i),i}DeleteText(t,e,i){LogUtil.Debug("B.Text: DeleteText input:",{startPosition:t,deleteLength:e,updateTextEntry:i}),t=t||0,this.editor.IsActive()&&this.editor.ClearSelection();let n=this.formatter.GetDataField(t);if(n&&(t=n.startPos),e){let i=t+e;n=this.formatter.GetDataField(i),n&&n.startPos!==i&&(i=n.endPos),e=i-t}this.activeEditStyle=-1,this.formatter.DeleteText(t,e),this.UpdateTextObject(),this.editor.IsActive()&&(i||this.editor.UpdateTextEntryField(!1),this.editor.SetInsertPos(t,null,i)),LogUtil.Debug("B.Text: DeleteText output:",{deletedCharacters:e,startPosition:t})}Copy(t){LogUtil.Debug("B.Text: Copy input:",{useRuntime:t});let e=0,i=0;if(this.editor.IsActive()){const t=this.editor.GetSelection();if(t.start===t.end)return LogUtil.Debug("B.Text: Copy output: null (empty selection)"),null;t.start>=0&&t.end>t.start&&(e=t.start,i=t.end-t.start)}const n=t?this.GetRuntimeText(e,i):this.GetText(e,i);return LogUtil.Debug("B.Text: Copy output:",n),n}Paste(t,e,i){LogUtil.Debug("B.Text: Paste input:",{inputText:t,useRuntime:e,updateTextEntry:i});let n,s=0,a=0;if(this.editor.IsActive()&&(n=this.editor.GetSelection()).start>=0&&(s=n.start,a=n.end-n.start),e)if(this.SetRuntimeText(t,s,a,!0,i),this.dataTableID>0&&this.dataRecordID>0){let t=this.formatter.GetTextLength();this.UpdateFromData();let e=this.formatter.GetTextLength();if(this.editor.IsActive()&&(this.editor.UpdateTextEntryField(!1),t!==e)){const i=this.editor.selStart+(e-t);this.editor.SetInsertPos(i)}}else this.formatter.ClearDataFieldRun(),this.UpdateTextObject();else this.SetText(t,null,s,a,i);this.CallEditCallback("edit"),LogUtil.Debug("B.Text: Paste output: finished pasting")}Delete(t){let e,i,n;LogUtil.Debug("B.Text: Delete input:",{updateTextEntry:t}),this.editor.IsActive()&&(n=this.editor.GetSelection(),n.start>=0&&(e=n.start,i=n.end-n.start)),this.DeleteText(e,i,t),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: Delete output:",{deletedCharacters:i,startPosition:e})}SetSelectedFormat(t){let e,i;if(LogUtil.Debug("B.Text: SetSelectedFormat input:",{formatStyle:t}),this.editor.IsActive()){const t=this.editor.GetSelection();t.start>=0&&(e=t.start,i=t.end-t.start)}this.SetFormat(t,e,i),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedFormat output: completed")}GetSelectedFormat(){let t,e,i;LogUtil.Debug("B.Text: GetSelectedFormat input: none"),this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start,i=t.end-t.start));const n=this.GetFormat(e,i);return LogUtil.Debug("B.Text: GetSelectedFormat output:",n),n}SetSelectedAlignment(t){LogUtil.Debug("B.Text: SetSelectedAlignment input:",{alignment:t});let e=0,i=0;if(this.editor.IsActive()){const t=this.editor.GetSelection();t.start>=0&&(e=t.start,i=t.end-t.start)}this.SetParagraphAlignment(t,e,i),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedAlignment output:",{alignment:t,selectionStart:e,selectionLength:i})}GetSelectedAlignment(){LogUtil.Debug("B.Text: GetSelectedAlignment called");let t,e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start));const i=this.GetParagraphAlignment(e);return LogUtil.Debug("B.Text: GetSelectedAlignment output:",i),i}SetSelectedParagraphStyle(t){let e,i;if(LogUtil.Debug("B.Text: SetSelectedParagraphStyle input:",{paragraphStyle:t}),this.editor.IsActive()){const t=this.editor.GetSelection();t.start>=0&&(e=t.start,i=t.end-t.start)}this.SetParagraphStyle(t,e,i),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedParagraphStyle output:",{paragraphStyle:t,selectionStart:e,selectionLength:i})}GetSelectedParagraphStyle(){let t;LogUtil.Debug("B.Text: GetSelectedParagraphStyle input: none");let e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start));const i=this.GetParagraphStyle(e);return LogUtil.Debug("B.Text: GetSelectedParagraphStyle output:",i),i}SetSelectedHyperlink(t){let e;LogUtil.Debug("B.Text: SetSelectedHyperlink input:",{hyperlink:t});let i=0,n=this.GetTextLength();this.editor.IsActive()&&(e=this.editor.GetSelection(),e.start>=0&&(i=e.start,n=e.end-e.start)),this.SetHyperlink(t,i,n),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: SetSelectedHyperlink output:",{hyperlink:t,startPosition:i,selectionLength:n})}GetSelectedHyperlink(){let t;LogUtil.Debug("B.Text: GetSelectedHyperlink input: none");let e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start));const i=this.GetHyperlink(e);return LogUtil.Debug("B.Text: GetSelectedHyperlink output:",i),i}DeleteSelectedHyperlink(){LogUtil.Debug("B.Text: DeleteSelectedHyperlink input: no parameters; checking editor state");let t,e=0;this.editor.IsActive()&&(t=this.editor.GetSelection(),t.start>=0&&(e=t.start)),this.DeleteHyperlink(e),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: DeleteSelectedHyperlink output: Deleted hyperlink at position",e)}SetFormat(t,e,i){LogUtil.Debug("B.Text: SetFormat input:",{newFormat:t,selectionStart:e,selectionLength:i});const n=this.formatter.SetFormat(t,e,i);this.activeEditStyle=n,this.UpdateTextObject(),LogUtil.Debug("B.Text: SetFormat output:",{activeEditStyle:this.activeEditStyle})}GetFormat(t,e){LogUtil.Debug("B.Text: GetFormat input:",{startIndex:t,rangeLength:e});let i,n=this.activeEditStyle;return i=0===e&&n>=0?this.formatter.GetFormatByID(n):this.formatter.GetCommonFormatForRange(t,e),LogUtil.Debug("B.Text: GetFormat output:",i),i}SetVerticalAlignment(t){LogUtil.Debug("B.Text: SetVerticalAlignment input:",t),this.vAlign=t,this.UpdateTextObject(),LogUtil.Debug("B.Text: SetVerticalAlignment output: vAlign updated to",this.vAlign)}GetVerticalAlignment(){LogUtil.Debug("B.Text: GetVerticalAlignment input: none");const t=this.vAlign;return LogUtil.Debug("B.Text: GetVerticalAlignment output:",t),t}SetParagraphAlignment(t,e,i){LogUtil.Debug("B.Text: SetParagraphAlignment input:",{alignment:t,selectionStart:e,selectionLength:i}),this.SetParagraphStyle({just:t},e,i),LogUtil.Debug("B.Text: SetParagraphAlignment output: completed",{alignment:t,selectionStart:e,selectionLength:i})}GetParagraphAlignment(t){LogUtil.Debug("B.Text: GetParagraphAlignment input:",{paragraphIndex:t});const e=this.GetParagraphStyle(t).just;return LogUtil.Debug("B.Text: GetParagraphAlignment output:",e),e}SetParagraphStyle(t,e,i){LogUtil.Debug("B.Text: SetParagraphStyle input:",{paragraphStyle:t,startPosition:e,selectionLength:i}),this.formatter.SetParagraphStyle(t,e,i),this.UpdateTextObject(),LogUtil.Debug("B.Text: SetParagraphStyle output: completed")}GetParagraphStyle(t){LogUtil.Debug("B.Text: GetParagraphStyle input:",{paragraphIndex:t});const e=this.formatter.GetParagraphStyle(t);return LogUtil.Debug("B.Text: GetParagraphStyle output:",e),e}GetParagraphCount(){LogUtil.Debug("B.Text: GetParagraphCount input: none");const t=this.formatter.GetParagraphCount();return LogUtil.Debug("B.Text: GetParagraphCount output:",t),t}GetParagraphPosition(t){LogUtil.Debug("B.Text: GetParagraphPosition input:",{paragraphIndex:t});const e=this.formatter.GetParagraphPosition(t);return LogUtil.Debug("B.Text: GetParagraphPosition output:",e),e}SetHyperlink(t,e,i){LogUtil.Debug("B.Text: SetHyperlink input:",{url:t,startPos:e,selectionLength:i}),t&&t.length?(this.formatter.SetHyperlink(t,e,i),this.UpdateTextObject(),LogUtil.Debug("B.Text: SetHyperlink output: hyperlink set successfully")):(this.DeleteHyperlink(e),LogUtil.Debug("B.Text: SetHyperlink output: hyperlink deleted"))}GetHyperlink(t){LogUtil.Debug("B.Text: GetHyperlink input:",t);const e=this.formatter.GetHyperlinkAtOffset(t),i=e?e.url:null;return LogUtil.Debug("B.Text: GetHyperlink output:",i),i}DeleteHyperlink(t){LogUtil.Debug("B.Text: DeleteHyperlink input:",{hyperlinkStart:t}),this.formatter.ClearHyperlink(t),this.UpdateTextObject(),LogUtil.Debug("B.Text: DeleteHyperlink output: Hyperlink removed at",t)}GetHyperlinkAtLocation(t){LogUtil.Debug("B.Text: GetHyperlinkAtLocation input:",t);const e=t.gesture.center.clientX,i=t.gesture.center.clientY+$$1(window).scrollTop(),n=this.doc.ConvertWindowToElemCoords(e,i,this.textElem.node),s=this.formatter.GetHyperlinkAtPoint(n),a=s?s.url:null;return LogUtil.Debug("B.Text: GetHyperlinkAtLocation output:",a),a}SetConstraints(t,e,i){LogUtil.Debug("B.Text: SetConstraints input:",{maxWidth:t,minWidth:e,minHeight:i}),void 0===t&&void 0===e||this.formatter.SetLimits({maxWidth:t,minWidth:e}),void 0!==i&&(this.minHeight=i),this.UpdateTextObject(),LogUtil.Debug("B.Text: SetConstraints output: Constraints updated")}SetEditCallback(t,e){LogUtil.Debug("B.Text: SetEditCallback input:",{callback:t,callbackData:e}),this.editCallback=t,this.editCallbackData=e,LogUtil.Debug("B.Text: SetEditCallback output: Callback set successfully")}CallEditCallback(t,e){if(LogUtil.Debug("B.Text: CallEditCallback input:",{actionType:t,callbackData:e}),this.editCallback){const i=this.editCallback(t,e,this,this.editCallbackData);return LogUtil.Debug("B.Text: CallEditCallback output:",i),i}LogUtil.Debug("B.Text: CallEditCallback output:","No editCallback defined")}GetTextSize(){LogUtil.Debug("B.Text: GetTextSize input: no parameters");let t=this.formatter.GetTextFormatSize();return t.height=Math.max(t.height,this.minHeight),LogUtil.Debug("B.Text: GetTextSize output:",t),t}GetTextMinDimensions(){LogUtil.Debug("B.Text: GetTextMinDimensions input: none");const t=this.formatter.GetFormatTextMinDimensions();return LogUtil.Debug("B.Text: GetTextMinDimensions output:",t),t}SetSize(t,e){LogUtil.Debug("B.Text: SetSize input:",{width:t,minHeight:e}),this.SetConstraints(t,t,e),LogUtil.Debug("B.Text: SetSize output: constraints set with",{maxWidth:t,minWidth:t,minHeight:e})}CalcTextFit(t){LogUtil.Debug("B.Text: CalcTextFit input:",t);const e=this.formatter.CalcTextFit(t);return LogUtil.Debug("B.Text: CalcTextFit output:",e),e}CalcTextWrap(t){LogUtil.Debug("B.Text: CalcTextWrap input:",t);const e=this.formatter.CalcTextWrap(t);return LogUtil.Debug("B.Text: CalcTextWrap output:",e),e}CalcFormatChange(t){LogUtil.Debug("B.Text: CalcFormatChange input:",t);const e=this.formatter.CalcFormatChange(t);return LogUtil.Debug("B.Text: CalcFormatChange output:",e),e}SetRenderingEnabled(t){LogUtil.Debug("B.Text: SetRenderingEnabled input:",{isEnabled:t});const e=this.formatter.deferredRenderNeeded;void 0===t&&(t=!0),this.formatter.renderingEnabled!==t&&(this.formatter.SetRenderingEnabled(t),t&&e&&this.UpdateTextObject()),LogUtil.Debug("B.Text: SetRenderingEnabled output: rendering enabled set to",t)}IsRenderingEnabled(t){LogUtil.Debug("B.Text: IsRenderingEnabled input:",{renderingFlag:t});const e=this.formatter.renderingEnabled;return LogUtil.Debug("B.Text: IsRenderingEnabled output:",e),e}GetContentVersion(){LogUtil.Debug("B.Text: GetContentVersion input: none");const t=this.formatter.GetContentVersion();return LogUtil.Debug("B.Text: GetContentVersion output:",t),t}GetSpellCheck(){LogUtil.Debug("B.Text: GetSpellCheck input: none");const t=this.formatter.GetSpellCheck();return LogUtil.Debug("B.Text: GetSpellCheck output:",t),t}SetSpellCheck(t,e){LogUtil.Debug("B.Text: SetSpellCheck input:",{isSpellCheckEnabled:t,updateImmediately:e}),this.formatter.SetSpellCheck(t),e&&(t?this.doc.spellChecker&&this.doc.spellChecker.CheckSpellingForTextObj(this):this.UpdateTextObject()),LogUtil.Debug("B.Text: SetSpellCheck output: completed")}UpdateSpellCheck(t){LogUtil.Debug("B.Text: UpdateSpellCheck input:",t),this.formatter.UpdateSpellCheck(t),this.UpdateTextObject(),LogUtil.Debug("B.Text: UpdateSpellCheck output: Spell check updated and text object refreshed")}GetSpellCheckList(){LogUtil.Debug("B.Text: GetSpellCheckList input: no parameters");const t=this.formatter.GetWordList();return LogUtil.Debug("B.Text: GetSpellCheckList output:",t),t}DoSpellCheck(){LogUtil.Debug("B.Text: DoSpellCheck input: none"),this.formatter.SpellCheckValid()?this.doc.spellChecker.CheckSpellingForTextObj(this):this.formatter.UpdateSpellCheckFormatting(),LogUtil.Debug("B.Text: DoSpellCheck output: completed")}GetSpellAtLocation(t,e){LogUtil.Debug("B.Text: GetSpellAtLocation input:",{clientX:t,clientY:e}),e+=$$1(window).scrollTop();const i=this.doc.ConvertWindowToElemCoords(t,e,this.textElem.node),n=this.formatter.GetSpellAtPoint(i);return LogUtil.Debug("B.Text: GetSpellAtLocation output:",n),n}UpdateTextObject(){LogUtil.Debug("B.Text: UpdateTextObject input:");const t=this.formatter.GetTextFormatSize();let e=!1,i=0;if(this.formatter.renderingEnabled){const n=t.height,s=this.minHeight,a=Math.max(n,s);switch(this.vAlign){case"top":i=0;break;case"middle":i=(a-n)/2;break;case"bottom":i=a-n}const o={width:t.width,height:a};o.width===this.lastFmtSize.width&&o.height===this.lastFmtSize.height||(this.CallEditCallback("willresize",o),e=!0),this.svgObj.size(t.width,a),this.clickAreaElem.transform({x:0,y:0}),this.clickAreaElem.size(t.width,a),this.textElem.size(t.width,n),this.textElem.transform({x:0,y:i}),this.decorationAreaElem.size(t.width,n),this.decorationAreaElem.transform({x:0,y:i}),this.textElemOffset=i,this.geometryBBox.width=t.width,this.geometryBBox.height=a,this.RefreshPaint(),this.formatter.RenderFormattedText(this.textElem,this.decorationAreaElem),this.linksDisabled||this.cursorState!==CursorConstant.CursorState.EditLink&&this.cursorState!==CursorConstant.CursorState.LinkOnly||this.formatter.SetHyperlinkCursor(),this.editor.IsActive()&&(this.editor.cursorPos>=0?this.editor.UpdateCursor():this.editor.selStart>=0&&this.editor.UpdateSelection()),e&&this.CallEditCallback("didresize",o),this.lastFmtSize=o,LogUtil.Debug("B.Text: UpdateTextObject output:",o)}}Activate(t,e){LogUtil.Debug("B.Text: Activate input:",{inputEvent:t,callbackData:e}),this.activeEditStyle=-1,this.selectHidden=!1,this.doc.SetActiveEdit(this),this.editor.Activate(t,e),LogUtil.Debug("B.Text: Activate output: Editor activated")}Deactivate(t){LogUtil.Debug("B.Text: Deactivate input:",{deactivationEvent:t}),this.activeEditStyle=-1,this.doc.activeEdit=null,this.editor.Deactivate(t),LogUtil.Debug("B.Text: Deactivate output: Editor deactivated")}IsActive(){LogUtil.Debug("B.Text: IsActive input: none");const t=this.editor.IsActive();return LogUtil.Debug("B.Text: IsActive output:",t),t}SetVirtualKeyboardHook(t,e){LogUtil.Debug("B.Text: SetVirtualKeyboardHook input:",{callback:t,hookData:e}),this.editor.SetVirtualKeyboardHook(t,e),LogUtil.Debug("B.Text: SetVirtualKeyboardHook output: hook set successfully")}GetSelectedRange(){LogUtil.Debug("B.Text: GetSelectedRange input: none");let t={start:-1,end:-1};return this.editor.IsActive()&&(t=this.editor.GetSelection()),LogUtil.Debug("B.Text: GetSelectedRange output:",t),t}SetSelectedRange(t,e,i,n){LogUtil.Debug("B.Text: SetSelectedRange input:",{startIndex:t,endIndex:e,selectionExtra:i,updateFlag:n}),t<0||!this.editor.IsActive()?LogUtil.Debug("B.Text: SetSelectedRange output: Invalid start index or editor not active"):(t!==e&&(this.activeEditStyle=-1),this.editor.SetSelection(t,e,i,n),this.CallEditCallback("select"),LogUtil.Debug("B.Text: SetSelectedRange output:",{startIndex:t,endIndex:e}))}HandleKeyPressEvent(t){LogUtil.Debug("B.Text: HandleKeyPressEvent input:",t);const e=!!(this.editor&&this.editor.IsActive())&&this.editor.HandleKeyPress(t);return LogUtil.Debug("B.Text: HandleKeyPressEvent output:",e),e}HandleKeyDownEvent(t){LogUtil.Debug("B.Text: HandleKeyDownEvent input:",t);const e=this.editor&&this.editor.IsActive()&&this.editor.HandleKeyDown(t);return LogUtil.Debug("B.Text: HandleKeyDownEvent output:",e),e}HideSelection(){LogUtil.Debug("B.Text: HideSelection input: none"),this.selectElem.plot(),this.svgObj.remove(this.selectElem),LogUtil.Debug("B.Text: HideSelection output: selection hidden")}ShowSelection(t){LogUtil.Debug("B.Text: ShowSelection input:",t),this.selectElem.attr("fill","#8888FF"),this.selectElem.attr("stroke-width",0),this.selectElem.attr("fill-opacity",.4),this.selectElem.attr("pointer-events","none"),this.selectElem.transform({y:this.textElemOffset}),this.selectHidden?this.selectElem.attr("visibility","hidden"):this.selectElem.attr("visibility","visible"),t&&this.selectElem.plot(t),this.svgObj.add(this.selectElem),LogUtil.Debug("B.Text: ShowSelection output: selection displayed successfully")}SetSelectionVisible(t){LogUtil.Debug("B.Text: SetSelectionVisible input:",{isVisible:t}),this.selectHidden=!t,this.IsActive()&&(this.selectHidden?(this.cursorElem.attr("visibility","hidden"),this.selectElem.attr("visibility","hidden")):(this.cursorElem.attr("visibility","visible"),this.selectElem.attr("visibility","visible"))),LogUtil.Debug("B.Text: SetSelectionVisible output: selection visibility set to",t)}HideInputCursor(){LogUtil.Debug("B.Text: HideInputCursor input: no parameters"),void 0!==this.cursorTimer&&(clearInterval(this.cursorTimer),this.cursorTimer=void 0),this.cursorElem.attr("visibility","hidden"),this.svgObj.remove(this.cursorElem),this.cursorPos=void 0,LogUtil.Debug("B.Text: HideInputCursor output: Cursor hidden")}ShowInputCursor(t,e,i){LogUtil.Debug("B.Text: ShowInputCursor input:",{x:t,startY:e,endY:i});const n=this.doc.ConverWindowToDocLength(1);void 0!==this.cursorTimer&&clearInterval(this.cursorTimer),this.cursorElem.attr("fill","none"),this.cursorElem.attr("stroke-width",n),this.cursorElem.attr("stroke","#000"),this.cursorElem.attr("pointer-events","none"),this.cursorElem.attr({x1:t,y1:e+this.textElemOffset,x2:t,y2:i+this.textElemOffset}),this.selectHidden?this.cursorElem.attr("visibility","hidden"):this.cursorElem.attr("visibility","visible"),this.svgObj.add(this.cursorElem),this.cursorPos={x:t,y1:e+this.textElemOffset,y2:i+this.textElemOffset},this.cursorTimer=setInterval((()=>{this.cursorElem.attr("visibility","hidden"),setTimeout((()=>{this.selectHidden||this.cursorElem.attr("visibility","visible")}),250)}),1e3),this.editor.IsActive()&&this.editor.virtualKeyboardHook&&this.editor.virtualKeyboardHook(this,!0),LogUtil.Debug("B.Text: ShowInputCursor output: Cursor shown at",{x:t,y1:e+this.textElemOffset,y2:i+this.textElemOffset})}GetInputCursorPos(){if(LogUtil.Debug("B.Text: GetInputCursorPos input: none"),this.cursorPos){const t=this.doc.ConvertElemToWindowCoords(this.cursorPos.x,this.cursorPos.y1,this.svgObj.node),e=this.doc.ConvertElemToWindowCoords(this.cursorPos.x,this.cursorPos.y2,this.svgObj.node),i={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return LogUtil.Debug("B.Text: GetInputCursorPos output:",i),i}return LogUtil.Debug("B.Text: GetInputCursorPos output: cursor position is not defined"),null}SetCursorState(t){LogUtil.Debug("B.Text: SetCursorState input:",t),this.cursorState=t,this.ClearAllCursors(),t!==CursorConstant.CursorState.EditOnly&&t!==CursorConstant.CursorState.EditLink||this.SetCursor(CursorConstant.CursorType.Text),this.linksDisabled||t!==CursorConstant.CursorState.EditLink&&t!==CursorConstant.CursorState.LinkOnly||this.formatter.SetHyperlinkCursor(),LogUtil.Debug("B.Text: SetCursorState output: cursorState set to",t)}GetCursorState(){LogUtil.Debug("B.Text: GetCursorState input: none");const t=this.cursorState;return LogUtil.Debug("B.Text: GetCursorState output:",t),t}DisableHyperlinks(t){LogUtil.Debug("B.Text: DisableHyperlinks input:",{shouldDisableHyperlinks:t}),this.linksDisabled=t,this.SetCursorState(this.cursorState),this.UpdateTextObject(),LogUtil.Debug("B.Text: DisableHyperlinks output:",{linksDisabled:this.linksDisabled})}InitDataSettings(t,e,i){LogUtil.Debug("B.Text: InitDataSettings input:",{tableId:t,recordId:e,styleOverride:i}),this.dataTableID=t,this.dataRecordID=e,this.dataStyleOverride=i,LogUtil.Debug("B.Text: InitDataSettings output:",{dataTableID:this.dataTableID,dataRecordID:this.dataRecordID,dataStyleOverride:this.dataStyleOverride})}IsDataInitialized(){LogUtil.Debug("B.Text: isDataInitialized input: no parameters");const t=this.dataTableID>0&&this.dataRecordID>0;return LogUtil.Debug("B.Text: isDataInitialized output:",t),t}GetDataField(t){LogUtil.Debug("B.Text: GetDataField input:",{startPosition:t});const e=this.formatter.GetDataField(t);return LogUtil.Debug("B.Text: GetDataField output:",e),e}InsertDataField(t,e,i){LogUtil.Debug("B.Text: InsertDataField input:",{fieldId:t,startPosition:e,preserveFormatting:i});const n=this.GetDataText(t,this.formatter.GetDataNameDisplay()),s={dataField:Formatter.FormatDataFieldID(t,!0)};this.SetText(n,s,e,i),LogUtil.Debug("B.Text: InsertDataField output: data field inserted",{fieldId:t,startPosition:e,preserveFormatting:i})}PasteDataField(t){LogUtil.Debug("B.Text: PasteDataField input:",{dataFieldId:t});let e,i=0,n=0;this.editor.IsActive()&&(e=this.editor.GetSelection(),e.start>=0&&(i=e.start,n=e.end-e.start)),this.InsertDataField(t,i,n),this.CallEditCallback("edit"),LogUtil.Debug("B.Text: PasteDataField output:",{dataFieldId:t,selectionStart:i,selectionLength:n})}HasDataFields(){LogUtil.Debug("B.Text: HasDataFields input: no parameters");const t=this.formatter.HasDataFields();return LogUtil.Debug("B.Text: HasDataFields output:",t),t}HasDataField(t){LogUtil.Debug("B.Text: HasDataField input:",t);const e=this.formatter.HasDataField(t);return LogUtil.Debug("B.Text: HasDataField output:",e),e}UpdateFromData(t,e){LogUtil.Debug("B.Text: UpdateFromData input:",{tableId:t,recordId:e}),void 0!==t&&void 0!==e&&(t===this.dataTableID&&e===this.dataRecordID||(this.dataStyleOverride=null),this.InitDataSettings(t,e,this.dataStyleOverride)),this.formatter.RebuildFromData(),this.UpdateTextObject(),LogUtil.Debug("B.Text: UpdateFromData output:","Data updated successfully")}SetDataNameDisplay(t){LogUtil.Debug("B.Text: SetDataNameDisplay input:",{dataName:t}),this.formatter.SetDataNameDisplay(t),this.UpdateFromData(this.dataTableID,this.dataRecordID),LogUtil.Debug("B.Text: SetDataNameDisplay output: Data name display updated")}GetDataNameDisplay(){LogUtil.Debug("B.Text: GetDataNameDisplay input: no parameters");const t=this.formatter.GetDataNameDisplay();return LogUtil.Debug("B.Text: GetDataNameDisplay output:",t),t}GetDataText(t,e){LogUtil.Debug("B.Text: GetDataText input:",{fieldId:t,useFieldName:e});let i=" ";if(this.dataTableID<0||this.dataRecordID<0)return LogUtil.Debug("B.Text: GetDataText output:",i),i;const n=Formatter.FormatDataFieldID(t,!1);if(e)i=TData.FieldedDataGetFieldName(this.dataTableID,n);else{i=TData.FieldedDataGetFieldValue(this.dataTableID,this.dataRecordID,n);const t=TData.FieldedDataGetFieldType(this.dataTableID,n);i=T3Gv.opt.ModifyFieldDataForDisplay(i,t)}return i&&""!==i||(i=" "),LogUtil.Debug("B.Text: GetDataText output:",i),i}GetDataStyle(t){LogUtil.Debug("B.Text: GetDataStyle input:",{dataFieldId:t});let e=[];if(this.dataTableID<0||this.dataRecordID<0)return LogUtil.Debug("B.Text: GetDataStyle output:",e),e;const i=Formatter.FormatDataFieldID(t,!1),n=TData.FieldedDataGetFieldStyle(this.dataTableID,this.dataRecordID,i);return n&&(e=TData.FieldedDataParseStyle(n)),LogUtil.Debug("B.Text: GetDataStyle output:",e),e}CheckDataExists(t){LogUtil.Debug("B.Text: CheckDataExists input:",{dataFieldId:t});const e=this.dataTableID>=0,i=this.dataRecordID>=0;let n=!1;if(e&&i){const e=Formatter.FormatDataFieldID(t,!1);n=!!TData.FieldedDataGetRecord(this.dataTableID,this.dataRecordID)[e]}return LogUtil.Debug("B.Text: CheckDataExists output:",n),n}RenderDataFieldHilites(){LogUtil.Debug("B.Text: RenderDataFieldHilites input: no parameters"),this.formatter.RenderDataFieldHilites(this.decorationAreaElem),LogUtil.Debug("B.Text: RenderDataFieldHilites output: Data field highlights rendered")}ClearDataFieldHilites(){LogUtil.Debug("B.Text: ClearDataFieldHilites input: no parameters"),this.formatter.ClearDataFieldHilites(this.decorationAreaElem),LogUtil.Debug("B.Text: ClearDataFieldHilites output: Data field hilites cleared")}RemapDataFields(t){LogUtil.Debug("B.Text: RemapDataFields input:",t),this.HasDataFields()&&this.formatter.RemapDataFields(t),LogUtil.Debug("B.Text: RemapDataFields output: completed remapping")}static RemapDataFieldsInRuntimeText(t,e){function i(t){const i=t.split("_");let n=i[0];const s=i[1];for(let a=0;a<e.length;a++)if(e[a].srcFieldID===n){n=e[a].dstFieldID;break}return n+"_"+s}LogUtil.Debug("B.Text: RemapDataFieldsInRuntimeText input:",{runtimeText:t,mappingArray:e});for(let n=0;n<t.styles.length;n++){const e=t.styles[n].dataField;e&&(t.styles[n].dataField=i(e))}LogUtil.Debug("B.Text: RemapDataFieldsInRuntimeText output:",t)}}class Image$1 extends Element$1{constructor(){super()}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("image")),this.InitElement(t,e),this.svgObj}SetURL(t){this.svgObj.attr({preserveAspectRatio:"none"}),this.svgObj.src=t,this.svgObj.attr("xlink:href",t,T3Svg.xlink)}}class DocInfo{constructor(){this.dispX=0,this.dispY=0,this.dispWidth=0,this.dispHeight=0,this.dispDpiX=0,this.dispDpiY=0,this.scrollX=0,this.scrollY=0,this.docDpi=0,this.docScale=0,this.docWidth=0,this.docHeight=0,this.docToScreenScale=0,this.docDpiScale=0,this.docVisX=0,this.docVisY=0,this.docVisWidth=0,this.docVisHeight=0,this.docScreenX=0,this.docScreenY=0,this.docScreenWidth=0,this.docScreenHeight=0,this.maxScrollX=0,this.maxScrollY=0}}class ForeignObject$1 extends Element$1{constructor(){super(...arguments),this.vueInstance=null}CreateElement(t,e){return this.svgObj=new T3Svg.Container(T3Svg.create("foreignObject")),this.InitElement(t,e),this.svgObj}SetSize(t,e){return this.svgObj.size(t,e),this}SetPosition(t,e){return this.svgObj.move(t,e),this}MountVueComponent(t,e={}){try{Promise.all([__vitePreload((()=>import("./vue.runtime.esm-bundler.409117e9.js")),["assets/vue.runtime.esm-bundler.409117e9.js","assets/index.9313841a.js","assets/index.1e63f766.css"]),__vitePreload((()=>import("./quasar.client.86f141af.js")),["assets/quasar.client.86f141af.js","assets/index.9313841a.js","assets/index.1e63f766.css"])]).then((([i,n])=>{const s=document.createElement("div");if(s.style.width="100%",s.style.height="100%",this.svgObj.node.appendChild(s),i.createApp){this.vueInstance=i.createApp(t,e);const a=n.default||n;this.vueInstance.use(a.Quasar||a,{config:{},plugins:{}}),this.vueInstance.mount(s)}else if(i.default&&"function"==typeof i.default.extend){i.default.use(n.default||n);const a=i.default.extend(t);this.vueInstance=new a({propsData:e}),this.vueInstance.$mount(s)}else if("function"==typeof i.extend){i.use(n.default||n);const a=i.extend(t);this.vueInstance=new a({propsData:e}),this.vueInstance.$mount(s)}else this.vueInstance=i.createApp(t,e),this.vueInstance.use(n.default||n),this.vueInstance.mount(s)}))}catch(i){T3Util.Error("= b.ForeignObject: MountVueComponent/ Failed to mount Vue component:",i)}return this}SetHtmlContent(t){return this.svgObj.html(t),this}DestroyVueComponent(){this.vueInstance&&(this.vueInstance.$destroy(),this.vueInstance=null,this.svgObj.node.textContent="")}setSecureHTML(t){__vitePreload((()=>import("./T3SecurityUtil.582bb0fe.js")),[]).then((({T3Security:e})=>{const i=e.sanitizeHTML(t,!0);this.svgObj.node.innerHTML=i})).catch((()=>{this.svgObj.node.textContent=t}))}RemoveElement(){this.DestroyVueComponent(),super.RemoveElement()}}const _Document=class extends Container{constructor(t,e){super(),this.parentElem=t,this.parentElem="#"!==this.parentElem.charAt(0)&&"."!==this.parentElem.charAt(0)?"#"+this.parentElem:this.parentElem,this.svgObj=T3Svg.svg($$1(this.parentElem)[0]),this.docInfo=new DocInfo,this.activeEdit=null,this.spellChecker=null,this.documentLayerId=null,this.imageLoadRefCount=0,this.InitElement(this,null),this.InitializeContainer()}GetSpellCheck(){LogUtil.Debug("= B.Document","GetSpellCheck","Not implemented")}CreateShape(t){let e=null;switch(t){case OptConstant.CSType.Rect:e=new Rect;break;case OptConstant.CSType.RRect:e=new RRect;break;case OptConstant.CSType.Oval:e=new Oval;break;case OptConstant.CSType.Line:e=new Line;break;case OptConstant.CSType.Polyline:e=new PolyLine;break;case OptConstant.CSType.PolyPolyline:e=new PolyPolyLine;break;case OptConstant.CSType.PolylineContainer:e=new PolyLine;break;case OptConstant.CSType.Polygon:e=new Polygon;break;case OptConstant.CSType.Path:e=new Path;break;case OptConstant.CSType.Text:e=new Text$1;break;case OptConstant.CSType.Image:e=new Image$1;break;case OptConstant.CSType.Group:e=new Group;break;case OptConstant.CSType.Layer:e=new Layer;break;case OptConstant.CSType.Symbol:e=new Symbol$1;break;case OptConstant.CSType.ShapeCopy:e=new ShapeCopy;break;case OptConstant.CSType.ShapeContainer:e=new ShapeContainer$1;break;case OptConstant.CSType.ForeignObject:e=new ForeignObject$1;break;default:return null}try{return e?(e.CreateElement(this,null),e):null}catch(i){throw i}}InitializeContainer(){this.GetDeviceDetail(),this.docInfo.docDpi=this.docInfo.dispDpiX,this.docInfo.docWidth=this.docInfo.dispWidth,this.docInfo.docHeight=this.docInfo.dispHeight,this.docInfo.docScale=1,this.docInfo.scrollX=0,this.docInfo.scrollY=0,this.CalcWorkArea(),this.ApplyDocumentTransform()}GetDeviceDetail(){const t=this.CreateShape(OptConstant.CSType.Rect);t.SetFillOpacity(0),t.SetStrokeWidth(0),t.SetSize("100in","100in"),this.AddElement(t);const e=t.GetBBox();this.docInfo.dispDpiX=e.width/100,this.docInfo.dispDpiY=e.height/100,this.RemoveElement(t),this.docInfo.dispWidth=$$1(this.parentElem).innerWidth(),this.docInfo.dispHeight=$$1(this.parentElem).innerHeight()}CalcWorkArea(){if(LogUtil.Debug("= B.Document CalcWorkArea ",$$1(this.parentElem)),null===$$1(this.parentElem)||void 0===$$1(this.parentElem))return;const t=$$1(this.parentElem).offset();null!=t&&(this.docInfo.dispX=t.left,this.docInfo.dispY=t.top,this.docInfo.dispWidth=$$1(this.parentElem).innerWidth(),this.docInfo.dispHeight=$$1(this.parentElem).innerHeight(),this.docInfo.scrollX=$$1(this.parentElem).scrollLeft(),this.docInfo.scrollY=$$1(this.parentElem).scrollTop(),this.docInfo.docToScreenScale=this.docInfo.dispDpiX/this.docInfo.docDpi*this.docInfo.docScale,this.docInfo.docDpiScale=this.docInfo.dispDpiX/this.docInfo.docDpi,this.docInfo.docScreenX=this.docInfo.dispX-this.docInfo.scrollX,this.docInfo.docScreenY=this.docInfo.dispY-this.docInfo.scrollY,this.docInfo.docScreenWidth=this.docInfo.docWidth*this.docInfo.docToScreenScale,this.docInfo.docScreenHeight=this.docInfo.docHeight*this.docInfo.docToScreenScale,this.docInfo.maxScrollX=Math.max(0,this.docInfo.docScreenWidth-this.docInfo.dispWidth),this.docInfo.maxScrollY=Math.max(0,this.docInfo.docScreenHeight-this.docInfo.dispHeight),this.docInfo.docVisWidth=Math.min(this.docInfo.dispWidth/this.docInfo.docToScreenScale,this.docInfo.docWidth),this.docInfo.docVisHeight=Math.min(this.docInfo.dispHeight/this.docInfo.docToScreenScale,this.docInfo.docHeight),this.docInfo.docVisX=Math.min(this.docInfo.scrollX/this.docInfo.docToScreenScale,this.docInfo.docWidth-this.docInfo.docVisWidth),this.docInfo.docVisY=Math.min(this.docInfo.scrollY/this.docInfo.docToScreenScale,this.docInfo.docHeight-this.docInfo.docVisHeight))}ApplyDocumentTransform(t){const e=this.ElementCount();if(this.svgObj.attr({width:this.docInfo.docScreenWidth,height:this.docInfo.docScreenHeight}),!t)for(let i=0;i<e;i++){const t=this.GetElementByIndex(i);t instanceof Layer&&(t.IsScalingAllowed()?t.svgObj.transform({scaleX:this.docInfo.docToScreenScale,scaleY:this.docInfo.docToScreenScale}):t.IsDpiScalingAllowed()&&t.svgObj.transform({scaleX:this.docInfo.docDpiScale,scaleY:this.docInfo.docDpiScale}))}}CalcScaleToFit(t,e,i,n){i||(i=this.docInfo.docWidth),n||(n=this.docInfo.docHeight);const s=this.docInfo.dispDpiX/this.docInfo.docDpi,a=t/(i*s),o=e/(n*s);let r=Math.min(a,o);return r>1&&(r=1),{scale:r,width:this.docInfo.docWidth*s*r,height:this.docInfo.docHeight*s*r}}SetDocumentSize(t,e){this.SetDocumentMetrics({width:t,height:e})}GetDocumentSize(){return{width:this.docInfo.docWidth,height:this.docInfo.docHeight}}SetDocumentDPI(t){this.SetDocumentMetrics({dpi:t})}SetDocumentScale(t){this.SetDocumentMetrics({scale:t})}SetDocumentMetrics(t){this.docInfo.docWidth=t.width||this.docInfo.docWidth,this.docInfo.docHeight=t.height||this.docInfo.docHeight,this.docInfo.docDpi=t.dpi||this.docInfo.docDpi,this.docInfo.docScale=t.scale||this.docInfo.docScale,this.CalcWorkArea(),this.ApplyDocumentTransform()}CalcScrollToVisible(t,e){let i=0,n=0;const s=this.docInfo.docVisX+this.docInfo.docVisWidth,a=this.docInfo.docVisY+this.docInfo.docVisHeight;return t=Math.max(0,Math.min(t,this.docInfo.docWidth)),e=Math.max(0,Math.min(e,this.docInfo.docHeight)),t<this.docInfo.docVisX?i=t-this.docInfo.docVisX:t>s&&(i=t-s),e<this.docInfo.docVisY?n=e-this.docInfo.docVisY:e>a&&(n=e-a),i||n?{xOff:this.docInfo.scrollX+i*this.docInfo.docToScreenScale,yOff:this.docInfo.scrollY+n*this.docInfo.docToScreenScale}:null}GetWorkArea(){return this.docInfo}ConvertDocToWindowCoords(t,e){return{x:t*this.docInfo.docToScreenScale+this.docInfo.docScreenX,y:e*this.docInfo.docToScreenScale+this.docInfo.docScreenY}}ConvertDocToWindowLength(t){return t*this.docInfo.docToScreenScale}ConvertOffsetToDocCoords(t,e){return{x:t/this.docInfo.docToScreenScale,y:e/this.docInfo.docToScreenScale}}ConvertWindowToDocCoords(t,e){return{x:(t-this.docInfo.docScreenX)/this.docInfo.docToScreenScale,y:(e-this.docInfo.docScreenY)/this.docInfo.docToScreenScale}}ConvertWindowToDocLength(t){return t/this.docInfo.docToScreenScale}ConvertWindowToElemCoords(t,e,i){const n=this.DOMElement().createSVGPoint(),s=this.DOMElement();n.x=t,n.y=e;const a=n.matrixTransform(s.getScreenCTM().inverse()).matrixTransform(i.getTransformToElement(s).inverse());return{x:a.x,y:a.y}}ConvertElemToWindowCoords(t,e,i){const n=this.DOMElement().createSVGPoint(),s=this.DOMElement();n.x=t,n.y=e;const a=n.matrixTransform(i.getTransformToElement(s)).matrixTransform(s.getScreenCTM());return{x:a.x,y:a.y}}RotateAroundCenterPt(t,e,i){const n=this.DOMElement().createSVGPoint(),s=this.DOMElement().createSVGMatrix(),a=(isNaN(t.x)?0:t.x)-(isNaN(e.x)?0:e.x),o=(isNaN(t.y)?0:t.y)-(isNaN(e.y)?0:e.y);n.x=a,n.y=o;const r=n.matrixTransform(s.rotate(i));return{x:r.x+e.x,y:r.y+e.y}}CalculateRotatedOffsetForResize(t,e,i){const n={x:t.x+t.width/2,y:t.y+t.height/2},s={x:e.x+e.width/2,y:e.y+e.height/2},a=this.RotateAroundCenterPt(s,n,i);return{x:a.x-s.x,y:a.y-s.y}}AddLayer(t){const e=this.CreateShape(OptConstant.CSType.Layer);return e.SetID(t),this.AddElement(e),this.ApplyDocumentTransform(),$$1(e.svgObj.node).data("layerID",t),e}RemoveLayer(t){const e=this.GetElementById(t);e&&this.RemoveElement(e)}GetLayer(t){let e,i=null;const n=this.ElementCount();for(let s=0;s<n;s++)if(e=this.GetElementByIndex(s),e instanceof Layer&&e.GetID()===t){i=e;break}return i}GetDocumentLayer(){let t,e=null;const i=this.ElementCount();for(let n=0;n<i;n++)if(t=this.GetElementByIndex(n),t instanceof Layer)if(this.documentLayerId){if(this.documentLayerId===t.GetID()){e=t;break}}else if(t.IsScalingAllowed()){e=t;break}return e}SetDocumentLayer(t){this.documentLayerId=t}GetFormattingLayer(){let t=this.GetLayer("_formatting_");return t&&!t.IsDpiScalingAllowed()&&(t=null),t||(t=this.AddLayer("_formatting_"),t.AllowDpiScalingOnly(!0),t.ExcludeFromExport(!0),this.MoveLayer("_formatting_",NvConstant.LayerMoveType.Bottom),t.SetOpacity(0),this.ApplyDocumentTransform()),t}GetPreviousLayer(t){let e=null;const i=this.ElementCount();for(let n=0;n<i;n++){const i=this.GetElementByIndex(n);if(i instanceof Layer){if(i.GetID()===t)break;e=i}}return e}GetNextLayer(t){let e=null,i=null,n=0;const s=this.ElementCount();t&&(i=this.GetLayer(t),i&&(n=this.GetElementIndex(i)+1));for(let a=n;a<s;a++){const t=this.GetElementByIndex(a);if(t instanceof Layer){e=t;break}}return e}MoveLayer(t,e,i){const n=this.GetLayer(t);if(!n)return;const s=this.ElementCount();let a=s-1,o=this.GetElementIndex(n),r=null,l=0;switch(i&&(r=this.GetLayer(i),r&&(l=this.GetElementIndex(r),o<l&&l--)),e){case NvConstant.LayerMoveType.Bottom:a=0;break;case NvConstant.LayerMoveType.Before:a=l;break;case NvConstant.LayerMoveType.After:a=l+1;break;case NvConstant.LayerMoveType.Top:a=s-1;break;default:return}a!==o&&(this.RemoveElement(n),this.AddElement(n,a))}GetTextCacheForStyle(t){const e=Formatter.MakeIDFromStyle(t);let i=_Document._TextMetricsCache[e];return i||(i={metrics:Formatter.CalcStyleMetrics(t,this),textCache:{}},_Document._TextMetricsCache[e]=i),i}CalcStyleMetrics(t){const e=this.GetTextCacheForStyle(t);return Utils1.CopyObj(e.metrics)}GetTextRunCache(t,e){return{startOffsets:[],endOffsets:[]}}SetActiveEdit(t){const e=this.GetActiveEdit();e&&e!==t&&e.Deactivate(),this.activeEdit=t}ClearActiveEdit(t){const e=this.GetActiveEdit();e&&e.Deactivate(t),this.activeEdit=null}GetActiveEdit(){return this.activeEdit&&!this.activeEdit.InDocument()&&(this.activeEdit=null),this.activeEdit}DefExists(t){const e=this.svgObj.defs().children();let i=!1;for(let n=0;n<e.length;n++)if(e[n].attrs.id===t){i=!0;break}return i}Defs(){return this.svgObj.defs()}ClearDefs(){const t=this.Defs();t&&t.clear()}ImageLoadAddRef(){this.imageLoadRefCount++}ImageLoadDecRef(){this.imageLoadRefCount=Math.max(0,this.imageLoadRefCount-1)}ImageLoadGetRefCount(){return this.imageLoadRefCount}ImageLoadResetRefCount(){this.imageLoadRefCount=0}ConverWindowToDocLength(t){return t/this.docInfo.docToScreenScale}CreateVueComponent(t,e,i,n={}){const s=this.CreateShape(OptConstant.CSType.ForeignObject);return s&&(s.SetSize(t,e),s.MountVueComponent(i,n)),s}};let Document=_Document;Document._TextMetricsCache={};class DocConfig{constructor(){this.showRulers=!0,this.showGrid=!0,this.enableSnap=!1,this.centerSnap=!0,this.zoom=!0,this.zoomLevels=1,this.scale=!0,this.showPageDivider=!1,this.spellCheck=!0,this.spellDict=!0,this.spellFlags=!0,this.snapToShapes=!0,this.backgroundColor="#FFFFFF"}}class RefUtil{static SetShowRulers(t){showRulers.value=t}static SetShowGrid(t){showGrid.value=t}}class DocUtil{constructor(){this.gridLayer="_doc_grid",this.pageDividerLayer="_doc_page_divider",this.backgroundLayer="_background",this.rulerVis=!0,this.gridVis=!0,this.scaleToFit=!1,this.scaleToPage=!1,this.scrollWidth=0,this.hRulerGuide=null,this.vRulerGuide=null,this.rulerGuideWinPos={x:0,y:0},this.rulerGuideScrollTimer=null,this.rulerInDrag=!1,this.printHandler=null,this.inZoomIdle=!1,this.InitDocConfig(),this.rulerConfig=new RulerConfig}InitDocConfig(){LogUtil.Debug("= U.DocUtil: InitDocConfig - Input: Initializing document configuration"),this.docConfig=new DocConfig,this.docConfig.showRulers=!1,this.docConfig.showGrid=!1,this.docConfig.showPageDivider=!1,this.docConfig.enableSnap=!0,this.docConfig.centerSnap=!0,this.docConfig.snapToShapes=!0,this.docConfig.zoom=!0,this.docConfig.zoomLevels=!0,this.docConfig.scale=!0,this.docConfig.spellCheck=!1,this.docConfig.spellDict=!1,this.docConfig.spellFlags=!1,LogUtil.Debug("= U.DocUtil: InitDocConfig - Output:",this.docConfig)}InitializeWorkArea(t,e=!1){LogUtil.Info("= u.DocUtil: InitializeWorkArea - Input:",t),t=t||{},this.workAreaId=t.workAreaId||"#document-area",this.svgAreaId=t.svgAreaId||"#svg-area",this.hRulerAreaId=t.hRulerAreaId||"#h-ruler",this.vRulerAreaId=t.vRulerAreaId||"#v-ruler",this.cRulerAreaId=t.cRulerAreaId||"#c-ruler",e||(this.svgDoc=null,this.hRulerDoc=null,this.vRulerDoc=null),this.rulerVis=!0,this.gridVis=!0,this.gridLayer="_doc_grid",this.pageDividerLayer="_doc_page_divider",this.backgroundLayer="_background",this.backgroundElem=null,this.scaleToFit=!1,this.scaleToPage=!1,this.scrollWidth=0,this.printHandler=null,$$1(window).bind("resize",this,(function(t){t.data.HandleResizeEvent()})),$$1(this.svgAreaId).bind("scroll",this,(function(t){t.data.HandleScrollEvent()})),this.rulerConfig=new RulerConfig,this.rulerConfig.denom=RulerUtil.GetFractionDenominator(),this.UpdateRulerVisibility(),$$1(window).bind("mousemove",EvtUtil.Evt_MouseMove),e||this.InitSvgArea(t),this.UpdateGridVisibility(),e||this.SetUpRulers(),this.UpdateGrid(),this.UpdatePageDivider(),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: InitializeWorkArea - Output:",{workAreaId:this.workAreaId,svgAreaId:this.svgAreaId,hRulerAreaId:this.hRulerAreaId,vRulerAreaId:this.vRulerAreaId,cRulerAreaId:this.cRulerAreaId,gridLayer:this.gridLayer,pageDividerLayer:this.pageDividerLayer,backgroundLayer:this.backgroundLayer,scaleToFit:this.scaleToFit,scaleToPage:this.scaleToPage})}InitSvgArea(t){LogUtil.Info("= u.DocUtil: InitSvgArea - Input:",t),t=t||{},this.svgDoc||(this.svgDoc=new Document(this.svgAreaId,[]));let e=this.svgDoc.AddLayer(this.backgroundLayer);this.backgroundElem=this.svgDoc.CreateShape(OptConstant.CSType.Rect),e.AddElement(this.backgroundElem),this.backgroundElem.SetPos(0,0),this.backgroundElem.SetStrokeWidth(0),this.backgroundElem.SetStrokeColor("none"),this.backgroundElem.SetFillColor("none"),this.backgroundElem.ExcludeFromExport(!0),e.SetCustomAttribute("t3-background","1"),e=this.svgDoc.AddLayer(this.gridLayer),e.AllowScaling(!1),e.ExcludeFromExport(!0),e.SetCustomAttribute("t3-grid","1"),e=this.svgDoc.AddLayer(this.pageDividerLayer),e.AllowScaling(!1),e.ExcludeFromExport(!0),t.layers&&Array.isArray(t.layers)&&t.layers.forEach((t=>{this.svgDoc.AddLayer(t)})),t.documentWidth&&t.documentHeight&&this.svgDoc.SetDocumentSize(t.documentWidth,t.documentHeight),t.documentDPI&&this.svgDoc.SetDocumentDPI(t.documentDPI),this.backgroundElem.SetSize(this.svgDoc.docInfo.docWidth,this.svgDoc.docInfo.docHeight),this.svgDoc.ImageLoadResetRefCount(),LogUtil.Debug("= U.DocUtil: InitSvgArea - Output:",{documentWidth:this.svgDoc.docInfo.docWidth,documentHeight:this.svgDoc.docInfo.docHeight,layers:[this.backgroundLayer,this.gridLayer,this.pageDividerLayer]})}CheckScaleToFit(){if(LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Input: scaleToFit =",this.scaleToFit),!this.scaleToFit)return LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Output: false (scaleToFit disabled)"),!1;const t=this.GetWorkAreaSize(),e=$$1(this.vRulerAreaId).width(),i=$$1(this.hRulerAreaId).height();let n={x:0,y:0,width:t.width,height:t.height};this.docConfig.showRulers&&(n.x+=e,n.width-=e,n.y+=i,n.height-=i),LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Available rect:",n);const s=this.svgDoc.CalcScaleToFit(n.width-20,n.height-20);LogUtil.Debug("= U.DocUtil: CheckScaleToFit - CalcScaleToFit result:",s);const a=this.svgDoc.docInfo.docScale!==s.scale;return LogUtil.Debug("= U.DocUtil: CheckScaleToFit - Output:",a),a}UpdateWorkArea(t){const e=this.docConfig.showRulers;let i=this.GetWorkAreaSize();i.height-=null!=t?t:0;const n=$$1(this.vRulerAreaId).width(),s=$$1(this.hRulerAreaId).height();LogUtil.Debug("= u.DocUtil: UpdateWorkArea/ - Input:",{workAreaSize:i,showRulers:e,verticalRulerWidth:n,horizontalRulerHeight:s}),this.scrollWidth||(this.scrollWidth=this.GetScrollBarSize());let a={x:0,y:0,width:i.width,height:i.height};e&&(a.x+=n,a.width-=n,a.y+=s,a.height-=s);let o={width:0,height:0},r=null;if(this.svgDoc)if(this.scaleToFit)T3Gv.opt.inAutoScroll?(r=this.svgDoc.GetWorkArea(),o={width:r.docScreenWidth,height:r.docScreenHeight}):a.width>0&&a.height>0?(r=this.svgDoc.CalcScaleToFit(a.width-20,a.height-20),o={width:r.width,height:r.height},this.svgDoc.docInfo.docScale!==r.scale&&(this.svgDoc.SetDocumentScale(r.scale),this.IdleZoomUI(),this.UpdateGrid(),this.UpdatePageDivider(),this.ResetRulers())):(r=this.svgDoc.GetWorkArea(),o={width:r.docScreenWidth,height:r.docScreenHeight});else if(this.scaleToPage&&a.width>0&&a.height>0){const t=T3Gv.opt.header.Page.papersize.x-(T3Gv.opt.header.Page.margins.left+T3Gv.opt.header.Page.margins.right),e=T3Gv.opt.header.Page.papersize.y-(T3Gv.opt.header.Page.margins.top+T3Gv.opt.header.Page.margins.bottom);r=this.svgDoc.CalcScaleToFit(a.width-20,a.height-20,t,e),o={width:r.width,height:r.height},T3Gv.opt.inAutoScroll||this.svgDoc.docInfo.docScale===r.scale||(this.svgDoc.SetDocumentScale(r.scale),this.IdleZoomUI(),this.UpdateGrid(),this.UpdatePageDivider(),this.ResetRulers())}else r=this.svgDoc.GetWorkArea(),o={width:r.docScreenWidth,height:r.docScreenHeight};else o={width:a.width,height:a.height};const l={width:Math.min(a.width,o.width),height:Math.min(a.height,o.height)};let h=!1,c=!1;l.width<o.width&&(h=!0,l.height+=this.scrollWidth,l.height>a.height&&(l.height=a.height,c=!0)),l.height<o.height&&(c=!0,l.width+=this.scrollWidth,l.width>a.width&&(l.width=a.width,h=!0));const u={x:a.x+(a.width-l.width)/2,y:a.y+(a.height-l.height)/2};$$1(this.svgAreaId).css({left:u.x,top:u.y,width:l.width,height:l.height,"overflow-x":h?"scroll":"hidden","overflow-y":c?"scroll":"hidden"}),e&&($$1(this.hRulerAreaId).css({left:u.x,top:u.y-s,width:l.width,height:s}),$$1(this.vRulerAreaId).css({left:u.x-n,top:u.y,width:n,height:l.height}),$$1(this.cRulerAreaId).css({left:u.x-n,top:u.y-s})),this.svgDoc&&(this.svgDoc.CalcWorkArea(),this.AdjustScroll(),this.svgDoc.ApplyDocumentTransform(!0)),LogUtil.Debug("= u.DocUtil: UpdateWorkArea/ - Output:",{finalPosition:u,finalSize:l,targetDimensions:o,needHorizontalScroll:h,needVerticalScroll:c})}GetWorkAreaSize(){const t={width:$$1(this.workAreaId).width(),height:$$1(this.workAreaId).height()};return LogUtil.Debug("= u.DocUtil: GetWorkAreaSize/ - Input/Output:",{workAreaId:this.workAreaId},t),t}GetScrollBarSize(){LogUtil.Debug("= U.DocUtil: GetScrollBarSize - Input: Measuring scrollbar width");const t=$$1('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),e=t.children(),i=e.innerWidth();e.height(99);const n=i-e.innerWidth();return t.remove(),LogUtil.Debug("= U.DocUtil: GetScrollBarSize - Output:",{scrollbarWidth:n}),n}AdjustScroll(t,e){LogUtil.Debug("= U.DocUtil: AdjustScroll - Input:",{horizontalScroll:t,verticalScroll:e});const i=this.svgDoc.GetWorkArea(),n=Math.min(void 0!==t?t:i.scrollX,i.maxScrollX),s=Math.min(void 0!==e?e:i.scrollY,i.maxScrollY);$$1(this.svgAreaId).scrollLeft(n),$$1(this.svgAreaId).scrollTop(s),this.svgDoc.CalcWorkArea(),this.SyncRulers(),LogUtil.Debug("= U.DocUtil: AdjustScroll - Output:",{targetHorizontalScroll:n,targetVerticalScroll:s})}HandleResizeEvent(){this.UpdateWorkArea(),LogUtil.Debug("= u.DocUtil: HandleResizeEvent/ - Input/Output: Work area updated")}HandleScrollEvent(){LogUtil.Debug("= U.DocUtil: HandleScrollEvent - Input: Handling scroll event");const t=this.svgDoc.GetWorkArea(),e=t.scrollX,i=t.scrollY;this.svgDoc.CalcWorkArea(),this.SyncRulers();const n=this.svgDoc.GetWorkArea(),s=e-n.scrollX,a=i-n.scrollY;LogUtil.Debug("= U.DocUtil: HandleScrollEvent - Output:",{initialScroll:{x:e,y:i},currentScroll:{x:n.scrollX,y:n.scrollY},deltaScroll:{x:s,y:a}})}SetResolution(t){LogUtil.Debug("= U.DocUtil: SetResolution - Input:",t),this.svgDoc&&(this.svgDoc.SetDocumentDPI(t),this.UpdateWorkArea()),LogUtil.Debug("= U.DocUtil: SetResolution - Output: Resolution updated")}ResizeDocument(t,e,i){LogUtil.Debug("= U.DocUtil: ResizeDocument - Input:",{width:t,height:e,skipUIUpdate:i}),this.svgDoc&&(this.svgDoc.SetDocumentSize(t,e),this.backgroundElem.SetSize(t,e),i||(this.ResetRulers(),this.UpdateGrid(),this.UpdatePageDivider(),this.UpdateWorkArea())),LogUtil.Debug("= U.DocUtil: ResizeDocument - Output: Document resized to",{width:t,height:e})}GetDocumentSize(){LogUtil.Debug("= U.DocUtil: GetDocumentSize - Input: Retrieving document dimensions");const t=this.svgDoc.GetDocumentSize();return LogUtil.Debug("= U.DocUtil: GetDocumentSize - Output:",t),t}DocumentPageSizeChanged(){LogUtil.Debug("= U.DocUtil: DocumentPageSizeChanged - Input: Document page size changed"),this.svgDoc&&(this.scaleToPage?this.UpdateWorkArea():this.UpdatePageDivider()),LogUtil.Debug("= U.DocUtil: DocumentPageSizeChanged - Output: Display updated")}MaintainView(t){LogUtil.Debug("= U.DocUtil: MaintainView - Input:",{skipSelection:t});const e=this.svgDoc.GetWorkArea(),i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let n=i.length?T3Gv.opt.GetListSRect(i):T3Gv.opt.CalcAllObjectEnclosingRect(!1);n.width&&n.height||(n.x=0,n.y=0,n.width=e.docWidth,n.height=e.docHeight),t&&(n.width=0,n.height=0);const s=(n.x+n.width/2)*e.docToScreenScale-e.dispWidth/2,a=(n.y+n.height/2)*e.docToScreenScale-e.dispHeight/2;this.AdjustScroll(s,a),LogUtil.Debug("= U.DocUtil: MaintainView - Output:",{horizontalScroll:s,verticalScroll:a,boundingRect:n})}SetZoomFactor(t,e){if(LogUtil.Debug("= u.DocUtil: SetZoomFactor/ - Input: zoomFactor,skipCentering",{zoomFactor:t,skipCentering:e}),!this.svgDoc)return LogUtil.Debug("= u.DocUtil: SetZoomFactor/ - Output: false (no svgDoc)"),!1;if(!this.scaleToFit&&!this.scaleToPage&&t===this.GetZoomFactor())return LogUtil.Debug("= u.DocUtil: SetZoomFactor/ - Output: false (zoom unchanged)"),!1;if(this.scaleToFit=!1,this.scaleToPage=!1,this.svgDoc.SetDocumentScale(t),!e){const t=this.svgDoc.GetWorkArea(),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let i=e.length?T3Gv.opt.GetListSRect(e):T3Gv.opt.CalcAllObjectEnclosingRect(!1);i.width&&i.height||(i={x:0,y:0,width:t.docWidth,height:t.docHeight});const n=(i.x+i.width/2)*t.docToScreenScale-t.dispWidth/2,s=(i.y+i.height/2)*t.docToScreenScale-t.dispHeight/2;this.AdjustScroll(n,s)}return this.IdleZoomUI(),this.ResetRulers(),this.UpdateGrid(),this.UpdatePageDivider(),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: SetZoomFactor - Output: true (zoom updated)"),!0}GetZoomFactor(){let t=this.svgDoc?this.svgDoc.GetWorkArea().docScale:HvConstant.T3Config.Zoom.Default;return LogUtil.Debug("= u.DocUtil: GetZoomFactor/ - Input/Output:",t),t}SetSizeToFit(t){LogUtil.Debug("= U.DocUtil: SetSizeToFit - Input:",t),this.scaleToFit=t,t&&(this.scaleToPage=!1),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: SetSizeToFit - Output:",{scaleToFit:this.scaleToFit,scaleToPage:this.scaleToPage})}GetSizeToFit(){const t=this.scaleToFit;return LogUtil.Debug("= U.DocUtil: GetSizeToFit - Retrieving scale-to-fit setting Input/Output: ",t),t}SetSizeToPage(t){LogUtil.Debug("= U.DocUtil: SetSizeToPage - Input:",t),this.scaleToPage=t,t&&(this.scaleToFit=!1),this.UpdateWorkArea(),LogUtil.Debug("= U.DocUtil: SetSizeToPage - Output:",{scaleToPage:this.scaleToPage,scaleToFit:this.scaleToFit})}GetSizeToPage(){const t=this.scaleToPage;return LogUtil.Debug("= U.DocUtil: GetSizeToPage - Input/Output:",t),t}IdleZoomUI(){UIUtil.UpdateDocumentScale(),LogUtil.Debug("= U.DocUtil: IdleZoomUI - Input/Output: Zoom UI updated")}SetScroll(t,e){LogUtil.Debug("= U.DocUtil: SetScroll - Input:",{horizontalScroll:t,verticalScroll:e}),this.AdjustScroll(t,e),LogUtil.Debug("= U.DocUtil: SetScroll - Output: Scroll position updated")}ScrollToPosition(t,e){LogUtil.Debug("= U.DocUtil: ScrollToPosition - Input:",{xPosition:t,yPosition:e});const i=this.svgDoc.CalcScrollToVisible(t,e);i&&this.AdjustScroll(i.xOff,i.yOff),LogUtil.Debug("= U.DocUtil: ScrollToPosition - Output:",{calculatedOffsets:i,scrollApplied:!!i})}RulersNotEqual(t,e){LogUtil.Debug("= U.DocUtil: RulersNotEqual - Input:",{rulerConfig1:t,rulerConfig2:e}),t=t||{};let i=0,n=0;(e=e||{}).originx&&(i=e.originx),e.originy&&(n=e.originy);let s=t.useInches!=e.useInches||t.units!=e.units||t.major!=e.major||t.majorScale!=e.majorScale||t.nTics!=e.nTics||t.nMid!=e.nMid||t.nGrid!=e.nGrid||t.dp!=e.dp||t.denom!=e.denom||t.originx!=i||t.originy!=n;return t.major&&e.major&&t.major!=e.major&&(s=!0),null!=t.showpixels&&null!=e.showpixels&&t.showpixels!=e.showpixels&&(s=!0),LogUtil.Debug("= U.DocUtil: RulersNotEqual - Output:",s),s}PagesNotEqual(t,e){LogUtil.Debug("= U.DocUtil: PagesNotEqual - Input:",{pageConfig1:t,pageConfig2:e});if(null==t||null==t||null==e)return LogUtil.Debug("= U.DocUtil: PagesNotEqual - Output: false (invalid configs)"),!1;const i=t.papersize.x!=e.papersize.x||t.papersize.y!=e.papersize.y||t.margins.left!=e.margins.left||t.margins.right!=e.margins.right||t.margins.top!=e.margins.top||t.margins.bottom!=e.margins.bottom||t.landscape!=e.landscape;return LogUtil.Debug("= U.DocUtil: PagesNotEqual - Output:",i),i}DocObject(){LogUtil.Debug("= U.DocUtil: DocObject - Input: Getting document object");const t=this.svgDoc;return LogUtil.Debug("= U.DocUtil: DocObject - Output:",t?"Document object returned":"No document object"),t}SetRulers(t,e){let i;LogUtil.Debug("= U.DocUtil: SetRulers - Input:",{rulerSettings:t,shouldPropagate:e}),t&&(this.rulerConfig.useInches=void 0!==t.useInches?t.useInches:this.rulerConfig.useInches,this.rulerConfig.units=void 0!==t.units?t.units:this.rulerConfig.units,this.rulerConfig.major=void 0!==t.major?t.major:this.rulerConfig.major,this.rulerConfig.majorScale=void 0!==t.majorScale?t.majorScale:this.rulerConfig.majorScale,this.rulerConfig.nTics=void 0!==t.nTics?t.nTics:this.rulerConfig.nTics,this.rulerConfig.nMid=void 0!==t.nMid?t.nMid:this.rulerConfig.nMid,this.rulerConfig.nGrid=void 0!==t.nGrid?t.nGrid:this.rulerConfig.nGrid,this.rulerConfig.originx=void 0!==t.originx?t.originx:this.rulerConfig.originx,this.rulerConfig.originy=void 0!==t.originy?t.originy:this.rulerConfig.originy,this.rulerConfig.dp=void 0!==t.dp?t.dp:this.rulerConfig.dp,this.rulerConfig.denom=void 0!==t.denom?t.denom:this.rulerConfig.denom,null!=t.showpixels&&(this.rulerConfig.showpixels=t.showpixels),e||(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0),i.rulerConfig=Utils1.DeepCopy(this.rulerConfig)),this.ResetRulers(),this.UpdateGrid(),this.UpdatePageDivider()),LogUtil.Debug("= U.DocUtil: SetRulers - Output:",{updatedRulerConfig:this.rulerConfig})}ShowCoordinates(t){return!1}UpdateRulerVisibility(){return LogUtil.Debug("= U.DocUtil: UpdateRulerVisibility - Input:",{showRulers:this.docConfig.showRulers,currentVisibility:this.rulerVis}),this.docConfig.showRulers!==this.rulerVis&&(this.docConfig.showRulers?($$1(this.hRulerAreaId).css("visibility","visible"),$$1(this.vRulerAreaId).css("visibility","visible"),$$1(this.cRulerAreaId).css("visibility","visible"),this.ShowCoordinates(!0)):($$1(this.hRulerAreaId).css("visibility","hidden"),$$1(this.vRulerAreaId).css("visibility","hidden"),$$1(this.cRulerAreaId).css("visibility","hidden"),this.ShowCoordinates(!1)),this.UpdateWorkArea(),this.rulerVis=this.docConfig.showRulers),LogUtil.Debug("= U.DocUtil: UpdateRulerVisibility - Output:",{updatedVisibility:this.rulerVis}),!0}SetUpRulers(){LogUtil.Debug("= U.DocUtil: SetUpRulers - Input:",{horizontalRulerAreaId:this.hRulerAreaId,verticalRulerAreaId:this.vRulerAreaId,centerRulerAreaId:this.cRulerAreaId,isReadOnly:this.IsReadOnly()}),this.hRulerDoc||(this.hRulerDoc=new Document(this.hRulerAreaId,[])),this.vRulerDoc||(this.vRulerDoc=new Document(this.vRulerAreaId,[])),this.hRulerGuide=null,this.vRulerGuide=null,this.rulerGuideWinPos={x:0,y:0},this.rulerGuideScrollTimer=null,this.rulerInDrag=!1,this.IsReadOnly()||(new Hammer($$1(this.hRulerAreaId)[0]).on("doubletap",this.RulerTopDoubleClick),new Hammer($$1(this.vRulerAreaId)[0]).on("doubletap",this.RulerLeftDoubleClick),new Hammer($$1(this.cRulerAreaId)[0]).on("doubletap",this.RulerCenterDoubleClick),new Hammer($$1(this.hRulerAreaId)[0]).on("dragstart",this.RulerDragStart),new Hammer($$1(this.vRulerAreaId)[0]).on("dragstart",this.RulerDragStart),new Hammer($$1(this.cRulerAreaId)[0]).on("dragstart",this.RulerDragStart),new Hammer($$1(this.hRulerAreaId)[0]).on("drag",this.RulerTopDrag),new Hammer($$1(this.vRulerAreaId)[0]).on("drag",this.RulerLeftDrag),new Hammer($$1(this.cRulerAreaId)[0]).on("drag",this.RulerCenterDrag),new Hammer($$1(this.hRulerAreaId)[0]).on("dragend",this.RulerDragEnd),new Hammer($$1(this.vRulerAreaId)[0]).on("dragend",this.RulerDragEnd),new Hammer($$1(this.cRulerAreaId)[0]).on("dragend",this.RulerDragEnd)),this.ResetRulers(),LogUtil.Debug("= U.DocUtil: SetUpRulers - Output:",{horizontalRulerDocInitialized:!!this.hRulerDoc,verticalRulerDocInitialized:!!this.vRulerDoc,rulerGuides:{horizontalRulerGuide:this.hRulerGuide,verticalRulerGuide:this.vRulerGuide},rulerInDrag:this.rulerInDrag})}ResetRulers(){LogUtil.Debug("= U.DocUtil: ResetRulers - Input: Resetting horizontal and vertical rulers");const t=this.svgDoc.GetWorkArea(),e=$$1(this.vRulerAreaId).width(),i=$$1(this.hRulerAreaId).height();this.hRulerDoc.SetDocumentSize(t.docScreenWidth+100,i),this.vRulerDoc.SetDocumentSize(e,t.docScreenHeight+100),this.hRulerDoc.RemoveAll(),this.vRulerDoc.RemoveAll(),this.SetRulerContent(this.hRulerDoc,!0),this.SetRulerContent(this.vRulerDoc,!1),LogUtil.Debug("= U.DocUtil: ResetRulers - Output: Rulers have been reset and redrawn")}GetScaledRuler(t){LogUtil.Debug("= U.DocUtil: GetScaledRuler - Input:",{conversionFactor:t,documentScale:this.svgDoc.docInfo.docScale});let e=Math.floor(this.svgDoc.docInfo.docScale);return 0===e?(e=Math.floor(1/this.svgDoc.docInfo.docScale),e>1&&(t/=e)):e>1&&(t*=e),LogUtil.Debug("= U.DocUtil: GetScaledRuler - Output:",{adjustedFactor:t}),t}SetRulerContent(t,e){LogUtil.Debug("= U.DocUtil: SetRulerContent - Input:",{rulerDocument:t,isHorizontalRuler:e});const i=this.svgDoc.GetWorkArea(),n=$$1(this.vRulerAreaId).width(),s=$$1(this.hRulerAreaId).height(),a=e?s:n;let o=1;const r=this.GetScaledRuler(o),l=t.CreateShape(OptConstant.CSType.Path);let h="";const c=Utils1.RoundCoordLP(Math.round(3*a/4)),u=Utils1.RoundCoordLP(Math.round(a/2)),d=Utils1.RoundCoordLP(Math.round(a/4));let p=0;this.rulerConfig.useInches||(o*=OptConstant.Common.MetricConv);const g=this.rulerConfig.nTics;let f=this.rulerConfig.nMid;g%2&&(f=0);const m=Math.round(g/(f+1)),v=e?i.docScreenWidth:i.docScreenHeight;let b=this.rulerConfig.major/o;const y=[];let S=e?this.rulerConfig.originx:this.rulerConfig.originy,x=S-Math.floor(S);x&&(x-=1),x*=b;let w=-Math.ceil(S)*this.rulerConfig.majorScale;b/=r;let C=0;do{let t=x+p*(this.rulerConfig.major/r/o),n=Utils1.RoundCoordLP(t*i.docToScreenScale),s=this.rulerConfig.showpixels?100*(w+p*(this.rulerConfig.majorScale/r)):w+p*(this.rulerConfig.majorScale/r);e?(y.push({label:s,x:n+2,y:1}),h+=`M${n},${a}v-${c}`):(y.push({label:s,x:3,y:n+2}),h+=`M${a},${n}h-${c}`);for(let o=1;o<g;o++){let n=t+o*(b/g),s=Utils1.RoundCoordLP(n*i.docToScreenScale),r=o%m?d:u;h+=e?`M${s},${a}v-${r}`:`M${a},${s}h-${r}`}C=Utils1.RoundCoordLP((x+(p+1)*(this.rulerConfig.major/r/o))*i.docToScreenScale),p++}while(C<v);l.SetPath(h),l.SetFillColor("none"),l.SetStrokeColor("#000"),l.SetStrokeWidth(".5"),t.AddElement(l),t.SetCursor(CursorConstant.CursorType.Default);let T=!1;for(let O=0;O<y.length;O++)if(y[O].label!==parseInt(y[O].label.toString(),10)){T=!0;break}if(T)for(let O=0;O<y.length;O++)y[O].label=y[O].label.toFixed(1);const D={size:10,color:"#000"},k=y.length,$=Math.floor(k/250)||1;for(let O=0;O<k;O+=$){const e=t.CreateShape(OptConstant.CSType.Text);e.SetText(y[O].label,D),t.AddElement(e),e.SetPos(y[O].x,y[O].y)}LogUtil.Debug("= U.DocUtil: SetRulerContent - Output:",{pathLength:h.length,labelCount:k,displayedLabels:Math.ceil(k/$)})}SyncRulers(){const t=$$1(this.svgAreaId).scrollLeft(),e=$$1(this.svgAreaId).scrollTop();LogUtil.Debug("= U.DocUtil: SyncRulers - Input:",{horizontalScroll:t,verticalScroll:e}),$$1(this.hRulerAreaId).scrollLeft(t),$$1(this.vRulerAreaId).scrollTop(e),LogUtil.Debug("= U.DocUtil: SyncRulers - Output: Rulers synchronized",{horizontalScroll:t,verticalScroll:e})}UpdateGridVisibility(){LogUtil.Debug("= u.DocUtil: UpdateGridVisibility - Input:",{showGrid:this.docConfig.showGrid,currentGridVisibility:this.gridVis});const t=this.svgDoc?this.svgDoc.GetLayer(this.gridLayer):null;let e=!1;return t?this.docConfig.showGrid===this.gridVis?(LogUtil.Debug("= U.DocUtil: UpdateGridVisibility - Output: No change in grid visibility. Current value:",this.gridVis),e):(t.SetVisible(this.docConfig.showGrid),this.gridVis=this.docConfig.showGrid,e=!0,LogUtil.Debug("= U.DocUtil: UpdateGridVisibility - Output: Grid visibility updated to",this.gridVis),e):(LogUtil.Debug("= U.DocUtil: UpdateGridVisibility - Output: Grid layer not found."),e)}UpdateGrid(){LogUtil.Debug("= U.DocUtil: UpdateGrid - Input:",{workArea:this.svgDoc.GetWorkArea(),gridLayer:this.gridLayer,rulerSettings:this.rulerConfig});const t=this.svgDoc.GetWorkArea(),e=this.svgDoc.GetLayer(this.gridLayer);let i=1;if(e){const n=this.GetScaledRuler(i);e.RemoveAll();const s=this.svgDoc.CreateShape(OptConstant.CSType.Path),a=this.svgDoc.CreateShape(OptConstant.CSType.Path);this.rulerConfig.useInches||(i=OptConstant.Common.MetricConv);const o=this.rulerConfig.major/i,r=this.rulerConfig.nGrid*n;let l="",h="";const c=T3Gv.opt.header.Page.papersize,u=T3Gv.opt.header.Page.margins,d=c.x-(u.left+u.right)/2,p=c.y-(u.top+u.bottom)/2,g=Utils1.RoundCoordLP(t.docScreenWidth+2*d*t.docToScreenScale),f=Utils1.RoundCoordLP(t.docScreenHeight+2*p*t.docToScreenScale),m=-Utils1.RoundCoordLP(d*t.docToScreenScale),v=-Utils1.RoundCoordLP(p*t.docToScreenScale),b=m+g,y=v+f;let S=this.rulerConfig.originx-Math.floor(this.rulerConfig.originx);S&&(S-=1),S*=o;let x=-Math.ceil(d/o),w=0,C=0;do{if(C=S+x*(this.rulerConfig.major/i),w=Utils1.RoundCoordLP(C*t.docToScreenScale),w>b)break;l+=`M${w},${v}v${f}`;for(let e=1;e<r&&(C=S+x*(this.rulerConfig.major/i)+e*(o/r),w=Utils1.RoundCoordLP(C*t.docToScreenScale),!(w>b));e++)h+=`M${w},${v}v${f}`;x++}while(w<b);let T=this.rulerConfig.originy-Math.floor(this.rulerConfig.originy);T&&(T-=1),T*=o;let D=-Math.ceil(p/o),k=0,$=0;do{if($=T+D*(this.rulerConfig.major/i),k=Utils1.RoundCoordLP($*t.docToScreenScale),k>y)break;l+=`M${m},${k}h${g}`;for(let e=1;e<r&&($=T+D*(this.rulerConfig.major/i)+e*(o/r),k=Utils1.RoundCoordLP($*t.docToScreenScale),!(k>y));e++)h+=`M${m},${k}h${g}`;D++}while(k<y);s.SetPath(l),s.SetFillColor("none"),s.SetStrokeColor("#000"),s.SetStrokeOpacity(".4"),s.SetStrokeWidth(".5"),a.SetPath(h),a.SetFillColor("none"),a.SetStrokeColor("#000"),a.SetStrokeOpacity(".2"),a.SetStrokeWidth(".5"),e.AddElement(a),e.AddElement(s),e.SetEventBehavior(OptConstant.EventBehavior.None),LogUtil.Debug("= U.DocUtil: UpdateGrid - Output:",{majorPathCommands:l,minorPathCommands:h,boundaries:{startX:m,startY:v,endX:g,endY:f,maxX:b,maxY:y}})}}UpdatePageDivider(){LogUtil.Debug("= u.DocUtil: UpdatePageDivider - T3Gv.docUtil",T3Gv);if(!T3Gv.docUtil.docConfig.showPageDivider)return;const t=this.svgDoc.GetWorkArea(),e=this.svgDoc.GetLayer(this.pageDividerLayer);if(e){e.RemoveAll();const i=this.svgDoc.CreateShape(OptConstant.CSType.Path);let n="";const s=T3Gv.opt.header.Page,a=s.papersize,o=s.margins;a.x-(o.left+o.right)<=0&&(o.left=50,o.right=50),a.y-(o.top+o.bottom)<=0&&(o.top=50,o.bottom=50);let r=a.x-(o.left+o.right),l=a.y-(o.top+o.bottom);const h=r*t.docToScreenScale,c=l*t.docToScreenScale;let u=h;for(;u<t.docScreenWidth;)n+="M"+Utils1.RoundCoordLP(u)+",0v"+t.docScreenHeight,u+=h;let d=c;for(;d<t.docScreenHeight;)n+="M0,"+Utils1.RoundCoordLP(d)+"h"+t.docScreenWidth,d+=c;i.SetPath(n),i.SetFillColor("none"),i.SetStrokeColor("#000088"),i.SetStrokeOpacity(".6"),i.SetStrokePattern("10,4"),i.SetStrokeWidth(".5"),e.AddElement(i),LogUtil.Debug("= U.DocUtil: UpdatePageDivider - Output:",{screenPaperDimensions:{width:h,height:c},pathCommandLength:n.length})}else LogUtil.Debug("= U.DocUtil: UpdatePageDivider - Output: No page divider layer found")}SnapToGrid(t){LogUtil.Debug("= U.DocUtil: SnapToGrid - Input:",t),this.svgDoc.GetWorkArea();let e=1;this.rulerConfig.useInches||(e=OptConstant.Common.MetricConv);const i=this.GetScaledRuler(e);let n={x:t.x,y:t.y},s={x:0,y:0};const a=this.rulerConfig.major/e,o=a/(this.rulerConfig.nGrid*i),r=Math.floor(n.x/a);s.x=r*a,n.x-=s.x;const l=Math.round(n.x/o);s.x+=l*o;const h=Math.floor(n.y/a);s.y=h*a,n.y-=s.y;const c=Math.round(n.y/o);return s.y+=c*o,LogUtil.Debug("= U.DocUtil: SnapToGrid - Output:",s),s}RulerTopDoubleClick(t){LogUtil.Debug("= U.DocUtil: RulerTopDoubleClick - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!1,!0),LogUtil.Debug("= U.DocUtil: RulerTopDoubleClick - Output: Completed")}RulerLeftDoubleClick(t){LogUtil.Debug("= U.DocUtil: RulerLeftDoubleClick - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!1),LogUtil.Debug("= U.DocUtil: RulerLeftDoubleClick - Output: Completed")}RulerCenterDoubleClick(t){LogUtil.Debug("= U.DocUtil: RulerCenterDoubleClick - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!0),LogUtil.Debug("= U.DocUtil: RulerCenterDoubleClick - Output: Completed")}RulerDragStart(t){if(LogUtil.Debug("= U.DocUtil: RulerDragStart - Input:",{dragEvent:t}),!T3Gv.docUtil.IsReadOnly()){if(MouseUtil.IsRightClick(t))return Utils2.StopPropagationAndDefaults(t),void LogUtil.Debug("= U.DocUtil: RulerDragStart - Output: Right click detected, operation canceled");T3Gv.docUtil.rulerInDrag=!0}LogUtil.Debug("= U.DocUtil: RulerDragStart - Output:",{rulerInDrag:T3Gv.docUtil.rulerInDrag})}RulerTopDrag(t){if(LogUtil.Debug("= U.DocUtil: RulerTopDrag - Input:",{dragEvent:t}),Utils2.StopPropagationAndDefaults(t),LMEvtUtil.IsCtrlClick(t))return Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!1,!0),void LogUtil.Debug("= U.DocUtil: RulerTopDrag - Output: Handled as double click");T3Gv.docUtil.RulerDragGuides(t,!1,!0),LogUtil.Debug("= U.DocUtil: RulerTopDrag - Output: Drag guides initiated")}RulerLeftDrag(t){if(LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Input:",{dragEvent:t}),Utils2.StopPropagationAndDefaults(t),LMEvtUtil.IsCtrlClick(t))return LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Ctrl click detected"),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!1),void LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Output: Handled as double click");T3Gv.docUtil.RulerDragGuides(t,!0,!1),LogUtil.Debug("= U.DocUtil: RulerLeftDrag - Output: Drag guides initiated")}RulerCenterDrag(t){if(LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),LMEvtUtil.IsCtrlClick(t))return LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Ctrl click detected, invoking double click handler"),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerHandleDoubleClick(t,!0,!0),void LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Output: Double click action completed");T3Gv.docUtil.RulerDragGuides(t,!0,!0),LogUtil.Debug("= U.DocUtil: RulerCenterDrag - Output: Drag guides initiated")}RulerDragEnd(t){LogUtil.Debug("= U.DocUtil: RulerDragEnd - Input:",{event:t}),Utils2.StopPropagationAndDefaults(t),T3Gv.docUtil.RulerEndGuides(),LogUtil.Debug("= U.DocUtil: RulerDragEnd - Output: Completed")}RulerHandleDoubleClick(t,e,i){if(LogUtil.Debug("= U.DocUtil: RulerHandleDoubleClick - Input:",{clickEvent:t,isVerticalRuler:e,isIntersectionPoint:i}),!MouseUtil.IsRightClick(t)){let n={originx:this.rulerConfig.originx,originy:this.rulerConfig.originy};const s=this.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY);if(this.svgDoc.GetWorkArea(),this.rulerInDrag=!1,!this.IsReadOnly()){if(e&&i)n.originx=0,n.originy=0;else if(i)n.originx=s.x/this.rulerConfig.major,this.rulerConfig.useInches||(n.originx*=OptConstant.Common.MetricConv);else{if(!e)return void LogUtil.Debug("= U.DocUtil: RulerHandleDoubleClick - Early Exit: No valid direction specified.");n.originy=s.y/this.rulerConfig.major,this.rulerConfig.useInches||(n.originy*=OptConstant.Common.MetricConv)}this.SetRulers(n),this.ShowCoordinates(!0);const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);SelectUtil.UpdateSelectionAttributes(t),LogUtil.Debug("= U.DocUtil: RulerHandleDoubleClick - Output:",{updatedOrigins:n,selectedObjects:t})}}}RulerDragGuides(t,e,i){LogUtil.Debug("= U.DocUtil: RulerDragGuides - Input:",{dragEvent:t,isVerticalRuler:e,isHorizontalRuler:i});const n=this.svgDoc.GetWorkArea(),s=1/n.docScale,a=`${4*s},${2*s}`;if(this.rulerInDrag){(this.hRulerGuide&&!i||this.vRulerGuide&&!e||i&&!this.hRulerGuide||e&&!this.vRulerGuide)&&(this.RulerEndGuides(),this.rulerInDrag=!0),e&&!this.hRulerGuide&&(this.hRulerGuide=this.svgDoc.CreateShape(OptConstant.CSType.Line),this.hRulerGuide.SetFillColor("none"),this.hRulerGuide.SetStrokeColor("black"),this.hRulerGuide.SetStrokeWidth(s),this.hRulerGuide.SetStrokePattern(a),T3Gv.opt.svgOverlayLayer.AddElement(this.hRulerGuide)),i&&!this.vRulerGuide&&(this.vRulerGuide=this.svgDoc.CreateShape(OptConstant.CSType.Line),this.vRulerGuide.SetFillColor("none"),this.vRulerGuide.SetStrokeColor("black"),this.vRulerGuide.SetStrokeWidth(s),this.vRulerGuide.SetStrokePattern(a),T3Gv.opt.svgOverlayLayer.AddElement(this.vRulerGuide)),this.rulerGuideWinPos.x=t.gesture.center.clientX,this.rulerGuideWinPos.y=t.gesture.center.clientY,i||(this.rulerGuideWinPos.x=n.dispX+n.dispWidth/2),e||(this.rulerGuideWinPos.y=n.dispY+n.dispHeight/2),this.RulerDrawGuides();!this.rulerGuideScrollTimer&&(!(e&&i)||this.rulerGuideWinPos.x>n.dispX&&this.rulerGuideWinPos.y>n.dispY)&&(this.rulerGuideScrollTimer=setInterval((()=>{T3Gv.docUtil.RulerAutoScrollGuides()}),100))}LogUtil.Debug("= U.DocUtil: RulerDragGuides - Output:",{horizontalGuide:this.hRulerGuide?"exists":"null",verticalGuide:this.vRulerGuide?"exists":"null",guidePosition:this.rulerGuideWinPos,autoScrollTimer:this.rulerGuideScrollTimer?"active":"inactive"})}RulerAutoScrollGuides(){LogUtil.Debug("= U.DocUtil: RulerAutoScrollGuides - Input:",{rulerGuideWinPos:this.rulerGuideWinPos,workArea:this.svgDoc.GetWorkArea()});const t=this.svgDoc.GetWorkArea();let e=!1;const i=this.svgDoc.ConvertWindowToDocCoords(this.rulerGuideWinPos.x,this.rulerGuideWinPos.y);(this.rulerGuideWinPos.x<t.dispX||this.rulerGuideWinPos.x>t.dispX+t.dispWidth||this.rulerGuideWinPos.y<t.dispY||this.rulerGuideWinPos.y>t.dispY+t.dispHeight)&&(e=!0),e&&(this.ScrollToPosition(i.x,i.y),this.RulerDrawGuides()),LogUtil.Debug("= U.DocUtil: RulerAutoScrollGuides - Output:",{autoScrollPerformed:e,documentCoordinates:i})}RulerDrawGuides(){LogUtil.Debug("= U.DocUtil: RulerDrawGuides - Input:",{mouseWindowPosition:this.rulerGuideWinPos,hRulerGuide:this.hRulerGuide?"exists":"null",vRulerGuide:this.vRulerGuide?"exists":"null"});const t=this.svgDoc.GetWorkArea();let e=this.svgDoc.ConvertWindowToDocCoords(this.rulerGuideWinPos.x,this.rulerGuideWinPos.y);this.docConfig.enableSnap&&(e=this.SnapToGrid(e)),this.vRulerGuide&&(e.x<t.docVisX?e.x=t.docVisX:e.x>t.docVisX+t.docVisWidth&&(e.x=t.docVisX+t.docVisWidth),this.vRulerGuide.SetPoints(e.x,0,e.x,t.docHeight)),this.hRulerGuide&&(e.y<t.docVisY?e.y=t.docVisY:e.y>t.docVisY+t.docVisHeight&&(e.y=t.docVisY+t.docVisHeight),this.hRulerGuide.SetPoints(0,e.y,t.docWidth,e.y)),LogUtil.Debug("= U.DocUtil: RulerDrawGuides - Output:",{constrainedCoordinates:e,workAreaBounds:{horizontal:{min:t.docVisX,max:t.docVisX+t.docVisWidth},vertical:{min:t.docVisY,max:t.docVisY+t.docVisHeight}}})}RulerEndGuides(){LogUtil.Debug("= U.DocUtil: RulerEndGuides - Input:",{rulerGuideScrollTimer:this.rulerGuideScrollTimer,horizontalRulerGuide:this.hRulerGuide,verticalRulerGuide:this.vRulerGuide,rulerInDrag:this.rulerInDrag}),this.rulerGuideScrollTimer&&(clearInterval(this.rulerGuideScrollTimer),this.rulerGuideScrollTimer=null),this.hRulerGuide&&(T3Gv.opt.svgOverlayLayer.RemoveElement(this.hRulerGuide),this.hRulerGuide=null),this.vRulerGuide&&(T3Gv.opt.svgOverlayLayer.RemoveElement(this.vRulerGuide),this.vRulerGuide=null),this.rulerInDrag=!1,LogUtil.Debug("= U.DocUtil: RulerEndGuides - Output:",{rulerGuideScrollTimer:this.rulerGuideScrollTimer,horizontalRulerGuide:this.hRulerGuide,verticalRulerGuide:this.vRulerGuide,rulerInDrag:this.rulerInDrag})}SnapRect(t){LogUtil.Debug("= U.DocUtil: SnapRect - Input:",t);const e={x:t.x,y:t.y},i={x:t.x+t.width,y:t.y+t.height},n=this.SnapToGrid(e),s=this.SnapToGrid(i),a=n.x-e.x,o=s.x-i.x,r=Math.abs(a)>Math.abs(o)?o:a,l=n.y-e.y,h=s.y-i.y,c={x:r,y:Math.abs(l)>Math.abs(h)?h:l};return LogUtil.Debug("= U.DocUtil: SnapRect - Output:",c),c}UpdateConfig(t){LogUtil.Debug("= U.DocUtil: UpdateConfig - Input:",t),this.docConfig=t,this.UpdateRulerVisibility(),this.UpdateGridVisibility(),LogUtil.Debug("= U.DocUtil: UpdateConfig - Output: Updated docConfig",this.docConfig)}GetBackground(){LogUtil.Debug("= U.DocUtil: GetBackground - Input: Getting background element");const t=this.backgroundElem;return LogUtil.Debug("= U.DocUtil: GetBackground - Output:",t?"Background element retrieved":"No background element"),t}IsReadOnly(){return!1}ZoomChange(t,e){LogUtil.Debug("= u.DocUtil: ZoomChange/ - Input:",{newZoomScale:t,newZoomStep:e});const i=T3Gv.docUtil.GetZoomFactor();LogUtil.Debug("= u.DocUtil: ZoomChange/ - Current Zoom Factor:",i);const n=t>i;t&&t>0&&this.ZoomInAndOut(n,!1,t,e),LogUtil.Debug("= u.DocUtil: ZoomChange/ - Output: Zoom changed to",t)}ZoomSpecify(t,e){this.SetZoomLevel(100*t,e),DataOpt.SaveToLocalStorage(),T3Gv.docUtil.UpdateRefZoomScale(Number(t.toFixed(2))),LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - New zoom factor set:",Number(t.toFixed(2)))}ZoomInAndOut(t,e,i,n){LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - Input:",{isZoomIn:t,skipCentering:e});const s=n||HvConstant.T3Config.Zoom.Step,a=HvConstant.T3Config.Zoom.Max,o=HvConstant.T3Config.Zoom.Min,r=T3Gv.docUtil.GetZoomFactor();let l=i||1;if(t){if(r>=a)return void LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - Already at maximum zoom (4x), exiting");l=Math.round(r/s)*s,l=parseFloat(l.toFixed(2)),l===r&&(l=r+s),l>a&&(l=a)}else{if(r<=o)return void LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - Already at minimum zoom (0.25x), exiting");l=Math.round(r/s)*s,l=parseFloat(l.toFixed(2)),l===r&&(l=r-s),l<o&&(l=o)}this.SetZoomLevel(100*l,e),DataOpt.SaveToLocalStorage(),T3Gv.docUtil.UpdateRefZoomScale(Number(l.toFixed(2))),LogUtil.Debug("= u.DocUtil: ZoomInAndOut/ - New zoom factor set:",Number(l.toFixed(2)))}SetZoomLevel(t,e){LogUtil.Debug("= u.DocUtil: SetZoomLevel/ - Input: zoomPct, skipCentering?",{zoomPct:t,skipCentering:e}),t>0&&!this.inZoomIdle&&T3Gv.opt?(UIUtil.SetDocumentScale(t/100,e),LogUtil.Debug("= u.DocUtil: SetZoomLevel/ - Applied zoom factor:",t/100)):LogUtil.Debug("= u.DocUtil: SetZoomLevel/ - Zoom not applied. Conditions not met:",{validZoom:t>0,notIdle:!this.inZoomIdle,optManagerExists:!!T3Gv.opt}),DataOpt.SaveToLocalStorage()}SetZoomLevelByIndex(t){if(LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - Input:",{zoomIndex:t}),t<0||t>=this.docConfig.zoomLevels.length)LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - Invalid zoom index, out of bounds");else if(this.docConfig.zoom=t,T3Gv.opt){const e=this.docConfig.zoomLevels[t]/100;LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - Setting zoom factor:",e),UIUtil.SetDocumentScale(e)}else LogUtil.Debug("O.DocOpt - SetZoomLevelByIndex - OptManager not available, zoom not applied")}IdleZoomCtls(){LogUtil.Debug("O.DocOpt - IdleZoomControls - Entering function");const t=$$1("#zoom-ctl-id"),e=Math.round(100*T3Gv.docUtil.GetZoomFactor());LogUtil.Debug("O.DocOpt - IdleZoomControls - Current zoom percentage:",e),T3Gv.docUtil.GetSizeToFit(),this.inZoomIdle=!0,t.val(e).change(),this.inZoomIdle=!1,LogUtil.Debug("O.DocOpt - IdleZoomControls - Zoom controls updated")}ZoomIn(){this.ZoomInAndOut(!0)}ZoomOut(){this.ZoomInAndOut(!1)}UpdateRefZoomScale(t){zoomScale.value=t}LoadRulersSetting(){var t,e;const i=DataOpt.LoadDocSettingData(),n=null==(e=null==(t=null==i?void 0:i.docConfig)?void 0:t.showRulers)||e;this.docConfig.showRulers=n,RefUtil.SetShowRulers(n),this.UpdateRulerVisibility(),LogUtil.Debug("= U.DocUtil: LoadRulersSetting - Output:",{showRulers:n})}LoadGridSetting(){var t,e;const i=DataOpt.LoadDocSettingData(),n=null==(e=null==(t=null==i?void 0:i.docConfig)?void 0:t.showGrid)||e;this.docConfig.showGrid=n,RefUtil.SetShowGrid(n),this.UpdateGridVisibility(),LogUtil.Debug("= U.DocUtil: LoadGridSetting - Output:",{showGrid:n})}RemoveAllLayers(){const t=T3Gv.opt.layersManagerBlockId,e=ObjectUtil$1.GetObjectPtr(t,!1).layers;LogUtil.Info("= u.DocUtil: RemoveAllLayers - Input:",{layersManagerBlockId:t,layers:e}),this.svgDoc.RemoveLayer("0")}}class ArrowDefs{constructor(){this.InitArrowDefs=()=>{this.uiArrowDefs=[{id:0,desc:"No arrow",defArea:{width:1,height:1},endPt:{x:0,y:0},attachPt:{x:0,y:0},centered:!1,geometry:[]},{id:1,desc:"Filled arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]}]},{id:2,desc:"Line arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10]]}]},{id:3,desc:"Fancy arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["L",5,5],["z"]]}]},{id:4,desc:"Filled circle",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!0,pathData:{x:0,y:0,width:10,height:10}}]},{id:5,desc:"Unfilled circle",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}}]},{id:6,desc:"Filled square",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"RECT",filled:!0,pathData:{x:0,y:0,width:10,height:10}}]},{id:7,desc:"Unfilled square",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"RECT",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}}]},{id:8,desc:"Crows foot",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,5],["L",10,0],["M",0,5],["L",10,5],["M",0,5],["L",10,10]]}]},{id:9,desc:"Back slash",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,10]]}]},{id:10,desc:"Filled crows foot",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,5],["L",10,0],["L",10,10],["z"]]}]},{id:11,desc:"Filled diamond",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,5],["L",10,0],["L",20,5],["L",10,10],["z"]]}]},{id:12,desc:"Zero to many",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",20,0],["M",10,5],["L",20,5],["M",10,5],["L",20,10]]}]},{id:13,desc:"One to many",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",5,0],["L",5,10]]},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",20,0],["M",10,5],["L",20,5],["M",10,5],["L",20,10]]}]},{id:14,desc:"Zero to one",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"OVAL",filled:!1,stroke:.5,pathData:{x:0,y:0,width:10,height:10}},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",20,5],["M",15,0],["L",15,10]]}]},{id:15,desc:"One to one",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:20,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",5,0],["L",5,10],["M",10,0],["L",10,10]]}]},{id:16,desc:"One to zero",defArea:{width:20,height:10},endPt:{x:15,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",5,0],["L",5,10]]},{type:"OVAL",filled:!1,stroke:.5,pathData:{x:10,y:0,width:10,height:10}}]},{id:17,desc:"Center filled arrow",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]}]},{id:18,desc:"Center line arrow",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10]]}]},{id:19,desc:"Center fancy arrow",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["L",5,5],["z"]]}]},{id:20,desc:"Double arrow",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]},{type:"PATH",filled:!0,pathData:[["M",10,0],["L",20,5],["L",10,10],["z"]]}]},{id:21,desc:"Filled dimension arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,0],["L",10,10]]}]},{id:22,desc:"Line dimension arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10]]},{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,0],["L",10,10]]}]},{id:23,desc:"Dimension line",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,0],["L",10,10]]}]},{id:25,desc:"Arc down",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,1,10,10]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,0,10,0]]}]},{id:26,desc:"Arc up",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,0,10,0]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:1,pathData:[["M",5,5],["A",5,5,0,0,1,10,10]]}]},{id:27,desc:"Half arrow up",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,10],["L",10,5]]}]},{id:28,desc:"Half arrow down",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,10],["L",10,5]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5]]}]},{id:29,desc:"Center cross",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!0,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,10],["M",0,10],["L",10,0]]}]},{id:30,desc:"Half line up",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,0]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,10]]}]},{id:31,desc:"Half line down",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,10]]}],flippedGeometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",10,5],["L",10,0]]}]},{id:32,desc:"Slash",defArea:{width:10,height:10},endPt:{x:5,y:5},attachPt:{x:5,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,10],["L",10,0]]}]},{id:33,desc:"Unfilled arrow",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",10,5],["L",0,10],["z"]]}]},{id:34,desc:"Unfilled crows foot",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,5],["L",10,0],["L",10,10],["z"]]}]},{id:35,desc:"Unfilled diamond",defArea:{width:20,height:10},endPt:{x:20,y:5},attachPt:{x:0,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,5],["L",10,0],["L",20,5],["L",10,10],["z"]]}]},{id:36,desc:"Single line cross",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!1,stroke:.5,pathData:[["M",0,0],["L",0,10]]}]},{id:37,desc:"down indicator",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,10],["L",5,5],["z"]]}],flippedGeometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,0],["L",5,5],["z"]]}]},{id:38,desc:"up indicator",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:10,y:5},centered:!1,geometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,0],["L",5,5],["z"]]}],flippedGeometry:[{type:"PATH",filled:!0,pathData:[["M",10,5],["L",10,10],["L",5,5],["z"]]}]},{id:39,desc:"round end",defArea:{width:10,height:10},endPt:{x:10,y:5},attachPt:{x:5,y:5},centered:!1,fixedSizeScale:1,geometry:[{type:"OVAL",filled:!0,pathData:{x:0,y:0,width:10,height:10}}]}]},this.InitArrowDefs()}}class ArrowSizes{constructor(){this.uiarrowSizes=[],this.InitArrowSizes=()=>{this.uiarrowSizes=[2,4,6,1.5,3,12,24]},this.InitArrowSizes()}}class LibList{constructor(){this.selected=0,this.lib=[]}}var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$2(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$2(e,i,a),a};class HeaderInfo{constructor(){this.Initialize()}Initialize(){this.Page=new PageSetting,this.MaxWorkDim=new Point$1(OptConstant.Common.MaxWorkDimX,OptConstant.Common.MaxWorkDimY),this.DimensionFont=new FontRecord,this.DimensionFontStyle=new DefaultStyle,this.flags=OptConstant.HeaderFlags.Pages,this.BusinessModule="",this.dateformat=-1,this.originaltemplate="",this.orgcharttable="",this.exportpath="",this.presentationBackground="",this.presentationName="",this.importSourcePath="",this.defaultlibs="",this.lp_list=new LibList,this.ClipboardBuffer=null,this.ClipboardType=T3Constant.ClipboardType.None,this.clipboardJson=null,this.holidaymask=0,this.DocIsDirty=!1,this.AllowReplace=!0,this.FontList=[],this.SymbolSearchString="",this.ParentPageID=""}}__decorateClass$2([Type((()=>PageSetting))],HeaderInfo.prototype,"Page",2),__decorateClass$2([Type((()=>Point$1))],HeaderInfo.prototype,"MaxWorkDim",2),__decorateClass$2([Type((()=>FontRecord))],HeaderInfo.prototype,"DimensionFont",2),__decorateClass$2([Type((()=>DefaultStyle))],HeaderInfo.prototype,"DimensionFontStyle",2),__decorateClass$2([Type((()=>LibList))],HeaderInfo.prototype,"lp_list",2);class ImageRecord{constructor(){this.mr={x:0,y:0,width:0,height:0},this.croprect={left:0,top:0,right:0,bottom:0},this.imageflags=NvConstant.ImageScales.CropToFit,this.scale=1,this.iconid=0}}class OptUtil{InitializeProperties(){this.svgDocId="#svg-area",this.svgObjectLayer=null,this.svgOverlayLayer=null,this.svgHighlightLayer=null,this.svgCollabLayer=null,this.sVGroot=null,this.optSlt=null,this.optSltStartX=0,this.optSltStartY=0,this.optSltFrame={x:0,y:0,width:0,height:0},this.dragElementList=[],this.dragStartX=0,this.dragStartY=0,this.dragDeltaX=0,this.dragDeltaY=0,this.dragTargetId=null,this.dragGotMove=!1,this.dragBBoxList=[],this.dragTargetBBox={},this.dragEnclosingRect=null,this.dragGotAutoResizeRight=!1,this.dragGotAutoResizeBottom=!1,this.dragGotAutoResizeOldX=[],this.dragGotAutoResizeOldY=[],this.theDragGotAutoResizeOldLeft=[],this.theDragGotAutoResizeOldTop=[],this.theDragGotAutoResizeLeft=!1,this.theDragGotAutoResizeTop=!1,this.moveList=[],this.moveBounds=null,this.pinRect=null,this.noUndo=!1,this.actionStoredObjectId=-1,this.actionSvgObject=null,this.actionTriggerId=0,this.actionTriggerData=0,this.actionStartX=0,this.actionStartY=0,this.actionTableLastX=0,this.actionTableLastY=0,this.actionOldExtra=0,this.actionBBox={},this.actionNewBBox={},this.actionLockAspectRatio=!1,this.actionAspectRatioWidth=0,this.actionAspectRatioHeight=0,this.crtOpt=OptConstant.OptTypes.None,this.drawShape=null,this.drawStartX=0,this.drawStartY=0,this.lineDrawStartX=0,this.lineDrawStartY=0,this.lineDrawId=-1,this.lineDrawLineId=-1,this.lineStamp=!1,this.fromOverlayLayer=!1,this.dynamicGuides=null,this.rotateKnobCenterDivisor={x:2,y:2},this.rotateStartPoint={},this.rotateEndPoint={},this.rotateObjectRadians=0,this.rotateStartRotation=0,this.rotateEndRotation=0,this.rotatePivotX=0,this.rotatePivotY=0,this.rotateSnap=5,this.enhanceRotateSnap=45,this.autoScrollTimer=new T3Timer(this),this.autoScrollTimerId=-1,this.autoScrollXPos=0,this.autoScrollYPos=0,this.inAutoScroll=!1,this.mainAppElement=null,this.mainAppHammer=null,this.workAreaElement=null,this.WorkAreaHammer=null,this.workAreaTextInputProxy=null,this.TEHammer=null,this.TEWorkAreaHammer=null,this.clickAreaHammer=null,this.decAreaHammer=null,this.noteAreaHammer=null,this.textEntryTimer=null,this.editModeList=null,this.selectObjsBlockId=-1,this.sdDataBlockId=-1,this.teDataBlockId=-1,this.layersManagerBlockId=-1,this.linksBlockId=-1,this.stampTimeout=null,this.stampCompleteCallback=null,this.stampCompleteUserData=null,this.stampHCenter=!0,this.stampVCenter=!0,this.stampShapeOffsetX=0,this.stampShapeOffsetY=0,this.stampSticky=!1,this.lastOpDuplicate=!1,this.formatPainterMode=StyleConstant.FormatPainterModes.None,this.formatPainterStyle=new QuickStyle,this.formatPainterSticky=!1,this.formatPainterText=new QuickStyle,this.formatPainterParaFormat=new ParagraphFormat,this.formatPainterArrows=null,this.nudgeDelta=10,this.nudgeOpen=!1,this.nudgeX=0,this.nudgeY=0,this.nudgeGrowX=0,this.nudgeGrowY=0,this.useDefaultStyle=!1,this.newObjectVisible=!1,this.TextureList=new TextureList,this.nStdTextures=0,this.richGradients=[],this.header=new HeaderInfo,this.FileVersion=41,this.bDrawEffects=!0,this.hasBlockDirectory=!1,this.nDataStoreStart=T3Gv.stdObj.storedObjects.length,this.textClipboard=null,this.htmlClipboard=null,this.imageClipboard=null,this.cutFromButton=!1,this.topLeftPastePos={x:0,y:0},this.topLeftPasteScrollPos={x:0,y:0},this.pasteCount=0,this.dirtyList=[],this.dirtyListMoveOnly=[],this.dirtyListReOrder=!1,this.bInNoteEdit=!1,this.bNoteChanged=!1,this.wasClickInShape=!1,this.eventTimestamp=0,this.actionArrowHideTimer=new T3Timer(this),this.uniqueId=0,this.bInDimensionEdit=!1,this.oldAllowSave=!0,this.postMoveSelectId=null,this.bBuildingSymbols=!1,this.bTokenizeStyle=!1,this.linkParams=null,this.rClickParam=null,this.curHiliteShape=-1,this.doubleClickSymbolTimeStamp=0,this.importContext=null,this.cachedHeight=null,this.cachedWidth=null,this.emptySymbolList=[],this.emptyEMFList=[],this.addCount=0,this.symbolLibraryItemID=-1,this.bitmapImportCanvas=null,this.bitmapImportCanvasCTX=null,this.bitmapScaledCanvas=null,this.bitmapScaledCanvasCTX=null,this.bitmapImportSourceWidth=0,this.bitmapImportSourceHeight=0,this.bitmapImportDestWidth=800,this.bitmapImportDestHeight=800,this.bitmapImportMaxScaledWidth=1200,this.bitmapImportMaxScaledHeight=1200,this.bitmapImportDPI=200,this.bitmapImportMimeType="",this.bitmapImportOriginalSize=0,this.bitmapImportScaledSize=0,this.scaledBitmapCallback=null,this.bitmapImportEXIFdata=null,this.bitmapImportFile=null,this.bitmapImportResult=null,this.commentUserIds=[],this.activeExpandedView=null,this.alternateStateManagerVars={bHasBeenSaved:!1},this.socketAction=[],this.pageAction=[],this.pagesToDelete=[],this.oldFileMetaData=null,this.selectionState=new SelectionAttr,this.InitBlockData()}InitBlockData(){const t=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.SelectedListObject,[]);this.selectObjsBlockId=t.ID;const e=new SDData;e.def.style=new QuickStyle,e.def.pen=Utils1.DeepCopy(OptConstant.Common.PenStylingDefault),e.def.highlighter=Utils1.DeepCopy(OptConstant.Common.HighlighterStylingDefault),e.d_sarrow=0,e.d_sarrowdisp=!1,e.d_earrow=0,e.d_earrowdisp=!1,e.d_arrowsize=1,e.CurrentTheme=null;const i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.SDDataObject,e);this.sdDataBlockId=i.ID;const n=new LayersManager,s=new Layer$1;s.name=OptConstant.Common.DefaultLayerName,n.layers.push(s),n.nlayers=1,n.activelayer=0;const a=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.LayersManagerObject,n);this.layersManagerBlockId=a.ID;const o=new TEData,r=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.TEDataObject,o);this.teDataBlockId=r.ID;const l=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.LinkListObject,[]);this.linksBlockId=l.ID}Initialize(t=!1){ObjectUtil$1.PreserveUndoState(!0),UIUtil.InitSvgDocument(t),UIUtil.InitT3GvOpt(),this.sVGroot=this.svgDoc.svgObj.node,SelectUtil.UpdateSelectionAttributes(null),this.BuildarrowHlkTables(),OptCMUtil.SetEditMode(NvConstant.EditState.Default)}HandleDimensionEditMode(t){LogUtil.Debug("= O.OptUtil  HandleDimensionEditMode - Input:",t);const e=TextConstant.TextFace;this.selectionState.fontid=-1,this.selectionState.fontsize=T3Gv.opt.header.DimensionFont.fontSize,this.selectionState.bold=(T3Gv.opt.header.DimensionFont.face&e.Bold)>0,this.selectionState.italic=(T3Gv.opt.header.DimensionFont.face&e.Italic)>0,this.selectionState.underline=(T3Gv.opt.header.DimensionFont.face&e.Underline)>0,this.selectionState.superscript=(T3Gv.opt.header.DimensionFont.face&e.Superscript)>0,this.selectionState.subscript=(T3Gv.opt.header.DimensionFont.face&e.Subscript)>0,this.selectionState.csOptMng=null,LogUtil.Debug("= O.OptUtil  HandleDimensionEditMode - Output: Dimension edit mode processed")}HandleEmptySelectionOrNoteEditMode(t){LogUtil.Debug("= O.OptUtil  HandleEmptySelectionOrNoteEditMode - Input:",t);const e=TextConstant.TextFace;if(this.selectionState.fontid=-1,this.selectionState.fontsize=t.def.style.Text.FontSize,this.selectionState.bold=(t.def.style.Text.Face&e.Bold)>0,this.selectionState.italic=(t.def.style.Text.Face&e.Italic)>0,this.selectionState.underline=(t.def.style.Text.Face&e.Underline)>0,this.selectionState.superscript=(t.def.style.Text.Face&e.Superscript)>0,this.selectionState.subscript=(t.def.style.Text.Face&e.Subscript)>0,this.selectionState.TextDirection=0==(t.def.textflags&NvConstant.TextFlags.HorizText),this.selectionState.dimensions=t.dimensions&NvConstant.DimensionFlags.Always||t.dimensions&NvConstant.DimensionFlags.Select,this.bInNoteEdit&&this.curNoteShape>=0){const t=OptAhUtil.GetGvSviOpt(this.curNoteShape);t&&(this.selectionState.csOptMng=t)}LogUtil.Debug("= O.OptUtil  HandleEmptySelectionOrNoteEditMode - Output: Empty selection or note edit mode processed")}ProcessTargetObject(t,e){LogUtil.Debug("= O.OptUtil  ProcessTargetObject - Input:",{targetId:t,targetObject:e});const i=OptAhUtil.GetGvSviOpt(t);if(i&&(this.selectionState.csOptMng=i),this.selectionState.tselect=t,e){this.selectionState.colorfilter=e.colorfilter,e.GetPositionRect(),this.selectionState.subtype=e.subtype,this.selectionState.objecttype=e.objecttype,this.selectionState.datasetElemID=e.datasetElemID;const t=e.GetDimensionsForDisplay();this.selectionState.left=t.x,this.selectionState.top=t.y,this.selectionState.width=t.width,this.selectionState.height=t.height,e.objecttype===NvConstant.FNObjectTypes.FlWall&&(this.selectionState.WallThickness=e.StyleRecord.Line.Thickness),this.selectionState.leftstr=e.GetLengthInRulerUnits(this.selectionState.left,T3Gv.docUtil.rulerConfig.originx),this.selectionState.topstr=e.GetLengthInRulerUnits(this.selectionState.top,T3Gv.docUtil.rulerConfig.originy),this.selectionState.widthstr=e.GetLengthInRulerUnits(this.selectionState.width),0!==t.height?this.selectionState.heightstr=e.GetLengthInRulerUnits(this.selectionState.height):this.selectionState.heightstr="",this.selectionState.selectionhastext=e.DataID>=0}LogUtil.Debug("= O.OptUtil  ProcessTargetObject - Output: Target object processed")}ProcessSelectedObject(t,e,i){LogUtil.Debug("= O.OptUtil  ProcessSelectedObject - Input:",{object:t,textObject:e,objectIndex:i});const n=OptConstant.DrawObjectBaseClass;t.ImageURL&&t.ImageURL.length&&this.selectionState.nimageselected++,t instanceof Instance.Shape.ShapeContainer&&(this.selectionState.lockedTableSelected=!0,this.selectionState.IsTargetTable=!0),t.objecttype===NvConstant.FNObjectTypes.FlWall&&(this.selectionState.iswallselected=!0);let s=t.DrawingObjectBaseClass;switch(t instanceof Instance.Shape.PolyLineContainer&&(s=n.Shape),s){case n.Shape:this.ProcessShapeObject(t,null);break;case n.Connector:this.ProcessConnectorObject(t);case n.Line:this.ProcessLineObject(t)}e.DataID>=0&&(this.selectionState.selectionhastext=!0),(t instanceof Instance.Shape.GroupSymbol||t.NativeID>=0)&&this.selectionState.ngroupsselected++,TextUtil.HandleTextFormatAttributes(e,i),t instanceof Instance.Shape.PolyLineContainer&&this.selectionState.npolylinecontainerselected++,t instanceof Instance.Shape.PolyLine&&t.polylist&&t.polylist.segs&&(this.selectionState.nsegs=t.polylist.segs.length,this.selectionState.polyclosed=t.polylist.closed),this.selectionState.dimensions|=t.Dimensions&(NvConstant.DimensionFlags.Always|NvConstant.DimensionFlags.Select),LogUtil.Debug("= O.OptUtil  ProcessSelectedObject - Output: Object processed")}ProcessShapeObject(t,e){this.selectionState.nshapeselected++,t.ShapeType!==OptConstant.ShapeType.Rect&&t.ShapeType!==OptConstant.ShapeType.RRect||(t.moreflags&OptConstant.ObjMoreFlags.FixedRR?-2===this.selectionState.fixedCornerRadius?this.selectionState.fixedCornerRadius=100*t.shapeparam:this.selectionState.fixedCornerRadius!==100*t.shapeparam&&(this.selectionState.fixedCornerRadius=-1):-2===this.selectionState.fixedCornerRadius&&0===t.shapeparam?this.selectionState.fixedCornerRadius=0:this.selectionState.fixedCornerRadius=-1),LogUtil.Debug("= O.OptUtil  ProcessShapeObject - Output: Shape object processed")}ProcessConnectorObject(t){LogUtil.Debug("= O.OptUtil  ProcessConnectorObject - Input:",t),this.selectionState.nconnectorselected++,t.AllowCurveOnConnector()&&(this.selectionState.connectorCanHaveCurve=!0,-2===this.selectionState.lineCornerRadius?this.selectionState.lineCornerRadius=t.arraylist.curveparam:this.selectionState.lineCornerRadius!==t.arraylist.curveparam&&(this.selectionState.lineCornerRadius=-1)),LogUtil.Debug("= O.OptUtil  ProcessConnectorObject - Output: Connector object processed")}ProcessLineObject(t){LogUtil.Debug("= O.OptUtil  ProcessLineObject - Input:",t),this.selectionState.nlineselected++;const e=t.TextDirection;0===this.selectionState.TextDirection?this.selectionState.TextDirection=e:this.selectionState.TextDirection!==e&&(this.selectionState.TextDirection=-1),t.LineType===OptConstant.LineType.SEGLINE&&(-2===this.selectionState.lineCornerRadius?this.selectionState.lineCornerRadius=t.segl.curveparam:this.selectionState.lineCornerRadius!==t.segl.curveparam&&(this.selectionState.lineCornerRadius=-1)),LogUtil.Debug("= O.OptUtil  ProcessLineObject - Output: Line processed",{lineCount:this.selectionState.nlineselected,textDirection:this.selectionState.TextDirection,cornerRadius:this.selectionState.lineCornerRadius})}BuildarrowHlkTables(){LogUtil.Debug("= O.OptUtil  BuildarrowHlkTables - Input: No parameters");const t=(new ArrowDefs).uiArrowDefs,e=(new ArrowSizes).uiarrowSizes;T3Gv.arrowHlkTable.length=t.length;for(let i=0;i<t.length;i++)T3Gv.arrowHlkTable[t[i].id]=t[i];T3Gv.arrowHsTable.length=e.length;for(let i=0;i<e.length;i++)T3Gv.arrowHsTable[i]=e[i];LogUtil.Debug("= O.OptUtil  BuildarrowHlkTables - Output: Arrowhead lookup tables built")}SetDimensionVisibility(t,e){}CloseEdit(t,e,i){LogUtil.Debug("= O.OptUtil  CloseEdit - Input:",{skipShapeClose:t,closeOption:e,skipTooltipProcessing:i}),this.nudgeOpen,UIUtil.SetFormatPainter(!0,!1),this.DeactivateAllTextEdit(!1,!t),this.bInNoteEdit,t||this.CloseShapeEdit(e),LogUtil.Debug("= O.OptUtil  CloseEdit - Output: done")}DeactivateAllTextEdit(t,e){LogUtil.Debug("= O.OptUtil  DeactivateAllTextEdit - Input:",{skipShapeClose:t,closeOption:e});if(-1!==ObjectUtil$1.GetObjectPtr(this.teDataBlockId,!1).theActiveTextEditObjectID)TextUtil.DeactivateTextEdit(t,e);else{const t=this.svgDoc.GetActiveEdit();null!=t&&t.ID===OptConstant.SVGElementClass.DimText&&TextUtil.TEUnregisterEvents()}LogUtil.Debug("= O.OptUtil  DeactivateAllTextEdit - Output: done")}CloseShapeEdit(t,e,i){LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Input:",{providedOutlineId:t,useAlternate:e,alternateOutlineId:i});let n=ObjectUtil$1.GetObjectPtr(this.teDataBlockId,!1),s=n.theActiveOutlineObjectID;if(e&&(s=i),s>=0){if(!0===t)return void LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Skipping close because providedOutlineId is true");if(t===s)return void LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Provided outline id equals active outline id, no action taken");let i=ObjectUtil$1.GetObjectPtr(s,!1);if(i){if(i.objecttype===NvConstant.FNObjectTypes.FlWall)return void LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Active outline is a wall opt wall, skipping close");i=ObjectUtil$1.GetObjectPtr(s,!1),i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line&&i.LineType===OptConstant.LineType.POLYLINE&&i.polylist.closed&&this.PolyLineToShape(s)}e||(n=ObjectUtil$1.GetObjectPtr(this.teDataBlockId,!0),n.theActiveOutlineObjectID=-1),DrawUtil.CompleteOperation()}LogUtil.Debug("= O.OptUtil  CloseShapeEdit - Output: Operation complete")}PolyLineToShape(t,e){let i,n,s,a,o,r,l,h,c={x:0,y:0,width:0,height:0};const u=T3Gv.stdObj.PreserveBlock(t);if(null!=u){for(i=u.Data,a=i.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),r=a.length,i.polylist.dim.x=i.inside.width,i.polylist.dim.y=i.inside.height,i.polylist.offset.x=i.StartPoint.x-i.Frame.x,i.polylist.offset.y=i.StartPoint.y-i.Frame.y,l=i.inside.width,l<1&&(l=1),h=i.inside.height,h<1&&(h=1),n=new Instance.Shape.Polygon(i),n.NeedsSIndentCount=!0,n.polylist=i.polylist,n.BlockID=i.BlockID,n.StartPoint=i.StartPoint,n.EndPoint=i.EndPoint,n.RotationAngle=i.polylist.Shape_Rotation,n.DataID=i.polylist.Shape_DataID,Utils2.GetPolyRect(c,a),s=0;s<r;s++)s>0&&a[s].x===a[s-1].x&&a[s].y===a[s-1].y||(a[s].x-=c.x,a[s].y-=c.y,o=new Point$1(a[s].x/l,a[s].y/h),n.VertexArray.push(o));return n.UpdateFrame(i.Frame),u.Data=n,e||(ObjectUtil$1.AddToDirtyList(t),SvgUtil.RenderDirtySVGObjects()),!0}return!1}EndStampSession(){LogUtil.Debug("= O.OptUtil  EndStampSession - Input");OptCMUtil.GetEditMode()===NvConstant.EditState.Stamp&&(T3Gv.opt.actionStoredObjectId=-1,DrawUtil.CancelObjectDragDrop(!0),T3Gv.opt.mainAppHammer&&T3Gv.opt.UnbindDragDropOrStamp()),LogUtil.Debug("= O.OptUtil  EndStampSession - Output: done")}OverrideSnaps(t){if(LogUtil.Debug("= O.OptUtil  OverrideSnaps - Input:",t),null==t)return LogUtil.Debug("= O.OptUtil  OverrideSnaps - Output: false (no event)"),!1;let e=t.altKey;return t.gesture&&t.gesture.srcEvent&&(e=t.gesture.srcEvent.altKey),LogUtil.Debug("= O.OptUtil  OverrideSnaps - Output:",e),!0===e}ExceptionCleanup(t){LogUtil.Debug("= O.OptUtil  ExceptionCleanup - Input:",t);try{TextUtil.TEUnregisterEvents(),this.DeactivateAllTextEdit(!0),this.CloseEdit(!1,!0),T3Gv.state.ExceptionCleanup(),UIUtil.ResizeSVGDocument(),SvgUtil.RenderAllSVGObjects();ObjectUtil$1.GetObjectPtr(this.sdDataBlockId,!1);const t=ObjectUtil$1.GetObjectPtr(this.selectObjsBlockId,!1);SelectUtil.UpdateSelectionAttributes(t),LogUtil.Debug("= O.OptUtil  ExceptionCleanup - Output: done")}catch(e){throw e}}RemoveNotVisible(t){LogUtil.Debug("= O.OptUtil  RemoveNotVisible - Input:",t);const e=NvConstant.ObjFlags.NotVisible,i=[];for(let n=0;n<t.length;n++){const s=t[n],a=ObjectUtil$1.GetObjectPtr(s,!1);!a||a.flags&e||i.push(s)}return LogUtil.Debug("= O.OptUtil  RemoveNotVisible - Output:",i),i}AllowAddToRecent(t){return LogUtil.Debug("= O.OptUtil  allowAddToRecent - Input:",t),t&&t.flags&NvConstant.ObjFlags.TextOnly?(LogUtil.Debug("= O.OptUtil  allowAddToRecent - Output:",!1),!1):(LogUtil.Debug("= O.OptUtil  allowAddToRecent - Output:",!0),!0)}UnbindDragDropOrStamp(){LogUtil.Debug("= O.OptUtil  UnbindDragDropOrStamp - Input: No parameters"),T3Gv.opt.mainAppHammer&&(T3Gv.opt.mainAppHammer.dispose(),T3Gv.opt.mainAppHammer=null),LogUtil.Debug("= O.OptUtil  UnbindDragDropOrStamp - Output: DragDrop or Stamp unbound")}GetTargetNode(t){const e=ObjectUtil$1.GetObjectPtr(t,!1);return e&&e.hooks.length&&(t=this.GetTargetNode(e.hooks[0].objid)),t}UpdateLinks(){let t,e,i,n,s,a,o,r,l,h,c,u,d,p,g,f,m,v,b,y;LogUtil.Debug("= O.OptUtil  UpdateLinks - Input: No parameters");let S=!0,x=!1,w=!1,C=0,T={x:0,y:0},D=[{x:0,y:0}],k={x:0,y:0,width:0,height:0};const $=OptConstant;let O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1),P=!1;if(null==O)return HookUtil.UpdateLineHops(!0),LogUtil.Debug("= O.OptUtil  UpdateLinks - Output: 1 (No links found)"),1;HookUtil.FixAnyCircularHooks();const L=ObjectUtil$1.GetObjectPtr(this.sdDataBlockId,!1),I=T3Gv.docUtil.docConfig.enableSnap;for(T3Gv.docUtil.docConfig.enableSnap=!1,i=O.length-1;i>=0&&!(i>=O.length);i--)O[i].flags&DSConstant.LinkFlags.DeleteTarget?(P||(O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0),P=!0),HookUtil.DeleteLink(O,O[i].targetid,-1,null,0,!1),i=O.length):(O[i].flags&DSConstant.LinkFlags.DeleteLink||O[i].flagss&DSConstant.LinkFlags.Break||null==(g=ObjectUtil$1.GetObjectPtr(O[i].hookid,!1)))&&(P||(O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0),P=!0),HookUtil.DeleteLink(O,O[i].targetid,O[i].hookid,O[i].cellid,0,!1),i=O.length);if(L.flags&$.SessionFlags.NoTreeOverlap||L.flags&$.SessionFlags.IsFlowChart){let t;e=O.length;const n={topconnector:-1,topshape:-1,foundtree:!1};for(i=0;i<e;i++)t=O[i].flags&DSConstant.LinkFlags.Move,t&&(s=ObjectUtil$1.GetObjectPtr(O[i].targetid,!1),n.topshape>=0&&OptCMUtil.SetLinkFlag(n.topshape,DSConstant.LinkFlags.Move),n.topshape=-1,n.foundtree=!1)}for(;S;)for(S=!1,i=0;i<O.length;i++)if(O[i].flags&DSConstant.LinkFlags.Move){if(P||(O=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!0),P=!0),g=ObjectUtil$1.GetObjectPtr(O[i].hookid,!0),null==g){O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.DeleteLink,!0),O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Move,!1),w=!0;continue}if(m=HookUtil.VerifyLink(g,O[i]),m>=0){if(g.LinkNotVisible(),f=ObjectUtil$1.GetObjectPtr(O[i].targetid,!1),g.objecttype===NvConstant.FNObjectTypes.Multiplicity&&(O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Change,!1)),O[i].flags&DSConstant.LinkFlags.Change){if(a=g.HookToPoint(g.hooks[m].hookpt,null),C=NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcForceEnd,C=Utils2.SetFlag(C,NvConstant.HookFlags.LcShapeOnLine,!(g instanceof Instance.Shape.BaseLine)),o=f.GetTargetPoints(a,C,g.BlockID),o){for(r=o.length,p=null,l=0;l<r;l++)d=o[l].x-g.hooks[m].connect.x,u=o[l].y-g.hooks[m].connect.y,c=d*d+u*u,(null==p||c<p)&&(p=c,h=l);null!=h&&(g.hooks[m].connect.x=o[h].x,g.DrawingObjectBaseClass!=OptConstant.DrawObjectBaseClass.Connector&&(g.hooks[m].connect.y=o[h].y))}g.hooks[m].hookpt=f.GetBestHook(O[i].hookid,g.hooks[m].hookpt,g.hooks[m].connect),O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Change,!1)}if(T=g.HookToPoint(g.hooks[m].hookpt,null),null==T)continue;null!=f&&(D[0].x=g.hooks[m].connect.x,D[0].y=g.hooks[m].connect.y,D=f.GetPerimPts(O[i].targetid,D,g.hooks[m].hookpt,!1,O[i].cellid,O[i].hookid),1===g.hooks.length?(d=D[0].x-T.x,Math.abs(d)<.1&&(d=0),u=D[0].y-T.y,Math.abs(u)<.1&&(u=0),(d||u)&&(ToolActUtil.OffsetShape(O[i].hookid,d,u,OptConstant.ActionTriggerType.UpdateLinks),t=g.Frame,(t.x<0||t.y<0||t.x+t.width>L.dim.x||t.y+t.height>L.dim.y)&&(x=!0,n=this.GetTargetNode(O[i].hookid),s=ObjectUtil$1.GetObjectPtr(n,!1),s&&(s.flags=Utils2.SetFlag(s.flags,NvConstant.ObjFlags.Bounds,!0))))):2===g.hooks.length&&g.LinkGrow(O[i].hookid,g.hooks[m].hookpt,D[0])),O[i].flags=Utils2.SetFlag(O[i].flags,DSConstant.LinkFlags.Move,!1),S=!0}else w=!0}if(w)for(i=O.length-1;i>=0&&!(i>=O.length);i--)O[i].flags&DSConstant.LinkFlags.DeleteTarget?(HookUtil.DeleteLink(O,O[i].targetid,-1,null,0,!1),i=O.length):(O[i].flags&DSConstant.LinkFlags.DeleteLink||O[i].flagss&DSConstant.LinkFlags.Break||null==(g=ObjectUtil$1.GetObjectPtr(O[i].hookid,!1)))&&(HookUtil.DeleteLink(O,O[i].targetid,O[i].hookid,O[i].cellid,0,!1),i=O.length);if(x){const t=LayerUtil.ZList();for(DrawUtil.InitializeAutoGrowDrag(),e=t.length,i=0;i<e;i++)if(b=ObjectUtil$1.GetObjectPtr(t[i],!1),b&&b.flags&NvConstant.ObjFlags.Bounds&&(b.flags=Utils2.SetFlag(b.flags,NvConstant.ObjFlags.Bounds,!1),v=SelectUtil.GetMoveList(t[i],!1,!0,!1,k,!1),d=0,k.x+k.width>L.dim.x&&(d=L.dim.x-(k.x+k.width)),d<-k.x&&(d=-k.x),u=0,k.y+k.height>L.dim.y&&(u=L.dim.y-(k.y+k.height)),u<-k.y&&(u=-k.y),y=v.length,(d||u)&&y))for(l=0;l<y;l++)ToolActUtil.OffsetShape(v[l],d,u,OptConstant.ActionTriggerType.UpdateLinks);this.moveList=null}return T3Gv.docUtil.docConfig.enableSnap=I,LogUtil.Debug("= O.OptUtil  UpdateLinks - Output: 0 (Success)"),0}CalcAllObjectEnclosingRect(t,e){LogUtil.Debug("= O.OptUtil  CalcAllObjectEnclosingRect - Input:",{shouldUseEdges:t,fitOptions:e});const i=LayerUtil.VisibleZList(),n=i.length;let s=0,a=0;const o=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1);let r={x:0,y:0,width:0,height:0};if(0===n)return LogUtil.Debug("= O.OptUtil  CalcAllObjectEnclosingRect - Output:",r),r;let l=0,h=0,c=null,u=null,d=[];for(l=0;l<o.nlayers;l++)if(l!==o.activelayer&&o.layers[l].flags&NvConstant.LayerFlags.UseEdges&&(d=d.concat(o.layers[l].zList),t)){s=25,a=25;const t=d.length,e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);for(let i=0;i<t;i++)c=ObjectUtil$1.GetObjectPtr(d[i],!1),c&&c.objecttype===NvConstant.FNObjectTypes.Annotation&&c.Frame.y+c.Frame.height>=e.dim.y-OptConstant.Common.AnnoHotDist&&(a=10+e.dim.y-c.Frame.y)}let p=0;for(let g=0;g<n;g++){if(h=i[g],d.indexOf(h)>=0)continue;const t=T3Gv.stdObj.GetObject(h);null!=t&&(c=t.Data,c.flags&NvConstant.ObjFlags.NotVisible||(u=e?Utils1.DeepCopy(c.Frame):Utils1.DeepCopy(c.r),0===p?r=Utils1.DeepCopy(u):Utils2.UnionRect(u,r,r),p++))}return t&&(r.width+=s,r.height+=a),LogUtil.Debug("= O.OptUtil  CalcAllObjectEnclosingRect - Output:",r),r}ScrollObjectIntoView(t,e,i){let n;if(LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Input:",{objectId:t,shouldCenterObject:e,customRect:i}),null!=t&&-1!=t||(t=SelectUtil.GetTargetSelect()),-1==t)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: No valid object ID");if(i)n=i;else{const e=ObjectUtil$1.GetObjectPtr(t,!1);if(null==e)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Object not found");n=e.r}const s=this.svgDoc.docInfo,a={x:s.docVisX,y:s.docVisY,width:s.docVisWidth,height:s.docVisHeight};if(Utils2.IsRectangleFullyEnclosed(a,n)&&!e)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Object already visible");let o,r;if((n.width>=a.width||n.height>=a.height)&&Utils2.UnionRect(a,n,a)&&!e)return void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Oversized object, no scroll needed");if(e){const t=a.x+a.width/2,e=a.y+a.height/2,i=n.x+n.width/2,l=e-(n.y+n.height/2);return o=(a.x-(t-i))*s.docToScreenScale,r=(a.y-l)*s.docToScreenScale,T3Gv.docUtil.SetScroll(o,r),void LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Centered object",{scrollX:o,scrollY:r})}o=a.x,r=a.y;let l=20,h=20;s.docVisWidth<s.docWidth&&(h=30),s.docVisHeight<s.docHeight&&(l=30),n.x<a.x&&(o=n.x-20),n.x+n.width>a.x+a.width&&(o=n.x+n.width-a.width+h),n.y<a.y&&(r=n.y-20),n.y+n.height>a.y+a.height&&(r=n.y+n.height-a.height+l),o*=s.docToScreenScale,r*=s.docToScreenScale,T3Gv.docUtil.SetScroll(o,r),LogUtil.Debug("= O.OptUtil  ScrollObjectIntoView - Output: Scrolled to make object visible",{scrollX:o,scrollY:r})}SetControlDragMode(t){LogUtil.Debug("= O.OptUtil  SetControlDragMode - Input:",t);const e=t.GetCursor();OptCMUtil.SetEditMode(NvConstant.EditState.DragControl,e),LogUtil.Debug("= O.OptUtil  SetControlDragMode - Output: Mode set to DRAGCONTROL with cursor type:",e)}UnbindShapeMoveHammerEvents(){LogUtil.Debug("= O.OptUtil  UnbindShapeMoveHammerEvents - Input: No parameters"),T3Gv.opt.WorkAreaHammer&&(T3Gv.opt.WorkAreaHammer.off("drag"),T3Gv.opt.WorkAreaHammer.off("dragend"),T3Gv.opt.WorkAreaHammer.off("mousemove")),LogUtil.Debug("= O.OptUtil  UnbindShapeMoveHammerEvents - Output: Events unbound")}IsConnectorEndShape(t,e,i){let n;LogUtil.Debug("= O.OptUtil  IsConnectorEndShape - Input:",{objectData:t,connectorObject:e,resultContainer:i});const s=!!(t&&t.hooks.length&&0===t.hooks[0].connect.y&&t.hooks[0].connect.x<0&&(null===e&&(e=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1)),i&&e&&e.hooks.length&&(n=ObjectUtil$1.GetObjectPtr(e.hooks[0].objid,!1))&&n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector));return s&&(i.id=e.hooks[0].objid,n.extraflags&OptConstant.ExtraFlags.NoDelete?(i.nshapes=n.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,i.nshapes<0&&(i.nshapes=0),i.pasted=!1):i.pasted=!0),LogUtil.Debug("= O.OptUtil  IsConnectorEndShape - Output:",s),s}IsGenogramPartner(t,e){let i,n;if(LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Input:",{objectData:t,resultContainer:e}),t&&t.hooks.length){if(i=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1),i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&i.IsGenoConnector())return e.id=t.hooks[0].objid,LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Output: true (genogram connector found)"),!0}else if((n=this.FindChildArray(t.BlockID,-1))>=0&&(i=ObjectUtil$1.GetObjectPtr(n,!1)).IsGenoConnector())return e.id=n,LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Output: true (child genogram connector found)"),!0;return LogUtil.Debug("= O.OptUtil  IsGenogramPartner - Output: false"),!1}FindChildArray(t,e){LogUtil.Debug("= O.OptUtil  FindChildArray - Input:",{objectId:t,excludeConnectorId:e});const i=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1),n=OptCMUtil.FindLink(i,t,!0),s=i.length;if(n>=0){let a=n;for(;a<s&&i[a].targetid===t;){const t=i[a].hookid;if(t!==e){const e=ObjectUtil$1.GetObjectPtr(t,!1);if(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)return LogUtil.Debug("= O.OptUtil  FindChildArray - Output: Found connector:",t),t}a++}}return LogUtil.Debug("= O.OptUtil  FindChildArray - Output: No connector found (-1)"),-1}EnhanceSnaps(t){if(LogUtil.Debug("= O.OptUtil  EnhanceSnaps - Input:",t),null==t)return LogUtil.Debug("= O.OptUtil  EnhanceSnaps - Output: false (null event)"),!1;let e=t.shiftKey;return t.gesture&&t.gesture.srcEvent&&(e=t.gesture.srcEvent.shiftKey),LogUtil.Debug("= O.OptUtil  EnhanceSnaps - Output:",e),!0===e}SetShapeOriginNoDirty(t,e,i){LogUtil.Debug("= O.OptUtil  SetShapeOriginNoDirty - Input:",{objectId:t,newX:e,newY:i});let n={x:0,y:0},s=T3Gv.stdObj.PreserveBlock(t).Data;n.x=s.Frame.x,n.y=s.Frame.y,s.SetShapeOrigin(e,i),(e-n.x||i-n.y)&&OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),LogUtil.Debug("= O.OptUtil  SetShapeOriginNoDirty - Output: Shape origin updated")}RotatePointAroundPoint(t,e,i){LogUtil.Debug("= O.OptUtil  RotatePointAroundPoint - Input:",{centerPoint:t,targetPoint:e,angleRadians:i});const n={x:e.x,y:e.y},s=Math.sin(i),a=Math.cos(i);n.x-=t.x,n.y-=t.y;const o=n.x*a-n.y*s,r=n.x*s+n.y*a;return n.x=o+t.x,n.y=r+t.y,LogUtil.Debug("= O.OptUtil  RotatePointAroundPoint - Output:",n),n}UpdateEdgeLayers(t,e,i){let n,s,a,o,r,l,h,c,u,d;LogUtil.Debug("= O.OptUtil  UpdateEdgeLayers - Input:",{objectsToExclude:t,originalDimensions:e,newDimensions:i});let p=!1;const g=OptConstant.Common.AnnoHotDist,f=g,m=g,v=e.x-2*g,b=e.y-2*g,y=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1),S=y.layers,x=y.nlayers,w=Utils1.DeepCopy(this.dirtyList);for(this.dirtyList=[],n=0;n<x;n++)if(n!==y.activelayer&&S[n].flags&NvConstant.LayerFlags.UseEdges)for(s=S[n].zList,a=s.length,o=0;o<a;o++)r=s[o],t.indexOf(r)>=0||(l=ObjectUtil$1.GetObjectPtr(r,!1),l&&(h=l.Frame.x<f,c=l.Frame.y<m,u=l.Frame.x+l.Frame.width>f+v,d=l.Frame.y+l.Frame.height>m+b,l.UseEdges(h,c,u,d,e,i)&&(p=!0)));p&&SvgUtil.RenderDirtySVGObjects(),this.dirtyList=w,LogUtil.Debug("= O.OptUtil  UpdateEdgeLayers - Output: Edge layers updated, needsRedraw:",p)}SetLinkFlagsOnFilledClosedPolylines(t){LogUtil.Debug("= O.OptUtil  SetLinkFlagsOnFilledClosedPolylines - Input:",t);let e=null,i=null;if(t&&(e=ObjectUtil$1.GetObjectPtr(t,!1),e&&e instanceof Instance.Shape.PolyLine&&e.polylist&&e.polylist.closed&&OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change)),this.moveList&&this.moveList.length)for(let n=0;n<this.moveList.length;n++)if(i=ObjectUtil$1.GetObjectPtr(this.moveList[n],!0),i&&i.hooks.length>0)for(let t=0;t<i.hooks.length;t++){const e=ObjectUtil$1.GetObjectPtr(i.hooks[t].objid,!1);e&&e.StyleRecord&&e.StyleRecord.Line&&e.StyleRecord.Line.BThick&&e.polylist&&e.polylist.closed&&OptCMUtil.SetLinkFlag(i.hooks[t].objid,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change)}LogUtil.Debug("= O.OptUtil  SetLinkFlagsOnFilledClosedPolylines - Output: Link flags updated")}SetShapeR(t){let e,i;if(LogUtil.Debug("= O.OptUtil  SetShapeR - Input:",{shapeObjectId:t.BlockID}),t.StyleRecord&&(i=t.StyleRecord.Line.BThick&&null==t.polylist?t.StyleRecord.Line.Thickness:t.StyleRecord.Line.Thickness/2,e=t.CalcEffectSettings(t.Frame,t.StyleRecord,!1)),Utils2.InflateRect(t.r,i,i),e&&Utils2.Add2Rect(t.r,e.extent),t.DataID>=0&&(t.TextFlags&NvConstant.TextFlags.AttachB||t.TextFlags&NvConstant.TextFlags.AttachA)){const e=(e=>{if(null==e)return null;let i=T3Gv.opt.svgObjectLayer.GetElementById(e);if(null==i&&(i=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.ShapeContainer),i.SetID(t.BlockID),T3Gv.opt.svgObjectLayer.AddElement(i,0),t.LMAddSVGTextObject(T3Gv.opt.svgDoc,i)),i){const t=i.GetElementById(OptConstant.SVGElementClass.Text);if(t){const e=t.GetPos(),i=t.GetTextMinDimensions();return{x:e.x,y:e.y,width:i.width,height:i.height}}}return null})(t.BlockID);e&&(e.x+=t.Frame.x,e.y+=t.Frame.y,Utils2.UnionRect(t.r,e,t.r))}if(t.AddDimensionsToR(),0!==t.RotationAngle){let e,i,n={},s={x:0,y:0};s.x=t.Frame.x+t.Frame.width/2,s.y=t.Frame.y+t.Frame.height/2,Utils2.CopyRect(n,t.Frame),Utils2.CopyRect(t.Frame,t.r),LogUtil.Debug("= O.OptUtil  SetShapeR - Getting poly points for rotation"),e=new Instance.Shape.BaseDrawObject(t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),i=-t.RotationAngle/(180/NvConstant.Geometry.PI),Utils3.RotatePointsAboutPoint(s,i,e),Utils2.GetPolyRect(t.r,e),Utils2.CopyRect(t.Frame,n)}return LogUtil.Debug("= O.OptUtil  SetShapeR - Output: Bounding rectangle calculated",t.r),0}FindChildArrayByIndex(t,e,i,n){let s,a,o;LogUtil.Debug("= O.OptUtil  FindChildArrayByIndex - Input:",{parentId:t,resultInfo:e,hasLinksList:!!i,baseClass:n});const r=i||ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1);n=n||OptConstant.DrawObjectBaseClass.Connector;const l=OptCMUtil.FindLink(r,t,!0),h=r.length;if(l>=0)for(s=l;s<h&&r[s].targetid===t;s++)if(s>e.lindex&&(a=r[s].hookid,(o=ObjectUtil$1.GetObjectPtr(a,!1))&&o.DrawingObjectBaseClass===n))return e.lindex=s,e.id=a,e.hookpt=o.hooks[0].hookpt,LogUtil.Debug("= O.OptUtil  FindChildArrayByIndex - Output: Found child",a),a;return LogUtil.Debug("= O.OptUtil  FindChildArrayByIndex - Output: No child found (-1)"),-1}SetObjectFrame(t,e){LogUtil.Debug("= O.OptUtil  SetObjectFrame - Input:",{objectId:t,newFrame:e});const i=ObjectUtil$1.GetObjectPtr(t,!0);return null==i?(LogUtil.Debug("= O.OptUtil  SetObjectFrame - Output: Failed to get object (1)"),1):(OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),i.hooks.length&&OptCMUtil.SetLinkFlag(i.hooks[0].objid,DSConstant.LinkFlags.Move),i.UpdateFrame(e),LogUtil.Debug("= O.OptUtil  SetObjectFrame - Output: Frame updated successfully (0)"),0)}SetObjectAttributes(t,e){LogUtil.Debug("= O.OptUtil  SetObjectAttributes - Input:",{objectId:t,attributes:e});const i=T3Gv.stdObj.PreserveBlock(t);this.ApplyProperties(e,i.Data),LogUtil.Debug("= O.OptUtil  SetObjectAttributes - Output: Attributes applied")}ApplyProperties(t,e){LogUtil.Debug("= O.OptUtil  ApplyProperties - Input:",{sourceProperties:Object.keys(t),targetObject:e?e.constructor.name:null});for(const i in t){const n=e[i],s=t[i],a=typeof n;if(null==n){const t=typeof s;null==s||"string"===t||"number"===t||"boolean"===t?e[i]=s:s instanceof Array?e[i]=s.slice(0):s instanceof Blob||s instanceof Uint8Array?e[i]=s:"function"!==t&&(e[i]=Object.assign(new s.constructor,Utils1.DeepCopy(s)))}else if("string"===a||"number"===a||"boolean"===a)e[i]=s;else if(s instanceof Array)e[i]=s.slice(0);else if(s instanceof Blob||s instanceof Uint8Array)e[i]=s;else if("function"!==a){const t=Object.assign(new n.constructor,Utils1.DeepCopy(n));e[i]=t,this.ApplyProperties(s,t)}}LogUtil.Debug("= O.OptUtil  ApplyProperties - Output: Properties applied")}GetDrawingScale(t){LogUtil.Debug("= O.OptUtil  GetDrawingScale - Input:",t);const e=NvConstant.RulerUnit;let i=t.majorScale,n=t.major;switch(null==n&&(n=OptConstant.Common.DefaultRulerMajor),t.units){case e.Feet:i*=12;break;case e.Mm:i/=10;break;case e.M:i*=100}const s=i*(OptConstant.Common.DefaultRulerMajor/n);return LogUtil.Debug("= O.OptUtil  GetDrawingScale - Output:",s),s}GetCounterClockwiseAngleBetween2Points(t,e){LogUtil.Debug("= O.OptUtil  GetCounterClockwiseAngleBetween2Points - Input:",{startPoint:t,endPoint:e});const i=NvConstant.Geometry.PI,n=e.x-t.x,s=t.y-e.y;let a;return a=0===n?s>=0?i/2:-i/2:0===s?n>=0?0:i:Math.atan2(s,n),a<0&&(a+=2*i),LogUtil.Debug("= O.OptUtil  GetCounterClockwiseAngleBetween2Points - Output:",a),a}UndoEditMode(){LogUtil.Debug("= O.OptUtil  UndoEditMode - Input: No parameters");const t=this.editModeList||[];if(t.length>1){t.pop();const e=t[t.length-1];OptCMUtil.SetEditMode(e.mode,e.cursor,!1,!0)}LogUtil.Debug("= O.OptUtil  UndoEditMode - Output: Previous edit mode restored")}LineCheckPoint(t,e){LogUtil.Debug("= O.OptUtil  LineCheckPoint - Input:",{lineObject:t.BlockID,point:e});const i=Utils1.DeepCopy(e),n=[];n.push(new Point$1(t.StartPoint.x,t.StartPoint.y)),n.push(new Point$1(t.EndPoint.x,t.EndPoint.y));const s=0!==Utils3.LineDStyleHit(n,i,t.StyleRecord.Line.Thickness,0,0);return LogUtil.Debug("= O.OptUtil  LineCheckPoint - Output:",s),s}GetIntersectPt(t,e,i,n,s,a){let o,r,l,h,c,u,d,p,g,f,m,v,b,y=!1,S=!1;function x(t,e){return Math.abs(t.x-e.x)<.2}function w(t,e){return Math.abs(t.y-e.y)<.2}if(o=e.x-t.x,r=e.y-t.y,x(t,e)?(y=!0,p=e.x,l=1):w(t,e)?(g=e.y,l=0):l=r/o,f=t.x,m=t.y,h=n.x-i.x,c=n.y-i.y,x(i,n)?(S=!0,p=n.x,u=1):w(i,n)?(g=n.y,u=0):u=c/h,v=i.x,b=i.y,l===u||y&&S)return!1;if(!S&&!y){if(d=u-l,Math.abs(d)<1e-4)return!1;p=(m-b+u*v-l*f)/d}return y&&!S?g=b+u*(f-v):S&&!y?0===l&&s&&(g=n.y,g>=s.y&&g<=s.y+s.height||(g=-1)):u&&(g=m+l*(p-f)),a.x=p,a.y=g,!0}ArcCheckPoint(t,e){LogUtil.Debug("= O.OptUtil  ArcCheckPoint - Input:",{drawingObject:t.BlockID,testPoint:e});const i=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),n=0!==Utils3.LineDStyleHit(i,e,t.StyleRecord.lineThickness,0,null);return LogUtil.Debug("= O.OptUtil  ArcCheckPoint - Output:",n),n}LinesIntersect(t,e,i){LogUtil.Debug("= O.OptUtil  LinesIntersect - Input:",{line1:{start:t.StartPoint,end:t.EndPoint},line2:{start:e.StartPoint,end:e.EndPoint}});const n={x:i.x,y:i.y};return this.GetIntersectPt(t.StartPoint,t.EndPoint,e.StartPoint,e.EndPoint,e.Frame,n)&&n.x>=t.Frame.x&&n.x<=t.Frame.x+t.Frame.width&&n.y>=t.Frame.y&&n.y<=t.Frame.y+t.Frame.height?(i.x=n.x,i.y=n.y,LogUtil.Debug("= O.OptUtil  LinesIntersect - Output: Lines intersect at",i),!0):(LogUtil.Debug("= O.OptUtil  LinesIntersect - Output: Lines do not intersect"),!1)}InflateLine(t,e,i,n){let s,a,o,r,l;LogUtil.Debug("= O.OptUtil  InflateLine - Input:",{pointCount:t.length,thickness:e,isClosed:i,isOutward:n});let h=[],c=[],u={segmentsInserted:!1};function d(t,e){const i=e.x-t.x,n=e.y-t.y;return Utils2.Sqrt(i*i+n*n)}function p(t,e,i){const n=t-Math.PI/2;return t-=n,(e-=n)<0&&(e+=2*Math.PI),e>2*Math.PI&&(e-=2*Math.PI),Math.abs(t-e)<=i}function g(t,e){let i=[],n={x:0,y:0,width:0,height:0};for(i=Utils1.DeepCopy(t),Utils2.GetPolyRect(n,i),a=0;a<i.length;a++)i[a].x-=n.x,i[a].y-=n.y;const s=2*e,o=Math.max(n.width,n.height);if(s>o)return t;const r=(o+s)/o;for(a=0;a<i.length;a++)i[a].x*=r,i[a].y*=r,i[a].x+=n.x-e,i[a].y+=n.y-e;return i}function f(t,e,i,n,s){let a=[],o=d(t,e),r=d(t,i),l=o>0?r/o:0,h=d(n,s);a=[{x:n.x,y:n.y},{x:0,y:0},{x:s.x,y:s.y}];let c=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(n,s);return Utils3.RotatePointsAboutPoint(a[0],-c,a),a[1].y=a[0].y,a[2].x>a[0].x?a[1].x=a[0].x+h*l:a[1].x=a[0].x-h*l,Utils3.RotatePointsAboutPoint(a[0],c,a),a[1]}if(r=e/2,r<3?r=3:r>5&&(r=5),h=this.CalcPolyOutline(t,e,i,n,r,u),null===h||u.segmentsInserted){const i=g(t,n?e:-e);return LogUtil.Debug("= O.OptUtil  InflateLine - Output (fallback to scaling):",i.length),i}if(i&&h.push(new Point$1(h[0].x,h[0].y)),s=this.GetPolygonWindingDirection(t),-1===s&&n?h.reverse():1!==s||n||h.reverse(),null===this.CalcPolyOutline(h,e,i,!n,r,u)||u.segmentsInserted){const i=g(t,n?e:-e);return LogUtil.Debug("= O.OptUtil  InflateLine - Output (fallback after verification):",i.length),i}l=t.length;let m=h.length;for(;--m>0&&--l>0;){const e=this.GetCounterClockwiseAngleBetween2Points(h[m-1],h[m]);if(!p(this.GetCounterClockwiseAngleBetween2Points(t[l-1],t[l]),e,.01)){for(a=l-1;a>=0;a--){if(p(this.GetCounterClockwiseAngleBetween2Points(t[a],t[l]),e,.01)){for(o=c.length-1;o>=0;o--)h.splice(m,0,f(t[l],t[l-c.length],c[o],h[m],h[m-1]));l-=c.length,c=[];break}c.push(new Point$1(t[a].x,t[a].y))}if(c.length>0)break}}return h.length!==t.length&&(h=g(t,n?e:-e)),LogUtil.Debug("= O.OptUtil  InflateLine - Output:",h.length),h}CalcPolyOutline(t,e,i,n,s,a){let o,r,l,h,c,u,d,p;LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Input:",{pointCount:t.length,thickness:e,isClosed:i,isOutward:n,segmentStep:s});const g=[],f=[];let m=0;const v={x:0,y:0},b=1e5;if(t.length<2)return LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Insufficient points (null)"),null;let y=1;if(i){for(o=0;o<t.length-1;o++)t[o+1].x,t[o].x,t[o+1].y,t[o].y;y=this.GetPolygonWindingDirection(t)}if(n||(y=-y),y<1?(u=t.length-1,d=-1):(u=0,d=t.length),!e)return LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: No thickness, returning copy of input points"),Utils1.DeepCopy(t);for(m=0,c=u-y,s?h=s:(h=e/2,h<3?h=3:h>5&&(h=5)),o=u;o!=d;o+=y){if(c<0||c>t.length-1){if(!i){c=o;continue}c=c<0?t.length-1:0}if(o==d-y&&(h=2),Utils1.DeltaPoints(t[o],t[c])<h)continue;const n=new SegmentData;n.origSeg.start=Utils1.DeepCopy(t[c]),n.origSeg.end=Utils1.DeepCopy(t[o]),Utils1.CalcExtendedOffsetSegment(n,e,2,b),n.clipSeg.start=Utils1.DeepCopy(n.extSeg.start),n.clipSeg.end=Utils1.DeepCopy(n.extSeg.end),m>0&&n.angle==f[m-1].angle?(f[m-1].origSeg.end=Utils1.DeepCopy(n.origSeg.end),f[m-1].clipSeg.end=Utils1.DeepCopy(n.clipSeg.end),f[m-1].extSeg.end=Utils1.DeepCopy(n.extSeg.end),f[m-1].extSeg.endExt=Utils1.DeepCopy(n.extSeg.endExt),f[m-1].extSeg.endRay=Utils1.DeepCopy(n.extSeg.endRay)):(f.push(n),m++),c=o}if(!m)return LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: No segments created (null)"),null;if(1==m)return g.push(f[0].clipSeg.start),g.push(f[0].clipSeg.end),LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Single segment outline created",g),g;for(r=m-1,o=0;o<m;o++)i||0!==o?(Utils1.CompareAngle(f[o].angle,f[r].angle)>0&&(Utils1.CalcSegmentIntersect(f[r].clipSeg.start,f[r].extSeg.endExt,f[o].extSeg.startExt,f[o].clipSeg.end,v)?(f[r].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v)):Utils1.DeltaAngle(f[o].angle,f[r].angle)<15?(f[r].clipSeg.end.x=(f[r].extSeg.end.x+f[o].extSeg.start.x)/2,f[r].clipSeg.end.y=(f[r].extSeg.end.y+f[o].extSeg.start.y)/2,f[o].clipSeg.start=Utils1.DeepCopy(f[r].clipSeg.end)):(f[r].clipSeg.end=Utils1.DeepCopy(f[r].extSeg.endExt),f[o].clipSeg.start=Utils1.DeepCopy(f[o].extSeg.startExt),Utils1.InsertSegment(f,o,f[r].clipSeg.end,f[o].clipSeg.start,e,2,b),m++,o++,a.segmentsInserted=!0)),r=o):r=o;for(r=0,o=1;o<m;o++){if(p=!1,Utils1.AreSegmentsObtuse(f,m,o,r)&&Utils1.AreSegmentsAjacent(m,o,r))p=!0;else if(Utils1.CalcSegmentIntersect(f[r].clipSeg.start,f[r].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v))p=!0,f[r].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v);else if(Utils1.SegmentsInAlignment(f,m,o,r))p=!0,f[r].clipSeg.end.x=(f[r].clipSeg.end.x+f[o].clipSeg.start.x)/2,f[r].clipSeg.end.y=(f[r].clipSeg.end.y+f[o].clipSeg.start.y)/2,f[o].clipSeg.start=f[r].clipSeg.end;else if(r>0)for(l=r-1;l>=0&&!p&&!(l<0);)if(Utils1.IsEmptySeg(f[l].clipSeg))l--;else{if(o!=m-1&&Utils1.AreSegmentsObtuse(f,m,o,l))break;if(Utils1.CalcSegmentIntersect(f[l].clipSeg.start,f[l].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v)){r=l,f[l].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v),p=!0;break}if(Utils1.IsEnd(o,f.length,i)&&Utils1.DeltaAngle(f[o].angle,f[l].angle)>0&&Utils1.CalcSegmentIntersect(f[l].clipSeg.start,f[l].extSeg.endRay,f[o].clipSeg.start,f[o].clipSeg.end,v)){r=l,f[l].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v),p=!0;break}l--}if(p){for(l=r+1;l<o;)f[l].clipSeg.end=Utils1.DeepCopy(f[l].clipSeg.start),l++;r=o}else if(Utils1.IsEnd(o,f.length,i))for(f[r].clipSeg.end=Utils1.DeepCopy(f[o].extSeg.end),l=r+1;l<m;)f[l].clipSeg.end=Utils1.DeepCopy(f[l].clipSeg.start),l++;else f[o].clipSeg.end=Utils1.DeepCopy(f[o].clipSeg.start)}if(i){let t=-1,e=-1;for(o=0;o<m;o++)if(!Utils1.IsEmptySeg(f[o].clipSeg)){t=o;break}for(o=m-1;o>=0;o--)if(!Utils1.IsEmptySeg(f[o].clipSeg)){e=o;break}if(t>=0&&e>=0)for(p=!1,o=t;!p&&o<e;o++)if(r=e,Utils1.AreSegmentsObtuse(f,m,o,r)&&Utils1.AreSegmentsAjacent(m,o,r))p=!0;else if(Utils1.CalcSegmentIntersect(f[r].clipSeg.start,f[r].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v))p=!0,f[r].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v);else if(Utils1.SegmentsInAlignment(f,m,o,r))p=!0;else{for(l=r-1;l>o&&!p;)if(Utils1.IsEmptySeg(f[l].clipSeg))l--;else{if(Utils1.AreSegmentsObtuse(f,m,o,l))break;if(Utils1.CalcSegmentIntersect(f[l].clipSeg.start,f[l].clipSeg.end,f[o].clipSeg.start,f[o].clipSeg.end,v)){r=l,f[l].clipSeg.end=Utils1.DeepCopy(v),f[o].clipSeg.start=Utils1.DeepCopy(v),p=!0;break}l--}if(p)for(l=r+1;l<=e;)f[l].clipSeg.end=Utils1.DeepCopy(f[l].clipSeg.start),l++;else f[o].clipSeg.end=Utils1.DeepCopy(f[o].clipSeg.start)}}for(o=0;o<m;o++)Utils1.IsEmptySeg(f[o].clipSeg)||(0!==g.length&&f[o].clipSeg.start.x==g[g.length-1].x&&f[o].clipSeg.start.y==g[g.length-1].y||g.push(Utils1.DeepCopy(f[o].clipSeg.start)),g.push(Utils1.DeepCopy(f[o].clipSeg.end)));for(;g.length>1&&Utils1.DeltaPoints(g[g.length-1],g[0])<3;)g.splice(g.length-1,1);return g.length<2&&!i||g.length<3&&i?(LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Insufficient output points (null)"),null):(LogUtil.Debug("= O.OptUtil  CalcPolyOutline - Output: Outline created with",g.length,"points"),g)}GetPolygonWindingDirection(t){LogUtil.Debug("= O.OptUtil  GetPolygonWindingDirection - Input:",{pointCount:t.length});let e=0;for(let n=0;n<t.length-1;n++)e+=(t[n+1].x-t[n].x)*(t[n+1].y+t[n].y);const i=e>0?-1:1;return LogUtil.Debug("= O.OptUtil  GetPolygonWindingDirection - Output:",i),i}GetTargetList(t,e,i,n,s){let a,o,r,l;LogUtil.Debug("= O.OptUtil  GetTargetList - Input:",{objectId:t,linksListLength:null==e?void 0:e.length,targetListLength:null==i?void 0:i.length,hasBoundingRect:!!n,listCode:s});let h=NvConstant.ListCodes.MoveHook;if(s===NvConstant.ListCodes.MoveTargAndLines&&(h=s),a=ObjectUtil$1.GetObjectPtr(t,!1),null==a)return LogUtil.Debug("= O.OptUtil  GetTargetList - Output: Source object not found, returning original list"),i;HookUtil.FixAnyCircularHooks(a);for(let c=0;c<a.hooks.length;c++){if(l=a.hooks[c].objid,i.indexOf(l)<0&&(i.push(l),n&&(o=ObjectUtil$1.GetObjectPtr(l,!1),!(o.flags&NvConstant.ObjFlags.NotVisible)))){const t=o.GetMoveRect(!0,!0);n=Utils2.UnionRect(n,t,n)}r=OptCMUtil.FindLink(e,l,!0),r>=0&&(i=HookUtil.AddToHookList(e,i,r,l,h,1,n)),i=this.GetTargetList(l,e,i,n,s)}return LogUtil.Debug("= O.OptUtil  GetTargetList - Output: Returning list with",i.length,"targets"),i}GetClockwiseAngleBetween2PointsInDegrees(t,e){LogUtil.Debug("= O.OptUtil  GetClockwiseAngleBetween2PointsInDegrees - Input:",{startPoint:t,endPoint:e});const i=NvConstant.Geometry.PI;let n,s,a;n=e.x-t.x,s=e.y-t.y,a=0===n?s>=0?i/2:-i/2:0===s?n>=0?0:i:Math.atan2(s,n),a<0&&(a+=2*i);const o=a*(180/i);return LogUtil.Debug("= O.OptUtil  GetClockwiseAngleBetween2PointsInDegrees - Output:",o),o}NormalizeAngle(t,e){return LogUtil.Debug("= O.OptUtil  NormalizeAngle - Input:",{angle:t,adjustment:e}),(t+=e)>=2*NvConstant.Geometry.PI&&(t-=2*NvConstant.Geometry.PI),t<0&&(t+=2*NvConstant.Geometry.PI),LogUtil.Debug("= O.OptUtil  NormalizeAngle - Output:",t),t}GetShapeParams(t,e){let i;LogUtil.Debug("= O.OptUtil  GetShapeParams - Input:",{shapeType:t,shapeDimensions:e});let n=!1,s=0;switch(t){case PolygonConstant.ShapeTypes.RECTANGLE:case PolygonConstant.ShapeTypes.OVAL:case PolygonConstant.ShapeTypes.ROUNDED_RECTANGLE:break;case PolygonConstant.ShapeTypes.CIRCLE:n=!0;break;case PolygonConstant.ShapeTypes.DIAMOND:i=PolygonUtil.generateDiamond;break;case PolygonConstant.ShapeTypes.TRIANGLE:i=PolygonUtil.generateTriangle;break;case PolygonConstant.ShapeTypes.TRIANGLE_BOTTOM:i=PolygonUtil.generateTriangleDown;break;case PolygonConstant.ShapeTypes.PARALLELOGRAM:s=.13333*e.width,i=PolygonUtil.generateParallelogram;break;case PolygonConstant.ShapeTypes.PENTAGON:s=.4*e.height,i=PolygonUtil.generatePentagon,n=!1;break;case PolygonConstant.ShapeTypes.PENTAGON_LEFT:s=.4*e.width,i=PolygonUtil.generatePentagonLeft,n=!1;break;case PolygonConstant.ShapeTypes.HEXAGON:s=.26*e.width,i=PolygonUtil.generateHexagon,n=!1;break;case PolygonConstant.ShapeTypes.OCTAGON:s=.28,i=PolygonUtil.generateOctagon,n=!1;break;case PolygonConstant.ShapeTypes.ARROW_RIGHT:s=.3*e.width,i=PolygonUtil.generateRightArrow;break;case PolygonConstant.ShapeTypes.ARROW_LEFT:s=.3*e.width,i=PolygonUtil.generateLeftArrow;break;case PolygonConstant.ShapeTypes.ARROW_TOP:s=.3*e.height,i=PolygonUtil.generateTopArrow;break;case PolygonConstant.ShapeTypes.ARROW_BOTTOM:s=.3*e.height,i=PolygonUtil.generateBottomArrow;break;case PolygonConstant.ShapeTypes.TRAPEZOID:s=.2*e.width,i=PolygonUtil.generateTrapezoid;break;case PolygonConstant.ShapeTypes.TRAPEZOID_BOTTOM:s=.2*e.width,i=PolygonUtil.generateTrapezoidDown;break;case PolygonConstant.ShapeTypes.INPUT:s=.27*e.height,i=PolygonUtil.generateInput;break;case PolygonConstant.ShapeTypes.TERMINAL:i=PolygonUtil.generateTerminal;break;case PolygonConstant.ShapeTypes.STORAGE:s=e.width/7.5,i=PolygonUtil.generateStorage;break;case PolygonConstant.ShapeTypes.DOCUMENT:i=PolygonUtil.generateDocument,s=e.height/7.5;break;case PolygonConstant.ShapeTypes.DELAY:s=e.width/5,i=PolygonUtil.generateDelay;break;case PolygonConstant.ShapeTypes.DISPLAY:s=e.width/7.5,i=PolygonUtil.generateDisplay}const a={dataclass:t,shapeparam:s,polyVectorMethod:i,bCircularize:n};return LogUtil.Debug("= O.OptUtil  GetShapeParams - Output:",a),a}AddtoDelete(t,e,i){let n;LogUtil.Debug("= O.OptUtil  AddtoDelete - Input:",{objectIds:t,isForced:e,additionalData:i});let s,a,o,r,l,h=t.length,c=OptConstant.ConnectorDefines,u=0;for(n=0;n<h;n++)if(s=ObjectUtil$1.GetObjectPtr(t[n],!1),null!=s)if(a=t[n],s instanceof Instance.Shape.ShapeContainer&&this.ContainerAddtoDelete(s,t),s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)s.IsFlowChartConnector&&s.IsFlowChartConnector()?(s.objecttype,OptAhUtil.GetConnectorTree(t[n],t)):(OptAhUtil.GetConnectorTree(t[n],t),h=t.length,e&&s.hooks.length&&(r=ObjectUtil$1.GetObjectPtr(s.hooks[0].objid,!1),r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&t.indexOf(s.hooks[0].objid)<0&&t.push(s.hooks[0].objid)));else{let i=!1;if(o=OptAhUtil.GetParentConnector(t[n],null),o>=0){if(r=ObjectUtil$1.GetObjectPtr(o,!1),r){let h={};if(this.IsConnectorEndShape(s,r,h)){if(void 0===l&&(l=h.nshapes),t.indexOf(o)<0)l-u>1||h.pasted||e?(t.push(o),r.extraflags&OptConstant.ExtraFlags.NoDelete&&(r.extraflags=Utils2.SetFlag(r.extraflags,OptConstant.ExtraFlags.NoDelete,!1)),OptAhUtil.GetConnectorTree(o,t),h.pasted||u++):t.splice(n,1);else if(h.nshapes<=1&&!h.pasted&&!e){t.splice(n,1);let e=t.indexOf(o);e>=0&&t.splice(e,1)}if(r.IsFlowChartConnector&&r.IsFlowChartConnector()){let e=T3Gv.opt.FindChildArray(t[n],-1);ObjectUtil$1.GetObjectPtr(e,!1)}else if(r.arraylist.styleflags&OptConstant.AStyles.CoManager)if(e){a=r.arraylist.hook[c.NSkip].id,t.indexOf(o)<0&&t.push(o);let e=r.arraylist.hook.length;for(let i=c.NSkip;i<e;i++){let e=r.arraylist.hook[i].id;t.indexOf(e)<0&&t.push(e)}}else{let e=r.arraylist.hook.length;for(let n=c.NSkip;n<e;n++){let e=r.arraylist.hook[n].id;if(t.indexOf(e)<0){i=!0;break}}}else 0===r.hooks.length&&T3Gv.opt.CN_GetNShapes(o)<=1&&-1===t.indexOf(o)&&t.push(o)}}}else{let s;s=1,e||(i=!0);let a=-1;for(let e=0;e<s;e++){let e=T3Gv.opt.FindChildArray(t[n],a);if(e>=0){let n=ObjectUtil$1.GetObjectPtr(e,!0);if(n&&n.arraylist&&(n.arraylist.hook.length<=c.SEDA_NSkip||n.flags&NvConstant.ObjFlags.NotVisible)&&(i=!1),n.IsGenoConnector&&n.IsGenoConnector()){i=!1;let s=-1,a=n.arraylist.hook.length;for(let e=c.SEDA_NSkip;e<a;e++){let a=n.arraylist.hook[e].id;if(t.indexOf(a)<0){if(ObjectUtil$1.GetObjectPtr(a,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){i=!0;break}ObjectUtil$1.GetObjectPtr(a,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(s=a)}}i||(t.indexOf(e)<0&&t.push(e),s>=0&&t.indexOf(s)<0&&t.push(s),i=!0)}n.flags=Utils2.SetFlag(n.flags,NvConstant.ObjFlags.Obj1,!0),OptCMUtil.SetLinkFlag(e,DSConstant.LinkFlags.Move)}a=e}}if(!i){let i=HookUtil.FindAllChildConnectors(a).length,n=HookUtil.FindAllChildConnectors(a);for(let e=0;e<i;e++){let i=ObjectUtil$1.GetObjectPtr(n[e],!1);i&&i.IsFlowChartConnector&&i.IsFlowChartConnector()||OptAhUtil.GetConnectorTree(n[e],t)}if(s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&!e){let e=[],i=this.HealLine(s,!1,e);if(i>=0){t.indexOf(i)<0&&t.push(i);for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i])}}if(s.associd>=0){let e=!1,i=ObjectUtil$1.GetObjectPtr(s.associd,!1);i&&(i.hooks.length&&i.hooks[0].hookpt===OptConstant.HookPts.KATD&&(e=!0),i.objecttype!==NvConstant.FNObjectTypes.NgEvent&&i.objecttype!==NvConstant.FNObjectTypes.NgEventLabel&&t.indexOf(s.associd)<0&&t.push(s.associd)),e&&t.indexOf(s.associd)<0&&t.push(s.associd)}if(s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Line){let e=SelectUtil.FindAllChildObjects(s.BlockID,OptConstant.DrawObjectBaseClass.Shape,NvConstant.FNObjectTypes.Multiplicity);if(e&&e.length)for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i])}if(!e){let e=SelectUtil.FindAllChildObjects(s.BlockID,OptConstant.DrawObjectBaseClass.Line,null);if(e&&e.length)for(let i=0;i<e.length;i++)t.indexOf(e[i])<0&&t.push(e[i])}}}return LogUtil.Debug("= O.OptUtil  AddtoDelete - Output:",{objectIds:t,helperValue:-1}),-1}HealLine(t,e,i){let n,s,a,o,r,l,h,c,u,d,p,g,f,m,v,b,y=[],S=[],x=[];const w=ObjectUtil$1.GetObjectPtr(this.linksBlockId,!1);let C=-1,T=-1,D=!1,k=!1,$=[];const O=OptConstant.HookPts,P=function(t,e,i,n,s,a){let o,r,l,h,c=[],u=[];if(o=t.segl.pts.length,r=e.segl.pts.length,l=Utils2.IsEqual(i.y,n.y,.1)?Math.abs(i.x-n.x):Math.abs(i.y-n.y),a)for(h=2;h<r;h++){let t=Utils2.IsEqual(e.segl.pts[h].y,e.segl.pts[h-1].y)?Math.abs(e.segl.pts[h].x-e.segl.pts[h-1].x):Math.abs(e.segl.pts[h].y-e.segl.pts[h-1].y);u.push(t)}else for(h=r-2;h>0;h--){let t=Utils2.IsEqual(e.segl.pts[h].y,e.segl.pts[h-1].y)?Math.abs(e.segl.pts[h].x-e.segl.pts[h-1].x):Math.abs(e.segl.pts[h].y-e.segl.pts[h-1].y);u.push(t)}if(s){for(h=u.length-1;h>=0;h--)c.push(u[h]);for(c.push(l),h=2;h<o;h++){let e=Utils2.IsEqual(t.segl.pts[h].y,t.segl.pts[h-1].y)?Math.abs(t.segl.pts[h].x-t.segl.pts[h-1].x):Math.abs(t.segl.pts[h].y-t.segl.pts[h-1].y);c.push(e)}}else{for(h=1;h<o-1;h++){let e=Utils2.IsEqual(t.segl.pts[h].y,t.segl.pts[h-1].y)?Math.abs(t.segl.pts[h].x-t.segl.pts[h-1].x):Math.abs(t.segl.pts[h].y-t.segl.pts[h-1].y);c.push(e)}c.push(l);for(let t=0;t<u.length;t++)c.push(u[t])}return c},L=function(t,e){let i,n=e.length,s=t.segl.pts.length-1;for(5===s&&(e[2]=e[4]),i=0;i<n&&i<=s;i++)t.segl.lengths[i]=e[i]};if(r=OptCMUtil.FindLink(w,t.BlockID,!0),d=t.BlockID,r<0)return-1;HookUtil.AddToHookList(w,y,r,t.BlockID,NvConstant.ListCodes.TopOnly,1,{});let I=n=y.length;for(s=0;s<n;s++)if(a=ObjectUtil$1.GetObjectPtr(y[s],!1),a.AllowHeal()){S.push(y[s]);const t=a.hooks.length;for(let e=0;e<t;e++)a.hooks[e].objid===d&&(a.hooks[e].connect,a.hooks[e].hookpt===O.KTL?x.push(a.segl.firstdir):x.push(a.segl.lastdir))}if((n=S.length)>=2&&n<4)for(s=0;s<n;s++){switch(x[s]){case O.KTC:p=S[s],void 0!==g&&(S[0]=p,S[1]=g,n=2,D=!0);break;case O.KBC:g=S[s],void 0!==p&&(S[0]=p,S[1]=g,n=2,D=!0);break;case O.KLC:f=S[s],void 0!==m&&(S[0]=f,S[1]=m,n=2,D=!0);break;case O.KRC:m=S[s],void 0!==f&&(S[0]=f,S[1]=m,n=2,D=!0)}if(D)break}if(e&&D)return 1;if(D){if(a=ObjectUtil$1.GetObjectPtr(S[0],!0),o=ObjectUtil$1.GetObjectPtr(S[1],!0),1===a.hooks.length&&2===o.hooks.length){let t=S[0];S[0]=S[1],S[1]=t,a=ObjectUtil$1.GetObjectPtr(S[0],!0),o=ObjectUtil$1.GetObjectPtr(S[1],!0)}let e,r=Utils2.Pt2Rect(a.StartPoint,a.EndPoint),d=Utils2.Pt2Rect(o.StartPoint,o.EndPoint),p=T3Gv.opt.GetPolyLineLinks(S[0],0),g=T3Gv.opt.GetPolyLineLinks(S[1],0);for(n=a.hooks.length,s=0;s<n;s++)a.hooks[s].objid!=t.BlockID?C=a.hooks[s].objid:c=s;for(n=o.hooks.length,s=0;s<n;s++)o.hooks[s].objid!=t.BlockID?T=o.hooks[s].objid:u=s;if(C>=0&&T>=0&&C!=T){if(o.hooks[u].hookpt===O.KTL){l=o.segl.firstdir,h=o.StartPoint,k=!1,b={x:o.StartPoint.x,y:o.StartPoint.y};const t=o.segl.pts.length;t>2&&(b.x=d.x+o.segl.pts[t-2].x,b.y=d.y+o.segl.pts[t-2].y)}else l=o.segl.lastdir,h=o.EndPoint,k=!0,b={x:o.StartPoint.x,y:o.StartPoint.y},b.x=d.x+o.segl.pts[1].x,b.y=d.y+o.segl.pts[1].y;if(a.hooks[c].hookpt===O.KTL)v={x:a.StartPoint.x,y:a.StartPoint.y},v.x=r.x+a.segl.pts[1].x,v.y=r.y+a.segl.pts[1].y,$=P(a,o,v,b,!0,k),a.segl.firstdir=l,a.StartPoint.x=h.x,a.StartPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0);else{v={x:a.StartPoint.x,y:a.StartPoint.y};const t=a.segl.pts.length;t>2&&(v.x=r.x+a.segl.pts[t-2].x,v.y=r.y+a.segl.pts[t-2].y),$=P(a,o,v,b,!1,k),a.segl.lastdir=l,a.EndPoint.x=h.x,a.EndPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0)}if(2===I){let e;e=Utils2.IsEqual(v.y,b.y,2)?OptConstant.ActionArrow.Right:OptConstant.ActionArrow.Down,OptAhUtil.ShiftConnectedShapes(t.BlockID,T,a.BlockID,e,!1)}return a.CalcFrame(),this.FilterLinks(p,g,i),g&&g.length&&HookUtil.MoveLinks(S[0],S[1],g,null),p&&p.length&&HookUtil.MoveLinks(S[0],S[0],p,null),a.hoplist.hops=[],a.hoplist.nhops=0,ObjectUtil$1.AddToDirtyList(S[0]),HookUtil.UpdateHook(S[0],c,T,a.hooks[c].hookpt,o.hooks[u].connect,o.hooks[u].cellid),OptCMUtil.SetLinkFlag(o.hooks[u].objid,DSConstant.LinkFlags.Move),this.UpdateLinks(),S[1]}if(C>=0&&T<0){if(o.hooks[0].hookpt===O.KTL)l=o.segl.lastdir,h=o.EndPoint,k=!0,b={x:o.StartPoint.x,y:o.StartPoint.y},b.x=d.x+o.segl.pts[1].x,b.y=d.y+o.segl.pts[1].y;else{l=o.segl.firstdir,h=o.StartPoint,k=!1,b={x:o.StartPoint.x,y:o.StartPoint.y};const t=o.segl.pts.length;t>2&&(b.x=d.x+o.segl.pts[t-2].x,b.y=d.y+o.segl.pts[t-2].y)}if(a.hooks[c].hookpt===O.KTL)v={x:a.StartPoint.x,y:a.StartPoint.y},v.x=r.x+a.segl.pts[1].x,v.y=r.y+a.segl.pts[1].y,$=P(a,o,v,b,!0,k),a.segl.firstdir=l,a.StartPoint.x=h.x,a.StartPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0),a.CalcFrame(),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineStart,0);else{v={x:a.StartPoint.x,y:a.StartPoint.y};const t=a.segl.pts.length;t>2&&(v.x=r.x+a.segl.pts[t-2].x,v.y=r.y+a.segl.pts[t-2].y),$=P(a,o,v,b,!1,k),a.segl.lastdir=l,a.EndPoint.x=h.x,a.EndPoint.y=h.y,a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0),a.CalcFrame(),L(a,$),a.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0)}return this.FilterLinks(p,g,i),g&&g.length&&HookUtil.MoveLinks(S[0],S[1],g,null),p&&p.length&&HookUtil.MoveLinks(S[0],S[0],p,null),a.hoplist.hops=[],a.hoplist.nhops=0,HookUtil.UpdateHook(S[0],c,-1,a.hooks[c].hookpt,a.hooks[c].connect,a.hooks[c].cellid),ObjectUtil$1.AddToDirtyList(S[0]),S[1]}if(e=function(t,e,i,n){let s,a,o=new Instance.Shape.SegLine,r=Utils2.Pt2Rect(t.StartPoint,t.EndPoint);if(a=t.segl.pts.length,e===O.KTL){for(s=a-1;s>0;s--)o.pts.push({x:t.segl.pts[s].x+r.x,y:t.segl.pts[s].y+r.y});o.firstdir=t.segl.lastdir}else{for(s=0;s<a-1;s++)o.pts.push({x:t.segl.pts[s].x+r.x,y:t.segl.pts[s].y+r.y});o.firstdir=t.segl.firstdir}if(a=i.segl.pts.length,d=Utils2.Pt2Rect(i.StartPoint,i.EndPoint),n===O.KTR){for(s=a-2;s>=0;s--)o.pts.push({x:i.segl.pts[s].x+d.x,y:i.segl.pts[s].y+d.y});o.lastdir=i.segl.firstdir}else{for(s=1;s<a;s++)o.pts.push({x:i.segl.pts[s].x+d.x,y:i.segl.pts[s].y+d.y});o.lastdir=i.segl.lastdir}for(a=o.pts.length,s=1;s<a;s++)o.pts[s].x==o.pts[s-1].x?o.lengths.push(Math.abs(o.pts[s].y-o.pts[s-1].y)):o.lengths.push(Math.abs(o.pts[s].x-o.pts[s-1].x));return o}(o,o.hooks[0].hookpt,a,a.hooks[0].hookpt),o.hooks[0].hookpt===O.KTL){let t=o.EndArrowID;o.EndArrowID=o.StartArrowID,o.StartArrowID=t,t=o.EndArrowDisp,o.EndArrowDisp=o.StartArrowDisp,o.StartArrowDisp=t}o.hoplist.hops=[],o.hoplist.nhops=0,o.segl=e,pointCount=e.pts.length,o.StartPoint.x=e.pts[0].x,o.StartPoint.y=e.pts[0].y,o.EndPoint.x=e.pts[pointCount-1].x,o.EndPoint.y=e.pts[pointCount-1].y;const f=Utils2.Pt2Rect(o.StartPoint,o.EndPoint);for(s=0;s<pointCount;s++)o.segl.pts[s].x-=f.x,o.segl.pts[s].y-=f.y;return o.CalcFrame(),h=o.EndPoint,o.SegLFormat(h,OptConstant.ActionTriggerType.LineEnd,0),o.CalcFrame(),this.FilterLinks(g,p,i),p&&p.length&&HookUtil.MoveLinks(S[1],S[0],p,null),g&&g.length&&HookUtil.MoveLinks(S[1],S[1],g,null),HookUtil.UpdateHook(S[1],u,-1,o.hooks[u].hookpt,o.hooks[u].connect,o.hooks[u].cellid),ObjectUtil$1.AddToDirtyList(S[1]),S[0]}return-1}SetVirtualKeyboardLifter(t){}VirtualKeyboardLifter(t,e){if(LogUtil.Debug("= O.OptUtil  VirtualKeyboardLifter - Input:",{element:t,isActive:e}),e){const e=t.CalcElementFrame();{let t=T3Gv.docUtil.DocObject().ConvertDocToWindowCoords(e.x,e.y),i=T3Gv.docUtil.DocObject().ConvertDocToWindowLength(e.width);0===i&&(i=1);let n=T3Gv.docUtil.DocObject().ConvertDocToWindowLength(e.height);0===n&&(n=1),T3Gv.opt.workAreaTextInputProxy.css("visibility","visible"),T3Gv.opt.workAreaTextInputProxy.css("opacity","0"),T3Gv.opt.workAreaTextInputProxy.css("color","transparent"),T3Gv.opt.workAreaTextInputProxy.css("z-index","-1000"),T3Gv.opt.workAreaTextInputProxy.css("text-align","left"),t.x=-9999,i=800,T3Gv.opt.workAreaTextInputProxy.css("left",t.x+"px"),T3Gv.opt.workAreaTextInputProxy.css("top",t.y+"px"),T3Gv.opt.workAreaTextInputProxy.css("width",i+"px"),T3Gv.opt.workAreaTextInputProxy.css("height",n+"px"),T3Gv.opt.workAreaTextInputProxy.val(""),T3Gv.opt.workAreaTextInputProxy.focus()}}else T3Gv.opt.workAreaTextInputProxy.css("visibility","visible"),T3Gv.opt.workAreaTextInputProxy.blur(),T3Gv.opt.workAreaTextInputProxy.val(""),T3Gv.opt.workAreaTextInputProxy.css("visibility","hidden");LogUtil.Debug("= O.OptUtil  VirtualKeyboardLifter - Output: completed")}AddAssoctoList(t,e){LogUtil.Debug("= O.OptUtil  AddAssoctoList - Input:",{listOfObjectIds:t,skipContainerParents:e});let i=[];const n=t.length,s=NvConstant.FNObjectTypes;for(let a=0;a<n;a++){const n=t[a],o=ObjectUtil$1.GetObjectPtr(n,!1);if(!(e&&OptAhUtil.HasContainerParent(o)||(o.objecttype,i.indexOf(n)<0&&i.push(n),o&&o.associd>=0&&ObjectUtil$1.GetObjectPtr(o.associd,!1)&&i.indexOf(o.associd)<0&&i.push(o.associd),o.objecttype!==s.ShapeContainer)))T3Gv.opt.ContainerAddtoDelete(o,i)}return LogUtil.Debug("= O.OptUtil  AddAssoctoList - Output:",i),i}ShowLoading(t){}IsLinkedOutside(t){LogUtil.Debug("= O.OptUtil  IsLinkedOutside - Input:",{linkedObjectIds:t});const e=LayerUtil.ZList();for(let i=0;i<t.length;i++){const n=ObjectUtil$1.GetObjectPtr(t[i],!1);for(let i=0;i<e.length;i++){const s=ObjectUtil$1.GetObjectPtr(e[i],!1);if(s.associd===n.BlockID&&-1===t.indexOf(s.BlockID))return LogUtil.Debug("= O.OptUtil  IsLinkedOutside - Output:",!0),!0}}return LogUtil.Debug("= O.OptUtil  IsLinkedOutside - Output:",!1),!1}IsGroupNonDelete(){LogUtil.Debug("= O.OptUtil  IsGroupNonDelete - Input: no parameters");const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.selectObjsBlockId,!1);let e=null;for(let i=0;i<t.length;i++)if(e=ObjectUtil$1.GetObjectPtr(t[i],!1),e.extraflags&OptConstant.ExtraFlags.NoDelete)return LogUtil.Debug("= O.OptUtil  IsGroupNonDelete - Output: true"),!0;return LogUtil.Debug("= O.OptUtil  IsGroupNonDelete - Output: false"),!1}GetListSRect(t,e,i){let n;LogUtil.Debug("= O.OptUtil  GetListSRect - Input:",{objectIdList:t,useFrame:e,useDragRectangle:i});const s=NvConstant.ObjFlags.NotVisible;for(let a=0;a<t.length;a++){const o=t[a],r=ObjectUtil$1.GetObjectPtr(o,!1);if(null!=r){const t=e?r.Frame:i?r.GetDragR():r.r;r&&0==(r.flags&s)&&(void 0===n?(n={},Utils2.CopyRect(n,t)):Utils2.UnionRect(t,n,n))}}return LogUtil.Debug("= O.OptUtil  GetListSRect - Output:",n),n}FindParentGroup(t,e){let i,n;LogUtil.Debug("= O.OptUtil  FindParentGroup - Input:",{targetId:t,currentGroup:e});const s=(e=e||null)?e.ShapesInGroup:LayerUtil.ZList();for(n=0;n<s.length;n++){if(s[n]===t)return LogUtil.Debug("= O.OptUtil  FindParentGroup - Output:",e),e;if(i=ObjectUtil$1.GetObjectPtr(s[n],!1),i instanceof Instance.Shape.GroupSymbol&&i.ShapesInGroup){const e=T3Gv.opt.FindParentGroup(t,i);if(e)return LogUtil.Debug("= O.OptUtil  FindParentGroup - Output:",e),e}}return LogUtil.Debug("= O.OptUtil  FindParentGroup - Output: null"),null}RebuildLinks(t,e){LogUtil.Debug("= O.OptUtil  RebuildLinks - Input:",{linkList:t,objectId:e});const i=ObjectUtil$1.GetObjectPtr(e,!1);if(i&&i.hooks){const n=i.hooks.length;for(let i=0;i<n;i++)T3Gv.opt.InsertLink(t,e,i,DSConstant.LinkFlags.Move)}LogUtil.Debug("= O.OptUtil  RebuildLinks - Output: Completed")}GetBlobImages(t,e){let i,n;LogUtil.Debug("= O.OptUtil  GetBlobImages - Input:",{objectIdsCount:t.length,blobMapSize:Object.keys(e).length});let s=null,a=null,o=t.length;for(n=0;n<o;++n)s=ObjectUtil$1.GetObjectPtr(t[n],!1),s.ShapeType==OptConstant.ShapeType.GroupSymbol?s.ShapesInGroup&&s.ShapesInGroup.length&&this.GetBlobImages(s.ShapesInGroup,e):(i="",s.ImageURL?i=s.ImageURL:s.SymbolURL&&(i=s.SymbolURL),i&&(a=s.GetBlobBytes(),a&&!e[i]&&(e[i]=a)));LogUtil.Debug("= O.OptUtil  GetBlobImages - Output:",{processedObjects:o,blobMapSize:Object.keys(e).length})}GetSRect(t,e,i){LogUtil.Debug("= O.OptUtil  GetSRect - Input:",{excludeTitleBlocks:t,hasFrameDetails:!!e,objectList:i?i.length:"undefined"});const n=NvConstant.ObjFlags.NotVisible,s=NvConstant.TextFlags.TitleBlock,a=i||LayerUtil.VisibleZList(),o=a.length;let r,l,h,c;for(let u=0;u<o;u++)l=ObjectUtil$1.GetObjectPtr(a[u],!1),null!=l&&(h=!1,t&&l.TextFlags&s&&(h=!0),l&&0==(l.flags&n)&&!h&&(c=Utils1.DeepCopy(l.r),void 0===r?(r=c,e&&(e.x=l.Frame.x,e.y=l.Frame.y,e.width=l.Frame.width,e.height=l.Frame.height)):Utils2.UnionRect(c,r,r)));return LogUtil.Debug("= O.OptUtil  GetSRect - Output:",r),r}GetAutomationContext(t){LogUtil.Debug("= O.OptUtil  GetAutomationContext - Input:",t),ObjectUtil$1.GetObjectPtr(this.sdDataBlockId,!1);let e=DSConstant.Contexts.Automation;return t&&(e=t.GetAutomationContext()),e===DSConstant.Contexts.Automation&&(e=DSConstant.Contexts.Automation),LogUtil.Debug("= O.OptUtil  GetAutomationContext - Output:",e),e}RestorePrimaryStateManager(){LogUtil.Debug("= O.OptUtil  RestorePrimaryStateManager - Input: no parameters"),T3Gv.bIsPrimaryStateManager||SvgUtil.RenderAllSVGObjects(),LogUtil.Debug("= O.OptUtil  RestorePrimaryStateManager - Output: Primary state manager restored")}LinesMaintainDistWithinSegment(t,e,i,n){LogUtil.Debug("= O.OptUtil : LinesMaintainDistWithinSegment inputs:",{targetLine:t.BlockID||"unknown",sourceLine:e.BlockID||"unknown",segmentIndex:i,point:{x:n.x,y:n.y}});var s={},a=e.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null);Utils2.GetPolyRect(s,a);var o=360-Utils1.CalcAngleFromPoints(a[i-1],a[i]),r=2*Math.PI*(o/360);Utils3.RotatePointsAboutCenter(s,-r,a);var l=[n];Utils3.RotatePointsAboutCenter(s,-r,l);var h=a[i].x-a[i-1].x,c=(n.x-a[i-1].x)/h,u=n.y-a[i-1].y;Utils3.RotatePointsAboutCenter(s,r,l);var d=t.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),p=360-Utils1.CalcAngleFromPoints(d[i-1],d[i]),g=2*Math.PI*(p/360);Utils2.GetPolyRect(s,d),Utils3.RotatePointsAboutCenter(s,-g,d),Utils3.RotatePointsAboutCenter(s,-g,l);var f=(d[i].x-d[i-1].x)*c;return l[0].x=d[i-1].x+f,l[0].y=d[i-1].y+u,Utils3.RotatePointsAboutCenter(t.Frame,g,l),n=l[0],LogUtil.Debug("= O.OptUtil : LinesMaintainDistWithinSegment output:",{point:{x:n.x,y:n.y}}),n}HandleObjectDragDoAutoScroll(){LogUtil.Debug("= O.OptUtil  HandleObjectDragDoAutoScroll - Input: Starting auto-scroll"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleObjectDragDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);T3Gv.docUtil.ScrollToPosition(t.x,t.y),this.HandleObjectDragMoveCommon(t.x,t.y),LogUtil.Debug("= O.OptUtil  HandleObjectDragDoAutoScroll - Output: Position updated",t)}HandleObjectDragMoveCommon(t,e,i,n){LogUtil.Debug("= O.OptUtil  HandleObjectDragMoveCommon - Input:",{mouseX:t,mouseY:e,skipScrolling:i,event:n});const s=()=>{T3Gv.opt.dragDeltaX<-T3Gv.opt.moveBounds.x&&(T3Gv.opt.dragDeltaX=-T3Gv.opt.moveBounds.x),T3Gv.opt.dragDeltaY<-T3Gv.opt.moveBounds.y&&(T3Gv.opt.dragDeltaY=-T3Gv.opt.moveBounds.y)};if(T3Gv.opt.pinRect){const i={x:t,y:e};this.PinMoveRect(i),t=i.x,e=i.y}T3Gv.opt.dragDeltaX=t-T3Gv.opt.dragStartX,T3Gv.opt.dragDeltaY=e-T3Gv.opt.dragStartY,s();let a={x:T3Gv.opt.dragDeltaX+T3Gv.opt.moveBounds.x+T3Gv.opt.moveBounds.width,y:T3Gv.opt.dragDeltaY+T3Gv.opt.moveBounds.y+T3Gv.opt.moveBounds.height};a=DrawUtil.DoAutoGrowDrag(a);const o=T3Gv.opt.moveList,r=o?o.length:0;if(0===r)return void LogUtil.Debug("= O.OptUtil  HandleObjectDragMoveCommon - Output: No objects to move");let l=0,h=null,c=null,u={x:t,y:e},d={x:0,y:0},p={x:0,y:0},g=T3Gv.opt.linkParams&&(T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.JoinIndex>=0)||i;const f=T3Gv.opt.EnhanceSnaps(n);T3Gv.opt.OverrideSnaps(n)&&(g=!0);let m=ObjectUtil$1.GetObjectPtr(T3Gv.opt.dragTargetId,!1),v={x:null,y:null};const b={x:t,y:e};b.x<0&&(b.x=0),g&&T3Gv.opt.dynamicGuides&&(DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null);let y,S=new DynamicGuides;if(!g&&DrawUtil.AllowSnapToShapes()){c=m.GetSnapRect(),d=Utils1.DeepCopy(c),d.x+=T3Gv.opt.dragDeltaX,d.y+=T3Gv.opt.dragDeltaY;const t={};y=m.CanSnapToShapes(t),y>=0&&(c=ObjectUtil$1.GetObjectPtr(y,!1).GetSnapRect(),p=Utils1.DeepCopy(c),p.x+=T3Gv.opt.dragDeltaX,p.y+=T3Gv.opt.dragDeltaY,v=DynamicUtil.DynamicSnapsGetSnapObjects(y,p,S,T3Gv.opt.moveList,null,t),null!==v.x&&(b.x+=v.x,p.x+=v.x,T3Gv.opt.dragDeltaX=b.x-T3Gv.opt.dragStartX),null!==v.y&&(b.y+=v.y,p.y+=v.y,T3Gv.opt.dragDeltaY=b.y-T3Gv.opt.dragStartY),s())}if(T3Gv.docUtil.docConfig.enableSnap&&!g){if(c=m.GetSnapRect(),d=Utils1.DeepCopy(c),d.x+=T3Gv.opt.dragDeltaX,d.y+=T3Gv.opt.dragDeltaY,m&&m.CustomSnap(m.Frame.x,m.Frame.y,T3Gv.opt.dragDeltaX,T3Gv.opt.dragDeltaY,!1,b))null===v.x&&(T3Gv.opt.dragDeltaX=b.x-T3Gv.opt.dragStartX),null===v.y&&(T3Gv.opt.dragDeltaY=b.y-T3Gv.opt.dragStartY),s();else if(T3Gv.docUtil.docConfig.centerSnap)u.x=c.x+T3Gv.opt.dragDeltaX+c.width/2,u.y=c.y+T3Gv.opt.dragDeltaY+c.height/2,u=T3Gv.docUtil.SnapToGrid(u),null===v.x&&(T3Gv.opt.dragDeltaX=u.x-c.x-c.width/2),null===v.y&&(T3Gv.opt.dragDeltaY=u.y-c.y-c.height/2);else{d=Utils1.DeepCopy(c),d.x+=T3Gv.opt.dragDeltaX,d.y+=T3Gv.opt.dragDeltaY;const t=T3Gv.docUtil.SnapRect(d);null===v.x&&(T3Gv.opt.dragDeltaX+=t.x),null===v.y&&(T3Gv.opt.dragDeltaY+=t.y)}f&&(Math.abs(T3Gv.opt.dragDeltaX)>=Math.abs(T3Gv.opt.dragDeltaY)?T3Gv.opt.dragDeltaY=0:T3Gv.opt.dragDeltaX=0)}const x=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);if(T3Gv.opt.header.flags&OptConstant.HeaderFlags.NoAuto){const t=T3Gv.opt.moveBounds.x+T3Gv.opt.moveBounds.width+T3Gv.opt.dragDeltaX;t>x.dim.x&&(T3Gv.opt.dragDeltaX-=t-x.dim.x);const e=T3Gv.opt.moveBounds.y+T3Gv.opt.moveBounds.height+T3Gv.opt.dragDeltaY;e>x.dim.y&&(T3Gv.opt.dragDeltaY-=e-x.dim.y)}let w=SelectUtil.GetTargetSelect();for(w<0&&(w=T3Gv.opt.dragTargetId),!0===i&&(T3Gv.opt.dragDeltaX=0,T3Gv.opt.dragDeltaY=0),l=0;l<r;++l){if(c=T3Gv.opt.dragBBoxList[l],o[l]===w){m=ObjectUtil$1.GetObjectPtr(w,!1);let t={x:c.x+T3Gv.opt.dragDeltaX,y:c.y+T3Gv.opt.dragDeltaY,width:c.width,height:c.height};m&&(t=m.GetDimensionsForDisplay(),t.x+=T3Gv.opt.dragDeltaX,t.y+=T3Gv.opt.dragDeltaY,(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0||T3Gv.opt.linkParams.ConnectIndexHistory.length>0)&&HookUtil.HandleHookedObjectMoving(m,t)),UIUtil.UpdateDisplayCoordinates(t,u,CursorConstant.CursorTypes.Move,m);const e=new SelectionAttr;e.left=t.x,e.top=t.y;const i=m.Dimensions&NvConstant.DimensionFlags.ShowFeetAsInches;e.widthstr=T3Constant.DocContext.CurrentWidth,e.heightstr=T3Constant.DocContext.CurrentHeight,e.leftstr=RulerUtil.GetLengthInRulerUnits(e.left,!1,T3Gv.docUtil.rulerConfig.originx,i),e.topstr=RulerUtil.GetLengthInRulerUnits(e.top,!1,T3Gv.docUtil.rulerConfig.originy,i),S&&DynamicUtil.DynamicSnapsUpdateGuides(S,y,p)}h=SvgUtil.GetSVGDragElement(l),h&&(h.SetPos(c.x+T3Gv.opt.dragDeltaX,c.y+T3Gv.opt.dragDeltaY),c.x,T3Gv.opt.dragDeltaX,c.y,T3Gv.opt.dragDeltaY,c.width,c.height)}LogUtil.Debug("= O.OptUtil  HandleObjectDragMoveCommon - Output:",{deltaX:T3Gv.opt.dragDeltaX,deltaY:T3Gv.opt.dragDeltaY,objectsProcessed:r})}HandleStampDragDoAutoScroll(){LogUtil.Debug("= O.OptUtil  HandleStampDragDoAutoScroll - Input: Starting auto-scroll"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("HandleStampDragDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);T3Gv.docUtil.ScrollToPosition(t.x,t.y),DrawUtil.StampObjectMoveCommon(t.x,t.y),LogUtil.Debug("= O.OptUtil  HandleStampDragDoAutoScroll - Output: Position updated",t)}OptSltSelectDoAutoScroll(){LogUtil.Debug("= O.OptUtil  OptSltSelectDoAutoScroll - Input: starting auto scroll"),T3Gv.opt.autoScrollTimerId=T3Gv.opt.autoScrollTimer.setTimeout("OptSltSelectDoAutoScroll",100);const t=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(T3Gv.opt.autoScrollXPos,T3Gv.opt.autoScrollYPos);LogUtil.Debug(`= O.OptUtil  OptSltSelectDoAutoScroll - Converted Coordinates: x=${t.x}, y=${t.y}`),T3Gv.docUtil.ScrollToPosition(t.x,t.y),LogUtil.Debug(`= O.OptUtil  OptSltSelectDoAutoScroll - Scrolled to position: x=${t.x}, y=${t.y}`),SelectUtil.OptSltSelectMoveCommon(t.x,t.y),LogUtil.Debug("= O.OptUtil  OptSltSelectDoAutoScroll - Output: Rectangle selection moved")}ImportBackgroundLayerImage(t,e){let i,n;LogUtil.Debug("= O.OptUtil  ImportBackgroundLayerImage - Input:",{imageUrl:t,importOptions:e});let s=-1;let a=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1);if(a){for(i=0;i<a.layers.length;i++)if(a.layers[i].layertype===NvConstant.LayerTypes.Background){s=i;break}if(s<0)LayerUtil.AddNewLayerAtFront("Background Layer",!0,!1),LayerUtil.RotateLayerStack(!0),s=a.layers.length-1,a.layers[s].layertype=NvConstant.LayerTypes.Background;else{if(n=a.layers[s].zList,n.length>0&&null==e)return;this.CloseEdit(!0)}LayerUtil.MakeLayerActiveByIndex(s),a.layers[s].flags=Utils2.SetFlag(a.layers[s].flags,NvConstant.LayerFlags.NoAdd,!1),T3Gv.opt.SetBackgroundImage(t,!0,e,!0)}LogUtil.Debug("= O.OptUtil  ImportBackgroundLayerImage - Output: Background layer updated")}SetBackgroundImage(t,e,i,n,s){let a;LogUtil.Debug("= O.OptUtil  SetBackgroundImage - Input:",{imageUrl:t,replaceExisting:e,hasImportData:!!i,isBackground:n,hasCallback:!!s});let o=!1,r="",l=null,h=null,c=this,u=e,d=800,p=800;const g=(t,e,i)=>{let s,a=[];if(!i&&t>0&&e>0){let i=e,o=t;const u=c.CalcWorkAreaCenterCoords(o,i),d=new QuickStyle;d.Name="",d.Line.Thickness=0,d.Fill.Paint.FillType=NvConstant.FillTypes.Transparent;const p={Frame:{x:u.x,y:u.y,width:o,height:i},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ImageURL:r,StyleRecord:d,ObjGrow:OptConstant.GrowBehavior.ProPortional,flags:NvConstant.ObjFlags.ImageOnly,extraflags:OptConstant.ExtraFlags.NoColor},g=new Instance.Shape.Rect(p);if(g){const i=DSUtil.GetImageDir(l);g.SetBlobBytes(h,i),i===StyleConstant.ImageDir.Svg&&(g.SVGDim={width:t,height:e})}s=DrawUtil.AddNewObject(g,!1,!0);const f=ObjectUtil$1.GetObjectPtr(s,!1);f&&(f.TextFlags=NvConstant.TextFlags.AttachB,f.ImageHeader=new ImageRecord,a.push(s));const m=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!1);if(m&&m.layers[m.activelayer].layertype===NvConstant.LayerTypes.Background){const t=ObjectUtil$1.GetObjectPtr(this.layersManagerBlockId,!0);t.layers[t.activelayer].flags=Utils2.SetFlag(t.layers[t.activelayer].flags,NvConstant.LayerFlags.NoAdd,!0)}n&&SvgUtil.RenderAllSVGObjects(),DrawUtil.CompleteOperation(a)}},f=(t,e,i,s)=>{try{let o;r=t,l=e,h=i;let c,d,p,f,m=!1;if((s?s.Data.ImageDir:DSUtil.GetImageDir(e))===StyleConstant.ImageDir.Svg&&(m=!0,o=Utils2.ParseSVGDimensions(i)),s?c=s.Data.BlockID:(c=SelectUtil.GetTargetSelect(),f=!1,n&&(c=-1),c>=0&&(a=ObjectUtil$1.GetObjectPtr(c,!1),(null==d?void 0:d.indexOf(a.objecttype))<0&&(null==p?void 0:p.indexOf(a.subtype))<0?a.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape||a instanceof Instance.Shape.BaseSymbol||a.SymbolURL||(f=u):(c=-1,f=!1))),f||s)if(a=ObjectUtil$1.GetObjectPtr(c,!1),a.GetTable(!1));else{a=ObjectUtil$1.GetObjectPtr(c,!0),m&&(a.SVGDim=o),TextUtil.DeleteTargetTextObject(c),OptCMUtil.IsBlobURL&&OptCMUtil.IsBlobURL(a.ImageURL)&&(OptCMUtil.DeleteURL(a.ImageURL),a.ImageURL=""),a.ImageURL=t;const e=DSUtil.GetImageDir(l);a.StyleRecord.Fill.Paint.Opacity=1,a.SetBlobBytes(i,e),a.ImageHeader=new ImageRecord,a.TextFlags=Utils2.SetFlag(a.TextFlags,NvConstant.TextFlags.None,!0),ObjectUtil$1.AddToDirtyList(c),DrawUtil.CompleteOperation()}else m?g(o.width,o.height,null):Style.CalcImageSize(t,g)}catch(o){throw o}};if(i);else{let i=SelectUtil.GetTargetSelect();0===e&&(o=!1,u=!0,i>=0&&(a=ObjectUtil$1.GetObjectPtr(i,!1),i=-1)),i>=0&&(a=ObjectUtil$1.GetObjectPtr(i,!1),a.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape||a instanceof Instance.Shape.BaseSymbol||a.SymbolURL||(o=u),o&&(a=ObjectUtil$1.GetObjectPtr(i,!1),d=a.Frame.width,p=a.Frame.height));const n=new Instance.Shape.BitmapImporter;n&&n.ImportBitmap(t,d,p,this.bitmapImportDPI,f)}LogUtil.Debug("= O.OptUtil  SetBackgroundImage - Output: Background image set")}CalcWorkAreaCenterCoords(t,e){const i=this.svgDoc,n=i.docInfo.dispX+i.docInfo.dispWidth/2-t/2*i.docInfo.docToScreenScale,s=i.docInfo.dispY+i.docInfo.dispHeight/2-e/2*i.docInfo.docToScreenScale,a=i.ConvertWindowToDocCoords(n,s);return a.x=a.x<10?10:a.x,a.y=a.y<10?10:a.y,a}CalcDocCoords(t,e){const i=this.svgDoc;let n=i.docInfo.dispX+t*i.docInfo.docToScreenScale,s=i.docInfo.dispY+e*i.docInfo.docToScreenScale;const a=i.ConvertWindowToDocCoords(n,s);return a.x=a.x<10?10:a.x,a.y=a.y<10?10:a.y,a}Lock(t,e){const i=T3Gv.stdObj.GetObject(this.selectObjsBlockId).Data,n=i.length;if(0!==n||e){let e,s=0,a=!0;const o=NvConstant.ObjFlags.Lock;for((e=ObjectUtil$1.GetObjectPtr(t,!1))&&(a=0==(e.flags&o)),s=0;s<n;++s)e=ObjectUtil$1.GetObjectPtr(i[s],!0),e.flags=Utils2.SetFlag(e.flags,o,a),ObjectUtil$1.AddToDirtyList(i[s]);DrawUtil.CompleteOperation()}else LogUtil.Debug("= O.OptUtil  Lock - Error: No objects selected")}ImportSvgSymbol(t){let e="",i=null,n=null;const s=(t,s,a)=>{let o;const r=[];if(!a&&t>0&&s>0){let a=200,l=200;t<s?l*=t/s:a*=s/t;const h=this.CalcWorkAreaCenterCoords(l,a),c=new QuickStyle;c.Name="",c.Line.Thickness=0,c.Fill.Paint.FillType=NvConstant.FillTypes.Transparent;const u={Frame:{x:h.x,y:h.y,width:a,height:l},TextGrow:NvConstant.TextGrowBehavior.ProPortional,ImageURL:e,StyleRecord:c,ObjGrow:OptConstant.GrowBehavior.ProPortional,flags:NvConstant.ObjFlags.ImageOnly,extraflags:OptConstant.ExtraFlags.NoColor},d=new Instance.Shape.Rect(u);o=DrawUtil.AddNewObject(d,!1,!0);const p=ObjectUtil$1.GetObjectPtr(o,!1);if(p){const t=DSUtil.GetImageDir(i);p.SetBlobBytes(n,t)}r.push(o),DrawUtil.CompleteOperation(r)}},a=new Instance.Shape.SvgImporter;a&&a.ImportSvg(t,((t,a,o)=>{e=t,i=a,n=o,this.CalcSVGSymbolDimensions(a,t,s)}))}CalcSVGSymbolDimensions(t,e,i){if(t){const e=new FileReader;e.UserData={callback:i},e.onload=function(t){const e=this.result;let i=null;window.DOMParser?i=(new DOMParser).parseFromString(e,"text/xml"):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async=!1,i.loadXML(e));let n=i.documentElement.getAttribute("width");n&&(n=n.match(/\d*\.*\d*/)[0]);let s=i.documentElement.getAttribute("height");if(s&&(s=s.match(/\d*\.*\d*/)[0]),n&&s)this.UserData.callback(n,s,null);else{const t=i.documentElement.getAttribute("viewBox");if(t){const e=t.split(" ");n=parseFloat(e[2]),n=n.match(/\d*\.*\d*/)[0],s=parseFloat(e[3]),s=s.match(/\d*\.*\d*/)[0],n&&s?this.UserData.callback(n,s,null):this.UserData.callback(0,0,{error:"No width/height and viewbox bad"})}else this.UserData.callback(0,0,{error:"No viewbox or width/height"})}},e.readAsText(t)}else i&&i(0,0,{error:"No blob passed in"})}ShapeToPolyLine(t,e,i,n){let s,a,o,r,l=[],h={x:0,y:0,width:0,height:0};if(n)a=n,r=!0,h=Utils1.DeepCopy(a.Frame);else{a=ObjectUtil$1.GetObjectPtr(t,!1),null==a.polylist?(a.polylist=a.GetPolyList(),a.StartPoint={},a.EndPoint={}):r=!0;const e=T3Gv.stdObj.PreserveBlock(t);if(null==e)return;a=e.Data,h=Utils1.DeepCopy(a.Frame)}if(r){if(!a.polylist)return null;if(T3Gv.opt.GetClosedPolyDim(a),!Utils2.IsEqual(a.polylist.dim.x,h.width)){const t=Utils1.DeepCopy(a);t.inside=Utils1.DeepCopy(a.Frame),Instance.Shape.PolyLine.prototype.ScaleObject.call(t,0,0,0,0,0,0),a.polylist=t.polylist}}return o=a.polylist.segs.length,a.StartPoint.x=a.Frame.x+a.polylist.segs[0].pt.x+a.polylist.offset.x,a.StartPoint.y=a.Frame.y+a.polylist.segs[0].pt.y+a.polylist.offset.y,a.EndPoint.x=a.Frame.x+a.polylist.segs[o-1].pt.x+a.polylist.offset.x,a.EndPoint.y=a.Frame.y+a.polylist.segs[o-1].pt.y+a.polylist.offset.y,s=e?new Instance.Shape.PolyLineContainer(a):new Instance.Shape.PolyLine(a),s.BlockID=a.BlockID,s.polylist.Shape_Rotation=a.RotationAngle,s.polylist.Shape_DataID=a.DataID,s.RotationAngle=0,s.DataID=-1,n||(objectBlock.Data=s),i||(this.AddToDirtyList(t),this.RenderDirtySVGObjects(),l.push(t),this.SelectObjects(l,!1,!0)),s.inside=Utils1.DeepCopy(a.Frame),s}GetClosedPolyDim(t){let e,i={x:0,y:0,width:0,height:0};if(t.polylist){const n=Utils1.DeepCopy(t),s=new Instance.Shape.PolyLine(n);s.inside=Utils1.DeepCopy(t.Frame),s.polylist.dim.x=0,s.polylist.dim.y=0,e=s.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),e&&e.length&&(Utils2.GetPolyRect(i,e),i.width<1&&(i.width=1),i.height<1&&(i.height=1),t.polylist.closed&&(t.polylist.dim.x=i.width,t.polylist.dim.y=i.height))}}TextCallback(t,e,i,n){let s,a,o,r,l,h=n.ID,c=null,u=!1;try{const n=ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);if("spellcheck"===t&&(c=ObjectUtil$1.GetObjectPtr(h,!1),c&&(r=c.GetTable(!1),r&&(l=i.GetUserData(),u=!(r.select>=0)||r.cells[r.select].DataID!=l)),null==T3Gv.opt.svgDoc.GetActiveEdit()&&(u=!0)),n.theActiveTextEditObjectID!=h||u)return void("spellcheck"===t&&(c=ObjectUtil$1.GetObjectPtr(h,!1),c&&(r=c.GetTable(!1),l=r?i.GetUserData():c.DataID,l>0&&i&&(s=i.GetRuntimeText(),a=ObjectUtil$1.GetObjectPtr(l,Utils1.IsStateOpen()),a&&(a.runtimeText=s),Utils1.IsStateOpen()||(o=[],o.push(T3Gv.stdObj.GetObject(l)))))));switch(t){case"dragoutside":if((c=ObjectUtil$1.GetObjectPtr(h,!1))&&(r=c.GetTable(!1))&&r.select>=0){const t=c.GetTextParams(!1),n=e,s={};s.x=n.x+c.Frame.x,s.y=n.y+c.Frame.y;const a=t.trect;Utils2.pointInRect(a,s)||(i.editor.isActive&&i.editor.BeginTableDrag(),s.y-=c.trect.y,s.x-=c.trect.x)}break;case"keyend":return e.keyCode,!0;case"edit":TextUtil.TextAutoScroll(h),TextUtil.TextResizeCommon(h);break;case"didresize":case"selectrange":case"hyperlink":case"select":case"deactivate":break;case"click":n.theTELastOp!=NvConstant.TextElemLastOpt.Init&&TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Select);break;case"charfilter":return c=ObjectUtil$1.GetObjectPtr(h,!1),!0}}catch(d){T3Gv.opt.ExceptionCleanup(d)}}LinesAddCurve(t,e,i,n,s,a){}DeleteBlock(t){}ChangeObjectTextAttributes(t,e,i,n,s,a,o,r){}DeSelect(t){}TextEdit_PauseTyping(){clearTimeout(T3Gv.opt.textEntryTimer),T3Gv.opt.textEntryTimer=null,TextUtil.RegisterLastTEOp(NvConstant.TextElemLastOpt.Timeout)}SetTopLeft(t,e){const i=SelectUtil.GetTargetSelect();if(i<0)return;const n=ObjectUtil$1.GetObjectPtr(i,!0);if(null!==n){let s,a,o,r;s=T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units==NvConstant.RulerUnit.Feet?Utils3.ConvertToFeet(t):Utils3.NumberIsFloat(t,!0)?parseFloat(t):0,e?T3Gv.docUtil.rulerConfig.originx&&(a=100*T3Gv.docUtil.rulerConfig.originx,T3Gv.docUtil.rulerConfig.useInches||(a/=OptConstant.Common.MetricConv),s+=RulerUtil.GetLengthInUnits(a),t=s.toFixed(2)):T3Gv.docUtil.rulerConfig.originy&&(a=100*T3Gv.docUtil.rulerConfig.originy,T3Gv.docUtil.rulerConfig.useInches||(a/=OptConstant.Common.MetricConv),s+=RulerUtil.GetLengthInUnits(a),t=s.toFixed(2));const l=this.GetDimensionLengthFromString(t,!1,!1);e?(o=l,r=null):(r=l,o=null),n.SetShapeOrigin(o,r,null,!0),OptCMUtil.SetLinkFlag(i,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(i,!0),DrawUtil.CompleteOperation();const h=n.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(h,null,null,n)}}ChangeWidth(t){let e=-1,i=-1,n=null;this.cachedWidth=null;const s=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,a=s.length;if(0!==a){for(let o=0;o<a;++o){const a=ObjectUtil$1.GetObjectPtr(s[o],!0);if(e=a.GetDimensionValueFromString(t,1),e>=0&&(i=a.GetDimensionLengthFromValue(e),i=a.AdjustDimensionLength(i),n=a.MaintainProportions(i,null)),i>=0){a.SetSize(i,n,OptConstant.ActionTriggerType.LineLength);const t=a.GetDimensionsForDisplay();a.CanUseRFlags()&&t.width===i&&(a.rflags=Utils2.SetFlag(a.rflags,NvConstant.FloatingPointDim.Width,!0),a.rwd=e),OptCMUtil.SetLinkFlag(s[o],DSConstant.LinkFlags.Move)}ObjectUtil$1.AddToDirtyList(s[o])}DrawUtil.CompleteOperation()}}ChangeHeight(t){let e=-1,i=-1,n=null;this.cachedHeight=null;const s=T3Gv.stdObj.GetObject(T3Gv.opt.selectObjsBlockId).Data,a=s.length;if(0!==a){for(let o=0;o<a;++o){const a=ObjectUtil$1.GetObjectPtr(s[o],!0);if(e=a.GetDimensionValueFromString(t,2),e>=0&&(i=a.GetDimensionLengthFromValue(e),i=a.AdjustDimensionLength(i),n=a.MaintainProportions(null,i)),i>=0){a.SetSize(n,i,OptConstant.ActionTriggerType.LineLength);const t=a.GetDimensionsForDisplay();a.CanUseRFlags()&&t.height===i&&(a.rflags=Utils2.SetFlag(a.rflags,NvConstant.FloatingPointDim.Height,!0),a.rht=e),OptCMUtil.SetLinkFlag(s[o],DSConstant.LinkFlags.Move)}ObjectUtil$1.AddToDirtyList(s[o])}DrawUtil.CompleteOperation()}}GetDimensionLengthFromString(t,e,i){let n=0,s=0;if(0===t.length)return 0;if(T3Gv.docUtil.rulerConfig.useInches&&T3Gv.docUtil.rulerConfig.units==NvConstant.RulerUnit.Feet&&!e){if(n=Utils3.ConvertToFeet(t),n<0&&!i)return!1}else{if(!Utils3.NumberIsFloat(t,i))return 1;n=parseFloat(t)}return s=T3Gv.docUtil.rulerConfig.showpixels?n:this.UnitsToCoord(n,0),s>4e5&&(s=-1),s}UnitsToCoord(t,e){ObjectUtil$1.GetObjectPtr(T3Gv.opt.teDataBlockId,!1);const i=RulerUtil.GetToUnits();return(t+=e*T3Gv.docUtil.rulerConfig.majorScale)/i}SetBackgroundColor(t){try{let e;T3Gv.opt.CloseEdit(!0,!0),e=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!0);let i=e.background.Paint.Color;e.background.Paint.FillType===NvConstant.FillTypes.Transparent&&(i=NvConstant.Colors.White);let n=t;t===NvConstant.Colors.Trans&&(n=NvConstant.Colors.White),UIUtil.ChangeBackgroundTextColor(n,i),t===NvConstant.Colors.Trans?(e.background.Paint.FillType=NvConstant.FillTypes.Transparent,e.background.Paint.Color=NvConstant.Colors.White):(e.background.Paint.FillType=NvConstant.FillTypes.Solid,e.background.Paint.Color=t),e.background.Paint.Opacity=1,UIUtil.SetBackgroundColor(),DrawUtil.CompleteOperation()}catch(e){T3Gv.opt.ExceptionCleanup(e)}}SetShapeBackgroundColor(t){}AddToLibrary(){const t=T3Gv.stdObj.GetObject(this.selectObjsBlockId),e=t.Data;if(LogUtil.Debug("= u.OptUtil: AddToLibrary - Selected Object, Selected Data, Object Count",t,e,e.length),0===e.length)return LogUtil.Debug("= u.OptUtil: AddToLibrary - Error: No objects selected"),!1;const i=[];e.forEach((t=>{const e=T3Gv.stdObj.GetObject(t);if(e){const t=Utils1.DeepCopy(e);i.push(t)}}));const n=JSON.stringify(i,((t,e)=>{if("function"!=typeof e)return e}));return DataOpt.SaveT3Library(n),LogUtil.Debug("= u.OptUtil: AddToLibrary - Successfully saved to local storage",{itemCount:i.length,storageKey:"t3.library",sizeInBytes:n.length}),Hvac$1.IdxPage2.addToNewLibrary(),i}LoadLibrary(){const t=DataOpt.LoadT3Library();if(!t||0===t.length)return LogUtil.Debug("= u.OptUtil: LoadLibrary - No library items found in storage"),!1;LogUtil.Debug("= u.OptUtil: LoadLibrary - rck:",T3Gv.opt.rClickParam);const e=T3Gv.opt.rClickParam&&T3Gv.opt.rClickParam.hitPoint.x&&T3Gv.opt.rClickParam.hitPoint.y,i=e?T3Gv.opt.rClickParam.hitPoint.x:100,n=e?T3Gv.opt.rClickParam.hitPoint.y:100;LogUtil.Debug("= u.OptUtil: LoadLibrary - coordsX,coordsY:",i,n);const s=this.CalcDocCoords(i,n);LogUtil.Debug("= u.OptUtil: LoadLibrary - docCoords:",s);const a=[];let o=null,r=null,l=0,h=0;return t.forEach(((t,e)=>{if(!t.Data)return;const s=DataOpt.ConvertPlanObjectToShape(t.Data);if(LogUtil.Debug("= u.OptUtil: LoadLibrary - ConvertPlanObjectToShape:",s),!s)return;const c=Utils1.DeepCopy(s.Frame);null===o&&(o=c.x,r=c.y,l=i-o,h=n-r);const u=c.x+l,d=c.y+h;LogUtil.Debug("= u.OptUtil: LoadLibrary - Positioning shape:",{index:e,original:{x:c.x,y:c.y},new:{x:u,y:d},offset:{x:l,y:h}}),s.SetShapeOrigin(u,d,null,!1);const p=DrawUtil.AddNewObject(s,!1,!1);p<0||(a.push(p),LogUtil.Debug("= u.OptUtil: LoadLibrary - newObject,newObjectId:",s,p))})),!(a.length<=0)&&(this.CloseEdit(!0),SvgUtil.RenderAllSVGObjects(),DrawUtil.CompleteOperation(a),T3Gv.opt.rClickParam=null,LogUtil.Debug("= u.OptUtil: LoadLibrary - Output: Successfully loaded and rendered",a.length,a),!0)}NudgeSelectedObjects(t,e,i){let n,s;LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Input:",{horizontalDelta:t,verticalDelta:e,isResizeMode:i});let a=T3Gv.stdObj.GetObject(this.selectObjsBlockId).Data,o=a.length;const r=0==(T3Gv.opt.header.flags&OptConstant.HeaderFlags.AutoGrowTopLeft),l=SelectUtil.GetTargetSelect();if(0===o)return void LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: No objects selected");let h,c,u;T3Gv.opt.dynamicGuides&&(DynamicUtil.DynamicSnapsRemoveGuides(T3Gv.opt.dynamicGuides),T3Gv.opt.dynamicGuides=null);const d={};let p,g,f,m,v,b=SelectUtil.GetMoveList(a[0],!0,!0,!1,d,!1);for(h=b.length-1;h>=0;h--)if(s=ObjectUtil$1.GetObjectPtr(b[h],!1),i&&s.NoGrow())b.splice(h,1);else if(b[h]!==a[0]||(s.objecttype===NvConstant.FNObjectTypes.GanttBar&&b.splice(h,1),0!=(s.flags&NvConstant.ObjFlags.Lock)))if(s.flags&NvConstant.ObjFlags.Lock)b.splice(h,1);else if(!i)for(c=0;c<s.hooks.length;c++)if(-1===b.indexOf(s.hooks[c].objid)){b.splice(h,1);break}if(a=b,o=a.length,!i&&r&&(d.x+t<0||d.y+e<0))return void LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: Operation would move objects out of bounds");if(d.x+=t,d.y+=e,0===o)return void LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: No modifiable objects found");SvgUtil.HideAllSVGSelectionStates();let y=0;for(this.dragBBoxList=[],y=0;y<o;++y){if(p=a[y],s=ObjectUtil$1.GetObjectPtr(p,!1),i){if(n=Utils1.DeepCopy(s),g=s.GetDimensions(),f=null,m=null,v=!1,t){if((s.ObjGrow===OptConstant.GrowBehavior.All||s.ObjGrow===OptConstant.GrowBehavior.ProPortional||s.ObjGrow===OptConstant.GrowBehavior.Horiz)&&(f=g.x+t,f<=10))continue;g.y>0&&s.ObjGrow===OptConstant.GrowBehavior.ProPortional&&(m=g.y+t,v=!0)}if(e&&!v){if((s.ObjGrow===OptConstant.GrowBehavior.All||s.ObjGrow===OptConstant.GrowBehavior.ProPortional||s.ObjGrow===OptConstant.GrowBehavior.Vertical)&&(m=g.y+e,m<=10))continue;g.x>0&&s.ObjGrow===OptConstant.GrowBehavior.ProPortional&&(f=g.x+e)}s=ObjectUtil$1.GetObjectPtr(p,!0),s.flags&NvConstant.ObjFlags.TextOnly&&s.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent&&(s.flags=Utils2.SetFlag(s.flags,NvConstant.ObjFlags.TextOnly,!1),s.SetTextGrow(NvConstant.TextGrowBehavior.Vertical)),s.SetSize(f,m,OptConstant.ActionTriggerType.LineLength),HookUtil.MaintainLink(s.BlockID,s,n,OptConstant.ActionTriggerType.LineEnd)}else ToolActUtil.OffsetShape(p,t,e,OptConstant.ActionTriggerType.TableSelect);if(ObjectUtil$1.AddToDirtyList(p,!i),p===l){const t=s.GetDimensionsForDisplay();UIUtil.UpdateDisplayCoordinates(t,null,null,s)}s&&1===s.hooks.length&&!i&&(u=ObjectUtil$1.GetObjectPtr(s.hooks[0].objid,!1),this.HookedObjectMovingDebounced(s,u))}this.nudgeOpen?i?(this.nudgeGrowX+=t,this.nudgeGrowY+=e):(this.nudgeX+=t,this.nudgeY+=e):i?(this.nudgeGrowX=t,this.nudgeGrowY=e,this.nudgeX=0,this.nudgeY=0):(this.nudgeGrowX=0,this.nudgeGrowY=0,this.nudgeX=t,this.nudgeY=e),(this.theDragGotAutoResizeLeft||this.theDragGotAutoResizeTop)&&this.ResetOrigin(),this.nudgeOpen=!1,this.UpdateLinks(),HookUtil.UpdateLineHops(!0),UIUtil.FitDocumentWorkArea(!1,!1),SvgUtil.RenderDirtySVGObjects(),SvgUtil.RenderAllSVGSelectionStates(),this.ScrollObjectIntoView(-1,!1,d),this.nudgeOpen=!0,DrawUtil.UpdateAppStateV2Frame(),LogUtil.Debug("= O.OptUtil  NudgeSelectedObjects - Output: Objects modified",{objectCount:o})}ResetOrigin(){LogUtil.Debug("= O.OptUtil  ResetOrigin - Input: Starting reset");const t=this.theDragGotAutoResizeLeft?-this.theDragGotAutoResizeOldLeft.at(-1):0,e=this.theDragGotAutoResizeTop?-this.theDragGotAutoResizeOldTop.at(-1):0;LayerUtil.ZList().forEach((i=>{const n=T3Gv.stdObj.PreserveBlock(i).Data;null!=n&&(n.OffsetShape(t,e),ObjectUtil$1.AddToDirtyList(i))})),this.ResetSVGRenderOffset(),this.theDragGotAutoResizeLeft=!1,this.theDragGotAutoResizeTop=!1,this.theDragGotAutoResizeOldLeft=[],this.theDragGotAutoResizeOldTop=[],LogUtil.Debug("= O.OptUtil  ResetOrigin - Output: Origin reset completed",{horizontalOffset:t,verticalOffset:e})}ResetSVGRenderOffset(){LogUtil.Debug("= O.OptUtil  ResetSVGRenderOffset - Input: Resetting offsets to zero"),this.SetSVGRenderOffset(0,0),LogUtil.Debug("= O.OptUtil  ResetSVGRenderOffset - Output: Offsets reset")}SetSVGRenderOffset(t,e){LogUtil.Debug("= O.OptUtil  SetSVGRenderOffset - Input:",{horizontalOffset:t,verticalOffset:e}),this.svgObjectLayer&&this.svgObjectLayer.SetPos(t,e),this.svgOverlayLayer&&this.svgOverlayLayer.SetPos(t,e),this.svgHighlightLayer&&this.svgHighlightLayer.SetPos(t,e),this.svgCollabLayer&&this.svgCollabLayer.SetPos(t,e),LogUtil.Debug("= O.OptUtil  SetSVGRenderOffset - Output: Positions updated for all layers")}HookedObjectMovingDebounced(t,e){if(LogUtil.Debug("= O.OptUtil  HookedObjectMovingDebounced - Input:",{movingObjectId:t.BlockID,hookedObjectId:null==e?void 0:e.BlockID}),e&&e.HookedObjectMoving&&e.Dimensions&(NvConstant.DimensionFlags.Always|NvConstant.DimensionFlags.Select)){clearTimeout(this.HookedObjectMovingTimer);const i=!this.HookedObjectMovingLastExecutionTime||Date.now()-this.HookedObjectMovingLastExecutionTime>=100?0:100,n=this;this.HookedObjectMovingTimer=setTimeout((function(){e.HookedObjectMoving({linkParams:null,movingShapeID:t.BlockID,movingShapeBBox:t.GetDimensionsForDisplay()}),n.HookedObjectMovingLastExecutionTime=Date.now(),LogUtil.Debug("= O.OptUtil  HookedObjectMovingDebounced - Output: HookedObjectMoving called")}),i)}else LogUtil.Debug("= O.OptUtil  HookedObjectMovingDebounced - Output: No action (hookedObject not eligible)")}CloseOpenNudge(){this.nudgeOpen=!1,DrawUtil.CompleteOperation(),LogUtil.Debug("= O.OptUtil  CloseOpenNudge - Input/Output: Nudge closed and operation completed")}FlipPoints(t,e,i){let n,s,a;LogUtil.Debug("= O.OptUtil  FlipPoints - Input:",{frame:t,flipFlags:e,pointCount:i.length});const o=OptConstant.ExtraFlags;for(a=i.length,s=0;s<a;s++)e&o.FlipHoriz&&(n=i[s].x-t.x,i[s].x=t.x+t.width-n),e&o.FlipVert&&(n=i[s].y-t.y,i[s].y=t.y+t.height-n);LogUtil.Debug("= O.OptUtil  FlipPoints - Output: Points flipped",{pointCount:a})}TableGetRowConnectPoints(t,e){var i,n;let s,a,o,r,l,h,c,u;LogUtil.Debug("= O.OptUtil  TableGetRowConnectPoints - Input:",{tableElement:null==t?void 0:t.BlockID,tableData:{rowCount:null==(i=null==e?void 0:e.rows)?void 0:i.length,cellCount:null==(n=null==e?void 0:e.cells)?void 0:n.length}});const d=e.rows.length,p=[],g=t.Frame.height,f=OptConstant.Common.DimMax;h={x:f/2,y:0},p.push(h),h={x:f/2,y:f},p.push(h);const m=t.trect.y-t.Frame.y;for(s=0;s<d;s++){for(c=e.rows[s],r=e.cells[c.start],l=r.frame.y+m,o=r.frame.height,u=r.nextra,a=1;a<=u;a++)r=e.cells[e.rows[s+a].start],o+=r.frame.height;s+=u,l+=o/2,h={x:0,y:l/g*f},p.push(h)}for(s=0;s<d;s++){for(c=e.rows[s],r=e.cells[c.start+c.ncells-1],l=r.frame.y+m,o=r.frame.height,u=r.nextra,a=1;a<=u;a++){const t=e.rows[s+a];r=e.cells[t.start+t.ncells-1],o+=r.frame.height}s+=u,l+=o/2,h={x:f,y:l/g*f},p.push(h)}return LogUtil.Debug("= O.OptUtil  TableGetRowConnectPoints - Output:",{pointCount:p.length}),p}FindAllChildLines(t,e){const i={lindex:-1,id:-1,hookpt:0},n=[];for(;this.FindChildArrayByIndex(t,i,e,OptConstant.DrawObjectBaseClass.Line)>0;)n.push(i.id);return n}CommentUngroup(t){}CommentGroup(t){}UngroupNative(t,e,i){let n,s,a,o,r,l,h,c,u,d=[],p={selectedList:[]};if(n=ObjectUtil$1.GetObjectPtr(t,!1),n.NativeID>=0&&(s=ObjectUtil$1.GetObjectPtr(n.NativeID,!1))&&(ShapeUtil.ReadSymbolFromBuffer(s,0,0,0,!1,!1,p,!1,!1,!1,!1,!1),p.selectedList.length)){l=p.selectedList.length;let e=this.GetListSRect(p.selectedList);o=n.Frame.width/e.width,r=n.Frame.height/e.height;let s={x:n.Frame.x+n.Frame.width/2,y:n.Frame.y+n.Frame.height/2};if(c=n.Frame.x,u=n.Frame.y,Utils2.IsEqual(100*o,100)&&Utils2.IsEqual(100*r,100)||!(l>1))for(h=0;h<l;h++)t=p.selectedList[h],ObjectUtil$1.GetObjectPtr(t,!1).OffsetShape(c,u);else for(h=0;h<l;h++)t=p.selectedList[h],ObjectUtil$1.GetObjectPtr(t,!1).ScaleObject(c,u,s,0,o,r,!0);l>1&&!i?(t=ToolAct2Util.GroupSelectedShapes(!0,p.selectedList,!1),a=ObjectUtil$1.GetObjectPtr(t,!1),d.push(t),a.InitialGroupBounds.x=0,a.InitialGroupBounds.y=0,a.Frame=Utils1.DeepCopy(n.Frame),a.RotationAngle=n.RotationAngle,a.extraflags=Utils2.SetFlag(a.extraflags,OptConstant.ExtraFlags.FlipHoriz,(n.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0),a.extraflags=Utils2.SetFlag(a.extraflags,OptConstant.ExtraFlags.FlipVert,(n.extraflags&OptConstant.ExtraFlags.FlipVert)>0),a.UpdateFrame(a.Frame)):d.push(p.selectedList[0])}return d}}class KeyboardUtil{constructor(){}BuildCommand(t,e,i,n,s,a,o){return LogUtil.Debug("U.KeyboardUtil: Creating keyboard command",t,e,i,n),this.Name=null!==t?t:null,this.Context=null!==e?e:KeyboardConstant.Contexts.None,this.ModifierKey=null!==i?i:KeyboardConstant.ModifierKeys.None,this.KeyCode=null!==n?n:null,this.Command="function"==typeof s?s:function(){LogUtil.Debug("U.KeyboardUtil: Keyboard command is unbound",this.Name,this.ModifierKey,this.KeyCode)},this.CommandParent=null!==a?a:this,this.CommandParams=null!==o?o:[],this.Execute=function(){LogUtil.Debug("U.KeyboardUtil: Executing command",this.Name);const t=this.Command.apply(this.CommandParent,this.CommandParams);return LogUtil.Debug("U.KeyboardUtil: Command execution complete",this.Name),t},this}}class ArrowKeyOpt{NavRight(){LogUtil.Debug("= O.ArrowKeyOpt: NavRight called");try{this.NudgeRight()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavRight error:",t),T3Gv.opt.ExceptionCleanup(t)}}NavLeft(){LogUtil.Debug("= O.ArrowKeyOpt: NavLeft called");try{this.NudgeLeft()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavLeft error:",t),T3Gv.opt.ExceptionCleanup(t)}}NavUp(){LogUtil.Debug("= O.ArrowKeyOpt: NavUp called");try{this.NudgeUp()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavUp error:",t),T3Gv.opt.ExceptionCleanup(t)}}NavDown(){LogUtil.Debug("= O.ArrowKeyOpt: NavDown called");try{this.NudgeDown()}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NavDown error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeRight(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeRight called");try{this.Nudge(1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeRight error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeLeft(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeLeft called");try{this.Nudge(-1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeLeft error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeUp(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeUp called");try{this.Nudge(0,-1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeUp error:",t),T3Gv.opt.ExceptionCleanup(t)}}NudgeDown(){LogUtil.Debug("= O.ArrowKeyOpt: NudgeDown called");try{this.Nudge(0,1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: NudgeDown error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowRight(){LogUtil.Debug("= O.ArrowKeyOpt: GrowRight called");try{this.NudgeGrow(1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowRight error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowLeft(){LogUtil.Debug("= O.ArrowKeyOpt: GrowLeft called");try{this.NudgeGrow(-1,0)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowLeft error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowDown(){LogUtil.Debug("= O.ArrowKeyOpt: GrowDown called");try{this.NudgeGrow(0,1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowDown error:",t),T3Gv.opt.ExceptionCleanup(t)}}GrowUp(){LogUtil.Debug("= O.ArrowKeyOpt: GrowUp called");try{this.NudgeGrow(0,-1)}catch(t){LogUtil.Debug("= O.ArrowKeyOpt: GrowUp error:",t),T3Gv.opt.ExceptionCleanup(t)}}Nudge(t,e){LogUtil.Debug(`= O.ArrowKeyOpt: Nudge input - xOffset: ${t}, yOffset: ${e}`);const i=T3Gv.opt.NudgeSelectedObjects(t,e,!1);return LogUtil.Debug("= O.ArrowKeyOpt: Nudge complete"),i}NudgeGrow(t,e){LogUtil.Debug(`= O.ArrowKeyOpt: NudgeGrow input - xAmount: ${t}, yAmount: ${e}`);const i=T3Gv.opt.NudgeSelectedObjects(t,e,!0);return LogUtil.Debug("= O.ArrowKeyOpt: NudgeGrow complete"),i}}class KeyboardOpt{constructor(){}static GetCommandsInContext(t,e,i,n,s){LogUtil.Debug("U.KeyboardUtil: Getting commands for context",t);let a=[];switch(t){case KeyboardConstant.Contexts.All:a.push((new KeyboardUtil).BuildCommand("Copy",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.C,i.Copy,i)),a.push((new KeyboardUtil).BuildCommand("Cut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.X,i.Cut,i)),a.push((new KeyboardUtil).BuildCommand("Paste",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.V,i.Paste,i)),a.push((new KeyboardUtil).BuildCommand("Undo",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Z,i.Undo,i)),a.push((new KeyboardUtil).BuildCommand("Redo",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.B,i.Redo,i)),a.push((new KeyboardUtil).BuildCommand("Reset",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.R,i.ClearAndRest,i)),a.push((new KeyboardUtil).BuildCommand("SelectAll",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.A,i.SelectAllObjects,i)),a.push((new KeyboardUtil).BuildCommand("Delete",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.None,KeyboardConstant.Keys.Delete,i.DeleteSelectedObjects,i)),a.push((new KeyboardUtil).BuildCommand("Cancel",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.None,KeyboardConstant.Keys.Escape,i.CancelOperation,i)),a.push((new KeyboardUtil).BuildCommand("Group",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.G,i.GroupSelected,i)),a.push((new KeyboardUtil).BuildCommand("Ungroup",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl_Shift,KeyboardConstant.Keys.G,i.UnGroupSelected,i)),a.push((new KeyboardUtil).BuildCommand("Duplicate",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.D,i.Duplicate,i)),a.push((new KeyboardUtil).BuildCommand("Save",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.S,i.Save,i)),a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Add,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Subtract,n.ZoomOut,n)),a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Equal_Sign,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Dash,n.ZoomOut,n)),a.push((new KeyboardUtil).BuildCommand("NavRight",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Right_Arrow,s.NavRight,s)),a.push((new KeyboardUtil).BuildCommand("NavLeft",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Left_Arrow,s.NavLeft,s)),a.push((new KeyboardUtil).BuildCommand("NavUp",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Up_Arrow,s.NavUp,s)),a.push((new KeyboardUtil).BuildCommand("NavDown",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Down_Arrow,s.NavDown,s));break;case KeyboardConstant.Contexts.ReadOnly:a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Add,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Subtract,n.ZoomOut,n)),a.push((new KeyboardUtil).BuildCommand("ZoomIn",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Equal_Sign,n.ZoomIn,n)),a.push((new KeyboardUtil).BuildCommand("ZoomOut",KeyboardConstant.Contexts.All,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Dash,n.ZoomOut,n));break;case KeyboardConstant.Contexts.Automation:a.push((new KeyboardUtil).BuildCommand("NavRight",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Right_Arrow,s.NavRight,s)),a.push((new KeyboardUtil).BuildCommand("NavLeft",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Left_Arrow,s.NavLeft,s)),a.push((new KeyboardUtil).BuildCommand("NavUp",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Up_Arrow,s.NavUp,s)),a.push((new KeyboardUtil).BuildCommand("NavDown",KeyboardConstant.Contexts.All,0,KeyboardConstant.Keys.Down_Arrow,s.NavDown,s));break;case KeyboardConstant.Contexts.AutomationNoCtrl:case KeyboardConstant.Contexts.WallOpt:break;case KeyboardConstant.Contexts.Text:case KeyboardConstant.Contexts.DimensionText:a.push((new KeyboardUtil).BuildCommand("Copy",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.C,i.Copy,i)),a.push((new KeyboardUtil).BuildCommand("Cut",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.X,i.Cut,i)),a.push((new KeyboardUtil).BuildCommand("Paste",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.V,i.Paste,i)),a.push((new KeyboardUtil).BuildCommand("Undo",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.Z,i.Undo,i)),a.push((new KeyboardUtil).BuildCommand("Redo",KeyboardConstant.Contexts.Text,KeyboardConstant.ModifierKeys.Ctrl,KeyboardConstant.Keys.B,i.Redo,i));case KeyboardConstant.Contexts.Navigation:}return LogUtil.Debug("U.KeyboardUtil: Retrieved",null==a?void 0:a.length,"commands for context",t),a}static OnKeyUp(t){LogUtil.Debug("U.KeyboardUtil: Processing key up event",t.keyCode),t.keyCode===KeyboardConstant.Keys.Space&&(LogUtil.Debug("U.KeyboardUtil: Space key released, updating spacebar state"),T3Constant.DocContext.SpacebarDown=!1)}static OnKeyDown(t){LogUtil.Debug("U.KeyboardUtil: Processing key down event",t.keyCode);const e=t.keyCode,i=Utils3.GetModifierKeys(t);e===KeyboardConstant.Keys.Space&&(LogUtil.Debug("U.KeyboardUtil: Space key pressed, updating spacebar state"),T3Constant.DocContext.SpacebarDown=!0);const n=$$1(t.target||t.srcElement);8!==e||n.is('input,[contenteditable="true"],textarea')&&"radio"!==n.attr("type")&&"checkbox"!==n.attr("type")||(LogUtil.Debug("U.KeyboardUtil: Preventing default backspace behavior"),t.preventDefault());try{KeyboardOpt.HandleKeyDown(t,e,i)}catch(s){throw T3Util.Error("= o.KeyboardOpt: OnKeyDown/ Error in key down handler",s),T3Gv.opt.ExceptionCleanup(s),s}}static HandleKeyDown(t,e,i){LogUtil.Debug("U.KeyboardUtil: Processing key down event",{keyCode:e,modifierKey:i});let n=!1,s=[],a=0,o=0,r=new ToolUtil,l=new KeyboardUtil,h=T3Gv.docUtil,c=new ArrowKeyOpt;const u=(e==KeyboardConstant.Keys.Left_Arrow||e==KeyboardConstant.Keys.Right_Arrow||e==KeyboardConstant.Keys.Up_Arrow||e==KeyboardConstant.Keys.Down_Arrow)&&T3Gv.userSetting.DisableCtrlArrowShapeInsert;if(1!=i||67!=e&&99!=e&&88!=e&&120!=e&&86!=e&&118!=e){let d=r.GetSelectionContext();if("titleInput"===t.target.id&&(d=KeyboardConstant.Contexts.Text),d instanceof Array)for(a=d.length,o=0;o<a;o++)s.push(d[o]);else s.push(d);const p=null;s.indexOf(p)<0&&s.push(p),s.push(KeyboardConstant.Contexts.All),a=s.length,T3Gv.docUtil.IsReadOnly()&&(s=[KeyboardConstant.Contexts.ReadOnly],a=s.length);for(let g=0;g<a;g++){const a=s[g],d=KeyboardOpt.GetCommandsInContext(a,l,r,h,c),p=d.length;for(o=0;o<p;o++){const s=d[o];if(s.KeyCode===e&&s.ModifierKey===i){if(u&&n)break;if(!s.Execute())return LogUtil.Debug("U.KeyboardUtil: Command executed and prevented default",{command:s.Name}),t.stopPropagation(),void t.preventDefault()}}if(!1===T3Constant.DocContext.CanTypeInWorkArea)return;if(a===KeyboardConstant.Contexts.DimensionText&&(n=!0),a===KeyboardConstant.Contexts.Text&&(i===KeyboardConstant.ModifierKeys.None||i===KeyboardConstant.ModifierKeys.Shift||i===KeyboardConstant.ModifierKeys.Ctrl||i===KeyboardConstant.ModifierKeys.Ctrl_Shift))if(!1===r.IsActiveTextEdit()&&"titleInput"!=t.target.id){if(-1!=KeyboardConstant.NonTextKeys.indexOf(e))continue;i!=KeyboardConstant.ModifierKeys.Ctrl&&(n=!0)}else n=!0;if(n&&i!=KeyboardConstant.ModifierKeys.Ctrl)break}n&&(e===KeyboardConstant.Keys.Escape?(T3Gv.opt.DeactivateAllTextEdit(!1),T3Gv.opt.bInNoteEdit,SvgUtil.RenderAllSVGSelectionStates(),t.stopPropagation(),t.preventDefault(),LogUtil.Debug("U.KeyboardUtil: Text edit closed with Escape key")):r.HandleKeyDown(t,e,i)&&(t.stopPropagation(),t.preventDefault(),LogUtil.Debug("U.KeyboardUtil: Key event handled by shapes controller")))}else T3Clipboard.isFirefox&&(T3Clipboard.FocusOnIEclipboardDiv(),LogUtil.Debug("U.KeyboardUtil: Focusing on IE clipboard div for Firefox"));LogUtil.Debug("U.KeyboardUtil: Key down handling complete")}static OnKeyPress(t){LogUtil.Debug("U.KeyboardUtil: Processing key press event",t.charCode);const e=t.charCode;try{LogUtil.Debug("U.KeyboardUtil: Delegating key press handling to MainController",{charCode:e}),KeyboardOpt.HandleKeyPress(t,e)}catch(i){throw T3Util.Error("= o.KeyboardOpt: OnKeyPress/ Error in key press handler",i),i}}static HandleKeyPress(t,e){LogUtil.Debug("U.KeyboardUtil: Handling key press event",{charCode:e});let i=!1,n=new ToolUtil;if(1!=Utils3.GetModifierKeys(t)||67!=e&&99!=e&&88!=e&&120!=e&&86!=e&&118!=e){if(!1!==T3Constant.DocContext.CanTypeInWorkArea&&!T3Gv.docUtil.IsReadOnly()){const s=n.GetSelectionContext();s instanceof Array&&(i=s.indexOf(KeyboardConstant.Contexts.Text)>=0),(i||s===KeyboardConstant.Contexts.Text||s===KeyboardConstant.Contexts.DimensionText)&&(LogUtil.Debug("U.KeyboardUtil: Delegating key press to shape handler in text context"),n.HandleKeyPress(t,e)&&t.stopPropagation())}}else T3Clipboard.isFirefox&&(LogUtil.Debug("U.KeyboardUtil: Focusing on IE clipboard div for Firefox"),T3Clipboard.FocusOnIEclipboardDiv());LogUtil.Debug("U.KeyboardUtil: Key press handling complete")}}class UserSetting{constructor(){this.UserID=-1,this.DateChanged=null,this.ShowGrid=!1,this.RecentColors=[],this.PaperSize=0,this.Metric=!1,this.DisableCtrlArrowShapeInsert=!1,this.CursorDisplayMode=T3Constant.CursorDisplayMode.Show}}class UserOpt{constructor(){this.userSetting=new UserSetting}Initialize(){T3Gv.userSetting=this.userSetting}}const Basic$1={Container:Container,Effect:Effects,Style:Style,Element:Element$1,Group:Group,Image:Image$1,Layer:Layer,Line:Line,Oval:Oval,Creator:Creator,Path:Path,Polygon:Polygon,PolyLine:PolyLine,PolyPolyLine:PolyPolyLine,Rect:Rect,RRect:RRect,ShapeContainer:ShapeContainer$1,ShapeCopy:ShapeCopy,Symbol:Symbol$1,Edit:Edit};class ArcLine extends BaseLine{constructor(t={}){LogUtil.Debug("= S.ArcLine constructor input:",t),t.LineType=OptConstant.LineType.ARCLINE,super(t),this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.CurveAdjust=t.CurveAdjust,this.IsReversed=t.IsReversed||!1,this.FromPolygon=t.FromPolygon||!1,this.CalcFrame(),this.FixedPoint=t.FixedPoint||[0,0],this.LineOrientation=t.LineOrientation||OptConstant.LineOrientation.None,this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.TextDirection=t.TextDirection||!1,LogUtil.Debug("= S.ArcLine constructor output:",this)}CalcRadiusAndCenter(t,e,i,n,s,a){LogUtil.Debug("= S.ArcLine CalcRadiusAndCenter input:",{startX:t,startY:e,endX:i,endY:n,curveAdjust:s,isReversed:a});const o={centerX:0,centerY:0,actionX:0,actionY:0,radius:0,valid:!1,centerInside:!1},r=t+(i-t)/2,l=e+(n-e)/2,h=i-t,c=n-e;let u=Math.sqrt(h*h+c*c);if(0===u)return LogUtil.Debug("= S.ArcLine CalcRadiusAndCenter output:",o),o.valid=!1,o;const d=-c/u,p=h/u,g=u/2,f=s;let m,v,b,y,S,x,w,C,T=Math.abs((g*g+f*f)/(2*f));if(T<f)o.centerInside=!0,m=Utils2.Sqrt(T*T-g*g),a?(y=r+m*d,S=l+m*p,x=y+T*d,w=S+T*p):(y=r-m*d,S=l-m*p,x=y-T*d,w=S-T*p);else{let t=T;t=a?t+f:t-f,v=d*t,b=p*t,y=r+v,S=l+b,x=y-T*d,w=S-T*p,a&&(C=T-f,y=r+d*C,S=l+p*C)}return o.radius=T,o.centerX=y,o.centerY=S,o.actionX=x,o.actionY=w,o.valid=!0,LogUtil.Debug("= S.ArcLine CalcRadiusAndCenter output:",o),o}GetLineChangeFrame(){LogUtil.Debug("= S.ArcLine GetLineChangeFrame input:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint});let t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);return t.width<OptConstant.Common.SegDefLen&&(t.width=OptConstant.Common.SegDefLen),t.height<OptConstant.Common.SegDefLen&&(t.height=OptConstant.Common.SegDefLen),LogUtil.Debug("= S.ArcLine GetLineChangeFrame output:",t),t}CreateArcShapeForHops(t,e){if(LogUtil.Debug("= S.ArcLine CreateArcShapeForHops input:",{svgDoc:t,isTouch:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("= S.ArcLine CreateArcShapeForHops output:",null),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.Polyline);n.SetID(OptConstant.SVGElementClass.Shape);const s=t.CreateShape(OptConstant.CSType.Polyline);s.SetID(OptConstant.SVGElementClass.Slop),s.ExcludeFromExport(!0),this.CalcFrame();const a=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),o=this.StyleRecord,r=this.SVGTokenizerHook(o),l=r.Line.Paint.Color,h=r.Line.Thickness,c=r.Line.Paint.Opacity,u=r.Line.LinePattern;i.SetSize(a.width,a.height),i.SetPos(a.x,a.y);let d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0);const p=T3Gv.opt.InsertHops(this,d,d.length);return d=d.slice(0,p.npts),n.SetPoints(d),n.SetFillColor("none"),n.SetStrokeColor(l),n.SetStrokeOpacity(c),n.SetStrokeWidth(h),0!==u&&n.SetStrokePattern(u),s.SetPoints(d),s.SetStrokeColor("white"),s.SetFillColor("none"),s.SetOpacity(0),e?s.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):s.SetEventBehavior(OptConstant.EventBehavior.None),s.SetStrokeWidth(h+OptConstant.Common.Slop),i.AddElement(n),i.AddElement(s),this.ApplyStyles(n,r),this.ApplyEffects(i,!1,!0),i.isShape=!0,this.AddIcons(t,i),LogUtil.Debug("= S.ArcLine CreateArcShapeForHops output:",i),i}CreateShape(t,e){if(LogUtil.Debug("= S.ArcLine CreateShape input:",{svgDoc:t,isTouch:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("= S.ArcLine CreateShape output:",null),null;if(0===this.hoplist.nhops){const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=t.CreateShape(OptConstant.CSType.Path);n.SetID(OptConstant.SVGElementClass.Shape);const s=t.CreateShape(OptConstant.CSType.Path);s.SetID(OptConstant.SVGElementClass.Slop),s.ExcludeFromExport(!0),this.CalcFrame();const a=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),o=this.StyleRecord,r=this.SVGTokenizerHook(o),l=r.Line.Paint.Color,h=r.Line.Paint.Opacity;let c=r.Line.Thickness;c>0&&c<1&&(c=1);const u=r.Line.LinePattern,d=a.width,p=a.height;return i.SetSize(d,p),i.SetPos(a.x,a.y),n.SetFillColor("none"),n.SetStrokeColor(l),n.SetStrokeOpacity(h),n.SetStrokeWidth(c),0!==u&&n.SetStrokePattern(u),s.SetStrokeColor("white"),s.SetFillColor("none"),s.SetOpacity(0),e?s.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):s.SetEventBehavior(OptConstant.EventBehavior.None),s.SetStrokeWidth(c+OptConstant.Common.Slop),i.AddElement(n),i.AddElement(s),this.ApplyStyles(n,r),this.ApplyEffects(i,!1,!0),i.isShape=!0,this.AddIcons(t,i),LogUtil.Debug("= S.ArcLine CreateShape output:",i),i}const i=this.CreateArcShapeForHops(t,e);return LogUtil.Debug("= S.ArcLine CreateShape output:",i),i}PostCreateShapeCallback(t,e,i,n){LogUtil.Debug("= S.ArcLine PostCreateShapeCallback input:",{svgDoc:t,svgContainer:e,callbackData:i,event:n}),0===this.hoplist.nhops?this.RegenerateGenerateArc(e):this.RegenerateGenerateArcForHops(e),this.DataID>=0&&this.LMAddSVGTextObject(t,e),this.UpdateDimensionLines(e),LogUtil.Debug("= S.ArcLine PostCreateShapeCallback output:","Callback completed")}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.ArcLine CreateActionTriggers input:",{svgDoc:t,targetId:e,triggerType:i,compareId:n});let s=t.CreateShape(OptConstant.CSType.Group),a=OptConstant.Common.KnobSize,o=OptConstant.Common.RKnobSize,r=!0,l=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(l*=2);let h=a/l,c=o/l;this.objecttype===NvConstant.FNObjectTypes.FlWall&&(h*=2);let u=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),d=u.width+h,p=u.height+h,g=ObjectUtil$1.GetObjectPtr(e,!1),f=Utils1.DeepCopy(u);f.x-=h/2,f.y-=h/2,f.width+=h,f.height+=h;let m={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:h,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1,x:0,y:0,knobID:OptConstant.ActionTriggerType.LineStart};if(e!==n&&(m.fillColor="white",m.strokeSize=1,m.strokeColor="black",m.fillOpacity=0),m.x=this.StartPoint.x-u.x,m.y=this.StartPoint.y-u.y,m.knobID=OptConstant.ActionTriggerType.LineStart,g&&g.hooks)for(let C=0;C<g.hooks.length;C++)if(g.hooks[C].hookpt===OptConstant.HookPts.KTL){m.shapeType=OptConstant.CSType.Oval,r=!1;break}this.objecttype===NvConstant.FNObjectTypes.FlWall&&(m.shapeType=OptConstant.CSType.Image);let v=this.GenericKnob(m);if(this.objecttype===NvConstant.FNObjectTypes.FlWall&&v.SetURL&&(v.SetURL(m.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),v.ExcludeFromExport(!0)),s.AddElement(v),m.shapeType=OptConstant.CSType.Rect,m.x=this.EndPoint.x-u.x,m.y=this.EndPoint.y-u.y,m.knobID=OptConstant.ActionTriggerType.LineEnd,g&&g.hooks)for(let C=0;C<g.hooks.length;C++)if(g.hooks[C].hookpt===OptConstant.HookPts.KTR){m.shapeType=OptConstant.CSType.Oval,r=!1;break}this.objecttype===NvConstant.FNObjectTypes.FlWall&&(m.shapeType=OptConstant.CSType.Image),v=this.GenericKnob(m),this.objecttype===NvConstant.FNObjectTypes.FlWall&&v.SetURL&&(v.SetURL(m.cursorType===CursorConstant.CursorType.NwseResize?CursorConstant.Knob.Path+CursorConstant.Knob.DiagonLeft:CursorConstant.Knob.Path+CursorConstant.Knob.DiagonRight),v.ExcludeFromExport(!0)),s.AddElement(v),m.shapeType=OptConstant.CSType.Rect,m.cursorType=this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!0),this.NoGrow()&&(m.cursorType=CursorConstant.CursorType.Default);let b=this.StartPoint.x,y=this.StartPoint.y,S=this.EndPoint.x,x=this.EndPoint.y,w=this.CalcRadiusAndCenter(b,y,S,x,this.CurveAdjust,this.IsReversed);if(m.x=w.actionX-u.x,m.y=w.actionY-u.y,m.knobID=OptConstant.ActionTriggerType.ModifyShape,v=this.GenericKnob(m),s.AddElement(v),r&&!m.locked&&!this.NoGrow()){m.shapeType=OptConstant.CSType.Oval;let t=Math.atan((this.EndPoint.y-this.StartPoint.y)/(this.EndPoint.x-this.StartPoint.x));t<0&&(t=-t),this.EndPoint.x>=this.StartPoint.x?(m.x=this.EndPoint.x-2*c*Math.cos(t)-u.x,m.y=this.EndPoint.y-2*c*Math.sin(t)-u.y):(m.x=this.StartPoint.x-2*c*Math.cos(t)-u.x,m.y=this.StartPoint.y-2*c*Math.sin(t)-u.y),m.cursorType=CursorConstant.CursorType.Rotate,m.knobID=OptConstant.ActionTriggerType.Rotate,m.fillColor="white",m.fillOpacity=.001,m.strokeSize=1.5,m.strokeColor="black",m.knobSize=c,v=this.GenericKnob(m),s.AddElement(v),m.knobSize=h}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(s,t,m)}return s.SetSize(d,p),s.SetPos(f.x,f.y),s.isShape=!0,s.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.ArcLine CreateActionTriggers output:",s),s}GetTextOnLineParams(t){LogUtil.Debug("= S.ArcLine GetTextOnLineParams input:",{param:t});let e={Frame:new Instance.Shape.Rect,StartPoint:new Point$1(0,0),EndPoint:new Point$1(0,0)};switch(e.StartPoint.x=this.StartPoint.x,e.StartPoint.y=this.StartPoint.y,e.EndPoint.x=this.EndPoint.x,e.EndPoint.y=this.EndPoint.y,e.Frame=Utils2.Pt2Rect(e.StartPoint,e.EndPoint),this.TextAlign){case TextConstant.TextAlign.TopCenter:case TextConstant.TextAlign.Center:case TextConstant.TextAlign.BottomCenter:{const t=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(e.StartPoint,e.EndPoint),i=[];i.push(new Point$1(e.StartPoint.x,e.StartPoint.y)),i.push(new Point$1(e.EndPoint.x,e.EndPoint.y)),Utils3.RotatePointsAboutCenter(e.Frame,t,i);const n=this.CalcRadiusAndCenter(i[0].x,i[0].y,i[1].x,i[1].y,this.CurveAdjust,this.IsReversed);i[0].y=n.actionY,i[1].y=n.actionY,Utils3.RotatePointsAboutCenter(e.Frame,-t,i),e.StartPoint.x=i[0].x,e.StartPoint.y=i[0].y,e.EndPoint.x=i[1].x,e.EndPoint.y=i[1].y;break}}return LogUtil.Debug("= S.ArcLine GetTextOnLineParams output:",e),e}RegenerateGenerateArc(t){LogUtil.Debug("= S.ArcLine RegenerateGenerateArc input:",{svgDoc:t});let e=T3Gv.arrowHlkTable[this.StartArrowID],i=T3Gv.arrowHlkTable[this.EndArrowID],n=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===e.id&&(e=null),0===i.id&&(i=null);const s=t.GetElementById(OptConstant.SVGElementClass.Shape),a=t.GetElementById(OptConstant.SVGElementClass.Slop);if(null!==s&&void 0!==s.PathCreator){const o=s.PathCreator();o.BeginPath();const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.StartPoint.x-r.x,h=this.StartPoint.y-r.y,c=this.EndPoint.x-r.x,u=this.EndPoint.y-r.y,d=this.CalcRadiusAndCenter(l,h,c,u,this.CurveAdjust,this.IsReversed);d.centerInside?(o.MoveTo(c,u),o.ArcTo(l,h,d.radius,d.radius,0,this.IsReversed,!0,!1)):(o.MoveTo(l,h),o.ArcTo(c,u,d.radius,d.radius,0,!this.IsReversed,!1,!1));const p=o.ToString();s.SetPath(p),a.SetPath(p),t.SetSize(r.width,r.height),t.SetPos(r.x,r.y),(e||i)&&(d.centerInside?(s.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp),a.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp)):(s.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp)))}LogUtil.Debug("= S.ArcLine RegenerateGenerateArc output:",{pathData:s&&s.PathCreator?s.PathCreator().ToString():null})}RegenerateGenerateArcForHops(t){LogUtil.Debug("= S.ArcLine RegenerateGenerateArcForHops input:",{svgDoc:t});let e=T3Gv.arrowHlkTable[this.StartArrowID],i=T3Gv.arrowHlkTable[this.EndArrowID],n=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===e.id&&(e=null),0===i.id&&(i=null);const s=t.GetElementById(OptConstant.SVGElementClass.Shape),a=t.GetElementById(OptConstant.SVGElementClass.Slop);let o=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0);const r=T3Gv.opt.InsertHops(this,o,o.length);o=o.slice(0,r.npts);const l=o.length;s.SetPoints(o);const h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),c=this.StartPoint.x-h.x,u=this.StartPoint.y-h.y;if(t.SetSize(h.width,h.height),t.SetPos(h.x,h.y),e||i){const t=(c-o[0].x)*(c-o[0].x)+(u-o[0].y)*(u-o[0].y);let r=!1;(c-o[l-1].x)*(c-o[l-1].x)+(u-o[l-1].y)*(u-o[l-1].y)<t&&(r=!0),r?(s.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp),a.SetArrowheads(i,n,e,n,this.EndArrowDisp,this.StartArrowDisp)):(s.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp),a.SetArrowheads(e,n,i,n,this.StartArrowDisp,this.EndArrowDisp))}LogUtil.Debug("= S.ArcLine RegenerateGenerateArcForHops output:",{polyPoints:o,rect:h})}AdjustLineStart(t,e,i){LogUtil.Debug("= S.ArcLine AdjustLineStart input:",{svgDoc:t,newStartX:e,newStartY:i});const n={x:this.StartPoint.x,y:this.StartPoint.y};this.StartPoint.x=e,this.StartPoint.y=i,this.EnforceMinimum(!0),this.CalcFrame(),(this.r.x<0||this.r.y<0)&&(this.StartPoint.x=n.x,this.StartPoint.y=n.y,this.CalcFrame()),this.RegenerateGenerateArc(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),new SelectionAttr;const s=this.EndPoint.x-this.StartPoint.x,a=this.EndPoint.y-this.StartPoint.y;Utils2.Sqrt(s*s+a*a),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(this.Frame,this.StartPoint,CursorConstant.CursorTypes.Grow),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("= S.ArcLine AdjustLineStart output:",{updatedStartPoint:this.StartPoint,updatedFrame:this.Frame})}AdjustLineEnd(t,e,i,n){LogUtil.Debug("= S.ArcLine AdjustLineEnd input:",{svgDoc:t,newEndX:e,newEndY:i,trigger:n});const s={x:this.EndPoint.x,y:this.EndPoint.y};if(this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1),this.CalcFrame(),(this.r.x<0||this.r.y<0)&&(this.EndPoint.x=s.x,this.EndPoint.y=s.y,this.CalcFrame()),t){this.RegenerateGenerateArc(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),new SelectionAttr;const e=this.EndPoint.x-this.StartPoint.x,i=this.EndPoint.y-this.StartPoint.y;Utils2.Sqrt(e*e+i*i),this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(this.Frame,this.EndPoint,CursorConstant.CursorTypes.Grow,this),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)}LogUtil.Debug("= S.ArcLine AdjustLineEnd output:",{updatedEndPoint:this.EndPoint,frame:this.Frame})}Flip(t){LogUtil.Debug("= S.ArcLine Flip input:",{flipFlag:t});let e=!1;const i={};if(T3Gv.opt.ob=Utils1.DeepCopy(this),t&OptConstant.ExtraFlags.FlipVert&&(i.y=this.StartPoint.y,this.StartPoint.y=this.EndPoint.y,this.EndPoint.y=i.y,e=!0,LogUtil.Debug("= S.ArcLine Flip: Performed vertical flip.")),t&OptConstant.ExtraFlags.FlipHoriz&&(i.x=this.StartPoint.x,this.StartPoint.x=this.EndPoint.x,this.EndPoint.x=i.x,e=!0,LogUtil.Debug("= S.ArcLine Flip: Performed horizontal flip.")),e){this.IsReversed=!this.IsReversed,LogUtil.Debug("= S.ArcLine Flip: Toggled IsReversed to",this.IsReversed);const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);t&&(this.UpdateDimensionLines(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)),T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}T3Gv.opt.ob={},LogUtil.Debug("= S.ArcLine Flip output:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,IsReversed:this.IsReversed})}ModifyShape(t,e,i,n,s){LogUtil.Debug("= S.ArcLine ModifyShape input:",{svgDoc:t,x:e,y:i,trigger:n,additional:s});let a=this.FindSide(this.StartPoint.x,this.StartPoint.y,this.EndPoint.x,this.EndPoint.y,e,i);-1===n&&(a=this.OriginalLineSide),a!==this.OriginalLineSide&&(0!==this.OriginalLineSide&&(this.IsReversed=!this.IsReversed),this.OriginalLineSide=a);const o=this.StartPoint.x+(this.EndPoint.x-this.StartPoint.x)/2-e,r=this.StartPoint.y+(this.EndPoint.y-this.StartPoint.y)/2-i,l=Math.sqrt(o*o+r*r),h=l-this.OriginalCenterPointDistance,c=this.CurveAdjust,u=this.OriginalCurveAdjust;l<this.OriginalCenterPointDistance?this.CurveAdjust=u-h:this.CurveAdjust=u+h,this.CurveAdjust<1?this.CurveAdjust=1:this.CurveAdjust>500&&(this.CurveAdjust=500),this.CalcFrame(),-1!==n&&(this.r.x<0||this.r.y<0)&&(this.CurveAdjust=c,this.CalcFrame()),(this.Dimensions&NvConstant.DimensionFlags.Select||this.Dimensions&NvConstant.DimensionFlags.Always)&&ObjectUtil$1.AddToDirtyList(this.BlockID),t&&(this.RegenerateGenerateArc(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)),LogUtil.Debug("= S.ArcLine ModifyShape output:",{CurveAdjust:this.CurveAdjust,Frame:this.Frame})}FindSide(t,e,i,n,s,a){LogUtil.Debug("= S.ArcLine FindSide input:",{startX:t,startY:e,endX:i,endY:n,testX:s,testY:a});let o=0;if(t===i)return o=s<t?n>e?1:-1:s>t?n>e?-1:1:0,LogUtil.Debug("= S.ArcLine FindSide output:",o),o;if(e===n)return o=a<e?i>t?1:-1:a>e?i>t?-1:1:0,LogUtil.Debug("= S.ArcLine FindSide output:",o),o;const r=(n-e)/(i-t)*(s-t)+e;return o=a>r?i>t?1:-1:a<r?i>t?-1:1:0,LogUtil.Debug("= S.ArcLine FindSide output:",o),o}BeforeModifyShape(t,e,i){LogUtil.Debug("= S.ArcLine BeforeModifyShape input:",{mouseX:t,mouseY:e,extra:i}),this.OriginalCurveAdjust=this.CurveAdjust;const n=this.StartPoint.x+(this.EndPoint.x-this.StartPoint.x)/2-t,s=this.StartPoint.y+(this.EndPoint.y-this.StartPoint.y)/2-e,a=Math.sqrt(n*n+s*s);this.OriginalCenterPointDistance=a,this.OriginalLineSide=this.CurveAdjust<=1?0:this.FindSide(this.StartPoint.x,this.StartPoint.y,this.EndPoint.x,this.EndPoint.y,t,e),LogUtil.Debug("= S.ArcLine BeforeModifyShape output:",{OriginalCurveAdjust:this.OriginalCurveAdjust,OriginalCenterPointDistance:this.OriginalCenterPointDistance,OriginalLineSide:this.OriginalLineSide})}StartNewObjectDrawTrackCommon(t,e,i){LogUtil.Debug("= S.ArcLine StartNewObjectDrawTrackCommon input:",{drawX:t,drawY:e,extra:i});const n=T3Gv.opt.actionStartX,s=t-n,a=e-T3Gv.opt.actionStartY,o=Math.sqrt(s*s+a*a);$$1.extend(!0,{},T3Gv.opt.actionBBox);let r=o/10;r<1?r=1:r>500&&(r=500),this.CurveAdjust=r,this.IsReversed=!(t>=n),this.AdjustLineEnd(T3Gv.opt.actionSvgObject,t,e,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("= S.ArcLine StartNewObjectDrawTrackCommon output:",{CurveAdjust:this.CurveAdjust,IsReversed:this.IsReversed})}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.ArcLine GetPolyPoints input:",{numPoints:t,skipOffset:e,useSuper:i,extraParam1:n,extraParam2:s});let a=[],o={x:0,y:0};if(i)return a=super.GetPolyPoints(t,e,i,n,s),LogUtil.Debug("= S.ArcLine GetPolyPoints output (using super):",a),a;const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.StartPoint.x-r.x,h=this.StartPoint.y-r.y,c=this.EndPoint.x-r.x,u=this.EndPoint.y-r.y,d=c-l,p=u-h,g=Math.sqrt(d*d+p*p);let f=g>0?d/g:0;Math.abs(f)<1e-4&&(f=0);let m=Math.abs(p)<1e-4?0:p,v=Math.asin(f);(m>0||0===m)&&(v=-v);const b=this.CalcRadiusAndCenter(l,h,c,u,this.CurveAdjust,this.IsReversed);o.x=b.centerX,o.y=b.centerY;const y=[];let S,x;if(y.push(new Point$1(l,h)),y.push(new Point$1(c,u)),Utils3.RotatePointsAboutPoint(o,v,y),y[0].y>y[1].y&&!this.FromPolygon?(S=y[1].y,x=y[0].y):(S=y[0].y,x=y[1].y),a=PolyUtil.ArcToPoly(t-1,o,b.radius,S,x,y[0].x,this.IsReversed,b.centerInside),a.push(new Point$1(a[0].x,x)),Utils3.RotatePointsAboutPoint(o,-v,a),!e)for(let w=0;w<a.length;w++)a[w].x+=r.x,a[w].y+=r.y;return LogUtil.Debug("= S.ArcLine GetPolyPoints output:",a),a}GetConnectLine(){LogUtil.Debug("= S.ArcLine GetConnectLine input:",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,CurveAdjust:this.CurveAdjust,IsReversed:this.IsReversed});const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),e=this.StartPoint.x-t.x,i=this.StartPoint.y-t.y,n=this.EndPoint.x-t.x,s=this.EndPoint.y-t.y,a={frame:{},length:0,startpt:{x:0,y:0},endpt:{x:0,y:0},center:{}},o=this.CalcRadiusAndCenter(e,i,n,s,this.CurveAdjust,this.IsReversed);if(o.centerInside){const r=n-e,l=s-i;let h=Math.sqrt(r*r+l*l),c=h>0?r/h:0;Math.abs(c)<1e-4&&(c=0);let u=Math.abs(l)<1e-4?0:l,d=Math.asin(c);u>=0&&(d=-d);const p={x:o.centerX,y:o.centerY},g=[];let f,m;g.push(new Point$1(e,i)),g.push(new Point$1(n,s)),Utils3.RotatePointsAboutPoint(p,d,g),g[0].y>g[1].y?(f=g[0].y-g[1].y,m=o.radius-f/2,g[0].y+=m,g[1].y-=m):(f=g[1].y-g[0].y,m=o.radius-f/2,g[1].y+=m,g[0].y-=m),Utils3.RotatePointsAboutPoint(p,-d,g),g[0].x+=t.x,g[0].y+=t.y,g[1].x+=t.x,g[1].y+=t.y;const v=Utils2.Pt2Rect(g[0],g[1]),b=g[0].x-g[1].x,y=g[0].y-g[1].y,S=Math.sqrt(b*b+y*y);return a.frame=v,a.length=S,a.startpt={x:g[0].x,y:g[0].y},a.endpt={x:g[1].x,y:g[1].y},a.center={x:p.x+t.x,y:p.y+t.y},LogUtil.Debug("= S.ArcLine GetConnectLine intermediate values:",{rotatedPoints:g,computedFrame:v,computedLength:S,resultCenter:a.center}),LogUtil.Debug("= S.ArcLine GetConnectLine output:",a),a}return LogUtil.Debug("= S.ArcLine GetConnectLine output:",null),null}GetTargetPoints(t,e,i){LogUtil.Debug("= S.ArcLine GetTargetPoints input:",{hookElement:t,hookFlags:e,targetId:i});const n=[{x:0,y:0}];let s,a={x:0,y:0},o={x:0,y:0};const r=OptConstant.HookPts;if(null!=i&&i>=0&&ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(t.id){case r.KTC:case r.KBC:case r.KRC:case r.KLC:const n=super.GetTargetPoints(t,e,i);return LogUtil.Debug("= S.ArcLine GetTargetPoints output:",n),n}const l=this.GetConnectLine();l?(a=l.startpt,o=l.endpt):(a=this.StartPoint,o=this.EndPoint);let h=this.EndPoint.x-this.StartPoint.x;Math.abs(h)<1&&(h=1);const c=(this.EndPoint.y-this.StartPoint.y)/h;let u,d;Math.abs(c)>1||e&NvConstant.HookFlags.LcHOnly?(s=T3Gv.opt.ArcToChord(a,o,t,l,this),d=s.y-a.y,u=s.x-a.x):(s=T3Gv.opt.ArcToChord(a,o,t,l,this),u=s.x-a.x,d=s.y-a.y);const p=o.y-a.y,g=o.x-a.x;if(n[0].y=Math.abs(p)>1?d/p*OptConstant.Common.DimMax:OptConstant.Common.DimMax,n[0].x=Math.abs(g)>1?u/g*OptConstant.Common.DimMax:OptConstant.Common.DimMax,n[0].x>OptConstant.Common.DimMax&&(n[0].x=OptConstant.Common.DimMax),n[0].y>OptConstant.Common.DimMax&&(n[0].y=OptConstant.Common.DimMax),n[0].x<0&&(n[0].x=0),n[0].y<0&&(n[0].y=0),l){const t=2*Math.round(s.x/2)!==s.x;n[0].x=2*Math.round((n[0].x+.5)/2),t&&n[0].x--}return LogUtil.Debug("= S.ArcLine GetTargetPoints output:",n),n}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.ArcLine GetPerimPts input:",{event:t,hooks:e,param3:i,param4:n,param5:s,targetId:a});let o=[];const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.StartPoint.x-r.x,h=this.StartPoint.y-r.y,c=this.EndPoint.x-r.x,u=this.EndPoint.y-r.y;if(e&&2===e.length&&e[0].id&&e[0].id===OptConstant.HookPts.KTL&&e[1].id&&e[1].id===OptConstant.HookPts.KTR){let t=new Point$1(this.StartPoint.x,this.StartPoint.y);t.id=e[0].id;let i=new Point$1(this.EndPoint.x,this.EndPoint.y);return i.id=e[1].id,o.push(t,i),LogUtil.Debug("= S.ArcLine GetPerimPts output (direct start/end):",o),o}const d=ObjectUtil$1.GetObjectPtr(a,!1);if(d&&d.objecttype===NvConstant.FNObjectTypes.Multiplicity)return o=super.GetPerimPts(t,e,i,n,s,a),LogUtil.Debug("= S.ArcLine GetPerimPts output (Multiplicity):",o),o;if(d&&d.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===e.length)return o=super.GetPerimPts(t,e,i,n,s,a),LogUtil.Debug("= S.ArcLine GetPerimPts output (ExtraTextLabel):",o),o;const p=this.CalcRadiusAndCenter(l,h,c,u,this.CurveAdjust,this.IsReversed),g={x:p.centerX+r.x,y:p.centerY+r.y};let f=this.IsReversed;const m=super.GetPerimPts(t,e,i,n,s,a);let v,b,y=!1;const S=this.GetConnectLine();S?(v=S.startpt,b=S.endpt,y=2*Math.round(e[0].x/2)!==e[0].x,f=!1):(v=this.StartPoint,b=this.EndPoint);for(let x=0;x<m.length;x++)o[x]=PolyUtil.ChordToArc(v,b,g,p.radius,f,y,p.centerInside,m[x]),null!=m[x].id&&(o[x].id=m[x].id);return LogUtil.Debug("= S.ArcLine GetPerimPts output:",o),o}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.ArcLine MaintainPoint input:",{event:t,targetId:e,maintainDistParam:i,drawingObject:n,extraParam:s});let a=!1,o={},r={};switch(n.DrawingObjectBaseClass){case OptConstant.DrawObjectBaseClass.Line:switch(n.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:for(let t=0;t<n.hooks.length;t++)if(n.hooks[t].targetid===e){n.HookToPoint(n.hooks[t].hookpt,o),a=!0;break}return a?(r=Utils1.DeepCopy(n),Utils2.CopyRect(r.Frame,o),r.StartPoint.x=o.x,r.StartPoint.y=o.y,r.EndPoint.x=o.x+o.width,r.EndPoint.y=o.y+o.height,LogUtil.Debug("= S.ArcLine MaintainPoint output:",r),r):(LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0)}if(T3Gv.opt.ArcCheckPoint(this,t))return LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0;if(T3Gv.opt.ArcIntersect(this,n,t))return LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0;T3Gv.opt.LinesMaintainDist(this,i,s,t);break;case OptConstant.DrawObjectBaseClass.Shape:T3Gv.opt.LinesMaintainDist(this,i,s,t)}return LogUtil.Debug("= S.ArcLine MaintainPoint output:",!0),!0}}class SegLine{constructor(){this.firstdir=0,this.lastdir=0,this.curveparam=0,this.pts=[],this.lengths=[]}}class SegmentedLine extends BaseLine{constructor(t){LogUtil.Debug("= S.SegmentedLine: constructor input",t);const e=t||{};e.LineType=e.LineType||OptConstant.LineType.SEGLINE,super(e),this.segl=e.segl||new SegLine,null!=e.curveparam&&(this.segl.curveparam=e.curveparam),this.StartPoint=e.StartPoint||{x:0,y:0},this.EndPoint=e.EndPoint||{x:0,y:0},this.SegLFormat(this.EndPoint,OptConstant.ActionTriggerType.LineEnd,0),this.CalcFrame(),this.hoplist=e.hoplist||{nhops:0,hops:[]},this.ArrowheadData=e.ArrowheadData||[],this.StartArrowID=e.StartArrowID||0,this.EndArrowID=e.EndArrowID||0,this.StartArrowDisp=e.StartArrowDisp||!1,this.EndArrowDisp=e.EndArrowDisp||!1,this.ArrowSizeIndex=e.ArrowSizeIndex||0,this.TextDirection=e.TextDirection||!1,LogUtil.Debug("= S.SegmentedLine: constructor output",{segl:this.segl,StartPoint:this.StartPoint,EndPoint:this.EndPoint,hoplist:this.hoplist,ArrowheadData:this.ArrowheadData,StartArrowID:this.StartArrowID,EndArrowID:this.EndArrowID,StartArrowDisp:this.StartArrowDisp,EndArrowDisp:this.EndArrowDisp,ArrowSizeIndex:this.ArrowSizeIndex,TextDirection:this.TextDirection})}CreateShape(t,e){if(LogUtil.Debug("= S.SegmentedLine: CreateShape input",{svgDoc:t,isHidden:e}),this.flags&NvConstant.ObjFlags.NotVisible)return null;let i=[];const n=t.CreateShape(OptConstant.CSType.ShapeContainer),s=t.CreateShape(OptConstant.CSType.Polyline);s.SetID(OptConstant.SVGElementClass.Shape);const a=t.CreateShape(OptConstant.CSType.Polyline);a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),this.CalcFrame();const o=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let r=this.StyleRecord;r=this.SVGTokenizerHook(r);const l=r.Line.Paint.Color;let h=r.Line.Thickness;const c=r.Line.Paint.Opacity,u=r.Line.LinePattern;h>0&&h<1&&(h=1);let d=o.width,p=o.height;if(d<h&&(d=h),p<h&&(p=h),n.SetSize(d,p),n.SetPos(o.x,o.y),s.SetSize(d,p),i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),0!==this.hoplist.nhops){const t=T3Gv.opt.InsertHops(this,i,i.length);i=i.slice(0,t.npts)}return this.UpdateSVG(s,i),s.SetFillColor("none"),s.SetStrokeColor(l),s.SetStrokeOpacity(c),s.SetStrokeWidth(h),0!==u&&s.SetStrokePattern(u),a.SetSize(d,p),this.UpdateSVG(a,i),a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),e?a.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):a.SetEventBehavior(OptConstant.EventBehavior.None),a.SetStrokeWidth(h+OptConstant.Common.Slop),n.AddElement(s),n.AddElement(a),this.ApplyStyles(s,r),this.ApplyEffects(n,!1,!0),n.isShape=!0,this.AddIcons(t,n),LogUtil.Debug("= S.SegmentedLine: CreateShape output",{shape:n}),n}UpdateSVG(t,e){LogUtil.Debug("= S.SegmentedLine: UpdateSVG input",{shape:t,points:e}),t&&t.SetPoints&&t.SetPoints(e),LogUtil.Debug("= S.SegmentedLine: UpdateSVG output",{shape:t})}AllowHeal(){LogUtil.Debug("= S.SegmentedLine: AllowHeal input");return LogUtil.Debug("= S.SegmentedLine: AllowHeal output",true),true}CanUseStandOffDimensionLines(){LogUtil.Debug("= S.SegmentedLine: CanUseStandOffDimensionLines input");return LogUtil.Debug("= S.SegmentedLine: CanUseStandOffDimensionLines output",false),false}SegLFormat(t,e,i){let n,s,a,o,r,l;LogUtil.Debug("= S.SegmentedLine: SegLFormat input",{targetPoint:t,actionType:e,initialDirection:i});let h=!1,c=!1,u=!1;const d=NvConstant.SegLDir,p=(t,e,i)=>{let n=0;const s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);switch(t){case d.Ktc:n=i.y<e.y?a>=s?d.Kbc:i.x<e.x?d.Krc:d.Klc:d.Ktc;break;case d.Kbc:n=i.y>=e.y?a>=s?d.Ktc:i.x<e.x?d.Krc:d.Klc:d.Kbc;break;case d.Klc:n=i.x<e.x?a<=s?d.Krc:i.y<e.y?d.Kbc:d.Ktc:d.Klc;break;case d.Krc:n=i.x>e.x?a<s?d.Klc:i.y<e.y?d.Kbc:d.Ktc:d.Krc;break;default:n=t}return n};if(null!=this.segl){switch(e){case OptConstant.ActionTriggerType.LineStart:this.StartPoint.x=t.x,this.StartPoint.y=t.y;break;case OptConstant.ActionTriggerType.SeglPreserve:case OptConstant.ActionTriggerType.LineEnd:this.EndPoint.x=t.x,this.EndPoint.y=t.y}if(0!==this.segl.firstdir||0!==this.segl.lastdir){if(0===this.segl.lastdir){switch(e){case OptConstant.ActionTriggerType.LineStart:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:i=p(this.segl.firstdir,t,this.EndPoint);break;case OptConstant.ActionTriggerType.SeglPreserve:i=p(this.segl.firstdir,this.StartPoint,this.EndPoint);break;default:i=p(this.segl.firstdir,this.StartPoint,t)}h=!0,this.segl.lastdir=i,u=!0}if(0===this.segl.firstdir){switch(e){case OptConstant.ActionTriggerType.LineEnd:case OptConstant.ActionTriggerType.SeglOne:case OptConstant.ActionTriggerType.SeglTwo:case OptConstant.ActionTriggerType.SeglThree:i=p(this.segl.lastdir,t,this.StartPoint);break;case OptConstant.ActionTriggerType.SeglPreserve:i=p(this.segl.lastdir,this.EndPoint,this.StartPoint);break;default:i=p(this.segl.lastdir,this.EndPoint,t)}c=!0,this.segl.firstdir=i,u=!0}switch(this.segl.firstdir){case d.Ktc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToTop(e,t,1,!1,u);break;case d.Kbc:this.SegLTopToBottom(e,t,1,!1);break;case d.Klc:this.SegLTopToLeft(e,t,1,1,!1,u);break;case d.Krc:this.SegLTopToLeft(e,t,1,-1,!1,u)}break;case d.Kbc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToBottom(e,t,-1,!1);break;case d.Kbc:this.SegLTopToTop(e,t,-1,!1,u);break;case d.Klc:this.SegLTopToLeft(e,t,-1,1,!1,u);break;case d.Krc:this.SegLTopToLeft(e,t,-1,-1,!1,u)}break;case d.Klc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToLeft(e,t,1,1,!0,u);break;case d.Kbc:this.SegLTopToLeft(e,t,1,-1,!0,u);break;case d.Klc:this.SegLTopToTop(e,t,1,!0,u);break;case d.Krc:this.SegLTopToBottom(e,t,1,!0)}break;case d.Krc:switch(this.segl.lastdir){case d.Ktc:this.SegLTopToLeft(e,t,-1,1,!0,u);break;case d.Kbc:this.SegLTopToLeft(e,t,-1,-1,!0,u);break;case d.Klc:this.SegLTopToBottom(e,t,-1,!0);break;case d.Krc:this.SegLTopToTop(e,t,-1,!0,u)}}h&&(this.segl.lastdir=0),c&&(this.segl.firstdir=0)}else if(n=this.EndPoint.x-this.StartPoint.x,s=this.EndPoint.y-this.StartPoint.y,a=Math.abs(n),o=Math.abs(s),r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),o>=1||a>=1){if(0===i&&(i=a-o>.01?OptConstant.Common.HorizOnly:OptConstant.Common.VertOnly),this.segl.pts.splice(0),this.segl.lengths.splice(0),i===OptConstant.Common.HorizOnly)if(o<1)this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(n);else{const t=n/2;this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.StartPoint.x+t,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.StartPoint.x+t,this.EndPoint.y)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(t),this.segl.lengths.push(s),this.segl.lengths.push(t)}else if(i===OptConstant.Common.VertOnly)if(a<1)this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(s);else{const t=s/2;this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),this.segl.pts.push(new Point$1(this.StartPoint.x,this.StartPoint.y+t)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.StartPoint.y+t)),this.segl.pts.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),this.segl.lengths.push(t),this.segl.lengths.push(n),this.segl.lengths.push(t)}l=this.segl.pts.length;for(let t=0;t<l;t++)this.segl.pts[t].x-=r.x,this.segl.pts[t].y-=r.y}LogUtil.Debug("= S.SegmentedLine: SegLFormat output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,segl:this.segl})}}GetDimensionPoints(){LogUtil.Debug("= S.SegmentedLine: GetDimensionPoints input",{Dimensions:this.Dimensions,Frame:this.Frame,StartPoint:this.StartPoint,EndPoint:this.EndPoint});let t=[];if(this.Dimensions&NvConstant.DimensionFlags.AllSeg)t=this.segl.pts;else if(this.Dimensions&NvConstant.DimensionFlags.Total){let e=Utils1.DeepCopy(this.segl.pts);for(let t=0;t<e.length;t++)e[t].x+=this.Frame.x,e[t].y+=this.Frame.y;for(let t=1;t<e.length;t++){const i=Math.abs(e[t-1].x-e[t].x),n=Math.abs(e[t-1].y-e[t].y),s=Math.sqrt(i*i+n*n);LogUtil.Debug("= S.SegmentedLine: Segment distance",{index:t,segmentLength:s})}const i=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),n=(this.Frame.y-i.y)/2,s=(this.Frame.x-i.x)/2,a={x:this.Frame.width/2+s,y:this.Frame.height/2+n},o={x:a.x-10,y:a.y},r={x:a.x+10,y:a.y};t.push(new Point$1(o.x,o.y)),t.push(new Point$1(r.x,r.y))}else{const e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);t.push(new Point$1(this.StartPoint.x-e.x,this.StartPoint.y-e.y)),t.push(new Point$1(this.EndPoint.x-e.x,this.EndPoint.y-e.y))}return LogUtil.Debug("= S.SegmentedLine: GetDimensionPoints output",t),t}SegLTopToTop(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g;LogUtil.Debug("= S.SegmentedLine: SegLTopToTop input",{actionType:t,targetPoint:e,directionFactor:i,isVertical:n,forcePreserveFormat:s});let f=0,m=!1;const v=OptConstant.Common.DimMax;let b={x:0,y:0};if(n){o=Math.abs(this.EndPoint.y-this.StartPoint.y),a=Math.abs(this.EndPoint.x-this.StartPoint.x),r=this.StartPoint.y,l=this.StartPoint.x,h=this.EndPoint.y,c=this.EndPoint.x,u=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let t=u.x;u.x=u.y,u.y=t,PolyUtil.GetMaxDim(b),t=b.x,b.x=b.y,b.y=t}else o=Math.abs(this.EndPoint.x-this.StartPoint.x),a=Math.abs(this.EndPoint.y-this.StartPoint.y),r=this.StartPoint.x,l=this.StartPoint.y,h=this.EndPoint.x,c=this.EndPoint.y,u=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),PolyUtil.GetMaxDim(b);if(d=this.segl.pts.length,this.segl.pts.splice(0),this.hooks&&this.hooks.length>0){if(n?-1===i?this.StartPoint.x>this.EndPoint.x:this.StartPoint.x<this.EndPoint.x:-1===i?this.StartPoint.y>this.EndPoint.y:this.StartPoint.y<this.EndPoint.y){for(let t=0;t<this.hooks.length;t++)if(this.hooks[t].hookpt===OptConstant.HookPts.KTL){const e=ObjectUtil$1.GetObjectPtr(this.hooks[t].objid,!1);if(e){p=e.GetTargetRect(),g=n?this.StartPoint.y+p.height*((v-this.hooks[t].connect.y)/v)+OptConstant.Common.SegDefLen:this.StartPoint.x+p.width*((v-this.hooks[t].connect.x)/v)+OptConstant.Common.SegDefLen;break}}}else for(let t=0;t<this.hooks.length;t++)if(this.hooks[t].hookpt===OptConstant.HookPts.KTR){const e=ObjectUtil$1.GetObjectPtr(this.hooks[t].objid,!1);if(e){p=e.GetTargetRect(),g=n?this.EndPoint.y+p.height*((v-this.hooks[t].connect.y)/v)+OptConstant.Common.SegDefLen:this.EndPoint.x+p.width*((v-this.hooks[t].connect.x)/v)+OptConstant.Common.SegDefLen;break}}p&&(f=n?o<p.height/2+OptConstant.Common.SegMinLen?1:0:o<p.width/2+OptConstant.Common.SegMinLen?1:0)}if(a<OptConstant.Common.SegMinSeg&&(a=0),t===OptConstant.ActionTriggerType.SeglPreserve&&(m=4===d),s&&(m=!0),m||!(o>OptConstant.Common.SegMinLen||a<OptConstant.Common.SegMinLen)||f){6!==d&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(l-u.y,r-u.x)):this.segl.pts.push(new Point$1(r-u.x,l-u.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne&&(this.segl.lengths[0]=n?i*(l-e.x):i*(l-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen));let s=l-i*this.segl.lengths[0];if(s<0&&(s=0),s>b.y&&(s=b.y),n?this.segl.pts.push(new Point$1(s-u.y,r-u.x)):this.segl.pts.push(new Point$1(r-u.x,s-u.y)),this.segl.lengths.length<2&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglTwo)this.segl.lengths[1]=n?e.y-r:e.x-r,this.segl.lengths[1]<OptConstant.Common.SegMinLen&&(this.segl.lengths[1]=OptConstant.Common.SegMinLen);else if(f){const t=g-r;this.segl.lengths[1]<t&&(this.segl.lengths[1]=t)}let a=r+this.segl.lengths[1];a<0&&(a=0),a>b.x&&(a=b.x),n?this.segl.pts.push(new Point$1(s-u.y,a-u.x)):this.segl.pts.push(new Point$1(a-u.x,s-u.y)),this.segl.lengths.length<3&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglThree&&(this.segl.lengths[2]=n?i*(c-e.x):i*(c-e.y),this.segl.lengths[2]<OptConstant.Common.SegMinLen&&(this.segl.lengths[2]=OptConstant.Common.SegMinLen));let o=c-i*this.segl.lengths[2];o<0&&(o=0),o>b.y&&(o=b.y),n?(this.segl.pts.push(new Point$1(o-u.y,a-u.x)),this.segl.pts.push(new Point$1(o-u.y,h-u.x)),this.segl.pts.push(new Point$1(c-u.y,h-u.x))):(this.segl.pts.push(new Point$1(a-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,c-u.y)))}else{4!==d&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(l-u.y,r-u.x)):this.segl.pts.push(new Point$1(r-u.x,l-u.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen);let s,a=this.segl.lengths[0];t===OptConstant.ActionTriggerType.SeglOne?(n?(this.segl.lengths[0]=i*(l-e.x),s=i*(c-e.x)):(this.segl.lengths[0]=i*(l-e.y),s=i*(c-e.y)),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen),s<OptConstant.Common.SegMinLen&&(s=OptConstant.Common.SegMinLen),s<a&&(a=s)):a>OptConstant.Common.SegDefLen&&(a=OptConstant.Common.SegDefLen);let o=l-i*this.segl.lengths[0];o<0&&(o=0),o>b.y&&(o=b.y);let p=c-i*a;p<0&&(p=0),p>b.y&&(p=b.y),-1===i?p>o&&(o=p):p<o&&(o=p),n?(this.segl.pts.push(new Point$1(o-u.y,r-u.x)),this.segl.pts.push(new Point$1(o-u.y,h-u.x)),this.segl.pts.push(new Point$1(c-u.y,h-u.x))):(this.segl.pts.push(new Point$1(r-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,o-u.y)),this.segl.pts.push(new Point$1(h-u.x,c-u.y)))}LogUtil.Debug("= S.SegmentedLine: SegLTopToTop output",{pts:this.segl.pts,lengths:this.segl.lengths})}SegLTopToBottom(t,e,i,n){let s,a,o,r,l,h;LogUtil.Debug("= S.SegmentedLine: SegLTopToBottom input",{actionType:t,targetPoint:e,directionFactor:i,isVertical:n});let c,u,d={x:0,y:0},p=this.segl.pts.length,g=0;const f=OptConstant.Common.DimMax;if(n){Math.abs(this.EndPoint.y-this.StartPoint.y),s=Math.abs(this.EndPoint.x-this.StartPoint.x),a=this.StartPoint.y,o=this.StartPoint.x,r=this.EndPoint.y,l=this.EndPoint.x,h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let t=h.x;h.x=h.y,h.y=t,PolyUtil.GetMaxDim(d),t=d.x,d.x=d.y,d.y=t}else Math.abs(this.EndPoint.x-this.StartPoint.x),s=Math.abs(this.EndPoint.y-this.StartPoint.y),a=this.StartPoint.x,o=this.StartPoint.y,r=this.EndPoint.x,l=this.EndPoint.y,h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),PolyUtil.GetMaxDim(d);if(c=-1===i?l-2*OptConstant.Common.SegMinLen>o:l+2*OptConstant.Common.SegMinLen<o,p=this.segl.pts.length,this.segl.pts.splice(0),t===OptConstant.ActionTriggerType.SeglPreserve&&(c=6!==p),c)if(Math.abs(a-r)<=1)n?(this.segl.pts.push(new Point$1(o-h.y,a-h.x)),this.segl.pts.push(new Point$1(l-h.y,a-h.x))):(this.segl.pts.push(new Point$1(a-h.x,o-h.y)),this.segl.pts.push(new Point$1(a-h.x,l-h.y))),this.segl.lengths.splice(0);else{4!==p&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(o-h.y,a-h.x)):this.segl.pts.push(new Point$1(a-h.x,o-h.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne?(this.segl.lengths[0]=n?i*(o-e.x):i*(o-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen)):(t!==OptConstant.ActionTriggerType.SeglPreserve&&this.segl.lengths[0]<OptConstant.Common.SegDefLen&&(this.segl.lengths[0]=OptConstant.Common.SegDefLen),this.segl.lengths[0]>s-OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=s-OptConstant.Common.SegMinLen)),u=o-i*this.segl.lengths[0],u<0&&(u=0),u>d.y&&(u=d.y);let c=l+i*OptConstant.Common.SegMinLen;c<0&&(c=0),c>d.y&&(c=d.y),-1===i?(c<o+OptConstant.Common.SegMinLen&&(c=o+OptConstant.Common.SegMinLen),c<u&&(u=c)):(c>o-OptConstant.Common.SegMinLen&&(c=o-OptConstant.Common.SegMinLen),c>u&&(u=c)),n?(this.segl.pts.push(new Point$1(u-h.y,a-h.x)),this.segl.pts.push(new Point$1(u-h.y,r-h.x)),this.segl.pts.push(new Point$1(l-h.y,r-h.x))):(this.segl.pts.push(new Point$1(a-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,l-h.y)))}else{if(this.hooks&&this.hooks.length>0)for(let t=0;t<this.hooks.length;t++)if(this.hooks[t].hookpt===OptConstant.HookPts.KTL){const e=ObjectUtil$1.GetObjectPtr(this.hooks[t].objid,!1);if(e){const i=e.GetTargetRect();g=n?a<=r?this.StartPoint.y+i.height*((f-this.hooks[t].connect.y)/f)+OptConstant.Common.SegDefLen:this.StartPoint.y+i.height*(this.hooks[t].connect.y/f)+OptConstant.Common.SegDefLen:a<=r?this.StartPoint.x+i.width*((f-this.hooks[t].connect.x)/f)+OptConstant.Common.SegDefLen:this.StartPoint.x+i.width*(this.hooks[t].connect.x/f)+OptConstant.Common.SegDefLen;break}}if(6!==p&&this.segl.lengths.splice(0),n?this.segl.pts.push(new Point$1(o-h.y,a-h.x)):this.segl.pts.push(new Point$1(a-h.x,o-h.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne&&(this.segl.lengths[0]=n?i*(o-e.x):i*(o-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen)),u=o-i*this.segl.lengths[0],u<0&&(u=0),u>d.y&&(u=d.y),n?this.segl.pts.push(new Point$1(u-h.y,a-h.x)):this.segl.pts.push(new Point$1(a-h.x,u-h.y)),this.segl.lengths.length<2&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglTwo)this.segl.lengths[1]=a<=r?n?e.y-a:e.x-a:n?-(e.y-a):-(e.x-a);else if(g){const t=g-a;this.segl.lengths[1]<t&&(this.segl.lengths[1]=t)}let s;a<=r?(s=a+this.segl.lengths[1],Math.abs(r-s)<OptConstant.Common.SegMinLen&&(s=s<r?r-OptConstant.Common.SegMinLen:r+OptConstant.Common.SegMinLen)):(s=a-this.segl.lengths[1],Math.abs(s-r)<OptConstant.Common.SegMinLen&&(s=s<r?r-OptConstant.Common.SegMinLen:r+OptConstant.Common.SegMinLen)),s<0&&(s=0),s>d.x&&(s=d.x),n?this.segl.pts.push(new Point$1(u-h.y,s-h.x)):this.segl.pts.push(new Point$1(s-h.x,u-h.y)),this.segl.lengths.length<3&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglThree&&(this.segl.lengths[2]=n?-i*(l-e.x):-i*(l-e.y),this.segl.lengths[2]<OptConstant.Common.SegMinLen&&(this.segl.lengths[2]=OptConstant.Common.SegMinLen)),u=l+i*this.segl.lengths[2],u<0&&(u=0),u>d.y&&(u=d.y),n?(this.segl.pts.push(new Point$1(u-h.y,s-h.x)),this.segl.pts.push(new Point$1(u-h.y,r-h.x)),this.segl.pts.push(new Point$1(l-h.y,r-h.x))):(this.segl.pts.push(new Point$1(s-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,u-h.y)),this.segl.pts.push(new Point$1(r-h.x,l-h.y)))}LogUtil.Debug("= S.SegmentedLine: SegLTopToBottom output",{pts:this.segl.pts,lengths:this.segl.lengths})}SegLTopToLeft(t,e,i,n,s,a){LogUtil.Debug("= S.SegmentedLine: SegLTopToLeft input",{actionType:t,point:e,primaryFactor:i,secondaryFactor:n,isVertical:s,directionFlag:a});let o,r,l,h,c,u,d,p,g,f,m,v,b,y=0,S=0,x=!1,w={},C={x:0,y:0};const T=OptConstant.Common.DimMax;if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),DrawUtil.AllowAutoInsert()&&(x=!0),Math.abs(this.EndPoint.x-this.StartPoint.x),Math.abs(this.EndPoint.y-this.StartPoint.y),s?(f=this.StartPoint.y,m=this.StartPoint.x,v=this.EndPoint.y,b=this.EndPoint.x,w=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=w.x,w.x=w.y,w.y=l,PolyUtil.GetMaxDim(C),l=C.x,C.x=C.y,C.y=l):(f=this.StartPoint.x,m=this.StartPoint.y,v=this.EndPoint.x,b=this.EndPoint.y,w=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),PolyUtil.GetMaxDim(C)),g=this.segl.pts.length,this.segl.pts.splice(0),c=-1==n?f-2*OptConstant.Common.SegMinLen>v:f+2*OptConstant.Common.SegMinLen<v,h=-1==i?b-2*OptConstant.Common.SegMinLen>m&&c:b+2*OptConstant.Common.SegMinLen<m&&c,t===OptConstant.ActionTriggerType.SeglPreserve&&(h=5!==g),a&&(h=!0),h)this.segl.lengths.splice(0),s?(this.segl.pts.push(new Point$1(m-w.y,f-w.x)),this.segl.pts.push(new Point$1(b-w.y,f-w.x)),this.segl.pts.push(new Point$1(b-w.y,v-w.x))):(this.segl.pts.push(new Point$1(f-w.x,m-w.y)),this.segl.pts.push(new Point$1(f-w.x,b-w.y)),this.segl.pts.push(new Point$1(v-w.x,b-w.y)));else{if(c=f<v,5!=g&&this.segl.lengths.splice(0),this.hooks)if(c){if(-1===n){for(y=s?this.EndPoint.y+OptConstant.Common.SegDefLen:this.EndPoint.x+OptConstant.Common.SegDefLen,d=0;d<this.hooks.length;d++)if(this.hooks[d].hookpt===OptConstant.HookPts.KTR){if(u=ObjectUtil$1.GetObjectPtr(this.hooks[d].objid,!1),u){const t=u.GetTargetRect();S=m-(t.y+t.height)<OptConstant.Common.SegDefLen+OptConstant.Common.SegMinLen?s?this.EndPoint.x-t.width*(this.hooks[d].connect.x/T)-OptConstant.Common.SegDefLen:this.EndPoint.y-t.height*(this.hooks[d].connect.y/T)-OptConstant.Common.SegDefLen:s?this.EndPoint.x+t.width*((T-this.hooks[d].connect.x)/T)+OptConstant.Common.SegDefLen:this.EndPoint.y+t.height*((T-this.hooks[d].connect.y)/T)+OptConstant.Common.SegDefLen}break}}else for(d=0;d<this.hooks.length;d++)if(this.hooks[d].hookpt===OptConstant.HookPts.KTR){if(u=ObjectUtil$1.GetObjectPtr(this.hooks[d].objid,!1),u){const t=u.GetTargetRect();y=s?this.StartPoint.y+t.height/2+OptConstant.Common.SegDefLen:this.StartPoint.x+t.width/2+OptConstant.Common.SegDefLen}break}}else for(d=0;d<this.hooks.length;d++)if(this.hooks[d].hookpt===OptConstant.HookPts.KTR){if(u=ObjectUtil$1.GetObjectPtr(this.hooks[d].objid,!1),u){const t=u.GetTargetRect();S=s?this.EndPoint.x-t.width/2-OptConstant.Common.SegDefLen:this.EndPoint.y-t.height/2-OptConstant.Common.SegDefLen}break}if(x&&(S=0,y=0),s?this.segl.pts.push(new Point$1(m-w.y,f-w.x)):this.segl.pts.push(new Point$1(f-w.x,m-w.y)),this.segl.lengths.length<1&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglOne&&(this.segl.lengths[0]=s?i*(m-e.x):i*(m-e.y),this.segl.lengths[0]<OptConstant.Common.SegMinLen&&(this.segl.lengths[0]=OptConstant.Common.SegMinLen)),p=i*this.segl.lengths[0],c?S&&(p=m-S,p<OptConstant.Common.SegDefLen&&(p=OptConstant.Common.SegDefLen),p<this.segl.lengths[0]&&(p=i*this.segl.lengths[0])):S&&(p=m-S,-1===i?-p<OptConstant.Common.SegDefLen&&(p=-OptConstant.Common.SegDefLen):p<OptConstant.Common.SegDefLen&&(p=OptConstant.Common.SegDefLen),this.segl.lengths[0]<i*p&&(p=i*this.segl.lengths[0])),this.segl.lengths[0]>i*p&&(p=i*this.segl.lengths[0]),o=m-p,o<0&&(o=0),o>C.y&&(o=C.y),s?this.segl.pts.push(new Point$1(o-w.y,f-w.x)):this.segl.pts.push(new Point$1(f-w.x,o-w.y)),this.segl.lengths.length<2&&this.segl.lengths.push(OptConstant.Common.SegDefLen),t===OptConstant.ActionTriggerType.SeglTwo&&(c?s?(-1===n?e.y<v+OptConstant.Common.SegDefLen&&(e.y=v+OptConstant.Common.SegDefLen):e.y>v-OptConstant.Common.SegDefLen&&(e.y=v-OptConstant.Common.SegDefLen),this.segl.lengths[1]=Math.abs(e.y-f)):(-1===n?e.x<v+OptConstant.Common.SegDefLen&&(e.x=v+OptConstant.Common.SegDefLen):e.x>v-OptConstant.Common.SegDefLen&&(e.x=v-OptConstant.Common.SegDefLen),this.segl.lengths[1]=Math.abs(e.x-f)):s?(-1===n?e.y<v-OptConstant.Common.SegMinLen&&(e.y=v-OptConstant.Common.SegMinLen):e.y>v+OptConstant.Common.SegMinLen&&(e.y=v+OptConstant.Common.SegMinLen),this.segl.lengths[1]=Math.abs(e.y-f)):(e.x>f-OptConstant.Common.SegMinLen&&(e.x=f-OptConstant.Common.SegMinLen),this.segl.lengths[1]=Math.abs(e.x-f))),c)p=this.segl.lengths[1],y&&y>this.segl.lengths[1]+f&&(p=y-f),r=f+p,-1==n?r<=v&&(r=f+p):r>=v&&(r=f-p);else{r=f-this.segl.lengths[1];const t=v-n*OptConstant.Common.SegDefLen;-1==n&&this.segl.lengths[1]!=OptConstant.Common.SegDefLen?t>r&&(r=t):t<r&&(r=t)}r<0&&(r=0),r>C.x&&(r=C.x),s?(this.segl.pts.push(new Point$1(o-w.y,r-w.x)),this.segl.pts.push(new Point$1(b-w.y,r-w.x)),this.segl.pts.push(new Point$1(b-w.y,v-w.x))):(this.segl.pts.push(new Point$1(r-w.x,o-w.y)),this.segl.pts.push(new Point$1(r-w.x,b-w.y)),this.segl.pts.push(new Point$1(v-w.x,b-w.y)))}LogUtil.Debug("= S.SegmentedLine: SegLTopToLeft output",{pts:this.segl.pts,lengths:this.segl.lengths})}GetCornerSize(t,e){LogUtil.Debug("= S.SegmentedLine: GetCornerSize input",{cornerBaseSize:t,maxCornerSize:e});const i=Math.min(t,e),n=this.segl.curveparam,s=.4*i,a=n>s?s:n;return LogUtil.Debug("= S.SegmentedLine: GetCornerSize output",{cornerSize:a}),a}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.SegmentedLine: GetPolyPoints input",{maxPointCount:t,shouldTranslatePoints:e,shouldSkipCurves:i,reserved:n,extraOptions:s});let a=[],o=0;if(this.segl&&this.segl.pts.length){const t=this.segl.pts.length;if(this.segl.curveparam>0&&!i)for(let e=0;e<t;e++){let i,n,s,r=0,l=0,h=!1;e>0&&e<t-1?(this.segl.pts[e].x===this.segl.pts[e-1].x?(r=Math.abs(this.segl.pts[e].y-this.segl.pts[e-1].y),h=!0,i=this.segl.pts[e].y-this.segl.pts[e-1].y>0?1:-1):(r=Math.abs(this.segl.pts[e].x-this.segl.pts[e-1].x),i=this.segl.pts[e].x-this.segl.pts[e-1].x>0?1:-1),this.segl.pts[e].x===this.segl.pts[e+1].x?(l=Math.abs(this.segl.pts[e].y-this.segl.pts[e+1].y),n=this.segl.pts[e+1].y-this.segl.pts[e].y>0?1:-1):(l=Math.abs(this.segl.pts[e].x-this.segl.pts[e+1].x),n=this.segl.pts[e+1].x-this.segl.pts[e].x>0?1:-1),o=this.GetCornerSize(r,l),h?(a.push(new Point$1(this.segl.pts[e].x,this.segl.pts[e].y-o*i)),s=T3Gv.opt.LinesAddCurve(!0,i,n,this.segl.pts[e].x,this.segl.pts[e].y,o),a=a.concat(s)):(a.push(new Point$1(this.segl.pts[e].x-o*i,this.segl.pts[e].y)),s=T3Gv.opt.LinesAddCurve(!1,i,n,this.segl.pts[e].x,this.segl.pts[e].y,o),a=a.concat(s))):a.push(new Point$1(this.segl.pts[e].x,this.segl.pts[e].y))}else for(let e=0;e<t;e++)a.push(new Point$1(this.segl.pts[e].x,this.segl.pts[e].y));if(!e){const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);for(let e=0;e<a.length;e++)a[e].x+=t.x,a[e].y+=t.y}}else a=super.GetPolyPoints(t,e,!0,s);return LogUtil.Debug("= S.SegmentedLine: GetPolyPoints output",a),a}LMDrawPreTrack(t){LogUtil.Debug("= S.SegmentedLine: LMDrawPreTrack input",{svgDoc:t});const e=super.LMDrawPreTrack(t);let i;return LogUtil.Debug("= S.SegmentedLine: Base LMDrawPreTrack output",{basePreTrackResult:e}),T3Gv.opt.linkParams&&T3Gv.opt.linkParams.SConnectIndex>=0&&(i=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.SConnectIndex,!1),i&&(this.segl.firstdir=i.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.EndPoint,t),LogUtil.Debug("= S.SegmentedLine: Updated segl.firstdir",{firstdir:this.segl.firstdir}))),LogUtil.Debug("= S.SegmentedLine: LMDrawPreTrack output",{result:!0}),!0}AdjustLine(t,e,i,n){let s,a;LogUtil.Debug("= S.SegmentedLine: AdjustLine input",{svgDoc:t,newX:e,newY:i,triggerType:n}),t&&(s=t.GetElementById(OptConstant.SVGElementClass.Shape),a=t.GetElementById(OptConstant.SVGElementClass.Slop));const o=new Point$1(e,i);this.SegLFormat(o,n,0),this.CalcFrame();const r=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),l=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);t&&(t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(r.x,r.y),s.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(s,l),a.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(a,l),new SelectionAttr,this.UpdateDimensionLines(t),UIUtil.UpdateDisplayCoordinates(this.Frame,o,CursorConstant.CursorTypes.Grow,this),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame)),LogUtil.Debug("= S.SegmentedLine: AdjustLine output",{Frame:this.Frame,adjustmentPoint:o})}AdjustLineEnd(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: AdjustLineEnd input",{svgDocument:t,newEndX:e,newEndY:i,triggerType:n});const s={x:this.EndPoint.x,y:this.EndPoint.y};this.EndPoint.x=e,this.EndPoint.y=i,this.EnforceMinimum(!1),e=this.EndPoint.x,i=this.EndPoint.y,this.EndPoint.x=s.x,this.EndPoint.y=s.y;const a={x:e,y:i};if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1);t&&(this.segl.lastdir=t.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.StartPoint,a))}else T3Gv.opt.ob&&T3Gv.opt.ob.BlockID===this.BlockID&&(this.segl.firstdir=T3Gv.opt.ob.segl.firstdir,this.segl.lastdir=T3Gv.opt.ob.segl.lastdir);this.AdjustLine(t,e,i,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("= S.SegmentedLine: AdjustLineEnd output",{EndPoint:this.EndPoint,segl:this.segl})}AdjustLineStart(t,e,i){LogUtil.Debug("= S.SegmentedLine: AdjustLineStart input",{svgDocument:t,newStartX:e,newStartY:i});const n={x:this.StartPoint.x,y:this.StartPoint.y},s=OptConstant.Common.MinDim;this.StartPoint.x=e,this.StartPoint.y=i,this.EnforceMinimum(!0);const a=this.StartPoint.x,o=this.StartPoint.y;this.StartPoint.x=n.x,this.StartPoint.y=n.y,this.segl.pts[0].x===this.segl.pts[1].x?(this.segl.lengths[0]+=this.StartPoint.y-o,this.segl.lengths[0]<s&&(this.segl.lengths[0]=s)):(this.segl.lengths[0]+=this.StartPoint.x-a,this.segl.lengths[0]<s&&(this.segl.lengths[0]=s));const r={x:a,y:o};if(T3Gv.opt.linkParams&&T3Gv.opt.linkParams.ConnectIndex>=0){const t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linkParams.ConnectIndex,!1);t&&(this.segl.firstdir=t.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.EndPoint,r))}else T3Gv.opt.ob&&T3Gv.opt.ob.BlockID===this.BlockID&&(this.segl.firstdir=T3Gv.opt.ob.segl.firstdir,this.segl.lastdir=T3Gv.opt.ob.segl.lastdir);this.AdjustLine(t,a,o,OptConstant.ActionTriggerType.LineStart),LogUtil.Debug("= S.SegmentedLine: AdjustLineStart output",{originalStartPoint:n,adjustedPoint:r,seglFirstDir:this.segl.firstdir,seglLength0:this.segl.lengths[0]})}GetDimensions(){LogUtil.Debug("= S.SegmentedLine: GetDimensions input",{StartPoint:this.StartPoint,EndPoint:this.EndPoint});const t={x:Math.abs(this.EndPoint.x-this.StartPoint.x),y:Math.abs(this.EndPoint.y-this.StartPoint.y)};return LogUtil.Debug("= S.SegmentedLine: GetDimensions output",t),t}GetDimensionsForDisplay(){LogUtil.Debug("= S.SegmentedLine: GetDimensionsForDisplay input",{Frame:this.Frame});const t={x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height};return LogUtil.Debug("= S.SegmentedLine: GetDimensionsForDisplay output",t),t}UpdateDimensions(t,e,i){LogUtil.Debug("= S.SegmentedLine: UpdateDimensions input",{offsetElement:t,offsetX:e,offsetY:i});const n=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),s=e?this.StartPoint.x+e:this.EndPoint.x,a=i?this.StartPoint.y+i:this.EndPoint.y;LogUtil.Debug("= S.SegmentedLine: UpdateDimensions computed",{newEndX:s,newEndY:a}),this.AdjustLineEnd(n,s,a,OptConstant.ActionTriggerType.LineEnd),LogUtil.Debug("= S.SegmentedLine: UpdateDimensions output",{EndPoint:this.EndPoint})}SetSize(t,e,i){LogUtil.Debug("= S.SegmentedLine: SetSize input",{newWidth:t,newHeight:e,forceFlag:i});let n=!1,s=0,a=0;t&&(s=t-this.Frame.width),e&&(a=e-this.Frame.height),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),(this.StartPoint.x<this.EndPoint.x||Utils2.IsEqual(this.StartPoint.x,this.EndPoint.x)&&this.StartPoint.y<this.EndPoint.y)&&(n=!0);const o=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);n?this.AdjustLineEnd(o,this.EndPoint.x+s,this.EndPoint.y+a,0):this.AdjustLineStart(o,this.StartPoint.x+s,this.StartPoint.y+a,0),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("= S.SegmentedLine: SetSize output",{deltaWidth:s,deltaHeight:a,isEndAdjusted:n})}Flip(t){LogUtil.Debug("= S.SegmentedLine: Flip input",{flipFlags:t});let e,i,n,s=!1,a=[];const o=NvConstant.SegLDir;if(T3Gv.opt.ob=Utils1.DeepCopy(this),t&OptConstant.ExtraFlags.FlipVert){switch(s=!0,this.segl.firstdir){case o.Ktc:this.segl.firstdir=o.Kbc;break;case o.Kbc:this.segl.firstdir=o.Ktc}switch(this.segl.lastdir){case o.Ktc:this.segl.lastdir=o.Kbc;break;case o.Kbc:this.segl.lastdir=o.Ktc}e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);const t=this.segl.pts.length;for(i=0;i<t;i++)a.push(new Point$1(this.segl.pts[i].x,this.segl.pts[i].y+e.y-this.Frame.y));const r=this.Frame.height;for(i=0;i<t;i++)a[i].y=r-a[i].y;for(this.StartPoint.y=a[0].y+this.Frame.y,this.EndPoint.y=a[t-1].y+this.Frame.y,n=this.EndPoint.y<this.StartPoint.y?this.EndPoint.y-this.Frame.y:this.StartPoint.y-this.Frame.y,i=0;i<t;i++)this.segl.pts[i].y=a[i].y-n;a=[]}if(t&OptConstant.ExtraFlags.FlipHoriz){switch(s=!0,this.segl.firstdir){case o.Klc:this.segl.firstdir=o.Krc;break;case o.Krc:this.segl.firstdir=o.Klc}switch(this.segl.lastdir){case o.Klc:this.segl.lastdir=o.Krc;break;case o.Krc:this.segl.lastdir=o.Klc}e=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);const t=this.segl.pts.length;for(i=0;i<t;i++)a.push(new Point$1(this.segl.pts[i].x+e.x-this.Frame.x,this.segl.pts[i].y));const r=this.Frame.width;for(i=0;i<t;i++)a[i].x=r-a[i].x;for(this.StartPoint.x=a[0].x+this.Frame.x,this.EndPoint.x=a[t-1].x+this.Frame.x,n=this.EndPoint.x<this.StartPoint.x?this.EndPoint.x-this.Frame.x:this.StartPoint.x-this.Frame.x,i=0;i<t;i++)this.segl.pts[i].x=a[i].x-n;a=[]}if(s){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),T3Gv.opt.ob.Frame&&HookUtil.MaintainLink(this.BlockID,this,T3Gv.opt.ob,OptConstant.ActionTriggerType.Rotate),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move)}T3Gv.opt.ob={},LogUtil.Debug("= S.SegmentedLine: Flip output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint,segl:this.segl})}GetFrameIntersects(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects input",{intersectFrame:t,shapeDoc:e,outputPoints:i,resultContext:n});const s=2*OptConstant.Common.SegMinLen,a=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height};const r=this.segl.pts.length;for(let l=1;l<r;l++)if(this.segl.pts[l].x===this.segl.pts[l-1].x){let r=this.segl.pts[l].y<this.segl.pts[l-1].y?this.segl.pts[l].y:this.segl.pts[l-1].y,h=this.segl.pts[l].y>this.segl.pts[l-1].y?this.segl.pts[l].y:this.segl.pts[l-1].y;const c=this.segl.pts[l].x;if(r+s<o.y&&h-s>o.y+o.height&&c>o.x&&c<o.x+o.width)return e.AdjustAutoInsertShape(t,!0),n.AutoSeg=l,o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height},this.segl.pts[l-1].y<this.segl.pts[l].y?(i.push(new Point$1(c+a.x,o.y+a.y)),i[0].index=l,i.push(new Point$1(c+a.x,o.y+o.height+a.y)),i[1].index=l):(i.push(new Point$1(c+a.x,o.y+o.height+a.y)),i.push(new Point$1(c+a.x,o.y+a.y)),i[0].index=l,i[1].index=l),LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects output",{outputPoints:i,resultContext:n,hitSegment:l}),!0}else{let r=this.segl.pts[l].x<this.segl.pts[l-1].x?this.segl.pts[l].x:this.segl.pts[l-1].x,h=this.segl.pts[l].x>this.segl.pts[l-1].x?this.segl.pts[l].x:this.segl.pts[l-1].x;const c=this.segl.pts[l].y;if(r+s<o.x&&h-s>o.x+o.width&&c>o.y&&c<o.y+o.height)return e.AdjustAutoInsertShape(t,!1),n.AutoSeg=l,o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height},this.segl.pts[l-1].x<this.segl.pts[l].x?(i.push(new Point$1(o.x+a.x,c+a.y)),i.push(new Point$1(o.x+o.width+a.x,c+a.y)),i[0].index=l,i[1].index=l):(i.push(new Point$1(o.x+o.width+a.x,c+a.y)),i.push(new Point$1(o.x+a.x,c+a.y)),i[0].index=l,i[1].index=l),LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects output",{outputPoints:i,resultContext:n,hitSegment:l}),!0}return LogUtil.Debug("= S.SegmentedLine: GetFrameIntersects output",{result:!1}),!1}NoRotate(){LogUtil.Debug("= S.SegmentedLine: NoRotate input",{});return LogUtil.Debug("= S.SegmentedLine: NoRotate output",true),true}CalcTextPosition(t){LogUtil.Debug("= S.SegmentedLine: CalcTextPosition input",{textPositioningParams:t});const e={x:t.Frame.x+t.Frame.width/2-this.Frame.x,y:t.Frame.y+t.Frame.height/2-this.Frame.y};LogUtil.Debug("= S.SegmentedLine: Center calculated",{centerPoint:e});const i=this.segl.pts.length;let n,s=1,a=0;const o=[];let r=0;for(let p=1;p<i;p++){const t=this.segl.pts[p-1],i=this.segl.pts[p];if(Utils2.IsEqual(t.x,i.x)){const l=Math.min(t.y,i.y),h=Math.max(t.y,i.y),c=Math.abs(e.x-t.x);e.y>=l&&e.y<=h&&(void 0===n||c<n)&&(n=c,s=p,a=t.y);const u=Math.abs(t.y-i.y);o.push(u),r+=u,LogUtil.Debug("= S.SegmentedLine: Vertical segment",{index:p,segmentLength:u,totalSegmentLength:r})}else{const l=Math.min(t.x,i.x),h=Math.max(t.x,i.x),c=Math.abs(e.y-t.y);e.x>=l&&e.x<=h&&(void 0===n||c<n)&&(n=c,s=p,a=t.x);const u=Math.abs(t.x-i.x);o.push(u),r+=u,LogUtil.Debug("= S.SegmentedLine: Horizontal segment",{index:p,segmentLength:u,totalSegmentLength:r})}}LogUtil.Debug("= S.SegmentedLine: Chosen segment",{bestSegmentIndex:s,minimumDistance:n,segmentReferenceCoordinate:a,totalSegmentLength:r});const l=this.segl.pts[s-1],h=this.segl.pts[s];let c,u;Utils2.IsEqual(l.x,h.x)?(c=Math.abs(e.y-a),u=-(e.x-l.x),LogUtil.Debug("= S.SegmentedLine: Vertical offset",{offsetAlongSegment:c,offsetAcrossSegment:u})):(c=Math.abs(e.x-a),u=e.y-l.y,LogUtil.Debug("= S.SegmentedLine: Horizontal offset",{offsetAlongSegment:c,offsetAcrossSegment:u}));let d=0;for(let p=0;p<s-1;p++)d+=o[p];d+=c,LogUtil.Debug("= S.SegmentedLine: Accumulated distance",{accumulatedDistance:d}),this.LineTextX=r?d/r:0,this.LineTextY=u,this.LineTextX&&(this.trect=Utils1.DeepCopy(t.trect)),t.TextGrow=NvConstant.TextGrowBehavior.Vertical,this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!0),LogUtil.Debug("= S.SegmentedLine: CalcTextPosition output",{LineTextX:this.LineTextX,LineTextY:this.LineTextY,trect:this.trect})}GetTextOnLineParams(t){let e,i,n,s,a;LogUtil.Debug("= S.SegmentedLine: GetTextOnLineParams input",{textOptions:t});let o=0,r=.5;const l={Frame:new Instance.Shape.Rect,StartPoint:new Point$1(0,0),EndPoint:new Point$1(0,0),CenterProp:0},h=this.segl.pts,c=h.length;let u=!1;if(h[0].x<h[c-1].x||h[0].x===h[c-1].x&&h[0].y<h[c-1].y?(e=0,i=c-2):(e=c-2,i=0,u=!0),0!==this.LineTextX){let t=0;for(let i=1;i<c;i++)Utils2.IsEqual(h[i-1].x,h[i].x)?t+=Math.abs(h[i-1].y-h[i].y):t+=Math.abs(h[i-1].x-h[i].x);const e=this.LineTextX*t;LogUtil.Debug("= S.SegmentedLine: Total line length calculated",{totalLineLength:t,targetDistance:e}),o=0,n=c-2;for(let i=1;i<c;i++)if(a=Utils2.IsEqual(h[i-1].x,h[i].x)?Math.abs(h[i-1].y-h[i].y):Math.abs(h[i-1].x-h[i].x),o+=a,o>e){n=i-1,r=(a-(o-e))/a;break}l.CenterProp=r,l.Frame=Utils1.DeepCopy(this.Frame),l.StartPoint.x=l.Frame.x+h[n].x,l.StartPoint.y=l.Frame.y+h[n].y,l.EndPoint.x=l.Frame.x+h[n+1].x,l.EndPoint.y=l.Frame.y+h[n+1].y}else{switch(c){case 2:n=0;break;case 3:Utils2.IsEqual(h[0].x,h[1].x)?(s=Math.abs(h[0].y-h[1].y),a=Math.abs(h[1].x-h[2].x)):(s=Math.abs(h[0].x-h[1].x),a=Math.abs(h[1].y-h[2].y)),n=s>a?0:1;break;case 5:Utils2.IsEqual(h[1].x,h[2].x)?(s=Math.abs(h[1].y-h[2].y),a=Math.abs(h[2].x-h[3].x)):(s=Math.abs(h[1].x-h[2].x),a=Math.abs(h[2].y-h[3].y)),n=s>a?1:2;break;default:n=Math.round((c-1.1)/2)}switch(this.TextAlign){case TextConstant.TextAlign.TopLeft:case TextConstant.TextAlign.Left:case TextConstant.TextAlign.BottomLeft:u?(l.EndPoint.x=this.Frame.x+h[e].x,l.EndPoint.y=this.Frame.y+h[e].y,l.StartPoint.x=this.Frame.x+h[e+1].x,l.StartPoint.y=this.Frame.y+h[e+1].y):(l.StartPoint.x=this.Frame.x+h[e].x,l.StartPoint.y=this.Frame.y+h[e].y,l.EndPoint.x=this.Frame.x+h[e+1].x,l.EndPoint.y=this.Frame.y+h[e+1].y);break;case TextConstant.TextAlign.TopRight:case TextConstant.TextAlign.Right:case TextConstant.TextAlign.BottomRight:u?(l.EndPoint.x=this.Frame.x+h[i].x,l.EndPoint.y=this.Frame.y+h[i].y,l.StartPoint.x=this.Frame.x+h[i+1].x,l.StartPoint.y=this.Frame.y+h[i+1].y):(l.StartPoint.x=this.Frame.x+h[i].x,l.StartPoint.y=this.Frame.y+h[i].y,l.EndPoint.x=this.Frame.x+h[i+1].x,l.EndPoint.y=this.Frame.y+h[i+1].y);break;default:u?(l.EndPoint.x=this.Frame.x+h[n].x,l.EndPoint.y=this.Frame.y+h[n].y,l.StartPoint.x=this.Frame.x+h[n+1].x,l.StartPoint.y=this.Frame.y+h[n+1].y):(l.StartPoint.x=this.Frame.x+h[n].x,l.StartPoint.y=this.Frame.y+h[n].y,l.EndPoint.x=this.Frame.x+h[n+1].x,l.EndPoint.y=this.Frame.y+h[n+1].y)}l.Frame=Utils1.DeepCopy(this.Frame)}return LogUtil.Debug("= S.SegmentedLine: GetTextOnLineParams output",l),l}CreateActionTriggers(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: CreateActionTriggers input",{svgDocument:t,objectId:e,optionalParam:i,connectedObjectId:n});const s=t.CreateShape(OptConstant.CSType.Group),a=OptConstant.Common.KnobSize;let o=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(o*=2);const r=a/o,l=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let h=this.Frame.width+r,c=this.Frame.height+r;const u=ObjectUtil$1.GetObjectPtr(e,!1),d=Utils1.DeepCopy(this.Frame);d.x-=r/2,d.y-=r/2,d.width+=r,d.height+=r;let p={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:r,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:this.CalcCursorForSegment(this.StartPoint,this.EndPoint,!1),locked:!1};if(e!=n&&(p.fillColor="white",p.strokeSize=1,p.strokeColor="black",p.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(p.fillColor="gray",p.locked=!0):this.NoGrow()&&(p.fillColor="red",p.strokeColor="red",p.cursorType=CursorConstant.CursorType.Default),p.x=this.StartPoint.x-this.Frame.x,p.y=this.StartPoint.y-this.Frame.y,p.knobID=OptConstant.ActionTriggerType.LineStart,u&&u.hooks)for(let m=0;m<u.hooks.length;m++)if(u.hooks[m].hookpt===OptConstant.HookPts.KTL){p.shapeType=OptConstant.CSType.Oval;break}let g=this.GenericKnob(p);if(s.AddElement(g),p.shapeType=OptConstant.CSType.Rect,u&&u.hooks)for(let m=0;m<u.hooks.length;m++)if(u.hooks[m].hookpt===OptConstant.HookPts.KTR){p.shapeType=OptConstant.CSType.Oval;break}p.x=this.EndPoint.x-this.Frame.x,p.y=this.EndPoint.y-this.Frame.y,p.knobID=OptConstant.ActionTriggerType.LineEnd;let f=this.GenericKnob(p);if(s.AddElement(f),p.shapeType=OptConstant.CSType.Rect,this.segl&&this.segl.pts&&this.segl.firstdir>0){const t=this.segl.pts.length;for(let e=2;e<t-1;e++){this.segl.pts[e-1].x===this.segl.pts[e].x?(p.x=this.segl.pts[e].x+l.x-this.Frame.x,p.y=(this.segl.pts[e-1].y+this.segl.pts[e].y)/2+l.y-this.Frame.y):(p.y=this.segl.pts[e].y+l.y-this.Frame.y,p.x=(this.segl.pts[e-1].x+this.segl.pts[e].x)/2+l.x-this.Frame.x),p.cursorType=this.CalcCursorForSegment(this.segl.pts[e],this.segl.pts[e-1],!0),p.knobID=OptConstant.ActionTriggerType.SeglOne+e-2,this.NoGrow()&&(p.cursorType=CursorConstant.CursorType.Default);let t=this.GenericKnob(p);s.AddElement(t)}}return s.SetSize(h,c),s.SetPos(d.x,d.y),s.isShape=!0,s.SetID(OptConstant.Common.Action+e),LogUtil.Debug("= S.SegmentedLine: CreateActionTriggers output",{knobGroup:s,adjustedFrame:d,adjustedWidth:h,adjustedHeight:c}),s}ModifyShape(t,e,i,n,s){LogUtil.Debug("= S.SegmentedLine: ModifyShape input",{svgDocument:t,newXCoord:e,newYCoord:i,triggerType:n,extraData:s});const a=t.GetElementById(OptConstant.SVGElementClass.Shape),o=t.GetElementById(OptConstant.SVGElementClass.Slop),r=new Point$1(e,i);this.SegLFormat(r,n,0),this.CalcFrame();const l=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,null),h=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(h.x,h.y),a.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(a,l),o.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(o,l),this.UpdateDimensionLines(t),-1!==this.DataID&&this.LMResizeSVGTextObject(t,this,this.Frame),LogUtil.Debug("= S.SegmentedLine: ModifyShape output",{Frame:this.Frame,polylinePoints:l,boundingRect:h})}OnConnect(t,e,i,n,s){let a,o;LogUtil.Debug("= S.SegmentedLine: OnConnect input",{elementId:t,connectedObject:e,hookPoint:i,connectionCoordinate:n,extraData:s});let r=0;const l=T3Gv.opt.svgObjectLayer.GetElementById(t);switch(i){case OptConstant.HookPts.KTL:this.segl.firstdir=e.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.EndPoint,n),r=OptConstant.ActionTriggerType.LineEnd,a=this.EndPoint.x,o=this.EndPoint.y;break;case OptConstant.HookPts.KTR:this.segl.lastdir=e.GetSegLFace(T3Gv.opt.linkParams.ConnectPt,this.StartPoint,n),r=OptConstant.ActionTriggerType.LineStart,a=this.StartPoint.x,o=this.StartPoint.y;break;default:LogUtil.Debug("= S.SegmentedLine: OnConnect unknown hookPoint",{hookPoint:i})}r&&(LogUtil.Debug("= S.SegmentedLine: OnConnect calling AdjustLine",{svgDocument:l,adjustXCoord:a,adjustYCoord:o,actionTrigger:r}),this.AdjustLine(l,a,o,r)),LogUtil.Debug("= S.SegmentedLine: OnConnect output")}OnDisconnect(t,e,i,n){LogUtil.Debug("= S.SegmentedLine: OnDisconnect input",{elementId:t,unusedParam:e,hookType:i,extraData:n});let s=0,a=0,o=0;const r=T3Gv.opt.svgObjectLayer.GetElementById(t);switch(T3Gv.opt.ob&&T3Gv.opt.ob.BlockID===this.BlockID&&(this.segl.firstdir=T3Gv.opt.ob.segl.firstdir,this.segl.lastdir=T3Gv.opt.ob.segl.lastdir),i){case OptConstant.HookPts.KTL:o=OptConstant.ActionTriggerType.LineEnd,s=this.EndPoint.x,a=this.EndPoint.y,this.segl.firstdir=0,T3Gv.opt.ob&&T3Gv.opt.ob.segl&&(T3Gv.opt.ob.segl.firstdir=0);break;case OptConstant.HookPts.KTR:o=OptConstant.ActionTriggerType.LineStart,s=this.StartPoint.x,a=this.StartPoint.y,this.segl.lastdir=0,T3Gv.opt.ob&&T3Gv.opt.ob.segl&&(T3Gv.opt.ob.segl.lastdir=0)}o&&(LogUtil.Debug("= S.SegmentedLine: OnDisconnect - calling AdjustLine",{svgDocument:r,adjustXCoord:s,adjustYCoord:a,actionTrigger:o}),this.AdjustLine(r,s,a,o)),LogUtil.Debug("= S.SegmentedLine: OnDisconnect output",{updatedStartPoint:this.StartPoint,updatedEndPoint:this.EndPoint,actionTrigger:o})}LinkGrow(t,e,i){switch(LogUtil.Debug("= S.SegmentedLine: LinkGrow input",{elementId:t,hookType:e,newPosition:i}),e){case OptConstant.HookPts.KTL:Utils2.IsEqual(i.x,this.StartPoint.x)&&Utils2.IsEqual(i.y,this.StartPoint.y)||this.SegLFormat(i,OptConstant.ActionTriggerType.LineStart,0);break;case OptConstant.HookPts.KTR:Utils2.IsEqual(i.x,this.EndPoint.x)&&Utils2.IsEqual(i.y,this.EndPoint.y)||this.SegLFormat(i,OptConstant.ActionTriggerType.LineEnd,0)}this.CalcFrame(!0),OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),ObjectUtil$1.AddToDirtyList(t),LogUtil.Debug("= S.SegmentedLine: LinkGrow output",{StartPoint:this.StartPoint,EndPoint:this.EndPoint})}HookToPoint(t,e){LogUtil.Debug("= S.SegmentedLine: HookToPoint input",{hookId:t,outRect:e});const i=OptConstant.HookPts;let n={x:0,y:0},s={x:0,y:0},a={};switch(t){case i.KTL:n.x=this.StartPoint.x,n.y=this.StartPoint.y,e&&(s.x=this.StartPoint.x+this.segl.pts[1].x,s.y=this.StartPoint.y+this.segl.pts[1].y,a=Utils2.Pt2Rect(this.StartPoint,s),e.x=a.x,e.y=a.y,e.width=a.width,e.height=a.height);break;case i.KTR:default:n.x=this.EndPoint.x,n.y=this.EndPoint.y;const t=this.segl.pts.length;e&&(s.x=this.StartPoint.x+this.segl.pts[t-2].x,s.y=this.StartPoint.y+this.segl.pts[t-2].y,a=Utils2.Pt2Rect(this.EndPoint,s),e.x=a.x,e.y=a.y,e.width=a.width,e.height=a.height)}return LogUtil.Debug("= S.SegmentedLine: HookToPoint output",{resultPoint:n,segmentRect:a}),n}GetTargetPoints(t,e,i){LogUtil.Debug("= S.SegmentedLine: GetTargetPoints input",{hookData:t,targetFlags:e,connectedObjectId:i});const n=OptConstant.HookPts,s=OptConstant.Common.DimMax;let a=[{x:0,y:0,id:n.SED_KTL},{x:s,y:s,id:n.SED_KTR}];if(null!=i&&i>=0&&ObjectUtil$1.GetObjectPtr(i,!1).DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){let e=t.id;switch(t.id>=n.CustomBase&&(e=n.CustomBase),e){case n.CustomBase:case n.KTC:case n.KBC:case n.KRC:case n.KLC:{let t=this.Frame.width;t<=0&&(t=1);let e=this.Frame.height;if(e<=0&&(e=1),a[0].x=(this.StartPoint.x-this.Frame.x)/t*s,a[0].y=(this.StartPoint.y-this.Frame.y)/e*s,a[1].x=(this.EndPoint.x-this.Frame.x)/t*s,a[1].y=(this.EndPoint.y-this.Frame.y)/e*s,0===this.hooks.length)return LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",a),a;if(1!==this.hooks.length)return LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",[]),[];if(this.hooks[0].hookpt===n.KTR)return a[1].skip=!0,LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",a),a;if(this.hooks[0].hookpt===n.KTL)return a[0].skip=!0,a[0].x=a[1].x,a[0].y=a[1].y,LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",a),a;break}}}const o=this.BaseShapePolyGetTargets(t,e,this.Frame);return LogUtil.Debug("= S.SegmentedLine: GetTargetPoints output",o),o}BaseShapePolyGetTargets(t,e,i){LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets input",{inputPoint:t,hookFlags:e,boundingRect:i});const n=this.PolyGetTargetPointList(e);if(null==t)return LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets output",{targets:null}),null;const s=[{x:0,y:0}],a=[];let o=OptConstant.Common.LongIntMax;const r={x:0,y:0};t.x,t.y;const l={x:t.x,y:t.y};let h=!1,c={},u=-1,d={x:t.x,y:t.y};T3Gv.docUtil.docConfig.enableSnap&&0==(e&NvConstant.HookFlags.LcNoSnaps)&&(d=T3Gv.docUtil.SnapToGrid(d),d.y<i.y&&(d.y=i.y),d.y>i.y+i.height&&(d.y=i.y+i.height),d.x<i.x&&(d.x=i.x),d.x>i.x+i.width&&(d.x=i.x+i.width),h=!0);const p=n.length;for(let g=1;g<p;g++){l.x=t.x,l.y=t.y;const e=n[g-1],i=n[g];if(Utils2.EqualPt(e,i))continue;const s=i.x-e.x,a=i.y-e.y,p=0===s?1:s,f=0===a?1:a;if(Math.abs(f/p)>1){h&&(l.y=d.y);const t=p/f*(l.y-e.y)+e.x;let n=Math.abs(t-l.x);l.x=t;const s=Math.min(e.x,i.x),a=Math.max(e.x,i.x);t<s||t>a?n=OptConstant.Common.LongIntMax:(c=Utils2.Pt2Rect(e,i),Utils2.InflateRect(c,1,1),Utils2.pointInRect(c,l)||(n=OptConstant.Common.LongIntMax)),n<o&&(u=g,r.x=t,r.y=l.y,o=n)}else{h&&(l.x=d.x);const t=f/p*(l.x-e.x)+e.y;let n=Math.abs(t-l.y);l.y=t;const s=Math.min(e.y,i.y),a=Math.max(e.y,i.y);t<s||t>a?n=OptConstant.Common.LongIntMax:(c=Utils2.Pt2Rect(e,i),Utils2.InflateRect(c,1,1),Utils2.pointInRect(c,l)||(n=OptConstant.Common.LongIntMax)),n<o&&(u=g,r.x=l.x,r.y=t,o=n)}}if(u>=0){s[0].x=r.x,s[0].y=r.y;const t=i;if(0!==this.RotationAngle){const e=this.RotationAngle/(180/NvConstant.Geometry.PI);Utils3.RotatePointsAboutCenter(t,e,s)}const e=t.width,n=t.height,o=0===e?0:(s[0].x-t.x)/e,l=0===n?0:(s[0].y-t.y)/n;return a.push(new Point$1(o*OptConstant.Common.DimMax,l*OptConstant.Common.DimMax)),LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets output",{targets:a}),a}return LogUtil.Debug("= S.SegmentedLine: BaseShapePolyGetTargets output",{targets:null}),null}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.SegmentedLine: GetPerimPts input",{unusedInputParam:t,hookPointDefinitions:e,currentHookType:i,unusedParamR:n,unusedParamI:s,connectedObjectId:a});let o=this.Frame,r=[],l=0,h=0;if(e){if(h=e.length,2===h&&e[0].id&&e[0].id===OptConstant.HookPts.KTL&&e[1].id&&e[1].id===OptConstant.HookPts.KTR)return null==e[0].skip&&(r.push(new Point$1(this.StartPoint.x,this.StartPoint.y)),r[0].id=e[0].id,l=1),null==e[1].skip&&(r.push(new Point$1(this.EndPoint.x,this.EndPoint.y)),r[l].id=e[1].id),LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",r),r;if(a>=0){const o=ObjectUtil$1.GetObjectPtr(a,!1);if(o){if(o.objecttype===NvConstant.FNObjectTypes.Multiplicity&&1===h){let t=5,n=5;if(t+=o.Frame.width/2,0===e[0].x){const i=this.segl.pts[0],s=this.segl.pts[1];i.x===s.x?(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(t=-t),n=i.y>s.y?-n:n+o.Frame.height,r.push(new Point$1(this.StartPoint.x+t,this.StartPoint.y+n)),r[0].id=e[0].id):(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(n=-o.Frame.height-5),n=-n,i.x>s.x&&(t=-t),r.push(new Point$1(this.StartPoint.x+t,this.StartPoint.y+n)),r[0].id=e[0].id)}else{const s=this.segl.pts.length,a=this.segl.pts[s-2],l=this.segl.pts[s-1];a.x===l.x?(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(t=-t),n=a.y<l.y?-n:n+o.Frame.height,i===OptConstant.HookPts.KCBR&&(t=-t),r.push(new Point$1(this.EndPoint.x+t,this.EndPoint.y+n)),r[0].id=e[0].id):(o.subtype===NvConstant.ObjectSubTypes.SubtMultiplicityFilpped&&(n=-o.Frame.height-5),n=-n,a.x<l.x&&(t=-t),r.push(new Point$1(this.EndPoint.x+t,this.EndPoint.y+n)),r[0].id=e[0].id)}return LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",r),r}if(o.objecttype===NvConstant.FNObjectTypes.ExtraTextLable&&1===h){const o=super.GetPerimPts(t,e,i,n,s,a);return LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",o),o}}}}h=e?e.length:0,r=new Array(h);for(let c=0;c<h;c++){r[c]={x:0,y:0,id:0};const t=o.width,i=o.height;r[c].x=e[c].x/OptConstant.Common.DimMax*t+o.x,r[c].y=e[c].y/OptConstant.Common.DimMax*i+o.y,null!=e[c].id&&(r[c].id=e[c].id)}return LogUtil.Debug("= S.SegmentedLine: GetPerimPts output",r),r}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("= S.SegmentedLine: ScaleObject input",{scaleX:t,scaleY:e,deltaX:i,deltaY:n,pivotX:s,pivotY:a,preserveAspectRatio:o}),super.ScaleObject(t,e,i,n,s,a,o),this.SegLFormat(this.EndPoint,OptConstant.ActionTriggerType.SeglPreserve,0),this.CalcFrame(),LogUtil.Debug("= S.SegmentedLine: ScaleObject output",{EndPoint:this.EndPoint,Frame:this.Frame})}GetSegLFace(t,e,i){LogUtil.Debug("= S.SegmentedLine: GetSegLFace input",{hookPoint:t,referencePoint:e,testPoint:i});const n=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,null);let s=0,a=null;const o={x:i.x,y:i.y},r={};return Utils3.LineDStyleHit(n,o,this.StyleRecord.Line.Thickness,0,r)&&r.lpHit>=0&&(a=Utils2.Pt2Rect(n[r.lpHit],n[r.lpHit+1]),s=a.width>=a.height?e.y>=i.y?OptConstant.HookPts.KBC:OptConstant.HookPts.KTC:e.x>=i.x?OptConstant.HookPts.KRC:OptConstant.HookPts.KLC),LogUtil.Debug("= S.SegmentedLine: GetSegLFace output",{hookDirection:s}),s}GetSpacing(){LogUtil.Debug("= S.SegmentedLine: GetSpacing input",{hooks:this.hooks,segl:this.segl,StartPoint:this.StartPoint,EndPoint:this.EndPoint});const t=OptConstant.HookPts;let e,i,n={width:null,height:null};switch(2===this.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),i=ObjectUtil$1.GetObjectPtr(this.hooks[1].objid,!1)),this.segl.firstdir){case t.KTC:this.segl.lastdir===t.KBC&&(n.height=Math.abs(this.StartPoint.y-this.EndPoint.y),e&&i&&(e.Frame.y<i.Frame.y?n.height=i.Frame.y-(e.Frame.y+e.Frame.height):n.height=e.Frame.y-(i.Frame.y+i.Frame.height)));break;case t.KBC:this.segl.lastdir===t.KTC&&(n.height=Math.abs(this.StartPoint.y-this.EndPoint.y),e&&i&&(e.Frame.y<i.Frame.y?n.height=i.Frame.y-(e.Frame.y+e.Frame.height):n.height=e.Frame.y-(i.Frame.y+i.Frame.height)));break;case t.KLC:this.segl.lastdir===t.KRC&&(n.width=Math.abs(this.StartPoint.x-this.EndPoint.x),e&&i&&(e.Frame.x<i.Frame.x?n.width=i.Frame.x-(e.Frame.x+e.Frame.width):n.width=e.Frame.x-(i.Frame.x+i.Frame.width)));break;case t.KRC:this.segl.lastdir===t.KLC&&(n.width=Math.abs(this.StartPoint.x-this.EndPoint.x),e&&i&&(e.Frame.x<i.Frame.x?n.width=i.Frame.x-(e.Frame.x+e.Frame.width):n.width=e.Frame.x-(i.Frame.x+i.Frame.width)))}return LogUtil.Debug("= S.SegmentedLine: GetSpacing output",n),n}GetShapeConnectPoint(t){let e,i;LogUtil.Debug("= S.SegmentedLine: GetShapeConnectPoint input",{hookType:t});let n={},s={},a=this.segl.lastdir,o=this.segl.firstdir;const r=OptConstant.Common.DimMax,l=this.segl.pts.length;let h;return t===OptConstant.HookPts.KTL?(e=this.segl.pts[0],i=this.segl.pts[1]):(e=this.segl.pts[l-2],i=this.segl.pts[l-1]),e.x===i.x?(n.x=r/2,s.x=r/2,i.y>e.y?(n.y=0,s.y=r,a=OptConstant.HookPts.KTC,o=OptConstant.HookPts.KBC):(n.y=r,s.y=0,a=OptConstant.HookPts.KBC,o=OptConstant.HookPts.KTC)):(n.y=r/2,s.y=r/2,i.x>e.x?(n.x=0,s.x=r,a=OptConstant.HookPts.KLC,o=OptConstant.HookPts.KRC):(n.x=r,s.x=0,a=OptConstant.HookPts.KRC,o=OptConstant.HookPts.KLC)),t===OptConstant.HookPts.KTL?(this.segl.firstdir=o,h=s):(this.segl.lastdir=a,h=n),LogUtil.Debug("= S.SegmentedLine: GetShapeConnectPoint output",h),h}ConnectToHook(t,e){LogUtil.Debug("= S.SegmentedLine: ConnectToHook input",{connectedObjectId:t,hookType:e});let i=e;return ShapeUtil.LineIsReversed(this,null,!1)&&(i===OptConstant.HookPts.KTL?i=OptConstant.HookPts.KTR:i===OptConstant.HookPts.KTR&&(i=OptConstant.HookPts.KTL)),LogUtil.Debug("= S.SegmentedLine: ConnectToHook output",{result:i}),i}GetBestHook(t,e,i){LogUtil.Debug("= S.SegmentedLine: GetBestHook input",{objectId:t,initialHookType:e,referencePoint:i});const n=OptConstant.Common.DimMax;Utils2.Pt2Rect(this.StartPoint,this.EndPoint);const s=OptConstant.HookPts,a=this.segl.pts.length;let o,r,l=i.x;2===a&&this.segl.pts[0].x===this.segl.pts[1].x&&(l=i.y),ShapeUtil.LineIsReversed(this,null,!1)?0===l?(o=this.segl.pts[a-2],r=this.segl.pts[a-1]):(r=this.segl.pts[0],o=this.segl.pts[1]):l===n?(o=this.segl.pts[a-2],r=this.segl.pts[a-1]):(r=this.segl.pts[0],o=this.segl.pts[1]);const h=ObjectUtil$1.GetObjectPtr(t,!1);let c=e;if(h&&h.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape)switch(e){case s.KTC:case s.KBC:case s.KRC:case s.KLC:c=o.x===r.x?o.y<r.y?s.KBC:s.KTC:o.x<r.x?s.KRC:s.KLC;break;default:c=e}return LogUtil.Debug("= S.SegmentedLine: GetBestHook output",{bestHookType:c}),c}MaintainPoint(t,e,i,n,s){LogUtil.Debug("= S.SegmentedLine: MaintainPoint input",{point:t,targetObjectId:e,additionalParams:i,objectToCheck:n,extraParams:s});let a=n,o={},r={},l={};switch(a.DrawingObjectBaseClass){case OptConstant.DrawObjectBaseClass.Line:switch(a.LineType){case OptConstant.LineType.SEGLINE:case OptConstant.LineType.ARCSEGLINE:case OptConstant.LineType.POLYLINE:let t=!1;for(let i=0;i<a.hooks.length;i++)if(a.hooks[i].targetid===e){a.HookToPoint(a.hooks[i].hookpt,o),t=!0;break}if(!t)return LogUtil.Debug("= S.SegmentedLine: MaintainPoint - no matching hook found, returning true"),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0;l=Utils1.DeepCopy(a),Utils2.CopyRect(l.Frame,o),l.StartPoint.x=o.x,l.StartPoint.y=o.y,l.EndPoint.x=o.x+o.width,l.EndPoint.y=o.y+o.height,a=l}break;case OptConstant.DrawObjectBaseClass.Shape:return PolyUtil.LinesMaintainDist(this,i,s,t),LogUtil.Debug("= S.SegmentedLine: MaintainPoint processed for SHAPE, returning true"),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0}const h=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,null),c=h.length;for(let u=1;u<c;u++){if(r=Utils2.Pt2Rect(h[u],h[u-1]),l=Utils1.DeepCopy(this),Utils2.CopyRect(l.Frame,r),l.StartPoint.x=r.x,l.StartPoint.y=r.y,l.EndPoint.x=r.x+r.width,l.EndPoint.y=r.y+r.height,T3Gv.opt.LineCheckPoint(l,t))return LogUtil.Debug("= S.SegmentedLine: MaintainPoint - LineCheckPoint returned true",{segment:u,lineSegmentRectangle:r}),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0;if(T3Gv.opt.LinesIntersect(l,a,t))return LogUtil.Debug("= S.SegmentedLine: MaintainPoint - LinesIntersect returned true",{segment:u,lineSegmentRectangle:r}),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",!0),!0}return PolyUtil.LinesMaintainDist(this,i,s,t),LogUtil.Debug("= S.SegmentedLine: MaintainPoint output",true),true}}class ArcSegmentedLine extends SegmentedLine{constructor(t){LogUtil.Debug("S.ArcSegmentedLine - Constructor input:",t),(t=t||{}).LineType=t.LineType||OptConstant.LineType.ARCSEGLINE,super(t),LogUtil.Debug("S.ArcSegmentedLine - Constructor output initialized with:",t)}CreateShape(t,e){LogUtil.Debug("S.ArcSegmentedLine - CreateShape input:",{svgContext:t,isPreviewMode:e});let i,n,s,a=[];if(this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.ArcSegmentedLine - CreateShape output:",null),null;const o=t.CreateShape(OptConstant.CSType.ShapeContainer),r=0===this.hoplist.nhops;r?(i=t.CreateShape(OptConstant.CSType.Path),n=t.CreateShape(OptConstant.CSType.Path)):(i=t.CreateShape(OptConstant.CSType.Polyline),n=t.CreateShape(OptConstant.CSType.Polyline)),i.SetID(OptConstant.SVGElementClass.Shape),n.SetID(OptConstant.SVGElementClass.Slop),n.ExcludeFromExport(!0),this.CalcFrame();const l=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);let h=this.StyleRecord;h=this.SVGTokenizerHook(h);const c=h.Line.Paint.Color;let u=h.Line.Thickness;const d=h.Line.Paint.Opacity,p=h.Line.LinePattern;u>0&&u<1&&(u=1);const g=l.width,f=l.height;if(o.SetSize(g,f),o.SetPos(l.x,l.y),i.SetSize(g,f),r)a=Instance.Shape.SegmentedLine.prototype.GetPolyPoints.call(this,OptConstant.Common.MaxPolyPoints,!0,!0,null),s=this.UpdateSVG(i,a);else{if(a=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0),0!==this.hoplist.nhops){const t=T3Gv.opt.InsertHops(this,a,a.length);a=a.slice(0,t.npts)}i.SetPoints(a)}return i.SetFillColor("none"),i.SetStrokeColor(c),i.SetStrokeOpacity(d),i.SetStrokeWidth(u),0!==p&&i.SetStrokePattern(p),n.SetSize(g,f),r?n.SetPath(s):n.SetPoints(a),n.SetStrokeColor("white"),n.SetFillColor("none"),n.SetOpacity(0),e?n.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):n.SetEventBehavior(OptConstant.EventBehavior.None),n.SetStrokeWidth(u+OptConstant.Common.Slop),o.AddElement(i),o.AddElement(n),this.ApplyStyles(i,h),this.ApplyEffects(o,!1,!0),o.isShape=!0,this.AddIcons(t,o),LogUtil.Debug("S.ArcSegmentedLine - CreateShape output:",o),o}UpdateSVG(t,e){LogUtil.Debug("S.ArcSegmentedLine - updateSVG input:",{svgElement:t,points:e});const i=t.PathCreator();i.BeginPath(),i.MoveTo(e[0].x,e[0].y);let n=e[0].x,s=e[0].y;const a=e.length;2===a&&i.LineTo(e[1].x,e[1].y);for(let r=2;r<a;r++){const t=n,o=s;let l,h,c,u,d;e[r-1].x===e[r].x?(r<a-1?(s=(e[r-1].y+e[r].y)/2,h=Math.abs(e[r-1].y-e[r].y)/2):(h=Math.abs(s-e[r].y),s=e[r].y),l=Math.abs(n-e[r].x),c=s-o,u=(n=e[r].x)-t,d=!(u>=0&&c<0||u<0&&c>=0)):(r<a-1?(l=Math.abs(e[r-1].x-e[r].x)/2,n=(e[r-1].x+e[r].x)/2):(l=Math.abs(n-e[r].x),n=e[r].x),h=Math.abs(s-e[r].y),c=(s=e[r].y)-o,u=n-t,d=!(u<0&&c<0||u>=0&&c>=0)),i.ArcTo(n,s,l,h,0,d,!1,!1)}const o=i.ToString();return t.SetPath(o),LogUtil.Debug("S.ArcSegmentedLine - updateSVG output:",o),o}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("S.ArcSegmentedLine - GetPolyPoints input:",{numPoints:t,useRelativeCoordinates:e,includeStartPoint:i,unusedFlag:n,unusedParam:s});let a,o,r,l,h,c,u,d,p,g,f,m=[];if(a=Instance.Shape.SegmentedLine.prototype.GetPolyPoints.call(this,OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),c=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),0===this.segl.firstdir&&0===this.segl.lastdir&&(Utils2.IsEqual(c.height,0)||Utils2.IsEqual(c.width,0))){if(m=a,!e)for(o=0,r=m.length;o<r;o++)m[o].x+=c.x,m[o].y+=c.y;return LogUtil.Debug("S.ArcSegmentedLine - GetPolyPoints output:",m),m}if(this.segl&&this.segl.pts.length){for(l=a[0].x,h=a[0].y,r=a.length,i&&m.push(new Point$1(l,h)),o=2;o<r;o++)u=l,d=h,a[o-1].x===a[o].x?(o<r-1?(h=(a[o-1].y+a[o].y)/2,Math.abs(a[o-1].y-a[o].y)):(Math.abs(h-a[o].y),h=a[o].y),Math.abs(l-a[o].x),g=h-d,p=(l=a[o].x)-u,f=!(p>=0&&g<0||p<0&&g>=0)):(o<r-1?(Math.abs(a[o-1].x-a[o].x),l=(a[o-1].x+a[o].x)/2):(Math.abs(l-a[o].x),l=a[o].x),Math.abs(h-a[o].y),g=(h=a[o].y)-d,p=l-u,f=!(p<0&&g<0||p>=0&&g>=0)),i?(m.push(new Point$1(l,h)),m[m.length-1].notclockwise=!f):PolyUtil.EllipseToPoints(m,t/2,u,l,d,h,f);if(!e)for(o=0,r=m.length;o<r;o++)m[o].x+=c.x,m[o].y+=c.y}else m=Instance.Shape.BaseLine.prototype.GetPolyPoints.call(this,t,e,!0,null);return LogUtil.Debug("S.ArcSegmentedLine - GetPolyPoints output:",m),m}GetTextOnLineParams(t){if(LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams input:",t),3!==this.segl.pts.length){const e=Instance.Shape.SegmentedLine.prototype.GetTextOnLineParams.call(this,t);return LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams output:",e),e}switch(this.TextAlign){case TextConstant.TextAlign.TopCenter:case TextConstant.TextAlign.Center:case TextConstant.TextAlign.BottomCenter:{const t=this.GetPolyPoints(22,!1,!1,!1,null),e=[],i={Frame:new Instance.Shape.Rect,StartPoint:new Point$1,EndPoint:new Point$1};i.Frame=Utils2.Pt2Rect(t[0],t[9]);const n=PolyUtil.GetClockwiseAngleBetween2PointsInRadians(t[0],t[9]);return e.push(new Point$1(t[0].x,t[0].y)),e.push(new Point$1(t[9].x,t[9].y)),e.push(new Point$1(t[7].x,t[7].y)),Utils3.RotatePointsAboutCenter(i.Frame,n,e),e[0].y=e[2].y,e[1].y=e[2].y,Utils3.RotatePointsAboutCenter(i.Frame,-n,e),i.StartPoint.x=e[0].x,i.StartPoint.y=e[0].y,i.EndPoint.x=e[1].x,i.EndPoint.y=e[1].y,i.CenterProp=.3,LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams output:",i),i}default:{const e=Instance.Shape.SegmentedLine.prototype.GetTextOnLineParams.call(this,t);return LogUtil.Debug("S.ArcSegmentedLine - GetTextOnLineParams output:",e),e}}}}class BitmapSymbol extends BaseSymbol{constructor(t){t.ShapeType=OptConstant.ShapeType.BitmapSymbol,super(t)}CreateShape(t){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;const e=t.CreateShape(OptConstant.CSType.ShapeContainer),i=t.CreateShape(OptConstant.CSType.Image);i.SetID(OptConstant.SVGElementClass.Shape),i.SetURL(this.SymbolURL);const n=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,s=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;n&&i.SetMirror(n),s&&i.SetFlip(s);const a=this.Frame;this.GetFieldDataStyleOverride();const o=a.width,r=a.height;return e.SetSize(o,r),e.SetPos(a.x,a.y),i.SetSize(o,r),e.AddElement(i),e.isShape=!0,-1!==this.DataID&&this.LMAddSVGTextObject(t,e),e}}class PathPoint{constructor(t,e,i,n,s,a){this.x=t||0,this.y=e||0,this.moveto=i||!1,this.arrowhead=n||!1,this.curvex=s||0,this.curvey=a||0}}class StepRect{constructor(t,e,i,n){this.h=t||0,this.v=e||0,this.hend=i||0,this.vend=n||0}}var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc$1(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp$1(e,i,a),a};class SDHook{constructor(){this.startpoint={h:0,v:0},this.endpoint={h:0,v:0},this.id=-1,this.textid=-1,this.tuniqueid=-1,this.gap=OptConstant.ConnectorDefines.DefaultWd,this.ogap=0,this.extra=0,this.comanagerht=0,this.isasst=!1,this.pr=new CRect(0,0,0,0),this.sequence=0,this.steps=[]}}__decorateClass$1([Type((()=>CRect))],SDHook.prototype,"pr",2);var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(t,e,i,n)=>{for(var s,a=n>1?void 0:n?__getOwnPropDesc(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(n?s(e,i,a):s(a))||a);return n&&a&&__defProp(e,i,a),a};class SDArray{constructor(){this.styleflags=0,this.tilt=0,this.angle=0,this.ht=0,this.wd=0,this.flags=0,this.matchsizelen=0,this.lasttexthook=-1,this.curveparam=0,this.profile=new CRect(0,0,0,0),this.coprofile=new CRect(0,0,0,0),this.steps=[],this.hook=[]}}__decorateClass([Type((()=>CRect))],SDArray.prototype,"profile",2),__decorateClass([Type((()=>CRect))],SDArray.prototype,"coprofile",2);class Connector extends BaseDrawObject$1{constructor(t){LogUtil.Debug("S.Connector: Input options:",t),(t=t||{}).DrawingObjectBaseClass=OptConstant.DrawObjectBaseClass.Connector,t.targflags=NvConstant.HookFlags.LcShape,t.hookflags=NvConstant.HookFlags.LcShape;let e=t.arraylist||new SDArray;null!=t.styleflags?e.styleflags=t.styleflags:e.styleflags=OptConstant.AStyles.PerpConn|OptConstant.AStyles.MinZero,e.ht=null==t.arrayht?OptConstant.ConnectorDefines.DefaultHt:t.arrayht,e.wd=null==t.arraywd?OptConstant.ConnectorDefines.DefaultWd:t.arraywd,e.curveparam=t.curveparam||0;var i=new SDHook;i.startpoint.h=0,i.startpoint.v=0,i.endpoint.h=e.wd,i.endpoint.v=0,e.hook.push(i),t.Frame&&(t.Frame.height=e.ht,t.Frame.width=e.wd),t.EndPoint&&(t.EndPoint.x=e.wd,t.EndPoint.y=e.ht),super(t),this.arraylist=e,this.StartPoint=t.StartPoint||{x:0,y:0},this.hoplist=t.hoplist||{nhops:0,hops:[]},this.ArrowheadData=t.ArrowheadData||[],this.StartArrowID=t.StartArrowID||0,this.EndArrowID=t.EndArrowID||0,this.StartArrowDisp=t.StartArrowDisp||!1,this.EndArrowDisp=t.EndArrowDisp||!1,this.ArrowSizeIndex=t.ArrowSizeIndex||0,this.TextDirection=t.TextDirection||!1,this.vertical=t.vertical||!1,this.EndPoint=t.EndPoint||{x:this.arraylist.wd,y:this.arraylist.ht},this.theMinTextDim={width:0,height:0},this.TextFlags=Utils2.SetFlag(this.TextFlags,NvConstant.TextFlags.HorizText,!this.TextDirection),LogUtil.Debug("S.Connector: Output instance:",this)}IsChildOfAssistant(){if(LogUtil.Debug("S.Connector: Checking if child of assistant. Hooks:",this.hooks),this.hooks.length){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(LogUtil.Debug("S.Connector: First hook object:",t),t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){const e=t.IsAsstConnector();return LogUtil.Debug("S.Connector: Is assistant connector:",e),e}}return LogUtil.Debug("S.Connector: Not a child of assistant."),!1}LinkNotVisible(){LogUtil.Debug("S.Connector: Checking link visibility.");const t=this.arraylist.styleflags&OptConstant.AStyles.CoManager,e=this.IsChildOfAssistant();if(this.flags&NvConstant.ObjFlags.NotVisible){if(!this.hooks.length||t||e)return LogUtil.Debug("S.Connector: Link is not visible due to hooks, co-manager, or assistant status."),!0;const i=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(i&&i.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.Connector: Link is not visible due to first hook object visibility."),!0}return LogUtil.Debug("S.Connector: Link is visible."),!1}GetTextOnLineParams(t){LogUtil.Debug("S.Connector: Input hook:",t);const e={Frame:Utils1.DeepCopy(this.Frame),StartPoint:{x:0,y:0},EndPoint:{x:0,y:0}};return this.vertical?(e.StartPoint.x=t.startpoint.v+this.StartPoint.x,e.StartPoint.y=t.startpoint.h+this.StartPoint.y,e.EndPoint.x=t.endpoint.v+this.StartPoint.x,e.EndPoint.y=t.endpoint.h+this.StartPoint.y):(e.StartPoint.x=t.startpoint.h+this.StartPoint.x,e.StartPoint.y=t.startpoint.v+this.StartPoint.y,e.EndPoint.x=t.endpoint.h+this.StartPoint.x,e.EndPoint.y=t.endpoint.v+this.StartPoint.y),LogUtil.Debug("S.Connector: Output params:",e),e}ChangeBackgroundColor(t,e){LogUtil.Debug("S.Connector: Input newColor:",t,"currentColor:",e),this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Transparent&&this.StyleRecord.Fill.Paint.Color.toLowerCase()===e.toLowerCase()&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),this.StyleRecord.Fill.Paint.Color=t,ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.Connector: Updated StyleRecord.Fill.Paint.Color:",this.StyleRecord.Fill.Paint.Color)}AddSVGTextObject(t,e,i){LogUtil.Debug("S.Connector: Input svgDoc:",t,"parentElement:",e,"hookIndex:",i);let n,s={},a={};void 0===i&&(i=this.arraylist.lasttexthook);const o=this.arraylist.hook[i];this.vertical?(s.x=o.startpoint.v,s.y=o.startpoint.h,a.x=o.endpoint.v,a.y=o.endpoint.h,n=Utils2.Pt2Rect(s,a),Utils2.InflateRect(n,20,0)):(s.x=o.startpoint.h,s.y=o.startpoint.v,a.x=o.endpoint.h,a.y=o.endpoint.v,n=Utils2.Pt2Rect(s,a),Utils2.InflateRect(n,0,20));const r=t.CreateShape(OptConstant.CSType.Rect);r.SetID(OptConstant.SVGElementClass.TextBackground),r.SetUserData(i),r.SetStrokeWidth(0);const l=this.StyleRecord.Fill.Paint.Color;r.SetFillColor(l),this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent?r.SetOpacity(0):r.SetOpacity(this.StyleRecord.Fill.Paint.Opacity);const h=t.CreateShape(OptConstant.CSType.Text);h.SetID(OptConstant.SVGElementClass.Text),h.SetUserData(i),h.SetRenderingEnabled(!1),h.SetSize(n.width,n.height),h.SetSpellCheck(this.AllowSpell()),h.InitDataSettings(this.fieldDataTableID,this.fieldDataElemID),e.AddElement(r),e.AddElement(h),e.isText=!0,i===this.arraylist.lasttexthook&&(e.textElem=h);const c=T3Gv.stdObj.GetObject(o.textid);c.Data.runtimeText?(c.Data.runtimeText.vAlign="top",h.SetRuntimeText(c.Data.runtimeText)):(h.SetText(""),h.SetParagraphAlignment(this.TextAlign),h.SetVerticalAlignment("top")),c.Data.runtimeText||(c.Data.runtimeText=h.GetRuntimeText()),h.SetConstraints(T3Gv.opt.header.MaxWorkDim.x,0,n.height),this.bInGroup&&h.DisableHyperlinks(!0),h.SetRenderingEnabled(!0),Instance.Shape.BaseLine.prototype.TextDirectionCommon.call(this,h,r,!1,o),h.SetEditCallback(T3Gv.opt.TextCallback,e),LogUtil.Debug("S.Connector: Output textElement:",h)}CreateShape(t,e){LogUtil.Debug("S.Connector: Input svgDoc:",t,"isHidden:",e);let i=(this.arraylist.styleflags&OptConstant.AStyles.CoManager)>0,n=this.IsChildOfAssistant(),s=this.IsFlowChartConnector(),a=this.IsGenoConnector(),o=this.objecttype===NvConstant.FNObjectTypes.CauseEffectMain,r=OptConstant.ConnectorDefines.NSkip;if(ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),this.flags&NvConstant.ObjFlags.NotVisible){if(this.hooks.length&&!i&&!n&&!s&&!o&&!a){let e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(e&&!(e.flags&NvConstant.ObjFlags.NotVisible)){let e=t.CreateShape(OptConstant.CSType.ShapeContainer);return this.CreateCollapseButton(t,e,!0),e.ExcludeFromExport(!0),LogUtil.Debug("S.Connector: Output shapeContainer:",e),e}}return LogUtil.Debug("S.Connector: Output null due to visibility."),null}let l=t.CreateShape(OptConstant.CSType.PolyPolyline);l.SetID(OptConstant.SVGElementClass.Shape);let h=t.CreateShape(OptConstant.CSType.PolyPolyline);h.SetID(OptConstant.SVGElementClass.Slop),h.ExcludeFromExport(!0);let c=this.Frame,u=this.StyleRecord,d=u.Line.Paint.Color,p=u.Line.Thickness,g=u.Line.Paint.Opacity,f=u.Line.LinePattern,m=c.width,v=c.height,b=t.CreateShape(OptConstant.CSType.ShapeContainer);return b.SetSize(m,v),b.SetPos(c.x,c.y),l.SetSize(m,v),l.SetFillColor("none"),l.SetStrokeColor(d),l.SetStrokeOpacity(g),l.SetStrokeWidth(p),0!==f&&l.SetStrokePattern(f),h.SetSize(m,v),h.SetStrokeColor("white"),h.SetFillColor("none"),h.SetOpacity(0),e?h.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):h.SetEventBehavior(OptConstant.EventBehavior.None),h.SetStrokeWidth(p+OptConstant.Common.SlopShapeExtra),b.AddElement(l),b.AddElement(h),this.ApplyStyles(l,u),this.ApplyEffects(b,!1,!0),i||n||s||o||a||this.CreateCollapseButton(t,b,!1),b.isShape=!0,this.arraylist.hook.length>r&&this.AddIcons(t,b),LogUtil.Debug("S.Connector: Output shapeContainer:",b),b}AddIcon(t,e,i){if(LogUtil.Debug("S.Connector: Input svgDoc:",t,"parentElement:",e,"iconParams:",i),e){const t=this.IsFlowChartConnector(),n=this.Frame;this.nIcons,t&&(this.hooks.length>0?this.hooks[0].hookpt===OptConstant.HookPts.LL||this.hooks[0].hookpt===OptConstant.HookPts.LT?this.vertical?(i.y=this.iconShapeRightOffset+this.nIcons*this.iconSize,i.x=n.width-this.iconShapeBottomOffset-this.iconSize):(i.x=this.iconShapeRightOffset+this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize):(i.x=n.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize):this.arraylist.hook.length>OptConstant.ConnectorDefines.NSkip+1?this.vertical?(i.y=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip+1].startpoint.h+this.iconShapeRightOffset+this.nIcons*this.iconSize,i.x=n.width-this.iconShapeBottomOffset-this.iconSize):(i.x=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip+1].startpoint.h+this.iconShapeRightOffset+this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize):(i.x=n.width-this.iconShapeRightOffset-this.iconSize-this.nIcons*this.iconSize,i.y=n.height-this.iconShapeBottomOffset-this.iconSize));const s=this.GenericIcon(i);return this.nIcons++,e.AddElement(s),LogUtil.Debug("S.Connector: Output iconElement:",s),s}}PostCreateShapeCallback(t,e,i,n){if(LogUtil.Debug("S.Connector: PostCreateShapeCallback input:",t,e,i,n),!(this.flags&NvConstant.ObjFlags.NotVisible)){let i,n,s=OptConstant.ConnectorDefines.NSkip,a=e.GetElementById(OptConstant.SVGElementClass.Shape),o=e.GetElementById(OptConstant.SVGElementClass.Slop),r=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null),l=!1;if(this.arraylist&&(n=(i=this.arraylist.hook.length)-s,n<0&&(n=0),0===n&&i>=s))for(let t=0;t<s;t++)this.arraylist.hook[t].id>=0&&n++;this.hooks.length&&(l=!0),!n&&l&&this.UpdateSVG(t,a,r),this.UpdateSVG(t,o,r);for(let h=0;h<i;h++)this.arraylist.hook[h].textid>=0&&this.AddSVGTextObject(t,e,h)}LogUtil.Debug("S.Connector: PostCreateShapeCallback output:",this)}SetRuntimeEffects(t){LogUtil.Debug("S.Connector: SetRuntimeEffects input:",t);const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);e&&this.ApplyEffects(e,t,!0),LogUtil.Debug("S.Connector: SetRuntimeEffects output:",this)}ApplyStyles(t,e){LogUtil.Debug("S.Connector: ApplyStyles input - shape:",t,"styleRecord:",e);const i=e.Line.Paint.FillType;if(t.SetStrokeOpacity(e.Line.Paint.Opacity),i===NvConstant.FillTypes.Gradient){const i=this.CreateGradientRecord(e.Line.Paint.GradientFlags,e.Line.Paint.Color,e.Line.Paint.Opacity,e.Line.Paint.EndColor,e.Line.Paint.EndOpacity);t.SetGradientStroke(i)}else if(i===NvConstant.FillTypes.RichGradient)t.SetGradientStroke(this.CreateRIchGradientRecord(e.Line.Paint.GradientFlags));else if(i===NvConstant.FillTypes.Texture){const i={url:"",scale:e.Line.Paint.TextureScale.Scale,alignment:e.Line.Paint.TextureScale.AlignmentScalar},n=e.Line.Paint.Texture;i.dim=T3Gv.opt.TextureList.Textures[n].dim,i.url=T3Gv.opt.TextureList.Textures[n].ImageURL,i.url,t.SetTextureStroke(i)}else i===NvConstant.FillTypes.Solid?t.SetStrokeColor(e.Line.Paint.Color):t.SetStrokeColor("none");LogUtil.Debug("S.Connector: ApplyStyles output - shape:",t)}CreateRIchGradientRecord(t){throw new Error("Method not implemented.")}GetDimensionPoints(){LogUtil.Debug("S.Connector: GetDimensionPoints input:",{Dimensions:this.Dimensions,Frame:this.Frame});let t,e=[],i=[],n=0,s=0,a=0,o=0,r={x:0,y:0},l={x:0,y:0};if(this.Dimensions&NvConstant.DimensionFlags.EndPts)e.push(new Point$1(this.StartPoint.x-this.Frame.x,this.StartPoint.y-this.Frame.y)),e.push(new Point$1(this.EndPoint.x-this.Frame.x,this.EndPoint.y-this.Frame.y));else if(this.Dimensions&NvConstant.DimensionFlags.Total){for(i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null),n=1;n<i.length;n++)a=Math.abs(i[n-1].x-i[n].x),o=Math.abs(i[n-1].y-i[n].y),s+=Math.sqrt(a*a+o*o);let h={x:this.Frame.width/2,y:this.Frame.height/2};r.x=h.x-s/2,r.y=h.y,e.push(new Point$1(r.x,r.y)),l.x=h.x+s/2,l.y=h.y,e.push(new Point$1(l.x,l.y)),t=T3Gv.opt.GetCounterClockwiseAngleBetween2Points(new Point$1(0,0),new Point$1(this.Frame.width,this.Frame.height)),Utils3.RotatePointsAboutPoint(h,t,e)}else e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,null);return LogUtil.Debug("S.Connector: GetDimensionPoints output:",e),e}FindTextLabel(t){LogUtil.Debug("S.Connector: _findTextLabel input:",t);const e=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),i=OptConstant.ConnectorDefines.NSkip;let n={},s=-1;const a=OptConstant.AStyles,o=Boolean(this.arraylist.styleflags&a.Linear),r=Boolean(this.arraylist.styleflags&a.FlowConn);if(t){const a=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),r=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(r){const e=r.GetTargetForEvent(t),n=e.GetID();n!==OptConstant.SVGElementClass.TextBackground&&n!==OptConstant.SVGElementClass.Text||(s=parseInt(e.GetUserData(),10),!o&&s<i&&(s=i))}if(s<0&&this.arraylist.hook.length>=i){const t=Utils3.LineDStyleHit(e,a,this.StyleRecord.Line.Thickness,0,n);void 0!==n.lpHit&&t&&(s=Math.round((n.lpHit-.1)/2),o&&s===i&&(this.arraylist.hook.length>=i+1?s++:s=-1))}}return s<0&&(s=this.arraylist.lasttexthook),s<i&&this.arraylist.hook.length>=i&&(o&&r?this.hooks.length>0?s=this.hooks[0].hookpt===OptConstant.HookPts.LR||this.hooks[0].hookpt===OptConstant.HookPts.LT?OptConstant.ConnectorDefines.ACr:OptConstant.ConnectorDefines.ACl:this.arraylist.hook.length>=i+1&&(s=i+1):s<0&&this.arraylist.hook.length>=i&&(s=i)),LogUtil.Debug("S.Connector: _findTextLabel output:",s),s}SetTextObject(t){LogUtil.Debug("S.Connector: SetTextObject input textId:",t);const e=OptConstant.ConnectorDefines.NSkip;let i=this.arraylist.lasttexthook;const n=this.arraylist.hook.length,s=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),a=ShapeUtil.TextAlignToWin(this.TextAlign),o=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);return this.StyleRecord.Fill.Paint.Color=o.background.Paint.Color,a.vjust===TextConstant.TextJust.Center?(this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Solid,this.StyleRecord.Fill.Paint.Opacity=1):this.StyleRecord.Fill.Paint.FillType=NvConstant.FillTypes.Transparent,-2===t?(LogUtil.Debug("S.Connector: SetTextObject output: false (textId is -2)"),!1):n>=e?(s?i=this.FindTextLabel():i<e&&(i=e),i>=n&&(i=n-1),this.arraylist.hook[i].textid=t,this.DataID=t,this.arraylist.lasttexthook=i,t<0&&(this.arraylist.lasttexthook=-1),LogUtil.Debug("S.Connector: SetTextObject output: true"),!0):(LogUtil.Debug("S.Connector: SetTextObject output: false"),!1)}GetTextObject(t,e,i){let n;if(LogUtil.Debug("S.Connector: GetTextObject input:",{inputEvent:t,hookContext:i}),null===t&&null!==i?n=i.hookindex:(n=this.FindTextLabel(t),null!==i&&(i.hookindex=n)),n<0)return LogUtil.Debug("S.Connector: GetTextObject output:",null),null;const s=this.arraylist.hook[n];if(void 0===s)return LogUtil.Debug("S.Connector: GetTextObject output:",null),null;this.DataID=s.textid,this.arraylist.lasttexthook=n;const a=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);return a&&(a.textElem=a.GetElementById(OptConstant.SVGElementClass.Text,n)),LogUtil.Debug("S.Connector: GetTextObject output:",s.textid),s.textid}AdjustTextEditBackground(t,e){if(LogUtil.Debug("S.Connector: AdjustTextEditBackground input - newColor:",t,"svgDoc:",e),-1!==this.DataID){const t=this.arraylist.hook.length;if(this.arraylist.lasttexthook>=0&&this.arraylist.lasttexthook<t){const t=this.arraylist.hook[this.arraylist.lasttexthook],i=e||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(i){const n=i.GetElementById(OptConstant.SVGElementClass.TextBackground,this.arraylist.lasttexthook),s=i.GetElementById(OptConstant.SVGElementClass.Text,this.arraylist.lasttexthook);if(s&&n){const i=null==e;Instance.Shape.BaseLine.prototype.TextDirectionCommon.call(this,s,n,i,t)}}}}LogUtil.Debug("S.Connector: AdjustTextEditBackground output - DataID:",this.DataID)}UpdateSVG(t,e,i){LogUtil.Debug("S.Connector: UpdateSVG input:",{svgDoc:t,shapeElement:e,polyPoints:i}),e.Clear();const n=OptConstant.AStyles,s=!!(this.arraylist.styleflags&n.Linear);let a=T3Gv.arrowHlkTable[this.StartArrowID],o=T3Gv.arrowHlkTable[this.EndArrowID];const r=T3Gv.arrowHsTable[this.ArrowSizeIndex];0===a.id&&(a=null),0===o.id&&(o=null),e.SetArrowheads(a,r,o,r,this.StartArrowDisp,this.EndArrowDisp);const l=i.length;let h=0;for(;h<l;){if(i[h].curvex||i[h].curvey){let t,n=[],a=1,o=1,r=this.vertical;s&&(r=!r),r?(i[h].curvey>0?(t=i[h].curvey,i[h].curvex>0&&(o=-1),a=-1):(t=i[h].curvey,i[h].curvex<0&&(o=-1),i[h].curvey<0&&(a=-1)),n=T3Gv.opt.LinesAddCurve(r,a,o,i[h].x+i[h].curvex,i[h].y,t)):(i[h].curvex>0?(t=i[h].curvex,i[h].curvey>0&&(o=-1),a=-1):(t=i[h].curvex,i[h].curvey<0&&(o=-1),i[h].curvex<0&&(a=-1)),n=T3Gv.opt.LinesAddCurve(r,a,o,i[h].x,i[h].y+i[h].curvey,t)),e.AddPolyLine(n,!1,!1)}let t=[];t.push({x:i[h].x,y:i[h].y});const n=i[h].arrowhead;let a=!1;for(h++;h<l&&!i[h].moveto;)t.push({x:i[h].x,y:i[h].y}),(h===l-1||i[h+1].moveto)&&(a=i[h].arrowhead),h++;t.length>1&&e.AddPolyLine(t,n,a)}e.BuildPath(),LogUtil.Debug("S.Connector: UpdateSVG output:",e)}CreateCollapseButton(t,e,i){let n,s;LogUtil.Debug("S.Connector: CreateCollapseButton input:",{svgDocument:t,parentElement:e,adjustCollapse:i});const a=OptConstant.Common.CKnobSize,o=OptConstant.AStyles,r=0!=(this.arraylist.styleflags&o.ReverseCol),l=0!=(this.arraylist.styleflags&o.BothSides)||0==(this.arraylist.styleflags&o.PerpConn),h=0!=(this.arraylist.styleflags&o.Radial)&&!l,c=a;let u=0,d=0;const p={};s=this.arraylist?this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip:0,s<0&&(s=0);let g,f=!1;if(this.hooks.length>0){switch(f=!0,g=this.HookToPoint(this.hooks[0].hookpt,p),h?this.vertical?(d=0,u=a):(u=0,d=a):0===p.width?d=a:u=a,this.hooks[0].hookpt){case OptConstant.HookPts.LR:case OptConstant.HookPts.LB:u=-u,d=-d}r&&(d=-d),g.x+=u,g.y+=d}if(0!==s&&f){const s={svgDoc:t,iconSize:c,imageURL:null,iconID:OptConstant.Common.HitAreas,userData:OptConstant.HitAreaType.ConnExpand,cursorType:CursorConstant.CursorType.AddPlus,x:g.x-this.Frame.x-c/2,y:g.y-this.Frame.y-c/2};this.extraflags&OptConstant.ExtraFlags.CollapseConn?(s.imageURL=OptConstant.Common.ConPlusPath,s.userData=OptConstant.HitAreaType.ConnExpand):(s.imageURL=OptConstant.Common.ConMinusPath,s.userData=OptConstant.HitAreaType.ConnCollapse),n=this.GenericIcon(s),i&&(e.SetSize(c,c),e.SetPos(this.Frame.x,this.Frame.y),e.isShape=!0),e.AddElement(n)}LogUtil.Debug("S.Connector: CreateCollapseButton output:",{collapseButton:n})}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.Connector: CreateActionTriggers input:",{svgDoc:t,targetId:e,extraParam:i,refId:n});const s=t.CreateShape(OptConstant.CSType.Group),a=OptConstant.Common.KnobSize,o=OptConstant.AStyles,r=this.arraylist.styleflags&o.ReverseCol,l=OptConstant.ConnectorDefines;let h=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(h*=2);const c=a/h,u=this.arraylist&&this.arraylist.hook?this.arraylist.hook.length:0;if(u<=l.NSkip)return LogUtil.Debug("S.Connector: CreateActionTriggers output:",s),s;const d=(this.arraylist.styleflags&o.BothSides)>0||0==(this.arraylist.styleflags&o.PerpConn),p=Boolean(this.arraylist.styleflags&o.Linear),g=this.Frame;let f=g.width+c,m=g.height+c;const v=Utils1.DeepCopy(g);v.x-=c/2,v.y-=c/2,v.width+=c,v.height+=c;const b=ObjectUtil$1.GetObjectPtr(e,!1);let y,S;this.vertical?(y=CursorConstant.CursorType.ResizeTB,S=CursorConstant.CursorType.ResizeLR):(y=CursorConstant.CursorType.ResizeLR,S=CursorConstant.CursorType.ResizeTB);const x=r?-1:1;let w={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:c,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:y};e!==n&&(w.fillColor="white",w.fillOpacity=0,w.strokeSize=1,w.strokeColor="black"),this.flags&NvConstant.ObjFlags.Lock?(w.fillColor="gray",w.locked=!0):this.NoGrow()&&(w.fillColor="red",w.strokeColor="red",S=CursorConstant.CursorType.Default,y=CursorConstant.CursorType.Default);{w.x=this.StartPoint.x-g.x,w.y=this.StartPoint.y-g.y,w.knobID=OptConstant.ActionTriggerType.LineStart;const t=this.GenericKnob(w);s.AddElement(t);var C=t}{w.x=this.EndPoint.x-g.x,w.y=this.EndPoint.y-g.y,w.knobID=OptConstant.ActionTriggerType.LineEnd;const t=this.GenericKnob(w);s.AddElement(t);var T=t}if(b&&b.hooks&&u>1)for(let k=0;k<b.hooks.length;k++){const t=Utils1.DeepCopy(w);let e;if(d){switch(b.hooks[k].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:e=OptConstant.ConnectorDefines.ACl,s.RemoveElement(C);break;default:e=OptConstant.ConnectorDefines.ACr,s.RemoveElement(T)}w.cursorType=y,w.shapeType=OptConstant.CSType.Oval,w.fillColor="white",w.fillOpacity=.01,w.strokeSize=1,w.strokeColor="green"}else e=OptConstant.ConnectorDefines.ACl,w.cursorType=S;if(e>0){const i=this.arraylist.hook[e];this.vertical?(w.x=i.startpoint.v+this.StartPoint.x-g.x,w.y=i.startpoint.h+this.StartPoint.y-g.y,d&&(w.y+=x*(i.endpoint.h-i.startpoint.h)/2)):(w.x=i.startpoint.h+this.StartPoint.x-g.x,w.y=i.startpoint.v+this.StartPoint.y-g.y,d&&(w.x+=x*(i.endpoint.h-i.startpoint.h)/2)),w.knobID=OptConstant.ActionTriggerType.ConnectorHook;const n=this.GenericKnob(w);n.SetUserData(e),s.AddElement(n),w=Utils1.DeepCopy(t)}}if(!p&&this.objecttype!==NvConstant.FNObjectTypes.CauseEffectMain){w.shapeType=OptConstant.CSType.Rect,w.cursorType=S;for(let t=l.NSkip;t<u;t++){const e=this.arraylist.hook[t];this.vertical?(w.x=e.endpoint.v+this.StartPoint.x-g.x,w.y=x*e.endpoint.h+this.StartPoint.y-g.y):(w.x=e.endpoint.h+this.StartPoint.x-g.x,w.y=e.endpoint.v+this.StartPoint.y-g.y),w.knobID=OptConstant.ActionTriggerType.ConnectorRerp;const i=this.GenericKnob(w);i.SetUserData(t-l.NSkip),s.AddElement(i)}}const D=this.PrGetStubIndex();for(let k=l.NSkip+1;k<u&&(p||d||!(u-l.NSkip<=2))&&!(d&&++k>=u);k++){const t=this.arraylist.hook[k-1],e=this.arraylist.hook[k];w.cursorType=y,w.shapeType=OptConstant.CSType.Oval,w.fillColor="white",w.fillOpacity=.01,w.strokeSize=1,w.strokeColor="green",this.vertical?p?(D===l.ACr?w.y=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.y-g.y-e.extra/2:w.y=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.y-g.y+e.extra/2,w.x=t.startpoint.v+this.StartPoint.x-g.x):(w.y=x*((t.endpoint.h+e.endpoint.h)/2)+this.StartPoint.y-g.y+x*e.extra/2,w.x=t.startpoint.v+this.StartPoint.x-g.x+(e.startpoint.v-t.startpoint.v)/2):p?(D===l.ACr?w.x=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.x-g.x-e.extra/2:w.x=(e.startpoint.h+e.endpoint.h)/2+this.StartPoint.x-g.x+e.extra/2,w.y=t.startpoint.v+this.StartPoint.y-g.y):(w.x=(t.endpoint.h+e.endpoint.h)/2+this.StartPoint.x-g.x+e.extra/2,w.y=t.startpoint.v+this.StartPoint.y-g.y),w.knobID=OptConstant.ActionTriggerType.ConnectorAdj;const i=this.GenericKnob(w);if(i.SetUserData(k),s.AddElement(i),this.AllowTextEdit()){const t=i.DOMElement(),e=Hammer(t),n=Evt_ShapeDoubleTapFactory(this);e.on("doubletap",n)}}return s.SetSize(f,m),s.SetPos(v.x,v.y),s.isShape=!0,s.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.Connector: CreateActionTriggers output:",s),s}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("S.Connector: CreateConnectHilites input:",{svgDoc:t,targetElement:e,hookIndex:s});const o=OptConstant.AStyles,r=t.CreateShape(OptConstant.CSType.Group);let l,h,c=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(c*=2);const u=OptConstant.Common.ConnPointDim/c,d=[{x:0,y:0},{x:0,y:0}];let p=this.GetTargetPoints(null,NvConstant.HookFlags.LcNoSnaps|NvConstant.HookFlags.LcHookNoExtra,s);if(null!=p){const i=this.GetPerimPts(e,p,null,!0,null,s),n=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,a=this.Frame;let c=a.width,g=a.height;const f=Utils1.DeepCopy(a);f.x-=u/2,f.y-=u/2,f.width+=u,f.height+=u,c+=u,g+=u;const m={svgDoc:t,shapeType:OptConstant.CSType.Oval,x:0,y:0,knobSize:u,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",KnobID:0,cursorType:CursorConstant.CursorType.Anchor},v=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),b=Boolean(this.arraylist.styleflags&o.BothSides)||0==(this.arraylist.styleflags&o.PerpConn),y=Boolean(this.arraylist.styleflags&o.Radial)&&!b,S=Boolean(this.arraylist.styleflags&o.BothSides),x=this.arraylist.angle;let w;y&&n>0&&(w=this.vertical?{x:this.StartPoint.x-this.Frame.x,y:this.StartPoint.y-this.Frame.y+this.arraylist.hook[OptConstant.ConnectorDefines.ACl].startpoint.h}:{x:this.StartPoint.x-this.Frame.x+this.arraylist.hook[OptConstant.ConnectorDefines.ACl].startpoint.h,y:this.StartPoint.y-this.Frame.y});for(let t=0;t<i.length;t++){m.x=i[t].x-this.Frame.x,m.y=i[t].y-this.Frame.y,d.length=2,l=this.GenericKnob(m);let e=!1;if(this.vertical){if(0===t)if(n<=0)b?(d[0].x=this.StartPoint.x-this.Frame.x+u/2,d[0].y=this.StartPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2,d[1].y=this.EndPoint.y-this.Frame.y,d.push(new Point$1(m.x+u/2,m.y+u/2)),e=!0):(d[0].x=this.StartPoint.x-this.Frame.x,d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[1].x=this.EndPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2,d.push(new Point$1(m.x+u/2,m.y+u/2)),e=!0);else if(y)d[0].x=w.x,d[0].y=w.y,d[1].x=m.x+u/2,d[1].y=m.y+u/2,e=!0;else{let t=0;this.arraylist.angle&&(t=m.y*this.arraylist.angle),d[0].x=this.StartPoint.x-this.Frame.x+u/2+t,d[0].y=this.StartPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2+t,d[1].y=m.y+u/2,d.push(new Point$1(m.x+u/2,m.y+u/2)),(S||x)&&d.shift(),e=!0}else if(t!==n||y)if(v)i[t].x!==this.StartPoint.x&&(d[0].x=this.StartPoint.x-this.Frame.x+u/2,d[0].y=m.y+u/2,d[1].x=m.x+u/2,d[1].y=m.y+u/2,e=!0);else if(y){switch(p[t].y){case OptConstant.ConnectorDefines.Above:d[0].x=this.StartPoint.x-this.Frame.x-this.arraylist.ht,d[0].y=m.y+u/2,d[1].x=m.x+u/2,d[1].y=m.y+u/2;break;case OptConstant.ConnectorDefines.Below:d[0].x=this.StartPoint.x-this.Frame.x+this.arraylist.ht,d[0].y=m.y+u/2,d[1].x=m.x+u/2,d[1].y=m.y+u/2;break;default:d[0].x=w.x,d[0].y=w.y,d[1].x=m.x+u/2,d[1].y=m.y+u/2}e=!0}else{let t=0;this.arraylist.angle&&(t=m.y*this.arraylist.angle),d[0].x=this.StartPoint.x-this.Frame.x+u/2+t,d[0].y=m.y+u/2,d[1].x=m.x+u/2,d[1].y=m.y+u/2,e=!0}else if(this.arraylist.angle){let t=m.y*this.arraylist.angle;d[0].x=this.StartPoint.x-this.Frame.x+u/2+t,d[0].y=this.EndPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2+t,d[1].y=m.y+u/2,d.push(new Point$1(m.x+u/2,m.y+u/2)),(S||x)&&d.shift(),e=!0}}else if(0===t)if(n<=0)b?(d[0].x=this.StartPoint.x-this.Frame.x,d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[1].x=this.EndPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2,d.push(new Point$1(m.x+u/2,m.y+u/2)),e=!0):(d[0].x=this.StartPoint.x-this.Frame.x+u/2,d[0].y=this.StartPoint.y-this.Frame.y,d[1].x=this.StartPoint.x-this.Frame.x+u/2,d[1].y=this.EndPoint.y-this.Frame.y,d.push(new Point$1(m.x+u/2,m.y+u/2)),e=!0);else if(y)d[0].y=w.y,d[0].x=w.x,d[1].y=m.y+u/2,d[1].x=m.x+u/2,e=!0;else{let t=0;this.arraylist.angle&&(t=m.x*this.arraylist.angle),d[0].y=this.StartPoint.y-this.Frame.y+u/2+t,d[0].x=this.StartPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2+t,d[1].x=m.x+u/2,d.push(new Point$1(m.x+u/2,m.y+u/2)),(S||x)&&d.shift(),e=!0}else if(t!==n||y)if(v)i[t].y!==this.StartPoint.y&&(d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[0].x=m.x+u/2,d[1].y=m.y+u/2,d[1].x=m.x+u/2,e=!0);else if(y){switch(p[t].y){case OptConstant.ConnectorDefines.Above:d[0].y=this.StartPoint.y-this.Frame.y-this.arraylist.ht,d[0].x=m.x+u/2,d[1].y=m.y+u/2,d[1].x=m.x+u/2;break;case OptConstant.ConnectorDefines.Below:d[0].y=this.StartPoint.y-this.Frame.y+this.arraylist.ht,d[0].x=m.x+u/2,d[1].y=m.y+u/2,d[1].x=m.x+u/2;break;default:d[0].y=w.y,d[0].x=w.x,d[1].y=m.y+u/2,d[1].x=m.x+u/2}e=!0}else d[0].y=this.StartPoint.y-this.Frame.y+u/2,d[0].x=m.x+u/2,d[1].y=m.y+u/2,d[1].x=m.x+u/2,e=!0;else if(this.arraylist.angle){let t=m.x*this.arraylist.angle;d[0].y=this.StartPoint.y-this.Frame.y+u/2+t,d[0].x=this.EndPoint.x-this.Frame.x,d[1].y=this.StartPoint.y-this.Frame.y+u/2+t,d[1].x=m.x+u/2,d.push(new Point$1(m.x+u/2,m.y+u/2)),(S||x)&&d.shift(),e=!0}r.AddElement(l),e&&(h=T3Gv.opt.svgDoc.CreateShape(OptConstant.CSType.Polyline),h&&(h.SetPoints(d),h.SetFillColor("none"),h.SetStrokeColor("black"),h.SetStrokePattern("2,2"),h.SetStrokeWidth(1),r.AddElement(h)))}return r.SetSize(c,g),r.SetPos(f.x,f.y),r.isShape=!0,r.SetID("hilite_"+e),LogUtil.Debug("S.Connector: CreateConnectHilites output:",r),r}}SetCursors(){LogUtil.Debug("S.Connector: SetCursors input");const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(Instance.Shape.BaseDrawObject.prototype.SetCursors.call(this),OptCMUtil.GetEditMode()===NvConstant.EditState.Default&&t){const e=t.GetElementById(OptConstant.Common.HitAreas);e&&e.SetCursor(CursorConstant.CursorType.AddPlus)}LogUtil.Debug("S.Connector: SetCursors output")}GetArrowheadSelection(t){return LogUtil.Debug("S.Connector: GetArrowheadSelection input:",t),t&&(t.StartArrowID=this.StartArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowID=this.EndArrowID,t.EndArrowDisp=this.EndArrowDisp,t.ArrowSizeIndex=this.ArrowSizeIndex),LogUtil.Debug("S.Connector: GetArrowheadSelection output:",t),!0}RightClick(t){const e=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),i=T3Gv.opt.svgObjectLayer.FindElementByDOMElement(t.currentTarget);if(!SelectUtil.SelectObjectFromClick(t,i))return!1;const n=i.GetID(),s=ObjectUtil$1.GetObjectPtr(n,!1);if(s){if(s.GetTextObject()>=0){const e=i.textElem;if(e){e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY)>=0&&TextUtil.ActivateTextEdit(i,t,!0)}}const e=OptConstant.AStyles;s.arraylist.styleflags,e.CoManager,s.arraylist.styleflags,e.PerpConn,OptConstant.ConnectorDefines.NSkip,s.arraylist.hook.length}if(T3Gv.opt.rClickParam=new RightClickMd,T3Gv.opt.rClickParam.targetId=i.GetID(),T3Gv.opt.rClickParam.hitPoint.x=e.x,T3Gv.opt.rClickParam.hitPoint.y=e.y,T3Gv.opt.rClickParam.locked=(this.flags&NvConstant.ObjFlags.Lock)>0,null!=TextUtil.GetActiveTextEdit()){const e=T3Gv.opt.svgDoc.GetActiveEdit();e&&e.GetSpellAtLocation(t.gesture.center.clientX,t.gesture.center.clientY),UIUtil.ShowContextMenu(!0,"Connector","Editable")}else QuasarUtil.ShowContextMenu(!0,"Connector","Default")}HitAreaClick(t){LogUtil.Debug("S.Connector: HitAreaClick input:",t),T3Gv.opt.CloseEdit();let e=this;switch(t){case OptConstant.HitAreaType.ConnCollapse:e.CollapseConnector(!0,!1,!0);break;case OptConstant.HitAreaType.ConnExpand:e.CollapseConnector(!1,!1,!0)}OptAhUtil.FindTreeTop(e,DSConstant.LinkFlags.Move,{topconnector:-1,topshape:-1,foundtree:!1}),DrawUtil.CompleteOperation(),LogUtil.Debug("S.Connector: HitAreaClick output")}GetPolyPoints(t,e,i,n,s){let a,o,r,l,h,c,u,d,p,g,f,m,v=[],b={},y=OptConstant.AStyles;const S=this.arraylist.styleflags&y.CoManager,x=(this.arraylist.styleflags&y.PerpConn)>0,w=this.arraylist.styleflags&y.StartLeft,C=this.IsAsstConnector(),T=OptConstant.ConnectorDefines.NSkip,D=this.arraylist.styleflags&y.ReverseCol,k=this.arraylist.styleflags&OptConstant.AStyles.Linear,$=this.arraylist.styleflags&OptConstant.AStyles.FlowConn&&k,O=0!==this.arraylist.angle,P=OptConstant.ConnectorDefines.ACl;OptConstant.ConnectorDefines.ACr;const L=this.StartArrowID>0,I=0===this.EndArrowID&&L;let A=!1;const E=this.arraylist.curveparam;let G=0;o=this.arraylist.hook.length,e?(b.x=this.StartPoint.x-this.Frame.x,b.y=this.StartPoint.y-this.Frame.y):b=this.StartPoint;const U=o==T+1&&0==(this.arraylist.styleflags&y.PerpConn),F={index:-1,left:!1};if(this.AllowCurveOnConnector(F)&&(o>T+1||U)&&E>0&&!i){G=E;let t=this.arraylist.ht-function(t){let e,i=0;for(a=0;a<o;a++)if(e=t.arraylist.hook[a],e.comanagerht>i){i=e.comanagerht;break}return i}(this);t<0&&(t=0),C&&!this.vertical?G>this.arraylist.wd&&(G=this.arraylist.wd):G>t&&(G=t)}if(this.vertical){for(d=D?-1:1,h=this.arraylist.ht,a=0;a<o;a++){const t=this.arraylist.hook[a];if(p=Utils2.IsEqual(t.startpoint.v+b.x,t.endpoint.v+b.x)&&Utils2.IsEqual(d*t.startpoint.h+b.y,d*t.endpoint.h+b.y),g=(a>=T||$)&&!S&&!C&&!p&&!A,a!==P||!I||p||$||O||(g=!0,A=!0),a===T&&g&&L&&$&&(g=!1),g&&a===P){let e=!1;$&&o>T&&!L&&(f=this.arraylist.hook[T],e=!Utils2.IsEqual(f.startpoint.h+b.x,f.endpoint.h+b.x)&&Utils2.IsEqual(f.startpoint.v+b.y,f.endpoint.v+b.y)),e&&(g=!1),C&&G&&a===P?(v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!0,g)),t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+b.x-G,d*t.startpoint.h+b.y,!1,g)):v.push(new PathPoint(t.startpoint.v+b.x+G,d*t.startpoint.h+b.y,!1,g))):G&&a===P&&U?(v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!0,g)),v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y-d*G,!1,g))):(v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!0,g)),v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y,!1,g)))}else if(a===F.index&&G){let e=1;this.arraylist.hook[P].endpoint.v>0&&(e=-1),F.left?(v.push(new PathPoint(t.startpoint.v+b.x,t.startpoint.h+b.y+G,!0,g,-e*G,G)),v.push(new PathPoint(t.endpoint.v+b.x,t.endpoint.h+b.y-2*G,!1,g))):(v.push(new PathPoint(t.startpoint.v+b.x,t.startpoint.h+b.y+G,!0,g,-e*G,-G)),v.push(new PathPoint(t.endpoint.v+b.x,t.endpoint.h+b.y,!1,g)))}else if(G&&a===P&&U)v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y-d*G,!0,g)),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!1,g));else if(G&&0===a){if(t.endpoint.v===t.startpoint.v&&t.endpoint.h===t.startpoint.h&&C){v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y,!0,g)),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!1,g));continue}x?v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y+G,!0,g)):U?v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y-G,!0,g)):v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y,!0,g));let e=d*G;U&&(e=G),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y-e,!1,g))}else G&&a===T&&x?(m=G,t.endpoint.h===t.startpoint.h&&t.endpoint.v===t.startpoint.v&&(m=0),t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+b.x-m,d*t.startpoint.h+b.y,!0,g,m,m)):v.push(new PathPoint(t.startpoint.v+b.x+m,d*t.startpoint.h+b.y,!0,g,-m,m)),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!1,g))):G&&a===o-1&&0===k?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+b.x-G,d*t.startpoint.h+b.y,!0,g,G,-d*G)):v.push(new PathPoint(t.startpoint.v+b.x+G,d*t.startpoint.h+b.y,!0,g,-G,-d*G)),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!1,g))):C&&G&&a===P?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+b.x-G,d*t.startpoint.h+b.y,!0,g)):v.push(new PathPoint(t.startpoint.v+b.x+G,d*t.startpoint.h+b.y,!0,g)),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!1,g))):(v.push(new PathPoint(t.startpoint.v+b.x,d*t.startpoint.h+b.y,!0,g)),v.push(new PathPoint(t.endpoint.v+b.x,d*t.endpoint.h+b.y,!1,g)))}if(S)for(w?(r=this.arraylist.coprofile.v,u=-1):(r=this.arraylist.coprofile.vdist,u=1),a=0;a<o;a++){const t=this.arraylist.hook[a];c=w?t.pr.v:t.pr.vdist,l=c?r-(c+2*h):0,G&&0===a?(v.push(new PathPoint(t.startpoint.v+b.x+u*r,t.startpoint.h+b.y+G,!0,!1)),v.push(new PathPoint(-t.endpoint.v-u*l+b.x+u*r,t.endpoint.h+b.y-G,!1,!1))):G&&a===T?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+b.x+u*r+G,t.startpoint.h+b.y,!0,!1,-G,G)):v.push(new PathPoint(t.startpoint.v+b.x+u*r-G,t.startpoint.h+b.y,!0,!1,G,G)),v.push(new PathPoint(-t.endpoint.v-u*l+b.x+u*r,t.endpoint.h+b.y,!1,!1))):G&&a===o-1?(t.endpoint.v<0?v.push(new PathPoint(t.startpoint.v+b.x+u*r+G,t.startpoint.h+b.y,!0,!1,-G,-G)):v.push(new PathPoint(t.startpoint.v+b.x+u*r-G,t.startpoint.h+b.y,!0,!1,G,-G)),v.push(new PathPoint(-t.endpoint.v-u*l+b.x+u*r,t.endpoint.h+b.y,!1,!1))):(v.push(new PathPoint(t.startpoint.v+b.x+u*r,t.startpoint.h+b.y,!0,!1)),v.push(new PathPoint(-t.endpoint.v-u*l+b.x+u*r,t.endpoint.h+b.y,!1,!1)))}}else for(h=this.arraylist.ht,a=0;a<o;a++)this.arraylist.hook[a];return v}OffsetShape(t,e,i){LogUtil.Debug("S.Connector: OffsetShape input:",{offsetX:t,offsetY:e,additionalParam:i}),this.Frame.x+=t,this.Frame.y+=e,this.r.x+=t,this.r.y+=e,this.inside.x+=t,this.inside.y+=e,this.trect.x+=t,this.trect.y+=e,this.StartPoint.x+=t,this.StartPoint.y+=e,this.EndPoint.x+=t,this.EndPoint.y+=e,LogUtil.Debug("S.Connector: OffsetShape output:",this)}CalcFrame(){LogUtil.Debug("S.Connector: CalcFrame input");let t=[];const e=this.arraylist.styleflags&OptConstant.AStyles.Linear;this.arraylist?(t=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!0,!1,null),e&&t.push(this.EndPoint),t&&t.length&&Utils2.GetPolyRect(this.Frame,t)):this.Frame=Utils2.Pt2Rect(this.StartPoint,this.EndPoint),this.UpdateFrame(this.Frame),LogUtil.Debug("S.Connector: CalcFrame output:",this.Frame)}GetDimensions(){LogUtil.Debug("S.Connector: GetDimensions input");let t={};const e=this.arraylist.styleflags&OptConstant.AStyles.Linear,i=(this.arraylist.styleflags&OptConstant.AStyles.BothSides)>0;return this.vertical?(t.y=this.arraylist.hook[0].endpoint.h-this.arraylist.hook[0].startpoint.h,t.x=e?0:this.arraylist.ht,i&&!e&&(t.x/=2)):(t.x=this.arraylist.hook[0].endpoint.h-this.arraylist.hook[0].startpoint.h,t.y=e?0:this.arraylist.ht,i&&!e&&(t.y/=2)),LogUtil.Debug("S.Connector: GetDimensions output:",t),t}CanSnapToShapes(){LogUtil.Debug("S.Connector: CanSnapToShapes input");const t=this.IsFlowChartConnector(),e=0===this.hooks.length,i=this.arraylist.hook.length===OptConstant.ConnectorDefines.NSkip+1;if(t&&e&&i){const t=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id;return LogUtil.Debug("S.Connector: CanSnapToShapes output:",t),t}return LogUtil.Debug("S.Connector: CanSnapToShapes output: -1"),-1}ScaleObject(t,e,i,n,s,a,o){LogUtil.Debug("S.Connector: ScaleObject input:",{scaleX:t,scaleY:e,offsetX:i,offsetY:n,primaryScale:s,secondaryScale:a,extraFactor:o}),Instance.Shape.BaseLine.prototype.ScaleObject.call(this,t,e,i,n,s,a,o);const r=this.arraylist.styleflags&OptConstant.AStyles.BothSides||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),l=OptConstant.ConnectorDefines,h=this.arraylist.hook.length,c=l.NSkip;this.vertical?(this.arraylist.ht=this.arraylist.ht*s,this.arraylist.wd=this.arraylist.wd*a,h>=c&&(r?(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*a),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*a)):(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*s),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*s)))):(this.arraylist.wd=this.arraylist.wd*s,this.arraylist.ht=this.arraylist.ht*a,h>=c&&(r?(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*s),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*s)):(this.arraylist.hook[l.ACl].gap&&(this.arraylist.hook[l.ACl].gap=this.arraylist.hook[l.ACl].gap*a),this.arraylist.hook[l.ACr].gap&&(this.arraylist.hook[l.ACr].gap=this.arraylist.hook[l.ACr].gap*a)))),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),LogUtil.Debug("S.Connector: ScaleObject output:",{arraylist:this.arraylist,rflags:this.rflags})}SetSize(t,e,i){let n,s,a;LogUtil.Debug("S.Connector: SetSize input:",{primarySize:t,secondarySize:e,extraInfo:i});let o,r=this.GetDimensions();const l=OptConstant.AStyles,h=(this.arraylist.styleflags&l.BothSides)>0,c=(this.arraylist.styleflags&l.Linear)>0;o=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,n=this.PrGetNBackBoneSegments(),h&&(n%2&&n++,n/=2),this.vertical?(e&&o>1&&(a=e-r.y,this.arraylist.wd+=a/n,this.arraylist.wd<0&&(this.arraylist.wd=0)),t&&!c&&(this.arraylist.ht=t,h&&(this.arraylist.ht/=2))):(t&&o>1&&(s=t-r.x,this.arraylist.wd+=s/n,this.arraylist.wd<0&&(this.arraylist.wd=0)),e&&!c&&(this.arraylist.ht=e,h&&(this.arraylist.ht/=2))),this.PrFormat(this.BlockID),this.rflags&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1),this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1)),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),LogUtil.Debug("S.Connector: SetSize output:",{arraylist:this.arraylist,rflags:this.rflags})}UpdateFrame(t){LogUtil.Debug("S.Connector: UpdateFrame input:",t);let e=t||this.Frame;if(Instance.Shape.BaseDrawObject.prototype.UpdateFrame.call(this,e),T3Gv.opt){let t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(null!==t){let e=this.GetSVGFrame(),i=t.GetElementById(OptConstant.SVGElementClass.Shape);if(i){let t=i.GetArrowheadBounds();if(t&&t.length)for(let i=0;i<t.length;i++)t[i].x+=e.x,t[i].y+=e.y,this.r=Utils2.UnionRect(t[i],this.r,this.r)}}}if(this.StyleRecord){let t=this.StyleRecord.Line.Thickness/2;t<OptConstant.Common.MinWidth&&(t=OptConstant.Common.MinWidth),Utils2.InflateRect(this.r,t/2,t/2);let e=this.CalcEffectSettings(this.Frame,this.StyleRecord,!1);e&&Utils2.Add2Rect(this.r,e.extent)}LogUtil.Debug("S.Connector: UpdateFrame output:",this.r)}GetHitTestFrame(){LogUtil.Debug("S.Connector: GetHitTestFrame input");const t=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),e=Boolean(this.arraylist.styleflags&OptConstant.AStyles.StartLeft),i=Boolean(this.arraylist.styleflags&OptConstant.AStyles.FlowConn),n=Boolean(this.arraylist.styleflags&OptConstant.AStyles.BothSides)||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),s=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Radial)&&!n;let a,o;t&&i?this.vertical?(a=OptConstant.Common.FlowConnectorSlop,o=OptConstant.Common.ConnectorSlop):(a=OptConstant.Common.ConnectorSlop,o=OptConstant.Common.FlowConnectorSlop):(a=OptConstant.Common.ConnectorSlop,o=a);let r=Utils1.DeepCopy(this.Frame);if(Utils2.InflateRect(r,a,o),s){const t=i?OptConstant.Common.FlowRadialSlop:OptConstant.Common.ConnectorSlop;this.vertical?e?(r.x-=t,r.width+=t):r.width+=t:e?(r.y-=t,r.height+=t):r.height+=t}return r=Utils2.UnionRect(this.r,r,r),LogUtil.Debug("S.Connector: GetHitTestFrame output",r),r}GetMoveRect(t,e){LogUtil.Debug("S.Connector: GetMoveRect input:",{unusedParam:t,shouldInflate:e});let i={};return 1===this.arraylist.hook.length?(Utils2.CopyRect(i,this.Frame),i.height=0,i.width=0,LogUtil.Debug("S.Connector: GetMoveRect output for single hook:",i),i):(e?(Utils2.CopyRect(i,this.Frame),Utils2.InflateRect(i,this.StyleRecord.Line.Thickness/2,this.StyleRecord.Line.Thickness/2)):Utils2.CopyRect(i,this.Frame),LogUtil.Debug("S.Connector: GetMoveRect output:",i),i)}SetShapeOrigin(t,e){LogUtil.Debug("S.Connector: SetShapeOrigin input: originX =",t,", originY =",e);let i=0,n=0;null!=t&&(i=t-this.Frame.x),null!=e&&(n=e-this.Frame.y),this.OffsetShape(i,n),LogUtil.Debug("S.Connector: SetShapeOrigin output: Offset applied with offsetX =",i,", offsetY =",n)}Hit(t,e,i,n){if(LogUtil.Debug("S.Connector: Hit input:",{point:t,isBorderCheck:e,additionalParam:i,anotherParam:n}),this.IsCoManager())return LogUtil.Debug("S.Connector: Hit output:",0),0;if(e){if(Utils2.pointInRect(this.r,t))return LogUtil.Debug("S.Connector: Hit output:",NvConstant.HitCodes.Border),NvConstant.HitCodes.Border}else{const e=this.GetHitTestFrame();if(Utils2.pointInRect(e,t))return LogUtil.Debug("S.Connector: Hit output:",NvConstant.HitCodes.Border),NvConstant.HitCodes.Border}return LogUtil.Debug("S.Connector: Hit output:",0),0}PreventLink(){return!!this.hooks.length}HandleActionTriggerTrackCommon(t,e){const i=this.arraylist.hook.length;if(!this.arraylist||!this.arraylist.hook||i<1)return;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);const n=T3Gv.opt.actionSvgObject,s=n.GetElementById(OptConstant.SVGElementClass.Shape),a=n.GetElementById(OptConstant.SVGElementClass.Slop),o=Utils1.DeepCopy(this.Frame),r=OptConstant.AStyles,l=OptConstant.ConnectorDefines;let h=0,c=0;this.vertical?(c=e-T3Gv.opt.actionStartY,h=t-T3Gv.opt.actionStartX):(h=t-T3Gv.opt.actionStartX,c=e-T3Gv.opt.actionStartY);let u=this.arraylist.ht;const d=this.arraylist.wd;let p=d;const g=Boolean(this.arraylist.styleflags&r.ReverseCol),f=Boolean(this.arraylist.styleflags&r.BothSides||0==(this.arraylist.styleflags&r.PerpConn)),m=Boolean(this.arraylist.styleflags&r.BothSides&&0==(this.arraylist.styleflags&r.Stagger)),v=Boolean(this.arraylist.styleflags&r.Stagger&&this.vertical),b=Boolean(this.arraylist.styleflags&r.StartLeft),y=Boolean(this.arraylist.styleflags&r.Linear),S=Boolean(this.arraylist.styleflags&r.FlowConn),x=this.PrGetStubIndex(),w=this.PrGetEndShapeIndex(),C=y&&x===l.ACr;let D=this.PrGetNBackBoneSegments();m&&(D%2&&D++,D/=2),0!==x&&D++,0!==w&&D++;let k,$=0,O=0,P=0,L=0;switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.ConnectorAdj:(g||C)&&(h=-h);let t=T3Gv.opt.OldConnectorExtra+h;t<-T3Gv.opt.OldConnectorWd&&(t=-T3Gv.opt.OldConnectorWd),h=t-this.arraylist.hook[T3Gv.opt.actionTriggerData].extra,this.arraylist.hook[T3Gv.opt.actionTriggerData].extra=t,m&&T3Gv.opt.actionTriggerData<this.arraylist.hook.length-1&&(this.arraylist.hook[T3Gv.opt.actionTriggerData+1].extra=t),(g||C)&&(h=-h),c=0;break;case OptConstant.ActionTriggerType.LineStart:h=-h,p=T3Gv.opt.OldConnectorWd+h/D,p<0&&(p=0),L=p-d;const e=L*D;this.vertical?o.height+=e:o.width+=e,h=-h,c=0;break;case OptConstant.ActionTriggerType.LineEnd:g&&(h=-h),p=T3Gv.opt.OldConnectorWd+h/D,p<0&&(p=0),L=p-d,this.vertical?o.height+=L*D:o.width+=L*D,g&&(h=-h),c=0;break;case OptConstant.ActionTriggerType.ConnectorRerp:L=u,(m&&T3Gv.opt.actionTriggerData%2||v&&b)&&(c=-c),(b&&m||b)&&(c=-c),u=T3Gv.opt.OldConnectorHt+c,u<0&&(u=0),c=u-L,(b&&m||b)&&(c=-c),h=0;break;case OptConstant.ActionTriggerType.ConnectorHook:k=this.arraylist.hook[T3Gv.opt.actionTriggerData];const i=k.gap;P=f?h:c,g?P=-P:b?f||(P=-P):T3Gv.opt.actionTriggerData===OptConstant.ConnectorDefines.ACr&&(P=-P),k.gap=T3Gv.opt.OldConnectorGap+P;const n=T3Gv.opt.OldConnectorExtra+P;k.gap<0&&(k.gap=0),S&&0===k.gap&&(k.gap=.01);let s=n;s<0&&(s=0),P=k.gap-i,y&&!f&&(k.extra=s),g?P=-P:b?f||(P=-P):T3Gv.opt.actionTriggerData===OptConstant.ConnectorDefines.ACr&&(P=-P),c=0,h=0,f?(g?k.startpoint.h-=P:k.startpoint.h+=P,this.vertical?($=0,O=P):(O=0,$=P)):(k.startpoint.v+=P,this.vertical?(O=0,$=P):($=0,O=P));break;default:return c=0,void(h=0)}this.arraylist.ht=u,this.arraylist.wd=p;const I=this.PrAdjustFormat(h,c,P,T3Gv.opt.actionTriggerId,T3Gv.opt.actionTriggerData,D,x,w);let A,E;if(I&&(A=I.linestart,E=I.linedisp),0===P&&(this.vertical?($=c,O=h):($=h,O=c)),n){const i=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!1,!1,null);if(n.SetSize(o.width,o.height),n.SetPos(o.x,o.y),s.SetSize(o.width,o.height),this.UpdateSVG(T3Gv.opt.svgDoc,s,i),a.SetSize(o.width,o.height),this.UpdateSVG(T3Gv.opt.svgDoc,a,i),T3Gv.opt.ConnectorList){const i=T3Gv.opt.ConnectorList.length;switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.ConnectorAdj:this.arraylist.angle&&($=O*this.arraylist.angle);for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].locallist;if(e)for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+$,i.y+O)}if(m&&t<i-1){t++;const e=T3Gv.opt.ConnectorList[t].locallist;if(e)for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+$,i.y+O)}}}break;case OptConstant.ActionTriggerType.LineEnd:case OptConstant.ActionTriggerType.LineStart:this.arraylist.angle&&($=O*this.arraylist.angle);let n=$,s=O,a=-1;T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineEnd&&i>0&&this.arraylist.hook[l.A_Cr].id>=0?a=l.A_Cr:T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart&&i>0&&this.arraylist.hook[l.A_Cl].id>=0&&(a=l.A_Cl);let o=m&&this.arraylist.hook.length%2==0&&T3Gv.opt.actionTriggerId===OptConstant.ActionTriggerType.LineStart;for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].locallist,r=T3Gv.opt.ConnectorList[t].Index;if(e){A&&null!==A[r]&&(this.vertical?(e[0].GetPos(),s=E[r],this.arraylist.angle&&(n=s*this.arraylist.angle)):(e[0].GetPos(),n=E[r]));for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+n,i.y+s)}}if(m&&t<i-1&&!o&&a!==T3Gv.opt.ConnectorList[t+1].Index){t++;const e=T3Gv.opt.ConnectorList[t].locallist;if(e)for(let t=0;t<e.length;t++){const i=e[t].GetPos();e[t].SetPos(i.x+n,i.y+s)}}o&&(o=!1),n+=$,s+=O}const r={x:this.Frame.x,y:this.Frame.y,width:T.x,height:T.y},h={x:t,y:e};UIUtil.UpdateDisplayCoordinates(r,h,CursorConstant.CursorTypes.Grow,this);break;case OptConstant.ActionTriggerType.ConnectorRerp:let c=0;this.GetTilt()&&(c=-O);for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].GetPos();!(!m&&!v)&&(this.vertical?this.arraylist.angle?t%2:e.x<this.StartPoint.x:e.y<this.StartPoint.y)?T3Gv.opt.ConnectorList[t].SetPos(e.x-$+c,e.y-O):T3Gv.opt.ConnectorList[t].SetPos(e.x+$+c,e.y+O)}const u={x:this.Frame.x,y:this.Frame.y,width:T.x,height:T.y},d={x:t,y:e};UIUtil.UpdateDisplayCoordinates(u,d,CursorConstant.CursorTypes.Grow,this);break;default:for(let t=0;t<i;t++){const e=T3Gv.opt.ConnectorList[t].GetPos();T3Gv.opt.ConnectorList[t].SetPos(e.x+$,e.y+O)}}}}}UpdateDimensions(t,e,i){let n,s,a,o=!1,r=this.PrGetNBackBoneSegments();const l=OptConstant.AStyles;this.arraylist.styleflags&l.SEDA_BothSides&&(r%2&&r++,r/=2),r<1&&(r=1),this.vertical?(i&&(s=this.arraylist.wd,n=(i-Math.abs(this.EndPoint.y-this.StartPoint.y))/r,this.arraylist.wd+=n,this.arraylist.wd<0&&(this.arraylist.wd=0),o=this.arraylist.wd!==s),t&&(t<0&&(t=0),a=this.arraylist.ht,this.arraylist.ht=t,o=this.arraylist.ht!==a)):(t&&(s=this.arraylist.wd,n=(t-Math.abs(this.EndPoint.x-this.StartPoint.x))/r,this.arraylist.wd+=n,this.arraylist.wd<0&&(this.arraylist.wd=0),o=this.arraylist.wd!==s),e&&(a=this.arraylist.ht,e<0&&(e=0),this.arraylist.ht=e,o=this.arraylist.ht!==a)),o&&this.PrFormat(this.BlockID)}HandleActionTriggerDoAutoScroll(){Instance.Shape.BaseLine.prototype.HandleActionTriggerDoAutoScroll.call(this)}AutoScrollCommon(t,e,i){return Instance.Shape.BaseLine.prototype.AutoScrollCommon.call(this,t,e,i)}LMActionTrack(t){Instance.Shape.BaseLine.prototype.LMActionTrack.call(this,t)}LMActionRelease(t,e){try{let t,i;switch(e||(LMEvtUtil.UnbindActionClickHammerEvents(),this.ResetAutoScrollTimer()),T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.LineStart:case OptConstant.ActionTriggerType.LineEnd:for(t=this.arraylist.hook.length,i=0;i<t;i++){let t=this.arraylist.hook[i];t.extra<-this.arraylist.wd&&(t.extra=-this.arraylist.wd)}}this.PrFormat(T3Gv.opt.actionStoredObjectId),OptCMUtil.SetLinkFlag(T3Gv.opt.actionStoredObjectId,DSConstant.LinkFlags.Move),T3Gv.opt.UpdateLinks(),e||(this.LMActionPostRelease(T3Gv.opt.actionStoredObjectId),T3Gv.opt.actionStoredObjectId=-1,T3Gv.opt.actionSvgObject=null),LayerUtil.ShowOverlayLayer(),DrawUtil.CompleteOperation()}catch(i){throw Instance.Shape.BaseShape.prototype.LMActionClickExpCleanup.call(this,i),T3Gv.opt.ExceptionCleanup(i),i}}LMSetupActionClick(t,e){return Instance.Shape.BaseLine.prototype.LMSetupActionClick.call(this,t,e)}LMActionClick(t,e){Instance.Shape.BaseLine.prototype.LMActionClick.call(this,t,e)}LMActionClickExpCleanup(t){Instance.Shape.BaseLine.prototype.LMActionClickExpCleanup.call(this,t)}LMActionPreTrack(t,e){LogUtil.Debug("S.Connector: LMActionPreTrack input:",{actionEvent:t,triggerType:e});let i,n,s,a,o,r,l,h={},c=[],u=1,d=ObjectUtil$1.GetObjectPtr(T3Gv.opt.linksBlockId,!1),p=this.arraylist.styleflags&OptConstant.AStyles.BothSides&&0==(this.arraylist.styleflags&OptConstant.AStyles.Stagger),g=(this.arraylist.styleflags&OptConstant.AStyles.Linear)>0,f=OptConstant.ConnectorDefines,m=this,v=function(t,e){let i=t.id;if(t.id<0&&(e===f.ACl?i=m.arraylist.hook[f.NSkip].id:e===f.ACr&&(i=m.arraylist.hook[m.arraylist.hook.length-1].id)),ObjectUtil$1.GetObjectPtr(i,!1)){c=[],c=HookUtil.GetHookList(d,c,i,ObjectUtil$1.GetObjectPtr(i,!1),NvConstant.ListCodes.MoveHook,h),r=c.length;let t=[];for(a=0;a<r;a++)s=T3Gv.opt.svgObjectLayer.GetElementById(c[a]),s&&(t.push(s),ObjectUtil$1.AddToDirtyList(c[a]));let n={Index:e,locallist:t};T3Gv.opt.ConnectorList.push(n)}},b=function(t,e,i,n){let s,a,r;if(o=t.hook.length,e){for(i===f.ACr&&(s=f.ACr,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.endpoint.h-a.startpoint.h-a.gap),s=OptConstant.ConnectorDefines.NSkip;s<o-1-0;s++)a=t.hook[s+0],r=t.hook[s+0+1],T3Gv.opt.ConnectorWidthList[s+0]=r.endpoint.h-a.endpoint.h-t.wd-r.extra,p&&s++;n===f.ACl&&(s=f.ACl,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.startpoint.h-a.endpoint.h-a.gap)}else{let e=0;for(i===f.ACl&&(e=0,s=f.ACl,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.startpoint.h-a.endpoint.h-a.gap),p&&(e=1),s=OptConstant.ConnectorDefines.NSkip+1+e;s<o;s++)a=t.hook[s],r=t.hook[s-1],T3Gv.opt.ConnectorWidthList[s]=a.endpoint.h-r.endpoint.h-t.wd-a.extra,p&&s++;n===f.ACr&&(s=f.ACr,a=t.hook[s],T3Gv.opt.ConnectorWidthList[s]=a.endpoint.h-a.startpoint.h-a.gap)}};T3Gv.opt.OldConnectorWd=this.arraylist.wd,T3Gv.opt.OldConnectorHt=this.arraylist.ht,T3Gv.opt.ConnectorList=[],T3Gv.opt.ConnectorWidthList=[],p&&(u=2),e===OptConstant.ActionTriggerType.ConnectorHook&&(i=this.arraylist.hook[T3Gv.opt.actionTriggerData],T3Gv.opt.OldConnectorGap=i.gap,T3Gv.opt.OldConnectorExtra=i.extra);let y=this.PrGetStubIndex(),S=this.PrGetEndShapeIndex();switch(e){case OptConstant.ActionTriggerType.ConnectorAdj:if(u=T3Gv.opt.actionTriggerData,i=this.arraylist.hook[T3Gv.opt.actionTriggerData],T3Gv.opt.OldConnectorExtra=i.extra,o=this.arraylist.hook.length,g&&y===f.ACr)for(a=OptConstant.ConnectorDefines.NSkip;a<u;a++)i=this.arraylist.hook[a],v(i,a);else for(a=u;a<o;a++)i=this.arraylist.hook[a],v(i,a);break;case OptConstant.ActionTriggerType.LineEnd:for(o=this.arraylist.hook.length,b(this.arraylist,!1,y,S),y===f.ACl&&S===f.ACl||(u=0),a=OptConstant.ConnectorDefines.NSkip+u;a<o;a++)i=this.arraylist.hook[a],v(i,a);o&&this.arraylist.hook[f.ACr].id>=0&&v(this.arraylist.hook[f.ACr],f.ACr);break;case OptConstant.ActionTriggerType.LineStart:for(o=this.arraylist.hook.length,p&&o%2==0&&(u=1),b(this.arraylist,!0,y,S),y===f.ACr&&S===f.ACr||(u=0),a=o-1-u;a>=OptConstant.ConnectorDefines.NSkip;a--)i=this.arraylist.hook[a],v(i,a);o&&this.arraylist.hook[f.ACl].id>=0&&v(this.arraylist.hook[f.ACl],f.ACl);break;case OptConstant.ActionTriggerType.ConnectorRerp:case OptConstant.ActionTriggerType.ConnectorHook:if(n=ObjectUtil$1.GetObjectPtr(t,!1),n&&d){for(c=HookUtil.GetHookList(d,c,t,n,NvConstant.ListCodes.ChildrenOnly,h),o=c.length,this.arraylist.hook[f.ACl].id>=0&&(l=c.indexOf(this.arraylist.hook[f.ACl].id),l>=0&&c.splice(l,1)),this.arraylist.hook[f.ACr].id>=0&&(l=c.indexOf(this.arraylist.hook[f.ACr].id),l>=0&&c.splice(l,1)),a=0;a<o;a++)s=T3Gv.opt.svgObjectLayer.GetElementById(c[a]),s&&(T3Gv.opt.ConnectorList.push(s),ObjectUtil$1.AddToDirtyList(c[a]));n.hooks.length&&OptCMUtil.SetLinkFlag(n.hooks[0].objid,DSConstant.LinkFlags.Move)}}return LogUtil.Debug("S.Connector: LMActionPreTrack output:",!0),!0}LMActionDuringTrack(t){LogUtil.Debug("S.Connector: LMActionDuringTrack input:",t);const e=t;return LogUtil.Debug("S.Connector: LMActionDuringTrack output:",e),e}LMActionPostRelease(t){LogUtil.Debug("S.Connector: LMActionPostRelease input:",{releasedConnectorId:t}),T3Gv.opt.ConnectorList=[],T3Gv.opt.ConnectorWidthList=[],OptCMUtil.SetEditMode(NvConstant.EditState.Default),LogUtil.Debug("S.Connector: LMActionPostRelease output: completed")}GetBestHook(t,e,i){LogUtil.Debug("S.Connector: GetBestHook input:",{targetObjectId:t,unusedParam:e,hookPosition:i});const n=this.arraylist.styleflags&OptConstant.AStyles.BothSides,s=this.arraylist.styleflags&OptConstant.AStyles.Linear;let a,o,r;if(a=n?this.arraylist.styleflags&OptConstant.AStyles.StartLeft?i.x%2-1:i.x%2:this.arraylist.styleflags&OptConstant.AStyles.StartLeft,this.vertical){if(!s)return o=-1===i.x?OptConstant.HookPts.AKCB:-2===i.x?OptConstant.HookPts.AKCT:a?OptConstant.HookPts.AKCR:OptConstant.HookPts.AKCL,LogUtil.Debug("S.Connector: GetBestHook output:",o),o;switch(i.y){case OptConstant.ConnectorDefines.Above:o=OptConstant.HookPts.AKCR;break;case OptConstant.ConnectorDefines.Below:o=OptConstant.HookPts.AKCL;break;case OptConstant.ConnectorDefines.Parent:o=0===i.x?OptConstant.HookPts.AKCB:OptConstant.HookPts.AKCT;break;default:r=ObjectUtil$1.GetObjectPtr(t,!1),o=r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LL:OptConstant.HookPts.LT:OptConstant.HookPts.AKCT}return LogUtil.Debug("S.Connector: GetBestHook output:",o),o}if(!s)return r=ObjectUtil$1.GetObjectPtr(t,!1),o=a?r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LB:OptConstant.HookPts.LR:OptConstant.HookPts.AKCB:r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LT:OptConstant.HookPts.LL:OptConstant.HookPts.AKCT,LogUtil.Debug("S.Connector: GetBestHook output:",o),o;switch(i.y){case OptConstant.ConnectorDefines.Above:o=OptConstant.HookPts.AKCB;break;case OptConstant.ConnectorDefines.Below:o=OptConstant.HookPts.AKCT;break;case OptConstant.ConnectorDefines.Parent:o=0===i.x?OptConstant.HookPts.AKCR:OptConstant.HookPts.AKCL;break;default:r=ObjectUtil$1.GetObjectPtr(t,!1),o=r&&r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector?r.vertical?OptConstant.HookPts.LT:OptConstant.HookPts.LL:OptConstant.HookPts.AKCL}return LogUtil.Debug("S.Connector: GetBestHook output:",o),o}GetHookFlags(){return NvConstant.HookFlags.LcMoveTarget}HookToPoint(t,e){LogUtil.Debug("S.Connector: HookToPoint input:",{hookPoint:t,outputRectangle:e});let i={x:0,y:0};const n=OptConstant.AStyles,s=OptConstant.ConnectorDefines,a=this.arraylist.styleflags&n.BothSides||0==(this.arraylist.styleflags&n.PerpConn),o=this.arraylist.styleflags&n.ReverseCol;if(i.x=this.StartPoint.x,i.y=this.StartPoint.y,null==this.arraylist)return LogUtil.Debug("S.Connector: HookToPoint output:",i),i;const r=o?-1:1;if(this.arraylist.hook.length<=s.NSkip||this.flags&NvConstant.ObjFlags.NotVisible){let t=this.vertical;if(!a){t=!t,Boolean(this.arraylist.styleflags&n.StartLeft)&&(t=!t)}const s=this.arraylist.styleflags&n.StartLeft?this.arraylist.hook[0].endpoint:this.arraylist.hook[0].startpoint;if(t?(i.y+=s.h,i.x+=s.v):(i.y+=s.v,i.x+=s.h),e){const t=Utils2.Pt2Rect(this.StartPoint,this.EndPoint);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}return LogUtil.Debug("S.Connector: HookToPoint output:",i),i}const l=this.arraylist.hook[s.ACl],h=this.arraylist.hook[s.ACr];let c={x:0,y:0},u={x:0,y:0},d={x:0,y:0},p={x:0,y:0};switch(this.vertical?(c.x=this.StartPoint.x+l.endpoint.v,c.y=this.StartPoint.y+r*l.endpoint.h,u.x=this.StartPoint.x+h.endpoint.v,u.y=this.StartPoint.y+r*h.endpoint.h,d.x=this.StartPoint.x+l.startpoint.v,d.y=this.StartPoint.y+r*l.startpoint.h,p.x=this.StartPoint.x+h.startpoint.v,p.y=this.StartPoint.y+r*h.startpoint.h):(c.x=this.StartPoint.x+l.endpoint.h,c.y=this.StartPoint.y+l.endpoint.v,u.x=this.StartPoint.x+h.endpoint.h,u.y=this.StartPoint.y+h.endpoint.v,d.x=this.StartPoint.x+l.startpoint.h,d.y=this.StartPoint.y+l.startpoint.v,p.x=this.StartPoint.x+h.startpoint.h,p.y=this.StartPoint.y+h.startpoint.v),a||(t=OptConstant.HookPts.LL),t){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:if(i.x=c.x,i.y=c.y,e){const t=Utils2.Pt2Rect(c,d);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}break;default:if(i.x=u.x,i.y=u.y,e){const t=Utils2.Pt2Rect(u,p);e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height}}return LogUtil.Debug("S.Connector: HookToPoint output:",i),i}GetTargetPoints(t,e,i){LogUtil.Debug("S.Connector: GetTargetPoints input:",{unusedParam:t,hookFlags:e,excludedHookId:i});let n=[];if(null==this.arraylist)return LogUtil.Debug("S.Connector: GetTargetPoints output:",{points:n}),n;const s=this.arraylist.hook.length,a=Boolean(this.arraylist.styleflags&OptConstant.AStyles.FlowConn),o=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Linear),r=Boolean(this.arraylist.styleflags&OptConstant.AStyles.StartLeft),l=Boolean(this.arraylist.styleflags&OptConstant.AStyles.BothSides)||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),h=Boolean(this.arraylist.styleflags&OptConstant.AStyles.Radial)&&!l;let c=Boolean(this.arraylist.styleflags&OptConstant.AStyles.EndConn);const u=OptConstant.ConnectorDefines,d=OptConstant.HookPts;e&NvConstant.HookFlags.LcHookNoExtra&&(c=!1);const p=s-u.NSkip;if(p<=0&&!c)n.push(new Point$1(-3,0));else{for(let t=u.NSkip;t<s+1;t++)n.push(new Point$1(t-u.NSkip,0));if(c)if(0==(e&NvConstant.HookFlags.LcForceEnd)&&(this.arraylist.hook[u.ACl].index>=0||this.arraylist.hook[u.ACr].index>=0))c=!1;else if(this.hooks.length)switch(this.hooks[0].hookpt){case d.LL:case d.LT:n.push(new Point$1(-u.ACr,0));break;default:n.push(new Point$1(-u.ACl,0))}else n.push(new Point$1(-u.ACl,0));if(a&&o){for(let t=u.NSkip;t<s;t++)i&&this.arraylist.hook[t].id===i||(n.push(new Point$1(t-u.NSkip,u.Above)),n.push(new Point$1(t-u.NSkip,u.Below)));if(this.hooks.length)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:n.push(new Point$1(0,u.Parent));break;default:n.push(new Point$1(p,u.Parent))}}else if(a&&h)for(let t=u.NSkip;t<s;t++)i&&this.arraylist.hook[t].id===i||(r?n.push(new Point$1(t-u.NSkip,u.Above)):n.push(new Point$1(t-u.NSkip,u.Below)))}return LogUtil.Debug("S.Connector: GetTargetPoints output:",{points:n}),n}AllowMaintainLink(){return!1}ChangeHook(t,e,i){LogUtil.Debug("S.Connector: ChangeHook called with",{triggerEvent:t,isUserInitiated:e,additionalInfo:i});const n=OptConstant.AStyles;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),this.arraylist.styleflags,n.Linear,this.arraylist.styleflags,n.FlowConn,LogUtil.Debug("S.Connector: ChangeHook completed")}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("S.Connector: ChangeTarget called with",{connectorBlockId:t,targetHookId:e,unusedParam1:i,unusedParam2:n,newHookIndexInfo:s,shouldUpdate:a});let o=-1,r=-1;const l=this.arraylist.styleflags&OptConstant.AStyles.BothSides,h=this.arraylist.styleflags&OptConstant.AStyles.Linear;this.arraylist.styleflags,OptConstant.AStyles.FlowConn;const c=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1).flags&OptConstant.SessionFlags.NoTreeOverlap,u=OptConstant.ConnectorDefines.NSkip;if(null!=e){const i=this.arraylist.hook.length;for(let t=0;t<i;t++){if(this.arraylist.hook[t].id===e){o=t;break}}if(a)if(o>=0){const t=s.x+OptConstant.ConnectorDefines.NSkip;t!==o&&(r=this.arraylist.hook[o].textid,o<t?(l&&s.x++,this.PrAddHookedObject(e,s.x,r),this.PrRemoveHookedObject(e,o)):(this.PrRemoveHookedObject(e,o),this.PrAddHookedObject(e,s.x,r)))}else this.PrAddHookedObject(e,s.x,-1);else if(o>=0){let t=this.arraylist.hook[o];if(t.textid>=0&&(T3Gv.opt.DeleteBlock(t.textid),t.textid=-1),this.PrRemoveHookedObject(e,o),ObjectUtil$1.GetObjectPtr(e,!0),h&&o===u&&this.arraylist.hook.length>=u)if(this.arraylist.hook.length===u)for(let e=0;e<u;e++){let t=this.arraylist.hook[e];t.textid>=0&&(T3Gv.opt.DeleteBlock(t.textid),t.textid=-1)}else if(this.arraylist.hook[u].textid>=0)if(!this.hooks.length||this.hooks[0].hookpt!==OptConstant.HookPts.LL&&this.hooks[0].hookpt!==OptConstant.HookPts.LT){let t=this.arraylist.hook[u];T3Gv.opt.DeleteBlock(t.textid),t.textid=-1}else{let t=this.arraylist.hook[OptConstant.ConnectorDefines.ACl];t.textid>=0&&(T3Gv.opt.DeleteBlock(t.textid),t.textid=-1),t.textid=this.arraylist.hook[u].textid,this.arraylist.hook[u].textid=-1}this.arraylist.styleflags&OptConstant.AStyles.CoManager?this.CollapseCoManager(e):this.IsAsstConnector()&&this.CollapseAssistant()}if(OptCMUtil.SetLinkFlag(t,DSConstant.LinkFlags.Move),c)OptAhUtil.FindTreeTop(this,DSConstant.LinkFlags.Move,{topconnector:-1,topshape:-1,foundtree:!1});else{const e=ObjectUtil$1.GetObjectPtr(t,!0);e&&e.hooks.length&&OptCMUtil.SetLinkFlag(e.hooks[0].objid,DSConstant.LinkFlags.Move)}this.PrFormat(t),ObjectUtil$1.AddToDirtyList(t)}else this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0);LogUtil.Debug("S.Connector: ChangeTarget completed")}DeleteObject(){LogUtil.Debug("S.Connector: DeleteObject called with no input parameters");const t=OptConstant.AStyles;ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),Boolean(this.arraylist.styleflags&t.FlowConn);const e=this.arraylist.hook.length;for(let i=0;i<e;i++){const t=this.arraylist.hook[i];if(-1!==t.textid){const e=T3Gv.stdObj.GetObject(t.textid);e&&(LogUtil.Debug("S.Connector: Deleting text object with id",t.textid),e.Delete())}}LogUtil.Debug("S.Connector: DeleteObject completed with no output")}IsAsstConnector(){LogUtil.Debug("S.Connector: IsAsstConnector called");const t=OptConstant.AStyles,e=(this.arraylist.styleflags&t.Linear)>0,i=(this.arraylist.styleflags&t.PerpConn)>0,n=e&&i;return LogUtil.Debug("S.Connector: IsAsstConnector returning",n),n}AllowCurveOnConnector(t){LogUtil.Debug("S.Connector: AllowCurveOnConnector called with",t);const e=OptConstant.AStyles,i=0==(this.arraylist.styleflags&e.Linear),n=0==(this.arraylist.styleflags&e.BothSides),s=0==(this.arraylist.styleflags&e.Radial),a=0===this.arraylist.tilt,o=0===this.arraylist.angle,r=i&&n&&s&&a&&o;if(this.IsAsstConnector()&&this.arraylist.hook.length>OptConstant.ConnectorDefines.NSkip){let e=-1,i=-1,n=!1;if(this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].isasst?(e=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id,i=OptConstant.ConnectorDefines.NSkip+1,n=!1):this.arraylist.hook[this.arraylist.hook.length-1].isasst&&(e=this.arraylist.hook[this.arraylist.hook.length-1].id,i=this.arraylist.hook.length-1,n=!0),e>=0){const s=ObjectUtil$1.GetObjectPtr(e,!1);if(s&&s.arraylist&&s.arraylist.hook.length<=OptConstant.ConnectorDefines.NSkip)return t&&(t.index=i,t.left=n),LogUtil.Debug("S.Connector: AllowCurveOnConnector returning true"),!0}}return LogUtil.Debug("S.Connector: AllowCurveOnConnector returning",r),r}IsGenoConnector(){LogUtil.Debug("S.Connector: IsGenoConnector called");const t=OptConstant.AStyles,e=(this.arraylist.styleflags&t.Linear)>0,i=(this.arraylist.styleflags&t.GenoConn)>0,n=e&&i;return LogUtil.Debug("S.Connector: IsGenoConnector returning",n),n}IsCoManager(t){LogUtil.Debug("S.Connector: IsCoManager called with output:",t);const e=(this.arraylist.styleflags&OptConstant.AStyles.CoManager)>0,i=OptConstant.AStyles,n=this.arraylist.styleflags&i.StartLeft;return e&&t&&(this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat(this.BlockID),this.vertical?(t.y=(this.EndPoint.y+this.StartPoint.y)/2,t.x=n?this.StartPoint.x-this.arraylist.coprofile.v:this.StartPoint.x+this.arraylist.coprofile.vdist,t.ht=this.arraylist.ht):(t.x=(this.EndPoint.x+this.StartPoint.x)/2,t.y=n?this.StartPoint.y-this.arraylist.coprofile.v:this.StartPoint.y+this.arraylist.coprofile.vdist,t.ht=this.arraylist.ht)),LogUtil.Debug("S.Connector: IsCoManager returning",e),e}GetChildFrame(t){LogUtil.Debug("S.Connector: GetChildFrame called with hookIndex:",t);let e={x:0,y:0,width:150,height:75};const i=this.arraylist.hook.length;if((t+=OptConstant.ConnectorDefines.NSkip)>0&&t<i){const i=this.arraylist.hook[t].id;if(i>=0){const t=ObjectUtil$1.GetObjectPtr(i,!1);t&&(e=Utils1.DeepCopy(t.Frame))}}return LogUtil.Debug("S.Connector: GetChildFrame returning",e),e}GetPerimeterPoints(t,e,i,n,s,a){LogUtil.Debug("S.Connector: GetPerimeterPoints input:",{formatParam:t,inputPoints:e,unusedParamA:i,unusedParamR:n,unusedParamI:s,unusedParamN:a});let o,r,l,h,c,u,d,p,g,f,m,v,b,y,S,x,w,C,T,D,k,$=[];const O=this.arraylist.styleflags,P=O&OptConstant.AStyles.ReverseCol,L=OptConstant.ConnectorDefines;if(D=OptConstant.Common.FlowConnectorDisp,k=OptConstant.Common.FlowConnectorSlop,r=e.length,h=this.arraylist.hook.length,u=h-L.NSkip,u<0&&(u=0),b=O&OptConstant.AStyles.BothSides&&0==(O&OptConstant.AStyles.Stagger),y=O&OptConstant.AStyles.Linear,S=O&OptConstant.AStyles.StartLeft,x=O&OptConstant.AStyles.BothSides||0==(O&OptConstant.AStyles.PerpConn),w=O&OptConstant.AStyles.Radial&&!x,C=(O&OptConstant.AStyles.Stagger)>0,T=P?-1:1,1===r&&this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat(t),e[0].x<0){for(o=0;o<r;o++){if(-3===e[o].x)return x&&(S=P)&&(c=this.arraylist.hook[0]),this.vertical?$.push(new Point$1(c.startpoint.v+this.StartPoint.x,c.startpoint.h+this.StartPoint.y)):$.push(new Point$1(c.startpoint.h+this.StartPoint.x,c.startpoint.v+this.StartPoint.y)),LogUtil.Debug("S.Connector: GetPerimeterPoints output:",$),$;e[o].x===-L.ACl?c=this.arraylist.hook[L.ACl]:e[o].x===-L.ACr&&(c=this.arraylist.hook[L.ACr]),c&&(this.vertical?$.push(new Point$1(c.endpoint.v+this.StartPoint.x,c.endpoint.h+this.StartPoint.y)):$.push(new Point$1(c.endpoint.h+this.StartPoint.x,c.endpoint.v+this.StartPoint.y)),void 0!==e[o].id&&($[o].id=e[o].id))}return LogUtil.Debug("S.Connector: GetPerimeterPoints output:",$),$}if(1===r)$.push(new Point$1(0,0)),l=e[0].x+L.NSkip,l>=h&&(l=h-1),c=this.arraylist.hook[l],this.vertical?($[0].x=c.endpoint.v,$[0].y=T*c.endpoint.h):($[0].x=c.endpoint.h,$[0].y=T*c.endpoint.v),$[0].x+=this.StartPoint.x,$[0].y+=this.StartPoint.y;else for(d=this.GetPolyPoints(OptConstant.Common.MaxPolyPoints,!1,!1,!1,null),o=0;o<r;o++)if(e[o].y===L.Parent)0===e[o].x?(l=2*L.ACl,$.push(new Point$1(d[l+1].x,d[l+1].y))):(l=2*L.ACr,$.push(new Point$1(d[l+1].x,d[l+1].y)));else if(0===o||0===e[o].x){l=2*(e[o].x+L.NSkip);let t=this.StartPoint.y,i=this.StartPoint.x;if(u>1?(v=2*(e[o].x+1+L.NSkip),f=d[v].y,m=d[v].x):(f=this.EndPoint.y,m=this.EndPoint.x),this.vertical)switch(e[o].y){case L.Above:w?(p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x-p.width-this.arraylist.ht,d[l+1].y))):(g=d[l].x-k,$.push(new Point$1(g,(f+t)/2)));break;case L.Below:w?(p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x+p.width+this.arraylist.ht,d[l+1].y))):(g=d[l].x+k,$.push(new Point$1(g,(f+t)/2)));break;default:w?$.push(new Point$1(d[l+1].x,d[l+1].y-10)):$.push(new Point$1(d[l+1].x,d[l].y-10))}else switch(e[o].y){case L.Above:if(w)p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x,d[l+1].y-p.height-this.arraylist.ht));else{let t=d[l].y-D;$.push(new Point$1((m+i)/2,t))}break;case L.Below:if(w)p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[l+1].x,d[l+1].y+p.height+this.arraylist.ht));else{let t=d[l].y+D;$.push(new Point$1((m+i)/2,t))}break;default:w?$.push(new Point$1(d[l+1].x-10,d[l+1].y)):$.push(new Point$1(d[l].x-10,d[l+1].y))}b&&o+1<r&&(l=2*(e[++o].x+L.NSkip),l<d.length-1&&(this.vertical?$.push(new Point$1(d[l+1].x,d[l].y-10)):$.push(new Point$1(d[l].x-10,d[l+1].y))))}else if(e[o].x>0&&e[o].x<u)if(l=2*(e[o].x-1+L.NSkip),v=2*(e[o].x+L.NSkip),e[o].x<u-1?(f=d[2*(e[o].x+1+L.NSkip)].y,m=d[2*(e[o].x+1+L.NSkip)].x):(f=this.EndPoint.y,m=this.EndPoint.x),this.vertical)if(y)switch(e[o].y){case L.Above:g=d[v+1].x-k,$.push(new Point$1(g,(f+d[v+1].y)/2));break;case L.Below:g=d[v+1].x+k,$.push(new Point$1(g,(f+d[v+1].y)/2));break;default:g=d[v+1].x,$.push(new Point$1(g,(d[v].y+d[v+1].y)/2))}else if(w)switch(e[o].y){case L.Above:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x-p.width-this.arraylist.ht,d[v+1].y));break;case L.Below:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x+p.width+this.arraylist.ht,d[v+1].y));break;default:$.push(new Point$1(d[v+1].x,(d[v+1].y+d[l+1].y)/2))}else{let t=(d[v].y-d[l].y)/2*this.arraylist.angle;b?$.push(new Point$1(d[l-1].x+t,(d[v].y+d[l].y)/2)):(t=-t,$.push(new Point$1(d[v+1].x+t,(d[v].y+d[l].y)/2)))}else{if(y)switch(e[o].y){case L.Above:let t=d[l].y-D;$.push(new Point$1((m+this.StartPoint.x)/2,t));break;case L.Below:t=d[l].y+D,$.push(new Point$1((m+this.StartPoint.x)/2,t));break;default:t=d[l].y,$.push(new Point$1((d[v].x+d[v+1].x)/2,t))}else if(w)switch(e[o].y){case L.Above:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x,d[v+1].y-p.height-this.arraylist.ht));break;case L.Below:p=this.GetChildFrame(e[o].x),$.push(new Point$1(d[v+1].x,d[v+1].y+p.height+this.arraylist.ht));break;default:$.push(new Point$1((d[v+1].x+d[l+1].x)/2,d[v+1].y))}else $.push(new Point$1((d[v].x+d[l].x)/2,d[v+1].y));if(b){if(this.vertical){let t=(d[v].y-d[l].y)/2*this.arraylist.angle;$.push(new Point$1(d[v-1].x+t,(d[v].y+d[l].y)/2))}else $.push(new Point$1((d[v].x+d[l].x)/2,d[l+1].y));o++}}else if(o===u){if(l=2*(e[o-1].x+L.NSkip),this.vertical)if(b)$.push(new Point$1(d[l-1].x,d[l].y+10));else if(y)$.push(new Point$1(d[l+1].x,this.EndPoint.y+10));else if(w)$.push(new Point$1(d[l+1].x,d[l+1].y+10));else{let t=10*this.arraylist.angle;C&&!S?$.push(new Point$1(d[l].x-(d[l+1].x-d[l].x)+t,d[l].y+10)):$.push(new Point$1(d[l+1].x+t,d[l].y+10))}else b?$.push(new Point$1(d[l].x+10,d[l-1].y)):y?$.push(new Point$1(this.EndPoint.x+10,d[l].y)):w?$.push(new Point$1(d[l+1].x+10,d[l+1].y)):$.push(new Point$1(d[l].x+10,d[l+1].y));b&&o+1<r&&(l=2*(e[++o].x+L.SEDA_NSkip),l<d.length-1&&(this.vertical?$.push(new Point$1(d[l+1].x,d[l].y-10)):$.push(new Point$1(d[l].x-10,d[l+1].y))))}return LogUtil.Debug("S.Connector: GetPerimeterPoints output:",$),$}SetHookAlign(t,e){LogUtil.Debug("S.Connector: SetHookAlign called with",{currentHook:t,targetHook:e});const i=OptConstant.ConnectorDefines;if(this.arraylist.angle&&this.arraylist.hook.length&&e!==t){let t,e;this.arraylist.hook[i.ACl].id>=0?(this.arraylist.hook[i.ACr].id=this.arraylist.hook[i.ACl].id,this.arraylist.hook[i.ACl].id=-1,t=this.arraylist.hook[i.ACr].gap,this.arraylist.hook[i.ACr].gap=this.arraylist.hook[i.ACl].gap,this.arraylist.hook[i.ACl].gap=t,e=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[i.ACr].id,!0),e&&e.hooks.length&&(e.hooks[0].hookpt=OptConstant.HookPts.AKCT,e.hooks[0].connect.x=-i.ACr)):this.arraylist.hook[i.ACr].id>=0&&(this.arraylist.hook[i.ACl].id=this.arraylist.hook[i.ACr].id,this.arraylist.hook[i.ACr].id=-1,t=this.arraylist.hook[i.ACl].gap,this.arraylist.hook[i.ACr].gap=this.arraylist.hook[i.ACr].gap,this.arraylist.hook[i.ACr].gap=t,e=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[i.ACl].id,!0),e&&e.hooks.length&&(e.hooks[0].hookpt=OptConstant.HookPts.AKCB,e.hooks[0].connect.x=-i.ACl)),this.arraylist.angle=-this.arraylist.angle,this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0)}LogUtil.Debug("S.Connector: SetHookAlign completed")}GetHookPoints(){LogUtil.Debug("S.Connector: GetHookPoints called");const t=[],e=OptConstant.AStyles;if(null==this.arraylist)return LogUtil.Debug("S.Connector: GetHookPoints returning null"),null;const i=this.arraylist.hook.length,n=this.arraylist.styleflags&e.BothSides||0==(this.arraylist.styleflags&e.PerpConn),s=(this.arraylist.styleflags&e.Linear)>0;return i>1||s?(t.push(new Point$1(-1,0)),this.vertical?t[0].id=OptConstant.HookPts.LT:t[0].id=OptConstant.HookPts.LL,n&&(t.push(new Point$1(-2,0)),this.vertical?t[1].id=OptConstant.HookPts.LB:t[1].id=OptConstant.HookPts.LR)):(t.push(new Point$1(-1,0)),this.vertical?t[0].id=OptConstant.HookPts.LT:t[0].id=OptConstant.HookPts.LL),LogUtil.Debug("S.Connector: GetHookPoints returning",t),t}GetTextIDs(){LogUtil.Debug("S.Connector: GetTextIDs called");const t=[],e=this.arraylist.hook.length;for(let i=0;i<e;i++){const e=this.arraylist.hook[i];e.textid>=0&&t.push(e.textid)}return LogUtil.Debug("S.Connector: GetTextIDs returning",t),t}NoFlip(){LogUtil.Debug("S.Connector: NoFlip called");return LogUtil.Debug("S.Connector: NoFlip returning",true),true}NoRotate(){LogUtil.Debug("S.Connector: NoRotate called");return LogUtil.Debug("S.Connector: NoRotate returning",true),true}AllowTextEdit(){LogUtil.Debug("S.Connector: AllowTextEdit called");const t=this.flags&NvConstant.ObjFlags.Lock,e=this.TextFlags&NvConstant.TextFlags.AttachC,i=!t&&e;return LogUtil.Debug("S.Connector: AllowTextEdit returning",i),i}GetArrowheadFormat(){LogUtil.Debug("S.Connector: GetArrowheadFormat called");const t=new ArrowheadRecord;return t.StartArrowID=this.StartArrowID,t.EndArrowID=this.EndArrowID,t.StartArrowDisp=this.StartArrowDisp,t.EndArrowDisp=this.EndArrowDisp,t.ArrowSizeIndex=this.ArrowSizeIndex,LogUtil.Debug("S.Connector: GetArrowheadFormat returning",t),t}ChangeTextAttributes(t,e,i,n,s,a,o,r){if(LogUtil.Debug("S.Connector: ChangeTextAttributes called with",{fontName:t,fontAttributes:e,fontSize:i,fontFace:n,fontColor:s,opacity:a,svgElement:o,additionalParams:r}),(t||e||i||n||r)&&0!==this.GetTextIDs().length){let s,l=o||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);const h=this.arraylist.hook.length;e&&(void 0!==e.FontName&&(this.StyleRecord.Text.FontName=e.FontName),void 0!==e.FontId&&(this.StyleRecord.Text.FontId=e.FontId),void 0!==e.FontSize&&(this.StyleRecord.Text.FontSize=e.FontSize),void 0!==e.Face&&(this.StyleRecord.Text.Face=e.Face),void 0!==e.Color&&(this.StyleRecord.Text.Paint.Color=e.Color),void 0!==e.Opacity&&(this.StyleRecord.Text.Paint.Opacity=e.Opacity));for(let o=0;o<h;++o)s=this.arraylist.hook[o],s.textid>=0&&(this.DataID=s.textid,this.arraylist.lasttexthook=o,l&&(l.textElem=l.GetElementById(OptConstant.SVGElementClass.Text,o)),T3Gv.opt.ChangeObjectTextAttributes(this.BlockID,t,e,n,i,a,l,r));this.DataID=-1,this.lasttexthook=-1}LogUtil.Debug("S.Connector: ChangeTextAttributes completed")}CollapseCoManager(t){LogUtil.Debug("S.Connector: CollapseCoManager called with connectorId:",t);let e=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,i=[];if(ObjectUtil$1.GetObjectPtr(t,!0)&&e>=1){let e=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id,i=T3Gv.opt.FindChildArray(t,-1);if(i>=0){let t=ObjectUtil$1.GetObjectPtr(i,!0);t&&HookUtil.UpdateHook(i,0,e,t.hooks[0].hookpt,t.hooks[0].connect,null)}else i=T3Gv.opt.FindChildArray(e,-1),i>=0&&OptCMUtil.SetLinkFlag(e,DSConstant.LinkFlags.Move)}if(e<=1){let t=-1,n={x:0,y:0};if(this.hooks.length&&(t=this.hooks[0].objid,n.x=this.hooks[0].connect.x),t>=0){HookUtil.UpdateHook(this.BlockID,0,-1,this.hooks[0].hookpt,this.hooks[0].connect,null);let s=ObjectUtil$1.GetObjectPtr(t,!1);if(1===e){let e=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip].id,i=ObjectUtil$1.GetObjectPtr(e,!0);i&&s&&(i.hooks[0].hookpt=s.GetBestHook(e,i.hooks[0].hookpt,i.hooks[0].connect),HookUtil.UpdateHook(e,0,t,i.hooks[0].hookpt,n,null));let a=T3Gv.opt.FindChildArray(e,-1);if(a>=0){let t=ObjectUtil$1.GetObjectPtr(a,!0);t&&t.FixHook(!1,!0)}}i.push(this.BlockID),ObjectUtil$1.DeleteObjects(i,!1)}}LogUtil.Debug("S.Connector: CollapseCoManager completed")}CollapseAssistant(){LogUtil.Debug("S.Connector: CollapseAssistant called");let t=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip,e=[];if(1===t){let i=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip],n=ObjectUtil$1.GetObjectPtr(i.id,!0);if(n&&n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){let e=this.hooks.length?this.hooks[0].objid:-1;if(e>=0){n.FixHook(!1,!1);let s=ObjectUtil$1.GetObjectPtr(e,!0);s&&s.IsCoManager()&&(n.hooks[0].connect.y=-OptConstant.AStyles.CoManager),HookUtil.UpdateHook(i.id,0,e,n.hooks[0].hookpt,n.hooks[0].connect,null),HookUtil.UpdateHook(this.BlockID,0,-1,this.hooks[0].hookpt,this.hooks[0].connect,null),t=0,OptCMUtil.SetLinkFlag(e,DSConstant.LinkFlags.Move)}}t<1&&(e.push(this.BlockID),ObjectUtil$1.DeleteObjects(e,!1))}LogUtil.Debug("S.Connector: CollapseAssistant completed")}PrFormat(t){LogUtil.Debug("S.Connector: PrFormat input:",{connectorBlockId:t});let e,i,n,s,a,o,r,l,h,c={},u={},d={},p=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),g=[],f=!1,m={},v={lgap:0},b=0;if(this.arraylist.styleflags&OptConstant.AStyles.MatchSize&&this.MatchSize(!1,0),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!1),null==this.arraylist||0===(e=this.arraylist.hook.length))return void LogUtil.Debug("S.Connector: PrFormat early exit - no hooks");s=OptConstant.ConnectorDefines.NSkip;const y=this.arraylist.styleflags&OptConstant.AStyles.Linear,S=this.arraylist.styleflags&OptConstant.AStyles.BothSides||0==(this.arraylist.styleflags&OptConstant.AStyles.PerpConn),x=this.arraylist.styleflags&OptConstant.AStyles.BothSides,w=this.arraylist.styleflags&OptConstant.AStyles.Stagger,C=this.arraylist.styleflags&OptConstant.AStyles.StartLeft,T=this.arraylist.styleflags&OptConstant.AStyles.FlowConn,D=this.arraylist.styleflags&OptConstant.AStyles.CoManager,k=this.IsAsstConnector(),$=this.IsGenoConnector(),O=this.arraylist.styleflags&OptConstant.AStyles.Radial&&!S,P=0==(this.arraylist.styleflags&OptConstant.AStyles.Linear)&&this.arraylist.styleflags&OptConstant.AStyles.FlowConn;r=p.flags&OptConstant.SessionFlags.NoTreeOverlap,l=0==(p.flags&OptConstant.SessionFlags.NoStepFormatting),l&&(r=!0),T?(r=!1,l=!1):(this.objecttype,NvConstant.FNObjectTypes.CauseEffectMain,r=!0,l=!0),P&&(r=!0);const L=this.arraylist.ht,I=this.arraylist.wd;if(this.hooks.length&&(parentObject=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1))&&(f=parentObject.IsCoManager(m),parentObject.IsAsstConnector()&&(b=parentObject.arraylist.coprofile.vdist,e>=s&&(this.arraylist.hook[1].gap>0&&(this.arraylist.hook[1].gap=L),this.arraylist.hook[2].gap>0&&(this.arraylist.hook[2].gap=L)))),n=e-s,n<0&&(n=0),e>=s)for(i=1;i<s;i++)this.arraylist.hook[i].id>=0&&n++;let A=new CRect(0,0,0,0);d.h=this.arraylist.profile.h,d.hdist=this.arraylist.profile.hdist,d.v=this.arraylist.profile.v,d.vdist=this.arraylist.profile.vdist;let E=0;if(e&&this.hooks&&this.hooks.length)switch(S?this.hooks[0].hookpt:OptConstant.HookPts.LL){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:E=OptConstant.HookPts.LL,0===n?(a=this.arraylist.hook[0],c.h=a.startpoint.h,c.v=a.startpoint.v):(a=this.arraylist.hook[OptConstant.ConnectorDefines.ACl],c.h=a.endpoint.h,c.v=a.endpoint.v);break;default:E=OptConstant.HookPts.LR,0===n?(a=this.arraylist.hook[0],c.h=a.endpoint.h,c.v=a.endpoint.v):(a=this.arraylist.hook[OptConstant.ConnectorDefines.ACr],c.h=a.endpoint.h,c.v=a.endpoint.v)}else c.h=0,c.v=0;if(0===n||this.flags&NvConstant.ObjFlags.NotVisible){for(S?(this.arraylist.hook[0].startpoint.h=0,this.arraylist.hook[0].startpoint.v=0,this.arraylist.hook[0].endpoint.v=0,this.arraylist.hook[0].endpoint.h=I,E===OptConstant.HookPts.LR&&(this.arraylist.hook[0].endpoint.h=-I),this.vertical?(this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y+this.arraylist.hook[0].endpoint.h):(this.EndPoint.y=this.StartPoint.y,this.EndPoint.x=this.StartPoint.x+this.arraylist.hook[0].endpoint.h)):(this.arraylist.hook[0].startpoint.h=0,this.arraylist.hook[0].startpoint.v=0,this.arraylist.hook[0].endpoint.h=0,this.arraylist.hook[0].endpoint.v=L,E===OptConstant.HookPts.LR&&(this.arraylist.hook[0].endpoint.v=-L),this.vertical?(this.EndPoint.y=this.StartPoint.y,this.EndPoint.x=this.StartPoint.x+this.arraylist.hook[0].endpoint.v):(this.EndPoint.x=this.StartPoint.x,this.EndPoint.y=this.StartPoint.y+this.arraylist.hook[0].endpoint.v)),i=1;i<e;i++)this.arraylist.hook[i].startpoint.h=0,this.arraylist.hook[i].startpoint.v=0,this.arraylist.hook[i].endpoint.h=this.arraylist.hook[0].endpoint.h,this.arraylist.hook[i].endpoint.v=this.arraylist.hook[0].endpoint.h;return 0===n&&(this.arraylist.profile.h=0,this.arraylist.profile.v=0,this.arraylist.profile.hdist=0,this.arraylist.profile.vdist=0,this.arraylist.steps.length=0),this.CalcFrame(),void LogUtil.Debug("S.Connector: PrFormat exit for empty connector:",this.arraylist)}let G=0,U=0,F=0,M=0,_=x?1:0,N=C;for(i=s;i<e;i++){a=this.arraylist.hook[i],a.pr.h=0,a.pr.v=0,a.pr.hdist=0,a.pr.vdist=0,a.steps.splice(0),a.comanagerht=0,a.isasst=!1;let t=ObjectUtil$1.GetObjectPtr(a.id,!1);if(t){o=t.GetArrayRect(this.vertical);let e=o.h+o.hdist/2;if(a.pr.h=e,a.pr.hdist=0,y?(a.pr.v=o.vdist/2,a.pr.vdist=o.vdist/2):(a.pr.v=0,a.pr.vdist=o.vdist),a.gap=o.hdist/2,a.ogap=o.hdist/2,a.steps.push(new StepRect(-o.hdist/2,0,o.hdist/2,o.vdist)),a.comanagerht=0,t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&(t.arraylist.styleflags&OptConstant.AStyles.CoManager&&(a.comanagerht=t.arraylist.ht),this.IsAsstConnector()&&(a.isasst=!0)),w&&(i-s)%2==0&&U<o.vdist&&(U=o.vdist),r){let t=this.GetElementProfile(a.id,N,l,null,P,!1);t&&(a.pr.h=t.frame.h,a.pr.v=t.frame.v,a.pr.hdist=t.frame.hdist,a.pr.vdist=t.frame.vdist,a.gap=a.pr.h,a.ogap=a.pr.hdist,o=a.pr,a.steps=t.steps),P&&(a.pr.v=0,a.pr.vdist=0)}G<o.vdist&&(G=o.vdist),x?(N=!N,(i-s)%2==0?C?F<o.vdist&&(F=o.vdist):F<o.v&&(F=o.v):C?M<o.v&&(M=o.v):M<o.vdist&&(M=o.vdist)):C?F<o.vdist&&(F=o.vdist):F<o.v&&(F=o.v)}else a.gap=0,a.ogap=0,o=new Rectangle(0,0,0,0)}U+=L<8?8:L,this.objecttype===NvConstant.FNObjectTypes.CauseEffectMain&&(F=0,M=0);let R=0;if(y)g=this.FormatLinear(p,t,l,A,g,k,v),R=A.x;else for(i=s;i<e;i++){a=this.arraylist.hook[i];let t,n=a.gap,o=l?0:a.ogap,r=a.extra;if(x&&i+1<e?(t=this.arraylist.hook[i+1],t.gap>n&&(n=t.gap),t.extra>r&&(r=t.extra),t.ogap>o&&(o=t.ogap)):t=null,i>s)if(l){if(w&&!x&&(i-s)%2==1){let t=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,U);this._InsertStepIntoProfile(a.steps,t)}if(R=this.CompareSteps(g,a.steps)+I+r,t){let e=this.CompareSteps(g,t.steps)+I+r;e>R&&(R=e)}}else R+=r,R+=n;a.startpoint.h=R,a.startpoint.v=0,a.endpoint.h=R,a.endpoint.v=L+F-a.comanagerht,a.endpoint.v<0&&(a.endpoint.v=0),t&&(t.startpoint.h=R,t.startpoint.v=0,t.endpoint.h=R,t.endpoint.v=-(L+M)),w&&(x?t&&(o<0&&(o=0),R+=o+I/2,o=0,t.startpoint.h=R,t.endpoint.h=R):(i-s)%2==1&&(a.endpoint.v+=U)),C&&(a.endpoint.v=-a.endpoint.v,t&&(t.endpoint.v=-t.endpoint.v)),this.UpdateCurrentProfile(A,a,h),t&&this.UpdateCurrentProfile(A,t,h),l&&(g=i===s?Utils1.DeepCopy(a.steps):this.AddStepsToProfile(g,a.steps,!1,!1,a.startpoint.h,0),t&&(g=this.AddStepsToProfile(g,t.steps,!1,!1,t.startpoint.h,0))),(i+=_)<e-1&&(l||(R+=w&&x?o+I/2:o+I))}let j=this.arraylist.hook[OptConstant.ConnectorDefines.ABk];j.startpoint.h=0,j.startpoint.v=0,j.endpoint.h=y?0:R,j.endpoint.v=0;let B,H=this.arraylist.hook[OptConstant.ConnectorDefines.ACl],z=this.arraylist.hook[OptConstant.ConnectorDefines.ACr];if(H.id>=0&&(hookedObject=ObjectUtil$1.GetObjectPtr(H.id,!1))){o=hookedObject.GetArrayRect(this.vertical);let t=o.h+o.hdist/2;H.pr.h=t,H.pr.hdist=0,H.pr.v=0,H.pr.vdist=o.vdist,this.UpdateCurrentProfile(A,H,h)}if(z.id>=0&&(hookedObject=ObjectUtil$1.GetObjectPtr(z.id,!1))){o=hookedObject.GetArrayRect(this.vertical);let t=o.h+o.hdist/2;z.pr.h=t,z.pr.hdist=0,z.pr.v=0,z.pr.vdist=o.vdist,this.UpdateCurrentProfile(A,z,h)}if(0===E&&(H.gap=0),D&&(H.gap=0),B=f?m.ht>this.arraylist.ht/2?m.ht:this.arraylist.ht/2:0,S){let t,i;if(e>s){let n=this.arraylist.hook[s];x&&!w&&e>s+1&&this.arraylist.hook[s+1].gap>this.arraylist.hook[s].gap&&(n=this.arraylist.hook[s+1]);let a=this.arraylist.hook[e-1];x&&!w&&e>s+1&&this.arraylist.hook[e-2].gap>this.arraylist.hook[e-1].gap&&(a=this.arraylist.hook[e-2]),t=n.gap,i=a.gap}else t=0,i=0;let n=this.GetTilt();if(y&&(t=0,i=0,0===E&&(z.gap=0)),this.hooks.length)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:z.gap=0,i=0,t-=B-b,y&&T&&0==(this.arraylist.flags&OptConstant.ArrayFlags.LeaveACl)&&0===H.gap&&(H.gap=I);break;case OptConstant.HookPts.LB:case OptConstant.HookPts.LR:H.gap=0,t=0,i-=B-b,y&&T&&0==(this.arraylist.flags&OptConstant.ArrayFlags.LeaveACr)&&0===z.gap&&(z.gap=I)}if(H.id>=0&&(0===H.gap&&(H.gap=w?I/2:I,this.arraylist.hook[s]&&(H.gap+=this.arraylist.hook[s].gap)),this.arraylist.matchsizelen)){let t=H.gap;H.gap=this.arraylist.matchsizelen-R,H.gap<t&&(H.gap=t)}if(z.id>=0&&(z.gap=w?I/2:I,this.arraylist.hook[e-1]&&(z.gap+=this.arraylist.hook[e-1].gap),this.arraylist.matchsizelen)){let t=z.gap;z.gap=this.arraylist.matchsizelen-R,z.gap<t&&(z.gap=t)}H.startpoint.h=0,H.startpoint.v=0,this.arraylist.angle?H.endpoint.h=-H.gap:(H.endpoint.h=-H.gap-t,0===p.moreflags&&T&&y&&(H.endpoint.h-=H.extra)),E===OptConstant.HookPts.LL&&(H.endpoint.h+=n),H.endpoint.v=0,z.startpoint.h=R+v.lgap,z.startpoint.v=0,n||this.arraylist.angle?z.endpoint.h=R+z.gap:(z.endpoint.h=R+z.gap+i,0===p.moreflags&&T&&y&&(z.endpoint.h+=z.extra)),z.endpoint.v=0}else{let t;if(null!=A.firstconnector_x?(t=A.firstconnector_x?2*(A.firstconnector_x+I):0,H.gap=-A.v+L+H.extra):t=R,H.startpoint.h=t/2,H.startpoint.v=0,H.endpoint.h=t/2,H.endpoint.v=C?H.gap-B+b:-H.gap+B-b,z.startpoint.h=t/2,z.startpoint.v=0,z.endpoint.h=t/2,z.endpoint.v=0,O){for(j.startpoint.h=t/2,j.endpoint.h=t/2,i=s;i<e;i++)this.arraylist.hook[i].startpoint.h=t/2;H.endpoint.v=0}}if(this.arraylist.angle?this.AdjustAngleConnector():this.arraylist.tilt&&this.AdjustTiltConnector(),this.vertical?(this.EndPoint.x=this.StartPoint.x+j.endpoint.v,this.EndPoint.y=this.StartPoint.y+R):(this.EndPoint.y=this.StartPoint.y,this.EndPoint.x=this.StartPoint.x+R),this.CalcFrame(),this.hooks&&this.hooks.length){if(S)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LL:case OptConstant.HookPts.LT:a=this.arraylist.hook[OptConstant.ConnectorDefines.ACl];break;default:a=this.arraylist.hook[OptConstant.ConnectorDefines.ACr]}else a=this.arraylist.hook[OptConstant.ConnectorDefines.ACl];u.h=a.endpoint.h,u.v=a.endpoint.v,null==c.h||Utils2.IsEqual(c.h,u.h)&&Utils2.IsEqual(c.v,u.v)||OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move)}else u.h=0,u.v=0;if(this.arraylist.coprofile=Utils1.DeepCopy(A),this.arraylist.profile.h=u.h-A.h,this.arraylist.profile.hdist=A.hdist-u.h,this.arraylist.profile.v=u.v-A.v,this.arraylist.profile.vdist=A.vdist-u.v,D&&(C?this.arraylist.profile.v+=L:this.arraylist.profile.vdist+=L,this.arraylist.coprofile=Utils1.DeepCopy(this.arraylist.profile),l&&g.length&&(g[0].vend+=2*L,g[0].v-=2*L),g=this.AddCoManagerChildren(C,l,g)),(k||$)&&(g=this.AddAssistantChildren(C,l,g)),l){if(S){g=this.BuildSideConnectorSteps();for(let e=0,i=g.length;e<i;e++)x||(C?g[e].hend=u.v:g[e].h=u.v);let t=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,-u.h);this._InsertStepIntoProfile(g,t),g.length>1&&(g[0].vend=g[1].v)}else{for(let t=0,e=g.length;t<e;t++)g[t].h-=u.h,g[t].hend-=u.h;if(k){let t=C?a.endpoint.v:-a.endpoint.v,e=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,t);this._InsertStepIntoProfile(g,e)}else if(!D){let t=new StepRect(-u.h,0,j.endpoint.h-u.h,L);this._InsertStepIntoProfile(g,t);let e=C?a.endpoint.v:-a.endpoint.v;t=new StepRect(-this.StyleRecord.Line.Thickness,0,this.StyleRecord.Line.Thickness,e),this._InsertStepIntoProfile(g,t)}}this.arraylist.steps=g}ObjectUtil$1.AddToDirtyList(t),Utils2.IsEqual(this.arraylist.profile.h,d.h)&&Utils2.IsEqual(this.arraylist.profile.v,d.v)&&Utils2.IsEqual(this.arraylist.profile.hdist,d.hdist)&&Utils2.IsEqual(this.arraylist.profile.vdist,d.vdist)||!r||(OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),OptAhUtil.FindTreeTop(this,DSConstant.LinkFlags.Move,{topconnector:-1,topshape:-1,foundtree:!1})),LogUtil.Debug("S.Connector: PrFormat output:",{horizontalPosition:R,stepsCount:g.length,profile:this.arraylist.profile})}GetAngleDisp(t){LogUtil.Debug("S.Connector: GetAngleDisp called with hook:",t);const e={start:0,end:0};return this.arraylist.angle&&(e.start=-t.startpoint.h*this.arraylist.angle,e.end=-t.endpoint.h*this.arraylist.angle),LogUtil.Debug("S.Connector: GetAngleDisp returning angleDisplacement:",e),e}AdjustAngleConnector(){LogUtil.Debug("S.Connector: AdjustAngleConnector called");const t=OptConstant.ConnectorDefines,e=t.NSkip,i=this.arraylist.hook.length;if(i<e)return;let n,s;n=this.arraylist.hook[t.ABk],s=this.GetAngleDisp(n),n.startpoint.v+=s.start,n.endpoint.v-=s.end,n=this.arraylist.hook[t.ACl],s=this.GetAngleDisp(n),n.startpoint.v+=s.start,n.endpoint.v-=s.end,n=this.arraylist.hook[t.ACr],s=this.GetAngleDisp(n),n.startpoint.v-=s.start,n.endpoint.v-=s.end;for(let a=e;a<i;a++)n=this.arraylist.hook[a],s=this.GetAngleDisp(n),n.startpoint.v-=s.end,n.endpoint.v-=s.end;LogUtil.Debug("S.Connector: AdjustAngleConnector completed")}GetTilt(t){LogUtil.Debug("S.Connector: GetTilt called with height:",t);let e=0;if(this.arraylist.tilt){const i=this.arraylist.tilt/180*Math.PI,n=Math.tan(i);if(n){const i=1/n;e=void 0!==t?t*i:this.arraylist.ht/i}}return LogUtil.Debug("S.Connector: GetTilt returning tiltValue:",e),e}AdjustTiltConnector(){LogUtil.Debug("S.Connector: AdjustTiltConnector called");const t=OptConstant.ConnectorDefines.NSkip,e=this.GetTilt();if(e){const i=this.arraylist.hook.length;if(i<t)return;for(let n=t;n<i;n++)this.arraylist.hook[n].endpoint.h-=e}LogUtil.Debug("S.Connector: AdjustTiltConnector completed")}FormatLinear(t,e,i,n,s,a,o){LogUtil.Debug("S.Connector: FormatLinear called with input:",{session:t,useSteps:i,resultFrame:n,stepsBuffer:s,skipAdjustment:a,output:o});const r=OptConstant.ConnectorDefines.NSkip;let l=this.arraylist.hook.length,h=0,c=0,u=this.arraylist.wd,d=0,p=0,g=!1,f=!1,m=!1,v=0;if(l>=r&&this.hooks.length&&!a&&(()=>{const t=this.hooks[0].hookpt===OptConstant.HookPts.LL||this.hooks[0].hookpt===OptConstant.HookPts.LT;return f=this.arraylist.hook[1].gap>1&&t,m=this.arraylist.hook[2].gap>1&&!t,false})()){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);if(t){const e=0-t.GetArrayRect(this.vertical).hdist;if(f){const t=this.arraylist.hook[r].gap;v=(0-this.arraylist.hook[r].ogap-t)/2,this.arraylist.hook[1].gap=u+e/2+v+this.arraylist.hook[1].extra,this.arraylist.hook[1].gap<u/2&&(this.arraylist.hook[1].gap=u/2)}if(m){const t=this.arraylist.hook[l-1].gap;v=(0-this.arraylist.hook[l-1].ogap-t)/2,this.arraylist.hook[2].gap=u+e/2+v+this.arraylist.hook[2].extra,this.arraylist.hook[2].gap<u/2&&(this.arraylist.hook[2].gap=u/2)}}}for(let b=r;b<l;b++){v=0;const t=this.arraylist.hook[b];t.isasst&&!g&&(n.firstconnector_x=h,g=!0);const e=t.gap,a=i?0:t.ogap;l===r+1&&(t.extra=0),c+=t.extra;const o=this.GetLeftAdjustment(t.id);t.startpoint.h=h+d,t.startpoint.v=0,t.endpoint.h=c,(b>r||f)&&(t.endpoint.h+=o),t.endpoint.v=0,d=this.GetRightAdjustment(t.id),this.UpdateCurrentProfile(n,t,!1),i?(s=b===r?Utils1.DeepCopy(t.steps):this.AddStepsToProfile(s,t.steps,!1,!1,t.endpoint.h,0),t.steps.length&&(t.steps[0].v<p&&(p=t.steps[0].v),t.steps[0].vend>0&&t.steps[0].vend),h=this.CompareSteps(s,t.steps),c=h-o+u):(h=c,h+=e+a,c=h-o+u)}return i&&a&&s.length&&(s[0].v>p&&(s[0].v=p),s[0].vend<0&&(s[0].vend=0)),m?o.lgap=d:h+=d,n.x=h,LogUtil.Debug("S.Connector: FormatLinear output:",{resultFrame:n,stepsBuffer:s}),s}AddCoManagerChildren(t,e,i){LogUtil.Debug("S.Connector: AddCoManagerChildren input:",{useStartPointFlag:t,copySteps:e,currentSteps:i});const n=OptConstant.ConnectorDefines.NSkip;if(this.arraylist.hook.length>=n){const s=this.arraylist.hook[n],a=i.length;this.arraylist.steps.length=0;for(let t=0;t<a;t++)this.arraylist.steps.push(new StepRect(i[t].h,i[t].v,i[t].hend,i[t].vend));const o=this.GetElementProfile(s.id,t,e,this,!1,!1);o&&(i=o.steps,this.arraylist.profile=o.frame)}return LogUtil.Debug("S.Connector: AddCoManagerChildren output:",i),i}AddAssistantChildren(t,e,i){LogUtil.Debug("S.Connector: AddAssistantChildren input:",{useStartPointFlag:t,copySteps:e,currentSteps:i});let n=this.arraylist.hook.length;let s=-1,a=0,o=!1;for(let r=OptConstant.ConnectorDefines.NSkip;r<n;r++){const t=this.arraylist.hook[r],e=ObjectUtil$1.GetObjectPtr(t.id,!1);if(e&&e.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){s=r,a=t.endpoint.h,o=Boolean(e.arraylist.styleflags&OptConstant.AStyles.ReverseCol);break}}if(s>=0){const n=this.arraylist.hook[s],r=i.length;this.arraylist.steps.length=0;for(let t=0;t<r;t++)this.arraylist.steps.push(new StepRect(i[t].h,i[t].v,i[t].hend,i[t].vend));const l=this.GetElementProfile(n.id,t,e,this,!1,!0);if(l){if(o){const t=l.frame.v;l.frame.v=l.frame.vdist,l.frame.vdist=t}if(l.frame.h>this.arraylist.profile.h&&(this.arraylist.profile.h=l.frame.h),l.frame.hdist>this.arraylist.profile.hdist&&(this.arraylist.profile.hdist=l.frame.hdist),l.frame.v>this.arraylist.profile.v&&(this.arraylist.profile.v=l.frame.v),l.frame.vdist>this.arraylist.profile.vdist&&(this.arraylist.profile.vdist=l.frame.vdist),e){const t=l.steps.length,e=i[0].vend;for(let n=0;n<t;n++)i.push(new StepRect(l.steps[n].h+a,l.steps[n].v+e,l.steps[n].hend+a,l.steps[n].vend+e))}}const h=i.length;for(let t=0;t<h;t++)i[t].h>0&&(i[t].h=0)}return LogUtil.Debug("S.Connector: AddAssistantChildren output:",i),i}CompareSteps(t,e){LogUtil.Debug("S.Connector: CompareSteps called with",{existingSteps:JSON.stringify(t),newSteps:JSON.stringify(e)});let i=0;const n=t.length,s=e.length;let a=0;for(let o=0;o<s;o++)(void 0===a||e[o].vend>a)&&(a=e[o].vend);if(s>0){for(let o=0;o<n&&!(t[o].v>a);o++)for(let n=0;n<s;n++)if(e[n].vend>t[o].v&&e[n].v<t[o].vend){const s=t[o].hend-e[n].h;s>i&&(i=s)}else if(e[n].v>t[o].vend)break}else for(let o=0;o<n;o++)t[o].hend>i&&(i=t[o].hend);return LogUtil.Debug("S.Connector: CompareSteps returning output:",i),i}AddStepsToProfile(t,e,i,n,s,a){LogUtil.Debug("S.Connector: AddStepsToProfile called with",{existingSteps:JSON.stringify(t),newSteps:JSON.stringify(e),transform:i,invert:n,offset:s,newOffset:a});let o=t.length,r=e.length,l=[],h=0,c=[];const u=OptConstant.Common.MaxSteps;if(o&&0===r&&s){for(let e=0;e<o;e++)l.push(new StepRect(t[e].h,t[e].v,s,t[e].vend));return LogUtil.Debug("S.Connector: AddStepsToProfile output",JSON.stringify(l)),l}if(i){for(let t=0;t<r;t++)n?c.push(new StepRect(-e[t].vend,e[t].h+s,e[t].v,e[t].hend+s)):c.push(new StepRect(e[t].v,e[t].h+s,e[t].vend,e[t].hend+s));s=a}else c=e;for(let g=0;g<o;g++){h<u?(h>0&&(l[h-1].vend=t[g].v),l.push(new StepRect(t[g].h,t[g].v,t[g].hend,t[g].vend)),h++):(t[g].vend>l[h-1].vend&&(l[h-1].vend=t[g].vend),l[h-1].h<t[g].h&&(l[h-1].h=t[g].h),l[h-1].hend<t[g].hend&&(l[h-1].hend=t[g].hend));for(let e=0;e<r;e++)if(c[e].vend>t[g].v&&c[e].v<=t[g].vend)if(c[e].v<=l[h-1].v?(l[h-1].hend<c[e].hend+s&&(l[h-1].hend=c[e].hend+s),l[h-1].h>c[e].h+s&&(l[h-1].h=c[e].h+s)):h<u?(l[h-1].vend=c[e].v,l.push(new StepRect(t[g].h,t[g].v,t[g].hend,t[g].vend)),l[h].v=l[h-1].vend,l[h].hend=c[e].hend+s,l[h].h>c[e].h+s&&(l[h].h=c[e].h+s),h++):(c[e].vend>l[h-1].vend&&(l[h-1].vend=c[e].vend),l[h-1].hend<c[e].hend+s&&(l[h-1].hend=c[e].hend+s),l[h-1].h<c[e].h+s&&(l[h-1].h=c[e].h+s)),c[e].vend<t[g].vend)h<u?(l[h-1].vend=c[e].vend,l.push(new StepRect(t[g].h,t[g].v,t[g].hend,t[g].vend)),c[e].v<l[h].v&&(l[h].v=l[h-1].vend),h++):c[e].vend>l[h-1].vend&&(l[h-1].vend=c[e].vend);else if(c[e].v>t[g].vend)break}let d;h?d=l[h-1].vend:(d=0,r&&(d=c[0].v));for(let g=0;g<r;g++)c[g].vend>d&&(h<u?(l.push(new StepRect(c[g].h,c[g].v,c[g].hend,c[g].vend)),c[g].v<d&&h>0&&(l[h].v=d),h++):(c[g].vend>l[h-1].vend&&(l[h-1].vend=c[g].vend),l[h-1].hend<c[g].hend+s&&(l[h-1].hend=c[g].hend+s),l[h-1].h<c[g].h+s&&(l[h-1].h=c[g].h+s)));let p=1;for(let g=1;g<h;g++)l[p-1].h===l[g].h&&l[p-1].hend===l[g].hend?l[p-1].vend=l[g].vend:(p<g&&(l[p]=Utils1.DeepCopy(l[g])),p++);return l.length=l.length>=p?p:l.length,LogUtil.Debug("S.Connector: AddStepsToProfile output",JSON.stringify(l)),l}BuildSideConnectorSteps(){LogUtil.Debug("S.Connector: BuildSideConnectorSteps called, total hooks =",this.arraylist.hook.length);let t=[];const e=OptConstant.AStyles,i=Boolean(this.arraylist.styleflags&e.StartLeft),n=Boolean(this.arraylist.styleflags&e.BothSides);this.arraylist.styleflags,e.ReverseCol;const s=this.arraylist.hook.length,a=OptConstant.ConnectorDefines.NSkip;let o=i;if(s>a){const e=this.arraylist.hook[a],r=e.steps.length;for(let n=0;n<r;n++)i?t.push(new StepRect(-e.steps[n].vend+e.endpoint.v,1*e.steps[n].h,e.steps[n].v+e.endpoint.v,1*e.steps[n].hend)):t.push(new StepRect(e.steps[n].v+e.endpoint.v,1*e.steps[n].h,e.steps[n].vend+e.endpoint.v,1*e.steps[n].hend));for(let i=a+1;i<s;i++){n&&(o=!o);const e=this.arraylist.hook[i],s=e.endpoint.v;t=this.AddStepsToProfile(t,e.steps,!0,o,1*e.startpoint.h,s)}}return LogUtil.Debug("S.Connector: BuildSideConnectorSteps completed with output:",JSON.stringify(t)),t}InsertStepIntoProfile(t,e){LogUtil.Debug("S.Connector: InsertStepIntoProfile called with",{profileSteps:JSON.stringify(t),newStep:JSON.stringify(e)}),t.unshift(e);const i=e.vend-e.v;for(let n=1;n<t.length;n++)t[n].v+=i,t[n].vend+=i;LogUtil.Debug("S.Connector: InsertStepIntoProfile completed with output",JSON.stringify(t))}UpdateCurrentProfile(t,e,i){let n,s;LogUtil.Debug("S.Connector: UpdateCurrentProfile called with",{profile:JSON.stringify(t),hook:JSON.stringify(e),flag:i}),n=e.endpoint.h-e.pr.h,n<t.h&&(t.h=n),s=e.endpoint.h+e.pr.hdist,s>t.hdist&&(t.hdist=s),n=e.endpoint.v-e.pr.v,n<t.v&&(t.v=n),s=e.endpoint.v+e.pr.vdist,s>t.vdist&&(t.vdist=s),LogUtil.Debug("S.Connector: UpdateCurrentProfile completed with output",JSON.stringify(t))}GetFullShapeProfile(t,e,i,n,s){LogUtil.Debug("S.Connector: GetFullShapeProfile called with",{targetObjectId:t,offsetX:e,offsetY:i,resultRect:n,updateUnion:s});let a=ObjectUtil$1.GetObjectPtr(t,!1);const o=OptConstant.ConnectorDefines.NSkip;let r,l={lindex:-1,id:-1,hookpt:0},h={x:0,y:0,width:0,height:0},c=[];if(a)for(Utils2.CopyRect(h,a.Frame),h.x+=e,h.y+=i,s?Utils2.CopyRect(n,h):Utils2.UnionRect(n,h,n);T3Gv.opt.FindChildArrayByIndex(t,l)>0;){let t=ObjectUtil$1.GetObjectPtr(l.id,!1);if(!t)break;let s=t.HookToPoint(t.hooks[0].hookpt,null);c=[],c.push(new Point$1(t.hooks[0].connect.x,t.hooks[0].connect.y)),r=a.GetPerimPts(a.BlockID,c,t.hooks[0].hookpt,!0,null,-1),r&&s&&(e+=r[0].x-s.x,i+=r[0].y-s.y),Utils2.CopyRect(h,t.Frame),h.x+=e,h.y+=i,Utils2.UnionRect(n,h,n);let u=t.arraylist.hook.length;for(let a=o;a<u;a++){let s=t.arraylist.hook[a],o=ObjectUtil$1.GetObjectPtr(s.id,!1);if(o){let a=o.HookToPoint(o.hooks[0].hookpt,null);if(c=[],c.push(new Point$1(o.hooks[0].connect.x,o.hooks[0].connect.y)),r=t.GetPerimPts(t.BlockID,c,o.hooks[0].hookpt,!0,null,-1),r&&a){let o=e+r[0].x-a.x,l=i+r[0].y-a.y;t.GetFullShapeProfile(s.id,o,l,n,!1)}}}}LogUtil.Debug("S.Connector: GetFullShapeProfile completed with resultRect:",n)}GetRightAdjustment(t){LogUtil.Debug("S.Connector: GetRightAdjustment called with hookedObjectId:",t);const e=OptConstant.HookPts,i=ObjectUtil$1.GetObjectPtr(t,!1);if(null==i)return LogUtil.Debug("S.Connector: GetRightAdjustment returning output: 0 (hookedObject is null)"),0;if(0===i.hooks.length)return LogUtil.Debug("S.Connector: GetRightAdjustment returning output: 0 (hookedObject has no hooks)"),0;let n,s,a=0;switch(i.hooks[0].hookpt){case e.AKCT:n=e.AKCB;break;case e.AKCB:n=e.AKCT;break;case e.AKCR:n=e.AKCL;break;case e.AKCL:n=e.AKCR}if(n&&(s=i.HookToPoint(n,null),s)){switch(n){case e.AKCT:a=s.y-i.Frame.y;break;case e.AKCB:a=s.y-i.Frame.y-i.Frame.height;break;case e.AKCR:a=s.x-i.Frame.x-i.Frame.width;break;case e.AKCL:a=s.x-i.Frame.x}Utils2.IsEqual(a,0)&&(a=0)}return LogUtil.Debug("S.Connector: GetRightAdjustment returning output:",a),a}GetLeftAdjustment(t){LogUtil.Debug("S.Connector: GetLeftAdjustment called with hookObjectId:",t);const e=OptConstant.HookPts,i=ObjectUtil$1.GetObjectPtr(t,!1);if(null==i)return LogUtil.Debug("S.Connector: GetLeftAdjustment returning 0 because hookedObject is null"),0;if(i.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Shape)return LogUtil.Debug("S.Connector: GetLeftAdjustment returning 0 because hookedObject is not of type SHAPE"),0;if(0===i.hooks.length)return LogUtil.Debug("S.Connector: GetLeftAdjustment returning 0 because hookedObject has no hooks"),0;let n,s=i.hooks[0].hookpt,a=0;if(s&&(n=i.HookToPoint(s,null),n)){switch(s){case e.AKCT:a=n.y-i.Frame.y;break;case e.AKCB:a=n.y-i.Frame.y-i.Frame.height;break;case e.AKCR:a=n.x-i.Frame.x-i.Frame.width;break;case e.AKCL:a=n.x-i.Frame.x}Utils2.IsEqual(a,0)&&(a=0)}return LogUtil.Debug("S.Connector: GetLeftAdjustment returning leftAdjustment:",a),a}GetElementProfile(e,i,n,s,a,o){let r,l,h,c,u,d;LogUtil.Debug("S.Connector: GetElementProfile called with",{targetObjectId:e,useStartPointFlag:i,copySteps:n,referenceConnector:s,useFullShapeProfile:a,ignoreGenoFlag:o});let p={},g={},f={h:0,v:0},m={},v={frame:{},nsteps:0,steps:[]};const b=OptConstant.AStyles,y=OptConstant.ConnectorDefines.NSkip,S=ObjectUtil$1.GetObjectPtr(e,!1);if(null==S)return null;let x=this.arraylist.styleflags&b.CoManager;s&&(x=!1);let w=this.arraylist.styleflags&b.Linear,C=this.IsAsstConnector(),T=this.IsGenoConnector();if(o&&(T=!1),C&&s&&(C=!1),S.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){if(C||T)return v.frame.h=0,v.frame.hdist=0,v.frame.v=0,v.frame.vdist=0,this.arraylist.hook[y].id!=e&&(v.frame.v=this.arraylist.hook[y].pr.v),v.steps.push(new StepRect(-v.frame.h,-v.frame.v,v.frame.hdist,v.frame.vdist)),LogUtil.Debug("S.Connector: GetElementProfile output",v),v;const t=S.arraylist.styleflags&b.BothSides||0==(S.arraylist.styleflags&b.PerpConn);if(S.vertical===this.vertical?(v.frame.h=S.arraylist.profile.h,v.frame.hdist=S.arraylist.profile.hdist,v.frame.v=S.arraylist.profile.v,v.frame.vdist=S.arraylist.profile.vdist):(v.frame.v=S.arraylist.profile.h,v.frame.vdist=S.arraylist.profile.hdist,S.arraylist.styleflags&b.CoManager&&this.arraylist.styleflags&b.ReverseCol?(v.frame.h=S.arraylist.profile.vdist,v.frame.hdist=S.arraylist.profile.v):(v.frame.h=S.arraylist.profile.v,v.frame.hdist=S.arraylist.profile.vdist)),n){const e=S.arraylist.steps.length;u=S.arraylist.steps;let i=S.vertical===this.vertical;if(t&&(i=!i),i)for(let t=0;t<e;t++)v.steps.push(new StepRect(u[t].h,u[t].v,u[t].hend,u[t].vend));else for(let t=0;t<e;t++)v.steps.push(new StepRect(u[t].v,u[t].h,u[t].vend,u[t].hend))}return LogUtil.Debug("S.Connector: GetElementProfile output",v),v}if(S.hooks.length&&S.hooks[0].objid===this.BlockID)if(s){v.frame.h=s.arraylist.profile.h,v.frame.v=s.arraylist.profile.v,v.frame.hdist=s.arraylist.profile.hdist,v.frame.vdist=s.arraylist.profile.vdist;const t=this.arraylist.steps.length;for(let e=0;e<t;e++)v.steps.push(new StepRect(this.arraylist.steps[e].h,this.arraylist.steps[e].v,this.arraylist.steps[e].hend,this.arraylist.steps[e].vend));n?(g.x=this.StartPoint.x,g.y=this.StartPoint.y):g=s.HookToPoint(S.hooks[0].hookpt,null),r=Utils2.Pt2CPoint(g,this.vertical),r.v+=this.arraylist.ht}else g=S.HookToPoint(S.hooks[0].hookpt,null),r=Utils2.Pt2CPoint(g,this.vertical),a?(this.GetFullShapeProfile(e,0,0,p,!0),l=Utils2.Rect2CRect(p,this.vertical)):l=S.GetArrayRect(this.vertical),v.frame.h=r.h-l.h,v.frame.hdist=l.h+l.hdist-r.h,v.frame.v=r.v-l.v,v.frame.vdist=l.v+l.vdist-r.v,n&&(i&&!w?v.steps.push(new StepRect(-v.frame.h,v.frame.vdist,v.frame.hdist,v.frame.v)):v.steps.push(new StepRect(-v.frame.h,-v.frame.v,v.frame.hdist,v.frame.vdist)));else g=S.HookToPoint(S.hooks[0].hookpt,null),r=Utils2.Pt2CPoint(g,this.vertical),a?(this.GetFullShapeProfile(e,0,0,p,!0),l=Utils2.Rect2CRect(p,this.vertical)):l=S.GetArrayRect(this.vertical),v.frame.h=r.h-l.h,v.frame.hdist=l.h+l.hdist-r.h,v.frame.v=r.v-l.v,v.frame.vdist=l.v+l.vdist-r.v,n&&(i&&!w?v.steps.push(new StepRect(-v.frame.h,v.frame.vdist,v.frame.hdist,v.frame.v)):v.steps.push(new StepRect(-v.frame.h,-v.frame.v,v.frame.hdist,v.frame.vdist)));if(d=T3Gv.opt.FindChildArray(e,-1),!w&&!x&&!C&&d>=0){const e=ObjectUtil$1.GetObjectPtr(d,!1);if(e&&e.hooks.length&&e.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip>0&&0==(e.flags&NvConstant.ObjFlags.NotVisible)){if(c=[],c.push(new Point$1(e.hooks[0].connect.x,e.hooks[0].connect.y)),h=e.GetPerimPts(e.BlockID,c,e.hooks[0].hookpt,!0,null,-1),h&&r){let t=Utils2.Pt2CPoint(h[0],this.vertical);f.h=r.h-t.h,f.v=r.v-t.v}const n=e.arraylist.steps.length;if(u=e.arraylist.steps,e.vertical===this.vertical?(e.arraylist.styleflags&b.ReverseCol&&(f.h=-f.h),m.h=e.arraylist.profile.h+f.h,m.hdist=e.arraylist.profile.hdist-f.h,m.v=e.arraylist.profile.v+f.v,m.vdist=e.arraylist.profile.vdist-f.v):(e.arraylist.styleflags&b.ReverseCol&&(f.v=-f.v),e.arraylist.styleflags&b.StartLeft&&!bothSides?(m.hdist=e.arraylist.profile.v+f.h,m.h=e.arraylist.profile.vdist-f.h):(m.h=e.arraylist.profile.v+f.h,m.hdist=e.arraylist.profile.vdist-f.h),e.arraylist.styleflags&b.ReverseCol?(m.vdist=e.arraylist.profile.h+f.v,m.v=e.arraylist.profile.hdist-f.v):(m.v=e.arraylist.profile.h+f.v,m.vdist=e.arraylist.profile.hdist-f.v)),m.h>v.frame.h&&(v.frame.h=m.h),m.v>v.frame.v&&(v.frame.v=m.v),m.hdist>v.frame.hdist&&(v.frame.hdist=m.hdist),m.vdist>v.frame.vdist&&(v.frame.vdist=m.vdist),n){if(e.vertical===this.vertical){let e=t?-f.v:f.v;for(let t=0;t<n;t++)v.steps.push(new StepRect(u[t].h-f.h,u[t].v-e,u[t].hend-f.h,u[t].vend-e))}else{let s=i&&e.arraylist.styleflags&b.StartLeft?-f.h:f.h;if(t)for(let t=0;t<n;t++)v.steps.push(new StepRect(u[t].v-s,-u[t].hend-f.v,u[t].vend-s,-u[t].h-f.v));else for(let t=0;t<n;t++)v.steps.push(new StepRect(u[t].v-s,u[t].h-f.v,u[t].vend-s,u[t].hend-f.v))}}}}else if(childObj){let e=t?-f.v:f.v,i=childObj.arraylist.styleflags&b.StartLeft?-f.h:f.h;if(t)for(let t=0;t<u.length;t++)v.steps.push(new StepRect(u[t].v-i,-u[t].hend-e,u[t].vend-i,-u[t].h-e));else for(let t=0;t<u.length;t++)v.steps.push(new StepRect(u[t].v-i,u[t].h-e,u[t].vend-i,u[t].hend-e))}return LogUtil.Debug("S.Connector: GetElementProfile output",v),v}PrAdjustHooks(t,e){LogUtil.Debug("S.Connector: PrAdjustHooks called with startIndex:",t,"offsetAdjustment:",e);const i=OptConstant.ConnectorDefines.NSkip,n=this.arraylist.hook.length;for(let s=t;s<n;s++){const t=this.arraylist.hook[s];if(t.id>=0){const e=ObjectUtil$1.GetObjectPtr(t.id,!0);if(e&&e.hooks.length){e.hooks[0].connect.x=s-i;const n=e.hooks[0].hookpt;e.hooks[0].hookpt=this.GetBestHook(t.id,n,e.hooks[0].connect),e.SetHookAlign(e.hooks[0].hookpt,n)}}}LogUtil.Debug("S.Connector: PrAdjustHooks completed")}PrAddHookedObject(t,e,i){let n,s;LogUtil.Debug("S.Connector: PrAddHookedObject called with objectId:",t,"hookPoint:",e,"textId:",i);let a=new SDHook,o=!1;const r=OptConstant.AStyles,l=this.arraylist.styleflags&r.BothSides||0==(this.arraylist.styleflags&r.PerpConn),h=this.arraylist.styleflags&r.Linear,c=this.arraylist.styleflags&r.Radial;if(null!=this.arraylist){this.arraylist.matchsizelen=0;let r=ObjectUtil$1.GetObjectPtr(t,!1);if(e===OptConstant.ConnectorDefines.StubHookPt)e=0,o=!0;else{if(-1===e||-2===e)return this.arraylist.hook[-e].id=t,void LogUtil.Debug("S.Connector: PrAddHookedObject early exit for negative hookPoint:",e);r.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector&&r.arraylist.angle&&(o=!0)}if(e>=0){if(this.vertical,n=this.arraylist.hook.length,n<OptConstant.ConnectorDefines.NSkip)for(let t=n;t<OptConstant.ConnectorDefines.NSkip;t++){let t=new SDHook;l?1!==this.arraylist.hook.length||h||c?t.gap=this.arraylist.wd:t.gap=OptConstant.Common.CITreeSpaceExtra+this.arraylist.wd:1!==this.arraylist.hook.length||h||c?t.gap=this.arraylist.ht:t.gap=OptConstant.Common.CITreeSpaceExtra+this.arraylist.ht,this.arraylist.hook.push(t)}if(s=e+OptConstant.ConnectorDefines.NSkip,0===e&&i>=0&&h&&(0===this.hooks.length||this.hooks[0].hookpt!==OptConstant.HookPts.LL&&this.hooks[0].hookpt!==OptConstant.HookPts.LT)){let t=T3Gv.stdObj.GetObject(i);t&&t.Delete(),i=-1}a.id=t,i&&(a.textid=i),n=this.arraylist.hook.length,n<s&&(s=n,o=!0),this.arraylist.hook.splice(s,0,a),n=this.arraylist.hook.length,o?this.PrAdjustHooks(s,0):(r=ObjectUtil$1.GetObjectPtr(t,!0),r&&r.SetHookAlign(r.hooks[0].hookpt,r.hooks[0].hookpt)),this.PrAdjustHooks(s+1,1)}}LogUtil.Debug("S.Connector: PrAddHookedObject completed with objectId:",t)}PrRemoveHookedObject(t,e){LogUtil.Debug("S.Connector: PrRemoveHookedObject called with objectId:",t,"hookIndex:",e);let i=0;if(null!=this.arraylist){this.arraylist.matchsizelen=0;let t=this.arraylist.hook.length;if(e>=OptConstant.ConnectorDefines.NSkip&&e<t&&(e<t-1&&e>OptConstant.ConnectorDefines.NSkip&&(i=this.arraylist.hook[e].extra),this.arraylist.hook.splice(e,1)),this.arraylist.hook.length===OptConstant.ConnectorDefines.NSkip+2){let t=this.arraylist.hook[OptConstant.ConnectorDefines.NSkip+1];(this.arraylist.styleflags&OptConstant.AStyles.PerpConn)>0&&(0===t.extra&&0===i||(this.arraylist.wd+=t.extra+i,this.arraylist.wd<0&&(this.arraylist.wd=0),t.extra=0))}this.PrAdjustHooks(e,-1)}LogUtil.Debug("S.Connector: PrRemoveHookedObject completed for hookIndex:",e)}PrGetNBackBoneSegments(){LogUtil.Debug("S.Connector: PrGetNBackBoneSegments() called, input: none");let t=this.arraylist.hook.length-OptConstant.ConnectorDefines.NSkip;t<2&&(t=2);const e=t-1;return LogUtil.Debug("S.Connector: PrGetNBackBoneSegments() returning output:",e),e}PrGetStubIndex(){LogUtil.Debug("S.Connector: PrGetStubIndex called");let t=0;const e=OptConstant.AStyles,i=this.arraylist.styleflags&e.BothSides||0==(this.arraylist.styleflags&e.PerpConn),n=OptConstant.ConnectorDefines,s=OptConstant.HookPts;if(i&&this.hooks.length)switch(this.hooks[0].hookpt){case s.LL:case s.LT:t=n.ACl;break;default:t=n.ACr}return LogUtil.Debug("S.Connector: PrGetStubIndex returning output:",t),t}PrGetEndShapeIndex(){LogUtil.Debug("S.Connector: PrGetEndShapeIndex called");let t=0;const e=OptConstant.AStyles,i=OptConstant.ConnectorDefines,n=OptConstant.HookPts;if(this.arraylist.styleflags&e.EndConn&&this.hooks.length>0)switch(this.hooks[0].hookpt){case n.LL:case n.LT:t=i.ACr;break;default:t=i.ACl}return LogUtil.Debug("S.Connector: PrGetEndShapeIndex returning output:",t),t}PrAdjustFormat(t,e,i,n,s,a,o,r){LogUtil.Debug("S.Connector: PrAdjustFormat input:",{horizontalOffset:t,verticalOffset:e,gapAdjustment:i,actionTriggerType:n,actionTriggerData:s,backboneSegments:a,stubIndex:o,endShapeIndex:r});let l,h,c,u,d=0;const p=OptConstant.AStyles,g=this.arraylist.styleflags&p.BothSides||0==(this.arraylist.styleflags&p.PerpConn),f=this.arraylist.styleflags&p.BothSides&&0==(this.arraylist.styleflags&p.Stagger),m=this.arraylist.styleflags&p.Stagger&&this.vertical,v=this.arraylist.styleflags&p.Linear,b=this.arraylist.styleflags&p.ReverseCol,y=this.arraylist.styleflags&p.StartLeft,S=this.arraylist.styleflags&p.Radial,x=OptConstant.ConnectorDefines,w=[],C=[],T=[],D=[],k=[],$=this,O=function(t,e){let i,n=0,s=0;for(o!==x.ACl&&o!==x.ACr||(l=o,c=$.arraylist.hook[l],w[l]=c.startpoint.h,C[l]=c.gap+T[l],n++,T[l]<0?C[l]<-T[l]&&(i=C[l],i<0&&(i=0),s+=-T[l]+i,C[l]<0&&(C[l]=0),n--,T[l]=0):C[l]<T[l]&&(i=C[l],i<0&&(i=0),s+=T[l]-i,C[l]<0&&(C[l]=0),n--,T[l]=0)),l=t;l<e;l++)0!==T[l]&&(c=$.arraylist.hook[l],w[l]=c.startpoint.h,C[l]=$.arraylist.wd+c.extra,n++,T[l]<0?C[l]<-T[l]&&(i=C[l],i<0&&(i=0),s+=-T[l]+i,C[l]<0&&(C[l]=0),n--,T[l]=0):C[l]<T[l]&&(i=C[l],i<0&&(i=0),s+=T[l]-i,C[l]<0&&(C[l]=0),n--,T[l]=0));return n<=0&&(s=0),s/n},P=function(e,i,n){let s,a=2,r=!1,h=0;for(o===x.ACl?(l=o,s=$.arraylist.hook[l],D[l]=s.startpoint.h-s.endpoint.h,T[l]=t):o===x.ACr&&(l=o,s=$.arraylist.hook[l],D[l]=s.endpoint.h-s.startpoint.h,T[l]=-t),l=e;l<i;l++)s=$.arraylist.hook[l],T[l]=n?-t:t,D[l]=s.endpoint.h-s.startpoint.h;for(;Math.abs(a)>1;){if(a=O(e,i),Math.abs(a>1))for(l=e;l<i;l++)0!==T[l]&&(r=!0,T[l]+=a);if(!r)break}if(n){const t=$.arraylist.hook.length;for(o===x.ACr&&(h-=C[l=o]-D[l],w[l]+=h,k[t-1]=h),l=i-1;l>=e;l--)h-=C[l]-D[l],w[l]+=h,k[l-1]=h}else{for(o===x.ACl&&(h+=C[l=o]-D[l],w[l]+=h,w[x.NSkip]+=h,k[x.NSkip]=h,C[x.NSkip]=0),l=e+1;l<i;l++)h+=C[l-1]-D[l-1],w[l]+=h,k[l-1]=h;h+=C[i-1]-D[i-1],k[i-1]=h}},L=function(t,e,i){let n,s,a,h=0,u=0;const d=i?1:0,p=function(t){if(t!==x.ACl&&t!==x.ACr)return;if(n=t,s=$.arraylist.hook[n],w[n]=s.startpoint.h,t===x.ACl)C[n]=s.gap+T[n],w[x.NSkip]=s.startpoint.h;else{const t=$.arraylist.hook.length;C[n]=s.gap+T[n],t>x.NSkip&&(w[t-1]=s.startpoint.h,C[t-1]=0)}u++;let e=D[n]-T3Gv.opt.ConnectorWidthList[n];T[n]<0?e<-T[n]&&(a=e,a<0&&(a=0),h+=-T[n]+a,C[n]<0&&(C[n]=0),u--,T[n]=0):C[n]<T[n]&&(a=C[n],a<0&&(a=0),h+=T[n]-a,C[n]<0&&(C[n]=0),u--,T[n]=0),C[n]+=T3Gv.opt.ConnectorWidthList[n]};for(p(o),p(r),l=t;l<e;l++)f&&i&&l++,0!==T[l]&&(s=$.arraylist.hook[l],c=$.arraylist.hook[l+d],w[l]=S?s.endpoint.h:s.startpoint.h,C[l]=$.arraylist.wd+c.extra,u++,T[l]<0?C[l]<-T[l]&&(a=C[l],a<0&&(a=0),h+=-T[l]+a,C[l]<0&&(C[l]=0),u--,T[l]=0):C[l]<T[l]&&(a=C[l],a<0&&(a=0),h+=T[l]-a,C[l]<0&&(C[l]=0),u--,T[l]=0),C[l]+=T3Gv.opt.ConnectorWidthList[l],f&&!i&&l++);return u<=0&&(h=0),h/u},I=function(e,i,n){let s,a,l=2,h=!1,c=0,u=0;if(o===x.ACl?(s=o,a=$.arraylist.hook[s],D[s]=a.startpoint.h-a.endpoint.h,T[s]=t):o===x.ACr&&(s=o,a=$.arraylist.hook[s],D[s]=a.endpoint.h-a.startpoint.h,T[s]=-t),r===x.ACl?(s=r,a=$.arraylist.hook[s],D[s]=a.startpoint.h-a.endpoint.h,T[s]=-t):r===x.ACr&&(s=r,a=$.arraylist.hook[s],D[s]=a.endpoint.h-a.startpoint.h,T[s]=t),n)for(f&&(u=1),s=e;s<i;s++)a=$.arraylist.hook[s],T[s+u]=-t,D[s+u]=$.arraylist.hook[s+1+u].endpoint.h-a.endpoint.h,f&&s++;else for(s=e;s<i;s++)a=$.arraylist.hook[s],T[s]=t,D[s]=a.endpoint.h-$.arraylist.hook[s-1].endpoint.h,f&&s++;for(;Math.abs(l)>1;){if(l=L(e,i,n),Math.abs(l>1))for(s=e;s<i;s++)0!==T[s]&&(h=!0,T[s]+=l),f&&s++;if(!h)break}const d=$.arraylist.hook.length;if(n){for(o===x.ACr&&(c-=C[s=o]-D[s],w[s]+=c,d>x.NSkip&&(k[d-1]=c,C[d-1]=0),C[s]-=T3Gv.opt.ConnectorWidthList[s]),s=i-1;s>=e;s--)f&&s++,c-=C[s]-D[s],k[s]=c,w[s]+=c,f&&s--,f&&s--;r===x.ACl&&(c-=C[s=r]-D[s],w[s]+=c,k[s]=b?-c:c,C[s]-=T3Gv.opt.ConnectorWidthList[s])}else{for(o===x.ACl&&(c+=C[s=o]-D[s],w[s]+=c,$.arraylist.hook.length>x.NSkip&&(w[x.NSkip]+=c,k[x.NSkip]=b?-c:c),C[x.NSkip]=0,C[s]-=T3Gv.opt.ConnectorWidthList[s]),s=e;s<i;s++)c+=C[s]-D[s],k[s]=b?-c:c,w[s]+=c,f&&s++;r===x.ACr&&(c+=C[s=r]-D[s],w[s]+=c,k[x.ACr]=c,C[s]-=T3Gv.opt.ConnectorWidthList[s])}for(s=e;s<i;s++)f&&n&&s++,C[s]=0};if(h=this.arraylist.hook.length,t){let e=f?2:1;if(d=t,b&&(t=-t),n===OptConstant.ActionTriggerType.ConnectorAdj){if(v&&o===x.ACr)for(l=s;l>x.NSkip;l--)c=this.arraylist.hook[l],v&&l===s||S||(c.startpoint.h+=d),c.endpoint.h+=d;else for(l=s;l<h;l++)c=this.arraylist.hook[l],v&&l===s||S||(c.startpoint.h+=d),c.endpoint.h+=d,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle),f&&l<h-1&&(l++,c=this.arraylist.hook[l],c.startpoint.h+=d,c.endpoint.h+=d,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle));v||S||(this.arraylist.hook[0].endpoint.h+=d,this.arraylist.angle&&(this.arraylist.hook[0].endpoint.v+=d*this.arraylist.angle))}else if(n===OptConstant.ActionTriggerType.LineStart){let t=!1;for(f&&h%2==0?(e=2,t=!0):e=f?3:1,v?P(x.NSkip,h-1-e+(v?1:0)+1,!0):I(x.NSkip+(v?1:0),h-1-e+(v?1:0)+1,!0),o===x.ACr&&(c=this.arraylist.hook[o],c.gap=C[o],d=w[o]-c.startpoint.h,c.startpoint.h=w[o],this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle),v||(e=0,h>x.NSkip&&(c=this.arraylist.hook[0],c.endpoint.h=w[o],this.arraylist.angle&&(c.endpoint.v+=d*this.arraylist.angle)))),l=h-1-e+(v?1:0);l>=x.NSkip+(v?1:0);l--)c=this.arraylist.hook[l],S?(d=w[l]-c.endpoint.h,c.endpoint.h=w[l]):(d=w[l]-c.startpoint.h,c.startpoint.h=w[l],this.arraylist.tilt?c.endpoint.h=c.endpoint.h+d:c.endpoint.h=c.startpoint.h+C[l]),this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle),u=c,f&&l>x.NSkip&&!t&&(l--,c=this.arraylist.hook[l],c.startpoint.h+=d,c.endpoint.h+=d,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle)),t=!1;v||S||(this.arraylist.hook[0].startpoint.h+=d,this.arraylist.angle&&(this.arraylist.hook[0].startpoint.v+=d*this.arraylist.angle,this.arraylist.hook[x.ACl].endpoint.h!=this.arraylist.hook[x.ACl].startpoint.h&&(l=x.ACl,c=this.arraylist.hook[x.ACl],c.gap=C[l],d=w[l]-c.startpoint.h,h>x.NSkip?(c.startpoint.h=this.arraylist.hook[x.NSkip].endpoint.h,c.startpoint.v=this.arraylist.hook[x.NSkip].startpoint.v):(c.startpoint.h=this.arraylist.hook[x.ACr].startpoint.h,c.startpoint.v=this.arraylist.hook[x.ACr].startpoint.v),c.endpoint.h=c.startpoint.h-C[x.ACl],this.arraylist.angle&&(c.endpoint.v+=d*this.arraylist.angle))))}else{for(v?(o===x.ACl&&(e=0),P(x.NSkip+e,h,!1)):I(x.NSkip+e,h,!1),o===x.ACl&&(e=0,c=this.arraylist.hook[o],c.gap=C[o],d=w[o]-c.startpoint.h,c.startpoint.h=w[o],this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle),!v&&h>x.NSkip&&(c=this.arraylist.hook[0],c.startpoint.h=w[o],this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle))),l=x.NSkip+e;l<h;l++)c=this.arraylist.hook[l],S?(d=w[l]-c.endpoint.h,c.endpoint.h=w[l]):(d=w[l]-c.startpoint.h,c.startpoint.h=w[l],c.endpoint.h=c.startpoint.h+C[l]),this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle),u=c,f&&l<h-1&&(l++,c=this.arraylist.hook[l],c.startpoint.h=u.startpoint.h,c.endpoint.h=u.endpoint.h,this.arraylist.angle&&(c.startpoint.v+=d*this.arraylist.angle,c.endpoint.v+=d*this.arraylist.angle));v||S||(this.arraylist.hook[0].endpoint.h+=d,this.arraylist.angle&&(this.arraylist.hook[0].endpoint.v+=d*this.arraylist.angle,this.arraylist.hook[x.ACr].endpoint.h!=this.arraylist.hook[x.ACr].startpoint.h&&(c=this.arraylist.hook[x.ACr],l=x.ACr,c.gap=C[l],d=w[l]-c.startpoint.h,h>x.NSkip?(c.startpoint.h=this.arraylist.hook[h-1].endpoint.h,c.startpoint.v=this.arraylist.hook[h-1].startpoint.v):(c.startpoint.h=this.arraylist.hook[x.ACl].startpoint.h,c.startpoint.v=this.arraylist.hook[x.ACl].startpoint.v),c.endpoint.h=c.startpoint.h+C[l],this.arraylist.angle&&(c.endpoint.v+=d*this.arraylist.angle))))}}if(e){const t=this.GetTilt();for(l=x.NSkip;l<h;l++)c=this.arraylist.hook[l],m&&y?c.endpoint.v-=e:c.endpoint.v+=e,t&&(c.endpoint.h-=e),f&&l<h-1&&(l++,c=this.arraylist.hook[l],c.endpoint.v-=e,t&&(c.endpoint.h-=e))}if(i)if(g)for(b&&(i=-i),this.arraylist.hook[0].startpoint.h+=i,this.arraylist.hook[0].endpoint.h+=i,l=x.NSkip;l<h;l++)c=this.arraylist.hook[l],c.startpoint.h+=i,c.endpoint.h+=i;else for(this.arraylist.hook[0].startpoint.v+=i,this.arraylist.hook[0].endpoint.v+=i,l=x.NSkip;l<h;l++)c=this.arraylist.hook[l],c.startpoint.v+=i,c.endpoint.v+=i;const A={linestart:w,linelen:C,linedisp:k};return LogUtil.Debug("S.Connector: PrAdjustFormat output:",A),A}PrGetShapeConnectorInfo(t){let e,i;LogUtil.Debug("S.Connector: PrGetShapeConnectorInfo called with input:",t);let n=0;const s=OptConstant.AStyles,a=Boolean(this.arraylist.styleflags&s.BothSides||0==(this.arraylist.styleflags&s.PerpConn)),o=Boolean(this.arraylist.styleflags&s.BothSides),r=OptConstant.ConnectorDefines,l=OptConstant.HookPts,h=OptConstant.ActionTriggerType,c=Boolean(this.arraylist.styleflags&s.Linear),u=[];if(a&&this.hooks.length)switch(e=this.hooks[0],e.hookpt){case l.LL:case l.LT:n=r.ACl;break;default:n=r.ACr}let d=t.connect.x;if(this.vertical)if(c)if(n===r.ACr){let e=t.hookpt;d+r.NSkip<this.arraylist.hook.length-1?d>=0&&(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeT,knobData:d+r.NSkip+1,hook:e,polyType:"vertical",position:"bottom"},u.push(i)):(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeT,knobData:r.ACr,hook:e,polyType:"vertical",position:"bottom"},u.push(i))}else d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeT,knobData:d+r.NSkip,hook:t.hookpt,polyType:"vertical"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeT,knobData:r.ACl,hook:t.hookpt,polyType:"vertical"},u.push(i));else i={knobID:h.ConnectorRerp,cursorType:CursorConstant.CursorType.ResizeR,knobData:t.connect.x,hook:t.hookpt,polyType:"horizontal"},u.push(i),o&&d%2!=0&&d--,d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeT,knobData:d+r.NSkip,hook:t.hookpt,polyType:"vertical"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeT,knobData:r.ACl,hook:t.hookpt,polyType:"vertical"},u.push(i));else if(c)if(n===r.ACr){let e=t.hookpt;d+r.NSkip<this.arraylist.hook.length-1?d>=0&&(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:d+r.NSkip+1,hook:e,polyType:"horizontal",position:"right"},u.push(i)):(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeR,knobData:r.ACr,hook:e,polyType:"horizontal",position:"right"},u.push(i))}else d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:d+r.NSkip,hook:t.hookpt,polyType:"horizontal"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeR,knobData:r.ACl,hook:t.hookpt,polyType:"horizontal"},u.push(i));else i={knobID:h.ConnectorRerp,cursorType:CursorConstant.CursorType.ResizeT,knobData:t.connect.x,hook:t.hookpt,polyType:"vertical"},u.push(i),o&&d%2!=0&&d--,d>0?(i={knobID:h.ConnectorAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:d+r.NSkip,hook:t.hookpt,polyType:"horizontal"},u.push(i)):n===r.ACl&&(i={knobID:h.ConnectorHook,cursorType:CursorConstant.CursorType.ResizeR,knobData:r.ACl,hook:e.hookpt,polyType:"horizontal"},u.push(i));return LogUtil.Debug("S.Connector: PrGetShapeConnectorInfo returning output:",u),u}GetConnectorOrientation(t){LogUtil.Debug("S.Connector: GetConnectorOrientation called with isReversed:",t);const e=OptConstant.AStyles;let i=Boolean(this.arraylist.styleflags&e.StartLeft);let n;return Boolean(this.arraylist.styleflags&e.BothSides||0==(this.arraylist.styleflags&e.PerpConn))&&(i=!1,t&&(i=!0)),n=this.vertical?i?Instance.Shape.ConnectorDir.ORG_HORIZONTALRIGHT:Instance.Shape.ConnectorDir.ORG_HORIZONTAL:i?Instance.Shape.ConnectorDir.ORG_VERTICALUP:Instance.Shape.ConnectorDir.ORG_VERTICALDOWN,LogUtil.Debug("S.Connector: GetConnectorOrientation result:",n),n}IsFlowChartConnector(){LogUtil.Debug("S.Connector: IsFlowChartConnector called");const t=OptConstant.AStyles,e=(this.arraylist.styleflags&t.FlowConn)>0;return LogUtil.Debug("S.Connector: IsFlowChartConnector result:",e),e}IsOrgChartConnector(t){LogUtil.Debug("S.Connector: IsOrgChartConnector called with allowedTypes:",t);let e=0===this.objecttype;if(t)for(let n=0;n<t.length;n++)if(this.objecttype===t[n]){e=!0;break}const i=!this.IsFlowChartConnector()&&e;return LogUtil.Debug("S.Connector: IsOrgChartConnector result:",i),i}IsCauseAndEffectChartConnector(){LogUtil.Debug("S.Connector: IsCauseAndEffectChartConnector called");const t=NvConstant.FNObjectTypes,e=this.objecttype===t.CauseEffectMain;return LogUtil.Debug("S.Connector: IsCauseAndEffectChartConnector result:",e),e}IsOrgChartTypeConnector(){LogUtil.Debug("S.Connector: IsOrgChartTypeConnector called");let t=!1;return this.objecttype,t=!1,LogUtil.Debug("S.Connector: IsOrgChartTypeConnector result:",t),t}FixHook(t,e){LogUtil.Debug("S.Connector: FixHook called with preserveOriginalPosition:",t,"forceCoManagerUpdate:",e);const i=OptConstant.AStyles,n=OptConstant.Common.DimMax,s=Boolean(this.arraylist.styleflags&i.StartLeft),a=Boolean(this.arraylist.styleflags&i.BothSides||0==(this.arraylist.styleflags&i.PerpConn)),o=Boolean(this.arraylist.styleflags&i.BothSides),r=Boolean(this.arraylist.styleflags&i.ReverseCol),l={x:this.hooks[0].connect.x,y:this.hooks[0].connect.y};let h=!1;if(this.hooks.length){if(!t){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&t.IsCoManager(null)&&(e||(h=!0))}const i=this.hooks[0].hookpt===OptConstant.HookPts.LL||this.hooks[0].hookpt===OptConstant.HookPts.LT;OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move),this.vertical?a?s?(i?(this.hooks[0].connect.y=r?0:n,this.hooks[0].hookpt=OptConstant.HookPts.LT):(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LB),this.hooks[0].connect.x=o?n/2:3*n/4):(i?(this.hooks[0].connect.y=r?0:n,this.hooks[0].hookpt=OptConstant.HookPts.LT):(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LB),this.hooks[0].connect.x=o?n/2:n/4):s?(this.hooks[0].connect.x=0,this.hooks[0].hookpt=OptConstant.HookPts.LR,this.hooks[0].connect.y=n/2):(this.hooks[0].connect.x=n,this.hooks[0].hookpt=OptConstant.HookPts.LL,this.hooks[0].connect.y=n/2):a?(i?(this.hooks[0].connect.x=n,this.hooks[0].hookpt=OptConstant.HookPts.LL):(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LR),this.hooks[0].connect.x=n/2):s?(this.hooks[0].connect.y=0,this.hooks[0].hookpt=OptConstant.HookPts.LB,this.hooks[0].connect.x=n/2):(this.hooks[0].connect.y=n,this.hooks[0].hookpt=OptConstant.HookPts.LT,this.hooks[0].connect.x=n/2),t&&(this.hooks[0].connect.x=l.x,this.hooks[0].connect.y=l.y),h&&(this.hooks[0].connect.y=-OptConstant.AStyles.CoManager)}LogUtil.Debug("S.Connector: FixHook completed with hook position:",this.hooks[0].connect,"hook point:",this.hooks[0].hookpt)}SetDirection(t,e,i){LogUtil.Debug("S.Connector: SetDirection called with invertStyle:",t,"toggleOrientation:",e,"propagate:",i);const n=OptConstant.AStyles,s=OptConstant.ConnectorDefines.NSkip;let a=this.arraylist.styleflags&n.BothSides||0==(this.arraylist.styleflags&n.PerpConn);const o=this.arraylist.styleflags&n.CoManager,r=this.arraylist.styleflags&n.ReverseCol;let l=!1;const h=this.arraylist.hook.length;if(e&&(a?(l=(this.arraylist.styleflags&OptConstant.AStyles.ReverseCol)>0,this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.PerpConn,!0),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.StartLeft,!1),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.ReverseCol,!1),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.BothSides,!1),a=!1):this.vertical=!this.vertical),this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.ReverseCol,!1),t)if(a)this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.ReverseCol,0===r);else{if(o&&i){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&(t.arraylist.styleflags&n.BothSides||(t.arraylist.styleflags,n.PerpConn))}l||(this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.StartLeft,0==(this.arraylist.styleflags&OptConstant.AStyles.StartLeft)))}else l&&(this.arraylist.styleflags=Utils2.SetFlag(this.arraylist.styleflags,OptConstant.AStyles.StartLeft,!0));OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move|DSConstant.LinkFlags.Change),this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0),this.FixHook(i,!1);for(let c=s;c<h;c++){const i=this.arraylist.hook[c],n=ObjectUtil$1.GetObjectPtr(i.id,!0);if(n&&n.hooks.length)if(n.hooks[0].hookpt=this.GetBestHook(i.id,n.hooks[0].hookpt,n.hooks[0].connect),OptCMUtil.SetLinkFlag(i.id,DSConstant.LinkFlags.Move),n.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector)n.SetDirection(t,e,!0);else{const n=T3Gv.opt.FindChildArray(i.id,-1);if(n>=0){const i=ObjectUtil$1.GetObjectPtr(n,!0);i&&i.SetDirection(t,e,!1)}}}LogUtil.Debug("S.Connector: SetDirection completed")}SetSpacing(t,e){LogUtil.Debug("S.Connector: SetSpacing called with adjustPrimaryDimension:",t,"spacingValue:",e);let i,n,s=e,a=this.arraylist.hook.length;const o=OptConstant.AStyles;let r=this.arraylist.styleflags&o.BothSides||0==(this.arraylist.styleflags&o.PerpConn);const l=this.arraylist.styleflags&o.CoManager,h=OptConstant.ConnectorDefines.NSkip,c=function(t,e){for(let n=h;n<a;n++)i=t.hook[n],i.extra+e<0&&(i.extra=-e)};if(l&&this.vertical!==t&&(s=e/2),this.hooks.length)switch(this.hooks[0].hookpt){case OptConstant.HookPts.LT:case OptConstant.HookPts.LB:t&&(n=null,r?(i=a>2?this.hooks[0].hookpt===OptConstant.HookPts.LT?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ACr]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.wd,i.gap<0&&(i.gap=0))):(i=a>2?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.ht,i.gap<0&&(i.gap=0))));break;case OptConstant.HookPts.LL:case OptConstant.HookPts.LR:t||(n=null,r?(i=a>2?this.hooks[0].hookpt===OptConstant.HookPts.LL?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ACr]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.wd,i.gap<0&&(i.gap=0))):(i=a>2?this.arraylist.hook[OptConstant.ConnectorDefines.ACl]:this.arraylist.hook[OptConstant.ConnectorDefines.ABk],null!==n?i.gap=n:(i.gap+=s-this.arraylist.ht,i.gap<0&&(i.gap=0))))}this.vertical?t?(LogUtil.Debug("S.Connector: Setting width to",s),this.arraylist.wd=s,c(this.arraylist,s)):(LogUtil.Debug("S.Connector: Setting height to",s),this.arraylist.ht=s):t?(LogUtil.Debug("S.Connector: Setting height to",s),this.arraylist.ht=s):(LogUtil.Debug("S.Connector: Setting width to",s),this.arraylist.wd=s,c(this.arraylist,s)),LogUtil.Debug("S.Connector: SetSpacing completed")}CollapseConnector(t,e,i){LogUtil.Debug("S.Connector: CollapseConnector called with collapseState:",t,"updateLinkFlags:",e,"propagateCollapse:",i);var n,s,a,o=NvConstant.ObjFlags.NotVisible,r=OptConstant.ExtraFlags.CollapseConn,l=[];-1==t&&(t=0==(this.extraflags&r));var h=this.extraflags&r;if(e&&(h&&0==(this.flags&o)?(t=!0,this.extraflags=Utils2.SetFlag(this.extraflags,r,!1)):!h&&this.flags&o?(t=!1,this.extraflags=Utils2.SetFlag(this.extraflags,r,!0)):t=(this.extraflags&r)>0),i&&this.hooks.length>0&&OptCMUtil.SetLinkFlag(this.hooks[0].objid,DSConstant.LinkFlags.Move),(this.extraflags&r)>0!=t||!i){(i||e)&&OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),!i&&t?this.flags=Utils2.SetFlag(this.flags,o,t):0===h&&(this.flags=Utils2.SetFlag(this.flags,o,!1)),ObjectUtil$1.AddToDirtyList(this.BlockID),T3Gv.opt.dirtyListReOrder=!0,this.flags&o&&(l.push(this.BlockID),T3Gv.opt.DeSelect(l));for(var c=this.arraylist.hook.length,u=OptConstant.ConnectorDefines.NSkip;u<c;u++)if(this.arraylist.hook[u].id>=0&&(n=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[u].id,!0)))switch(n.DrawingObjectBaseClass){case OptConstant.DrawObjectBaseClass.Connector:n.CollapseConnector(t,e,i);break;default:if(i||t?n.flags=Utils2.SetFlag(n.flags,o,t):0===h&&(n.flags=Utils2.SetFlag(n.flags,o,!1)),ObjectUtil$1.AddToDirtyList(this.arraylist.hook[u].id),T3Gv.opt.dirtyListReOrder=!0,n.flags&o&&l.push(this.arraylist.hook[u].id),n.flags&o&&!1!==t)break;(s=T3Gv.opt.FindChildArray(this.arraylist.hook[u].id,-1))>=0&&(ObjectUtil$1.GetObjectPtr(s,!0).CollapseConnector(t,e,!1),(a=T3Gv.opt.FindChildArray(this.arraylist.hook[u].id,s))>=0&&ObjectUtil$1.GetObjectPtr(a,!0).CollapseConnector(t,e,!1))}T3Gv.opt.DeSelect(l),this.PrFormat(this.BlockID)}LogUtil.Debug("S.Connector: CollapseConnector completed for BlockID:",this.BlockID,"with collapseState:",t)}MatchSize(t,e){let i;LogUtil.Debug("S.Connector: MatchSize called with applyNewWidth:",t,"newWidth:",e);const n=this.arraylist.hook.length;let s,a,o;const r=[],l=OptConstant.ConnectorDefines.NSkip,h=OptConstant.ConnectorDefines,c=OptConstant.HookPts;let u=!1,d=!1;function p(t,e,i,n){this.cobj=t,this.bkdist=e,this.stubindex=i,this.stubdist=n}for(i=l;i<n;i++)if(s=ObjectUtil$1.GetObjectPtr(this.arraylist.hook[i].id,!1),s&&s.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector){void 0===a?a=s.arraylist.wd:Utils2.IsEqual(a,s.arraylist.wd)||(u=!0,s.arraylist.wd>a&&(a=s.arraylist.wd));const t=s.arraylist.hook[h.A_Bk].endpoint.h-s.arraylist.hook[h.A_Bk].startpoint.h,e=s.hooks[0].hookpt===c.SED_LL||s.hooks[0].hookpt===c.SED_LT?h.A_Cr:h.A_Cl,i=Math.abs(s.arraylist.hook[e].endpoint.h-s.arraylist.hook[e].startpoint.h),n=t+i;void 0===o?o=n:Utils2.IsEqual(n,o)||(d=!0,n>o&&(o=n));const l=new p(s,t,e,i);r.push(l)}if(t&&(Utils2.IsEqual(a,e)||(a=e,u=!0)),u){const t=r.length;for(o=void 0,d=!0,i=0;i<t;i++){s=ObjectUtil$1.GetObjectPtr(r[i].cobj.BlockID,!0),s.arraylist.matchsizelen=0,OptCMUtil.SetLinkFlag(s.BlockID,DSConstant.LinkFlags.Move);const t=s.hooks[0].hookpt===c.LL||s.hooks[0].hookpt===c.LT?h.ACl:h.ACr;s.arraylist.hook[t].gap=a,s.PrFormat(s.BlockID);const e=s.arraylist.hook[h.ABk].endpoint.h-s.arraylist.hook[h.ABk].startpoint.h,n=Math.abs(s.arraylist.hook[r[i].stubindex].endpoint.h-s.arraylist.hook[r[i].stubindex].startpoint.h);r[i].bkdist=e,r[i].stubdist=n;const l=e+n;(void 0===o||!Utils2.IsEqual(l,o)&&l>o)&&(o=l)}}if(d){const t=r.length;if(!u)for(o=void 0,i=0;i<t;i++){s=ObjectUtil$1.GetObjectPtr(r[i].cobj.BlockID,!0),s.arraylist.matchsizelen=0,OptCMUtil.SetLinkFlag(s.BlockID,DSConstant.LinkFlags.Move),s.PrFormat(s.BlockID),r[i].bkdist=s.arraylist.hook[h.ABk].endpoint.h-s.arraylist.hook[h.ABk].startpoint.h,r[i].stubdist=Math.abs(s.arraylist.hook[r[i].stubindex].endpoint.h-s.arraylist.hook[r[i].stubindex].startpoint.h);const t=r[i].bkdist+r[i].stubdist;(void 0===o||!Utils2.IsEqual(t,o)&&t>o)&&(o=t)}for(i=0;i<t;i++){const t=r[i].bkdist+r[i].stubdist;Utils2.IsEqual(t,o)||(s=r[i].cobj,s.arraylist.matchsizelen=o,s.PrFormat(s.BlockID))}}LogUtil.Debug("S.Connector: MatchSize completed with reference width:",a,"max combined distance:",o)}FoundText(t,e,i){LogUtil.Debug("S.Connector: FoundText called with searchText:",t,"length:",e,"blockID:",i);let n=0;const s=this.arraylist.hook.length,a=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(null!=a){i===this.BlockID&&(n=this.arraylist.lasttexthook+1);for(let i=n;i<s;i++)if(this.arraylist.hook[i].textid>=0){const n=a.GetElementById(OptConstant.SVGElementClass.Text,i);if(n&&n.GetText(0).search(t)>=0)return this.arraylist.lasttexthook=i,TextUtil.ActivateTextEdit(a),n.SetSelectedRange(n.GetText(0).search(t),n.GetText(0).search(t)+e),LogUtil.Debug("S.Connector: FoundText found text at hook index:",i),!0}}return LogUtil.Debug("S.Connector: FoundText did not find the text"),!1}FieldDataAllowed(){LogUtil.Debug("S.Connector: Checking if field data is allowed");return LogUtil.Debug("S.Connector: Field data allowed:",false),false}}class D3Symbol extends Symbol$1{constructor(t){t=t||{},LogUtil.Debug("S.D3Symbol: Input options:",t),t.ShapeType=OptConstant.ShapeType.D3Symbol,t.objecttype=NvConstant.FNObjectTypes.D3Symbol,t.TextFlags=t.TextFlags||NvConstant.TextFlags.AttachB,super(),this.SetD3Settings(t.d3Settings),LogUtil.Debug("S.D3Symbol: Output options after initialization:",t)}CreateShape(t,e){if(LogUtil.Debug("S.D3Symbol: Enter CreateShape with parameters:",{svgDocument:t,applyHiddenEventBehavior:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.D3Symbol: Object not visible, exiting CreateShape."),null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=this.Frame;this.TextFlags=NvConstant.TextFlags.AttachB,i.SetSize(n.width,n.height),i.SetPos(n.x,n.y),i.isShape=!0;const s=t.CreateShape(OptConstant.CSType.Group);s.SetSize(n.width,n.height),s.SetID(OptConstant.SVGElementClass.Shape);const a=t.CreateShape(OptConstant.CSType.Rect);a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),a.SetStrokeWidth(0),e?a.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):a.SetEventBehavior(OptConstant.EventBehavior.None),a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),a.SetSize(n.width,n.height),i.AddElement(a),i.AddElement(s),this.RenderControl(t,i),-1!==this.DataID&&this.LMAddSVGTextObject(t,i);const o=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,r=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0;return o&&s.SetMirror(o),r&&s.SetFlip(r),T3Gv.opt.bDrawEffects&&this.SetEffects(s,!1,!1),LogUtil.Debug("S.D3Symbol: Exit CreateShape with shapeContainer:",i),i}MapData(t){LogUtil.Debug("S.D3Symbol: MapData - Input:",t);const e=this.GetPublicParams();if(!t||0===e.length||!this.HasFieldData())return void LogUtil.Debug("S.D3Symbol: MapData - No mapping performed (missing data, public params or field data).");const i=TODO.STData.FieldedDataGetFieldList(this.fieldDataTableID,!0),n=[];e.forEach((e=>{const s=t[e];if(s&&s.dataMap){const t=(t=>{const e=(t||"").split(":"),i={name:e[0].toLowerCase(),start:0,flags:null};for(let n=1;n<e.length;n++){const t=e[n];isNaN(parseInt(t,10))?i.flags=t.toLowerCase():i.start=parseInt(t,10)}return i})(s.dataMap),e=((t,e,n,s)=>{if(!t||!n)return null;n=n.toLowerCase();let a=null;for(let l=e=e||0;l<i.length;l++){const e=i[l];if(o=e.type,("string"===(r=n)&&"string"===o||"number"===o&&("int"===r||"float"===r)||"*"===t||"?"===t||o===r)&&("*"===t||"?"===t||e.name.toLowerCase()===t)){if(!s){a=l;break}if(null===a&&(a=[]),a.push(l),"?"===t)break}}var o,r;return a})(t.name,t.start,s.type,s.isArray);if(null!==e){let a=null,o=[];this.fieldDataElemID<0?"all"===t.flags?(o=n,a=[]):o=[n[0]]:o=[this.fieldDataElemID],o.forEach((n=>{let o=null;if(s.isArray)o=[],e.forEach((e=>{const s=i[e],a="label"===t.flags?s.name:TODO.STData.FieldedDataGetFieldValue(this.fieldDataTableID,n,s.fieldID);void 0!==a&&o.push(a)}));else{const s=i[e],a="label"===t.flags?s.name:TODO.STData.FieldedDataGetFieldValue(this.fieldDataTableID,n,s.fieldID);void 0!==a&&(o=a)}null!==o&&(a?Array.isArray(a)?a.push(o):a=[a,o]:a=o)})),null!==a&&(s.value=a)}}})),LogUtil.Debug("S.D3Symbol: MapData - Output (mapped data updated in object).")}SetParamValue(t,e){LogUtil.Debug("S.D3Symbol: SetParamValue - Input:",{paramName:t,paramValue:e});const i=this.d3Settings?this.d3Settings.renderSettings:null;i&&i[t]&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),i[t].value=e,i[t].dataMap=null,this.UpdateSizeFromSettings(),ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.D3Symbol: SetParamValue - Updated renderSettings:",i)}UpdateSizeFromSettings(){}GetRenderParams(){LogUtil.Debug("S.D3Symbol: GetRenderParams - Start");const t=this.Frame,e=this.d3Settings?this.d3Settings.renderSettings:null;if(e){const i=Utils1.DeepCopy(e);i.width=i.width||{},i.height=i.height||{},i.width.value=t.width,i.height.value=t.height;return(t=>{const i=this.GetFieldDataStyleOverride(),n=i&&i.strokeColor?i.strokeColor:null,s=i&&i.fillColor?i.fillColor:null,a=i&&i.textColor?i.textColor:null;let o=this.StyleRecord.Fill.Paint.Color,r=this.StyleRecord.Line.Paint.Color,l=this.StyleRecord.Text.Paint.Color;this.StyleRecord.Fill.Paint.FillType===NvConstant.FillTypes.Transparent?o="none":this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Solid&&this.StyleRecord.Fill.Paint.FillType!==NvConstant.FillTypes.Gradient&&(o=null),this.StyleRecord.Line.Paint.FillType===NvConstant.FillTypes.Transparent?r="none":this.StyleRecord.Line.Paint.FillType!==NvConstant.FillTypes.Solid&&this.StyleRecord.Line.Paint.FillType!==NvConstant.FillTypes.Gradient&&(r=null);const h=s||o,c=n||r,u=this.StyleRecord.Line.Thickness,d=a||l;h&&t.fillColor&&(t.fillColor.value=h),c&&t.strokeColor&&(t.strokeColor.value=c),t.strokeWidth&&(t.strokeWidth.value=u),d&&t.textColor&&(t.textColor.value=d),o&&e.fillColor&&(e.fillColor.value=o),r&&e.strokeColor&&(e.strokeColor.value=r),e.strokeWidth&&(e.strokeWidth.value=u),l&&e.textColor&&(e.textColor.value=l)})(i),this.MapData(i),LogUtil.Debug("S.D3Symbol: GetRenderParams - Output:",i),i}return LogUtil.Debug("S.D3Symbol: GetRenderParams - No renderSettings found."),null}SetDataMap(t,e){LogUtil.Debug("S.D3Symbol: SetDataMap - Input:",{paramName:t,dataMap:e});const i=this.d3Settings?this.d3Settings.renderSettings:null;i&&i[t]&&(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),i[t].dataMap=e,this.UpdateSizeFromSettings(),ObjectUtil$1.AddToDirtyList(this.BlockID)),LogUtil.Debug("S.D3Symbol: SetDataMap - Updated renderSettings:",i)}GetPublicParams(){LogUtil.Debug("S.D3Symbol: GetPublicParams - Start");const t=this.d3Settings?this.d3Settings.publicAttributes:null,e=[];return t?(t.forEach((t=>{Instance.Shape.D3Symbol.DefaultStyleParams.indexOf(t)<0&&e.push(t)})),LogUtil.Debug("S.D3Symbol: GetPublicParams - Output:",e),e):(LogUtil.Debug("S.D3Symbol: GetPublicParams - No public attributes found."),e)}ExportD3Settings(){LogUtil.Debug("S.D3Symbol: ExportD3Settings - Start");let t="";return this.d3Settings&&(t=JSON.stringify(this.d3Settings)),LogUtil.Debug("S.D3Symbol: ExportD3Settings - Output:",t),t}ImportD3Settings(t){LogUtil.Debug("S.D3Symbol: ImportD3Settings - Input:",t);let e=null;try{e=JSON.parse(t)}catch(i){throw T3Util.Error("= s.D3Symbol: ImportD3Settings - Error parsing settings:",i),i}e&&this.SetD3Settings(e),LogUtil.Debug("S.D3Symbol: ImportD3Settings - Output settings applied.")}SetD3Settings(t){}Resize(t,e,i){}ChangeTextAttributes(t,e,i,n,s,a,o,r){LogUtil.Debug("S.D3Symbol: ChangeTextAttributes - Input:",{newText:t,newFont:e,newSize:i,newColor:n,newAlignment:s,newWeight:a,newStyle:o,newDecoration:r}),TextUtil.GetActiveTextEdit()===this.BlockID?e=null:t=null,Instance.Shape.BaseDrawObject.prototype.ChangeTextAttributes.call(this,t,e,i,n,s,a,o,r),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.D3Symbol: ChangeTextAttributes - Completed")}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.D3Symbol: CreateActionTriggers - Input parameters:",{event:t,triggerType:e,action:i,response:n});const s=Instance.Shape.BaseShape.prototype.CreateActionTriggers.apply(this,[t,e,i,n]);return LogUtil.Debug("S.D3Symbol: CreateActionTriggers - Output result:",s),s}RefreshFromFieldData(t){return LogUtil.Debug("S.D3Symbol: RefreshFromFieldData - Input:",t),t&&this.fieldDataTableID!==t?(LogUtil.Debug("S.D3Symbol: RefreshFromFieldData - Output: false"),!1):(Instance.Shape.BaseDrawObject.prototype.RefreshFromFieldData.call(this,t),this.UpdateSizeFromSettings(),ObjectUtil$1.AddToDirtyList(this.BlockID),LogUtil.Debug("S.D3Symbol: RefreshFromFieldData - Output: true"),!0)}static DefaultD3Settings(t){LogUtil.Debug("S.D3Symbol: Input settings:",t);let e={moduleID:null,renderSettings:{},publicAttributes:[]};return t&&(e=$.extend(!0,e,t)),LogUtil.Debug("S.D3Symbol: Output settings:",e),e}}D3Symbol.DefaultStyleParams=["fillColor","strokeColor","strokeWidth","textColor"];class FreehandLine extends BaseLine{constructor(t){(t=t||{}).LineType=OptConstant.LineType.FREEHAND,t.TextFlags=t.TextFlags|NvConstant.TextFlags.None,super(t),this.TextFlags=t.TextFlags||0,this.StartPoint=t.StartPoint||{x:0,y:0},this.EndPoint=t.EndPoint||{x:0,y:0},this.pointlist=t.pointlist||[],this.RotationAngle=t.RotationAngle||0,this.flags=t.flags||0,this.CalcFrame()}GetFreehandPoints(t){let e=[],i=this.StartPoint.x,n=this.StartPoint.y;if(!0===t&&(i-=this.Frame.x,n-=this.Frame.y),this.pointlist)for(let s=0;s<this.pointlist.length;s++){const t=this.pointlist[s];let a={x:t.x+i,y:t.y+n};e.push(a)}return e}CalcFrame(){let t={width:0,height:0,x:0,y:0},e=[];this.pointlist&&this.pointlist.length&&(e=this.GetFreehandPoints(!1),Utils2.GetPolyRect(t,e),t.width<1&&(t.width=1),t.height<1&&(t.height=1),this.Frame=Utils1.DeepCopy(t)),this.UpdateFrame(this.Frame)}GetDimensionsForDisplay(){return{x:this.Frame.x,y:this.Frame.y,width:this.Frame.width,height:this.Frame.height}}GetSVGFrame(t){var e={};return null==t&&(t=this.Frame),Utils2.CopyRect(e,t),e}UpdateDrawing(t){var e=t.GetElementById(OptConstant.SVGElementClass.Shape),i=t.GetElementById(OptConstant.SVGElementClass.Slop);this.CalcFrame();var n=this.GetFreehandPoints(!0);t.SetSize(this.Frame.width,this.Frame.height),t.SetPos(this.Frame.x,this.Frame.y),e.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(e,n),i.SetSize(this.Frame.width,this.Frame.height),this.UpdateSVG(i,n)}UpdateSVG(t,e){var i,n=e.length;if(t&&t.PathCreator){(i=t.PathCreator()).BeginPath(),n>1&&i.MoveTo(e[0].x,e[0].y);for(let t=1;t<n;t++)i.LineTo(e[t].x,e[t].y);i.Apply()}}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;let i=[],n=t.CreateShape(OptConstant.CSType.ShapeContainer),s=t.CreateShape(OptConstant.CSType.Path);s.SetID(OptConstant.SVGElementClass.Shape);let a=t.CreateShape(OptConstant.CSType.Path);a.SetID(OptConstant.SVGElementClass.Slop),a.ExcludeFromExport(!0),this.CalcFrame();let o=this.Frame,r=this.StyleRecord;if(r=this.SVGTokenizerHook(r),null==r){let t=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1);t&&(r=t.def.style)}let l=o.width,h=o.height;n.SetSize(l,h),n.SetPos(this.Frame.x,this.Frame.y),s.SetSize(l,h),i=this.GetFreehandPoints(!0),this.UpdateSVG(s,i);let c=r.Line.Paint.Color,u=r.Line.Thickness;r.Line.Thickness>0&&r.Line.Thickness<1&&(u=1);let d=r.Line.Paint.Opacity;return s.SetFillColor("none"),s.SetStrokeColor(c),s.SetStrokeOpacity(d),s.SetStrokeWidth(u),a.SetSize(l,h),this.UpdateSVG(a,i),a.SetStrokeColor("white"),a.SetFillColor("none"),a.SetOpacity(0),e?a.SetEventBehavior(OptConstant.EventBehavior.HiddenOut):a.SetEventBehavior(OptConstant.EventBehavior.None),a.SetStrokeWidth(u+OptConstant.Common.Slop),n.AddElement(s),n.AddElement(a),this.ApplyStyles(s,r),this.ApplyEffects(n,!1,!0),n.isShape=!0,n}PostCreateShapeCallback(t,e,i,n){}CreateActionTriggers(t,e,i,n){let s=OptConstant.Common.KnobSize,a=t.CreateShape(OptConstant.CSType.Group),o=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(o*=2);let r=s/o,l=this.Frame,h=l.width,c=l.height;ObjectUtil$1.GetObjectPtr(e,!1),h+=r,c+=r;let u=Utils1.DeepCopy(l);u.x-=r/2,u.y-=r/2,u.width+=r,u.height+=r;let d={svgDoc:t,shapeType:OptConstant.CSType.Rect,knobSize:r,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",cursorType:CursorConstant.CursorType.ResizeLT,locked:!1};e!==n&&(d.fillColor="white",d.strokeSize=1,d.strokeColor="black",d.fillOpacity=0),d.knobID=OptConstant.ActionTriggerType.TopLeft,d.cursorType=CursorConstant.CursorType.ResizeLT;let p=this.GenericKnob(d);return a.AddElement(p),d.x=h-r,d.y=0,d.cursorType=CursorConstant.CursorType.ResizeRT,d.knobID=OptConstant.ActionTriggerType.TopRight,p=this.GenericKnob(d),a.AddElement(p),d.x=h-r,d.y=c-r,d.cursorType=CursorConstant.CursorType.ResizeRB,d.knobID=OptConstant.ActionTriggerType.BottomRight,p=this.GenericKnob(d),a.AddElement(p),d.x=0,d.y=c-r,d.cursorType=CursorConstant.CursorType.ResizeLB,d.knobID=OptConstant.ActionTriggerType.BottomLeft,p=this.GenericKnob(d),a.AddElement(p),a.SetSize(h,c),a.SetPos(u.x,u.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),a}ModifyShape(t,e,i,n,s){let a={x:e,y:i},o=Utils1.DeepCopy(T3Gv.opt.actionBBox),r=0,l=0;switch(T3Gv.opt.actionTriggerId){case OptConstant.ActionTriggerType.TopLeft:r=o.x-e,l=o.y-i,o.x=e,o.y=i,o.width+=r,o.height+=l,o.width<0&&(o.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,o.width=-o.width),o.height<0&&(o.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a);break;case OptConstant.ActionTriggerType.TopRight:l=o.y-i,o.y=i,o.height=o.height+l,o.width=e-o.x,o.width<0&&(o.x=e,o.width=-o.width),o.height<0&&(o.y=T3Gv.opt.actionBBox.y+T3Gv.opt.actionBBox.height,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a);break;case OptConstant.ActionTriggerType.BottomRight:o.width=e-o.x,o.height=i-o.y,o.width<0&&(o.x=e,o.width=-o.width),o.height<0&&(o.y=i,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a);break;case OptConstant.ActionTriggerType.BottomLeft:o.height=i-o.y,r=o.x-e,o.x=e,o.width+=r,o.width<0&&(o.x=T3Gv.opt.actionBBox.x+T3Gv.opt.actionBBox.width,o.width=-o.width),o.height<0&&(o.y=i,o.height=-o.height),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(o),this.HandleActionTriggerCallResize(T3Gv.opt.actionNewBBox,!0,a)}}SetSize(t,e,i){let n,s,a={};a.x=this.Frame.x,a.y=this.Frame.y,a.width=this.Frame.width,a.height=this.Frame.height,t&&(a.width=t),e&&(a.height=e),(t||e)&&(n=T3Gv.opt.actionBBox,s=T3Gv.opt.actionNewBBox,T3Gv.opt.actionBBox=Utils1.DeepCopy(this.Frame),T3Gv.opt.actionNewBBox=Utils1.DeepCopy(this.Frame),this.HandleActionTriggerCallResize(a,i,null),T3Gv.opt.actionBBox=n,T3Gv.opt.actionNewBBox=s,ObjectUtil$1.AddToDirtyList(this.BlockID),this.rflags&&(t&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Width,!1)),e&&(this.rflags=Utils2.SetFlag(this.rflags,NvConstant.FloatingPointDim.Height,!1))))}HandleActionTriggerCallResize(t,e,i){this.prevBBox=Utils1.DeepCopy(this.Frame);let n=Utils1.DeepCopy(this.Frame);t.width<OptConstant.Common.MinDim&&(t.width=OptConstant.Common.MinDim),t.height<OptConstant.Common.MinDim&&(t.height=OptConstant.Common.MinDim);let s=1,a=1;t.width&&!Utils2.IsEqual(this.Frame.width,0)&&(s=t.width/this.Frame.width),t.height&&!Utils2.IsEqual(this.Frame.height,0)&&(a=t.height/this.Frame.height);let o=t.x-n.x,r=t.y-n.y;this.StartPoint.x+=o,this.StartPoint.y+=r;let l=this.pointlist.length;for(let h=0;h<l;h++)this.pointlist[h].x*=s,this.pointlist[h].y*=a;if(this.CalcFrame(),e===OptConstant.ActionTriggerType.LineLength&&(e=0,noMin=!0),T3Gv.opt.actionStoredObjectId===this.BlockID&&i&&UIUtil.UpdateDisplayCoordinates(t,i,CursorConstant.CursorTypes.Grow,this),e&&T3Gv.opt.actionSvgObject&&T3Gv.opt.actionStoredObjectId===this.BlockID){if(null===T3Gv.opt.actionSvgObject)return;this.prevBBox,Utils1.DeepCopy(this.trect),this.UpdateDrawing(T3Gv.opt.actionSvgObject)}}AllowHook(t,e,i){return!1}AllowLink(){return!1}PreventLink(){return!0}NoRotate(){return!0}CustomSnap(t){return!0}AdjustLineEnd(t,e,i,n){let s=this.pointlist[this.pointlist.length-1],a=e-s.x,o=i-s.y;if(Math.sqrt(a*a+o*o)>3){let t=e-this.StartPoint.x,n=i-this.StartPoint.y,s=new Point$1(t,n);this.pointlist.push(s)}this.AdjustLine(t,e,i,n)}AdjustLine(t,e,i,n){t?this.UpdateDrawing(t):this.CalcFrame()}LMActionDuringTrack(t){return t}LMDrawDuringTrack(t){return t}LMDrawRelease(t){t&&(Utils2.StopPropagationAndDefaults(t),t.gesture.stopDetect()),LMEvtUtil.UnbindActionClickHammerEvents(),$$1(window).unbind("mousemove"),T3Gv.opt.WorkAreaHammer.on("tap",EvtUtil.Evt_WorkAreaHammerClick),this.ResetAutoScrollTimer(),Utils1.DeepCopy(T3Gv.opt.drawShape.StyleRecord),T3Gv.opt.drawShape.StartArrowID,T3Gv.opt.drawShape.EndArrowID,T3Gv.opt.drawShape.StartArrowDisp,T3Gv.opt.drawShape.ArrowSizeIndex,T3Gv.opt.drawShape.TextGrow,T3Gv.opt.drawShape.TextAlign,T3Gv.opt.drawShape.TextDirection,T3Gv.opt.drawShape.Dimensions,Utils1.DeepCopy(T3Gv.opt.drawShape.StartPoint),Utils1.DeepCopy(T3Gv.opt.drawShape.EndPoint),Utils1.DeepCopy(T3Gv.opt.drawShape.Frame),OptConstant.ExtraFlags.SideKnobs,this.pointlist&&Utils1.DeepCopy(this.pointlist),Utils1.DeepCopy(T3Gv.opt.linkParams),this.LMDrawPostRelease(T3Gv.opt.actionStoredObjectId),DrawUtil.PostObjectDraw()}LMDrawClick(t,e){LogUtil.Debug("= s.FreehandLine LMDrawClick mouseX, mouseY=>",t,e);try{this.Frame.x=t,this.Frame.y=e,this.Frame.width=0,this.Frame.height=0,this.StartPoint={x:t,y:e},this.EndPoint={x:t,y:e},T3Gv.opt.WorkAreaHammer.off("dragstart"),T3Gv.opt.WorkAreaHammer.on("drag",EvtUtil.Evt_DrawTrackHandlerFactory(this)),T3Gv.opt.WorkAreaHammer.on("dragend",EvtUtil.Evt_DrawReleaseHandlerFactory(this))}catch(i){throw this.LMDrawClickExceptionCleanup(i),T3Gv.opt.ExceptionCleanup(i),i}}}class GroupSymbol extends BaseSymbol{constructor(t){(t=t||{}).ShapeType=OptConstant.ShapeType.GroupSymbol,t.flags=NvConstant.ObjFlags.ImageOnly,LogUtil.Debug("S.GroupSymbol - Input options:",t),super(t),LogUtil.Debug("S.GroupSymbol - GroupSymbol created")}CreateShape(t,e){if(LogUtil.Debug("S.GroupSymbol - CreateShape input:",{svgDocument:t,shapeOptions:e}),this.flags&NvConstant.ObjFlags.NotVisible)return LogUtil.Debug("S.GroupSymbol - CreateShape output:",null),null;this.GetFieldDataStyleOverride();const i=t.CreateShape(OptConstant.CSType.ShapeContainer);return LogUtil.Debug("S.GroupSymbol - CreateShape output:",i),i}PostCreateShapeCallback(t,e,i,n){if(LogUtil.Debug("S.GroupSymbol - PostCreateShapeCallback input:",{svgDocument:t,groupElement:e,eventSettings:i,extraFlags:n}),!(this.flags&NvConstant.ObjFlags.NotVisible)){let s=t.CreateShape(OptConstant.CSType.Group);s.SetID(OptConstant.SVGElementClass.Shape),e.AddElement(s);let a=this.Frame,o=a.width,r=a.height;e.SetSize(o,r),e.SetPos(a.x,a.y);let l,h=this.ShapesInGroup.length,c=null,u=null,d=0,p=null,g=(this.extraflags&OptConstant.ExtraFlags.FlipHoriz)>0,f=(this.extraflags&OptConstant.ExtraFlags.FlipVert)>0,m=g,v=f,b=0;null!=n&&((n&OptConstant.ExtraFlags.FlipHoriz)>0&&(m=!m),(n&OptConstant.ExtraFlags.FlipVert)>0&&(v=!v)),b=Utils2.SetFlag(b,OptConstant.ExtraFlags.FlipHoriz,m),b=Utils2.SetFlag(b,OptConstant.ExtraFlags.FlipVert,v);for(let e=0;e<h;++e){let i=this.ShapesInGroup[e];l=ObjectUtil$1.GetObjectPtr(i,!1),c=l.Dimensions,l.Dimensions=0,u=l.CreateShape(t),u&&(u.SetID(i),s.AddElement(u),l.PostCreateShapeCallback(t,u,null,b)),l.Dimensions=c,d=l.RotationAngle,l instanceof Instance.Shape.BaseShape&&(0!==d&&u.SetRotation(d),l.DataID>=0&&(m||v)&&(p=u.GetElementById(OptConstant.SVGElementClass.Text),p&&(m&&p.SetMirror(m),v&&p.SetFlip(v))))}s.SetSize(o,r),e.isShape=!0;let y=t.CreateShape(OptConstant.CSType.Rect);y.SetStrokeColor("white"),y.SetFillColor("none"),y.SetOpacity(0),y.SetStrokeWidth(5),i?y.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):y.SetEventBehavior(OptConstant.EventBehavior.None),e.AddElement(y),y.SetID(OptConstant.SVGElementClass.Slop),y.ExcludeFromExport(!0),y.SetSize(o,r),s.SetScale(o/this.InitialGroupBounds.width,r/this.InitialGroupBounds.height),g&&s.SetMirror(g),f&&s.SetFlip(f),-1!==this.DataID&&this.LMAddSVGTextObject(t,e),this.UpdateDimensionLines(e),this.AddIcons(t,e),this.ApplyEffects(e,!1,!1)}LogUtil.Debug("S.GroupSymbol - PostCreateShapeCallback output executed")}SetObjectStyle(t){if(LogUtil.Debug("S.GroupSymbol - SetObjectStyle input:",t),t.ImageURL&&""!==t.ImageURL)LogUtil.Debug("S.GroupSymbol - SetObjectStyle output: No changes applied since ImageURL exists");else{const e=T3Gv.opt.ApplyColorFilter(t,this,this.StyleRecord,this.colorfilter);T3Gv.opt.ApplyGroupProperties(e,this),LogUtil.Debug("S.GroupSymbol - SetObjectStyle output: Applied color filter and group properties")}}ChangeTextAttributes(t,e,i,n,s,a,o,r){let l,h;LogUtil.Debug("S.GroupSymbol - ChangeTextAttributes input:",{textContent:t,styleOptions:e,textAlignment:i,textRotation:n,textMargin:s,textPadding:a,parentElementOverride:o,forceUpdate:r});const c=this.ShapesInGroup,u=c.length;let d=!1;if(0!==u){let p,g;if(p=o||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID),p&&(g=p.GetElementById(OptConstant.SVGElementClass.Shape)),null!=g){this.AllowTextEdit()&&Instance.Shape.BaseSymbol.prototype.ChangeTextAttributes.call(this,t,e,i,n,s,a,g,r),e&&(void 0!==e.FontName&&(this.StyleRecord.Text.FontName=e.FontName),void 0!==e.FontId&&(this.StyleRecord.Text.FontId=e.FontId),void 0!==e.FontSize&&(this.StyleRecord.Text.FontSize=e.FontSize),void 0!==e.Face&&(this.StyleRecord.Text.Face=e.Face),void 0!==e.Color&&(this.StyleRecord.Text.Paint.Color=e.Color),void 0!==e.Opacity&&(this.StyleRecord.Text.Paint.Opacity=e.Opacity));for(let o=0;o<u;++o){let u=ObjectUtil$1.GetObjectPtr(c[o],!0);if(u&&0==(u.colorfilter&StyleConstant.ColorFilters.NCText)){let o=g.GetElementById(u.BlockID);l=u.Frame.height,h=u.Frame.width,u.ChangeTextAttributes(t,e,i,n,s,a,o,r),u.Frame.width===h&&u.Frame.height===l||(d=!0)}}if(d){ObjectUtil$1.AddToDirtyList(this.BlockID);const t=this.Frame.width/this.InitialGroupBounds.width,e=this.Frame.height/this.InitialGroupBounds.height;if(!isNaN(t)&&!isNaN(e)){const i=Utils1.DeepCopy(this.Frame);i.width=t*this.InitialGroupBounds.width,i.height=e*this.InitialGroupBounds.height,this.UpdateFrame(i)}}this.ConvertToNative(T3Gv.opt.richGradients,!1)}}LogUtil.Debug("S.GroupSymbol - ChangeTextAttributes output executed")}GetTextures(t){LogUtil.Debug("S.GroupSymbol - GetTextures input:",t);const e=this.ShapesInGroup.length;for(let i=0;i<e;i++){const e=ObjectUtil$1.GetObjectPtr(this.ShapesInGroup[i],!1);e&&e.GetTextures(t)}LogUtil.Debug("S.GroupSymbol - GetTextures output executed")}Resize(t,e,i){LogUtil.Debug("S.GroupSymbol - Resize input:",{svgElement:t,newDimensions:e,resizeInfo:i});const n=t.GetRotation(),s=Utils1.DeepCopy(this.prevBBox),a=Utils1.DeepCopy(e),o=T3Gv.opt.svgDoc.CalculateRotatedOffsetForResize(s,a,n);t.SetSize(e.width,e.height),t.SetPos(e.x+o.x,e.y+o.y);const r=t.GetElementById(OptConstant.SVGElementClass.Shape);r.SetSize(e.width,e.height),r.SetScale(e.width/this.InitialGroupBounds.width,e.height/this.InitialGroupBounds.height);return t.GetElementById(OptConstant.SVGElementClass.Slop).SetSize(e.width,e.height),this.LMResizeSVGTextObject(t,i,e),t.SetRotation(n),this.UpdateDimensionLines(t),LogUtil.Debug("S.GroupSymbol - Resize output:",o),o}CreateActionTriggers(t,e,i,n){LogUtil.Debug("S.GroupSymbol - CreateActionTriggers input:",{svgDocument:t,triggerType:e,shapeOptions:i,actionRequest:n});const s=this.BaseShapeCreateActionTriggers(t,e,i,n);return LogUtil.Debug("S.GroupSymbol - CreateActionTriggers output:",s),s}BaseShapeCreateActionTriggers(t,e,i,n){LogUtil.Debug("S.GroupSymbol - BaseShapeCreateActionTriggers input:",{svgDocument:t,triggerType:e,shapeOptions:i,actionRequest:n});const s=[CursorConstant.CursorType.ResizeLT,CursorConstant.CursorType.ResizeT,CursorConstant.CursorType.ResizeRT,CursorConstant.CursorType.ResizeR,CursorConstant.CursorType.ResizeRB,CursorConstant.CursorType.ResizeB,CursorConstant.CursorType.ResizeLB,CursorConstant.CursorType.ResizeL];let a=t.CreateShape(OptConstant.CSType.Group);const o=OptConstant.Common.KnobSize,r=OptConstant.Common.RKnobSize;let l=this.extraflags&OptConstant.ExtraFlags.SideKnobs&&this.dataclass===PolygonConstant.ShapeTypes.POLYGON;const h=OptConstant.Common.MinSidePointLength;let c=t.docInfo.docToScreenScale;t.docInfo.docScale<=.5&&(c*=2);const u=o/c,d=r/c;const p=this.Frame;let g=p.width,f=p.height;g+=u,f+=u;let m=Utils1.DeepCopy(p);m.x-=u/2,m.y-=u/2,m.width+=u,m.height+=u;let v=i.GetRotation()+22.5;v>=360&&(v=0);const b=Math.floor(v/45);let y=s.slice(b).concat(s.slice(0,b)),S=!0,x=!l,w=!l;switch(this.ObjGrow){case OptConstant.GrowBehavior.Horiz:S=!1,w=!1;break;case OptConstant.GrowBehavior.Vertical:S=!1,x=!1;break;case OptConstant.GrowBehavior.ProPortional:S=!0,x=!1,w=!1}let C={svgDoc:t,shapeType:OptConstant.CSType.Rect,x:0,y:0,knobSize:u,fillColor:"black",fillOpacity:1,strokeSize:1,strokeColor:"#777777",locked:!1,knobID:0,cursorType:""};if(e!==n&&(C.fillColor="white",C.strokeSize=1,C.strokeColor="black",C.fillOpacity=0),this.flags&NvConstant.ObjFlags.Lock?(C.fillColor="gray",C.locked=!0,l=!1):this.NoGrow()&&(C.fillColor="red",l=!1,C.strokeColor="red",y=[CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default,CursorConstant.CursorType.Default]),S){C.knobID=OptConstant.ActionTriggerType.TopLeft,C.cursorType=y[0];let t=this.GenericKnob(C);a.AddElement(t),C.x=g-u,C.y=0,C.cursorType=y[2],C.knobID=OptConstant.ActionTriggerType.TopRight,t=this.GenericKnob(C),a.AddElement(t),C.x=g-u,C.y=f-u,C.cursorType=y[4],C.knobID=OptConstant.ActionTriggerType.BottomRight,t=this.GenericKnob(C),a.AddElement(t),C.x=0,C.y=f-u,C.cursorType=y[6],C.knobID=OptConstant.ActionTriggerType.BottomLeft,t=this.GenericKnob(C),a.AddElement(t)}if(w){C.x=g/2-u/2,C.y=0,C.cursorType=y[1],C.knobID=OptConstant.ActionTriggerType.TopCenter;let t=this.GenericKnob(C);a.AddElement(t),C.x=g/2-u/2,C.y=f-u,C.cursorType=y[5],C.knobID=OptConstant.ActionTriggerType.BottomCenter,t=this.GenericKnob(C),a.AddElement(t)}if(x){C.x=0,C.y=f/2-u/2,C.cursorType=y[7],C.knobID=OptConstant.ActionTriggerType.CenterLeft;let t=this.GenericKnob(C);a.AddElement(t),C.x=g-u,C.y=f/2-u/2,C.cursorType=y[3],C.knobID=OptConstant.ActionTriggerType.CenterRight,t=this.GenericKnob(C),a.AddElement(t)}const T=function(t){let e=null;if(t.hooks.length){const i=ObjectUtil$1.GetObjectPtr(t.hooks[0].objid,!1);(i&&i.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Connector||i&&i instanceof Instance.Shape.ShapeContainer)&&(e=i.PrGetShapeConnectorInfo(t.hooks[0]))}return e}(this);if(T&&T.length){const e={svgDoc:t,iconSize:14,imageURL:null,iconID:0,userData:0,cursorType:0,x:0,y:0};for(let t=0,i=T.length;t<i;t++){"right"===T[t].position?e.x=g-14-1-u:"bottom"===T[t].position?e.y=f-14-1-u:(e.x=u+1,e.y=u+1),e.cursorType=T[t].cursorType,e.iconID=T[t].knobID,e.imageURL="vertical"===T[t].polyType?OptConstant.Common.ConMoveVerticalPath:OptConstant.Common.ConMoveHorizontalPath,e.userData=T[t].knobData;let i=this.GenericIcon(e);a.AddElement(i),e.x+=16}}if(l){let t=Utils1.DeepCopy(this);t.inside=Utils1.DeepCopy(t.Frame);let e=T3Gv.opt.ShapeToPolyLine(this.BlockID,!1,!0,t).GetPolyPoints(OptConstant.Common.MaxPolyPoints,!0,!0,!1,[]);if(e)for(let i=1,n=e.length;i<n;i++){const t=e[i].x-e[i-1].x,n=e[i].y-e[i-1].y;if(Utils2.Sqrt(t*t+n*n)>h){C.cursorType=t*t>n*n?CursorConstant.CursorType.ResizeTB:CursorConstant.CursorType.ResizeLR,C.x=e[i-1].x+t/2,C.y=e[i-1].y+n/2;let s=this.GenericKnob(C);s.SetUserData(i),a.AddElement(s)}}}const D=this.NoRotate()||this.NoGrow()||C.locked,k=p.width<44;let $=this.hooks.length>0;if($){const t=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1);t&&t.DrawingObjectBaseClass!==OptConstant.DrawObjectBaseClass.Connector&&($=!1)}if(!D&&!k&&!$){const t=this.TextGrow===NvConstant.TextGrowBehavior.Horizontal&&this.flags&NvConstant.ObjFlags.TextOnly&&ShapeUtil.TextAlignToWin(this.TextAlign).just===TextConstant.TextJust.Left;C.shapeType=OptConstant.CSType.Oval,C.x=t?g+d:g-3*d,C.y=f/2-d/2,C.cursorType=CursorConstant.CursorType.Rotate,C.knobID=OptConstant.ActionTriggerType.Rotate,C.fillColor="white",C.fillOpacity=.001,C.strokeSize=1.5,C.strokeColor="black";let e=this.GenericKnob(C);a.AddElement(e)}if(this.Dimensions&NvConstant.DimensionFlags.Standoff&&this.CanUseStandOffDimensionLines()){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);this.CreateDimensionAdjustmentKnobs(a,t,C)}return a.SetSize(g,f),a.SetPos(m.x,m.y),a.isShape=!0,a.SetID(OptConstant.Common.Action+e),LogUtil.Debug("S.GroupSymbol - BaseShapeCreateActionTriggers output:",a),a}ContainsText(){if(LogUtil.Debug("S.GroupSymbol - ContainsText input:",{DataID:this.DataID,BlockID:this.BlockID,ShapesCount:this.ShapesInGroup.length}),this.DataID>=0)return LogUtil.Debug("S.GroupSymbol - ContainsText output:",!1),!1;for(let t=0;t<this.ShapesInGroup.length;t++){if(ObjectUtil$1.GetObjectPtr(this.ShapesInGroup[t],!1).ContainsText())return LogUtil.Debug("S.GroupSymbol - ContainsText output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - ContainsText output:",!1),!1}ConvertToNative(t,e){let i;LogUtil.Debug("S.GroupSymbol - ConvertToNative input:",{richGradients:t,shouldReturnBuffer:e});const n=new WResult;n.richGradients=t;const s=this.ShapesInGroup.length;if(s>0){for(let e=0;e<s;e++){const t=this.ShapesInGroup[e];n.zList.push(t);const i=ObjectUtil$1.GetObjectPtr(t,!1);i.layer=this.Layer,i.GetTextures(n.TextureList)}n.sdp=ObjectUtil$1.GetObjectPtr(T3Gv.opt.sdDataBlockId,!1),n.tLMB=ObjectUtil$1.GetObjectPtr(T3Gv.opt.layersManagerBlockId,!1),n.ctp=T3Gv.opt.header,n.GroupOffset.x=0,n.GroupOffset.y=0,n.WriteGroupBlock=!0,n.fontlist=T3Gv.opt.header.FontList,T3Gv.docUtil.svgDoc.GetWorkArea(),n.docDpi=T3Gv.docUtil.svgDoc.docInfo.docDpi;const t=ShapeUtil.WriteBuffer(n,!0,!0,!0);if(!0===e)return LogUtil.Debug("S.GroupSymbol - ConvertToNative output:",t),t;let a=null;t&&(a=new Uint8Array(t),this.NativeID>=0?(i=T3Gv.stdObj.PreserveBlock(this.NativeID),i&&(i.Data=a)):(i=T3Gv.stdObj.CreateBlock(StateConstant.StoredObjectType.HNativeObject,a),this.NativeID=i.ID)),LogUtil.Debug("S.GroupSymbol - ConvertToNative output:",{preservedBlock:i})}else LogUtil.Debug("S.GroupSymbol - ConvertToNative output: No shapes in group")}DeleteObject(){LogUtil.Debug("S.GroupSymbol - DeleteObject input: none");const t=this.ShapesInGroup,e=t.length;for(let i=0;i<e;i++){const e=ObjectUtil$1.GetObjectPtr(t[i],!1);if(e){const n=T3Gv.stdObj.GetObject(t[i]);e.DeleteObject(),n&&n.Delete()}}this.BaseDrawObjectDeleteObject(),LogUtil.Debug("S.GroupSymbol - DeleteObject output: deleted")}BaseDrawObjectDeleteObject(){LogUtil.Debug("S.GroupSymbol - BaseDrawObjectDeleteObject input: none");let t=null,e=null,i=null,n=[];-1!==this.DataID&&(t=T3Gv.stdObj.GetObject(this.DataID),t&&t.Delete()),-1!==this.NoteID&&(t=T3Gv.stdObj.GetObject(this.NoteID),t&&t.Delete()),-1!==this.NativeID&&(t=T3Gv.stdObj.GetObject(this.NativeID),t&&t.Delete()),-1!==this.BlobBytesID&&(t=T3Gv.stdObj.GetObject(this.BlobBytesID),t&&t.Delete(),OptCMUtil.IsBlobURL(this.ImageURL)&&OptCMUtil.DeleteURL(this.ImageURL)),-1!==this.EMFBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.EMFBlobBytesID),t&&t.Delete()),-1!==this.OleBlobBytesID&&(t=T3Gv.stdObj.GetObject(this.OleBlobBytesID),t&&t.Delete()),this.BaseDrawObjectRemoveFieldData(!0),this.hooks.length&&(e=ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1),!e||e.objecttype!==NvConstant.FNObjectTypes.FlWall||e.Dimensions&NvConstant.DimensionFlags.HideHookedObjDimensions||(n=Utils1.DeepCopy(this.hooks),this.hooks=[],i=T3Gv.opt.svgObjectLayer.GetElementById(e.BlockID),e.UpdateDimensionLines(i),this.hooks=n)),LogUtil.Debug("S.GroupSymbol - BaseDrawObjectDeleteObject output: executed")}BaseDrawObjectRemoveFieldData(t,e){LogUtil.Debug("S.GroupSymbol - BaseDrawObjectRemoveFieldData input:",{shouldRemove:t,fieldDataTableId:e}),!this.HasFieldData()||e&&this.fieldDataTableID!==e||(ObjectUtil$1.GetObjectPtr(this.BlockID,!0),t&&(this.fieldDataElemID<0?TODO.STData.DeleteFieldedDataTable(this.fieldDataTableID):TODO.STData.FieldedDataDelRecord(this.fieldDataTableID,this.fieldDataElemID)),this.fieldDataDatasetID=-1,this.fieldDataTableID=-1,this.fieldDataElemID=-1,this.dataStyleOverride=null,ObjectUtil$1.AddToDirtyList(this.BlockID),this.BaseDrawObjectRefreshFromFieldData()),LogUtil.Debug("S.GroupSymbol - BaseDrawObjectRemoveFieldData output executed")}BaseDrawObjectRefreshFromFieldData(t){if(LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData input:",{tableId:t}),t&&this.fieldDataTableID!==t)return LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData output:",!1),!1;const e=this.HasFieldDataInText(t),i=this.HasFieldDataRules(t);let n=!1;return e||i?(this.GetFieldDataStyleOverride(),e&&(this.ChangeTextAttributes(null,null,null,null,null,null,null,!0),n=!0),TODO.STData.FieldedDataHasRulesForRecord(this.fieldDataTableID,this.fieldDataElemID)&&(ObjectUtil$1.AddToDirtyList(this.BlockID),n=!0),LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData output:",n),n):(LogUtil.Debug("S.GroupSymbol - BaseDrawingObject_RefreshFromFieldData output:",!1),!1)}ApplyEffects(t,e,i){if(LogUtil.Debug("S.GroupSymbol - ApplyEffects input:",{svgElement:t,isHighlighted:e,extraParam:i}),!(t=t||T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID)))return void LogUtil.Debug("S.GroupSymbol - ApplyEffects output: No SVG element found");if(!T3Gv.opt.bDrawEffects||T3Gv.opt.bTokenizeStyle)return void LogUtil.Debug("S.GroupSymbol - ApplyEffects output: Global flags disable effects");const n=t.shapeGroup||t,s=[];let a=null,o=4;e?a="#FFD64A":this.collabGlowColor?(a=this.collabGlowColor,o=6):this.dataStyleOverride&&this.dataStyleOverride.glowColor&&(a=this.dataStyleOverride.glowColor),a?(s.push({type:BConstant.EffectType.GLOW,params:{color:a,size:o,asSecondary:!0}}),n.Effects().SetEffects(s,this.Frame),LogUtil.Debug("S.GroupSymbol - ApplyEffects output:","Effects applied with glowColor",a)):LogUtil.Debug("S.GroupSymbol - ApplyEffects output: No glow color configured")}AllowTextEdit(){LogUtil.Debug("S.GroupSymbol - AllowTextEdit input:",{});const t=Boolean(this.TextFlags&NvConstant.TextFlags.AttachB||this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachD||this.DataID>=0);return LogUtil.Debug("S.GroupSymbol - AllowTextEdit output:",t),t}RemoveFieldData(t,e){LogUtil.Debug("S.GroupSymbol - RemoveFieldData input:",{fieldKey:t,fieldValue:e}),Instance.Shape.BaseSymbol.prototype.RemoveFieldData.call(this,t,e);const i=this.ShapesInGroup,n=i.length;for(let s=0;s<n;s++){const n=ObjectUtil$1.GetObjectPtr(i[s],!1);n&&n.RemoveFieldData(t,e)}LogUtil.Debug("S.GroupSymbol - RemoveFieldData output executed")}HasFieldDataInText(t){LogUtil.Debug("S.GroupSymbol - HasFieldDataInText input:",{fieldData:t});const e=this.ShapesInGroup,i=e.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataInText.call(this,t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataInText output:",!0),!0;for(let n=0;n<i;++n){const i=ObjectUtil$1.GetObjectPtr(e[n],!1);if(i&&i.HasFieldDataInText(t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataInText output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataInText output:",!1),!1}HasFieldDataRules(t){LogUtil.Debug("S.GroupSymbol - HasFieldDataRules input:",{criteria:t});const e=this.ShapesInGroup,i=e.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataRules.call(this,t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRules output:",!0),!0;for(let n=0;n<i;n++){const i=ObjectUtil$1.GetObjectPtr(e[n],!1);if(i&&i.HasFieldDataRules(t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRules output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataRules output:",!1),!1}HasFieldDataForTable(t){LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable input:",{tableId:t});const e=this.ShapesInGroup,i=e.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataForTable.call(this,t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable output:",!0),!0;for(let n=0;n<i;n++){const i=ObjectUtil$1.GetObjectPtr(e[n],!1);if(i&&i.HasFieldDataForTable(t))return LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataForTable output:",!1),!1}HasFieldDataRecord(t,e,i){LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord input:",{fieldKey:t,fieldValue:e,recordId:i});const n=this.ShapesInGroup,s=n.length;if(Instance.Shape.BaseSymbol.prototype.HasFieldDataRecord.call(this,t,e,i))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!0),!0;if(!i)return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!1),!1;for(let a=0;a<s;++a){const s=ObjectUtil$1.GetObjectPtr(n[a],!1);if(s&&s.HasFieldDataRecord(t,e,i))return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!0),!0}return LogUtil.Debug("S.GroupSymbol - HasFieldDataRecord output:",!1),!1}RefreshFromFieldData(t){LogUtil.Debug("S.GroupSymbol - refreshFromFieldData input:",t);let e=!1;return Instance.Shape.BaseSymbol.prototype.RefreshFromFieldData.call(this,t)&&(e=!0),this.HasFieldDataInText(t)&&(this.GetFieldDataStyleOverride(),this.ChangeTextAttributes(null,null,null,null,null,null,null,!0),e=!0),this.HasFieldDataRules(t)&&(ObjectUtil$1.AddToDirtyList(this.BlockID),e=!0),LogUtil.Debug("S.GroupSymbol - refreshFromFieldData output:",e),e}RemapDataFields(t){LogUtil.Debug("S.GroupSymbol - remapDataFields input:",t),Instance.Shape.BaseSymbol.prototype.RemapDataFields.call(this,t);const e=this.ShapesInGroup;for(let i=0;i<e.length;i++){const n=ObjectUtil$1.GetObjectPtr(e[i],!1);n&&n.RemapDataFields(t)}LogUtil.Debug("S.GroupSymbol - remapDataFields output: completed")}}class ContainerListShape{constructor(){this.id=-1,this.pt={x:0,y:0},this.extra=0}}class ShapeContainer extends Rect$1{constructor(t){LogUtil.Debug("= S.ShapeContainer constructor - Input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.Rect,super(t),this.dataclass=t.dataclass||PolygonConstant.ShapeTypes.RECTANGLE,this.ContainerList=t.ContainerList||new Instance.Shape.ContainerList,this.objecttype=NvConstant.FNObjectTypes.ShapeContainer,this.nativeDataArrayBuffer=t.nativeDataArrayBuffer||null,this.SymbolData=t.SymbolData||null,LogUtil.Debug("= S.ShapeContainer constructor - Output:",{ShapeType:t.ShapeType,dataclass:this.dataclass,ContainerList:this.ContainerList,objecttype:this.objecttype,nativeDataArrayBuffer:this.nativeDataArrayBuffer,SymbolData:this.SymbolData})}IsShapeContainer(t,e){LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Input:",{shapeToCheck:t,hookPoint:e});const i=NvConstant.ContainerListFlags;if(null==t)return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1;if(t.ParentFrameID>=0&&ObjectUtil$1.GetObjectPtr(t.ParentFrameID,!1))return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1;if(t.flags&NvConstant.ObjFlags.TextOnly)return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1;if(t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape){const n=this.ContainerList,s=n.flags&i.Sparse;let a;return e&&(s||n.Arrangement!==NvConstant.ContainerListArrangements.Row?e.id=OptConstant.HookPts.KCT:(e.x-=t.Frame.width/2,e.y+=t.Frame.height/2,e.id=OptConstant.HookPts.KCL)),a=n.flags&i.AllowOnlyContainers?t instanceof ShapeContainer:!(n.flags&i.AllowOnlyNonContainers)||!(t instanceof ShapeContainer),LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",a),a}return LogUtil.Debug("= S.ShapeContainer IsShapeContainer - Output:",!1),!1}CreateConnectHilites(t,e,i,n,s,a){LogUtil.Debug("= S.ShapeContainer CreateConnectHilites - Input:",{connectEvent:t,targetObject:e,highlightOptions:i,sourceShape:n,connectionType:s,additionalContext:a});const o={active:!0,eventDetails:t,targetDetails:e,optionsPassed:i,additionalData:{param1:n,param2:s,param3:a}};return LogUtil.Debug("= S.ShapeContainer CreateConnectHilites - Output:",o),o}GetBestHook(t,e,i){LogUtil.Debug("= S.ShapeContainer GetBestHook - Input:",{connectionEvent:t,proposedHook:e,contextData:i});const n=e;return LogUtil.Debug("= S.ShapeContainer GetBestHook - Output:",n),n}GetTargetPoints(t,e,i){LogUtil.Debug("= S.ShapeContainer GetTargetPoints - Input:",{options:t,filterCriteria:e,renderContext:i});const n=[],s=this.ContainerList,a=s.List,o=a.length,r=OptConstant.Common.DimMax;let l={x:r/2,y:0};const h=s.flags&NvConstant.ContainerListFlags.Sparse,c=this.PrGetContainerFrame().frame.width;let u=s.ndown,d=s.nacross;if(h){for(let t=0;t<=u;t++)for(let e=-1;e<=d;e++)l=new Point$1(e,t),n.push(l);return LogUtil.Debug("= S.ShapeContainer GetTargetPoints - Output:",n),n}if(s.Arrangement===NvConstant.ContainerListArrangements.Column){o>0&&(l.x=a[0].pt.x/c*r),n.push(l);for(let t=0;t<o;t++){const e=a[t].pt.x/c*r,i=new Point$1(e,t+1);n.push(i)}}else{l.x=s.HorizontalSpacing,l.y=0,o>0&&(l.x=0),n.push(l);for(let t=0;t<o;t++){const e=a[t].pt.y/c*r,i=new Point$1(e,t+1);n.push(i)}}return LogUtil.Debug("= S.ShapeContainer GetTargetPoints - Output:",n),n}PrGetContainerFrame(){LogUtil.Debug("= S.ShapeContainer PrGetContainerFrame - Input:",{trect:this.trect});const t={frame:Utils1.DeepCopy(this.trect),StartY:0};return LogUtil.Debug("= S.ShapeContainer PrGetContainerFrame - Output:",t),t}GetHitTestFrame(t){LogUtil.Debug("= S.ShapeContainer GetHitTestFrame - Input:",{target:t});const e={},i=this.ContainerList,n=i.flags&NvConstant.ContainerListFlags.Sparse;return Utils2.CopyRect(e,this.r),t&&t.DrawingObjectBaseClass===OptConstant.DrawObjectBaseClass.Shape&&(n?(e.width+=i.HorizontalSpacing+i.childwidth,e.x-=i.HorizontalSpacing+i.childwidth/2):e.width+=i.HorizontalSpacing+t.Frame.width/2,e.height+=2*i.VerticalSpacing),LogUtil.Debug("= S.ShapeContainer GetHitTestFrame - Output:",e),e}AllowDoubleClick(){LogUtil.Debug("= S.ShapeContainer AllowDoubleClick - Input:",{});const t=!!(this.ContainerList.flags&NvConstant.ContainerListFlags.Sparse);return LogUtil.Debug("= S.ShapeContainer AllowDoubleClick - Output:",t),t}DoubleClick(t,e){LogUtil.Debug("= S.ShapeContainer DoubleClick - Input:",{event:t,target:e});const i=this.ContainerList,n=i.List,s=n.length;let a,o,r=0,l=0,h=null;const c=t=>{let e=0;for(let s=0;s<i.ndown;s++){const a=s*i.nacross+t;let o;if(n[a].id>=0){const t=ObjectUtil$1.GetObjectPtr(n[a].id,!1);if(!t)continue;o=t.Frame.width}else o=i.childwidth;o>e&&(e=o)}return e+2*i.HorizontalSpacing};if(i.flags&NvConstant.ContainerListFlags.Sparse){if(e)r=e.Data.row,l=e.Data.col,a=!0,o=Utils1.DeepCopy(e.Data.theNewPoint);else{if(a=!1,o=T3Gv.opt.svgDoc.ConvertWindowToDocCoords(t.gesture.center.clientX,t.gesture.center.clientY),o=Utils1.DeepCopy(o),o.x-=this.Frame.x,o.y-=this.Frame.y,(this.TextFlags&NvConstant.TextFlags.AttachA||this.TextFlags&NvConstant.TextFlags.AttachB)&&(o.y<10||o.y>this.Frame.height-10)){const e=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);return LogUtil.Debug("= S.ShapeContainer DoubleClick - Output: activating text edit."),void TextUtil.ActivateTextEdit(e.svgObj.SDGObj,t)}const e=this.GetTargetPoints(),s=this.GetPerimPts(null,e,null,!0,null,1);let h=Number.MAX_VALUE,u=-1;for(let t=0;t<s.length;t++){const e=s[t].x-o.x,i=s[t].y-o.y,n=e*e+i*i;n<h&&(h=n,u=t)}if(u>=0)l=e[u].x,r=e[u].y,a=!0;else{let t=!1;for(let s=1;s<i.ndown;s++){const e=s*i.nacross;if(n[e].pt.y>o.y){r=s-1,t=!0;break}}t||(r=i.ndown-1);let e=!1;for(let s=1;s<i.nacross;s++)if(n[s].pt.x>o.x){e=!0;const t=c(s-1),i=n[s-1].pt.x+t/2;l=o.x<i?s-1:s;break}e||(l=i.nacross-1),a=n[i.nacross*r+l].id<0}}if(a){let t;if(e)t=e.Data.closest;else{t=((t,e)=>{let a=-1;if(i.Arrangement===NvConstant.ContainerListArrangements.Column){if(e<=i.nacross&&(e=i.nacross-1)<0)return-1;for(let s=0;s<i.ndown;s++){const o=s*i.nacross+e;if(o<n.length&&n[o].id>=0){if(!(s<t))return a<0?n[o].id:a;a=n[o].id}}}else for(let s=0;s<i.nacross;s++){if(t<=i.ndown&&(t=i.ndown-1)<0)return-1;const o=t*i.nacross+s;if(o<n.length&&n[o].id>=0){if(!(s<e))return a<0?n[o].id:a;a=n[o].id}}if(a<0)for(let i=0;i<s;i++)if(n[i].id>=0)return n[i].id;return a})(r,l)}if(t<0){h=e?e.Data.SymbolID:"currentSymbolId";const t=T3Gv.baseOpt.AddSymbol(h),n=ObjectUtil$1.GetObjectPtr(t,!0),s=i.childwidth,a=i.childheight,r={x:o.x,y:o.y,width:s,height:a};n.UpdateFrame(r),n.sizedim.width=s,n.sizedim.height=a,ObjectUtil$1.AddToDirtyList(t)}else{const e=T3Gv.baseOpt.DuplicateShape(t,!0,!1);ObjectUtil$1.AddToDirtyList(e)}const a={x:l,y:r},c=OptConstant.HookPts.KCT,u=[];HookUtil.UpdateHook(t<0?h:t,-1,this.BlockID,c,a,null),u.push(t<0?h:t),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move),DrawUtil.CompleteOperation(u)}}LogUtil.Debug("= S.ShapeContainer DoubleClick - Output:",{event:t,target:e})}NoRotate(){LogUtil.Debug("= S.ShapeContainer NoRotate - Input:",{});return LogUtil.Debug("= S.ShapeContainer NoRotate - Output:",true),true}FieldDataAllowed(){LogUtil.Debug("= S.ShapeContainer FieldDataAllowed - Input:",{thisContext:this});return LogUtil.Debug("= S.ShapeContainer FieldDataAllowed - Output:",true),true}GetPerimPts(t,e,i,n,s,a){LogUtil.Debug("= S.ShapeContainer GetPerimPts - Input:",{hookPoint:t,targetPoints:e,hookType:i,considerLayout:n,additionalContext:s,pointIndex:a});const o=[],r=this.ContainerList,l=r.List,h=l.length,c=OptConstant.Common.DimMax,u=NvConstant.ContainerListArrangements,d=!!(r.flags&NvConstant.ContainerListFlags.Sparse);1===e.length&&this.flags&NvConstant.ObjFlags.Obj1&&this.PrFormat();const p=this.PrGetContainerFrame(),g=p.frame;if(r.VerticalSpacing,p.StartY,1===e.length&&a<0){let t,n;i===OptConstant.HookPts.KCTL?(t=g.x,n=g.y):i===OptConstant.HookPts.KCL?(t=g.x,n=g.y+g.height/2):(t=g.x+g.width/2,n=g.y);const s=new Point$1(t,n);return null!=e[0].id&&(s.id=e[0].id),o.push(s),LogUtil.Debug("= S.ShapeContainer GetPerimPts - Output (single point):",o),o}if(d&&a>=0){for(let t=0;t<e.length;t++){let i,n=0,s=0;e[t].y<r.ndown?e[t].x<0?(i=e[t].y*r.nacross,s=l[i].pt.y,n=-r.childwidth/2):e[t].x<r.nacross?(i=e[t].y*r.nacross+e[t].x,s=l[i].pt.y,n=l[i].pt.x):(i=e[t].y*r.nacross+r.nacross-1,s=l[i].pt.y,n=r.width+(e[t].x-r.nacross)*r.childwidth+r.childwidth/2,n>g.width-r.HorizontalSpacing/2&&(n=g.width-r.HorizontalSpacing/2)):(s=r.height+(e[t].y-r.ndown)*r.childheight+r.VerticalSpacing,s>g.height-r.VerticalSpacing/2&&(s=g.height-r.VerticalSpacing/2),e[t].x<0?(i=e[t].y*r.nacross,n=-r.childwidth/2):e[t].x<r.nacross?(i=e[t].y>=r.ndown?(r.ndown-1)*r.nacross+e[t].x:(e[t].y-1)*r.nacross+e[t].x,n=l[i].pt.x):(n=r.width+(e[t].x-r.nacross)*r.childwidth+r.childwidth/2,n>g.width-r.HorizontalSpacing/2&&(n=g.width-r.HorizontalSpacing/2)));const a=new Point$1(n+g.x,s+g.y);o.push(a)}return LogUtil.Debug("= S.ShapeContainer GetPerimPts - Output (sparse):",o),o}for(let f=0;f<e.length;f++){let t=e[f].y,n=0,s=0;if(r.Arrangement===u.Column?n=e[f].x/c*g.width:s=e[f].x/c*g.height,t<h)s=l[t].pt.y,n=l[t].pt.x;else if(0===h)r.Arrangement===u.Column?s=r.VerticalSpacing:(n=r.HorizontalSpacing,s=this.Frame.height/2);else{t=h-1;const e=ObjectUtil$1.GetObjectPtr(l[t].id,!1);if(r.Arrangement===u.Row){if(n=r.width,s=l[t].pt.y,e){const i=l[t].pt.x+e.Frame.width+r.HorizontalSpacing;n=i>r.width?r.width:i}}else{if(s=r.height,e){s=l[t].pt.y+e.Frame.height+r.VerticalSpacing}n=l[t].pt.x}}i===OptConstant.HookPts.KAT&&(s=0);const a=new Point$1(n+g.x,s+g.y);null!=e[f].id&&(a.id=e[f].id),e.length>1&&(r.Arrangement===u.Column?a.y-=r.VerticalSpacing/2:a.x-=r.HorizontalSpacing/2),o.push(a)}return LogUtil.Debug("= S.ShapeContainer GetPerimPts - Output:",o),o}PrFormat(t){LogUtil.Debug("= S.ShapeContainer PrFormat - Input:",{skipSizeUpdate:t});const e=this.ContainerList,i=e.List,n=i.length;let s=0;e.VerticalSpacing;const a=NvConstant.ContainerListArrangements,o=this;let r=0;const l=Boolean(e.flags&NvConstant.ContainerListFlags.Sparse),h=Boolean(e.flags&NvConstant.ContainerListFlags.LeftChanged),c=Boolean(e.flags&NvConstant.ContainerListFlags.TopChanged);e.flags=Utils2.SetFlag(e.flags,NvConstant.ContainerListFlags.LeftChanged,!1),e.flags=Utils2.SetFlag(e.flags,NvConstant.ContainerListFlags.TopChanged,!1);const u=function(t,s,a){let l=t,h=e.VerticalSpacing+r,c=e.Wrap,u=0,d=0;for(;l<n;l++){h+=i[l].extra,i[l].pt={x:s,y:h};const t=ObjectUtil$1.GetObjectPtr(i[l].id,!1);if(t&&(t.Frame.y!==h&&OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),t.Frame.width>d&&(d=t.Frame.width),h+=t.Frame.height+e.VerticalSpacing,u++),c>0&&u>=c)break}d+=2*e.HorizontalSpacing,d<e.MinWidth&&(d=e.MinWidth);let p=d;a&&p<a.width&&(p=a.width);let g=!1;for(let e=t;e<l;e++){i[e].pt.x+=p/2;const t=ObjectUtil$1.GetObjectPtr(i[e].id,!1);t&&t.Frame.x+t.Frame.width/2!==o.Frame.x+i[e].pt.x&&(OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),g=!0)}return g&&OptCMUtil.SetLinkFlag(o.BlockID,DSConstant.LinkFlags.Move),{start:l,colwidth:p,top:h}},d=function(t,s,a,r){let l=t,h=e.HorizontalSpacing,c=e.Wrap,u=0,d=0,p=a;for(;l<n;l++){h+=i[l].extra,i[l].pt={x:h,y:p};const t=ObjectUtil$1.GetObjectPtr(i[l].id,!1);let n,s;if(t?(t.Frame.y/2!==p&&OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),n=t.Frame.width,s=t.Frame.height):(n=e.childwidth,s=e.childheight),s>d&&(d=s),h+=n+e.HorizontalSpacing,u++,c>0&&u>=c)break}d+=2*e.VerticalSpacing,d<e.MinHeight&&(d=e.MinHeight);let g=d;r&&g<r.height&&(g=r.height);let f=!1;for(let e=t;e<l;e++){i[e].pt.y+=g/2;const t=ObjectUtil$1.GetObjectPtr(i[e].id,!1);t&&t.Frame.y+t.Frame.height/2!==s.y+i[e].pt.y&&(OptCMUtil.SetLinkFlag(t.BlockID,DSConstant.LinkFlags.Move),f=!0)}return f&&OptCMUtil.SetLinkFlag(o.BlockID,DSConstant.LinkFlags.Move),{start:l,rowht:g,left:h}},p=this.PrGetContainerFrame(),g=p.frame;r=p.StartY;let f,m=0,v=e.VerticalSpacing+r,b=0,y=v;if(l){const t=function(t){let i=t,n=[],s=[];for(let a=0;a<e.ndown;a++)for(let t=0;t<e.nacross;t++){const i=a*e.nacross+t,o=e.List[i];null==o.id&&(o.id=-1);const r=ObjectUtil$1.GetObjectPtr(o.id,!1),l=r?r.Frame.width:e.childwidth,h=r?r.Frame.height:e.childheight;(null==n[t]||n[t]<l)&&(n[t]=l),(null==s[a]||s[a]<h)&&(s[a]=h)}for(let a=0;a<e.ndown;a++){let t=e.HorizontalSpacing;for(let s=0;s<e.nacross;s++){const o=a*e.nacross+s,r=e.List[o];r.pt.x=t+n[s]/2,r.pt.y=i,t+=n[s]+e.HorizontalSpacing}i+=s[a]+e.VerticalSpacing}return{left:0,top:i}}(v);b=t.left,y=t.top}else switch(e.Arrangement){case a.Column:for(;m<n;)f=u(m,s,null),m=f.start,b+=f.colwidth,s+=f.colwidth,m<n&&(b-=e.HorizontalSpacing,s-=e.HorizontalSpacing),f.top>y&&(y=f.top);break;case a.Row:for(;m<n;)v-=e.VerticalSpacing,f=d(m,g,v,null),m=f.start,y+=f.rowht,v+=f.rowht,f.left>b&&(b=f.left)}if(!t){e.width=b,y+=r,e.height=y,b<e.MinWidth&&(b=e.MinWidth),y<e.MinHeight&&(y=e.MinHeight);let t=b-g.width,i=y-g.height;Utils2.IsEqual(i,0,1)&&(i=0),Utils2.IsEqual(t,0,1)&&(t=0);let n=0,s=0;if(t||i){t&&(g.width=b,n=h?-t:t),i&&(g.height=y,s=c?-i:i),this.TRectToFrame(g,!0),ObjectUtil$1.AddToDirtyList(this.BlockID);const e=this.hooks.length?ObjectUtil$1.GetObjectPtr(this.hooks[0].objid,!1):null;e&&e instanceof ShapeContainer&&(e.flags=Utils2.SetFlag(e.flags,NvConstant.ObjFlags.Obj1,!0),OptCMUtil.SetLinkFlag(e.BlockID,DSConstant.LinkFlags.Move)),(n||s)&&this.OffsetShape(n,s)}this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!1)}LogUtil.Debug("= S.ShapeContainer PrFormat - Output:",{ContainerList:e})}OnConnect(t,e,i,n,s){if(LogUtil.Debug("= S.ShapeContainer OnConnect - Input:",{connectionId:t,targetObject:e,connectionAnchor:i,connectionReference:n,additionalInfo:s}),e instanceof ShapeContainer&&(null==this.zListIndex||this.zListIndex<0)){const e=T3Gv.opt.svgObjectLayer.GetElementById(t);e&&(this.zListIndex=T3Gv.opt.svgObjectLayer.GetElementIndex(e),T3Gv.opt.svgObjectLayer.MoveElementToFront(e))}LogUtil.Debug("= S.ShapeContainer OnConnect - Output:",{zListIndex:this.zListIndex})}PrGetShapeConnectorInfo(t){LogUtil.Debug("= S.ShapeContainer PrGetShapeConnectorInfo - Input:",{eventData:t});const e=this.ContainerList,i=e.flags&NvConstant.ContainerListFlags.Sparse,n=e.flags&NvConstant.ContainerListFlags.Adjust,s=[],a=OptConstant.ActionTriggerType;if(i||!n)return LogUtil.Debug("= S.ShapeContainer PrGetShapeConnectorInfo - Output:",null),null;const o=e.Arrangement===NvConstant.ContainerListArrangements.Row?{knobID:a.ContainerAdj,cursorType:CursorConstant.CursorType.ResizeR,knobData:0,hook:t.hookpt,polyType:"horizontal"}:{knobID:a.ContainerAdj,cursorType:CursorConstant.CursorType.ResizeB,knobData:0,hook:t.hookpt,polyType:"vertical"};return s.push(o),LogUtil.Debug("= S.ShapeContainer PrGetShapeConnectorInfo - Output:",s),s}GetListOfEnclosedObjects(t){LogUtil.Debug("= S.ShapeContainer GetListOfEnclosedObjects - Input:",t);const e=[];return LogUtil.Debug("= S.ShapeContainer GetListOfEnclosedObjects - Output:",e),e}ChangeTarget(t,e,i,n,s,a){LogUtil.Debug("= S.ShapeContainer ChangeTarget - Input:",{changeEvent:t,targetShapeId:e,connectionAnchor:i,boundingRect:n,gridPosition:s,shouldAttach:a});const o=(t,e)=>{const i=h.List,n=i.length,s=new ContainerListShape;if(s.id=t,e>=n)i.push(s);else{const t=i[e].extra;i[e].extra=0,s.extra=t,i.splice(e,0,s)}},r=t=>{const e=h.List,i=e.length;let n=-1;for(let s=0;s<i;s++)if(e[s].id===t){n=s;break}n>=0&&e.splice(n,1)},l=(t,e)=>{const i=h,n=i.List;let s=0,a=0;const o=[],r=[];for(let h=0;h<i.ndown;h++)for(let e=0;e<i.nacross;e++){const s=n[i.nacross*h+e];s.id===t&&(s.id=-1),s.id>=0&&(o[e]=!0,r[h]=!0)}let l=-1;for(let h=0;h<i.nacross;h++)!0===o[h]&&l<0&&(l=h);let c=-1;for(let h=i.nacross-1;h>=0;h--)!0===o[h]&&c<0&&(c=h);let u=-1;null==r[0]&&e&&0===e.y&&(r[0]=!0);for(let h=0;h<i.ndown;h++)!0===r[h]&&u<0&&(u=h);let d=-1;for(let h=i.ndown-1;h>=0;h--)!0===r[h]&&d<0&&(d=h);for(let h=i.ndown-1;h>d;h--)i.ndown>1&&(n.splice(h*i.nacross,i.nacross),i.ndown--);for(let h=u-1;h>=0;h--)i.ndown>1&&(n.splice(h*i.nacross,i.nacross),i.ndown--,a--);for(let h=i.nacross-1;h>c;h--)if(i.nacross>1){for(let t=i.ndown-1;t>=0;t--)n.splice(i.nacross*t+h,1);i.nacross--}for(let h=l-1;h>=0;h--)if(i.nacross>1){for(let t=i.ndown-1;t>=0;t--)n.splice(i.nacross*t+h,1);i.nacross--,s--}return{dx:s,dy:a}},h=this.ContainerList;let c=h.List;const u=this,d=h.flags&NvConstant.ContainerListFlags.Sparse;let p=-1;for(let g=0,f=c.length;g<f;g++)if(c[g].id===e){p=g;break}if(null!=e){const t=ObjectUtil$1.GetObjectPtr(e,!1);let i;if(t.OnDisconnect(e,this),d){let n;if(a){p>=0&&(n=l(e,s),s.x+=n.dx,s.y+=n.dy),((t,e)=>{const i=h,n=i.List;const s=NvConstant.ContainerListArrangements,a=(t,e)=>{if(e<0||t<0)return{dx:0,dy:0};if(i.Arrangement===s.Column){let s=-1;for(let a=t+1;a<i.ndown;a++){const t=a*i.nacross+e;n[t].id<0&&s<0&&(s=a)}if(s<0){for(let t=0;t<i.nacross;t++){const t=new ContainerListShape;n.push(t)}i.ndown++,s=i.ndown-1}for(let a=s;a>t;a--){const t=(a-1)*i.nacross+e,s=a*i.nacross+e;n[s].id=n[t].id}n[t*i.nacross+e].id=-1}else if(i.Arrangement===s.Row){let s=-1;for(let a=e+1;a<i.nacross;a++){const e=t*i.nacross+a;n[e].id<0&&s<0&&(s=a)}if(s<0){for(let t=i.ndown;t>0;t--){const e=t*i.nacross;for(let t=0;t<i.nacross;t++){const t=new ContainerListShape;n.splice(e,0,t)}}i.nacross++,s=i.nacross-1}for(let a=s;a>e;a--){const e=t*i.nacross+(a-1),s=t*i.nacross+a;n[s].id=n[e].id}n[t*i.nacross+e].id=-1}return{dx:0,dy:0}};if(!(t>=h.nacross||e>=h.ndown&&t>=0)){if(e<0||t<0)return a(t,e);const i=h.nacross*e+t;n[i].id>=0&&a(t,e)}})(s.x,s.y),s.y<0&&(s.y=0),s.x<0&&(s.x=0);((t,e,i)=>{const n=h,s=n.List;if(i>=n.ndown)for(let a=n.ndown;a<=i;a++){for(let t=0;t<n.nacross;t++){const t=new ContainerListShape;s.push(t)}n.ndown=i+1}if(e>=n.nacross){const t=n.nacross;for(let i=n.ndown-1;i>=0;i--){const n=t*(i+1);for(let i=t;i<=e;i++){const t=new ContainerListShape;s.splice(n,0,t)}}n.nacross=e+1}s[i*n.nacross+e].id=t})(e,s.x,s.y),T3Gv.opt.PutInFrontofObject(u.BlockID,e),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!0)}else l(e,null),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!1),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move);if(a&&(p>=0?(i=s.y,i>p?(o(e,s.y),r(e)):i<p?(r(e),o(e,i)):(o(e,s.y),T3Gv.opt.PutInFrontofObject(u.BlockID,e),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!0))):(r(e),t.moreflags=Utils2.SetFlag(t.moreflags,OptConstant.ObjMoreFlags.ContainerChild,!1),OptCMUtil.SetLinkFlag(this.BlockID,DSConstant.LinkFlags.Move))),d){(()=>{const t=h,e=t.List;for(let i=0;i<t.ndown;i++)for(let n=0;n<t.nacross;n++){const s=i*t.nacross+n,a=ObjectUtil$1.GetObjectPtr(e[s].id,!1);if(a&&a.hooks.length){const t=a.hooks[0].connect;if(t.x!==n||t.y!==i){const t=ObjectUtil$1.GetObjectPtr(e[s].id,!0);t.hooks[0].connect.x=n,t.hooks[0].connect.y=i}}}})()}else{(()=>{const t=h.List;for(let e=0,i=t.length;e<i;e++){const i=ObjectUtil$1.GetObjectPtr(t[e].id,!0);i&&i.hooks.length&&(i.hooks[0].connect.y=e)}})()}this.PrFormat()}else this.flags=Utils2.SetFlag(this.flags,NvConstant.ObjFlags.Obj1,!0);LogUtil.Debug("= S.ShapeContainer ChangeTarget - Output:",{containerList:this.ContainerList,targetShapeId:e,gridPosition:s})}}}class BitmapImporter{ImportBitmapV1(t,e,i,n,s){if(LogUtil.Debug("S.BitmapImporter - Input:",{imageFile:t,targetWidth:e,targetHeight:i,resolution:n}),!t||!s||n<=0)return;T3Gv.opt.bitmapImportDestWidth=e,T3Gv.opt.bitmapImportDestHeight=i,T3Gv.opt.bitmapImportDPI=n;const a=t.type;if(T3Gv.opt.bitmapImportMimeType=a,"image/jpeg"===a||"image/png"===a){T3Gv.opt.bitmapImportOriginalSize=t.size,T3Gv.opt.scaledBitmapCallback=s;const e=new FileReader;e.onload=function(e){T3Gv.opt.bitmapImportEXIFdata=null,T3Gv.opt.bitmapImportFile=t,T3Gv.opt.bitmapImportResult=e.target.result,LogUtil.Debug("S.BitmapImporter - Output (JPEG/PNG):",{result:e.target.result})},e.readAsDataURL(t)}else{const e=new FileReader;e.onload=function(){const t=new Blob([this.result],{type:a}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;if(i&&i.createObjectURL){const n=i.createObjectURL(t);LogUtil.Debug(`S.BitmapImporter - Output (${"image/svg+xml"===a?"SVG":"Other"}):`,{objectUrl:n,blob:t,byteArray:e}),s(n,t,e)}},e.readAsArrayBuffer(t)}}ImportBitmap(t,e,i,n,s){let a;if(!t||!s||n<=0)return;T3Gv.opt.bitmapImportDestWidth=e,T3Gv.opt.bitmapImportDestHeight=i,T3Gv.opt.bitmapImportDPI=n;const o=t.type;T3Gv.opt.bitmapImportMimeType=o,t instanceof File?"image/jpeg"===o||"image/png"===o?(T3Gv.opt.bitmapImportOriginalSize=t.size,T3Gv.opt.scaledBitmapCallback=s,a=new FileReader,a.onload=function(){const t=new Blob([this.result],{type:o}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;let n="";i&&i.createObjectURL&&(n=i.createObjectURL(t),s&&s(n,t,e))},a.readAsArrayBuffer(t)):"image/svg+xml"===o&&(a=new FileReader,a.onload=function(){const t=new Blob([this.result],{type:o}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;let n="";i&&i.createObjectURL&&(n=i.createObjectURL(t),s&&s(n,t,e))},a.readAsArrayBuffer(t)):(a=new FileReader,a.onload=function(){const t=new Blob([this.result],{type:o}),e=new Uint8Array(this.result),i=window.URL||window.webkitURL;let n="";i&&i.createObjectURL&&(n=i.createObjectURL(t),s&&s(n,t,e))},a.readAsArrayBuffer(t))}}class SvgImporter{ImportSvg(t,e){LogUtil.Debug("= S.SvgImporter - Input file:",t);const i=t.type;if("image/svg+xml"===i){const n=new FileReader;n.onload=function(){const s=n.result,a=new Blob([s],{type:i}),o=new Uint8Array(s),r=window.URL||window.webkitURL;let l="";r&&r.createObjectURL&&(l=r.createObjectURL(a),LogUtil.Debug("= S.SvgImporter - Generated URL:",l),LogUtil.Debug("= S.SvgImporter - Generated Blob:",a),LogUtil.Debug("= S.SvgImporter - Generated Uint8Array:",o),e&&e(l,a,o)),void 0!==t.msClose&&(LogUtil.Debug("= S.SvgImporter - Calling msClose"),t.msClose())},n.readAsArrayBuffer(t)}else LogUtil.Debug("= S.SvgImporter - Unsupported file type:",i)}}class ForeignObject extends BaseShape{constructor(t){LogUtil.Debug("= S.ForeignObject Input:",t),LogUtil.Debug("= S.ForeignObject Input:",t),(t=t||{}).ShapeType=OptConstant.ShapeType.ForeignObject,super(t),this.vueInstance=null,this.htmlContent=null,this.vueComponent=null,this.vueProps={},this.dataclass=t.dataclass||PolygonConstant.ShapeTypes.RECTANGLE,this.vueComponent=t.vueComponent||null,this.vueProps=t.vueProps||{},this.htmlContent=t.htmlContent||null,LogUtil.Debug("= S.ForeignObject Created instance:",this)}CreateShape(t,e){if(this.flags&NvConstant.ObjFlags.NotVisible)return null;const i=t.CreateShape(OptConstant.CSType.ShapeContainer),n=Utils1.DeepCopy(this.Frame),s=this.StyleRecord,a=this.SVGTokenizerHook(s),o=a.Line.Paint.Color,r=a.Line.Thickness,l=a.Line.LinePattern,h=a.Line.Paint.Opacity,c=n.width,u=n.height;i.SetSize(c,u),i.SetPos(n.x,n.y);const d=t.CreateShape(OptConstant.CSType.ForeignObject);if(d.SetID(OptConstant.SVGElementClass.Shape),d.SetSize(c,u),d.SetStrokeColor(o),d.SetStrokeOpacity(h),d.SetStrokeWidth(r),0!==l&&d.SetStrokePattern(l),i.AddElement(d),this.htmlContent)d.SetHtmlContent(this.htmlContent);else if(this.vueComponent)if("string"==typeof this.vueComponent){const t=this.vueComponent,e={"ObjectType2.vue":()=>__vitePreload((()=>import("./ObjectType2.a41c12be.js")),["assets/ObjectType2.a41c12be.js","assets/index.9313841a.js","assets/index.1e63f766.css","assets/EditOutlined.91c20b47.js","assets/AntdIcon.111f44e5.js","assets/button.b2af5e57.js","assets/index.b9a1e371.js","assets/index.0b39d519.js","assets/T3Data.889a220d.js","assets/_commonjsHelpers.a5007c1f.js","assets/RefConstant.60485b5b.js","assets/common.356e5c35.js","assets/api.c096d0cb.js","assets/index.d11c4764.js","assets/plugin-vue_export-helper.21dcd24c.js","assets/QTooltip.fa4abc75.js","assets/position-engine.57eefbc7.js"])};e[t]?e[t]().then((t=>{const e=t.default||t;d.MountVueComponent(e,this.vueProps)})).catch((e=>{T3Util.Error(`= s.ForeignObject CreateShape Failed to load component: ${t}`,e)})):T3Util.Error(`= s.ForeignObject CreateShape Component not found in registry: ${t}`)}else if(this.vueComponent&&"object"==typeof this.vueComponent)if("function"==typeof this.vueComponent.render||"function"==typeof this.vueComponent.setup)d.MountVueComponent(this.vueComponent,this.vueProps);else{const t=this.vueComponent.name||this.vueComponent.__name;if(t){LogUtil.Debug(`Attempting to load component by name: ${t}`),LogUtil.Debug("this.vueProps:  ",this.vueProps);let e=`../../../../components/${t}.vue`;"AntdTest"===t&&(e=`../../../../components/NewUI/${t}.vue`),__vitePreload((()=>import(e)),[]).then((t=>{const e=t.default||t;d.MountVueComponent(e,this.vueProps)})).catch((e=>{T3Util.Error(`= s.ForeignObject CreateShape Failed to load component by name: ${t}`,e)}))}}else T3Util.Error("= s.ForeignObject CreateShape Invalid vue component provided:",this.vueComponent);if(this.ApplyStyles(d,a),this.ApplyEffects(i,!1,!1),!(this instanceof Instance.Shape.ShapeContainer)){const n=OptConstant.Common.Slop,s=t.CreateShape(OptConstant.CSType.Rect);s.SetStrokeColor("white"),s.SetFillColor("none"),s.SetOpacity(0),s.SetStrokeWidth(r+n),e?s.SetEventBehavior(OptConstant.EventBehavior.HiddenAll):s.SetEventBehavior(OptConstant.EventBehavior.None),s.SetID(OptConstant.SVGElementClass.Slop),s.ExcludeFromExport(!0),s.SetSize(c||1,u),i.AddElement(s)}return i.isShape=!0,this.DataID>=0&&this.LMAddSVGTextObject(t,i),i}GetPolyPoints(t,e,i,n,s){LogUtil.Debug("= S.ForeignObject GetPolyPoints Input:",{event:t,type:e,arg:i,rect:n,index:s});const a=[];let o={};Utils2.CopyRect(o,this.Frame);const r=this.StyleRecord.Line.Thickness/2;if(n&&Utils2.InflateRect(o,r,r),a.push(new Point$1(0,0)),a.push(new Point$1(o.width,0)),a.push(new Point$1(o.width,o.height)),a.push(new Point$1(0,o.height)),a.push(new Point$1(0,0)),!e)for(let l=0,h=a.length;l<h;l++)a[l].x+=o.x,a[l].y+=o.y;return LogUtil.Debug("= S.ForeignObject GetPolyPoints Output:",a),a}SetHtmlContent(t){return LogUtil.Debug("= S.ForeignObject SetHtmlContent Input:",t),this.htmlContent=t,this.vueComponent=null,this.vueProps={},this.vueInstance=null,LogUtil.Debug("= S.ForeignObject SetHtmlContent Output: Updated content"),!0}SetVueComponent(t,e={}){return LogUtil.Debug("= S.ForeignObject SetVueComponent Input:",{component:t,props:e}),this.vueComponent=t,this.vueProps=e||{},this.htmlContent=null,LogUtil.Debug("= S.ForeignObject SetVueComponent Output: Updated component"),!0}GetTextDefault(t){if(this.vueComponent||this.htmlContent){return{}}return super.GetTextDefault(t)}SetShapeProperties(t){LogUtil.Debug("= S.ForeignObject SetShapeProperties Input:",t);let e=!1;return void 0!==t.htmlContent&&t.htmlContent!==this.htmlContent&&(this.SetHtmlContent(t.htmlContent),e=!0),void 0!==t.vueComponent&&t.vueComponent!==this.vueComponent&&(this.SetVueComponent(t.vueComponent,t.vueProps),e=!0),super.SetShapeProperties(t)&&(e=!0),LogUtil.Debug("= S.ForeignObject SetShapeProperties Output:",e),e}RemoveElement(){LogUtil.Debug("= S.ForeignObject RemoveElement"),this.vueInstance&&("function"==typeof this.vueInstance.unmount?this.vueInstance.unmount():"function"==typeof this.vueInstance.$destroy&&this.vueInstance.$destroy(),this.vueInstance=null),super.RemoveElement()}LMActionPostRelease(t){if(LogUtil.Debug("= S.ForeignObject LMActionPostRelease Input:",t),super.LMActionPostRelease(t),this.vueComponent){const t=T3Gv.opt.svgObjectLayer.GetElementById(this.BlockID);if(t){const e=t.GetElementById(OptConstant.SVGElementClass.Shape);e&&(e.MountVueComponent(this.vueComponent,this.vueProps),LogUtil.Debug("= S.ForeignObject LMActionPostRelease: Vue component refreshed"))}}LogUtil.Debug("= S.ForeignObject LMActionPostRelease Output: completed")}}const Shape={ArcLine:ArcLine,ArcSegmentedLine:ArcSegmentedLine,BaseDrawObject:BaseDrawObject$1,BaseLine:BaseLine,BaseShape:BaseShape,BaseSymbol:BaseSymbol,BitmapSymbol:BitmapSymbol,Connector:Connector,D3Symbol:D3Symbol,FreehandLine:FreehandLine,GroupSymbol:GroupSymbol,Line:Line$1,Oval:Oval$1,Polygon:Polygon$1,PolyLine:PolyLine$1,PolyLineContainer:PolyLineContainer,Rect:Rect$1,RRect:RRect$1,SegmentedLine:SegmentedLine,ShapeContainer:ShapeContainer,SvgSymbol:SvgSymbol,BitmapImporter:BitmapImporter,SvgImporter:SvgImporter,ForeignObject:ForeignObject};SVGElement.prototype.getTransformToElement=function(t){return t.getScreenCTM().inverse().multiply(this.getScreenCTM())};class T3Opt{constructor(){this.evtOpt=new EvtOpt,this.userOpt=new UserOpt}Initialize(t){var e,i,n,s;T3Gv.quasar=t,QuasarUtil.quasar=t,initializeInstance(Basic$1,Shape),DataOpt.InitStateAndStore(),T3Gv.docUtil=new DocUtil,T3Gv.opt=new OptUtil,T3Gv.opt.InitializeProperties(),T3Gv.opt.Initialize(),T3Gv.wallOpt=new WallOpt,window.oncontextmenu=function(t){t.preventDefault()},window.onkeydown=KeyboardOpt.OnKeyDown,window.onkeyup=KeyboardOpt.OnKeyUp,window.onkeypress=KeyboardOpt.OnKeyPress,window.docUtil=T3Gv.docUtil,window.wallOpt=T3Gv.wallOpt,this.evtOpt.BindElemCtlEvent(),T3Clipboard.Init(),DataOpt.InitStoredData(),DataOpt.LoadAppStateV2(),SvgUtil.RenderAllSVGObjects(),this.userOpt.Initialize(),LogUtil.Debug("= o.T3Opt: Initialize/ - After initialize all and the T3Gv.stdObj loaded from storage data:",T3Gv.opt.sdDataBlockId,T3Gv.stdObj),T3Gv.docUtil.LoadRulersSetting(),T3Gv.docUtil.LoadGridSetting();const a=DataOpt.LoadDocSettingData(),o=100*(null!=(i=null==(e=null==a?void 0:a.docInfo)?void 0:e.docScale)?i:1);T3Gv.docUtil.SetZoomLevel(o),T3Gv.docUtil.UpdateRefZoomScale(null!=(s=null==(n=null==a?void 0:a.docInfo)?void 0:n.docScale)?s:1),LogUtil.Debug(`= o.T3Opt: Initialize/ - After initialize all and set SetZoomLevel for resizing the work area:${o}`)}ReInitialize(){var t,e,i,n;initializeInstance(Basic$1,Shape),DataOpt.InitStateAndStore(),T3Gv.opt.InitializeProperties(),T3Gv.opt.Initialize(!1),DataOpt.SaveToLocalStorage(),T3Gv.wallOpt=new WallOpt,window.oncontextmenu=function(t){t.preventDefault()},window.onkeydown=KeyboardOpt.OnKeyDown,window.onkeyup=KeyboardOpt.OnKeyUp,window.onkeypress=KeyboardOpt.OnKeyPress,window.docUtil=T3Gv.docUtil,window.wallOpt=T3Gv.wallOpt,this.evtOpt.BindElemCtlEvent(),T3Clipboard.Init(),DataOpt.InitStoredData(),DataOpt.LoadAppStateV2(),this.userOpt.Initialize(),LogUtil.Debug("= o.T3Opt: Initialize/ - After initialize all and the T3Gv.stdObj loaded from storage data:",T3Gv.opt.sdDataBlockId,T3Gv.stdObj),T3Gv.docUtil.LoadRulersSetting(),T3Gv.docUtil.LoadGridSetting();const s=DataOpt.LoadDocSettingData(),a=100*(null!=(e=null==(t=null==s?void 0:s.docInfo)?void 0:t.docScale)?e:1);T3Gv.docUtil.SetZoomLevel(a),T3Gv.docUtil.UpdateRefZoomScale(null!=(n=null==(i=null==s?void 0:s.docInfo)?void 0:i.docScale)?n:1),LogUtil.Debug(`= o.T3Opt: Initialize/ - After initialize all and set SetZoomLevel for resizing the work area:${a}`)}}class KeyInsertOpt{constructor(){this.insertT3EntryDialog=insertT3EntryDialog.value}InsertT3EntryDialog(){LogUtil.Debug("= O.KeyInsertOpt InsertT3EntryDialog: The insert key has been pressed"),LogUtil.Debug("= O.KeyInsertOpt InsertT3EntryDialog: The insertT3EntryDialog data been initial with value",this.insertT3EntryDialog),this.insertT3EntryDialog.active=!0}CloseT3EntryDialog(){this.insertT3EntryDialog.active=!1}InsertT3EntrySelect(t){LogUtil.Debug("= O.KeyInsertOpt InsertT3EntryDialog: value",t)}}class MockData{}MockData.DeviceList=[{id:0,label:"All Devices",icon:"devices",children:[{id:1,label:"T3-XX-ESP 1",icon:"horizontal_rule"},{id:2,label:"T3-XX-ESP 2",icon:"horizontal_rule"},{id:3,label:"T3-XX-ESP 3",icon:"horizontal_rule"},{id:4,label:"T3-XX-ESP 4",icon:"horizontal_rule"},{id:5,label:"T3-XX-ESP 5",icon:"horizontal_rule"},{id:6,label:"T3-XX-ESP 6",icon:"horizontal_rule"},{id:7,label:"T3-XX-ESP 7",icon:"horizontal_rule"},{id:8,label:"T3-XX-ESP 8",icon:"horizontal_rule"},{id:9,label:"T3-XX-ESP 9",icon:"horizontal_rule"},{id:10,label:"T3-XX-ESP 10",icon:"horizontal_rule"},{id:11,label:"T3-XX-ESP 11",icon:"horizontal_rule"},{id:12,label:"T3-XX-ESP 12",icon:"horizontal_rule"},{id:13,label:"T3-XX-ESP 13",icon:"horizontal_rule"},{id:14,label:"T3-XX-ESP 14",icon:"horizontal_rule"},{id:15,label:"T3-XX-ESP 15",icon:"horizontal_rule"},{id:16,label:"T3-XX-ESP 16",icon:"horizontal_rule"},{id:17,label:"T3-XX-ESP 17",icon:"horizontal_rule"},{id:18,label:"T3-XX-ESP 18",icon:"horizontal_rule"}]}],MockData.GraphicList=[{id:1,fullLabel:"T3-xx-ESP1 full label 1",label:"label 1",pictureFile:"",elementCount:0},{id:2,fullLabel:"T3-xx-ESP1 full label 2",label:"label 2",pictureFile:"",elementCount:0},{id:3,fullLabel:"T3-xx-ESP1 full label 3",label:"label 3",pictureFile:"",elementCount:0},{id:4,fullLabel:"T3-xx-ESP1 full label 4",label:"label 4",pictureFile:"",elementCount:0},{id:5,fullLabel:"T3-xx-ESP1 Default",label:"label 5",pictureFile:"",elementCount:0},{id:6,fullLabel:"T3-xx-ESP1 full label 6",label:"label 6",pictureFile:"",elementCount:0},{id:7,fullLabel:"T3-xx-ESP1 full label 7",label:"label 7",pictureFile:"",elementCount:0},{id:8,fullLabel:"T3-xx-ESP1 Default",label:"label 8",pictureFile:"",elementCount:0}];class PanelInfo{}class DeviceItem{initData(t,e,i,n,s){this.id=t,this.label=e,this.icon=i,this.children=n,this.pl=s}}class LsOpt{saveAppState(t){localStorage.setItem("appState",JSON.stringify(t))}saveDeviceAppState(t){localStorage.setItem("deviceAppState",JSON.stringify(t))}loadDeviceAppStateLS(){const t=localStorage.getItem("deviceAppState");return t?JSON.parse(t):null}loadAppStateLS(){const t=localStorage.getItem("appState");return null!=t?t:null}loadParsedAppStateLS(){const t=localStorage.getItem("appState");return t?JSON.parse(t):null}}class DeviceOpt{constructor(){this.lsOpt=new LsOpt,this.mockDeviceList=MockData.DeviceList,this.mockGraphicList=MockData.GraphicList,this.panelList=[],this.deviceList=[],this.graphicList=[],this.currentDevice={}}initPanelList(t){if(null==t)return;const e=t.map((t=>{const e=new PanelInfo;return e.object_instance=t.object_instance,e.online_time=t.online_time,e.panel_name=t.panel_name,e.panel_number=t.panel_number,e.pid=t.pid,e.serial_number=t.serial_number,e}));this.panelList=e}initDeviceList(t){this.initPanelList(t);const e=this.panelList.map((t=>{const e=new DeviceItem;return e.initData(t.panel_number,t.panel_name,"horizontal_rule",[],t),e})),i=new DeviceItem;i.initData(-1,"All Devices","devices",e,{}),this.deviceList=[i],T3Data.deviceList.value=this.deviceList}initGraphicList(t){LogUtil.Debug("= Dvopt t3 graphic data",t);const e=t.filter((t=>t.id.startsWith("GRP"))).slice(0,8).map((t=>({id:t.id.includes("GRP")?parseInt(t.id.replace("GRP",""),10):parseInt(t.id,10),fullLabel:t.description||"",label:t.label||"",elementCount:Number(t.count)||0})));LogUtil.Debug("= Dvopt t3 transformedGraphicItems",e),this.graphicList=e,T3Data.graphicList.value=e,LogUtil.Debug("= Dvopt t3 graphicList",T3Data.graphicList.value)}calculateElementCount(t){const e=T3Data.currentDevice.value;if(!e)return 0;const i=this.lsOpt.loadDeviceAppStateLS();if(i){const n=i.find((i=>{var n,s;return(null==(n=null==i?void 0:i.device)?void 0:n.deviceId)===(null==e?void 0:e.deviceId)&&(null==(s=null==i?void 0:i.device)?void 0:s.graphic)===t}));if(n)return n.appState.items.length}return 0}syncTempAppStateToDeviceAppState(){const t=localStorage.getItem("tempAppState"),e=this.getCurrentDevice();if(!t||!e)return;const i=JSON.parse(t),n=this.lsOpt.loadDeviceAppStateLS()||[],s=n.findIndex((t=>{var i,n;return(null==(i=null==t?void 0:t.device)?void 0:i.device)===(null==e?void 0:e.device)&&(null==(n=null==t?void 0:t.device)?void 0:n.graphic)===(null==e?void 0:e.graphic)}));-1!==s?n[s].appState=i:n.push({device:e,appState:i}),localStorage.setItem("deviceAppState",JSON.stringify(n))}saveCurrentDevice(t){localStorage.setItem("currentDevice",JSON.stringify(t))}getCurrentDevice(){return localStorage.getItem("currentDevice")?JSON.parse(localStorage.getItem("currentDevice")):null}saveAppState(t){localStorage.setItem("appState",JSON.stringify(t))}findAllNodes(t,e){for(const i of t){if(i.label===e)return i;if(i.children){const t=this.findAllNodes(i.children,e);if(t)return t}}return null}setDeviceAndGraphicDefaultData(t){const e=this.findAllNodes(T3Data.deviceList.value,t.device);e&&(e.icon="check")}saveDeviceAppState(t,e,i){let n=e.value.data;if(!n.device&&(n=this.getCurrentDevice(),null===n))return;const s=this.lsOpt.loadDeviceAppStateLS();null!==s&&(t.value=s);if(t.value.some((t=>{var e,i;return(null==(e=null==t?void 0:t.device)?void 0:e.device)===(null==n?void 0:n.device)&&(null==(i=null==t?void 0:t.device)?void 0:i.graphic)===(null==n?void 0:n.graphic)})))t.value.forEach((t=>{var e,s;if((null==(e=null==t?void 0:t.device)?void 0:e.device)===(null==n?void 0:n.device)&&(null==(s=null==t?void 0:t.device)?void 0:s.graphic)===(null==n?void 0:n.graphic)){const e=lodash.exports.cloneDeep(i);t.appState=e}}));else{const e=lodash.exports.cloneDeep(i),s={device:n,appState:e};t.value.push(s)}this.lsOpt.saveDeviceAppState(t.value),this.refreshCurrentDeviceCount(e)}loadDeviceAppState(t,e,i){const n=this.lsOpt.loadDeviceAppStateLS();null!==n&&(t.value=n);const s=t.value.find((t=>{var i,n;return(null==(i=null==t?void 0:t.device)?void 0:i.device)===(null==e?void 0:e.device)&&(null==(n=null==t?void 0:t.device)?void 0:n.graphic)===(null==e?void 0:e.graphic)}));if(s){const t=lodash.exports.cloneDeep(s.appState);return t.selectedTarget=[],t.selectedTargets=[],t.activeItemIndex=-1,t}}refreshCurrentDeviceCount(t){const e=this.lsOpt.loadDeviceAppStateLS(),i=this.getCurrentDevice();e&&(e.forEach((e=>{var n,s,a,o,r;if((null==(n=null==e?void 0:e.device)?void 0:n.device)===(null==i?void 0:i.device)&&(null==(s=null==e?void 0:e.device)?void 0:s.graphic)===(null==i?void 0:i.graphic)){const n=null!=(r=null==(o=null==(a=null==e?void 0:e.appState)?void 0:a.items)?void 0:o.length)?r:0;return i.graphicFull.elementCount=n,void(t.value.data=i)}})),localStorage.setItem("currentDevice",JSON.stringify(i)))}refreshGraphicPanelElementCount(t){const e=this.lsOpt.loadDeviceAppStateLS();if(!e)return;const i=e.filter((e=>{var i;return(null==(i=null==e?void 0:e.device)?void 0:i.device)===(null==t?void 0:t.device)}));T3Data.graphicList.value.forEach((t=>{var e,n,s;const a=i.find((e=>{var i;return(null==(i=null==e?void 0:e.device)?void 0:i.graphic)===t.id}));if(a){const i=null!=(s=null==(n=null==(e=null==a?void 0:a.appState)?void 0:e.items)?void 0:n.length)?s:0;t.elementCount=i}})),LogUtil.Debug("= Dvopt refresh element count",T3Data.graphicList.value)}clearGraphicPanelElementCount(){T3Data.graphicList.value.forEach((t=>{t.elementCount=0}))}clearDirtyCurrentDevice(){const t=this.getCurrentDevice();T3Data.deviceList.value.length>0&&T3Data.deviceList.value[0].children.forEach((e=>{"check"===e.icon&&e.label!==t.device&&(e.icon="horizontal_rule")}))}loadGraphicPanelData(t){MockData.GraphicList.forEach((e=>{e.fullLabel=`${t.device} mock real ${e.id}`,e.label=`mock real ${e.id}`,e.pictureFile="",e.elementCount=0}))}getSerialNumber(t){var e,i,n;let s=-1;if(0===T3Data.deviceList.value.length){const t=this.getCurrentDevice();s=null!=(e=null==t?void 0:t.serialNumber)?e:-1}else{const e=null==(n=null==(i=T3Data.deviceList.value[0])?void 0:i.children)?void 0:n.find((e=>e.pl.panel_number===t));e&&(s=e.pl.serial_number)}return s}refreshDeviceAppState(){var t,e;LogUtil.Debug("= Dvopt: refreshDeviceAppState / start to refresh deviceAppState");const i=this.loadDeviceAppState(deviceAppState,deviceModel.value.data,null);LogUtil.Debug("= Dvopt: refreshDeviceAppState / existAppState",i),i?appState.value=i:(appState.value=lodash.exports.cloneDeep(emptyProject),appState.value.rulersGridVisible=rulersGridVisible.value),LogUtil.Debug("= Dvopt: refreshDeviceAppState / appState.value",appState.value),this.saveAppState(appState.value),rulersGridVisible.value=null!=(e=null==(t=appState.value)?void 0:t.rulersGridVisible)&&e}refreshCurrentDevice(){const t=this.getCurrentDevice(),e=appState.value.items.length;e!==t.graphicFull.elementCount&&(t.graphicFull.elementCount=e,this.saveCurrentDevice(t))}addPresetsData(){var t,e;const i=lodash.exports.cloneDeep(emptyProject);localStorage.setItem("tempAppState",JSON.stringify(i)),LogUtil.Debug("= Dvopt: addPresetsData / set the tempAppState to empty project",i);const n=this.getCurrentDevice(),s=null!=(t=null==n?void 0:n.device)?t:"-";null==n||n.deviceId;const a=null!=(e=null==n?void 0:n.graphic)?e:-1;LogUtil.Debug("= Dvopt: addPresetsData / currentDevice",n),n.graphicFull.elementCount=0,this.saveCurrentDevice(n),appState.value=lodash.exports.cloneDeep(emptyProject),rulersGridVisible.value=!1,LogUtil.Debug("= Dvopt: addPresetsData / set the appState value to empty project",appState.value),this.saveAppState(appState.value),LogUtil.Debug("= Dvopt: addPresetsData / save the appState value to local storage",appState.value);const o=this.lsOpt.loadDeviceAppStateLS();if(LogUtil.Debug("= Dvopt: addPresetsData / load deviceAppStateLS",o),!o)return;const r=o.findIndex((t=>{var e,i;return(null==(e=null==t?void 0:t.device)?void 0:e.device)===s&&(null==(i=null==t?void 0:t.device)?void 0:i.graphic)===a}));-1!==r&&(o[r].appState=lodash.exports.cloneDeep(emptyProject)),localStorage.setItem("deviceAppState",JSON.stringify(o)),LogUtil.Debug("= Dvopt: addPresetsData / save the deviceAppState to local storage",o)}mergeAppState(t){if(!appState.value&&!t)return;const e=appState.value.version,i=t.items.length>0?Math.max(...t.items.map((t=>t.id))):0;appState.value.items.forEach((t=>{t.id=i+t.id}));const n={version:e,items:[...t.items,...appState.value.items],selectedTargets:[],elementGuidelines:[],itemsCount:appState.value.itemsCount+t.itemsCount,groupCount:appState.value.groupCount+t.groupCount,activeItemIndex:-1,viewportTransform:appState.value.viewportTransform,rulersGridVisible:appState.value.rulersGridVisible||t.rulersGridVisible};appState.value=n,this.saveAppState(appState.value),LogUtil.Debug("= Dvopt mergeAppState",appState.value)}isCurrentDeviceMessage(t){var e,i,n,s,a,o;const r=null!=(e=null==t?void 0:t.panelId)?e:-1,l=null!=(i=null==t?void 0:t.viewitem)?i:-1,h=null!=(n=null==t?void 0:t.serialNumber)?n:-1;if(LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / msgData",t),LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / panelId,viewitem,serialNumber",r,l,h),!r||!l||!h)return LogUtil.Error("= Dvopt: isCurrentDeviceMessage / Invalid message data"),!1;const c=this.getCurrentDevice();if(LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / currentDevice",c),!c)return LogUtil.Error("= Dvopt: isCurrentDeviceMessage / No current device found"),!1;null==c||c.device;const u=null!=(s=null==c?void 0:c.deviceId)?s:-1,d=null!=(a=null==c?void 0:c.graphic)?a:-1,p=null!=(o=null==c?void 0:c.serialNumber)?o:-1;LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / crtPanelId,crtGraphicId,crtSerialNumber",u,d,p);const g=u===r,f=p===h,m=d===l+1;return LogUtil.Debug("= Dvopt: isCurrentDeviceMessage / isSamePanel",g,"isSameSerial",f,"isSameViewItem",m),g&&f&&m}}class MessageType{}MessageType.DATA_SERVER_ONLINE=-1,MessageType.GET_PANEL_DATA=0,MessageType.GET_INITIAL_DATA=1,MessageType.SAVE_GRAPHIC_DATA=2,MessageType.UPDATE_ENTRY=3,MessageType.GET_PANELS_LIST=4,MessageType.GET_PANEL_RANGE_INFO=5,MessageType.GET_ENTRIES=6,MessageType.LOAD_GRAPHIC_ENTRY=7,MessageType.OPEN_ENTRY_EDIT_WINDOW=8,MessageType.SAVE_IMAGE=9,MessageType.SAVE_LIBRARY_DATA=10,MessageType.DELETE_IMAGE=11,MessageType.GET_SELECTED_DEVICE_INFO=12,MessageType.BIND_DEVICE=13,MessageType.SAVE_NEW_LIBRARY_DATA=14,MessageType.GET_PANEL_DATA_RES="GET_PANEL_DATA_RES",MessageType.GET_INITIAL_DATA_RES="GET_INITIAL_DATA_RES",MessageType.SAVE_GRAPHIC_DATA_RES="SAVE_GRAPHIC_DATA_RES",MessageType.UPDATE_ENTRY_RES="UPDATE_ENTRY_RES",MessageType.GET_PANELS_LIST_RES="GET_PANELS_LIST_RES",MessageType.GET_PANEL_RANGE_INFO_RES="GET_PANEL_RANGE_INFO_RES",MessageType.GET_ENTRIES_RES="GET_ENTRIES_RES",MessageType.LOAD_GRAPHIC_ENTRY_RES="LOAD_GRAPHIC_ENTRY_RES",MessageType.OPEN_ENTRY_EDIT_WINDOW_RES="OPEN_ENTRY_EDIT_WINDOW",MessageType.SAVE_IMAGE_RES="SAVE_IMAGE_RES",MessageType.SAVE_LIBRARY_DATA_RES="SAVE_LIBRAY_DATA_RES",MessageType.DELETE_IMAGE_RES="DELETE_IMAGE_RES",MessageType.GET_SELECTED_DEVICE_INFO_RES="GET_SELECTED_DEVICE_INFO_RES",MessageType.BIND_DEVICE_RES="BIND_DEVICE_RES",MessageType.SAVE_NEW_LIBRARY_DATA_RES="SAVE_NEW_LIBRARY_DATA_RES";class MessageModel{constructor(){this.deviceOpt=new DeviceOpt,this.loadCurrentDevice(),this.browserType=this.getBrowserType(),this.header={from:this.browserType},this.message={}}getBrowserType(){const t=navigator.userAgent;return t.indexOf("Firefox")>-1?"Firefox":t.indexOf("Chrome")>-1?"Chrome":t.indexOf("Safari")>-1?"Safari":t.indexOf("MSIE")>-1||document.DOCUMENT_NODE?"IE":"Unknown"}loadCurrentDevice(){const t=this.deviceOpt.getCurrentDevice();null===t?this.setEmptyDevice():this.currentDevice=t}setEmptyDevice(){this.currentDevice={device:"",deviceId:-1,serialNumber:-1,graphic:-1,graphicFull:{id:-1,fullLabel:"",label:"",elementCount:""}}}setHeader(){this.header.from=this.getBrowserType()}setMessage(t,e,i,n,s,a){null!=t&&(this.message.action=t),null!=e&&(this.message.panelId=e),null!=i&&(this.message.viewitem=i-1,this.message.viewitem<0&&(this.message.viewitem=-1)),null!=n&&void 0!==n&&(this.message.data=n),null!=a&&void 0!==a&&(this.message.clientId=Utils1.GenerateUUID()),this.message.msgId=Utils1.GenerateUUID();null!=e&&null!=s&&(this.message.serialNumber=s)}formatMessageData(){return{header:this.header,message:this.message}}}class T3UIUtil{static ShowWebSocketError(t){AntdUtil.ShowTopAlert("error","WebSocket Error",t)}static ShowZoomInOutError(t){AntdUtil.ShowTopAlert("error","Zoom In/Out Error",t)}static SetNavVisiblity(t){topNavVisible.value=!0,leftNavVisible.value=!0,rightNavVisible.value=!0}}class WebSocketClient{constructor(){this.socket=null,this.retries=0,this.maxRetries=10,this.pingInterval=1e4,this.pingIntervalId=null,this.reconnectTimeoutId=null,this.needRefresh=!0,this.isDestroyed=!1,this.messageQueue=[],this.deviceOpt=null,this.idxPage=null,this.quasarUtil=null,this.messageHandlers={[MessageType.GET_PANEL_DATA_RES]:this.HandleGetPanelDataRes.bind(this),[MessageType.GET_INITIAL_DATA_RES]:this.HandleGetInitialDataRes.bind(this),[MessageType.SAVE_GRAPHIC_DATA_RES]:this.HandleSaveGraphicRes.bind(this),[MessageType.UPDATE_ENTRY_RES]:this.HandleUpdateEntryRes.bind(this),[MessageType.GET_PANELS_LIST_RES]:this.HandleGetPanelsListRes.bind(this),[MessageType.GET_ENTRIES_RES]:this.HandleGetEntriesRes.bind(this),[MessageType.LOAD_GRAPHIC_ENTRY_RES]:this.HandleLoadGraphicEntryRes.bind(this),[MessageType.OPEN_ENTRY_EDIT_WINDOW_RES]:this.HandleOpenEntryEditWindowRes.bind(this),[MessageType.SAVE_IMAGE_RES]:this.HandleSaveImageRes.bind(this),[MessageType.SAVE_LIBRARY_DATA_RES]:this.HandleSaveLibraryDataRes.bind(this),[MessageType.SAVE_NEW_LIBRARY_DATA_RES]:this.HandleSaveNewLibraryDataRes.bind(this),[MessageType.DELETE_IMAGE_RES]:this.HandleDeleteImageRes.bind(this),[MessageType.DATA_SERVER_ONLINE]:this.HandleDataServerOnline.bind(this)}}setDependencies(t,e,i){this.deviceOpt=t,this.idxPage=e,this.quasarUtil=i}connect(){if(this.isDestroyed)return void LogUtil.Error("Cannot connect: WebSocketClient has been destroyed");this.cleanup(),this.uri=this.getUri();const t=`ws://${this.uri}:9104`;try{this.socket=new WebSocket(t),this.setupEventHandlers()}catch(e){LogUtil.Error("Failed to create WebSocket connection:",e),this.attemptReconnect()}}setupEventHandlers(){this.socket&&(this.socket.onopen=this.onOpen.bind(this),this.socket.onmessage=this.onMessage.bind(this),this.socket.onclose=this.onClose.bind(this),this.socket.onerror=this.onError.bind(this))}onOpen(t){LogUtil.Debug("= ws: connection opened:",t),this.retries=0,this.socket&&this.socket.readyState===WebSocket.OPEN&&(this.bindCurrentClient(),this.processPendingMessages()),this.GetPanelsList()}onMessage(t){LogUtil.Debug("= Ws message received:",t.data);try{this.processMessage(t.data)}catch(e){LogUtil.Error("Error processing WebSocket message:",e)}}onClose(t){LogUtil.Debug("= ws: connection closed:",t),this.cleanup(),this.isDestroyed||this.attemptReconnect()}onError(t){T3Util.Error("= ws: onError/",t);T3UIUtil.ShowWebSocketError("Load device data failed, please check whether the T3000 application is running or not."),this.cleanup(),this.isDestroyed||this.attemptReconnect()}cleanup(){this.pingIntervalId&&(clearInterval(this.pingIntervalId),this.pingIntervalId=null),this.reconnectTimeoutId&&(clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=null),this.reloadInitialDataInterval&&(clearInterval(this.reloadInitialDataInterval),this.reloadInitialDataInterval=null),this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.readyState===WebSocket.OPEN&&this.socket.close(),this.socket=null)}startPing(){this.pingIntervalId&&clearInterval(this.pingIntervalId),this.pingIntervalId=setInterval((()=>{if(this.socket&&this.socket.readyState===WebSocket.OPEN)try{this.socket.send("ping")}catch(t){LogUtil.Error("Failed to send ping:",t)}}),this.pingInterval)}attemptReconnect(){if(this.retries>=this.maxRetries||this.isDestroyed)return;const t=Math.min(1e3*Math.pow(2,this.retries),3e4);this.reconnectTimeoutId=setTimeout((()=>{this.retries++,this.connect()}),t)}getUri(){return new URL(window.location.href).hostname}bindCurrentClient(){const t=Utils1.GenerateUUID();this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(13,null,null,null,null,t);const e=this.messageModel.formatMessageData();this.messageData=JSON.stringify(e),this.sendMessage(this.messageData)}sendMessage(t){var e;if(this.isDestroyed)LogUtil.Error("Cannot send message: WebSocketClient has been destroyed");else if(this.socket&&this.socket.readyState===WebSocket.OPEN)try{this.socket.send(t);const e=(new Date).toLocaleString();try{const i=JSON.parse(t),n=(null==i?void 0:i.message)||i,s=this.getActionDetails(null==n?void 0:n.action);LogUtil.Debug("= WS: Sent message to T3000 backend:",{messageDetails:{action:null==n?void 0:n.action,actionName:s.name,actionDescription:s.description,actionCategory:s.category,implemented:s.implemented},messageContext:{panelId:null==n?void 0:n.panelId,viewitem:null==n?void 0:n.viewitem,msgId:null==n?void 0:n.msgId,serialNumber:null==n?void 0:n.serialNumber,hasData:!!(null==n?void 0:n.data),dataType:(null==n?void 0:n.data)?typeof n.data:null,dataLength:Array.isArray(null==n?void 0:n.data)||"string"==typeof(null==n?void 0:n.data)?n.data.length:null},connectionInfo:{socketState:this.socket.readyState,socketUrl:this.socket.url,timestamp:e},rawMessage:t})}catch{LogUtil.Debug("= WS: Sent message to T3000 backend (unparseable):",{messageType:"RAW_STRING",messageLength:(null==t?void 0:t.length)||0,timestamp:e,rawMessage:t})}}catch(i){LogUtil.Error("Failed to send message:",i),this.messageQueue.push(t),this.attemptReconnect()}else this.messageQueue.push(t),LogUtil.Debug("= ws: sendMessage / socket not open, message queued. Ready state:",null==(e=this.socket)?void 0:e.readyState),this.socket&&this.socket.readyState!==WebSocket.CLOSED||this.connect()}processPendingMessages(){for(var t;this.messageQueue.length>0&&(null==(t=this.socket)?void 0:t.readyState)===WebSocket.OPEN;){const t=this.messageQueue.shift();if(t)try{this.socket.send(t),LogUtil.Debug("= ws: pending message sent:",t)}catch(e){LogUtil.Error("Failed to send pending message:",e),this.messageQueue.unshift(t);break}}}destroy(){this.isDestroyed=!0,this.cleanup(),this.messageQueue=[],LogUtil.Debug("= ws: WebSocketClient destroyed")}FormatMessageData(t,e,i,n){var s,a;const o=null!=(a=null==(s=this.deviceOpt)?void 0:s.getSerialNumber(e))?a:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(t,e,i,n,o);const r=this.messageModel.formatMessageData();this.messageData=JSON.stringify(r)}FormatUpdateEntryData(t){var e,i,n;const s=t.panelId,a=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null===a||null==a)return;const o=a.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(s))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.UPDATE_ENTRY,s,o,null,r),this.messageModel.message.field=t.field,this.messageModel.message.value=t.value,this.messageModel.message.entryIndex=t.entryIndex,this.messageModel.message.entryType=t.entryType,void 0!==t.data&&(this.messageModel.message.data=t.data);const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}FormatSaveImageData(t){var e,i,n;const s=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==s)return;const a=s.panelId,o=s.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(a))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.SAVE_IMAGE,a,o,null,r),this.messageModel.message.filename=t.filename,this.messageModel.message.fileLength=t.fileLength,this.messageModel.message.fileData=t.fileData;const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}FormatLoadGraphicEntryData(t){var e,i,n;const s=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==s)return;const a=t.panelId||s.panenId,o=s.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(a))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.LOAD_GRAPHIC_ENTRY,a,o,null,r),this.messageModel.message.entryIndex=t.entryIndex,this.messageModel.message.viewitem=t.entryIndex;const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}FormatOpenEntryEditWindow(t){var e,i,n;const s=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==s)return;const a=t.panelId||s.panenId,o=s.graphic,r=null!=(n=null==(i=this.deviceOpt)?void 0:i.getSerialNumber(a))?n:-1;this.messageModel=new MessageModel,this.messageModel.setHeader(),this.messageModel.setMessage(MessageType.OPEN_ENTRY_EDIT_WINDOW,a,o,null,r),this.messageModel.message.entryType=t.entryType,this.messageModel.message.entryIndex=t.entryIndex;const l=this.messageModel.formatMessageData();this.messageData=JSON.stringify(l)}GetData(t){this.sendMessage(JSON.stringify({action:t}))}GetPanelData(t){const e=(new Error).stack,i=e?e.split("\n"):[],n=(i.slice(1,6),i[2]||"Unknown caller"),s=n.match(/at\s+(.+)\s+\((.+):(\d+):(\d+)\)/);s?(s[1],s[2].split("/").pop()||s[2],s[3],s[4]):n.trim();this.FormatMessageData(MessageType.GET_PANEL_DATA,t,null,null),this.sendMessage(this.messageData)}GetInitialData(t,e,i){this.needRefresh=null==i||i,this.FormatMessageData(MessageType.GET_INITIAL_DATA,t,e,null),this.sendMessage(this.messageData)}SaveGraphic(t,e,i){this.FormatMessageData(MessageType.SAVE_GRAPHIC_DATA,t,e,i),this.sendMessage(this.messageData)}UpdateEntry(t){this.FormatUpdateEntryData(t),this.sendMessage(this.messageData)}GetPanelsList(){const t=(new Error).stack,e=t?t.split("\n"):[],i=(e.slice(1,6),e[2]||"Unknown caller"),n=i.match(/at\s+(.+)\s+\((.+):(\d+):(\d+)\)/);n?(n[1],n[2].split("/").pop()||n[2],n[3],n[4]):i.trim();this.FormatMessageData(MessageType.GET_PANELS_LIST,null,null,null),this.sendMessage(this.messageData)}GetEntries(t){var e;const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==i)return;const n=i.deviceId,s=i.graphic;i.serialNumber,this.FormatMessageData(MessageType.GET_ENTRIES,n,s,t),this.sendMessage(this.messageData)}LoadGraphicEntry(t){this.FormatLoadGraphicEntryData(t),this.sendMessage(this.messageData)}OpenEntryEditWindow(t){this.FormatOpenEntryEditWindow(t),this.sendMessage(this.messageData)}SaveImage(t){this.FormatSaveImageData(t),this.sendMessage(this.messageData)}SaveLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}SaveNewLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_NEW_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}DeleteImage(t){var e;const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();if(null==i)return;const n=i.deviceId,s=i.graphic;this.FormatMessageData(MessageType.DELETE_IMAGE,n,s,t),this.sendMessage(this.messageData)}printLog(t){try{if("GET_INITIAL_DATA_RES"==t.action){const e=JSON.parse(t.data),i=t.entry,n=null!=t.library&&""!==t.library?JSON.parse(t.library):{};LogUtil.Debug("= ws: printLog / Received data:",!0,{action:"GET_INITIAL_DATA_RES",data:e,entry:i,library:n})}else LogUtil.Debug("= ws: printLog / Received data:",t)}catch(e){LogUtil.Debug("= ws: printLog / Received data error",e)}}processMessage(t){LogUtil.Debug("= ws: printLog / received origin data",t);try{const e=JSON.parse(t);if(void 0!==e.error||!1===(null==e?void 0:e.status))return void this.handleError(e);this.printLog(e),this.processMessageData(e),this.showSuccess(e),LogUtil.Debug("= ========================")}catch(e){T3Util.Error("= ws: processMessage/ failed to parse | process data:",e)}}processMessageData(t){const e=this.messageHandlers[t.action];e?e(t):LogUtil.Warn("No handler for message action:",t.action,t)}HandleGetPanelDataRes(t){var e,i,n;if(LogUtil.Debug("= ws: HandleGetPanelDataRes START ================="),LogUtil.Debug("= ws: HandleGetPanelDataRes / received panel_id:",null==t?void 0:t.panel_id),LogUtil.Debug("= ws: HandleGetPanelDataRes / received data length:",(null==(e=null==t?void 0:t.data)?void 0:e.length)||0),LogUtil.Debug("= ws: HandleGetPanelDataRes / current loadingPanel:",T3000_Data.value.loadingPanel),LogUtil.Debug("= ws: HandleGetPanelDataRes / total panels in list:",T3000_Data.value.panelsList.length),LogUtil.Debug("= ws: HandleGetPanelDataRes / BEFORE - panelsData length:",T3000_Data.value.panelsData.length),(null==t?void 0:t.data)&&t.data.length>0&&LogUtil.Debug("= ws: HandleGetPanelDataRes / sample received data items (first 3):",t.data.slice(0,3).map((t=>({pid:t.pid,index:t.index,type:t.type,label:t.label||t.description})))),null==(i=this.deviceOpt)||i.initGraphicList(t.data),(null==t?void 0:t.panel_id)&&(null==(n=this.idxPage)||n.clearGetPanelsInterval()),null==t?void 0:t.panel_id){if(null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel<T3000_Data.value.panelsList.length-1){LogUtil.Debug("= ws: HandleGetPanelDataRes / triggering next panel load, increment loadingPanel from:",T3000_Data.value.loadingPanel),T3000_Data.value.loadingPanel++;const t=T3000_Data.value.loadingPanel,e=T3000_Data.value.panelsList[t].panel_number;LogUtil.Debug("= ws: HandleGetPanelDataRes / loading next panel at index:",t,"panel_number:",e),this.GetPanelData(e)}null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel===T3000_Data.value.panelsList.length-1&&(LogUtil.Debug("= ws: HandleGetPanelDataRes / reached last panel, setting loadingPanel to null"),T3000_Data.value.loadingPanel=null);T3000_Data.value.panelsData.length,T3000_Data.value.panelsData.filter((e=>e.pid===t.panel_id));T3000_Data.value.panelsData=T3000_Data.value.panelsData.filter((e=>e.pid!==t.panel_id));T3000_Data.value.panelsData.length,t.data&&t.data.length;T3000_Data.value.panelsData=T3000_Data.value.panelsData.concat(t.data);T3000_Data.value.panelsData.length;const e={};T3000_Data.value.panelsData.forEach((t=>{e[t.pid]=(e[t.pid]||0)+1}));const i=Object.keys(e).filter((t=>e[t]>1));i.length>0&&LogUtil.Debug("= ws: HandleGetPanelDataRes / WARNING: Found items with same PID after filtering!",i),T3000_Data.value.panelsData.sort(((t,e)=>t.pid-e.pid)),selectPanelOptions.value=T3000_Data.value.panelsData;const n=T3000_Data.value.panelsRanges.length;T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.filter((e=>e.pid!==t.panel_id));const s=T3000_Data.value.panelsRanges.length;T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.concat(t.ranges);const a=T3000_Data.value.panelsRanges.length;LogUtil.Debug("= ws: HandleGetPanelDataRes / ranges: before filter:",n,"after filter:",s,"after concat:",a,"new ranges added:",t.ranges?t.ranges.length:0),IdxUtils.refreshLinkedEntries(t.data),IdxUtils.refreshLinkedEntries2(t.data),LogUtil.Debug("= ws: HandleGetPanelDataRes / FINAL - panelsData length:",T3000_Data.value.panelsData.length),LogUtil.Debug("= ws: HandleGetPanelDataRes END ===================")}}HandleGetInitialDataRes(t){var e,i,n,s,a;LogUtil.Debug("= ws: HandleGetInitialDataRes / msgData:",t);if(!(null==(e=this.deviceOpt)?void 0:e.isCurrentDeviceMessage(t)))return void LogUtil.Debug("= ws: HandleGetInitialDataRes / not current device message, return");const o=t.data;null!=o&&localStorage.setItem("tempAppState",o);const r=JSON.parse(o);LogUtil.Debug("= ws: HandleGetInitialDataRes / GET_INITIAL_DATA_RES msgData-appState | needRefresh:",r,this.needRefresh),this.needRefresh&&(null==(i=this.deviceOpt)||i.syncTempAppStateToDeviceAppState(),null==(n=this.deviceOpt)||n.refreshDeviceAppState(),null==(s=this.deviceOpt)||s.refreshCurrentDevice(),grpNav.value=[t.entry],t.library&&(t.library=JSON.parse(t.library),library.value=t.library),setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100),this.clearInitialDataInterval(),null==(a=this.quasarUtil)||a.clearGlobalMsg("get_initial_data"))}HandleSaveGraphicRes(t){IdxUtils.saveGraphicData(t,this.$q)}HandleUpdateEntryRes(t){}HandleGetPanelsListRes(t){var e,i,n;const s=t.data;if(void 0===s)return;null==(e=this.deviceOpt)||e.initDeviceList(s),LogUtil.Debug("= ws: GET_PANELS_LIST_RES",null==(i=this.deviceOpt)?void 0:i.deviceList);const a=s.length>0?s[0].panel_number:null;null!==a&&this.GetPanelData(a);const o=JSON.parse(localStorage.getItem("currentDevice")||"{}");if(o&&!o.deviceId){const t=o.device,e=s.find((e=>e.panel_name===t));e&&(o.deviceId=e.panel_number,o.serialNumber=e.serial_number,localStorage.setItem("currentDevice",JSON.stringify(o)))}(null==(n=t.data)?void 0:n.length)&&(T3000_Data.value.panelsList=t.data,T3000_Data.value.loadingPanel=0)}HandleGetEntriesRes(t){t.data.forEach(((t,e)=>{var i,n;const s=T3000_Data.value.panelsData.findIndex((e=>e.index===t.index&&e.type===t.type&&e.pid===t.pid));if(-1!==s){const e=T3000_Data.value.panelsData[s],a="MON"===e.type&&(Array.isArray(e.input)||Array.isArray(e.range)||e.num_inputs>0),o="MON"===t.type&&!Array.isArray(t.input)&&!Array.isArray(t.range)&&!t.num_inputs,r=this.hasComplexDataStructures(e),l=!this.hasComplexDataStructures(t),h=r&&l;if(a&&o){LogUtil.Warn("🚨 DATA CORRUPTION PREVENTED! Attempted to replace detailed monitor config with simplified version:",{id:t.id,pid:t.pid,existingDetails:{input:!!e.input,range:!!e.range,num_inputs:e.num_inputs,inputLength:null==(i=e.input)?void 0:i.length},newDetails:{input:!!t.input,range:!!t.range,num_inputs:t.num_inputs,inputLength:null==(n=t.input)?void 0:n.length}});const s=["input","range","num_inputs","an_inputs"],a=Object.keys(e),o=Object.keys(t);a.filter((t=>o.includes(t))).filter((t=>!s.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else if(h){const i=this.getComplexFields(e),n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else T3000_Data.value.panelsData[s]=t}})),linkT3EntryDialog.value.active||(selectPanelOptions.value=T3000_Data.value.panelsData),IdxUtils.refreshLinkedEntries(t.data),IdxUtils.refreshLinkedEntries2(t.data)}HandleLoadGraphicEntryRes(t){var e,i;if(t.data=JSON.parse(t.data),appState.value=t.data,void 0!==appState.value.rulersGridVisible&&(rulersGridVisible.value=appState.value.rulersGridVisible),void 0!==appState.value.locked&&(locked.value=appState.value.locked),grpNav.value.length>1){const e=grpNav.value[grpNav.value.length-2];e.index!==t.entry.index||e.pid!==t.entry.pid?grpNav.value.push(t.entry):grpNav.value.pop()}else grpNav.value.push(t.entry);setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100);const n=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();n&&(null==(i=this.deviceOpt)||i.refreshGraphicPanelElementCount(n))}HandleOpenEntryEditWindowRes(t){}HandleSaveImageRes(t){library.value.imagesCount++,library.value.images.push({id:"IMG-"+library.value.imagesCount,name:t.data.name,path:t.data.path,online:!1}),IdxUtils.saveLib()}HandleSaveLibraryDataRes(t){}HandleSaveNewLibraryDataRes(t){LogUtil.Debug("= ws: Handle SAVE_NEW_LIBRARY_DATA_RES",t.data)}HandleDeleteImageRes(t){}HandleGetAllDevicesDataRes(t){}HandleDataServerOnline(t){var e;this.GetPanelsList();const i=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice(),n=null==i?void 0:i.deviceId,s=null==i?void 0:i.graphic;n&&s&&this.GetInitialData(n,s)}initQuasar(t){this.$q=t}handleError(t){var e;if(!t&&!t.error)return;T3Util.Error("= ws: handleError/ messageData:",t);const i=null!=(e=null==t?void 0:t.error)?e:"";t.action===MessageType.GET_PANEL_DATA_RES||t.action===MessageType.GET_INITIAL_DATA_RES||t.action===MessageType.GET_PANELS_LIST_RES?this.handleSpecialMessage(t):""!==i&&T3UIUtil.ShowWebSocketError(i)}showSuccess(t){var e,i,n,s,a;const o=null!=(e=null==t?void 0:t.action)?e:-1,r=null!=(n=null==(i=null==t?void 0:t.data)?void 0:i.status)&&n;LogUtil.Debug("= ws: showSuccess | action:",o,"| status:",r),o==MessageType.LOAD_GRAPHIC_ENTRY_RES&&(null==(s=this.quasarUtil)||s.ShowLOAD_GRAPHIC_ENTRY_RESSuccess()),o==MessageType.GET_INITIAL_DATA_RES&&(null==(a=this.quasarUtil)||a.ShowGET_INITIAL_DATA_RESSuccess())}handleSpecialMessage(t){var e;const i=t.action;if(i==MessageType.GET_PANEL_DATA_RES||i==MessageType.GET_PANELS_LIST_RES){const e=`Load device data failed with error: "${t.error}". Please check whether the T3000 application is running or not.`;T3UIUtil.ShowWebSocketError(e),this.GetPanelsList()}if(i==MessageType.GET_INITIAL_DATA_RES){const i=`Load initial data failed with error: "${t.error}". Please try not update the graphic area, this may cause data loss. Please check whether the T3000 application is running or not.`;T3UIUtil.ShowWebSocketError(i),this.reloadInitialData(),null==(e=this.quasarUtil)||e.setGlobalMsg("error",i,!1,"get_initial_data",null)}}reloadInitialData(){this.needRefresh&&(this.reloadInitialDataInterval||(this.reloadInitialDataInterval=setInterval((()=>{var t;const e=null==(t=this.deviceOpt)?void 0:t.getCurrentDevice(),i=null==e?void 0:e.deviceId,n=null==e?void 0:e.graphic;i&&n&&this.GetInitialData(i,n)}),2e3)))}clearInitialDataInterval(){this.reloadInitialDataInterval&&clearInterval(this.reloadInitialDataInterval),this.reloadInitialDataInterval=null,LogUtil.Debug("= ws: clearInitialDataInterval / this.reloadInitialDataInterval ",this.reloadInitialDataInterval)}hasComplexDataStructures(t){if(!t||"object"!=typeof t)return!1;const e=Object.values(t).some((t=>Array.isArray(t))),i=Object.values(t).some((t=>t&&"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0)),n=({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"]}[t.type]||[]).some((e=>void 0!==t[e]));return e||i||n}getDataComplexityInfo(t){if(!t||"object"!=typeof t)return{simple:!0};const e=Object.keys(t).filter((e=>Array.isArray(t[e]))),i=Object.keys(t).filter((e=>t[e]&&"object"==typeof t[e]&&!Array.isArray(t[e])));return{totalFields:Object.keys(t).length,arrays:e.length,arrayFields:e,objects:i.length,objectFields:i,hasComplexity:this.hasComplexDataStructures(t)}}getComplexFields(t){if(!t||"object"!=typeof t)return[];const e=[];Object.keys(t).forEach((i=>{Array.isArray(t[i])&&e.push(i)})),Object.keys(t).forEach((i=>{t[i]&&"object"==typeof t[i]&&!Array.isArray(t[i])&&Object.keys(t[i]).length>0&&e.push(i)}));return({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"],PID:["parameters","settings","config"]}[t.type]||[]).forEach((i=>{void 0===t[i]||e.includes(i)||e.push(i)})),e}identifyRequestOrigin(t){for(const e of t){if(e.includes("IndexPageSocket"))return"TrendLogIndexPageSocket.vue";if(e.includes("IndexPage"))return"IndexPage.vue";if(e.includes("initializeT3000Data"))return"T3000_Data_Initialization";if(e.includes("onMounted"))return"Component_OnMounted_Lifecycle";if(e.includes("setTimeout"))return"Delayed_Timer_Execution";if(e.includes("HandleGetPanelsListRes"))return"Auto_Chain_After_PanelsList_Response";if(e.includes("HandleGetPanelDataRes"))return"Auto_Chain_After_PanelData_Response";if(e.includes("watch"))return"Vue_Reactive_Watcher";if(e.includes("loadTrendLogItemData"))return"Data_Loading_Function";if(e.includes("connect"))return"WebSocket_Connection_Establishment"}return"Unknown_Origin"}categorizeCallSource(t){const e=t.join(" ");return e.includes("initializeT3000Data")?"INITIALIZATION_REQUEST":e.includes("onMounted")?"COMPONENT_MOUNT_REQUEST":e.includes("setTimeout")?"DELAYED_EXECUTION_REQUEST":e.includes("HandleGetPanelsListRes")?"AUTO_CHAIN_AFTER_PANELS_LIST":e.includes("HandleGetPanelDataRes")?"AUTO_CHAIN_AFTER_PANEL_DATA":e.includes("watch")?"REACTIVE_WATCHER_TRIGGER":e.includes("loadTrendLogItemData")?"EXPLICIT_DATA_LOAD_REQUEST":e.includes("retry")||e.includes("Retry")?"USER_RETRY_REQUEST":e.includes("route")?"ROUTE_CHANGE_TRIGGER":e.includes("connect")?"WEBSOCKET_CONNECTION_TRIGGER":"MANUAL_OR_DIRECT_CALL"}getActionDetails(t){return{0:{name:"GET_PANEL_DATA",description:"Request panel data from T3000 backend",category:"Data_Request",implemented:!0,responseAction:"GET_PANEL_DATA_RES"},1:{name:"GET_INITIAL_DATA",description:"Request initial application data and state",category:"Initialization",implemented:!0,responseAction:"GET_INITIAL_DATA_RES"},2:{name:"SAVE_GRAPHIC_DATA",description:"Save graphic/layout data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_GRAPHIC_DATA_RES"},3:{name:"UPDATE_ENTRY",description:"Update a specific entry/field value",category:"Data_Update",implemented:!0,responseAction:"UPDATE_ENTRY_RES"},4:{name:"GET_PANELS_LIST",description:"Request list of available panels",category:"Data_Request",implemented:!0,responseAction:"GET_PANELS_LIST_RES"},5:{name:"GET_PANEL_RANGE_INFO",description:"Request panel range information",category:"Data_Request",implemented:!1,responseAction:"GET_PANEL_RANGE_INFO_RES"},6:{name:"GET_ENTRIES",description:"Request specific entries data",category:"Data_Request",implemented:!0,responseAction:"GET_ENTRIES_RES"},7:{name:"LOAD_GRAPHIC_ENTRY",description:"Load graphic entry for editing",category:"UI_Navigation",implemented:!0,responseAction:"LOAD_GRAPHIC_ENTRY_RES"},8:{name:"OPEN_ENTRY_EDIT_WINDOW",description:"Open entry edit window in T3000",category:"UI_Action",implemented:!0,responseAction:"OPEN_ENTRY_EDIT_WINDOW_RES"},9:{name:"SAVE_IMAGE",description:"Save image file to T3000 library",category:"File_Operation",implemented:!0,responseAction:"SAVE_IMAGE_RES"},10:{name:"SAVE_LIBRARY_DATA",description:"Save library data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_LIBRARY_DATA_RES"},11:{name:"DELETE_IMAGE",description:"Delete image from T3000 library",category:"File_Operation",implemented:!0,responseAction:"DELETE_IMAGE_RES"},12:{name:"GET_SELECTED_DEVICE_INFO",description:"Get information about selected device",category:"Device_Info",implemented:!0,responseAction:"GET_SELECTED_DEVICE_INFO_RES"},13:{name:"BIND_DEVICE",description:"Bind/connect to a device",category:"Device_Operation",implemented:!1,responseAction:"BIND_DEVICE_RES"},14:{name:"SAVE_NEW_LIBRARY_DATA",description:"Save new library data to T3000",category:"Data_Save",implemented:!1,responseAction:"SAVE_NEW_LIBRARY_DATA_RES"}}[t]||{name:"UNKNOWN_ACTION",description:`Unknown action code: ${t}`,category:"Unknown",implemented:!1,responseAction:"UNKNOWN_RES"}}}var wheel$1={exports:{}};function addWheelListener(t,e,i){t.addEventListener("wheel",e,i)}function removeWheelListener(t,e,i){t.removeEventListener("wheel",e,i)}wheel$1.exports=addWheelListener,wheel$1.exports.addWheelListener=addWheelListener,wheel$1.exports.removeWheelListener=removeWheelListener;var amator={exports:{}},NEWTON_ITERATIONS=4,NEWTON_MIN_SLOPE=.001,SUBDIVISION_PRECISION=1e-7,SUBDIVISION_MAX_ITERATIONS=10,kSplineTableSize=11,kSampleStepSize=1/(kSplineTableSize-1),float32ArraySupported="function"==typeof Float32Array;function A(t,e){return 1-3*e+3*t}function B(t,e){return 3*e-6*t}function C(t){return 3*t}function calcBezier(t,e,i){return((A(e,i)*t+B(e,i))*t+C(e))*t}function getSlope(t,e,i){return 3*A(e,i)*t*t+2*B(e,i)*t+C(e)}function binarySubdivide(t,e,i,n,s){var a,o,r=0;do{(a=calcBezier(o=e+(i-e)/2,n,s)-t)>0?i=o:e=o}while(Math.abs(a)>SUBDIVISION_PRECISION&&++r<SUBDIVISION_MAX_ITERATIONS);return o}function newtonRaphsonIterate(t,e,i,n){for(var s=0;s<NEWTON_ITERATIONS;++s){var a=getSlope(e,i,n);if(0===a)return e;e-=(calcBezier(e,i,n)-t)/a}return e}function LinearEasing(t){return t}var src=function(t,e,i,n){if(!(0<=t&&t<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&i===n)return LinearEasing;for(var s=float32ArraySupported?new Float32Array(kSplineTableSize):new Array(kSplineTableSize),a=0;a<kSplineTableSize;++a)s[a]=calcBezier(a*kSampleStepSize,t,i);return function(a){return 0===a?0:1===a?1:calcBezier(function(e){for(var n=0,a=1,o=kSplineTableSize-1;a!==o&&s[a]<=e;++a)n+=kSampleStepSize;--a;var r=n+(e-s[a])/(s[a+1]-s[a])*kSampleStepSize,l=getSlope(r,t,i);return l>=NEWTON_MIN_SLOPE?newtonRaphsonIterate(e,r,t,i):0===l?r:binarySubdivide(e,n,n+kSampleStepSize,t,i)}(a),e,n)}},BezierEasing=src,animations={ease:BezierEasing(.25,.1,.25,1),easeIn:BezierEasing(.42,0,1,1),easeOut:BezierEasing(0,0,.58,1),easeInOut:BezierEasing(.42,0,.58,1),linear:BezierEasing(0,0,1,1)};function animate$1(t,e,i){var n=Object.create(null),s=Object.create(null),a="function"==typeof(i=i||{}).easing?i.easing:animations[i.easing];a||(i.easing,a=animations.ease);var o="function"==typeof i.step?i.step:noop$2,r="function"==typeof i.done?i.done:noop$2,l=getScheduler(i.scheduler),h=Object.keys(e);h.forEach((function(i){n[i]=t[i],s[i]=e[i]-t[i]}));var c,u="number"==typeof i.duration?i.duration:400,d=Math.max(1,.06*u),p=0;return c=l.next((function e(){var i=a(p/d);p+=1,function(e){h.forEach((function(i){t[i]=s[i]*e+n[i]}))}(i),p<=d?(c=l.next(e),o(t)):(c=0,setTimeout((function(){r(t)}),0))})),{cancel:function(){l.cancel(c),c=0}}}function noop$2(){}function getScheduler(t){if(!t)return"undefined"!=typeof window&&window.requestAnimationFrame?rafScheduler():timeoutScheduler();if("function"!=typeof t.next)throw new Error("Scheduler is supposed to have next(cb) function");if("function"!=typeof t.cancel)throw new Error("Scheduler is supposed to have cancel(handle) function");return t}function rafScheduler(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function timeoutScheduler(){return{next:function(t){return setTimeout(t,1e3/60)},cancel:function(t){return clearTimeout(t)}}}function makeAggregateRaf(){var t=new Set,e=new Set,i=0;return{next:n,cancel:n,clearAll:function(){t.clear(),e.clear(),cancelAnimationFrame(i),i=0}};function n(t){e.add(t),i||(i=requestAnimationFrame(s))}function s(){i=0;var n=e;e=t,(t=n).forEach((function(t){t()})),t.clear()}}amator.exports=animate$1,amator.exports.makeAggregateRaf=makeAggregateRaf,amator.exports.sharedScheduler=makeAggregateRaf();var ngraph_events=function(t){validateSubject(t);var e=createEventsStorage(t);return t.on=e.on,t.off=e.off,t.fire=e.fire,t};function createEventsStorage(t){var e=Object.create(null);return{on:function(i,n,s){if("function"!=typeof n)throw new Error("callback is expected to be a function");var a=e[i];return a||(a=e[i]=[]),a.push({callback:n,ctx:s}),t},off:function(i,n){if(void 0===i)return e=Object.create(null),t;if(e[i])if("function"!=typeof n)delete e[i];else for(var s=e[i],a=0;a<s.length;++a)s[a].callback===n&&s.splice(a,1);return t},fire:function(i){var n,s=e[i];if(!s)return t;arguments.length>1&&(n=Array.prototype.splice.call(arguments,1));for(var a=0;a<s.length;++a){var o=s[a];o.callback.apply(o.ctx,n)}return t}}}function validateSubject(t){if(!t)throw new Error("Eventify cannot use falsy object as events subject");for(var e=["on","fire","off"],i=0;i<e.length;++i)if(t.hasOwnProperty(e[i]))throw new Error("Subject cannot be eventified, since it already has property '"+e[i]+"'")}var kinetic_1=kinetic$1;function kinetic$1(t,e,i){"object"!=typeof i&&(i={});var n,s,a,o,r,l,h,c,u,d,p="number"==typeof i.minVelocity?i.minVelocity:5,g="number"==typeof i.amplitude?i.amplitude:.25,f="function"==typeof i.cancelAnimationFrame?i.cancelAnimationFrame:getCancelAnimationFrame(),m="function"==typeof i.requestAnimationFrame?i.requestAnimationFrame:getRequestAnimationFrame();return{start:function(){n=t(),l=u=o=h=0,s=new Date,f(a),f(d),a=m(v)},stop:function(){f(a),f(d);var e=t();r=e.x,c=e.y,s=Date.now(),(o<-p||o>p)&&(r+=l=g*o);(h<-p||h>p)&&(c+=u=g*h);d=m(b)},cancel:function(){f(a),f(d)}};function v(){var e=Date.now(),i=e-s;s=e;var r=t(),l=r.x-n.x,c=r.y-n.y;n=r;var u=1e3/(1+i);o=.8*l*u+.2*o,h=.8*c*u+.2*h,a=m(v)}function b(){var t=Date.now()-s,i=!1,n=0,a=0;l&&((n=-l*Math.exp(-t/342))>.5||n<-.5?i=!0:n=l=0),u&&((a=-u*Math.exp(-t/342))>.5||a<-.5?i=!0:a=u=0),i&&(e(r+n,c+a),d=m(b))}}function getCancelAnimationFrame(){return"function"==typeof cancelAnimationFrame?cancelAnimationFrame:clearTimeout}function getRequestAnimationFrame(){return"function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){return setTimeout(t,16)}}var createTextSelectionInterceptor_1=createTextSelectionInterceptor$1;function createTextSelectionInterceptor$1(t){if(t)return{capture:noop$1,release:noop$1};var e,i,n,s=!1;return{capture:function(t){s=!0,i=window.document.onselectstart,n=window.document.ondragstart,window.document.onselectstart=disabled,(e=t).ondragstart=disabled},release:function(){if(!s)return;s=!1,window.document.onselectstart=i,e&&(e.ondragstart=n)}}}function disabled(t){return t.stopPropagation(),!1}function noop$1(){}var transform=Transform$1;function Transform$1(){this.x=0,this.y=0,this.scale=1}var svgController={exports:{}};function makeSvgController$1(t,e){if(!isSVGElement(t))throw new Error("svg element is required for svg.panzoom to work");var i=t.ownerSVGElement;if(!i)throw new Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");return e.disableKeyboardInteraction||i.setAttribute("tabindex",0),{getBBox:function(){var e=t.getBBox();return{left:e.x,top:e.y,width:e.width,height:e.height}},getScreenCTM:function(){var t=i.getCTM();if(!t)return i.getScreenCTM();return t},getOwner:function(){return i},applyTransform:function(e){t.setAttribute("transform","matrix("+e.scale+" 0 0 "+e.scale+" "+e.x+" "+e.y+")")},initTransform:function(e){var n=t.getCTM();null===n&&(n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix());e.x=n.e,e.y=n.f,e.scale=n.a,i.removeAttributeNS(null,"viewBox")}}}function isSVGElement(t){return t&&t.ownerSVGElement&&t.getCTM}svgController.exports=makeSvgController$1,svgController.exports.canAttach=isSVGElement;var domController={exports:{}};function makeDomController$1(t,e){if(!isDomElement(t))throw new Error("panzoom requires DOM element to be attached to the DOM tree");var i=t.parentElement;return t.scrollTop=0,e.disableKeyboardInteraction||i.setAttribute("tabindex",0),{getBBox:function(){return{left:0,top:0,width:t.clientWidth,height:t.clientHeight}},getOwner:function(){return i},applyTransform:function(e){t.style.transformOrigin="0 0 0",t.style.transform="matrix("+e.scale+", 0, 0, "+e.scale+", "+e.x+", "+e.y+")"}}}function isDomElement(t){return t&&t.parentElement&&t.style}domController.exports=makeDomController$1,domController.exports.canAttach=isDomElement;var wheel=wheel$1.exports,animate=amator.exports,eventify=ngraph_events,kinetic=kinetic_1,createTextSelectionInterceptor=createTextSelectionInterceptor_1,domTextSelectionInterceptor=createTextSelectionInterceptor(),fakeTextSelectorInterceptor=createTextSelectionInterceptor(!0),Transform=transform,makeSvgController=svgController.exports,makeDomController=domController.exports,defaultZoomSpeed=1,defaultDoubleTapZoomSpeed=1.75,doubleTapSpeedInMS=300,clickEventTimeInMS=200,panzoom=createPanZoom;function createPanZoom(t,e){var i=(e=e||{}).controller;if(i||(makeSvgController.canAttach(t)?i=makeSvgController(t,e):makeDomController.canAttach(t)&&(i=makeDomController(t,e))),!i)throw new Error("Cannot create panzoom for the current type of dom element");var n=i.getOwner(),s={x:0,y:0},a=!1,o=new Transform;i.initTransform&&i.initTransform(o);var r,l="function"==typeof e.filterKey?e.filterKey:noop,h="number"==typeof e.pinchSpeed?e.pinchSpeed:1,c=e.bounds,u="number"==typeof e.maxZoom?e.maxZoom:Number.POSITIVE_INFINITY,d="number"==typeof e.minZoom?e.minZoom:0,p="number"==typeof e.boundsPadding?e.boundsPadding:.05,g="number"==typeof e.zoomDoubleClickSpeed?e.zoomDoubleClickSpeed:defaultDoubleTapZoomSpeed,f=e.beforeWheel||noop,m=e.beforeMouseDown||noop,v="number"==typeof e.zoomSpeed?e.zoomSpeed:defaultZoomSpeed,b=parseTransformOrigin(e.transformOrigin),y=e.enableTextSelection?fakeTextSelectorInterceptor:domTextSelectionInterceptor;validateBounds(c),e.autocenter&&function(){var t,e,s=0,a=0,r=q();if(r)s=r.left,a=r.top,t=r.right-r.left,e=r.bottom-r.top;else{var l=n.getBoundingClientRect();t=l.width,e=l.height}var h=i.getBBox();if(0===h.width||0===h.height)return;var c=e/h.height,u=t/h.width,d=Math.min(u,c);o.x=-(h.left+h.width/2)*d+t/2+s,o.y=-(h.top+h.height/2)*d+e/2+a,o.scale=d}();var S,x,w,C,T,D,k,$,O,P,L=0,I=0,A=0,E=null,G=new Date,U=!1,F=!1;k="smoothScroll"in e&&!e.smoothScroll?rigidScroll():kinetic((function(){return{x:o.x,y:o.y}}),(function(t,e){yt(),H(t,e)}),e.smoothScroll);var M=!1;J();var _={dispose:function(){Z()},moveBy:X,moveTo:H,smoothMoveTo:function(t,e){X(t-o.x,e-o.y,!0)},centerOn:function(t){var e=t.ownerSVGElement;if(!e)throw new Error("ui element is required to be within the scene");var i=t.getBoundingClientRect(),n=i.left+i.width/2,s=i.top+i.height/2,a=e.getBoundingClientRect(),o=a.width/2-n,r=a.height/2-s;X(o,r,!0)},zoomTo:bt,zoomAbs:K,smoothZoom:mt,smoothZoomAbs:function(t,e,i){var n={scale:o.scale},s={scale:i};k.cancel(),yt(),O=animate(n,s,{step:function(i){K(t,e,i.scale)}})},showRectangle:function(t){var e=n.getBoundingClientRect(),i=B(e.width,e.height),s=t.right-t.left,a=t.bottom-t.top;if(!Number.isFinite(s)||!Number.isFinite(a))throw new Error("Invalid rectangle");var r=i.x/s,l=i.y/a,h=Math.min(r,l);o.x=-(t.left+s/2)*h+i.x/2,o.y=-(t.top+a/2)*h+i.y/2,o.scale=h},pause:function(){Z(),M=!0},resume:function(){M&&(J(),M=!1)},isPaused:function(){return M},getTransform:function(){return o},getMinZoom:function(){return d},setMinZoom:function(t){d=t},getMaxZoom:function(){return u},setMaxZoom:function(t){u=t},getTransformOrigin:function(){return b},setTransformOrigin:function(t){b=parseTransformOrigin(t)},getZoomSpeed:function(){return v},setZoomSpeed:function(t){if(!Number.isFinite(t))throw new Error("Zoom speed should be a number");v=t}};eventify(_);var N="number"==typeof e.initialX?e.initialX:o.x,R="number"==typeof e.initialY?e.initialY:o.y,j="number"==typeof e.initialZoom?e.initialZoom:o.scale;return N==o.x&&R==o.y&&j==o.scale||K(N,R,j),_;function B(t,e){if(i.getScreenCTM){var n=i.getScreenCTM(),a=n.a,o=n.d,r=n.e,l=n.f;s.x=t*a-r,s.y=e*o-l}else s.x=t,s.y=e;return s}function H(t,e){o.x=t,o.y=e,V(),Tt("pan"),W()}function z(t,e){H(o.x+t,o.y+e)}function V(){var t=q();if(t){var e,n,s,a,r=!1,l=(e=i.getBBox(),s=e.left,a=e.top,{left:(n={x:s*o.scale+o.x,y:a*o.scale+o.y}).x,top:n.y,right:e.width*o.scale+n.x,bottom:e.height*o.scale+n.y}),h=t.left-l.right;return h>0&&(o.x+=h,r=!0),(h=t.right-l.left)<0&&(o.x+=h,r=!0),(h=t.top-l.bottom)>0&&(o.y+=h,r=!0),(h=t.bottom-l.top)<0&&(o.y+=h,r=!0),r}}function q(){if(c){if("boolean"==typeof c){var t=n.getBoundingClientRect(),e=t.width,i=t.height;return{left:e*p,top:i*p,right:e*(1-p),bottom:i*(1-p)}}return c}}function W(){a=!0,r=window.requestAnimationFrame(Q)}function Y(t,e,i){if(isNaN$1(t)||isNaN$1(e)||isNaN$1(i))throw new Error("zoom requires valid numbers");var n=o.scale*i;if(n<d){if(o.scale===d)return;i=d/o.scale}if(n>u){if(o.scale===u)return;i=u/o.scale}var s=B(t,e);(o.x=s.x-i*(s.x-o.x),o.y=s.y-i*(s.y-o.y),c&&1===p&&1===d)?(o.scale*=i,V()):V()||(o.scale*=i);Tt("zoom"),W()}function K(t,e,i){Y(t,e,i/o.scale)}function X(t,e,i){if(!i)return z(t,e);$&&$.cancel();var n=0,s=0;$=animate({x:0,y:0},{x:t,y:e},{step:function(t){z(t.x-n,t.y-s),n=t.x,s=t.y}})}function J(){n.addEventListener("mousedown",ht,{passive:!1}),n.addEventListener("dblclick",lt,{passive:!1}),n.addEventListener("touchstart",et,{passive:!1}),n.addEventListener("keydown",tt,{passive:!1}),wheel.addWheelListener(n,gt,{passive:!1}),W()}function Z(){wheel.removeWheelListener(n,gt),n.removeEventListener("mousedown",ht),n.removeEventListener("keydown",tt),n.removeEventListener("dblclick",lt),n.removeEventListener("touchstart",et),r&&(window.cancelAnimationFrame(r),r=0),k.cancel(),dt(),pt(),y.release(),wt()}function Q(){a&&(a=!1,i.applyTransform(o),Tt("transform"),r=0)}function tt(t){var e=0,i=0,s=0;if(38===t.keyCode?i=1:40===t.keyCode?i=-1:37===t.keyCode?e=1:39===t.keyCode?e=-1:189===t.keyCode||109===t.keyCode?s=1:187!==t.keyCode&&107!==t.keyCode||(s=-1),!l(t,e,i,s)){if(e||i){t.preventDefault(),t.stopPropagation();var a=n.getBoundingClientRect();X(.05*(o=Math.min(a.width,a.height))*e,.05*o*i)}if(s){var o,r=St(100*s);bt((o=b?vt():{x:(h=n.getBoundingClientRect()).width/2,y:h.height/2}).x,o.y,r)}var h}}function et(t){if(function(t){if(e.onTouch&&!e.onTouch(t))return;t.stopPropagation(),t.preventDefault()}(t),st(),1===t.touches.length)return function(t){I=new Date;var e=ft(t.touches[0]);S=e;var i=B(e.x,e.y);x=i.x,w=i.y,C=x,T=w,k.cancel(),it()}(t,t.touches[0]);2===t.touches.length&&(D=rt(t.touches[0],t.touches[1]),P=!0,it())}function it(){U||(U=!0,document.addEventListener("touchmove",nt),document.addEventListener("touchend",ot),document.addEventListener("touchcancel",ot))}function nt(t){if(1===t.touches.length){t.stopPropagation();var e=B((u=ft(t.touches[0])).x,u.y),i=e.x-x,n=e.y-w;0!==i&&0!==n&&xt(),x=e.x,w=e.y,X(i,n)}else if(2===t.touches.length){P=!0;var s=t.touches[0],a=t.touches[1],o=rt(s,a),r=1+(o/D-1)*h,l=ft(s),c=ft(a);if(x=(l.x+c.x)/2,w=(l.y+c.y)/2,b){var u=vt();x=u.x,w=u.y}bt(x,w,r),D=o,t.stopPropagation(),t.preventDefault()}}function st(){A&&(clearTimeout(A),A=0)}function at(t){if(e.onClick){st();var i=x-C,n=w-T;Math.sqrt(i*i+n*n)>5||(A=setTimeout((function(){A=0,e.onClick(t)}),doubleTapSpeedInMS))}}function ot(t){if(st(),t.touches.length>0){var e=B((i=ft(t.touches[0])).x,i.y);x=e.x,w=e.y}else{var i,n=new Date;if(n-L<doubleTapSpeedInMS)if(b)mt((i=vt()).x,i.y,g);else mt(S.x,S.y,g);else n-I<clickEventTimeInMS&&at(t);L=n,wt(),pt()}}function rt(t,e){var i=t.clientX-e.clientX,n=t.clientY-e.clientY;return Math.sqrt(i*i+n*n)}function lt(t){!function(t){st(),e.onDoubleClick&&!e.onDoubleClick(t)||(t.preventDefault(),t.stopPropagation())}(t);var i=ft(t);b&&(i=vt()),mt(i.x,i.y,g)}function ht(t){if(st(),!m(t)){if(E=t,G=new Date,U)return t.stopPropagation(),!1;if(1===t.button&&null!==window.event||0===t.button){k.cancel();var e=ft(t),i=B(e.x,e.y);return C=x=i.x,T=w=i.y,document.addEventListener("mousemove",ct),document.addEventListener("mouseup",ut),y.capture(t.target||t.srcElement),!1}}}function ct(t){if(!U){xt();var e=ft(t),i=B(e.x,e.y),n=i.x-x,s=i.y-w;x=i.x,w=i.y,X(n,s)}}function ut(){new Date-G<clickEventTimeInMS&&at(E),y.release(),wt(),dt()}function dt(){document.removeEventListener("mousemove",ct),document.removeEventListener("mouseup",ut),F=!1}function pt(){document.removeEventListener("touchmove",nt),document.removeEventListener("touchend",ot),document.removeEventListener("touchcancel",ot),F=!1,P=!1,U=!1}function gt(t){if(!f(t)){k.cancel();var e=t.deltaY;t.deltaMode>0&&(e*=100);var i=St(e);if(1!==i){var n=b?vt():ft(t);bt(n.x,n.y,i),t.preventDefault()}}}function ft(t){var e=n.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}function mt(t,e,i){var n=o.scale,s={scale:n},a={scale:i*n};k.cancel(),yt(),O=animate(s,a,{step:function(i){K(t,e,i.scale)},done:Ct})}function vt(){var t=n.getBoundingClientRect();return{x:t.width*b.x,y:t.height*b.y}}function bt(t,e,i){return k.cancel(),yt(),Y(t,e,i)}function yt(){O&&(O.cancel(),O=null)}function St(t){return 1-Math.sign(t)*Math.min(.25,Math.abs(v*t/128))}function xt(){F||(Tt("panstart"),F=!0,k.start())}function wt(){F&&(P||k.stop(),Tt("panend"))}function Ct(){Tt("zoomend")}function Tt(t){_.fire(t,_)}}function parseTransformOrigin(t){if(t)return"object"==typeof t?(isNumber(t.x)&&isNumber(t.y)||failTransformOrigin(t),t):void failTransformOrigin()}function failTransformOrigin(t){throw new Error(["Cannot parse transform origin.","Some good examples:",'  "center center" can be achieved with {x: 0.5, y: 0.5}','  "top center" can be achieved with {x: 0.5, y: 0}','  "bottom right" can be achieved with {x: 1, y: 1}'].join("\n"))}function noop(){}function validateBounds(t){var e=typeof t;if("undefined"!==e&&"boolean"!==e&&!(isNumber(t.left)&&isNumber(t.top)&&isNumber(t.bottom)&&isNumber(t.right)))throw new Error("Bounds object is not valid. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}function isNumber(t){return Number.isFinite(t)}function isNaN$1(t){return Number.isNaN?Number.isNaN(t):t!=t}function rigidScroll(){return{start:noop,stop:noop,cancel:noop}}function autoRun(){if("undefined"!=typeof document){var t=document.getElementsByTagName("script");if(t){for(var e,i=0;i<t.length;++i){var n=t[i];if(n.src&&n.src.match(/\bpanzoom(\.min)?\.js/)){e=n;break}}if(e){var s=e.getAttribute("query");if(s){var a=e.getAttribute("name")||"pz",o=Date.now();!function t(){var i=document.querySelector(s);if(!i){return Date.now()-o<2e3?void setTimeout(t,100):void 0}var n=function(t){for(var e=t.attributes,i={},n=0;n<e.length;++n){var s=r(e[n]);s&&(i[s.name]=s.value)}return i}(e);window[a]=createPanZoom(i,n)}()}}}}function r(t){if(t.name&&("p"===t.name[0]&&"z"===t.name[1]&&"-"===t.name[2]))return{name:t.name.substr(3),value:JSON.parse(t.value)}}}autoRun();let panzoomInstance=null;class IdxPage{constructor(){var t;this.webview=null==(t=window.chrome)?void 0:t.webview,this.initZoom()}initPage(){Hvac$1.WebClient.initMessageHandler(),this.initGlobalNav(),this.isLoggedIn(),this.restoreAppState(),this.setDocMarginOffset(),this.initPanzoom(),this.initMessageClient(),this.initScorller(),this.initAutoSaveInterval(),this.initWindowListener(),this.refreshMoveableGuides(),this.resetPanzoom(),this.clearGrpSwitch()}initPage5(){Hvac$1.WebClient.initMessageHandler(),this.initGlobalNav(),this.isLoggedIn(),this.restoreAppState(),this.setDocMarginOffset(),this.initMessageClient(),this.initAutoSaveInterval(),this.initWindowListener5(),this.refreshMoveableGuides(),Hvac$1.UI.Initialize()}initQuasar(t){this.$q=t,Hvac$1.WebClient.initQuasar(this.$q),Hvac$1.QuasarUtil.initQuasar(this.$q)}zoomAction(t="in",e=null){"out"===t?this.zoom.value-=10:"set"===t?this.zoom.value=e:this.zoom.value+=10,LogUtil.Debug("= Idx zoomAction",this.zoom.value)}initWindowListener(){window.addEventListener("beforeunload",(function(t){Hvac$1.IdxPage.clearAutoSaveInterval(),Hvac$1.WsClient.clearInitialDataInterval()})),window.addEventListener("resize",(()=>{IdxPage.restDocumentAreaPosition(null)}))}initWindowListener5(){window.addEventListener("beforeunload",(function(t){Hvac$1.IdxPage.clearAutoSaveInterval(),Hvac$1.WsClient.clearInitialDataInterval()})),window.addEventListener("resize",(()=>{}))}initGlobalNav(){globalNav.value.title="HVAC Drawer",globalNav.value.back=null,globalNav.value.home="/"}restoreAppState(){var t;if(null==(t=this.webview)?void 0:t.postMessage)return;const e=Hvac$1.LsOpt.loadParsedAppStateLS();e&&(appState.value=e,rulersGridVisible.value=appState.value.rulersGridVisible)}setDocMarginOffset(){this.webview?(isBuiltInEdge.value=!0,documentAreaPosition.value.widthOffset="128px",documentAreaPosition.value.heightOffset="68px",viewportMargins.top=56):(isBuiltInEdge.value=!1,viewportMargins.top=117)}initPanzoom(){const t={maxZoom:4,minZoom:.1,zoomDoubleClickSpeed:1,filterKey:function(){return!0},beforeMouseDown:function(t){return!!locked.value||!t.altKey},beforeWheel:function(t){return!!locked.value}};panzoomInstance=panzoom(viewport.value,t),panzoomInstance.on("transform",(function(t){appState.value.viewportTransform=t.getTransform(),triggerRef(appState),IdxPage.restDocumentAreaPosition(t.getTransform()),Hvac$1.QuasarUtil.setLocalSettings("transform",t.getTransform())}))}resetPanzoom(){let t=appState.value.viewportTransform;(!t||0===t.x&&0===t.y&&1===t.scale)&&(t=Hvac$1.QuasarUtil.getLocalSettings("transform")),t&&panzoomInstance&&(panzoomInstance.zoomAbs(t.x,t.y,t.scale),panzoomInstance.moveTo(t.x,t.y))}clearGrpSwitch(){DataOpt.ClearGrpSwitch()}initZoom(){this.zoom=computed({get:()=>parseInt(100*appState.value.viewportTransform.scale+""),set(t){if(!t)return;const e=t/100,i=appState.value.viewportTransform.x,n=appState.value.viewportTransform.y;appState.value.viewportTransform.scale=e,panzoomInstance&&panzoomInstance.zoomAbs(i,n,e)}})}static restDocumentAreaPosition(t){const e=document.querySelector(".full-area");e&&(documentAreaPosition.value.workAreaPadding=locked.value?"0px":"110px",documentAreaPosition.value.hRulerWOffset=locked.value?"24px":"128px",documentAreaPosition.value.wpwWOffset=locked.value?"24px":"128px",documentAreaPosition.value.wpWOffset=locked.value?"26px":"136px",documentAreaPosition.value.hRuler={width:e.clientWidth,height:20},documentAreaPosition.value.vRuler={width:20,height:e.clientHeight},documentAreaPosition.value.hvGrid={width:e.clientWidth,height:e.clientHeight},documentAreaPosition.value.wiewPortWH={width:"calc(100vw - v-bind('documentAreaPosition.wpWOffset'))",height:"calc(100vh - 93px)"},documentAreaPosition.value.widthOffset=locked.value?"24px":"128px",isBuiltInEdge.value?documentAreaPosition.value.heightOffset=(locked.value,"68px"):documentAreaPosition.value.heightOffset=(locked.value,"115px"))}refreshMoveableGuides(){setTimeout((()=>{IdxUtils.refreshMoveableGuides()}),100)}handleScroll(t){documentAreaPosition.value.vRuler.height+=t.target.scrollTop,documentAreaPosition.value.hRuler.width+=t.target.scrollLeft,document.querySelector(".v-ruler").scroll(0,t.target.scrollTop),document.querySelector(".h-ruler").scroll(t.target.scrollLeft,0)}initScorller(){const t=document.querySelector(".viewport-wrapper");t.addEventListener("scroll",this.handleScroll),documentAreaPosition.value.hRuler={width:t.clientWidth,height:20},documentAreaPosition.value.vRuler={width:20,height:t.clientHeight},documentAreaPosition.value.hvGrid={width:t.clientWidth,height:t.clientHeight}}initFetchPanelEntryInterval(){var t;(null==(t=this.webview)?void 0:t.postMessage)&&(this.getPanelsInterval=setInterval((()=>{Hvac$1.WebClient.GetPanelsList()}),1e4),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(t.length<=0)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac$1.WebClient.GetEntries(null,null==e?void 0:e.index,e)}),1e4))}initMessageClient(){if(isBuiltInEdge.value)return Hvac$1.WebClient.GetInitialData(),Hvac$1.WebClient.GetPanelsList(),void this.initFetchPanelEntryInterval();isBuiltInEdge.value||this.initExternalBrowserOpt()}initExternalBrowserOpt(){isBuiltInEdge.value||(Hvac$1.WsClient.initQuasar(this.$q),Hvac$1.WsClient.connect(),setTimeout((()=>{const t=Hvac$1.DeviceOpt.getCurrentDevice();t?(deviceModel.value.active=!1,deviceModel.value.data=t,Hvac$1.WsClient.GetInitialData(t.deviceId,t.graphic,!0)):deviceModel.value.active=!0}),1e3),setInterval((function(){const t=IdxUtils.getLinkedEntries();if(0===t.length)return;const e=t.map((t=>({panelId:t.t3Entry.pid,index:t.t3Entry.index,type:T3_Types[t.t3Entry.type]})));Hvac$1.WsClient.GetEntries(e)}),1e4))}clearGetPanelsInterval(){this.getPanelsInterval&&clearInterval(this.getPanelsInterval)}clearIdx(){appState.value.selectedTargets=[],panzoomInstance&&(panzoomInstance.dispose(),panzoomInstance=null)}isLoggedIn(){this.$q.cookies.has("token")?(liveApi.get("hvacTools").then((async t=>{const e=await t.json();e.length>0&&(null==e||e.forEach((t=>{this.addOnlineLibImage(t)})))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("hvacObjectLibs").then((async t=>{const e=await t.json();e.length>0&&e.forEach((t=>{library.value.objLib.push({id:t.id,label:t.label,items:t.items,online:!0})}))})).catch((t=>{LogUtil.Debug(t)})),liveApi.get("me").then((async t=>{user.value=await t.json()})).catch((t=>{}))):user.value=null}T3UpdateEntryField(t,e){if(!e.t3Entry)return;let i=e.t3Entry[t];const n=i;Math.abs(i)>=1e3&&(i/=1e3),"value"!==t&&"control"!==t||IdxUtils.refreshObjectStatus(e);const s={action:3,field:t,value:i,panelId:e.t3Entry.pid,entryIndex:e.t3Entry.index,entryType:T3_Types[e.t3Entry.type]};isBuiltInEdge.value?Hvac$1.WebClient.UpdateEntry(s):Hvac$1.WsClient.UpdateEntry(s),LogUtil.Debug("= Idx T3UpdateEntryField to T3 before, after",n,i)}newProject(){var t;if(isBuiltInEdge.value)appState.value=lodash.exports.cloneDeep(emptyProject),undoHistory.value=[],redoHistory.value=[],this.refreshMoveable(),(null==(t=this.webview)?void 0:t.postMessage)||localStorage.removeItem("appState");else{appState.value=lodash.exports.cloneDeep(emptyProject),undoHistory.value=[],redoHistory.value=[],this.refreshMoveable(),localStorage.setItem("appState",JSON.stringify(appState.value));const t=Hvac$1.DeviceOpt.getCurrentDevice(),e=Hvac$1.LsOpt.loadDeviceAppStateLS();if(t){const i=e.find((e=>e.device.device===t.device&&e.device.graphic===t.graphic));i&&(i.appState=lodash.exports.cloneDeep(emptyProject),localStorage.setItem("deviceAppState",JSON.stringify(e)))}localStorage.setItem("tempAppState",JSON.stringify(appState.value)),t.graphicFull.elementCount=0,localStorage.setItem("currentDevice",JSON.stringify(t))}}refreshMoveable(){setTimeout((()=>{moveable.value.updateRect()}),1)}save(t=!1,e=!1,i=!1){savedNotify.value=t,this.saveToLocal(),e&&this.saveToT3000(i)}prepareSaveData(){const t=lodash.exports.cloneDeep(toRaw(appState.value));return t.itemsCount=t.items.filter((t=>0!==t.width)).length,t.selectedTargets=[],t.elementGuidelines=[],t.rulersGridVisible=rulersGridVisible.value,t.locked=locked.value,t}saveToLocal(){const t=this.prepareSaveData();if(Hvac$1.LsOpt.saveAppState(t),!isBuiltInEdge.value){DataOpt.LoadGrpSwitch()||Hvac$1.DeviceOpt.saveDeviceAppState(deviceAppState,deviceModel,t)}}saveToT3000(t=!1){const e=this.prepareSaveData(),i=DataOpt.LoadGrpSwitch();LogUtil.Debug("= Idx saveToT3000 called:",{isAutoSave:t,hasGrpSwitch:!!i});const n=globalMsg.value.find((t=>"get_initial_data"===t.msgType)),s=globalMsg.value.find((t=>"load_graphic_entry"===t.msgType));if(n||s)LogUtil.Debug("= Idx save to T3000 - currently loading data, skip save to prevent race condition");else if(i)t?LogUtil.Debug("= Idx saveToT3000 - auto-save skipped during GRP navigation"):LogUtil.Debug("= Idx saveToT3000 - manual save skipped during GRP navigation to prevent race condition");else if(isBuiltInEdge.value)LogUtil.Debug("= Idx saveToT3000 using current device (null params)"),Hvac$1.WebClient.SaveGraphicData(null,null,e);else{const t=Hvac$1.DeviceOpt.getCurrentDevice();let i=null==t?void 0:t.deviceId,n=null==t?void 0:t.graphic;LogUtil.Debug("= Idx saveToT3000 using currentDevice:",{panelId:i,graphicId:n}),i&&n?Hvac$1.WsClient.SaveGraphic(i,n,e):LogUtil.Debug("= Idx save to T3000 current device is null")}}initAutoSaveInterval(){setTimeout((()=>{this.autoSaveInterval=setInterval((()=>{LogUtil.Debug("= Idx auto save every 30s",(new Date).toLocaleString()),this.save(!0,!0,!0)}),15e3)}),1e4)}clearAutoSaveInterval(){this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}addOnlineLibImage(t){const e=library.value.images.findIndex((e=>e.id==="IMG-"+t.id));-1!==e&&library.value.images.splice(e,1),library.value.images.push({id:"IMG-"+t.id,dbId:t.id,name:t.name,path:{}.API_URL+"/file/"+t.file.path,online:!0})}}class WebViewClient{constructor(){var t;this.webview=null==(t=window.chrome)?void 0:t.webview,this.messageHandlers={[MessageType.GET_PANEL_DATA_RES]:this.HandleGetPanelDataRes.bind(this),[MessageType.GET_INITIAL_DATA_RES]:this.HandleGetInitialDataRes.bind(this),[MessageType.SAVE_GRAPHIC_DATA_RES]:this.HandleSaveGraphicDataRes.bind(this),[MessageType.UPDATE_ENTRY_RES]:this.HandleUpdateEntryRes.bind(this),[MessageType.GET_PANELS_LIST_RES]:this.HandleGetPanelsListRes.bind(this),[MessageType.GET_ENTRIES_RES]:this.HandleGetEntriesRes.bind(this),[MessageType.LOAD_GRAPHIC_ENTRY_RES]:this.HandleLoadGraphicEntryRes.bind(this),[MessageType.OPEN_ENTRY_EDIT_WINDOW_RES]:this.HandleOpenEntryEditWindowRes.bind(this),[MessageType.SAVE_IMAGE_RES]:this.HandleSaveImageRes.bind(this),[MessageType.SAVE_LIBRARY_DATA_RES]:this.HandleSaveLibraryDataRes.bind(this),[MessageType.SAVE_NEW_LIBRARY_DATA_RES]:this.HandleSaveNewLibraryDataRes.bind(this),[MessageType.DELETE_IMAGE_RES]:this.HandleDeleteImageRes.bind(this)},this.message={}}setDependencies(t,e,i){this.deviceOpt=t,this.idxPage=e,this.idxUtils=i}initMessageHandler(){this.webview&&this.webview.addEventListener("message",this.handleMessage.bind(this))}initQuasar(t){this.$q=t}sendMessage(t){if(!this.webview)return void LogUtil.Debug("= Wv2 window.chrome.webview is not available");const e=this.getActionDetails(null==t?void 0:t.action),i=new Date,n=`${i.toLocaleTimeString()}.${i.getMilliseconds().toString().padStart(3,"0")}`;this.webview.postMessage(t),LogUtil.Debug(`= Wv2 Sent message to T3 [${n}], action= ${e.name} | ${null==t?void 0:t.action}, message=`,t)}handleMessage(t){var e;const i=null!=(e=null==t?void 0:t.data)?e:{},n=new Date,s=`${n.toLocaleTimeString()}.${n.getMilliseconds().toString().padStart(3,"0")}`,a=this.getActionDetails(null==i?void 0:i.action);LogUtil.Debug(`= Wv2 Received message from T3 [${s}], action= ${null==i?void 0:i.action} | ${"UNKNOWN_ACTION"==a.name?-1:a.name}, message=`,i);try{this.processMessageData(i)}catch(o){T3Util.Error("= wv2: handleMessage failed to parse | process data:",o)}}FormatMessageData(t,e,i,n){this.setMessageData(t,e,i,n),this.messageData=this.message}FormatUpdateEntryData(t){this.message={},this.message.action=MessageType.UPDATE_ENTRY,this.message.field=t.field,this.message.value=t.value,this.message.panelId=t.panelId,this.message.entryIndex=t.entryIndex,this.message.entryType=t.entryType,this.message.viewitem=t.entryIndex,this.messageData=this.message}FormatSaveImageData(t){this.message={},this.message.action=MessageType.SAVE_IMAGE,this.message.filename=t.filename,this.message.fileLength=t.fileLength,this.message.fileData=t.fileData,this.message.viewitem=t.entryIndex,this.messageData=this.message}FormatLoadGraphicEntryData(t){this.message={},this.message.action=MessageType.LOAD_GRAPHIC_ENTRY,this.message.panelId=t.panelId,this.message.entryIndex=t.entryIndex,this.message.viewitem=t.entryIndex,this.messageData=this.message}FormatOpenEntryEditWindowData(t){this.message={},this.message.action=MessageType.OPEN_ENTRY_EDIT_WINDOW,this.message.panelId=t.panelId,this.message.entryType=t.entryType,this.message.entryIndex=t.entryIndex,this.messageData=this.message}setMessageData(t,e,i,n){var s,a,o;this.message={};let r=null;if(this.deviceOpt&&"function"==typeof this.deviceOpt.getSerialNumber)try{r=this.deviceOpt.getSerialNumber(e)}catch(l){}if(!r){const t=new URLSearchParams(window.location.search).get("sn");t&&(r=parseInt(t,10),isNaN(r)&&(r=t))}if(!r&&e&&void 0!==T3000_Data&&(null==(s=T3000_Data.value)?void 0:s.panelsList)){const t=T3000_Data.value.panelsList.find((t=>t.panel_number===e));t&&t.serial_number&&(r=t.serial_number)}null!=t&&(this.message.action=t),null!=e&&(this.message.panelId=e),null!=i&&(this.message.viewitem=i-1,this.message.viewitem<0&&(this.message.viewitem=-1)),null!=n&&void 0!==n&&(this.message.data=n),this.message.msgId=Utils1.GenerateUUID();null!=e&&null!=r?(this.message.serialNumber=r,LogUtil.Debug("= Wv2 SetMessageData - Serial number resolved:",{panelId:e,serialNumber:r,method:this.deviceOpt?"deviceOpt":new URLSearchParams(window.location.search).get("sn")?"URL_param":"panels_list",action:t})):null!=e&&LogUtil.Warn("= Wv2 SetMessageData - No serial number found for panelId:",e,{hasDeviceOpt:!!this.deviceOpt,urlSn:new URLSearchParams(window.location.search).get("sn"),panelsListLength:void 0!==T3000_Data?(null==(o=null==(a=T3000_Data.value)?void 0:a.panelsList)?void 0:o.length)||0:"N/A"})}GetInitialData(t,e,i){this.FormatMessageData(MessageType.GET_INITIAL_DATA,t,e,i),this.sendMessage(this.messageData)}GetPanelsList(t,e,i){this.FormatMessageData(MessageType.GET_PANELS_LIST,t,e,i),this.sendMessage(this.messageData)}GetPanelData(t,e,i){this.FormatMessageData(MessageType.GET_PANEL_DATA,t,e,i),this.sendMessage(this.messageData)}GetEntries(t,e,i){this.FormatMessageData(MessageType.GET_ENTRIES,t,e,i),this.sendMessage(this.messageData)}SaveLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}SaveNewLibraryData(t,e,i){this.FormatMessageData(MessageType.SAVE_NEW_LIBRARY_DATA,t,e,i),this.sendMessage(this.messageData)}SaveGraphicData(t,e,i){this.FormatMessageData(MessageType.SAVE_GRAPHIC_DATA,t,e,i),this.sendMessage(this.messageData)}UpdateEntry(t){this.FormatUpdateEntryData(t),this.sendMessage(this.messageData)}SaveImage(t){this.FormatSaveImageData(t),this.sendMessage(this.messageData)}LoadGraphicEntry(t){this.FormatLoadGraphicEntryData(t),this.sendMessage(this.messageData)}OpenEntryEditWindow(t){this.FormatOpenEntryEditWindowData(t),this.sendMessage(this.messageData)}DeleteImage(t){this.FormatMessageData(MessageType.DELETE_IMAGE,null,null,t),this.sendMessage(this.messageData)}processMessageData(t){const e=this.messageHandlers[t.action];e?e(t):LogUtil.Warn("No handler for message action:",t.action,t)}HandleGetPanelDataRes(t){if((null==t?void 0:t.panel_id)&&this.idxPage.clearGetPanelsInterval(),null==t?void 0:t.panel_id){if(null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel<T3000_Data.value.panelsList.length-1){T3000_Data.value.loadingPanel++;const t=T3000_Data.value.loadingPanel;this.GetPanelData(T3000_Data.value.panelsList[t].panel_number)}null!==T3000_Data.value.loadingPanel&&T3000_Data.value.loadingPanel===T3000_Data.value.panelsList.length-1&&(T3000_Data.value.loadingPanel=null),T3000_Data.value.panelsData=T3000_Data.value.panelsData.filter((e=>e.pid!==t.panel_id)),T3000_Data.value.panelsData=T3000_Data.value.panelsData.concat(t.data),T3000_Data.value.panelsData.sort(((t,e)=>t.pid-e.pid)),selectPanelOptions.value=T3000_Data.value.panelsData,T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.filter((e=>e.pid!==t.panel_id)),T3000_Data.value.panelsRanges=T3000_Data.value.panelsRanges.concat(t.ranges),this.idxUtils.refreshLinkedEntries(t.data),this.idxUtils.refreshLinkedEntries2(t.data)}}HandleGetInitialDataRes(t){t.data=JSON.parse(t.data),appState.value=t.data,rulersGridVisible.value=appState.value.rulersGridVisible,void 0!==appState.value.locked&&(locked.value=appState.value.locked),grpNav.value=[t.entry],t.library&&(t.library=JSON.parse(t.library),library.value=t.library),setTimeout((()=>{this.idxUtils.refreshMoveableGuides()}),100)}HandleSaveGraphicDataRes(t){this.idxUtils.saveGraphicData(t,this.$q)}HandleUpdateEntryRes(t){}HandleGetPanelsListRes(t){var e;(null==(e=t.data)?void 0:e.length)&&(T3000_Data.value.panelsList=t.data,T3000_Data.value.loadingPanel=0,this.GetPanelData(T3000_Data.value.panelsList[0].panel_number))}HandleGetEntriesRes(t){LogUtil.Debug("= Wv2 Received message from T3 [HandleGetEntriesRes], msgData=",t),t.data&&t.data.length,t.data.forEach(((t,e)=>{const i=T3000_Data.value.panelsData.findIndex((e=>e.index===t.index&&e.type===t.type&&e.pid===t.pid));if(-1!==i){const e=T3000_Data.value.panelsData[i],n="MON"===e.type&&(Array.isArray(e.input)||Array.isArray(e.range)||e.num_inputs>0),s="MON"===t.type&&!Array.isArray(t.input)&&!Array.isArray(t.range)&&!t.num_inputs,a=this.hasComplexDataStructures(e),o=!this.hasComplexDataStructures(t),r=a&&o;if(n&&s){const i=["input","range","num_inputs","an_inputs"],n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else if(r){const i=this.getComplexFields(e),n=Object.keys(e),s=Object.keys(t);n.filter((t=>s.includes(t))).filter((t=>!i.includes(t))).forEach((i=>{e[i]!==t[i]&&(e[i]=t[i])}))}else T3000_Data.value.panelsData[i]=t}})),linkT3EntryDialog.value.active||(selectPanelOptions.value=T3000_Data.value.panelsData),this.idxUtils.refreshLinkedEntries(t.data),this.idxUtils.refreshLinkedEntries2(t.data)}HandleLoadGraphicEntryRes(t){var e,i;if(t.data=JSON.parse(t.data),appState.value=t.data,grpNav.value.length>1){const e=grpNav.value[grpNav.value.length-2];e.index!==t.entry.index||e.pid!==t.entry.pid?grpNav.value.push(t.entry):grpNav.value.pop()}else grpNav.value.push(t.entry);setTimeout((()=>{this.idxUtils.refreshMoveableGuides()}),100);const n=null==(e=this.deviceOpt)?void 0:e.getCurrentDevice();n&&(null==(i=this.deviceOpt)||i.refreshGraphicPanelElementCount(n))}HandleOpenEntryEditWindowRes(t){}HandleSaveImageRes(t){library.value.imagesCount++,library.value.images.push({id:"IMG-"+library.value.imagesCount,name:t.data.name,path:t.data.path,online:!1}),this.idxUtils.saveLib()}HandleSaveLibraryDataRes(t){}HandleSaveNewLibraryDataRes(t){LogUtil.Debug("= Wv2 Handle SAVE_NEW_LIBRARY_DATA_RES:",t)}HandleDeleteImageRes(t){}HandleGetAllDevicesDataRes(t){}hasComplexDataStructures(t){if(!t||"object"!=typeof t)return!1;const e=Object.values(t).some((t=>Array.isArray(t))),i=Object.values(t).some((t=>t&&"object"==typeof t&&!Array.isArray(t)&&Object.keys(t).length>0)),n=({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"]}[t.type]||[]).some((e=>void 0!==t[e]));return e||i||n}getDataComplexityInfo(t){if(!t||"object"!=typeof t)return{simple:!0};const e=Object.keys(t).filter((e=>Array.isArray(t[e]))),i=Object.keys(t).filter((e=>t[e]&&"object"==typeof t[e]&&!Array.isArray(t[e])));return{totalFields:Object.keys(t).length,arrays:e.length,arrayFields:e,objects:i.length,objectFields:i,hasComplexity:this.hasComplexDataStructures(t)}}getComplexFields(t){if(!t||"object"!=typeof t)return[];const e=[];Object.keys(t).forEach((i=>{Array.isArray(t[i])&&e.push(i)})),Object.keys(t).forEach((i=>{t[i]&&"object"==typeof t[i]&&!Array.isArray(t[i])&&Object.keys(t[i]).length>0&&e.push(i)}));return({MON:["input","range","num_inputs","an_inputs"],GRP:["items","controls","children"],SCH:["schedule","items","events"],PID:["parameters","settings","config"]}[t.type]||[]).forEach((i=>{void 0===t[i]||e.includes(i)||e.push(i)})),e}getActionDetails(t){return{0:{name:"GET_PANEL_DATA",description:"Request panel data from T3000 backend",category:"Data_Request",implemented:!0,responseAction:"GET_PANEL_DATA_RES"},1:{name:"GET_INITIAL_DATA",description:"Request initial application data and state",category:"Initialization",implemented:!0,responseAction:"GET_INITIAL_DATA_RES"},2:{name:"SAVE_GRAPHIC_DATA",description:"Save graphic/layout data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_GRAPHIC_DATA_RES"},3:{name:"UPDATE_ENTRY",description:"Update a specific entry/field value",category:"Data_Update",implemented:!0,responseAction:"UPDATE_ENTRY_RES"},4:{name:"GET_PANELS_LIST",description:"Request list of available panels",category:"Data_Request",implemented:!0,responseAction:"GET_PANELS_LIST_RES"},5:{name:"GET_PANEL_RANGE_INFO",description:"Request panel range information",category:"Data_Request",implemented:!1,responseAction:"GET_PANEL_RANGE_INFO_RES"},6:{name:"GET_ENTRIES",description:"Request specific entries data",category:"Data_Request",implemented:!0,responseAction:"GET_ENTRIES_RES"},7:{name:"LOAD_GRAPHIC_ENTRY",description:"Load graphic entry for editing",category:"UI_Navigation",implemented:!0,responseAction:"LOAD_GRAPHIC_ENTRY_RES"},8:{name:"OPEN_ENTRY_EDIT_WINDOW",description:"Open entry edit window in T3000",category:"UI_Action",implemented:!0,responseAction:"OPEN_ENTRY_EDIT_WINDOW_RES"},9:{name:"SAVE_IMAGE",description:"Save image file to T3000 library",category:"File_Operation",implemented:!0,responseAction:"SAVE_IMAGE_RES"},10:{name:"SAVE_LIBRARY_DATA",description:"Save library data to T3000",category:"Data_Save",implemented:!0,responseAction:"SAVE_LIBRARY_DATA_RES"},11:{name:"DELETE_IMAGE",description:"Delete image from T3000 library",category:"File_Operation",implemented:!0,responseAction:"DELETE_IMAGE_RES"},12:{name:"GET_SELECTED_DEVICE_INFO",description:"Get information about selected device",category:"Device_Info",implemented:!0,responseAction:"GET_SELECTED_DEVICE_INFO_RES"},13:{name:"BIND_DEVICE",description:"Bind/connect to a device",category:"Device_Operation",implemented:!1,responseAction:"BIND_DEVICE_RES"},14:{name:"SAVE_NEW_LIBRARY_DATA",description:"Save new library data to T3000",category:"Data_Save",implemented:!1,responseAction:"SAVE_NEW_LIBRARY_DATA_RES"}}[t]||{name:"UNKNOWN_ACTION",description:`Unknown action code: ${t}`,category:"Unknown",implemented:!1,responseAction:"UNKNOWN_RES"}}}const Hvac$1={PageMain:new PageMain,UI:new T3Opt,KiOpt:new KeyInsertOpt,QuasarUtil:new QuasarUtil,LsOpt:new LsOpt,DeviceOpt:new DeviceOpt,WsClient:new WebSocketClient,IdxPage:new IdxPage,WebClient:null,IdxUtils:IdxUtils,IdxPage2:new IdxPage2};Hvac$1.WsClient.setDependencies(Hvac$1.DeviceOpt,Hvac$1.IdxPage,Hvac$1.QuasarUtil),Hvac$1.WebClient=new WebViewClient,Hvac$1.IdxUtils.setDependencies(Hvac$1.WebClient,Hvac$1.DeviceOpt,Hvac$1.WsClient),Hvac$1.WebClient.setDependencies(Hvac$1.DeviceOpt,Hvac$1.IdxPage,Hvac$1.IdxUtils);export{identity as $,camelize as A,getDist$2 as B,between as C,DragScroll$1 as D,EVENTS as E,each$4 as F,Gesto as G,createHashMap as H,createSourceFromSeriesDataOption as I,SOURCE_FORMAT_ORIGINAL as J,isFunction as K,curry$1 as L,METHODS as M,makeSeriesEncodeForAxisCoordSys as N,prepareSeriesDataSchema as O,PROPERTIES as P,enableDataStack as Q,SeriesData$1 as R,SINGLE_REFERRING as S,isArray as T,getDataItemValue as U,CoordinateSystem as V,map$1 as W,getDimensionTypeByAxis as X,windingLine as Y,BoundingRect$1 as Z,__extends as _,Moveable as a,createOrUpdateImage as a$,mul as a0,invert as a1,applyTransform$1 as a2,min$1 as a3,max$1 as a4,filter as a5,makeInner as a6,makeLabelFormatter as a7,getOptionCategoryInterval as a8,getBoundingRect as a9,labelInner as aA,initProps as aB,indexOf as aC,updateProps$1 as aD,animateLabelValue as aE,isAroundZero as aF,ZRImage$1 as aG,normalizeColor as aH,getLineDash as aI,DEFAULT_PATH_STYLE as aJ,encodeHTML as aK,CompoundPath$1 as aL,isString as aM,createCubicEasingFunc as aN,copyTransform as aO,extend as aP,getSRTTransformString as aQ,getPathPrecision as aR,isNumber$1 as aS,liftColor as aT,TSpan$1 as aU,isLinearGradient as aV,isRadialGradient as aW,round4 as aX,getIdURL as aY,isImagePattern as aZ,assert as a_,shouldShowAllLabels as aa,getPixelPrecision as ab,linearMap as ac,round$1 as ad,PathProxy$1 as ae,Point$3 as af,DISPLAY_STATES as ag,retrieve2 as ah,Polyline$1 as ai,defaults as aj,SPECIAL_STATES as ak,Path$2 as al,dist$1 as am,lerp$1 as an,quadraticProjectPoint as ao,cubicProjectPoint as ap,normalizeRadian as aq,Transformable$1 as ar,keys as as,getECData as at,parsePercent as au,prepareLayoutList as av,shiftLayoutOnX as aw,shiftLayoutOnY as ax,hideOverlap as ay,isElementRemoved as az,getDistElementMatrix as b,getPercentSeats as b$,clone$3 as b0,DEFAULT_FONT as b1,adjustTextY$1 as b2,getLineHeight as b3,TEXT_ALIGN_TO_ANCHOR as b4,hasSeparateFont as b5,parseFontSize as b6,DEFAULT_FONT_FAMILY as b7,isGradient as b8,isPattern as b9,Rect$3 as bA,Sector$1 as bB,bind$1 as bC,convertToColorString as bD,setStatesStylesFromModel as bE,queryDataIndex as bF,ChartView$1 as bG,setStatesFlag as bH,ZRText$1 as bI,interpolateRawValues as bJ,LinearGradient$1 as bK,lerp as bL,createRenderPlanner as bM,inheritDefaultOption as bN,calculateTextPosition as bO,parsePercent$1 as bP,removeElementWithFadeOut as bQ,setLabelValueAnimation as bR,throttle as bS,Sausage as bT,createProgressiveLayout as bU,layout$2 as bV,normalizeArcAngles as bW,getLayoutRect as bX,retrieve3 as bY,createSeriesDataSimply as bZ,makeSeriesEncodeForNameBased as b_,getElementSSRData as ba,getMatrixStr as bb,hasShadow as bc,getShadowKey as bd,isObject$2 as be,getSize as bf,encodeBase64 as bg,noop$3 as bh,Group$4 as bi,createSymbol as bj,SeriesModel$1 as bk,retrieveRawValue as bl,enterEmphasis as bm,leaveEmphasis as bn,saveOldStyle as bo,getLabelStatesModels as bp,normalizeSymbolOffset as bq,setLabelStyle as br,toggleHoverEmphasis as bs,removeElement as bt,normalizeSymbolSize as bu,traverseElements as bv,isDimensionStacked as bw,createFloat32Array as bx,cubicRootAt as by,cubicAt as bz,createMatrix as c,fromPoints as c$,defaultEmphasis as c0,createLegacyDataSelectAction as c1,ComponentModel$1 as c2,mixin as c3,merge as c4,fetchLayoutMode as c5,getLayoutParams as c6,mergeLayoutParam as c7,OrdinalMeta$1 as c8,IntervalScale$1 as c9,mergePath as cA,registerAction as cB,isMiddleOrRightButtonOnMouseUpDown as cC,stop as cD,Eventful$1 as cE,hasOwn as cF,Ellipse$1 as cG,createFromString as cH,RadialGradient$1 as cI,trim as cJ,rotate as cK,scale$1 as cL,translate as cM,create as cN,getUID as cO,Displayable$1 as cP,setDefaultStateProxy as cQ,createOrUpdatePatternFromDecal as cR,setTooltipConfig as cS,enableComponentHighDownFeatures as cT,Z2_EMPHASIS_LIFT as cU,copy as cV,copy$1 as cW,mergeAll as cX,retrieve as cY,reduce as cZ,findEventDispatcher as c_,getScaleExtent as ca,increaseInterval as cb,estimateLabelUnionRect as cc,createScaleByModel as cd,isCartesian2DSeries as ce,findAxisModels as cf,getDataDimensionsOnAxis as cg,ifAxisCrossZero as ch,isIntervalOrLogScale as ci,niceScaleExtent as cj,layout$1 as ck,AxisBuilder$1 as cl,groupTransition as cm,AxisView$1 as cn,Line$3 as co,subPixelOptimizeLine as cp,ComponentView$1 as cq,use as cr,find as cs,Polygon$3 as ct,graphic as cu,retrieveVisualColorForTooltipMarker as cv,createTooltipMarkup as cw,Model$1 as cx,Circle$1 as cy,Ring$1 as cz,isObject$3 as d,getLayoutOnAxis as d$,concatArray as d0,HOVER_STATE_BLUR as d1,BezierCurve$1 as d2,convertOptionIdName as d3,getDecalFromPalette as d4,normalizeToArray as d5,positionElement as d6,getAvailableSize as d7,createTextStyle as d8,makeStyleMapper as d9,numericToNumber as dA,eqNaN as dB,createOrUpdate as dC,clear as dD,applyTransform as dE,asc as dF,transformDirection as dG,getTransform as dH,clipPointsByRect as dI,groupData as dJ,quantile as dK,SOURCE_FORMAT_ARRAY_ROWS as dL,throwError as dM,subPixelOptimize as dN,clone$1 as dO,quadraticDerivativeAt as dP,containStroke$4 as dQ,containStroke$2 as dR,platformApi as dS,isNumeric as dT,isRadianAroundZero as dU,lift as dV,TRANSFORMABLE_PROPS as dW,cloneValue as dX,isArrayLike as dY,getAnimationConfig as dZ,createTextConfig as d_,DataDiffer$1 as da,windowOpen as db,isHighDownDispatcher as dc,setAsHighDownDispatcher as dd,enableHoverFocus as de,normalizeCssArray$1 as df,fastLerp as dg,stringify as dh,parse as di,warn as dj,modifyHSL as dk,modifyAlpha as dl,MAX_SAFE_INTEGER as dm,clone$2 as dn,normalize$1 as dp,scale$2 as dq,create$1 as dr,sub as ds,len$1 as dt,set$1 as du,scaleAndAdd as dv,quadraticSubdivide as dw,quadraticAt as dx,distSquare as dy,defaultSeriesFormatTooltip as dz,isString$1 as e,install$6 as e$,getFont as e0,makePath as e1,getShapeClass as e2,install$5 as e3,buildElStyle as e4,buildLabelElOption as e5,BaseAxisPointer$1 as e6,makeLineShape as e7,makeSectorShape as e8,buildCartesianSingleLabelElOption as e9,TimeScale$1 as eA,OrdinalScale$1 as eB,getPrecision as eC,parseDataValue as eD,enterBlur as eE,leaveBlur as eF,getVisualFromData as eG,getStackedDimension as eH,symbolBuildProxies as eI,normalizeCssArray as eJ,compressBatches as eK,reformIntervals as eL,box as eM,getRawValueParser as eN,createFilterComparator as eO,isRegExp as eP,SortOrderComparator as eQ,SOURCE_FORMAT_OBJECT_ROWS as eR,SourceManager as eS,disableTransformOptionMerge as eT,SERIES_LAYOUT_BY_COLUMN as eU,IdxUtils as eV,cubicSubdivide as eW,clonePath as eX,SERIES_UNIVERSAL_TRANSITION_PROP as eY,getOldStyle as eZ,install$7 as e_,getTransformedPosition as ea,makeRectShape as eb,sizeCalculable as ec,formatTplSimple as ed,getLocaleModel as ee,parseDate as ef,mappingToExists as eg,copyLayoutParams as eh,LOCATION_PARAMS as ei,MULTIPLE_REFERRING as ej,unionAxisExtentFromData as ek,ensureScaleRawExtentInfo as el,createIcon as em,layout as en,makeBackground as eo,env$1 as ep,isDom as eq,addEventListener as er,parseFinder as es,registerInternalOptionCreator as et,makeInternalComponentId as eu,getItemVisualFromData as ev,setItemVisualFromData as ew,linePolygonIntersect as ex,DataFormatMixin as ey,enableHoverEmphasis as ez,getDocument as f,install$4 as f0,install$3 as f1,install as f2,Hvac$1 as f3,T3UIUtil as f4,DataOpt as f5,insertT3EntryDialog as f6,IdxPage as f7,getElementInfo$1 as f8,ObjectType as f9,getOverlapSize$1 as fa,WebViewClient as fb,T3Gv as fc,EvtOpt as fd,T3Constant as fe,NvConstant as ff,SelectUtil as fg,LockOutlined$1 as fh,UnlockOutlined$1 as fi,RulerUtil as fj,QuasarUtil as fk,AntdUtil as fl,getWindow as g,calculateMatrixDist as h,isUndefined as i,isNode as j,diff as k,fitPoints as l,isFunction$1 as m,addEvent as n,isArray$1 as o,getOverlapPoints as p,EventEmitter$1 as q,removeEvent as r,styled$1 as s,hasClass as t,addClass as u,calculateBoundSize as v,splitUnit as w,isInside as x,getAreaSize as y,Properties as z};
