dash-ant-design 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +135 -28
  2. package/dash_antd_components/async-audio-player.js +1 -0
  3. package/dash_antd_components/async-chart-ava.js +1 -0
  4. package/dash_antd_components/async-chart.js +1 -0
  5. package/dash_antd_components/async-data-entry.js +1 -0
  6. package/dash_antd_components/async-display.js +1 -1
  7. package/dash_antd_components/async-dnd-shared.js +1 -0
  8. package/dash_antd_components/async-dnd.js +1 -1
  9. package/dash_antd_components/async-feedback.js +1 -1
  10. package/dash_antd_components/async-form-upload.js +1 -0
  11. package/dash_antd_components/async-highlight-shared.js +1 -0
  12. package/dash_antd_components/async-highlight.js +1 -0
  13. package/dash_antd_components/async-icon-filled.js +1 -0
  14. package/dash_antd_components/async-icon-outlined.js +1 -0
  15. package/dash_antd_components/async-icon-twotone.js +1 -0
  16. package/dash_antd_components/async-infographic.js +1 -1
  17. package/dash_antd_components/async-locale-ar.js +1 -0
  18. package/dash_antd_components/async-locale-az.js +1 -0
  19. package/dash_antd_components/async-locale-bg.js +1 -0
  20. package/dash_antd_components/async-locale-bn.js +1 -0
  21. package/dash_antd_components/async-locale-by.js +1 -0
  22. package/dash_antd_components/async-locale-ca.js +1 -0
  23. package/dash_antd_components/async-locale-cs.js +1 -0
  24. package/dash_antd_components/async-locale-da.js +1 -0
  25. package/dash_antd_components/async-locale-de.js +1 -0
  26. package/dash_antd_components/async-locale-el.js +1 -0
  27. package/dash_antd_components/async-locale-en.js +1 -0
  28. package/dash_antd_components/async-locale-es.js +1 -0
  29. package/dash_antd_components/async-locale-et.js +1 -0
  30. package/dash_antd_components/async-locale-eu.js +1 -0
  31. package/dash_antd_components/async-locale-fa.js +1 -0
  32. package/dash_antd_components/async-locale-fi.js +1 -0
  33. package/dash_antd_components/async-locale-fr.js +1 -0
  34. package/dash_antd_components/async-locale-ga.js +1 -0
  35. package/dash_antd_components/async-locale-gl.js +1 -0
  36. package/dash_antd_components/async-locale-he.js +1 -0
  37. package/dash_antd_components/async-locale-hi.js +1 -0
  38. package/dash_antd_components/async-locale-hr.js +1 -0
  39. package/dash_antd_components/async-locale-hu.js +1 -0
  40. package/dash_antd_components/async-locale-hy.js +1 -0
  41. package/dash_antd_components/async-locale-id.js +1 -0
  42. package/dash_antd_components/async-locale-is.js +1 -0
  43. package/dash_antd_components/async-locale-it.js +1 -0
  44. package/dash_antd_components/async-locale-ja.js +1 -0
  45. package/dash_antd_components/async-locale-ka.js +1 -0
  46. package/dash_antd_components/async-locale-kk.js +1 -0
  47. package/dash_antd_components/async-locale-km.js +1 -0
  48. package/dash_antd_components/async-locale-kmr.js +1 -0
  49. package/dash_antd_components/async-locale-kn.js +1 -0
  50. package/dash_antd_components/async-locale-ko.js +1 -0
  51. package/dash_antd_components/async-locale-ku.js +1 -0
  52. package/dash_antd_components/async-locale-lt.js +1 -0
  53. package/dash_antd_components/async-locale-lv.js +1 -0
  54. package/dash_antd_components/async-locale-mk.js +1 -0
  55. package/dash_antd_components/async-locale-ml.js +1 -0
  56. package/dash_antd_components/async-locale-mn.js +1 -0
  57. package/dash_antd_components/async-locale-mr.js +1 -0
  58. package/dash_antd_components/async-locale-ms.js +1 -0
  59. package/dash_antd_components/async-locale-my.js +1 -0
  60. package/dash_antd_components/async-locale-nb.js +1 -0
  61. package/dash_antd_components/async-locale-ne.js +1 -0
  62. package/dash_antd_components/async-locale-nl.js +1 -0
  63. package/dash_antd_components/async-locale-pl.js +1 -0
  64. package/dash_antd_components/async-locale-pt.js +1 -0
  65. package/dash_antd_components/async-locale-ro.js +1 -0
  66. package/dash_antd_components/async-locale-ru.js +1 -0
  67. package/dash_antd_components/async-locale-si.js +1 -0
  68. package/dash_antd_components/async-locale-sk.js +1 -0
  69. package/dash_antd_components/async-locale-sl.js +1 -0
  70. package/dash_antd_components/async-locale-sq.js +1 -0
  71. package/dash_antd_components/async-locale-sr.js +1 -0
  72. package/dash_antd_components/async-locale-sv.js +1 -0
  73. package/dash_antd_components/async-locale-ta.js +1 -0
  74. package/dash_antd_components/async-locale-th.js +1 -0
  75. package/dash_antd_components/async-locale-tk.js +1 -0
  76. package/dash_antd_components/async-locale-tr.js +1 -0
  77. package/dash_antd_components/async-locale-uk.js +1 -0
  78. package/dash_antd_components/async-locale-ur.js +1 -0
  79. package/dash_antd_components/async-locale-uz.js +1 -0
  80. package/dash_antd_components/async-locale-vi.js +1 -0
  81. package/dash_antd_components/async-locale-zh.js +1 -0
  82. package/dash_antd_components/async-lottie.js +1 -0
  83. package/dash_antd_components/async-markdown.js +1 -1
  84. package/dash_antd_components/async-media-shared.js +1 -0
  85. package/dash_antd_components/async-media.js +1 -1
  86. package/dash_antd_components/async-navigation.js +1 -0
  87. package/dash_antd_components/async-picker.js +1 -1
  88. package/dash_antd_components/async-select.js +1 -1
  89. package/dash_antd_components/async-sheet.js +1 -0
  90. package/dash_antd_components/async-socket-io.js +1 -0
  91. package/dash_antd_components/async-table.js +1 -1
  92. package/dash_antd_components/async-tree.js +1 -1
  93. package/dash_antd_components/async-video-dash.js +1 -0
  94. package/dash_antd_components/async-video-hls.js +1 -0
  95. package/dash_antd_components/async-video-player.js +1 -0
  96. package/dash_antd_components/async-viz-canvas-shared.js +1 -0
  97. package/dash_antd_components/async-viz-shared.js +1 -0
  98. package/dash_antd_components/dash_antd_components.js +1 -1
  99. package/package.json +43 -44
  100. package/dash_antd_components/async-anchor.js +0 -1
  101. package/dash_antd_components/async-breadcrumb.js +0 -1
  102. package/dash_antd_components/async-cascader.js +0 -1
  103. package/dash_antd_components/async-controls.js +0 -1
  104. package/dash_antd_components/async-count.js +0 -1
  105. package/dash_antd_components/async-echarts.js +0 -1
  106. package/dash_antd_components/async-filled-icon.js +0 -1
  107. package/dash_antd_components/async-floating.js +0 -1
  108. package/dash_antd_components/async-form.js +0 -1
  109. package/dash_antd_components/async-g2.js +0 -1
  110. package/dash_antd_components/async-input.js +0 -1
  111. package/dash_antd_components/async-layout.js +0 -1
  112. package/dash_antd_components/async-locale.js +0 -1
  113. package/dash_antd_components/async-lunar-calendar.js +0 -1
  114. package/dash_antd_components/async-mentions.js +0 -1
  115. package/dash_antd_components/async-menu.js +0 -1
  116. package/dash_antd_components/async-outlined-icon.js +0 -1
  117. package/dash_antd_components/async-overlay.js +0 -1
  118. package/dash_antd_components/async-pagination.js +0 -1
  119. package/dash_antd_components/async-prism.js +0 -1
  120. package/dash_antd_components/async-s2.js +0 -1
  121. package/dash_antd_components/async-steps.js +0 -1
  122. package/dash_antd_components/async-tabs.js +0 -1
  123. package/dash_antd_components/async-transfer.js +0 -1
  124. package/dash_antd_components/async-twotone-icon.js +0 -1
  125. package/dash_antd_components/async-upload.js +0 -1
  126. package/dash_antd_components/proptypes.js +0 -5051
@@ -1 +0,0 @@
1
- (self.webpackChunkdash_antd_components=self.webpackChunkdash_antd_components||[]).push([["async-s2"],{"./node_modules/.pnpm/@antv+event-emitter@0.1.3/node_modules/@antv/event-emitter/esm/index.js"(e,t,A){"use strict";var n=function(){function e(){this._events={}}return e.prototype.on=function(e,t,A){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:t,once:!!A}),this},e.prototype.once=function(e,t){return this.on(e,t,!0)},e.prototype.emit=function(e){for(var t=this,A=[],n=1;n<arguments.length;n++)A[n-1]=arguments[n];var i=this._events["*"]||[],r=function(n){for(var i=n.length,r=0;r<i;r++)if(n[r]){var o=n[r],s=o.callback;o.once&&(n.splice(r,1),0===n.length&&delete t._events[e],i--,r--),s.apply(t,A)}};r(this._events[e]||[]),r(i)},e.prototype.off=function(e,t){if(e)if(t){for(var A=this._events[e]||[],n=A.length,i=0;i<n;i++)A[i].callback===t&&(A.splice(i,1),n--,i--);0===A.length&&delete this._events[e]}else delete this._events[e];else this._events={};return this},e.prototype.getEvents=function(){return this._events},e}();A.d(t,["A",0,n])},"./node_modules/.pnpm/@antv+g-canvas@2.2.0/node_modules/@antv/g-canvas/dist/index.esm.js"(e,t,A){"use strict";A.d(t,{A4:()=>ye});var n=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js"),i=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),r=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/callSuper.js"),o=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js"),s=A("./node_modules/.pnpm/@antv+g-lite@2.7.0/node_modules/@antv/g-lite/dist/index.esm.js"),a=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),l=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),u=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/slicedToArray.js");function c(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var h=0;function d(e){return"__private_"+h+++"_"+e}var f=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat4.js"),g=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec3.js"),p=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-nil.js"),v=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/process/arc-2-cubic.js"),m=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/clamp.js"),C=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-string.js"),w=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js"),y=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),B=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),E=A("./node_modules/.pnpm/@antv+g-math@3.1.0/node_modules/@antv/g-math/dist/index.esm.js"),x=d("renderState"),b=function(){function e(t){(0,i.A)(this,e),this.renderQueue=[],Object.defineProperty(this,x,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=f.vt(),this.dprMatrix=f.vt(),this.tmpMat4=f.vt(),this.vec3a=g.vt(),this.vec3b=g.vt(),this.vec3c=g.vt(),this.vec3d=g.vt(),this.canvasRendererPluginOptions=t}return(0,n.A)(e,[{key:"apply",value:function(t,A){var n=this;this.context=t;var i=this.context,r=i.config,o=i.camera,a=i.renderingService,l=i.renderingContext,h=i.pathGeneratorFactory,d=r.renderer.getConfig().enableRenderingOptimization;r.renderer.getConfig().enableDirtyCheck=!1,r.renderer.getConfig().enableDirtyRectangleRendering=!1,this.pathGeneratorFactory=h;var p=t.contextService,v=l.root.ownerDocument.defaultView;a.hooks.init.tap(e.tag,function(){var e=p.getDPR(),t=r.width,A=r.height,i=p.getContext();n.clearRect(i,0,0,t*e,A*e,r.background)}),a.hooks.destroy.tap(e.tag,function(){n.renderQueue=[],c(n,x)[x]={restoreStack:[],prevObject:null,currentContext:null}});var m=function(e,t){for(var i=[e];i.length>0;){var r,o=i.pop();o.isVisible()&&!o.isCulled()&&(d?n.renderDisplayObjectOptimized(o,t,n.context,c(n,x)[x],A):n.renderDisplayObject(o,t,n.context,c(n,x)[x],A));for(var s=(null===(r=o.sortable)||void 0===r||null===(r=r.sorted)||void 0===r?void 0:r.length)>0?o.sortable.sorted:o.childNodes,a=s.length-1;a>=0;a--)i.push(s[a])}};a.hooks.endFrame.tap(e.tag,function(){if(function(){var e,t=p.getContext(),A=p.getDPR(),i=r.width,o=r.height,s=n.canvasRendererPluginOptions,l=s.dirtyObjectNumThreshold,u=s.dirtyObjectRatioThreshold,c=a.getStats(),h=c.rendered,d=h/c.total;n.clearFullScreen=n.clearFullScreenLastFrame||!(null!==(e=v.context.renderingPlugins[1])&&void 0!==e&&e.isFirstTimeRenderingFinished)||a.disableDirtyRectangleRendering()||h>l&&d>u,t&&("function"==typeof t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),n.clearFullScreen&&n.clearRect(t,0,0,i*A,o*A,r.background))}(),0!==l.root.childNodes.length){d=r.renderer.getConfig().enableRenderingOptimization,c(n,x)[x]={restoreStack:[],prevObject:null,currentContext:c(n,x)[x].currentContext},c(n,x)[x].currentContext.clear(),n.clearFullScreenLastFrame=!1;var e=p.getContext(),t=p.getDPR();if(f.CV(n.dprMatrix,[t,t,1]),f.lw(n.vpMatrix,n.dprMatrix,o.getOrthoMatrix()),n.clearFullScreen)d?(e.save(),m(l.root,e),e.restore()):m(l.root,e);else{var i=n.safeMergeAABB(n.mergeDirtyAABBs(n.renderQueue));if(s.F5.isEmpty(i))return void(n.renderQueue=[]);var h=n.convertAABB2Rect(i),C=h.x,w=h.y,y=h.width,B=h.height,E=g.Z0(n.vec3a,[C,w,0],n.vpMatrix),b=g.Z0(n.vec3b,[C+y,w,0],n.vpMatrix),F=g.Z0(n.vec3c,[C,w+B,0],n.vpMatrix),S=g.Z0(n.vec3d,[C+y,w+B,0],n.vpMatrix),T=Math.min(E[0],b[0],S[0],F[0]),L=Math.min(E[1],b[1],S[1],F[1]),Q=Math.max(E[0],b[0],S[0],F[0]),I=Math.max(E[1],b[1],S[1],F[1]),U=Math.floor(T),O=Math.floor(L),H=Math.ceil(Q-T),M=Math.ceil(I-L);e.save(),n.clearRect(e,U,O,H,M,r.background),e.beginPath(),e.rect(U,O,H,M),e.clip(),e.setTransform(n.vpMatrix[0],n.vpMatrix[1],n.vpMatrix[4],n.vpMatrix[5],n.vpMatrix[12],n.vpMatrix[13]),r.renderer.getConfig().enableDirtyRectangleRenderingDebug&&v.dispatchEvent(new s.up(s.N3.DIRTY_RECTANGLE,{dirtyRect:{x:U,y:O,width:H,height:M}}));var _=i.getMin(),k=(0,u.A)(_,2),R=k[0],N=k[1],D=i.getMax(),P=(0,u.A)(D,2);l.root.ownerDocument.elementsFromBBox(R,N,P[0],P[1]).sort(function(e,t){return e.sortable.renderOrder-t.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&n.renderDisplayObject(t,e,n.context,c(n,x)[x],A)}),e.restore(),n.renderQueue.forEach(function(e){n.saveDirtyAABB(e)}),n.renderQueue=[]}c(n,x)[x].restoreStack.forEach(function(){e.restore()}),c(n,x)[x].restoreStack=[]}else n.clearFullScreenLastFrame=!0}),a.hooks.render.tap(e.tag,function(e){n.clearFullScreen||n.renderQueue.push(e)})}},{key:"clearRect",value:function(e,t,A,n,i,r){e.clearRect(t,A,n,i),r&&(e.fillStyle=r,e.fillRect(t,A,n,i))}},{key:"renderDisplayObjectOptimized",value:function(e,t,A,n,i){var r=e.nodeName,o=!1,a=this.context.styleRendererFactory[r],l=this.pathGeneratorFactory[r],u=e.parsedStyle.clipPath;if(u){(!n.prevObject||!f.t2(u.getWorldTransform(),n.prevObject.getWorldTransform()))&&(this.applyWorldTransform(t,u),n.prevObject=null);var h=this.pathGeneratorFactory[u.nodeName];h&&(t.save(),o=!0,t.beginPath(),h(t,u.parsedStyle),t.closePath(),t.clip())}if(a){(!n.prevObject||!f.t2(e.getWorldTransform(),n.prevObject.getWorldTransform()))&&this.applyWorldTransform(t,e);var d=!n.prevObject;if(!d){var g=n.prevObject.nodeName;d=r===s.yp.TEXT?g!==s.yp.TEXT:r===s.yp.IMAGE?g!==s.yp.IMAGE:g===s.yp.TEXT||g===s.yp.IMAGE}a.applyStyleToContext(t,e,d,n),n.prevObject=e}l&&(t.beginPath(),l(t,e.parsedStyle),r!==s.yp.LINE&&r!==s.yp.PATH&&r!==s.yp.POLYLINE&&t.closePath()),a&&a.drawToContext(t,e,c(this,x)[x],this,i),o&&t.restore(),e.dirty(!1)}},{key:"renderDisplayObject",value:function(e,t,A,n,i){var r=e.nodeName,o=n.restoreStack[n.restoreStack.length-1];!o||e.compareDocumentPosition(o)&s.bP.DOCUMENT_POSITION_CONTAINS||(t.restore(),n.restoreStack.pop());var a=this.context.styleRendererFactory[r],l=this.pathGeneratorFactory[r],u=e.parsedStyle.clipPath;if(u){this.applyWorldTransform(t,u);var c=this.pathGeneratorFactory[u.nodeName];c&&(t.save(),n.restoreStack.push(e),t.beginPath(),c(t,u.parsedStyle),t.closePath(),t.clip())}a&&(this.applyWorldTransform(t,e),t.save(),this.applyAttributesToContext(t,e)),l&&(t.beginPath(),l(t,e.parsedStyle),r!==s.yp.LINE&&r!==s.yp.PATH&&r!==s.yp.POLYLINE&&t.closePath()),a&&(a.render(t,e.parsedStyle,e,A,this,i),t.restore()),e.dirty(!1)}},{key:"applyAttributesToContext",value:function(e,t){var A=t.parsedStyle,n=A.stroke,i=A.fill,r=A.opacity,o=A.lineDash,s=A.lineDashOffset;o&&e.setLineDash(o),(0,p.A)(s)||(e.lineDashOffset=s),(0,p.A)(r)||(e.globalAlpha*=r),(0,p.A)(n)||Array.isArray(n)||n.isNone||(e.strokeStyle=t.attributes.stroke),(0,p.A)(i)||Array.isArray(i)||i.isNone||(e.fillStyle=t.attributes.fill)}},{key:"convertAABB2Rect",value:function(e){var t=e.getMin(),A=e.getMax(),n=Math.floor(t[0]),i=Math.floor(t[1]);return{x:n,y:i,width:Math.ceil(A[0])-n,height:Math.ceil(A[1])-i}}},{key:"mergeDirtyAABBs",value:function(e){var t=new s.F5;return e.forEach(function(e){var A=e.getRenderBounds();t.add(A);var n=e.renderable.dirtyRenderBounds;n&&t.add(n)}),t}},{key:"saveDirtyAABB",value:function(e){var t=e.renderable;t.dirtyRenderBounds||(t.dirtyRenderBounds=new s.F5);var A=e.getRenderBounds();A&&t.dirtyRenderBounds.update(A.center,A.halfExtents)}},{key:"applyWorldTransform",value:function(e,t,A){A?(f.C(this.tmpMat4,t.getLocalTransform()),f.lw(this.tmpMat4,A,this.tmpMat4),f.lw(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(f.C(this.tmpMat4,t.getWorldTransform()),f.lw(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new s.F5,t=arguments.length,A=new Array(t),n=0;n<t;n++)A[n]=arguments[n];return A.forEach(function(t){e.add(t)}),e}}])}();function F(e,t,A,n,i,r,o){var s,a;if("rect"===e.image.nodeName){var l=e.image.parsedStyle,u=l.width,c=l.height;a=n.contextService.getDPR();var h=n.config.offscreenCanvas;(s=r.offscreenCanvasCreator.getOrCreateCanvas(h)).width=u*a,s.height=c*a;var d=r.offscreenCanvasCreator.getOrCreateContext(h),f={restoreStack:[],prevObject:null,currentContext:new Map};e.image.forEach(function(e){i.renderDisplayObject(e,d,n,f,r)}),f.restoreStack.forEach(function(){d.restore()})}return o.getOrCreatePatternSync(t,e,A,s,a,t.getGeometryBounds().min,function(){t.dirty(),n.renderingService.dirty()})}function S(e,t,A,n){var i;if(e.type===s.hq.LinearGradient||e.type===s.hq.RadialGradient){var r=t.getGeometryBounds(),o=r&&2*r.halfExtents[0]||1,a=r&&2*r.halfExtents[1]||1,u=r&&r.min||[0,0];i=n.getOrCreateGradient((0,l.A)((0,l.A)({type:e.type},e.value),{},{min:u,width:o,height:a}),A)}return i}b.tag="CanvasRenderer";var T=["shadowBlur","shadowOffsetX","shadowOffsetY"],L=["lineCap","lineJoin","miterLimit"],Q={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},I={};function U(e,t,A,n){var i=n.has(t)?n.get(t):Q[t];return i!==A&&("lineDash"===t?e.setLineDash(A):e[t]=A,n.set(t,A)),i}var O=function(){return(0,n.A)(function e(t){(0,i.A)(this,e),this.imagePool=t},[{key:"applyAttributesToContext",value:function(e,t){}},{key:"render",value:function(e,t,A,n,i,r){}},{key:"applyCommonStyleToContext",value:function(e,t,A,n){var i=A?I:n.prevObject.parsedStyle,r=t.parsedStyle;(A||r.opacity!==i.opacity)&&U(e,"globalAlpha",(0,p.A)(r.opacity)?Q.globalAlpha:r.opacity,n.currentContext),(A||r.blend!==i.blend)&&U(e,"globalCompositeOperation",(0,p.A)(r.blend)?Q.globalCompositeOperation:r.blend,n.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,t,A,n){var i=A?I:n.prevObject.parsedStyle,r=t.parsedStyle,o=r.lineWidth,s=r.fill&&!r.fill.isNone;if(r.stroke&&!r.stroke.isNone&&(void 0===o?Q.lineWidth:o)>0){(A||t.attributes.stroke!==n.prevObject.attributes.stroke)&&U(e,"strokeStyle",(0,p.A)(r.stroke)||Array.isArray(r.stroke)||r.stroke.isNone?Q.strokeStyle:t.attributes.stroke,n.currentContext),(A||r.lineWidth!==i.lineWidth)&&U(e,"lineWidth",(0,p.A)(r.lineWidth)?Q.lineWidth:r.lineWidth,n.currentContext),(A||r.lineDash!==i.lineDash)&&U(e,"lineDash",r.lineDash||Q.lineDash,n.currentContext),(A||r.lineDashOffset!==i.lineDashOffset)&&U(e,"lineDashOffset",(0,p.A)(r.lineDashOffset)?Q.lineDashOffset:r.lineDashOffset,n.currentContext);for(var a=0;a<L.length;a++){var l=L[a];(A||r[l]!==i[l])&&U(e,l,(0,p.A)(r[l])?Q[l]:r[l],n.currentContext)}}s&&(A||t.attributes.fill!==n.prevObject.attributes.fill)&&U(e,"fillStyle",(0,p.A)(r.fill)||Array.isArray(r.fill)||r.fill.isNone?Q.fillStyle:t.attributes.fill,n.currentContext)}},{key:"applyStyleToContext",value:function(e,t,A,n){var i=t.nodeName;this.applyCommonStyleToContext(e,t,A,n),i===s.yp.IMAGE||this.applyStrokeFillStyleToContext(e,t,A,n)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,t,A,n){var i=t.parsedStyle;if(A){U(e,"shadowColor",i.shadowColor.toString(),n.currentContext);for(var r=0;r<T.length;r++){var o=T[r];U(e,o,i[o]||Q[o],n.currentContext)}}i.filter&&i.filter.length&&U(e,"filter",t.attributes.filter,n.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(e,t,A,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t){U(e,"shadowColor",Q.shadowColor,n.currentContext);for(var r=0;r<T.length;r++){var o=T[r];U(e,o,Q[o],n.currentContext)}}if(A)if(t&&i){var s=e.filter;!(0,p.A)(s)&&s.indexOf("drop-shadow")>-1&&U(e,"filter",s.replace(/drop-shadow\([^)]*\)/,"").trim()||Q.filter,n.currentContext)}else U(e,"filter",Q.filter,n.currentContext)}},{key:"fillToContext",value:function(e,t,A,n,i){var r=this,o=t.parsedStyle,a=o.fill,l=o.fillRule,u=null;if(Array.isArray(a)&&a.length>0)a.forEach(function(n){var i=U(e,"fillStyle",S(n,t,e,r.imagePool),A.currentContext);u=null!=u?u:i,l?e.fill(l):e.fill()});else{if((0,s.Pt)(a)){var c=F(a,t,e,t.ownerDocument.defaultView.context,n,i,this.imagePool);c&&(e.fillStyle=c,u=!0)}l?e.fill(l):e.fill()}null!==u&&U(e,"fillStyle",u,A.currentContext)}},{key:"strokeToContext",value:function(e,t,A,n,i){var r=this,o=t.parsedStyle.stroke,a=null;if(Array.isArray(o)&&o.length>0)o.forEach(function(n){var i=U(e,"strokeStyle",S(n,t,e,r.imagePool),A.currentContext);a=null!=a?a:i,e.stroke()});else{if((0,s.Pt)(o)){var l=F(o,t,e,t.ownerDocument.defaultView.context,n,i,this.imagePool);if(l){var u=U(e,"strokeStyle",l,A.currentContext);a=null!=a?a:u}}e.stroke()}null!==a&&U(e,"strokeStyle",a,A.currentContext)}},{key:"drawToContext",value:function(e,t,A,n,i){var r,o=t.nodeName,a=t.parsedStyle,l=a.opacity,u=void 0===l?Q.globalAlpha:l,c=a.fillOpacity,h=void 0===c?Q.fillOpacity:c,d=a.strokeOpacity,f=void 0===d?Q.strokeOpacity:d,g=a.lineWidth,v=a.fill&&!a.fill.isNone,m=a.stroke&&!a.stroke.isNone&&(void 0===g?Q.lineWidth:g)>0;if(v||m){var C=!(0,p.A)(a.shadowColor)&&a.shadowBlur>0,w="inner"===a.shadowType,y=0===(null===(r=a.fill)||void 0===r?void 0:r.alpha),B=!(!a.filter||!a.filter.length),E=C&&m&&(o===s.yp.PATH||o===s.yp.LINE||o===s.yp.POLYLINE||y||w),x=null;if(v&&(E||this.applyShadowAndFilterStyleToContext(e,t,C,A),x=U(e,"globalAlpha",u*h,A.currentContext),this.fillToContext(e,t,A,n,i),E||this.clearShadowAndFilterStyleForContext(e,C,B,A)),m){var b=!1,F=U(e,"globalAlpha",u*f,A.currentContext);if(x=v?x:F,E&&(this.applyShadowAndFilterStyleToContext(e,t,C,A),b=!0,w)){var S=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,t,A,n,i),e.globalCompositeOperation=S,this.clearShadowAndFilterStyleForContext(e,C,B,A,!0)}this.strokeToContext(e,t,A,n,i),b&&this.clearShadowAndFilterStyleForContext(e,C,B,A)}null!==x&&U(e,"globalAlpha",x,A.currentContext)}}}])}(),H=function(e){function t(){return(0,i.A)(this,t),(0,r.A)(this,t,arguments)}return(0,o.A)(t,e),(0,n.A)(t,[{key:"render",value:function(e,t,A,n,i,r){var o=t.fill,a=t.fillRule,l=t.opacity,u=void 0===l?1:l,c=t.fillOpacity,h=void 0===c?1:c,d=t.stroke,f=t.strokeOpacity,g=void 0===f?1:f,v=t.lineWidth,m=void 0===v?1:v,C=t.lineCap,w=t.lineJoin,y=t.shadowType,B=t.shadowBlur,E=t.filter,x=t.miterLimit,b=o&&!o.isNone,F=d&&!d.isNone&&m>0,S=0===(null==o?void 0:o.alpha),T=!(!E||!E.length),L=!(0,p.A)(t.shadowColor)&&B>0,I=A.nodeName,U="inner"===y,O=F&&L&&(I===s.yp.PATH||I===s.yp.LINE||I===s.yp.POLYLINE||S||U);b&&(e.globalAlpha=u*h,O||M(A,e,L),_(e,A,o,a,n,i,r,this.imagePool),O||this.clearShadowAndFilter(e,T,L)),F&&(e.globalAlpha=u*g,e.lineWidth=m,(0,p.A)(x)||(e.miterLimit=x),(0,p.A)(C)||(e.lineCap=C),(0,p.A)(w)||(e.lineJoin=w),O&&(U&&(e.globalCompositeOperation="source-atop"),M(A,e,!0),U&&(k(e,A,d,n,i,r,this.imagePool),e.globalCompositeOperation=Q.globalCompositeOperation,this.clearShadowAndFilter(e,T,!0))),k(e,A,d,n,i,r,this.imagePool))}},{key:"clearShadowAndFilter",value:function(e,t,A){if(A&&(e.shadowColor="transparent",e.shadowBlur=0),t){var n=e.filter;!(0,p.A)(n)&&n.indexOf("drop-shadow")>-1&&(e.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(O);function M(e,t,A){var n=e.parsedStyle,i=n.filter,r=n.shadowColor,o=n.shadowBlur,s=n.shadowOffsetX,a=n.shadowOffsetY;i&&i.length&&(t.filter=e.style.filter),A&&(t.shadowColor=r.toString(),t.shadowBlur=o||0,t.shadowOffsetX=s||0,t.shadowOffsetY=a||0)}function _(e,t,A,n,i,r,o,a){var l=arguments.length>8&&void 0!==arguments[8]&&arguments[8];Array.isArray(A)?A.forEach(function(A){e.fillStyle=S(A,t,e,a),l||(n?e.fill(n):e.fill())}):((0,s.Pt)(A)&&(e.fillStyle=F(A,t,e,i,r,o,a)),l||(n?e.fill(n):e.fill()))}function k(e,t,A,n,i,r,o){var a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];Array.isArray(A)?A.forEach(function(A){e.strokeStyle=S(A,t,e,o),a||e.stroke()}):((0,s.Pt)(A)&&(e.strokeStyle=F(A,t,e,n,i,r,o)),a||e.stroke())}var R=function(e){function t(){return(0,i.A)(this,t),(0,r.A)(this,t,arguments)}return(0,o.A)(t,e),(0,n.A)(t,[{key:"renderDownSampled",value:function(e,t,A,n){var i=n.src,r=n.imageCache;r.downSampled?e.drawImage(r.downSampled,Math.floor(n.drawRect[0]),Math.floor(n.drawRect[1]),Math.ceil(n.drawRect[2]),Math.ceil(n.drawRect[3])):this.imagePool.createDownSampledImage(i,A).then(function(){A.ownerDocument&&(A.dirty(),A.ownerDocument.defaultView.context.renderingService.dirty())}).catch(function(e){console.error(e)})}},{key:"renderTile",value:function(e,t,A,n){var i=n.src,r=n.imageCache,o=n.imageRect,s=n.drawRect,a=r.size,l=e.getTransform(),u=l.a,c=l.b,h=l.c,d=l.d,f=l.e,g=l.f;if(e.resetTransform(),null!=r&&r.gridSize){for(var p=[a[0]/o[2],a[1]/o[3]],v=[r.tileSize[0]/p[0],r.tileSize[1]/p[1]],m=[Math.floor((s[0]-o[0])/v[0]),Math.ceil((s[0]+s[2]-o[0])/v[0])],C=m[0],w=m[1],y=[Math.floor((s[1]-o[1])/v[1]),Math.ceil((s[1]+s[3]-o[1])/v[1])],B=y[1],E=y[0];E<=B;E++)for(var x=C;x<=w;x++){var b=r.tiles[E][x];if(b){var F=[Math.floor(o[0]+b.tileX*v[0]),Math.floor(o[1]+b.tileY*v[1]),Math.ceil(v[0]),Math.ceil(v[1])];e.drawImage(b.data,F[0],F[1],F[2],F[3])}}e.setTransform(u,c,h,d,f,g)}else this.imagePool.createImageTiles(i,[],function(){A.ownerDocument&&(A.dirty(),A.ownerDocument.defaultView.context.renderingService.dirty())},A).catch(function(e){console.error(e)})}},{key:"render",value:function(e,A,n){var i=A.x,r=void 0===i?0:i,o=A.y,s=void 0===o?0:o,a=A.width,l=A.height,c=A.src,h=A.shadowColor,d=A.shadowBlur,v=this.imagePool.getImageSync(c,n),m=null==v?void 0:v.img,C=a,w=l;if(m){var y,B,E,x,b,F,S,T,L,Q,I,U,O,H,_,k,R,N,D,P,G;C||(C=m.width),w||(w=m.height),M(n,e,!(0,p.A)(h)&&d>0);try{var K=n.ownerDocument.defaultView.getContextService().getDomElement(),V=K.width,z=K.height,W=e.getTransform(),j=f.fA(W.a,W.c,0,0,W.b,W.d,0,0,0,0,1,0,W.e,W.f,0,1),X=(k=[r,s,C,w],R=j,N=g.Z0(g.vt(),[k[0],k[1],0],R),D=g.Z0(g.vt(),[k[0]+k[2],k[1],0],R),P=g.Z0(g.vt(),[k[0],k[1]+k[3],0],R),G=g.Z0(g.vt(),[k[0]+k[2],k[1]+k[3],0],R),[Math.min(N[0],D[0],P[0],G[0]),Math.min(N[1],D[1],P[1],G[1]),Math.max(N[0],D[0],P[0],G[0])-Math.min(N[0],D[0],P[0],G[0]),Math.max(N[1],D[1],P[1],G[1])-Math.min(N[1],D[1],P[1],G[1])]),Y=(y=X,E=(B=(0,u.A)([0,0,V,z],4))[0],x=B[1],b=B[2],F=B[3],T=(S=(0,u.A)(y,4))[0],L=S[1],Q=S[2],I=S[3],U=Math.max(E,T),O=Math.max(x,L),H=Math.min(E+b,T+Q),_=Math.min(x+F,L+I),H<=U||_<=O?null:[U,O,H-U,_-O]);if(!Y)return;if(!n.ownerDocument.defaultView.getConfig().enableLargeImageOptimization)return void t.renderFull(e,A,n,{image:m,drawRect:[r,s,C,w]});if(X[2]/v.size[0]<(v.downSamplingRate||.5))return void this.renderDownSampled(e,A,n,{src:c,imageCache:v,drawRect:[r,s,C,w]});if(!ImagePool.isSupportTile)return void t.renderFull(e,A,n,{image:m,drawRect:[r,s,C,w]});this.renderTile(e,A,n,{src:c,imageCache:v,imageRect:X,drawRect:Y})}catch(e){}}}},{key:"drawToContext",value:function(e,t,A,n,i){this.render(e,t.parsedStyle,t)}}],[{key:"renderFull",value:function(e,t,A,n){e.drawImage(n.image,Math.floor(n.drawRect[0]),Math.floor(n.drawRect[1]),Math.ceil(n.drawRect[2]),Math.ceil(n.drawRect[3]))}}])}(H),N=function(e){function t(){return(0,i.A)(this,t),(0,r.A)(this,t,arguments)}return(0,o.A)(t,e),(0,n.A)(t,[{key:"render",value:function(e,t,A,n,i,r){A.getBounds();var o=t.lineWidth,s=void 0===o?1:o,a=t.textAlign,l=void 0===a?"start":a,u=t.textBaseline,c=void 0===u?"alphabetic":u,h=t.lineJoin,d=void 0===h?"miter":h,f=t.miterLimit,g=void 0===f?10:f,v=t.letterSpacing,m=void 0===v?0:v,C=t.stroke,w=t.fill,y=t.fillRule,B=t.fillOpacity,E=void 0===B?1:B,x=t.strokeOpacity,b=void 0===x?1:x,F=t.opacity,S=void 0===F?1:F,T=t.metrics,L=t.x,Q=void 0===L?0:L,I=t.y,U=void 0===I?0:I,O=t.dx,H=t.dy,_=t.shadowColor,k=t.shadowBlur,R=t.textDecorationLine,N=T.lines,D=T.height,P=T.lineHeight,G=T.lineMetrics;e.font=T.font,e.lineWidth=s,e.textAlign="middle"===l?"center":l;var K=c;"alphabetic"===K&&(K="bottom"),e.lineJoin=d,(0,p.A)(g)||(e.miterLimit=g);var V=U;"middle"===c?V+=-D/2-P/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?V+=-D:"top"!==c&&"hanging"!==c||(V+=-P);var z=Q+(O||0);V+=H||0,1===N.length&&("bottom"===K?(K="middle",V-=.5*D):"top"===K&&(K="middle",V+=.5*D)),e.textBaseline=K,M(A,e,!(0,p.A)(_)&&k>0);for(var W=0;W<N.length;W++){var j=s/2+z;V+=P,(0,p.A)(C)||C.isNone||!s||this.drawLetterSpacing(e,A,N[W],G[W],l,j,V,m,w,y,E,C,b,S,!0,n,i,r),(0,p.A)(w)||this.drawLetterSpacing(e,A,N[W],G[W],l,j,V,m,w,y,E,C,b,S,!1,n,i,r)}R&&"none"!==R&&this.drawTextDecorations(e,t,A,N,P,z,U+(H||0),n,i,r)}},{key:"drawLetterSpacing",value:function(e,t,A,n,i,r,o,s,a,l,u,c,h,d,f,g,p,v){if(0!==s){var m=e.textAlign;e.textAlign="left";var C=r;"center"===i||"middle"===i?C=r-n.width/2:"right"!==i&&"end"!==i||(C=r-n.width);for(var w=Array.from(A),y=e.measureText(A).width,B=0,E=0;E<w.length;++E){var x=w[E];f?this.strokeText(e,t,x,C,o,c,h,g,p,v):this.fillText(e,t,x,C,o,a,l,u,d,g,p,v),C+=y-(B=e.measureText(A.substring(E+1)).width)+s,y=B}e.textAlign=m}else f?this.strokeText(e,t,A,r,o,c,h,g,p,v):this.fillText(e,t,A,r,o,a,l,u,d,g,p,v)}},{key:"fillText",value:function(e,t,A,n,i,r,o,s,a,l,u,c){var h;_(e,t,r,o,l,u,c,this.imagePool,!0);var d=!(0,p.A)(s)&&1!==s;d&&(h=e.globalAlpha,e.globalAlpha=s*a),e.fillText(A,n,i),d&&(e.globalAlpha=h)}},{key:"strokeText",value:function(e,t,A,n,i,r,o,s,a,l){var u;k(e,t,r,s,a,l,this.imagePool,!0);var c=!(0,p.A)(o)&&1!==o;c&&(u=e.globalAlpha,e.globalAlpha=o),e.strokeText(A,n,i),c&&(e.globalAlpha=u)}},{key:"drawTextDecorations",value:function(e,t,A,n,i,r,o,s,a,l){var u=t.textDecorationLine,c=t.textDecorationColor,h=t.textDecorationStyle,d=t.textDecorationThickness,f=void 0===d?1:d,g=t.textAlign,p=void 0===g?"start":g,v=t.lineWidth,m=void 0===v?1:v,C=t.metrics;if(u&&"none"!==u){var y=C.lineMetrics,B=u.split(" ");switch(e.lineWidth=f,c&&(e.strokeStyle="rgba(".concat(c.r,", ").concat(c.g,", ").concat(c.b,", ").concat(c.alpha,")")),h){case"dashed":e.setLineDash([5,5]);break;case"dotted":e.setLineDash([2,2]);break;default:e.setLineDash([])}var E=o,x=t.textBaseline,b=void 0===x?"alphabetic":x;"middle"===b?E+=-C.height/2-i/2:"bottom"===b||"alphabetic"===b||"ideographic"===b?E+=-C.height:"top"!==b&&"hanging"!==b||(E+=-i);for(var F=0;F<n.length;F++){E+=i;var S=y[F];if(S){var T=m/2,L=r,Q=r+S.width;"center"===p||"middle"===p?(L=r-S.width/2,Q=r+S.width/2):"right"!==p&&"end"!==p||(L=r-S.width,Q=r),L+=T,Q+=T;var I,U=(0,w.A)(B);try{for(U.s();!(I=U.n()).done;){var O=E;switch(I.value){case"underline":O+=2;break;case"overline":O-=i-2;break;case"line-through":O-=i/2;break;default:continue}"wavy"===h?this.drawWavyLine(e,L,Q,O):(e.beginPath(),e.moveTo(L,O),e.lineTo(Q,O),e.stroke())}}catch(e){U.e(e)}finally{U.f()}}}e.setLineDash([])}}},{key:"drawWavyLine",value:function(e,t,A,n){var i=Math.floor((A-t)/10);e.beginPath(),e.moveTo(t,n);for(var r=0;r<i;r++)e.quadraticCurveTo(t+10*r+2.5,n+2,t+10*r+5,n),e.quadraticCurveTo(t+10*r+7.5,n-2,t+10*(r+1),n);e.stroke()}},{key:"drawToContext",value:function(e,t,A,n,i){this.render(e,t.parsedStyle,t,t.ownerDocument.defaultView.context,n,i)}}])}(H),D=function(e){function t(){var e,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)(this,t),(e=(0,r.A)(this,t)).name="canvas-renderer",e.options=A,e}return(0,o.A)(t,e),(0,n.A)(t,[{key:"init",value:function(){var e,t=(0,l.A)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),A=this.context.imagePool,n=new H(A),i=((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)(e={},s.yp.CIRCLE,n),s.yp.ELLIPSE,n),s.yp.RECT,n),s.yp.IMAGE,new R(A)),s.yp.TEXT,new N(A)),s.yp.LINE,n),s.yp.POLYLINE,n),s.yp.POLYGON,n),s.yp.PATH,n),s.yp.GROUP,void 0),(0,a.A)((0,a.A)((0,a.A)(e,s.yp.HTML,void 0),s.yp.MESH,void 0),s.yp.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new b(t))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(s.V1),P=g.vt(),G=g.vt(),K=g.vt(),V=f.vt(),z=function(){function e(){var t=this;(0,i.A)(this,e),this.isHit=function(e,A,n,i){var r=t.context.pointInPathPickerFactory[e.nodeName];if(r){var o=f.B8(V,n),a=g.Z0(G,g.hZ(K,A[0],A[1],0),o);if(r(e,new s.uc(a[0],a[1]),i,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(e,A){var n=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[e.nodeName];return i&&(n.beginPath(),i(n,e.parsedStyle),n.closePath()),n.isPointInPath(A.x,A.y)}}return(0,n.A)(e,[{key:"apply",value:function(t,A){var n,i=this,r=t.renderingService,o=t.renderingContext;this.context=t,this.runtime=A;var s=null===(n=o.root)||void 0===n?void 0:n.ownerDocument;r.hooks.pick.tapPromise(e.tag,function(){var e=(0,B.A)((0,y.A)().mark(function e(t){return(0,y.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.pick(s,t));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(e.tag,function(e){return i.pick(s,e)})}},{key:"pick",value:function(e,t){var A,n=t.topmost,i=t.position,r=g.hZ(P,i.x,i.y,0),o=e.elementsFromBBox(r[0],r[1],r[0],r[1]),a=[],l=(0,w.A)(o);try{for(l.s();!(A=l.n()).done;){var u=A.value,c=u.getWorldTransform();if(this.isHit(u,r,c,!1)){var h=(0,s.zV)(u);if(h){var d=h.parsedStyle.clipPath;if(this.isHit(d,r,d.getWorldTransform(),!0)){if(n)return t.picked=[u],t;a.push(u)}}else{if(n)return t.picked=[u],t;a.push(u)}}}}catch(e){l.e(e)}finally{l.f()}return t.picked=a,t}}])}();function W(e,t,A){var n=e.parsedStyle,i=n.cx,r=n.cy,o=n.r,a=n.fill,l=n.stroke,c=n.lineWidth,h=n.increasedLineWidthForHitTesting,d=n.pointerEvents,f=void 0===d?"auto":d,g=((void 0===c?1:c)+(void 0===h?0:h))/2,p=(0,E.Io)(void 0===i?0:i,void 0===r?0:r,t.x,t.y),v=(0,s.Hh)(f,a,l),m=(0,u.A)(v,2),C=m[0],w=m[1];return C&&w||A?p<=o+g:C?p<=o:!!w&&p>=o-g&&p<=o+g}function j(e,t,A,n){return e/(A*A)+t/(n*n)}function X(e,t,A){var n=e.parsedStyle,i=n.cx,r=void 0===i?0:i,o=n.cy,a=void 0===o?0:o,l=n.rx,c=n.ry,h=n.lineWidth,d=void 0===h?1:h,f=n.increasedLineWidthForHitTesting,g=void 0===f?0:f,p=n.pointerEvents,v=t.x,m=t.y,C=(0,s.Hh)(void 0===p?"auto":p,n.fill,n.stroke),w=(0,u.A)(C,2),y=w[0],B=w[1],E=(d+g)/2,x=(v-r)*(v-r),b=(m-a)*(m-a);return y&&B||A?j(x,b,l+E,c+E)<=1:y?j(x,b,l,c)<=1:!!B&&j(x,b,l-E,c-E)>=1&&j(x,b,l+E,c+E)<=1}function Y(e,t,A,n,i,r){return i>=e&&i<=e+A&&r>=t&&r<=t+n}function q(e,t,A,n,i,r,o,s){var a=(Math.atan2(s-t,o-e)+2*Math.PI)%(2*Math.PI),l={x:e+A*Math.cos(a),y:t+A*Math.sin(a)};return(0,E.Io)(l.x,l.y,o,s)<=r/2}function Z(e,t,A,n,i,r,o){var s=Math.min(e,A),a=Math.max(e,A),l=Math.min(t,n),u=Math.max(t,n),c=i/2;return r>=s-c&&r<=a+c&&o>=l-c&&o<=u+c&&(0,E.M7)(e,t,A,n,r,o)<=i/2}function J(e,t,A,n,i){var r=e.length;if(r<2)return!1;for(var o=0;o<r-1;o++)if(Z(e[o][0],e[o][1],e[o+1][0],e[o+1][1],t,A,n))return!0;if(i){var s=e[0],a=e[r-1];if(Z(s[0],s[1],a[0],a[1],t,A,n))return!0}return!1}function $(e){return Math.abs(e)<1e-6?0:e<0?-1:1}function ee(e,t,A){return(A[0]-e[0])*(t[1]-e[1])===(t[0]-e[0])*(A[1]-e[1])&&Math.min(e[0],t[0])<=A[0]&&A[0]<=Math.max(e[0],t[0])&&Math.min(e[1],t[1])<=A[1]&&A[1]<=Math.max(e[1],t[1])}function te(e,t,A){var n=!1,i=e.length;if(i<=2)return!1;for(var r=0;r<i;r++){var o=e[r],s=e[(r+1)%i];if(ee(o,s,[t,A]))return!0;$(o[1]-A)>0!=$(s[1]-A)>0&&$(t-(A-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(n=!n)}return n}function Ae(e,t,A){for(var n=!1,i=0;i<e.length&&!(n=te(e[i],t,A));i++);return n}function ne(e,t,A){var n=e.parsedStyle,i=n.x1,r=n.y1,o=n.x2,a=n.y2,l=n.lineWidth,c=void 0===l?1:l,h=n.increasedLineWidthForHitTesting,d=void 0===h?0:h,f=n.pointerEvents,g=(0,s.Hh)(void 0===f?"auto":f,n.fill,n.stroke);return!(!(0,u.A)(g,2)[1]&&!A||!c)&&Z(i,r,o,a,c+d,t.x,t.y)}function ie(e,t,A,n,i,r){var o=e.parsedStyle,a=o.lineWidth,l=void 0===a?1:a,c=o.increasedLineWidthForHitTesting,h=void 0===c?0:c,d=o.d,f=o.pointerEvents,g=d.segments,p=d.hasArc,m=d.polylines,C=d.polygons,w=(0,s.Hh)(void 0===f?"auto":f,(null==C?void 0:C.length)&&o.fill,o.stroke),y=(0,u.A)(w,2),B=y[0],x=y[1],b=(0,s.tc)(e),F=!1;return B||A?F=p?n(e,t):Ae(C,t.x,t.y)||Ae(m,t.x,t.y):((x||A)&&(F=function(e,t,A,n,i){for(var r=!1,o=t/2,s=0;s<e.length;s++){var a=e[s],l=a.currentPoint,u=a.params,c=a.prePoint,h=a.box;if(!h||Y(h.x-o,h.y-o,h.width+t,h.height+t,A,n))switch(a.command){case"L":case"Z":if(r=Z(c[0],c[1],l[0],l[1],t,A,n))return!0;break;case"Q":if(r=(0,E.tT)(c[0],c[1],u[1],u[2],u[3],u[4],A,n)<=t/2)return!0;break;case"C":if(r=(0,E.Wp)(c[0],c[1],u[1],u[2],u[3],u[4],u[5],u[6],A,n,i)<=t/2)return!0;break;case"A":a.cubicParams||(a.cubicParams=(0,v.U)(c[0],c[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=a.cubicParams,f=c,g=0;g<d.length;g+=6){var p=(0,E.Wp)(f[0],f[1],d[g],d[g+1],d[g+2],d[g+3],d[g+4],d[g+5],A,n,i);if(f=[d[g+4],d[g+5]],r=p<=t/2)return!0}}}return r}(g,l+h,t.x,t.y,b)),F)}function re(e,t,A){var n=e.parsedStyle,i=n.lineWidth,r=void 0===i?1:i,o=n.increasedLineWidthForHitTesting,a=void 0===o?0:o,l=n.points,c=n.pointerEvents,h=(0,s.Hh)(void 0===c?"auto":c,n.fill,n.stroke),d=(0,u.A)(h,2),f=d[0],g=!1;return(d[1]||A)&&(g=J(l.points,r+a,t.x,t.y,!0)),g||!f&&!A||(g=te(l.points,t.x,t.y)),g}function oe(e,t,A){var n=e.parsedStyle,i=n.lineWidth,r=void 0===i?1:i,o=n.increasedLineWidthForHitTesting,a=void 0===o?0:o,l=n.points,c=n.pointerEvents,h=(0,s.Hh)(void 0===c?"auto":c,n.fill,n.stroke);return!(!(0,u.A)(h,2)[1]&&!A||!r)&&J(l.points,r+a,t.x,t.y,!1)}function se(e,t,A,n,i){var r=e.parsedStyle,o=r.radius,a=r.lineWidth,l=void 0===a?1:a,c=r.increasedLineWidthForHitTesting,h=void 0===c?0:c,d=r.x,f=void 0===d?0:d,g=r.y,p=void 0===g?0:g,v=r.width,C=r.height,w=r.pointerEvents,y=(0,s.Hh)(void 0===w?"auto":w,r.fill,r.stroke),B=(0,u.A)(y,2),E=B[0],x=B[1],b=l+h;if(o&&o.some(function(e){return 0!==e})){var F=!1;return(x||A)&&(F=function(e,t,A,n,i,r,o,s){var a=(0,u.A)(i,4),l=a[0],c=a[1],h=a[2],d=a[3];return Z(e+l,t,e+A-c,t,r,o,s)||Z(e+A,t+c,e+A,t+n-h,r,o,s)||Z(e+A-h,t+n,e+d,t+n,r,o,s)||Z(e,t+n-d,e,t+l,r,o,s)||q(e+A-c,t+c,c,Math,Math,r,o,s)||q(e+A-h,t+n-h,h,0,Math,r,o,s)||q(e+d,t+n-d,d,Math,Math,r,o,s)||q(e+l,t+l,l,Math,Math,r,o,s)}(f,p,v,C,o.map(function(e){return(0,m.A)(e,0,Math.min(Math.abs(v)/2,Math.abs(C)/2))}),b,t.x,t.y)),F||!E&&!A||(F=n(e,t)),F}var S=b/2;return E&&x||A?Y(f-S,p-S,v+S,C+S,t.x,t.y):E?Y(f,p,v,C,t.x,t.y):!!x&&function(e,t,A,n,i,r,o){var s=i/2;return Y(e-s,t-s,A,i,r,o)||Y(e+A-s,t-s,i,n,r,o)||Y(e+s,t+n-s,A,i,r,o)||Y(e-s,t+s,i,n,r,o)}(f,p,v,C,b,t.x,t.y)}function ae(e,t,A,n,i,r){var o=e.parsedStyle,a=o.pointerEvents,u=o.x,c=void 0===u?0:u,h=o.y,d=void 0===h?0:h,f=o.width,g=o.height;if("non-transparent-pixel"===(void 0===a?"auto":a)){var p=i.config.offscreenCanvas,v=r.offscreenCanvasCreator.getOrCreateCanvas(p),m=r.offscreenCanvasCreator.getOrCreateContext(p,{willReadFrequently:!0});return v.width=f,v.height=g,i.defaultStyleRendererFactory[s.yp.IMAGE].render(m,(0,l.A)((0,l.A)({},e.parsedStyle),{},{x:0,y:0}),e,void 0,void 0,void 0),m.getImageData(t.x-c,t.y-d,1,1).data.every(function(e){return 0!==e})}return!0}function le(e,t,A,n){var i=e.getGeometryBounds();return t.x>=i.min[0]&&t.y>=i.min[1]&&t.x<=i.max[0]&&t.y<=i.max[1]}z.tag="CanvasPicker";var ue=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),o=0;o<A;o++)n[o]=arguments[o];return(e=(0,r.A)(this,t,[].concat(n))).name="canvas-picker",e}return(0,o.A)(t,e),(0,n.A)(t,[{key:"init",value:function(){var e,t=((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)(e={},s.yp.CIRCLE,W),s.yp.ELLIPSE,X),s.yp.RECT,se),s.yp.LINE,ne),s.yp.POLYLINE,oe),s.yp.POLYGON,re),s.yp.PATH,ie),s.yp.TEXT,le),s.yp.GROUP,null),s.yp.IMAGE,ae),(0,a.A)((0,a.A)(e,s.yp.HTML,null),s.yp.MESH,null));this.context.pointInPathPickerFactory=t,this.addRenderingPlugin(new z)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(s.V1);function ce(e,t){var A=t.cx,n=t.cy;e.arc(void 0===A?0:A,void 0===n?0:n,t.r,0,2*Math.PI,!1)}function he(e,t){var A=t.cx,n=void 0===A?0:A,i=t.cy,r=void 0===i?0:i,o=t.rx,s=t.ry;if(e.ellipse)e.ellipse(n,r,o,s,0,0,2*Math.PI,!1);else{var a=o>s?o:s,l=o>s?1:o/s,u=o>s?s/o:1;e.save(),e.scale(l,u),e.arc(n,r,a,0,2*Math.PI)}}function de(e,t){var A,n,i=t.x1,r=t.y1,o=t.x2,a=t.y2,l=t.markerStart,u=t.markerEnd,c=t.markerStartOffset,h=t.markerEndOffset,d=0,f=0,g=0,p=0,v=0;l&&(0,s.y5)(l)&&c&&(A=o-i,n=a-r,v=Math.atan2(n,A),d=Math.cos(v)*(c||0),f=Math.sin(v)*(c||0)),u&&(0,s.y5)(u)&&h&&(A=i-o,n=r-a,v=Math.atan2(n,A),g=Math.cos(v)*(h||0),p=Math.sin(v)*(h||0)),e.moveTo(i+d,r+f),e.lineTo(o+g,a+p)}function fe(e,t){var A,n,i=t.markerStart,r=t.markerEnd,o=t.markerStartOffset,a=t.markerEndOffset,l=t.d,c=l.absolutePath,h=l.segments,d=0,f=0,g=0,p=0,v=0;if(i&&(0,s.y5)(i)&&o){var m=i.parentNode.getStartTangent(),C=(0,u.A)(m,2),w=C[0],y=C[1];A=w[0]-y[0],n=w[1]-y[1],v=Math.atan2(n,A),d=Math.cos(v)*(o||0),f=Math.sin(v)*(o||0)}if(r&&(0,s.y5)(r)&&a){var B=r.parentNode.getEndTangent(),E=(0,u.A)(B,2),x=E[0],b=E[1];A=x[0]-b[0],n=x[1]-b[1],v=Math.atan2(n,A),g=Math.cos(v)*(a||0),p=Math.sin(v)*(a||0)}for(var F=0;F<c.length;F++){var S=c[F],T=S[0],L=c[F+1],Q=(F===c.length-1||L&&("M"===L[0]||"Z"===L[0]))&&0!==g&&0!==p,I=(0,u.A)(0!==F||0===d&&0===f?[0,0]:[d,f],2),U=I[0],O=I[1],H=(0,u.A)(Q?[g,p]:[0,0],2),M=H[0],_=H[1];switch(T){case"M":e.moveTo(S[1]+U,S[2]+O);break;case"L":e.lineTo(S[1]+M,S[2]+_);break;case"Q":e.quadraticCurveTo(S[1],S[2],S[3]+M,S[4]+_);break;case"C":e.bezierCurveTo(S[1],S[2],S[3],S[4],S[5]+M,S[6]+_);break;case"A":var k=h[F].arcParams,R=k.cx,N=k.cy,D=k.rx,P=k.ry,G=k.startAngle,K=k.endAngle,V=k.xRotation,z=k.sweepFlag;if(e.ellipse)e.ellipse(R,N,D,P,V,G,K,!!(1-z));else{var W=D>P?D:P,j=D>P?1:D/P,X=D>P?P/D:1;e.translate(R,N),e.rotate(V),e.scale(j,X),e.arc(0,0,W,G,K,!!(1-z)),e.scale(1/j,1/X),e.rotate(-V),e.translate(-R,-N)}Q&&e.lineTo(S[6]+g,S[7]+p);break;case"Z":e.closePath()}}}function ge(e,t){var A,n,i=t.markerStart,r=t.markerEnd,o=t.markerStartOffset,a=t.markerEndOffset,l=t.points.points,u=l.length,c=l[0][0],h=l[0][1],d=l[u-1][0],f=l[u-1][1],g=0,p=0,v=0,m=0,C=0;i&&(0,s.y5)(i)&&o&&(A=l[1][0]-l[0][0],n=l[1][1]-l[0][1],C=Math.atan2(n,A),g=Math.cos(C)*(o||0),p=Math.sin(C)*(o||0)),r&&(0,s.y5)(r)&&a&&(A=l[u-1][0]-l[0][0],n=l[u-1][1]-l[0][1],C=Math.atan2(n,A),v=Math.cos(C)*(a||0),m=Math.sin(C)*(a||0)),e.moveTo(c+(g||v),h+(p||m));for(var w=1;w<u-1;w++){var y=l[w];e.lineTo(y[0],y[1])}e.lineTo(d,f)}function pe(e,t){var A,n,i=t.markerStart,r=t.markerEnd,o=t.markerStartOffset,a=t.markerEndOffset,l=t.points.points,u=l.length,c=l[0][0],h=l[0][1],d=l[u-1][0],f=l[u-1][1],g=0,p=0,v=0,m=0,C=0;i&&(0,s.y5)(i)&&o&&(A=l[1][0]-l[0][0],n=l[1][1]-l[0][1],C=Math.atan2(n,A),g=Math.cos(C)*(o||0),p=Math.sin(C)*(o||0)),r&&(0,s.y5)(r)&&a&&(A=l[u-2][0]-l[u-1][0],n=l[u-2][1]-l[u-1][1],C=Math.atan2(n,A),v=Math.cos(C)*(a||0),m=Math.sin(C)*(a||0)),e.moveTo(c+g,h+p);for(var w=1;w<u-1;w++){var y=l[w];e.lineTo(y[0],y[1])}e.lineTo(d+v,f+m)}function ve(e,t){var A=t.x,n=void 0===A?0:A,i=t.y,r=void 0===i?0:i,o=t.radius,s=t.width,a=t.height,l=s,c=a;if(o&&o.some(function(e){return 0!==e})){var h=s>0?1:-1,d=a>0?1:-1,f=h+d===0,g=o.map(function(e){return(0,m.A)(e,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}),p=(0,u.A)(g,4),v=p[0],C=p[1],w=p[2],y=p[3];e.moveTo(h*v+n,r),e.lineTo(l-h*C+n,r),0!==C&&e.arc(l-h*C+n,d*C+r,C,-d*Math.PI/2,h>0?0:Math.PI,f),e.lineTo(l+n,c-d*w+r),0!==w&&e.arc(l-h*w+n,c-d*w+r,w,h>0?0:Math.PI,d>0?Math.PI/2:1.5*Math.PI,f),e.lineTo(h*y+n,c+r),0!==y&&e.arc(h*y+n,c-d*y+r,y,d>0?Math.PI/2:-Math.PI/2,h>0?Math.PI:0,f),e.lineTo(n,d*v+r),0!==v&&e.arc(h*v+n,d*v+r,v,h>0?Math.PI:0,d>0?1.5*Math.PI:Math.PI/2,f)}else e.rect(n,r,l,c)}var me=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),o=0;o<A;o++)n[o]=arguments[o];return(e=(0,r.A)(this,t,[].concat(n))).name="canvas-path-generator",e}return(0,o.A)(t,e),(0,n.A)(t,[{key:"init",value:function(){var e,t=((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)(e={},s.yp.CIRCLE,ce),s.yp.ELLIPSE,he),s.yp.RECT,ve),s.yp.LINE,de),s.yp.POLYLINE,pe),s.yp.POLYGON,ge),s.yp.PATH,fe),s.yp.TEXT,void 0),s.yp.GROUP,void 0),s.yp.IMAGE,void 0),(0,a.A)((0,a.A)((0,a.A)(e,s.yp.HTML,void 0),s.yp.MESH,void 0),s.yp.FRAGMENT,void 0));this.context.pathGeneratorFactory=t}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(s.V1),Ce=function(){return(0,n.A)(function e(t){(0,i.A)(this,e),this.renderingContext=t.renderingContext,this.canvasConfig=t.config},[{key:"init",value:function(){var e=this.canvasConfig,t=e.container,A=e.canvas;if(A)this.$canvas=A,t&&A.parentElement!==t&&t.appendChild(A),this.$container=A.parentElement,this.canvasConfig.container=this.$container;else if(t&&(this.$container=(0,C.A)(t)?document.getElementById(t):t,this.$container)){var n=document.createElement("canvas");this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(e,t){this.dpr=this.canvasConfig.devicePixelRatio,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*t,(0,s.q8)(this.$canvas,e,t)),this.renderingContext.renderReasons.add(s.po.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:(e=(0,B.A)((0,y.A)().mark(function e(){var t,A=arguments;return(0,y.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.context.canvas.toDataURL((t=A.length>0&&void 0!==A[0]?A[0]:{}).type,t.encoderOptions));case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]);var e}(),we=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),o=0;o<A;o++)n[o]=arguments[o];return(e=(0,r.A)(this,t,[].concat(n))).name="canvas-context-register",e}return(0,o.A)(t,e),(0,n.A)(t,[{key:"init",value:function(){this.context.ContextService=Ce}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(s.V1),ye=function(e){function t(e){var A;return(0,i.A)(this,t),(A=(0,r.A)(this,t,[e])).registerPlugin(new we),A.registerPlugin(new s.$N.Plugin),A.registerPlugin(new me),A.registerPlugin(new D),A.registerPlugin(new s.Tj.Plugin),A.registerPlugin(new ue),A.registerPlugin(new s.ne.Plugin),A}return(0,o.A)(t,e),(0,n.A)(t)}(s.kp)},"./node_modules/.pnpm/@antv+g-lite@2.7.0/node_modules/@antv/g-lite/dist/index.esm.js"(e,t,A){"use strict";A.d(t,{F5:()=>Oe,kp:()=>Fe,V1:()=>be,Ks:()=>So,i7:()=>at,Aq:()=>nt,Hl:()=>Do,N3:()=>Ho,jl:()=>oo,K9:()=>ao,up:()=>sr,q9:()=>ro,Tj:()=>As,eg:()=>Ne,jX:()=>pr,Pp:()=>lo,Ns:()=>nr,hq:()=>sA,YJ:()=>uo,g3:()=>ho,ne:()=>$o,_V:()=>fo,$N:()=>qo,N1:()=>po,bP:()=>lr,wA:()=>mo,uc:()=>ke,tS:()=>wo,Ro:()=>Bo,NZ:()=>pt,rw:()=>Eo,po:()=>hr,yp:()=>Ee,EY:()=>bo,O5:()=>hn,Q_:()=>Ke,kU:()=>ze,zV:()=>ui,_H:()=>Pe,tc:()=>$A,y5:()=>eo,Hh:()=>pi,Pt:()=>IA,H0:()=>OA,pC:()=>Dn,fA:()=>Wr,q8:()=>ci});var n=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),i=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),r=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js"),o=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),s=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/callSuper.js"),a=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js"),l=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),u=A("./node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs"),c=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec3.js"),h=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec4.js"),d=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat4.js"),f={};A.r(f),A.d(f,{add:()=>d.WQ,adjoint:()=>d.KC,clone:()=>d.o8,copy:()=>d.C,create:()=>d.vt,decompose:()=>d.o,determinant:()=>d.a4,equals:()=>d.aI,exactEquals:()=>d.t2,frob:()=>d.O,fromQuat:()=>d.I0,fromQuat2:()=>d.yo,fromRotation:()=>d.$0,fromRotationTranslation:()=>d.U_,fromRotationTranslationScale:()=>d.o1,fromRotationTranslationScaleOrigin:()=>d.O7,fromScaling:()=>d.CV,fromTranslation:()=>d.kN,fromValues:()=>d.fA,fromXRotation:()=>d.hM,fromYRotation:()=>d.i1,fromZRotation:()=>d.N9,frustum:()=>d.$h,getRotation:()=>d.l,getScaling:()=>d.IL,getTranslation:()=>d.sC,identity:()=>d.D_,invert:()=>d.B8,lookAt:()=>d.t5,mul:()=>d.lK,multiply:()=>d.lw,multiplyScalar:()=>d.Ny,multiplyScalarAndAdd:()=>d.TV,ortho:()=>d.v3,orthoNO:()=>d.up,orthoZO:()=>d.W7,perspective:()=>d.fN,perspectiveFromFieldOfView:()=>d.nc,perspectiveNO:()=>d.Kp,perspectiveZO:()=>d.ef,rotate:()=>d.e$,rotateX:()=>d.eL,rotateY:()=>d.Z8,rotateZ:()=>d.Qr,scale:()=>d.hs,set:()=>d.hZ,str:()=>d.gx,sub:()=>d.jb,subtract:()=>d.Re,targetTo:()=>d.xI,translate:()=>d.Tl,transpose:()=>d.mg});var g=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat3.js"),p=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/quat.js"),v=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec2.js"),m=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number.js"),C=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/util/distance-square-root.js"),w=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-nil.js"),y=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-string.js"),B=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/clamp.js"),E=A("./node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"),x={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function b(e){return Array.isArray(e)&&e.every(function(e){var t=e[0].toLowerCase();return x[t]===e.length-1&&"achlmqstvz".includes(t)})}function F(e){return b(e)&&e.every(function(e){var t=e[0];return t===t.toUpperCase()})}function S(e){return F(e)&&e.every(function(e){return"ACLMQZ".includes(e[0])})}var T={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function L(e){for(var t=e.pathValue[e.segmentStart],A=t.toLowerCase(),n=e.data;n.length>=x[A]&&("m"===A&&n.length>2?(e.segments.push([t].concat(n.splice(0,2))),A="l",t="m"===t?"l":"L"):e.segments.push([t].concat(n.splice(0,x[A]))),x[A]););}function Q(e){var t=e.index,A=e.pathValue,n=A.charCodeAt(t);return 48===n?(e.param=0,void(e.index+=1)):49===n?(e.param=1,void(e.index+=1)):void(e.err='[path-util]: invalid Arc flag "'.concat(A[t],'", expecting 0 or 1 at index ').concat(t))}function I(e){return e>=48&&e<=57||43===e||45===e||46===e}function U(e){return e>=48&&e<=57}function O(e){var t,A=e.max,n=e.pathValue,i=e.index,r=i,o=!1,s=!1,a=!1,l=!1;if(r>=A)e.err="[path-util]: Invalid path value at index ".concat(r,', "pathValue" is missing param');else if(43!==(t=n.charCodeAt(r))&&45!==t||(t=n.charCodeAt(r+=1)),U(t)||46===t){if(46!==t){if(o=48===t,t=n.charCodeAt(r+=1),o&&r<A&&t&&U(t))return void(e.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(n[i],'" illegal number'));for(;r<A&&U(n.charCodeAt(r));)r+=1,s=!0;t=n.charCodeAt(r)}if(46===t){for(l=!0,r+=1;U(n.charCodeAt(r));)r+=1,a=!0;t=n.charCodeAt(r)}if(101===t||69===t){if(l&&!s&&!a)return void(e.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(n[r],'" invalid float exponent'));if(43!==(t=n.charCodeAt(r+=1))&&45!==t||(r+=1),!(r<A&&U(n.charCodeAt(r))))return void(e.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(n[r],'" invalid integer exponent'));for(;r<A&&U(n.charCodeAt(r));)r+=1}e.index=r,e.param=+e.pathValue.slice(i,r)}else e.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(n[r],'" is not a number')}function H(e){return 10===e||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e)}function M(e){for(var t=e.pathValue,A=e.max;e.index<A&&H(t.charCodeAt(e.index));)e.index+=1}function _(e){return 97==(32|e)}function k(e){var t=e.max,A=e.pathValue,n=e.index,i=A.charCodeAt(n),r=x[A[n].toLowerCase()];if(e.segmentStart=n,function(e){switch(32|e){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(e.index+=1,M(e),e.data=[],r){for(;;){for(var o=r;o>0;o-=1){if(!_(i)||3!==o&&4!==o?O(e):Q(e),e.err.length)return;e.data.push(e.param),M(e),e.index<t&&44===A.charCodeAt(e.index)&&(e.index+=1,M(e))}if(e.index>=e.max)break;if(!I(A.charCodeAt(e.index)))break}L(e)}else L(e);else e.err='[path-util]: Invalid path value "'.concat(A[n],'" is not a path command')}var R=function(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function N(e,t){var A=e[0],n=t.x1,i=t.y1,r=t.x2,o=t.y2,s=e.slice(1).map(Number),a=e;if("TQ".includes(A)||(t.qx=null,t.qy=null),"H"===A)a=["L",e[1],i];else if("V"===A)a=["L",n,e[1]];else if("S"===A){var l=2*n-r,u=2*i-o;t.x1=l,t.y1=u,a=["C",l,u].concat(s)}else if("T"===A){var c=2*n-t.qx,h=2*i-t.qy;t.qx=c,t.qy=h,a=["Q",c,h].concat(s)}else if("Q"===A){var d=s[1];t.qx=s[0],t.qy=d}return a}function D(e){if(S(e))return[].concat(e);for(var t=function(e){if(F(e))return[].concat(e);var t=function(e){if(b(e))return[].concat(e);var t=new R(e);for(M(t);t.index<t.max&&!t.err.length;)k(t);return t.err?t.err:t.segments}(e),A=0,n=0,i=0,r=0;return t.map(function(e){var t,o=e.slice(1).map(Number),s=e[0],a=s.toUpperCase();if("M"===s)return i=A=o[0],r=n=o[1],["M",A,n];if(s!==a)switch(a){case"A":t=[a,o[0],o[1],o[2],o[3],o[4],o[5]+A,o[6]+n];break;case"V":t=[a,o[0]+n];break;case"H":t=[a,o[0]+A];break;default:var l=o.map(function(e,t){return e+(t%2?n:A)});t=[a].concat(l)}else t=[a].concat(o);var u=t.length;switch(a){case"Z":A=i,n=r;break;case"H":A=t[1];break;case"V":n=t[1];break;default:A=t[u-2],n=t[u-1],"M"===a&&(i=A,r=n)}return t})}(e),A=(0,E.Cl)({},T),n=0;n<t.length;n+=1){t[n]=N(t[n],A);var i=t[n],r=i.length;A.x1=+i[r-2],A.y1=+i[r-1],A.x2=+i[r-4]||A.x1,A.y2=+i[r-3]||A.y1}return t}function P(e,t,A){var n=e[0],i=e[1];return[n+(t[0]-n)*A,i+(t[1]-i)*A]}function G(e,t,A,n,i){var r=(0,C.F)([e,t],[A,n]),o={x:0,y:0};if("number"==typeof i)if(i<=0)o={x:e,y:t};else if(i>=r)o={x:A,y:n};else{var s=P([e,t],[A,n],i/r);o={x:s[0],y:s[1]}}return{length:r,point:o,min:{x:Math.min(e,A),y:Math.min(t,n)},max:{x:Math.max(e,A),y:Math.max(t,n)}}}function K(e,t){var A=e.x,n=e.y,i=t.x,r=t.y,o=A*i+n*r,s=Math.sqrt((Math.pow(A,2)+Math.pow(n,2))*(Math.pow(i,2)+Math.pow(r,2)));return(A*r-n*i<0?-1:1)*Math.acos(o/s)}function V(e,t,A,n,i,r,o,s,a,l){var u=Math.abs,c=Math.sin,h=Math.cos,d=Math.sqrt,f=Math.PI,g=u(A),p=u(n),v=(i%360+360)%360*(f/180);if(e===s&&t===a)return{x:e,y:t};if(0===g||0===p)return G(e,t,s,a,l).point;var m=(e-s)/2,C=(t-a)/2,w={x:h(v)*m+c(v)*C,y:-c(v)*m+h(v)*C},y=Math.pow(w.x,2)/Math.pow(g,2)+Math.pow(w.y,2)/Math.pow(p,2);y>1&&(g*=d(y),p*=d(y));var B=(Math.pow(g,2)*Math.pow(p,2)-Math.pow(g,2)*Math.pow(w.y,2)-Math.pow(p,2)*Math.pow(w.x,2))/(Math.pow(g,2)*Math.pow(w.y,2)+Math.pow(p,2)*Math.pow(w.x,2)),E=(r!==o?1:-1)*d(B=B<0?0:B),x=E*(g*w.y/p),b=E*(-p*w.x/g),F=h(v)*x-c(v)*b+(e+s)/2,S=c(v)*x+h(v)*b+(t+a)/2,T={x:(w.x-x)/g,y:(w.y-b)/p},L=K({x:1,y:0},T),Q=K(T,{x:(-w.x-x)/g,y:(-w.y-b)/p});!o&&Q>0?Q-=2*f:o&&Q<0&&(Q+=2*f);var I=L+(Q%=2*f)*l,U=g*h(I),O=p*c(I);return{x:h(v)*U-c(v)*O+F,y:c(v)*U+h(v)*O+S}}function z(e,t,A,n,i,r,o,s,a,l,u){var c,h=u.bbox,d=void 0===h||h,f=u.length,g=void 0===f||f,p=u.sampleSize,v=void 0===p?30:p,m="number"==typeof l,w=e,y=t,B=0,E=[w,y,B],x=[w,y],b={x:0,y:0},F=[{x:w,y}];m&&l<=0&&(b={x:w,y});for(var S=0;S<=v;S+=1){if(w=(c=V(e,t,A,n,i,r,o,s,a,S/v)).x,y=c.y,d&&F.push({x:w,y}),g&&(B+=(0,C.F)(x,[w,y])),x=[w,y],m&&B>=l&&l>E[2]){var T=(B-l)/(B-E[2]);b={x:x[0]*(1-T)+E[0]*T,y:x[1]*(1-T)+E[1]*T}}E=[w,y,B]}return m&&l>=B&&(b={x:s,y:a}),{length:B,point:b,min:{x:Math.min.apply(null,F.map(function(e){return e.x})),y:Math.min.apply(null,F.map(function(e){return e.y}))},max:{x:Math.max.apply(null,F.map(function(e){return e.x})),y:Math.max.apply(null,F.map(function(e){return e.y}))}}}function W(e,t,A,n,i,r,o,s,a){var l=1-a;return{x:Math.pow(l,3)*e+3*Math.pow(l,2)*a*A+3*l*Math.pow(a,2)*i+Math.pow(a,3)*o,y:Math.pow(l,3)*t+3*Math.pow(l,2)*a*n+3*l*Math.pow(a,2)*r+Math.pow(a,3)*s}}function j(e,t,A,n,i,r,o,s,a,l){var u,c=l.bbox,h=void 0===c||c,d=l.length,f=void 0===d||d,g=l.sampleSize,p=void 0===g?10:g,v="number"==typeof a,m=e,w=t,y=0,B=[m,w,y],E=[m,w],x={x:0,y:0},b=[{x:m,y:w}];v&&a<=0&&(x={x:m,y:w});for(var F=0;F<=p;F+=1){if(m=(u=W(e,t,A,n,i,r,o,s,F/p)).x,w=u.y,h&&b.push({x:m,y:w}),f&&(y+=(0,C.F)(E,[m,w])),E=[m,w],v&&y>=a&&a>B[2]){var S=(y-a)/(y-B[2]);x={x:E[0]*(1-S)+B[0]*S,y:E[1]*(1-S)+B[1]*S}}B=[m,w,y]}return v&&a>=y&&(x={x:o,y:s}),{length:y,point:x,min:{x:Math.min.apply(null,b.map(function(e){return e.x})),y:Math.min.apply(null,b.map(function(e){return e.y}))},max:{x:Math.max.apply(null,b.map(function(e){return e.x})),y:Math.max.apply(null,b.map(function(e){return e.y}))}}}function X(e,t,A,n,i,r,o){var s=1-o;return{x:Math.pow(s,2)*e+2*s*o*A+Math.pow(o,2)*i,y:Math.pow(s,2)*t+2*s*o*n+Math.pow(o,2)*r}}function Y(e,t,A,n,i,r,o,s){var a,l=s.bbox,u=void 0===l||l,c=s.length,h=void 0===c||c,d=s.sampleSize,f=void 0===d?10:d,g="number"==typeof o,p=e,v=t,m=0,w=[p,v,m],y=[p,v],B={x:0,y:0},E=[{x:p,y:v}];g&&o<=0&&(B={x:p,y:v});for(var x=0;x<=f;x+=1){if(p=(a=X(e,t,A,n,i,r,x/f)).x,v=a.y,u&&E.push({x:p,y:v}),h&&(m+=(0,C.F)(y,[p,v])),y=[p,v],g&&m>=o&&o>w[2]){var b=(m-o)/(m-w[2]);B={x:y[0]*(1-b)+w[0]*b,y:y[1]*(1-b)+w[1]*b}}w=[p,v,m]}return g&&o>=m&&(B={x:i,y:r}),{length:m,point:B,min:{x:Math.min.apply(null,E.map(function(e){return e.x})),y:Math.min.apply(null,E.map(function(e){return e.y}))},max:{x:Math.max.apply(null,E.map(function(e){return e.x})),y:Math.max.apply(null,E.map(function(e){return e.y}))}}}function q(e,t,A){for(var n,i,r,o,s,a,l,u,c,h=D(e),d="number"==typeof t,f=[],g=0,p=0,v=0,m=0,C=[],w=[],y=0,B={x:0,y:0},E=B,x=B,b=B,F=0,S=0,T=h.length;S<T;S+=1)f=(l="M"===(u=(c=h[S])[0]))?f:[g,p].concat(c.slice(1)),l?(E=B={x:v=c[1],y:m=c[2]},y=0,d&&t<.001&&(b=B)):"L"===u?(y=(n=G(f[0],f[1],f[2],f[3],(t||0)-F)).length,B=n.min,E=n.max,x=n.point):"A"===u?(y=(i=z(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],(t||0)-F,A||{})).length,B=i.min,E=i.max,x=i.point):"C"===u?(y=(r=j(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],(t||0)-F,A||{})).length,B=r.min,E=r.max,x=r.point):"Q"===u?(y=(o=Y(f[0],f[1],f[2],f[3],f[4],f[5],(t||0)-F,A||{})).length,B=o.min,E=o.max,x=o.point):"Z"===u&&(y=(s=G((f=[g,p,v,m])[0],f[1],f[2],f[3],(t||0)-F)).length,B=s.min,E=s.max,x=s.point),d&&F<t&&F+y>=t&&(b=x),w.push(E),C.push(B),F+=y,g=(a="Z"!==u?c.slice(-2):[v,m])[0],p=a[1];return d&&t>=F&&(b={x:g,y:p}),{length:F,point:b,min:{x:Math.min.apply(null,C.map(function(e){return e.x})),y:Math.min.apply(null,C.map(function(e){return e.y}))},max:{x:Math.max.apply(null,w.map(function(e){return e.x})),y:Math.max.apply(null,w.map(function(e){return e.y}))}}}var Z=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/min.js"),J=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/max.js"),$=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number-equal.js");const ee=function(e,t){return(e%t+t)%t};function te(e,t,A){if(e[A].length>7){e[A].shift();for(var n=e[A],i=A;n.length;)t[A]="A",e.splice(i+=1,0,["C"].concat(n.splice(0,6)));e.splice(A,1)}}var Ae=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/process/arc-2-cubic.js"),ne=function(e,t,A,n){var i=P([e,t],[A,n],.5);return(0,E.fX)((0,E.fX)([],i,!0),[A,n,A,n],!1)};function ie(e,t){var A,n,i,r,o,s,a,l=e[0],u=e.slice(1).map(Number),c=u[0],h=u[1],d=t.x1,f=t.y1,g=t.x,p=t.y;switch("TQ".includes(l)||(t.qx=null,t.qy=null),l){case"M":return t.x=c,t.y=h,e;case"A":return A=[d,f].concat(u),["C"].concat((0,Ae.U)(A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],A[8],A[9]));case"Q":return t.qx=c,t.qy=h,A=[d,f].concat(u),["C"].concat([(s=1/3)*A[0]+(a=2/3)*(n=A[2]),s*A[1]+a*(i=A[3]),s*(r=A[4])+a*n,s*(o=A[5])+a*i,r,o]);case"L":return["C"].concat(ne(d,f,c,h));case"Z":return d===g&&f===p?["C",d,f,g,p,g,p]:["C"].concat(ne(d,f,g,p))}return e}function re(e,t){if(void 0===t&&(t=!1),function(e){return S(e)&&e.every(function(e){return"MC".includes(e[0])})}(e)){var A=[].concat(e);return t?[A,[]]:A}for(var n,i,r=D(e),o=(0,E.Cl)({},T),s=[],a="",l=r.length,u=[],c=0;c<l;c+=1){r[c]&&(a=r[c][0]),s[c]=a;var h=ie(r[c],o);r[c]=h,te(r,s,c),l=r.length,"Z"===a&&u.push(c),o.x1=+(n=r[c])[(i=n.length)-2],o.y1=+n[i-1],o.x2=+n[i-4]||o.x1,o.y2=+n[i-3]||o.y1}return t?[r,u]:r}function oe(e){return e.map(function(e,t,A){var n=t&&A[t-1].slice(-2).concat(e.slice(1)),i=t?j(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0;return{s:e,ss:t?i?function(e,t){void 0===t&&(t=.5);var A=e.slice(0,2),n=e.slice(2,4),i=e.slice(4,6),r=e.slice(6,8),o=P(A,n,t),s=P(n,i,t),a=P(i,r,t),l=P(o,s,t),u=P(s,a,t),c=P(l,u,t);return[["C"].concat(o,l,c),["C"].concat(u,a,r)]}(n):[e,e]:[e],l:i}})}function se(e,t,A,n){if(void 0===n&&(n=0),n>50)return console.warn("Maximum recursion depth reached in equalizeSegments"),[e,t];var i=oe(e),r=oe(t),o=i.length,s=r.length,a=i.filter(function(e){return e.l}).length,l=r.filter(function(e){return e.l}).length,u=i.filter(function(e){return e.l}).reduce(function(e,t){return e+t.l},0)/a||0,c=r.filter(function(e){return e.l}).reduce(function(e,t){return e+t.l},0)/l||0,h=A||Math.max(o,s),d=[u,c],f=[h-o,h-s],g=0,p=[i,r].map(function(e,t){return e.l===h?e.map(function(e){return e.s}):e.map(function(e,A){return f[t]-=(g=A&&f[t]&&e.l>=d[t])?1:0,g?e.ss:[e.s]}).flat()});return p[0].length===p[1].length?p:se(p[0],p[1],h,n+1)}function ae(e){return t=0,A=0,n=0,re(e).map(function(e){var i;if("M"===e[0])return t=e[1],A=e[2],0;var r,o,s,a,l,u,c,h,d=e.slice(1);return n=3*(((h=d[5])-(o=A))*((s=d[0])+(l=d[2]))-((c=d[4])-(r=t))*((a=d[1])+(u=d[3]))+a*(r-l)-s*(o-u)+h*(l+r/3)-c*(u+o/3))/20,i=e.slice(-2),t=i[0],A=i[1],n}).reduce(function(e,t){return e+t},0)>=0;var t,A,n}var le=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-undefined.js"),ue=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js"),ce=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-type.js");const he=function(e){return(0,ce.A)(e,"Boolean")};var de=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-function.js"),fe=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object.js"),ge=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),pe=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/superPropGet.js"),ve=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"),me=A("./node_modules/.pnpm/@antv+g-math@3.1.0/node_modules/@antv/g-math/dist/index.esm.js"),Ce=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),we=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),ye=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js"),Be=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),Ee=function(e){return e.GROUP="g",e.FRAGMENT="fragment",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",e}({}),xe=function(e){return e[e.ZERO=0]="ZERO",e[e.NEGATIVE_ONE=1]="NEGATIVE_ONE",e}({}),be=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.plugins=[]},[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){var A=e.context.renderingPlugins.indexOf(t);A>=0&&e.context.renderingPlugins.splice(A,1)})}}])}(),Fe=function(){return(0,r.A)(function e(t){(0,i.A)(this,e),this.clipSpaceNearZ=xe.NEGATIVE_ONE,this.plugins=[],this.config=(0,n.A)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)},[{key:"registerPlugin",value:function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var t=this.plugins.findIndex(function(t){return t===e});t>-1&&this.plugins.splice(t,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find(function(t){return t.name===e})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(e){Object.assign(this.config,e)}}])}(),Se=c.WQ,Te=c.C,Le=c.T9,Qe=c.jk,Ie=c.hs,Ue=c.jb,Oe=function(){function e(){(0,i.A)(this,e),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,r.A)(e,[{key:"update",value:function(e,t){Te(this.center,e),Te(this.halfExtents,t),Ue(this.min,this.center,this.halfExtents),Se(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){Se(this.center,t,e),Ie(this.center,this.center,.5),Ue(this.halfExtents,t,e),Ie(this.halfExtents,this.halfExtents,.5),Te(this.min,e),Te(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){if(!e.isEmpty(t))if(e.isEmpty(this))this.setMinMax(t.getMin(),t.getMax());else{var A=this.center,n=A[0],i=A[1],r=A[2],o=this.halfExtents,s=o[0],a=o[1],l=o[2],u=n-s,c=n+s,h=i-a,d=i+a,f=r-l,g=r+l,p=t.center,v=p[0],m=p[1],C=p[2],w=t.halfExtents,y=w[0],B=w[1],E=w[2],x=v-y,b=v+y,F=m-B,S=m+B,T=C-E,L=C+E;x<u&&(u=x),b>c&&(c=b),F<h&&(h=F),S>d&&(d=S),T<f&&(f=T),L>g&&(g=L),A[0]=.5*(u+c),A[1]=.5*(h+d),A[2]=.5*(f+g),o[0]=.5*(c-u),o[1]=.5*(d-h),o[2]=.5*(g-f),this.min[0]=u,this.min[1]=h,this.min[2]=f,this.max[0]=c,this.max[1]=d,this.max[2]=g}}},{key:"setFromTransformedAABB",value:function(e,t){var A=this.center,n=this.halfExtents,i=e.center,r=e.halfExtents,o=t[0],s=t[4],a=t[8],l=t[1],u=t[5],c=t[9],h=t[2],d=t[6],f=t[10],g=Math.abs(o),p=Math.abs(s),v=Math.abs(a),m=Math.abs(l),C=Math.abs(u),w=Math.abs(c),y=Math.abs(h),B=Math.abs(d),E=Math.abs(f);A[0]=t[12]+o*i[0]+s*i[1]+a*i[2],A[1]=t[13]+l*i[0]+u*i[1]+c*i[2],A[2]=t[14]+h*i[0]+d*i[1]+f*i[2],n[0]=g*r[0]+p*r[1]+v*r[2],n[1]=m*r[0]+C*r[1]+w*r[2],n[2]=y*r[0]+B*r[1]+E*r[2],Ue(this.min,A,n),Se(this.max,A,n)}},{key:"intersects",value:function(e){var t=this.getMax(),A=this.getMin(),n=e.getMax(),i=e.getMin();return A[0]<=n[0]&&t[0]>=i[0]&&A[1]<=n[1]&&t[1]>=i[1]&&A[2]<=n[2]&&t[2]>=i[2]}},{key:"intersection",value:function(t){if(!this.intersects(t))return null;var A=new e,n=Le([0,0,0],this.getMin(),t.getMin()),i=Qe([0,0,0],this.getMax(),t.getMax());return A.setMinMax(n,i),A}},{key:"getNegativeFarPoint",value:function(e){return 273===e.pnVertexFlag?Te([0,0,0],this.min):272===e.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===e.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===e.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===e.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===e.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===e.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return 273===e.pnVertexFlag?Te([0,0,0],this.max):272===e.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===e.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===e.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===e.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===e.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===e.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||0===e.halfExtents[0]&&0===e.halfExtents[1]&&0===e.halfExtents[2]}}])}(),He=function(){return(0,r.A)(function e(t,A){(0,i.A)(this,e),this.distance=t||0,this.normal=A||c.fA(0,1,0),this.updatePNVertexFlag()},[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return c.Om(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/c.Il(this.normal);c.hs(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,A){var n=this.distanceToPoint(e),i=n/(n-this.distanceToPoint(t)),r=i>=0&&i<=1;return r&&A&&c.Cc(A,e,t,i),r}}])}(),Me=function(e){return e[e.OUTSIDE=4294967295]="OUTSIDE",e[e.INSIDE=0]="INSIDE",e[e.INDETERMINATE=2147483647]="INDETERMINATE",e}({}),_e=function(){return(0,r.A)(function e(t){if((0,i.A)(this,e),this.planes=[],t)this.planes=t;else for(var A=0;A<6;A++)this.planes.push(new He)},[{key:"extractFromVPMatrix",value:function(e){var t=(0,l.A)(e,16),A=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],u=t[7],h=t[8],d=t[9],f=t[10],g=t[11],p=t[12],v=t[13],m=t[14],C=t[15];c.hZ(this.planes[0].normal,r-A,u-o,g-h),this.planes[0].distance=C-p,c.hZ(this.planes[1].normal,r+A,u+o,g+h),this.planes[1].distance=C+p,c.hZ(this.planes[2].normal,r+n,u+s,g+d),this.planes[2].distance=C+v,c.hZ(this.planes[3].normal,r-n,u-s,g-d),this.planes[3].distance=C-v,c.hZ(this.planes[4].normal,r-i,u-a,g-f),this.planes[4].distance=C-m,c.hZ(this.planes[5].normal,r+i,u+a,g+f),this.planes[5].distance=C+m,this.planes.forEach(function(e){e.normalize(),e.updatePNVertexFlag()})}}])}(),ke=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,i.A)(this,e),this.x=0,this.y=0,this.x=t,this.y=A}return(0,r.A)(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),Re=function(){function e(t,A,n,r){(0,i.A)(this,e),this.x=t,this.y=A,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=A,this.bottom=A+r}return(0,r.A)(e,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(t){return new e(t.x,t.y,t.width,t.height)}},{key:"applyTransform",value:function(t,A){var n=h.fA(t.x,t.y,0,1),i=h.fA(t.x+t.width,t.y,0,1),r=h.fA(t.x,t.y+t.height,0,1),o=h.fA(t.x+t.width,t.y+t.height,0,1),s=h.vt(),a=h.vt(),l=h.vt(),u=h.vt();h.Z0(s,n,A),h.Z0(a,i,A),h.Z0(l,r,A),h.Z0(u,o,A);var c=Math.min(s[0],a[0],l[0],u[0]),d=Math.min(s[1],a[1],l[1],u[1]),f=Math.max(s[0],a[0],l[0],u[0]),g=Math.max(s[1],a[1],l[1],u[1]);return e.fromRect({x:c,y:d,width:f-c,height:g-d})}}])}(),Ne="Method not implemented.",De="Use document.documentElement instead.";function Pe(e){return void 0===e?0:e>360||e<-360?e%360:e}var Ge=c.vt();function Ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Array.isArray(e)&&3===e.length?n?c.o8(e):c.C(Ge,e):(0,m.A)(e)?n?c.fA(e,t,A):c.hZ(Ge,e,t,A):n?c.fA(e[0],e[1]||t,e[2]||A):c.hZ(Ge,e[0],e[1]||t,e[2]||A)}var Ve=Math.PI/180;function ze(e){return e*Ve}var We=180/Math.PI;function je(e){return e*We}var Xe=Math.PI/2;function Ye(e,t){return 16===t.length?function(e,t){var A,n,i=d.IL(c.vt(),t),r=(0,l.A)(i,3),o=r[0],s=r[1],a=r[2],u=Math.asin(-t[2]/o);return u<Xe?u>-Xe?(A=Math.atan2(t[6]/s,t[10]/a),n=Math.atan2(t[1]/o,t[0]/o)):(n=0,A=-Math.atan2(t[4]/s,t[5]/s)):(n=0,A=Math.atan2(t[4]/s,t[5]/s)),e[0]=A,e[1]=u,e[2]=n,e}(e,t):function(e,t){var A=t[0],n=t[1],i=t[2],r=t[3],o=n*n,s=i*i,a=r*r,l=A*A+o+s+a,u=A*r-n*i;return u>.499995*l?(e[0]=Xe,e[1]=2*Math.atan2(n,A),e[2]=0):u<-.499995*l?(e[0]=-Xe,e[1]=2*Math.atan2(n,A),e[2]=0):(e[0]=Math.asin(2*(A*i-r*n)),e[1]=Math.atan2(2*(A*r+n*i),1-2*(s+a)),e[2]=Math.atan2(2*(A*n+i*r),1-2*(o+s))),e}(e,t)}function qe(e){var t=e[0],A=e[1],n=e[3],i=e[4],r=Math.sqrt(t*t+A*A),o=Math.sqrt(n*n+i*i);if(t*i-A*n<0&&(t<i?r=-r:o=-o),r){var s=1/r;t*=s,A*=s}if(o){var a=1/o;n*=a,i*=a}var l=je(Math.atan2(A,t));return[e[6],e[7],r,o,l]}var Ze=d.vt(),Je=d.vt(),$e=h.vt(),et=[c.vt(),c.vt(),c.vt()],tt=c.vt();function At(e,t,A,n,i){e[0]=t[0]*n+A[0]*i,e[1]=t[1]*n+A[1]*i,e[2]=t[2]*n+A[2]*i}var nt=function(e){return e[e.ORBITING=0]="ORBITING",e[e.EXPLORING=1]="EXPLORING",e[e.TRACKING=2]="TRACKING",e}({}),it=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.ROTATIONAL=1]="ROTATIONAL",e[e.TRANSLATIONAL=2]="TRANSLATIONAL",e[e.CINEMATIC=3]="CINEMATIC",e}({}),rt=function(e){return e[e.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",e[e.PERSPECTIVE=1]="PERSPECTIVE",e}({}),ot="updated",st=2e-4,at=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.clipSpaceNearZ=xe.NEGATIVE_ONE,this.eventEmitter=new u.A,this.matrix=d.vt(),this.right=c.fA(1,0,0),this.up=c.fA(0,1,0),this.forward=c.fA(0,0,1),this.position=c.fA(0,0,1),this.focalPoint=c.fA(0,0,0),this.distanceVector=c.fA(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=d.vt(),this.projectionMatrixInverse=d.vt(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=nt.EXPLORING,this.trackingMode=it.DEFAULT,this.projectionMode=rt.PERSPECTIVE,this.frustum=new _e,this.orthoMatrix=d.vt()},[{key:"isOrtho",value:function(){return this.projectionMode===rt.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.setWorldRotation(this.type===nt.EXPLORING),this._getAngles(),this.type===nt.TRACKING&&void 0!==t&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==nt.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return d.B8(d.vt(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var A=d.kN(d.vt(),[e,t,0]);this.jitteredProjectionMatrix=d.lw(d.vt(),A,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===rt.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===rt.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,A,n,i,r){return this.aspect=e/t,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=A,this.view.offsetY=n,this.view.width=i,this.view.height=r,this.projectionMode===rt.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===rt.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===rt.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===rt.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var A=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),n=A.x,i=A.y,r=this.roll;this.rotate(0,0,-r),this.setPosition(n,i),this.setFocalPoint(n,i),this.setZoom(e),this.rotate(0,0,r);var o=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),s=c.fA(o.x-n,o.y-i,0),a=c.Om(s,this.right)/c.Bw(this.right),u=c.Om(s,this.up)/c.Bw(this.up),h=this.getPosition(),d=(0,l.A)(h,2),f=d[0],g=d[1],p=this.getFocalPoint(),v=(0,l.A)(p,2),m=v[0],C=v[1];return this.setPosition(f-a,g-u),this.setFocalPoint(m-a,C-u),this}},{key:"setPerspective",value:function(e,t,A,n){var i;this.projectionMode=rt.PERSPECTIVE,this.fov=A,this.near=e,this.far=t,this.aspect=n;var r=this.near*Math.tan(ze(.5*this.fov))/this.zoom,o=2*r,s=this.aspect*o,a=-.5*s;if(null!==(i=this.view)&&void 0!==i&&i.enabled){var l=this.view.fullWidth,u=this.view.fullHeight;a+=this.view.offsetX*s/l,r-=this.view.offsetY*o/u,s*=this.view.width/l,o*=this.view.height/u}return function(e,t,A,n,i,r,o){var s,a,l=2*r,u=A-t,c=n-i,h=l/c,d=(A+t)/u,f=(n+i)/c,g=o-r,p=o*r;arguments.length>7&&void 0!==arguments[7]&&arguments[7]?(s=-o/g,a=-p/g):(s=-(o+r)/g,a=-2*p/g),e[0]=l/u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=h,e[6]=0,e[7]=0,e[8]=d,e[9]=f,e[10]=s,e[11]=-1,e[12]=0,e[13]=0,e[14]=a,e[15]=0}(this.projectionMatrix,a,a+s,r-o,r,e,this.far,this.clipSpaceNearZ===xe.ZERO),d.B8(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,A,n,i,r){var o;this.projectionMode=rt.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=A,this.bottom=n,this.near=i,this.far=r;var s=(this.rright-this.left)/(2*this.zoom),a=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,u=(this.top+this.bottom)/2,c=l-s,h=l+s,f=u+a,g=u-a;if(null!==(o=this.view)&&void 0!==o&&o.enabled){var p=(this.rright-this.left)/this.view.fullWidth/this.zoom,v=(this.top-this.bottom)/this.view.fullHeight/this.zoom;h=(c+=p*this.view.offsetX)+p*this.view.width,g=(f-=v*this.view.offsetY)-v*this.view.height}return this.clipSpaceNearZ===xe.NEGATIVE_ONE?d.v3(this.projectionMatrix,c,h,f,g,i,r):d.W7(this.projectionMatrix,c,h,f,g,i,r),d.B8(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.position[2]);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focalPoint[1],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.focalPoint[2],n=c.fA(0,1,0);if(this.focalPoint=Ke(e,t,A),this.trackingMode===it.CINEMATIC){var i=c.Re(c.vt(),this.focalPoint,this.position);e=i[0],t=i[1],A=i[2];var r=c.Bw(i),o=je(Math.asin(t/r)),s=90+je(Math.atan2(A,e)),a=d.vt();d.Z8(a,a,ze(s)),d.eL(a,a,ze(o)),n=c.Z0(c.vt(),[0,1,0],a)}return d.B8(this.matrix,d.t5(d.vt(),this.position,this.focalPoint,n)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<st&&(this.distance=st),this.dollyingStep=this.distance/100;var t=c.vt(),A=this.forward,n=this.focalPoint;return t[0]=(e=this.distance)*A[0]+n[0],t[1]=e*A[1]+n[1],t[2]=e*A[2]+n[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=Pe(e),this.computeMatrix(),this._getAxes(),this.type===nt.ORBITING||this.type===nt.EXPLORING?this._getPosition():this.type===nt.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=Pe(e),this.computeMatrix(),this._getAxes(),this.type===nt.ORBITING||this.type===nt.EXPLORING?this._getPosition():this.type===nt.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=Pe(e),this.computeMatrix(),this._getAxes(),this.type===nt.ORBITING||this.type===nt.EXPLORING?this._getPosition():this.type===nt.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=p.x8(p.vt(),[0,0,1],ze(this.roll));d.D_(this.matrix);var t=p.x8(p.vt(),[1,0,0],ze((this.rotateWorld&&this.type!==nt.TRACKING||this.type===nt.TRACKING?1:-1)*this.elevation)),A=p.x8(p.vt(),[0,1,0],ze((this.rotateWorld&&this.type!==nt.TRACKING||this.type===nt.TRACKING?1:-1)*this.azimuth)),n=p.lw(p.vt(),A,t);n=p.lw(p.vt(),n,e);var i=d.I0(d.vt(),n);this.type===nt.ORBITING||this.type===nt.EXPLORING?(d.Tl(this.matrix,this.matrix,this.focalPoint),d.lw(this.matrix,this.matrix,i),d.Tl(this.matrix,this.matrix,[0,0,this.distance])):this.type===nt.TRACKING&&(d.Tl(this.matrix,this.matrix,this.position),d.lw(this.matrix,this.matrix,i))}},{key:"_setPosition",value:function(e,t,A){this.position=Ke(e,t,A);var n=this.matrix;n[12]=this.position[0],n[13]=this.position[1],n[14]=this.position[2],n[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){c.C(this.right,Ke(h.Z0(h.vt(),[1,0,0,0],this.matrix))),c.C(this.up,Ke(h.Z0(h.vt(),[0,1,0,0],this.matrix))),c.C(this.forward,Ke(h.Z0(h.vt(),[0,0,1,0],this.matrix))),c.S8(this.right,this.right),c.S8(this.up,this.up),c.S8(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],A=this.distanceVector[2],n=c.Bw(this.distanceVector);if(0===n)return this.elevation=0,void(this.azimuth=0);this.type===nt.TRACKING||this.rotateWorld?(this.elevation=je(Math.asin(t/n)),this.azimuth=je(Math.atan2(-e,-A))):(this.elevation=-je(Math.asin(t/n)),this.azimuth=-je(Math.atan2(-e,-A)))}},{key:"_getPosition",value:function(){c.C(this.position,Ke(h.Z0(h.vt(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){c.ei(this.distanceVector,[0,0,-this.distance],g.z0(g.vt(),this.matrix)),c.WQ(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=c.Re(c.vt(),this.focalPoint,this.position),this.distance=c.Bw(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===rt.ORTHOGRAPHIC){var e=this.position,t=p.x8(p.vt(),[0,0,1],-this.roll*Math.PI/180);d.O7(this.orthoMatrix,t,c.fA((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),c.fA(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=d.lw(d.vt(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(ot)}}},{key:"rotate",value:function(e,t,A){throw new Error(Ne)}},{key:"pan",value:function(e,t){throw new Error(Ne)}},{key:"dolly",value:function(e){throw new Error(Ne)}},{key:"createLandmark",value:function(e,t){throw new Error(Ne)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Ne)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Ne)}}])}(),lt=function(e){return e[e.Standard=0]="Standard",e}({}),ut=function(e){return e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",e}({}),ct=c.vt(),ht=d.vt(),dt=p.vt();function ft(e){if(e.localDirtyFlag){if(0!==e.localSkew[0]||0!==e.localSkew[1]){d.O7(e.localTransform,e.localRotation,e.localPosition,c.fA(1,1,1),e.origin),0===e.localSkew[0]&&0===e.localSkew[1]||(d.D_(ht),ht[4]=Math.tan(e.localSkew[0]),ht[1]=Math.tan(e.localSkew[1]),d.lw(e.localTransform,e.localTransform,ht));var t=d.O7(ht,p.hZ(dt,0,0,0,1),c.hZ(ct,1,1,1),e.localScale,e.origin);d.lw(e.localTransform,e.localTransform,t)}else{var A=e.localTransform,n=e.localPosition,i=e.localRotation,r=e.localScale,o=e.origin,s=0!==n[0]||0!==n[1]||0!==n[2];1!==i[3]||0!==i[0]||0!==i[1]||0!==i[2]||1!==r[0]||1!==r[1]||1!==r[2]||0!==o[0]||0!==o[1]||0!==o[2]?d.O7(A,i,n,r,o):s?d.kN(A,n):d.D_(A)}e.localDirtyFlag=!1}}var gt={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Re(0,0,0,0)},pt=function(e){return e.COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>",e}({});function vt(e,t,A){e.prototype=t.prototype=A,A.constructor=e}function mt(e,t){var A=Object.create(e.prototype);for(var n in t)A[n]=t[n];return A}function Ct(){}var wt=.7,yt=1/wt,Bt="\\s*([+-]?\\d+)\\s*",Et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bt=/^#([0-9a-f]{3,8})$/,Ft=new RegExp(`^rgb\\(${Bt},${Bt},${Bt}\\)$`),St=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),Tt=new RegExp(`^rgba\\(${Bt},${Bt},${Bt},${Et}\\)$`),Lt=new RegExp(`^rgba\\(${xt},${xt},${xt},${Et}\\)$`),Qt=new RegExp(`^hsl\\(${Et},${xt},${xt}\\)$`),It=new RegExp(`^hsla\\(${Et},${xt},${xt},${Et}\\)$`),Ut={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ot(){return this.rgb().formatHex()}function Ht(){return this.rgb().formatRgb()}function Mt(e){var t,A;return e=(e+"").trim().toLowerCase(),(t=bt.exec(e))?(A=t[1].length,t=parseInt(t[1],16),6===A?_t(t):3===A?new Rt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===A?kt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===A?kt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ft.exec(e))?new Rt(t[1],t[2],t[3],1):(t=St.exec(e))?new Rt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Tt.exec(e))?kt(t[1],t[2],t[3],t[4]):(t=Lt.exec(e))?kt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qt.exec(e))?Vt(t[1],t[2]/100,t[3]/100,1):(t=It.exec(e))?Vt(t[1],t[2]/100,t[3]/100,t[4]):Ut.hasOwnProperty(e)?_t(Ut[e]):"transparent"===e?new Rt(NaN,NaN,NaN,0):null}function _t(e){return new Rt(e>>16&255,e>>8&255,255&e,1)}function kt(e,t,A,n){return n<=0&&(e=t=A=NaN),new Rt(e,t,A,n)}function Rt(e,t,A,n){this.r=+e,this.g=+t,this.b=+A,this.opacity=+n}function Nt(){return`#${Kt(this.r)}${Kt(this.g)}${Kt(this.b)}`}function Dt(){const e=Pt(this.opacity);return`${1===e?"rgb(":"rgba("}${Gt(this.r)}, ${Gt(this.g)}, ${Gt(this.b)}${1===e?")":`, ${e})`}`}function Pt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kt(e){return((e=Gt(e))<16?"0":"")+e.toString(16)}function Vt(e,t,A,n){return n<=0?e=t=A=NaN:A<=0||A>=1?e=t=NaN:t<=0&&(e=NaN),new Wt(e,t,A,n)}function zt(e){if(e instanceof Wt)return new Wt(e.h,e.s,e.l,e.opacity);if(e instanceof Ct||(e=Mt(e)),!e)return new Wt;if(e instanceof Wt)return e;var t=(e=e.rgb()).r/255,A=e.g/255,n=e.b/255,i=Math.min(t,A,n),r=Math.max(t,A,n),o=NaN,s=r-i,a=(r+i)/2;return s?(o=t===r?(A-n)/s+6*(A<n):A===r?(n-t)/s+2:(t-A)/s+4,s/=a<.5?r+i:2-r-i,o*=60):s=a>0&&a<1?0:o,new Wt(o,s,a,e.opacity)}function Wt(e,t,A,n){this.h=+e,this.s=+t,this.l=+A,this.opacity=+n}function jt(e){return(e=(e||0)%360)<0?e+360:e}function Xt(e){return Math.max(0,Math.min(1,e||0))}function Yt(e,t,A){return 255*(e<60?t+(A-t)*e/60:e<180?A:e<240?t+(A-t)*(240-e)/60:t)}function qt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var A=function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=t?t.apply(this,i):i[0],s=A.cache;if(s.has(o))return s.get(o);var a=e.apply(this,i);return A.cache=s.set(o,a)||s,a};return A.cache=new(qt.Cache||Map),qt.cacheList.push(A.cache),A}vt(Ct,Mt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ot,formatHex:Ot,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return zt(this).formatHsl()},formatRgb:Ht,toString:Ht}),vt(Rt,function(e,t,A,n){return 1===arguments.length?((i=e)instanceof Ct||(i=Mt(i)),i?new Rt((i=i.rgb()).r,i.g,i.b,i.opacity):new Rt):new Rt(e,t,A,n??1);var i},mt(Ct,{brighter(e){return e=null==e?yt:Math.pow(yt,e),new Rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?wt:Math.pow(wt,e),new Rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rt(Gt(this.r),Gt(this.g),Gt(this.b),Pt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Nt,formatHex:Nt,formatHex8:function(){return`#${Kt(this.r)}${Kt(this.g)}${Kt(this.b)}${Kt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Dt,toString:Dt})),vt(Wt,function(e,t,A,n){return 1===arguments.length?zt(e):new Wt(e,t,A,n??1)},mt(Ct,{brighter(e){return e=null==e?yt:Math.pow(yt,e),new Wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?wt:Math.pow(wt,e),new Wt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,A=this.l,n=A+(A<.5?A:1-A)*t,i=2*A-n;return new Rt(Yt(e>=240?e-240:e+120,i,n),Yt(e,i,n),Yt(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Wt(jt(this.h),Xt(this.s),Xt(this.l),Pt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Pt(this.opacity);return`${1===e?"hsl(":"hsla("}${jt(this.h)}, ${100*Xt(this.s)}%, ${100*Xt(this.l)}%${1===e?")":`, ${e})`}`}})),qt.Cache=Map,qt.cacheList=[],qt.clearCache=function(){qt.cacheList.forEach(function(e){return e.clear()})};var Zt=function(e){return e[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",e}({}),Jt=function(e){return e[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",e}({}),$t=function(e){return e[e.kYes=0]="kYes",e[e.kNo=1]="kNo",e}({}),eA=function(e){return e[e.kYes=0]="kYes",e[e.kNo=1]="kNo",e}({}),tA=[{name:"em",unit_type:Zt.kEms},{name:"px",unit_type:Zt.kPixels},{name:"deg",unit_type:Zt.kDegrees},{name:"rad",unit_type:Zt.kRadians},{name:"grad",unit_type:Zt.kGradians},{name:"ms",unit_type:Zt.kMilliseconds},{name:"s",unit_type:Zt.kSeconds},{name:"rem",unit_type:Zt.kRems},{name:"turn",unit_type:Zt.kTurns}],AA=function(e){return e[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",e}({}),nA=function(e){var t=1;switch(e){case Zt.kPixels:case Zt.kDegrees:case Zt.kSeconds:break;case Zt.kMilliseconds:t=.001;break;case Zt.kRadians:t=180/Math.PI;break;case Zt.kGradians:t=.9;break;case Zt.kTurns:t=360}return t},iA=function(e){switch(e){case Zt.kNumber:case Zt.kInteger:return"";case Zt.kPercentage:return"%";case Zt.kEms:return"em";case Zt.kRems:return"rem";case Zt.kPixels:return"px";case Zt.kDegrees:return"deg";case Zt.kRadians:return"rad";case Zt.kGradians:return"grad";case Zt.kMilliseconds:return"ms";case Zt.kSeconds:return"s";case Zt.kTurns:return"turn"}return""},rA=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"toString",value:function(){return this.buildCSSText($t.kNo,eA.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=AA.kUnitType&&this.getType()<=AA.kClampType}}],[{key:"isAngle",value:function(e){return e===Zt.kDegrees||e===Zt.kRadians||e===Zt.kGradians||e===Zt.kTurns}},{key:"isLength",value:function(e){return e>=Zt.kEms&&e<Zt.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===Zt.kPercentage||e===Zt.kEms||e===Zt.kRems}},{key:"isTime",value:function(e){return e===Zt.kSeconds||e===Zt.kMilliseconds}}])}(),oA=function(e){function t(e){var A;return(0,i.A)(this,t),(A=(0,s.A)(this,t)).colorSpace=e,A}return(0,a.A)(t,e),(0,r.A)(t,[{key:"getType",value:function(){return AA.kColorType}},{key:"to",value:function(e){return this}}])}(rA),sA=function(e){return e[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",e}({}),aA=function(e){function t(e,A){var n;return(0,i.A)(this,t),(n=(0,s.A)(this,t)).type=e,n.value=A,n}return(0,a.A)(t,e),(0,r.A)(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(e,t,A){return A}},{key:"getType",value:function(){return AA.kColorType}}])}(rA),lA=function(e){function t(e){var A;return(0,i.A)(this,t),(A=(0,s.A)(this,t)).value=e,A}return(0,a.A)(t,e),(0,r.A)(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return AA.kKeywordType}},{key:"buildCSSText",value:function(e,t,A){return A+this.value}}])}(rA),uA=function(e){return function(e){switch(e){case Jt.kUNumber:return Zt.kNumber;case Jt.kULength:return Zt.kPixels;case Jt.kUPercent:return Zt.kPercentage;case Jt.kUTime:return Zt.kSeconds;case Jt.kUAngle:return Zt.kDegrees;default:return Zt.kUnknown}}(function(e){switch(e){case Zt.kNumber:case Zt.kInteger:return Jt.kUNumber;case Zt.kPercentage:return Jt.kUPercent;case Zt.kPixels:return Jt.kULength;case Zt.kMilliseconds:case Zt.kSeconds:return Jt.kUTime;case Zt.kDegrees:case Zt.kRadians:case Zt.kGradians:case Zt.kTurns:return Jt.kUAngle;default:return Jt.kUOther}}(e))},cA=function(e){function t(e){var A,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zt.kNumber;return(0,i.A)(this,t),A=(0,s.A)(this,t),n="string"==typeof o?(r=o)?"number"===r?Zt.kNumber:"percent"===r||"%"===r?Zt.kPercentage:function(e){return tA.find(function(t){return t.name===e}).unit_type}(r):Zt.kUnknown:o,A.unit=n,A.value=e,A}return(0,a.A)(t,e),(0,r.A)(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(e){return this.value===e.value&&this.unit===e.unit}},{key:"getType",value:function(){return AA.kUnitType}},{key:"convertTo",value:function(e){if(this.unit===e)return new t(this.value,this.unit);var A=uA(this.unit);if(A!==uA(e)||A===Zt.kUnknown)return null;var n=nA(this.unit)/nA(e);return new t(this.value*n,e)}},{key:"buildCSSText",value:function(e,t,A){var n;switch(this.unit){case Zt.kUnknown:break;case Zt.kInteger:n=Number(this.value).toFixed(0);break;case Zt.kNumber:case Zt.kPercentage:case Zt.kEms:case Zt.kRems:case Zt.kPixels:case Zt.kDegrees:case Zt.kRadians:case Zt.kGradians:case Zt.kMilliseconds:case Zt.kSeconds:case Zt.kTurns:var i=this.value,r=iA(this.unit);if(i<-999999||i>999999){var o=iA(this.unit);n=!Number.isFinite(i)||Number.isNaN(i)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(e)?"NaN":e>0?"infinity":"-infinity")+t}(i,o):i+(o||"")}else n="".concat(i).concat(r)}return A+n}}])}(rA),hA=new cA(0,"px");new cA(1,"px");var dA=new cA(0,"deg"),fA=function(e){function t(e,A,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return(0,i.A)(this,t),(r=(0,s.A)(this,t,["rgb"])).r=e,r.g=A,r.b=n,r.alpha=o,r.isNone=a,r}return(0,a.A)(t,e),(0,r.A)(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(e,t,A){return"".concat(A,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(oA),gA=new lA("unset"),pA={"":gA,unset:gA,initial:new lA("initial"),inherit:new lA("inherit")},vA=new fA(0,0,0,0,!0),mA=new fA(0,0,0,0),CA=qt(function(e,t,A,n){return new fA(e,t,A,n)},function(e,t,A,n){return"rgba(".concat(e,",").concat(t,",").concat(A,",").concat(n,")")}),wA=function(e){return new cA(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zt.kNumber)};function yA(e){var t=e.type,A=e.value;return"hex"===t?"#".concat(A):"literal"===t?A:"rgb"===t?"rgb(".concat(A.join(","),")"):"rgba(".concat(A.join(","),")")}new cA(50,"%");var BA=function(){var e=/^(linear\-gradient)/i,t=/^(repeating\-linear\-gradient)/i,A=/^(radial\-gradient)/i,n=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,r=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,o=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,s=/^(left|center|right|top|bottom)/i,a=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,h=/^\(/,d=/^\)/,f=/^,/,g=/^\#([0-9a-fA-F]+)/,p=/^([a-zA-Z]+)/,v=/^rgb/i,m=/^rgba/i,C=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,w="";function y(e){throw new Error("".concat(w,": ").concat(e))}function B(){return E("linear-gradient",e,b)||E("repeating-linear-gradient",t,b)||E("radial-gradient",A,F)||E("repeating-radial-gradient",n,F)||E("conic-gradient",i,F)}function E(e,t,A){return x(t,function(t){var n=A();return n&&(k(f)||y("Missing comma before color stops")),{type:e,orientation:n,colorStops:I(U)}})}function x(e,t){var A=k(e);if(A){k(h)||y("Missing (");var n=t(A);return k(d)||y("Missing )"),n}}function b(){return _("directional",r,1)||_("angular",c,1)}function F(){var e,t,A=S();return A&&((e=[]).push(A),t=w,k(f)&&((A=S())?e.push(A):w=t)),e}function S(){var e,t,A=((t=_("shape",/^(circle)/i,0))&&(t.style=M()||T()),t||((e=_("shape",/^(ellipse)/i,0))&&(e.style=H()||T()),e));if(A)A.at=L();else{var n=T();if(n){A=n;var i=L();i&&(A.at=i)}else{var r=Q();r&&(A={type:"default-radial",at:r})}}return A}function T(){return _("extent-keyword",o,1)}function L(){if(_("position",/^at/,0)){var e=Q();return e||y("Missing positioning value"),e}}function Q(){var e={x:H(),y:H()};if(e.x||e.y)return{type:"position",value:e}}function I(e){var t=e(),A=[];if(t)for(A.push(t);k(f);)(t=e())?A.push(t):y("One extra comma");return A}function U(){var e=_("hex",g,1)||x(m,function(){return{type:"rgba",value:I(O)}})||x(v,function(){return{type:"rgb",value:I(O)}})||_("literal",p,0);return e||y("Expected color definition"),e.length=H(),e}function O(){return k(C)[1]}function H(){return _("%",l,1)||_("position-keyword",s,1)||M()}function M(){return _("px",a,1)||_("em",u,1)}function _(e,t,A){var n=k(t);if(n)return{type:e,value:n[A]}}function k(e){var t=/^[\n\r\t\s]+/.exec(w);t&&R(t[0].length);var A=e.exec(w);return A&&R(A[0].length),A}function R(e){w=w.substring(e)}return function(e){return w=e,t=I(B),w.length>0&&y("Invalid input not EOF"),t;var t}}(),EA=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,xA=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,bA=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,FA=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,SA={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},TA=qt(function(e){var t;return t="angular"===e.type?Number(e.value):SA[e.value]||0,wA(t,"deg")}),LA=qt(function(e){var t=50,A=50,n="%",i="%";if("position"===(null==e?void 0:e.type)){var r=e.value,o=r.x,s=r.y;"position-keyword"===(null==o?void 0:o.type)&&("left"===o.value?t=0:"center"===o.value?t=50:"right"===o.value?t=100:"top"===o.value?A=0:"bottom"===o.value&&(A=100)),"position-keyword"===(null==s?void 0:s.type)&&("left"===s.value?t=0:"center"===s.value?A=50:"right"===s.value?t=100:"top"===s.value?A=0:"bottom"===s.value&&(A=100)),"px"!==(null==o?void 0:o.type)&&"%"!==(null==o?void 0:o.type)&&"em"!==(null==o?void 0:o.type)||(n=null==o?void 0:o.type,t=Number(o.value)),"px"!==(null==s?void 0:s.type)&&"%"!==(null==s?void 0:s.type)&&"em"!==(null==s?void 0:s.type)||(i=null==s?void 0:s.type,A=Number(s.value))}return{cx:wA(t,n),cy:wA(A,i)}}),QA=qt(function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return BA(e).map(function(e){var t=e.type,A=e.orientation,n=e.colorStops;!function(e){var t,A,n=e.length;e[n-1].length=null!==(t=e[n-1].length)&&void 0!==t?t:{type:"%",value:"100"},n>1&&(e[0].length=null!==(A=e[0].length)&&void 0!==A?A:{type:"%",value:"0"});for(var i=0,r=Number(e[0].length.value),o=1;o<n;o++){var s,a=null===(s=e[o].length)||void 0===s?void 0:s.value;if(!(0,w.A)(a)&&!(0,w.A)(r)){for(var l=1;l<o-i;l++)e[i+l].length={type:"%",value:"".concat(r+(Number(a)-r)*l/(o-i))};i=o,r=Number(a)}}}(n);var i,r=n.map(function(e){return{offset:wA(Number(e.length.value),"%"),color:yA(e)}});if("linear-gradient"===t)return new aA(sA.LinearGradient,{angle:A?TA(A):dA,steps:r});if("radial-gradient"===t&&(A||(A=[{type:"shape",value:"circle"}]),"shape"===A[0].type&&"circle"===A[0].value)){var o,s=LA(A[0].at),a=s.cx,l=s.cy;if(A[0].style){var u=A[0].style,c=u.type,h=u.value;"extent-keyword"===c?(pA[i=h]||(pA[i]=new lA(i)),o=pA[i]):o=wA(h,c)}return new aA(sA.RadialGradient,{cx:a,cy:l,size:o,steps:r})}});var t=e[0];if("("===e[1]||"("===e[2])if("l"===t){var A=EA.exec(e);if(A){var n,i=(null===(n=A[2].match(FA))||void 0===n?void 0:n.map(function(e){return e.split(":")}))||[];return[new aA(sA.LinearGradient,{angle:wA(parseFloat(A[1]),"deg"),steps:i.map(function(e){var t=(0,l.A)(e,2),A=t[1];return{offset:wA(100*Number(t[0]),"%"),color:A}})})]}}else if("r"===t){var r=function(e){var t=xA.exec(e);if(t){var A,n=(null===(A=t[4].match(FA))||void 0===A?void 0:A.map(function(e){return e.split(":")}))||[];return{cx:wA(50,"%"),cy:wA(50,"%"),steps:n.map(function(e){var t=(0,l.A)(e,2),A=t[1];return{offset:wA(100*Number(t[0]),"%"),color:A}})}}return null}(e);if(r){if(!(0,y.A)(r))return[new aA(sA.RadialGradient,r)];e=r}}else if("p"===t)return function(e){var t=bA.exec(e);if(t){var A=t[1],n=t[2];switch(A){case"a":A="repeat";break;case"x":A="repeat-x";break;case"y":A="repeat-y";break;default:A="no-repeat"}return{image:n,repetition:A}}return null}(e)});function IA(e){return e&&!!e.image}function UA(e){return e&&!(0,w.A)(e.r)&&!(0,w.A)(e.g)&&!(0,w.A)(e.b)}var OA=qt(function(e){if(IA(e))return(0,n.A)({repetition:"repeat"},e);if((0,w.A)(e)&&(e=""),"transparent"===e)return mA;if("currentColor"===e)e="black";else if("none"===e)return vA;var t=QA(e);if(t)return t;var A=Mt(e),i=[0,0,0,0];return null!==A&&(i[0]=A.r||0,i[1]=A.g||0,i[2]=A.b||0,i[3]=A.opacity),CA.apply(void 0,i)});function HA(e,t){if(UA(e)&&UA(t))return[[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(e){var t=e.slice();if(t[3])for(var A=0;A<3;A++)t[A]=Math.round((0,B.A)(t[A],0,255));return t[3]=(0,B.A)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function MA(e,t){if((0,w.A)(t))return wA(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(e)>=0)return wA(Number(t),"px");if("deg".search(e)>=0)return wA(Number(t),"deg")}var A=[];t=t.replace(e,function(e){return A.push(e),"U".concat(e)});var n="U(".concat(e.source,")");return A.map(function(e){return wA(Number(t.replace(new RegExp("U".concat(e),"g"),"").replace(new RegExp(n,"g"),"*0")),e)})[0]}var _A=function(e){return MA(new RegExp("px","g"),e)},kA=qt(_A);qt(function(e){return MA(new RegExp("%","g"),e)});var RA=function(e){return(0,m.A)(e)||isFinite(Number(e))?wA(Number(e)||0,"px"):MA(new RegExp("px|%|em|rem","g"),e)},NA=qt(RA),DA=function(e){return MA(new RegExp("deg|rad|grad|turn","g"),e)},PA=qt(DA);function GA(e,t,A,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r="",o=e.value||0,s=t.value||0,a=uA(e.unit),l=e.convertTo(a),u=t.convertTo(a);return l&&u?(o=l.value,s=u.value,r=iA(e.unit)):(cA.isLength(e.unit)||cA.isLength(t.unit))&&(o=zA(e,i,A),s=zA(t,i,A),r="px"),[o,s,function(e){return n&&(e=Math.max(e,0)),e+r}]}function KA(e){var t=0;return e.unit===Zt.kDegrees?t=e.value:e.unit===Zt.kRadians?t=je(Number(e.value)):e.unit===Zt.kTurns?t=360*Number(e.value):e.value&&(t=e.value),t}function VA(e,t){var A;return Array.isArray(e)?A=e.map(function(e){return Number(e)}):(0,y.A)(e)?A=e.split(" ").map(function(e){return Number(e)}):(0,m.A)(e)&&(A=[e]),2===t?1===A.length?[A[0],A[0]]:[A[0],A[1]]:4===t?1===A.length?[A[0],A[0],A[0],A[0]]:2===A.length?[A[0],A[1],A[0],A[1]]:3===A.length?[A[0],A[1],A[2],A[1]]:[A[0],A[1],A[2],A[3]]:"even"===t&&A.length%2==1?[].concat((0,o.A)(A),(0,o.A)(A)):A}function zA(e,t,A){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.unit===Zt.kPixels)return Number(e.value);if(e.unit===Zt.kPercentage&&A){var i=A.nodeName===Ee.GROUP?A.getLocalBounds():A.getGeometryBounds();return(n?i.min[t]:0)+e.value/100*i.halfExtents[t]*2}return 0}var WA=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function jA(e){return e.toString()}var XA=function(e){return"number"==typeof e?wA(e):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e)?wA(Number(e)):wA(0)},YA=qt(XA);function qA(e,t){return[e,t,jA]}function ZA(e,t){return function(A,n){return[A,n,function(A){return jA((0,B.A)(A,e,t))}]}}function JA(e,t){if(e.length===t.length)return[e,t,function(e){return e}]}function $A(e){return 0===e.parsedStyle.d.totalLength&&(e.parsedStyle.d.totalLength=q(e.parsedStyle.d.absolutePath,void 0,(0,E.Cl)((0,E.Cl)({},void 0),{bbox:!1,length:!0})).length),e.parsedStyle.d.totalLength}function en(e,t){return e[0]===t[0]&&e[1]===t[1]}function tn(e,t){var A=e.prePoint,n=e.currentPoint,i=e.nextPoint,r=Math.pow(n[0]-A[0],2)+Math.pow(n[1]-A[1],2),o=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),s=Math.pow(A[0]-i[0],2)+Math.pow(A[1]-i[1],2),a=Math.acos((r+o-s)/(2*Math.sqrt(r)*Math.sqrt(o)));if(!a||0===Math.sin(a)||(0,$.A)(a,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(i[1]-n[1],i[0]-n[0])),u=Math.abs(Math.atan2(i[0]-n[0],i[1]-n[1]));return l=l>Math.PI/2?Math.PI-l:l,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(a/2-l)*(t/2*(1/Math.sin(a/2)))-t/2||0,yExtra:Math.cos(u-a/2)*(t/2*(1/Math.sin(a/2)))-t/2||0}}function An(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}qt(function(e){return(0,y.A)(e)?e.split(" ").map(YA):e.map(YA)});var nn=function(e,t){var A=e.x*t.x+e.y*t.y,n=Math.sqrt((Math.pow(e.x,2)+Math.pow(e.y,2))*(Math.pow(t.x,2)+Math.pow(t.y,2)));return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(A/n)},rn=function(e,t,A,n,i,r,o,s){t=Math.abs(t),A=Math.abs(A);var a=ze(n=ee(n,360));if(e.x===o.x&&e.y===o.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(0===t||0===A)return{x:0,y:0,ellipticalArcAngle:0};var l=(e.x-o.x)/2,u=(e.y-o.y)/2,c={x:Math.cos(a)*l+Math.sin(a)*u,y:-Math.sin(a)*l+Math.cos(a)*u},h=Math.pow(c.x,2)/Math.pow(t,2)+Math.pow(c.y,2)/Math.pow(A,2);h>1&&(t*=Math.sqrt(h),A*=Math.sqrt(h));var d=(Math.pow(t,2)*Math.pow(A,2)-Math.pow(t,2)*Math.pow(c.y,2)-Math.pow(A,2)*Math.pow(c.x,2))/(Math.pow(t,2)*Math.pow(c.y,2)+Math.pow(A,2)*Math.pow(c.x,2));d=d<0?0:d;var f=(i!==r?1:-1)*Math.sqrt(d),g=f*(t*c.y/A),p=f*(-A*c.x/t),v={x:Math.cos(a)*g-Math.sin(a)*p+(e.x+o.x)/2,y:Math.sin(a)*g+Math.cos(a)*p+(e.y+o.y)/2},m={x:(c.x-g)/t,y:(c.y-p)/A},C=nn({x:1,y:0},m),w=nn(m,{x:(-c.x-g)/t,y:(-c.y-p)/A});!r&&w>0?w-=2*Math.PI:r&&w<0&&(w+=2*Math.PI);var y=C+(w%=2*Math.PI)*s,B=t*Math.cos(y),E=A*Math.sin(y);return{x:Math.cos(a)*B-Math.sin(a)*E+v.x,y:Math.sin(a)*B+Math.cos(a)*E+v.y,ellipticalArcStartAngle:C,ellipticalArcEndAngle:C+w,ellipticalArcAngle:y,ellipticalArcCenter:v,resultantRx:t,resultantRy:A}};function on(e,t){var A=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e.arcParams,i=n.rx,r=void 0===i?0:i,o=n.ry,s=void 0===o?0:o,a=n.xRotation,l=n.arcFlag,u=n.sweepFlag,c=rn({x:e.prePoint[0],y:e.prePoint[1]},r,s,a,!!l,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},t),h=rn({x:e.prePoint[0],y:e.prePoint[1]},r,s,a,!!l,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},A?t+.005:t-.005),d=h.x-c.x,f=h.y-c.y,g=Math.sqrt(d*d+f*f);return{x:-d/g,y:-f/g}}function sn(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function an(e,t){return sn(e)*sn(t)?(e[0]*t[0]+e[1]*t[1])/(sn(e)*sn(t)):1}function ln(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(an(e,t))}function un(e,t){var A=t[1],n=t[2],i=ee(ze(t[3]),2*Math.PI),r=t[4],o=t[5],s=e[0],a=e[1],l=t[6],u=t[7],c=Math.cos(i)*(s-l)/2+Math.sin(i)*(a-u)/2,h=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(a-u)/2,d=c*c/(A*A)+h*h/(n*n);d>1&&(A*=Math.sqrt(d),n*=Math.sqrt(d));var f=A*A*(h*h)+n*n*(c*c),g=f?Math.sqrt((A*A*(n*n)-f)/f):1;r===o&&(g*=-1),isNaN(g)&&(g=0);var p=n?g*A*h/n:0,v=A?g*-n*c/A:0,m=(s+l)/2+Math.cos(i)*p-Math.sin(i)*v,C=(a+u)/2+Math.sin(i)*p+Math.cos(i)*v,w=[(c-p)/A,(h-v)/n],y=[(-1*c-p)/A,(-1*h-v)/n],B=ln([1,0],w),E=ln(w,y);return an(w,y)<=-1&&(E=Math.PI),an(w,y)>=1&&(E=0),0===o&&E>0&&(E-=2*Math.PI),1===o&&E<0&&(E+=2*Math.PI),{cx:m,cy:C,rx:en(e,[l,u])?0:A,ry:en(e,[l,u])?0:n,startAngle:B,endAngle:B+E,xRotation:i,arcFlag:r,sweepFlag:o}}function cn(e,t,A,n){var i=(-1+Math.sqrt(2))/3*4,r=e*i,o=t*i,s=A-e,a=A+e,l=n-t,u=n+t;return[["M",s,n],["C",s,n-o,A-r,l,A,l],["C",A+r,l,a,n-o,a,n],["C",a,n+o,A+r,u,A,u],["C",A-r,u,s,n+o,s,n],["Z"]]}function hn(e){var t,A,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getLocalTransform(),i=[];switch(e.nodeName){case Ee.LINE:var r=e.parsedStyle,s=r.x1,a=r.y1,u=r.x2,h=r.y2;i=[["M",void 0===s?0:s,void 0===a?0:a],["L",void 0===u?0:u,void 0===h?0:h]];break;case Ee.CIRCLE:var d=e.parsedStyle,f=d.r,g=void 0===f?0:f,p=d.cx,v=d.cy;i=cn(g,g,void 0===p?0:p,void 0===v?0:v);break;case Ee.ELLIPSE:var m=e.parsedStyle,C=m.rx,w=m.ry,y=m.cx,E=m.cy;i=cn(void 0===C?0:C,void 0===w?0:w,void 0===y?0:y,void 0===E?0:E);break;case Ee.POLYLINE:case Ee.POLYGON:t=e.nodeName===Ee.POLYGON,A=e.parsedStyle.points.points.map(function(e,t){return[0===t?"M":"L",e[0],e[1]]}),t&&A.push(["Z"]),i=A;break;case Ee.RECT:var x=e.parsedStyle,b=x.width,F=void 0===b?0:b,S=x.height,T=void 0===S?0:S,L=x.x,Q=void 0===L?0:L,I=x.y,U=void 0===I?0:I,O=x.radius,H=O&&O.some(function(e){return 0!==e});i=function(e,t,A,n,i){if(i){var r=(0,l.A)(i,4),o=r[0],s=r[1],a=r[2],u=r[3],c=e>0?1:-1,h=t>0?1:-1,d=c+h!==0?1:0;return[["M",c*o+A,n],["L",e-c*s+A,n],s?["A",s,s,0,0,d,e+A,h*s+n]:null,["L",e+A,t-h*a+n],a?["A",a,a,0,0,d,e+A-c*a,t+n]:null,["L",A+c*u,t+n],u?["A",u,u,0,0,d,A,t+n-h*u]:null,["L",A,h*o+n],o?["A",o,o,0,0,d,c*o+A,n]:null,["Z"]].filter(function(e){return e})}return[["M",A,n],["L",A+e,n],["L",A+e,n+t],["L",A,n+t],["Z"]]}(F,T,Q,U,H&&O.map(function(e){return(0,B.A)(e,0,Math.min(Math.abs(F)/2,Math.abs(T)/2))}));break;case Ee.PATH:i=(0,o.A)(e.parsedStyle.d.absolutePath)}if(i.length)return function(e,t,A){return e.reduce(function(e,t){var n="";if("M"===t[0]||"L"===t[0]){var i=c.fA(t[1],t[2],0);A&&c.Z0(i,i,A),n="".concat(t[0]).concat(i[0],",").concat(i[1])}else if("Z"===t[0])n=t[0];else if("C"===t[0]){var r=c.fA(t[1],t[2],0),o=c.fA(t[3],t[4],0),s=c.fA(t[5],t[6],0);A&&(c.Z0(r,r,A),c.Z0(o,o,A),c.Z0(s,s,A)),n="".concat(t[0]).concat(r[0],",").concat(r[1],",").concat(o[0],",").concat(o[1],",").concat(s[0],",").concat(s[1])}else if("A"===t[0]){var a=c.fA(t[6],t[7],0);A&&c.Z0(a,a,A),n="".concat(t[0]).concat(t[1],",").concat(t[2],",").concat(t[3],",").concat(t[4],",").concat(t[5],",").concat(a[0],",").concat(a[1])}else if("Q"===t[0]){var l=c.fA(t[1],t[2],0),u=c.fA(t[3],t[4],0);A&&(c.Z0(l,l,A),c.Z0(u,u,A)),n="".concat(t[0]).concat(t[1],",").concat(t[2],",").concat(t[3],",").concat(t[4],"}")}return e+n},"")}(i,0,n)}var dn=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var t;try{t=D(e)}catch(A){t=D(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}!function(e){for(var t=0;t<e.length;t++){var A=e[t-1],n=e[t];if("M"===n[0]&&A){var i=A[0],r=void 0;"L"===i||"M"===i?r=[A[1],A[2]]:"C"!==i&&"A"!==i&&"Q"!==i||(r=[A[A.length-2],A[A.length-1]]),r&&en([n[1],n[2]],r)&&(e.splice(t,1),t--)}}}(t);var A=function(e){for(var t=!1,A=e.length,n=0;n<A;n++){var i=e[n][0];if("C"===i||"A"===i||"Q"===i){t=!0;break}}return t}(t),n=function(e){for(var t=[],A=[],n=[],i=0;i<e.length;i++){var r=e[i],o=r[0];"M"===o?(n.length&&(A.push(n),n=[]),n.push([r[1],r[2]])):"Z"===o?n.length&&(t.push(n),n=[]):n.push([r[1],r[2]])}return n.length>0&&A.push(n),{polygons:t,polylines:A}}(t),i=n.polygons,r=n.polylines,o=function(e){for(var t=[],A=null,n=null,i=null,r=0,o=e.length,s=0;s<o;s++){var a=e[s];n=e[s+1];var l=a[0],u={command:l,prePoint:A,params:a,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[a[1],a[2]],r=s;break;case"A":var c=un(A,a);u.arcParams=c}if("Z"===l)A=i,n=e[r+1];else{var h=a.length;A=[a[h-2],a[h-1]]}n&&"Z"===n[0]&&(n=e[r],t[r]&&(t[r].prePoint=A)),u.currentPoint=A,t[r]&&en(A,t[r].currentPoint)&&(t[r].prePoint=u.prePoint),u.nextPoint=n?[n[n.length-2],n[n.length-1]]:null;var d=u.prePoint;if(["L","H","V"].includes(l))u.startTangent=[d[0]-A[0],d[1]-A[1]],u.endTangent=[A[0]-d[0],A[1]-d[1]];else if("Q"===l){var f=[a[1],a[2]];u.startTangent=[d[0]-f[0],d[1]-f[1]],u.endTangent=[A[0]-f[0],A[1]-f[1]]}else if("T"===l){var g=t[s-1],p=An(g.currentPoint,d);"Q"===g.command?(u.command="Q",u.startTangent=[d[0]-p[0],d[1]-p[1]],u.endTangent=[A[0]-p[0],A[1]-p[1]]):(u.command="TL",u.startTangent=[d[0]-A[0],d[1]-A[1]],u.endTangent=[A[0]-d[0],A[1]-d[1]])}else if("C"===l){var v=[a[1],a[2]],m=[a[3],a[4]];u.startTangent=[d[0]-v[0],d[1]-v[1]],u.endTangent=[A[0]-m[0],A[1]-m[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[v[0]-m[0],v[1]-m[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[m[0]-v[0],m[1]-v[1]])}else if("S"===l){var C=t[s-1],w=An(C.currentPoint,d),y=[a[1],a[2]];"C"===C.command?(u.command="C",u.startTangent=[d[0]-w[0],d[1]-w[1]],u.endTangent=[A[0]-y[0],A[1]-y[1]]):(u.command="SQ",u.startTangent=[d[0]-y[0],d[1]-y[1]],u.endTangent=[A[0]-y[0],A[1]-y[1]])}else if("A"===l){var B=on(u,0),E=B.x,x=B.y,b=on(u,1,!1),F=b.x,S=b.y;u.startTangent=[E,x],u.endTangent=[F,S]}t.push(u)}return t}(t),s=function(e){for(var t=[],A=[],n=[],i=0;i<e.length;i++){var r=e[i],o=r.currentPoint,s=r.params,a=r.prePoint,l=void 0;switch(r.command){case"Q":l=(0,me.d9)(a[0],a[1],s[1],s[2],s[3],s[4]);break;case"C":l=(0,me.oe)(a[0],a[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var u=r.arcParams;l=(0,me.kF)(u.cx,u.cy,u.rx,u.ry,u.xRotation,u.startAngle,u.endAngle);break;default:t.push(o[0]),A.push(o[1])}l&&(r.box=l,t.push(l.x,l.x+l.width),A.push(l.y,l.y+l.height))}t=t.filter(function(e){return!Number.isNaN(e)&&e!==1/0&&e!==-1/0}),A=A.filter(function(e){return!Number.isNaN(e)&&e!==1/0&&e!==-1/0});var c=(0,Z.A)(t),h=(0,Z.A)(A),d=(0,J.A)(t),f=(0,J.A)(A);if(0===n.length)return{x:c,y:h,width:d-c,height:f-h};for(var g=0;g<n.length;g++){var p=n[g],v=p.currentPoint;v[0]===c?c-=tn(p,0).xExtra:v[0]===d&&(d+=tn(p,0).xExtra),v[1]===h?h-=tn(p,0).yExtra:v[1]===f&&(f+=tn(p,0).yExtra)}return{x:c,y:h,width:d-c,height:f-h}}(o),a=s.x,l=s.y,u=s.width,c=s.height;return{absolutePath:t,hasArc:A,segments:o,polygons:i,polylines:r,totalLength:0,rect:{x:Number.isFinite(a)?a:0,y:Number.isFinite(l)?l:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(c)?c:0}}},fn=qt(dn);function gn(e){return(0,y.A)(e)?fn(e):dn(e)}function pn(e,t,A){var n=e.curve,i=t.curve;n&&0!==n.length||(n=re(e.absolutePath,!1),e.curve=n),i&&0!==i.length||(i=re(t.absolutePath,!1),t.curve=i);var r=[n,i];n.length!==i.length&&(r=se(n,i));var o,s,a,l,u,c,h,d,f=ae(r[0])!==ae(r[1])?(s=(o=r[0]).slice(1).map(function(e,t,A){return t?A[t-1].slice(-2).concat(e.slice(1)):o[0].slice(1).concat(e.slice(1))}).map(function(e){return e.map(function(t,A){return e[e.length-A-2*(1-A%2)]})}).reverse(),[["M"].concat(s[0].slice(0,2))].concat(s.map(function(e){return["C"].concat(e.slice(2))}))):r[0].map(function(e){return Array.isArray(e)?[].concat(e):e});return[f,(a=r[1],l=f,u=a.length-1,c=[],h=0,d=function(e){var t=e.length,A=t-1;return e.map(function(n,i){return e.map(function(n,r){var o=i+r;return 0===r||e[o]&&"M"===e[o][0]?["M"].concat(e[o].slice(-2)):(o>=t&&(o-=A),e[o])})})}(a),d.forEach(function(e,t){a.slice(1).forEach(function(e,A){h+=(0,C.F)(a[(t+A)%u].slice(-2),l[A%u].slice(-2))}),c[t]=h,h=0}),d[c.indexOf(Math.min.apply(null,c))]),function(e){return e}]}function vn(e,t){return[e.points,t.points,function(e){return e}]}var mn=null,Cn=/\s*(\w+)\(([^)]*)\)/g;function wn(e){return function(t){var A=0;return e.map(function(e){return e===mn?t[A++]:e})}}function yn(e){return e}var Bn={matrix:["NNNNNN",[mn,mn,0,0,mn,mn,0,0,0,0,1,0,mn,mn,0,1],yn],matrix3d:["NNNNNNNNNNNNNNNN",yn],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",wn([mn,mn,new cA(1)]),yn],scaleX:["N",wn([mn,new cA(1),new cA(1)]),wn([mn,new cA(1)])],scaleY:["N",wn([new cA(1),mn,new cA(1)]),wn([new cA(1),mn])],scaleZ:["N",wn([new cA(1),new cA(1),mn])],scale3d:["NNN",yn],skew:["Aa",null,yn],skewX:["A",null,wn([mn,dA])],skewY:["A",null,wn([dA,mn])],translate:["Tt",wn([mn,mn,hA]),yn],translateX:["T",wn([mn,hA,hA]),wn([mn,hA])],translateY:["T",wn([hA,mn,hA]),wn([hA,mn])],translateZ:["L",wn([hA,hA,mn])],translate3d:["TTL",yn]};function En(e){for(var t=[],A=e.length,n=0;n<A;n++){var i=e[n],r=i[0],o=i.slice(1);if("translate"===r||"skew"===r?1===o.length&&o.push(0):"scale"===r&&1===o.length&&o.push(o[0]),!Bn[r])return[];var s=o.map(function(e){return wA(e)});t.push({t:r,d:s})}return t}function xn(e){if(Array.isArray(e))return En(e);if("none"===(e=(e||"none").trim()))return[];var t,A=[],n=0;for(Cn.lastIndex=0;t=Cn.exec(e);){if(t.index!==n)return[];n=t.index+t[0].length;var i=t[1],r=Bn[i];if(!r)return[];var o=t[2].split(","),s=r[0];if(s.length<o.length)return[];for(var a=[],l=0;l<s.length;l++){var u,c=o[l],h=s[l];if(void 0===(u=c?{A:function(e){return"0"===e.trim()?dA:PA(e)},N:YA,T:NA,L:kA}[h.toUpperCase()](c):{a:dA,n:a[0],t:hA}[h]))return[];a.push(u)}if(A.push({t:i,d:a}),Cn.lastIndex===e.length)return A}return[]}function bn(e){if(Array.isArray(e))return En(e);if("none"===(e=(e||"none").trim()))return[];var t,A=[],n=0;for(Cn.lastIndex=0;t=Cn.exec(e);){if(t.index!==n)return[];n=t.index+t[0].length;var i=t[1],r=Bn[i];if(!r)return[];var o=t[2].split(","),s=r[0];if(s.length<o.length)return[];for(var a=[],l=0;l<s.length;l++){var u,c=o[l],h=s[l];if(void 0===(u=c?{A:function(e){return"0"===e.trim()?dA:DA(e)},N:XA,T:RA,L:_A}[h.toUpperCase()](c):{a:dA,n:a[0],t:hA}[h]))return[];a.push(u)}if(A.push({t:i,d:a}),Cn.lastIndex===e.length)return A}return[]}function Fn(e){var t,A,n,i;switch(e.t){case"rotateX":return i=ze(KA(e.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=ze(KA(e.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=ze(KA(e.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=e.d[0].value,A=e.d[1].value,n=e.d[2].value,i=ze(KA(e.d[3]));var r=t*t+A*A+n*n;if(0===r)t=1,A=0,n=0;else if(1!==r){var o=Math.sqrt(r);t/=o,A/=o,n/=o}var s=Math.sin(i/2),a=s*Math.cos(i/2),l=s*s;return[1-2*(A*A+n*n)*l,2*(t*A*l+n*a),2*(t*n*l-A*a),0,2*(t*A*l-n*a),1-2*(t*t+n*n)*l,2*(A*n*l+t*a),0,2*(t*n*l+A*a),2*(A*n*l-t*a),1-2*(t*t+A*A)*l,0,0,0,0,1];case"scale":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[e.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,e.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,e.d[0].value,0,0,0,0,1];case"scale3d":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,e.d[2].value,0,0,0,0,1];case"skew":var u=ze(KA(e.d[0])),c=ze(KA(e.d[1]));return[1,Math.tan(c),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=ze(KA(e.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=ze(KA(e.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,t=zA(e.d[0],0,null)||0,A=zA(e.d[1],0,null)||0,0,1];case"translateX":return[1,0,0,0,0,1,0,0,0,0,1,0,t=zA(e.d[0],0,null)||0,0,0,1];case"translateY":return[1,0,0,0,0,1,0,0,0,0,1,0,0,A=zA(e.d[0],0,null)||0,0,1];case"translateZ":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,n=zA(e.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,t=zA(e.d[0],0,null)||0,A=zA(e.d[1],0,null)||0,n=zA(e.d[2],0,null)||0,1];case"perspective":var h=zA(e.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,h?-1/h:0,0,0,0,1];case"matrix":return[e.d[0].value,e.d[1].value,0,0,e.d[2].value,e.d[3].value,0,0,0,0,1,0,e.d[4].value,e.d[5].value,0,1];case"matrix3d":return e.d.map(function(e){return e.value})}}function Sn(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function Tn(e){var t=[0,0,0],A=[1,1,1],n=[0,0,0],i=[0,0,0,1],r=[0,0,0,1];return function(e,t,A,n,i,r){if(!function(e,t){var A=t[15];if(0===A)return!1;for(var n=1/A,i=0;i<16;i++)e[i]=t[i]*n;return!0}(Ze,e))return!1;if(d.C(Je,Ze),Je[3]=0,Je[7]=0,Je[11]=0,Je[15]=1,Math.abs(d.a4(Je))<1e-8)return!1;var o,s,a=Ze[3],l=Ze[7],u=Ze[11],f=Ze[12],g=Ze[13],p=Ze[14],v=Ze[15];if(0!==a||0!==l||0!==u){if($e[0]=a,$e[1]=l,$e[2]=u,$e[3]=v,!d.B8(Je,Je))return!1;d.mg(Je,Je),h.Z0(i,$e,Je)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=f,t[1]=g,t[2]=p,(o=et)[0][0]=(s=Ze)[0],o[0][1]=s[1],o[0][2]=s[2],o[1][0]=s[4],o[1][1]=s[5],o[1][2]=s[6],o[2][0]=s[8],o[2][1]=s[9],o[2][2]=s[10],A[0]=c.Bw(et[0]),c.S8(et[0],et[0]),n[0]=c.Om(et[0],et[1]),At(et[1],et[1],et[0],1,-n[0]),A[1]=c.Bw(et[1]),c.S8(et[1],et[1]),n[0]/=A[1],n[1]=c.Om(et[0],et[2]),At(et[2],et[2],et[0],1,-n[1]),n[2]=c.Om(et[1],et[2]),At(et[2],et[2],et[1],1,-n[2]),A[2]=c.Bw(et[2]),c.S8(et[2],et[2]),n[1]/=A[2],n[2]/=A[2],c.$A(tt,et[1],et[2]),c.Om(et[0],tt)<0)for(var m=0;m<3;m++)A[m]*=-1,et[m][0]*=-1,et[m][1]*=-1,et[m][2]*=-1;r[0]=.5*Math.sqrt(Math.max(1+et[0][0]-et[1][1]-et[2][2],0)),r[1]=.5*Math.sqrt(Math.max(1-et[0][0]+et[1][1]-et[2][2],0)),r[2]=.5*Math.sqrt(Math.max(1-et[0][0]-et[1][1]+et[2][2],0)),r[3]=.5*Math.sqrt(Math.max(1+et[0][0]+et[1][1]+et[2][2],0)),et[2][1]>et[1][2]&&(r[0]=-r[0]),et[0][2]>et[2][0]&&(r[1]=-r[1]),et[1][0]>et[0][1]&&(r[2]=-r[2])}(function(e){return 0===e.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(Fn).reduce(Sn)}(e),t,A,n,i,r),[[t,A,n,r,i]]}var Ln=function(){function e(e,t){for(var A=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],n=0;n<4;n++)for(var i=0;i<4;i++)for(var r=0;r<4;r++)A[n][i]+=t[n][r]*e[r][i];return A}return function(t,A,n,i,r){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)o[s][3]=r[s];for(var a=0;a<3;a++)for(var l=0;l<3;l++)o[3][a]+=t[l]*o[l][a];var u=i[0],c=i[1],h=i[2],d=i[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];f[0][0]=1-2*(c*c+h*h),f[0][1]=2*(u*c-h*d),f[0][2]=2*(u*h+c*d),f[1][0]=2*(u*c+h*d),f[1][1]=1-2*(u*u+h*h),f[1][2]=2*(c*h-u*d),f[2][0]=2*(u*h-c*d),f[2][1]=2*(c*h+u*d),f[2][2]=1-2*(u*u+c*c),o=e(o,f);var g,p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];n[2]&&(p[2][1]=n[2],o=e(o,p)),n[1]&&(p[2][1]=0,p[2][0]=n[0],o=e(o,p)),n[0]&&(p[2][0]=0,p[1][0]=n[0],o=e(o,p));for(var v=0;v<3;v++)for(var m=0;m<3;m++)o[v][m]*=A[v];return 0===(g=o)[0][2]&&0===g[0][3]&&0===g[1][2]&&0===g[1][3]&&0===g[2][0]&&0===g[2][1]&&1===g[2][2]&&0===g[2][3]&&0===g[3][2]&&1===g[3][3]?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])}}();function Qn(e){return e.toFixed(6).replace(".000000","")}function In(e,t){var A,n;return e.decompositionPair!==t&&(e.decompositionPair=t,A=Tn(e)),t.decompositionPair!==e&&(t.decompositionPair=e,n=Tn(t)),null===A[0]||null===n[0]?[[!1],[!0],function(A){return A?t[0].d:e[0].d}]:(A[0].push(0),n[0].push(1),[A,n,function(e){var t=function(e,t,A){var n=function(e,t){for(var A=0,n=0;n<e.length;n++)A+=e[n]*t[n];return A}(e,t),i=[];if(1===(n=(0,B.A)(n,-1,1)))i=e;else for(var r=Math.acos(n),o=1*Math.sin(A*r)/Math.sqrt(1-n*n),s=0;s<4;s++)i.push(e[s]*(Math.cos(A*r)-n*o)+t[s]*o);return i}(A[0][3],n[0][3],e[5]);return Ln(e[0],e[1],e[2],t,e[4]).map(Qn).join(",")}])}function Un(e){return e.replace(/[XY]/,"")}function On(e){return e.replace(/(X|Y|Z|3d)?$/,"3d")}var Hn=function(e,t){return"perspective"===e&&"perspective"===t||("matrix"===e||"matrix3d"===e)&&("matrix"===t||"matrix3d"===t)};function Mn(e,t,A){var n=!1;if(!e.length||!t.length){e.length||(n=!0,e=t,t=[]);for(var i=function(){var A=e[r],n=A.t,i=A.d,o="scale"===n.substring(0,5)?1:0;t.push({t:n,d:i.map(function(e){return"number"==typeof e?wA(o):wA(o,e.unit)})})},r=0;r<e.length;r++)i()}var o=[],s=[],a=[];if(e.length!==t.length){var l=In(e,t);o=[l[0]],s=[l[1]],a=[["matrix",[l[2]]]]}else for(var u=0;u<e.length;u++){var c=e[u].t,h=t[u].t,d=e[u].d,f=t[u].d,g=Bn[c],p=Bn[h],v=void 0;if(Hn(c,h)){var m=In([e[u]],[t[u]]);o.push(m[0]),s.push(m[1]),a.push(["matrix",[m[2]]])}else{if(c===h)v=c;else if(g[2]&&p[2]&&Un(c)===Un(h))v=Un(c),d=g[2](d),f=p[2](f);else{if(!g[1]||!p[1]||On(c)!==On(h)){var C=In(e,t);o=[C[0]],s=[C[1]],a=[["matrix",[C[2]]]];break}v=On(c),d=g[1](d),f=p[1](f)}for(var w=[],y=[],B=[],E=0;E<d.length;E++){var x=GA(d[E],f[E],A,!1,E);w[E]=x[0],y[E]=x[1],B.push(x[2])}o.push(w),s.push(y),a.push([v,B])}}if(n){var b=o;o=s,s=b}return[o,s,function(e){return e.map(function(e,t){var A=e.map(function(e,A){return a[t][1][A](e)}).join(",");return"matrix"===a[t][0]&&16===A.split(",").length&&(a[t][0]="matrix3d"),"matrix3d"===a[t][0]&&6===A.split(",").length&&(a[t][0]="matrix"),"".concat(a[t][0],"(").concat(A,")")}).join(" ")}]}var _n=qt(function(e){if((0,y.A)(e)){if("text-anchor"===e)return[wA(0,"px"),wA(0,"px")];var t=e.split(" ");return 1===t.length&&("top"===t[0]||"bottom"===t[0]?(t[1]=t[0],t[0]="center"):t[1]="center"),2!==t.length?null:[NA(kn(t[0])),NA(kn(t[1]))]}return[wA(e[0]||0,"px"),wA(e[1]||0,"px")]});function kn(e){return"center"===e?"50%":"left"===e||"top"===e?"0%":"right"===e||"bottom"===e?"100%":e}var Rn=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:pt.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:pt.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:pt.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:pt.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:pt.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:pt.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:pt.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:pt.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:pt.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:pt.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:pt.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:pt.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:pt.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:pt.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:pt.FILTER},{n:"clipPath",syntax:pt.DEFINED_PATH},{n:"textPath",syntax:pt.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:pt.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:pt.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:pt.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:pt.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:pt.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:pt.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:pt.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:pt.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:pt.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:pt.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:pt.COORDINATE},{n:"y1",int:!0,l:!0,syntax:pt.COORDINATE},{n:"z1",int:!0,l:!0,syntax:pt.COORDINATE},{n:"x2",int:!0,l:!0,syntax:pt.COORDINATE},{n:"y2",int:!0,l:!0,syntax:pt.COORDINATE},{n:"z2",int:!0,l:!0,syntax:pt.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:pt.PATH,p:50},{n:"points",int:!0,l:!0,syntax:pt.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:pt.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:pt.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:pt.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:pt.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:pt.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:pt.NUMBER,d:function(e){return e===Ee.PATH||e===Ee.POLYGON||e===Ee.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:pt.MARKER},{n:"markerEnd",syntax:pt.MARKER},{n:"markerMid",syntax:pt.MARKER},{n:"markerStartOffset",syntax:pt.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:pt.LENGTH,l:!0,int:!0,d:"0"}],Nn=new Set(Rn.filter(function(e){return!!e.l}).map(function(e){return e.n})),Dn={},Pn=function(){return(0,r.A)(function e(t){var A=this;(0,i.A)(this,e),this.runtime=t,Rn.forEach(function(e){A.registerMetadata(e)})},[{key:"registerMetadata",value:function(e){[e.n].concat((0,o.A)(e.a||[])).forEach(function(t){Dn[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var i=e.parsedStyle.clipPath,r=e.parsedStyle.offsetPath;!function(e,t){var A=Gn(e);for(var n in t)A.has(n)&&(e.parsedStyle[n]=t[n])}(e,t);var o=!!A.forceUpdateGeometry;if(!o)for(var s in t)if(Nn.has(s)){o=!0;break}var a,u=Gn(e);u.has("fill")&&t.fill&&(e.parsedStyle.fill=OA(t.fill)),u.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=OA(t.stroke)),u.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=OA(t.shadowColor)),u.has("filter")&&t.filter&&(e.parsedStyle.filter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("none"===(e=e.toLowerCase().trim()))return[];for(var t,A=/\s*([\w-]+)\(([^)]*)\)/g,n=[],i=0;t=A.exec(e);){if(t.index!==i)return[];if(i=t.index+t[0].length,WA.indexOf(t[1])>-1&&n.push({name:t[1],params:t[2].split(" ").map(function(e){return MA(/deg|rad|grad|turn|px|%/g,e)||OA(e)})}),A.lastIndex===e.length)return n}return[]}(t.filter)),u.has("radius")&&!(0,w.A)(t.radius)&&(e.parsedStyle.radius=VA(t.radius,4)),u.has("lineDash")&&!(0,w.A)(t.lineDash)&&(e.parsedStyle.lineDash=VA(t.lineDash,"even")),u.has("points")&&t.points&&(e.parsedStyle.points={points:(0,y.A)(a=t.points)?a.split(" ").map(function(e){var t=e.split(","),A=(0,l.A)(t,2),n=A[1];return[Number(A[0]),Number(n)]}):a,totalLength:0,segments:[]}),u.has("d")&&""===t.d&&(e.parsedStyle.d=(0,n.A)({},gt)),u.has("d")&&t.d&&(e.parsedStyle.d=gn(t.d)),u.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[pt.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),u.has("clipPath")&&!(0,le.A)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[pt.DEFINED_PATH].calculator("clipPath",i,t.clipPath,e,this.runtime),u.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[pt.DEFINED_PATH].calculator("offsetPath",r,t.offsetPath,e,this.runtime),u.has("transform")&&t.transform&&(e.parsedStyle.transform=xn(t.transform)),u.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=_n(t.transformOrigin)),u.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[pt.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),u.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[pt.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),u.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[pt.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),u.has("zIndex")&&!(0,w.A)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[pt.Z_INDEX].postProcessor(e),u.has("offsetDistance")&&!(0,w.A)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[pt.OFFSET_DISTANCE].postProcessor(e),u.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[pt.TRANSFORM].postProcessor(e),u.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[pt.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.dirty(!0,!0),A.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,A=this.runtime.geometryUpdaterFactory[t];if(A){var n=e.geometry;n.contentBounds||(n.contentBounds=new Oe),n.renderBounds||(n.renderBounds=new Oe);var i=e.parsedStyle,r=A.update(i,e),o=r.cx,s=void 0===o?0:o,a=r.cy,l=void 0===a?0:a,u=r.cz,h=void 0===u?0:u,d=r.hwidth,f=void 0===d?0:d,g=r.hheight,p=void 0===g?0:g,v=r.hdepth,m=void 0===v?0:v,C=[Math.abs(f),Math.abs(p),m],w=i.stroke,y=i.lineWidth,B=void 0===y?1:y,E=i.increasedLineWidthForHitTesting,x=void 0===E?0:E,b=i.shadowType,F=void 0===b?"outer":b,S=i.shadowColor,T=i.filter,L=void 0===T?[]:T,Q=i.transformOrigin,I=[s,l,h];n.contentBounds.update(I,C);var U=t===Ee.POLYLINE||t===Ee.POLYGON||t===Ee.PATH?Math.SQRT2:.5;if(w&&!w.isNone){var O=((B||0)+(x||0))*U;C[0]+=O,C[1]+=O}if(n.renderBounds.update(I,C),S&&F&&"inner"!==F){var H=n.renderBounds,M=H.min,_=H.max,k=i.shadowBlur||0,R=i.shadowOffsetX||0,N=i.shadowOffsetY||0,D=_[0]+k+R,P=M[1]-k+N,G=_[1]+k+N;M[0]=Math.min(M[0],M[0]-k+R),_[0]=Math.max(_[0],D),M[1]=Math.min(M[1],P),_[1]=Math.max(_[1],G),n.renderBounds.setMinMax(M,_)}L.forEach(function(e){var t=e.name,A=e.params;if("blur"===t){var i=A[0].value;n.renderBounds.update(n.renderBounds.center,c.WQ(n.renderBounds.halfExtents,n.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===t){var r=A[0].value,o=A[1].value,s=A[2].value,a=n.renderBounds,l=a.min,u=a.max,h=u[0]+s+r,d=l[1]-s+o,f=u[1]+s+o;l[0]=Math.min(l[0],l[0]-s+r),u[0]=Math.max(u[0],h),l[1]=Math.min(l[1],d),u[1]=Math.max(u[1],f),n.renderBounds.setMinMax(l,u)}}),e.geometry.dirty=!1;var K=p<0,V=(f<0?-1:1)*(Q?zA(Q[0],0,e,!0):0),z=(K?-1:1)*(Q?zA(Q[1],1,e,!0):0);(V||z)&&e.setOrigin(V,z)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===Ee.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Ee.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function Gn(e){return e.constructor.PARSED_STYLE_LIST}var Kn=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=qA},[{key:"calculator",value:function(e,t,A,n){return KA(A)}}])}(),Vn=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"calculator",value:function(e,t,A,n,i){return A instanceof lA&&(A=null),i.sceneGraphService.updateDisplayObjectDependency(e,t,A,n),"clipPath"===e&&n.forEach(function(e){0===e.childNodes.length&&i.sceneGraphService.dirtyToRoot(e)}),A}}])}(),zn=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.parser=OA,this.mixer=HA},[{key:"calculator",value:function(e,t,A,n){return A instanceof lA?"none"===A.value?vA:mA:A}}])}(),Wn=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"calculator",value:function(e,t,A){return A instanceof lA?[]:A}}])}();function jn(e){var t=e.parsedStyle.fontSize;return(0,w.A)(t)?null:t}var Xn=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=qA},[{key:"calculator",value:function(e,t,A,n,i){if((0,m.A)(A))return A;if(!cA.isRelativeUnit(A.unit))return A.value;if(A.unit===Zt.kPercentage)return 0;if(A.unit===Zt.kEms){if(n.parentNode){var r=jn(n.parentNode);if(r)return r*A.value}return 0}if(A.unit===Zt.kRems){var o;if(null!=n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.documentElement){var s=jn(n.ownerDocument.documentElement);if(s)return s*A.value}return 0}}}])}(),Yn=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=JA},[{key:"calculator",value:function(e,t,A){return A.map(function(e){return e.value})}}])}(),qn=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=JA},[{key:"calculator",value:function(e,t,A){return A.map(function(e){return e.value})}}])}(),Zn=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"calculator",value:function(e,t,A,n){var i;A instanceof lA&&(A=null);var r=null===(i=A)||void 0===i?void 0:i.cloneNode(!0);return r&&(r.style.isMarker=!0),r}}])}(),Jn=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=qA},[{key:"calculator",value:function(e,t,A){return A.value}}])}(),$n=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=ZA(0,1)},[{key:"calculator",value:function(e,t,A){return A.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,A=t.offsetPath;if(A){var n=A.nodeName;if(n===Ee.LINE||n===Ee.PATH||n===Ee.POLYLINE){var i=A.getPoint(t.offsetDistance);i&&e.setLocalPosition(i.x,i.y)}}}}])}(),ei=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=ZA(0,1)},[{key:"calculator",value:function(e,t,A){return A.value}}])}(),ti=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.parser=gn,this.mixer=pn},[{key:"calculator",value:function(e,t,A){return A instanceof lA&&"unset"===A.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Re(0,0,0,0)}:A}}])}(),Ai=(0,r.A)(function e(){(0,i.A)(this,e),this.mixer=vn}),ni=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).mixer=ZA(0,1/0),e}return(0,a.A)(t,e),(0,r.A)(t)}(Xn),ii=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"calculator",value:function(e,t,A,n){return A instanceof lA?"unset"===A.value?"":A.value:"".concat(A)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),ri=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"calculator",value:function(e,t,A,n){var i=n.getAttribute("text");if(i){var r=i;"capitalize"===A.value?r=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===A.value?r=i.toLowerCase():"uppercase"===A.value&&(r=i.toUpperCase()),n.parsedStyle.text=r}return A.value}}])}(),oi=new WeakMap,si="undefined"!=typeof window&&void 0!==window.document;function ai(e){return!!e.getAttribute}function li(e,t){var A=Number(e.parsedStyle.zIndex||0),n=Number(t.parsedStyle.zIndex||0);if(A===n){var i=e.parentNode;if(i){var r=i.childNodes||[];return r.indexOf(e)-r.indexOf(t)}}return A-n}function ui(e){var t=e;do{var A;if(null===(A=t.parsedStyle)||void 0===A?void 0:A.clipPath)return t;t=t.parentElement}while(null!==t);return null}function ci(e,t,A){si&&e.style&&(e.style.width=t+"px",e.style.height=A+"px")}function hi(e,t){if(si)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}var di={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},fi="object"==typeof performance&&performance.now?performance:Date;function gi(e){return e.nodeName===Ee.FRAGMENT||e.getRootNode().nodeName===Ee.FRAGMENT}function pi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0,n=!1,i=!1;return"visiblepainted"===e||"painted"===e||"auto"===e?(n=!!t&&!t.isNone,i=!!A&&!A.isNone):"visiblefill"===e||"fill"===e?n=!0:"visiblestroke"===e||"stroke"===e?i=!0:"visible"!==e&&"all"!==e||(n=!0,i=!0),[n,i]}var vi=1,mi="object"==typeof self&&self.self===self?self:"object"==typeof A.g&&A.g.global===A.g?A.g:{},Ci=Date.now(),wi={},yi=Date.now(),Bi=function(e){if("function"!=typeof e)throw new TypeError("".concat(e," is not a function"));var t=Date.now(),A=t-yi,n=A>16?0:16-A,i=vi++;return wi[i]=e,Object.keys(wi).length>1||setTimeout(function(){yi=t;var e=wi;wi={},Object.keys(e).forEach(function(t){return e[t](mi.performance&&"function"==typeof mi.performance.now?mi.performance.now():Date.now()-Ci)})},n),i},Ei=function(e){delete wi[e]},xi=function(e){return"string"!=typeof e?Bi:""===e?mi.requestAnimationFrame:mi["".concat(e,"RequestAnimationFrame")]},bi=function(e,t){for(var A=0;void 0!==e[A];){if(t(e[A]))return e[A];A+=1}}(["","webkit","moz","ms","o"],function(e){return!!xi(e)}),Fi=xi(bi),Si=function(e){return"string"!=typeof e?Ei:""===e?mi.cancelAnimationFrame:mi["".concat(e,"CancelAnimationFrame")]||mi["".concat(e,"CancelRequestAnimationFrame")]}(bi);mi.requestAnimationFrame=Fi,mi.cancelAnimationFrame=Si;var Ti=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.callbacks=[]},[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:function(){for(var e=arguments.length,t=new Array(e),A=0;A<e;A++)t[A]=arguments[A];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,t)}))}}])}(),Li=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.callbacks=[]},[{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:(e=(0,we.A)((0,Ce.A)().mark(function e(){var t,A,n,i,r=arguments;return(0,Ce.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.callbacks.length){e.next=6;break}return e.next=1,(t=this.callbacks)[0].apply(t,r);case 1:A=e.sent,n=1;case 2:if(!(n<this.callbacks.length)){e.next=5;break}return i=this.callbacks[n],e.next=3,i(A);case 3:A=e.sent;case 4:n++,e.next=2;break;case 5:return e.abrupt("return",A);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]);var e}(),Qi=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.callbacks=[]},[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=new Array(e),A=0;A<e;A++)t[A]=arguments[A];var n=arguments;this.callbacks.forEach(function(e){e.apply(void 0,n)})}}])}(),Ii=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.callbacks=[]},[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=new Array(e),A=0;A<e;A++)t[A]=arguments[A];if(this.callbacks.length){for(var n=this.callbacks[0].apply(void 0,arguments),i=1;i<this.callbacks.length;i++)n=(0,this.callbacks[i])(n);return n}return null}}])}(),Ui=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Oi=/([\"\'])[^\'\"]+\1/;function Hi(e){var t=e.fontSize,A=e.fontFamily,n=e.fontStyle,i=e.fontVariant,r=e.fontWeight;return{fontSize:void 0===t?16:t,fontFamily:void 0===A?"sans-serif":A,fontStyle:void 0===n?"normal":n,fontVariant:void 0===i?"normal":i,fontWeight:void 0===r?"normal":r}}var Mi=qt(function(e){for(var t=Hi(e),A=t.fontSize,n=t.fontFamily,i=t.fontStyle,r=t.fontVariant,o=t.fontWeight,s=(0,m.A)(A)&&"".concat(A,"px")||"16px",a=n.split(","),l=a.length-1;l>=0;l--){var u=a[l].trim();!Oi.test(u)&&Ui.indexOf(u)<0&&(u='"'.concat(u,'"')),a[l]=u}return"".concat(i," ").concat(r," ").concat(o," ").concat(s," ").concat(a.join(","))},function(e){var t=Hi(e),A=t.fontSize,n=t.fontFamily,i=t.fontVariant,r=t.fontWeight;return"".concat(t.fontStyle,"_").concat(i,"_").concat(r,"_").concat(A,"_").concat(n)}),_i=function(e){return Math.max(e,1e-6)};function ki(e,t,A){return d.D_(e),e[4]=Math.tan(t),e[1]=Math.tan(A),e}var Ri=d.vt(),Ni=d.vt(),Di={scale:function(e){d.CV(Ri,[e[0].value,e[1].value,1].map(function(e){return _i(e)}))},scaleX:function(e){d.CV(Ri,[e[0].value,1,1].map(function(e){return _i(e)}))},scaleY:function(e){d.CV(Ri,[1,e[0].value,1].map(function(e){return _i(e)}))},scaleZ:function(e){d.CV(Ri,[1,1,e[0].value].map(function(e){return _i(e)}))},scale3d:function(e){d.CV(Ri,[e[0].value,e[1].value,e[2].value].map(function(e){return _i(e)}))},translate:function(e){d.kN(Ri,[e[0].value,e[1].value,0])},translateX:function(e){d.kN(Ri,[e[0].value,0,0])},translateY:function(e){d.kN(Ri,[0,e[0].value,0])},translateZ:function(e){d.kN(Ri,[0,0,e[0].value])},translate3d:function(e){d.kN(Ri,[e[0].value,e[1].value,e[2].value])},rotate:function(e){d.N9(Ri,ze(KA(e[0])))},rotateX:function(e){d.hM(Ri,ze(KA(e[0])))},rotateY:function(e){d.i1(Ri,ze(KA(e[0])))},rotateZ:function(e){d.N9(Ri,ze(KA(e[0])))},rotate3d:function(e){d.$0(Ri,ze(KA(e[3])),[e[0].value,e[1].value,e[2].value])},skew:function(e){ki(Ri,ze(e[0].value),ze(e[1].value))},skewX:function(e){ki(Ri,ze(e[0].value),0)},skewY:function(e){ki(Ri,0,ze(e[0].value))},matrix:function(e){d.hZ(Ri,e[0].value,e[1].value,0,0,e[2].value,e[3].value,0,0,0,0,1,0,e[4].value,e[5].value,0,1)},matrix3d:function(e){d.hZ.apply(f,[Ri].concat((0,o.A)(e.map(function(e){return e.value}))))}},Pi=c.fA(1,1,1),Gi=c.vt(),Ki={translate:function(e,t){Wr.sceneGraphService.setLocalScale(e,Pi,!1),Wr.sceneGraphService.setLocalEulerAngles(e,Gi,void 0,void 0,!1),Wr.sceneGraphService.setLocalPosition(e,[t[0].value,t[1].value,0],!1),Wr.sceneGraphService.dirtyLocalTransform(e,e.transformable)}};function Vi(e,t){if(e.length){if(1===e.length&&Ki[e[0].t])return void Ki[e[0].t](t,e[0].d);for(var A=d.D_(Ni),n=0;n<e.length;n++){var i=e[n],r=Di[i.t];r&&(r(i.d),d.lK(A,A,Ri))}t.setLocalTransform(A)}else t.resetLocalTransform();return t.getLocalTransform()}var zi=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.parser=bn,this.mixer=Mn},[{key:"calculator",value:function(e,t,A,n){return A instanceof lA?[]:A}},{key:"postProcessor",value:function(e){Vi(e.parsedStyle.transform,e)}}])}(),Wi=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===Zt.kPixels&&t[1].unit===Zt.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),ji=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"calculator",value:function(e,t,A,n){return A.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,A=t.sortable;t.renderable&&t.dirty(),A&&(A.dirty=!0,A.dirtyReason=ut.Z_INDEX_CHANGED)}}}])}(),Xi=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e,t){var A=e.cx,n=e.cy,i=e.r,r=void 0===i?0:i;return{cx:void 0===A?0:A,cy:void 0===n?0:n,hwidth:r,hheight:r}}}])}(),Yi=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e,t){var A=e.cx,n=e.cy,i=e.rx,r=e.ry;return{cx:void 0===A?0:A,cy:void 0===n?0:n,hwidth:void 0===i?0:i,hheight:void 0===r?0:r}}}])}(),qi=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e){var t=e.x1,A=e.y1,n=e.x2,i=e.y2,r=Math.min(t,n),o=Math.max(t,n),s=Math.min(A,i),a=(o-r)/2,l=(Math.max(A,i)-s)/2;return{cx:r+a,cy:s+l,hwidth:a,hheight:l}}}])}(),Zi=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e){var t=e.d.rect,A=t.width/2,n=t.height/2;return{cx:t.x+A,cy:t.y+n,hwidth:A,hheight:n}}}])}(),Ji=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e){if(e.points&&(0,ue.A)(e.points.points)){var t=e.points.points,A=Math.min.apply(Math,(0,o.A)(t.map(function(e){return e[0]}))),n=Math.max.apply(Math,(0,o.A)(t.map(function(e){return e[0]}))),i=Math.min.apply(Math,(0,o.A)(t.map(function(e){return e[1]}))),r=(n-A)/2,s=(Math.max.apply(Math,(0,o.A)(t.map(function(e){return e[1]})))-i)/2;return{cx:A+r,cy:i+s,hwidth:r,hheight:s}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),$i=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e,t){var A=e.x,n=void 0===A?0:A,i=e.y,r=void 0===i?0:i,o=e.src,s=e.width,a=e.height,l=void 0===s?0:s,u=void 0===a?0:a;return o&&!(0,y.A)(o)&&(l||(e.width=l=o.width),u||(e.height=u=o.height)),{cx:n+l/2,cy:r+u/2,hwidth:l/2,hheight:u/2}}}])}(),er=function(){return(0,r.A)(function e(t){(0,i.A)(this,e),this.globalRuntime=t},[{key:"isReadyToMeasure",value:function(e,t){return e.text}},{key:"update",value:function(e,t){var A,n=e.text,i=e.textAlign,r=void 0===i?"start":i,o=e.lineWidth,s=void 0===o?1:o,a=e.textBaseline,l=void 0===a?"alphabetic":a,u=e.dx,c=void 0===u?0:u,h=e.dy,d=void 0===h?0:h,f=e.x,g=void 0===f?0:f,p=e.y,v=void 0===p?0:p;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var m=(null==t||null===(A=t.ownerDocument)||void 0===A||null===(A=A.defaultView)||void 0===A?void 0:A.getConfig())||{},C=this.globalRuntime.textService.measureText(n,e,m.offscreenCanvas);e.metrics=C;var w=C.width/2,y=C.height/2,B=g+w;"center"===r||"middle"===r?B+=s/2-w:"right"!==r&&"end"!==r||(B+=s-2*w);var E=v-y;return"middle"===l?E+=y:"top"===l||"hanging"===l?E+=2*y:"alphabetic"===l||"bottom"!==l&&"ideographic"!==l||(E+=0),c&&(B+=c),d&&(E+=d),{cx:B,cy:E,hwidth:w,hheight:y}}}])}(),tr=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Ar=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"update",value:function(e,t){var A=e.x,n=e.y,i=e.width,r=void 0===i?0:i,o=e.height,s=void 0===o?0:o;return{cx:(void 0===A?0:A)+r/2,cy:(void 0===n?0:n)+s/2,hwidth:r/2,hheight:s/2}}}])}(),nr=function(){return(0,r.A)(function e(t){(0,i.A)(this,e),this.eventPhase=e.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new ke,this.page=new ke,this.canvas=new ke,this.viewport=new ke,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t},[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ne)}}])}(),ir=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).client=new ke,e.movement=new ke,e.offset=new ke,e.global=new ke,e.screen=new ke,e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}},{key:"initMouseEvent",value:function(){throw new Error(Ne)}}])}(nr),rr=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).width=0,e.height=0,e.isPrimary=!1,e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(ir),or=function(e){function t(){return(0,i.A)(this,t),(0,s.A)(this,t,arguments)}return(0,a.A)(t,e),(0,r.A)(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(ir),sr=function(e){function t(e,A){var n;return(0,i.A)(this,t),(n=(0,s.A)(this,t,[null])).type=e,n.detail=null==A?void 0:A.detail,A&&!("detail"in A)&&(n.detail=A),Object.assign(n,A),n}return(0,a.A)(t,e),(0,r.A)(t)}(nr),ar=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.emitter=new u.A},[{key:"on",value:function(e,t,A){return this.addEventListener(e,t,A),this}},{key:"addEventListener",value:function(e,t,A){var n=!1,i=!1;if(he(A))n=A;else if(A){var r=A.capture;n=void 0!==r&&r;var o=A.once;i=void 0!==o&&o}n&&(e+="capture"),t=(0,de.A)(t)?t:t.handleEvent;var s=(0,de.A)(t)?void 0:t;return i?this.emitter.once(e,t,s):this.emitter.on(e,t,s),this}},{key:"off",value:function(e,t,A){return e?this.removeEventListener(e,t,A):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;null===(e=this.emitter)||void 0===e||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,A){var n;if(!this.emitter)return this;(he(A)?A:null==A?void 0:A.capture)&&(e+="capture"),t=(0,de.A)(t)?t:null===(n=t)||void 0===n?void 0:n.handleEvent;var i=(0,de.A)(t)?void 0:t;return this.emitter.off(e,t,i),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new sr(e,t))}},{key:"dispatchEventToSelf",value:function(e){e.target||(e.target=this),e.currentTarget=this,this.emitter.emit(e.type,e)}},{key:"dispatchEvent",value:function(e){var t,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2?arguments[2]:void 0)return this.dispatchEventToSelf(e),!0;if(this.document)t=this;else if(this.defaultView)t=this.defaultView;else{var n;t=null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView}if(t){if(e.manager=t.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],A||(e.target=this),e.manager.dispatchEvent(e,e.type,A)}else this.dispatchEventToSelf(e);return!e.defaultPrevented}}])}(),lr=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.mutations=void 0,e.parentNode=null,e.destroyed=!1,e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"textContent",get:function(){var e="";this.nodeName===Ee.TEXT&&(e+=this.style.text);var t,A=(0,ye.A)(this.childNodes);try{for(A.s();!(t=A.n()).done;){var n=t.value;e+=n.nodeName===Ee.TEXT?n.nodeValue:n.textContent}}catch(e){A.e(e)}finally{A.f()}return e},set:function(e){var t=this;this.childNodes.slice().forEach(function(e){t.removeChild(e)}),this.nodeName===Ee.TEXT&&(this.style.text="".concat(e))}},{key:"getRootNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(e):e.composed&&this.host?this.host.getRootNode(e):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(e){throw new Error(Ne)}},{key:"lookupNamespaceURI",value:function(e){throw new Error(Ne)}},{key:"lookupPrefix",value:function(e){throw new Error(Ne)}},{key:"normalize",value:function(){throw new Error(Ne)}},{key:"isEqualNode",value:function(e){return this===e}},{key:"isSameNode",value:function(e){return this.isEqualNode(e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(e){if(e===this)return 0;for(var A=e,n=this,i=[A],r=[n];null!==(o=A.parentNode)&&void 0!==o?o:n.parentNode;){var o;A=A.parentNode?(i.push(A.parentNode),A.parentNode):A,n=n.parentNode?(r.push(n.parentNode),n.parentNode):n}if(A!==n)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var s=i.length>r.length?i:r,a=s===i?r:i;if(s[s.length-a.length]===a[0])return s===i?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var l=s.length-a.length,u=a.length-1;u>=0;u--){var c=a[u],h=s[l+u];if(h!==c){var d=c.parentNode.childNodes;return d.indexOf(c)<d.indexOf(h)?a===i?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:s===i?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(e){return this.contains(e)}},{key:"contains",value:function(e){for(var t=e;t&&this!==t;)t=t.parentNode;return!!t}},{key:"getAncestor",value:function(e){for(var t=this;e>0&&t;)t=t.parentNode,e--;return t}},{key:"forEach",value:function(e){for(var t=[this];t.length>0;){var A=t.pop();if(!1===e(A))break;for(var n=A.childNodes.length-1;n>=0;n--)t.push(A.childNodes[n])}}}],[{key:"isNode",value:function(e){return!!e.childNodes}}])}(ar);lr.DOCUMENT_POSITION_DISCONNECTED=1,lr.DOCUMENT_POSITION_PRECEDING=2,lr.DOCUMENT_POSITION_FOLLOWING=4,lr.DOCUMENT_POSITION_CONTAINS=8,lr.DOCUMENT_POSITION_CONTAINED_BY=16,lr.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var ur=function(){return(0,r.A)(function e(t,A){var n=this;(0,i.A)(this,e),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=d.vt(),this.tmpVec3=c.vt(),this.onPointerDown=function(e){var t=n.createPointerEvent(e);n.dispatchEvent(t,"pointerdown"),"touch"===t.pointerType?n.dispatchEvent(t,"touchstart"):"mouse"!==t.pointerType&&"pen"!==t.pointerType||n.dispatchEvent(t,2===t.button?"rightdown":"mousedown"),n.trackingData(e.pointerId).pressTargetsByButton[e.button]=t.composedPath(),n.freeEvent(t)},this.onPointerUp=function(e){var t=fi.now(),A=n.createPointerEvent(e,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(A,"pointerup"),"touch"===A.pointerType?n.dispatchEvent(A,"touchend"):"mouse"!==A.pointerType&&"pen"!==A.pointerType||n.dispatchEvent(A,2===A.button?"rightup":"mouseup");var i=n.trackingData(e.pointerId),r=n.findMountedTarget(i.pressTargetsByButton[e.button]),o=r;if(r&&!A.composedPath().includes(r)){for(var s=r;s&&!A.composedPath().includes(s);)A.currentTarget=s,n.notifyTarget(A,"pointerupoutside"),"touch"===A.pointerType?n.notifyTarget(A,"touchendoutside"):"mouse"!==A.pointerType&&"pen"!==A.pointerType||n.notifyTarget(A,2===A.button?"rightupoutside":"mouseupoutside"),lr.isNode(s)&&(s=s.parentNode);delete i.pressTargetsByButton[e.button],o=s}if(o){var a,l=n.clonePointerEvent(A,"click");l.target=o,l.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:l.target,timeStamp:t});var u=i.clicksByButton[e.button];u.target===l.target&&t-u.timeStamp<n.context.renderingContext.root.ownerDocument.defaultView.getConfig().dblClickSpeed?++u.clickCount:u.clickCount=1,u.target=l.target,u.timeStamp=t,l.detail=u.clickCount,null!==(a=A.detail)&&void 0!==a&&a.preventClick||(n.context.config.useNativeClickEvent||"mouse"!==l.pointerType&&"touch"!==l.pointerType||n.dispatchEvent(l,"click"),n.dispatchEvent(l,"pointertap")),n.freeEvent(l)}n.freeEvent(A)},this.onPointerMove=function(e){var t=n.createPointerEvent(e,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),A="mouse"===t.pointerType||"pen"===t.pointerType,i=n.trackingData(e.pointerId),r=n.findMountedTarget(i.overTargets);if(i.overTargets&&r!==t.target){var o=n.createPointerEvent(e,"mousemove"===e.type?"mouseout":"pointerout",r||void 0);if(n.dispatchEvent(o,"pointerout"),A&&n.dispatchEvent(o,"mouseout"),!t.composedPath().includes(r)){var s=n.createPointerEvent(e,"pointerleave",r||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!t.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),A&&n.notifyTarget(s,"mouseleave"),lr.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(o)}if(r!==t.target){var a=n.clonePointerEvent(t,"mousemove"===e.type?"mouseover":"pointerover");n.dispatchEvent(a,"pointerover"),A&&n.dispatchEvent(a,"mouseover");for(var l=r&&lr.isNode(r)&&r.parentNode;l&&l!==(lr.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&l!==t.target;)l=l.parentNode;if(!l||l===(lr.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var u=n.clonePointerEvent(t,"pointerenter");for(u.eventPhase=u.AT_TARGET;u.target&&u.target!==r&&u.target!==(lr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)u.currentTarget=u.target,n.notifyTarget(u),A&&n.notifyTarget(u,"mouseenter"),lr.isNode(u.target)&&(u.target=u.target.parentNode);n.freeEvent(u)}n.freeEvent(a)}n.dispatchEvent(t,"pointermove"),"touch"===t.pointerType&&n.dispatchEvent(t,"touchmove"),A&&(n.dispatchEvent(t,"mousemove"),n.cursor=n.getCursor(t.target)),i.overTargets=t.composedPath(),n.freeEvent(t)},this.onPointerOut=function(e){var t=n.trackingData(e.pointerId);if(t.overTargets){var A="mouse"===e.pointerType||"pen"===e.pointerType,i=n.findMountedTarget(t.overTargets),r=n.createPointerEvent(e,"pointerout",i||void 0);n.dispatchEvent(r),A&&n.dispatchEvent(r,"mouseout");var o=n.createPointerEvent(e,"pointerleave",i||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(lr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),A&&n.notifyTarget(o,"mouseleave"),lr.isNode(o.target)&&(o.target=o.target.parentNode);t.overTargets=null,n.freeEvent(r),n.freeEvent(o)}n.cursor=null},this.onPointerOver=function(e){var t=n.trackingData(e.pointerId),A=n.createPointerEvent(e),i="mouse"===A.pointerType||"pen"===A.pointerType;n.dispatchEvent(A,"pointerover"),i&&n.dispatchEvent(A,"mouseover"),"mouse"===A.pointerType&&(n.cursor=n.getCursor(A.target));var r=n.clonePointerEvent(A,"pointerenter");for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==(lr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)r.currentTarget=r.target,n.notifyTarget(r),i&&n.notifyTarget(r,"mouseenter"),lr.isNode(r.target)&&(r.target=r.target.parentNode);t.overTargets=A.composedPath(),n.freeEvent(A),n.freeEvent(r)},this.onPointerUpOutside=function(e){var t=n.trackingData(e.pointerId),A=n.findMountedTarget(t.pressTargetsByButton[e.button]),i=n.createPointerEvent(e);if(A){for(var r=A;r;)i.currentTarget=r,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),lr.isNode(r)&&(r=r.parentNode);delete t.pressTargetsByButton[e.button]}n.freeEvent(i)},this.onWheel=function(e){var t=n.createWheelEvent(e);n.dispatchEvent(t),n.freeEvent(t)},this.onClick=function(e){if(n.context.config.useNativeClickEvent){var t=n.createPointerEvent(e);n.dispatchEvent(t),n.freeEvent(t)}},this.onPointerCancel=function(e){var t=n.createPointerEvent(e,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(t),n.freeEvent(t)},this.globalRuntime=t,this.context=A},[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),t=1,A=1,n=this.context.contextService.getDomElement();if(n&&e){var i=n.offsetWidth,r=n.offsetHeight;i&&r&&(t=e.width/i,A=e.height/r)}return{scaleX:t,scaleY:A,bbox:e}}},{key:"client2Viewport",value:function(e){var t=this.getScale(),A=t.bbox;return new ke((e.x-((null==A?void 0:A.left)||0))/t.scaleX,(e.y-((null==A?void 0:A.top)||0))/t.scaleY)}},{key:"viewport2Client",value:function(e){var t=this.getScale(),A=t.bbox;return new ke((e.x+((null==A?void 0:A.left)||0))*t.scaleX,(e.y+((null==A?void 0:A.top)||0))*t.scaleY)}},{key:"viewport2Canvas",value:function(e){var t=e.x,A=e.y,n=this.rootTarget.defaultView.getCamera(),i=this.context.config,r=i.width,o=i.height,s=n.getPerspectiveInverse(),a=n.getWorldTransform(),l=d.lw(this.tmpMatrix,a,s),u=c.hZ(this.tmpVec3,t/r*2-1,2*(1-A/o)-1,0);return c.Z0(u,u,l),new ke(u[0],u[1])}},{key:"canvas2Viewport",value:function(e){var t=this.rootTarget.defaultView.getCamera(),A=t.getPerspective(),n=t.getViewTransform(),i=d.lw(this.tmpMatrix,A,n),r=c.hZ(this.tmpVec3,e.x,e.y,0);c.Z0(this.tmpVec3,this.tmpVec3,i);var o=this.context.config;return new ke((r[0]+1)/2*o.width,(1-(r[1]+1)/2)*o.height)}},{key:"setPickHandler",value:function(e){this.pickHandler=e}},{key:"addEventMapping",value:function(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort(function(e,t){return e.priority-t.priority})}},{key:"mapEvent",value:function(e){if(this.rootTarget){var t=this.mappingTable[e.type];if(t)for(var A=0,n=t.length;A<n;A++)t[A].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,t,A){A?(e.eventPhase=e.AT_TARGET,e.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(e,t)):(e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t))}},{key:"propagate",value:function(e,t){if(e.target){var A=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var n=A.length-1;n>=1;n--)if(e.currentTarget=A[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!e.propagationStopped&&!e.propagationImmediatelyStopped){var i=A.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var r=i+1;r<A.length;r++)if(e.currentTarget=A[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var t=[e],A=this.rootTarget.defaultView||null;if(A&&A===e)return t.unshift(A.document),t;for(var n=0;n<2048&&e!==this.rootTarget;n++)lr.isNode(e)&&e.parentNode&&(t.push(e.parentNode),e=e.parentNode);return A&&t.push(A),t}},{key:"hitTest",value:function(e){var t=e.viewportX,A=e.viewportY,n=this.context.config;return t<0||A<0||t>n.width||A>n.height?null:!n.disableHitTesting&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,t){var A,n=null==t?void 0:t.target;if(null!==(A=n)&&void 0!==A&&A.shadowRoot&&(n=t.composedPath()[0]),n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!(null==t||!t.composedPath)&&t.composedPath().indexOf(e)>-1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var t=0,A=e.nativeEvent.composedPath();t<A.length;t++){var n=this.nativeHTMLMap.get(A[t]);if(n)return n}return null}},{key:"pickTarget",value:function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})}},{key:"createPointerEvent",value:function(e,t,A,n){var i=this.allocateEvent(rr);this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e;var r=this.getExistedHTML(i),o=this.context.contextService.getDomElement();return i.target=null!=A?A:r||this.isNativeEventFromCanvas(o,i.nativeEvent)&&this.pickTarget(i)||n,"string"==typeof t&&(i.type=t),i}},{key:"createWheelEvent",value:function(e){var t=this.allocateEvent(or);this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e;var A=this.getExistedHTML(t),n=this.context.contextService.getDomElement();return t.target=A||this.isNativeEventFromCanvas(n,t.nativeEvent)&&this.pickTarget(t),t}},{key:"trackingData",value:function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}},{key:"cloneWheelEvent",value:function(e){var t=this.allocateEvent(or);return t.nativeEvent=e.nativeEvent,t.originalEvent=e.originalEvent,this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.target=e.target,t.path=e.composedPath().slice(),t.type=e.type,t}},{key:"clonePointerEvent",value:function(e,t){var A=this.allocateEvent(rr);return A.nativeEvent=e.nativeEvent,A.originalEvent=e.originalEvent,this.copyPointerData(e,A),this.copyMouseData(e,A),this.copyData(e,A),A.target=e.target,A.path=e.composedPath().slice(),A.type=null!=t?t:A.type,A}},{key:"copyPointerData",value:function(e,t){t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist}},{key:"copyMouseData",value:function(e,t){t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.client.copyFrom(e.client),t.movement.copyFrom(e.movement),t.canvas.copyFrom(e.canvas),t.screen.copyFrom(e.screen),t.global.copyFrom(e.global),t.offset.copyFrom(e.offset)}},{key:"copyWheelData",value:function(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}},{key:"copyData",value:function(e,t){t.isTrusted=e.isTrusted,t.timeStamp=fi.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.page.copyFrom(e.page),t.viewport.copyFrom(e.viewport)}},{key:"allocateEvent",value:function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t}},{key:"freeEvent",value:function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}},{key:"notifyTarget",value:function(e,t){t=null!=t?t:e.type;var A=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(t,"capture"):t;this.notifyListeners(e,A),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}},{key:"notifyListeners",value:function(e,t){var A=e.currentTarget.emitter,n=A._events[t];if(n)if("fn"in n)n.once&&A.removeListener(t,n.fn,void 0,!0),n.fn.call(e.currentTarget||n.context,e);else for(var i=0;i<n.length&&!e.propagationImmediatelyStopped;i++)n[i].once&&A.removeListener(t,n[i].fn,void 0,!0),n[i].fn.call(e.currentTarget||n[i].context,e)}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var t=e[e.length-1],A=e.length-2;A>=0;A--){var n=e[A];if(!(n===this.rootTarget||lr.isNode(n)&&n.parentNode===t))break;t=e[A]}return t}},{key:"getCursor",value:function(e){for(var t=e;t;){var A=ai(t)&&t.getAttribute("cursor");if(A)return A;t=lr.isNode(t)&&t.parentNode}}}])}(),cr=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||Wr.offscreenCanvas)this.canvas=e||Wr.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,n.A)({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,n.A)({willReadFrequently:!0},t)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,n.A)({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context||this.getOrCreateCanvas(e,t),this.context}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),hr=function(e){return e[e.CAMERA_CHANGED=0]="CAMERA_CHANGED",e[e.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",e[e.NONE=2]="NONE",e}({}),dr=function(){return(0,r.A)(function e(t,A){(0,i.A)(this,e),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new Qi,initAsync:new Ti,dirtycheck:new Ii,cull:new Ii,beginFrame:new Qi,beforeRender:new Qi,render:new Qi,afterRender:new Qi,endFrame:new Qi,destroy:new Qi,pick:new Li,pickSync:new Ii,pointerDown:new Qi,pointerUp:new Qi,pointerMove:new Qi,pointerOut:new Qi,pointerOver:new Qi,pointerWheel:new Qi,pointerCancel:new Qi,click:new Qi},this.globalRuntime=t,this.context=A},[{key:"init",value:function(e){var t=this,A=(0,n.A)((0,n.A)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(e){e.apply(A,t.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){t.inited=!0,e()}).catch(function(e){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(hr.CAMERA_CHANGED)}},{key:"render",value:function(e,t,A){var n=this,i=e.getConfig(),r=this.context.renderingContext;if(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.notifyMutationObservers(e),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=1===r.renderReasons.size&&r.renderReasons.has(hr.CAMERA_CHANGED),s=!i.disableRenderHooks||!o;s&&this.renderDisplayObject(r.root,i,r),this.hooks.beginFrame.call(t),s&&r.renderListCurrentFrame.forEach(function(e){n.hooks.beforeRender.call(e),n.hooks.render.call(e),n.hooks.afterRender.call(e)}),this.hooks.endFrame.call(t),r.renderListCurrentFrame=[],r.renderReasons.clear(),A()}}},{key:"renderDisplayObject",value:function(e,t,A){var n=this,i=t.renderer.getConfig(),r=i.enableDirtyCheck,o=i.enableCulling;function s(e){var t=e.sortable,i=r?e.renderable.dirty||A.dirtyRectangleRenderingDisabled?e:null:e,s=null;i&&(s=o?n.hooks.cull.call(i,n.context.camera):i)&&(n.stats.rendered+=1,A.renderListCurrentFrame.push(s)),e.dirty(!1),t.renderOrder=n.zIndexCounter,n.zIndexCounter+=1,n.stats.total+=1,t.dirty&&(n.sort(e,t),t.dirty=!1,t.dirtyChildren=[],t.dirtyReason=void 0)}for(var a=[e];a.length>0;){var l,u=a.pop();s(u);for(var c=(null===(l=u.sortable)||void 0===l||null===(l=l.sorted)||void 0===l?void 0:l.length)>0?u.sortable.sorted:u.childNodes,h=c.length-1;h>=0;h--)a.push(c[h])}}},{key:"sort",value:function(e,t){var A,n;(null==t||null===(A=t.sorted)||void 0===A?void 0:A.length)>0&&t.dirtyReason!==ut.Z_INDEX_CHANGED?t.dirtyChildren.forEach(function(A){var n=t.sorted.indexOf(A);if(n>-1&&t.sorted.splice(n,1),e.childNodes.indexOf(A)>-1)if(0===t.sorted.length)t.sorted.push(A);else{var i=function(e,t){for(var A=0,n=e.length;A<n;){var i=A+n>>>1;li(e[i],t)<0?A=i+1:n=i}return A}(t.sorted,A);t.sorted.splice(i,0,A)}}):t.sorted=e.childNodes.slice().sort(li),(null===(n=t.sorted)||void 0===n?void 0:n.length)>0&&0===e.childNodes.filter(function(e){return e.parsedStyle.zIndex}).length&&(t.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirty",value:function(){this.context.renderingContext.renderReasons.add(hr.DISPLAY_OBJECT_CHANGED)}}])}(),fr=/\[\s*(.*)=(.*)\s*\]/,gr=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"selectOne",value:function(e,t){var A=this;if(e.startsWith("."))return t.find(function(t){return((null==t?void 0:t.classList)||[]).indexOf(A.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(t){return t.id===A.getIdOrClassname(e)});if(e.startsWith("[")){var n=this.getAttribute(e),i=n.name,r=n.value;return i?t.find(function(e){return t!==e&&("name"===i?e.name===r:A.attributeToString(e,i)===r)}):null}return t.find(function(A){return t!==A&&A.nodeName===e})}},{key:"selectAll",value:function(e,t){var A=this;if(e.startsWith("."))return t.findAll(function(n){return t!==n&&((null==n?void 0:n.classList)||[]).indexOf(A.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(n){return t!==n&&n.id===A.getIdOrClassname(e)});if(e.startsWith("[")){var n=this.getAttribute(e),i=n.name,r=n.value;return i?t.findAll(function(e){return t!==e&&("name"===i?e.name===r:A.attributeToString(e,i)===r)}):[]}return t.findAll(function(A){return t!==A&&A.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var A=this.getAttribute(e),n=A.name,i=A.value;return"name"===n?t.name===i:this.attributeToString(t,n)===i}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(fr),A="",n="";return t&&t.length>2&&(A=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:A,value:n}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var A=e.getAttribute(t);return(0,w.A)(A)?"":A.toString?A.toString():""}}])}(),pr=function(e){return e.ATTR_MODIFIED="DOMAttrModified",e.INSERTED="DOMNodeInserted",e.MOUNTED="DOMNodeInsertedIntoDocument",e.REMOVED="removed",e.UNMOUNTED="DOMNodeRemovedFromDocument",e.REPARENT="reparent",e.DESTROY="destroy",e.BOUNDS_CHANGED="bounds-changed",e.CULLED="culled",e}({}),vr=function(e){function t(e,A,n,r,o,a,l,u){var c;return(0,i.A)(this,t),(c=(0,s.A)(this,t,[null])).relatedNode=A,c.prevValue=n,c.newValue=r,c.attrName=o,c.attrChange=a,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return(0,a.A)(t,e),(0,r.A)(t)}(nr);vr.ADDITION=2,vr.MODIFICATION=1,vr.REMOVAL=3;var mr,Cr,wr,yr=new vr(pr.REPARENT,null,"","","",0,"",""),Br=v.vt(),Er=c.vt(),xr=c.fA(1,1,1),br=d.vt(),Fr=v.vt(),Sr=c.vt(),Tr=d.vt(),Lr=p.vt(),Qr=c.vt(),Ir=p.vt(),Ur=c.vt(),Or=c.vt(),Hr=c.vt(),Mr=d.vt(),_r=p.vt(),kr=p.vt(),Rr=p.vt(),Nr=function(){return(0,r.A)(function e(t){(0,i.A)(this,e),this.displayObjectDependencyMap=new WeakMap,this.runtime=t},[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,A){var n,i=!1;e.parentNode&&(i=e.parentNode!==t,this.detach(e));var r=e.nodeName===Ee.FRAGMENT,o=gi(t);e.parentNode=t;var s=r?e.childNodes:[e];(0,m.A)(A)?s.forEach(function(e){t.childNodes.splice(A,0,e),e.parentNode=t}):s.forEach(function(e){t.childNodes.push(e),e.parentNode=t});var a=t.sortable;if((null!=a&&null!==(n=a.sorted)&&void 0!==n&&n.length||a.dirty||e.parsedStyle.zIndex)&&(-1===a.dirtyChildren.indexOf(e)&&a.dirtyChildren.push(e),a.dirty=!0,a.dirtyReason=ut.ADDED),!o){if(r)this.dirtyFragment(e);else{var l=e.transformable;l&&this.dirtyWorldTransform(e,l)}if(i){var u,c=!0===(null===(u=t.ownerDocument)||void 0===u||null===(u=u.defaultView)||void 0===u||null===(u=u.getConfig())||void 0===u||null===(u=u.future)||void 0===u?void 0:u.experimentalCancelEventPropagation);e.dispatchEvent(yr,c,c)}}}},{key:"detach",value:function(e){var t,A;if(e.parentNode){var n=e.transformable,i=e.parentNode.sortable;(null!=i&&null!==(t=i.sorted)&&void 0!==t&&t.length||null!==(A=e.style)&&void 0!==A&&A.zIndex)&&(-1===i.dirtyChildren.indexOf(e)&&i.dirtyChildren.push(e),i.dirty=!0,i.dirtyReason=ut.REMOVED);var r=e.parentNode.childNodes.indexOf(e);r>-1&&e.parentNode.childNodes.splice(r,1),n&&this.dirtyWorldTransform(e,n),e.parentNode=null}}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return ft(t),t.localTransform}},{key:"setLocalPosition",value:function(e,t){var A,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=e.transformable;Or[0]=t[0],Or[1]=t[1],Or[2]=null!==(A=t[2])&&void 0!==A?A:0,c.aI(i.localPosition,Or)||(c.C(i.localPosition,Or),n&&this.dirtyLocalTransform(e,i))}},{key:"translateLocal",value:function(e,t){"number"==typeof t&&(t=c.fA(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var A=e.transformable;c.aI(t,Er)||(c.gL(t,t,A.localRotation),c.WQ(A.localPosition,A.localPosition,t),this.dirtyLocalTransform(e,A))}},{key:"setLocalRotation",value:function(e,t,A,n,i){var r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];"number"==typeof t&&(t=p.hZ(Lr,t,A,n,i));var o=e.transformable;p.C(o.localRotation,t),r&&this.dirtyLocalTransform(e,o)}},{key:"rotateLocal",value:function(e,t){"number"==typeof t&&(t=c.fA(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var A=e.transformable;p.A6(kr,t[0],t[1],t[2]),p.lK(A.localRotation,A.localRotation,kr),this.dirtyLocalTransform(e,A)}},{key:"setLocalScale",value:function(e,t){var A,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=e.transformable;c.hZ(Sr,t[0],t[1],null!==(A=t[2])&&void 0!==A?A:i.localScale[2]),c.aI(Sr,i.localScale)||(c.C(i.localScale,Sr),n&&this.dirtyLocalTransform(e,i))}},{key:"scaleLocal",value:function(e,t){var A,n=e.transformable;c.lw(n.localScale,n.localScale,c.hZ(Sr,t[0],t[1],null!==(A=t[2])&&void 0!==A?A:1)),this.dirtyLocalTransform(e,n)}},{key:"setLocalSkew",value:function(e,t,A){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];"number"==typeof t&&(t=v.hZ(Fr,t,A));var i=e.transformable;v.C(i.localSkew,t),n&&this.dirtyLocalTransform(e,i)}},{key:"setLocalEulerAngles",value:function(e,t){var A=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];"number"==typeof t&&(t=c.fA(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var n=e.transformable;p.A6(n.localRotation,t[0],t[1],t[2]),A&&this.dirtyLocalTransform(e,n)}},{key:"setLocalTransform",value:function(e,t){var A=d.sC(Qr,t),n=d.l(Ir,t),i=d.IL(Ur,t);this.setLocalScale(e,i,!1),this.setLocalPosition(e,A,!1),this.setLocalRotation(e,n,void 0,void 0,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,xr,!1),this.setLocalPosition(e,Er,!1),this.setLocalEulerAngles(e,Er,void 0,void 0,!1),this.setLocalSkew(e,Br,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"getPosition",value:function(e){var t=e.transformable;return d.sC(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return d.l(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return d.IL(t.scaling,this.getWorldTransform(e,t))}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transformable;return t.localDirtyFlag||t.dirtyFlag?(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.internalUpdateTransform(e),t.worldTransform):t.worldTransform}},{key:"setPosition",value:function(e,t){var A,n=e.transformable;Hr[0]=t[0],Hr[1]=t[1],Hr[2]=null!==(A=t[2])&&void 0!==A?A:0,c.aI(this.getPosition(e),Hr)||(c.C(n.position,Hr),null!==e.parentNode&&e.parentNode.transformable?(d.C(Mr,e.parentNode.transformable.worldTransform),d.B8(Mr,Mr),c.Z0(n.localPosition,Hr,Mr)):c.C(n.localPosition,Hr),this.dirtyLocalTransform(e,n))}},{key:"translate",value:function(e,t){"number"==typeof t&&(t=c.hZ(Sr,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)),c.aI(t,Er)||(c.WQ(Sr,this.getPosition(e),t),this.setPosition(e,Sr))}},{key:"setRotation",value:function(e,t,A,n,i){var r=e.transformable;if("number"==typeof t&&(t=p.fA(t,A,n,i)),null!==e.parentNode&&e.parentNode.transformable){var o=this.getRotation(e.parentNode);p.C(Lr,o),p.B8(Lr,Lr),p.lw(r.localRotation,Lr,t),p.S8(r.localRotation,r.localRotation),this.dirtyLocalTransform(e,r)}else this.setLocalRotation(e,t)}},{key:"rotate",value:function(e,t){"number"==typeof t&&(t=c.fA(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var A=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var n=Lr;p.A6(n,t[0],t[1],t[2]);var i=this.getRotation(e),r=this.getRotation(e.parentNode);p.C(Rr,r),p.B8(Rr,Rr),p.lw(n,Rr,n),p.lw(A.localRotation,n,i),p.S8(A.localRotation,A.localRotation),this.dirtyLocalTransform(e,A)}else this.rotateLocal(e,t)}},{key:"setOrigin",value:function(e,t){"number"==typeof t&&(t=[t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0]);var A=e.transformable;if(t[0]!==A.origin[0]||t[1]!==A.origin[1]||t[2]!==A.origin[2]){var n=A.origin;n[0]=t[0],n[1]=t[1],n[2]=t[2]||0,this.dirtyLocalTransform(e,A)}}},{key:"setEulerAngles",value:function(e,t){"number"==typeof t&&(t=c.fA(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var A=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){p.A6(A.localRotation,t[0],t[1],t[2]);var n=this.getRotation(e.parentNode);p.C(_r,p.B8(Lr,n)),p.lK(A.localRotation,A.localRotation,_r),this.dirtyLocalTransform(e,A)}else this.setLocalEulerAngles(e,t)}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=e.geometry;return A.dirty&&Wr.styleValueRegistry.updateGeometry(e),(t?A.renderBounds:A.contentBounds||null)||new Oe}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>2?arguments[2]:void 0,A=this.getGeometryBounds(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);if(!Oe.isEmpty(A)){var n=t||new Oe;return n.setFromTransformedAABB(A,this.getWorldTransform(e)),n}return null}},{key:"getBounds",value:function(e){var t=this,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.renderable;if(!n.boundsDirty&&!A&&n.bounds)return n.bounds;if(!n.renderBoundsDirty&&A&&n.renderBounds)return n.renderBounds;var i=A?n.renderBounds:n.bounds,r=this.getTransformedGeometryBounds(e,A,i);if(e.childNodes.forEach(function(e){var n=t.getBounds(e,A);n&&(r?r.add(n):(r=i||new Oe).update(n.center,n.halfExtents))}),r||(r=new Oe),A){var o=ui(e);if(o){var s=o.parsedStyle.clipPath.getBounds(A);r?s&&(r=s.intersection(r)):r.update(s.center,s.halfExtents)}}return A?(n.renderBounds=r,n.renderBoundsDirty=!1):(n.bounds=r,n.boundsDirty=!1),r}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=br;e.parentNode.transformable&&(t=d.B8(Tr,this.getWorldTransform(e.parentNode)));var A=this.getBounds(e);if(!Oe.isEmpty(A)){var n=new Oe;return n.setFromTransformedAABB(A,t),n}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,A,n=this.getGeometryBounds(e);Oe.isEmpty(n)||(A=new Oe).setFromTransformedAABB(n,this.getWorldTransform(e));var i=null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t?void 0:t.getContextService().getBoundingClientRect();if(A){var r=A.getMin(),o=(0,l.A)(r,2),s=o[0],a=o[1],u=A.getMax(),c=(0,l.A)(u,2);return new Re(s+((null==i?void 0:i.left)||0),a+((null==i?void 0:i.top)||0),c[0]-s,c[1]-a)}return new Re((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(e){var t,A=null===(t=e.parentNode)||void 0===t?void 0:t.transformable;ft(e.transformable),function(e,t){e.dirtyFlag&&(t?d.lw(e.worldTransform,t.worldTransform,e.localTransform):d.C(e.worldTransform,e.localTransform),e.dirtyFlag=!1)}(e.transformable,A)}},{key:"internalUpdateElement",value:function(e,t){var A,n,i,r,o,s,a=!0===(null===(A=e.ownerDocument)||void 0===A||null===(A=A.defaultView)||void 0===A||null===(A=A.getConfig())||void 0===A||null===(A=A.future)||void 0===A?void 0:A.experimentalAttributeUpdateOptimization),l=t[t.length-1],u=(null==l?void 0:l.transformDirty)||(null===(n=e.transformable)||void 0===n?void 0:n.localDirtyFlag);e.transformable&&((o=e.transformable).dirtyFlag||(o.dirtyFlag=u)),this.internalUpdateTransform(e),u&&(null===(s=e.dirty)||void 0===s||s.call(e,!0,!0));var c=(null===(i=e.renderable)||void 0===i?void 0:i.boundsDirty)||(null===(r=e.renderable)||void 0===r?void 0:r.renderBoundsDirty);if((u||c)&&!1===(null==l?void 0:l.shapeUpdated)&&a)for(var h=t.length-1;h>=0;){var d,f,g=t[h];if(g.shapeUpdated)break;null===(d=(f=g.node).dirty)||void 0===d||d.call(f,!0,!0),g.shapeUpdated=!0,h-=1}return u}},{key:"syncHierarchy",value:function(e){for(var t,A,n=[e],i=e.parentNode?[{node:e.parentNode,transformDirty:(null===(t=e.parentNode.transformable)||void 0===t?void 0:t.localDirtyFlag)||(null===(A=e.parentNode.transformable)||void 0===A?void 0:A.dirtyFlag),shapeUpdated:!1}]:[];n.length>0;){for(var r=n.pop(),o=i[i.length-1];i.length>0&&r.parentNode!==o.node;)o=i.pop();var s=this.internalUpdateElement(r,i);if(r.childNodes.length>0){for(var a=r.childNodes.length-1;a>=0;a--)n.push(r.childNodes[a]);i.push({node:r,transformDirty:s,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(e,t){gi(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtyWorldTransform(e,t))}},{key:"dirtyWorldTransform",value:function(e,t){this.dirtyWorldInternal(e,t),this.dirtyToRoot(e,!0)}},{key:"dirtyWorldInternal",value:function(e,t){var A,n=this,i=!0===(null===(A=e.ownerDocument)||void 0===A||null===(A=A.defaultView)||void 0===A||null===(A=A.getConfig())||void 0===A||null===(A=A.future)||void 0===A?void 0:A.experimentalAttributeUpdateOptimization);t.dirtyFlag||(t.dirtyFlag=!0,e.dirty(!0,!0),i||e.childNodes.forEach(function(e){n.dirtyWorldInternal(e,e.transformable)}))}},{key:"dirtyToRoot",value:function(e){for(var t,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e,i=!0===(null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig())||void 0===t||null===(t=t.future)||void 0===t?void 0:t.experimentalAttributeUpdateOptimization);n;){var r,o;if(null===(r=(o=n).dirty)||void 0===r||r.call(o,!0,!0),i)break;n=n.parentNode}A&&e.forEach(function(e){var t;null===(t=e.dirty)||void 0===t||t.call(e,!0,!0)}),this.informDependentDisplayObjects(e);var s=e.mutations||[],a=s.find(function(e){return"attributes"===e.type&&e._boundsChangeData});a?a._boundsChangeData={affectChildren:a._boundsChangeData.affectChildren||A}:s.push(a={type:"attributes",target:e,_boundsChangeData:{affectChildren:A}}),e.mutations=s}},{key:"dirtyFragment",value:function(e){var t,A,n=e.transformable;n&&(n.dirtyFlag=!0,n.localDirtyFlag=!0),null===(t=(A=e).dirty)||void 0===t||t.call(A,!0,!0);for(var i=e.childNodes.length,r=0;r<i;r++)this.dirtyFragment(e.childNodes[r])}},{key:"notifyMutationObservers",value:function(e){var t=new Set;if(e.getRoot().forEach(function(e){(e.mutations||[]).forEach(function(A){"attributes"===A.type&&A._boundsChangeData&&(A._boundsChangeData.affectChildren?e.forEach(function(e){var i=(0,n.A)({},A);i.target=e,t.add(i)}):t.add(A))}),e.mutations=void 0}),t.size>0){var A=new sr(pr.BOUNDS_CHANGED,{detail:Array.from(t)});e.dispatchEvent(A,!0,!0)}}},{key:"updateDisplayObjectDependency",value:function(e,t,A,n){if(t&&t!==A){var i=this.displayObjectDependencyMap.get(t);if(i&&i[e]){var r=i[e].indexOf(n);i[e].splice(r,1)}}if(A){var o=this.displayObjectDependencyMap.get(A);o||(this.displayObjectDependencyMap.set(A,{}),o=this.displayObjectDependencyMap.get(A)),o[e]||(o[e]=[]),o[e].push(n)}}},{key:"informDependentDisplayObjects",value:function(e){var t,A=this,n=this.displayObjectDependencyMap.get(e);if(n){var i=null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig())||void 0===t||null===(t=t.future)||void 0===t?void 0:t.experimentalCancelEventPropagation;Object.keys(n).forEach(function(e){n[e].forEach(function(t){A.dirtyToRoot(t,!0),t.dispatchEvent(new vr(pr.ATTR_MODIFIED,t,A,A,e,vr.MODIFICATION,A,A),i,i),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,A,A)})})}}}])}(),Dr=function(){return(0,r.A)(function e(t){if((0,i.A)(this,e),t<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=t,this.cache=new Map},[{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}}},{key:"put",value:function(e,t){if(this.cache.has(e)&&this.cache.delete(e),this.cache.set(e,t),this.cache.size>this.capacity){var A=this.cache.keys().next().value;this.cache.delete(A)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),Pr={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Gr=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Kr=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),Vr=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),zr=function(){return(0,r.A)(function e(t){var A=this;(0,i.A)(this,e),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(e,t){return!A.isBreakingSpace(t)&&!(!e||!Vr.exec(t)&&!Kr.exec(e))},this.trimByKinsokuShorui=function(e){var t=(0,o.A)(e),A=t[t.length-2];if(!A)return e;var n=A[A.length-1];return t[t.length-2]=A.slice(0,-1),t[t.length-1]=n+t[t.length-1],t},this.runtime=t,this.charWidthCache=new Dr(100)},[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var A={ascent:0,descent:0,fontSize:0},n=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});i.font=e;var r=Pr.MetricsString+Pr.BaselineSymbol,o=Math.ceil(i.measureText(r).width),s=Math.ceil(i.measureText(Pr.BaselineSymbol).width),a=Pr.HeightMultiplier*s;s=s*Pr.BaselineMultiplier|0,n.width=o,n.height=a,i.fillStyle="#f00",i.fillRect(0,0,o,a),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(r,0,s);var l=i.getImageData(0,0,o||1,a||1).data,u=l.length,c=4*o,h=0,d=0,f=!1;for(h=0;h<s;++h){for(var g=0;g<c;g+=4)if(255!==l[d+g]){f=!0;break}if(f)break;d+=c}for(A.ascent=s-h,d=u-c,f=!1,h=a;h>s;--h){for(var p=0;p<c;p+=4)if(255!==l[d+p]){f=!0;break}if(f)break;d-=c}return A.descent=h-s,A.fontSize=A.ascent+A.descent,this.fontMetricsCache[e]=A,A}},{key:"measureText",value:function(e,t,A){var n=t.fontSize,i=void 0===n?16:n,r=t.wordWrap,o=void 0!==r&&r,s=t.lineHeight,a=t.lineWidth,l=void 0===a?1:a,u=t.textBaseline,c=void 0===u?"alphabetic":u,h=t.textAlign,d=void 0===h?"start":h,f=t.letterSpacing,g=void 0===f?0:f,p=t.textPath,v=t.leading,m=void 0===v?0:v,C=Mi(t),w=this.measureFont(C,A);0===w.fontSize&&(w.fontSize=i,w.ascent=i);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(A);y.font=C,t.isOverflowing=!1;var B=(o?this.wordWrap(e,t,A):e).split(/(?:\r\n|\r|\n)/),E=new Array(B.length),x=0;if(!p){for(var b=0;b<B.length;b++){var F=y.measureText(B[b]).width+(B[b].length-1)*g;E[b]=F,x=Math.max(x,F)}var S=x+l,T=s||w.fontSize+l,L=Math.max(T,w.fontSize+l)+(B.length-1)*(T+m),Q=0;return"middle"===c?Q=-L/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?Q=-L:"top"!==c&&"hanging"!==c||(Q=0),{font:C,width:S,height:L,lines:B,lineWidths:E,lineHeight:T+=m,maxLineWidth:x,fontProperties:w,lineMetrics:E.map(function(e,t){var A=0;return"center"===d||"middle"===d?A-=e/2:"right"!==d&&"end"!==d||(A-=e),new Re(A-l/2,Q+t*T,e+l,T)})}}p.getTotalLength();for(var I=0;I<B.length;I++)y.measureText(B[I])}},{key:"wordWrap",value:function(e,t,A){var n=this,i=Array.from(e);if(0===i.length)return"";var r=this,o=t.wordWrapWidth,s=void 0===o?0:o,a=t.letterSpacing,l=void 0===a?0:a,u=t.maxLines,c=void 0===u?1/0:u,h=t.textOverflow,d=this.runtime.offscreenCanvasCreator.getOrCreateContext(A),f=s+l,g="";"ellipsis"===h?g="...":h&&"clip"!==h&&(g=h);var p=[""],v=0,m=0,C=-1,w=Mi(t),y=this.charWidthCache.get(w);y||(y=new Dr(500),this.charWidthCache.put(w,y));var B=function(e){return n.getFromCache(e,l,y,d)},E=B(g);function x(e,t,A,n){for(;B(e)<n&&t<i.length-1&&!r.isNewline(i[t+1]);)e+=i[t+=1];for(;B(e)>n&&t>=A;)t-=1,e=e.slice(0,-1);return{lineTxt:e,txtLastCharIndex:t}}function b(e,t){if(!(E<=0||E>f))if(p[e]){var A=x(p[e],t,C+1,f-E);p[e]=A.lineTxt+g}else p[e]=g}for(var F=0;F<i.length;F++){var S=i[F],T=i[F-1],L=i[F+1],Q=B(S);if(this.isNewline(S)){if(v+1>=c){F<i.length-1&&b(v,F-1),t.isOverflowing=!0;break}C=F-1,m=0,p[v+=1]=""}else{if(Q>f){b(v,F-1),t.isOverflowing=!0;break}if(m>0&&m+Q>f){var I=x(p[v],F-1,C+1,f);if(I.txtLastCharIndex!==F-1){if(p[v]=I.lineTxt,I.txtLastCharIndex===i.length-1)break;T=i[(F=I.txtLastCharIndex+1)-1],L=i[F+1],Q=B(S=i[F])}if(v+1>=c){b(v,F-1),t.isOverflowing=!0;break}if(C=F-1,m=0,p[v+=1]="",this.isBreakingSpace(S))continue;this.canBreakInLastChar(S)||(p=this.trimToBreakable(p),m=this.sumTextWidthByCache(p[v]||"",B)),this.shouldBreakByKinsokuShorui(S,L)&&(p=this.trimByKinsokuShorui(p),m+=B(T||""))}m+=Q,p[v]+=S}}return p.join("\n")}},{key:"isBreakingSpace",value:function(e){return"string"==typeof e&&Pr.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return"string"==typeof e&&Pr.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=(0,o.A)(e),A=t[t.length-2],n=this.findBreakableIndex(A);if(-1===n||!A)return t;var i=A.slice(n,n+1),r=n+(this.isBreakingSpace(i)?0:1);return t[t.length-1]+=A.slice(n+1,A.length),t[t.length-2]=A.slice(0,r),t}},{key:"canBreakInLastChar",value:function(e){return!e||!Gr.test(e)}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(e,A){return e+t(A)},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!Gr.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,A,n){var i=A.get(e);if("number"!=typeof i){var r=e.length*t,o=n.measureText(e);A.put(e,i=o.width+r)}return i}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),Wr={},jr=(Cr=new $i,wr=new Ji,(0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)(mr={},Ee.FRAGMENT,null),Ee.CIRCLE,new Xi),Ee.ELLIPSE,new Yi),Ee.RECT,Cr),Ee.IMAGE,Cr),Ee.GROUP,new tr),Ee.LINE,new qi),Ee.TEXT,new er(Wr)),Ee.POLYLINE,wr),Ee.POLYGON,wr),(0,ge.A)((0,ge.A)((0,ge.A)(mr,Ee.PATH,new Zi),Ee.HTML,new Ar),Ee.MESH,null)),Xr=function(e){var t=new zn,A=new Xn;return(0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)(e={},pt.PERCENTAGE,null),pt.NUMBER,new Jn),pt.ANGLE,new Kn),pt.DEFINED_PATH,new Vn),pt.PAINT,t),pt.COLOR,t),pt.FILTER,new Wn),pt.LENGTH,A),pt.LENGTH_PERCENTAGE,A),pt.LENGTH_PERCENTAGE_12,new Yn),(0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)((0,ge.A)(e,pt.LENGTH_PERCENTAGE_14,new qn),pt.COORDINATE,new Xn),pt.OFFSET_DISTANCE,new $n),pt.OPACITY_VALUE,new ei),pt.PATH,new ti),pt.LIST_OF_POINTS,new Ai),pt.SHADOW_BLUR,new ni),pt.TEXT,new ii),pt.TEXT_TRANSFORM,new ri),pt.TRANSFORM,new zi),(0,ge.A)((0,ge.A)((0,ge.A)(e,pt.TRANSFORM_ORIGIN,new Wi),pt.Z_INDEX,new ji),pt.MARKER,new Zn)}();Wr.CameraContribution=at,Wr.AnimationTimeline=null,Wr.EasingFunction=null,Wr.offscreenCanvasCreator=new cr,Wr.sceneGraphSelector=new gr,Wr.sceneGraphService=new Nr(Wr),Wr.textService=new zr(Wr),Wr.geometryUpdaterFactory=jr,Wr.CSSPropertySyntaxFactory=Xr,Wr.styleValueRegistry=new Pn(Wr),Wr.layoutRegistry=null,Wr.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==A.g?A.g:{},Wr.enableStyleSyntax=!0,Wr.enableSizeAttenuation=!1;var Yr=0,qr=new vr(pr.INSERTED,null,"","","",0,"",""),Zr=new vr(pr.REMOVED,null,"","","",0,"",""),Jr=new sr(pr.DESTROY),$r=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).entity=Yr++,e.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.cullable={strategy:lt.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"dirty",value:function(){var e=arguments.length>1?arguments[1]:void 0;this.renderable.dirty=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],void 0!==e&&(this.renderable.boundsDirty=e,this.renderable.renderBoundsDirty=e,this.geometry.dirty=e)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(e){this.setAttribute("class",e)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(e){return""!==e})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var e=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[e+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var e=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[e-1]||null}return null}},{key:"cloneNode",value:function(e){throw new Error(Ne)}},{key:"appendChild",value:function(e,t){var A;if(e.destroyed)throw new Error("Cannot append a destroyed element.");return Wr.sceneGraphService.attach(e,this,t),null!==(A=this.ownerDocument)&&void 0!==A&&A.defaultView&&(gi(this)||e.nodeName!==Ee.FRAGMENT?this.ownerDocument.defaultView.mountChildren(e):this.ownerDocument.defaultView.mountFragment(e)),this.isMutationObserved&&(qr.relatedNode=this,e.dispatchEvent(qr)),e}},{key:"insertBefore",value:function(e,t){if(t){e.parentElement&&e.parentElement.removeChild(e);var A=this.childNodes.indexOf(t);-1===A?this.appendChild(e):this.appendChild(e,A)}else this.appendChild(e);return e}},{key:"replaceChild",value:function(e,t){var A=this.childNodes.indexOf(t);return this.removeChild(t),this.appendChild(e,A),t}},{key:"removeChild",value:function(e){var t,A,n=!0===(null===(t=this.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation);return Zr.relatedNode=this,e.dispatchEvent(Zr,n,n),null!==(A=e.ownerDocument)&&void 0!==A&&A.defaultView&&e.ownerDocument.defaultView.unmountChildren(e),Wr.sceneGraphService.detach(e),e}},{key:"removeChildren",value:function(){for(var e=this.childNodes.length-1;e>=0;e--)this.removeChild(this.childNodes[e])}},{key:"destroyChildren",value:function(){for(var e=this.childNodes.length-1;e>=0;e--){var t=this.childNodes[e];t.childNodes.length>0&&t.destroyChildren(),t.destroy()}}},{key:"matches",value:function(e){return Wr.sceneGraphService.matches(e,this)}},{key:"getElementById",value:function(e){return Wr.sceneGraphService.querySelector("#".concat(e),this)}},{key:"getElementsByName",value:function(e){return Wr.sceneGraphService.querySelectorAll('[name="'.concat(e,'"]'),this)}},{key:"getElementsByClassName",value:function(e){return Wr.sceneGraphService.querySelectorAll(".".concat(e),this)}},{key:"getElementsByTagName",value:function(e){return Wr.sceneGraphService.querySelectorAll(e,this)}},{key:"querySelector",value:function(e){return Wr.sceneGraphService.querySelector(e,this)}},{key:"querySelectorAll",value:function(e){return Wr.sceneGraphService.querySelectorAll(e,this)}},{key:"closest",value:function(e){var t=this;do{if(Wr.sceneGraphService.matches(e,t))return t;t=t.parentElement}while(null!==t);return null}},{key:"find",value:function(e){var t=this,A=null;return this.forEach(function(n){return n===t||!e(n)||(A=n,!1)}),A}},{key:"findAll",value:function(e){var t=this,A=[];return this.forEach(function(n){n!==t&&e(n)&&A.push(n)}),A}},{key:"after",value:function(){var e=this;if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),A=arguments.length,n=new Array(A),i=0;i<A;i++)n[i]=arguments[i];n.forEach(function(A,n){var i;return null===(i=e.parentNode)||void 0===i?void 0:i.appendChild(A,t+n+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var e,t=this.parentNode.childNodes.indexOf(this),A=arguments.length,n=new Array(A),i=0;i<A;i++)n[i]=arguments[i];var r=n[0],s=(0,ve.A)(n).slice(1);this.parentNode.appendChild(r,t),(e=r).after.apply(e,(0,o.A)(s))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var e=this,t=arguments.length,A=new Array(t),n=0;n<t;n++)A[n]=arguments[n];A.forEach(function(t){return e.appendChild(t)})}},{key:"prepend",value:function(){for(var e=this,t=arguments.length,A=new Array(t),n=0;n<t;n++)A[n]=arguments[n];A.forEach(function(t,A){return e.appendChild(t,A)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var e,t=!0===(null===(e=this.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e||null===(e=e.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation);this.destroyChildren(),this.dispatchEvent(Jr,t,t),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return Wr.sceneGraphService.getGeometryBounds(this,arguments.length>0&&void 0!==arguments[0]&&arguments[0])}},{key:"getTransformedGeometryBounds",value:function(){return Wr.sceneGraphService.getTransformedGeometryBounds(this,arguments.length>0&&void 0!==arguments[0]&&arguments[0])}},{key:"getBounds",value:function(){return Wr.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return Wr.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return Wr.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return Wr.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(e){if("symbol"!=typeof e)return this.attributes[e]}},{key:"hasAttribute",value:function(e){return this.getAttributeNames().includes(e)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(e){this.setAttribute(e,null),delete this.attributes[e]}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"getAttributeNS",value:function(e,t){throw new Error(Ne)}},{key:"getAttributeNode",value:function(e){throw new Error(Ne)}},{key:"getAttributeNodeNS",value:function(e,t){throw new Error(Ne)}},{key:"hasAttributeNS",value:function(e,t){throw new Error(Ne)}},{key:"removeAttributeNS",value:function(e,t){throw new Error(Ne)}},{key:"removeAttributeNode",value:function(e){throw new Error(Ne)}},{key:"setAttributeNS",value:function(e,t,A){throw new Error(Ne)}},{key:"setAttributeNode",value:function(e){throw new Error(Ne)}},{key:"setAttributeNodeNS",value:function(e){throw new Error(Ne)}},{key:"toggleAttribute",value:function(e,t){throw new Error(Ne)}}])}(lr);function eo(e){return!(null==e||!e.nodeName)}var to=Wr.globalThis.Proxy?Wr.globalThis.Proxy:function(){},Ao=new vr(pr.ATTR_MODIFIED,null,null,null,null,vr.MODIFICATION,null,null),no=c.vt(),io=p.vt(),ro=function(e){function t(e){var A;return(0,i.A)(this,t),(A=(0,s.A)(this,t)).isCustomElement=!1,A.isMutationObserved=!1,A.activeAnimations=[],A.config=e,A.id=e.id||"",A.name=e.name||"",(e.className||e.class)&&(A.className=e.className||e.class),A.nodeName=e.type||Ee.GROUP,e.initialParsedStyle&&Object.assign(A.parsedStyle,e.initialParsedStyle),A.initAttributes(e.style),Wr.enableStyleSyntax&&(A.style=new to({setProperty:function(e,t){A.setAttribute(e,t)},getPropertyValue:function(e){return A.getAttribute(e)},removeProperty:function(e){A.removeAttribute(e)},item:function(){return""}},{get:function(e,t){return void 0!==e[t]?e[t]:A.getAttribute(t)},set:function(e,t,n){return A.setAttribute(t,n),!0}})),A}return(0,a.A)(t,e),(0,r.A)(t,[{key:"destroy",value:function(){(0,pe.A)(t,"destroy",this,3)([]),this.getAnimations().forEach(function(e){e.cancel()})}},{key:"cloneNode",value:function(e,t){var A=(0,n.A)({},this.attributes);for(var i in A){var r=A[i];eo(r)&&"clipPath"!==i&&"offsetPath"!==i&&"textPath"!==i&&(A[i]=r.cloneNode(e)),t&&(A[i]=t(i,r))}var o=new this.constructor((0,n.A)((0,n.A)({},this.config),{},{style:A}));return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){if(!t.style.isMarker){var A=t.cloneNode(e);o.appendChild(A)}}),o}},{key:"initAttributes",value:function(){Wr.styleValueRegistry.processProperties(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{forceUpdateGeometry:!0}),this.dirty()}},{key:"setAttribute",value:function(e,A){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];(0,le.A)(A)||(n||A!==this.attributes[e])&&(this.internalSetAttribute(e,A,{memoize:i}),(0,pe.A)(t,"setAttribute",this,3)([e,A]))}},{key:"setAttributes",value:function(e){var t,A,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.skipDispatchAttrModifiedEvent,o=void 0!==r&&r;if(o||(t=(0,n.A)({},this.attributes),A=(0,n.A)({},this.parsedStyle)),Wr.styleValueRegistry.processProperties(this,e,i),this.dirty(),!o)for(var s in e)this.dispatchAttrModifiedEvent(s,t[s],e[s],A[s])}},{key:"internalSetAttribute",value:function(e,t){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.attributes[e],i=this.parsedStyle[e];Wr.styleValueRegistry.processProperties(this,(0,ge.A)({},e,t),A),this.dirty(),this.dispatchAttrModifiedEvent(e,n,t,i)}},{key:"dispatchAttrModifiedEvent",value:function(e,t,A,n){var i,r=this.parsedStyle[e];if(this.isConnected)if(Ao.relatedNode=this,Ao.prevValue=t,Ao.newValue=A,Ao.attrName=e,Ao.prevParsedValue=n,Ao.newParsedValue=r,this.isMutationObserved)this.dispatchEvent(Ao);else{var o,s=!0===(null===(o=this.ownerDocument.defaultView.getConfig().future)||void 0===o?void 0:o.experimentalCancelEventPropagation);Ao.target=this,this.ownerDocument.defaultView.dispatchEvent(Ao,!0,s)}(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&(null===(i=this.attributeChangedCallback)||void 0===i||i.call(this,e,t,A,n,r))}},{key:"getBBox",value:function(){var e=this.getBounds(),t=e.getMin(),A=(0,l.A)(t,2),n=A[0],i=A[1],r=e.getMax(),o=(0,l.A)(r,2);return new Re(n,i,o[0]-n,o[1]-i)}},{key:"setOrigin",value:function(e){return Wr.sceneGraphService.setOrigin(this,Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,!1)),this}},{key:"getOrigin",value:function(){return Wr.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(e){return Wr.sceneGraphService.setPosition(this,Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,!1)),this}},{key:"setLocalPosition",value:function(e){return Wr.sceneGraphService.setLocalPosition(this,Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,!1)),this}},{key:"translate",value:function(e){return Wr.sceneGraphService.translate(this,Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,!1)),this}},{key:"translateLocal",value:function(e){return Wr.sceneGraphService.translateLocal(this,Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,!1)),this}},{key:"getPosition",value:function(){return Wr.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Wr.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(e,t,A){return this.scaleLocal(e,t,A)}},{key:"scaleLocal",value:function(e,t,A){return"number"==typeof e&&(e=Ke(e,t=t||e,A=A||e,!1)),Wr.sceneGraphService.scaleLocal(this,e),this}},{key:"setLocalScale",value:function(e,t,A){return"number"==typeof e&&(e=Ke(e,t=t||e,A=A||e,!1)),Wr.sceneGraphService.setLocalScale(this,e),this}},{key:"getLocalScale",value:function(){return Wr.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Wr.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var e=Ye(no,Wr.sceneGraphService.getWorldTransform(this));return je((0,l.A)(e,3)[2])}},{key:"getLocalEulerAngles",value:function(){var e=Ye(no,Wr.sceneGraphService.getLocalRotation(this));return je((0,l.A)(e,3)[2])}},{key:"setEulerAngles",value:function(e){return Wr.sceneGraphService.setEulerAngles(this,0,0,e),this}},{key:"setLocalEulerAngles",value:function(e){return Wr.sceneGraphService.setLocalEulerAngles(this,0,0,e),this}},{key:"rotateLocal",value:function(e,t,A){return(0,w.A)(t)&&(0,w.A)(A)?Wr.sceneGraphService.rotateLocal(this,0,0,e):Wr.sceneGraphService.rotateLocal(this,e,t,A),this}},{key:"rotate",value:function(e,t,A){return(0,w.A)(t)&&(0,w.A)(A)?Wr.sceneGraphService.rotate(this,0,0,e):Wr.sceneGraphService.rotate(this,e,t,A),this}},{key:"setRotation",value:function(e,t,A,n){return Wr.sceneGraphService.setRotation(this,e,t,A,n),this}},{key:"setLocalRotation",value:function(e,t,A,n){return Wr.sceneGraphService.setLocalRotation(this,e,t,A,n),this}},{key:"setLocalSkew",value:function(e,t){return Wr.sceneGraphService.setLocalSkew(this,e,t),this}},{key:"getRotation",value:function(){return Wr.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Wr.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Wr.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Wr.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Wr.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(e){return Wr.sceneGraphService.setLocalTransform(this,e),this}},{key:"resetLocalTransform",value:function(){Wr.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(e,t){var A,n=null===(A=this.ownerDocument)||void 0===A?void 0:A.timeline;return n?n.play(this,e,t):null}},{key:"isVisible",value:function(){var e;return"hidden"!==(null===(e=this.parsedStyle)||void 0===e?void 0:e.visibility)}},{key:"interactive",get:function(){return this.isInteractive()},set:function(e){this.style.pointerEvents=e?"auto":"none"}},{key:"isInteractive",value:function(){var e;return"none"!==(null===(e=this.parsedStyle)||void 0===e?void 0:e.pointerEvents)}},{key:"isCulled",value:function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,o.A)(this.parentNode.children.map(function(e){return Number(e.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,o.A)(this.parentNode.children.map(function(e){return Number(e.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var e=this,t=arguments.length,A=new Array(t),n=0;n<t;n++)A[n]=arguments[n];var i=A[0],r=A[1];return i?(0,fe.A)(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===A.length?(this.setAttribute(i,r),this):this.attributes[i]:this.attributes}},{key:"getMatrix",value:function(e){var t=e||this.getWorldTransform(),A=d.sC(no,t),n=(0,l.A)(A,2),i=n[0],r=n[1],o=d.IL(no,t),s=(0,l.A)(o,2),a=s[0],u=s[1],c=d.l(io,t),h=Ye(no,c),f=(0,l.A)(h,3);return function(e,t,A,n,i){var r=Math.cos(e),o=Math.sin(e);return g.fA(n*r,i*o,0,-n*o,i*r,0,t,A,1)}(f[0]||f[2],i,r,a,u)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(e){var t=qe(e),A=(0,l.A)(t,5),n=A[0],i=A[1],r=A[2],o=A[3];this.setEulerAngles(A[4]).setPosition(n,i).setLocalScale(r,o)}},{key:"setLocalMatrix",value:function(e){var t=qe(e),A=(0,l.A)(t,5),n=A[0],i=A[1],r=A[2],o=A[3];this.setLocalEulerAngles(A[4]).setLocalPosition(n,i).setLocalScale(r,o)}},{key:"show",value:function(){this.forEach(function(e){e.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(e){e.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(e){return this.children[e]||null}},{key:"add",value:function(e,t){return this.appendChild(e,t)}},{key:"set",value:function(e,t){this.config[e]=t}},{key:"get",value:function(e){return this.config[e]}},{key:"moveTo",value:function(e){return this.setPosition(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"move",value:function(e){return this.setPosition(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"setZIndex",value:function(e){return this.style.zIndex=e,this}}])}($r);ro.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var oo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.CIRCLE},e)])}return(0,a.A)(t,e),(0,r.A)(t)}(ro);oo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var so=["style"],ao=function(e){function t(){var e,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=A.style,o=(0,Be.A)(A,so);return(0,i.A)(this,t),(e=(0,s.A)(this,t,[(0,n.A)({style:r},o)])).isCustomElement=!0,e}return(0,a.A)(t,e),(0,r.A)(t)}(ro);ao.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var lo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.ELLIPSE},e)])}return(0,a.A)(t,e),(0,r.A)(t)}(ro);lo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"])),(function(e){function t(){return(0,i.A)(this,t),(0,s.A)(this,t,[{type:Ee.FRAGMENT}])}return(0,a.A)(t,e),(0,r.A)(t)}(ro)).PARSED_STYLE_LIST=new Set(["class","className"]);var uo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.GROUP},e)])}return(0,a.A)(t,e),(0,r.A)(t)}(ro);uo.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var co=["style"],ho=function(e){function t(){var e,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=A.style,o=(0,Be.A)(A,co);return(0,i.A)(this,t),(e=(0,s.A)(this,t,[(0,n.A)({type:Ee.HTML,style:r},o)])).cullable.enable=!1,e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var e=d.B8(d.vt(),this.parentNode.getWorldTransform()),t=this.getBounds();if(!Oe.isEmpty(t)){var A=new Oe;return A.setFromTransformedAABB(t,e),A}}return this.getBounds()}}])}(ro);ho.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var fo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.IMAGE},e)])}return(0,a.A)(t,e),(0,r.A)(t)}(ro);fo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var go=["style"],po=function(e){function t(){var e,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=A.style,o=(0,Be.A)(A,go);(0,i.A)(this,t),(e=(0,s.A)(this,t,[(0,n.A)({type:Ee.LINE,style:(0,n.A)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},o)])).markerStartAngle=0,e.markerEndAngle=0;var a=e.parsedStyle,l=a.markerStart,u=a.markerEnd;return l&&eo(l)&&(e.markerStartAngle=l.getLocalEulerAngles(),e.appendChild(l)),u&&eo(u)&&(e.markerEndAngle=u.getLocalEulerAngles(),e.appendChild(u)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"attributeChangedCallback",value:function(e,t,A,n,i){"x1"===e||"y1"===e||"x2"===e||"y2"===e||"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(n&&eo(n)&&(this.markerStartAngle=0,n.remove()),i&&eo(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===e&&(n&&eo(n)&&(this.markerEndAngle=0,n.remove()),i&&eo(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))}},{key:"transformMarker",value:function(e){var t,A,n,i,r,o,s,a=this.parsedStyle,l=a.markerStartOffset,u=a.markerEndOffset,c=a.x1,h=a.x2,d=a.y1,f=a.y2,g=e?a.markerStart:a.markerEnd;g&&eo(g)&&(e?(i=c,r=d,A=h-c,n=f-d,o=l||0,s=this.markerStartAngle):(i=h,r=f,A=c-h,n=d-f,o=u||0,s=this.markerEndAngle),t=Math.atan2(n,A),g.setLocalEulerAngles(180*t/Math.PI+s),g.setLocalPosition(i+Math.cos(t)*o,r+Math.sin(t)*o))}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=this.parsedStyle,n=(0,me.iP)(A.x1,A.y1,A.x2,A.y2,e),i=n.x,r=n.y,o=c.Z0(c.vt(),c.fA(i,r,0),t?this.getWorldTransform():this.getLocalTransform());return new ke(o[0],o[1])}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(e/this.getTotalLength(),t)}},{key:"getTotalLength",value:function(){var e=this.parsedStyle;return(0,me.bU)(e.x1,e.y1,e.x2,e.y2)}}])}(ro);po.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var vo=["style"],mo=function(e){function t(){var e,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=A.style,o=(0,Be.A)(A,vo);(0,i.A)(this,t),(e=(0,s.A)(this,t,[(0,n.A)({type:Ee.PATH,style:r,initialParsedStyle:{miterLimit:4,d:(0,n.A)({},gt)}},o)])).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var a=e.parsedStyle,l=a.markerStart,u=a.markerEnd,c=a.markerMid;return l&&eo(l)&&(e.markerStartAngle=l.getLocalEulerAngles(),e.appendChild(l)),c&&eo(c)&&e.placeMarkerMid(c),u&&eo(u)&&(e.markerEndAngle=u.getLocalEulerAngles(),e.appendChild(u)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"attributeChangedCallback",value:function(e,t,A,n,i){"d"===e?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(n&&eo(n)&&(this.markerStartAngle=0,n.remove()),i&&eo(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===e?(n&&eo(n)&&(this.markerEndAngle=0,n.remove()),i&&eo(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===e&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(e){var t=this.parsedStyle,A=t.markerStartOffset,n=t.markerEndOffset,i=e?t.markerStart:t.markerEnd;if(i&&eo(i)){var r,o,s,a,u,c,h;if(e){var d=this.getStartTangent(),f=(0,l.A)(d,2),g=f[0],p=f[1];a=p[0],u=p[1],o=g[0]-p[0],s=g[1]-p[1],c=A||0,h=this.markerStartAngle}else{var v=this.getEndTangent(),m=(0,l.A)(v,2),C=m[0],w=m[1];a=w[0],u=w[1],o=C[0]-w[0],s=C[1]-w[1],c=n||0,h=this.markerEndAngle}r=Math.atan2(s,o),i.setLocalEulerAngles(180*r/Math.PI+h),i.setLocalPosition(a+Math.cos(r)*c,u+Math.sin(r)*c)}}},{key:"placeMarkerMid",value:function(e){var t=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(e){e.remove()}),e&&eo(e))for(var A=1;A<t.length-1;A++){var n=(0,l.A)(t[A].currentPoint,2),i=n[0],r=n[1],o=1===A?e:e.cloneNode(!0);this.markerMidList.push(o),this.appendChild(o),o.setLocalPosition(i,r)}}},{key:"getTotalLength",value:function(){return $A(this)}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=function(e,t){return q(e,t,(0,E.Cl)((0,E.Cl)({},void 0),{bbox:!1,length:!0})).point}(this.parsedStyle.d.absolutePath,e),n=A.x,i=A.y,r=c.Z0(c.vt(),c.fA(n,i,0),t?this.getWorldTransform():this.getLocalTransform());return new ke(r[0],r[1])}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPointAtLength(e*$A(this),t)}},{key:"getStartTangent",value:function(){var e=this.parsedStyle.d.segments,t=[];if(e.length>1){var A=e[0].currentPoint,n=e[1].currentPoint,i=e[1].startTangent;t=[],i?(t.push([A[0]-i[0],A[1]-i[1]]),t.push([A[0],A[1]])):(t.push([n[0],n[1]]),t.push([A[0],A[1]]))}return t}},{key:"getEndTangent",value:function(){var e=this.parsedStyle.d.segments,t=e.length,A=[];if(t>1){var n=e[t-2].currentPoint,i=e[t-1].currentPoint,r=e[t-1].endTangent;A=[],r?(A.push([i[0]-r[0],i[1]-r[1]]),A.push([i[0],i[1]])):(A.push([n[0],n[1]]),A.push([i[0],i[1]]))}return A}}])}(ro);mo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Co=["style"],wo=function(e){function t(){var e,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=A.style,o=(0,Be.A)(A,Co);(0,i.A)(this,t),(e=(0,s.A)(this,t,[(0,n.A)({type:Ee.POLYGON,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},o)])).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var a=e.parsedStyle,l=a.markerStart,u=a.markerEnd,c=a.markerMid;return l&&eo(l)&&(e.markerStartAngle=l.getLocalEulerAngles(),e.appendChild(l)),c&&eo(c)&&e.placeMarkerMid(c),u&&eo(u)&&(e.markerEndAngle=u.getLocalEulerAngles(),e.appendChild(u)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"attributeChangedCallback",value:function(e,t,A,n,i){"points"===e?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(n&&eo(n)&&(this.markerStartAngle=0,n.remove()),i&&eo(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===e?(n&&eo(n)&&(this.markerEndAngle=0,n.remove()),i&&eo(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===e&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(e){var t=this.parsedStyle,A=t.markerStartOffset,n=t.markerEndOffset,i=(t.points||{}).points,r=e?t.markerStart:t.markerEnd;if(r&&eo(r)&&i){var o,s,a,l,u,c,h;if(l=i[0][0],u=i[0][1],e)s=i[1][0]-i[0][0],a=i[1][1]-i[0][1],c=A||0,h=this.markerStartAngle;else{var d=i.length;this.parsedStyle.isClosed?(s=i[d-1][0]-i[0][0],a=i[d-1][1]-i[0][1]):(l=i[d-1][0],u=i[d-1][1],s=i[d-2][0]-i[d-1][0],a=i[d-2][1]-i[d-1][1]),c=n||0,h=this.markerEndAngle}o=Math.atan2(a,s),r.setLocalEulerAngles(180*o/Math.PI+h),r.setLocalPosition(l+Math.cos(o)*c,u+Math.sin(o)*c)}}},{key:"placeMarkerMid",value:function(e){var t=(this.parsedStyle.points||{}).points;if(this.markerMidList.forEach(function(e){e.remove()}),this.markerMidList=[],e&&eo(e)&&t)for(var A=1;A<(this.parsedStyle.isClosed?t.length:t.length-1);A++){var n=t[A][0],i=t[A][1],r=1===A?e:e.cloneNode(!0);this.markerMidList.push(r),this.appendChild(r),r.setLocalPosition(n,i)}}}])}(ro);wo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var yo=["style"],Bo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.style,r=(0,Be.A)(e,yo);return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.POLYLINE,style:A,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r)])}return(0,a.A)(t,e),(0,r.A)(t,[{key:"getTotalLength",value:function(){return 0===(e=this).parsedStyle.points.totalLength&&(e.parsedStyle.points.totalLength=(0,me.Sy)(e.parsedStyle.points.points)),e.parsedStyle.points.totalLength;var e}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(e/this.getTotalLength(),t)}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=this.parsedStyle.points.points;if(0===this.parsedStyle.points.segments.length){var n,i,r=[],o=0,s=this.getTotalLength();A.forEach(function(e,t){A[t+1]&&((n=[0,0])[0]=o/s,i=(0,me.bU)(e[0],e[1],A[t+1][0],A[t+1][1]),n[1]=(o+=i)/s,r.push(n))}),this.parsedStyle.points.segments=r}var a=0,l=0;this.parsedStyle.points.segments.forEach(function(t,A){e>=t[0]&&e<=t[1]&&(a=(e-t[0])/(t[1]-t[0]),l=A)});var u=(0,me.iP)(A[l][0],A[l][1],A[l+1][0],A[l+1][1],a),h=u.x,d=u.y,f=c.Z0(c.vt(),c.fA(h,d,0),t?this.getWorldTransform():this.getLocalTransform());return new ke(f[0],f[1])}},{key:"getStartTangent",value:function(){var e=this.parsedStyle.points.points,t=[];return t.push([e[1][0],e[1][1]]),t.push([e[0][0],e[0][1]]),t}},{key:"getEndTangent",value:function(){var e=this.parsedStyle.points.points,t=e.length-1,A=[];return A.push([e[t-1][0],e[t-1][1]]),A.push([e[t][0],e[t][1]]),A}}])}(wo);Bo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(wo.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Eo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.RECT},e)])}return(0,a.A)(t,e),(0,r.A)(t)}(ro);Eo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var xo=["style"],bo=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.style,r=(0,Be.A)(e,xo);return(0,i.A)(this,t),(0,s.A)(this,t,[(0,n.A)({type:Ee.TEXT,style:(0,n.A)({fill:"black"},A)},r)])}return(0,a.A)(t,e),(0,r.A)(t,[{key:"getComputedTextLength",value:function(){var e;return this.getGeometryBounds(),(null===(e=this.parsedStyle.metrics)||void 0===e?void 0:e.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var e;return this.getGeometryBounds(),(null===(e=this.parsedStyle.metrics)||void 0===e?void 0:e.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(ro);bo.PARSED_STYLE_LIST=new Set([].concat((0,o.A)(ro.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textDecorationThickness","textPathSide","textPathStartOffset","metrics","dx","dy"]));var Fo=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.registry={},this.define(Ee.CIRCLE,oo),this.define(Ee.ELLIPSE,lo),this.define(Ee.RECT,Eo),this.define(Ee.IMAGE,fo),this.define(Ee.LINE,po),this.define(Ee.GROUP,uo),this.define(Ee.PATH,mo),this.define(Ee.POLYGON,wo),this.define(Ee.POLYLINE,Bo),this.define(Ee.TEXT,bo),this.define(Ee.HTML,ho)},[{key:"define",value:function(e,t){this.registry[e]=t}},{key:"get",value:function(e){return this.registry[e]}}])}(),So={number:function(e){return new cA(e)},percent:function(e){return new cA(e,"%")},px:function(e){return new cA(e,"px")},em:function(e){return new cA(e,"em")},rem:function(e){return new cA(e,"rem")},deg:function(e){return new cA(e,"deg")},grad:function(e){return new cA(e,"grad")},rad:function(e){return new cA(e,"rad")},turn:function(e){return new cA(e,"turn")},s:function(e){return new cA(e,"s")},ms:function(e){return new cA(e,"ms")},registerProperty:function(e){Wr.styleValueRegistry.registerMetadata({n:e.name,inh:e.inherits,int:e.interpolable,d:e.initialValue,syntax:e.syntax})},registerLayout:function(e,t){Wr.layoutRegistry.registerLayout(e,t)}},To=function(e){function t(){var e;(0,i.A)(this,t),(e=(0,s.A)(this,t)).defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new Wr.AnimationTimeline(e)}catch(e){}var A={};return Rn.forEach(function(e){var t=e.d;e.inh&&t&&(A[e.n]=(0,de.A)(t)?t(Ee.GROUP):t)}),e.documentElement=new uo({id:"g-root",style:A}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(e,t){if("svg"===e)return this.documentElement;var A=this.defaultView.customElements.get(e);A||(console.warn("Unsupported tagName: ",e),A="tspan"===e?bo:uo);var n=new A(t);return n.ownerDocument=this,n}},{key:"createElementNS",value:function(e,t,A){return this.createElement(t,A)}},{key:"cloneNode",value:function(e){throw new Error(Ne)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(e){}}},{key:"elementsFromBBox",value:function(e,t,A,n){var i=[],r=function(o){if(o.isInteractive()&&!o.isCulled()){var s=o.parsedStyle.pointerEvents;if(!["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(void 0===s?"auto":s)||o.isVisible()){var a=o.getTransformedGeometryBounds(!0);a&&!Oe.isEmpty(a)&&a.max[0]>=e&&a.min[0]<=A&&a.max[1]>=t&&a.min[1]<=n&&i.push(o)}o.childNodes&&o.childNodes.forEach(function(e){e instanceof ro&&r(e)})}};return r(this.documentElement),i.sort(function(e,t){return t.sortable.renderOrder-e.sortable.renderOrder}),i}},{key:"elementFromPointSync",value:function(e,t){var A=this.defaultView.canvas2Viewport({x:e,y:t}),n=A.x,i=A.y,r=this.defaultView.getConfig();if(n<0||i<0||n>r.width||i>r.height)return null;var o=this.defaultView.viewport2Client({x:n,y:i}),s=o.x,a=o.y,l=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:e,y:t,viewportX:n,viewportY:i,clientX:s,clientY:a},picked:[]}).picked;return l&&l[0]||this.documentElement}},{key:"elementFromPoint",value:(n=(0,we.A)((0,Ce.A)().mark(function e(t,A){var n,i,r,o,s,a,l,u,c,h;return(0,Ce.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.defaultView.canvas2Viewport({x:t,y:A}),i=n.x,r=n.y,o=this.defaultView.getConfig(),s=o.width,a=o.height,!(i<0||r<0||i>s||r>a)){e.next=1;break}return e.abrupt("return",null);case 1:return l=this.defaultView.viewport2Client({x:i,y:r}),u=l.x,c=l.y,e.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:A,viewportX:i,viewportY:r,clientX:u,clientY:c},picked:[]});case 2:return e.abrupt("return",(h=e.sent.picked)&&h[0]||this.documentElement);case 3:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"elementsFromPointSync",value:function(e,t){var A=this.defaultView.canvas2Viewport({x:e,y:t}),n=A.x,i=A.y,r=this.defaultView.getConfig();if(n<0||i<0||n>r.width||i>r.height)return[];var o=this.defaultView.viewport2Client({x:n,y:i}),s=o.x,a=o.y,l=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:e,y:t,viewportX:n,viewportY:i,clientX:s,clientY:a},picked:[]}).picked;return l[l.length-1]!==this.documentElement&&l.push(this.documentElement),l}},{key:"elementsFromPoint",value:(A=(0,we.A)((0,Ce.A)().mark(function e(t,A){var n,i,r,o,s,a,l,u,c,h;return(0,Ce.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.defaultView.canvas2Viewport({x:t,y:A}),i=n.x,r=n.y,o=this.defaultView.getConfig(),s=o.width,a=o.height,!(i<0||r<0||i>s||r>a)){e.next=1;break}return e.abrupt("return",[]);case 1:return l=this.defaultView.viewport2Client({x:i,y:r}),u=l.x,c=l.y,e.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:A,viewportX:i,viewportY:r,clientX:u,clientY:c},picked:[]});case 2:return(h=e.sent.picked)[h.length-1]!==this.documentElement&&h.push(this.documentElement),e.abrupt("return",h);case 3:case"end":return e.stop()}},e,this)})),function(e,t){return A.apply(this,arguments)})},{key:"appendChild",value:function(e,t){throw new Error(De)}},{key:"insertBefore",value:function(e,t){throw new Error(De)}},{key:"removeChild",value:function(e,t){throw new Error(De)}},{key:"replaceChild",value:function(e,t,A){throw new Error(De)}},{key:"append",value:function(){throw new Error(De)}},{key:"prepend",value:function(){throw new Error(De)}},{key:"getElementById",value:function(e){return this.documentElement.getElementById(e)}},{key:"getElementsByName",value:function(e){return this.documentElement.getElementsByName(e)}},{key:"getElementsByTagName",value:function(e){return this.documentElement.getElementsByTagName(e)}},{key:"getElementsByClassName",value:function(e){return this.documentElement.getElementsByClassName(e)}},{key:"querySelector",value:function(e){return this.documentElement.querySelector(e)}},{key:"querySelectorAll",value:function(e){return this.documentElement.querySelectorAll(e)}},{key:"find",value:function(e){return this.documentElement.find(e)}},{key:"findAll",value:function(e){return this.documentElement.findAll(e)}}]);var A,n}(lr),Lo=function(){function e(t){(0,i.A)(this,e),this.strategies=t}return(0,r.A)(e,[{key:"apply",value:function(t){var A=t.config,n=t.camera,i=t.renderingService,r=t.renderingContext,o=this.strategies;i.hooks.cull.tap(e.tag,function(e){if(e){var t;if(e.cullable.visible=0===o.length?r.unculledEntities.indexOf(e.entity)>-1:o.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible())return e;var i=!0===(null===(t=A.future)||void 0===t?void 0:t.experimentalCancelEventPropagation);return e.dispatchEvent(new sr(pr.CULLED),i,i),null}return e}),i.hooks.afterRender.tap(e.tag,function(e){e.cullable.visibilityPlaneMask=-1})}}])}();Lo.tag="Culling";var Qo=function(){function e(){var t=this;(0,i.A)(this,e),this.autoPreventDefault=!1,this.rootPointerEvent=new rr(null),this.rootWheelEvent=new or(null),this.onPointerMove=function(e){var A,n=null===(A=t.context.renderingContext.root)||void 0===A||null===(A=A.ownerDocument)||void 0===A?void 0:A.defaultView;if(!n.supportsTouchEvents||"touch"!==e.pointerType){var i,r=t.normalizeToPointerEvent(e,n),o=(0,ye.A)(r);try{for(o.s();!(i=o.n()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,i.value,n,e);t.context.eventService.mapEvent(s)}}catch(e){o.e(e)}finally{o.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var A,n,i=null===(A=t.context.renderingContext.root)||void 0===A||null===(A=A.ownerDocument)||void 0===A?void 0:A.defaultView,r=t.normalizeToPointerEvent(e,i),o=(0,ye.A)(r);try{for(o.s();!(n=o.n()).done;){var s=t.bootstrapEvent(t.rootPointerEvent,n.value,i,e);t.context.eventService.mapEvent(s)}}catch(e){o.e(e)}finally{o.f()}t.setCursor(t.context.eventService.cursor)}}return(0,r.A)(e,[{key:"apply",value:function(t){var A=this;this.context=t;var n=t.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(e){return A.context.renderingService.hooks.pickSync.call({position:e,picked:[],topmost:!0}).picked[0]||null}),n.hooks.pointerWheel.tap(e.tag,function(e){var t=A.normalizeWheelEvent(e);A.context.eventService.mapEvent(t)}),n.hooks.pointerDown.tap(e.tag,function(e){if(!i.supportsTouchEvents||"touch"!==e.pointerType){var t=A.normalizeToPointerEvent(e,i);A.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();var n,r=(0,ye.A)(t);try{for(r.s();!(n=r.n()).done;){var o=A.bootstrapEvent(A.rootPointerEvent,n.value,i,e);A.context.eventService.mapEvent(o)}}catch(e){r.e(e)}finally{r.f()}A.setCursor(A.context.eventService.cursor)}}),n.hooks.pointerUp.tap(e.tag,function(e){if(!i.supportsTouchEvents||"touch"!==e.pointerType){var t,n=A.context.contextService.getDomElement(),r=A.context.eventService.isNativeEventFromCanvas(n,e)?"":"outside",o=A.normalizeToPointerEvent(e,i),s=(0,ye.A)(o);try{for(s.s();!(t=s.n()).done;){var a=A.bootstrapEvent(A.rootPointerEvent,t.value,i,e);a.type+=r,A.context.eventService.mapEvent(a)}}catch(e){s.e(e)}finally{s.f()}A.setCursor(A.context.eventService.cursor)}}),n.hooks.pointerMove.tap(e.tag,this.onPointerMove),n.hooks.pointerOver.tap(e.tag,this.onPointerMove),n.hooks.pointerOut.tap(e.tag,this.onPointerMove),n.hooks.click.tap(e.tag,this.onClick),n.hooks.pointerCancel.tap(e.tag,function(e){var t,n=A.normalizeToPointerEvent(e,i),r=(0,ye.A)(n);try{for(r.s();!(t=r.n()).done;){var o=A.bootstrapEvent(A.rootPointerEvent,t.value,i,e);A.context.eventService.mapEvent(o)}}catch(e){r.e(e)}finally{r.f()}A.setCursor(A.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,A,n){e.view=A,e.originalEvent=null,e.nativeEvent=n,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var i=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),r=i.y;e.viewport.x=i.x,e.viewport.y=r;var o=this.context.eventService.viewport2Canvas(e.viewport),s=o.y;return e.canvas.x=o.x,e.canvas.y=s,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=n.isTrusted,"pointerleave"===e.type&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=di[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var A=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),n=A.y;t.viewport.x=A.x,t.viewport.y=n;var i=this.context.eventService.viewport2Canvas(t.viewport),r=i.y;return t.canvas.x=i.x,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=fi.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var A=[];if(t.isTouchEvent(e))for(var n=0;n<e.changedTouches.length;n++){var i=e.changedTouches[n];(0,le.A)(i.button)&&(i.button=0),(0,le.A)(i.buttons)&&(i.buttons=1),(0,le.A)(i.isPrimary)&&(i.isPrimary=1===e.touches.length&&"touchstart"===e.type),(0,le.A)(i.width)&&(i.width=i.radiusX||1),(0,le.A)(i.height)&&(i.height=i.radiusY||1),(0,le.A)(i.tiltX)&&(i.tiltX=0),(0,le.A)(i.tiltY)&&(i.tiltY=0),(0,le.A)(i.pointerType)&&(i.pointerType="touch"),(0,le.A)(i.pointerId)&&(i.pointerId=i.identifier||0),(0,le.A)(i.pressure)&&(i.pressure=i.force||.5),(0,le.A)(i.twist)&&(i.twist=0),(0,le.A)(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=e.type,A.push(i)}else if(t.isMouseEvent(e)){var r=e;(0,le.A)(r.isPrimary)&&(r.isPrimary=!0),(0,le.A)(r.width)&&(r.width=1),(0,le.A)(r.height)&&(r.height=1),(0,le.A)(r.tiltX)&&(r.tiltX=0),(0,le.A)(r.tiltY)&&(r.tiltY=0),(0,le.A)(r.pointerType)&&(r.pointerType="mouse"),(0,le.A)(r.pointerId)&&(r.pointerId=1),(0,le.A)(r.pressure)&&(r.pressure=.5),(0,le.A)(r.twist)&&(r.twist=0),(0,le.A)(r.tangentialPressure)&&(r.tangentialPressure=0),r.isNormalized=!0,A.push(r)}else A.push(e);return A}}])}();Qo.tag="Event";var Io=[Ee.CIRCLE,Ee.ELLIPSE,Ee.IMAGE,Ee.RECT,Ee.LINE,Ee.POLYLINE,Ee.POLYGON,Ee.TEXT,Ee.PATH,Ee.HTML],Uo=function(){return(0,r.A)(function e(){(0,i.A)(this,e)},[{key:"isVisible",value:function(e,t){var A,n=t.cullable;if(!n.enable)return!0;var i=t.getRenderBounds();if(Oe.isEmpty(i))return!1;var r=e.getFrustum(),o=null===(A=t.parentNode)||void 0===A||null===(A=A.cullable)||void 0===A?void 0:A.visibilityPlaneMask;return n.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,i,o||Me.INDETERMINATE,r.planes),n.visible=n.visibilityPlaneMask!==Me.OUTSIDE,n.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,t,A,n){if(A===Me.OUTSIDE||A===Me.INSIDE)return A;for(var i=Me.INSIDE,r=Io.indexOf(e.nodeName)>-1,o=0,s=n.length;o<s;++o){var a=1<<o;if(0!==(A&a)&&(!r||4!==o&&5!==o)){var l=n[o],u=l.normal,h=l.distance;if(c.Om(u,t.getPositiveFarPoint(n[o]))+h<0)return Me.OUTSIDE;c.Om(u,t.getNegativeFarPoint(n[o]))+h<0&&(i|=a)}}return i}}])}(),Oo=function(){function e(){(0,i.A)(this,e),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return(0,r.A)(e,[{key:"apply",value:function(t){var A,n=this,i=t.renderingService,r=t.renderingContext.root.ownerDocument.defaultView,s=function(e){i.dirty()},a=function(e){var t;(t=n.mutationRecords).push.apply(t,(0,o.A)(e.detail)),i.dirty()},l=function(e){Wr.enableSizeAttenuation&&Wr.styleValueRegistry.updateSizeAttenuation(e.target,r.getCamera().getZoom())},u=function(e){Wr.sceneGraphService.dirtyToRoot(e.target),i.dirty()};i.hooks.init.tap(e.tag,function(){r.addEventListener(pr.MOUNTED,l),r.addEventListener(pr.UNMOUNTED,u),r.addEventListener(pr.ATTR_MODIFIED,s),r.addEventListener(pr.BOUNDS_CHANGED,a)}),i.hooks.destroy.tap(e.tag,function(){r.removeEventListener(pr.MOUNTED,l),r.removeEventListener(pr.UNMOUNTED,u),r.removeEventListener(pr.ATTR_MODIFIED,s),r.removeEventListener(pr.BOUNDS_CHANGED,a),n.mutationRecords=[]});var c=null!==(A=Wr.globalThis.requestIdleCallback)&&void 0!==A?A:Fi.bind(Wr.globalThis);i.hooks.endFrame.tap(e.tag,function(){n.isFirstTimeRendering&&(n.isFirstTimeRendering=!1,c(function(){n.isFirstTimeRenderingFinished=!0})),n.mutationRecords=[]})}}])}();Oo.tag="Prepare";var Ho=function(e){return e.READY="ready",e.BEFORE_RENDER="beforerender",e.RERENDER="rerender",e.AFTER_RENDER="afterrender",e.BEFORE_DESTROY="beforedestroy",e.AFTER_DESTROY="afterdestroy",e.RESIZE="resize",e.DIRTY_RECTANGLE="dirtyrectangle",e.RENDERER_CHANGED="rendererchanged",e}({}),Mo=new sr(pr.MOUNTED),_o=new sr(pr.UNMOUNTED),ko=new sr(Ho.BEFORE_RENDER),Ro=new sr(Ho.RERENDER),No=new sr(Ho.AFTER_RENDER),Do=function(e){function t(e){var A;(0,i.A)(this,t),(A=(0,s.A)(this,t)).Element=ro,A.inited=!1,A.context={};var r=e.container,o=e.canvas,a=e.renderer,l=e.width,u=e.height,c=e.background,h=e.cursor,d=e.supportsMutipleCanvasesInOneContainer,f=e.cleanUpOnDestroy,g=void 0===f||f,p=e.offscreenCanvas,v=e.requestAnimationFrame,m=e.cancelAnimationFrame,C=e.createImage,w=e.supportsTouchEvents,y=e.supportsPointerEvents,B=e.isTouchEvent,E=e.isMouseEvent,x=e.dblClickSpeed,b=l,F=u,S=e.devicePixelRatio||si&&window.devicePixelRatio||1;return S=S>=1?Math.ceil(S):1,o&&(b=l||function(e){var t=hi(e,"width");return"auto"===t?e.offsetWidth:parseFloat(t)}(o)||o.width/S,F=u||function(e){var t=hi(e,"height");return"auto"===t?e.offsetHeight:parseFloat(t)}(o)||o.height/S),A.customElements=new Fo,A.devicePixelRatio=S,A.requestAnimationFrame=null!=v?v:Fi.bind(Wr.globalThis),A.cancelAnimationFrame=null!=m?m:Si.bind(Wr.globalThis),A.createImage=null!=C?C:function(){return new window.Image},A.supportsTouchEvents=null!=w?w:"ontouchstart"in Wr.globalThis,A.supportsPointerEvents=null!=y?y:!!Wr.globalThis.PointerEvent,A.isTouchEvent=null!=B?B:function(e){return A.supportsTouchEvents&&e instanceof Wr.globalThis.TouchEvent},A.isMouseEvent=null!=E?E:function(e){return!Wr.globalThis.MouseEvent||e instanceof Wr.globalThis.MouseEvent&&(!A.supportsPointerEvents||!(e instanceof Wr.globalThis.PointerEvent))},p&&(Wr.offscreenCanvas=p),A.document=new To,A.document.defaultView=A,d||function(e,t,A){if(e){var n="string"==typeof e?document.getElementById(e):e;oi.has(n)&&oi.get(n).destroy(A),oi.set(n,t)}}(r,A,g),A.initRenderingContext((0,n.A)((0,n.A)({},e),{},{width:b,height:F,background:null!=c?c:"transparent",cursor:null!=h?h:"default",cleanUpOnDestroy:g,devicePixelRatio:S,requestAnimationFrame:A.requestAnimationFrame,cancelAnimationFrame:A.cancelAnimationFrame,createImage:A.createImage,supportsTouchEvents:A.supportsTouchEvents,supportsPointerEvents:A.supportsPointerEvents,isTouchEvent:A.isTouchEvent,isMouseEvent:A.isMouseEvent,dblClickSpeed:null!=x?x:200})),A.initDefaultCamera(b,F,a.clipSpaceNearZ),A.initRenderer(a,!0),A}return(0,a.A)(t,e),(0,r.A)(t,[{key:"initRenderingContext",value:function(e){this.context.config=e,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(e,t,A){var n=this,i=new Wr.CameraContribution;i.clipSpaceNearZ=A,i.setType(nt.EXPLORING,it.DEFAULT).setPosition(e/2,t/2,500).setFocalPoint(e/2,t/2,0).setOrthographic(e/-2,e/2,t/2,t/-2,.1,1e3),i.canvas=this,i.eventEmitter.on(ot,function(){n.context.renderingContext.renderReasons.add(hr.CAMERA_CHANGED),Wr.enableSizeAttenuation&&n.getConfig().renderer.getConfig().enableSizeAttenuation&&n.updateSizeAttenuation()}),this.context.camera=i}},{key:"updateSizeAttenuation",value:function(){var e=this.getCamera().getZoom();this.document.documentElement.forEach(function(t){Wr.styleValueRegistry.updateSizeAttenuation(t,e)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],A=arguments.length>1?arguments[1]:void 0;qt.clearCache();var n=!0===(null===(e=this.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation);A||this.dispatchEvent(new sr(Ho.BEFORE_DESTROY),n,n),this.frameId&&this.cancelAnimationFrame(this.frameId);var i=this.getRoot();t&&(this.unmountChildren(i),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),A||this.dispatchEvent(new sr(Ho.AFTER_DESTROY),n,n);var r=function(e){e.currentTarget=null,e.manager=null,e.target=null,e.relatedNode=null};r(Mo),r(_o),r(ko),r(Ro),r(No),r(Ao),r(qr),r(Zr),r(Jr),Wr.textService.clearCache()}},{key:"changeSize",value:function(e,t){this.resize(e,t)}},{key:"resize",value:function(e,t){var A,n=this.context.config;n.width=e,n.height=t,this.getContextService().resize(e,t);var i=this.context.camera,r=i.getProjectionMode();i.setPosition(e/2,t/2,500).setFocalPoint(e/2,t/2,0),r===rt.ORTHOGRAPHIC?i.setOrthographic(e/-2,e/2,t/2,t/-2,i.getNear(),i.getFar()):i.setAspect(e/t);var o=!0===(null===(A=n.future)||void 0===A?void 0:A.experimentalCancelEventPropagation);this.dispatchEvent(new sr(Ho.RESIZE,{width:e,height:t}),o,o)}},{key:"appendChild",value:function(e,t){return this.document.documentElement.appendChild(e,t)}},{key:"insertBefore",value:function(e,t){return this.document.documentElement.insertBefore(e,t)}},{key:"removeChild",value:function(e){return this.document.documentElement.removeChild(e)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(e){var t,A=this;e&&(ko.detail=e,No.detail=e);var n=!0===(null===(t=this.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation);this.dispatchEvent(ko,n,n),this.getRenderingService().render(this,e,function(){A.dispatchEvent(Ro,n,n)}),this.dispatchEvent(No,n,n)}},{key:"run",value:function(){var e=this,t=function(A,n){e.render(n),e.frameId=e.requestAnimationFrame(t)};t()}},{key:"initRenderer",value:function(e){var t=this,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Qo,new Oo,new Lo([new Uo])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService((0,n.A)((0,n.A)({},Wr),this.context)),this.context.renderingService=new dr(Wr,this.context),this.context.eventService=new ur(Wr,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(e,A,!0)):this.context.contextService.initAsync().then(function(){t.initRenderingService(e,A)}).catch(function(e){console.error(e)})}},{key:"initRenderingService",value:function(e){var t=this,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.context.renderingService.init(function(){var i;t.inited=!0;var r=!0===(null===(i=t.getConfig().future)||void 0===i?void 0:i.experimentalCancelEventPropagation);A?n?t.requestAnimationFrame(function(){t.dispatchEvent(new sr(Ho.READY),r,r)}):t.dispatchEvent(new sr(Ho.READY),r,r):t.dispatchEvent(new sr(Ho.RENDERER_CHANGED),r,r),t.readyPromise&&t.resolveReadyPromise(),A||t.getRoot().forEach(function(e){var t,A;null===(t=(A=e).dirty)||void 0===t||t.call(A,!0,!0)}),t.mountChildren(t.getRoot()),e.getConfig().enableAutoRendering&&t.run()})}},{key:"loadRendererContainerModule",value:function(e){var t=this;e.getPlugins().forEach(function(e){e.context=t.context,e.init(Wr)})}},{key:"setRenderer",value:function(e){var t=this.getConfig();if(t.renderer!==e){var A=t.renderer;t.renderer=e,this.destroy(!1,!0),(0,o.A)((null==A?void 0:A.getPlugins())||[]).reverse().forEach(function(e){e.destroy(Wr)}),this.initRenderer(e)}}},{key:"setCursor",value:function(e){this.getConfig().cursor=e,this.getContextService().applyCursorStyle(e)}},{key:"unmountChildren",value:function(e){var t=this;if(e.childNodes.forEach(function(e){t.unmountChildren(e)}),this.inited){if(e.isMutationObserved)e.dispatchEvent(_o);else{var A,n=!0===(null===(A=this.getConfig().future)||void 0===A?void 0:A.experimentalCancelEventPropagation);_o.target=e,this.dispatchEvent(_o,!0,n)}e!==this.document.documentElement&&(e.ownerDocument=null),e.isConnected=!1}e.isCustomElement&&e.disconnectedCallback&&e.disconnectedCallback()}},{key:"mountChildren",value:function(e){var t=this,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gi(e);if(this.inited){if(!e.isConnected&&(e.ownerDocument=this.document,e.isConnected=!0,!A))if(e.isMutationObserved)e.dispatchEvent(Mo);else{var n,i=!0===(null===(n=this.getConfig().future)||void 0===n?void 0:n.experimentalCancelEventPropagation);Mo.target=e,this.dispatchEvent(Mo,!0,i)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",e.nodeName);e.childNodes.forEach(function(e){t.mountChildren(e,A)}),e.isCustomElement&&e.connectedCallback&&e.connectedCallback()}},{key:"mountFragment",value:function(e){this.mountChildren(e,!1)}},{key:"client2Viewport",value:function(e){return this.getEventService().client2Viewport(e)}},{key:"viewport2Client",value:function(e){return this.getEventService().viewport2Client(e)}},{key:"viewport2Canvas",value:function(e){return this.getEventService().viewport2Canvas(e)}},{key:"canvas2Viewport",value:function(e){return this.getEventService().canvas2Viewport(e)}},{key:"getPointByClient",value:function(e,t){return this.client2Viewport({x:e,y:t})}},{key:"getClientByPoint",value:function(e,t){return this.viewport2Client({x:e,y:t})}}])}(ar);new WeakMap;var Po=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.cacheStore=new Map},[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,t,A){return!this.cacheStore.has(e)&&(this.cacheStore.set(e,{value:t,counter:new Set([A.entity])}),this.onRefAdded(A),!0)}},{key:"get",value:function(e,t){var A=this.cacheStore.get(e);return A?(A.counter.has(t.entity)||(A.counter.add(t.entity),this.onRefAdded(t)),A.value):null}},{key:"update",value:function(e,t,A){var i=this.cacheStore.get(e);return!!i&&(i.value=(0,n.A)((0,n.A)({},i.value),t),i.counter.has(A.entity)||(i.counter.add(A.entity),this.onRefAdded(A)),!0)}},{key:"release",value:function(e,t){var A=this.cacheStore.get(e);return!!A&&(A.counter.delete(t.entity),A.counter.size<=0&&this.cacheStore.delete(e),!0)}},{key:"releaseRef",value:function(e){var t=this;Array.from(this.cacheStore.keys()).forEach(function(A){t.release(A,e)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),Go=[],Ko=[],Vo=function(){function e(){(0,i.A)(this,e)}return(0,r.A)(e,null,[{key:"stop",value:function(){e.rafId&&((arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.api).cancelAnimationFrame(e.rafId),e.rafId=null)}},{key:"executeTask",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.api;Go.length<=0&&Ko.length<=0||(Ko.forEach(function(e){return e()}),Ko=Go.splice(0,e.TASK_NUM_PER_FRAME),e.rafId=t.requestAnimationFrame(function(){e.executeTask(t)}))}},{key:"sliceImage",value:function(t,A,n,i){for(var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.api,s=t.naturalWidth||t.width,a=t.naturalHeight||t.height,l=A-r,u=n-r,c=Math.ceil(s/l),h=Math.ceil(a/u),d={tileSize:[A,n],gridSize:[h,c],tiles:Array(h).fill(null).map(function(){return Array(c).fill(null)})},f=function(e){for(var r=function(r){Go.push(function(){var c=r*l,h=e*u,f=[Math.min(A,s-c),Math.min(n,a-h)],g=f[0],p=f[1],v=o.createCanvas();v.width=A,v.height=n,v.getContext("2d").drawImage(t,c,h,g,p,0,0,g,p),d.tiles[e][r]={x:c,y:h,tileX:r,tileY:e,data:v},i()})},h=0;h<c;h++)r(h)},g=0;g<h;g++)f(g);return e.stop(),e.executeTask(),d}}])}();Vo.TASK_NUM_PER_FRAME=10;var zo=new Po;zo.onRefAdded=function(e){var t=this;e.addEventListener(pr.DESTROY,function(){t.releaseRef(e)},{once:!0})};var Wo=function(){return(0,r.A)(function e(t,A){(0,i.A)(this,e),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=A},[{key:"getImageSync",value:function(e,t,A){var n=(0,y.A)(e)?e:e.src;if(zo.has(n)){var i=zo.get(n,t);if(i.img.complete)return null==A||A(i),i}return this.getOrCreateImage(e,t).then(function(e){null==A||A(e)}).catch(function(e){console.error(e)}),null}},{key:"getOrCreateImage",value:function(e,t){var A=this,n=(0,y.A)(e)?e:e.src;if(!(0,y.A)(e)&&!zo.has(n)){var i={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:jo(e)};zo.put(n,i,t)}if(zo.has(n)){var r=zo.get(n,t);return r.img.complete?Promise.resolve(r):new Promise(function(e,t){r.img.addEventListener("load",function(){r.size=[r.img.naturalWidth||r.img.width,r.img.naturalHeight||r.img.height],r.tileSize=jo(r.img),e(r)}),r.img.addEventListener("error",function(e){t(e)})})}return new Promise(function(e,i){var r=A.context.config.createImage();if(r){var o={img:r,size:[0,0],tileSize:jo(r)};zo.put(n,o,t),r.onload=function(){o.size=[r.naturalWidth||r.width,r.naturalHeight||r.height],o.tileSize=jo(o.img),e(o)},r.onerror=function(e){i(e)},r.crossOrigin="Anonymous",r.src=n}})}},{key:"createDownSampledImage",value:(t=(0,we.A)((0,Ce.A)().mark(function e(t,A){var i,r,o,s,a,u,c,h,d,f,g,p,v,m;return(0,Ce.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOrCreateImage(t,A);case 1:if(void 0===(i=e.sent).downSamplingRate){e.next=2;break}return e.abrupt("return",i);case 2:if(a=void 0===(s=(o="boolean"==typeof(r=this.context.config.enableLargeImageOptimization)?{}:r).maxDownSampledImageSize)?2048:s,c=void 0===(u=o.downSamplingRateThreshold)?.5:u,h=this.runtime.globalThis.createImageBitmap,d=(0,l.A)(i.size,2),f=d[0],g=d[1],p=i.img,v=Math.min((a+a)/(f+g),Math.max(.01,Math.min(c,.5))),m=(0,n.A)((0,n.A)({},i),{},{downSamplingRate:v}),zo.update(i.img.src,m,A),!h){e.next=7;break}return e.prev=3,e.next=4,h(i.img,{resizeWidth:f*v,resizeHeight:g*v});case 4:p=e.sent,e.next=6;break;case 5:e.prev=5,e.catch(3),v=1;case 6:e.next=8;break;case 7:v=1;case 8:return m=(0,n.A)((0,n.A)({},this.getImageSync(t,A)),{},{downSampled:p,downSamplingRate:v}),zo.update(i.img.src,m,A),e.abrupt("return",m);case 9:case"end":return e.stop()}},e,this,[[3,5]])})),function(e,A){return t.apply(this,arguments)})},{key:"createImageTiles",value:(e=(0,we.A)((0,Ce.A)().mark(function e(t,A,i,r){var o,s,a;return(0,Ce.A)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOrCreateImage(t,r);case 1:return o=e.sent,Vo.api={requestAnimationFrame:(s=r.ownerDocument.defaultView).requestAnimationFrame,cancelAnimationFrame:s.cancelAnimationFrame,createCanvas:function(){return cr.createCanvas()}},a=(0,n.A)((0,n.A)({},o),Vo.sliceImage(o.img,o.tileSize[0],o.tileSize[0],i)),zo.update(o.img.src,a,r),e.abrupt("return",a);case 2:case"end":return e.stop()}},e,this)})),function(t,A,n,i){return e.apply(this,arguments)})},{key:"releaseImage",value:function(e,t){zo.release((0,y.A)(e)?e:e.src,t)}},{key:"releaseImageRef",value:function(e){zo.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,t,A,n,i,r,o){var s=this.generatePatternKey(t);if(s&&this.patternCache[s])return this.patternCache[s];var a,l=t.image,u=t.repetition,c=t.transform,h=!1;if((0,y.A)(l)){var f=this.getImageSync(l,e,o);a=null==f?void 0:f.img}else n?(a=n,h=!0):a=l;var g,p=a&&A.createPattern(a,u);return p&&(g=c?Vi(xn(c),new ro({})):d.D_(d.vt()),h&&d.hs(g,g,[1/i,1/i,1]),p.setTransform({a:g[0],b:g[1],c:g[4],d:g[5],e:g[12]+r[0],f:g[13]+r[1]})),s&&p&&(this.patternCache[s]=p),p}},{key:"getOrCreateGradient",value:function(e,t){var A=this.generateGradientKey(e),n=e.type,i=e.steps,r=e.min,o=e.width,s=e.height,a=e.cx,l=e.cy,u=e.size;if(this.gradientCache[A])return this.gradientCache[A];var c=null;if(n===sA.LinearGradient){var h=function(e,t,A,n){var i=ze(n.value),r=0+t/2,o=0+A/2,s=Math.abs(t*Math.cos(i))+Math.abs(A*Math.sin(i));return{x1:e[0]+r-Math.cos(i)*s/2,y1:e[1]+o-Math.sin(i)*s/2,x2:e[0]+r+Math.cos(i)*s/2,y2:e[1]+o+Math.sin(i)*s/2}}(r,o,s,e.angle);c=t.createLinearGradient(h.x1,h.y1,h.x2,h.y2)}else if(n===sA.RadialGradient){var d=function(e,t,A,n,i,r){var o=n.value,s=i.value;n.unit===Zt.kPercentage&&(o=n.value/100*t),i.unit===Zt.kPercentage&&(s=i.value/100*A);var a=Math.max((0,C.F)([0,0],[o,s]),(0,C.F)([0,A],[o,s]),(0,C.F)([t,A],[o,s]),(0,C.F)([t,0],[o,s]));return r&&(r instanceof cA?a=r.value:r instanceof lA&&("closest-side"===r.value?a=Math.min(o,t-o,s,A-s):"farthest-side"===r.value?a=Math.max(o,t-o,s,A-s):"closest-corner"===r.value&&(a=Math.min((0,C.F)([0,0],[o,s]),(0,C.F)([0,A],[o,s]),(0,C.F)([t,A],[o,s]),(0,C.F)([t,0],[o,s]))))),{x:o+e[0],y:s+e[1],r:a}}(r,o,s,a,l,u),f=d.x,g=d.y;c=t.createRadialGradient(f,g,0,f,g,d.r)}return c&&(i.forEach(function(e){var t,A=e.offset;A.unit===Zt.kPercentage&&(null===(t=c)||void 0===t||t.addColorStop(A.value/100,e.color.toString()))}),this.gradientCache[A]=c),this.gradientCache[A]}},{key:"generateGradientKey",value:function(e){var t=e.min,A=e.width,n=e.height,i=e.steps,r=e.angle,o=e.cx,s=e.cy,a=e.size;return"gradient-".concat(e.type,"-").concat((null==r?void 0:r.toString())||0,"-").concat((null==o?void 0:o.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat((null==a?void 0:a.toString())||0,"-").concat(t[0],"-").concat(t[1],"-").concat(A,"-").concat(n,"-").concat(i.map(function(e){var t=e.color;return"".concat(e.offset).concat(t)}).join("-"))}},{key:"generatePatternKey",value:function(e){var t=e.image,A=e.repetition;return(0,y.A)(t)?"pattern-".concat(t,"-").concat(A):"rect"===t.nodeName?"pattern-".concat(t.entity,"-").concat(A):void 0}}]);var e,t}();function jo(e){if(!e.complete)return[0,0];var t=e.naturalWidth||e.width,A=e.naturalHeight||e.height,n=256;return[256,512].forEach(function(e){Math.ceil(A/e)*Math.ceil(t/e)<1e3&&(n=e)}),[n,n]}Wo.isSupportTile=!!cr.createCanvas();var Xo=function(){function e(){(0,i.A)(this,e)}return(0,r.A)(e,[{key:"apply",value:function(t){var A=t.renderingService,n=t.imagePool,i=t.renderingContext.root.ownerDocument.defaultView,r=function(e,t,A){var n=e.parsedStyle,i=n.width,r=n.height;i&&!r?e.setAttribute("height",A/t*i):!i&&r&&e.setAttribute("width",t/A*r)},o=function(e){var t=e.target,i=t.attributes;if(t.nodeName===Ee.IMAGE){var o=i.keepAspectRatio;n.getImageSync(i.src,t,function(e){var n=e.img;o&&r(t,n.width,n.height),t.dirty(),A.dirty()})}},s=function(e){var t=e.target,i=e.prevValue,o=e.newValue;t.nodeName===Ee.IMAGE&&"src"===e.attrName&&(i!==o&&n.releaseImage(i,t),(0,y.A)(o)&&n.getOrCreateImage(o,t).then(function(e){var n=e.img;t.attributes.keepAspectRatio&&r(t,n.width,n.height),t.dirty(),A.dirty()}).catch(function(){}))};A.hooks.init.tap(e.tag,function(){i.addEventListener(pr.MOUNTED,o),i.addEventListener(pr.ATTR_MODIFIED,s)}),A.hooks.destroy.tap(e.tag,function(){i.removeEventListener(pr.MOUNTED,o),i.removeEventListener(pr.ATTR_MODIFIED,s)})}}])}();Xo.tag="LoadImage";var Yo=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).name="image-loader",e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"init",value:function(e){this.context.imagePool=new Wo(this.context,e),this.addRenderingPlugin(new Xo)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(be),qo=Object.freeze({__proto__:null,ImagePool:Wo,Plugin:Yo}),Zo=function(){function e(){(0,i.A)(this,e),this.displayObjectHTMLElementMap=new WeakMap}return(0,r.A)(e,[{key:"joinTransformMatrix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return"matrix(".concat([e[0],e[1],e[4],e[5],e[12]+t[0],e[13]+t[1]].join(","),")")}},{key:"apply",value:function(t,A){var n=this,i=t.camera,r=t.renderingContext,o=t.renderingService;this.context=t;var s=r.root.ownerDocument.defaultView,a=s.context.eventService.nativeHTMLMap,l=function(e,t){t.style.transform=n.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())},u=function(e){var t=e.target;if(t.nodeName===Ee.HTML){n.$camera||(n.$camera=n.createCamera(i));var A=n.getOrCreateEl(t);n.$camera.appendChild(A),Object.keys(t.attributes).forEach(function(e){n.updateAttribute(e,t)}),l(t,A),a.set(A,t)}},c=function(e){var t=e.target;if(t.nodeName===Ee.HTML&&n.$camera){var A=n.getOrCreateEl(t);A&&(A.remove(),a.delete(A))}},h=function(e){var t=e.target;t.nodeName===Ee.HTML&&n.updateAttribute(e.attrName,t)},d=function(e){for(var t=e.detail,A=0;A<t.length;A++){var i=t[A].target;(i.nodeName===Ee.FRAGMENT?i.childNodes:[i]).forEach(function(e){if(e.nodeName===Ee.HTML){var t=n.getOrCreateEl(e);l(e,t)}})}},f=function(){if(n.$camera){var e=n.context.config,t=e.height;n.$camera.parentElement.style.width="".concat(e.width||0,"px"),n.$camera.parentElement.style.height="".concat(t||0,"px")}};o.hooks.init.tap(e.tag,function(){s.addEventListener(Ho.RESIZE,f),s.addEventListener(pr.MOUNTED,u),s.addEventListener(pr.UNMOUNTED,c),s.addEventListener(pr.ATTR_MODIFIED,h),s.addEventListener(pr.BOUNDS_CHANGED,d)}),o.hooks.endFrame.tap(e.tag,function(){n.$camera&&r.renderReasons.has(hr.CAMERA_CHANGED)&&(n.$camera.style.transform=n.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(e.tag,function(){n.$camera&&n.$camera.remove(),s.removeEventListener(Ho.RESIZE,f),s.removeEventListener(pr.MOUNTED,u),s.removeEventListener(pr.UNMOUNTED,c),s.removeEventListener(pr.ATTR_MODIFIED,h),s.removeEventListener(pr.BOUNDS_CHANGED,d)})}},{key:"createCamera",value:function(e){var t=this.context.config,A=t.document,n=t.width,i=t.height,r=this.context.contextService.getDomElement(),o=r.parentNode;if(o){var s="g-canvas-camera",a=o.querySelector("#".concat(s));if(!a){var l=(A||document).createElement("div");l.style.overflow="hidden",l.style.pointerEvents="none",l.style.position="absolute",l.style.left="0px",l.style.top="0px",l.style.width="".concat(n||0,"px"),l.style.height="".concat(i||0,"px");var u=(A||document).createElement("div");a=u,u.id=s,u.style.position="absolute",u.style.left="".concat(r.offsetLeft||0,"px"),u.style.top="".concat(r.offsetTop||0,"px"),u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),u.style.pointerEvents="none",u.style.width="100%",u.style.height="100%",l.appendChild(u),o.appendChild(l)}return a}return null}},{key:"getOrCreateEl",value:function(e){var t=this.context.config.document,A=this.displayObjectHTMLElementMap.get(e);return A||(A=(t||document).createElement("div"),e.parsedStyle.$el=A,this.displayObjectHTMLElementMap.set(e,A),e.id&&(A.id=e.id),e.name&&A.setAttribute("name",e.name),e.className&&(A.className=e.className),A.style.position="absolute",A.style["will-change"]="transform",A.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),A}},{key:"updateAttribute",value:function(e,t){var A=this.getOrCreateEl(t);switch(e){case"innerHTML":var n=t.parsedStyle.innerHTML;(0,y.A)(n)?A.innerHTML=n:(A.innerHTML="",A.appendChild(n));break;case"x":A.style.left="".concat(t.parsedStyle.x,"px");break;case"y":A.style.top="".concat(t.parsedStyle.y,"px");break;case"transformOrigin":var i=t.parsedStyle.transformOrigin;A.style["transform-origin"]="".concat(i[0].buildCSSText(null,null,"")," ").concat(i[1].buildCSSText(null,null,""));break;case"width":var r=t.parsedStyle.width;A.style.width=(0,m.A)(r)?"".concat(r,"px"):r.toString();break;case"height":var o=t.parsedStyle.height;A.style.height=(0,m.A)(o)?"".concat(o,"px"):o.toString();break;case"zIndex":A.style["z-index"]="".concat(t.parsedStyle.zIndex);break;case"visibility":A.style.visibility=t.parsedStyle.visibility;break;case"pointerEvents":var s=t.parsedStyle.pointerEvents;A.style.pointerEvents=void 0===s?"auto":s;break;case"opacity":A.style.opacity="".concat(t.parsedStyle.opacity);break;case"fill":var a=t.parsedStyle.fill,l="";UA(a)?l=a.isNone?"transparent":t.getAttribute("fill"):Array.isArray(a)?l=t.getAttribute("fill"):IA(a),A.style.background=l;break;case"stroke":var u=t.parsedStyle.stroke,c="";UA(u)?c=u.isNone?"transparent":t.getAttribute("stroke"):Array.isArray(u)?c=t.getAttribute("stroke"):IA(u),A.style["border-color"]=c,A.style["border-style"]="solid";break;case"lineWidth":A.style["border-width"]="".concat(t.parsedStyle.lineWidth||0,"px");break;case"lineDash":A.style["border-style"]="dashed";break;case"filter":A.style.filter=t.style.filter;break;default:(0,w.A)(t.style[e])||""===t.style[e]||(A.style[e]=t.style[e])}}}])}();Zo.tag="HTMLRendering";var Jo=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).name="html-renderer",e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"init",value:function(){this.addRenderingPlugin(new Zo)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(be),$o=Object.freeze({__proto__:null,Plugin:Jo}),es=function(){function e(){(0,i.A)(this,e)}return(0,r.A)(e,[{key:"apply",value:function(t,A){var n=this,i=t.renderingService,r=t.renderingContext,o=t.config;this.context=t;var s=r.root.ownerDocument.defaultView,a=function(e){i.hooks.pointerMove.call(e)},l=function(e){i.hooks.pointerUp.call(e)},u=function(e){i.hooks.pointerDown.call(e)},c=function(e){i.hooks.pointerOver.call(e)},h=function(e){i.hooks.pointerOut.call(e)},d=function(e){i.hooks.pointerCancel.call(e)},f=function(e){i.hooks.pointerWheel.call(e)},g=function(e){i.hooks.click.call(e)};i.hooks.init.tap(e.tag,function(){var e=n.context.contextService.getDomElement();A.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):s.supportsPointerEvents&&(e.style.touchAction="none"),s.supportsPointerEvents?function(e){A.globalThis.document.addEventListener("pointermove",a,!0),e.addEventListener("pointerdown",u,!0),e.addEventListener("pointerleave",h,!0),e.addEventListener("pointerover",c,!0),A.globalThis.addEventListener("pointerup",l,!0),A.globalThis.addEventListener("pointercancel",d,!0)}(e):function(e){A.globalThis.document.addEventListener("mousemove",a,!0),e.addEventListener("mousedown",u,!0),e.addEventListener("mouseout",h,!0),e.addEventListener("mouseover",c,!0),A.globalThis.addEventListener("mouseup",l,!0)}(e),s.supportsTouchEvents&&function(e){e.addEventListener("touchstart",u,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",a,!0),e.addEventListener("touchcancel",d,!0)}(e),o.useNativeClickEvent&&e.addEventListener("click",g,!0),e.addEventListener("wheel",f,{passive:!0,capture:!0})}),i.hooks.destroy.tap(e.tag,function(){var e=n.context.contextService.getDomElement();A.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="",e.style.msTouchAction=""):s.supportsPointerEvents&&(e.style.touchAction=""),s.supportsPointerEvents?function(e){A.globalThis.document.removeEventListener("pointermove",a,!0),e.removeEventListener("pointerdown",u,!0),e.removeEventListener("pointerleave",h,!0),e.removeEventListener("pointerover",c,!0),A.globalThis.removeEventListener("pointerup",l,!0),A.globalThis.removeEventListener("pointercancel",d,!0)}(e):function(e){A.globalThis.document.removeEventListener("mousemove",a,!0),e.removeEventListener("mousedown",u,!0),e.removeEventListener("mouseout",h,!0),e.removeEventListener("mouseover",c,!0),A.globalThis.removeEventListener("mouseup",l,!0)}(e),s.supportsTouchEvents&&function(e){e.removeEventListener("touchstart",u,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",a,!0),e.removeEventListener("touchcancel",d,!0)}(e),o.useNativeClickEvent&&e.removeEventListener("click",g,!0),e.removeEventListener("wheel",f,!0)})}}])}();es.tag="DOMInteraction";var ts=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,s.A)(this,t,[].concat(n))).name="dom-interaction",e}return(0,a.A)(t,e),(0,r.A)(t,[{key:"init",value:function(){this.addRenderingPlugin(new es)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(be),As=Object.freeze({__proto__:null,Plugin:ts});(function(){function e(){(0,i.A)(this,e)}return(0,r.A)(e,[{key:"apply",value:function(t){var A=t.renderingService,n=t.config,i=t.contextService.getDomElement(),r=function(e){A.hooks.pointerDown.call(e)},o=function(e){A.hooks.pointerUp.call(e)},s=function(e){A.hooks.pointerMove.call(e)},a=function(e){A.hooks.pointerOver.call(e)},l=function(e){A.hooks.pointerOut.call(e)},u=function(e){A.hooks.click.call(e)},c=function(e){A.hooks.pointerCancel.call(e)};A.hooks.init.tap(e.tag,function(){i.addEventListener("touchstart",r,!0),i.addEventListener("touchend",o,!0),i.addEventListener("touchmove",s,!0),i.addEventListener("touchcancel",c,!0),i.addEventListener("mouseout",l,!0),i.addEventListener("mouseover",a,!0),n.useNativeClickEvent&&i.addEventListener("click",u,!0)}),A.hooks.destroy.tap(e.tag,function(){i.removeEventListener("touchstart",r,!0),i.removeEventListener("touchend",o,!0),i.removeEventListener("touchmove",s,!0),i.removeEventListener("touchcancel",c,!0),i.removeEventListener("mouseout",l,!0),i.removeEventListener("mouseover",a,!0),n.useNativeClickEvent&&i.removeEventListener("click",u,!0)})}}])}()).tag="MobileInteraction"},"./node_modules/.pnpm/@antv+g-math@3.1.0/node_modules/@antv/g-math/dist/index.esm.js"(e,t,A){"use strict";A.d(t,{Io:()=>o,M7:()=>f,Sy:()=>C,Wp:()=>m,bU:()=>h,d9:()=>B,iP:()=>d,kF:()=>u,oe:()=>v,tT:()=>E});var n=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),i=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number-equal.js"),r=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec2.js");function o(e,t,A,n){var i=e-A,r=t-n;return Math.sqrt(i*i+r*r)}function s(e,t){var A=Math.min.apply(Math,(0,n.A)(e)),i=Math.min.apply(Math,(0,n.A)(t));return{x:A,y:i,width:Math.max.apply(Math,(0,n.A)(e))-A,height:Math.max.apply(Math,(0,n.A)(t))-i}}function a(e,t,A,n,i,r){return A*Math.cos(i)*Math.cos(r)-n*Math.sin(i)*Math.sin(r)+e}function l(e,t,A,n,i,r){return A*Math.sin(i)*Math.cos(r)+n*Math.cos(i)*Math.sin(r)+t}function u(e,t,A,n,i,r,o){for(var s=function(e,t,A){return Math.atan(-t/e*Math.tan(A))}(A,n,i),u=1/0,c=-1/0,h=[r,o],d=2*-Math.PI;d<=2*Math.PI;d+=Math.PI){var f=s+d;r<o?r<f&&f<o&&h.push(f):o<f&&f<r&&h.push(f)}for(var g=0;g<h.length;g++){var p=a(e,0,A,n,i,h[g]);p<u&&(u=p),p>c&&(c=p)}for(var v=function(e,t,A){return Math.atan(t/(e*Math.tan(A)))}(A,n,i),m=1/0,C=-1/0,w=[r,o],y=2*-Math.PI;y<=2*Math.PI;y+=Math.PI){var B=v+y;r<o?r<B&&B<o&&w.push(B):o<B&&B<r&&w.push(B)}for(var E=0;E<w.length;E++){var x=l(0,t,A,n,i,w[E]);x<m&&(m=x),x>C&&(C=x)}return{x:u,y:m,width:c-u,height:C-m}}function c(e,t,A,i,r,s){var a=-1,l=1/0,u=[A,i],c=20;s&&s>200&&(c=s/10);for(var h=1/c,d=h/10,f=0;f<=c;f++){var g=f*h,p=[r.apply(void 0,(0,n.A)(e.concat([g]))),r.apply(void 0,(0,n.A)(t.concat([g])))],v=o(u[0],u[1],p[0],p[1]);v<l&&(a=g,l=v)}if(0===a)return{x:e[0],y:t[0]};if(1===a){var m=e.length;return{x:e[m-1],y:t[m-1]}}l=1/0;for(var C=0;C<32&&!(d<1e-4);C++){var w=a-d,y=a+d,B=[r.apply(void 0,(0,n.A)(e.concat([w]))),r.apply(void 0,(0,n.A)(t.concat([w])))],E=o(u[0],u[1],B[0],B[1]);if(w>=0&&E<l)a=w,l=E;else{var x=[r.apply(void 0,(0,n.A)(e.concat([y]))),r.apply(void 0,(0,n.A)(t.concat([y])))],b=o(u[0],u[1],x[0],x[1]);y<=1&&b<l?(a=y,l=b):d*=.5}}return{x:r.apply(void 0,(0,n.A)(e.concat([a]))),y:r.apply(void 0,(0,n.A)(t.concat([a])))}}function h(e,t,A,n){return o(e,t,A,n)}function d(e,t,A,n,i){return{x:(1-i)*e+i*A,y:(1-i)*t+i*n}}function f(e,t,A,n,i,o){var s=[A-e,n-t];if(r.t2(s,[0,0]))return Math.sqrt((i-e)*(i-e)+(o-t)*(o-t));var a=[-s[1],s[0]];return r.S8(a,a),Math.abs(r.Om([i-e,o-t],a))}function g(e,t,A,n,i){var r=1-i;return r*r*r*e+3*t*i*r*r+3*A*i*i*r+n*i*i*i}function p(e,t,A,n){var r,o,s,a=-3*e+9*t-9*A+3*n,l=6*e-12*t+6*A,u=3*t-3*e,c=[];if((0,i.A)(a,0))(0,i.A)(l,0)||(r=-u/l)>=0&&r<=1&&c.push(r);else{var h=l*l-4*a*u;(0,i.A)(h,0)?c.push(-l/(2*a)):h>0&&(o=(-l-(s=Math.sqrt(h)))/(2*a),(r=(-l+s)/(2*a))>=0&&r<=1&&c.push(r),o>=0&&o<=1&&c.push(o))}return c}function v(e,t,A,n,i,r,o,a){for(var l=[e,o],u=[t,a],c=p(e,A,i,o),h=p(t,n,r,a),d=0;d<c.length;d++)l.push(g(e,A,i,o,c[d]));for(var f=0;f<h.length;f++)u.push(g(t,n,r,a,h[f]));return s(l,u)}function m(e,t,A,n,i,r,s,a,l,u,h){var d=function(e,t,A,n,i,r,o,s,a,l,u){return c([e,A,i,o],[t,n,r,s],a,l,g,u)}(e,t,A,n,i,r,s,a,l,u,h);return o(d.x,d.y,l,u)}function C(e){return function(e){if(e.length<2)return 0;for(var t=0,A=0;A<e.length-1;A++){var n=e[A],i=e[A+1];t+=o(n[0],n[1],i[0],i[1])}return t}(e)}function w(e,t,A,n){var i=1-n;return i*i*e+2*n*i*t+n*n*A}function y(e,t,A){var n=e+A-2*t;if((0,i.A)(n,0))return[.5];var r=(e-t)/n;return r<=1&&r>=0?[r]:[]}function B(e,t,A,n,i,r){var o=y(e,A,i)[0],a=y(t,n,r)[0],l=[e,i],u=[t,r];return void 0!==o&&l.push(w(e,A,i,o)),void 0!==a&&u.push(w(t,n,r,a)),s(l,u)}function E(e,t,A,n,i,r,s,a){var l=function(e,t,A,n,i,r,o,s){return c([e,A,i],[t,n,r],o,s,w)}(e,t,A,n,i,r,s,a);return o(l.x,l.y,s,a)}},"./node_modules/.pnpm/@antv+g@6.3.1/node_modules/@antv/g/dist/index.esm.js"(e,t,A){"use strict";A.d(t,{EY:()=>n.EY,F5:()=>n.F5,H0:()=>n.H0,Hl:()=>n.Hl,K9:()=>n.K9,Ks:()=>n.Ks,N1:()=>n.N1,NZ:()=>n.NZ,O5:()=>n.O5,Pp:()=>n.Pp,Ro:()=>n.Ro,YJ:()=>n.YJ,_V:()=>n._V,fA:()=>n.fA,g3:()=>n.g3,jX:()=>n.jX,jl:()=>n.jl,q9:()=>n.q9,rw:()=>n.rw,tS:()=>n.tS,up:()=>n.up,wA:()=>n.wA,yp:()=>n.yp});var n=A("./node_modules/.pnpm/@antv+g-lite@2.7.0/node_modules/@antv/g-lite/dist/index.esm.js"),i=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),r=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js"),o=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/callSuper.js"),s=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js"),a=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),l=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),u=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/clamp.js"),c=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number-equal.js"),h=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-nil.js"),d=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number.js"),f=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-string.js"),g=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat4.js"),p=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/quat.js"),v=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec3.js"),m=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),C=(A("./node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.js"),A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js")),w=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),y=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/superPropGet.js"),B=function(e){function t(e,A,n,r){var s;return(0,i.A)(this,t),(s=(0,o.A)(this,t,[e])).currentTime=n,s.timelineTime=r,s.target=A,s.type="finish",s.bubbles=!1,s.currentTarget=A,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=n,s.timelineTime=r,s}return(0,s.A)(t,e),(0,r.A)(t)}(n.Ns),E=0,x=function(){return(0,r.A)(function e(t,A){var n;(0,i.A)(this,e),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=A,this.id="".concat(E++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()},[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,A){e.resolveReadyPromise=function(){t(e)},e.rejectReadyPromise=function(){A(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,A){e.resolveFinishedPromise=function(){t(e)},e.rejectFinishedPromise=function(){A(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){var t;(e=Number(e),isNaN(e))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(t=this.timeline)||void 0===t?void 0:t.currentTime)-e/this.playbackRate),this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(null!==e){if(this.updatePromises(),e=Number(e),isNaN(e))return;if(this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var t=this.currentTime;this._playbackRate=e,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==t&&(this.currentTime=t),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}},{key:"updatePromises",value:function(){var e;if(null!==(e=this.effect.target)&&void 0!==e&&e.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var t=this.oldPlayState,A=this.pending?"pending":this.playState;return this.readyPromise&&A!==t&&("idle"===A?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===A&&(this.readyPromise=void 0)),this.finishedPromise&&A!==t&&("idle"===A?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===A?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=A,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=null,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var t=new B(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(t)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),null!==e&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e;return(null===(e=this.effect)||void 0===e?void 0:e.target).getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();-1===e.indexOf(this)&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),t=e.indexOf(this);-1!==t&&e.splice(t,1)}},{key:"tick",value:function(e,t){this._idle||this._paused||(null===this._startTime?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}}},{key:"persist",value:function(){throw new Error(n.eg)}},{key:"addEventListener",value:function(e,t,A){throw new Error(n.eg)}},{key:"removeEventListener",value:function(e,t,A){throw new Error(n.eg)}},{key:"dispatchEvent",value:function(e){throw new Error(n.eg)}},{key:"commitStyles",value:function(){throw new Error(n.eg)}},{key:"ensureAlive",value:function(){var e,t;this._inEffect=this.playbackRate<0&&0===this.currentTime?!(null===(e=this.effect)||void 0===e||!e.update(-1)):!(null===(t=this.effect)||void 0===t||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,t){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var t=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var A=new B(null,this,this.currentTime,e);setTimeout(function(){t.onfinish&&t.onfinish(A)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var n=new B(null,this,this.currentTime,e);this.onframe(n)}this._finishedFlag=!1}}}])}(),b=.1,F="function"==typeof Float32Array,S=function(e,t){return 1-3*t+3*e},T=function(e,t){return 3*t-6*e},L=function(e){return 3*e},Q=function(e,t,A){return((S(t,A)*e+T(t,A))*e+L(t))*e},I=function(e,t,A){return 3*S(t,A)*e*e+2*T(t,A)*e+L(t)},U=function(e,t,A,n){if(!(e>=0&&e<=1&&A>=0&&A<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&A===n)return function(e){return e};for(var i=F?new Float32Array(11):new Array(11),r=0;r<11;++r)i[r]=Q(r*b,e,A);return function(r){return 0===r||1===r?r:Q(function(t){for(var n=0,r=1;10!==r&&i[r]<=t;++r)n+=b;--r;var o=n+(t-i[r])/(i[r+1]-i[r])*b,s=I(o,e,A);return s>=.001?function(e,t,A,n){for(var i=0;i<4;++i){var r=I(t,A,n);if(0===r)return t;t-=(Q(t,A,n)-e)/r}return t}(t,o,e,A):0===s?o:function(e,t,A,n,i){var r,o,s=0;do{(r=Q(o=t+(A-t)/2,n,i)-e)>0?A=o:t=o}while(Math.abs(r)>1e-7&&++s<10);return o}(t,n,n+b,e,A)}(r),t,n)}},O=function(e){return Math.pow(e,2)},H=function(e){return Math.pow(e,3)},M=function(e){return Math.pow(e,4)},_=function(e){return Math.pow(e,5)},k=function(e){return Math.pow(e,6)},R=function(e){return 1-Math.cos(e*Math.PI/2)},N=function(e){return 1-Math.sqrt(1-e*e)},D=function(e){return e*e*(3*e-2)},P=function(e){for(var t,A=4;e<((t=Math.pow(2,--A))-1)/11;);return 1/Math.pow(4,3-A)-7.5625*Math.pow((3*t-2)/22-e,2)},G=function(e){var t=(0,l.A)(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),A=t[0],n=t[1],i=void 0===n?.5:n,r=(0,u.A)(Number(void 0===A?1:A),1,10),o=(0,u.A)(Number(i),.1,2);return 0===e||1===e?e:-r*Math.pow(2,10*(e-1))*Math.sin((e-1-o/(2*Math.PI)*Math.asin(1/r))*(2*Math.PI)/o)},K=function(e){var t=arguments.length>2?arguments[2]:void 0,A=(0,l.A)(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],4),n=A[0],i=void 0===n?1:n,r=A[1],o=void 0===r?100:r,s=A[2],a=void 0===s?10:s,c=A[3],h=void 0===c?0:c;i=(0,u.A)(i,.1,1e3),o=(0,u.A)(o,.1,1e3),a=(0,u.A)(a,.1,1e3),h=(0,u.A)(h,.1,1e3);var d=Math.sqrt(o/i),f=a/(2*Math.sqrt(o*i)),g=f<1?d*Math.sqrt(1-f*f):0,p=f<1?(f*d-h)/g:-h+d,v=t?t*e/1e3:e;return v=f<1?Math.exp(-v*f*d)*(1*Math.cos(g*v)+p*Math.sin(g*v)):(1+p*v)*Math.exp(-v*d),0===e||1===e?e:1-v},V=function(e){var t=(0,l.A)(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),A=t[0],n=void 0===A?10:A;return("start"===t[1]?Math.ceil:Math.floor)((0,u.A)(e,0,1)*n)/n},z=function(e){var t=(0,l.A)(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],4);return U(t[0],t[1],t[2],t[3])(e)},W=U(.42,0,1,1),j=function(e){return function(t){return 1-e(1-t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],arguments.length>2?arguments[2]:void 0)}},X=function(e){return function(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return t<.5?e(2*t,A,n)/2:1-e(-2*t+2,A,n)/2}},Y=function(e){return function(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return t<.5?(1-e(1-2*t,A,n))/2:(e(2*t-1,A,n)+1)/2}},q={steps:V,"step-start":function(e){return V(e,[1,"start"])},"step-end":function(e){return V(e,[1,"end"])},linear:function(e){return e},"cubic-bezier":z,ease:function(e){return z(e,[.25,.1,.25,1])},in:W,out:j(W),"in-out":X(W),"out-in":Y(W),"in-quad":O,"out-quad":j(O),"in-out-quad":X(O),"out-in-quad":Y(O),"in-cubic":H,"out-cubic":j(H),"in-out-cubic":X(H),"out-in-cubic":Y(H),"in-quart":M,"out-quart":j(M),"in-out-quart":X(M),"out-in-quart":Y(M),"in-quint":_,"out-quint":j(_),"in-out-quint":X(_),"out-in-quint":Y(_),"in-expo":k,"out-expo":j(k),"in-out-expo":X(k),"out-in-expo":Y(k),"in-sine":R,"out-sine":j(R),"in-out-sine":X(R),"out-in-sine":Y(R),"in-circ":N,"out-circ":j(N),"in-out-circ":X(N),"out-in-circ":Y(N),"in-back":D,"out-back":j(D),"in-out-back":X(D),"out-in-back":Y(D),"in-bounce":P,"out-bounce":j(P),"in-out-bounce":X(P),"out-in-bounce":Y(P),"in-elastic":G,"out-elastic":j(G),"in-out-elastic":X(G),"out-in-elastic":Y(G),spring:K,"spring-in":K,"spring-out":j(K),"spring-in-out":X(K),"spring-out-in":Y(K)},Z=function(e){return e};function J(e,t){return function(A){if(A>=1)return 1;var n=1/e;return(A+=t*n)-A%n}}var $="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",ee=new RegExp("cubic-bezier\\(".concat($,",").concat($,",").concat($,",").concat($,"\\)")),te=/steps\(\s*(\d+)\s*\)/,Ae=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function ne(e){var t=ee.exec(e);if(t)return U.apply(void 0,(0,a.A)(t.slice(1).map(Number)));var A=te.exec(e);if(A)return J(Number(A[1]),0);var n,i,r=Ae.exec(e);return r?J(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):q[n=e,(i=n,"-"===(i=i.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())})).charAt(0)?i.substring(1):i).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()]||q.linear}function ie(e){return"offset"!==e&&"easing"!==e&&"composite"!==e&&"computedOffset"!==e}var re=function(e,t,A){return function(n){var i=se(e,t,n);return(0,d.A)(i)?i:A(i)}};function oe(e,t,A,i){var r=n.pC[e];if(r&&r.syntax&&r.int){var o=n.fA.styleValueRegistry.getPropertySyntax(r.syntax);if(o){var s=o.parser,l=s?s(t,i):t,u=s?s(A,i):A,c=o.mixer(l,u,i);if(c){var h=re.apply(void 0,(0,a.A)(c));return function(e){return 0===e?t:1===e?A:h(e)}}}}return re(!1,!0,function(e){return e?A:t})}function se(e,t,A){if("number"==typeof e&&"number"==typeof t)return e*(1-A)+t*A;if("boolean"==typeof e&&"boolean"==typeof t||"string"==typeof e&&"string"==typeof t)return A<.5?e:t;if(Array.isArray(e)&&Array.isArray(t)){for(var n=e.length,i=t.length,r=Math.max(n,i),o=[],s=0;s<r;s++)o.push(se(e[s<n?s:n-1],t[s<i?s:i-1],A));return o}throw new Error("Mismatched interpolation arguments ".concat(e,":").concat(t))}var ae=function(){return(0,r.A)(function e(){(0,i.A)(this,e),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Z,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null},[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=ne(e),this._easing=e}}])}();function le(e,t){if(null===e)return[];Array.isArray(e)||(e=function(e){var t=[];for(var A in e)if(!(A in["easing","offset","composite"])){var n=e[A];Array.isArray(n)||(n=[n]);for(var i=n.length,r=0;r<i;r++){if(!t[r]){var o={};"offset"in e&&(o.offset=Number(e.offset)),"easing"in e&&(o.easing=e.easing),"composite"in e&&(o.composite=e.composite),t[r]=o}null!=n[r]&&(t[r][A]=n[r])}}return t.sort(function(e,t){return(e.computedOffset||0)-(t.computedOffset||0)}),t}(e));for(var A=e.map(function(e){var A={};for(var n in null!=t&&t.composite&&(A.composite="auto"),e){var i=e[n];if("offset"===n){if(null!==i){if(i=Number(i),!isFinite(i))throw new Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw new Error("Keyframe offsets must be between 0 and 1.");A.computedOffset=i}}else if("composite"===n&&-1===["replace","add","accumulate","auto"].indexOf(i))throw new Error("".concat(i," compositing is not supported"));A[n]=i}return void 0===A.offset&&(A.offset=null),void 0===A.easing&&(A.easing=(null==t?void 0:t.easing)||"linear"),void 0===A.composite&&(A.composite="auto"),A}),n=!0,i=-1/0,r=0;r<A.length;r++){var o=A[r].offset;if((0,h.A)(o))n=!1;else{if(o<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}return A=A.filter(function(e){return Number(e.offset)>=0&&Number(e.offset)<=1}),n||function(){var e,t,n=A.length;A[n-1].computedOffset=Number(null!==(e=A[n-1].offset)&&void 0!==e?e:1),n>1&&(A[0].computedOffset=Number(null!==(t=A[0].offset)&&void 0!==t?t:0));for(var i=0,r=Number(A[0].computedOffset),o=1;o<n;o++){var s=A[o].computedOffset;if(!(0,h.A)(s)&&!(0,h.A)(r)){for(var a=1;a<o-i;a++)A[i+a].computedOffset=r+(Number(s)-r)*a/(o-i);i=o,r=Number(s)}}}(),A}var ue="backwards|forwards|both|none".split("|"),ce="reverse|alternate|alternate-reverse".split("|");var he=function(){return(0,r.A)(function e(t,A,r){var o,s=this;(0,i.A)(this,e),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=function(e,t){return function(e,t){var A=new ae;return t&&(A.fill="both",A.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.keys(e).forEach(function(t){if(null!=e[t]&&"auto"!==e[t]){if(("number"==typeof A[t]||"duration"===t)&&("number"!=typeof e[t]||isNaN(e[t])))return;if("fill"===t&&-1===ue.indexOf(e[t]))return;if("direction"===t&&-1===ce.indexOf(e[t]))return;A[t]=e[t]}}):A.duration=e,A}(e=function(e){return"number"==typeof e&&(e=isNaN(e)?{duration:"auto"}:{duration:e}),e}(null!=e?e:{duration:"auto"}),t)}(r,!1),this.timing.effect=this,this.timing.activeDuration=(o=this.timing,Math.abs(function(e){var t;return 0===e.duration||0===e.iterations?0:("auto"===e.duration?0:Number(e.duration))*(null!==(t=e.iterations)&&void 0!==t?t:1)}(o)/(o.playbackRate||1))),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=le(A,this.timing),this.interpolations=function(e,t,A){var n=function(e,t){for(var A={},n=0;n<e.length;n++)for(var i in e[n])if(ie(i)){var r={offset:e[n].offset,computedOffset:e[n].computedOffset,easing:e[n].easing,easingFunction:ne(e[n].easing)||t.easingFunction,value:e[n][i]};A[i]=A[i]||[],A[i].push(r)}return A}(e,t),i=function(e,t){var A=[];for(var n in e)for(var i=e[n],r=0;r<i.length-1;r++){var o=r,s=r+1,a=i[o].computedOffset,l=i[s].computedOffset,u=a,c=l;0===r&&(u=-1/0,0===l&&(s=o)),r===i.length-2&&(c=1/0,1===a&&(o=s)),A.push({applyFrom:u,applyTo:c,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:n,interpolation:oe(n,i[o].value,i[s].value,t)})}return A.sort(function(e,t){return e.startOffset-t.startOffset}),A}(n,A);return function(e,t){if(null!==t)i.filter(function(e){return t>=e.applyFrom&&t<e.applyTo}).forEach(function(A){var n=A.endOffset-A.startOffset;e.setAttribute(A.property,A.interpolation(0===n?0:(t-A.startOffset)/n),!1,!1)});else for(var A in n)ie(A)&&e.setAttribute(A,null)}}(this.normalizedKeyframes,this.timing,this.target);var a=n.fA.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(e,t){return"duration"===t?"auto"===e.duration?0:e.duration:"fill"===t?"auto"===e.fill?"none":e.fill:"localTime"===t?s.animation&&s.animation.currentTime||null:"currentIteration"===t?s.animation&&"running"===s.animation.playState?e.currentIteration||0:null:"progress"===t?s.animation&&"running"===s.animation.playState?e.progress||0:null:e[t]},set:function(){return!0}}):this.timing},[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return null!==e&&(this.timeFraction=function(e,t,A){var n=function(e,t,A){if(null===t)return 0;var n=A.endTime;return t<Math.min(A.delay,n)?1:t>=Math.min(A.delay+e+A.endDelay,n)?2:3}(e,t,A),i=function(e,t,A,n,i){switch(n){case 1:return"backwards"===t||"both"===t?0:null;case 3:return A-i;case 2:return"forwards"===t||"both"===t?e:null;case 0:return null}}(e,A.fill,t,n,A.delay);if(null===i)return null;var r="auto"===A.duration?0:A.duration,o=function(e,t,A,n,i){var r=i;return 0===e?1!==t&&(r+=A):r+=n/e,r}(r,n,A.iterations,i,A.iterationStart),s=function(e,t,A,n,i,r){var o=e===1/0?t%1:e%1;return 0!==o||2!==A||0===n||0===i&&0!==r||(o=1),o}(o,A.iterationStart,n,A.iterations,i,r),a=function(e,t,A,n){return 2===e&&t===1/0?1/0:1===A?Math.floor(n)-1:Math.floor(n)}(n,A.iterations,s,o),l=function(e,t,A){var n=e;if("normal"!==e&&"reverse"!==e){var i=t;"alternate-reverse"===e&&(i+=1),n="normal",i!==1/0&&i%2!=0&&(n="reverse")}return"normal"===n?A:1-A}(A.direction,a,s);return A.currentIteration=a,A.progress=l,A.easingFunction(l)}(this.timing.activeDuration,e,this.timing),null!==this.timeFraction)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=le(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var t=this;Object.keys(e||{}).forEach(function(A){t.timing[A]=e[A]})}}])}();function de(e,t){return Number(e.id)-Number(t.id)}var fe=function(){return(0,r.A)(function e(t){var A=this;(0,i.A)(this,e),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(e){A.currentTime=e,A.discardAnimations(),0===A.animations.length?A.timelineTicking=!1:A.requestAnimationFrame(A.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=A.rafCallbacks;A.rafCallbacks=[],e<Number(A.currentTime)&&(e=Number(A.currentTime)),A.animations.sort(de),A.animations=A.tick(e,!0,A.animations)[0],t.forEach(function(t){t[1](e)}),A.applyPendingEffects()},this.document=t},[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,t,A){var n=new he(e,t,A),i=new x(n,this);return this.animations.push(i),this.restartWebAnimationsNextTick(),i.updatePromises(),i.play(),i.updatePromises(),i}},{key:"applyDirtiedAnimation",value:function(e){var t=this;if(!this.inTick){e.markTarget();var A=e.targetAnimations();A.sort(de),this.tick(Number(this.currentTime),!1,A.slice())[1].forEach(function(e){var A=t.animations.indexOf(e);-1!==A&&t.animations.splice(A,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){null==e||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return"finished"!==e.playState&&"idle"!==e.playState})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var t=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([t,e]),t}},{key:"requestAnimationFrame",value:function(e){var t=this;return this.rAF(function(A){t.updateAnimationsPromises(),e(A),t.updateAnimationsPromises()})}},{key:"tick",value:function(e,t,A){var n,i,r=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var o=[],s=[],a=[],l=[];return A.forEach(function(A){A.tick(e,t),A._inEffect?(s.push(A.effect),A.markTarget()):(o.push(A.effect),A.unmarkTarget()),A._needsTick&&(r.ticking=!0);var n=A._inEffect||A._needsTick;A._inTimeline=n,n?a.push(A):l.push(A)}),(n=this.pendingEffects).push.apply(n,o),(i=this.pendingEffects).push.apply(i,s),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[a,l]}}])}();n.fA.EasingFunction=ne,n.fA.AnimationTimeline=fe;var ge=function(e){function t(){var e;(0,i.A)(this,t);for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=(0,o.A)(this,t,[].concat(n))).landmarks=[],e}return(0,s.A)(t,e),(0,r.A)(t,[{key:"rotate",value:function(e,t,A){if(this.relElevation=(0,n._H)(t),this.relAzimuth=(0,n._H)(e),this.relRoll=(0,n._H)(A),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===n.Aq.EXPLORING){var i=p.x8(p.vt(),[1,0,0],(0,n.kU)((this.rotateWorld?1:-1)*this.relElevation)),r=p.x8(p.vt(),[0,1,0],(0,n.kU)((this.rotateWorld?1:-1)*this.relAzimuth)),o=p.x8(p.vt(),[0,0,1],(0,n.kU)(this.relRoll)),s=p.lw(p.vt(),r,i);s=p.lw(p.vt(),s,o);var a=g.I0(g.vt(),s);g.Tl(this.matrix,this.matrix,[0,0,-this.distance]),g.lw(this.matrix,this.matrix,a),g.Tl(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===n.Aq.ORBITING||this.type===n.Aq.EXPLORING?this._getPosition():this.type===n.Aq.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(e,t){var A=(0,n.Q_)(e,t,0),i=v.o8(this.position);return v.WQ(i,i,v.hs(v.vt(),this.right,A[0])),v.WQ(i,i,v.hs(v.vt(),this.up,A[1])),this._setPosition(i),this.triggerUpdate(),this}},{key:"dolly",value:function(e){var t,A=this.forward,i=v.o8(this.position);return t=Math.max(Math.min(this.distance+e*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,i[0]+=t*A[0],i[1]+=t*A[1],i[2]+=t*A[2],this._setPosition(i),this.type===n.Aq.ORBITING||this.type===n.Aq.EXPLORING?this._getDistance():this.type===n.Aq.TRACKING&&v.WQ(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(e){var t,A,i,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.position,a=void 0===s?this.position:s,l=o.focalPoint,u=void 0===l?this.focalPoint:l,c=o.roll,h=o.zoom,d=new n.fA.CameraContribution;d.setType(this.type,void 0),d.setPosition(a[0],null!==(t=a[1])&&void 0!==t?t:this.position[1],null!==(A=a[2])&&void 0!==A?A:this.position[2]),d.setFocalPoint(u[0],null!==(i=u[1])&&void 0!==i?i:this.focalPoint[1],null!==(r=u[2])&&void 0!==r?r:this.focalPoint[2]),d.setRoll(null!=c?c:this.roll),d.setZoom(null!=h?h:this.zoom);var f={name:e,matrix:g.o8(d.getWorldTransform()),right:v.o8(d.right),up:v.o8(d.up),forward:v.o8(d.forward),position:v.o8(d.getPosition()),focalPoint:v.o8(d.getFocalPoint()),distanceVector:v.o8(d.getDistanceVector()),distance:d.getDistance(),dollyingStep:d.getDollyingStep(),azimuth:d.getAzimuth(),elevation:d.getElevation(),roll:d.getRoll(),relAzimuth:d.relAzimuth,relElevation:d.relElevation,relRoll:d.relRoll,zoom:d.getZoom()};return this.landmarks.push(f),f}},{key:"gotoLandmark",value:function(e){var t=this,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,f.A)(e)?this.landmarks.find(function(t){return t.name===e}):e;if(i){var r=(0,d.A)(A)?{duration:A}:A,o=r.easing,s=void 0===o?"linear":o,a=r.duration,l=void 0===a?100:a,u=r.easingFunction,c=void 0===u?void 0:u,h=r.onfinish,g=void 0===h?void 0:h,p=r.onframe,m=void 0===p?void 0:p;this.cancelLandmarkAnimation();var C,w=i.position,y=i.focalPoint,B=i.zoom,E=i.roll,x=c||n.fA.EasingFunction(s),b=function(){t.setFocalPoint(y),t.setPosition(w),t.setRoll(E),t.setZoom(B),t.computeMatrix(),t.triggerUpdate(),null==g||g()};if(0===l)return b();var F=function(e){void 0===C&&(C=e);var A=e-C;if(A>=l)b();else{var n,i,r=x(A/l),o=v.vt(),s=v.vt();if(v.Cc(o,t.focalPoint,y,r),v.Cc(s,t.position,w,r),i=t.roll*(1-r)+E*r,n=t.zoom*(1-r)+B*r,t.setFocalPoint(o),t.setPosition(s),t.setRoll(i),t.setZoom(n),v.xg(o,y)+v.xg(s,w)<=.01&&void 0===B&&void 0===E)return b();t.computeMatrix(),t.triggerUpdate(),A<l&&(null==m||m(r),t.landmarkAnimationID=t.canvas.requestAnimationFrame(F))}};this.canvas.requestAnimationFrame(F)}}}])}(n.i7);n.fA.CameraContribution=ge;var pe=["body","startHead","endHead","startHeadOffset","endHeadOffset"],ve=["body","startHead","endHead","startHeadOffset","endHeadOffset"],me=["body","startHead","endHead","startHeadOffset","endHeadOffset"],Ce=function(e){function t(e){var A;(0,i.A)(this,t);var n=(A=(0,o.A)(this,t,[(0,C.A)((0,C.A)({},e),{},{type:t.tag})])).attributes,r=n.body,s=n.startHead,a=n.endHead,l=(0,m.A)(n,pe);if(!r)throw new Error("Arrow's body is required");return A.body=r,A.appendChild(A.body),A.handleBodyAttributeChanged(A.body),s&&A.appendArrowHead(A.getArrowHeadType(s),!0),a&&A.appendArrowHead(A.getArrowHeadType(a),!1),A.applyArrowStyle(l,[A.body,A.startHead,A.endHead]),A}return(0,s.A)(t,e),(0,r.A)(t,[{key:"handleBodyAttributeChanged",value:function(e){var t=this;e.addEventListener(n.jX.ATTR_MODIFIED,function(e){var A=e.attrName;"x1"===A||"y1"===A?t.startHead&&t.transformArrowHead(t.startHead,!0):"x2"!==A&&"y2"!==A||t.endHead&&t.transformArrowHead(t.endHead,!1)})}},{key:"getBody",value:function(){return this.body}},{key:"getStartHead",value:function(){return this.startHead}},{key:"getEndHead",value:function(){return this.endHead}},{key:"attributeChangedCallback",value:function(e,t,A){if("opacity"===e||"strokeOpacity"===e||"stroke"===e||"lineWidth"===e||"increasedLineWidthForHitTesting"===e)this.applyArrowStyle((0,w.A)({},e,A),[this.body,this.startHead,this.endHead]);else if("startHead"===e||"endHead"===e){var n="startHead"===e;if(this.destroyArrowHead(n),A){var i=(0,m.A)(this.attributes,ve);this.appendArrowHead(this.getArrowHeadType(A),n),this.applyArrowStyle(i,[n?this.startHead:this.endHead])}}else if("body"===e){var r=(0,m.A)(this.attributes,me);this.body.destroy(),this.body=A,this.appendChild(this.body),this.applyArrowStyle(r,[this.body])}else"startHeadOffset"===e?this.moveArrowHeadAlongTangent(A,!0):"endHeadOffset"===e&&this.moveArrowHeadAlongTangent(A,!1)}},{key:"getArrowHeadType",value:function(e){return"boolean"==typeof e?"default":"custom"}},{key:"appendArrowHead",value:function(e,t){var A;A="default"===e?this.createDefaultArrowHead():t?this.attributes.startHead:this.attributes.endHead,this.transformArrowHead(A,t),A.setAttribute("zIndex",1),t?this.startHead=A:this.endHead=A,this.appendChild(A);var n=t?this.attributes.startHeadOffset:this.attributes.endHeadOffset;n&&this.moveArrowHeadAlongTangent(n,t)}},{key:"transformArrowHead",value:function(e,t){var A,i=v.vt(),r=0,o=0,s=0,a=0,u=this.body&&this.body.nodeName;if(u===n.yp.LINE){var c=this.body.attributes,h=c.x1,d=c.x2,f=c.y1,g=c.y2;r=t?d:h,o=t?h:d,s=t?g:f,a=t?f:g}else if(u===n.yp.POLYLINE){var p=this.body.attributes.points,m=p.length;r=t?p[1][0]:p[m-2][0],s=t?p[1][1]:p[m-2][1],o=t?p[0][0]:p[m-1][0],a=t?p[0][1]:p[m-1][1]}else if(u===n.yp.PATH){var C=this.getTangent(this.body,t),w=(0,l.A)(C,2),y=w[0],B=w[1];r=y[0],s=y[1],o=B[0],a=B[1]}A=Math.atan2(s-a,r-o),i=v.fA(o,a,0),t?(this.startHeadPosition=i,this.startHeadRad=A):(this.endHeadPosition=i,this.endHeadRad=A),e.setLocalPosition(i),e.setLocalEulerAngles(180*A/Math.PI+e.getLocalEulerAngles())}},{key:"moveArrowHeadAlongTangent",value:function(e,t){var A=t?this.startHead:this.endHead;A&&A.setLocalPosition(v.jb(v.vt(),t?this.startHeadPosition:this.endHeadPosition,v.fA(Math.cos(t?this.startHeadRad:this.endHeadRad)*e,Math.sin(t?this.startHeadRad:this.endHeadRad)*e,0)))}},{key:"destroyArrowHead",value:function(e){e&&this.startHead&&(this.startHead.destroy(),this.startHead=void 0),!e&&this.endHead&&(this.endHead.destroy(),this.endHead=void 0)}},{key:"getTangent",value:function(e,t){return t?e.getStartTangent():e.getEndTangent()}},{key:"createDefaultArrowHead",value:function(){var e=this.attributes,t=e.stroke,A=e.lineWidth,i=Math.sin,r=Math.cos,o=Math.PI,s=10*r(o/6);return new n.wA({style:{d:"M".concat(s/2,",").concat(10*i(o/6)," L-").concat(s/2,",0 L").concat(s/2,",-").concat(10*i(o/6)),stroke:t,lineWidth:A,transformOrigin:"center"}})}},{key:"applyArrowStyle",value:function(e,t){var A=e.opacity,n=e.stroke,i=e.strokeOpacity,r=e.lineWidth,o=e.increasedLineWidthForHitTesting;t.forEach(function(e){e&&((0,h.A)(A)||(e.style.opacity=A),(0,h.A)(n)||(e.style.stroke=n),(0,h.A)(i)||(e.style.strokeOpacity=i),(0,h.A)(r)||(e.style.lineWidth=r),(0,h.A)(o)||(e.style.increasedLineWidthForHitTesting=o))})}}])}(n.K9);Ce.tag="arrow",Ce.PARSED_STYLE_LIST=new Set([].concat((0,a.A)(n.K9.PARSED_STYLE_LIST),["body","startHead","endHead","startHeadOffset","endHeadOffset","stroke","lineWidth","opacity","strokeOpacity"]));var we=Math.PI,ye=2*we,Be=Math.sin,Ee=Math.cos,xe=Math.acos,be=Math.atan2,Fe=Math.sqrt,Se=Math.max,Te=Math.min,Le=1e-4;[{name:"sr",inherits:!1,interpolable:!0,syntax:n.NZ.LENGTH_PERCENTAGE},{name:"sr0",inherits:!1,interpolable:!0,syntax:n.NZ.LENGTH_PERCENTAGE},{name:"startAngle",inherits:!1,interpolable:!0,syntax:n.NZ.ANGLE},{name:"endAngle",inherits:!1,interpolable:!0,syntax:n.NZ.ANGLE}].forEach(function(e){n.Ks.registerProperty(e)});var Qe=function(e,t,A,n){return{x:e+A*Math.cos(n),y:t+A*Math.sin(n)}};function Ie(e,t,A,n,i,r,o){var s=e-A,a=t-n,l=(o?r:-r)/Fe(s*s+a*a),u=l*a,c=-l*s,h=e+u,d=t+c,f=A+u,g=n+c,p=(h+f)/2,v=(d+g)/2,m=f-h,C=g-d,w=m*m+C*C,y=i-r,B=h*g-f*d,E=(C<0?-1:1)*Fe(Se(0,y*y*w-B*B)),x=(B*C-m*E)/w,b=(-B*m-C*E)/w,F=(B*C+m*E)/w,S=(-B*m+C*E)/w,T=x-p,L=b-v,Q=F-p,I=S-v;return T*T+L*L>Q*Q+I*I&&(x=F,b=S),{cx:x,cy:b,x0:-u,y0:-c,x1:x*(i/y-1),y1:b*(i/y-1)}}function Ue(e,t){return(t=t<0&&e>=0?t+ye:t)-e<=we?0:1}(function(e){function t(e){var A;return(0,i.A)(this,t),(A=(0,o.A)(this,t,[e])).updatePath(),A}return(0,s.A)(t,e),(0,r.A)(t,[{key:"setAttribute",value:function(e,A,n){(0,y.A)(t,"setAttribute",this,3)([e,A,n]),["startAngle","endAngle","sr","sr0","radius"].indexOf(e)>-1&&this.updatePath()}},{key:"updatePath",value:function(){var e=this.parsedStyle,A=e.startAngle,i=e.endAngle,r=e.sr,o=e.sr0,s=e.radius,a=this.createPath(e.x,e.y,A?(0,n.kU)(A):0,i?(0,n.kU)(i):2*Math.PI,r||0,o||0,s||[0,0,0,0]);(0,y.A)(t,"setAttribute",this,3)(["d",a])}},{key:"createPath",value:function(e,t,A,n,i,r,o){if(!(i<=0)){var s=Qe(e,t,i,A),a=Qe(e,t,i,n),u=Qe(e,t,r,A),h=Qe(e,t,r,n);if((0,c.A)(n-A,2*Math.PI)){var d=Qe(e,t,i,A+Math.PI),f=Qe(e,t,r,A+Math.PI),g=[["M",s.x,s.y],["A",i,i,0,1,1,d.x,d.y],["A",i,i,0,1,1,a.x,a.y],["M",u.x,u.y]];return r&&(g.push(["A",r,r,0,1,0,f.x,f.y]),g.push(["A",r,r,0,1,0,h.x,h.y])),g.push(["M",s.x,s.y]),g.push(["Z"]),g}var p=n-A,v=i*Ee(A),m=i*Be(A),C=r*Ee(n),w=r*Be(n),y=i*Ee(n),B=i*Be(n),E=r*Ee(A),x=r*Be(A),b=(0,l.A)(o,4),F=b[0],S=b[1],T=b[2],L=b[3],Q=(i-r)/2,I=Te(Q,F),U=Te(Q,S),O=Te(Q,T),H=Te(Q,L),M=Se(I,U),_=Se(O,H),k=M,R=_;if((M>Le||_>Le)&&p<we){var N=function(e,t,A,n,i,r,o,s){var a=A-e,l=n-t,u=o-i,c=s-r,h=c*a-u*l;if(!(h*h<Le))return[e+(h=(u*(t-r)-c*(e-i))/h)*a,t+h*l]}(v,m,E,x,y,B,C,w);if(N){var D=v-N[0],P=m-N[1],G=y-N[0],K=B-N[1],V=1/Be(xe((D*G+P*K)/(Fe(D*D+P*P)*Fe(G*G+K*K)))/2),z=Fe(N[0]*N[0]+N[1]*N[1]);k=Te(M,(i-z)/(V+1)),R=Te(_,(r-z)/(V-1))}}var W=Ue(A,n),j=!0,X=[];if(k>Le){var Y=Te(F,k),q=Te(S,k),Z=Ie(E,x,v,m,i,Y,j),J=Ie(y,B,C,w,i,q,j);if(X.push(["M",e+Z.cx+Z.x0,t+Z.cy+Z.y0]),k<M&&Y===q){var $=be(Z.y0,Z.x0),ee=be(J.y0,J.x0);X.push(["A",k,k,0,Ue($,ee),1,e+J.cx+J.x0,t+J.cy+J.y0])}else{if(Y>0){var te=be(Z.y0,Z.x0),Ae=be(Z.y1,Z.x1),ne=Qe(e,t,i,Ae);X.push(["A",Y,Y,0,Ue(te,Ae),1,ne.x,ne.y])}var ie=be(Z.cy+Z.y1,Z.cx+Z.x1),re=be(J.cy+J.y1,J.cx+J.x1),oe=Qe(e,t,i,re);if(X.push(["A",i,i,0,Ue(ie,re),1,oe.x,oe.y]),q>0){var se=be(J.y1,J.x1),ae=be(J.y0,J.x0);X.push(["A",q,q,0,Ue(se,ae),1,e+J.cx+J.x0,t+J.cy+J.y0])}}}else X.push(["M",s.x,s.y]),X.push(["A",i,i,0,W,1,a.x,a.y]);if(r<Le)X.push(["L",h.x,h.y]);else if(R>Le){var le=Te(L,R),ue=Te(T,R),ce=Ie(C,w,0,0,r-i,ue,j),he=Ie(0,0,E,x,r-i,le,j);if(X.push(["L",e+ce.cx+ce.x0,t+ce.cy+ce.y0]),R<_&&le===ue){var de=be(ce.y0,ce.x0),fe=be(he.y0,he.x0),ge=Qe(e,t,r,fe);X.push(["A",k,k,0,Ue(de,fe),1,ge.x,ge.y])}else{if(ue>0){var pe=be(ce.y0,ce.x0),ve=be(ce.y1,ce.x1),me=Qe(e,t,r-i,ve);X.push(["A",ue,ue,0,Ue(pe,ve),1,me.x,me.y])}var Ce=be(ce.cy+ce.y1,ce.cx+ce.x1),ye=be(he.cy+he.y1,he.cx+he.x1),Oe=Qe(e,t,r,ye);if(X.push(["A",r,r,0,Ue(ye,Ce),0,Oe.x,Oe.y]),X.push(["L",Oe.x,Oe.y]),le>0){var He=be(he.y1,he.x1),Me=be(he.y0,he.x0);X.push(["A",le,le,0,Ue(He,Me),1,e+he.cx+he.x0,t+he.cy+he.y0])}}}else X.push(["L",h.x,h.y]),X.push(["A",r,r,0,W,0,u.x,u.y]);return X.push(["Z"]),X}}}])}(n.wA)).PARSED_STYLE_LIST=new Set([].concat((0,a.A)(n.wA.PARSED_STYLE_LIST),["x","y","sr","sr0","radius","startAngle","endAngle"]))},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/clamp.js"(e,t,A){"use strict";A.d(t,["A",0,function(e,t,A){return e<t?t:e>A?A:e}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js"(e,t,A){"use strict";function n(e){return Array.isArray(e)}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-function.js"(e,t,A){"use strict";function n(e){return"function"==typeof e}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-nil.js"(e,t,A){"use strict";function n(e){return null==e}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number-equal.js"(e,t,A){"use strict";function n(e,t,A){return void 0===A&&(A=1e-5),e===t||Math.abs(e-t)<A}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-number.js"(e,t,A){"use strict";function n(e){return"number"==typeof e}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-object.js"(e,t,A){"use strict";A.d(t,["A",0,function(e){var t=typeof e;return null!==e&&"object"===t||"function"===t}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-string.js"(e,t,A){"use strict";function n(e){return"string"==typeof e}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-type.js"(e,t,A){"use strict";var n={}.toString;A.d(t,["A",0,function(e,t){return n.call(e)==="[object "+t+"]"}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-undefined.js"(e,t,A){"use strict";A.d(t,["A",0,function(e){return void 0===e}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/max.js"(e,t,A){"use strict";function n(e){if(!Array.isArray(e))return-1/0;var t=e.length;if(!t)return-1/0;for(var A=e[0],n=1;n<t;n++)A=Math.max(A,e[n]);return A}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/min.js"(e,t,A){"use strict";var n=A("./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/lodash/is-array.js");A.d(t,["A",0,function(e){if((0,n.A)(e))return e.reduce(function(e,t){return Math.min(e,t)},e[0])}])},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/process/arc-2-cubic.js"(e,t,A){"use strict";function n(e,t,A){return{x:e*Math.cos(A)-t*Math.sin(A),y:e*Math.sin(A)+t*Math.cos(A)}}function i(e,t,A,r,o,s,a,l,u,c){var h,d,f,g,p,v=e,m=t,C=A,w=r,y=l,B=u,E=120*Math.PI/180,x=Math.PI/180*(+o||0),b=[];if(c)d=c[0],f=c[1],g=c[2],p=c[3];else{m=(h=n(v,m,-x)).y;var F=((v=h.x)-(y=(h=n(y,B,-x)).x))/2,S=(m-(B=h.y))/2,T=F*F/(C*C)+S*S/(w*w);T>1&&(C*=T=Math.sqrt(T),w*=T);var L=C*C,Q=w*w,I=(s===a?-1:1)*Math.sqrt(Math.abs((L*Q-L*S*S-Q*F*F)/(L*S*S+Q*F*F)));g=I*C*S/w+(v+y)/2,p=I*-w*F/C+(m+B)/2,d=Math.asin(((m-p)/w*Math.pow(10,9)|0)/Math.pow(10,9)),f=Math.asin(((B-p)/w*Math.pow(10,9)|0)/Math.pow(10,9)),d=v<g?Math.PI-d:d,f=y<g?Math.PI-f:f,d<0&&(d=2*Math.PI+d),f<0&&(f=2*Math.PI+f),a&&d>f&&(d-=2*Math.PI),!a&&f>d&&(f-=2*Math.PI)}var U=f-d;if(Math.abs(U)>E){var O=f,H=y,M=B;f=d+E*(a&&f>d?1:-1),b=i(y=g+C*Math.cos(f),B=p+w*Math.sin(f),C,w,o,0,a,H,M,[f,O,g,p])}U=f-d;var _=Math.cos(d),k=Math.sin(d),R=Math.cos(f),N=Math.sin(f),D=Math.tan(U/4),P=4/3*C*D,G=4/3*w*D,K=[v,m],V=[v+P*k,m-G*_],z=[y+P*N,B-G*R],W=[y,B];if(V[0]=2*K[0]-V[0],V[1]=2*K[1]-V[1],c)return V.concat(z,W,b);for(var j=[],X=0,Y=(b=V.concat(z,W,b)).length;X<Y;X+=1)j[X]=X%2?n(b[X-1],b[X],x).y:n(b[X],b[X+1],x).x;return j}A.d(t,{U:()=>i})},"./node_modules/.pnpm/@antv+util@3.3.11/node_modules/@antv/util/esm/path/util/distance-square-root.js"(e,t,A){"use strict";function n(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}A.d(t,{F:()=>n})},"./node_modules/.pnpm/css-loader@6.11.0_webpack@5.108.4/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/@antv+s2@2.7.2_@antv+g2@5.4.8/node_modules/@antv/s2/esm/ui/tooltip/index.css"(e,t,A){"use strict";var n=A("./node_modules/.pnpm/css-loader@6.11.0_webpack@5.108.4/node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=A.n(n),r=A("./node_modules/.pnpm/css-loader@6.11.0_webpack@5.108.4/node_modules/css-loader/dist/runtime/api.js"),o=A.n(r)()(i());o.push([e.id,".antv-s2-tooltip-container {\n position: fixed;\n user-select: text;\n min-width: 200px;\n max-width: 640px;\n max-height: 100vh;\n overflow: auto;\n z-index: 1024;\n display: inline-block;\n background: var(--antv-s2-tooltip-background, rgba(255, 255, 255, 0.95));\n border-radius: 4px;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);\n font-size: 12px;\n font-family: Roboto, 'PingFang SC', 'Chinese Quote', 'Segoe UI',\n 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial,\n sans-serif;\n}\n\n.antv-s2-tooltip-container-hide {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.antv-s2-tooltip-container-hide * {\n transition: none;\n}\n\n.antv-s2-tooltip-container-show {\n opacity: 1;\n visibility: visible;\n pointer-events: all;\n}\n",""]),A.d(t,["A",0,o])},"./node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js"(e){"use strict";var t=Object.prototype.hasOwnProperty,A="~";function n(){}function i(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function r(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,r||e,o),a=A?A+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],s]:e._events[a].push(s):(e._events[a]=s,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(A=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(A?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=this._events[A?A+e:e];if(!t)return[];if(t.fn)return[t.fn];for(var n=0,i=t.length,r=new Array(i);n<i;n++)r[n]=t[n].fn;return r},s.prototype.listenerCount=function(e){var t=this._events[A?A+e:e];return t?t.fn?1:t.length:0},s.prototype.emit=function(e,t,n,i,r,o){var s=A?A+e:e;if(!this._events[s])return!1;var a,l,u=this._events[s],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,r),!0;case 6:return u.fn.call(u.context,t,n,i,r,o),!0}for(l=1,a=new Array(c-1);l<c;l++)a[l-1]=arguments[l];u.fn.apply(u.context,a)}else{var h,d=u.length;for(l=0;l<d;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,i);break;default:if(!a)for(h=1,a=new Array(c-1);h<c;h++)a[h-1]=arguments[h];u[l].fn.apply(u[l].context,a)}}return!0},s.prototype.on=function(e,t,A){return r(this,e,t,A,!1)},s.prototype.once=function(e,t,A){return r(this,e,t,A,!0)},s.prototype.removeListener=function(e,t,n,i){var r=A?A+e:e;if(!this._events[r])return this;if(!t)return o(this,r),this;var s=this._events[r];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||o(this,r);else{for(var a=0,l=[],u=s.length;a<u;a++)(s[a].fn!==t||i&&!s[a].once||n&&s[a].context!==n)&&l.push(s[a]);l.length?this._events[r]=1===l.length?l[0]:l:o(this,r)}return this},s.prototype.removeAllListeners=function(e){var t;return e?this._events[t=A?A+e:e]&&o(this,t):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=A,s.EventEmitter=s,e.exports=s},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js"(e,t,A){"use strict";A.d(t,{bw:()=>r,p8:()=>n,tb:()=>i});var n=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,r=(Math,"zyx");Math,Math},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat3.js"(e,t,A){"use strict";A.d(t,{fA:()=>o,vt:()=>i,z0:()=>r});var n=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js");function i(){var e=new n.tb(9);return n.tb!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function r(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t,A,i,r,o,s,a,l){var u=new n.tb(9);return u[0]=e,u[1]=t,u[2]=A,u[3]=i,u[4]=r,u[5]=o,u[6]=s,u[7]=a,u[8]=l,u}},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat4.js"(e,t,A){"use strict";A.r(t),A.d(t,{$0:()=>E,$h:()=>_,B8:()=>c,C:()=>o,CV:()=>B,D_:()=>l,I0:()=>M,IL:()=>Q,KC:()=>h,Kp:()=>k,N9:()=>F,Ny:()=>q,O:()=>j,O7:()=>H,Qr:()=>w,Re:()=>Y,TV:()=>Z,Tl:()=>g,U_:()=>S,W7:()=>K,WQ:()=>X,Z8:()=>C,a4:()=>d,aI:()=>$,e$:()=>v,eL:()=>m,ef:()=>N,fA:()=>s,fN:()=>R,gx:()=>W,hM:()=>x,hZ:()=>a,hs:()=>p,i1:()=>b,jb:()=>te,kN:()=>y,l:()=>I,lK:()=>ee,lw:()=>f,mg:()=>u,nc:()=>D,o:()=>U,o1:()=>O,o8:()=>r,sC:()=>L,t2:()=>J,t5:()=>V,up:()=>P,v3:()=>G,vt:()=>i,xI:()=>z,yo:()=>T});var n=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js");function i(){var e=new n.tb(16);return n.tb!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function r(e){var t=new n.tb(16);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[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function s(e,t,A,i,r,o,s,a,l,u,c,h,d,f,g,p){var v=new n.tb(16);return v[0]=e,v[1]=t,v[2]=A,v[3]=i,v[4]=r,v[5]=o,v[6]=s,v[7]=a,v[8]=l,v[9]=u,v[10]=c,v[11]=h,v[12]=d,v[13]=f,v[14]=g,v[15]=p,v}function a(e,t,A,n,i,r,o,s,a,l,u,c,h,d,f,g,p){return e[0]=t,e[1]=A,e[2]=n,e[3]=i,e[4]=r,e[5]=o,e[6]=s,e[7]=a,e[8]=l,e[9]=u,e[10]=c,e[11]=h,e[12]=d,e[13]=f,e[14]=g,e[15]=p,e}function l(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function u(e,t){if(e===t){var A=t[1],n=t[2],i=t[3],r=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=A,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=r,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function c(e,t){var A=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],g=t[13],p=t[14],v=t[15],m=A*s-n*o,C=A*a-i*o,w=A*l-r*o,y=n*a-i*s,B=n*l-r*s,E=i*l-r*a,x=u*g-c*f,b=u*p-h*f,F=u*v-d*f,S=c*p-h*g,T=c*v-d*g,L=h*v-d*p,Q=m*L-C*T+w*S+y*F-B*b+E*x;return Q?(e[0]=(s*L-a*T+l*S)*(Q=1/Q),e[1]=(i*T-n*L-r*S)*Q,e[2]=(g*E-p*B+v*y)*Q,e[3]=(h*B-c*E-d*y)*Q,e[4]=(a*F-o*L-l*b)*Q,e[5]=(A*L-i*F+r*b)*Q,e[6]=(p*w-f*E-v*C)*Q,e[7]=(u*E-h*w+d*C)*Q,e[8]=(o*T-s*F+l*x)*Q,e[9]=(n*F-A*T-r*x)*Q,e[10]=(f*B-g*w+v*m)*Q,e[11]=(c*w-u*B-d*m)*Q,e[12]=(s*b-o*S-a*x)*Q,e[13]=(A*S-n*b+i*x)*Q,e[14]=(g*C-f*y-p*m)*Q,e[15]=(u*y-c*C+h*m)*Q,e):null}function h(e,t){var A=t[0],n=t[1],i=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],g=t[13],p=t[14],v=t[15],m=A*s-n*o,C=A*a-i*o,w=A*l-r*o,y=n*a-i*s,B=n*l-r*s,E=i*l-r*a,x=u*g-c*f,b=u*p-h*f,F=u*v-d*f,S=c*p-h*g,T=c*v-d*g,L=h*v-d*p;return e[0]=s*L-a*T+l*S,e[1]=i*T-n*L-r*S,e[2]=g*E-p*B+v*y,e[3]=h*B-c*E-d*y,e[4]=a*F-o*L-l*b,e[5]=A*L-i*F+r*b,e[6]=p*w-f*E-v*C,e[7]=u*E-h*w+d*C,e[8]=o*T-s*F+l*x,e[9]=n*F-A*T-r*x,e[10]=f*B-g*w+v*m,e[11]=c*w-u*B-d*m,e[12]=s*b-o*S-a*x,e[13]=A*S-n*b+i*x,e[14]=g*C-f*y-p*m,e[15]=u*y-c*C+h*m,e}function d(e){var t=e[0],A=e[1],n=e[2],i=e[4],r=e[5],o=e[6],s=e[8],a=e[9],l=e[10],u=e[12],c=e[13],h=e[14],d=t*r-A*i,f=t*o-n*i,g=A*o-n*r,p=s*c-a*u,v=s*h-l*u,m=a*h-l*c;return e[7]*(t*m-A*v+n*p)-e[3]*(i*m-r*v+o*p)+e[15]*(s*g-a*f+l*d)-e[11]*(u*g-c*f+h*d)}function f(e,t,A){var n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],g=t[12],p=t[13],v=t[14],m=t[15],C=A[0],w=A[1],y=A[2],B=A[3];return e[0]=C*n+w*s+y*c+B*g,e[1]=C*i+w*a+y*h+B*p,e[2]=C*r+w*l+y*d+B*v,e[3]=C*o+w*u+y*f+B*m,e[4]=(C=A[4])*n+(w=A[5])*s+(y=A[6])*c+(B=A[7])*g,e[5]=C*i+w*a+y*h+B*p,e[6]=C*r+w*l+y*d+B*v,e[7]=C*o+w*u+y*f+B*m,e[8]=(C=A[8])*n+(w=A[9])*s+(y=A[10])*c+(B=A[11])*g,e[9]=C*i+w*a+y*h+B*p,e[10]=C*r+w*l+y*d+B*v,e[11]=C*o+w*u+y*f+B*m,e[12]=(C=A[12])*n+(w=A[13])*s+(y=A[14])*c+(B=A[15])*g,e[13]=C*i+w*a+y*h+B*p,e[14]=C*r+w*l+y*d+B*v,e[15]=C*o+w*u+y*f+B*m,e}function g(e,t,A){var n,i,r,o,s,a,l,u,c,h,d,f,g=A[0],p=A[1],v=A[2];return t===e?(e[12]=t[0]*g+t[4]*p+t[8]*v+t[12],e[13]=t[1]*g+t[5]*p+t[9]*v+t[13],e[14]=t[2]*g+t[6]*p+t[10]*v+t[14],e[15]=t[3]*g+t[7]*p+t[11]*v+t[15]):(i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],e[0]=n=t[0],e[1]=i,e[2]=r,e[3]=o,e[4]=s,e[5]=a,e[6]=l,e[7]=u,e[8]=c,e[9]=h,e[10]=d,e[11]=f,e[12]=n*g+s*p+c*v+t[12],e[13]=i*g+a*p+h*v+t[13],e[14]=r*g+l*p+d*v+t[14],e[15]=o*g+u*p+f*v+t[15]),e}function p(e,t,A){var n=A[0],i=A[1],r=A[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function v(e,t,A,i){var r,o,s,a,l,u,c,h,d,f,g,p,v,m,C,w,y,B,E,x,b,F,S,T,L=i[0],Q=i[1],I=i[2],U=Math.sqrt(L*L+Q*Q+I*I);return U<n.p8?null:(L*=U=1/U,Q*=U,I*=U,r=Math.sin(A),o=Math.cos(A),l=t[1],u=t[2],c=t[3],d=t[5],f=t[6],g=t[7],v=t[9],m=t[10],C=t[11],E=L*Q*(s=1-o)-I*r,x=Q*Q*s+o,b=I*Q*s+L*r,F=L*I*s+Q*r,S=Q*I*s-L*r,T=I*I*s+o,e[0]=(a=t[0])*(w=L*L*s+o)+(h=t[4])*(y=Q*L*s+I*r)+(p=t[8])*(B=I*L*s-Q*r),e[1]=l*w+d*y+v*B,e[2]=u*w+f*y+m*B,e[3]=c*w+g*y+C*B,e[4]=a*E+h*x+p*b,e[5]=l*E+d*x+v*b,e[6]=u*E+f*x+m*b,e[7]=c*E+g*x+C*b,e[8]=a*F+h*S+p*T,e[9]=l*F+d*S+v*T,e[10]=u*F+f*S+m*T,e[11]=c*F+g*S+C*T,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function m(e,t,A){var n=Math.sin(A),i=Math.cos(A),r=t[4],o=t[5],s=t[6],a=t[7],l=t[8],u=t[9],c=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=r*i+l*n,e[5]=o*i+u*n,e[6]=s*i+c*n,e[7]=a*i+h*n,e[8]=l*i-r*n,e[9]=u*i-o*n,e[10]=c*i-s*n,e[11]=h*i-a*n,e}function C(e,t,A){var n=Math.sin(A),i=Math.cos(A),r=t[0],o=t[1],s=t[2],a=t[3],l=t[8],u=t[9],c=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=r*i-l*n,e[1]=o*i-u*n,e[2]=s*i-c*n,e[3]=a*i-h*n,e[8]=r*n+l*i,e[9]=o*n+u*i,e[10]=s*n+c*i,e[11]=a*n+h*i,e}function w(e,t,A){var n=Math.sin(A),i=Math.cos(A),r=t[0],o=t[1],s=t[2],a=t[3],l=t[4],u=t[5],c=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=r*i+l*n,e[1]=o*i+u*n,e[2]=s*i+c*n,e[3]=a*i+h*n,e[4]=l*i-r*n,e[5]=u*i-o*n,e[6]=c*i-s*n,e[7]=h*i-a*n,e}function y(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function B(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function E(e,t,A){var i,r,o,s=A[0],a=A[1],l=A[2],u=Math.sqrt(s*s+a*a+l*l);return u<n.p8?null:(s*=u=1/u,a*=u,l*=u,i=Math.sin(t),r=Math.cos(t),e[0]=s*s*(o=1-r)+r,e[1]=a*s*o+l*i,e[2]=l*s*o-a*i,e[3]=0,e[4]=s*a*o-l*i,e[5]=a*a*o+r,e[6]=l*a*o+s*i,e[7]=0,e[8]=s*l*o+a*i,e[9]=a*l*o-s*i,e[10]=l*l*o+r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function x(e,t){var A=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=A,e[7]=0,e[8]=0,e[9]=-A,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function b(e,t){var A=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-A,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=A,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function F(e,t){var A=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=A,e[2]=0,e[3]=0,e[4]=-A,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function S(e,t,A){var n=t[0],i=t[1],r=t[2],o=t[3],s=n+n,a=i+i,l=r+r,u=n*s,c=n*a,h=n*l,d=i*a,f=i*l,g=r*l,p=o*s,v=o*a,m=o*l;return e[0]=1-(d+g),e[1]=c+m,e[2]=h-v,e[3]=0,e[4]=c-m,e[5]=1-(u+g),e[6]=f+p,e[7]=0,e[8]=h+v,e[9]=f-p,e[10]=1-(u+d),e[11]=0,e[12]=A[0],e[13]=A[1],e[14]=A[2],e[15]=1,e}function T(e,t){var A=new n.tb(3),i=-t[0],r=-t[1],o=-t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=i*i+r*r+o*o+s*s;return h>0?(A[0]=2*(a*s+c*i+l*o-u*r)/h,A[1]=2*(l*s+c*r+u*i-a*o)/h,A[2]=2*(u*s+c*o+a*r-l*i)/h):(A[0]=2*(a*s+c*i+l*o-u*r),A[1]=2*(l*s+c*r+u*i-a*o),A[2]=2*(u*s+c*o+a*r-l*i)),S(e,t,A),e}function L(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Q(e,t){var A=t[0],n=t[1],i=t[2],r=t[4],o=t[5],s=t[6],a=t[8],l=t[9],u=t[10];return e[0]=Math.sqrt(A*A+n*n+i*i),e[1]=Math.sqrt(r*r+o*o+s*s),e[2]=Math.sqrt(a*a+l*l+u*u),e}function I(e,t){var A=new n.tb(3);Q(A,t);var i=1/A[0],r=1/A[1],o=1/A[2],s=t[0]*i,a=t[1]*r,l=t[2]*o,u=t[4]*i,c=t[5]*r,h=t[6]*o,d=t[8]*i,f=t[9]*r,g=t[10]*o,p=s+c+g,v=0;return p>0?(v=2*Math.sqrt(p+1),e[3]=.25*v,e[0]=(h-f)/v,e[1]=(d-l)/v,e[2]=(a-u)/v):s>c&&s>g?(v=2*Math.sqrt(1+s-c-g),e[3]=(h-f)/v,e[0]=.25*v,e[1]=(a+u)/v,e[2]=(d+l)/v):c>g?(v=2*Math.sqrt(1+c-s-g),e[3]=(d-l)/v,e[0]=(a+u)/v,e[1]=.25*v,e[2]=(h+f)/v):(v=2*Math.sqrt(1+g-s-c),e[3]=(a-u)/v,e[0]=(d+l)/v,e[1]=(h+f)/v,e[2]=.25*v),e}function U(e,t,A,n){t[0]=n[12],t[1]=n[13],t[2]=n[14];var i=n[0],r=n[1],o=n[2],s=n[4],a=n[5],l=n[6],u=n[8],c=n[9],h=n[10];A[0]=Math.sqrt(i*i+r*r+o*o),A[1]=Math.sqrt(s*s+a*a+l*l),A[2]=Math.sqrt(u*u+c*c+h*h);var d=1/A[0],f=1/A[1],g=1/A[2],p=i*d,v=r*f,m=o*g,C=s*d,w=a*f,y=l*g,B=u*d,E=c*f,x=h*g,b=p+w+x,F=0;return b>0?(F=2*Math.sqrt(b+1),e[3]=.25*F,e[0]=(y-E)/F,e[1]=(B-m)/F,e[2]=(v-C)/F):p>w&&p>x?(F=2*Math.sqrt(1+p-w-x),e[3]=(y-E)/F,e[0]=.25*F,e[1]=(v+C)/F,e[2]=(B+m)/F):w>x?(F=2*Math.sqrt(1+w-p-x),e[3]=(B-m)/F,e[0]=(v+C)/F,e[1]=.25*F,e[2]=(y+E)/F):(F=2*Math.sqrt(1+x-p-w),e[3]=(v-C)/F,e[0]=(B+m)/F,e[1]=(y+E)/F,e[2]=.25*F),e}function O(e,t,A,n){var i=t[0],r=t[1],o=t[2],s=t[3],a=i+i,l=r+r,u=o+o,c=i*a,h=i*l,d=i*u,f=r*l,g=r*u,p=o*u,v=s*a,m=s*l,C=s*u,w=n[0],y=n[1],B=n[2];return e[0]=(1-(f+p))*w,e[1]=(h+C)*w,e[2]=(d-m)*w,e[3]=0,e[4]=(h-C)*y,e[5]=(1-(c+p))*y,e[6]=(g+v)*y,e[7]=0,e[8]=(d+m)*B,e[9]=(g-v)*B,e[10]=(1-(c+f))*B,e[11]=0,e[12]=A[0],e[13]=A[1],e[14]=A[2],e[15]=1,e}function H(e,t,A,n,i){var r=t[0],o=t[1],s=t[2],a=t[3],l=r+r,u=o+o,c=s+s,h=r*l,d=r*u,f=r*c,g=o*u,p=o*c,v=s*c,m=a*l,C=a*u,w=a*c,y=n[0],B=n[1],E=n[2],x=i[0],b=i[1],F=i[2],S=(1-(g+v))*y,T=(d+w)*y,L=(f-C)*y,Q=(d-w)*B,I=(1-(h+v))*B,U=(p+m)*B,O=(f+C)*E,H=(p-m)*E,M=(1-(h+g))*E;return e[0]=S,e[1]=T,e[2]=L,e[3]=0,e[4]=Q,e[5]=I,e[6]=U,e[7]=0,e[8]=O,e[9]=H,e[10]=M,e[11]=0,e[12]=A[0]+x-(S*x+Q*b+O*F),e[13]=A[1]+b-(T*x+I*b+H*F),e[14]=A[2]+F-(L*x+U*b+M*F),e[15]=1,e}function M(e,t){var A=t[0],n=t[1],i=t[2],r=t[3],o=A+A,s=n+n,a=i+i,l=A*o,u=n*o,c=n*s,h=i*o,d=i*s,f=i*a,g=r*o,p=r*s,v=r*a;return e[0]=1-c-f,e[1]=u+v,e[2]=h-p,e[3]=0,e[4]=u-v,e[5]=1-l-f,e[6]=d+g,e[7]=0,e[8]=h+p,e[9]=d-g,e[10]=1-l-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _(e,t,A,n,i,r,o){var s=1/(A-t),a=1/(i-n),l=1/(r-o);return e[0]=2*r*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*r*a,e[6]=0,e[7]=0,e[8]=(A+t)*s,e[9]=(i+n)*a,e[10]=(o+r)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*r*2*l,e[15]=0,e}function k(e,t,A,n,i){var r=1/Math.tan(t/2);if(e[0]=r/A,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0){var o=1/(n-i);e[10]=(i+n)*o,e[14]=2*i*n*o}else e[10]=-1,e[14]=-2*n;return e}var R=k;function N(e,t,A,n,i){var r=1/Math.tan(t/2);if(e[0]=r/A,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0){var o=1/(n-i);e[10]=i*o,e[14]=i*n*o}else e[10]=-1,e[14]=-n;return e}function D(e,t,A,n){var i=Math.tan(t.upDegrees*Math.PI/180),r=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),a=2/(o+s),l=2/(i+r);return e[0]=a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(o-s)*a*.5,e[9]=(i-r)*l*.5,e[10]=n/(A-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*A/(A-n),e[15]=0,e}function P(e,t,A,n,i,r,o){var s=1/(t-A),a=1/(n-i),l=1/(r-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+A)*s,e[13]=(i+n)*a,e[14]=(o+r)*l,e[15]=1,e}var G=P;function K(e,t,A,n,i,r,o){var s=1/(t-A),a=1/(n-i),l=1/(r-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=l,e[11]=0,e[12]=(t+A)*s,e[13]=(i+n)*a,e[14]=r*l,e[15]=1,e}function V(e,t,A,i){var r,o,s,a,u,c,h,d,f,g,p=t[0],v=t[1],m=t[2],C=i[0],w=i[1],y=i[2],B=A[0],E=A[1],x=A[2];return Math.abs(p-B)<n.p8&&Math.abs(v-E)<n.p8&&Math.abs(m-x)<n.p8?l(e):(h=p-B,d=v-E,f=m-x,r=w*(f*=g=1/Math.sqrt(h*h+d*d+f*f))-y*(d*=g),o=y*(h*=g)-C*f,s=C*d-w*h,(g=Math.sqrt(r*r+o*o+s*s))?(r*=g=1/g,o*=g,s*=g):(r=0,o=0,s=0),a=d*s-f*o,u=f*r-h*s,c=h*o-d*r,(g=Math.sqrt(a*a+u*u+c*c))?(a*=g=1/g,u*=g,c*=g):(a=0,u=0,c=0),e[0]=r,e[1]=a,e[2]=h,e[3]=0,e[4]=o,e[5]=u,e[6]=d,e[7]=0,e[8]=s,e[9]=c,e[10]=f,e[11]=0,e[12]=-(r*p+o*v+s*m),e[13]=-(a*p+u*v+c*m),e[14]=-(h*p+d*v+f*m),e[15]=1,e)}function z(e,t,A,n){var i=t[0],r=t[1],o=t[2],s=n[0],a=n[1],l=n[2],u=i-A[0],c=r-A[1],h=o-A[2],d=u*u+c*c+h*h;d>0&&(u*=d=1/Math.sqrt(d),c*=d,h*=d);var f=a*h-l*c,g=l*u-s*h,p=s*c-a*u;return(d=f*f+g*g+p*p)>0&&(f*=d=1/Math.sqrt(d),g*=d,p*=d),e[0]=f,e[1]=g,e[2]=p,e[3]=0,e[4]=c*p-h*g,e[5]=h*f-u*p,e[6]=u*g-c*f,e[7]=0,e[8]=u,e[9]=c,e[10]=h,e[11]=0,e[12]=i,e[13]=r,e[14]=o,e[15]=1,e}function W(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function j(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]+e[3]*e[3]+e[4]*e[4]+e[5]*e[5]+e[6]*e[6]+e[7]*e[7]+e[8]*e[8]+e[9]*e[9]+e[10]*e[10]+e[11]*e[11]+e[12]*e[12]+e[13]*e[13]+e[14]*e[14]+e[15]*e[15])}function X(e,t,A){return e[0]=t[0]+A[0],e[1]=t[1]+A[1],e[2]=t[2]+A[2],e[3]=t[3]+A[3],e[4]=t[4]+A[4],e[5]=t[5]+A[5],e[6]=t[6]+A[6],e[7]=t[7]+A[7],e[8]=t[8]+A[8],e[9]=t[9]+A[9],e[10]=t[10]+A[10],e[11]=t[11]+A[11],e[12]=t[12]+A[12],e[13]=t[13]+A[13],e[14]=t[14]+A[14],e[15]=t[15]+A[15],e}function Y(e,t,A){return e[0]=t[0]-A[0],e[1]=t[1]-A[1],e[2]=t[2]-A[2],e[3]=t[3]-A[3],e[4]=t[4]-A[4],e[5]=t[5]-A[5],e[6]=t[6]-A[6],e[7]=t[7]-A[7],e[8]=t[8]-A[8],e[9]=t[9]-A[9],e[10]=t[10]-A[10],e[11]=t[11]-A[11],e[12]=t[12]-A[12],e[13]=t[13]-A[13],e[14]=t[14]-A[14],e[15]=t[15]-A[15],e}function q(e,t,A){return e[0]=t[0]*A,e[1]=t[1]*A,e[2]=t[2]*A,e[3]=t[3]*A,e[4]=t[4]*A,e[5]=t[5]*A,e[6]=t[6]*A,e[7]=t[7]*A,e[8]=t[8]*A,e[9]=t[9]*A,e[10]=t[10]*A,e[11]=t[11]*A,e[12]=t[12]*A,e[13]=t[13]*A,e[14]=t[14]*A,e[15]=t[15]*A,e}function Z(e,t,A,n){return e[0]=t[0]+A[0]*n,e[1]=t[1]+A[1]*n,e[2]=t[2]+A[2]*n,e[3]=t[3]+A[3]*n,e[4]=t[4]+A[4]*n,e[5]=t[5]+A[5]*n,e[6]=t[6]+A[6]*n,e[7]=t[7]+A[7]*n,e[8]=t[8]+A[8]*n,e[9]=t[9]+A[9]*n,e[10]=t[10]+A[10]*n,e[11]=t[11]+A[11]*n,e[12]=t[12]+A[12]*n,e[13]=t[13]+A[13]*n,e[14]=t[14]+A[14]*n,e[15]=t[15]+A[15]*n,e}function J(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function $(e,t){var A=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],g=e[12],p=e[13],v=e[14],m=e[15],C=t[0],w=t[1],y=t[2],B=t[3],E=t[4],x=t[5],b=t[6],F=t[7],S=t[8],T=t[9],L=t[10],Q=t[11],I=t[12],U=t[13],O=t[14],H=t[15];return Math.abs(A-C)<=n.p8*Math.max(1,Math.abs(A),Math.abs(C))&&Math.abs(i-w)<=n.p8*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(r-y)<=n.p8*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(o-B)<=n.p8*Math.max(1,Math.abs(o),Math.abs(B))&&Math.abs(s-E)<=n.p8*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(a-x)<=n.p8*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(l-b)<=n.p8*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(u-F)<=n.p8*Math.max(1,Math.abs(u),Math.abs(F))&&Math.abs(c-S)<=n.p8*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(h-T)<=n.p8*Math.max(1,Math.abs(h),Math.abs(T))&&Math.abs(d-L)<=n.p8*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(f-Q)<=n.p8*Math.max(1,Math.abs(f),Math.abs(Q))&&Math.abs(g-I)<=n.p8*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(p-U)<=n.p8*Math.max(1,Math.abs(p),Math.abs(U))&&Math.abs(v-O)<=n.p8*Math.max(1,Math.abs(v),Math.abs(O))&&Math.abs(m-H)<=n.p8*Math.max(1,Math.abs(m),Math.abs(H))}var ee=f,te=Y},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/quat.js"(e,t,A){"use strict";A.d(t,{A6:()=>c,B8:()=>u,C:()=>d,S8:()=>p,fA:()=>h,hZ:()=>f,lK:()=>g,lw:()=>l,vt:()=>s,x8:()=>a});var n=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js"),i=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/mat3.js"),r=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec3.js"),o=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec4.js");function s(){var e=new n.tb(4);return n.tb!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function a(e,t,A){A*=.5;var n=Math.sin(A);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(A),e}function l(e,t,A){var n=t[0],i=t[1],r=t[2],o=t[3],s=A[0],a=A[1],l=A[2],u=A[3];return e[0]=n*u+o*s+i*l-r*a,e[1]=i*u+o*a+r*s-n*l,e[2]=r*u+o*l+n*a-i*s,e[3]=o*u-n*s-i*a-r*l,e}function u(e,t){var A=t[0],n=t[1],i=t[2],r=t[3],o=A*A+n*n+i*i+r*r,s=o?1/o:0;return e[0]=-A*s,e[1]=-n*s,e[2]=-i*s,e[3]=r*s,e}function c(e,t,A,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.bw,o=Math.PI/360;t*=o,i*=o,A*=o;var s=Math.sin(t),a=Math.cos(t),l=Math.sin(A),u=Math.cos(A),c=Math.sin(i),h=Math.cos(i);switch(r){case"xyz":e[0]=s*u*h+a*l*c,e[1]=a*l*h-s*u*c,e[2]=a*u*c+s*l*h,e[3]=a*u*h-s*l*c;break;case"xzy":e[0]=s*u*h-a*l*c,e[1]=a*l*h-s*u*c,e[2]=a*u*c+s*l*h,e[3]=a*u*h+s*l*c;break;case"yxz":e[0]=s*u*h+a*l*c,e[1]=a*l*h-s*u*c,e[2]=a*u*c-s*l*h,e[3]=a*u*h+s*l*c;break;case"yzx":e[0]=s*u*h+a*l*c,e[1]=a*l*h+s*u*c,e[2]=a*u*c-s*l*h,e[3]=a*u*h-s*l*c;break;case"zxy":e[0]=s*u*h-a*l*c,e[1]=a*l*h+s*u*c,e[2]=a*u*c+s*l*h,e[3]=a*u*h-s*l*c;break;case"zyx":e[0]=s*u*h-a*l*c,e[1]=a*l*h+s*u*c,e[2]=a*u*c-s*l*h,e[3]=a*u*h+s*l*c;break;default:throw new Error("Unknown angle order "+r)}return e}var h=o.fA,d=o.C,f=o.hZ,g=l,p=o.S8;r.vt(),r.fA(1,0,0),r.fA(0,1,0),s(),s(),i.vt()},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec2.js"(e,t,A){"use strict";A.d(t,{C:()=>r,Om:()=>a,S8:()=>s,hZ:()=>o,t2:()=>l,vt:()=>i});var n=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js");function i(){var e=new n.tb(2);return n.tb!=Float32Array&&(e[0]=0,e[1]=0),e}function r(e,t){return e[0]=t[0],e[1]=t[1],e}function o(e,t,A){return e[0]=t,e[1]=A,e}function s(e,t){var A=t[0],n=t[1],i=A*A+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function a(e,t){return e[0]*t[0]+e[1]*t[1]}function l(e,t){return e[0]===t[0]&&e[1]===t[1]}i()},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec3.js"(e,t,A){"use strict";A.d(t,{$A:()=>m,Bw:()=>o,C:()=>a,Cc:()=>C,Il:()=>F,Om:()=>v,Re:()=>c,S8:()=>p,T9:()=>f,WQ:()=>u,Z0:()=>w,aI:()=>E,ei:()=>y,fA:()=>s,gL:()=>B,hZ:()=>l,hs:()=>g,jb:()=>x,jk:()=>d,lw:()=>h,o8:()=>r,vt:()=>i,xg:()=>b});var n=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js");function i(){var e=new n.tb(3);return n.tb!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function r(e){var t=new n.tb(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(e){var t=e[0],A=e[1],n=e[2];return Math.sqrt(t*t+A*A+n*n)}function s(e,t,A){var i=new n.tb(3);return i[0]=e,i[1]=t,i[2]=A,i}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,A,n){return e[0]=t,e[1]=A,e[2]=n,e}function u(e,t,A){return e[0]=t[0]+A[0],e[1]=t[1]+A[1],e[2]=t[2]+A[2],e}function c(e,t,A){return e[0]=t[0]-A[0],e[1]=t[1]-A[1],e[2]=t[2]-A[2],e}function h(e,t,A){return e[0]=t[0]*A[0],e[1]=t[1]*A[1],e[2]=t[2]*A[2],e}function d(e,t,A){return e[0]=Math.min(t[0],A[0]),e[1]=Math.min(t[1],A[1]),e[2]=Math.min(t[2],A[2]),e}function f(e,t,A){return e[0]=Math.max(t[0],A[0]),e[1]=Math.max(t[1],A[1]),e[2]=Math.max(t[2],A[2]),e}function g(e,t,A){return e[0]=t[0]*A,e[1]=t[1]*A,e[2]=t[2]*A,e}function p(e,t){var A=t[0],n=t[1],i=t[2],r=A*A+n*n+i*i;return r>0&&(r=1/Math.sqrt(r)),e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function v(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function m(e,t,A){var n=t[0],i=t[1],r=t[2],o=A[0],s=A[1],a=A[2];return e[0]=i*a-r*s,e[1]=r*o-n*a,e[2]=n*s-i*o,e}function C(e,t,A,n){var i=t[0],r=t[1],o=t[2];return e[0]=i+n*(A[0]-i),e[1]=r+n*(A[1]-r),e[2]=o+n*(A[2]-o),e}function w(e,t,A){var n=t[0],i=t[1],r=t[2],o=A[3]*n+A[7]*i+A[11]*r+A[15];return e[0]=(A[0]*n+A[4]*i+A[8]*r+A[12])/(o=o||1),e[1]=(A[1]*n+A[5]*i+A[9]*r+A[13])/o,e[2]=(A[2]*n+A[6]*i+A[10]*r+A[14])/o,e}function y(e,t,A){var n=t[0],i=t[1],r=t[2];return e[0]=n*A[0]+i*A[3]+r*A[6],e[1]=n*A[1]+i*A[4]+r*A[7],e[2]=n*A[2]+i*A[5]+r*A[8],e}function B(e,t,A){var n=A[0],i=A[1],r=A[2],o=A[3],s=t[0],a=t[1],l=t[2],u=i*l-r*a,c=r*s-n*l,h=n*a-i*s;return e[0]=s+o*(u+=u)+i*(h+=h)-r*(c+=c),e[1]=a+o*c+r*u-n*h,e[2]=l+o*h+n*c-i*u,e}function E(e,t){var A=e[0],i=e[1],r=e[2],o=t[0],s=t[1],a=t[2];return Math.abs(A-o)<=n.p8*Math.max(1,Math.abs(A),Math.abs(o))&&Math.abs(i-s)<=n.p8*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(r-a)<=n.p8*Math.max(1,Math.abs(r),Math.abs(a))}var x=c,b=function(e,t){var A=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(A*A+n*n+i*i)},F=o;i()},"./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/vec4.js"(e,t,A){"use strict";A.d(t,{Bw:()=>c,C:()=>s,Cc:()=>g,Om:()=>f,S8:()=>d,WQ:()=>l,Z0:()=>p,fA:()=>o,hZ:()=>a,hs:()=>u,m3:()=>h,o8:()=>r,t2:()=>v,vt:()=>i});var n=A("./node_modules/.pnpm/gl-matrix@3.4.4/node_modules/gl-matrix/esm/common.js");function i(){var e=new n.tb(4);return n.tb!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function r(e){var t=new n.tb(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(e,t,A,i){var r=new n.tb(4);return r[0]=e,r[1]=t,r[2]=A,r[3]=i,r}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,A,n,i){return e[0]=t,e[1]=A,e[2]=n,e[3]=i,e}function l(e,t,A){return e[0]=t[0]+A[0],e[1]=t[1]+A[1],e[2]=t[2]+A[2],e[3]=t[3]+A[3],e}function u(e,t,A){return e[0]=t[0]*A,e[1]=t[1]*A,e[2]=t[2]*A,e[3]=t[3]*A,e}function c(e){var t=e[0],A=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+A*A+n*n+i*i)}function h(e){var t=e[0],A=e[1],n=e[2],i=e[3];return t*t+A*A+n*n+i*i}function d(e,t){var A=t[0],n=t[1],i=t[2],r=t[3],o=A*A+n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o)),e[0]=A*o,e[1]=n*o,e[2]=i*o,e[3]=r*o,e}function f(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function g(e,t,A,n){var i=t[0],r=t[1],o=t[2],s=t[3];return e[0]=i+n*(A[0]-i),e[1]=r+n*(A[1]-r),e[2]=o+n*(A[2]-o),e[3]=s+n*(A[3]-s),e}function p(e,t,A){var n=t[0],i=t[1],r=t[2],o=t[3];return e[0]=A[0]*n+A[4]*i+A[8]*r+A[12]*o,e[1]=A[1]*n+A[5]*i+A[9]*r+A[13]*o,e[2]=A[2]*n+A[6]*i+A[10]*r+A[14]*o,e[3]=A[3]*n+A[7]*i+A[11]*r+A[15]*o,e}function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}i()},"./node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.js"(e){e.exports=function(){"use strict";var e=function(t,A){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])},e(t,A)};function t(t,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function n(){this.constructor=t}e(t,A),t.prototype=null===A?Object.create(A):(n.prototype=A.prototype,new n)}var A=function(){return A=Object.assign||function(e){for(var t,A=1,n=arguments.length;A<n;A++)for(var i in t=arguments[A])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},A.apply(this,arguments)};function n(e,t,A,n){return new(A||(A=Promise))(function(i,r){function o(e){try{a(n.next(e))}catch(e){r(e)}}function s(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof A?t:new A(function(e){e(t)})).then(o,s)}a((n=n.apply(e,t||[])).next())})}function i(e,t){var A,n,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(A)throw new TypeError("Generator is already executing.");for(;o;)try{if(A=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(6===r[0]&&o.label<i[1]){o.label=i[1],i=r;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(r);break}i[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{A=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function r(e,t,A){if(A||2===arguments.length)for(var n,i=0,r=t.length;i<r;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||t)}for(var o=function(){function e(e,t,A,n){this.left=e,this.top=t,this.width=A,this.height=n}return e.prototype.add=function(t,A,n,i){return new e(this.left+t,this.top+A,this.width+n,this.height+i)},e.fromClientRect=function(t,A){return new e(A.left+t.windowBounds.left,A.top+t.windowBounds.top,A.width,A.height)},e.fromDOMRectList=function(t,A){var n=Array.from(A).find(function(e){return 0!==e.width});return n?new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return o.fromClientRect(e,t.getBoundingClientRect())},a=function(e){for(var t=[],A=0,n=e.length;A<n;){var i=e.charCodeAt(A++);if(i>=55296&&i<=56319&&A<n){var r=e.charCodeAt(A++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),A--)}else t.push(i)}return t},l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var A=e.length;if(!A)return"";for(var n=[],i=-1,r="";++i<A;){var o=e[i];o<=65535?n.push(o):n.push(55296+((o-=65536)>>10),o%1024+56320),(i+1===A||n.length>16384)&&(r+=String.fromCharCode.apply(String,n),n.length=0)}return r},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),h=0;h<64;h++)c[u.charCodeAt(h)]=h;for(var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"==typeof Uint8Array?[]:new Uint8Array(256),g=0;g<64;g++)f[d.charCodeAt(g)]=g;for(var p=function(e,t,A){return e.slice?e.slice(t,A):new Uint16Array(Array.prototype.slice.call(e,t,A))},v=function(){function e(e,t,A,n,i,r){this.initialValue=e,this.errorValue=t,this.highStart=A,this.highValueIndex=n,this.index=i,this.data=r}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return this.data[t=((t=this.index[e>>5])<<2)+(31&e)];if(e<=65535)return this.data[t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e)];if(e<this.highStart)return t=this.index[t=2080+(e>>11)],this.data[t=((t=this.index[t+=e>>5&63])<<2)+(31&e)];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C="undefined"==typeof Uint8Array?[]:new Uint8Array(256),w=0;w<64;w++)C[m.charCodeAt(w)]=w;var y=10,B=13,E=15,x=17,b=18,F=19,S=20,T=21,L=22,Q=24,I=25,U=26,O=27,H=28,M=30,_=32,k=33,R=34,N=35,D=37,P=38,G=39,K=40,V=42,z=[9001,65288],W="×",j="÷",X=function(e){var t,A,n,i=function(e){var t,A,n,i,r,o=.75*e.length,s=e.length,a=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),u=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)A=f[e.charCodeAt(t)],n=f[e.charCodeAt(t+1)],i=f[e.charCodeAt(t+2)],r=f[e.charCodeAt(t+3)],u[a++]=A<<2|n>>4,u[a++]=(15&n)<<4|i>>2,u[a++]=(3&i)<<6|63&r;return l}(e),r=Array.isArray(i)?function(e){for(var t=e.length,A=[],n=0;n<t;n+=4)A.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return A}(i):new Uint32Array(i),o=Array.isArray(i)?function(e){for(var t=e.length,A=[],n=0;n<t;n+=2)A.push(e[n+1]<<8|e[n]);return A}(i):new Uint16Array(i),s=p(o,12,r[4]/2),a=2===r[5]?p(o,(24+r[4])/2):(t=r,A=Math.ceil((24+r[4])/4),t.slice?t.slice(A,n):new Uint32Array(Array.prototype.slice.call(t,A,n)));return new v(r[0],r[1],r[2],r[3],s,a)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),Y=[M,36],q=[1,2,3,5],Z=[y,8],J=[O,U],$=q.concat(Z),ee=[P,G,K,R,N],te=[E,B],Ae=function(e,t,A,n){var i=n[A];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var r=A;r<=n.length;){if((a=n[++r])===t)return!0;if(a!==y)break}if(i===y)for(r=A;r>0;){var o=n[--r];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var s=A;s<=n.length;){var a;if((a=n[++s])===t)return!0;if(a!==y)break}if(o!==y)break}return!1},ne=function(e,t){for(var A=e;A>=0;){var n=t[A];if(n!==y)return n;A--}return 0},ie=function(e,t,A,n,i){if(0===A[n])return W;var r=n-1;if(Array.isArray(i)&&!0===i[r])return W;var o=r-1,s=r+1,a=t[r],l=o>=0?t[o]:0,u=t[s];if(2===a&&3===u)return W;if(-1!==q.indexOf(a))return"!";if(-1!==q.indexOf(u))return W;if(-1!==Z.indexOf(u))return W;if(8===ne(r,t))return j;if(11===X.get(e[r]))return W;if((a===_||a===k)&&11===X.get(e[s]))return W;if(7===a||7===u)return W;if(9===a)return W;if(-1===[y,B,E].indexOf(a)&&9===u)return W;if(-1!==[x,b,F,Q,H].indexOf(u))return W;if(ne(r,t)===L)return W;if(Ae(23,L,r,t))return W;if(Ae([x,b],T,r,t))return W;if(Ae(12,12,r,t))return W;if(a===y)return j;if(23===a||23===u)return W;if(16===u||16===a)return j;if(-1!==[B,E,T].indexOf(u)||14===a)return W;if(36===l&&-1!==te.indexOf(a))return W;if(a===H&&36===u)return W;if(u===S)return W;if(-1!==Y.indexOf(u)&&a===I||-1!==Y.indexOf(a)&&u===I)return W;if(a===O&&-1!==[D,_,k].indexOf(u)||-1!==[D,_,k].indexOf(a)&&u===U)return W;if(-1!==Y.indexOf(a)&&-1!==J.indexOf(u)||-1!==J.indexOf(a)&&-1!==Y.indexOf(u))return W;if(-1!==[O,U].indexOf(a)&&(u===I||-1!==[L,E].indexOf(u)&&t[s+1]===I)||-1!==[L,E].indexOf(a)&&u===I||a===I&&-1!==[I,H,Q].indexOf(u))return W;if(-1!==[I,H,Q,x,b].indexOf(u))for(var c=r;c>=0;){if((h=t[c])===I)return W;if(-1===[H,Q].indexOf(h))break;c--}if(-1!==[O,U].indexOf(u))for(c=-1!==[x,b].indexOf(a)?o:r;c>=0;){var h;if((h=t[c])===I)return W;if(-1===[H,Q].indexOf(h))break;c--}if(P===a&&-1!==[P,G,R,N].indexOf(u)||-1!==[G,R].indexOf(a)&&-1!==[G,K].indexOf(u)||-1!==[K,N].indexOf(a)&&u===K)return W;if(-1!==ee.indexOf(a)&&-1!==[S,U].indexOf(u)||-1!==ee.indexOf(u)&&a===O)return W;if(-1!==Y.indexOf(a)&&-1!==Y.indexOf(u))return W;if(a===Q&&-1!==Y.indexOf(u))return W;if(-1!==Y.concat(I).indexOf(a)&&u===L&&-1===z.indexOf(e[s])||-1!==Y.concat(I).indexOf(u)&&a===b)return W;if(41===a&&41===u){for(var d=A[r],f=1;d>0&&41===t[--d];)f++;if(f%2!=0)return W}return a===_&&u===k?W:j},re=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var A=function(e,t){void 0===t&&(t="strict");var A=[],n=[],i=[];return e.forEach(function(e,r){var o=X.get(e);if(o>50?(i.push(!0),o-=50):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return n.push(r),A.push(16);if(4===o||11===o){if(0===r)return n.push(r),A.push(M);var s=A[r-1];return-1===$.indexOf(s)?(n.push(n[r-1]),A.push(s)):(n.push(r),A.push(M))}return n.push(r),31===o?A.push("strict"===t?T:D):o===V||29===o?A.push(M):43===o?A.push(e>=131072&&e<=196605||e>=196608&&e<=262141?D:M):void A.push(o)}),[n,A,i]}(e,t.lineBreak),n=A[0],i=A[1],r=A[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map(function(e){return-1!==[I,M,V].indexOf(e)?D:e}));var o="keep-all"===t.wordBreak?r.map(function(t,A){return t&&e[A]>=19968&&e[A]<=40959}):void 0;return[n,i,o]},oe=function(){function e(e,t,A,n){this.codePoints=e,this.required="!"===t,this.start=A,this.end=n}return e.prototype.slice=function(){return l.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),se=45,ae=43,le=-1,ue=function(e){return e>=48&&e<=57},ce=function(e){return ue(e)||e>=65&&e<=70||e>=97&&e<=102},he=function(e){return 10===e||9===e||32===e},de=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},fe=function(e){return de(e)||ue(e)||e===se},ge=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},pe=function(e,t){return 92===e&&10!==t},ve=function(e,t,A){return e===se?de(t)||pe(t,A):!!de(e)||!(92!==e||!pe(e,t))},me=function(e,t,A){return e===ae||e===se?!!ue(t)||46===t&&ue(A):ue(46===e?t:e)},Ce=function(e){var t=0,A=1;e[t]!==ae&&e[t]!==se||(e[t]===se&&(A=-1),t++);for(var n=[];ue(e[t]);)n.push(e[t++]);var i=n.length?parseInt(l.apply(void 0,n),10):0;46===e[t]&&t++;for(var r=[];ue(e[t]);)r.push(e[t++]);var o=r.length,s=o?parseInt(l.apply(void 0,r),10):0;69!==e[t]&&101!==e[t]||t++;var a=1;e[t]!==ae&&e[t]!==se||(e[t]===se&&(a=-1),t++);for(var u=[];ue(e[t]);)u.push(e[t++]);var c=u.length?parseInt(l.apply(void 0,u),10):0;return A*(i+s*Math.pow(10,-o))*Math.pow(10,a*c)},we={type:2},ye={type:3},Be={type:4},Ee={type:13},xe={type:8},be={type:21},Fe={type:9},Se={type:10},Te={type:11},Le={type:12},Qe={type:14},Ie={type:23},Ue={type:1},Oe={type:25},He={type:24},Me={type:26},_e={type:27},ke={type:28},Re={type:29},Ne={type:31},De={type:32},Pe=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(a(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==De;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),A=this.peekCodePoint(1),n=this.peekCodePoint(2);if(fe(t)||pe(A,n)){var i=ve(t,A,n)?2:1;return{type:5,value:this.consumeName(),flags:i}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ee;break;case 39:return this.consumeStringToken(39);case 40:return we;case 41:return ye;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Qe;break;case ae:if(me(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Be;case se:var r=e,o=this.peekCodePoint(0),s=this.peekCodePoint(1);if(me(r,o,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(ve(r,o,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===se&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),He;break;case 46:if(me(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var a=this.consumeCodePoint();if(42===a&&47===(a=this.consumeCodePoint()))return this.consumeToken();if(a===le)return this.consumeToken()}break;case 58:return Me;case 59:return _e;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===se&&this.peekCodePoint(2)===se)return this.consumeCodePoint(),this.consumeCodePoint(),Oe;break;case 64:var u=this.peekCodePoint(0),c=this.peekCodePoint(1),h=this.peekCodePoint(2);if(ve(u,c,h))return{type:7,value:this.consumeName()};break;case 91:return ke;case 92:if(pe(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Re;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),xe;break;case 123:return Te;case 125:return Le;case 117:case 85:var d=this.peekCodePoint(0),f=this.peekCodePoint(1);return d!==ae||!ce(f)&&63!==f||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Fe;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),be;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Se;break;case le:return De}return he(e)?(this.consumeWhiteSpace(),Ne):ue(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):de(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:l(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();ce(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var A=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),A=!0;if(A)return{type:30,start:parseInt(l.apply(void 0,e.map(function(e){return 63===e?48:e})),16),end:parseInt(l.apply(void 0,e.map(function(e){return 63===e?70:e})),16)};var n=parseInt(l.apply(void 0,e),16);if(this.peekCodePoint(0)===se&&ce(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];ce(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();return{type:30,start:n,end:parseInt(l.apply(void 0,i),16)}}return{type:30,start:n,end:n}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===le)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var A=this.consumeStringToken(this.consumeCodePoint());return 0===A.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===le||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:A.value}):(this.consumeBadUrlRemnants(),Ie)}for(;;){var n=this.consumeCodePoint();if(n===le||41===n)return{type:22,value:l.apply(void 0,e)};if(he(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===le||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:l.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Ie);if(34===n||39===n||40===n||ge(n))return this.consumeBadUrlRemnants(),Ie;if(92===n){if(!pe(n,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Ie;e.push(this.consumeEscapedCodePoint())}else e.push(n)}},e.prototype.consumeWhiteSpace=function(){for(;he(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===le)return;pe(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var A=Math.min(5e4,e);t+=l.apply(void 0,this._value.splice(0,A)),e-=A}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",A=0;;){var n=this._value[A];if(n===le||void 0===n||n===e)return{type:0,value:t+=this.consumeStringSlice(A)};if(10===n)return this._value.splice(0,A),Ue;if(92===n){var i=this._value[A+1];i!==le&&void 0!==i&&(10===i?(t+=this.consumeStringSlice(A),A=-1,this._value.shift()):pe(n,i)&&(t+=this.consumeStringSlice(A),t+=l(this.consumeEscapedCodePoint()),A=-1))}A++}},e.prototype.consumeNumber=function(){var e=[],t=4,A=this.peekCodePoint(0);for(A!==ae&&A!==se||e.push(this.consumeCodePoint());ue(this.peekCodePoint(0));)e.push(this.consumeCodePoint());A=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(46===A&&ue(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;ue(this.peekCodePoint(0));)e.push(this.consumeCodePoint());A=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((69===A||101===A)&&((n===ae||n===se)&&ue(i)||ue(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;ue(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Ce(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],A=e[1],n=this.peekCodePoint(0),i=this.peekCodePoint(1),r=this.peekCodePoint(2);return ve(n,i,r)?{type:15,number:t,flags:A,unit:this.consumeName()}:37===n?(this.consumeCodePoint(),{type:16,number:t,flags:A}):{type:17,number:t,flags:A}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(ce(e)){for(var t=l(e);ce(this.peekCodePoint(0))&&t.length<6;)t+=l(this.consumeCodePoint());he(this.peekCodePoint(0))&&this.consumeCodePoint();var A=parseInt(t,16);return 0===A||function(e){return e>=55296&&e<=57343}(A)||A>1114111?65533:A}return e===le?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(fe(t))e+=l(t);else{if(!pe(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=l(this.consumeEscapedCodePoint())}}},e}(),Ge=function(){function e(e){this._tokens=e}return e.create=function(t){var A=new Pe;return A.write(t),new e(A.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},A=this.consumeToken();;){if(32===A.type||Ze(A,e))return t;this.reconsumeToken(A),t.values.push(this.consumeComponentValue()),A=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var A=this.consumeToken();if(32===A.type||3===A.type)return t;this.reconsumeToken(A),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?De:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Ke=function(e){return 15===e.type},Ve=function(e){return 17===e.type},ze=function(e){return 20===e.type},We=function(e){return 0===e.type},je=function(e,t){return ze(e)&&e.value===t},Xe=function(e){return 31!==e.type},Ye=function(e){return 31!==e.type&&4!==e.type},qe=function(e){var t=[],A=[];return e.forEach(function(e){if(4===e.type){if(0===A.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(A),void(A=[])}31!==e.type&&A.push(e)}),A.length&&t.push(A),t},Ze=function(e,t){return 11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type},Je=function(e){return 17===e.type||15===e.type},$e=function(e){return 16===e.type||Je(e)},et=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},tt={type:17,number:0,flags:4},At={type:16,number:50,flags:4},nt={type:16,number:100,flags:4},it=function(e,t,A){var n=e[0],i=e[1];return[rt(n,t),rt(void 0!==i?i:n,A)]},rt=function(e,t){if(16===e.type)return e.number/100*t;if(Ke(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},ot="grad",st="turn",at=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case ot:return Math.PI/200*t.number;case"rad":return t.number;case st:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},lt=function(e){return 15===e.type&&("deg"===e.unit||e.unit===ot||"rad"===e.unit||e.unit===st)},ut=function(e){switch(e.filter(ze).map(function(e){return e.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[tt,tt];case"to top":case"bottom":return ct(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[tt,nt];case"to right":case"left":return ct(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[nt,nt];case"to bottom":case"top":return ct(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[nt,tt];case"to left":case"right":return ct(270)}return 0},ct=function(e){return Math.PI*e/180},ht=function(e,t){if(18===t.type){var A=wt[t.name];if(void 0===A)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return A(e,t.values)}if(5===t.type){if(3===t.value.length){var n=t.value.substring(0,1),i=t.value.substring(1,2),r=t.value.substring(2,3);return gt(parseInt(n+n,16),parseInt(i+i,16),parseInt(r+r,16),1)}if(4===t.value.length){n=t.value.substring(0,1),i=t.value.substring(1,2),r=t.value.substring(2,3);var o=t.value.substring(3,4);return gt(parseInt(n+n,16),parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16)/255)}if(6===t.value.length)return n=t.value.substring(0,2),i=t.value.substring(2,4),r=t.value.substring(4,6),gt(parseInt(n,16),parseInt(i,16),parseInt(r,16),1);if(8===t.value.length)return n=t.value.substring(0,2),i=t.value.substring(2,4),r=t.value.substring(4,6),o=t.value.substring(6,8),gt(parseInt(n,16),parseInt(i,16),parseInt(r,16),parseInt(o,16)/255)}if(20===t.type){var s=Bt[t.value.toUpperCase()];if(void 0!==s)return s}return Bt.TRANSPARENT},dt=function(e){return!(255&e)},ft=function(e){var t=255&e,A=255&e>>8,n=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+n+","+A+","+t/255+")":"rgb("+i+","+n+","+A+")"},gt=function(e,t,A,n){return(e<<24|t<<16|A<<8|Math.round(255*n))>>>0},pt=function(e,t){if(17===e.type)return e.number;if(16===e.type){var A=3===t?1:255;return 3===t?e.number/100*A:Math.round(e.number/100*A)}return 0},vt=function(e,t){var A=t.filter(Ye);if(3===A.length){var n=A.map(pt);return gt(n[0],n[1],n[2],1)}if(4===A.length){var i=A.map(pt);return gt(i[0],i[1],i[2],i[3])}return 0};function mt(e,t,A){return A<0&&(A+=1),A>=1&&(A-=1),A<1/6?(t-e)*A*6+e:A<.5?t:A<2/3?6*(t-e)*(2/3-A)+e:e}var Ct=function(e,t){var A=t.filter(Ye),n=A[0],i=A[1],r=A[2],o=A[3],s=(17===n.type?ct(n.number):at(e,n))/(2*Math.PI),a=$e(i)?i.number/100:0,l=$e(r)?r.number/100:0,u=void 0!==o&&$e(o)?rt(o,1):1;if(0===a)return gt(255*l,255*l,255*l,1);var c=l<=.5?l*(a+1):l+a-l*a,h=2*l-c,d=mt(h,c,s+1/3),f=mt(h,c,s),g=mt(h,c,s-1/3);return gt(255*d,255*f,255*g,u)},wt={hsl:Ct,hsla:Ct,rgb:vt,rgba:vt},yt=function(e,t){return ht(e,Ge.create(t).parseComponentValue())},Bt={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Et={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(ze(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},xt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bt=function(e,t){var A=ht(e,t[0]),n=t[1];return n&&$e(n)?{color:A,stop:n}:{color:A,stop:null}},Ft=function(e,t){var A=e[0],n=e[e.length-1];null===A.stop&&(A.stop=tt),null===n.stop&&(n.stop=nt);for(var i=[],r=0,o=0;o<e.length;o++){var s=e[o].stop;if(null!==s){var a=rt(s,t);i.push(a>r?a:r),r=a}else i.push(null)}var l=null;for(o=0;o<i.length;o++){var u=i[o];if(null===u)null===l&&(l=o);else if(null!==l){for(var c=o-l,h=(u-i[l-1])/(c+1),d=1;d<=c;d++)i[l+d-1]=h*d;l=null}}return e.map(function(e,A){return{color:e.color,stop:Math.max(Math.min(1,i[A]/t),0)}})},St=function(e,t,A){var n="number"==typeof e?e:function(e,t,A){var n=t/2,i=A/2,r=rt(e[0],t)-n,o=i-rt(e[1],A);return(Math.atan2(o,r)+2*Math.PI)%(2*Math.PI)}(e,t,A),i=Math.abs(t*Math.sin(n))+Math.abs(A*Math.cos(n)),r=t/2,o=A/2,s=i/2,a=Math.sin(n-Math.PI/2)*s,l=Math.cos(n-Math.PI/2)*s;return[i,r-l,r+l,o-a,o+a]},Tt=function(e,t){return Math.sqrt(e*e+t*t)},Lt=function(e,t,A,n,i){return[[0,0],[0,t],[e,0],[e,t]].reduce(function(e,t){var r=Tt(A-t[0],n-t[1]);return(i?r<e.optimumDistance:r>e.optimumDistance)?{optimumCorner:t,optimumDistance:r}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Qt=function(e,t){var A=ct(180),n=[];return qe(t).forEach(function(t,i){if(0===i){var r=t[0];if(20===r.type&&-1!==["top","left","right","bottom"].indexOf(r.value))return void(A=ut(t));if(lt(r))return void(A=(at(e,r)+ct(270))%ct(360))}var o=bt(e,t);n.push(o)}),{angle:A,stops:n,type:1}},It="closest-side",Ut="farthest-side",Ot="closest-corner",Ht="farthest-corner",Mt="circle",_t="ellipse",kt="cover",Rt="contain",Nt=function(e,t){var A=0,n=3,i=[],r=[];return qe(t).forEach(function(t,o){var s=!0;if(0===o?s=t.reduce(function(e,t){if(ze(t))switch(t.value){case"center":return r.push(At),!1;case"top":case"left":return r.push(tt),!1;case"right":case"bottom":return r.push(nt),!1}else if($e(t)||Je(t))return r.push(t),!1;return e},s):1===o&&(s=t.reduce(function(e,t){if(ze(t))switch(t.value){case Mt:return A=0,!1;case _t:return A=1,!1;case Rt:case It:return n=0,!1;case Ut:return n=1,!1;case Ot:return n=2,!1;case kt:case Ht:return n=3,!1}else if(Je(t)||$e(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e},s)),s){var a=bt(e,t);i.push(a)}}),{size:n,shape:A,stops:i,position:r,type:2}},Dt=function(e,t){if(22===t.type){var A={url:t.value,type:0};return e.cache.addImage(t.value),A}if(18===t.type){var n=Gt[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return n(e,t.values)}throw new Error("Unsupported image type "+t.type)};var Pt,Gt={"linear-gradient":function(e,t){var A=ct(180),n=[];return qe(t).forEach(function(t,i){if(0===i){var r=t[0];if(20===r.type&&"to"===r.value)return void(A=ut(t));if(lt(r))return void(A=at(e,r))}var o=bt(e,t);n.push(o)}),{angle:A,stops:n,type:1}},"-moz-linear-gradient":Qt,"-ms-linear-gradient":Qt,"-o-linear-gradient":Qt,"-webkit-linear-gradient":Qt,"radial-gradient":function(e,t){var A=0,n=3,i=[],r=[];return qe(t).forEach(function(t,o){var s=!0;if(0===o){var a=!1;s=t.reduce(function(e,t){if(a)if(ze(t))switch(t.value){case"center":return r.push(At),e;case"top":case"left":return r.push(tt),e;case"right":case"bottom":return r.push(nt),e}else($e(t)||Je(t))&&r.push(t);else if(ze(t))switch(t.value){case Mt:return A=0,!1;case _t:return A=1,!1;case"at":return a=!0,!1;case It:return n=0,!1;case kt:case Ut:return n=1,!1;case Rt:case Ot:return n=2,!1;case Ht:return n=3,!1}else if(Je(t)||$e(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e},s)}if(s){var l=bt(e,t);i.push(l)}}),{size:n,shape:A,stops:i,position:r,type:2}},"-moz-radial-gradient":Nt,"-ms-radial-gradient":Nt,"-o-radial-gradient":Nt,"-webkit-radial-gradient":Nt,"-webkit-gradient":function(e,t){var A=ct(180),n=[],i=1;return qe(t).forEach(function(t,A){var r=t[0];if(0===A){if(ze(r)&&"linear"===r.value)return void(i=1);if(ze(r)&&"radial"===r.value)return void(i=2)}if(18===r.type)if("from"===r.name){var o=ht(e,r.values[0]);n.push({stop:tt,color:o})}else if("to"===r.name)o=ht(e,r.values[0]),n.push({stop:nt,color:o});else if("color-stop"===r.name){var s=r.values.filter(Ye);if(2===s.length){o=ht(e,s[1]);var a=s[0];Ve(a)&&n.push({stop:{type:16,number:100*a.number,flags:a.flags},color:o})}}}),1===i?{angle:(A+ct(180))%ct(360),stops:n,type:i}:{size:3,shape:0,stops:n,position:[],type:i}}},Kt={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var A=t[0];return 20===A.type&&"none"===A.value?[]:t.filter(function(e){return Ye(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Gt[e.name])}(e)}).map(function(t){return Dt(e,t)})}},Vt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(ze(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},zt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return qe(t).map(function(e){return e.filter($e)}).map(et)}},Wt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return qe(t).map(function(e){return e.filter(ze).map(function(e){return e.value}).join(" ")}).map(jt)}},jt=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(Pt||(Pt={}));var Xt,Yt={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return qe(t).map(function(e){return e.filter(qt)})}},qt=function(e){return ze(e)||$e(e)},Zt=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Jt=Zt("top"),$t=Zt("right"),eA=Zt("bottom"),tA=Zt("left"),AA=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return et(t.filter($e))}}},nA=AA("top-left"),iA=AA("top-right"),rA=AA("bottom-right"),oA=AA("bottom-left"),sA=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},aA=sA("top"),lA=sA("right"),uA=sA("bottom"),cA=sA("left"),hA=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Ke(t)?t.number:0}}},dA=hA("top"),fA=hA("right"),gA=hA("bottom"),pA=hA("left"),vA={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mA={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},CA={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).reduce(function(e,t){return e|wA(t.value)},0)}},wA=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},yA={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},BA={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(Xt||(Xt={}));var EA,xA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?Xt.STRICT:Xt.NORMAL}},bA={name:"line-height",initialValue:"normal",prefix:!1,type:4},FA=function(e,t){return ze(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:$e(e)?rt(e,t):t},SA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Dt(e,t)}},TA={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},LA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},QA=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},IA=QA("top"),UA=QA("right"),OA=QA("bottom"),HA=QA("left"),MA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},_A={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},kA=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},RA=kA("top"),NA=kA("right"),DA=kA("bottom"),PA=kA("left"),GA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},KA={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},VA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&je(t[0],"none")?[]:qe(t).map(function(t){for(var A={color:Bt.TRANSPARENT,offsetX:tt,offsetY:tt,blur:tt},n=0,i=0;i<t.length;i++){var r=t[i];Je(r)?(0===n?A.offsetX=r:1===n?A.offsetY=r:A.blur=r,n++):A.color=ht(e,r)}return A})}},zA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},WA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var A=jA[t.name];if(void 0===A)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return A(t.values)}return null}},jA={matrix:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number});return 6===t.length?t:null},matrix3d:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number});return 16===t.length?[t[0],t[1],t[4],t[5],t[12],t[13]]:null}},XA={type:16,number:50,flags:4},YA=[XA,XA],qA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var A=t.filter($e);return 2!==A.length?YA:[A[0],A[1]]}},ZA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(EA||(EA={}));for(var JA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return EA.BREAK_ALL;case"keep-all":return EA.KEEP_ALL;default:return EA.NORMAL}}},$A={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(Ve(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},en={name:"time",parse:function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},tn={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return Ve(t)?t.number:1}},An={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},nn={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return 0!==e})}},rn={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var A=[],n=[];return t.forEach(function(e){switch(e.type){case 20:case 0:A.push(e.value);break;case 17:A.push(e.number.toString());break;case 4:n.push(A.join(" ")),A.length=0}}),A.length&&n.push(A.join(" ")),n.map(function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"})}},on={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},sn={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return Ve(t)?t.number:ze(t)&&"bold"===t.value?700:400}},an={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(ze).map(function(e){return e.value})}},ln={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},un=function(e,t){return 0!==(e&t)},cn={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var A=t[0];return 20===A.type&&"none"===A.value?[]:t}},hn={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var A=t[0];if(20===A.type&&"none"===A.value)return null;for(var n=[],i=t.filter(Xe),r=0;r<i.length;r++){var o=i[r],s=i[r+1];if(20===o.type){var a=s&&Ve(s)?s.number:1;n.push({counter:o.value,increment:a})}}return n}},dn={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var A=[],n=t.filter(Xe),i=0;i<n.length;i++){var r=n[i],o=n[i+1];if(ze(r)&&"none"!==r.value){var s=o&&Ve(o)?o.number:0;A.push({counter:r.value,reset:s})}}return A}},fn={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(Ke).map(function(t){return en.parse(e,t)})}},gn={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var A=t[0];if(20===A.type&&"none"===A.value)return null;var n=[],i=t.filter(We);if(i.length%2!=0)return null;for(var r=0;r<i.length;r+=2)n.push({open:i[r].value,close:i[r+1].value});return n}},pn=function(e,t,A){if(!e)return"";var n=e[Math.min(t,e.length-1)];return n?A?n.open:n.close:""},vn={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&je(t[0],"none")?[]:qe(t).map(function(t){for(var A={color:255,offsetX:tt,offsetY:tt,blur:tt,spread:tt,inset:!1},n=0,i=0;i<t.length;i++){var r=t[i];je(r,"inset")?A.inset=!0:Je(r)?(0===n?A.offsetX=r:1===n?A.offsetY=r:2===n?A.blur=r:A.spread=r,n++):A.color=ht(e,r)}return A})}},mn={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var A=[];return t.filter(ze).forEach(function(e){switch(e.value){case"stroke":A.push(1);break;case"fill":A.push(0);break;case"markers":A.push(2)}}),[0,1,2].forEach(function(e){-1===A.indexOf(e)&&A.push(e)}),A}},Cn={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},wn={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Ke(t)?t.number:0}},yn=function(){function e(e,t){var A,n;this.animationDuration=xn(e,fn,t.animationDuration),this.backgroundClip=xn(e,Et,t.backgroundClip),this.backgroundColor=xn(e,xt,t.backgroundColor),this.backgroundImage=xn(e,Kt,t.backgroundImage),this.backgroundOrigin=xn(e,Vt,t.backgroundOrigin),this.backgroundPosition=xn(e,zt,t.backgroundPosition),this.backgroundRepeat=xn(e,Wt,t.backgroundRepeat),this.backgroundSize=xn(e,Yt,t.backgroundSize),this.borderTopColor=xn(e,Jt,t.borderTopColor),this.borderRightColor=xn(e,$t,t.borderRightColor),this.borderBottomColor=xn(e,eA,t.borderBottomColor),this.borderLeftColor=xn(e,tA,t.borderLeftColor),this.borderTopLeftRadius=xn(e,nA,t.borderTopLeftRadius),this.borderTopRightRadius=xn(e,iA,t.borderTopRightRadius),this.borderBottomRightRadius=xn(e,rA,t.borderBottomRightRadius),this.borderBottomLeftRadius=xn(e,oA,t.borderBottomLeftRadius),this.borderTopStyle=xn(e,aA,t.borderTopStyle),this.borderRightStyle=xn(e,lA,t.borderRightStyle),this.borderBottomStyle=xn(e,uA,t.borderBottomStyle),this.borderLeftStyle=xn(e,cA,t.borderLeftStyle),this.borderTopWidth=xn(e,dA,t.borderTopWidth),this.borderRightWidth=xn(e,fA,t.borderRightWidth),this.borderBottomWidth=xn(e,gA,t.borderBottomWidth),this.borderLeftWidth=xn(e,pA,t.borderLeftWidth),this.boxShadow=xn(e,vn,t.boxShadow),this.color=xn(e,vA,t.color),this.direction=xn(e,mA,t.direction),this.display=xn(e,CA,t.display),this.float=xn(e,yA,t.cssFloat),this.fontFamily=xn(e,rn,t.fontFamily),this.fontSize=xn(e,on,t.fontSize),this.fontStyle=xn(e,ln,t.fontStyle),this.fontVariant=xn(e,an,t.fontVariant),this.fontWeight=xn(e,sn,t.fontWeight),this.letterSpacing=xn(e,BA,t.letterSpacing),this.lineBreak=xn(e,xA,t.lineBreak),this.lineHeight=xn(e,bA,t.lineHeight),this.listStyleImage=xn(e,SA,t.listStyleImage),this.listStylePosition=xn(e,TA,t.listStylePosition),this.listStyleType=xn(e,LA,t.listStyleType),this.marginTop=xn(e,IA,t.marginTop),this.marginRight=xn(e,UA,t.marginRight),this.marginBottom=xn(e,OA,t.marginBottom),this.marginLeft=xn(e,HA,t.marginLeft),this.opacity=xn(e,tn,t.opacity);var i=xn(e,MA,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=xn(e,_A,t.overflowWrap),this.paddingTop=xn(e,RA,t.paddingTop),this.paddingRight=xn(e,NA,t.paddingRight),this.paddingBottom=xn(e,DA,t.paddingBottom),this.paddingLeft=xn(e,PA,t.paddingLeft),this.paintOrder=xn(e,mn,t.paintOrder),this.position=xn(e,KA,t.position),this.textAlign=xn(e,GA,t.textAlign),this.textDecorationColor=xn(e,An,null!==(A=t.textDecorationColor)&&void 0!==A?A:t.color),this.textDecorationLine=xn(e,nn,null!==(n=t.textDecorationLine)&&void 0!==n?n:t.textDecoration),this.textShadow=xn(e,VA,t.textShadow),this.textTransform=xn(e,zA,t.textTransform),this.transform=xn(e,WA,t.transform),this.transformOrigin=xn(e,qA,t.transformOrigin),this.visibility=xn(e,ZA,t.visibility),this.webkitTextStrokeColor=xn(e,Cn,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=xn(e,wn,t.webkitTextStrokeWidth),this.wordBreak=xn(e,JA,t.wordBreak),this.zIndex=xn(e,$A,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return dt(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return un(this.display,4)||un(this.display,33554432)||un(this.display,268435456)||un(this.display,536870912)||un(this.display,67108864)||un(this.display,134217728)},e}(),Bn=function(e,t){this.content=xn(e,cn,t.content),this.quotes=xn(e,gn,t.quotes)},En=function(e,t){this.counterIncrement=xn(e,hn,t.counterIncrement),this.counterReset=xn(e,dn,t.counterReset)},xn=function(e,t,A){var n=new Pe,i=null!=A?A.toString():t.initialValue;n.write(i);var r=new Ge(n.read());switch(t.type){case 2:var o=r.parseComponentValue();return t.parse(e,ze(o)?o.value:t.initialValue);case 0:return t.parse(e,r.parseComponentValue());case 1:return t.parse(e,r.parseComponentValues());case 4:return r.parseComponentValue();case 3:switch(t.format){case"angle":return at(e,r.parseComponentValue());case"color":return ht(e,r.parseComponentValue());case"image":return Dt(e,r.parseComponentValue());case"length":var s=r.parseComponentValue();return Je(s)?s:tt;case"length-percentage":var a=r.parseComponentValue();return $e(a)?a:tt;case"time":return en.parse(e,r.parseComponentValue())}}},bn=function(e,t){var A=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===A||t===A},Fn=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,bn(t,3),this.styles=new yn(e,window.getComputedStyle(t,null)),Qi(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=s(this.context,t),bn(t,4)&&(this.flags|=16)},Sn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ln=0;Ln<64;Ln++)Tn[Sn.charCodeAt(Ln)]=Ln;for(var Qn=function(e,t,A){return e.slice?e.slice(t,A):new Uint16Array(Array.prototype.slice.call(e,t,A))},In=function(){function e(e,t,A,n,i,r){this.initialValue=e,this.errorValue=t,this.highStart=A,this.highValueIndex=n,this.index=i,this.data=r}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return this.data[t=((t=this.index[e>>5])<<2)+(31&e)];if(e<=65535)return this.data[t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e)];if(e<this.highStart)return t=this.index[t=2080+(e>>11)],this.data[t=((t=this.index[t+=e>>5&63])<<2)+(31&e)];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",On="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Hn=0;Hn<64;Hn++)On[Un.charCodeAt(Hn)]=Hn;var Mn,_n=8,kn=9,Rn=11,Nn=12,Dn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var A=e.length;if(!A)return"";for(var n=[],i=-1,r="";++i<A;){var o=e[i];o<=65535?n.push(o):n.push(55296+((o-=65536)>>10),o%1024+56320),(i+1===A||n.length>16384)&&(r+=String.fromCharCode.apply(String,n),n.length=0)}return r},Pn=function(e){var t,A,n,i=function(e){var t,A,n,i,r,o=.75*e.length,s=e.length,a=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),u=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)A=Tn[e.charCodeAt(t)],n=Tn[e.charCodeAt(t+1)],i=Tn[e.charCodeAt(t+2)],r=Tn[e.charCodeAt(t+3)],u[a++]=A<<2|n>>4,u[a++]=(15&n)<<4|i>>2,u[a++]=(3&i)<<6|63&r;return l}(e),r=Array.isArray(i)?function(e){for(var t=e.length,A=[],n=0;n<t;n+=4)A.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return A}(i):new Uint32Array(i),o=Array.isArray(i)?function(e){for(var t=e.length,A=[],n=0;n<t;n+=2)A.push(e[n+1]<<8|e[n]);return A}(i):new Uint16Array(i),s=Qn(o,12,r[4]/2),a=2===r[5]?Qn(o,(24+r[4])/2):(t=r,A=Math.ceil((24+r[4])/4),t.slice?t.slice(A,n):new Uint32Array(Array.prototype.slice.call(t,A,n)));return new In(r[0],r[1],r[2],r[3],s,a)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),Gn="×",Kn=function(e){return Pn.get(e)},Vn=function(e,t,A){var n=A-2,i=t[n],r=t[A-1],o=t[A];if(2===r&&3===o)return Gn;if(2===r||3===r||4===r)return"÷";if(2===o||3===o||4===o)return"÷";if(r===_n&&-1!==[_n,kn,Rn,Nn].indexOf(o))return Gn;if(!(r!==Rn&&r!==kn||o!==kn&&10!==o))return Gn;if((r===Nn||10===r)&&10===o)return Gn;if(13===o||5===o)return Gn;if(7===o)return Gn;if(1===r)return Gn;if(13===r&&14===o){for(;5===i;)i=t[--n];if(14===i)return Gn}if(15===r&&15===o){for(var s=0;15===i;)s++,i=t[--n];if(s%2==0)return Gn}return"÷"},zn=function(e){var t=function(e){for(var t=[],A=0,n=e.length;A<n;){var i=e.charCodeAt(A++);if(i>=55296&&i<=56319&&A<n){var r=e.charCodeAt(A++);56320==(64512&r)?t.push(((1023&i)<<10)+(1023&r)+65536):(t.push(i),A--)}else t.push(i)}return t}(e),A=t.length,n=0,i=0,r=t.map(Kn);return{next:function(){if(n>=A)return{done:!0,value:null};for(var e=Gn;n<A&&(e=Vn(0,r,++n))===Gn;);if(e!==Gn||n===A){var o=Dn.apply(null,t.slice(i,n));return i=n,{value:o,done:!1}}return{done:!0,value:null}}}},Wn=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},jn=function(e,t,A,n,i){var r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",A.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},Xn=function(e){return new Promise(function(t,A){var n=new Image;n.onload=function(){return t(n)},n.onerror=A,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},Yn={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var A=e.createElement("boundtest");A.style.height="123px",A.style.display="block",e.body.appendChild(A),t.selectNode(A);var n=t.getBoundingClientRect(),i=Math.round(n.height);if(e.body.removeChild(A),123===i)return!0}}return!1}(document);return Object.defineProperty(Yn,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Yn.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var A=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var n=t.firstChild,i=a(n.data).map(function(e){return l(e)}),r=0,o={},s=i.every(function(e,t){A.setStart(n,r),A.setEnd(n,r+e.length);var i=A.getBoundingClientRect();r+=e.length;var s=i.x>o.x||i.y>o.y;return o=i,0===t||s});return e.body.removeChild(t),s}(document);return Object.defineProperty(Yn,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,A=e.createElement("canvas"),n=A.getContext("2d");if(!n)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),A.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(Yn,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),A=100;t.width=A,t.height=A;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,A,A);var i=new Image,r=t.toDataURL();i.src=r;var o=jn(A,A,0,0,i);return n.fillStyle="red",n.fillRect(0,0,A,A),Xn(o).then(function(t){n.drawImage(t,0,0);var i=n.getImageData(0,0,A,A).data;n.fillStyle="red",n.fillRect(0,0,A,A);var o=e.createElement("div");return o.style.backgroundImage="url("+r+")",o.style.height=A+"px",Wn(i)?Xn(jn(A,A,0,0,o)):Promise.reject(!1)}).then(function(e){return n.drawImage(e,0,0),Wn(n.getImageData(0,0,A,A).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(Yn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Yn,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Yn,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Yn,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Yn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},qn=function(e,t){this.text=e,this.bounds=t},Zn=function(e,t){var A=t.ownerDocument;if(A){var n=A.createElement("html2canvaswrapper");n.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(n,t);var r=s(e,n);return n.firstChild&&i.replaceChild(n.firstChild,n),r}}return o.EMPTY},Jn=function(e,t,A){var n=e.ownerDocument;if(!n)throw new Error("Node has no owner document");var i=n.createRange();return i.setStart(e,t),i.setEnd(e,t+A),i},$n=function(e){if(Yn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(e){return e.segment})}return function(e){for(var t,A=zn(e),n=[];!(t=A.next()).done;)t.value&&n.push(t.value.slice());return n}(e)},ei=function(e,t){return 0!==t.letterSpacing?$n(e):function(e,t){if(Yn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(A.segment(e)).map(function(e){return e.segment})}return Ai(e,t)}(e,t)},ti=[32,160,4961,65792,65793,4153,4241],Ai=function(e,t){for(var A,n=function(e,t){var A=a(e),n=re(A,t),i=n[0],r=n[1],o=n[2],s=A.length,l=0,u=0;return{next:function(){if(u>=s)return{done:!0,value:null};for(var e=W;u<s&&(e=ie(A,r,i,++u,o))===W;);if(e!==W||u===s){var t=new oe(A,e,l,u);return l=u,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],r=function(){if(A.value){var e=A.value.slice(),t=a(e),n="";t.forEach(function(e){-1===ti.indexOf(e)?n+=l(e):(n.length&&i.push(n),i.push(l(e)),n="")}),n.length&&i.push(n)}};!(A=n.next()).done;)r();return i},ni=function(e,t,A){this.text=ii(t.data,A.textTransform),this.textBounds=function(e,t,A,n){var i=ei(t,A),r=[],s=0;return i.forEach(function(t){if(A.textDecorationLine.length||t.trim().length>0)if(Yn.SUPPORT_RANGE_BOUNDS){var i=Jn(n,s,t.length).getClientRects();if(i.length>1){var a=$n(t),l=0;a.forEach(function(t){r.push(new qn(t,o.fromDOMRectList(e,Jn(n,l+s,t.length).getClientRects()))),l+=t.length})}else r.push(new qn(t,o.fromDOMRectList(e,i)))}else{var u=n.splitText(t.length);r.push(new qn(t,Zn(e,n))),n=u}else Yn.SUPPORT_RANGE_BOUNDS||(n=n.splitText(t.length));s+=t.length}),r}(e,this.text,A,t)},ii=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(ri,oi);case 2:return e.toUpperCase();default:return e}},ri=/(^|\s|:|-|\(|\))([a-z])/g,oi=function(e,t,A){return e.length>0?t+A.toUpperCase():e},si=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n.src=A.currentSrc||A.src,n.intrinsicWidth=A.naturalWidth,n.intrinsicHeight=A.naturalHeight,n.context.cache.addImage(n.src),n}return t(A,e),A}(Fn),ai=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n.canvas=A,n.intrinsicWidth=A.width,n.intrinsicHeight=A.height,n}return t(A,e),A}(Fn),li=function(e){function A(t,A){var n=e.call(this,t,A)||this,i=new XMLSerializer,r=s(t,A);return A.setAttribute("width",r.width+"px"),A.setAttribute("height",r.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(A)),n.intrinsicWidth=A.width.baseVal.value,n.intrinsicHeight=A.height.baseVal.value,n.context.cache.addImage(n.svg),n}return t(A,e),A}(Fn),ui=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n.value=A.value,n}return t(A,e),A}(Fn),ci=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n.start=A.start,n.reversed="boolean"==typeof A.reversed&&!0===A.reversed,n}return t(A,e),A}(Fn),hi=[{type:15,flags:0,unit:"px",number:3}],di=[{type:16,flags:0,number:50}],fi="checkbox",gi="radio",pi="password",vi=707406591,mi=function(e){function A(t,A){var n,i,r,s=e.call(this,t,A)||this;switch(s.type=A.type.toLowerCase(),s.checked=A.checked,s.value=0===(r=(i=A).type===pi?new Array(i.value.length+1).join("•"):i.value).length?i.placeholder||"":r,s.type!==fi&&s.type!==gi||(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=1,s.styles.backgroundClip=[0],s.styles.backgroundOrigin=[0],s.bounds=(n=s.bounds).width>n.height?new o(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new o(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n),s.type){case fi:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=hi;break;case gi:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=di}return s}return t(A,e),A}(Fn),Ci=function(e){function A(t,A){var n=e.call(this,t,A)||this,i=A.options[A.selectedIndex||0];return n.value=i&&i.text||"",n}return t(A,e),A}(Fn),wi=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n.value=A.value,n}return t(A,e),A}(Fn),yi=function(e){function A(t,A){var n=e.call(this,t,A)||this;n.src=A.src,n.width=parseInt(A.width,10)||0,n.height=parseInt(A.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(A.contentWindow&&A.contentWindow.document&&A.contentWindow.document.documentElement){n.tree=bi(t,A.contentWindow.document.documentElement);var i=A.contentWindow.document.documentElement?yt(t,getComputedStyle(A.contentWindow.document.documentElement).backgroundColor):Bt.TRANSPARENT,r=A.contentWindow.document.body?yt(t,getComputedStyle(A.contentWindow.document.body).backgroundColor):Bt.TRANSPARENT;n.backgroundColor=dt(i)?dt(r)?n.styles.backgroundColor:r:i}}catch(e){}return n}return t(A,e),A}(Fn),Bi=["OL","UL","MENU"],Ei=function(e,t,A,n){for(var i=t.firstChild,r=void 0;i;i=r)if(r=i.nextSibling,Ti(i)&&i.data.trim().length>0)A.textNodes.push(new ni(e,i,A.styles));else if(Li(i))if(Vi(i)&&i.assignedNodes)i.assignedNodes().forEach(function(t){return Ei(e,t,A,n)});else{var o=xi(e,i);o.styles.isVisible()&&(Fi(i,o,n)?o.flags|=4:Si(o.styles)&&(o.flags|=2),-1!==Bi.indexOf(i.tagName)&&(o.flags|=8),A.elements.push(o),i.shadowRoot?Ei(e,i.shadowRoot,o,n):Gi(i)||Mi(i)||Ki(i)||Ei(e,i,o,n))}},xi=function(e,t){return Ni(t)?new si(e,t):ki(t)?new ai(e,t):Mi(t)?new li(e,t):Ui(t)?new ui(e,t):Oi(t)?new ci(e,t):Hi(t)?new mi(e,t):Ki(t)?new Ci(e,t):Gi(t)?new wi(e,t):Di(t)?new yi(e,t):new Fn(e,t)},bi=function(e,t){var A=xi(e,t);return A.flags|=4,Ei(e,t,A,A),A},Fi=function(e,t,A){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||_i(e)&&A.styles.isTransparent()},Si=function(e){return e.isPositioned()||e.isFloating()},Ti=function(e){return e.nodeType===Node.TEXT_NODE},Li=function(e){return e.nodeType===Node.ELEMENT_NODE},Qi=function(e){return Li(e)&&void 0!==e.style&&!Ii(e)},Ii=function(e){return"object"==typeof e.className},Ui=function(e){return"LI"===e.tagName},Oi=function(e){return"OL"===e.tagName},Hi=function(e){return"INPUT"===e.tagName},Mi=function(e){return"svg"===e.tagName},_i=function(e){return"BODY"===e.tagName},ki=function(e){return"CANVAS"===e.tagName},Ri=function(e){return"VIDEO"===e.tagName},Ni=function(e){return"IMG"===e.tagName},Di=function(e){return"IFRAME"===e.tagName},Pi=function(e){return"STYLE"===e.tagName},Gi=function(e){return"TEXTAREA"===e.tagName},Ki=function(e){return"SELECT"===e.tagName},Vi=function(e){return"SLOT"===e.tagName},zi=function(e){return e.tagName.indexOf("-")>0},Wi=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){return this.counters[e]||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,A=e.counterIncrement,n=e.counterReset,i=!0;null!==A&&A.forEach(function(e){var A=t.counters[e.counter];A&&0!==e.increment&&(i=!1,A.length||A.push(1),A[Math.max(0,A.length-1)]+=e.increment)});var r=[];return i&&n.forEach(function(e){var A=t.counters[e.counter];r.push(e.counter),A||(A=t.counters[e.counter]=[]),A.push(e.reset)}),r},e}(),ji={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Xi={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Yi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},qi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Zi=function(e,t,A,n,i,r){return e<t||e>A?or(e,i,r.length>0):n.integers.reduce(function(t,A,i){for(;e>=A;)e-=A,t+=n.values[i];return t},"")+r},Ji=function(e,t,A,n){var i="";do{A||e--,i=n(e)+i,e/=t}while(e*t>=t);return i},$i=function(e,t,A,n,i){var r=A-t+1;return(e<0?"-":"")+(Ji(Math.abs(e),r,n,function(e){return l(Math.floor(e%r)+t)})+i)},er=function(e,t,A){void 0===A&&(A=". ");var n=t.length;return Ji(Math.abs(e),n,!1,function(e){return t[Math.floor(e%n)]})+A},tr=function(e,t,A,n,i,r){if(e<-9999||e>9999)return or(e,4,i.length>0);var o=Math.abs(e),s=i;if(0===o)return t[0]+s;for(var a=0;o>0&&a<=4;a++){var l=o%10;0===l&&un(r,1)&&""!==s?s=t[l]+s:l>1||1===l&&0===a||1===l&&1===a&&un(r,2)||1===l&&1===a&&un(r,4)&&e>100||1===l&&a>1&&un(r,8)?s=t[l]+(a>0?A[a-1]:"")+s:1===l&&a>0&&(s=A[a-1]+s),o=Math.floor(o/10)}return(e<0?n:"")+s},Ar="十百千萬",nr="拾佰仟萬",ir="マイナス",rr="마이너스",or=function(e,t,A){var n=A?". ":"",i=A?"、":"",r=A?", ":"",o=A?" ":"";switch(t){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=$i(e,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return er(e,"〇一二三四五六七八九",i);case 6:return Zi(e,1,3999,ji,3,n).toLowerCase();case 7:return Zi(e,1,3999,ji,3,n);case 8:return $i(e,945,969,!1,n);case 9:return $i(e,97,122,!1,n);case 10:return $i(e,65,90,!1,n);case 11:return $i(e,1632,1641,!0,n);case 12:case 49:return Zi(e,1,9999,Xi,3,n);case 35:return Zi(e,1,9999,Xi,3,n).toLowerCase();case 13:return $i(e,2534,2543,!0,n);case 14:case 30:return $i(e,6112,6121,!0,n);case 15:return er(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return er(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return tr(e,"零一二三四五六七八九",Ar,"負",i,14);case 47:return tr(e,"零壹貳參肆伍陸柒捌玖",nr,"負",i,15);case 42:return tr(e,"零一二三四五六七八九",Ar,"负",i,14);case 41:return tr(e,"零壹贰叁肆伍陆柒捌玖",nr,"负",i,15);case 26:return tr(e,"〇一二三四五六七八九","十百千万",ir,i,0);case 25:return tr(e,"零壱弐参四伍六七八九","拾百千万",ir,i,7);case 31:return tr(e,"영일이삼사오육칠팔구","십백천만",rr,r,7);case 33:return tr(e,"零一二三四五六七八九","十百千萬",rr,r,0);case 32:return tr(e,"零壹貳參四五六七八九","拾百千",rr,r,7);case 18:return $i(e,2406,2415,!0,n);case 20:return Zi(e,1,19999,qi,3,n);case 21:return $i(e,2790,2799,!0,n);case 22:return $i(e,2662,2671,!0,n);case 22:return Zi(e,1,10999,Yi,3,n);case 23:return er(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return er(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return $i(e,3302,3311,!0,n);case 28:return er(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return er(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return $i(e,3792,3801,!0,n);case 37:return $i(e,6160,6169,!0,n);case 38:return $i(e,4160,4169,!0,n);case 39:return $i(e,2918,2927,!0,n);case 40:return $i(e,1776,1785,!0,n);case 43:return $i(e,3046,3055,!0,n);case 44:return $i(e,3174,3183,!0,n);case 45:return $i(e,3664,3673,!0,n);case 46:return $i(e,3872,3881,!0,n);default:return $i(e,48,57,!0,n)}},sr="data-html2canvas-ignore",ar=function(){function e(e,t,A){if(this.context=e,this.options=A,this.scrolledElements=[],this.referenceElement=t,this.counters=new Wi,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var A=this,r=ur(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var o=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,a=r.contentWindow,l=a.document,u=dr(r).then(function(){return n(A,void 0,void 0,function(){var e,A;return i(this,function(n){switch(n.label){case 0:return this.scrolledElements.forEach(mr),a&&(a.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||a.scrollY===t.top&&a.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-t.left,a.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(A=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,hr(l)]:[3,4];case 3:n.sent(),n.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then(function(){return e(l,A)}).then(function(){return r})]:[2,r]}})})});return l.open(),l.write(pr(document.doctype)+"<html></html>"),vr(this.referenceElement.ownerDocument,o,s),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},e.prototype.createElementClone=function(e){if(bn(e,2),ki(e))return this.createCanvasClone(e);if(Ri(e))return this.createVideoClone(e);if(Pi(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Ni(t)&&(Ni(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),zi(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return gr(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var A=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e},""),n=e.cloneNode(!1);return n.textContent=A,n}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var A=e.ownerDocument.createElement("img");try{return A.src=e.toDataURL(),A}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var i=e.getContext("2d"),r=n.getContext("2d");if(r)if(!this.options.allowTaint&&i)r.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var o=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(o){var s=o.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}r.drawImage(e,0,0)}return n}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var A=t.getContext("2d");try{return A&&(A.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||A.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},e.prototype.appendChildNode=function(e,t,A){Li(t)&&("SCRIPT"===t.tagName||t.hasAttribute(sr)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Li(t)&&Pi(t)||e.appendChild(this.cloneNode(t,A))},e.prototype.cloneChildNodes=function(e,t,A){for(var n=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(Li(i)&&Vi(i)&&"function"==typeof i.assignedNodes){var r=i.assignedNodes();r.length&&r.forEach(function(e){return n.appendChildNode(t,e,A)})}else this.appendChildNode(t,i,A)},e.prototype.cloneNode=function(e,t){if(Ti(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var A=e.ownerDocument.defaultView;if(A&&Li(e)&&(Qi(e)||Ii(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var i=A.getComputedStyle(e),r=A.getComputedStyle(e,":before"),o=A.getComputedStyle(e,":after");this.referenceElement===e&&Qi(n)&&(this.clonedReferenceElement=n),_i(n)&&Br(n);var s=this.counters.parse(new En(this.context,i)),a=this.resolvePseudoContent(e,n,r,Mn.BEFORE);zi(e)&&(t=!0),Ri(e)||this.cloneChildNodes(e,n,t),a&&n.insertBefore(a,n.firstChild);var l=this.resolvePseudoContent(e,n,o,Mn.AFTER);return l&&n.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||Ii(e))&&!Di(e)||t)&&gr(i,n),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(Gi(e)||Ki(e))&&(Gi(n)||Ki(n))&&(n.value=e.value),n}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,A,n){var i=this;if(A){var r=A.content,o=t.ownerDocument;if(o&&r&&"none"!==r&&"-moz-alt-content"!==r&&"none"!==A.display){this.counters.parse(new En(this.context,A));var s=new Bn(this.context,A),a=o.createElement("html2canvaspseudoelement");gr(A,a),s.content.forEach(function(t){if(0===t.type)a.appendChild(o.createTextNode(t.value));else if(22===t.type){var A=o.createElement("img");A.src=t.value,A.style.opacity="1",a.appendChild(A)}else if(18===t.type){if("attr"===t.name){var n=t.values.filter(ze);n.length&&a.appendChild(o.createTextNode(e.getAttribute(n[0].value)||""))}else if("counter"===t.name){var r=t.values.filter(Ye),l=r[1];if((h=r[0])&&ze(h)){var u=i.counters.getCounterValue(h.value),c=l&&ze(l)?LA.parse(i.context,l.value):3;a.appendChild(o.createTextNode(or(u,c,!1)))}}else if("counters"===t.name){var h,d=t.values.filter(Ye),f=d[1];if(l=d[2],(h=d[0])&&ze(h)){var g=i.counters.getCounterValues(h.value),p=l&&ze(l)?LA.parse(i.context,l.value):3,v=f&&0===f.type?f.value:"",m=g.map(function(e){return or(e,p,!1)}).join(v);a.appendChild(o.createTextNode(m))}}}else if(20===t.type)switch(t.value){case"open-quote":a.appendChild(o.createTextNode(pn(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":a.appendChild(o.createTextNode(pn(s.quotes,--i.quoteDepth,!1)));break;default:a.appendChild(o.createTextNode(t.value))}}),a.className=Cr+" "+wr;var l=n===Mn.BEFORE?" "+Cr:" "+wr;return Ii(t)?t.className.baseValue+=l:t.className+=l,a}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(Mn||(Mn={}));var lr,ur=function(e,t){var A=e.createElement("iframe");return A.className="html2canvas-container",A.style.visibility="hidden",A.style.position="fixed",A.style.left="-10000px",A.style.top="0px",A.style.border="0",A.width=t.width.toString(),A.height=t.height.toString(),A.scrolling="no",A.setAttribute(sr,"true"),e.body.appendChild(A),A},cr=function(e){return new Promise(function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()})},hr=function(e){return Promise.all([].slice.call(e.images,0).map(cr))},dr=function(e){return new Promise(function(t,A){var n=e.contentWindow;if(!n)return A("No window assigned for iframe");var i=n.document;n.onload=e.onload=function(){n.onload=e.onload=null;var A=setInterval(function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(A),t(e))},50)}})},fr=["all","d","content"],gr=function(e,t){for(var A=e.length-1;A>=0;A--){var n=e.item(A);-1===fr.indexOf(n)&&t.style.setProperty(n,e.getPropertyValue(n))}return t},pr=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},vr=function(e,t,A){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||A!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,A)},mr=function(e){var t=e[0],A=e[2];t.scrollLeft=e[1],t.scrollTop=A},Cr="___html2canvas___pseudoelement_before",wr="___html2canvas___pseudoelement_after",yr='{\n content: "" !important;\n display: none !important;\n}',Br=function(e){Er(e,"."+Cr+":before"+yr+"\n ."+wr+":after"+yr)},Er=function(e,t){var A=e.ownerDocument;if(A){var n=A.createElement("style");n.textContent=t,e.appendChild(n)}},xr=function(){function e(){}return e.getOrigin=function(t){var A=e._link;return A?(A.href=t,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),br=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Ur(e)||Lr(e)?((this._cache[e]=this.loadImage(e)).catch(function(){}),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return n(this,void 0,void 0,function(){var t,A,n,r,o=this;return i(this,function(i){switch(i.label){case 0:return t=xr.isSameOrigin(e),A=!Qr(e)&&!0===this._options.useCORS&&Yn.SUPPORT_CORS_IMAGES&&!t,n=!Qr(e)&&!t&&!Ur(e)&&"string"==typeof this._options.proxy&&Yn.SUPPORT_CORS_XHR&&!A,t||!1!==this._options.allowTaint||Qr(e)||Ur(e)||n||A?(r=e,n?[4,this.proxy(r)]:[3,2]):[2];case 1:r=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,(Ir(r)||A)&&(n.crossOrigin="anonymous"),n.src=r,!0===n.complete&&setTimeout(function(){return e(n)},500),o._options.imageTimeout>0&&setTimeout(function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,i.sent()]}})})},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,A=this._options.proxy;if(!A)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,r){var o=Yn.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===o)i(s.response);else{var e=new FileReader;e.addEventListener("load",function(){return i(e.result)},!1),e.addEventListener("error",function(e){return r(e)},!1),e.readAsDataURL(s.response)}else r("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=r;var a=A.indexOf("?")>-1?"&":"?";if(s.open("GET",""+A+a+"url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return r("Timed out ("+l+"ms) proxying "+n)}}s.send()})},e}(),Fr=/^data:image\/svg\+xml/i,Sr=/^data:image\/.*;base64,/i,Tr=/^data:image\/.*/i,Lr=function(e){return Yn.SUPPORT_SVG_DRAWING||!Or(e)},Qr=function(e){return Tr.test(e)},Ir=function(e){return Sr.test(e)},Ur=function(e){return"blob"===e.substr(0,4)},Or=function(e){return"svg"===e.substr(-3).toLowerCase()||Fr.test(e)},Hr=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,A){return new e(this.x+t,this.y+A)},e}(),Mr=function(e,t,A){return new Hr(e.x+(t.x-e.x)*A,e.y+(t.y-e.y)*A)},_r=function(){function e(e,t,A,n){this.type=1,this.start=e,this.startControl=t,this.endControl=A,this.end=n}return e.prototype.subdivide=function(t,A){var n=Mr(this.start,this.startControl,t),i=Mr(this.startControl,this.endControl,t),r=Mr(this.endControl,this.end,t),o=Mr(n,i,t),s=Mr(i,r,t),a=Mr(o,s,t);return A?new e(this.start,n,o,a):new e(a,s,r,this.end)},e.prototype.add=function(t,A){return new e(this.start.add(t,A),this.startControl.add(t,A),this.endControl.add(t,A),this.end.add(t,A))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),kr=function(e){return 1===e.type},Rr=function(e){var t=e.styles,A=e.bounds,n=it(t.borderTopLeftRadius,A.width,A.height),i=n[0],r=n[1],o=it(t.borderTopRightRadius,A.width,A.height),s=o[0],a=o[1],l=it(t.borderBottomRightRadius,A.width,A.height),u=l[0],c=l[1],h=it(t.borderBottomLeftRadius,A.width,A.height),d=h[0],f=h[1],g=[];g.push((i+s)/A.width),g.push((d+u)/A.width),g.push((r+f)/A.height),g.push((a+c)/A.height);var p=Math.max.apply(Math,g);p>1&&(i/=p,r/=p,s/=p,a/=p,u/=p,c/=p,d/=p,f/=p);var v=A.width-s,m=A.height-c,C=A.width-u,w=A.height-f,y=t.borderTopWidth,B=t.borderRightWidth,E=t.borderBottomWidth,x=t.borderLeftWidth,b=rt(t.paddingTop,e.bounds.width),F=rt(t.paddingRight,e.bounds.width),S=rt(t.paddingBottom,e.bounds.width),T=rt(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||r>0?Nr(A.left+x/3,A.top+y/3,i-x/3,r-y/3,lr.TOP_LEFT):new Hr(A.left+x/3,A.top+y/3),this.topRightBorderDoubleOuterBox=i>0||r>0?Nr(A.left+v,A.top+y/3,s-B/3,a-y/3,lr.TOP_RIGHT):new Hr(A.left+A.width-B/3,A.top+y/3),this.bottomRightBorderDoubleOuterBox=u>0||c>0?Nr(A.left+C,A.top+m,u-B/3,c-E/3,lr.BOTTOM_RIGHT):new Hr(A.left+A.width-B/3,A.top+A.height-E/3),this.bottomLeftBorderDoubleOuterBox=d>0||f>0?Nr(A.left+x/3,A.top+w,d-x/3,f-E/3,lr.BOTTOM_LEFT):new Hr(A.left+x/3,A.top+A.height-E/3),this.topLeftBorderDoubleInnerBox=i>0||r>0?Nr(A.left+2*x/3,A.top+2*y/3,i-2*x/3,r-2*y/3,lr.TOP_LEFT):new Hr(A.left+2*x/3,A.top+2*y/3),this.topRightBorderDoubleInnerBox=i>0||r>0?Nr(A.left+v,A.top+2*y/3,s-2*B/3,a-2*y/3,lr.TOP_RIGHT):new Hr(A.left+A.width-2*B/3,A.top+2*y/3),this.bottomRightBorderDoubleInnerBox=u>0||c>0?Nr(A.left+C,A.top+m,u-2*B/3,c-2*E/3,lr.BOTTOM_RIGHT):new Hr(A.left+A.width-2*B/3,A.top+A.height-2*E/3),this.bottomLeftBorderDoubleInnerBox=d>0||f>0?Nr(A.left+2*x/3,A.top+w,d-2*x/3,f-2*E/3,lr.BOTTOM_LEFT):new Hr(A.left+2*x/3,A.top+A.height-2*E/3),this.topLeftBorderStroke=i>0||r>0?Nr(A.left+x/2,A.top+y/2,i-x/2,r-y/2,lr.TOP_LEFT):new Hr(A.left+x/2,A.top+y/2),this.topRightBorderStroke=i>0||r>0?Nr(A.left+v,A.top+y/2,s-B/2,a-y/2,lr.TOP_RIGHT):new Hr(A.left+A.width-B/2,A.top+y/2),this.bottomRightBorderStroke=u>0||c>0?Nr(A.left+C,A.top+m,u-B/2,c-E/2,lr.BOTTOM_RIGHT):new Hr(A.left+A.width-B/2,A.top+A.height-E/2),this.bottomLeftBorderStroke=d>0||f>0?Nr(A.left+x/2,A.top+w,d-x/2,f-E/2,lr.BOTTOM_LEFT):new Hr(A.left+x/2,A.top+A.height-E/2),this.topLeftBorderBox=i>0||r>0?Nr(A.left,A.top,i,r,lr.TOP_LEFT):new Hr(A.left,A.top),this.topRightBorderBox=s>0||a>0?Nr(A.left+v,A.top,s,a,lr.TOP_RIGHT):new Hr(A.left+A.width,A.top),this.bottomRightBorderBox=u>0||c>0?Nr(A.left+C,A.top+m,u,c,lr.BOTTOM_RIGHT):new Hr(A.left+A.width,A.top+A.height),this.bottomLeftBorderBox=d>0||f>0?Nr(A.left,A.top+w,d,f,lr.BOTTOM_LEFT):new Hr(A.left,A.top+A.height),this.topLeftPaddingBox=i>0||r>0?Nr(A.left+x,A.top+y,Math.max(0,i-x),Math.max(0,r-y),lr.TOP_LEFT):new Hr(A.left+x,A.top+y),this.topRightPaddingBox=s>0||a>0?Nr(A.left+Math.min(v,A.width-B),A.top+y,v>A.width+B?0:Math.max(0,s-B),Math.max(0,a-y),lr.TOP_RIGHT):new Hr(A.left+A.width-B,A.top+y),this.bottomRightPaddingBox=u>0||c>0?Nr(A.left+Math.min(C,A.width-x),A.top+Math.min(m,A.height-E),Math.max(0,u-B),Math.max(0,c-E),lr.BOTTOM_RIGHT):new Hr(A.left+A.width-B,A.top+A.height-E),this.bottomLeftPaddingBox=d>0||f>0?Nr(A.left+x,A.top+Math.min(w,A.height-E),Math.max(0,d-x),Math.max(0,f-E),lr.BOTTOM_LEFT):new Hr(A.left+x,A.top+A.height-E),this.topLeftContentBox=i>0||r>0?Nr(A.left+x+T,A.top+y+b,Math.max(0,i-(x+T)),Math.max(0,r-(y+b)),lr.TOP_LEFT):new Hr(A.left+x+T,A.top+y+b),this.topRightContentBox=s>0||a>0?Nr(A.left+Math.min(v,A.width+x+T),A.top+y+b,v>A.width+x+T?0:s-x+T,a-(y+b),lr.TOP_RIGHT):new Hr(A.left+A.width-(B+F),A.top+y+b),this.bottomRightContentBox=u>0||c>0?Nr(A.left+Math.min(C,A.width-(x+T)),A.top+Math.min(m,A.height+y+b),Math.max(0,u-(B+F)),c-(E+S),lr.BOTTOM_RIGHT):new Hr(A.left+A.width-(B+F),A.top+A.height-(E+S)),this.bottomLeftContentBox=d>0||f>0?Nr(A.left+x+T,A.top+w,Math.max(0,d-(x+T)),f-(E+S),lr.BOTTOM_LEFT):new Hr(A.left+x+T,A.top+A.height-(E+S))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(lr||(lr={}));var Nr=function(e,t,A,n,i){var r=(Math.sqrt(2)-1)/3*4,o=A*r,s=n*r,a=e+A,l=t+n;switch(i){case lr.TOP_LEFT:return new _r(new Hr(e,l),new Hr(e,l-s),new Hr(a-o,t),new Hr(a,t));case lr.TOP_RIGHT:return new _r(new Hr(e,t),new Hr(e+o,t),new Hr(a,l-s),new Hr(a,l));case lr.BOTTOM_RIGHT:return new _r(new Hr(a,t),new Hr(a,t+s),new Hr(e+o,l),new Hr(e,l));default:return new _r(new Hr(a,l),new Hr(a-o,l),new Hr(e,t+s),new Hr(e,t))}},Dr=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Pr=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Gr=function(e,t,A){this.offsetX=e,this.offsetY=t,this.matrix=A,this.type=0,this.target=6},Kr=function(e,t){this.path=e,this.target=t,this.type=1},Vr=function(e){this.opacity=e,this.type=2,this.target=6},zr=function(e){return 1===e.type},Wr=function(e,t){return e.length===t.length&&e.some(function(e,A){return e===t[A]})},jr=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Xr=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Rr(this.container),this.container.styles.opacity<1&&this.effects.push(new Vr(this.container.styles.opacity)),null!==this.container.styles.transform&&this.effects.push(new Gr(this.container.bounds.left+this.container.styles.transformOrigin[0].number,this.container.bounds.top+this.container.styles.transformOrigin[1].number,this.container.styles.transform)),0!==this.container.styles.overflowX){var A=Dr(this.curves),n=Pr(this.curves);Wr(A,n)?this.effects.push(new Kr(A,6)):(this.effects.push(new Kr(A,2)),this.effects.push(new Kr(n,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),A=this.parent,n=this.effects.slice(0);A;){var i=A.effects.filter(function(e){return!zr(e)});if(t||0!==A.container.styles.position||!A.parent){if(n.unshift.apply(n,i),t=-1===[2,3].indexOf(A.container.styles.position),0!==A.container.styles.overflowX){var r=Dr(A.curves),o=Pr(A.curves);Wr(r,o)||n.unshift(new Kr(o,6))}}else n.unshift.apply(n,i);A=A.parent}return n.filter(function(t){return un(t.target,e)})},e}(),Yr=function(e,t,A,n){e.container.elements.forEach(function(i){var r=un(i.flags,4),o=un(i.flags,2),s=new Xr(i,e);un(i.styles.display,2048)&&n.push(s);var a=un(i.flags,8)?[]:n;if(r||o){var l=r||i.styles.isPositioned()?A:t,u=new jr(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var c=i.styles.zIndex.order;if(c<0){var h=0;l.negativeZIndex.some(function(e,t){return c>e.element.container.styles.zIndex.order?(h=t,!1):h>0}),l.negativeZIndex.splice(h,0,u)}else if(c>0){var d=0;l.positiveZIndex.some(function(e,t){return c>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0}),l.positiveZIndex.splice(d,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Yr(s,u,r?u:A,a)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Yr(s,t,A,a);un(i.flags,8)&&qr(i,a)})},qr=function(e,t){for(var A=e instanceof ci?e.start:1,n=e instanceof ci&&e.reversed,i=0;i<t.length;i++){var r=t[i];r.container instanceof ui&&"number"==typeof r.container.value&&0!==r.container.value&&(A=r.container.value),r.listValue=or(A,r.container.styles.listStyleType,!0),A+=n?-1:1}},Zr=function(e,t){switch(t){case 0:return $r(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return $r(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return $r(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return $r(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Jr=function(e,t){var A=[];return kr(e)?A.push(e.subdivide(.5,!1)):A.push(e),kr(t)?A.push(t.subdivide(.5,!0)):A.push(t),A},$r=function(e,t,A,n){var i=[];return kr(e)?i.push(e.subdivide(.5,!1)):i.push(e),kr(A)?i.push(A.subdivide(.5,!0)):i.push(A),kr(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),kr(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},eo=function(e){var t=e.styles;return e.bounds.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},to=function(e){var t=e.styles,A=e.bounds,n=rt(t.paddingLeft,A.width),i=rt(t.paddingRight,A.width),r=rt(t.paddingTop,A.width),o=rt(t.paddingBottom,A.width);return A.add(n+t.borderLeftWidth,r+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+n+i),-(t.borderTopWidth+t.borderBottomWidth+r+o))},Ao=function(e,t,A){var n=function(e,t){return 0===e?t.bounds:2===e?to(t):eo(t)}(oo(e.styles.backgroundOrigin,t),e),i=function(e,t){return 0===e?t.bounds:2===e?to(t):eo(t)}(oo(e.styles.backgroundClip,t),e),r=ro(oo(e.styles.backgroundSize,t),A,n),o=r[0],s=r[1],a=it(oo(e.styles.backgroundPosition,t),n.width-o,n.height-s);return[so(oo(e.styles.backgroundRepeat,t),a,r,n,i),Math.round(n.left+a[0]),Math.round(n.top+a[1]),o,s]},no=function(e){return ze(e)&&e.value===Pt.AUTO},io=function(e){return"number"==typeof e},ro=function(e,t,A){var n=t[0],i=t[1],r=t[2],o=e[0],s=e[1];if(!o)return[0,0];if($e(o)&&s&&$e(s))return[rt(o,A.width),rt(s,A.height)];var a=io(r);if(ze(o)&&(o.value===Pt.CONTAIN||o.value===Pt.COVER))return io(r)?A.width/A.height<r!=(o.value===Pt.COVER)?[A.width,A.width/r]:[A.height*r,A.height]:[A.width,A.height];var l=io(n),u=io(i),c=l||u;if(no(o)&&(!s||no(s)))return l&&u?[n,i]:a||c?c&&a?[l?n:i*r,u?i:n/r]:[l?n:A.width,u?i:A.height]:[A.width,A.height];if(a){var h=0,d=0;return $e(o)?h=rt(o,A.width):$e(s)&&(d=rt(s,A.height)),no(o)?h=d*r:s&&!no(s)||(d=h/r),[h,d]}var f=null,g=null;if($e(o)?f=rt(o,A.width):s&&$e(s)&&(g=rt(s,A.height)),null===f||s&&!no(s)||(g=l&&u?f/n*i:A.height),null!==g&&no(o)&&(f=l&&u?g/i*n:A.width),null!==f&&null!==g)return[f,g];throw new Error("Unable to calculate background-size for element")},oo=function(e,t){var A=e[t];return void 0===A?e[0]:A},so=function(e,t,A,n,i){var r=t[0],o=t[1],s=A[0],a=A[1];switch(e){case 2:return[new Hr(Math.round(n.left),Math.round(n.top+o)),new Hr(Math.round(n.left+n.width),Math.round(n.top+o)),new Hr(Math.round(n.left+n.width),Math.round(a+n.top+o)),new Hr(Math.round(n.left),Math.round(a+n.top+o))];case 3:return[new Hr(Math.round(n.left+r),Math.round(n.top)),new Hr(Math.round(n.left+r+s),Math.round(n.top)),new Hr(Math.round(n.left+r+s),Math.round(n.height+n.top)),new Hr(Math.round(n.left+r),Math.round(n.height+n.top))];case 1:return[new Hr(Math.round(n.left+r),Math.round(n.top+o)),new Hr(Math.round(n.left+r+s),Math.round(n.top+o)),new Hr(Math.round(n.left+r+s),Math.round(n.top+o+a)),new Hr(Math.round(n.left+r),Math.round(n.top+o+a))];default:return[new Hr(Math.round(i.left),Math.round(i.top)),new Hr(Math.round(i.left+i.width),Math.round(i.top)),new Hr(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Hr(Math.round(i.left),Math.round(i.height+i.top))]}},ao="Hidden Text",lo=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var A=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),r=this._document.body;A.style.visibility="hidden",A.style.fontFamily=e,A.style.fontSize=t,A.style.margin="0",A.style.padding="0",A.style.whiteSpace="nowrap",r.appendChild(A),n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(ao)),A.appendChild(i),A.appendChild(n);var o=n.offsetTop-i.offsetTop+2;A.removeChild(i),A.appendChild(this._document.createTextNode(ao)),A.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-A.offsetTop+2;return r.removeChild(A),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var A=e+" "+t;return void 0===this._data[A]&&(this._data[A]=this.parseMetrics(e,t)),this._data[A]},e}(),uo=function(e,t){this.context=e,this.options=t},co=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n._activeEffects=[],n.canvas=A.canvas?A.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),A.canvas||(n.canvas.width=Math.floor(A.width*A.scale),n.canvas.height=Math.floor(A.height*A.scale),n.canvas.style.width=A.width+"px",n.canvas.style.height=A.height+"px"),n.fontMetrics=new lo(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-A.x,-A.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+A.width+"x"+A.height+") with scale "+A.scale),n}return t(A,e),A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},A.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),zr(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return n(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return n(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return un(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,t,A){var n=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+A):$n(e.text).reduce(function(t,i){return n.ctx.fillText(i,t,e.bounds.top+A),t+n.ctx.measureText(i).width},e.bounds.left)},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return"normal"===e||"small-caps"===e}).join(""),A=vo(e.fontFamily).join(", "),n=Ke(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,n,A].join(" "),A,n]},A.prototype.renderTextNode=function(e,t){return n(this,void 0,void 0,function(){var A,n,r,o,s,a,l,u=this;return i(this,function(i){return A=this.createFontStyle(t),n=A[1],r=A[2],this.ctx.font=A[0],this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(n,r),s=o.baseline,a=o.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(A){switch(A){case 0:u.ctx.fillStyle=ft(t.color),u.renderTextWithLetterSpacing(e,t.letterSpacing,s);var n=t.textShadow;n.length&&e.text.trim().length&&(n.slice(0).reverse().forEach(function(A){u.ctx.shadowColor=ft(A.color),u.ctx.shadowOffsetX=A.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=A.offsetY.number*u.options.scale,u.ctx.shadowBlur=A.blur.number,u.renderTextWithLetterSpacing(e,t.letterSpacing,s)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=ft(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:u.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+a),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(u.ctx.strokeStyle=ft(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter"}})}),[2]})})},A.prototype.renderReplacedElement=function(e,t,A){if(A&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var n=to(e),i=Pr(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,e.intrinsicWidth,e.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return n(this,void 0,void 0,function(){var t,n,r,s,a,l,u,c,h,d,f,g,p,v,m,C;return i(this,function(i){switch(i.label){case 0:this.applyEffects(e.getEffects(4)),n=e.curves,r=(t=e.container).styles,s=0,a=t.textNodes,i.label=1;case 1:return s<a.length?[4,this.renderTextNode(a[s],r)]:[3,4];case 2:i.sent(),i.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof si))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return p=i.sent(),this.renderReplacedElement(t,n,p),[3,8];case 7:return i.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof ai&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof li))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return p=i.sent(),this.renderReplacedElement(t,n,p),[3,12];case 11:return i.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof yi&&t.tree?[4,new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}).render(t.tree)]:[3,14];case 13:l=i.sent(),t.width&&t.height&&this.ctx.drawImage(l,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),i.label=14;case 14:if(t instanceof mi&&(u=Math.min(t.bounds.width,t.bounds.height),t.type===fi?t.checked&&(this.ctx.save(),this.path([new Hr(t.bounds.left+.39363*u,t.bounds.top+.79*u),new Hr(t.bounds.left+.16*u,t.bounds.top+.5549*u),new Hr(t.bounds.left+.27347*u,t.bounds.top+.44071*u),new Hr(t.bounds.left+.39694*u,t.bounds.top+.5649*u),new Hr(t.bounds.left+.72983*u,t.bounds.top+.23*u),new Hr(t.bounds.left+.84*u,t.bounds.top+.34085*u),new Hr(t.bounds.left+.39363*u,t.bounds.top+.79*u)]),this.ctx.fillStyle=ft(vi),this.ctx.fill(),this.ctx.restore()):t.type===gi&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+u/2,t.bounds.top+u/2,u/4,0,2*Math.PI,!0),this.ctx.fillStyle=ft(vi),this.ctx.fill(),this.ctx.restore())),ho(t)&&t.value.length){switch(c=this.createFontStyle(r),h=this.fontMetrics.getMetrics(m=c[0],c[1]).baseline,this.ctx.font=m,this.ctx.fillStyle=ft(r.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=go(t.styles.textAlign),C=to(t),d=0,t.styles.textAlign){case 1:d+=C.width/2;break;case 2:d+=C.width}f=C.add(d,0,0,-C.height/2+1),this.ctx.save(),this.path([new Hr(C.left,C.top),new Hr(C.left+C.width,C.top),new Hr(C.left+C.width,C.top+C.height),new Hr(C.left,C.top+C.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new qn(t.value,f),r.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!un(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(0!==(g=t.styles.listStyleImage).type)return[3,18];p=void 0,v=g.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.context.cache.match(v)];case 16:return p=i.sent(),this.ctx.drawImage(p,t.bounds.left-(p.width+10),t.bounds.top),[3,18];case 17:return i.sent(),this.context.logger.error("Error loading list-style-image "+v),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==t.styles.listStyleType&&(m=this.createFontStyle(r)[0],this.ctx.font=m,this.ctx.fillStyle=ft(r.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",C=new o(t.bounds.left,t.bounds.top+rt(t.styles.paddingTop,t.bounds.width),t.bounds.width,FA(r.lineHeight,r.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new qn(e.listValue,C),r.letterSpacing,FA(r.lineHeight,r.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),i.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return n(this,void 0,void 0,function(){var t,A,n,r,o,s,a,l,u,c,h,d,f,g;return i(this,function(i){switch(i.label){case 0:return un(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,A=e.negativeZIndex,i.label=2;case 2:return t<A.length?[4,this.renderStack(A[t])]:[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),n=0,r=e.nonInlineLevel,i.label=7;case 7:return n<r.length?[4,this.renderNode(r[n])]:[3,10];case 8:i.sent(),i.label=9;case 9:return n++,[3,7];case 10:o=0,s=e.nonPositionedFloats,i.label=11;case 11:return o<s.length?[4,this.renderStack(s[o])]:[3,14];case 12:i.sent(),i.label=13;case 13:return o++,[3,11];case 14:a=0,l=e.nonPositionedInlineLevel,i.label=15;case 15:return a<l.length?[4,this.renderStack(l[a])]:[3,18];case 16:i.sent(),i.label=17;case 17:return a++,[3,15];case 18:u=0,c=e.inlineLevel,i.label=19;case 19:return u<c.length?[4,this.renderNode(c[u])]:[3,22];case 20:i.sent(),i.label=21;case 21:return u++,[3,19];case 22:h=0,d=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return h<d.length?[4,this.renderStack(d[h])]:[3,26];case 24:i.sent(),i.label=25;case 25:return h++,[3,23];case 26:f=0,g=e.positiveZIndex,i.label=27;case 27:return f<g.length?[4,this.renderStack(g[f])]:[3,30];case 28:i.sent(),i.label=29;case 29:return f++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach(function(e,A){var n=kr(e)?e.start:e;0===A?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),kr(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},A.prototype.renderRepeat=function(e,t,A,n){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(A,n),this.ctx.fill(),this.ctx.translate(-A,-n)},A.prototype.resizeImage=function(e,t,A){var n;if(e.width===t&&e.height===A)return e;var i=(null!==(n=this.canvas.ownerDocument)&&void 0!==n?n:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,A),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,A),i},A.prototype.renderBackgroundImage=function(e){return n(this,void 0,void 0,function(){var t,A,n,r,o;return i(this,function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,A=function(A){var r,o,s,a,l,u,c,h,d,f,g,p,v,m,C,w,y,B,E,x,b,F,S,T,L,Q,I,U,O,H,M;return i(this,function(i){switch(i.label){case 0:if(0!==A.type)return[3,5];r=void 0,o=A.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n.context.cache.match(o)];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),n.context.logger.error("Error loading background-image "+o),[3,4];case 4:return r&&(s=Ao(e,t,[r.width,r.height,r.width/r.height]),w=s[0],F=s[1],S=s[2],m=n.ctx.createPattern(n.resizeImage(r,E=s[3],x=s[4]),"repeat"),n.renderRepeat(w,m,F,S)),[3,6];case 5:1===A.type?(a=Ao(e,t,[null,null,null]),w=a[0],F=a[1],S=a[2],l=St(A.angle,E=a[3],x=a[4]),u=l[0],c=l[1],h=l[2],d=l[3],f=l[4],(g=document.createElement("canvas")).width=E,g.height=x,p=g.getContext("2d"),v=p.createLinearGradient(c,d,h,f),Ft(A.stops,u).forEach(function(e){return v.addColorStop(e.stop,ft(e.color))}),p.fillStyle=v,p.fillRect(0,0,E,x),E>0&&x>0&&(m=n.ctx.createPattern(g,"repeat"),n.renderRepeat(w,m,F,S))):function(e){return 2===e.type}(A)&&(C=Ao(e,t,[null,null,null]),w=C[0],y=C[1],B=C[2],x=C[4],F=rt((b=0===A.position.length?[At]:A.position)[0],E=C[3]),S=rt(b[b.length-1],x),T=function(e,t,A,n,i){var r=0,o=0;switch(e.size){case 0:0===e.shape?r=o=Math.min(Math.abs(t),Math.abs(t-n),Math.abs(A),Math.abs(A-i)):1===e.shape&&(r=Math.min(Math.abs(t),Math.abs(t-n)),o=Math.min(Math.abs(A),Math.abs(A-i)));break;case 2:if(0===e.shape)r=o=Math.min(Tt(t,A),Tt(t,A-i),Tt(t-n,A),Tt(t-n,A-i));else if(1===e.shape){var s=Math.min(Math.abs(A),Math.abs(A-i))/Math.min(Math.abs(t),Math.abs(t-n)),a=Lt(n,i,t,A,!0);o=s*(r=Tt(a[0]-t,(a[1]-A)/s))}break;case 1:0===e.shape?r=o=Math.max(Math.abs(t),Math.abs(t-n),Math.abs(A),Math.abs(A-i)):1===e.shape&&(r=Math.max(Math.abs(t),Math.abs(t-n)),o=Math.max(Math.abs(A),Math.abs(A-i)));break;case 3:if(0===e.shape)r=o=Math.max(Tt(t,A),Tt(t,A-i),Tt(t-n,A),Tt(t-n,A-i));else if(1===e.shape){s=Math.max(Math.abs(A),Math.abs(A-i))/Math.max(Math.abs(t),Math.abs(t-n));var l=Lt(n,i,t,A,!1);o=s*(r=Tt(l[0]-t,(l[1]-A)/s))}}return Array.isArray(e.size)&&(r=rt(e.size[0],n),o=2===e.size.length?rt(e.size[1],i):r),[r,o]}(A,F,S,E,x),Q=T[1],(L=T[0])>0&&Q>0&&(I=n.ctx.createRadialGradient(y+F,B+S,0,y+F,B+S,L),Ft(A.stops,2*L).forEach(function(e){return I.addColorStop(e.stop,ft(e.color))}),n.path(w),n.ctx.fillStyle=I,L!==Q?(U=e.bounds.left+.5*e.bounds.width,O=e.bounds.top+.5*e.bounds.height,M=1/(H=Q/L),n.ctx.save(),n.ctx.translate(U,O),n.ctx.transform(1,0,0,H,0,0),n.ctx.translate(-U,-O),n.ctx.fillRect(y,M*(B-O)+O,E,x*M),n.ctx.restore()):n.ctx.fill())),i.label=6;case 6:return t--,[2]}})},n=this,r=0,o=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return r<o.length?[5,A(o[r])]:[3,4];case 2:s.sent(),s.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,t,A){return n(this,void 0,void 0,function(){return i(this,function(n){return this.path(Zr(A,t)),this.ctx.fillStyle=ft(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,A,r){return n(this,void 0,void 0,function(){var n,o;return i(this,function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(e,A,r)]:[3,2];case 1:return i.sent(),[2];case 2:return n=function(e,t){switch(t){case 0:return $r(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return $r(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return $r(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return $r(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,A),this.path(n),this.ctx.fillStyle=ft(e),this.ctx.fill(),o=function(e,t){switch(t){case 0:return $r(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return $r(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return $r(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return $r(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,A),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return n(this,void 0,void 0,function(){var t,A,n,r,o,s,a,l,u=this;return i(this,function(i){switch(i.label){case 0:return this.applyEffects(e.getEffects(2)),A=!dt((t=e.container.styles).backgroundColor)||t.backgroundImage.length,n=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],r=fo(oo(t.backgroundClip,0),e.curves),A||t.boxShadow.length?(this.ctx.save(),this.path(r),this.ctx.clip(),dt(t.backgroundColor)||(this.ctx.fillStyle=ft(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){u.ctx.save();var A,n,i,r,o=Dr(e.curves),s=t.inset?0:1e4,a=(A=(t.inset?1:-1)*t.spread.number-s,n=(t.inset?1:-1)*t.spread.number,i=t.spread.number*(t.inset?-2:2),r=t.spread.number*(t.inset?-2:2),o.map(function(e,t){switch(t){case 0:return e.add(A,n);case 1:return e.add(A+i,n);case 2:return e.add(A+i,n+r);case 3:return e.add(A,n+r)}return e}));t.inset?(u.path(o),u.ctx.clip(),u.mask(a)):(u.mask(o),u.ctx.clip(),u.path(a)),u.ctx.shadowOffsetX=t.offsetX.number+s,u.ctx.shadowOffsetY=t.offsetY.number,u.ctx.shadowColor=ft(t.color),u.ctx.shadowBlur=t.blur.number,u.ctx.fillStyle=t.inset?ft(t.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),i.label=2;case 2:o=0,s=0,a=n,i.label=3;case 3:return s<a.length?0!==(l=a[s]).style&&!dt(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,2)]:[3,11]:[3,13];case 4:return i.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,3)];case 6:return i.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,o,e.curves)];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,e.curves)];case 10:i.sent(),i.label=11;case 11:o++,i.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,t,A,r,o){return n(this,void 0,void 0,function(){var n,s,a,l,u,c,h,d,f,g,p,v,m,C,w,y;return i(this,function(i){return this.ctx.save(),n=function(e,t){switch(t){case 0:return Jr(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Jr(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Jr(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return Jr(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,A),s=Zr(r,A),2===o&&(this.path(s),this.ctx.clip()),kr(s[0])?(a=s[0].start.x,l=s[0].start.y):(a=s[0].x,l=s[0].y),kr(s[1])?(u=s[1].end.x,c=s[1].end.y):(u=s[1].x,c=s[1].y),h=0===A||2===A?Math.abs(a-u):Math.abs(l-c),this.ctx.beginPath(),this.formatPath(3===o?n:s.slice(0,2)),d=t<3?3*t:2*t,f=t<3?2*t:t,3===o&&(d=t,f=t),g=!0,h<=2*d?g=!1:h<=2*d+f?(d*=p=h/(2*d+f),f*=p):(v=Math.floor((h+f)/(d+f)),m=(h-v*d)/(v-1),f=(C=(h-(v+1)*d)/v)<=0||Math.abs(f-m)<Math.abs(f-C)?m:C),g&&this.ctx.setLineDash(3===o?[0,d+f]:[d,f]),3===o?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=ft(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===o&&(kr(s[0])&&(w=s[3],y=s[0],this.ctx.beginPath(),this.formatPath([new Hr(w.end.x,w.end.y),new Hr(y.start.x,y.start.y)]),this.ctx.stroke()),kr(s[1])&&(w=s[1],y=s[2],this.ctx.beginPath(),this.formatPath([new Hr(w.end.x,w.end.y),new Hr(y.start.x,y.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return n(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ft(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),A=new Xr(e,null),n=new jr(A),Yr(A,n,n,i=[]),qr(A.container,i),[4,this.renderStack(n)];case 1:return t.sent(),this.applyEffects([]),[2,this.canvas]}var A,n,i})})},A}(uo),ho=function(e){return e instanceof wi||e instanceof Ci||e instanceof mi&&e.type!==gi&&e.type!==fi},fo=function(e,t){switch(e){case 0:return Dr(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return Pr(t)}},go=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},po=["-apple-system","system-ui"],vo=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return-1===po.indexOf(e)}):e},mo=function(e){function A(t,A){var n=e.call(this,t,A)||this;return n.canvas=A.canvas?A.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=A,n.canvas.width=Math.floor(A.width*A.scale),n.canvas.height=Math.floor(A.height*A.scale),n.canvas.style.width=A.width+"px",n.canvas.style.height=A.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-A.x,-A.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+A.scale),n}return t(A,e),A.prototype.render=function(e){return n(this,void 0,void 0,function(){var t,A;return i(this,function(n){switch(n.label){case 0:return t=jn(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Co(t)];case 1:return A=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ft(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(uo),Co=function(e){return new Promise(function(t,A){var n=new Image;n.onload=function(){t(n)},n.onerror=A,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},wo=function(){function e(e){var t=e.enabled;this.id=e.id,this.enabled=t,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,r([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,r([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,r([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,r([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),yo=function(){function e(t,A){var n;this.windowBounds=A,this.instanceName="#"+e.instanceCount++,this.logger=new wo({id:this.instanceName,enabled:t.logging}),this.cache=null!==(n=t.cache)&&void 0!==n?n:new br(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&xr.setContext(window);var Bo=function(e,t){return n(void 0,void 0,void 0,function(){var n,r,a,l,u,c,h,d,f,g,p,v,m,C,w,y,B,E,x,b,F,S,T,L,Q,I,U,O,H,M,_,k,R,N,D,P,G,K;return i(this,function(i){switch(i.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(n=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=n.defaultView))throw new Error("Document is not attached to a Window");return a={allowTaint:null!==(S=t.allowTaint)&&void 0!==S&&S,imageTimeout:null!==(T=t.imageTimeout)&&void 0!==T?T:15e3,proxy:t.proxy,useCORS:null!==(L=t.useCORS)&&void 0!==L&&L},l=A({logging:null===(Q=t.logging)||void 0===Q||Q,cache:t.cache},a),u={windowWidth:null!==(I=t.windowWidth)&&void 0!==I?I:r.innerWidth,windowHeight:null!==(U=t.windowHeight)&&void 0!==U?U:r.innerHeight,scrollX:null!==(O=t.scrollX)&&void 0!==O?O:r.pageXOffset,scrollY:null!==(H=t.scrollY)&&void 0!==H?H:r.pageYOffset},c=new o(u.scrollX,u.scrollY,u.windowWidth,u.windowHeight),h=new yo(l,c),d=null!==(M=t.foreignObjectRendering)&&void 0!==M&&M,f={allowTaint:null!==(_=t.allowTaint)&&void 0!==_&&_,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:d,copyStyles:d},h.logger.debug("Starting document clone with size "+c.width+"x"+c.height+" scrolled to "+-c.left+","+-c.top),g=new ar(h,e,f),(p=g.clonedReferenceElement)?[4,g.toIFrame(n,c)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return v=i.sent(),m=_i(p)||"HTML"===p.tagName?function(e){var t=e.body,A=e.documentElement;if(!t||!A)throw new Error("Unable to get document size");var n=Math.max(Math.max(t.scrollWidth,A.scrollWidth),Math.max(t.offsetWidth,A.offsetWidth),Math.max(t.clientWidth,A.clientWidth)),i=Math.max(Math.max(t.scrollHeight,A.scrollHeight),Math.max(t.offsetHeight,A.offsetHeight),Math.max(t.clientHeight,A.clientHeight));return new o(0,0,n,i)}(p.ownerDocument):s(h,p),C=m.width,w=m.height,y=m.left,B=m.top,E=Eo(h,p,t.backgroundColor),x={canvas:t.canvas,backgroundColor:E,scale:null!==(R=null!==(k=t.scale)&&void 0!==k?k:r.devicePixelRatio)&&void 0!==R?R:1,x:(null!==(N=t.x)&&void 0!==N?N:0)+y,y:(null!==(D=t.y)&&void 0!==D?D:0)+B,width:null!==(P=t.width)&&void 0!==P?P:Math.ceil(C),height:null!==(G=t.height)&&void 0!==G?G:Math.ceil(w)},d?(h.logger.debug("Document cloned, using foreign object rendering"),[4,new mo(h,x).render(p)]):[3,3];case 2:return b=i.sent(),[3,5];case 3:return h.logger.debug("Document cloned, element located at "+y+","+B+" with size "+C+"x"+w+" using computed rendering"),h.logger.debug("Starting DOM parsing"),F=bi(h,p),E===F.styles.backgroundColor&&(F.styles.backgroundColor=Bt.TRANSPARENT),h.logger.debug("Starting renderer for element at "+x.x+","+x.y+" with size "+x.width+"x"+x.height),[4,new co(h,x).render(F)];case 4:b=i.sent(),i.label=5;case 5:return(null===(K=t.removeContainer)||void 0===K||K)&&(ar.destroy(v)||h.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),h.logger.debug("Finished rendering"),[2,b]}})})},Eo=function(e,t,A){var n=t.ownerDocument,i=n.documentElement?yt(e,getComputedStyle(n.documentElement).backgroundColor):Bt.TRANSPARENT,r=n.body?yt(e,getComputedStyle(n.body).backgroundColor):Bt.TRANSPARENT,o="string"==typeof A?yt(e,A):null===A?Bt.TRANSPARENT:4294967295;return t===n.documentElement?dt(i)?dt(r)?o:r:i:o};return function(e,t){return void 0===t&&(t={}),Bo(e,t)}}()},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_SetCache.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_MapCache.js"),i=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setCacheAdd.js"),r=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setCacheHas.js");function o(e){var t=-1,A=null==e?0:e.length;for(this.__data__=new n;++t<A;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=r,e.exports=o},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arraySome.js"(e){e.exports=function(e,t){for(var A=-1,n=null==e?0:e.length;++A<n;)if(t(e[A],A,e))return!0;return!1}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsEqual.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsEqualDeep.js"),i=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js");e.exports=function e(t,A,r,o,s){return t===A||(null==t||null==A||!i(t)&&!i(A)?t!=t&&A!=A:n(t,A,r,o,e,s))}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsEqualDeep.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Stack.js"),i=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalArrays.js"),r=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalByTag.js"),o=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalObjects.js"),s=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getTag.js"),a=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArray.js"),l=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isBuffer.js"),u=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isTypedArray.js"),c="[object Arguments]",h="[object Array]",d="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,A,g,p,v){var m=a(e),C=a(t),w=m?h:s(e),y=C?h:s(t),B=(w=w==c?d:w)==d,E=(y=y==c?d:y)==d,x=w==y;if(x&&l(e)){if(!l(t))return!1;m=!0,B=!1}if(x&&!B)return v||(v=new n),m||u(e)?i(e,t,A,g,p,v):r(e,t,w,A,g,p,v);if(!(1&A)){var b=B&&f.call(e,"__wrapped__"),F=E&&f.call(t,"__wrapped__");if(b||F){var S=b?e.value():e,T=F?t.value():t;return v||(v=new n),p(S,T,A,g,v)}}return!!x&&(v||(v=new n),o(e,t,A,g,p,v))}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cacheHas.js"(e){e.exports=function(e,t){return e.has(t)}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalArrays.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_SetCache.js"),i=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arraySome.js"),r=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cacheHas.js");e.exports=function(e,t,A,o,s,a){var l=1&A,u=e.length,c=t.length;if(u!=c&&!(l&&c>u))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,g=!0,p=2&A?new n:void 0;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(o)var C=l?o(m,v,f,t,e,a):o(v,m,f,e,t,a);if(void 0!==C){if(C)continue;g=!1;break}if(p){if(!i(t,function(e,t){if(!r(p,t)&&(v===e||s(v,e,A,o,a)))return p.push(t)})){g=!1;break}}else if(v!==m&&!s(v,m,A,o,a)){g=!1;break}}return a.delete(e),a.delete(t),g}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalByTag.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js"),i=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Uint8Array.js"),r=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/eq.js"),o=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalArrays.js"),s=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapToArray.js"),a=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToArray.js"),l=n?n.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,A,n,l,c,h){switch(A){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":if(d||(d=a),e.size!=t.size&&!(1&n))return!1;var f=h.get(e);if(f)return f==t;n|=2,h.set(e,t);var g=o(d(e),d(t),n,l,c,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_equalObjects.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getAllKeys.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,A,r,o,s){var a=1&A,l=n(e),u=l.length;if(u!=n(t).length&&!a)return!1;for(var c=u;c--;){var h=l[c];if(!(a?h in t:i.call(t,h)))return!1}var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var p=a;++c<u;){var v=e[h=l[c]],m=t[h];if(r)var C=a?r(m,v,h,t,e,s):r(v,m,h,e,t,s);if(!(void 0===C?v===m||o(v,m,A,r,s):C)){g=!1;break}p||(p="constructor"==h)}if(g&&!p){var w=e.constructor,y=t.constructor;w==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof y&&y instanceof y||(g=!1)}return s.delete(e),s.delete(t),g}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapToArray.js"(e){e.exports=function(e){var t=-1,A=Array(e.size);return e.forEach(function(e,n){A[++t]=[n,e]}),A}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setCacheAdd.js"(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setCacheHas.js"(e){e.exports=function(e){return this.__data__.has(e)}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToArray.js"(e){e.exports=function(e){var t=-1,A=Array(e.size);return e.forEach(function(e){A[++t]=e}),A}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isEqual.js"(e,t,A){var n=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsEqual.js");e.exports=function(e,t){return n(e,t)}},"./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js"(e,t,A){var n;e=A.nmd(e),function(){var i,r="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",a=32,l=128,u=1/0,c=9007199254740991,h=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],g="[object Arguments]",p="[object Array]",v="[object Boolean]",m="[object Date]",C="[object Error]",w="[object Function]",y="[object GeneratorFunction]",B="[object Map]",E="[object Number]",x="[object Object]",b="[object Promise]",F="[object RegExp]",S="[object Set]",T="[object String]",L="[object Symbol]",Q="[object WeakMap]",I="[object ArrayBuffer]",U="[object DataView]",O="[object Float32Array]",H="[object Float64Array]",M="[object Int8Array]",_="[object Int16Array]",k="[object Int32Array]",R="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",P="[object Uint32Array]",G=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,j=RegExp(z.source),X=RegExp(W.source),Y=/<%-([\s\S]+?)%>/g,q=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,Ae=RegExp(te.source),ne=/^\s+/,ie=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,pe=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ce=/($^)/,we=/['\n\r\u2028\u2029\\]/g,ye="\\ud800-\\udfff",Be="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="\\u2700-\\u27bf",xe="a-z\\xdf-\\xf6\\xf8-\\xff",be="A-Z\\xc0-\\xd6\\xd8-\\xde",Fe="\\ufe0e\\ufe0f",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="["+ye+"]",Le="["+Se+"]",Qe="["+Be+"]",Ie="\\d+",Ue="["+Ee+"]",Oe="["+xe+"]",He="[^"+ye+Se+Ie+Ee+xe+be+"]",Me="\\ud83c[\\udffb-\\udfff]",_e="[^"+ye+"]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+be+"]",De="\\u200d",Pe="(?:"+Oe+"|"+He+")",Ge="(?:"+Ne+"|"+He+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",ze="(?:"+Qe+"|"+Me+")?",We="["+Fe+"]?",je=We+ze+"(?:"+De+"(?:"+[_e,ke,Re].join("|")+")"+We+ze+")*",Xe="(?:"+[Ue,ke,Re].join("|")+")"+je,Ye="(?:"+[_e+Qe+"?",Qe,ke,Re,Te].join("|")+")",qe=RegExp("['’]","g"),Ze=RegExp(Qe,"g"),Je=RegExp(Me+"(?="+Me+")|"+Ye+je,"g"),$e=RegExp([Ne+"?"+Oe+"+"+Ke+"(?="+[Le,Ne,"$"].join("|")+")",Ge+"+"+Ve+"(?="+[Le,Ne+Pe,"$"].join("|")+")",Ne+"?"+Pe+"+"+Ke,Ne+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Xe].join("|"),"g"),et=RegExp("["+De+ye+Be+Fe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,At=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[O]=it[H]=it[M]=it[_]=it[k]=it[R]=it[N]=it[D]=it[P]=!0,it[g]=it[p]=it[I]=it[v]=it[U]=it[m]=it[C]=it[w]=it[B]=it[E]=it[x]=it[F]=it[S]=it[T]=it[Q]=!1;var rt={};rt[g]=rt[p]=rt[I]=rt[U]=rt[v]=rt[m]=rt[O]=rt[H]=rt[M]=rt[_]=rt[k]=rt[B]=rt[E]=rt[x]=rt[F]=rt[S]=rt[T]=rt[L]=rt[R]=rt[N]=rt[D]=rt[P]=!0,rt[C]=rt[w]=rt[Q]=!1;var ot={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,at=parseInt,lt="object"==typeof A.g&&A.g&&A.g.Object===Object&&A.g,ut="object"==typeof self&&self&&self.Object===Object&&self,ct=lt||ut||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,ft=dt&&dt.exports===ht,gt=ft&&lt.process,pt=function(){try{return dt&&dt.require&&dt.require("util").types||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),vt=pt&&pt.isArrayBuffer,mt=pt&&pt.isDate,Ct=pt&&pt.isMap,wt=pt&&pt.isRegExp,yt=pt&&pt.isSet,Bt=pt&&pt.isTypedArray;function Et(e,t,A){switch(A.length){case 0:return e.call(t);case 1:return e.call(t,A[0]);case 2:return e.call(t,A[0],A[1]);case 3:return e.call(t,A[0],A[1],A[2])}return e.apply(t,A)}function xt(e,t,A,n){for(var i=-1,r=null==e?0:e.length;++i<r;){var o=e[i];t(n,o,A(o),e)}return n}function bt(e,t){for(var A=-1,n=null==e?0:e.length;++A<n&&!1!==t(e[A],A,e););return e}function Ft(e,t){for(var A=null==e?0:e.length;A--&&!1!==t(e[A],A,e););return e}function St(e,t){for(var A=-1,n=null==e?0:e.length;++A<n;)if(!t(e[A],A,e))return!1;return!0}function Tt(e,t){for(var A=-1,n=null==e?0:e.length,i=0,r=[];++A<n;){var o=e[A];t(o,A,e)&&(r[i++]=o)}return r}function Lt(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Qt(e,t,A){for(var n=-1,i=null==e?0:e.length;++n<i;)if(A(t,e[n]))return!0;return!1}function It(e,t){for(var A=-1,n=null==e?0:e.length,i=Array(n);++A<n;)i[A]=t(e[A],A,e);return i}function Ut(e,t){for(var A=-1,n=t.length,i=e.length;++A<n;)e[i+A]=t[A];return e}function Ot(e,t,A,n){var i=-1,r=null==e?0:e.length;for(n&&r&&(A=e[++i]);++i<r;)A=t(A,e[i],i,e);return A}function Ht(e,t,A,n){var i=null==e?0:e.length;for(n&&i&&(A=e[--i]);i--;)A=t(A,e[i],i,e);return A}function Mt(e,t){for(var A=-1,n=null==e?0:e.length;++A<n;)if(t(e[A],A,e))return!0;return!1}var _t=Kt("length");function kt(e,t,A){var n;return A(e,function(e,A,i){if(t(e,A,i))return n=A,!1}),n}function Rt(e,t,A,n){for(var i=e.length,r=A+(n?1:-1);n?r--:++r<i;)if(t(e[r],r,e))return r;return-1}function Nt(e,t,A){return t==t?function(e,t,A){for(var n=A-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,A):Rt(e,Pt,A)}function Dt(e,t,A,n){for(var i=A-1,r=e.length;++i<r;)if(n(e[i],t))return i;return-1}function Pt(e){return e!=e}function Gt(e,t){var A=null==e?0:e.length;return A?Wt(e,t)/A:h}function Kt(e){return function(t){return null==t?i:t[e]}}function Vt(e){return function(t){return null==e?i:e[t]}}function zt(e,t,A,n,i){return i(e,function(e,i,r){A=n?(n=!1,e):t(A,e,i,r)}),A}function Wt(e,t){for(var A,n=-1,r=e.length;++n<r;){var o=t(e[n]);o!==i&&(A=A===i?o:A+o)}return A}function jt(e,t){for(var A=-1,n=Array(e);++A<e;)n[A]=t(A);return n}function Xt(e){return e?e.slice(0,cA(e)+1).replace(ne,""):e}function Yt(e){return function(t){return e(t)}}function qt(e,t){return It(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var A=-1,n=e.length;++A<n&&Nt(t,e[A],0)>-1;);return A}function $t(e,t){for(var A=e.length;A--&&Nt(t,e[A],0)>-1;);return A}var eA=Vt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tA=Vt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function AA(e){return"\\"+ot[e]}function nA(e){return et.test(e)}function iA(e){var t=-1,A=Array(e.size);return e.forEach(function(e,n){A[++t]=[n,e]}),A}function rA(e,t){return function(A){return e(t(A))}}function oA(e,t){for(var A=-1,n=e.length,i=0,r=[];++A<n;){var o=e[A];o!==t&&o!==s||(e[A]=s,r[i++]=A)}return r}function sA(e){var t=-1,A=Array(e.size);return e.forEach(function(e){A[++t]=e}),A}function aA(e){var t=-1,A=Array(e.size);return e.forEach(function(e){A[++t]=[e,e]}),A}function lA(e){return nA(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):_t(e)}function uA(e){return nA(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function cA(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var hA=Vt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dA=function e(t){var A,n=(t=null==t?ct:dA.defaults(ct.Object(),t,dA.pick(ct,At))).Array,ie=t.Date,ye=t.Error,Be=t.Function,Ee=t.Math,xe=t.Object,be=t.RegExp,Fe=t.String,Se=t.TypeError,Te=n.prototype,Le=xe.prototype,Qe=t["__core-js_shared__"],Ie=Be.prototype.toString,Ue=Le.hasOwnProperty,Oe=0,He=(A=/[^.]+$/.exec(Qe&&Qe.keys&&Qe.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",Me=Le.toString,_e=Ie.call(xe),ke=ct._,Re=be("^"+Ie.call(Ue).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ne=ft?t.Buffer:i,De=t.Symbol,Pe=t.Uint8Array,Ge=Ne?Ne.allocUnsafe:i,Ke=rA(xe.getPrototypeOf,xe),Ve=xe.create,ze=Le.propertyIsEnumerable,We=Te.splice,je=De?De.isConcatSpreadable:i,Xe=De?De.iterator:i,Ye=De?De.toStringTag:i,Je=function(){try{var e=sr(xe,"defineProperty");return e({},"",{}),e}catch(e){}}(),et=t.clearTimeout!==ct.clearTimeout&&t.clearTimeout,ot=ie&&ie.now!==ct.Date.now&&ie.now,lt=t.setTimeout!==ct.setTimeout&&t.setTimeout,ut=Ee.ceil,ht=Ee.floor,dt=xe.getOwnPropertySymbols,gt=Ne?Ne.isBuffer:i,pt=t.isFinite,_t=Te.join,Vt=rA(xe.keys,xe),fA=Ee.max,gA=Ee.min,pA=ie.now,vA=t.parseInt,mA=Ee.random,CA=Te.reverse,wA=sr(t,"DataView"),yA=sr(t,"Map"),BA=sr(t,"Promise"),EA=sr(t,"Set"),xA=sr(t,"WeakMap"),bA=sr(xe,"create"),FA=xA&&new xA,SA={},TA=Mr(wA),LA=Mr(yA),QA=Mr(BA),IA=Mr(EA),UA=Mr(xA),OA=De?De.prototype:i,HA=OA?OA.valueOf:i,MA=OA?OA.toString:i;function _A(e){if($o(e)&&!Go(e)&&!(e instanceof DA)){if(e instanceof NA)return e;if(Ue.call(e,"__wrapped__"))return _r(e)}return new NA(e)}var kA=function(){function e(){}return function(t){if(!Jo(t))return{};if(Ve)return Ve(t);e.prototype=t;var A=new e;return e.prototype=i,A}}();function RA(){}function NA(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function DA(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function PA(e){var t=-1,A=null==e?0:e.length;for(this.clear();++t<A;){var n=e[t];this.set(n[0],n[1])}}function GA(e){var t=-1,A=null==e?0:e.length;for(this.clear();++t<A;){var n=e[t];this.set(n[0],n[1])}}function KA(e){var t=-1,A=null==e?0:e.length;for(this.clear();++t<A;){var n=e[t];this.set(n[0],n[1])}}function VA(e){var t=-1,A=null==e?0:e.length;for(this.__data__=new KA;++t<A;)this.add(e[t])}function zA(e){var t=this.__data__=new GA(e);this.size=t.size}function WA(e,t){var A=Go(e),n=!A&&Po(e),i=!A&&!n&&Wo(e),r=!A&&!n&&!i&&ss(e),o=A||n||i||r,s=o?jt(e.length,Fe):[],a=s.length;for(var l in e)!t&&!Ue.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||fr(l,a))||s.push(l);return s}function jA(e){var t=e.length;return t?e[Vn(0,t-1)]:i}function XA(e,t){return Qr(bi(e),nn(t,0,e.length))}function YA(e){return Qr(bi(e))}function qA(e,t,A){(A!==i&&!Ro(e[t],A)||A===i&&!(t in e))&&tn(e,t,A)}function ZA(e,t,A){var n=e[t];Ue.call(e,t)&&Ro(n,A)&&(A!==i||t in e)||tn(e,t,A)}function JA(e,t){for(var A=e.length;A--;)if(Ro(e[A][0],t))return A;return-1}function $A(e,t,A,n){return ln(e,function(e,i,r){t(n,e,A(e),r)}),n}function en(e,t){return e&&Fi(t,Ls(t),e)}function tn(e,t,A){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:A,writable:!0}):e[t]=A}function An(e,t){for(var A=-1,r=t.length,o=n(r),s=null==e;++A<r;)o[A]=s?i:xs(e,t[A]);return o}function nn(e,t,A){return e==e&&(A!==i&&(e=e<=A?e:A),t!==i&&(e=e>=t?e:t)),e}function rn(e,t,A,n,r,o){var s,a=1&t,l=2&t,u=4&t;if(A&&(s=r?A(e,n,r,o):A(e)),s!==i)return s;if(!Jo(e))return e;var c=Go(e);if(c){if(s=function(e){var t=e.length,A=new e.constructor(t);return t&&"string"==typeof e[0]&&Ue.call(e,"index")&&(A.index=e.index,A.input=e.input),A}(e),!a)return bi(e,s)}else{var h=ur(e),d=h==w||h==y;if(Wo(e))return Ci(e,a);if(h==x||h==g||d&&!r){if(s=l||d?{}:hr(e),!a)return l?function(e,t){return Fi(e,lr(e),t)}(e,function(e,t){return e&&Fi(t,Qs(t),e)}(s,e)):function(e,t){return Fi(e,ar(e),t)}(e,en(s,e))}else{if(!rt[h])return r?e:{};s=function(e,t,A){var n=e.constructor;switch(t){case I:return wi(e);case v:case m:return new n(+e);case U:return function(e,t){var A=t?wi(e.buffer):e.buffer;return new e.constructor(A,e.byteOffset,e.byteLength)}(e,A);case O:case H:case M:case _:case k:case R:case N:case D:case P:return yi(e,A);case B:return new n;case E:case T:return new n(e);case F:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new n;case L:return HA?xe(HA.call(e)):{}}}(e,h,a)}}o||(o=new zA);var f=o.get(e);if(f)return f;o.set(e,s),is(e)?e.forEach(function(n){s.add(rn(n,t,A,n,e,o))}):es(e)&&e.forEach(function(n,i){s.set(i,rn(n,t,A,i,e,o))});var p=c?i:(u?l?er:$i:l?Qs:Ls)(e);return bt(p||e,function(n,i){p&&(n=e[i=n]),ZA(s,i,rn(n,t,A,i,e,o))}),s}function on(e,t,A){var n=A.length;if(null==e)return!n;for(e=xe(e);n--;){var r=A[n],o=e[r];if(o===i&&!(r in e)||!(0,t[r])(o))return!1}return!0}function sn(e,t,A){if("function"!=typeof e)throw new Se(r);return Fr(function(){e.apply(i,A)},t)}function an(e,t,A,n){var i=-1,r=Lt,o=!0,s=e.length,a=[],l=t.length;if(!s)return a;A&&(t=It(t,Yt(A))),n?(r=Qt,o=!1):t.length>=200&&(r=Zt,o=!1,t=new VA(t));e:for(;++i<s;){var u=e[i],c=null==A?u:A(u);if(u=n||0!==u?u:0,o&&c==c){for(var h=l;h--;)if(t[h]===c)continue e;a.push(u)}else r(t,c,n)||a.push(u)}return a}_A.templateSettings={escape:Y,evaluate:q,interpolate:Z,variable:"",imports:{_:_A}},(_A.prototype=RA.prototype).constructor=_A,(NA.prototype=kA(RA.prototype)).constructor=NA,(DA.prototype=kA(RA.prototype)).constructor=DA,PA.prototype.clear=function(){this.__data__=bA?bA(null):{},this.size=0},PA.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},PA.prototype.get=function(e){var t=this.__data__;if(bA){var A=t[e];return A===o?i:A}return Ue.call(t,e)?t[e]:i},PA.prototype.has=function(e){var t=this.__data__;return bA?t[e]!==i:Ue.call(t,e)},PA.prototype.set=function(e,t){var A=this.__data__;return this.size+=this.has(e)?0:1,A[e]=bA&&t===i?o:t,this},GA.prototype.clear=function(){this.__data__=[],this.size=0},GA.prototype.delete=function(e){var t=this.__data__,A=JA(t,e);return!(A<0||(A==t.length-1?t.pop():We.call(t,A,1),--this.size,0))},GA.prototype.get=function(e){var t=this.__data__,A=JA(t,e);return A<0?i:t[A][1]},GA.prototype.has=function(e){return JA(this.__data__,e)>-1},GA.prototype.set=function(e,t){var A=this.__data__,n=JA(A,e);return n<0?(++this.size,A.push([e,t])):A[n][1]=t,this},KA.prototype.clear=function(){this.size=0,this.__data__={hash:new PA,map:new(yA||GA),string:new PA}},KA.prototype.delete=function(e){var t=rr(this,e).delete(e);return this.size-=t?1:0,t},KA.prototype.get=function(e){return rr(this,e).get(e)},KA.prototype.has=function(e){return rr(this,e).has(e)},KA.prototype.set=function(e,t){var A=rr(this,e),n=A.size;return A.set(e,t),this.size+=A.size==n?0:1,this},VA.prototype.add=VA.prototype.push=function(e){return this.__data__.set(e,o),this},VA.prototype.has=function(e){return this.__data__.has(e)},zA.prototype.clear=function(){this.__data__=new GA,this.size=0},zA.prototype.delete=function(e){var t=this.__data__,A=t.delete(e);return this.size=t.size,A},zA.prototype.get=function(e){return this.__data__.get(e)},zA.prototype.has=function(e){return this.__data__.has(e)},zA.prototype.set=function(e,t){var A=this.__data__;if(A instanceof GA){var n=A.__data__;if(!yA||n.length<199)return n.push([e,t]),this.size=++A.size,this;A=this.__data__=new KA(n)}return A.set(e,t),this.size=A.size,this};var ln=Li(vn),un=Li(mn,!0);function cn(e,t){var A=!0;return ln(e,function(e,n,i){return A=!!t(e,n,i)}),A}function hn(e,t,A){for(var n=-1,r=e.length;++n<r;){var o=e[n],s=t(o);if(null!=s&&(a===i?s==s&&!os(s):A(s,a)))var a=s,l=o}return l}function dn(e,t){var A=[];return ln(e,function(e,n,i){t(e,n,i)&&A.push(e)}),A}function fn(e,t,A,n,i){var r=-1,o=e.length;for(A||(A=dr),i||(i=[]);++r<o;){var s=e[r];t>0&&A(s)?t>1?fn(s,t-1,A,n,i):Ut(i,s):n||(i[i.length]=s)}return i}var gn=Qi(),pn=Qi(!0);function vn(e,t){return e&&gn(e,t,Ls)}function mn(e,t){return e&&pn(e,t,Ls)}function Cn(e,t){return Tt(t,function(t){return Yo(e[t])})}function wn(e,t){for(var A=0,n=(t=gi(t,e)).length;null!=e&&A<n;)e=e[Hr(t[A++])];return A&&A==n?e:i}function yn(e,t,A){var n=t(e);return Go(e)?n:Ut(n,A(e))}function Bn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ye&&Ye in xe(e)?function(e){var t=Ue.call(e,Ye),A=e[Ye];try{e[Ye]=i;var n=!0}catch(e){}var r=Me.call(e);return n&&(t?e[Ye]=A:delete e[Ye]),r}(e):function(e){return Me.call(e)}(e)}function En(e,t){return e>t}function xn(e,t){return null!=e&&Ue.call(e,t)}function bn(e,t){return null!=e&&t in xe(e)}function Fn(e,t,A){for(var r=A?Qt:Lt,o=e[0].length,s=e.length,a=s,l=n(s),u=1/0,c=[];a--;){var h=e[a];a&&t&&(h=It(h,Yt(t))),u=gA(h.length,u),l[a]=!A&&(t||o>=120&&h.length>=120)?new VA(a&&h):i}h=e[0];var d=-1,f=l[0];e:for(;++d<o&&c.length<u;){var g=h[d],p=t?t(g):g;if(g=A||0!==g?g:0,!(f?Zt(f,p):r(c,p,A))){for(a=s;--a;){var v=l[a];if(!(v?Zt(v,p):r(e[a],p,A)))continue e}f&&f.push(p),c.push(g)}}return c}function Sn(e,t,A){var n=null==(e=Er(e,t=gi(t,e)))?e:e[Hr(jr(t))];return null==n?i:Et(n,e,A)}function Tn(e){return $o(e)&&Bn(e)==g}function Ln(e,t,A,n,r){return e===t||(null==e||null==t||!$o(e)&&!$o(t)?e!=e&&t!=t:function(e,t,A,n,r,o){var s=Go(e),a=Go(t),l=s?p:ur(e),u=a?p:ur(t),c=(l=l==g?x:l)==x,h=(u=u==g?x:u)==x,d=l==u;if(d&&Wo(e)){if(!Wo(t))return!1;s=!0,c=!1}if(d&&!c)return o||(o=new zA),s||ss(e)?Zi(e,t,A,n,r,o):function(e,t,A,n,i,r,o){switch(A){case U:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!r(new Pe(e),new Pe(t)));case v:case m:case E:return Ro(+e,+t);case C:return e.name==t.name&&e.message==t.message;case F:case T:return e==t+"";case B:var s=iA;case S:if(s||(s=sA),e.size!=t.size&&!(1&n))return!1;var a=o.get(e);if(a)return a==t;n|=2,o.set(e,t);var l=Zi(s(e),s(t),n,i,r,o);return o.delete(e),l;case L:if(HA)return HA.call(e)==HA.call(t)}return!1}(e,t,l,A,n,r,o);if(!(1&A)){var f=c&&Ue.call(e,"__wrapped__"),w=h&&Ue.call(t,"__wrapped__");if(f||w){var y=f?e.value():e,b=w?t.value():t;return o||(o=new zA),r(y,b,A,n,o)}}return!!d&&(o||(o=new zA),function(e,t,A,n,r,o){var s=1&A,a=$i(e),l=a.length;if(l!=$i(t).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in t:Ue.call(t,c)))return!1}var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var g=s;++u<l;){var p=e[c=a[u]],v=t[c];if(n)var m=s?n(v,p,c,t,e,o):n(p,v,c,e,t,o);if(!(m===i?p===v||r(p,v,A,n,o):m)){f=!1;break}g||(g="constructor"==c)}if(f&&!g){var C=e.constructor,w=t.constructor;C==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof C&&C instanceof C&&"function"==typeof w&&w instanceof w||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,A,n,r,o))}(e,t,A,n,Ln,r))}function Qn(e,t,A,n){var r=A.length,o=r,s=!n;if(null==e)return!o;for(e=xe(e);r--;){var a=A[r];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<o;){var l=(a=A[r])[0],u=e[l],c=a[1];if(s&&a[2]){if(u===i&&!(l in e))return!1}else{var h=new zA;if(n)var d=n(u,c,l,e,t,h);if(!(d===i?Ln(c,u,3,n,h):d))return!1}}return!0}function In(e){return!(!Jo(e)||(t=e,He&&He in t))&&(Yo(e)?Re:ge).test(Mr(e));var t}function Un(e){return"function"==typeof e?e:null==e?ta:"object"==typeof e?Go(e)?kn(e[0],e[1]):_n(e):ua(e)}function On(e){if(!Cr(e))return Vt(e);var t=[];for(var A in xe(e))Ue.call(e,A)&&"constructor"!=A&&t.push(A);return t}function Hn(e,t){return e<t}function Mn(e,t){var A=-1,i=Vo(e)?n(e.length):[];return ln(e,function(e,n,r){i[++A]=t(e,n,r)}),i}function _n(e){var t=or(e);return 1==t.length&&t[0][2]?yr(t[0][0],t[0][1]):function(A){return A===e||Qn(A,e,t)}}function kn(e,t){return pr(e)&&wr(t)?yr(Hr(e),t):function(A){var n=xs(A,e);return n===i&&n===t?bs(A,e):Ln(t,n,3)}}function Rn(e,t,A,n,r){e!==t&&gn(t,function(o,s){if(r||(r=new zA),Jo(o))!function(e,t,A,n,r,o,s){var a=xr(e,A),l=xr(t,A),u=s.get(l);if(u)qA(e,A,u);else{var c=o?o(a,l,A+"",e,t,s):i,h=c===i;if(h){var d=Go(l),f=!d&&Wo(l),g=!d&&!f&&ss(l);c=l,d||f||g?Go(a)?c=a:zo(a)?c=bi(a):f?(h=!1,c=Ci(l,!0)):g?(h=!1,c=yi(l,!0)):c=[]:As(l)||Po(l)?(c=a,Po(a)?c=gs(a):Jo(a)&&!Yo(a)||(c=hr(l))):h=!1}h&&(s.set(l,c),r(c,l,n,o,s),s.delete(l)),qA(e,A,c)}}(e,t,s,A,Rn,n,r);else{var a=n?n(xr(e,s),o,s+"",e,t,r):i;a===i&&(a=o),qA(e,s,a)}},Qs)}function Nn(e,t){var A=e.length;if(A)return fr(t+=t<0?A:0,A)?e[t]:i}function Dn(e,t,A){t=t.length?It(t,function(e){return Go(e)?function(t){return wn(t,1===e.length?e[0]:e)}:e}):[ta];var n=-1;t=It(t,Yt(ir()));var i=Mn(e,function(e,A,i){var r=It(t,function(t){return t(e)});return{criteria:r,index:++n,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,A){for(var n=-1,i=e.criteria,r=t.criteria,o=i.length,s=A.length;++n<o;){var a=Bi(i[n],r[n]);if(a)return n>=s?a:a*("desc"==A[n]?-1:1)}return e.index-t.index}(e,t,A)});t--;)e[t]=e[t].value;return e}(i)}function Pn(e,t,A){for(var n=-1,i=t.length,r={};++n<i;){var o=t[n],s=wn(e,o);A(s,o)&&Yn(r,gi(o,e),s)}return r}function Gn(e,t,A,n){var i=n?Dt:Nt,r=-1,o=t.length,s=e;for(e===t&&(t=bi(t)),A&&(s=It(e,Yt(A)));++r<o;)for(var a=0,l=t[r],u=A?A(l):l;(a=i(s,u,a,n))>-1;)s!==e&&We.call(s,a,1),We.call(e,a,1);return e}function Kn(e,t){for(var A=e?t.length:0,n=A-1;A--;){var i=t[A];if(A==n||i!==r){var r=i;fr(i)?We.call(e,i,1):si(e,i)}}return e}function Vn(e,t){return e+ht(mA()*(t-e+1))}function zn(e,t){var A="";if(!e||t<1||t>c)return A;do{t%2&&(A+=e),(t=ht(t/2))&&(e+=e)}while(t);return A}function Wn(e,t){return Sr(Br(e,t,ta),e+"")}function jn(e){return jA(Rs(e))}function Xn(e,t){var A=Rs(e);return Qr(A,nn(t,0,A.length))}function Yn(e,t,A,n){if(!Jo(e))return e;for(var r=-1,o=(t=gi(t,e)).length,s=o-1,a=e;null!=a&&++r<o;){var l=Hr(t[r]),u=A;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(r!=s){var c=a[l];(u=n?n(c,l,a):i)===i&&(u=Jo(c)?c:fr(t[r+1])?[]:{})}ZA(a,l,u),a=a[l]}return e}var qn=FA?function(e,t){return FA.set(e,t),e}:ta,Zn=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:Js(t),writable:!0})}:ta;function Jn(e){return Qr(Rs(e))}function $n(e,t,A){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(A=A>r?r:A)<0&&(A+=r),r=t>A?0:A-t>>>0,t>>>=0;for(var o=n(r);++i<r;)o[i]=e[i+t];return o}function ei(e,t){var A;return ln(e,function(e,n,i){return!(A=t(e,n,i))}),!!A}function ti(e,t,A){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var r=n+i>>>1,o=e[r];null!==o&&!os(o)&&(A?o<=t:o<t)?n=r+1:i=r}return i}return Ai(e,t,ta,A)}function Ai(e,t,A,n){var r=0,o=null==e?0:e.length;if(0===o)return 0;for(var s=(t=A(t))!=t,a=null===t,l=os(t),u=t===i;r<o;){var c=ht((r+o)/2),h=A(e[c]),d=h!==i,f=null===h,g=h==h,p=os(h);if(s)var v=n||g;else v=u?g&&(n||d):a?g&&d&&(n||!f):l?g&&d&&!f&&(n||!p):!f&&!p&&(n?h<=t:h<t);v?r=c+1:o=c}return gA(o,4294967294)}function ni(e,t){for(var A=-1,n=e.length,i=0,r=[];++A<n;){var o=e[A],s=t?t(o):o;if(!A||!Ro(s,a)){var a=s;r[i++]=0===o?0:o}}return r}function ii(e){return"number"==typeof e?e:os(e)?h:+e}function ri(e){if("string"==typeof e)return e;if(Go(e))return It(e,ri)+"";if(os(e))return MA?MA.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function oi(e,t,A){var n=-1,i=Lt,r=e.length,o=!0,s=[],a=s;if(A)o=!1,i=Qt;else if(r>=200){var l=t?null:zi(e);if(l)return sA(l);o=!1,i=Zt,a=new VA}else a=t?[]:s;e:for(;++n<r;){var u=e[n],c=t?t(u):u;if(u=A||0!==u?u:0,o&&c==c){for(var h=a.length;h--;)if(a[h]===c)continue e;t&&a.push(c),s.push(u)}else i(a,c,A)||(a!==s&&a.push(c),s.push(u))}return s}function si(e,t){var A=-1,n=(t=gi(t,e)).length;if(!n)return!0;for(var i=null==e||"object"!=typeof e&&"function"!=typeof e;++A<n;){var r=t[A];if("string"==typeof r){if("__proto__"===r&&!Ue.call(e,"__proto__"))return!1;if("constructor"===r&&A+1<n&&"string"==typeof t[A+1]&&"prototype"===t[A+1]){if(i&&0===A)continue;return!1}}}var o=Er(e,t);return null==o||delete o[Hr(jr(t))]}function ai(e,t,A,n){return Yn(e,t,A(wn(e,t)),n)}function li(e,t,A,n){for(var i=e.length,r=n?i:-1;(n?r--:++r<i)&&t(e[r],r,e););return A?$n(e,n?0:r,n?r+1:i):$n(e,n?r+1:0,n?i:r)}function ui(e,t){var A=e;return A instanceof DA&&(A=A.value()),Ot(t,function(e,t){return t.func.apply(t.thisArg,Ut([e],t.args))},A)}function ci(e,t,A){var i=e.length;if(i<2)return i?oi(e[0]):[];for(var r=-1,o=n(i);++r<i;)for(var s=e[r],a=-1;++a<i;)a!=r&&(o[r]=an(o[r]||s,e[a],t,A));return oi(fn(o,1),t,A)}function hi(e,t,A){for(var n=-1,r=e.length,o=t.length,s={};++n<r;)A(s,e[n],n<o?t[n]:i);return s}function di(e){return zo(e)?e:[]}function fi(e){return"function"==typeof e?e:ta}function gi(e,t){return Go(e)?e:pr(e,t)?[e]:Or(ps(e))}var pi=Wn;function vi(e,t,A){var n=e.length;return A=A===i?n:A,!t&&A>=n?e:$n(e,t,A)}var mi=et||function(e){return ct.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var A=e.length,n=Ge?Ge(A):new e.constructor(A);return e.copy(n),n}function wi(e){var t=new e.constructor(e.byteLength);return new Pe(t).set(new Pe(e)),t}function yi(e,t){var A=t?wi(e.buffer):e.buffer;return new e.constructor(A,e.byteOffset,e.length)}function Bi(e,t){if(e!==t){var A=e!==i,n=null===e,r=e==e,o=os(e),s=t!==i,a=null===t,l=t==t,u=os(t);if(!a&&!u&&!o&&e>t||o&&s&&l&&!a&&!u||n&&s&&l||!A&&l||!r)return 1;if(!n&&!o&&!u&&e<t||u&&A&&r&&!n&&!o||a&&A&&r||!s&&r||!l)return-1}return 0}function Ei(e,t,A,i){for(var r=-1,o=e.length,s=A.length,a=-1,l=t.length,u=fA(o-s,0),c=n(l+u),h=!i;++a<l;)c[a]=t[a];for(;++r<s;)(h||r<o)&&(c[A[r]]=e[r]);for(;u--;)c[a++]=e[r++];return c}function xi(e,t,A,i){for(var r=-1,o=e.length,s=-1,a=A.length,l=-1,u=t.length,c=fA(o-a,0),h=n(c+u),d=!i;++r<c;)h[r]=e[r];for(var f=r;++l<u;)h[f+l]=t[l];for(;++s<a;)(d||r<o)&&(h[f+A[s]]=e[r++]);return h}function bi(e,t){var A=-1,i=e.length;for(t||(t=n(i));++A<i;)t[A]=e[A];return t}function Fi(e,t,A,n){var r=!A;A||(A={});for(var o=-1,s=t.length;++o<s;){var a=t[o],l=n?n(A[a],e[a],a,A,e):i;l===i&&(l=e[a]),r?tn(A,a,l):ZA(A,a,l)}return A}function Si(e,t){return function(A,n){var i=Go(A)?xt:$A,r=t?t():{};return i(A,e,ir(n,2),r)}}function Ti(e){return Wn(function(t,A){var n=-1,r=A.length,o=r>1?A[r-1]:i,s=r>2?A[2]:i;for(o=e.length>3&&"function"==typeof o?(r--,o):i,s&&gr(A[0],A[1],s)&&(o=r<3?i:o,r=1),t=xe(t);++n<r;){var a=A[n];a&&e(t,a,n,o)}return t})}function Li(e,t){return function(A,n){if(null==A)return A;if(!Vo(A))return e(A,n);for(var i=A.length,r=t?i:-1,o=xe(A);(t?r--:++r<i)&&!1!==n(o[r],r,o););return A}}function Qi(e){return function(t,A,n){for(var i=-1,r=xe(t),o=n(t),s=o.length;s--;){var a=o[e?s:++i];if(!1===A(r[a],a,r))break}return t}}function Ii(e){return function(t){var A=nA(t=ps(t))?uA(t):i,n=A?A[0]:t.charAt(0),r=A?vi(A,1).join(""):t.slice(1);return n[e]()+r}}function Ui(e){return function(t){return Ot(Ys(Ps(t).replace(qe,"")),e,"")}}function Oi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var A=kA(e.prototype),n=e.apply(A,t);return Jo(n)?n:A}}function Hi(e){return function(t,A,n){var r=xe(t);if(!Vo(t)){var o=ir(A,3);t=Ls(t),A=function(e){return o(r[e],e,r)}}var s=e(t,A,n);return s>-1?r[o?t[s]:s]:i}}function Mi(e){return Ji(function(t){var A=t.length,n=A,o=NA.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Se(r);if(o&&!a&&"wrapper"==Ar(s))var a=new NA([],!0)}for(n=a?n:A;++n<A;){var l=Ar(s=t[n]),u="wrapper"==l?tr(s):i;a=u&&vr(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?a[Ar(u[0])].apply(a,u[3]):1==s.length&&vr(s)?a[l]():a.thru(s)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&Go(n))return a.plant(n).value();for(var i=0,r=A?t[i].apply(this,e):n;++i<A;)r=t[i].call(this,r);return r}})}function _i(e,t,A,r,o,s,a,u,c,h){var d=t&l,f=1&t,g=2&t,p=24&t,v=512&t,m=g?i:Oi(e);return function l(){for(var C=arguments.length,w=n(C),y=C;y--;)w[y]=arguments[y];if(p)var B=nr(l),E=function(e,t){for(var A=e.length,n=0;A--;)e[A]===t&&++n;return n}(w,B);if(r&&(w=Ei(w,r,o,p)),s&&(w=xi(w,s,a,p)),C-=E,p&&C<h){var x=oA(w,B);return Ki(e,t,_i,l.placeholder,A,w,x,u,c,h-C)}var b=f?A:this,F=g?b[e]:e;return C=w.length,u?w=function(e,t){for(var A=e.length,n=gA(t.length,A),r=bi(e);n--;){var o=t[n];e[n]=fr(o,A)?r[o]:i}return e}(w,u):v&&C>1&&w.reverse(),d&&c<C&&(w.length=c),this&&this!==ct&&this instanceof l&&(F=m||Oi(F)),F.apply(b,w)}}function ki(e,t){return function(A,n){return function(e,t,A,n){return vn(e,function(e,i,r){t(n,A(e),i,r)}),n}(A,e,t(n),{})}}function Ri(e,t){return function(A,n){var r;if(A===i&&n===i)return t;if(A!==i&&(r=A),n!==i){if(r===i)return n;"string"==typeof A||"string"==typeof n?(A=ri(A),n=ri(n)):(A=ii(A),n=ii(n)),r=e(A,n)}return r}}function Ni(e){return Ji(function(t){return t=It(t,Yt(ir())),Wn(function(A){var n=this;return e(t,function(e){return Et(e,n,A)})})})}function Di(e,t){var A=(t=t===i?" ":ri(t)).length;if(A<2)return A?zn(t,e):t;var n=zn(t,ut(e/lA(t)));return nA(t)?vi(uA(n),0,e).join(""):n.slice(0,e)}function Pi(e){return function(t,A,r){return r&&"number"!=typeof r&&gr(t,A,r)&&(A=r=i),t=cs(t),A===i?(A=t,t=0):A=cs(A),function(e,t,A,i){for(var r=-1,o=fA(ut((t-e)/(A||1)),0),s=n(o);o--;)s[i?o:++r]=e,e+=A;return s}(t,A,r=r===i?t<A?1:-1:cs(r),e)}}function Gi(e){return function(t,A){return"string"==typeof t&&"string"==typeof A||(t=fs(t),A=fs(A)),e(t,A)}}function Ki(e,t,A,n,r,o,s,l,u,c){var h=8&t;t|=h?a:64,4&(t&=~(h?64:a))||(t&=-4);var d=[e,t,r,h?o:i,h?s:i,h?i:o,h?i:s,l,u,c],f=A.apply(i,d);return vr(e)&&br(f,d),f.placeholder=n,Tr(f,e,t)}function Vi(e){var t=Ee[e];return function(e,A){if(e=fs(e),(A=null==A?0:gA(hs(A),292))&&pt(e)){var n=(ps(e)+"e").split("e");return+((n=(ps(t(n[0]+"e"+(+n[1]+A)))+"e").split("e"))[0]+"e"+(+n[1]-A))}return t(e)}}var zi=EA&&1/sA(new EA([,-0]))[1]==u?function(e){return new EA(e)}:oa;function Wi(e){return function(t){var A=ur(t);return A==B?iA(t):A==S?aA(t):function(e,t){return It(t,function(t){return[t,e[t]]})}(t,e(t))}}function ji(e,t,A,o,u,c,h,d){var f=2&t;if(!f&&"function"!=typeof e)throw new Se(r);var g=o?o.length:0;if(g||(t&=-97,o=u=i),h=h===i?h:fA(hs(h),0),d=d===i?d:hs(d),g-=u?u.length:0,64&t){var p=o,v=u;o=u=i}var m=f?i:tr(e),C=[e,t,A,o,u,p,v,c,h,d];if(m&&function(e,t){var A=e[1],n=t[1],i=A|n;if(!(i<131||(n==l&&8==A||n==l&&256==A&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==A)))return e;1&n&&(e[2]=t[2],i|=1&A?0:4);var r=t[3];if(r){var o=e[3];e[3]=o?Ei(o,r,t[4]):r,e[4]=o?oA(e[3],s):t[4]}(r=t[5])&&(e[5]=(o=e[5])?xi(o,r,t[6]):r,e[6]=o?oA(e[5],s):t[6]),(r=t[7])&&(e[7]=r),n&l&&(e[8]=null==e[8]?t[8]:gA(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(C,m),e=C[0],t=C[1],A=C[2],o=C[3],u=C[4],!(d=C[9]=C[9]===i?f?0:e.length:fA(C[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,A){var r=Oi(e);return function o(){for(var s=arguments.length,a=n(s),l=s,u=nr(o);l--;)a[l]=arguments[l];var c=s<3&&a[0]!==u&&a[s-1]!==u?[]:oA(a,u);return(s-=c.length)<A?Ki(e,t,_i,o.placeholder,i,a,c,i,i,A-s):Et(this&&this!==ct&&this instanceof o?r:e,this,a)}}(e,t,d):t!=a&&33!=t||u.length?_i.apply(i,C):function(e,t,A,i){var r=1&t,o=Oi(e);return function t(){for(var s=-1,a=arguments.length,l=-1,u=i.length,c=n(u+a),h=this&&this!==ct&&this instanceof t?o:e;++l<u;)c[l]=i[l];for(;a--;)c[l++]=arguments[++s];return Et(h,r?A:this,c)}}(e,t,A,o);else var w=function(e,t,A){var n=1&t,i=Oi(e);return function t(){return(this&&this!==ct&&this instanceof t?i:e).apply(n?A:this,arguments)}}(e,t,A);return Tr((m?qn:br)(w,C),e,t)}function Xi(e,t,A,n){return e===i||Ro(e,Le[A])&&!Ue.call(n,A)?t:e}function Yi(e,t,A,n,r,o){return Jo(e)&&Jo(t)&&(o.set(t,e),Rn(e,t,i,Yi,o),o.delete(t)),e}function qi(e){return As(e)?i:e}function Zi(e,t,A,n,r,o){var s=1&A,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=2&A?new VA:i;for(o.set(e,t),o.set(t,e);++h<a;){var g=e[h],p=t[h];if(n)var v=s?n(p,g,h,t,e,o):n(g,p,h,e,t,o);if(v!==i){if(v)continue;d=!1;break}if(f){if(!Mt(t,function(e,t){if(!Zt(f,t)&&(g===e||r(g,e,A,n,o)))return f.push(t)})){d=!1;break}}else if(g!==p&&!r(g,p,A,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function Ji(e){return Sr(Br(e,i,Gr),e+"")}function $i(e){return yn(e,Ls,ar)}function er(e){return yn(e,Qs,lr)}var tr=FA?function(e){return FA.get(e)}:oa;function Ar(e){for(var t=e.name+"",A=SA[t],n=Ue.call(SA,t)?A.length:0;n--;){var i=A[n],r=i.func;if(null==r||r==e)return i.name}return t}function nr(e){return(Ue.call(_A,"placeholder")?_A:e).placeholder}function ir(){var e=_A.iteratee||Aa;return e=e===Aa?Un:e,arguments.length?e(arguments[0],arguments[1]):e}function rr(e,t){var A,n,i=e.__data__;return("string"==(n=typeof(A=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==A:null===A)?i["string"==typeof t?"string":"hash"]:i.map}function or(e){for(var t=Ls(e),A=t.length;A--;){var n=t[A],i=e[n];t[A]=[n,i,wr(i)]}return t}function sr(e,t){var A=function(e,t){return null==e?i:e[t]}(e,t);return In(A)?A:i}var ar=dt?function(e){return null==e?[]:(e=xe(e),Tt(dt(e),function(t){return ze.call(e,t)}))}:da,lr=dt?function(e){for(var t=[];e;)Ut(t,ar(e)),e=Ke(e);return t}:da,ur=Bn;function cr(e,t,A){for(var n=-1,i=(t=gi(t,e)).length,r=!1;++n<i;){var o=Hr(t[n]);if(!(r=null!=e&&A(e,o)))break;e=e[o]}return r||++n!=i?r:!!(i=null==e?0:e.length)&&Zo(i)&&fr(o,i)&&(Go(e)||Po(e))}function hr(e){return"function"!=typeof e.constructor||Cr(e)?{}:kA(Ke(e))}function dr(e){return Go(e)||Po(e)||!!(je&&e&&e[je])}function fr(e,t){var A=typeof e;return!!(t=t??c)&&("number"==A||"symbol"!=A&&ve.test(e))&&e>-1&&e%1==0&&e<t}function gr(e,t,A){if(!Jo(A))return!1;var n=typeof t;return!!("number"==n?Vo(A)&&fr(t,A.length):"string"==n&&t in A)&&Ro(A[t],e)}function pr(e,t){if(Go(e))return!1;var A=typeof e;return!("number"!=A&&"symbol"!=A&&"boolean"!=A&&null!=e&&!os(e))||$.test(e)||!J.test(e)||null!=t&&e in xe(t)}function vr(e){var t=Ar(e),A=_A[t];if("function"!=typeof A||!(t in DA.prototype))return!1;if(e===A)return!0;var n=tr(A);return!!n&&e===n[0]}(wA&&ur(new wA(new ArrayBuffer(1)))!=U||yA&&ur(new yA)!=B||BA&&ur(BA.resolve())!=b||EA&&ur(new EA)!=S||xA&&ur(new xA)!=Q)&&(ur=function(e){var t=Bn(e),A=t==x?e.constructor:i,n=A?Mr(A):"";if(n)switch(n){case TA:return U;case LA:return B;case QA:return b;case IA:return S;case UA:return Q}return t});var mr=Qe?Yo:fa;function Cr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function wr(e){return e==e&&!Jo(e)}function yr(e,t){return function(A){return null!=A&&A[e]===t&&(t!==i||e in xe(A))}}function Br(e,t,A){return t=fA(t===i?e.length-1:t,0),function(){for(var i=arguments,r=-1,o=fA(i.length-t,0),s=n(o);++r<o;)s[r]=i[t+r];r=-1;for(var a=n(t+1);++r<t;)a[r]=i[r];return a[t]=A(s),Et(e,this,a)}}function Er(e,t){return t.length<2?e:wn(e,$n(t,0,-1))}function xr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var br=Lr(qn),Fr=lt||function(e,t){return ct.setTimeout(e,t)},Sr=Lr(Zn);function Tr(e,t,A){var n=t+"";return Sr(e,function(e,t){var A=t.length;if(!A)return e;var n=A-1;return t[n]=(A>1?"& ":"")+t[n],t=t.join(A>2?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return bt(f,function(A){var n="_."+A[0];t&A[1]&&!Lt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(se):[]}(n),A)))}function Lr(e){var t=0,A=0;return function(){var n=pA(),r=16-(n-A);if(A=n,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Qr(e,t){var A=-1,n=e.length,r=n-1;for(t=t===i?n:t;++A<t;){var o=Vn(A,r),s=e[o];e[o]=e[A],e[A]=s}return e.length=t,e}var Ir,Ur,Or=(Ir=Uo(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,A,n,i){t.push(n?i.replace(ue,"$1"):A||e)}),t},function(e){return 500===Ur.size&&Ur.clear(),e}),Ur=Ir.cache,Ir);function Hr(e){if("string"==typeof e||os(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mr(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function _r(e){if(e instanceof DA)return e.clone();var t=new NA(e.__wrapped__,e.__chain__);return t.__actions__=bi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var kr=Wn(function(e,t){return zo(e)?an(e,fn(t,1,zo,!0)):[]}),Rr=Wn(function(e,t){var A=jr(t);return zo(A)&&(A=i),zo(e)?an(e,fn(t,1,zo,!0),ir(A,2)):[]}),Nr=Wn(function(e,t){var A=jr(t);return zo(A)&&(A=i),zo(e)?an(e,fn(t,1,zo,!0),i,A):[]});function Dr(e,t,A){var n=null==e?0:e.length;if(!n)return-1;var i=null==A?0:hs(A);return i<0&&(i=fA(n+i,0)),Rt(e,ir(t,3),i)}function Pr(e,t,A){var n=null==e?0:e.length;if(!n)return-1;var r=n-1;return A!==i&&(r=hs(A),r=A<0?fA(n+r,0):gA(r,n-1)),Rt(e,ir(t,3),r,!0)}function Gr(e){return null!=e&&e.length?fn(e,1):[]}function Kr(e){return e&&e.length?e[0]:i}var Vr=Wn(function(e){var t=It(e,di);return t.length&&t[0]===e[0]?Fn(t):[]}),zr=Wn(function(e){var t=jr(e),A=It(e,di);return t===jr(A)?t=i:A.pop(),A.length&&A[0]===e[0]?Fn(A,ir(t,2)):[]}),Wr=Wn(function(e){var t=jr(e),A=It(e,di);return(t="function"==typeof t?t:i)&&A.pop(),A.length&&A[0]===e[0]?Fn(A,i,t):[]});function jr(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xr=Wn(Yr);function Yr(e,t){return e&&e.length&&t&&t.length?Gn(e,t):e}var qr=Ji(function(e,t){var A=null==e?0:e.length,n=An(e,t);return Kn(e,It(t,function(e){return fr(e,A)?+e:e}).sort(Bi)),n});function Zr(e){return null==e?e:CA.call(e)}var Jr=Wn(function(e){return oi(fn(e,1,zo,!0))}),$r=Wn(function(e){var t=jr(e);return zo(t)&&(t=i),oi(fn(e,1,zo,!0),ir(t,2))}),eo=Wn(function(e){var t=jr(e);return t="function"==typeof t?t:i,oi(fn(e,1,zo,!0),i,t)});function to(e){if(!e||!e.length)return[];var t=0;return e=Tt(e,function(e){if(zo(e))return t=fA(e.length,t),!0}),jt(t,function(t){return It(e,Kt(t))})}function Ao(e,t){if(!e||!e.length)return[];var A=to(e);return null==t?A:It(A,function(e){return Et(t,i,e)})}var no=Wn(function(e,t){return zo(e)?an(e,t):[]}),io=Wn(function(e){return ci(Tt(e,zo))}),ro=Wn(function(e){var t=jr(e);return zo(t)&&(t=i),ci(Tt(e,zo),ir(t,2))}),oo=Wn(function(e){var t=jr(e);return t="function"==typeof t?t:i,ci(Tt(e,zo),i,t)}),so=Wn(to),ao=Wn(function(e){var t=e.length,A=t>1?e[t-1]:i;return A="function"==typeof A?(e.pop(),A):i,Ao(e,A)});function lo(e){var t=_A(e);return t.__chain__=!0,t}function uo(e,t){return t(e)}var co=Ji(function(e){var t=e.length,A=t?e[0]:0,n=this.__wrapped__,r=function(t){return An(t,e)};return!(t>1||this.__actions__.length)&&n instanceof DA&&fr(A)?((n=n.slice(A,+A+(t?1:0))).__actions__.push({func:uo,args:[r],thisArg:i}),new NA(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(r)}),ho=Si(function(e,t,A){Ue.call(e,A)?++e[A]:tn(e,A,1)}),fo=Hi(Dr),go=Hi(Pr);function po(e,t){return(Go(e)?bt:ln)(e,ir(t,3))}function vo(e,t){return(Go(e)?Ft:un)(e,ir(t,3))}var mo=Si(function(e,t,A){Ue.call(e,A)?e[A].push(t):tn(e,A,[t])}),Co=Wn(function(e,t,A){var i=-1,r="function"==typeof t,o=Vo(e)?n(e.length):[];return ln(e,function(e){o[++i]=r?Et(t,e,A):Sn(e,t,A)}),o}),wo=Si(function(e,t,A){tn(e,A,t)});function yo(e,t){return(Go(e)?It:Mn)(e,ir(t,3))}var Bo=Si(function(e,t,A){e[A?0:1].push(t)},function(){return[[],[]]}),Eo=Wn(function(e,t){if(null==e)return[];var A=t.length;return A>1&&gr(e,t[0],t[1])?t=[]:A>2&&gr(t[0],t[1],t[2])&&(t=[t[0]]),Dn(e,fn(t,1),[])}),xo=ot||function(){return ct.Date.now()};function bo(e,t,A){return t=A?i:t,ji(e,l,i,i,i,i,t=e&&null==t?e.length:t)}function Fo(e,t){var A;if("function"!=typeof t)throw new Se(r);return e=hs(e),function(){return--e>0&&(A=t.apply(this,arguments)),e<=1&&(t=i),A}}var So=Wn(function(e,t,A){var n=1;if(A.length){var i=oA(A,nr(So));n|=a}return ji(e,n,t,A,i)}),To=Wn(function(e,t,A){var n=3;if(A.length){var i=oA(A,nr(To));n|=a}return ji(t,n,e,A,i)});function Lo(e,t,A){var n,o,s,a,l,u,c=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new Se(r);function g(t){var A=n,r=o;return n=o=i,c=t,a=e.apply(r,A)}function p(e){var A=e-u;return u===i||A>=t||A<0||d&&e-c>=s}function v(){var e=xo();if(p(e))return m(e);l=Fr(v,function(e){var A=t-(e-u);return d?gA(A,s-(e-c)):A}(e))}function m(e){return l=i,f&&n?g(e):(n=o=i,a)}function C(){var e=xo(),A=p(e);if(n=arguments,o=this,u=e,A){if(l===i)return function(e){return c=e,l=Fr(v,t),h?g(e):a}(u);if(d)return mi(l),l=Fr(v,t),g(u)}return l===i&&(l=Fr(v,t)),a}return t=fs(t)||0,Jo(A)&&(h=!!A.leading,s=(d="maxWait"in A)?fA(fs(A.maxWait)||0,t):s,f="trailing"in A?!!A.trailing:f),C.cancel=function(){l!==i&&mi(l),c=0,n=u=o=l=i},C.flush=function(){return l===i?a:m(xo())},C}var Qo=Wn(function(e,t){return sn(e,1,t)}),Io=Wn(function(e,t,A){return sn(e,fs(t)||0,A)});function Uo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Se(r);var A=function(){var n=arguments,i=t?t.apply(this,n):n[0],r=A.cache;if(r.has(i))return r.get(i);var o=e.apply(this,n);return A.cache=r.set(i,o)||r,o};return A.cache=new(Uo.Cache||KA),A}function Oo(e){if("function"!=typeof e)throw new Se(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Uo.Cache=KA;var Ho=pi(function(e,t){var A=(t=1==t.length&&Go(t[0])?It(t[0],Yt(ir())):It(fn(t,1),Yt(ir()))).length;return Wn(function(n){for(var i=-1,r=gA(n.length,A);++i<r;)n[i]=t[i].call(this,n[i]);return Et(e,this,n)})}),Mo=Wn(function(e,t){var A=oA(t,nr(Mo));return ji(e,a,i,t,A)}),_o=Wn(function(e,t){var A=oA(t,nr(_o));return ji(e,64,i,t,A)}),ko=Ji(function(e,t){return ji(e,256,i,i,i,t)});function Ro(e,t){return e===t||e!=e&&t!=t}var No=Gi(En),Do=Gi(function(e,t){return e>=t}),Po=Tn(function(){return arguments}())?Tn:function(e){return $o(e)&&Ue.call(e,"callee")&&!ze.call(e,"callee")},Go=n.isArray,Ko=vt?Yt(vt):function(e){return $o(e)&&Bn(e)==I};function Vo(e){return null!=e&&Zo(e.length)&&!Yo(e)}function zo(e){return $o(e)&&Vo(e)}var Wo=gt||fa,jo=mt?Yt(mt):function(e){return $o(e)&&Bn(e)==m};function Xo(e){if(!$o(e))return!1;var t=Bn(e);return t==C||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!As(e)}function Yo(e){if(!Jo(e))return!1;var t=Bn(e);return t==w||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function qo(e){return"number"==typeof e&&e==hs(e)}function Zo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Jo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $o(e){return null!=e&&"object"==typeof e}var es=Ct?Yt(Ct):function(e){return $o(e)&&ur(e)==B};function ts(e){return"number"==typeof e||$o(e)&&Bn(e)==E}function As(e){if(!$o(e)||Bn(e)!=x)return!1;var t=Ke(e);if(null===t)return!0;var A=Ue.call(t,"constructor")&&t.constructor;return"function"==typeof A&&A instanceof A&&Ie.call(A)==_e}var ns=wt?Yt(wt):function(e){return $o(e)&&Bn(e)==F},is=yt?Yt(yt):function(e){return $o(e)&&ur(e)==S};function rs(e){return"string"==typeof e||!Go(e)&&$o(e)&&Bn(e)==T}function os(e){return"symbol"==typeof e||$o(e)&&Bn(e)==L}var ss=Bt?Yt(Bt):function(e){return $o(e)&&Zo(e.length)&&!!it[Bn(e)]},as=Gi(Hn),ls=Gi(function(e,t){return e<=t});function us(e){if(!e)return[];if(Vo(e))return rs(e)?uA(e):bi(e);if(Xe&&e[Xe])return function(e){for(var t,A=[];!(t=e.next()).done;)A.push(t.value);return A}(e[Xe]());var t=ur(e);return(t==B?iA:t==S?sA:Rs)(e)}function cs(e){return e?(e=fs(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=cs(e),A=t%1;return t==t?A?t-A:t:0}function ds(e){return e?nn(hs(e),0,d):0}function fs(e){if("number"==typeof e)return e;if(os(e))return h;if(Jo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Jo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var A=fe.test(e);return A||pe.test(e)?at(e.slice(2),A?2:8):de.test(e)?h:+e}function gs(e){return Fi(e,Qs(e))}function ps(e){return null==e?"":ri(e)}var vs=Ti(function(e,t){if(Cr(t)||Vo(t))Fi(t,Ls(t),e);else for(var A in t)Ue.call(t,A)&&ZA(e,A,t[A])}),ms=Ti(function(e,t){Fi(t,Qs(t),e)}),Cs=Ti(function(e,t,A,n){Fi(t,Qs(t),e,n)}),ws=Ti(function(e,t,A,n){Fi(t,Ls(t),e,n)}),ys=Ji(An),Bs=Wn(function(e,t){e=xe(e);var A=-1,n=t.length,r=n>2?t[2]:i;for(r&&gr(t[0],t[1],r)&&(n=1);++A<n;)for(var o=t[A],s=Qs(o),a=-1,l=s.length;++a<l;){var u=s[a],c=e[u];(c===i||Ro(c,Le[u])&&!Ue.call(e,u))&&(e[u]=o[u])}return e}),Es=Wn(function(e){return e.push(i,Yi),Et(Us,i,e)});function xs(e,t,A){var n=null==e?i:wn(e,t);return n===i?A:n}function bs(e,t){return null!=e&&cr(e,t,bn)}var Fs=ki(function(e,t,A){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=A},Js(ta)),Ss=ki(function(e,t,A){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),Ue.call(e,t)?e[t].push(A):e[t]=[A]},ir),Ts=Wn(Sn);function Ls(e){return Vo(e)?WA(e):On(e)}function Qs(e){return Vo(e)?WA(e,!0):function(e){if(!Jo(e))return function(e){var t=[];if(null!=e)for(var A in xe(e))t.push(A);return t}(e);var t=Cr(e),A=[];for(var n in e)("constructor"!=n||!t&&Ue.call(e,n))&&A.push(n);return A}(e)}var Is=Ti(function(e,t,A){Rn(e,t,A)}),Us=Ti(function(e,t,A,n){Rn(e,t,A,n)}),Os=Ji(function(e,t){var A={};if(null==e)return A;var n=!1;t=It(t,function(t){return t=gi(t,e),n||(n=t.length>1),t}),Fi(e,er(e),A),n&&(A=rn(A,7,qi));for(var i=t.length;i--;)si(A,t[i]);return A}),Hs=Ji(function(e,t){return null==e?{}:function(e,t){return Pn(e,t,function(t,A){return bs(e,A)})}(e,t)});function Ms(e,t){if(null==e)return{};var A=It(er(e),function(e){return[e]});return t=ir(t),Pn(e,A,function(e,A){return t(e,A[0])})}var _s=Wi(Ls),ks=Wi(Qs);function Rs(e){return null==e?[]:qt(e,Ls(e))}var Ns=Ui(function(e,t,A){return t=t.toLowerCase(),e+(A?Ds(t):t)});function Ds(e){return Xs(ps(e).toLowerCase())}function Ps(e){return(e=ps(e))&&e.replace(me,eA).replace(Ze,"")}var Gs=Ui(function(e,t,A){return e+(A?"-":"")+t.toLowerCase()}),Ks=Ui(function(e,t,A){return e+(A?" ":"")+t.toLowerCase()}),Vs=Ii("toLowerCase"),zs=Ui(function(e,t,A){return e+(A?"_":"")+t.toLowerCase()}),Ws=Ui(function(e,t,A){return e+(A?" ":"")+Xs(t)}),js=Ui(function(e,t,A){return e+(A?" ":"")+t.toUpperCase()}),Xs=Ii("toUpperCase");function Ys(e,t,A){return e=ps(e),(t=A?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match($e)||[]}(e):function(e){return e.match(ae)||[]}(e):e.match(t)||[]}var qs=Wn(function(e,t){try{return Et(e,i,t)}catch(e){return Xo(e)?e:new ye(e)}}),Zs=Ji(function(e,t){return bt(t,function(t){t=Hr(t),tn(e,t,So(e[t],e))}),e});function Js(e){return function(){return e}}var $s=Mi(),ea=Mi(!0);function ta(e){return e}function Aa(e){return Un("function"==typeof e?e:rn(e,1))}var na=Wn(function(e,t){return function(A){return Sn(A,e,t)}}),ia=Wn(function(e,t){return function(A){return Sn(e,A,t)}});function ra(e,t,A){var n=Ls(t),i=Cn(t,n);null!=A||Jo(t)&&(i.length||!n.length)||(A=t,t=e,e=this,i=Cn(t,Ls(t)));var r=!(Jo(A)&&"chain"in A&&!A.chain),o=Yo(e);return bt(i,function(A){var n=t[A];e[A]=n,o&&(e.prototype[A]=function(){var t=this.__chain__;if(r||t){var A=e(this.__wrapped__);return(A.__actions__=bi(this.__actions__)).push({func:n,args:arguments,thisArg:e}),A.__chain__=t,A}return n.apply(e,Ut([this.value()],arguments))})}),e}function oa(){}var sa=Ni(It),aa=Ni(St),la=Ni(Mt);function ua(e){return pr(e)?Kt(Hr(e)):function(e){return function(t){return wn(t,e)}}(e)}var ca=Pi(),ha=Pi(!0);function da(){return[]}function fa(){return!1}var ga,pa=Ri(function(e,t){return e+t},0),va=Vi("ceil"),ma=Ri(function(e,t){return e/t},1),Ca=Vi("floor"),wa=Ri(function(e,t){return e*t},1),ya=Vi("round"),Ba=Ri(function(e,t){return e-t},0);return _A.after=function(e,t){if("function"!=typeof t)throw new Se(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},_A.ary=bo,_A.assign=vs,_A.assignIn=ms,_A.assignInWith=Cs,_A.assignWith=ws,_A.at=ys,_A.before=Fo,_A.bind=So,_A.bindAll=Zs,_A.bindKey=To,_A.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Go(e)?e:[e]},_A.chain=lo,_A.chunk=function(e,t,A){t=(A?gr(e,t,A):t===i)?1:fA(hs(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,s=0,a=n(ut(r/t));o<r;)a[s++]=$n(e,o,o+=t);return a},_A.compact=function(e){for(var t=-1,A=null==e?0:e.length,n=0,i=[];++t<A;){var r=e[t];r&&(i[n++]=r)}return i},_A.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),A=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ut(Go(A)?bi(A):[A],fn(t,1))},_A.cond=function(e){var t=null==e?0:e.length,A=ir();return e=t?It(e,function(e){if("function"!=typeof e[1])throw new Se(r);return[A(e[0]),e[1]]}):[],Wn(function(A){for(var n=-1;++n<t;){var i=e[n];if(Et(i[0],this,A))return Et(i[1],this,A)}})},_A.conforms=function(e){return function(e){var t=Ls(e);return function(A){return on(A,e,t)}}(rn(e,1))},_A.constant=Js,_A.countBy=ho,_A.create=function(e,t){var A=kA(e);return null==t?A:en(A,t)},_A.curry=function e(t,A,n){var r=ji(t,8,i,i,i,i,i,A=n?i:A);return r.placeholder=e.placeholder,r},_A.curryRight=function e(t,A,n){var r=ji(t,16,i,i,i,i,i,A=n?i:A);return r.placeholder=e.placeholder,r},_A.debounce=Lo,_A.defaults=Bs,_A.defaultsDeep=Es,_A.defer=Qo,_A.delay=Io,_A.difference=kr,_A.differenceBy=Rr,_A.differenceWith=Nr,_A.drop=function(e,t,A){var n=null==e?0:e.length;return n?$n(e,(t=A||t===i?1:hs(t))<0?0:t,n):[]},_A.dropRight=function(e,t,A){var n=null==e?0:e.length;return n?$n(e,0,(t=n-(t=A||t===i?1:hs(t)))<0?0:t):[]},_A.dropRightWhile=function(e,t){return e&&e.length?li(e,ir(t,3),!0,!0):[]},_A.dropWhile=function(e,t){return e&&e.length?li(e,ir(t,3),!0):[]},_A.fill=function(e,t,A,n){var r=null==e?0:e.length;return r?(A&&"number"!=typeof A&&gr(e,t,A)&&(A=0,n=r),function(e,t,A,n){var r=e.length;for((A=hs(A))<0&&(A=-A>r?0:r+A),(n=n===i||n>r?r:hs(n))<0&&(n+=r),n=A>n?0:ds(n);A<n;)e[A++]=t;return e}(e,t,A,n)):[]},_A.filter=function(e,t){return(Go(e)?Tt:dn)(e,ir(t,3))},_A.flatMap=function(e,t){return fn(yo(e,t),1)},_A.flatMapDeep=function(e,t){return fn(yo(e,t),u)},_A.flatMapDepth=function(e,t,A){return A=A===i?1:hs(A),fn(yo(e,t),A)},_A.flatten=Gr,_A.flattenDeep=function(e){return null!=e&&e.length?fn(e,u):[]},_A.flattenDepth=function(e,t){return null!=e&&e.length?fn(e,t=t===i?1:hs(t)):[]},_A.flip=function(e){return ji(e,512)},_A.flow=$s,_A.flowRight=ea,_A.fromPairs=function(e){for(var t=-1,A=null==e?0:e.length,n={};++t<A;){var i=e[t];n[i[0]]=i[1]}return n},_A.functions=function(e){return null==e?[]:Cn(e,Ls(e))},_A.functionsIn=function(e){return null==e?[]:Cn(e,Qs(e))},_A.groupBy=mo,_A.initial=function(e){return null!=e&&e.length?$n(e,0,-1):[]},_A.intersection=Vr,_A.intersectionBy=zr,_A.intersectionWith=Wr,_A.invert=Fs,_A.invertBy=Ss,_A.invokeMap=Co,_A.iteratee=Aa,_A.keyBy=wo,_A.keys=Ls,_A.keysIn=Qs,_A.map=yo,_A.mapKeys=function(e,t){var A={};return t=ir(t,3),vn(e,function(e,n,i){tn(A,t(e,n,i),e)}),A},_A.mapValues=function(e,t){var A={};return t=ir(t,3),vn(e,function(e,n,i){tn(A,n,t(e,n,i))}),A},_A.matches=function(e){return _n(rn(e,1))},_A.matchesProperty=function(e,t){return kn(e,rn(t,1))},_A.memoize=Uo,_A.merge=Is,_A.mergeWith=Us,_A.method=na,_A.methodOf=ia,_A.mixin=ra,_A.negate=Oo,_A.nthArg=function(e){return e=hs(e),Wn(function(t){return Nn(t,e)})},_A.omit=Os,_A.omitBy=function(e,t){return Ms(e,Oo(ir(t)))},_A.once=function(e){return Fo(2,e)},_A.orderBy=function(e,t,A,n){return null==e?[]:(Go(t)||(t=null==t?[]:[t]),Go(A=n?i:A)||(A=null==A?[]:[A]),Dn(e,t,A))},_A.over=sa,_A.overArgs=Ho,_A.overEvery=aa,_A.overSome=la,_A.partial=Mo,_A.partialRight=_o,_A.partition=Bo,_A.pick=Hs,_A.pickBy=Ms,_A.property=ua,_A.propertyOf=function(e){return function(t){return null==e?i:wn(e,t)}},_A.pull=Xr,_A.pullAll=Yr,_A.pullAllBy=function(e,t,A){return e&&e.length&&t&&t.length?Gn(e,t,ir(A,2)):e},_A.pullAllWith=function(e,t,A){return e&&e.length&&t&&t.length?Gn(e,t,i,A):e},_A.pullAt=qr,_A.range=ca,_A.rangeRight=ha,_A.rearg=ko,_A.reject=function(e,t){return(Go(e)?Tt:dn)(e,Oo(ir(t,3)))},_A.remove=function(e,t){var A=[];if(!e||!e.length)return A;var n=-1,i=[],r=e.length;for(t=ir(t,3);++n<r;){var o=e[n];t(o,n,e)&&(A.push(o),i.push(n))}return Kn(e,i),A},_A.rest=function(e,t){if("function"!=typeof e)throw new Se(r);return Wn(e,t=t===i?t:hs(t))},_A.reverse=Zr,_A.sampleSize=function(e,t,A){return t=(A?gr(e,t,A):t===i)?1:hs(t),(Go(e)?XA:Xn)(e,t)},_A.set=function(e,t,A){return null==e?e:Yn(e,t,A)},_A.setWith=function(e,t,A,n){return n="function"==typeof n?n:i,null==e?e:Yn(e,t,A,n)},_A.shuffle=function(e){return(Go(e)?YA:Jn)(e)},_A.slice=function(e,t,A){var n=null==e?0:e.length;return n?(A&&"number"!=typeof A&&gr(e,t,A)?(t=0,A=n):(t=null==t?0:hs(t),A=A===i?n:hs(A)),$n(e,t,A)):[]},_A.sortBy=Eo,_A.sortedUniq=function(e){return e&&e.length?ni(e):[]},_A.sortedUniqBy=function(e,t){return e&&e.length?ni(e,ir(t,2)):[]},_A.split=function(e,t,A){return A&&"number"!=typeof A&&gr(e,t,A)&&(t=A=i),(A=A===i?d:A>>>0)?(e=ps(e))&&("string"==typeof t||null!=t&&!ns(t))&&!(t=ri(t))&&nA(e)?vi(uA(e),0,A):e.split(t,A):[]},_A.spread=function(e,t){if("function"!=typeof e)throw new Se(r);return t=null==t?0:fA(hs(t),0),Wn(function(A){var n=A[t],i=vi(A,0,t);return n&&Ut(i,n),Et(e,this,i)})},_A.tail=function(e){var t=null==e?0:e.length;return t?$n(e,1,t):[]},_A.take=function(e,t,A){return e&&e.length?$n(e,0,(t=A||t===i?1:hs(t))<0?0:t):[]},_A.takeRight=function(e,t,A){var n=null==e?0:e.length;return n?$n(e,(t=n-(t=A||t===i?1:hs(t)))<0?0:t,n):[]},_A.takeRightWhile=function(e,t){return e&&e.length?li(e,ir(t,3),!1,!0):[]},_A.takeWhile=function(e,t){return e&&e.length?li(e,ir(t,3)):[]},_A.tap=function(e,t){return t(e),e},_A.throttle=function(e,t,A){var n=!0,i=!0;if("function"!=typeof e)throw new Se(r);return Jo(A)&&(n="leading"in A?!!A.leading:n,i="trailing"in A?!!A.trailing:i),Lo(e,t,{leading:n,maxWait:t,trailing:i})},_A.thru=uo,_A.toArray=us,_A.toPairs=_s,_A.toPairsIn=ks,_A.toPath=function(e){return Go(e)?It(e,Hr):os(e)?[e]:bi(Or(ps(e)))},_A.toPlainObject=gs,_A.transform=function(e,t,A){var n=Go(e),i=n||Wo(e)||ss(e);if(t=ir(t,4),null==A){var r=e&&e.constructor;A=i?n?new r:[]:Jo(e)&&Yo(r)?kA(Ke(e)):{}}return(i?bt:vn)(e,function(e,n,i){return t(A,e,n,i)}),A},_A.unary=function(e){return bo(e,1)},_A.union=Jr,_A.unionBy=$r,_A.unionWith=eo,_A.uniq=function(e){return e&&e.length?oi(e):[]},_A.uniqBy=function(e,t){return e&&e.length?oi(e,ir(t,2)):[]},_A.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?oi(e,i,t):[]},_A.unset=function(e,t){return null==e||si(e,t)},_A.unzip=to,_A.unzipWith=Ao,_A.update=function(e,t,A){return null==e?e:ai(e,t,fi(A))},_A.updateWith=function(e,t,A,n){return n="function"==typeof n?n:i,null==e?e:ai(e,t,fi(A),n)},_A.values=Rs,_A.valuesIn=function(e){return null==e?[]:qt(e,Qs(e))},_A.without=no,_A.words=Ys,_A.wrap=function(e,t){return Mo(fi(t),e)},_A.xor=io,_A.xorBy=ro,_A.xorWith=oo,_A.zip=so,_A.zipObject=function(e,t){return hi(e||[],t||[],ZA)},_A.zipObjectDeep=function(e,t){return hi(e||[],t||[],Yn)},_A.zipWith=ao,_A.entries=_s,_A.entriesIn=ks,_A.extend=ms,_A.extendWith=Cs,ra(_A,_A),_A.add=pa,_A.attempt=qs,_A.camelCase=Ns,_A.capitalize=Ds,_A.ceil=va,_A.clamp=function(e,t,A){return A===i&&(A=t,t=i),A!==i&&(A=(A=fs(A))==A?A:0),t!==i&&(t=(t=fs(t))==t?t:0),nn(fs(e),t,A)},_A.clone=function(e){return rn(e,4)},_A.cloneDeep=function(e){return rn(e,5)},_A.cloneDeepWith=function(e,t){return rn(e,5,t="function"==typeof t?t:i)},_A.cloneWith=function(e,t){return rn(e,4,t="function"==typeof t?t:i)},_A.conformsTo=function(e,t){return null==t||on(e,t,Ls(t))},_A.deburr=Ps,_A.defaultTo=function(e,t){return null==e||e!=e?t:e},_A.divide=ma,_A.endsWith=function(e,t,A){e=ps(e),t=ri(t);var n=e.length,r=A=A===i?n:nn(hs(A),0,n);return(A-=t.length)>=0&&e.slice(A,r)==t},_A.eq=Ro,_A.escape=function(e){return(e=ps(e))&&X.test(e)?e.replace(W,tA):e},_A.escapeRegExp=function(e){return(e=ps(e))&&Ae.test(e)?e.replace(te,"\\$&"):e},_A.every=function(e,t,A){var n=Go(e)?St:cn;return A&&gr(e,t,A)&&(t=i),n(e,ir(t,3))},_A.find=fo,_A.findIndex=Dr,_A.findKey=function(e,t){return kt(e,ir(t,3),vn)},_A.findLast=go,_A.findLastIndex=Pr,_A.findLastKey=function(e,t){return kt(e,ir(t,3),mn)},_A.floor=Ca,_A.forEach=po,_A.forEachRight=vo,_A.forIn=function(e,t){return null==e?e:gn(e,ir(t,3),Qs)},_A.forInRight=function(e,t){return null==e?e:pn(e,ir(t,3),Qs)},_A.forOwn=function(e,t){return e&&vn(e,ir(t,3))},_A.forOwnRight=function(e,t){return e&&mn(e,ir(t,3))},_A.get=xs,_A.gt=No,_A.gte=Do,_A.has=function(e,t){return null!=e&&cr(e,t,xn)},_A.hasIn=bs,_A.head=Kr,_A.identity=ta,_A.includes=function(e,t,A,n){e=Vo(e)?e:Rs(e),A=A&&!n?hs(A):0;var i=e.length;return A<0&&(A=fA(i+A,0)),rs(e)?A<=i&&e.indexOf(t,A)>-1:!!i&&Nt(e,t,A)>-1},_A.indexOf=function(e,t,A){var n=null==e?0:e.length;if(!n)return-1;var i=null==A?0:hs(A);return i<0&&(i=fA(n+i,0)),Nt(e,t,i)},_A.inRange=function(e,t,A){return t=cs(t),A===i?(A=t,t=0):A=cs(A),function(e,t,A){return e>=gA(t,A)&&e<fA(t,A)}(e=fs(e),t,A)},_A.invoke=Ts,_A.isArguments=Po,_A.isArray=Go,_A.isArrayBuffer=Ko,_A.isArrayLike=Vo,_A.isArrayLikeObject=zo,_A.isBoolean=function(e){return!0===e||!1===e||$o(e)&&Bn(e)==v},_A.isBuffer=Wo,_A.isDate=jo,_A.isElement=function(e){return $o(e)&&1===e.nodeType&&!As(e)},_A.isEmpty=function(e){if(null==e)return!0;if(Vo(e)&&(Go(e)||"string"==typeof e||"function"==typeof e.splice||Wo(e)||ss(e)||Po(e)))return!e.length;var t=ur(e);if(t==B||t==S)return!e.size;if(Cr(e))return!On(e).length;for(var A in e)if(Ue.call(e,A))return!1;return!0},_A.isEqual=function(e,t){return Ln(e,t)},_A.isEqualWith=function(e,t,A){var n=(A="function"==typeof A?A:i)?A(e,t):i;return n===i?Ln(e,t,i,A):!!n},_A.isError=Xo,_A.isFinite=function(e){return"number"==typeof e&&pt(e)},_A.isFunction=Yo,_A.isInteger=qo,_A.isLength=Zo,_A.isMap=es,_A.isMatch=function(e,t){return e===t||Qn(e,t,or(t))},_A.isMatchWith=function(e,t,A){return A="function"==typeof A?A:i,Qn(e,t,or(t),A)},_A.isNaN=function(e){return ts(e)&&e!=+e},_A.isNative=function(e){if(mr(e))throw new ye("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(e)},_A.isNil=function(e){return null==e},_A.isNull=function(e){return null===e},_A.isNumber=ts,_A.isObject=Jo,_A.isObjectLike=$o,_A.isPlainObject=As,_A.isRegExp=ns,_A.isSafeInteger=function(e){return qo(e)&&e>=-9007199254740991&&e<=c},_A.isSet=is,_A.isString=rs,_A.isSymbol=os,_A.isTypedArray=ss,_A.isUndefined=function(e){return e===i},_A.isWeakMap=function(e){return $o(e)&&ur(e)==Q},_A.isWeakSet=function(e){return $o(e)&&"[object WeakSet]"==Bn(e)},_A.join=function(e,t){return null==e?"":_t.call(e,t)},_A.kebabCase=Gs,_A.last=jr,_A.lastIndexOf=function(e,t,A){var n=null==e?0:e.length;if(!n)return-1;var r=n;return A!==i&&(r=(r=hs(A))<0?fA(n+r,0):gA(r,n-1)),t==t?function(e,t,A){for(var n=A+1;n--;)if(e[n]===t)return n;return n}(e,t,r):Rt(e,Pt,r,!0)},_A.lowerCase=Ks,_A.lowerFirst=Vs,_A.lt=as,_A.lte=ls,_A.max=function(e){return e&&e.length?hn(e,ta,En):i},_A.maxBy=function(e,t){return e&&e.length?hn(e,ir(t,2),En):i},_A.mean=function(e){return Gt(e,ta)},_A.meanBy=function(e,t){return Gt(e,ir(t,2))},_A.min=function(e){return e&&e.length?hn(e,ta,Hn):i},_A.minBy=function(e,t){return e&&e.length?hn(e,ir(t,2),Hn):i},_A.stubArray=da,_A.stubFalse=fa,_A.stubObject=function(){return{}},_A.stubString=function(){return""},_A.stubTrue=function(){return!0},_A.multiply=wa,_A.nth=function(e,t){return e&&e.length?Nn(e,hs(t)):i},_A.noConflict=function(){return ct._===this&&(ct._=ke),this},_A.noop=oa,_A.now=xo,_A.pad=function(e,t,A){e=ps(e);var n=(t=hs(t))?lA(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Di(ht(i),A)+e+Di(ut(i),A)},_A.padEnd=function(e,t,A){e=ps(e);var n=(t=hs(t))?lA(e):0;return t&&n<t?e+Di(t-n,A):e},_A.padStart=function(e,t,A){e=ps(e);var n=(t=hs(t))?lA(e):0;return t&&n<t?Di(t-n,A)+e:e},_A.parseInt=function(e,t,A){return A||null==t?t=0:t&&(t=+t),vA(ps(e).replace(ne,""),t||0)},_A.random=function(e,t,A){if(A&&"boolean"!=typeof A&&gr(e,t,A)&&(t=A=i),A===i&&("boolean"==typeof t?(A=t,t=i):"boolean"==typeof e&&(A=e,e=i)),e===i&&t===i?(e=0,t=1):(e=cs(e),t===i?(t=e,e=0):t=cs(t)),e>t){var n=e;e=t,t=n}if(A||e%1||t%1){var r=mA();return gA(e+r*(t-e+st("1e-"+((r+"").length-1))),t)}return Vn(e,t)},_A.reduce=function(e,t,A){var n=Go(e)?Ot:zt,i=arguments.length<3;return n(e,ir(t,4),A,i,ln)},_A.reduceRight=function(e,t,A){var n=Go(e)?Ht:zt,i=arguments.length<3;return n(e,ir(t,4),A,i,un)},_A.repeat=function(e,t,A){return t=(A?gr(e,t,A):t===i)?1:hs(t),zn(ps(e),t)},_A.replace=function(){var e=arguments,t=ps(e[0]);return e.length<3?t:t.replace(e[1],e[2])},_A.result=function(e,t,A){var n=-1,r=(t=gi(t,e)).length;for(r||(r=1,e=i);++n<r;){var o=null==e?i:e[Hr(t[n])];o===i&&(n=r,o=A),e=Yo(o)?o.call(e):o}return e},_A.round=ya,_A.runInContext=e,_A.sample=function(e){return(Go(e)?jA:jn)(e)},_A.size=function(e){if(null==e)return 0;if(Vo(e))return rs(e)?lA(e):e.length;var t=ur(e);return t==B||t==S?e.size:On(e).length},_A.snakeCase=zs,_A.some=function(e,t,A){var n=Go(e)?Mt:ei;return A&&gr(e,t,A)&&(t=i),n(e,ir(t,3))},_A.sortedIndex=function(e,t){return ti(e,t)},_A.sortedIndexBy=function(e,t,A){return Ai(e,t,ir(A,2))},_A.sortedIndexOf=function(e,t){var A=null==e?0:e.length;if(A){var n=ti(e,t);if(n<A&&Ro(e[n],t))return n}return-1},_A.sortedLastIndex=function(e,t){return ti(e,t,!0)},_A.sortedLastIndexBy=function(e,t,A){return Ai(e,t,ir(A,2),!0)},_A.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var A=ti(e,t,!0)-1;if(Ro(e[A],t))return A}return-1},_A.startCase=Ws,_A.startsWith=function(e,t,A){return e=ps(e),A=null==A?0:nn(hs(A),0,e.length),t=ri(t),e.slice(A,A+t.length)==t},_A.subtract=Ba,_A.sum=function(e){return e&&e.length?Wt(e,ta):0},_A.sumBy=function(e,t){return e&&e.length?Wt(e,ir(t,2)):0},_A.template=function(e,t,A){var n=_A.templateSettings;A&&gr(e,t,A)&&(t=i),e=ps(e),t=Cs({},t,n,Xi);var r,o,s=Cs({},t.imports,n.imports,Xi),a=Ls(s),l=qt(s,a),u=0,c=t.interpolate||Ce,h="__p += '",d=be((t.escape||Ce).source+"|"+c.source+"|"+(c===Z?ce:Ce).source+"|"+(t.evaluate||Ce).source+"|$","g"),f="//# sourceURL="+(Ue.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,function(t,A,n,i,s,a){return n||(n=i),h+=e.slice(u,a).replace(we,AA),A&&(r=!0,h+="' +\n__e("+A+") +\n'"),s&&(o=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=a+t.length,t}),h+="';\n";var g=Ue.call(t,"variable")&&t.variable;if(g){if(le.test(g))throw new ye("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(G,""):h).replace(K,"$1").replace(V,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var p=qs(function(){return Be(a,f+"return "+h).apply(i,l)});if(p.source=h,Xo(p))throw p;return p},_A.times=function(e,t){if((e=hs(e))<1||e>c)return[];var A=d,n=gA(e,d);t=ir(t),e-=d;for(var i=jt(n,t);++A<e;)t(A);return i},_A.toFinite=cs,_A.toInteger=hs,_A.toLength=ds,_A.toLower=function(e){return ps(e).toLowerCase()},_A.toNumber=fs,_A.toSafeInteger=function(e){return e?nn(hs(e),-9007199254740991,c):0===e?e:0},_A.toString=ps,_A.toUpper=function(e){return ps(e).toUpperCase()},_A.trim=function(e,t,A){if((e=ps(e))&&(A||t===i))return Xt(e);if(!e||!(t=ri(t)))return e;var n=uA(e),r=uA(t);return vi(n,Jt(n,r),$t(n,r)+1).join("")},_A.trimEnd=function(e,t,A){if((e=ps(e))&&(A||t===i))return e.slice(0,cA(e)+1);if(!e||!(t=ri(t)))return e;var n=uA(e);return vi(n,0,$t(n,uA(t))+1).join("")},_A.trimStart=function(e,t,A){if((e=ps(e))&&(A||t===i))return e.replace(ne,"");if(!e||!(t=ri(t)))return e;var n=uA(e);return vi(n,Jt(n,uA(t))).join("")},_A.truncate=function(e,t){var A=30,n="...";if(Jo(t)){var r="separator"in t?t.separator:r;A="length"in t?hs(t.length):A,n="omission"in t?ri(t.omission):n}var o=(e=ps(e)).length;if(nA(e)){var s=uA(e);o=s.length}if(A>=o)return e;var a=A-lA(n);if(a<1)return n;var l=s?vi(s,0,a).join(""):e.slice(0,a);if(r===i)return l+n;if(s&&(a+=l.length-a),ns(r)){if(e.slice(a).search(r)){var u,c=l;for(r.global||(r=be(r.source,ps(he.exec(r))+"g")),r.lastIndex=0;u=r.exec(c);)var h=u.index;l=l.slice(0,h===i?a:h)}}else if(e.indexOf(ri(r),a)!=a){var d=l.lastIndexOf(r);d>-1&&(l=l.slice(0,d))}return l+n},_A.unescape=function(e){return(e=ps(e))&&j.test(e)?e.replace(z,hA):e},_A.uniqueId=function(e){var t=++Oe;return ps(e)+t},_A.upperCase=js,_A.upperFirst=Xs,_A.each=po,_A.eachRight=vo,_A.first=Kr,ra(_A,(ga={},vn(_A,function(e,t){Ue.call(_A.prototype,t)||(ga[t]=e)}),ga),{chain:!1}),_A.VERSION="4.17.23",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){_A[e].placeholder=_A}),bt(["drop","take"],function(e,t){DA.prototype[e]=function(A){A=A===i?1:fA(hs(A),0);var n=this.__filtered__&&!t?new DA(this):this.clone();return n.__filtered__?n.__takeCount__=gA(A,n.__takeCount__):n.__views__.push({size:gA(A,d),type:e+(n.__dir__<0?"Right":"")}),n},DA.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),bt(["filter","map","takeWhile"],function(e,t){var A=t+1,n=1==A||3==A;DA.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ir(e,3),type:A}),t.__filtered__=t.__filtered__||n,t}}),bt(["head","last"],function(e,t){var A="take"+(t?"Right":"");DA.prototype[e]=function(){return this[A](1).value()[0]}}),bt(["initial","tail"],function(e,t){var A="drop"+(t?"":"Right");DA.prototype[e]=function(){return this.__filtered__?new DA(this):this[A](1)}}),DA.prototype.compact=function(){return this.filter(ta)},DA.prototype.find=function(e){return this.filter(e).head()},DA.prototype.findLast=function(e){return this.reverse().find(e)},DA.prototype.invokeMap=Wn(function(e,t){return"function"==typeof e?new DA(this):this.map(function(A){return Sn(A,e,t)})}),DA.prototype.reject=function(e){return this.filter(Oo(ir(e)))},DA.prototype.slice=function(e,t){e=hs(e);var A=this;return A.__filtered__&&(e>0||t<0)?new DA(A):(e<0?A=A.takeRight(-e):e&&(A=A.drop(e)),t!==i&&(A=(t=hs(t))<0?A.dropRight(-t):A.take(t-e)),A)},DA.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},DA.prototype.toArray=function(){return this.take(d)},vn(DA.prototype,function(e,t){var A=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),r=_A[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);r&&(_A.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,a=t instanceof DA,l=s[0],u=a||Go(t),c=function(e){var t=r.apply(_A,Ut([e],s));return n&&h?t[0]:t};u&&A&&"function"==typeof l&&1!=l.length&&(a=u=!1);var h=this.__chain__,d=o&&!h,f=a&&!this.__actions__.length;if(!o&&u){t=f?t:new DA(this);var g=e.apply(t,s);return g.__actions__.push({func:uo,args:[c],thisArg:i}),new NA(g,h)}return d&&f?e.apply(this,s):(g=this.thru(c),d?n?g.value()[0]:g.value():g)})}),bt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Te[e],A=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);_A.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Go(i)?i:[],e)}return this[A](function(A){return t.apply(Go(A)?A:[],e)})}}),vn(DA.prototype,function(e,t){var A=_A[t];if(A){var n=A.name+"";Ue.call(SA,n)||(SA[n]=[]),SA[n].push({name:t,func:A})}}),SA[_i(i,2).name]=[{name:"wrapper",func:i}],DA.prototype.clone=function(){var e=new DA(this.__wrapped__);return e.__actions__=bi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=bi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=bi(this.__views__),e},DA.prototype.reverse=function(){if(this.__filtered__){var e=new DA(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},DA.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,A=Go(e),n=t<0,i=A?e.length:0,r=function(e,t,A){for(var n=-1,i=A.length;++n<i;){var r=A[n],o=r.size;switch(r.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=gA(t,e+o);break;case"takeRight":e=fA(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=r.start,s=r.end,a=s-o,l=n?s:o-1,u=this.__iteratees__,c=u.length,h=0,d=gA(a,this.__takeCount__);if(!A||!n&&i==a&&d==a)return ui(e,this.__actions__);var f=[];e:for(;a--&&h<d;){for(var g=-1,p=e[l+=t];++g<c;){var v=u[g],m=v.type,C=(0,v.iteratee)(p);if(2==m)p=C;else if(!C){if(1==m)continue e;break e}}f[h++]=p}return f},_A.prototype.at=co,_A.prototype.chain=function(){return lo(this)},_A.prototype.commit=function(){return new NA(this.value(),this.__chain__)},_A.prototype.next=function(){this.__values__===i&&(this.__values__=us(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},_A.prototype.plant=function(e){for(var t,A=this;A instanceof RA;){var n=_r(A);n.__index__=0,n.__values__=i,t?r.__wrapped__=n:t=n;var r=n;A=A.__wrapped__}return r.__wrapped__=e,t},_A.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof DA){var t=e;return this.__actions__.length&&(t=new DA(this)),(t=t.reverse()).__actions__.push({func:uo,args:[Zr],thisArg:i}),new NA(t,this.__chain__)}return this.thru(Zr)},_A.prototype.toJSON=_A.prototype.valueOf=_A.prototype.value=function(){return ui(this.__wrapped__,this.__actions__)},_A.prototype.first=_A.prototype.head,Xe&&(_A.prototype[Xe]=function(){return this}),_A}();ct._=dA,(n=function(){return dA}.call(t,A,t,e))===i||(e.exports=n)}.call(this)},"./src/components/fragments/async/extensions/S2.tsx"(e,t,A){"use strict";A.r(t),A.d(t,{default:()=>Qa});var n={};A.r(n),A.d(n,{ArrowDown:()=>G,ArrowUp:()=>K,CellDown:()=>V,CellUp:()=>z,DrillDownIcon:()=>oe,Empty:()=>ae,ExpandColIcon:()=>J,EyeOutlined:()=>se,GlobalAsc:()=>W,GlobalDesc:()=>j,GroupAsc:()=>X,GroupDesc:()=>Y,GroupNone:()=>q,InfoCircle:()=>Z,Minus:()=>$,Play:()=>le,Plus:()=>ee,SortDown:()=>Ae,SortDownSelected:()=>te,SortUp:()=>ie,SortUpSelected:()=>ne,Trend:()=>re});var i,r,o,s=A("react/jsx-runtime"),a=A("./node_modules/.pnpm/@antv+g@6.3.1/node_modules/@antv/g/dist/index.esm.js"),l=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js");!function(e){e.CORNER_CELL_CLICK="cornerCellClick",e.DATA_CELL_CLICK="dataCellClick",e.ROW_CELL_CLICK="rowCellClick",e.COL_CELL_CLICK="colCellClick",e.MERGED_CELLS_CLICK="mergedCellsClick",e.ROW_COLUMN_CLICK="rowColumnClick",e.HEADER_CELL_LINK_CLICK="headerCellLinkClick",e.PREVIEW_CLICK="previewClick",e.HOVER="hover",e.DATA_CELL_BRUSH_SELECTION="dataCellBrushSelection",e.ROW_CELL_BRUSH_SELECTION="rowCellBrushSelection",e.COL_CELL_BRUSH_SELECTION="colCellBrushSelection",e.COL_ROW_RESIZE="rowColResize",e.DATA_CELL_MULTI_SELECTION="dataCellMultiSelection",e.ROW_CELL_MULTI_SELECTION="rowCellMultiSelection",e.COL_CELL_MULTI_SELECTION="colCellMultiSelection",e.RANGE_SELECTION="rangeSelection",e.SELECTED_CELL_MOVE="selectedCellMove",e.GLOBAL_RESET="globalReset"}(i||(i={})),function(e){e.ALL_SELECTED="allSelected",e.SELECTED="selected",e.ROW_CELL_BRUSH_SELECTED="rowCellBrushSelected",e.COL_CELL_BRUSH_SELECTED="colCellBrushSelected",e.DATA_CELL_BRUSH_SELECTED="dataCellBrushSelected",e.UNSELECTED="unselected",e.HOVER="hover",e.HOVER_FOCUS="hoverFocus",e.HIGHLIGHT="highlight",e.SEARCH_RESULT="searchResult",e.PREPARE_SELECT="prepareSelect"}(r||(r={})),function(e){e.DATA_CELL="dataCell",e.ROW_CELL="rowCell",e.COL_CELL="colCell",e.SERIES_NUMBER_CELL="seriesNumberCell",e.CORNER_CELL="cornerCell",e.MERGED_CELL="mergedCell"}(o||(o={}));const u={textOpacity:"fillOpacity",backgroundOpacity:"fillOpacity",backgroundColor:"fill",borderOpacity:"strokeOpacity",borderColor:"stroke",borderWidth:"lineWidth",opacity:"opacity"},c={textShape:["textOpacity"],textShapes:["textOpacity"],linkFieldShape:["opacity"],interactiveBgShape:["backgroundColor","backgroundOpacity"],interactiveBorderShape:["borderColor","borderOpacity","borderWidth"]},h="interactionStateInfo";var d,f,g,p;!function(e){e.CLICK="click",e.UN_DRAGGED="unDragged",e.DRAGGED="dragged"}(d||(d={})),function(e){e.SHIFT="Shift",e.COPY="c",e.ESC="Escape",e.META="Meta",e.CONTROL="Control",e.ARROW_UP="ArrowUp",e.ARROW_DOWN="ArrowDown",e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight"}(f||(f={})),function(e){e.ASC="ASC",e.DESC="DESC"}(g||(g={})),function(e){e.HOVER="hover",e.CLICK="click",e.DATA_CELL_BRUSH_SELECTION="dataCellBrushSelection",e.ROW_CELL_BRUSH_SELECTION="rowCellBrushSelection",e.COL_CELL_BRUSH_SELECTION="colCellBrushSelection",e.MULTI_SELECTION="multiSelection",e.RESIZE="resize"}(p||(p={}));const v={x:{value:0,scroll:!1},y:{value:0,scroll:!1}};var m,C,w;!function(e){e.CONTENT="content",e.CANVAS="canvas"}(m||(m={})),function(e){e.SCROLL_UP="scrollUp",e.SCROLL_DOWN="scrollDown",e.SCROLL_LEFT="scrollLeft",e.SCROLL_RIGHT="scrollRight"}(C||(C={})),function(e){e[e.SCROLL_UP=-1]="SCROLL_UP",e[e.SCROLL_DOWN=1]="SCROLL_DOWN"}(w||(w={}));const y="valueRanges",B={},E="#000000",x="#FFFFFF";var b,F,S,T;!function(e){e.TOP="TOP",e.BOTTOM="BOTTOM",e.LEFT="LEFT",e.RIGHT="RIGHT"}(b||(b={})),function(e){e.BORDER_BOX="borderBox",e.PADDING_BOX="paddingBox",e.CONTENT_BOX="contentBox"}(F||(F={})),function(e){e.SUM="SUM",e.MIN="MIN",e.MAX="MAX",e.AVG="AVG",e.COUNT="COUNT"}(S||(S={})),function(e){e.VIDEO="VIDEO",e.IMAGE="IMAGE"}(T||(T={}));const L="videoRect";var Q=A("./node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs");const I=new Error("Failed to load image and fallback");function U(e){const{src:t,fallback:A,timeout:n=1e4,mediaCache:i,crossOrigin:r="Anonymous",referrerPolicy:o,cacheKeyPrefix:s}=e,a=s?`${s}:${t}`:t;return new Promise((e,l)=>{if(null==i?void 0:i.has(a)){const t=i.get(a);if(t instanceof HTMLImageElement)return void e(t);if(null===t)return void l(I)}const u=t=>{null==i||i.set(a,t),e(t)},c=e=>{null==i||i.set(a,null),l(e)},h=()=>{A?U({src:A,timeout:n,mediaCache:i}).then(u).catch(c):c(I)},d=()=>{r?U({src:t,timeout:n,mediaCache:i,crossOrigin:null,referrerPolicy:"no-referrer",cacheKeyPrefix:s}).then(u).catch(h):h()},f=new Image;r&&(f.crossOrigin=r),o&&(f.referrerPolicy=o),f.src=t;const g=setTimeout(d,n);f.onload=()=>{clearTimeout(g),u(f)},f.onerror=()=>{clearTimeout(g),d()},f.onabort=()=>{clearTimeout(g),d()}})}function O(e,t,A,n){if(e<=0||t<=0)return{width:0,height:0};if(A<=0||n<=0)return{width:e,height:t};const i=Math.min(e/A,t/n);return{width:Math.floor(A*i),height:Math.floor(n*i)}}function H(e){return(0,Q.sH)(this,arguments,void 0,function*(e,t=""){try{e&&(t=(yield e(t))||t)}catch(e){console.warn("fail to prepareText",e)}return t})}var M=A("./node_modules/.pnpm/flru@1.0.2/node_modules/flru/dist/flru.mjs");class _{static getCacheKey(e,t){return`${e}:${t}`}getLoading(e){var t;const{x:A,y:n,height:i,width:r}=this.getCellInfo(e),o=.25*Math.min(i,r),s=A+r/2,l=n+i/2,u=new a.wA({style:{d:`M${s} ${l-o}\n A${o} ${o} 0 0 1 ${s+o} ${l}`,stroke:null===(t=e.getIconStyle())||void 0===t?void 0:t.fill,transformOrigin:`${s} ${l}`}});return e.appendChild(u),setTimeout(()=>{u.animate([{transform:"rotate(0)"},{transform:"rotate(360deg)"}],{duration:1e3,iterations:1/0})}),u}process(e,t){return(0,Q.sH)(this,void 0,void 0,function*(){const A=this.getLoading(t),n=yield this.prepare(e,t),i=this.generateConfig(e,t,n);t.removeChild(A),A.destroy(),this.render(t,i)})}destroy(){}getCellInfo(e){var t;const A=e.getFieldValue(),n=null!==(t=null==A?void 0:A.toString())&&void 0!==t?t:"";return Object.assign({text:n},e.getBBoxByType(F.CONTENT_BOX))}prepareText(e,t){const{text:A}=this.getCellInfo(t);return H(e.prepareText,A)}}_.mediaCache=(0,M.A)(200);class k extends _{prepare(e,t){return(0,Q.sH)(this,void 0,void 0,function*(){return U({src:yield this.prepareText(e,t),fallback:e.fallback,timeout:e.timeout,mediaCache:_.mediaCache,cacheKeyPrefix:"image"})})}generateConfig(e,t,A){const{y:n,height:i,width:r}=t.getBBoxByType(F.CONTENT_BOX),{width:o,height:s}=O(r,i,A.naturalWidth,A.naturalHeight),{x:a}=t.getContentPosition({contentWidth:o});return{style:Object.assign({x:a,y:n,src:A,width:o,height:s},e.config)}}render(e,t){e.appendChild(new a._V(t))}destroy(){}}class R extends a._V{constructor(e,t){super(t),this.imgType=e}}function N(e,t){e.setAttributes(t,{skipDispatchAttrModifiedEvent:!0})}function D(e,t){const A=(0,l.get)(this,e);A?N(A,t):(0,l.set)(this,e,new a.rw({style:t}))}class P{constructor(){this.debug=!1,this.debugCallback=(e,t)=>{if(this.debug){const A=performance.now();t();const n=performance.now();console.log(e,n-A+" ms")}else t()},this.logger=(e,...t)=>{this.debug&&console.log(e,...t)}}static getInstance(){return P.instance||(P.instance=new P),P.instance}setDebug(e){this.debug=e}}const G='\n<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="Roboto, PingFangSC, Microsoft YaHei, Arial, sans-serif" font-size="12" font-weight="bold">\n <text id="↓" fill="none">\n <tspan x="-0.225097656" y="8.5">↓</tspan>\n </text>\n</g>\n</svg>',K='<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="Roboto, PingFangSC, Microsoft YaHei, Arial, sans-serif" font-size="12" font-weight="bold">\n <text id="↑" fill="none">\n <tspan x="-0.225097656" y="8.5">↑</tspan>\n </text>\n</g>\n</svg>\n',V='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="7px" height="9px" viewBox="0 0 7 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n <title>down</title>\n <desc>Created with Sketch.</desc>\n <g id="一期开发" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="down" fill="none" transform="translate(3.500000, 4.500000) scale(1, -1) translate(-3.500000, -4.500000) " points="3.5 0 7 9 0 9"></polygon>\n </g>\n</svg>',z='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="7px" height="9px" viewBox="0 0 7 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n <title>up</title>\n <desc>Created with Sketch.</desc>\n <g id="一期开发" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="up" fill="none" points="3.5 0 7 9 0 9"></polygon>\n </g>\n</svg> ',W='<svg t="1557124621626" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17452" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n<defs>\n <style type="text/css"></style>\n</defs>\n<path d="M182.272 167.04a8 8 0 0 0-12.544 0L57.728 309.056A8 8 0 0 0 64 321.984h76.032v530.048c0 4.352 3.584 7.936 7.936 7.936h56.064a8 8 0 0 0 7.936-7.936V321.92H288a8 8 0 0 0 6.272-12.992l-112-141.888z m209.728 626.944h176c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8h-176A8 8 0 0 1 384 857.984v-56c0-4.416 3.584-8 8-8z m0-424h368c4.416 0 8 3.648 8 8v56a8 8 0 0 1-8 8h-368A8 8 0 0 1 384 433.984v-56c0-4.352 3.584-8 8-8z m528-139.968h-528A8 8 0 0 1 384 222.016v-56c0-4.416 3.584-8 8-8h528c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8z m-256 424h-272A8 8 0 0 1 384 646.016v-56c0-4.416 3.584-8 8-8h272c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8z" p-id="17453"></path>\n</svg>',j='<svg t="1557124685600" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17561" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path d="M182.272 856.96a8 8 0 0 1-12.544 0l-112-141.952A8 8 0 0 1 64 702.08h76.032V172.032c0-4.416 3.584-8 7.936-8h56.064c4.352 0 7.936 3.584 7.936 8v529.984H288c6.72 0 10.496 7.808 6.272 12.992l-112 141.888z m209.728-626.944h176A8 8 0 0 0 576 222.016v-56a8 8 0 0 0-8-8h-176A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h368a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-368A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m-256-424h-272A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h272a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17562"></path>\n</svg>',X='<svg t="1557124695786" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17670" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path d="M182.272 167.04a8 8 0 0 0-12.544 0L57.728 309.056A8 8 0 0 0 64 321.984h76.032v530.048c0 4.352 3.584 7.936 7.936 7.936h56.064a8 8 0 0 0 7.936-7.936V321.92H288a8 8 0 0 0 6.272-12.992l-112-141.888z m209.728 62.976h304A8 8 0 0 0 704 222.016v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h304a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m0-424h-528A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17671"></path>\n</svg>',Y='<svg t="1557124710652" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17779" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path d="M182.272 856.96a8 8 0 0 1-12.544 0l-112-141.952A8 8 0 0 1 64 702.08h76.032V172.032c0-4.416 3.584-8 7.936-8h56.064c4.352 0 7.936 3.584 7.936 8v529.984H288c6.72 0 10.496 7.808 6.272 12.992l-112 141.888z m209.728-626.944h304A8 8 0 0 0 704 222.016v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h304a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m0-424h-528A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17780"></path>\n</svg>',q='<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="设计输出" stroke="none" stroke-width="1" fill-opacity="0.25" fill-rule="evenodd">\n <g id="设计输出-移动端指标详情页-阅读端" transform="translate(-3275.000000, -724.000000)" fill-rule="nonzero">\n <g id="编组-39" transform="translate(3064.500000, 667.000000)">\n <g id="编组-36" transform="translate(80.500000, 44.000000)">\n <g id="不排序" transform="translate(130.000000, 13.000000)">\n <path d="M12.0009375,12.40625 C12.0696875,12.40625 12.1259375,12.4625 12.1259375,12.53125 L12.1259375,12.53125 L12.1259375,13.40625 C12.1259375,13.475 12.0696875,13.53125 12.0009375,13.53125 L12.0009375,13.53125 L6.25093747,13.53125 C6.18218747,13.53125 6.12593747,13.475 6.12593747,13.40625 L6.12593747,13.40625 L6.12593747,12.53125 C6.12593747,12.4625 6.18218747,12.40625 6.25093747,12.40625 L6.25093747,12.40625 Z M2.93949997,2.5801875 L2.97437497,2.6109375 L4.72437497,4.828125 C4.78062497,4.89776786 4.74503823,4.99725765 4.66779698,5.02426203 L4.62593747,5.03125 L3.438,5.03089062 L3.43843747,10.9691406 L4.62593747,10.9691406 C4.73062497,10.9691406 4.78999997,11.0910156 4.72437497,11.1722656 L2.97437497,13.3894531 C2.92437497,13.4535156 2.82749997,13.4535156 2.77749997,13.3894531 L1.02749997,11.1722656 C0.961874969,11.0894531 1.02124997,10.9691406 1.12593747,10.9691406 L2.31343747,10.9691406 L2.313,5.03089062 L1.12593747,5.03125 C1.03620533,5.03125 0.979764,4.94285714 1.00679571,4.8654519 L1.02749997,4.828125 L2.77749997,2.6109375 C2.81749997,2.5596875 2.88749997,2.5494375 2.93949997,2.5801875 Z M10.5009375,9.09375 C10.5696875,9.09375 10.6259375,9.15 10.6259375,9.21875 L10.6259375,9.21875 L10.6259375,10.09375 C10.6259375,10.1625 10.5696875,10.21875 10.5009375,10.21875 L10.5009375,10.21875 L6.25093747,10.21875 C6.18218747,10.21875 6.12593747,10.1625 6.12593747,10.09375 L6.12593747,10.09375 L6.12593747,9.21875 C6.12593747,9.15 6.18218747,9.09375 6.25093747,9.09375 L6.25093747,9.09375 Z M14.5009375,5.78125 C14.5696875,5.78125 14.6259375,5.8375 14.6259375,5.90625 L14.6259375,5.90625 L14.6259375,6.78125 C14.6259375,6.85 14.5696875,6.90625 14.5009375,6.90625 L14.5009375,6.90625 L6.25093747,6.90625 C6.18218747,6.90625 6.12593747,6.85 6.12593747,6.78125 L6.12593747,6.78125 L6.12593747,5.90625 C6.12593747,5.8375 6.18218747,5.78125 6.25093747,5.78125 L6.25093747,5.78125 Z M9.00093747,2.46875 C9.06968747,2.46875 9.12593747,2.525 9.12593747,2.59375 L9.12593747,2.59375 L9.12593747,3.46875 C9.12593747,3.5375 9.06968747,3.59375 9.00093747,3.59375 L9.00093747,3.59375 L6.25093747,3.59375 C6.18218747,3.59375 6.12593747,3.5375 6.12593747,3.46875 L6.12593747,3.46875 L6.12593747,2.59375 C6.12593747,2.525 6.18218747,2.46875 6.25093747,2.46875 L6.25093747,2.46875 Z" id="形状结合"></path>\n </g>\n </g>\n </g>\n </g>q\n</g>\n</svg>',Z='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1590389330617" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19656" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 64c-247.4 0-448 200.6-448 448s200.6 448 448 448 448-200.6 448-448-200.6-448-448-448z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" fill="" p-id="19657"></path><path d="M464 336c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zM536 448h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-272c0-4.4-3.6-8-8-8z" fill="" p-id="19658"></path></svg>',J='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="23px" height="12px" viewBox="0 0 23 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>编组 8备份 3</title>\n <g id="----隐藏列标注!" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="隐藏列标注" transform="translate(-275.000000, -824.000000)">\n <rect fill="#FFFFFF" x="0" y="0" width="1333" height="1167"></rect>\n <g id="编组-8备份-3" transform="translate(275.000000, 824.000000)">\n <rect id="矩形" stroke-opacity="0.25" stroke="#000000" fill="#F7F7F7" x="0.5" y="0.5" width="11" height="11"></rect>\n <rect id="矩形备份-9" stroke-opacity="0.25" stroke="#000000" fill="#F7F7F7" x="11.5" y="0.5" width="11" height="11"></rect>\n <g id="7.Icon/arrow/15.down/fill" transform="translate(6.000000, 6.000000) rotate(90.000000) translate(-6.000000, -6.000000) " fill="#000000" fill-rule="nonzero" opacity="0.65">\n <path d="M7.25020811,6.37218077 L4.91348936,8.20968077 C4.82677061,8.27764952 4.69903624,8.21671202 4.69903624,8.10655577 L4.69903624,4.43272764 C4.69903624,4.32257139 4.82677061,4.26046202 4.91348936,4.32960264 L7.25020811,6.16593077 C7.31700499,6.21866514 7.31700499,6.31944639 7.25020811,6.37218077 Z" id="fill" transform="translate(5.999671, 6.269385) rotate(90.000000) translate(-5.999671, -6.269385) "></path>\n </g>\n <g id="7.Icon/arrow/15.down/fill" transform="translate(17.000000, 6.000000) rotate(270.000000) translate(-17.000000, -6.000000) translate(11.000000, 0.000000)" fill="#000000" fill-rule="nonzero" opacity="0.65">\n <path d="M7.25020811,6.37218077 L4.91348936,8.20968077 C4.82677061,8.27764952 4.69903624,8.21671202 4.69903624,8.10655577 L4.69903624,4.43272764 C4.69903624,4.32257139 4.82677061,4.26046202 4.91348936,4.32960264 L7.25020811,6.16593077 C7.31700499,6.21866514 7.31700499,6.31944639 7.25020811,6.37218077 Z" id="fill" transform="translate(5.999671, 6.269385) rotate(90.000000) translate(-5.999671, -6.269385) "></path>\n </g>\n </g>\n <line x1="286.5" y1="813" x2="286.5" y2="864.5" id="路径-2备份-3" stroke="#000000" opacity="0.25"></line>\n </g>\n </g>\n</svg>',$='<svg t="1557140120188" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16909" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n\t<defs>\n\t\t<style type="text/css">\n\t\t</style>\n\t</defs>\n\t<path d="M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"\n\tp-id="16910">\n\t</path>\n\t<path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-40 728H184V184h656v656z"\n\tp-id="16911">\n\t</path>\n</svg>',ee='<svg t="1557140186692" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17025" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n\t<defs>\n\t\t<style type="text/css">\n\t\t</style>\n\t</defs>\n\t<path d="M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"\n\tp-id="17026">\n\t</path>\n\t<path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-40 728H184V184h656v656z"\n\tp-id="17027">\n\t</path>\n</svg>',te='<svg t="1565940955886" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path\n d="M948 392.992l-403.008 488.99200001Q532 896 512.992 896t-32-14.016L76 392.992q-18.016-20.992-7.008-46.016T108 321.98400001L916 321.98400001q28 0 39.008 24.99199999T948 392.992z"\n p-id="17473" data-spm-anchor-id="a313x.7781069.0.i2" class="selected"></path>\n</svg>\n',Ae='<svg t="1565940955886" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path\n fill-opacity="0.45"\n d="M948 392.992l-403.008 488.99200001Q532 896 512.992 896t-32-14.016L76 392.992q-18.016-20.992-7.008-46.016T108 321.98400001L916 321.98400001q28 0 39.008 24.99199999T948 392.992z"\n p-id="17473" data-spm-anchor-id="a313x.7781069.0.i2" class="selected"></path>\n</svg>\n',ne='<svg t="1565940979768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17620" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n<defs>\n<style type="text/css"></style>\n</defs>\n<path\nd="M76 631.008l403.008-488.99200001Q492 128 511.008 128t32 14.016L948 631.008q18.016 20.992 7.008 46.016T916 702.01599999L108 702.01599999q-28 0-39.008-24.99199999T76 631.008z"\np-id="17621"></path>\n</svg>\n',ie='<svg t="1565940979768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17620" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path\n fill-opacity="0.45"\n d="M76 631.008l403.008-488.99200001Q492 128 511.008 128t32 14.016L948 631.008q18.016 20.992 7.008 46.016T916 702.01599999L108 702.01599999q-28 0-39.008-24.99199999T76 631.008z"\n p-id="17621"></path>\n</svg>\n',re='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1596433821690" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20229" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6c-3.1-3.1-8.2-3.1-11.3 0l-230 229.9L461.4 404c-3.1-3.1-8.2-3.1-11.3 0L266.3 586.7c-3.1 3.1-3.1 8.2 0 11.3l39.5 39.7z" p-id="20230"></path></svg>',oe='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1608030723688" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21482" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M547.648 696a32 32 0 0 1 31.488 26.24l0.512 5.76v151.68l145.216-144.512a32 32 0 0 1 40.832-3.648l4.416 3.712a32 32 0 0 1 3.584 40.832l-3.712 4.48-203.072 202.24a32 32 0 0 1-40.768 3.648l-4.416-3.712-202.24-202.24a32 32 0 0 1 40.832-48.96l4.416 3.712 150.912 150.912v-158.144a32 32 0 0 1 32-32z m194.56-529.28l4.928 3.072 233.792 180.224a32 32 0 0 1 1.728 49.28l-4.864 3.52-409.792 245.568a32 32 0 0 1-27.328 2.624l-5.184-2.432-422.4-245.568a32 32 0 0 1-7.552-49.28l4.544-4.032 242.816-180.288a32 32 0 0 1 42.432 47.552l-4.288 3.84-203.84 151.296 364.16 211.648 353.28-211.712-196.608-151.552a32 32 0 0 1-8.896-40l3.136-4.864a32 32 0 0 1 40-8.96zM547.712 28.672a32 32 0 0 1 31.488 26.24l0.512 5.76v396.992a32 32 0 0 1-63.488 5.76l-0.512-5.76V60.736a32 32 0 0 1 32-32z" p-id="21483" fill="currentColor"></path></svg>\n',se='<svg viewBox="64 64 896 896" focusable="false" data-icon="eye" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path></svg>',ae='<svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',le='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M0 0h1024v1024H0z" fill="#000000" opacity=".01" p-id="5072"></path><path d="M520 128C736.496 128 912 303.504 912 520S736.496 912 520 912C303.6 911.76 128.24 736.4 128 520 128 303.504 303.504 128 520 128z m0 60.288c-183.12 0.192-331.52 148.592-331.712 331.712 0 183.2 148.496 331.712 331.712 331.712 183.2 0 331.712-148.512 331.712-331.712S703.2 188.288 520 188.288z m-84.528 176.576l233.776 155.264-233.76 155.024V364.864z" fill="#A8ADBB" p-id="5073"></path></svg>',ue={},ce=(e,t)=>{ue[(0,l.lowerCase)(e)]=t},he=e=>ue[(0,l.lowerCase)(e)];(0,l.keys)(n).forEach(e=>{const t=(0,l.get)(n,e);ce(e,t)});const de="<svg",fe="data:image/svg+xml",ge={},pe={};class ve extends a.YJ{constructor(e){super({name:e.name}),this.iconPathShapes=[],this.usePathMode=!1,this.isOnlineLink=e=>/^(?:https?:)?(?:\/\/)/.test(e),this.cfg=e,this.render()}getCfg(){return this.cfg}tryRenderAsPath(e,t){const A=he(e);if(!A)return!1;if(A.includes(fe)||this.isOnlineLink(A))return!1;const n=e;let i=pe[n];if(!i){const e=function(e){if(/transform|translate|scale|rotate|<g|<rect|<circle|<ellipse|<line|<polyline|<polygon|<text|<tspan/i.test(e))return null;const t=e.match(/viewBox=["']([^"']+)["']/);if(!t)return null;const A=t[1].split(/\s+/).map(Number);if(A.length<4)return null;const n={width:A[2],height:A[3]},i=e.replace(/[\r\n]+/g," ");let r=[];const o=i.match(/\bd="[^"]+"/g);if(o&&(r=o.map(e=>e.slice(3,-1))),0===r.length){const e=i.match(/\bd='[^']+'/g);e&&(r=e.map(e=>e.slice(3,-1)))}return 0===r.length?null:{viewBox:n,paths:r}}(A);e&&(i=e,pe[n]=e)}if(!i)return!1;const{x:r=0,y:o=0,width:s,height:l,cursor:u}=this.cfg,c="number"==typeof s?s:0,h="number"==typeof l?l:0,d=c/i.viewBox.width,f=h/i.viewBox.height;this.iconPathShapes.forEach(e=>{this.removeChild(e),e.destroy()}),this.iconPathShapes=[];const g=new a.rw({style:{x:"number"==typeof r?r:0,y:"number"==typeof o?o:0,width:c,height:h,fill:"transparent",cursor:u||"default"}});this.appendChild(g),this.iconPathShapes.push(g);for(const e of i.paths){const A=new a.wA({style:{d:e,fill:t||"#000",transformOrigin:"0 0",transform:`translate(${r}, ${o}) scale(${d}, ${f})`,cursor:u||"default",pointerEvents:"none"}});this.appendChild(A),this.iconPathShapes.push(A)}return!0}getImage(e,t,A){return new Promise((n,i)=>{let r=he(e);if(!r)return;const o=new Image;if(o.onload=()=>{ge[t]=o,n(o)},o.onerror=i,r&&(r.includes(fe)||this.isOnlineLink(r)))o.src=r,o.crossOrigin="anonymous";else{A&&(r=r.replace(/fill=[\'\"]\#?\w+[\'\"]/g,""),r=r.replace(/fill>/g,">")),r=r.replace(de,`${de} fill="${A}"`);const e=new Blob([r],{type:"image/svg+xml"}),t=URL.createObjectURL(e),n=o.onload;o.onload=e=>{URL.revokeObjectURL(t),null==n||n.call(o,e)};const i=o.onerror;o.onerror=e=>{URL.revokeObjectURL(t),"function"==typeof i&&i.call(o,e)},o.src=t}})}render(){const{name:e,fill:t,iconStrategy:A}=this.cfg;if("path"===A&&this.tryRenderAsPath(e,t))return void(this.usePathMode=!0);this.usePathMode=!1;const n=(0,l.clone)(this.cfg),i=new R(ve.type,{style:(0,l.omit)(n,["fill","iconStrategy"])});this.iconImageShape=i,this.setImageAttrs({name:e,fill:t})}reRender(e){this.name=e.name,this.cfg=e;const{name:t,fill:A,iconStrategy:n}=this.cfg;if(this.usePathMode&&(this.iconPathShapes.forEach(e=>{this.removeChild(e),e.destroy()}),this.iconPathShapes=[]),"path"===n&&this.tryRenderAsPath(t,A))return void(this.usePathMode=!0);this.usePathMode=!1;const i=(0,l.clone)(this.cfg);this.iconImageShape?(this.iconImageShape.imgType=ve.type,N(this.iconImageShape,(0,l.omit)(i,["fill","iconStrategy"]))):this.iconImageShape=new R(ve.type,{style:(0,l.omit)(i,["fill","iconStrategy"])}),this.setImageAttrs({name:t,fill:A})}updatePosition(e){if(this.usePathMode){const{width:t,height:A}=this.cfg,n=pe[this.cfg.name];if(n){const i=("number"==typeof t?t:0)/n.viewBox.width,r=("number"==typeof A?A:0)/n.viewBox.height;this.iconPathShapes.forEach(t=>{t.style.transform=`translate(${e.x}, ${e.y}) scale(${i}, ${r})`})}}else this.iconImageShape&&N(this.iconImageShape,e)}setImageAttrs(e){if(this.usePathMode){const t=e.fill||this.cfg.fill||"#000";return void this.iconPathShapes.slice(1).forEach(e=>{e.style.fill=t})}let{name:t,fill:A}=e;const{iconImageShape:n}=this;if(!n)return;t=t||this.cfg.name,A=A||this.cfg.fill;const i=`${t}-${A}`,r=ge[i];r?(n.attr("src",r),this.appendChild(n)):this.getImage(t,i,A).then(e=>{this.destroyed?P.getInstance().logger(`GuiIcon ${t} destroyed.`):(n.attr("src",e),this.appendChild(n))}).catch(e=>{e instanceof TypeError?console.warn(`GuiIcon ${t} destroyed:`,e):console.error(`GuiIcon ${t} load failed:`,e)})}toggleVisibility(e){const t=e?"visible":"hidden";this.setAttribute("visibility",t),this.usePathMode?this.iconPathShapes.forEach(e=>{e.style.visibility=t}):this.iconImageShape&&this.iconImageShape.setAttribute("visibility",t)}}ve.type="__GUI_ICON__";const me={loop:!0,autoplay:!1,preload:"auto",crossOrigin:!0,controls:!1,muted:!0};class Ce extends _{constructor(){super(...arguments),this.fallback=""}prepare(e,t){return(0,Q.sH)(this,void 0,void 0,function*(){const A=yield this.prepareText(e,t);return new Promise(n=>{const{height:i,width:r}=this.getCellInfo(t),{timeout:o=1e4,fallback:s=""}=e;this.fallback=s;const a=_.getCacheKey("video",A);if(_.mediaCache.has(a)){const e=_.mediaCache.get(a);if(e instanceof HTMLVideoElement||e instanceof HTMLImageElement)return void n(e);if(null===e)return void n(s)}const l=document.createElement("video"),u=()=>(0,Q.sH)(this,void 0,void 0,function*(){if(s){const e=yield U({src:s,fallback:"",timeout:5e3,mediaCache:_.mediaCache}).catch(()=>null);if(e)return _.mediaCache.set(a,e),void n(e)}_.mediaCache.set(a,null),n(s)}),c=setTimeout(u,o),h=Object.assign(Object.assign({height:i,width:r,src:A},me),e.videoConfig);Object.assign(l,h),l.onloadeddata=()=>{clearTimeout(c),h.autoplay||(l.pause(),l.currentTime=.001),_.mediaCache.set(a,l),n(l)};const d=()=>{clearTimeout(c),u()};["error","abort","stalled"].forEach(e=>{l.addEventListener(e,d)})})})}generateConfig(e,t,A){const{y:n,height:i}=t.getBBoxByType(F.CONTENT_BOX),r=Math.max(t.getMaxTextWidth(),0);let o=r,s=i,a="transparent";if(A instanceof HTMLVideoElement||A instanceof HTMLImageElement){const{width:e,height:t}=(l=A)instanceof HTMLVideoElement?{width:l.videoWidth,height:l.videoHeight}:{width:l.naturalWidth,height:l.naturalHeight},{width:n,height:u}=O(r,i,e,t);o=n,s=u,a={image:A,repetition:"no-repeat",transform:`scale(${n/e}, ${u/t})`}}else a="transparent";var l;const{x:u}=t.getContentPosition({contentWidth:o});return{style:Object.assign({x:u,y:n+(i-s)/2,width:o,height:s,fill:a},e.config),isFallback:A instanceof HTMLImageElement}}render(e,t){if(t.isFallback)return void e.appendChild(new a._V((0,l.merge)({},t,{style:{src:this.fallback}})));const A=new a.rw(Object.assign(Object.assign({},t),{name:L})),{x:n,y:i,width:r,height:o}=t.style,s=.25*Math.min(r,o);A.appendChild(new ve({name:"Play",width:s,height:s,x:n+r/2-s/2,y:i+o/2-s/2,pointerEvents:"none",cursor:"pointer"})),e.appendChild(A)}}class we{static getInstance(e){if(!we.instances.has(e)){let t;switch(e){case T.IMAGE:t=new k;break;case T.VIDEO:t=new Ce;break;default:t=null}t&&we.instances.set(e,t)}return we.instances.get(e)}static render(e,t){return we.getInstance(e.type).process(e,t)}}we.instances=new Map;const ye="$$value$$",Be="$$extra$$",Ee="$$origin$$",xe="$$extra_column$$",be="$$total$$",Fe="$$multi$$",Se="$$series_number$$",Te="$$empty_field_value$$",Le="$$empty_extra_placeholder$$",Qe="$$null$$",Ie="$$undefined$$",Ue=(e=[],t="right")=>e.map(e=>"string"==typeof e?{name:e,position:t}:e),Oe=(e=[],t,A)=>{const n=((e=[])=>e.map(e=>Object.assign(Object.assign({},e),{icons:Ue(e.icons)})))(e),i=(0,l.find)(n,e=>((e,t,A)=>{if(!e)return!1;const{icons:n,displayCondition:i,belongsCell:r}=e;return!(0,l.isEmpty)(n)&&r===A&&n.some(e=>{var A,n,r;return null===(r=null!==(n=null===(A=e.displayCondition)||void 0===A?void 0:A.call(e,t,e.name))&&void 0!==n?n:null==i?void 0:i(t,e.name))||void 0===r||r})})(e,t,A));if(!i)return;const r=i.icons.filter(e=>{var A,n,r,o;return null===(o=null!==(n=null===(A=e.displayCondition)||void 0===A?void 0:A.call(e,t,e.name))&&void 0!==n?n:null===(r=i.displayCondition)||void 0===r?void 0:r.call(i,t,e.name))||void 0===o||o});return Object.assign(Object.assign({},i),{icons:r})},He=(e=[],t)=>{if((0,l.isEmpty)(e))return 0;const{margin:A,size:n}=t;return e.reduce((e,{position:t})=>e+n+("left"===t?A.right:A.left),0)},Me=(e=[],t)=>{const A=(0,l.merge)({left:[],right:[]},(0,l.groupBy)(e,"position"));return t&&("left"===t.position?A.left.push(t):A.right.unshift(t)),A},_e=(e,t)=>{const{value:A,field:n}=e;return(0,l.isEqual)(n,Be)?{formattedValue:t||A,value:A}:{formattedValue:A,value:A}},ke=(e,t)=>{const{y:A,height:n}=e;switch(t){case"top":return A;case"middle":return A+n/2;default:return A+n}},Re=(e,t,A,n)=>{const i=(A-e)/2;switch(n){case"top":return t+i;case"middle":return t-e/2;default:return t-i-e}},Ne=e=>{const{bbox:t,textWidth:A,textAlign:n,groupedIcons:i,iconStyle:r,isCustomRenderer:o=!1}=e,{x:s,width:a}=t,l=He(i.left,r),u=He(i.right,r);let c,h,d;switch(n){case"left":h=s,c=s+l,d=c+A+(u&&r.margin.left);break;case"right":c=s+a-u-(o?A:0),h=c-(o?0:A)-l,d=s+a-u+(u&&r.margin.left);break;default:h=s+a/2-(l+A+u)/2,c=h+l+(o?0:A/2),d=h+l+A+(u&&r.margin.left)}return{textX:c,leftIconX:h,rightIconX:d}},De=(e,t,A)=>{const{x:n,y:i,width:r,height:o}=t||{},{horizontalBorderWidth:s=0,horizontalBorderColorOpacity:a,horizontalBorderColor:u,verticalBorderWidth:c=0,verticalBorderColor:h,verticalBorderColorOpacity:d,borderDash:f}=A||{},g=(0,l.isEmpty)(f)?"":f,p=[b.TOP,b.BOTTOM].includes(e)?{lineWidth:s,stroke:u,strokeOpacity:a,lineDash:g}:{lineWidth:c,stroke:h,strokeOpacity:d,lineDash:g};let v=0,m=0,C=0,w=0;if(e===b.TOP||e===b.BOTTOM){let t=i;t=e===b.TOP?i+s/2:i+o-s/2,m=t,w=t,v=n,C=n+r}if(e===b.LEFT||e===b.RIGHT){let t=n;t=e===b.LEFT?n+c/2:n+r-c/2,v=t,C=t,m=i,w=i+o}return{position:{x1:v,x2:C,y1:m,y2:w},style:p}};var Pe=A("./node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js");const Ge=[95,85,75,30,15,0,15,30,45,60,80],Ke=e=>(0,Pe.A)(e).getLuminance()<=.5,Ve=[{fontColorIndex:0,bgColorIndex:3},{fontColorIndex:13,bgColorIndex:8},{fontColorIndex:14,bgColorIndex:1}],ze=(e={})=>{const t=Array.from(Array(15)).fill(x),{basicColorRelations:A=[],brandColor:n}=e,i=(e=>{const t=[];for(let A=0;A<11;A++){const n=Ge[A];t.push((0,l.toUpper)(0===n?e:Pe.A.mix(e,A<5?"#FFFFFF":"#000000",n).toHexString()))}return t})(n);return A.forEach(e=>{t[e.basicColorIndex]=i[e.standardColorIndex]}),Ve.forEach(({fontColorIndex:e,bgColorIndex:A})=>{t[e]=Ke(t[A])?x:E}),Object.assign(Object.assign({},e),{basicColors:t})};"KMBTP".split("");const We=e=>Number.parseFloat(((0,l.toNumber)(e)||0).toPrecision(16)),je=e=>{var t;return null!==(t=null==e?void 0:e.position)&&void 0!==t?t:"right"},Xe=(e=[],t)=>(0,l.findLast)((0,l.compact)(e),e=>e.field instanceof RegExp?e.field.test(t):e.field===t);class Ye extends a.EY{constructor(e,t){super(e),this.appendInfo=t}}function qe(e,t){return null==e?void 0:e.appendChild(new a.rw({style:t}))}function Ze(e,t){return null==e?void 0:e.appendChild(new a.jl({style:t}))}function Je(e){const{group:t,textShape:A,style:n,appendInfo:i}=e;return A&&t&&t.contains(A)&&t.removeChild(A),null==t?void 0:t.appendChild(new Ye({style:Object.assign({fontVariant:"normal",fontStyle:"normal",lineWidth:1},n)},i||{}))}function $e(e,t){return null==e?void 0:e.appendChild(new a.N1({style:Object.assign({zIndex:100},t)}))}function et(e,t,A){(0,l.isEmpty)(e)||((0,l.isArray)(e)?e:[e]).forEach(e=>{var n;null===(n=null==e?void 0:e.style)||void 0===n||n.setProperty(t,A)})}function tt(e,t){const A=new ve(t);return null==e||e.appendChild(A),A}function At(e){const{group:t,iconCfg:A,isCollapsed:n,onClick:i}=e,r=tt(t,Object.assign(Object.assign({},A),{name:n?"Plus":"Minus",cursor:"pointer"}));return(0,l.isFunction)(i)&&r.addEventListener("click",i),r}function nt(e,t){for(const A in t)e.style[A]=t[A]}function it(e,t){const A=(0,l.get)(this,e);A?nt(A,t):(0,l.set)(this,e,new a.rw({style:t}))}var rt;function ot(){return"undefined"==typeof window}function st(){return"undefined"!=typeof document}function at(){return"undefined"!=typeof navigator}function lt(e){return e===rt.MOBILE||!(ot()||!at())&&/(?:iPhone|iPad|SymbianOS|Windows Phone|iPod|iOS|Android|Mobile|Phone|Tablet)/i.test(navigator.userAgent)}function ut(){return!ot()&&/windows/i.test(navigator.userAgent)}!function(e){e.PC="pc",e.MOBILE="mobile"}(rt||(rt={}));let ct={zh_CN:{小计:"小计",总计:"总计",总和:"(总和)",项:"项",已选择:"已选择",序号:"序号",度量:"度量",数值:"数值",共计:"共计",条:"条",趋势:"趋势",隐藏:"隐藏",组内升序:"组内升序",升序:"升序",降序:"降序",组内降序:"组内降序",不排序:"不排序",暂无数据:"暂无数据",",":","},en_US:{小计:"Total",总计:"Total",总和:"(SUM)",项:"items",已选择:"selected",序号:"Index",度量:"Measure",数值:"Measure",共计:"Total",条:"",隐藏:"Hide",组内升序:"Group ASC",组内降序:"Group DESC",升序:"ASC",降序:"DESC",不排序:"No order",暂无数据:"No Data",",":", "},ru_RU:{小计:"Промежуточный итог",总计:"Общий итог",总和:"(СУММА)",项:"элемент(-а/-ов)",已选择:"выбрано",序号:"Индекс",度量:"Мера",数值:"Численная величина",共计:"Общее количество",条:"",隐藏:"Скрыть",趋势:"Курс",组内升序:"Группировать по возрастанию",组内降序:"Группировать по убыванию",升序:"По возрастанию",降序:"По убыванию",不排序:"Не отсортировано",",":", "}};const ht=(e,t=e)=>(0,l.get)(ct,["zh_CN",e],t),dt="mergedCellsGroup",ft="rowIndexResizeAreaGroup",gt="rowResizeAreaGroup",pt="colResizeAreaGroup",vt="cornerResizeAreaGroup",mt="frozenSplitLine",Ct="horizontal-resize-area-";var wt;!function(e){e.Line="line",e.Bar="bar",e.Bullet="bullet"}(wt||(wt={}));const yt=(e,t)=>{var A;const{data:n,encode:i,type:r}=e,{x:s,y:a,height:u,width:c}=t.getMeta(),h=t.getStyle(o.DATA_CELL),{cell:d,miniChart:f}=h,g=[],p=(0,l.map)(n,e=>(g.push(null==e?void 0:e[i.y]),{x:e[i.x],y:e[i.y]})),v=(0,l.max)(g)||0,m=(0,l.min)(g)||0;let C=v-m;const{left:w=0,right:y=0,top:B=0,bottom:E=0}=d.padding,x=s+w,b=s+c-y,F=a+B,S=a+u-E,T=S-F,L=null===(A=null==f?void 0:f.bar)||void 0===A?void 0:A.intervalPadding;let Q;Q=r===wt.Bar?(b-x-(g.length-1)*L)/g.length+L:g.length>1?(b-x)/(g.length-1):0;const I=[];return{points:(0,l.map)(p,(e,t)=>{const A=x+t*Q;let n;if(n=0!==C?S-((null==e?void 0:e.y)-m)/C*T:m>0?F:S,r===wt.Bar){let t,A;m<0&&v>0&&0!==C?(t=S-(0-m)/C*T,A=Math.abs(n-t),(null==e?void 0:e.y)<0&&(n=t)):(C=(0,l.max)([Math.abs(v),Math.abs(m)]),A=0===C&&0===m&&0===v?0:0===C?T:Math.abs((null==e?void 0:e.y)-0)/C*T,n=m<0?F:S-A),I.push([Q-L,A])}return[A,n]}),box:I}},Bt=(e,t,A)=>{const n=Number(t)-Number(e);return Number.isNaN(n)||Number(e)<0?A.bad:n<=.1?A.good:n>.1&&n<=.2?A.satisfactory:A.bad},Et=(e,t)=>{switch(null==t?void 0:t.type){case wt.Line:((e,t)=>{if((0,l.isEmpty)(null==e?void 0:e.data)||(0,l.isEmpty)(t))return;const A=(e=>{const{data:t,encode:A}=e,n=t.filter(e=>{const t=null==e?void 0:e[A.y];return"number"==typeof t&&!Number.isNaN(t)});return Object.assign(Object.assign({},e),{data:n})})(e);if((0,l.isEmpty)(A.data))return;const n=t.getStyle(o.DATA_CELL),{miniChart:i}=n,{point:r,linkLine:s}=null==i?void 0:i.line,{points:u}=yt(A,t);var c;u.length>1&&(null==(c=t)||c.appendChild(new a.Ro({style:{points:u,stroke:null==s?void 0:s.fill,lineWidth:null==s?void 0:s.size,opacity:null==s?void 0:s.opacity}})));for(let e=0;e<u.length;e++)Ze(t,{cx:u[e][0],cy:u[e][1],r:r.size,fill:r.fill,fillOpacity:null==r?void 0:r.opacity})})(t,e);break;case wt.Bar:((e,t)=>{if((0,l.isEmpty)(null==e?void 0:e.data)||(0,l.isEmpty)(t))return;const A=t.getStyle(o.DATA_CELL),{miniChart:n}=A,{bar:i}=n,{points:r,box:s}=yt(e,t);for(let e=0;e<r.length;e++)qe(t,{x:r[e][0],y:r[e][1],width:s[e][0],height:s[e][1],fill:i.fill,fillOpacity:i.opacity})})(t,e);break;default:((e,t)=>{const A=t.getStyle(o.DATA_CELL),{x:n,y:i,height:r,width:s}=t.getMeta();if((0,l.isEmpty)(e))return void t.renderTextShape(Object.assign(Object.assign({},A.text),{x:n+s-A.cell.padding.right,y:i+r/2,text:""}));const a=A.miniChart.bullet,{progressBar:u,comparativeMeasure:c,rangeColors:h,backgroundColor:d}=a,{measure:f,target:g}=e,p=Math.max(Number(f),0),v=Math.max(Number(g),0),m=((e,t={min:0,max:0})=>{var A,n;const i=Number(e);if(Number.isNaN(i))return e;const r=null!==(A=null==t?void 0:t.min)&&void 0!==A?A:t,o=null!==(n=null==t?void 0:t.max)&&void 0!==n?n:t;return new Intl.NumberFormat("en-US",{minimumFractionDigits:r,maximumFractionDigits:o,useGrouping:!1,style:"percent"}).format(i)})(f,2),C=A.cell.padding,w=s-C.left-C.right,y=((null==u?void 0:u.widthPercent)>1?(null==u?void 0:u.widthPercent)/100:null==u?void 0:u.widthPercent)*w,B=w-y,E=n+s-C.right-y,x=i+r/2-u.height/2;qe(t,{x:E,y:x,width:y,height:u.height,fill:d});const b=Math.max(Math.min(y*p,y),0);qe(t,{x:E,y:x+(u.height-u.innerHeight)/2,width:b,height:u.innerHeight,fill:Bt(p,v,h)});const F=E+y*v;$e(t,{x1:F,y1:i+(r-c.height)/2,x2:F,y2:i+(r-c.height)/2+c.height,stroke:null==c?void 0:c.fill,lineWidth:c.width,opacity:null==c?void 0:c.opacity});const S=B-C.right;t.renderTextShape(Object.assign(Object.assign({},A.text),{x:E-C.right,y:i+r/2,text:m,wordWrapWidth:S}))})(t,e)}},xt=e=>(0,l.isUndefined)(e)?Ie:(0,l.isNull)(e)?Qe:String(e),bt=e=>e===Qe?null:e!==Ie?e:void 0,Ft=(...e)=>e.map(xt).join("[&]"),St=(e,t)=>{const A=bt(e),n=null!=t?t:"-",i=(0,l.isNumber)(A)&&Number.isNaN(A),r=""===A||A===Te;return(0,l.isNil)(A)||i||r?n:bt(A)},Tt=e=>e===Te?"-":e,Lt=(e,t,A,n="left")=>{const{right:i=0,left:r=0}=t,o=A||0;return"left"===n?e+i/2+o:"right"===n?e-i/2-o:e+r/2+o},Qt=({rowIndex:e,colIndex:t,meta:A,data:n,textStyle:i,textCondition:r,cell:o})=>{var s;const a=null===(s=null==r?void 0:r.mapping)||void 0===s?void 0:s.call(r,n,{rowIndex:e,colIndex:t,meta:A},o);return Object.assign(Object.assign({},i),a)},It=(e,t)=>(0,l.isFunction)(null==t?void 0:t.cell)?null==t?void 0:t.cell(e):null==t?void 0:t.cell,Ut=(e,t,A=!0)=>{var n,i,r,s,a,u,c,h,d,f;const{x:g,y:p,height:v,width:m}=e.getBBoxByType(F.CONTENT_BOX),C=e.getMeta(),w=t||C.fieldValue,{values:y}=w,{options:B}=C.spreadsheet,E=null===(i=null===(n=null==B?void 0:B.conditions)||void 0===n?void 0:n.text)||void 0===i?void 0:i[0],x=null===(s=null===(r=null==B?void 0:B.conditions)||void 0===r?void 0:r.icon)||void 0===s?void 0:s[0];if(!(0,l.isArray)(y))return void Et(e,y);const b=null===(c=null===(u=null===(a=B.style)||void 0===a?void 0:a.dataCell)||void 0===u?void 0:u.valuesCfg)||void 0===c?void 0:c.widthPercent;let S=0;if(null==w?void 0:w.label){const t=e.getStyle(o.DATA_CELL);S=v/(y.length+1),e.renderTextShape(Object.assign(Object.assign({},t.bolderText),{x:g,y:p+S/2,text:w.label,maxLines:1,wordWrapWidth:m,wordWrap:!0,textOverflow:"ellipsis"}),{shallowRender:!0})}const{cellStyle:T,textStyle:L}=(e=>{var t,A;const{isTotals:n}=e.getMeta(),i=null===(A=(t=e).isMeasureField)||void 0===A?void 0:A.call(t),r=e.getStyle(e.cellType||o.DATA_CELL);let s;return s=i?null==r?void 0:r.measureText:n?null==r?void 0:r.bolderText:null==r?void 0:r.text,{cellStyle:r,textStyle:s}})(e),Q=null==T?void 0:T.icon,I=x&&x.mapping&&{name:"",size:null==Q?void 0:Q.size,margin:null==Q?void 0:Q.margin,position:je(x)};let U;const O=((e,t,A)=>{const{x:n,y:i,width:r,height:o}=e,s=o/(0,l.size)(t),a=[];let u,c,h,d=0;const f=(0,l.map)(A,e=>e>1?e/100:e);for(let e=0;e<(0,l.size)(t);e++){c=i+s*e;const A=[];u=n,d=0;for(let i=0;i<(0,l.size)(t[e]);i++)h=(0,l.isEmpty)(f)?r/(0,l.size)(t[0]):r*f[i],u=Lt(n,{left:0,right:0},d,"left"),d+=h,A.push({x:u,y:c,width:h,height:s});a.push(A)}return a})({x:g,y:p+S,height:v-S,width:m},y,b);for(let t=0;t<y.length;t++){const n=(0,l.clone)(y[t]);for(let i=0;i<n.length;i++){U=n[i];const r=A?Qt({rowIndex:t,colIndex:i,meta:C,data:U,textStyle:L,textCondition:E,cell:e}):L,o=O[t][i].width-(null==Q?void 0:Q.size)-("left"===(null==I?void 0:I.position)?null===(h=null==Q?void 0:Q.margin)||void 0===h?void 0:h.right:null===(d=null==Q?void 0:Q.margin)||void 0===d?void 0:d.left),s={left:[],right:[]};I&&s[I.position].push(I),e.renderTextShape(Object.assign(Object.assign({},r),{x:0,y:0,maxLines:1,text:U,wordWrapWidth:o}),{shallowRender:!0});const a=e.getActualTextWidth(),{textX:l,leftIconX:u,rightIconX:c}=Ne({bbox:O[t][i],textAlign:r.textAlign,textWidth:a,iconStyle:Q,groupedIcons:s}),g=ke(O[t][i],r.textBaseline);if(e.updateTextPosition({x:l,y:g}),x&&A){const A=null===(f=null==x?void 0:x.mapping)||void 0===f?void 0:f.call(x,U,{rowIndex:t,colIndex:i,meta:null==e?void 0:e.getMeta()},e),n="left"===(null==I?void 0:I.position)?u:c,o=Re(Q.size,g,r.fontSize,r.textBaseline);if(A){const t=tt(e,{x:n,y:o,name:A.icon,width:null==Q?void 0:Q.size,height:null==Q?void 0:Q.size,fill:A.fill});e.addConditionIconShape(t)}}}}},Ot=(e,t=1)=>(null==e?void 0:e.width)*t;class Ht extends a.YJ{get actualText(){return this.getMultiLineActualTexts().join("")}constructor(e,t,...A){super({}),this.textShapes=[],this.conditionIconShapes=[],this.stateShapes=new Map,this.borders=new Map,this.meta=e,this.spreadsheet=t,this.theme=t.theme,this.conditions=this.spreadsheet.options.conditions,this.groupedIcons={left:[],right:[]},this.handleRestOptions(...A),this.shouldInit()&&this.initCell()}handleRestOptions(...e){}getResizedTextMaxLines(){}getMeta(){return this.meta}setMeta(e){this.meta=e}getIconStyle(){var e;return null===(e=this.theme[this.cellType])||void 0===e?void 0:e.icon}isShallowRender(){return!1}getCellTextWordWrapStyle(e){var t,A;const{wordWrap:n,maxLines:i,textOverflow:r}=(null===(A=null===(t=this.spreadsheet.options)||void 0===t?void 0:t.style)||void 0===A?void 0:A[e||this.cellType])||{};return{wordWrap:n,maxLines:i,textOverflow:r}}getActualText(){return this.getMultiLineActualTexts().join("")}getActualTextWidth(){var e;return(null===(e=this.textShape)||void 0===e?void 0:e.getComputedTextLength())||0}getActualTextHeight(){return this.getMultiLineActualTextHeight()}getMultiLineActualTexts(){var e,t,A;return null===(e=this.textShape)||void 0===e||e.getGeometryBounds(),(null===(A=null===(t=this.textShape)||void 0===t?void 0:t.parsedStyle.metrics)||void 0===A?void 0:A.lines)||[]}getMultiLineActualTextWidth(){return(0,l.sumBy)(this.getTextLineBoundingRects(),"width")||0}getMultiLineActualTextHeight(){return(0,l.sumBy)(this.getTextLineBoundingRects(),"height")||0}getOriginalText(){return this.originalText}isTextOverflowing(){var e;return null===(e=this.textShape)||void 0===e?void 0:e.isOverflowing()}isMultiLineText(){const{parsedStyle:e}=this.getTextShape();return(null==e?void 0:e.maxLines)>1&&this.getTextLineBoundingRects().length>1}getTextLineBoundingRects(){var e;return(null===(e=this.textShape)||void 0===e?void 0:e.getLineBoundingRects())||[]}getTextLineHeight(){var e,t,A;return(null===(A=null===(t=null===(e=this.textShape)||void 0===e?void 0:e.parsedStyle)||void 0===t?void 0:t.metrics)||void 0===A?void 0:A.lineHeight)||16}getEmptyPlaceholder(){const{options:{placeholder:e}}=this.spreadsheet;return It(this,e)}getFieldValue(){return this.getFormattedFieldValue().formattedValue}shouldInit(){const{width:e,height:t}=this.meta;return e>0&&t>0}getStyle(e){return(0,l.get)(this.theme,e||this.cellType)}getLinkFieldShape(){return this.linkFieldShape}getBackgroundShape(){return this.backgroundShape}getStateShapes(){return this.stateShapes}getResizeAreaStyle(){return this.getStyle("resizeArea")}shouldDrawResizeAreaByType(e,t){const{resize:A}=this.spreadsheet.options.interaction;return(0,l.isBoolean)(A)?A:(0,l.isFunction)(null==A?void 0:A.visible)?null==A?void 0:A.visible(t):null==A?void 0:A[e]}getBBoxByType(e=F.BORDER_BOX){const t={x:this.meta.x,y:this.meta.y,height:this.meta.height,width:this.meta.width},A=this.getStyle()||this.theme.dataCell;return((e,t,A,n)=>{if(n===F.BORDER_BOX)return e;let{x:i,y:r,width:o,height:s}=e;const{padding:a,horizontalBorderWidth:l=0,verticalBorderWidth:u=0}=A;return t.forEach(e=>{const t=[b.BOTTOM,b.TOP].includes(e)?l:u;switch(e){case b.TOP:r+=t,s-=t;break;case b.BOTTOM:s-=t;break;case b.LEFT:i+=t,o-=t;break;default:o-=t}}),n===F.CONTENT_BOX&&(i+=null==a?void 0:a.left,r+=null==a?void 0:a.top,o-=(null==a?void 0:a.left)+(null==a?void 0:a.right),s-=(null==a?void 0:a.top)+(null==a?void 0:a.bottom)),{x:i,y:r,width:o,height:s}})(t,this.getBorderPositions(),null==A?void 0:A.cell,e)}drawBorders(){this.getBorderPositions().forEach(e=>{var t;const{position:A,style:n}=De(e,this.getBBoxByType(),null===(t=this.getStyle())||void 0===t?void 0:t.cell),i=Object.assign(Object.assign({},A),n);this.borders.has(e)?N(this.borders.get(e),i):this.borders.set(e,$e(this,i))})}drawInteractiveBorderShape(){const e=Object.assign(Object.assign({},this.getBBoxByType(F.PADDING_BOX)),{visibility:"hidden",pointerEvents:"none"}),t=this.stateShapes.get("interactiveBorderShape");t?N(t,e):this.stateShapes.set("interactiveBorderShape",qe(this,e))}drawInteractiveBgShape(){const e=Object.assign(Object.assign({},this.getBBoxByType()),{visibility:"hidden",pointerEvents:"none"}),t=this.stateShapes.get("interactiveBgShape");t?N(t,e):this.stateShapes.set("interactiveBgShape",qe(this,e))}drawBackgroundShape(){const{backgroundColor:e,backgroundColorOpacity:t}=this.getBackgroundColor(),A=Object.assign(Object.assign({},this.getBBoxByType()),{fill:e,fillOpacity:t});this.backgroundShape?N(this.backgroundShape,A):this.backgroundShape=qe(this,A)}renderTextShape(e,t){const A=St(e.text,this.getEmptyPlaceholder()),n=(null==t?void 0:t.shallowRender)||this.isShallowRender();return this.textShape&&!n?N(this.textShape,Object.assign(Object.assign({},e),{text:`${A}`})):this.textShape=Je({group:this,textShape:n?void 0:this.textShape,style:Object.assign(Object.assign({},e),{text:`${A}`})}),this.addTextShape(this.textShape),n||(this.originalText=A),this.textShape}updateTextPosition(e){var t,A,n,i;const r=this.getTextPosition();null===(t=this.textShape)||void 0===t||t.attr("x",null!==(A=null==e?void 0:e.x)&&void 0!==A?A:null==r?void 0:r.x),null===(n=this.textShape)||void 0===n||n.attr("y",null!==(i=null==e?void 0:e.y)&&void 0!==i?i:null==r?void 0:r.y)}drawTextOrCustomRenderer(){const e=this.getRenderer();e?we.render(e,this).then(()=>{this.afterDrawText()}):(this.drawTextShape(),this.afterDrawText())}drawTextShape(){const e=Math.max(this.getMaxTextWidth(),0)+1,t=this.getTextStyle(),A=this.getResizedTextMaxLines()||(null==t?void 0:t.maxLines),n=this.getFieldValue();this.renderTextShape(Object.assign(Object.assign({},t),{x:0,y:0,text:n,wordWrapWidth:e,maxLines:A})),this.isShallowRender()||(this.updateTextPosition(),this.drawLinkField(this.meta))}drawLinkFieldShape(e,t){if(!e)return;const{device:A}=this.spreadsheet.options;if(!lt(A)){const e=this.getTextStyle(),A=this.getTextPosition(),n=this.getActualTextWidth();let i=A.x;"center"===e.textAlign?i-=n/2:"right"===e.textAlign&&(i-=n);const{bottom:r}=this.textShape.getBBox(),o={x1:i,y1:r+1,x2:i+n,y2:r+1,stroke:t,lineWidth:1};this.linkFieldShape?N(this.linkFieldShape,o):this.linkFieldShape=$e(this,o)}this.textShape.style.fill=t,this.textShape.style.cursor="pointer",this.textShape.appendInfo={isLinkFieldText:!0,meta:this.meta}}getLinkFieldStyle(){return this.getTextStyle().linkTextFill}drawLinkField(e){const{linkFields:t=[]}=this.spreadsheet.options.interaction,A=this.getLinkFieldStyle(),n=((e,t)=>(0,l.isFunction)(e)?e(t):e.some(e=>e===t.field||e===t.id||e===t.valueField))(t,e);this.drawLinkFieldShape(n,A)}updateByState(e,t){this.spreadsheet.interaction.setInteractedCells(t);const A=(0,l.get)(this.theme,`${this.cellType}.cell.interactionState.${e}`);(0,l.each)(A,(e,t)=>{(0,l.keys)((0,l.pickBy)(c,e=>(0,l.includes)(e,t))).forEach(A=>{const n=this.stateShapes.has(A),i=n?this.stateShapes.get(A):this[A],r=(0,l.isArray)(i)?i:[i];if(n&&r.forEach(e=>{e.setAttribute("visibility","visible")}),"interactiveBorderShape"===A&&"borderWidth"===t&&(0,l.isNumber)(e)){const t=this.getInteractiveBorderShapeStyle(e);(0,l.each)(t,(e,t)=>{et(r,t,e)})}et(r,u[t],e)})})}getInteractiveBorderShapeStyle(e){const{x:t,y:A,height:n,width:i}=this.getBBoxByType(F.PADDING_BOX),r=e/2;return{x:t+r,y:A+r,width:i-e,height:n-e}}hideInteractionShape(){this.stateShapes.forEach(e=>{et(e,u.backgroundOpacity,0),et(e,u.backgroundColor,"transparent"),et(e,u.borderOpacity,0),et(e,u.borderWidth,1),et(e,u.borderColor,"transparent")})}clearUnselectedState(){et(this.backgroundShape,u.backgroundOpacity,1),et(this.textShapes,u.textOpacity,1),et(this.linkFieldShape,u.opacity,1)}getTextShape(){return this.textShape}getTextShapes(){return this.textShapes||[this.textShape]}addTextShape(e){e&&this.textShapes.push(e)}getConditionIconShape(){return this.conditionIconShape}getConditionIconShapes(){return this.conditionIconShapes||[this.conditionIconShape]}addConditionIconShape(e){e&&this.conditionIconShapes.push(e)}resetTextAndConditionIconShapes(){this.textShapes=[],this.conditionIconShapes=[]}get cellConditions(){return this.conditions}drawConditionIconShapes(){var e;const t=this.getIconConditionResult();if(t){const A=this.getIconPosition(),{size:n}=this.getStyle().icon,i=Object.assign(Object.assign({},A),{name:null==t?void 0:t.name,width:n,height:n,fill:null==t?void 0:t.fill,iconStrategy:null===(e=this.spreadsheet.options.csp)||void 0===e?void 0:e.iconStrategy});this.conditionIconShape?this.conditionIconShape.reRender(i):this.conditionIconShape=tt(this,i),this.addConditionIconShape(this.conditionIconShape)}}getTextConditionMappingResult(){var e;const t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.text);return(null==t?void 0:t.mapping)?this.mappingValue(t):null}getContainConditionMappingResultTextStyle(e){const t=this.getDefaultTextFill(e.fill),A=this.getTextConditionMappingResult();return Object.assign(Object.assign(Object.assign({},e),A),{fill:(null==A?void 0:A.fill)||t})}getDefaultTextFill(e){const{backgroundColor:t,intelligentReverseTextColor:A}=this.getBackgroundColor();return!Ke(t)||e!==E&&((e,t)=>Pe.A.isReadable(e,t,{level:"AA",size:"small"}))(t,e)||!A||(e=x),e||""}getBackgroundConditionFill(){var e;const t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.background);if(null==t?void 0:t.mapping){const e=this.mappingValue(t);if(e)return{backgroundColor:e.fill,backgroundColorOpacity:1,intelligentReverseTextColor:e.intelligentReverseTextColor||!1}}return{intelligentReverseTextColor:!1}}getIconConditionResult(){var e;const t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.icon);if(null==t?void 0:t.mapping){const e=this.mappingValue(t);if(e&&e.icon)return{name:e.icon,position:je(t),fill:e.fill,isConditionIcon:!0}}}getActionAndConditionIconWidth(e){const{left:t,right:A}=this.groupedIcons,n=this.getStyle().icon;return e?He(this.groupedIcons[e],n):He(t,n)+He(A,n)}getCrossBackgroundColor(e){const{crossBackgroundColor:t,backgroundColorOpacity:A}=this.getStyle().cell;return t&&e%2==0?{backgroundColorOpacity:A,backgroundColor:t}:{backgroundColorOpacity:A,backgroundColor:this.getStyle().cell.backgroundColor}}getMaxLinesByCustomHeight(e){var t;const{targetCell:A=this,displayHeight:n=this.meta.height,isCustomHeight:i=!1}=e,r=A||this,o=null===(t=this.spreadsheet.options.style)||void 0===t?void 0:t[r.cellType];if(!((null==o?void 0:o.maxLines)>1&&(null==o?void 0:o.wordWrap)&&i))return;const{cell:s}=null==r?void 0:r.getStyle(),a=s.padding.top+s.padding.bottom,l=null==r?void 0:r.getTextLineHeight();return Math.max(1,Math.round((n-a)/l))}getRenderer(){var e,t;return null===(t=null===(e=this.spreadsheet.dataCfg.meta)||void 0===e?void 0:e.find(e=>e.field===this.getMetaField()))||void 0===t?void 0:t.renderer}getConditionIntervalShape(){return this.conditionIntervalShape}}class Mt{constructor(e,t){this.raw=e,this.extraField=t}static getCellData(e,t){return new Mt(e,t)}static getCellDataList(e,t){return t.map(t=>Mt.getCellData(e,t))}static getFieldValue(e,t=""){return e instanceof Mt?t?e.getValueByField(t):e[Ee]:null==e?void 0:e[t]}get[Ee](){return this.raw}get[Be](){return this.extraField}get[ye](){return this.raw[this.extraField]}getValueByField(e){return e===ye||e===Be?this[e]:this.raw[e]}}const _t=(e,t)=>{const A=t.getMeta().id;return e.some(e=>(0,l.isEqual)(e.id,A))},kt=(e,t)=>`${e}-${t}`,Rt=e=>e.type===o.DATA_CELL;class Nt extends Ht{get cellType(){return o.DATA_CELL}isShallowRender(){return super.isShallowRender()||this.meta.shallowRender||!1}isMultiData(){const e=this.getFieldValue();return(0,l.isObject)(e)}getBorderPositions(){return[b.BOTTOM,b.RIGHT]}getValueRange(){return this.spreadsheet.dataSet.getValueRangeByField(this.meta.valueField)}handleByStateName(e,t){_t(e,this)&&this.updateByState(t)}handleSearchResult(e){_t(e,this)&&((0,l.find)(e,e=>null==e?void 0:e.isTarget).id===this.getMeta().id?this.updateByState(r.HIGHLIGHT):this.updateByState(r.SEARCH_RESULT))}handleSelect(e){var t,A;switch(null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.type){case o.COL_CELL:this.changeRowColSelectState("colIndex");break;case o.ROW_CELL:this.changeRowColSelectState("rowIndex");break;case o.DATA_CELL:(e=>{const{currentRow:t,currentCol:A,rowHeader:n,colHeader:i}=e.interaction.getSelectedCellHighlight();return t||A||n||i})(this.spreadsheet)?((e,t,A)=>{var n;const{rowHeader:i,colHeader:s,currentRow:a,currentCol:u}=A.interaction.getSelectedCellHighlight(),c=t.cellType===o.ROW_CELL,h=A.isTableMode()&&(null===(n=A.options.seriesNumber)||void 0===n?void 0:n.enable)&&i&&c;(a||h)&&((e,t)=>{(0,l.forEach)(e,e=>{Rt(e)&&e.rowIndex===t.getMeta().rowIndex&&t.updateByState(r.SELECTED)})})(e,t),u&&((e,t)=>{(0,l.forEach)(e,e=>{Rt(e)&&e.colIndex===t.getMeta().colIndex&&t.updateByState(r.SELECTED)})})(e,t),(i||s)&&((e,t)=>{(0,l.forEach)(e,e=>{Rt(e)&&e.rowIndex===t.getMeta().rowIndex&&e.colIndex===t.getMeta().colIndex&&t.updateByState(r.SELECTED)})})(e,t)})(e,this,this.spreadsheet):_t(e,this)?this.updateByState(r.SELECTED):(null===(A=this.spreadsheet.options.interaction)||void 0===A?void 0:A.selectedCellsSpotlight)&&this.updateByState(r.UNSELECTED)}}isDisableHover(e){return e.type!==o.DATA_CELL}handleHover(e){const t=(0,l.first)(e);if(this.isDisableHover(t))return void this.hideInteractionShape();const{currentRow:A,currentCol:n}=this.spreadsheet.interaction.getHoverHighlight();(A||n)&&(n&&this.meta.colIndex===(null==t?void 0:t.colIndex)||A&&this.meta.rowIndex===(null==t?void 0:t.rowIndex)?this.updateByState(r.HOVER):this.hideInteractionShape());const{id:i,rowIndex:o,colIndex:s}=this.getMeta();(0,l.isEqual)(t.id,i)&&(0,l.isEqual)(t.rowIndex,o)&&(0,l.isEqual)(t.colIndex,s)&&this.updateByState(r.HOVER_FOCUS)}update(){const e=this.spreadsheet.interaction.getCurrentStateName();if(e===r.ALL_SELECTED)return void this.updateByState(r.SELECTED);const t=this.spreadsheet.interaction.getCells();if(!(0,l.isEmpty)(t)&&e)switch(e){case r.SELECTED:case r.DATA_CELL_BRUSH_SELECTED:this.handleSelect(t);break;case r.HOVER_FOCUS:case r.HOVER:this.handleHover(t);break;case r.SEARCH_RESULT:this.handleSearchResult(t);break;default:this.handleByStateName(t,e)}}setMeta(e){super.setMeta(e),this.isShallowRender()||this.initCell()}drawTextShape(){super.drawTextShape(),this.isShallowRender()||this.drawLinkField(this.meta)}initCell(){this.resetTextAndConditionIconShapes(),this.generateIconConfig(),this.shouldHideData=!!this.shouldHideRowSubtotalData(),this.conditionFill=this.getBackgroundConditionFill(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.shouldHideData||this.drawConditionIntervalShape(),this.shouldHideData?this.afterDrawText():this.drawTextOrCustomRenderer()}afterDrawText(){this.shouldHideData||this.drawConditionIconShapes(),this.drawBorders(),this.drawInteractiveBorderShape(),this.update()}generateIconConfig(){var e;const t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.icon),A=t&&t.mapping&&{name:"",position:je(t)};this.groupedIcons=Me([],A)}getTextStyle(){const e=this.getCellTextWordWrapStyle(),{isTotals:t}=this.meta,{dataCell:A}=this.theme,n=t?null==A?void 0:A.bolderText:null==A?void 0:A.text;return this.getContainConditionMappingResultTextStyle(Object.assign(Object.assign({},e),n))}drawConditionIntervalShape(){this.conditionIntervalShape=(e=>{var t,A,n,i,r,o,s,a;if((0,l.isEmpty)(e))return;const{x:u,y:c,height:h,width:d}=e.getBBoxByType(F.PADDING_BOX),f=e.findFieldCondition(null===(t=e.cellConditions)||void 0===t?void 0:t.interval);if(null==f?void 0:f.mapping){const t=e.mappingValue(f);if(!t)return;const g=e.getValueRange(),p=t.isCompare?t:g,v=We(null!==(A=p.minValue)&&void 0!==A?A:g.minValue),m=We(null!==(n=p.maxValue)&&void 0!==n?n:g.maxValue),C=(0,l.isNil)(null==t?void 0:t.fieldValue)?We(e.getMeta().fieldValue):We(null==t?void 0:t.fieldValue);if(C<v||C>m)return;const w=e.getStyle(),y=null===(r=null===(i=null==w?void 0:w.miniChart)||void 0===i?void 0:i.interval)||void 0===r?void 0:r.height,B=null===(s=null===(o=null==w?void 0:w.miniChart)||void 0===o?void 0:o.interval)||void 0===s?void 0:s.fill,E=((e=0,t=0)=>{if(e=We(e),t=We(t),e===t)return()=>({zeroScale:0,scale:0});const A=e>=0,n=t>=0&&e<=0,i=n?0:A?e:t,r=t-e;return t=>{const o=A?0:1;return{zeroScale:n?(0,l.clamp)(Math.abs(0-e)/r,0,1):o,scale:(0,l.clamp)((t-i)/r,-1,1)}}})(v,m),{zeroScale:x,scale:b}=E(C),F={x:u+d*x,y:c+h/2-y/2,width:d*b,height:y,fill:null!==(a=t.fill)&&void 0!==a?a:B},S=e.getConditionIntervalShape();return S?(N(S,F),S):qe(e,F)}})(this)}shouldHideRowSubtotalData(){var e,t;if(!this.spreadsheet.isHierarchyTreeType())return!1;const{rowId:A,rowIndex:n}=this.meta,i=this.spreadsheet.store.get("drillDownIdPathMap");if(null==i?void 0:i.has(A))return!1;const{row:r={}}=null!==(e=this.spreadsheet.options.totals)&&void 0!==e?e:{},o=null===(t=this.spreadsheet.facet)||void 0===t?void 0:t.getRowLeafNodeByIndex(n);return!r.showSubTotals&&!(null==o?void 0:o.isGrandTotals)&&(null==o?void 0:o.isTotals)}getFormattedFieldValue(){var e;if(this.shouldHideData)return{value:null,formattedValue:"-"};const{rowId:t,valueField:A,fieldValue:n,data:i,id:r}=this.meta,o=null===(e=this.spreadsheet.dataSet.displayFormattedValueMap)||void 0===e?void 0:e.get(r),s=this.spreadsheet.dataSet.getFieldMeta(t),a=this.spreadsheet.dataSet.getFieldFormatter(s?t:A);return{value:n,formattedValue:null!=o?o:a(n,i,this.meta)}}getMaxTextWidth(){const{width:e}=this.getBBoxByType(F.CONTENT_BOX);return e-this.getActionAndConditionIconWidth()}getContentPosition({contentWidth:e=this.getActualTextWidth()}={}){const t=this.getBBoxByType(F.CONTENT_BOX),A=this.getTextStyle(),n=this.getIconStyle(),{textX:i,leftIconX:r,rightIconX:o}=Ne({bbox:t,iconStyle:n,textWidth:e,textAlign:A.textAlign,groupedIcons:this.groupedIcons,isCustomRenderer:!!this.getRenderer()}),s=ke(t,A.textBaseline),a=Re(n.size,s,A.fontSize,A.textBaseline);return this.iconPosition={x:(0,l.isEmpty)(this.groupedIcons.left)?o:r,y:a},{x:i,y:s}}getTextPosition(){return this.getContentPosition()}getIconPosition(){return this.iconPosition}getBackgroundColor(){const e=this.getCrossBackgroundColor(this.meta.rowIndex),t=e.backgroundColor,A=e.backgroundColorOpacity;return this.shouldHideData?{backgroundColor:t,backgroundColorOpacity:A,intelligentReverseTextColor:!1}:(0,l.merge)({backgroundColor:t,backgroundColorOpacity:A},this.conditionFill)}changeRowColSelectState(e){var t,A,n;const{interaction:i}=this.spreadsheet,o=(0,l.get)(this.meta,e),{nodes:s=[],cells:a=[]}=i.getState();let u=!1;u=this.spreadsheet.isTableMode()&&s.length?((null===(A=null===(t=s[0])||void 0===t?void 0:t.hierarchy)||void 0===A?void 0:A.getLeaves())||[]).some((e,t)=>!!s.some(t=>t===e)&&t===o):[...s,...a].some(t=>(0,l.get)(t,e)===o),u?this.updateByState(r.SELECTED):(null===(n=this.spreadsheet.options.interaction)||void 0===n?void 0:n.selectedCellsSpotlight)?this.updateByState(r.UNSELECTED):this.hideInteractionShape()}drawBorders(){this.meta.isFrozenCorner&&Ht.prototype.drawBorders.call(this)}findFieldCondition(e=[]){return Xe(e,this.meta.valueField)}mappingValue(e){var t;const A=this.meta.fieldValue,n=this.spreadsheet.isTableMode()?this.spreadsheet.dataSet.getCellData({query:{rowIndex:this.meta.rowIndex}}):Mt.getFieldValue(this.meta.data);return null===(t=e.mapping)||void 0===t?void 0:t.call(e,A,n,this)}updateByState(e){if(super.updateByState(e,this),e===r.UNSELECTED){const t=(0,l.get)(this.theme,`${this.cellType}.cell.interactionState.${e}`);t&&this.toggleConditionIntervalShapeOpacity(t.opacity)}}clearUnselectedState(){super.clearUnselectedState(),this.toggleConditionIntervalShapeOpacity(1)}toggleConditionIntervalShapeOpacity(e){et(this.conditionIntervalShape,u.backgroundOpacity,e),et(this.conditionIconShapes,u.opacity,e)}getResizedTextMaxLines(){var e,t,A,n;const{rowCell:i}=this.spreadsheet.options.style;return null!==(n=null!==(t=null===(e=null==i?void 0:i.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(A=null==i?void 0:i.maxLinesByField)||void 0===A?void 0:A[this.meta.rowId])&&void 0!==n?n:this.getMaxLinesByCustomHeight({isCustomHeight:!0})}getMetaField(){return this.meta.valueField}}var Dt,Pt;!function(e){e.Row="frozenRow",e.Col="frozenCol",e.TrailingRow="frozenTrailingRow",e.TrailingCol="frozenTrailingCol"}(Dt||(Dt={})),function(e){e.Row="frozenRowGroup",e.Col="frozenColGroup",e.TrailingCol="frozenTrailingColGroup",e.TrailingRow="frozenTrailingRowGroup",e.TopLeft="frozenTopLeftGroup",e.TopRight="frozenTopRightGroup",e.BottomLeft="frozenBottomLeftGroup",e.BottomRight="frozenBottomRightGroup",e.Scroll="scrollGroup"}(Pt||(Pt={}));const Gt={[Dt.Row]:Pt.Row,[Dt.Col]:Pt.Col,[Dt.TrailingRow]:Pt.TrailingRow,[Dt.TrailingCol]:Pt.TrailingCol};var Kt,Vt,zt;!function(e){e.Horizontal="col",e.Vertical="row"}(Kt||(Kt={})),function(e){e.Field="field",e.Cell="cell",e.Tree="tree",e.Series="series"}(Vt||(Vt={})),function(e){e.ALL="all",e.CURRENT="current",e.SELECTED="selected"}(zt||(zt={}));class Wt extends a.rw{constructor(e,t){super(e),this.appendInfo=t}}const jt=(e,t)=>t>0&&e<t,Xt=(e,t,A)=>t>0&&e>=A-t,Yt=(e,t,A)=>A>0&&e<t+A,qt=(e,t,A)=>A>0&&e>=t+1-A,Zt=(e,t,A)=>{if(e){const[n,i]=e.getPosition();e.translate(t-n,A-i)}},Jt=(e=[])=>{const t=(e=>{const t=[],A=e=>{e.forEach(e=>{"string"!=typeof e&&e.children?A(e.children):t.push(e)})};return A(e),t})(e);return t.map(e=>"string"==typeof e?e:e.field)},$t=e=>{const{type:t,theme:A,width:n,height:i}=e,r=(0,Q.Tt)(e,["type","theme","width","height"]);return{style:{fill:A.background,fillOpacity:A.backgroundOpacity,cursor:`${t}-resize`,width:t===Kt.Horizontal?A.size:void 0,height:t===Kt.Vertical?A.size:void 0},appendInfo:Object.assign(Object.assign({},r),{isResizeArea:!0,type:t,width:n,height:i,size:A.size})}},eA=(e,t)=>{var A;if(null===(A=e.facet)||void 0===A?void 0:A.foregroundGroup)return e.facet.foregroundGroup.getElementById(t)||e.facet.foregroundGroup.appendChild(new a.YJ({id:t,style:{zIndex:5}}))},tA=(e,t,A)=>{const{scrollX:n=0,scrollY:i=0}=null!=A?A:{};return!(e.x-n>t.x+t.width||e.x+e.width-n<t.x||e.y-i>t.y+t.height||e.y+e.height-i<t.y)};class AA extends Nt{getLinkFieldStyle(){return this.theme.rowCell.text.linkTextFill}getTextStyle(){if(this.meta.valueField===Se){const e=this.getCellTextWordWrapStyle(o.SERIES_NUMBER_CELL),t=this.theme.rowCell.seriesText;return Object.assign(Object.assign({},e),t)}return super.getTextStyle()}shouldDrawResizeArea(){const e=`${this.meta.rowIndex}`,t=eA(this.spreadsheet,gt);return!(null==t?void 0:t.getElementById(e))}drawResizeArea(){if(!this.shouldDrawResizeArea())return;const e=eA(this.spreadsheet,gt);if(!e)return;const{rowIndex:t}=this.getMeta(),A=this.spreadsheet.facet.getCellRange(),{rowCount:n,trailingRowCount:i}=this.spreadsheet.facet.getFrozenOptions(),r=Yt(t,A.start,n),o=qt(t,A.end,i),s=r||o,{y:a,height:l}=this.getBBoxByType(),{x:u,y:c,viewportWidth:h,viewportHeight:d}=this.spreadsheet.facet.panelBBox,{scrollY:f}=this.spreadsheet.facet.getScrollOffset(),g=this.spreadsheet.facet.getPaginationScrollY(),p=this.spreadsheet.facet.frozenGroupAreas,v=p[Dt.Row],m=p[Dt.TrailingRow],C=this.getResizeAreaStyle(),w=u+h;if(!tA({x:0,y:a+l-C.size,width:w,height:C.size},{x:0,y:s?0:v.height,width:w,height:s?Number.POSITIVE_INFINITY:d-v.height-m.height},{scrollX:0,scrollY:s?0:g+f}))return;let y=c;y+=r?a-v.y:o?d-m.height+a-m.y:a-g-f;const B=$t({theme:C,type:Kt.Vertical,effect:Vt.Cell,offsetX:0,offsetY:y,width:w,height:l,meta:this.meta,cell:this});e.appendChild(new Wt({style:Object.assign(Object.assign({},B.style),{x:0,y:y+l-C.size,width:w})},B.appendInfo))}isDisableHover(e){return(null==e?void 0:e.type)===o.COL_CELL}getResizedTextMaxLines(){var e,t,A,n,i;const{facet:r,options:o}=this.spreadsheet,{rowCell:s}=o.style,{id:a,rowId:l,rowIndex:u}=this.meta;return null!==(n=null!==(t=null===(e=null==s?void 0:s.maxLinesByField)||void 0===e?void 0:e[a])&&void 0!==t?t:null===(A=null==s?void 0:s.maxLinesByField)||void 0===A?void 0:A[l])&&void 0!==n?n:this.getMaxLinesByCustomHeight({isCustomHeight:null===(i=null==r?void 0:r.customRowHeightStatusMap)||void 0===i?void 0:i[u]})}}class nA extends AA{get cellType(){return o.DATA_CELL}}var iA;!function(e){e.ROW_CELL_HOVER="row-cell:hover",e.ROW_CELL_CLICK="row-cell:click",e.ROW_CELL_DOUBLE_CLICK="row-cell:double-click",e.ROW_CELL_CONTEXT_MENU="row-cell:context-menu",e.ROW_CELL_MOUSE_DOWN="row-cell:mouse-down",e.ROW_CELL_MOUSE_UP="row-cell:mouse-up",e.ROW_CELL_MOUSE_MOVE="row-cell:mouse-move",e.ROW_CELL_SCROLL="row-cell:scroll",e.ROW_CELL_BRUSH_SELECTION="row-cell:brush-selection",e.ROW_CELL_COLLAPSED="row-cell:collapsed",e.ROW_CELL_ALL_COLLAPSED="row-cell:all-collapsed",e.ROW_CELL_RENDER="row-cell:render",e.ROW_CELL_SELECTED="row-cell:selected",e.ROW_CELL_COLLAPSED__PRIVATE="row-cell:collapsed__private",e.ROW_CELL_ALL_COLLAPSED__PRIVATE="row-cell:all-collapsed__private",e.DATA_CELL_HOVER_TRIGGERED_PRIVATE="data-cell:hover-trigger__private",e.DATA_CELL_CLICK_TRIGGERED_PRIVATE="data-cell:click-trigger__private",e.COL_CELL_HOVER="col-cell:hover",e.COL_CELL_CLICK="col-cell:click",e.COL_CELL_DOUBLE_CLICK="col-cell:double-click",e.COL_CELL_CONTEXT_MENU="col-cell:context-menu",e.COL_CELL_MOUSE_DOWN="col-cell:mouse-down",e.COL_CELL_MOUSE_UP="col-cell:mouse-up",e.COL_CELL_MOUSE_MOVE="col-cell:mouse-move",e.COL_CELL_BRUSH_SELECTION="col-cell:brush-selection",e.COL_CELL_EXPANDED="col-cell:expanded",e.COL_CELL_EXPAND_ICON_HOVER="col-cell:expand-icon-hover",e.COL_CELL_HIDDEN="col-cell:hidden",e.COL_CELL_RENDER="col-cell:render",e.COL_CELL_SELECTED="col-cell:selected",e.DATA_CELL_HOVER="data-cell:hover",e.DATA_CELL_CLICK="data-cell:click",e.DATA_CELL_DOUBLE_CLICK="data-cell:double-click",e.DATA_CELL_CONTEXT_MENU="data-cell:context-menu",e.DATA_CELL_MOUSE_UP="data-cell:mouse-up",e.DATA_CELL_MOUSE_DOWN="data-cell:mouse-down",e.DATA_CELL_MOUSE_MOVE="data-cell:mouse-move",e.DATA_CELL_BRUSH_SELECTION="data-cell:brush-selection",e.DATA_CELL_SELECT_MOVE="data-cell:select-move",e.DATA_CELL_RENDER="data-cell:render",e.DATA_CELL_SELECTED="data-cell:selected",e.CORNER_CELL_HOVER="corner-cell:hover",e.CORNER_CELL_CLICK="corner-cell:click",e.CORNER_CELL_DOUBLE_CLICK="corner-cell:double-click",e.CORNER_CELL_CONTEXT_MENU="corner-cell:context-menu",e.CORNER_CELL_MOUSE_DOWN="corner-cell:mouse-down",e.CORNER_CELL_MOUSE_UP="corner-cell:mouse-up",e.CORNER_CELL_MOUSE_MOVE="corner-cell:mouse-move",e.CORNER_CELL_RENDER="corner-cell:render",e.CORNER_CELL_SELECTED="corner-cell:selected",e.MERGED_CELLS_HOVER="merged-cells:hover",e.MERGED_CELLS_CLICK="merged-cells:click",e.MERGED_CELLS_DOUBLE_CLICK="merged-cells:double-click",e.MERGED_CELLS_CONTEXT_MENU="merged-cells:context-menu",e.MERGED_CELLS_MOUSE_DOWN="merged-cells:mouse-down",e.MERGED_CELLS_MOUSE_UP="merged-cells:mouse-up",e.MERGED_CELLS_MOUSE_MOVE="merged-cells:mouse-move",e.MERGED_CELLS_RENDER="merged-cells:render",e.SERIES_NUMBER_CELL_RENDER="series-number-cell:render",e.RANGE_SORT="sort:range-sort",e.RANGE_SORTED="sort:range-sorted",e.RANGE_FILTER="filter:range-filter",e.RANGE_FILTERED="filter:range-filtered",e.LAYOUT_AFTER_HEADER_LAYOUT="layout:after-header-layout",e.LAYOUT_CELL_RENDER="layout:cell-render",e.LAYOUT_PAGINATION="layout:pagination",e.LAYOUT_AFTER_REAL_DATA_CELL_RENDER="layout:after-real-data-cell-render",e.LAYOUT_AFTER_RENDER="layout:after-render",e.LAYOUT_BEFORE_RENDER="layout:before-render",e.LAYOUT_DESTROY="layout:destroy",e.LAYOUT_RESIZE="layout:resize",e.LAYOUT_RESIZE_SERIES_WIDTH="layout:resize-series-width",e.LAYOUT_RESIZE_ROW_WIDTH="layout:resize-row-width",e.LAYOUT_RESIZE_ROW_HEIGHT="layout:resize-row-height",e.LAYOUT_RESIZE_COL_WIDTH="layout:resize-column-width",e.LAYOUT_RESIZE_COL_HEIGHT="layout:resize-column-height",e.LAYOUT_RESIZE_TREE_WIDTH="layout:resize-tree-width",e.LAYOUT_RESIZE_MOUSE_DOWN="layout:resize:mouse-down",e.LAYOUT_RESIZE_MOUSE_MOVE="layout:resize:mouse-move",e.LAYOUT_RESIZE_MOUSE_UP="layout:resize-mouse-up",e.GLOBAL_KEYBOARD_DOWN="global:keyboard-down",e.GLOBAL_KEYBOARD_UP="global:keyboard-up",e.GLOBAL_COPIED="global:copied",e.GLOBAL_MOUSE_UP="global:mouse-up",e.GLOBAL_MOUSE_MOVE="global:mouse-move",e.GLOBAL_ACTION_ICON_CLICK="global:action-icon-click",e.GLOBAL_ACTION_ICON_HOVER="global:action-icon-hover",e.GLOBAL_ACTION_ICON_HOVER_OFF="global:action-icon-hover-off",e.GLOBAL_CONTEXT_MENU="global:context-menu",e.GLOBAL_CLICK="global:click",e.GLOBAL_PREVIEW_CLICK="global:preview-click",e.GLOBAL_DOUBLE_CLICK="global:double-click",e.GLOBAL_SELECTED="global:selected",e.GLOBAL_HOVER="global:hover",e.GLOBAL_RESET="global:reset",e.GLOBAL_LINK_FIELD_JUMP="global:link-field-jump",e.GLOBAL_SCROLL="global:scroll"}(iA||(iA={}));var rA,oA,sA=9e15,aA=1e9,lA="0123456789abcdef",uA="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",cA="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",hA={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-sA,maxE:sA,crypto:!1},dA=!0,fA="[DecimalError] ",gA=fA+"Invalid argument: ",pA=fA+"Precision limit exceeded",vA=fA+"crypto unavailable",mA="[object Decimal]",CA=Math.floor,wA=Math.pow,yA=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,BA=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,EA=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,xA=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,bA=1e7,FA=uA.length-1,SA=cA.length-1,TA={toStringTag:mA};function LA(e){var t,A,n,i=e.length-1,r="",o=e[0];if(i>0){for(r+=o,t=1;t<i;t++)(A=7-(n=e[t]+"").length)&&(r+=DA(A)),r+=n;(A=7-(n=(o=e[t])+"").length)&&(r+=DA(A))}else if(0===o)return"0";for(;o%10==0;)o/=10;return r+o}function QA(e,t,A){if(e!==~~e||e<t||e>A)throw Error(gA+e)}function IA(e,t,A,n){var i,r,o,s;for(r=e[0];r>=10;r/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),r=wA(10,7-t),s=e[i]%r|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=A<4&&99999==s||A>3&&49999==s||5e4==s||0==s):o=(A<4&&s+1==r||A>3&&s+1==r/2)&&(e[i+1]/r/100|0)==wA(10,t-2)-1||(s==r/2||0==s)&&!(e[i+1]/r/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(n||A<4)&&9999==s||!n&&A>3&&4999==s):o=((n||A<4)&&s+1==r||!n&&A>3&&s+1==r/2)&&(e[i+1]/r/1e3|0)==wA(10,t-3)-1,o}function UA(e,t,A){for(var n,i,r=[0],o=0,s=e.length;o<s;){for(i=r.length;i--;)r[i]*=t;for(r[0]+=lA.indexOf(e.charAt(o++)),n=0;n<r.length;n++)r[n]>A-1&&(void 0===r[n+1]&&(r[n+1]=0),r[n+1]+=r[n]/A|0,r[n]%=A)}return r.reverse()}TA.absoluteValue=TA.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),HA(e)},TA.ceil=function(){return HA(new this.constructor(this),this.e+1,2)},TA.clampedTo=TA.clamp=function(e,t){var A=this,n=A.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(gA+t);return A.cmp(e)<0?e:A.cmp(t)>0?t:new n(A)},TA.comparedTo=TA.cmp=function(e){var t,A,n,i,r=this,o=r.d,s=(e=new r.constructor(e)).d,a=r.s,l=e.s;if(!o||!s)return a&&l?a!==l?a:o===s?0:!o^a<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?a:s[0]?-l:0;if(a!==l)return a;if(r.e!==e.e)return r.e>e.e^a<0?1:-1;for(t=0,A=(n=o.length)<(i=s.length)?n:i;t<A;++t)if(o[t]!==s[t])return o[t]>s[t]^a<0?1:-1;return n===i?0:n>i^a<0?1:-1},TA.cosine=TA.cos=function(){var e,t,A=this,n=A.constructor;return A.d?A.d[0]?(t=n.rounding,n.precision=(e=n.precision)+Math.max(A.e,A.sd())+7,n.rounding=1,A=function(e,t){var A,n,i;if(t.isZero())return t;(n=t.d.length)<32?i=(1/qA(4,A=Math.ceil(n/3))).toString():(A=16,i="2.3283064365386962890625e-10"),e.precision+=A,t=YA(e,1,t.times(i),new e(1));for(var r=A;r--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=A,t}(n,ZA(n,A)),n.precision=e,n.rounding=t,HA(2==oA||3==oA?A.neg():A,e,t,!0)):new n(1):new n(NaN)},TA.cubeRoot=TA.cbrt=function(){var e,t,A,n,i,r,o,s,a,l,u=this,c=u.constructor;if(!u.isFinite()||u.isZero())return new c(u);for(dA=!1,(r=u.s*wA(u.s*u,1/3))&&Math.abs(r)!=1/0?n=new c(r.toString()):(A=LA(u.d),(r=((e=u.e)-A.length+1)%3)&&(A+=1==r||-2==r?"0":"00"),r=wA(A,1/3),e=CA((e+1)/3)-(e%3==(e<0?-1:2)),(n=new c(A=r==1/0?"5e"+e:(A=r.toExponential()).slice(0,A.indexOf("e")+1)+e)).s=u.s),o=(e=c.precision)+3;;)if(l=(a=(s=n).times(s).times(s)).plus(u),n=OA(l.plus(u).times(s),l.plus(a),o+2,1),LA(s.d).slice(0,o)===(A=LA(n.d)).slice(0,o)){if("9999"!=(A=A.slice(o-3,o+1))&&(i||"4999"!=A)){+A&&(+A.slice(1)||"5"!=A.charAt(0))||(HA(n,e+1,1),t=!n.times(n).times(n).eq(u));break}if(!i&&(HA(s,e+1,0),s.times(s).times(s).eq(u))){n=s;break}o+=4,i=1}return dA=!0,HA(n,e,c.rounding,t)},TA.decimalPlaces=TA.dp=function(){var e,t=this.d,A=NaN;if(t){if(A=7*((e=t.length-1)-CA(this.e/7)),e=t[e])for(;e%10==0;e/=10)A--;A<0&&(A=0)}return A},TA.dividedBy=TA.div=function(e){return OA(this,new this.constructor(e))},TA.dividedToIntegerBy=TA.divToInt=function(e){var t=this.constructor;return HA(OA(this,new t(e),0,1,1),t.precision,t.rounding)},TA.equals=TA.eq=function(e){return 0===this.cmp(e)},TA.floor=function(){return HA(new this.constructor(this),this.e+1,3)},TA.greaterThan=TA.gt=function(e){return this.cmp(e)>0},TA.greaterThanOrEqualTo=TA.gte=function(e){var t=this.cmp(e);return 1==t||0===t},TA.hyperbolicCosine=TA.cosh=function(){var e,t,A,n,i,r=this,o=r.constructor,s=new o(1);if(!r.isFinite())return new o(r.s?1/0:NaN);if(r.isZero())return s;n=o.rounding,o.precision=(A=o.precision)+Math.max(r.e,r.sd())+4,o.rounding=1,(i=r.d.length)<32?t=(1/qA(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),r=YA(o,1,r.times(t),new o(1),!0);for(var a,l=e,u=new o(8);l--;)a=r.times(r),r=s.minus(a.times(u.minus(a.times(u))));return HA(r,o.precision=A,o.rounding=n,!0)},TA.hyperbolicSine=TA.sinh=function(){var e,t,A,n,i=this,r=i.constructor;if(!i.isFinite()||i.isZero())return new r(i);if(A=r.rounding,r.precision=(t=r.precision)+Math.max(i.e,i.sd())+4,r.rounding=1,(n=i.d.length)<3)i=YA(r,2,i,i,!0);else{e=1.4*Math.sqrt(n),i=YA(r,2,i=i.times(1/qA(5,e=e>16?16:0|e)),i,!0);for(var o,s=new r(5),a=new r(16),l=new r(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(a.times(o).plus(l))))}return r.precision=t,r.rounding=A,HA(i,t,A,!0)},TA.hyperbolicTangent=TA.tanh=function(){var e,t,A=this,n=A.constructor;return A.isFinite()?A.isZero()?new n(A):(t=n.rounding,n.precision=(e=n.precision)+7,n.rounding=1,OA(A.sinh(),A.cosh(),n.precision=e,n.rounding=t)):new n(A.s)},TA.inverseCosine=TA.acos=function(){var e=this,t=e.constructor,A=e.abs().cmp(1),n=t.precision,i=t.rounding;return-1!==A?0===A?e.isNeg()?RA(t,n,i):new t(0):new t(NaN):e.isZero()?RA(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))},TA.inverseHyperbolicCosine=TA.acosh=function(){var e,t,A=this,n=A.constructor;return A.lte(1)?new n(A.eq(1)?0:NaN):A.isFinite()?(t=n.rounding,n.precision=(e=n.precision)+Math.max(Math.abs(A.e),A.sd())+4,n.rounding=1,dA=!1,A=A.times(A).minus(1).sqrt().plus(A),dA=!0,n.precision=e,n.rounding=t,A.ln()):new n(A)},TA.inverseHyperbolicSine=TA.asinh=function(){var e,t,A=this,n=A.constructor;return!A.isFinite()||A.isZero()?new n(A):(t=n.rounding,n.precision=(e=n.precision)+2*Math.max(Math.abs(A.e),A.sd())+6,n.rounding=1,dA=!1,A=A.times(A).plus(1).sqrt().plus(A),dA=!0,n.precision=e,n.rounding=t,A.ln())},TA.inverseHyperbolicTangent=TA.atanh=function(){var e,t,A,n,i=this,r=i.constructor;return i.isFinite()?i.e>=0?new r(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=r.precision,t=r.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?HA(new r(i),e,t,!0):(r.precision=A=n-i.e,i=OA(i.plus(1),new r(1).minus(i),A+e,1),r.precision=e+4,r.rounding=1,i=i.ln(),r.precision=e,r.rounding=t,i.times(.5))):new r(NaN)},TA.inverseSine=TA.asin=function(){var e,t,A,n,i=this,r=i.constructor;return i.isZero()?new r(i):(t=i.abs().cmp(1),A=r.precision,n=r.rounding,-1!==t?0===t?((e=RA(r,A+4,n).times(.5)).s=i.s,e):new r(NaN):(r.precision=A+6,r.rounding=1,i=i.div(new r(1).minus(i.times(i)).sqrt().plus(1)).atan(),r.precision=A,r.rounding=n,i.times(2)))},TA.inverseTangent=TA.atan=function(){var e,t,A,n,i,r,o,s,a,l=this,u=l.constructor,c=u.precision,h=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);if(l.abs().eq(1)&&c+4<=SA)return(o=RA(u,c+4,h).times(.25)).s=l.s,o}else{if(!l.s)return new u(NaN);if(c+4<=SA)return(o=RA(u,c+4,h).times(.5)).s=l.s,o}for(u.precision=s=c+10,u.rounding=1,e=A=Math.min(28,s/7+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(dA=!1,t=Math.ceil(s/7),n=1,a=l.times(l),o=new u(l),i=l;-1!==e;)if(i=i.times(a),r=o.minus(i.div(n+=2)),i=i.times(a),void 0!==(o=r.plus(i.div(n+=2))).d[t])for(e=t;o.d[e]===r.d[e]&&e--;);return A&&(o=o.times(2<<A-1)),dA=!0,HA(o,u.precision=c,u.rounding=h,!0)},TA.isFinite=function(){return!!this.d},TA.isInteger=TA.isInt=function(){return!!this.d&&CA(this.e/7)>this.d.length-2},TA.isNaN=function(){return!this.s},TA.isNegative=TA.isNeg=function(){return this.s<0},TA.isPositive=TA.isPos=function(){return this.s>0},TA.isZero=function(){return!!this.d&&0===this.d[0]},TA.lessThan=TA.lt=function(e){return this.cmp(e)<0},TA.lessThanOrEqualTo=TA.lte=function(e){return this.cmp(e)<1},TA.logarithm=TA.log=function(e){var t,A,n,i,r,o,s,a,l=this,u=l.constructor,c=u.precision,h=u.rounding;if(null==e)e=new u(10),t=!0;else{if(A=(e=new u(e)).d,e.s<0||!A||!A[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(A=l.d,l.s<0||!A||!A[0]||l.eq(1))return new u(A&&!A[0]?-1/0:1!=l.s?NaN:A?0:1/0);if(t)if(A.length>1)r=!0;else{for(i=A[0];i%10==0;)i/=10;r=1!==i}if(dA=!1,o=zA(l,s=c+5),n=t?kA(u,s+10):zA(e,s),IA((a=OA(o,n,s,1)).d,i=c,h))do{if(o=zA(l,s+=10),n=t?kA(u,s+10):zA(e,s),a=OA(o,n,s,1),!r){+LA(a.d).slice(i+1,i+15)+1==1e14&&(a=HA(a,c+1,0));break}}while(IA(a.d,i+=10,h));return dA=!0,HA(a,c,h)},TA.minus=TA.sub=function(e){var t,A,n,i,r,o,s,a,l,u,c,h,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new f(e.d||d.s!==e.s?d:NaN):e=new f(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(h=e.d,s=f.precision,a=f.rounding,!(l=d.d)[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!l[0])return new f(3===a?-0:0);e=new f(d)}return dA?HA(e,s,a):e}if(A=CA(e.e/7),u=CA(d.e/7),l=l.slice(),r=u-A){for((c=r<0)?(t=l,r=-r,o=h.length):(t=h,A=u,o=l.length),r>(n=Math.max(Math.ceil(s/7),o)+2)&&(r=n,t.length=1),t.reverse(),n=r;n--;)t.push(0);t.reverse()}else{for((c=(n=l.length)<(o=h.length))&&(o=n),n=0;n<o;n++)if(l[n]!=h[n]){c=l[n]<h[n];break}r=0}for(c&&(t=l,l=h,h=t,e.s=-e.s),n=h.length-(o=l.length);n>0;--n)l[o++]=0;for(n=h.length;n>r;){if(l[--n]<h[n]){for(i=n;i&&0===l[--i];)l[i]=bA-1;--l[i],l[n]+=bA}l[n]-=h[n]}for(;0===l[--o];)l.pop();for(;0===l[0];l.shift())--A;return l[0]?(e.d=l,e.e=_A(l,A),dA?HA(e,s,a):e):new f(3===a?-0:0)},TA.modulo=TA.mod=function(e){var t,A=this,n=A.constructor;return e=new n(e),!A.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||A.d&&!A.d[0]?HA(new n(A),n.precision,n.rounding):(dA=!1,9==n.modulo?(t=OA(A,e.abs(),0,3,1)).s*=e.s:t=OA(A,e,0,n.modulo,1),t=t.times(e),dA=!0,A.minus(t))},TA.naturalExponential=TA.exp=function(){return VA(this)},TA.naturalLogarithm=TA.ln=function(){return zA(this)},TA.negated=TA.neg=function(){var e=new this.constructor(this);return e.s=-e.s,HA(e)},TA.plus=TA.add=function(e){var t,A,n,i,r,o,s,a,l,u,c=this,h=c.constructor;if(e=new h(e),!c.d||!e.d)return c.s&&e.s?c.d||(e=new h(e.d||c.s===e.s?c:NaN)):e=new h(NaN),e;if(c.s!=e.s)return e.s=-e.s,c.minus(e);if(u=e.d,s=h.precision,a=h.rounding,!(l=c.d)[0]||!u[0])return u[0]||(e=new h(c)),dA?HA(e,s,a):e;if(r=CA(c.e/7),n=CA(e.e/7),l=l.slice(),i=r-n){for(i<0?(A=l,i=-i,o=u.length):(A=u,n=r,o=l.length),i>(o=(r=Math.ceil(s/7))>o?r+1:o+1)&&(i=o,A.length=1),A.reverse();i--;)A.push(0);A.reverse()}for((o=l.length)-(i=u.length)<0&&(i=o,A=u,u=l,l=A),t=0;i;)t=(l[--i]=l[i]+u[i]+t)/bA|0,l[i]%=bA;for(t&&(l.unshift(t),++n),o=l.length;0==l[--o];)l.pop();return e.d=l,e.e=_A(l,n),dA?HA(e,s,a):e},TA.precision=TA.sd=function(e){var t,A=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(gA+e);return A.d?(t=NA(A.d),e&&A.e+1>t&&(t=A.e+1)):t=NaN,t},TA.round=function(){var e=this,t=e.constructor;return HA(new t(e),e.e+1,t.rounding)},TA.sine=TA.sin=function(){var e,t,A=this,n=A.constructor;return A.isFinite()?A.isZero()?new n(A):(t=n.rounding,n.precision=(e=n.precision)+Math.max(A.e,A.sd())+7,n.rounding=1,A=function(e,t){var A,n=t.d.length;if(n<3)return t.isZero()?t:YA(e,2,t,t);A=1.4*Math.sqrt(n),t=YA(e,2,t=t.times(1/qA(5,A=A>16?16:0|A)),t);for(var i,r=new e(5),o=new e(16),s=new e(20);A--;)i=t.times(t),t=t.times(r.plus(i.times(o.times(i).minus(s))));return t}(n,ZA(n,A)),n.precision=e,n.rounding=t,HA(oA>2?A.neg():A,e,t,!0)):new n(NaN)},TA.squareRoot=TA.sqrt=function(){var e,t,A,n,i,r,o=this,s=o.d,a=o.e,l=o.s,u=o.constructor;if(1!==l||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(dA=!1,0==(l=Math.sqrt(+o))||l==1/0?(((t=LA(s)).length+a)%2==0&&(t+="0"),l=Math.sqrt(t),a=CA((a+1)/2)-(a<0||a%2),n=new u(t=l==1/0?"5e"+a:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+a)):n=new u(l.toString()),A=(a=u.precision)+3;;)if(n=(r=n).plus(OA(o,r,A+2,1)).times(.5),LA(r.d).slice(0,A)===(t=LA(n.d)).slice(0,A)){if("9999"!=(t=t.slice(A-3,A+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(HA(n,a+1,1),e=!n.times(n).eq(o));break}if(!i&&(HA(r,a+1,0),r.times(r).eq(o))){n=r;break}A+=4,i=1}return dA=!0,HA(n,a,u.rounding,e)},TA.tangent=TA.tan=function(){var e,t,A=this,n=A.constructor;return A.isFinite()?A.isZero()?new n(A):(t=n.rounding,n.precision=(e=n.precision)+10,n.rounding=1,(A=A.sin()).s=1,A=OA(A,new n(1).minus(A.times(A)).sqrt(),e+10,0),n.precision=e,n.rounding=t,HA(2==oA||4==oA?A.neg():A,e,t,!0)):new n(NaN)},TA.times=TA.mul=function(e){var t,A,n,i,r,o,s,a,l,u=this,c=u.constructor,h=u.d,d=(e=new c(e)).d;if(e.s*=u.s,!(h&&h[0]&&d&&d[0]))return new c(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:h&&d?0*e.s:e.s/0);for(A=CA(u.e/7)+CA(e.e/7),(a=h.length)<(l=d.length)&&(r=h,h=d,d=r,o=a,a=l,l=o),r=[],n=o=a+l;n--;)r.push(0);for(n=l;--n>=0;){for(t=0,i=a+n;i>n;)s=r[i]+d[n]*h[i-n-1]+t,r[i--]=s%bA|0,t=s/bA|0;r[i]=(r[i]+t)%bA|0}for(;!r[--o];)r.pop();return t?++A:r.shift(),e.d=r,e.e=_A(r,A),dA?HA(e,c.precision,c.rounding):e},TA.toBinary=function(e,t){return JA(this,2,e,t)},TA.toDecimalPlaces=TA.toDP=function(e,t){var A=this,n=A.constructor;return A=new n(A),void 0===e?A:(QA(e,0,aA),void 0===t?t=n.rounding:QA(t,0,8),HA(A,e+A.e+1,t))},TA.toExponential=function(e,t){var A,n=this,i=n.constructor;return void 0===e?A=MA(n,!0):(QA(e,0,aA),void 0===t?t=i.rounding:QA(t,0,8),A=MA(n=HA(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+A:A},TA.toFixed=function(e,t){var A,n,i=this,r=i.constructor;return void 0===e?A=MA(i):(QA(e,0,aA),void 0===t?t=r.rounding:QA(t,0,8),A=MA(n=HA(new r(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+A:A},TA.toFraction=function(e){var t,A,n,i,r,o,s,a,l,u,c,h,d=this,f=d.d,g=d.constructor;if(!f)return new g(d);if(l=A=new g(1),n=a=new g(0),r=(t=new g(n)).e=NA(f)-d.e-1,t.d[0]=wA(10,(o=r%7)<0?7+o:o),null==e)e=r>0?t:l;else{if(!(s=new g(e)).isInt()||s.lt(l))throw Error(gA+s);e=s.gt(t)?r>0?t:l:s}for(dA=!1,s=new g(LA(f)),u=g.precision,g.precision=r=7*f.length*2;c=OA(s,t,0,1,1),1!=(i=A.plus(c.times(n))).cmp(e);)A=n,n=i,l=a.plus(c.times(i=l)),a=i,t=s.minus(c.times(i=t)),s=i;return i=OA(e.minus(A),n,0,1,1),a=a.plus(i.times(l)),A=A.plus(i.times(n)),a.s=l.s=d.s,h=OA(l,n,r,1).minus(d).abs().cmp(OA(a,A,r,1).minus(d).abs())<1?[l,n]:[a,A],g.precision=u,dA=!0,h},TA.toHexadecimal=TA.toHex=function(e,t){return JA(this,16,e,t)},TA.toNearest=function(e,t){var A=this,n=A.constructor;if(A=new n(A),null==e){if(!A.d)return A;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:QA(t,0,8),!A.d)return e.s?A:e;if(!e.d)return e.s&&(e.s=A.s),e}return e.d[0]?(dA=!1,A=OA(A,e,0,t,1).times(e),dA=!0,HA(A)):(e.s=A.s,A=e),A},TA.toNumber=function(){return+this},TA.toOctal=function(e,t){return JA(this,8,e,t)},TA.toPower=TA.pow=function(e){var t,A,n,i,r,o,s=this,a=s.constructor,l=+(e=new a(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new a(wA(+s,l));if((s=new a(s)).eq(1))return s;if(n=a.precision,r=a.rounding,e.eq(1))return HA(s,n,r);if((t=CA(e.e/7))>=e.d.length-1&&(A=l<0?-l:l)<=9007199254740991)return i=PA(a,s,A,n),e.s<0?new a(1).div(i):HA(i,n,r);if((o=s.s)<0){if(t<e.d.length-1)return new a(NaN);if(1&e.d[t]||(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(t=0!=(A=wA(+s,l))&&isFinite(A)?new a(A+"").e:CA(l*(Math.log("0."+LA(s.d))/Math.LN10+s.e+1)))>a.maxE+1||t<a.minE-1?new a(t>0?o/0:0):(dA=!1,a.rounding=s.s=1,A=Math.min(12,(t+"").length),(i=VA(e.times(zA(s,n+A)),n)).d&&IA((i=HA(i,n+5,1)).d,n,r)&&+LA((i=HA(VA(e.times(zA(s,(t=n+10)+A)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=HA(i,n+1,0)),i.s=o,dA=!0,a.rounding=r,HA(i,n,r))},TA.toPrecision=function(e,t){var A,n=this,i=n.constructor;return void 0===e?A=MA(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(QA(e,1,aA),void 0===t?t=i.rounding:QA(t,0,8),A=MA(n=HA(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+A:A},TA.toSignificantDigits=TA.toSD=function(e,t){var A=this.constructor;return void 0===e?(e=A.precision,t=A.rounding):(QA(e,1,aA),void 0===t?t=A.rounding:QA(t,0,8)),HA(new A(this),e,t)},TA.toString=function(){var e=this,t=e.constructor,A=MA(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+A:A},TA.truncated=TA.trunc=function(){return HA(new this.constructor(this),this.e+1,1)},TA.valueOf=TA.toJSON=function(){var e=this,t=e.constructor,A=MA(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+A:A};var OA=function(){function e(e,t,A){var n,i=0,r=e.length;for(e=e.slice();r--;)e[r]=(n=e[r]*t+i)%A|0,i=n/A|0;return i&&e.unshift(i),e}function t(e,t,A,n){var i,r;if(A!=n)r=A>n?1:-1;else for(i=r=0;i<A;i++)if(e[i]!=t[i]){r=e[i]>t[i]?1:-1;break}return r}function A(e,t,A,n){for(var i=0;A--;)e[A]-=i,e[A]=(i=e[A]<t[A]?1:0)*n+e[A]-t[A];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,r,o,s,a){var l,u,c,h,d,f,g,p,v,m,C,w,y,B,E,x,b,F,S,T,L=n.constructor,Q=n.s==i.s?1:-1,I=n.d,U=i.d;if(!(I&&I[0]&&U&&U[0]))return new L(n.s&&i.s&&(I?!U||I[0]!=U[0]:U)?I&&0==I[0]||!U?0*Q:Q/0:NaN);for(a?(d=1,u=n.e-i.e):(a=bA,u=CA(n.e/(d=7))-CA(i.e/d)),S=U.length,b=I.length,m=(v=new L(Q)).d=[],c=0;U[c]==(I[c]||0);c++);if(U[c]>(I[c]||0)&&u--,null==r?(B=r=L.precision,o=L.rounding):B=s?r+(n.e-i.e)+1:r,B<0)m.push(1),f=!0;else{if(B=B/d+2|0,c=0,1==S){for(h=0,U=U[0],B++;(c<b||h)&&B--;c++)m[c]=(E=h*a+(I[c]||0))/U|0,h=E%U|0;f=h||c<b}else{for((h=a/(U[0]+1)|0)>1&&(U=e(U,h,a),I=e(I,h,a),S=U.length,b=I.length),x=S,w=(C=I.slice(0,S)).length;w<S;)C[w++]=0;(T=U.slice()).unshift(0),F=U[0],U[1]>=a/2&&++F;do{h=0,(l=t(U,C,S,w))<0?(y=C[0],S!=w&&(y=y*a+(C[1]||0)),(h=y/F|0)>1?(h>=a&&(h=a-1),1==(l=t(g=e(U,h,a),C,p=g.length,w=C.length))&&(h--,A(g,S<p?T:U,p,a))):(0==h&&(l=h=1),g=U.slice()),(p=g.length)<w&&g.unshift(0),A(C,g,w,a),-1==l&&(l=t(U,C,S,w=C.length))<1&&(h++,A(C,S<w?T:U,w,a)),w=C.length):0===l&&(h++,C=[0]),m[c++]=h,l&&C[0]?C[w++]=I[x]||0:(C=[I[x]],w=1)}while((x++<b||void 0!==C[0])&&B--);f=void 0!==C[0]}m[0]||m.shift()}if(1==d)v.e=u,rA=f;else{for(c=1,h=m[0];h>=10;h/=10)c++;v.e=c+u*d-1,HA(v,s?r+v.e+1:r,o,f)}return v}}();function HA(e,t,A,n){var i,r,o,s,a,l,u,c,h,d=e.constructor;e:if(null!=t){if(!(c=e.d))return e;for(i=1,s=c[0];s>=10;s/=10)i++;if((r=t-i)<0)r+=7,a=(u=c[h=0])/wA(10,i-(o=t)-1)%10|0;else if((h=Math.ceil((r+1)/7))>=(s=c.length)){if(!n)break e;for(;s++<=h;)c.push(0);u=a=0,i=1,o=(r%=7)-7+1}else{for(u=s=c[h],i=1;s>=10;s/=10)i++;a=(o=(r%=7)-7+i)<0?0:u/wA(10,i-o-1)%10|0}if(n=n||t<0||void 0!==c[h+1]||(o<0?u:u%wA(10,i-o-1)),l=A<4?(a||n)&&(0==A||A==(e.s<0?3:2)):a>5||5==a&&(4==A||n||6==A&&(r>0?o>0?u/wA(10,i-o):0:c[h-1])%10&1||A==(e.s<0?8:7)),t<1||!c[0])return c.length=0,l?(c[0]=wA(10,(7-(t-=e.e+1)%7)%7),e.e=-t||0):c[0]=e.e=0,e;if(0==r?(c.length=h,s=1,h--):(c.length=h+1,s=wA(10,7-r),c[h]=o>0?(u/wA(10,i-o)%wA(10,o)|0)*s:0),l)for(;;){if(0==h){for(r=1,o=c[0];o>=10;o/=10)r++;for(o=c[0]+=s,s=1;o>=10;o/=10)s++;r!=s&&(e.e++,c[0]==bA&&(c[0]=1));break}if(c[h]+=s,c[h]!=bA)break;c[h--]=0,s=1}for(r=c.length;0===c[--r];)c.pop()}return dA&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function MA(e,t,A){if(!e.isFinite())return WA(e);var n,i=e.e,r=LA(e.d),o=r.length;return t?(A&&(n=A-o)>0?r=r.charAt(0)+"."+r.slice(1)+DA(n):o>1&&(r=r.charAt(0)+"."+r.slice(1)),r=r+(e.e<0?"e":"e+")+e.e):i<0?(r="0."+DA(-i-1)+r,A&&(n=A-o)>0&&(r+=DA(n))):i>=o?(r+=DA(i+1-o),A&&(n=A-i-1)>0&&(r=r+"."+DA(n))):((n=i+1)<o&&(r=r.slice(0,n)+"."+r.slice(n)),A&&(n=A-o)>0&&(i+1===o&&(r+="."),r+=DA(n))),r}function _A(e,t){var A=e[0];for(t*=7;A>=10;A/=10)t++;return t}function kA(e,t,A){if(t>FA)throw dA=!0,A&&(e.precision=A),Error(pA);return HA(new e(uA),t,1,!0)}function RA(e,t,A){if(t>SA)throw Error(pA);return HA(new e(cA),t,A,!0)}function NA(e){var t=e.length-1,A=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)A--;for(t=e[0];t>=10;t/=10)A++}return A}function DA(e){for(var t="";e--;)t+="0";return t}function PA(e,t,A,n){var i,r=new e(1),o=Math.ceil(n/7+4);for(dA=!1;;){if(A%2&&$A((r=r.times(t)).d,o)&&(i=!0),0===(A=CA(A/2))){A=r.d.length-1,i&&0===r.d[A]&&++r.d[A];break}$A((t=t.times(t)).d,o)}return dA=!0,r}function GA(e){return 1&e.d[e.d.length-1]}function KA(e,t,A){for(var n,i,r=new e(t[0]),o=0;++o<t.length;){if(!(i=new e(t[o])).s){r=i;break}((n=r.cmp(i))===A||0===n&&r.s===A)&&(r=i)}return r}function VA(e,t){var A,n,i,r,o,s,a,l=0,u=0,c=0,h=e.constructor,d=h.rounding,f=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(dA=!1,a=f):a=t,s=new h(.03125);e.e>-2;)e=e.times(s),c+=5;for(a+=n=Math.log(wA(2,c))/Math.LN10*2+5|0,A=r=o=new h(1),h.precision=a;;){if(r=HA(r.times(e),a,1),A=A.times(++u),LA((s=o.plus(OA(r,A,a,1))).d).slice(0,a)===LA(o.d).slice(0,a)){for(i=c;i--;)o=HA(o.times(o),a,1);if(null!=t)return h.precision=f,o;if(!(l<3&&IA(o.d,a-n,d,l)))return HA(o,h.precision=f,d,dA=!0);h.precision=a+=10,A=r=s=new h(1),u=0,l++}o=s}}function zA(e,t){var A,n,i,r,o,s,a,l,u,c,h,d=1,f=e,g=f.d,p=f.constructor,v=p.rounding,m=p.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new p(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(dA=!1,u=m):u=t,p.precision=u+=10,n=(A=LA(g)).charAt(0),!(Math.abs(r=f.e)<15e14))return l=kA(p,u+2,m).times(r+""),f=zA(new p(n+"."+A.slice(1)),u-10).plus(l),p.precision=m,null==t?HA(f,m,v,dA=!0):f;for(;n<7&&1!=n||1==n&&A.charAt(1)>3;)n=(A=LA((f=f.times(e)).d)).charAt(0),d++;for(r=f.e,n>1?(f=new p("0."+A),r++):f=new p(n+"."+A.slice(1)),c=f,a=o=f=OA(f.minus(1),f.plus(1),u,1),h=HA(f.times(f),u,1),i=3;;){if(o=HA(o.times(h),u,1),LA((l=a.plus(OA(o,new p(i),u,1))).d).slice(0,u)===LA(a.d).slice(0,u)){if(a=a.times(2),0!==r&&(a=a.plus(kA(p,u+2,m).times(r+""))),a=OA(a,new p(d),u,1),null!=t)return p.precision=m,a;if(!IA(a.d,u-10,v,s))return HA(a,p.precision=m,v,dA=!0);p.precision=u+=10,l=o=f=OA(c.minus(1),c.plus(1),u,1),h=HA(f.times(f),u,1),i=s=1}a=l,i+=2}}function WA(e){return String(e.s*e.s/0)}function jA(e,t){var A,n,i;for((A=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(A<0&&(A=n),A+=+t.slice(n+1),t=t.substring(0,n)):A<0&&(A=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=A=A-n-1,e.d=[],n=(A+1)%7,A<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),dA&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function XA(e,t){var A,n,i,r,o,s,a,l,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),xA.test(t))return jA(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(BA.test(t))A=16,t=t.toLowerCase();else if(yA.test(t))A=2;else{if(!EA.test(t))throw Error(gA+t);A=8}for((r=t.search(/p/i))>0?(a=+t.slice(r+1),t=t.substring(2,r)):t=t.slice(2),r=t.indexOf("."),n=e.constructor,(o=r>=0)&&(r=(s=(t=t.replace(".","")).length)-r,i=PA(n,new n(A),r,2*r)),r=u=(l=UA(t,A,bA)).length-1;0===l[r];--r)l.pop();return r<0?new n(0*e.s):(e.e=_A(l,u),e.d=l,dA=!1,o&&(e=OA(e,i,4*s)),a&&(e=e.times(Math.abs(a)<54?wA(2,a):Pn.pow(2,a))),dA=!0,e)}function YA(e,t,A,n,i){var r,o,s,a,l=e.precision,u=Math.ceil(l/7);for(dA=!1,a=A.times(A),s=new e(n);;){if(o=OA(s.times(a),new e(t++*t++),l,1),s=i?n.plus(o):n.minus(o),n=OA(o.times(a),new e(t++*t++),l,1),void 0!==(o=s.plus(n)).d[u]){for(r=u;o.d[r]===s.d[r]&&r--;);if(-1==r)break}r=s,s=n,n=o,o=r}return dA=!0,o.d.length=u+1,o}function qA(e,t){for(var A=e;--t;)A*=e;return A}function ZA(e,t){var A,n=t.s<0,i=RA(e,e.precision,1),r=i.times(.5);if((t=t.abs()).lte(r))return oA=n?4:1,t;if((A=t.divToInt(i)).isZero())oA=n?3:2;else{if((t=t.minus(A.times(i))).lte(r))return oA=GA(A)?n?2:3:n?4:1,t;oA=GA(A)?n?1:4:n?3:2}return t.minus(i).abs()}function JA(e,t,A,n){var i,r,o,s,a,l,u,c,h,d=e.constructor,f=void 0!==A;if(f?(QA(A,1,aA),void 0===n?n=d.rounding:QA(n,0,8)):(A=d.precision,n=d.rounding),e.isFinite()){for(f?(i=2,16==t?A=4*A-3:8==t&&(A=3*A-2)):i=t,(o=(u=MA(e)).indexOf("."))>=0&&(u=u.replace(".",""),(h=new d(1)).e=u.length-o,h.d=UA(MA(h),10,i),h.e=h.d.length),r=a=(c=UA(u,10,i)).length;0==c[--a];)c.pop();if(c[0]){if(o<0?r--:((e=new d(e)).d=c,e.e=r,c=(e=OA(e,h,A,n,0,i)).d,r=e.e,l=rA),o=c[A],s=i/2,l=l||void 0!==c[A+1],l=n<4?(void 0!==o||l)&&(0===n||n===(e.s<0?3:2)):o>s||o===s&&(4===n||l||6===n&&1&c[A-1]||n===(e.s<0?8:7)),c.length=A,l)for(;++c[--A]>i-1;)c[A]=0,A||(++r,c.unshift(1));for(a=c.length;!c[a-1];--a);for(o=0,u="";o<a;o++)u+=lA.charAt(c[o]);if(f){if(a>1)if(16==t||8==t){for(o=16==t?4:3,--a;a%o;a++)u+="0";for(a=(c=UA(u,i,t)).length;!c[a-1];--a);for(o=1,u="1.";o<a;o++)u+=lA.charAt(c[o])}else u=u.charAt(0)+"."+u.slice(1);u=u+(r<0?"p":"p+")+r}else if(r<0){for(;++r;)u="0"+u;u="0."+u}else if(++r>a)for(r-=a;r--;)u+="0";else r<a&&(u=u.slice(0,r)+"."+u.slice(r))}else u=f?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=WA(e);return e.s<0?"-"+u:u}function $A(e,t){if(e.length>t)return e.length=t,!0}function en(e){return new this(e).abs()}function tn(e){return new this(e).acos()}function An(e){return new this(e).acosh()}function nn(e,t){return new this(e).plus(t)}function rn(e){return new this(e).asin()}function on(e){return new this(e).asinh()}function sn(e){return new this(e).atan()}function an(e){return new this(e).atanh()}function ln(e,t){e=new this(e),t=new this(t);var A,n=this.precision,i=this.rounding,r=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(A=t.s<0?RA(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(A=RA(this,r,1).times(.5)).s=e.s:t.s<0?(this.precision=r,this.rounding=1,A=this.atan(OA(e,t,r,1)),t=RA(this,r,1),this.precision=n,this.rounding=i,A=e.s<0?A.minus(t):A.plus(t)):A=this.atan(OA(e,t,r,1)):(A=RA(this,r,1).times(t.s>0?.25:.75)).s=e.s:A=new this(NaN),A}function un(e){return new this(e).cbrt()}function cn(e){return HA(e=new this(e),e.e+1,2)}function hn(e,t,A){return new this(e).clamp(t,A)}function dn(e){if(!e||"object"!=typeof e)throw Error(fA+"Object expected");var t,A,n,i=!0===e.defaults,r=["precision",1,aA,"rounding",0,8,"toExpNeg",-sA,0,"toExpPos",0,sA,"maxE",0,sA,"minE",-sA,0,"modulo",0,9];for(t=0;t<r.length;t+=3)if(A=r[t],i&&(this[A]=hA[A]),void 0!==(n=e[A])){if(!(CA(n)===n&&n>=r[t+1]&&n<=r[t+2]))throw Error(gA+A+": "+n);this[A]=n}if(A="crypto",i&&(this[A]=hA[A]),void 0!==(n=e[A])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(gA+A+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(vA);this[A]=!0}else this[A]=!1}return this}function fn(e){return new this(e).cos()}function gn(e){return new this(e).cosh()}function pn(e,t){return new this(e).div(t)}function vn(e){return new this(e).exp()}function mn(e){return HA(e=new this(e),e.e+1,3)}function Cn(){var e,t,A=new this(0);for(dA=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)A.d&&(A=A.plus(t.times(t)));else{if(t.s)return dA=!0,new this(1/0);A=t}return dA=!0,A.sqrt()}function wn(e){return e instanceof Pn||e&&e.toStringTag===mA||!1}function yn(e){return new this(e).ln()}function Bn(e,t){return new this(e).log(t)}function En(e){return new this(e).log(2)}function xn(e){return new this(e).log(10)}function bn(){return KA(this,arguments,-1)}function Fn(){return KA(this,arguments,1)}function Sn(e,t){return new this(e).mod(t)}function Tn(e,t){return new this(e).mul(t)}function Ln(e,t){return new this(e).pow(t)}function Qn(e){var t,A,n,i,r=0,o=new this(1),s=[];if(void 0===e?e=this.precision:QA(e,1,aA),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));r<n;)(i=t[r])>=429e7?t[r]=crypto.getRandomValues(new Uint32Array(1))[0]:s[r++]=i%1e7;else{if(!crypto.randomBytes)throw Error(vA);for(t=crypto.randomBytes(n*=4);r<n;)(i=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+((127&t[r+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,r):(s.push(i%1e7),r+=4);r=n/4}else for(;r<n;)s[r++]=1e7*Math.random()|0;for(e%=7,(n=s[--r])&&e&&(i=wA(10,7-e),s[r]=(n/i|0)*i);0===s[r];r--)s.pop();if(r<0)A=0,s=[0];else{for(A=-1;0===s[0];A-=7)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<7&&(A-=7-n)}return o.e=A,o.d=s,o}function In(e){return HA(e=new this(e),e.e+1,this.rounding)}function Un(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function On(e){return new this(e).sin()}function Hn(e){return new this(e).sinh()}function Mn(e){return new this(e).sqrt()}function _n(e,t){return new this(e).sub(t)}function kn(){var e=0,t=arguments,A=new this(t[e]);for(dA=!1;A.s&&++e<t.length;)A=A.plus(t[e]);return dA=!0,HA(A,this.precision,this.rounding)}function Rn(e){return new this(e).tan()}function Nn(e){return new this(e).tanh()}function Dn(e){return HA(e=new this(e),e.e+1,1)}TA[Symbol.for("nodejs.util.inspect.custom")]=TA.toString,TA[Symbol.toStringTag]="Decimal";var Pn=TA.constructor=function e(t){var A,n,i;function r(e){var t,A,n,i=this;if(!(i instanceof r))return new r(e);if(i.constructor=r,wn(e))return i.s=e.s,void(dA?!e.d||e.e>r.maxE?(i.e=NaN,i.d=null):e.e<r.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"==(n=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,A=e;A>=10;A/=10)t++;return void(dA?t>r.maxE?(i.e=NaN,i.d=null):t<r.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):jA(i,e.toString())}if("string"===n)return 45===(A=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===A&&(e=e.slice(1)),i.s=1),xA.test(e)?jA(i,e):XA(i,e);if("bigint"===n)return e<0?(e=-e,i.s=-1):i.s=1,jA(i,e.toString());throw Error(gA+e)}if(r.prototype=TA,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=dn,r.clone=e,r.isDecimal=wn,r.abs=en,r.acos=tn,r.acosh=An,r.add=nn,r.asin=rn,r.asinh=on,r.atan=sn,r.atanh=an,r.atan2=ln,r.cbrt=un,r.ceil=cn,r.clamp=hn,r.cos=fn,r.cosh=gn,r.div=pn,r.exp=vn,r.floor=mn,r.hypot=Cn,r.ln=yn,r.log=Bn,r.log10=xn,r.log2=En,r.max=bn,r.min=Fn,r.mod=Sn,r.mul=Tn,r.pow=Ln,r.random=Qn,r.round=In,r.sign=Un,r.sin=On,r.sinh=Hn,r.sqrt=Mn,r.sub=_n,r.sum=kn,r.tan=Rn,r.tanh=Nn,r.trunc=Dn,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],A=0;A<i.length;)t.hasOwnProperty(n=i[A++])||(t[n]=this[n]);return r.config(t),r}(hA);uA=new Pn(uA),cA=new Pn(cA);const Gn=Pn,Kn=e=>"number"==typeof e?Number.isNaN(e):!e||"string"!=typeof e||Number.isNaN(Number(e)),Vn=e=>!Kn(e),zn=(e,t,A=!1)=>(null==e?void 0:e.length)?e.reduce((e,n)=>{const i=Mt.getFieldValue(n,t),r=Kn(i);return A&&r||e.push(new Gn(r?0:i)),e},[]):[],Wn=(e,t)=>{const A=zn(e,t);return A.length?Gn.sum(...A).toNumber():0},jn=(e,t,A)=>{const n=zn(t,A,!0);if(null==n?void 0:n.length)return Gn[e](...n).toNumber()},Xn={[S.SUM]:Wn,[S.MIN]:(e,t)=>jn("min",e,t),[S.MAX]:(e,t)=>jn("max",e,t),[S.AVG]:(e,t)=>{const A=zn(e,t);return(null==A?void 0:A.length)?Gn.sum(...A).dividedBy(A.length).toNumber():0},[S.COUNT]:e=>(null==e?void 0:e.length)||0};var Yn;!function(e){e.All="all",e.DetailOnly="detailOnly"}(Yn||(Yn={}));const qn=(e=[])=>e.filter(e=>e!==be&&e!==Le);function Zn(e=[]){return e.filter(e=>e!==Be)}function Jn(e){return e===Fe}function $n(e={},t=[],A=be){return t.reduce((t,n)=>(t.push(n in e?xt(e[n]):A),t),[])}function ei(e,t){const A=t.filter(t=>t in e);return(0,l.isEmpty)(A)&&A.push(Le),A}function ti(e={},t=[],A){const n=[];function i(e,t,A){return t.reduce((t,n)=>(t.push(n in e?xt(e[n]):n===Be&&A?A:be),t),[])}return A?A.forEach(A=>{n.push(i(e,t,A))}):n.push(i(e,t)),n}function Ai(e,t){return e.concat(t).filter(e=>e!==Be).join("[&]")}function ni(e){const{rowDimensionValues:t,colDimensionValues:A,isFirstCreate:n,onFirstCreate:i,rowFields:r,colFields:o,rowPivotMeta:s,colPivotMeta:a,prefix:l=""}=e,u=(e,t,A,r)=>{let o=A;const s=[];for(let A=0;A<t.length;A++){const a=t[A];if(n&&o&&!(null==o?void 0:o.has(a))){const n=t.slice(0,A+1).map(e=>xt(e)),s=n.join("[&]");let l;l=a===be?0:o.has(be)?o.size:o.size+1,o.set(a,{id:s,dimensions:n,value:a,level:l,children:new Map}),null==i||i({dimension:null==e?void 0:e[A],dimensionPath:s,careRepeated:r})}const l=null==o?void 0:o.get(a);if(s.push(Jn(a)?a:null==l?void 0:l.level),l){const t=null==e?void 0:e[A+1];n&&l.childField!==t&&(l.childField=t),o=null==l?void 0:l.children}}return s};return[l,...u(r,t,s,!1),...u(o,A,a,!0)]}function ii(e=[]){return e.filter(l.isString)}function ri(e,t){if(!e||!t)return;const A=t.split("[&]"),n=(0,l.last)(A);let i=e;(0,l.forEach)(A,(e,t)=>{const A=i.get(e);return A?(e===n?(A.children=new Map,A.childField=void 0):i=A.children,!0):0===t&&"root"===e})}function oi(e,t,A){return{field:Be,name:t||A,formatter:t=>(t=>{const A=(0,l.find)(e,({field:e})=>e===t);return(0,l.get)(A,"name",t)})(t)}}function si(e,t){return{isRowGrandTotal:e.isGrandTotals,isRowSubTotal:e.isSubTotals,isColGrandTotal:t.isGrandTotals,isColSubTotal:t.isSubTotals}}function ai(e){const{pivotMeta:t,dimensionValues:A,fieldIdx:n,queryType:i,fields:r,sortedDimensionValues:o}=e;let s=[{children:t}];function a(e,t){var A;const n=(0,l.flatMap)(e,e=>{const t=[];for(const A of e.children.values())A.value===Le||i!==Yn.All&&A.value===be||t.push(A);return t});if(e.length>1){const e=null!==(A=o[t])&&void 0!==A?A:[],i=new Map(e.map((e,t)=>[e,t]));return n.sort((e,t)=>{var A,n;return(null!==(A=i.get(e.id))&&void 0!==A?A:0)-(null!==(n=i.get(t.id))&&void 0!==n?n:0)}),n}return n}for(let e=0;e<=n;e++){const t=A[e],n=r[e];s=Jn(t)?a(s,n):s.map(e=>e.children.get(t)).filter(Boolean)}return s}function li(e){const{dimensionValues:t,pivotMeta:A,fields:n,sortedDimensionValues:i,queryType:r=Yn.All}=e;return function(e){let t=null;for(let A=0;A<e.length;A++)if(Jn(e[A]))t=A;else if(!(0,l.isNull)(t)&&t<A)return!0;return!1}(t)?ai({pivotMeta:A,dimensionValues:t,fieldIdx:t.length-1,queryType:r,fields:n,sortedDimensionValues:i}).map(e=>e.dimensions):[t]}function ui(e,t){return e?(0,l.isArray)(e)?(0,l.flatMap)(e,e=>(0,l.isArray)(e)?(0,l.compact)(e.slice(t===Yn.DetailOnly?1:0)):(0,l.compact)([e])):(0,l.compact)([e]):[]}const ci=e=>"ASC"===(0,l.toUpper)(e),hi=e=>"DESC"===(0,l.toUpper)(e),di=(e,t,A,n="last")=>{const i=ci(t)?1:-1,r=ci(t),o="first"===n||"auto"===n&&r?-1:1;return null==e?void 0:e.sort((e,t)=>{let n=e,r=t;if(A){n=e.getValueByField(A),r=t.getValueByField(A);const s=(0,l.isNil)(n)||"-"===n||""===n,a=(0,l.isNil)(r)||"-"===r||""===r;if(s&&a)return 0;if(s)return o;if(a)return-o;if(Vn(n)&&Vn(r))return(Number(n)-Number(r))*i}return(0,l.isNil)(n)||(0,l.isNil)(r)?n?-o:o:n.toString().localeCompare(r.toString(),"zh")*i})},fi=(e,t,A)=>{return A?(n=t,i=(0,l.uniq)(e),null===(r=null==n?void 0:n.filter(e=>!(null==i?void 0:i.includes(e))))||void 0===r?void 0:r.concat(i)):[...new Set([...e,...t])];var n,i,r},gi=e=>{const{sortByValues:t=[],originValues:A=[]}=e,n=A.filter(e=>t.find(t=>(0,l.last)((0,l.split)(e,"[&]"))===t)).map(e=>{const t=e.split("[&]");return t.length>1?[t.slice(0,t.length-1).join("[&]"),t[t.length-1]]:t}),i=Array.from(new Set(n.map(e=>e[0])));n.sort((e,A)=>{const n=e.slice(0,e.length-1),r=A.slice(0,A.length-1);return n.join()!==r.join()?i.indexOf(n[0])-i.indexOf(r[0]):t.indexOf(e[e.length-1])-t.indexOf(A[A.length-1])});const r=n.map(e=>e.join("[&]"));return o=r,A.sort((e,t)=>{const A=o.indexOf(e),n=o.indexOf(t);return-1===A&&-1===n?0:-1===A?1:-1===n?-1:A-n});var o},pi=e=>{const{sortParam:t,originValues:A=[],measureValues:n,dataSet:i}=e,{sortFunc:r,sortMethod:o,sortBy:s}=t;let a=A;const u={originValues:A,measureValues:n,sortParam:t,dataSet:i};return r?a=(e=>{const{originValues:t=[],measureValues:A,sortParam:n,dataSet:i}=e,{sortFunc:r,sortFieldId:o,sortMethod:s}=n,a=null==r?void 0:r(Object.assign({data:A},n));return(null==a?void 0:a.length)?(i.fields.rows.indexOf(o)>0||i.fields.columns.indexOf(o)>0)&&!(0,l.includes)(a[0],"[&]")?gi({sortByValues:a,originValues:t}):fi(a,t,ci(s)):t})(u):s?a=gi({sortByValues:s,originValues:A}):(ci(o)||hi(o))&&(a=(e=>{const{sortParam:t,measureValues:A,originValues:n,dataSet:i}=e,{sortByMeasure:r,query:o,sortFieldId:s,sortMethod:a,nullsPlacement:l="last"}=t,{rows:u=[],columns:c=[]}=i.fields,h=null==u?void 0:u.includes(s);let d;if(r){const e=di(A,a,r===be?null==o?void 0:o[Be]:r,l);d=function(e,t=[],A){var n;const i=t.slice(0,t.indexOf(e)+1);return null===(n=A.map(e=>i.map(t=>e.getValueByField(t)).join("[&]")))||void 0===n?void 0:n.filter(Boolean)}(s,h?u:Jt(c),e)}else d=di(A,a,void 0,l);return fi(d,n,ci(a))})(u)),a},vi=(e,t)=>{if(null==e?void 0:e.sortMethod){if(ci(null==e?void 0:e.sortMethod))return"groupAsc";if(hi(null==e?void 0:e.sortMethod))return"groupDesc"}if(t)return"SortDown"},mi=e=>{const{pivotMeta:t,dimensions:A,sortedDimensionValues:n,sortFieldId:i}=e,r={children:t};let o=[r];for(const e of A){if(e===i){o.forEach(e=>{const t=[...e.children.values()],A=(0,l.sortBy)(t,e=>(0,l.indexOf)(n,e.id)).map(e=>[e.value,e]);e.children=new Map(A)});break}o=(0,l.flatMap)(o,e=>[...e.children.values()])}return r.children};class Ci{constructor(e){this.displayFormattedValueMap=new Map,this.getField=e=>((0,l.isString)(e)?e:null==e?void 0:e.field)||e,this.getFieldMeta=(0,l.memoize)((e,t)=>{const A=this.getField(e);return(0,l.find)(this.meta||t,({field:e})=>e instanceof RegExp?e.test(A):(0,l.isArray)(e)?e.includes(A):e===A)}),this.getCustomFieldDescription=e=>{var t,A;if(!e)return;const n=null===(t=e.getMeta)||void 0===t?void 0:t.call(e);if(!(null==n?void 0:n.isTotals)){if(e.cellType===o.DATA_CELL){const e=(0,l.find)(null==n?void 0:n.spreadsheet.dataCfg.meta,{field:(null==n?void 0:n.field)||(null==n?void 0:n.value)||(null==n?void 0:n.valueField)});return this.getFieldDescription(null==e?void 0:e.field)}return(null===(A=null==n?void 0:n.extra)||void 0===A?void 0:A.description)||this.getFieldDescription(null==n?void 0:n.field)}},this.spreadsheet=e}getFieldName(e,t){var A,n,i,r;if(e===Se)return null===(A=this.spreadsheet)||void 0===A?void 0:A.getSeriesNumberText();const o=this.getField(e);let s;(null===(n=this.spreadsheet)||void 0===n?void 0:n.isCustomHeaderFields())&&(s=null===(r=null===(i=this.spreadsheet)||void 0===i?void 0:i.facet)||void 0===r?void 0:r.getHeaderNodes().find(e=>{var t;return e.field===o&&(null===(t=null==e?void 0:e.extra)||void 0===t?void 0:t.isCustomNode)}));const a=(null==s?void 0:s.value)||((0,l.isString)(e)?e:null==e?void 0:e.title)||e;return(0,l.get)(this.getFieldMeta(o,this.meta),"name",Tt(null!=t?t:a))}getCustomRowFieldName(e){var t;if(!e)return;const A=null===(t=e.getMeta)||void 0===t?void 0:t.call(e);if(e.cellType===o.DATA_CELL){const e=this.spreadsheet.facet.getRowNodeByIndex(null==A?void 0:A.rowIndex);return(null==e?void 0:e.value)||this.getFieldName(null==e?void 0:e.field)}return(null==A?void 0:A.value)||this.getFieldName(null==A?void 0:A.field)}getFieldFormatter(e){const t=this.getField(e),A=(0,l.get)(this.getFieldMeta(t,this.meta),"formatter",l.identity);return(e,t,n)=>{var i,r;const o=It(n,null===(r=null===(i=this.spreadsheet)||void 0===i?void 0:i.options)||void 0===r?void 0:r.placeholder);return St(null==A?void 0:A(e,t,n),o)}}getFieldDescription(e){const t=this.getField(e);return(0,l.get)(this.getFieldMeta(t,this.meta),"description")}setDataCfg(e){var t,A,n;null===(n=null===(A=null===(t=this.getFieldMeta)||void 0===t?void 0:t.cache)||void 0===A?void 0:A.clear)||void 0===n||n.call(A);const{fields:i,meta:r,data:o,sortParams:s,filterParams:a}=this.processDataCfg(e);this.fields=i,this.meta=r,this.originData=o,this.sortParams=s,this.filterParams=a,this.displayData=this.originData,this.indexesData={}}processMeta(e=[],t){var A,n;return[...e,oi(e,null===(n=null===(A=this.spreadsheet)||void 0===A?void 0:A.options)||void 0===n?void 0:n.cornerExtraFieldText,t)]}getDisplayDataSet(){return this.displayData||[]}isEmpty(){return(0,l.isEmpty)(this.getDisplayDataSet())}getEmptyViewIndexes(){return[]}getValueRangeByField(e){const t=(A=e,this.spreadsheet.store.get(y,B)[A]);var A;if(t)return t;const n=(0,l.compact)((0,l.map)(this.originData,t=>{const A=t[e];return(0,l.isNil)(A)?null:Number.parseFloat(A)})),i={maxValue:(0,l.max)(n),minValue:(0,l.min)(n)};return((e,t)=>{const A=e.store.get(y,B);e.store.set(y,Object.assign(Object.assign({},A),t))})(this.spreadsheet,{[e]:i}),i}moreThanOneValue(){var e,t;return(null===(t=null===(e=this.fields)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)>1}}class wi extends Ci{constructor(){super(...arguments),this.handleDimensionValueFilter=()=>{(0,l.each)(this.filterParams,({filterKey:e,filteredValues:t,customFilter:A})=>{const n=new Set(t),i=t=>!n.has(t[e]),r=(0,l.filter)(this.displayData,e=>A?A(e)&&i(e):i(e));this.displayData=this.getDisplayData(r)})},this.handleDimensionValuesSort=()=>{(0,l.each)(this.sortParams,e=>{var t;const{sortFieldId:A,sortBy:n,sortFunc:i,sortMethod:r,query:o}=e;if(!A)return;let s=this.displayData;const a=[];if(o){const e=[];s.forEach(t=>{const A=Object.keys(o);let n=!0;for(let e=0;e<A.length;e++){const i=A[e];if(t[i]!==o[i]){n=!1,a.push(t);break}}n&&e.push(t)}),s=e}let u=s;if(i)u=i(Object.assign(Object.assign({},e),{data:s}));else if(n&&!(0,l.isFunction)(n)){const e=[...n].reverse();u=s.sort((t,n)=>{const i=e.indexOf(t[A]);return e.indexOf(n[A])-i})}else if(ci(r)||hi(r)){const e=r.toLocaleLowerCase(),i=It(this.spreadsheet,null===(t=this.spreadsheet.options)||void 0===t?void 0:t.placeholder),o=((0,l.isFunction)(n)?n:null)||(e=>e[A]===i?Number.MIN_VALUE:e[A]);u=[...s].sort((t,A)=>this.compareSortValues(o(t),o(A),e))}a.length&&(u=[...u,...a]),this.displayData=this.getDisplayData(u)})}}compareSortValues(e,t,A){const n=ci(A)?1:-1;return(0,l.isNil)(e)&&(0,l.isNil)(t)?0:(0,l.isNil)(e)?1:(0,l.isNil)(t)?-1:Vn(e)&&Vn(t)?(Number(e)-Number(t))*n:e.toString().localeCompare(t.toString(),"zh")*n}processDataCfg(e){return e}setDataCfg(e){super.setDataCfg(e),this.handleDimensionValueFilter(),this.handleDimensionValuesSort()}getStartFrozenRows(e){const{rowCount:t}=this.spreadsheet.options.frozen||{};return t?e.slice(0,t):[]}getEndFrozenRows(e){const{trailingRowCount:t}=this.spreadsheet.options.frozen||{};return t?e.slice(-t):[]}getDisplayData(e){const t=this.getStartFrozenRows(e),A=this.getEndFrozenRows(e),n=e.slice(t.length||0,-A.length||void 0);return[...t,...n,...A]}getDimensionValues(){return[]}getCellData({query:e={}}={}){if(0===this.displayData.length&&0===e.rowIndex)return;const t=this.displayData[e.rowIndex];return(0,l.hasIn)(e,"field")&&(0,l.isObject)(t)?t[e.field]:t}getCellMultiData({query:e={}}={}){if(!e)return this.displayData;const t=this.displayData[e.rowIndex]?[this.displayData[e.rowIndex]]:this.displayData;return(0,l.hasIn)(e,"field")?t.map(t=>t[e.field]):t}getRowData(e){return this.getCellData({query:{rowIndex:e.rowIndex}})}}function yi(e,t=2){return(0,l.floor)(e,t)}function Bi(e){return(0,l.isNumber)(e)?yi(e,0):e}class Ei extends a.YJ{constructor(e){super(),this.cfg=e,this.render()}layout(){this.addCornerBottomBorder(),this.addCornerRightBorder(),this.addSplitLineShadow()}render(){this.removeChildren(),this.layout()}static getHorizontalBorderWidth(e){var t;const{horizontalBorderWidth:A}=null===(t=e.theme)||void 0===t?void 0:t.splitLine;return A}static getVerticalBorderWidth(e){var t;const{splitLine:A,cornerCell:n,colCell:i,dataCell:r}=e.theme;return e.isPivotMode()?null==A?void 0:A.verticalBorderWidth:Math.max(r.cell.verticalBorderWidth,(null===(t=e.options.seriesNumber)||void 0===t?void 0:t.enable)?n.cell.verticalBorderWidth:i.cell.verticalBorderWidth)}onBorderScroll(e){if(e!==this.cfg.scrollX){this.cfg.scrollX=e;const{position:t}=this.cfg;Zt(this,t.x-e,0),this.render()}}onChangeShadowVisibility(e,t){const{colCount:A,trailingColCount:n}=this.cfg.spreadsheet.facet.getFrozenOptions(),i=0===A&&e>0,r=0===n&&yi(e)<yi(t);this.cfg.showViewportLeftShadow===i&&this.cfg.showViewportRightShadow===r||(this.cfg.showViewportLeftShadow=i,this.cfg.showViewportRightShadow=r,this.render())}getCornerRightBorderSizeForPivotMode(){var e;const{cornerHeight:t,viewportHeight:A,position:n,spreadsheet:i}=this.cfg,{horizontalBorderWidth:r}=null===(e=i.theme)||void 0===e?void 0:e.splitLine;return{y:n.y,height:t+r+A}}addCornerRightHeadBorder(){var e,t;const{cornerWidth:A,cornerHeight:n,position:i,spreadsheet:r}=this.cfg,{verticalBorderColor:o,verticalBorderColorOpacity:s}=null===(e=r.theme)||void 0===e?void 0:e.splitLine,a=Ei.getVerticalBorderWidth(r),l=Ei.getHorizontalBorderWidth(r),u=i.x+A+a/2,{verticalBorderColor:c,verticalBorderColorOpacity:h,backgroundColor:d,backgroundColorOpacity:f}=(null===(t=r.options.seriesNumber)||void 0===t?void 0:t.enable)||r.isPivotMode()?r.theme.cornerCell.cell:r.theme.colCell.cell;[{stroke:d,strokeOpacity:f},{stroke:o||c,strokeOpacity:s||h}].forEach(({stroke:e,strokeOpacity:t})=>{$e(this,{x1:u,y1:i.y,x2:u,y2:i.y+n+l,lineWidth:a,stroke:e,strokeOpacity:t})})}addCornerRightBorder(){var e;const{cornerWidth:t,cornerHeight:A,viewportHeight:n,position:i,spreadsheet:r}=this.cfg,{verticalBorderColor:o,verticalBorderColorOpacity:s}=null===(e=r.theme)||void 0===e?void 0:e.splitLine,a=Ei.getVerticalBorderWidth(r),l=Ei.getHorizontalBorderWidth(r),u=i.x+t+a/2;this.addCornerRightHeadBorder();const{verticalBorderColor:c,verticalBorderColorOpacity:h,backgroundColor:d,backgroundColorOpacity:f}=r.theme.dataCell.cell;[{stroke:d,strokeOpacity:f},{stroke:o||c,strokeOpacity:s||h}].forEach(({stroke:e,strokeOpacity:t})=>{$e(this,{x1:u,y1:i.y+A+l,x2:u,y2:i.y+A+l+n,lineWidth:a,stroke:e,strokeOpacity:t})})}addCornerBottomBorder(){var e,t;const A=this.cfg,{cornerWidth:n,cornerHeight:i,viewportWidth:r,position:o,scrollX:s=0,spreadsheet:a}=A,{horizontalBorderColor:l,horizontalBorderWidth:u,horizontalBorderColorOpacity:c}=null===(e=a.theme)||void 0===e?void 0:e.splitLine,{horizontalBorderColor:h,horizontalBorderColorOpacity:d}=(null===(t=a.options.seriesNumber)||void 0===t?void 0:t.enable)||a.isPivotMode()?a.theme.cornerCell.cell:a.theme.colCell.cell,f=o.x,g=f+n+Ei.getVerticalBorderWidth(a)+r+(a.isFrozenRowHeader()?0:s),p=o.y+i+u/2;this.cornerBottomBorder=$e(this,{x1:f,y1:p,x2:g,y2:p,stroke:l||h,lineWidth:u,opacity:c||d})}addSplitLineShadow(){var e;const t=this.cfg,{spreadsheet:A}=t,n=null===(e=A.theme)||void 0===e?void 0:e.splitLine;A.isPivotMode()&&(null==n?void 0:n.showShadow)&&A.isFrozenRowHeader()&&(this.addSplitLineLeftShadow(),this.addSplitLineRightShadow())}addSplitLineLeftShadow(){var e;if(!this.cfg.showViewportLeftShadow)return;const{cornerWidth:t,cornerHeight:A,viewportHeight:n,position:i,spreadsheet:r}=this.cfg,{shadowColors:o,shadowWidth:s,horizontalBorderWidth:l}=null===(e=r.theme)||void 0===e?void 0:e.splitLine,u=i.x+t+Ei.getVerticalBorderWidth(r);this.appendChild(new a.rw({style:{x:u,y:i.y,width:s,height:A+l+n,fill:`l (0) 0:${null==o?void 0:o.left} 1:${null==o?void 0:o.right}`}}))}addSplitLineRightShadow(){var e;if(!this.cfg.showViewportRightShadow)return;const{cornerWidth:t,viewportWidth:A,position:n,spreadsheet:i}=this.cfg,{shadowColors:r,shadowWidth:o}=null===(e=i.theme)||void 0===e?void 0:e.splitLine,s=n.x+t+Ei.getVerticalBorderWidth(i)+A-o,{y:l,height:u}=this.getCornerRightBorderSizeForPivotMode();this.appendChild(new a.rw({style:{x:s,y:l,width:o,height:u,fill:`l (0) 0:${null==r?void 0:r.right} 1:${null==r?void 0:r.left}`}}))}}var xi;!function(e){e[e.Start=0]="Start",e[e.Center=1]="Center",e[e.End=2]="End"}(xi||(xi={}));const bi=e=>["left","top"].includes(e)?xi.Start:["center","middle"].includes(e)?xi.Center:xi.End,Fi=(e,t,A,n)=>{const{isCustomRenderer:i=!1}=n||{},{align:r,size:o,padding:s}=A,{textSize:a,iconStartSize:l=0,iconEndSize:u=0}=o;let{betweenTextAndEndIcon:c=0}=s;c=u?c:0;const h=a+l+u,d=t.start-s.start,f=d+(t.size+s.start+s.end),g=t.start+t.size,p=e.start+e.size;function v(e){switch(r){case xi.Start:return{iconStart:e.start,textStart:e.start+l,iconEnd:e.start+l+a+c};case xi.Center:const t=e.start+e.size/2-h/2;return{iconStart:t,textStart:t+l+(i?0:a/2),iconEnd:t+l+a+c};default:const A=e.start+e.size;return{iconStart:A-u-a-l,textStart:A-u-(i?a:0),iconEnd:A-u+c}}}if(d>=e.start&&f<=p)return v(t);if(d<e.start&&f<=p){const A={start:e.start+(r!==xi.End?s.start:0),size:t.size-(e.start-t.start)-(r!==xi.End?s.start:0)};return A.size<h&&(A.size=h,A.start=g-h),v(A)}if(d>=e.start&&f>p){const e={start:t.start,size:t.size-(g-p)-(r!==xi.Start?s.end:0)};return e.size<h&&(e.size=h,e.start=t.start),v(e)}const m={start:e.start+s.start,size:e.size-s.start-s.end};if(m.size<h){const e=t.start+t.size/2-h/2;e>m.start||(e+h>m.start+m.size?m.start=e:m.start-=h-m.size),m.size=h}return v(m)},Si=e=>e.includes("[&]")?"id":"field",Ti=(e,t=[])=>{const A=e.facet.getInitColIndexLeafNodes();return(0,l.compact)(t.map(e=>{const t=Si(e);return A.find(A=>A[t]===e)}))},Li=(e,...t)=>(0,Q.sH)(void 0,[e,...t],void 0,function*(e,t=[],A=!1){const n=(...t)=>(0,Q.sH)(void 0,[...t],void 0,function*(t=[],A=[]){e.setOptions({interaction:{hiddenColumnFields:t}}),e.interaction.reset(),e.store.set("hiddenColumnsDetail",A),yield e.render({reloadData:!1,rebuildHiddenColumnsDetail:!1})});if((0,l.isEmpty)(t)&&A)return void(yield n());const i=e.store.get("hiddenColumnsDetail",[]),{hiddenColumnFields:r=[]}=e.options.interaction;if((0,l.isEqual)(t,r)&&!A)return;const o=(0,l.uniq)([...t,...r]),s=Ti(e,o).every((e,t,A)=>{const n=A[t+1];return!n||1===Math.abs(e.colIndex-n.colIndex)}),a=((e,t=[])=>{if((0,l.isEmpty)(t))return{prev:null,next:null};const A=e.facet.getInitColIndexLeafNodes(),n=Ti(e,t).map(e=>A.findIndex(t=>t.id===e.id)),i=Math.max(...n),r=Math.min(...n),o=A.find((e,t)=>t===i+1);return{prev:A.find((e,t)=>t===r-1)||null,next:o||null}})(e,s?o:t),u={hideColumnNodes:Ti(e,t),displaySiblingNode:a},c=((e,t)=>t.findIndex(t=>e.hideColumnNodes.some(e=>{var A;return null===(A=t.hideColumnNodes)||void 0===A?void 0:A.find(t=>t.id===e.id)})))(u,i);let h=[];h=-1!==c?i.map((e,t)=>t===c?u:e):[...i,u],e.emit(iA.COL_CELL_HIDDEN,u,h),yield n(o,h)}),Qi=(e,...t)=>(0,Q.sH)(void 0,[e,...t],void 0,function*(e,t=[],A=!1){(0,l.isEmpty)(t)&&A&&(yield Li(e,t,!0));const n=(e=>{const{columns:t=[]}=e.dataCfg.fields;return e.isTableMode()&&!e.isCustomColumnFields()?t:e.facet.getInitColIndexLeafNodes().map(({id:e})=>e)})(e),i=((e,t)=>{if((0,l.isEmpty)(t))return[];let A=Number.NEGATIVE_INFINITY;return e.reduce((e,n,i)=>{if(!t.includes(n))return e;if(i===A+1){const t=(0,l.last)(e);null==t||t.push(n)}else e.push([n]);return A=i,e},[])})(Jt(n),t);yield Promise.all(i.map(t=>(0,Q.sH)(void 0,void 0,void 0,function*(){yield Li(e,t,A)})))}),Ii=(e,t,A)=>((e,t)=>{const A=((e,t)=>t?null==e?void 0:e[t]:(null==e?void 0:e.next)||(null==e?void 0:e.prev))(e,t);return null==A?void 0:A.id})(e,A)===t,Ui=(e,t,A)=>{var n;const i=[],r=(null===(n=e.options.interaction)||void 0===n?void 0:n.hiddenColumnFields)||[],o=Ti(e,r),s=new Map(o.map(e=>[e.id,e])),a=e.facet.getInitColIndexLeafNodes(),u="prev"===A?1:-1;for(let e=a.findIndex(e=>e.id===t)+u;e<a.length;e+=u){const t=a[e];if(!t)break;if(!s.has(null==t?void 0:t.id))break;i.push(t)}return(0,l.sortBy)(i,"colIndex")};class Oi extends Ht{constructor(){super(...arguments),this.hasMobileTouchListeners=!1}getHeaderConfig(){return this.headerConfig||{}}isShallowRender(){return super.isShallowRender()||this.headerConfig.shallowRender}shouldInit(){return super.shouldInit()&&!this.isShallowRender()}handleRestOptions(...[e]){this.headerConfig=Object.assign({},e);const{value:t,query:A}=this.meta,n=this.spreadsheet.dataCfg.sortParams||[],i=this.isSortCell(),r=(0,l.find)([...n].reverse(),e=>i&&(null==e?void 0:e.sortByMeasure)===t&&(0,l.isEqual)((0,l.get)(e,"query"),A)),o=vi(r,i);this.headerConfig.sortParam=Object.assign(Object.assign(Object.assign({},this.headerConfig.sortParam),r||{query:A}),{type:o})}initCell(){this.resetTextAndConditionIconShapes(),this.actionIcons=[],this.hasDefaultHiddenIcon=!1,this.generateIconConfig()}generateIconConfig(){var e,t;this.conditionIconMappingResult=this.getIconConditionResult();const{sortParam:A}=this.getHeaderConfig();this.actionIconConfig=this.showSortIcon()?{icons:[{name:(null==A?void 0:A.type)||"none",position:"right"}],belongsCell:this.cellType,isSortIcon:!0}:Oe(this.spreadsheet.options.headerActionIcons,this.meta,this.cellType),this.groupedIcons=Me(null!==(t=null===(e=this.actionIconConfig)||void 0===e?void 0:e.icons)&&void 0!==t?t:[],this.conditionIconMappingResult)}getFormattedFieldValue(){const{isTotalRoot:e,isGrandTotals:t,value:A}=this.meta,n=this.spreadsheet.dataSet.getFieldFormatter(this.meta.field);let i=!0;return i=!(this.spreadsheet.isTableMode()||(this.spreadsheet.isHierarchyTreeType()?t&&e:e)),{formattedValue:i&&n?n(A,void 0,this.meta):A,value:A}}shouldShowDefaultHeaderActionIcon(){return this.spreadsheet.options.showDefaultHeaderActionIcon}showSortIcon(){const{dataCfg:e}=this.spreadsheet,t=(0,l.isEmpty)(e.fields.values);if(this.shouldShowDefaultHeaderActionIcon()&&!t){const{sortParam:e}=this.getHeaderConfig(),t=this.meta.query;return this.isShallowRender()?t:t&&(0,l.isEqual)(null==e?void 0:e.query,t)&&(null==e?void 0:e.type)&&"none"!==(null==e?void 0:e.type)}return!1}getActionIconStyle(e){const{icon:t}=this.getStyle(),A=this.getTextConditionMappingResult(),n=(null==A?void 0:A.fill)||this.getTextStyle().fill;return{width:null==t?void 0:t.size,height:null==t?void 0:t.size,fill:null===e.fill?void 0:(null==e?void 0:e.fill)||(null==t?void 0:t.fill)||n,cursor:"pointer"}}hasDefaultHideActionIcon(){return this.hasDefaultHiddenIcon}addActionIcon(e){var t;const{x:A,y:n,name:i,defaultHide:r,onClick:o,onHover:s,isSortIcon:a}=e,l=new ve(Object.assign(Object.assign({},this.getActionIconStyle(e)),{name:i,x:A,y:n,iconStrategy:null===(t=this.spreadsheet.options.csp)||void 0===t?void 0:t.iconStrategy}));l.toggleVisibility(!r),l.addEventListener("mouseover",e=>{this.spreadsheet.emit(iA.GLOBAL_ACTION_ICON_HOVER,e),null==s||s({hovering:!0,name:i,meta:this.meta,event:e})}),l.addEventListener("mouseleave",e=>{this.spreadsheet.emit(iA.GLOBAL_ACTION_ICON_HOVER_OFF,e),null==s||s({hovering:!1,name:i,meta:this.meta,event:e})}),l.addEventListener("click",e=>{this.spreadsheet.emit(iA.GLOBAL_ACTION_ICON_CLICK,e),a?this.spreadsheet.handleGroupSort(e,this.meta):null==o||o({name:i,meta:this.meta,event:e})}),this.actionIcons.push(l),this.appendChild(l)}drawActionAndConditionIcons({updatePositionOnly:e=!1}={}){if((0,l.isEmpty)(this.groupedIcons.left)&&(0,l.isEmpty)(this.groupedIcons.right))return;if(!this.leftIconPosition||!this.rightIconPosition)return;let t=0;(0,l.forEach)(this.groupedIcons,(A,n)=>{const{size:i,margin:r}=this.getStyle().icon,o=r.right,s="left"===n?this.leftIconPosition:this.rightIconPosition;(0,l.forEach)(A,(A,n)=>{var r,a,l,u,c;const h=s.x+(i+o)*n,d=s.y;if(A.isConditionIcon){const t={x:h,y:d,name:A.name,width:i,height:i,fill:A.fill,iconStrategy:null===(r=this.spreadsheet.options.csp)||void 0===r?void 0:r.iconStrategy};if(this.conditionIconShape){if(e)return void this.conditionIconShape.updatePosition({x:h,y:d});this.conditionIconShape.reRender(t)}else this.conditionIconShape=tt(this,t);return void this.addConditionIconShape(this.conditionIconShape)}if(e)return void(null===(a=this.actionIcons[t++])||void 0===a||a.updatePosition({x:h,y:d}));const{onClick:f,onHover:g,defaultHide:p,isSortIcon:v}=this.actionIconConfig,m=null!==(l=A.defaultHide)&&void 0!==l?l:p,C="function"==typeof m?m(this.meta,A.name):m;C&&(this.hasDefaultHiddenIcon=!0),this.addActionIcon({name:A.name,fill:A.fill,x:h,y:d,defaultHide:C,onClick:null!==(u=A.onClick)&&void 0!==u?u:f,onHover:null!==(c=A.onHover)&&void 0!==c?c:g,isSortIcon:v})})})}isSortCell(){var e,t,A;const n=null===(t=null===(e=this.spreadsheet)||void 0===e?void 0:e.isValueInCols)||void 0===t?void 0:t.call(e),i=this.meta.level===(null===(A=this.meta.hierarchy)||void 0===A?void 0:A.maxLevel);return n?i&&this.cellType===o.COL_CELL:i&&this.cellType===o.ROW_CELL}handleByStateName(e,t){_t(e,this)&&this.updateByState(t)}handleSearchResult(e){_t(e,this)&&((0,l.find)(e,e=>null==e?void 0:e.isTarget).id===this.getMeta().id?this.updateByState(r.HIGHLIGHT):this.updateByState(r.SEARCH_RESULT))}handleHover(e){var t;_t(e,this)&&(this.updateByState(r.HOVER),this.hasDefaultHideActionIcon()&&this.toggleActionIcon(null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.id))}handleSelect(e,t=[]){_t(e,this)&&this.updateByState(r.SELECTED);const A=(0,l.map)(t,"id");(0,l.includes)(A,this.meta.id)&&this.updateByState(r.SELECTED)}getTextStyle(){const e=this.getCellTextWordWrapStyle(),{text:t,bolderText:A,measureText:n}=this.getStyle();let i;return i=this.isMeasureField()?n||t:this.isBolderText()?A:t,this.getContainConditionMappingResultTextStyle(Object.assign(Object.assign({},e),i))}getBackgroundColor(){var e;const{backgroundColor:t,backgroundColorOpacity:A}=(null===(e=this.getStyle())||void 0===e?void 0:e.cell)||{};return(0,l.merge)({backgroundColor:t,backgroundColorOpacity:A},this.getBackgroundConditionFill())}toggleActionIcon(e){if(this.getMeta().id===e){const e=[];(0,l.forEach)(this.actionIcons,t=>{"visible"!==t.parsedStyle.visibility&&(t.toggleVisibility(!0),e.push(t))}),this.spreadsheet.store.set("visibleActionIcons",e)}}getIconPosition(){return this.leftIconPosition||this.rightIconPosition}getInteractedCells(){var e;return null===(e=this.spreadsheet.interaction)||void 0===e?void 0:e.getCells([o.CORNER_CELL,o.COL_CELL,o.ROW_CELL,o.SERIES_NUMBER_CELL])}update(){const{interaction:e}=this.spreadsheet,t=null==e?void 0:e.getState();if((null==t?void 0:t.stateName)===r.ALL_SELECTED)return void this.updateByState(r.SELECTED);const A=this.getInteractedCells();if((0,l.first)(A))switch(null==t?void 0:t.stateName){case r.SELECTED:case r.ROW_CELL_BRUSH_SELECTED:case r.COL_CELL_BRUSH_SELECTED:this.handleSelect(A,null==t?void 0:t.nodes);break;case r.HOVER_FOCUS:case r.HOVER:this.handleHover(A);break;case r.SEARCH_RESULT:this.handleSearchResult(A);break;default:this.handleByStateName(A,null==t?void 0:t.stateName)}}updateByState(e){super.updateByState(e,this)}hideInteractionShape(){super.hideInteractionShape()}isMeasureField(){return[Be,xe].includes(this.meta.field)}mappingValue(e){var t;const A=this.getMeta().value;return null===(t=e.mapping)||void 0===t?void 0:t.call(e,A,this.meta,this)}findFieldCondition(e=[]){return Xe(e,this.meta.field)}getTreeIcon(){return this.treeIcon}getActionIcons(){return this.actionIcons||[]}getMetaField(){return this.meta.field}addMobileTouchListener(e){if(this.hasMobileTouchListeners)return;this.hasMobileTouchListeners=!0;let t=null;const A=e=>{var A,n;const i=e.nativeEvent,r=(null===(A=i.touches)||void 0===A?void 0:A[0])||(null===(n=i.changedTouches)||void 0===n?void 0:n[0]);r&&(t={x:r.clientX,y:r.clientY})},n=A=>{var n;const i=null===(n=A.nativeEvent.changedTouches)||void 0===n?void 0:n[0];if(!i||!t)return;const r=Math.abs(i.clientX-t.x),o=Math.abs(i.clientY-t.y);r<10&&o<10&&e(),t=null},i=()=>{t=null};this.mobileTouchHandlers={onTouchStart:A,onTouchEnd:n,onTouchCancel:i},this.addEventListener("touchstart",A),this.addEventListener("touchend",n),this.addEventListener("touchcancel",i)}destroy(){this.mobileTouchHandlers&&(this.removeEventListener("touchstart",this.mobileTouchHandlers.onTouchStart),this.removeEventListener("touchend",this.mobileTouchHandlers.onTouchEnd),this.removeEventListener("touchcancel",this.mobileTouchHandlers.onTouchCancel),this.mobileTouchHandlers=void 0),this.meta.belongsCell=null,super.destroy()}reInitCell(e,t){this.setMeta(e),this.handleRestOptions(t,void 0),this.initCell()}setHeaderConfig(e){this.handleRestOptions(e,void 0),this.updateTextPosition(),this.drawActionAndConditionIcons({updatePositionOnly:!0})}}class Hi extends Oi{get cellType(){return o.COL_CELL}getBorderPositions(){return[b.TOP,b.RIGHT]}initCell(){super.initCell(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextOrCustomRenderer()}afterDrawText(){this.drawActionAndConditionIcons(),this.drawBorders(),this.drawResizeArea(),this.addExpandColumnIconShapes(),this.update()}getFormattedFieldValue(){var e;const{extra:t,value:A,field:n}=this.meta,{fields:i}=this.spreadsheet.dataSet;return(null==t?void 0:t.isCustomNode)&&(null===(e=null==i?void 0:i.values)||void 0===e?void 0:e.includes(n))?{formattedValue:A,value:A}:super.getFormattedFieldValue()}getMaxTextWidth(){const{width:e}=this.getBBoxByType(F.CONTENT_BOX);return e-this.getActionAndConditionIconWidth()}isBolderText(){const{isLeaf:e,isTotals:t}=this.meta;return!(!t&&e)}handleViewport(){if(this.meta.isFrozen)return{start:0,size:Number.POSITIVE_INFINITY};const{viewportWidth:e,cornerWidth:t=0,scrollX:A=0}=this.getHeaderConfig(),n=this.spreadsheet.facet.frozenGroupAreas,i=n[Dt.Col].width,r=n[Dt.TrailingCol].width;return this.spreadsheet.isFrozenRowHeader()?{start:A+i,size:e-i-r}:{start:i+Math.max(0,A-t),size:e-i-r+Math.min(A,t)}}getContentPosition({contentWidth:e=this.getActualTextWidth()}={}){var t,A,n;const{isLeaf:i}=this.meta,r=this.getTextStyle(),o=this.getBBoxByType(F.CONTENT_BOX),s=this.getIconStyle(),a=ke(o,r.textBaseline),l=Re(s.size,a,r.fontSize,r.textBaseline);if(i){const{textX:t,leftIconX:A,rightIconX:n}=Ne({bbox:o,textWidth:e,textAlign:r.textAlign,groupedIcons:this.groupedIcons,iconStyle:s,isCustomRenderer:!!this.getRenderer()});return this.leftIconPosition={x:A,y:l},this.rightIconPosition={x:n,y:l},{x:t,y:a}}const u=this.handleViewport(),{cell:c,icon:h}=this.getStyle(),{textAlign:d,textBaseline:f}=this.getTextStyle(),{textStart:g,iconStart:p,iconEnd:v}=Fi(u,{start:o.x,size:o.width},{align:bi(d),size:{textSize:e,iconStartSize:this.getActionAndConditionIconWidth("left"),iconEndSize:this.getActionAndConditionIconWidth("right")},padding:{start:null===(t=null==c?void 0:c.padding)||void 0===t?void 0:t.left,end:null===(A=null==c?void 0:c.padding)||void 0===A?void 0:A.right,betweenTextAndEndIcon:null===(n=null==h?void 0:h.margin)||void 0===n?void 0:n.left}},{isCustomRenderer:!!this.getRenderer()}),m=ke(o,f);return this.leftIconPosition={x:p,y:l},this.rightIconPosition={x:v,y:l},{x:g,y:m}}getTextPosition(){return this.getContentPosition()}getColResizeArea(){return eA(this.spreadsheet,pt)}getHorizontalResizeAreaName(){return`${Ct}${this.meta.field}`}isCrossColumnLeafNode(){var e;const{colsHierarchy:t}=this.spreadsheet.facet.getLayoutResult(),{level:A,isLeaf:n}=this.meta;return(null===(e=null==t?void 0:t.sampleNodeForLastLevel)||void 0===e?void 0:e.level)!==A&&n}drawHorizontalResizeArea(){var e,t;if(0===(null===(t=null===(e=this.spreadsheet.options.style)||void 0===e?void 0:e.colCell)||void 0===t?void 0:t.height)||!this.shouldDrawResizeAreaByType("colCellVertical",this))return;const{y:A,height:n}=this.meta,{position:i}=this.getHeaderConfig(),r=this.getResizeAreaStyle(),o=this.getColResizeArea();if(!o||this.isCrossColumnLeafNode())return;const s=this.getHorizontalResizeAreaName();if(null==o?void 0:o.find(e=>e.name===s))return;const a=i.y+A,l=this.getResizeAreaWidth(),u=$t({theme:r,type:Kt.Vertical,effect:Vt.Field,offsetX:0,offsetY:a,width:l,height:n,meta:this.meta,cell:this}),c=Object.assign(Object.assign({},u.style),{x:0,y:a+n-r.size,width:l});this.horizontalResizeArea?(this.horizontalResizeArea.name=s,this.horizontalResizeArea.appendInfo=u.appendInfo,N(this.horizontalResizeArea,c)):this.horizontalResizeArea=o.appendChild(new Wt({name:s,style:c},u.appendInfo))}getResizeAreaWidth(){const{cornerWidth:e=0,viewportWidth:t}=this.getHeaderConfig();return Ei.getVerticalBorderWidth(this.spreadsheet)+e+t}shouldAddVerticalResizeArea(){if(this.getMeta().isFrozen)return!0;const{x:e,y:t,width:A,height:n}=this.meta,{scrollX:i=0,scrollY:r,cornerWidth:o=0,height:s,width:a}=this.getHeaderConfig(),l=this.getResizeAreaStyle(),u={x:e+A-l.size,y:t,width:l.size,height:n},c=this.spreadsheet.facet.frozenGroupAreas,h=c[Dt.Col].width,d=c[Dt.TrailingCol].width;let f;return f=this.spreadsheet.isFrozenRowHeader()?{x:h,y:0,width:a-h-d,height:s}:{x:h-o,y:0,width:a-h-d+o,height:s},tA(u,f,{scrollX:i,scrollY:r})}getVerticalResizeAreaOffset(){const{x:e,y:t}=this.meta,{scrollX:A=0,position:n,cornerWidth:i=0,viewportWidth:r}=this.getHeaderConfig(),o=this.spreadsheet.isFrozenRowHeader(),s=this.spreadsheet.facet.frozenGroupAreas,a=s[Dt.Col],l=s[Dt.TrailingCol];let u=null==n?void 0:n.x;return this.getMeta().isFrozenHead?u+=e-a.x-(o?0:Math.min(A,i)):this.getMeta().isFrozenTrailing?u+=e-l.x+r-l.width:u+=e-A,{x:u,y:(null==n?void 0:n.y)+t}}drawVerticalResizeArea(){if(!this.meta.isLeaf||this.meta.hideColCellHorizontalResize||!this.shouldDrawResizeAreaByType("colCellHorizontal",this))return;const{width:e,height:t}=this.meta,A=this.getResizeAreaStyle(),n=this.getColResizeArea();if(!n)return;if(!this.shouldAddVerticalResizeArea())return void(this.verticalResizeArea&&(this.verticalResizeArea.style.visibility="hidden"));const{x:i,y:r}=this.getVerticalResizeAreaOffset(),o=$t({theme:A,type:Kt.Horizontal,effect:Vt.Cell,offsetX:i,offsetY:r,width:e,height:t,meta:this.meta,cell:this}),s=Object.assign(Object.assign({},o.style),{x:i+e-A.size,y:r,height:t,visibility:"visible"});this.verticalResizeArea?(this.verticalResizeArea.appendInfo=o.appendInfo,N(this.verticalResizeArea,s)):this.verticalResizeArea=n.appendChild(new Wt({style:s},o.appendInfo))}drawResizeArea(){this.drawHorizontalResizeArea(),this.drawVerticalResizeArea()}hasHiddenColumnCell(){const{interaction:e}=this.spreadsheet.options,t=this.spreadsheet.store.get("hiddenColumnsDetail",[]);return!(0,l.isEmpty)(t)&&!(0,l.isEmpty)(null==e?void 0:e.hiddenColumnFields)&&!!t.find(e=>Ii(null==e?void 0:e.displaySiblingNode,this.meta.id,this.isLastColumn()?"prev":"next"))}getExpandIconTheme(){return this.getStyle().icon}addExpandColumnSplitLine(){const{x:e,y:t,width:A,height:n}=this.getBBoxByType(),{horizontalBorderColor:i,horizontalBorderColorOpacity:r}=this.theme.splitLine,o=this.isLastColumn()?e+A:e;$e(this,{x1:o,y1:t,x2:o,y2:t+n,stroke:i,lineWidth:1,strokeOpacity:r})}addExpandColumnIconShapes(){this.hasHiddenColumnCell()&&(this.addExpandColumnSplitLine(),this.addExpandColumnIcons())}addExpandColumnIcons(){const e=this.isLastColumn();this.addExpandColumnIcon(e),this.isAllDisplaySiblingNodeHidden()&&e&&this.addExpandColumnIcon(!1)}addExpandColumnIcon(e){var t;const A=this.getExpandColumnIconConfig(e),n=tt(this,Object.assign(Object.assign({},A),{name:"ExpandColIcon",cursor:"pointer",iconStrategy:null===(t=this.spreadsheet.options.csp)||void 0===t?void 0:t.iconStrategy}));n.addEventListener("click",()=>{this.spreadsheet.emit(iA.COL_CELL_EXPANDED,this.meta,e?"prev":"next")}),n.addEventListener("mouseenter",t=>{this.spreadsheet.emit(iA.COL_CELL_EXPAND_ICON_HOVER,{event:t,meta:this.meta,hiddenColumns:Ui(this.spreadsheet,this.meta.id,e?"prev":"next")})})}getExpandColumnIconConfig(e){const{size:t=0}=this.getExpandIconTheme(),{x:A,y:n,width:i,height:r}=this.getBBoxByType(),o=A-t;return{x:e?o+i:o,y:n+r/2-t/2,width:2*t,height:t}}isLastColumn(){return((e,t)=>{const A=e.facet.getColLeafNodes(),n=e.facet.getInitColIndexLeafNodes(),i=Si(t);return(0,l.get)((0,l.last)(A),i)===t&&(0,l.get)((0,l.last)(n),i)!==t})(this.spreadsheet,this.meta.id)}isAllDisplaySiblingNodeHidden(){const{id:e}=this.meta,t=this.spreadsheet.store.get("hiddenColumnsDetail",[]),A=t.find(({displaySiblingNode:t})=>{var A;return(null===(A=null==t?void 0:t.next)||void 0===A?void 0:A.id)===e});return t.find(({displaySiblingNode:t})=>{var A;return(null===(A=null==t?void 0:t.prev)||void 0===A?void 0:A.id)===e})&&A}getResizedTextMaxLines(){var e,t,A,n,i;const{colCell:r}=this.spreadsheet.options.style;return null!==(n=null!==(t=null===(e=null==r?void 0:r.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(A=null==r?void 0:r.maxLinesByField)||void 0===A?void 0:A[this.meta.field])&&void 0!==n?n:this.getMaxLinesByCustomHeight({isCustomHeight:null===(i=this.meta.extra)||void 0===i?void 0:i.isCustomHeight})}shouldShowDefaultHeaderActionIcon(){return this.spreadsheet.options.showDefaultHeaderActionIcon&&this.spreadsheet.isValueInCols()}setHeaderConfig(e){super.setHeaderConfig(e),this.drawResizeArea()}}class Mi extends Hi{handleRestOptions(...[e]){this.headerConfig=Object.assign({},e);const{field:t}=this.meta,A=(0,l.find)(this.spreadsheet.dataCfg.sortParams,e=>(null==e?void 0:e.sortFieldId)===t),n=vi(A,!0);this.headerConfig.sortParam=Object.assign(Object.assign(Object.assign({},this.headerConfig.sortParam),A||{}),{type:n})}getFormattedFieldValue(){return _e(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.field))}isSortCell(){return!0}showSortIcon(){const{extra:e}=this.meta,{options:t}=this.spreadsheet,{showDefaultHeaderActionIcon:A}=t;return(null==e?void 0:e.isCustomNode)?A&&this.meta.isLeaf:A}getTextStyle(){var e;const t=this.getCellTextWordWrapStyle(),A=null===(e=this.getStyle())||void 0===e?void 0:e.bolderText;return Object.assign(Object.assign({},t),A)}getHorizontalResizeAreaName(){return`${Ct}${this.meta.id}`}drawBackgroundShape(){const{backgroundColor:e,backgroundColorOpacity:t}=this.getStyle().cell||{};this.backgroundShape=qe(this,Object.assign(Object.assign({},this.getBBoxByType()),{fill:e,fillOpacity:t}))}drawTextOrCustomRenderer(){this.drawTextShape(),this.afterDrawText()}}var _i;!function(e){e.Adaptive="adaptive",e.ColAdaptive="colAdaptive",e.Compact="compact"}(_i||(_i={}));const ki={wordWrap:!0,maxLines:1,textOverflow:"ellipsis"},Ri={layoutWidthType:_i.Adaptive,seriesNumberCell:ki,cornerCell:ki,rowCell:Object.assign(Object.assign({},ki),{showTreeLeafNodeAlignDot:!1}),colCell:Object.assign(Object.assign({},ki),{height:30}),dataCell:Object.assign(Object.assign({},ki),{width:96,height:30})},Ni={rowCount:0,colCount:0,trailingRowCount:0,trailingColCount:0},Di={width:600,height:480,debug:!1,hierarchyType:"grid",device:rt.PC,conditions:{},totals:{},tooltip:{enable:!1,autoAdjustBoundary:"body",operation:{hiddenColumns:!1,sort:!1,menu:{items:[]}}},interaction:{copy:{enable:!0,withFormat:!0,withHeader:!1},linkFields:[],hiddenColumnFields:[],selectedCellsSpotlight:!1,hoverHighlight:!0,hoverFocus:{duration:800},scrollSpeedRatio:{horizontal:1,vertical:1},autoResetSheetStyle:!0,brushSelection:{dataCell:!0,rowCell:!0,colCell:!0},multiSelection:!0,rangeSelection:!0,scrollbarPosition:m.CONTENT,resize:{rowCellVertical:!0,cornerCellHorizontal:!0,colCellHorizontal:!0,colCellVertical:!0,rowResizeType:zt.CURRENT,colResizeType:zt.CURRENT,minCellWidth:40,minCellHeight:20},eventListenerOptions:!1,selectedCellHighlight:!1,overscrollBehavior:"auto"},seriesNumber:{enable:!1},customSVGIcons:[],showDefaultHeaderActionIcon:!1,headerActionIcons:[],style:Ri,frozen:Object.assign({rowHeader:!0},Ni),hd:!0,cornerText:"",cornerExtraFieldText:"",placeholder:{cell:"-",empty:{icon:"Empty"}}},Pi=(e,t,A)=>{if(A<=0)return{start:0,end:0};let n=(0,l.findIndex)(e,(A,n)=>t>=A&&t<e[n+1],0);n=Math.max(n,0);let i=A===t?n:(0,l.findIndex)(e,(t,n)=>A>t&&A<=e[n+1],n);return i=Math.min(-1===i?1/0:i,e.length-2),{start:n,end:i}},Gi=(e,t)=>{const{width:A,originalWidth:n}=t,i=Math.min(n-A,e);return i<0?0:i},Ki=(e,t,A)=>{const n=Math.min(t-A,e);return n<0?0:n},Vi=(e=[],t)=>{if((0,l.isEmpty)(e))return[];const A=[];return e.forEach(e=>{e instanceof t&&A.push(e),e instanceof a.YJ&&e.children.forEach(e=>{e instanceof t&&A.push(e)})}),A};class zi{constructor(e,t=!1){this.x=0,this.y=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.width=0,this.height=0,this.originalWidth=0,this.originalHeight=0,this.viewportHeight=0,this.viewportWidth=0,this.facet=e,this.spreadsheet=e.spreadsheet,this.layoutResult=e.getLayoutResult(),t&&this.calculateBBox()}}class Wi extends zi{calculateBBox(){const e=this.getWidth(),t=this.getHeight();this.width=e,this.height=t,this.maxX=e,this.maxY=t}calculateOriginalHeight(){var e;const{colsHierarchy:t}=this.layoutResult,{colCell:A}=this.spreadsheet.options.style;this.originalHeight=t.sampleNodeForLastLevel?yi(t.height):null!==(e=this.facet.getCellCustomSize(null,null==A?void 0:A.height))&&void 0!==e?e:0}calculateOriginWidth(){const{rowsHierarchy:e}=this.layoutResult;this.originalWidth=yi(e.width+this.facet.getSeriesNumberWidth())}getHeight(){return this.calculateOriginalHeight(),this.originalHeight}getWidth(){return this.calculateOriginWidth(),this.spreadsheet.isFrozenRowHeader()?this.adjustWidth():this.originalWidth}adjustWidth(){const{colsHierarchy:e}=this.layoutResult,{width:t,frozen:A}=this.spreadsheet.options,n=null==A?void 0:A.rowHeader,i=t*((0,l.isBoolean)(n)?.5:(0,l.clamp)(n,0,1)),r=null==e?void 0:e.width,o=t-this.originalWidth;if(this.originalWidth<=i||r<=o)return this.originalWidth;let s=0;return s=r<=t-i?this.originalWidth-(r-o):i,yi(s)}}class ji extends a.YJ{constructor(e){const{name:t,s2:A}=e;super({name:t,style:(0,Q.Tt)(e,["name","s2"])}),this.gridInfo={cols:[],rows:[]},this.updateGrid=(e,t="gridGroup")=>{var A,n,i,r;this.gridGroup&&this.getElementById(t)||(this.gridGroup=this.appendChild(new a.YJ({id:t,style:{zIndex:2}})));const o=null!==(A=(0,l.last)(e.cols))&&void 0!==A?A:0,s=null!==(n=(0,l.last)(e.rows))&&void 0!==n?n:0,{theme:u}=this.s2,c=u.dataCell.cell,h=null!==(i=null==c?void 0:c.verticalBorderWidth)&&void 0!==i?i:1,d=h/2,f={stroke:c.verticalBorderColor,strokeOpacity:c.verticalBorderColorOpacity,lineWidth:h},g=null!==(r=null==c?void 0:c.horizontalBorderWidth)&&void 0!==r?r:1,p=g/2,v={stroke:c.horizontalBorderColor,strokeOpacity:c.horizontalBorderColorOpacity,lineWidth:g},m=this.gridGroup.children;let C=0;e.cols.forEach(e=>{const t=Object.assign({x1:e-d,x2:e-d,y1:0,y2:s},f);C<m.length?nt(m[C],t):$e(this.gridGroup,t),C++}),e.rows.forEach(e=>{const t=Object.assign({x1:0,x2:o,y1:-p,y2:-p,transform:`translate(0, ${e})`},v);C<m.length?nt(m[C],t):$e(this.gridGroup,t),C++});const w=C,y=m.length;if(w<y)for(let e=y-1;e>=w;e--)m[e].destroy();this.gridInfo=e},this.s2=A}}class Xi extends ji{}const Yi=(e,t,A)=>A.slice(e,t+1).map(e=>e.x+e.width),qi=(e,t,A)=>{const n=[];for(let i=e;i<t+1;i++)n.push(A.getCellOffsetY(i+1));return n};var Zi=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js"),Ji=A("./node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js");class $i extends Oi{get cellType(){return o.ROW_CELL}getBorderPositions(){return[b.BOTTOM,b.LEFT]}initCell(){super.initCell(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextOrCustomRenderer()}afterDrawText(){this.drawActionAndConditionIcons(),this.drawTreeIcon(),this.drawTreeLeafNodeAlignDot(),this.drawBorders(),this.drawResizeAreaInLeaf(),this.update()}getBackgroundColor(){const{backgroundColor:e,backgroundColorOpacity:t}=this.getCrossBackgroundColor(this.meta.rowIndex);return(0,l.merge)({backgroundColor:e,backgroundColorOpacity:t},this.getBackgroundConditionFill())}getBBoxByType(e=F.BORDER_BOX){var t,A,n,i;const r=super.getBBoxByType(e);if(!this.spreadsheet.isHierarchyGridTreeType()||!this.meta.isCollapsed)return r;const{hierarchy:o}=this.meta,s=(null==o?void 0:o.sampleNodesForAllLevels)||[];let a=0;for(let e=this.meta.level;e<=(null!==(t=null==o?void 0:o.maxLevel)&&void 0!==t?t:0);e++){const t=s[e];a+=null!==(A=null==t?void 0:t.width)&&void 0!==A?A:0}if(e===F.CONTENT_BOX){const{padding:e}=this.getStyle().cell;a-=(null!==(n=null==e?void 0:e.left)&&void 0!==n?n:0)+(null!==(i=null==e?void 0:e.right)&&void 0!==i?i:0)}return Object.assign(Object.assign({},r),{width:a||r.width})}showTreeIcon(){return!(!this.spreadsheet.isHierarchyTreeType()&&!this.spreadsheet.isHierarchyGridTreeType()||!this.meta.isCollapsed&&this.meta.isLeaf)}showTreeLeafNodeAlignDot(){var e,t;return(null===(t=null===(e=this.spreadsheet.options.style)||void 0===e?void 0:e.rowCell)||void 0===t?void 0:t.showTreeLeafNodeAlignDot)&&this.spreadsheet.isHierarchyTreeType()&&!this.spreadsheet.isHierarchyGridTreeType()}getParentTreeIconCfg(){var e,t;if(!this.showTreeLeafNodeAlignDot()||!this.spreadsheet.isHierarchyTreeType()||!this.meta.isLeaf)return;const A=null===(t=null===(e=this.meta.parent)||void 0===e?void 0:e.belongsCell)||void 0===t?void 0:t.getTreeIcon();return null==A?void 0:A.style}onTreeIconClick(){const{isCollapsed:e,hierarchy:t}=this.meta,{device:A}=this.spreadsheet.options;if(!lt(A)){if(!e){const{scrollY:e}=this.spreadsheet.facet.getScrollOffset(),A=this.spreadsheet.facet.panelBBox.viewportHeight||0,n=(()=>{let e=0;const t=this.meta.children;return null==t||t.forEach(t=>{e+=t.height||0}),e})(),i=t.height-n;if(e>0&&e+A>i){const e=i-A;this.spreadsheet.facet.setScrollOffset({scrollY:e>0?e:0})}}this.emitCollapseEvent()}}emitCollapseEvent(){this.spreadsheet.emit(iA.ROW_CELL_COLLAPSED__PRIVATE,{isCollapsed:!this.meta.isCollapsed,node:this.meta})}drawTreeIcon(){var e;if(!this.showTreeIcon())return;const{isCollapsed:t}=this.meta,{x:A}=this.getBBoxByType(F.CONTENT_BOX),{fill:n}=this.getTextStyle(),{size:i}=this.getStyle().icon,r=A+this.getContentIndent(),o=this.getIconPosition().y;this.treeIcon=At({group:this,iconCfg:{x:r,y:o,width:i,height:i,fill:n,iconStrategy:null===(e=this.spreadsheet.options.csp)||void 0===e?void 0:e.iconStrategy},isCollapsed:t,onClick:()=>{this.onTreeIconClick()}});const{device:s}=this.spreadsheet.options;lt(s)&&this.addMobileTouchListener(()=>{this.emitCollapseEvent()})}drawTreeLeafNodeAlignDot(){const e=this.getParentTreeIconCfg();if(!e)return;const{size:t,margin:A}=this.getStyle().icon,n=e.x+t+A.right,i=this.getTextPosition().y,{fill:r,fontSize:o}=this.getTextStyle(),s=t/5;this.treeLeafNodeAlignDot=Ze(this,{cx:n+t/2,cy:i+(o-s)/2,r:s,fill:r,fillOpacity:.3})}isBolderText(){const{isLeaf:e,isTotals:t,level:A}=this.meta;return!e&&0===A||t}getResizesArea(){return eA(this.spreadsheet,gt)}drawResizeAreaInLeaf(){if(!this.meta.isLeaf||this.meta.hideRowCellVerticalResize||!this.shouldDrawResizeAreaByType("rowCellVertical",this))return;const{x:e,y:t,width:A,height:n}=this.getBBoxByType(),i=this.getResizeAreaStyle(),r=this.getResizesArea();if(!r)return;const{position:o,width:s,viewportHeight:a,scrollX:l=0,scrollY:u=0}=this.getHeaderConfig(),c=this.meta.isFrozen,h=this.spreadsheet.facet.frozenGroupAreas,d=h[Dt.Row];if(!tA({x:e,y:t+n-i.size,width:A,height:i.size},{x:0,y:c?0:d.height,width:s,height:c?Number.POSITIVE_INFINITY:a-d.height-h[Dt.TrailingRow].height},{scrollX:l,scrollY:c?0:u}))return;const{offsetX:f,offsetY:g}=this.getHorizontalResizeAreaOffset(),p=this.spreadsheet.isFrozenRowHeader()?s-o.x-(e-l):A,v=$t({theme:i,type:Kt.Vertical,effect:Vt.Cell,offsetX:f,offsetY:g,width:A,height:n,meta:this.meta,cell:this});r.appendChild(new Wt({style:Object.assign(Object.assign({},v.style),{x:f,y:g+n-i.size,width:p})},v.appendInfo))}getHorizontalResizeAreaOffset(){const{position:e,viewportHeight:t,scrollX:A=0,scrollY:n=0}=this.getHeaderConfig(),{x:i,y:r}=this.getBBoxByType(),o=this.spreadsheet.facet.frozenGroupAreas,s=o[Dt.TrailingRow];let a=e.y;return a+=this.meta.isFrozenHead?r-o[Dt.Row].y:this.meta.isFrozenTrailing?t-s.height+r-s.y:r-n,{offsetX:e.x+i-A,offsetY:a}}getContentIndent(){if(!this.spreadsheet.isHierarchyTreeType()||this.spreadsheet.isHierarchyGridTreeType())return 0;const{icon:e,cell:t}=this.getStyle(),A=e.size+e.margin.right;let n=this.meta.parent,i=0;for(;n;)0!==n.height&&(i+=A),n=n.parent;return this.showTreeLeafNodeAlignDot()&&(i+=this.isTreeLevel()?0:t.padding.right+e.margin.right),i}getTextIndent(){const{size:e,margin:t}=this.getStyle().icon;return this.getContentIndent()+(this.showTreeIcon()||this.isTreeLevel()&&this.showTreeLeafNodeAlignDot()?e+t.right:0)}isTreeLevel(){return(0,l.find)((0,l.get)(this.meta,"parent.children"),e=>!e.isLeaf)}getMaxTextWidth(){const{width:e}=this.getBBoxByType(F.CONTENT_BOX);return e-this.getTextIndent()-this.getActionAndConditionIconWidth()}getTextArea(){const e=this.getBBoxByType(F.CONTENT_BOX),t=this.getTextIndent();return Object.assign(Object.assign({},e),{x:e.x+t,width:e.width-t})}handleViewport(){if(this.meta.isFrozen)return{start:0,size:Number.POSITIVE_INFINITY};const{scrollY:e,viewportHeight:t}=this.getHeaderConfig(),A=this.spreadsheet.facet.frozenGroupAreas,n=A[Dt.Row].height;return{start:e+n,size:t-n-A[Dt.TrailingRow].height}}getContentPosition({contentWidth:e=this.getActualTextWidth()}={}){const t=this.getTextArea(),A=this.getTextStyle(),{cell:n,icon:i}=this.getStyle(),r=this.handleViewport(),o=this.getActualTextHeight(),{textStart:s}=Fi(r,{start:t.y,size:t.height},{align:bi(A.textBaseline),size:{textSize:o},padding:{start:n.padding.top,end:n.padding.bottom}}),{textX:a,leftIconX:l,rightIconX:u}=Ne({bbox:t,textWidth:e,textAlign:A.textAlign,groupedIcons:this.groupedIcons,iconStyle:i,isCustomRenderer:!!this.getRenderer()}),c=Re(null==i?void 0:i.size,s,o,A.textBaseline);return this.leftIconPosition={x:l,y:c},this.rightIconPosition={x:u,y:c},{x:a,y:s}}getTextPosition(){return this.getContentPosition()}getResizedTextMaxLines(){var e,t,A,n,i;const{rowCell:r}=this.spreadsheet.options.style;return null!==(n=null!==(t=null===(e=null==r?void 0:r.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(A=null==r?void 0:r.maxLinesByField)||void 0===A?void 0:A[this.meta.field])&&void 0!==n?n:this.getMaxLinesByCustomHeight({isCustomHeight:null===(i=this.meta.extra)||void 0===i?void 0:i.isCustomHeight})}shouldShowDefaultHeaderActionIcon(){return this.spreadsheet.options.showDefaultHeaderActionIcon&&!this.spreadsheet.isValueInCols()}setHeaderConfig(e){super.setHeaderConfig(e)}}const er=(e,t)=>(0,l.find)(t,t=>(0,l.isEqual)(t[0],e[1]));class tr extends Nt{get cellType(){return o.MERGED_CELL}constructor(e,t,A){super(A,e,t)}handleRestOptions(...[e]){this.cells=e}update(){}initCell(){this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawTextOrCustomRenderer()}afterDrawText(){this.drawBorders()}drawBackgroundShape(){const e=(e=>{let t=[];e.forEach(e=>{const A=e.getMeta(),{x:n,y:i,width:r,height:o}=A;t=t.concat(((e,t,A,n)=>{const i=[e,t],r=[e+A,t],o=[e+A,t+n],s=[e,t+n];return[[i,r],[r,o],[o,s],[s,i]]})(n,i,r,o))}),t=(e=>{const t=[];return(0,l.forEach)(e,A=>{const n=[A[1],A[0]];JSON.stringify(e).includes(JSON.stringify(n))||t.push(A)}),t})(t);let A=[];const n=t[0];let i=n,r=[];for(;!(0,l.isEqual)(n,r);)A=A.concat(i),r=er(i,t),i=r;return A})(this.cells);this.backgroundShape=null==this?void 0:this.appendChild(new a.tS({style:{points:e,fill:this.theme.dataCell.cell.backgroundColor}}))}drawTextShape(){if(!(0,l.isEmpty)(this.meta))return this.isMultiData()?Ut(this):void super.drawTextShape()}drawBorders(){const{right:e,bottom:t,bottomRightCornerCell:A}=(e=>{const t=[],A=[],n=[];return e.forEach(n=>{const[i,r]=n.position||[];(0,l.find)(e,e=>{var t,A;return(null===(t=e.position)||void 0===t?void 0:t[0])===i+1&&(null===(A=e.position)||void 0===A?void 0:A[1])===r})||A.push(n),(0,l.find)(e,e=>{var t,A;return(null===(t=e.position)||void 0===t?void 0:t[1])===r+1&&(null===(A=e.position)||void 0===A?void 0:A[0])===i})||t.push(n)}),t.forEach(A=>{const[i,r]=A.position||[],o=(0,l.find)(e,e=>{var t,A;return(null===(t=e.position)||void 0===t?void 0:t[0])===i-1&&(null===(A=e.position)||void 0===A?void 0:A[1])===r});o&&!(0,l.includes)(t,o)&&n.push(o)}),{bottom:A,right:t,bottomRightCornerCell:n}})(this.cells);e.forEach(e=>{var t;const{position:A,style:n}=De(b.RIGHT,e.getBBoxByType(),null===(t=e.getStyle())||void 0===t?void 0:t.cell);$e(this,Object.assign(Object.assign({},A),n))}),t.forEach(e=>{var t;const{position:A,style:n}=De(b.BOTTOM,e.getBBoxByType(),null===(t=e.getStyle())||void 0===t?void 0:t.cell);$e(this,Object.assign(Object.assign({},A),n))}),A.forEach(e=>{var t;const{x:A,y:n,width:i,height:r}=e.getBBoxByType(),{horizontalBorderWidth:o=0,verticalBorderWidth:s=0,verticalBorderColor:a}=null===(t=e.getStyle())||void 0===t?void 0:t.cell,l=A+i-s/2;$e(this,{x1:l,x2:l,y1:n+r-o,y2:n+r,lineWidth:s,stroke:a,strokeOpacity:s})})}}var Ar,nr;!function(e){e.Row="row",e.Col="col",e.Series="series"}(Ar||(Ar={}));class ir extends Oi{get cellType(){return o.CORNER_CELL}isBolderText(){const{cornerType:e}=this.meta;return e===Ar.Col}getBorderPositions(){return[b.TOP,b.LEFT]}initCell(){super.initCell(),this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextShape(),this.drawTreeIcon(),this.drawActionAndConditionIcons(),this.drawBorders(),this.drawResizeArea(),this.update()}afterDrawText(){}onTreeIconClick(e){const{device:t}=this.spreadsheet.options;lt(t)||this.emitCollapseEvent(e)}emitCollapseEvent(e){this.spreadsheet.facet.resetScrollY(),this.spreadsheet.emit(iA.ROW_CELL_ALL_COLLAPSED__PRIVATE,e)}drawTreeIcon(){var e,t;if(!this.showTreeIcon())return;const{collapseFields:A={}}=null===(e=this.spreadsheet.options.style)||void 0===e?void 0:e.rowCell,{size:n=0}=this.getStyle().icon,{fill:i}=this.getTextStyle(),r=this.getBBoxByType(F.CONTENT_BOX),o=this.spreadsheet.facet.getRowNodes(0),s=(0,l.values)(A).filter(Boolean).length===o.length||o.every(e=>e.isCollapsed);this.treeIcon=At({group:this,iconCfg:{x:r.x,y:this.getIconPosition().y,width:n,height:n,fill:i,iconStrategy:null===(t=this.spreadsheet.options.csp)||void 0===t?void 0:t.iconStrategy},isCollapsed:s,onClick:()=>{this.onTreeIconClick(s)}});const{device:a}=this.spreadsheet.options;lt(a)&&this.addMobileTouchListener(()=>{this.emitCollapseEvent(s)})}isLastRowCornerCell(){const{cornerType:e,field:t}=this.meta,{rows:A}=this.spreadsheet.dataSet.fields;return e===Ar.Row&&(this.spreadsheet.isHierarchyTreeType()||(0,l.last)(A)===t)}getResizeAreaEffect(){const{cornerType:e}=this.meta;return e===Ar.Series?Vt.Series:this.isLastRowCornerCell()&&this.spreadsheet.isHierarchyTreeType()?Vt.Tree:Vt.Field}drawResizeArea(){if(!this.shouldDrawResizeAreaByType("cornerCellHorizontal",this))return;const e=this.getResizeAreaStyle(),t=eA(this.spreadsheet,vt);if(!t)return;const{position:A,scrollX:n=0,scrollY:i=0,width:r,height:o}=this.getHeaderConfig(),{x:s,y:a,width:l,height:u}=this.getBBoxByType(),{cornerType:c}=this.meta;if(c===Ar.Col||!tA({x:s+l-e.size,y:a,width:e.size,height:u},{x:0,y:0,width:r,height:o},{scrollX:n,scrollY:i}))return;const h=A.x+s-n,d=A.y+(this.isLastRowCornerCell()?0:a),f=$t({theme:e,type:Kt.Horizontal,effect:this.getResizeAreaEffect(),offsetX:h,offsetY:d,width:l,height:u,meta:this.meta,cell:this});t.appendChild(new Wt({style:Object.assign(Object.assign({},f.style),{x:h+l-e.size,y:d,height:this.isLastRowCornerCell()?o:u})},f.appendInfo))}showTreeIcon(){return this.spreadsheet.isHierarchyTreeType()&&this.meta.cornerType===Ar.Row}getTreeIconWidth(){const{size:e,margin:t}=this.getStyle().icon;return this.spreadsheet.isHierarchyTreeType()?e+t.right:0}getMaxTextWidth(){const{width:e}=this.getBBoxByType(F.CONTENT_BOX);return e-this.getTreeIconWidth()-this.getActionAndConditionIconWidth()}getContentPosition({contentWidth:e=this.getActualTextWidth()}={}){const t=this.getBBoxByType(F.CONTENT_BOX),{x:A,y:n,height:i,width:r}=t,o=this.getTextStyle(),{textX:s,leftIconX:a,rightIconX:l}=Ne({bbox:{x:A+this.getTreeIconWidth(),y:n,width:r-this.getTreeIconWidth(),height:i},textAlign:o.textAlign,textWidth:e,groupedIcons:this.groupedIcons,iconStyle:this.getIconStyle()}),u=ke(t,o.textBaseline),{size:c=0}=this.getStyle().icon,h=Re(c,u,o.fontSize,o.textBaseline);return this.leftIconPosition={x:a,y:h},this.rightIconPosition={x:l,y:h},{x:s,y:u}}getTextPosition(){return this.getContentPosition()}getFormattedFieldValue(){return _e(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.field))}getResizedTextMaxLines(){var e,t,A,n,i;const{colCell:r}=this.spreadsheet.options.style;return null!==(n=null!==(t=null===(e=null==r?void 0:r.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(A=null==r?void 0:r.maxLinesByField)||void 0===A?void 0:A[this.meta.field])&&void 0!==n?n:this.getMaxLinesByCustomHeight({isCustomHeight:null===(i=this.meta.extra)||void 0===i?void 0:i.isCustomHeight})}}class rr{constructor(){this.pool=[]}acquire(){return this.pool.pop()}release(e){this.pool.push(e)}}class or extends rr{release(e){e.getRenderer()?e.destroy():this.pool.push(e)}}!function(e){e.MOUSE_DOWN="mousedown",e.MOUSE_MOVE="mousemove",e.MOUSE_UP="mouseup",e.MOUSE_OUT="mouseout",e.MOUSE_LEAVE="mouseleave",e.TOUCH_START="touchstart",e.TOUCH_END="touchend",e.KEY_DOWN="keydown",e.KEY_UP="keyup",e.CLICK="click",e.HOVER="hover",e.CONTEXT_MENU="contextmenu",e.POINTER_DOWN="pointerdown",e.POINTER_MOVE="pointermove",e.POINTER_OUT="pointerout",e.POINTER_LEAVE="pointerleave",e.POINTER_UP="pointerup",e.POINTER_CANCEL="pointercancel",e.POINTER_ENTER="pointerenter",e.POINTER_OVER="pointerover",e.RIGHT_DOWN="rightdown",e.RIGHT_UP="rightup",e.SCROLL="scroll"}(nr||(nr={}));const sr=(e,t,A=[])=>{var n;const{cellsMeta:i,cells:r,invisibleCellInfo:o}=((e,t)=>{const A=[],n=[];let i;return(0,l.forEach)(e,e=>{const r=(0,l.find)(t,t=>{var A;const n=null===(A=null==t?void 0:t.getMeta)||void 0===A?void 0:A.call(t);if((null==n?void 0:n.colIndex)===(null==e?void 0:e.colIndex)&&(null==n?void 0:n.rowIndex)===(null==e?void 0:e.rowIndex))return t});r?(A.push(r),i=(null==e?void 0:e.showText)?null==r?void 0:r.getMeta():i):n.push(e)}),{cells:A,invisibleCellInfo:n,cellsMeta:i}})(A,e);let s=i,a=r;if((null==o?void 0:o.length)>0&&o.length<A.length){const{cells:e,cellsMeta:A}=((e,t)=>{const A=[];let n;return(0,l.forEach)(e,e=>{var i,r;const o=null===(i=null==t?void 0:t.facet)||void 0===i?void 0:i.getCellMeta(e.rowIndex,e.colIndex),s=null===(r=null==t?void 0:t.facet)||void 0===r?void 0:r.createDataCell(o);s&&(A.push(s),n=(null==e?void 0:e.showText)?o:n)}),{cells:A,cellsMeta:n}})(o,t);s=s||A,a=r.concat(e)}return(0,l.isEmpty)(r)||s||(s=null===(n=a[0])||void 0===n?void 0:n.getMeta()),{cells:a,viewMeta:s}},ar=(e,t,A)=>{var n;return(null===(n=e.options)||void 0===n?void 0:n.mergedCell)?e.options.mergedCell(e,t,A):new tr(e,t,A)},lr=(e,t)=>(0,l.differenceWith)(e,t,(e,t)=>(0,l.isEqual)(e.viewMeta.id,t.viewMeta.id));class ur extends ji{constructor(e){super(e),this.initMergedCellsGroup()}getMergedCellsGroup(){return this.mergedCellsGroup}initMergedCellsGroup(){this.mergedCellsGroup&&this.getElementById(dt)||(this.mergedCellsGroup=this.appendChild(new a.YJ({id:dt,style:{zIndex:3}})))}updateMergedCells(){this.initMergedCellsGroup(),((e,t)=>{var A;const n=null===(A=e.options)||void 0===A?void 0:A.mergedCellsInfo;if((0,l.isEmpty)(n))return;const i=e.facet.getDataCells();if((0,l.isEmpty)(i))return;const r=[];n.forEach(t=>{const A=sr(i,e,t);A.cells.length>0&&r.push(A)});const o=t.children,s=(e=>(0,l.map)(e,e=>({cells:e.cells,viewMeta:e.getMeta()})))(o),a=lr(s,r),u=lr(r,s);(0,l.forEach)(a,e=>{const t=(0,l.find)(o,t=>(0,l.isEqual)(t.getMeta().id,e.viewMeta.id));null==t||t.remove()}),(0,l.forEach)(u,({cells:A,viewMeta:n})=>{t.appendChild(ar(e,A,n))})})(this.s2,this.mergedCellsGroup)}addMergeCell(e){var t;null===(t=this.mergedCellsGroup)||void 0===t||t.appendChild(e),this.s2.emit(iA.MERGED_CELLS_RENDER,e),this.s2.emit(iA.LAYOUT_CELL_RENDER,e)}update(e){this.updateGrid(e),this.updateMergedCells()}}var cr;!function(e){e.ScrollChange="scroll-change",e.ScrollEnd="scroll-end"}(cr||(cr={}));class hr extends a.YJ{constructor(e){super(),this.eventHandlers=[],this.scrollFrameId=null,this.getCoordinatesName=()=>({from:this.isHorizontal?"x1":"y1",to:this.isHorizontal?"x2":"y2"}),this.getCoordinatesWithBBoxExtraPadding=()=>{const{lineCap:e="butt",size:t=0}=this.theme;return"butt"===e?{start:this.thumbOffset,end:this.thumbOffset+this.thumbLen}:{start:this.thumbOffset+(this.isHorizontal?0:t/2),end:this.thumbOffset+this.thumbLen-(this.isHorizontal?t:t/2)}},this.current=()=>this.thumbOffset/this.trackLen/(1-this.thumbLen/this.trackLen),this.updateThumbLen=e=>{if(this.thumbLen===e)return;this.thumbLen=e;const t=this.getCoordinatesName();this.thumbShape.attr(t.to,this.thumbOffset+e),this.emitScrollChange(this.thumbOffset/(this.trackLen-this.thumbLen)*this.scrollTargetMaxOffset,!1)},this.updateThumbOffset=(e,t=!0)=>{const A=this.validateRange(e);if(this.thumbOffset===A&&0!==A)return;this.thumbOffset=A;const{from:n,to:i}=this.getCoordinatesName(),{start:r,end:o}=this.getCoordinatesWithBBoxExtraPadding();this.thumbShape.attr({[n]:r,[i]:o}),t&&this.emitScrollChange(A/(this.trackLen-this.thumbLen)*this.scrollTargetMaxOffset,!1)},this.onlyUpdateThumbOffset=e=>{this.updateThumbOffset(e,!1)},this.emitScrollChange=(e,t=!0)=>{cancelAnimationFrame(this.scrollFrameId),this.scrollFrameId=requestAnimationFrame(()=>{this.dispatchEvent(new a.up(cr.ScrollChange,{offset:e,updateThumbOffset:t}))})},this.bindEventListener=(e,t,A)=>(null==e||e.addEventListener(t,A,!1),{remove:()=>{null==e||e.removeEventListener(t,A,!1)}}),this.addEvent=(e,t,A)=>{e.addEventListener(t,A),this.eventHandlers.push({target:e,type:t,handler:A})},this.initScrollBar=()=>{this.scrollBarGroup=this.createScrollBarGroup(),this.scrollBarGroup.setPosition(this.position.x,this.position.y),this.bindEvents()},this.createScrollBarGroup=()=>{const e=this.appendChild(new a.YJ({className:this.isHorizontal?"horizontalBar":"verticalBar"}));return this.trackShape=this.createTrackShape(e),this.thumbShape=this.createThumbShape(e),e},this.createTrackShape=e=>{const{lineCap:t="round",trackColor:A,size:n=0}=this.theme,i={lineWidth:n,stroke:A,lineCap:t};return e.appendChild(new a.N1(this.isHorizontal?{style:Object.assign(Object.assign({},i),{x1:0,y1:n/2,x2:this.trackLen,y2:n/2})}:{style:Object.assign(Object.assign({},i),{x1:n/2,y1:0,x2:n/2,y2:this.trackLen})}))},this.createThumbShape=e=>{const{size:t=0,lineCap:A="round",thumbColor:n}=this.theme,i={lineWidth:t,stroke:n,lineCap:A,cursor:"default"},{start:r,end:o}=this.getCoordinatesWithBBoxExtraPadding();return e.appendChild(new a.N1(this.isHorizontal?{style:Object.assign(Object.assign({},i),{x1:r,y1:t/2,x2:o,y2:t/2})}:{style:Object.assign(Object.assign({},i),{x1:t/2,y1:r,x2:t/2,y2:o})}))},this.bindEvents=()=>{this.addEventListener(nr.POINTER_DOWN,this.onStartEvent),this.addEventListener(nr.POINTER_UP,this.onPointerUp),this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener(nr.POINTER_OVER,this.onTrackPointerOver),this.thumbShape.addEventListener(nr.POINTER_OUT,this.onTrackPointerOut)},this.onStartEvent=e=>{e.preventDefault();const{clientX:t,clientY:A}=e;this.startPos=this.isHorizontal?t:A,this.bindLaterEvent()},this.bindLaterEvent=()=>{const e=this.ownerDocument.defaultView,t=document.body,A=[this.bindEventListener(t,nr.POINTER_MOVE,this.onPointerMove),this.bindEventListener(t,nr.POINTER_UP,this.onPointerUp),this.bindEventListener(t,nr.POINTER_LEAVE,this.onPointerUp)];this.addEvent(e,nr.POINTER_UP,this.onPointerUp),this.clearEvents=()=>{A.forEach(e=>{null==e||e.remove()}),(0,l.each)(this.eventHandlers,e=>{var t;null===(t=e.target)||void 0===t||t.removeEventListener(e.type,e.handler)}),this.eventHandlers.length=0}},this.onTrackClick=e=>{const t=this.validateRange(this.isHorizontal?e.x-this.position.x-this.thumbLen/2:e.y-this.position.y-this.thumbLen/2);this.updateThumbOffset(t)},this.onPointerMove=e=>{e.preventDefault();const t=this.isHorizontal?e.clientX:e.clientY,A=t-this.startPos;this.startPos=t,this.updateThumbOffset(this.thumbOffset+A)},this.onPointerUp=e=>{var t;this.dispatchEvent(new a.up(cr.ScrollEnd,{})),e.preventDefault(),null===(t=this.clearEvents)||void 0===t||t.call(this)},this.onTrackPointerOver=()=>{const{thumbHoverColor:e,hoverSize:t}=this.theme;this.thumbShape.attr("stroke",e),this.thumbShape.attr("lineWidth",t)},this.onTrackPointerOut=()=>{const{thumbColor:e,size:t}=this.theme;this.thumbShape.attr("stroke",e),this.thumbShape.attr("lineWidth",t)},this.validateRange=e=>{let t=e;return e+this.thumbLen>this.trackLen?t=this.trackLen-this.thumbLen:e+this.thumbLen<this.thumbLen&&(t=0),t};const{isHorizontal:t=!1,trackLen:A,thumbLen:n,position:i,thumbOffset:r=0,theme:o,scrollTargetMaxOffset:s}=e;this.isHorizontal=t,this.thumbOffset=r,this.trackLen=A,this.thumbLen=n,this.position=i,this.theme=o,this.scrollTargetMaxOffset=s,this.initScrollBar()}}const dr=(e,t,A)=>{const[n,i,r,o]=A;return e>=n&&e<=i&&t>=r&&t<=o},fr=e=>{const[t,A,n,i]=e,r=[];for(let e=t;e<=A;e+=1)for(let t=n;t<=i;t+=1)r.push([e,t]);return r};class gr extends zi{calculateBBox(){this.calculateOriginWidth(),this.calculateOriginalHeight();const{cornerBBox:e}=this.facet,t=yi(e.maxX),A=yi(e.maxY);this.x=t+Ei.getVerticalBorderWidth(this.spreadsheet),this.y=A+Ei.getHorizontalBorderWidth(this.spreadsheet),this.minX=this.x,this.minY=this.y,this.width=this.getPanelWidth(),this.height=this.getPanelHeight(),this.viewportHeight=Math.abs(yi(Math.min(this.height,this.originalHeight))),this.viewportWidth=Math.abs(yi(Math.min(this.width,this.originalWidth))),this.maxX=this.x+this.viewportWidth,this.maxY=this.y+this.viewportHeight}calculateOriginalHeight(){this.originalHeight=this.facet.getRealHeight()}calculateOriginWidth(){this.originalWidth=this.facet.getRealWidth()}getPanelWidth(){const{width:e}=this.spreadsheet.options;return Math.max(0,e-this.x)}getPanelHeight(){const{height:e}=this.spreadsheet.options;return Math.max(0,e-this.y)}}class pr{constructor(e){this.x=0,this.y=0,this.width=0,this.height=0,this.colIndex=-1,this.level=0,this.isLeaf=!1,this.children=[],this.padding=0,this.extra={},(0,l.assign)(this,e)}static getFieldPath(e,t){if(e&&!e.isTotals||e&&t){let t=e.parent;const A=[e.field];for(;t&&"root"!==t.id;)A.push(t.field),t=t.parent;return A.reverse()}return[]}static getAllLeaveNodes(e){const t=[];if(e.isLeaf)return[e];const A=[...e.children||[]];let n=A.shift();for(;n;)n.isLeaf?t.push(n):A.unshift(...n.children),n=A.shift();return t}static getAllChildrenNodes(e,t=e=>[e]){const A=[];if(e.isLeaf)return A.push(...t(e)),A;const n=[...e.children||[]];let i=n.shift();for(;i;)A.push(...t(i)),n.unshift(...i.children),i=n.shift();return A}static getBranchNodes(e){if(e&&!e.isTotals){let t=e.parent;const A=[e];for(;t&&"root"!==t.id;)A.push(t),t=t.parent;return A.reverse()}return[]}static blankNode(){return new pr({id:"",field:"",value:""})}static rootNode(){return new pr({id:"root",field:"",value:""})}getHeadLeafChild(){let e=this;for(;!(0,l.isEmpty)(null==e?void 0:e.children);)e=(0,l.head)(null==e?void 0:e.children);return e}getTotalHeightForTreeHierarchy(){return 0===this.height||(0,l.isEmpty)(this.children)?this.height:this.children.reduce((e,t)=>e+t.getTotalHeightForTreeHierarchy(),this.height)}isSeriesNumberNode(){return this.field===Se}clone(){return new pr(Object.assign({},this))}get isFrozen(){return this.isFrozenHead||this.isFrozenTrailing}}class vr extends a.YJ{constructor(e){super(),this.isHeaderCellInViewport=({cellPosition:e,cellSize:t,viewportPosition:A,viewportSize:n})=>e+t>=A&&A+n>=e,this.headerConfig=e,this.initGroups()}getHeaderConfig(){return this.headerConfig||{}}render(e){this.clearResizeAreaGroup(e),this.clear(),this.layout(),this.offset(),this.clip()}onScrollXY(e,t,A){this.headerConfig.scrollX===e&&this.headerConfig.scrollY===t||(this.headerConfig.scrollX=e,this.headerConfig.scrollY=t,this.render(A))}onRowScrollX(e,t){this.headerConfig.scrollX!==e&&(this.headerConfig.scrollX=e,this.render(t))}clearResizeAreaGroup(e){if(!e)return;const t=this.parentNode,A=null==t?void 0:t.getElementById(e);null==A||A.destroyChildren()}clear(){var e,t,A;null===(e=this.scrollGroup)||void 0===e||e.destroyChildren(),null===(t=this.frozenGroup)||void 0===t||t.destroyChildren(),null===(A=this.frozenTrailingGroup)||void 0===A||A.destroyChildren()}getNodes(){const{nodes:e}=this.getHeaderConfig();return e||[]}createOrUpdate(e,t){D.call(this,e,t)}}class mr extends vr{initGroups(){this.scrollGroup=this.appendChild(new a.YJ({name:"cornerScrollGroup",style:{zIndex:3}}))}getCellInstance(e){const t=this.getHeaderConfig(),{spreadsheet:A}=t,{cornerCell:n}=A.options;return(null==n?void 0:n(e,A,t))||new ir(e,A,t)}static getCornerHeader(e){const{panelBBox:t,cornerBBox:A,seriesNumberWidth:n,layoutResult:i,spreadsheet:r}=e,{width:o,height:s}=t,{originalWidth:a,originalHeight:l,width:u,height:c}=A,h=this.getCornerNodes({position:{x:A.x,y:A.y},width:a,height:l,layoutResult:i,seriesNumberWidth:n,spreadsheet:r});return new mr({nodes:h,position:{x:A.x,y:A.y},width:u,height:c,originalHeight:l,originalWidth:a,viewportWidth:o,viewportHeight:s,seriesNumberWidth:n,spreadsheet:r})}static getTreeCornerText(e){const{rows:t=[]}=e.dataSet.fields,{cornerText:A}=e.options;if(A)return A;const n=e.store.get("drillDownFieldInLevel",[]).map(e=>e.drillField);return t.filter(e=>!(0,l.includes)(n,e)).map(t=>e.dataSet.getFieldName(t)).join("/")||ht("指标")}static getCornerNodes(e){var t,A,n,i,r;const{position:o,width:s,layoutResult:a,seriesNumberWidth:l,spreadsheet:u}=e,{rowsHierarchy:c,colsHierarchy:h}=a,{rows:d=[],columns:f=[]}=(null===(t=null==u?void 0:u.dataSet)||void 0===t?void 0:t.fields)||{},{colCell:g}=u.options.style,p=[],v=null==h?void 0:h.sampleNodeForLastLevel;if(l){const e=new pr({id:"",field:"",value:u.getSeriesNumberText()});e.x=null==o?void 0:o.x,e.y=null!==(A=null==v?void 0:v.y)&&void 0!==A?A:0,e.width=l,e.height=null!==(n=null==v?void 0:v.height)&&void 0!==n?n:null==g?void 0:g.height,e.isPivotMode=!0,e.spreadsheet=u,e.cornerType=Ar.Series,p.push(e)}if(u.isHierarchyTreeType()){const e=this.getTreeCornerText(u),t=new pr({id:e,field:"",value:e});t.x=o.x+l,t.y=null!==(i=null==v?void 0:v.y)&&void 0!==i?i:0,t.width=s-l,t.height=null!==(r=null==v?void 0:v.height)&&void 0!==r?r:null==g?void 0:g.height,t.seriesNumberWidth=l,t.isPivotMode=!0,t.spreadsheet=u,t.cornerType=Ar.Row,p.push(t)}else{const e=c.sampleNodesForAllLevels||[],t=u.isCustomRowFields();e.forEach(e=>{var A,n,i;const r=t?e.field:d[e.level],o=u.dataSet.getFieldName(r),s=new pr({id:r,field:r,value:o});s.x=e.x+l,s.y=null!==(A=null==v?void 0:v.y)&&void 0!==A?A:0,s.width=e.width,s.height=null!==(n=null==v?void 0:v.height)&&void 0!==n?n:null===(i=u.facet)||void 0===i?void 0:i.getCellCustomSize(null,null==g?void 0:g.height),s.isPivotMode=!0,s.cornerType=Ar.Row,s.spreadsheet=u,p.push(s)})}const m=h.sampleNodesForAllLevels||[],C=u.isCustomColumnFields();return m.forEach(e=>{if(e.level<h.maxLevel){const t=C?e.field:f[e.level],A=u.dataSet.getFieldName(t),n=new pr({id:t,field:t,value:A});n.x=o.x,n.y=e.y,n.width=s,n.height=e.height,n.isPivotMode=!0,n.cornerType=Ar.Col,n.spreadsheet=u,p.push(n)}}),p}onCorScroll(e,t){this.headerConfig.scrollX!==e&&(this.headerConfig.scrollX=e,this.render(t))}layout(){var e,t;const{nodes:A,spreadsheet:n}=this.getHeaderConfig(),i=null===(e=n.options)||void 0===e?void 0:e.cornerHeader;if(i)return void i(this,n,this.headerConfig);const r=(null===(t=n.facet)||void 0===t?void 0:t.getColNodes())||[];A.forEach(e=>{var t;const A=null==r?void 0:r.find(t=>(null==e?void 0:e.y)===(null==t?void 0:t.y)&&(null==e?void 0:e.height)===(null==t?void 0:t.height));e.extra.isCustomHeight=null===(t=null==A?void 0:A.extra)||void 0===t?void 0:t.isCustomHeight;const i=this.getCellInstance(e);this.scrollGroup.appendChild(i),n.emit(iA.CORNER_CELL_RENDER,i),n.emit(iA.LAYOUT_CELL_RENDER,i)})}offset(){const{position:e,scrollX:t=0}=this.getHeaderConfig();Zt(this.scrollGroup,e.x-t,e.y)}clip(){const{width:e,height:t,position:A}=this.getHeaderConfig();this.createOrUpdate("scrollGroup.style.clipPath",{x:A.x,y:A.y,width:e,height:t})}}class Cr extends rr{constructor(){super(...arguments),this.cellIdPool=new Set}acquire(){const e=super.acquire();return e&&this.cellIdPool.delete(e.getMeta().id),e}release(e){if(e.getRenderer())return void e.destroy();const t=e.getMeta().id;this.cellIdPool.has(t)||(super.release(e),this.cellIdPool.add(t))}}const wr=(e,t,A)=>{const n=A.isHierarchyTreeType();return e.getNodes(0).map((e,i)=>{const r=`${i+1}`,o=new pr({id:r,field:"",rowIndex:i,value:r});return o.x=e.x,o.y=e.y,o.width=t,o.height=n?e.getTotalHeightForTreeHierarchy():e.height,o.isLeaf=!0,o.relatedNode=e,o.spreadsheet=A,o})},yr=e=>e.reduce((e,t)=>{let A=t.parent;for(;A&&"root"!==A.id;)e.find(e=>e.id===A.id)||e.push(A),A=A.parent;return e},[]),Br=(e,{y:t=0,height:A=0})=>{e.y<t&&(e.height-=t-e.y,e.y=t),e.y+e.height>t+A&&(e.height-=e.y+e.height-t-A)},Er=(e,{y:t=0,height:A=0})=>{e.y+e.height>t+A&&(e.height-=e.y+e.height-t-A),e.y<t&&(e.height-=t-e.y,e.y=t)},xr=(e,t=0,A=0)=>e.spreadsheet.isFrozenRowHeader()?0:A<=t?A:t,br=(e,t)=>{const A=e.frozenGroupAreas[Dt.TrailingCol],n=A.x+A.width;return t>n?0:n-t},Fr=(e,t,A)=>{const n=e.frozenGroupAreas[Dt.TrailingRow],i=n.y+n.height-A;return t>i?A:A+i-t},Sr=(e,t)=>{const A=e.spreadsheet.isFrozenRowHeader(),n=e.frozenGroupAreas,i=n[Dt.Col].width,r=n[Dt.TrailingCol].width;let o;o=A?t.x+i:i?Ei.getVerticalBorderWidth(e.spreadsheet)+i:0;const s=e.panelBBox.viewportWidth;return{x:o,width:(A?s:t.x+s)-i-r}};class Tr extends vr{constructor(){super(...arguments),this.rowCellPool=new Cr}initGroups(){this.scrollGroup=this.appendChild(new a.YJ({name:"rowScrollGroup",style:{zIndex:3}})),this.frozenGroup=this.appendChild(new a.YJ({name:"rowHeaderFrozenGroup",style:{zIndex:4}})),this.frozenTrailingGroup=this.appendChild(new a.YJ({name:"rowHeaderFrozenTrailingGroup",style:{zIndex:4}}));const{spreadsheet:e}=this.getHeaderConfig();this.extraFrozenNodes=(e=>{const t=[],{start:A,end:n}=e.getCellRange(),{rowCount:i,trailingRowCount:r}=e.getFrozenOptions();if(i){const n=e.getRowLeafNodesByRange(A,A+i-1);n.forEach(e=>{const A=e.clone();A.isFrozenHead=!0,t.push(A)}),yr(n).forEach(A=>{const n=A.clone();n.isFrozenHead=!0,Br(n,e.frozenGroupAreas[Dt.Row]),t.push(n)})}if(r){const A=e.getRowLeafNodesByRange(n-r+1,n);A.forEach(e=>{const A=e.clone();A.isFrozenTrailing=!0,t.push(A)}),yr(A).forEach(A=>{const n=A.clone();n.isFrozenTrailing=!0,Er(n,e.frozenGroupAreas[Dt.TrailingRow]),t.push(n)})}return t})(e.facet)}getCellInstance(e){var t;if(this.rowCellPool.pool.length>0&&(null===(t=this.headerConfig.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)){const t=this.rowCellPool.acquire();return t.reInitCell(e,this.headerConfig),t}const A=this.getHeaderConfig(),{spreadsheet:n}=A,{rowCell:i}=n.options;return(null==i?void 0:i(e,n,A))||new $i(e,n,A)}isCellInRect(e){const{width:t,viewportHeight:A,position:n,scrollY:i=0,scrollX:r=0,spreadsheet:o}=this.getHeaderConfig(),s=o.facet.frozenGroupAreas;return A+i-s[Dt.TrailingRow].height>e.y&&i+s[Dt.Row].height<e.y+e.height&&t+r-n.x>e.x&&r-n.x<e.x+e.width}getCellGroup(e){return e.isFrozenHead?this.frozenGroup:e.isFrozenTrailing?this.frozenTrailingGroup:this.scrollGroup}layout(){const{nodes:e}=this.getHeaderConfig(),t=e=>{var t;const A=this.getCellGroup(e);let n;(null===(t=e.belongsCell)||void 0===t?void 0:t.parentNode)===A&&e.belongsCell.getMeta()===e?(n=e.belongsCell,n.setHeaderConfig(this.headerConfig),n.updateTextPosition()):(n=this.getCellInstance(e),e.belongsCell=n,n.parentElement!==A&&(null==A||A.appendChild(n))),this.emitRenderEvent(n)};(0,l.each)(e,e=>{this.isCellInRect(e)&&0!==e.height&&t(e)}),(0,l.each)(this.extraFrozenNodes,e=>{0!==e.height&&t(e)})}emitRenderEvent(e){const{spreadsheet:t}=this.getHeaderConfig();t.emit(iA.ROW_CELL_RENDER,e),t.emit(iA.LAYOUT_CELL_RENDER,e)}offset(){const{scrollX:e=0,scrollY:t=0,position:A,spreadsheet:n,viewportHeight:i}=this.getHeaderConfig(),r=A.x-e,o=n.facet.getPaginationScrollY(),s=Fr(n.facet,i,o);Zt(this.scrollGroup,r,A.y-t),Zt(this.frozenGroup,r,A.y-o),Zt(this.frozenTrailingGroup,r,A.y-s)}clip(){const{width:e,viewportHeight:t,position:A,spreadsheet:n}=this.getHeaderConfig(),i=n.facet.frozenGroupAreas,r=i[Dt.Row].height,o=i[Dt.TrailingRow].height;this.createOrUpdate("scrollGroup.style.clipPath",{x:n.facet.cornerBBox.x,y:A.y+r,width:e,height:t-r-o}),this.createOrUpdate("frozenGroup.style.clipPath",{x:n.facet.cornerBBox.x,y:A.y,width:e,height:r}),this.createOrUpdate("frozenTrailingGroup.style.clipPath",{x:n.facet.cornerBBox.x,y:A.y+t-o,width:e,height:o})}clear(){var e;(null===(e=this.headerConfig.spreadsheet.options.future)||void 0===e?void 0:e.experimentalReuseCell)?this.scrollGroup.childNodes.forEach(e=>{this.isCellInRect(e.getMeta())||(e.getMeta().belongsCell=null,this.rowCellPool.release(e))}):super.clear()}}class Lr extends rr{constructor(){super(...arguments),this.cellIdPool=new Set}acquire(){const e=super.acquire();return e&&this.cellIdPool.delete(e.getMeta().id),e}release(e){if(e.getRenderer())return void e.destroy();const t=e.getMeta().id;this.cellIdPool.has(t)||(super.release(e),this.cellIdPool.add(t))}}class Qr extends vr{constructor(){super(...arguments),this.colCellPool=new Lr}initGroups(){this.scrollGroup=this.appendChild(new a.YJ({name:"colScrollGroup",style:{zIndex:3}})),this.frozenGroup=this.appendChild(new a.YJ({name:"colFrozenGroup",style:{zIndex:4}})),this.frozenTrailingGroup=this.appendChild(new a.YJ({name:"colFrozenTrailingGroup",style:{zIndex:4}})),this.extraFrozenNodes=(e=>{const t=[],{colCount:A,trailingColCount:n}=e.getFrozenOptions();if(A){const{x:n,width:i}=e.frozenGroupAreas[Dt.Col],r=e.getColLeafNodesByRange(0,A-1);r.forEach(e=>{const A=e.clone();A.isFrozenHead=!0,t.push(A)}),yr(r).forEach(e=>{const A=e.clone();A.isFrozenHead=!0,A.x<n&&(A.width-=n-A.x,A.x=n),A.x+A.width>n+i&&(A.width-=A.x+A.width-n-i),t.push(A)})}if(n){const{x:A,width:i}=e.frozenGroupAreas[Dt.TrailingCol],r=e.getColLeafNodes().length,o=e.getColLeafNodesByRange(r-n,r-1);o.forEach(e=>{const A=e.clone();A.isFrozenTrailing=!0,t.push(A)}),yr(o).forEach(e=>{const n=e.clone();n.isFrozenTrailing=!0,n.x+n.width>A+i&&(n.width-=n.x+n.width-A-i),n.x<A&&(n.width-=A-n.x,n.x=A),t.push(n)})}return t})(this.headerConfig.spreadsheet.facet)}getCellGroup(e){return e.isFrozenHead?this.frozenGroup:e.isFrozenTrailing?this.frozenTrailingGroup:this.scrollGroup}getCellInstance(e){var t;if(this.colCellPool.pool.length>0&&(null===(t=this.headerConfig.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)){const t=this.colCellPool.acquire();return t.reInitCell(e,this.getHeaderConfig()),t}const A=this.getHeaderConfig(),{spreadsheet:n}=this.getHeaderConfig(),{colCell:i}=n.options;return(null==i?void 0:i(e,n,A))||new Hi(e,n,A)}appendNode(e){var t;const{spreadsheet:A}=this.getHeaderConfig(),n=this.getCellGroup(e);let i;(null===(t=e.belongsCell)||void 0===t?void 0:t.parentNode)===n&&e.belongsCell.getMeta()===e?(i=e.belongsCell,i.setHeaderConfig(this.headerConfig)):(i=this.getCellInstance(e),e.belongsCell=i,i.parentElement!==n&&(null==n||n.appendChild(i))),A.emit(iA.COL_CELL_RENDER,i),A.emit(iA.LAYOUT_CELL_RENDER,i)}layout(){const{nodes:e}=this.getHeaderConfig();(0,l.each)(e,e=>{this.isColCellInRect(e)&&this.appendNode(e)}),(0,l.each)(this.extraFrozenNodes,e=>{this.appendNode(e)})}onColScroll(e,t){this.headerConfig.scrollX!==e&&(this.headerConfig.scrollX=e,this.render(t))}clip(){const{height:e,spreadsheet:t,position:A,viewportWidth:n,cornerWidth:i=0,scrollX:r=0}=this.getHeaderConfig(),o=t.facet,s=o.frozenGroupAreas,a=s[Dt.Col].width,l=s[Dt.TrailingCol].width,{x:u,width:c}=Sr(o,A);this.createOrUpdate("scrollGroup.style.clipPath",{x:u,y:A.y,width:c,height:e}),this.createOrUpdate("frozenGroup.style.clipPath",{x:A.x-xr(o,i,r),y:A.y,width:a,height:e}),this.createOrUpdate("frozenTrailingGroup.style.clipPath",{x:A.x+n-l,y:A.y,width:l,height:e})}isColCellInRect(e){const{spreadsheet:t,cornerWidth:A=0,viewportWidth:n,scrollX:i=0,position:r}=this.getHeaderConfig(),o=t.facet.frozenGroupAreas;let s;const a=o[Dt.Col].width,l=o[Dt.TrailingCol].width;return s=t.isFrozenRowHeader()?a:a?a-A:-r.x,n-l>=e.x-i&&s<=e.x+e.width-i}offset(){const{viewportWidth:e,scrollX:t=0,position:A,spreadsheet:n,cornerWidth:i}=this.getHeaderConfig();Zt(this.scrollGroup,A.x-t,A.y);const r=n.facet,o=xr(r,i,t),s=br(r,e);Zt(this.frozenGroup,A.x-o,A.y),Zt(this.frozenTrailingGroup,A.x-s,A.y)}clear(){var e;(null===(e=this.headerConfig.spreadsheet.options.future)||void 0===e?void 0:e.experimentalReuseCell)?this.scrollGroup.childNodes.forEach(e=>{this.isColCellInRect(e.getMeta())||(e.getMeta().belongsCell=null,this.colCellPool.release(e))}):super.clear()}clearResizeAreaGroup(e){var t;(null===(t=this.headerConfig.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)||super.clearResizeAreaGroup(e)}}class Ir extends $i{get cellType(){return o.ROW_CELL}getBorderPositions(){return[b.LEFT,b.BOTTOM]}initCell(){this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawBorders(),this.drawTextShape(),this.update()}getBackgroundColor(){const{backgroundColor:e,backgroundColorOpacity:t}=this.getCrossBackgroundColor(this.meta.rowIndex);return{backgroundColor:e,backgroundColorOpacity:t,intelligentReverseTextColor:!1}}getTextStyle(){var e;const t=this.getCellTextWordWrapStyle(o.SERIES_NUMBER_CELL),A=null===(e=this.getStyle())||void 0===e?void 0:e.seriesText;return Object.assign(Object.assign({},t),A)}getFormattedFieldValue(){var e;const{value:t,field:A}=this.meta,n=this.spreadsheet.dataSet.getFieldFormatter(A);return{value:t,formattedValue:null!==(e=null==n?void 0:n(t,void 0,this.meta))&&void 0!==e?e:t}}getMaxTextWidth(){const{width:e}=this.getBBoxByType(F.CONTENT_BOX);return e}isBolderText(){return!1}findFieldCondition(){}mappingValue(){}getIconPosition(){return{x:0,y:0}}}class Ur extends Tr{static getSeriesNumberHeader(e){var t,A;const{panelBBox:n,seriesNumberWidth:i,rowsHierarchy:r,spreadsheet:o,cornerWidth:s}=e,{height:a,viewportHeight:l}=n,u=null!==(A=null===(t=o.options)||void 0===t?void 0:t.layoutSeriesNumberNodes)&&void 0!==A?A:wr;return new Ur({width:s,height:a,viewportWidth:s,viewportHeight:l,position:{x:0,y:n.y},nodes:u(r,i,o),spreadsheet:o})}initGroups(){this.scrollGroup=this.appendChild(new a.YJ({name:"rowIndexScrollGroup",style:{zIndex:3}})),this.frozenGroup=this.appendChild(new a.YJ({name:"rowIndexFrozenGroup",style:{zIndex:4}})),this.frozenTrailingGroup=this.appendChild(new a.YJ({name:"rowIndexFrozenTrailingGroup",style:{zIndex:4}}));const{spreadsheet:e,nodes:t}=this.getHeaderConfig();this.extraFrozenNodes=((e,t)=>{const A=[],{start:n,end:i}=e.getCellRange(),{rowCount:r,trailingRowCount:o}=e.getFrozenOptions(),s=(e,t)=>{var A;const n=e.rowIndex;if((0,l.isNumber)(n)&&n>=t[0]&&n<=t[1])return!0;const i=null!==(A=e.children)&&void 0!==A?A:[];for(let e=0;e<i.length;e++)if(s(i[e],t))return!0;return!1};if(r){const i=[n,n+r-1];t.forEach(t=>{if(t.relatedNode&&!s(t.relatedNode,i))return;const n=t.clone();n.isFrozenHead=!0,Br(n,e.frozenGroupAreas[Dt.Row]),A.push(n)})}if(o){const n=[i-o+1,i];t.forEach(t=>{if(t.relatedNode&&!s(t.relatedNode,n))return;const i=t.clone();i.isFrozenTrailing=!0,Er(i,e.frozenGroupAreas[Dt.TrailingRow]),A.push(i)})}return A})(e.facet,t)}getCellInstance(e){const t=this.getHeaderConfig(),{spreadsheet:A}=t,{seriesNumberCell:n}=A.options;return(null==n?void 0:n(e,A,t))||new Ir(e,A,t)}emitRenderEvent(e){const{spreadsheet:t}=this.getHeaderConfig();t.emit(iA.SERIES_NUMBER_CELL_RENDER,e),t.emit(iA.LAYOUT_CELL_RENDER,e)}}var Or=A("./node_modules/.pnpm/@antv+event-emitter@0.1.3/node_modules/@antv/event-emitter/esm/index.js"),Hr=A("./node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js");const Mr=()=>{var e;return null!==(e=null===performance||void 0===performance?void 0:performance.now())&&void 0!==e?e:Date.now()},_r=e=>{var t;const A=e.nativeEvent;return(null===(t=null==A?void 0:A.touches)||void 0===t?void 0:t.length)>=2};class kr extends Or.A{constructor(e,t){super(),this.bindPointerDown=e=>{_r(e)||(window.cancelAnimationFrame(this.raf),this.panning=!0,this.preX=e.x,this.preY=e.y,this.speedX=0,this.speedY=0,this.lastMoveMS=Mr())},this.bindPointerMove=e=>{var t,A,n,i;if(_r(e))return this.panning=!1,void window.cancelAnimationFrame(this.raf);if(this.panning){const r=e.nativeEvent,o=Mr(),s=o-this.lastMoveMS,a=this.preX-e.x,l=this.preY-e.y;(null==r?void 0:r.cancelable)&&(null===(A=null===(t=this.shouldPreventDefault)||void 0===t?void 0:t.call(this,a,l,e.x,e.y))||void 0===A||A)&&(null===(i=(n=r).preventDefault)||void 0===i||i.call(n)),this.speedX=a/s,this.speedY=l/s,this.preX=e.x,this.preY=e.y,this.lastMoveMS=o,this.emit("wheel",Object.assign(Object.assign({},e.clone()),{x:e.x,y:e.y,deltaX:a,deltaY:l,nativeEvent:r}))}},this.bindPointerUp=e=>{this.panning=!1;const t=Mr();if(!this.speedX||!this.speedY||t-this.lastMoveMS>=100)return;const A=()=>{const n=Mr();this.raf=window.requestAnimationFrame(()=>{const i=Mr(),r=(i-t)/800;if(r<1){const t=(0,Hr.EY)(1-r),o=i-n;this.emit("wheel",Object.assign(Object.assign({},e.clone()),{x:e.x,y:e.y,deltaX:this.speedX*t*o,deltaY:this.speedY*t*o})),A()}})};A()},this.canvas=e,this.panning=!1,this.shouldPreventDefault=t,this.init()}init(){this.canvas.addEventListener(nr.POINTER_DOWN,this.bindPointerDown),this.canvas.addEventListener(nr.POINTER_MOVE,this.bindPointerMove),this.canvas.addEventListener(nr.POINTER_UP,this.bindPointerUp)}destroy(){this.canvas.removeEventListener(nr.POINTER_DOWN,this.bindPointerDown),this.canvas.removeEventListener(nr.POINTER_MOVE,this.bindPointerMove),this.canvas.removeEventListener(nr.POINTER_UP,this.bindPointerUp)}}class Rr{get scrollBarTheme(){return this.spreadsheet.theme.scrollBar}get scrollBarSize(){var e;return null===(e=this.scrollBarTheme)||void 0===e?void 0:e.size}constructor(e){this.scrollFrameId=null,this.getLayoutResult=()=>Object.assign(Object.assign({},this.layoutResult),{cornerNodes:this.getCornerNodes(),seriesNumberNodes:this.getSeriesNumberNodes()}),this.hideScrollBar=()=>{var e,t,A;null===(e=this.hRowScrollBar)||void 0===e||e.setAttribute("visibility","hidden"),null===(t=this.hScrollBar)||void 0===t||t.setAttribute("visibility","hidden"),null===(A=this.vScrollBar)||void 0===A||A.setAttribute("visibility","hidden")},this.delayHideScrollBar=(0,l.debounce)(this.hideScrollBar,1e3),this.delayHideScrollbarOnMobile=()=>{lt()&&this.delayHideScrollBar()},this.showVerticalScrollBar=()=>{var e;null===(e=this.vScrollBar)||void 0===e||e.setAttribute("visibility","visible")},this.showHorizontalScrollBar=()=>{var e,t;null===(e=this.hRowScrollBar)||void 0===e||e.setAttribute("visibility","visible"),null===(t=this.hScrollBar)||void 0===t||t.setAttribute("visibility","visible")},this.onContainerWheelForMobileCompatibility=()=>{const e=this.spreadsheet.getCanvasElement();let t,A;e.addEventListener("touchstart",e=>{t=e.touches[0].clientY,this.scrollDirection=void 0}),e.addEventListener("touchend",e=>{A=e.changedTouches[0].clientY,A<t?this.scrollDirection=C.SCROLL_UP:A>t&&(this.scrollDirection=C.SCROLL_DOWN)})},this.onContainerWheel=()=>{lt()?this.onContainerWheelForMobile():this.onContainerWheelForPc()},this.getMobileWheelDeltaY=e=>this.scrollDirection===C.SCROLL_UP?Math.max(0,e):this.scrollDirection===C.SCROLL_DOWN?Math.min(0,e):e,this.onContainerWheelForPc=()=>{const e=this.spreadsheet.getCanvasElement();null==e||e.addEventListener("wheel",this.onWheel)},this.onContainerWheelForMobile=()=>{this.mobileWheel=new kr(this.spreadsheet.container,(e,t,A,n)=>{const{interaction:i}=this.spreadsheet.options;return"auto"!==(null==i?void 0:i.overscrollBehavior)||this.isScrollOverTheViewport({deltaX:e,deltaY:t,offsetX:A,offsetY:n})}),this.mobileWheel.on("wheel",e=>{this.spreadsheet.hideTooltip();const t=e.originalEvent,{deltaX:A,deltaY:n,x:i,y:r,nativeEvent:o}=e,s=this.getMobileWheelDeltaY(n);this.onWheel(Object.assign(Object.assign({},t),{deltaX:A,deltaY:s,offsetX:i,offsetY:r,__nativeEvent__:o}))}),this.onContainerWheelForMobileCompatibility()},this.bindEvents=()=>{this.onContainerWheel(),this.emitPaginationEvent()},this.setScrollOffset=e=>{Object.keys(e||{}).forEach(t=>{const A=(0,l.get)(e,t);(0,l.isUndefined)(A)||this.spreadsheet.store.set(t,yi(A))})},this.getScrollOffset=()=>{const{store:e}=this.spreadsheet;return{scrollX:e.get("scrollX",0),scrollY:e.get("scrollY",0),rowHeaderScrollX:e.get("rowHeaderScrollX",0)}},this.resetScrollX=()=>{this.setScrollOffset({scrollX:0})},this.resetRowScrollX=()=>{this.setScrollOffset({rowHeaderScrollX:0})},this.resetScrollY=()=>{this.setScrollOffset({scrollY:0})},this.resetScrollOffset=()=>{this.setScrollOffset({scrollX:0,scrollY:0,rowHeaderScrollX:0})},this.emitPaginationEvent=()=>{const{pagination:e}=this.spreadsheet.options;if(e){const{current:t=1,pageSize:A}=e,n=this.viewCellHeights.getTotalLength(),i=yi((n-1)/A)+1;this.spreadsheet.emit(iA.LAYOUT_PAGINATION,{pageSize:A,pageCount:i,total:n,current:t})}},this.unbindEvents=()=>{var e;const t=this.spreadsheet.getCanvasElement();null==t||t.removeEventListener("wheel",this.onWheel),null===(e=this.mobileWheel)||void 0===e||e.destroy()},this.calculateCellWidthHeight=()=>{const{colLeafNodes:e}=this.layoutResult,t=(0,l.reduce)(e,(e,t)=>{const A=(0,l.last)(e)||0;return e.push(A+t.width),e},[0]);this.viewCellWidths=t,this.viewCellHeights=this.getViewCellHeights()},this.getRealScrollX=(e,t=0)=>this.spreadsheet.isFrozenRowHeader()?t:e,this.getRealWidth=()=>(0,l.last)(this.viewCellWidths)||0,this.getRealHeight=()=>{const{pagination:e}=this.spreadsheet.options,t=this.viewCellHeights;if(e){const{start:e,end:A}=this.getCellRange();return t.getCellOffsetY(A+1)-t.getCellOffsetY(e)}return t.getTotalHeight()},this.scrollWithAnimation=(e={},t=200,A)=>{var n,i,r,o;const{scrollX:s,scrollY:a,rowHeaderScrollX:l}=this.getAdjustedScrollOffset({scrollX:(null===(n=e.offsetX)||void 0===n?void 0:n.value)||0,scrollY:(null===(i=e.offsetY)||void 0===i?void 0:i.value)||0,rowHeaderScrollX:(null===(r=e.rowHeaderOffsetX)||void 0===r?void 0:r.value)||0});null===(o=this.timer)||void 0===o||o.stop();const u=this.getScrollOffset(),c=[null!=s?s:u.scrollX,null!=a?a:u.scrollY,null!=l?l:u.rowHeaderScrollX],h=(0,Zi.A)(Object.values(u),c);this.timer=(0,Ji.O1)(n=>{try{const i=Math.min(n/t,1),[r,o,s]=h(i);this.setScrollOffset({rowHeaderScrollX:s,scrollX:r,scrollY:o}),this.startScroll(null==e?void 0:e.skipScrollEvent),n>t&&(this.timer.stop(),null==A||A())}catch(e){console.error(e),this.timer.stop()}})},this.scrollImmediately=(e={})=>{var t,A,n;const{scrollX:i,scrollY:r,rowHeaderScrollX:o}=this.getAdjustedScrollOffset({scrollX:(null===(t=e.offsetX)||void 0===t?void 0:t.value)||0,scrollY:(null===(A=e.offsetY)||void 0===A?void 0:A.value)||0,rowHeaderScrollX:(null===(n=e.rowHeaderOffsetX)||void 0===n?void 0:n.value)||0});this.setScrollOffset({scrollX:i,scrollY:r,rowHeaderScrollX:o}),this.startScroll(null==e?void 0:e.skipScrollEvent)},this.startScroll=(e=!1)=>{var t,A,n;const{rowHeaderScrollX:i,scrollX:r,scrollY:o}=this.getScrollOffset();null===(t=this.hRowScrollBar)||void 0===t||t.onlyUpdateThumbOffset(this.getScrollBarOffset(i,this.hRowScrollBar)),null===(A=this.hScrollBar)||void 0===A||A.onlyUpdateThumbOffset(this.getScrollBarOffset(r,this.hScrollBar)),null===(n=this.vScrollBar)||void 0===n||n.onlyUpdateThumbOffset(this.getScrollBarOffset(o,this.vScrollBar)),this.dynamicRenderCell(e)},this.getRendererHeight=()=>{const{start:e,end:t}=this.getCellRange();return this.viewCellHeights.getCellOffsetY(t+1)-this.viewCellHeights.getCellOffsetY(e)},this.getAdjustedScrollOffset=({scrollX:e,scrollY:t,rowHeaderScrollX:A})=>({scrollX:Ki(e,this.layoutResult.colsHierarchy.width,this.panelBBox.width),scrollY:Ki(t,this.getRendererHeight(),this.panelBBox.height),rowHeaderScrollX:Gi(A,this.cornerBBox)}),this.getScrollBarOffset=(e,t)=>{const{trackLen:A,thumbLen:n,scrollTargetMaxOffset:i}=t;return e*(A-n)/i},this.isScrollOverThePanelArea=({offsetX:e,offsetY:t})=>e>this.panelBBox.minX&&e<this.panelBBox.maxX&&t>this.panelBBox.minY&&t<this.panelBBox.maxY,this.isScrollOverTheCornerArea=({offsetX:e,offsetY:t})=>e>this.cornerBBox.minX&&e<this.cornerBBox.maxX&&t>this.cornerBBox.minY&&t<this.cornerBBox.maxY+this.panelBBox.height,this.updateHorizontalRowScrollOffset=({offset:e,offsetX:t,offsetY:A})=>{var n;this.isScrollOverTheCornerArea({offsetX:t,offsetY:A})&&(null===(n=this.hRowScrollBar)||void 0===n||n.emitScrollChange(e))},this.updateHorizontalScrollOffset=({offset:e,offsetX:t,offsetY:A})=>{var n;this.hRowScrollBar&&!this.isScrollOverThePanelArea({offsetX:t,offsetY:A})||null===(n=this.hScrollBar)||void 0===n||n.emitScrollChange(e)},this.isScrollToLeft=({deltaX:e,offsetX:t,offsetY:A})=>{if(!this.hScrollBar&&!this.hRowScrollBar)return!0;const n=!this.hRowScrollBar||this.isScrollOverThePanelArea({offsetY:A,offsetX:t})||this.hRowScrollBar.thumbOffset<=0;return e<=0&&(!this.hScrollBar||this.hScrollBar.thumbOffset<=0)&&n},this.isScrollToRight=({deltaX:e,offsetX:t,offsetY:A})=>{var n,i,r,o,s,a;if(!this.hScrollBar&&!this.hRowScrollBar)return!0;const l=this.spreadsheet.isFrozenRowHeader()?null===(n=this.panelBBox)||void 0===n?void 0:n.width:null===(i=this.panelBBox)||void 0===i?void 0:i.maxX,u=!this.hRowScrollBar||this.isScrollOverThePanelArea({offsetY:A,offsetX:t})||(null===(r=this.hRowScrollBar)||void 0===r?void 0:r.thumbOffset)+(null===(o=this.hRowScrollBar)||void 0===o?void 0:o.thumbLen)>=this.cornerBBox.width,c=this.hRowScrollBar&&this.isScrollOverTheCornerArea({offsetX:t,offsetY:A})||(null===(s=this.hScrollBar)||void 0===s?void 0:s.thumbOffset)+(null===(a=this.hScrollBar)||void 0===a?void 0:a.thumbLen)>=l;return e>=0&&c&&u},this.isScrollToTop=e=>{var t;return!this.vScrollBar||e<=0&&(null===(t=this.vScrollBar)||void 0===t?void 0:t.thumbOffset)<=0},this.isScrollToBottom=e=>{var t,A,n;return!this.vScrollBar||e>=0&&(null===(t=this.vScrollBar)||void 0===t?void 0:t.thumbOffset)+(null===(A=this.vScrollBar)||void 0===A?void 0:A.thumbLen)>=(null===(n=this.panelBBox)||void 0===n?void 0:n.height)},this.isVerticalScrollOverTheViewport=e=>!this.isScrollToTop(e)&&!this.isScrollToBottom(e),this.isHorizontalScrollOverTheViewport=e=>!this.isScrollToLeft(e)&&!this.isScrollToRight(e),this.isScrollOverTheViewport=e=>{const{deltaY:t,deltaX:A,offsetY:n}=e;return!(n<=this.cornerBBox.maxY)&&(0!==t?this.isVerticalScrollOverTheViewport(t):0!==A&&this.isHorizontalScrollOverTheViewport(e))},this.cancelScrollFrame=()=>!(lt()&&this.scrollFrameId||(cancelAnimationFrame(this.scrollFrameId),0)),this.clearScrollFrameIdOnMobile=()=>{lt()&&(this.scrollFrameId=null)},this.stopScrollChainingIfNeeded=e=>{const{interaction:t}=this.spreadsheet.options;"auto"!==(null==t?void 0:t.overscrollBehavior)&&(this.cancelScrollFrame(),this.stopScrollChaining(e))},this.stopScrollChaining=e=>{var t,A;const n=(null==e?void 0:e.__nativeEvent__)||(null==e?void 0:e.nativeEvent);(null==n?void 0:n.cancelable)&&(null===(t=null==n?void 0:n.preventDefault)||void 0===t||t.call(n)),(null==e?void 0:e.cancelable)&&(null===(A=null==e?void 0:e.preventDefault)||void 0===A||A.call(e))},this.onWheel=e=>{const{interaction:t}=this.spreadsheet.options;let{deltaX:A,deltaY:n,offsetX:i,offsetY:r}=e;const{scrollX:o,rowHeaderScrollX:s}=this.getScrollOffset(),{shiftKey:a}=e;a&&ut()&&(i=i-A+n,A=n,r-=n,n=0);const[l,u]=((e,t,A)=>{const n=Math.abs(e/t);return[(n<=.5?0:e)*A.horizontal,(n>2?0:t)*A.vertical]})(A,n,null==t?void 0:t.scrollSpeedRatio);if(this.spreadsheet.hideTooltip(),this.spreadsheet.interaction.clearHoverTimer(),this.isScrollOverTheViewport({deltaX:l,deltaY:u,offsetX:i,offsetY:r})){if(this.stopScrollChaining(e),this.spreadsheet.interaction.addIntercepts([p.HOVER]),this.cancelScrollFrame()){if(0!==l&&void 0!==this.scrollDirection&&this.scrollDirection!==(l>0?C.SCROLL_LEFT:C.SCROLL_RIGHT))return this.scrollDirection=l>0?C.SCROLL_LEFT:C.SCROLL_RIGHT,this.updateHorizontalRowScrollOffset({offsetX:i,offsetY:r,offset:s}),void this.updateHorizontalScrollOffset({offsetX:i,offsetY:r,offset:o});this.scrollDirection=A>0?C.SCROLL_LEFT:C.SCROLL_RIGHT,this.scrollFrameId=requestAnimationFrame(()=>{var e;const{scrollX:t,scrollY:A,rowHeaderScrollX:n}=this.getScrollOffset();0!==l&&(this.showHorizontalScrollBar(),this.updateHorizontalRowScrollOffset({offsetX:i,offsetY:r,offset:l+n}),this.updateHorizontalScrollOffset({offsetX:i,offsetY:r,offset:l+t})),0!==u&&(this.showVerticalScrollBar(),null===(e=this.vScrollBar)||void 0===e||e.emitScrollChange(u+A)),this.delayHideScrollbarOnMobile(),this.clearScrollFrameIdOnMobile()})}}else this.stopScrollChainingIfNeeded(e)},this.realDataCellRender=(e,t)=>{const A=this.calculateXYIndexes(e,t);P.getInstance().logger("realDataCellRender:",this.preCellIndexes,A);const{add:n,remove:i}=((e,t)=>{const A=[],n=[];return Object.keys(t||{}).forEach(i=>{const{add:r,remove:o}=((e,t)=>{const A=[],n=[];if((0,l.isEmpty)(e))return(0,l.isEmpty)(t)?{add:A,remove:n}:{add:fr(t),remove:n};if((0,l.isEmpty)(t))return{add:A,remove:fr(e)};const[i,r,o,s]=e,[a,u,c,h]=t;for(let e=i;e<=r;e++)for(let A=o;A<=s;A++)dr(e,A,t)||n.push([e,A]);for(let t=a;t<=u;t+=1)for(let n=c;n<=h;n+=1)dr(t,n,e)||A.push([t,n]);return{add:A,remove:n}})((null==e?void 0:e[i])||[],t[i]);A.push(...r),n.push(...o)}),{add:A,remove:n}})(this.preCellIndexes,A);P.getInstance().debugCallback("Data Cell Render",()=>{var e;if(null===(e=this.spreadsheet.options.future)||void 0===e?void 0:e.experimentalReuseCell){const e=this.getDataCells(),t=Math.max(i.length,n.length);for(let A=0;A<t;A++){if(A<i.length){const[t,n]=i[A],r=(0,l.find)(e,e=>e.name===`${n}-${t}`);r&&this.dataCellPool.release(r)}if(A<n.length){const[e,t]=n[A],i=this.getCellMeta(t,e),r=this.createDataCell(i);r&&this.addDataCell(r)}}P.getInstance().logger(`Render Cell Panel: ${null==e?void 0:e.length}, Add: ${null==n?void 0:n.length}, Remove: ${null==i?void 0:i.length}`)}else{(0,l.each)(n,([e,t])=>{const A=this.getCellMeta(t,e),n=this.createDataCell(A);n&&this.addDataCell(n)});const e=this.getDataCells();(0,l.each)(i,([t,A])=>{const n=(0,l.find)(e,e=>e.name===`${A}-${t}`);null==n||n.destroy()}),P.getInstance().logger(`Render Cell Panel: ${null==e?void 0:e.length}, Add: ${null==n?void 0:n.length}, Remove: ${null==i?void 0:i.length}`)}}),this.preCellIndexes=A,this.spreadsheet.emit(iA.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,{add:n,remove:i,spreadsheet:this.spreadsheet})},this.getGridInfo=()=>{const[e,t,A,n]=this.preCellIndexes.center;return{cols:Yi(e,t,this.layoutResult.colLeafNodes),rows:qi(A,n,this.viewCellHeights)}},this.onAfterScroll=(0,l.debounce)(()=>{const{interaction:e,container:t}=this.spreadsheet;if(!e.isSelectedState()&&(e.removeIntercepts([p.HOVER]),e.getHoverAfterScroll())){const A=e.eventController.canvasMousemoveEvent;if(A){const{x:e,y:n}=A,i=t.document.elementFromPointSync(e,n);i&&t.emit(nr.POINTER_MOVE,Object.assign(Object.assign({},A),{shape:i,target:i,timestamp:performance.now()}))}}},300),this.getCellChildrenNodes=e=>{var t;const A=null===(t=null==e?void 0:e.getMeta)||void 0===t?void 0:t.call(e),n=(null==e?void 0:e.cellType)===o.ROW_CELL;return this.spreadsheet.isHierarchyTreeType()&&n?pr.getAllLeaveNodes(A).filter(e=>e.rowIndex===A.rowIndex):pr.getAllChildrenNodes(A)},this.spreadsheet=e,this.init()}shouldRender(){return!((0,l.isEmpty)((e=this.spreadsheet.dataCfg.fields).rows)&&(0,l.isEmpty)(e.columns)&&(0,l.isEmpty)(e.values));var e}initTextWrapTemp(){var e;const t=[{},this.spreadsheet,{shallowRender:!0}];this.textWrapTempRowCell=this.getRowCellInstance(...t),this.textWrapTempColCell=this.getColCellInstance(...t),this.textWrapTempCornerCell=null===(e=this.getCornerCellInstance)||void 0===e?void 0:e.call(this,...t),this.textWrapNodeHeightCache=(0,M.A)(500),this.customRowHeightStatusMap={}}initGroups(){this.initBackgroundGroup(),this.initPanelGroups(),this.initForegroundGroup()}initForegroundGroup(){this.foregroundGroup=this.spreadsheet.container.appendChild(new a.YJ({name:"foreGroundGroup",style:{zIndex:3}}))}initBackgroundGroup(){this.backgroundGroup=this.spreadsheet.container.appendChild(new a.YJ({name:"backGroundGroup",style:{zIndex:0}}))}initPanelGroups(){this.panelGroup=this.spreadsheet.container.appendChild(new a.YJ({name:"panelGroup",style:{zIndex:1}})),this.panelScrollGroup=new ur({name:"panelScrollGroup",zIndex:1,s2:this.spreadsheet}),this.panelGroup.appendChild(this.panelScrollGroup)}getCellCustomSize(e,t){return(0,l.isFunction)(t)?t(e):t}getRowCellDraggedWidth(e){var t,A,n;const{rowCell:i}=this.spreadsheet.options.style;return null!==(A=null===(t=null==i?void 0:i.widthByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==A?A:null===(n=null==i?void 0:i.widthByField)||void 0===n?void 0:n[null==e?void 0:e.field]}getRowCellDraggedHeight(e){var t,A,n;const{rowCell:i}=this.spreadsheet.options.style;return null!==(A=null===(t=null==i?void 0:i.heightByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==A?A:null===(n=null==i?void 0:i.heightByField)||void 0===n?void 0:n[null==e?void 0:e.field]}isCustomRowCellHeight(e){var t;const{dataCell:A}=this.spreadsheet.options.style,n=null===(t=Ri.dataCell)||void 0===t?void 0:t.height;return(0,l.isNumber)(this.getCustomRowCellHeight(e))||(null==A?void 0:A.height)!==n}getCustomRowCellHeight(e){var t;const{rowCell:A}=this.spreadsheet.options.style;return null!==(t=this.getRowCellDraggedHeight(e))&&void 0!==t?t:this.getCellCustomSize(e,null==A?void 0:A.height)}getRowCellHeight(e){var t;const{dataCell:A}=this.spreadsheet.options.style;return null!==(t=this.getCustomRowCellHeight(e))&&void 0!==t?t:null==A?void 0:A.height}getColCellDraggedWidth(e){var t,A,n,i,r,o;const{colCell:s}=this.spreadsheet.options.style;return null!==(i=null!==(A=null===(t=null==s?void 0:s.widthByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==A?A:null===(n=null==s?void 0:s.widthByField)||void 0===n?void 0:n[null==e?void 0:e.field])&&void 0!==i?i:null===(r=null==s?void 0:s.widthByField)||void 0===r?void 0:r[null===(o=null==e?void 0:e.query)||void 0===o?void 0:o[Be]]}getColCellDraggedHeight(e){var t,A,n,i,r,o;const{colCell:s}=this.spreadsheet.options.style;return null!==(i=null!==(A=null===(t=null==s?void 0:s.heightByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==A?A:null===(n=null==s?void 0:s.heightByField)||void 0===n?void 0:n[null==e?void 0:e.field])&&void 0!==i?i:null===(r=null==s?void 0:s.heightByField)||void 0===r?void 0:r[null===(o=null==e?void 0:e.query)||void 0===o?void 0:o[Be]]}getColNodeHeight(e){var t,A,n;const{colNode:i,colsHierarchy:r,useCache:o=!0,cornerNodes:s=[]}=e;if(!i)return 0;const{colCell:a,cornerCell:u}=this.spreadsheet.options.style,c=null!==(t=this.getColCellDraggedHeight(i))&&void 0!==t?t:this.getCellCustomSize(i,null==a?void 0:a.height);if((0,l.isNumber)(c)&&c!==(null===(A=Ri.colCell)||void 0===A?void 0:A.height))return i.extra.isCustomHeight=!0,c;const h=(null==a?void 0:a.maxLines)>1&&(null==a?void 0:a.wordWrap)||this.spreadsheet.theme.colCell.text.fontSize>12||this.spreadsheet.theme.colCell.bolderText.fontSize>12,d=(null==u?void 0:u.maxLines)>1&&(null==u?void 0:u.wordWrap)||this.spreadsheet.theme.cornerCell.text.fontSize>12||this.spreadsheet.theme.cornerCell.bolderText.fontSize>12,f=this.getDefaultColNodeHeight(i,r);let g=f,p=f;if(h&&(g=this.getNodeAdaptiveHeight({meta:i,cell:this.textWrapTempColCell,defaultHeight:f,useCache:o})),d){const e=s.filter(e=>i.isLeaf?e.cornerType===Ar.Row:e.field===i.field);(0,l.isEmpty)(e)||(p=null!==(n=(0,l.max)(e.map(e=>this.getNodeAdaptiveHeight({meta:e,cell:this.textWrapTempCornerCell,defaultHeight:f,useCache:!1}))))&&void 0!==n?n:f)}return Bi(Math.max(p,g,f))}getDefaultColNodeHeight(e,t){var A,n,i,r;if(!e)return 0;const{colCell:o}=this.spreadsheet.options.style,s=(null===(n=null===(A=null==t?void 0:t.sampleNodesForAllLevels)||void 0===A?void 0:A.find(t=>t.level===e.level))||void 0===n?void 0:n.height)||0,a=null!==(r=null!==(i=this.getColCellDraggedHeight(e))&&void 0!==i?i:this.getCellCustomSize(e,null==o?void 0:o.height))&&void 0!==r?r:0;return Bi(Math.max(a,s))}getNodeAdaptiveHeight(e){var t,A;const{meta:n,cell:i,defaultHeight:r=0,useCache:s=!0}=e;if(!n||!i)return r;i.setMeta(Object.assign(Object.assign({},n),{shallowRender:!0}));const a=String(i.getFieldValue());if(!a)return r;const u=Math.ceil(i.getMaxTextWidth());if(u<=0&&i.cellType===o.COL_CELL)return r;const c=`${a}[&]${u}`,h=this.textWrapNodeHeightCache.get(c);if(s&&(0,l.isNumber)(h))return h||r;null===(A=(t=i).generateIconConfig)||void 0===A||A.call(t),i.drawTextShape();const{padding:d}=i.getStyle().cell,f=i.getActualTextHeight(),g=f+d.top+d.bottom,p=f>1.5*i.getTextLineHeight()||f>=r?Math.max(g,r):r;return this.textWrapNodeHeightCache.set(c,p),p}calculateColParentNodeWidthAndX(e){var t;let A=null,n=0;const i=e.slice(0);for(;n<i.length;){const e=i[n++],r=null==e?void 0:e.parent;if(A!==r&&r){i.push(r);const e=null===(t=r.children)||void 0===t?void 0:t.find(e=>e.width),n=(null==e?void 0:e.x)||0,o=(0,l.sumBy)(r.children,"width");r.x=n,r.width=o,A=r}}}updateColsHierarchySampleMaxHeightNodes(e,t){var A;const n=(0,l.isEmpty)(e.sampleNodesForAllLevels),i=(n?e.allNodesWithoutRoot:e.sampleNodesForAllLevels).map(t=>(0,l.maxBy)(e.getNodes(t.level).filter(e=>!e.isTotals||n),t=>this.getColNodeHeight({colNode:t,colsHierarchy:e})));n&&(e.sampleNodeForLastLevel=null!==(A=i[0])&&void 0!==A?A:null,e.maxLevel=0),e.sampleNodesForAllLevels=(0,l.compact)(i);const r=t?mr.getCornerNodes({position:{x:0,y:0},width:t.width,height:e.height,layoutResult:{rowsHierarchy:t,colsHierarchy:e},seriesNumberWidth:this.getSeriesNumberWidth(),spreadsheet:this.spreadsheet}):[];e.sampleNodesForAllLevels.forEach(t=>{var A;if(t.height=this.getColNodeHeight({colNode:t,colsHierarchy:e,cornerNodes:r}),0===t.level)t.y=0;else{const n=null!==(A=e.sampleNodesForAllLevels[t.level-1])&&void 0!==A?A:{y:0,height:0};t.y=n.y+n.height}e.height+=t.height}),e.rootNode.height=e.height}render(){this.shouldRender()&&(this.adjustScrollOffset(),this.renderHeaders(),this.renderScrollBars(),this.renderBackground(),this.dynamicRenderCell(!0))}adjustScrollOffset(){const e=this.getAdjustedScrollOffset(this.getScrollOffset());this.setScrollOffset(e)}getSeriesNumberWidth(){var e,t;const{seriesNumber:A}=this.spreadsheet.options;return Bi((null==A?void 0:A.enable)&&null!==(t=null===(e=this.spreadsheet.theme.rowCell)||void 0===e?void 0:e.seriesNumberWidth)&&void 0!==t?t:0)}getCanvasSize(){const{width:e=0,height:t=0}=this.spreadsheet.options;return{width:e,height:t}}updateScrollOffset(e){var t,A,n;(null===(t=e.rowHeaderOffsetX)||void 0===t?void 0:t.animate)||(null===(A=e.offsetX)||void 0===A?void 0:A.animate)||(null===(n=e.offsetY)||void 0===n?void 0:n.animate)?this.scrollWithAnimation(e):this.scrollImmediately(e)}getPaginationScrollY(){const{pagination:e}=this.spreadsheet.options;if(e){const{current:t=1,pageSize:A}=e,n=this.viewCellHeights,i=Math.max((t-1)*A,0);return n.getCellOffsetY(i)}return 0}destroy(){this.unbindEvents(),this.clearAllGroup(),this.preCellIndexes=null,this.customRowHeightStatusMap={},this.textWrapNodeHeightCache.clear(!1),cancelAnimationFrame(this.scrollFrameId)}calculateCornerBBox(){this.cornerBBox=new Wi(this,!0)}calculatePanelBBox(){this.panelBBox=new gr(this,!0)}getCellRange(){const{pagination:e}=this.spreadsheet.options;return((e,t)=>{const A=this.viewCellHeights;let n=0,i=A.getTotalLength()-1;if(t){const{current:e=1,pageSize:r}=t;n=Math.max((e-1)*r,0),i=Math.min(e*r-1,A.getTotalLength()-1)}return{start:n,end:i}})(0,e)}clearAllGroup(){this.panelGroup.remove(),this.foregroundGroup.remove(),this.backgroundGroup.remove()}renderRowScrollBar(e){if(this.spreadsheet.isFrozenRowHeader()&&this.cornerBBox.width<this.cornerBBox.originalWidth){const t=this.cornerBBox.originalWidth-this.cornerBBox.width,{maxY:A}=this.getScrollbarPosition(),{splitLine:n,scrollBar:i}=this.spreadsheet.theme,r=Math.max(this.cornerBBox.width*this.cornerBBox.width/this.cornerBBox.originalWidth,null==i?void 0:i.thumbHorizontalMinSize);this.hRowScrollBar=new hr({isHorizontal:!0,trackLen:this.cornerBBox.width,thumbLen:r-(null==n?void 0:n.verticalBorderWidth),position:{x:this.cornerBBox.minX+this.scrollBarSize/2,y:A},thumbOffset:e*(this.cornerBBox.width-r)/t,theme:this.scrollBarTheme,scrollTargetMaxOffset:t}),this.hRowScrollBar.addEventListener(cr.ScrollChange,({offset:e})=>{var A,n;const i=yi(this.getValidScrollBarOffset(e,t));this.setScrollOffset({rowHeaderScrollX:i}),null===(A=this.rowHeader)||void 0===A||A.onRowScrollX(i,gt),null===(n=this.seriesNumberHeader)||void 0===n||n.onRowScrollX(i,ft),this.cornerHeader.onRowScrollX(i,vt);const r=this.getScrollBarOffset(i,this.hRowScrollBar),{scrollX:o,scrollY:s}=this.getScrollOffset(),a={scrollX:o,scrollY:s,rowHeaderScrollX:r};this.hRowScrollBar.updateThumbOffset(r,!1),this.spreadsheet.emit(iA.ROW_CELL_SCROLL,a),this.spreadsheet.emit(iA.GLOBAL_SCROLL,a)}),this.foregroundGroup.appendChild(this.hRowScrollBar)}}getValidScrollBarOffset(e,t){return(0,l.clamp)(e,0,t)}renderHScrollBar(e,t,A){if(yi(e)<yi(t)){const n=this.scrollBarSize/2,{maxY:i}=this.getScrollbarPosition(),r=!this.spreadsheet.isFrozenRowHeader(),o=e+(r?Math.min(this.cornerBBox.width,this.getCanvasSize().width):0),s={x:this.panelBBox.minX+(r?-this.cornerBBox.width+n:n),y:i},a=t+(r?this.cornerBBox.width:0),{scrollBar:l}=this.spreadsheet.theme,u=a-o,c=Math.max(o/a*o,null==l?void 0:l.thumbHorizontalMinSize);this.hScrollBar=new hr({isHorizontal:!0,trackLen:o,thumbLen:c,position:s,thumbOffset:A*(o-c)/u,theme:this.scrollBarTheme,scrollTargetMaxOffset:u}),this.hScrollBar.addEventListener(cr.ScrollChange,({offset:e,updateThumbOffset:t})=>{const A=this.getValidScrollBarOffset(e,u);t&&this.hScrollBar.updateThumbOffset(this.getScrollBarOffset(A,this.hScrollBar),!1),this.setScrollOffset({scrollX:A}),this.dynamicRenderCell()}),this.foregroundGroup.appendChild(this.hScrollBar)}}getScrollbarPosition(){const{maxX:e,maxY:t}=this.panelBBox,{width:A,height:n}=this.getCanvasSize(),i=this.spreadsheet.options.interaction.scrollbarPosition===m.CONTENT;return{maxX:(i?e:A)-this.scrollBarSize,maxY:(i?t:n)-this.scrollBarSize}}renderVScrollBar(e,t,A){if(e<t){const{scrollBar:n}=this.spreadsheet.theme,i=Math.max(e/t*e,null==n?void 0:n.thumbVerticalMinSize),r=t-e,{maxX:o}=this.getScrollbarPosition();this.vScrollBar=new hr({isHorizontal:!1,trackLen:e,thumbLen:i,thumbOffset:A*(e-i)/r,position:{x:o,y:this.panelBBox.minY},theme:this.scrollBarTheme,scrollTargetMaxOffset:r}),this.vScrollBar.addEventListener(cr.ScrollChange,({offset:e,updateThumbOffset:t})=>{const A=this.getValidScrollBarOffset(e,r);t&&this.vScrollBar.updateThumbOffset(this.getScrollBarOffset(A,this.vScrollBar),!1),this.setScrollOffset({scrollY:A}),this.dynamicRenderCell()}),this.foregroundGroup.appendChild(this.vScrollBar)}}translateRelatedGroups(e,t,A){var n,i,r,o,s,a;Zt(this.panelScrollGroup,this.panelBBox.x-e,this.panelBBox.y-t),null===(n=this.rowHeader)||void 0===n||n.onScrollXY(this.getRealScrollX(e,A),t,gt),null===(i=this.seriesNumberHeader)||void 0===i||i.onScrollXY(this.getRealScrollX(e,A),t,ft),null===(r=this.cornerHeader)||void 0===r||r.onCorScroll(this.getRealScrollX(e,A),vt),null===(o=this.centerFrame)||void 0===o||o.onChangeShadowVisibility(e,this.getRealWidth()-this.panelBBox.width),null===(s=this.centerFrame)||void 0===s||s.onBorderScroll(this.getCenterFrameScrollX(e)),null===(a=this.columnHeader)||void 0===a||a.onColScroll(e,pt)}getCenterFrameScrollX(e){return this.getRealScrollX(e)}createDataCell(e){var t,A,n;if(!e)return;let i;if(this.dataCellPool.pool.length>0&&(null===(t=this.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)?(i=this.dataCellPool.acquire(),i.setMeta(e)):i=null===(n=(A=this.spreadsheet.options).dataCell)||void 0===n?void 0:n.call(A,e,this.spreadsheet),!i)return;const{rowIndex:r,colIndex:o}=e;return i.position=[r,o],i.name=`${r}-${o}`,i}init(){this.initCellPool(),this.initTextWrapTemp(),this.initGroups(),P.getInstance().debugCallback("Header Layout",()=>{this.layoutResult=this.doLayout(),this.saveInitColumnLeafNodes(this.layoutResult.colLeafNodes),this.spreadsheet.emit(iA.LAYOUT_AFTER_HEADER_LAYOUT,this.layoutResult)}),this.calculateCellWidthHeight(),this.calculateRowOffsets(),this.calculateCornerBBox(),this.calculatePanelBBox(),this.bindEvents()}renderBackground(){const{width:e,height:t}=this.getCanvasSize(),{color:A,opacity:n}=this.spreadsheet.theme.background;this.backgroundGroup.appendChild(new a.rw({style:{fill:A,opacity:n,x:0,y:0,width:e,height:t}}))}renderScrollBars(){const{scrollX:e,scrollY:t,rowHeaderScrollX:A}=this.getScrollOffset(),{width:n,height:i}=this.panelBBox,r=this.layoutResult.colsHierarchy.width,o=this.getRealHeight();this.renderRowScrollBar(A),this.renderHScrollBar(n,r,e),this.renderVScrollBar(i,o,t)}renderHeaders(){const e=this.getSeriesNumberWidth();this.rowHeader=this.getRowHeader(),this.columnHeader=this.getColHeader(),e>0&&!this.seriesNumberHeader&&(this.seriesNumberHeader=this.getSeriesNumberHeader()),this.cornerHeader=this.getCornerHeader(),this.centerFrame=this.getCenterFrame(),this.seriesNumberHeader&&this.foregroundGroup.appendChild(this.seriesNumberHeader),this.rowHeader&&this.foregroundGroup.appendChild(this.rowHeader),this.foregroundGroup.appendChild(this.columnHeader),this.foregroundGroup.appendChild(this.cornerHeader),this.foregroundGroup.appendChild(this.centerFrame)}getRowHeaderCfg(){const{y:e,viewportHeight:t,viewportWidth:A,height:n}=this.panelBBox,i=this.getSeriesNumberWidth();return{width:this.cornerBBox.width,height:n,viewportWidth:A,viewportHeight:t,position:{x:i,y:e},nodes:this.layoutResult.rowNodes,spreadsheet:this.spreadsheet}}getRowHeader(){return this.rowHeader?this.rowHeader:new Tr(this.getRowHeaderCfg())}getColHeader(){if(!this.columnHeader){const{x:e,width:t,viewportHeight:A,viewportWidth:n}=this.panelBBox;return new Qr({width:t,cornerWidth:this.cornerBBox.width,height:this.cornerBBox.height,viewportWidth:n,viewportHeight:A,position:{x:e,y:0},nodes:this.layoutResult.colNodes,sortParam:this.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader}getCornerHeader(){return this.cornerHeader||mr.getCornerHeader({panelBBox:this.panelBBox,cornerBBox:this.cornerBBox,seriesNumberWidth:this.getSeriesNumberWidth(),layoutResult:this.layoutResult,spreadsheet:this.spreadsheet})}getSeriesNumberHeader(){return this.seriesNumberHeader||Ur.getSeriesNumberHeader({spreadsheet:this.spreadsheet,panelBBox:this.panelBBox,cornerWidth:this.cornerBBox.width,seriesNumberWidth:this.getSeriesNumberWidth(),rowsHierarchy:this.layoutResult.rowsHierarchy})}getCenterFrame(){var e;if(!this.centerFrame){const{viewportWidth:t,viewportHeight:A}=this.panelBBox,n=null===(e=this.spreadsheet.options)||void 0===e?void 0:e.frame,i={position:{x:this.cornerBBox.x,y:this.cornerBBox.y},cornerWidth:this.cornerBBox.width,cornerHeight:this.cornerBBox.height,viewportWidth:t,viewportHeight:A,showViewportLeftShadow:!1,showViewportRightShadow:!1,spreadsheet:this.spreadsheet};return n?n(i):new Ei(i)}return this.centerFrame}updatePanelScrollGroup(){this.gridInfo=this.getGridInfo(),this.panelScrollGroup.update(this.gridInfo)}dynamicRenderCell(e){const{scrollX:t,scrollY:A,rowHeaderScrollX:n}=this.getScrollOffset(),i=A+this.getPaginationScrollY();this.spreadsheet.hideTooltip(),this.spreadsheet.interaction.clearHoverTimer(),this.realDataCellRender(t,i),this.updatePanelScrollGroup(),this.translateRelatedGroups(t,i,n),this.clip(t,i),e||this.emitScrollEvent({scrollX:t,scrollY:i,rowHeaderScrollX:n}),this.onAfterScroll()}emitScrollEvent(e){this.spreadsheet.emit(iA.GLOBAL_SCROLL,e)}saveInitColumnLeafNodes(e=[]){const{store:t,options:A}=this.spreadsheet,{hiddenColumnFields:n=[]}=A.interaction,i=e.length+n.length,r=this.getInitColLeafNodes();i!==(null==r?void 0:r.length)&&t.set("initColLeafNodes",e)}getHiddenColumnsInfo(e){const t=this.spreadsheet.store.get("hiddenColumnsDetail",[]);if(!(0,l.isEmpty)(t))return t.find(t=>{var A;return null===(A=null==t?void 0:t.hideColumnNodes)||void 0===A?void 0:A.some(t=>t.id===e.id)})}updateCustomFieldsSampleNodes(e){var t;if(!this.spreadsheet.isCustomColumnFields())return;const A=(null===(t=e.sampleNodeForLastLevel)||void 0===t?void 0:t.id.split("[&]"))||[],n=e.getNodes().filter(t=>{var n;return(null===(n=e.sampleNodeForLastLevel)||void 0===n?void 0:n.id.includes(t.id))&&A.includes(t.field)});e.sampleNodesForAllLevels=n,e.height=(0,l.sumBy)(n,"height")}adjustCustomRowLeafNodesWidth(e){this.spreadsheet.isCustomRowFields()&&this.adjustLeafNodesSize("width")(e)}adjustCustomColLeafNodesHeight(e){this.spreadsheet.isCustomColumnFields()&&this.adjustLeafNodesSize("height")(e)}adjustLeafNodesSize(e){return({leafNodes:t,hierarchy:A})=>{const{sampleNodeForLastLevel:n,sampleNodesForAllLevels:i}=A;t.forEach(t=>{if(t.level>(null==n?void 0:n.level))return;const A=(0,l.sumBy)(i,A=>A.level<t.level?0:A[e]);t[e]=A})}}getHeaderNodes(e){const t=(0,l.concat)(this.getCornerNodes(),this.getSeriesNumberNodes(),this.getRowNodes(),this.getColNodes());return e?t.filter(t=>e.includes(t.id)):t}getCornerNodes(){var e;return(null===(e=this.cornerHeader)||void 0===e?void 0:e.getNodes())||[]}getSeriesNumberNodes(){var e;return(null===(e=this.seriesNumberHeader)||void 0===e?void 0:e.getNodes())||[]}getColNodes(e){const{colNodes:t=[]}=this.layoutResult;return(0,l.isNil)(e)?t:t.filter(t=>t.level===e)}getTopLevelColNodes(){return this.getColNodes(0)}getColNodeById(e){return this.getColNodes().find(t=>t.id===e)}getColNodeByIndex(e){return this.getColNodes().find(t=>t.colIndex===e)}getColLeafNodesByRange(e,t){return this.getColLeafNodes().filter(A=>A.colIndex>=e&&A.colIndex<=t)}getColLeafNodeByIndex(e){return this.getColLeafNodes().find(t=>t.colIndex===e)}getColNodesByField(e){return this.getColNodes().filter(t=>t.field===e)}getColLeafNodes(){var e;return(null===(e=this.layoutResult)||void 0===e?void 0:e.colLeafNodes)||[]}getColTotalsNodes(e){return this.getColNodes(e).filter(e=>e.isTotals)}getColSubTotalsNodes(e){return this.getColTotalsNodes(e).filter(e=>e.isSubTotals)}getColGrandTotalsNodes(e){return this.getColTotalsNodes(e).filter(e=>e.isGrandTotals)}getRowNodes(e){const{rowNodes:t=[]}=this.layoutResult;return(0,l.isNil)(e)?t:t.filter(t=>t.level===e)}getRowNodeById(e){return this.getRowNodes().find(t=>t.id===e)}getRowNodeByIndex(e){return this.getRowNodes().find(t=>t.rowIndex===e)}getRowLeafNodeByIndex(e){return this.getRowLeafNodes().find(t=>t.rowIndex===e)}getRowLeafNodesByRange(e,t){return this.getRowLeafNodes().filter(A=>A.rowIndex>=e&&A.rowIndex<=t)}getRowNodesByField(e){return this.getRowNodes().filter(t=>t.field===e)}getRowLeafNodes(){var e;return(null===(e=this.layoutResult)||void 0===e?void 0:e.rowLeafNodes)||[]}getRowTotalsNodes(e){return this.getRowNodes(e).filter(e=>e.isTotals)}getRowSubTotalsNodes(e){return this.getRowTotalsNodes(e).filter(e=>e.isSubTotals)}getRowGrandTotalsNodes(e){return this.getRowTotalsNodes(e).filter(e=>e.isGrandTotals)}getDataCells(){var e;return Vi(null===(e=this.panelGroup)||void 0===e?void 0:e.children,Nt)}getRowCells(){var e;const t=(null===(e=this.getRowHeader())||void 0===e?void 0:e.children)||[];return Vi(t,$i).filter(e=>e.cellType===o.ROW_CELL)}getRowLeafCells(){return this.getRowCells().filter(e=>e.getMeta().isLeaf)}getColCells(){var e;const t=(null===(e=this.getColHeader())||void 0===e?void 0:e.children)||[];return Vi(t,Hi).filter(e=>e.cellType===o.COL_CELL)}getColLeafCells(){return this.getColCells().filter(e=>e.getMeta().isLeaf)}getMergedCells(){return(0,l.filter)(this.panelScrollGroup.getMergedCellsGroup().children,e=>e instanceof tr)}getCornerCells(){var e;const t=(null===(e=this.getCornerHeader())||void 0===e?void 0:e.children)||[];return Vi(t,ir).filter(e=>e.cellType===o.CORNER_CELL)}filterCells(e,t){return(0,l.isEmpty)(t)?e:(0,l.isArray)(t)?e.filter(e=>(0,l.includes)(t,e.getMeta().id)):e.filter(e=>{const A=t[e.cellType];return!!A&&A.includes(e.getMeta().id)})}getHeaderCells(e){const t=(0,l.concat)(this.getCornerCells(),this.getSeriesNumberCells(),this.getRowCells(),this.getColCells());return this.filterCells(t,e)}getCellById(e){return this.getCells().find(t=>t.getMeta().id===e)}getCellsByField(e){return this.getCells().filter(t=>t.getMeta().field===e)}getCells(e){const t=(0,l.concat)(this.getHeaderCells(),this.getDataCells());return e?t.filter(t=>e.includes(t.getMeta().id)):t}getInitColIndexLeafNodes(){return this.layoutResult.colsHierarchy.getIndexNodes()||[]}getInitColLeafNodes(){return this.spreadsheet.store.get("initColLeafNodes",[])}clearInitColLeafNodes(){this.spreadsheet.store.set("initColLeafNodes",void 0)}measureTextWidth(e,t){return Math.ceil(this.spreadsheet.measureTextWidth(e,t))+1}initCellPool(){this.dataCellPool=new or}}class Nr extends Rr{constructor(){super(...arguments),this.frozenGroupAreas={[Dt.Col]:{width:0,x:0,range:[]},[Dt.TrailingCol]:{width:0,x:0,range:[]},[Dt.Row]:{height:0,y:0,range:[]},[Dt.TrailingRow]:{height:0,y:0,range:[]}},this.panelScrollGroupIndexes=[0,0,0,0],this.addDataCell=e=>{const t=this.getColLeafNodes().length,A=this.getCellRange(),n=((e,t,A,n)=>{const{colCount:i=0,rowCount:r=0,trailingColCount:o=0,trailingRowCount:s=0}=t,{colIndex:a,rowIndex:l}=e;return Yt(l,n.start,r)?Pt.Row:qt(l,n.end,s)?Pt.TrailingRow:jt(a,i)?Pt.Col:Xt(a,o,A)?Pt.TrailingCol:Pt.Scroll})(e.getMeta(),this.getFrozenOptions(),t,A);var i;n===Pt.Scroll?e.parentElement!==this.panelScrollGroup&&this.panelScrollGroup.appendChild(e):e.parentElement!==this.frozenGroups[n]&&this.frozenGroups[n].appendChild(e),i=()=>{this.spreadsheet.emit(iA.DATA_CELL_RENDER,e),this.spreadsheet.emit(iA.LAYOUT_CELL_RENDER,e)},Promise.resolve().then(()=>{i()})},this.addFrozenCell=(e,t,A)=>{const n=this.getCellMeta(t,e);if(n){n.isFrozenCorner=!0;const e=this.createDataCell(n);A.appendChild(e)}},this.translateFrozenGroups=()=>{const{scrollY:e,scrollX:t}=this.getScrollOffset(),A=this.getPaginationScrollY(),{x:n,y:i,viewportWidth:r,viewportHeight:o}=this.panelBBox,s=xr(this,this.cornerBBox.width,t),a=br(this,r),l=Fr(this,o,A);Zt(this.frozenGroups[Pt.TopLeft],n-s,i-A),Zt(this.frozenGroups[Pt.TopRight],n-a,i-A),Zt(this.frozenGroups[Pt.BottomLeft],n-s,i-l),Zt(this.frozenGroups[Pt.BottomRight],n-a,i-l),Zt(this.frozenGroups[Pt.Row],n-t,i-A),Zt(this.frozenGroups[Pt.TrailingRow],n-t,i-l),Zt(this.frozenGroups[Pt.Col],n-s,i-e-A),Zt(this.frozenGroups[Pt.TrailingCol],n-a,i-e-A)},this.renderFrozenGroupSplitLine=(e,t)=>{var A;const n=Math.floor(t-this.getPaginationScrollY());null===(A=this.foregroundGroup.getElementById(mt))||void 0===A||A.remove();const{splitLine:i}=this.spreadsheet.theme,r=this.foregroundGroup.appendChild(new a.YJ({id:mt,style:{zIndex:4}})),o={lineWidth:1,stroke:null==i?void 0:i.verticalBorderColor,opacity:null==i?void 0:i.verticalBorderColorOpacity},s={lineWidth:1,stroke:null==i?void 0:i.horizontalBorderColor,opacity:null==i?void 0:i.horizontalBorderColorOpacity};this.renderFrozenColSplitLine(r,i,o,e),this.renderFrozenTrailingColSplitLine(r,i,o,e),this.renderFrozenRowSplitLine(r,i,s,n),this.renderFrozenTrailingRowSplitLine(r,i,s,n)},this.renderFrozenPanelCornerGroup=()=>{const e=this.getCellRange(),t=((e,t,A)=>{const{colCount:n=0,rowCount:i=0,trailingColCount:r=0,trailingRowCount:o=0}=e,s={[Pt.TopLeft]:[],[Pt.TopRight]:[],[Pt.BottomLeft]:[],[Pt.BottomRight]:[]};for(let e=0;e<n;e++){for(let t=A.start;t<A.start+i;t++)s[Pt.TopLeft].push({x:e,y:t});if(o>0)for(let t=0;t<o;t++)s[Pt.BottomLeft].push({x:e,y:A.end-t})}for(let e=0;e<r;e++){const n=t-1-e;for(let e=A.start;e<A.start+i;e++)s[Pt.TopRight].push({x:n,y:e});if(o>0)for(let e=0;e<o;e++)s[Pt.BottomRight].push({x:n,y:A.end-e})}return s})(this.getFrozenOptions(),this.getColLeafNodes().length,e);Object.keys(t||{}).forEach(e=>{const A=this.frozenGroups[e];A&&t[e].forEach(e=>{this.addFrozenCell(e.x,e.y,A)})})},this.getTotalHeightForRange=(e,t)=>{if(e<0||t<0)return 0;if(this.rowOffsets)return this.rowOffsets[t+1]-this.rowOffsets[e];let A=0;for(let n=e;n<t+1;n++)A+=this.getDefaultCellHeight();return A},this.getShadowFill=e=>{var t,A;const{splitLine:n}=this.spreadsheet.theme;return`l (${e}) 0:${null===(t=null==n?void 0:n.shadowColors)||void 0===t?void 0:t.left} 1:${null===(A=null==n?void 0:n.shadowColors)||void 0===A?void 0:A.right}`}}initPanelGroups(){super.initPanelGroups(),this.frozenGroups=[Pt.Row,Pt.Col,Pt.TrailingRow,Pt.TrailingCol,Pt.TopLeft,Pt.TopRight,Pt.BottomLeft,Pt.BottomRight].reduce((e,t)=>{const A=new Xi({name:t,zIndex:4,s2:this.spreadsheet});return this.panelGroup.appendChild(A),e[t]=A,e},{})}getFrozenOptions(){if(!this.validFrozenOptions){const e=this.getColLeafNodes().length,t=this.getCellRange();this.validFrozenOptions=((e={},t,A=0)=>{const n=Object.assign(Object.assign({},Ni),e);n.colCount>=t&&(n.colCount=t);const i=t-n.colCount;n.trailingColCount>i&&(n.trailingColCount=i),n.rowCount>=A&&(n.rowCount=A);const r=A-n.rowCount;return n.trailingRowCount>r&&(n.trailingRowCount=r),n})(this.spreadsheet.options.frozen,e,t.end-t.start+1)}return this.validFrozenOptions}calculateFrozenGroupInfo(){const{colCount:e,rowCount:t,trailingColCount:A,trailingRowCount:n}=this.getFrozenOptions(),i=this.viewCellHeights,r=this.getCellRange(),o=this.getColLeafNodes();e>0&&(this.frozenGroupAreas[Dt.Col].width=o[e-1].x+o[e-1].width,this.frozenGroupAreas[Dt.Col].x=0,this.frozenGroupAreas[Dt.Col].range=[0,e-1]),t>0&&(this.frozenGroupAreas[Dt.Row].height=i.getCellOffsetY(r.start+t)-i.getCellOffsetY(r.start),this.frozenGroupAreas[Dt.Row].y=i.getCellOffsetY(r.start),this.frozenGroupAreas[Dt.Row].range=[r.start,r.start+t-1]),A>0&&(this.frozenGroupAreas[Dt.TrailingCol].width=o[o.length-1].x-o[o.length-A].x+o[o.length-1].width,this.frozenGroupAreas[Dt.TrailingCol].x=o[o.length-A].x,this.frozenGroupAreas[Dt.TrailingCol].range=[o.length-A,o.length-1]),n>0&&(this.frozenGroupAreas[Dt.TrailingRow].height=i.getCellOffsetY(r.end+1)-i.getCellOffsetY(r.end+1-n),this.frozenGroupAreas[Dt.TrailingRow].y=i.getCellOffsetY(r.end+1-n),this.frozenGroupAreas[Dt.TrailingRow].range=[r.end-n+1,r.end])}getFinalViewport(){const{viewportHeight:e,viewportWidth:t}=this.panelBBox,{colCount:A,rowCount:n,trailingColCount:i,trailingRowCount:r}=this.getFrozenOptions(),o={width:t,height:e,x:0,y:0};return(A>0||i>0)&&(o.width-=this.frozenGroupAreas[Dt.Col].width+this.frozenGroupAreas[Dt.TrailingCol].width,o.x+=this.frozenGroupAreas[Dt.Col].width),(n>0||r>0)&&(o.height<this.frozenGroupAreas[Dt.Row].height+this.frozenGroupAreas[Dt.TrailingRow].height?(o.height=0,o.y=0):(o.height-=this.frozenGroupAreas[Dt.Row].height+this.frozenGroupAreas[Dt.TrailingRow].height,o.y+=this.frozenGroupAreas[Dt.Row].height)),o}calculateXYIndexes(e,t){var A,n;const i=this.getFinalViewport(),r=this.spreadsheet.isTableMode()&&(null===(n=null===(A=this.spreadsheet.dataSet)||void 0===A?void 0:A.isEmpty)||void 0===n?void 0:n.call(A))?this.spreadsheet.dataSet.getEmptyViewIndexes():(e=>{const{scrollX:t,scrollY:A,widths:n,heights:i,viewport:r,rowRemainWidth:o}=e;let s=(0,l.findIndex)(n,(e,A)=>{const i=t-((0,l.isNil)(o)?0:o)+r.x;return i>=e&&i<n[A+1]},0);s=Math.max(s,0);let a=(0,l.findIndex)(n,(e,A)=>{const i=r.width+t+r.x;return i>=e&&i<n[A+1]},s);a=Math.min(-1===a?1/0:a,n.length-2);const{start:u,end:c}=i.getIndexRange(A+r.y,r.height+A+r.y);return[s,a,u,c]})({scrollX:e,scrollY:t,widths:this.viewCellWidths,heights:this.viewCellHeights,viewport:i,rowRemainWidth:this.getRealScrollX(this.cornerBBox.width)});this.panelScrollGroupIndexes=r;const o=this.getColLeafNodes().length,s=this.getCellRange();return((e,t,A,n)=>{const{colCount:i=0,rowCount:r=0,trailingColCount:o=0,trailingRowCount:s=0}=t,a=[...e];jt(a[0],i)&&(a[0]=i),Xt(a[1],o,A)&&(a[1]=A-o-1),Yt(a[2],n.start,r)&&(a[2]=n.start+r),qt(a[3],n.end,s)&&(a[3]=n.end-s);const l=[...a];l[2]=n.start,l[3]=n.start+r-1;const u=[...a];u[0]=0,u[1]=i-1;const c=[...a];c[2]=n.end+1-s,c[3]=n.end;const h=[...a];return h[0]=A-o,h[1]=A-1,{center:a,frozenRow:l,frozenCol:u,frozenTrailingCol:h,frozenTrailingRow:c}})(r,this.getFrozenOptions(),o,s)}updateFrozenGroupGrid(){[Dt.Col,Dt.Row,Dt.TrailingCol,Dt.TrailingRow].forEach(e=>{if(!this.frozenGroupAreas[e].range)return;let t=[],A=[];if(e.toLowerCase().includes("row")){const[n,i]=this.frozenGroupAreas[e].range||[];t=this.gridInfo.cols,A=qi(n,i,this.viewCellHeights),e===Dt.TrailingRow&&(A=((e,t,A,n)=>{const i=qi(e,t,n),r=n.getCellOffsetY(e);return i.map(e=>e-r+A)})(n,i,this.frozenGroupAreas[Dt.TrailingRow].y,this.viewCellHeights))}else{const[n,i]=this.frozenGroupAreas[e].range||[],r=this.getColLeafNodes();t=Yi(n,i,r),A=this.gridInfo.rows}const n=Gt[e];this.frozenGroups[n].updateGrid({cols:t,rows:A},n)})}updatePanelScrollGroup(){super.updatePanelScrollGroup(),this.updateFrozenGroupGrid()}translateRelatedGroups(e,t,A){super.translateRelatedGroups(e,t,A),this.translateFrozenGroups(),this.renderRowResizeArea(),this.renderFrozenGroupSplitLine(e,t)}renderRowResizeArea(){}getFrozenColSplitLineSize(){const{viewportHeight:e,y:t}=this.panelBBox;return{y:0,height:e+t}}renderFrozenColSplitLine(e,t,A,n){const{colCount:i}=this.getFrozenOptions(),{x:r}=this.panelBBox;if(i>0){const i=this.cornerBBox.width,o=xr(this,i,n),s=r+this.frozenGroupAreas[Dt.Col].width-o,{y:l,height:u}=this.getFrozenColSplitLineSize();$e(e,Object.assign(Object.assign({},A),{x1:s,x2:s,y1:l,y2:l+u})),(null==t?void 0:t.showShadow)&&n>0&&(this.spreadsheet.isFrozenRowHeader()||o>=i)&&e.appendChild(new a.rw({style:{x:s,y:l,width:null==t?void 0:t.shadowWidth,height:u,fill:this.getShadowFill(0)}}))}}renderFrozenTrailingColSplitLine(e,t,A,n){const{trailingColCount:i}=this.getFrozenOptions(),{viewportWidth:r,x:o}=this.panelBBox;if(i>0){const i=r-this.frozenGroupAreas[Dt.TrailingCol].width+o,{y:s,height:u}=this.getFrozenColSplitLineSize(),c=Math.max(0,(0,l.last)(this.viewCellWidths)-r);$e(e,Object.assign(Object.assign({},A),{x1:i,x2:i,y1:s,y2:s+u})),(null==t?void 0:t.showShadow)&&yi(n)<yi(c)&&e.appendChild(new a.rw({style:{x:i-t.shadowWidth,y:s,width:t.shadowWidth,height:u,fill:this.getShadowFill(180)}}))}}getFrozenRowSplitLineSize(){const{viewportWidth:e,x:t}=this.panelBBox;return{x:0,width:t+e}}renderFrozenRowSplitLine(e,t,A,n){const{rowCount:i}=this.getFrozenOptions(),{y:r}=this.panelBBox;if(i>0){const i=r+this.frozenGroupAreas[Dt.Row].height,{x:o,width:s}=this.getFrozenRowSplitLineSize();$e(e,Object.assign(Object.assign({},A),{x1:o,x2:o+s,y1:i,y2:i})),(null==t?void 0:t.showShadow)&&n>0&&e.appendChild(new a.rw({style:{x:o,y:i,width:s,height:null==t?void 0:t.shadowWidth,fill:this.getShadowFill(90)}}))}}renderFrozenTrailingRowSplitLine(e,t,A,n){const{trailingRowCount:i}=this.getFrozenOptions(),{viewportHeight:r}=this.panelBBox;if(i>0){const i=this.panelBBox.maxY-this.frozenGroupAreas[Dt.TrailingRow].height,{x:o,width:s}=this.getFrozenRowSplitLineSize(),l=this.getCellRange(),u=Math.max(0,this.viewCellHeights.getCellOffsetY(l.end+1)-this.viewCellHeights.getCellOffsetY(l.start)-r);$e(e,Object.assign(Object.assign({},A),{x1:o,x2:o+s,y1:i,y2:i})),(null==t?void 0:t.showShadow)&&n<yi(u)&&e.appendChild(new a.rw({style:{x:o,y:i-t.shadowWidth,width:s,height:t.shadowWidth,fill:this.getShadowFill(270)}}))}}render(){this.shouldRender()&&(this.calculateFrozenGroupInfo(),this.renderFrozenPanelCornerGroup(),super.render())}getCenterFrameScrollX(e){return this.getFrozenOptions().colCount>0?xr(this,this.cornerBBox.width,e):super.getCenterFrameScrollX(e)}getDefaultCellHeight(){var e;return null!==(e=this.getRowCellHeight(null))&&void 0!==e?e:0}createOrUpdate(e,t){it.call(this,e,t)}clip(){const{colCount:e,rowCount:t,trailingColCount:A,trailingRowCount:n}=this.getFrozenOptions(),{scrollX:i}=this.getScrollOffset(),{x:r,width:o}=Sr(this,this.panelBBox),s=this.frozenGroupAreas[Dt.Col].width,a=this.frozenGroupAreas[Dt.TrailingCol].width,l=this.frozenGroupAreas[Dt.Row].height,u=this.frozenGroupAreas[Dt.TrailingRow].height,c=this.panelBBox.y+l,h=this.panelBBox.viewportHeight-l-u;this.createOrUpdate("panelScrollGroup.style.clipPath",{x:r,y:c,width:o,height:h}),e>0?this.createOrUpdate(`frozenGroups.${Pt.Col}.style.clipPath`,{x:this.panelBBox.x-xr(this,this.cornerBBox.width,i),y:c,width:s,height:h}):this.frozenGroups[Pt.Col].style.clipPath=null,A>0?this.createOrUpdate(`frozenGroups.${Pt.TrailingCol}.style.clipPath`,{x:this.panelBBox.x+this.panelBBox.viewportWidth-a,y:c,width:a,height:h}):this.frozenGroups[Pt.TrailingCol].style.clipPath=null,t>0?this.createOrUpdate(`frozenGroups.${Pt.Row}.style.clipPath`,{x:r,y:this.panelBBox.y,width:o,height:l}):this.frozenGroups[Pt.Row].style.clipPath=null,n>0?this.createOrUpdate(`frozenGroups.${Pt.TrailingRow}.style.clipPath`,{x:r,y:this.panelBBox.y+this.panelBBox.viewportHeight-u,width:o,height:u}):this.frozenGroups[Pt.TrailingRow].style.clipPath=null}}class Dr extends Mi{getStyle(e){var t;return e?(0,l.get)(this.theme,e):null===(t=this.theme)||void 0===t?void 0:t.cornerCell}showSortIcon(){return!1}}class Pr extends Qr{getCellInstance(e){const t=this.getHeaderConfig(),{spreadsheet:A}=t,{seriesNumberCell:n,colCell:i}=A.options,r=[e,A,t];return e.field===Se?(null==n?void 0:n(...r))||new Dr(...r):(null==i?void 0:i(...r))||new Mi(...r)}}class Gr{constructor(e){const{label:t,isSubTotals:A,isGrandTotals:n,isTotalRoot:i=!1}=e;this.label=t,this.isSubTotals=A,this.isGrandTotals=n,this.isTotalRoot=i}static isTotalClassInstance(e){return e instanceof Gr}}const Kr=e=>{var t;const{isFirstField:A,currentField:n,fieldValues:i,spreadsheet:r,lastField:o}=e,s=r.getTotalsConfig(A?n:o);let a,u;A?(null==s?void 0:s.showGrandTotals)&&(a=s.reverseGrandTotalsLayout?"unshift":"push",u=new Gr({label:s.grandTotalsLabel,isSubTotals:!1,isGrandTotals:!0,isTotalRoot:!0})):(null==s?void 0:s.showSubTotals)&&((0,l.size)(i)>1||!1!==(0,l.get)(s,"showSubTotals.always"))&&n!==Be&&(a=s.reverseSubTotalsLayout?"unshift":"push",u=new Gr({label:s.subTotalsLabel,isSubTotals:!0,isGrandTotals:!1,isTotalRoot:!0})),a&&(null===(t=i[a])||void 0===t||t.call(i,u))},Vr=(e,t,A,n)=>e.options.layoutArrange?e.options.layoutArrange(e,A,n,t):t,zr=(e,t,A,n)=>{var i,r,o,s;if((null===(i=null==e?void 0:e.facet)||void 0===i?void 0:i.getHiddenColumnsInfo(A))&&(null===(s=null===(o=null===(r=null==e?void 0:e.dataSet)||void 0===r?void 0:r.fields)||void 0===o?void 0:o.columns)||void 0===s?void 0:s.find(e=>e===(null==A?void 0:A.field))))return!1;let a=!0;const u=(e,A=-1,i=-1)=>{-1===A?(t.children.push(e),n.pushNode(e)):(t.children.splice(A,0,e),n.pushNode(e,i))};if(e.options.layoutHierarchy){const i=e.options.layoutHierarchy(e,A);if(i){const e=!!(0,l.isBoolean)(null==i?void 0:i.delete)&&(null==i?void 0:i.delete);a=!e;const{push:r,unshift:o}=i;let s=t.children.length,c=n.getNodes().length;(0,l.isEmpty)(o)||((0,l.each)(o,e=>{u(e)}),s=t.children.length,c=n.getNodes().length),(0,l.isEmpty)(r)||(0,l.each)(r,e=>{u(e)}),e||u(A,s,c)}else u(A)}else u(A);return a},Wr=(e,t,A)=>{var n,i;(null===(n=e.options)||void 0===n?void 0:n.layoutCoordinate)&&((null==t?void 0:t.isLeaf)||(null==A?void 0:A.isLeaf))&&(null===(i=e.options)||void 0===i||i.layoutCoordinate(e,t,A))};class jr{constructor(e){this.label=e}static isTotalMeasureInstance(e){return e instanceof jr}}const Xr=e=>{var t,A,n,i;const{spreadsheet:r,level:o,fields:s}=e,{options:a,dataSet:u}=r,c=u.moreThanOneValue(),h=null===(A=null===(t=r.dataCfg.fields)||void 0===t?void 0:t.valueInCols)||void 0===A||A,d=(null===(i=null===(n=null==a?void 0:a.style)||void 0===n?void 0:n.colCell)||void 0===i?void 0:i.hideValue)&&h&&!c&&(0,l.includes)(s,Be);return o===s.length-(d?2:1)},Yr=e=>{var t,A;const{currentField:n,fields:i,fieldValues:r,hierarchy:o,parentNode:s,level:a,query:l,addMeasureInTotalQuery:u,addTotalMeasureInTotal:c,spreadsheet:h,handler:d}=e,f=h.isTableMode();for(const[e,g]of r.entries()){const r=bt(g),p=Gr.isTotalClassInstance(r),v=jr.isTotalMeasureInstance(r);let m,C,w=!1,y=!1,B=!1,E=!1,x=n;p?(y=r.isGrandTotals,B=r.isSubTotals,E=r.isTotalRoot,m=ht(r.label),C=E?Object.assign({},l):Object.assign(Object.assign({},l),{[n]:m}),u&&(C[Be]=null===(t=null==h?void 0:h.dataSet)||void 0===t?void 0:t.fields.values[0]),w=Xr({spreadsheet:h,level:a,fields:i})):v?(m=ht(r.label),C=Object.assign(Object.assign({},l),{[Be]:m}),x=Be,y=s.isGrandTotals,B=s.isSubTotals,w=Xr({spreadsheet:h,level:a,fields:i})):f?(m=r,x=i[e],C=Object.assign(Object.assign({},l),{[x]:m}),w=!0):(m=r,C=m===Te?Object.assign({},l):Object.assign(Object.assign({},l),{[n]:m}),w=Xr({spreadsheet:h,level:a,fields:i}));const b=Ft(s.id,f?x:m);if(!b)return;const F=!1,S=new pr({id:b,value:m,level:a,field:x,parent:s,isTotals:p||v,isGrandTotals:y,isSubTotals:B,isTotalMeasure:v,isCollapsed:F,isTotalRoot:E,hierarchy:o,query:C,spreadsheet:h,isLeaf:w||F}),T=zr(h,s,S,o),L=null===(A=null==h?void 0:h.facet)||void 0===A?void 0:A.getHiddenColumnsInfo(S);!(a>o.maxLevel)||y||s.isGrandTotals||s.isSubTotals||S.isSubTotals||L||(o.sampleNodesForAllLevels.push(S),o.maxLevel=a,o.sampleNodeForLastLevel=S),w||F||!T?(S.isLeaf=!0,o.pushIndexNode(S),S.rowIndex=o.getIndexNodes().length-1):null==d||d({addTotalMeasureInTotal:c,addMeasureInTotalQuery:u,parentNode:S,currentField:i[a+1],fields:i,hierarchy:o,spreadsheet:h})}};function qr(e,t){const A={};let n=e;for(;n&&n.field;)n.isTotalRoot&&!t||n.value===Te||(A[n.field]=n.value),n=n.parent;return A}const Zr=e=>{const{addTotalMeasureInTotal:t,parentNode:A,currentField:n,fields:i,hierarchy:r,spreadsheet:o}=e,s=i.indexOf(n),a=o.dataSet,{values:u=[]}=a.fields,c=[];let h={};const d=o.getTotalsConfig(n),f=A.isGrandTotals?d.grandTotalsGroupDimensions||[]:d.subTotalsGroupDimensions||[],g=a.isEmpty()?[]:f;if(null==g?void 0:g.includes(n)){h=qr(A);const e=a.getDimensionValues(n,h);c.push(...(e||[]).map(e=>new Gr({label:e,isSubTotals:A.isSubTotals,isGrandTotals:A.isGrandTotals,isTotalRoot:!1}))),(0,l.isEmpty)(c)&&n&&c.push(Te)}else{if(!t||n!==Be)return Xr({spreadsheet:o,level:s,fields:i})?(A.isLeaf=!0,r.pushIndexNode(A),void(A.rowIndex=r.getIndexNodes().length-1)):void Zr(Object.assign(Object.assign({},e),{currentField:i[s+1]}));h=qr(A),c.push(...u.map(e=>new jr(e)))}const p=qn(c);Yr(Object.assign(Object.assign({},e),{fieldValues:p,level:s,parentNode:A,query:h,handler:Jr}))};function Jr(e){e.parentNode.isTotals?Zr(e):(e=>{const{parentNode:t,currentField:A,fields:n,spreadsheet:i}=e,r=i.dataSet,{values:o=[]}=r.fields,s=n.indexOf(A),a=[];let u={};u=qr(t,!0);const c=r.getDimensionValues(A,u),h=Vr(i,c,t,A);a.push(...h||[]),(0,l.isEmpty)(a)&&A&&(A===Be?a.push(...o):a.push(Te)),Kr({currentField:A,lastField:n[s-1],isFirstField:0===s,fieldValues:a,spreadsheet:i});const d=qn(a);Yr(Object.assign(Object.assign({},e),{fieldValues:d,level:s,parentNode:t,query:u,handler:Jr}))})(e)}const $r=e=>{var t,A,n,i,r;const{spreadsheet:o,nodeId:s,currentField:a,level:u,isTotals:c,isTotalMeasure:h,isLeaf:d}=e;if(d)return!1;const{collapseFields:f,collapseAll:g,expandDepth:p}=null!==(A=null===(t=o.options.style)||void 0===t?void 0:t.rowCell)&&void 0!==A?A:{},v=null!==(n=null==f?void 0:f[s])&&void 0!==n?n:null==f?void 0:f[a],m=(0,l.isNumber)(p)?u>=p:null;return!c&&!h&&null!==(r=null!==(i=null!=v?v:m)&&void 0!==i?i:g)&&void 0!==r&&r},eo=e=>{var t;const{fieldValue:A,currentField:n,query:i,parentNode:r,spreadsheet:o,level:s,fields:a,addMeasureInTotalQuery:l}=e,u=Gr.isTotalClassInstance(A),c=jr.isTotalMeasureInstance(A);let h,d,f=!1,g=!1,p=!1,v=!1;return u?(g=A.isGrandTotals,p=A.isSubTotals,v=A.isTotalRoot,h=ht(A.label),d=v?Object.assign({},i):Object.assign(Object.assign({},i),{[n]:h}),l&&(d[Be]=null===(t=null==o?void 0:o.dataSet)||void 0===t?void 0:t.fields.values[0]),f=Xr({spreadsheet:o,level:s,fields:a})):c?(h=ht(A.label),d=Object.assign(Object.assign({},i),{[Be]:h}),g=r.isGrandTotals,p=r.isSubTotals,f=Xr({spreadsheet:o,level:s,fields:a})):(h=A,d=h===Te?Object.assign({},i):Object.assign(Object.assign({},i),{[n]:h}),f=Xr({spreadsheet:o,level:s,fields:a})),{value:h,nodeQuery:d,isLeaf:f,isGrandTotals:g,isSubTotals:p,isTotalRoot:v,isTotals:u,isTotalMeasure:c}},to=e=>{var t;const{currentField:A,fields:n,fieldValues:i,hierarchy:r,parentNode:o,level:s,query:a,addMeasureInTotalQuery:l,addTotalMeasureInTotal:u,spreadsheet:c,handler:h}=e;for(const e of i){const i=bt(e),d=A,f=eo({fieldValue:i,currentField:A,query:a,parentNode:o,spreadsheet:c,level:s,fields:n,addMeasureInTotalQuery:l}),g=Ft(o.id,f.value);if(g){const e=$r({spreadsheet:c,nodeId:g,currentField:A,level:s,isTotals:f.isTotals,isTotalMeasure:f.isTotalMeasure,isLeaf:f.isLeaf}),i=new pr({id:g,value:f.value,level:s,field:d,parent:o,isTotals:f.isTotals||f.isTotalMeasure,isGrandTotals:f.isGrandTotals,isSubTotals:f.isSubTotals,isTotalMeasure:f.isTotalMeasure,isCollapsed:e,isTotalRoot:f.isTotalRoot,hierarchy:r,query:f.nodeQuery,spreadsheet:c,isLeaf:f.isLeaf||e}),a=zr(c,o,i,r),p=null===(t=null==c?void 0:c.facet)||void 0===t?void 0:t.getHiddenColumnsInfo(i);!(s>r.maxLevel)||f.isGrandTotals||o.isGrandTotals||o.isSubTotals||i.isSubTotals||p||(r.sampleNodesForAllLevels.push(i),r.maxLevel=s,r.sampleNodeForLastLevel=i),f.isLeaf||e||!a?(i.isLeaf=!0,r.pushIndexNode(i),i.rowIndex=r.getIndexNodes().length-1):null==h||h({addTotalMeasureInTotal:u,addMeasureInTotalQuery:l,parentNode:i,currentField:n[s+1],fields:n,hierarchy:r,spreadsheet:c})}}},Ao=e=>{const{addTotalMeasureInTotal:t,parentNode:A,currentField:n,fields:i,hierarchy:r,spreadsheet:o}=e,s=i.indexOf(n),a=o.dataSet,{values:u=[]}=a.fields,c=[];let h={};const d=o.getTotalsConfig(n),f=A.isGrandTotals?d.grandTotalsGroupDimensions||[]:d.subTotalsGroupDimensions||[],g=a.isEmpty()?[]:f;if(null==g?void 0:g.includes(n)){h=qr(A);const e=a.getDimensionValues(n,h);c.push(...(e||[]).map(e=>new Gr({label:e,isSubTotals:A.isSubTotals,isGrandTotals:A.isGrandTotals,isTotalRoot:!1}))),(0,l.isEmpty)(c)&&n&&c.push(Te)}else{if(!t||n!==Be)return Xr({spreadsheet:o,level:s,fields:i})?(A.isLeaf=!0,r.pushIndexNode(A),void(A.rowIndex=r.getIndexNodes().length-1)):void Ao(Object.assign(Object.assign({},e),{currentField:i[s+1]}));h=qr(A),c.push(...u.map(e=>new jr(e)))}const p=qn(c);to(Object.assign(Object.assign({},e),{fieldValues:p,level:s,parentNode:A,query:h,handler:no}))};function no(e){e.parentNode.isTotals?Ao(e):(e=>{const{parentNode:t,currentField:A,fields:n,spreadsheet:i}=e,r=i.dataSet,{values:o=[]}=r.fields,s=n.indexOf(A),a=[];let u={};u=qr(t,!0);const c=r.getDimensionValues(A,u),h=Vr(i,c,t,A);a.push(...h||[]),(0,l.isEmpty)(a)&&A&&(A===Be?a.push(...o):a.push(Te)),Kr({currentField:A,lastField:n[s-1],isFirstField:0===s,fieldValues:a,spreadsheet:i});const d=qn(a);to(Object.assign(Object.assign({},e),{fieldValues:d,level:s,parentNode:t,query:u,handler:no}))})(e)}const io=e=>{var t;const{tree:A=[],level:n,parentNode:i,hierarchy:r,spreadsheet:o,isRowHeader:s}=e,{collapseFields:a,collapseAll:u,expandDepth:c}=null===(t=o.options.style)||void 0===t?void 0:t.rowCell,h=o.store.get("hiddenColumnsDetail")||[];A.forEach(e=>{var t,A;const{field:d,title:f,collapsed:g,children:p}=e,v=(0,Q.Tt)(e,["field","title","collapsed","children"]),m=h.some(({hideColumnNodes:e})=>e.find(e=>e.field===d)),C={[Be]:d},w=Ft(i.id,d),y=null!=g&&g,B=null!==(t=null==a?void 0:a[w])&&void 0!==t?t:null==a?void 0:a[d],E=(0,l.isNumber)(c)?n>c:null,x=null!==(A=null!=B?B:E)&&void 0!==A?A:u||y,b=o.isHierarchyTreeType()&&s&&x,F=(0,l.isEmpty)(p),S=new pr({id:w,field:d,value:f,level:n,parent:i,isTotals:!1,isCollapsed:b,hierarchy:r,query:C,spreadsheet:o,isLeaf:F,extra:Object.assign(Object.assign({},v),{isCustomNode:!0})});if((F||m||b)&&r.pushIndexNode(S),m)return;n>r.maxLevel&&!S.isSeriesNumberNode()&&(r.maxLevel=n,r.sampleNodesForAllLevels.push(S),r.sampleNodeForLastLevel=S,r.maxLevel=n);const T=zr(o,i,S,r);(0,l.isEmpty)(p)||b||!T||io({spreadsheet:o,parentNode:S,level:n+1,hierarchy:r,tree:p||[],isRowHeader:s})})},ro=e=>{var t,A,n,i,r,o,s;const{spreadsheet:a,parentNode:u,currentField:c,level:h,hierarchy:d,pivotMeta:f}=e,{query:g,id:p}=u,v=(null===(n=null===(A=null===(t=a.dataCfg)||void 0===t?void 0:t.fields)||void 0===A?void 0:A.rows)||void 0===n?void 0:n.length)<=h,m=qn(Array.from(f.keys()));let C=Vr(a,m,u,c);const w=a.store.get("drillItemsNum");v&&w>0&&(C=C.slice(0,w)),0===h&&((e,t,A)=>{const n=e.getTotalsConfig(t);(null==n?void 0:n.showGrandTotals)&&A[n.reverseGrandTotalsLayout?"unshift":"push"](new Gr({label:n.grandTotalsLabel,isGrandTotals:!0,isSubTotals:!1,isTotalRoot:!1}))})(a,c,C);for(const e of C){const t=e instanceof Gr,A=t?null:f.get(e);let n,v=g,m=!1,C=!1;t?(m=e.isGrandTotals,C=e.isSubTotals,n=ht(e.label),v=g):(n=e,v=Object.assign(Object.assign({},g),{[c]:n}));const w=Ft(p,n),{collapseFields:y,collapseAll:B,expandDepth:E}=null===(i=a.options.style)||void 0===i?void 0:i.rowCell,x=null!==(r=null==y?void 0:y[w])&&void 0!==r?r:null==y?void 0:y[c],b=(0,l.isNumber)(E)?h>E:null,F=null!==(o=null!=x?x:b)&&void 0!==o?o:B,S=new pr({id:w,value:n,level:h,parent:u,field:c,isTotals:t,isGrandTotals:m,isSubTotals:C,isCollapsed:F,hierarchy:d,query:v,spreadsheet:a});h>d.maxLevel&&(d.maxLevel=h);const T=[...(null===(s=null==A?void 0:A.children)||void 0===s?void 0:s.keys())||[]].filter(e=>e!==be),L=(0,l.isEmpty)(T);(L||t)&&(S.isLeaf=!0),L||(S.isTotals=!0);const Q=zr(a,u,S,d);L||F||t||!Q||ro({level:h+1,currentField:A.childField,pivotMeta:A.children,parentNode:S,hierarchy:d,spreadsheet:a})}};class oo{constructor(){this.width=0,this.height=0,this.maxLevel=-1,this.sampleNodesForAllLevels=[],this.sampleNodeForLastLevel=null,this.allNodesWithoutRoot=[],this.indexNode=[],this.isPlaceholder=!1,this.rootNode=pr.rootNode()}getLeaves(){return this.allNodesWithoutRoot.filter(e=>e.isLeaf)}getNodes(e){return void 0!==e?this.allNodesWithoutRoot.filter(t=>t.level===e):this.allNodesWithoutRoot}getNodesLessThanLevel(e){return this.allNodesWithoutRoot.filter(t=>t.level<=e)}pushNode(e,t=-1){-1===t?this.allNodesWithoutRoot.push(e):this.allNodesWithoutRoot.splice(t,0,e)}pushIndexNode(e){this.indexNode.push(e)}getIndexNodes(){return this.indexNode}}const so=e=>{const{rootNode:t,hierarchy:A,fields:n,spreadsheet:i,isRowHeader:r}=e,o=(0,l.filter)(n,e=>e!==Be);io({spreadsheet:i,tree:o,level:0,parentNode:t,hierarchy:A,isRowHeader:r})},ao=e=>{const{isValueInCols:t,moreThanOneValue:A,rootNode:n,hierarchy:i,fields:r,isRowHeader:o,isCustomTreeFields:s,spreadsheet:a}=e;let l,u;o?(l=!t&&A,u=!t&&!A):(l=t&&A,u=t&&!A),s?so(e):Jr({spreadsheet:a,addTotalMeasureInTotal:l,addMeasureInTotalQuery:u,parentNode:n,currentField:r[0],fields:r,hierarchy:i})},lo=e=>{const{isRowHeader:t,spreadsheet:A}=e,{rows:n=[],columns:i=[]}=A.dataSet.fields,r=A.isValueInCols(),o=A.dataSet.moreThanOneValue(),s=new oo,a=t?n:i,l=A.isCustomHeaderFields(t?"rows":"columns"),u={isValueInCols:r,moreThanOneValue:o,rootNode:s.rootNode,hierarchy:s,spreadsheet:A,fields:a,isRowHeader:t,isCustomTreeFields:l};return t?(e=>{const{spreadsheet:t}=e;t.isHierarchyGridTreeType()?(e=>{const{isValueInCols:t,moreThanOneValue:A,rootNode:n,hierarchy:i,fields:r,isCustomTreeFields:o,spreadsheet:s}=e,a=!t&&A,l=!t&&!A;o?so(e):no({spreadsheet:s,addTotalMeasureInTotal:a,addMeasureInTotalQuery:l,parentNode:n,currentField:r[0],fields:r,hierarchy:i})})(e):t.isHierarchyTreeType()?(e=>{const{spreadsheet:t,rootNode:A,hierarchy:n,isCustomTreeFields:i}=e,{rows:r}=t.dataSet.fields;t.isHierarchyTreeType()&&!i?ro({level:0,currentField:null==r?void 0:r[0],pivotMeta:t.dataSet.rowPivotMeta,parentNode:A,hierarchy:n,spreadsheet:t}):so(e)})(e):ao(e)})(u):(e=>{const{spreadsheet:t}=e;t.isPivotMode()?ao(e):(e=>{var t;const{isCustomTreeFields:A,spreadsheet:n}=e,{enable:i}=null!==(t=n.options.seriesNumber)&&void 0!==t?t:{};if(A){const t={field:Se,title:n.getSeriesNumberText()},A=i?[t,...e.fields]:e.fields.filter(e=>(null==e?void 0:e.field)!==Se);return void so(Object.assign(Object.assign({},e),{fields:A}))}(e=>{var t;const{spreadsheet:A,rootNode:n,fields:i,hierarchy:r}=e,{columns:o=[]}=A.dataSet.fields,{enable:s}=null!==(t=A.options.seriesNumber)&&void 0!==t?t:{},a=A.getSeriesNumberText(),l=o.map(e=>e===Se?a:A.dataSet.getFieldName(e));s&&!i.includes(Se)&&(i.unshift(Se),l.unshift(a)),Yr({spreadsheet:A,currentField:i[0],fields:i,fieldValues:l,hierarchy:r,parentNode:n,level:0,query:{},addMeasureInTotalQuery:!1,addTotalMeasureInTotal:!1,handler:Jr})})(e)})(e)})(u),{hierarchy:s,leafNodes:t&&A.isHierarchyTreeType()?s.getNodes():s.getLeaves()}};class uo extends Nr{constructor(e){super(e),this.onSortHandler=e=>(0,Q.sH)(this,void 0,void 0,function*(){const t=this.spreadsheet;let A=e;Array.isArray(e)||(A=[e]);const n=t.dataCfg.sortParams||[];A=A.map(e=>{var t,A;const i=Object.assign(Object.assign({},e),{sortFieldId:null!==(t=e.sortKey)&&void 0!==t?t:e.sortFieldId}),r=null!==(A=n.find(e=>e.sortFieldId===i.sortFieldId))&&void 0!==A?A:{};return Object.assign(Object.assign({},r),i)});const i=n.filter(e=>!A.find(t=>t.sortFieldId===e.sortFieldId));(0,l.set)(t.dataCfg,"sortParams",[...i,...A]),t.setDataCfg(t.dataCfg),yield t.render(!0),t.emit(iA.RANGE_SORTED,t.dataSet.getDisplayDataSet())}),this.onFilterHandler=e=>(0,Q.sH)(this,void 0,void 0,function*(){const t=this.spreadsheet,A=!e.filteredValues||0===e.filteredValues.length,n=t.dataCfg.filterParams||[],i=n.findIndex(t=>t.filterKey===e.filterKey);-1!==i?A?n.splice(i,1):n[i]=e:n.push(e),(0,l.set)(t.dataCfg,"filterParams",n),yield t.render(!0),t.emit(iA.RANGE_FILTERED,t.dataSet.getDisplayDataSet())}),this.spreadsheet.on(iA.RANGE_SORT,this.onSortHandler),this.spreadsheet.on(iA.RANGE_FILTER,this.onFilterHandler)}getCornerCellInstance(){return null}getRowCellInstance(e){const{dataCell:t}=this.spreadsheet.options;return(null==t?void 0:t(e,this.spreadsheet))||new AA(e,this.spreadsheet)}getColCellInstance(...e){const{colCell:t}=this.spreadsheet.options;return(null==t?void 0:t(...e))||new Mi(...e)}initGroups(){super.initGroups(),this.initEmptyPlaceholderGroup()}shouldRender(){var e;const{fields:t}=this.spreadsheet.dataSet,A=null===(e=null==t?void 0:t.columns)||void 0===e?void 0:e.every(e=>e===Se);return super.shouldRender()&&!A}render(){this.shouldRender()&&(super.render(),this.renderEmptyPlaceholder())}clearAllGroup(){super.clearAllGroup(),this.emptyPlaceholderGroup.remove()}initEmptyPlaceholderGroup(){this.emptyPlaceholderGroup=this.spreadsheet.container.appendChild(new a.YJ({name:"emptyPlaceholderGroup",style:{zIndex:4}}))}renderEmptyPlaceholder(){var e,t,A;if(!(null===(e=this.spreadsheet.dataSet)||void 0===e?void 0:e.isEmpty()))return;const{empty:n}=this.spreadsheet.options.placeholder,{background:i}=this.spreadsheet.theme,{icon:r,description:o}=this.spreadsheet.theme.empty,{horizontalBorderWidth:s,horizontalBorderColor:l,horizontalBorderColorOpacity:u}=this.spreadsheet.theme.dataCell.cell,{maxY:c,viewportWidth:h,height:d}=this.panelBBox,f=h/2-r.width/2,g=d/2+c-r.height/2+r.margin.top,p=null!==(t=null==n?void 0:n.description)&&void 0!==t?t:ht("暂无数据"),v=h/2-this.measureTextWidth(p,o)/2,m=g+r.height+r.margin.bottom,C=new a.rw({style:{x:0,y:c,width:h,height:d,stroke:l,strokeWidth:s,strokeOpacity:u,fill:null==i?void 0:i.color,fillOpacity:null!==(A=null==i?void 0:i.opacity)&&void 0!==A?A:1}});this.emptyPlaceholderGroup.appendChild(C),tt(this.emptyPlaceholderGroup,Object.assign(Object.assign({},r),{name:null==n?void 0:n.icon,x:f,y:g,width:r.width,height:r.height})),Je({group:this.emptyPlaceholderGroup,style:Object.assign(Object.assign({},o),{text:p,x:v,y:m})}),this.emptyPlaceholderGroup.toFront()}getDataCellAdaptiveHeight(e){const t={id:String(null==e?void 0:e.rowIndex)},A=this.getRowCellHeight(t);if(this.isCustomRowCellHeight(t))return this.customRowHeightStatusMap[null==e?void 0:e.rowIndex]=!0,A||0;const n=this.getCellHeightByRowIndex(null==e?void 0:e.rowIndex);return this.getNodeAdaptiveHeight({meta:e,cell:this.textWrapTempRowCell,defaultHeight:n})}getCellHeightByRowIndex(e){var t;return this.rowOffsets?null!==(t=this.getRowCellHeight({id:String(e)}))&&void 0!==t?t:0:this.getDefaultCellHeight()}presetRowCellHeightIfNeeded(e){var t;const{style:A}=this.spreadsheet.options,n=this.getColLeafNodes();if(((0,l.isEmpty)(n)||(null===(t=null==A?void 0:A.dataCell)||void 0===t?void 0:t.maxLines)<=1)&&this.spreadsheet.theme.dataCell.text.fontSize<=12&&this.spreadsheet.theme.dataCell.bolderText.fontSize<=12)return;const i=(0,l.max)(n.map(t=>{const A=this.getCellMeta(e,t.colIndex);return this.getDataCellAdaptiveHeight(A)}))||this.getDefaultCellHeight();(0,l.set)(this.spreadsheet.options,`style.rowCell.heightByField.${e}`,i)}calculateRowOffsets(){var e,t,A;const{style:n}=this.spreadsheet.options,i=null===(e=null==n?void 0:n.rowCell)||void 0===e?void 0:e.heightByField,r=(null===(t=null==n?void 0:n.dataCell)||void 0===t?void 0:t.maxLines)>1&&(null===(A=null==n?void 0:n.dataCell)||void 0===A?void 0:A.wordWrap)||this.spreadsheet.theme.dataCell.text.fontSize>12||this.spreadsheet.theme.dataCell.bolderText.fontSize>12;if((0,l.keys)(i).length||r){const e=this.spreadsheet.dataSet.getDisplayDataSet();this.textWrapNodeHeightCache.clear(!1),this.customRowHeightStatusMap={},this.rowOffsets=[0],this.lastRowOffset=0,e.forEach((e,t)=>{this.presetRowCellHeightIfNeeded(t);const A=this.getCellHeightByRowIndex(t),n=this.lastRowOffset+A;this.rowOffsets.push(n),this.lastRowOffset=n})}}destroy(){super.destroy(),this.spreadsheet.off(iA.RANGE_SORT,this.onSortHandler),this.spreadsheet.off(iA.RANGE_FILTER,this.onFilterHandler)}calculateCornerBBox(){const{colsHierarchy:e}=this.getLayoutResult(),t=yi(e.height);this.cornerBBox=new Wi(this),this.cornerBBox.height=t,this.cornerBBox.maxY=t}doLayout(){const e=new oo,{colLeafNodes:t,colsHierarchy:A}=this.buildColHeaderHierarchy();return this.calculateColNodesCoordinate(t,A),{colNodes:A.getNodes(),colLeafNodes:t,colsHierarchy:A,rowNodes:[],rowsHierarchy:e,rowLeafNodes:[],cornerNodes:[]}}buildColHeaderHierarchy(){const e=lo({isRowHeader:!1,spreadsheet:this.spreadsheet});return{colLeafNodes:e.leafNodes,colsHierarchy:e.hierarchy}}getCellMeta(e=0,t=0){var A,n,i;const{options:r,dataSet:o}=this.spreadsheet,s=this.getColLeafNodes()[t];if(!s)return null;let a;const l=s.x,u=this.viewCellHeights.getCellOffsetY(e),c=this.getCellHeightByRowIndex(e);a=(null===(A=r.seriesNumber)||void 0===A?void 0:A.enable)&&s.field===Se?e+1:o.getCellData({query:{field:s.field,rowIndex:e}});const h=s.field,d=a,f={rowIndex:e},g={colIndex:t},p={spreadsheet:this.spreadsheet,x:l,y:u,width:s.width,height:c,data:{[s.field]:a},rowIndex:e,colIndex:t,isTotals:!1,colId:s.id,rowId:String(e),valueField:h,fieldValue:d,id:kt(String(e),s.id),rowQuery:f,colQuery:g,query:Object.assign(Object.assign({},f),g)};return null!==(i=null===(n=r.layoutCellMeta)||void 0===n?void 0:n.call(r,p))&&void 0!==i?i:p}getAdaptiveColWidth(e){var t;const{dataCell:A}=this.spreadsheet.options.style,{seriesNumber:n}=this.spreadsheet.options;if(this.spreadsheet.getLayoutWidthType()!==_i.Compact){const t=this.getSeriesNumberWidth(),i=e.length-((null==n?void 0:n.enable)?1:0),r=this.getCanvasSize().width-t-Ei.getVerticalBorderWidth(this.spreadsheet);return Math.max(null==A?void 0:A.width,yi(r/Math.max(1,i)))}return Bi(null!==(t=null==A?void 0:A.width)&&void 0!==t?t:0)}calculateColLeafNodesWidth(e,t){let A=pr.blankNode(),n=0;const i=this.getAdaptiveColWidth(e),r=t.getLeaves(),o=this.spreadsheet.getLayoutWidthType()!==_i.Compact;let s=-1,a=0;if(o){const{colCell:e}=this.spreadsheet.options.style;for(let t=r.length-1;t>=0;t--){const A=r[t];if(A.field!==Se){const n=(0,l.isNumber)(this.getColCellDraggedWidth(A)),i=(0,l.isNumber)(this.getCellCustomSize(A,null==e?void 0:e.width));if(!n&&!i){s=t;break}}}if(s>=0){const{seriesNumber:e}=this.spreadsheet.options,t=this.getSeriesNumberWidth(),A=r.length-((null==e?void 0:e.enable)?1:0),n=this.getCanvasSize().width-t-Ei.getVerticalBorderWidth(this.spreadsheet);a=Math.max(0,Bi(n)-Bi(i)*Math.max(1,A))}}r.forEach((e,r)=>{e.colIndex=n,n+=1,e.x=A.x+A.width,e.width=this.getColLeafNodesWidth(e,i),r===s&&(e.width+=a),Wr(this.spreadsheet,null,e),t.width+=e.width,A=e})}calculateColNodesHeight(e){e.getNodes().forEach(t=>{var A,n;t.y=0===t.level?0:(null===(A=null==t?void 0:t.parent)||void 0===A?void 0:A.y)+(null===(n=null==t?void 0:t.parent)||void 0===n?void 0:n.height)||0,t.height=this.getColNodeHeight({colNode:t,colsHierarchy:e,useCache:!1})})}calculateColNodesCoordinate(e,t){this.calculateColLeafNodesWidth(e,t),this.calculateColParentNodeWidthAndX(e),this.updateColsHierarchySampleMaxHeightNodes(t),this.calculateColNodesHeight(t),this.updateCustomFieldsSampleNodes(t),this.adjustCustomColLeafNodesHeight({leafNodes:e,hierarchy:t})}getCompactColNodeWidth(e){const{theme:t,dataSet:A}=this.spreadsheet,{bolderText:n}=t.colCell,{text:i,cell:r}=t.dataCell,s=A.getDisplayDataSet(),a=A.getFieldFormatter(e.field),u=(0,l.maxBy)(null==s?void 0:s.slice(0,50).map(t=>{var A;return`${null!==(A=null==a?void 0:a(t[e.field]))&&void 0!==A?A:t[e.field]}`}),e=>this.measureTextWidth(e,i));P.getInstance().logger("Max Label In Col:",e.field,u);const c=this.measureTextWidth(u,i)+r.padding.left+r.padding.right,h=this.measureTextWidth(e.value,n)+((e,t,A)=>{var n,i;const r=(0,l.get)(A,"cell.padding"),s=null!==(i=null===(n=null==A?void 0:A.cell)||void 0===n?void 0:n.horizontalBorderWidth)&&void 0!==i?i:1,a=((e,t,A)=>{var n,i,r,o;const s=(null===(i=null===(n=A.icon)||void 0===n?void 0:n.margin)||void 0===i?void 0:i.left)||0,a=(null===(o=null===(r=A.icon)||void 0===r?void 0:r.margin)||void 0===o?void 0:o.right)||0,u=e.store.get("hiddenColumnsDetail",[]);let c=!1,h=!1;u.forEach(e=>{var A,n,i,r;(null===(n=null===(A=null==e?void 0:e.displaySiblingNode)||void 0===A?void 0:A.prev)||void 0===n?void 0:n.field)===t&&(c=!0),(null===(r=null===(i=null==e?void 0:e.displaySiblingNode)||void 0===i?void 0:i.next)||void 0===r?void 0:r.field)===t&&(h=!0)});const d=(0,l.get)(A,"icon.size");return{left:h?d+a:0,right:c?d+s:0}})(e,t.field,A),u=((e,t,A,n)=>{var i,r;const o=null==n?void 0:n.size,s=null==n?void 0:n.margin;let a=0;return a=e.options.showDefaultHeaderActionIcon?1:null!==(r=null===(i=Oe(e.options.headerActionIcons,t,A))||void 0===i?void 0:i.icons.length)&&void 0!==r?r:0,a*(o+s.left)+(a>0?s.right:0)})(e,t,o.COL_CELL,null==A?void 0:A.icon);return r.left+r.right+u+a.left+a.right+s})(this.spreadsheet,e,t.colCell),{compactExtraWidth:d=0,compactMinWidth:f}=this.spreadsheet.options.style||{},g=Bi(Math.max(h,c)+d);return(0,l.isNumber)(f)?Math.max(g,f):g}getColLeafNodesWidth(e,t){const{colCell:A}=this.spreadsheet.options.style,n=this.spreadsheet.getLayoutWidthType(),i=this.getColCellDraggedWidth(e);if((0,l.isNumber)(i))return Bi(i);const r=this.getCellCustomSize(e,null==A?void 0:A.width);return(0,l.isNumber)(r)?Bi(r):e.field===Se?this.getSeriesNumberWidth():n===_i.Compact?this.getCompactColNodeWidth(e):Bi(t)}getViewCellHeights(){const e=this.getDefaultCellHeight();return{getTotalHeight:()=>this.rowOffsets?(0,l.last)(this.rowOffsets)||0:e*this.spreadsheet.dataSet.getDisplayDataSet().length,getCellOffsetY:t=>t<=0?0:this.rowOffsets?this.rowOffsets[t]:t*e,getTotalLength:()=>this.spreadsheet.dataSet.getDisplayDataSet().length,getIndexRange:(t,A)=>{if(this.rowOffsets)return Pi(this.rowOffsets,t,A);const n=yi(t/e,0),i=A%e===0?A/e-1:yi(A/e,0);return{start:Math.max(0,n),end:Math.max(0,i)}}}}renderRowResizeArea(){const{resize:e}=this.spreadsheet.options.interaction;if(!((0,l.isBoolean)(e)?e:null==e?void 0:e.rowCellVertical))return;const t=this.foregroundGroup.getElementById(gt);t&&t.removeChildren(),Vi(this.panelGroup.children,AA).forEach(e=>{e.drawResizeArea()})}getRowHeader(){return null}getColHeader(){if(!this.columnHeader){const{x:e,width:t,viewportHeight:A,viewportWidth:n}=this.panelBBox;return new Pr({width:t,height:this.cornerBBox.height,viewportWidth:n,viewportHeight:A,cornerWidth:this.cornerBBox.width,position:{x:e,y:0},nodes:this.getColNodes(),sortParam:this.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader}getSeriesNumberHeader(){return null}getScrollbarPosition(){const{height:e}=this.getCanvasSize(),t=super.getScrollbarPosition(),A=this.spreadsheet.dataSet.isEmpty()?e-this.scrollBarSize:t.maxY;return Object.assign(Object.assign({},t),{maxY:A})}getSeriesNumberCells(){return this.getDataCells().filter(e=>e.getMeta().valueField===Se)}getContentWidth(){const{colsHierarchy:e}=this.layoutResult;return Bi(e.width)}getContentHeight(){const{getTotalHeight:e}=this.getViewCellHeights(),{colsHierarchy:t}=this.layoutResult;return Bi(e()+t.height+Ei.getHorizontalBorderWidth(this.spreadsheet))}}var co=A("./node_modules/.pnpm/@antv+g-canvas@2.2.0/node_modules/@antv/g-canvas/dist/index.esm.js");const ho="antv-s2",fo=`${`${ho}-tooltip`}-container`,go=`${fo}-show`,po=`${fo}-hide`;class vo{constructor(){this.store=new Map}set(e,t){return this.store.set(e,t)}get(e,t){var A;return null!==(A=this.store.get(e))&&void 0!==A?A:t}clear(){this.store.clear()}size(){return this.store.size}}const mo={data:[],fields:{rows:[],columns:[],values:[],valueInCols:!0},meta:[],sortParams:[],filterParams:[]},Co=(...e)=>{const t=[...e,(e,t)=>{if((0,l.isArray)(e)&&(0,l.isArray)(t))return t}];return(0,l.mergeWith)({},...t)},wo=(...e)=>{var t;const A=Co(mo,...e);A.fields=(e=>{const t=["rows","columns","values"].reduce((t,A)=>{const n=e[A],i=(0,l.uniq)(n);return(0,l.isEqual)(i,n)||console.warn(`fields.${A}:[${n}] should be unique`),t[A]=i,t},{});return Object.assign(Object.assign({},e),t)})(A.fields);const n=null===(t=A.fields.rows)||void 0===t?void 0:t.some(e=>!(0,l.isString)(e)),i=(0,l.isEmpty)(A.fields.values);return(n||i)&&(A.fields.valueInCols=!1),A},yo=(e,t,A)=>{let n;const i=e.split("[&]");if(A)n=[e];else{n=[Ft(i[0],i[1])];for(let e=2;e<i.length;e+=1)n.push(Ft(n[e-2],i[e]))}return(0,l.filter)(t,e=>{var t;return n.includes(null===(t=e.getMeta())||void 0===t?void 0:t.id)})},Bo=e=>[f.META,f.CONTROL].includes(e.key),Eo=e=>e.ctrlKey||e.metaKey,xo=e=>{const t=e.getMeta(),{id:A,colIndex:n,rowIndex:i,rowQuery:r}=t||{};return{id:A,colIndex:n,rowIndex:i,rowQuery:r,type:e instanceof nA?o.ROW_CELL:e.cellType}};function bo(e,t){const A=Math.min(e.rowIndex,t.rowIndex),n=Math.max(e.rowIndex,t.rowIndex);return{start:{rowIndex:A,colIndex:Math.min(e.colIndex,t.colIndex)},end:{rowIndex:n,colIndex:Math.max(e.colIndex,t.colIndex)}}}const Fo=(e,t)=>{const{facet:A}=e.spreadsheet,{colHeader:n,rowHeader:i}=e.getSelectedCellHighlight();n&&e.updateCells(A.getColCells()),i&&e.updateCells(A.getRowCells()),t()},So=e=>(0,l.mapValues)((0,l.groupBy)(e,"type"),e=>(0,l.map)(e,"id")),To=e=>{var t;const A=e.store.get("visibleActionIcons"),n=e.interaction.getInteractedCells(),i=e.interaction.getState().cells;if((0,l.isEmpty)(n)&&(0,l.isEmpty)(i)&&(0,l.isEmpty)(A))return!1;if((0,l.forEach)(A,e=>{e.toggleVisibility(!1)}),e.store.set("visibleActionIcons",[]),(0,l.forEach)(n,e=>{e.hideInteractionShape()}),e.interaction.resetState(),null===(t=e.options.interaction)||void 0===t?void 0:t.selectedCellsSpotlight){const t=e.interaction.getUnSelectedDataCells()||[];(0,l.forEach)(t,e=>{e.clearUnselectedState()})}return!0},Lo=e=>e&&"appendInfo"in e?e.appendInfo:{},Qo=ze({brandColor:"#3471F9",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:5},{basicColorIndex:4,standardColorIndex:6},{basicColorIndex:5,standardColorIndex:6},{basicColorIndex:6,standardColorIndex:6},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:4},{basicColorIndex:11,standardColorIndex:4},{basicColorIndex:12,standardColorIndex:5}]}),Io={default:ze({brandColor:"#326EF4",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:5},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:5},{basicColorIndex:12,standardColorIndex:5}]}),colorful:Qo,gray:ze({brandColor:"#9DA7B6",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:8},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:3},{basicColorIndex:12,standardColorIndex:3}]}),dark:{brandColor:"#255dff",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},basicColors:["#ffffff","#151a27","#213f94","#133aad","#213f94","#255dff","#4b91ff","#4b91ff","#191919","#1e2436","#0647b1","#7899ff","#7899ff","#f0f0f0","#dcdcdc"],basicColorRelations:[]}},Uo="Roboto, PingFangSC, Microsoft YaHei, Arial, sans-serif",Oo=`${ho}-dark-theme`,Ho=e=>Object.assign(Object.assign({},null==e?void 0:e.colQuery),null==e?void 0:e.rowQuery),Mo=(e,t)=>{if(!e)return;const{style:A,className:n=[],visible:i,dark:r=!1}=t;if(A&&Object.assign(e.style,A),n.length){const t=n.filter(Boolean);e.classList.add(...t)}e.classList.toggle(go,i),e.classList.toggle(po,!i),e.classList.toggle(Oo,r)},_o=(e,{data:t,field:A,valueField:n,useCompleteDataForFormatter:i=!0,targetCell:r})=>{var o,s;const a=null===(o=null==e?void 0:e.dataSet)||void 0===o?void 0:o.getFieldName(A),u=e.isCustomRowFields()&&(null==e?void 0:e.dataSet.getCustomRowFieldName(r))||a,c=null===(s=null==e?void 0:e.dataSet)||void 0===s?void 0:s.getFieldFormatter(A),h=Mt.getFieldValue(t,A),d=(0,l.isObject)(h)?null:h;return{name:u,value:c(n||d,i?t:void 0)}},ko=(e,t,A)=>{const n=(0,l.filter)((0,l.concat)([],t),e=>e!==Be&&Mt.getFieldValue(A,e));return(0,l.map)(n,t=>_o(e,{data:A,field:t,useCompleteDataForFormatter:!1}))},Ro=(e,t,A=!0)=>{const n=[];return(0,l.forEach)(t,(t,i)=>{(0,l.forEach)(e,e=>{A||-1===e.colIndex?A&&-1!==e.rowIndex&&n.push([e.rowIndex,i]):n.push([i,e.colIndex])})}),n},No=e=>{const{spreadsheet:t,targetCell:A,options:n={}}=e,i=[],r={};if(t.isTableMode()&&(null==n?void 0:n.onlyShowCellText)){const e=null==A?void 0:A.getMeta();return[{selectedData:(null==e?void 0:e.field)?t.dataSet.getCellMultiData({query:{field:e.field}}):[t.dataSet.getRowData(e)],name:"",value:""}]}const s=((e,t,A)=>{const{facet:n}=e,i=e=>{if(!e)return!1;const A=null==t?void 0:t.getMeta(),i=null==A?void 0:A.isTotals,r=(null==t?void 0:t.cellType)===o.COL_CELL;if(!r&&(null==t?void 0:t.cellType)!==o.ROW_CELL)return!1;const s=n.getColNodeByIndex(e.colIndex),a=n.getRowNodeByIndex(e.rowIndex);return!i&&(null==e?void 0:e.isTotals)||i&&(r?null==a?void 0:a.isTotals:null==s?void 0:s.isTotals)};if(A){const t=(e=>{var t;const A=e.facet.getRowLeafNodes(),n=e.facet.getColLeafNodes(),{nodes:i=[],cells:r=[]}=e.interaction.getState(),s=null===(t=null==r?void 0:r[0])||void 0===t?void 0:t.type,a=e.isHierarchyTreeType()?i:i.filter(e=>null==e?void 0:e.isLeaf);return s===o.COL_CELL?Ro(a,A,!1):s===o.ROW_CELL?Ro(a,n):[]})(e);return(0,l.compact)((0,l.map)(t,([e,t])=>{const A=n.getCellMeta(e,t);if(!i(A))return(null==A?void 0:A.data)||Ho(A)}))}return e.interaction.getCells().filter(e=>{const t=n.getCellMeta(e.rowIndex,e.colIndex);return!i(t)}).map(e=>{const t=n.getCellMeta(e.rowIndex,e.colIndex);return(null==t?void 0:t.data)||Ho(t)})})(t,A,n.onlyShowCellText);return(0,l.forEach)(s,e=>{var t;const A=null==e?void 0:e[Be];r[A]?null===(t=r[A])||void 0===t||t.push(e):r[A]=[e]}),(0,l.mapKeys)(r,(e,o)=>{var s,a;const u=t.isCustomHeaderFields()?null==t?void 0:t.dataSet.getCustomRowFieldName(A):((e,t,A)=>{var n;if(A)return ht("总计");const i=null===(n=null==e?void 0:e.dataSet)||void 0===n?void 0:n.getFieldName(t);return i&&"undefined"!==i?i:""})(t,o,null==n?void 0:n.isTotals);let c="",h="";if((0,l.every)(e,e=>Kn((0,l.get)(e,ye)))){const{placeholder:e}=t.options,A=It(r,e);c=A,h=A}else{const A=null===(s=null==t?void 0:t.dataSet)||void 0===s?void 0:s.getFieldFormatter(o),n=Wn(e,ye);h=n,c=null!==(a=null==A?void 0:A(n,e))&&void 0!==a?a:parseFloat(n.toPrecision(16))}i.push({selectedData:e,name:u||"",value:c,originValue:h})}),t.isCustomHeaderFields()?(e=>{const t=(0,l.groupBy)(e,"name");return Object.keys(t||{}).map(e=>{const A=t[e],n=(0,l.flatMap)(A,e=>e.selectedData),i=A.filter(e=>(0,l.isNumber)(e.value));return{name:e,selectedData:n,value:(0,l.isEmpty)(i)?null:(0,l.sumBy)(i,"value")}})})(i):i},Do=e=>{if(!e.interaction.isSelectedState())return[];const{valueInCols:t}=e.dataCfg.fields;return e.interaction.getCells().reduce((A,n)=>{const i=e.facet.getCellMeta(null==n?void 0:n.rowIndex,null==n?void 0:n.colIndex),r=Ho(i);if((0,l.isEmpty)(i)||(0,l.isEmpty)(r))return[];const o=Object.assign(Object.assign({},r),{colIndex:t?null==i?void 0:i.colIndex:null,rowIndex:t?null:null==i?void 0:i.rowIndex});return A.find(e=>(0,l.isEqual)(o,e))||A.push(o),A},[])},Po=(e,t)=>{var A;if(!t||!e)return null;const{options:n,interaction:i}=e,r=null===(A=e.getCellType)||void 0===A?void 0:A.call(e,null==t?void 0:t.target),s=(0,l.last)(i.getInteractedCells());return((e={},t)=>{const A=t=>Co(e,t),{colCell:n,rowCell:i,dataCell:r,cornerCell:s}=e;return t===o.COL_CELL?A(n):t===o.ROW_CELL?A(i):t===o.DATA_CELL?A(r):t===o.CORNER_CELL?A(s):Object.assign({},e)})(n.tooltip,r||(null==s?void 0:s.cellType))};class Go{constructor(e){this.isLinkFieldText=e=>{const t=this.getCellAppendInfo(e);return null==t?void 0:t.isLinkFieldText},this.spreadsheet=e,this.bindEvents()}getCellAppendInfo(e){return Lo(e)}getTooltipOperator(e,t=[]){const A=this.spreadsheet.getCell(e.target),{operation:n}=Po(this.spreadsheet,e);return((e,t)=>{var A;const{defaultMenus:n=[],cell:i}=t,r=(e=[])=>e.filter(e=>{var t;return(0,l.isFunction)(e.visible)?e.visible(i):null===(t=e.visible)||void 0===t||t}).map(e=>(e.children&&(e.children=r(e.children)),e)),o=r(null===(A=null==e?void 0:e.menu)||void 0===A?void 0:A.items);return{menu:Object.assign(Object.assign({},null==e?void 0:e.menu),{items:(0,l.compact)([...n,...o])})}})(n,{defaultMenus:t,cell:A})}reset(){}}class Ko extends Go{bindEvents(){this.bindDataCellClick()}bindDataCellClick(){this.spreadsheet.on(iA.DATA_CELL_CLICK,e=>{var t,A;e.stopPropagation();const{interaction:n}=this.spreadsheet;if(n.clearHoverTimer(),n.hasIntercepts([p.CLICK]))return;if(this.isLinkFieldText(e.target))return void this.emitLinkFieldClickEvent(e);const o=this.spreadsheet.getCell(e.target),s=o.getMeta();s&&(n.addIntercepts([p.HOVER]),n.isSelectedCell(o)?(1===e.detail||1===(null===(t=e.nativeEvent)||void 0===t?void 0:t.detail)||1===(null===(A=e.originalEvent)||void 0===A?void 0:A.detail)||lt())&&(n.reset(),n.emitSelectEvent({event:e,targetCell:o,interactionName:i.DATA_CELL_CLICK})):(n.changeState({cells:[xo(o)],stateName:r.SELECTED,onUpdateCells:Fo}),n.emitSelectEvent({event:e,targetCell:o,interactionName:i.DATA_CELL_CLICK,cells:[o]}),this.showTooltip(e,s),n.updateDataCellRelevantHeaderCells(r.SELECTED,s),this.spreadsheet.emit(iA.DATA_CELL_CLICK_TRIGGERED_PRIVATE,o)))})}showTooltip(e,t){const{data:A,isTotals:n=!1,fieldValue:i,valueField:r}=t,o=this.spreadsheet.isTableMode(),s=[(o?Object.assign(Object.assign({},A),{value:i,valueField:r}):A)||Object.assign(Object.assign({},t.rowQuery),t.colQuery)],a=this.getTooltipOperator(e);this.spreadsheet.showTooltipWithInfo(e,s,{isTotals:n,operator:a,hideSummary:!0,onlyShowCellText:o})}emitLinkFieldClickEvent(e){const{meta:t}=this.getCellAppendInfo(e.target),{valueField:A,data:n}=t;this.spreadsheet.emit(iA.GLOBAL_LINK_FIELD_JUMP,{meta:t,field:A,record:Object.assign({rowIndex:null==t?void 0:t.rowIndex},n)})}}class Vo extends Go{constructor(){super(...arguments),this.isMultiSelection=!1,this.handleRowColClick=e=>{if(e.stopPropagation(),this.isLinkFieldText(e.target))return;const{interaction:t,options:A}=this.spreadsheet,n=this.spreadsheet.getCell(e.target);if(n instanceof Ir)return;const{multiSelection:r}=A.interaction,s=!(!r||!this.isMultiSelection);t.changeCell({event:e,cell:n,isMultiSelection:s,interactionName:s?n.cellType===o.ROW_CELL?i.ROW_CELL_MULTI_SELECTION:i.COL_CELL_MULTI_SELECTION:n.cellType===o.ROW_CELL?i.ROW_CELL_CLICK:i.COL_CELL_CLICK,scrollIntoView:!1})&&this.showTooltip(e)},this.getHideColumnField=e=>{var t;return(null===(t=e.extra)||void 0===t?void 0:t.isCustomNode)?e.id:this.spreadsheet.isTableMode()?e.field:e.id}}bindEvents(){this.bindKeyboardDown(),this.bindKeyboardUp(),this.bindColCellClick(),this.bindRowCellClick(),this.bindTableColExpand(),this.bindMouseMove()}reset(){this.isMultiSelection=!1,this.spreadsheet.interaction.removeIntercepts([p.CLICK])}bindKeyboardDown(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_DOWN,e=>{Bo(e)&&(this.isMultiSelection=!0)})}bindKeyboardUp(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_UP,e=>{Bo(e)&&this.reset()})}bindMouseMove(){this.spreadsheet.on(iA.GLOBAL_MOUSE_MOVE,e=>{this.isMultiSelection&&!Eo(e)&&this.reset()})}bindRowCellClick(){this.spreadsheet.on(iA.ROW_CELL_CLICK,e=>{this.handleRowColClick(e)})}bindColCellClick(){this.spreadsheet.on(iA.COL_CELL_CLICK,e=>{this.handleRowColClick(e)})}showTooltip(e){const{operation:t,enable:A}=Po(this.spreadsheet,e);if(!A)return;const{interaction:n}=this.spreadsheet,i=n.isSelectedState()?(r=n.getActiveCells(),(0,l.map)(r,e=>{const t=e.getMeta();return(0,l.assign)({},t.query||{},(0,l.pick)(t,["colIndex","rowIndex"]))})):[];var r;const o=this.getHeaderTooltipOperator(e,t);this.spreadsheet.showTooltipWithInfo(e,i,{onlyShowCellText:!0,operator:o})}getHeaderTooltipOperator(e,t){const A=this.spreadsheet.getCell(e.target),n=A.getMeta(),i=A.cellType===o.COL_CELL,r=1===this.spreadsheet.facet.getColLeafNodes().length,s={key:"hiddenColumns",label:ht("隐藏"),icon:"EyeOutlined"},a=i&&!r&&n.isLeaf&&t.hiddenColumns,l=Object.assign(Object.assign({},s),{onClick:()=>{this.hideSelectedColumns()}});return this.getTooltipOperator(e,a?[l]:[])}bindTableColExpand(){this.spreadsheet.on(iA.COL_CELL_EXPANDED,(e,t)=>{this.handleExpandIconClick(e,t)})}hideSelectedColumns(){return(0,Q.sH)(this,void 0,void 0,function*(){const{interaction:e}=this.spreadsheet,t=e.getActiveCells().map(e=>e.getMeta()).map(this.getHideColumnField);yield Qi(this.spreadsheet,t,!0)})}handleExpandIconClick(e,t){return(0,Q.sH)(this,void 0,void 0,function*(){const A=this.spreadsheet.store.get("hiddenColumnsDetail",[]),{hideColumnNodes:n=[]}=(0,l.findLast)(A,({displaySiblingNode:A})=>Ii(A,e.id,t))||{},{hiddenColumnFields:i}=this.spreadsheet.options.interaction,r=n.map(this.getHideColumnField),o=(0,l.difference)(i,r),s=A.filter(({displaySiblingNode:A})=>!Ii(A,e.id,t));this.spreadsheet.setOptions({interaction:{hiddenColumnFields:o}}),this.spreadsheet.store.set("hiddenColumnsDetail",s),this.spreadsheet.interaction.reset(),yield this.spreadsheet.render({reloadData:!1,rebuildHiddenColumnsDetail:!1})})}}class zo extends Go{constructor(){super(...arguments),this.getCellData=e=>{var t,A;const n=e.getHeadLeafChild(),i=this.spreadsheet.dataSet.getCellMultiData({query:null==n?void 0:n.query})[0],r=Mt.getFieldValue(i);return Object.assign(Object.assign({},r),{rowIndex:null!==(t=e.rowIndex)&&void 0!==t?t:null==n?void 0:n.rowIndex,colIndex:null!==(A=e.colIndex)&&void 0!==A?A:null==n?void 0:n.colIndex})}}bindEvents(){this.bindRowCellClick(),this.bindColCellClick()}onHeaderCellClick(e){if(this.spreadsheet.interaction.hasIntercepts([p.CLICK]))return;if(!this.isLinkFieldText(e.target))return;const{meta:t}=this.getCellAppendInfo(e.target),A=t.field,n=this.getCellData(t);this.spreadsheet.emit(iA.GLOBAL_LINK_FIELD_JUMP,{field:A,meta:t,record:n})}bindRowCellClick(){this.spreadsheet.on(iA.ROW_CELL_CLICK,e=>{this.onHeaderCellClick(e)})}bindColCellClick(){this.spreadsheet.on(iA.COL_CELL_CLICK,e=>{this.onHeaderCellClick(e)})}}class Wo extends Go{bindEvents(){this.bindDataCellClick()}bindDataCellClick(){this.spreadsheet.on(iA.MERGED_CELLS_CLICK,e=>{e.stopPropagation();const{interaction:t}=this.spreadsheet;t.hasIntercepts([p.CLICK])||t.addIntercepts([p.HOVER])})}}const jo=(e,t)=>{const A=window.matchMedia("(orientation: portrait)").matches,n=A?"90vw":"90vh",i=A?"60vw":"60vh";Object.assign(e.style,Object.assign({maxWidth:n,maxHeight:n,minHeight:i,minWidth:i,objectFit:"contain"},t))};class Xo extends Go{bindEvents(){[iA.DATA_CELL_CLICK,iA.ROW_CELL_CLICK,iA.COL_CELL_CLICK].forEach(e=>{this.spreadsheet.on(e,e=>this.bindMediaCellClick(e))})}bindMediaCellClick(e){var t,A,n,i;const r=this.spreadsheet.getCell(e.target),s=null===(A=null===(t=null==r?void 0:r.getRenderer)||void 0===t?void 0:t.call(r))||void 0===A?void 0:A.type;s===T.IMAGE&&"image"!==(0,l.get)(e.target,"nodeName")||s===T.VIDEO&&(0,l.get)(e.target,"name")!==L||(null===(i=null===(n=null==r?void 0:r.getRenderer)||void 0===n?void 0:n.call(r))||void 0===i?void 0:i.type)&&(this.spreadsheet.isPivotMode()||r.cellType!==o.COL_CELL)&&(this.spreadsheet.emit(iA.GLOBAL_PREVIEW_CLICK,e),(e=>{(0,Q.sH)(void 0,void 0,void 0,function*(){const t=e.getRenderer(),{type:A,prepareText:n}=t,i=yield H(n,e.getFieldValue().toString());if(!1===t.clickToPreview||![T.IMAGE,T.VIDEO].includes(t.type))return;const r=e.getStyle("preview"),o=(e=>{const t=document.createElement("div");return Object.assign(t.style,Object.assign({width:"100vw",height:"100vh",position:"fixed",top:"0",left:"0",backgroundColor:"rgba(30, 30, 30, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",zIndex:"9999",cursor:"pointer",touchAction:"none",backdropFilter:"blur(2px)",pointerEvents:"auto"},e)),t.className=`${ho}-preview-overlay`,t})(null==r?void 0:r.overlay),s=A===T.IMAGE?yield(e=>(0,Q.sH)(void 0,void 0,void 0,function*(){const{src:t,mediaContainerStyle:A,config:n}=e,i=yield U({src:t,fallback:null==n?void 0:n.fallback,timeout:null==n?void 0:n.timeout});return jo(i,A),i.alt="preview",i}))({src:i,mediaContainerStyle:null==r?void 0:r.mediaContainer,config:t}):((e,t)=>{const A=document.createElement("video");return A.src=e,A.controls=!0,A.preload="auto",A.playsInline=!0,A.setAttribute("webkit-playsinline","true"),A.setAttribute("playsinline","true"),jo(A,t),A})(i,null==r?void 0:r.mediaContainer),a=e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),e.target===o&&(document.body.removeChild(o),s.remove(),document.body.style.overflow="auto")};setTimeout(()=>{["click","touchstart","touchend"].forEach(e=>{o.addEventListener(e,a,{passive:!1})})},500),document.body.style.overflow="hidden",o.appendChild(s),document.body.appendChild(o)})})(r))}}class Yo extends Go{bindEvents(){this.bindCornerCellClick()}bindCornerCellClick(){this.spreadsheet.on(iA.CORNER_CELL_CLICK,e=>{const t=this.spreadsheet.getCell(e.target);if(!t)return;const A=t.getMeta();switch(null==A?void 0:A.cornerType){case Ar.Row:this.onRowCornerClick(null==A?void 0:A.field,e);break;case Ar.Col:this.onColCornerClick(null==A?void 0:A.field,e);break;case Ar.Series:this.onSeriesCornerClick(null==A?void 0:A.field,e)}})}onRowCornerClick(e,t){const A=this.getSelectedRowNodes(e);this.selectCells(A,t)}onColCornerClick(e,t){const A=this.getSelectedColNodes(e);this.selectCells(A,t)}onSeriesCornerClick(e,t){const A=this.spreadsheet.facet.getSeriesNumberNodes();this.selectCells(A,t)}getSelectedRowNodes(e){const{facet:t}=this.spreadsheet;if(this.spreadsheet.isHierarchyTreeType())return t.getRowNodes();if(!this.spreadsheet.isCustomRowFields())return t.getRowNodesByField(e);const A=t.getRowNodesByField(e)[0];return t.getRowNodes(null==A?void 0:A.level)}getSelectedColNodes(e){const{facet:t}=this.spreadsheet;if(!this.spreadsheet.isCustomColumnFields())return t.getColNodesByField(e);const A=t.getColNodesByField(e)[0];return t.getColNodes(null==A?void 0:A.level)}getCellMetas(e,t){return e.map(e=>({id:e.id,colIndex:-1,rowIndex:-1,type:t}))}emitSelectEvent(e,t){this.spreadsheet.interaction.emitSelectEvent({event:e,targetCell:t,interactionName:i.CORNER_CELL_CLICK})}selectCells(e,t){var A;const{interaction:n}=this.spreadsheet,i=null===(A=e[0])||void 0===A?void 0:A.belongsCell,o=this.getCellMetas(e,null==i?void 0:i.cellType),s=this.spreadsheet.getCell(t.target);if(i&&n.isSelectedCell(i))return n.reset(),void this.emitSelectEvent(t,s);(0,l.isEmpty)(e)||(0,l.isEmpty)(o)||(n.addIntercepts([p.HOVER]),n.changeState({cells:o,stateName:r.SELECTED}),n.highlightNodes(e,r.SELECTED),null==s||s.updateByState(r.SELECTED),this.showTooltip(t),this.emitSelectEvent(t,s))}showTooltip(e){const t=this.spreadsheet.interaction.getActiveCells(),A=this.getTooltipOperator(e);this.spreadsheet.showTooltipWithInfo(e,[],{operator:A,data:{summaries:[{selectedData:t,name:"",value:null}]}})}}class qo extends Go{bindEvents(){this.bindDataCellHover(),this.bindHeaderCellHover()}changeStateToHoverFocus(e,t){var A;if(!e)return;const n=e.getMeta(),{interaction:i}=this.spreadsheet,{interaction:o}=this.spreadsheet.options,{hoverFocus:s}=o;i.clearHoverTimer();const a=()=>{if(i.hasIntercepts([p.HOVER]))return;i.changeState({cells:[xo(e)],stateName:r.HOVER_FOCUS});const A=this.spreadsheet.isTableMode(),s={isTotals:n.isTotals,hideSummary:!0,onlyShowCellText:A};(null==o?void 0:o.hoverHighlight)&&i.updateDataCellRelevantHeaderCells(r.HOVER,n),this.spreadsheet.emit(iA.DATA_CELL_HOVER_TRIGGERED_PRIVATE,e);const a=this.getCellData(n,A);this.spreadsheet.showTooltipWithInfo(t,a,s)},u=(0,l.isBoolean)(s)?800:null!==(A=null==s?void 0:s.duration)&&void 0!==A?A:800;if(0===u)a();else{const e=window.setTimeout(()=>a(),u);i.setHoverTimer(e)}}handleHeaderHover(e){var t;const A=this.spreadsheet.getCell(e.target);if((0,l.isEmpty)(A))return;const{interaction:n,facet:i}=this.spreadsheet;n.clearHoverTimer(),n.isActiveCell(A)||(n.changeState({cells:[xo(A)],stateName:r.HOVER}),A.update(),this.showEllipsisTooltip(e,A),null===(t=i.centerFrame)||void 0===t||t.toFront())}showEllipsisTooltip(e,t){if(!t||!t.isTextOverflowing())return void this.spreadsheet.hideTooltip();const A=t.getMeta(),n={isTotals:A.isTotals,hideSummary:!0,onlyShowCellText:!0,enableFormat:!0},i=this.getCellData(A,n.onlyShowCellText);this.spreadsheet.showTooltipWithInfo(e,i,n)}getCellData(e={},t){const{data:A,query:n,value:i,field:r,fieldValue:o,valueField:s,rowQuery:a,colQuery:l}=e,u=A;return t?[Object.assign(Object.assign({},n),{value:i||o,valueField:r||s})]:[u||Object.assign(Object.assign({},a),l)]}bindDataCellHover(){this.spreadsheet.on(iA.DATA_CELL_HOVER,e=>{const t=this.spreadsheet.getCell(e.target);if((0,l.isEmpty)(t))return;const{interaction:A,options:n}=this.spreadsheet;if(A.isActiveCell(t))return;const{interaction:i}=n,o=null==t?void 0:t.getMeta();A.changeState({cells:[xo(t)],stateName:r.HOVER}),(null==i?void 0:i.hoverHighlight)&&A.updateDataCellRelevantHeaderCells(r.HOVER,o),(null==i?void 0:i.hoverFocus)&&this.changeStateToHoverFocus(t,e),this.spreadsheet.emit(iA.DATA_CELL_HOVER_TRIGGERED_PRIVATE,t)})}bindHeaderCellHover(){[iA.ROW_CELL_HOVER,iA.COL_CELL_HOVER,iA.CORNER_CELL_HOVER].forEach(e=>{this.spreadsheet.on(e,e=>{this.handleHeaderHover(e)})})}}class Zo extends Go{constructor(){super(...arguments),this.displayedCells=[],this.brushRangeCells=[],this.brushSelectionStage=d.UN_DRAGGED,this.brushSelectionMinimumMoveDistance=5,this.scrollAnimationComplete=!0,this.mouseMoveDistanceFromCanvas=0,this.setMoveDistanceFromCanvas=(e,t,A)=>{let n=0;if(t&&(n=e.x),A){const A=e.y;n=t?Math.max(A,n):A}this.mouseMoveDistanceFromCanvas=Math.abs(n)},this.formatBrushPointForScroll=(e,t=!1)=>{var A,n,i,r;const{x:o,y:s}=e,{facet:a}=this.spreadsheet,{minX:l,maxX:u}=t?a.cornerBBox:a.panelBBox,{minY:c,maxY:h}=a.panelBBox;let d=(null===(A=this.endBrushPoint)||void 0===A?void 0:A.x)+o,f=(null===(n=this.endBrushPoint)||void 0===n?void 0:n.y)+s,g=t?!!a.hRowScrollBar:!!a.hScrollBar,p=!!a.vScrollBar;const v=null===(r=null===(i=a.vScrollBar)||void 0===i?void 0:i.getBBox())||void 0===r?void 0:r.width;return d>u?d=u-v-2:d<l?d=l+2:g=!1,f>h?f=h-2:f<=c?f=c+2:p=!1,{x:{value:d,needScroll:g},y:{value:f,needScroll:p}}},this.autoScrollIntervalId=null,this.rectanglesIntersect=(e,t)=>e.maxX>t.minX&&e.minX<t.maxX&&e.minY<t.maxY&&e.maxY>t.minY,this.autoScrollConfig=(0,l.cloneDeep)(v),this.validateYIndex=e=>{var t,A;const{facet:n}=this.spreadsheet,i=n.frozenGroupAreas;let r=0;const o=null===(t=null==i?void 0:i.frozenRow)||void 0===t?void 0:t.range;if((null==o?void 0:o[1])&&(r=o[1]+1),e<r)return null;let s=n.getCellRange().end;const a=null===(A=null==i?void 0:i.frozenTrailingRow)||void 0===A?void 0:A.range;return(null==a?void 0:a[0])&&(s=a[0]-1),e>s?null:e},this.validateXIndex=e=>{const{facet:t}=this.spreadsheet,A=t.frozenGroupAreas;let n=0;const i=A[Dt.Col].range;if((null==i?void 0:i[1])&&(n=i[1]+1),e<n)return null;let r=t.getColLeafNodes().length-1;const o=A[Dt.TrailingCol].range;return(null==o?void 0:o[0])&&(r=o[0]-1),e>r?null:e},this.adjustNextColIndexWithFrozen=(e,t)=>{const{facet:A}=this.spreadsheet,n=A.getColLeafNodes().length,{colCount:i,trailingColCount:r}=A.getFrozenOptions(),o=A.panelScrollGroupIndexes;return i>0&&t===C.SCROLL_UP&&jt(e,i)?o[0]:r>0&&t===C.SCROLL_DOWN&&Xt(e,r,n)?o[1]:e},this.adjustNextRowIndexWithFrozen=(e,t)=>{const{facet:A}=this.spreadsheet,n=A.getCellRange(),{rowCount:i,trailingRowCount:r}=A.getFrozenOptions(),o=A.panelScrollGroupIndexes;return i>0&&t===C.SCROLL_UP&&Yt(e,n.start,i)?o[2]:r>0&&t===C.SCROLL_DOWN&&qt(e,n.end,r)?o[3]:e},this.getWillScrollRowIndexDiff=e=>e===C.SCROLL_DOWN?w.SCROLL_DOWN:w.SCROLL_UP,this.getDefaultWillScrollToRowIndex=e=>{const t=this.adjustNextRowIndexWithFrozen(this.endBrushPoint.rowIndex,e)+this.getWillScrollRowIndexDiff(e);return this.validateYIndex(t)},this.getWillScrollToRowIndex=e=>this.getDefaultWillScrollToRowIndex(e),this.getNextScrollDelta=e=>{const{scrollX:t=0,scrollY:A=0}=this.spreadsheet.facet.getScrollOffset();let n=0,i=0;if(e.y.scroll){const t=e.y.value>0?C.SCROLL_DOWN:C.SCROLL_UP,n=this.getWillScrollToRowIndex(t);if((0,l.isNil)(n))i=0;else{const e=((e,t,A)=>{const{facet:n}=A,{getCellOffsetY:i}=n.viewCellHeights,{viewportHeight:r}=n.panelBBox,o=i(e+1);if((0,l.isNil)(o))return 0;const s=null==n?void 0:n.frozenGroupAreas,a=s[Dt.Row].height,u=s[Dt.TrailingRow].height;return t===C.SCROLL_UP?i(e)-a:o-(r-u)})(n,t,this.spreadsheet)-A;i=(0,l.isNil)(e)||Number.isNaN(e)?0:e}}if(e.x.scroll){const A=e.x.value>0?C.SCROLL_DOWN:C.SCROLL_UP,i=this.adjustNextColIndexWithFrozen(this.endBrushPoint.colIndex,A),r=this.validateXIndex(i+(e.x.value>0?1:-1));n=(0,l.isNil)(r)?0:((e,t,A)=>{const{facet:n}=A,{viewportWidth:i}=n.panelBBox,r=null==n?void 0:n.frozenGroupAreas,o=r[Dt.Col].width,s=r[Dt.TrailingCol].width,a=n.getColLeafNodes()[e];return t===C.SCROLL_UP?a.x-o:a.x+a.width-(i-s)})(r,A,this.spreadsheet)-t}return{x:n,y:i}},this.onScrollAnimationComplete=()=>{this.scrollAnimationComplete=!0,this.brushSelectionStage!==d.UN_DRAGGED&&this.renderPrepareSelected(this.endBrushPoint)},this.autoScroll=(e=!1)=>{if(this.brushSelectionStage===d.UN_DRAGGED||!this.scrollAnimationComplete)return;const t=this.autoScrollConfig,A=this.spreadsheet.facet.getScrollOffset(),n=e?"rowHeaderOffsetX":"offsetX",i={rowHeaderOffsetX:{value:A.rowHeaderScrollX,animate:!0},offsetX:{value:A.scrollX,animate:!0},offsetY:{value:A.scrollY,animate:!0}},{x:r,y:o}=this.getNextScrollDelta(t);if(0===o&&0===r)return void this.clearAutoScroll();if(t.y.scroll&&(i.offsetY.value+=o),t.x.scroll){const e=i[n];e.value+=r,e.value<0&&(e.value=0)}this.scrollAnimationComplete=!1;const s=Math.max(16,300-this.mouseMoveDistanceFromCanvas*(t.x.scroll?1:3));this.spreadsheet.facet.scrollWithAnimation(i,s,this.onScrollAnimationComplete)},this.handleScroll=(0,l.throttle)((e,t,A=!1)=>{if(this.brushSelectionStage===d.UN_DRAGGED)return;const{x:{value:n,needScroll:i},y:{value:r,needScroll:o}}=this.formatBrushPointForScroll({x:e,y:t},A),s=this.autoScrollConfig;o&&(s.y.value=t,s.y.scroll=!0),i&&(s.x.value=e,s.x.scroll=!0),this.setMoveDistanceFromCanvas({x:e,y:t},i,o),this.renderPrepareSelected({x:n,y:r}),(o||i)&&(this.clearAutoScroll(),this.autoScroll(A),this.autoScrollIntervalId=setInterval(()=>{this.autoScroll(A)},16))},30),this.clearAutoScroll=()=>{this.autoScrollIntervalId&&(clearInterval(this.autoScrollIntervalId),this.autoScrollIntervalId=null,this.resetScrollDelta())},this.onUpdateCells=(e,t)=>t(),this.showPrepareSelectedCells=()=>{this.brushRangeCells=this.getBrushRangeCells(),this.spreadsheet.interaction.changeState({cells:(0,l.map)(this.brushRangeCells,e=>xo(e)),stateName:r.PREPARE_SELECT,force:!0,onUpdateCells:this.onUpdateCells})},this.renderPrepareSelected=e=>{const{x:t,y:A}=e,n=this.spreadsheet.container.document.elementsFromPointSync(t,A).map(e=>this.spreadsheet.getCell(e)).find(Boolean);if(!n||!(n instanceof Nt||n instanceof $i||n instanceof Hi))return;const{rowIndex:i,colIndex:r}=n.getMeta();this.endBrushPoint={x:t,y:A,rowIndex:i,colIndex:r};const{interaction:o}=this.spreadsheet;o.addIntercepts([p.HOVER]),o.clearStyleIndependent(),this.isValidBrushSelection()&&(this.showPrepareSelectedCells(),this.updatePrepareSelectMask())}}bindEvents(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()}getPrepareSelectMaskTheme(){var e;return null===(e=this.spreadsheet.theme)||void 0===e?void 0:e.prepareSelectMask}initPrepareSelectMaskShape(){var e;const{foregroundGroup:t}=this.spreadsheet.facet;if(!t)return;null===(e=this.prepareSelectMaskShape)||void 0===e||e.remove();const A=this.getPrepareSelectMaskTheme();this.prepareSelectMaskShape=t.appendChild(new a.rw({style:{width:0,height:0,x:0,y:0,fill:null==A?void 0:A.backgroundColor,fillOpacity:null==A?void 0:A.backgroundOpacity,zIndex:5,visibility:"hidden",pointerEvents:"none"}}))}setBrushSelectionStage(e){this.brushSelectionStage=e}isPointInCanvas(e){const{height:t,width:A}=this.spreadsheet.facet.getCanvasSize(),{minX:n,minY:i}=this.spreadsheet.facet.panelBBox;return(null==e?void 0:e.x)>n&&(null==e?void 0:e.x)<A&&(null==e?void 0:e.y)>i&&(null==e?void 0:e.y)<t}resetDrag(){this.hidePrepareSelectMaskShape(),this.setBrushSelectionStage(d.UN_DRAGGED)}isValidBrushSelection(){const{start:e,end:t}=this.getBrushRange();return t.x-e.x>this.brushSelectionMinimumMoveDistance||t.y-e.y>this.brushSelectionMinimumMoveDistance}setDisplayedCells(){this.displayedCells=this.spreadsheet.facet.getDataCells()}updatePrepareSelectMask(){const e=this.getBrushRange(),{x:t,y:A}=this.getPrepareSelectMaskPosition(e);this.prepareSelectMaskShape.attr({x:t,y:A,width:e.width,height:e.height}),this.prepareSelectMaskShape.setAttribute("visibility","visible")}hidePrepareSelectMaskShape(){var e;null===(e=this.prepareSelectMaskShape)||void 0===e||e.setAttribute("visibility","hidden")}resetScrollDelta(){this.autoScrollConfig=(0,l.cloneDeep)(v)}getBrushPoint(e){const{scrollY:t,scrollX:A}=this.spreadsheet.facet.getScrollOffset(),n={x:null==e?void 0:e.x,y:null==e?void 0:e.y},i=this.spreadsheet.getCell(e.target),{colIndex:r,rowIndex:o}=i.getMeta();return Object.assign(Object.assign({},n),{rowIndex:o,colIndex:r,scrollY:t,scrollX:A})}getBrushRange(){var e,t,A,n,i,r,o,s;const{scrollX:a=0,scrollY:l=0}=this.spreadsheet.facet.getScrollOffset(),u=Math.min(this.startBrushPoint.rowIndex,null===(e=this.endBrushPoint)||void 0===e?void 0:e.rowIndex),c=Math.max(this.startBrushPoint.rowIndex,null===(t=this.endBrushPoint)||void 0===t?void 0:t.rowIndex),h=Math.min(this.startBrushPoint.colIndex,null===(A=this.endBrushPoint)||void 0===A?void 0:A.colIndex),d=Math.max(this.startBrushPoint.colIndex,null===(n=this.endBrushPoint)||void 0===n?void 0:n.colIndex),f=this.startBrushPoint.x+this.startBrushPoint.scrollX-a,g=this.startBrushPoint.y+this.startBrushPoint.scrollY-l,p=Math.min(f,null===(i=this.endBrushPoint)||void 0===i?void 0:i.x),v=Math.max(f,null===(r=this.endBrushPoint)||void 0===r?void 0:r.x),m=Math.min(g,null===(o=this.endBrushPoint)||void 0===o?void 0:o.y),C=Math.max(g,null===(s=this.endBrushPoint)||void 0===s?void 0:s.y);return{start:{rowIndex:u,colIndex:h,x:p,y:m},end:{rowIndex:c,colIndex:d,x:v,y:C},width:v-p,height:C-m}}getBrushRangeCells(){return this.setDisplayedCells(),this.displayedCells.filter(e=>{const t=e.getMeta();return this.isInBrushRange(t)})}mouseDown(e){var t;null===(t=null==e?void 0:e.preventDefault)||void 0===t||t.call(e),this.spreadsheet.interaction.hasIntercepts([p.CLICK])||(this.setBrushSelectionStage(d.CLICK),this.initPrepareSelectMaskShape(),this.setDisplayedCells(),this.startBrushPoint=this.getBrushPoint(e))}addBrushIntercepts(){this.spreadsheet.interaction.addIntercepts([p.DATA_CELL_BRUSH_SELECTION])}bindMouseUp(e=!1){this.spreadsheet.on(iA.GLOBAL_MOUSE_UP,t=>{if(this.brushSelectionStage===d.DRAGGED){if(e&&this.clearAutoScroll(),this.isValidBrushSelection()){this.addBrushIntercepts(),this.updateSelectedCells(t);const e=Do(this.spreadsheet);this.spreadsheet.showTooltipWithInfo(t,e)}this.spreadsheet.interaction.getCurrentStateName()===r.PREPARE_SELECT&&this.spreadsheet.interaction.reset(),this.resetDrag()}else this.resetDrag()}),this.spreadsheet.on(iA.GLOBAL_CONTEXT_MENU,()=>{this.brushSelectionStage!==d.UN_DRAGGED&&(this.spreadsheet.interaction.removeIntercepts([p.HOVER]),this.resetDrag())})}autoBrushScroll(e,t=!1){var A,n;if(this.clearAutoScroll(),!this.isPointInCanvas(e)){const i=(null==e?void 0:e.x)-(null===(A=this.endBrushPoint)||void 0===A?void 0:A.x),r=(null==e?void 0:e.y)-(null===(n=this.endBrushPoint)||void 0===n?void 0:n.y);return this.handleScroll(i,r,t),!0}return!1}emitBrushSelectionEvent(e,t,A){this.spreadsheet.emit(e,t,A),this.spreadsheet.emit(iA.GLOBAL_SELECTED,t,A),(0,l.isEmpty)(t)&&this.spreadsheet.interaction.removeIntercepts([p.HOVER])}getVisibleBrushRangeCells(e){return this.brushRangeCells.find(t=>{const A=t.getMeta();return(null==A?void 0:A.id)===e})}isInBrushRange(e){return!1}bindMouseDown(){}bindMouseMove(){}updateSelectedCells(e){}getPrepareSelectMaskPosition(e){return{x:e.start.x,y:e.start.y}}}class Jo extends Zo{constructor(){super(...arguments),this.displayedCells=[],this.brushRangeCells=[],this.onUpdateCells=e=>e.updateCells(this.spreadsheet.facet.getColCells())}bindEvents(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()}bindMouseDown(){this.spreadsheet.on(iA.COL_CELL_MOUSE_DOWN,e=>{this.spreadsheet.interaction.getBrushSelection().colCell&&super.mouseDown(e)})}isPointInCanvas(e){const{width:t}=this.spreadsheet.facet.getCanvasSize(),{width:A,minY:n,maxY:i}=this.spreadsheet.facet.cornerBBox;return e.x>=A&&e.x<=t&&e.y>=n&&e.y<=i}bindMouseMove(){this.spreadsheet.on(iA.COL_CELL_MOUSE_MOVE,e=>{var t;if(this.brushSelectionStage===d.UN_DRAGGED)return;this.setBrushSelectionStage(d.DRAGGED);const A=null===(t=this.spreadsheet.interaction.eventController)||void 0===t?void 0:t.getViewportPoint(e);this.isPointInCanvas(A)&&this.renderPrepareSelected(A)})}setDisplayedCells(){this.displayedCells=this.spreadsheet.facet.getColCells()}isInBrushRange(e){const{start:t,end:A}=this.getBrushRange(),{scrollX:n=0}=this.spreadsheet.facet.getScrollOffset(),i=this.spreadsheet.facet.cornerBBox,{x:r=0,y:o=0,width:s=0,height:a=0}=e;return this.rectanglesIntersect({minX:t.x-i.width+n,minY:t.y,maxX:A.x-i.width+n,maxY:A.y},{minX:r,maxX:r+s,minY:o,maxY:o+a})}updateSelectedCells(e){const{interaction:t,facet:A}=this.spreadsheet;t.changeState({cells:(0,l.map)(this.brushRangeCells,xo),onUpdateCells:e=>{e.updateCells(A.getColCells())},stateName:r.COL_CELL_BRUSH_SELECTED}),this.emitBrushSelectionEvent(iA.COL_CELL_BRUSH_SELECTION,this.brushRangeCells,{event:e,targetCell:this.brushRangeCells[0],interactionName:i.COL_CELL_BRUSH_SELECTION})}addBrushIntercepts(){this.spreadsheet.interaction.addIntercepts([p.COL_CELL_BRUSH_SELECTION])}}class $o extends Zo{constructor(){super(...arguments),this.displayedCells=[],this.brushRangeCells=[],this.getSelectedCellMetas=e=>{const{facet:t}=this.spreadsheet,A=[],n=t.getRowLeafNodes(),i=t.getColLeafNodes(),r=(0,l.range)(e.start.rowIndex,e.end.rowIndex+1),s=(0,l.range)(e.start.colIndex,e.end.colIndex+1);return r.forEach(e=>{s.forEach(t=>{const r=String(i[t].id),s=(0,l.isEmpty)(n)?String(e):String(n[e].id);A.push({colIndex:t,rowIndex:e,id:kt(s,r),type:o.DATA_CELL,rowId:s,colId:r,spreadsheet:this.spreadsheet})})}),A}}bindMouseDown(){this.spreadsheet.on(iA.DATA_CELL_MOUSE_DOWN,e=>{this.spreadsheet.interaction.getBrushSelection().dataCell&&(super.mouseDown(e),this.resetScrollDelta())})}bindMouseMove(){this.spreadsheet.on(iA.GLOBAL_MOUSE_MOVE,e=>{if(this.brushSelectionStage===d.UN_DRAGGED)return;this.setBrushSelectionStage(d.DRAGGED);const t=this.spreadsheet.interaction.eventController.getViewportPoint(e);this.autoBrushScroll(t)||this.renderPrepareSelected(t)})}isInBrushRange(e){const{start:t,end:A}=this.getBrushRange(),{rowIndex:n,colIndex:i}=e;return n>=t.rowIndex&&n<=A.rowIndex&&i>=t.colIndex&&i<=A.colIndex}updateSelectedCells(e){const t=this.getBrushRange(),A=this.getSelectedCellMetas(t);this.spreadsheet.interaction.changeState({cells:A,stateName:r.DATA_CELL_BRUSH_SELECTED,onUpdateCells:Fo});const n=this.getScrollBrushRangeCells(A);this.emitBrushSelectionEvent(iA.DATA_CELL_BRUSH_SELECTION,n,{event:e,targetCell:n[0],interactionName:i.DATA_CELL_BRUSH_SELECTION})}getScrollBrushRangeCells(e){return e.map(e=>{const t=this.getVisibleBrushRangeCells(e.id);if(t)return t;const A=this.spreadsheet.facet.getCellMeta(e.rowIndex,e.colIndex);return this.spreadsheet.facet.createDataCell(A)})}bindMouseUp(){super.bindMouseUp(!0)}getPrepareSelectMaskPosition(e){const{minX:t,minY:A}=this.spreadsheet.facet.panelBBox;return{x:Math.max(e.start.x,t),y:Math.max(e.start.y,A)}}}class es extends Zo{constructor(){super(...arguments),this.displayedCells=[],this.brushRangeCells=[],this.isInBrushRange=e=>{const{start:t,end:A}=this.getBrushRange(),{scrollY:n,rowHeaderScrollX:i}=this.spreadsheet.facet.getScrollOffset(),{cornerBBox:r}=this.spreadsheet.facet,{x:o=0,y:s=0,width:a=0,height:l=0}=e;return this.rectanglesIntersect({minX:t.x+i,minY:t.y-r.height+n,maxX:A.x+i,maxY:A.y-r.height+n},{minX:o,maxX:o+a,minY:s,maxY:s+l})},this.onUpdateCells=e=>e.updateCells(this.spreadsheet.facet.getRowCells()),this.getSelectedRowNodes=()=>this.spreadsheet.facet.getRowNodes().filter(this.isInBrushRange),this.getVisibleRowLeafCellByScrollDirection=e=>{const t=this.spreadsheet.facet.getRowCells();return e===C.SCROLL_DOWN?(0,l.last)(t):t.find(e=>e.getMeta().isLeaf)},this.getWillScrollToRowIndex=e=>{var t,A;if(!(0,l.isNil)(this.endBrushPoint.rowIndex))return this.getDefaultWillScrollToRowIndex(e);const n=this.getVisibleRowLeafCellByScrollDirection(e),i=(null!==(A=null===(t=null==n?void 0:n.getMeta())||void 0===t?void 0:t.rowIndex)&&void 0!==A?A:0)+this.getWillScrollRowIndexDiff(e);return this.validateYIndex(i)}}bindMouseDown(){this.spreadsheet.on(iA.ROW_CELL_MOUSE_DOWN,e=>{this.spreadsheet.interaction.getBrushSelection().rowCell&&super.mouseDown(e)})}isPointInCanvas(e){const{height:t}=this.spreadsheet.facet.getCanvasSize(),{minX:A,height:n,maxX:i}=this.spreadsheet.facet.cornerBBox;return e.x>=A&&e.x<=i&&e.y>=n&&e.y<=t}bindMouseMove(){this.spreadsheet.on(iA.GLOBAL_MOUSE_MOVE,e=>{if(this.brushSelectionStage===d.UN_DRAGGED)return;this.setBrushSelectionStage(d.DRAGGED);const t=this.spreadsheet.interaction.eventController.getViewportPoint(e);this.autoBrushScroll(t,!0)||this.renderPrepareSelected(t)})}setDisplayedCells(){this.displayedCells=this.spreadsheet.facet.getRowCells()}updateSelectedCells(e){const t=this.getSelectedRowNodes(),A=this.getScrollBrushRangeCells(t),n=(0,l.map)(A,xo);this.spreadsheet.interaction.changeState({cells:n,stateName:r.ROW_CELL_BRUSH_SELECTED,onUpdateCells:this.onUpdateCells}),this.emitBrushSelectionEvent(iA.ROW_CELL_BRUSH_SELECTION,A,{event:e,targetCell:A[0],interactionName:i.ROW_CELL_BRUSH_SELECTION})}addBrushIntercepts(){this.spreadsheet.interaction.addIntercepts([p.ROW_CELL_BRUSH_SELECTION])}getScrollBrushRangeCells(e){return e.map(e=>this.getVisibleBrushRangeCells(e.id)||this.spreadsheet.facet.rowHeader.getCellInstance(e))}getPrepareSelectMaskPosition(e){const{minY:t}=this.spreadsheet.facet.panelBBox;return{x:e.start.x,y:Math.max(e.start.y,t)}}}class ts extends Go{constructor(){super(...arguments),this.isMultiSelection=!1}bindEvents(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindKeyboardUp(),this.bindMouseMove()}reset(){this.isMultiSelection=!1,this.spreadsheet.interaction.removeIntercepts([p.CLICK])}bindKeyboardDown(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_DOWN,e=>{Bo(e)&&(this.isMultiSelection=!0,this.spreadsheet.interaction.addIntercepts([p.CLICK]))})}bindKeyboardUp(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_UP,e=>{Bo(e)&&this.reset()})}bindMouseMove(){this.spreadsheet.on(iA.GLOBAL_MOUSE_MOVE,e=>{this.isMultiSelection&&!Eo(e)&&this.reset()})}getSelectedCells(e){const t=e.getMeta().id,{interaction:A}=this.spreadsheet;let n=A.getCells([o.DATA_CELL]),i=[];return A.getCurrentStateName()!==r.SELECTED&&(n=[]),i=n.find(e=>e.id===t)?n.filter(e=>e.id!==t):[...n,xo(e)],i}bindDataCellClick(){this.spreadsheet.on(iA.DATA_CELL_CLICK,e=>{e.stopPropagation();const t=this.spreadsheet.getCell(e.target),A=t.getMeta(),{interaction:n}=this.spreadsheet;if(this.isMultiSelection&&A){const A=this.getSelectedCells(t);if((0,l.isEmpty)(A))return n.clearState(),this.spreadsheet.hideTooltip(),void n.emitSelectEvent({event:e,targetCell:t,interactionName:i.DATA_CELL_MULTI_SELECTION});n.addIntercepts([p.CLICK,p.HOVER]),this.spreadsheet.hideTooltip(),n.changeState({cells:A,stateName:r.SELECTED,onUpdateCells:Fo}),n.emitSelectEvent({event:e,targetCell:t,interactionName:i.DATA_CELL_MULTI_SELECTION}),this.spreadsheet.showTooltipWithInfo(e,Do(this.spreadsheet))}})}}var As;function ns(e,t){return!(!e||!t)&&String(e).toLowerCase()===String(t).toLowerCase()}!function(e){e.PLAIN="text/plain",e.HTML="text/html"}(As||(As={}));const is=e=>"string"!=typeof e?e:/[",\r\n\t]/.test(e)?`"${e.replace(/"/g,'""').replace(/\r\n/g,"\n").replace(/\n/g,"\r\n")}"`:e,rs=(e,t,A=!0)=>(0,l.map)(e,e=>e===Se?t.getSeriesNumberText():A?t.dataSet.getFieldName(e):(0,l.flow)(bt,Tt)(e)),os=(e,t)=>{const A=e.split("[&]");return t?A.slice(A.length-t):(A.shift(),A)},ss=(e,t)=>e()?null==t?void 0:t.value:null==t?void 0:t.field,as=e=>e.filter(({type:e})=>e===o.COL_CELL),ls=e=>e.filter(({type:e})=>e===o.ROW_CELL),us=e=>new Promise((t,A)=>{let n;n=Array.isArray(e)?(0,l.get)(e.filter(e=>e.type===As.PLAIN),"[0].content",""):e.content||"";const i=document.createElement("textarea");i.value=n,document.body.appendChild(i),i.focus({preventScroll:!0}),i.select();const r=document.execCommand("copy");document.body.removeChild(i),r?t():A()}),cs=(e,t="\t")=>({type:As.PLAIN,content:(0,l.map)(e,e=>e.join(t)).join("\r\n")}),hs=e=>{const t=e.map(e=>{return`<tr>${t=e,t.map(e=>`<td>${(0,l.escape)(e)}</td>`).join("")}</tr>`;var t}).join("");return{type:As.HTML,content:`<meta charset="utf-8"><table><tbody>${t}</tbody></table>`}},ds={[As.PLAIN]:cs,[As.HTML]:hs},fs=({rowMatrix:e,colMatrix:t,dataMatrix:A,cornerMatrix:n})=>{var i,r,o,s,a,u;const c=null!==(r=null===(i=null==e?void 0:e[0])||void 0===i?void 0:i.length)&&void 0!==r?r:0,h=null!==(o=null==t?void 0:t.length)&&void 0!==o?o:0,d=null!==(a=null===(s=A[0])||void 0===s?void 0:s.length)&&void 0!==a?a:0,f=null!==(u=A.length)&&void 0!==u?u:0,g=c+d,p=h||(c>0?1:0),v=p+f;let m=Array.from(Array(v),()=>new Array(g));return m=(0,l.map)(m,(i,r)=>(0,l.map)(i,(i,o)=>{var s,a;return o>=0&&o<c&&r>=0&&r<p?null!==(a=null===(s=null==n?void 0:n[r])||void 0===s?void 0:s[o])&&void 0!==a?a:"":o>=c&&o<=g&&r>=0&&r<h?t[r][o-c]:o>=0&&o<c&&r>=p&&r<v?null==e?void 0:e[r-p][o]:o>=c&&o<=g&&r>=p&&r<v?A[r-p][o-c]:void 0})),m};function gs(e){var t;return null!==(t=(0,l.max)((0,l.map)(e,e=>e.length)))&&void 0!==t?t:0}const ps=e=>{const t=[],A=e=>{var n,i,r;if("root"===e.id)return;const o=null===(r=null===(i=null===(n=e.spreadsheet)||void 0===n?void 0:n.dataSet)||void 0===i?void 0:i.getFieldFormatter)||void 0===r?void 0:r.call(i,e.field),s=e.isTotalRoot||!o?e.value:o(e.value);return t.unshift(s),(null==e?void 0:e.parent)?A(e.parent):void 0};return A(e),t},vs=(e,t)=>{const{rowIndex:A,colIndex:n}=e,{facet:i}=t;return[i.getRowNodeByIndex(A),i.getColNodeByIndex(n)]},ms={timeout:3e3};class Cs{initIdleCallbackCount(e){this.idleCallbackCount=e>=5e3?5e3:e}constructor(e){this.matrixHtmlTransformer=e=>this.config.transformers[As.HTML](e);const{spreadsheet:t,isExport:A=!1,config:n}=e;this.spreadsheet=t,this.config=function({spreadsheet:{options:{interaction:e}},config:{formatOptions:t=!1,separator:A="\t",selectedCells:n=[],customTransformer:i,async:r=!1},isExport:o}){var s,a;const{copy:l}=e,{formatData:u,formatHeader:c}=o?(e=>{var t,A;return"object"==typeof e?{formatHeader:null!==(t=e.formatHeader)&&void 0!==t&&t,formatData:null!==(A=e.formatData)&&void 0!==A&&A}:{formatHeader:null!=e&&e,formatData:null!=e&&e}})(t):{formatData:null!==(s=null==l?void 0:l.withFormat)&&void 0!==s&&s,formatHeader:null!==(a=null==l?void 0:l.withFormat)&&void 0!==a&&a},h=function(e){if(!e)return ds;const t=e(ds);return{[As.PLAIN]:t[As.PLAIN]||ds[As.PLAIN],[As.HTML]:t[As.HTML]||ds[As.HTML]}}(o?i:null==l?void 0:l.customTransformer);return{separator:A,selectedCells:n,transformers:h,formatData:u,formatHeader:c,async:r}}({config:n,spreadsheet:t,isExport:A})}getHeaderNodeMatrix(e){const{formatHeader:t}=this.config;return rs(os(e.id),e.spreadsheet,t)}matrixPlainTextTransformer(e,t){const A=(0,l.map)(e,e=>(0,l.map)(e,is));return this.config.transformers[As.PLAIN](A,t)}matrixTransformer(e,t="\t"){return[this.matrixPlainTextTransformer(e,t),this.matrixHtmlTransformer(e)]}getFormatter(e){const{field:t,rowIndex:A,colIndex:n}=e;if(this.config.formatData){const e=this.spreadsheet.facet.getCellMeta(A,n);return A=>{const n=this.spreadsheet.dataSet.getFieldFormatter(t);return null==n?void 0:n(A,null==e?void 0:e.data,e)}}return e=>e}isEnableASync(){return!ot()&&this.config.async&&!!window.requestIdleCallback}}class ws extends Cs{constructor(e){super(e),this.leafRowNodes=[],this.leafColNodes=[],this.compatibleHideMeasureColumn=()=>{var e,t,A,n;return(null===(A=null===(t=null===(e=this.spreadsheet.options)||void 0===e?void 0:e.style)||void 0===t?void 0:t.colCell)||void 0===A?void 0:A.hideValue)&&this.spreadsheet.isValueInCols()?{[Be]:null===(n=this.spreadsheet.dataCfg.fields.values)||void 0===n?void 0:n[0]}:{}},this.getDataMatrixByHeaderNode=()=>{const e=this.compatibleHideMeasureColumn();return(0,l.map)(this.leafRowNodes,t=>this.leafColNodes.map(A=>this.getDataCellValue({rowNode:t,colNode:A,config:{measureQuery:e}})))},this.getDataMatrixByHeaderNodeRIC=()=>{const e=[];let t=0;const A=this.compatibleHideMeasureColumn();return new Promise((n,i)=>{try{const i=r=>{const o=this.leafRowNodes.length;for(this.initIdleCallbackCount(o);(r.timeRemaining()>0||r.didTimeout)&&t<=o-1&&this.idleCallbackCount>0;)for(let n=t;n<o&&this.idleCallbackCount>0;n++){const i=[],r=this.leafRowNodes[n];for(let e=0;e<this.leafColNodes.length;e++){const t=this.getDataCellValue({rowNode:r,colNode:this.leafColNodes[e],config:{measureQuery:A}});i.push(t)}t++,e.push(i),this.idleCallbackCount--}t===o?n(e):(this.initIdleCallbackCount(o),requestIdleCallback(i,ms))};requestIdleCallback(i,ms)}catch(e){i(e)}})},this.getDataCellValue=({rowNode:e,colNode:t,config:A})=>{var n;const{measureQuery:i}=A,r=Object.assign(Object.assign(Object.assign({},e.query),t.query),i),o=this.spreadsheet.dataSet.getCellData({query:r,rowNode:e,isTotals:e.isTotals||e.isTotalMeasure||t.isTotals||t.isTotalMeasure,totalStatus:si(e,t)}),s=this.spreadsheet.isValueInCols()?t:e;let a=null!==(n=ss(this.spreadsheet.isPivotMode,s))&&void 0!==n?n:"";const{values:u}=this.spreadsheet.dataCfg.fields;a=(null==u?void 0:u.includes(a))?a:null==u?void 0:u[0];const c=this.getFormatter({field:null!=a?a:t.field,rowIndex:e.rowIndex,colIndex:t.colIndex}),h=null==o?void 0:o[ye],d=(0,l.isPlainObject)(null==h?void 0:h.values)?"":h;return c(null!=d?d:"")},this.getCustomRowCornerMatrix=e=>{const t=gs(null!=e?e:[]),A=this.spreadsheet.facet.getCornerNodes(),n=(0,l.sortBy)(A,e=>e.cornerType===Ar.Col?0:1);return this.spreadsheet.isHierarchyTreeType()?(0,l.map)(n,e=>{const A=new Array(t).fill("");return A[t-1]=e.value,A}):Object.values((0,l.groupBy)(n,"y")).map(e=>[...new Array(t-e.length).fill(""),...e.map(e=>e.value)])},this.getFieldName=e=>this.config.formatHeader?this.spreadsheet.dataSet.getFieldName(e):this.spreadsheet.dataSet.getField(e),this.getCornerMatrix=e=>{if(this.spreadsheet.isCustomRowFields())return this.getCustomRowCornerMatrix(e);const{colsHierarchy:t}=this.spreadsheet.facet.getLayoutResult(),{fields:A}=this.spreadsheet.dataCfg,{columns:n=[],rows:i=[]}=A,r=this.spreadsheet.isCustomColumnFields()?t.getNodes().slice(0,t.sampleNodesForAllLevels.length).map(e=>e.field):[...n,""],o=this.spreadsheet.isHierarchyTreeType()?gs(null!=e?e:[]):i.length,s=(0,l.slice)(i,0,o);return(0,l.map)(r,(e,t)=>(0,l.map)(s,(A,n)=>t===r.length-1?this.getFieldName(A):n===o-1?this.getFieldName(e):""))},this.getDataMatrixByDataCell=e=>{const{copy:t}=this.spreadsheet.options.interaction,A=this.compatibleHideMeasureColumn(),n=(0,l.map)(e,e=>(0,l.map)(e,e=>{const[t,n]=vs(e,this.spreadsheet);return this.getDataCellValue({rowNode:t,colNode:n,config:{measureQuery:A}})}));if(!(null==t?void 0:t.withHeader))return this.matrixTransformer(n,this.config.separator);const i=this.getRowMatrix(),r=this.getColMatrix();return this.matrixTransformer(fs({rowMatrix:i,colMatrix:r,dataMatrix:n}),this.config.separator)},this.getAsyncAllPivotCopyData=()=>(0,Q.sH)(this,void 0,void 0,function*(){const e=this.getRowMatrix(),t=this.getColMatrix(),A=this.getCornerMatrix(e);let n=[];return n=this.isEnableASync()?yield this.getDataMatrixByHeaderNodeRIC():yield Promise.resolve(this.getDataMatrixByHeaderNode()),this.matrixTransformer(fs({rowMatrix:e,colMatrix:t,dataMatrix:n,cornerMatrix:A}),this.config.separator)}),this.getPivotAllCopyData=()=>{const e=this.getRowMatrix(),t=this.getColMatrix(),A=this.getCornerMatrix(e),n=this.getDataMatrixByHeaderNode();return this.matrixTransformer(fs({rowMatrix:e,colMatrix:t,dataMatrix:n,cornerMatrix:A}),this.config.separator)},this.leafRowNodes=this.getLeafRowNodes(),this.leafColNodes=this.getLeafColNodes()}getHeaderNodeMatrix(e){return this.config.formatHeader?ps(e):super.getHeaderNodeMatrix(e)}getLeafRowNodes(){const e=this.spreadsheet.facet.getRowLeafNodes(),t=ls(this.config.selectedCells),A=this.spreadsheet.isHierarchyTreeType();return(0,l.isEmpty)(t)?e:this.getSelectedNode(t,e,A)}getLeafColNodes(){const e=this.spreadsheet.facet.getColLeafNodes(),t=as(this.config.selectedCells);return(0,l.isEmpty)(t)?e:this.getSelectedNode(t,e)}getSelectedNode(e,t,A=!1){if(A){const A=new Set(e.map(e=>e.id));return t.filter(e=>A.has(e.id))}return e.reduce((e,A)=>{const n=A.id,i=t.filter(e=>e.id===n||e.id.startsWith(n+"[&]"));return e.push(...i),e},[])}getColMatrix(){return(0,l.zip)(...(0,l.map)(this.leafColNodes,e=>this.getHeaderNodeMatrix(e)))}getRowMatrix(){return function(e){const t=gs(e);return(0,l.map)(e,e=>{const A=t-e.length;return A?[...e,...new Array(A).fill("")]:e})}((0,l.map)(this.leafRowNodes,e=>this.getHeaderNodeMatrix(e)))}getPivotCopyData(){const{copy:e}=this.spreadsheet.options.interaction,t=this.getDataMatrixByHeaderNode();if(!(null==e?void 0:e.withHeader))return this.matrixTransformer(t,this.config.separator);const A=this.getRowMatrix(),n=this.getColMatrix();return this.matrixTransformer(fs({rowMatrix:A,colMatrix:n,dataMatrix:t}),this.config.separator)}}class ys extends Cs{constructor(e){super(e),this.getValueFromMeta=e=>{var t;const[,A]=vs(e,this.spreadsheet),n=ss(this.spreadsheet.isPivotMode,A),i=this.isSeriesNumberField(n)?e.rowIndex+1:null===(t=this.displayData[e.rowIndex])||void 0===t?void 0:t[n];return this.getFormatter({field:n,rowIndex:e.rowIndex,colIndex:e.colIndex})(i)},this.displayData=this.getSelectedDisplayData(),this.columnNodes=this.getSelectedColNodes()}getHeaderNodeMatrix(e){return super.getHeaderNodeMatrix(e)}getSelectedColNodes(){const e=as(this.config.selectedCells),t=this.spreadsheet.facet.getColLeafNodes();return 0===e.length?t:(0,l.map)(e,e=>t[e.colIndex])}getSelectedDisplayData(){const e=ls(this.config.selectedCells),t=this.spreadsheet.dataSet.getDisplayDataSet();return 0===e.length?t:(0,l.map)(e,e=>t[e.rowIndex])}getDataMatrix(){const{seriesNumber:e}=this.spreadsheet.options;return this.displayData.map((t,A)=>this.columnNodes.map((n,i)=>{const r=null==n?void 0:n.field;if(Se===r&&(null==e?void 0:e.enable)){const e=A+1;return this.getFormatter({field:r,rowIndex:A,colIndex:i})(e)}return this.getFormatter({field:r,rowIndex:A,colIndex:i})(null==t?void 0:t[r])}))}getDataMatrixRIC(){const{seriesNumber:e}=this.spreadsheet.options,t=[];let A=0;return new Promise((n,i)=>{try{const i=r=>{const o=this.displayData.length;for(this.initIdleCallbackCount(o);(r.timeRemaining()>0||r.didTimeout)&&A<=o-1&&this.idleCallbackCount>0;)for(let n=A;n<o&&this.idleCallbackCount>0;n++){const i=this.displayData[n],r=[];for(let t=0;t<this.columnNodes.length;t++){const o=this.columnNodes[t].field;if(Se===o&&(null==e?void 0:e.enable)){const e=n+1,A=this.getFormatter({field:o,rowIndex:n,colIndex:t});r.push(A(e));continue}const s=this.getFormatter({field:o,rowIndex:A,colIndex:t})(i[o]);r.push(s)}A++,t.push(r),this.idleCallbackCount--}A===o?n(t):(this.initIdleCallbackCount(o),requestIdleCallback(i,ms))};requestIdleCallback(i,ms)}catch(e){i(e)}})}isSeriesNumberField(e){const{seriesNumber:t}=this.spreadsheet.options;return Se===e&&(null==t?void 0:t.enable)}getColMatrix(){return(0,l.zip)(...this.columnNodes.map(e=>this.getHeaderNodeMatrix(e)))}getDataMatrixByDataCell(e){const{copy:t}=this.spreadsheet.options.interaction,A=(0,l.map)(e,e=>(0,l.map)(e,e=>this.getValueFromMeta(e)));if(!(null==t?void 0:t.withHeader))return this.matrixTransformer(A,this.config.separator);const n=this.getColMatrix();return this.matrixTransformer(fs({colMatrix:n,dataMatrix:A}),this.config.separator)}processSelectedTable(e=!1){const t=this.getDataMatrix();if(!e)return this.matrixTransformer(t,this.config.separator);const A=this.getColMatrix();return this.matrixTransformer(fs({colMatrix:A,dataMatrix:t}),this.config.separator)}asyncProcessSelectedTable(){return(0,Q.sH)(this,arguments,void 0,function*(e=!1){const t=this.isEnableASync()?yield this.getDataMatrixRIC():yield Promise.resolve(this.getDataMatrix());if(!e)return this.matrixTransformer(t,this.config.separator);const A=this.getColMatrix();return this.matrixTransformer(fs({colMatrix:A,dataMatrix:t}),this.config.separator)})}}const Bs=(e,t)=>e.isPivotMode()?function(e,t){return new ws({spreadsheet:e,config:{selectedCells:t}}).getPivotCopyData()}(e,t):((e,t)=>new ys({spreadsheet:e,config:{selectedCells:t}}).processSelectedTable())(e,t);function Es(e,t){let A;const n=as(t),i=ls(t);if(e.interaction.getCurrentStateName()===r.ALL_SELECTED)A=Bs(e,[]);else if(n.length)A=Bs(e,n);else if(i.length)A=Bs(e,i);else{if(!t.length)return[{type:As.PLAIN,content:""},{type:As.HTML,content:""}];const n=(e=>{if(!(null==e?void 0:e.length))return[];const[t,A]=[{row:1/0,col:1/0},{row:0,col:0}];e.forEach(e=>{const{rowIndex:n,colIndex:i}=e;t.col=Math.min(i,t.col),t.row=Math.min(n,t.row),A.col=Math.max(i,A.col),A.row=Math.max(n,A.row)});const[n,i]=[A.row-t.row+1,A.col-t.col+1],r=new Array(n).fill("").map(()=>new Array(i).fill(""));return e.forEach(e=>{const{rowIndex:A,colIndex:n}=e,[i,o]=[A-t.row,n-t.col];r[i][o]=e}),r})(t),i=n[0].map(e=>{var t;return Object.assign(Object.assign({},e),{id:(null==e?void 0:e.colId)||(0,l.last)(null===(t=null==e?void 0:e.id)||void 0===t?void 0:t.split("-"))||"",type:o.COL_CELL})}),r=n.map(e=>{var t,A,n;return Object.assign(Object.assign({},e[0]),{id:(null===(t=e[0])||void 0===t?void 0:t.rowId)||(0,l.first)(null===(n=null===(A=e[0])||void 0===A?void 0:A.id)||void 0===n?void 0:n.split("-"))||"",type:o.ROW_CELL})});A=function(e,t,A,n){return n.isPivotMode()?(({spreadsheet:e,selectedCells:t,headerSelectedCells:A})=>new ws({spreadsheet:e,config:{selectedCells:A,formatOptions:!0}}).getDataMatrixByDataCell(t))({spreadsheet:n,selectedCells:e,headerSelectedCells:(0,l.concat)(t,A)}):(({spreadsheet:e,selectedCells:t,headerSelectedCells:A})=>new ys({spreadsheet:e,config:{selectedCells:A,formatOptions:!0}}).getDataMatrixByDataCell(t))({spreadsheet:n,selectedCells:e,headerSelectedCells:t})}(n,i,r,e)}return A}const xs=e=>{var t;const A=e.interaction,n=A.getState().cells||[],i=null!==(t=A.getInteractedCells())&&void 0!==t?t:[],r=function(e){return!(0,l.isEmpty)(e)&&(0,l.every)(e,e=>e.cellType===o.ROW_CELL||e.cellType===o.COL_CELL)}(i),s=r?function(e){var t,A,n,i;const r=function(e){const t=new Set;return(0,l.forEach)(e,e=>{const A=e.getMeta().level;t.has(A)||t.add(A)}),t}(e),s=null!==(t=(0,l.max)(Array.from(r)))&&void 0!==t?t:0,a=function(e,t){return(0,l.filter)(e,e=>{const A=e.getMeta(),n=A.level===t,i=A.isTotals&&(0,l.isEmpty)(A.children);return n||i})}(e,s),u=e[0].cellType===o.COL_CELL,{spreadsheet:c}=e[0].getMeta(),h=function(e,t,A,n){return(0,l.map)(e,e=>{var i;const r=e.getMeta();if(n){const e=ps(r),n=null!==(i=(0,l.min)(Array.from(A)))&&void 0!==i?i:0;return e.slice(n,t+1)}const{id:o,value:s,isTotals:a,level:u,spreadsheet:c}=r;let h=o;return a&&u!==t&&(h=o+"[&]"+(0,l.repeat)(s,t-u)),rs(os(h,A.size),c,!1)})}(a,s,r,null!==(i=null===(n=null===(A=c.options.interaction)||void 0===A?void 0:A.copy)||void 0===n?void 0:n.withFormat)&&void 0!==i&&i),d=u?(0,l.zip)(...h):h;return[cs(d),hs(d)]}(i):Es(e,n);return s&&((e,t=!0)=>{let A;A="string"==typeof e?{content:e,type:As.PLAIN}:e,ot()?Promise.resolve():at()&&navigator.clipboard&&window.ClipboardItem&&t?(e=>{navigator.clipboard.write([new ClipboardItem((0,l.concat)(e).reduce((e,t)=>{const{type:A,content:n}=t,i=n.replace(/\x00/g,"");return Object.assign(Object.assign({},e),{[A]:new Blob([i],{type:A})})},{}))]).catch(()=>us(e))})(A):us(A)})(s),s};class bs{constructor(e){this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[],this.isCanvasEffect=!1,this.onScroll=(0,l.throttle)(()=>{this.spreadsheet.hideTooltip()},16),this.isGuiIconShape=e=>e instanceof R&&e.imgType===ve.type,this.isConditionIconShape=(e,t)=>t.getConditionIconShapes().some(t=>{var A;return(null==t?void 0:t.name)===(null===(A=null==e?void 0:e.attributes)||void 0===A?void 0:A.name)}),this.onCanvasMousedown=e=>{if(this.target=e.target,this.spreadsheet.interaction.clearHoverTimer(),this.isResizeArea(e)){this.spreadsheet.emit(iA.LAYOUT_RESIZE_MOUSE_DOWN,e);const t=e=>{if(!this.spreadsheet.getCanvasElement())return!1;this.spreadsheet.getCanvasElement()!==e.target&&this.spreadsheet.emit(iA.LAYOUT_RESIZE_MOUSE_MOVE,e)};return window.addEventListener(nr.POINTER_MOVE,t),void window.addEventListener(nr.POINTER_UP,()=>{window.removeEventListener(nr.POINTER_MOVE,t)},{once:!0})}switch(this.spreadsheet.getCellType(e.target)){case o.DATA_CELL:this.spreadsheet.emit(iA.DATA_CELL_MOUSE_DOWN,e);break;case o.ROW_CELL:this.spreadsheet.emit(iA.ROW_CELL_MOUSE_DOWN,e);break;case o.COL_CELL:this.spreadsheet.emit(iA.COL_CELL_MOUSE_DOWN,e);break;case o.CORNER_CELL:this.spreadsheet.emit(iA.CORNER_CELL_MOUSE_DOWN,e);break;case o.MERGED_CELL:this.spreadsheet.emit(iA.MERGED_CELLS_MOUSE_DOWN,e)}},this.onCanvasMousemove=e=>{if(this.canvasMousemoveEvent=e,this.isResizeArea(e))return this.activeResizeArea(e),void this.spreadsheet.emit(iA.LAYOUT_RESIZE_MOUSE_MOVE,e.nativeEvent);this.resetResizeArea();const t=this.spreadsheet.getCell(e.target);if(t){const A=t.cellType;switch(A){case o.DATA_CELL:this.spreadsheet.emit(iA.DATA_CELL_MOUSE_MOVE,e);break;case o.ROW_CELL:this.spreadsheet.emit(iA.ROW_CELL_MOUSE_MOVE,e);break;case o.COL_CELL:this.spreadsheet.emit(iA.COL_CELL_MOUSE_MOVE,e);break;case o.CORNER_CELL:this.spreadsheet.emit(iA.CORNER_CELL_MOUSE_MOVE,e);break;case o.MERGED_CELL:this.spreadsheet.emit(iA.MERGED_CELLS_MOUSE_MOVE,e)}if(!this.hasBrushSelectionIntercepts())switch(this.spreadsheet.emit(iA.GLOBAL_HOVER,e),A){case o.DATA_CELL:this.spreadsheet.emit(iA.DATA_CELL_HOVER,e);break;case o.ROW_CELL:this.spreadsheet.emit(iA.ROW_CELL_HOVER,e);break;case o.COL_CELL:this.spreadsheet.emit(iA.COL_CELL_HOVER,e);break;case o.CORNER_CELL:this.spreadsheet.emit(iA.CORNER_CELL_HOVER,e);break;case o.MERGED_CELL:this.spreadsheet.emit(iA.MERGED_CELLS_HOVER,e)}}},this.onCanvasMouseup=e=>{if(this.isResizeArea(e))return void this.spreadsheet.emit(iA.LAYOUT_RESIZE_MOUSE_UP,e);const t=this.spreadsheet.getCell(e.target);if(t){switch(t.cellType){case o.DATA_CELL:this.spreadsheet.emit(iA.DATA_CELL_MOUSE_UP,e);break;case o.ROW_CELL:this.spreadsheet.emit(iA.ROW_CELL_MOUSE_UP,e);break;case o.COL_CELL:this.spreadsheet.emit(iA.COL_CELL_MOUSE_UP,e);break;case o.CORNER_CELL:this.spreadsheet.emit(iA.CORNER_CELL_MOUSE_UP,e);break;case o.MERGED_CELL:this.spreadsheet.emit(iA.MERGED_CELLS_MOUSE_UP,e)}lt()&&this.onCanvasSingleClick(e)}},this.onCanvasClick=e=>{const t=this.spreadsheet;if(1===e.detail&&!lt())return void this.onCanvasSingleClick(e);if(2!==e.detail)return;if(this.isResizeArea(e))return void t.emit(iA.LAYOUT_RESIZE_MOUSE_UP,e);t.emit(iA.GLOBAL_DOUBLE_CLICK,e);const A=t.getCell(e.target);if(A&&this.target===e.target)switch(A.cellType){case o.DATA_CELL:t.emit(iA.DATA_CELL_DOUBLE_CLICK,e);break;case o.ROW_CELL:t.emit(iA.ROW_CELL_DOUBLE_CLICK,e);break;case o.COL_CELL:t.emit(iA.COL_CELL_DOUBLE_CLICK,e);break;case o.CORNER_CELL:t.emit(iA.CORNER_CELL_DOUBLE_CLICK,e);break;case o.MERGED_CELL:t.emit(iA.MERGED_CELLS_DOUBLE_CLICK,e)}},this.onCanvasMouseout=e=>{if(!this.isAutoResetSheetStyle(e)||this.isMouseOnTheCanvasContainer(e))return;const{interaction:t}=this.spreadsheet;t.isSelectedState()||t.intercepts.size>0||t.reset()},this.onCanvasContextMenu=e=>{const t=this.spreadsheet;if(this.isResizeArea(e))t.emit(iA.LAYOUT_RESIZE_MOUSE_UP,e);else switch(t.emit(iA.GLOBAL_CONTEXT_MENU,e),this.spreadsheet.getCellType(e.target)){case o.DATA_CELL:this.spreadsheet.emit(iA.DATA_CELL_CONTEXT_MENU,e);break;case o.ROW_CELL:this.spreadsheet.emit(iA.ROW_CELL_CONTEXT_MENU,e);break;case o.COL_CELL:this.spreadsheet.emit(iA.COL_CELL_CONTEXT_MENU,e);break;case o.CORNER_CELL:this.spreadsheet.emit(iA.CORNER_CELL_CONTEXT_MENU,e);break;case o.MERGED_CELL:this.spreadsheet.emit(iA.MERGED_CELLS_CONTEXT_MENU,e)}},this.spreadsheet=e,this.bindEvents()}get canvasContainer(){return this.spreadsheet.container}isAutoResetSheetStyle(e){var t;const{interaction:A}=this.spreadsheet.options;return(0,l.isFunction)(null==A?void 0:A.autoResetSheetStyle)?null===(t=null==A?void 0:A.autoResetSheetStyle)||void 0===t?void 0:t.call(A,e,this.spreadsheet):null==A?void 0:A.autoResetSheetStyle}bindEvents(){this.clearAllEvents(),this.addCanvasEvent(nr.MOUSE_DOWN,this.onCanvasMousedown),this.addCanvasEvent(nr.TOUCH_START,e=>{this.target=e.target});const e=lt()?nr.TOUCH_END:nr.POINTER_UP;this.addCanvasEvent(nr.POINTER_MOVE,this.onCanvasMousemove),this.addCanvasEvent(nr.MOUSE_OUT,this.onCanvasMouseout),this.addCanvasEvent(e,this.onCanvasMouseup),this.addCanvasEvent(nr.CLICK,this.onCanvasClick),this.addCanvasEvent(nr.RIGHT_DOWN,this.onCanvasContextMenu),this.addS2Event(iA.GLOBAL_ACTION_ICON_CLICK,()=>{this.spreadsheet.interaction.addIntercepts([p.HOVER]),this.spreadsheet.interaction.clearState()}),ot()||(this.addDomEventListener(window,nr.CLICK,e=>{this.resetSheetStyle(e),this.isCanvasEffect=this.isMouseOnTheCanvasContainer(e)}),this.addDomEventListener(window,nr.KEY_DOWN,e=>{this.onKeyboardCopy(e),this.onKeyboardEsc(e),this.spreadsheet.emit(iA.GLOBAL_KEYBOARD_DOWN,e)}),this.addDomEventListener(window,nr.KEY_UP,e=>{this.spreadsheet.emit(iA.GLOBAL_KEYBOARD_UP,e)}),this.addDomEventListener(window,nr.POINTER_UP,e=>{this.spreadsheet.emit(iA.GLOBAL_MOUSE_UP,e)}),this.addDomEventListener(window,nr.POINTER_MOVE,e=>{this.spreadsheet.emit(iA.GLOBAL_MOUSE_MOVE,e)}),this.addDomEventListener(window,nr.SCROLL,this.onScroll))}onKeyboardCopy(e){const{copy:t}=this.spreadsheet.options.interaction;if(this.isCanvasEffect&&(null==t?void 0:t.enable)&&ns(e.key,f.COPY)&&(e.metaKey||e.ctrlKey)){const e=xs(this.spreadsheet);(0,l.isNil)(e)||this.spreadsheet.emit(iA.GLOBAL_COPIED,e)}}onKeyboardEsc(e){this.isCanvasEffect&&ns(e.key,f.ESC)&&this.resetSheetStyle(e)}resetSheetStyle(e){var t,A;if(!this.isAutoResetSheetStyle(e)||!this.spreadsheet)return;const{interaction:n}=this.spreadsheet;(null===(t=null==n?void 0:n.hasIntercepts)||void 0===t?void 0:t.call(n,[p.DATA_CELL_BRUSH_SELECTION,p.COL_CELL_BRUSH_SELECTION,p.ROW_CELL_BRUSH_SELECTION]))?null===(A=null==n?void 0:n.removeIntercepts)||void 0===A||A.call(n,[p.DATA_CELL_BRUSH_SELECTION,p.ROW_CELL_BRUSH_SELECTION,p.COL_CELL_BRUSH_SELECTION]):this.isMouseOnTheTooltip(e)||this.isMouseOnTheCanvasContainer(e)||(n.reset(),this.spreadsheet.emit(iA.GLOBAL_RESET,e),this.spreadsheet.emit(iA.GLOBAL_SELECTED,n.getActiveCells(),{event:e,targetCell:null,interactionName:i.GLOBAL_RESET}))}isMouseEvent(e){return(0,l.hasIn)(e,"clientX")&&(0,l.hasIn)(e,"clientY")}isMatchElement(e){const t=this.spreadsheet.getCanvasElement(),{target:A}=e;return A===t||A instanceof a.q9||A instanceof a.Hl}isMatchPoint(e){const t=this.spreadsheet.getCanvasElement(),{width:A,height:n}=this.getContainerRect(),{x:i,y:r}=t.getBoundingClientRect()||{},{clientX:o,clientY:s}=e;return o<=i+A&&o>=i&&s<=r+n&&s>=r}isMouseOnTheCanvasContainer(e){return!!this.isMouseEvent(e)&&(!!this.spreadsheet.getCanvasElement()&&(this.spreadsheet.getCanvasConfig().supportsCSSTransform?this.isMatchElement(e):this.isMatchElement(e)&&this.isMatchPoint(e)))}getContainerRect(){var e;const{facet:t,options:A}=this.spreadsheet,n=(null==t?void 0:t.hRowScrollBar)||(null==t?void 0:t.hScrollBar),{maxX:i,maxY:r}=(null==t?void 0:t.panelBBox)||{},{width:o=0,height:s=0}=A,a=(null===(e=null==n?void 0:n.theme)||void 0===e?void 0:e.size)||0;return{width:Math.min(o,i),height:Math.min(s,r+a)}}isMouseOnTheTooltip(e){var t,A,n,i;const{tooltip:r}=this.spreadsheet;if(!(null==r?void 0:r.visible))return!1;const{x:o,y:s,width:a,height:l}=(null===(n=null===(A=null===(t=this.spreadsheet.tooltip)||void 0===t?void 0:t.container)||void 0===A?void 0:A.getBoundingClientRect)||void 0===n?void 0:n.call(A))||{};return e.target instanceof Node?((e,t)=>{let A=!1,n=t;for(;n&&n!==document.body;){if(e===n){A=!0;break}n=n.parentElement}return A})(null===(i=this.spreadsheet.tooltip)||void 0===i?void 0:i.container,e.target):!!this.isMouseEvent(e)&&e.clientX>=o&&e.clientX<=o+a&&e.clientY>=s&&e.clientY<=s+l}isResizeArea(e){const t=Lo(e.target);return null==t?void 0:t.isResizeArea}activeResizeArea(e){var t,A,n;const i=(0,l.get)(e.target,"attrs.appendInfo");if(null==i?void 0:i.isResizeMask)return;this.resetResizeArea();const r=e.target;this.spreadsheet.store.set("activeResizeArea",r),r.attr(u.backgroundOpacity,null===(n=null===(A=null===(t=this.spreadsheet.theme.resizeArea)||void 0===t?void 0:t.interactionState)||void 0===A?void 0:A.hover)||void 0===n?void 0:n.backgroundOpacity)}resetResizeArea(){var e;const t=this.spreadsheet.store.get("activeResizeArea");(0,l.isEmpty)(t)||t.attr(u.backgroundOpacity,null===(e=this.spreadsheet.theme.resizeArea)||void 0===e?void 0:e.backgroundOpacity),this.spreadsheet.store.set("activeResizeArea",t)}hasBrushSelectionIntercepts(){return this.spreadsheet.interaction.hasIntercepts([p.HOVER,p.DATA_CELL_BRUSH_SELECTION,p.ROW_CELL_BRUSH_SELECTION,p.COL_CELL_BRUSH_SELECTION])}onCanvasSingleClick(e){const t=this.spreadsheet.getCell(e.target);if(this.target===e.target&&t){if(this.isGuiIconShape(e.target)&&!this.isConditionIconShape(e.target,t))return;switch(this.spreadsheet.emit(iA.GLOBAL_CLICK,e),t.cellType){case o.DATA_CELL:this.spreadsheet.emit(iA.DATA_CELL_CLICK,e);break;case o.ROW_CELL:this.spreadsheet.emit(iA.ROW_CELL_CLICK,e);break;case o.COL_CELL:this.spreadsheet.emit(iA.COL_CELL_CLICK,e);break;case o.CORNER_CELL:this.spreadsheet.emit(iA.CORNER_CELL_CLICK,e);break;case o.MERGED_CELL:this.spreadsheet.emit(iA.MERGED_CELLS_CLICK,e)}}}clear(){this.unbindEvents()}unbindEvents(){this.clearAllEvents()}addCanvasEvent(e,t){var A;null===(A=this.canvasContainer)||void 0===A||A.on(e,t),this.canvasEventHandlers.push({type:e,handler:t})}addS2Event(e,t){this.spreadsheet.on(e,t),this.s2EventHandlers.push({type:e,handler:t})}addDomEventListener(e,t,A){if(e.addEventListener){const{eventListenerOptions:n}=this.spreadsheet.options.interaction;e.addEventListener(t,A,n),this.domEventListeners.push({target:e,type:t,handler:A,options:n})}else console.error(`Please make sure ${e} has addEventListener function`)}clearAllEvents(){(0,l.each)(this.canvasEventHandlers,({type:e,handler:t})=>{var A;null===(A=this.canvasContainer)||void 0===A||A.removeEventListener(e,t)}),(0,l.each)(this.s2EventHandlers,({type:e,handler:t})=>{this.spreadsheet.off(e,t)}),(0,l.each)(this.domEventListeners,e=>{e.target.removeEventListener(e.type,e.handler,e.options)}),this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[]}getViewportPoint(e){return!this.spreadsheet.getCanvasConfig().supportsCSSTransform||(0,l.isNil)(e.offsetX)||(0,l.isNil)(e.offsetY)?this.spreadsheet.container.client2Viewport({x:e.clientX,y:e.clientY}):{x:e.offsetX,y:e.offsetY}}}class Fs extends Go{constructor(){super(...arguments),this.isRangeSelection=!1,this.handleColClick=e=>{e.stopPropagation();const{interaction:t,facet:A}=this.spreadsheet,n=this.spreadsheet.getCell(e.target),s=null==n?void 0:n.getMeta();if(!(0,l.isNil)(null==s?void 0:s.x)){t.addIntercepts([p.HOVER]);let a=[xo(n)];const u=this.spreadsheet.store.get("lastClickedCell");if(this.isRangeSelection&&u&&u.cellType===n.cellType&&u.getMeta().level===s.level){const{rowsHierarchy:l,colsHierarchy:c}=A.getLayoutResult(),[h,d]=[l.maxLevel,c.maxLevel],{start:f,end:g}=bo(u.getMeta(),s);n instanceof Nt?a=this.handleSeriesNumberRowSelected(f.rowIndex,g.rowIndex,n):(null==n?void 0:n.cellType)===o.ROW_CELL&&s.level===h?a=this.handleRowSelected(f.rowIndex,g.rowIndex,n):(null==n?void 0:n.cellType)===o.COL_CELL&&s.level===d&&(a=this.handleColSelected(f.colIndex,g.colIndex,n)),t.changeState({cells:a,stateName:r.SELECTED});const p=So(a);t.updateCells(A.getHeaderCells(p)),t.emitSelectEvent({event:e,targetCell:n,interactionName:i.RANGE_SELECTION})}else(0,l.isEmpty)(t.getCells())&&t.reset(),this.spreadsheet.store.set("lastClickedCell",n)}}}bindEvents(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindColCellClick(),this.bindKeyboardUp(),this.bindMouseMove()}reset(){this.isRangeSelection=!1,this.spreadsheet.interaction.removeIntercepts([p.CLICK])}bindKeyboardDown(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_DOWN,e=>{e.key===f.SHIFT&&(this.isRangeSelection=!0,this.spreadsheet.interaction.addIntercepts([p.CLICK]))})}bindKeyboardUp(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_UP,e=>{e.key===f.SHIFT&&this.reset()})}bindMouseMove(){this.spreadsheet.on(iA.GLOBAL_MOUSE_MOVE,e=>{this.isRangeSelection&&!e.shiftKey&&this.reset()})}bindColCellClick(){this.spreadsheet.on(iA.COL_CELL_CLICK,e=>{this.handleColClick(e)})}bindDataCellClick(){this.spreadsheet.on(iA.DATA_CELL_CLICK,e=>{e.stopPropagation();const t=this.spreadsheet.getCell(e.target),A=t.getMeta(),{interaction:n}=this.spreadsheet;if(!A)return;const o=this.spreadsheet.store.get("lastClickedCell");if(!this.isRangeSelection||(null==o?void 0:o.cellType)!==t.cellType)return void this.spreadsheet.store.set("lastClickedCell",t);const{start:s,end:a}=bo(o.getMeta(),t.getMeta()),u=(0,l.range)(s.colIndex,a.colIndex+1).flatMap(e=>{const A=this.spreadsheet.facet.getColLeafNodes()[e].id;return(0,l.range)(s.rowIndex,a.rowIndex+1).map(n=>({id:`${this.spreadsheet.facet.getSeriesNumberWidth()||this.spreadsheet.isTableMode()?String(n):this.spreadsheet.facet.getRowLeafNodes()[n].id}-${A}`,colIndex:e,rowIndex:n,type:t.cellType}))});n.addIntercepts([p.CLICK,p.HOVER]),n.changeState({cells:u,stateName:r.SELECTED}),this.spreadsheet.showTooltipWithInfo(e,Do(this.spreadsheet)),n.emitSelectEvent({targetCell:t,event:e,interactionName:i.RANGE_SELECTION})})}handleSeriesNumberRowSelected(e,t,A){const n=this.spreadsheet.facet.getColLeafNodes()[0].id;return(0,l.range)(e,t+1).map(e=>({id:`${String(e)}-${n}`,colIndex:0,rowIndex:e,type:A.cellType}))}handleRowSelected(e,t,A){return this.spreadsheet.facet.getRowNodes().filter(({rowIndex:A})=>(0,l.inRange)(A,e,t+1)).map(e=>({id:e.id,colIndex:e.colIndex,rowIndex:e.rowIndex,type:A.cellType}))}handleColSelected(e,t,A){return this.spreadsheet.facet.getColLeafNodes().filter(({colIndex:A})=>(0,l.inRange)(A,e,t+1)).map(e=>({id:e.id,colIndex:e.colIndex,rowIndex:e.rowIndex,type:A.cellType}))}}class Ss extends Go{constructor(){super(...arguments),this.resizeStartPosition={}}bindEvents(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()}initResizeGroup(){if(this.resizeReferenceGroup)return;this.resizeReferenceGroup=this.spreadsheet.facet.foregroundGroup.appendChild(new a.YJ);const{width:e,height:t}=this.spreadsheet.options,{guideLineColor:A,guideLineDash:n,size:i}=this.getResizeAreaTheme(),r={d:"",lineDash:n,stroke:A,lineWidth:i};this.resizeReferenceGroup.appendChild(new a.wA({id:"RESIZE_START_GUIDE_LINE",style:r})),this.resizeReferenceGroup.appendChild(new a.wA({id:"RESIZE_END_GUIDE_LINE",style:r})),this.resizeReferenceGroup.appendChild(new Wt({id:"RESIZE_MASK",style:{x:0,y:0,width:e,height:t,fill:"transparent"}},{isResizeArea:!0,isResizeMask:!0}))}getResizeAreaTheme(){return this.spreadsheet.theme.resizeArea}setResizeTarget(e){this.resizeTarget=e}getGuideLineWidthAndHeight(){const{width:e,height:t}=this.spreadsheet.options,{maxY:A,maxX:n}=this.spreadsheet.facet.panelBBox;return{width:Math.min(n,e),height:Math.min(A,t)}}getResizeShapes(){var e;return(null===(e=this.resizeReferenceGroup)||void 0===e?void 0:e.children)||[]}setResizeMaskCursor(e){const[,,t]=this.getResizeShapes();null==t||t.attr("cursor",e)}updateResizeGuideLinePosition(e,t){const A=this.getResizeShapes();if((0,l.isEmpty)(A))return;const[n,i]=A,{type:r,offsetX:o,offsetY:s,width:a,height:u,size:c}=t,{width:h,height:d}=this.getGuideLineWidthAndHeight();this.cursorType=`${r}-resize`,this.setResizeMaskCursor(this.cursorType);const f=c/2;if(r===Kt.Horizontal)return n.attr("d",[["M",o+f,s],["L",o+f,d]]),i.attr("d",[["M",o+a-f,s],["L",o+a-f,d]]),this.resizeStartPosition.offsetX=e.offsetX,void(this.resizeStartPosition.clientX=e.clientX);n.attr("d",[["M",o,s+f],["L",h,s+f]]),i.attr("d",[["M",o,s+u-f],["L",h,s+u-f]]),this.resizeStartPosition.offsetY=e.offsetY,this.resizeStartPosition.clientY=e.clientY}bindMouseDown(){this.spreadsheet.on(iA.LAYOUT_RESIZE_MOUSE_DOWN,e=>{var t;null===(t=null==e?void 0:e.preventDefault)||void 0===t||t.call(e);const A=e.target,n=this.getCellAppendInfo(e.target);this.spreadsheet.store.set("resized",!1),(null==n?void 0:n.isResizeArea)&&(this.spreadsheet.hideTooltip(),this.spreadsheet.interaction.addIntercepts([p.RESIZE]),this.setResizeTarget(A),this.showResizeGroup(),this.updateResizeGuideLinePosition(e,n))})}bindMouseMove(){this.spreadsheet.on(iA.LAYOUT_RESIZE_MOUSE_MOVE,(0,l.throttle)(this.resizeMouseMove.bind(this),33))}getResizeGuideLinePosition(){var e;const[t,A]=(null===(e=this.resizeReferenceGroup)||void 0===e?void 0:e.children)||[],n=(null==t?void 0:t.attr("d"))||[],i=(null==A?void 0:A.attr("d"))||[],[,r=0,o=0]=n[0]||[],[,s=0,a=0]=i[0]||[];return{start:{x:+r,y:+o},end:{x:+s,y:+a}}}getDisAllowResizeInfo(){var e;const t=this.getResizeInfo(),{resize:A}=this.spreadsheet.options.interaction,{width:n,height:i,resizedWidth:r=0,resizedHeight:o=0}=t,s=null===(e=null==A?void 0:A.disable)||void 0===e?void 0:e.call(A,t);return{displayWidth:s?n:r,displayHeight:s?i:o,isDisabled:s}}getResizeCellField(e){var t,A,n,i,r;const o=e.type===Kt.Vertical,s=o?!this.isEffectRowOf(zt.ALL):!this.isEffectColOf(zt.ALL);return this.spreadsheet.isTableMode()?o?(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.rowId)||String(null===(A=null==e?void 0:e.meta)||void 0===A?void 0:A.rowIndex):null===(n=null==e?void 0:e.meta)||void 0===n?void 0:n.field:s?null===(i=null==e?void 0:e.meta)||void 0===i?void 0:i.id:null===(r=null==e?void 0:e.meta)||void 0===r?void 0:r.field}isEffectRowOf(e){var t,A;return(null===(A=null===(t=this.spreadsheet.options.interaction)||void 0===t?void 0:t.resize)||void 0===A?void 0:A.rowResizeType)===e}isEffectColOf(e){var t,A;return(null===(A=null===(t=this.spreadsheet.options.interaction)||void 0===t?void 0:t.resize)||void 0===A?void 0:A.colResizeType)===e}getCellStyleByField(e){const{interaction:t}=this.spreadsheet,A=this.getResizeInfo(),n=A.type===Kt.Vertical?t.getActiveRowCells():t.getActiveColCells(),i=t.isSelectedState()&&n.length>1;return(this.isEffectRowOf(zt.SELECTED)||this.isEffectColOf(zt.SELECTED))&&i?n.reduce((t,n)=>(pr.getAllLeaveNodes(n.getMeta()).forEach(n=>{const i=Object.assign(Object.assign({},A),{meta:n});t[this.getResizeCellField(i)]=e}),t),{}):{[this.getResizeCellField(A)]:e}}getResizeWidthDetail(){const e=this.getResizeInfo(),{displayWidth:t}=this.getDisAllowResizeInfo();switch(e.effect){case Vt.Field:return{eventType:iA.LAYOUT_RESIZE_ROW_WIDTH,style:{rowCell:{widthByField:{[e.meta.field]:t}}}};case Vt.Tree:return{eventType:iA.LAYOUT_RESIZE_TREE_WIDTH,style:{rowCell:{treeWidth:t}}};case Vt.Cell:return{eventType:iA.LAYOUT_RESIZE_COL_WIDTH,style:{colCell:{width:this.isEffectColOf(zt.ALL)?t:void 0,widthByField:this.getCellStyleByField(t)}}};case Vt.Series:return{eventType:iA.LAYOUT_RESIZE_SERIES_WIDTH,seriesNumberWidth:t};default:return null}}getResizeHeightDetail(){const{style:e}=this.spreadsheet.options,t=this.getResizeInfo(),{displayHeight:A}=this.getDisAllowResizeInfo();switch(t.effect){case Vt.Field:return{eventType:iA.LAYOUT_RESIZE_COL_HEIGHT,style:{colCell:this.getResizedCellStyleByField(this.getColCellHeightByField(t,A),null==e?void 0:e.colCell,A)}};case Vt.Cell:return{eventType:iA.LAYOUT_RESIZE_ROW_HEIGHT,style:{rowCell:Object.assign(Object.assign({},this.getResizedCellStyleByField(this.getCellStyleByField(A),null==e?void 0:e.rowCell,A)),{height:this.isEffectRowOf(zt.ALL)?A:void 0})}};default:return null}}getResizedCellStyleByField(e,t,A){if(!((null==t?void 0:t.maxLines)>1&&(null==t?void 0:t.wordWrap)))return{heightByField:e};const{cell:n}=this.getResizeInfo(),i=n.getMaxLinesByCustomHeight({targetCell:n,displayHeight:A,isCustomHeight:!0});return{heightByField:e,maxLinesByField:Object.keys(e||{}).reduce((e,t)=>(e[t]=i,e),{})}}getColCellHeightByField(e,t){return this.spreadsheet.isCustomColumnFields()||this.spreadsheet.isTableMode()?this.spreadsheet.facet.getColNodes().filter(t=>{var A,n;return t.level===(null===(A=e.meta)||void 0===A?void 0:A.level)&&t.height===(null===(n=e.meta)||void 0===n?void 0:n.height)}).reduce((e,A)=>(e[A.field]=t,e),{}):{[e.meta.field]:t}}getResizeDetail(){return this.getResizeInfo().type===Kt.Horizontal?this.getResizeWidthDetail():this.getResizeHeightDetail()}showResizeGroup(){var e;this.initResizeGroup(),null===(e=this.resizeReferenceGroup)||void 0===e||e.setAttribute("visibility","visible")}hideResizeGroup(){var e;null===(e=this.resizeReferenceGroup)||void 0===e||e.setAttribute("visibility","hidden")}bindMouseUp(){this.spreadsheet.on(iA.GLOBAL_MOUSE_UP,()=>{var e;this.cursorType="default",this.setResizeMaskCursor(this.cursorType),this.resizeReferenceGroup&&!(0,l.isEmpty)(null===(e=this.resizeReferenceGroup)||void 0===e?void 0:e.children)&&(this.hideResizeGroup(),this.renderResizedResult())})}resizeMouseMove(e){var t,A;if("visible"!==(null===(t=this.resizeReferenceGroup)||void 0===t?void 0:t.parsedStyle.visibility))return;const n=this.getResizeInfo(),i=(null===(A=this.resizeReferenceGroup)||void 0===A?void 0:A.children)||[];if((0,l.isEmpty)(i))return;const[,r]=i,[o,s]=(0,l.clone)(r.attr("d"));n.type===Kt.Horizontal?this.updateHorizontalResizingEndGuideLinePosition(e.offsetX,n,{start:o,end:s}):this.updateVerticalResizingEndGuideLinePosition(e.offsetY,n,{start:o,end:s}),this.updateResizeGuideLineTheme(r),r.attr("d",[o,s])}updateResizeGuideLineTheme(e){const{guideLineColor:t,guideLineDisableColor:A}=this.getResizeAreaTheme(),{isDisabled:n}=this.getDisAllowResizeInfo();e.attr("stroke",n?A:t),this.setResizeMaskCursor(n?"no-drop":this.cursorType)}updateHorizontalResizingEndGuideLinePosition(e,t,A){var n,i;const{minCellWidth:r=40}=(null===(n=this.spreadsheet.options.interaction)||void 0===n?void 0:n.resize)||{};let o=e-this.resizeStartPosition.offsetX;t.width+o<r&&(o=-(t.width-r));const s=t.offsetX+t.width+o,a=t.size/2;A.start[1]=s-a,A.end[1]=s-a,null===(i=this.resizeTarget)||void 0===i||i.attr({x:s-t.size})}updateVerticalResizingEndGuideLinePosition(e,t,A){var n,i;const{minCellHeight:r=20}=(null===(n=this.spreadsheet.options.interaction)||void 0===n?void 0:n.resize)||{};let o=e-this.resizeStartPosition.offsetY;t.height+o<r&&(o=-(t.height-r));const s=t.offsetY+t.height+o,a=t.size/2;A.start[2]=s-a,A.end[2]=s-a,null===(i=this.resizeTarget)||void 0===i||i.attr({y:s-t.size})}renderResizedResult(){return(0,Q.sH)(this,void 0,void 0,function*(){const e=this.getResizeInfo(),{style:t,seriesNumberWidth:A,eventType:n}=this.getResizeDetail()||{},i={info:e,style:t};this.spreadsheet.emit(iA.LAYOUT_RESIZE,i),this.spreadsheet.emit(n,i),t&&this.spreadsheet.setOptions({style:t}),A&&this.spreadsheet.setTheme({rowCell:{seriesNumberWidth:A}}),this.spreadsheet.store.set("resized",!0),yield this.render()})}getResizeInfo(){const e=this.getCellAppendInfo(this.resizeTarget),{start:t,end:A}=this.getResizeGuideLinePosition(),n=Bi(A.x-t.x+(e.type===Kt.Horizontal?e.size:0)),i=Bi(A.y-t.y+(e.type===Kt.Vertical?e.size:0));return Object.assign(Object.assign({},e),{resizedWidth:n,resizedHeight:i})}render(){return(0,Q.sH)(this,void 0,void 0,function*(){this.resizeStartPosition={},this.resizeTarget=null,this.resizeReferenceGroup=null,yield this.spreadsheet.render(!1)})}}const Ts=[f.ARROW_LEFT,f.ARROW_RIGHT,f.ARROW_UP,f.ARROW_DOWN];class Ls extends Go{constructor(e){super(e)}isCanvasEffect(){return this.spreadsheet.interaction.eventController.isCanvasEffect}bindEvents(){this.spreadsheet.on(iA.GLOBAL_KEYBOARD_DOWN,e=>{if(!this.isCanvasEffect())return;const t=e.shiftKey,A=e.metaKey;let n=!1,i=!1,r=!1;Ts.includes(e.key)&&(A&&t?(n=!1,i=!0,r=!1):A?(n=!0,i=!0,r=!0):t?(n=!1,i=!1,r=!1):(n=!0,i=!1,r=!0),this.handleMove({event:e,changeStartCell:n,isJumpMode:i,isSingleSelection:r}))}),this.spreadsheet.on(iA.DATA_CELL_CLICK,e=>{const t=this.spreadsheet.getCell(e.target),A=null==t?void 0:t.getMeta();A&&(this.startCell=this.getCellMetaByViewMeta(A),this.endCell=this.startCell)})}getCellMetaByViewMeta(e){return{rowIndex:e.rowIndex,colIndex:e.colIndex,id:e.id,type:o.DATA_CELL}}handleMove({event:e,changeStartCell:t,isJumpMode:A,isSingleSelection:n}){const{spreadsheet:o,startCell:s,endCell:a}=this,l=this.getMoveInfo(e.key,t?s:a,A);if(!l)return;const[u,c]=[l.row,l.col];this.scrollToActiveCell(o,u,c);const h=this.generateCellMeta(o,u,c),d=n?[h]:this.getRangeCells(o,s,h);t&&(this.startCell=h),this.endCell=h,o.interaction.changeState({stateName:r.SELECTED,cells:d}),o.interaction.emitSelectEvent({event:e,interactionName:i.SELECTED_CELL_MOVE}),this.spreadsheet.emit(iA.DATA_CELL_SELECT_MOVE,d)}generateCellMeta(e,t,A){const{isTableMode:n,facet:i}=e,r=i.getRowLeafNodes(),s=i.getColLeafNodes(),a=n()?String(t):r[t].id;return{rowIndex:t,colIndex:A,id:kt(a,s[A].id),type:o.DATA_CELL}}getRangeCells(e,t,A){const{start:{rowIndex:n,colIndex:i},end:{rowIndex:r,colIndex:o}}=bo(t,A),s=[];for(let t=n;t<=r;t++)for(let A=i;A<=o;A++)s.push(this.generateCellMeta(e,t,A));return s}getMoveInfo(e,t,A){const{spreadsheet:n}=this,{rowCount:i,trailingRowCount:r,colCount:o,trailingColCount:s}=n.facet.getFrozenOptions(),{start:a,end:l}=n.facet.getCellRange(),u=n.facet.getColLeafNodes(),[c,h]=[0+o,u.length-s-1],[d,g]=[a+i,l-r];if(t)switch(e){case f.ARROW_RIGHT:if(t.colIndex+1>h)return;return{row:t.rowIndex,col:A?h:t.colIndex+1};case f.ARROW_LEFT:if(t.colIndex-1<c)return;return{row:t.rowIndex,col:A?c:t.colIndex-1};case f.ARROW_UP:if(t.rowIndex-1<d)return;return{row:A?d:t.rowIndex-1,col:t.colIndex};case f.ARROW_DOWN:if(t.rowIndex+1>g)return;return{row:A?g:t.rowIndex+1,col:t.colIndex}}}calculateOffset(e,t,A){const n=e.facet,{rowCount:i}=n.getFrozenOptions(),r=n.getColLeafNodes(),{viewportHeight:o,viewportWidth:s}=n.panelBBox,a=n.frozenGroupAreas,l=a[Dt.Col].width,u=a[Dt.TrailingCol].width,c=a[Dt.TrailingRow].height,h=n.panelScrollGroupIndexes,d=r.find(e=>e.colIndex===A);let f=null,g=null;return A<=h[0]?f=(null==d?void 0:d.x)-l:A>=h[1]&&(f=(null==d?void 0:d.x)+(null==d?void 0:d.width)-s+u),t<=h[2]?g=n.viewCellHeights.getCellOffsetY(t-i):t>=h[3]&&(g=n.viewCellHeights.getCellOffsetY(t+1)-o+c),{offsetX:f,offsetY:g}}scrollToActiveCell(e,t,A){const{offsetX:n,offsetY:i}=this.calculateOffset(e,t,A),{facet:r}=e,{scrollX:o,scrollY:s}=e.facet.getScrollOffset();r.scrollWithAnimation({offsetX:{value:null!=n?n:o},offsetY:{value:null!=i?i:s}})}}class Qs{constructor(e){this.interactions=new Map,this.intercepts=new Set,this.hoverTimer=null,this.drawRafId=null,this.defaultState={cells:[],force:!1},this.onTriggerInteractionsResetEffect=()=>{this.interactions.forEach(e=>{e.reset()})},this.shouldForbidHeaderCellSelected=e=>(0,l.unionBy)(e,"type").length>1,this.highlightNodes=(e=[],t=r.HOVER)=>{e.forEach(e=>{var A;null===(A=null==e?void 0:e.belongsCell)||void 0===A||A.updateByState(t,e.belongsCell)})},this.mergeCells=(e,t)=>{((e,t,A)=>{var n;const i=t||(e=>{const{interaction:t}=e,A=t.getActiveCells(),n=[];return(0,l.forEach)(A,(e,t)=>{const A=e.getMeta();n.push(Object.assign(Object.assign({},0===t?{showText:!0}:{}),{colIndex:null==A?void 0:A.colIndex,rowIndex:null==A?void 0:A.rowIndex}))}),n})(e);if((null==i?void 0:i.length)<=1)return void console.error("[mergeCell]: The merged cells must be more than one!");const r=e.facet.getDataCells(),{cells:o,viewMeta:s}=sr(r,e,i);if(!(0,l.isEmpty)(o)){const t=(null===(n=e.options)||void 0===n?void 0:n.mergedCellsInfo)||[];t.push(i),e.setOptions({mergedCellsInfo:t}),e.facet.panelScrollGroup.addMergeCell(ar(e,o,A?void 0:s))}})(this.spreadsheet,e,t)},this.unmergeCell=e=>{((e,t)=>{var A,n,i;if(!t||t.cellType!==o.MERGED_CELL)return void console.error(`[unmergeCell]: The ${t} is not a MergedCell`);const r=((e,t)=>{const A=(0,l.map)(e.cells,e=>({colIndex:e.getMeta().colIndex,rowIndex:e.getMeta().rowIndex}));return(0,l.filter)(t,e=>{const t=e.map(e=>e.showText?{colIndex:e.colIndex,rowIndex:e.rowIndex}:e);return!(0,l.isEqual)(t,A)})})(t,(null===(A=e.options)||void 0===A?void 0:A.mergedCellsInfo)||[]);(null==r?void 0:r.length)!==(null===(i=null===(n=e.options)||void 0===n?void 0:n.mergedCellsInfo)||void 0===i?void 0:i.length)&&(e.setOptions({mergedCellsInfo:r}),t.remove())})(this.spreadsheet,e)},this.spreadsheet=e,this.registerEventController(),this.registerInteractions(),ot()||window.addEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)}destroy(){this.interactions.clear(),this.intercepts.clear(),this.eventController.clear(),this.clearHoverTimer(),this.resetState(),ot()||window.removeEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)}reset(){this.clearState(),this.clearHoverTimer(),this.intercepts.clear(),this.spreadsheet.hideTooltip()}setState(e){((e,t)=>{e.interaction.isEqualStateName(null==t?void 0:t.stateName)||(To(e),e.hideTooltip(),e.store.set(h,t))})(this.spreadsheet,e)}getState(){return this.spreadsheet.store.get(h)||this.defaultState}setInteractedCells(e){const t=this.getInteractedCells().concat([e]),A=this.getState();A.interactedCells=t,this.setState(A)}getInteractedCells(){const e=this.getState();return(null==e?void 0:e.interactedCells)||[]}resetState(){this.spreadsheet.store.set(h,this.defaultState)}getCurrentStateName(){return this.getState().stateName}isEqualStateName(e){return this.getCurrentStateName()===e}isStateOf(e){const t=this.getState();return(null==t?void 0:t.stateName)===e}isSelectedState(){return this.isBrushSelectedState()||[r.SELECTED,r.ALL_SELECTED].some(e=>this.isStateOf(e))}isBrushSelectedState(){return[r.ROW_CELL_BRUSH_SELECTED,r.COL_CELL_BRUSH_SELECTED,r.DATA_CELL_BRUSH_SELECTED].some(e=>this.isStateOf(e))}isAllSelectedState(){return this.isStateOf(r.ALL_SELECTED)}isHoverFocusState(){return this.isStateOf(r.HOVER_FOCUS)}isHoverState(){return this.isStateOf(r.HOVER)}isActiveCell(e){return!!this.getCells().find(t=>e.getMeta().id===t.id&&e.cellType===t.type)}isSelectedCell(e){return this.isSelectedState()&&this.isActiveCell(e)}getCells(e){const t=this.getState(),A=(null==t?void 0:t.cells)||[];return(0,l.isNil)(e)?A:A.filter(t=>e.includes(t.type))}getActiveCells(){var e;const t=this.getCells().map(e=>e.id),A=null===(e=this.spreadsheet.facet)||void 0===e?void 0:e.getCells();return(0,l.map)(t,e=>(0,l.find)(A,t=>{var A;return(null===(A=null==t?void 0:t.getMeta())||void 0===A?void 0:A.id)===e})).filter(Boolean)}getActiveDataCells(){return this.getActiveCells().filter(e=>e.cellType===o.DATA_CELL)}getActiveRowCells(){return this.getActiveCells().filter(e=>e.cellType===o.ROW_CELL)}getActiveColCells(){return this.getActiveCells().filter(e=>e.cellType===o.COL_CELL)}clearStyleIndependent(){(this.isSelectedState()||this.isHoverState()||this.isAllSelectedState())&&this.spreadsheet.facet.getDataCells().forEach(e=>{e.hideInteractionShape()})}getUnSelectedDataCells(){return this.spreadsheet.facet.getDataCells().filter(e=>!this.isActiveCell(e))}scrollToCellByMeta(e,t={animate:!0}){if(!e)return;const{skipScrollEvent:A,animate:n}=t,{facet:i}=this.spreadsheet;(i.hRowScrollBar||i.hScrollBar||i.vScrollBar)&&this.scrollTo({skipScrollEvent:A,rowHeaderOffsetX:{value:e.x,animate:n},offsetX:{value:e.x-(0,l.get)(i,"frozenGroupAreas.frozenCol.width",0),animate:n},offsetY:{value:e.y-(0,l.get)(i,"frozenGroupAreas.frozenRow.height",0),animate:n}})}scrollTo(e){const{facet:t}=this.spreadsheet,{scrollX:A,scrollY:n,rowHeaderScrollX:i}=t.getScrollOffset();t.updateScrollOffset(Co({skipScrollEvent:!1,offsetX:{value:A,animate:!1},offsetY:{value:n,animate:!1},rowHeaderOffsetX:{value:i,animate:!1}},e))}scrollToNode(e,t){this.scrollToCellByMeta(e,t)}scrollToCell(e,t){this.scrollToCellByMeta(e.getMeta(),t)}scrollToCellById(e,t){if(!e)return;const A=[...this.spreadsheet.facet.getHeaderNodes(),...this.spreadsheet.facet.getDataCells().map(e=>e.getMeta())].find(t=>t.id===e);A&&this.scrollToCellByMeta(A,t)}scrollToTop(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetY:{value:0,animate:null==e?void 0:e.animate}})}scrollToRight(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetX:{value:this.spreadsheet.facet.panelBBox.maxX,animate:null==e?void 0:e.animate}})}scrollToBottom(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetY:{value:this.spreadsheet.facet.panelBBox.maxY,animate:null==e?void 0:e.animate}})}scrollToLeft(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetX:{value:0,animate:null==e?void 0:e.animate}})}selectAll(){const e=this.spreadsheet.facet.getCells().map(xo);this.changeState({cells:e,stateName:r.ALL_SELECTED}),this.addIntercepts([p.HOVER]),this.updateCells(this.spreadsheet.facet.getCells())}highlightCell(e,t){this.changeCell(Object.assign(Object.assign({},t),{cell:e,stateName:r.HOVER}))}selectCell(e,t){this.changeCell(Object.assign(Object.assign({},t),{cell:e,stateName:r.SELECTED}))}changeCell(e={}){var t,A;const{event:n,cell:i,stateName:s=r.SELECTED,interactionName:a,scrollIntoView:u=!0,animate:c=!0,skipScrollEvent:h=!0}=e;if((0,l.isEmpty)(i))return;const d=null===(t=null==i?void 0:i.getMeta)||void 0===t?void 0:t.call(i);if(!d||(0,l.isNil)(null==d?void 0:d.x))return;this.addIntercepts([p.HOVER]);const f=this.spreadsheet.isHierarchyTreeType(),g=(null==i?void 0:i.cellType)===o.COL_CELL,v=this.getState(),m=this.isSelectedCell(i),C=(null==e?void 0:e.isMultiSelection)&&this.isSelectedState();let w=m?[]:this.spreadsheet.facet.getCellChildrenNodes(i),y=m?[]:[xo(i)];if(C&&(y=(0,l.concat)((null==v?void 0:v.cells)||[],y),w=(0,l.concat)((null==v?void 0:v.nodes)||[],w),m&&(y=y.filter(({id:e})=>e!==d.id),w=w.filter(e=>!(null==e?void 0:e.id.includes(d.id))))),(0,l.isEmpty)(y))return this.reset(),void this.emitSelectEvent({event:n,targetCell:i,interactionName:a});if(this.shouldForbidHeaderCellSelected(y))return;const B=(0,l.isEmpty)(w)?[i.getMeta()]:w;this.changeState({cells:y,nodes:B,stateName:s});const E=So(y);return this.updateCells(this.spreadsheet.facet.getHeaderCells(E)),f&&!g||this.highlightNodes(w,s),u&&this.scrollToCell(i,{skipScrollEvent:h,animate:c}),null===(A=this.spreadsheet.facet.centerFrame)||void 0===A||A.toFront(),this.emitSelectEvent({event:n,targetCell:i,interactionName:a}),!0}hideColumns(){return(0,Q.sH)(this,arguments,void 0,function*(e=[],t=!0){yield Qi(this.spreadsheet,e,t)})}getBrushSelectionInfo(e){var t,A,n;return(0,l.isBoolean)(e)?{dataCellBrushSelection:e,rowCellBrushSelection:e,colCellBrushSelection:e}:{dataCellBrushSelection:null!==(t=null==e?void 0:e.dataCell)&&void 0!==t&&t,rowCellBrushSelection:null!==(A=null==e?void 0:e.rowCell)&&void 0!==A&&A,colCellBrushSelection:null!==(n=null==e?void 0:e.colCell)&&void 0!==n&&n}}getDefaultInteractions(){const{resize:e,brushSelection:t,multiSelection:A,rangeSelection:n,selectedCellMove:r}=this.spreadsheet.options.interaction,{dataCellBrushSelection:o,rowCellBrushSelection:s,colCellBrushSelection:a}=this.getBrushSelectionInfo(t);return[{key:i.CORNER_CELL_CLICK,interaction:Yo},{key:i.DATA_CELL_CLICK,interaction:Ko},{key:i.ROW_COLUMN_CLICK,interaction:Vo},{key:i.HEADER_CELL_LINK_CLICK,interaction:zo},{key:i.MERGED_CELLS_CLICK,interaction:Wo},{key:i.PREVIEW_CLICK,interaction:Xo},{key:i.HOVER,interaction:qo,enable:!lt()},{key:i.DATA_CELL_BRUSH_SELECTION,interaction:$o,enable:!lt()&&o},{key:i.ROW_CELL_BRUSH_SELECTION,interaction:es,enable:!lt()&&s},{key:i.COL_CELL_BRUSH_SELECTION,interaction:Jo,enable:!lt()&&a},{key:i.COL_ROW_RESIZE,interaction:Ss,enable:!lt()&&e},{key:i.DATA_CELL_MULTI_SELECTION,interaction:ts,enable:!lt()&&A},{key:i.RANGE_SELECTION,interaction:Fs,enable:!lt()&&n},{key:i.SELECTED_CELL_MOVE,interaction:Ls,enable:!lt()&&r}]}registerInteractions(){const{customInteractions:e}=this.spreadsheet.options.interaction;this.interactions.clear(),this.getDefaultInteractions().forEach(({key:e,interaction:t,enable:A})=>{!1!==A&&this.interactions.set(e,new t(this.spreadsheet))}),(0,l.isEmpty)(e)||(0,l.forEach)(e,e=>{const t=e.interaction;t&&this.interactions.set(e.key,new t(this.spreadsheet))})}registerEventController(){this.eventController=new bs(this.spreadsheet)}draw(){null!==this.drawRafId&&cancelAnimationFrame(this.drawRafId),this.drawRafId=requestAnimationFrame(()=>{this.spreadsheet.container.render(),this.drawRafId=null})}clearState(){To(this.spreadsheet)&&this.draw()}changeState(e){const{interaction:t}=this.spreadsheet,{cells:A=[],force:n,stateName:i,onUpdateCells:o}=e;if((0,l.isEmpty)(A)&&i===r.SELECTED)return void(n&&t.changeState({cells:[],stateName:r.UNSELECTED}));this.getCurrentStateName()===r.ALL_SELECTED&&this.clearStyleIndependent(),this.clearState(),this.setState(e);const s=()=>{this.updateAllDataCells()};o?o(this,s):s(),this.draw()}updateAllDataCells(){this.updateCells(this.spreadsheet.facet.getDataCells())}updateCells(e=[]){e.forEach(e=>{e.update()})}addIntercepts(e=[]){e.forEach(e=>{this.intercepts.add(e)})}hasIntercepts(e=[]){return e.some(e=>this.intercepts.has(e))}removeIntercepts(e=[]){e.forEach(e=>{this.intercepts.delete(e)})}clearHoverTimer(){clearTimeout(this.hoverTimer)}setHoverTimer(e){this.hoverTimer=e}getHoverTimer(){return this.hoverTimer}getSelectedCellHighlight(){var e;const{selectedCellHighlight:t}=this.spreadsheet.options.interaction;if((0,l.isBoolean)(t))return{rowHeader:t,colHeader:t,currentRow:t,currentCol:t};const{rowHeader:A=!1,colHeader:n=!1,currentRow:i=!1,currentCol:r=!1}=null!==(e=t)&&void 0!==e?e:{};return{rowHeader:A,colHeader:n,currentRow:i,currentCol:r}}getHoverAfterScroll(){return this.spreadsheet.options.interaction.hoverAfterScroll}getHoverHighlight(){const{hoverHighlight:e}=this.spreadsheet.options.interaction;if((0,l.isBoolean)(e))return{rowHeader:e,colHeader:e,currentRow:e,currentCol:e};const{rowHeader:t=!1,colHeader:A=!1,currentRow:n=!1,currentCol:i=!1}=null!=e?e:{};return{rowHeader:t,colHeader:A,currentRow:n,currentCol:i}}getBrushSelection(){const{brushSelection:e}=this.spreadsheet.options.interaction;if((0,l.isBoolean)(e))return{dataCell:e,rowCell:e,colCell:e};const{dataCell:t=!1,rowCell:A=!1,colCell:n=!1}=null!=e?e:{};return{dataCell:t,rowCell:A,colCell:n}}updateDataCellRelevantHeaderCells(e,t){this.updateDataCellRelevantColCells(e,t),this.updateDataCellRelevantRowCells(e,t)}updateDataCellRelevantRowCells(e,t){const{rowId:A}=t,{facet:n,interaction:i}=this.spreadsheet,o=e===r.HOVER,{rowHeader:s}=o?i.getHoverHighlight():i.getSelectedCellHighlight();if(s&&A){const i=o?yo(A,n.getRowCells(),this.spreadsheet.isHierarchyTreeType()):function(e,t){var A;const{facet:n,options:i}=t;if(t.isTableMode()){if(!(null===(A=i.seriesNumber)||void 0===A?void 0:A.enable))return[];const t=n.getColLeafNodes()[0].id,r=kt(String(e.rowIndex),t),o=[],s=n.getCellById(r);return s&&s instanceof nA&&o.push(s),o}return yo(e.rowId,n.getRowCells(),t.isHierarchyTreeType())}(t,this.spreadsheet),r=[...n.getSeriesNumberCells().filter(e=>i.find(t=>t.getMeta().y===e.getMeta().y)),...i];(0,l.forEach)(r,t=>{t.updateByState(e)})}}updateDataCellRelevantColCells(e,t){const{colId:A}=t,{facet:n,interaction:i}=this.spreadsheet,{colHeader:o}=e===r.HOVER?i.getHoverHighlight():i.getSelectedCellHighlight();o&&A&&((e,t,A)=>{if(e){const n=yo(e,t);(0,l.forEach)(n,e=>{e.updateByState(A)})}})(A,n.getColCells(),e)}emitSelectEvent(e){const{interaction:t}=this.spreadsheet,{cells:A}=e,n=(0,Q.Tt)(e,["cells"]),i=A||t.getActiveCells(),r=(null==n?void 0:n.targetCell)||i[0],s=Object.assign(Object.assign({},n),{targetCell:r}),a=null==r?void 0:r.cellType,l={[o.CORNER_CELL]:iA.CORNER_CELL_SELECTED,[o.ROW_CELL]:iA.ROW_CELL_SELECTED,[o.COL_CELL]:iA.COL_CELL_SELECTED,[o.DATA_CELL]:iA.DATA_CELL_SELECTED}[a];l&&(this.spreadsheet.emit(l,i,s),this.spreadsheet.emit(iA.GLOBAL_SELECTED,i,s))}}const Is=12,Us=(e,t)=>{var A,n;const{basicColors:i,others:r}=e,o=null==t?void 0:t.isTableMode(),s=ut()?"bold":700;return{text:{fontFamily:Uo,fontSize:Is,fontWeight:s,fill:i[0],opacity:1,textAlign:o?"center":"left",textBaseline:"middle"},bolderText:{fontFamily:Uo,fontSize:Is,fontWeight:s,fill:i[0],opacity:1,textAlign:o?"center":"right",textBaseline:"middle"},measureText:{fontFamily:Uo,fontSize:Is,fontWeight:s,fill:i[0],opacity:1,textAlign:"left",textBaseline:"middle"},cell:{backgroundColor:i[3],backgroundColorOpacity:1,horizontalBorderColor:i[10],horizontalBorderColorOpacity:1,verticalBorderColor:i[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,borderDash:[],padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:i[4],backgroundOpacity:.6},selected:{backgroundColor:i[4],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:i[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(A=null==r?void 0:r.results)&&void 0!==A?A:i[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(n=null==r?void 0:r.highlight)&&void 0!==n?n:i[6],backgroundOpacity:1}}},icon:{fill:i[0],size:10,margin:{right:4,left:4}}}},Os=(e,t)=>{var A,n;const{basicColors:i,others:r}=e,o=null==t?void 0:t.isTableMode(),s=ut()?"bold":700;return{seriesText:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:i[14],linkTextFill:i[6],opacity:1,textBaseline:"middle",textAlign:"center"},measureText:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:i[14],linkTextFill:i[6],opacity:1,textAlign:o?"center":"left",textBaseline:"middle"},bolderText:{fontFamily:Uo,fontSize:Is,fontWeight:s,fill:i[14],linkTextFill:i[6],opacity:1,textAlign:o?"center":"left",textBaseline:"middle"},text:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:i[14],linkTextFill:i[6],opacity:1,textBaseline:"middle",textAlign:o?"center":"left"},cell:{backgroundColor:i[1],backgroundColorOpacity:1,horizontalBorderColor:i[9],horizontalBorderColorOpacity:1,verticalBorderColor:i[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,borderDash:[],padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:i[2],backgroundOpacity:.6},selected:{backgroundColor:i[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:i[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(A=null==r?void 0:r.results)&&void 0!==A?A:i[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(n=null==r?void 0:r.highlight)&&void 0!==n?n:i[6],backgroundOpacity:1}}},icon:{fill:i[14],size:10,margin:{right:4,left:4}},seriesNumberWidth:80}},Hs=e=>{var t,A;const{basicColors:n,others:i}=e,r=ut()?"bold":700;return{measureText:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:n[0],opacity:1,textAlign:"right",textBaseline:"middle",linkTextFill:n[6]},bolderText:{fontFamily:Uo,fontSize:Is,fontWeight:r,fill:n[0],opacity:1,textAlign:"center",textBaseline:"middle",linkTextFill:n[6]},text:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:n[0],opacity:1,textAlign:"center",textBaseline:"middle",linkTextFill:n[6]},cell:{backgroundColor:n[3],backgroundColorOpacity:1,horizontalBorderColor:n[10],horizontalBorderColorOpacity:1,verticalBorderColor:n[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,borderDash:[],padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:n[4],backgroundOpacity:.6},selected:{backgroundColor:n[4],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:n[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(t=null==i?void 0:i.results)&&void 0!==t?t:n[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(A=null==i?void 0:i.highlight)&&void 0!==A?A:n[6],backgroundOpacity:1}}},icon:{fill:n[0],size:10,margin:{top:6,right:4,bottom:6,left:4}}}},Ms=e=>{var t,A;const{basicColors:n,others:i,semanticColors:r}=e,o=ut()?"bold":700;return{bolderText:{fontFamily:Uo,fontSize:Is,fontWeight:o,fill:n[13],opacity:1,textAlign:"right",textBaseline:"middle",linkTextFill:n[6]},text:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:n[13],opacity:1,textAlign:"right",textBaseline:"middle",linkTextFill:n[6]},cell:{crossBackgroundColor:n[1],backgroundColor:n[8],backgroundColorOpacity:1,horizontalBorderColor:n[9],horizontalBorderColorOpacity:1,verticalBorderColor:n[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:n[2],backgroundOpacity:.6},hoverFocus:{backgroundColor:n[2],backgroundOpacity:.6,borderColor:n[14],borderWidth:1,borderOpacity:1},selected:{backgroundColor:n[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},searchResult:{backgroundColor:null!==(t=null==i?void 0:i.results)&&void 0!==t?t:n[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(A=null==i?void 0:i.highlight)&&void 0!==A?A:n[6],backgroundOpacity:1},prepareSelect:{borderColor:n[14],borderOpacity:1,borderWidth:1}}},miniChart:{line:{point:{size:2.2,fill:n[6],opacity:1},linkLine:{size:1.5,fill:n[6],opacity:.6}},bar:{intervalPadding:4,fill:n[6],opacity:1},bullet:{progressBar:{widthPercent:.6,height:10,innerHeight:6},comparativeMeasure:{width:1,height:12,fill:n[13],opacity:.25},rangeColors:{good:null==r?void 0:r.green,satisfactory:r.yellow,bad:r.red},backgroundColor:"#E9E9E9"},interval:{height:12,fill:n[7]}},icon:{fill:n[13],size:10,margin:{right:4,left:4}}}};class _s{constructor(e){this.viewport=ot()?void 0:window,this.init=()=>{ot()||(this.initDevicePixelRatioListener(),this.initDeviceZoomListener())},this.destroy=()=>{ot()||(this.removeDevicePixelRatioListener(),this.removeDeviceZoomListener())},this.removeDevicePixelRatioListener=()=>{var e;(null===(e=this.devicePixelRatioMedia)||void 0===e?void 0:e.removeEventListener)?this.devicePixelRatioMedia.removeEventListener("change",this.renderByDevicePixelRatioChanged):this.devicePixelRatioMedia.removeListener(this.renderByDevicePixelRatioChanged)},this.initDeviceZoomListener=()=>{var e,t;lt()||null===(t=null===(e=this.viewport)||void 0===e?void 0:e.visualViewport)||void 0===t||t.addEventListener("resize",this.renderByZoomScaleWithoutResizeEffect)},this.removeDeviceZoomListener=()=>{var e,t;lt()||null===(t=null===(e=this.viewport)||void 0===e?void 0:e.visualViewport)||void 0===t||t.removeEventListener("resize",this.renderByZoomScaleWithoutResizeEffect)},this.renderByZoomScaleWithoutResizeEffect=e=>(0,Q.sH)(this,void 0,void 0,function*(){this.isDevicePixelRatioChange=!1,yield this.renderByZoomScale(e)}),this.renderByDevicePixelRatioChanged=()=>(0,Q.sH)(this,void 0,void 0,function*(){this.isDevicePixelRatioChange=!0,yield this.renderByDevicePixelRatio()}),this.renderByDevicePixelRatio=(...e)=>(0,Q.sH)(this,[...e],void 0,function*(e=window.devicePixelRatio){var t;if(this.spreadsheet.destroyed)return;const{container:A,options:{width:n,height:i}}=this.spreadsheet,r=this.spreadsheet.getCanvasElement(),o=Math.ceil(e);(null!==(t=A.getConfig().devicePixelRatio)&&void 0!==t?t:1)!==o&&r&&(A.getConfig().devicePixelRatio=o,A.resize(n,i),yield this.spreadsheet.render(!1))}),this.renderByZoomScale=(0,l.debounce)(e=>(0,Q.sH)(this,void 0,void 0,function*(){if(this.spreadsheet.destroyed)return;const t=e.target,A=Math.ceil(null==t?void 0:t.scale);if(A>=1&&(this.zoomOffsetLeft||0)!==((null==t?void 0:t.offsetLeft)||0)&&!this.isDevicePixelRatioChange){const e=Math.max(A,window.devicePixelRatio);yield this.renderByDevicePixelRatio(e),this.zoomOffsetLeft=t.offsetLeft}}),350),this.spreadsheet=e,this.isDevicePixelRatioChange=!1,this.zoomOffsetLeft=0}initDevicePixelRatioListener(){var e;this.devicePixelRatioMedia=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),(null===(e=this.devicePixelRatioMedia)||void 0===e?void 0:e.addEventListener)?this.devicePixelRatioMedia.addEventListener("change",this.renderByDevicePixelRatioChanged):this.devicePixelRatioMedia.addListener(this.renderByDevicePixelRatioChanged)}}var ks;!function(e){e.UN_STICKY="UN_STICKY",e.STICKY="STICKY",e.STICKY_EDGE="STICKY_EDGE"}(ks||(ks={}));class Rs{constructor(e){this.stickyS2=null,this.wrapperElement=null,this.stickyContainer=null,this.stickyState=ks.UN_STICKY,this.disposers=[],this.scrollContainer=window,this.isSyncing=!1,this.syncStyle=()=>{if(!this.wrapperElement)return;const e=this.getTableBox();if(!e)return;const{headerHeight:t,tableBottom:A,tableHeight:n,tableLeft:i,tableWidth:r,tableTop:o}=e,s=this.getOffsetTop(),a=this.isWindowScroll()?s:this.scrollContainer.getBoundingClientRect().top+s,{style:l}=this.wrapperElement;return a<o||a>o+n?(this.stickyState=ks.UN_STICKY,void(l.display="none")):(l.display="",l.height=`${t}px`,o<a&&a<A-t?(this.stickyState=ks.STICKY,void(this.isWindowScroll()?(l.position="fixed",l.top=`${a}px`,l.left=`${i}px`,l.width=`${r}px`,l.right=""):(l.position="absolute",l.top=a-o+"px",l.left="0",l.right="0",l.width=""))):void(A-t<=a&&a<=A&&(this.stickyState=ks.STICKY_EDGE,l.position="absolute",l.top=n-t+"px",l.left="0",l.right="0",l.width="")))},this.spreadsheet=e,this.options=this.resolveOptions(),this.scrollContainer=this.resolveScrollContainer(),this.init()}getStickyState(){return this.stickyState}resolveOptions(){var e;const t=null===(e=this.spreadsheet.options.interaction)||void 0===e?void 0:e.stickyHeader;return!t||(0,l.isBoolean)(t)?{}:t}init(){this.createDOM(),this.createStickyS2(),this.bindScrollListener(),this.bindSyncListeners(),this.bindInteractionBridge(),this.renderStickyS2()}createDOM(){const e=this.spreadsheet.getCanvasElement();if(!e)return;const t=e.parentElement;"static"===window.getComputedStyle(t).position&&(t.style.position="relative"),this.wrapperElement=document.createElement("div"),this.wrapperElement.className="s2-sticky-header-wrapper",Object.assign(this.wrapperElement.style,{position:"absolute",top:"0",left:"0",right:"0",zIndex:"10",overflow:"hidden",display:"none"}),this.stickyContainer=document.createElement("div"),this.wrapperElement.appendChild(this.stickyContainer),t.insertBefore(this.wrapperElement,e)}minimizeDataCfg(e){var t;const A=null===(t=null==e?void 0:e.fields)||void 0===t?void 0:t.columns;if(!A)return e;const n={};return e.data.forEach(e=>{const t=A.map(t=>{const A=(0,l.isString)(t)?t:t.field;return String(e[A])}).join("\0");n[t]||(n[t]=e)}),Object.assign(Object.assign({},e),{data:Object.values(n)})}applyStickyOptions(e){var t;return Co(e,this.options.enableInteraction?{style:{dataCell:{height:0}},interaction:{resize:null===(t=e.interaction)||void 0===t?void 0:t.resize,stickyHeader:!1,brushSelection:!1,multiSelection:!1,rangeSelection:!1,selectedCellMove:!1},tooltip:{enable:!0,operation:{hiddenColumns:!1}}}:{style:{dataCell:{height:0}},interaction:{resize:!1,stickyHeader:!1},tooltip:{enable:!1},headerActionIcons:[],showDefaultHeaderActionIcon:!1})}toStickyConfig(){const{dataCfg:e,options:t}=this.spreadsheet;return{dataCfg:this.minimizeDataCfg(e),options:this.applyStickyOptions(t)}}createStickyS2(){if(!this.stickyContainer)return;const{dataCfg:e,options:t}=this.toStickyConfig();this.stickyS2=new(0,this.spreadsheet.constructor)(this.stickyContainer,e,t),this.syncTheme()}syncTheme(){this.stickyS2&&(this.stickyS2.setThemeCfg({name:this.spreadsheet.themeName}),this.stickyS2.theme=this.spreadsheet.theme)}renderStickyS2(){return(0,Q.sH)(this,void 0,void 0,function*(){var e,t,A;if(!this.stickyS2)return;const{facet:n}=this.spreadsheet;if(!n)return;const i=this.spreadsheet.getCanvasConfig(),r=null!==(t=null===(e=n.cornerBBox)||void 0===e?void 0:e.height)&&void 0!==t?t:0,o=null!==(A=i.width)&&void 0!==A?A:0;this.stickyS2.changeSheetSize(o,r),yield this.stickyS2.render()})}getOffsetTop(){const{offsetTop:e}=this.options;return(0,l.isFunction)(e)?e():(0,l.isNumber)(e)?e:0}getScrollParent(e){if(!e)return window;let t=e.parentElement;for(;t&&t!==document.body&&t!==document.documentElement;){const e=window.getComputedStyle(t),A=e.getPropertyValue("overflow")+e.getPropertyValue("overflow-y")+e.getPropertyValue("overflow-x");if(/(?:auto|scroll|overlay)/.test(A)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return window}resolveScrollContainer(){if(this.options.scrollContainer)return this.options.scrollContainer;const e=this.spreadsheet.getCanvasElement();return this.getScrollParent(e)}isWindowScroll(){return this.scrollContainer===window}getTableBox(){var e,t;const A=this.spreadsheet.getCanvasElement();if(!A)return null;const n=A.getBoundingClientRect(),{facet:i}=this.spreadsheet;if(!i)return null;const r=n.top,o=n.left,s=n.width,a=null!==(t=null===(e=i.cornerBBox)||void 0===e?void 0:e.height)&&void 0!==t?t:0,l=n.height,u=i.getContentHeight(),c=Math.min(u,l);return{tableTop:r,tableLeft:o,tableWidth:s,tableHeight:c,tableBottom:r+c,headerHeight:a}}bindScrollListener(){const e=(0,l.throttle)(this.syncStyle,16);this.scrollContainer.addEventListener("scroll",e,{passive:!0}),this.disposers.push(()=>{this.scrollContainer.removeEventListener("scroll",e)})}bindSyncListeners(){const{spreadsheet:e}=this,t=e=>{var t;(null===(t=this.stickyS2)||void 0===t?void 0:t.facet)&&this.stickyS2.facet.updateScrollOffset({offsetX:{value:e.scrollX,animate:!1},offsetY:{value:e.scrollY,animate:!1},rowHeaderOffsetX:{value:e.rowHeaderScrollX,animate:!1}})};e.on(iA.GLOBAL_SCROLL,t),this.disposers.push(()=>{e.off(iA.GLOBAL_SCROLL,t)});const A=()=>{if(this.stickyS2&&!this.isSyncing){this.isSyncing=!0;try{const{dataCfg:t,options:A}=this.toStickyConfig();this.stickyS2.setDataCfg(t),this.stickyS2.setOptions(A),this.syncTheme();const n=e.getCanvasConfig();this.stickyS2.changeSheetSize(n.width,e.facet.cornerBBox.height),this.stickyS2.render(!1),this.syncStyle()}finally{this.isSyncing=!1}}},n=[iA.LAYOUT_AFTER_RENDER,iA.LAYOUT_RESIZE];n.forEach(t=>{e.on(t,A)}),this.disposers.push(()=>{n.forEach(t=>{e.off(t,A)})})}bindInteractionBridge(){if(!this.options.enableInteraction||!this.stickyS2)return;const{stickyS2:e,spreadsheet:t}=this;e.on(iA.LAYOUT_RESIZE,e=>(0,Q.sH)(this,void 0,void 0,function*(){e.style&&(t.setOptions({style:e.style}),yield t.render(!1)),t.emit(iA.LAYOUT_RESIZE,e)})),e.on(iA.RANGE_SORT,e=>(0,Q.sH)(this,void 0,void 0,function*(){t.setDataCfg(Object.assign(Object.assign({},t.dataCfg),{sortParams:e})),yield t.render(),t.emit(iA.RANGE_SORT,e)})),e.on(iA.ROW_CELL_COLLAPSED,e=>{t.emit(iA.ROW_CELL_COLLAPSED__PRIVATE,e),this.scrollToTableTop()}),e.on(iA.ROW_CELL_ALL_COLLAPSED,e=>(0,Q.sH)(this,void 0,void 0,function*(){t.setOptions({style:{rowCell:{collapseAll:e,collapseFields:null,expandDepth:null}}}),yield t.render(!1),t.emit(iA.ROW_CELL_ALL_COLLAPSED,e),this.scrollToTableTop()}))}scrollToTableTop(){var e;const t=this.spreadsheet.getCanvasElement();null===(e=null==t?void 0:t.scrollIntoView)||void 0===e||e.call(t,{behavior:"smooth",block:"start"})}destroy(){this.disposers.forEach(e=>e()),this.disposers=[],this.stickyS2&&(this.stickyS2.destroy(),this.stickyS2=null),this.wrapperElement&&(this.wrapperElement.remove(),this.wrapperElement=null),this.stickyContainer=null,this.stickyState=ks.UN_STICKY}}var Ns=A("./node_modules/.pnpm/style-loader@3.3.4_webpack@5.108.4/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),Ds=A.n(Ns),Ps=A("./node_modules/.pnpm/style-loader@3.3.4_webpack@5.108.4/node_modules/style-loader/dist/runtime/styleDomAPI.js"),Gs=A.n(Ps),Ks=A("./node_modules/.pnpm/style-loader@3.3.4_webpack@5.108.4/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),Vs=A.n(Ks),zs=A("./node_modules/.pnpm/style-loader@3.3.4_webpack@5.108.4/node_modules/style-loader/dist/runtime/insertStyleElement.js"),Ws=A.n(zs),js=A("./node_modules/.pnpm/style-loader@3.3.4_webpack@5.108.4/node_modules/style-loader/dist/runtime/styleTagTransform.js"),Xs=A.n(js),Ys=A("./node_modules/.pnpm/css-loader@6.11.0_webpack@5.108.4/node_modules/css-loader/dist/cjs.js!./node_modules/.pnpm/@antv+s2@2.7.2_@antv+g2@5.4.8/node_modules/@antv/s2/esm/ui/tooltip/index.css"),qs={};qs.styleTagTransform=Xs(),qs.setAttributes=Vs(),qs.insert=function(e){const t=document.querySelector("head"),A=window._lastElementInsertedByStyleLoader;A?A.nextSibling?t.insertBefore(e,A.nextSibling):t.appendChild(e):t.insertBefore(e,t.firstChild),window._lastElementInsertedByStyleLoader=e},qs.domAPI=Gs(),qs.insertStyleElement=Ws(),Ds()(Ys.A,qs);class Zs{constructor(e){this.visible=!1,this.position={x:0,y:0},this.spreadsheet=e}show(e){var t,A,n;const{position:i,content:r,event:o}=e,{autoAdjustBoundary:s,adjustPosition:a}=this.spreadsheet.options.tooltip||{};this.visible=!0,this.options=e;const l=this.getContainer();this.renderContent(r);const{x:u,y:c}=(({spreadsheet:e,position:t,tooltipContainer:A,autoAdjustBoundary:n})=>{const i=e.getCanvasElement();let r=t.x+15,o=t.y+10;if(!n||!i)return{x:r,y:o};const s="body"===n,{maxX:a,maxY:l}=e.facet.panelBBox,{width:u,height:c}=e.options,{top:h,left:d}=i.getBoundingClientRect(),{width:f,height:g}=A.getBoundingClientRect(),{width:p,height:v}=document.body.getBoundingClientRect(),m=s?p:Math.min(u,a)+d,C=s?v:Math.min(c,l)+h;return r+f>=m&&(r=m-f),o+g>=C&&(o=C-g),{x:r,y:o}})({spreadsheet:this.spreadsheet,position:i,tooltipContainer:l,autoAdjustBoundary:s});this.position=null!==(t=null==a?void 0:a({position:{x:u,y:c},event:o}))&&void 0!==t?t:{x:u,y:c},Mo(l,{style:{left:`${null===(A=this.position)||void 0===A?void 0:A.x}px`,top:`${null===(n=this.position)||void 0===n?void 0:n.y}px`,pointerEvents:"all"},visible:!0,dark:"dark"===this.spreadsheet.getThemeName()})}hide(){this.visible=!1,this.container&&(Mo(this.container,{style:{pointerEvents:"none"},visible:!1}),this.resetPosition())}destroy(){var e,t;this.visible=!1,this.container&&(this.resetPosition(),null===(t=(e=this.container).remove)||void 0===t||t.call(e),this.container=null)}renderContent(e){var t,A,n,i;if(!this.container)return;this.clearContent();const{content:r}=this.spreadsheet.options.tooltip||{},o=null!=e?e:r;return(0,l.isNil)(o)?void 0:"string"==typeof o?(this.container.innerHTML=o,void(null===(A=(t=this.options).onMounted)||void 0===A||A.call(t))):void(o instanceof Element&&(this.container.appendChild(o),null===(i=(n=this.options).onMounted)||void 0===i||i.call(n)))}clearContent(){this.container&&(this.container.innerHTML="")}disablePointerEvent(){this.container&&"none"!==this.container.style.pointerEvents&&Mo(this.container,{style:{pointerEvents:"none"}})}resetPosition(){this.position={x:0,y:0}}getContainer(){var e;if(!this.container){const{tooltip:t}=this.spreadsheet.options,A=(null===(e=null==t?void 0:t.getContainer)||void 0===e?void 0:e.call(t))||document.body,n=document.createElement("div");return Mo(n,{style:null==t?void 0:t.style,className:[fo].concat(null==t?void 0:t.className)}),A.appendChild(n),this.container=n,this.container}return this.container}}const Js=`${ho}-offscreen-canvas`;class $s extends Or.A{constructor(e,t,A){super(),this.store=new vo,this.stickyHeaderController=null,this.destroyed=!1,this.measureText=(0,l.memoize)((e,t)=>{if(!t)return null;const A=(()=>{if(!st())return null;let e=document.getElementById(Js);return e||(e=document.createElement("canvas"),e.id=Js,e.style.display="none",document.body.appendChild(e),e)})()||this.getCanvasElement(),n=null==A?void 0:A.getContext("2d"),{fontSize:i,fontFamily:r,fontWeight:o,fontStyle:s,fontVariant:a}=t;return n.font=[s,a,o,`${i}px`,r].join(" ").trim(),n.measureText(String(e))},(e,t)=>[e,...(0,l.values)(t)].join("")),this.measureTextWidth=(e,t)=>{const A=this.measureText(e,t);return(null==A?void 0:A.width)||0},this.measureTextHeight=(e,t)=>{const A=this.measureText(e,t);return A?A.actualBoundingBoxAscent+A.actualBoundingBoxDescent:0},this.measureTextWidthRoughly=(e,t)=>{const A=this.measureTextWidth("a",t),n=this.measureTextWidth("蚂",t);let i=0;if(!e)return i;for(const t of String(e)){const e=t.charCodeAt(0);i+=e>=0&&e<=255?A:n}return i},this.setupDataConfig(t),this.setupOptions(A),this.dataSet=this.getDataSet(),this.setDebug(),this.initTooltip(),this.initContainer(e),this.bindEvents(),this.initInteraction(),this.initTheme(),this.initHdAdapter(),this.registerIcons(),this.setOverscrollBehavior(),this.mountSheetInstance(),this.initStickyHeader()}setupDataConfig(e){this.dataCfg=wo(e)}setupOptions(e){this.options=((...e)=>Co(Di,...e))(e)}isCustomHeaderFields(e){const{fields:t}=this.dataCfg;return(0,l.some)(e?null==t?void 0:t[e]:[...null==t?void 0:t.rows,...null==t?void 0:t.columns],e=>!(0,l.isString)(e))}isCustomColumnFields(){return this.isCustomHeaderFields("columns")}setOverscrollBehavior(){if(ot()||!st())return;const{overscrollBehavior:e}=this.options.interaction,t=window.getComputedStyle(document.body).getPropertyValue("overscroll-behavior");t&&"auto"!==t?this.store.set("initOverscrollBehavior",t):e&&(document.body.style.overscrollBehavior=e)}restoreOverscrollBehavior(){st()&&(document.body.style.overscrollBehavior=this.store.get("initOverscrollBehavior")||"")}setDebug(){P.getInstance().setDebug(this.options.debug)}initTheme(){this.setThemeCfg({name:"default"})}getMountContainer(e){const t=(0,l.isString)(e)?document.querySelector(e):e;if(!t)throw new Error("Target mount container is not a DOM element");return t}initHdAdapter(){this.options.hd&&(this.hdAdapter=new _s(this),this.hdAdapter.init())}initStickyHeader(){var e;if(!(null===(e=this.options.interaction)||void 0===e?void 0:e.stickyHeader))return;const t=()=>{var e;this.off(iA.LAYOUT_AFTER_RENDER,t),null===(e=this.stickyHeaderController)||void 0===e||e.destroy(),this.stickyHeaderController=new Rs(this)};this.on(iA.LAYOUT_AFTER_RENDER,t)}initInteraction(){var e,t;null===(t=null===(e=this.interaction)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),this.interaction=new Qs(this)}initTooltip(){var e,t,A,n;null===(t=null===(e=this.tooltip)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),this.tooltip=this.renderTooltip(),this.tooltip instanceof Zs||console.warn(`[Custom Tooltip]: ${null===(n=null===(A=this.tooltip)||void 0===A?void 0:A.constructor)||void 0===n?void 0:n.toString()} should be extends from BaseTooltip`)}renderTooltip(){var e,t;return(null===(t=null===(e=this.options.tooltip)||void 0===e?void 0:e.render)||void 0===t?void 0:t.call(e,this))||new Zs(this)}getTargetCell(e){return this.getCell(e)||(0,l.last)(this.interaction.getInteractedCells())}showTooltip(e){const{content:t,event:A}=e,n=this.getTargetCell(null==A?void 0:A.target),i=(0,l.isFunction)(t)?t(n,e):t;return new Promise(t=>{var A,n;const r=Object.assign(Object.assign({},e),{content:i,onMounted:t});null===(n=null===(A=this.tooltip)||void 0===A?void 0:A.show)||void 0===n||n.call(A,r)})}showTooltipWithInfo(e,t,A){var n;const{enable:i,content:r}=Po(this,e);if(!i)return;const o=this.getTargetCell(null==e?void 0:e.target),s=null!==(n=null==A?void 0:A.data)&&void 0!==n?n:(e=>{var t;const{spreadsheet:A,cellInfos:n=[],options:i={},targetCell:r}=e;let o=null,s=[],a=null,u=null;const c=A.dataSet.getCustomFieldDescription(r),h=n[0]||{};if(null==i?void 0:i.hideSummary)if(i.onlyShowCellText){const e=Mt.getFieldValue(h,"value"),n=Mt.getFieldValue(h,"valueField"),r=null===(t=null==A?void 0:A.dataSet)||void 0===t?void 0:t.getFieldFormatter(n),s=null==r?void 0:r(e),a=i.enableFormat?A.dataSet.getFieldName(e)||s:A.dataSet.getFieldName(n);o=(0,l.isString)(a)?a:""}else a=((e,t,A)=>{var n,i,r,o;const{isTotals:s}=A||{};let a=[],u=[];if(t){const A=null===(i=null===(n=null==e?void 0:e.dataSet)||void 0===n?void 0:n.fields)||void 0===i?void 0:i.columns,s=null===(o=null===(r=null==e?void 0:e.dataSet)||void 0===r?void 0:r.fields)||void 0===o?void 0:o.rows;a=ko(e,Jt(A||[]),t),u=ko(e,s,t)}return(0,l.isEmpty)(a)&&(0,l.isEmpty)(u)&&s&&(a=[{value:ht("总计")}]),{cols:a,rows:u}})(A,h,i),u=((e,t,A,n)=>{if(!t)return[];const{isTotals:i}=A,r=t[Be],o=[];return o.push(_o(e,i?{data:t,field:r,targetCell:n,valueField:t[ye]}:{data:t,field:r,targetCell:n})),o})(A,h,i,r);else s=No({spreadsheet:A,options:i,targetCell:r});const{interpretation:d,infos:f,tips:g}=h||{};return{name:o,summaries:s,interpretation:d,infos:f,tips:g,headInfo:a,details:u,description:c}})({spreadsheet:this,cellInfos:t,targetCell:o,options:Object.assign({enableFormat:!0},A)});return this.showTooltip({data:s,position:{x:e.clientX,y:e.clientY},options:A,event:e,content:r})}hideTooltip(){var e,t;null===(t=null===(e=this.tooltip)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)}destroyTooltip(){var e,t;null===(t=null===(e=this.tooltip)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e)}registerIcons(){const e=this.options.customSVGIcons;(0,l.isEmpty)(e)||(0,l.forEach)(e,e=>{ce(e.name,e.src)})}setDataCfg(e,t){this.store.set("originalDataCfg",e),this.dataCfg=t?wo(e):wo(this.dataCfg,e),this.store.set(y,B)}setOptions(e,t){var A;this.hideTooltip(),t?this.setupOptions(e):this.options=Co(this.options,e),(t||(null===(A=null==e?void 0:e.tooltip)||void 0===A?void 0:A.render))&&this.initTooltip(),this.resetHiddenColumnsDetailInfoIfNeeded(),this.registerIcons(),this.syncStickyHeader()}syncStickyHeader(){var e;const t=!!(null===(e=this.options.interaction)||void 0===e?void 0:e.stickyHeader);this.stickyHeaderController&&(this.stickyHeaderController.destroy(),this.stickyHeaderController=null),t&&this.initStickyHeader()}resetDataCfg(){this.setDataCfg(null,!0)}resetOptions(){this.setOptions(null,!0)}resetHiddenColumnsDetailInfoIfNeeded(){var e;(0,l.isEmpty)(null===(e=this.options.interaction)||void 0===e?void 0:e.hiddenColumnFields)||this.store.set("hiddenColumnsDetail",[])}doRender(e){return(0,Q.sH)(this,void 0,void 0,function*(){const t=this.getCanvasElement();if(!t||!t.isConnected)return;const{reloadData:A=!0,rebuildDataSet:n=!1,rebuildHiddenColumnsDetail:i=!0}=e||{};this.emit(iA.LAYOUT_BEFORE_RENDER),n&&(this.dataSet=this.getDataSet()),A&&(this.clearDrillDownData("",!0),this.dataSet.setDataCfg(this.dataCfg)),this.buildFacet(),i&&(yield this.initHiddenColumnsDetail()),this.emit(iA.LAYOUT_AFTER_RENDER)})}render(e){return(0,Q.sH)(this,void 0,void 0,function*(){if(this.destroyed)return;const t="boolean"==typeof e?{reloadData:e}:e;yield this.container.ready,yield this.doRender(t)})}mountSheetInstance(){const e=this.getCanvasElement();e&&(e.__s2_instance__=this)}unmountSheetInstance(){const e=this.getCanvasElement();e&&delete e.__s2_instance__}destroy(){var e,t,A,n,i,r;this.destroyed||(this.destroyed=!0,this.restoreOverscrollBehavior(),this.emit(iA.LAYOUT_DESTROY),null===(e=this.stickyHeaderController)||void 0===e||e.destroy(),this.stickyHeaderController=null,null===(t=this.facet)||void 0===t||t.destroy(),null===(A=this.hdAdapter)||void 0===A||A.destroy(),null===(n=this.interaction)||void 0===n||n.destroy(),null===(i=this.store)||void 0===i||i.clear(),this.destroyTooltip(),this.clearCanvasEvent(),this.unmountSheetInstance(),null===(r=this.container)||void 0===r||r.destroy(),(()=>{var e;st()&&(null===(e=document.getElementById(Js))||void 0===e||e.remove())})())}setThemeName(e){this.themeName=e}setThemeCfg(e={},t){const A=(null==e?void 0:e.theme)||{},n=(e=>{var t;const A=(null==e?void 0:e.palette)||Io[null==e?void 0:e.name]||Io.default,{basicColors:n}=A,i=null==e?void 0:e.spreadsheet,r=null===(t=null==e?void 0:e.getCustomTheme)||void 0===t?void 0:t.call(e,A,i);return(0,l.merge)({cornerCell:Us(A,i),rowCell:Os(A,i),colCell:Hs(A),dataCell:Ms(A),mergedCell:Ms(A),resizeArea:{size:3,background:n[7],backgroundOpacity:0,guideLineColor:n[7],guideLineDisableColor:"rgba(0,0,0,0.25)",guideLineDash:[3,3],interactionState:{hover:{backgroundColor:n[7],backgroundOpacity:1}}},scrollBar:{trackColor:"rgba(0,0,0,0.01)",thumbHoverColor:"rgba(0,0,0,0.25)",thumbColor:"rgba(0,0,0,0.15)",thumbHorizontalMinSize:32,thumbVerticalMinSize:32,size:lt()?3:6,hoverSize:lt()?4:8,lineCap:"round"},splitLine:{horizontalBorderColor:n[12],horizontalBorderColorOpacity:.2,horizontalBorderWidth:2,verticalBorderColor:n[11],verticalBorderColorOpacity:.25,verticalBorderWidth:2,showShadow:!0,shadowWidth:8,shadowColors:{left:"rgba(0,0,0,0.1)",right:"rgba(0,0,0,0)"},borderDash:[]},prepareSelectMask:{backgroundColor:n[5],backgroundOpacity:.3},background:{color:n[8],opacity:1},empty:{icon:{fill:"",width:64,height:41,margin:{top:0,right:0,bottom:24,left:0}},description:{fontFamily:Uo,fontSize:Is,fontWeight:"normal",fill:n[14],opacity:1}}},r)})(Object.assign(Object.assign({},e),{spreadsheet:this,getCustomTheme:t}));this.theme=Co(n,A),this.setThemeName(null==e?void 0:e.name)}setTheme(e){this.theme=Co(this.theme,e)}getTheme(){return this.theme}getThemeName(){return this.themeName}updatePagination(e){this.options=Co(this.options,{pagination:e}),this.facet.resetScrollOffset()}changeSheetSize(e=this.options.width,t=this.options.height){const A=this.getCanvasElement(),{width:n,height:i}=this.container.getConfig();(e!==n||t!==i)&&A&&(this.options=Co(this.options,{width:e,height:t}),this.container.resize(e,t))}on(e,t){return super.on(e,t)}emit(e,...t){super.emit(e,...t)}getCanvas(){return this.container}getCanvasConfig(){return this.getCanvas().getConfig()}getCanvasElement(){return this.getCanvas().getContextService().getDomElement()}getLayoutWidthType(){var e;return null===(e=this.options.style)||void 0===e?void 0:e.layoutWidthType}isCellType(e){return e instanceof Ht}getCell(e){let t=e;for(;t&&!(t instanceof a.Hl);){if(this.isCellType(t))return t;t=null==t?void 0:t.parentNode}return null}getCellType(e){const t=this.getCell(e);return null==t?void 0:t.cellType}getTotalsConfig(e){const{totals:t}=this.options,{rows:A}=this.dataSet.fields,n=(0,l.get)(t,(0,l.includes)(A,e)?"row":"col",{}),i=!(!n.showSubTotals||!(0,l.includes)(n.subTotalsDimensions,e))&&n.showSubTotals;return Object.assign(Object.assign({grandTotalsLabel:ht("总计"),subTotalsLabel:ht("小计"),grandTotalsGroupDimensions:[],subTotalsGroupDimensions:[]},n),{showSubTotals:i})}initContainer(e){const{width:t,height:A,device:n,transformCanvasConfig:i,rendererConfig:r}=this.options,o=new co.A4(r),s=null==i?void 0:i(o,this),l=!lt(n);this.container=new a.Hl(Object.assign({container:this.getMountContainer(e),width:t,height:A,renderer:o,supportsPointerEvents:l,future:{experimentalRICSyncRTree:!0,experimentalCancelEventPropagation:!0}},s)),this.setupContainerStyle()}setupContainerStyle(){const e=this.getCanvasElement();e&&(e.style.display="block",e.style.userSelect="none")}initHiddenColumnsDetail(){return(0,Q.sH)(this,void 0,void 0,function*(){const{hiddenColumnFields:e}=this.options.interaction,t=this.store.get("hiddenColumnsDetail");(0,l.isEmpty)(e)&&(0,l.isEmpty)(t)||(yield Qi(this,e,!0))})}clearCanvasEvent(){const e=this.getEvents();(0,l.forIn)(e,(e,t)=>{this.off(t)})}updateSortMethodMap(e,t,A=!1){const n=A?null:this.store.get("sortMethodMap");this.store.set("sortMethodMap",Object.assign(Object.assign({},n),{[e]:t}))}getMenuDefaultSelectedKeys(e){const t=this.store.get("sortMethodMap"),A=(0,l.get)(t,e);return A?[A]:[]}handleGroupSort(e,t){e.stopPropagation(),this.interaction.addIntercepts([p.HOVER]);const A=this.getMenuDefaultSelectedKeys(null==t?void 0:t.id),n=this.isTableMode()?[{key:"asc",icon:"groupAsc",label:ht("升序")},{key:"desc",icon:"groupDesc",label:ht("降序")},{key:"none",label:ht("不排序")}]:[{key:"asc",icon:"groupAsc",label:ht("组内升序")},{key:"desc",icon:"groupDesc",label:ht("组内降序")},{key:"none",label:ht("不排序")}];this.showTooltipWithInfo(e,[],{operator:{menu:{selectedKeys:A,items:n,onClick:A=>(0,Q.sH)(this,[A],void 0,function*({key:A}){yield this.groupSortByMethod(A,t),this.emit(iA.RANGE_SORTED,e)})}},onlyShowOperator:!0})}getSeriesNumberText(){var e;const{text:t,enable:A}=null!==(e=this.options.seriesNumber)&&void 0!==e?e:{};return A?null!=t?t:ht("序号"):""}enableAsyncExport(){return!0}}class ea extends $s{isCustomRowFields(){return!1}getDataSet(){const{dataSet:e}=this.options;return e?e(this):new wi(this)}isPivotMode(){return!1}isTableMode(){return!0}isHierarchyTreeType(){return!1}isHierarchyGridTreeType(){return!1}isFrozenRowHeader(){return!1}clearDrillDownData(){return(0,Q.sH)(this,void 0,void 0,function*(){})}isValueInCols(){return!1}bindEvents(){}buildFacet(){var e,t,A,n,i,r;null!==(e=(r=this.options).dataCell)&&void 0!==e||(r.dataCell=e=>{var t;return(null===(t=this.options.seriesNumber)||void 0===t?void 0:t.enable)&&0===e.colIndex?new nA(e,this):new AA(e,this)}),null===(t=this.facet)||void 0===t||t.destroy(),this.facet=null!==(i=null===(n=(A=this.options).facet)||void 0===n?void 0:n.call(A,this))&&void 0!==i?i:new uo(this),this.facet.render()}destroy(){super.destroy(),this.off(iA.RANGE_SORT),this.off(iA.RANGE_FILTER)}groupSortByMethod(e,t){const{field:A}=t,n={sortFieldId:A,sortMethod:e};this.updateSortMethodMap(t.id,e),this.emit(iA.RANGE_SORT,[n])}}class ta extends Ci{constructor(){super(...arguments),this.handleDimensionValuesSort=()=>{(0,l.each)(this.sortParams,e=>{const{sortFieldId:t,sortByMeasure:A}=e;if(!t)return;const n=(e=>{const{dataSet:t,sortParam:A,originValues:n,isSortByMeasure:i}=e;let r;return r=i?(e=>{const{dataSet:t,sortParam:A,originValues:n}=e,{fields:i}=t,{sortByMeasure:r,query:o,sortFieldId:s}=A;if(r!==be)return t.getCellMultiData({query:o,queryType:Yn.DetailOnly});const a=t.getCellMultiData({query:o,queryType:Yn.All}),u=Jt(i.columns),c=(0,l.includes)(i.rows,s),h=Zn(c?i.rows:u),d=Zn(c?u:i.rows),f=h[h.indexOf(s)+1],g=(0,l.keys)(o),p=d.filter(e=>!g.includes(e)),v=a.filter(e=>{const t=new Set((0,l.keys)(e[Ee]));return!!t.has(s)&&!t.has(f)&&p.every(e=>!t.has(e))});return(0,l.isEmpty)(v)?(0,l.compact)((0,l.map)(n,e=>{const A=((e,t,A)=>{var n;const i={};if((0,l.includes)(e,"[&]")){const r=(0,l.split)(e,"[&]"),o=(null===(n=null==t?void 0:t.rows)||void 0===n?void 0:n.includes(A))?t.rows:Jt(t.columns);for(let e=0;e<=(0,l.indexOf)(o,A);e++)i[o[e]]=r[e]}else i[A]=e;return i})(e,i,s);return t.getTotalValue(Object.assign(Object.assign({},o),A))})):v})(e):n,pi({sortParam:A,originValues:n,measureValues:r,dataSet:t})})({dataSet:this,sortParam:e,originValues:[...this.sortedDimensionValues[t]||[]],isSortByMeasure:!(0,l.isEmpty)(A)});this.sortedDimensionValues[t]=n,this.handlePivotMetaSort(t,n)})},this.getTotalStatus=e=>{const{columns:t,rows:A}=this.fields,n=(t,A)=>{if(A){const A=(0,l.find)(t,t=>!(0,l.has)(e,t));return!(!A||A===(0,l.first)(t))}return(0,l.every)(t,t=>!(0,l.has)(e,t))};return{isRowGrandTotal:n(Zn(A)),isRowSubTotal:n(A,!0),isColGrandTotal:n(Zn(t)),isColSubTotal:n(t,!0)}}}getExistValuesByDataItem(e,t){return ei(e,t)}setDataCfg(e){super.setDataCfg(e);const{rows:t}=this.fields;this.sortedDimensionValues={},this.rowPivotMeta=new Map,this.colPivotMeta=new Map,this.dimensionValuesCache=new Map,this.transformIndexesData(this.originData,t),this.handleDimensionValuesSort()}transformIndexesData(e,t){const{columns:A,values:n,valueInCols:i}=this.fields;let r;return P.getInstance().debugCallback("Transform Data",()=>{r=function(e){const{rows:t=[],columns:A=[],values:n,valueInCols:i,data:r=[],indexesData:o={},sortedDimensionValues:s,rowPivotMeta:a,colPivotMeta:u,getExistValuesByDataItem:c}=e,h=[],d=new Set((0,l.intersection)(t,A)),f=({dimension:e,dimensionPath:t,careRepeated:A=!0})=>{A&&d.has(e)||(s[e]||(s[e]=[])).push(t)},g=Ai(t,A);return r.forEach(e=>{if(!e||(0,l.isEmpty)(e))return;const r=c?c(e,n):ei(e,n),s=ti(e,t,i?null:r),d=ti(e,A,i?r:null);for(const n of s)for(const i of d){const r=ni({rowDimensionValues:n,colDimensionValues:i,rowPivotMeta:a,colPivotMeta:u,rowFields:t,colFields:A,isFirstCreate:!0,onFirstCreate:f,prefix:g});h.push(r),(0,l.set)(o,r,e)}}),{paths:h,indexesData:o,rowPivotMeta:a,colPivotMeta:u,sortedDimensionValues:s}}({rows:ii(t),columns:ii(A),values:n,valueInCols:i,data:e,indexesData:this.indexesData,sortedDimensionValues:this.sortedDimensionValues,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,getExistValuesByDataItem:this.getExistValuesByDataItem}),this.indexesData=r.indexesData,this.rowPivotMeta=r.rowPivotMeta,this.colPivotMeta=r.colPivotMeta,this.sortedDimensionValues=r.sortedDimensionValues}),r}transformDrillDownData(e,t,A){var n;const i=[...pr.getFieldPath(A,!0),e],r=this.spreadsheet.store,o=null==A?void 0:A.id,s=null!==(n=r.get("drillDownIdPathMap"))&&void 0!==n?n:new Map;s.has(o)&&((0,l.forEach)(s.get(o),e=>{(0,l.unset)(this.indexesData,e)}),ri(this.rowPivotMeta,o));const{paths:a}=this.transformIndexesData(t,i);s.set(o,a),r.set("drillDownIdPathMap",s)}clearDrillDownData(e){const t=this.spreadsheet.store,A=t.get("drillDownIdPathMap");if(!A)return!1;const n=t.get("drillDownDataCache",[]);if(e){const i=A.get(e);i&&(0,l.forEach)(i,e=>{(0,l.unset)(this.indexesData,e)}),ri(this.rowPivotMeta,e),A.delete(e);const r=(0,l.filter)(n,e=>A.has(null==e?void 0:e.rowId));t.set("drillDownDataCache",r);const o=r.map(e=>null==e?void 0:e.drillLevel),s=t.get("drillDownFieldInLevel",[]).filter(e=>(0,l.includes)(o,null==e?void 0:e.drillLevel));t.set("drillDownFieldInLevel",s)}else{A.clear();const e=this.spreadsheet.store.get("originalDataCfg");(0,l.isEmpty)(e)||this.spreadsheet.setDataCfg(e),this.spreadsheet.store.set("drillItemsNum",-1),this.spreadsheet.store.set("drillDownDataCache",[]),this.spreadsheet.store.set("drillDownFieldInLevel",[])}return t.set("drillDownIdPathMap",A),!0}handlePivotMetaSort(e,t){const{rows:A,columns:n}=this.fields;(0,l.includes)(A,e)?this.rowPivotMeta=mi({pivotMeta:this.rowPivotMeta,dimensions:A,sortFieldId:e,sortedDimensionValues:t}):(0,l.includes)(n,e)&&(this.colPivotMeta=mi({pivotMeta:this.colPivotMeta,dimensions:n,sortFieldId:e,sortedDimensionValues:t}))}processDataCfg(e){const{data:t,meta:A=[],fields:n,sortParams:i=[]}=e,{columns:r=[],rows:o=[],values:s,valueInCols:a,customValueOrder:u}=n;let c=r,h=o;return a?c=this.isCustomMeasuresPosition(u)?this.handleCustomMeasuresOrder(u,c):(0,l.uniq)([...r,Be]):h=this.isCustomMeasuresPosition(u)?this.handleCustomMeasuresOrder(u,h):(0,l.uniq)([...o,Be]),{data:t,meta:this.processMeta(A,ht("数值")),fields:Object.assign(Object.assign({},n),{rows:h,columns:c,values:s}),sortParams:i}}getFieldsAndPivotMetaByField(e){const{rows:t=[],columns:A=[]}=this.fields||{};return t.includes(e)?{dimensions:ii(t),pivotMeta:this.rowPivotMeta}:A.includes(e)?{dimensions:ii(A),pivotMeta:this.colPivotMeta}:{}}getDimensionValues(e,t={}){var A;const{pivotMeta:n,dimensions:i}=this.getFieldsAndPivotMetaByField(e);if(!n||!i)return[];const r=(0,l.isEmpty)(t);if(this.dimensionValuesCache.has(e)&&r)return null!==(A=this.dimensionValuesCache.get(e))&&void 0!==A?A:[];const o=ai({pivotMeta:n,dimensionValues:$n(t,i,Fe),fields:i,fieldIdx:(0,l.indexOf)(i,e),queryType:Yn.DetailOnly,sortedDimensionValues:this.sortedDimensionValues}),s=(0,l.uniq)(o.map(e=>bt(e.value)));return r&&this.dimensionValuesCache.set(e,s),s}getTotalValue(e,t){const{options:A}=this.spreadsheet,n=(0,l.some)(t)?t:this.getTotalStatus(e),{aggregation:i,calcFunc:r}=function(e,t){const{isRowGrandTotal:A,isRowSubTotal:n,isColGrandTotal:i,isColSubTotal:r}=e,{row:o,col:s}=t||{},{calcGrandTotals:a={},calcSubTotals:l={}}=o||{},{calcGrandTotals:u={},calcSubTotals:c={}}=s||{},h=(e,t)=>{if((e.aggregation||e.calcFunc)&&t)return{aggregation:e.aggregation,calcFunc:e.calcFunc}};return h(u,i)||h(c,r)||h(a,A)||h(l,n)}(n,null==A?void 0:A.totals)||{},o=!(0,l.isEmpty)(null==A?void 0:A.totals)||this.spreadsheet.isHierarchyTreeType()||this.spreadsheet.isHierarchyGridTreeType()?"":S.SUM,s=Xn[i||o];if(s||r){const t=this.getCellMultiData({query:e,queryType:Yn.DetailOnly});let A=null;return r?A=r(e,t,this.spreadsheet):s&&(A=s(t,ye)),Mt.getCellData(Object.assign(Object.assign({},(0,l.omit)(e,[Be])),{[e[Be]]:A}),e[Be])}}getCellData(e){var t,A,n,i;const{query:r={},rowNode:o,isTotals:s=!1,totalStatus:a}=e||{},{rows:u,columns:c}=this.fields;let h=u;const d=null===(t=this.spreadsheet)||void 0===t?void 0:t.store.get("drillDownIdPathMap"),f=Array.from(null!==(A=null==d?void 0:d.keys())&&void 0!==A?A:[]).some(e=>null==o?void 0:o.id.startsWith(e));o&&f&&(h=null!==(n=pr.getFieldPath(o,f))&&void 0!==n?n:u);const g=ii(h),p=ii(c),v=ni({rowDimensionValues:$n(r,g),colDimensionValues:$n(r,p),rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,rowFields:g,colFields:p,prefix:Ai(g,p)}),m=(0,l.get)(this.indexesData,v);return m?Mt.getCellData(m,r[Be]):s||(null===(i=this.spreadsheet)||void 0===i?void 0:i.isHierarchyGridTreeType())&&(null==o?void 0:o.isCollapsed)?this.getTotalValue(r,a):void 0}getQueryExtraFields(e){const{values:t=[]}=this.fields,A=e[Be];return A?(0,l.includes)(t,A)?[A]:[]:t}getCellMultiData(e){const{query:t={},queryType:A=Yn.All,drillDownFields:n=[]}=e||{};(0,l.isEmpty)(t)&&console.warn(`query: ${t} shouldn't be empty, you can get all data from dataCfg if you're intended.\n you should use { EXTRA_FIELD: xxx} as least if you want query all specific value data`);const{rows:i,columns:r}=this.fields,o=ii((0,l.isEmpty)(n)?i:i.concat(n)),s=ii(r),a=$n(t,o,Fe),u=$n(t,s,Fe),{rowQueries:c,colQueries:h}=function(e){const{rowFields:t,rowDimensionValues:A,rowPivotMeta:n,colFields:i,colDimensionValues:r,colPivotMeta:o,queryType:s,sortedDimensionValues:a}=e;return{rowQueries:li({dimensionValues:A,pivotMeta:n,fields:t,sortedDimensionValues:a,queryType:s}),colQueries:li({dimensionValues:r,pivotMeta:o,fields:i,sortedDimensionValues:a,queryType:s})}}({rowDimensionValues:a,colDimensionValues:u,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,rowFields:o,colFields:s,sortedDimensionValues:this.sortedDimensionValues,queryType:A}),d=Ai(o,s),f=[];for(const e of c)for(const t of h){const n=ni({rowDimensionValues:e,colDimensionValues:t,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,rowFields:o,colFields:s,prefix:d});let i=!1,r=this.indexesData;for(let e=0;e<n.length;e++){const t=n[e];i?r=Jn(t)?ui(r,A):(0,l.compact)((0,l.map)(r,e=>null==e?void 0:e[t])):Jn(t)?(i=!0,r=(0,l.compact)([r]),e--):r=null==r?void 0:r[t]}(0,l.isArray)(r)?f.push(...r):r&&f.push(r)}const g=this.getQueryExtraFields(t);return(0,l.flatMap)((0,l.uniq)(f),e=>e?Mt.getCellDataList(e,g):[])}getFieldFormatter(e,t){return e===be?this.getFieldFormatterForTotalValue(t):super.getFieldFormatter(e)}getFieldFormatterForTotalValue(e){let t="";return!this.spreadsheet.isValueInCols()&&e&&(t=(0,l.get)(e.rowQuery,Be)),t=null!=t?t:(0,l.get)(this.fields.values,0),super.getFieldFormatter(t)}handleCustomMeasuresOrder(e,t){const A=(0,l.uniq)([...t]);return t.length>=e?(A.splice(e,0,Be),A):[...A,Be]}isCustomMeasuresPosition(e){return(0,l.isNumber)(e)}getRowData(e){return this.getCellMultiData({query:e.rowQuery})}}class Aa extends ta{processDataCfg(e){const t=!this.spreadsheet.isCustomRowFields(),A=e.fields.rows||[],n=t?A:[...A,Be],i=this.processMeta(e.meta,ht("数值"));return Object.assign(Object.assign({},e),{meta:i,fields:Object.assign(Object.assign({},e.fields),{rows:n,valueInCols:t})})}}const na=e=>{try{return JSON.parse(e)}catch(e){return null}};class ia extends Nr{get rowCellTheme(){return this.spreadsheet.theme.rowCell.cell}getCornerCellInstance(...e){var t,A;return(null===(A=(t=this.spreadsheet.options).cornerCell)||void 0===A?void 0:A.call(t,...e))||new ir(...e)}getRowCellInstance(...e){var t,A;return(null===(A=(t=this.spreadsheet.options).rowCell)||void 0===A?void 0:A.call(t,...e))||new $i(...e)}getColCellInstance(...e){var t,A;return(null===(A=(t=this.spreadsheet.options).colCell)||void 0===A?void 0:A.call(t,...e))||new Hi(...e)}doLayout(){const{rowLeafNodes:e,colLeafNodes:t,rowsHierarchy:A,colsHierarchy:n}=this.buildAllHeaderHierarchy();return this.calculateHeaderNodesCoordinate({rowLeafNodes:e,rowsHierarchy:A,colLeafNodes:t,colsHierarchy:n}),{colNodes:n.getNodes(),colsHierarchy:n,rowNodes:A.getNodes(),rowsHierarchy:A,rowLeafNodes:e,colLeafNodes:t}}buildAllHeaderHierarchy(){const{leafNodes:e,hierarchy:t}=lo({isRowHeader:!0,spreadsheet:this.spreadsheet}),{leafNodes:A,hierarchy:n}=lo({isRowHeader:!1,spreadsheet:this.spreadsheet});return{rowLeafNodes:e,colLeafNodes:A,rowsHierarchy:t,colsHierarchy:n}}getDataQueryInfo(e,t){var A,n,i,r;const{options:o,dataSet:s}=this.spreadsheet,a=null!==(i=null===(n=null===(A=o.style)||void 0===A?void 0:A.colCell)||void 0===n?void 0:n.hideValue)&&void 0!==i&&i?{[Be]:null===(r=s.fields.values)||void 0===r?void 0:r[0]}:{},u=(0,l.merge)({},e,t,a);return{dataQuery:u,valueField:u[Be]}}getCellMeta(e=0,t=0){var A,n;const{options:i,dataSet:r}=this.spreadsheet,{rowLeafNodes:o,colLeafNodes:s}=this.getLayoutResult(),a=o[e],u=s[t];if(!a||!u)return null;const c=a.query,h=u.query,d=a.isTotals||a.isTotalMeasure||u.isTotals||u.isTotalMeasure,f=si(a,u),{dataQuery:g,valueField:p}=this.getDataQueryInfo(c,h),v=r.getCellData({query:g,rowNode:a,isTotals:d,totalStatus:f}),m=(0,l.get)(v,ye,null),C={spreadsheet:this.spreadsheet,x:u.x,y:a.y,width:u.width,height:a.height,data:v,rowIndex:e,colIndex:t,isTotals:d,valueField:p,fieldValue:m,rowQuery:c,colQuery:h,query:Object.assign(Object.assign({},c),h),rowId:a.id,colId:u.id,id:kt(a.id,u.id)};return null!==(n=null===(A=i.layoutCellMeta)||void 0===A?void 0:A.call(i,C))&&void 0!==n?n:C}getPreLevelSampleNode(e,t){return t.getNodes(e.level-1).find(e=>!e.isTotals)}calculateHeaderNodesCoordinate(e){this.calculateRowNodesCoordinate(e),this.calculateColNodesCoordinate(e)}calculateColNodesCoordinate(e){const{colLeafNodes:t,colsHierarchy:A,rowsHierarchy:n}=e;this.calculateColLeafNodesWidth(e),this.calculateColParentNodeWidthAndX(t),this.updateColsHierarchySampleMaxHeightNodes(A,n),this.calculateColNodesHeight(A),this.updateCustomFieldsSampleNodes(A),this.adjustCustomColLeafNodesHeight({leafNodes:t,hierarchy:A}),this.adjustColTotalNodesCoordinate(A)}calculateRowOffsets(){}adjustColTotalNodesCoordinate(e){var t;(0,l.isEmpty)(null===(t=this.spreadsheet.options.totals)||void 0===t?void 0:t.col)||(this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!1,isSubTotal:!0}),this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!1,isSubTotal:!1}))}calculateColLeafNodesWidth(e){const{rowLeafNodes:t,colLeafNodes:A,rowsHierarchy:n,colsHierarchy:i}=e;let r=pr.blankNode(),o=0;i.getLeaves().forEach(e=>{e.colIndex=o,o++,e.x=r.x+r.width,e.width=this.getColLeafNodesWidth(e,A,t,n.width),i.width+=e.width,r=e})}calculateColNodesHeight(e){e.getNodes().forEach(t=>{if(0===t.level)t.y=0;else{const A=this.getPreLevelSampleNode(t,e);t.y=(null==A?void 0:A.y)+(null==A?void 0:A.height)||0}const A=this.getColNodeHeight({colNode:t,colsHierarchy:e,useCache:!1});t.height=t.isGrandTotals&&!t.isTotalMeasure&&t.isLeaf?e.height:A,Wr(this.spreadsheet,null,t)})}getMultipleMap(e,t,A){const{maxLevel:n}=e,i=this.spreadsheet.dataSet,{totals:r}=this.spreadsheet.options,o=i.moreThanOneValue(),{rows:s,columns:a}=i.fields,l=t?s:a,u=t?r.row:r.col,c=A?(null==u?void 0:u.subTotalsGroupDimensions)||[]:(null==u?void 0:u.grandTotalsGroupDimensions)||[],h=i.isEmpty()?[]:c,d=Array.from({length:n+1},()=>1);for(let e=n;e>0;e--){const t=l[e],A=t===Be&&o;h.includes(t)||A||(d[e-1]+=d[e],d[e]=0)}return d}adjustTotalNodesCoordinate(e){const{hierarchy:t,isRowHeader:A,isSubTotal:n}=e,i=this.getMultipleMap(t,A,n),r=(0,l.filter)(t.getNodes(),e=>n?e.isSubTotals:e.isGrandTotals),o=A?"width":"height";(0,l.forEach)(r,e=>{var A;let r=i[e.level];if(!r&&n){let t=1;for(;r<1;)r=i[e.level-t]-t,t++}let s=0;for(let n=0;n<r;n++)s+=(0,l.get)(null===(A=t.sampleNodesForAllLevels)||void 0===A?void 0:A.find(t=>t.level===e.level+n),[o],0);e[o]=s})}getColLeafNodesWidth(e,t,A,n){const{colCell:i}=this.spreadsheet.options.style,r=this.getColCellDraggedWidth(e);if((0,l.isNumber)(r))return Bi(r);const o=this.getCellCustomSize(e,null==i?void 0:i.width);return(0,l.isNumber)(o)?Bi(o):this.spreadsheet.getLayoutWidthType()===_i.Compact?this.getCompactGridColNodeWidth(e,A):this.spreadsheet.isHierarchyTreeType()?this.getAdaptTreeColWidth(e,t,A):this.getAdaptGridColWidth(t,e,n)}getRowNodeHeight(e){if(!e)return 0;const{rowCell:t}=this.spreadsheet.options.style,A=this.getRowCellHeight(e),n=(null==t?void 0:t.maxLines)>1&&(null==t?void 0:t.wordWrap)||this.spreadsheet.theme.rowCell.text.fontSize>12||this.spreadsheet.theme.rowCell.measureText.fontSize>12||this.spreadsheet.theme.rowCell.seriesText.fontSize>12||this.spreadsheet.theme.rowCell.bolderText.fontSize>12;return this.isCustomRowCellHeight(e)||!n?(e.extra.isCustomHeight=!0,A||0):this.getNodeAdaptiveHeight({meta:e,cell:this.textWrapTempRowCell,defaultHeight:A})}getExpectedCellIconWidth(e,t,A){var n,i;let r=0;if(t)r=1;else{const t=(0,l.map)(this.spreadsheet.options.headerActionIcons,e=>Object.assign(Object.assign({},e),{displayCondition:()=>!0})),A=Oe(t,null,e);r=(null==A?void 0:A.icons.length)||0}return r?r*(A.size+(null===(n=A.margin)||void 0===n?void 0:n.left))+(null===(i=A.margin)||void 0===i?void 0:i.right):0}calculateRowNodesAllLevelSampleNodes(e){const{rowsHierarchy:t,colLeafNodes:A}=e,n=this.spreadsheet.isHierarchyTreeType(),i=t.sampleNodesForAllLevels||[];n?t.width=this.getTreeRowHeaderWidth():i.forEach(e=>{var n;e.width=this.getGridRowNodesWidth(e,A),t.width+=e.width;const r=null!==(n=i[e.level-1])&&void 0!==n?n:{x:0,width:0};e.x=(null==r?void 0:r.x)+(null==r?void 0:r.width)}),t.rootNode.width=t.width}getRowLeafNodeHeight(e){var t;const{rowCell:A}=this.spreadsheet.options.style,n=(null==A?void 0:A.maxLines)>1&&(null==A?void 0:A.wordWrap)?pr.getBranchNodes(e).map(e=>this.getRowNodeHeight(e)):[],i=this.getRowNodeHeight(e);return Bi(this.isCustomRowCellHeight(e)?i:null!==(t=(0,l.max)(n))&&void 0!==t?t:i)}calculateRowNodesBBox(e){const t=this.spreadsheet.isHierarchyTreeType(),A=e.sampleNodesForAllLevels||[];let n=pr.blankNode();e.getNodes().forEach(i=>{var r,o;const s=t||!t&&i.isLeaf;if(t)i.width=this.getTreeRowHeaderWidth();else{const e=A[i.level];i.width=null==e?void 0:e.width}if(s){const t=(null!==(r=null==n?void 0:n.rowIndex)&&void 0!==r?r:-1)+1;null!==(o=i.rowIndex)&&void 0!==o||(i.rowIndex=t),i.y=n.y+n.height,i.height=this.getRowLeafNodeHeight(i),n=i,e.height+=i.height}if(t||0===i.level)i.x=0;else{const e=A[i.level-1];i.x=(null==e?void 0:e.x)+(null==e?void 0:e.width)}Wr(this.spreadsheet,i,null)})}calculateRowNodesCoordinate(e){const{rowsHierarchy:t,rowLeafNodes:A}=e,n=this.spreadsheet.isHierarchyTreeType();this.calculateRowNodesAllLevelSampleNodes(e),this.calculateRowNodesBBox(t),n||(this.adjustCustomRowLeafNodesWidth({leafNodes:A,hierarchy:t}),this.calculateRowNodeHeightAndY(A),this.adjustRowTotalNodesCoordinate(t))}adjustRowTotalNodesCoordinate(e){var t;(0,l.isEmpty)(null===(t=this.spreadsheet.options.totals)||void 0===t?void 0:t.row)||(this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!0,isSubTotal:!1}),this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!0,isSubTotal:!0}))}calculateRowNodeHeightAndY(e){let t=null,A=0;const n=e.slice(0);for(;A<n.length;){const e=n[A++],i=null==e?void 0:e.parent;t!==i&&i&&(n.push(i),i.y=i.children[0].y,i.height=(0,l.sumBy)(i.children,"height"),t=i)}}getGridRowNodesWidth(e,t){const{rowCell:A}=this.spreadsheet.options.style,n=this.getRowCellDraggedWidth(e);if((0,l.isNumber)(n))return Bi(n);const i=this.getCellCustomSize(e,null==A?void 0:A.width);return(0,l.isNumber)(i)?Bi(i):this.spreadsheet.getLayoutWidthType()!==_i.Adaptive?this.getCompactGridRowNodeWidth(e):this.getAdaptGridColWidth(t)}getAdaptTreeColWidth(e,t,A){const n=this.getCanvasSize().width-this.getSeriesNumberWidth()-Ei.getVerticalBorderWidth(this.spreadsheet),i=Math.min(n/2,this.getTreeRowHeaderWidth()),r=Math.max(1,t.length),{dataCell:o}=this.spreadsheet.options.style;return Bi(Math.max(Ot(o,this.getColLabelLength(e,A)),yi((n-i)/r)))}getColLabelLength(e,t){const A=na(null==e?void 0:e.value);if((0,l.isArray)(A))return A.length;let n=1;for(let A=0;A<50;A++){const i=t[A];if(!i)return n;const r=this.spreadsheet.dataSet.getCellData({query:Object.assign(Object.assign({},e.query),i.query),rowNode:i,isTotals:e.isTotals||e.isTotalMeasure||i.isTotals||i.isTotalMeasure}),o=(0,l.keys)(r);for(let e=0;e<o.length;e++){const t=(0,l.get)(r,o[e]),A=(0,l.size)((0,l.get)(null==t?void 0:t.values,"0"));A>n&&(n=A)}}return n}getAdaptGridColWidth(e,t,A){const{rows:n=[]}=this.spreadsheet.dataSet.fields,{dataCell:i}=this.spreadsheet.options.style,r=n.length,o=e.length,{width:s}=this.getCanvasSize(),a=s-this.getSeriesNumberWidth()-Ei.getVerticalBorderWidth(this.spreadsheet),l=Math.max(1,r+o);return Bi(A?Math.max(Ot(i),yi((a-A)/o)):Math.max(Ot(i),yi(a/l)))}getTreeRowHeaderWidth(){var e,t,A,n;const{rowCell:i}=this.spreadsheet.options.style;if((0,l.isNumber)(null==i?void 0:i.treeWidth))return Bi(i.treeWidth);const r=this.getCellCustomSize(null,null==i?void 0:i.width);if((0,l.isNumber)(r))return Bi(r);const o=mr.getTreeCornerText(this.spreadsheet),{bolderText:s,icon:a}=this.spreadsheet.theme.cornerCell,u=this.measureTextWidth(o,s)+2*a.size+(null===(e=a.margin)||void 0===e?void 0:e.left)+(null===(t=a.margin)||void 0===t?void 0:t.right)+(null===(A=this.rowCellTheme.padding)||void 0===A?void 0:A.left)+(null===(n=this.rowCellTheme.padding)||void 0===n?void 0:n.right),c=Math.max(null!=r?r:120,u);return Number.isNaN(c)?120:Bi(c)}getCompactGridRowNodeWidth(e){var t;const{bolderText:A,icon:n,cell:i}=this.spreadsheet.theme.rowCell,{bolderText:r,icon:s,cell:a}=this.spreadsheet.theme.cornerCell,{field:u,isLeaf:c}=e,h=this.getExpectedCellIconWidth(o.ROW_CELL,!this.spreadsheet.isValueInCols()&&c&&this.spreadsheet.options.showDefaultHeaderActionIcon,n),d=null===(t=this.spreadsheet.dataSet.getDimensionValues(u))||void 0===t?void 0:t.slice(0,50).map(t=>{var A,n;return null!==(n=null===(A=this.spreadsheet.dataSet.getFieldFormatter(u))||void 0===A?void 0:A(t,void 0,e))&&void 0!==n?n:t}),f=(0,l.maxBy)(d,e=>`${e}`.length),g=this.measureTextWidth(f,A)+h+i.padding.left+i.padding.right+i.verticalBorderWidth,p=this.spreadsheet.dataSet.getFieldName(u),v=this.getExpectedCellIconWidth(o.CORNER_CELL,!1,s),m=this.measureTextWidth(p,r)+v+a.padding.left+a.padding.right;P.getInstance().logger("Max Label In Row:",u,g>m?f:p);const{compactExtraWidth:C=0,compactMinWidth:w}=this.spreadsheet.options.style||{},y=Bi(Math.max(g,m)+C);return(0,l.isNumber)(w)?Math.max(y,w):y}getCompactGridColNodeWidth(e,t){var A,n,i,r,s,a;const{bolderText:u,cell:c,icon:h}=this.spreadsheet.theme.colCell,{text:d,icon:f}=this.spreadsheet.theme.dataCell,g=this.spreadsheet.dataSet.getFieldFormatter(e.field),p=null!==(A=null==g?void 0:g(e.value,void 0,e))&&void 0!==A?A:e.value,v=this.getExpectedCellIconWidth(o.COL_CELL,this.spreadsheet.isValueInCols()&&this.spreadsheet.options.showDefaultHeaderActionIcon,h),m=this.measureTextWidth(p,u)+v;let C="",w=0,y=0;for(let A=0;A<50;A++){const o=t[A];if(o){const{valueField:t,dataQuery:A}=this.getDataQueryInfo(o.query,e.query),l=this.spreadsheet.dataSet.getCellData({query:A,rowNode:o,isTotals:e.isTotals||e.isTotalMeasure||o.isTotals||o.isTotalMeasure});if(l){const A=null==l?void 0:l[ye],o=null!==(i=null===(n=this.spreadsheet.dataSet.getFieldFormatter(l[Be]))||void 0===n?void 0:n(A,l,e))&&void 0!==i?i:A,u=Xe(null===(r=this.spreadsheet.options.conditions)||void 0===r?void 0:r.icon,t)?(null==f?void 0:f.size)+(null===(s=null==f?void 0:f.margin)||void 0===s?void 0:s.left)+(null===(a=null==f?void 0:f.margin)||void 0===a?void 0:a.right):0,c=this.measureTextWidth(o,d)+u;c>w&&(C=o,w=c,y=u)}}}const B=m>w,E=B?p:C,x=B?v:y;P.getInstance().logger("Max Label In Col:",e.field,E,w,y);const b=this.measureTextWidth(E,Object.assign(Object.assign({},u),{fontSize:Math.max(d.fontSize,u.fontSize)})),{compactExtraWidth:F=0,compactMinWidth:S}=this.spreadsheet.options.style||{},T=Bi(b+c.padding.left+c.padding.right+2*c.verticalBorderWidth+x+F);return(0,l.isNumber)(S)?Math.max(T,S):T}getViewCellHeights(){const e=this.getRowLeafNodes(),t=(0,l.reduce)(e,(e,t)=>{const A=(0,l.last)(e)||0;return e.push(A+t.height),e},[0]);return{getTotalHeight:()=>(0,l.last)(t)||0,getCellOffsetY:e=>t[e]||0,getTotalLength:()=>t.length-1,getIndexRange:(e,A)=>Pi(t,e,A)}}getSeriesNumberCells(){var e;const t=(null===(e=this.getSeriesNumberHeader())||void 0===e?void 0:e.children)||[];return Vi(t,Ir)}getFrozenOptions(){return this.validFrozenOptions||(this.validFrozenOptions=((e,t)=>{const{seriesNumber:A,layoutSeriesNumberNodes:n}=t;return(null==A?void 0:A.enable)&&n?Object.assign(Object.assign({},e),{rowCount:0,trailingRowCount:0}):e})(super.getFrozenOptions(),this.spreadsheet.options)),this.validFrozenOptions}getContentWidth(){const{rowsHierarchy:e,colsHierarchy:t}=this.layoutResult;return Bi(e.width+t.width+Ei.getVerticalBorderWidth(this.spreadsheet))}getContentHeight(){const{rowsHierarchy:e,colsHierarchy:t}=this.layoutResult;return Bi(e.height+t.height+Ei.getHorizontalBorderWidth(this.spreadsheet))}}class ra extends $s{isCustomRowFields(){return this.isCustomHeaderFields("rows")}getDataSet(){const{dataSet:e}=this.options;return e?e(this):this.isCustomRowFields()?new Aa(this):new ta(this)}getContentHeight(){return this.facet.getContentHeight()}isPivotMode(){return!0}isTableMode(){return!1}isHierarchyTreeType(){return"tree"===this.options.hierarchyType}isHierarchyGridTreeType(){return"grid-tree"===this.options.hierarchyType}isFrozenRowHeader(){var e,t;return!!(null===(t=null===(e=this.options)||void 0===e?void 0:e.frozen)||void 0===t?void 0:t.rowHeader)}isValueInCols(){var e,t;return null===(t=null===(e=this.dataSet)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.valueInCols}clearDrillDownData(e,t){return(0,Q.sH)(this,void 0,void 0,function*(){this.dataSet instanceof ta&&this.dataSet.clearDrillDownData(e)&&!t&&(this.interaction.reset(),yield this.render(!1))})}buildFacet(){var e,t,A,n,i,r;null!==(e=(r=this.options).dataCell)&&void 0!==e||(r.dataCell=e=>new Nt(e,this)),null===(t=this.facet)||void 0===t||t.destroy(),this.facet=null!==(i=null===(n=(A=this.options).facet)||void 0===n?void 0:n.call(A,this))&&void 0!==i?i:new ia(this),this.facet.render()}bindEvents(){this.off(iA.ROW_CELL_COLLAPSED__PRIVATE),this.off(iA.ROW_CELL_ALL_COLLAPSED__PRIVATE),this.on(iA.ROW_CELL_COLLAPSED__PRIVATE,this.handleRowCellCollapsed),this.on(iA.ROW_CELL_ALL_COLLAPSED__PRIVATE,this.handleRowCellToggleCollapseAll)}handleRowCellCollapsed(e){return(0,Q.sH)(this,void 0,void 0,function*(){var t;const{isCollapsed:A,node:n}=e,{collapseFields:i}=null===(t=this.options.style)||void 0===t?void 0:t.rowCell,r=Object.assign(Object.assign({},i),{[n.id]:A});this.setOptions({style:{rowCell:{collapseFields:r}}}),yield this.render(!1),this.emit(iA.ROW_CELL_COLLAPSED,{isCollapsed:A,collapseFields:r,node:n})})}handleRowCellToggleCollapseAll(e){return(0,Q.sH)(this,void 0,void 0,function*(){const t=!e;this.setOptions({style:{rowCell:{collapseAll:t,collapseFields:null,expandDepth:null}}}),yield this.render(!1),this.emit(iA.ROW_CELL_ALL_COLLAPSED,t)})}groupSortByMethod(e,t){return(0,Q.sH)(this,void 0,void 0,function*(){var A,n,i,r;const{rows:o,columns:s}=this.dataCfg.fields,{hideValue:a}=this.options.style.colCell,u=this.isValueInCols()?(0,l.last)(o):(0,l.last)(s),{query:c,field:h,value:d,extra:f}=t,g=(0,l.clone)(c);let p=(null==f?void 0:f.isCustomNode)?h:d;a&&this.isValueInCols()&&(p=this.dataSet.fields.values[0],g[Be]=p);const v=(0,l.isString)(u)?u:u.field,m=null===(A=this.dataCfg.sortParams)||void 0===A?void 0:A.find(e=>(null==e?void 0:e.sortFieldId)===v||(null==e?void 0:e.sortFieldId)===p),C=null===(n=this.dataCfg.sortParams)||void 0===n?void 0:n.find(e=>"*"===(null==e?void 0:e.sortFieldId)),w={sortFieldId:v,sortMethod:e,sortByMeasure:p,query:g,nullsPlacement:null!==(i=null==m?void 0:m.nullsPlacement)&&void 0!==i?i:null==C?void 0:C.nullsPlacement},y=null===(r=this.dataCfg.sortParams)||void 0===r?void 0:r.filter(e=>(null==e?void 0:e.sortFieldId)!==u);this.updateSortMethodMap(t.id,e,!0);const B=[...y,w];this.emit(iA.RANGE_SORT,B),this.setDataCfg(Object.assign(Object.assign({},this.dataCfg),{sortParams:B})),yield this.render()})}}var oa=A("./node_modules/.pnpm/antd@6.6.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/antd/es/theme/index.js"),sa=A("./node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isEqual.js"),aa=A.n(sa),la=A("react"),ua=A.n(la),ca=A("./src/utils/antd.tsx"),ha=A("./src/utils/dash3.ts"),da=A("./src/utils/funcs.ts"),fa=A("./src/utils/theme.ts");class ga extends Nt{drawTextShape(){this.isMultiData()?Ut(this):super.drawTextShape()}}class pa extends Hi{drawTextShape(){const e=this.getMeta(),t=na(e?.value);if(!Array.isArray(t))return void super.drawTextShape();const{formattedValue:A}=this.getFormattedFieldValue();Ut(this,{values:A!==e?.value?[[A]]:[t]},!1)}}class va extends Aa{getExistValuesByDataItem(e){const t=Object.keys(e).filter(t=>{const A=e[t];return"object"==typeof A&&null!==A&&!Array.isArray(A)});return 0===t.length&&t.push(Le),t}processDataCfg(e){const t=super.processDataCfg(e);return{...t,meta:this.processMeta(e.meta,ht("数值")),fields:{...t.fields,rows:[...e.fields.rows??[],Be]}}}}var ma=function(){return ma=Object.assign||function(e){for(var t,A=1,n=arguments.length;A<n;A++)for(var i in t=arguments[A])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ma.apply(this,arguments)},Ca=new Set(["width","height"]),wa={DataCell:Nt,Line:a.N1,Rect:a.rw},ya=function(e,t){return(0,da.qF)(e,t)},Ba=function(e,t,A,n){void 0===A&&(A={});var i=function(e,t){return void 0===e&&(e={}),(0,da.qF)(function(e){return void 0===e&&(e={}),Object.fromEntries(Object.entries(e).filter(function(e){return!Ca.has(e[0])}))}(e),t)}(A,n);return"strategy"===e?function(e,t){return Co(function(e){var t;return{hierarchyType:"tree",dataCell:function(e,t){return new ga(e,t)},colCell:function(e,t,A){return new pa(e,t,A)},dataSet:function(e){return new va(e)},showDefaultHeaderActionIcon:!1,style:{colCell:{hideValue:1===(null===(t=e.fields.values)||void 0===t?void 0:t.length)}},interaction:{autoResetSheetStyle:!0,brushSelection:!1,selectedCellMove:!1,multiSelection:!1,rangeSelection:!1},tooltip:{operation:{hiddenColumns:!0}}}}(e),t)}(ya(t,n),i):i},Ea=function(e){var t=(0,la.useRef)(e),A=(0,la.useRef)(0);return aa()(t.current,e)||(t.current=e,A.current+=1),A.current},xa=function(e){return e instanceof Error?{name:e.name,message:e.message}:(0,ca.xE)(e)},ba=function(e){if(e&&"object"==typeof e&&!Array.isArray(e)){var t=Object.entries(e).filter(function(e){var t=e[1];return!e[0].startsWith("$$")&&void 0!==t});return t.length?Object.fromEntries(t):void 0}},Fa=function(e){var t,A;if(e){var n=e.getMeta(),i=null!==(t=n.valueField)&&void 0!==t?t:n.field,r=null!==(A=n.fieldValue)&&void 0!==A?A:n.value,o={cellType:e.cellType,rowIndex:n.rowIndex,colIndex:n.colIndex,field:i,value:r,label:e.getActualText(),rowQuery:ba(n.rowQuery),colQuery:ba(n.colQuery),isTotals:n.isTotals};return Object.fromEntries(Object.entries(o).filter(function(e){return void 0!==e[1]}))}},Sa=function(e,t){var A=null==t?void 0:t.target;if(A){var n=e.getCell(A);return Fa(n)}};const Ta=function(e){var t,A=oa.A.useToken().token,n=e.id,i=e.className,r=e.style,o=e.tabIndex,a=e.role,l=e.dir,u=e.lang,c=e.hidden,h=e.dataCfg,d=e.options,f=void 0===d?{}:d,g=e.sheetType,p=void 0===g?"pivot":g,v=e.themeCfg,m=void 0===v?{}:v,C=e.n_cell_click,w=void 0===C?0:C,y=e.n_cell_double_click,B=void 0===y?0:y,E=e.n_selection,x=void 0===E?0:E,b=e.n_sort,F=void 0===b?0:b,S=e.n_filter,T=void 0===S?0:S,L=e.n_rendered,Q=void 0===L?0:L,I=e.n_error,U=void 0===I?0:I,O=e.loading_state,H=e.setProps,M=function(e,t){var A={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(A[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(A[n[i]]=e[n[i]])}return A}(e,["id","className","style","tabIndex","role","dir","lang","hidden","dataCfg","options","sheetType","themeCfg","n_cell_click","cellClickData","n_cell_double_click","cellDoubleClickData","n_selection","selectionData","n_sort","sortData","n_filter","filterData","n_rendered","n_error","errorData","loading_state","setProps"]),_=(0,la.useRef)(null),k=(0,la.useRef)(null),R=(0,la.useRef)(h),N=(0,la.useRef)(f),D=(0,la.useRef)(H),P=(0,la.useRef)(A),G=(0,la.useRef)("default"),K=(0,la.useRef)(null),V=(0,la.useRef)(null),z=(0,la.useRef)(null),W=(0,la.useRef)({n_cell_click:w,n_cell_double_click:B,n_selection:x,n_sort:F,n_filter:T,n_rendered:Q,n_error:U}),j=(0,fa.c)(A.colorBgBase)?"dark":"default";P.current=A,G.current=j,K.current||(K.current=ma(ma({},wa),{get token(){return P.current},get theme(){return G.current}}));var X=K.current,Y=Ea({sheetType:p,themeCfg:m,defaultTheme:j}),q=Ea(h),Z=Ea(f);R.current=h,N.current=f,D.current=H,W.current.n_cell_click=Math.max(W.current.n_cell_click,w),W.current.n_cell_double_click=Math.max(W.current.n_cell_double_click,B),W.current.n_selection=Math.max(W.current.n_selection,x),W.current.n_sort=Math.max(W.current.n_sort,F),W.current.n_filter=Math.max(W.current.n_filter,T),W.current.n_rendered=Math.max(W.current.n_rendered,Q),W.current.n_error=Math.max(W.current.n_error,U);var J=ua().useCallback(function(e,t,A){var n,i,r=W.current[e]+1;W.current[e]=r;var o=((n={})[e]=r,n),s=void 0===A?void 0:(0,ca.xE)(A);t&&void 0!==s&&(o[t]=s),null===(i=D.current)||void 0===i||i.call(D,o)},[]),$=(0,la.useMemo)(function(){return Object.fromEntries(Object.entries(M).filter(function(e){var t=e[0],A=e[1];return(t.startsWith("data-")||t.startsWith("aria-"))&&null!=A}))},[M]);(0,la.useEffect)(function(){var e=_.current;if(e){var t=Math.max(e.clientWidth,1),A=Math.max(e.clientHeight,1),n=new("table"===p?ea:ra)(e,ya(R.current,X),ma(ma({},Ba(p,R.current,N.current,X)),{width:t,height:A}));k.current=n,n.setThemeCfg(ma({name:j},m)),n.on(iA.GLOBAL_CLICK,function(e){var t=Sa(n,e);t&&J("n_cell_click","cellClickData",t)}),n.on(iA.GLOBAL_DOUBLE_CLICK,function(e){var t=Sa(n,e);t&&J("n_cell_double_click","cellDoubleClickData",t)}),n.on(iA.GLOBAL_SELECTED,function(e){return J("n_selection","selectionData",e.map(Fa).filter(Boolean))}),n.on(iA.RANGE_SORTED,function(e){return J("n_sort","sortData",e)}),n.on(iA.RANGE_FILTERED,function(e){return J("n_filter","filterData",e)}),n.on(iA.LAYOUT_AFTER_RENDER,function(){return J("n_rendered")}),V.current=R.current,z.current=N.current,n.render().catch(function(e){return J("n_error","errorData",xa(e))});var i=new ResizeObserver(function(e){var t=e[0];if(t&&!n.destroyed){var A=t.contentRect,i=A.width,r=A.height;i>0&&r>0&&n.changeSheetSize(i,r)}});return i.observe(e),function(){i.disconnect(),n.destroy(),k.current===n&&(k.current=null)}}},[Y,J,X]),(0,la.useEffect)(function(){var e,t,A=k.current;if(A&&!A.destroyed&&!aa()(V.current,R.current)){if(A.setDataCfg(ya(R.current,X),!0),"strategy"===p){var n=_.current;A.setOptions(ma(ma({},Ba(p,R.current,N.current,X)),{width:Math.max(null!==(e=null==n?void 0:n.clientWidth)&&void 0!==e?e:1,1),height:Math.max(null!==(t=null==n?void 0:n.clientHeight)&&void 0!==t?t:1,1)}),!0)}A.render({reloadData:!0}).then(function(){V.current=R.current}).catch(function(e){return J("n_error","errorData",xa(e))})}},[q,J,X,p]),(0,la.useEffect)(function(){var e,t,A=k.current;if(A&&!A.destroyed&&!aa()(z.current,N.current)){var n=_.current;A.setOptions(ma(ma({},Ba(p,R.current,N.current,X)),{width:Math.max(null!==(e=null==n?void 0:n.clientWidth)&&void 0!==e?e:1,1),height:Math.max(null!==(t=null==n?void 0:n.clientHeight)&&void 0!==t?t:1,1)}),!0),A.render().then(function(){z.current=N.current}).catch(function(e){return J("n_error","errorData",xa(e))})}},[Z,J,X,p]);var ee=null!==(t=null==r?void 0:r.height)&&void 0!==t?t:450,te=ma({width:"100%",height:ee},r);return(0,s.jsx)("div",ma({},$,{id:n,ref:_,className:i,style:te,tabIndex:o,role:a,dir:l,lang:u,hidden:c,"data-dac-s2-theme":j,"data-dash-is-loading":(0,ha.A_)(O)||void 0}))};var La=function(){return La=Object.assign||function(e){for(var t,A=1,n=arguments.length;A<n;A++)for(var i in t=arguments[A])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},La.apply(this,arguments)};const Qa=function(e){return(0,s.jsx)(Ta,La({},e))}},"./src/utils/theme.ts"(e,t,A){"use strict";A.d(t,{c:()=>n});var n=function(e){var t=e.trim(),A=/^#([\da-f])([\da-f])([\da-f])$/i.exec(t),n=/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(t),i=/^rgba?\(\s*(\d+(?:\.\d+)?)\s*[, ]\s*(\d+(?:\.\d+)?)\s*[, ]\s*(\d+(?:\.\d+)?)/i.exec(t),r=A?A.slice(1).map(function(e){return parseInt(e+e,16)}):n?n.slice(1).map(function(e){return parseInt(e,16)}):i?i.slice(1).map(Number):null;return!!r&&.2126*r[0]+.7152*r[1]+.0722*r[2]<128}},"./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"(e,t,A){"use strict";function n(e,t,A,n,i,r,o){try{var s=e[r](o),a=s.value}catch(e){return void A(e)}s.done?t(a):Promise.resolve(a).then(n,i)}function i(e){return function(){var t=this,A=arguments;return new Promise(function(i,r){var o=e.apply(t,A);function s(e){n(o,i,r,s,a,"next",e)}function a(e){n(o,i,r,s,a,"throw",e)}s(void 0)})}}A.d(t,{A:()=>i})},"./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/callSuper.js"(e,t,A){"use strict";A.d(t,{A:()=>o});var n=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),i=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"),r=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");function o(e,t,A){return t=(0,n.A)(t),(0,r.A)(e,(0,i.A)()?Reflect.construct(t,A||[],(0,n.A)(e).constructor):t.apply(e,A))}},"./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js"(e,t,A){"use strict";A.d(t,{A:()=>i});var n=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");function i(e,t){var A="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!A){if(Array.isArray(e)||(A=(0,n.A)(e))||t&&e&&"number"==typeof e.length){A&&(e=A);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){A=A.call(e)},n:function(){var e=A.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==A.return||A.return()}finally{if(a)throw o}}}}},"./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"(e,t,A){"use strict";function n(e,t){if(null==e)return{};var A,n,i=function(e,t){if(null==e)return{};var A={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;A[n]=e[n]}return A}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)-1===t.indexOf(A=r[n])&&{}.propertyIsEnumerable.call(e,A)&&(i[A]=e[A])}return i}A.d(t,{A:()=>n})},"./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"(e,t,A){"use strict";function n(e,t){this.v=e,this.k=t}function i(e,t,A,n){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}i=function(e,t,A,n){function o(t,A){i(e,t,function(e){return this._invoke(t,A,e)})}t?r?r(e,t,{value:A,enumerable:!n,configurable:!n,writable:!n}):e[t]=A:(o("next",0),o("throw",1),o("return",2))},i(e,t,A,n)}function r(){var e,t,A="function"==typeof Symbol?Symbol:{},n=A.iterator||"@@iterator",o=A.toStringTag||"@@toStringTag";function s(A,n,r,o){var s=Object.create((n&&n.prototype instanceof l?n:l).prototype);return i(s,"_invoke",function(A,n,i){var r,o,s,l=0,u=i||[],c=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,A){return r=t,o=0,s=e,h.n=A,a}};function d(A,n){for(o=A,s=n,t=0;!c&&l&&!i&&t<u.length;t++){var i,r=u[t],d=h.p,f=r[2];A>3?(i=f===n)&&(s=r[(o=r[4])?5:(o=3,3)],r[4]=r[5]=e):r[0]<=d&&((i=A<2&&d<r[1])?(o=0,h.v=n,h.n=r[1]):d<f&&(i=A<3||r[0]>n||n>f)&&(r[4]=A,r[5]=n,h.n=f,o=0))}if(i||A>1)return a;throw c=!0,n}return function(i,u,f){if(l>1)throw TypeError("Generator is already running");for(c&&1===u&&d(u,f),o=u,s=f;(t=o<2?e:s)||!c;){r||(o?o<3?(o>1&&(h.n=-1),d(o,s)):h.n=s:h.v=s);try{if(l=2,r){if(o||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,o<2&&(o=0)}else 1===o&&(t=r.return)&&t.call(r),o<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),o=1);r=e}else if((t=(c=h.n<0)?s:A.call(n,h))!==a)break}catch(t){r=e,o=1,s=t}finally{l=1}}return{value:t,done:c}}}(A,r,o),!0),s}var a={};function l(){}function u(){}function c(){}t=Object.getPrototypeOf;var h=[][n]?t(t([][n]())):(i(t={},n,function(){return this}),t),d=c.prototype=l.prototype=Object.create(h);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,i(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,i(d,"constructor",c),i(c,"constructor",u),u.displayName="GeneratorFunction",i(c,o,"GeneratorFunction"),i(d),i(d,o,"Generator"),i(d,n,function(){return this}),i(d,"toString",function(){return"[object Generator]"}),(r=function(){return{w:s,m:f}})()}function o(e,t){function A(i,r,o,s){try{var a=e[i](r),l=a.value;return l instanceof n?t.resolve(l.v).then(function(e){A("next",e,o,s)},function(e){A("throw",e,o,s)}):t.resolve(l).then(function(e){a.value=e,o(a)},function(e){return A("throw",e,o,s)})}catch(e){s(e)}}var r;this.next||(i(o.prototype),i(o.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,n,i){function o(){return new t(function(t,n){A(e,i,t,n)})}return r=r?r.then(o,o):o()},!0)}function s(e,t,A,n,i){return new o(r().w(e,t,A,n),i||Promise)}function a(e,t,A,n,i){var r=s(e,t,A,n,i);return r.next().then(function(e){return e.done?e.value:r.next()})}function l(e){var t=Object(e),A=[];for(var n in t)A.unshift(n);return function e(){for(;A.length;)if((n=A.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}}A.d(t,{A:()=>h});var u=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/typeof.js");function c(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],A=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&A>=e.length&&(e=void 0),{value:e&&e[A++],done:!e}}}}throw new TypeError((0,u.A)(e)+" is not iterable")}function h(){var e=r(),t=e.m(h),A=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function i(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===A||"GeneratorFunction"===(t.displayName||t.name))}var u={throw:1,return:2,break:3,continue:3};function d(e){var t,A;return function(n){t||(t={stop:function(){return A(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return A(n.a,u[e],t)},delegateYield:function(e,i,r){return t.resultName=i,A(n.d,c(e),r)},finish:function(e){return A(n.f,e)}},A=function(e,A,i){n.p=t.prev,n.n=t.next;try{return e(A,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(h=function(){return{wrap:function(t,A,n,i){return e.w(d(t),A,n,i&&i.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:o,async:function(e,t,A,n,r){return(i(t)?s:a)(d(e),t,A,n,r)},keys:l,values:c}})()}},"./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/superPropGet.js"(e,t,A){"use strict";A.d(t,{A:()=>r});var n=A("./node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,A){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=(0,n.A)(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:A):r.value}},i.apply(null,arguments)}function r(e,t,A,r){var o=i((0,n.A)(1&r?e.prototype:e),t,A);return 2&r&&"function"==typeof o?function(e){return o.apply(A,e)}:o}},"./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js"(e,t,A){"use strict";A.d(t,{Ay:()=>w,Gw:()=>b,Q1:()=>i,Qh:()=>x,Uw:()=>o,b:()=>E,ef:()=>r});var n=A("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js");function i(){}var r=.7,o=1/r,s="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3,8})$/,c=new RegExp(`^rgb\\(${s},${s},${s}\\)$`),h=new RegExp(`^rgb\\(${l},${l},${l}\\)$`),d=new RegExp(`^rgba\\(${s},${s},${s},${a}\\)$`),f=new RegExp(`^rgba\\(${l},${l},${l},${a}\\)$`),g=new RegExp(`^hsl\\(${a},${l},${l}\\)$`),p=new RegExp(`^hsla\\(${a},${l},${l},${a}\\)$`),v={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function m(){return this.rgb().formatHex()}function C(){return this.rgb().formatRgb()}function w(e){var t,A;return e=(e+"").trim().toLowerCase(),(t=u.exec(e))?(A=t[1].length,t=parseInt(t[1],16),6===A?y(t):3===A?new b(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===A?B(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===A?B(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=c.exec(e))?new b(t[1],t[2],t[3],1):(t=h.exec(e))?new b(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=d.exec(e))?B(t[1],t[2],t[3],t[4]):(t=f.exec(e))?B(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?I(t[1],t[2]/100,t[3]/100,1):(t=p.exec(e))?I(t[1],t[2]/100,t[3]/100,t[4]):v.hasOwnProperty(e)?y(v[e]):"transparent"===e?new b(NaN,NaN,NaN,0):null}function y(e){return new b(e>>16&255,e>>8&255,255&e,1)}function B(e,t,A,n){return n<=0&&(e=t=A=NaN),new b(e,t,A,n)}function E(e){return e instanceof i||(e=w(e)),e?new b((e=e.rgb()).r,e.g,e.b,e.opacity):new b}function x(e,t,A,n){return 1===arguments.length?E(e):new b(e,t,A,n??1)}function b(e,t,A,n){this.r=+e,this.g=+t,this.b=+A,this.opacity=+n}function F(){return`#${Q(this.r)}${Q(this.g)}${Q(this.b)}`}function S(){const e=T(this.opacity);return`${1===e?"rgb(":"rgba("}${L(this.r)}, ${L(this.g)}, ${L(this.b)}${1===e?")":`, ${e})`}`}function T(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function L(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Q(e){return((e=L(e))<16?"0":"")+e.toString(16)}function I(e,t,A,n){return n<=0?e=t=A=NaN:A<=0||A>=1?e=t=NaN:t<=0&&(e=NaN),new O(e,t,A,n)}function U(e){if(e instanceof O)return new O(e.h,e.s,e.l,e.opacity);if(e instanceof i||(e=w(e)),!e)return new O;if(e instanceof O)return e;var t=(e=e.rgb()).r/255,A=e.g/255,n=e.b/255,r=Math.min(t,A,n),o=Math.max(t,A,n),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(A-n)/a+6*(A<n):A===o?(n-t)/a+2:(t-A)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new O(s,a,l,e.opacity)}function O(e,t,A,n){this.h=+e,this.s=+t,this.l=+A,this.opacity=+n}function H(e){return(e=(e||0)%360)<0?e+360:e}function M(e){return Math.max(0,Math.min(1,e||0))}function _(e,t,A){return 255*(e<60?t+(A-t)*e/60:e<180?A:e<240?t+(A-t)*(240-e)/60:t)}(0,n.A)(i,w,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:m,formatHex:m,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return U(this).formatHsl()},formatRgb:C,toString:C}),(0,n.A)(b,x,(0,n.X)(i,{brighter(e){return e=null==e?o:Math.pow(o,e),new b(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?r:Math.pow(r,e),new b(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new b(L(this.r),L(this.g),L(this.b),T(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:F,formatHex:F,formatHex8:function(){return`#${Q(this.r)}${Q(this.g)}${Q(this.b)}${Q(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:S,toString:S})),(0,n.A)(O,function(e,t,A,n){return 1===arguments.length?U(e):new O(e,t,A,n??1)},(0,n.X)(i,{brighter(e){return e=null==e?o:Math.pow(o,e),new O(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?r:Math.pow(r,e),new O(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,A=this.l,n=A+(A<.5?A:1-A)*t,i=2*A-n;return new b(_(e>=240?e-240:e+120,i,n),_(e,i,n),_(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new O(H(this.h),M(this.s),M(this.l),T(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=T(this.opacity);return`${1===e?"hsl(":"hsla("}${H(this.h)}, ${100*M(this.s)}%, ${100*M(this.l)}%${1===e?")":`, ${e})`}`}}))},"./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js"(e,t,A){"use strict";function n(e,t,A){e.prototype=t.prototype=A,A.constructor=e}function i(e,t){var A=Object.create(e.prototype);for(var n in t)A[n]=t[n];return A}A.d(t,{A:()=>n,X:()=>i})},"./node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js"(e,t,A){"use strict";function n(e){return e*e*e}function i(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}A.d(t,{EY:()=>n,wq:()=>i})},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js"(e,t,A){"use strict";A.d(t,{$:()=>o,A:()=>r});var n=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js"),i=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js");function r(e,t){return((0,i.p)(t)?i.A:o)(e,t)}function o(e,t){var A,i=t?t.length:0,r=e?Math.min(i,e.length):0,o=new Array(r),s=new Array(i);for(A=0;A<r;++A)o[A]=(0,n.A)(e[A],t[A]);for(;A<i;++A)s[A]=t[A];return function(e){for(A=0;A<r;++A)s[A]=o[A](e);return s}}},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js"(e,t,A){"use strict";A.d(t,{Ay:()=>s,lG:()=>r,uN:()=>o});var n=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js");function i(e,t){return function(A){return e+A*t}}function r(e,t){var A=t-e;return A?i(e,A>180||A<-180?A-360*Math.round(A/360):A):(0,n.A)(isNaN(e)?t:e)}function o(e){return 1===(e=+e)?s:function(t,A){return A-t?function(e,t,A){return e=Math.pow(e,A),t=Math.pow(t,A)-e,A=1/A,function(n){return Math.pow(e+n*t,A)}}(t,A,e):(0,n.A)(isNaN(t)?A:t)}}function s(e,t){var A=t-e;return A?i(e,A):(0,n.A)(isNaN(e)?t:e)}},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js"(e,t,A){"use strict";A.d(t,["A",0,e=>()=>e])},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js"(e,t,A){"use strict";function n(e,t){return e=+e,t=+t,function(A){return e*(1-A)+t*A}}A.d(t,{A:()=>n})},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js"(e,t,A){"use strict";function n(e,t){t||(t=[]);var A,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(r){for(A=0;A<n;++A)i[A]=e[A]*(1-r)+t[A]*r;return i}}function i(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}A.d(t,{A:()=>n,p:()=>i})},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js"(e,t,A){"use strict";A.d(t,{Ay:()=>o,Ik:()=>a});var n=A("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js");function i(e,t,A,n,i){var r=e*e,o=r*e;return((1-3*e+3*r-o)*t+(4-6*r+3*o)*A+(1+3*e+3*r-3*o)*n+o*i)/6}var r=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js");const o=function e(t){var A=(0,r.uN)(t);function i(e,t){var i=A((e=(0,n.Qh)(e)).r,(t=(0,n.Qh)(t)).r),o=A(e.g,t.g),s=A(e.b,t.b),a=(0,r.Ay)(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=o(t),e.b=s(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function s(e){return function(t){var A,i,r=t.length,o=new Array(r),s=new Array(r),a=new Array(r);for(A=0;A<r;++A)i=(0,n.Qh)(t[A]),o[A]=i.r||0,s[A]=i.g||0,a[A]=i.b||0;return o=e(o),s=e(s),a=e(a),i.opacity=1,function(e){return i.r=o(e),i.g=s(e),i.b=a(e),i+""}}}var a=s(function(e){var t=e.length-1;return function(A){var n=A<=0?A=0:A>=1?(A=1,t-1):Math.floor(A*t),r=e[n],o=e[n+1];return i((A-n/t)*t,n>0?e[n-1]:2*r-o,r,o,n<t-1?e[n+2]:2*o-r)}});s(function(e){var t=e.length;return function(A){var n=Math.floor(((A%=1)<0?++A:A)*t);return i((A-n/t)*t,e[(n+t-1)%t],e[n%t],e[(n+1)%t],e[(n+2)%t])}})},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js"(e,t,A){"use strict";A.d(t,{A:()=>o});var n=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js"),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r=new RegExp(i.source,"g");function o(e,t){var A,o,s,a=i.lastIndex=r.lastIndex=0,l=-1,u=[],c=[];for(e+="",t+="";(A=i.exec(e))&&(o=r.exec(t));)(s=o.index)>a&&(s=t.slice(a,s),u[l]?u[l]+=s:u[++l]=s),(A=A[0])===(o=o[0])?u[l]?u[l]+=o:u[++l]=o:(u[++l]=null,c.push({i:l,x:(0,n.A)(A,o)})),a=r.lastIndex;return a<t.length&&(s=t.slice(a),u[l]?u[l]+=s:u[++l]=s),u.length<2?c[0]?function(e){return function(t){return e(t)+""}}(c[0].x):function(e){return function(){return e}}(t):(t=c.length,function(e){for(var A,n=0;n<t;++n)u[(A=c[n]).i]=A.x(e);return u.join("")})}},"./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js"(e,t,A){"use strict";A.d(t,{A:()=>h});var n=A("./node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js"),i=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js"),r=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js");function o(e,t){var A=new Date;return e=+e,t=+t,function(n){return A.setTime(e*(1-n)+t*n),A}}var s=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js");function a(e,t){var A,n={},i={};for(A in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)A in e?n[A]=h(e[A],t[A]):i[A]=t[A];return function(e){for(A in n)i[A]=n[A](e);return i}}var l=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js"),u=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js"),c=A("./node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js");function h(e,t){var A,h=typeof t;return null==t||"boolean"===h?(0,u.A)(t):("number"===h?s.A:"string"===h?(A=(0,n.Ay)(t))?(t=A,i.Ay):l.A:t instanceof n.Ay?i.Ay:t instanceof Date?o:(0,c.p)(t)?c.A:Array.isArray(t)?r.$:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?a:s.A)(e,t)}},"./node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js"(e,t,A){"use strict";A.d(t,{M4:()=>g,O1:()=>p,tB:()=>d});var n,i,r=0,o=0,s=0,a=0,l=0,u=0,c="object"==typeof performance&&performance.now?performance:Date,h="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function d(){return l||(h(f),l=c.now()+u)}function f(){l=0}function g(){this._call=this._time=this._next=null}function p(e,t,A){var n=new g;return n.restart(e,t,A),n}function v(){l=(a=c.now())+u,r=o=0;try{!function(){d(),++r;for(var e,t=n;t;)(e=l-t._time)>=0&&t._call.call(void 0,e),t=t._next;--r}()}finally{r=0,function(){for(var e,t,A=n,r=1/0;A;)A._call?(r>A._time&&(r=A._time),e=A,A=A._next):(t=A._next,A._next=null,A=e?e._next=t:n=t);i=e,C(r)}(),l=0}}function m(){var e=c.now(),t=e-a;t>1e3&&(u-=t,a=e)}function C(e){r||(o&&(o=clearTimeout(o)),e-l>24?(e<1/0&&(o=setTimeout(v,e-c.now()-u)),s&&(s=clearInterval(s))):(s||(a=c.now(),s=setInterval(m,1e3)),r=1,h(v)))}g.prototype=p.prototype={constructor:g,restart:function(e,t,A){if("function"!=typeof e)throw new TypeError("callback is not a function");A=(null==A?d():+A)+(null==t?0:+t),this._next||i===this||(i?i._next=this:n=this,i=this),this._call=e,this._time=A,C()},stop:function(){this._call&&(this._call=null,this._time=1/0,C())}}},"./node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs"(e,t,A){"use strict";var n=A("./node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js");A.d(t,["A",0,n])},"./node_modules/.pnpm/flru@1.0.2/node_modules/flru/dist/flru.mjs"(e,t,A){"use strict";function n(e){var t,A,n,i=e||1;function r(e,r){++t>i&&(n=A,o(1),++t),A[e]=r}function o(e){t=0,A=Object.create(null),e||(n=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==A[e]||void 0!==n[e]},get:function(e){var t=A[e];return void 0!==t?t:void 0!==(t=n[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==A[e]?A[e]=t:r(e,t)}}}A.d(t,{A:()=>n})},"./node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js"(e,t,A){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}A.d(t,{A:()=>o});var i=/^\s+/,r=/\s+$/;function o(e,t){if(t=t||{},(e=e||"")instanceof o)return e;if(!(this instanceof o))return new o(e,t);var A=function(e){var t,A,o={r:0,g:0,b:0},s=1,a=null,l=null,u=null,c=!1,h=!1;return"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(r,"").toLowerCase();var t,A=!1;if(E[e])e=E[e],A=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=_.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=_.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=_.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=_.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=_.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=_.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=_.hex8.exec(e))?{r:T(t[1]),g:T(t[2]),b:T(t[3]),a:U(t[4]),format:A?"name":"hex8"}:(t=_.hex6.exec(e))?{r:T(t[1]),g:T(t[2]),b:T(t[3]),format:A?"name":"hex"}:(t=_.hex4.exec(e))?{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),a:U(t[4]+""+t[4]),format:A?"name":"hex8"}:!!(t=_.hex3.exec(e))&&{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),format:A?"name":"hex"}}(e)),"object"==n(e)&&(k(e.r)&&k(e.g)&&k(e.b)?(t=e.g,A=e.b,o={r:255*F(e.r,255),g:255*F(t,255),b:255*F(A,255)},c=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):k(e.h)&&k(e.s)&&k(e.v)?(a=Q(e.s),l=Q(e.v),o=function(e,t,A){e=6*F(e,360),t=F(t,100),A=F(A,100);var n=Math.floor(e),i=e-n,r=A*(1-t),o=A*(1-i*t),s=A*(1-(1-i)*t),a=n%6;return{r:255*[A,o,r,r,s,A][a],g:255*[s,A,A,o,r,r][a],b:255*[r,r,s,A,A,o][a]}}(e.h,a,l),c=!0,h="hsv"):k(e.h)&&k(e.s)&&k(e.l)&&(a=Q(e.s),u=Q(e.l),o=function(e,t,A){var n,i,r;function o(e,t,A){return A<0&&(A+=1),A>1&&(A-=1),A<1/6?e+6*(t-e)*A:A<.5?t:A<2/3?e+(t-e)*(2/3-A)*6:e}if(e=F(e,360),t=F(t,100),A=F(A,100),0===t)n=i=r=A;else{var s=A<.5?A*(1+t):A+t-A*t,a=2*A-s;n=o(a,s,e+1/3),i=o(a,s,e),r=o(a,s,e-1/3)}return{r:255*n,g:255*i,b:255*r}}(e.h,a,u),c=!0,h="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=b(s),{ok:c,format:e.format||h,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:s}}(e);this._originalInput=e,this._r=A.r,this._g=A.g,this._b=A.b,this._a=A.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||A.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=A.ok}function s(e,t,A){e=F(e,255),t=F(t,255),A=F(A,255);var n,i,r=Math.max(e,t,A),o=Math.min(e,t,A),s=(r+o)/2;if(r==o)n=i=0;else{var a=r-o;switch(i=s>.5?a/(2-r-o):a/(r+o),r){case e:n=(t-A)/a+(t<A?6:0);break;case t:n=(A-e)/a+2;break;case A:n=(e-t)/a+4}n/=6}return{h:n,s:i,l:s}}function a(e,t,A){e=F(e,255),t=F(t,255),A=F(A,255);var n,i,r=Math.max(e,t,A),o=Math.min(e,t,A),s=r,a=r-o;if(i=0===r?0:a/r,r==o)n=0;else{switch(r){case e:n=(t-A)/a+(t<A?6:0);break;case t:n=(A-e)/a+2;break;case A:n=(e-t)/a+4}n/=6}return{h:n,s:i,v:s}}function l(e,t,A,n){var i=[L(Math.round(e).toString(16)),L(Math.round(t).toString(16)),L(Math.round(A).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function u(e,t,A,n){return[L(I(n)),L(Math.round(e).toString(16)),L(Math.round(t).toString(16)),L(Math.round(A).toString(16))].join("")}function c(e,t){t=0===t?0:t||10;var A=o(e).toHsl();return A.s-=t/100,A.s=S(A.s),o(A)}function h(e,t){t=0===t?0:t||10;var A=o(e).toHsl();return A.s+=t/100,A.s=S(A.s),o(A)}function d(e){return o(e).desaturate(100)}function f(e,t){t=0===t?0:t||10;var A=o(e).toHsl();return A.l+=t/100,A.l=S(A.l),o(A)}function g(e,t){t=0===t?0:t||10;var A=o(e).toRgb();return A.r=Math.max(0,Math.min(255,A.r-Math.round(-t/100*255))),A.g=Math.max(0,Math.min(255,A.g-Math.round(-t/100*255))),A.b=Math.max(0,Math.min(255,A.b-Math.round(-t/100*255))),o(A)}function p(e,t){t=0===t?0:t||10;var A=o(e).toHsl();return A.l-=t/100,A.l=S(A.l),o(A)}function v(e,t){var A=o(e).toHsl(),n=(A.h+t)%360;return A.h=n<0?360+n:n,o(A)}function m(e){var t=o(e).toHsl();return t.h=(t.h+180)%360,o(t)}function C(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var A=o(e).toHsl(),n=[o(e)],i=360/t,r=1;r<t;r++)n.push(o({h:(A.h+r*i)%360,s:A.s,l:A.l}));return n}function w(e){var t=o(e).toHsl(),A=t.h;return[o(e),o({h:(A+72)%360,s:t.s,l:t.l}),o({h:(A+216)%360,s:t.s,l:t.l})]}function y(e,t,A){t=t||6,A=A||30;var n=o(e).toHsl(),i=360/A,r=[o(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,r.push(o(n));return r}function B(e,t){t=t||6;for(var A=o(e).toHsv(),n=A.h,i=A.s,r=A.v,s=[],a=1/t;t--;)s.push(o({h:n,s:i,v:r})),r=(r+a)%1;return s}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,A,n=this.toRgb();return t=n.g/255,A=n.b/255,.2126*((e=n.r/255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))},setAlpha:function(e){return this._a=b(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=a(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=a(this._r,this._g,this._b),t=Math.round(360*e.h),A=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+A+"%, "+n+"%)":"hsva("+t+", "+A+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=s(this._r,this._g,this._b),t=Math.round(360*e.h),A=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+A+"%, "+n+"%)":"hsla("+t+", "+A+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return l(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,A,n,i){var r=[L(Math.round(e).toString(16)),L(Math.round(t).toString(16)),L(Math.round(A).toString(16)),L(I(n))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)&&r[3].charAt(0)==r[3].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*F(this._r,255))+"%",g:Math.round(100*F(this._g,255))+"%",b:Math.round(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*F(this._r,255))+"%, "+Math.round(100*F(this._g,255))+"%, "+Math.round(100*F(this._b,255))+"%)":"rgba("+Math.round(100*F(this._r,255))+"%, "+Math.round(100*F(this._g,255))+"%, "+Math.round(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(x[l(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+u(this._r,this._g,this._b,this._a),A=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=o(e);A="#"+u(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+A+")"},toString:function(e){var t=!!e;e=e||this._format;var A=!1;return t||!(this._a<1&&this._a>=0)||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(A=this.toRgbString()),"prgb"===e&&(A=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(A=this.toHexString()),"hex3"===e&&(A=this.toHexString(!0)),"hex4"===e&&(A=this.toHex8String(!0)),"hex8"===e&&(A=this.toHex8String()),"name"===e&&(A=this.toName()),"hsl"===e&&(A=this.toHslString()),"hsv"===e&&(A=this.toHsvString()),A||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return o(this.toString())},_applyModification:function(e,t){var A=e.apply(null,[this].concat([].slice.call(t)));return this._r=A._r,this._g=A._g,this._b=A._b,this.setAlpha(A._a),this},lighten:function(){return this._applyModification(f,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(p,arguments)},desaturate:function(){return this._applyModification(c,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(d,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(C,[3])},tetrad:function(){return this._applyCombination(C,[4])}},o.fromRatio=function(e,t){if("object"==n(e)){var A={};for(var i in e)e.hasOwnProperty(i)&&(A[i]="a"===i?e[i]:Q(e[i]));e=A}return o(e,t)},o.equals=function(e,t){return!(!e||!t)&&o(e).toRgbString()==o(t).toRgbString()},o.random=function(){return o.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},o.mix=function(e,t,A){A=0===A?0:A||50;var n=o(e).toRgb(),i=o(t).toRgb(),r=A/100;return o({r:(i.r-n.r)*r+n.r,g:(i.g-n.g)*r+n.g,b:(i.b-n.b)*r+n.b,a:(i.a-n.a)*r+n.a})},o.readability=function(e,t){var A=o(e),n=o(t);return(Math.max(A.getLuminance(),n.getLuminance())+.05)/(Math.min(A.getLuminance(),n.getLuminance())+.05)},o.isReadable=function(e,t,A){var n,i,r,s,a,l=o.readability(e,t);switch(i=!1,(r=A,"AA"!==(s=((r=r||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==s&&(s="AA"),"small"!==(a=(r.size||"small").toLowerCase())&&"large"!==a&&(a="small"),n={level:s,size:a}).level+n.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},o.mostReadable=function(e,t,A){var n,i,r,s,a=null,l=0;i=(A=A||{}).includeFallbackColors,r=A.level,s=A.size;for(var u=0;u<t.length;u++)(n=o.readability(e,t[u]))>l&&(l=n,a=o(t[u]));return o.isReadable(e,a,{level:r,size:s})||!i?a:(A.includeFallbackColors=!1,o.mostReadable(e,["#fff","#000"],A))};var E=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",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:"f0f",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:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",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",rebeccapurple:"663399",red:"f00",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:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=o.hexNames=function(e){var t={};for(var A in e)e.hasOwnProperty(A)&&(t[e[A]]=A);return t}(E);function b(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var A=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),A&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function S(e){return Math.min(1,Math.max(0,e))}function T(e){return parseInt(e,16)}function L(e){return 1==e.length?"0"+e:""+e}function Q(e){return e<=1&&(e=100*e+"%"),e}function I(e){return Math.round(255*parseFloat(e)).toString(16)}function U(e){return T(e)/255}var O,H,M,_=(H="[\\s|\\(]+("+(O="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",M="[\\s|\\(]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",{CSS_UNIT:new RegExp(O),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function k(e){return!!_.CSS_UNIT.exec(e)}}}]);