@antv/infographic 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -7
- package/README.zh-CN.md +43 -7
- package/dist/infographic.min.js +111 -111
- package/dist/infographic.min.js.map +1 -1
- package/esm/designs/layouts/Align.js +6 -6
- package/esm/designs/layouts/Flex.js +8 -6
- package/esm/designs/structures/chart-wordcloud.js +1 -1
- package/esm/designs/structures/hierarchy-structure.d.ts +45 -0
- package/esm/designs/structures/hierarchy-structure.js +266 -0
- package/esm/designs/structures/index.d.ts +2 -0
- package/esm/designs/structures/index.js +2 -0
- package/esm/designs/structures/list-zigzag.d.ts +11 -0
- package/esm/designs/structures/list-zigzag.js +240 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/renderer/composites/icon.d.ts +2 -5
- package/esm/renderer/composites/icon.js +5 -10
- package/esm/renderer/composites/illus.d.ts +3 -2
- package/esm/renderer/composites/illus.js +6 -2
- package/esm/renderer/composites/index.d.ts +2 -2
- package/esm/renderer/composites/index.js +2 -2
- package/esm/renderer/palettes/registry.d.ts +1 -1
- package/esm/renderer/palettes/registry.js +1 -1
- package/esm/renderer/renderer.js +6 -3
- package/esm/resource/loader.d.ts +2 -1
- package/esm/resource/loader.js +55 -23
- package/esm/templates/built-in.js +4 -0
- package/esm/templates/hierarchy-structure.d.ts +2 -0
- package/esm/templates/hierarchy-structure.js +21 -0
- package/esm/templates/list-zigzag.d.ts +2 -0
- package/esm/templates/list-zigzag.js +68 -0
- package/lib/designs/layouts/Align.js +6 -6
- package/lib/designs/layouts/Flex.js +8 -6
- package/lib/designs/structures/chart-wordcloud.js +1 -1
- package/lib/designs/structures/hierarchy-structure.d.ts +45 -0
- package/lib/designs/structures/hierarchy-structure.js +270 -0
- package/lib/designs/structures/index.d.ts +2 -0
- package/lib/designs/structures/index.js +2 -0
- package/lib/designs/structures/list-zigzag.d.ts +11 -0
- package/lib/designs/structures/list-zigzag.js +246 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -2
- package/lib/renderer/composites/icon.d.ts +2 -5
- package/lib/renderer/composites/icon.js +5 -11
- package/lib/renderer/composites/illus.d.ts +3 -2
- package/lib/renderer/composites/illus.js +7 -2
- package/lib/renderer/composites/index.d.ts +2 -2
- package/lib/renderer/composites/index.js +2 -2
- package/lib/renderer/palettes/registry.d.ts +1 -1
- package/lib/renderer/palettes/registry.js +1 -1
- package/lib/renderer/renderer.js +5 -2
- package/lib/resource/loader.d.ts +2 -1
- package/lib/resource/loader.js +55 -23
- package/lib/templates/built-in.js +4 -0
- package/lib/templates/hierarchy-structure.d.ts +2 -0
- package/lib/templates/hierarchy-structure.js +24 -0
- package/lib/templates/list-zigzag.d.ts +2 -0
- package/lib/templates/list-zigzag.js +71 -0
- package/package.json +1 -1
- package/src/designs/layouts/Align.tsx +6 -6
- package/src/designs/layouts/Flex.tsx +8 -6
- package/src/designs/structures/chart-wordcloud.tsx +1 -1
- package/src/designs/structures/hierarchy-structure.tsx +658 -0
- package/src/designs/structures/index.ts +2 -0
- package/src/designs/structures/list-zigzag.tsx +492 -0
- package/src/index.ts +2 -0
- package/src/renderer/composites/icon.ts +6 -16
- package/src/renderer/composites/illus.ts +12 -2
- package/src/renderer/composites/index.ts +2 -2
- package/src/renderer/palettes/registry.ts +2 -2
- package/src/renderer/renderer.ts +5 -11
- package/src/resource/loader.ts +54 -20
- package/src/templates/built-in.ts +4 -0
- package/src/templates/hierarchy-structure.ts +23 -0
- package/src/templates/list-zigzag.ts +70 -0
package/dist/infographic.min.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
(function(F,ge){typeof exports=="object"&&typeof module!="undefined"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(F=typeof globalThis!="undefined"?globalThis:F||self,ge(F.AntVInfographic={}))})(this,(function(F){"use strict";var UN=Object.defineProperty,ZN=Object.defineProperties;var KN=Object.getOwnPropertyDescriptors;var Pv=Object.getOwnPropertySymbols;var QN=Object.prototype.hasOwnProperty,JN=Object.prototype.propertyIsEnumerable;var Xi=Math.pow,Ov=(F,ge,De)=>ge in F?UN(F,ge,{enumerable:!0,configurable:!0,writable:!0,value:De}):F[ge]=De,ve=(F,ge)=>{for(var De in ge||(ge={}))QN.call(ge,De)&&Ov(F,De,ge[De]);if(Pv)for(var De of Pv(ge))JN.call(ge,De)&&Ov(F,De,ge[De]);return F},Ae=(F,ge)=>ZN(F,KN(ge));const De={version:"0.2.2"},ma=new Map;function Rh(t,e){ma.set(t,e)}function Hh(t){return ma.get(t)}function Cv(){return Array.from(ma.keys())}var Mv=Object.defineProperty,Dh=Object.getOwnPropertySymbols,Sv=Object.prototype.hasOwnProperty,Ev=Object.prototype.propertyIsEnumerable,Nh=(t,e,n)=>e in t?Mv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jh=(t,e)=>{for(var n in e||(e={}))Sv.call(e,n)&&Nh(t,n,e[n]);if(Dh)for(var n of Dh(e))Ev.call(e,n)&&Nh(t,n,e[n]);return t};const Xr={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},Gr={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},Fh={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},Bh={type:"capsule-item"},Wh={type:"circular-progress"},Vh={type:"rounded-rect-node",positionH:"center"},Yh={type:"compact-card"},Iv=(t,e)=>jh(jh({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),Qe=(t,e,n,r)=>[t,{design:{structure:Iv(e,r),item:n}}],Tv=Object.fromEntries([Qe("hierarchy-mindmap-branch-gradient-lined-palette",Xr,Fh,"bottom"),Qe("hierarchy-mindmap-level-gradient-lined-palette",Gr,Fh,"bottom"),Qe("hierarchy-mindmap-branch-gradient-capsule-item",Xr,Bh),Qe("hierarchy-mindmap-level-gradient-capsule-item",Gr,Bh),Qe("hierarchy-mindmap-branch-gradient-circle-progress",Xr,Wh,.4),Qe("hierarchy-mindmap-level-gradient-circle-progress",Gr,Wh,.4),Qe("hierarchy-mindmap-branch-gradient-rounded-rect",Xr,Vh),Qe("hierarchy-mindmap-level-gradient-rounded-rect",Gr,Vh),Qe("hierarchy-mindmap-branch-gradient-compact-card",Xr,Yh),Qe("hierarchy-mindmap-level-gradient-compact-card",Gr,Yh)]);var Av=Object.defineProperty,Xh=Object.getOwnPropertySymbols,kv=Object.prototype.hasOwnProperty,zv=Object.prototype.propertyIsEnumerable,Gh=(t,e,n)=>e in t?Av(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qh=(t,e)=>{for(var n in e||(e={}))kv.call(e,n)&&Gh(t,n,e[n]);if(Xh)for(var n of Xh(e))zv.call(e,n)&&Gh(t,n,e[n]);return t};const Lv={"tech-style":{edgeType:"straight",edgeStyle:"solid",edgeColorMode:"gradient",edgeMarker:"arrow",markerSize:12,edgeCornerRadius:5},"dashed-line":{edgeStyle:"dashed",edgeCornerRadius:10,edgeDashPattern:"10,5",edgeColorMode:"gradient",edgeMarker:"dot",markerSize:6,edgeOffset:6},"distributed-origin":{edgeOrigin:"distributed",edgeOriginPadding:30,edgeMarker:"arrow",edgeCornerRadius:10,markerSize:12,edgeColorMode:"gradient"},"curved-line":{edgeType:"curved",edgeColorMode:"gradient",edgeMarker:"none"},"dashed-arrow":{edgeType:"straight",edgeStyle:"dashed",edgeDashPattern:"8,4",edgeMarker:"arrow",markerSize:10,edgeCornerRadius:0}},Rv=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],Uh={},Zh="hierarchy-tree",Hv=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],Dv=(t,e,n)=>t?`${Zh}-${t}-${e}-${n}`:`${Zh}-${e}-${n}`;for(const t of Rv)for(const[e,n]of Object.entries(Lv))for(const{key:r,orientation:i}of Hv){const o=Dv(r,e,t);Uh[o]={design:{structure:qh(qh({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const Nv={"sequence-stairs-front-pill-badge":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"pill-badge"}]}},"sequence-stairs-front-compact-card":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"compact-card"}]}},"sequence-stairs-front-simple":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"simple",usePaletteColor:!0}]}}},jv={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var Fv=Object.defineProperty,Kh=Object.getOwnPropertySymbols,Bv=Object.prototype.hasOwnProperty,Wv=Object.prototype.propertyIsEnumerable,Qh=(t,e,n)=>e in t?Fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gi=(t,e)=>{for(var n in e||(e={}))Bv.call(e,n)&&Qh(t,n,e[n]);if(Kh)for(var n of Kh(e))Wv.call(e,n)&&Qh(t,n,e[n]);return t};const Vv=Gi(Gi(Gi(Gi({"compare-hierarchy-left-right-circle-node-pill-badge":{design:{structure:{type:"compare-hierarchy-left-right",decoration:"split-line",surround:!1,groupGap:-20},title:"default",items:[{type:"circle-node",width:240},"pill-badge"]},themeConfig:{}},"compare-hierarchy-left-right-circle-node-plain-text":{design:{title:"default",structure:{type:"compare-hierarchy-left-right",decoration:"dot-line",flipLeaf:!0,groupGap:-10},items:[{type:"circle-node",width:180},{type:"plain-text"}]}},"list-pyramid-rounded-rect-node":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"rounded-rect-node"}]}},"list-pyramid-badge-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"badge-card"}]}},"list-pyramid-compact-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"compact-card"}]}},"list-column-done-list":{design:{title:"default",structure:{type:"list-column"},items:[{type:"done-list"}]}},"list-column-vertical-icon-arrow":{design:{title:"default",structure:{type:"list-column",gap:-5,zigzag:!0},items:[{type:"vertical-icon-arrow"}]}},"list-grid-badge-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"badge-card"}]}},"list-grid-candy-card-lite":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"candy-card-lite"}]}},"chart-column-simple":{design:{title:"default",structure:{type:"chart-column"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-grid-circular-progress":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"circular-progress"}]}},"list-grid-compact-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"compact-card"}]}},"list-grid-done-list":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"done-list"}]}},"list-grid-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-grid",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"list-grid-progress-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"progress-card"}]}},"list-grid-ribbon-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"ribbon-card"}]}},"list-grid-simple":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"simple"}]}},"list-row-circular-progress":{design:{title:"default",structure:{type:"list-row"},items:[{type:"circular-progress"}]}},"list-row-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"relation-circle-circular-progress":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"circular-progress"}]}},"relation-circle-icon-badge":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"icon-badge"}]}},"sequence-steps-badge-card":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"badge-card"}]}},"sequence-steps-simple":{design:{title:"default",structure:{type:"sequence-steps",gap:10},items:[{type:"simple"}]}},"sequence-timeline-done-list":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"done-list"}]}},"sequence-timeline-plain-text":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"plain-text"}]}},"sequence-timeline-rounded-rect-node":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"rounded-rect-node"}]}},"sequence-ascending-steps":{design:{title:"default",structure:{type:"sequence-ascending-steps",vGap:-46,hGap:-20},items:[{type:"l-corner-card"}]}},"sequence-timeline-simple":{design:{title:"default",structure:{type:"sequence-timeline",gap:20},items:[{type:"simple",positionV:"middle"}]}},"sequence-cylinders-3d-simple":{design:{title:"default",structure:{type:"sequence-cylinders-3d",gapY:20},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-column-simple-vertical-arrow":{design:{title:"default",structure:{type:"list-column",gap:0,zigzag:!0},items:[{type:"simple-vertical-arrow"}]}},"list-row-simple-horizontal-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"simple-horizontal-arrow"}]}},"compare-swot":{design:{title:"default",structure:{type:"compare-hierarchy-row",itemGap:32,itemPadding:40,showColumnBackground:!0,columnBackgroundAlpha:.08},items:[{type:"letter-card",showBottomShade:!1},{type:"plain-text",formatter:t=>`● ${t}`,usePaletteColor:!0}]}},"compare-hierarchy-row-letter-card-compact-card":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"compact-card"}]}},"compare-hierarchy-row-letter-card-rounded-rect-node":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"rounded-rect-node"}]}},"sequence-snake-steps-compact-card":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"compact-card"}]}},"sequence-snake-steps-pill-badge":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"pill-badge"}]}},"sequence-snake-steps-simple":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple"}]}},"sequence-color-snake-steps-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"horizontal-icon-line"}]}},"sequence-pyramid-simple":{design:{title:"default",structure:{type:"sequence-pyramid"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{colorPrimary:"#1677ff"}},"list-row-horizontal-icon-line":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-line"}]}},"list-sector-simple":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"simple"}]}},"list-sector-plain-text":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"plain-text"}]}},"list-sector-half-plain-text":{design:{title:"default",structure:{type:"list-sector",startAngle:-180,endAngle:0},items:[{type:"plain-text"}]}},"quadrant-quarter-simple-card":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-simple-card"}]}},"quadrant-quarter-circular":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-plain-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"plain-text"}]}},"sequence-roadmap-vertical-simple":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"simple",showIcon:!1}]}},"sequence-roadmap-vertical-badge-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"badge-card"}]}},"sequence-roadmap-vertical-pill-badge":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"pill-badge"}]}},"sequence-roadmap-vertical-quarter-circular":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-quarter-simple-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical",flipped:!0},items:[{type:"quarter-simple-card"}]}},"sequence-horizontal-zigzag-simple-illus":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-illus"}]}},"sequence-horizontal-zigzag-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"horizontal-icon-line"}]}},"sequence-horizontal-zigzag-plain-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"plain-text"}]}},"sequence-horizontal-zigzag-simple-horizontal-arrow":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-horizontal-arrow"}]}},"sequence-horizontal-zigzag-simple":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple"}]}},"list-row-simple-illus":{design:{title:"default",structure:{type:"list-row"},items:[{type:"simple-illus"}]}},"quadrant-simple-illus":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"simple-illus"}]}},"sequence-color-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"simple-illus"}]}},"sequence-timeline-simple-illus":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"simple-illus",usePaletteColor:!0}]}},"sequence-zigzag-steps-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-steps"},items:[{type:"underline-text"}]}},"sequence-horizontal-zigzag-underline-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"underline-text"}]}},"sequence-roadmap-vertical-underline-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"underline-text"}]}},"sequence-snake-steps-underline-text":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"underline-text"}]}},"sequence-circle-arrows-indexed-card":{design:{title:"default",structure:{type:"sequence-circle-arrows"},items:[{type:"indexed-card"}]}},"sequence-zigzag-pucks-3d-simple":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-zigzag-pucks-3d-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"underline-text"}]}},"sequence-zigzag-pucks-3d-indexed-card":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"indexed-card"}]}},"sequence-ascending-stairs-3d-simple":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-ascending-stairs-3d-underline-text":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"underline-text"}]}},"sequence-circular-underline-text":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"underline-text"}]}},"sequence-circular-simple":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-filter-mesh-underline-text":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"underline-text"}]}},"sequence-filter-mesh-simple":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-mountain-underline-text":{design:{title:"default",structure:{type:"sequence-mountain"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-simple-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"compact-card"}]}},"chart-bar-plain-text":{design:{title:"default",structure:{type:"chart-bar"},items:[{type:"plain-text",positionH:"flipped"}]}},"chart-line-plain-text":{design:{title:"default",structure:{type:"chart-line"},items:[{type:"plain-text",lineNumber:2}]}},"chart-pie-plain-text":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"plain-text"}]}},"chart-pie-compact-card":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"compact-card"}]}},"chart-pie-pill-badge":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"pill-badge"}]}},"chart-pie-donut-plain-text":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"plain-text"}]}},"chart-pie-donut-compact-card":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"compact-card"}]}},"chart-pie-donut-pill-badge":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"pill-badge"}]}}},Uh),Tv),Nv),jv);Object.entries(Vv).forEach(([t,e])=>{Rh(t,e)});const Rt=Symbol.for("@antv/infographic/Fragment");function d(t,e={}){return{type:t,props:e}}const E=d,ya="infographic-component";var kt=(t=>(t.Background="background",t.Title="title",t.Desc="desc",t.ItemsGroup="items-group",t.ItemIconGroup="item-icon-group",t.ItemIcon="item-icon",t.ItemLabel="item-label",t.ItemDesc="item-desc",t.ItemValue="item-value",t.ItemIllus="item-illus",t.BtnAdd="btn-add",t.BtnRemove="btn-remove",t.IllusGroup="illus-group",t.IllusVolume="illus-volume",t.Illus="illus",t.BtnsGroup="btns-group",t.Unknown="unknown",t))(kt||{});const Yv="https://www.weavefox.cn/api/open/v1/icon",va=Symbol.for("@antv/infographic/Defs");function zt(t){return{type:va,props:t}}function Lt(t){var e,n,r,i;const{x:o=0,y:s=0,width:a=0,height:l=0}=t;return(e=t.cx)!=null||(t.cx=o+a/2),(n=t.cy)!=null||(t.cy=s+l/2),(r=t.rx)!=null||(t.rx=a/2),(i=t.ry)!=null||(t.ry=l/2),{type:"ellipse",props:t}}function Y(t){const{x:e=0,y:n=0}=t;return(e||n)&&(t.transform||(t.transform=`translate(${e}, ${n})`)),{type:"g",props:t}}var Xv=Object.defineProperty,Jh=Object.getOwnPropertySymbols,Gv=Object.prototype.hasOwnProperty,qv=Object.prototype.propertyIsEnumerable,td=(t,e,n)=>e in t?Xv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uv=(t,e)=>{for(var n in e||(e={}))Gv.call(e,n)&&td(t,n,e[n]);if(Jh)for(var n of Jh(e))qv.call(e,n)&&td(t,n,e[n]);return t};function ht(t){const{x:e,y:n}=t,r=Uv({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var Zv=Object.defineProperty,Kv=Object.defineProperties,Qv=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable,rd=(t,e,n)=>e in t?Zv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jv=(t,e)=>{for(var n in e||(e={}))ed.call(e,n)&&rd(t,n,e[n]);if(qi)for(var n of qi(e))nd.call(e,n)&&rd(t,n,e[n]);return t},tb=(t,e)=>Kv(t,Qv(e)),eb=(t,e)=>{var n={};for(var r in t)ed.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qi)for(var r of qi(t))e.indexOf(r)<0&&nd.call(t,r)&&(n[r]=t[r]);return n};function Ne(t){var e=t,{points:n=[]}=e,r=eb(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=tb(Jv({},r),{points:s});return(i!==void 0||o!==void 0)&&(a.transform=`translate(${i!=null?i:0}, ${o!=null?o:0})`+(a.transform||"")),{type:"polygon",props:a}}function St(t){return{type:"rect",props:t}}function id(t){return Object.keys(t[0]).reduce((e,n)=>{const r=n;return t.every(i=>i[r]===t[0][r])&&(e[r]=t[0][r]),e},{})}const od=(t,e)=>{if(typeof t=="number"){if(e===3)return{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|t&240)/255,b:(t&15|t<<4&240)/255};if(e===4)return{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|t&240)/255,alpha:(t&15|t<<4&240)/255};if(e===6)return{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(t&255)/255};if(e===8)return{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(t&255)/255}}},nb={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},rb=t=>od(nb[t.toLowerCase()],6),ib=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,ob=t=>{let e;return(e=t.match(ib))?od(parseInt(e[1],16),e[1].length):void 0},Pn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",qr=`${Pn}%`,ba=`(?:${Pn}%|${Pn})`,sb=`(?:${Pn}(deg|grad|rad|turn)|${Pn})`,br="\\s*,\\s*",ab=new RegExp(`^rgba?\\(\\s*${Pn}${br}${Pn}${br}${Pn}\\s*(?:,\\s*${ba}\\s*)?\\)$`),lb=new RegExp(`^rgba?\\(\\s*${qr}${br}${qr}${br}${qr}\\s*(?:,\\s*${ba}\\s*)?\\)$`),cb=t=>{let e={mode:"rgb"},n;if(n=t.match(ab))n[1]!==void 0&&(e.r=n[1]/255),n[2]!==void 0&&(e.g=n[2]/255),n[3]!==void 0&&(e.b=n[3]/255);else if(n=t.match(lb))n[1]!==void 0&&(e.r=n[1]/100),n[2]!==void 0&&(e.g=n[2]/100),n[3]!==void 0&&(e.b=n[3]/100);else return;return n[4]!==void 0?e.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+n[5]))),e},hb=(t,e)=>t===void 0?void 0:typeof t!="object"?tn(t):t.mode!==void 0?t:e?Ae(ve({},t),{mode:e}):void 0,xa=(t="rgb")=>e=>(e=hb(e,t))!==void 0?e.mode===t?e:Je[e.mode][t]?Je[e.mode][t](e):t==="rgb"?Je[e.mode].rgb(e):Je.rgb[t](Je[e.mode].rgb(e)):void 0,Je={},sd={},Ui=[],ad={},db=t=>t,Ht=t=>(Je[t.mode]=ve(ve({},Je[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{Je[e]||(Je[e]={}),Je[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(t.ranges[e]===void 0&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof t.interpolate[e]=="function"&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=db)}),sd[t.mode]=t,(t.parse||[]).forEach(e=>{fb(e,t.mode)}),xa(t.mode)),ub=t=>sd[t],fb=(t,e)=>{if(typeof t=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");ad[t]=e}else typeof t=="function"&&Ui.indexOf(t)<0&&Ui.push(t)},wa=/[^\x00-\x7F]|[a-zA-Z_]/,pb=/[^\x00-\x7F]|[-\w]/,J={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let xt=0;function Zi(t){let e=t[xt],n=t[xt+1];return e==="-"||e==="+"?/\d/.test(n)||n==="."&&/\d/.test(t[xt+2]):e==="."?/\d/.test(n):/\d/.test(e)}function _a(t){if(xt>=t.length)return!1;let e=t[xt];if(wa.test(e))return!0;if(e==="-"){if(t.length-xt<2)return!1;let n=t[xt+1];return!!(n==="-"||wa.test(n))}return!1}const gb={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Ur(t){let e="";if((t[xt]==="-"||t[xt]==="+")&&(e+=t[xt++]),e+=Ki(t),t[xt]==="."&&/\d/.test(t[xt+1])&&(e+=t[xt++]+Ki(t)),(t[xt]==="e"||t[xt]==="E")&&((t[xt+1]==="-"||t[xt+1]==="+")&&/\d/.test(t[xt+2])?e+=t[xt++]+t[xt++]+Ki(t):/\d/.test(t[xt+1])&&(e+=t[xt++]+Ki(t))),_a(t)){let n=Qi(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:J.Hue,value:e*gb[n]}:void 0}return t[xt]==="%"?(xt++,{type:J.Percentage,value:+e}):{type:J.Number,value:+e}}function Ki(t){let e="";for(;/\d/.test(t[xt]);)e+=t[xt++];return e}function Qi(t){let e="";for(;xt<t.length&&pb.test(t[xt]);)e+=t[xt++];return e}function mb(t){let e=Qi(t);return t[xt]==="("?(xt++,{type:J.Function,value:e}):e==="none"?{type:J.None,value:void 0}:{type:J.Ident,value:e}}function yb(t=""){let e=t.trim(),n=[],r;for(xt=0;xt<e.length;){if(r=e[xt++],r===`
|
|
2
|
-
`||r===" "||r===" "){for(;
|
|
3
|
-
`||e[
|
|
4
|
-
`||e[xt]===" "||e[xt]===" ");)xt++;let i;if(Zi(e)&&(i=Ur(e),i.type!==J.Hue)){n.push({type:J.Alpha,value:i});continue}if(_a(e)&&Qi(e)==="none"){n.push({type:J.Alpha,value:{type:J.None,value:void 0}});continue}return}if(/\d/.test(r)){xt--,n.push(Ur(e));continue}if(wa.test(r)){xt--,n.push(mb(e));continue}return}return n}function vb(t){t._i=0;let e=t[t._i++];if(!e||e.type!==J.Function||e.value!=="color"||(e=t[t._i++],e.type!==J.Ident))return;const n=ad[e.value];if(!n)return;const r={mode:n},i=ld(t,!1);if(!i)return;const o=ub(n).channels;for(let s=0,a,l;s<o.length;s++)a=i[s],l=o[s],a.type!==J.None&&(r[l]=a.type===J.Number?a.value:a.value/100,l==="alpha"&&(r[l]=Math.max(0,Math.min(1,r[l]))));return r}function ld(t,e){const n=[];let r;for(;t._i<t.length;){if(r=t[t._i++],r.type===J.None||r.type===J.Number||r.type===J.Alpha||r.type===J.Percentage||e&&r.type===J.Hue){n.push(r);continue}if(r.type===J.ParenClose){if(t._i<t.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==J.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:J.None,value:void 0}),n.every(i=>i.type!==J.Alpha)?n:void 0}}function bb(t,e){t._i=0;let n=t[t._i++];if(!n||n.type!==J.Function)return;let r=ld(t,e);if(r)return r.unshift(n.value),r}const tn=t=>{if(typeof t!="string")return;const e=yb(t),n=e?bb(e,!0):void 0;let r,i=0,o=Ui.length;for(;i<o;)if((r=Ui[i++](t,n))!==void 0)return r;return e?vb(e):void 0};function xb(t,e){if(!e||e[0]!=="rgb"&&e[0]!=="rgba")return;const n={mode:"rgb"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.r=r.type===J.Number?r.value/255:r.value/100),i.type!==J.None&&(n.g=i.type===J.Number?i.value/255:i.value/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value/255:o.value/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const wb=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,_b=(t,e,n)=>t+n*(e-t),$b=t=>{let e=[];for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];r===void 0&&i===void 0?e.push(void 0):r!==void 0&&i!==void 0?e.push([r,i]):e.push(r!==void 0?[r,r]:[i,i])}return e},it=(t=>e=>{let n=$b(e);return r=>{let i=r*n.length,o=r>=1?n.length-1:Math.max(Math.floor(i),0),s=n[o];return s===void 0?void 0:t(s[0],s[1],i-o)}})(_b),ce=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},xr={mode:"rgb",channels:["r","g","b","alpha"],parse:[xb,ob,cb,rb,wb,"srgb"],serialize:"srgb",interpolate:{r:it,g:it,b:it,alpha:{use:it,fixup:ce}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},$a=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),cd=t=>{let e=$a(t.r),n=$a(t.g),r=$a(t.b),i={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Pa=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),hd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"a98",r:Pa(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:Pa(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:Pa(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Oa=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},wr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Oa(t),g:Oa(e),b:Oa(n)};return r!==void 0&&(i.alpha=r),i},jn=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz65",x:.4123907992659593*e+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*e+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*e+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(o.alpha=i),o},Ca=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):t*12.92},_r=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Ca(t),g:Ca(e),b:Ca(n)};return r!==void 0&&(o.alpha=r),o},Fn=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*3.2409699419045226-e*1.537383177570094-.4986107602930034*n,g:t*-.9692436362808796+e*1.8759675015077204+.0415550574071756*n,b:t*.0556300796969936-e*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},Pb=Ae(ve({},xr),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>hd(jn(t)),xyz65:hd},toMode:{rgb:t=>Fn(cd(t)),xyz65:cd}}),me=t=>(t=t%360)<0?t+360:t,Ob=(t,e)=>t.map((n,r,i)=>{if(n===void 0)return n;let o=me(n);return r===0||t[r-1]===void 0?o:e(o-me(i[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),fn=t=>Ob(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),de=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Cb=Math.PI/180,Mb=180/Math.PI;let dd=de[3]*de[4],ud=de[1]*de[4],fd=de[1]*de[2]-de[0]*de[3];const Sb=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(fd*n+t*dd-e*ud)/(fd+dd-ud),o=n-i,s=(de[4]*(e-i)-de[2]*o)/de[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(o*o+s*s)/(de[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(s,o)*Mb-120),r!==void 0&&(a.alpha=r),a},Eb=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*Cb,n===void 0&&(n=0);let o=e===void 0?0:e*n*(1-n),s=Math.cos(t),a=Math.sin(t);return i.r=n+o*(de[0]*s+de[1]*a),i.g=n+o*(de[2]*s+de[3]*a),i.b=n+o*(de[4]*s+de[5]*a),r!==void 0&&(i.alpha=r),i},Ji=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.s||!e.s)return 0;let n=me(t.h),r=me(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*i},Ib=(t,e)=>{if(t.h===void 0||e.h===void 0)return 0;let n=me(t.h),r=me(e.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},to=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.c||!e.c)return 0;let n=me(t.h),r=me(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*i},pn=t=>{let e=t.reduce((r,i)=>{if(i!==void 0){let o=i*Math.PI/180;r.sin+=Math.sin(o),r.cos+=Math.cos(o)}return r},{sin:0,cos:0}),n=Math.atan2(e.sin,e.cos)*180/Math.PI;return n<0?360+n:n},Tb={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Sb},toMode:{rgb:Eb},interpolate:{h:{use:it,fixup:fn},s:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}},On=({l:t,a:e,b:n,alpha:r},i="lch")=>{e===void 0&&(e=0),n===void 0&&(n=0);let o=Math.sqrt(e*e+n*n),s={mode:i,l:t,c:o};return o&&(s.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},Cn=({l:t,c:e,h:n,alpha:r},i="lab")=>{n===void 0&&(n=0);let o={mode:i,l:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},pd=Math.pow(29,3)/Math.pow(3,3),gd=Math.pow(6,3)/Math.pow(29,3),se={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},$r={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Ma=t=>Math.pow(t,3)>gd?Math.pow(t,3):(116*t-16)/pd;const md=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz65",x:Ma(o)*$r.X,y:Ma(i)*$r.Y,z:Ma(s)*$r.Z};return r!==void 0&&(a.alpha=r),a},eo=t=>Fn(md(t)),Sa=t=>t>gd?Math.cbrt(t):(pd*t+16)/116,yd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Sa(t/$r.X),o=Sa(e/$r.Y),s=Sa(n/$r.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},no=t=>{let e=yd(jn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},ro=1,vd=1,Zr=26/180*Math.PI,io=Math.cos(Zr),oo=Math.sin(Zr),bd=100/Math.log(139/100),Ea=({l:t,c:e,h:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"lab65",l:(Math.exp(t*ro/bd)-1)/.0039},o=(Math.exp(.0435*e*vd*ro)-1)/.075,s=o*Math.cos(n/180*Math.PI-Zr),a=o*Math.sin(n/180*Math.PI-Zr);return i.a=s*io-a/.83*oo,i.b=s*oo+a/.83*io,r!==void 0&&(i.alpha=r),i},Ia=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=e*io+n*oo,o=.83*(n*io-e*oo),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:bd/ro*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*vd*ro)};return a.c&&(a.h=me((Math.atan2(o,i)+Zr)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},xd=t=>Ea(On(t,"dlch")),wd=t=>Cn(Ia(t),"dlab"),Ab={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:xd,rgb:t=>eo(xd(t))},fromMode:{lab65:wd,rgb:t=>wd(no(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:it,a:it,b:it,alpha:{use:it,fixup:ce}}},kb={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ea,dlab:t=>Cn(t,"dlab"),rgb:t=>eo(Ea(t))},fromMode:{lab65:Ia,dlab:t=>On(t,"dlch"),rgb:t=>Ia(no(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:it,c:it,h:{use:it,fixup:fn},alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}};function zb({h:t,s:e,i:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1-e)};break;case 1:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1+e*(3/(2-i)-1)),b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n*(1+e*(3/(2-i)-1)),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;case 3:o={r:n*(1-e),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1+e*(3/(2-i)-1))};break;case 4:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3/(2-i)-1))};break;case 5:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Lb({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsi",s:t+e+n===0?0:1-3*o/(t+e+n),i:(t+e+n)/3};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Rb={mode:"hsi",toMode:{rgb:zb},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Lb},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:it,fixup:fn},s:it,i:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}};function Hb({h:t,s:e,l:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=n+e*(n<.5?n:1-n),o=i-(i-n)*2*Math.abs(t/60%2-1),s;switch(Math.floor(t/60)){case 0:s={r:i,g:o,b:2*n-i};break;case 1:s={r:o,g:i,b:2*n-i};break;case 2:s={r:2*n-i,g:i,b:o};break;case 3:s={r:2*n-i,g:o,b:i};break;case 4:s={r:o,g:2*n-i,b:i};break;case 5:s={r:i,g:2*n-i,b:o};break;default:s={r:2*n-i,g:2*n-i,b:2*n-i}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function Db({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsl",s:i===o?0:(i-o)/(1-Math.abs(i+o-1)),l:.5*(i+o)};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Nb=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return t*360}},jb=new RegExp(`^hsla?\\(\\s*${sb}${br}${qr}${br}${qr}\\s*(?:,\\s*${ba}\\s*)?\\)$`),Fb=t=>{let e=t.match(jb);if(!e)return;let n={mode:"hsl"};return e[3]!==void 0?n.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(n.h=Nb(e[1],e[2])),e[4]!==void 0&&(n.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(n.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?n.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+e[7]))),n};function Bb(t,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const n={mode:"hsl"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Percentage)return;n.h=r.value}if(i.type!==J.None){if(i.type===J.Hue)return;n.s=i.value/100}if(o.type!==J.None){if(o.type===J.Hue)return;n.l=o.value/100}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const _d={mode:"hsl",toMode:{rgb:Hb},fromMode:{rgb:Db},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Bb,Fb],serialize:t=>`hsl(${t.h!==void 0?t.h:"none"} ${t.s!==void 0?t.s*100+"%":"none"} ${t.l!==void 0?t.l*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:it,fixup:fn},s:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}};function $d({h:t,s:e,v:n,alpha:r}){t=me(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n,g:n*(1-e*i),b:n*(1-e)};break;case 1:o={r:n*(1-e*i),g:n,b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n,b:n*(1-e*i)};break;case 3:o={r:n*(1-e),g:n*(1-e*i),b:n};break;case 4:o={r:n*(1-e*i),g:n*(1-e),b:n};break;case 5:o={r:n,g:n*(1-e),b:n*(1-e*i)};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Pd({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsv",s:i===0?0:1-o/i,v:i};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const Od={mode:"hsv",toMode:{rgb:$d},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Pd},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:it,fixup:fn},s:it,v:it,alpha:{use:it,fixup:ce}},difference:{h:Ji},average:{h:pn}};function Wb({h:t,w:e,b:n,alpha:r}){if(e===void 0&&(e=0),n===void 0&&(n=0),e+n>1){let i=e+n;e/=i,n/=i}return $d({h:t,s:n===1?1:1-e/(1-n),v:1-n,alpha:r})}function Vb(t){let e=Pd(t);if(e===void 0)return;let n=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,i={mode:"hwb",w:(1-n)*r,b:1-r};return e.h!==void 0&&(i.h=e.h),e.alpha!==void 0&&(i.alpha=e.alpha),i}function Yb(t,e){if(!e||e[0]!=="hwb")return;const n={mode:"hwb"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Percentage)return;n.h=r.value}if(i.type!==J.None){if(i.type===J.Hue)return;n.w=i.value/100}if(o.type!==J.None){if(o.type===J.Hue)return;n.b=o.value/100}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Xb={mode:"hwb",toMode:{rgb:Wb},fromMode:{rgb:Vb},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Yb],serialize:t=>`hwb(${t.h!==void 0?t.h:"none"} ${t.w!==void 0?t.w*100+"%":"none"} ${t.b!==void 0?t.b*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:it,fixup:fn},w:it,b:it,alpha:{use:it,fixup:ce}},difference:{h:Ib},average:{h:pn}},Cd=203,so=.1593017578125,Md=78.84375,ao=.8359375,lo=18.8515625,co=18.6875;function Ta(t){if(t<0)return 0;const e=Math.pow(t,1/Md);return 1e4*Math.pow(Math.max(0,e-ao)/(lo-co*e),1/so)}function Aa(t){if(t<0)return 0;const e=Math.pow(t/1e4,so);return Math.pow((ao+lo*e)/(1+co*e),Md)}const ka=t=>Math.max(t/Cd,0),Sd=({i:t,t:e,p:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=Ta(t+.008609037037932761*e+.11102962500302593*n),o=Ta(t-.00860903703793275*e-.11102962500302599*n),s=Ta(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:ka(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:ka(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:ka(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},za=(t=0)=>Math.max(t*Cd,0),Ed=({x:t,y:e,z:n,alpha:r})=>{const i=za(t),o=za(e),s=za(n),a=Aa(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Aa(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Aa(.0070797844607477*i+.0748396662186366*o+.8433265453898765*s),h=.5*a+.5*l,u=1.61376953125*a-3.323486328125*l+1.709716796875*c,f=4.378173828125*a-4.24560546875*l-.132568359375*c,p={mode:"itp",i:h,t:u,p:f};return r!==void 0&&(p.alpha=r),p},Gb={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Sd,rgb:t=>Fn(Sd(t))},fromMode:{xyz65:Ed,rgb:t=>Ed(jn(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:it,t:it,p:it,alpha:{use:it,fixup:ce}}},qb=134.03437499999998,Ub=16295499532821565e-27,La=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,so);return Math.pow((ao+lo*e)/(1+co*e),qb)},Ra=(t=0)=>Math.max(t*203,0),Id=({x:t,y:e,z:n,alpha:r})=>{t=Ra(t),e=Ra(e),n=Ra(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=La(.41478972*i+.579999*o+.014648*n),a=La(-.20151*i+1.120649*o+.0531008*n),l=La(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-Ub,a:3.524*s-4.066708*a+.542708*l,b:.199076*s+1.096799*a-1.295875*l};return r!==void 0&&(h.alpha=r),h},Zb=134.03437499999998,Td=16295499532821565e-27,Ha=t=>{if(t<0)return 0;let e=Math.pow(t,1/Zb);return 1e4*Math.pow((ao-e)/(co*e-lo),1/so)},Da=t=>t/203,Ad=({j:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+Td)/(.44+.56*(t+Td)),o=Ha(i+.13860504*e+.058047316*n),s=Ha(i-.13860504*e-.058047316*n),a=Ha(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Da(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Da(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Da(-.090982811*o-.31272829*s+1.5227666*a)};return r!==void 0&&(l.alpha=r),l},kd=t=>{let e=Id(jn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},zd=t=>Fn(Ad(t)),Kb={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:kd,xyz65:Id},toMode:{rgb:zd,xyz65:Ad},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:it,a:it,b:it,alpha:{use:it,fixup:ce}}},Ld=({j:t,a:e,b:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"jch",j:t,c:i};return i&&(o.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},Rd=({j:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"jab",j:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Qb={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Rd,rgb:t=>zd(Rd(t))},fromMode:{rgb:t=>Ld(kd(t)),jab:Ld},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:it,fixup:fn},c:it,j:it,alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}},ho=Math.pow(29,3)/Math.pow(3,3),Na=Math.pow(6,3)/Math.pow(29,3);let ja=t=>Math.pow(t,3)>Na?Math.pow(t,3):(116*t-16)/ho;const Fa=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz50",x:ja(o)*se.X,y:ja(i)*se.Y,z:ja(s)*se.Z};return r!==void 0&&(a.alpha=r),a},Kr=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*3.1341359569958707-e*1.6173863321612538-.4906619460083532*n,g:t*-.978795502912089+e*1.916254567259524+.03344273116131949*n,b:t*.07195537988411677-e*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},Hd=t=>Kr(Fa(t)),Qr=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz50",x:.436065742824811*e+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*e+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*e+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(o.alpha=i),o},Ba=t=>t>Na?Math.cbrt(t):(ho*t+16)/116,Wa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Ba(t/se.X),o=Ba(e/se.Y),s=Ba(n/se.Z),a={mode:"lab",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},Dd=t=>{let e=Wa(Qr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function Jb(t,e){if(!e||e[0]!=="lab")return;const n={mode:"lab"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==J.None&&(n.a=i.type===J.Number?i.value:i.value*125/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value:o.value*125/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Va={mode:"lab",toMode:{xyz50:Fa,rgb:Hd},fromMode:{xyz50:Wa,rgb:Dd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Jb],serialize:t=>`lab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:it,a:it,b:it,alpha:{use:it,fixup:ce}}},tx=Ae(ve({},Va),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:md,rgb:eo},fromMode:{xyz65:yd,rgb:no},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function ex(t,e){if(!e||e[0]!=="lch")return;const n={mode:"lch"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==J.None&&(n.c=Math.max(0,i.type===J.Number?i.value:i.value*150/100)),o.type!==J.None){if(o.type===J.Percentage)return;n.h=o.value}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Ya={mode:"lch",toMode:{lab:Cn,rgb:t=>Hd(Cn(t))},fromMode:{rgb:t=>On(Dd(t)),lab:On},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[ex],serialize:t=>`lch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:it,fixup:fn},c:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}},nx=Ae(ve({},Ya),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>Cn(t,"lab65"),rgb:t=>eo(Cn(t,"lab65"))},fromMode:{rgb:t=>On(no(t),"lch65"),lab65:t=>On(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Nd=({l:t,u:e,v:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"lchuv",l:t,c:i};return i&&(o.h=me(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},jd=({l:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"luv",l:t,u:e?e*Math.cos(n/180*Math.PI):0,v:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Fd=(t,e,n)=>4*t/(t+15*e+3*n),Bd=(t,e,n)=>9*e/(t+15*e+3*n),rx=Fd(se.X,se.Y,se.Z),ix=Bd(se.X,se.Y,se.Z),ox=t=>t<=Na?ho*t:116*Math.cbrt(t)-16,Xa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=ox(e/se.Y),o=Fd(t,e,n),s=Bd(t,e,n);!isFinite(o)||!isFinite(s)?i=o=s=0:(o=13*i*(o-rx),s=13*i*(s-ix));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},sx=(t,e,n)=>4*t/(t+15*e+3*n),ax=(t,e,n)=>9*e/(t+15*e+3*n),lx=sx(se.X,se.Y,se.Z),cx=ax(se.X,se.Y,se.Z),Ga=({l:t,u:e,v:n,alpha:r})=>{if(t===void 0&&(t=0),t===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),n===void 0&&(n=0);let i=e/(13*t)+lx,o=n/(13*t)+cx,s=se.Y*(t<=8?t/ho:Math.pow((t+16)/116,3)),a=s*(9*i)/(4*o),l=s*(12-3*i-20*o)/(4*o),c={mode:"xyz50",x:a,y:s,z:l};return r!==void 0&&(c.alpha=r),c},hx={mode:"lchuv",toMode:{luv:jd,rgb:t=>Kr(Ga(jd(t)))},fromMode:{rgb:t=>Nd(Xa(Qr(t))),luv:Nd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:it,fixup:fn},c:it,l:it,alpha:{use:it,fixup:ce}},difference:{h:to},average:{h:pn}},dx=Ae(ve({},xr),{mode:"lrgb",toMode:{rgb:_r},fromMode:{rgb:wr},parse:["srgb-linear"],serialize:"srgb-linear"}),ux={mode:"luv",toMode:{xyz50:Ga,rgb:t=>Kr(Ga(t))},fromMode:{xyz50:Xa,rgb:t=>Xa(Qr(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:it,u:it,v:it,alpha:{use:it,fixup:ce}}},Wd=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*n),o=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*n),s=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*n),a={mode:"oklab",l:.210454268309314*i+.7936177747023054*o-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*o+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*o-.8086757549230774*s};return r!==void 0&&(a.alpha=r),a},uo=t=>{let e=Wd(wr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Jr=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.pow(t+.3963377773761749*e+.2158037573099136*n,3),o=Math.pow(t-.1055613458156586*e-.0638541728258133*n,3),s=Math.pow(t-.0894841775298119*e-1.2914855480194092*n,3),a={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*o+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*o-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*o+1.7076146940746117*s};return r!==void 0&&(a.alpha=r),a},fo=t=>_r(Jr(t));function qa(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function po(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function fx(t,e){let n,r,i,o,s,a,l,c;-1.88170328*t-.80936493*e>1?(n=1.19086277,r=1.76576728,i=.59662641,o=.75515197,s=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,r=-.45954404,i=.08285427,o=.1254107,s=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,o=-.50559606,s=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let h=n+r*t+i*e+o*t*t+s*t*e,u=.3963377774*t+.2158037573*e,f=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let g=1+h*u,y=1+h*f,m=1+h*p,b=g*g*g,v=y*y*y,x=m*m*m,w=3*u*g*g,_=3*f*y*y,$=3*p*m*m,P=6*u*u*g,O=6*f*f*y,T=6*p*p*m,I=a*b+l*v+c*x,S=a*w+l*_+c*$,H=a*P+l*O+c*T;h=h-I*S/(S*S-.5*I*H)}return h}function Ua(t,e){let n=fx(t,e),r=Jr({l:1,a:n*t,b:n*e}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),o=i*n;return[i,o]}function px(t,e,n,r,i,o=null){o||(o=Ua(t,e));let s;if((n-i)*o[1]-(o[0]-i)*r<=0)s=o[1]*i/(r*o[0]+o[1]*(i-n));else{s=o[1]*(i-1)/(r*(o[0]-1)+o[1]*(i-n));{let a=n-i,l=r,c=.3963377774*t+.2158037573*e,h=-.1055613458*t-.0638541728*e,u=-.0894841775*t-1.291485548*e,f=a+l*c,p=a+l*h,g=a+l*u;{let y=i*(1-s)+s*n,m=s*r,b=y+m*c,v=y+m*h,x=y+m*u,w=b*b*b,_=v*v*v,$=x*x*x,P=3*f*b*b,O=3*p*v*v,T=3*g*x*x,I=6*f*f*b,S=6*p*p*v,H=6*g*g*x,C=4.0767416621*w-3.3077115913*_+.2309699292*$-1,A=4.0767416621*P-3.3077115913*O+.2309699292*T,B=4.0767416621*I-3.3077115913*S+.2309699292*H,k=A/(A*A-.5*C*B),D=-C*k,z=-1.2684380046*w+2.6097574011*_-.3413193965*$-1,N=-1.2684380046*P+2.6097574011*O-.3413193965*T,j=-1.2684380046*I+2.6097574011*S-.3413193965*H,X=N/(N*N-.5*z*j),L=-z*X,M=-.0041960863*w-.7034186147*_+1.707614701*$-1,R=-.0041960863*P-.7034186147*O+1.707614701*T,W=-.0041960863*I-.7034186147*S+1.707614701*H,U=R/(R*R-.5*M*W),V=-M*U;D=k>=0?D:1e6,L=X>=0?L:1e6,V=U>=0?V:1e6,s+=Math.min(D,Math.min(L,V))}}}return s}function Za(t,e,n=null){n||(n=Ua(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function Vd(t,e,n){let r=Ua(e,n),i=px(e,n,t,1,t,r),o=Za(e,n,r),s=.11516993+1/(7.4477897+4.1590124*n+e*(-2.19557347+1.75198401*n+e*(-2.13704948-10.02301043*n+e*(-4.24894561+5.38770819*n+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(-.27087943+.6122399*n+e*(.00299215-.45399568*n-.14661872*e)))),l=i/Math.min(t*o[0],(1-t)*o[1]),c=t*s,h=(1-t)*a,u=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(h*h*h*h))));return c=t*.4,h=(1-t)*.8,[Math.sqrt(1/(1/(c*c)+1/(h*h))),u,i]}function Yd(t){const e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i={mode:"okhsl",l:qa(e)};t.alpha!==void 0&&(i.alpha=t.alpha);let o=Math.sqrt(n*n+r*r);if(!o)return i.s=0,i;let[s,a,l]=Vd(e,n/o,r/o),c;if(o<a){let h=0,u=.8*s,f=1-u/a;c=(o-h)/(u+f*(o-h))*.8}else{let h=a,u=.2*a*a*1.25*1.25/s,f=1-u/(l-a);c=.8+.2*((o-h)/(u+f*(o-h)))}return c&&(i.s=c,i.h=me(Math.atan2(r,n)*180/Math.PI)),i}function Xd(t){let e=t.h!==void 0?t.h:0,n=t.s!==void 0?t.s:0,r=t.l!==void 0?t.l:0;const i={mode:"oklab",l:po(r)};if(t.alpha!==void 0&&(i.alpha=t.alpha),!n||r===1)return i.a=i.b=0,i;let o=Math.cos(e/180*Math.PI),s=Math.sin(e/180*Math.PI),[a,l,c]=Vd(i.l,o,s),h,u,f,p;n<.8?(h=1.25*n,u=0,f=.8*a,p=1-f/l):(h=5*(n-.8),u=l,f=.2*l*l*1.25*1.25/a,p=1-f/(c-l));let g=u+h*f/(1-p*h);return i.a=g*o,i.b=g*s,i}const gx=Ae(ve({},_d),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Yd,rgb:t=>Yd(uo(t))},toMode:{oklab:Xd,rgb:t=>fo(Xd(t))}});function Gd(t){let e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i=Math.sqrt(n*n+r*r),o=i?n/i:1,s=i?r/i:1,[a,l]=Za(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=po(f),y=p*g/f,m=Jr({l:g,a:o*y,b:s*y}),b=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));e=e/b,i=i/b*qa(e)/e,e=qa(e);const v={mode:"okhsv",s:i?(c+l)*p/(l*c+l*h*p):0,v:e?e/f:0};return v.s&&(v.h=me(Math.atan2(r,n)*180/Math.PI)),t.alpha!==void 0&&(v.alpha=t.alpha),v}function qd(t){const e={mode:"oklab"};t.alpha!==void 0&&(e.alpha=t.alpha);const n=t.h!==void 0?t.h:0,r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,o=Math.cos(n/180*Math.PI),s=Math.sin(n/180*Math.PI),[a,l]=Za(o,s),c=.5,h=1-c/a,u=1-r*c/(c+l-l*h*r),f=r*l*c/(c+l-l*h*r),p=po(u),g=f*p/u,y=Jr({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),b=po(i*u),v=f*b/u;return e.l=b*m,e.a=v*o*m,e.b=v*s*m,e}const mx=Ae(ve({},Od),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Gd,rgb:t=>Gd(uo(t))},toMode:{oklab:qd,rgb:t=>fo(qd(t))}});function yx(t,e){if(!e||e[0]!=="oklab")return;const n={mode:"oklab"},[,r,i,o,s]=e;if(!(r.type===J.Hue||i.type===J.Hue||o.type===J.Hue))return r.type!==J.None&&(n.l=Math.min(Math.max(0,r.type===J.Number?r.value:r.value/100),1)),i.type!==J.None&&(n.a=i.type===J.Number?i.value:i.value*.4/100),o.type!==J.None&&(n.b=o.type===J.Number?o.value:o.value*.4/100),s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const vx=Ae(ve({},Va),{mode:"oklab",toMode:{lrgb:Jr,rgb:fo},fromMode:{lrgb:Wd,rgb:uo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[yx],serialize:t=>`oklab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`});function bx(t,e){if(!e||e[0]!=="oklch")return;const n={mode:"oklch"},[,r,i,o,s]=e;if(r.type!==J.None){if(r.type===J.Hue)return;n.l=Math.min(Math.max(0,r.type===J.Number?r.value:r.value/100),1)}if(i.type!==J.None&&(n.c=Math.max(0,i.type===J.Number?i.value:i.value*.4/100)),o.type!==J.None){if(o.type===J.Percentage)return;n.h=o.value}return s.type!==J.None&&(n.alpha=Math.min(1,Math.max(0,s.type===J.Number?s.value:s.value/100))),n}const Ud=Ae(ve({},Ya),{mode:"oklch",toMode:{oklab:t=>Cn(t,"oklab"),rgb:t=>fo(Cn(t,"oklab"))},fromMode:{rgb:t=>On(uo(t),"oklch"),oklab:t=>On(t,"oklch")},parse:[bx],serialize:t=>`oklch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Zd=t=>{let{r:e,g:n,b:r,alpha:i}=wr(t),o={mode:"xyz65",x:.486570948648216*e+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*e+.6917385218365062*n+.079286914093745*r,z:0*e+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(o.alpha=i),o},Kd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=_r({r:t*2.4934969119414263-e*.9313836179191242-.402710784450717*n,g:t*-.8294889695615749+e*1.7626640603183465+.0236246858419436*n,b:t*.0358458302437845-e*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(i.alpha=r),i},xx=Ae(ve({},xr),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>Kd(jn(t)),xyz65:Kd},toMode:{rgb:t=>Fn(Zd(t)),xyz65:Zd}}),Ka=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},Qd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"prophoto",r:Ka(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:Ka(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:Ka(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},Qa=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},Jd=t=>{let e=Qa(t.r),n=Qa(t.g),r=Qa(t.b),i={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*r,z:0*e+0*n+.8251046025104602*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},wx=Ae(ve({},xr),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Qd,rgb:t=>Qd(Qr(t))},toMode:{xyz50:Jd,rgb:t=>Kr(Jd(t))}}),tu=1.09929682680944,_x=.018053968510807,Ja=t=>{const e=Math.abs(t);return e>_x?(Math.sign(t)||1)*(tu*Math.pow(e,.45)-(tu-1)):4.5*t},eu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"rec2020",r:Ja(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:Ja(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:Ja(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},nu=1.09929682680944,$x=.018053968510807,tl=(t=0)=>{let e=Math.abs(t);return e<$x*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+nu-1)/nu,1/.45)},ru=t=>{let e=tl(t.r),n=tl(t.g),r=tl(t.b),i={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*e+.6779980715188708*n+.059301716469862*r,z:0*e+.0280726930490874*n+1.0609850577107909*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Px=Ae(ve({},xr),{mode:"rec2020",fromMode:{xyz65:eu,rgb:t=>eu(jn(t))},toMode:{xyz65:ru,rgb:t=>Fn(ru(t))},parse:["rec2020"],serialize:"rec2020"}),Bn=.0037930732552754493,iu=Math.cbrt(Bn),el=t=>Math.cbrt(t)-iu,Ox=t=>{const{r:e,g:n,b:r,alpha:i}=wr(t),o=el(.3*e+.622*n+.078*r+Bn),s=el(.23*e+.692*n+.078*r+Bn),a=el(.2434226892454782*e+.2047674442449682*n+.5518098665095535*r+Bn),l={mode:"xyb",x:(o-s)/2,y:(o+s)/2,b:a-(o+s)/2};return i!==void 0&&(l.alpha=i),l},nl=t=>Math.pow(t+iu,3),Cx={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:t,y:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=nl(t+e)-Bn,o=nl(e-t)-Bn,s=nl(n+e)-Bn,a=_r({r:11.031566904639861*i-9.866943908131562*o-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*o-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*o+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:Ox},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:it,y:it,b:it,alpha:{use:it,fixup:ce}}},Mx={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Kr,lab:Wa},fromMode:{rgb:Qr,lab:Fa},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:it,y:it,z:it,alpha:{use:it,fixup:ce}}},Sx={mode:"xyz65",toMode:{rgb:Fn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(o.alpha=i),o}},fromMode:{rgb:jn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(o.alpha=i),o}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:it,y:it,z:it,alpha:{use:it,fixup:ce}}},Ex={mode:"yiq",toMode:{rgb:({y:t,i:e,q:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"rgb",r:t+.95608445*e+.6208885*n,g:t-.27137664*e-.6486059*n,b:t-1.10561724*e+1.70250126*n};return r!==void 0&&(i.alpha=r),i}},fromMode:{rgb:({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*n,i:.59597799*t-.2741761*e-.32180189*n,q:.21147017*t-.52261711*e+.31114694*n};return r!==void 0&&(i.alpha=r),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:it,i:it,q:it,alpha:{use:it,fixup:ce}}},Ix=t=>Math.max(0,Math.min(1,t||0)),go=t=>Math.round(Ix(t)*255),ou=xa("rgb"),su=t=>{if(t===void 0)return;let e=go(t.r),n=go(t.g),r=go(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},Tx=t=>{if(t===void 0)return;let e=go(t.alpha!==void 0?t.alpha:1);return su(t)+(256|e).toString(16).slice(1)},ti=t=>su(ou(t)),Ax=t=>Tx(ou(t));function rl(t){let e=xa("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function il(t,e){let n=rl(t),r=rl(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Ht(Pb),Ht(Tb),Ht(Ab),Ht(kb),Ht(Rb),Ht(_d),Ht(Od),Ht(Xb),Ht(Gb),Ht(Kb),Ht(Qb),Ht(Va),Ht(tx),Ht(Ya),Ht(nx),Ht(hx),Ht(dx),Ht(ux),Ht(gx),Ht(mx),Ht(vx);const au=Ht(Ud);Ht(xx),Ht(wx),Ht(Px),Ht(xr),Ht(Cx),Ht(Mx),Ht(Sx),Ht(Ex);function Wn(t){if(!t)return!1;const e=t.trim().toLowerCase();return!(e==="none"||e==="transparent"||e==="")}function lu(t){const e=tn(t);return e?rl(e)<.5:!1}var Mn=Array.isArray,cu=typeof global=="object"&&global&&global.Object===Object&&global,kx=typeof self=="object"&&self&&self.Object===Object&&self,en=cu||kx||Function("return this")(),Sn=en.Symbol,hu=Object.prototype,zx=hu.hasOwnProperty,Lx=hu.toString,ei=Sn?Sn.toStringTag:void 0;function Rx(t){var e=zx.call(t,ei),n=t[ei];try{t[ei]=void 0;var r=!0}catch(o){}var i=Lx.call(t);return r&&(e?t[ei]=n:delete t[ei]),i}var Hx=Object.prototype,Dx=Hx.toString;function Nx(t){return Dx.call(t)}var jx="[object Null]",Fx="[object Undefined]",du=Sn?Sn.toStringTag:void 0;function Vn(t){return t==null?t===void 0?Fx:jx:du&&du in Object(t)?Rx(t):Nx(t)}function En(t){return t!=null&&typeof t=="object"}var Bx="[object Symbol]";function mo(t){return typeof t=="symbol"||En(t)&&Vn(t)==Bx}var Wx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vx=/^\w*$/;function Yx(t,e){if(Mn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||mo(t)?!0:Vx.test(t)||!Wx.test(t)||e!=null&&t in Object(e)}function nn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Xx="[object AsyncFunction]",Gx="[object Function]",qx="[object GeneratorFunction]",Ux="[object Proxy]";function ol(t){if(!nn(t))return!1;var e=Vn(t);return e==Gx||e==qx||e==Xx||e==Ux}var sl=en["__core-js_shared__"],uu=(function(){var t=/[^.]+$/.exec(sl&&sl.keys&&sl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Zx(t){return!!uu&&uu in t}var Kx=Function.prototype,Qx=Kx.toString;function Yn(t){if(t!=null){try{return Qx.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Jx=/[\\^$.*+?()[\]{}|]/g,tw=/^\[object .+?Constructor\]$/,ew=Function.prototype,nw=Object.prototype,rw=ew.toString,iw=nw.hasOwnProperty,ow=RegExp("^"+rw.call(iw).replace(Jx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sw(t){if(!nn(t)||Zx(t))return!1;var e=ol(t)?ow:tw;return e.test(Yn(t))}function aw(t,e){return t==null?void 0:t[e]}function Xn(t,e){var n=aw(t,e);return sw(n)?n:void 0}var ni=Xn(Object,"create");function lw(){this.__data__=ni?ni(null):{},this.size=0}function cw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var hw="__lodash_hash_undefined__",dw=Object.prototype,uw=dw.hasOwnProperty;function fw(t){var e=this.__data__;if(ni){var n=e[t];return n===hw?void 0:n}return uw.call(e,t)?e[t]:void 0}var pw=Object.prototype,gw=pw.hasOwnProperty;function mw(t){var e=this.__data__;return ni?e[t]!==void 0:gw.call(e,t)}var yw="__lodash_hash_undefined__";function vw(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ni&&e===void 0?yw:e,this}function Gn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gn.prototype.clear=lw,Gn.prototype.delete=cw,Gn.prototype.get=fw,Gn.prototype.has=mw,Gn.prototype.set=vw;function bw(){this.__data__=[],this.size=0}function yo(t,e){return t===e||t!==t&&e!==e}function vo(t,e){for(var n=t.length;n--;)if(yo(t[n][0],e))return n;return-1}var xw=Array.prototype,ww=xw.splice;function _w(t){var e=this.__data__,n=vo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ww.call(e,n,1),--this.size,!0}function $w(t){var e=this.__data__,n=vo(e,t);return n<0?void 0:e[n][1]}function Pw(t){return vo(this.__data__,t)>-1}function Ow(t,e){var n=this.__data__,r=vo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function gn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}gn.prototype.clear=bw,gn.prototype.delete=_w,gn.prototype.get=$w,gn.prototype.has=Pw,gn.prototype.set=Ow;var ri=Xn(en,"Map");function Cw(){this.size=0,this.__data__={hash:new Gn,map:new(ri||gn),string:new Gn}}function Mw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function bo(t,e){var n=t.__data__;return Mw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Sw(t){var e=bo(this,t).delete(t);return this.size-=e?1:0,e}function Ew(t){return bo(this,t).get(t)}function Iw(t){return bo(this,t).has(t)}function Tw(t,e){var n=bo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function In(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}In.prototype.clear=Cw,In.prototype.delete=Sw,In.prototype.get=Ew,In.prototype.has=Iw,In.prototype.set=Tw;var Aw="Expected a function";function al(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Aw);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(al.Cache||In),n}al.Cache=In;var kw=500;function zw(t){var e=al(t,function(r){return n.size===kw&&n.clear(),r}),n=e.cache;return e}var Lw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rw=/\\(\\)?/g,Hw=zw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lw,function(n,r,i,o){e.push(i?o.replace(Rw,"$1"):r||n)}),e});function Dw(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var fu=Sn?Sn.prototype:void 0,pu=fu?fu.toString:void 0;function gu(t){if(typeof t=="string")return t;if(Mn(t))return Dw(t,gu)+"";if(mo(t))return pu?pu.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ii(t){return t==null?"":gu(t)}function Nw(t,e){return Mn(t)?t:Yx(t,e)?[t]:Hw(ii(t))}function jw(t){if(typeof t=="string"||mo(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Fw(t,e){e=Nw(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[jw(e[n++])];return n&&n==r?t:void 0}function mu(t,e,n){var r=t==null?void 0:Fw(t,e);return r===void 0?n:r}function Pr(t,e){if(e.length===0)return{};const n=Array.isArray(t)?t[e[0]]:t.items[e[0]];if(e.length===1)return n;const r=e.slice(1).map(i=>`children[${i}]`).join(".");return mu(n,r)}function yu(t){const{structure:e,item:n,items:r}=t;return!(!e||!n||r.some(i=>!i))}function Bw(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function Ww(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:Bw(t,e,n)}var Vw="\\ud800-\\udfff",Yw="\\u0300-\\u036f",Xw="\\ufe20-\\ufe2f",Gw="\\u20d0-\\u20ff",qw=Yw+Xw+Gw,Uw="\\ufe0e\\ufe0f",Zw="\\u200d",Kw=RegExp("["+Zw+Vw+qw+Uw+"]");function vu(t){return Kw.test(t)}function Qw(t){return t.split("")}var bu="\\ud800-\\udfff",Jw="\\u0300-\\u036f",t_="\\ufe20-\\ufe2f",e_="\\u20d0-\\u20ff",n_=Jw+t_+e_,r_="\\ufe0e\\ufe0f",i_="["+bu+"]",ll="["+n_+"]",cl="\\ud83c[\\udffb-\\udfff]",o_="(?:"+ll+"|"+cl+")",xu="[^"+bu+"]",wu="(?:\\ud83c[\\udde6-\\uddff]){2}",_u="[\\ud800-\\udbff][\\udc00-\\udfff]",s_="\\u200d",$u=o_+"?",Pu="["+r_+"]?",a_="(?:"+s_+"(?:"+[xu,wu,_u].join("|")+")"+Pu+$u+")*",l_=Pu+$u+a_,c_="(?:"+[xu+ll+"?",ll,wu,_u,i_].join("|")+")",h_=RegExp(cl+"(?="+cl+")|"+c_+l_,"g");function d_(t){return t.match(h_)||[]}function u_(t){return vu(t)?d_(t):Qw(t)}function f_(t){return function(e){e=ii(e);var n=vu(e)?u_(e):void 0,r=n?n[0]:e.charAt(0),i=n?Ww(n,1).join(""):e.slice(1);return r[t]()+i}}var p_=f_("toUpperCase");function g_(t){return p_(ii(t).toLowerCase())}function m_(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)n=e(n,t[i],i,t);return n}function y_(t){return function(e){return t==null?void 0:t[e]}}var v_={À:"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"},b_=y_(v_),x_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,w_="\\u0300-\\u036f",__="\\ufe20-\\ufe2f",$_="\\u20d0-\\u20ff",P_=w_+__+$_,O_="["+P_+"]",C_=RegExp(O_,"g");function M_(t){return t=ii(t),t&&t.replace(x_,b_).replace(C_,"")}var S_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function E_(t){return t.match(S_)||[]}var I_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function T_(t){return I_.test(t)}var Ou="\\ud800-\\udfff",A_="\\u0300-\\u036f",k_="\\ufe20-\\ufe2f",z_="\\u20d0-\\u20ff",L_=A_+k_+z_,Cu="\\u2700-\\u27bf",Mu="a-z\\xdf-\\xf6\\xf8-\\xff",R_="\\xac\\xb1\\xd7\\xf7",H_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",D_="\\u2000-\\u206f",N_=" \\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",Su="A-Z\\xc0-\\xd6\\xd8-\\xde",j_="\\ufe0e\\ufe0f",Eu=R_+H_+D_+N_,Iu="['’]",Tu="["+Eu+"]",F_="["+L_+"]",Au="\\d+",B_="["+Cu+"]",ku="["+Mu+"]",zu="[^"+Ou+Eu+Au+Cu+Mu+Su+"]",W_="\\ud83c[\\udffb-\\udfff]",V_="(?:"+F_+"|"+W_+")",Y_="[^"+Ou+"]",Lu="(?:\\ud83c[\\udde6-\\uddff]){2}",Ru="[\\ud800-\\udbff][\\udc00-\\udfff]",Or="["+Su+"]",X_="\\u200d",Hu="(?:"+ku+"|"+zu+")",G_="(?:"+Or+"|"+zu+")",Du="(?:"+Iu+"(?:d|ll|m|re|s|t|ve))?",Nu="(?:"+Iu+"(?:D|LL|M|RE|S|T|VE))?",ju=V_+"?",Fu="["+j_+"]?",q_="(?:"+X_+"(?:"+[Y_,Lu,Ru].join("|")+")"+Fu+ju+")*",U_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",K_=Fu+ju+q_,Q_="(?:"+[B_,Lu,Ru].join("|")+")"+K_,J_=RegExp([Or+"?"+ku+"+"+Du+"(?="+[Tu,Or,"$"].join("|")+")",G_+"+"+Nu+"(?="+[Tu,Or+Hu,"$"].join("|")+")",Or+"?"+Hu+"+"+Du,Or+"+"+Nu,Z_,U_,Au,Q_].join("|"),"g");function t4(t){return t.match(J_)||[]}function e4(t,e,n){return t=ii(t),e=e,e===void 0?T_(t)?t4(t):E_(t):t.match(e)||[]}var n4="['’]",r4=RegExp(n4,"g");function Bu(t){return function(e){return m_(e4(M_(e).replace(r4,"")),t,"")}}var i4=Bu(function(t,e,n){return e=e.toLowerCase(),t+(n?g_(e):e)});const o4=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function qn(t){const e=[];let n="",r=null;const i=()=>{const o=n.trim();o&&e.push(o),n=""};for(let o=0;o<t.length;o+=1){const s=t[o];if(r){n+=s,s===r&&(r=null);continue}if(s==='"'||s==="'"){r=s,n+=s;continue}if(s===","){i();continue}n+=s}return i(),e}function Wu(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function s4(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function a4(t){return/^\d/.test(t)||/\s/.test(t)}function l4(t){const e=t.trim();if(!e||s4(e)||o4.has(e.toLowerCase())||!a4(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Cr(t){const e=qn(t);return e.length?e.length===1?Wu(e[0]):e.map(n=>Wu(n)).join(", "):""}function Un(t){const e=qn(t);return e.length?e.map(n=>l4(n)).join(", "):t.trim()}const c4={100:"thin",hairline:"thin",thin:"thin",200:"extralight",ultralight:"extralight",extralight:"extralight",300:"light",light:"light",400:"regular",normal:"regular",regular:"regular",500:"medium",medium:"medium",600:"semibold",demibold:"semibold",semibold:"semibold",700:"bold",bold:"bold",800:"extrabold",ultrabold:"extrabold",extrabold:"extrabold",900:"black",heavy:"black",black:"black",950:"extrablack",ultrablack:"extrablack",extrablack:"extrablack"};function Vu(t){const e=String(t).toLowerCase();return c4[e]||"regular"}function wt(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Yt(n,e),n}function Mr(t){const n=new DOMParser().parseFromString(t,"image/svg+xml");if(n.querySelector("parsererror"))throw new Error("Invalid SVG string");return n.documentElement}function Yt(t,e){Object.entries(e).forEach(([n,r])=>{r==null?t.removeAttribute(n):t.setAttribute(n,r)})}function ke(t,e,n=!0){return e.reduce((r,i)=>{const o=t.getAttribute(i);return(!n||o!==null&&o!==""&&o!==void 0)&&(r[i]=o),r},{})}function h4(t,e){e.forEach(n=>{t.removeAttribute(n)})}function hl(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{hl(r,e)})}function xo(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",r=t.querySelector(n);if(r)return r;const i=wt("defs");return e&&(i.id=e),t.prepend(i),i}var Yu=Object.getOwnPropertySymbols,d4=Object.prototype.hasOwnProperty,u4=Object.prototype.propertyIsEnumerable,f4=(t,e)=>{var n={};for(var r in t)d4.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Yu)for(var r of Yu(t))e.indexOf(r)<0&&u4.call(t,r)&&(n[r]=t[r]);return n};function Zn(t){return qu(t)?t.querySelector("span"):null}function p4(t,e){const n=document.createElement("span"),r=wt("foreignObject",{overflow:"visible"});return r.appendChild(n),Xu(r,{textContent:t,attributes:e}),r}function Xu(t,e){const{textContent:n,attributes:r}=e;if(n!==void 0&&ul(t,n),!r)return;const i=Zn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,m4(r)),!o||!s){const p=y4(i);!o&&!t.hasAttribute("width")&&(o=String(p.width)),!s&&!t.hasAttribute("height")&&(s=String(p.height))}const{"data-horizontal-align":u,"data-vertical-align":f}=r;Object.assign(i.style,g4(u,f))}const{id:l,x:c,y:h}=r;l&&(a.id=l),c!==void 0&&(a.x=String(c)),h!==void 0&&(a.y=String(h)),o!==void 0&&(a.width=String(o)),s!==void 0&&(a.height=String(s)),Yt(t,a)}function g4(t,e){const n={width:"100%",height:"100%",display:"flex",flexWrap:"wrap",wordBreak:"break-word",whiteSpace:"pre-wrap"};switch(t){case"LEFT":n.textAlign="left",n.justifyContent="flex-start";break;case"CENTER":n.textAlign="center",n.justifyContent="center";break;case"RIGHT":n.textAlign="right",n.justifyContent="flex-end";break}switch(e){case"TOP":n.alignContent="flex-start",n.alignItems="flex-start";break;case"MIDDLE":n.alignContent="center",n.alignItems="center";break;case"BOTTOM":n.alignContent="flex-end",n.alignItems="flex-end";break}return n}function m4(t){const e=t,{x:n,y:r,width:i,height:o,["data-horizontal-align"]:s,["data-vertical-align"]:a,["font-size"]:l,["letter-spacing"]:c,["line-height"]:h,fill:u,["stroke-width"]:f,["text-anchor"]:p,["dominant-baseline"]:g,["font-family"]:y}=e,m=f4(e,["x","y","width","height","data-horizontal-align","data-vertical-align","font-size","letter-spacing","line-height","fill","stroke-width","text-anchor","dominant-baseline","font-family"]),b={overflow:"visible"};return u&&(b.color=u),Object.entries(m).forEach(([v,x])=>{b[i4(v)]=x}),l&&(b.fontSize=`${l}px`),h&&(b.lineHeight=typeof h=="string"&&h.endsWith("px")?h:+h),c&&(b.letterSpacing=`${c}px`),f&&(b.strokeWidth=`${f}px`),b.fontFamily=y?Un(y):y||"",b}function y4(t){const e=t.parentNode;t.style.visibility="hidden",document.body.appendChild(t);const n=t.getBoundingClientRect();return e?e.appendChild(t):document.body.removeChild(t),t.style.visibility="visible",n}function dl(t){var e;return((e=Zn(t))==null?void 0:e.innerText)||""}function ul(t,e){const n=Zn(t);n&&(n.innerText=e)}function fl(t){const e=Zn(t);if(!e)return{};const{color:n,fontSize:r,fontFamily:i,justifyContent:o,alignContent:s,fontWeight:a}=e.style,[l,c]=v4(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Cr(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:dl(t)}}function v4(t,e){let n="LEFT",r="TOP";switch(t){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT";break}switch(e){case"flex-start":r="TOP";break;case"center":r="MIDDLE";break;case"flex-end":r="BOTTOM";break}return[n,r]}const _e=(t,e)=>{var n;return((n=t==null?void 0:t.dataset)==null?void 0:n.elementType)===e},b4=t=>_e(t,"title"),x4=t=>_e(t,"desc"),w4=t=>_e(t,"shape"),_4=t=>_e(t,"shapes-group"),$4=t=>_e(t,"illus"),P4=t=>t instanceof SVGElement&&t.tagName==="text",O4=t=>t instanceof SVGElement&&t.tagName==="g",pl=t=>_e(t,"item-icon"),Gu=t=>_e(t,"item-icon-group"),C4=t=>_e(t,"item-label"),M4=t=>_e(t,"item-desc"),S4=t=>_e(t,"item-value"),E4=t=>_e(t,"item-illus"),I4=t=>_e(t,"edit-area"),T4=t=>_e(t,"btns-group"),A4=t=>_e(t,"rough-element"),k4=t=>_e(t,"rough-volume");function qu(t){return t.tagName==="foreignObject"}function z4(t){return t.tagName==="SPAN"}function mn(t){const e=gl(t);return[kt.Title,kt.Desc,kt.ItemLabel,kt.ItemDesc].includes(e)}function Uu(t){if(!t||!mn(t))return!1;const e=Zn(t);return e?e.hasAttribute("contenteditable"):!1}function L4(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function Tn(t){return pl(t)||Gu(t)}function R4(t){let e=t;for(;e;){if(Sr(e,ya))return!0;e=e.parentElement}return!1}function oi(t,e){t.setAttribute("data-element-type",e)}function Sr(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function gl(t){return Tn(t)?kt.ItemIcon:t.getAttribute("data-element-type")||kt.Unknown}function H4(t){var e,n,r,i=t;function o(a,l){++e>i&&(r=n,s(1),++e),n[a]=l}function s(a){e=0,n=Object.create(null),a||(r=Object.create(null))}return s(),{clear:s,has:function(a){return n[a]!==void 0||r[a]!==void 0},get:function(a){var l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set:function(a,l){n[a]!==void 0?n[a]=l:o(a,l)}}}var Zu=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const Ku=globalThis.fetch,ml=H4(1024),yl=new Map;function D4(t){const e=Array.from(t.headers.entries());return e.length===0?"":(e.sort(([n],[r])=>n.toLowerCase().localeCompare(r.toLowerCase())),e.map(([n,r])=>`${n.toLowerCase()}:${r}`).join("|"))}function N4(t){const e=D4(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}function Qu(t){return new Response(t.body.slice(0),t.init)}function j4(t,e){return Zu(this,null,function*(){try{const n=yield Ku(t),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&ml.set(e,i),i}finally{yl.delete(e)}})}function wo(t,e){return Zu(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return Ku(n);const r=N4(n);if(ml.has(r))return Qu(ml.get(r));let i=yl.get(r);i||(i=j4(n,r),yl.set(r,i));const o=yield i;return Qu(o)})}function F4(t,e={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:r}=t,i=[],o=l=>" ".repeat(l);function s(l,c,h){const u=e[l];return u?`${o(h)}/** ${u} */
|
|
1
|
+
(function(W,_e){typeof exports=="object"&&typeof module!="undefined"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(W=typeof globalThis!="undefined"?globalThis:W||self,_e(W.AntVInfographic={}))})(this,(function(W){"use strict";var Mj=Object.defineProperty,Sj=Object.defineProperties;var Ej=Object.getOwnPropertyDescriptors;var Fv=Object.getOwnPropertySymbols;var Ij=Object.prototype.hasOwnProperty,Tj=Object.prototype.propertyIsEnumerable;var Qi=Math.pow,Bv=(W,_e,Be)=>_e in W?Mj(W,_e,{enumerable:!0,configurable:!0,writable:!0,value:Be}):W[_e]=Be,Pe=(W,_e)=>{for(var Be in _e||(_e={}))Ij.call(_e,Be)&&Bv(W,Be,_e[Be]);if(Fv)for(var Be of Fv(_e))Tj.call(_e,Be)&&Bv(W,Be,_e[Be]);return W},He=(W,_e)=>Sj(W,Ej(_e));const Be={version:"0.2.4"},wa=new Map;function Vh(t,e){wa.set(t,e)}function Yh(t){return wa.get(t)}function Vv(){return Array.from(wa.keys())}var Yv=Object.defineProperty,Xh=Object.getOwnPropertySymbols,Xv=Object.prototype.hasOwnProperty,Gv=Object.prototype.propertyIsEnumerable,Gh=(t,e,n)=>e in t?Yv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qh=(t,e)=>{for(var n in e||(e={}))Xv.call(e,n)&&Gh(t,n,e[n]);if(Xh)for(var n of Xh(e))Gv.call(e,n)&&Gh(t,n,e[n]);return t};const Kr={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},Qr={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},Uh={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},Zh={type:"capsule-item"},Kh={type:"circular-progress"},Qh={type:"rounded-rect-node",positionH:"center"},Jh={type:"compact-card"},qv=(t,e)=>qh(qh({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),nn=(t,e,n,r)=>[t,{design:{structure:qv(e,r),item:n}}],Uv=Object.fromEntries([nn("hierarchy-mindmap-branch-gradient-lined-palette",Kr,Uh,"bottom"),nn("hierarchy-mindmap-level-gradient-lined-palette",Qr,Uh,"bottom"),nn("hierarchy-mindmap-branch-gradient-capsule-item",Kr,Zh),nn("hierarchy-mindmap-level-gradient-capsule-item",Qr,Zh),nn("hierarchy-mindmap-branch-gradient-circle-progress",Kr,Kh,.4),nn("hierarchy-mindmap-level-gradient-circle-progress",Qr,Kh,.4),nn("hierarchy-mindmap-branch-gradient-rounded-rect",Kr,Qh),nn("hierarchy-mindmap-level-gradient-rounded-rect",Qr,Qh),nn("hierarchy-mindmap-branch-gradient-compact-card",Kr,Jh),nn("hierarchy-mindmap-level-gradient-compact-card",Qr,Jh)]),Zv={"hierarchy-structure":{design:{title:"default",structure:{type:"hierarchy-structure"},item:"simple"}},"hierarchy-structure-mirror":{design:{title:"default",structure:{type:"hierarchy-structure",layerLabelPosition:"right"},item:"simple"}}};var Kv=Object.defineProperty,td=Object.getOwnPropertySymbols,Qv=Object.prototype.hasOwnProperty,Jv=Object.prototype.propertyIsEnumerable,ed=(t,e,n)=>e in t?Kv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nd=(t,e)=>{for(var n in e||(e={}))Qv.call(e,n)&&ed(t,n,e[n]);if(td)for(var n of td(e))Jv.call(e,n)&&ed(t,n,e[n]);return t};const tx={"tech-style":{edgeType:"straight",edgeStyle:"solid",edgeColorMode:"gradient",edgeMarker:"arrow",markerSize:12,edgeCornerRadius:5},"dashed-line":{edgeStyle:"dashed",edgeCornerRadius:10,edgeDashPattern:"10,5",edgeColorMode:"gradient",edgeMarker:"dot",markerSize:6,edgeOffset:6},"distributed-origin":{edgeOrigin:"distributed",edgeOriginPadding:30,edgeMarker:"arrow",edgeCornerRadius:10,markerSize:12,edgeColorMode:"gradient"},"curved-line":{edgeType:"curved",edgeColorMode:"gradient",edgeMarker:"none"},"dashed-arrow":{edgeType:"straight",edgeStyle:"dashed",edgeDashPattern:"8,4",edgeMarker:"arrow",markerSize:10,edgeCornerRadius:0}},ex=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],rd={},id="hierarchy-tree",nx=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],rx=(t,e,n)=>t?`${id}-${t}-${e}-${n}`:`${id}-${e}-${n}`;for(const t of ex)for(const[e,n]of Object.entries(tx))for(const{key:r,orientation:i}of nx){const o=rx(r,e,t);rd[o]={design:{structure:nd(nd({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const ix={"list-zigzag-up-compact-card":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-up-simple":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-compact-card":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-simple":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}}},ox={"sequence-stairs-front-pill-badge":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"pill-badge"}]}},"sequence-stairs-front-compact-card":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"compact-card"}]}},"sequence-stairs-front-simple":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"simple",usePaletteColor:!0}]}}},sx={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var ax=Object.defineProperty,od=Object.getOwnPropertySymbols,lx=Object.prototype.hasOwnProperty,cx=Object.prototype.propertyIsEnumerable,sd=(t,e,n)=>e in t?ax(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wr=(t,e)=>{for(var n in e||(e={}))lx.call(e,n)&&sd(t,n,e[n]);if(od)for(var n of od(e))cx.call(e,n)&&sd(t,n,e[n]);return t};const hx=wr(wr(wr(wr(wr(wr({"compare-hierarchy-left-right-circle-node-pill-badge":{design:{structure:{type:"compare-hierarchy-left-right",decoration:"split-line",surround:!1,groupGap:-20},title:"default",items:[{type:"circle-node",width:240},"pill-badge"]},themeConfig:{}},"compare-hierarchy-left-right-circle-node-plain-text":{design:{title:"default",structure:{type:"compare-hierarchy-left-right",decoration:"dot-line",flipLeaf:!0,groupGap:-10},items:[{type:"circle-node",width:180},{type:"plain-text"}]}},"list-pyramid-rounded-rect-node":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"rounded-rect-node"}]}},"list-pyramid-badge-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"badge-card"}]}},"list-pyramid-compact-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"compact-card"}]}},"list-column-done-list":{design:{title:"default",structure:{type:"list-column"},items:[{type:"done-list"}]}},"list-column-vertical-icon-arrow":{design:{title:"default",structure:{type:"list-column",gap:-5,zigzag:!0},items:[{type:"vertical-icon-arrow"}]}},"list-grid-badge-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"badge-card"}]}},"list-grid-candy-card-lite":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"candy-card-lite"}]}},"chart-column-simple":{design:{title:"default",structure:{type:"chart-column"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-grid-circular-progress":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"circular-progress"}]}},"list-grid-compact-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"compact-card"}]}},"list-grid-done-list":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"done-list"}]}},"list-grid-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-grid",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"list-grid-progress-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"progress-card"}]}},"list-grid-ribbon-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"ribbon-card"}]}},"list-grid-simple":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"simple"}]}},"list-row-circular-progress":{design:{title:"default",structure:{type:"list-row"},items:[{type:"circular-progress"}]}},"list-row-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"relation-circle-circular-progress":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"circular-progress"}]}},"relation-circle-icon-badge":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"icon-badge"}]}},"sequence-steps-badge-card":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"badge-card"}]}},"sequence-steps-simple":{design:{title:"default",structure:{type:"sequence-steps",gap:10},items:[{type:"simple"}]}},"sequence-timeline-done-list":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"done-list"}]}},"sequence-timeline-plain-text":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"plain-text"}]}},"sequence-timeline-rounded-rect-node":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"rounded-rect-node"}]}},"sequence-ascending-steps":{design:{title:"default",structure:{type:"sequence-ascending-steps",vGap:-46,hGap:-20},items:[{type:"l-corner-card"}]}},"sequence-timeline-simple":{design:{title:"default",structure:{type:"sequence-timeline",gap:20},items:[{type:"simple",positionV:"middle"}]}},"sequence-cylinders-3d-simple":{design:{title:"default",structure:{type:"sequence-cylinders-3d",gapY:20},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-column-simple-vertical-arrow":{design:{title:"default",structure:{type:"list-column",gap:0,zigzag:!0},items:[{type:"simple-vertical-arrow"}]}},"list-row-simple-horizontal-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"simple-horizontal-arrow"}]}},"compare-swot":{design:{title:"default",structure:{type:"compare-hierarchy-row",itemGap:32,itemPadding:40,showColumnBackground:!0,columnBackgroundAlpha:.08},items:[{type:"letter-card",showBottomShade:!1},{type:"plain-text",formatter:t=>`● ${t}`,usePaletteColor:!0}]}},"compare-hierarchy-row-letter-card-compact-card":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"compact-card"}]}},"compare-hierarchy-row-letter-card-rounded-rect-node":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"rounded-rect-node"}]}},"sequence-snake-steps-compact-card":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"compact-card"}]}},"sequence-snake-steps-pill-badge":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"pill-badge"}]}},"sequence-snake-steps-simple":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple"}]}},"sequence-color-snake-steps-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"horizontal-icon-line"}]}},"sequence-pyramid-simple":{design:{title:"default",structure:{type:"sequence-pyramid"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{colorPrimary:"#1677ff"}},"list-row-horizontal-icon-line":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-line"}]}},"list-sector-simple":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"simple"}]}},"list-sector-plain-text":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"plain-text"}]}},"list-sector-half-plain-text":{design:{title:"default",structure:{type:"list-sector",startAngle:-180,endAngle:0},items:[{type:"plain-text"}]}},"quadrant-quarter-simple-card":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-simple-card"}]}},"quadrant-quarter-circular":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-plain-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"plain-text"}]}},"sequence-roadmap-vertical-simple":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"simple",showIcon:!1}]}},"sequence-roadmap-vertical-badge-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"badge-card"}]}},"sequence-roadmap-vertical-pill-badge":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"pill-badge"}]}},"sequence-roadmap-vertical-quarter-circular":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-quarter-simple-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical",flipped:!0},items:[{type:"quarter-simple-card"}]}},"sequence-horizontal-zigzag-simple-illus":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-illus"}]}},"sequence-horizontal-zigzag-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"horizontal-icon-line"}]}},"sequence-horizontal-zigzag-plain-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"plain-text"}]}},"sequence-horizontal-zigzag-simple-horizontal-arrow":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-horizontal-arrow"}]}},"sequence-horizontal-zigzag-simple":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple"}]}},"list-row-simple-illus":{design:{title:"default",structure:{type:"list-row"},items:[{type:"simple-illus"}]}},"quadrant-simple-illus":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"simple-illus"}]}},"sequence-color-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"simple-illus"}]}},"sequence-timeline-simple-illus":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"simple-illus",usePaletteColor:!0}]}},"sequence-zigzag-steps-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-steps"},items:[{type:"underline-text"}]}},"sequence-horizontal-zigzag-underline-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"underline-text"}]}},"sequence-roadmap-vertical-underline-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"underline-text"}]}},"sequence-snake-steps-underline-text":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"underline-text"}]}},"sequence-circle-arrows-indexed-card":{design:{title:"default",structure:{type:"sequence-circle-arrows"},items:[{type:"indexed-card"}]}},"sequence-zigzag-pucks-3d-simple":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-zigzag-pucks-3d-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"underline-text"}]}},"sequence-zigzag-pucks-3d-indexed-card":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"indexed-card"}]}},"sequence-ascending-stairs-3d-simple":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-ascending-stairs-3d-underline-text":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"underline-text"}]}},"sequence-circular-underline-text":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"underline-text"}]}},"sequence-circular-simple":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-filter-mesh-underline-text":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"underline-text"}]}},"sequence-filter-mesh-simple":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-mountain-underline-text":{design:{title:"default",structure:{type:"sequence-mountain"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-simple-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"compact-card"}]}},"chart-bar-plain-text":{design:{title:"default",structure:{type:"chart-bar"},items:[{type:"plain-text",positionH:"flipped"}]}},"chart-line-plain-text":{design:{title:"default",structure:{type:"chart-line"},items:[{type:"plain-text",lineNumber:2}]}},"chart-pie-plain-text":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"plain-text"}]}},"chart-pie-compact-card":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"compact-card"}]}},"chart-pie-pill-badge":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"pill-badge"}]}},"chart-pie-donut-plain-text":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"plain-text"}]}},"chart-pie-donut-compact-card":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"compact-card"}]}},"chart-pie-donut-pill-badge":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"pill-badge"}]}}},rd),Uv),ox),sx),ix),Zv);Object.entries(hx).forEach(([t,e])=>{Vh(t,e)});const Bt=Symbol.for("@antv/infographic/Fragment");function d(t,e={}){return{type:t,props:e}}const I=d,_a="infographic-component";var zt=(t=>(t.Background="background",t.Title="title",t.Desc="desc",t.ItemsGroup="items-group",t.ItemIconGroup="item-icon-group",t.ItemIcon="item-icon",t.ItemLabel="item-label",t.ItemDesc="item-desc",t.ItemValue="item-value",t.ItemIllus="item-illus",t.BtnAdd="btn-add",t.BtnRemove="btn-remove",t.IllusGroup="illus-group",t.IllusVolume="illus-volume",t.Illus="illus",t.BtnsGroup="btns-group",t.Unknown="unknown",t))(zt||{});const dx="https://www.weavefox.cn/api/open/v1/icon",$a=Symbol.for("@antv/infographic/Defs");function jt(t){return{type:$a,props:t}}function Wt(t){var e,n,r,i;const{x:o=0,y:s=0,width:a=0,height:l=0}=t;return(e=t.cx)!=null||(t.cx=o+a/2),(n=t.cy)!=null||(t.cy=s+l/2),(r=t.rx)!=null||(t.rx=a/2),(i=t.ry)!=null||(t.ry=l/2),{type:"ellipse",props:t}}function V(t){const{x:e=0,y:n=0}=t;return(e||n)&&(t.transform||(t.transform=`translate(${e}, ${n})`)),{type:"g",props:t}}var ux=Object.defineProperty,ad=Object.getOwnPropertySymbols,fx=Object.prototype.hasOwnProperty,px=Object.prototype.propertyIsEnumerable,ld=(t,e,n)=>e in t?ux(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gx=(t,e)=>{for(var n in e||(e={}))fx.call(e,n)&&ld(t,n,e[n]);if(ad)for(var n of ad(e))px.call(e,n)&&ld(t,n,e[n]);return t};function yt(t){const{x:e,y:n}=t,r=gx({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var mx=Object.defineProperty,yx=Object.defineProperties,vx=Object.getOwnPropertyDescriptors,Ji=Object.getOwnPropertySymbols,cd=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable,dd=(t,e,n)=>e in t?mx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xx=(t,e)=>{for(var n in e||(e={}))cd.call(e,n)&&dd(t,n,e[n]);if(Ji)for(var n of Ji(e))hd.call(e,n)&&dd(t,n,e[n]);return t},bx=(t,e)=>yx(t,vx(e)),wx=(t,e)=>{var n={};for(var r in t)cd.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ji)for(var r of Ji(t))e.indexOf(r)<0&&hd.call(t,r)&&(n[r]=t[r]);return n};function Ve(t){var e=t,{points:n=[]}=e,r=wx(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=bx(xx({},r),{points:s});return(i!==void 0||o!==void 0)&&(a.transform=`translate(${i!=null?i:0}, ${o!=null?o:0})`+(a.transform||"")),{type:"polygon",props:a}}function Ct(t){return{type:"rect",props:t}}function ud(t){return Object.keys(t[0]).reduce((e,n)=>{const r=n;return t.every(i=>i[r]===t[0][r])&&(e[r]=t[0][r]),e},{})}const fd=(t,e)=>{if(typeof t=="number"){if(e===3)return{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|t&240)/255,b:(t&15|t<<4&240)/255};if(e===4)return{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|t&240)/255,alpha:(t&15|t<<4&240)/255};if(e===6)return{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(t&255)/255};if(e===8)return{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(t&255)/255}}},_x={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},$x=t=>fd(_x[t.toLowerCase()],6),Px=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Cx=t=>{let e;return(e=t.match(Px))?fd(parseInt(e[1],16),e[1].length):void 0},Sn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Jr=`${Sn}%`,Pa=`(?:${Sn}%|${Sn})`,Ox=`(?:${Sn}(deg|grad|rad|turn)|${Sn})`,_r="\\s*,\\s*",Mx=new RegExp(`^rgba?\\(\\s*${Sn}${_r}${Sn}${_r}${Sn}\\s*(?:,\\s*${Pa}\\s*)?\\)$`),Sx=new RegExp(`^rgba?\\(\\s*${Jr}${_r}${Jr}${_r}${Jr}\\s*(?:,\\s*${Pa}\\s*)?\\)$`),Ex=t=>{let e={mode:"rgb"},n;if(n=t.match(Mx))n[1]!==void 0&&(e.r=n[1]/255),n[2]!==void 0&&(e.g=n[2]/255),n[3]!==void 0&&(e.b=n[3]/255);else if(n=t.match(Sx))n[1]!==void 0&&(e.r=n[1]/100),n[2]!==void 0&&(e.g=n[2]/100),n[3]!==void 0&&(e.b=n[3]/100);else return;return n[4]!==void 0?e.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+n[5]))),e},Ix=(t,e)=>t===void 0?void 0:typeof t!="object"?on(t):t.mode!==void 0?t:e?He(Pe({},t),{mode:e}):void 0,Ca=(t="rgb")=>e=>(e=Ix(e,t))!==void 0?e.mode===t?e:rn[e.mode][t]?rn[e.mode][t](e):t==="rgb"?rn[e.mode].rgb(e):rn.rgb[t](rn[e.mode].rgb(e)):void 0,rn={},pd={},to=[],gd={},Tx=t=>t,Yt=t=>(rn[t.mode]=Pe(Pe({},rn[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{rn[e]||(rn[e]={}),rn[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(t.ranges[e]===void 0&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof t.interpolate[e]=="function"&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=Tx)}),pd[t.mode]=t,(t.parse||[]).forEach(e=>{kx(e,t.mode)}),Ca(t.mode)),Ax=t=>pd[t],kx=(t,e)=>{if(typeof t=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");gd[t]=e}else typeof t=="function"&&to.indexOf(t)<0&&to.push(t)},Oa=/[^\x00-\x7F]|[a-zA-Z_]/,Lx=/[^\x00-\x7F]|[-\w]/,rt={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let _t=0;function eo(t){let e=t[_t],n=t[_t+1];return e==="-"||e==="+"?/\d/.test(n)||n==="."&&/\d/.test(t[_t+2]):e==="."?/\d/.test(n):/\d/.test(e)}function Ma(t){if(_t>=t.length)return!1;let e=t[_t];if(Oa.test(e))return!0;if(e==="-"){if(t.length-_t<2)return!1;let n=t[_t+1];return!!(n==="-"||Oa.test(n))}return!1}const zx={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ti(t){let e="";if((t[_t]==="-"||t[_t]==="+")&&(e+=t[_t++]),e+=no(t),t[_t]==="."&&/\d/.test(t[_t+1])&&(e+=t[_t++]+no(t)),(t[_t]==="e"||t[_t]==="E")&&((t[_t+1]==="-"||t[_t+1]==="+")&&/\d/.test(t[_t+2])?e+=t[_t++]+t[_t++]+no(t):/\d/.test(t[_t+1])&&(e+=t[_t++]+no(t))),Ma(t)){let n=ro(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:rt.Hue,value:e*zx[n]}:void 0}return t[_t]==="%"?(_t++,{type:rt.Percentage,value:+e}):{type:rt.Number,value:+e}}function no(t){let e="";for(;/\d/.test(t[_t]);)e+=t[_t++];return e}function ro(t){let e="";for(;_t<t.length&&Lx.test(t[_t]);)e+=t[_t++];return e}function Hx(t){let e=ro(t);return t[_t]==="("?(_t++,{type:rt.Function,value:e}):e==="none"?{type:rt.None,value:void 0}:{type:rt.Ident,value:e}}function Rx(t=""){let e=t.trim(),n=[],r;for(_t=0;_t<e.length;){if(r=e[_t++],r===`
|
|
2
|
+
`||r===" "||r===" "){for(;_t<e.length&&(e[_t]===`
|
|
3
|
+
`||e[_t]===" "||e[_t]===" ");)_t++;continue}if(r===",")return;if(r===")"){n.push({type:rt.ParenClose});continue}if(r==="+"){if(_t--,eo(e)){n.push(ti(e));continue}return}if(r==="-"){if(_t--,eo(e)){n.push(ti(e));continue}if(Ma(e)){n.push({type:rt.Ident,value:ro(e)});continue}return}if(r==="."){if(_t--,eo(e)){n.push(ti(e));continue}return}if(r==="/"){for(;_t<e.length&&(e[_t]===`
|
|
4
|
+
`||e[_t]===" "||e[_t]===" ");)_t++;let i;if(eo(e)&&(i=ti(e),i.type!==rt.Hue)){n.push({type:rt.Alpha,value:i});continue}if(Ma(e)&&ro(e)==="none"){n.push({type:rt.Alpha,value:{type:rt.None,value:void 0}});continue}return}if(/\d/.test(r)){_t--,n.push(ti(e));continue}if(Oa.test(r)){_t--,n.push(Hx(e));continue}return}return n}function Dx(t){t._i=0;let e=t[t._i++];if(!e||e.type!==rt.Function||e.value!=="color"||(e=t[t._i++],e.type!==rt.Ident))return;const n=gd[e.value];if(!n)return;const r={mode:n},i=md(t,!1);if(!i)return;const o=Ax(n).channels;for(let s=0,a,l;s<o.length;s++)a=i[s],l=o[s],a.type!==rt.None&&(r[l]=a.type===rt.Number?a.value:a.value/100,l==="alpha"&&(r[l]=Math.max(0,Math.min(1,r[l]))));return r}function md(t,e){const n=[];let r;for(;t._i<t.length;){if(r=t[t._i++],r.type===rt.None||r.type===rt.Number||r.type===rt.Alpha||r.type===rt.Percentage||e&&r.type===rt.Hue){n.push(r);continue}if(r.type===rt.ParenClose){if(t._i<t.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==rt.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:rt.None,value:void 0}),n.every(i=>i.type!==rt.Alpha)?n:void 0}}function Nx(t,e){t._i=0;let n=t[t._i++];if(!n||n.type!==rt.Function)return;let r=md(t,e);if(r)return r.unshift(n.value),r}const on=t=>{if(typeof t!="string")return;const e=Rx(t),n=e?Nx(e,!0):void 0;let r,i=0,o=to.length;for(;i<o;)if((r=to[i++](t,n))!==void 0)return r;return e?Dx(e):void 0};function jx(t,e){if(!e||e[0]!=="rgb"&&e[0]!=="rgba")return;const n={mode:"rgb"},[,r,i,o,s]=e;if(!(r.type===rt.Hue||i.type===rt.Hue||o.type===rt.Hue))return r.type!==rt.None&&(n.r=r.type===rt.Number?r.value/255:r.value/100),i.type!==rt.None&&(n.g=i.type===rt.Number?i.value/255:i.value/100),o.type!==rt.None&&(n.b=o.type===rt.Number?o.value/255:o.value/100),s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Wx=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Fx=(t,e,n)=>t+n*(e-t),Bx=t=>{let e=[];for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];r===void 0&&i===void 0?e.push(void 0):r!==void 0&&i!==void 0?e.push([r,i]):e.push(r!==void 0?[r,r]:[i,i])}return e},ht=(t=>e=>{let n=Bx(e);return r=>{let i=r*n.length,o=r>=1?n.length-1:Math.max(Math.floor(i),0),s=n[o];return s===void 0?void 0:t(s[0],s[1],i-o)}})(Fx),pe=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},$r={mode:"rgb",channels:["r","g","b","alpha"],parse:[jx,Cx,Ex,$x,Wx,"srgb"],serialize:"srgb",interpolate:{r:ht,g:ht,b:ht,alpha:{use:ht,fixup:pe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Sa=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),yd=t=>{let e=Sa(t.r),n=Sa(t.g),r=Sa(t.b),i={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Ea=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),vd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"a98",r:Ea(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:Ea(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:Ea(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Ia=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},Pr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Ia(t),g:Ia(e),b:Ia(n)};return r!==void 0&&(i.alpha=r),i},Bn=t=>{let{r:e,g:n,b:r,alpha:i}=Pr(t),o={mode:"xyz65",x:.4123907992659593*e+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*e+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*e+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(o.alpha=i),o},Ta=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):t*12.92},Cr=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Ta(t),g:Ta(e),b:Ta(n)};return r!==void 0&&(o.alpha=r),o},Vn=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Cr({r:t*3.2409699419045226-e*1.537383177570094-.4986107602930034*n,g:t*-.9692436362808796+e*1.8759675015077204+.0415550574071756*n,b:t*.0556300796969936-e*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},Vx=He(Pe({},$r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>vd(Bn(t)),xyz65:vd},toMode:{rgb:t=>Vn(yd(t)),xyz65:yd}}),$e=t=>(t=t%360)<0?t+360:t,Yx=(t,e)=>t.map((n,r,i)=>{if(n===void 0)return n;let o=$e(n);return r===0||t[r-1]===void 0?o:e(o-$e(i[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),mn=t=>Yx(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ve=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Xx=Math.PI/180,Gx=180/Math.PI;let xd=ve[3]*ve[4],bd=ve[1]*ve[4],wd=ve[1]*ve[2]-ve[0]*ve[3];const qx=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(wd*n+t*xd-e*bd)/(wd+xd-bd),o=n-i,s=(ve[4]*(e-i)-ve[2]*o)/ve[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(o*o+s*s)/(ve[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(s,o)*Gx-120),r!==void 0&&(a.alpha=r),a},Ux=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*Xx,n===void 0&&(n=0);let o=e===void 0?0:e*n*(1-n),s=Math.cos(t),a=Math.sin(t);return i.r=n+o*(ve[0]*s+ve[1]*a),i.g=n+o*(ve[2]*s+ve[3]*a),i.b=n+o*(ve[4]*s+ve[5]*a),r!==void 0&&(i.alpha=r),i},io=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.s||!e.s)return 0;let n=$e(t.h),r=$e(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*i},Zx=(t,e)=>{if(t.h===void 0||e.h===void 0)return 0;let n=$e(t.h),r=$e(e.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},oo=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.c||!e.c)return 0;let n=$e(t.h),r=$e(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*i},yn=t=>{let e=t.reduce((r,i)=>{if(i!==void 0){let o=i*Math.PI/180;r.sin+=Math.sin(o),r.cos+=Math.cos(o)}return r},{sin:0,cos:0}),n=Math.atan2(e.sin,e.cos)*180/Math.PI;return n<0?360+n:n},Kx={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:qx},toMode:{rgb:Ux},interpolate:{h:{use:ht,fixup:mn},s:ht,l:ht,alpha:{use:ht,fixup:pe}},difference:{h:io},average:{h:yn}},En=({l:t,a:e,b:n,alpha:r},i="lch")=>{e===void 0&&(e=0),n===void 0&&(n=0);let o=Math.sqrt(e*e+n*n),s={mode:i,l:t,c:o};return o&&(s.h=$e(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},In=({l:t,c:e,h:n,alpha:r},i="lab")=>{n===void 0&&(n=0);let o={mode:i,l:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},_d=Math.pow(29,3)/Math.pow(3,3),$d=Math.pow(6,3)/Math.pow(29,3),fe={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Or={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Aa=t=>Math.pow(t,3)>$d?Math.pow(t,3):(116*t-16)/_d;const Pd=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz65",x:Aa(o)*Or.X,y:Aa(i)*Or.Y,z:Aa(s)*Or.Z};return r!==void 0&&(a.alpha=r),a},so=t=>Vn(Pd(t)),ka=t=>t>$d?Math.cbrt(t):(_d*t+16)/116,Cd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=ka(t/Or.X),o=ka(e/Or.Y),s=ka(n/Or.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},ao=t=>{let e=Cd(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},lo=1,Od=1,ei=26/180*Math.PI,co=Math.cos(ei),ho=Math.sin(ei),Md=100/Math.log(139/100),La=({l:t,c:e,h:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"lab65",l:(Math.exp(t*lo/Md)-1)/.0039},o=(Math.exp(.0435*e*Od*lo)-1)/.075,s=o*Math.cos(n/180*Math.PI-ei),a=o*Math.sin(n/180*Math.PI-ei);return i.a=s*co-a/.83*ho,i.b=s*ho+a/.83*co,r!==void 0&&(i.alpha=r),i},za=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=e*co+n*ho,o=.83*(n*co-e*ho),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:Md/lo*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*Od*lo)};return a.c&&(a.h=$e((Math.atan2(o,i)+ei)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},Sd=t=>La(En(t,"dlch")),Ed=t=>In(za(t),"dlab"),Qx={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Sd,rgb:t=>so(Sd(t))},fromMode:{lab65:Ed,rgb:t=>Ed(ao(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ht,a:ht,b:ht,alpha:{use:ht,fixup:pe}}},Jx={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:La,dlab:t=>In(t,"dlab"),rgb:t=>so(La(t))},fromMode:{lab65:za,dlab:t=>En(t,"dlch"),rgb:t=>za(ao(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ht,c:ht,h:{use:ht,fixup:mn},alpha:{use:ht,fixup:pe}},difference:{h:oo},average:{h:yn}};function tb({h:t,s:e,i:n,alpha:r}){t=$e(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1-e)};break;case 1:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1+e*(3/(2-i)-1)),b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n*(1+e*(3/(2-i)-1)),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;case 3:o={r:n*(1-e),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1+e*(3/(2-i)-1))};break;case 4:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3/(2-i)-1))};break;case 5:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function eb({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsi",s:t+e+n===0?0:1-3*o/(t+e+n),i:(t+e+n)/3};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const nb={mode:"hsi",toMode:{rgb:tb},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:eb},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ht,fixup:mn},s:ht,i:ht,alpha:{use:ht,fixup:pe}},difference:{h:io},average:{h:yn}};function rb({h:t,s:e,l:n,alpha:r}){t=$e(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=n+e*(n<.5?n:1-n),o=i-(i-n)*2*Math.abs(t/60%2-1),s;switch(Math.floor(t/60)){case 0:s={r:i,g:o,b:2*n-i};break;case 1:s={r:o,g:i,b:2*n-i};break;case 2:s={r:2*n-i,g:i,b:o};break;case 3:s={r:2*n-i,g:o,b:i};break;case 4:s={r:o,g:2*n-i,b:i};break;case 5:s={r:i,g:2*n-i,b:o};break;default:s={r:2*n-i,g:2*n-i,b:2*n-i}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function ib({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsl",s:i===o?0:(i-o)/(1-Math.abs(i+o-1)),l:.5*(i+o)};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const ob=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return t*360}},sb=new RegExp(`^hsla?\\(\\s*${Ox}${_r}${Jr}${_r}${Jr}\\s*(?:,\\s*${Pa}\\s*)?\\)$`),ab=t=>{let e=t.match(sb);if(!e)return;let n={mode:"hsl"};return e[3]!==void 0?n.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(n.h=ob(e[1],e[2])),e[4]!==void 0&&(n.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(n.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?n.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+e[7]))),n};function lb(t,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const n={mode:"hsl"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Percentage)return;n.h=r.value}if(i.type!==rt.None){if(i.type===rt.Hue)return;n.s=i.value/100}if(o.type!==rt.None){if(o.type===rt.Hue)return;n.l=o.value/100}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Id={mode:"hsl",toMode:{rgb:rb},fromMode:{rgb:ib},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[lb,ab],serialize:t=>`hsl(${t.h!==void 0?t.h:"none"} ${t.s!==void 0?t.s*100+"%":"none"} ${t.l!==void 0?t.l*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ht,fixup:mn},s:ht,l:ht,alpha:{use:ht,fixup:pe}},difference:{h:io},average:{h:yn}};function Td({h:t,s:e,v:n,alpha:r}){t=$e(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n,g:n*(1-e*i),b:n*(1-e)};break;case 1:o={r:n*(1-e*i),g:n,b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n,b:n*(1-e*i)};break;case 3:o={r:n*(1-e),g:n*(1-e*i),b:n};break;case 4:o={r:n*(1-e*i),g:n*(1-e),b:n};break;case 5:o={r:n,g:n*(1-e),b:n*(1-e*i)};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Ad({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsv",s:i===0?0:1-o/i,v:i};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const kd={mode:"hsv",toMode:{rgb:Td},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Ad},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ht,fixup:mn},s:ht,v:ht,alpha:{use:ht,fixup:pe}},difference:{h:io},average:{h:yn}};function cb({h:t,w:e,b:n,alpha:r}){if(e===void 0&&(e=0),n===void 0&&(n=0),e+n>1){let i=e+n;e/=i,n/=i}return Td({h:t,s:n===1?1:1-e/(1-n),v:1-n,alpha:r})}function hb(t){let e=Ad(t);if(e===void 0)return;let n=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,i={mode:"hwb",w:(1-n)*r,b:1-r};return e.h!==void 0&&(i.h=e.h),e.alpha!==void 0&&(i.alpha=e.alpha),i}function db(t,e){if(!e||e[0]!=="hwb")return;const n={mode:"hwb"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Percentage)return;n.h=r.value}if(i.type!==rt.None){if(i.type===rt.Hue)return;n.w=i.value/100}if(o.type!==rt.None){if(o.type===rt.Hue)return;n.b=o.value/100}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const ub={mode:"hwb",toMode:{rgb:cb},fromMode:{rgb:hb},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[db],serialize:t=>`hwb(${t.h!==void 0?t.h:"none"} ${t.w!==void 0?t.w*100+"%":"none"} ${t.b!==void 0?t.b*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ht,fixup:mn},w:ht,b:ht,alpha:{use:ht,fixup:pe}},difference:{h:Zx},average:{h:yn}},Ld=203,uo=.1593017578125,zd=78.84375,fo=.8359375,po=18.8515625,go=18.6875;function Ha(t){if(t<0)return 0;const e=Math.pow(t,1/zd);return 1e4*Math.pow(Math.max(0,e-fo)/(po-go*e),1/uo)}function Ra(t){if(t<0)return 0;const e=Math.pow(t/1e4,uo);return Math.pow((fo+po*e)/(1+go*e),zd)}const Da=t=>Math.max(t/Ld,0),Hd=({i:t,t:e,p:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=Ha(t+.008609037037932761*e+.11102962500302593*n),o=Ha(t-.00860903703793275*e-.11102962500302599*n),s=Ha(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:Da(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:Da(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:Da(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},Na=(t=0)=>Math.max(t*Ld,0),Rd=({x:t,y:e,z:n,alpha:r})=>{const i=Na(t),o=Na(e),s=Na(n),a=Ra(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Ra(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Ra(.0070797844607477*i+.0748396662186366*o+.8433265453898765*s),h=.5*a+.5*l,u=1.61376953125*a-3.323486328125*l+1.709716796875*c,f=4.378173828125*a-4.24560546875*l-.132568359375*c,p={mode:"itp",i:h,t:u,p:f};return r!==void 0&&(p.alpha=r),p},fb={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Hd,rgb:t=>Vn(Hd(t))},fromMode:{xyz65:Rd,rgb:t=>Rd(Bn(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ht,t:ht,p:ht,alpha:{use:ht,fixup:pe}}},pb=134.03437499999998,gb=16295499532821565e-27,ja=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,uo);return Math.pow((fo+po*e)/(1+go*e),pb)},Wa=(t=0)=>Math.max(t*203,0),Dd=({x:t,y:e,z:n,alpha:r})=>{t=Wa(t),e=Wa(e),n=Wa(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=ja(.41478972*i+.579999*o+.014648*n),a=ja(-.20151*i+1.120649*o+.0531008*n),l=ja(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-gb,a:3.524*s-4.066708*a+.542708*l,b:.199076*s+1.096799*a-1.295875*l};return r!==void 0&&(h.alpha=r),h},mb=134.03437499999998,Nd=16295499532821565e-27,Fa=t=>{if(t<0)return 0;let e=Math.pow(t,1/mb);return 1e4*Math.pow((fo-e)/(go*e-po),1/uo)},Ba=t=>t/203,jd=({j:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+Nd)/(.44+.56*(t+Nd)),o=Fa(i+.13860504*e+.058047316*n),s=Fa(i-.13860504*e-.058047316*n),a=Fa(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Ba(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Ba(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Ba(-.090982811*o-.31272829*s+1.5227666*a)};return r!==void 0&&(l.alpha=r),l},Wd=t=>{let e=Dd(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Fd=t=>Vn(jd(t)),yb={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Wd,xyz65:Dd},toMode:{rgb:Fd,xyz65:jd},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ht,a:ht,b:ht,alpha:{use:ht,fixup:pe}}},Bd=({j:t,a:e,b:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"jch",j:t,c:i};return i&&(o.h=$e(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},Vd=({j:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"jab",j:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},vb={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Vd,rgb:t=>Fd(Vd(t))},fromMode:{rgb:t=>Bd(Wd(t)),jab:Bd},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ht,fixup:mn},c:ht,j:ht,alpha:{use:ht,fixup:pe}},difference:{h:oo},average:{h:yn}},mo=Math.pow(29,3)/Math.pow(3,3),Va=Math.pow(6,3)/Math.pow(29,3);let Ya=t=>Math.pow(t,3)>Va?Math.pow(t,3):(116*t-16)/mo;const Xa=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz50",x:Ya(o)*fe.X,y:Ya(i)*fe.Y,z:Ya(s)*fe.Z};return r!==void 0&&(a.alpha=r),a},ni=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Cr({r:t*3.1341359569958707-e*1.6173863321612538-.4906619460083532*n,g:t*-.978795502912089+e*1.916254567259524+.03344273116131949*n,b:t*.07195537988411677-e*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},Yd=t=>ni(Xa(t)),ri=t=>{let{r:e,g:n,b:r,alpha:i}=Pr(t),o={mode:"xyz50",x:.436065742824811*e+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*e+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*e+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(o.alpha=i),o},Ga=t=>t>Va?Math.cbrt(t):(mo*t+16)/116,qa=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Ga(t/fe.X),o=Ga(e/fe.Y),s=Ga(n/fe.Z),a={mode:"lab",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},Xd=t=>{let e=qa(ri(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function xb(t,e){if(!e||e[0]!=="lab")return;const n={mode:"lab"},[,r,i,o,s]=e;if(!(r.type===rt.Hue||i.type===rt.Hue||o.type===rt.Hue))return r.type!==rt.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==rt.None&&(n.a=i.type===rt.Number?i.value:i.value*125/100),o.type!==rt.None&&(n.b=o.type===rt.Number?o.value:o.value*125/100),s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Ua={mode:"lab",toMode:{xyz50:Xa,rgb:Yd},fromMode:{xyz50:qa,rgb:Xd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[xb],serialize:t=>`lab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:ht,a:ht,b:ht,alpha:{use:ht,fixup:pe}}},bb=He(Pe({},Ua),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Pd,rgb:so},fromMode:{xyz65:Cd,rgb:ao},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function wb(t,e){if(!e||e[0]!=="lch")return;const n={mode:"lch"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==rt.None&&(n.c=Math.max(0,i.type===rt.Number?i.value:i.value*150/100)),o.type!==rt.None){if(o.type===rt.Percentage)return;n.h=o.value}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Za={mode:"lch",toMode:{lab:In,rgb:t=>Yd(In(t))},fromMode:{rgb:t=>En(Xd(t)),lab:En},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[wb],serialize:t=>`lch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ht,fixup:mn},c:ht,l:ht,alpha:{use:ht,fixup:pe}},difference:{h:oo},average:{h:yn}},_b=He(Pe({},Za),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>In(t,"lab65"),rgb:t=>so(In(t,"lab65"))},fromMode:{rgb:t=>En(ao(t),"lch65"),lab65:t=>En(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Gd=({l:t,u:e,v:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"lchuv",l:t,c:i};return i&&(o.h=$e(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},qd=({l:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"luv",l:t,u:e?e*Math.cos(n/180*Math.PI):0,v:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Ud=(t,e,n)=>4*t/(t+15*e+3*n),Zd=(t,e,n)=>9*e/(t+15*e+3*n),$b=Ud(fe.X,fe.Y,fe.Z),Pb=Zd(fe.X,fe.Y,fe.Z),Cb=t=>t<=Va?mo*t:116*Math.cbrt(t)-16,Ka=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Cb(e/fe.Y),o=Ud(t,e,n),s=Zd(t,e,n);!isFinite(o)||!isFinite(s)?i=o=s=0:(o=13*i*(o-$b),s=13*i*(s-Pb));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},Ob=(t,e,n)=>4*t/(t+15*e+3*n),Mb=(t,e,n)=>9*e/(t+15*e+3*n),Sb=Ob(fe.X,fe.Y,fe.Z),Eb=Mb(fe.X,fe.Y,fe.Z),Qa=({l:t,u:e,v:n,alpha:r})=>{if(t===void 0&&(t=0),t===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),n===void 0&&(n=0);let i=e/(13*t)+Sb,o=n/(13*t)+Eb,s=fe.Y*(t<=8?t/mo:Math.pow((t+16)/116,3)),a=s*(9*i)/(4*o),l=s*(12-3*i-20*o)/(4*o),c={mode:"xyz50",x:a,y:s,z:l};return r!==void 0&&(c.alpha=r),c},Ib={mode:"lchuv",toMode:{luv:qd,rgb:t=>ni(Qa(qd(t)))},fromMode:{rgb:t=>Gd(Ka(ri(t))),luv:Gd},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ht,fixup:mn},c:ht,l:ht,alpha:{use:ht,fixup:pe}},difference:{h:oo},average:{h:yn}},Tb=He(Pe({},$r),{mode:"lrgb",toMode:{rgb:Cr},fromMode:{rgb:Pr},parse:["srgb-linear"],serialize:"srgb-linear"}),Ab={mode:"luv",toMode:{xyz50:Qa,rgb:t=>ni(Qa(t))},fromMode:{xyz50:Ka,rgb:t=>Ka(ri(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ht,u:ht,v:ht,alpha:{use:ht,fixup:pe}}},Kd=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*n),o=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*n),s=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*n),a={mode:"oklab",l:.210454268309314*i+.7936177747023054*o-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*o+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*o-.8086757549230774*s};return r!==void 0&&(a.alpha=r),a},yo=t=>{let e=Kd(Pr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},ii=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.pow(t+.3963377773761749*e+.2158037573099136*n,3),o=Math.pow(t-.1055613458156586*e-.0638541728258133*n,3),s=Math.pow(t-.0894841775298119*e-1.2914855480194092*n,3),a={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*o+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*o-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*o+1.7076146940746117*s};return r!==void 0&&(a.alpha=r),a},vo=t=>Cr(ii(t));function Ja(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function xo(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function kb(t,e){let n,r,i,o,s,a,l,c;-1.88170328*t-.80936493*e>1?(n=1.19086277,r=1.76576728,i=.59662641,o=.75515197,s=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,r=-.45954404,i=.08285427,o=.1254107,s=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,o=-.50559606,s=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let h=n+r*t+i*e+o*t*t+s*t*e,u=.3963377774*t+.2158037573*e,f=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let g=1+h*u,y=1+h*f,m=1+h*p,x=g*g*g,v=y*y*y,b=m*m*m,w=3*u*g*g,_=3*f*y*y,$=3*p*m*m,P=6*u*u*g,C=6*f*f*y,A=6*p*p*m,E=a*x+l*v+c*b,S=a*w+l*_+c*$,R=a*P+l*C+c*A;h=h-E*S/(S*S-.5*E*R)}return h}function tl(t,e){let n=kb(t,e),r=ii({l:1,a:n*t,b:n*e}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),o=i*n;return[i,o]}function Lb(t,e,n,r,i,o=null){o||(o=tl(t,e));let s;if((n-i)*o[1]-(o[0]-i)*r<=0)s=o[1]*i/(r*o[0]+o[1]*(i-n));else{s=o[1]*(i-1)/(r*(o[0]-1)+o[1]*(i-n));{let a=n-i,l=r,c=.3963377774*t+.2158037573*e,h=-.1055613458*t-.0638541728*e,u=-.0894841775*t-1.291485548*e,f=a+l*c,p=a+l*h,g=a+l*u;{let y=i*(1-s)+s*n,m=s*r,x=y+m*c,v=y+m*h,b=y+m*u,w=x*x*x,_=v*v*v,$=b*b*b,P=3*f*x*x,C=3*p*v*v,A=3*g*b*b,E=6*f*f*x,S=6*p*p*v,R=6*g*g*b,O=4.0767416621*w-3.3077115913*_+.2309699292*$-1,T=4.0767416621*P-3.3077115913*C+.2309699292*A,F=4.0767416621*E-3.3077115913*S+.2309699292*R,L=T/(T*T-.5*O*F),D=-O*L,k=-1.2684380046*w+2.6097574011*_-.3413193965*$-1,N=-1.2684380046*P+2.6097574011*C-.3413193965*A,j=-1.2684380046*E+2.6097574011*S-.3413193965*R,X=N/(N*N-.5*k*j),z=-k*X,M=-.0041960863*w-.7034186147*_+1.707614701*$-1,H=-.0041960863*P-.7034186147*C+1.707614701*A,B=-.0041960863*E-.7034186147*S+1.707614701*R,U=H/(H*H-.5*M*B),Y=-M*U;D=L>=0?D:1e6,z=X>=0?z:1e6,Y=U>=0?Y:1e6,s+=Math.min(D,Math.min(z,Y))}}}return s}function el(t,e,n=null){n||(n=tl(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function Qd(t,e,n){let r=tl(e,n),i=Lb(e,n,t,1,t,r),o=el(e,n,r),s=.11516993+1/(7.4477897+4.1590124*n+e*(-2.19557347+1.75198401*n+e*(-2.13704948-10.02301043*n+e*(-4.24894561+5.38770819*n+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(-.27087943+.6122399*n+e*(.00299215-.45399568*n-.14661872*e)))),l=i/Math.min(t*o[0],(1-t)*o[1]),c=t*s,h=(1-t)*a,u=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(h*h*h*h))));return c=t*.4,h=(1-t)*.8,[Math.sqrt(1/(1/(c*c)+1/(h*h))),u,i]}function Jd(t){const e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i={mode:"okhsl",l:Ja(e)};t.alpha!==void 0&&(i.alpha=t.alpha);let o=Math.sqrt(n*n+r*r);if(!o)return i.s=0,i;let[s,a,l]=Qd(e,n/o,r/o),c;if(o<a){let h=0,u=.8*s,f=1-u/a;c=(o-h)/(u+f*(o-h))*.8}else{let h=a,u=.2*a*a*1.25*1.25/s,f=1-u/(l-a);c=.8+.2*((o-h)/(u+f*(o-h)))}return c&&(i.s=c,i.h=$e(Math.atan2(r,n)*180/Math.PI)),i}function tu(t){let e=t.h!==void 0?t.h:0,n=t.s!==void 0?t.s:0,r=t.l!==void 0?t.l:0;const i={mode:"oklab",l:xo(r)};if(t.alpha!==void 0&&(i.alpha=t.alpha),!n||r===1)return i.a=i.b=0,i;let o=Math.cos(e/180*Math.PI),s=Math.sin(e/180*Math.PI),[a,l,c]=Qd(i.l,o,s),h,u,f,p;n<.8?(h=1.25*n,u=0,f=.8*a,p=1-f/l):(h=5*(n-.8),u=l,f=.2*l*l*1.25*1.25/a,p=1-f/(c-l));let g=u+h*f/(1-p*h);return i.a=g*o,i.b=g*s,i}const zb=He(Pe({},Id),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Jd,rgb:t=>Jd(yo(t))},toMode:{oklab:tu,rgb:t=>vo(tu(t))}});function eu(t){let e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i=Math.sqrt(n*n+r*r),o=i?n/i:1,s=i?r/i:1,[a,l]=el(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=xo(f),y=p*g/f,m=ii({l:g,a:o*y,b:s*y}),x=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));e=e/x,i=i/x*Ja(e)/e,e=Ja(e);const v={mode:"okhsv",s:i?(c+l)*p/(l*c+l*h*p):0,v:e?e/f:0};return v.s&&(v.h=$e(Math.atan2(r,n)*180/Math.PI)),t.alpha!==void 0&&(v.alpha=t.alpha),v}function nu(t){const e={mode:"oklab"};t.alpha!==void 0&&(e.alpha=t.alpha);const n=t.h!==void 0?t.h:0,r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,o=Math.cos(n/180*Math.PI),s=Math.sin(n/180*Math.PI),[a,l]=el(o,s),c=.5,h=1-c/a,u=1-r*c/(c+l-l*h*r),f=r*l*c/(c+l-l*h*r),p=xo(u),g=f*p/u,y=ii({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),x=xo(i*u),v=f*x/u;return e.l=x*m,e.a=v*o*m,e.b=v*s*m,e}const Hb=He(Pe({},kd),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:eu,rgb:t=>eu(yo(t))},toMode:{oklab:nu,rgb:t=>vo(nu(t))}});function Rb(t,e){if(!e||e[0]!=="oklab")return;const n={mode:"oklab"},[,r,i,o,s]=e;if(!(r.type===rt.Hue||i.type===rt.Hue||o.type===rt.Hue))return r.type!==rt.None&&(n.l=Math.min(Math.max(0,r.type===rt.Number?r.value:r.value/100),1)),i.type!==rt.None&&(n.a=i.type===rt.Number?i.value:i.value*.4/100),o.type!==rt.None&&(n.b=o.type===rt.Number?o.value:o.value*.4/100),s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Db=He(Pe({},Ua),{mode:"oklab",toMode:{lrgb:ii,rgb:vo},fromMode:{lrgb:Kd,rgb:yo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Rb],serialize:t=>`oklab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`});function Nb(t,e){if(!e||e[0]!=="oklch")return;const n={mode:"oklch"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Hue)return;n.l=Math.min(Math.max(0,r.type===rt.Number?r.value:r.value/100),1)}if(i.type!==rt.None&&(n.c=Math.max(0,i.type===rt.Number?i.value:i.value*.4/100)),o.type!==rt.None){if(o.type===rt.Percentage)return;n.h=o.value}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const ru=He(Pe({},Za),{mode:"oklch",toMode:{oklab:t=>In(t,"oklab"),rgb:t=>vo(In(t,"oklab"))},fromMode:{rgb:t=>En(yo(t),"oklch"),oklab:t=>En(t,"oklch")},parse:[Nb],serialize:t=>`oklch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),iu=t=>{let{r:e,g:n,b:r,alpha:i}=Pr(t),o={mode:"xyz65",x:.486570948648216*e+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*e+.6917385218365062*n+.079286914093745*r,z:0*e+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(o.alpha=i),o},ou=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Cr({r:t*2.4934969119414263-e*.9313836179191242-.402710784450717*n,g:t*-.8294889695615749+e*1.7626640603183465+.0236246858419436*n,b:t*.0358458302437845-e*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(i.alpha=r),i},jb=He(Pe({},$r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>ou(Bn(t)),xyz65:ou},toMode:{rgb:t=>Vn(iu(t)),xyz65:iu}}),nl=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},su=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"prophoto",r:nl(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:nl(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:nl(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},rl=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},au=t=>{let e=rl(t.r),n=rl(t.g),r=rl(t.b),i={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*r,z:0*e+0*n+.8251046025104602*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Wb=He(Pe({},$r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:su,rgb:t=>su(ri(t))},toMode:{xyz50:au,rgb:t=>ni(au(t))}}),lu=1.09929682680944,Fb=.018053968510807,il=t=>{const e=Math.abs(t);return e>Fb?(Math.sign(t)||1)*(lu*Math.pow(e,.45)-(lu-1)):4.5*t},cu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"rec2020",r:il(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:il(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:il(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},hu=1.09929682680944,Bb=.018053968510807,ol=(t=0)=>{let e=Math.abs(t);return e<Bb*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+hu-1)/hu,1/.45)},du=t=>{let e=ol(t.r),n=ol(t.g),r=ol(t.b),i={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*e+.6779980715188708*n+.059301716469862*r,z:0*e+.0280726930490874*n+1.0609850577107909*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},Vb=He(Pe({},$r),{mode:"rec2020",fromMode:{xyz65:cu,rgb:t=>cu(Bn(t))},toMode:{xyz65:du,rgb:t=>Vn(du(t))},parse:["rec2020"],serialize:"rec2020"}),Yn=.0037930732552754493,uu=Math.cbrt(Yn),sl=t=>Math.cbrt(t)-uu,Yb=t=>{const{r:e,g:n,b:r,alpha:i}=Pr(t),o=sl(.3*e+.622*n+.078*r+Yn),s=sl(.23*e+.692*n+.078*r+Yn),a=sl(.2434226892454782*e+.2047674442449682*n+.5518098665095535*r+Yn),l={mode:"xyb",x:(o-s)/2,y:(o+s)/2,b:a-(o+s)/2};return i!==void 0&&(l.alpha=i),l},al=t=>Math.pow(t+uu,3),Xb={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:t,y:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=al(t+e)-Yn,o=al(e-t)-Yn,s=al(n+e)-Yn,a=Cr({r:11.031566904639861*i-9.866943908131562*o-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*o-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*o+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:Yb},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ht,y:ht,b:ht,alpha:{use:ht,fixup:pe}}},Gb={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:ni,lab:qa},fromMode:{rgb:ri,lab:Xa},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ht,y:ht,z:ht,alpha:{use:ht,fixup:pe}}},qb={mode:"xyz65",toMode:{rgb:Vn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(o.alpha=i),o}},fromMode:{rgb:Bn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(o.alpha=i),o}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ht,y:ht,z:ht,alpha:{use:ht,fixup:pe}}},Ub={mode:"yiq",toMode:{rgb:({y:t,i:e,q:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"rgb",r:t+.95608445*e+.6208885*n,g:t-.27137664*e-.6486059*n,b:t-1.10561724*e+1.70250126*n};return r!==void 0&&(i.alpha=r),i}},fromMode:{rgb:({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*n,i:.59597799*t-.2741761*e-.32180189*n,q:.21147017*t-.52261711*e+.31114694*n};return r!==void 0&&(i.alpha=r),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ht,i:ht,q:ht,alpha:{use:ht,fixup:pe}}},Zb=t=>Math.max(0,Math.min(1,t||0)),bo=t=>Math.round(Zb(t)*255),fu=Ca("rgb"),pu=t=>{if(t===void 0)return;let e=bo(t.r),n=bo(t.g),r=bo(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},Kb=t=>{if(t===void 0)return;let e=bo(t.alpha!==void 0?t.alpha:1);return pu(t)+(256|e).toString(16).slice(1)},oi=t=>pu(fu(t)),Qb=t=>Kb(fu(t));function ll(t){let e=Ca("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function cl(t,e){let n=ll(t),r=ll(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Yt(Vx),Yt(Kx),Yt(Qx),Yt(Jx),Yt(nb),Yt(Id),Yt(kd),Yt(ub),Yt(fb),Yt(yb),Yt(vb),Yt(Ua),Yt(bb),Yt(Za),Yt(_b),Yt(Ib),Yt(Tb),Yt(Ab),Yt(zb),Yt(Hb),Yt(Db);const gu=Yt(ru);Yt(jb),Yt(Wb),Yt(Vb),Yt($r),Yt(Xb),Yt(Gb),Yt(qb),Yt(Ub);function Xn(t){if(!t)return!1;const e=t.trim().toLowerCase();return!(e==="none"||e==="transparent"||e==="")}function mu(t){const e=on(t);return e?ll(e)<.5:!1}var Tn=Array.isArray,yu=typeof global=="object"&&global&&global.Object===Object&&global,Jb=typeof self=="object"&&self&&self.Object===Object&&self,sn=yu||Jb||Function("return this")(),An=sn.Symbol,vu=Object.prototype,t4=vu.hasOwnProperty,e4=vu.toString,si=An?An.toStringTag:void 0;function n4(t){var e=t4.call(t,si),n=t[si];try{t[si]=void 0;var r=!0}catch(o){}var i=e4.call(t);return r&&(e?t[si]=n:delete t[si]),i}var r4=Object.prototype,i4=r4.toString;function o4(t){return i4.call(t)}var s4="[object Null]",a4="[object Undefined]",xu=An?An.toStringTag:void 0;function Gn(t){return t==null?t===void 0?a4:s4:xu&&xu in Object(t)?n4(t):o4(t)}function kn(t){return t!=null&&typeof t=="object"}var l4="[object Symbol]";function wo(t){return typeof t=="symbol"||kn(t)&&Gn(t)==l4}var c4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,h4=/^\w*$/;function d4(t,e){if(Tn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||wo(t)?!0:h4.test(t)||!c4.test(t)||e!=null&&t in Object(e)}function an(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var u4="[object AsyncFunction]",f4="[object Function]",p4="[object GeneratorFunction]",g4="[object Proxy]";function hl(t){if(!an(t))return!1;var e=Gn(t);return e==f4||e==p4||e==u4||e==g4}var dl=sn["__core-js_shared__"],bu=(function(){var t=/[^.]+$/.exec(dl&&dl.keys&&dl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function m4(t){return!!bu&&bu in t}var y4=Function.prototype,v4=y4.toString;function qn(t){if(t!=null){try{return v4.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var x4=/[\\^$.*+?()[\]{}|]/g,b4=/^\[object .+?Constructor\]$/,w4=Function.prototype,_4=Object.prototype,$4=w4.toString,P4=_4.hasOwnProperty,C4=RegExp("^"+$4.call(P4).replace(x4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O4(t){if(!an(t)||m4(t))return!1;var e=hl(t)?C4:b4;return e.test(qn(t))}function M4(t,e){return t==null?void 0:t[e]}function Un(t,e){var n=M4(t,e);return O4(n)?n:void 0}var ai=Un(Object,"create");function S4(){this.__data__=ai?ai(null):{},this.size=0}function E4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var I4="__lodash_hash_undefined__",T4=Object.prototype,A4=T4.hasOwnProperty;function k4(t){var e=this.__data__;if(ai){var n=e[t];return n===I4?void 0:n}return A4.call(e,t)?e[t]:void 0}var L4=Object.prototype,z4=L4.hasOwnProperty;function H4(t){var e=this.__data__;return ai?e[t]!==void 0:z4.call(e,t)}var R4="__lodash_hash_undefined__";function D4(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ai&&e===void 0?R4:e,this}function Zn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Zn.prototype.clear=S4,Zn.prototype.delete=E4,Zn.prototype.get=k4,Zn.prototype.has=H4,Zn.prototype.set=D4;function N4(){this.__data__=[],this.size=0}function _o(t,e){return t===e||t!==t&&e!==e}function $o(t,e){for(var n=t.length;n--;)if(_o(t[n][0],e))return n;return-1}var j4=Array.prototype,W4=j4.splice;function F4(t){var e=this.__data__,n=$o(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():W4.call(e,n,1),--this.size,!0}function B4(t){var e=this.__data__,n=$o(e,t);return n<0?void 0:e[n][1]}function V4(t){return $o(this.__data__,t)>-1}function Y4(t,e){var n=this.__data__,r=$o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function vn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}vn.prototype.clear=N4,vn.prototype.delete=F4,vn.prototype.get=B4,vn.prototype.has=V4,vn.prototype.set=Y4;var li=Un(sn,"Map");function X4(){this.size=0,this.__data__={hash:new Zn,map:new(li||vn),string:new Zn}}function G4(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Po(t,e){var n=t.__data__;return G4(e)?n[typeof e=="string"?"string":"hash"]:n.map}function q4(t){var e=Po(this,t).delete(t);return this.size-=e?1:0,e}function U4(t){return Po(this,t).get(t)}function Z4(t){return Po(this,t).has(t)}function K4(t,e){var n=Po(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Ln(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ln.prototype.clear=X4,Ln.prototype.delete=q4,Ln.prototype.get=U4,Ln.prototype.has=Z4,Ln.prototype.set=K4;var Q4="Expected a function";function ul(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Q4);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(ul.Cache||Ln),n}ul.Cache=Ln;var J4=500;function t5(t){var e=ul(t,function(r){return n.size===J4&&n.clear(),r}),n=e.cache;return e}var e5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n5=/\\(\\)?/g,r5=t5(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(e5,function(n,r,i,o){e.push(i?o.replace(n5,"$1"):r||n)}),e});function i5(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var wu=An?An.prototype:void 0,_u=wu?wu.toString:void 0;function $u(t){if(typeof t=="string")return t;if(Tn(t))return i5(t,$u)+"";if(wo(t))return _u?_u.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ci(t){return t==null?"":$u(t)}function o5(t,e){return Tn(t)?t:d4(t,e)?[t]:r5(ci(t))}function s5(t){if(typeof t=="string"||wo(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function a5(t,e){e=o5(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[s5(e[n++])];return n&&n==r?t:void 0}function Pu(t,e,n){var r=t==null?void 0:a5(t,e);return r===void 0?n:r}function hi(t,e){if(e.length===0)return{};const n=Array.isArray(t)?t[e[0]]:t.items[e[0]];if(e.length===1)return n;const r=e.slice(1).map(i=>`children[${i}]`).join(".");return Pu(n,r)}function Cu(t){const{structure:e,item:n,items:r}=t;return!(!e||!n||r.some(i=>!i))}function l5(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function c5(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:l5(t,e,n)}var h5="\\ud800-\\udfff",d5="\\u0300-\\u036f",u5="\\ufe20-\\ufe2f",f5="\\u20d0-\\u20ff",p5=d5+u5+f5,g5="\\ufe0e\\ufe0f",m5="\\u200d",y5=RegExp("["+m5+h5+p5+g5+"]");function Ou(t){return y5.test(t)}function v5(t){return t.split("")}var Mu="\\ud800-\\udfff",x5="\\u0300-\\u036f",b5="\\ufe20-\\ufe2f",w5="\\u20d0-\\u20ff",_5=x5+b5+w5,$5="\\ufe0e\\ufe0f",P5="["+Mu+"]",fl="["+_5+"]",pl="\\ud83c[\\udffb-\\udfff]",C5="(?:"+fl+"|"+pl+")",Su="[^"+Mu+"]",Eu="(?:\\ud83c[\\udde6-\\uddff]){2}",Iu="[\\ud800-\\udbff][\\udc00-\\udfff]",O5="\\u200d",Tu=C5+"?",Au="["+$5+"]?",M5="(?:"+O5+"(?:"+[Su,Eu,Iu].join("|")+")"+Au+Tu+")*",S5=Au+Tu+M5,E5="(?:"+[Su+fl+"?",fl,Eu,Iu,P5].join("|")+")",I5=RegExp(pl+"(?="+pl+")|"+E5+S5,"g");function T5(t){return t.match(I5)||[]}function A5(t){return Ou(t)?T5(t):v5(t)}function k5(t){return function(e){e=ci(e);var n=Ou(e)?A5(e):void 0,r=n?n[0]:e.charAt(0),i=n?c5(n,1).join(""):e.slice(1);return r[t]()+i}}var L5=k5("toUpperCase");function z5(t){return L5(ci(t).toLowerCase())}function H5(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)n=e(n,t[i],i,t);return n}function R5(t){return function(e){return t==null?void 0:t[e]}}var D5={À:"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"},N5=R5(D5),j5=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,W5="\\u0300-\\u036f",F5="\\ufe20-\\ufe2f",B5="\\u20d0-\\u20ff",V5=W5+F5+B5,Y5="["+V5+"]",X5=RegExp(Y5,"g");function G5(t){return t=ci(t),t&&t.replace(j5,N5).replace(X5,"")}var q5=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function U5(t){return t.match(q5)||[]}var Z5=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function K5(t){return Z5.test(t)}var ku="\\ud800-\\udfff",Q5="\\u0300-\\u036f",J5="\\ufe20-\\ufe2f",t6="\\u20d0-\\u20ff",e6=Q5+J5+t6,Lu="\\u2700-\\u27bf",zu="a-z\\xdf-\\xf6\\xf8-\\xff",n6="\\xac\\xb1\\xd7\\xf7",r6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",i6="\\u2000-\\u206f",o6=" \\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",Hu="A-Z\\xc0-\\xd6\\xd8-\\xde",s6="\\ufe0e\\ufe0f",Ru=n6+r6+i6+o6,Du="['’]",Nu="["+Ru+"]",a6="["+e6+"]",ju="\\d+",l6="["+Lu+"]",Wu="["+zu+"]",Fu="[^"+ku+Ru+ju+Lu+zu+Hu+"]",c6="\\ud83c[\\udffb-\\udfff]",h6="(?:"+a6+"|"+c6+")",d6="[^"+ku+"]",Bu="(?:\\ud83c[\\udde6-\\uddff]){2}",Vu="[\\ud800-\\udbff][\\udc00-\\udfff]",Mr="["+Hu+"]",u6="\\u200d",Yu="(?:"+Wu+"|"+Fu+")",f6="(?:"+Mr+"|"+Fu+")",Xu="(?:"+Du+"(?:d|ll|m|re|s|t|ve))?",Gu="(?:"+Du+"(?:D|LL|M|RE|S|T|VE))?",qu=h6+"?",Uu="["+s6+"]?",p6="(?:"+u6+"(?:"+[d6,Bu,Vu].join("|")+")"+Uu+qu+")*",g6="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",m6="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",y6=Uu+qu+p6,v6="(?:"+[l6,Bu,Vu].join("|")+")"+y6,x6=RegExp([Mr+"?"+Wu+"+"+Xu+"(?="+[Nu,Mr,"$"].join("|")+")",f6+"+"+Gu+"(?="+[Nu,Mr+Yu,"$"].join("|")+")",Mr+"?"+Yu+"+"+Xu,Mr+"+"+Gu,m6,g6,ju,v6].join("|"),"g");function b6(t){return t.match(x6)||[]}function w6(t,e,n){return t=ci(t),e=e,e===void 0?K5(t)?b6(t):U5(t):t.match(e)||[]}var _6="['’]",$6=RegExp(_6,"g");function Zu(t){return function(e){return H5(w6(G5(e).replace($6,"")),t,"")}}var P6=Zu(function(t,e,n){return e=e.toLowerCase(),t+(n?z5(e):e)});const C6=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Kn(t){const e=[];let n="",r=null;const i=()=>{const o=n.trim();o&&e.push(o),n=""};for(let o=0;o<t.length;o+=1){const s=t[o];if(r){n+=s,s===r&&(r=null);continue}if(s==='"'||s==="'"){r=s,n+=s;continue}if(s===","){i();continue}n+=s}return i(),e}function Ku(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function O6(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function M6(t){return/^\d/.test(t)||/\s/.test(t)}function S6(t){const e=t.trim();if(!e||O6(e)||C6.has(e.toLowerCase())||!M6(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Sr(t){const e=Kn(t);return e.length?e.length===1?Ku(e[0]):e.map(n=>Ku(n)).join(", "):""}function Qn(t){const e=Kn(t);return e.length?e.map(n=>S6(n)).join(", "):t.trim()}const E6={100:"thin",hairline:"thin",thin:"thin",200:"extralight",ultralight:"extralight",extralight:"extralight",300:"light",light:"light",400:"regular",normal:"regular",regular:"regular",500:"medium",medium:"medium",600:"semibold",demibold:"semibold",semibold:"semibold",700:"bold",bold:"bold",800:"extrabold",ultrabold:"extrabold",extrabold:"extrabold",900:"black",heavy:"black",black:"black",950:"extrablack",ultrablack:"extrablack",extrablack:"extrablack"};function Qu(t){const e=String(t).toLowerCase();return E6[e]||"regular"}function $t(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Qt(n,e),n}function Er(t){const n=new DOMParser().parseFromString(t,"image/svg+xml");if(n.querySelector("parsererror"))throw new Error("Invalid SVG string");return n.documentElement}function Qt(t,e){Object.entries(e).forEach(([n,r])=>{r==null?t.removeAttribute(n):t.setAttribute(n,r)})}function Re(t,e,n=!0){return e.reduce((r,i)=>{const o=t.getAttribute(i);return(!n||o!==null&&o!==""&&o!==void 0)&&(r[i]=o),r},{})}function I6(t,e){e.forEach(n=>{t.removeAttribute(n)})}function gl(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{gl(r,e)})}function Co(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",r=t.querySelector(n);if(r)return r;const i=$t("defs");return e&&(i.id=e),t.prepend(i),i}var Ju=Object.getOwnPropertySymbols,T6=Object.prototype.hasOwnProperty,A6=Object.prototype.propertyIsEnumerable,k6=(t,e)=>{var n={};for(var r in t)T6.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ju)for(var r of Ju(t))e.indexOf(r)<0&&A6.call(t,r)&&(n[r]=t[r]);return n};function Jn(t){return nf(t)?t.querySelector("span"):null}function L6(t,e){const n=document.createElement("span"),r=$t("foreignObject",{overflow:"visible"});return r.appendChild(n),tf(r,{textContent:t,attributes:e}),r}function tf(t,e){const{textContent:n,attributes:r}=e;if(n!==void 0&&yl(t,n),!r)return;const i=Jn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,H6(r)),!o||!s){const p=R6(i);!o&&!t.hasAttribute("width")&&(o=String(p.width)),!s&&!t.hasAttribute("height")&&(s=String(p.height))}const{"data-horizontal-align":u,"data-vertical-align":f}=r;Object.assign(i.style,z6(u,f))}const{id:l,x:c,y:h}=r;l&&(a.id=l),c!==void 0&&(a.x=String(c)),h!==void 0&&(a.y=String(h)),o!==void 0&&(a.width=String(o)),s!==void 0&&(a.height=String(s)),Qt(t,a)}function z6(t,e){const n={width:"100%",height:"100%",display:"flex",flexWrap:"wrap",wordBreak:"break-word",whiteSpace:"pre-wrap"};switch(t){case"LEFT":n.textAlign="left",n.justifyContent="flex-start";break;case"CENTER":n.textAlign="center",n.justifyContent="center";break;case"RIGHT":n.textAlign="right",n.justifyContent="flex-end";break}switch(e){case"TOP":n.alignContent="flex-start",n.alignItems="flex-start";break;case"MIDDLE":n.alignContent="center",n.alignItems="center";break;case"BOTTOM":n.alignContent="flex-end",n.alignItems="flex-end";break}return n}function H6(t){const e=t,{x:n,y:r,width:i,height:o,["data-horizontal-align"]:s,["data-vertical-align"]:a,["font-size"]:l,["letter-spacing"]:c,["line-height"]:h,fill:u,["stroke-width"]:f,["text-anchor"]:p,["dominant-baseline"]:g,["font-family"]:y}=e,m=k6(e,["x","y","width","height","data-horizontal-align","data-vertical-align","font-size","letter-spacing","line-height","fill","stroke-width","text-anchor","dominant-baseline","font-family"]),x={overflow:"visible"};return u&&(x.color=u),Object.entries(m).forEach(([v,b])=>{x[P6(v)]=b}),l&&(x.fontSize=`${l}px`),h&&(x.lineHeight=typeof h=="string"&&h.endsWith("px")?h:+h),c&&(x.letterSpacing=`${c}px`),f&&(x.strokeWidth=`${f}px`),x.fontFamily=y?Qn(y):y||"",x}function R6(t){const e=t.parentNode;t.style.visibility="hidden",document.body.appendChild(t);const n=t.getBoundingClientRect();return e?e.appendChild(t):document.body.removeChild(t),t.style.visibility="visible",n}function ml(t){var e;return((e=Jn(t))==null?void 0:e.innerText)||""}function yl(t,e){const n=Jn(t);n&&(n.innerText=e)}function vl(t){const e=Jn(t);if(!e)return{};const{color:n,fontSize:r,fontFamily:i,justifyContent:o,alignContent:s,fontWeight:a}=e.style,[l,c]=D6(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Sr(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:ml(t)}}function D6(t,e){let n="LEFT",r="TOP";switch(t){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT";break}switch(e){case"flex-start":r="TOP";break;case"center":r="MIDDLE";break;case"flex-end":r="BOTTOM";break}return[n,r]}const Me=(t,e)=>{var n;return((n=t==null?void 0:t.dataset)==null?void 0:n.elementType)===e},N6=t=>Me(t,"title"),j6=t=>Me(t,"desc"),W6=t=>Me(t,"shape"),F6=t=>Me(t,"shapes-group"),B6=t=>Me(t,"illus"),V6=t=>t instanceof SVGElement&&t.tagName==="text",Y6=t=>t instanceof SVGElement&&t.tagName==="g",xl=t=>Me(t,"item-icon"),ef=t=>Me(t,"item-icon-group"),X6=t=>Me(t,"item-label"),G6=t=>Me(t,"item-desc"),q6=t=>Me(t,"item-value"),U6=t=>Me(t,"item-illus"),Z6=t=>Me(t,"edit-area"),K6=t=>Me(t,"btns-group"),Q6=t=>Me(t,"rough-element"),J6=t=>Me(t,"rough-volume");function nf(t){return t.tagName==="foreignObject"}function tw(t){return t.tagName==="SPAN"}function xn(t){const e=bl(t);return[zt.Title,zt.Desc,zt.ItemLabel,zt.ItemDesc].includes(e)}function rf(t){if(!t||!xn(t))return!1;const e=Jn(t);return e?e.hasAttribute("contenteditable"):!1}function ew(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function zn(t){return xl(t)||ef(t)}function nw(t){let e=t;for(;e;){if(Ir(e,_a))return!0;e=e.parentElement}return!1}function di(t,e){t.setAttribute("data-element-type",e)}function Ir(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function bl(t){return zn(t)?zt.ItemIcon:t.getAttribute("data-element-type")||zt.Unknown}function rw(t){var e,n,r,i=t;function o(a,l){++e>i&&(r=n,s(1),++e),n[a]=l}function s(a){e=0,n=Object.create(null),a||(r=Object.create(null))}return s(),{clear:s,has:function(a){return n[a]!==void 0||r[a]!==void 0},get:function(a){var l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set:function(a,l){n[a]!==void 0?n[a]=l:o(a,l)}}}var of=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const sf=globalThis.fetch,wl=rw(1024),_l=new Map;function iw(t){const e=Array.from(t.headers.entries());return e.length===0?"":(e.sort(([n],[r])=>n.toLowerCase().localeCompare(r.toLowerCase())),e.map(([n,r])=>`${n.toLowerCase()}:${r}`).join("|"))}function ow(t){const e=iw(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}function af(t){return new Response(t.body.slice(0),t.init)}function sw(t,e){return of(this,null,function*(){try{const n=yield sf(t),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&wl.set(e,i),i}finally{_l.delete(e)}})}function Oo(t,e){return of(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return sf(n);const r=ow(n);if(wl.has(r))return af(wl.get(r));let i=_l.get(r);i||(i=sw(n,r),_l.set(r,i));const o=yield i;return af(o)})}function aw(t,e={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:r}=t,i=[],o=l=>" ".repeat(l);function s(l,c,h){const u=e[l];return u?`${o(h)}/** ${u} */
|
|
5
5
|
${o(h)}${l}: ${c};`:`${o(h)}${l}: ${c};`}function a(l,c){const h=r[l],u=[];for(const f of h){const p=f==="value"?"number":"string";u.push(s(f,p,c+1))}return r[l+1]&&u.push(s("children",`Array<${a(l+1,c+1)}>`,c+1)),`{
|
|
6
6
|
${u.join(`
|
|
7
7
|
`)}
|
|
8
8
|
${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push(s("title","string",1)),i.push(s("desc","string",1))),n.includes("item")&&r.length>0&&i.push(s("items",`Array<${a(0,1)}>`,1)),i.push("}"),i.join(`
|
|
9
|
-
`)}function
|
|
9
|
+
`)}function lf(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString()}var lw=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function cw(t){return t.startsWith("data:")}function ui(t){return lw(this,null,function*(){var e;if(!t||!cw(t))return null;const n=(e=t.match(/^data:([^;]+)/))==null?void 0:e[1];if(!n)return null;const r=()=>new Promise((c,h)=>{const u=new Image;u.onload=()=>{const f=u.naturalWidth,p=u.naturalHeight,g=document.createElement("canvas"),y=g.getContext("2d");if(!y)return c({width:f,height:p,hasAlpha:!1});if(["image/jpeg","image/jpg","image/webp","image/gif"].includes(n))return c({width:f,height:p,hasAlpha:!1});g.width=f,g.height=p,y.drawImage(u,0,0);let m=!1;const x=10;for(let v=0;v<f&&!m;v+=x)for(let b=0;b<p;b+=x)if(y.getImageData(v,b,1,1).data[3]<255){m=!0;break}c({width:f,height:p,hasAlpha:m})},u.onerror=()=>h(new Error("Failed to analysis image")),u.src=t}),{width:i,height:o,hasAlpha:s}=yield r(),l=(()=>{if(s||n!=null&&n.includes("image/gif")||n!=null&&n.includes("image/svg")||Math.min(i,o)<=200)return"xMidYMid meet";const h=i/o;return h>=.6&&h<=1.67||h<.3||h>3.33?"xMidYMid meet":"xMidYMid slice"})();return Er(`
|
|
10
10
|
<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${i} ${o}" preserveAspectRatio="${l}">
|
|
11
11
|
<image href="${t}" width="${i}" height="${o}" />
|
|
12
|
-
</symbol>`)})}function V4(t){return t.startsWith("<svg")||t.startsWith("<symbol")}function Er(t){if(!t||!V4(t))return null;const e=t.startsWith("<svg")?t.replace(/<svg/,"<symbol").replace(/svg>/,"symbol>"):t;return Mr(e)}var Y4=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function X4(t){try{return!!new URL(t)}catch(e){return!1}}function G4(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function tf(t,e){return Y4(this,null,function*(){if(!t||!X4(t))return null;const n=yield wo(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(G4(r,e)){const s=yield n.text();return Er(s)}const i=yield n.blob(),o=yield q4(i);return si(o)})}function q4(t){return new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=n,r.readAsDataURL(t)})}var ef=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const U4=t=>ef(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${Yv}?${n.toString()}`,i=yield wo(r);if(!i.ok)return null;const o=yield i.json();return!(o!=null&&o.status)||!Array.isArray((e=o.data)==null?void 0:e.data)?null:o.data.data[0]||null}catch(n){return console.error(`Failed to query icon for "${t}":`,n),null}});function Z4(t){return t.startsWith("data:")}function K4(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function Q4(t,e){return ef(this,null,function*(){var n;if(!t)return null;const r=yield U4(t);if(!r)return null;if(K4(r))return Er(r);if(Z4(r)){const i=((n=r.match(/^data:([^;]+)/))==null?void 0:n[1])||"",o=r.includes(";base64,");if(i==="image/svg+xml"&&!o){const s=r.indexOf(","),a=s>=0?r.slice(s+1):r;return Er(a)}return si(r)}return tf(r,e)})}let nf=null;function J4(t){nf=t}function t5(){return nf}function e5(t){if(!t.startsWith("data:"))return null;const e=t.indexOf(",");if(e===-1)return null;const n=t.slice(5,e),r=t.slice(e+1),i=n.split(";"),o=i[0],s=i.includes("base64");return o==="image/svg+xml"&&!s?{source:"inline",format:"svg",encoding:"raw",data:r.startsWith("%3C")?decodeURIComponent(r):r}:o.startsWith("image/")?{source:"inline",format:o==="image/svg+xml"?"svg":"image",encoding:s?"base64":"data-uri",data:t}:null}const n5=new Set(["svg","png","jpg","jpeg","webp","gif"]);function r5(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function i5(t){const e=t.toLowerCase();if(e.endsWith(".svg")||e.includes(".svg?"))return"svg";if(e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".webp")||e.endsWith(".gif"))return"image"}function o5(t){var e;if(!t.startsWith("ref:"))return null;const n=t.slice(4),[r,...i]=n.split(":");if(!r||i.length===0)return null;let o;i.length>1&&n5.has(i[0].toLowerCase())&&(o=(e=i.shift())==null?void 0:e.toLowerCase());const s=i.join(":");if(!s)return null;const a=r==="url"?"remote":r;return a==="remote"?{source:"remote",format:o||i5(s)||void 0,data:s}:a==="search"?{source:"search",format:o||"svg",data:s}:a==="svg"?{source:"inline",format:"svg",data:s,encoding:"raw"}:{source:"custom",data:t,format:o}}function _o(t){if(!t)return null;if(typeof t!="string"){if(t.source)return t;const r=t;return r.type==="image"?{source:"inline",format:"image",data:r.data}:r.type==="svg"?{source:"inline",format:"svg",encoding:"raw",data:r.data}:r.type==="remote"?{source:"remote",format:r.format,data:r.data}:r.type==="search"?{source:"search",format:r.format||"svg",data:r.data}:r.type==="custom"?{source:"custom",data:r.data}:null}const e=e5(t);if(e)return e;const n=o5(t);return n||(r5(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function vl(t){const e=typeof t=="string"?_o(t):t;return e?"rsc-"+Ju(JSON.stringify(e)):null}function rf(t){const e=vl(t);return e?`#${e}`:null}var of=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function s5(t,e){return of(this,null,function*(){const n=_o(e);if(!n)return null;n.scene||(n.scene=t);const{source:r,data:i,format:o,encoding:s}=n;if(r==="inline"){const a=i.startsWith("data:");return o==="svg"&&s==="raw"?Er(i):o==="svg"&&a?yield si(i):a||o==="image"?yield si(i):Er(i)}else{if(r==="remote")return yield tf(i,o);if(r==="search")return yield Q4(i,o);{const a=t5();if(a)return yield a(n)}}return null})}const sf=new Map,bl=new WeakMap;function af(t,e,n){return of(this,null,function*(){if(!t)return null;const r=_o(n);if(!r)return null;const i=vl(r),o=sf.has(i)?sf.get(i)||null:yield s5(e,r);if(!o)return null;bl.has(t)||bl.set(t,new Map);const s=bl.get(t);if(s.has(i))return i;const a=xo(t);return o.id=i,a.appendChild(o),s.set(i,o),i})}var a5=Object.defineProperty,l5=Object.defineProperties,c5=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,h5=Object.prototype.hasOwnProperty,d5=Object.prototype.propertyIsEnumerable,cf=(t,e,n)=>e in t?a5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u5=(t,e)=>{for(var n in e||(e={}))h5.call(e,n)&&cf(t,n,e[n]);if(lf)for(var n of lf(e))d5.call(e,n)&&cf(t,n,e[n]);return t},f5=(t,e)=>l5(t,c5(e));const p5=new WeakMap;function g5(t,e={}){const n=wt("use",f5(u5({},e),{href:rf(t)}));return hf(n),p5.set(n,t),n}function hf(t){const{stroke:e,fill:n}=ke(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function $o(t){return t.tagName==="use"?t:t.querySelector("use")}function xl(t){const e=$o(t);return e?ke(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function m5(t,e,n){const r=$o(t);r&&(n&&Yt(r,n),hf(r))}const y5=",",v5=(t,e=y5)=>t.split(e).map(n=>parseInt(n,10)),df=t=>v5(t);function wl(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Po=new Map;let b5="sans-serif";const x5={fontFamily:"sans-serif",fontWeight:400,fontStyle:"normal",unitsPerEm:2048,metrics:{ascender:2189,descender:-555,lineGap:0},glyphs:{'"':727,"%":1821,"'":391,"(":682,")":682,"*":797,"+":1196,"-":682,"<":1196,"=":1196,">":1196,"@":2079,C:1479,D:1479,F:1251,G:1593,H:1479,J:1024,M:1706,N:1479,O:1593,Q:1593,R:1479,T:1251,U:1479,W:1933,Z:1251,"^":961,_:1024,"`":682,c:1024,i:455,j:455,k:1024,l:455,m:1706,r:682,s:1024,v:1024,w:1479,x:1024,y:1024,z:1024,"{":684,"|":532,"}":684,"~":1196},glyphsByWidth:{569:" !,./:;I[\\]ft",1139:"#$0123456789?Labdeghnopqu",1366:"&ABEKPSVXY"},defaultWidth:1139};function uf(t){if(t===void 0||t==="normal")return"400";if(t==="bold")return"700";const e={thin:"100",hairline:"100","extra-light":"200","ultra-light":"200",light:"300",regular:"400",normal:"400",medium:"500","semi-bold":"600",semibold:"600","demi-bold":"600",demibold:"600","extra-bold":"800",extrabold:"800","ultra-bold":"800",ultrabold:"800",black:"900",heavy:"900","extra-black":"950",extrablack:"950","ultra-black":"950",ultrablack:"950",bolder:"900",lighter:"300"};if(typeof t=="string"){const n=t.toLowerCase();return e[n]||t}return String(t)}function ff(t){return t||"normal"}function w5(t){const e=t.fontFamily,n=uf(t.fontWeight),r=ff(t.fontStyle);if(t.glyphsByWidth){const s=ve({},t.glyphs||{});for(const[a,l]of Object.entries(t.glyphsByWidth))if(typeof l=="string"){const c=Number(a);for(const h of l)s[h]=c}else s[a]=l;t=Ae(ve({},t),{glyphs:s,glyphsByWidth:void 0})}Po.has(e)||Po.set(e,new Map);const i=Po.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function _5(t,e,n){const r=t||b5,i=uf(e),o=ff(n),s=Po.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),x5;let a=s.get(i);if(a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}if(a=s.get("400"),a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}const l=s.values().next().value;if(l){const c=l.values().next().value;if(c)return c}throw new Error(`No font data found for family "${r}" with weight "${i}" and style "${o}"`)}function $5(t,e){if(!e||e==="none")return t;switch(e){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();case"capitalize":return t.split(" ").map(n=>n.length===0?n:n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" ");default:return t}}function pf(t){if(t===void 0)return 14;if(typeof t=="number")return t;const e=parseFloat(t);return isNaN(e)?16:e}function P5(t,e){const n=pf(t.fontSize),r=t.lineHeight;if(r===void 0){const{ascender:i,descender:o,lineGap:s=0}=e.metrics;return(i-o+s)/e.unitsPerEm*n}return typeof r=="number"?r*n:r.type==="pixel"?r.value:r.type==="percent"?r.value/100*n:n}function O5(t,e={}){var f;const n=$5(t,e.textTransform),r=_5(e.fontFamily,e.fontWeight,e.fontStyle),i=pf(e.fontSize),o=e.letterSpacing||0,s=e.wordSpacing||0;let a=0;const l=Array.from(n);for(let p=0;p<l.length;p++){const g=l[p],y=p<l.length-1?l[p+1]:void 0;let m=(f=r.glyphs)==null?void 0:f[g];m===void 0&&(m=r.defaultWidth||r.unitsPerEm/2);const b=m/r.unitsPerEm*i;if(a+=b,y&&r.kerning){const v=g+y,x=r.kerning[v];x!==void 0&&(a+=x/r.unitsPerEm*i)}p<l.length-1&&(a+=o),g===" "&&(a+=s)}const c=P5(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const C5={fontFamily:"Alibaba PuHuiTi",fontWeight:400,fontStyle:"normal",unitsPerEm:1e3,metrics:{ascender:1060,descender:-340,lineGap:0},glyphs:{" ":257,"!":361,'"':405,"#":600,"%":821,"&":640,"'":253,"(":359,")":359,"*":430,",":302,"-":440,".":302,"/":500,":":378,";":378,"?":431,"@":860,B:620,C:599,D:699,F:527,G:685,H:708,J:271,K:614,L:507,M:830,N:737,P:597,R:614,S:566,T:528,V:617,W:898,X:624,Y:594,Z:626,"[":294,"\\":510,"]":294,_:500,"`":346,b:635,c:497,d:635,f:349,g:636,k:518,l:286,m:921,p:635,q:636,r:379,s:479,t:337,v:526,w:828,x:516,y:527,z:506,"{":299,"|":183,"}":299," ":257,"¡":357,"¦":183,"§":479,"¨":346,"©":806,ª:483,"«":511,"":440,"®":404,"¯":346,"°":363,"´":346,"¶":593,"·":357,"¸":346,º:445,"»":511,"¼":902,"½":914,"¾":902,"¿":431,Æ:889,Ç:599,Ð:719,Ñ:737,Ý:594,Þ:597,ß:610,æ:926,ç:497,ý:527,þ:635,ÿ:527,Ć:599,ć:497,Ĉ:599,ĉ:497,Ċ:599,ċ:497,Č:599,č:497,Ď:699,ď:640,Đ:719,đ:635,Ĝ:685,ĝ:636,Ğ:685,ğ:636,Ġ:685,ġ:636,Ģ:685,ģ:636,Ĥ:708,Ħ:708,IJ:545,ij:536,Ĵ:271,Ķ:614,ķ:518,ĸ:518,Ĺ:507,ĺ:286,Ļ:507,ļ:286,Ľ:507,ľ:290,Ŀ:507,ŀ:291,Ł:507,ł:286,Ń:737,Ņ:737,Ň:737,ʼn:669,Ŋ:737,Œ:987,œ:917,Ŕ:614,ŕ:379,Ŗ:614,ŗ:379,Ř:614,ř:379,Ś:566,ś:479,Ŝ:566,ŝ:479,Ş:566,ş:479,Š:566,š:479,Ţ:528,ţ:337,Ť:528,ť:340,Ŧ:528,ŧ:337,Ŵ:898,ŵ:828,Ŷ:594,ŷ:527,Ÿ:594,Ź:626,ź:506,Ż:626,ż:506,Ž:626,ž:506,ſ:310,Ə:719,ǎ:608,ǐ:265,ǒ:614,ǔ:609,ǖ:609,ǘ:609,ǚ:609,ǜ:609,Ǽ:889,ǽ:926,Ș:566,ș:479,Ț:528,ț:337,"ʹ":255,"͵":255,";":378,"΄":346,"΅":346,Ά:670,"·":357,Έ:628,Ή:779,Ί:346,Ό:765,Ύ:726,Ώ:765,ΐ:312,Β:620,Γ:507,Ζ:626,Η:708,Κ:614,Λ:617,Μ:830,Ν:737,Π:708,Ρ:597,Σ:596,Τ:528,Υ:594,Φ:831,Χ:624,Ψ:804,Ϋ:594,έ:509,ή:643,ί:312,ΰ:593,β:610,γ:526,ε:509,ζ:465,η:643,θ:638,ι:312,κ:518,λ:514,ν:526,ξ:465,π:616,ρ:619,ς:497,σ:639,τ:437,υ:593,φ:774,χ:509,ψ:745,ω:782,ϊ:312,ϋ:593,ύ:593,ώ:782,"‐":440,"‑":440,"–":495,"—":684,"―":684,"‗":500,"‘":270,"’":270,"‚":270,"‛":270,"“":784,"”":784,"„":468,"†":500,"‡":500,"•":308,"…":1085,"‰":1174,"′":256,"″":472,"‴":689,"‵":256,"‶":472,"‷":689,"‹":312,"›":312,"‼":589,"‽":433,"‾":500,"⁄":120,"⁺":407,"⁻":407,"⁼":407,"⁽":225,"⁾":225,ⁿ:486,"₊":407,"₋":407,"₌":407,"₍":225,"₎":225,"ₙ":486,"₡":599,"₣":527,"₤":600,"₥":921,"₦":625,"₨":1093,"₩":769,"₪":754,"₫":635,"₭":614,"₮":528,"₯":1288,"₰":950,"₲":685,"₴":576,"₵":599,"₶":576,"₷":700,"₸":528,"₻":750,"₼":683,"₾":577,"₿":620,"℃":915,"℅":825,"℉":868,ℓ:385,"№":1176,"℗":806,"℡":1022,"™":903,"℮":903,"⅛":930,"⅜":931,"⅝":931,"⅞":871,"Ⅶ":1166,"∂":587,"∈":663,"∏":708,"∑":596,"√":604,"∞":679,"∧":617,"∫":531,"∮":654,"≈":600,"≒":662,"◊":600," ":0,"〞":472},glyphsByWidth:{268:"ijìíîïĩīĭįıĵȷ",274:"IÌÍÎÏĨĪĬĮİΙΪ",406:"²³¹⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉",552:"+<=>^~¬±×÷−∕∙≠≤≥≦≧≮≯",556:"EÈÉÊËĒĔĖĘĚΕΞ",575:"$0123456789¢£¤¥ƒ₢₧€₱₹₺₽",578:"eèéêëēĕėęě",612:"aàáâãäåāăąǻ",613:"uµùúûüũūŭůűųάαμ∨",618:"hnoðñòóôõöøĥħńņňŋōŏőǿδοό",667:"AÀÁÂÃÄÅĀĂĄǺΑΔ₳∆",701:"UÙÚÛÜŨŪŬŮŰŲ",743:"OQÒÓÔÕÖØŌŎŐǾΘΟΩΩ",1e3:"─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▓▔▕■□▲△▼▽◆◇○◎●◢◣◤◥★☆☉♀♂〾"},defaultWidth:984,kerning:{'""':-56,"\"'":-57,'",':-179,'".':-179,"'\"":-56,"''":-57,"',":-179,"'.":-179,"(j":60,',"':-160,",'":-160,",1":-140,",7":-41,",9":-39,'."':-160,".'":-160,".1":-140,".7":-41,".9":-39,"//":-120,"1,":-99,"1.":-99,"1:":-99,"1;":-99,"7,":-160,"7.":-160,"7:":-99,"7;":-99,":1":-79,":7":-59,";1":-79,";7":-59,'A"':-100,"A'":-100,AC:-20,AG:-20,AO:-20,AQ:-20,AT:-80,AU:-10,AV:-70,AW:-39,AY:-81,Af:-20,Al:-10,At:-20,Av:-20,Ay:-20,BC:-10,BG:-10,BO:-10,BQ:-10,BT:-40,BV:-20,BX:-20,BY:-21,"D,":-59,"D.":-59,DA:-20,DT:-36,DV:-30,DW:-19,DX:-20,DY:-40,DZ:-20,Da:-39,Ej:19,"F,":-159,"F.":-159,FA:-40,Fa:-59,Fh:1,Fk:1,GV:-11,GY:-21,JJ:7,KA:-19,KC:-20,KG:-20,KO:-20,KQ:-20,KT:-19,KU:-39,KV:-39,KW:-39,KY:-40,Kc:-39,Kd:-39,Ke:-39,Kg:-39,Kl:-39,Ko:-39,Kq:-39,Ks:-19,Kt:-10,Ku:-40,Kv:-60,Kw:-40,Ky:-60,'L"':-99,"L'":-99,LA:20,LC:-59,LG:-59,LO:-59,LQ:-59,LT:-79,LU:-19,LV:-79,LW:-39,LY:-100,Lv:-41,Lw:-21,Ly:-41,"O,":-59,"O.":-59,OA:-20,OT:-36,OV:-30,OW:-19,OX:-20,OY:-40,OZ:-20,Oa:-39,"P,":-199,"P.":-199,PA:-60,PT:-29,PV:-10,PW:-10,PX:-50,PY:-20,PZ:-39,Pa:-60,"Q,":-59,"Q.":-59,QA:-20,QJ:7,QT:-36,QV:-30,QW:-19,QX:-20,QY:-40,QZ:-20,Qa:-39,RC:-15,RG:-15,RO:-15,RQ:-15,RT:-40,RU:-10,RV:-21,RW:-10,RX:-29,RY:-41,Rc:-20,Rd:-20,Re:-20,Rg:-20,Ro:-20,Rq:-20,Rt:-20,Ru:-10,Rv:-10,Rx:20,Ry:-10,"S,":-20,"S.":-20,SS:-1,ST:-1,SV:-21,SW:-10,SY:-21,St:-1,Sv:-20,Sw:-10,Sx:-1,Sy:-20,'T"':2,"T'":2,"T,":-154,"T.":-154,TA:-80,TC:-20,TG:-20,TO:-20,TQ:-20,TS:-1,Ta:-80,Tc:-59,Td:-59,Te:-59,Tg:-59,Ti:-20,Tj:-19,Tm:-59,Tn:-59,To:-59,Tp:-58,Tq:-59,Tr:-59,Ts:-60,Tt:20,Tu:-79,Tv:-39,Tw:-19,Tx:-39,Ty:-39,Tz:-59,UA:-10,UX:-19,Ux:-1,"V,":-140,"V.":-140,"V:":-41,"V;":-41,VA:-70,VC:-30,VG:-30,VO:-30,VQ:-30,VS:-10,Va:-41,Vc:-21,Vd:-21,Ve:-21,Vg:-21,Vh:1,Vk:1,Vo:-21,Vq:-21,Vs:-21,Vv:-1,Vy:-1,"W,":-79,"W.":-79,"W:":-39,"W;":-39,WA:-40,WC:-19,WG:-19,WO:-19,WQ:-19,Wa:-40,Wc:-20,Wd:-20,We:-20,Wg:-20,Wo:-20,Wq:-20,Ws:-20,XA:-19,XC:-20,XG:-20,XO:-20,XQ:-20,XT:-19,XU:-39,XV:-39,XW:-39,XY:-40,Xc:-39,Xd:-39,Xe:-39,Xg:-39,Xl:-39,Xo:-39,Xq:-39,Xs:-19,Xt:-10,Xu:-40,Xv:-60,Xw:-40,Xy:-60,'Y"':1,"Y'":1,"Y,":-141,"Y.":-141,"Y:":-60,"Y;":-60,YA:-81,YC:-40,YG:-40,YO:-40,YQ:-40,YS:-1,Ya:-101,Yc:-60,Yd:-60,Ye:-60,Yf:-1,Yg:-60,Yh:1,Yi:-19,Yk:1,Ym:-41,Yn:-41,Yo:-60,Yp:-40,Yq:-60,Yr:-41,Ys:-61,Yt:-1,Yu:-40,Yv:-40,Yx:-41,Yy:-40,Yz:-41,ZC:-20,ZG:-20,ZO:-20,ZQ:-20,"[j":80,aT:-60,aV:-21,aY:-61,av:-10,aw:-10,ay:-10,"b,":-40,"b.":-40,bT:-59,bV:-21,bW:-20,bX:-39,bY:-60,bv:-10,bx:-20,by:-10,"e,":-20,"e.":-20,eT:-59,eY:-40,ej:20,'f"':3,"f'":3,"f)":1,"f*":61,"f,":-1,"f.":-1,"f?":40,fT:40,fV:21,fW:21,fX:21,fY:1,"f]":21,fa:-29,fc:-19,fd:-19,fe:-19,ff:1,fg:-39,fh:-19,fi:-19,fj:-19,fk:-19,fl:-19,fo:-19,fq:-19,fs:-19,ft:1,"f}":3,hT:-58,hY:-39,hv:-10,hy:-10,'i"':2,"i'":2,"i)":2,"i?":3,iT:-20,"i]":41,"i}":22,jT:-20,kT:-39,kU:-1,kW:-20,ka:-20,kc:-20,kd:-20,ke:-20,kg:-20,kl:-20,ko:-20,kq:-20,ku:-10,lf:-20,lv:-19,lw:-10,ly:-19,mT:-58,mY:-39,mv:-10,my:-10,nT:-58,nY:-39,nv:-10,ny:-10,"o,":-40,"o.":-40,oT:-59,oV:-21,oW:-20,oX:-39,oY:-60,ov:-10,ox:-20,oy:-10,"p,":-40,"p.":-40,pT:-59,pV:-21,pW:-20,pX:-39,pY:-60,pv:-10,px:-20,py:-10,qT:-19,qY:-19,qj:20,'r"':2,"r'":2,"r,":-90,"r.":-90,ra:-49,rc:-19,rd:-19,re:-19,rf:1,ro:-19,rq:-19,rt:20,sT:-59,sV:-21,sW:-20,sX:-19,sY:-60,sv:-19,sx:-10,sy:-19,tf:1,uT:-40,uY:-19,"v,":-90,"v.":-90,vT:-39,vX:-39,va:-35,vc:-10,vd:-10,ve:-10,vo:-10,vq:-10,"w,":-50,"w.":-50,wT:-19,wX:-39,wa:-30,xT:-39,xU:-1,xW:-20,xa:-20,xc:-20,xd:-20,xe:-20,xg:-20,xl:-20,xo:-20,xq:-20,xu:-10,"y,":-90,"y.":-90,yT:-39,yX:-39,ya:-35,yc:-10,yd:-10,ye:-10,yo:-10,yq:-10,zT:-59,"{h":2,"{j":79,"{k":2}};var M5=Object.defineProperty,gf=Object.getOwnPropertySymbols,S5=Object.prototype.hasOwnProperty,E5=Object.prototype.propertyIsEnumerable,mf=(t,e,n)=>e in t?M5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I5=(t,e)=>{for(var n in e||(e={}))S5.call(e,n)&&mf(t,n,e[n]);if(gf)for(var n of gf(e))E5.call(e,n)&&mf(t,n,e[n]);return t};const _l=new Map;let $l="Alibaba PuHuiTi";function Pl(t){const e=qn(t);for(const n of e){const r=_l.get(Cr(n));if(r)return r}return null}function Ol(){return Array.from(_l.values())}function T5(t){$l=Un(t)}function yf(t){const e=I5({},t);return _l.set(e.fontFamily,e),e.fontFamily=Un(e.fontFamily),e}function vf(t){const e=qn(t).flatMap(n=>{const r=Pl(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>wl(i,s))});return Array.from(new Set(e))}function A5(t,e){const n=qn(t);let r=null;for(const s of n)if(r=Pl(s),r)break;if(!r)return null;const i=Vu(e),o=r.fontWeight[i];return o?wl(r.baseUrl,o.replace(/\/result.css$/,"")):null}const Cl=new WeakMap;function k5(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;Cl.has(r)||Cl.set(r,new Map);const i=Cl.get(r),o=[];vf(e).forEach(a=>{const l=`${e}-${a}`;if(i.has(l))return;const c=n.createElement("link");c.id=l,c.rel="stylesheet",c.href=a,o.push(c),i.set(l,c)}),o.length&&r.tagName==="HEAD"&&o.forEach(a=>r.appendChild(a))}function z5(t){Ol().forEach(n=>k5(t,n.fontFamily))}const ai="https://assets.antv.antgroup.com",Ir=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:ai,fontWeight:{regular:Ir("AlibabaPuHuiTi-Regular"),bold:Ir("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:ai,fontWeight:{regular:Ir("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:ai,fontWeight:{regular:Ir("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:ai,fontWeight:{regular:Ir("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:ai,fontWeight:{regular:Ir("851tegakizatsu-Regular")}}].forEach(yf);const bf=new Map;function Ml(t,e){bf.set(t,e)}function xf(t){return bf.get(t)}Ml("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),Ml("spectral",(t,e,n)=>{const r=[["#fc8d59","#ffffbf","#99d594"],["#d7191c","#fdae61","#abdda4","#2b83ba"],["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]],i=Math.min(Math.max(n,3),11);return r[i-3][e%i]});const Oo=(t=[],e,n)=>{var r;const i=typeof t=="string"?xf(t)||[]:t,o=(r=e[0])!=null?r:0;if(typeof i=="function"){const s=n?o/n:0;return i(s,o,n!=null?n:0)}if(Array.isArray(i))return i.length===0?void 0:i[o%i.length]};function L5(t,e){var n;const r=t.parentElement;r&&(r.style.backgroundColor=e||"none");const i=Sr(t,kt.Background);if(!e)return i==null?void 0:i.remove();if(t.style.backgroundColor=e,i)i.setAttribute("fill",e);else if((n=t.viewBox)!=null&&n.baseVal){const{x:o,y:s,width:a,height:l}=t.viewBox.baseVal,c=wt("rect",{x:o,y:s,width:a,height:l,fill:e,"data-element-type":kt.Background});t.prepend(c)}}function li(t,e){return Object.entries(e).reduce((r,[i,o])=>{if(typeof o=="function"){const s=o(t.getAttribute(i),t);s!=null&&(r[i]=s)}else Object.assign(r,{[i]:o});return r},{})}function wf(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function R5(t,e){e&&Object.keys(e).length>0&&hl(t,n=>{const r=li(n,e);Yt(n,r)})}const _f="btn-add-icon",$f="btn-remove-icon";function H5(t,e){Yt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');N5(t),n.forEach(j5),r.forEach(F5)}const D5="btn-icon-defs";function N5(t){const e=wt("defs");oi(e,D5);const n=Mr(`<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
|
|
12
|
+
</symbol>`)})}function hw(t){return t.startsWith("<svg")||t.startsWith("<symbol")}function Tr(t){if(!t||!hw(t))return null;const e=t.startsWith("<svg")?t.replace(/<svg/,"<symbol").replace(/svg>/,"symbol>"):t;return Er(e)}var dw=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function uw(t){try{return!!new URL(t)}catch(e){return!1}}function fw(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function cf(t,e){return dw(this,null,function*(){if(!t||!uw(t))return null;const n=yield Oo(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(fw(r,e)){const s=yield n.text();return Tr(s)}const i=yield n.blob(),o=yield pw(i);return ui(o)})}function pw(t){return new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=n,r.readAsDataURL(t)})}var hf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const gw=t=>hf(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${dx}?${n.toString()}`,i=yield Oo(r);if(!i.ok)return null;const o=yield i.json();return!(o!=null&&o.status)||!Array.isArray((e=o.data)==null?void 0:e.data)?null:o.data.data[0]||null}catch(n){return console.error(`Failed to query icon for "${t}":`,n),null}});function mw(t){return t.startsWith("data:")}function yw(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function df(t,e){return hf(this,null,function*(){var n;if(!t)return null;const r=yield gw(t);if(!r)return null;if(yw(r))return Tr(r);if(mw(r)){const i=((n=r.match(/^data:([^;]+)/))==null?void 0:n[1])||"",o=r.includes(";base64,");if(i==="image/svg+xml"&&!o){const s=r.indexOf(","),a=s>=0?r.slice(s+1):r;return Tr(a)}return ui(r)}return cf(r,e)})}let uf=null;function vw(t){uf=t}function xw(){return uf}function bw(t){if(!t.startsWith("data:"))return null;const e=t.indexOf(",");if(e===-1)return null;const n=t.slice(5,e),r=t.slice(e+1),i=n.split(";"),o=i[0],s=i.includes("base64");return o==="image/svg+xml"&&!s?{source:"inline",format:"svg",encoding:"raw",data:r.startsWith("%3C")?decodeURIComponent(r):r}:o.startsWith("image/")?{source:"inline",format:o==="image/svg+xml"?"svg":"image",encoding:s?"base64":"data-uri",data:t}:null}const ww=new Set(["svg","png","jpg","jpeg","webp","gif"]);function _w(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function $w(t){const e=t.toLowerCase();if(e.endsWith(".svg")||e.includes(".svg?"))return"svg";if(e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".webp")||e.endsWith(".gif"))return"image"}function Pw(t){var e;if(!t.startsWith("ref:"))return null;const n=t.slice(4),[r,...i]=n.split(":");if(!r||i.length===0)return null;let o;i.length>1&&ww.has(i[0].toLowerCase())&&(o=(e=i.shift())==null?void 0:e.toLowerCase());const s=i.join(":");if(!s)return null;const a=r==="url"?"remote":r;return a==="remote"?{source:"remote",format:o||$w(s)||void 0,data:s}:a==="search"?{source:"search",format:o||"svg",data:s}:a==="svg"?{source:"inline",format:"svg",data:s,encoding:"raw"}:{source:"custom",data:t,format:o}}function Mo(t){if(!t)return null;if(typeof t!="string"){if(t.source)return t;const r=t;return r.type==="image"?{source:"inline",format:"image",data:r.data}:r.type==="svg"?{source:"inline",format:"svg",encoding:"raw",data:r.data}:r.type==="remote"?{source:"remote",format:r.format,data:r.data}:r.type==="search"?{source:"search",format:r.format||"svg",data:r.data}:r.type==="custom"?{source:"custom",data:r.data}:null}const e=bw(t);if(e)return e;const n=Pw(t);return n||(_w(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function $l(t){const e=typeof t=="string"?Mo(t):t;return e?"rsc-"+lf(JSON.stringify(e)):null}function ff(t){const e=$l(t);return e?`#${e}`:null}var pf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function Cw(t,e,n){return pf(this,null,function*(){const r=Mo(e);if(!r)return null;r.scene||(r.scene=t);const{source:i,data:o,format:s,encoding:a}=r;let l=null;try{if(i==="inline"){const c=o.startsWith("data:");s==="svg"&&a==="raw"?l=Tr(o):s==="svg"&&c?l=yield ui(o):c||s==="image"?l=yield ui(o):l=Tr(o)}else if(i==="remote")l=yield cf(o,s);else if(i==="search")l=yield df(o,s);else{const c=xw();c&&(l=yield c(r))}}catch(c){l=null}return l||(yield df(Ow(r,t,n),s))})}const gf=new Map,Pl=new WeakMap;function mf(t,e,n,r){return pf(this,null,function*(){if(!t)return null;const i=Mo(n);if(!i)return null;const o=$l(i),s=gf.has(o)?gf.get(o)||null:yield Cw(e,i,r);if(!s)return null;Pl.has(t)||Pl.set(t,new Map);const a=Pl.get(t);if(a.has(o))return o;const l=Co(t);return s.id=o,l.appendChild(s),a.set(o,s),o})}function Ow(t,e,n){const r=e==="illus"?"illustration":"icon",i=Cl(n==null?void 0:n.label)||Cl(n==null?void 0:n.desc);if(i)return i;const o=Cl(t.data);return!o||t.source==="inline"||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?r:o}function Cl(t){if(typeof t!="string")return null;const e=t.trim();return e||null}var Mw=Object.defineProperty,Sw=Object.defineProperties,Ew=Object.getOwnPropertyDescriptors,yf=Object.getOwnPropertySymbols,Iw=Object.prototype.hasOwnProperty,Tw=Object.prototype.propertyIsEnumerable,vf=(t,e,n)=>e in t?Mw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Aw=(t,e)=>{for(var n in e||(e={}))Iw.call(e,n)&&vf(t,n,e[n]);if(yf)for(var n of yf(e))Tw.call(e,n)&&vf(t,n,e[n]);return t},kw=(t,e)=>Sw(t,Ew(e));const Lw=new WeakMap;function zw(t,e={}){const n=$t("use",kw(Aw({},e),{href:ff(t)}));return xf(n),Lw.set(n,t),n}function xf(t){const{stroke:e,fill:n}=Re(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function So(t){return t.tagName==="use"?t:t.querySelector("use")}function Ol(t){const e=So(t);return e?Re(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function Hw(t,e,n){const r=So(t);r&&(n&&Qt(r,n),xf(r))}const Rw=",",Dw=(t,e=Rw)=>t.split(e).map(n=>parseInt(n,10)),bf=t=>Dw(t);function Ml(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Eo=new Map;let Nw="sans-serif";const jw={fontFamily:"sans-serif",fontWeight:400,fontStyle:"normal",unitsPerEm:2048,metrics:{ascender:2189,descender:-555,lineGap:0},glyphs:{'"':727,"%":1821,"'":391,"(":682,")":682,"*":797,"+":1196,"-":682,"<":1196,"=":1196,">":1196,"@":2079,C:1479,D:1479,F:1251,G:1593,H:1479,J:1024,M:1706,N:1479,O:1593,Q:1593,R:1479,T:1251,U:1479,W:1933,Z:1251,"^":961,_:1024,"`":682,c:1024,i:455,j:455,k:1024,l:455,m:1706,r:682,s:1024,v:1024,w:1479,x:1024,y:1024,z:1024,"{":684,"|":532,"}":684,"~":1196},glyphsByWidth:{569:" !,./:;I[\\]ft",1139:"#$0123456789?Labdeghnopqu",1366:"&ABEKPSVXY"},defaultWidth:1139};function wf(t){if(t===void 0||t==="normal")return"400";if(t==="bold")return"700";const e={thin:"100",hairline:"100","extra-light":"200","ultra-light":"200",light:"300",regular:"400",normal:"400",medium:"500","semi-bold":"600",semibold:"600","demi-bold":"600",demibold:"600","extra-bold":"800",extrabold:"800","ultra-bold":"800",ultrabold:"800",black:"900",heavy:"900","extra-black":"950",extrablack:"950","ultra-black":"950",ultrablack:"950",bolder:"900",lighter:"300"};if(typeof t=="string"){const n=t.toLowerCase();return e[n]||t}return String(t)}function _f(t){return t||"normal"}function Ww(t){const e=t.fontFamily,n=wf(t.fontWeight),r=_f(t.fontStyle);if(t.glyphsByWidth){const s=Pe({},t.glyphs||{});for(const[a,l]of Object.entries(t.glyphsByWidth))if(typeof l=="string"){const c=Number(a);for(const h of l)s[h]=c}else s[a]=l;t=He(Pe({},t),{glyphs:s,glyphsByWidth:void 0})}Eo.has(e)||Eo.set(e,new Map);const i=Eo.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function Fw(t,e,n){const r=t||Nw,i=wf(e),o=_f(n),s=Eo.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),jw;let a=s.get(i);if(a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}if(a=s.get("400"),a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}const l=s.values().next().value;if(l){const c=l.values().next().value;if(c)return c}throw new Error(`No font data found for family "${r}" with weight "${i}" and style "${o}"`)}function Bw(t,e){if(!e||e==="none")return t;switch(e){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();case"capitalize":return t.split(" ").map(n=>n.length===0?n:n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" ");default:return t}}function $f(t){if(t===void 0)return 14;if(typeof t=="number")return t;const e=parseFloat(t);return isNaN(e)?16:e}function Vw(t,e){const n=$f(t.fontSize),r=t.lineHeight;if(r===void 0){const{ascender:i,descender:o,lineGap:s=0}=e.metrics;return(i-o+s)/e.unitsPerEm*n}return typeof r=="number"?r*n:r.type==="pixel"?r.value:r.type==="percent"?r.value/100*n:n}function Yw(t,e={}){var f;const n=Bw(t,e.textTransform),r=Fw(e.fontFamily,e.fontWeight,e.fontStyle),i=$f(e.fontSize),o=e.letterSpacing||0,s=e.wordSpacing||0;let a=0;const l=Array.from(n);for(let p=0;p<l.length;p++){const g=l[p],y=p<l.length-1?l[p+1]:void 0;let m=(f=r.glyphs)==null?void 0:f[g];m===void 0&&(m=r.defaultWidth||r.unitsPerEm/2);const x=m/r.unitsPerEm*i;if(a+=x,y&&r.kerning){const v=g+y,b=r.kerning[v];b!==void 0&&(a+=b/r.unitsPerEm*i)}p<l.length-1&&(a+=o),g===" "&&(a+=s)}const c=Vw(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const Xw={fontFamily:"Alibaba PuHuiTi",fontWeight:400,fontStyle:"normal",unitsPerEm:1e3,metrics:{ascender:1060,descender:-340,lineGap:0},glyphs:{" ":257,"!":361,'"':405,"#":600,"%":821,"&":640,"'":253,"(":359,")":359,"*":430,",":302,"-":440,".":302,"/":500,":":378,";":378,"?":431,"@":860,B:620,C:599,D:699,F:527,G:685,H:708,J:271,K:614,L:507,M:830,N:737,P:597,R:614,S:566,T:528,V:617,W:898,X:624,Y:594,Z:626,"[":294,"\\":510,"]":294,_:500,"`":346,b:635,c:497,d:635,f:349,g:636,k:518,l:286,m:921,p:635,q:636,r:379,s:479,t:337,v:526,w:828,x:516,y:527,z:506,"{":299,"|":183,"}":299," ":257,"¡":357,"¦":183,"§":479,"¨":346,"©":806,ª:483,"«":511,"":440,"®":404,"¯":346,"°":363,"´":346,"¶":593,"·":357,"¸":346,º:445,"»":511,"¼":902,"½":914,"¾":902,"¿":431,Æ:889,Ç:599,Ð:719,Ñ:737,Ý:594,Þ:597,ß:610,æ:926,ç:497,ý:527,þ:635,ÿ:527,Ć:599,ć:497,Ĉ:599,ĉ:497,Ċ:599,ċ:497,Č:599,č:497,Ď:699,ď:640,Đ:719,đ:635,Ĝ:685,ĝ:636,Ğ:685,ğ:636,Ġ:685,ġ:636,Ģ:685,ģ:636,Ĥ:708,Ħ:708,IJ:545,ij:536,Ĵ:271,Ķ:614,ķ:518,ĸ:518,Ĺ:507,ĺ:286,Ļ:507,ļ:286,Ľ:507,ľ:290,Ŀ:507,ŀ:291,Ł:507,ł:286,Ń:737,Ņ:737,Ň:737,ʼn:669,Ŋ:737,Œ:987,œ:917,Ŕ:614,ŕ:379,Ŗ:614,ŗ:379,Ř:614,ř:379,Ś:566,ś:479,Ŝ:566,ŝ:479,Ş:566,ş:479,Š:566,š:479,Ţ:528,ţ:337,Ť:528,ť:340,Ŧ:528,ŧ:337,Ŵ:898,ŵ:828,Ŷ:594,ŷ:527,Ÿ:594,Ź:626,ź:506,Ż:626,ż:506,Ž:626,ž:506,ſ:310,Ə:719,ǎ:608,ǐ:265,ǒ:614,ǔ:609,ǖ:609,ǘ:609,ǚ:609,ǜ:609,Ǽ:889,ǽ:926,Ș:566,ș:479,Ț:528,ț:337,"ʹ":255,"͵":255,";":378,"΄":346,"΅":346,Ά:670,"·":357,Έ:628,Ή:779,Ί:346,Ό:765,Ύ:726,Ώ:765,ΐ:312,Β:620,Γ:507,Ζ:626,Η:708,Κ:614,Λ:617,Μ:830,Ν:737,Π:708,Ρ:597,Σ:596,Τ:528,Υ:594,Φ:831,Χ:624,Ψ:804,Ϋ:594,έ:509,ή:643,ί:312,ΰ:593,β:610,γ:526,ε:509,ζ:465,η:643,θ:638,ι:312,κ:518,λ:514,ν:526,ξ:465,π:616,ρ:619,ς:497,σ:639,τ:437,υ:593,φ:774,χ:509,ψ:745,ω:782,ϊ:312,ϋ:593,ύ:593,ώ:782,"‐":440,"‑":440,"–":495,"—":684,"―":684,"‗":500,"‘":270,"’":270,"‚":270,"‛":270,"“":784,"”":784,"„":468,"†":500,"‡":500,"•":308,"…":1085,"‰":1174,"′":256,"″":472,"‴":689,"‵":256,"‶":472,"‷":689,"‹":312,"›":312,"‼":589,"‽":433,"‾":500,"⁄":120,"⁺":407,"⁻":407,"⁼":407,"⁽":225,"⁾":225,ⁿ:486,"₊":407,"₋":407,"₌":407,"₍":225,"₎":225,"ₙ":486,"₡":599,"₣":527,"₤":600,"₥":921,"₦":625,"₨":1093,"₩":769,"₪":754,"₫":635,"₭":614,"₮":528,"₯":1288,"₰":950,"₲":685,"₴":576,"₵":599,"₶":576,"₷":700,"₸":528,"₻":750,"₼":683,"₾":577,"₿":620,"℃":915,"℅":825,"℉":868,ℓ:385,"№":1176,"℗":806,"℡":1022,"™":903,"℮":903,"⅛":930,"⅜":931,"⅝":931,"⅞":871,"Ⅶ":1166,"∂":587,"∈":663,"∏":708,"∑":596,"√":604,"∞":679,"∧":617,"∫":531,"∮":654,"≈":600,"≒":662,"◊":600," ":0,"〞":472},glyphsByWidth:{268:"ijìíîïĩīĭįıĵȷ",274:"IÌÍÎÏĨĪĬĮİΙΪ",406:"²³¹⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉",552:"+<=>^~¬±×÷−∕∙≠≤≥≦≧≮≯",556:"EÈÉÊËĒĔĖĘĚΕΞ",575:"$0123456789¢£¤¥ƒ₢₧€₱₹₺₽",578:"eèéêëēĕėęě",612:"aàáâãäåāăąǻ",613:"uµùúûüũūŭůűųάαμ∨",618:"hnoðñòóôõöøĥħńņňŋōŏőǿδοό",667:"AÀÁÂÃÄÅĀĂĄǺΑΔ₳∆",701:"UÙÚÛÜŨŪŬŮŰŲ",743:"OQÒÓÔÕÖØŌŎŐǾΘΟΩΩ",1e3:"─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▓▔▕■□▲△▼▽◆◇○◎●◢◣◤◥★☆☉♀♂〾"},defaultWidth:984,kerning:{'""':-56,"\"'":-57,'",':-179,'".':-179,"'\"":-56,"''":-57,"',":-179,"'.":-179,"(j":60,',"':-160,",'":-160,",1":-140,",7":-41,",9":-39,'."':-160,".'":-160,".1":-140,".7":-41,".9":-39,"//":-120,"1,":-99,"1.":-99,"1:":-99,"1;":-99,"7,":-160,"7.":-160,"7:":-99,"7;":-99,":1":-79,":7":-59,";1":-79,";7":-59,'A"':-100,"A'":-100,AC:-20,AG:-20,AO:-20,AQ:-20,AT:-80,AU:-10,AV:-70,AW:-39,AY:-81,Af:-20,Al:-10,At:-20,Av:-20,Ay:-20,BC:-10,BG:-10,BO:-10,BQ:-10,BT:-40,BV:-20,BX:-20,BY:-21,"D,":-59,"D.":-59,DA:-20,DT:-36,DV:-30,DW:-19,DX:-20,DY:-40,DZ:-20,Da:-39,Ej:19,"F,":-159,"F.":-159,FA:-40,Fa:-59,Fh:1,Fk:1,GV:-11,GY:-21,JJ:7,KA:-19,KC:-20,KG:-20,KO:-20,KQ:-20,KT:-19,KU:-39,KV:-39,KW:-39,KY:-40,Kc:-39,Kd:-39,Ke:-39,Kg:-39,Kl:-39,Ko:-39,Kq:-39,Ks:-19,Kt:-10,Ku:-40,Kv:-60,Kw:-40,Ky:-60,'L"':-99,"L'":-99,LA:20,LC:-59,LG:-59,LO:-59,LQ:-59,LT:-79,LU:-19,LV:-79,LW:-39,LY:-100,Lv:-41,Lw:-21,Ly:-41,"O,":-59,"O.":-59,OA:-20,OT:-36,OV:-30,OW:-19,OX:-20,OY:-40,OZ:-20,Oa:-39,"P,":-199,"P.":-199,PA:-60,PT:-29,PV:-10,PW:-10,PX:-50,PY:-20,PZ:-39,Pa:-60,"Q,":-59,"Q.":-59,QA:-20,QJ:7,QT:-36,QV:-30,QW:-19,QX:-20,QY:-40,QZ:-20,Qa:-39,RC:-15,RG:-15,RO:-15,RQ:-15,RT:-40,RU:-10,RV:-21,RW:-10,RX:-29,RY:-41,Rc:-20,Rd:-20,Re:-20,Rg:-20,Ro:-20,Rq:-20,Rt:-20,Ru:-10,Rv:-10,Rx:20,Ry:-10,"S,":-20,"S.":-20,SS:-1,ST:-1,SV:-21,SW:-10,SY:-21,St:-1,Sv:-20,Sw:-10,Sx:-1,Sy:-20,'T"':2,"T'":2,"T,":-154,"T.":-154,TA:-80,TC:-20,TG:-20,TO:-20,TQ:-20,TS:-1,Ta:-80,Tc:-59,Td:-59,Te:-59,Tg:-59,Ti:-20,Tj:-19,Tm:-59,Tn:-59,To:-59,Tp:-58,Tq:-59,Tr:-59,Ts:-60,Tt:20,Tu:-79,Tv:-39,Tw:-19,Tx:-39,Ty:-39,Tz:-59,UA:-10,UX:-19,Ux:-1,"V,":-140,"V.":-140,"V:":-41,"V;":-41,VA:-70,VC:-30,VG:-30,VO:-30,VQ:-30,VS:-10,Va:-41,Vc:-21,Vd:-21,Ve:-21,Vg:-21,Vh:1,Vk:1,Vo:-21,Vq:-21,Vs:-21,Vv:-1,Vy:-1,"W,":-79,"W.":-79,"W:":-39,"W;":-39,WA:-40,WC:-19,WG:-19,WO:-19,WQ:-19,Wa:-40,Wc:-20,Wd:-20,We:-20,Wg:-20,Wo:-20,Wq:-20,Ws:-20,XA:-19,XC:-20,XG:-20,XO:-20,XQ:-20,XT:-19,XU:-39,XV:-39,XW:-39,XY:-40,Xc:-39,Xd:-39,Xe:-39,Xg:-39,Xl:-39,Xo:-39,Xq:-39,Xs:-19,Xt:-10,Xu:-40,Xv:-60,Xw:-40,Xy:-60,'Y"':1,"Y'":1,"Y,":-141,"Y.":-141,"Y:":-60,"Y;":-60,YA:-81,YC:-40,YG:-40,YO:-40,YQ:-40,YS:-1,Ya:-101,Yc:-60,Yd:-60,Ye:-60,Yf:-1,Yg:-60,Yh:1,Yi:-19,Yk:1,Ym:-41,Yn:-41,Yo:-60,Yp:-40,Yq:-60,Yr:-41,Ys:-61,Yt:-1,Yu:-40,Yv:-40,Yx:-41,Yy:-40,Yz:-41,ZC:-20,ZG:-20,ZO:-20,ZQ:-20,"[j":80,aT:-60,aV:-21,aY:-61,av:-10,aw:-10,ay:-10,"b,":-40,"b.":-40,bT:-59,bV:-21,bW:-20,bX:-39,bY:-60,bv:-10,bx:-20,by:-10,"e,":-20,"e.":-20,eT:-59,eY:-40,ej:20,'f"':3,"f'":3,"f)":1,"f*":61,"f,":-1,"f.":-1,"f?":40,fT:40,fV:21,fW:21,fX:21,fY:1,"f]":21,fa:-29,fc:-19,fd:-19,fe:-19,ff:1,fg:-39,fh:-19,fi:-19,fj:-19,fk:-19,fl:-19,fo:-19,fq:-19,fs:-19,ft:1,"f}":3,hT:-58,hY:-39,hv:-10,hy:-10,'i"':2,"i'":2,"i)":2,"i?":3,iT:-20,"i]":41,"i}":22,jT:-20,kT:-39,kU:-1,kW:-20,ka:-20,kc:-20,kd:-20,ke:-20,kg:-20,kl:-20,ko:-20,kq:-20,ku:-10,lf:-20,lv:-19,lw:-10,ly:-19,mT:-58,mY:-39,mv:-10,my:-10,nT:-58,nY:-39,nv:-10,ny:-10,"o,":-40,"o.":-40,oT:-59,oV:-21,oW:-20,oX:-39,oY:-60,ov:-10,ox:-20,oy:-10,"p,":-40,"p.":-40,pT:-59,pV:-21,pW:-20,pX:-39,pY:-60,pv:-10,px:-20,py:-10,qT:-19,qY:-19,qj:20,'r"':2,"r'":2,"r,":-90,"r.":-90,ra:-49,rc:-19,rd:-19,re:-19,rf:1,ro:-19,rq:-19,rt:20,sT:-59,sV:-21,sW:-20,sX:-19,sY:-60,sv:-19,sx:-10,sy:-19,tf:1,uT:-40,uY:-19,"v,":-90,"v.":-90,vT:-39,vX:-39,va:-35,vc:-10,vd:-10,ve:-10,vo:-10,vq:-10,"w,":-50,"w.":-50,wT:-19,wX:-39,wa:-30,xT:-39,xU:-1,xW:-20,xa:-20,xc:-20,xd:-20,xe:-20,xg:-20,xl:-20,xo:-20,xq:-20,xu:-10,"y,":-90,"y.":-90,yT:-39,yX:-39,ya:-35,yc:-10,yd:-10,ye:-10,yo:-10,yq:-10,zT:-59,"{h":2,"{j":79,"{k":2}};var Gw=Object.defineProperty,Pf=Object.getOwnPropertySymbols,qw=Object.prototype.hasOwnProperty,Uw=Object.prototype.propertyIsEnumerable,Cf=(t,e,n)=>e in t?Gw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zw=(t,e)=>{for(var n in e||(e={}))qw.call(e,n)&&Cf(t,n,e[n]);if(Pf)for(var n of Pf(e))Uw.call(e,n)&&Cf(t,n,e[n]);return t};const Sl=new Map;let El="Alibaba PuHuiTi";function Il(t){const e=Kn(t);for(const n of e){const r=Sl.get(Sr(n));if(r)return r}return null}function Tl(){return Array.from(Sl.values())}function Kw(t){El=Qn(t)}function Of(t){const e=Zw({},t);return Sl.set(e.fontFamily,e),e.fontFamily=Qn(e.fontFamily),e}function Mf(t){const e=Kn(t).flatMap(n=>{const r=Il(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>Ml(i,s))});return Array.from(new Set(e))}function Qw(t,e){const n=Kn(t);let r=null;for(const s of n)if(r=Il(s),r)break;if(!r)return null;const i=Qu(e),o=r.fontWeight[i];return o?Ml(r.baseUrl,o.replace(/\/result.css$/,"")):null}const Al=new WeakMap;function Jw(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;Al.has(r)||Al.set(r,new Map);const i=Al.get(r),o=[];Mf(e).forEach(a=>{const l=`${e}-${a}`;if(i.has(l))return;const c=n.createElement("link");c.id=l,c.rel="stylesheet",c.href=a,o.push(c),i.set(l,c)}),o.length&&r.tagName==="HEAD"&&o.forEach(a=>r.appendChild(a))}function t_(t){Tl().forEach(n=>Jw(t,n.fontFamily))}const fi="https://assets.antv.antgroup.com",Ar=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:fi,fontWeight:{regular:Ar("AlibabaPuHuiTi-Regular"),bold:Ar("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:fi,fontWeight:{regular:Ar("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:fi,fontWeight:{regular:Ar("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:fi,fontWeight:{regular:Ar("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:fi,fontWeight:{regular:Ar("851tegakizatsu-Regular")}}].forEach(Of);const kl=new Map;function Ll(t,e){kl.set(t,e)}function Sf(t){return kl.get(t)}function e_(){return Object.fromEntries(kl)}Ll("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),Ll("spectral",(t,e,n)=>{const r=[["#fc8d59","#ffffbf","#99d594"],["#d7191c","#fdae61","#abdda4","#2b83ba"],["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]],i=Math.min(Math.max(n,3),11);return r[i-3][e%i]});const Io=(t=[],e,n)=>{var r;const i=typeof t=="string"?Sf(t)||[]:t,o=(r=e[0])!=null?r:0;if(typeof i=="function"){const s=n?o/n:0;return i(s,o,n!=null?n:0)}if(Array.isArray(i))return i.length===0?void 0:i[o%i.length]};function n_(t,e){var n;const r=t.parentElement;r&&(r.style.backgroundColor=e||"none");const i=Ir(t,zt.Background);if(!e)return i==null?void 0:i.remove();if(t.style.backgroundColor=e,i)i.setAttribute("fill",e);else if((n=t.viewBox)!=null&&n.baseVal){const{x:o,y:s,width:a,height:l}=t.viewBox.baseVal,c=$t("rect",{x:o,y:s,width:a,height:l,fill:e,"data-element-type":zt.Background});t.prepend(c)}}function pi(t,e){return Object.entries(e).reduce((r,[i,o])=>{if(typeof o=="function"){const s=o(t.getAttribute(i),t);s!=null&&(r[i]=s)}else Object.assign(r,{[i]:o});return r},{})}function Ef(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function r_(t,e){e&&Object.keys(e).length>0&&gl(t,n=>{const r=pi(n,e);Qt(n,r)})}const If="btn-add-icon",Tf="btn-remove-icon";function i_(t,e){Qt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');s_(t),n.forEach(a_),r.forEach(l_)}const o_="btn-icon-defs";function s_(t){const e=$t("defs");di(e,o_);const n=Er(`<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
|
|
13
13
|
<path
|
|
14
14
|
d="M512 1024C229.216 1024 0 794.784 0 512S229.216 0 512 0s512 229.216 512 512-229.216 512-512 512z m0-960C264.576 64 64 264.576 64 512s200.576 448 448 448 448-200.576 448-448S759.424 64 512 64z m192 480h-160v160a32 32 0 0 1-64 0v-160h-160a32 32 0 0 1 0-64h160v-160a32 32 0 0 1 64 0v160h160a32 32 0 0 1 0 64z"
|
|
15
15
|
fill="#339900"></path>
|
|
16
|
-
</symbol>`);n&&(n.setAttribute("id",
|
|
16
|
+
</symbol>`);n&&(n.setAttribute("id",If),e.appendChild(n));const r=Er(`<symbol viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
|
|
17
17
|
<path d="M874.971429 149.942857C776.228571 54.857143 648.228571 0 512.914286 0S245.942857 54.857143 150.857143 149.942857c-201.142857 201.142857-201.142857 522.971429 0 724.114286C245.942857 969.142857 377.6 1024 512.914286 1024s266.971429-54.857143 362.057143-149.942857c201.142857-201.142857 201.142857-522.971429 0-724.114286m-51.2 672.914286C739.657143 906.971429 629.942857 950.857143 512.914286 950.857143s-226.742857-43.885714-310.857143-128c-171.885714-171.885714-171.885714-449.828571 0-621.714286C286.171429 117.028571 395.885714 73.142857 512.914286 73.142857s226.742857 43.885714 310.857143 128c171.885714 171.885714 171.885714 449.828571 0 621.714286" fill="#E63C33"></path>
|
|
18
18
|
<path d="M772.571429 475.428571H253.257143c-21.942857 0-36.571429 14.628571-36.571429 36.571429 0 10.971429 3.657143 18.285714 10.971429 25.6s14.628571 10.971429 25.6 10.971429H768.914286c21.942857 0 36.571429-14.628571 36.571428-36.571429s-14.628571-36.571429-32.914285-36.571429" fill="#E63C33"></path>
|
|
19
|
-
</symbol>`);r&&(r.setAttribute("id",$f),e.appendChild(r)),t.prepend(e)}function Pf(t,e){const{id:n,x:r=0,y:i=0,width:o=0,height:s=0}=ke(t,["id","x","y","width","height"]),a=wt("g",{id:n,class:"btn-group",transform:`translate(${r}, ${i})`}),l=t.getAttribute("data-items");l&&a.setAttribute("data-items",l);const c=Math.max(+o,+s)/2,h=wt("circle",{cx:c,cy:c,r:c,fill:"#fff",stroke:"transparent"});a.appendChild(h);const u=wt("use",{href:`#${e}`,width:o,height:s});a.appendChild(u),a.style.cursor="pointer",t.replaceWith(a)}function j5(t){Pf(t,_f)}function F5(t){Pf(t,$f)}var B5=Object.defineProperty,Of=Object.getOwnPropertySymbols,W5=Object.prototype.hasOwnProperty,V5=Object.prototype.propertyIsEnumerable,Cf=(t,e,n)=>e in t?B5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sl=(t,e)=>{for(var n in e||(e={}))W5.call(e,n)&&Cf(t,n,e[n]);if(Of)for(var n of Of(e))V5.call(e,n)&&Cf(t,n,e[n]);return t};function Y5(t,e,n,r){var i;if(!n)return null;const{themeConfig:o}=r,s=Sl({},(i=o.item)==null?void 0:i.icon),a=li(e,s);return X5(t,e,n,a)}function X5(t,e,n,r){return af(t,"icon",n),g5(n,Sl(Sl({},ke(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var G5=Object.defineProperty,q5=Object.defineProperties,U5=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Sf=Object.prototype.propertyIsEnumerable,Ef=(t,e,n)=>e in t?G5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mo=(t,e)=>{for(var n in e||(e={}))Mf.call(e,n)&&Ef(t,n,e[n]);if(Co)for(var n of Co(e))Sf.call(e,n)&&Ef(t,n,e[n]);return t},If=(t,e)=>q5(t,U5(e)),Z5=(t,e)=>{var n={};for(var r in t)Mf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Co)for(var r of Co(t))e.indexOf(r)<0&&Sf.call(t,r)&&(n[r]=t[r]);return n};function Tf(t,e,n){if(!n)return null;const r=_o(n);if(!r)return null;const i=vl(r),o=K5(t,e,i);af(t,"illus",r);const{data:s,color:a}=r;return Q5(i,Mo(If(Mo({},J5(e)),{"clip-path":`url(#${o})`}),a?{color:a}:{}),s)}function K5(t,e,n){const r=`clip-${n}-${k$()}`;if(t.querySelector(`#${r}`))return r;const i=xo(t),o=wt("clipPath",{id:r}),s=e.cloneNode();return h4(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function Q5(t,e,n){const r=e,{"clip-path":i}=r,o=Z5(r,["clip-path"]),{x:s="0",y:a="0",width:l="0",height:c="0"}=o,h=wt("rect",{id:`${t}-volume`,"data-element-type":kt.IllusVolume,x:s,y:a,width:l,height:c,fill:"transparent"}),u=wt("g",{"data-element-type":kt.IllusGroup,"clip-path":i,id:`${t}-group`});u.appendChild(h);const f=wt("use",If(Mo({id:t,fill:"lightgray"},o),{href:rf(n),"data-element-type":kt.Illus}));return u.appendChild(f),u}function J5(t){const e=t.getAttribute("data-illus-bounds");if(!e)return Mo({x:"0",y:"0",width:"0",height:"0"},ke(t,["x","y","width","height"]));const[n,r,i,o]=e.split(" ");return{x:n,y:r,width:i,height:o}}function So(t){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},So(t)}var t6=/^\s+/,e6=/\s+$/;function ot(t,e){if(t=t||"",e=e||{},t instanceof ot)return t;if(!(this instanceof ot))return new ot(t,e);var n=n6(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.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=n.ok}ot.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(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=Hf(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=kf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=kf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=Af(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Af(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return zf(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return s6(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 this._a==1?"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(Jt(this._r,255)*100)+"%",g:Math.round(Jt(this._g,255)*100)+"%",b:Math.round(Jt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Jt(this._r,255)*100)+"%, "+Math.round(Jt(this._g,255)*100)+"%, "+Math.round(Jt(this._b,255)*100)+"%)":"rgba("+Math.round(Jt(this._r,255)*100)+"%, "+Math.round(Jt(this._g,255)*100)+"%, "+Math.round(Jt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:v6[zf(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Lf(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=ot(e);r="#"+Lf(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ot(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(h6,arguments)},brighten:function(){return this._applyModification(d6,arguments)},darken:function(){return this._applyModification(u6,arguments)},desaturate:function(){return this._applyModification(a6,arguments)},saturate:function(){return this._applyModification(l6,arguments)},greyscale:function(){return this._applyModification(c6,arguments)},spin:function(){return this._applyModification(f6,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(m6,arguments)},complement:function(){return this._applyCombination(p6,arguments)},monochromatic:function(){return this._applyCombination(y6,arguments)},splitcomplement:function(){return this._applyCombination(g6,arguments)},triad:function(){return this._applyCombination(Rf,[3])},tetrad:function(){return this._applyCombination(Rf,[4])}},ot.fromRatio=function(t,e){if(So(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=ci(t[r]));t=n}return ot(t,e)};function n6(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=_6(t)),So(t)=="object"&&(yn(t.r)&&yn(t.g)&&yn(t.b)?(e=r6(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):yn(t.h)&&yn(t.s)&&yn(t.v)?(r=ci(t.s),i=ci(t.v),e=o6(t.h,r,i),s=!0,a="hsv"):yn(t.h)&&yn(t.s)&&yn(t.l)&&(r=ci(t.s),o=ci(t.l),e=i6(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Hf(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function r6(t,e,n){return{r:Jt(t,255)*255,g:Jt(e,255)*255,b:Jt(n,255)*255}}function Af(t,e,n){t=Jt(t,255),e=Jt(e,255),n=Jt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function i6(t,e,n){var r,i,o;t=Jt(t,360),e=Jt(e,100),n=Jt(n,100);function s(c,h,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?c+(h-c)*6*u:u<1/2?h:u<2/3?c+(h-c)*(2/3-u)*6:c}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function kf(t,e,n){t=Jt(t,255),e=Jt(e,255),n=Jt(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function o6(t,e,n){t=Jt(t,360)*6,e=Jt(e,100),n=Jt(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,c=[n,s,o,o,a,n][l],h=[a,n,n,s,o,o][l],u=[o,o,a,n,n,s][l];return{r:c*255,g:h*255,b:u*255}}function zf(t,e,n,r){var i=[Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16))];return r&&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 s6(t,e,n,r,i){var o=[Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16)),Fe(Df(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Lf(t,e,n,r){var i=[Fe(Df(r)),Fe(Math.round(t).toString(16)),Fe(Math.round(e).toString(16)),Fe(Math.round(n).toString(16))];return i.join("")}ot.equals=function(t,e){return!t||!e?!1:ot(t).toRgbString()==ot(e).toRgbString()},ot.random=function(){return ot.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function a6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.s-=e/100,n.s=Eo(n.s),ot(n)}function l6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.s+=e/100,n.s=Eo(n.s),ot(n)}function c6(t){return ot(t).desaturate(100)}function h6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.l+=e/100,n.l=Eo(n.l),ot(n)}function d6(t,e){e=e===0?0:e||10;var n=ot(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),ot(n)}function u6(t,e){e=e===0?0:e||10;var n=ot(t).toHsl();return n.l-=e/100,n.l=Eo(n.l),ot(n)}function f6(t,e){var n=ot(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,ot(n)}function p6(t){var e=ot(t).toHsl();return e.h=(e.h+180)%360,ot(e)}function Rf(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ot(t).toHsl(),r=[ot(t)],i=360/e,o=1;o<e;o++)r.push(ot({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function g6(t){var e=ot(t).toHsl(),n=e.h;return[ot(t),ot({h:(n+72)%360,s:e.s,l:e.l}),ot({h:(n+216)%360,s:e.s,l:e.l})]}function m6(t,e,n){e=e||6,n=n||30;var r=ot(t).toHsl(),i=360/n,o=[ot(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(ot(r));return o}function y6(t,e){e=e||6;for(var n=ot(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(ot({h:r,s:i,v:o})),o=(o+a)%1;return s}ot.mix=function(t,e,n){n=n===0?0:n||50;var r=ot(t).toRgb(),i=ot(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return ot(s)},ot.readability=function(t,e){var n=ot(t),r=ot(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},ot.isReadable=function(t,e,n){var r=ot.readability(t,e),i,o;switch(o=!1,i=$6(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},ot.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<e.length;c++)o=ot.readability(t,e[c]),o>i&&(i=o,r=ot(e[c]));return ot.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,ot.mostReadable(t,["#fff","#000"],n))};var El=ot.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"},v6=ot.hexNames=b6(El);function b6(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Hf(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Jt(t,e){x6(t)&&(t="100%");var n=w6(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Eo(t){return Math.min(1,Math.max(0,t))}function ze(t){return parseInt(t,16)}function x6(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function w6(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Fe(t){return t.length==1?"0"+t:""+t}function ci(t){return t<=1&&(t=t*100+"%"),t}function Df(t){return Math.round(parseFloat(t)*255).toString(16)}function Nf(t){return ze(t)/255}var Be=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),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 yn(t){return!!Be.CSS_UNIT.exec(t)}function _6(t){t=t.replace(t6,"").replace(e6,"").toLowerCase();var e=!1;if(El[t])t=El[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Be.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Be.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Be.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Be.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Be.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Be.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Be.hex8.exec(t))?{r:ze(n[1]),g:ze(n[2]),b:ze(n[3]),a:Nf(n[4]),format:e?"name":"hex8"}:(n=Be.hex6.exec(t))?{r:ze(n[1]),g:ze(n[2]),b:ze(n[3]),format:e?"name":"hex"}:(n=Be.hex4.exec(t))?{r:ze(n[1]+""+n[1]),g:ze(n[2]+""+n[2]),b:ze(n[3]+""+n[3]),a:Nf(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Be.hex3.exec(t))?{r:ze(n[1]+""+n[1]),g:ze(n[2]+""+n[2]),b:ze(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function $6(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var P6=Object.defineProperty,jf=Object.getOwnPropertySymbols,O6=Object.prototype.hasOwnProperty,C6=Object.prototype.propertyIsEnumerable,Ff=(t,e,n)=>e in t?P6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M6=(t,e)=>{for(var n in e||(e={}))O6.call(e,n)&&Ff(t,n,e[n]);if(jf)for(var n of jf(e))C6.call(e,n)&&Ff(t,n,e[n]);return t};function Bf(t,e,n,r){const i=t.getAttribute(r),o=S6(i,n),{type:s,colors:a=[]}=o,l=a.length-1,c=a.map((p,g)=>typeof p=="string"?wt("stop",{offset:`${g/l}`,"stop-color":p}):wt("stop",{offset:`${p.offset}`,"stop-color":p.color})),h=E6(n);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,b]]=I6(p),v=wt("linearGradient",{id:h,x1:g,y1:y,x2:m,y2:b});c.forEach(x=>v.appendChild(x)),Wf(e,h,v)}else if(s==="radial-gradient"){const p=wt("radialGradient",{id:h});c.forEach(g=>p.appendChild(g)),Wf(e,h,p)}const u=t.getAttribute("fill"),f=t.getAttribute("stroke");Wn(u)&&t.setAttribute("fill",`url(#${h})`),Wn(f)&&t.setAttribute("stroke",`url(#${h})`)}function Wf(t,e,n){const r=xo(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function S6(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=ot(t),i=M6({},e);return i.colors=r.isDark()?[t,r.lighten(20).toHexString()]:[r.darken(20).toHexString(),t],!("angle"in e)&&i.type==="linear-gradient"&&(i.angle=225),i}function E6(t){const{type:e,colors:n=[]}=t,r=wf(n.map(i=>typeof i=="string"?i:`${i.color}_${i.offset}`).join("-"));if(e==="linear-gradient"){const{angle:i=0}=t;return`${e}-${r}-${i}`}return`${e}-${r}`}function I6(t){const e=Math.PI/180*t,n=Math.cos(e),r=Math.sin(e);return[[.5-n/2,.5-r/2],[.5+n/2,.5+r/2]]}const T6=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return r.appendChild(i),r.appendChild(o),r},dot:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("circle",{cx:"5",cy:"5",r:"3",fill:n}),s=wt("circle",{cx:"15",cy:"15",r:"3",fill:n});return r.appendChild(i),r.appendChild(o),r.appendChild(s),r},hex:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return r.appendChild(i),r.appendChild(o),r},line:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const o=wt("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),s=wt("rect",{width:"100%",height:"100%",fill:e}),a=wt("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),l=wt("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return o.appendChild(s),o.appendChild(a),o.appendChild(l),o},mosaic:({scale:t=1,backgroundColor:e="#ffffff",foregroundColor:n="#000000"})=>{const a=wt("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),l=wt("rect",{width:"100%",height:"100%",fill:e});a.appendChild(l);for(let c=0;c<4;c++)for(let h=0;h<4;h++)if((h+c)%2===0){const u=wt("rect",{x:h*5,y:c*5,width:5,height:5,fill:n});a.appendChild(u)}return a},square:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=wt("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=wt("rect",{width:"100%",height:"100%",fill:e}),o=wt("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return r.appendChild(i),r.appendChild(o),r}},Symbol.toStringTag,{value:"Module"}));var A6=Object.defineProperty,Io=Object.getOwnPropertySymbols,Vf=Object.prototype.hasOwnProperty,Yf=Object.prototype.propertyIsEnumerable,Xf=(t,e,n)=>e in t?A6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Il=(t,e)=>{for(var n in e||(e={}))Vf.call(e,n)&&Xf(t,n,e[n]);if(Io)for(var n of Io(e))Yf.call(e,n)&&Xf(t,n,e[n]);return t},k6=(t,e)=>{var n={};for(var r in t)Vf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Io)for(var r of Io(t))e.indexOf(r)<0&&Yf.call(t,r)&&(n[r]=t[r]);return n};const Tl=new Map;function Gf(t,e){Tl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),Tl.set(t,e)}for(const[t,e]of Object.entries(T6))Gf(t,e);function z6(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=k6(i,["pattern"]),a=Tl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=ke(t,["fill","stroke"]),c=l,h=Il({backgroundColor:c&&ot(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=R6(Il(Il({},r),h));L6(e,u,a(h)),Wn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function L6(t,e,n){const r=xo(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function R6(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return wf(`pattern-${e}-${n}-${r}-${i}`)}function Al(t,e,n){if(t&&t.length){const[r,i]=e,o=Math.PI/180*n,s=Math.cos(o),a=Math.sin(o);for(const l of t){const[c,h]=l;l[0]=(c-r)*s-(h-i)*a+r,l[1]=(c-r)*a+(h-i)*s+i}}}function H6(t,e){return t[0]===e[0]&&t[1]===e[1]}function D6(t,e,n,r=1){const i=n,o=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,a=[0,0];if(i)for(const c of s)Al(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const x=[...v];H6(x[0],x[x.length-1])||x.push([x[0][0],x[0][1]]),x.length>2&&f.push(x)}const p=[];h=Math.max(h,.1);const g=[];for(const v of f)for(let x=0;x<v.length-1;x++){const w=v[x],_=v[x+1];if(w[1]!==_[1]){const $=Math.min(w[1],_[1]);g.push({ymin:$,ymax:Math.max(w[1],_[1]),x:$===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(g.sort(((v,x)=>v.ymin<x.ymin?-1:v.ymin>x.ymin?1:v.x<x.x?-1:v.x>x.x?1:v.ymax===x.ymax?0:(v.ymax-x.ymax)/Math.abs(v.ymax-x.ymax))),!g.length)return p;let y=[],m=g[0].ymin,b=0;for(;y.length||g.length;){if(g.length){let v=-1;for(let x=0;x<g.length&&!(g[x].ymin>m);x++)v=x;g.splice(0,v+1).forEach((x=>{y.push({s:m,edge:x})}))}if(y=y.filter((v=>!(v.edge.ymax<=m))),y.sort(((v,x)=>v.edge.x===x.edge.x?0:(v.edge.x-x.edge.x)/Math.abs(v.edge.x-x.edge.x))),(u!==1||b%h==0)&&y.length>1)for(let v=0;v<y.length;v+=2){const x=v+1;if(x>=y.length)break;const w=y[v].edge,_=y[x].edge;p.push([[Math.round(w.x),m],[Math.round(_.x),m]])}m+=u,y.forEach((v=>{v.edge.x=v.edge.x+u*v.edge.islope})),b++}return p})(s,o,r);if(i){for(const c of s)Al(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Al(f,h,u)})(l,a,-i)}return l}function hi(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),D6(t,i,r,o||1)}class kl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=hi(e,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(e,n){const r=[];for(const i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function To(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}let N6=class extends kl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=hi(e,Object.assign({},n,{hachureGap:r})),o=Math.PI/180*n.hachureAngle,s=[],a=.5*r*Math.cos(o),l=.5*r*Math.sin(o);for(const[c,h]of i)To([c,h])&&s.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}},j6=class extends kl{fillPolygons(e,n){const r=this._fillPolygons(e,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(e,i);return r.ops=r.ops.concat(o.ops),r}},F6=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=hi(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(e,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);const s=i/4;for(const a of e){const l=To(a),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let g=0;g<h;g++){const y=p+u+g*i,m=f-s+2*Math.random()*s,b=y-s+2*Math.random()*s,v=this.helper.ellipse(m,b,o,o,n);r.push(...v.ops)}}return{type:"fillSketch",ops:r}}},B6=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=hi(e,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(e,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,o=[];return e.forEach((s=>{const a=To(s),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(r+i),y=g+r,m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],b=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],b[0],b[1],n))}})),o}};class W6{constructor(e){this.helper=e}fillPolygons(e,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,o=hi(e,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(e,n,r){const i=[];return e.forEach((o=>{const s=To(o),a=Math.round(s/(2*n));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*n,p=2*(u+1)*n,g=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],b=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],r),...this.helper.doubleLineOps(b[0],b[1],m[0],m[1],r))}})),i}}const Me={};let V6=class{constructor(e){this.seed=e}next(){return this.seed?(Xi(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Xi(2,31):Math.random()}};const Y6=0,zl=1,qf=2,Ao={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Ll(t,e){return t.type===e}function Rl(t){const e=[],n=(function(s){const a=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:Y6,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:zl,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:qf,text:""},a})(t);let r="BOD",i=0,o=n[i];for(;!Ll(o,qf);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return Rl("M0,0"+t);i++,s=Ao[o.text],r=o.text}else Ll(o,zl)?s=Ao[r]:(i++,s=Ao[o.text],r=o.text);if(!(i+s<n.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=n[l];if(!Ll(c,zl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Ao[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};e.push(l),i+=s,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return e}function Uf(t){let e=0,n=0,r=0,i=0;const o=[];for(const{key:s,data:a}of t)switch(s){case"M":o.push({key:"M",data:[...a]}),[e,n]=a,[r,i]=a;break;case"m":e+=a[0],n+=a[1],o.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":o.push({key:"L",data:[...a]}),[e,n]=a;break;case"l":e+=a[0],n+=a[1],o.push({key:"L",data:[e,n]});break;case"C":o.push({key:"C",data:[...a]}),e=a[4],n=a[5];break;case"c":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),e=a[2],n=a[3];break;case"q":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":o.push({key:"A",data:[...a]}),e=a[5],n=a[6];break;case"a":e+=a[5],n+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":o.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...a]}),e=a[2],n=a[3];break;case"s":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":o.push({key:"T",data:[...a]}),e=a[0],n=a[1];break;case"t":e+=a[0],n+=a[1],o.push({key:"T",data:[e,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=r,n=i}return o}function Zf(t){const e=[];let n="",r=0,i=0,o=0,s=0,a=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[o,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],a=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let u=0,f=0;n==="C"||n==="S"?(u=r+(r-a),f=i+(i-l)):(u=r,f=i),e.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;n==="Q"||n==="T"?(p=r+(r-a),g=i+(i-l)):(p=r,g=i);const y=r+2*(p-r)/3,m=i+2*(g-i)/3,b=u+2*(p-u)/3,v=f+2*(g-f)/3;e.push({key:"C",data:[y,m,b,v,u,f]}),a=p,l=g,r=u,i=f;break}case"Q":{const[u,f,p,g]=h,y=r+2*(u-r)/3,m=i+2*(f-i)/3,b=p+2*(u-p)/3,v=g+2*(f-g)/3;e.push({key:"C",data:[y,m,b,v,p,g]}),a=u,l=f,r=p,i=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],y=h[4],m=h[5],b=h[6];u===0||f===0?(e.push({key:"C",data:[r,i,m,b,m,b]}),r=m,i=b):(r!==m||i!==b)&&(Kf(r,i,m,b,u,f,p,g,y).forEach((function(v){e.push({key:"C",data:v})})),r=m,i=b);break}case"Z":e.push({key:"Z",data:[]}),r=o,i=s}n=c}return e}function di(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function Kf(t,e,n,r,i,o,s,a,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,g=0,y=0,m=0;if(c)[p,g,y,m]=c;else{[t,e]=di(t,e,-h),[n,r]=di(n,r,-h);const C=(t-n)/2,A=(e-r)/2;let B=C*C/(i*i)+A*A/(o*o);B>1&&(B=Math.sqrt(B),i*=B,o*=B);const k=i*i,D=o*o,z=k*D-k*A*A-D*C*C,N=k*A*A+D*C*C,j=(a===l?-1:1)*Math.sqrt(Math.abs(z/N));y=j*i*A/o+(t+n)/2,m=j*-o*C/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),t<y&&(p=Math.PI-p),n<y&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let b=g-p;if(Math.abs(b)>120*Math.PI/180){const C=g,A=n,B=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Kf(n=y+i*Math.cos(g),r=m+o*Math.sin(g),A,B,i,o,s,0,l,[g,C,y,m])}b=g-p;const v=Math.cos(p),x=Math.sin(p),w=Math.cos(g),_=Math.sin(g),$=Math.tan(b/4),P=4/3*i*$,O=4/3*o*$,T=[t,e],I=[t+P*x,e-O*v],S=[n+P*_,r-O*w],H=[n,r];if(I[0]=2*T[0]-I[0],I[1]=2*T[1]-I[1],c)return[I,S,H].concat(f);{f=[I,S,H].concat(f);const C=[];for(let A=0;A<f.length;A+=3){const B=di(f[A][0],f[A][1],h),k=di(f[A+1][0],f[A+1][1],h),D=di(f[A+2][0],f[A+2][1],h);C.push([B[0],B[1],k[0],k[1],D[0],D[1]])}return C}}const X6={randOffset:function(t,e){return _t(t,e)},randOffsetWithRange:function(t,e,n){return zo(t,e,n)},ellipse:function(t,e,n,r,i){const o=t0(n,r,i);return Hl(t,e,i,o).opset},doubleLineOps:function(t,e,n,r,i){return An(t,e,n,r,i,!0)}};function Qf(t,e,n,r,i){return{type:"path",ops:An(t,e,n,r,i)}}function ko(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let o=0;o<r-1;o++)i.push(...An(t[o][0],t[o][1],t[o+1][0],t[o+1][1],n));return e&&i.push(...An(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return r===2?Qf(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function G6(t,e,n,r,i){return(function(o,s){return ko(o,!0,s)})([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}function Jf(t,e){if(t.length){const n=typeof t[0][0]=="number"?[t]:t,r=Lo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:Lo(n[0],1.5*(1+.22*e.roughness),r0(e));for(let o=1;o<n.length;o++){const s=n[o];if(s.length){const a=Lo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:Lo(s,1.5*(1+.22*e.roughness),r0(e));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function t0(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let s=Math.abs(t/2),a=Math.abs(e/2);const l=1-n.curveFitting;return s+=_t(s*l,n),a+=_t(a*l,n),{increment:o,rx:s,ry:a}}function Hl(t,e,n,r){const[i,o]=o0(r.increment,t,e,r.rx,r.ry,1,r.increment*zo(.1,zo(.4,1,n),n),n);let s=Ro(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=o0(r.increment,t,e,r.rx,r.ry,1.5,0,n),l=Ro(a,null,n);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function e0(t,e,n,r,i,o,s,a,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=_t(.01*u,l),f+=_t(.01*f,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(g-p)/2),b=s0(m,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const v=s0(m,c,h,u,f,p,g,1.5,l);b.push(...v)}return s&&(a?b.push(...An(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...An(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):b.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:b}}function n0(t,e){const n=Zf(Uf(Rl(t))),r=[];let i=[0,0],o=[0,0];for(const{key:s,data:a}of n)switch(s){case"M":o=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...An(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,p]=a;r.push(...q6(l,c,h,u,f,p,o,e)),o=[f,p];break}case"Z":r.push(...An(o[0],o[1],i[0],i[1],e)),o=[i[0],i[1]]}return{type:"path",ops:r}}function Dl(t,e){const n=[];for(const r of t)if(r.length){const i=e.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+_t(i,e),r[0][1]+_t(i,e)]});for(let s=1;s<o;s++)n.push({op:"lineTo",data:[r[s][0]+_t(i,e),r[s][1]+_t(i,e)]})}}return{type:"fillPath",ops:n}}function Tr(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Me[i])switch(i){case"zigzag":Me[i]||(Me[i]=new N6(r));break;case"cross-hatch":Me[i]||(Me[i]=new j6(r));break;case"dots":Me[i]||(Me[i]=new F6(r));break;case"dashed":Me[i]||(Me[i]=new B6(r));break;case"zigzag-line":Me[i]||(Me[i]=new W6(r));break;default:i="hachure",Me[i]||(Me[i]=new kl(r))}return Me[i]})(e,X6).fillPolygons(t,e)}function r0(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function i0(t){return t.randomizer||(t.randomizer=new V6(t.seed||0)),t.randomizer.next()}function zo(t,e,n,r=1){return n.roughness*r*(i0(n)*(e-t)+t)}function _t(t,e,n=1){return zo(-t,t,e,n)}function An(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Nl(t,e,n,r,i,!0,!1);if(s)return a;const l=Nl(t,e,n,r,i,!0,!0);return a.concat(l)}function Nl(t,e,n,r,i,o,s){const a=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*i0(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=_t(p,i,c),g=_t(g,i,c);const y=[],m=()=>_t(u,i,c),b=()=>_t(h,i,c),v=i.preserveVertices;return s?y.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):y.push({op:"move",data:[t+(v?0:_t(h,i,c)),e+(v?0:_t(h,i,c))]}),s?y.push({op:"bcurveTo",data:[p+t+(n-t)*f+m(),g+e+(r-e)*f+m(),p+t+2*(n-t)*f+m(),g+e+2*(r-e)*f+m(),n+(v?0:m()),r+(v?0:m())]}):y.push({op:"bcurveTo",data:[p+t+(n-t)*f+b(),g+e+(r-e)*f+b(),p+t+2*(n-t)*f+b(),g+e+2*(r-e)*f+b(),n+(v?0:b()),r+(v?0:b())]}),y}function Lo(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+_t(e,n),t[0][1]+_t(e,n)]),r.push([t[0][0]+_t(e,n),t[0][1]+_t(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+_t(e,n),t[i][1]+_t(e,n)]),i===t.length-1&&r.push([t[i][0]+_t(e,n),t[i][1]+_t(e,n)]);return Ro(r,null,n)}function Ro(t,e,n){const r=t.length,i=[];if(r>3){const o=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<r;a++){const l=t[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*t[a+1][0]-s*t[a-1][0])/6,l[1]+(s*t[a+1][1]-s*t[a-1][1])/6],o[2]=[t[a+1][0]+(s*t[a][0]-s*t[a+2][0])/6,t[a+1][1]+(s*t[a][1]-s*t[a+2][1])/6],o[3]=[t[a+1][0],t[a+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else r===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):r===2&&i.push(...Nl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function o0(t,e,n,r,i,o,s,a){const l=[],c=[];if(a.roughness===0){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){const u=[e+r*Math.cos(h),n+i*Math.sin(h)];l.push(u),c.push(u)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=_t(.5,a)-Math.PI/2;c.push([_t(o,a)+e+.9*r*Math.cos(h-t),_t(o,a)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=t){const p=[_t(o,a)+e+r*Math.cos(f),_t(o,a)+n+i*Math.sin(f)];l.push(p),c.push(p)}c.push([_t(o,a)+e+r*Math.cos(h+2*Math.PI+.5*s),_t(o,a)+n+i*Math.sin(h+2*Math.PI+.5*s)]),c.push([_t(o,a)+e+.98*r*Math.cos(h+s),_t(o,a)+n+.98*i*Math.sin(h+s)]),c.push([_t(o,a)+e+.9*r*Math.cos(h+.5*s),_t(o,a)+n+.9*i*Math.sin(h+.5*s)])}return[c,l]}function s0(t,e,n,r,i,o,s,a,l){const c=o+_t(.1,l),h=[];h.push([_t(a,l)+e+.9*r*Math.cos(c-t),_t(a,l)+n+.9*i*Math.sin(c-t)]);for(let u=c;u<=s;u+=t)h.push([_t(a,l)+e+r*Math.cos(u),_t(a,l)+n+i*Math.sin(u)]);return h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),Ro(h,null,l)}function q6(t,e,n,r,i,o,s,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:_t(c[0],a)),s[1]+(f?0:_t(c[0],a))]}),h=f?[i,o]:[i+_t(c[p],a),o+_t(c[p],a)],l.push({op:"bcurveTo",data:[t+_t(c[p],a),e+_t(c[p],a),n+_t(c[p],a),r+_t(c[p],a),h[0],h[1]]});return l}function ui(t){return[...t]}function a0(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(ui(t[0]),ui(t[1]),ui(t[2]),ui(t[2]));else{const i=[];i.push(t[0],t[0]);for(let a=1;a<t.length;a++)i.push(t[a]),a===t.length-1&&i.push(t[a]);const o=[],s=1-e;r.push(ui(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*i[a+1][0]-s*i[a-1][0])/6,l[1]+(s*i[a+1][1]-s*i[a-1][1])/6],o[2]=[i[a+1][0]+(s*i[a][0]-s*i[a+2][0])/6,i[a+1][1]+(s*i[a][1]-s*i[a+2][1])/6],o[3]=[i[a+1][0],i[a+1][1]],r.push(o[1],o[2],o[3])}}return r}function Ho(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function U6(t,e,n){const r=Ho(e,n);if(r===0)return Ho(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Ho(t,Kn(e,n,i))}function Kn(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function jl(t,e,n,r){const i=r||[];if((function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;let g=3*h[1]-2*c[1]-f[1];g*=g;let y=3*u[0]-2*f[0]-c[0];y*=y;let m=3*u[1]-2*f[1]-c[1];return m*=m,p<y&&(p=y),g<m&&(g=m),p+g})(t,e)<n){const a=t[e+0];i.length?(o=i[i.length-1],s=a,Math.sqrt(Ho(o,s))>1&&i.push(a)):i.push(a),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=Kn(l,c,.5),p=Kn(c,h,.5),g=Kn(h,u,.5),y=Kn(f,p,.5),m=Kn(p,g,.5),b=Kn(y,m,.5);jl([l,f,y,b],0,n,i),jl([b,m,g,u],0,n,i)}var o,s;return i}function Z6(t,e){return Do(t,0,t.length,e)}function Do(t,e,n,r,i){const o=i||[],s=t[e],a=t[n-1];let l=0,c=1;for(let h=e+1;h<n-1;++h){const u=U6(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(Do(t,e,c+1,r,o),Do(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function Fl(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)jl(t,3*o,e,r);return n&&n>0?Do(r,0,r.length,n):r}const Le="none";class No{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*Xi(2,31))}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,r){return{shape:e,sets:n||[],options:r||this.defaultOptions}}line(e,n,r,i,o){const s=this._o(o);return this._d("line",[Qf(e,n,r,i,s)],s)}rectangle(e,n,r,i,o){const s=this._o(o),a=[],l=G6(e,n,r,i,s);if(s.fill){const c=[[e,n],[e+r,n],[e+r,n+i],[e,n+i]];s.fillStyle==="solid"?a.push(Dl([c],s)):a.push(Tr([c],s))}return s.stroke!==Le&&a.push(l),this._d("rectangle",a,s)}ellipse(e,n,r,i,o){const s=this._o(o),a=[],l=t0(r,i,s),c=Hl(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Hl(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Tr([c.estimatedPoints],s));return s.stroke!==Le&&a.push(c.opset),this._d("ellipse",a,s)}circle(e,n,r,i){const o=this.ellipse(e,n,r,r,i);return o.shape="circle",o}linearPath(e,n){const r=this._o(n);return this._d("linearPath",[ko(e,!1,r)],r)}arc(e,n,r,i,o,s,a=!1,l){const c=this._o(l),h=[],u=e0(e,n,r,i,o,s,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=e0(e,n,r,i,o,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,y,m,b,v){const x=f,w=p;let _=Math.abs(g/2),$=Math.abs(y/2);_+=_t(.01*_,v),$+=_t(.01*$,v);let P=m,O=b;for(;P<0;)P+=2*Math.PI,O+=2*Math.PI;O-P>2*Math.PI&&(P=0,O=2*Math.PI);const T=(O-P)/v.curveStepCount,I=[];for(let S=P;S<=O;S+=T)I.push([x+_*Math.cos(S),w+$*Math.sin(S)]);return I.push([x+_*Math.cos(O),w+$*Math.sin(O)]),I.push([x,w]),Tr([I],v)})(e,n,r,i,o,s,c));return c.stroke!==Le&&h.push(u),this._d("arc",h,c)}curve(e,n){const r=this._o(n),i=[],o=Jf(e,r);if(r.fill&&r.fill!==Le)if(r.fillStyle==="solid"){const s=Jf(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],a=e;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Fl(a0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...Fl(a0(c),10,(1+r.roughness)/2))}s.length&&i.push(Tr([s],r))}return r.stroke!==Le&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=ko(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Dl([e],r)):i.push(Tr([e],r))),r.stroke!==Le&&i.push(o),this._d("polygon",i,r)}path(e,n){const r=this._o(n),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&r.fill!=="transparent"&&r.fill!==Le,s=r.stroke!==Le,a=!!(r.simplification&&r.simplification<1),l=(function(h,u,f){const p=Zf(Uf(Rl(h))),g=[];let y=[],m=[0,0],b=[];const v=()=>{b.length>=4&&y.push(...Fl(b,u)),b=[]},x=()=>{v(),y.length&&(g.push(y),y=[])};for(const{key:_,data:$}of p)switch(_){case"M":x(),m=[$[0],$[1]],y.push(m);break;case"L":v(),y.push([$[0],$[1]]);break;case"C":if(!b.length){const P=y.length?y[y.length-1]:m;b.push([P[0],P[1]])}b.push([$[0],$[1]]),b.push([$[2],$[3]]),b.push([$[4],$[5]]);break;case"Z":v(),y.push([m[0],m[1]])}if(x(),!f)return g;const w=[];for(const _ of g){const $=Z6(_,f);$.length&&w.push($)}return w})(e,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=n0(e,r);if(o)if(r.fillStyle==="solid")if(l.length===1){const h=n0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(Dl(l,r));else i.push(Tr(l,r));return s&&(a?l.forEach((h=>{i.push(ko(h,!1,r))})):i.push(c)),this._d("path",i,r)}opsToPath(e,n){let r="";for(const i of e.ops){const o=typeof n=="number"&&n>=0?i.data.map((s=>+s.toFixed(n))):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(e){const n=e.sets||[],r=e.options||this.defaultOptions,i=[];for(const o of n){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Le};break;case"fillPath":s={d:this.opsToPath(o),stroke:Le,strokeWidth:0,fill:r.fill||Le};break;case"fillSketch":s=this.fillSketch(o,r)}s&&i.push(s)}return i}fillSketch(e,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||Le,strokeWidth:r,fill:Le}}_mergedShape(e){return e.filter(((n,r)=>r===0||n.op!=="move"))}}class K6{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new No(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const s of n)switch(s.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,s,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,o,a),i.restore();break}case"fillSketch":this.fillSketch(i,s,r)}}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,n,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,r,i="nonzero"){e.beginPath();for(const o of n.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}n.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s),s}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s),s}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s),s}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o),o}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r),r}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r),r}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c),c}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r),r}path(e,n){const r=this.gen.path(e,n);return this.draw(r),r}}const jo="http://www.w3.org/2000/svg";class Q6{constructor(e,n){this.svg=e,this.gen=new No(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(jo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(jo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(jo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&o.appendChild(l)}return o}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=e.createElementNS(jo,"path");return o.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s)}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s)}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s)}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o)}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r)}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r)}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c)}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r)}path(e,n){const r=this.gen.path(e,n);return this.draw(r)}}var J6={canvas:(t,e)=>new K6(t,e),svg:(t,e)=>new Q6(t,e),generator:t=>new No(t),newSeed:()=>No.newSeed()},t7=Object.defineProperty,l0=Object.getOwnPropertySymbols,e7=Object.prototype.hasOwnProperty,n7=Object.prototype.propertyIsEnumerable,c0=(t,e,n)=>e in t?t7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r7=(t,e)=>{for(var n in e||(e={}))e7.call(e,n)&&c0(t,n,e[n]);if(l0)for(var n of l0(e))n7.call(e,n)&&c0(t,n,e[n]);return t};function i7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=J6.svg(e,{options:{seed:1e3}}),i=wt("g");t.hasAttribute("transform")&&i.setAttribute("transform",t.getAttribute("transform")||"");const o=t.cloneNode();Yt(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",i.appendChild(o);const s=s7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",o7(l,c),i.appendChild(l)}t.id&&(i.id=t.id),Array.from(t.classList).forEach(l=>{i.classList.contains(l)||i.classList.add(l)}),Array.from(t.attributes).forEach(l=>{l.name.startsWith("data-")&&i.setAttribute(l.name,l.value)}),i.childElementCount>0?t.replaceWith(i):t.remove()}function o7(t,e){e.opacity!==void 0&&t.setAttribute("opacity",String(e.opacity)),e.fillOpacity!==void 0&&t.setAttribute("fill-opacity",String(e.fillOpacity)),e.strokeOpacity!==void 0&&t.setAttribute("stroke-opacity",String(e.strokeOpacity)),e.strokeLinecap&&t.setAttribute("stroke-linecap",e.strokeLinecap),e.strokeLinejoin&&t.setAttribute("stroke-linejoin",e.strokeLinejoin),e.strokeDasharray&&t.setAttribute("stroke-dasharray",e.strokeDasharray),e.filter&&t.setAttribute("filter",e.filter),e.clipPath&&t.setAttribute("clip-path",e.clipPath),e.mask&&t.setAttribute("mask",e.mask)}function s7(t,e,n){const r=e.nodeName.toLowerCase(),i=(o,s)=>{const a=ke(o,[...s,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),l={},c=r7({},n),h={};s.forEach(P=>{a[P]!==void 0&&(l[P]=a[P])});const{fill:u,"fill-opacity":f,stroke:p,"stroke-opacity":g,"stroke-width":y,"stroke-dasharray":m,"stroke-linecap":b,"stroke-linejoin":v,opacity:x,filter:w,"clip-path":_,mask:$}=a;if(c.fill=u||"none",c.stroke=p||(u&&u!=="none"?u:"currentColor"),y&&(c.strokeWidth=parseFloat(y)),m&&m!=="none"){const P=m.split(/[\s,]+/).map(O=>parseFloat(O)).filter(O=>!isNaN(O));P.length>0&&(c.strokeLineDash=P)}return f&&(h.fillOpacity=parseFloat(f)),g&&(h.strokeOpacity=parseFloat(g)),x&&(h.opacity=parseFloat(x)),b&&(h.strokeLinecap=b),v&&(h.strokeLinejoin=v),m&&m!=="none"&&(h.strokeDasharray=m),w&&(h.filter=w),_&&(h.clipPath=_),$&&(h.mask=$),[l,c,h]};try{let o=null,s={};switch(r){case"circle":{const[a,l,c]=i(e,["cx","cy","r"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.r)||0;o=t.circle(h,u,f*2,l),s=c;break}case"ellipse":{const[a,l,c]=i(e,["cx","cy","rx","ry"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.rx)||0,p=parseFloat(a.ry)||0;o=t.ellipse(h,u,f*2,p*2,l),s=c;break}case"line":{const[a,l,c]=i(e,["x1","y1","x2","y2"]),h=parseFloat(a.x1)||0,u=parseFloat(a.y1)||0,f=parseFloat(a.x2)||0,p=parseFloat(a.y2)||0;o=t.line(h,u,f,p,l),s=c;break}case"rect":{const[a,l,c]=i(e,["x","y","width","height","rx","ry"]),h=parseFloat(a.x)||0,u=parseFloat(a.y)||0,f=parseFloat(a.width)||0,p=parseFloat(a.height)||0,g=parseFloat(a.rx)||0,y=parseFloat(a.ry)||0;if(g>0||y>0){const v=a7(h,u,f,p,g||y,y||g);o=t.path(v,l)}else o=t.rectangle(h,u,f,p,l);s=c;break}case"path":{const[a,l,c]=i(e,["d"]),h=a.d||"";if(!h)return console.warn("Path element has no d attribute"),null;o=t.path(h,l),s=c;break}case"polygon":{const[a,l,c]=i(e,["points"]),h=h0(a.points||"");if(h.length<3)return console.warn("Polygon needs at least 3 points"),null;o=t.polygon(h,l),s=c;break}case"polyline":{const[a,l,c]=i(e,["points"]),h=h0(a.points||"");if(h.length<2)return console.warn("Polyline needs at least 2 points"),null;o=t.linearPath(h,l),s=c;break}default:return console.warn(`Unsupported shape type: ${r}`),null}return o?{element:o,svgAttributes:s}:null}catch(o){return console.error(`Error creating rough shape for ${r}:`,o),null}}function a7(t,e,n,r,i,o){return i=Math.min(i,n/2),o=Math.min(o,r/2),`
|
|
19
|
+
</symbol>`);r&&(r.setAttribute("id",Tf),e.appendChild(r)),t.prepend(e)}function Af(t,e){const{id:n,x:r=0,y:i=0,width:o=0,height:s=0}=Re(t,["id","x","y","width","height"]),a=$t("g",{id:n,class:"btn-group",transform:`translate(${r}, ${i})`}),l=t.getAttribute("data-items");l&&a.setAttribute("data-items",l);const c=Math.max(+o,+s)/2,h=$t("circle",{cx:c,cy:c,r:c,fill:"#fff",stroke:"transparent"});a.appendChild(h);const u=$t("use",{href:`#${e}`,width:o,height:s});a.appendChild(u),a.style.cursor="pointer",t.replaceWith(a)}function a_(t){Af(t,If)}function l_(t){Af(t,Tf)}var c_=Object.defineProperty,kf=Object.getOwnPropertySymbols,h_=Object.prototype.hasOwnProperty,d_=Object.prototype.propertyIsEnumerable,Lf=(t,e,n)=>e in t?c_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zl=(t,e)=>{for(var n in e||(e={}))h_.call(e,n)&&Lf(t,n,e[n]);if(kf)for(var n of kf(e))d_.call(e,n)&&Lf(t,n,e[n]);return t};function u_(t,e,n,r){var i;const o=n.icon;if(!o)return null;const{themeConfig:s}=r,a=zl({},(i=s.item)==null?void 0:i.icon),l=pi(e,a);return f_(t,e,o,l,n)}function f_(t,e,n,r,i){return mf(t,"icon",n,i),zw(n,zl(zl({},Re(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var p_=Object.defineProperty,g_=Object.defineProperties,m_=Object.getOwnPropertyDescriptors,To=Object.getOwnPropertySymbols,zf=Object.prototype.hasOwnProperty,Hf=Object.prototype.propertyIsEnumerable,Rf=(t,e,n)=>e in t?p_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ao=(t,e)=>{for(var n in e||(e={}))zf.call(e,n)&&Rf(t,n,e[n]);if(To)for(var n of To(e))Hf.call(e,n)&&Rf(t,n,e[n]);return t},Df=(t,e)=>g_(t,m_(e)),y_=(t,e)=>{var n={};for(var r in t)zf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&To)for(var r of To(t))e.indexOf(r)<0&&Hf.call(t,r)&&(n[r]=t[r]);return n};function Nf(t,e,n,r){if(!n)return null;const i=Mo(n);if(!i)return null;const o=$l(i),s=x_(t,e,o);mf(t,"illus",i,r);const{data:a,color:l}=i;return b_(o,Ao(Df(Ao({},w_(e)),{"clip-path":`url(#${s})`}),l?{color:l}:{}),a)}function v_(t,e,n){const r=n.illus;return Nf(t,e,r,n)}function x_(t,e,n){const r=`clip-${n}-${eP()}`;if(t.querySelector(`#${r}`))return r;const i=Co(t),o=$t("clipPath",{id:r}),s=e.cloneNode();return I6(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function b_(t,e,n){const r=e,{"clip-path":i}=r,o=y_(r,["clip-path"]),{x:s="0",y:a="0",width:l="0",height:c="0"}=o,h=$t("rect",{id:`${t}-volume`,"data-element-type":zt.IllusVolume,x:s,y:a,width:l,height:c,fill:"transparent"}),u=$t("g",{"data-element-type":zt.IllusGroup,"clip-path":i,id:`${t}-group`});u.appendChild(h);const f=$t("use",Df(Ao({id:t,fill:"lightgray"},o),{href:ff(n),"data-element-type":zt.Illus}));return u.appendChild(f),u}function w_(t){const e=t.getAttribute("data-illus-bounds");if(!e)return Ao({x:"0",y:"0",width:"0",height:"0"},Re(t,["x","y","width","height"]));const[n,r,i,o]=e.split(" ");return{x:n,y:r,width:i,height:o}}function ko(t){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ko(t)}var __=/^\s+/,$_=/\s+$/;function lt(t,e){if(t=t||"",e=e||{},t instanceof lt)return t;if(!(this instanceof lt))return new lt(t,e);var n=P_(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.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=n.ok}lt.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(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=Yf(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Wf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Wf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=jf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=jf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return Ff(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return S_(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 this._a==1?"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(se(this._r,255)*100)+"%",g:Math.round(se(this._g,255)*100)+"%",b:Math.round(se(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(se(this._r,255)*100)+"%, "+Math.round(se(this._g,255)*100)+"%, "+Math.round(se(this._b,255)*100)+"%)":"rgba("+Math.round(se(this._r,255)*100)+"%, "+Math.round(se(this._g,255)*100)+"%, "+Math.round(se(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j_[Ff(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Bf(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=lt(e);r="#"+Bf(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return lt(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(A_,arguments)},brighten:function(){return this._applyModification(k_,arguments)},darken:function(){return this._applyModification(L_,arguments)},desaturate:function(){return this._applyModification(E_,arguments)},saturate:function(){return this._applyModification(I_,arguments)},greyscale:function(){return this._applyModification(T_,arguments)},spin:function(){return this._applyModification(z_,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(D_,arguments)},complement:function(){return this._applyCombination(H_,arguments)},monochromatic:function(){return this._applyCombination(N_,arguments)},splitcomplement:function(){return this._applyCombination(R_,arguments)},triad:function(){return this._applyCombination(Vf,[3])},tetrad:function(){return this._applyCombination(Vf,[4])}},lt.fromRatio=function(t,e){if(ko(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=gi(t[r]));t=n}return lt(t,e)};function P_(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=V_(t)),ko(t)=="object"&&(bn(t.r)&&bn(t.g)&&bn(t.b)?(e=C_(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):bn(t.h)&&bn(t.s)&&bn(t.v)?(r=gi(t.s),i=gi(t.v),e=M_(t.h,r,i),s=!0,a="hsv"):bn(t.h)&&bn(t.s)&&bn(t.l)&&(r=gi(t.s),o=gi(t.l),e=O_(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Yf(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function C_(t,e,n){return{r:se(t,255)*255,g:se(e,255)*255,b:se(n,255)*255}}function jf(t,e,n){t=se(t,255),e=se(e,255),n=se(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function O_(t,e,n){var r,i,o;t=se(t,360),e=se(e,100),n=se(n,100);function s(c,h,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?c+(h-c)*6*u:u<1/2?h:u<2/3?c+(h-c)*(2/3-u)*6:c}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function Wf(t,e,n){t=se(t,255),e=se(e,255),n=se(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function M_(t,e,n){t=se(t,360)*6,e=se(e,100),n=se(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,c=[n,s,o,o,a,n][l],h=[a,n,n,s,o,o][l],u=[o,o,a,n,n,s][l];return{r:c*255,g:h*255,b:u*255}}function Ff(t,e,n,r){var i=[Xe(Math.round(t).toString(16)),Xe(Math.round(e).toString(16)),Xe(Math.round(n).toString(16))];return r&&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 S_(t,e,n,r,i){var o=[Xe(Math.round(t).toString(16)),Xe(Math.round(e).toString(16)),Xe(Math.round(n).toString(16)),Xe(Xf(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Bf(t,e,n,r){var i=[Xe(Xf(r)),Xe(Math.round(t).toString(16)),Xe(Math.round(e).toString(16)),Xe(Math.round(n).toString(16))];return i.join("")}lt.equals=function(t,e){return!t||!e?!1:lt(t).toRgbString()==lt(e).toRgbString()},lt.random=function(){return lt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function E_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s-=e/100,n.s=Lo(n.s),lt(n)}function I_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s+=e/100,n.s=Lo(n.s),lt(n)}function T_(t){return lt(t).desaturate(100)}function A_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l+=e/100,n.l=Lo(n.l),lt(n)}function k_(t,e){e=e===0?0:e||10;var n=lt(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),lt(n)}function L_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l-=e/100,n.l=Lo(n.l),lt(n)}function z_(t,e){var n=lt(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,lt(n)}function H_(t){var e=lt(t).toHsl();return e.h=(e.h+180)%360,lt(e)}function Vf(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=lt(t).toHsl(),r=[lt(t)],i=360/e,o=1;o<e;o++)r.push(lt({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function R_(t){var e=lt(t).toHsl(),n=e.h;return[lt(t),lt({h:(n+72)%360,s:e.s,l:e.l}),lt({h:(n+216)%360,s:e.s,l:e.l})]}function D_(t,e,n){e=e||6,n=n||30;var r=lt(t).toHsl(),i=360/n,o=[lt(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(lt(r));return o}function N_(t,e){e=e||6;for(var n=lt(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(lt({h:r,s:i,v:o})),o=(o+a)%1;return s}lt.mix=function(t,e,n){n=n===0?0:n||50;var r=lt(t).toRgb(),i=lt(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return lt(s)},lt.readability=function(t,e){var n=lt(t),r=lt(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},lt.isReadable=function(t,e,n){var r=lt.readability(t,e),i,o;switch(o=!1,i=Y_(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},lt.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<e.length;c++)o=lt.readability(t,e[c]),o>i&&(i=o,r=lt(e[c]));return lt.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,lt.mostReadable(t,["#fff","#000"],n))};var Hl=lt.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"},j_=lt.hexNames=W_(Hl);function W_(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Yf(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function se(t,e){F_(t)&&(t="100%");var n=B_(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function Lo(t){return Math.min(1,Math.max(0,t))}function De(t){return parseInt(t,16)}function F_(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function B_(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Xe(t){return t.length==1?"0"+t:""+t}function gi(t){return t<=1&&(t=t*100+"%"),t}function Xf(t){return Math.round(parseFloat(t)*255).toString(16)}function Gf(t){return De(t)/255}var Ge=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),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 bn(t){return!!Ge.CSS_UNIT.exec(t)}function V_(t){t=t.replace(__,"").replace($_,"").toLowerCase();var e=!1;if(Hl[t])t=Hl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ge.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Ge.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ge.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Ge.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ge.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Ge.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ge.hex8.exec(t))?{r:De(n[1]),g:De(n[2]),b:De(n[3]),a:Gf(n[4]),format:e?"name":"hex8"}:(n=Ge.hex6.exec(t))?{r:De(n[1]),g:De(n[2]),b:De(n[3]),format:e?"name":"hex"}:(n=Ge.hex4.exec(t))?{r:De(n[1]+""+n[1]),g:De(n[2]+""+n[2]),b:De(n[3]+""+n[3]),a:Gf(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Ge.hex3.exec(t))?{r:De(n[1]+""+n[1]),g:De(n[2]+""+n[2]),b:De(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Y_(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var X_=Object.defineProperty,qf=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,q_=Object.prototype.propertyIsEnumerable,Uf=(t,e,n)=>e in t?X_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U_=(t,e)=>{for(var n in e||(e={}))G_.call(e,n)&&Uf(t,n,e[n]);if(qf)for(var n of qf(e))q_.call(e,n)&&Uf(t,n,e[n]);return t};function Zf(t,e,n,r){const i=t.getAttribute(r),o=Z_(i,n),{type:s,colors:a=[]}=o,l=a.length-1,c=a.map((p,g)=>typeof p=="string"?$t("stop",{offset:`${g/l}`,"stop-color":p}):$t("stop",{offset:`${p.offset}`,"stop-color":p.color})),h=K_(n);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,x]]=Q_(p),v=$t("linearGradient",{id:h,x1:g,y1:y,x2:m,y2:x});c.forEach(b=>v.appendChild(b)),Kf(e,h,v)}else if(s==="radial-gradient"){const p=$t("radialGradient",{id:h});c.forEach(g=>p.appendChild(g)),Kf(e,h,p)}const u=t.getAttribute("fill"),f=t.getAttribute("stroke");Xn(u)&&t.setAttribute("fill",`url(#${h})`),Xn(f)&&t.setAttribute("stroke",`url(#${h})`)}function Kf(t,e,n){const r=Co(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function Z_(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=lt(t),i=U_({},e);return i.colors=r.isDark()?[t,r.lighten(20).toHexString()]:[r.darken(20).toHexString(),t],!("angle"in e)&&i.type==="linear-gradient"&&(i.angle=225),i}function K_(t){const{type:e,colors:n=[]}=t,r=Ef(n.map(i=>typeof i=="string"?i:`${i.color}_${i.offset}`).join("-"));if(e==="linear-gradient"){const{angle:i=0}=t;return`${e}-${r}-${i}`}return`${e}-${r}`}function Q_(t){const e=Math.PI/180*t,n=Math.cos(e),r=Math.sin(e);return[[.5-n/2,.5-r/2],[.5+n/2,.5+r/2]]}const J_=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const r=$t("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=$t("rect",{width:"100%",height:"100%",fill:e}),o=$t("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return r.appendChild(i),r.appendChild(o),r},dot:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const r=$t("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=$t("rect",{width:"100%",height:"100%",fill:e}),o=$t("circle",{cx:"5",cy:"5",r:"3",fill:n}),s=$t("circle",{cx:"15",cy:"15",r:"3",fill:n});return r.appendChild(i),r.appendChild(o),r.appendChild(s),r},hex:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=$t("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=$t("rect",{width:"100%",height:"100%",fill:e}),o=$t("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return r.appendChild(i),r.appendChild(o),r},line:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const o=$t("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),s=$t("rect",{width:"100%",height:"100%",fill:e}),a=$t("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),l=$t("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return o.appendChild(s),o.appendChild(a),o.appendChild(l),o},mosaic:({scale:t=1,backgroundColor:e="#ffffff",foregroundColor:n="#000000"})=>{const a=$t("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),l=$t("rect",{width:"100%",height:"100%",fill:e});a.appendChild(l);for(let c=0;c<4;c++)for(let h=0;h<4;h++)if((h+c)%2===0){const u=$t("rect",{x:h*5,y:c*5,width:5,height:5,fill:n});a.appendChild(u)}return a},square:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=$t("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=$t("rect",{width:"100%",height:"100%",fill:e}),o=$t("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return r.appendChild(i),r.appendChild(o),r}},Symbol.toStringTag,{value:"Module"}));var t7=Object.defineProperty,zo=Object.getOwnPropertySymbols,Qf=Object.prototype.hasOwnProperty,Jf=Object.prototype.propertyIsEnumerable,t0=(t,e,n)=>e in t?t7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rl=(t,e)=>{for(var n in e||(e={}))Qf.call(e,n)&&t0(t,n,e[n]);if(zo)for(var n of zo(e))Jf.call(e,n)&&t0(t,n,e[n]);return t},e7=(t,e)=>{var n={};for(var r in t)Qf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&zo)for(var r of zo(t))e.indexOf(r)<0&&Jf.call(t,r)&&(n[r]=t[r]);return n};const Dl=new Map;function e0(t,e){Dl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),Dl.set(t,e)}for(const[t,e]of Object.entries(J_))e0(t,e);function n7(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=e7(i,["pattern"]),a=Dl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=Re(t,["fill","stroke"]),c=l,h=Rl({backgroundColor:c&<(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=i7(Rl(Rl({},r),h));r7(e,u,a(h)),Xn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function r7(t,e,n){const r=Co(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function i7(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return Ef(`pattern-${e}-${n}-${r}-${i}`)}function Nl(t,e,n){if(t&&t.length){const[r,i]=e,o=Math.PI/180*n,s=Math.cos(o),a=Math.sin(o);for(const l of t){const[c,h]=l;l[0]=(c-r)*s-(h-i)*a+r,l[1]=(c-r)*a+(h-i)*s+i}}}function o7(t,e){return t[0]===e[0]&&t[1]===e[1]}function s7(t,e,n,r=1){const i=n,o=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,a=[0,0];if(i)for(const c of s)Nl(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const b=[...v];o7(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&f.push(b)}const p=[];h=Math.max(h,.1);const g=[];for(const v of f)for(let b=0;b<v.length-1;b++){const w=v[b],_=v[b+1];if(w[1]!==_[1]){const $=Math.min(w[1],_[1]);g.push({ymin:$,ymax:Math.max(w[1],_[1]),x:$===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(g.sort(((v,b)=>v.ymin<b.ymin?-1:v.ymin>b.ymin?1:v.x<b.x?-1:v.x>b.x?1:v.ymax===b.ymax?0:(v.ymax-b.ymax)/Math.abs(v.ymax-b.ymax))),!g.length)return p;let y=[],m=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let v=-1;for(let b=0;b<g.length&&!(g[b].ymin>m);b++)v=b;g.splice(0,v+1).forEach((b=>{y.push({s:m,edge:b})}))}if(y=y.filter((v=>!(v.edge.ymax<=m))),y.sort(((v,b)=>v.edge.x===b.edge.x?0:(v.edge.x-b.edge.x)/Math.abs(v.edge.x-b.edge.x))),(u!==1||x%h==0)&&y.length>1)for(let v=0;v<y.length;v+=2){const b=v+1;if(b>=y.length)break;const w=y[v].edge,_=y[b].edge;p.push([[Math.round(w.x),m],[Math.round(_.x),m]])}m+=u,y.forEach((v=>{v.edge.x=v.edge.x+u*v.edge.islope})),x++}return p})(s,o,r);if(i){for(const c of s)Nl(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Nl(f,h,u)})(l,a,-i)}return l}function mi(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),s7(t,i,r,o||1)}class jl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=mi(e,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(e,n){const r=[];for(const i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function Ho(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}let a7=class extends jl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=mi(e,Object.assign({},n,{hachureGap:r})),o=Math.PI/180*n.hachureAngle,s=[],a=.5*r*Math.cos(o),l=.5*r*Math.sin(o);for(const[c,h]of i)Ho([c,h])&&s.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}},l7=class extends jl{fillPolygons(e,n){const r=this._fillPolygons(e,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(e,i);return r.ops=r.ops.concat(o.ops),r}},c7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=mi(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(e,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);const s=i/4;for(const a of e){const l=Ho(a),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let g=0;g<h;g++){const y=p+u+g*i,m=f-s+2*Math.random()*s,x=y-s+2*Math.random()*s,v=this.helper.ellipse(m,x,o,o,n);r.push(...v.ops)}}return{type:"fillSketch",ops:r}}},h7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=mi(e,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(e,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,o=[];return e.forEach((s=>{const a=Ho(s),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(r+i),y=g+r,m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],n))}})),o}};class d7{constructor(e){this.helper=e}fillPolygons(e,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,o=mi(e,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(e,n,r){const i=[];return e.forEach((o=>{const s=Ho(o),a=Math.round(s/(2*n));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*n,p=2*(u+1)*n,g=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r),...this.helper.doubleLineOps(x[0],x[1],m[0],m[1],r))}})),i}}const Ae={};let u7=class{constructor(e){this.seed=e}next(){return this.seed?(Qi(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Qi(2,31):Math.random()}};const f7=0,Wl=1,n0=2,Ro={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Fl(t,e){return t.type===e}function Bl(t){const e=[],n=(function(s){const a=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:f7,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:Wl,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:n0,text:""},a})(t);let r="BOD",i=0,o=n[i];for(;!Fl(o,n0);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return Bl("M0,0"+t);i++,s=Ro[o.text],r=o.text}else Fl(o,Wl)?s=Ro[r]:(i++,s=Ro[o.text],r=o.text);if(!(i+s<n.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=n[l];if(!Fl(c,Wl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Ro[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};e.push(l),i+=s,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return e}function r0(t){let e=0,n=0,r=0,i=0;const o=[];for(const{key:s,data:a}of t)switch(s){case"M":o.push({key:"M",data:[...a]}),[e,n]=a,[r,i]=a;break;case"m":e+=a[0],n+=a[1],o.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":o.push({key:"L",data:[...a]}),[e,n]=a;break;case"l":e+=a[0],n+=a[1],o.push({key:"L",data:[e,n]});break;case"C":o.push({key:"C",data:[...a]}),e=a[4],n=a[5];break;case"c":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),e=a[2],n=a[3];break;case"q":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":o.push({key:"A",data:[...a]}),e=a[5],n=a[6];break;case"a":e+=a[5],n+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":o.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...a]}),e=a[2],n=a[3];break;case"s":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":o.push({key:"T",data:[...a]}),e=a[0],n=a[1];break;case"t":e+=a[0],n+=a[1],o.push({key:"T",data:[e,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=r,n=i}return o}function i0(t){const e=[];let n="",r=0,i=0,o=0,s=0,a=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[o,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],a=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let u=0,f=0;n==="C"||n==="S"?(u=r+(r-a),f=i+(i-l)):(u=r,f=i),e.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;n==="Q"||n==="T"?(p=r+(r-a),g=i+(i-l)):(p=r,g=i);const y=r+2*(p-r)/3,m=i+2*(g-i)/3,x=u+2*(p-u)/3,v=f+2*(g-f)/3;e.push({key:"C",data:[y,m,x,v,u,f]}),a=p,l=g,r=u,i=f;break}case"Q":{const[u,f,p,g]=h,y=r+2*(u-r)/3,m=i+2*(f-i)/3,x=p+2*(u-p)/3,v=g+2*(f-g)/3;e.push({key:"C",data:[y,m,x,v,p,g]}),a=u,l=f,r=p,i=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],y=h[4],m=h[5],x=h[6];u===0||f===0?(e.push({key:"C",data:[r,i,m,x,m,x]}),r=m,i=x):(r!==m||i!==x)&&(o0(r,i,m,x,u,f,p,g,y).forEach((function(v){e.push({key:"C",data:v})})),r=m,i=x);break}case"Z":e.push({key:"Z",data:[]}),r=o,i=s}n=c}return e}function yi(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function o0(t,e,n,r,i,o,s,a,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,g=0,y=0,m=0;if(c)[p,g,y,m]=c;else{[t,e]=yi(t,e,-h),[n,r]=yi(n,r,-h);const O=(t-n)/2,T=(e-r)/2;let F=O*O/(i*i)+T*T/(o*o);F>1&&(F=Math.sqrt(F),i*=F,o*=F);const L=i*i,D=o*o,k=L*D-L*T*T-D*O*O,N=L*T*T+D*O*O,j=(a===l?-1:1)*Math.sqrt(Math.abs(k/N));y=j*i*T/o+(t+n)/2,m=j*-o*O/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),t<y&&(p=Math.PI-p),n<y&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const O=g,T=n,F=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=o0(n=y+i*Math.cos(g),r=m+o*Math.sin(g),T,F,i,o,s,0,l,[g,O,y,m])}x=g-p;const v=Math.cos(p),b=Math.sin(p),w=Math.cos(g),_=Math.sin(g),$=Math.tan(x/4),P=4/3*i*$,C=4/3*o*$,A=[t,e],E=[t+P*b,e-C*v],S=[n+P*_,r-C*w],R=[n,r];if(E[0]=2*A[0]-E[0],E[1]=2*A[1]-E[1],c)return[E,S,R].concat(f);{f=[E,S,R].concat(f);const O=[];for(let T=0;T<f.length;T+=3){const F=yi(f[T][0],f[T][1],h),L=yi(f[T+1][0],f[T+1][1],h),D=yi(f[T+2][0],f[T+2][1],h);O.push([F[0],F[1],L[0],L[1],D[0],D[1]])}return O}}const p7={randOffset:function(t,e){return Pt(t,e)},randOffsetWithRange:function(t,e,n){return No(t,e,n)},ellipse:function(t,e,n,r,i){const o=l0(n,r,i);return Vl(t,e,i,o).opset},doubleLineOps:function(t,e,n,r,i){return Hn(t,e,n,r,i,!0)}};function s0(t,e,n,r,i){return{type:"path",ops:Hn(t,e,n,r,i)}}function Do(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let o=0;o<r-1;o++)i.push(...Hn(t[o][0],t[o][1],t[o+1][0],t[o+1][1],n));return e&&i.push(...Hn(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return r===2?s0(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function g7(t,e,n,r,i){return(function(o,s){return Do(o,!0,s)})([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}function a0(t,e){if(t.length){const n=typeof t[0][0]=="number"?[t]:t,r=jo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:jo(n[0],1.5*(1+.22*e.roughness),d0(e));for(let o=1;o<n.length;o++){const s=n[o];if(s.length){const a=jo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:jo(s,1.5*(1+.22*e.roughness),d0(e));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function l0(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let s=Math.abs(t/2),a=Math.abs(e/2);const l=1-n.curveFitting;return s+=Pt(s*l,n),a+=Pt(a*l,n),{increment:o,rx:s,ry:a}}function Vl(t,e,n,r){const[i,o]=f0(r.increment,t,e,r.rx,r.ry,1,r.increment*No(.1,No(.4,1,n),n),n);let s=Wo(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=f0(r.increment,t,e,r.rx,r.ry,1.5,0,n),l=Wo(a,null,n);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function c0(t,e,n,r,i,o,s,a,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=Pt(.01*u,l),f+=Pt(.01*f,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(g-p)/2),x=p0(m,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const v=p0(m,c,h,u,f,p,g,1.5,l);x.push(...v)}return s&&(a?x.push(...Hn(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...Hn(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function h0(t,e){const n=i0(r0(Bl(t))),r=[];let i=[0,0],o=[0,0];for(const{key:s,data:a}of n)switch(s){case"M":o=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...Hn(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,p]=a;r.push(...m7(l,c,h,u,f,p,o,e)),o=[f,p];break}case"Z":r.push(...Hn(o[0],o[1],i[0],i[1],e)),o=[i[0],i[1]]}return{type:"path",ops:r}}function Yl(t,e){const n=[];for(const r of t)if(r.length){const i=e.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+Pt(i,e),r[0][1]+Pt(i,e)]});for(let s=1;s<o;s++)n.push({op:"lineTo",data:[r[s][0]+Pt(i,e),r[s][1]+Pt(i,e)]})}}return{type:"fillPath",ops:n}}function kr(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Ae[i])switch(i){case"zigzag":Ae[i]||(Ae[i]=new a7(r));break;case"cross-hatch":Ae[i]||(Ae[i]=new l7(r));break;case"dots":Ae[i]||(Ae[i]=new c7(r));break;case"dashed":Ae[i]||(Ae[i]=new h7(r));break;case"zigzag-line":Ae[i]||(Ae[i]=new d7(r));break;default:i="hachure",Ae[i]||(Ae[i]=new jl(r))}return Ae[i]})(e,p7).fillPolygons(t,e)}function d0(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function u0(t){return t.randomizer||(t.randomizer=new u7(t.seed||0)),t.randomizer.next()}function No(t,e,n,r=1){return n.roughness*r*(u0(n)*(e-t)+t)}function Pt(t,e,n=1){return No(-t,t,e,n)}function Hn(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Xl(t,e,n,r,i,!0,!1);if(s)return a;const l=Xl(t,e,n,r,i,!0,!0);return a.concat(l)}function Xl(t,e,n,r,i,o,s){const a=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*u0(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=Pt(p,i,c),g=Pt(g,i,c);const y=[],m=()=>Pt(u,i,c),x=()=>Pt(h,i,c),v=i.preserveVertices;return s?y.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):y.push({op:"move",data:[t+(v?0:Pt(h,i,c)),e+(v?0:Pt(h,i,c))]}),s?y.push({op:"bcurveTo",data:[p+t+(n-t)*f+m(),g+e+(r-e)*f+m(),p+t+2*(n-t)*f+m(),g+e+2*(r-e)*f+m(),n+(v?0:m()),r+(v?0:m())]}):y.push({op:"bcurveTo",data:[p+t+(n-t)*f+x(),g+e+(r-e)*f+x(),p+t+2*(n-t)*f+x(),g+e+2*(r-e)*f+x(),n+(v?0:x()),r+(v?0:x())]}),y}function jo(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+Pt(e,n),t[0][1]+Pt(e,n)]),r.push([t[0][0]+Pt(e,n),t[0][1]+Pt(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+Pt(e,n),t[i][1]+Pt(e,n)]),i===t.length-1&&r.push([t[i][0]+Pt(e,n),t[i][1]+Pt(e,n)]);return Wo(r,null,n)}function Wo(t,e,n){const r=t.length,i=[];if(r>3){const o=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<r;a++){const l=t[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*t[a+1][0]-s*t[a-1][0])/6,l[1]+(s*t[a+1][1]-s*t[a-1][1])/6],o[2]=[t[a+1][0]+(s*t[a][0]-s*t[a+2][0])/6,t[a+1][1]+(s*t[a][1]-s*t[a+2][1])/6],o[3]=[t[a+1][0],t[a+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else r===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):r===2&&i.push(...Xl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function f0(t,e,n,r,i,o,s,a){const l=[],c=[];if(a.roughness===0){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){const u=[e+r*Math.cos(h),n+i*Math.sin(h)];l.push(u),c.push(u)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=Pt(.5,a)-Math.PI/2;c.push([Pt(o,a)+e+.9*r*Math.cos(h-t),Pt(o,a)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=t){const p=[Pt(o,a)+e+r*Math.cos(f),Pt(o,a)+n+i*Math.sin(f)];l.push(p),c.push(p)}c.push([Pt(o,a)+e+r*Math.cos(h+2*Math.PI+.5*s),Pt(o,a)+n+i*Math.sin(h+2*Math.PI+.5*s)]),c.push([Pt(o,a)+e+.98*r*Math.cos(h+s),Pt(o,a)+n+.98*i*Math.sin(h+s)]),c.push([Pt(o,a)+e+.9*r*Math.cos(h+.5*s),Pt(o,a)+n+.9*i*Math.sin(h+.5*s)])}return[c,l]}function p0(t,e,n,r,i,o,s,a,l){const c=o+Pt(.1,l),h=[];h.push([Pt(a,l)+e+.9*r*Math.cos(c-t),Pt(a,l)+n+.9*i*Math.sin(c-t)]);for(let u=c;u<=s;u+=t)h.push([Pt(a,l)+e+r*Math.cos(u),Pt(a,l)+n+i*Math.sin(u)]);return h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),Wo(h,null,l)}function m7(t,e,n,r,i,o,s,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:Pt(c[0],a)),s[1]+(f?0:Pt(c[0],a))]}),h=f?[i,o]:[i+Pt(c[p],a),o+Pt(c[p],a)],l.push({op:"bcurveTo",data:[t+Pt(c[p],a),e+Pt(c[p],a),n+Pt(c[p],a),r+Pt(c[p],a),h[0],h[1]]});return l}function vi(t){return[...t]}function g0(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(vi(t[0]),vi(t[1]),vi(t[2]),vi(t[2]));else{const i=[];i.push(t[0],t[0]);for(let a=1;a<t.length;a++)i.push(t[a]),a===t.length-1&&i.push(t[a]);const o=[],s=1-e;r.push(vi(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*i[a+1][0]-s*i[a-1][0])/6,l[1]+(s*i[a+1][1]-s*i[a-1][1])/6],o[2]=[i[a+1][0]+(s*i[a][0]-s*i[a+2][0])/6,i[a+1][1]+(s*i[a][1]-s*i[a+2][1])/6],o[3]=[i[a+1][0],i[a+1][1]],r.push(o[1],o[2],o[3])}}return r}function Fo(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function y7(t,e,n){const r=Fo(e,n);if(r===0)return Fo(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Fo(t,tr(e,n,i))}function tr(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Gl(t,e,n,r){const i=r||[];if((function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;let g=3*h[1]-2*c[1]-f[1];g*=g;let y=3*u[0]-2*f[0]-c[0];y*=y;let m=3*u[1]-2*f[1]-c[1];return m*=m,p<y&&(p=y),g<m&&(g=m),p+g})(t,e)<n){const a=t[e+0];i.length?(o=i[i.length-1],s=a,Math.sqrt(Fo(o,s))>1&&i.push(a)):i.push(a),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=tr(l,c,.5),p=tr(c,h,.5),g=tr(h,u,.5),y=tr(f,p,.5),m=tr(p,g,.5),x=tr(y,m,.5);Gl([l,f,y,x],0,n,i),Gl([x,m,g,u],0,n,i)}var o,s;return i}function v7(t,e){return Bo(t,0,t.length,e)}function Bo(t,e,n,r,i){const o=i||[],s=t[e],a=t[n-1];let l=0,c=1;for(let h=e+1;h<n-1;++h){const u=y7(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(Bo(t,e,c+1,r,o),Bo(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function ql(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)Gl(t,3*o,e,r);return n&&n>0?Bo(r,0,r.length,n):r}const Ne="none";class Vo{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*Qi(2,31))}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,r){return{shape:e,sets:n||[],options:r||this.defaultOptions}}line(e,n,r,i,o){const s=this._o(o);return this._d("line",[s0(e,n,r,i,s)],s)}rectangle(e,n,r,i,o){const s=this._o(o),a=[],l=g7(e,n,r,i,s);if(s.fill){const c=[[e,n],[e+r,n],[e+r,n+i],[e,n+i]];s.fillStyle==="solid"?a.push(Yl([c],s)):a.push(kr([c],s))}return s.stroke!==Ne&&a.push(l),this._d("rectangle",a,s)}ellipse(e,n,r,i,o){const s=this._o(o),a=[],l=l0(r,i,s),c=Vl(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Vl(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(kr([c.estimatedPoints],s));return s.stroke!==Ne&&a.push(c.opset),this._d("ellipse",a,s)}circle(e,n,r,i){const o=this.ellipse(e,n,r,r,i);return o.shape="circle",o}linearPath(e,n){const r=this._o(n);return this._d("linearPath",[Do(e,!1,r)],r)}arc(e,n,r,i,o,s,a=!1,l){const c=this._o(l),h=[],u=c0(e,n,r,i,o,s,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=c0(e,n,r,i,o,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,y,m,x,v){const b=f,w=p;let _=Math.abs(g/2),$=Math.abs(y/2);_+=Pt(.01*_,v),$+=Pt(.01*$,v);let P=m,C=x;for(;P<0;)P+=2*Math.PI,C+=2*Math.PI;C-P>2*Math.PI&&(P=0,C=2*Math.PI);const A=(C-P)/v.curveStepCount,E=[];for(let S=P;S<=C;S+=A)E.push([b+_*Math.cos(S),w+$*Math.sin(S)]);return E.push([b+_*Math.cos(C),w+$*Math.sin(C)]),E.push([b,w]),kr([E],v)})(e,n,r,i,o,s,c));return c.stroke!==Ne&&h.push(u),this._d("arc",h,c)}curve(e,n){const r=this._o(n),i=[],o=a0(e,r);if(r.fill&&r.fill!==Ne)if(r.fillStyle==="solid"){const s=a0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],a=e;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...ql(g0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...ql(g0(c),10,(1+r.roughness)/2))}s.length&&i.push(kr([s],r))}return r.stroke!==Ne&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=Do(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Yl([e],r)):i.push(kr([e],r))),r.stroke!==Ne&&i.push(o),this._d("polygon",i,r)}path(e,n){const r=this._o(n),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&r.fill!=="transparent"&&r.fill!==Ne,s=r.stroke!==Ne,a=!!(r.simplification&&r.simplification<1),l=(function(h,u,f){const p=i0(r0(Bl(h))),g=[];let y=[],m=[0,0],x=[];const v=()=>{x.length>=4&&y.push(...ql(x,u)),x=[]},b=()=>{v(),y.length&&(g.push(y),y=[])};for(const{key:_,data:$}of p)switch(_){case"M":b(),m=[$[0],$[1]],y.push(m);break;case"L":v(),y.push([$[0],$[1]]);break;case"C":if(!x.length){const P=y.length?y[y.length-1]:m;x.push([P[0],P[1]])}x.push([$[0],$[1]]),x.push([$[2],$[3]]),x.push([$[4],$[5]]);break;case"Z":v(),y.push([m[0],m[1]])}if(b(),!f)return g;const w=[];for(const _ of g){const $=v7(_,f);$.length&&w.push($)}return w})(e,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=h0(e,r);if(o)if(r.fillStyle==="solid")if(l.length===1){const h=h0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(Yl(l,r));else i.push(kr(l,r));return s&&(a?l.forEach((h=>{i.push(Do(h,!1,r))})):i.push(c)),this._d("path",i,r)}opsToPath(e,n){let r="";for(const i of e.ops){const o=typeof n=="number"&&n>=0?i.data.map((s=>+s.toFixed(n))):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(e){const n=e.sets||[],r=e.options||this.defaultOptions,i=[];for(const o of n){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Ne};break;case"fillPath":s={d:this.opsToPath(o),stroke:Ne,strokeWidth:0,fill:r.fill||Ne};break;case"fillSketch":s=this.fillSketch(o,r)}s&&i.push(s)}return i}fillSketch(e,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||Ne,strokeWidth:r,fill:Ne}}_mergedShape(e){return e.filter(((n,r)=>r===0||n.op!=="move"))}}class x7{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Vo(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const s of n)switch(s.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,s,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,o,a),i.restore();break}case"fillSketch":this.fillSketch(i,s,r)}}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,n,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,r,i="nonzero"){e.beginPath();for(const o of n.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}n.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s),s}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s),s}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s),s}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o),o}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r),r}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r),r}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c),c}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r),r}path(e,n){const r=this.gen.path(e,n);return this.draw(r),r}}const Yo="http://www.w3.org/2000/svg";class b7{constructor(e,n){this.svg=e,this.gen=new Vo(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Yo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(Yo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(Yo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&o.appendChild(l)}return o}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=e.createElementNS(Yo,"path");return o.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s)}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s)}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s)}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o)}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r)}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r)}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c)}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r)}path(e,n){const r=this.gen.path(e,n);return this.draw(r)}}var w7={canvas:(t,e)=>new x7(t,e),svg:(t,e)=>new b7(t,e),generator:t=>new Vo(t),newSeed:()=>Vo.newSeed()},_7=Object.defineProperty,m0=Object.getOwnPropertySymbols,$7=Object.prototype.hasOwnProperty,P7=Object.prototype.propertyIsEnumerable,y0=(t,e,n)=>e in t?_7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C7=(t,e)=>{for(var n in e||(e={}))$7.call(e,n)&&y0(t,n,e[n]);if(m0)for(var n of m0(e))P7.call(e,n)&&y0(t,n,e[n]);return t};function O7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=w7.svg(e,{options:{seed:1e3}}),i=$t("g");t.hasAttribute("transform")&&i.setAttribute("transform",t.getAttribute("transform")||"");const o=t.cloneNode();Qt(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",i.appendChild(o);const s=S7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",M7(l,c),i.appendChild(l)}t.id&&(i.id=t.id),Array.from(t.classList).forEach(l=>{i.classList.contains(l)||i.classList.add(l)}),Array.from(t.attributes).forEach(l=>{l.name.startsWith("data-")&&i.setAttribute(l.name,l.value)}),i.childElementCount>0?t.replaceWith(i):t.remove()}function M7(t,e){e.opacity!==void 0&&t.setAttribute("opacity",String(e.opacity)),e.fillOpacity!==void 0&&t.setAttribute("fill-opacity",String(e.fillOpacity)),e.strokeOpacity!==void 0&&t.setAttribute("stroke-opacity",String(e.strokeOpacity)),e.strokeLinecap&&t.setAttribute("stroke-linecap",e.strokeLinecap),e.strokeLinejoin&&t.setAttribute("stroke-linejoin",e.strokeLinejoin),e.strokeDasharray&&t.setAttribute("stroke-dasharray",e.strokeDasharray),e.filter&&t.setAttribute("filter",e.filter),e.clipPath&&t.setAttribute("clip-path",e.clipPath),e.mask&&t.setAttribute("mask",e.mask)}function S7(t,e,n){const r=e.nodeName.toLowerCase(),i=(o,s)=>{const a=Re(o,[...s,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),l={},c=C7({},n),h={};s.forEach(P=>{a[P]!==void 0&&(l[P]=a[P])});const{fill:u,"fill-opacity":f,stroke:p,"stroke-opacity":g,"stroke-width":y,"stroke-dasharray":m,"stroke-linecap":x,"stroke-linejoin":v,opacity:b,filter:w,"clip-path":_,mask:$}=a;if(c.fill=u||"none",c.stroke=p||(u&&u!=="none"?u:"currentColor"),y&&(c.strokeWidth=parseFloat(y)),m&&m!=="none"){const P=m.split(/[\s,]+/).map(C=>parseFloat(C)).filter(C=>!isNaN(C));P.length>0&&(c.strokeLineDash=P)}return f&&(h.fillOpacity=parseFloat(f)),g&&(h.strokeOpacity=parseFloat(g)),b&&(h.opacity=parseFloat(b)),x&&(h.strokeLinecap=x),v&&(h.strokeLinejoin=v),m&&m!=="none"&&(h.strokeDasharray=m),w&&(h.filter=w),_&&(h.clipPath=_),$&&(h.mask=$),[l,c,h]};try{let o=null,s={};switch(r){case"circle":{const[a,l,c]=i(e,["cx","cy","r"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.r)||0;o=t.circle(h,u,f*2,l),s=c;break}case"ellipse":{const[a,l,c]=i(e,["cx","cy","rx","ry"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.rx)||0,p=parseFloat(a.ry)||0;o=t.ellipse(h,u,f*2,p*2,l),s=c;break}case"line":{const[a,l,c]=i(e,["x1","y1","x2","y2"]),h=parseFloat(a.x1)||0,u=parseFloat(a.y1)||0,f=parseFloat(a.x2)||0,p=parseFloat(a.y2)||0;o=t.line(h,u,f,p,l),s=c;break}case"rect":{const[a,l,c]=i(e,["x","y","width","height","rx","ry"]),h=parseFloat(a.x)||0,u=parseFloat(a.y)||0,f=parseFloat(a.width)||0,p=parseFloat(a.height)||0,g=parseFloat(a.rx)||0,y=parseFloat(a.ry)||0;if(g>0||y>0){const v=E7(h,u,f,p,g||y,y||g);o=t.path(v,l)}else o=t.rectangle(h,u,f,p,l);s=c;break}case"path":{const[a,l,c]=i(e,["d"]),h=a.d||"";if(!h)return console.warn("Path element has no d attribute"),null;o=t.path(h,l),s=c;break}case"polygon":{const[a,l,c]=i(e,["points"]),h=v0(a.points||"");if(h.length<3)return console.warn("Polygon needs at least 3 points"),null;o=t.polygon(h,l),s=c;break}case"polyline":{const[a,l,c]=i(e,["points"]),h=v0(a.points||"");if(h.length<2)return console.warn("Polyline needs at least 2 points"),null;o=t.linearPath(h,l),s=c;break}default:return console.warn(`Unsupported shape type: ${r}`),null}return o?{element:o,svgAttributes:s}:null}catch(o){return console.error(`Error creating rough shape for ${r}:`,o),null}}function E7(t,e,n,r,i,o){return i=Math.min(i,n/2),o=Math.min(o,r/2),`
|
|
20
20
|
M ${t+i} ${e}
|
|
21
21
|
L ${t+n-i} ${e}
|
|
22
22
|
A ${i} ${o} 0 0 1 ${t+n} ${e+o}
|
|
@@ -27,7 +27,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
27
27
|
L ${t} ${e+o}
|
|
28
28
|
A ${i} ${o} 0 0 1 ${t+i} ${e}
|
|
29
29
|
Z
|
|
30
|
-
`.replace(/\s+/g," ").trim()}function h0(t){if(!t||typeof t!="string")return[];try{const n=t.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),r=[];for(let i=0;i<n.length-1;i+=2){const o=parseFloat(n[i]),s=parseFloat(n[i+1]);if(isNaN(o)||isNaN(s)){console.warn(`Invalid coordinate pair at index ${i}: "${n[i]}", "${n[i+1]}"`);continue}r.push([o,s])}return n.length%2!==0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${n[n.length-1]}"`),r}catch(e){return console.error("Failed to parse polygon points:",t,e),[]}}function d0(t,e,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),s=li(e,o);return Yt(e,s),c7(e,t,n),e}function l7(t,e){var n;Yt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function c7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return i7(t,e,r);if(i==="pattern")return z6(t,e,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:s}=ke(t,["fill","stroke"]);Wn(o)&&Bf(t,e,r,"fill"),Wn(s)&&Bf(t,e,r,"stroke");return}}function h7(t,e){var n;const{themeConfig:r}=e,{"font-family":i=$l}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var d7=/\s/;function u7(t){for(var e=t.length;e--&&d7.test(t.charAt(e)););return e}var f7=/^\s+/;function p7(t){return t&&t.slice(0,u7(t)+1).replace(f7,"")}var u0=NaN,g7=/^[-+]0x[0-9a-f]+$/i,m7=/^0b[01]+$/i,y7=/^0o[0-7]+$/i,v7=parseInt;function Bl(t){if(typeof t=="number")return t;if(mo(t))return u0;if(nn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=nn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=p7(t);var n=m7.test(t);return n||y7.test(t)?v7(t.slice(2),n?2:8):g7.test(t)?u0:+t}function f0(t){return t}var Wl=Xn(en,"WeakMap"),p0=Object.create,b7=(function(){function t(){}return function(e){if(!nn(e))return{};if(p0)return p0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function x7(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function w7(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var _7=800,$7=16,P7=Date.now;function O7(t){var e=0,n=0;return function(){var r=P7(),i=$7-(r-n);if(n=r,i>0){if(++e>=_7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function C7(t){return function(){return t}}var Fo=(function(){try{var t=Xn(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),M7=Fo?function(t,e){return Fo(t,"toString",{configurable:!0,enumerable:!1,value:C7(e),writable:!0})}:f0,S7=O7(M7);function E7(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var I7=9007199254740991,T7=/^(?:0|[1-9]\d*)$/;function g0(t,e){var n=typeof t;return e=e==null?I7:e,!!e&&(n=="number"||n!="symbol"&&T7.test(t))&&t>-1&&t%1==0&&t<e}function Vl(t,e,n){e=="__proto__"&&Fo?Fo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var A7=Object.prototype,k7=A7.hasOwnProperty;function m0(t,e,n){var r=t[e];(!(k7.call(t,e)&&yo(r,n))||n===void 0&&!(e in t))&&Vl(t,e,n)}function z7(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),i?Vl(n,a,l):m0(n,a,l)}return n}var y0=Math.max;function L7(t,e,n){return e=y0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=y0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),x7(t,this,a)}}function R7(t,e){return S7(L7(t,e,f0),t+"")}var H7=9007199254740991;function v0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=H7}function Bo(t){return t!=null&&v0(t.length)&&!ol(t)}function D7(t,e,n){if(!nn(n))return!1;var r=typeof e;return(r=="number"?Bo(n)&&g0(e,n.length):r=="string"&&e in n)?yo(n[e],t):!1}function N7(t){return R7(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&D7(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var j7=Object.prototype;function Yl(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||j7;return t===n}function F7(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var B7="[object Arguments]";function b0(t){return En(t)&&Vn(t)==B7}var x0=Object.prototype,W7=x0.hasOwnProperty,V7=x0.propertyIsEnumerable,Xl=b0((function(){return arguments})())?b0:function(t){return En(t)&&W7.call(t,"callee")&&!V7.call(t,"callee")};function Y7(){return!1}var w0=typeof F=="object"&&F&&!F.nodeType&&F,_0=w0&&typeof module=="object"&&module&&!module.nodeType&&module,X7=_0&&_0.exports===w0,$0=X7?en.Buffer:void 0,G7=$0?$0.isBuffer:void 0,Gl=G7||Y7,q7="[object Arguments]",U7="[object Array]",Z7="[object Boolean]",K7="[object Date]",Q7="[object Error]",J7="[object Function]",t9="[object Map]",e9="[object Number]",n9="[object Object]",r9="[object RegExp]",i9="[object Set]",o9="[object String]",s9="[object WeakMap]",a9="[object ArrayBuffer]",l9="[object DataView]",c9="[object Float32Array]",h9="[object Float64Array]",d9="[object Int8Array]",u9="[object Int16Array]",f9="[object Int32Array]",p9="[object Uint8Array]",g9="[object Uint8ClampedArray]",m9="[object Uint16Array]",y9="[object Uint32Array]",Zt={};Zt[c9]=Zt[h9]=Zt[d9]=Zt[u9]=Zt[f9]=Zt[p9]=Zt[g9]=Zt[m9]=Zt[y9]=!0,Zt[q7]=Zt[U7]=Zt[a9]=Zt[Z7]=Zt[l9]=Zt[K7]=Zt[Q7]=Zt[J7]=Zt[t9]=Zt[e9]=Zt[n9]=Zt[r9]=Zt[i9]=Zt[o9]=Zt[s9]=!1;function v9(t){return En(t)&&v0(t.length)&&!!Zt[Vn(t)]}function ql(t){return function(e){return t(e)}}var P0=typeof F=="object"&&F&&!F.nodeType&&F,fi=P0&&typeof module=="object"&&module&&!module.nodeType&&module,b9=fi&&fi.exports===P0,Ul=b9&&cu.process,Ar=(function(){try{var t=fi&&fi.require&&fi.require("util").types;return t||Ul&&Ul.binding&&Ul.binding("util")}catch(e){}})(),O0=Ar&&Ar.isTypedArray,C0=O0?ql(O0):v9,x9=Object.prototype,w9=x9.hasOwnProperty;function M0(t,e){var n=Mn(t),r=!n&&Xl(t),i=!n&&!r&&Gl(t),o=!n&&!r&&!i&&C0(t),s=n||r||i||o,a=s?F7(t.length,String):[],l=a.length;for(var c in t)(e||w9.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||g0(c,l)))&&a.push(c);return a}function S0(t,e){return function(n){return t(e(n))}}var _9=S0(Object.keys,Object),$9=Object.prototype,P9=$9.hasOwnProperty;function O9(t){if(!Yl(t))return _9(t);var e=[];for(var n in Object(t))P9.call(t,n)&&n!="constructor"&&e.push(n);return e}function C9(t){return Bo(t)?M0(t):O9(t)}function M9(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var S9=Object.prototype,E9=S9.hasOwnProperty;function I9(t){if(!nn(t))return M9(t);var e=Yl(t),n=[];for(var r in t)r=="constructor"&&(e||!E9.call(t,r))||n.push(r);return n}function E0(t){return Bo(t)?M0(t,!0):I9(t)}function T9(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var I0=S0(Object.getPrototypeOf,Object),A9="[object Object]",k9=Function.prototype,z9=Object.prototype,T0=k9.toString,L9=z9.hasOwnProperty,R9=T0.call(Object);function H9(t){if(!En(t)||Vn(t)!=A9)return!1;var e=I0(t);if(e===null)return!0;var n=L9.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&T0.call(n)==R9}function D9(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function N9(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Bl(n),n=n===n?n:0),e!==void 0&&(e=Bl(e),e=e===e?e:0),D9(Bl(t),e,n)}function j9(){this.__data__=new gn,this.size=0}function F9(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function B9(t){return this.__data__.get(t)}function W9(t){return this.__data__.has(t)}var V9=200;function Y9(t,e){var n=this.__data__;if(n instanceof gn){var r=n.__data__;if(!ri||r.length<V9-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new In(r)}return n.set(t,e),this.size=n.size,this}function Qn(t){var e=this.__data__=new gn(t);this.size=e.size}Qn.prototype.clear=j9,Qn.prototype.delete=F9,Qn.prototype.get=B9,Qn.prototype.has=W9,Qn.prototype.set=Y9;var A0=typeof F=="object"&&F&&!F.nodeType&&F,k0=A0&&typeof module=="object"&&module&&!module.nodeType&&module,X9=k0&&k0.exports===A0,z0=X9?en.Buffer:void 0,L0=z0?z0.allocUnsafe:void 0;function R0(t,e){if(e)return t.slice();var n=t.length,r=L0?L0(n):new t.constructor(n);return t.copy(r),r}function G9(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function q9(){return[]}var U9=Object.prototype,Z9=U9.propertyIsEnumerable,H0=Object.getOwnPropertySymbols,K9=H0?function(t){return t==null?[]:(t=Object(t),G9(H0(t),function(e){return Z9.call(t,e)}))}:q9;function Q9(t,e,n){var r=e(t);return Mn(t)?r:T9(r,n(t))}function J9(t){return Q9(t,C9,K9)}var Zl=Xn(en,"DataView"),Kl=Xn(en,"Promise"),Ql=Xn(en,"Set"),D0="[object Map]",t8="[object Object]",N0="[object Promise]",j0="[object Set]",F0="[object WeakMap]",B0="[object DataView]",e8=Yn(Zl),n8=Yn(ri),r8=Yn(Kl),i8=Yn(Ql),o8=Yn(Wl),vn=Vn;(Zl&&vn(new Zl(new ArrayBuffer(1)))!=B0||ri&&vn(new ri)!=D0||Kl&&vn(Kl.resolve())!=N0||Ql&&vn(new Ql)!=j0||Wl&&vn(new Wl)!=F0)&&(vn=function(t){var e=Vn(t),n=e==t8?t.constructor:void 0,r=n?Yn(n):"";if(r)switch(r){case e8:return B0;case n8:return D0;case r8:return N0;case i8:return j0;case o8:return F0}return e});var s8=Object.prototype,a8=s8.hasOwnProperty;function l8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&a8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var W0=en.Uint8Array;function Jl(t){var e=new t.constructor(t.byteLength);return new W0(e).set(new W0(t)),e}function c8(t,e){var n=Jl(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var h8=/\w*$/;function d8(t){var e=new t.constructor(t.source,h8.exec(t));return e.lastIndex=t.lastIndex,e}var V0=Sn?Sn.prototype:void 0,Y0=V0?V0.valueOf:void 0;function u8(t){return Y0?Object(Y0.call(t)):{}}function X0(t,e){var n=e?Jl(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var f8="[object Boolean]",p8="[object Date]",g8="[object Map]",m8="[object Number]",y8="[object RegExp]",v8="[object Set]",b8="[object String]",x8="[object Symbol]",w8="[object ArrayBuffer]",_8="[object DataView]",$8="[object Float32Array]",P8="[object Float64Array]",O8="[object Int8Array]",C8="[object Int16Array]",M8="[object Int32Array]",S8="[object Uint8Array]",E8="[object Uint8ClampedArray]",I8="[object Uint16Array]",T8="[object Uint32Array]";function A8(t,e,n){var r=t.constructor;switch(e){case w8:return Jl(t);case f8:case p8:return new r(+t);case _8:return c8(t);case $8:case P8:case O8:case C8:case M8:case S8:case E8:case I8:case T8:return X0(t,n);case g8:return new r;case m8:case b8:return new r(t);case y8:return d8(t);case v8:return new r;case x8:return u8(t)}}function G0(t){return typeof t.constructor=="function"&&!Yl(t)?b7(I0(t)):{}}var k8="[object Map]";function z8(t){return En(t)&&vn(t)==k8}var q0=Ar&&Ar.isMap,L8=q0?ql(q0):z8,R8="[object Set]";function H8(t){return En(t)&&vn(t)==R8}var U0=Ar&&Ar.isSet,D8=U0?ql(U0):H8,N8=1,Z0="[object Arguments]",j8="[object Array]",F8="[object Boolean]",B8="[object Date]",W8="[object Error]",K0="[object Function]",V8="[object GeneratorFunction]",Y8="[object Map]",X8="[object Number]",Q0="[object Object]",G8="[object RegExp]",q8="[object Set]",U8="[object String]",Z8="[object Symbol]",K8="[object WeakMap]",Q8="[object ArrayBuffer]",J8="[object DataView]",t$="[object Float32Array]",e$="[object Float64Array]",n$="[object Int8Array]",r$="[object Int16Array]",i$="[object Int32Array]",o$="[object Uint8Array]",s$="[object Uint8ClampedArray]",a$="[object Uint16Array]",l$="[object Uint32Array]",qt={};qt[Z0]=qt[j8]=qt[Q8]=qt[J8]=qt[F8]=qt[B8]=qt[t$]=qt[e$]=qt[n$]=qt[r$]=qt[i$]=qt[Y8]=qt[X8]=qt[Q0]=qt[G8]=qt[q8]=qt[U8]=qt[Z8]=qt[o$]=qt[s$]=qt[a$]=qt[l$]=!0,qt[W8]=qt[K0]=qt[K8]=!1;function Wo(t,e,n,r,i,o){var s,a=e&N8;if(s!==void 0)return s;if(!nn(t))return t;var l=Mn(t);if(l)s=l8(t);else{var c=vn(t),h=c==K0||c==V8;if(Gl(t))return R0(t,a);if(c==Q0||c==Z0||h&&!i)s=h?{}:G0(t);else{if(!qt[c])return i?t:{};s=A8(t,c,a)}}o||(o=new Qn);var u=o.get(t);if(u)return u;o.set(t,s),D8(t)?t.forEach(function(g){s.add(Wo(g,e,n,g,t,o))}):L8(t)&&t.forEach(function(g,y){s.set(y,Wo(g,e,n,y,t,o))});var f=J9,p=l?void 0:f(t);return E7(p||t,function(g,y){p&&(y=g,g=t[y]),m0(s,y,Wo(g,e,n,y,t,o))}),s}var c$=1,h$=4;function J0(t){return Wo(t,c$|h$)}function d$(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return e}}var u$=d$();function tc(t,e,n){(n!==void 0&&!yo(t[e],n)||n===void 0&&!(e in t))&&Vl(t,e,n)}function f$(t){return En(t)&&Bo(t)}function ec(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function p$(t){return z7(t,E0(t))}function g$(t,e,n,r,i,o,s){var a=ec(t,n),l=ec(e,n),c=s.get(l);if(c){tc(t,n,c);return}var h=o?o(a,l,n+"",t,e,s):void 0,u=h===void 0;if(u){var f=Mn(l),p=!f&&Gl(l),g=!f&&!p&&C0(l);h=l,f||p||g?Mn(a)?h=a:f$(a)?h=w7(a):p?(u=!1,h=R0(l,!0)):g?(u=!1,h=X0(l,!0)):h=[]:H9(l)||Xl(l)?(h=a,Xl(a)?h=p$(a):(!nn(a)||ol(a))&&(h=G0(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),tc(t,n,h)}function tp(t,e,n,r,i){t!==e&&u$(e,function(o,s){if(i||(i=new Qn),nn(o))g$(t,e,s,n,tp,r,i);else{var a=r?r(ec(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),tc(t,s,a)}},E0)}var m$=Bu(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),ep=N7(function(t,e,n){tp(t,e,n)});function nc(t,e,n={}){if(!e)return null;const r=t,i=li(r,n);Yt(r,i);const o=b$(e,r);for(const s in r.dataset)o.setAttribute(`data-${m$(s)}`,r.dataset[s]);return o}function y$(t,e,n){var r,i;const o=e.nodeName==="text"?e:null;if(!o)return null;const{data:s,themeConfig:a}=n,l=df(e.dataset.indexes||"0"),c=String(mu(Pr(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=li(o,h);return nc(e,e.textContent||c,u)}function v$(t,e){var n;const r=((n=e.themeConfig.base)==null?void 0:n.text)||{};Yt(t,r),r["font-family"]&&t.setAttribute("font-family",Un(r["font-family"])),t.style.userSelect="none",t.style.pointerEvents="none"}const Vo=(t,e)=>t?parseFloat(t):e;function b$(t,e){const n=Vo(e.dataset.x,0),r=Vo(e.dataset.y,0),i=Vo(e.getAttribute("width")),o=Vo(e.getAttribute("height")),s=x$(e);return Object.assign(s,{x:n,y:r,width:i,height:o,"data-horizontal-align":e.dataset.horizontalAlign||"LEFT","data-vertical-align":e.dataset.verticalAlign||"TOP"}),p4(t,s)}function x$(t){return ke(t,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}const Jn=(t,e)=>{t!==e&&(e?t.replaceWith(e):t.remove())};class w${constructor(e,n){this.options=e,this.template=n,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const e=this.getSVG();if(this.rendered)return e;_$(e,this.options),e.style.visibility="hidden";const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(O$(this.template,this.options),z5(this.template),n.disconnect(),e.style.visibility="")})})});return n.observe(document,{childList:!0,subtree:!0}),this.rendered=!0,e}}function _$(t,e){$$(t,e),P$(t,e);const{themeConfig:n}=e;L5(t,n==null?void 0:n.colorBg)}function $$(t,e){var n;const{themeConfig:r,data:i}=e;R5(t,(n=r.base)==null?void 0:n.global),t.querySelectorAll("[data-element-type]").forEach(s=>{var a,l,c,h,u,f;const p=s.id||"";if(b4(s)){const g=nc(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return Jn(s,g)}if(x4(s)){const g=nc(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return Jn(s,g)}if($4(s)){const g=Tf(t,s,(c=i.illus)==null?void 0:c[p]);return Jn(s,g)}if(_4(s))return Array.from(s.children).forEach(g=>{d0(t,g,e)});if(w4(s)){const g=d0(t,s,e);return Jn(s,g)}if(T4(s))return H5(t,s);if((h=s.dataset.elementType)!=null&&h.startsWith("item-")){const g=df(s.dataset.indexes||"0"),y=s.dataset.elementType.replace("item-","");if(C4(s)||M4(s)||S4(s)){const m=y$(y,s,e);return Jn(s,m)}if(E4(s)){const m=Tf(t,s,(u=Pr(i,g))==null?void 0:u.illus);return Jn(s,m)}if(pl(s)){const m=Y5(t,s,(f=Pr(i,g))==null?void 0:f.icon,e);return Jn(s,m)}}if(P4(s))return v$(s,e);if(!O4(s))return l7(s,e)}),h7(t,e)}function P$(t,e){const{width:n,height:r}=e,{style:i={},attributes:o={},id:s,className:a}=e.svg||{};s&&(t.id=s),a&&t.classList.add(a),n!==void 0&&t.setAttribute("width",typeof n=="number"?`${n}px`:n),r!==void 0&&t.setAttribute("height",typeof r=="number"?`${r}px`:r),Object.assign(t.style,i),Yt(t,o)}function O$(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&np(t,tr(n))}const rc=!!(typeof process!="undefined"&&process.versions&&process.versions.node);rc&&w5(C5);const ic=!rc&&typeof window!="undefined"&&typeof document!="undefined";let Yo=null,Se=null;function C$(){return ic?Yo||(Yo=document.createElement("canvas").getContext("2d"),Yo):null}function M$(){return!ic||!document.body?null:Se||(Se=document.createElement("span"),Se.style.position="absolute",Se.style.top="-10000px",Se.style.left="-10000px",Se.style.visibility="hidden",Se.style.pointerEvents="none",Se.style.whiteSpace="pre",Se.style.display="inline-block",Se.style.padding="0",Se.style.margin="0",document.body.appendChild(Se),Se)}function S$(t,e){if(e==null)return t*1.4;if(typeof e=="string"){const n=e.trim();if(n.endsWith("px")){const r=Number.parseFloat(n);return Number.isFinite(r)?r:t*1.4}e=Number(n)}return typeof e!="number"||!Number.isFinite(e)?t*1.4:e>4?e:e*t}function E$(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Un(e),a=r||"normal",l=S$(n,i),c=C$();if(c)return c.font=`${a} ${n}px ${s}`,{width:o.reduce((p,g)=>{const y=c.measureText(g);return Math.max(p,y.width)},0),height:l*Math.max(o.length,1)};const h=M$();if(!h)return null;h.style.fontFamily=s,h.style.fontSize=`${n}px`,h.style.fontWeight=String(a),h.style.lineHeight=`${l}px`,h.textContent=t;const u=h.getBoundingClientRect();return{width:u.width,height:u.height}}function I$(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=$l,fontSize:i=14,fontWeight:o="normal",lineHeight:s=1.4}=e,a=t.toString(),l={fontFamily:r,fontSize:parseFloat(i.toString()),fontWeight:o,lineHeight:s},c=()=>O5(a,l),h=ic&&(n=E$(a,l))!=null?n:c();return{width:Math.ceil(h.width*1.01),height:Math.ceil(h.height*1.01)}}function oc(t){const e=t.getAttribute("viewBox");if(e){const[s,a,l,c]=e.split(" ").map(Number);return{x:s,y:a,width:l,height:c}}const n=t.getAttribute("width"),r=t.getAttribute("height"),i=Number(n)||0,o=Number(r)||0;return{x:0,y:0,width:i,height:o}}function tr(t){return t?typeof t=="number"?[t,t,t,t]:t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:t.length===4?[t[0],t[1],t[2],t[3]]:[0,0,0,0]:[0,0,0,0]}function np(t,e){if(rc)T$(t,e);else if(document.contains(t))rp(t,e);else{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&(A$(t,()=>{rp(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}}function T$(t,e){const n=oc(t),[r,i,o,s]=e;Yt(t,{viewBox:`${n.x-s} ${n.y-r} ${n.width+s+i} ${n.height+r+o}`})}function rp(t,e){const n=t.getBBox(),r=t.getBoundingClientRect(),i=r.width>0?n.width/r.width:1,o=r.height>0?n.height/r.height:1,[s,a,l,c]=e,h=s*o,u=a*i,f=l*o,p=c*i,g=n.x-p,y=n.y-h,m=n.width+p+u,b=n.height+h+f;Yt(t,{viewBox:`${g} ${y} ${m} ${b}`})}function A$(t,e){requestAnimationFrame(()=>{const n=()=>{const r=t.getBoundingClientRect();r.width>0&&r.height>0?e():requestAnimationFrame(n)};n()})}function rn(t,e){if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=e,document.head.appendChild(n)}function k$(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var z$=Object.defineProperty,L$=Object.defineProperties,R$=Object.getOwnPropertyDescriptors,Xo=Object.getOwnPropertySymbols,ip=Object.prototype.hasOwnProperty,op=Object.prototype.propertyIsEnumerable,sp=(t,e,n)=>e in t?z$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$e=(t,e)=>{for(var n in e||(e={}))ip.call(e,n)&&sp(t,n,e[n]);if(Xo)for(var n of Xo(e))op.call(e,n)&&sp(t,n,e[n]);return t},sc=(t,e)=>L$(t,R$(e)),H$=(t,e)=>{var n={};for(var r in t)ip.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xo)for(var r of Xo(t))e.indexOf(r)<0&&op.call(t,r)&&(n[r]=t[r]);return n};function Et(t){const e=t,{id:n,x:r=0,y:i=0,width:o,height:s,alignHorizontal:a="left",alignVertical:l="top",children:c,fontSize:h=14,fontFamily:u,fontStyle:f,fontWeight:p,textDecoration:g,letterSpacing:y,wordSpacing:m,opacity:b,fill:v="black",lineHeight:x,wordWrap:w,backgroundColor:_="none",backgroundOpacity:$=1,backgroundRadius:P=0}=e,O=H$(e,["id","x","y","width","height","alignHorizontal","alignVertical","children","fontSize","fontFamily","fontStyle","fontWeight","textDecoration","letterSpacing","wordSpacing","opacity","fill","lineHeight","wordWrap","backgroundColor","backgroundOpacity","backgroundRadius"]);let T=o,I=s,S=0,H=0;if(!T||!I){const j=I$(c,t);T||(T=j.width),I||(I=j.height)}o&&(S=a==="center"?T/2:a==="right"?T:0),s&&(H=l==="middle"?I/2:l==="bottom"?I:0);const C=Object.entries($e($e({width:T,height:I},x!==void 0&&{"line-height":x}),w!==void 0&&{"data-word-wrap":w})).reduce((j,[X,L])=>sc($e({},j),{[X]:L}),{}),k=$e($e($e($e($e($e($e($e($e({"data-element-type":"text",width:T,height:I,x:S,y:H,"data-x":0,"data-y":0,fill:v,fontSize:h,textAnchor:a==="center"?"middle":a==="right"?"end":"start",dominantBaseline:l==="middle"?"central":l==="bottom"?"baseline":"hanging","data-horizontal-align":a.toUpperCase(),"data-vertical-align":l.toUpperCase(),children:c},C),O),u&&{fontFamily:u}),f&&{fontStyle:f}),p&&{fontWeight:p}),g&&g!=="none"&&{textDecoration:g}),y&&{letterSpacing:y}),m&&{wordSpacing:m}),b!==void 0&&b!==1&&{opacity:b}),D=$e(sc($e({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:T,height:I}),n&&{id:n}),N=_&&_!=="none"?{"data-element-type":"shape",x:0,y:0,width:T,height:I,fill:_,fillOpacity:$,rx:P,ry:P}:void 0;return{type:"g",props:sc($e({},D),{children:[...N?[{type:"rect",props:N}]:[],{type:"text",props:k}]})}}const pi=Symbol.for("@antv/infographic/Fragment");function Go(t,e={}){return{type:t,props:e}}function D$(t={}){return Go(pi,t)}const N$=Go,j$=Go;function F$(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===pi}function ap(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function gi(t){return mi(t).filter(ap)}function mi(t,e=[]){var n;if(!t||typeof t=="boolean")return e;if(Array.isArray(t))t.forEach(r=>mi(r,e));else if(F$(t)){const r=(n=t.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{mi(i,e)})}else e.push(t);return e}function jt(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}const qo=()=>({x:0,y:0,width:0,height:0});function kr(t){if(!t||t.length===0)return qo();let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t){const{x:s,y:a,width:l,height:c}=o,h=s+l,u=a+c;s<e&&(e=s),a<n&&(n=a),h>r&&(r=h),u>i&&(i=u)}return e===1/0||n===1/0||r===-1/0||i===-1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:Math.max(0,r-e),height:Math.max(0,i-n)}}function Q(t){var e,n,r,i;if(!t)return qo();if(Array.isArray(t)){const p=gi(t);return er(p)}if(typeof t!="object")return qo();const{type:o,props:s={}}=t;if(uc(t)){const p=pp(t);return Q(p)}if(typeof o=="function"){const p=(e=s.x)!=null?e:0,g=(n=s.y)!=null?n:0,y=s.width,m=s.height;if(jt(y)&&jt(m))return{x:p,y:g,width:y,height:m};const b=o(s);if(!b)return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0};if(Array.isArray(b)){const v=gi(b),x=er(v);if(jt(y)&&jt(m))return{x:p,y:g,width:y,height:m};const w=x.width!==0?x.width:y!=null?y:0,_=x.height!==0?x.height:m!=null?m:0;return{x:p+x.x,y:g+x.y,width:w,height:_}}if(ap(b)){const v=b,x=Q(v);if(B$(v,s))return x;const w=v.props&&jt(v.props.width)&&jt(v.props.height),P=lp(v).flatMap(S=>gi(S)).length>0,O=v.props&&v.props.x===s.x&&v.props.y===s.y;if(w)return{x:O?x.x:p+x.x,y:O?x.y:g+x.y,width:x.width,height:x.height};if(jt(y)&&jt(m))return P?{x:O?x.x:p,y:O?x.y:g,width:y,height:m}:{x:O?x.x:p+x.x,y:O?x.y:g+x.y,width:y,height:m};const T=x.width!==0?x.width:y!=null?y:0,I=x.height!==0?x.height:m!=null?m:0;return{x:O?x.x:p+x.x,y:O?x.y:g+x.y,width:T,height:I}}return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0}}const a=(r=s.x)!=null?r:0,l=(i=s.y)!=null?i:0,c=jt(s.width)?s.width:void 0,h=jt(s.height)?s.height:void 0;if(jt(c)&&jt(h))return{x:a,y:l,width:c,height:h};const f=lp(t).flatMap(p=>gi(p));if(f.length>0){const p=er(f);return{x:a+p.x,y:l+p.y,width:jt(c)?c:p.width,height:jt(h)?h:p.height}}return{x:a,y:l,width:c!=null?c:0,height:h!=null?h:0}}function er(t){if(!t||!Array.isArray(t)||t.length===0)return qo();const e=[];for(const n of t){const r=gi(n);for(const i of r){const o=Q(i);o&&e.push(o)}}return kr(e)}function B$(t,e){if(!(t!=null&&t.props)||!e)return!1;const n=t.props;if(jt(n.x)&&jt(n.y)&&jt(e.x)&&jt(e.y)&&n.x===e.x&&n.y===e.y){const r=jt(n.width)&&jt(n.height),i=jt(e.width)&&jt(e.height);if(!r&&!i)return!0}return jt(n.x)&&jt(n.y)&&jt(n.width)&&jt(n.height)&&jt(e.x)&&jt(e.y)&&jt(e.width)&&jt(e.height)?n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height:!1}function lp(t){var e;const n=(e=t.props)==null?void 0:e.children;return n?Array.isArray(n)?n:[n]:[]}function ac(t){var e;return t==null||typeof t=="boolean"?[]:Array.isArray(t)?mi(t):typeof t=="object"?mi((e=t.props)==null?void 0:e.children):[t]}var W$=Object.defineProperty,Uo=Object.getOwnPropertySymbols,cp=Object.prototype.hasOwnProperty,hp=Object.prototype.propertyIsEnumerable,dp=(t,e,n)=>e in t?W$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lc=(t,e)=>{for(var n in e||(e={}))cp.call(e,n)&&dp(t,n,e[n]);if(Uo)for(var n of Uo(e))hp.call(e,n)&&dp(t,n,e[n]);return t},V$=(t,e)=>{var n={};for(var r in t)cp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Uo)for(var r of Uo(t))e.indexOf(r)<0&&hp.call(t,r)&&(n[r]=t[r]);return n};const kn=(t,e)=>{const n=t,{type:r,props:i}=n,o=V$(n,["type","props"]);return lc({type:r,props:lc(lc({},i),e)},o)},up=()=>({defs:new Map});function cc(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(t).replace(/[&<>"']/g,n=>e[n])}const fp={className:"class",viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",clipPathUnits:"clipPathUnits",primitiveUnits:"primitiveUnits",filterUnits:"filterUnits",markerUnits:"markerUnits",markerWidth:"markerWidth",markerHeight:"markerHeight",refX:"refX",refY:"refY",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink",xlinkHref:"href",xlinkTitle:"xlink:title",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",textLength:"textLength",lengthAdjust:"lengthAdjust",repeatCount:"repeatCount",repeatDur:"repeatDur",calcMode:"calcMode",keyTimes:"keyTimes",keySplines:"keySplines",keyPoints:"keyPoints",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",pathLength:"pathLength",systemLanguage:"systemLanguage",requiredFeatures:"requiredFeatures",requiredExtensions:"requiredExtensions"};function Y$(t){return fp[t]?fp[t]:t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const hc=new Map;function dc(t){const e=Symbol("layout");return hc.set(e,t),r=>({type:e,props:r})}function uc(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)&&typeof t.type=="symbol"&&hc.has(t.type)}function pp(t,e=up()){const n=hc.get(t.type);if(!n)return console.warn("Layout function not found for symbol:",t.type),t;const r=ac(t).filter(i=>typeof i=="object");return n(r,t.props,e)}var X$=Object.defineProperty,G$=Object.defineProperties,q$=Object.getOwnPropertyDescriptors,Zo=Object.getOwnPropertySymbols,gp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,yp=(t,e,n)=>e in t?X$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U$=(t,e)=>{for(var n in e||(e={}))gp.call(e,n)&&yp(t,n,e[n]);if(Zo)for(var n of Zo(e))mp.call(e,n)&&yp(t,n,e[n]);return t},Z$=(t,e)=>G$(t,q$(e)),vp=(t,e)=>{var n={};for(var r in t)gp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zo)for(var r of Zo(t))e.indexOf(r)<0&&mp.call(t,r)&&(n[r]=t[r]);return n};function yi(t,e){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t.map(r=>yi(r,e)).filter(Boolean);if(uc(t)){const r=pp(t,e);return yi(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return yi(r,e)}const n=ac(t).map(r=>yi(r,e)).filter(Boolean);return t.type===pi?n:t.type===va?(n.forEach(r=>{typeof r=="object"&&r.props.id&&e.defs.set(r.props.id,r)}),null):n.length?kn(t,{children:n}):t}function vi(t,e){if(t==null)return"";if(typeof t=="string")return cc(t);if(typeof t=="number")return String(t);const{type:n,props:r}=t;if(!n)return"";const i=ac(t);if(n===pi)return i.map(l=>vi(l)).filter(Boolean).join("");if(n===va)return"";if(typeof n=="function"||uc(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=xp(r),s=i.map(l=>vi(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function bp(t,e={}){const n=up(),r=yi(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>vi(m)).join(""):vi(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=vp(o,["x","y","width","height","style"]),f=Z$(U$({},u),{xmlns:"http://www.w3.org/2000/svg"});if(!f.viewBox)if(l&&c)f.viewBox=`${s!=null?s:0} ${a!=null?a:0} ${l!=null?l:0} ${c!=null?c:0}`;else{const m=Q(r);if(m){const{x:b,y:v,width:x,height:w}=m;f.viewBox=`${b} ${v} ${x} ${w}`}}const p=xp(f),g=K$(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>vi(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function xp(t){if(!t)return"";const e=t,{children:n}=e,r=vp(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=Y$(i),a=typeof o=="string"?cc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function K$(t){if(!t||Object.keys(t).length===0)return"";const e=Object.entries(t).map(([n,r])=>`${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}: ${r};`).join("");return` style="${cc(e)}"`}var Q$=Object.defineProperty,Ko=Object.getOwnPropertySymbols,wp=Object.prototype.hasOwnProperty,_p=Object.prototype.propertyIsEnumerable,$p=(t,e,n)=>e in t?Q$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qo=(t,e)=>{for(var n in e||(e={}))wp.call(e,n)&&$p(t,n,e[n]);if(Ko)for(var n of Ko(e))_p.call(e,n)&&$p(t,n,e[n]);return t},Pp=(t,e)=>{var n={};for(var r in t)wp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ko)for(var r of Ko(t))e.indexOf(r)<0&&_p.call(t,r)&&(n[r]=t[r]);return n};const q=t=>{const e=t,{indexes:n}=e,r=Pp(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":kt.BtnAdd};return d(St,Qo(Qo({},i),r))},Ft=t=>{const e=t,{indexes:n}=e,r=Pp(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":kt.BtnRemove};return d(St,Qo(Qo({},i),r))};var J$=Object.defineProperty,tP=Object.defineProperties,eP=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertySymbols,nP=Object.prototype.hasOwnProperty,rP=Object.prototype.propertyIsEnumerable,Cp=(t,e,n)=>e in t?J$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iP=(t,e)=>{for(var n in e||(e={}))nP.call(e,n)&&Cp(t,n,e[n]);if(Op)for(var n of Op(e))rP.call(e,n)&&Cp(t,n,e[n]);return t},oP=(t,e)=>tP(t,eP(e));const Ot=t=>d(Y,oP(iP({"data-element-type":kt.BtnsGroup,width:0,height:0},t),{display:"none"})),Kt=()=>d(Rt,{});var sP=Object.defineProperty,Jo=Object.getOwnPropertySymbols,Mp=Object.prototype.hasOwnProperty,Sp=Object.prototype.propertyIsEnumerable,Ep=(t,e,n)=>e in t?sP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fc=(t,e)=>{for(var n in e||(e={}))Mp.call(e,n)&&Ep(t,n,e[n]);if(Jo)for(var n of Jo(e))Sp.call(e,n)&&Ep(t,n,e[n]);return t},aP=(t,e)=>{var n={};for(var r in t)Mp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jo)for(var r of Jo(t))e.indexOf(r)<0&&Sp.call(t,r)&&(n[r]=t[r]);return n};const Ip=t=>{var e=t,{indexes:n}=e,r=aP(e,["indexes"]);const o=fc(fc({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=kt.ItemIllus):o["data-element-type"]=kt.Illus,d(St,fc({},o))};var lP=Object.defineProperty,cP=Object.defineProperties,hP=Object.getOwnPropertyDescriptors,ts=Object.getOwnPropertySymbols,Tp=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,kp=(t,e,n)=>e in t?lP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zp=(t,e)=>{for(var n in e||(e={}))Tp.call(e,n)&&kp(t,n,e[n]);if(ts)for(var n of ts(e))Ap.call(e,n)&&kp(t,n,e[n]);return t},dP=(t,e)=>cP(t,hP(e)),uP=(t,e)=>{var n={};for(var r in t)Tp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ts)for(var r of ts(t))e.indexOf(r)<0&&Ap.call(t,r)&&(n[r]=t[r]);return n};const Xt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=uP(e,["indexes","lineNumber","children"]),s;if(!i)return null;const a=zp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i},o);return(s=a.height)!=null||(a.height=Math.ceil(r*+a.lineHeight*+a.fontSize)),d(Et,dP(zp({},a),{"data-indexes":n,"data-element-type":kt.ItemDesc}))};var fP=Object.defineProperty,pP=Object.defineProperties,gP=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,Lp=Object.prototype.hasOwnProperty,Rp=Object.prototype.propertyIsEnumerable,Hp=(t,e,n)=>e in t?fP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bi=(t,e)=>{for(var n in e||(e={}))Lp.call(e,n)&&Hp(t,n,e[n]);if(es)for(var n of es(e))Rp.call(e,n)&&Hp(t,n,e[n]);return t},ns=(t,e)=>pP(t,gP(e)),Dp=(t,e)=>{var n={};for(var r in t)Lp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&es)for(var r of es(t))e.indexOf(r)<0&&Rp.call(t,r)&&(n[r]=t[r]);return n};const be=t=>{const e=t,{indexes:n,size:r=32}=e,i=Dp(e,["indexes","size"]),o=bi({fill:"lightgray",width:r,height:r},i);return d(St,ns(bi({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},nr=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=Dp(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=ns(bi({fill:o},s),{x:l,y:l,width:a,height:a});return E(Y,ns(bi({},s),{width:r,height:r,"data-element-type":kt.ItemIconGroup,children:[d(Lt,{width:r,height:r,fill:i,"data-element-type":"shape"}),d(St,ns(bi({},c),{"data-indexes":n,"data-element-type":kt.ItemIcon}))]}))};var mP=Object.defineProperty,yP=Object.defineProperties,vP=Object.getOwnPropertyDescriptors,rs=Object.getOwnPropertySymbols,Np=Object.prototype.hasOwnProperty,jp=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?mP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bp=(t,e)=>{for(var n in e||(e={}))Np.call(e,n)&&Fp(t,n,e[n]);if(rs)for(var n of rs(e))jp.call(e,n)&&Fp(t,n,e[n]);return t},bP=(t,e)=>yP(t,vP(e)),xP=(t,e)=>{var n={};for(var r in t)Np.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rs)for(var r of rs(t))e.indexOf(r)<0&&jp.call(t,r)&&(n[r]=t[r]);return n};const $t=t=>{var e=t,{indexes:n,children:r}=e,i=xP(e,["indexes","children"]),o;const s=Bp({fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:r},i);return(o=s.height)!=null||(s.height=Math.ceil(+s.lineHeight*+s.fontSize)),d(Et,bP(Bp({},s),{"data-indexes":n,"data-element-type":kt.ItemLabel}))};var wP=Object.defineProperty,Wp=Object.getOwnPropertySymbols,_P=Object.prototype.hasOwnProperty,$P=Object.prototype.propertyIsEnumerable,Vp=(t,e,n)=>e in t?wP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PP=(t,e)=>{for(var n in e||(e={}))_P.call(e,n)&&Vp(t,n,e[n]);if(Wp)for(var n of Wp(e))$P.call(e,n)&&Vp(t,n,e[n]);return t};const It=t=>d(Y,PP({"data-element-type":kt.ItemsGroup},t));var OP=Object.defineProperty,CP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,Yp=Object.prototype.hasOwnProperty,Xp=Object.prototype.propertyIsEnumerable,Gp=(t,e,n)=>e in t?OP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qp=(t,e)=>{for(var n in e||(e={}))Yp.call(e,n)&&Gp(t,n,e[n]);if(is)for(var n of is(e))Xp.call(e,n)&&Gp(t,n,e[n]);return t},SP=(t,e)=>CP(t,MP(e)),EP=(t,e)=>{var n={};for(var r in t)Yp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&is)for(var r of is(t))e.indexOf(r)<0&&Xp.call(t,r)&&(n[r]=t[r]);return n};const xi=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=EP(e,["indexes","value","formatter"]),s;const a=qp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i(r),"data-value":r},o);return(s=a.height)!=null||(a.height=Math.ceil(+a.lineHeight*+a.fontSize)),d(Et,SP(qp({},a),{"data-indexes":n,"data-element-type":kt.ItemValue}))};var IP=Object.defineProperty,Up=Object.getOwnPropertySymbols,TP=Object.prototype.hasOwnProperty,AP=Object.prototype.propertyIsEnumerable,Zp=(t,e,n)=>e in t?IP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kP=(t,e)=>{for(var n in e||(e={}))TP.call(e,n)&&Zp(t,n,e[n]);if(Up)for(var n of Up(e))AP.call(e,n)&&Zp(t,n,e[n]);return t};const ne=t=>d(Y,kP({"data-element-type":"shapes-group"},t));var zP=Object.defineProperty,LP=Object.defineProperties,RP=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertySymbols,Kp=Object.prototype.hasOwnProperty,Qp=Object.prototype.propertyIsEnumerable,Jp=(t,e,n)=>e in t?zP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ss=(t,e)=>{for(var n in e||(e={}))Kp.call(e,n)&&Jp(t,n,e[n]);if(os)for(var n of os(e))Qp.call(e,n)&&Jp(t,n,e[n]);return t},tg=(t,e)=>LP(t,RP(e)),HP=(t,e)=>{var n={};for(var r in t)Kp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&os)for(var r of os(t))e.indexOf(r)<0&&Qp.call(t,r)&&(n[r]=t[r]);return n};const wi=dc((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=HP(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(Y,ss({},o));const h=t.map(v=>Q(v)),u=er(t),f=(s=o.x)!=null?s:u.x,p=(a=o.y)!=null?a:u.y,g=(l=o.width)!=null?l:u.width,y=(c=o.height)!=null?c:u.height,m=t.map((v,x)=>{const w=h[x],_=ss({},v.props);if(r!==void 0)switch(r){case"left":_.x=0;break;case"center":_.x=(g-w.width)/2;break;case"right":_.x=g-w.width;break}else _.x===void 0&&(_.x=w.x-f);if(i!==void 0)switch(i){case"top":_.y=0;break;case"middle":_.y=(y-w.height)/2;break;case"bottom":_.y=y-w.height;break}else _.y===void 0&&(_.y=w.y-p);return kn(v,_)}),b=tg(ss({},o),{x:f,y:p,width:g,height:y});return d(Y,tg(ss({},b),{children:m}))});var DP=Object.defineProperty,NP=Object.defineProperties,jP=Object.getOwnPropertyDescriptors,as=Object.getOwnPropertySymbols,eg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,rg=(t,e,n)=>e in t?DP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rr=(t,e)=>{for(var n in e||(e={}))eg.call(e,n)&&rg(t,n,e[n]);if(as)for(var n of as(e))ng.call(e,n)&&rg(t,n,e[n]);return t},ig=(t,e)=>NP(t,jP(e)),FP=(t,e)=>{var n={};for(var r in t)eg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&as)for(var r of as(t))e.indexOf(r)<0&&ng.call(t,r)&&(n[r]=t[r]);return n};const lt=dc((t,e)=>{var n=e,{flexDirection:r="row",justifyContent:i="flex-start",alignItems:o="flex-start",alignContent:s="flex-start",flexWrap:a="nowrap",gap:l=0}=n,c=FP(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(Y,rr({},c));const m=r==="row"||r==="row-reverse",b=r==="row-reverse"||r==="column-reverse",v=t.map(C=>Q(C)),x=er(t),w=(h=c.width)!=null?h:x.width,_=(u=c.height)!=null?u:x.height,$=c.width!==void 0&&c.height!==void 0,P=[];if(a==="wrap"&&$){let C=[],A=[],B=0;for(let k=0;k<t.length;k++){const D=t[k],z=v[k],N=m?z.width:z.height,j=m?w:_;C.length===0||B+l+N<=j?(C.push(D),A.push(z),B+=(C.length>1?l:0)+N):(P.push({children:C,bounds:A}),C=[D],A=[z],B=N)}C.length>0&&P.push({children:C,bounds:A})}else P.push({children:t,bounds:v});const O=[];let T=0;const I=[];if(P.forEach(C=>{const{children:A,bounds:B}=C,k=B.reduce((L,M,R)=>{const W=m?M.width:M.height;return L+W+(R>0?l:0)},0),D=Math.max(...B.map(L=>m?L.height:L.width));I.push(D);let z=0;const N=(m?w:_)-k;if($)switch(i){case"flex-end":z=N;break;case"center":z=N/2;break;case"space-between":z=0;break;default:z=0;break}let j=l;$&&i==="space-between"&&A.length>1&&(j=N/(A.length-1)+l);let X=z;A.forEach((L,M)=>{const R=B[M],W=m?R.width:R.height,U=m?R.height:R.width;let V=T;if($)switch(o){case"flex-end":V=T+D-U;break;case"center":V=T+(D-U)/2;break;default:V=T;break}let G,Z;m?(G=b?w-X-W:X,Z=V):(G=V,Z=b?_-X-W:X);const K=kn(L,{x:G,y:Z});O.push(K),X+=W+j}),T+=D+l}),P.length>1&&$){const C=I.reduce((k,D)=>k+D,0)+(P.length-1)*l,A=(m?_:w)-C;let B=0;switch(s){case"flex-end":B=A;break;case"center":B=A/2;break;case"space-between":if(P.length>1){const k=A/(P.length-1);let D=0;P.forEach((z,N)=>{const j=P.slice(0,N).reduce((L,M)=>L+M.children.length,0),X=j+z.children.length;for(let L=j;L<X;L++){const M=O[L],R=rr({},M.props);m?R.y=(R.y||0)+D:R.x=(R.x||0)+D,O[L]=kn(M,R)}D+=I[N]+l+(N<P.length-1?k:0)});break}break;default:B=0;break}B!==0&&s!=="space-between"&&O.forEach((k,D)=>{const z=rr({},k.props);m?z.y=(z.y||0)+B:z.x=(z.x||0)+B,O[D]=kn(k,z)})}if(!$&&o==="center")if(m){const C=Math.max(...v.map(A=>A.height));O.forEach((A,B)=>{const k=v[B],D=(C-k.height)/2,z=rr({},A.props);z.y=(z.y||0)+D,O[B]=kn(A,z)})}else{const C=Math.max(...v.map(A=>A.width));O.forEach((A,B)=>{const k=v[B],D=(C-k.width)/2,z=rr({},A.props);z.x=(z.x||0)+D,O[B]=kn(A,z)})}const S=er(O),H=ig(rr({},c),{x:(f=c.x)!=null?f:x.x,y:(p=c.y)!=null?p:x.y,width:(g=c.width)!=null?g:S.width,height:(y=c.height)!=null?y:S.height});return d(Y,ig(rr({},H),{children:O}))});var BP=Object.defineProperty,WP=Object.defineProperties,VP=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,YP=Object.prototype.hasOwnProperty,XP=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?BP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ls=(t,e)=>{for(var n in e||(e={}))YP.call(e,n)&&sg(t,n,e[n]);if(og)for(var n of og(e))XP.call(e,n)&&sg(t,n,e[n]);return t},ag=(t,e)=>WP(t,VP(e));const lg=t=>{const{x:e=0,y:n=0,alignHorizontal:r="center",title:i,desc:o,descLineNumber:s=2,themeColors:a}=t,l=h=>{const u={fontSize:24,fill:a.colorPrimaryText,lineHeight:1.4,alignHorizontal:r};return d(Et,ag(ls(ls({},u),h),{"data-element-type":"title",children:i}))},c=h=>{const u={fontSize:16,fill:a.colorTextSecondary,alignHorizontal:r,lineHeight:1.4,height:s*24};return d(Et,ag(ls(ls({},u),h),{"data-element-type":"desc",children:o}))};return!i&&!o?null:E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:e,y:n,gap:8,children:[i&&d(l,{}),o&&d(c,{})]})},pc=new Map;function gc(t,e){pc.set(t,e)}function cg(t){return pc.get(t)}function GP(){return Array.from(pc.keys())}gc("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),gc("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var qP=Object.defineProperty,UP=Object.defineProperties,ZP=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,KP=Object.prototype.hasOwnProperty,QP=Object.prototype.propertyIsEnumerable,dg=(t,e,n)=>e in t?qP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_i=(t,e)=>{for(var n in e||(e={}))KP.call(e,n)&&dg(t,n,e[n]);if(hg)for(var n of hg(e))QP.call(e,n)&&dg(t,n,e[n]);return t},$i=(t,e)=>UP(t,ZP(e));Ht(Ud);const ug=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=tn(t),i=tn(e),o=iO({primaryColor:r,bgColor:i});return oO(o,{primaryColor:r,bgColor:i,isDarkMode:n})},JP=(t,e)=>Ax($i(_i({},t),{alpha:e?.2:.1}))||"#ffffff",tO=(t,e)=>{if(e)return"#ffffff";const n=tn("#262626");return il(n,t)>=7?ti(n):"#000000"},eO=t=>{const e=au(tn(t)),n=$i(_i({},e),{l:Math.min(1,e.l+.2)});return ti(n)},nO=(t,e)=>{const n=tn(t),r=tn("#262626"),i=tn("#ffffff"),o=il(r,n);return il(i,n)>=3?ti(i):o>=4.5?ti(r):"#ffffff"},rO=(t,e)=>{const n=au(t);if(e){const r=$i(_i({},n),{l:Math.min(1,n.l+.1)});return cs(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=$i(_i({},n),{l:Math.min(1,n.l+.05)});return cs(r,"#ffffff")}}},iO=({primaryColor:t,bgColor:e})=>({colorPrimary:cs(t,"#FF356A"),colorBg:cs(e,"#ffffff"),colorWhite:"#ffffff"}),oO=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=tO(n,r),o=JP(e,r);return $i(_i({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:eO(i),colorPrimaryText:nO(o,r),colorBgElevated:rO(n,r)})};function cs(t,e="#000000"){var n;return(n=ti(t))!=null?n:e}const mc="#FF356A";function re(t){var e;return((e=t==null?void 0:t.themeConfig)==null?void 0:e.colorPrimary)||mc}function fg(t){var e;const{themeConfig:n={},data:r}=t,{colorPrimary:i,palette:o}=n;return!o||o.length===0?Array(((e=r==null?void 0:r.items)==null?void 0:e.length)||1).fill(i||mc):r.items.map((s,a)=>Oo(o,[a],r.items.length)||mc)}function Ct(t,e){var n,r,i;return Oo((n=t==null?void 0:t.themeConfig)==null?void 0:n.palette,e,(i=(r=t.data)==null?void 0:r.items)==null?void 0:i.length)}function xe(t,e){var n;const{colorBg:r=((n=e==null?void 0:e.themeConfig)==null?void 0:n.colorBg)||"white",colorPrimary:i=e?re(e):"black"}=t;return ug({colorPrimary:i,isDarkMode:lu(r),colorBg:r})}function Pi(t,e){const{depth:n,originalIndexes:r,flatIndex:i}=t;switch(e){case"level":return[n];case"branch":return n===0?[0]:n===1?[r[1]+1]:[r[1]+1];case"node":return r;case"node-flat":return i!==void 0?[i]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),r);default:return[0]}}var sO=Object.defineProperty,pg=Object.getOwnPropertySymbols,aO=Object.prototype.hasOwnProperty,lO=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?sO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cO=(t,e)=>{for(var n in e||(e={}))aO.call(e,n)&&gg(t,n,e[n]);if(pg)for(var n of pg(e))lO.call(e,n)&&gg(t,n,e[n]);return t};function Wt(t,e=[]){const n=cO({},t),r={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...e].forEach(o=>{o in n&&(r[o]=n[o],delete n[o])}),["x","y","width","height"].forEach(o=>{o in t&&(n[o]=t[o])}),[r,n]}function hs(t,e){var n;return t.length===0?()=>null:e===void 0?t[0]:(n=t[e])!=null?n:t[0]}const yc=new Map;function Vt(t,e){yc.set(t,e)}function mg(t){return yc.get(t)}function hO(){return Array.from(yc.keys())}var dO=Object.defineProperty,uO=Object.defineProperties,fO=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,pO=Object.prototype.hasOwnProperty,gO=Object.prototype.propertyIsEnumerable,vg=(t,e,n)=>e in t?dO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mO=(t,e)=>{for(var n in e||(e={}))pO.call(e,n)&&vg(t,n,e[n]);if(yg)for(var n of yg(e))gO.call(e,n)&&vg(t,n,e[n]);return t},yO=(t,e)=>uO(t,fO(e));const bg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=80,iconSize:o=24,badgeSize:s=32,gap:a=8,positionH:l="normal",themeColors:c,valueFormatter:h},u]=Wt(t,["width","height","iconSize","badgeSize","gap"]),f=e.value,p=f!==void 0,g=!!e.desc,y=!!e.icon,m=`${c.colorPrimary}-badge`,b=l==="flipped"?r-a-s:a,v=y?l==="flipped"?a:s+2*a:a,x=r-a*2,w=y?r-s-3*a:x,_=a+14+18+8,$=_-a,P=g?a:(i-s)/2,O=!p&&!g?(i-14)/2:a;return E(Y,yO(mO({},u),{width:r,height:i,children:[d(zt,{children:E("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[d("stop",{offset:"0%",stopColor:c.colorPrimary}),d("stop",{offset:"100%",stopColor:ot(c.colorPrimary).darken(20).toHexString()})]})}),d(St,{"data-element-type":"shape",x:0,y:0,width:r,height:i,fill:c.colorPrimaryBg,rx:8,ry:8}),y&&E(Rt,{children:[d(Lt,{x:b,y:P,width:s,height:s,fill:`url(#${m})`}),d(be,{indexes:n,x:b+(s-o)/2,y:P+(s-o)/2,size:o,fill:c.colorWhite})]}),E(lt,{flexDirection:"column",x:v,y:O,width:w,height:!p&&!g?void 0:$,alignItems:"center",justifyContent:"center",children:[d($t,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:14,fill:c.colorText,children:e.label}),p&&d(xi,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:c.colorPrimary,value:f,formatter:h})]}),g&&d(Xt,{indexes:n,x:a,y:_,width:x,alignHorizontal:l==="flipped"?"right":"left",fontSize:11,fill:c.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:e.desc})]}))};Vt("badge-card",{component:bg,composites:["icon","label","value","desc"]});var vO=Object.defineProperty,bO=Object.defineProperties,xO=Object.getOwnPropertyDescriptors,xg=Object.getOwnPropertySymbols,wO=Object.prototype.hasOwnProperty,_O=Object.prototype.propertyIsEnumerable,wg=(t,e,n)=>e in t?vO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$O=(t,e)=>{for(var n in e||(e={}))wO.call(e,n)&&wg(t,n,e[n]);if(xg)for(var n of xg(e))_O.call(e,n)&&wg(t,n,e[n]);return t},PO=(t,e)=>bO(t,xO(e));const _g=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Wt(t,["width","height"]);return E(Y,PO($O({},s),{children:[d("rect",{x:0,y:0,width:r,height:i,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),d(ht,{x:r-85,y:.5,width:85,height:65,d:"M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z",fill:o.colorBg,"data-element-type":"shape"}),d($t,{indexes:e,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),d(Xt,{indexes:e,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),d(be,{indexes:e,x:r-48,y:12,width:32,height:32,fill:o.colorPrimary})]}))};Vt("candy-card-lite",{component:_g,composites:["icon","label","desc"]});var OO=Object.defineProperty,CO=Object.defineProperties,MO=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,$g=Object.prototype.hasOwnProperty,Pg=Object.prototype.propertyIsEnumerable,Og=(t,e,n)=>e in t?OO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SO=(t,e)=>{for(var n in e||(e={}))$g.call(e,n)&&Og(t,n,e[n]);if(ds)for(var n of ds(e))Pg.call(e,n)&&Og(t,n,e[n]);return t},EO=(t,e)=>CO(t,MO(e)),IO=(t,e)=>{var n={};for(var r in t)$g.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ds)for(var r of ds(t))e.indexOf(r)<0&&Pg.call(t,r)&&(n[r]=t[r]);return n};const vc=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=IO(e,["color","opacity"]);return d("filter",EO(SO({id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%"},i),{children:d("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":n,"flood-opacity":r})}))};var TO=Object.defineProperty,AO=Object.defineProperties,kO=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,zO=Object.prototype.hasOwnProperty,LO=Object.prototype.propertyIsEnumerable,Mg=(t,e,n)=>e in t?TO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RO=(t,e)=>{for(var n in e||(e={}))zO.call(e,n)&&Mg(t,n,e[n]);if(Cg)for(var n of Cg(e))LO.call(e,n)&&Mg(t,n,e[n]);return t},HO=(t,e)=>AO(t,kO(e));const bc=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return E("linearGradient",HO(RO({id:e},{"left-right":{x1:"0%",y1:"0%",x2:"100%",y2:"0%"},"right-left":{x1:"100%",y1:"0%",x2:"0%",y2:"0%"},"top-bottom":{x1:"0%",y1:"0%",x2:"0%",y2:"100%"},"bottom-top":{x1:"0%",y1:"100%",x2:"0%",y2:"0%"}}[i]),{children:[d("stop",{offset:"0%",stopColor:n}),d("stop",{offset:"100%",stopColor:r})]}))};var DO=Object.defineProperty,NO=Object.defineProperties,jO=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,FO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,Eg=(t,e,n)=>e in t?DO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oi=(t,e)=>{for(var n in e||(e={}))FO.call(e,n)&&Eg(t,n,e[n]);if(Sg)for(var n of Sg(e))BO.call(e,n)&&Eg(t,n,e[n]);return t},Ci=(t,e)=>NO(t,jO(e));const Ig=t=>{const[{datum:e,indexes:n,width:r=300,height:i=80,gap:o=12,positionH:s="normal",iconPadding:a=i/10,themeColors:l},c]=Wt(t,["width","height","gap","iconPadding"]),h=i/2,u=i-a*2,f=s==="flipped",p=!!e.icon,g=p?r-i-o:r-o*2,y=p?f?o:i:o,m=p?f?"right":"left":"center",b={indexes:n,width:g,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:l.colorWhite},v=Q(d($t,Ci(Oi({},b),{children:e.label}))),x={indexes:n,width:g,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:l.colorWhite},w=Q(e.desc?d(Xt,Ci(Oi({},x),{children:e.desc})):null),_=4,$=v.height+_+w.height,O=(i-$)/2,T=O+v.height+_,I=f?r-i+a:a,S=a;return E(Y,Ci(Oi({},c),{children:[d(zt,{children:d(vc,{})}),d(St,{x:0,y:0,width:r,height:i,fill:l.colorPrimary,rx:h,ry:h,"data-element-type":"shape"}),e.icon&&E(Rt,{children:[d(Lt,{x:I,y:S,width:u,height:u,fillOpacity:.5,fill:l.colorBg,filter:"url(#drop-shadow)"}),d(nr,{indexes:n,x:I,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d($t,Ci(Oi({x:y,y:O},b),{children:e.label})),e.desc&&d(Xt,Ci(Oi({x:y,y:T},x),{children:e.desc}))]}))};Vt("capsule-item",{component:Ig,composites:["icon","label","desc"]});var WO=Object.defineProperty,VO=Object.defineProperties,YO=Object.getOwnPropertyDescriptors,Tg=Object.getOwnPropertySymbols,XO=Object.prototype.hasOwnProperty,GO=Object.prototype.propertyIsEnumerable,Ag=(t,e,n)=>e in t?WO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xc=(t,e)=>{for(var n in e||(e={}))XO.call(e,n)&&Ag(t,n,e[n]);if(Tg)for(var n of Tg(e))GO.call(e,n)&&Ag(t,n,e[n]);return t},wc=(t,e)=>VO(t,YO(e));const kg=t=>{const[{indexes:e,datum:n,themeColors:r,positionH:i="normal",width:o=240,height:s=o},a]=Wt(t,["width","height"]),l=Math.min(o,s),c=l*.7,h=(l-c)/2,u=c*Math.sqrt(2)/2,f=(l-u)/2,p=ot(r.colorPrimary),g=us(p,80,.2),y=us(p,20,.8),m=us(p,75,.32),b=us(p,45,.4),v=p.clone().darken(5).toRgbString(),x=`${r.colorPrimary}-${i}-outer`,w=`${r.colorPrimary}-${i}-inner`,_=i==="flipped"?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return E(Y,wc(xc({},a),{children:[E(zt,{children:[E("linearGradient",wc(xc({id:x},_),{children:[d("stop",{offset:"0%",stopColor:g}),d("stop",{offset:"100%",stopColor:y})]})),E("linearGradient",wc(xc({id:w},_),{children:[d("stop",{offset:"0%",stopColor:m}),d("stop",{offset:"100%",stopColor:b})]}))]}),d(Lt,{width:l,height:l,fill:`url(#${x})`,"data-element-type":"shape"}),d(Lt,{x:h,y:h,width:c,height:c,fill:`url(#${w})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),d($t,{indexes:e,x:f,y:f,width:u,height:u,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:v,fontWeight:"500",children:n.label})]}))};Vt("circle-node",{component:kg,composites:["label"]});function us(t,e,n){return ot.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var qO=Object.defineProperty,UO=Object.defineProperties,ZO=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,KO=Object.prototype.hasOwnProperty,QO=Object.prototype.propertyIsEnumerable,Lg=(t,e,n)=>e in t?qO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_c=(t,e)=>{for(var n in e||(e={}))KO.call(e,n)&&Lg(t,n,e[n]);if(zg)for(var n of zg(e))QO.call(e,n)&&Lg(t,n,e[n]);return t},$c=(t,e)=>UO(t,ZO(e));const Rg=t=>{var e;const[{datum:n,indexes:r,size:i=120,strokeWidth:o=12,gap:s=8,themeColors:a,valueFormatter:l=_=>`${Math.round(_)}%`},c]=Wt(t,["size","strokeWidth","gap"]),h=(e=n.value)!=null?e:0,f=Math.min(Math.max(h/100,0),1),p=(i-o)/2,g=i/2,y=o/2,m=i-o,b=f>=1,v=f*360,x=JO(g,g,p,0,v),w={x:y,y,width:m,height:m};return E(Y,$c(_c({},c),{width:i,height:i+s+20,children:[d(St,{width:i,height:i,fill:"none"}),d(Lt,$c(_c({},w),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),b?d(Lt,$c(_c({},w),{fill:"none",stroke:a.colorPrimary,strokeWidth:o,"data-element-type":"shape"})):d(ht,{d:x,fill:"none",stroke:a.colorPrimary,strokeWidth:o,strokeLinecap:"round","data-element-type":"shape"}),d(xi,{indexes:r,x:o,y:o,width:m-o,height:m-o,fontSize:24,fontWeight:"bold",fill:a.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:h,formatter:l}),d($t,{indexes:r,x:0,y:i+s,width:i,alignHorizontal:"center",fontSize:12,fill:a.colorTextSecondary,children:n.label})]}))};function JO(t,e,n,r,i){const o=Hg(t,e,n,i),s=Hg(t,e,n,r),a=i-r<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${a} 0 ${s.x} ${s.y}`}function Hg(t,e,n,r){const i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}Vt("circular-progress",{component:Rg,composites:["label","value"]});var tC=Object.defineProperty,eC=Object.defineProperties,nC=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,rC=Object.prototype.hasOwnProperty,iC=Object.prototype.propertyIsEnumerable,Ng=(t,e,n)=>e in t?tC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oC=(t,e)=>{for(var n in e||(e={}))rC.call(e,n)&&Ng(t,n,e[n]);if(Dg)for(var n of Dg(e))iC.call(e,n)&&Ng(t,n,e[n]);return t},sC=(t,e)=>eC(t,nC(e));const jg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=60,iconSize:o=20,gap:s=8,positionH:a="normal",themeColors:l,valueFormatter:c},h]=Wt(t,["width","height","iconSize","gap"]),u=e.value,f=u!=null,p="compact-shadow",g=a==="flipped"?r-s-o:s,y=a==="flipped"?s:o+2*s,m=r-o-3*s,b=f?m*.8:m,v=f?m*.2:0;return E(Y,sC(oC({},h),{children:[d(zt,{children:d("filter",{id:p,children:d("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),d(St,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${p})`,"data-element-type":"shape"}),d(St,{x:a==="flipped"?r-3:0,y:0,width:3,height:i,fill:l.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),d(be,{indexes:n,x:g,y:(i-o)/2,size:o,fill:l.colorPrimary}),E(lt,{x:y,y:s,width:m,height:i-s*2,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[E(lt,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[d($t,{indexes:n,width:b,alignHorizontal:"left",fontSize:12,fill:l.colorText,children:e.label}),f&&d(xi,{indexes:n,width:v,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:l.colorPrimary,value:u,formatter:c})]}),d(Xt,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})]}))};Vt("compact-card",{component:jg,composites:["icon","label","value","desc"]});var aC=Object.defineProperty,lC=Object.defineProperties,cC=Object.getOwnPropertyDescriptors,Fg=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,dC=Object.prototype.propertyIsEnumerable,Bg=(t,e,n)=>e in t?aC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uC=(t,e)=>{for(var n in e||(e={}))hC.call(e,n)&&Bg(t,n,e[n]);if(Fg)for(var n of Fg(e))dC.call(e,n)&&Bg(t,n,e[n]);return t},fC=(t,e)=>lC(t,cC(e));const Wg=t=>{const[{datum:e,indexes:n,width:r=300,height:i=30,iconSize:o=30,gap:s=5,positionH:a="normal",positionV:l="middle",themeColors:c},h]=Wt(t,["width","height","iconSize","gap"]),u=r-o-s,f=l==="middle"?(i-o)/2:l==="flipped"?i-o:0;return E(Y,fC(uC({},h),{children:[d(ht,{"data-element-type":"shape",x:a==="flipped"?u+s:0,y:f,fill:c.colorPrimary,width:o,height:o,d:"M14.7273 30C6.54538 30 0 22.9077 0 14.7269C0 6.54617 6.54538 0 14.7273 0C22.9092 0 30 6.54617 30 14.7269C30 22.9077 22.9092 30 14.7273 30ZM24.5454 10.9077C22.9092 9.27307 22.9092 9.27307 22.9092 9.27307C22.3638 8.72692 22.3638 8.7269 21.8181 8.7269C21.2727 8.7269 21.2727 8.72692 20.7273 9.27307C13.0908 16.9077 13.0908 16.9077 13.0908 16.9077C8.72731 12.5461 8.72731 12.5462 8.72731 12.5462C8.18193 12.5462 8.18193 12 7.63654 12L7.09077 12.5462C4.90923 14.1808 4.90923 14.1808 4.90923 14.1808C4.90923 14.7269 4.90923 14.7269 4.90923 15.2731C4.90923 15.8192 4.90923 15.8192 4.90923 16.3654C12 23.4539 12 23.4538 12 23.4538C12.5454 23.4538 12.5454 23.4538 13.0908 23.4538C13.6365 23.4538 13.6365 23.4538 14.1819 23.4538C24.5454 12.5461 24.5454 12.5462 24.5454 12.5462L25.0908 12C25.0908 11.4538 24.5454 10.9077 24.5454 10.9077Z"}),d($t,{indexes:n,x:a==="flipped"?0:o+s,width:u,height:i,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:e.label||e.desc})]}))};Vt("done-list",{component:Wg,composites:["label"]});var pC=Object.defineProperty,gC=Object.defineProperties,mC=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,yC=Object.prototype.hasOwnProperty,vC=Object.prototype.propertyIsEnumerable,Yg=(t,e,n)=>e in t?pC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bC=(t,e)=>{for(var n in e||(e={}))yC.call(e,n)&&Yg(t,n,e[n]);if(Vg)for(var n of Vg(e))vC.call(e,n)&&Yg(t,n,e[n]);return t},xC=(t,e)=>gC(t,mC(e));const Xg=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Wt(t,["width"]),a=o!=="flipped",l=o==="normal"?"bottom":"top",c=d($t,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=d(nr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(_C,{width:8,height:30,fill:i.colorPrimary,positionV:o}),p=5,g=25,y=30,m=Q(c),b=Q(h),v=Q(u),x=Q(f),w=m.height+b.height+p+x.height-v.height-g,_=v.height+g+y+x.height+p+m.height+b.height;return d(Y,xC(bC({width:r,height:_},s),{children:E(lt,{flexDirection:"column",alignItems:"center",children:[a?E(Rt,{children:[h,c,d(Kt,{height:p}),f]}):E(Rt,{children:[d(Kt,{height:w}),u,d(Kt,{height:g})]}),E(Y,{children:[d(wC,{width:r,height:y,fill:i.colorPrimary}),d(Et,{x:r/2,y:y/2,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?E(Rt,{children:[d(Kt,{height:g}),u]}):E(Rt,{children:[f,d(Kt,{height:p}),c,h]})]})}))},wC=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})},_C=t=>{const{x:e=0,y:n=0,width:r=10,height:i=50,fill:o,positionV:s="top"}=t,a=r/2,l=i-a,c=2,h=a;return E(ne,{x:e,y:n,width:r,height:i,children:[d(Lt,{width:r,height:r,fill:o,y:s==="top"?0:l-a}),d(ht,{d:s==="top"?`M${h},${a} L${h},${a+l}`:`M${h},0 L${h},${l-a}`,strokeWidth:c,stroke:o})]})};Vt("horizontal-icon-arrow",{component:Xg,composites:["icon","label","desc","time"]});var $C=Object.defineProperty,PC=Object.defineProperties,OC=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,CC=Object.prototype.hasOwnProperty,MC=Object.prototype.propertyIsEnumerable,qg=(t,e,n)=>e in t?$C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ug=(t,e)=>{for(var n in e||(e={}))CC.call(e,n)&&qg(t,n,e[n]);if(Gg)for(var n of Gg(e))MC.call(e,n)&&qg(t,n,e[n]);return t},Zg=(t,e)=>PC(t,OC(e));const Kg=t=>{const[{indexes:e,datum:n,width:r=160,themeColors:i,positionH:o="center",positionV:s="normal"},a]=Wt(t,["width"]),l=o==="normal"?"left":o==="flipped"?"right":"center",c=d($t,{indexes:e,width:r,alignHorizontal:l,fill:i.colorPrimary,children:n.label}),h=Q(c),u=n.desc?d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:s==="flipped"?"top":"bottom",children:n.desc}):null,f=Q(u),g=n.icon?d(nr,{size:45,indexes:e,colorBg:i.colorBg,fill:i.colorPrimary}):null,y=Q(g),m=n.time?d(Et,{width:r,height:30,alignHorizontal:"center",alignVertical:"middle",fill:i.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,b=Q(m),v=18,x=E(wi,{horizontal:"center",vertical:"middle",width:r,height:v,children:[d(St,{width:r,height:v,fill:i.colorPrimary,"data-element-type":"shape"}),d(Lt,{width:v+6,height:v+6,fill:i.colorBg,fillOpacity:.5,"data-element-type":"shape"}),d(Lt,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),w=h.height+f.height,_=y.height+b.height+5,$=Math.abs(_-w),P=_>w?$:0,O=w>_?$:0;return s==="flipped"?E(lt,Zg(Ug({},a),{flexDirection:"column",alignItems:"center",children:[d(Kt,{height:O}),m,g,d(Kt,{height:5}),x,c,u,d(Kt,{height:P})]})):E(lt,Zg(Ug({},a),{flexDirection:"column",alignItems:"center",children:[d(Kt,{height:P}),c,u,x,d(Kt,{height:5}),g,m,d(Kt,{height:O})]}))};Vt("horizontal-icon-line",{component:Kg,composites:["icon","label","desc"]});var SC=Object.defineProperty,EC=Object.defineProperties,IC=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,TC=Object.prototype.hasOwnProperty,AC=Object.prototype.propertyIsEnumerable,Jg=(t,e,n)=>e in t?SC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kC=(t,e)=>{for(var n in e||(e={}))TC.call(e,n)&&Jg(t,n,e[n]);if(Qg)for(var n of Qg(e))AC.call(e,n)&&Jg(t,n,e[n]);return t},zC=(t,e)=>EC(t,IC(e));const t1=t=>{var e;const[{datum:n,indexes:r,size:i=80,iconSize:o=28,badgeSize:s=24,gap:a=8,themeColors:l,width:c=84,height:h=105},u]=Wt(t,["size","iconSize","badgeSize","gap"]),f=(e=n.value)!=null?e:0,p=`${l.colorPrimary}-icon`,g="#ff6b6b-badge";return E(Y,zC(kC({},u),{width:c,height:h,children:[E(zt,{children:[E("radialGradient",{id:p,cx:"50%",cy:"30%",r:"70%",children:[d("stop",{offset:"0%",stopColor:ot(l.colorPrimary).lighten(30).toHexString()}),d("stop",{offset:"100%",stopColor:l.colorPrimary})]}),E("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#ff6b6b"}),d("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),d(Lt,{x:0,y:0,width:i,height:i,fill:`url(#${p})`,"data-element-type":"shape"}),d(be,{indexes:r,x:(i-o)/2,y:(i-o)/2,size:o,fill:l.colorPrimaryText}),d(Lt,{x:i-s+4,width:s,height:s,fill:`url(#${g})`}),d(Et,{x:i-s+4,width:s,height:s,fontSize:10,fontWeight:"bold",fill:l.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:f>99?"99+":Math.round(f)}),d($t,{indexes:r,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:l.colorText,children:n.label})]}))};Vt("icon-badge",{component:t1,composites:["icon","label"]});var LC=Object.defineProperty,RC=Object.defineProperties,HC=Object.getOwnPropertyDescriptors,e1=Object.getOwnPropertySymbols,DC=Object.prototype.hasOwnProperty,NC=Object.prototype.propertyIsEnumerable,n1=(t,e,n)=>e in t?LC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jC=(t,e)=>{for(var n in e||(e={}))DC.call(e,n)&&n1(t,n,e[n]);if(e1)for(var n of e1(e))NC.call(e,n)&&n1(t,n,e[n]);return t},FC=(t,e)=>RC(t,HC(e));const r1=t=>{const[{datum:e,indexes:n,width:r=200,borderRadius:i=12,padding:o=16,separatorHeight:s=2,indexFontSize:a=20,labelFontSize:l=16,gap:c=8,themeColors:h},u]=Wt(t,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),f=n[0]+1,p=String(f).padStart(2,"0"),g=e.label!==void 0,y=e.desc!==void 0,m=ot.mix(h.colorPrimary,h.colorWhite,40).toHexString(),b=h.colorBgElevated||h.colorWhite,v=r-2*o,x=Q(d(Et,{fontSize:a,fontWeight:"bold",children:p})),w=v-x.width-c,_=g?Q(d($t,{indexes:n,width:w,fontSize:l,fontWeight:"bold",x:a,children:e.label})):{height:0},$=y?Q(d(Xt,{indexes:n,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,children:e.desc})):{height:0},P=Math.max(x.height,_.height),O=o*2+P+(g||y?c:0)+s+(y?c:0)+$.height;return E(Y,FC(jC({},u),{width:r,height:O,children:[d(St,{x:0,y:0,width:r,height:O,rx:i,ry:i,fill:b,stroke:ot(b).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),E(Y,{x:o,y:o,children:[E(Y,{x:0,y:0,children:[d(Et,{x:0,y:0,fontSize:a,fontWeight:"bold",fill:h.colorPrimary,alignVertical:"top",children:p}),g&&d($t,{indexes:n,x:a+c,y:0,width:w,fontSize:l,fontWeight:"bold",fill:h.colorTextSecondary,alignVertical:"top",children:e.label})]}),d(St,{x:0,y:P+c,width:v,height:s,fill:m,"data-element-type":"shape"}),y&&d(Xt,{indexes:n,x:0,y:P+c+s+c,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:h.colorTextSecondary,children:e.desc})]})]}))};Vt("indexed-card",{component:r1,composites:["label","desc"]});var BC=Object.defineProperty,WC=Object.defineProperties,VC=Object.getOwnPropertyDescriptors,i1=Object.getOwnPropertySymbols,YC=Object.prototype.hasOwnProperty,XC=Object.prototype.propertyIsEnumerable,o1=(t,e,n)=>e in t?BC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,GC=(t,e)=>{for(var n in e||(e={}))YC.call(e,n)&&o1(t,n,e[n]);if(i1)for(var n of i1(e))XC.call(e,n)&&o1(t,n,e[n]);return t},qC=(t,e)=>WC(t,VC(e));const s1=t=>{const[{indexes:e,datum:n,width:r=140,iconSize:i=24,themeColors:o},s]=Wt(t,["width","iconSize"]),{label:a,desc:l}=n,c=8,h=16,u=12,f=h+u,p=r-f,g=60,y=i+44,m=h,b=g+u,v=g+h+u,x=[{x:0,y:v},{x:m,y:b},{x:m,y:v}],w=r-m-u,_=m+u,$=_+w,P=b+c/2,O=P+y,T=`M ${_} ${O} L ${_} ${P} L ${$} ${P}`,I=c/2,S=_+I,H=P+I,C=8;return E(Y,qC(GC({},s),{children:[d(Xt,{indexes:e,x:f,width:p,height:g,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:l}),d(Ne,{points:x,fill:o.colorPrimary,opacity:.9,width:h,height:h,"data-element-type":"shape"}),d(ht,{d:T,stroke:o.colorPrimary,strokeWidth:c,fill:"none","data-element-type":"shape"}),d(be,{indexes:e,x:S+w/2-i/2,y:H+C,size:i,fill:o.colorPrimary}),d($t,{indexes:e,x:S,y:H+i+C*2,width:w,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:a})]}))};Vt("l-corner-card",{component:s1,composites:["icon","label","desc"]});var UC=Object.defineProperty,ZC=Object.defineProperties,KC=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,QC=Object.prototype.hasOwnProperty,JC=Object.prototype.propertyIsEnumerable,l1=(t,e,n)=>e in t?UC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tM=(t,e)=>{for(var n in e||(e={}))QC.call(e,n)&&l1(t,n,e[n]);if(a1)for(var n of a1(e))JC.call(e,n)&&l1(t,n,e[n]);return t},eM=(t,e)=>ZC(t,KC(e));const c1=t=>{var e,n;const[{datum:r,indexes:i,width:o=280,height:s=160,showStripe:a=!0,showGradient:l=!0,showBottomShade:c=!0,themeColors:h},u]=Wt(t,["width","height","showStripe","showGradient","showBottomShade"]),f=(e=r.label)==null?void 0:e[0].toUpperCase(),p=(n=r.label)==null?void 0:n.toUpperCase(),g=h.colorPrimary,y=ot(g),m=4,b=6,v=45,x=40,w=12,$=y.clone().darken(4).toHexString(),P=y.clone().lighten(w).toHexString(),O="rgba(255, 255, 255, 0)",T="rgba(0, 0, 0, 0.03)",I=`letter-card-${i.join("-")}`,S=`${I}-gradient`,H=`${I}-pattern`,C=`${I}-shade`,A=m+b,B=1,k=96,D=k*B,z=16,N=z*B,j=s/16,X=D+j+N,L=(s-X)/2,M=L+D+j;return E(Y,eM(tM({},u),{width:o,height:s,children:[E(zt,{children:[l&&E("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:$}),d("stop",{offset:"100%",stopColor:P})]}),a&&E("pattern",{id:H,patternUnits:"userSpaceOnUse",width:A,height:A,patternTransform:`rotate(${v})`,children:[d("rect",{x:"0",y:"0",width:A,height:A,fill:O}),d("rect",{x:"0",y:"0",width:m,height:A,fill:T})]}),c&&E("linearGradient",{id:C,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),d("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),d(St,{x:0,y:0,width:o,height:s,fill:l?`url(#${S})`:g,rx:0,ry:0,"data-element-type":"shape"}),a&&d(St,{x:0,y:0,width:o,height:s,fill:`url(#${H})`,rx:0,ry:0}),c&&d(St,{x:0,y:s-x,width:o,height:x,fill:`url(#${C})`,rx:0,ry:0}),f&&d($t,{indexes:i,x:0,y:L,width:o,fontSize:k,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:f}),d($t,{indexes:i,x:0,y:M,width:o,fontSize:z,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:p})]}))};Vt("letter-card",{component:c1,composites:["label"]});var nM=Object.defineProperty,rM=Object.defineProperties,iM=Object.getOwnPropertyDescriptors,h1=Object.getOwnPropertySymbols,oM=Object.prototype.hasOwnProperty,sM=Object.prototype.propertyIsEnumerable,d1=(t,e,n)=>e in t?nM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aM=(t,e)=>{for(var n in e||(e={}))oM.call(e,n)&&d1(t,n,e[n]);if(h1)for(var n of h1(e))sM.call(e,n)&&d1(t,n,e[n]);return t},lM=(t,e)=>rM(t,iM(e));const u1=t=>{var e,n,r;const[{datum:i,indexes:o,width:s,themeColors:a,positionH:l="normal",positionV:c="center",formatter:h=B=>B||"",usePaletteColor:u=!1,showUnderline:f=!1,underlineGap:p=6,underlineExtend:g=8,underlineThickness:y=2},m]=Wt(t,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),b=h((n=(e=i.label)!=null?e:i.desc)!=null?n:""),v=l==="flipped"?"right":l==="center"?"center":"left",x=Q(d($t,{indexes:o,width:s,children:b})),w=s!=null?s:x.width,_=x.height,$=f?w+g*2:0,P=_+(f?p+y:0),O=f?Math.max(w,$):w,T=(r=m.height)!=null?r:P,I=c==="middle"?(T-P)/2:c==="flipped"?T-P:0,S=v==="right"?O-w:v==="center"?(O-w)/2:0,H=I,C=v==="right"?O-$:v==="center"?(O-$)/2:0,A=T;return E(Y,lM(aM({},m),{width:O,height:T,children:[d($t,{indexes:o,x:S,y:H,width:w,height:_,alignHorizontal:v,alignVertical:c==="flipped"?"bottom":c==="center"?"middle":"top",fill:u?a.colorPrimary:a.colorText,children:b}),f&&d(ht,{d:`M 0 ${y/2} L ${$} ${y/2}`,x:C,y:A-y/2,width:$,height:y,stroke:a.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};Vt("lined-text",{component:u1,composites:["label"]});var cM=Object.defineProperty,hM=Object.defineProperties,dM=Object.getOwnPropertyDescriptors,f1=Object.getOwnPropertySymbols,uM=Object.prototype.hasOwnProperty,fM=Object.prototype.propertyIsEnumerable,p1=(t,e,n)=>e in t?cM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pM=(t,e)=>{for(var n in e||(e={}))uM.call(e,n)&&p1(t,n,e[n]);if(f1)for(var n of f1(e))fM.call(e,n)&&p1(t,n,e[n]);return t},gM=(t,e)=>hM(t,dM(e));const g1=t=>{const[{datum:e,indexes:n,width:r=300,pillWidth:i=120,pillHeight:o=36,gap:s=16,positionH:a="normal",themeColors:l},c]=Wt(t,["width","pillWidth","pillHeight","gap"]),h=!!e.desc,u=h?r:i,f=h?a==="center"?(u-i)/2:a==="flipped"?u-i:0:0,p=0,g=0,y=o+s,m=u,b=`drop-shadow-${l.colorPrimary}`,v="linear-gradient-white-top-bottom";return E(Y,gM(pM({},c),{children:[E(zt,{children:[d(vc,{id:b,color:l.colorPrimary}),d(bc,{id:v,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),d(St,{x:f,y:p,width:i,height:o,fill:l.colorPrimaryBg,stroke:l.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${b})`,"data-element-type":"shape"}),d(St,{x:f,y:p,width:i,height:o,fill:`url(#${v})`,opacity:l.isDarkMode?.4:.7,rx:o/2,ry:o/2}),d($t,{indexes:n,x:f,y:p,width:i,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:l.colorText,children:e.label}),e.desc&&d(Xt,{indexes:n,x:g,y,width:m,alignHorizontal:a==="center"?"center":a==="flipped"?"right":"left",fontSize:12,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]}))};Vt("pill-badge",{component:g1,composites:["label","desc"]});var mM=Object.defineProperty,yM=Object.defineProperties,vM=Object.getOwnPropertyDescriptors,m1=Object.getOwnPropertySymbols,bM=Object.prototype.hasOwnProperty,xM=Object.prototype.propertyIsEnumerable,y1=(t,e,n)=>e in t?mM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wM=(t,e)=>{for(var n in e||(e={}))bM.call(e,n)&&y1(t,n,e[n]);if(m1)for(var n of m1(e))xM.call(e,n)&&y1(t,n,e[n]);return t},_M=(t,e)=>yM(t,vM(e));const v1=t=>{var e;const[{indexes:n,datum:r,width:i=120,themeColors:o,positionH:s="normal",positionV:a="center",formatter:l=y=>y||"",usePaletteColor:c=!1,lineNumber:h=1},u]=Wt(t,["width","formatter","usePaletteColor","lineNumber"]),f=14,p=1.4,g=(e=u.height)!=null?e:Math.ceil(h*p*f);return d($t,_M(wM({},u),{indexes:n,width:i,height:g,lineHeight:p,fill:c?o.colorPrimary:o.colorText,fontSize:f,fontWeight:"regular",alignHorizontal:s==="flipped"?"right":s==="center"?"center":"left",alignVertical:a==="flipped"?"bottom":a==="center"?"middle":"top",children:l(r.label||r.desc)}))};Vt("plain-text",{component:v1,composites:["label"]});function fs(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $M(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function b1(t){let e,n,r;t.length!==2?(e=fs,n=(a,l)=>fs(t(a),l),r=(a,l)=>t(a)-l):(e=t===fs||t===$M?t:PM,n=t,r=t);function i(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=i(a,l,c,h-1);return u>c&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:i,center:s,right:o}}function PM(){return 0}function OM(t){return t===null?NaN:+t}const CM=b1(fs).right;b1(OM).center;const MM=Math.sqrt(50),SM=Math.sqrt(10),EM=Math.sqrt(2);function ps(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=MM?10:o>=SM?5:o>=EM?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?ps(t,e,n*2):[a,l,c]}function IM(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?ps(e,t,n):ps(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function Pc(t,e,n){return e=+e,t=+t,n=+n,ps(t,e,n)[2]}function TM(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Pc(e,t,n):Pc(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var AM={value:()=>{}};function Oc(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new gs(n)}function gs(t){this._=t}function kM(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}gs.prototype=Oc.prototype={constructor:gs,on:function(t,e){var n=this._,r=kM(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=zM(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=x1(n[i],t.name,e);else if(e==null)for(i in n)n[i]=x1(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new gs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function zM(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function x1(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=AM,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Cc="http://www.w3.org/1999/xhtml";const w1={svg:"http://www.w3.org/2000/svg",xhtml:Cc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ms(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),w1.hasOwnProperty(e)?{space:w1[e],local:t}:t}function LM(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Cc&&e.documentElement.namespaceURI===Cc?e.createElement(t):e.createElementNS(n,t)}}function RM(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _1(t){var e=ms(t);return(e.local?RM:LM)(e)}function HM(){}function Mc(t){return t==null?HM:function(){return this.querySelector(t)}}function DM(t){typeof t!="function"&&(t=Mc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new We(r,this._parents)}function NM(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function jM(){return[]}function $1(t){return t==null?jM:function(){return this.querySelectorAll(t)}}function FM(t){return function(){return NM(t.apply(this,arguments))}}function BM(t){typeof t=="function"?t=FM(t):t=$1(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(t.call(l,l.__data__,c,s)),i.push(l));return new We(r,i)}function P1(t){return function(){return this.matches(t)}}function O1(t){return function(e){return e.matches(t)}}var WM=Array.prototype.find;function VM(t){return function(){return WM.call(this.children,t)}}function YM(){return this.firstElementChild}function XM(t){return this.select(t==null?YM:VM(typeof t=="function"?t:O1(t)))}var GM=Array.prototype.filter;function qM(){return Array.from(this.children)}function UM(t){return function(){return GM.call(this.children,t)}}function ZM(t){return this.selectAll(t==null?qM:UM(typeof t=="function"?t:O1(t)))}function KM(t){typeof t!="function"&&(t=P1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new We(r,this._parents)}function C1(t){return new Array(t.length)}function QM(){return new We(this._enter||this._groups.map(C1),this._parents)}function ys(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ys.prototype={constructor:ys,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function JM(t){return function(){return t}}function tS(t,e,n,r,i,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new ys(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function eS(t,e,n,r,i,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),p;for(a=0;a<h;++a)(l=e[a])&&(f[a]=p=s.call(l,l.__data__,a,e)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<u;++a)p=s.call(t,o[a],a,o)+"",(l=c.get(p))?(r[a]=l,l.__data__=o[a],c.delete(p)):n[a]=new ys(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(i[a]=l)}function nS(t){return t.__data__}function rS(t,e){if(!arguments.length)return Array.from(this,nS);var n=e?eS:tS,r=this._parents,i=this._groups;typeof t!="function"&&(t=JM(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=r[c],u=i[c],f=u.length,p=iS(t.call(h,h&&h.__data__,c,r)),g=p.length,y=a[c]=new Array(g),m=s[c]=new Array(g),b=l[c]=new Array(f);n(h,u,y,m,b,p,e);for(var v=0,x=0,w,_;v<g;++v)if(w=y[v]){for(v>=x&&(x=v+1);!(_=m[x])&&++x<g;);w._next=_||null}}return s=new We(s,r),s._enter=a,s._exit=l,s}function iS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function oS(){return new We(this._exit||this._groups.map(C1),this._parents)}function sS(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function aS(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c=n[l],h=r[l],u=c.length,f=a[l]=new Array(u),p,g=0;g<u;++g)(p=c[g]||h[g])&&(f[g]=p);for(;l<i;++l)a[l]=n[l];return new We(a,this._parents)}function lS(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function cS(t){t||(t=hS);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new We(i,this._parents).order()}function hS(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function dS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function uS(){return Array.from(this)}function fS(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function pS(){let t=0;for(const e of this)++t;return t}function gS(){return!this.node()}function mS(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function yS(t){return function(){this.removeAttribute(t)}}function vS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bS(t,e){return function(){this.setAttribute(t,e)}}function xS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function wS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function _S(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function $S(t,e){var n=ms(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?vS:yS:typeof e=="function"?n.local?_S:wS:n.local?xS:bS)(n,e))}function M1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function PS(t){return function(){this.style.removeProperty(t)}}function OS(t,e,n){return function(){this.style.setProperty(t,e,n)}}function CS(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function MS(t,e,n){return arguments.length>1?this.each((e==null?PS:typeof e=="function"?CS:OS)(t,e,n==null?"":n)):zr(this.node(),t)}function zr(t,e){return t.style.getPropertyValue(e)||M1(t).getComputedStyle(t,null).getPropertyValue(e)}function SS(t){return function(){delete this[t]}}function ES(t,e){return function(){this[t]=e}}function IS(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function TS(t,e){return arguments.length>1?this.each((e==null?SS:typeof e=="function"?IS:ES)(t,e)):this.node()[t]}function S1(t){return t.trim().split(/^|\s+/)}function Sc(t){return t.classList||new E1(t)}function E1(t){this._node=t,this._names=S1(t.getAttribute("class")||"")}E1.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function I1(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function T1(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function AS(t){return function(){I1(this,t)}}function kS(t){return function(){T1(this,t)}}function zS(t,e){return function(){(e.apply(this,arguments)?I1:T1)(this,t)}}function LS(t,e){var n=S1(t+"");if(arguments.length<2){for(var r=Sc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?zS:e?AS:kS)(n,e))}function RS(){this.textContent=""}function HS(t){return function(){this.textContent=t}}function DS(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function NS(t){return arguments.length?this.each(t==null?RS:(typeof t=="function"?DS:HS)(t)):this.node().textContent}function jS(){this.innerHTML=""}function FS(t){return function(){this.innerHTML=t}}function BS(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function WS(t){return arguments.length?this.each(t==null?jS:(typeof t=="function"?BS:FS)(t)):this.node().innerHTML}function VS(){this.nextSibling&&this.parentNode.appendChild(this)}function YS(){return this.each(VS)}function XS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function GS(){return this.each(XS)}function qS(t){var e=typeof t=="function"?t:_1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function US(){return null}function ZS(t,e){var n=typeof t=="function"?t:_1(t),r=e==null?US:typeof e=="function"?e:Mc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function KS(){var t=this.parentNode;t&&t.removeChild(this)}function QS(){return this.each(KS)}function JS(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tE(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function eE(t){return this.select(t?tE:JS)}function nE(t){return arguments.length?this.property("__data__",t):this.node().__data__}function rE(t){return function(e){t.call(this,e,this.__data__)}}function iE(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function oE(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function sE(t,e,n){return function(){var r=this.__on,i,o=rE(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function aE(t,e,n){var r=iE(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(i=0,h=a[l];i<o;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?sE:oE,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function A1(t,e,n){var r=M1(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function lE(t,e){return function(){return A1(this,t,e)}}function cE(t,e){return function(){return A1(this,t,e.apply(this,arguments))}}function hE(t,e){return this.each((typeof e=="function"?cE:lE)(t,e))}function*dE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var uE=[null];function We(t,e){this._groups=t,this._parents=e}function Mi(){return new We([[document.documentElement]],uE)}function fE(){return this}We.prototype=Mi.prototype={constructor:We,select:DM,selectAll:BM,selectChild:XM,selectChildren:ZM,filter:KM,data:rS,enter:QM,exit:oS,join:sS,merge:aS,selection:fE,order:lS,sort:cS,call:dS,nodes:uS,node:fS,size:pS,empty:gS,each:mS,attr:$S,style:MS,property:TS,classed:LS,text:NS,html:WS,raise:YS,lower:GS,append:qS,insert:ZS,remove:QS,clone:eE,datum:nE,on:aE,dispatch:hE,[Symbol.iterator]:dE};function Ec(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function k1(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Si(){}var Ei=.7,vs=1/Ei,Lr="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pE=/^#([0-9a-f]{3,8})$/,gE=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),mE=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),yE=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Ii}\\)$`),vE=new RegExp(`^rgba\\(${on},${on},${on},${Ii}\\)$`),bE=new RegExp(`^hsl\\(${Ii},${on},${on}\\)$`),xE=new RegExp(`^hsla\\(${Ii},${on},${on},${Ii}\\)$`),z1={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};Ec(Si,ir,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:L1,formatHex:L1,formatHex8:wE,formatHsl:_E,formatRgb:R1,toString:R1});function L1(){return this.rgb().formatHex()}function wE(){return this.rgb().formatHex8()}function _E(){return F1(this).formatHsl()}function R1(){return this.rgb().formatRgb()}function ir(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=pE.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?H1(e):n===3?new Ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?bs(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?bs(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=gE.exec(t))?new Ee(e[1],e[2],e[3],1):(e=mE.exec(t))?new Ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=yE.exec(t))?bs(e[1],e[2],e[3],e[4]):(e=vE.exec(t))?bs(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=bE.exec(t))?j1(e[1],e[2]/100,e[3]/100,1):(e=xE.exec(t))?j1(e[1],e[2]/100,e[3]/100,e[4]):z1.hasOwnProperty(t)?H1(z1[t]):t==="transparent"?new Ee(NaN,NaN,NaN,0):null}function H1(t){return new Ee(t>>16&255,t>>8&255,t&255,1)}function bs(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ee(t,e,n,r)}function $E(t){return t instanceof Si||(t=ir(t)),t?(t=t.rgb(),new Ee(t.r,t.g,t.b,t.opacity)):new Ee}function Ic(t,e,n,r){return arguments.length===1?$E(t):new Ee(t,e,n,r==null?1:r)}function Ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ec(Ee,Ic,k1(Si,{brighter(t){return t=t==null?vs:Math.pow(vs,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ei:Math.pow(Ei,t),new Ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ee(or(this.r),or(this.g),or(this.b),xs(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:D1,formatHex:D1,formatHex8:PE,formatRgb:N1,toString:N1}));function D1(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}function PE(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function N1(){const t=xs(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function xs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function sr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function j1(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ve(t,e,n,r)}function F1(t){if(t instanceof Ve)return new Ve(t.h,t.s,t.l,t.opacity);if(t instanceof Si||(t=ir(t)),!t)return new Ve;if(t instanceof Ve)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Ve(s,a,l,t.opacity)}function OE(t,e,n,r){return arguments.length===1?F1(t):new Ve(t,e,n,r==null?1:r)}function Ve(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ec(Ve,OE,k1(Si,{brighter(t){return t=t==null?vs:Math.pow(vs,t),new Ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ei:Math.pow(Ei,t),new Ve(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ee(Tc(t>=240?t-240:t+120,i,r),Tc(t,i,r),Tc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ve(B1(this.h),ws(this.s),ws(this.l),xs(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 t=xs(this.opacity);return`${t===1?"hsl(":"hsla("}${B1(this.h)}, ${ws(this.s)*100}%, ${ws(this.l)*100}%${t===1?")":`, ${t})`}`}}));function B1(t){return t=(t||0)%360,t<0?t+360:t}function ws(t){return Math.max(0,Math.min(1,t||0))}function Tc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ac=t=>()=>t;function CE(t,e){return function(n){return t+n*e}}function ME(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function SE(t){return(t=+t)==1?W1:function(e,n){return n-e?ME(e,n,t):Ac(isNaN(e)?n:e)}}function W1(t,e){var n=e-t;return n?CE(t,n):Ac(isNaN(t)?e:t)}const _s=(function t(e){var n=SE(e);function r(i,o){var s=n((i=Ic(i)).r,(o=Ic(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=W1(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=a(h),i.b=l(h),i.opacity=c(h),i+""}}return r.gamma=t,r})(1);function EE(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function IE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function TE(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Lc(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function AE(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ye(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function kE(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Lc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zc=new RegExp(kc.source,"g");function zE(t){return function(){return t}}function LE(t){return function(e){return t(e)+""}}function V1(t,e){var n=kc.lastIndex=zc.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=kc.exec(t))&&(i=zc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ye(r,i)})),n=zc.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?LE(l[0].x):zE(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function Lc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ac(e):(n==="number"?Ye:n==="string"?(r=ir(e))?(e=r,_s):V1:e instanceof ir?_s:e instanceof Date?AE:IE(e)?EE:Array.isArray(e)?TE:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?kE:Ye)(t,e)}function RE(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Y1=180/Math.PI,Rc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function X1(t,e,n,r,i,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Y1,skewX:Math.atan(l)*Y1,scaleX:s,scaleY:a}}var $s;function HE(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rc:X1(e.a,e.b,e.c,e.d,e.e,e.f)}function DE(t){return t==null||($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",t),!(t=$s.transform.baseVal.consolidate()))?Rc:(t=t.matrix,X1(t.a,t.b,t.c,t.d,t.e,t.f))}function G1(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push("translate(",null,e,null,n);g.push({i:y-4,x:Ye(c,u)},{i:y-2,x:Ye(h,f)})}else(u||f)&&p.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,r)-2,x:Ye(c,h)})):h&&u.push(i(u)+"rotate("+h+r)}function a(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,r)-2,x:Ye(c,h)}):h&&u.push(i(u)+"skewX("+h+r)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push(i(p)+"scale(",null,",",null,")");g.push({i:y-4,x:Ye(c,u)},{i:y-2,x:Ye(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,y=f.length,m;++g<y;)u[(m=f[g]).i]=m.x(p);return u.join("")}}}var NE=G1(HE,"px, ","px)","deg)"),jE=G1(DE,", ",")",")"),Rr=0,Ti=0,Ai=0,q1=1e3,Ps,ki,Os=0,ar=0,Cs=0,zi=typeof performance=="object"&&performance.now?performance:Date,U1=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Hc(){return ar||(U1(FE),ar=zi.now()+Cs)}function FE(){ar=0}function Ms(){this._call=this._time=this._next=null}Ms.prototype=Dc.prototype={constructor:Ms,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Hc():+n)+(e==null?0:+e),!this._next&&ki!==this&&(ki?ki._next=this:Ps=this,ki=this),this._call=t,this._time=n,Nc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nc())}};function Dc(t,e,n){var r=new Ms;return r.restart(t,e,n),r}function BE(){Hc(),++Rr;for(var t=Ps,e;t;)(e=ar-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rr}function Z1(){ar=(Os=zi.now())+Cs,Rr=Ti=0;try{BE()}finally{Rr=0,VE(),ar=0}}function WE(){var t=zi.now(),e=t-Os;e>q1&&(Cs-=e,Os=t)}function VE(){for(var t,e=Ps,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ps=n);ki=t,Nc(r)}function Nc(t){if(!Rr){Ti&&(Ti=clearTimeout(Ti));var e=t-ar;e>24?(t<1/0&&(Ti=setTimeout(Z1,t-zi.now()-Cs)),Ai&&(Ai=clearInterval(Ai))):(Ai||(Os=zi.now(),Ai=setInterval(WE,q1)),Rr=1,U1(Z1))}}function K1(t,e,n){var r=new Ms;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var YE=Oc("start","end","cancel","interrupt"),XE=[],Q1=0,J1=1,jc=2,Ss=3,tm=4,Fc=5,Es=6;function Is(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;GE(t,n,{name:e,index:r,group:i,on:YE,tween:XE,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Q1})}function Bc(t,e){var n=Xe(t,e);if(n.state>Q1)throw new Error("too late; already scheduled");return n}function sn(t,e){var n=Xe(t,e);if(n.state>Ss)throw new Error("too late; already running");return n}function Xe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function GE(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Dc(o,0,n.time);function o(c){n.state=J1,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,p;if(n.state!==J1)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===Ss)return K1(s);p.state===tm?(p.state=Es,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=Es,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(K1(function(){n.state===Ss&&(n.state=tm,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=jc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===jc){for(n.state=Ss,i=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(p=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=p);i.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Fc,1),u=-1,f=i.length;++u<f;)i[u].call(t,h);n.state===Fc&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Es,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function qE(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>jc&&r.state<Fc,r.state=Es,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function UE(t){return this.each(function(){qE(this,t)})}function ZE(t,e){var n,r;return function(){var i=sn(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function KE(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=sn(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function QE(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Xe(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?ZE:KE)(n,t,e))}function Wc(t,e,n){var r=t._id;return t.each(function(){var i=sn(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Xe(i,r).value[e]}}function em(t,e){var n;return(typeof e=="number"?Ye:e instanceof ir?_s:(n=ir(e))?(e=n,_s):V1)(t,e)}function JE(t){return function(){this.removeAttribute(t)}}function tI(t){return function(){this.removeAttributeNS(t.space,t.local)}}function eI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function nI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function rI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function iI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function oI(t,e){var n=ms(t),r=n==="transform"?jE:em;return this.attrTween(t,typeof e=="function"?(n.local?iI:rI)(n,r,Wc(this,"attr."+t,e)):e==null?(n.local?tI:JE)(n):(n.local?nI:eI)(n,r,e))}function sI(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function aI(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function lI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&aI(t,o)),n}return i._value=e,i}function cI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&sI(t,o)),n}return i._value=e,i}function hI(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ms(t);return this.tween(n,(r.local?lI:cI)(r,e))}function dI(t,e){return function(){Bc(this,t).delay=+e.apply(this,arguments)}}function uI(t,e){return e=+e,function(){Bc(this,t).delay=e}}function fI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dI:uI)(e,t)):Xe(this.node(),e).delay}function pI(t,e){return function(){sn(this,t).duration=+e.apply(this,arguments)}}function gI(t,e){return e=+e,function(){sn(this,t).duration=e}}function mI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?pI:gI)(e,t)):Xe(this.node(),e).duration}function yI(t,e){if(typeof e!="function")throw new Error;return function(){sn(this,t).ease=e}}function vI(t){var e=this._id;return arguments.length?this.each(yI(e,t)):Xe(this.node(),e).ease}function bI(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;sn(this,t).ease=n}}function xI(t){if(typeof t!="function")throw new Error;return this.each(bI(this._id,t))}function wI(t){typeof t!="function"&&(t=P1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new bn(r,this._parents,this._name,this._id)}function _I(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,p=0;p<h;++p)(f=l[p]||c[p])&&(u[p]=f);for(;a<r;++a)s[a]=e[a];return new bn(s,this._parents,this._name,this._id)}function $I(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function PI(t,e,n){var r,i,o=$I(e)?Bc:sn;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function OI(t,e){var n=this._id;return arguments.length<2?Xe(this.node(),n).on.on(t):this.each(PI(n,t,e))}function CI(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function MI(){return this.on("end.remove",CI(this._id))}function SI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Mc(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Is(c[f],e,n,f,c,Xe(h,n)));return new bn(o,this._parents,e,n)}function EI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=$1(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),p,g=Xe(h,n),y=0,m=f.length;y<m;++y)(p=f[y])&&Is(p,e,n,y,f,g);o.push(f),s.push(h)}return new bn(o,s,e,n)}var II=Mi.prototype.constructor;function TI(){return new II(this._groups,this._parents)}function AI(t,e){var n,r,i;return function(){var o=zr(this,t),s=(this.style.removeProperty(t),zr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function nm(t){return function(){this.style.removeProperty(t)}}function kI(t,e,n){var r,i=n+"",o;return function(){var s=zr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function zI(t,e,n){var r,i,o;return function(){var s=zr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),zr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function LI(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var l=sn(this,t),c=l.on,h=l.value[o]==null?a||(a=nm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function RI(t,e,n){var r=(t+="")=="transform"?NE:em;return e==null?this.styleTween(t,AI(t,r)).on("end.style."+t,nm(t)):typeof e=="function"?this.styleTween(t,zI(t,r,Wc(this,"style."+t,e))).each(LI(this._id,t)):this.styleTween(t,kI(t,r,e),n).on("end.style."+t,null)}function HI(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function DI(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&HI(t,s,n)),r}return o._value=e,o}function NI(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,DI(t,e,n==null?"":n))}function jI(t){return function(){this.textContent=t}}function FI(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function BI(t){return this.tween("text",typeof t=="function"?FI(Wc(this,"text",t)):jI(t==null?"":t+""))}function WI(t){return function(e){this.textContent=t.call(this,e)}}function VI(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&WI(i)),e}return r._value=t,r}function YI(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,VI(t))}function XI(){for(var t=this._name,e=this._id,n=rm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=Xe(l,e);Is(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new bn(r,this._parents,t,n)}function GI(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var c=sn(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),i===0&&o()})}var qI=0;function bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function rm(){return++qI}var xn=Mi.prototype;bn.prototype={constructor:bn,select:SI,selectAll:EI,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:wI,merge:_I,selection:TI,transition:XI,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:OI,attr:oI,attrTween:hI,style:RI,styleTween:NI,text:BI,textTween:YI,remove:MI,tween:QE,delay:fI,duration:mI,ease:vI,easeVarying:xI,end:GI,[Symbol.iterator]:xn[Symbol.iterator]};function UI(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ZI={time:null,delay:0,duration:250,ease:UI};function KI(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function QI(t){var e,n;t instanceof bn?(e=t._id,t=t._name):(e=rm(),(n=ZI).time=Hc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Is(l,t,e,c,s,n||KI(l,e));return new bn(r,this._parents,t,e)}Mi.prototype.interrupt=UE,Mi.prototype.transition=QI;const Vc=Math.PI,Yc=2*Vc,lr=1e-6,JI=Yc-lr;function im(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function tT(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return im;const n=Xi(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class eT{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?im:tT(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-e,c=i-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>lr)if(!(Math.abs(u*l-c*h)>lr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-s,g=i-a,y=l*l+c*c,m=p*p+g*g,b=Math.sqrt(y),v=Math.sqrt(f),x=o*Math.tan((Vc-Math.acos((y+f-m)/(2*b*v)))/2),w=x/v,_=x/b;Math.abs(w-1)>lr&&this._append`L${e+w*h},${n+w*u}`,this._append`A${o},${o},0,0,${+(u*p>h*g)},${this._x1=e+_*l},${this._y1=n+_*c}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,h=n+l,u=1^s,f=s?i-o:o-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>lr||Math.abs(this._y1-h)>lr)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%Yc+Yc),f>JI?this._append`A${r},${r},0,1,${u},${e-a},${n-l}A${r},${r},0,1,${u},${this._x1=c},${this._y1=h}`:f>lr&&this._append`A${r},${r},0,${+(f>=Vc)},${u},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function nT(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,s=n.length,a,l=0,c=0;for(o=0;o<s;++o)a=n[o],l+=a.x,c+=a.y;for(l=(l/s-t)*r,c=(c/s-e)*r,o=0;o<s;++o)a=n[o],a.x-=l,a.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function rT(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return om(this.cover(e,n),e,n,t)}function om(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,s={data:r},a=t._x0,l=t._y0,c=t._x1,h=t._y1,u,f,p,g,y,m,b,v;if(!o)return t._root=s,t;for(;o.length;)if((y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f,i=o,!(o=o[b=m<<1|y]))return i[b]=s,t;if(p=+t._x.call(null,o.data),g=+t._y.call(null,o.data),e===p&&n===g)return s.next=o,i?i[b]=s:t._root=s,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f;while((b=m<<1|y)===(v=(g>=f)<<1|p>=u));return i[v]=o,i[b]=s,t}function iT(t){var e,n,r=t.length,i,o,s=new Array(r),a=new Array(r),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,a[n]=o,i<l&&(l=i),i>h&&(h=i),o<c&&(c=o),o>u&&(u=o));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<r;++n)om(this,s[n],a[n],t[n]);return this}function oT(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var s=i-n||1,a=this._root,l,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,l=new Array(4),l[c]=a,a=l,s*=2,c){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function sT(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function aT(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Pe(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function lT(t,e,n){var r,i=this._x0,o=this._y0,s,a,l,c,h=this._x1,u=this._y1,f=[],p=this._root,g,y;for(p&&f.push(new Pe(p,i,o,h,u)),n==null?n=1/0:(i=t-n,o=e-n,h=t+n,u=e+n,n*=n);g=f.pop();)if(!(!(p=g.node)||(s=g.x0)>h||(a=g.y0)>u||(l=g.x1)<i||(c=g.y1)<o))if(p.length){var m=(s+l)/2,b=(a+c)/2;f.push(new Pe(p[3],m,b,l,c),new Pe(p[2],s,b,m,c),new Pe(p[1],m,a,l,b),new Pe(p[0],s,a,m,b)),(y=(e>=b)<<1|t>=m)&&(g=f[f.length-1],f[f.length-1]=f[f.length-1-y],f[f.length-1-y]=g)}else{var v=t-+this._x.call(null,p.data),x=e-+this._y.call(null,p.data),w=v*v+x*x;if(w<n){var _=Math.sqrt(n=w);i=t-_,o=e-_,h=t+_,u=e+_,r=p.data}}return r}function cT(t){if(isNaN(h=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,s=this._x0,a=this._y0,l=this._x1,c=this._y1,h,u,f,p,g,y,m,b;if(!n)return this;if(n.length)for(;;){if((g=h>=(f=(s+l)/2))?s=f:l=f,(y=u>=(p=(a+c)/2))?a=p:c=p,e=n,!(n=n[m=y<<1|g]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,b=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[b]=n:this._root=n),this):(this._root=o,this)}function hT(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function dT(){return this._root}function uT(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function fT(t){var e=[],n,r=this._root,i,o,s,a,l;for(r&&e.push(new Pe(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,s=n.y0,a=n.x1,l=n.y1)&&r.length){var c=(o+a)/2,h=(s+l)/2;(i=r[3])&&e.push(new Pe(i,c,h,a,l)),(i=r[2])&&e.push(new Pe(i,o,h,c,l)),(i=r[1])&&e.push(new Pe(i,c,s,a,h)),(i=r[0])&&e.push(new Pe(i,o,s,c,h))}return this}function pT(t){var e=[],n=[],r;for(this._root&&e.push(new Pe(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,l=r.x1,c=r.y1,h=(s+l)/2,u=(a+c)/2;(o=i[0])&&e.push(new Pe(o,s,a,h,u)),(o=i[1])&&e.push(new Pe(o,h,a,l,u)),(o=i[2])&&e.push(new Pe(o,s,u,h,c)),(o=i[3])&&e.push(new Pe(o,h,u,l,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function gT(t){return t[0]}function mT(t){return arguments.length?(this._x=t,this):this._x}function yT(t){return t[1]}function vT(t){return arguments.length?(this._y=t,this):this._y}function Xc(t,e,n){var r=new Gc(e==null?gT:e,n==null?yT:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Gc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function sm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Oe=Xc.prototype=Gc.prototype;Oe.copy=function(){var t=new Gc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=sm(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=sm(r));return t},Oe.add=rT,Oe.addAll=iT,Oe.cover=oT,Oe.data=sT,Oe.extent=aT,Oe.find=lT,Oe.remove=cT,Oe.removeAll=hT,Oe.root=dT,Oe.size=uT,Oe.visit=fT,Oe.visitAfter=pT,Oe.x=mT,Oe.y=vT;function cr(t){return function(){return t}}function zn(t){return(t()-.5)*1e-6}function bT(t){return t.x+t.vx}function xT(t){return t.y+t.vy}function wT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=cr(t==null?1:+t));function s(){for(var c,h=e.length,u,f,p,g,y,m,b=0;b<o;++b)for(u=Xc(e,bT,xT).visitAfter(a),c=0;c<h;++c)f=e[c],y=n[f.index],m=y*y,p=f.x+f.vx,g=f.y+f.vy,u.visit(v);function v(x,w,_,$,P){var O=x.data,T=x.r,I=y+T;if(O){if(O.index>f.index){var S=p-O.x-O.vx,H=g-O.y-O.vy,C=S*S+H*H;C<I*I&&(S===0&&(S=zn(r),C+=S*S),H===0&&(H=zn(r),C+=H*H),C=(I-(C=Math.sqrt(C)))/C*i,f.vx+=(S*=C)*(I=(T*=T)/(m+T)),f.vy+=(H*=C)*I,O.vx-=S*(I=1-I),O.vy-=H*I)}return}return w>p+I||$<p-I||_>g+I||P<g-I}}function a(c){if(c.data)return c.r=n[c.data.index];for(var h=c.r=0;h<4;++h)c[h]&&c[h].r>c.r&&(c.r=c[h].r)}function l(){if(e){var c,h=e.length,u;for(n=new Array(h),c=0;c<h;++c)u=e[c],n[u.index]=+t(u,c,e)}}return s.initialize=function(c,h){e=c,r=h,l()},s.iterations=function(c){return arguments.length?(o=+c,s):o},s.strength=function(c){return arguments.length?(i=+c,s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:cr(+c),l(),s):t},s}function _T(t){return t.index}function am(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function $T(t){var e=_T,n=u,r,i=cr(30),o,s,a,l,c,h=1;t==null&&(t=[]);function u(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function f(m){for(var b=0,v=t.length;b<h;++b)for(var x=0,w,_,$,P,O,T,I;x<v;++x)w=t[x],_=w.source,$=w.target,P=$.x+$.vx-_.x-_.vx||zn(c),O=$.y+$.vy-_.y-_.vy||zn(c),T=Math.sqrt(P*P+O*O),T=(T-o[x])/T*m*r[x],P*=T,O*=T,$.vx-=P*(I=l[x]),$.vy-=O*I,_.vx+=P*(I=1-I),_.vy+=O*I}function p(){if(s){var m,b=s.length,v=t.length,x=new Map(s.map((_,$)=>[e(_,$,s),_])),w;for(m=0,a=new Array(b);m<v;++m)w=t[m],w.index=m,typeof w.source!="object"&&(w.source=am(x,w.source)),typeof w.target!="object"&&(w.target=am(x,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(m=0,l=new Array(v);m<v;++m)w=t[m],l[m]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(v),g(),o=new Array(v),y()}}function g(){if(s)for(var m=0,b=t.length;m<b;++m)r[m]=+n(t[m],m,t)}function y(){if(s)for(var m=0,b=t.length;m<b;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,b){s=m,c=b,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(h=+m,f):h},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:cr(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:cr(+m),y(),f):i},f}const PT=1664525,OT=1013904223,lm=4294967296;function CT(){let t=1;return()=>(t=(PT*t+OT)%lm)/lm}function MT(t){return t.x}function ST(t){return t.y}var ET=10,IT=Math.PI*(3-Math.sqrt(5));function TT(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,l=Dc(u),c=Oc("tick","end"),h=CT();t==null&&(t=[]);function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(y){var m,b=t.length,v;y===void 0&&(y=1);for(var x=0;x<y;++x)for(n+=(o-n)*i,a.forEach(function(w){w(n)}),m=0;m<b;++m)v=t[m],v.fx==null?v.x+=v.vx*=s:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=s:(v.y=v.fy,v.vy=0);return e}function p(){for(var y=0,m=t.length,b;y<m;++y){if(b=t[y],b.index=y,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var v=ET*Math.sqrt(.5+y),x=y*IT;b.x=v*Math.cos(x),b.y=v*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function g(y){return y.initialize&&y.initialize(t,h),y}return p(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(y){return arguments.length?(t=y,p(),a.forEach(g),e):t},alpha:function(y){return arguments.length?(n=+y,e):n},alphaMin:function(y){return arguments.length?(r=+y,e):r},alphaDecay:function(y){return arguments.length?(i=+y,e):+i},alphaTarget:function(y){return arguments.length?(o=+y,e):o},velocityDecay:function(y){return arguments.length?(s=1-y,e):1-s},randomSource:function(y){return arguments.length?(h=y,a.forEach(g),e):h},force:function(y,m){return arguments.length>1?(m==null?a.delete(y):a.set(y,g(m)),e):a.get(y)},find:function(y,m,b){var v=0,x=t.length,w,_,$,P,O;for(b==null?b=1/0:b*=b,v=0;v<x;++v)P=t[v],w=y-P.x,_=m-P.y,$=w*w+_*_,$<b&&(O=P,b=$);return O},on:function(y,m){return arguments.length>1?(c.on(y,m),e):c.on(y)}}}function AT(){var t,e,n,r,i=cr(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=Xc(t,MT,ST).visitAfter(u);for(r=p,g=0;g<y;++g)e=t[g],m.visit(f)}function h(){if(t){var p,g=t.length,y;for(o=new Array(g),p=0;p<g;++p)y=t[p],o[y.index]=+i(y,p,t)}}function u(p){var g=0,y,m,b=0,v,x,w;if(p.length){for(v=x=w=0;w<4;++w)(y=p[w])&&(m=Math.abs(y.value))&&(g+=y.value,b+=m,v+=m*y.x,x+=m*y.y);p.x=v/b,p.y=x/b}else{y=p,y.x=y.data.x,y.y=y.data.y;do g+=o[y.data.index];while(y=y.next)}p.value=g}function f(p,g,y,m){if(!p.value)return!0;var b=p.x-e.x,v=p.y-e.y,x=m-g,w=b*b+v*v;if(x*x/l<w)return w<a&&(b===0&&(b=zn(n),w+=b*b),v===0&&(v=zn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)),e.vx+=b*p.value*r/w,e.vy+=v*p.value*r/w),!0;if(p.length||w>=a)return;(p.data!==e||p.next)&&(b===0&&(b=zn(n),w+=b*b),v===0&&(v=zn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)));do p.data!==e&&(x=o[p.data.index]*r/w,e.vx+=b*x,e.vy+=v*x);while(p=p.next)}return c.initialize=function(p,g){t=p,n=g,h()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:cr(+p),h(),c):i},c.distanceMin=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.distanceMax=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.theta=function(p){return arguments.length?(l=p*p,c):Math.sqrt(l)},c}function kT(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ts(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Hr(t){return t=Ts(Math.abs(t)),t?t[1]:NaN}function zT(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function LT(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var RT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function As(t){if(!(e=RT.exec(t)))throw new Error("invalid format: "+t);var e;return new qc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}As.prototype=qc.prototype;function qc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}qc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function HT(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var cm;function DT(t,e){var n=Ts(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(cm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ts(t,Math.max(0,e+o-1))[0]}function hm(t,e){var n=Ts(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const dm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:kT,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>hm(t*100,e),r:hm,s:DT,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function um(t){return t}var fm=Array.prototype.map,pm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function NT(t){var e=t.grouping===void 0||t.thousands===void 0?um:zT(fm.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?um:LT(fm.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=As(u);var f=u.fill,p=u.align,g=u.sign,y=u.symbol,m=u.zero,b=u.width,v=u.comma,x=u.precision,w=u.trim,_=u.type;_==="n"?(v=!0,_="g"):dm[_]||(x===void 0&&(x=12),w=!0,_="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var $=y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",P=y==="$"?r:/[%p]/.test(_)?s:"",O=dm[_],T=/[defgprs%]/.test(_);x=x===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function I(S){var H=$,C=P,A,B,k;if(_==="c")C=O(S)+C,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?l:O(Math.abs(S),x),w&&(S=HT(S)),D&&+S==0&&g!=="+"&&(D=!1),H=(D?g==="("?g:a:g==="-"||g==="("?"":g)+H,C=(_==="s"?pm[8+cm/3]:"")+C+(D&&g==="("?")":""),T){for(A=-1,B=S.length;++A<B;)if(k=S.charCodeAt(A),48>k||k>57){C=(k===46?i+S.slice(A+1):S.slice(A))+C,S=S.slice(0,A);break}}}v&&!m&&(S=e(S,1/0));var z=H.length+S.length+C.length,N=z<b?new Array(b-z+1).join(f):"";switch(v&&m&&(S=e(N+S,N.length?b-C.length:1/0),N=""),p){case"<":S=H+S+C+N;break;case"=":S=H+N+S+C;break;case"^":S=N.slice(0,z=N.length>>1)+H+S+C+N.slice(z);break;default:S=N+H+S+C;break}return o(S)}return I.toString=function(){return u+""},I}function h(u,f){var p=c((u=As(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Hr(f)/3)))*3,y=Math.pow(10,-g),m=pm[8+g/3];return function(b){return p(y*b)+m}}return{format:c,formatPrefix:h}}var ks,gm,mm;jT({thousands:",",grouping:[3],currency:["$",""]});function jT(t){return ks=NT(t),gm=ks.format,mm=ks.formatPrefix,ks}function FT(t){return Math.max(0,-Hr(Math.abs(t)))}function BT(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hr(e)/3)))*3-Hr(Math.abs(t)))}function WT(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hr(e)-Hr(t))+1}function VT(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function YT(){return this.eachAfter(VT)}function XT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function GT(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function qT(t,e){for(var n=this,r=[n],i=[],o,s,a,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,a=o.length;s<a;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function UT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function ZT(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function KT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function QT(t){for(var e=this,n=JT(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function JT(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function tA(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function eA(){return Array.from(this)}function nA(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function rA(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*iA(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Uc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=aA)):e===void 0&&(e=sA);for(var n=new Li(t),r,i=[n],o,s,a,l;r=i.pop();)if((s=e(r.data))&&(l=(s=Array.from(s)).length))for(r.children=s,a=l-1;a>=0;--a)i.push(o=s[a]=new Li(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(cA)}function oA(){return Uc(this).eachBefore(lA)}function sA(t){return t.children}function aA(t){return Array.isArray(t)?t[1]:null}function lA(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function cA(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Li(t){this.data=t,this.depth=this.height=0,this.parent=null}Li.prototype=Uc.prototype={constructor:Li,count:YT,each:XT,eachAfter:qT,eachBefore:GT,find:UT,sum:ZT,sort:KT,path:QT,ancestors:tA,descendants:eA,leaves:nA,links:rA,copy:oA,[Symbol.iterator]:iA};function hA(t,e){return t.parent===e.parent?1:2}function Zc(t){var e=t.children;return e?e[0]:t.t}function Kc(t){var e=t.children;return e?e[e.length-1]:t.t}function dA(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function uA(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function fA(t,e,n){return t.a.parent===e.parent?t.a:n}function zs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}zs.prototype=Object.create(Li.prototype);function pA(t){for(var e=new zs(t,0),n,r=[e],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new zs(o[s],s)),i.parent=n;return(e.parent=new zs(null,0)).children=[e],e}function gA(){var t=hA,e=1,n=1,r=null;function i(c){var h=pA(c);if(h.eachAfter(o),h.parent.m=-h.z,h.eachBefore(s),r)c.eachBefore(l);else{var u=c,f=c,p=c;c.eachBefore(function(v){v.x<u.x&&(u=v),v.x>f.x&&(f=v),v.depth>p.depth&&(p=v)});var g=u===f?1:t(u,f)/2,y=g-u.x,m=e/(f.x+g+y),b=n/(p.depth||1);c.eachBefore(function(v){v.x=(v.x+y)*m,v.y=v.depth*b})}return c}function o(c){var h=c.children,u=c.parent.children,f=c.i?u[c.i-1]:null;if(h){uA(c);var p=(h[0].z+h[h.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=a(c,f,c.parent.A||u[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,h,u){if(h){for(var f=c,p=c,g=h,y=f.parent.children[0],m=f.m,b=p.m,v=g.m,x=y.m,w;g=Kc(g),f=Zc(f),g&&f;)y=Zc(y),p=Kc(p),p.a=c,w=g.z+v-f.z-m+t(g._,f._),w>0&&(dA(fA(g,c,u),c,w),m+=w,b+=w),v+=g.m,m+=f.m,x+=y.m,b+=p.m;g&&!Kc(p)&&(p.t=g,p.m+=v-b),f&&!Zc(y)&&(y.t=f,y.m+=m-x,u=c)}return u}function l(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function mA(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function yA(t){return function(){return t}}function vA(t){return+t}var ym=[0,1];function Dr(t){return t}function Qc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:yA(isNaN(e)?NaN:.5)}function bA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function xA(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=Qc(i,r),o=n(s,o)):(r=Qc(r,i),o=n(o,s)),function(a){return o(r(a))}}function wA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=Qc(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=CM(t,a,1,r)-1;return o[l](i[l](a))}}function _A(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $A(){var t=ym,e=ym,n=Lc,r,i,o,s=Dr,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==Dr&&(s=bA(t[0],t[f-1])),a=f>2?wA:xA,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(r),e,n)))(r(s(f)))}return u.invert=function(f){return s(i((c||(c=a(e,t.map(r),Ye)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,vA),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=RE,h()},u.clamp=function(f){return arguments.length?(s=f?!0:Dr,h()):s!==Dr},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,p){return r=f,i=p,h()}}function PA(){return $A()(Dr,Dr)}function OA(t,e,n,r){var i=TM(t,e,n),o;switch(r=As(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=BT(i,s))&&(r.precision=o),mm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=WT(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=FT(i))&&(r.precision=o-(r.type==="%")*2);break}}return gm(r)}function CA(t){var e=t.domain;return t.ticks=function(n){var r=e();return IM(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return OA(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);h-- >0;){if(c=Pc(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Ri(){var t=PA();return t.copy=function(){return _A(t,Ri())},mA.apply(t,arguments),CA(t)}function ie(t){return function(){return t}}const vm=Math.abs,we=Math.atan2,hr=Math.cos,MA=Math.max,Jc=Math.min,an=Math.sin,Nr=Math.sqrt,Ie=1e-12,Hi=Math.PI,Ls=Hi/2,Rs=2*Hi;function SA(t){return t>1?0:t<-1?Hi:Math.acos(t)}function bm(t){return t>=1?Ls:t<=-1?-Ls:Math.asin(t)}function xm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new eT(e)}function EA(t){return t.innerRadius}function IA(t){return t.outerRadius}function TA(t){return t.startAngle}function AA(t){return t.endAngle}function kA(t){return t&&t.padAngle}function zA(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,h=s-i,u=a-o,f=u*l-h*c;if(!(f*f<Ie))return f=(h*(e-o)-u*(t-i))/f,[t+f*l,e+f*c]}function Hs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Nr(a*a+l*l),h=c*l,u=-c*a,f=t+h,p=e+u,g=n+h,y=r+u,m=(f+g)/2,b=(p+y)/2,v=g-f,x=y-p,w=v*v+x*x,_=i-o,$=f*y-g*p,P=(x<0?-1:1)*Nr(MA(0,_*_*w-$*$)),O=($*x-v*P)/w,T=(-$*v-x*P)/w,I=($*x+v*P)/w,S=(-$*v+x*P)/w,H=O-m,C=T-b,A=I-m,B=S-b;return H*H+C*C>A*A+B*B&&(O=I,T=S),{cx:O,cy:T,x01:-h,y01:-u,x11:O*(i/_-1),y11:T*(i/_-1)}}function Di(){var t=EA,e=IA,n=ie(0),r=null,i=TA,o=AA,s=kA,a=null,l=xm(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-Ls,y=o.apply(this,arguments)-Ls,m=vm(y-g),b=y>g;if(a||(a=h=l()),p<f&&(u=p,p=f,f=u),!(p>Ie))a.moveTo(0,0);else if(m>Rs-Ie)a.moveTo(p*hr(g),p*an(g)),a.arc(0,0,p,g,y,!b),f>Ie&&(a.moveTo(f*hr(y),f*an(y)),a.arc(0,0,f,y,g,b));else{var v=g,x=y,w=g,_=y,$=m,P=m,O=s.apply(this,arguments)/2,T=O>Ie&&(r?+r.apply(this,arguments):Nr(f*f+p*p)),I=Jc(vm(p-f)/2,+n.apply(this,arguments)),S=I,H=I,C,A;if(T>Ie){var B=bm(T/f*an(O)),k=bm(T/p*an(O));($-=B*2)>Ie?(B*=b?1:-1,w+=B,_-=B):($=0,w=_=(g+y)/2),(P-=k*2)>Ie?(k*=b?1:-1,v+=k,x-=k):(P=0,v=x=(g+y)/2)}var D=p*hr(v),z=p*an(v),N=f*hr(_),j=f*an(_);if(I>Ie){var X=p*hr(x),L=p*an(x),M=f*hr(w),R=f*an(w),W;if(m<Hi)if(W=zA(D,z,M,R,X,L,N,j)){var U=D-W[0],V=z-W[1],G=X-W[0],Z=L-W[1],K=1/an(SA((U*G+V*Z)/(Nr(U*U+V*V)*Nr(G*G+Z*Z)))/2),nt=Nr(W[0]*W[0]+W[1]*W[1]);S=Jc(I,(f-nt)/(K-1)),H=Jc(I,(p-nt)/(K+1))}else S=H=0}P>Ie?H>Ie?(C=Hs(M,R,D,z,p,H,b),A=Hs(X,L,N,j,p,H,b),a.moveTo(C.cx+C.x01,C.cy+C.y01),H<I?a.arc(C.cx,C.cy,H,we(C.y01,C.x01),we(A.y01,A.x01),!b):(a.arc(C.cx,C.cy,H,we(C.y01,C.x01),we(C.y11,C.x11),!b),a.arc(0,0,p,we(C.cy+C.y11,C.cx+C.x11),we(A.cy+A.y11,A.cx+A.x11),!b),a.arc(A.cx,A.cy,H,we(A.y11,A.x11),we(A.y01,A.x01),!b))):(a.moveTo(D,z),a.arc(0,0,p,v,x,!b)):a.moveTo(D,z),!(f>Ie)||!($>Ie)?a.lineTo(N,j):S>Ie?(C=Hs(N,j,X,L,f,-S,b),A=Hs(D,z,M,R,f,-S,b),a.lineTo(C.cx+C.x01,C.cy+C.y01),S<I?a.arc(C.cx,C.cy,S,we(C.y01,C.x01),we(A.y01,A.x01),!b):(a.arc(C.cx,C.cy,S,we(C.y01,C.x01),we(C.y11,C.x11),!b),a.arc(0,0,f,we(C.cy+C.y11,C.cx+C.x11),we(A.cy+A.y11,A.cx+A.x11),b),a.arc(A.cx,A.cy,S,we(A.y11,A.x11),we(A.y01,A.x01),!b))):a.arc(0,0,f,_,w,b)}if(a.closePath(),h)return a=null,h+""||null}return c.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Hi/2;return[hr(u)*h,an(u)*h]},c.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:ie(+h),c):t},c.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:ie(+h),c):e},c.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:ie(+h),c):n},c.padRadius=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ie(+h),c):r},c.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:ie(+h),c):i},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:ie(+h),c):o},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:ie(+h),c):s},c.context=function(h){return arguments.length?(a=h==null?null:h,c):a},c}function wm(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _m(t){this._context=t}_m.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function $m(t){return new _m(t)}function LA(t){return t[0]}function RA(t){return t[1]}function HA(t,e){var n=ie(!0),r=null,i=$m,o=null,s=xm(a);t=typeof t=="function"?t:t===void 0?LA:ie(t),e=typeof e=="function"?e:e===void 0?RA:ie(e);function a(l){var c,h=(l=wm(l)).length,u,f=!1,p;for(r==null&&(o=i(p=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(p)return o=null,p+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ie(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function DA(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function NA(t){return t}function jA(){var t=NA,e=DA,n=null,r=ie(0),i=ie(Rs),o=ie(0);function s(a){var l,c=(a=wm(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Rs,Math.max(-Rs,i.apply(this,arguments)-y)),b,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=v*(m<0?-1:1),w;for(l=0;l<c;++l)(w=g[p[l]=l]=+t(a[l],l,a))>0&&(f+=w);for(e!=null?p.sort(function(_,$){return e(g[_],g[$])}):n!=null&&p.sort(function(_,$){return n(a[_],a[$])}),l=0,u=f?(m-c*x)/f:0;l<c;++l,y=b)h=p[l],w=g[h],b=y+(w>0?w*u:0)+x,g[h]={data:a[h],index:l,value:w,startAngle:y,endAngle:b,padAngle:v};return g}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:ie(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:ie(+a),s):r},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:ie(+a),s):i},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:ie(+a),s):o},s}function Ni(t,e,n){this.k=t,this.x=e,this.y=n}Ni.prototype={constructor:Ni,scale:function(t){return t===1?this:new Ni(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ni(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Ni.prototype;var FA=Object.defineProperty,BA=Object.defineProperties,WA=Object.getOwnPropertyDescriptors,Pm=Object.getOwnPropertySymbols,VA=Object.prototype.hasOwnProperty,YA=Object.prototype.propertyIsEnumerable,Om=(t,e,n)=>e in t?FA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XA=(t,e)=>{for(var n in e||(e={}))VA.call(e,n)&&Om(t,n,e[n]);if(Pm)for(var n of Pm(e))YA.call(e,n)&&Om(t,n,e[n]);return t},GA=(t,e)=>BA(t,WA(e));const Cm=t=>{const[{datum:e,data:n,indexes:r,width:i=280,height:o=120,iconSize:s=32,gap:a=12,progressHeight:l=8,borderRadius:c=12,positionH:h="normal",themeColors:u,valueFormatter:f=B=>`${B}%`},p]=Wt(t,["width","height","iconSize","gap","progressHeight","borderRadius"]),g=e.value,y=g!=null?g:0,m=Math.max(...n.items.map(B=>{var k;return(k=B.value)!=null?k:0}),100),b=i-2*a,x=Ri().domain([0,m]).range([0,b])(y),w=`${u.colorPrimary}-progress`,_=`${u.colorPrimaryBg}-progress-bg`,$=Q(d($t,{indexes:r})),P=a,O=h==="flipped"?i-a-s:a,T=P,I=h==="flipped"?a:s+2*a,S=i-s-3*a,H=T,C=o-a-l,A=g!==void 0;return E(Y,GA(XA({},p),{children:[E(zt,{children:[E("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimary}),d("stop",{offset:"100%",stopColor:ot.mix(u.colorPrimary,"#fff",20).toHexString()})]}),E("linearGradient",{id:_,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimaryBg}),d("stop",{offset:"100%",stopColor:u.colorBg})]})]}),d(St,{x:0,y:0,width:i,height:o,fill:u.colorBgElevated,stroke:u.colorPrimaryBg,strokeWidth:1,rx:c,ry:c,"data-element-type":"shape"}),d(be,{indexes:r,x:O,y:T,size:s,fill:u.colorPrimary}),d($t,{indexes:r,x:I,y:H,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:u.colorText,children:e.label}),A&&d(xi,{indexes:r,x:I,y:H+$.height,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:u.colorPrimary,value:y,formatter:f}),d(Xt,{indexes:r,x:I,y:H+$.height+(A?27:4),width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:11,fill:u.colorTextSecondary,lineNumber:A?2:3,wordWrap:!0,children:e.desc}),d(St,{x:a,y:C,width:b,height:l,fill:`url(#${_})`,rx:l/2,ry:l/2,"data-element-type":"shape"}),d(St,{x:a,y:C,width:x,height:l,fill:`url(#${w})`,rx:l/2,ry:l/2,"data-element-type":"shape"})]}))};Vt("progress-card",{component:Cm,composites:["icon","label","value","desc"]});var qA=Object.defineProperty,UA=Object.defineProperties,ZA=Object.getOwnPropertyDescriptors,Mm=Object.getOwnPropertySymbols,KA=Object.prototype.hasOwnProperty,QA=Object.prototype.propertyIsEnumerable,Sm=(t,e,n)=>e in t?qA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JA=(t,e)=>{for(var n in e||(e={}))KA.call(e,n)&&Sm(t,n,e[n]);if(Mm)for(var n of Mm(e))QA.call(e,n)&&Sm(t,n,e[n]);return t},tk=(t,e)=>UA(t,ZA(e));const Em=t=>{const[{datum:e,indexes:n,width:r=280,height:i=120,iconSize:o=30,circleRadius:s=80,positionH:a="normal",positionV:l="normal",themeColors:c},h]=Wt(t,["width","height","iconSize","circleRadius"]),u=4*s/(3*Math.PI),f=2,p=4,g=28,y=20,m=y+20,b=y,v=8,x=35,w=40,_=30,$=String(n[0]+1).padStart(2,"0"),P=a==="flipped",O=l==="flipped",T=()=>P?{diagonalStartX:r-p,diagonalStartY:O?i-x:x,diagonalEndX:r-w,diagonalEndY:O?i-p:p,topLineStartX:r-w,topLineEndX:u,topLineY:O?i-p:p}:{diagonalStartX:p,diagonalStartY:O?i-x:x,diagonalEndX:w,diagonalEndY:O?i-p:p,topLineStartX:w,topLineEndX:r-u,topLineY:O?i-p:p},I=()=>{if(P){const D=s+10,z=r-D-w;return{valueX:r-_,contentX:D,contentWidth:z,circleX:0,circleY:O?0:i,iconX:u-o/2}}else return{valueX:0,contentX:w,contentWidth:r-w-s-10,circleX:r,circleY:O?0:i,iconX:r-u-o/2}},S=T(),H=I(),C=O?u-o/2:i-u-o/2,A=Q(d($t,{indexes:n,width:H.contentWidth,children:e.label})),B=b+A.height+v,k=()=>{const{circleX:D,circleY:z}=H;return P?O?`M ${D} ${z} L ${D} ${z+s} A ${s} ${s} 0 0 0 ${D+s} ${z} Z`:`M ${D} ${z} L ${D} ${z-s} A ${s} ${s} 0 0 1 ${D+s} ${z} Z`:O?`M ${D} ${z} L ${D} ${z+s} A ${s} ${s} 0 0 1 ${D-s} ${z} Z`:`M ${D} ${z} L ${D} ${z-s} A ${s} ${s} 0 0 0 ${D-s} ${z} Z`};return E(Y,tk(JA({},h),{width:r,height:i,children:[E(ne,{children:[d(ht,{d:`M ${S.diagonalStartX} ${S.diagonalStartY} L ${S.diagonalEndX} ${S.diagonalEndY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(ht,{d:`M ${S.topLineStartX} ${S.topLineY} L ${S.topLineEndX} ${S.topLineY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(Lt,{x:S.diagonalStartX-p,y:S.diagonalStartY-p,width:p*2,height:p*2,fill:c.colorPrimary}),d(Lt,{x:S.topLineEndX-p,y:S.topLineY-p,width:p*2,height:p*2,fill:c.colorPrimary})]}),E(Y,{children:[d(Et,{x:H.valueX,y:m,fontSize:g,fontWeight:"bold",fill:c.colorPrimary,children:$}),d(ht,{d:k(),fill:c.colorPrimary,"data-element-type":"shape"}),e.icon&&d(be,{indexes:n,x:H.iconX,y:C,size:o,fill:c.colorWhite}),e.label&&d($t,{indexes:n,x:H.contentX,y:b,width:H.contentWidth,fontWeight:"bold",fill:c.colorText,alignHorizontal:P?"right":"left",children:e.label}),e.desc&&d(Xt,{indexes:n,x:H.contentX,y:B,width:H.contentWidth,fill:c.colorTextSecondary,alignHorizontal:P?"right":"left",children:e.desc})]})]}))};Vt("quarter-circular",{component:Em,composites:["icon","label","desc"]});var ek=Object.defineProperty,nk=Object.defineProperties,rk=Object.getOwnPropertyDescriptors,Im=Object.getOwnPropertySymbols,ik=Object.prototype.hasOwnProperty,ok=Object.prototype.propertyIsEnumerable,Tm=(t,e,n)=>e in t?ek(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sk=(t,e)=>{for(var n in e||(e={}))ik.call(e,n)&&Tm(t,n,e[n]);if(Im)for(var n of Im(e))ok.call(e,n)&&Tm(t,n,e[n]);return t},ak=(t,e)=>nk(t,rk(e));const Am=t=>{const[{datum:e,indexes:n,width:r=150,height:i=150,iconSize:o=30,padding:s=20,borderRadius:a=16,positionH:l="center",positionV:c="middle",themeColors:h},u]=Wt(t,["width","height","iconSize","padding","borderRadius"]),f=r-s*2,p=s,g=s,y=l==="flipped"?r-s-o:l==="center"?(r-o)/2:p,m=g,b=m+o+8,v=Q(d($t,{indexes:n,width:f,children:e.label})),x=l==="flipped"?r-s-f:l==="center"?s:p,w=b+v.height+4,_=x,$=a;let P="";return l==="center"&&c==="middle"?P=`
|
|
30
|
+
`.replace(/\s+/g," ").trim()}function v0(t){if(!t||typeof t!="string")return[];try{const n=t.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),r=[];for(let i=0;i<n.length-1;i+=2){const o=parseFloat(n[i]),s=parseFloat(n[i+1]);if(isNaN(o)||isNaN(s)){console.warn(`Invalid coordinate pair at index ${i}: "${n[i]}", "${n[i+1]}"`);continue}r.push([o,s])}return n.length%2!==0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${n[n.length-1]}"`),r}catch(e){return console.error("Failed to parse polygon points:",t,e),[]}}function x0(t,e,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),s=pi(e,o);return Qt(e,s),T7(e,t,n),e}function I7(t,e){var n;Qt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function T7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return O7(t,e,r);if(i==="pattern")return n7(t,e,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:s}=Re(t,["fill","stroke"]);Xn(o)&&Zf(t,e,r,"fill"),Xn(s)&&Zf(t,e,r,"stroke");return}}function A7(t,e){var n;const{themeConfig:r}=e,{"font-family":i=El}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var k7=/\s/;function L7(t){for(var e=t.length;e--&&k7.test(t.charAt(e)););return e}var z7=/^\s+/;function H7(t){return t&&t.slice(0,L7(t)+1).replace(z7,"")}var b0=NaN,R7=/^[-+]0x[0-9a-f]+$/i,D7=/^0b[01]+$/i,N7=/^0o[0-7]+$/i,j7=parseInt;function Ul(t){if(typeof t=="number")return t;if(wo(t))return b0;if(an(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=an(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=H7(t);var n=D7.test(t);return n||N7.test(t)?j7(t.slice(2),n?2:8):R7.test(t)?b0:+t}function w0(t){return t}var Zl=Un(sn,"WeakMap"),_0=Object.create,W7=(function(){function t(){}return function(e){if(!an(e))return{};if(_0)return _0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function F7(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function B7(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var V7=800,Y7=16,X7=Date.now;function G7(t){var e=0,n=0;return function(){var r=X7(),i=Y7-(r-n);if(n=r,i>0){if(++e>=V7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function q7(t){return function(){return t}}var Xo=(function(){try{var t=Un(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),U7=Xo?function(t,e){return Xo(t,"toString",{configurable:!0,enumerable:!1,value:q7(e),writable:!0})}:w0,Z7=G7(U7);function K7(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Q7=9007199254740991,J7=/^(?:0|[1-9]\d*)$/;function $0(t,e){var n=typeof t;return e=e==null?Q7:e,!!e&&(n=="number"||n!="symbol"&&J7.test(t))&&t>-1&&t%1==0&&t<e}function Kl(t,e,n){e=="__proto__"&&Xo?Xo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var t9=Object.prototype,e9=t9.hasOwnProperty;function P0(t,e,n){var r=t[e];(!(e9.call(t,e)&&_o(r,n))||n===void 0&&!(e in t))&&Kl(t,e,n)}function n9(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),i?Kl(n,a,l):P0(n,a,l)}return n}var C0=Math.max;function r9(t,e,n){return e=C0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=C0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),F7(t,this,a)}}function i9(t,e){return Z7(r9(t,e,w0),t+"")}var o9=9007199254740991;function O0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=o9}function Go(t){return t!=null&&O0(t.length)&&!hl(t)}function s9(t,e,n){if(!an(n))return!1;var r=typeof e;return(r=="number"?Go(n)&&$0(e,n.length):r=="string"&&e in n)?_o(n[e],t):!1}function a9(t){return i9(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&s9(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var l9=Object.prototype;function Ql(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||l9;return t===n}function c9(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var h9="[object Arguments]";function M0(t){return kn(t)&&Gn(t)==h9}var S0=Object.prototype,d9=S0.hasOwnProperty,u9=S0.propertyIsEnumerable,Jl=M0((function(){return arguments})())?M0:function(t){return kn(t)&&d9.call(t,"callee")&&!u9.call(t,"callee")};function f9(){return!1}var E0=typeof W=="object"&&W&&!W.nodeType&&W,I0=E0&&typeof module=="object"&&module&&!module.nodeType&&module,p9=I0&&I0.exports===E0,T0=p9?sn.Buffer:void 0,g9=T0?T0.isBuffer:void 0,tc=g9||f9,m9="[object Arguments]",y9="[object Array]",v9="[object Boolean]",x9="[object Date]",b9="[object Error]",w9="[object Function]",_9="[object Map]",$9="[object Number]",P9="[object Object]",C9="[object RegExp]",O9="[object Set]",M9="[object String]",S9="[object WeakMap]",E9="[object ArrayBuffer]",I9="[object DataView]",T9="[object Float32Array]",A9="[object Float64Array]",k9="[object Int8Array]",L9="[object Int16Array]",z9="[object Int32Array]",H9="[object Uint8Array]",R9="[object Uint8ClampedArray]",D9="[object Uint16Array]",N9="[object Uint32Array]",re={};re[T9]=re[A9]=re[k9]=re[L9]=re[z9]=re[H9]=re[R9]=re[D9]=re[N9]=!0,re[m9]=re[y9]=re[E9]=re[v9]=re[I9]=re[x9]=re[b9]=re[w9]=re[_9]=re[$9]=re[P9]=re[C9]=re[O9]=re[M9]=re[S9]=!1;function j9(t){return kn(t)&&O0(t.length)&&!!re[Gn(t)]}function ec(t){return function(e){return t(e)}}var A0=typeof W=="object"&&W&&!W.nodeType&&W,xi=A0&&typeof module=="object"&&module&&!module.nodeType&&module,W9=xi&&xi.exports===A0,nc=W9&&yu.process,Lr=(function(){try{var t=xi&&xi.require&&xi.require("util").types;return t||nc&&nc.binding&&nc.binding("util")}catch(e){}})(),k0=Lr&&Lr.isTypedArray,L0=k0?ec(k0):j9,F9=Object.prototype,B9=F9.hasOwnProperty;function z0(t,e){var n=Tn(t),r=!n&&Jl(t),i=!n&&!r&&tc(t),o=!n&&!r&&!i&&L0(t),s=n||r||i||o,a=s?c9(t.length,String):[],l=a.length;for(var c in t)(e||B9.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||$0(c,l)))&&a.push(c);return a}function H0(t,e){return function(n){return t(e(n))}}var V9=H0(Object.keys,Object),Y9=Object.prototype,X9=Y9.hasOwnProperty;function G9(t){if(!Ql(t))return V9(t);var e=[];for(var n in Object(t))X9.call(t,n)&&n!="constructor"&&e.push(n);return e}function q9(t){return Go(t)?z0(t):G9(t)}function U9(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var Z9=Object.prototype,K9=Z9.hasOwnProperty;function Q9(t){if(!an(t))return U9(t);var e=Ql(t),n=[];for(var r in t)r=="constructor"&&(e||!K9.call(t,r))||n.push(r);return n}function R0(t){return Go(t)?z0(t,!0):Q9(t)}function J9(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var D0=H0(Object.getPrototypeOf,Object),t8="[object Object]",e8=Function.prototype,n8=Object.prototype,N0=e8.toString,r8=n8.hasOwnProperty,i8=N0.call(Object);function o8(t){if(!kn(t)||Gn(t)!=t8)return!1;var e=D0(t);if(e===null)return!0;var n=r8.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&N0.call(n)==i8}function s8(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function a8(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Ul(n),n=n===n?n:0),e!==void 0&&(e=Ul(e),e=e===e?e:0),s8(Ul(t),e,n)}function l8(){this.__data__=new vn,this.size=0}function c8(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function h8(t){return this.__data__.get(t)}function d8(t){return this.__data__.has(t)}var u8=200;function f8(t,e){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!li||r.length<u8-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ln(r)}return n.set(t,e),this.size=n.size,this}function er(t){var e=this.__data__=new vn(t);this.size=e.size}er.prototype.clear=l8,er.prototype.delete=c8,er.prototype.get=h8,er.prototype.has=d8,er.prototype.set=f8;var j0=typeof W=="object"&&W&&!W.nodeType&&W,W0=j0&&typeof module=="object"&&module&&!module.nodeType&&module,p8=W0&&W0.exports===j0,F0=p8?sn.Buffer:void 0,B0=F0?F0.allocUnsafe:void 0;function V0(t,e){if(e)return t.slice();var n=t.length,r=B0?B0(n):new t.constructor(n);return t.copy(r),r}function g8(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function m8(){return[]}var y8=Object.prototype,v8=y8.propertyIsEnumerable,Y0=Object.getOwnPropertySymbols,x8=Y0?function(t){return t==null?[]:(t=Object(t),g8(Y0(t),function(e){return v8.call(t,e)}))}:m8;function b8(t,e,n){var r=e(t);return Tn(t)?r:J9(r,n(t))}function w8(t){return b8(t,q9,x8)}var rc=Un(sn,"DataView"),ic=Un(sn,"Promise"),oc=Un(sn,"Set"),X0="[object Map]",_8="[object Object]",G0="[object Promise]",q0="[object Set]",U0="[object WeakMap]",Z0="[object DataView]",$8=qn(rc),P8=qn(li),C8=qn(ic),O8=qn(oc),M8=qn(Zl),wn=Gn;(rc&&wn(new rc(new ArrayBuffer(1)))!=Z0||li&&wn(new li)!=X0||ic&&wn(ic.resolve())!=G0||oc&&wn(new oc)!=q0||Zl&&wn(new Zl)!=U0)&&(wn=function(t){var e=Gn(t),n=e==_8?t.constructor:void 0,r=n?qn(n):"";if(r)switch(r){case $8:return Z0;case P8:return X0;case C8:return G0;case O8:return q0;case M8:return U0}return e});var S8=Object.prototype,E8=S8.hasOwnProperty;function I8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&E8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var K0=sn.Uint8Array;function sc(t){var e=new t.constructor(t.byteLength);return new K0(e).set(new K0(t)),e}function T8(t,e){var n=sc(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var A8=/\w*$/;function k8(t){var e=new t.constructor(t.source,A8.exec(t));return e.lastIndex=t.lastIndex,e}var Q0=An?An.prototype:void 0,J0=Q0?Q0.valueOf:void 0;function L8(t){return J0?Object(J0.call(t)):{}}function tp(t,e){var n=e?sc(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var z8="[object Boolean]",H8="[object Date]",R8="[object Map]",D8="[object Number]",N8="[object RegExp]",j8="[object Set]",W8="[object String]",F8="[object Symbol]",B8="[object ArrayBuffer]",V8="[object DataView]",Y8="[object Float32Array]",X8="[object Float64Array]",G8="[object Int8Array]",q8="[object Int16Array]",U8="[object Int32Array]",Z8="[object Uint8Array]",K8="[object Uint8ClampedArray]",Q8="[object Uint16Array]",J8="[object Uint32Array]";function t$(t,e,n){var r=t.constructor;switch(e){case B8:return sc(t);case z8:case H8:return new r(+t);case V8:return T8(t);case Y8:case X8:case G8:case q8:case U8:case Z8:case K8:case Q8:case J8:return tp(t,n);case R8:return new r;case D8:case W8:return new r(t);case N8:return k8(t);case j8:return new r;case F8:return L8(t)}}function ep(t){return typeof t.constructor=="function"&&!Ql(t)?W7(D0(t)):{}}var e$="[object Map]";function n$(t){return kn(t)&&wn(t)==e$}var np=Lr&&Lr.isMap,r$=np?ec(np):n$,i$="[object Set]";function o$(t){return kn(t)&&wn(t)==i$}var rp=Lr&&Lr.isSet,s$=rp?ec(rp):o$,a$=1,ip="[object Arguments]",l$="[object Array]",c$="[object Boolean]",h$="[object Date]",d$="[object Error]",op="[object Function]",u$="[object GeneratorFunction]",f$="[object Map]",p$="[object Number]",sp="[object Object]",g$="[object RegExp]",m$="[object Set]",y$="[object String]",v$="[object Symbol]",x$="[object WeakMap]",b$="[object ArrayBuffer]",w$="[object DataView]",_$="[object Float32Array]",$$="[object Float64Array]",P$="[object Int8Array]",C$="[object Int16Array]",O$="[object Int32Array]",M$="[object Uint8Array]",S$="[object Uint8ClampedArray]",E$="[object Uint16Array]",I$="[object Uint32Array]",te={};te[ip]=te[l$]=te[b$]=te[w$]=te[c$]=te[h$]=te[_$]=te[$$]=te[P$]=te[C$]=te[O$]=te[f$]=te[p$]=te[sp]=te[g$]=te[m$]=te[y$]=te[v$]=te[M$]=te[S$]=te[E$]=te[I$]=!0,te[d$]=te[op]=te[x$]=!1;function qo(t,e,n,r,i,o){var s,a=e&a$;if(s!==void 0)return s;if(!an(t))return t;var l=Tn(t);if(l)s=I8(t);else{var c=wn(t),h=c==op||c==u$;if(tc(t))return V0(t,a);if(c==sp||c==ip||h&&!i)s=h?{}:ep(t);else{if(!te[c])return i?t:{};s=t$(t,c,a)}}o||(o=new er);var u=o.get(t);if(u)return u;o.set(t,s),s$(t)?t.forEach(function(g){s.add(qo(g,e,n,g,t,o))}):r$(t)&&t.forEach(function(g,y){s.set(y,qo(g,e,n,y,t,o))});var f=w8,p=l?void 0:f(t);return K7(p||t,function(g,y){p&&(y=g,g=t[y]),P0(s,y,qo(g,e,n,y,t,o))}),s}var T$=1,A$=4;function ap(t){return qo(t,T$|A$)}function k$(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return e}}var L$=k$();function ac(t,e,n){(n!==void 0&&!_o(t[e],n)||n===void 0&&!(e in t))&&Kl(t,e,n)}function z$(t){return kn(t)&&Go(t)}function lc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function H$(t){return n9(t,R0(t))}function R$(t,e,n,r,i,o,s){var a=lc(t,n),l=lc(e,n),c=s.get(l);if(c){ac(t,n,c);return}var h=o?o(a,l,n+"",t,e,s):void 0,u=h===void 0;if(u){var f=Tn(l),p=!f&&tc(l),g=!f&&!p&&L0(l);h=l,f||p||g?Tn(a)?h=a:z$(a)?h=B7(a):p?(u=!1,h=V0(l,!0)):g?(u=!1,h=tp(l,!0)):h=[]:o8(l)||Jl(l)?(h=a,Jl(a)?h=H$(a):(!an(a)||hl(a))&&(h=ep(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),ac(t,n,h)}function lp(t,e,n,r,i){t!==e&&L$(e,function(o,s){if(i||(i=new er),an(o))R$(t,e,s,n,lp,r,i);else{var a=r?r(lc(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),ac(t,s,a)}},R0)}var D$=Zu(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),cp=a9(function(t,e,n){lp(t,e,n)});function cc(t,e,n={}){if(!e)return null;const r=t,i=pi(r,n);Qt(r,i);const o=W$(e,r);for(const s in r.dataset)o.setAttribute(`data-${D$(s)}`,r.dataset[s]);return o}function N$(t,e,n){var r,i;const o=e.nodeName==="text"?e:null;if(!o)return null;const{data:s,themeConfig:a}=n,l=bf(e.dataset.indexes||"0"),c=String(Pu(hi(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=pi(o,h);return cc(e,e.textContent||c,u)}function j$(t,e){var n;const r=((n=e.themeConfig.base)==null?void 0:n.text)||{};Qt(t,r),r["font-family"]&&t.setAttribute("font-family",Qn(r["font-family"])),t.style.userSelect="none",t.style.pointerEvents="none"}const Uo=(t,e)=>t?parseFloat(t):e;function W$(t,e){const n=Uo(e.dataset.x,0),r=Uo(e.dataset.y,0),i=Uo(e.getAttribute("width")),o=Uo(e.getAttribute("height")),s=F$(e);return Object.assign(s,{x:n,y:r,width:i,height:o,"data-horizontal-align":e.dataset.horizontalAlign||"LEFT","data-vertical-align":e.dataset.verticalAlign||"TOP"}),L6(t,s)}function F$(t){return Re(t,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}const nr=(t,e)=>{t!==e&&(e?t.replaceWith(e):t.remove())};class B${constructor(e,n){this.options=e,this.template=n,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const e=this.getSVG();if(this.rendered)return e;V$(e,this.options),e.style.visibility="hidden";const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(G$(this.template,this.options),t_(this.template),n.disconnect(),e.style.visibility="")})})});return n.observe(document,{childList:!0,subtree:!0}),this.rendered=!0,e}}function V$(t,e){Y$(t,e),X$(t,e);const{themeConfig:n}=e;n_(t,n==null?void 0:n.colorBg)}function Y$(t,e){var n;const{themeConfig:r,data:i}=e;r_(t,(n=r.base)==null?void 0:n.global),t.querySelectorAll("[data-element-type]").forEach(s=>{var a,l,c,h;const u=s.id||"";if(N6(s)){const f=cc(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return nr(s,f)}if(j6(s)){const f=cc(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return nr(s,f)}if(B6(s)){const f=Nf(t,s,(c=i.illus)==null?void 0:c[u]);return nr(s,f)}if(F6(s))return Array.from(s.children).forEach(f=>{x0(t,f,e)});if(W6(s)){const f=x0(t,s,e);return nr(s,f)}if(K6(s))return i_(t,s);if((h=s.dataset.elementType)!=null&&h.startsWith("item-")){const f=bf(s.dataset.indexes||"0"),p=s.dataset.elementType.replace("item-",""),g=hi(i,f);if(X6(s)||G6(s)||q6(s)){const y=N$(p,s,e);return nr(s,y)}if(!g)return;if(U6(s)){const y=v_(t,s,g);return nr(s,y)}if(xl(s)){const y=u_(t,s,g,e);return nr(s,y)}}if(V6(s))return j$(s,e);if(!Y6(s))return I7(s,e)}),A7(t,e)}function X$(t,e){const{width:n,height:r}=e,{style:i={},attributes:o={},id:s,className:a}=e.svg||{};s&&(t.id=s),a&&t.classList.add(a),n!==void 0&&t.setAttribute("width",typeof n=="number"?`${n}px`:n),r!==void 0&&t.setAttribute("height",typeof r=="number"?`${r}px`:r),Object.assign(t.style,i),Qt(t,o)}function G$(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&hp(t,rr(n))}const hc=!!(typeof process!="undefined"&&process.versions&&process.versions.node);hc&&Ww(Xw);const dc=!hc&&typeof window!="undefined"&&typeof document!="undefined";let Zo=null,ke=null;function q$(){return dc?Zo||(Zo=document.createElement("canvas").getContext("2d"),Zo):null}function U$(){return!dc||!document.body?null:ke||(ke=document.createElement("span"),ke.style.position="absolute",ke.style.top="-10000px",ke.style.left="-10000px",ke.style.visibility="hidden",ke.style.pointerEvents="none",ke.style.whiteSpace="pre",ke.style.display="inline-block",ke.style.padding="0",ke.style.margin="0",document.body.appendChild(ke),ke)}function Z$(t,e){if(e==null)return t*1.4;if(typeof e=="string"){const n=e.trim();if(n.endsWith("px")){const r=Number.parseFloat(n);return Number.isFinite(r)?r:t*1.4}e=Number(n)}return typeof e!="number"||!Number.isFinite(e)?t*1.4:e>4?e:e*t}function K$(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Qn(e),a=r||"normal",l=Z$(n,i),c=q$();if(c)return c.font=`${a} ${n}px ${s}`,{width:o.reduce((p,g)=>{const y=c.measureText(g);return Math.max(p,y.width)},0),height:l*Math.max(o.length,1)};const h=U$();if(!h)return null;h.style.fontFamily=s,h.style.fontSize=`${n}px`,h.style.fontWeight=String(a),h.style.lineHeight=`${l}px`,h.textContent=t;const u=h.getBoundingClientRect();return{width:u.width,height:u.height}}function Q$(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=El,fontSize:i=14,fontWeight:o="normal",lineHeight:s=1.4}=e,a=t.toString(),l={fontFamily:r,fontSize:parseFloat(i.toString()),fontWeight:o,lineHeight:s},c=()=>Yw(a,l),h=dc&&(n=K$(a,l))!=null?n:c();return{width:Math.ceil(h.width*1.01),height:Math.ceil(h.height*1.01)}}function uc(t){const e=t.getAttribute("viewBox");if(e){const[s,a,l,c]=e.split(" ").map(Number);return{x:s,y:a,width:l,height:c}}const n=t.getAttribute("width"),r=t.getAttribute("height"),i=Number(n)||0,o=Number(r)||0;return{x:0,y:0,width:i,height:o}}function rr(t){return t?typeof t=="number"?[t,t,t,t]:t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:t.length===4?[t[0],t[1],t[2],t[3]]:[0,0,0,0]:[0,0,0,0]}function hp(t,e){if(hc)J$(t,e);else if(document.contains(t))dp(t,e);else{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&(tP(t,()=>{dp(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}}function J$(t,e){const n=uc(t),[r,i,o,s]=e;Qt(t,{viewBox:`${n.x-s} ${n.y-r} ${n.width+s+i} ${n.height+r+o}`})}function dp(t,e){const n=t.getBBox(),r=t.getBoundingClientRect(),i=r.width>0?n.width/r.width:1,o=r.height>0?n.height/r.height:1,[s,a,l,c]=e,h=s*o,u=a*i,f=l*o,p=c*i,g=n.x-p,y=n.y-h,m=n.width+p+u,x=n.height+h+f;Qt(t,{viewBox:`${g} ${y} ${m} ${x}`})}function tP(t,e){requestAnimationFrame(()=>{const n=()=>{const r=t.getBoundingClientRect();r.width>0&&r.height>0?e():requestAnimationFrame(n)};n()})}function ln(t,e){if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=e,document.head.appendChild(n)}function eP(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var nP=Object.defineProperty,rP=Object.defineProperties,iP=Object.getOwnPropertyDescriptors,Ko=Object.getOwnPropertySymbols,up=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,pp=(t,e,n)=>e in t?nP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e)=>{for(var n in e||(e={}))up.call(e,n)&&pp(t,n,e[n]);if(Ko)for(var n of Ko(e))fp.call(e,n)&&pp(t,n,e[n]);return t},fc=(t,e)=>rP(t,iP(e)),oP=(t,e)=>{var n={};for(var r in t)up.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ko)for(var r of Ko(t))e.indexOf(r)<0&&fp.call(t,r)&&(n[r]=t[r]);return n};function Mt(t){const e=t,{id:n,x:r=0,y:i=0,width:o,height:s,alignHorizontal:a="left",alignVertical:l="top",children:c,fontSize:h=14,fontFamily:u,fontStyle:f,fontWeight:p,textDecoration:g,letterSpacing:y,wordSpacing:m,opacity:x,fill:v="black",lineHeight:b,wordWrap:w,backgroundColor:_="none",backgroundOpacity:$=1,backgroundRadius:P=0}=e,C=oP(e,["id","x","y","width","height","alignHorizontal","alignVertical","children","fontSize","fontFamily","fontStyle","fontWeight","textDecoration","letterSpacing","wordSpacing","opacity","fill","lineHeight","wordWrap","backgroundColor","backgroundOpacity","backgroundRadius"]);let A=o,E=s,S=0,R=0;if(!A||!E){const j=Q$(c,t);A||(A=j.width),E||(E=j.height)}o&&(S=a==="center"?A/2:a==="right"?A:0),s&&(R=l==="middle"?E/2:l==="bottom"?E:0);const O=Object.entries(Se(Se({width:A,height:E},b!==void 0&&{"line-height":b}),w!==void 0&&{"data-word-wrap":w})).reduce((j,[X,z])=>fc(Se({},j),{[X]:z}),{}),L=Se(Se(Se(Se(Se(Se(Se(Se(Se({"data-element-type":"text",width:A,height:E,x:S,y:R,"data-x":0,"data-y":0,fill:v,fontSize:h,textAnchor:a==="center"?"middle":a==="right"?"end":"start",dominantBaseline:l==="middle"?"central":l==="bottom"?"baseline":"hanging","data-horizontal-align":a.toUpperCase(),"data-vertical-align":l.toUpperCase(),children:c},O),C),u&&{fontFamily:u}),f&&{fontStyle:f}),p&&{fontWeight:p}),g&&g!=="none"&&{textDecoration:g}),y&&{letterSpacing:y}),m&&{wordSpacing:m}),x!==void 0&&x!==1&&{opacity:x}),D=Se(fc(Se({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:A,height:E}),n&&{id:n}),N=_&&_!=="none"?{"data-element-type":"shape",x:0,y:0,width:A,height:E,fill:_,fillOpacity:$,rx:P,ry:P}:void 0;return{type:"g",props:fc(Se({},D),{children:[...N?[{type:"rect",props:N}]:[],{type:"text",props:L}]})}}const bi=Symbol.for("@antv/infographic/Fragment");function Qo(t,e={}){return{type:t,props:e}}function sP(t={}){return Qo(bi,t)}const aP=Qo,lP=Qo;function cP(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===bi}function gp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function wi(t){return _i(t).filter(gp)}function _i(t,e=[]){var n;if(!t||typeof t=="boolean")return e;if(Array.isArray(t))t.forEach(r=>_i(r,e));else if(cP(t)){const r=(n=t.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{_i(i,e)})}else e.push(t);return e}function qt(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}const Jo=()=>({x:0,y:0,width:0,height:0});function zr(t){if(!t||t.length===0)return Jo();let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t){const{x:s,y:a,width:l,height:c}=o,h=s+l,u=a+c;s<e&&(e=s),a<n&&(n=a),h>r&&(r=h),u>i&&(i=u)}return e===1/0||n===1/0||r===-1/0||i===-1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:Math.max(0,r-e),height:Math.max(0,i-n)}}function et(t){var e,n,r,i;if(!t)return Jo();if(Array.isArray(t)){const p=wi(t);return ir(p)}if(typeof t!="object")return Jo();const{type:o,props:s={}}=t;if(xc(t)){const p=_p(t);return et(p)}if(typeof o=="function"){const p=(e=s.x)!=null?e:0,g=(n=s.y)!=null?n:0,y=s.width,m=s.height;if(qt(y)&&qt(m))return{x:p,y:g,width:y,height:m};const x=o(s);if(!x)return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0};if(Array.isArray(x)){const v=wi(x),b=ir(v);if(qt(y)&&qt(m))return{x:p,y:g,width:y,height:m};const w=b.width!==0?b.width:y!=null?y:0,_=b.height!==0?b.height:m!=null?m:0;return{x:p+b.x,y:g+b.y,width:w,height:_}}if(gp(x)){const v=x,b=et(v);if(hP(v,s))return b;const w=v.props&&qt(v.props.width)&&qt(v.props.height),P=mp(v).flatMap(S=>wi(S)).length>0,C=v.props&&v.props.x===s.x&&v.props.y===s.y;if(w)return{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:b.width,height:b.height};if(qt(y)&&qt(m))return P?{x:C?b.x:p,y:C?b.y:g,width:y,height:m}:{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:y,height:m};const A=b.width!==0?b.width:y!=null?y:0,E=b.height!==0?b.height:m!=null?m:0;return{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:A,height:E}}return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0}}const a=(r=s.x)!=null?r:0,l=(i=s.y)!=null?i:0,c=qt(s.width)?s.width:void 0,h=qt(s.height)?s.height:void 0;if(qt(c)&&qt(h))return{x:a,y:l,width:c,height:h};const f=mp(t).flatMap(p=>wi(p));if(f.length>0){const p=ir(f);return{x:a+p.x,y:l+p.y,width:qt(c)?c:p.width,height:qt(h)?h:p.height}}return{x:a,y:l,width:c!=null?c:0,height:h!=null?h:0}}function ir(t){if(!t||!Array.isArray(t)||t.length===0)return Jo();const e=[];for(const n of t){const r=wi(n);for(const i of r){const o=et(i);o&&e.push(o)}}return zr(e)}function hP(t,e){if(!(t!=null&&t.props)||!e)return!1;const n=t.props;if(qt(n.x)&&qt(n.y)&&qt(e.x)&&qt(e.y)&&n.x===e.x&&n.y===e.y){const r=qt(n.width)&&qt(n.height),i=qt(e.width)&&qt(e.height);if(!r&&!i)return!0}return qt(n.x)&&qt(n.y)&&qt(n.width)&&qt(n.height)&&qt(e.x)&&qt(e.y)&&qt(e.width)&&qt(e.height)?n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height:!1}function mp(t){var e;const n=(e=t.props)==null?void 0:e.children;return n?Array.isArray(n)?n:[n]:[]}function pc(t){var e;return t==null||typeof t=="boolean"?[]:Array.isArray(t)?_i(t):typeof t=="object"?_i((e=t.props)==null?void 0:e.children):[t]}var dP=Object.defineProperty,ts=Object.getOwnPropertySymbols,yp=Object.prototype.hasOwnProperty,vp=Object.prototype.propertyIsEnumerable,xp=(t,e,n)=>e in t?dP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gc=(t,e)=>{for(var n in e||(e={}))yp.call(e,n)&&xp(t,n,e[n]);if(ts)for(var n of ts(e))vp.call(e,n)&&xp(t,n,e[n]);return t},uP=(t,e)=>{var n={};for(var r in t)yp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ts)for(var r of ts(t))e.indexOf(r)<0&&vp.call(t,r)&&(n[r]=t[r]);return n};const Rn=(t,e)=>{const n=t,{type:r,props:i}=n,o=uP(n,["type","props"]);return gc({type:r,props:gc(gc({},i),e)},o)},bp=()=>({defs:new Map});function mc(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(t).replace(/[&<>"']/g,n=>e[n])}const wp={className:"class",viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",clipPathUnits:"clipPathUnits",primitiveUnits:"primitiveUnits",filterUnits:"filterUnits",markerUnits:"markerUnits",markerWidth:"markerWidth",markerHeight:"markerHeight",refX:"refX",refY:"refY",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink",xlinkHref:"href",xlinkTitle:"xlink:title",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",textLength:"textLength",lengthAdjust:"lengthAdjust",repeatCount:"repeatCount",repeatDur:"repeatDur",calcMode:"calcMode",keyTimes:"keyTimes",keySplines:"keySplines",keyPoints:"keyPoints",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",pathLength:"pathLength",systemLanguage:"systemLanguage",requiredFeatures:"requiredFeatures",requiredExtensions:"requiredExtensions"};function fP(t){return wp[t]?wp[t]:t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const yc=new Map;function vc(t){const e=Symbol("layout");return yc.set(e,t),r=>({type:e,props:r})}function xc(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)&&typeof t.type=="symbol"&&yc.has(t.type)}function _p(t,e=bp()){const n=yc.get(t.type);if(!n)return console.warn("Layout function not found for symbol:",t.type),t;const r=pc(t).filter(i=>typeof i=="object");return n(r,t.props,e)}var pP=Object.defineProperty,gP=Object.defineProperties,mP=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,$p=Object.prototype.hasOwnProperty,Pp=Object.prototype.propertyIsEnumerable,Cp=(t,e,n)=>e in t?pP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yP=(t,e)=>{for(var n in e||(e={}))$p.call(e,n)&&Cp(t,n,e[n]);if(es)for(var n of es(e))Pp.call(e,n)&&Cp(t,n,e[n]);return t},vP=(t,e)=>gP(t,mP(e)),Op=(t,e)=>{var n={};for(var r in t)$p.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&es)for(var r of es(t))e.indexOf(r)<0&&Pp.call(t,r)&&(n[r]=t[r]);return n};function $i(t,e){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t.map(r=>$i(r,e)).filter(Boolean);if(xc(t)){const r=_p(t,e);return $i(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return $i(r,e)}const n=pc(t).map(r=>$i(r,e)).filter(Boolean);return t.type===bi?n:t.type===$a?(n.forEach(r=>{typeof r=="object"&&r.props.id&&e.defs.set(r.props.id,r)}),null):n.length?Rn(t,{children:n}):t}function Pi(t,e){if(t==null)return"";if(typeof t=="string")return mc(t);if(typeof t=="number")return String(t);const{type:n,props:r}=t;if(!n)return"";const i=pc(t);if(n===bi)return i.map(l=>Pi(l)).filter(Boolean).join("");if(n===$a)return"";if(typeof n=="function"||xc(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=Sp(r),s=i.map(l=>Pi(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function Mp(t,e={}){const n=bp(),r=$i(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>Pi(m)).join(""):Pi(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=Op(o,["x","y","width","height","style"]),f=vP(yP({},u),{xmlns:"http://www.w3.org/2000/svg"});if(!f.viewBox)if(l&&c)f.viewBox=`${s!=null?s:0} ${a!=null?a:0} ${l!=null?l:0} ${c!=null?c:0}`;else{const m=et(r);if(m){const{x,y:v,width:b,height:w}=m;f.viewBox=`${x} ${v} ${b} ${w}`}}const p=Sp(f),g=xP(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>Pi(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function Sp(t){if(!t)return"";const e=t,{children:n}=e,r=Op(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=fP(i),a=typeof o=="string"?mc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function xP(t){if(!t||Object.keys(t).length===0)return"";const e=Object.entries(t).map(([n,r])=>`${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}: ${r};`).join("");return` style="${mc(e)}"`}var bP=Object.defineProperty,ns=Object.getOwnPropertySymbols,Ep=Object.prototype.hasOwnProperty,Ip=Object.prototype.propertyIsEnumerable,Tp=(t,e,n)=>e in t?bP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rs=(t,e)=>{for(var n in e||(e={}))Ep.call(e,n)&&Tp(t,n,e[n]);if(ns)for(var n of ns(e))Ip.call(e,n)&&Tp(t,n,e[n]);return t},Ap=(t,e)=>{var n={};for(var r in t)Ep.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ns)for(var r of ns(t))e.indexOf(r)<0&&Ip.call(t,r)&&(n[r]=t[r]);return n};const q=t=>{const e=t,{indexes:n}=e,r=Ap(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnAdd};return d(Ct,rs(rs({},i),r))},Xt=t=>{const e=t,{indexes:n}=e,r=Ap(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnRemove};return d(Ct,rs(rs({},i),r))};var wP=Object.defineProperty,_P=Object.defineProperties,$P=Object.getOwnPropertyDescriptors,kp=Object.getOwnPropertySymbols,PP=Object.prototype.hasOwnProperty,CP=Object.prototype.propertyIsEnumerable,Lp=(t,e,n)=>e in t?wP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OP=(t,e)=>{for(var n in e||(e={}))PP.call(e,n)&&Lp(t,n,e[n]);if(kp)for(var n of kp(e))CP.call(e,n)&&Lp(t,n,e[n]);return t},MP=(t,e)=>_P(t,$P(e));const Et=t=>d(V,MP(OP({"data-element-type":zt.BtnsGroup,width:0,height:0},t),{display:"none"})),ie=()=>d(Bt,{});var SP=Object.defineProperty,is=Object.getOwnPropertySymbols,zp=Object.prototype.hasOwnProperty,Hp=Object.prototype.propertyIsEnumerable,Rp=(t,e,n)=>e in t?SP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bc=(t,e)=>{for(var n in e||(e={}))zp.call(e,n)&&Rp(t,n,e[n]);if(is)for(var n of is(e))Hp.call(e,n)&&Rp(t,n,e[n]);return t},EP=(t,e)=>{var n={};for(var r in t)zp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&is)for(var r of is(t))e.indexOf(r)<0&&Hp.call(t,r)&&(n[r]=t[r]);return n};const Dp=t=>{var e=t,{indexes:n}=e,r=EP(e,["indexes"]);const o=bc(bc({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=zt.ItemIllus):o["data-element-type"]=zt.Illus,d(Ct,bc({},o))};var IP=Object.defineProperty,TP=Object.defineProperties,AP=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertySymbols,Np=Object.prototype.hasOwnProperty,jp=Object.prototype.propertyIsEnumerable,Wp=(t,e,n)=>e in t?IP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fp=(t,e)=>{for(var n in e||(e={}))Np.call(e,n)&&Wp(t,n,e[n]);if(os)for(var n of os(e))jp.call(e,n)&&Wp(t,n,e[n]);return t},kP=(t,e)=>TP(t,AP(e)),LP=(t,e)=>{var n={};for(var r in t)Np.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&os)for(var r of os(t))e.indexOf(r)<0&&jp.call(t,r)&&(n[r]=t[r]);return n};const Jt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=LP(e,["indexes","lineNumber","children"]),s;if(!i)return null;const a=Fp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i},o);return(s=a.height)!=null||(a.height=Math.ceil(r*+a.lineHeight*+a.fontSize)),d(Mt,kP(Fp({},a),{"data-indexes":n,"data-element-type":zt.ItemDesc}))};var zP=Object.defineProperty,HP=Object.defineProperties,RP=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertySymbols,Bp=Object.prototype.hasOwnProperty,Vp=Object.prototype.propertyIsEnumerable,Yp=(t,e,n)=>e in t?zP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ci=(t,e)=>{for(var n in e||(e={}))Bp.call(e,n)&&Yp(t,n,e[n]);if(ss)for(var n of ss(e))Vp.call(e,n)&&Yp(t,n,e[n]);return t},as=(t,e)=>HP(t,RP(e)),Xp=(t,e)=>{var n={};for(var r in t)Bp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ss)for(var r of ss(t))e.indexOf(r)<0&&Vp.call(t,r)&&(n[r]=t[r]);return n};const Ce=t=>{const e=t,{indexes:n,size:r=32}=e,i=Xp(e,["indexes","size"]),o=Ci({fill:"lightgray",width:r,height:r},i);return d(Ct,as(Ci({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},or=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=Xp(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=as(Ci({fill:o},s),{x:l,y:l,width:a,height:a});return I(V,as(Ci({},s),{width:r,height:r,"data-element-type":zt.ItemIconGroup,children:[d(Wt,{width:r,height:r,fill:i,"data-element-type":"shape"}),d(Ct,as(Ci({},c),{"data-indexes":n,"data-element-type":zt.ItemIcon}))]}))};var DP=Object.defineProperty,NP=Object.defineProperties,jP=Object.getOwnPropertyDescriptors,ls=Object.getOwnPropertySymbols,Gp=Object.prototype.hasOwnProperty,qp=Object.prototype.propertyIsEnumerable,Up=(t,e,n)=>e in t?DP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zp=(t,e)=>{for(var n in e||(e={}))Gp.call(e,n)&&Up(t,n,e[n]);if(ls)for(var n of ls(e))qp.call(e,n)&&Up(t,n,e[n]);return t},WP=(t,e)=>NP(t,jP(e)),FP=(t,e)=>{var n={};for(var r in t)Gp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ls)for(var r of ls(t))e.indexOf(r)<0&&qp.call(t,r)&&(n[r]=t[r]);return n};const It=t=>{var e=t,{indexes:n,children:r}=e,i=FP(e,["indexes","children"]),o;const s=Zp({fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:r},i);return(o=s.height)!=null||(s.height=Math.ceil(+s.lineHeight*+s.fontSize)),d(Mt,WP(Zp({},s),{"data-indexes":n,"data-element-type":zt.ItemLabel}))};var BP=Object.defineProperty,Kp=Object.getOwnPropertySymbols,VP=Object.prototype.hasOwnProperty,YP=Object.prototype.propertyIsEnumerable,Qp=(t,e,n)=>e in t?BP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XP=(t,e)=>{for(var n in e||(e={}))VP.call(e,n)&&Qp(t,n,e[n]);if(Kp)for(var n of Kp(e))YP.call(e,n)&&Qp(t,n,e[n]);return t};const St=t=>d(V,XP({"data-element-type":zt.ItemsGroup},t));var GP=Object.defineProperty,qP=Object.defineProperties,UP=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,Jp=Object.prototype.hasOwnProperty,tg=Object.prototype.propertyIsEnumerable,eg=(t,e,n)=>e in t?GP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ng=(t,e)=>{for(var n in e||(e={}))Jp.call(e,n)&&eg(t,n,e[n]);if(cs)for(var n of cs(e))tg.call(e,n)&&eg(t,n,e[n]);return t},ZP=(t,e)=>qP(t,UP(e)),KP=(t,e)=>{var n={};for(var r in t)Jp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&cs)for(var r of cs(t))e.indexOf(r)<0&&tg.call(t,r)&&(n[r]=t[r]);return n};const Oi=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=KP(e,["indexes","value","formatter"]),s;const a=ng({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i(r),"data-value":r},o);return(s=a.height)!=null||(a.height=Math.ceil(+a.lineHeight*+a.fontSize)),d(Mt,ZP(ng({},a),{"data-indexes":n,"data-element-type":zt.ItemValue}))};var QP=Object.defineProperty,rg=Object.getOwnPropertySymbols,JP=Object.prototype.hasOwnProperty,tC=Object.prototype.propertyIsEnumerable,ig=(t,e,n)=>e in t?QP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eC=(t,e)=>{for(var n in e||(e={}))JP.call(e,n)&&ig(t,n,e[n]);if(rg)for(var n of rg(e))tC.call(e,n)&&ig(t,n,e[n]);return t};const le=t=>d(V,eC({"data-element-type":"shapes-group"},t));var nC=Object.defineProperty,rC=Object.defineProperties,iC=Object.getOwnPropertyDescriptors,hs=Object.getOwnPropertySymbols,og=Object.prototype.hasOwnProperty,sg=Object.prototype.propertyIsEnumerable,ag=(t,e,n)=>e in t?nC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ds=(t,e)=>{for(var n in e||(e={}))og.call(e,n)&&ag(t,n,e[n]);if(hs)for(var n of hs(e))sg.call(e,n)&&ag(t,n,e[n]);return t},lg=(t,e)=>rC(t,iC(e)),oC=(t,e)=>{var n={};for(var r in t)og.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&hs)for(var r of hs(t))e.indexOf(r)<0&&sg.call(t,r)&&(n[r]=t[r]);return n};const Mi=vc((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=oC(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(V,ds({},o));const h=t.map(v=>et(v)),u=ir(t),f=(s=o.x)!=null?s:u.x,p=(a=o.y)!=null?a:u.y,g=(l=o.width)!=null?l:u.width,y=(c=o.height)!=null?c:u.height,m=t.map((v,b)=>{const w=h[b],_=ds({},v.props);if(r!==void 0)switch(r){case"left":_.x=-w.x;break;case"center":_.x=(g-w.width)/2-w.x;break;case"right":_.x=g-w.width-w.x;break}else _.x===void 0&&(_.x=w.x-f);if(i!==void 0)switch(i){case"top":_.y=-w.y;break;case"middle":_.y=(y-w.height)/2-w.y;break;case"bottom":_.y=y-w.height-w.y;break}else _.y===void 0&&(_.y=w.y-p);return Rn(v,_)}),x=lg(ds({},o),{x:f,y:p,width:g,height:y});return d(V,lg(ds({},x),{children:m}))});var sC=Object.defineProperty,aC=Object.defineProperties,lC=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,cg=Object.prototype.hasOwnProperty,hg=Object.prototype.propertyIsEnumerable,dg=(t,e,n)=>e in t?sC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sr=(t,e)=>{for(var n in e||(e={}))cg.call(e,n)&&dg(t,n,e[n]);if(us)for(var n of us(e))hg.call(e,n)&&dg(t,n,e[n]);return t},ug=(t,e)=>aC(t,lC(e)),cC=(t,e)=>{var n={};for(var r in t)cg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&us)for(var r of us(t))e.indexOf(r)<0&&hg.call(t,r)&&(n[r]=t[r]);return n};const dt=vc((t,e)=>{var n=e,{flexDirection:r="row",justifyContent:i="flex-start",alignItems:o="flex-start",alignContent:s="flex-start",flexWrap:a="nowrap",gap:l=0}=n,c=cC(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(V,sr({},c));const m=r==="row"||r==="row-reverse",x=r==="row-reverse"||r==="column-reverse",v=t.map(O=>et(O)),b=ir(t),w=(h=c.width)!=null?h:b.width,_=(u=c.height)!=null?u:b.height,$=c.width!==void 0&&c.height!==void 0,P=[];if(a==="wrap"&&$){let O=[],T=[],F=0;for(let L=0;L<t.length;L++){const D=t[L],k=v[L],N=m?k.width:k.height,j=m?w:_;O.length===0||F+l+N<=j?(O.push(D),T.push(k),F+=(O.length>1?l:0)+N):(P.push({children:O,bounds:T}),O=[D],T=[k],F=N)}O.length>0&&P.push({children:O,bounds:T})}else P.push({children:t,bounds:v});const C=[];let A=0;const E=[];if(P.forEach(O=>{const{children:T,bounds:F}=O,L=F.reduce((z,M,H)=>{const B=m?M.width:M.height;return z+B+(H>0?l:0)},0),D=Math.max(...F.map(z=>m?z.height:z.width));E.push(D);let k=0;const N=(m?w:_)-L;if($)switch(i){case"flex-end":k=N;break;case"center":k=N/2;break;case"space-between":k=0;break;default:k=0;break}let j=l;$&&i==="space-between"&&T.length>1&&(j=N/(T.length-1)+l);let X=k;T.forEach((z,M)=>{const H=F[M],B=m?H.width:H.height,U=m?H.height:H.width,Y=m?H.x:H.y,G=m?H.y:H.x;let Z=A;if($)switch(o){case"flex-end":Z=A+D-U;break;case"center":Z=A+(D-U)/2;break;default:Z=A;break}let K,it;m?(K=x?w-X-B-Y:X-Y,it=Z-G):(K=Z-G,it=x?_-X-B-Y:X-Y);const Q=Rn(z,{x:K,y:it});C.push(Q),X+=B+j}),A+=D+l}),P.length>1&&$){const O=E.reduce((L,D)=>L+D,0)+(P.length-1)*l,T=(m?_:w)-O;let F=0;switch(s){case"flex-end":F=T;break;case"center":F=T/2;break;case"space-between":if(P.length>1){const L=T/(P.length-1);let D=0;P.forEach((k,N)=>{const j=P.slice(0,N).reduce((z,M)=>z+M.children.length,0),X=j+k.children.length;for(let z=j;z<X;z++){const M=C[z],H=sr({},M.props);m?H.y=(H.y||0)+D:H.x=(H.x||0)+D,C[z]=Rn(M,H)}D+=E[N]+l+(N<P.length-1?L:0)});break}break;default:F=0;break}F!==0&&s!=="space-between"&&C.forEach((L,D)=>{const k=sr({},L.props);m?k.y=(k.y||0)+F:k.x=(k.x||0)+F,C[D]=Rn(L,k)})}if(!$&&o==="center")if(m){const O=Math.max(...v.map(T=>T.height));C.forEach((T,F)=>{const L=v[F],D=(O-L.height)/2,k=sr({},T.props);k.y=(k.y||0)+D,C[F]=Rn(T,k)})}else{const O=Math.max(...v.map(T=>T.width));C.forEach((T,F)=>{const L=v[F],D=(O-L.width)/2,k=sr({},T.props);k.x=(k.x||0)+D,C[F]=Rn(T,k)})}const S=ir(C),R=ug(sr({},c),{x:(f=c.x)!=null?f:b.x,y:(p=c.y)!=null?p:b.y,width:(g=c.width)!=null?g:S.width,height:(y=c.height)!=null?y:S.height});return d(V,ug(sr({},R),{children:C}))});var hC=Object.defineProperty,dC=Object.defineProperties,uC=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,fC=Object.prototype.hasOwnProperty,pC=Object.prototype.propertyIsEnumerable,pg=(t,e,n)=>e in t?hC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fs=(t,e)=>{for(var n in e||(e={}))fC.call(e,n)&&pg(t,n,e[n]);if(fg)for(var n of fg(e))pC.call(e,n)&&pg(t,n,e[n]);return t},gg=(t,e)=>dC(t,uC(e));const mg=t=>{const{x:e=0,y:n=0,alignHorizontal:r="center",title:i,desc:o,descLineNumber:s=2,themeColors:a}=t,l=h=>{const u={fontSize:24,fill:a.colorPrimaryText,lineHeight:1.4,alignHorizontal:r};return d(Mt,gg(fs(fs({},u),h),{"data-element-type":"title",children:i}))},c=h=>{const u={fontSize:16,fill:a.colorTextSecondary,alignHorizontal:r,lineHeight:1.4,height:s*24};return d(Mt,gg(fs(fs({},u),h),{"data-element-type":"desc",children:o}))};return!i&&!o?null:I(dt,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:e,y:n,gap:8,children:[i&&d(l,{}),o&&d(c,{})]})},wc=new Map;function _c(t,e){wc.set(t,e)}function yg(t){return wc.get(t)}function gC(){return Array.from(wc.keys())}_c("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),_c("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var mC=Object.defineProperty,yC=Object.defineProperties,vC=Object.getOwnPropertyDescriptors,vg=Object.getOwnPropertySymbols,xC=Object.prototype.hasOwnProperty,bC=Object.prototype.propertyIsEnumerable,xg=(t,e,n)=>e in t?mC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Si=(t,e)=>{for(var n in e||(e={}))xC.call(e,n)&&xg(t,n,e[n]);if(vg)for(var n of vg(e))bC.call(e,n)&&xg(t,n,e[n]);return t},Ei=(t,e)=>yC(t,vC(e));Yt(ru);const bg=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=on(t),i=on(e),o=OC({primaryColor:r,bgColor:i});return MC(o,{primaryColor:r,bgColor:i,isDarkMode:n})},wC=(t,e)=>Qb(Ei(Si({},t),{alpha:e?.2:.1}))||"#ffffff",_C=(t,e)=>{if(e)return"#ffffff";const n=on("#262626");return cl(n,t)>=7?oi(n):"#000000"},$C=t=>{const e=gu(on(t)),n=Ei(Si({},e),{l:Math.min(1,e.l+.2)});return oi(n)},PC=(t,e)=>{const n=on(t),r=on("#262626"),i=on("#ffffff"),o=cl(r,n);return cl(i,n)>=3?oi(i):o>=4.5?oi(r):"#ffffff"},CC=(t,e)=>{const n=gu(t);if(e){const r=Ei(Si({},n),{l:Math.min(1,n.l+.1)});return ps(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=Ei(Si({},n),{l:Math.min(1,n.l+.05)});return ps(r,"#ffffff")}}},OC=({primaryColor:t,bgColor:e})=>({colorPrimary:ps(t,"#FF356A"),colorBg:ps(e,"#ffffff"),colorWhite:"#ffffff"}),MC=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=_C(n,r),o=wC(e,r);return Ei(Si({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:$C(i),colorPrimaryText:PC(o,r),colorBgElevated:CC(n,r)})};function ps(t,e="#000000"){var n;return(n=oi(t))!=null?n:e}const $c="#FF356A";function ce(t){var e;return((e=t==null?void 0:t.themeConfig)==null?void 0:e.colorPrimary)||$c}function wg(t){var e;const{themeConfig:n={},data:r}=t,{colorPrimary:i,palette:o}=n;return!o||o.length===0?Array(((e=r==null?void 0:r.items)==null?void 0:e.length)||1).fill(i||$c):r.items.map((s,a)=>Io(o,[a],r.items.length)||$c)}function Tt(t,e){var n,r,i;return Io((n=t==null?void 0:t.themeConfig)==null?void 0:n.palette,e,(i=(r=t.data)==null?void 0:r.items)==null?void 0:i.length)}function xe(t,e){var n;const{colorBg:r=((n=e==null?void 0:e.themeConfig)==null?void 0:n.colorBg)||"white",colorPrimary:i=e?ce(e):"black"}=t;return bg({colorPrimary:i,isDarkMode:mu(r),colorBg:r})}function Ii(t,e){const{depth:n,originalIndexes:r,flatIndex:i}=t;switch(e){case"level":return[n];case"branch":return n===0?[0]:n===1?[r[1]+1]:[r[1]+1];case"node":return r;case"node-flat":return i!==void 0?[i]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),r);default:return[0]}}var SC=Object.defineProperty,_g=Object.getOwnPropertySymbols,EC=Object.prototype.hasOwnProperty,IC=Object.prototype.propertyIsEnumerable,$g=(t,e,n)=>e in t?SC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TC=(t,e)=>{for(var n in e||(e={}))EC.call(e,n)&&$g(t,n,e[n]);if(_g)for(var n of _g(e))IC.call(e,n)&&$g(t,n,e[n]);return t};function Zt(t,e=[]){const n=TC({},t),r={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...e].forEach(o=>{o in n&&(r[o]=n[o],delete n[o])}),["x","y","width","height"].forEach(o=>{o in t&&(n[o]=t[o])}),[r,n]}function gs(t,e){var n;return t.length===0?()=>null:e===void 0?t[0]:(n=t[e])!=null?n:t[0]}const Pc=new Map;function Kt(t,e){Pc.set(t,e)}function Pg(t){return Pc.get(t)}function AC(){return Array.from(Pc.keys())}var kC=Object.defineProperty,LC=Object.defineProperties,zC=Object.getOwnPropertyDescriptors,Cg=Object.getOwnPropertySymbols,HC=Object.prototype.hasOwnProperty,RC=Object.prototype.propertyIsEnumerable,Og=(t,e,n)=>e in t?kC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DC=(t,e)=>{for(var n in e||(e={}))HC.call(e,n)&&Og(t,n,e[n]);if(Cg)for(var n of Cg(e))RC.call(e,n)&&Og(t,n,e[n]);return t},NC=(t,e)=>LC(t,zC(e));const Mg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=80,iconSize:o=24,badgeSize:s=32,gap:a=8,positionH:l="normal",themeColors:c,valueFormatter:h},u]=Zt(t,["width","height","iconSize","badgeSize","gap"]),f=e.value,p=f!==void 0,g=!!e.desc,y=!!e.icon,m=`${c.colorPrimary}-badge`,x=l==="flipped"?r-a-s:a,v=y?l==="flipped"?a:s+2*a:a,b=r-a*2,w=y?r-s-3*a:b,_=a+14+18+8,$=_-a,P=g?a:(i-s)/2,C=!p&&!g?(i-14)/2:a;return I(V,NC(DC({},u),{width:r,height:i,children:[d(jt,{children:I("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[d("stop",{offset:"0%",stopColor:c.colorPrimary}),d("stop",{offset:"100%",stopColor:lt(c.colorPrimary).darken(20).toHexString()})]})}),d(Ct,{"data-element-type":"shape",x:0,y:0,width:r,height:i,fill:c.colorPrimaryBg,rx:8,ry:8}),y&&I(Bt,{children:[d(Wt,{x,y:P,width:s,height:s,fill:`url(#${m})`}),d(Ce,{indexes:n,x:x+(s-o)/2,y:P+(s-o)/2,size:o,fill:c.colorWhite})]}),I(dt,{flexDirection:"column",x:v,y:C,width:w,height:!p&&!g?void 0:$,alignItems:"center",justifyContent:"center",children:[d(It,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:14,fill:c.colorText,children:e.label}),p&&d(Oi,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:c.colorPrimary,value:f,formatter:h})]}),g&&d(Jt,{indexes:n,x:a,y:_,width:b,alignHorizontal:l==="flipped"?"right":"left",fontSize:11,fill:c.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:e.desc})]}))};Kt("badge-card",{component:Mg,composites:["icon","label","value","desc"]});var jC=Object.defineProperty,WC=Object.defineProperties,FC=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,BC=Object.prototype.hasOwnProperty,VC=Object.prototype.propertyIsEnumerable,Eg=(t,e,n)=>e in t?jC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YC=(t,e)=>{for(var n in e||(e={}))BC.call(e,n)&&Eg(t,n,e[n]);if(Sg)for(var n of Sg(e))VC.call(e,n)&&Eg(t,n,e[n]);return t},XC=(t,e)=>WC(t,FC(e));const Ig=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Zt(t,["width","height"]);return I(V,XC(YC({},s),{children:[d("rect",{x:0,y:0,width:r,height:i,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),d(yt,{x:r-85,y:.5,width:85,height:65,d:"M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z",fill:o.colorBg,"data-element-type":"shape"}),d(It,{indexes:e,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),d(Jt,{indexes:e,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),d(Ce,{indexes:e,x:r-48,y:12,width:32,height:32,fill:o.colorPrimary})]}))};Kt("candy-card-lite",{component:Ig,composites:["icon","label","desc"]});var GC=Object.defineProperty,qC=Object.defineProperties,UC=Object.getOwnPropertyDescriptors,ms=Object.getOwnPropertySymbols,Tg=Object.prototype.hasOwnProperty,Ag=Object.prototype.propertyIsEnumerable,kg=(t,e,n)=>e in t?GC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZC=(t,e)=>{for(var n in e||(e={}))Tg.call(e,n)&&kg(t,n,e[n]);if(ms)for(var n of ms(e))Ag.call(e,n)&&kg(t,n,e[n]);return t},KC=(t,e)=>qC(t,UC(e)),QC=(t,e)=>{var n={};for(var r in t)Tg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ms)for(var r of ms(t))e.indexOf(r)<0&&Ag.call(t,r)&&(n[r]=t[r]);return n};const Cc=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=QC(e,["color","opacity"]);return d("filter",KC(ZC({id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%"},i),{children:d("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":n,"flood-opacity":r})}))};var JC=Object.defineProperty,tO=Object.defineProperties,eO=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,nO=Object.prototype.hasOwnProperty,rO=Object.prototype.propertyIsEnumerable,zg=(t,e,n)=>e in t?JC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iO=(t,e)=>{for(var n in e||(e={}))nO.call(e,n)&&zg(t,n,e[n]);if(Lg)for(var n of Lg(e))rO.call(e,n)&&zg(t,n,e[n]);return t},oO=(t,e)=>tO(t,eO(e));const Oc=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return I("linearGradient",oO(iO({id:e},{"left-right":{x1:"0%",y1:"0%",x2:"100%",y2:"0%"},"right-left":{x1:"100%",y1:"0%",x2:"0%",y2:"0%"},"top-bottom":{x1:"0%",y1:"0%",x2:"0%",y2:"100%"},"bottom-top":{x1:"0%",y1:"100%",x2:"0%",y2:"0%"}}[i]),{children:[d("stop",{offset:"0%",stopColor:n}),d("stop",{offset:"100%",stopColor:r})]}))};var sO=Object.defineProperty,aO=Object.defineProperties,lO=Object.getOwnPropertyDescriptors,Hg=Object.getOwnPropertySymbols,cO=Object.prototype.hasOwnProperty,hO=Object.prototype.propertyIsEnumerable,Rg=(t,e,n)=>e in t?sO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ti=(t,e)=>{for(var n in e||(e={}))cO.call(e,n)&&Rg(t,n,e[n]);if(Hg)for(var n of Hg(e))hO.call(e,n)&&Rg(t,n,e[n]);return t},Ai=(t,e)=>aO(t,lO(e));const Dg=t=>{const[{datum:e,indexes:n,width:r=300,height:i=80,gap:o=12,positionH:s="normal",iconPadding:a=i/10,themeColors:l},c]=Zt(t,["width","height","gap","iconPadding"]),h=i/2,u=i-a*2,f=s==="flipped",p=!!e.icon,g=p?r-i-o:r-o*2,y=p?f?o:i:o,m=p?f?"right":"left":"center",x={indexes:n,width:g,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:l.colorWhite},v=et(d(It,Ai(Ti({},x),{children:e.label}))),b={indexes:n,width:g,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:l.colorWhite},w=et(e.desc?d(Jt,Ai(Ti({},b),{children:e.desc})):null),_=4,$=v.height+_+w.height,C=(i-$)/2,A=C+v.height+_,E=f?r-i+a:a,S=a;return I(V,Ai(Ti({},c),{children:[d(jt,{children:d(Cc,{})}),d(Ct,{x:0,y:0,width:r,height:i,fill:l.colorPrimary,rx:h,ry:h,"data-element-type":"shape"}),e.icon&&I(Bt,{children:[d(Wt,{x:E,y:S,width:u,height:u,fillOpacity:.5,fill:l.colorBg,filter:"url(#drop-shadow)"}),d(or,{indexes:n,x:E,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d(It,Ai(Ti({x:y,y:C},x),{children:e.label})),e.desc&&d(Jt,Ai(Ti({x:y,y:A},b),{children:e.desc}))]}))};Kt("capsule-item",{component:Dg,composites:["icon","label","desc"]});var dO=Object.defineProperty,uO=Object.defineProperties,fO=Object.getOwnPropertyDescriptors,Ng=Object.getOwnPropertySymbols,pO=Object.prototype.hasOwnProperty,gO=Object.prototype.propertyIsEnumerable,jg=(t,e,n)=>e in t?dO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mc=(t,e)=>{for(var n in e||(e={}))pO.call(e,n)&&jg(t,n,e[n]);if(Ng)for(var n of Ng(e))gO.call(e,n)&&jg(t,n,e[n]);return t},Sc=(t,e)=>uO(t,fO(e));const Wg=t=>{const[{indexes:e,datum:n,themeColors:r,positionH:i="normal",width:o=240,height:s=o},a]=Zt(t,["width","height"]),l=Math.min(o,s),c=l*.7,h=(l-c)/2,u=c*Math.sqrt(2)/2,f=(l-u)/2,p=lt(r.colorPrimary),g=ys(p,80,.2),y=ys(p,20,.8),m=ys(p,75,.32),x=ys(p,45,.4),v=p.clone().darken(5).toRgbString(),b=`${r.colorPrimary}-${i}-outer`,w=`${r.colorPrimary}-${i}-inner`,_=i==="flipped"?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return I(V,Sc(Mc({},a),{children:[I(jt,{children:[I("linearGradient",Sc(Mc({id:b},_),{children:[d("stop",{offset:"0%",stopColor:g}),d("stop",{offset:"100%",stopColor:y})]})),I("linearGradient",Sc(Mc({id:w},_),{children:[d("stop",{offset:"0%",stopColor:m}),d("stop",{offset:"100%",stopColor:x})]}))]}),d(Wt,{width:l,height:l,fill:`url(#${b})`,"data-element-type":"shape"}),d(Wt,{x:h,y:h,width:c,height:c,fill:`url(#${w})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),d(It,{indexes:e,x:f,y:f,width:u,height:u,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:v,fontWeight:"500",children:n.label})]}))};Kt("circle-node",{component:Wg,composites:["label"]});function ys(t,e,n){return lt.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var mO=Object.defineProperty,yO=Object.defineProperties,vO=Object.getOwnPropertyDescriptors,Fg=Object.getOwnPropertySymbols,xO=Object.prototype.hasOwnProperty,bO=Object.prototype.propertyIsEnumerable,Bg=(t,e,n)=>e in t?mO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ec=(t,e)=>{for(var n in e||(e={}))xO.call(e,n)&&Bg(t,n,e[n]);if(Fg)for(var n of Fg(e))bO.call(e,n)&&Bg(t,n,e[n]);return t},Ic=(t,e)=>yO(t,vO(e));const Vg=t=>{var e;const[{datum:n,indexes:r,size:i=120,strokeWidth:o=12,gap:s=8,themeColors:a,valueFormatter:l=_=>`${Math.round(_)}%`},c]=Zt(t,["size","strokeWidth","gap"]),h=(e=n.value)!=null?e:0,f=Math.min(Math.max(h/100,0),1),p=(i-o)/2,g=i/2,y=o/2,m=i-o,x=f>=1,v=f*360,b=wO(g,g,p,0,v),w={x:y,y,width:m,height:m};return I(V,Ic(Ec({},c),{width:i,height:i+s+20,children:[d(Ct,{width:i,height:i,fill:"none"}),d(Wt,Ic(Ec({},w),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),x?d(Wt,Ic(Ec({},w),{fill:"none",stroke:a.colorPrimary,strokeWidth:o,"data-element-type":"shape"})):d(yt,{d:b,fill:"none",stroke:a.colorPrimary,strokeWidth:o,strokeLinecap:"round","data-element-type":"shape"}),d(Oi,{indexes:r,x:o,y:o,width:m-o,height:m-o,fontSize:24,fontWeight:"bold",fill:a.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:h,formatter:l}),d(It,{indexes:r,x:0,y:i+s,width:i,alignHorizontal:"center",fontSize:12,fill:a.colorTextSecondary,children:n.label})]}))};function wO(t,e,n,r,i){const o=Yg(t,e,n,i),s=Yg(t,e,n,r),a=i-r<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${a} 0 ${s.x} ${s.y}`}function Yg(t,e,n,r){const i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}Kt("circular-progress",{component:Vg,composites:["label","value"]});var _O=Object.defineProperty,$O=Object.defineProperties,PO=Object.getOwnPropertyDescriptors,Xg=Object.getOwnPropertySymbols,CO=Object.prototype.hasOwnProperty,OO=Object.prototype.propertyIsEnumerable,Gg=(t,e,n)=>e in t?_O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MO=(t,e)=>{for(var n in e||(e={}))CO.call(e,n)&&Gg(t,n,e[n]);if(Xg)for(var n of Xg(e))OO.call(e,n)&&Gg(t,n,e[n]);return t},SO=(t,e)=>$O(t,PO(e));const qg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=60,iconSize:o=20,gap:s=8,positionH:a="normal",themeColors:l,valueFormatter:c},h]=Zt(t,["width","height","iconSize","gap"]),u=e.value,f=u!=null,p="compact-shadow",g=a==="flipped"?r-s-o:s,y=a==="flipped"?s:o+2*s,m=r-o-3*s,x=f?m*.8:m,v=f?m*.2:0;return I(V,SO(MO({},h),{children:[d(jt,{children:d("filter",{id:p,children:d("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),d(Ct,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${p})`,"data-element-type":"shape"}),d(Ct,{x:a==="flipped"?r-3:0,y:0,width:3,height:i,fill:l.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),d(Ce,{indexes:n,x:g,y:(i-o)/2,size:o,fill:l.colorPrimary}),I(dt,{x:y,y:s,width:m,height:i-s*2,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[I(dt,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[d(It,{indexes:n,width:x,alignHorizontal:"left",fontSize:12,fill:l.colorText,children:e.label}),f&&d(Oi,{indexes:n,width:v,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:l.colorPrimary,value:u,formatter:c})]}),d(Jt,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})]}))};Kt("compact-card",{component:qg,composites:["icon","label","value","desc"]});var EO=Object.defineProperty,IO=Object.defineProperties,TO=Object.getOwnPropertyDescriptors,Ug=Object.getOwnPropertySymbols,AO=Object.prototype.hasOwnProperty,kO=Object.prototype.propertyIsEnumerable,Zg=(t,e,n)=>e in t?EO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,LO=(t,e)=>{for(var n in e||(e={}))AO.call(e,n)&&Zg(t,n,e[n]);if(Ug)for(var n of Ug(e))kO.call(e,n)&&Zg(t,n,e[n]);return t},zO=(t,e)=>IO(t,TO(e));const Kg=t=>{const[{datum:e,indexes:n,width:r=300,height:i=30,iconSize:o=30,gap:s=5,positionH:a="normal",positionV:l="middle",themeColors:c},h]=Zt(t,["width","height","iconSize","gap"]),u=r-o-s,f=l==="middle"?(i-o)/2:l==="flipped"?i-o:0;return I(V,zO(LO({},h),{children:[d(yt,{"data-element-type":"shape",x:a==="flipped"?u+s:0,y:f,fill:c.colorPrimary,width:o,height:o,d:"M14.7273 30C6.54538 30 0 22.9077 0 14.7269C0 6.54617 6.54538 0 14.7273 0C22.9092 0 30 6.54617 30 14.7269C30 22.9077 22.9092 30 14.7273 30ZM24.5454 10.9077C22.9092 9.27307 22.9092 9.27307 22.9092 9.27307C22.3638 8.72692 22.3638 8.7269 21.8181 8.7269C21.2727 8.7269 21.2727 8.72692 20.7273 9.27307C13.0908 16.9077 13.0908 16.9077 13.0908 16.9077C8.72731 12.5461 8.72731 12.5462 8.72731 12.5462C8.18193 12.5462 8.18193 12 7.63654 12L7.09077 12.5462C4.90923 14.1808 4.90923 14.1808 4.90923 14.1808C4.90923 14.7269 4.90923 14.7269 4.90923 15.2731C4.90923 15.8192 4.90923 15.8192 4.90923 16.3654C12 23.4539 12 23.4538 12 23.4538C12.5454 23.4538 12.5454 23.4538 13.0908 23.4538C13.6365 23.4538 13.6365 23.4538 14.1819 23.4538C24.5454 12.5461 24.5454 12.5462 24.5454 12.5462L25.0908 12C25.0908 11.4538 24.5454 10.9077 24.5454 10.9077Z"}),d(It,{indexes:n,x:a==="flipped"?0:o+s,width:u,height:i,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:e.label||e.desc})]}))};Kt("done-list",{component:Kg,composites:["label"]});var HO=Object.defineProperty,RO=Object.defineProperties,DO=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,NO=Object.prototype.hasOwnProperty,jO=Object.prototype.propertyIsEnumerable,Jg=(t,e,n)=>e in t?HO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WO=(t,e)=>{for(var n in e||(e={}))NO.call(e,n)&&Jg(t,n,e[n]);if(Qg)for(var n of Qg(e))jO.call(e,n)&&Jg(t,n,e[n]);return t},FO=(t,e)=>RO(t,DO(e));const t1=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Zt(t,["width"]),a=o!=="flipped",l=o==="normal"?"bottom":"top",c=d(It,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Jt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=d(or,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(VO,{width:8,height:30,fill:i.colorPrimary,positionV:o}),p=5,g=25,y=30,m=et(c),x=et(h),v=et(u),b=et(f),w=m.height+x.height+p+b.height-v.height-g,_=v.height+g+y+b.height+p+m.height+x.height;return d(V,FO(WO({width:r,height:_},s),{children:I(dt,{flexDirection:"column",alignItems:"center",children:[a?I(Bt,{children:[h,c,d(ie,{height:p}),f]}):I(Bt,{children:[d(ie,{height:w}),u,d(ie,{height:g})]}),I(V,{children:[d(BO,{width:r,height:y,fill:i.colorPrimary}),d(Mt,{x:r/2,y:y/2,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?I(Bt,{children:[d(ie,{height:g}),u]}):I(Bt,{children:[f,d(ie,{height:p}),c,h]})]})}))},BO=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ve,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})},VO=t=>{const{x:e=0,y:n=0,width:r=10,height:i=50,fill:o,positionV:s="top"}=t,a=r/2,l=i-a,c=2,h=a;return I(le,{x:e,y:n,width:r,height:i,children:[d(Wt,{width:r,height:r,fill:o,y:s==="top"?0:l-a}),d(yt,{d:s==="top"?`M${h},${a} L${h},${a+l}`:`M${h},0 L${h},${l-a}`,strokeWidth:c,stroke:o})]})};Kt("horizontal-icon-arrow",{component:t1,composites:["icon","label","desc","time"]});var YO=Object.defineProperty,XO=Object.defineProperties,GO=Object.getOwnPropertyDescriptors,e1=Object.getOwnPropertySymbols,qO=Object.prototype.hasOwnProperty,UO=Object.prototype.propertyIsEnumerable,n1=(t,e,n)=>e in t?YO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r1=(t,e)=>{for(var n in e||(e={}))qO.call(e,n)&&n1(t,n,e[n]);if(e1)for(var n of e1(e))UO.call(e,n)&&n1(t,n,e[n]);return t},i1=(t,e)=>XO(t,GO(e));const o1=t=>{const[{indexes:e,datum:n,width:r=160,themeColors:i,positionH:o="center",positionV:s="normal"},a]=Zt(t,["width"]),l=o==="normal"?"left":o==="flipped"?"right":"center",c=d(It,{indexes:e,width:r,alignHorizontal:l,fill:i.colorPrimary,children:n.label}),h=et(c),u=n.desc?d(Jt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:s==="flipped"?"top":"bottom",children:n.desc}):null,f=et(u),g=n.icon?d(or,{size:45,indexes:e,colorBg:i.colorBg,fill:i.colorPrimary}):null,y=et(g),m=n.time?d(Mt,{width:r,height:30,alignHorizontal:"center",alignVertical:"middle",fill:i.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,x=et(m),v=18,b=I(Mi,{horizontal:"center",vertical:"middle",width:r,height:v,children:[d(Ct,{width:r,height:v,fill:i.colorPrimary,"data-element-type":"shape"}),d(Wt,{width:v+6,height:v+6,fill:i.colorBg,fillOpacity:.5,"data-element-type":"shape"}),d(Wt,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),w=h.height+f.height,_=y.height+x.height+5,$=Math.abs(_-w),P=_>w?$:0,C=w>_?$:0;return s==="flipped"?I(dt,i1(r1({},a),{flexDirection:"column",alignItems:"center",children:[d(ie,{height:C}),m,g,d(ie,{height:5}),b,c,u,d(ie,{height:P})]})):I(dt,i1(r1({},a),{flexDirection:"column",alignItems:"center",children:[d(ie,{height:P}),c,u,b,d(ie,{height:5}),g,m,d(ie,{height:C})]}))};Kt("horizontal-icon-line",{component:o1,composites:["icon","label","desc"]});var ZO=Object.defineProperty,KO=Object.defineProperties,QO=Object.getOwnPropertyDescriptors,s1=Object.getOwnPropertySymbols,JO=Object.prototype.hasOwnProperty,tM=Object.prototype.propertyIsEnumerable,a1=(t,e,n)=>e in t?ZO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eM=(t,e)=>{for(var n in e||(e={}))JO.call(e,n)&&a1(t,n,e[n]);if(s1)for(var n of s1(e))tM.call(e,n)&&a1(t,n,e[n]);return t},nM=(t,e)=>KO(t,QO(e));const l1=t=>{var e;const[{datum:n,indexes:r,size:i=80,iconSize:o=28,badgeSize:s=24,gap:a=8,themeColors:l,width:c=84,height:h=105},u]=Zt(t,["size","iconSize","badgeSize","gap"]),f=(e=n.value)!=null?e:0,p=`${l.colorPrimary}-icon`,g="#ff6b6b-badge";return I(V,nM(eM({},u),{width:c,height:h,children:[I(jt,{children:[I("radialGradient",{id:p,cx:"50%",cy:"30%",r:"70%",children:[d("stop",{offset:"0%",stopColor:lt(l.colorPrimary).lighten(30).toHexString()}),d("stop",{offset:"100%",stopColor:l.colorPrimary})]}),I("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#ff6b6b"}),d("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),d(Wt,{x:0,y:0,width:i,height:i,fill:`url(#${p})`,"data-element-type":"shape"}),d(Ce,{indexes:r,x:(i-o)/2,y:(i-o)/2,size:o,fill:l.colorPrimaryText}),d(Wt,{x:i-s+4,width:s,height:s,fill:`url(#${g})`}),d(Mt,{x:i-s+4,width:s,height:s,fontSize:10,fontWeight:"bold",fill:l.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:f>99?"99+":Math.round(f)}),d(It,{indexes:r,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:l.colorText,children:n.label})]}))};Kt("icon-badge",{component:l1,composites:["icon","label"]});var rM=Object.defineProperty,iM=Object.defineProperties,oM=Object.getOwnPropertyDescriptors,c1=Object.getOwnPropertySymbols,sM=Object.prototype.hasOwnProperty,aM=Object.prototype.propertyIsEnumerable,h1=(t,e,n)=>e in t?rM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lM=(t,e)=>{for(var n in e||(e={}))sM.call(e,n)&&h1(t,n,e[n]);if(c1)for(var n of c1(e))aM.call(e,n)&&h1(t,n,e[n]);return t},cM=(t,e)=>iM(t,oM(e));const d1=t=>{const[{datum:e,indexes:n,width:r=200,borderRadius:i=12,padding:o=16,separatorHeight:s=2,indexFontSize:a=20,labelFontSize:l=16,gap:c=8,themeColors:h},u]=Zt(t,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),f=n[0]+1,p=String(f).padStart(2,"0"),g=e.label!==void 0,y=e.desc!==void 0,m=lt.mix(h.colorPrimary,h.colorWhite,40).toHexString(),x=h.colorBgElevated||h.colorWhite,v=r-2*o,b=et(d(Mt,{fontSize:a,fontWeight:"bold",children:p})),w=v-b.width-c,_=g?et(d(It,{indexes:n,width:w,fontSize:l,fontWeight:"bold",x:a,children:e.label})):{height:0},$=y?et(d(Jt,{indexes:n,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,children:e.desc})):{height:0},P=Math.max(b.height,_.height),C=o*2+P+(g||y?c:0)+s+(y?c:0)+$.height;return I(V,cM(lM({},u),{width:r,height:C,children:[d(Ct,{x:0,y:0,width:r,height:C,rx:i,ry:i,fill:x,stroke:lt(x).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),I(V,{x:o,y:o,children:[I(V,{x:0,y:0,children:[d(Mt,{x:0,y:0,fontSize:a,fontWeight:"bold",fill:h.colorPrimary,alignVertical:"top",children:p}),g&&d(It,{indexes:n,x:a+c,y:0,width:w,fontSize:l,fontWeight:"bold",fill:h.colorTextSecondary,alignVertical:"top",children:e.label})]}),d(Ct,{x:0,y:P+c,width:v,height:s,fill:m,"data-element-type":"shape"}),y&&d(Jt,{indexes:n,x:0,y:P+c+s+c,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:h.colorTextSecondary,children:e.desc})]})]}))};Kt("indexed-card",{component:d1,composites:["label","desc"]});var hM=Object.defineProperty,dM=Object.defineProperties,uM=Object.getOwnPropertyDescriptors,u1=Object.getOwnPropertySymbols,fM=Object.prototype.hasOwnProperty,pM=Object.prototype.propertyIsEnumerable,f1=(t,e,n)=>e in t?hM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gM=(t,e)=>{for(var n in e||(e={}))fM.call(e,n)&&f1(t,n,e[n]);if(u1)for(var n of u1(e))pM.call(e,n)&&f1(t,n,e[n]);return t},mM=(t,e)=>dM(t,uM(e));const p1=t=>{const[{indexes:e,datum:n,width:r=140,iconSize:i=24,themeColors:o},s]=Zt(t,["width","iconSize"]),{label:a,desc:l}=n,c=8,h=16,u=12,f=h+u,p=r-f,g=60,y=i+44,m=h,x=g+u,v=g+h+u,b=[{x:0,y:v},{x:m,y:x},{x:m,y:v}],w=r-m-u,_=m+u,$=_+w,P=x+c/2,C=P+y,A=`M ${_} ${C} L ${_} ${P} L ${$} ${P}`,E=c/2,S=_+E,R=P+E,O=8;return I(V,mM(gM({},s),{children:[d(Jt,{indexes:e,x:f,width:p,height:g,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:l}),d(Ve,{points:b,fill:o.colorPrimary,opacity:.9,width:h,height:h,"data-element-type":"shape"}),d(yt,{d:A,stroke:o.colorPrimary,strokeWidth:c,fill:"none","data-element-type":"shape"}),d(Ce,{indexes:e,x:S+w/2-i/2,y:R+O,size:i,fill:o.colorPrimary}),d(It,{indexes:e,x:S,y:R+i+O*2,width:w,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:a})]}))};Kt("l-corner-card",{component:p1,composites:["icon","label","desc"]});var yM=Object.defineProperty,vM=Object.defineProperties,xM=Object.getOwnPropertyDescriptors,g1=Object.getOwnPropertySymbols,bM=Object.prototype.hasOwnProperty,wM=Object.prototype.propertyIsEnumerable,m1=(t,e,n)=>e in t?yM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_M=(t,e)=>{for(var n in e||(e={}))bM.call(e,n)&&m1(t,n,e[n]);if(g1)for(var n of g1(e))wM.call(e,n)&&m1(t,n,e[n]);return t},$M=(t,e)=>vM(t,xM(e));const y1=t=>{var e,n;const[{datum:r,indexes:i,width:o=280,height:s=160,showStripe:a=!0,showGradient:l=!0,showBottomShade:c=!0,themeColors:h},u]=Zt(t,["width","height","showStripe","showGradient","showBottomShade"]),f=(e=r.label)==null?void 0:e[0].toUpperCase(),p=(n=r.label)==null?void 0:n.toUpperCase(),g=h.colorPrimary,y=lt(g),m=4,x=6,v=45,b=40,w=12,$=y.clone().darken(4).toHexString(),P=y.clone().lighten(w).toHexString(),C="rgba(255, 255, 255, 0)",A="rgba(0, 0, 0, 0.03)",E=`letter-card-${i.join("-")}`,S=`${E}-gradient`,R=`${E}-pattern`,O=`${E}-shade`,T=m+x,F=1,L=96,D=L*F,k=16,N=k*F,j=s/16,X=D+j+N,z=(s-X)/2,M=z+D+j;return I(V,$M(_M({},u),{width:o,height:s,children:[I(jt,{children:[l&&I("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:$}),d("stop",{offset:"100%",stopColor:P})]}),a&&I("pattern",{id:R,patternUnits:"userSpaceOnUse",width:T,height:T,patternTransform:`rotate(${v})`,children:[d("rect",{x:"0",y:"0",width:T,height:T,fill:C}),d("rect",{x:"0",y:"0",width:m,height:T,fill:A})]}),c&&I("linearGradient",{id:O,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),d("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),d(Ct,{x:0,y:0,width:o,height:s,fill:l?`url(#${S})`:g,rx:0,ry:0,"data-element-type":"shape"}),a&&d(Ct,{x:0,y:0,width:o,height:s,fill:`url(#${R})`,rx:0,ry:0}),c&&d(Ct,{x:0,y:s-b,width:o,height:b,fill:`url(#${O})`,rx:0,ry:0}),f&&d(It,{indexes:i,x:0,y:z,width:o,fontSize:L,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:f}),d(It,{indexes:i,x:0,y:M,width:o,fontSize:k,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:p})]}))};Kt("letter-card",{component:y1,composites:["label"]});var PM=Object.defineProperty,CM=Object.defineProperties,OM=Object.getOwnPropertyDescriptors,v1=Object.getOwnPropertySymbols,MM=Object.prototype.hasOwnProperty,SM=Object.prototype.propertyIsEnumerable,x1=(t,e,n)=>e in t?PM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EM=(t,e)=>{for(var n in e||(e={}))MM.call(e,n)&&x1(t,n,e[n]);if(v1)for(var n of v1(e))SM.call(e,n)&&x1(t,n,e[n]);return t},IM=(t,e)=>CM(t,OM(e));const b1=t=>{var e,n,r;const[{datum:i,indexes:o,width:s,themeColors:a,positionH:l="normal",positionV:c="center",formatter:h=F=>F||"",usePaletteColor:u=!1,showUnderline:f=!1,underlineGap:p=6,underlineExtend:g=8,underlineThickness:y=2},m]=Zt(t,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),x=h((n=(e=i.label)!=null?e:i.desc)!=null?n:""),v=l==="flipped"?"right":l==="center"?"center":"left",b=et(d(It,{indexes:o,width:s,children:x})),w=s!=null?s:b.width,_=b.height,$=f?w+g*2:0,P=_+(f?p+y:0),C=f?Math.max(w,$):w,A=(r=m.height)!=null?r:P,E=c==="middle"?(A-P)/2:c==="flipped"?A-P:0,S=v==="right"?C-w:v==="center"?(C-w)/2:0,R=E,O=v==="right"?C-$:v==="center"?(C-$)/2:0,T=A;return I(V,IM(EM({},m),{width:C,height:A,children:[d(It,{indexes:o,x:S,y:R,width:w,height:_,alignHorizontal:v,alignVertical:c==="flipped"?"bottom":c==="center"?"middle":"top",fill:u?a.colorPrimary:a.colorText,children:x}),f&&d(yt,{d:`M 0 ${y/2} L ${$} ${y/2}`,x:O,y:T-y/2,width:$,height:y,stroke:a.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};Kt("lined-text",{component:b1,composites:["label"]});var TM=Object.defineProperty,AM=Object.defineProperties,kM=Object.getOwnPropertyDescriptors,w1=Object.getOwnPropertySymbols,LM=Object.prototype.hasOwnProperty,zM=Object.prototype.propertyIsEnumerable,_1=(t,e,n)=>e in t?TM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HM=(t,e)=>{for(var n in e||(e={}))LM.call(e,n)&&_1(t,n,e[n]);if(w1)for(var n of w1(e))zM.call(e,n)&&_1(t,n,e[n]);return t},RM=(t,e)=>AM(t,kM(e));const $1=t=>{const[{datum:e,indexes:n,width:r=300,pillWidth:i=120,pillHeight:o=36,gap:s=16,positionH:a="normal",themeColors:l},c]=Zt(t,["width","pillWidth","pillHeight","gap"]),h=!!e.desc,u=h?r:i,f=h?a==="center"?(u-i)/2:a==="flipped"?u-i:0:0,p=0,g=0,y=o+s,m=u,x=`drop-shadow-${l.colorPrimary}`,v="linear-gradient-white-top-bottom";return I(V,RM(HM({},c),{children:[I(jt,{children:[d(Cc,{id:x,color:l.colorPrimary}),d(Oc,{id:v,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),d(Ct,{x:f,y:p,width:i,height:o,fill:l.colorPrimaryBg,stroke:l.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${x})`,"data-element-type":"shape"}),d(Ct,{x:f,y:p,width:i,height:o,fill:`url(#${v})`,opacity:l.isDarkMode?.4:.7,rx:o/2,ry:o/2}),d(It,{indexes:n,x:f,y:p,width:i,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:l.colorText,children:e.label}),e.desc&&d(Jt,{indexes:n,x:g,y,width:m,alignHorizontal:a==="center"?"center":a==="flipped"?"right":"left",fontSize:12,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]}))};Kt("pill-badge",{component:$1,composites:["label","desc"]});var DM=Object.defineProperty,NM=Object.defineProperties,jM=Object.getOwnPropertyDescriptors,P1=Object.getOwnPropertySymbols,WM=Object.prototype.hasOwnProperty,FM=Object.prototype.propertyIsEnumerable,C1=(t,e,n)=>e in t?DM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BM=(t,e)=>{for(var n in e||(e={}))WM.call(e,n)&&C1(t,n,e[n]);if(P1)for(var n of P1(e))FM.call(e,n)&&C1(t,n,e[n]);return t},VM=(t,e)=>NM(t,jM(e));const O1=t=>{var e;const[{indexes:n,datum:r,width:i=120,themeColors:o,positionH:s="normal",positionV:a="center",formatter:l=y=>y||"",usePaletteColor:c=!1,lineNumber:h=1},u]=Zt(t,["width","formatter","usePaletteColor","lineNumber"]),f=14,p=1.4,g=(e=u.height)!=null?e:Math.ceil(h*p*f);return d(It,VM(BM({},u),{indexes:n,width:i,height:g,lineHeight:p,fill:c?o.colorPrimary:o.colorText,fontSize:f,fontWeight:"regular",alignHorizontal:s==="flipped"?"right":s==="center"?"center":"left",alignVertical:a==="flipped"?"bottom":a==="center"?"middle":"top",children:l(r.label||r.desc)}))};Kt("plain-text",{component:O1,composites:["label"]});function vs(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function YM(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function M1(t){let e,n,r;t.length!==2?(e=vs,n=(a,l)=>vs(t(a),l),r=(a,l)=>t(a)-l):(e=t===vs||t===YM?t:XM,n=t,r=t);function i(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=i(a,l,c,h-1);return u>c&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:i,center:s,right:o}}function XM(){return 0}function GM(t){return t===null?NaN:+t}const qM=M1(vs).right;M1(GM).center;const UM=Math.sqrt(50),ZM=Math.sqrt(10),KM=Math.sqrt(2);function xs(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=UM?10:o>=ZM?5:o>=KM?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?xs(t,e,n*2):[a,l,c]}function QM(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?xs(e,t,n):xs(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function Tc(t,e,n){return e=+e,t=+t,n=+n,xs(t,e,n)[2]}function JM(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Tc(e,t,n):Tc(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var tS={value:()=>{}};function Ac(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new bs(n)}function bs(t){this._=t}function eS(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bs.prototype=Ac.prototype={constructor:bs,on:function(t,e){var n=this._,r=eS(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=nS(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=S1(n[i],t.name,e);else if(e==null)for(i in n)n[i]=S1(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new bs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function nS(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function S1(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=tS,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const E1={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ws(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),E1.hasOwnProperty(e)?{space:E1[e],local:t}:t}function rS(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function iS(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function I1(t){var e=ws(t);return(e.local?iS:rS)(e)}function oS(){}function Lc(t){return t==null?oS:function(){return this.querySelector(t)}}function sS(t){typeof t!="function"&&(t=Lc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new qe(r,this._parents)}function aS(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function lS(){return[]}function T1(t){return t==null?lS:function(){return this.querySelectorAll(t)}}function cS(t){return function(){return aS(t.apply(this,arguments))}}function hS(t){typeof t=="function"?t=cS(t):t=T1(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(t.call(l,l.__data__,c,s)),i.push(l));return new qe(r,i)}function A1(t){return function(){return this.matches(t)}}function k1(t){return function(e){return e.matches(t)}}var dS=Array.prototype.find;function uS(t){return function(){return dS.call(this.children,t)}}function fS(){return this.firstElementChild}function pS(t){return this.select(t==null?fS:uS(typeof t=="function"?t:k1(t)))}var gS=Array.prototype.filter;function mS(){return Array.from(this.children)}function yS(t){return function(){return gS.call(this.children,t)}}function vS(t){return this.selectAll(t==null?mS:yS(typeof t=="function"?t:k1(t)))}function xS(t){typeof t!="function"&&(t=A1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new qe(r,this._parents)}function L1(t){return new Array(t.length)}function bS(){return new qe(this._enter||this._groups.map(L1),this._parents)}function _s(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}_s.prototype={constructor:_s,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function wS(t){return function(){return t}}function _S(t,e,n,r,i,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new _s(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function $S(t,e,n,r,i,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),p;for(a=0;a<h;++a)(l=e[a])&&(f[a]=p=s.call(l,l.__data__,a,e)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<u;++a)p=s.call(t,o[a],a,o)+"",(l=c.get(p))?(r[a]=l,l.__data__=o[a],c.delete(p)):n[a]=new _s(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(i[a]=l)}function PS(t){return t.__data__}function CS(t,e){if(!arguments.length)return Array.from(this,PS);var n=e?$S:_S,r=this._parents,i=this._groups;typeof t!="function"&&(t=wS(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=r[c],u=i[c],f=u.length,p=OS(t.call(h,h&&h.__data__,c,r)),g=p.length,y=a[c]=new Array(g),m=s[c]=new Array(g),x=l[c]=new Array(f);n(h,u,y,m,x,p,e);for(var v=0,b=0,w,_;v<g;++v)if(w=y[v]){for(v>=b&&(b=v+1);!(_=m[b])&&++b<g;);w._next=_||null}}return s=new qe(s,r),s._enter=a,s._exit=l,s}function OS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function MS(){return new qe(this._exit||this._groups.map(L1),this._parents)}function SS(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function ES(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c=n[l],h=r[l],u=c.length,f=a[l]=new Array(u),p,g=0;g<u;++g)(p=c[g]||h[g])&&(f[g]=p);for(;l<i;++l)a[l]=n[l];return new qe(a,this._parents)}function IS(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function TS(t){t||(t=AS);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new qe(i,this._parents).order()}function AS(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function kS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function LS(){return Array.from(this)}function zS(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function HS(){let t=0;for(const e of this)++t;return t}function RS(){return!this.node()}function DS(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function NS(t){return function(){this.removeAttribute(t)}}function jS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function WS(t,e){return function(){this.setAttribute(t,e)}}function FS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function BS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function VS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function YS(t,e){var n=ws(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?jS:NS:typeof e=="function"?n.local?VS:BS:n.local?FS:WS)(n,e))}function z1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function XS(t){return function(){this.style.removeProperty(t)}}function GS(t,e,n){return function(){this.style.setProperty(t,e,n)}}function qS(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function US(t,e,n){return arguments.length>1?this.each((e==null?XS:typeof e=="function"?qS:GS)(t,e,n==null?"":n)):Hr(this.node(),t)}function Hr(t,e){return t.style.getPropertyValue(e)||z1(t).getComputedStyle(t,null).getPropertyValue(e)}function ZS(t){return function(){delete this[t]}}function KS(t,e){return function(){this[t]=e}}function QS(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function JS(t,e){return arguments.length>1?this.each((e==null?ZS:typeof e=="function"?QS:KS)(t,e)):this.node()[t]}function H1(t){return t.trim().split(/^|\s+/)}function zc(t){return t.classList||new R1(t)}function R1(t){this._node=t,this._names=H1(t.getAttribute("class")||"")}R1.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function D1(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function N1(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function tE(t){return function(){D1(this,t)}}function eE(t){return function(){N1(this,t)}}function nE(t,e){return function(){(e.apply(this,arguments)?D1:N1)(this,t)}}function rE(t,e){var n=H1(t+"");if(arguments.length<2){for(var r=zc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?nE:e?tE:eE)(n,e))}function iE(){this.textContent=""}function oE(t){return function(){this.textContent=t}}function sE(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function aE(t){return arguments.length?this.each(t==null?iE:(typeof t=="function"?sE:oE)(t)):this.node().textContent}function lE(){this.innerHTML=""}function cE(t){return function(){this.innerHTML=t}}function hE(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function dE(t){return arguments.length?this.each(t==null?lE:(typeof t=="function"?hE:cE)(t)):this.node().innerHTML}function uE(){this.nextSibling&&this.parentNode.appendChild(this)}function fE(){return this.each(uE)}function pE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gE(){return this.each(pE)}function mE(t){var e=typeof t=="function"?t:I1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function yE(){return null}function vE(t,e){var n=typeof t=="function"?t:I1(t),r=e==null?yE:typeof e=="function"?e:Lc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function xE(){var t=this.parentNode;t&&t.removeChild(this)}function bE(){return this.each(xE)}function wE(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _E(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $E(t){return this.select(t?_E:wE)}function PE(t){return arguments.length?this.property("__data__",t):this.node().__data__}function CE(t){return function(e){t.call(this,e,this.__data__)}}function OE(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function ME(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function SE(t,e,n){return function(){var r=this.__on,i,o=CE(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function EE(t,e,n){var r=OE(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(i=0,h=a[l];i<o;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?SE:ME,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function j1(t,e,n){var r=z1(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function IE(t,e){return function(){return j1(this,t,e)}}function TE(t,e){return function(){return j1(this,t,e.apply(this,arguments))}}function AE(t,e){return this.each((typeof e=="function"?TE:IE)(t,e))}function*kE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var LE=[null];function qe(t,e){this._groups=t,this._parents=e}function ki(){return new qe([[document.documentElement]],LE)}function zE(){return this}qe.prototype=ki.prototype={constructor:qe,select:sS,selectAll:hS,selectChild:pS,selectChildren:vS,filter:xS,data:CS,enter:bS,exit:MS,join:SS,merge:ES,selection:zE,order:IS,sort:TS,call:kS,nodes:LS,node:zS,size:HS,empty:RS,each:DS,attr:YS,style:US,property:JS,classed:rE,text:aE,html:dE,raise:fE,lower:gE,append:mE,insert:vE,remove:bE,clone:$E,datum:PE,on:EE,dispatch:AE,[Symbol.iterator]:kE};function Hc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function W1(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Li(){}var zi=.7,$s=1/zi,Rr="\\s*([+-]?\\d+)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HE=/^#([0-9a-f]{3,8})$/,RE=new RegExp(`^rgb\\(${Rr},${Rr},${Rr}\\)$`),DE=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),NE=new RegExp(`^rgba\\(${Rr},${Rr},${Rr},${Hi}\\)$`),jE=new RegExp(`^rgba\\(${cn},${cn},${cn},${Hi}\\)$`),WE=new RegExp(`^hsl\\(${Hi},${cn},${cn}\\)$`),FE=new RegExp(`^hsla\\(${Hi},${cn},${cn},${Hi}\\)$`),F1={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};Hc(Li,ar,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:B1,formatHex:B1,formatHex8:BE,formatHsl:VE,formatRgb:V1,toString:V1});function B1(){return this.rgb().formatHex()}function BE(){return this.rgb().formatHex8()}function VE(){return U1(this).formatHsl()}function V1(){return this.rgb().formatRgb()}function ar(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=HE.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Y1(e):n===3?new Le(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ps(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ps(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=RE.exec(t))?new Le(e[1],e[2],e[3],1):(e=DE.exec(t))?new Le(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=NE.exec(t))?Ps(e[1],e[2],e[3],e[4]):(e=jE.exec(t))?Ps(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=WE.exec(t))?q1(e[1],e[2]/100,e[3]/100,1):(e=FE.exec(t))?q1(e[1],e[2]/100,e[3]/100,e[4]):F1.hasOwnProperty(t)?Y1(F1[t]):t==="transparent"?new Le(NaN,NaN,NaN,0):null}function Y1(t){return new Le(t>>16&255,t>>8&255,t&255,1)}function Ps(t,e,n,r){return r<=0&&(t=e=n=NaN),new Le(t,e,n,r)}function YE(t){return t instanceof Li||(t=ar(t)),t?(t=t.rgb(),new Le(t.r,t.g,t.b,t.opacity)):new Le}function Rc(t,e,n,r){return arguments.length===1?YE(t):new Le(t,e,n,r==null?1:r)}function Le(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Hc(Le,Rc,W1(Li,{brighter(t){return t=t==null?$s:Math.pow($s,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zi:Math.pow(zi,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Le(lr(this.r),lr(this.g),lr(this.b),Cs(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:X1,formatHex:X1,formatHex8:XE,formatRgb:G1,toString:G1}));function X1(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}`}function XE(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}${cr((isNaN(this.opacity)?1:this.opacity)*255)}`}function G1(){const t=Cs(this.opacity);return`${t===1?"rgb(":"rgba("}${lr(this.r)}, ${lr(this.g)}, ${lr(this.b)}${t===1?")":`, ${t})`}`}function Cs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function lr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function cr(t){return t=lr(t),(t<16?"0":"")+t.toString(16)}function q1(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,n,r)}function U1(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof Li||(t=ar(t)),!t)return new Ue;if(t instanceof Ue)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Ue(s,a,l,t.opacity)}function GE(t,e,n,r){return arguments.length===1?U1(t):new Ue(t,e,n,r==null?1:r)}function Ue(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Hc(Ue,GE,W1(Li,{brighter(t){return t=t==null?$s:Math.pow($s,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zi:Math.pow(zi,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Le(Dc(t>=240?t-240:t+120,i,r),Dc(t,i,r),Dc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ue(Z1(this.h),Os(this.s),Os(this.l),Cs(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 t=Cs(this.opacity);return`${t===1?"hsl(":"hsla("}${Z1(this.h)}, ${Os(this.s)*100}%, ${Os(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Z1(t){return t=(t||0)%360,t<0?t+360:t}function Os(t){return Math.max(0,Math.min(1,t||0))}function Dc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Nc=t=>()=>t;function qE(t,e){return function(n){return t+n*e}}function UE(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function ZE(t){return(t=+t)==1?K1:function(e,n){return n-e?UE(e,n,t):Nc(isNaN(e)?n:e)}}function K1(t,e){var n=e-t;return n?qE(t,n):Nc(isNaN(t)?e:t)}const Ms=(function t(e){var n=ZE(e);function r(i,o){var s=n((i=Rc(i)).r,(o=Rc(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=K1(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=a(h),i.b=l(h),i.opacity=c(h),i+""}}return r.gamma=t,r})(1);function KE(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function QE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function JE(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Fc(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function tI(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ze(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function eI(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Fc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var jc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wc=new RegExp(jc.source,"g");function nI(t){return function(){return t}}function rI(t){return function(e){return t(e)+""}}function Q1(t,e){var n=jc.lastIndex=Wc.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=jc.exec(t))&&(i=Wc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ze(r,i)})),n=Wc.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?rI(l[0].x):nI(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function Fc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Nc(e):(n==="number"?Ze:n==="string"?(r=ar(e))?(e=r,Ms):Q1:e instanceof ar?Ms:e instanceof Date?tI:QE(e)?KE:Array.isArray(e)?JE:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?eI:Ze)(t,e)}function iI(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var J1=180/Math.PI,Bc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tm(t,e,n,r,i,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*J1,skewX:Math.atan(l)*J1,scaleX:s,scaleY:a}}var Ss;function oI(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Bc:tm(e.a,e.b,e.c,e.d,e.e,e.f)}function sI(t){return t==null||(Ss||(Ss=document.createElementNS("http://www.w3.org/2000/svg","g")),Ss.setAttribute("transform",t),!(t=Ss.transform.baseVal.consolidate()))?Bc:(t=t.matrix,tm(t.a,t.b,t.c,t.d,t.e,t.f))}function em(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push("translate(",null,e,null,n);g.push({i:y-4,x:Ze(c,u)},{i:y-2,x:Ze(h,f)})}else(u||f)&&p.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,r)-2,x:Ze(c,h)})):h&&u.push(i(u)+"rotate("+h+r)}function a(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,r)-2,x:Ze(c,h)}):h&&u.push(i(u)+"skewX("+h+r)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push(i(p)+"scale(",null,",",null,")");g.push({i:y-4,x:Ze(c,u)},{i:y-2,x:Ze(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,y=f.length,m;++g<y;)u[(m=f[g]).i]=m.x(p);return u.join("")}}}var aI=em(oI,"px, ","px)","deg)"),lI=em(sI,", ",")",")"),Dr=0,Ri=0,Di=0,nm=1e3,Es,Ni,Is=0,hr=0,Ts=0,ji=typeof performance=="object"&&performance.now?performance:Date,rm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vc(){return hr||(rm(cI),hr=ji.now()+Ts)}function cI(){hr=0}function As(){this._call=this._time=this._next=null}As.prototype=Yc.prototype={constructor:As,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Vc():+n)+(e==null?0:+e),!this._next&&Ni!==this&&(Ni?Ni._next=this:Es=this,Ni=this),this._call=t,this._time=n,Xc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xc())}};function Yc(t,e,n){var r=new As;return r.restart(t,e,n),r}function hI(){Vc(),++Dr;for(var t=Es,e;t;)(e=hr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Dr}function im(){hr=(Is=ji.now())+Ts,Dr=Ri=0;try{hI()}finally{Dr=0,uI(),hr=0}}function dI(){var t=ji.now(),e=t-Is;e>nm&&(Ts-=e,Is=t)}function uI(){for(var t,e=Es,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Es=n);Ni=t,Xc(r)}function Xc(t){if(!Dr){Ri&&(Ri=clearTimeout(Ri));var e=t-hr;e>24?(t<1/0&&(Ri=setTimeout(im,t-ji.now()-Ts)),Di&&(Di=clearInterval(Di))):(Di||(Is=ji.now(),Di=setInterval(dI,nm)),Dr=1,rm(im))}}function om(t,e,n){var r=new As;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var fI=Ac("start","end","cancel","interrupt"),pI=[],sm=0,am=1,Gc=2,ks=3,lm=4,qc=5,Ls=6;function zs(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;gI(t,n,{name:e,index:r,group:i,on:fI,tween:pI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:sm})}function Uc(t,e){var n=Ke(t,e);if(n.state>sm)throw new Error("too late; already scheduled");return n}function hn(t,e){var n=Ke(t,e);if(n.state>ks)throw new Error("too late; already running");return n}function Ke(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gI(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Yc(o,0,n.time);function o(c){n.state=am,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,p;if(n.state!==am)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===ks)return om(s);p.state===lm?(p.state=Ls,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=Ls,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(om(function(){n.state===ks&&(n.state=lm,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Gc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Gc){for(n.state=ks,i=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(p=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=p);i.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=qc,1),u=-1,f=i.length;++u<f;)i[u].call(t,h);n.state===qc&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Ls,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function mI(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Gc&&r.state<qc,r.state=Ls,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function yI(t){return this.each(function(){mI(this,t)})}function vI(t,e){var n,r;return function(){var i=hn(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function xI(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=hn(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function bI(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ke(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?vI:xI)(n,t,e))}function Zc(t,e,n){var r=t._id;return t.each(function(){var i=hn(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ke(i,r).value[e]}}function cm(t,e){var n;return(typeof e=="number"?Ze:e instanceof ar?Ms:(n=ar(e))?(e=n,Ms):Q1)(t,e)}function wI(t){return function(){this.removeAttribute(t)}}function _I(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $I(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function PI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function CI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function OI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function MI(t,e){var n=ws(t),r=n==="transform"?lI:cm;return this.attrTween(t,typeof e=="function"?(n.local?OI:CI)(n,r,Zc(this,"attr."+t,e)):e==null?(n.local?_I:wI)(n):(n.local?PI:$I)(n,r,e))}function SI(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function EI(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function II(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&EI(t,o)),n}return i._value=e,i}function TI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&SI(t,o)),n}return i._value=e,i}function AI(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ws(t);return this.tween(n,(r.local?II:TI)(r,e))}function kI(t,e){return function(){Uc(this,t).delay=+e.apply(this,arguments)}}function LI(t,e){return e=+e,function(){Uc(this,t).delay=e}}function zI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?kI:LI)(e,t)):Ke(this.node(),e).delay}function HI(t,e){return function(){hn(this,t).duration=+e.apply(this,arguments)}}function RI(t,e){return e=+e,function(){hn(this,t).duration=e}}function DI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?HI:RI)(e,t)):Ke(this.node(),e).duration}function NI(t,e){if(typeof e!="function")throw new Error;return function(){hn(this,t).ease=e}}function jI(t){var e=this._id;return arguments.length?this.each(NI(e,t)):Ke(this.node(),e).ease}function WI(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;hn(this,t).ease=n}}function FI(t){if(typeof t!="function")throw new Error;return this.each(WI(this._id,t))}function BI(t){typeof t!="function"&&(t=A1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new _n(r,this._parents,this._name,this._id)}function VI(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,p=0;p<h;++p)(f=l[p]||c[p])&&(u[p]=f);for(;a<r;++a)s[a]=e[a];return new _n(s,this._parents,this._name,this._id)}function YI(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function XI(t,e,n){var r,i,o=YI(e)?Uc:hn;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function GI(t,e){var n=this._id;return arguments.length<2?Ke(this.node(),n).on.on(t):this.each(XI(n,t,e))}function qI(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function UI(){return this.on("end.remove",qI(this._id))}function ZI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Lc(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,zs(c[f],e,n,f,c,Ke(h,n)));return new _n(o,this._parents,e,n)}function KI(t){var e=this._name,n=this._id;typeof t!="function"&&(t=T1(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),p,g=Ke(h,n),y=0,m=f.length;y<m;++y)(p=f[y])&&zs(p,e,n,y,f,g);o.push(f),s.push(h)}return new _n(o,s,e,n)}var QI=ki.prototype.constructor;function JI(){return new QI(this._groups,this._parents)}function tT(t,e){var n,r,i;return function(){var o=Hr(this,t),s=(this.style.removeProperty(t),Hr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function hm(t){return function(){this.style.removeProperty(t)}}function eT(t,e,n){var r,i=n+"",o;return function(){var s=Hr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function nT(t,e,n){var r,i,o;return function(){var s=Hr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Hr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function rT(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var l=hn(this,t),c=l.on,h=l.value[o]==null?a||(a=hm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function iT(t,e,n){var r=(t+="")=="transform"?aI:cm;return e==null?this.styleTween(t,tT(t,r)).on("end.style."+t,hm(t)):typeof e=="function"?this.styleTween(t,nT(t,r,Zc(this,"style."+t,e))).each(rT(this._id,t)):this.styleTween(t,eT(t,r,e),n).on("end.style."+t,null)}function oT(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function sT(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&oT(t,s,n)),r}return o._value=e,o}function aT(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,sT(t,e,n==null?"":n))}function lT(t){return function(){this.textContent=t}}function cT(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function hT(t){return this.tween("text",typeof t=="function"?cT(Zc(this,"text",t)):lT(t==null?"":t+""))}function dT(t){return function(e){this.textContent=t.call(this,e)}}function uT(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&dT(i)),e}return r._value=t,r}function fT(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,uT(t))}function pT(){for(var t=this._name,e=this._id,n=dm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=Ke(l,e);zs(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new _n(r,this._parents,t,n)}function gT(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var c=hn(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),i===0&&o()})}var mT=0;function _n(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function dm(){return++mT}var $n=ki.prototype;_n.prototype={constructor:_n,select:ZI,selectAll:KI,selectChild:$n.selectChild,selectChildren:$n.selectChildren,filter:BI,merge:VI,selection:JI,transition:pT,call:$n.call,nodes:$n.nodes,node:$n.node,size:$n.size,empty:$n.empty,each:$n.each,on:GI,attr:MI,attrTween:AI,style:iT,styleTween:aT,text:hT,textTween:fT,remove:UI,tween:bI,delay:zI,duration:DI,ease:jI,easeVarying:FI,end:gT,[Symbol.iterator]:$n[Symbol.iterator]};function yT(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var vT={time:null,delay:0,duration:250,ease:yT};function xT(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function bT(t){var e,n;t instanceof _n?(e=t._id,t=t._name):(e=dm(),(n=vT).time=Vc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&zs(l,t,e,c,s,n||xT(l,e));return new _n(r,this._parents,t,e)}ki.prototype.interrupt=yI,ki.prototype.transition=bT;const Kc=Math.PI,Qc=2*Kc,dr=1e-6,wT=Qc-dr;function um(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function _T(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return um;const n=Qi(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class $T{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?um:_T(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-e,c=i-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>dr)if(!(Math.abs(u*l-c*h)>dr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-s,g=i-a,y=l*l+c*c,m=p*p+g*g,x=Math.sqrt(y),v=Math.sqrt(f),b=o*Math.tan((Kc-Math.acos((y+f-m)/(2*x*v)))/2),w=b/v,_=b/x;Math.abs(w-1)>dr&&this._append`L${e+w*h},${n+w*u}`,this._append`A${o},${o},0,0,${+(u*p>h*g)},${this._x1=e+_*l},${this._y1=n+_*c}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,h=n+l,u=1^s,f=s?i-o:o-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>dr||Math.abs(this._y1-h)>dr)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%Qc+Qc),f>wT?this._append`A${r},${r},0,1,${u},${e-a},${n-l}A${r},${r},0,1,${u},${this._x1=c},${this._y1=h}`:f>dr&&this._append`A${r},${r},0,${+(f>=Kc)},${u},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function PT(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,s=n.length,a,l=0,c=0;for(o=0;o<s;++o)a=n[o],l+=a.x,c+=a.y;for(l=(l/s-t)*r,c=(c/s-e)*r,o=0;o<s;++o)a=n[o],a.x-=l,a.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function CT(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return fm(this.cover(e,n),e,n,t)}function fm(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,s={data:r},a=t._x0,l=t._y0,c=t._x1,h=t._y1,u,f,p,g,y,m,x,v;if(!o)return t._root=s,t;for(;o.length;)if((y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f,i=o,!(o=o[x=m<<1|y]))return i[x]=s,t;if(p=+t._x.call(null,o.data),g=+t._y.call(null,o.data),e===p&&n===g)return s.next=o,i?i[x]=s:t._root=s,t;do i=i?i[x]=new Array(4):t._root=new Array(4),(y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f;while((x=m<<1|y)===(v=(g>=f)<<1|p>=u));return i[v]=o,i[x]=s,t}function OT(t){var e,n,r=t.length,i,o,s=new Array(r),a=new Array(r),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,a[n]=o,i<l&&(l=i),i>h&&(h=i),o<c&&(c=o),o>u&&(u=o));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<r;++n)fm(this,s[n],a[n],t[n]);return this}function MT(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var s=i-n||1,a=this._root,l,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,l=new Array(4),l[c]=a,a=l,s*=2,c){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function ST(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function ET(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ee(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function IT(t,e,n){var r,i=this._x0,o=this._y0,s,a,l,c,h=this._x1,u=this._y1,f=[],p=this._root,g,y;for(p&&f.push(new Ee(p,i,o,h,u)),n==null?n=1/0:(i=t-n,o=e-n,h=t+n,u=e+n,n*=n);g=f.pop();)if(!(!(p=g.node)||(s=g.x0)>h||(a=g.y0)>u||(l=g.x1)<i||(c=g.y1)<o))if(p.length){var m=(s+l)/2,x=(a+c)/2;f.push(new Ee(p[3],m,x,l,c),new Ee(p[2],s,x,m,c),new Ee(p[1],m,a,l,x),new Ee(p[0],s,a,m,x)),(y=(e>=x)<<1|t>=m)&&(g=f[f.length-1],f[f.length-1]=f[f.length-1-y],f[f.length-1-y]=g)}else{var v=t-+this._x.call(null,p.data),b=e-+this._y.call(null,p.data),w=v*v+b*b;if(w<n){var _=Math.sqrt(n=w);i=t-_,o=e-_,h=t+_,u=e+_,r=p.data}}return r}function TT(t){if(isNaN(h=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,s=this._x0,a=this._y0,l=this._x1,c=this._y1,h,u,f,p,g,y,m,x;if(!n)return this;if(n.length)for(;;){if((g=h>=(f=(s+l)/2))?s=f:l=f,(y=u>=(p=(a+c)/2))?a=p:c=p,e=n,!(n=n[m=y<<1|g]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,x=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[x]=n:this._root=n),this):(this._root=o,this)}function AT(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function kT(){return this._root}function LT(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function zT(t){var e=[],n,r=this._root,i,o,s,a,l;for(r&&e.push(new Ee(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,s=n.y0,a=n.x1,l=n.y1)&&r.length){var c=(o+a)/2,h=(s+l)/2;(i=r[3])&&e.push(new Ee(i,c,h,a,l)),(i=r[2])&&e.push(new Ee(i,o,h,c,l)),(i=r[1])&&e.push(new Ee(i,c,s,a,h)),(i=r[0])&&e.push(new Ee(i,o,s,c,h))}return this}function HT(t){var e=[],n=[],r;for(this._root&&e.push(new Ee(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,l=r.x1,c=r.y1,h=(s+l)/2,u=(a+c)/2;(o=i[0])&&e.push(new Ee(o,s,a,h,u)),(o=i[1])&&e.push(new Ee(o,h,a,l,u)),(o=i[2])&&e.push(new Ee(o,s,u,h,c)),(o=i[3])&&e.push(new Ee(o,h,u,l,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function RT(t){return t[0]}function DT(t){return arguments.length?(this._x=t,this):this._x}function NT(t){return t[1]}function jT(t){return arguments.length?(this._y=t,this):this._y}function Jc(t,e,n){var r=new th(e==null?RT:e,n==null?NT:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function th(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function pm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ie=Jc.prototype=th.prototype;Ie.copy=function(){var t=new th(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=pm(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=pm(r));return t},Ie.add=CT,Ie.addAll=OT,Ie.cover=MT,Ie.data=ST,Ie.extent=ET,Ie.find=IT,Ie.remove=TT,Ie.removeAll=AT,Ie.root=kT,Ie.size=LT,Ie.visit=zT,Ie.visitAfter=HT,Ie.x=DT,Ie.y=jT;function ur(t){return function(){return t}}function Dn(t){return(t()-.5)*1e-6}function WT(t){return t.x+t.vx}function FT(t){return t.y+t.vy}function BT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=ur(t==null?1:+t));function s(){for(var c,h=e.length,u,f,p,g,y,m,x=0;x<o;++x)for(u=Jc(e,WT,FT).visitAfter(a),c=0;c<h;++c)f=e[c],y=n[f.index],m=y*y,p=f.x+f.vx,g=f.y+f.vy,u.visit(v);function v(b,w,_,$,P){var C=b.data,A=b.r,E=y+A;if(C){if(C.index>f.index){var S=p-C.x-C.vx,R=g-C.y-C.vy,O=S*S+R*R;O<E*E&&(S===0&&(S=Dn(r),O+=S*S),R===0&&(R=Dn(r),O+=R*R),O=(E-(O=Math.sqrt(O)))/O*i,f.vx+=(S*=O)*(E=(A*=A)/(m+A)),f.vy+=(R*=O)*E,C.vx-=S*(E=1-E),C.vy-=R*E)}return}return w>p+E||$<p-E||_>g+E||P<g-E}}function a(c){if(c.data)return c.r=n[c.data.index];for(var h=c.r=0;h<4;++h)c[h]&&c[h].r>c.r&&(c.r=c[h].r)}function l(){if(e){var c,h=e.length,u;for(n=new Array(h),c=0;c<h;++c)u=e[c],n[u.index]=+t(u,c,e)}}return s.initialize=function(c,h){e=c,r=h,l()},s.iterations=function(c){return arguments.length?(o=+c,s):o},s.strength=function(c){return arguments.length?(i=+c,s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:ur(+c),l(),s):t},s}function VT(t){return t.index}function gm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function YT(t){var e=VT,n=u,r,i=ur(30),o,s,a,l,c,h=1;t==null&&(t=[]);function u(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function f(m){for(var x=0,v=t.length;x<h;++x)for(var b=0,w,_,$,P,C,A,E;b<v;++b)w=t[b],_=w.source,$=w.target,P=$.x+$.vx-_.x-_.vx||Dn(c),C=$.y+$.vy-_.y-_.vy||Dn(c),A=Math.sqrt(P*P+C*C),A=(A-o[b])/A*m*r[b],P*=A,C*=A,$.vx-=P*(E=l[b]),$.vy-=C*E,_.vx+=P*(E=1-E),_.vy+=C*E}function p(){if(s){var m,x=s.length,v=t.length,b=new Map(s.map((_,$)=>[e(_,$,s),_])),w;for(m=0,a=new Array(x);m<v;++m)w=t[m],w.index=m,typeof w.source!="object"&&(w.source=gm(b,w.source)),typeof w.target!="object"&&(w.target=gm(b,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(m=0,l=new Array(v);m<v;++m)w=t[m],l[m]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(v),g(),o=new Array(v),y()}}function g(){if(s)for(var m=0,x=t.length;m<x;++m)r[m]=+n(t[m],m,t)}function y(){if(s)for(var m=0,x=t.length;m<x;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,x){s=m,c=x,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(h=+m,f):h},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:ur(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:ur(+m),y(),f):i},f}const XT=1664525,GT=1013904223,mm=4294967296;function qT(){let t=1;return()=>(t=(XT*t+GT)%mm)/mm}function UT(t){return t.x}function ZT(t){return t.y}var KT=10,QT=Math.PI*(3-Math.sqrt(5));function JT(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,l=Yc(u),c=Ac("tick","end"),h=qT();t==null&&(t=[]);function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(y){var m,x=t.length,v;y===void 0&&(y=1);for(var b=0;b<y;++b)for(n+=(o-n)*i,a.forEach(function(w){w(n)}),m=0;m<x;++m)v=t[m],v.fx==null?v.x+=v.vx*=s:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=s:(v.y=v.fy,v.vy=0);return e}function p(){for(var y=0,m=t.length,x;y<m;++y){if(x=t[y],x.index=y,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),isNaN(x.x)||isNaN(x.y)){var v=KT*Math.sqrt(.5+y),b=y*QT;x.x=v*Math.cos(b),x.y=v*Math.sin(b)}(isNaN(x.vx)||isNaN(x.vy))&&(x.vx=x.vy=0)}}function g(y){return y.initialize&&y.initialize(t,h),y}return p(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(y){return arguments.length?(t=y,p(),a.forEach(g),e):t},alpha:function(y){return arguments.length?(n=+y,e):n},alphaMin:function(y){return arguments.length?(r=+y,e):r},alphaDecay:function(y){return arguments.length?(i=+y,e):+i},alphaTarget:function(y){return arguments.length?(o=+y,e):o},velocityDecay:function(y){return arguments.length?(s=1-y,e):1-s},randomSource:function(y){return arguments.length?(h=y,a.forEach(g),e):h},force:function(y,m){return arguments.length>1?(m==null?a.delete(y):a.set(y,g(m)),e):a.get(y)},find:function(y,m,x){var v=0,b=t.length,w,_,$,P,C;for(x==null?x=1/0:x*=x,v=0;v<b;++v)P=t[v],w=y-P.x,_=m-P.y,$=w*w+_*_,$<x&&(C=P,x=$);return C},on:function(y,m){return arguments.length>1?(c.on(y,m),e):c.on(y)}}}function tA(){var t,e,n,r,i=ur(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=Jc(t,UT,ZT).visitAfter(u);for(r=p,g=0;g<y;++g)e=t[g],m.visit(f)}function h(){if(t){var p,g=t.length,y;for(o=new Array(g),p=0;p<g;++p)y=t[p],o[y.index]=+i(y,p,t)}}function u(p){var g=0,y,m,x=0,v,b,w;if(p.length){for(v=b=w=0;w<4;++w)(y=p[w])&&(m=Math.abs(y.value))&&(g+=y.value,x+=m,v+=m*y.x,b+=m*y.y);p.x=v/x,p.y=b/x}else{y=p,y.x=y.data.x,y.y=y.data.y;do g+=o[y.data.index];while(y=y.next)}p.value=g}function f(p,g,y,m){if(!p.value)return!0;var x=p.x-e.x,v=p.y-e.y,b=m-g,w=x*x+v*v;if(b*b/l<w)return w<a&&(x===0&&(x=Dn(n),w+=x*x),v===0&&(v=Dn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)),e.vx+=x*p.value*r/w,e.vy+=v*p.value*r/w),!0;if(p.length||w>=a)return;(p.data!==e||p.next)&&(x===0&&(x=Dn(n),w+=x*x),v===0&&(v=Dn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)));do p.data!==e&&(b=o[p.data.index]*r/w,e.vx+=x*b,e.vy+=v*b);while(p=p.next)}return c.initialize=function(p,g){t=p,n=g,h()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:ur(+p),h(),c):i},c.distanceMin=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.distanceMax=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.theta=function(p){return arguments.length?(l=p*p,c):Math.sqrt(l)},c}function eA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Hs(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Nr(t){return t=Hs(Math.abs(t)),t?t[1]:NaN}function nA(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function rA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var iA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rs(t){if(!(e=iA.exec(t)))throw new Error("invalid format: "+t);var e;return new eh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Rs.prototype=eh.prototype;function eh(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}eh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function oA(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var ym;function sA(t,e){var n=Hs(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ym=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Hs(t,Math.max(0,e+o-1))[0]}function vm(t,e){var n=Hs(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const xm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:eA,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>vm(t*100,e),r:vm,s:sA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function bm(t){return t}var wm=Array.prototype.map,_m=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function aA(t){var e=t.grouping===void 0||t.thousands===void 0?bm:nA(wm.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?bm:rA(wm.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=Rs(u);var f=u.fill,p=u.align,g=u.sign,y=u.symbol,m=u.zero,x=u.width,v=u.comma,b=u.precision,w=u.trim,_=u.type;_==="n"?(v=!0,_="g"):xm[_]||(b===void 0&&(b=12),w=!0,_="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var $=y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",P=y==="$"?r:/[%p]/.test(_)?s:"",C=xm[_],A=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(S){var R=$,O=P,T,F,L;if(_==="c")O=C(S)+O,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?l:C(Math.abs(S),b),w&&(S=oA(S)),D&&+S==0&&g!=="+"&&(D=!1),R=(D?g==="("?g:a:g==="-"||g==="("?"":g)+R,O=(_==="s"?_m[8+ym/3]:"")+O+(D&&g==="("?")":""),A){for(T=-1,F=S.length;++T<F;)if(L=S.charCodeAt(T),48>L||L>57){O=(L===46?i+S.slice(T+1):S.slice(T))+O,S=S.slice(0,T);break}}}v&&!m&&(S=e(S,1/0));var k=R.length+S.length+O.length,N=k<x?new Array(x-k+1).join(f):"";switch(v&&m&&(S=e(N+S,N.length?x-O.length:1/0),N=""),p){case"<":S=R+S+O+N;break;case"=":S=R+N+S+O;break;case"^":S=N.slice(0,k=N.length>>1)+R+S+O+N.slice(k);break;default:S=N+R+S+O;break}return o(S)}return E.toString=function(){return u+""},E}function h(u,f){var p=c((u=Rs(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Nr(f)/3)))*3,y=Math.pow(10,-g),m=_m[8+g/3];return function(x){return p(y*x)+m}}return{format:c,formatPrefix:h}}var Ds,$m,Pm;lA({thousands:",",grouping:[3],currency:["$",""]});function lA(t){return Ds=aA(t),$m=Ds.format,Pm=Ds.formatPrefix,Ds}function cA(t){return Math.max(0,-Nr(Math.abs(t)))}function hA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nr(e)/3)))*3-Nr(Math.abs(t)))}function dA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Nr(e)-Nr(t))+1}function uA(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function fA(){return this.eachAfter(uA)}function pA(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function gA(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function mA(t,e){for(var n=this,r=[n],i=[],o,s,a,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,a=o.length;s<a;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function yA(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function vA(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function xA(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function bA(t){for(var e=this,n=wA(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function wA(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function _A(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function $A(){return Array.from(this)}function PA(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function CA(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*OA(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function nh(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=EA)):e===void 0&&(e=SA);for(var n=new Wi(t),r,i=[n],o,s,a,l;r=i.pop();)if((s=e(r.data))&&(l=(s=Array.from(s)).length))for(r.children=s,a=l-1;a>=0;--a)i.push(o=s[a]=new Wi(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(TA)}function MA(){return nh(this).eachBefore(IA)}function SA(t){return t.children}function EA(t){return Array.isArray(t)?t[1]:null}function IA(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function TA(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Wi(t){this.data=t,this.depth=this.height=0,this.parent=null}Wi.prototype=nh.prototype={constructor:Wi,count:fA,each:pA,eachAfter:mA,eachBefore:gA,find:yA,sum:vA,sort:xA,path:bA,ancestors:_A,descendants:$A,leaves:PA,links:CA,copy:MA,[Symbol.iterator]:OA};function AA(t,e){return t.parent===e.parent?1:2}function rh(t){var e=t.children;return e?e[0]:t.t}function ih(t){var e=t.children;return e?e[e.length-1]:t.t}function kA(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function LA(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function zA(t,e,n){return t.a.parent===e.parent?t.a:n}function Ns(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Ns.prototype=Object.create(Wi.prototype);function HA(t){for(var e=new Ns(t,0),n,r=[e],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new Ns(o[s],s)),i.parent=n;return(e.parent=new Ns(null,0)).children=[e],e}function RA(){var t=AA,e=1,n=1,r=null;function i(c){var h=HA(c);if(h.eachAfter(o),h.parent.m=-h.z,h.eachBefore(s),r)c.eachBefore(l);else{var u=c,f=c,p=c;c.eachBefore(function(v){v.x<u.x&&(u=v),v.x>f.x&&(f=v),v.depth>p.depth&&(p=v)});var g=u===f?1:t(u,f)/2,y=g-u.x,m=e/(f.x+g+y),x=n/(p.depth||1);c.eachBefore(function(v){v.x=(v.x+y)*m,v.y=v.depth*x})}return c}function o(c){var h=c.children,u=c.parent.children,f=c.i?u[c.i-1]:null;if(h){LA(c);var p=(h[0].z+h[h.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=a(c,f,c.parent.A||u[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,h,u){if(h){for(var f=c,p=c,g=h,y=f.parent.children[0],m=f.m,x=p.m,v=g.m,b=y.m,w;g=ih(g),f=rh(f),g&&f;)y=rh(y),p=ih(p),p.a=c,w=g.z+v-f.z-m+t(g._,f._),w>0&&(kA(zA(g,c,u),c,w),m+=w,x+=w),v+=g.m,m+=f.m,b+=y.m,x+=p.m;g&&!ih(p)&&(p.t=g,p.m+=v-x),f&&!rh(y)&&(y.t=f,y.m+=m-b,u=c)}return u}function l(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function DA(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function NA(t){return function(){return t}}function jA(t){return+t}var Cm=[0,1];function jr(t){return t}function oh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:NA(isNaN(e)?NaN:.5)}function WA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function FA(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=oh(i,r),o=n(s,o)):(r=oh(r,i),o=n(o,s)),function(a){return o(r(a))}}function BA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=oh(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=qM(t,a,1,r)-1;return o[l](i[l](a))}}function VA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function YA(){var t=Cm,e=Cm,n=Fc,r,i,o,s=jr,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==jr&&(s=WA(t[0],t[f-1])),a=f>2?BA:FA,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(r),e,n)))(r(s(f)))}return u.invert=function(f){return s(i((c||(c=a(e,t.map(r),Ze)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,jA),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=iI,h()},u.clamp=function(f){return arguments.length?(s=f?!0:jr,h()):s!==jr},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,p){return r=f,i=p,h()}}function XA(){return YA()(jr,jr)}function GA(t,e,n,r){var i=JM(t,e,n),o;switch(r=Rs(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=hA(i,s))&&(r.precision=o),Pm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=dA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=cA(i))&&(r.precision=o-(r.type==="%")*2);break}}return $m(r)}function qA(t){var e=t.domain;return t.ticks=function(n){var r=e();return QM(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return GA(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);h-- >0;){if(c=Tc(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Fi(){var t=XA();return t.copy=function(){return VA(t,Fi())},DA.apply(t,arguments),qA(t)}function de(t){return function(){return t}}const Om=Math.abs,Oe=Math.atan2,fr=Math.cos,UA=Math.max,sh=Math.min,dn=Math.sin,Wr=Math.sqrt,ze=1e-12,Bi=Math.PI,js=Bi/2,Ws=2*Bi;function ZA(t){return t>1?0:t<-1?Bi:Math.acos(t)}function Mm(t){return t>=1?js:t<=-1?-js:Math.asin(t)}function Sm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new $T(e)}function KA(t){return t.innerRadius}function QA(t){return t.outerRadius}function JA(t){return t.startAngle}function tk(t){return t.endAngle}function ek(t){return t&&t.padAngle}function nk(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,h=s-i,u=a-o,f=u*l-h*c;if(!(f*f<ze))return f=(h*(e-o)-u*(t-i))/f,[t+f*l,e+f*c]}function Fs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Wr(a*a+l*l),h=c*l,u=-c*a,f=t+h,p=e+u,g=n+h,y=r+u,m=(f+g)/2,x=(p+y)/2,v=g-f,b=y-p,w=v*v+b*b,_=i-o,$=f*y-g*p,P=(b<0?-1:1)*Wr(UA(0,_*_*w-$*$)),C=($*b-v*P)/w,A=(-$*v-b*P)/w,E=($*b+v*P)/w,S=(-$*v+b*P)/w,R=C-m,O=A-x,T=E-m,F=S-x;return R*R+O*O>T*T+F*F&&(C=E,A=S),{cx:C,cy:A,x01:-h,y01:-u,x11:C*(i/_-1),y11:A*(i/_-1)}}function Vi(){var t=KA,e=QA,n=de(0),r=null,i=JA,o=tk,s=ek,a=null,l=Sm(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-js,y=o.apply(this,arguments)-js,m=Om(y-g),x=y>g;if(a||(a=h=l()),p<f&&(u=p,p=f,f=u),!(p>ze))a.moveTo(0,0);else if(m>Ws-ze)a.moveTo(p*fr(g),p*dn(g)),a.arc(0,0,p,g,y,!x),f>ze&&(a.moveTo(f*fr(y),f*dn(y)),a.arc(0,0,f,y,g,x));else{var v=g,b=y,w=g,_=y,$=m,P=m,C=s.apply(this,arguments)/2,A=C>ze&&(r?+r.apply(this,arguments):Wr(f*f+p*p)),E=sh(Om(p-f)/2,+n.apply(this,arguments)),S=E,R=E,O,T;if(A>ze){var F=Mm(A/f*dn(C)),L=Mm(A/p*dn(C));($-=F*2)>ze?(F*=x?1:-1,w+=F,_-=F):($=0,w=_=(g+y)/2),(P-=L*2)>ze?(L*=x?1:-1,v+=L,b-=L):(P=0,v=b=(g+y)/2)}var D=p*fr(v),k=p*dn(v),N=f*fr(_),j=f*dn(_);if(E>ze){var X=p*fr(b),z=p*dn(b),M=f*fr(w),H=f*dn(w),B;if(m<Bi)if(B=nk(D,k,M,H,X,z,N,j)){var U=D-B[0],Y=k-B[1],G=X-B[0],Z=z-B[1],K=1/dn(ZA((U*G+Y*Z)/(Wr(U*U+Y*Y)*Wr(G*G+Z*Z)))/2),it=Wr(B[0]*B[0]+B[1]*B[1]);S=sh(E,(f-it)/(K-1)),R=sh(E,(p-it)/(K+1))}else S=R=0}P>ze?R>ze?(O=Fs(M,H,D,k,p,R,x),T=Fs(X,z,N,j,p,R,x),a.moveTo(O.cx+O.x01,O.cy+O.y01),R<E?a.arc(O.cx,O.cy,R,Oe(O.y01,O.x01),Oe(T.y01,T.x01),!x):(a.arc(O.cx,O.cy,R,Oe(O.y01,O.x01),Oe(O.y11,O.x11),!x),a.arc(0,0,p,Oe(O.cy+O.y11,O.cx+O.x11),Oe(T.cy+T.y11,T.cx+T.x11),!x),a.arc(T.cx,T.cy,R,Oe(T.y11,T.x11),Oe(T.y01,T.x01),!x))):(a.moveTo(D,k),a.arc(0,0,p,v,b,!x)):a.moveTo(D,k),!(f>ze)||!($>ze)?a.lineTo(N,j):S>ze?(O=Fs(N,j,X,z,f,-S,x),T=Fs(D,k,M,H,f,-S,x),a.lineTo(O.cx+O.x01,O.cy+O.y01),S<E?a.arc(O.cx,O.cy,S,Oe(O.y01,O.x01),Oe(T.y01,T.x01),!x):(a.arc(O.cx,O.cy,S,Oe(O.y01,O.x01),Oe(O.y11,O.x11),!x),a.arc(0,0,f,Oe(O.cy+O.y11,O.cx+O.x11),Oe(T.cy+T.y11,T.cx+T.x11),x),a.arc(T.cx,T.cy,S,Oe(T.y11,T.x11),Oe(T.y01,T.x01),!x))):a.arc(0,0,f,_,w,x)}if(a.closePath(),h)return a=null,h+""||null}return c.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Bi/2;return[fr(u)*h,dn(u)*h]},c.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:de(+h),c):t},c.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:de(+h),c):e},c.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:de(+h),c):n},c.padRadius=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:de(+h),c):r},c.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:de(+h),c):i},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:de(+h),c):o},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:de(+h),c):s},c.context=function(h){return arguments.length?(a=h==null?null:h,c):a},c}function Em(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Im(t){this._context=t}Im.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Tm(t){return new Im(t)}function rk(t){return t[0]}function ik(t){return t[1]}function ok(t,e){var n=de(!0),r=null,i=Tm,o=null,s=Sm(a);t=typeof t=="function"?t:t===void 0?rk:de(t),e=typeof e=="function"?e:e===void 0?ik:de(e);function a(l){var c,h=(l=Em(l)).length,u,f=!1,p;for(r==null&&(o=i(p=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(p)return o=null,p+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:de(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:de(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:de(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function sk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ak(t){return t}function lk(){var t=ak,e=sk,n=null,r=de(0),i=de(Ws),o=de(0);function s(a){var l,c=(a=Em(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Ws,Math.max(-Ws,i.apply(this,arguments)-y)),x,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),b=v*(m<0?-1:1),w;for(l=0;l<c;++l)(w=g[p[l]=l]=+t(a[l],l,a))>0&&(f+=w);for(e!=null?p.sort(function(_,$){return e(g[_],g[$])}):n!=null&&p.sort(function(_,$){return n(a[_],a[$])}),l=0,u=f?(m-c*b)/f:0;l<c;++l,y=x)h=p[l],w=g[h],x=y+(w>0?w*u:0)+b,g[h]={data:a[h],index:l,value:w,startAngle:y,endAngle:x,padAngle:v};return g}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:de(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:de(+a),s):r},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:de(+a),s):i},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:de(+a),s):o},s}function Yi(t,e,n){this.k=t,this.x=e,this.y=n}Yi.prototype={constructor:Yi,scale:function(t){return t===1?this:new Yi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Yi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Yi.prototype;var ck=Object.defineProperty,hk=Object.defineProperties,dk=Object.getOwnPropertyDescriptors,Am=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,fk=Object.prototype.propertyIsEnumerable,km=(t,e,n)=>e in t?ck(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pk=(t,e)=>{for(var n in e||(e={}))uk.call(e,n)&&km(t,n,e[n]);if(Am)for(var n of Am(e))fk.call(e,n)&&km(t,n,e[n]);return t},gk=(t,e)=>hk(t,dk(e));const Lm=t=>{const[{datum:e,data:n,indexes:r,width:i=280,height:o=120,iconSize:s=32,gap:a=12,progressHeight:l=8,borderRadius:c=12,positionH:h="normal",themeColors:u,valueFormatter:f=F=>`${F}%`},p]=Zt(t,["width","height","iconSize","gap","progressHeight","borderRadius"]),g=e.value,y=g!=null?g:0,m=Math.max(...n.items.map(F=>{var L;return(L=F.value)!=null?L:0}),100),x=i-2*a,b=Fi().domain([0,m]).range([0,x])(y),w=`${u.colorPrimary}-progress`,_=`${u.colorPrimaryBg}-progress-bg`,$=et(d(It,{indexes:r})),P=a,C=h==="flipped"?i-a-s:a,A=P,E=h==="flipped"?a:s+2*a,S=i-s-3*a,R=A,O=o-a-l,T=g!==void 0;return I(V,gk(pk({},p),{children:[I(jt,{children:[I("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimary}),d("stop",{offset:"100%",stopColor:lt.mix(u.colorPrimary,"#fff",20).toHexString()})]}),I("linearGradient",{id:_,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimaryBg}),d("stop",{offset:"100%",stopColor:u.colorBg})]})]}),d(Ct,{x:0,y:0,width:i,height:o,fill:u.colorBgElevated,stroke:u.colorPrimaryBg,strokeWidth:1,rx:c,ry:c,"data-element-type":"shape"}),d(Ce,{indexes:r,x:C,y:A,size:s,fill:u.colorPrimary}),d(It,{indexes:r,x:E,y:R,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:u.colorText,children:e.label}),T&&d(Oi,{indexes:r,x:E,y:R+$.height,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:u.colorPrimary,value:y,formatter:f}),d(Jt,{indexes:r,x:E,y:R+$.height+(T?27:4),width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:11,fill:u.colorTextSecondary,lineNumber:T?2:3,wordWrap:!0,children:e.desc}),d(Ct,{x:a,y:O,width:x,height:l,fill:`url(#${_})`,rx:l/2,ry:l/2,"data-element-type":"shape"}),d(Ct,{x:a,y:O,width:b,height:l,fill:`url(#${w})`,rx:l/2,ry:l/2,"data-element-type":"shape"})]}))};Kt("progress-card",{component:Lm,composites:["icon","label","value","desc"]});var mk=Object.defineProperty,yk=Object.defineProperties,vk=Object.getOwnPropertyDescriptors,zm=Object.getOwnPropertySymbols,xk=Object.prototype.hasOwnProperty,bk=Object.prototype.propertyIsEnumerable,Hm=(t,e,n)=>e in t?mk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wk=(t,e)=>{for(var n in e||(e={}))xk.call(e,n)&&Hm(t,n,e[n]);if(zm)for(var n of zm(e))bk.call(e,n)&&Hm(t,n,e[n]);return t},_k=(t,e)=>yk(t,vk(e));const Rm=t=>{const[{datum:e,indexes:n,width:r=280,height:i=120,iconSize:o=30,circleRadius:s=80,positionH:a="normal",positionV:l="normal",themeColors:c},h]=Zt(t,["width","height","iconSize","circleRadius"]),u=4*s/(3*Math.PI),f=2,p=4,g=28,y=20,m=y+20,x=y,v=8,b=35,w=40,_=30,$=String(n[0]+1).padStart(2,"0"),P=a==="flipped",C=l==="flipped",A=()=>P?{diagonalStartX:r-p,diagonalStartY:C?i-b:b,diagonalEndX:r-w,diagonalEndY:C?i-p:p,topLineStartX:r-w,topLineEndX:u,topLineY:C?i-p:p}:{diagonalStartX:p,diagonalStartY:C?i-b:b,diagonalEndX:w,diagonalEndY:C?i-p:p,topLineStartX:w,topLineEndX:r-u,topLineY:C?i-p:p},E=()=>{if(P){const D=s+10,k=r-D-w;return{valueX:r-_,contentX:D,contentWidth:k,circleX:0,circleY:C?0:i,iconX:u-o/2}}else return{valueX:0,contentX:w,contentWidth:r-w-s-10,circleX:r,circleY:C?0:i,iconX:r-u-o/2}},S=A(),R=E(),O=C?u-o/2:i-u-o/2,T=et(d(It,{indexes:n,width:R.contentWidth,children:e.label})),F=x+T.height+v,L=()=>{const{circleX:D,circleY:k}=R;return P?C?`M ${D} ${k} L ${D} ${k+s} A ${s} ${s} 0 0 0 ${D+s} ${k} Z`:`M ${D} ${k} L ${D} ${k-s} A ${s} ${s} 0 0 1 ${D+s} ${k} Z`:C?`M ${D} ${k} L ${D} ${k+s} A ${s} ${s} 0 0 1 ${D-s} ${k} Z`:`M ${D} ${k} L ${D} ${k-s} A ${s} ${s} 0 0 0 ${D-s} ${k} Z`};return I(V,_k(wk({},h),{width:r,height:i,children:[I(le,{children:[d(yt,{d:`M ${S.diagonalStartX} ${S.diagonalStartY} L ${S.diagonalEndX} ${S.diagonalEndY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(yt,{d:`M ${S.topLineStartX} ${S.topLineY} L ${S.topLineEndX} ${S.topLineY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(Wt,{x:S.diagonalStartX-p,y:S.diagonalStartY-p,width:p*2,height:p*2,fill:c.colorPrimary}),d(Wt,{x:S.topLineEndX-p,y:S.topLineY-p,width:p*2,height:p*2,fill:c.colorPrimary})]}),I(V,{children:[d(Mt,{x:R.valueX,y:m,fontSize:g,fontWeight:"bold",fill:c.colorPrimary,children:$}),d(yt,{d:L(),fill:c.colorPrimary,"data-element-type":"shape"}),e.icon&&d(Ce,{indexes:n,x:R.iconX,y:O,size:o,fill:c.colorWhite}),e.label&&d(It,{indexes:n,x:R.contentX,y:x,width:R.contentWidth,fontWeight:"bold",fill:c.colorText,alignHorizontal:P?"right":"left",children:e.label}),e.desc&&d(Jt,{indexes:n,x:R.contentX,y:F,width:R.contentWidth,fill:c.colorTextSecondary,alignHorizontal:P?"right":"left",children:e.desc})]})]}))};Kt("quarter-circular",{component:Rm,composites:["icon","label","desc"]});var $k=Object.defineProperty,Pk=Object.defineProperties,Ck=Object.getOwnPropertyDescriptors,Dm=Object.getOwnPropertySymbols,Ok=Object.prototype.hasOwnProperty,Mk=Object.prototype.propertyIsEnumerable,Nm=(t,e,n)=>e in t?$k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sk=(t,e)=>{for(var n in e||(e={}))Ok.call(e,n)&&Nm(t,n,e[n]);if(Dm)for(var n of Dm(e))Mk.call(e,n)&&Nm(t,n,e[n]);return t},Ek=(t,e)=>Pk(t,Ck(e));const jm=t=>{const[{datum:e,indexes:n,width:r=150,height:i=150,iconSize:o=30,padding:s=20,borderRadius:a=16,positionH:l="center",positionV:c="middle",themeColors:h},u]=Zt(t,["width","height","iconSize","padding","borderRadius"]),f=r-s*2,p=s,g=s,y=l==="flipped"?r-s-o:l==="center"?(r-o)/2:p,m=g,x=m+o+8,v=et(d(It,{indexes:n,width:f,children:e.label})),b=l==="flipped"?r-s-f:l==="center"?s:p,w=x+v.height+4,_=b,$=a;let P="";return l==="center"&&c==="middle"?P=`
|
|
31
31
|
M ${$} 0
|
|
32
32
|
L ${r-$} 0
|
|
33
33
|
Q ${r} 0 ${r} ${$}
|
|
@@ -79,32 +79,32 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
79
79
|
L 0 ${$}
|
|
80
80
|
Q 0 0 ${$} 0
|
|
81
81
|
Z
|
|
82
|
-
`,E(Y,ak(sk({},u),{children:[d(ht,{d:P,x:0,y:0,width:r,height:i,fill:h.colorPrimary,"data-element-type":"shape"}),d(be,{indexes:n,x:y,y:m,size:o,fill:h.colorBg}),d($t,{indexes:n,x,y:b,width:f,fontSize:14,fontWeight:"bold",fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.label}),e.desc&&d(Xt,{indexes:n,x:_,y:w,width:f,fontSize:11,wordWrap:!0,fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.desc})]}))};Vt("quarter-simple-card",{component:Am,composites:["icon","label","desc"]});var lk=Object.defineProperty,ck=Object.defineProperties,hk=Object.getOwnPropertyDescriptors,km=Object.getOwnPropertySymbols,dk=Object.prototype.hasOwnProperty,uk=Object.prototype.propertyIsEnumerable,zm=(t,e,n)=>e in t?lk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fk=(t,e)=>{for(var n in e||(e={}))dk.call(e,n)&&zm(t,n,e[n]);if(km)for(var n of km(e))uk.call(e,n)&&zm(t,n,e[n]);return t},pk=(t,e)=>ck(t,hk(e));const Lm=t=>{const[{datum:e,indexes:n,width:r=240,height:i=140,iconSize:o=28,gap:s=12,ribbonHeight:a=32,themeColors:l},c]=Wt(t,["width","height","iconSize","gap","ribbonHeight"]),h=`${l.colorPrimary}-ribbon`;return E(Y,pk(fk({},c),{children:[d(zt,{children:E("linearGradient",{id:h,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:l.colorPrimary}),d("stop",{offset:"100%",stopColor:ot(l.colorPrimary).darken(15).toHexString()})]})}),E(ne,{children:[d(St,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),d(St,{x:0,y:0,width:r,height:a,fill:`url(#${h})`,rx:8,ry:8}),d(St,{x:0,y:8,width:r,height:a-8,fill:`url(#${h})`}),d(ht,{x:r-20,y:a,width:20,height:8,fill:ot(l.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),d(be,{indexes:n,x:s,y:a+s,size:o,fill:l.colorPrimary}),d($t,{indexes:n,x:o+2*s,y:a+s,width:r-o-3*s,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:l.colorText,children:e.label}),d(Xt,{indexes:n,x:s,y:a+o+s+5,width:r-2*s,alignHorizontal:"left",fill:l.colorTextSecondary,lineNumber:3,wordWrap:!0,children:e.desc}),d(be,{indexes:n,x:r-s-8,y:s/2,size:16,fill:l.colorWhite})]}))};Vt("ribbon-card",{component:Lm,composites:["icon","label","desc"]});var gk=Object.defineProperty,mk=Object.defineProperties,yk=Object.getOwnPropertyDescriptors,Rm=Object.getOwnPropertySymbols,vk=Object.prototype.hasOwnProperty,bk=Object.prototype.propertyIsEnumerable,Hm=(t,e,n)=>e in t?gk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xk=(t,e)=>{for(var n in e||(e={}))vk.call(e,n)&&Hm(t,n,e[n]);if(Rm)for(var n of Rm(e))bk.call(e,n)&&Hm(t,n,e[n]);return t},wk=(t,e)=>mk(t,yk(e));const Dm=t=>{const[{indexes:e,datum:n,themeColors:r,width:i=300,height:o=40,padding:s=4,positionH:a="normal"},l]=Wt(t,["width","height","borderRadius","padding"]),c=o/2,h=c,u=s,f=i-c*2,p=o-s*2;return E(Y,wk(xk({},l),{children:[d(St,{"data-element-type":"shape",width:i,height:o,rx:c,ry:c,fill:r.colorPrimaryBg,stroke:r.colorPrimary,strokeWidth:1,opacity:.8}),d($t,{indexes:e,x:h,y:u,width:f,height:p,alignHorizontal:a==="flipped"?"right":a==="center"?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:r.colorText,children:n.label})]}))};Vt("rounded-rect-node",{component:Dm,composites:["label"]});var _k=Object.defineProperty,$k=Object.defineProperties,Pk=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,Ok=Object.prototype.hasOwnProperty,Ck=Object.prototype.propertyIsEnumerable,jm=(t,e,n)=>e in t?_k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mk=(t,e)=>{for(var n in e||(e={}))Ok.call(e,n)&&jm(t,n,e[n]);if(Nm)for(var n of Nm(e))Ck.call(e,n)&&jm(t,n,e[n]);return t},Sk=(t,e)=>$k(t,Pk(e));const Fm=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Wt(t,["width"]),a=o!=="flipped",l=a?"bottom":"top",c=d($t,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=30,f=10,p=Q(c),g=Q(h),y=p.height+g.height,m=y+f+u+f+y;return d(Y,Sk(Mk({width:r,height:m},s),{children:E(lt,{flexDirection:"column",alignItems:"center",children:[a?E(Rt,{children:[h,c,d(Kt,{height:f})]}):d(Rt,{children:d(Kt,{height:y+f})}),E(wi,{horizontal:"center",vertical:"middle",children:[d(Ek,{width:r,height:u,fill:i.colorPrimary}),d(Et,{width:r,height:u,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?d(Rt,{children:d(Kt,{height:y+f})}):E(Rt,{children:[d(Kt,{height:f}),c,h]})]})}))},Ek=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})};Vt("simple-horizontal-arrow",{component:Fm,composites:["label","desc","time"]});var Ik=Object.defineProperty,Tk=Object.defineProperties,Ak=Object.getOwnPropertyDescriptors,Bm=Object.getOwnPropertySymbols,kk=Object.prototype.hasOwnProperty,zk=Object.prototype.propertyIsEnumerable,Wm=(t,e,n)=>e in t?Ik(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lk=(t,e)=>{for(var n in e||(e={}))kk.call(e,n)&&Wm(t,n,e[n]);if(Bm)for(var n of Bm(e))zk.call(e,n)&&Wm(t,n,e[n]);return t},Rk=(t,e)=>Tk(t,Ak(e));const Vm=t=>{const[{indexes:e,datum:n,width:r=180,illusSize:i=r,gap:o=8,themeColors:s,usePaletteColor:a=!1},l]=Wt(t,["width","illusSize","gap","usePaletteColor"]),{label:c,desc:h}=n,u=a?s.colorPrimary:s.colorText,f=d($t,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:u,children:c}),p=Q(f);return E(lt,Rk(Lk({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Ip,{indexes:e,width:i,height:i}),f,d(Xt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"top",fill:s.colorTextSecondary,lineNumber:3,children:h})]}))};Vt("simple-illus",{component:Vm,composites:["illus","label","desc"]});var Hk=Object.defineProperty,Dk=Object.defineProperties,Nk=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,jk=Object.prototype.hasOwnProperty,Fk=Object.prototype.propertyIsEnumerable,Xm=(t,e,n)=>e in t?Hk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,th=(t,e)=>{for(var n in e||(e={}))jk.call(e,n)&&Xm(t,n,e[n]);if(Ym)for(var n of Ym(e))Fk.call(e,n)&&Xm(t,n,e[n]);return t},eh=(t,e)=>Dk(t,Nk(e));const Gm=t=>{const[{indexes:e,datum:n,width:r=200,height:i,gap:o=4,showIcon:s=!0,iconSize:a=30,iconType:l="default",positionH:c="normal",positionV:h="normal",usePaletteColor:u=!1,themeColors:f},p]=Wt(t,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:g,desc:y,icon:m}=n,v=(k=>k==="normal"?"left":k==="flipped"?"right":"center")(c),x=u?f.colorPrimary:f.colorText,w=14,_=1.4,P=Q(d($t,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:x,children:g})),O=s?l==="circle"?d(nr,{indexes:e,size:a,fill:f.colorPrimary,colorBg:f.colorBg}):d(be,{indexes:e,size:a,fill:f.colorTextSecondary}):null;if(!s||!m){const k=i?Math.max(0,i-P.height-o):void 0,D=k?k<=60?1:Math.floor(k/(_*w)):2,z=i?h==="middle"?(i-P.height-(k||0)-o)/2:h==="flipped"?i-P.height-(k||0)-o:0:0;return E(Y,eh(th({},p),{children:[d($t,{indexes:e,width:r,y:z,alignHorizontal:v,alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:r,height:k,y:z+P.height+o,alignHorizontal:v,alignVertical:A(),lineNumber:D,fill:f.colorTextSecondary,children:y})]}))}if(c==="center"){const k=s&&m?a:0,D=i?Math.max(0,i-P.height-k-o*2):void 0,z=D?D<=60?1:Math.floor(D/(_*w)):2,N=P.height+(D||0)+o,j=i?h==="middle"?(i-N-k-o)/2:h==="flipped"?i-N-k-o:0:0;return d(lt,eh(th({},p),{flexDirection:"column",gap:o,alignItems:"center",children:h==="flipped"?E(Rt,{children:[E(Y,{children:[d($t,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:z,fill:f.colorTextSecondary,children:y})]}),O]}):E(Rt,{children:[O,E(Y,{children:[d($t,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:z,fill:f.colorTextSecondary,children:y})]})]})}))}const T=Q(O),I=Math.max(r-T.width-o,0),S=i?Math.max(0,i-P.height-o):void 0,H=S?S<=60?1:Math.floor(S/(_*w)):2,C=i?h==="middle"?(i-P.height-(S||0)-o)/2:h==="flipped"?i-P.height-(S||0)-o:0:0;return d(lt,eh(th({},p),{flexDirection:"row",gap:o,alignItems:B(h),children:c==="flipped"?E(Rt,{children:[E(Y,{children:[d($t,{indexes:e,width:I,y:C,alignHorizontal:"right",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:I,height:S,y:C+P.height+o,alignHorizontal:"right",alignVertical:A(),lineNumber:H,fill:f.colorTextSecondary,children:y})]}),O]}):E(Rt,{children:[O,E(Y,{children:[d($t,{indexes:e,width:I,y:C,alignHorizontal:"left",alignVertical:"middle",fill:x,children:g}),d(Xt,{indexes:e,width:I,height:S,y:C+P.height+o,alignHorizontal:"left",alignVertical:A(),lineNumber:H,fill:f.colorTextSecondary,children:y})]})]})}));function A(k,D){return"top"}function B(k){return k==="normal"?"flex-start":k==="flipped"?"flex-end":"center"}};Vt("simple",{component:Gm,composites:["icon","label","desc"]});var Bk=Object.defineProperty,Wk=Object.defineProperties,Vk=Object.getOwnPropertyDescriptors,qm=Object.getOwnPropertySymbols,Yk=Object.prototype.hasOwnProperty,Xk=Object.prototype.propertyIsEnumerable,Um=(t,e,n)=>e in t?Bk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gk=(t,e)=>{for(var n in e||(e={}))Yk.call(e,n)&&Um(t,n,e[n]);if(qm)for(var n of qm(e))Xk.call(e,n)&&Um(t,n,e[n]);return t},qk=(t,e)=>Wk(t,Vk(e));const Zm=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Wt(t,["height"]),a=o==="normal"?"right":"left",l=d($t,{indexes:e,width:120,fill:i.colorText,alignHorizontal:a,alignVertical:"middle",fontSize:14,children:n.label}),c=d(Xt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:a,alignVertical:"top",children:n.desc}),h=o!=="flipped",u=15,f=30,p=120,g=p+u+f+u+p;return d(Y,qk(Gk({width:g,height:r},s),{children:E(lt,{flexDirection:"row",alignItems:"center",children:[h?E(Rt,{children:[E(lt,{flexDirection:"column",alignItems:"flex-end",children:[l,c]}),d(Kt,{width:u})]}):d(Rt,{children:d(Kt,{width:p+u})}),E(wi,{horizontal:"center",vertical:"middle",children:[d(Uk,{width:f,height:r,fill:i.colorPrimary}),d(Et,{width:f,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),h?d(Rt,{children:d(Kt,{width:p+u})}):E(Rt,{children:[d(Kt,{width:u}),E(lt,{flexDirection:"column",alignItems:"flex-start",children:[l,c]})]})]})}))},Uk=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})};Vt("simple-vertical-arrow",{component:Zm,composites:["label","desc"]});var Zk=Object.defineProperty,Kk=Object.defineProperties,Qk=Object.getOwnPropertyDescriptors,Km=Object.getOwnPropertySymbols,Jk=Object.prototype.hasOwnProperty,tz=Object.prototype.propertyIsEnumerable,Qm=(t,e,n)=>e in t?Zk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ez=(t,e)=>{for(var n in e||(e={}))Jk.call(e,n)&&Qm(t,n,e[n]);if(Km)for(var n of Km(e))tz.call(e,n)&&Qm(t,n,e[n]);return t},nz=(t,e)=>Kk(t,Qk(e));const nh=80,rh=3,Jm=t=>{const[{datum:e,indexes:n,width:r=200,gap:i=4,positionH:o="center",themeColors:s},a]=Wt(t,["width","height","gap"]),l=Q(d($t,{indexes:n,fontSize:18,fontWeight:"bold",width:r,children:e.label})),c=e.desc?Q(d(Xt,{indexes:n,width:r,wordWrap:!0,children:e.desc})):{height:0},h=l.height+i+rh+(e.desc?i*2+c.height:0),u=0,f=0,p=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-nh)/2:o==="flipped"?r-nh:0,y=f+l.height+i,m=0,b=y+rh+i*2;return E(Y,nz(ez({width:r,height:h},a),{children:[e.label&&d($t,{indexes:n,x:u,y:f,width:r,alignHorizontal:p,fill:s.colorPrimary,fontSize:18,fontWeight:"bold",children:e.label}),e.label&&d(St,{x:g,y,width:nh,height:rh,fill:s.colorPrimary,"data-element-type":"shape"}),e.desc&&d(Xt,{indexes:n,width:r,x:m,y:b,alignHorizontal:p,wordWrap:!0,fill:s.colorText,children:e.desc})]}))};Vt("underline-text",{component:Jm,composites:["label","desc"]});var rz=Object.defineProperty,iz=Object.defineProperties,oz=Object.getOwnPropertyDescriptors,t2=Object.getOwnPropertySymbols,sz=Object.prototype.hasOwnProperty,az=Object.prototype.propertyIsEnumerable,e2=(t,e,n)=>e in t?rz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lz=(t,e)=>{for(var n in e||(e={}))sz.call(e,n)&&e2(t,n,e[n]);if(t2)for(var n of t2(e))az.call(e,n)&&e2(t,n,e[n]);return t},cz=(t,e)=>iz(t,oz(e));const n2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Wt(t,["height"]),l=o!=="flipped"?"right":"left",c=d($t,{indexes:e,width:120,fill:i.colorText,alignHorizontal:l,alignVertical:"middle",fontSize:14,children:n.label}),h=d(Xt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:"top",children:n.desc}),u=d(nr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(dz,{width:30,height:8,fill:i.colorPrimary,positionH:o}),p=o!=="flipped",g=5,y=25,m=30,b=Q(c),v=Q(u),x=Q(f),w=b.width+g+x.width-v.width-y,_=Math.max(b.width+g+x.width,y+v.width)*2+m;return d(Y,cz(lz({width:_,height:r},s),{children:E(lt,{flexDirection:"row",alignItems:"center",children:[p?E(Rt,{children:[E(lt,{flexDirection:"column",alignItems:"flex-end",children:[c,h]}),d(Kt,{width:g}),f]}):E(Rt,{children:[d(Kt,{width:w}),u,d(Kt,{width:y})]}),E(wi,{horizontal:"center",vertical:"middle",children:[d(hz,{width:m,height:r,fill:i.colorPrimary}),d(Et,{width:m,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),p?E(Rt,{children:[d(Kt,{width:y}),u]}):E(Rt,{children:[f,d(Kt,{width:g}),E(lt,{flexDirection:"column",alignItems:"flex-start",children:[c,h]})]})]})}))},hz=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ne,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})},dz=t=>{const{x:e=0,y:n=0,width:r=50,height:i=10,fill:o,positionH:s="normal"}=t,a=i/2,l=r-a,c=2,h=a;return E(Y,{x:e,y:n,width:r,height:i,children:[d(Lt,{width:i,height:i,fill:o,x:s==="normal"?0:l-a,"data-element-type":"shape"}),d(ht,{d:s==="normal"?`M${a},${h} L${a+l},${h}`:`M0,${h} L${l-a},${h}`,strokeWidth:c,stroke:o,"data-element-type":"shape"})]})};Vt("vertical-icon-arrow",{component:n2,composites:["icon","label","desc"]});const ih=new Map;function Tt(t,e){ih.set(t,e)}function r2(t){return ih.get(t)}function uz(){return Array.from(ih.keys())}const i2=t=>{var e,n,r;const{Title:i,Item:o,data:s,width:a,gap:l,barGap:c,barHeight:h=28,barAreaWidth:u,labelGap:f=16,padding:p=24,showValue:g=!0,options:y,valueFormatter:m=Ut=>Ut.toString()}=t,b=(e=u!=null?u:a)!=null?e:480,{title:v,desc:x,items:w=[],xTitle:_,yTitle:$}=s,P=i?d(i,{title:v,desc:x}):null;if(w.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:P});const[O,T,I,S]=tr(p),H=(n=w[0])!=null?n:{label:"",value:0},C=Q(d(o,{indexes:[0],datum:H,data:s})),A=C.width||140,B=C.height||h,k=Math.max(h,B),D=Math.max(12,k*.35),z=(r=c!=null?c:l)!=null?r:D,N=w.map(Ut=>{var ae;return(ae=Ut.value)!=null?ae:0}),j=Math.max(...N,0),X=Math.min(...N,0),L=X<0?X*1.1:0;let M=j>0?j*1.1:0;M===L&&(M=L+1);const R=Ri().domain([L,M]).range([0,b]),W=Math.min(Math.max(R(0),0),b),U=Math.max(2,b*.02),V=w.length*(k+z)-z,G=$?24:0,Z=20,K=_?24:0,nt=O+G,at=S+A+f,pt=g?80:0,ft=Math.max(8,k*.2),rt=at+b+pt+T,tt=nt+V+ft+Z+K+I,et=xe(y.themeConfig),st=et.colorText||"#666",vt=re(y),gt=[],dt=[],ct=[],ut=[],mt=[],Pt=[],yt=[],Mt=nt+V+ft,te=Ut=>Number.isInteger(Ut)?Ut.toString():Ut.toFixed(1);w.forEach((Ut,ae)=>{var un;const je=[ae],Nt=(un=Ut.value)!=null?un:0,yr=nt+ae*(k+z),bt=yr+(k-h)/2,ee=Nt>=0?at+W:at+R(Nt),At=Nt>=0?R(Nt)-W:W-R(Nt),Bt=At===0?U:At,pe=Ct(y,[ae])||et.colorPrimary;if(gt.push(d(St,{x:ee,y:bt,width:Bt,height:h,fill:pe,rx:6,ry:6,"data-element-type":"shape"})),g){const le=Nt>=0?ee+Bt+8:ee-8;dt.push(d(Et,{x:le,y:bt+h/2,alignHorizontal:Nt>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pe,children:m(Nt,Ut)}))}ct.push(d(o,{indexes:je,datum:Ut,data:s,x:S,y:yr+(k-B)/2,width:A,height:B,positionV:"middle"}))});const he=Math.max(3,Math.min(7,Math.floor(b/80)));return R.ticks(he).forEach(Ut=>{const ae=at+R(Ut);Pt.push(d(ht,{d:`M${ae} ${nt} L${ae} ${nt+V}`,stroke:st,strokeOpacity:.08,"data-element-type":"shape"})),mt.push(d(ht,{d:`M${ae-.5} ${Mt} L${ae-.5} ${Mt+6}`,stroke:st,"data-element-type":"shape"})),mt.push(d(Et,{x:ae,y:Mt+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:st,children:te(Ut)}))}),ut.push(d(ht,{d:`M${at} ${Mt} L${at+b} ${Mt}`,stroke:st,"data-element-type":"shape"})),L<0&&ut.push(d(St,{x:at+W-.5,y:nt,width:1,height:V,fill:vt,"data-element-type":"shape"})),$&&yt.push(d(Et,{x:S+A/2,y:O+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:$})),_&&yt.push(d(Et,{x:at+b/2,y:Mt+Z+K/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:_})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[P,E(Y,{width:rt,height:tt,children:[d(Y,{children:Pt}),d(Y,{children:gt}),d(Y,{children:dt}),d(Y,{children:yt}),d(Y,{children:[...ut,...mt]}),d(It,{children:ct})]})]})};Tt("chart-bar",{component:i2,composites:["title","item","xTitle","yTitle"]});const o2=t=>{const{Title:e,Item:n,data:r,columnGap:i=60,columnWidth:o=50,padding:s=20,showValue:a=!0,options:l,valueFormatter:c=N=>N.toString()}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p});const g=xe(l.themeConfig),m=[...f.map(N=>{var j;return(j=N.value)!=null?j:0}),0].sort((N,j)=>N-j),b=m[0]<0,v=f.length*o+(f.length-1)*i,x=300,[w,_,$,P]=tr(s),O=a?24:0,T=10,I=b&&a?O+T:T,S=v+P+_,H=x+w+$+I,C=Ri().domain([m[0],m[m.length-1]]).range([x,0]),A=C(0),B=[],k=[],D=[],z=[];return f.forEach((N,j)=>{var X;const L=[j],M=(X=N.value)!=null?X:0,R=P+j*(o+i),W=M>=0?C(M):A,U=Math.abs(C(M)-A),V=Ct(l,[j])||g.colorPrimary,G=`${V}-column-positive-${j}`,Z=`${V}-column-negative-${j}`;z.push(E("linearGradient",{id:M>=0?G:Z,x1:"0%",y1:M>=0?"0%":"100%",x2:"0%",y2:M>=0?"100%":"0%",children:[d("stop",{offset:"0%",stopColor:V}),d("stop",{offset:"100%",stopColor:ot.mix(V,"#fff",40).toHexString()})]})),B.push(d(St,{x:R,y:w+W,width:o,height:U,fill:`url(#${M>=0?G:Z})`,rx:8,ry:8,"data-element-type":"shape"})),a&&k.push(d(Et,{x:R+o/2,y:M>=0?w+W-10:w+W+U+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:M>=0?"bottom":"top",fill:V,children:c(M,N)}));const K=o+i,nt=w+x+I;D.push(d(n,{indexes:L,datum:N,data:r,x:R+o/2-K/2,y:nt,width:K,positionH:"center"}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{width:S,height:H,children:[d(zt,{children:z}),d(Y,{children:B}),d(Y,{children:k}),d(It,{children:D})]})]})};Tt("chart-column",{component:o2,composites:["title","item"]});var fz=Object.defineProperty,pz=Object.defineProperties,gz=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,mz=Object.prototype.hasOwnProperty,yz=Object.prototype.propertyIsEnumerable,a2=(t,e,n)=>e in t?fz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l2=(t,e)=>{for(var n in e||(e={}))mz.call(e,n)&&a2(t,n,e[n]);if(s2)for(var n of s2(e))yz.call(e,n)&&a2(t,n,e[n]);return t},vz=(t,e)=>pz(t,gz(e));const c2=t=>{const{Title:e,Item:n,data:r,width:i,height:o=260,gap:s=10,padding:a=24,showValue:l=!0,options:c,valueFormatter:h=bt=>bt.toString()}=t,{title:u,desc:f,items:p=[],xTitle:g,yTitle:y}=r,m=e?d(e,{title:u,desc:f}):null;if(p.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[b,v,x,w]=tr(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=Q(d(n,l2({},_))),P=$.width,O=$.height,T=Math.max(28,O+14),I=44,S=y?26:0,H=g?22:0,C=P+s,A=p.length>0?(p.length-1)*C+P:0,B=i!==void 0?i:Math.max(200,A||320),k=p.length>1?Math.max(C,(B-P)/(p.length-1)):0,D=p.length>0?Math.max(P,(p.length-1)*k+P):0,z=w+I+S,N=b+S,j=z+D+v,X=N+o+T+H+x,L=p.map(bt=>{var ee;return(ee=bt.value)!=null?ee:0}),M=Math.max(...L,0),R=Math.min(...L,0),W=Math.max(Math.abs(M),Math.abs(R))*.1,U=R<0?R-W:0;let V=M>0?M+W:1;V===U&&(V=U+1);const G=Ri().domain([U,V]).nice().range([o,0]),Z=Math.max(0,Math.min(o,G(0))),K=V<=0?0:U>=0?o:Z,nt=re(c),at=xe(c.themeConfig),pt=at.colorText||"#666",ft=[],rt=[],tt=[],et=[],st=[],vt=[],gt=[];G.ticks(6).forEach(bt=>{const ee=N+G(bt);ft.push(d(ht,{d:`M ${z} ${ee} L ${z+D} ${ee}`,width:D,height:1,stroke:pt,strokeWidth:1,"data-element-type":"shape",opacity:.08})),gt.push(d(Et,{x:z-8,y:ee,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:pt,children:Number.isInteger(bt)?bt.toString():bt.toFixed(1)}))});const ct=[],ut=[],mt=[],Pt=bt=>{if(bt.length===0)return"";if(bt.length===1){const At=bt[0];return`M ${At.x} ${At.y}`}const ee=[];ee.push(`M ${bt[0].x} ${bt[0].y}`);for(let At=0;At<bt.length-1;At++){const Bt=bt[At-1]||bt[At],pe=bt[At],le=bt[At+1],Te=bt[At+2]||le,He=pe.x+(le.x-Bt.x)/6,Nn=pe.y+(le.y-Bt.y)/6,ga=le.x-(Te.x-pe.x)/6,Lh=le.y-(Te.y-pe.y)/6;ee.push(`C ${He} ${Nn} ${ga} ${Lh} ${le.x} ${le.y}`)}return ee.join(" ")};p.forEach((bt,ee)=>{var At;const Bt=z+ee*k+P/2,pe=N+G((At=bt.value)!=null?At:0);ut.push({x:Bt,y:pe,datum:bt}),ct.push(d(n,vz(l2({},_),{indexes:[ee],datum:bt,x:Bt-P/2,y:N+o+4})));const le=Ct(c,[ee])||at.colorPrimary;mt.push({x:Bt,color:le})});const yt=mt.length>0?Math.min(...mt.map(bt=>bt.x)):z,Mt=mt.length>0?Math.max(...mt.map(bt=>bt.x)):z+D,te=Math.max(1,Mt-yt),he=mt.map(bt=>d("stop",{offset:`${(bt.x-yt)/te*100}%`,stopColor:bt.color})),ye=mt.map(bt=>d("stop",{offset:`${(bt.x-yt)/te*100}%`,stopColor:bt.color,stopOpacity:"0.18"}));if(mt.length>0){const bt=mt[mt.length-1].color;he.push(d("stop",{offset:"100%",stopColor:bt})),ye.push(d("stop",{offset:"100%",stopColor:bt,stopOpacity:"0.04"}))}const Ut=`chart-line-${Ju([D,o,pt,nt,mt.map(bt=>`${bt.x.toFixed(2)}-${bt.color}`).join()].join(":"))}`,ae=`${Ut}-stroke`,un=`${Ut}-area`,je=Pt(ut);tt.push(d(ht,{d:je,width:D,height:o,stroke:`url(#${ae})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const Nt=je.includes("C")?je.slice(je.indexOf("C")):"",yr=[`M ${ut[0].x} ${N+K}`,`L ${ut[0].x} ${ut[0].y}`,Nt,`L ${ut[ut.length-1].x} ${N+K}`,"Z"].join(" ");return tt.push(d(ht,{d:yr,width:D,height:o,fill:`url(#${un})`,stroke:"none","data-element-type":"shape"})),ut.forEach((bt,ee)=>{var At;const Bt=Ct(c,[ee])||at.colorPrimary;et.push(d(Lt,{x:bt.x-6,y:bt.y-6,width:12,height:12,fill:Bt,"data-element-type":"shape"})),l&&st.push(d(Et,{x:bt.x,y:bt.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:Bt,children:h((At=bt.datum.value)!=null?At:0,bt.datum)}))}),rt.push(d(ht,{d:`M ${z} ${N+K} L ${z+D} ${N+K}`,width:D,height:1,stroke:pt,strokeWidth:1,"data-element-type":"shape"})),rt.push(d(ht,{d:`M ${z} ${N} L ${z} ${N+o}`,width:1,height:o,stroke:pt,strokeWidth:1,"data-element-type":"shape"})),g&&vt.push(d(Et,{x:z+D/2,y:N+o+T+H/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pt,children:g})),y&&vt.push(d(Et,{x:w+S/2,y:N+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:pt,children:y})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,E(Y,{width:j,height:X,children:[E(zt,{children:[d("linearGradient",{id:ae,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:he}),E("linearGradient",{id:un,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[ye,d("stop",{offset:"100%",stopColor:nt,stopOpacity:"0.04"})]})]}),d(Y,{children:ft}),d(Y,{children:[...rt,...gt]}),d(Y,{children:tt}),d(Y,{children:et}),d(Y,{children:st}),d(Y,{children:vt}),d(It,{children:ct})]})]})};Tt("chart-line",{component:c2,composites:["title","item","xTitle","yTitle"]});const h2=t=>{var e;const{Title:n,Item:r,data:i,radius:o=140,innerRadius:s=0,padding:a=30,showPercentage:l=!0,options:c}=t,{title:h,desc:u,items:f=[]}=i,p=n?d(n,{title:h,desc:u}):null,g=Q(d(q,{indexes:[0]})),y=(e=f[0])!=null?e:{label:"",value:0},m=Q(d(r,{indexes:[0],datum:y,data:i,positionH:"center",positionV:"middle"})),b=m.width||140,v=m.height||32,x=Math.max(o,60),w=1.35,_=8,$=x*w+_+b,P=x,O=a+$,T=a+P,I=O*2,S=T*2;if(f.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(Y,{width:I,height:S,children:d(Ot,{children:d(q,{indexes:[0],x:O-g.width/2,y:T-g.height/2})})})]});const H=f.reduce((G,Z)=>{var K;return G+Math.max((K=Z.value)!=null?K:0,0)},0),C=re(c),A=xe(c.themeConfig),k=jA().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=Di().innerRadius(s).outerRadius(x).cornerRadius(2),z=Di().innerRadius(x).outerRadius(x),N=Di().innerRadius(x*1.15).outerRadius(x*1.15),j=s+(x-s)*.5,X=Di().innerRadius(j).outerRadius(j),L=Di().innerRadius(x*.85).outerRadius(x*.85),M=[],R=[],W=[],U=[],V=[];return k.forEach(G=>{const Z=G.data,K=G.index,nt=Ct(c,[K])||A.colorPrimary||C,at=D(G)||"";M.push(d(ht,{d:at,fill:nt,stroke:A.colorBg,strokeWidth:1,"data-element-type":"shape",width:x*2,height:x*2}));const ft=G.startAngle+(G.endAngle-G.startAngle)/2<Math.PI,rt=z.centroid(G),tt=N.centroid(G),st=[x*w*(ft?1:-1),tt[1]];W.push(d(ht,{d:`M${O+rt[0]} ${T+rt[1]} L${O+tt[0]} ${T+tt[1]} L${O+st[0]} ${T+st[1]}`,stroke:C,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const vt=O+st[0]+(ft?_:-_-b),gt=T+st[1]-v/2;if(U.push(d(r,{indexes:[K],datum:Z,data:i,x:vt,y:gt,width:b,height:v,positionH:ft?"normal":"flipped",positionV:"middle",themeColors:xe({colorPrimary:nt},c)})),l&&H>0){const ct=X.centroid(G),ut=Math.max(G.value,0),mt=(ut*100/H).toFixed(1),Pt=50,yt=20;R.push(d(Et,{x:O+ct[0]-Pt/2,y:T+ct[1]-yt/2,width:Pt,height:yt,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":ut,"data-indexes":[K],"data-element-type":kt.ItemValue,children:`${mt}%`}))}const dt=L.centroid(G);V.push(d(Ft,{indexes:[K],x:O+dt[0]-g.width/2,y:T+dt[1]-g.height/2}))}),k.forEach((G,Z)=>{const K=(Z+1)%k.length,nt=G.endAngle,at=k[K].startAngle+(K===0?Math.PI*2:0),pt=(nt+at)/2,ft=x*1,rt=Math.sin(pt)*ft,tt=-Math.cos(pt)*ft;V.push(d(q,{indexes:[Z+1],x:O+rt-g.width/2,y:T+tt-g.height/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p,E(Y,{width:I,height:S,children:[d(Y,{x:O,y:T,children:M}),d(Y,{children:W}),d(Y,{children:R}),d(It,{children:U}),d(Ot,{children:V})]})]})};Tt("chart-pie",{component:h2,composites:["title","item"]});var bz=Object.defineProperty,xz=Object.defineProperties,wz=Object.getOwnPropertyDescriptors,d2=Object.getOwnPropertySymbols,_z=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,u2=(t,e,n)=>e in t?bz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f2=(t,e)=>{for(var n in e||(e={}))_z.call(e,n)&&u2(t,n,e[n]);if(d2)for(var n of d2(e))$z.call(e,n)&&u2(t,n,e[n]);return t},p2=(t,e)=>xz(t,wz(e));const Pz=[0,30,-30,60,-60],Oz=Math.PI*(3-Math.sqrt(5));function g2(t,e,n){const r=Math.PI/180*n,i=Math.cos(r),o=Math.sin(r);return{width:Math.abs(t*i)+Math.abs(e*o),height:Math.abs(t*o)+Math.abs(e*i)}}function Cz(t,e,n,r,i,o){const s=t-o,a=t+n+o,l=e-o,c=e+r+o;return i.some(h=>{const u=h.box.x-o,f=h.box.x+h.box.width+o,p=h.box.y-o,g=h.box.y+h.box.height+o;return!(a<=u||s>=f||c<=p||l>=g)})}function Mz(t,e,n,r,i){const o=[],s=e?Pz:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*Oz;let f=0,p=null;for(let g=0;g<a&&!p;g++){g===Math.floor(a*.6)&&(f=h);const y=u+g*r,m=i*Math.sqrt(g+1)+f+h*.25,b=m*Math.cos(y),v=m*Math.sin(y);for(const x of s){const w=g2(l.width,l.height,x),_=b-w.width/2,$=v-w.height/2;if(!Cz(_,$,w.width,w.height,o,n)){p=p2(f2({},l),{angle:x,centerX:b,centerY:v,box:{x:_,y:$,width:w.width,height:w.height}});break}}}if(!p){const g=s[c%s.length],y=i*Math.sqrt(a+1)+h,m=u,b=y*Math.cos(m),v=y*Math.sin(m),x=g2(l.width,l.height,g);p=p2(f2({},l),{angle:g,centerX:b,centerY:v,box:{x:b-x.width/2,y:v-x.height/2,width:x.width,height:x.height}})}o.push(p)}),o}const m2=t=>{const{data:e,options:n,minFontSize:r=16,maxFontSize:i=48,enableRotate:o=!0,padding:s=6,spiralStep:a=.45,radiusStep:l=10}=t,{items:c=[]}=e,h=c.map((C,A)=>({datum:C,index:A})).filter(({datum:C})=>C.label);if(h.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:d(Y,{children:d(It,{})})});const u=h.map(({datum:C})=>C.value).filter(C=>typeof C=="number"),f=u.length>0,p=f?Math.min(...u):0,g=f?Math.max(...u):0,y=f&&p===g,m=(r+i)/2,b=C=>{if(!f||y)return m;if(C==null)return r;const A=(C-p)/(g-p||1);return r+A*(i-r)},v=h.map(({datum:C,index:A})=>{const B=b(C.value),k=Q(d(Et,{fontSize:B,fontWeight:"bold",children:C.label})),D=Ct(n,[A])||re(n);return{label:C.label,value:C.value,color:D,fontSize:B,width:k.width*1.05,height:k.height}}).sort((C,A)=>A.fontSize-C.fontSize),x=Mz(v,o,s,a,l),w=Math.min(...x.map(C=>C.box.x)),_=Math.min(...x.map(C=>C.box.y)),$=Math.max(...x.map(C=>C.box.x+C.box.width)),P=Math.max(...x.map(C=>C.box.y+C.box.height)),O=-w+s,T=-_+s,I=$-w+s*2,S=P-_+s*2,H=x.map((C,A)=>{const B=C.centerX-C.width/2+O,k=C.centerY-C.height/2+T,D=C.width/2,z=C.height/2,N=`translate(${B}, ${k}) rotate(${C.angle}, ${D}, ${z})`;return d(Y,{transform:N,children:d(Et,{width:C.width,height:C.height,fontSize:C.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:C.color,"data-indexes":A,"data-element-type":kt.ItemLabel,children:C.label})})});return d(It,{id:"infographic-container",width:I,height:S,children:H})};Tt("chart-wordcloud",{component:m2,composites:["item"]});const y2=new Map,oh=(t,e)=>{y2.set(t,e)},Sz=t=>{var e;return t&&(e=y2.get(t))!=null?e:null};var Ez=Object.defineProperty,Iz=Object.defineProperties,Tz=Object.getOwnPropertyDescriptors,v2=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,kz=Object.prototype.propertyIsEnumerable,b2=(t,e,n)=>e in t?Ez(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x2=(t,e)=>{for(var n in e||(e={}))Az.call(e,n)&&b2(t,n,e[n]);if(v2)for(var n of v2(e))kz.call(e,n)&&b2(t,n,e[n]);return t},w2=(t,e)=>Iz(t,Tz(e));oh("pros-cons-arrow",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=200,a=141,l={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return E(Y,{x:e,y:n,width:s,height:a,children:[E(ne,{children:[d("path",{d:"M137 54C137 54.2903 137 54.5806 136.706 54.7742L108.614 86.0323H64.7619C64.4071 86.0204 64.0557 86.1043 63.7453 86.2747C63.4349 86.4452 63.1773 86.6959 63 87C63.0037 86.7447 63.1092 86.5012 63.2936 86.3226L91.3862 55.0645H135.238C135.593 55.0763 135.944 54.9925 136.255 54.822C136.565 54.6516 136.823 54.4009 137 54.0968V54Z",fill:"#D9D9D9"}),d("path",{d:"M39.3272 0.484649C39.6146 0.234929 39.9662 0.0736935 40.3407 0.0198929C40.7152 -0.0339076 41.0971 0.0219605 41.4414 0.180925C41.7857 0.33989 42.0783 0.595358 42.2846 0.917314C42.491 1.23927 42.6026 1.61434 42.6063 1.99848V14.8156H136.013C136.54 14.8156 137.045 15.0282 137.418 15.4068C137.791 15.7853 138 16.2987 138 16.834V53.166C138 53.7013 137.791 54.2147 137.418 54.5932C137.045 54.9718 136.54 55.1844 136.013 55.1844H42.6063V68.0015C42.6026 68.3857 42.491 68.7607 42.2846 69.0827C42.0783 69.4046 41.7857 69.6601 41.4414 69.8191C41.0971 69.9781 40.7152 70.0339 40.3407 69.9801C39.9662 69.9263 39.6146 69.7651 39.3272 69.5154L0.672847 36.5138C0.461378 36.3244 0.292014 36.0915 0.176005 35.8305C0.0599968 35.5695 0 35.2864 0 35C0 34.7136 0.0599968 34.4306 0.176005 34.1696C0.292014 33.9085 0.461378 33.6756 0.672847 33.4862L39.4265 0.484649H39.3272Z",fill:r}),d("path",{d:"M157.394 73.0007C157.397 72.6162 157.509 72.2407 157.715 71.9183C157.922 71.596 158.214 71.3403 158.559 71.1811C158.903 71.022 159.285 70.9661 159.659 71.0199C160.034 71.0738 160.385 71.2352 160.673 71.4852L199.327 104.524C199.539 104.714 199.708 104.947 199.824 105.208C199.94 105.47 200 105.753 200 106.04C200 106.326 199.94 106.61 199.824 106.871C199.708 107.132 199.539 107.366 199.327 107.555L160.573 140.594C160.285 140.815 159.943 140.951 159.584 140.989C159.225 141.027 158.862 140.965 158.535 140.809C158.208 140.653 157.929 140.41 157.728 140.105C157.527 139.8 157.411 139.445 157.394 139.078V126.247H63.9874C63.4603 126.247 62.9548 126.034 62.5821 125.655C62.2094 125.276 62 124.762 62 124.226V87.8531C62 87.3172 62.2094 86.8032 62.5821 86.4242C62.9548 86.0453 63.4603 85.8324 63.9874 85.8324H157.394V73.0007Z",fill:i})]}),d(Et,w2(x2({x:40,y:15},l),{children:"Pros"})),d(Et,w2(x2({x:70,y:85},l),{children:"Cons"}))]})});var zz=Object.defineProperty,Lz=Object.defineProperties,Rz=Object.getOwnPropertyDescriptors,_2=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,Dz=Object.prototype.propertyIsEnumerable,$2=(t,e,n)=>e in t?zz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P2=(t,e)=>{for(var n in e||(e={}))Hz.call(e,n)&&$2(t,n,e[n]);if(_2)for(var n of _2(e))Dz.call(e,n)&&$2(t,n,e[n]);return t},O2=(t,e)=>Lz(t,Rz(e));oh("pros-cons-fold",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=240,a=300,l={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return E(Y,{x:e,y:n,width:s,height:a,children:[E(ne,{children:[d("path",{d:"M136.914 38.7755C137.303 38.7733 137.683 38.6617 138.011 38.4534C138.339 38.2451 138.602 37.9485 138.77 37.5977C138.937 37.247 139.002 36.8561 138.957 36.4701C138.913 36.084 138.76 35.7183 138.517 35.415L110.741 0.982313C110.548 0.735138 110.301 0.535238 110.018 0.397762C109.736 0.260286 109.426 0.188841 109.112 0.188841C108.798 0.188841 108.488 0.260286 108.206 0.397762C107.924 0.535238 107.676 0.735138 107.483 0.982313L79.7069 35.415C79.4639 35.7183 79.3113 36.084 79.2667 36.4701C79.222 36.8561 79.2871 37.247 79.4545 37.5977C79.6219 37.9485 79.8847 38.2451 80.213 38.4534C80.5412 38.6617 80.9216 38.7733 81.3104 38.7755H92.8965C93.0517 57.1293 97.5517 64.9878 105.259 73.7252C107.017 75.7932 108.983 77.8612 111.103 80.1361C113.276 82.4626 122.121 88.9252 131.069 95.181C129.362 88.7701 128.172 81.2218 127.293 73.7252C125.224 55.9918 125.017 38.7755 125.017 38.7755H136.914Z",fill:r,fillOpacity:.4}),d("path",{d:"M237.931 109.967C238.48 109.967 239.006 109.749 239.394 109.362C239.782 108.974 240 108.448 240 107.899V75.7932C240 75.2447 239.782 74.7187 239.394 74.3309C239.006 73.9431 238.48 73.7252 237.931 73.7252H127.241C128.172 81.2218 129.362 88.7701 131.069 95.181C138.182 100.171 145.337 105.1 152.534 109.967H237.931Z",fill:r}),d("path",{d:"M152.586 109.967C152.586 109.967 141.724 102.678 131.069 95.181C124.122 90.5838 117.455 85.5772 111.103 80.1878C109.034 77.8612 107.017 75.7415 105.259 73.7252H48.6207V56.6639C48.6091 56.2797 48.4905 55.9063 48.2784 55.5857C48.0662 55.2651 47.7689 55.0099 47.4197 54.8488C47.0705 54.6878 46.6833 54.6271 46.3016 54.6738C45.9199 54.7204 45.5587 54.8725 45.2586 55.1129L1.50002 90.2694C1.26208 90.4633 1.07029 90.7078 0.938585 90.985C0.80688 91.2622 0.738558 91.5652 0.738558 91.8721C0.738558 92.179 0.80688 92.482 0.938585 92.7592C1.07029 93.0365 1.26208 93.2809 1.50002 93.4748L45.2586 128.631C45.5621 128.874 45.928 129.027 46.3142 129.071C46.7005 129.116 47.0914 129.051 47.4424 128.884C47.7933 128.716 48.09 128.454 48.2984 128.125C48.5068 127.797 48.6185 127.417 48.6207 127.029V109.967H152.586Z",fill:"#BFBFBF"}),d("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),d("path",{d:"M103.086 261.224C102.697 261.227 102.317 261.338 101.989 261.547C101.661 261.755 101.398 262.051 101.23 262.402C101.063 262.753 100.998 263.144 101.043 263.53C101.087 263.916 101.24 264.282 101.483 264.585L129.259 299.018C129.452 299.265 129.699 299.465 129.982 299.602C130.264 299.74 130.574 299.811 130.888 299.811C131.202 299.811 131.512 299.74 131.794 299.602C132.076 299.465 132.324 299.265 132.517 299.018L160.293 264.585C160.536 264.282 160.689 263.916 160.733 263.53C160.778 263.144 160.713 262.753 160.546 262.402C160.378 262.051 160.115 261.755 159.787 261.547C159.459 261.338 159.078 261.227 158.69 261.224H147.103C146.948 242.871 142.448 235.012 134.741 226.275C132.983 224.207 131.017 222.139 128.897 219.864C126.724 217.537 117.879 211.075 108.931 204.819C110.677 211.877 111.938 219.045 112.707 226.275C114.776 244.008 114.983 261.224 114.983 261.224H103.086Z",fill:i,fillOpacity:.4}),d("path",{d:"M2.06897 190.033C1.52025 190.033 0.993996 190.251 0.605989 190.638C0.217983 191.026 5.00679e-06 191.552 5.00679e-06 192.101V224.207C5.00679e-06 224.755 0.217983 225.281 0.605989 225.669C0.993996 226.057 1.52025 226.275 2.06897 226.275H112.759C111.828 218.778 110.638 211.23 108.931 204.819C99.9827 198.512 90.931 192.411 88.2414 190.55C87.7206 190.204 87.1077 190.024 86.4828 190.033H2.06897Z",fill:i}),d("path",{d:"M87.4138 190.033C87.4138 190.033 98.2759 197.322 108.931 204.819C115.878 209.416 122.545 214.423 128.897 219.812C130.966 222.139 132.983 224.258 134.741 226.275H191.379V243.336C191.391 243.72 191.51 244.094 191.722 244.414C191.934 244.735 192.231 244.99 192.58 245.151C192.929 245.312 193.317 245.373 193.698 245.326C194.08 245.28 194.441 245.128 194.741 244.887L238.5 209.731C238.738 209.537 238.93 209.292 239.061 209.015C239.193 208.738 239.261 208.435 239.261 208.128C239.261 207.821 239.193 207.518 239.061 207.241C238.93 206.964 238.738 206.719 238.5 206.525L194.741 171.369C194.438 171.126 194.072 170.973 193.686 170.929C193.3 170.884 192.909 170.949 192.558 171.116C192.207 171.284 191.91 171.546 191.702 171.875C191.493 172.203 191.382 172.583 191.379 172.971V190.033H87.4138Z",fill:"#BFBFBF"}),d("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),d(Et,O2(P2({x:153,y:77},l),{children:"PROS"})),d(Et,O2(P2({x:2,y:193},l),{children:"CONS"}))]})}),oh("vs",t=>{const{x:e,y:n,colorPrimary:r,colorBg:i}=t,o=100,s=100,a=ot(r).lighten(20).toString();return E(Y,{x:e,y:n,width:o,height:s,children:[E(zt,{children:[d("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),d(vc,{})]}),d(Lt,{x:0,y:0,width:o,height:s,fill:a,filter:"url(#vs-divider-glow-filter)",opacity:.6}),d(Lt,{x:0,y:0,width:o,height:s,fill:r,"data-element-type":"shape"}),d("text",{x:o/2,y:s/2,fontSize:Math.min(o,s)/1.5,fontWeight:"bold",fill:i,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})});const C2=t=>{const{Title:e,Item:n,data:r,gap:i=20,groupGap:o=20,opposite:s=!0,flipped:a=!0,dividerType:l="vs",options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=f[0]||{children:[]},y=f[1]||{children:[]},m=g.children||[],b=y.children||[],v=xe(c.themeConfig),x=Q(d(n,{indexes:[0,0],data:r,datum:m[0]||{}})),w=Q(d(q,{indexes:[0]})),_=Sz(l),$=_?Q(d(_,{x:0,y:0,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:v.colorPrimary,colorNegative:v.colorPrimary})):{width:0,height:0},P=[],O=[],T=[],I=Math.max(m.length,b.length),S=I>0?I*(x.height+i)-i:0,H=5,C=I>0?i/2+w.height/2:w.height/2,A=w.width+H,B=A+x.width+o,k=B+$.width+o,D=a?"flipped":"normal",z=a?"normal":s?"flipped":"normal";if(m.forEach((N,j)=>{const X=C+j*(x.height+i),L=[0,j];P.push(d(n,{indexes:L,datum:N,data:r,x:A,y:X,positionH:D,positionV:"middle"})),O.push(d(Ft,{indexes:L,x:A-w.width-H,y:X+(x.height-w.height)/2})),j<m.length-1&&O.push(d(q,{indexes:[0,j+1],x:A+(x.width-w.width)/2,y:X+x.height+i/2-w.height/2}))}),m.length>0){O.push(d(q,{indexes:[0,0],x:A+(x.width-w.width)/2,y:C-i/2-w.height/2}));const N=C+(m.length-1)*(x.height+i);O.push(d(q,{indexes:[0,m.length],x:A+(x.width-w.width)/2,y:N+x.height+i/2-w.height/2}))}else f.length>=1&&O.push(d(q,{indexes:[0,0],x:A+(x.width-w.width)/2,y:C-w.height/2}));if(b.forEach((N,j)=>{const X=C+j*(x.height+i),L=[1,j];P.push(d(n,{indexes:L,datum:N,data:r,x:k,y:X,positionH:z,positionV:"middle"})),O.push(d(Ft,{indexes:L,x:k+x.width+H,y:X+(x.height-w.height)/2})),j<b.length-1&&O.push(d(q,{indexes:[1,j+1],x:k+(x.width-w.width)/2,y:X+x.height+i/2-w.height/2}))}),b.length>0){O.push(d(q,{indexes:[1,0],x:k+(x.width-w.width)/2,y:C-i/2-w.height/2}));const N=C+(b.length-1)*(x.height+i);O.push(d(q,{indexes:[1,b.length],x:k+(x.width-w.width)/2,y:N+x.height+i/2-w.height/2}))}else f.length>=2&&O.push(d(q,{indexes:[1,0],x:k+(x.width-w.width)/2,y:C-w.height/2}));return f.length<2&&O.push(d(q,{indexes:[1],x:k+(x.width-w.width)/2,y:C+(S-w.height)/2})),_&&T.push(d(_,{x:B,y:C+(S-$.height)/2,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:Ct(c,[0])||v.colorPrimary,colorNegative:Ct(c,[1])||v.colorPrimary})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{children:[d(Y,{children:T}),d(It,{children:P}),d(Ot,{children:O})]})]})};Tt("compare-binary-horizontal",{component:C2,composites:["title","item"]});var Nz=Object.defineProperty,M2=Object.getOwnPropertySymbols,jz=Object.prototype.hasOwnProperty,Fz=Object.prototype.propertyIsEnumerable,S2=(t,e,n)=>e in t?Nz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E2=(t,e)=>{for(var n in e||(e={}))jz.call(e,n)&&S2(t,n,e[n]);if(M2)for(var n of M2(e))Fz.call(e,n)&&S2(t,n,e[n]);return t};const Bz={none:5,"dot-line":100,"arc-dot":20,"split-line":5},I2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=20,groupGap:a=0,decoration:l="none",surround:c=!0,flipRoot:h=!1,flipLeaf:u=!1,options:f}=t,[p,g]=i,{title:y,desc:m,items:b=[]}=o,v=r?d(r,{title:y,desc:m}):null,x=d(p,{indexes:[0],data:o,datum:o.items[0],themeColors:{}}),w=d(g,{indexes:[0,0],data:o,datum:((n=(e=b[0])==null?void 0:e.children)==null?void 0:n[0])||b[2]}),_=Q(x),$=Q(w),P=[],O=[],[T,I]=b,S=(T==null?void 0:T.children)||[],H=(I==null?void 0:I.children)||[],C=Math.max(_.height,S.length*($.height+s)-s,H.length*($.height+s)-s),A=Bz[l]||0,B=$.width+A,k=B+_.width+a,D=(C-_.height)/2;T&&P.push(d(p,{indexes:[0],x:B,y:D,data:o,datum:T,positionH:h?"normal":"flipped"})),I&&P.push(d(p,{indexes:[1],x:k,y:D,data:o,datum:I,positionH:h?"flipped":"normal"}));const z=(N,j,X)=>{if(l==="none")return;const[L,M]=j,R=Ct(f,X),W={x:L,y:M,width:$.width,height:$.height,side:N,color:R||"#ccc",colorBg:f.themeConfig.colorBg||"#fff"};l==="split-line"?O.push(d(Wz,E2({},W))):l==="dot-line"&&O.push(d(Vz,E2({},W)))};if(c){const j=(2*_.width+a+$.width)/2+A,X=B+_.width+a/2,L=D+_.height/2;S.forEach((M,R)=>{const W=S.length*($.height+s)-s,V=(C-W)/2+R*($.height+s),Z=V+$.height/2-L,K=Math.max(0,j*j-Z*Z),at=X-Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[0,R],datum:M,data:o,x:at,y:V,positionH:u?"flipped":"normal"})),z("left",[at,V],[0,R])}),H.forEach((M,R)=>{const W=H.length*($.height+s)-s,V=(C-W)/2+R*($.height+s),Z=V+$.height/2-L,K=Math.max(0,j*j-Z*Z),at=X+Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[1,R],datum:M,data:o,x:at,y:V,positionH:u?"normal":"flipped"})),z("right",[at,V],[1,R])})}else S.forEach((N,j)=>{const X=S.length*($.height+s)-s,M=(C-X)/2+j*($.height+s),R=[0,j],W=0;P.push(d(g,{indexes:R,datum:N,data:o,x:W,y:M,positionH:u?"flipped":"normal"})),z("left",[W,M],R)}),H.forEach((N,j)=>{const X=H.length*($.height+s)-s,M=(C-X)/2+j*($.height+s),R=[1,j],W=k+_.width+A;P.push(d(g,{indexes:R,datum:N,data:o,x:W,y:M,positionH:u?"normal":"flipped"})),z("right",[W,M],R)});return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,E(Y,{children:[d(It,{children:P}),d(Y,{width:0,height:0,children:O})]})]})},Wz=t=>{const{x:e,y:n,width:r,height:i,color:o,colorBg:s,side:a}=t,l=n+i,c=`split-line-linear-gradient-${a}`;return E(Rt,{children:[d(zt,{children:d(bc,{id:c,startColor:o,stopColor:s,direction:a==="left"?"left-right":"right-left"})}),d(St,{x:e,y:l,width:r,height:1,fill:`url(#${c})`})]})},Vz=t=>{const{x:e,y:n,side:r,width:i,height:o,color:s,colorBg:a}=t,l=6,c=l/3,h=l*2,u=c*2,f=5,p=r==="left"?e+i+l+f:e-l-f,g=n+o/2,y=p-c,m=g-c,b=80,v=r==="left"?b:-b,x=`dot-line-linear-gradient-${r}`;return E(Y,{children:[d(zt,{children:d(bc,{id:x,startColor:s,stopColor:a,direction:r==="left"?"left-right":"right-left"})}),E(ne,{children:[d(Lt,{x:p-l,y:g-l,width:h,height:h,fill:"none",strokeWidth:1,stroke:s}),d(Lt,{x:y,y:m,width:u,height:u,fill:s})]}),d(St,{x:r==="left"?p:p+v,y:g-.5,width:b,height:1,fill:`url(#${x})`})]})};Tt("compare-hierarchy-left-right",{component:I2,composites:["title","item"]});const T2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=0,itemGap:a=20,columnWidth:l=280,itemPadding:c=5,showColumnBackground:h=!0,columnBackgroundAlpha:u=.08,options:f}=t,[p,g]=i,{title:y,desc:m,items:b=[]}=o,v=r?d(r,{title:y,desc:m}):null,x=fg(f),w=[],_=[],$=l-c*2,P=Q(d(p,{indexes:[0],data:o,datum:b[0],width:l})),O=Q(d(g,{indexes:[0,0],data:o,datum:((n=(e=b[0])==null?void 0:e.children)==null?void 0:n[0])||{},width:$})),T=Q(d(q,{indexes:[0]})),I=Math.max(...b.map(H=>{var C;return((C=H.children)==null?void 0:C.length)||0}),0),S=P.height+a+I*(O.height+a);if(b.forEach((H,C)=>{const{children:A=[]}=H,B=C*(l+s),k=B,D=0;if(h){const X=`${x[C%x.length]}${Math.round(u*255).toString(16).padStart(2,"0")}`;w.push(d(St,{x:B,y:D,width:l,height:S,fill:X,rx:0,ry:0,"data-element-type":"shape"}))}w.push(d(p,{indexes:[C],datum:H,data:o,x:k,y:D,width:l})),_.push(d(Ft,{indexes:[C],x:k+P.width-T.width-10,y:D+10})),C===0&&_.push(d(q,{indexes:[C],x:k+P.width/2-T.width/2,y:D-T.height-5}));const z=D+P.height+a;A.forEach((j,X)=>{const L=z+X*(O.height+a),M=k+c,R=[C,X];w.push(d(g,{indexes:R,datum:j,data:o,x:M,y:L,width:$})),_.push(d(Ft,{indexes:R,x:M+O.width-T.width-10,y:L+(O.height-T.height)/2})),X<A.length-1&&_.push(d(q,{indexes:[C,X+1],x:M+O.width/2-T.width/2,y:L+O.height-T.height/2}))});const N=k+c;if(A.length>0){const j=z+A.length*(O.height+a);_.push(d(q,{indexes:[C,A.length],x:N+O.width/2-T.width/2,y:j-O.height/2-T.height/2}))}else _.push(d(q,{indexes:[C,0],x:N+O.width/2-T.width/2,y:z-a/2-T.height/2}))}),b.length>0){const H=b.length*(l+s);_.push(d(q,{indexes:[b.length],x:H-s/2-T.width/2,y:-T.height-5}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,E(Y,{children:[d(It,{children:w}),d(Ot,{children:_})]})]})};Tt("compare-hierarchy-row",{component:T2,composites:["title","item"]});const sh=Object.assign,Yz={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class Ds{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof Ds||"x"in e&&"y"in e&&"children"in e){const o=e;return this.data=o.data,this.id=o.id,this.x=o.x,this.y=o.y,this.width=o.width,this.height=o.height,this.depth=o.depth,this.children=o.children,this.parent=o.parent,this.hgap=o.hgap,this.vgap=o.vgap,this.preH=o.preH,void(this.preV=o.preV)}this.data=e;const r=n.getHGap(e),i=n.getVGap(e);this.preH=n.getPreH(e),this.preV=n.getPreV(e),this.width=n.getWidth(e),this.height=n.getHeight(e),this.width+=this.preH,this.height+=this.preV,this.id=n.getId(e),this.addGap(r,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(e,n){this.hgap+=e,this.vgap+=n,this.width+=2*e,this.height+=2*n}eachNode(e){let n,r=[this];for(;n=r.shift();)e(n),r=n.children.concat(r)}DFTraverse(e){this.eachNode(e)}BFTraverse(e){let n,r=[this];for(;n=r.shift();)e(n),r=r.concat(n.children)}getBoundingBox(){const e={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(n=>{e.left=Math.min(e.left,n.x),e.top=Math.min(e.top,n.y),e.width=Math.max(e.width,n.x+n.width),e.height=Math.max(e.height,n.y+n.height)}),e}translate(e=0,n=0){this.eachNode(r=>{r.x+=e,r.y+=n,r.x+=r.preH,r.y+=r.preV})}right2left(){const e=this.getBoundingBox();this.eachNode(n=>{n.x=n.x-2*(n.x-e.left)-n.width}),this.translate(e.width,0)}bottom2top(){const e=this.getBoundingBox();this.eachNode(n=>{n.y=n.y-2*(n.y-e.top)-n.height}),this.translate(0,e.height)}}function ah(t,e={},n){e=sh({},Yz,e);const r=new Ds(t,e),i=[r];let o;if(!n&&!t.collapsed){for(;o=i.shift();)if(!o.data.collapsed){const s=e.getChildren(o.data),a=s?s.length:0;if(o.children=new Array(a),s&&a)for(let l=0;l<a;l++){const c=new Ds(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class Xz{constructor(e,n={}){this.options=n,this.rootNode=ah(e,n)}execute(){throw new Error("please override this method")}}function Gz(t,e){const n=ah(t.data,e,!0),r=ah(t.data,e,!0),i=t.children.length,o=Math.round(i/2),s=e.getSide||function(a,l){return l<o?"right":"left"};for(let a=0;a<i;a++){const l=t.children[a];s(l,a)==="right"?r.children.push(l):n.children.push(l)}return n.eachNode(a=>{a.isRoot()||(a.side="left")}),r.eachNode(a=>{a.isRoot()||(a.side="right")}),{left:n,right:r}}const Ln=["LR","RL","TB","BT","H","V"],qz=["LR","RL","H"],Uz=Ln[0];function Zz(t,e,n){const r=e.direction||Uz;if(e.isHorizontal=(o=>qz.indexOf(o)>-1)(r),Ln.indexOf(r)===-1)throw new TypeError(`Invalid direction: ${r}`);if(r===Ln[0])n(t,e);else if(r===Ln[1])n(t,e),t.right2left();else if(r===Ln[2])n(t,e);else if(r===Ln[3])n(t,e),t.bottom2top();else if(r===Ln[4]||r===Ln[5]){const{left:o,right:s}=Gz(t,e);n(o,e),n(s,e),e.isHorizontal?o.right2left():o.bottom2top(),s.translate(o.x-s.x,o.y-s.y),t.x=o.x,t.y=s.y;const a=t.getBoundingBox();e.isHorizontal?a.top<0&&t.translate(0,-a.top):a.left<0&&t.translate(-a.left,0)}let i=e.fixedRoot;return i===void 0&&(i=!0),i&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),(function(o,s){if(s.radial){const[a,l]=s.isHorizontal?["x","y"]:["y","x"],c={x:1/0,y:1/0},h={x:-1/0,y:-1/0};let u=0;o.DFTraverse(g=>{u++;const{x:y,y:m}=g;c.x=Math.min(c.x,y),c.y=Math.min(c.y,m),h.x=Math.max(h.x,y),h.y=Math.max(h.y,m)});const f=h[l]-c[l];if(f===0)return;const p=2*Math.PI/u;o.DFTraverse(g=>{const y=g[l],m=c[l],b=g[a],v=o[a],x=(y-m)/f*(2*Math.PI-p)+p,w=b-v;g.x=Math.cos(x)*w,g.y=Math.sin(x)*w})}})(t,e),t}function A2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=A2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function k2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{k2(a)});const r=e[0],i=e[n-1],o=i.y-r.y+i.height;let s=0;if(e.forEach(a=>{s+=a.totalHeight}),o>t.height)t.y=r.y+o/2-t.height/2;else if(e.length!==1||t.height>s){const a=t.y+(t.height-o)/2-r.y;e.forEach(l=>{l.translate(0,a)})}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}const Kz={getSubTreeSep:()=>0};function Qz(t,e={}){return e=sh({},Kz,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse(n=>{n.x=n.parent.x+n.parent.width}),t.parent=void 0,A2(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode(n=>{const r=n.children,i=r.length;if(i){const o=r[0];if(o.startY=n.startY+n._subTreeSep,i===1)o.y=n.y+n.height/2-o.height/2;else{o.y=o.startY+o.totalHeight/2-o.height/2;for(let s=1;s<i;s++){const a=r[s];a.startY=r[s-1].startY+r[s-1].totalHeight,a.y=a.startY+a.totalHeight/2-a.height/2}}}}),k2(t),t}class Jz extends Xz{execute(){return Zz(this.rootNode,this.options,Qz)}}const tL={};function eL(t,e){const n=sh({},tL,e);return new Jz(t,n).execute()}var nL=Object.defineProperty,rL=Object.defineProperties,iL=Object.getOwnPropertyDescriptors,z2=Object.getOwnPropertySymbols,oL=Object.prototype.hasOwnProperty,sL=Object.prototype.propertyIsEnumerable,L2=(t,e,n)=>e in t?nL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aL=(t,e)=>{for(var n in e||(e={}))oL.call(e,n)&&L2(t,n,e[n]);if(z2)for(var n of z2(e))sL.call(e,n)&&L2(t,n,e[n]);return t},lL=(t,e)=>rL(t,iL(e));const cL=60,hL=14,R2=30,H2="center",dL="curved",uL=2,fL="node",pL="solid",D2=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return lL(aL({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>D2(s,o,a)))!=null?i:[]})},N2=(t,e,n,r)=>{var i,o;e.push(t),(o=(i=t.data)._flatIndex)!=null||(i._flatIndex=e.length-1),r&&n.push({parent:r,child:t});const s=t.children;s==null||s.forEach(a=>N2(a,e,n,t))},gL=(t,e,n,r)=>{const i=Math.abs(n-t)/2,o=n>t?t+i:t-i,s=n>t?n-i:n+i;return`M ${t} ${e} C ${o} ${e} ${s} ${r} ${n} ${r}`},mL=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,yL=(t,e,n,r=H2)=>{const i=c=>Math.max(0,Math.min(1,c)),s=(c=>c==="top"?0:c==="bottom"?1:c==="center"?.5:i(c))(r),a=t.y+t.height*s,l=e.y+e.height*s;return n==="left"?{sx:t.x,sy:a,tx:e.x+e.width,ty:l}:{sx:t.x+t.width,sy:a,tx:e.x,ty:l}},j2=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=cL,nodeGap:a=hL,edgeAlign:l=H2,colorMode:c=fL,edgeColorMode:h=pL,edgeType:u=dL,edgeWidth:f=uL,options:p}=t,{title:g,desc:y,items:m=[]}=o,b=r?d(r,{title:g,desc:y}):null,v=re(p),x=Q(d(q,{indexes:[0]}));if(!m.length||!(i!=null&&i.length))return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,d(Y,{children:d(q,{indexes:[0],x:0,y:0})})]});const w=D2(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,O=(R,W)=>Pi({depth:W,originalIndexes:R._indexes,flatIndex:R._flatIndex},c),T=(R,W)=>{const U=P.get(R);if(U)return U;const V=O(R,W),G=Ct(p,V),Z=xe({colorPrimary:G},p);return P.set(R,Z),$.set(R,G),Z},I=R=>{const W=_.get(R);if(W)return W;const U=Math.max(R._indexes.length-1,0),V=hs(i,U),G=Q(d(V,{indexes:R._indexes,data:o,datum:R,positionH:"center",positionV:"middle",themeColors:T(R,U)}));return _.set(R,G),G},S=eL(w,{direction:"H",getSide:(R,W)=>{if(!R.parent)return"right";const U=(R.parent.children||[]).indexOf(R);return(U>=0?U:W)%2===0?"left":"right"},getWidth:R=>I(R).width,getHeight:R=>I(R).height,getHGap:()=>s,getVGap:()=>a}),H=[],C=[];N2(S,H,C);const A=H.length>0?Math.min(...H.map(R=>R.x)):0,B=H.length>0?Math.min(...H.map(R=>R.y)):0,k=R2-A,D=R2-B,z=[],N=[],j=[],X=[],L=new WeakMap;H.forEach(R=>{var W,U;const V=R.data,G=I(V),Z=R.x+k+((W=R.hgap)!=null?W:0),K=R.y+D+((U=R.vgap)!=null?U:0),nt=hs(i,R.depth),at=R.depth===0?"center":R.side==="left"?"flipped":"normal",pt=T(V,R.depth);j.push(d(nt,{indexes:V._indexes,data:o,datum:V,x:Z,y:K,positionH:at,positionV:"middle",themeColors:pt})),L.set(R,{x:Z,y:K,width:G.width,height:G.height,centerX:Z+G.width/2,centerY:K+G.height/2})}),C.forEach(R=>{var W,U,V,G;const{parent:Z,child:K}=R,nt=L.get(K),at=L.get(Z);if(!nt||!at)return;const pt=K.data,{sx:ft,sy:rt,tx:tt,ty:et}=yL(at,nt,K.side,l),st=(W=$.get(pt))!=null?W:Ct(p,O(pt,K.depth)),vt=(U=$.get(Z.data))!=null?U:Ct(p,O(Z.data,Z.depth)),gt=u==="straight"?mL(ft,rt,tt,et):gL(ft,rt,tt,et),dt=`edge-gradient-${pt._indexes.join("-")}`;N.push(d(ht,{d:gt,stroke:h==="gradient"?`url(#${dt})`:st!=null?st:v,strokeWidth:f,fill:"none"})),h==="gradient"&&z.push(E("linearGradient",{id:dt,gradientUnits:"userSpaceOnUse",x1:ft,y1:rt,x2:tt,y2:et,children:[d("stop",{offset:"0%",stopColor:vt!=null?vt:v}),d("stop",{offset:"100%",stopColor:st!=null?st:v})]}));const ct=(G=(V=pt.children)==null?void 0:V.length)!=null?G:0,ut=[...pt._indexes,ct],mt=nt.x+(nt.width-x.width)/2,Pt=nt.y+nt.height+8,yt=Pt+x.height+6;K.depth>0&&X.push(d(Ft,{indexes:pt._indexes,x:mt,y:Pt})),X.push(d(q,{indexes:ut,x:mt,y:yt}))});const M=L.get(S);if(M){const R=S.data,W=(n=(e=R.children)==null?void 0:e.length)!=null?n:0,U=[...R._indexes,W],V=M.x+(M.width-x.width)/2,G=M.y+M.height+8+x.height+6;X.push(d(q,{indexes:U,x:V,y:G}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,E(Y,{children:[z.length>0?d(zt,{children:z}):null,d(Y,{children:N}),d(It,{children:j}),d(Ot,{children:X})]})]})};Tt("hierarchy-mindmap",{component:j2,composites:["title","item"]});var vL=Object.defineProperty,bL=Object.defineProperties,xL=Object.getOwnPropertyDescriptors,F2=Object.getOwnPropertySymbols,wL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,B2=(t,e,n)=>e in t?vL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ns=(t,e)=>{for(var n in e||(e={}))wL.call(e,n)&&B2(t,n,e[n]);if(F2)for(var n of F2(e))_L.call(e,n)&&B2(t,n,e[n]);return t},js=(t,e)=>bL(t,xL(e));const W2=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},V2=t=>{const{Title:e,Items:n,data:r,levelGap:i=80,nodeGap:o=60,edgeType:s="straight",edgeColorMode:a="gradient",edgeWidth:l=3,edgeStyle:c="solid",edgeDashPattern:h="5,5",edgeCornerRadius:u=0,edgeOffset:f=0,edgeOrigin:p="center",edgeOriginPadding:g=20,edgeMarker:y="none",markerSize:m=12,colorMode:b="branch",orientation:v="top-bottom",options:x}=t,w=v==="left-right"||v==="right-left",_=v==="bottom-top"||v==="right-left"?-1:1,{title:$,desc:P}=r,O=re(x),T=rt=>{var tt;const et=[...rt];return(tt=et[0])!=null&&tt.children||(et[0]=js(Ns({},et[0]),{children:et.slice(1)}),et.splice(1)),et},I=(rt,tt,et,st,vt,gt="vertical")=>{const dt=gt==="vertical",ct=dt?st-tt:et-rt,ut=dt?et-rt:st-tt,mt=ct===0?1:Math.sign(ct),Pt=ut===0?1:Math.sign(ut),yt=dt?tt+ct/2:rt+ct/2,Mt=Math.min(vt,Math.abs(ct)/2,Math.abs(ut)/2);return Mt===0?dt?`M ${rt} ${tt} L ${rt} ${yt} L ${et} ${yt} L ${et} ${st}`:`M ${rt} ${tt} L ${yt} ${tt} L ${yt} ${st} L ${et} ${st}`:dt?`M ${rt} ${tt}
|
|
83
|
-
L ${
|
|
84
|
-
Q ${
|
|
85
|
-
L ${
|
|
86
|
-
Q ${
|
|
87
|
-
L ${
|
|
88
|
-
L ${
|
|
89
|
-
Q ${
|
|
90
|
-
L ${
|
|
91
|
-
Q ${
|
|
92
|
-
L ${et} ${st}`},S=rt=>{const{x:tt,y:et}=rt;return w?{x:et*_,y:tt}:{x:tt,y:et*_}},H=(rt,tt,et)=>{const{x:st,y:vt}=S(rt),gt=st+et.x,dt=vt+et.y,ct=dt+tt.height/2;return{centerX:gt,centerY:ct,left:gt-tt.width/2,right:gt+tt.width/2,top:dt,bottom:dt+tt.height}},C=rt=>{var tt;if(!rt.length)return null;const et=rt[0],st=(vt,gt=[],dt=0)=>{var ct,ut;const mt=[...gt,dt];return js(Ns({},vt),{_originalIndex:mt,_depth:mt.length-1,children:(ut=(ct=vt.children)==null?void 0:ct.map((Pt,yt)=>st(Pt,mt,yt)))!=null?ut:[]})};return(tt=et.children)!=null&&tt.length?st(et):js(Ns({},et),{_originalIndex:[0],_depth:0,children:rt.slice(1).map((vt,gt)=>js(Ns({},vt),{_originalIndex:[gt+1],_depth:1}))})},A=rt=>{var tt,et;let st=0,vt=0;const gt=new Map,dt=new Map;rt.each(ct=>{dt.has(ct.depth)||dt.set(ct.depth,ct.data)});for(let ct=0;ct<rt.height+1;ct++){const ut=hs(n,ct),mt=(tt=dt.get(ct))!=null?tt:{},Pt=(et=mt._originalIndex)!=null?et:Array(ct+1).fill(0),yt=Q(d(ut,{indexes:Pt,data:r,datum:mt,positionH:"center"}));gt.set(ct,yt),st=Math.max(st,yt.width),vt=Math.max(vt,yt.height)}return{levelBounds:gt,maxWidth:st,maxHeight:vt}},B=(rt,tt,et,st,vt,gt)=>{const{depth:dt,data:ct,parent:ut}=rt,mt=ct._originalIndex,Pt=hs(n,dt),yt=tt.get(dt),Mt=H(rt,yt,st),te=Mt.left,he=Mt.top,ye={items:[],btns:[],deco:[]},Ut=Pi({depth:dt,originalIndexes:mt,flatIndex:ct._flatIndex},b),ae=Ct(x,Ut),un=xe({colorPrimary:ae},x);if(ye.items.push(d(Pt,{indexes:mt,datum:ct,data:r,x:te,y:he,positionH:"center",themeColors:un})),ye.btns.push(d(Ft,{indexes:mt,x:te+(yt.width-et.width)/2,y:he+yt.height+5}),d(q,{indexes:[...mt,0],x:te+(yt.width-et.width)/2,y:he+yt.height+et.height+10})),ut){const je=tt.get(ut.depth),Nt=H(ut,je,st),yr=gt.filter(Gt=>Gt.parent===ut),bt=yr.findIndex(Gt=>Gt===rt),ee=yr.length;let At,Bt;if(p==="distributed"&&ee>1)if(w){const Gt=W2(g,je.height),Ze=Nt.top+Gt,vr=(Nt.bottom-Gt-Ze)/ee;Bt=Ze+vr*bt+vr/2,At=(_>0?Nt.right:Nt.left)+f*_}else{const Gt=W2(g,je.width),Ze=Nt.left+Gt,vr=(Nt.right-Gt-Ze)/ee;At=Ze+vr*bt+vr/2,Bt=(_>0?Nt.bottom:Nt.top)+f*_}else At=w?(_>0?Nt.right:Nt.left)+f*_:Nt.centerX,Bt=w?Nt.centerY:(_>0?Nt.bottom:Nt.top)+f*_;const pe=w?(_>0?Mt.left:Mt.right)-f*_:Mt.centerX,le=w?Mt.centerY:(_>0?Mt.top:Mt.bottom)-f*_;let Te=pe,He=le;y==="arrow"&&(w?Te-=m*_:He-=m*_);let Nn;if(s==="curved")if(w){const Gt=At+(Te-At)/2;Nn=`M ${At} ${Bt} C ${Gt} ${Bt}, ${Gt} ${He}, ${Te} ${He}`}else{const Gt=Bt+(He-Bt)/2;Nn=`M ${At} ${Bt} C ${At} ${Gt}, ${Te} ${Gt}, ${Te} ${He}`}else if(u>0)Nn=I(At,Bt,Te,He,u,w?"horizontal":"vertical");else if(w){const Gt=At+(Te-At)/2;Nn=`M ${At} ${Bt} L ${Gt} ${Bt} L ${Gt} ${He} L ${Te} ${He}`}else{const Gt=Bt+(He-Bt)/2;Nn=`M ${At} ${Bt} L ${At} ${Gt} L ${Te} ${Gt} L ${Te} ${He}`}let ga=O;if(a==="gradient"){const Gt=Pi({depth:ut.depth,originalIndexes:ut.data._originalIndex,flatIndex:ut.data._flatIndex},b),Ze=Pi({depth:dt,originalIndexes:mt,flatIndex:ct._flatIndex},b),Yi=Ct(x,Gt),vr=Ct(x,Ze),$v=`gradient-${ut.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(E("linearGradient",{id:$v,x1:At,y1:Bt,x2:Te,y2:He,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:Yi}),d("stop",{offset:"100%",stopColor:vr})]})),ga=`url(#${$v})`}const Lh=c==="dashed"?h:"";if(ye.deco.push(d(ht,{d:Nn,stroke:ga,strokeWidth:l,strokeDasharray:Lh,fill:"none"})),y==="arrow"){const Gt=a==="gradient"?Ct(x,Ut):re(x),Ze=w?[{x:pe,y:le},{x:pe-m*_,y:le-m/2},{x:pe-m*_,y:le+m/2}]:[{x:pe,y:le},{x:pe-m/2,y:le-m*_},{x:pe+m/2,y:le-m*_}];ye.deco.push(d(Ne,{points:Ze,fill:Gt,width:m,height:m}))}if(y==="dot"){const Gt=Pi({depth:ut.depth,originalIndexes:ut.data._originalIndex,flatIndex:ut.data._flatIndex},b),Ze=a==="gradient"?Ct(x,Gt):re(x);ye.deco.push(d(Lt,{x:(w?_>0?Nt.right+f:Nt.left-f:At)-m,y:(w?Bt:_>0?Nt.bottom+f:Nt.top-f)-m,width:m*2,height:m*2,fill:Ze}));const Yi=a==="gradient"?Ct(x,Ut):re(x);ye.deco.push(d(Lt,{x:pe-m,y:le-m,width:m*2,height:m*2,fill:Yi}))}}return ye},k=(rt,tt,et)=>{const st=new Map;rt.forEach(gt=>{var dt;const ct=gt.parent?gt.parent.data._originalIndex.join("-"):"root";((dt=st.get(ct))!=null?dt:st.set(ct,[]).get(ct)).push(gt)});const vt=[];return st.forEach(gt=>{if(gt.length<=1)return;const dt=gt.slice().sort((ct,ut)=>w?S(ct).y-S(ut).y:S(ct).x-S(ut).x);if(dt.length!==0)for(let ct=0;ct<dt.length-1;ct++){const ut=S(dt[ct]),mt=S(dt[ct+1]),Pt=dt[ct].data._originalIndex.slice(0,-1),yt=dt[ct].data._originalIndex.at(-1)+1;if(w){const Mt=ut.x+et.x+(_>0?-tt.width-5:tt.width+5),te=(ut.y+mt.y)/2+et.y-tt.height/2;vt.push(d(q,{indexes:[...Pt,yt],x:Mt,y:te}))}else{const Mt=ut.y+et.y-tt.height-5,te=(ut.x+mt.x)/2+et.x-tt.width/2;vt.push(d(q,{indexes:[...Pt,yt],x:te,y:Mt}))}}}),vt},D=T(r.items),z=e?d(e,{title:$,desc:P}):null,N=Q(d(q,{indexes:[0]}));if(!D.length)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[z,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:-N.width/2,y:-N.height/2})})})]});const j=C(D),X=Uc(j),{levelBounds:L,maxWidth:M,maxHeight:R}=A(X),U=gA().nodeSize(w?[R+o,M+i]:[M+o,R+i]).separation(()=>1)(X).descendants(),V=U.map(rt=>S(rt)),G=Math.min(...V.map(rt=>rt.x)),Z=Math.min(...V.map(rt=>rt.y)),K={x:Math.max(0,-G+M/2),y:Math.max(0,-Z+N.height+10)},nt=[],at=[],pt=[],ft=[];return U.forEach((rt,tt)=>{rt.data._flatIndex=tt;const{x:et,y:st}=S(rt);rt.__layout={x:et,y:st}}),U.forEach(rt=>{const{items:tt,btns:et,deco:st}=B(rt,L,N,K,ft,U);nt.push(...tt),at.push(...et),pt.push(...st)}),at.push(...k(U,N,K)),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[z,E(Y,{children:[ft.length>0&&d(zt,{children:ft}),d(ne,{children:pt}),d(It,{children:nt}),d(Ot,{children:at})]})]})};Tt("hierarchy-tree",{component:V2,composites:["title","item"]});const Y2=t=>{const{Title:e,Item:n,data:r,gap:i=20,width:o,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:c[0]})),f=o||u.width,p=e?d(e,{title:a,desc:l}):null,g=[],y=[],m=(f-h.width)/2;if(c.forEach((b,v)=>{const x=(u.height+i)*v,w=[v];y.push(d(n,{indexes:w,datum:b,data:r,y:x,width:f,positionV:"middle",positionH:s?v%2===0?"normal":"flipped":"normal"})),g.push(d(Ft,{indexes:w,x:-h.width-10,y:x+(u.height-h.height)/2}));const _=v===0?-h.height:x-i/2-h.height/2;g.push(d(q,{indexes:w,x:m,y:_}))}),c.length>0){const v=(u.height+i)*(c.length-1)+u.height;g.push(d(q,{indexes:[c.length],x:m,y:v}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{children:[d(It,{children:y}),d(Ot,{children:g})]})]})};Tt("list-column",{component:Y2,composites:["title","item"]});const X2=t=>{const{Title:e,Item:n,data:r,columns:i=3,gap:o=24,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.height+o,m=f.width+o,b=new Set;return c.forEach((v,x)=>{const w=Math.floor(x/i),_=x%i,$=_*m,P=w*y,O=[x];g.push(d(n,{indexes:O,datum:v,data:r,x:$,y:P,positionH:"center",positionV:s&&x%2===0?"normal":"flipped"})),p.push(d(Ft,{indexes:O,x:$+(f.width-u.width)/2,y:P+f.height})),_<i-1&&p.push(d(q,{indexes:[x+1],x:$+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2})),_===0&&!b.has(w)&&(p.push(d(q,{indexes:[x],x:$-o/2-u.width/2,y:P+(f.height-u.height)/2})),b.add(w)),(_===i-1||x===c.length-1)&&p.push(d(q,{indexes:[x+1],x:$+f.width+o/2-u.width/2,y:P+(f.height-u.height)/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(It,{children:g}),d(Ot,{children:p})]})]})};Tt("list-grid",{component:X2,composites:["title","item"]});const G2=t=>{const{Title:e,Item:n,data:r,gap:i=20,levelGap:o=20}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=Math.ceil(Math.sqrt(l.length)),y=[];let m=l.length;for(let _=0;_<g;_++){const $=Math.min(_+1,m);if(y.push($),m-=$,m<=0)break}let b=0;const v=Math.max(...y),w=(v*u.width+(v-1)*i)/2;return y.forEach((_,$)=>{const P=$*(u.height+o),O=_*u.width+(_-1)*i,T=w-O/2;for(let I=0;I<_&&b<l.length;I++){const S=T+I*(u.width+i),H=l[b],C=[b];p.push(d(n,{indexes:C,datum:H,data:r,x:S,y:P,positionH:"center"})),f.push(d(Ft,{indexes:C,x:S+(u.width-h.width)/2,y:P+u.height})),I<_-1&&f.push(d(q,{indexes:[b+1],x:S+u.width+(i-h.width)/2,y:P+(u.height-h.height)/2})),I===0&&f.push(d(q,{indexes:[b],x:S-i/2-h.width/2,y:P+(u.height-h.height)/2})),I===_-1&&f.push(d(q,{indexes:[b+1],x:S+u.width+i/2-h.width/2,y:P+(u.height-h.height)/2})),b++}}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:p}),d(Ot,{children:f})]})]})};Tt("list-pyramid",{component:G2,composites:["title","item"]});const q2=t=>{const{Title:e,Item:n,data:r,gap:i=20,zigzag:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=(u.height-h.height)/2,y=u.height;if(l.forEach((m,b)=>{const v=(u.width+i)*b,x=[b];p.push(d(n,{indexes:x,datum:m,data:r,x:v,positionH:"center",positionV:o&&b%2===0?"normal":"flipped"})),f.push(d(Ft,{indexes:x,x:v+(u.width-h.width)/2,y}));const w=b===0?-(i+h.width)/2:v-(i+h.width)/2;f.push(d(q,{indexes:x,x:w,y:g}))}),l.length>0){const b=(u.width+i)*(l.length-1)+u.width+(i-h.width)/2;f.push(d(q,{indexes:[l.length],x:b,y:g}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:p}),d(Ot,{children:f})]})]})};Tt("list-row",{component:q2,composites:["title","item"]});var $L=Object.defineProperty,U2=Object.getOwnPropertySymbols,PL=Object.prototype.hasOwnProperty,OL=Object.prototype.propertyIsEnumerable,Z2=(t,e,n)=>e in t?$L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CL=(t,e)=>{for(var n in e||(e={}))PL.call(e,n)&&Z2(t,n,e[n]);if(U2)for(var n of U2(e))OL.call(e,n)&&Z2(t,n,e[n]);return t};const K2=t=>{const{Item:e,data:n,outerRadius:r=250,innerRadius:i=120,startAngle:o=-90,endAngle:s=270,gapAngle:a=1,options:l}=t,{title:c,items:h=[]}=n,u=xe(l.themeConfig),f=Q(d(q,{indexes:[0]})),p=[],g=[],y=[],m=r+100,b=r+100,v=s-o,x=Math.abs(v-360)<.01,w=h.length>0?a*(x?h.length:h.length-1):0,_=v-w,$=h.length>0?_/h.length:0;if(h.forEach((C,A)=>{var B;const k=[A],D=o+($+a)*A,z=D+$,j=a*Math.PI*r/180/i*(180/Math.PI),X=a,L=(D+X/2)*Math.PI/180,M=(z-X/2)*Math.PI/180,R=(D+j/2)*Math.PI/180,W=(z-j/2)*Math.PI/180,U=m+r*Math.cos(L),V=b+r*Math.sin(L),G=m+r*Math.cos(M),Z=b+r*Math.sin(M),K=m+i*Math.cos(R),nt=b+i*Math.sin(R),at=m+i*Math.cos(W),pt=b+i*Math.sin(W),ft=$>180?1:0,rt=`
|
|
93
|
-
M ${U} ${
|
|
94
|
-
A ${r} ${r} 0 ${
|
|
95
|
-
L ${
|
|
96
|
-
A ${i} ${i} 0 ${
|
|
82
|
+
`,I(V,Ek(Sk({},u),{children:[d(yt,{d:P,x:0,y:0,width:r,height:i,fill:h.colorPrimary,"data-element-type":"shape"}),d(Ce,{indexes:n,x:y,y:m,size:o,fill:h.colorBg}),d(It,{indexes:n,x:b,y:x,width:f,fontSize:14,fontWeight:"bold",fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.label}),e.desc&&d(Jt,{indexes:n,x:_,y:w,width:f,fontSize:11,wordWrap:!0,fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.desc})]}))};Kt("quarter-simple-card",{component:jm,composites:["icon","label","desc"]});var Ik=Object.defineProperty,Tk=Object.defineProperties,Ak=Object.getOwnPropertyDescriptors,Wm=Object.getOwnPropertySymbols,kk=Object.prototype.hasOwnProperty,Lk=Object.prototype.propertyIsEnumerable,Fm=(t,e,n)=>e in t?Ik(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zk=(t,e)=>{for(var n in e||(e={}))kk.call(e,n)&&Fm(t,n,e[n]);if(Wm)for(var n of Wm(e))Lk.call(e,n)&&Fm(t,n,e[n]);return t},Hk=(t,e)=>Tk(t,Ak(e));const Bm=t=>{const[{datum:e,indexes:n,width:r=240,height:i=140,iconSize:o=28,gap:s=12,ribbonHeight:a=32,themeColors:l},c]=Zt(t,["width","height","iconSize","gap","ribbonHeight"]),h=`${l.colorPrimary}-ribbon`;return I(V,Hk(zk({},c),{children:[d(jt,{children:I("linearGradient",{id:h,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:l.colorPrimary}),d("stop",{offset:"100%",stopColor:lt(l.colorPrimary).darken(15).toHexString()})]})}),I(le,{children:[d(Ct,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),d(Ct,{x:0,y:0,width:r,height:a,fill:`url(#${h})`,rx:8,ry:8}),d(Ct,{x:0,y:8,width:r,height:a-8,fill:`url(#${h})`}),d(yt,{x:r-20,y:a,width:20,height:8,fill:lt(l.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),d(Ce,{indexes:n,x:s,y:a+s,size:o,fill:l.colorPrimary}),d(It,{indexes:n,x:o+2*s,y:a+s,width:r-o-3*s,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:l.colorText,children:e.label}),d(Jt,{indexes:n,x:s,y:a+o+s+5,width:r-2*s,alignHorizontal:"left",fill:l.colorTextSecondary,lineNumber:3,wordWrap:!0,children:e.desc}),d(Ce,{indexes:n,x:r-s-8,y:s/2,size:16,fill:l.colorWhite})]}))};Kt("ribbon-card",{component:Bm,composites:["icon","label","desc"]});var Rk=Object.defineProperty,Dk=Object.defineProperties,Nk=Object.getOwnPropertyDescriptors,Vm=Object.getOwnPropertySymbols,jk=Object.prototype.hasOwnProperty,Wk=Object.prototype.propertyIsEnumerable,Ym=(t,e,n)=>e in t?Rk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fk=(t,e)=>{for(var n in e||(e={}))jk.call(e,n)&&Ym(t,n,e[n]);if(Vm)for(var n of Vm(e))Wk.call(e,n)&&Ym(t,n,e[n]);return t},Bk=(t,e)=>Dk(t,Nk(e));const Xm=t=>{const[{indexes:e,datum:n,themeColors:r,width:i=300,height:o=40,padding:s=4,positionH:a="normal"},l]=Zt(t,["width","height","borderRadius","padding"]),c=o/2,h=c,u=s,f=i-c*2,p=o-s*2;return I(V,Bk(Fk({},l),{children:[d(Ct,{"data-element-type":"shape",width:i,height:o,rx:c,ry:c,fill:r.colorPrimaryBg,stroke:r.colorPrimary,strokeWidth:1,opacity:.8}),d(It,{indexes:e,x:h,y:u,width:f,height:p,alignHorizontal:a==="flipped"?"right":a==="center"?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:r.colorText,children:n.label})]}))};Kt("rounded-rect-node",{component:Xm,composites:["label"]});var Vk=Object.defineProperty,Yk=Object.defineProperties,Xk=Object.getOwnPropertyDescriptors,Gm=Object.getOwnPropertySymbols,Gk=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable,qm=(t,e,n)=>e in t?Vk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uk=(t,e)=>{for(var n in e||(e={}))Gk.call(e,n)&&qm(t,n,e[n]);if(Gm)for(var n of Gm(e))qk.call(e,n)&&qm(t,n,e[n]);return t},Zk=(t,e)=>Yk(t,Xk(e));const Um=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Zt(t,["width"]),a=o!=="flipped",l=a?"bottom":"top",c=d(It,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Jt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=30,f=10,p=et(c),g=et(h),y=p.height+g.height,m=y+f+u+f+y;return d(V,Zk(Uk({width:r,height:m},s),{children:I(dt,{flexDirection:"column",alignItems:"center",children:[a?I(Bt,{children:[h,c,d(ie,{height:f})]}):d(Bt,{children:d(ie,{height:y+f})}),I(Mi,{horizontal:"center",vertical:"middle",children:[d(Kk,{width:r,height:u,fill:i.colorPrimary}),d(Mt,{width:r,height:u,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?d(Bt,{children:d(ie,{height:y+f})}):I(Bt,{children:[d(ie,{height:f}),c,h]})]})}))},Kk=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Ve,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})};Kt("simple-horizontal-arrow",{component:Um,composites:["label","desc","time"]});var Qk=Object.defineProperty,Jk=Object.defineProperties,tL=Object.getOwnPropertyDescriptors,Zm=Object.getOwnPropertySymbols,eL=Object.prototype.hasOwnProperty,nL=Object.prototype.propertyIsEnumerable,Km=(t,e,n)=>e in t?Qk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rL=(t,e)=>{for(var n in e||(e={}))eL.call(e,n)&&Km(t,n,e[n]);if(Zm)for(var n of Zm(e))nL.call(e,n)&&Km(t,n,e[n]);return t},iL=(t,e)=>Jk(t,tL(e));const Qm=t=>{const[{indexes:e,datum:n,width:r=180,illusSize:i=r,gap:o=8,themeColors:s,usePaletteColor:a=!1},l]=Zt(t,["width","illusSize","gap","usePaletteColor"]),{label:c,desc:h}=n,u=a?s.colorPrimary:s.colorText,f=d(It,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:u,children:c}),p=et(f);return I(dt,iL(rL({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Dp,{indexes:e,width:i,height:i}),f,d(Jt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"top",fill:s.colorTextSecondary,lineNumber:3,children:h})]}))};Kt("simple-illus",{component:Qm,composites:["illus","label","desc"]});var oL=Object.defineProperty,sL=Object.defineProperties,aL=Object.getOwnPropertyDescriptors,Jm=Object.getOwnPropertySymbols,lL=Object.prototype.hasOwnProperty,cL=Object.prototype.propertyIsEnumerable,t2=(t,e,n)=>e in t?oL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ah=(t,e)=>{for(var n in e||(e={}))lL.call(e,n)&&t2(t,n,e[n]);if(Jm)for(var n of Jm(e))cL.call(e,n)&&t2(t,n,e[n]);return t},lh=(t,e)=>sL(t,aL(e));const e2=t=>{const[{indexes:e,datum:n,width:r=200,height:i,gap:o=4,showIcon:s=!0,iconSize:a=30,iconType:l="default",positionH:c="normal",positionV:h="normal",usePaletteColor:u=!1,themeColors:f},p]=Zt(t,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:g,desc:y,icon:m}=n,v=(L=>L==="normal"?"left":L==="flipped"?"right":"center")(c),b=u?f.colorPrimary:f.colorText,w=14,_=1.4,P=et(d(It,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g})),C=s?l==="circle"?d(or,{indexes:e,size:a,fill:f.colorPrimary,colorBg:f.colorBg}):d(Ce,{indexes:e,size:a,fill:f.colorTextSecondary}):null;if(!s||!m){const L=i?Math.max(0,i-P.height-o):void 0,D=L?L<=60?1:Math.floor(L/(_*w)):2,k=i?h==="middle"?(i-P.height-(L||0)-o)/2:h==="flipped"?i-P.height-(L||0)-o:0:0;return I(V,lh(ah({},p),{children:[d(It,{indexes:e,width:r,y:k,alignHorizontal:v,alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:r,height:L,y:k+P.height+o,alignHorizontal:v,alignVertical:T(),lineNumber:D,fill:f.colorTextSecondary,children:y})]}))}if(c==="center"){const L=s&&m?a:0,D=i?Math.max(0,i-P.height-L-o*2):void 0,k=D?D<=60?1:Math.floor(D/(_*w)):2,N=P.height+(D||0)+o,j=i?h==="middle"?(i-N-L-o)/2:h==="flipped"?i-N-L-o:0:0;return d(dt,lh(ah({},p),{flexDirection:"column",gap:o,alignItems:"center",children:h==="flipped"?I(Bt,{children:[I(V,{children:[d(It,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:k,fill:f.colorTextSecondary,children:y})]}),C]}):I(Bt,{children:[C,I(V,{children:[d(It,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:k,fill:f.colorTextSecondary,children:y})]})]})}))}const A=et(C),E=Math.max(r-A.width-o,0),S=i?Math.max(0,i-P.height-o):void 0,R=S?S<=60?1:Math.floor(S/(_*w)):2,O=i?h==="middle"?(i-P.height-(S||0)-o)/2:h==="flipped"?i-P.height-(S||0)-o:0:0;return d(dt,lh(ah({},p),{flexDirection:"row",gap:o,alignItems:F(h),children:c==="flipped"?I(Bt,{children:[I(V,{children:[d(It,{indexes:e,width:E,y:O,alignHorizontal:"right",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:E,height:S,y:O+P.height+o,alignHorizontal:"right",alignVertical:T(),lineNumber:R,fill:f.colorTextSecondary,children:y})]}),C]}):I(Bt,{children:[C,I(V,{children:[d(It,{indexes:e,width:E,y:O,alignHorizontal:"left",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:E,height:S,y:O+P.height+o,alignHorizontal:"left",alignVertical:T(),lineNumber:R,fill:f.colorTextSecondary,children:y})]})]})}));function T(L,D){return"top"}function F(L){return L==="normal"?"flex-start":L==="flipped"?"flex-end":"center"}};Kt("simple",{component:e2,composites:["icon","label","desc"]});var hL=Object.defineProperty,dL=Object.defineProperties,uL=Object.getOwnPropertyDescriptors,n2=Object.getOwnPropertySymbols,fL=Object.prototype.hasOwnProperty,pL=Object.prototype.propertyIsEnumerable,r2=(t,e,n)=>e in t?hL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gL=(t,e)=>{for(var n in e||(e={}))fL.call(e,n)&&r2(t,n,e[n]);if(n2)for(var n of n2(e))pL.call(e,n)&&r2(t,n,e[n]);return t},mL=(t,e)=>dL(t,uL(e));const i2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Zt(t,["height"]),a=o==="normal"?"right":"left",l=d(It,{indexes:e,width:120,fill:i.colorText,alignHorizontal:a,alignVertical:"middle",fontSize:14,children:n.label}),c=d(Jt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:a,alignVertical:"top",children:n.desc}),h=o!=="flipped",u=15,f=30,p=120,g=p+u+f+u+p;return d(V,mL(gL({width:g,height:r},s),{children:I(dt,{flexDirection:"row",alignItems:"center",children:[h?I(Bt,{children:[I(dt,{flexDirection:"column",alignItems:"flex-end",children:[l,c]}),d(ie,{width:u})]}):d(Bt,{children:d(ie,{width:p+u})}),I(Mi,{horizontal:"center",vertical:"middle",children:[d(yL,{width:f,height:r,fill:i.colorPrimary}),d(Mt,{width:f,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),h?d(Bt,{children:d(ie,{width:p+u})}):I(Bt,{children:[d(ie,{width:u}),I(dt,{flexDirection:"column",alignItems:"flex-start",children:[l,c]})]})]})}))},yL=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ve,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})};Kt("simple-vertical-arrow",{component:i2,composites:["label","desc"]});var vL=Object.defineProperty,xL=Object.defineProperties,bL=Object.getOwnPropertyDescriptors,o2=Object.getOwnPropertySymbols,wL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,s2=(t,e,n)=>e in t?vL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$L=(t,e)=>{for(var n in e||(e={}))wL.call(e,n)&&s2(t,n,e[n]);if(o2)for(var n of o2(e))_L.call(e,n)&&s2(t,n,e[n]);return t},PL=(t,e)=>xL(t,bL(e));const ch=80,hh=3,a2=t=>{const[{datum:e,indexes:n,width:r=200,gap:i=4,positionH:o="center",themeColors:s},a]=Zt(t,["width","height","gap"]),l=et(d(It,{indexes:n,fontSize:18,fontWeight:"bold",width:r,children:e.label})),c=e.desc?et(d(Jt,{indexes:n,width:r,wordWrap:!0,children:e.desc})):{height:0},h=l.height+i+hh+(e.desc?i*2+c.height:0),u=0,f=0,p=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-ch)/2:o==="flipped"?r-ch:0,y=f+l.height+i,m=0,x=y+hh+i*2;return I(V,PL($L({width:r,height:h},a),{children:[e.label&&d(It,{indexes:n,x:u,y:f,width:r,alignHorizontal:p,fill:s.colorPrimary,fontSize:18,fontWeight:"bold",children:e.label}),e.label&&d(Ct,{x:g,y,width:ch,height:hh,fill:s.colorPrimary,"data-element-type":"shape"}),e.desc&&d(Jt,{indexes:n,width:r,x:m,y:x,alignHorizontal:p,wordWrap:!0,fill:s.colorText,children:e.desc})]}))};Kt("underline-text",{component:a2,composites:["label","desc"]});var CL=Object.defineProperty,OL=Object.defineProperties,ML=Object.getOwnPropertyDescriptors,l2=Object.getOwnPropertySymbols,SL=Object.prototype.hasOwnProperty,EL=Object.prototype.propertyIsEnumerable,c2=(t,e,n)=>e in t?CL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IL=(t,e)=>{for(var n in e||(e={}))SL.call(e,n)&&c2(t,n,e[n]);if(l2)for(var n of l2(e))EL.call(e,n)&&c2(t,n,e[n]);return t},TL=(t,e)=>OL(t,ML(e));const h2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Zt(t,["height"]),l=o!=="flipped"?"right":"left",c=d(It,{indexes:e,width:120,fill:i.colorText,alignHorizontal:l,alignVertical:"middle",fontSize:14,children:n.label}),h=d(Jt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:"top",children:n.desc}),u=d(or,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(kL,{width:30,height:8,fill:i.colorPrimary,positionH:o}),p=o!=="flipped",g=5,y=25,m=30,x=et(c),v=et(u),b=et(f),w=x.width+g+b.width-v.width-y,_=Math.max(x.width+g+b.width,y+v.width)*2+m;return d(V,TL(IL({width:_,height:r},s),{children:I(dt,{flexDirection:"row",alignItems:"center",children:[p?I(Bt,{children:[I(dt,{flexDirection:"column",alignItems:"flex-end",children:[c,h]}),d(ie,{width:g}),f]}):I(Bt,{children:[d(ie,{width:w}),u,d(ie,{width:y})]}),I(Mi,{horizontal:"center",vertical:"middle",children:[d(AL,{width:m,height:r,fill:i.colorPrimary}),d(Mt,{width:m,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),p?I(Bt,{children:[d(ie,{width:y}),u]}):I(Bt,{children:[f,d(ie,{width:g}),I(dt,{flexDirection:"column",alignItems:"flex-start",children:[c,h]})]})]})}))},AL=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Ve,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})},kL=t=>{const{x:e=0,y:n=0,width:r=50,height:i=10,fill:o,positionH:s="normal"}=t,a=i/2,l=r-a,c=2,h=a;return I(V,{x:e,y:n,width:r,height:i,children:[d(Wt,{width:i,height:i,fill:o,x:s==="normal"?0:l-a,"data-element-type":"shape"}),d(yt,{d:s==="normal"?`M${a},${h} L${a+l},${h}`:`M0,${h} L${l-a},${h}`,strokeWidth:c,stroke:o,"data-element-type":"shape"})]})};Kt("vertical-icon-arrow",{component:h2,composites:["icon","label","desc"]});const dh=new Map;function kt(t,e){dh.set(t,e)}function d2(t){return dh.get(t)}function LL(){return Array.from(dh.keys())}const u2=t=>{var e,n,r;const{Title:i,Item:o,data:s,width:a,gap:l,barGap:c,barHeight:h=28,barAreaWidth:u,labelGap:f=16,padding:p=24,showValue:g=!0,options:y,valueFormatter:m=Dt=>Dt.toString()}=t,x=(e=u!=null?u:a)!=null?e:480,{title:v,desc:b,items:w=[],xTitle:_,yTitle:$}=s,P=i?d(i,{title:v,desc:b}):null;if(w.length===0)return d(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:P});const[C,A,E,S]=rr(p),R=(n=w[0])!=null?n:{label:"",value:0},O=et(d(o,{indexes:[0],datum:R,data:s})),T=O.width||140,F=O.height||h,L=Math.max(h,F),D=Math.max(12,L*.35),k=(r=c!=null?c:l)!=null?r:D,N=w.map(Dt=>{var Ht;return(Ht=Dt.value)!=null?Ht:0}),j=Math.max(...N,0),X=Math.min(...N,0),z=X<0?X*1.1:0;let M=j>0?j*1.1:0;M===z&&(M=z+1);const H=Fi().domain([z,M]).range([0,x]),B=Math.min(Math.max(H(0),0),x),U=Math.max(2,x*.02),Y=w.length*(L+k)-k,G=$?24:0,Z=20,K=_?24:0,it=C+G,Q=S+T+f,at=g?80:0,ct=Math.max(8,L*.2),nt=Q+x+at+A,J=it+Y+ct+Z+K+E,tt=xe(y.themeConfig),st=tt.colorText||"#666",vt=ce(y),gt=[],ut=[],ot=[],ft=[],mt=[],bt=[],pt=[],wt=it+Y+ct,Rt=Dt=>Number.isInteger(Dt)?Dt.toString():Dt.toFixed(1);w.forEach((Dt,Ht)=>{var he;const At=[Ht],Lt=(he=Dt.value)!=null?he:0,ge=it+Ht*(L+k),xt=ge+(L-h)/2,Ft=Lt>=0?Q+B:Q+H(Lt),Ot=Lt>=0?H(Lt)-B:B-H(Lt),Nt=Ot===0?U:Ot,ae=Tt(y,[Ht])||tt.colorPrimary;if(gt.push(d(Ct,{x:Ft,y:xt,width:Nt,height:h,fill:ae,rx:6,ry:6,"data-element-type":"shape"})),g){const ne=Lt>=0?Ft+Nt+8:Ft-8;ut.push(d(Mt,{x:ne,y:xt+h/2,alignHorizontal:Lt>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:ae,children:m(Lt,Dt)}))}ot.push(d(o,{indexes:At,datum:Dt,data:s,x:S,y:ge+(L-F)/2,width:T,height:F,positionV:"middle"}))});const Vt=Math.max(3,Math.min(7,Math.floor(x/80)));return H.ticks(Vt).forEach(Dt=>{const Ht=Q+H(Dt);bt.push(d(yt,{d:`M${Ht} ${it} L${Ht} ${it+Y}`,stroke:st,strokeOpacity:.08,"data-element-type":"shape"})),mt.push(d(yt,{d:`M${Ht-.5} ${wt} L${Ht-.5} ${wt+6}`,stroke:st,"data-element-type":"shape"})),mt.push(d(Mt,{x:Ht,y:wt+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:st,children:Rt(Dt)}))}),ft.push(d(yt,{d:`M${Q} ${wt} L${Q+x} ${wt}`,stroke:st,"data-element-type":"shape"})),z<0&&ft.push(d(Ct,{x:Q+B-.5,y:it,width:1,height:Y,fill:vt,"data-element-type":"shape"})),$&&pt.push(d(Mt,{x:S+T/2,y:C+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:$})),_&&pt.push(d(Mt,{x:Q+x/2,y:wt+Z+K/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:_})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[P,I(V,{width:nt,height:J,children:[d(V,{children:bt}),d(V,{children:gt}),d(V,{children:ut}),d(V,{children:pt}),d(V,{children:[...ft,...mt]}),d(St,{children:ot})]})]})};kt("chart-bar",{component:u2,composites:["title","item","xTitle","yTitle"]});const f2=t=>{const{Title:e,Item:n,data:r,columnGap:i=60,columnWidth:o=50,padding:s=20,showValue:a=!0,options:l,valueFormatter:c=N=>N.toString()}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return d(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p});const g=xe(l.themeConfig),m=[...f.map(N=>{var j;return(j=N.value)!=null?j:0}),0].sort((N,j)=>N-j),x=m[0]<0,v=f.length*o+(f.length-1)*i,b=300,[w,_,$,P]=rr(s),C=a?24:0,A=10,E=x&&a?C+A:A,S=v+P+_,R=b+w+$+E,O=Fi().domain([m[0],m[m.length-1]]).range([b,0]),T=O(0),F=[],L=[],D=[],k=[];return f.forEach((N,j)=>{var X;const z=[j],M=(X=N.value)!=null?X:0,H=P+j*(o+i),B=M>=0?O(M):T,U=Math.abs(O(M)-T),Y=Tt(l,[j])||g.colorPrimary,G=`${Y}-column-positive-${j}`,Z=`${Y}-column-negative-${j}`;k.push(I("linearGradient",{id:M>=0?G:Z,x1:"0%",y1:M>=0?"0%":"100%",x2:"0%",y2:M>=0?"100%":"0%",children:[d("stop",{offset:"0%",stopColor:Y}),d("stop",{offset:"100%",stopColor:lt.mix(Y,"#fff",40).toHexString()})]})),F.push(d(Ct,{x:H,y:w+B,width:o,height:U,fill:`url(#${M>=0?G:Z})`,rx:8,ry:8,"data-element-type":"shape"})),a&&L.push(d(Mt,{x:H+o/2,y:M>=0?w+B-10:w+B+U+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:M>=0?"bottom":"top",fill:Y,children:c(M,N)}));const K=o+i,it=w+b+E;D.push(d(n,{indexes:z,datum:N,data:r,x:H+o/2-K/2,y:it,width:K,positionH:"center"}))}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{width:S,height:R,children:[d(jt,{children:k}),d(V,{children:F}),d(V,{children:L}),d(St,{children:D})]})]})};kt("chart-column",{component:f2,composites:["title","item"]});var zL=Object.defineProperty,HL=Object.defineProperties,RL=Object.getOwnPropertyDescriptors,p2=Object.getOwnPropertySymbols,DL=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,g2=(t,e,n)=>e in t?zL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m2=(t,e)=>{for(var n in e||(e={}))DL.call(e,n)&&g2(t,n,e[n]);if(p2)for(var n of p2(e))NL.call(e,n)&&g2(t,n,e[n]);return t},jL=(t,e)=>HL(t,RL(e));const y2=t=>{const{Title:e,Item:n,data:r,width:i,height:o=260,gap:s=10,padding:a=24,showValue:l=!0,options:c,valueFormatter:h=xt=>xt.toString()}=t,{title:u,desc:f,items:p=[],xTitle:g,yTitle:y}=r,m=e?d(e,{title:u,desc:f}):null;if(p.length===0)return d(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[x,v,b,w]=rr(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=et(d(n,m2({},_))),P=$.width,C=$.height,A=Math.max(28,C+14),E=44,S=y?26:0,R=g?22:0,O=P+s,T=p.length>0?(p.length-1)*O+P:0,F=i!==void 0?i:Math.max(200,T||320),L=p.length>1?Math.max(O,(F-P)/(p.length-1)):0,D=p.length>0?Math.max(P,(p.length-1)*L+P):0,k=w+E+S,N=x+S,j=k+D+v,X=N+o+A+R+b,z=p.map(xt=>{var Ft;return(Ft=xt.value)!=null?Ft:0}),M=Math.max(...z,0),H=Math.min(...z,0),B=Math.max(Math.abs(M),Math.abs(H))*.1,U=H<0?H-B:0;let Y=M>0?M+B:1;Y===U&&(Y=U+1);const G=Fi().domain([U,Y]).nice().range([o,0]),Z=Math.max(0,Math.min(o,G(0))),K=Y<=0?0:U>=0?o:Z,it=ce(c),Q=xe(c.themeConfig),at=Q.colorText||"#666",ct=[],nt=[],J=[],tt=[],st=[],vt=[],gt=[];G.ticks(6).forEach(xt=>{const Ft=N+G(xt);ct.push(d(yt,{d:`M ${k} ${Ft} L ${k+D} ${Ft}`,width:D,height:1,stroke:at,strokeWidth:1,"data-element-type":"shape",opacity:.08})),gt.push(d(Mt,{x:k-8,y:Ft,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:at,children:Number.isInteger(xt)?xt.toString():xt.toFixed(1)}))});const ot=[],ft=[],mt=[],bt=xt=>{if(xt.length===0)return"";if(xt.length===1){const Ot=xt[0];return`M ${Ot.x} ${Ot.y}`}const Ft=[];Ft.push(`M ${xt[0].x} ${xt[0].y}`);for(let Ot=0;Ot<xt.length-1;Ot++){const Nt=xt[Ot-1]||xt[Ot],ae=xt[Ot],ne=xt[Ot+1],me=xt[Ot+2]||ne,ye=ae.x+(ne.x-Nt.x)/6,We=ae.y+(ne.y-Nt.y)/6,Ye=ne.x-(me.x-ae.x)/6,Ki=ne.y-(me.y-ae.y)/6;Ft.push(`C ${ye} ${We} ${Ye} ${Ki} ${ne.x} ${ne.y}`)}return Ft.join(" ")};p.forEach((xt,Ft)=>{var Ot;const Nt=k+Ft*L+P/2,ae=N+G((Ot=xt.value)!=null?Ot:0);ft.push({x:Nt,y:ae,datum:xt}),ot.push(d(n,jL(m2({},_),{indexes:[Ft],datum:xt,x:Nt-P/2,y:N+o+4})));const ne=Tt(c,[Ft])||Q.colorPrimary;mt.push({x:Nt,color:ne})});const pt=mt.length>0?Math.min(...mt.map(xt=>xt.x)):k,wt=mt.length>0?Math.max(...mt.map(xt=>xt.x)):k+D,Rt=Math.max(1,wt-pt),Vt=mt.map(xt=>d("stop",{offset:`${(xt.x-pt)/Rt*100}%`,stopColor:xt.color})),ee=mt.map(xt=>d("stop",{offset:`${(xt.x-pt)/Rt*100}%`,stopColor:xt.color,stopOpacity:"0.18"}));if(mt.length>0){const xt=mt[mt.length-1].color;Vt.push(d("stop",{offset:"100%",stopColor:xt})),ee.push(d("stop",{offset:"100%",stopColor:xt,stopOpacity:"0.04"}))}const Dt=`chart-line-${lf([D,o,at,it,mt.map(xt=>`${xt.x.toFixed(2)}-${xt.color}`).join()].join(":"))}`,Ht=`${Dt}-stroke`,he=`${Dt}-area`,At=bt(ft);J.push(d(yt,{d:At,width:D,height:o,stroke:`url(#${Ht})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const Lt=At.includes("C")?At.slice(At.indexOf("C")):"",ge=[`M ${ft[0].x} ${N+K}`,`L ${ft[0].x} ${ft[0].y}`,Lt,`L ${ft[ft.length-1].x} ${N+K}`,"Z"].join(" ");return J.push(d(yt,{d:ge,width:D,height:o,fill:`url(#${he})`,stroke:"none","data-element-type":"shape"})),ft.forEach((xt,Ft)=>{var Ot;const Nt=Tt(c,[Ft])||Q.colorPrimary;tt.push(d(Wt,{x:xt.x-6,y:xt.y-6,width:12,height:12,fill:Nt,"data-element-type":"shape"})),l&&st.push(d(Mt,{x:xt.x,y:xt.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:Nt,children:h((Ot=xt.datum.value)!=null?Ot:0,xt.datum)}))}),nt.push(d(yt,{d:`M ${k} ${N+K} L ${k+D} ${N+K}`,width:D,height:1,stroke:at,strokeWidth:1,"data-element-type":"shape"})),nt.push(d(yt,{d:`M ${k} ${N} L ${k} ${N+o}`,width:1,height:o,stroke:at,strokeWidth:1,"data-element-type":"shape"})),g&&vt.push(d(Mt,{x:k+D/2,y:N+o+A+R/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:at,children:g})),y&&vt.push(d(Mt,{x:w+S/2,y:N+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:at,children:y})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,I(V,{width:j,height:X,children:[I(jt,{children:[d("linearGradient",{id:Ht,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:Vt}),I("linearGradient",{id:he,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[ee,d("stop",{offset:"100%",stopColor:it,stopOpacity:"0.04"})]})]}),d(V,{children:ct}),d(V,{children:[...nt,...gt]}),d(V,{children:J}),d(V,{children:tt}),d(V,{children:st}),d(V,{children:vt}),d(St,{children:ot})]})]})};kt("chart-line",{component:y2,composites:["title","item","xTitle","yTitle"]});const v2=t=>{var e;const{Title:n,Item:r,data:i,radius:o=140,innerRadius:s=0,padding:a=30,showPercentage:l=!0,options:c}=t,{title:h,desc:u,items:f=[]}=i,p=n?d(n,{title:h,desc:u}):null,g=et(d(q,{indexes:[0]})),y=(e=f[0])!=null?e:{label:"",value:0},m=et(d(r,{indexes:[0],datum:y,data:i,positionH:"center",positionV:"middle"})),x=m.width||140,v=m.height||32,b=Math.max(o,60),w=1.35,_=8,$=b*w+_+x,P=b,C=a+$,A=a+P,E=C*2,S=A*2;if(f.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(V,{width:E,height:S,children:d(Et,{children:d(q,{indexes:[0],x:C-g.width/2,y:A-g.height/2})})})]});const R=f.reduce((G,Z)=>{var K;return G+Math.max((K=Z.value)!=null?K:0,0)},0),O=ce(c),T=xe(c.themeConfig),L=lk().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=Vi().innerRadius(s).outerRadius(b).cornerRadius(2),k=Vi().innerRadius(b).outerRadius(b),N=Vi().innerRadius(b*1.15).outerRadius(b*1.15),j=s+(b-s)*.5,X=Vi().innerRadius(j).outerRadius(j),z=Vi().innerRadius(b*.85).outerRadius(b*.85),M=[],H=[],B=[],U=[],Y=[];return L.forEach(G=>{const Z=G.data,K=G.index,it=Tt(c,[K])||T.colorPrimary||O,Q=D(G)||"";M.push(d(yt,{d:Q,fill:it,stroke:T.colorBg,strokeWidth:1,"data-element-type":"shape",width:b*2,height:b*2}));const ct=G.startAngle+(G.endAngle-G.startAngle)/2<Math.PI,nt=k.centroid(G),J=N.centroid(G),st=[b*w*(ct?1:-1),J[1]];B.push(d(yt,{d:`M${C+nt[0]} ${A+nt[1]} L${C+J[0]} ${A+J[1]} L${C+st[0]} ${A+st[1]}`,stroke:O,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const vt=C+st[0]+(ct?_:-_-x),gt=A+st[1]-v/2;if(U.push(d(r,{indexes:[K],datum:Z,data:i,x:vt,y:gt,width:x,height:v,positionH:ct?"normal":"flipped",positionV:"middle",themeColors:xe({colorPrimary:it},c)})),l&&R>0){const ot=X.centroid(G),ft=Math.max(G.value,0),mt=(ft*100/R).toFixed(1),bt=50,pt=20;H.push(d(Mt,{x:C+ot[0]-bt/2,y:A+ot[1]-pt/2,width:bt,height:pt,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":ft,"data-indexes":[K],"data-element-type":zt.ItemValue,children:`${mt}%`}))}const ut=z.centroid(G);Y.push(d(Xt,{indexes:[K],x:C+ut[0]-g.width/2,y:A+ut[1]-g.height/2}))}),L.forEach((G,Z)=>{const K=(Z+1)%L.length,it=G.endAngle,Q=L[K].startAngle+(K===0?Math.PI*2:0),at=(it+Q)/2,ct=b*1,nt=Math.sin(at)*ct,J=-Math.cos(at)*ct;Y.push(d(q,{indexes:[Z+1],x:C+nt-g.width/2,y:A+J-g.height/2}))}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p,I(V,{width:E,height:S,children:[d(V,{x:C,y:A,children:M}),d(V,{children:B}),d(V,{children:H}),d(St,{children:U}),d(Et,{children:Y})]})]})};kt("chart-pie",{component:v2,composites:["title","item"]});var WL=Object.defineProperty,FL=Object.defineProperties,BL=Object.getOwnPropertyDescriptors,x2=Object.getOwnPropertySymbols,VL=Object.prototype.hasOwnProperty,YL=Object.prototype.propertyIsEnumerable,b2=(t,e,n)=>e in t?WL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w2=(t,e)=>{for(var n in e||(e={}))VL.call(e,n)&&b2(t,n,e[n]);if(x2)for(var n of x2(e))YL.call(e,n)&&b2(t,n,e[n]);return t},_2=(t,e)=>FL(t,BL(e));const XL=[0,30,-30,60,-60],GL=Math.PI*(3-Math.sqrt(5));function $2(t,e,n){const r=Math.PI/180*n,i=Math.cos(r),o=Math.sin(r);return{width:Math.abs(t*i)+Math.abs(e*o),height:Math.abs(t*o)+Math.abs(e*i)}}function qL(t,e,n,r,i,o){const s=t-o,a=t+n+o,l=e-o,c=e+r+o;return i.some(h=>{const u=h.box.x-o,f=h.box.x+h.box.width+o,p=h.box.y-o,g=h.box.y+h.box.height+o;return!(a<=u||s>=f||c<=p||l>=g)})}function UL(t,e,n,r,i){const o=[],s=e?XL:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*GL;let f=0,p=null;for(let g=0;g<a&&!p;g++){g===Math.floor(a*.6)&&(f=h);const y=u+g*r,m=i*Math.sqrt(g+1)+f+h*.25,x=m*Math.cos(y),v=m*Math.sin(y);for(const b of s){const w=$2(l.width,l.height,b),_=x-w.width/2,$=v-w.height/2;if(!qL(_,$,w.width,w.height,o,n)){p=_2(w2({},l),{angle:b,centerX:x,centerY:v,box:{x:_,y:$,width:w.width,height:w.height}});break}}}if(!p){const g=s[c%s.length],y=i*Math.sqrt(a+1)+h,m=u,x=y*Math.cos(m),v=y*Math.sin(m),b=$2(l.width,l.height,g);p=_2(w2({},l),{angle:g,centerX:x,centerY:v,box:{x:x-b.width/2,y:v-b.height/2,width:b.width,height:b.height}})}o.push(p)}),o}const P2=t=>{const{data:e,options:n,minFontSize:r=16,maxFontSize:i=48,enableRotate:o=!0,padding:s=6,spiralStep:a=.45,radiusStep:l=10}=t,{items:c=[]}=e,h=c.map((O,T)=>({datum:O,index:T})).filter(({datum:O})=>O.label);if(h.length===0)return d(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:d(V,{children:d(St,{})})});const u=h.map(({datum:O})=>O.value).filter(O=>typeof O=="number"),f=u.length>0,p=f?Math.min(...u):0,g=f?Math.max(...u):0,y=f&&p===g,m=(r+i)/2,x=O=>{if(!f||y)return m;if(O==null)return r;const T=(O-p)/(g-p||1);return r+T*(i-r)},v=h.map(({datum:O,index:T})=>{const F=x(O.value),L=et(d(Mt,{fontSize:F,fontWeight:"bold",children:O.label})),D=Tt(n,[T])||ce(n);return{label:O.label,value:O.value,color:D,fontSize:F,width:L.width*1.05,height:L.height}}).sort((O,T)=>T.fontSize-O.fontSize),b=UL(v,o,s,a,l),w=Math.min(...b.map(O=>O.box.x)),_=Math.min(...b.map(O=>O.box.y)),$=Math.max(...b.map(O=>O.box.x+O.box.width)),P=Math.max(...b.map(O=>O.box.y+O.box.height)),C=-w+s,A=-_+s,E=$-w+s*2,S=P-_+s*2,R=b.map((O,T)=>{const F=O.centerX-O.width/2+C,L=O.centerY-O.height/2+A,D=O.width/2,k=O.height/2,N=`translate(${F}, ${L}) rotate(${O.angle}, ${D}, ${k})`;return d(V,{transform:N,children:d(Mt,{width:O.width,height:O.height,fontSize:O.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:O.color,"data-indexes":T,"data-element-type":zt.ItemLabel,children:O.label})})});return d(St,{id:"infographic-container",width:E,height:S,children:R})};kt("chart-wordcloud",{component:P2,composites:[]});const C2=new Map,uh=(t,e)=>{C2.set(t,e)},ZL=t=>{var e;return t&&(e=C2.get(t))!=null?e:null};var KL=Object.defineProperty,QL=Object.defineProperties,JL=Object.getOwnPropertyDescriptors,O2=Object.getOwnPropertySymbols,tz=Object.prototype.hasOwnProperty,ez=Object.prototype.propertyIsEnumerable,M2=(t,e,n)=>e in t?KL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S2=(t,e)=>{for(var n in e||(e={}))tz.call(e,n)&&M2(t,n,e[n]);if(O2)for(var n of O2(e))ez.call(e,n)&&M2(t,n,e[n]);return t},E2=(t,e)=>QL(t,JL(e));uh("pros-cons-arrow",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=200,a=141,l={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return I(V,{x:e,y:n,width:s,height:a,children:[I(le,{children:[d("path",{d:"M137 54C137 54.2903 137 54.5806 136.706 54.7742L108.614 86.0323H64.7619C64.4071 86.0204 64.0557 86.1043 63.7453 86.2747C63.4349 86.4452 63.1773 86.6959 63 87C63.0037 86.7447 63.1092 86.5012 63.2936 86.3226L91.3862 55.0645H135.238C135.593 55.0763 135.944 54.9925 136.255 54.822C136.565 54.6516 136.823 54.4009 137 54.0968V54Z",fill:"#D9D9D9"}),d("path",{d:"M39.3272 0.484649C39.6146 0.234929 39.9662 0.0736935 40.3407 0.0198929C40.7152 -0.0339076 41.0971 0.0219605 41.4414 0.180925C41.7857 0.33989 42.0783 0.595358 42.2846 0.917314C42.491 1.23927 42.6026 1.61434 42.6063 1.99848V14.8156H136.013C136.54 14.8156 137.045 15.0282 137.418 15.4068C137.791 15.7853 138 16.2987 138 16.834V53.166C138 53.7013 137.791 54.2147 137.418 54.5932C137.045 54.9718 136.54 55.1844 136.013 55.1844H42.6063V68.0015C42.6026 68.3857 42.491 68.7607 42.2846 69.0827C42.0783 69.4046 41.7857 69.6601 41.4414 69.8191C41.0971 69.9781 40.7152 70.0339 40.3407 69.9801C39.9662 69.9263 39.6146 69.7651 39.3272 69.5154L0.672847 36.5138C0.461378 36.3244 0.292014 36.0915 0.176005 35.8305C0.0599968 35.5695 0 35.2864 0 35C0 34.7136 0.0599968 34.4306 0.176005 34.1696C0.292014 33.9085 0.461378 33.6756 0.672847 33.4862L39.4265 0.484649H39.3272Z",fill:r}),d("path",{d:"M157.394 73.0007C157.397 72.6162 157.509 72.2407 157.715 71.9183C157.922 71.596 158.214 71.3403 158.559 71.1811C158.903 71.022 159.285 70.9661 159.659 71.0199C160.034 71.0738 160.385 71.2352 160.673 71.4852L199.327 104.524C199.539 104.714 199.708 104.947 199.824 105.208C199.94 105.47 200 105.753 200 106.04C200 106.326 199.94 106.61 199.824 106.871C199.708 107.132 199.539 107.366 199.327 107.555L160.573 140.594C160.285 140.815 159.943 140.951 159.584 140.989C159.225 141.027 158.862 140.965 158.535 140.809C158.208 140.653 157.929 140.41 157.728 140.105C157.527 139.8 157.411 139.445 157.394 139.078V126.247H63.9874C63.4603 126.247 62.9548 126.034 62.5821 125.655C62.2094 125.276 62 124.762 62 124.226V87.8531C62 87.3172 62.2094 86.8032 62.5821 86.4242C62.9548 86.0453 63.4603 85.8324 63.9874 85.8324H157.394V73.0007Z",fill:i})]}),d(Mt,E2(S2({x:40,y:15},l),{children:"Pros"})),d(Mt,E2(S2({x:70,y:85},l),{children:"Cons"}))]})});var nz=Object.defineProperty,rz=Object.defineProperties,iz=Object.getOwnPropertyDescriptors,I2=Object.getOwnPropertySymbols,oz=Object.prototype.hasOwnProperty,sz=Object.prototype.propertyIsEnumerable,T2=(t,e,n)=>e in t?nz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A2=(t,e)=>{for(var n in e||(e={}))oz.call(e,n)&&T2(t,n,e[n]);if(I2)for(var n of I2(e))sz.call(e,n)&&T2(t,n,e[n]);return t},k2=(t,e)=>rz(t,iz(e));uh("pros-cons-fold",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=240,a=300,l={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return I(V,{x:e,y:n,width:s,height:a,children:[I(le,{children:[d("path",{d:"M136.914 38.7755C137.303 38.7733 137.683 38.6617 138.011 38.4534C138.339 38.2451 138.602 37.9485 138.77 37.5977C138.937 37.247 139.002 36.8561 138.957 36.4701C138.913 36.084 138.76 35.7183 138.517 35.415L110.741 0.982313C110.548 0.735138 110.301 0.535238 110.018 0.397762C109.736 0.260286 109.426 0.188841 109.112 0.188841C108.798 0.188841 108.488 0.260286 108.206 0.397762C107.924 0.535238 107.676 0.735138 107.483 0.982313L79.7069 35.415C79.4639 35.7183 79.3113 36.084 79.2667 36.4701C79.222 36.8561 79.2871 37.247 79.4545 37.5977C79.6219 37.9485 79.8847 38.2451 80.213 38.4534C80.5412 38.6617 80.9216 38.7733 81.3104 38.7755H92.8965C93.0517 57.1293 97.5517 64.9878 105.259 73.7252C107.017 75.7932 108.983 77.8612 111.103 80.1361C113.276 82.4626 122.121 88.9252 131.069 95.181C129.362 88.7701 128.172 81.2218 127.293 73.7252C125.224 55.9918 125.017 38.7755 125.017 38.7755H136.914Z",fill:r,fillOpacity:.4}),d("path",{d:"M237.931 109.967C238.48 109.967 239.006 109.749 239.394 109.362C239.782 108.974 240 108.448 240 107.899V75.7932C240 75.2447 239.782 74.7187 239.394 74.3309C239.006 73.9431 238.48 73.7252 237.931 73.7252H127.241C128.172 81.2218 129.362 88.7701 131.069 95.181C138.182 100.171 145.337 105.1 152.534 109.967H237.931Z",fill:r}),d("path",{d:"M152.586 109.967C152.586 109.967 141.724 102.678 131.069 95.181C124.122 90.5838 117.455 85.5772 111.103 80.1878C109.034 77.8612 107.017 75.7415 105.259 73.7252H48.6207V56.6639C48.6091 56.2797 48.4905 55.9063 48.2784 55.5857C48.0662 55.2651 47.7689 55.0099 47.4197 54.8488C47.0705 54.6878 46.6833 54.6271 46.3016 54.6738C45.9199 54.7204 45.5587 54.8725 45.2586 55.1129L1.50002 90.2694C1.26208 90.4633 1.07029 90.7078 0.938585 90.985C0.80688 91.2622 0.738558 91.5652 0.738558 91.8721C0.738558 92.179 0.80688 92.482 0.938585 92.7592C1.07029 93.0365 1.26208 93.2809 1.50002 93.4748L45.2586 128.631C45.5621 128.874 45.928 129.027 46.3142 129.071C46.7005 129.116 47.0914 129.051 47.4424 128.884C47.7933 128.716 48.09 128.454 48.2984 128.125C48.5068 127.797 48.6185 127.417 48.6207 127.029V109.967H152.586Z",fill:"#BFBFBF"}),d("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),d("path",{d:"M103.086 261.224C102.697 261.227 102.317 261.338 101.989 261.547C101.661 261.755 101.398 262.051 101.23 262.402C101.063 262.753 100.998 263.144 101.043 263.53C101.087 263.916 101.24 264.282 101.483 264.585L129.259 299.018C129.452 299.265 129.699 299.465 129.982 299.602C130.264 299.74 130.574 299.811 130.888 299.811C131.202 299.811 131.512 299.74 131.794 299.602C132.076 299.465 132.324 299.265 132.517 299.018L160.293 264.585C160.536 264.282 160.689 263.916 160.733 263.53C160.778 263.144 160.713 262.753 160.546 262.402C160.378 262.051 160.115 261.755 159.787 261.547C159.459 261.338 159.078 261.227 158.69 261.224H147.103C146.948 242.871 142.448 235.012 134.741 226.275C132.983 224.207 131.017 222.139 128.897 219.864C126.724 217.537 117.879 211.075 108.931 204.819C110.677 211.877 111.938 219.045 112.707 226.275C114.776 244.008 114.983 261.224 114.983 261.224H103.086Z",fill:i,fillOpacity:.4}),d("path",{d:"M2.06897 190.033C1.52025 190.033 0.993996 190.251 0.605989 190.638C0.217983 191.026 5.00679e-06 191.552 5.00679e-06 192.101V224.207C5.00679e-06 224.755 0.217983 225.281 0.605989 225.669C0.993996 226.057 1.52025 226.275 2.06897 226.275H112.759C111.828 218.778 110.638 211.23 108.931 204.819C99.9827 198.512 90.931 192.411 88.2414 190.55C87.7206 190.204 87.1077 190.024 86.4828 190.033H2.06897Z",fill:i}),d("path",{d:"M87.4138 190.033C87.4138 190.033 98.2759 197.322 108.931 204.819C115.878 209.416 122.545 214.423 128.897 219.812C130.966 222.139 132.983 224.258 134.741 226.275H191.379V243.336C191.391 243.72 191.51 244.094 191.722 244.414C191.934 244.735 192.231 244.99 192.58 245.151C192.929 245.312 193.317 245.373 193.698 245.326C194.08 245.28 194.441 245.128 194.741 244.887L238.5 209.731C238.738 209.537 238.93 209.292 239.061 209.015C239.193 208.738 239.261 208.435 239.261 208.128C239.261 207.821 239.193 207.518 239.061 207.241C238.93 206.964 238.738 206.719 238.5 206.525L194.741 171.369C194.438 171.126 194.072 170.973 193.686 170.929C193.3 170.884 192.909 170.949 192.558 171.116C192.207 171.284 191.91 171.546 191.702 171.875C191.493 172.203 191.382 172.583 191.379 172.971V190.033H87.4138Z",fill:"#BFBFBF"}),d("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),d(Mt,k2(A2({x:153,y:77},l),{children:"PROS"})),d(Mt,k2(A2({x:2,y:193},l),{children:"CONS"}))]})}),uh("vs",t=>{const{x:e,y:n,colorPrimary:r,colorBg:i}=t,o=100,s=100,a=lt(r).lighten(20).toString();return I(V,{x:e,y:n,width:o,height:s,children:[I(jt,{children:[d("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),d(Cc,{})]}),d(Wt,{x:0,y:0,width:o,height:s,fill:a,filter:"url(#vs-divider-glow-filter)",opacity:.6}),d(Wt,{x:0,y:0,width:o,height:s,fill:r,"data-element-type":"shape"}),d("text",{x:o/2,y:s/2,fontSize:Math.min(o,s)/1.5,fontWeight:"bold",fill:i,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})});const L2=t=>{const{Title:e,Item:n,data:r,gap:i=20,groupGap:o=20,opposite:s=!0,flipped:a=!0,dividerType:l="vs",options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=f[0]||{children:[]},y=f[1]||{children:[]},m=g.children||[],x=y.children||[],v=xe(c.themeConfig),b=et(d(n,{indexes:[0,0],data:r,datum:m[0]||{}})),w=et(d(q,{indexes:[0]})),_=ZL(l),$=_?et(d(_,{x:0,y:0,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:v.colorPrimary,colorNegative:v.colorPrimary})):{width:0,height:0},P=[],C=[],A=[],E=Math.max(m.length,x.length),S=E>0?E*(b.height+i)-i:0,R=5,O=E>0?i/2+w.height/2:w.height/2,T=w.width+R,F=T+b.width+o,L=F+$.width+o,D=a?"flipped":"normal",k=a?"normal":s?"flipped":"normal";if(m.forEach((N,j)=>{const X=O+j*(b.height+i),z=[0,j];P.push(d(n,{indexes:z,datum:N,data:r,x:T,y:X,positionH:D,positionV:"middle"})),C.push(d(Xt,{indexes:z,x:T-w.width-R,y:X+(b.height-w.height)/2})),j<m.length-1&&C.push(d(q,{indexes:[0,j+1],x:T+(b.width-w.width)/2,y:X+b.height+i/2-w.height/2}))}),m.length>0){C.push(d(q,{indexes:[0,0],x:T+(b.width-w.width)/2,y:O-i/2-w.height/2}));const N=O+(m.length-1)*(b.height+i);C.push(d(q,{indexes:[0,m.length],x:T+(b.width-w.width)/2,y:N+b.height+i/2-w.height/2}))}else f.length>=1&&C.push(d(q,{indexes:[0,0],x:T+(b.width-w.width)/2,y:O-w.height/2}));if(x.forEach((N,j)=>{const X=O+j*(b.height+i),z=[1,j];P.push(d(n,{indexes:z,datum:N,data:r,x:L,y:X,positionH:k,positionV:"middle"})),C.push(d(Xt,{indexes:z,x:L+b.width+R,y:X+(b.height-w.height)/2})),j<x.length-1&&C.push(d(q,{indexes:[1,j+1],x:L+(b.width-w.width)/2,y:X+b.height+i/2-w.height/2}))}),x.length>0){C.push(d(q,{indexes:[1,0],x:L+(b.width-w.width)/2,y:O-i/2-w.height/2}));const N=O+(x.length-1)*(b.height+i);C.push(d(q,{indexes:[1,x.length],x:L+(b.width-w.width)/2,y:N+b.height+i/2-w.height/2}))}else f.length>=2&&C.push(d(q,{indexes:[1,0],x:L+(b.width-w.width)/2,y:O-w.height/2}));return f.length<2&&C.push(d(q,{indexes:[1],x:L+(b.width-w.width)/2,y:O+(S-w.height)/2})),_&&A.push(d(_,{x:F,y:O+(S-$.height)/2,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:Tt(c,[0])||v.colorPrimary,colorNegative:Tt(c,[1])||v.colorPrimary})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(V,{children:A}),d(St,{children:P}),d(Et,{children:C})]})]})};kt("compare-binary-horizontal",{component:L2,composites:["title","item"]});var az=Object.defineProperty,z2=Object.getOwnPropertySymbols,lz=Object.prototype.hasOwnProperty,cz=Object.prototype.propertyIsEnumerable,H2=(t,e,n)=>e in t?az(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R2=(t,e)=>{for(var n in e||(e={}))lz.call(e,n)&&H2(t,n,e[n]);if(z2)for(var n of z2(e))cz.call(e,n)&&H2(t,n,e[n]);return t};const hz={none:5,"dot-line":100,"arc-dot":20,"split-line":5},D2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=20,groupGap:a=0,decoration:l="none",surround:c=!0,flipRoot:h=!1,flipLeaf:u=!1,options:f}=t,[p,g]=i,{title:y,desc:m,items:x=[]}=o,v=r?d(r,{title:y,desc:m}):null,b=d(p,{indexes:[0],data:o,datum:o.items[0],themeColors:{}}),w=d(g,{indexes:[0,0],data:o,datum:((n=(e=x[0])==null?void 0:e.children)==null?void 0:n[0])||x[2]}),_=et(b),$=et(w),P=[],C=[],[A,E]=x,S=(A==null?void 0:A.children)||[],R=(E==null?void 0:E.children)||[],O=Math.max(_.height,S.length*($.height+s)-s,R.length*($.height+s)-s),T=hz[l]||0,F=$.width+T,L=F+_.width+a,D=(O-_.height)/2;A&&P.push(d(p,{indexes:[0],x:F,y:D,data:o,datum:A,positionH:h?"normal":"flipped"})),E&&P.push(d(p,{indexes:[1],x:L,y:D,data:o,datum:E,positionH:h?"flipped":"normal"}));const k=(N,j,X)=>{if(l==="none")return;const[z,M]=j,H=Tt(f,X),B={x:z,y:M,width:$.width,height:$.height,side:N,color:H||"#ccc",colorBg:f.themeConfig.colorBg||"#fff"};l==="split-line"?C.push(d(dz,R2({},B))):l==="dot-line"&&C.push(d(uz,R2({},B)))};if(c){const j=(2*_.width+a+$.width)/2+T,X=F+_.width+a/2,z=D+_.height/2;S.forEach((M,H)=>{const B=S.length*($.height+s)-s,Y=(O-B)/2+H*($.height+s),Z=Y+$.height/2-z,K=Math.max(0,j*j-Z*Z),Q=X-Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[0,H],datum:M,data:o,x:Q,y:Y,positionH:u?"flipped":"normal"})),k("left",[Q,Y],[0,H])}),R.forEach((M,H)=>{const B=R.length*($.height+s)-s,Y=(O-B)/2+H*($.height+s),Z=Y+$.height/2-z,K=Math.max(0,j*j-Z*Z),Q=X+Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[1,H],datum:M,data:o,x:Q,y:Y,positionH:u?"normal":"flipped"})),k("right",[Q,Y],[1,H])})}else S.forEach((N,j)=>{const X=S.length*($.height+s)-s,M=(O-X)/2+j*($.height+s),H=[0,j],B=0;P.push(d(g,{indexes:H,datum:N,data:o,x:B,y:M,positionH:u?"flipped":"normal"})),k("left",[B,M],H)}),R.forEach((N,j)=>{const X=R.length*($.height+s)-s,M=(O-X)/2+j*($.height+s),H=[1,j],B=L+_.width+T;P.push(d(g,{indexes:H,datum:N,data:o,x:B,y:M,positionH:u?"normal":"flipped"})),k("right",[B,M],H)});return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,I(V,{children:[d(St,{children:P}),d(V,{width:0,height:0,children:C})]})]})},dz=t=>{const{x:e,y:n,width:r,height:i,color:o,colorBg:s,side:a}=t,l=n+i,c=`split-line-linear-gradient-${a}`;return I(Bt,{children:[d(jt,{children:d(Oc,{id:c,startColor:o,stopColor:s,direction:a==="left"?"left-right":"right-left"})}),d(Ct,{x:e,y:l,width:r,height:1,fill:`url(#${c})`})]})},uz=t=>{const{x:e,y:n,side:r,width:i,height:o,color:s,colorBg:a}=t,l=6,c=l/3,h=l*2,u=c*2,f=5,p=r==="left"?e+i+l+f:e-l-f,g=n+o/2,y=p-c,m=g-c,x=80,v=r==="left"?x:-x,b=`dot-line-linear-gradient-${r}`;return I(V,{children:[d(jt,{children:d(Oc,{id:b,startColor:s,stopColor:a,direction:r==="left"?"left-right":"right-left"})}),I(le,{children:[d(Wt,{x:p-l,y:g-l,width:h,height:h,fill:"none",strokeWidth:1,stroke:s}),d(Wt,{x:y,y:m,width:u,height:u,fill:s})]}),d(Ct,{x:r==="left"?p:p+v,y:g-.5,width:x,height:1,fill:`url(#${b})`})]})};kt("compare-hierarchy-left-right",{component:D2,composites:["title","item"]});const N2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=0,itemGap:a=20,columnWidth:l=280,itemPadding:c=5,showColumnBackground:h=!0,columnBackgroundAlpha:u=.08,options:f}=t,[p,g]=i,{title:y,desc:m,items:x=[]}=o,v=r?d(r,{title:y,desc:m}):null,b=wg(f),w=[],_=[],$=l-c*2,P=et(d(p,{indexes:[0],data:o,datum:x[0],width:l})),C=et(d(g,{indexes:[0,0],data:o,datum:((n=(e=x[0])==null?void 0:e.children)==null?void 0:n[0])||{},width:$})),A=et(d(q,{indexes:[0]})),E=Math.max(...x.map(R=>{var O;return((O=R.children)==null?void 0:O.length)||0}),0),S=P.height+a+E*(C.height+a);if(x.forEach((R,O)=>{const{children:T=[]}=R,F=O*(l+s),L=F,D=0;if(h){const X=`${b[O%b.length]}${Math.round(u*255).toString(16).padStart(2,"0")}`;w.push(d(Ct,{x:F,y:D,width:l,height:S,fill:X,rx:0,ry:0,"data-element-type":"shape"}))}w.push(d(p,{indexes:[O],datum:R,data:o,x:L,y:D,width:l})),_.push(d(Xt,{indexes:[O],x:L+P.width-A.width-10,y:D+10})),O===0&&_.push(d(q,{indexes:[O],x:L+P.width/2-A.width/2,y:D-A.height-5}));const k=D+P.height+a;T.forEach((j,X)=>{const z=k+X*(C.height+a),M=L+c,H=[O,X];w.push(d(g,{indexes:H,datum:j,data:o,x:M,y:z,width:$})),_.push(d(Xt,{indexes:H,x:M+C.width-A.width-10,y:z+(C.height-A.height)/2})),X<T.length-1&&_.push(d(q,{indexes:[O,X+1],x:M+C.width/2-A.width/2,y:z+C.height-A.height/2}))});const N=L+c;if(T.length>0){const j=k+T.length*(C.height+a);_.push(d(q,{indexes:[O,T.length],x:N+C.width/2-A.width/2,y:j-C.height/2-A.height/2}))}else _.push(d(q,{indexes:[O,0],x:N+C.width/2-A.width/2,y:k-a/2-A.height/2}))}),x.length>0){const R=x.length*(l+s);_.push(d(q,{indexes:[x.length],x:R-s/2-A.width/2,y:-A.height-5}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,I(V,{children:[d(St,{children:w}),d(Et,{children:_})]})]})};kt("compare-hierarchy-row",{component:N2,composites:["title","item"]});const fh=Object.assign,fz={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class Bs{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof Bs||"x"in e&&"y"in e&&"children"in e){const o=e;return this.data=o.data,this.id=o.id,this.x=o.x,this.y=o.y,this.width=o.width,this.height=o.height,this.depth=o.depth,this.children=o.children,this.parent=o.parent,this.hgap=o.hgap,this.vgap=o.vgap,this.preH=o.preH,void(this.preV=o.preV)}this.data=e;const r=n.getHGap(e),i=n.getVGap(e);this.preH=n.getPreH(e),this.preV=n.getPreV(e),this.width=n.getWidth(e),this.height=n.getHeight(e),this.width+=this.preH,this.height+=this.preV,this.id=n.getId(e),this.addGap(r,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(e,n){this.hgap+=e,this.vgap+=n,this.width+=2*e,this.height+=2*n}eachNode(e){let n,r=[this];for(;n=r.shift();)e(n),r=n.children.concat(r)}DFTraverse(e){this.eachNode(e)}BFTraverse(e){let n,r=[this];for(;n=r.shift();)e(n),r=r.concat(n.children)}getBoundingBox(){const e={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(n=>{e.left=Math.min(e.left,n.x),e.top=Math.min(e.top,n.y),e.width=Math.max(e.width,n.x+n.width),e.height=Math.max(e.height,n.y+n.height)}),e}translate(e=0,n=0){this.eachNode(r=>{r.x+=e,r.y+=n,r.x+=r.preH,r.y+=r.preV})}right2left(){const e=this.getBoundingBox();this.eachNode(n=>{n.x=n.x-2*(n.x-e.left)-n.width}),this.translate(e.width,0)}bottom2top(){const e=this.getBoundingBox();this.eachNode(n=>{n.y=n.y-2*(n.y-e.top)-n.height}),this.translate(0,e.height)}}function ph(t,e={},n){e=fh({},fz,e);const r=new Bs(t,e),i=[r];let o;if(!n&&!t.collapsed){for(;o=i.shift();)if(!o.data.collapsed){const s=e.getChildren(o.data),a=s?s.length:0;if(o.children=new Array(a),s&&a)for(let l=0;l<a;l++){const c=new Bs(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class pz{constructor(e,n={}){this.options=n,this.rootNode=ph(e,n)}execute(){throw new Error("please override this method")}}function gz(t,e){const n=ph(t.data,e,!0),r=ph(t.data,e,!0),i=t.children.length,o=Math.round(i/2),s=e.getSide||function(a,l){return l<o?"right":"left"};for(let a=0;a<i;a++){const l=t.children[a];s(l,a)==="right"?r.children.push(l):n.children.push(l)}return n.eachNode(a=>{a.isRoot()||(a.side="left")}),r.eachNode(a=>{a.isRoot()||(a.side="right")}),{left:n,right:r}}const Nn=["LR","RL","TB","BT","H","V"],mz=["LR","RL","H"],yz=Nn[0];function vz(t,e,n){const r=e.direction||yz;if(e.isHorizontal=(o=>mz.indexOf(o)>-1)(r),Nn.indexOf(r)===-1)throw new TypeError(`Invalid direction: ${r}`);if(r===Nn[0])n(t,e);else if(r===Nn[1])n(t,e),t.right2left();else if(r===Nn[2])n(t,e);else if(r===Nn[3])n(t,e),t.bottom2top();else if(r===Nn[4]||r===Nn[5]){const{left:o,right:s}=gz(t,e);n(o,e),n(s,e),e.isHorizontal?o.right2left():o.bottom2top(),s.translate(o.x-s.x,o.y-s.y),t.x=o.x,t.y=s.y;const a=t.getBoundingBox();e.isHorizontal?a.top<0&&t.translate(0,-a.top):a.left<0&&t.translate(-a.left,0)}let i=e.fixedRoot;return i===void 0&&(i=!0),i&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),(function(o,s){if(s.radial){const[a,l]=s.isHorizontal?["x","y"]:["y","x"],c={x:1/0,y:1/0},h={x:-1/0,y:-1/0};let u=0;o.DFTraverse(g=>{u++;const{x:y,y:m}=g;c.x=Math.min(c.x,y),c.y=Math.min(c.y,m),h.x=Math.max(h.x,y),h.y=Math.max(h.y,m)});const f=h[l]-c[l];if(f===0)return;const p=2*Math.PI/u;o.DFTraverse(g=>{const y=g[l],m=c[l],x=g[a],v=o[a],b=(y-m)/f*(2*Math.PI-p)+p,w=x-v;g.x=Math.cos(b)*w,g.y=Math.sin(b)*w})}})(t,e),t}function j2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=j2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function W2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{W2(a)});const r=e[0],i=e[n-1],o=i.y-r.y+i.height;let s=0;if(e.forEach(a=>{s+=a.totalHeight}),o>t.height)t.y=r.y+o/2-t.height/2;else if(e.length!==1||t.height>s){const a=t.y+(t.height-o)/2-r.y;e.forEach(l=>{l.translate(0,a)})}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}const xz={getSubTreeSep:()=>0};function bz(t,e={}){return e=fh({},xz,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse(n=>{n.x=n.parent.x+n.parent.width}),t.parent=void 0,j2(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode(n=>{const r=n.children,i=r.length;if(i){const o=r[0];if(o.startY=n.startY+n._subTreeSep,i===1)o.y=n.y+n.height/2-o.height/2;else{o.y=o.startY+o.totalHeight/2-o.height/2;for(let s=1;s<i;s++){const a=r[s];a.startY=r[s-1].startY+r[s-1].totalHeight,a.y=a.startY+a.totalHeight/2-a.height/2}}}}),W2(t),t}class wz extends pz{execute(){return vz(this.rootNode,this.options,bz)}}const _z={};function $z(t,e){const n=fh({},_z,e);return new wz(t,n).execute()}var Pz=Object.defineProperty,Cz=Object.defineProperties,Oz=Object.getOwnPropertyDescriptors,F2=Object.getOwnPropertySymbols,Mz=Object.prototype.hasOwnProperty,Sz=Object.prototype.propertyIsEnumerable,B2=(t,e,n)=>e in t?Pz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ez=(t,e)=>{for(var n in e||(e={}))Mz.call(e,n)&&B2(t,n,e[n]);if(F2)for(var n of F2(e))Sz.call(e,n)&&B2(t,n,e[n]);return t},Iz=(t,e)=>Cz(t,Oz(e));const Tz=60,Az=14,V2=30,Y2="center",kz="curved",Lz=2,zz="node",Hz="solid",X2=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return Iz(Ez({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>X2(s,o,a)))!=null?i:[]})},G2=(t,e,n,r)=>{var i,o;e.push(t),(o=(i=t.data)._flatIndex)!=null||(i._flatIndex=e.length-1),r&&n.push({parent:r,child:t});const s=t.children;s==null||s.forEach(a=>G2(a,e,n,t))},Rz=(t,e,n,r)=>{const i=Math.abs(n-t)/2,o=n>t?t+i:t-i,s=n>t?n-i:n+i;return`M ${t} ${e} C ${o} ${e} ${s} ${r} ${n} ${r}`},Dz=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,Nz=(t,e,n,r=Y2)=>{const i=c=>Math.max(0,Math.min(1,c)),s=(c=>c==="top"?0:c==="bottom"?1:c==="center"?.5:i(c))(r),a=t.y+t.height*s,l=e.y+e.height*s;return n==="left"?{sx:t.x,sy:a,tx:e.x+e.width,ty:l}:{sx:t.x+t.width,sy:a,tx:e.x,ty:l}},q2=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=Tz,nodeGap:a=Az,edgeAlign:l=Y2,colorMode:c=zz,edgeColorMode:h=Hz,edgeType:u=kz,edgeWidth:f=Lz,options:p}=t,{title:g,desc:y,items:m=[]}=o,x=r?d(r,{title:g,desc:y}):null,v=ce(p),b=et(d(q,{indexes:[0]}));if(!m.length||!(i!=null&&i.length))return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,d(V,{children:d(q,{indexes:[0],x:0,y:0})})]});const w=X2(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,C=(H,B)=>Ii({depth:B,originalIndexes:H._indexes,flatIndex:H._flatIndex},c),A=(H,B)=>{const U=P.get(H);if(U)return U;const Y=C(H,B),G=Tt(p,Y),Z=xe({colorPrimary:G},p);return P.set(H,Z),$.set(H,G),Z},E=H=>{const B=_.get(H);if(B)return B;const U=Math.max(H._indexes.length-1,0),Y=gs(i,U),G=et(d(Y,{indexes:H._indexes,data:o,datum:H,positionH:"center",positionV:"middle",themeColors:A(H,U)}));return _.set(H,G),G},S=$z(w,{direction:"H",getSide:(H,B)=>{if(!H.parent)return"right";const U=(H.parent.children||[]).indexOf(H);return(U>=0?U:B)%2===0?"left":"right"},getWidth:H=>E(H).width,getHeight:H=>E(H).height,getHGap:()=>s,getVGap:()=>a}),R=[],O=[];G2(S,R,O);const T=R.length>0?Math.min(...R.map(H=>H.x)):0,F=R.length>0?Math.min(...R.map(H=>H.y)):0,L=V2-T,D=V2-F,k=[],N=[],j=[],X=[],z=new WeakMap;R.forEach(H=>{var B,U;const Y=H.data,G=E(Y),Z=H.x+L+((B=H.hgap)!=null?B:0),K=H.y+D+((U=H.vgap)!=null?U:0),it=gs(i,H.depth),Q=H.depth===0?"center":H.side==="left"?"flipped":"normal",at=A(Y,H.depth);j.push(d(it,{indexes:Y._indexes,data:o,datum:Y,x:Z,y:K,positionH:Q,positionV:"middle",themeColors:at})),z.set(H,{x:Z,y:K,width:G.width,height:G.height,centerX:Z+G.width/2,centerY:K+G.height/2})}),O.forEach(H=>{var B,U,Y,G;const{parent:Z,child:K}=H,it=z.get(K),Q=z.get(Z);if(!it||!Q)return;const at=K.data,{sx:ct,sy:nt,tx:J,ty:tt}=Nz(Q,it,K.side,l),st=(B=$.get(at))!=null?B:Tt(p,C(at,K.depth)),vt=(U=$.get(Z.data))!=null?U:Tt(p,C(Z.data,Z.depth)),gt=u==="straight"?Dz(ct,nt,J,tt):Rz(ct,nt,J,tt),ut=`edge-gradient-${at._indexes.join("-")}`;N.push(d(yt,{d:gt,stroke:h==="gradient"?`url(#${ut})`:st!=null?st:v,strokeWidth:f,fill:"none"})),h==="gradient"&&k.push(I("linearGradient",{id:ut,gradientUnits:"userSpaceOnUse",x1:ct,y1:nt,x2:J,y2:tt,children:[d("stop",{offset:"0%",stopColor:vt!=null?vt:v}),d("stop",{offset:"100%",stopColor:st!=null?st:v})]}));const ot=(G=(Y=at.children)==null?void 0:Y.length)!=null?G:0,ft=[...at._indexes,ot],mt=it.x+(it.width-b.width)/2,bt=it.y+it.height+8,pt=bt+b.height+6;K.depth>0&&X.push(d(Xt,{indexes:at._indexes,x:mt,y:bt})),X.push(d(q,{indexes:ft,x:mt,y:pt}))});const M=z.get(S);if(M){const H=S.data,B=(n=(e=H.children)==null?void 0:e.length)!=null?n:0,U=[...H._indexes,B],Y=M.x+(M.width-b.width)/2,G=M.y+M.height+8+b.height+6;X.push(d(q,{indexes:U,x:Y,y:G}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[k.length>0?d(jt,{children:k}):null,d(V,{children:N}),d(St,{children:j}),d(Et,{children:X})]})]})};kt("hierarchy-mindmap",{component:q2,composites:["title","item"]});const Fr=(t,e)=>{if(t[0]!=="#"||t.length!==7)return t;const n=Math.max(0,Math.min(1,e)),r=Math.round(n*255).toString(16).padStart(2,"0");return`${t}${r}`},Br=t=>t==null?"":String(t),Vs=(t,e,n)=>et(d(Mt,{fontSize:e,fontWeight:n,children:t})),jz=(t,e,n,r=" ")=>{const i=Vs(r,e,n);let o=i.width,s=i.height;return t.forEach(a=>{const l=Vs(a||" ",e,n);o=Math.max(o,l.width),s=Math.max(s,l.height)}),{width:o,height:s}},U2=(t,e,n,r)=>{const i=jz(t,e,"normal","Item");return{pillWidth:i.width+n*2,pillHeight:i.height+r*2}},Z2=t=>{const{Title:e,data:n,options:r,rowGap:i=20,labelGap:o=20,groupGap:s=20,pillGap:a=14,pillColumns:l=2,ungroupedColumns:c=6,layerLabelPosition:h="left",rowPadding:u=20,groupPadding:f=16,labelPaddingX:p=28,labelPaddingY:g=16,pillPaddingX:y=18,pillPaddingY:m=10,labelFontSize:x=20,groupTitleFontSize:v=18,pillFontSize:b=16,groupTitleGap:w=10,rowRadius:_=12,groupRadius:$=10,pillRadius:P=12}=t,{title:C,desc:A,items:E=[]}=n,S=e?d(e,{title:C,desc:A}):null;if(E.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[S,d(V,{children:d(St,{})})]});const R=xe(r.themeConfig),O=[],T=[],F=h==="right",L=.12,D=.55,k=.08,N=.4,j=.06,X=.35,z=E.map(Q=>{const at=Br(Q.label),ct=Vs(at||" ",x,"bold"),nt=ct.width+p*2,J=ct.height+g*2,tt=Q.children||[];if(tt.some(pt=>{var wt;return(((wt=pt.children)==null?void 0:wt.length)||0)>0})){const pt=[];tt.forEach(Ht=>{(Ht.children||[]).forEach(he=>{pt.push(Br(he.label))})});const{pillWidth:wt,pillHeight:Rt}=U2(pt,b,y,m),Vt=tt.map(Ht=>{const he=Br(Ht.label),At=Vs(he||" ",v,"bold"),Lt=Ht.children||[],ge=Lt.length>0?Math.min(l,Lt.length):0,xt=ge>0?Math.ceil(Lt.length/ge):0,Ft=ge>0?ge*wt+(ge-1)*a:0,Ot=xt>0?xt*Rt+(xt-1)*a:0,ae=Math.max(At.width,Ft)+f*2,ne=f*2+At.height+(xt>0?w+Ot:0);return{label:he,children:Lt,width:ae,height:ne,titleHeight:At.height,columns:ge,contentWidth:Ft,pillWidth:wt,pillHeight:Rt}}),ee=Vt.reduce((Ht,he)=>Ht+he.width,0)+(Vt.length>1?(Vt.length-1)*s:0),Dt=Vt.reduce((Ht,he)=>Math.max(Ht,he.height),0);return{label:at,labelWidth:nt,labelHeight:J,hasGroups:!0,children:tt,groupMetrics:Vt,contentInnerWidth:ee,contentInnerHeight:Dt}}const vt=tt.map(pt=>Br(pt.label)),{pillWidth:gt,pillHeight:ut}=U2(vt,b,y,m),ot=tt.length>0?Math.min(c,tt.length):0,ft=ot>0?Math.ceil(tt.length/ot):0,mt=ot>0?ot*gt+(ot-1)*a:0,bt=ft>0?ft*ut+(ft-1)*a:0;return{label:at,labelWidth:nt,labelHeight:J,hasGroups:!1,children:tt,pillWidth:gt,pillHeight:ut,columns:ot,contentInnerWidth:mt,contentInnerHeight:bt}}),M=z.reduce((Q,at)=>Math.max(Q,at.labelWidth),0),H=z.reduce((Q,at)=>Math.max(Q,at.contentInnerWidth),0),B=Q=>{const at=Tt(r,[Q])||R.colorPrimary||"#6c7dff";return{rowFill:Fr(at,L),rowStroke:Fr(at,D),groupFill:Fr(at,k),groupStroke:Fr(at,N),pillFill:Fr(at,j),pillStroke:Fr(at,X)}},U=(Q,at,ct,nt,J,tt,st,vt,gt,ut,ot,ft,mt,bt)=>{O.push(d(Ct,{x:ct,y:st,width:J,height:vt,fill:mt,stroke:bt,rx:_,ry:_,"data-element-type":"shape"})),O.push(d(Ct,{x:gt,y:ut,width:ot,height:ft,fill:mt,stroke:bt,rx:_,ry:_,"data-element-type":"shape"})),T.push(d(Mt,{x:ct,y:nt,width:J,height:tt,fontSize:x,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":at,children:Q}))},Y=(Q,at,ct,nt)=>{const J=Q.groupMetrics||[],tt=Q.label,st=[at],vt=M,gt=Q.labelHeight,ut=Q.contentInnerHeight,ot=Math.max(0,H-Q.contentInnerWidth),ft=J.length>0?ot/J.length:0,bt=Q.contentInnerWidth+(J.length>0?ot:0)+u*2,pt=ut+u*2,wt=Math.max(gt,pt),Rt=F?0:vt+o,Vt=F?Rt+bt+o:0,ee=ct+(wt-gt)/2,Dt=ct+(wt-pt)/2;U(tt,st,Vt,ee,vt,gt,ct,wt,Rt,Dt,bt,pt,nt.rowFill,nt.rowStroke);let Ht=Rt+u;return J.forEach((At,Lt)=>{const ge=[...st,Lt],xt=At.width+ft,Ft=Dt+u+(ut-At.height)/2;O.push(d(Ct,{x:Ht,y:Ft,width:xt,height:At.height,fill:nt.groupFill,stroke:nt.groupStroke,rx:$,ry:$,"data-element-type":"shape"}));const Ot=At.children.length>0,Nt=Ot?Ft+f:Ft,ae=Ot?At.titleHeight:At.height,ne=Ot?"top":"middle";if(T.push(d(Mt,{x:Ht+f,y:Nt,width:xt-f*2,height:ae,fontSize:v,fontWeight:"bold",alignHorizontal:"center",alignVertical:ne,fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":ge,children:At.label})),At.columns>0){const me=xt-f*2,ye=me-At.contentWidth,We=ye>0?ye/At.columns:0,Ye=At.pillWidth+We,Ki=At.columns*Ye+(At.columns-1)*a,Ut=(me-Ki)/2,Fe=Ht+f+Math.max(0,Ut),br=Ft+f+At.titleHeight+w;At.children.forEach((Mn,Zr)=>{const Pj=[...ge,Zr],Cj=Math.floor(Zr/At.columns),Oj=Zr%At.columns,Nv=Fe+Oj*(Ye+a),jv=br+Cj*(At.pillHeight+a),Wv=Math.min(P,At.pillHeight/2);O.push(d(Ct,{x:Nv,y:jv,width:Ye,height:At.pillHeight,fill:nt.pillFill,stroke:nt.pillStroke,rx:Wv,ry:Wv,"data-element-type":"shape"})),T.push(d(Mt,{x:Nv,y:jv,width:Ye,height:At.pillHeight,fontSize:b,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":Pj,children:Br(Mn.label)}))})}Ht+=xt+s}),{rowWidth:F?Vt+vt:Rt+bt,rowHeight:wt}},G=(Q,at,ct,nt)=>{const J=Q.label,tt=[at],st=M,vt=Q.labelHeight,gt=Q.contentInnerHeight,ut=Math.max(0,H-Q.contentInnerWidth),ot=Q.columns||0,ft=Q.pillWidth||0,mt=Q.pillHeight||0,bt=ot>0?ut/ot:0,pt=ft+bt,Rt=(ot>0?ot*pt+(ot-1)*a:0)+u*2,Vt=gt+u*2,ee=Math.max(vt,Vt),Dt=F?0:st+o,Ht=F?Dt+Rt+o:0,he=ct+(ee-vt)/2,At=ct+(ee-Vt)/2;if(U(J,tt,Ht,he,st,vt,ct,ee,Dt,At,Rt,Vt,nt.rowFill,nt.rowStroke),ot>0){const ge=Dt+u,xt=At+u;(Q.children||[]).forEach((Ot,Nt)=>{const ae=[...tt,Nt],ne=Math.floor(Nt/ot),me=Nt%ot,ye=ge+me*(pt+a),We=xt+ne*(mt+a),Ye=Math.min(P,mt/2);O.push(d(Ct,{x:ye,y:We,width:pt,height:mt,fill:nt.pillFill,stroke:nt.pillStroke,rx:Ye,ry:Ye,"data-element-type":"shape"})),T.push(d(Mt,{x:ye,y:We,width:pt,height:mt,fontSize:b,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":ae,children:Br(Ot.label)}))})}return{rowWidth:F?Ht+st:Dt+Rt,rowHeight:ee}};let Z=0,K=0;z.forEach((Q,at)=>{const ct=B(at),{rowWidth:nt,rowHeight:J}=Q.hasGroups?Y(Q,at,Z,ct):G(Q,at,Z,ct);K=Math.max(K,nt),Z+=J+i});const it=Math.max(Z-i,0);return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[S,I(V,{width:K,height:it,children:[d(V,{children:O}),d(St,{children:T})]})]})};kt("hierarchy-structure",{component:Z2,composites:["title"]});var Wz=Object.defineProperty,Fz=Object.defineProperties,Bz=Object.getOwnPropertyDescriptors,K2=Object.getOwnPropertySymbols,Vz=Object.prototype.hasOwnProperty,Yz=Object.prototype.propertyIsEnumerable,Q2=(t,e,n)=>e in t?Wz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ys=(t,e)=>{for(var n in e||(e={}))Vz.call(e,n)&&Q2(t,n,e[n]);if(K2)for(var n of K2(e))Yz.call(e,n)&&Q2(t,n,e[n]);return t},Xs=(t,e)=>Fz(t,Bz(e));const J2=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},ty=t=>{const{Title:e,Items:n,data:r,levelGap:i=80,nodeGap:o=60,edgeType:s="straight",edgeColorMode:a="gradient",edgeWidth:l=3,edgeStyle:c="solid",edgeDashPattern:h="5,5",edgeCornerRadius:u=0,edgeOffset:f=0,edgeOrigin:p="center",edgeOriginPadding:g=20,edgeMarker:y="none",markerSize:m=12,colorMode:x="branch",orientation:v="top-bottom",options:b}=t,w=v==="left-right"||v==="right-left",_=v==="bottom-top"||v==="right-left"?-1:1,{title:$,desc:P}=r,C=ce(b),A=nt=>{var J;const tt=[...nt];return(J=tt[0])!=null&&J.children||(tt[0]=Xs(Ys({},tt[0]),{children:tt.slice(1)}),tt.splice(1)),tt},E=(nt,J,tt,st,vt,gt="vertical")=>{const ut=gt==="vertical",ot=ut?st-J:tt-nt,ft=ut?tt-nt:st-J,mt=ot===0?1:Math.sign(ot),bt=ft===0?1:Math.sign(ft),pt=ut?J+ot/2:nt+ot/2,wt=Math.min(vt,Math.abs(ot)/2,Math.abs(ft)/2);return wt===0?ut?`M ${nt} ${J} L ${nt} ${pt} L ${tt} ${pt} L ${tt} ${st}`:`M ${nt} ${J} L ${pt} ${J} L ${pt} ${st} L ${tt} ${st}`:ut?`M ${nt} ${J}
|
|
83
|
+
L ${nt} ${pt-mt*wt}
|
|
84
|
+
Q ${nt} ${pt} ${nt+bt*wt} ${pt}
|
|
85
|
+
L ${tt-bt*wt} ${pt}
|
|
86
|
+
Q ${tt} ${pt} ${tt} ${pt+mt*wt}
|
|
87
|
+
L ${tt} ${st}`:`M ${nt} ${J}
|
|
88
|
+
L ${pt-mt*wt} ${J}
|
|
89
|
+
Q ${pt} ${J} ${pt} ${J+bt*wt}
|
|
90
|
+
L ${pt} ${st-bt*wt}
|
|
91
|
+
Q ${pt} ${st} ${pt+mt*wt} ${st}
|
|
92
|
+
L ${tt} ${st}`},S=nt=>{const{x:J,y:tt}=nt;return w?{x:tt*_,y:J}:{x:J,y:tt*_}},R=(nt,J,tt)=>{const{x:st,y:vt}=S(nt),gt=st+tt.x,ut=vt+tt.y,ot=ut+J.height/2;return{centerX:gt,centerY:ot,left:gt-J.width/2,right:gt+J.width/2,top:ut,bottom:ut+J.height}},O=nt=>{var J;if(!nt.length)return null;const tt=nt[0],st=(vt,gt=[],ut=0)=>{var ot,ft;const mt=[...gt,ut];return Xs(Ys({},vt),{_originalIndex:mt,_depth:mt.length-1,children:(ft=(ot=vt.children)==null?void 0:ot.map((bt,pt)=>st(bt,mt,pt)))!=null?ft:[]})};return(J=tt.children)!=null&&J.length?st(tt):Xs(Ys({},tt),{_originalIndex:[0],_depth:0,children:nt.slice(1).map((vt,gt)=>Xs(Ys({},vt),{_originalIndex:[gt+1],_depth:1}))})},T=nt=>{var J,tt;let st=0,vt=0;const gt=new Map,ut=new Map;nt.each(ot=>{ut.has(ot.depth)||ut.set(ot.depth,ot.data)});for(let ot=0;ot<nt.height+1;ot++){const ft=gs(n,ot),mt=(J=ut.get(ot))!=null?J:{},bt=(tt=mt._originalIndex)!=null?tt:Array(ot+1).fill(0),pt=et(d(ft,{indexes:bt,data:r,datum:mt,positionH:"center"}));gt.set(ot,pt),st=Math.max(st,pt.width),vt=Math.max(vt,pt.height)}return{levelBounds:gt,maxWidth:st,maxHeight:vt}},F=(nt,J,tt,st,vt,gt)=>{const{depth:ut,data:ot,parent:ft}=nt,mt=ot._originalIndex,bt=gs(n,ut),pt=J.get(ut),wt=R(nt,pt,st),Rt=wt.left,Vt=wt.top,ee={items:[],btns:[],deco:[]},Dt=Ii({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),Ht=Tt(b,Dt),he=xe({colorPrimary:Ht},b);if(ee.items.push(d(bt,{indexes:mt,datum:ot,data:r,x:Rt,y:Vt,positionH:"center",themeColors:he})),ee.btns.push(d(Xt,{indexes:mt,x:Rt+(pt.width-tt.width)/2,y:Vt+pt.height+5}),d(q,{indexes:[...mt,0],x:Rt+(pt.width-tt.width)/2,y:Vt+pt.height+tt.height+10})),ft){const At=J.get(ft.depth),Lt=R(ft,At,st),ge=gt.filter(Ut=>Ut.parent===ft),xt=ge.findIndex(Ut=>Ut===nt),Ft=ge.length;let Ot,Nt;if(p==="distributed"&&Ft>1)if(w){const Ut=J2(g,At.height),Fe=Lt.top+Ut,Mn=(Lt.bottom-Ut-Fe)/Ft;Nt=Fe+Mn*xt+Mn/2,Ot=(_>0?Lt.right:Lt.left)+f*_}else{const Ut=J2(g,At.width),Fe=Lt.left+Ut,Mn=(Lt.right-Ut-Fe)/Ft;Ot=Fe+Mn*xt+Mn/2,Nt=(_>0?Lt.bottom:Lt.top)+f*_}else Ot=w?(_>0?Lt.right:Lt.left)+f*_:Lt.centerX,Nt=w?Lt.centerY:(_>0?Lt.bottom:Lt.top)+f*_;const ae=w?(_>0?wt.left:wt.right)-f*_:wt.centerX,ne=w?wt.centerY:(_>0?wt.top:wt.bottom)-f*_;let me=ae,ye=ne;y==="arrow"&&(w?me-=m*_:ye-=m*_);let We;if(s==="curved")if(w){const Ut=Ot+(me-Ot)/2;We=`M ${Ot} ${Nt} C ${Ut} ${Nt}, ${Ut} ${ye}, ${me} ${ye}`}else{const Ut=Nt+(ye-Nt)/2;We=`M ${Ot} ${Nt} C ${Ot} ${Ut}, ${me} ${Ut}, ${me} ${ye}`}else if(u>0)We=E(Ot,Nt,me,ye,u,w?"horizontal":"vertical");else if(w){const Ut=Ot+(me-Ot)/2;We=`M ${Ot} ${Nt} L ${Ut} ${Nt} L ${Ut} ${ye} L ${me} ${ye}`}else{const Ut=Nt+(ye-Nt)/2;We=`M ${Ot} ${Nt} L ${Ot} ${Ut} L ${me} ${Ut} L ${me} ${ye}`}let Ye=C;if(a==="gradient"){const Ut=Ii({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Fe=Ii({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),br=Tt(b,Ut),Mn=Tt(b,Fe),Zr=`gradient-${ft.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(I("linearGradient",{id:Zr,x1:Ot,y1:Nt,x2:me,y2:ye,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:br}),d("stop",{offset:"100%",stopColor:Mn})]})),Ye=`url(#${Zr})`}const Ki=c==="dashed"?h:"";if(ee.deco.push(d(yt,{d:We,stroke:Ye,strokeWidth:l,strokeDasharray:Ki,fill:"none"})),y==="arrow"){const Ut=a==="gradient"?Tt(b,Dt):ce(b),Fe=w?[{x:ae,y:ne},{x:ae-m*_,y:ne-m/2},{x:ae-m*_,y:ne+m/2}]:[{x:ae,y:ne},{x:ae-m/2,y:ne-m*_},{x:ae+m/2,y:ne-m*_}];ee.deco.push(d(Ve,{points:Fe,fill:Ut,width:m,height:m}))}if(y==="dot"){const Ut=Ii({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Fe=a==="gradient"?Tt(b,Ut):ce(b);ee.deco.push(d(Wt,{x:(w?_>0?Lt.right+f:Lt.left-f:Ot)-m,y:(w?Nt:_>0?Lt.bottom+f:Lt.top-f)-m,width:m*2,height:m*2,fill:Fe}));const br=a==="gradient"?Tt(b,Dt):ce(b);ee.deco.push(d(Wt,{x:ae-m,y:ne-m,width:m*2,height:m*2,fill:br}))}}return ee},L=(nt,J,tt)=>{const st=new Map;nt.forEach(gt=>{var ut;const ot=gt.parent?gt.parent.data._originalIndex.join("-"):"root";((ut=st.get(ot))!=null?ut:st.set(ot,[]).get(ot)).push(gt)});const vt=[];return st.forEach(gt=>{if(gt.length<=1)return;const ut=gt.slice().sort((ot,ft)=>w?S(ot).y-S(ft).y:S(ot).x-S(ft).x);if(ut.length!==0)for(let ot=0;ot<ut.length-1;ot++){const ft=S(ut[ot]),mt=S(ut[ot+1]),bt=ut[ot].data._originalIndex.slice(0,-1),pt=ut[ot].data._originalIndex.at(-1)+1;if(w){const wt=ft.x+tt.x+(_>0?-J.width-5:J.width+5),Rt=(ft.y+mt.y)/2+tt.y-J.height/2;vt.push(d(q,{indexes:[...bt,pt],x:wt,y:Rt}))}else{const wt=ft.y+tt.y-J.height-5,Rt=(ft.x+mt.x)/2+tt.x-J.width/2;vt.push(d(q,{indexes:[...bt,pt],x:Rt,y:wt}))}}}),vt},D=A(r.items),k=e?d(e,{title:$,desc:P}):null,N=et(d(q,{indexes:[0]}));if(!D.length)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[k,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:-N.width/2,y:-N.height/2})})})]});const j=O(D),X=nh(j),{levelBounds:z,maxWidth:M,maxHeight:H}=T(X),U=RA().nodeSize(w?[H+o,M+i]:[M+o,H+i]).separation(()=>1)(X).descendants(),Y=U.map(nt=>S(nt)),G=Math.min(...Y.map(nt=>nt.x)),Z=Math.min(...Y.map(nt=>nt.y)),K={x:Math.max(0,-G+M/2),y:Math.max(0,-Z+N.height+10)},it=[],Q=[],at=[],ct=[];return U.forEach((nt,J)=>{nt.data._flatIndex=J;const{x:tt,y:st}=S(nt);nt.__layout={x:tt,y:st}}),U.forEach(nt=>{const{items:J,btns:tt,deco:st}=F(nt,z,N,K,ct,U);it.push(...J),Q.push(...tt),at.push(...st)}),Q.push(...L(U,N,K)),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[k,I(V,{children:[ct.length>0&&d(jt,{children:ct}),d(le,{children:at}),d(St,{children:it}),d(Et,{children:Q})]})]})};kt("hierarchy-tree",{component:ty,composites:["title","item"]});const ey=t=>{const{Title:e,Item:n,data:r,gap:i=20,width:o,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=et(d(q,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:c[0]})),f=o||u.width,p=e?d(e,{title:a,desc:l}):null,g=[],y=[],m=(f-h.width)/2;if(c.forEach((x,v)=>{const b=(u.height+i)*v,w=[v];y.push(d(n,{indexes:w,datum:x,data:r,y:b,width:f,positionV:"middle",positionH:s?v%2===0?"normal":"flipped":"normal"})),g.push(d(Xt,{indexes:w,x:-h.width-10,y:b+(u.height-h.height)/2}));const _=v===0?-h.height:b-i/2-h.height/2;g.push(d(q,{indexes:w,x:m,y:_}))}),c.length>0){const v=(u.height+i)*(c.length-1)+u.height;g.push(d(q,{indexes:[c.length],x:m,y:v}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(St,{children:y}),d(Et,{children:g})]})]})};kt("list-column",{component:ey,composites:["title","item"]});const ny=t=>{const{Title:e,Item:n,data:r,columns:i=3,gap:o=24,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=et(d(q,{indexes:[0]})),f=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.height+o,m=f.width+o,x=new Set;return c.forEach((v,b)=>{const w=Math.floor(b/i),_=b%i,$=_*m,P=w*y,C=[b];g.push(d(n,{indexes:C,datum:v,data:r,x:$,y:P,positionH:"center",positionV:s&&b%2===0?"normal":"flipped"})),p.push(d(Xt,{indexes:C,x:$+(f.width-u.width)/2,y:P+f.height})),_<i-1&&p.push(d(q,{indexes:[b+1],x:$+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2})),_===0&&!x.has(w)&&(p.push(d(q,{indexes:[b],x:$-o/2-u.width/2,y:P+(f.height-u.height)/2})),x.add(w)),(_===i-1||b===c.length-1)&&p.push(d(q,{indexes:[b+1],x:$+f.width+o/2-u.width/2,y:P+(f.height-u.height)/2}))}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(St,{children:g}),d(Et,{children:p})]})]})};kt("list-grid",{component:ny,composites:["title","item"]});const ry=t=>{const{Title:e,Item:n,data:r,gap:i=20,levelGap:o=20}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(q,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=Math.ceil(Math.sqrt(l.length)),y=[];let m=l.length;for(let _=0;_<g;_++){const $=Math.min(_+1,m);if(y.push($),m-=$,m<=0)break}let x=0;const v=Math.max(...y),w=(v*u.width+(v-1)*i)/2;return y.forEach((_,$)=>{const P=$*(u.height+o),C=_*u.width+(_-1)*i,A=w-C/2;for(let E=0;E<_&&x<l.length;E++){const S=A+E*(u.width+i),R=l[x],O=[x];p.push(d(n,{indexes:O,datum:R,data:r,x:S,y:P,positionH:"center"})),f.push(d(Xt,{indexes:O,x:S+(u.width-h.width)/2,y:P+u.height})),E<_-1&&f.push(d(q,{indexes:[x+1],x:S+u.width+(i-h.width)/2,y:P+(u.height-h.height)/2})),E===0&&f.push(d(q,{indexes:[x],x:S-i/2-h.width/2,y:P+(u.height-h.height)/2})),E===_-1&&f.push(d(q,{indexes:[x+1],x:S+u.width+i/2-h.width/2,y:P+(u.height-h.height)/2})),x++}}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(St,{children:p}),d(Et,{children:f})]})]})};kt("list-pyramid",{component:ry,composites:["title","item"]});const iy=t=>{const{Title:e,Item:n,data:r,gap:i=20,zigzag:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(q,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=(u.height-h.height)/2,y=u.height;if(l.forEach((m,x)=>{const v=(u.width+i)*x,b=[x];p.push(d(n,{indexes:b,datum:m,data:r,x:v,positionH:"center",positionV:o&&x%2===0?"normal":"flipped"})),f.push(d(Xt,{indexes:b,x:v+(u.width-h.width)/2,y}));const w=x===0?-(i+h.width)/2:v-(i+h.width)/2;f.push(d(q,{indexes:b,x:w,y:g}))}),l.length>0){const x=(u.width+i)*(l.length-1)+u.width+(i-h.width)/2;f.push(d(q,{indexes:[l.length],x,y:g}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(St,{children:p}),d(Et,{children:f})]})]})};kt("list-row",{component:iy,composites:["title","item"]});var Xz=Object.defineProperty,oy=Object.getOwnPropertySymbols,Gz=Object.prototype.hasOwnProperty,qz=Object.prototype.propertyIsEnumerable,sy=(t,e,n)=>e in t?Xz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uz=(t,e)=>{for(var n in e||(e={}))Gz.call(e,n)&&sy(t,n,e[n]);if(oy)for(var n of oy(e))qz.call(e,n)&&sy(t,n,e[n]);return t};const ay=t=>{const{Item:e,data:n,outerRadius:r=250,innerRadius:i=120,startAngle:o=-90,endAngle:s=270,gapAngle:a=1,options:l}=t,{title:c,items:h=[]}=n,u=xe(l.themeConfig),f=et(d(q,{indexes:[0]})),p=[],g=[],y=[],m=r+100,x=r+100,v=s-o,b=Math.abs(v-360)<.01,w=h.length>0?a*(b?h.length:h.length-1):0,_=v-w,$=h.length>0?_/h.length:0;if(h.forEach((O,T)=>{var F;const L=[T],D=o+($+a)*T,k=D+$,j=a*Math.PI*r/180/i*(180/Math.PI),X=a,z=(D+X/2)*Math.PI/180,M=(k-X/2)*Math.PI/180,H=(D+j/2)*Math.PI/180,B=(k-j/2)*Math.PI/180,U=m+r*Math.cos(z),Y=x+r*Math.sin(z),G=m+r*Math.cos(M),Z=x+r*Math.sin(M),K=m+i*Math.cos(H),it=x+i*Math.sin(H),Q=m+i*Math.cos(B),at=x+i*Math.sin(B),ct=$>180?1:0,nt=`
|
|
93
|
+
M ${U} ${Y}
|
|
94
|
+
A ${r} ${r} 0 ${ct} 1 ${G} ${Z}
|
|
95
|
+
L ${Q} ${at}
|
|
96
|
+
A ${i} ${i} 0 ${ct} 0 ${K} ${it}
|
|
97
97
|
Z
|
|
98
|
-
`.trim(),
|
|
99
|
-
M ${m} ${
|
|
100
|
-
L ${
|
|
101
|
-
A ${P} ${P} 0 ${N} 1 ${D} ${
|
|
98
|
+
`.trim(),J=Tt(l,L);y.push(d(yt,{id:"shape-sector",d:nt,fill:J,width:r*2+200,height:r*2+200,"data-element-type":"shape"}));const st=(D+$/2)*Math.PI/180,vt=(r+i)/2,gt=r-i,ut=$*Math.PI/180,ot=vt*ut,ft=Math.min(ot*.8,gt*.9),mt=Math.min(gt*.9,ot*.8),bt=et(d(e,{indexes:[0],data:n,datum:h[0],positionH:"center",width:ft,height:mt})),pt=m+vt*Math.cos(st)-bt.width/2,wt=x+vt*Math.sin(st)-bt.height/2;g.push(d(e,{indexes:L,datum:O,data:n,x:pt,y:wt,positionH:"center",width:ft,height:mt,themeColors:Uz({},xe({colorBg:Tt(l,L),colorPrimary:((F=l.themeConfig)==null?void 0:F.colorBg)||"white"}))}));const Rt=r+10,Vt=m+Rt*Math.cos(st)-f.width/2,ee=x+Rt*Math.sin(st)-f.height/2;if(p.push(d(Xt,{indexes:L,x:Vt,y:ee})),b||T<h.length-1){const Ht=(k+a/2)*Math.PI/180,he=vt,At=m+he*Math.cos(Ht)-f.width/2,Lt=x+he*Math.sin(Ht)-f.height/2;p.push(d(q,{indexes:[T+1],x:At,y:Lt}))}}),h.length>0){const T=(o-a/2)*Math.PI/180,F=(r+i)/2,L=m+F*Math.cos(T)-f.width/2,D=x+F*Math.sin(T)-f.height/2;p.push(d(q,{indexes:[0],x:L,y:D}))}const P=i*.9;let C=m,A=x,E=P*1.4,S=P*1.4;if(!b){const T=(o+s)/2*Math.PI/180,F=P*.5;C=m+F*Math.cos(T),A=x+F*Math.sin(T);const L=v*Math.PI*F/180;E=Math.min(L*.8,P*1.4),S=Math.min(F*1.5,P*1.4)}let R="";if(b)R="";else{const O=o*Math.PI/180,T=s*Math.PI/180,F=m+P*Math.cos(O),L=x+P*Math.sin(O),D=m+P*Math.cos(T),k=x+P*Math.sin(T),N=v>180?1:0;R=`
|
|
99
|
+
M ${m} ${x}
|
|
100
|
+
L ${F} ${L}
|
|
101
|
+
A ${P} ${P} 0 ${N} 1 ${D} ${k}
|
|
102
102
|
Z
|
|
103
|
-
`.trim()}return E(Y,{id:"infographic-container",children:[d(Y,{children:y}),x?d(Lt,{id:"shape-center-circle",x:m-P,y:b-P,width:P*2,height:P*2,fill:u.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):d(ht,{id:"shape-center-sector",d:H,fill:u.colorPrimaryBg,fillOpacity:.5,width:r*2+200,height:r*2+200,"data-element-type":"shape"}),d(Et,{x:O-I/2,y:T-S/2,width:I,height:S,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:u.colorText,"data-element-type":kt.Title,children:c}),d(It,{children:g}),d(Ot,{children:p})]})};Tt("list-sector",{component:K2,composites:["title","item"]});const Q2=t=>{const{Title:e,Item:n,data:r,columns:i=4,gap:o=20,stepOffset:s=40}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.width+o;return c.forEach((m,b)=>{const v=b%i,x=Math.floor(b/i),w=v*y,_=x*(f.height+o),$=v*s,P=_+$,O=[b];g.push(d(n,{indexes:O,datum:m,data:r,x:w,y:P,positionH:"center"})),p.push(d(Ft,{indexes:O,x:w+(f.width-u.width)/2,y:P+f.height+5}))}),c.forEach((m,b)=>{const v=b%i,x=Math.floor(b/i),w=v*y,_=x*(f.height+o),$=v*s,P=_+$;if(b===0&&p.push(d(q,{indexes:[0],x:w-o/2-u.width/2,y:P+(f.height-u.height)/2})),v<i-1&&b<c.length-1){const O=Math.floor((b+1)/i);x===O&&p.push(d(q,{indexes:[b+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}(v===i-1||b===c.length-1)&&p.push(d(q,{indexes:[b+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}),c.length===0&&p.push(d(q,{indexes:[0],x:(i-1)*y/2+(f.width-u.width)/2,y:0})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(It,{children:g}),d(Ot,{children:p})]})]})};Tt("list-waterfall",{component:Q2,composites:["title","item"]});const lh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},J2=t=>{const{Title:e,Item:n,data:r,quadrantWidth:i,quadrantHeight:o,showAxis:s=!0,dashedAxis:a=!0}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=Array.from({length:4},(x,w)=>h[w]),p=f[0]?Q(d(n,{indexes:[0],data:r,datum:f[0]})):{width:0,height:0},g=i!=null?i:p.width+lh.defaultExtraSpacing,y=o!=null?o:p.height+lh.defaultExtraSpacing,m=SL(g,y,p),b=f.map((x,w)=>{if(!x)return null;const _=m[w];return d(n,{indexes:[w],datum:x,data:r,x:_.x,y:_.y,positionH:w%2?"flipped":"normal",positionV:w<2?"normal":"flipped"})}).filter(Boolean),v=ML(g,y,s,a);return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,E(Y,{width:g*2,height:y*2,children:[v,d(It,{children:b})]})]})};function ML(t,e,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:s,dashArray:a}=lh,l=t,c=e,h=t*2,u=e*2,f=r?a:void 0;return[d(ht,{d:`M 0 ${c} L ${h} ${c}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),E(ne,{transform:`translate(${h}, ${c})`,children:[d(ht,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${-o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),E(ne,{transform:`translate(0, ${c})`,children:[d(ht,{d:`M 0 0 L ${o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),d(ht,{d:`M ${l} 0 L ${l} ${u}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),E(ne,{transform:`translate(${l}, 0)`,children:[d(ht,{d:`M 0 0 L ${-o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"})]}),E(ne,{transform:`translate(${l}, ${u})`,children:[d(ht,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"}),d(ht,{d:`M 0 0 L ${o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"})]})]}function SL(t,e,n){const r=t/2,i=e/2;return[{x:r-n.width/2,y:i-n.height/2},{x:t+r-n.width/2,y:i-n.height/2},{x:r-n.width/2,y:e+i-n.height/2},{x:t+r-n.width/2,y:e+i-n.height/2}]}Tt("quadrant",{component:J2,composites:["title","item"]});const ty=t=>{const{Title:e,Item:n,data:r,radius:i=150,startMode:o="top"}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[];if(l.length===0)return f.push(d(q,{indexes:[0],x:-h.width/2,y:-h.height/2})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,d(Y,{children:d(Ot,{children:f})})]});const g=Math.max(u.width,u.height),y=Math.max(i,g),m=y+g/2,b=l.map(()=>{const $=u.width,P=u.height;return($+P)/2}),v=b.reduce(($,P)=>$+P,0);let x;o==="equal"?x=-Math.PI/2:x=-Math.PI/2+2*Math.PI/l.length/2;let w=x;l.forEach(($,P)=>{const O=b[P]/v*2*Math.PI,T=w+O/2;w+=O;const I=m+y*Math.cos(T)-u.width/2,S=m+y*Math.sin(T)-u.height/2;p.push(d(n,{indexes:[P],datum:$,data:r,x:I,y:S}));const H=y-Math.max(u.width,u.height)/2-20,C=m+H*Math.cos(T)-h.width/2,A=m+H*Math.sin(T)-h.height/2;f.push(d(Ft,{indexes:[P],x:C,y:A}))});const _=y-Math.max(u.width,u.height)/2-20;if(l.length>0)for(let $=0;$<l.length;$++){const P=$*2*Math.PI/l.length-Math.PI/2,O=($+1)%l.length*2*Math.PI/l.length-Math.PI/2;let T;if($===l.length-1){const H=O+2*Math.PI-P;T=P+H/2}else T=(P+O)/2;const I=m+_*Math.cos(T)-h.width/2,S=m+_*Math.sin(T)-h.height/2;f.push(d(q,{indexes:[$+1],x:I,y:S}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:p}),d(Ot,{children:f})]})]})};Tt("relation-circle",{component:ty,composites:["title","item"]});const ey=t=>{const{Title:e,Item:n,data:r,spacing:i=120,showConnections:o=!0,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null;if(c.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,d(Y,{children:d(It,{})})]});const u=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"}));function f(){const P=c.map((I,S)=>({id:S,data:I,isCenter:S===0,_originalIndex:[S]})),O=c.slice(1).map((I,S)=>({source:0,target:S+1})),T=TT(P).force("link",$T(O).id(I=>I.id).distance(i)).force("charge",AT().strength(-50)).force("center",nT(0,0)).force("collision",wT().radius(Math.max(u.width,u.height)/2+10));for(let I=0;I<300;++I)T.tick();return{nodes:P,links:O}}const{nodes:p,links:g}=f(),y=Math.min(...p.map(P=>{var O;return(O=P.x)!=null?O:0})),m=Math.min(...p.map(P=>{var O;return(O=P.y)!=null?O:0})),b=Math.max(0,-y+u.width/2),v=Math.max(0,-m+u.height/2),x=(P,O)=>({positionH:P<-50?"flipped":P>50?"normal":"center",positionV:O<-50?"flipped":O>50?"normal":"middle"}),w=p.map(P=>{if(P.x==null||P.y==null)return null;const O=P.x+b-u.width/2,T=P.y+v-u.height/2,{positionH:I,positionV:S}=x(P.x,P.y);return d(n,{indexes:P._originalIndex,datum:P.data,data:r,x:O,y:T,positionH:I,positionV:S},P.id)}).filter(Boolean),_=new Map(p.map(P=>[P.id,P])),$=o?g.map(P=>{const O=typeof P.source=="object"?P.source:_.get(P.source),T=typeof P.target=="object"?P.target:_.get(P.target);if(!O||!T||O.x==null||O.y==null||T.x==null||T.y==null)return null;const I=`M ${O.x+b} ${O.y+v} L ${T.x+b} ${T.y+v}`;return d(ht,{d:I,stroke:re(s),strokeWidth:2,strokeOpacity:.6})}).filter(Boolean):[];return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(Y,{children:$}),d(It,{children:w})]})]})};Tt("relation-network",{component:ey,composites:["title","item"]});var EL=Object.defineProperty,IL=Object.defineProperties,TL=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,ny=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,iy=(t,e,n)=>e in t?EL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AL=(t,e)=>{for(var n in e||(e={}))ny.call(e,n)&&iy(t,n,e[n]);if(Fs)for(var n of Fs(e))ry.call(e,n)&&iy(t,n,e[n]);return t},kL=(t,e)=>IL(t,TL(e)),zL=(t,e)=>{var n={};for(var r in t)ny.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fs)for(var r of Fs(t))e.indexOf(r)<0&&ry.call(t,r)&&(n[r]=t[r]);return n};const ch=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=e,s=zL(e,["width","height","colorPrimary","rotation"]);const a=`gradient-arrow-stroke-${i.replace("#","")}`,l=`gradient-arrow-fill-${i.replace("#","")}`,c=Math.round(n*.515),h=Math.round(r*.275),u=Math.round(r*.875),f=[{x:0,y:h},{x:c,y:h},{x:c,y:r*.075},{x:n,y:r*.575},{x:c,y:r*1.075},{x:c,y:u},{x:0,y:u}],p=n/2,g=r/2,y=`rotate(${o} ${p} ${g})`;return E(Rt,{children:[d(Ne,kL(AL({},s),{width:n,height:r,points:f,fill:`url(#${l})`,stroke:`url(#${a})`,transform:y,"data-element-type":"shape"})),E(zt,{children:[E("linearGradient",{id:l,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i,"stop-opacity":"0.36"}),d("stop",{offset:"100%","stop-color":i,"stop-opacity":"0"})]}),E("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i}),d("stop",{offset:"58%","stop-color":i,"stop-opacity":"0"})]})]})]})},LL=({text:t,x:e=0,y:n=0,fontSize:r=56,fontWeight:i="bold",fill:o="#FFFFFF",textAnchor:s="middle",dominantBaseline:a="middle",shadowOffsetX:l=2,shadowOffsetY:c=4,midShadowOffsetX:h=1,midShadowOffsetY:u=2,deepShadowOpacity:f=.3,midShadowOpacity:p=.5})=>E(Y,{children:[d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:f,textAnchor:s,dominantBaseline:a,transform:`translate(${l}, ${c})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:p,textAnchor:s,dominantBaseline:a,transform:`translate(${h}, ${u})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,textAnchor:s,dominantBaseline:a,children:t})]});var RL=Object.defineProperty,HL=Object.defineProperties,DL=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,oy=Object.prototype.hasOwnProperty,sy=Object.prototype.propertyIsEnumerable,ay=(t,e,n)=>e in t?RL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NL=(t,e)=>{for(var n in e||(e={}))oy.call(e,n)&&ay(t,n,e[n]);if(Bs)for(var n of Bs(e))sy.call(e,n)&&ay(t,n,e[n]);return t},jL=(t,e)=>HL(t,DL(e)),FL=(t,e)=>{var n={};for(var r in t)oy.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bs)for(var r of Bs(t))e.indexOf(r)<0&&sy.call(t,r)&&(n[r]=t[r]);return n};const BL=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=FL(e,["width","height","colorPrimary","rotation","strokeWidth"]);const l=[{x:n/2,y:0},{x:n,y:r},{x:0,y:r}],c=n/2,h=r/2,u=`rotate(${o} ${c} ${h})`;return d(Ne,jL(NL({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},WL=-118,ly=118,cy=240,VL=180,YL=40,XL="M238.9 69.7a6 6 0 0 1-.1 1v.2l-.2.3v.3l-.1.3a6.2 6.2 0 0 1-.3.6l-.1.3-.2.3-.2.4-.3.5-.1.1a10.9 10.9 0 0 1-.8 1v.1l-.5.5h-.1l-.4.4-.3.3-.3.2-.3.3-.4.2a13 13 0 0 1-.7.5l-.4.3-.5.3-97.5 56.7-.7.4h-.2l-.6.4h-.1l-.8.4h-.2l-.6.4h-.2l-.8.3h-.2l-.5.3-.5.1-.5.1-.5.2h-.5a33.7 33.7 0 0 1-3.2.7h-.2l-1 .2h-1.6l-.7.1h-4.7l-.8-.1h-.2a38.2 38.2 0 0 1-2-.4h-.4l-.7-.2h-.4l-.7-.2-.4-.1a27.3 27.3 0 0 1-2.2-.7h-.2a44.2 44.2 0 0 1-.9-.3l-.5-.3-.4-.1-.5-.2-.3-.2-.5-.2-.3-.2-.8-.4L6.5 78C2.2 75.6 0 72.4 0 69v41.7c0 3.2 2.1 6.5 6.4 9l98.1 56.6a23.2 23.2 0 0 0 1 .6l.6.3.3.1.5.2.4.2.3.1h.2l.2.2a21.4 21.4 0 0 0 1.9.6l.3.1h.2l.7.2a77.6 77.6 0 0 1 1.1.3h.3l.7.2h.4a42.5 42.5 0 0 0 1 .2l1 .2h1.1l.4.1h2.1l.7.1h1.5a22 22 0 0 0 1.8-.2h.4l1.1-.1h.2l1.2-.2h.1l.3-.1.6-.1a12.5 12.5 0 0 0 1-.3h.5l.5-.2a29 29 0 0 0 1-.3h.2l.3-.2h.2a27 27 0 0 0 1.6-.7h.2l.8-.4a19.4 19.4 0 0 0 1.6-.9l97.5-56.7.3-.1.2-.2.4-.2.4-.3.3-.2.3-.3.4-.2.3-.3.3-.3h.1l.3-.3.5-.6h.1l.3-.5h.1v-.1l.4-.4v-.1l.4-.5v-.1l.1-.2.1-.2.2-.3.1-.3.1-.3.1-.1a6.9 6.9 0 0 0 .2-.8l.1-.3v-.4l.1-.3v-1l.2-41.4v.4Z",GL="M232.5 60.4c8.5 4.9 8.5 12.8.1 17.7l-97.5 56.7c-8.4 4.9-22 4.9-30.5 0L6.5 78C-2 73-2 65.3 6.4 60.4l97.5-56.7c8.4-5 22-5 30.5 0l98.1 56.7Z",qL="M119.1 0A31 31 0 0 0 104 3.7L6.4 60.4C-2 65.3-2 73.2 6.4 78l98.2 56.7c4.2 2.4 9.8 3.7 15.3 3.7a31 31 0 0 0 15.2-3.7L232.6 78c8.4-5 8.4-12.8 0-17.7L134.3 3.7A31.2 31.2 0 0 0 119.1 0Zm0 2.5c5.4 0 10.3 1.2 14 3.3l98.2 56.7c3.3 2 5.1 4.3 5.1 6.8 0 2.4-1.8 4.7-5 6.6l-97.5 56.7a28.3 28.3 0 0 1-14 3.4c-5.3 0-10.3-1.2-14-3.4L7.7 76c-3.3-1.9-5-4.3-5-6.7 0-2.4 1.7-4.8 5-6.7L105 5.8a29 29 0 0 1 14-3.3Z",hy=E("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),d("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),d("feOffset",{dx:"0",dy:"4"}),d("feGaussianBlur",{stdDeviation:"6"}),d("feComposite",{in2:"hardAlpha",operator:"out"}),d("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),d("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),dy=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=cy}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null;if(l.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(zt,{children:hy}),c,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const h=Q(d(q,{indexes:[0]})),u=[],f=[],p=[],g=o/cy,y=VL*g;return l.forEach((m,b)=>{const v=[b],x=Ct(i,v),w=b*(o+WL),_=(l.length-1-b)*ly,$=`cube-gradient-bottom-${b}`,P=`cube-gradient-top-${b}`,O=`cube-gradient-stroke-${b}`;p.push(E(Y,{x:w,y:_,id:`cube-${b}`,width:o,height:y,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[E(zt,{children:[E("linearGradient",{id:$,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:x,stopOpacity:"0.8"}),d("stop",{offset:"1",stopColor:x,stopOpacity:"0.4"})]}),E("linearGradient",{id:P,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:x,stopOpacity:"0.9"}),d("stop",{offset:"1",stopColor:x,stopOpacity:"0.5"})]}),E("linearGradient",{id:O,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:x}),d("stop",{offset:"1",stopColor:x,stopOpacity:"0.7"})]})]}),E(ne,{transform:`scale(${g})`,children:[d(ht,{d:XL,fill:`url(#${$})`}),d(ht,{d:GL,fill:`url(#${P})`}),d(ht,{d:qL,fill:`url(#${O})`})]}),d(LL,{text:b+1,x:115,y:65,fontSize:56})]}));const T=w+o+YL,I=_+y/2;if(f.push(d(n,{indexes:v,datum:m,data:r,x:T,y:I,positionH:"normal"})),u.push(d(Ft,{indexes:v,x:w+o-h.width/2,y:_-h.height/2})),b===0&&u.push(d(q,{indexes:[0],x:w-30-h.width/2,y:_+y/2-h.height/2})),b<l.length-1){const S=(l.length-1-(b+1))*ly,H=w+o-h.width/2,C=(_+y/2+S+y/2)/2-h.height/2;u.push(d(q,{indexes:[b+1],x:H,y:C}))}else u.push(d(q,{indexes:[l.length],x:w+o+30-h.width/2,y:_+y/2-h.height/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(zt,{children:hy}),c,E(Y,{x:0,y:0,children:[d(Y,{children:p}),d(It,{children:f}),d(Ot,{children:u})]})]})};Tt("sequence-ascending-stairs-3d",{component:dy,composites:["title","item"]});const uy=t=>{const{Title:e,Item:n,data:r,hGap:i=0,vGap:o=0}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(n,{indexes:[0],data:r,datum:l[0]})),u=[],f=[],p=l.length,g=h.width+i,y=h.height/2+o,m=h.width/2,v=0+(p-1)*y;return l.forEach((x,w)=>{const _=m+w*g,$=v-w*y,P=[w];u.push(d(n,{indexes:P,datum:x,data:r,x:_,y:$})),f.push(d(Ft,{indexes:P,x:_+h.width-30,y:$+h.height/2+10})),f.push(d(q,{indexes:P,x:_+h.width+i/2,y:$-30}))}),E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(It,{children:u}),d(Ot,{children:f})]})]})};Tt("sequence-ascending-steps",{component:uy,composites:["title","item"]});const UL=20,fy=5,py=t=>{const{Title:e,Item:n,data:r,options:i,radius:o=150,arrowSize:s=4,strokeWidth:a=10}=t,{title:l,desc:c,items:h=[]}=r,u=Q(d(q,{indexes:[0]})),f=re(i);if(!n)return E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=h.length;if(p===0)return E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=Q(d(n,{indexes:[0],data:r,datum:h[0]})),y=0,m=0,b=2*Math.PI/p,v=[];let x=1/0,w=1/0,_=-1/0,$=-1/0;for(let k=0;k<p;k++){const D=k*b-Math.PI/2,z=y+o*Math.cos(D),N=m+o*Math.sin(D);v.push({x:z,y:N}),x=Math.min(x,z),w=Math.min(w,N),_=Math.max(_,z),$=Math.max($,N)}const P=[];for(let k=0;k<p;k++){const D=v[k],z=v[(k+1)%p],N=Math.sqrt(Math.pow(z.x-D.x,2)+Math.pow(z.y-D.y,2)),j=Math.min(N*.5,100),X=(D.x+z.x)/2,L=(D.y+z.y)/2;x=Math.min(x,X-j/2),w=Math.min(w,L-j/2),_=Math.max(_,X+j/2),$=Math.max($,L+j/2);const M=Math.atan2(L-m,X-y),R=M<0?M+2*Math.PI:M;let W,U;const V=R*180/Math.PI,G=j/2+UL,Z=X+Math.cos(M)*G,K=L+Math.sin(M)*G;V>=337.5||V<22.5?(W=Z,U=K-g.height/2):V>=22.5&&V<67.5?(W=Z,U=K):V>=67.5&&V<112.5?(W=Z-g.width/2,U=K):V>=112.5&&V<157.5?(W=Z-g.width,U=K):V>=157.5&&V<202.5?(W=Z-g.width,U=K-g.height/2):V>=202.5&&V<247.5?(W=Z-g.width,U=K-g.height):V>=247.5&&V<292.5?(W=Z-g.width/2,U=K-g.height):(W=Z,U=K-g.height),P.push({lineLength:N,circleBigW:j,midX:X,midY:L,itemX:W,itemY:U}),x=Math.min(x,W),w=Math.min(w,U),_=Math.max(_,W+g.width+u.width+5),$=Math.max($,U+g.height)}const O=Math.max(0,-x),T=Math.max(0,-w),I=e?d(e,{title:l,desc:c}):null,S=[],H=[],C=[],A=[],B=v.map(k=>({x:k.x+O,y:k.y+T}));for(let k=0;k<p;k++){const D=B[k],z=B[(k+1)%p],N=(k+1)%p,j=[k],{lineLength:X,circleBigW:L,midX:M,midY:R}=P[k],W=Math.max(L-20,20),U=Math.max(W*.4,16),V=Ct(i,j)||f,G=z.x-D.x,Z=z.y-D.y,K=X,nt=G/K,at=Z/K,pt=fy*2+s,ft=Math.min(fy,(K-pt)/2),rt=Math.max(0,D.x+nt*ft),tt=Math.max(0,D.y+at*ft),et=Math.max(0,z.x-nt*ft),st=Math.max(0,z.y-at*ft),gt=HA().x(he=>Math.max(0,he.x)).y(he=>Math.max(0,he.y)).curve($m)([{x:rt,y:tt},{x:et,y:st}])||"",ct=`fork-arrow-${V.replace(/[^a-zA-Z0-9]/g,"")}-${k}`,ut=`
|
|
103
|
+
`.trim()}return I(V,{id:"infographic-container",children:[d(V,{children:y}),b?d(Wt,{id:"shape-center-circle",x:m-P,y:x-P,width:P*2,height:P*2,fill:u.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):d(yt,{id:"shape-center-sector",d:R,fill:u.colorPrimaryBg,fillOpacity:.5,width:r*2+200,height:r*2+200,"data-element-type":"shape"}),d(Mt,{x:C-E/2,y:A-S/2,width:E,height:S,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:u.colorText,"data-element-type":zt.Title,children:c}),d(St,{children:g}),d(Et,{children:p})]})};kt("list-sector",{component:ay,composites:["title","item"]});const ly=t=>{const{Title:e,Item:n,data:r,columns:i=4,gap:o=20,stepOffset:s=40}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=et(d(q,{indexes:[0]})),f=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.width+o;return c.forEach((m,x)=>{const v=x%i,b=Math.floor(x/i),w=v*y,_=b*(f.height+o),$=v*s,P=_+$,C=[x];g.push(d(n,{indexes:C,datum:m,data:r,x:w,y:P,positionH:"center"})),p.push(d(Xt,{indexes:C,x:w+(f.width-u.width)/2,y:P+f.height+5}))}),c.forEach((m,x)=>{const v=x%i,b=Math.floor(x/i),w=v*y,_=b*(f.height+o),$=v*s,P=_+$;if(x===0&&p.push(d(q,{indexes:[0],x:w-o/2-u.width/2,y:P+(f.height-u.height)/2})),v<i-1&&x<c.length-1){const C=Math.floor((x+1)/i);b===C&&p.push(d(q,{indexes:[x+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}(v===i-1||x===c.length-1)&&p.push(d(q,{indexes:[x+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}),c.length===0&&p.push(d(q,{indexes:[0],x:(i-1)*y/2+(f.width-u.width)/2,y:0})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(St,{children:g}),d(Et,{children:p})]})]})};kt("list-waterfall",{component:ly,composites:["title","item"]});const Zz=6,gh=700,cy=330,hy=333,Kz={1:[{x:.5,y:.6,anchor:"top-right"}],2:[{x:.42,y:.5,anchor:"top-right"},{x:.72,y:.4,anchor:"bottom"}],3:[{x:.3,y:.5,anchor:"top-right"},{x:.48,y:.3,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"}],4:[{x:.3,y:.5,anchor:"top-right"},{x:.35,y:.2,anchor:"bottom-left"},{x:.65,y:.73,anchor:"top-right"},{x:.8,y:.52,anchor:"bottom-left"}],5:[{x:.19,y:.4,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.52,y:.62,anchor:"top-right"},{x:.7,y:.43,anchor:"bottom"},{x:.82,y:.8,anchor:"top-right"}],6:[{x:.16,y:.35,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.48,y:.54,anchor:"top-right"},{x:.55,y:.43,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"},{x:.86,y:.65,anchor:"bottom-left"}]},Qz={1:[{x:.5,y:.4,anchor:"bottom-right"}],2:[{x:.42,y:.5,anchor:"bottom-right"},{x:.72,y:.6,anchor:"top"}],3:[{x:.3,y:.5,anchor:"bottom-right"},{x:.48,y:.7,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"}],4:[{x:.3,y:.5,anchor:"bottom-right"},{x:.35,y:.8,anchor:"top-left"},{x:.65,y:.27,anchor:"bottom-right"},{x:.8,y:.48,anchor:"top-left"}],5:[{x:.19,y:.6,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.52,y:.38,anchor:"bottom-right"},{x:.7,y:.57,anchor:"top"},{x:.82,y:.2,anchor:"bottom-right"}],6:[{x:.16,y:.65,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.48,y:.46,anchor:"bottom-right"},{x:.55,y:.57,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"},{x:.86,y:.35,anchor:"top-left"}]},dy=(t,e,n)=>{const r=e[t];return r?r.map(i=>({x:i.x*gh,y:i.y*n,anchor:i.anchor})):null},Jz=(t,e)=>{const n=t.anchor||"center";let r=t.x-e.width/2,i=t.y-e.height/2,o=t.y;switch(n){case"top":r=t.x-e.width/2,i=t.y,o=t.y+e.height/2;break;case"bottom":r=t.x-e.width/2,i=t.y-e.height,o=t.y-e.height/2;break;case"top-left":r=t.x,i=t.y,o=t.y+e.height/2;break;case"top-right":r=t.x-e.width,i=t.y,o=t.y+e.height/2;break;case"bottom-left":r=t.x,i=t.y-e.height,o=t.y-e.height/2;break;case"bottom-right":r=t.x-e.width,i=t.y-e.height,o=t.y-e.height/2;break}return{x:r,y:i,centerY:o}},mh=(t,e)=>{const n=e.x-t.x,r=e.y-t.y,i=Math.hypot(n,r)||1;return{x:n/i,y:r/i}},uy=t=>{const{presetRatios:e,arrowHeight:n,Arrow:r}=t;return o=>{var s;const{Title:a,Item:l,data:c,options:h,itemGap:u=24}=o,{title:f,desc:p,items:g=[]}=c,y=Math.min(g.length,Zz),m=g.slice(0,y),x=a?d(a,{title:f,desc:p}):null,v=ce(h),w=xe({colorPrimary:v},h).colorTextSecondary||"#737373",_=et(d(q,{indexes:[0]}));if(g.length===0){const L=(s=dy(1,e,n))==null?void 0:s[0];if(!L)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,d(V,{children:d(r,{colorPrimary:v,colorShadow:w})})]});const D=L.x-_.width/2,k=L.y-_.height/2;return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(St,{}),d(Et,{children:d(q,{indexes:[0],x:D,y:k})})]})]})}const $=et(d(l,{indexes:[0],data:c,datum:g[0],positionH:"center"})),P=[],C=[],A=dy(y,e,n);if(!A)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(St,{})]})]});const E=A,S=E.length>1?mh(E[0],E[E.length-1]):{x:1,y:0},R=E.length>1?mh(E[0],E[1]):S,O=E.length>1?mh(E[E.length-2],E[E.length-1]):S,T=Math.max($.width,$.height)*.45+u,F=L=>{const{x:D,y:k,centerY:N}=Jz(L,$);return{x:D,y:k,centerY:N}};if(E.forEach((L,D)=>{const k=F(L),N=k.centerY<n/2,j=[D],X=m[D];if(!X)return;C.push(d(l,{indexes:j,datum:X,data:c,x:k.x,y:k.y,positionH:"center"}));const z=k.x+$.width-_.width/2,M=N?k.y-_.height/2:k.y+$.height-_.height/2;P.push(d(Xt,{indexes:j,x:z,y:M}))}),E.length>0){const L=E[0],D=L.x-R.x*T-_.width/2,k=L.y-R.y*T-_.height/2;P.push(d(q,{indexes:[0],x:D,y:k}));for(let z=0;z<E.length-1;z++){const M=E[z],H=E[z+1],B=(M.x+H.x)/2,U=(M.y+H.y)/2,Y=B-_.width/2,G=U-_.height/2;P.push(d(q,{indexes:[z+1],x:Y,y:G}))}const N=E[E.length-1],j=N.x+O.x*T-_.width/2,X=N.y+O.y*T-_.height/2;P.push(d(q,{indexes:[y],x:j,y:X}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(V,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(St,{children:C}),d(Et,{children:P})]})]})}},tH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(V,{width:gh,height:cy,children:[d("path",{d:"M228.864 159.446C230.266 159.446 231.623 158.768 232.689 157.535L274.263 110.162L265.717 102.923L227.311 148.082C225.977 149.623 224.281 150.47 222.529 150.47H175.404L182.03 158.367C182.795 159.445 182.795 159.446 183.734 159.446H228.864Z",fill:e}),d("path",{d:"M462.869 234.92C464.271 234.92 465.628 234.242 466.695 233.01L508.268 185.636L499.722 178.397L461.316 223.557C459.983 225.098 458.287 225.945 456.534 225.945H409.409L416.035 233.841C416.8 234.92 416.8 234.92 417.74 234.92H462.869Z",fill:e}),d("path",{d:"M697.005 330C698.783 330 700 328.82 700 327.001V256.638C700 254.857 697.848 253.965 696.591 255.225L693.409 258.411V320.402C693.409 322.058 692.069 323.401 690.414 323.401H630.718L627.536 326.587C626.278 327.847 627.169 330 628.947 330H697.005Z",fill:e}),d("path",{d:"M689.642 321.89C690.744 321.89 691.638 320.995 691.638 319.891V250.743C691.638 248.962 689.488 248.07 688.23 249.329L662.647 274.947L520.987 153.863C519.541 152.627 517.703 151.948 515.802 151.948H469.518C470.236 151.949 470.956 152.206 471.53 152.729L498.163 176.978L498.13 177.018L639.84 297.784L619.174 318.477C617.916 319.737 618.807 321.89 620.586 321.89H689.642Z",fill:t}),d("path",{d:"M429.279 198.995L467.208 153.03C468.3 151.716 470.268 151.579 471.531 152.729L498.163 176.978L460.69 221.107C459.173 222.894 456.946 223.924 454.6 223.924H408.473C409.366 223.924 410.252 223.527 410.845 222.764L429.279 198.995Z",fill:n}),d("path",{d:"M408.473 223.924H408.314L408.318 223.92C408.369 223.922 408.421 223.924 408.473 223.924Z",fill:n}),d("path",{d:"M406.524 223.203C407.826 224.318 409.796 224.116 410.845 222.761L429.279 198.932L287.411 77.8866C285.964 76.6523 284.125 75.9742 282.223 75.9742H234.606L234.625 75.9907C235.429 75.9118 236.263 76.1557 236.915 76.7378L263.662 100.621L263.546 100.758L406.524 223.203Z",fill:t}),d("path",{d:"M236.914 76.7386C235.651 75.6097 233.707 75.7513 232.621 77.0513L194.557 123.104L175.644 146.821C175.076 147.535 174.25 147.917 173.409 147.947L173.407 147.95H219.923C222.271 147.95 224.499 146.915 226.017 145.122L263.645 100.649L236.914 76.7386Z",fill:n}),d("path",{d:"M175.648 146.816C174.589 148.145 172.637 148.329 171.348 147.221L4.09334 3.51697C2.68586 2.30767 3.54106 0 5.39671 0H47.5805C49.4864 0 51.3297 0.680433 52.7785 1.91877L194.557 123.104L175.648 146.816Z",fill:t})]})},eH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(V,{width:gh,height:hy,children:[d("path",{d:"M19.0526 324L12.6762 329.482C11.2703 330.691 12.1234 333 13.976 333H56.1578C58.058 333 59.896 332.321 61.3413 331.085L201.854 210.901L194.249 201.693L54.0527 321.606C52.246 323.151 49.9486 324 47.5732 324H19.0526Z",fill:e}),d("path",{d:"M234.587 248L241.131 255.922C241.656 256.552 242.382 256.909 243.134 256.983L243.115 257H290.716C292.618 257 294.457 256.322 295.903 255.087L437.091 134.536L429.305 125.5L288.613 245.609C286.805 247.153 284.507 248 282.132 248H234.587Z",fill:e}),d("path",{d:"M461.123 162.429L475.642 179.918C476.237 180.635 477.092 181.001 477.951 181H524.22C526.121 181 527.959 180.321 529.404 179.085L670.786 58.1578L662.326 49.6809L522.115 169.606C520.309 171.151 518.011 172 515.636 172H469.369L461.123 162.429Z",fill:e}),d("path",{d:"M687.912 74.8875C690.374 75.9052 693.412 74.1668 693.412 71.1716V11H698.004C699.106 11 700 11.8954 700 13V82.1716C700 83.9534 697.85 84.8457 696.593 83.5858L687.912 74.8875Z",fill:e}),d("path",{d:"M689.419 0C690.522 0 691.415 0.895432 691.415 2V71.1716C691.415 72.9534 689.265 73.8457 688.008 72.5858L662.433 46.9598L520.819 168.085C519.374 169.321 517.536 170 515.636 170H469.367C470.084 169.999 470.804 169.742 471.379 169.219L498.003 144.961L497.969 144.922L639.634 24.115L618.975 3.41421C617.717 2.15428 618.608 0 620.386 0H689.419Z",fill:t}),d("path",{d:"M429.141 122.937L467.058 168.918C468.149 170.232 470.116 170.369 471.378 169.219L498.003 144.961L460.542 100.818C459.025 99.0305 456.798 98 454.453 98H408.341C409.234 98.0001 410.12 98.3968 410.712 99.1606L429.141 122.937Z",fill:n}),d("path",{d:"M408.341 98H408.183L408.186 98.004C408.237 98.0013 408.289 98 408.341 98Z",fill:n}),d("path",{d:"M406.393 98.721C407.695 97.606 409.664 97.8077 410.712 99.1633L429.141 123L287.318 244.087C285.872 245.322 284.033 246 282.132 246H234.53L234.55 245.983C235.353 246.062 236.187 245.818 236.839 245.236L263.577 221.345L263.461 221.208L406.393 98.721Z",fill:t}),d("path",{d:"M236.837 245.235C235.575 246.365 233.631 246.223 232.546 244.922L194.494 198.854L175.588 175.129C175.019 174.415 174.194 174.032 173.353 174.002L173.351 174H219.852C222.199 174 224.427 175.035 225.944 176.829L263.56 221.317L236.837 245.235Z",fill:n}),d("path",{d:"M175.593 175.135C174.533 173.805 172.581 173.622 171.291 174.73L4.09013 318.484C2.68329 319.693 3.53868 322 5.394 322H47.5627C49.4695 322 51.3136 321.319 52.7627 320.08L194.494 198.854L175.593 175.135Z",fill:t})]})},fy=uy({arrowHeight:cy,presetRatios:Kz,Arrow:tH}),py=uy({arrowHeight:hy,presetRatios:Qz,Arrow:eH});kt("list-zigzag-down",{component:fy,composites:["title","item"]}),kt("list-zigzag-up",{component:py,composites:["title","item"]});const yh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},gy=t=>{const{Title:e,Item:n,data:r,quadrantWidth:i,quadrantHeight:o,showAxis:s=!0,dashedAxis:a=!0}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=Array.from({length:4},(b,w)=>h[w]),p=f[0]?et(d(n,{indexes:[0],data:r,datum:f[0]})):{width:0,height:0},g=i!=null?i:p.width+yh.defaultExtraSpacing,y=o!=null?o:p.height+yh.defaultExtraSpacing,m=rH(g,y,p),x=f.map((b,w)=>{if(!b)return null;const _=m[w];return d(n,{indexes:[w],datum:b,data:r,x:_.x,y:_.y,positionH:w%2?"flipped":"normal",positionV:w<2?"normal":"flipped"})}).filter(Boolean),v=nH(g,y,s,a);return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,I(V,{width:g*2,height:y*2,children:[v,d(St,{children:x})]})]})};function nH(t,e,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:s,dashArray:a}=yh,l=t,c=e,h=t*2,u=e*2,f=r?a:void 0;return[d(yt,{d:`M 0 ${c} L ${h} ${c}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),I(le,{transform:`translate(${h}, ${c})`,children:[d(yt,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${-o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),I(le,{transform:`translate(0, ${c})`,children:[d(yt,{d:`M 0 0 L ${o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),d(yt,{d:`M ${l} 0 L ${l} ${u}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),I(le,{transform:`translate(${l}, 0)`,children:[d(yt,{d:`M 0 0 L ${-o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"})]}),I(le,{transform:`translate(${l}, ${u})`,children:[d(yt,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"})]})]}function rH(t,e,n){const r=t/2,i=e/2;return[{x:r-n.width/2,y:i-n.height/2},{x:t+r-n.width/2,y:i-n.height/2},{x:r-n.width/2,y:e+i-n.height/2},{x:t+r-n.width/2,y:e+i-n.height/2}]}kt("quadrant",{component:gy,composites:["title","item"]});const my=t=>{const{Title:e,Item:n,data:r,radius:i=150,startMode:o="top"}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(q,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[];if(l.length===0)return f.push(d(q,{indexes:[0],x:-h.width/2,y:-h.height/2})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,d(V,{children:d(Et,{children:f})})]});const g=Math.max(u.width,u.height),y=Math.max(i,g),m=y+g/2,x=l.map(()=>{const $=u.width,P=u.height;return($+P)/2}),v=x.reduce(($,P)=>$+P,0);let b;o==="equal"?b=-Math.PI/2:b=-Math.PI/2+2*Math.PI/l.length/2;let w=b;l.forEach(($,P)=>{const C=x[P]/v*2*Math.PI,A=w+C/2;w+=C;const E=m+y*Math.cos(A)-u.width/2,S=m+y*Math.sin(A)-u.height/2;p.push(d(n,{indexes:[P],datum:$,data:r,x:E,y:S}));const R=y-Math.max(u.width,u.height)/2-20,O=m+R*Math.cos(A)-h.width/2,T=m+R*Math.sin(A)-h.height/2;f.push(d(Xt,{indexes:[P],x:O,y:T}))});const _=y-Math.max(u.width,u.height)/2-20;if(l.length>0)for(let $=0;$<l.length;$++){const P=$*2*Math.PI/l.length-Math.PI/2,C=($+1)%l.length*2*Math.PI/l.length-Math.PI/2;let A;if($===l.length-1){const R=C+2*Math.PI-P;A=P+R/2}else A=(P+C)/2;const E=m+_*Math.cos(A)-h.width/2,S=m+_*Math.sin(A)-h.height/2;f.push(d(q,{indexes:[$+1],x:E,y:S}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(St,{children:p}),d(Et,{children:f})]})]})};kt("relation-circle",{component:my,composites:["title","item"]});const yy=t=>{const{Title:e,Item:n,data:r,spacing:i=120,showConnections:o=!0,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null;if(c.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,d(V,{children:d(St,{})})]});const u=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"}));function f(){const P=c.map((E,S)=>({id:S,data:E,isCenter:S===0,_originalIndex:[S]})),C=c.slice(1).map((E,S)=>({source:0,target:S+1})),A=JT(P).force("link",YT(C).id(E=>E.id).distance(i)).force("charge",tA().strength(-50)).force("center",PT(0,0)).force("collision",BT().radius(Math.max(u.width,u.height)/2+10));for(let E=0;E<300;++E)A.tick();return{nodes:P,links:C}}const{nodes:p,links:g}=f(),y=Math.min(...p.map(P=>{var C;return(C=P.x)!=null?C:0})),m=Math.min(...p.map(P=>{var C;return(C=P.y)!=null?C:0})),x=Math.max(0,-y+u.width/2),v=Math.max(0,-m+u.height/2),b=(P,C)=>({positionH:P<-50?"flipped":P>50?"normal":"center",positionV:C<-50?"flipped":C>50?"normal":"middle"}),w=p.map(P=>{if(P.x==null||P.y==null)return null;const C=P.x+x-u.width/2,A=P.y+v-u.height/2,{positionH:E,positionV:S}=b(P.x,P.y);return d(n,{indexes:P._originalIndex,datum:P.data,data:r,x:C,y:A,positionH:E,positionV:S},P.id)}).filter(Boolean),_=new Map(p.map(P=>[P.id,P])),$=o?g.map(P=>{const C=typeof P.source=="object"?P.source:_.get(P.source),A=typeof P.target=="object"?P.target:_.get(P.target);if(!C||!A||C.x==null||C.y==null||A.x==null||A.y==null)return null;const E=`M ${C.x+x} ${C.y+v} L ${A.x+x} ${A.y+v}`;return d(yt,{d:E,stroke:ce(s),strokeWidth:2,strokeOpacity:.6})}).filter(Boolean):[];return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(V,{children:$}),d(St,{children:w})]})]})};kt("relation-network",{component:yy,composites:["title","item"]});var iH=Object.defineProperty,oH=Object.defineProperties,sH=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertySymbols,vy=Object.prototype.hasOwnProperty,xy=Object.prototype.propertyIsEnumerable,by=(t,e,n)=>e in t?iH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aH=(t,e)=>{for(var n in e||(e={}))vy.call(e,n)&&by(t,n,e[n]);if(Gs)for(var n of Gs(e))xy.call(e,n)&&by(t,n,e[n]);return t},lH=(t,e)=>oH(t,sH(e)),cH=(t,e)=>{var n={};for(var r in t)vy.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Gs)for(var r of Gs(t))e.indexOf(r)<0&&xy.call(t,r)&&(n[r]=t[r]);return n};const vh=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=e,s=cH(e,["width","height","colorPrimary","rotation"]);const a=`gradient-arrow-stroke-${i.replace("#","")}`,l=`gradient-arrow-fill-${i.replace("#","")}`,c=Math.round(n*.515),h=Math.round(r*.275),u=Math.round(r*.875),f=[{x:0,y:h},{x:c,y:h},{x:c,y:r*.075},{x:n,y:r*.575},{x:c,y:r*1.075},{x:c,y:u},{x:0,y:u}],p=n/2,g=r/2,y=`rotate(${o} ${p} ${g})`;return I(Bt,{children:[d(Ve,lH(aH({},s),{width:n,height:r,points:f,fill:`url(#${l})`,stroke:`url(#${a})`,transform:y,"data-element-type":"shape"})),I(jt,{children:[I("linearGradient",{id:l,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i,"stop-opacity":"0.36"}),d("stop",{offset:"100%","stop-color":i,"stop-opacity":"0"})]}),I("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i}),d("stop",{offset:"58%","stop-color":i,"stop-opacity":"0"})]})]})]})},hH=({text:t,x:e=0,y:n=0,fontSize:r=56,fontWeight:i="bold",fill:o="#FFFFFF",textAnchor:s="middle",dominantBaseline:a="middle",shadowOffsetX:l=2,shadowOffsetY:c=4,midShadowOffsetX:h=1,midShadowOffsetY:u=2,deepShadowOpacity:f=.3,midShadowOpacity:p=.5})=>I(V,{children:[d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:f,textAnchor:s,dominantBaseline:a,transform:`translate(${l}, ${c})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:p,textAnchor:s,dominantBaseline:a,transform:`translate(${h}, ${u})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,textAnchor:s,dominantBaseline:a,children:t})]});var dH=Object.defineProperty,uH=Object.defineProperties,fH=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,wy=Object.prototype.hasOwnProperty,_y=Object.prototype.propertyIsEnumerable,$y=(t,e,n)=>e in t?dH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pH=(t,e)=>{for(var n in e||(e={}))wy.call(e,n)&&$y(t,n,e[n]);if(qs)for(var n of qs(e))_y.call(e,n)&&$y(t,n,e[n]);return t},gH=(t,e)=>uH(t,fH(e)),mH=(t,e)=>{var n={};for(var r in t)wy.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qs)for(var r of qs(t))e.indexOf(r)<0&&_y.call(t,r)&&(n[r]=t[r]);return n};const yH=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=mH(e,["width","height","colorPrimary","rotation","strokeWidth"]);const l=[{x:n/2,y:0},{x:n,y:r},{x:0,y:r}],c=n/2,h=r/2,u=`rotate(${o} ${c} ${h})`;return d(Ve,gH(pH({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},vH=-118,Py=118,Cy=240,xH=180,bH=40,wH="M238.9 69.7a6 6 0 0 1-.1 1v.2l-.2.3v.3l-.1.3a6.2 6.2 0 0 1-.3.6l-.1.3-.2.3-.2.4-.3.5-.1.1a10.9 10.9 0 0 1-.8 1v.1l-.5.5h-.1l-.4.4-.3.3-.3.2-.3.3-.4.2a13 13 0 0 1-.7.5l-.4.3-.5.3-97.5 56.7-.7.4h-.2l-.6.4h-.1l-.8.4h-.2l-.6.4h-.2l-.8.3h-.2l-.5.3-.5.1-.5.1-.5.2h-.5a33.7 33.7 0 0 1-3.2.7h-.2l-1 .2h-1.6l-.7.1h-4.7l-.8-.1h-.2a38.2 38.2 0 0 1-2-.4h-.4l-.7-.2h-.4l-.7-.2-.4-.1a27.3 27.3 0 0 1-2.2-.7h-.2a44.2 44.2 0 0 1-.9-.3l-.5-.3-.4-.1-.5-.2-.3-.2-.5-.2-.3-.2-.8-.4L6.5 78C2.2 75.6 0 72.4 0 69v41.7c0 3.2 2.1 6.5 6.4 9l98.1 56.6a23.2 23.2 0 0 0 1 .6l.6.3.3.1.5.2.4.2.3.1h.2l.2.2a21.4 21.4 0 0 0 1.9.6l.3.1h.2l.7.2a77.6 77.6 0 0 1 1.1.3h.3l.7.2h.4a42.5 42.5 0 0 0 1 .2l1 .2h1.1l.4.1h2.1l.7.1h1.5a22 22 0 0 0 1.8-.2h.4l1.1-.1h.2l1.2-.2h.1l.3-.1.6-.1a12.5 12.5 0 0 0 1-.3h.5l.5-.2a29 29 0 0 0 1-.3h.2l.3-.2h.2a27 27 0 0 0 1.6-.7h.2l.8-.4a19.4 19.4 0 0 0 1.6-.9l97.5-56.7.3-.1.2-.2.4-.2.4-.3.3-.2.3-.3.4-.2.3-.3.3-.3h.1l.3-.3.5-.6h.1l.3-.5h.1v-.1l.4-.4v-.1l.4-.5v-.1l.1-.2.1-.2.2-.3.1-.3.1-.3.1-.1a6.9 6.9 0 0 0 .2-.8l.1-.3v-.4l.1-.3v-1l.2-41.4v.4Z",_H="M232.5 60.4c8.5 4.9 8.5 12.8.1 17.7l-97.5 56.7c-8.4 4.9-22 4.9-30.5 0L6.5 78C-2 73-2 65.3 6.4 60.4l97.5-56.7c8.4-5 22-5 30.5 0l98.1 56.7Z",$H="M119.1 0A31 31 0 0 0 104 3.7L6.4 60.4C-2 65.3-2 73.2 6.4 78l98.2 56.7c4.2 2.4 9.8 3.7 15.3 3.7a31 31 0 0 0 15.2-3.7L232.6 78c8.4-5 8.4-12.8 0-17.7L134.3 3.7A31.2 31.2 0 0 0 119.1 0Zm0 2.5c5.4 0 10.3 1.2 14 3.3l98.2 56.7c3.3 2 5.1 4.3 5.1 6.8 0 2.4-1.8 4.7-5 6.6l-97.5 56.7a28.3 28.3 0 0 1-14 3.4c-5.3 0-10.3-1.2-14-3.4L7.7 76c-3.3-1.9-5-4.3-5-6.7 0-2.4 1.7-4.8 5-6.7L105 5.8a29 29 0 0 1 14-3.3Z",Oy=I("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),d("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),d("feOffset",{dx:"0",dy:"4"}),d("feGaussianBlur",{stdDeviation:"6"}),d("feComposite",{in2:"hardAlpha",operator:"out"}),d("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),d("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),My=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=Cy}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null;if(l.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(jt,{children:Oy}),c,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const h=et(d(q,{indexes:[0]})),u=[],f=[],p=[],g=o/Cy,y=xH*g;return l.forEach((m,x)=>{const v=[x],b=Tt(i,v),w=x*(o+vH),_=(l.length-1-x)*Py,$=`cube-gradient-bottom-${x}`,P=`cube-gradient-top-${x}`,C=`cube-gradient-stroke-${x}`;p.push(I(V,{x:w,y:_,id:`cube-${x}`,width:o,height:y,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[I(jt,{children:[I("linearGradient",{id:$,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b,stopOpacity:"0.8"}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.4"})]}),I("linearGradient",{id:P,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b,stopOpacity:"0.9"}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.5"})]}),I("linearGradient",{id:C,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.7"})]})]}),I(le,{transform:`scale(${g})`,children:[d(yt,{d:wH,fill:`url(#${$})`}),d(yt,{d:_H,fill:`url(#${P})`}),d(yt,{d:$H,fill:`url(#${C})`})]}),d(hH,{text:x+1,x:115,y:65,fontSize:56})]}));const A=w+o+bH,E=_+y/2;if(f.push(d(n,{indexes:v,datum:m,data:r,x:A,y:E,positionH:"normal"})),u.push(d(Xt,{indexes:v,x:w+o-h.width/2,y:_-h.height/2})),x===0&&u.push(d(q,{indexes:[0],x:w-30-h.width/2,y:_+y/2-h.height/2})),x<l.length-1){const S=(l.length-1-(x+1))*Py,R=w+o-h.width/2,O=(_+y/2+S+y/2)/2-h.height/2;u.push(d(q,{indexes:[x+1],x:R,y:O}))}else u.push(d(q,{indexes:[l.length],x:w+o+30-h.width/2,y:_+y/2-h.height/2}))}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:Oy}),c,I(V,{x:0,y:0,children:[d(V,{children:p}),d(St,{children:f}),d(Et,{children:u})]})]})};kt("sequence-ascending-stairs-3d",{component:My,composites:["title","item"]});const Sy=t=>{const{Title:e,Item:n,data:r,hGap:i=0,vGap:o=0}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(n,{indexes:[0],data:r,datum:l[0]})),u=[],f=[],p=l.length,g=h.width+i,y=h.height/2+o,m=h.width/2,v=0+(p-1)*y;return l.forEach((b,w)=>{const _=m+w*g,$=v-w*y,P=[w];u.push(d(n,{indexes:P,datum:b,data:r,x:_,y:$})),f.push(d(Xt,{indexes:P,x:_+h.width-30,y:$+h.height/2+10})),f.push(d(q,{indexes:P,x:_+h.width+i/2,y:$-30}))}),I(dt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(St,{children:u}),d(Et,{children:f})]})]})};kt("sequence-ascending-steps",{component:Sy,composites:["title","item"]});const PH=20,Ey=5,Iy=t=>{const{Title:e,Item:n,data:r,options:i,radius:o=150,arrowSize:s=4,strokeWidth:a=10}=t,{title:l,desc:c,items:h=[]}=r,u=et(d(q,{indexes:[0]})),f=ce(i);if(!n)return I(dt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=h.length;if(p===0)return I(dt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=et(d(n,{indexes:[0],data:r,datum:h[0]})),y=0,m=0,x=2*Math.PI/p,v=[];let b=1/0,w=1/0,_=-1/0,$=-1/0;for(let L=0;L<p;L++){const D=L*x-Math.PI/2,k=y+o*Math.cos(D),N=m+o*Math.sin(D);v.push({x:k,y:N}),b=Math.min(b,k),w=Math.min(w,N),_=Math.max(_,k),$=Math.max($,N)}const P=[];for(let L=0;L<p;L++){const D=v[L],k=v[(L+1)%p],N=Math.sqrt(Math.pow(k.x-D.x,2)+Math.pow(k.y-D.y,2)),j=Math.min(N*.5,100),X=(D.x+k.x)/2,z=(D.y+k.y)/2;b=Math.min(b,X-j/2),w=Math.min(w,z-j/2),_=Math.max(_,X+j/2),$=Math.max($,z+j/2);const M=Math.atan2(z-m,X-y),H=M<0?M+2*Math.PI:M;let B,U;const Y=H*180/Math.PI,G=j/2+PH,Z=X+Math.cos(M)*G,K=z+Math.sin(M)*G;Y>=337.5||Y<22.5?(B=Z,U=K-g.height/2):Y>=22.5&&Y<67.5?(B=Z,U=K):Y>=67.5&&Y<112.5?(B=Z-g.width/2,U=K):Y>=112.5&&Y<157.5?(B=Z-g.width,U=K):Y>=157.5&&Y<202.5?(B=Z-g.width,U=K-g.height/2):Y>=202.5&&Y<247.5?(B=Z-g.width,U=K-g.height):Y>=247.5&&Y<292.5?(B=Z-g.width/2,U=K-g.height):(B=Z,U=K-g.height),P.push({lineLength:N,circleBigW:j,midX:X,midY:z,itemX:B,itemY:U}),b=Math.min(b,B),w=Math.min(w,U),_=Math.max(_,B+g.width+u.width+5),$=Math.max($,U+g.height)}const C=Math.max(0,-b),A=Math.max(0,-w),E=e?d(e,{title:l,desc:c}):null,S=[],R=[],O=[],T=[],F=v.map(L=>({x:L.x+C,y:L.y+A}));for(let L=0;L<p;L++){const D=F[L],k=F[(L+1)%p],N=(L+1)%p,j=[L],{lineLength:X,circleBigW:z,midX:M,midY:H}=P[L],B=Math.max(z-20,20),U=Math.max(B*.4,16),Y=Tt(i,j)||f,G=k.x-D.x,Z=k.y-D.y,K=X,it=G/K,Q=Z/K,at=Ey*2+s,ct=Math.min(Ey,(K-at)/2),nt=Math.max(0,D.x+it*ct),J=Math.max(0,D.y+Q*ct),tt=Math.max(0,k.x-it*ct),st=Math.max(0,k.y-Q*ct),gt=ok().x(Vt=>Math.max(0,Vt.x)).y(Vt=>Math.max(0,Vt.y)).curve(Tm)([{x:nt,y:J},{x:tt,y:st}])||"",ot=`fork-arrow-${Y.replace(/[^a-zA-Z0-9]/g,"")}-${L}`,ft=`
|
|
104
104
|
M ${-s*.6} ${-s*.4}
|
|
105
105
|
L 0 0
|
|
106
106
|
L ${-s*.6} ${s*.4}
|
|
107
|
-
`;
|
|
107
|
+
`;T.push(d("marker",{id:ot,viewBox:`${-s} ${-s*.6} ${s*1.2} ${s*1.2}`,refX:-s*.08,refY:0,markerWidth:s,markerHeight:s,orient:"auto",markerUnits:"strokeWidth",children:d("path",{d:ft,fill:"none",stroke:Y,strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"})})),O.push(d(yt,{d:gt,stroke:Y,strokeWidth:a,fill:"none",markerEnd:`url(#${ot})`,strokeLinecap:"round","data-element-type":"shape"}));const mt=M+C,bt=H+A,pt=xe({colorPrimary:Y},i);O.push(d(Wt,{x:Math.max(0,mt-z/2),y:Math.max(0,bt-z/2),width:z,height:z,fill:pt.colorPrimaryBg,"data-element-type":"shape"})),O.push(d(Wt,{x:Math.max(0,mt-B/2),y:Math.max(0,bt-B/2),width:B,height:B,fill:"#ffffff"})),O.push(d(Ce,{x:Math.max(0,mt-U/2),y:Math.max(0,bt-U/2),size:U,indexes:j,fill:Y}));const wt=Math.max(0,mt-u.width/2),Rt=Math.max(0,bt-u.height/2);S.push(d(q,{indexes:[N],x:wt,y:Rt}))}for(let L=0;L<p;L++){const D=[L],k=h[L],{itemX:N,itemY:j}=P[L],X=Math.max(0,N+C),z=Math.max(0,j+A);R.push(d(n,{indexes:D,datum:k,data:r,x:X,y:z}));const M=Math.max(0,X+g.width+5),H=Math.max(0,z+g.height/2-u.height/2);S.push(d(Xt,{indexes:D,x:M,y:H}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[E,I(V,{x:0,y:0,children:[d(jt,{children:T}),d(V,{children:O}),d(St,{children:R}),d(Et,{children:S})]})]})};kt("sequence-circle-arrows",{component:Iy,composites:["title","item"]});const CH=100,OH=50,MH=6,SH="40",Ty=t=>{const{Title:e,Item:n,data:r,options:i,outerRadius:o=180,innerRadius:s=120,itemDistance:a=310,gapAngle:l=5,iconRadius:c=34,iconBgRadius:h=38,iconSize:u=36}=t,{title:f,desc:p,items:g=[]}=r,y=e?d(e,{title:f,desc:p}):null,m=Math.max(a+CH,o+OH),x=Math.min(a,o),v=et(d(q,{indexes:[0]}));if(g.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[y,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:m-20,y:x-20})})})]});const b=[],w=[],_=[],$=[],P=et(d(n,{indexes:[0],data:r,datum:g[0]})),E=(360-g.length*l)/g.length,S=(j,X,z,M,H,B)=>{const U=H*Math.PI/180,Y=B*Math.PI/180,G=j+z*Math.cos(U),Z=X+z*Math.sin(U),K=j+M*Math.cos(U),it=X+M*Math.sin(U),Q=j+M*Math.cos(Y),at=X+M*Math.sin(Y),ct=j+z*Math.cos(Y),nt=X+z*Math.sin(Y),J=B-H<=180?"0":"1";return[`M ${G} ${Z}`,`L ${K} ${it}`,`A ${M} ${M} 0 ${J} 1 ${Q} ${at}`,`L ${ct} ${nt}`,`A ${z} ${z} 0 ${J} 0 ${G} ${Z}`,"Z"].join(" ")},R=({centerX:j,outerRadius:X,angleRad:z,btnBounds:M})=>{const H=j+(X+20)*Math.cos(z)-M.width/2,B=x+(X+20)*Math.sin(z)-M.height/2;return{x:H,y:B}},O=MH,T=(s+o)/2,F=O/T*(180/Math.PI);g.forEach((j,X)=>{const z=[X],M=X*(E+l)+270,H=M+E,B=(M+H)/2,U=B*Math.PI/180,Y=Tt(i,z),G=Y+SH,Z=S(m,x,s,o,M,H);_.push(d(yt,{d:Z,fill:G,width:o*2,height:o*2,"data-element-type":"shape"}));const K=S(m,x,s+O,o-O,M+F,H-F);_.push(d(yt,{d:K,fill:Y,width:o*2,height:o*2,"data-element-type":"shape"}));const it=(s+o)/2,Q=m+it*Math.cos(U),at=x+it*Math.sin(U);$.push(d(Wt,{x:Q-h,y:at-h,width:h*2,height:h*2,fill:"#ffffff","data-element-type":"shape"})),$.push(d(Wt,{x:Q-c,y:at-c,width:c*2,height:c*2,fill:Y,"data-element-type":"shape"})),j.icon&&$.push(d(Ce,{x:Q-u/2,y:at-u/2,indexes:z,size:u,fill:"#fff"}));const ct=(B%360+360)%360,nt=ct>=270||ct<=90,J=ct>=75&&ct<=105;let tt,st="normal",vt="normal";J?(tt=ct,vt="normal",st="center"):nt?(ct>=270?tt=-60+(ct-270)/90*60:tt=ct/90*60,st="normal"):(tt=120+(ct-90)/180*120,st="flipped");const gt=tt*Math.PI/180,ut=m+a*Math.cos(gt)-P.width/2;let ot=x+a*Math.sin(gt)-P.height/2;J&&(ot=x+o+P.height/2),w.push(d(n,{indexes:z,datum:j,data:r,x:ut,y:ot,positionH:st,positionV:vt}));const ft=a+40,mt=m+ft*Math.cos(gt)-v.width/2,bt=x+ft*Math.sin(gt)-v.height/2;b.push(d(Xt,{indexes:z,x:mt,y:bt}));const wt=(M+E+l/2)*Math.PI/180,{x:Rt,y:Vt}=R({centerX:m,outerRadius:o,angleRad:wt,btnBounds:v});b.push(d(q,{indexes:[X+1],x:Rt,y:Vt}))});const D=(270-l/2)*Math.PI/180,{x:k,y:N}=R({centerX:m,outerRadius:o,angleRad:D,btnBounds:v});return b.unshift(d(q,{indexes:[0],x:k,y:N})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:70,children:[y,I(V,{children:[d(V,{children:_}),d(V,{children:$}),d(St,{children:w}),d(Et,{children:b})]})]})};kt("sequence-circular",{component:Ty,composites:["title","item"]});const Ay=t=>{const{Title:e,Item:n,data:r,gap:i=0,rowGap:o=0,itemsPerRow:s=3,circleStrokeWidth:a=18,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null,p=ce(l),g=et(d(q,{indexes:[0]})),y=et(d(n,{indexes:[0],data:r,datum:u[0],positionH:"center"})),m=[],x=[],v=[],b=(o+y.height)/2,w=b;if(u.forEach((_,$)=>{const P=Math.floor($/s),C=$%s,A=P%2===1,S=(A?s-1-C:C)*(y.width+i)+w,R=P*(y.height+o),O=[$];if(x.push(d(n,{indexes:O,datum:_,data:r,x:S,y:R,positionH:"center",positionV:$%2===1?"flipped":"normal"})),m.push(d(Xt,{indexes:O,x:S+(y.width-g.width)/2,y:R+y.height+10})),$===0&&m.push(d(q,{indexes:O,x:S+(y.width-g.width)/2,y:R-g.height-10})),$<u.length-1){const T=Math.floor(($+1)/s);if(P===T)m.push(d(q,{indexes:[$+1],x:S+(y.width-g.width)/2,y:R-g.height-10}));else{const L=R+y.height/2,D=R+y.height+o+y.height/2;let k,N,j;A?(k=S,j=0,N=`M ${k} ${L} A ${b} ${b} 0 0 ${j} ${k} ${D}`):(k=S+y.width,j=1,N=`M ${k} ${L} A ${b} ${b} 0 0 ${j} ${k} ${D}`);const X=D-L,z=Tt(l,O),M=Tt(l,[$+1]),H=`gradient-arc-${$}`;v.push(I(Bt,{children:[d(jt,{children:I("linearGradient",{id:H,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:z||p}),d("stop",{offset:"100%",stopColor:M||p})]})}),d(yt,{d:N,stroke:`url(#${H})`,strokeWidth:a,fill:"none",width:w,height:X,"data-element-type":"shape"})]}));const B=A?k-b-g.width/2:k+b-g.width/2,U=R+y.height+o/2-g.height/2;m.push(d(q,{indexes:[$+1],x:B,y:U}))}}}),u.length>0){const _=u.length-1,$=Math.floor(_/s),P=_%s,E=($%2===1?s-1-P:P)*(y.width+i),S=$*(y.height+o);m.push(d(q,{indexes:[u.length],x:E+(y.width-g.width)/2,y:S+y.height+g.height+20}))}if(u.length/s>2){const _=(o+y.height)/2,$=Tt(l,[0]);v.push(d(Ct,{x:0,y:y.height/2-a/2,width:_,height:a,fill:$||p,"data-element-type":"shape"}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(V,{width:s*y.width+(s-1)*i+b*2,height:Math.ceil(u.length/s)*(y.height+o),children:[d(V,{children:v}),d(St,{children:x}),d(Et,{children:m})]})]})};kt("sequence-color-snake-steps",{component:Ay,composites:["title","item"]});const Us=(t,e)=>t===0?0:t===1?e/2:e/2+(t-1)*(e/2*3),Zs=(t,e,n)=>{if(t)return 0;const o=e===0?2:n;return n*2+o},EH=(t,e,n,r,i,o,s,a)=>{const l=Math.max(6,o*.15),c=r+(t-1)*i,h=t*l,u=100,p=c+h+u+50,g=p-u;let y=0,m=0,x=0,v=0;if(t>0){let w=1/0,_=-1/0;for(let T=0;T<t;T++){const F=T%2===0,L=Math.floor(T/2),D=Us(L,n),N=0+Zs(F,L,n)+D;w=Math.min(w,N-n),_=Math.max(_,N+n)}const $=(w+_)/2,P=0;y=0,v=y+e.width+a+s+n,x=v-P+$;const S=y+e.width/2,R=x-S;m=x+R-e.width/2}return{canvasHeight:p,startY:g,leftItemAlignedX:y,rightItemAlignedX:m,cylinderAreaStartX:v}},IH=(t,e,n,r,i,o,s)=>{const a=t%2===0,l=Math.floor(t/2),c=Us(l,e),h=Zs(a,l,e),u=s+h+c,f=o-t*i,p=n+t*r,g=f-p;return{x:u,y:g,height:p,bottomY:f,topY:g}},TH=(t,e,n,r,i,o,s,a,l)=>{const c=t%2===0,h=e.topY+e.height*.05;let u,f;c?(u=i,f=u+n.width+l):(u=o,f=u-l);let p;s==="top"?p=h:s==="bottom"?p=h-n.height:p=h-n.height/2,p+=a;const g=c?e.x-r:e.x+r,y=c?g-l:g+l;return{itemPos:{x:u,y:p},lineStartX:y,lineEndX:f,lineY:h}},AH=(t,e)=>{const n=lt(e),r=[];return r.push(I("linearGradient",{id:`cylinderGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.toRgbString(),stopOpacity:.7}),d("stop",{offset:"40%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.65}),d("stop",{offset:"70%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:.6}),d("stop",{offset:"100%",stopColor:n.clone().lighten(20).toRgbString(),stopOpacity:.55})]})),r.push(I("linearGradient",{id:`topGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:1}),d("stop",{offset:"100%",stopColor:"#fafafa",stopOpacity:1})]})),r.push(I("linearGradient",{id:`bottomGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(8).toRgbString(),stopOpacity:.75}),d("stop",{offset:"50%",stopColor:n.clone().darken(5).toRgbString(),stopOpacity:.7}),d("stop",{offset:"100%",stopColor:n.clone().darken(12).toRgbString(),stopOpacity:.65})]})),r.push(I("linearGradient",{id:`numberGradient${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(0).toRgbString(),stopOpacity:.9}),d("stop",{offset:"50%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.85}),d("stop",{offset:"100%",stopColor:n.clone().lighten(10).toRgbString(),stopOpacity:.8})]})),r.push(I("linearGradient",{id:`glowGradient${t}`,x1:"0%",y1:"100%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:.2}),d("stop",{offset:"90%",stopColor:"#FFFFFF",stopOpacity:0})]})),r},kH=(t,e,n,r)=>{const{x:i,topY:o,bottomY:s}=e,a=[];a.push(d("ellipse",{id:`cylinder-bottom-${t}`,cx:i,cy:s,rx:n,ry:r,fill:`url(#bottomGradient${t})`,opacity:.7})),a.push(d(yt,{id:`cylinder-body-${t}`,d:`
|
|
108
108
|
M ${i-n} ${o}
|
|
109
109
|
A ${n} ${r} 0 0 0 ${i} ${o+r}
|
|
110
110
|
A ${n} ${r} 0 0 0 ${i+n} ${o}
|
|
@@ -112,13 +112,13 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
112
112
|
A ${n} ${r} 0 0 1 ${i} ${s+r}
|
|
113
113
|
A ${n} ${r} 0 0 1 ${i-n} ${s}
|
|
114
114
|
Z
|
|
115
|
-
`,fill:`url(#cylinderGradient${t})`,stroke:"none"})),a.push(d(
|
|
115
|
+
`,fill:`url(#cylinderGradient${t})`,stroke:"none"})),a.push(d(Ct,{id:`cylinder-glow-${t}`,x:i-n,y:o-r*3,width:n*2,height:r*3,fill:`url(#glowGradient${t})`})),a.push(d("ellipse",{id:`cylinder-top-${t}`,cx:i,cy:o,rx:n,ry:r,fill:`url(#topGradient${t})`}));const l=i-10,c=o-15,f=`translate(${l}, ${c}) matrix(1, 0, ${-.6}, ${.6}, 0, 0)`;return a.push(d(Mt,{id:`cylinder-number-${t}`,width:50,height:50,fontFamily:"Arial Black, sans-serif",fontSize:32,fontWeight:900,fill:`url(#numberGradient${t})`,alignHorizontal:"center",alignVertical:"middle",transform:f,children:t+1})),a},LH=(t,e,n,r,i)=>{const s=[];return s.push(d("circle",{id:`decoration-dot-start-${t}`,cx:e,cy:r,r:2,fill:i})),s.push(d("line",{id:`decoration-line-${t}`,x1:e,y1:r,x2:n,y2:r,stroke:i,strokeWidth:1,opacity:.8})),s.push(d("circle",{id:`decoration-dot-end-${t}`,cx:n,cy:r,r:2,fill:i,opacity:.9})),s},zH=(t,e,n,r,i)=>{if(t===0)return null;const o=[];for(let w=0;w<t;w++){const _=w%2===0,$=Math.floor(w/2),P=Us($,e),C=Zs(_,$,e),A=n+C+P,E=r-w*i;o.push({x:A,y:E})}const s=o[0],a=o[o.length-1],l=6,c=t>5?t*16:100,h=s.x-e-c,u=s.x+e+c,f=s.y+l+c/6,p=a.x-e-c,g=a.x+e+c,y=a.y+l-c/6,m=`
|
|
116
116
|
M ${h} ${f}
|
|
117
117
|
L ${u} ${f}
|
|
118
118
|
L ${g} ${y}
|
|
119
119
|
L ${p} ${y}
|
|
120
120
|
Z
|
|
121
|
-
`,
|
|
121
|
+
`,x=`
|
|
122
122
|
M ${u} ${f}
|
|
123
123
|
L ${u} ${f+l}
|
|
124
124
|
L ${g} ${y+l}
|
|
@@ -130,12 +130,12 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
130
130
|
L ${u} ${f+l}
|
|
131
131
|
L ${h} ${f+l}
|
|
132
132
|
Z
|
|
133
|
-
`;return E(Y,{children:[d(zt,{children:E(Rt,{children:[E("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),d("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),d("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),E("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),d("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),d("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),E("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),d("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),d("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]})}),d(ht,{id:"base-plate-front",d:v,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),d(ht,{id:"base-plate-side",d:b,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),d(ht,{id:"base-plate-top",d:m,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})},yy=t=>{const{Title:e,Item:n,data:r,options:i,cylinderRx:o=28,cylinderRy:s=18,baseHeight:a=120,heightIncrement:l=40,depthSpacing:c=60,itemVerticalAlign:h="top",itemVerticalOffset:u=-12,firstDecorationWidth:f=90}=t,{title:p,desc:g,items:y=[]}=r,m=e?d(e,{title:p,desc:g}):null,b=Q(d(n,{indexes:[0],data:r,datum:y[0],positionH:"center"})),v=Q(d(q,{indexes:[0]})),x=re(i),w=10,_=Math.max(6,c*.15),$=tR(y.length,b,o,a,l,c,f,w),{startY:P,leftItemAlignedX:O,rightItemAlignedX:T,cylinderAreaStartX:I}=$,S=[],H=[];y.forEach((L,M)=>{const R=Ct(i,[M])||x;S.push(...rR(M,R));const W=eR(M,o,a,l,_,P,I),U=iR(M,W,o,s),{itemPos:V,lineStartX:G,lineEndX:Z,lineY:K}=nR(M,W,b,o,O,T,h,u,w),nt=oR(M,G,Z,K,R);U.push(...nt);const at=d(n,{indexes:[M],datum:L,data:r,x:V.x,y:V.y,positionH:M%2===0?"flipped":"normal"}),pt=[d(Ft,{indexes:[M],x:V.x+b.width/2-v.width/2,y:V.y+b.height+10}),d(q,{indexes:[M],x:V.x+b.width/2-v.width/2,y:V.y-v.height-10})];H[M]={cylinderNodes:U,itemNode:at,btnNodes:pt,itemX:V.x,itemY:V.y}});let C=1/0,A=1/0,B=-1/0,k=-1/0;H.forEach(L=>{const{itemX:M,itemY:R}=L;C=Math.min(C,M),A=Math.min(A,R),B=Math.max(B,M+b.width),k=Math.max(k,R+b.height)});const D=B-C,z=k-A,N=[d(zt,{children:S})],j=[],X=sR(y.length,o,I,P,_);X&&N.push(X);for(let L=y.length-1;L>=0;L--){const M=H[L];M&&(N.push(E(Y,{children:[d(Y,{children:M.cylinderNodes}),M.itemNode]})),j.push(...M.btnNodes))}if(y.length>0){const L=y.length%2===0,M=Math.floor(y.length/2),R=Ws(M,o),W=Vs(L,M,o),U=I+W+R,V=P-y.length*_;j.push(d(q,{indexes:[y.length],x:U,y:V-100}))}return E(lt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,E(Y,{width:D,height:z,children:[d(It,{children:N}),d(Ot,{children:j})]})]})};Tt("sequence-cylinders-3d",{component:yy,composites:["title","item"]});const Dt={WIDTH:160,HEIGHT:260,ARROW_HEIGHT:148,ARROW_WIDTH:100,LINE_X:100,RECT_X:0,RECT_Y:80,RECT_WIDTH:100,RECT_HEIGHT:130},ln={SIZE:8,MAX_COUNT:40,MIN_COUNT:5,ARROW_RATIO:.6,MIN_ARROW_COUNT:3};function aR(t,e,n){return(t+e*7+n*13)%100}function lR(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function cR(t,e,n,r,i,o,s,a){const l=Math.max(i,Math.min(t+n,o)),c=Math.max(s,Math.min(e+r,a));return{x:l,y:c}}function vy({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=ln.SIZE/2,{cols:l,rows:c}=lR(t),h=(r-a*2)/(l+1),u=(i-a*2)/(c+1);let f=0;for(let p=0;p<c&&f<t;p++)for(let g=0;g<l&&f<t;g++){const y=aR(o,p,g),m=y%16-8,b=y*3%12-6,v=p%2===1?h/2:0,x=e+a+(g+1)*h+v,w=n+a+(p+1)*u,{x:_,y:$}=cR(x,w,m,b,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function hR(t,e){if(e<=1)return ln.MAX_COUNT;const n=t/(e-1),r=ln.MAX_COUNT-ln.MIN_COUNT;return Math.round(ln.MAX_COUNT-r*n)}function dR(){const s={topLeft:{x:40,y:25},topRight:{x:160,y:75},bottomLeft:{x:40,y:205},bottomRight:{x:160,y:255}},a=[];for(let l=0;l<=12;l++){const c=l/12,h={x:s.topLeft.x+(s.bottomLeft.x-s.topLeft.x)*c,y:s.topLeft.y+(s.bottomLeft.y-s.topLeft.y)*c},u={x:s.topRight.x+(s.bottomRight.x-s.topRight.x)*c,y:s.topRight.y+(s.bottomRight.y-s.topRight.y)*c};a.push(`M${h.x} ${h.y}L${u.x} ${u.y}`);const f={x:s.topLeft.x+(s.topRight.x-s.topLeft.x)*c,y:s.topLeft.y+(s.topRight.y-s.topLeft.y)*c},p={x:s.bottomLeft.x+(s.bottomRight.x-s.bottomLeft.x)*c,y:s.bottomLeft.y+(s.bottomRight.y-s.bottomLeft.y)*c};a.push(`M${f.x} ${f.y}L${p.x} ${p.y}`)}return a.join("")}function by(t,e){return t.map(n=>{const r=Ct(e,[n.colorIndex]);return d(ht,{d:"M4 0L8 4L4 8L0 4Z",fill:r,x:n.x,y:n.y,width:ln.SIZE,height:ln.SIZE,"data-element-type":"shape"})})}function uR(t,e,n,r,i){return E(Y,{x:e,y:0,width:Dt.WIDTH,height:Dt.HEIGHT,children:[E(ne,{children:[d(ht,{d:dR(),stroke:"#D9D9D9",strokeWidth:2}),d(ht,{d:`M${Dt.LINE_X} 25V260`,stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),d(St,{x:Dt.RECT_X,y:Dt.RECT_Y,width:Dt.RECT_WIDTH,height:Dt.RECT_HEIGHT,fill:"#FFCB0E",fillOpacity:.2})]}),d(Rt,{children:by(r,i)}),d(Et,{x:Dt.LINE_X-25,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(t+1).padStart(2,"0")})]})}function fR(t,e){const n=Dt.RECT_Y+Dt.RECT_HEIGHT/2-Dt.ARROW_HEIGHT/2,r=Math.max(Math.round(ln.MIN_COUNT*ln.ARROW_RATIO),ln.MIN_ARROW_COUNT),i=vy({count:r,rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return E(Y,{x:t+Dt.WIDTH,y:n,children:[d(ht,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:Dt.ARROW_WIDTH,height:Dt.ARROW_HEIGHT,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),d(Rt,{children:by(i,e)})]})}const xy=t=>{const{Title:e,Item:n,data:r,gap:i=20,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=Q(d(q,{indexes:[0]})),u=Q(d(n,{indexes:[0],data:r,datum:l[0],width:Dt.WIDTH,positionH:"center"})),f=[],p=[],g=[],y=Dt.HEIGHT+i,m=y+u.height+10;if(l.forEach((b,v)=>{const x=v*Dt.WIDTH,w=[v],_=Ct(o,w),$=hR(v,l.length),P=vy({count:$,rectX:Dt.RECT_X,rectY:Dt.RECT_Y,rectWidth:Dt.RECT_WIDTH,rectHeight:Dt.RECT_HEIGHT,seed:v*100});f.push(uR(v,x,_,P,o)),v===l.length-1&&f.push(fR(x,o)),p.push(d(n,{indexes:w,datum:b,data:r,width:Dt.WIDTH,x:x+Dt.LINE_X-Dt.WIDTH/2,y,positionH:"center"})),g.push(d(Ft,{indexes:w,x:x+Dt.LINE_X-h.width/2,y:m})),v<l.length-1&&g.push(d(q,{indexes:[v+1],x:x+Dt.WIDTH-h.width/2,y:m}))}),l.length>0){g.unshift(d(q,{indexes:[0],x:-h.width/2,y:m}));const b=(l.length-1)*Dt.WIDTH;g.push(d(q,{indexes:[l.length],x:b+Dt.WIDTH-h.width/2,y:m}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{width:Dt.WIDTH*l.length+Dt.ARROW_WIDTH,height:Dt.HEIGHT+i+u.height,children:[d(Y,{children:f}),d(It,{children:p}),d(Ot,{children:g})]})]})};Tt("sequence-filter-mesh",{component:xy,composites:["title","item"]});const wy=t=>{const{Title:e,Item:n,data:r,gap:i=30,cardPadding:o=10,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=re(s),f=xe({colorPrimary:u},s),p=Q(d(q,{indexes:[0]})),g=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),y=[],m=[],b=[],v=g.width+o*2,x=g.height+o*2+30,w=8,_=6,$=Math.max(p.height+20,40),P=40;if(c.forEach((O,T)=>{const I=T%2===0,S=T*(v+i);let H;I?T%4===2?H=$:H=$+P:H=$+P+60;const C=[T],A=Ct(s,C)||u;if(I){const z=A===u?f.colorPrimaryBg||"#E8F3FF":`${A}20`,N=d(St,{x:S,y:H,width:v,height:x,fill:z,rx:20,ry:20});b.push(N)}m.push(d(n,{indexes:C,datum:O,data:r,x:S+o,y:H+o,positionH:"center",positionV:"normal"}));const B=c.length*w+(c.length-1)*_,k=S+(v-B)/2,D=H+g.height+20;for(let z=0;z<c.length;z++){const N=k+z*(w+_),j=z===T;b.push(d(Lt,{x:N,y:D,width:w,height:w,fill:j?A:"transparent",stroke:A,strokeWidth:2}))}y.push(d(Ft,{indexes:C,x:S+(v-p.width)/2,y:H+x+10})),T===0?y.push(d(q,{indexes:C,x:S+(v-p.width)/2,y:H-p.height-10})):y.push(d(q,{indexes:C,x:S-i/2-p.width/2,y:$-p.height-10}))}),c.length>0){const O=[],I=i/2,S=6,H=$+P,C=0-I,A=H+x/2;O.push(`M ${C} ${A-S}`),c.forEach((U,V)=>{const G=V%2===0,Z=V*(v+i);let K;G?V%4===2?K=$:K=$+P:K=$+P+60;const nt=Z-I,at=Z+v+I,pt=K-I,ft=K+x+I,rt=K+x/2;G?(O.push(`L ${nt} ${pt+35}`),O.push(`Q ${nt} ${pt} ${nt+35} ${pt}`),O.push(`L ${at-35} ${pt}`),O.push(`Q ${at} ${pt} ${at} ${pt+35}`),O.push(`L ${at} ${rt-S}`)):(O.push(`L ${nt} ${rt}`),O.push(`L ${nt} ${ft-35}`),O.push(`Q ${nt} ${ft} ${nt+35} ${ft}`),O.push(`L ${at-35} ${ft}`),O.push(`Q ${at} ${ft} ${at} ${ft-35}`),O.push(`L ${at} ${rt+S}`))});const B=c.length-1,k=B%2===0,D=B*(v+i);let z;k?B%4===2?z=$:z=$+P:z=$+P+60;const N=D+v+I,j=z+x/2,X=O.join(" "),L="gradient-zigzag-path",M=Ct(s,[0])||u,R=Ct(s,[c.length-1])||u,W=c.map((U,V)=>{const G=V/(c.length-1)*100,Z=Ct(s,[V])||u;return d("stop",{offset:`${G}%`,stopColor:Z})});b.unshift(E(Rt,{children:[d(zt,{children:d("linearGradient",{id:L,x1:C,y1:A,x2:N,y2:j,gradientUnits:"userSpaceOnUse",children:W})}),d(ht,{d:X,stroke:`url(#${L})`,strokeWidth:2,fill:"none",width:(c.length-1)*(v+i)+v+I*2,height:x+120})]})),b.unshift(d(Lt,{x:C-S,y:A-S,width:S*2,height:S*2,fill:"transparent",stroke:M,strokeWidth:2})),b.unshift(d(Lt,{x:N-S,y:j-S,width:S*2,height:S*2,fill:"transparent",stroke:R,strokeWidth:2}))}if(c.length>0){const T=(c.length-1)*(v+i);y.push(d(q,{indexes:[c.length],x:T+v+(i-p.width)/2,y:$-p.height-10}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{children:[d(ne,{children:b}),d(It,{children:m}),d(Ot,{children:y})]})]})};Tt("sequence-horizontal-zigzag",{component:wy,composites:["title","item"]});var pR=Object.defineProperty,gR=Object.defineProperties,mR=Object.getOwnPropertyDescriptors,_y=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,$y=(t,e,n)=>e in t?pR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ys=(t,e)=>{for(var n in e||(e={}))yR.call(e,n)&&$y(t,n,e[n]);if(_y)for(var n of _y(e))vR.call(e,n)&&$y(t,n,e[n]);return t},Xs=(t,e)=>gR(t,mR(e));function bR(t){const{width:e,height:n,colorPrimary:r}=t,i=r,o=ot.mix(r,"#000",20).toHexString(),s=ot.mix(r,"#fff",50).toHexString(),a=ot.mix(s,"#000",15).toHexString();function l(P,O){const I=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}],S={x:0,y:O},H={x:P,y:O},C={x:P/2,y:0},A={x:P/2,y:O},B=O*.35,k=B/O,D={x:C.x*(1-k)+S.x*k,y:B},z={x:C.x,y:B},N={x:C.x*(1-k)+H.x*k,y:B},j=I.map(M=>{const R=D.x+(N.x-D.x)*M.position,W=B,U=O*M.offset;return{x:R,y:W+U,position:M.position,offset:M.offset}});j.sort((M,R)=>M.position-R.position);const X=j.filter(M=>M.x<=z.x),L=j.filter(M=>M.x>z.x);return{leftBottom:S,rightBottom:H,peak:C,centerBottom:A,snowLineY:B,leftEdge:D,centerSnow:z,rightEdge:N,leftRipples:X,rightRipples:L}}const{leftRipples:c,rightRipples:h,leftBottom:u,rightBottom:f,peak:p,centerBottom:g,leftEdge:y,centerSnow:m,rightEdge:b}=l(e,n),v=[p,y,...c,m],x=[p,m,...h,b],w=[y,...c,m,g,u],_=[m,...h,b,f,g],$=P=>P.map(O=>`${O.x},${O.y}`).join(" ");return E(ne,Xs(Ys({},t),{children:[d("polygon",{points:$(v),fill:s}),d("polygon",{points:$(x),fill:a}),d("polygon",{points:$(w),fill:i}),d("polygon",{points:$(_),fill:o})]}))}function xR(t){const n={tiny:27,small:48,medium:54,large:72}[t]||54,r="#17C76F",i="#139B57",o="#737373",s=n*.7,a=n-s,l=s*.8,c=l,h=c/6,u=(c-h)/2,f=s;return E(ne,{width:c,height:n,children:[d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:r,clipPath:"inset(0 50% 0 0)"}),d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:i,clipPath:"inset(0 0 0 50%)"}),d("rect",{x:u,y:f,width:h,height:a,fill:o})]})}function wR(t){const{width:e,height:n}=t,r=e/2,i=n/2,o=Math.min(e,n)*.28,s=Math.min(e,n)*.14,a=Math.min(e,n)*.07,l=0,c=i-a/2,h=a*.4,u=8,f=Array.from({length:u},(p,g)=>{const y=360/u*g;return d("rect",{x:l,y:c,width:s,height:a,rx:h,ry:h,fill:"#FFCB0E",transform:`rotate(${y}, ${r}, ${i})`})});return E(ne,Xs(Ys({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function _R(t){return t.type==="single"?d(ne,Xs(Ys({},t),{width:54,height:36,children:d("path",{d:"M10.2635 13.3806C11.0019 9.99045 12.7381 6.91002 15.2405 4.55004C17.743 2.19007 20.8929 0.662716 24.2701 0.171643C27.6473 -0.31943 31.0914 0.24912 34.143 1.80148C37.1946 3.35385 39.7087 5.81625 41.3501 8.86031C44.8835 9.0468 48.1994 10.6544 50.5684 13.3294C52.9373 16.0044 54.1653 19.5277 53.9821 23.1242C53.7989 26.7207 52.2195 30.0959 49.5914 32.5071C46.9634 34.9184 43.5019 36.1683 39.9684 35.9818H11.1517C4.93436 35.9818 0 30.9593 0 24.6309C0.0598447 21.8016 1.13799 19.093 3.02989 17.0192C4.9218 14.9454 7.49584 13.6506 10.2635 13.3806Z",fill:"#70CAF8"})})):E(ne,Xs(Ys({},t),{width:73,height:40,children:[d("path",{d:"M61.6461 14.9716C60.8681 11.1875 58.9581 7.73823 56.1763 5.09315C53.3944 2.44806 49.8758 0.735682 46.0992 0.189041C42.3226 -0.357601 38.4714 0.288046 35.0699 2.03812C31.6683 3.7882 28.8815 6.5577 27.0889 9.96971C23.161 10.1687 19.4719 11.9405 16.8333 14.8953C14.1947 17.8502 12.8227 21.746 13.0191 25.7258C13.2155 29.7055 14.9642 33.4433 17.8806 36.1167C20.7969 38.7901 24.642 40.1802 28.5699 39.9812H60.6588C67.5702 39.9812 73.0006 34.4791 73.0006 27.4764C73.0006 20.9739 67.8664 15.4718 61.6461 14.9716Z",fill:"#70CAF8"}),d("path",{d:"M21.9691 6.47136e-09C25.9369 6.47136e-09 29.5264 1.62125 32.0003 4.21094C30.0604 5.7917 28.4423 7.75571 27.2581 10C23.3149 10.1989 19.6111 11.9702 16.9622 14.9238C14.3136 17.8774 12.936 21.772 13.1331 25.75C13.2057 27.2131 13.4902 28.6432 13.9652 30H10.7689C7.96116 29.8907 5.29664 28.7203 3.30402 26.7217C1.31144 24.7231 0.135825 22.0419 0.0110544 19.21C-0.113702 16.378 0.821178 13.6017 2.63019 11.4326C4.43921 9.26356 6.99065 7.8602 9.77766 7.5C11.9582 3.00012 16.6168 8.76701e-05 21.9691 6.47136e-09Z",fill:"#5BA2C6"})]}))}const Py=t=>{const{Title:e,Item:n,data:r,gap:i=20,minHeight:o=100,maxHeight:s=200,minWidth:a=260,maxWidth:l=300,options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null,g=[],y=[],m=[],b=[],v=f.length,x=xe(c.themeConfig),w=60,_={single:{width:54,height:36},double:{width:73,height:40}},$=[],P=[];let O=0,T=0;f.forEach((j,X)=>{const L=v>1?X/(v-1):0,R=(o+(s-o)*L)*1.6,W=Math.max(a,Math.min(l,R));$.push(W);const U=T;P.push(U),T+=W/2,X===v-1&&(O=U+W)});const I=P[0],S=P[v-1]+$[v-1],H=S-I,C=v>1?(H-i*(v-1))/v:H,A=Q(d(n,{indexes:[0],data:r,datum:f[0],width:C})),B=32,k=s+i,D=k+B+10;f.forEach((j,X)=>{const L=[X],M=o+(s-o)*(v>1?X/(v-1):0),R=$[X],W=P[X],U=s-M,V=Ct(c,[X])||x.colorPrimary;m.push(d(bR,{colorPrimary:V,x:W,y:U,width:R,height:M}));const G=I+X*(C+i);b.push(d(Et,{x:G,y:k,width:C,height:B,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:V,backgroundColor:V,backgroundOpacity:.5,backgroundRadius:4,children:String(X+1).padStart(2,"0")})),g.push(d(n,{indexes:L,datum:j,data:r,x:G,y:D,width:C}))});const z=Q(d(q,{indexes:[0]})),N=D+A.height+10;if(f.forEach((j,X)=>{const L=[X],M=I+X*(C+i);y.push(d(Ft,{indexes:L,x:M+C/2-z.width/2,y:N})),X<f.length-1&&y.push(d(q,{indexes:[X+1],x:M+C+i/2-z.width/2,y:N}))}),v>0){const j=I;y.unshift(d(q,{indexes:[0],x:j-i/2-z.width/2,y:N}));const X=I+(v-1)*(C+i);y.push(d(q,{indexes:[v],x:X+C+i/2-z.width/2,y:N})),m.push(d(wR,{x:O-w-20,y:-35,width:w,height:w}));const L=["tiny","small","medium","large"],M={tiny:27,small:48,medium:54,large:72},R={tiny:14.85,small:26.4,medium:29.7,large:39.6},W=[],U=(G,Z,K=5)=>W.some(nt=>!(G+Z+K<nt.x||G>nt.x+nt.width+K));f.forEach((G,Z)=>{const K=P[Z],nt=$[Z],pt=Z===v-1?3:Z===0?1:2;for(let ft=0;ft<pt;ft++){const rt=Z*100+ft*37,tt=rt*17%L.length,et=L[tt],st=M[et],vt=R[et];let gt=0,dt=0,ct=!1;for(;gt<20&&!ct;){const ut=(rt*13+gt*19)%100/100,mt=K+nt*.15,Pt=K+nt*.85-vt;dt=mt+(Pt-mt)*ut,U(dt,vt)||(ct=!0),gt++}if(ct){W.push({x:dt,width:vt});const ut=s-st;m.push(d(Y,{x:dt,y:ut,children:xR(et)}))}}});const V=Math.max(1,Math.floor(v/1.5));for(let G=0;G<V;G++){const Z=G*11+v*5+1,K=Z%2===0?"single":"double",nt=_[K],at=S-I-nt.width,pt=I+Z*7%100/100*at,ft=Z*13%40;m.push(d(_R,{type:K,x:pt,y:ft,width:nt.width,height:nt.height}))}}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,E(Y,{children:[d(Y,{children:m}),d(Y,{children:b}),d(It,{children:g}),d(Ot,{children:y})]})]})};Tt("sequence-mountain",{component:Py,composites:["title","item"]});const Gs=t=>Math.round(t*1e10)/1e10,hh=(t,e)=>Gs(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),qs=Math.PI,$R=qs*2,PR=(t,e)=>{const n=e-t;return n>qs&&n<$R||n<0&&n>-qs?-1:1},OR=(t,e,n,r,i,o)=>{const s=Math.atan2(t.y-e.y,t.x-e.x),a=Math.atan2(n.y-e.y,n.x-e.x),l=Math.acos((r*r+o*o-i*i)/(2*r*o)),c=1/Math.tan(l/2),h=PR(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},dh=Math.PI,CR=(t,e,n)=>t.reduce((r,i)=>{const{x:o,y:s,angle:{prev:a,next:l},arc:{x:c,y:h,radius:u}}=i,f=i.angle.dir*-1,p=a+f*dh/2,g=(f*dh+l-a)%dh,y=n-1,m=g/y,b=[];if(!m)return r.concat({x:o,y:s});for(let v=0;v<=y;v++)b.push({x:c+Math.cos(p+m*v)*u,y:h+Math.sin(p+m*v)*u});return r.concat(b)},[]),MR=(t,e=0)=>{const n=t.length,r=[],i=[],o=[];t.forEach((l,c)=>{const h=t[(c-1+n)%n],u=t[(c+1)%n],f=hh(h,l),p=hh(h,u),g=hh(l,u),y=OR(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===qs&&(y.vel=0);const m={x:l.x,y:l.y,angle:y,offset:0,arc:{radius:e,hit:e,lim:Math.min(g/y.vel,f/y.vel,l.r||0)},in:{length:f,rest:f},out:{length:g,rest:g},locked:!1,id:c,get prev(){return r[(c-1+n)%n]},get next(){return r[(c+1)%n]}};isNaN(y.main)&&(y.main=0,y.bis=y.prev||y.next,o.push(m)),typeof l.r=="number"&&(l.r===0?o.push(m):i.push(m)),r.push(m)}),o.forEach(l=>{l.angle.vel=0,l.arc.radius=0,uh(l)}),r.forEach(l=>{l.arc.hit=Math.min(l.out.rest/(l.angle.vel+l.next.angle.vel),l.in.rest/(l.angle.vel+l.prev.angle.vel))});let s=Us(i);for(;s;)SR(s),s=Us(i);for(s=Us(r);s;)ER(s,e),s=Us(r);const a=r.map(l=>{const c=l.arc.radius/Math.sin(l.angle.main/2);return{id:l.id,x:l.x,y:l.y,angle:{main:Gs(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:Gs(l.offset),arc:{radius:Gs(l.arc.radius),x:l.x+(Math.cos(l.angle.bis)*c||0),y:l.y+(Math.sin(l.angle.bis)*c||0)},in:{length:l.in.length,x:l.x+Math.cos(l.angle.prev)*l.offset,y:l.y+Math.sin(l.angle.prev)*l.offset},out:{length:l.out.length,x:l.x+Math.cos(l.angle.next)*l.offset,y:l.y+Math.sin(l.angle.next)*l.offset},get prev(){return a[(l.id-1+n)%n]},get next(){return a[(l.id+1)%n]}}});return a},SR=t=>{const{prev:e,next:n}=t;e.locked&&!n.locked?t.arc.radius=Math.min(Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.in.rest/t.angle.vel,t.arc.lim):n.locked&&!e.locked?t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),t.out.rest/t.angle.vel,t.arc.lim):n.locked&&e.locked?t.arc.radius=Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.lim):t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.arc.lim),uh(t)},ER=(t,e)=>{if(e>t.arc.hit){const{prev:n,next:r}=t;n.locked&&!r.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.length/(t.angle.vel+r.angle.vel),t.arc.radius),0):r.locked&&!n.locked?t.arc.radius=Math.max(Math.min(t.out.rest/t.angle.vel,t.in.length/(t.angle.vel+n.angle.vel),t.arc.radius),0):r.locked&&n.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.radius),0):t.arc.radius=t.arc.hit}uh(t)},uh=t=>{const{prev:e,next:n}=t;t.offset=t.arc.radius*t.angle.vel,e.out.rest-=t.offset,t.in.rest-=t.offset,t.out.rest-=t.offset,n.in.rest-=t.offset,t.locked=!0,e.arc.hit=Math.min(e.in.length/(e.angle.vel+e.prev.angle.vel),e.in.rest/e.angle.vel,e.out.rest/e.angle.vel),n.arc.hit=Math.min(n.out.length/(n.angle.vel+n.next.angle.vel),n.out.rest/n.angle.vel,n.in.rest/n.angle.vel)},Us=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),Oy=t=>{const{Title:e,Item:n,data:r,gap:i=10,width:o=700,pyramidWidth:s,itemHeight:a=60,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null;if(u.length===0)return d(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=5,g=xe(l.themeConfig),y=30,m=[],b=[],v=[],x=[],w=s!=null?s:o*.6,_=o-w,$=a*1.2,P=u.length*$+(u.length-1)*i;return u.forEach((O,T)=>{const I=[T],S=T===0,H=Ct(l,[T])||g.colorPrimary,{points:C,topWidth:A,bottomWidth:B}=IR(w,$,i,u.length,T),k=MR(C,p),D=CR(k,"AMOUNT",10),z=w/2,N=T*($+i),j=($-a)/2,X=N+j,L=z+A/2,M=z+B/2,W=L-p,U=_+p,V=a,G=W+U,Z=z-y/2,K=N+$/2-y/2+(S?8:0),nt=M,at=G-M,pt=X;v.push(d(St,{x:W,y:X,width:U,height:V,ry:"10",fill:g.colorPrimaryBg,"data-element-type":"shape"}));const ft=`${H}-pyramid-${T}`;b.push(d(zt,{children:E("linearGradient",{id:ft,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0","stop-color":H}),d("stop",{offset:"100%","stop-color":ot.mix(H,"#fff",40).toHexString()})]})}),d(Ne,{points:D,fill:`url(#${ft})`,y:N,"data-element-type":"shape"})),x.push(d(be,{indexes:I,x:Z,y:K,size:y,fill:"#fff"})),m.push(d(n,{indexes:I,datum:O,data:r,x:nt,y:pt,width:at,height:a,positionV:"middle"}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,E(Y,{width:o,height:P,children:[d(Y,{children:v}),d(Y,{children:b}),d(Y,{children:x}),d(It,{children:m}),d(Ot,{})]})]})};function IR(t,e,n,r,i){const o=t/2,s=r*e+(r-1)*n,a=i*(e+n),l=a+e,c=a/s*t,h=l/s*t;let u;if(i===0){const f={x:o,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e};u=[f,p,g]}else{const f={x:o+c/2,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e},y={x:o-c/2,y:0};u=[f,p,g,y]}return{points:u,topWidth:c,bottomWidth:h}}Tt("sequence-pyramid",{component:Oy,composites:["title","item"]});const ji={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},Cy=(t,e)=>`M ${t} ${e}`,Qt=(t,e)=>`L ${t} ${e}`,jr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,TR=(t,{roadWidth:e,innerRadius:n,outerRadius:r})=>{const i=(e+n*2)*t;return{y1:i,y2:i+e,y3:i+e+n,y4:i+e+n*2,y5:i+r*2}};function AR({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=ji,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+ji.spacing:n.x1-ji.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(nr,{indexes:[t],x:f,y:p,size:h,fill:i}),label:d(Et,{width:40,x:u?f-50:f+h+10,y:p+h/2-15,fontSize:30,fill:i,alignHorizontal:u?"right":"left",children:String(t+1).padStart(2,"0")}),item:d(l,{indexes:[t],data:o,datum:a,x:g,y,positionH:m})}}function kR({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(BL,{x:o?e.x6+10:e.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:r,"data-element-type":"shape"}))}const My=t=>{const{Title:e,Item:n,data:r,spacing:i=ji.spacing,options:o,flipped:s=!1}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=Q(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),{roadWidth:f,outerRadius:p,rowWidth:g,colorDefault:y}=ji,m=f/2,b=p-f,v=(u.width+i)*2+g,x=u.width+i,w=x+p,_=x+g-p,P=_+b+f,O=x+g/2,T=[],I=[],S=[],H=[],C=[],A=[],B=[];for(let z=0;z<c.length;z++){const N=Ct(o,[z])||y,j=z%2===0?"right":"left",X=z===0,L=z===c.length-1,M=TR(z,{roadWidth:f,innerRadius:b,outerRadius:p});if(j==="right"){const V=X?[P,M.y1]:[_,M.y1],G=[w,M.y1],Z=[w,M.y5],K=X?[P,M.y2]:[_,M.y2],nt=[w,M.y2];if(T.push(X?Cy(P,M.y1+m):Qt(_,M.y1+m),Qt(w,M.y1+m),jr(p-m,0,w,M.y4+m)),I.push(X?Cy(...V):Qt(...V),Qt(...G),jr(p,0,...Z)),S.push(Qt(...K),Qt(...nt),jr(b,1,...nt)),L){const at=f/2;I.push(Qt(O,M.y5),Qt(O,M.y5+at),Qt(O+f,M.y5-at),Qt(O,M.y4-at),Qt(O,M.y4),Qt(w,M.y4)),T.push(Qt(O,M.y4+m))}}else{const V=[w,M.y2],G=[_,M.y2],Z=[_,M.y4],K=[w,M.y1],nt=[_,M.y1];if(T.push(Qt(_,M.y1+m),jr(p-m,1,_,M.y4+m)),I.push(Qt(...V),Qt(...G),jr(b,1,...Z)),S.push(Qt(...K),Qt(...nt),jr(p,0,...nt)),L){const at=f/2;I.push(Qt(O,M.y4),Qt(O,M.y4-at),Qt(O-f,M.y4+at),Qt(O,M.y5+at),Qt(O,M.y5),Qt(_,M.y5)),T.push(Qt(O,M.y4+m))}}kR({direction:j,x:{x1:x,x6:P},y:M,color:N,elements:B});const{icon:R,label:W,item:U}=AR({i:z,direction:j,x:{x1:x,x3:w,x4:_,x6:P},y:M,color:N,data:r,itemBounds:u,item:c[z],Item:n,flipped:s});H.push(R),C.push(W),A.push(U)}const k=[...I,...S.reverse(),"Z"],D=c.length*(f+b*2)+f*1.5;return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,E(Y,{width:v,height:u.height<=p*2?D:D+u.height-p*2,children:[d(ht,{width:g,height:D,d:k.join(" "),fill:y,stroke:y,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),d(ht,{d:T.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),E(Rt,{children:[H,C,A,B]})]})]})};Tt("sequence-roadmap-vertical",{component:My,composites:["title","item"]});const Sy=t=>{const{Title:e,Item:n,data:r,gap:i=40,itemsPerRow:o=3,rowGap:s=80,options:a}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=re(a),p=Q(d(q,{indexes:[0]})),g=Q(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),y=[],m=[],b=[],v=25,x=25;if(h.forEach((w,_)=>{const $=Math.floor(_/o),P=_%o,O=$%2===1,I=(O?o-1-P:P)*(g.width+i),S=$*(g.height+s),H=[_];if(m.push(d(n,{indexes:H,datum:w,data:r,x:I,y:S,positionH:"center"})),y.push(d(Ft,{indexes:H,x:I+(g.width-p.width)/2,y:S+g.height+10})),_===0&&y.push(d(q,{indexes:H,x:I+(g.width-p.width)/2,y:S-p.height-10})),_<h.length-1){const C=Math.floor((_+1)/o),A=(_+1)%o,D=(C%2===1?o-1-A:A)*(g.width+i);if($===C){const N=O,j=N?D+g.width+(i-v)/2:I+g.width+(i-v)/2,X=S+g.height/2-x/2;b.push(d(ch,{x:j,y:X,width:v,height:x,colorPrimary:f,rotation:N?180:0})),y.push(d(q,{indexes:[_+1],x:j+(v-p.width)/2,y:S-p.height-10}))}else{const N=I+g.width/2-v/2,j=S+g.height+(s-x)/2;b.push(d(ch,{x:N,y:j,width:v,height:x,colorPrimary:f,rotation:90})),y.push(d(q,{indexes:[_+1],x:N+(v-p.width)/2,y:j+(x-p.height)/2}))}}}),h.length>0){const w=h.length-1,_=Math.floor(w/o),$=w%o,T=(_%2===1?o-1-$:$)*(g.width+i),I=_*(g.height+s);y.push(d(q,{indexes:[h.length],x:T+(g.width-p.width)/2,y:I+g.height+p.height+20}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,E(Y,{children:[d(Y,{children:b}),d(It,{children:m}),d(Ot,{children:y})]})]})};Tt("sequence-snake-steps",{component:Sy,composites:["title","item"]});const Ey=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=16,perspectiveFactor:s=.2,width:a=720}=t,{title:l,desc:c,items:h=[]}=r,u=e,f=u?d(u,{title:l,desc:c}):null;if(h.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=re(i),g=Q(d(q,{indexes:[0]})),y=Q(d(n,{indexes:[0],data:r,datum:h[0]||{},positionH:"center"})),m=12,b=Math.min(a*.1,100),v=Math.min(a*.45,Math.max(80,a-y.width-m-b)),x=Math.max(24,v*s*.35),w=56,_=w*.7,$=h.length>1?(w-_)/(h.length-1):0,P=Math.max(g.height+x+20,x+28),O=v/2,T=v+b+m,I=h.map((tt,et)=>w-$*et),S=h.map((tt,et)=>Math.max(x*(1-et*.05),x*.7)),H=[],C=[],A=h.length-1;H[A]=P,C[A]=0;for(let tt=A-1;tt>=0;tt-=1)C[tt]=C[tt+1]+S[tt]+o,H[tt]=H[tt+1]+S[tt]+I[tt+1]+o;const B=C[0]||S[0]||x,k=v*(.55+s*.1),D=v-k,z=h.map((tt,et)=>{const st=B===0?1:C[et]/B;return k+D*st}),N=z.map(tt=>{const et=O+tt/2;return Math.max(0,T-m-et)}),j=[],X=[],L=[],M=[],R=[],W=0,U=(H[0]||P)+(I[0]||w),V=U-W,G=35,K=(z[A]||k)*.8,nt=K*.65,at=(z[0]||v)*.9;R.push(d(Ne,{points:[{x:O,y:W},{x:O+K/2,y:W+G},{x:O+nt/2,y:W+G},{x:O+at/2,y:U},{x:O-at/2,y:U},{x:O-nt/2,y:W+G},{x:O-K/2,y:W+G}],fill:"rgba(0,0,0,0.12)",width:at,height:V,"data-element-type":"shape"}));let pt=H[A]+I[A]/2;h.forEach((tt,et)=>{const st=[et],vt=z[et],gt=S[et],dt=O-vt/2,ct=I[et],ut=H[et],mt=ut-gt,Pt=ut+ct/2,yt=Ct(i,st)||p;j.push(d(St,{x:dt,y:ut,width:vt,height:ct,fill:yt,"data-element-type":"shape"}),d(Ne,{points:[{x:dt,y:ut},{x:dt+vt,y:ut},{x:dt+vt-gt/2,y:mt},{x:dt+gt/2,y:mt}],fill:yt,opacity:"0.3",width:vt,height:gt,"data-element-type":"shape"}),d(Et,{x:dt,y:ut,width:vt,height:ct,fontSize:ct/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(et+1).padStart(2,"0")}));const Mt=dt+vt,te=Pt,he=N[et],ye=Mt+he;M.push(d(ht,{d:`M ${Mt} ${te} L ${ye} ${te}`,stroke:yt,strokeWidth:2,fill:"none",width:he,height:2,"data-element-type":"shape"}),d(ht,{d:`M ${ye} ${te} L ${ye} ${te}`,stroke:yt,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const Ut=Pt-y.height/2;X.push(d(n,{indexes:st,datum:tt,data:r,x:T,y:Ut,positionV:"middle"})),L.push(d(Ft,{indexes:st,x:T+y.width+10,y:Ut+y.height/2-g.height/2})),et===0?L.push(d(q,{indexes:[0],x:T+(y.width-g.width)/2,y:Ut-g.height-12})):L.push(d(q,{indexes:st,x:T+(y.width-g.width)/2,y:(pt+Pt)/2-g.height/2})),pt=Pt});const rt=pt-y.height/2;return L.push(d(q,{indexes:[h.length],x:T+(y.width-g.width)/2,y:rt+y.height+12})),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,E(Y,{children:[d(Y,{children:R}),d(Y,{children:j}),d(Y,{children:M}),d(It,{children:X}),d(Ot,{children:L})]})]})};Tt("sequence-stairs-front",{component:Ey,composites:["title","item"]});const Iy=t=>{const{Title:e,Item:n,data:r,gap:i=40,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=re(o),u=Q(d(q,{indexes:[0]})),f=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),p=[],g=[],y=[],m=25,b=25,v=Math.max(u.height+20,30);if(l.forEach((x,w)=>{const _=w*(f.width+i),$=[w];if(g.push(d(n,{indexes:$,datum:x,data:r,x:_,y:v,positionH:"center"})),p.push(d(Ft,{indexes:$,x:_+(f.width-u.width)/2,y:v+f.height+10})),w===0?p.push(d(q,{indexes:$,x:_+(f.width-u.width)/2,y:v-u.height-10})):p.push(d(q,{indexes:$,x:_-i/2-u.width/2,y:v-u.height-10})),w<l.length-1){const P=_+f.width+(i-m)/2,O=v+f.height/2-b/2;y.push(d(ch,{x:P,y:O,width:m,height:b,colorPrimary:h}))}}),l.length>0){const x=(l.length-1)*(f.width+i);p.push(d(q,{indexes:[l.length],x:x+f.width+(i-u.width)/2,y:v-u.height-10}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(Y,{children:y}),d(It,{children:g}),d(Ot,{children:p})]})]})};Tt("sequence-steps",{component:Iy,composites:["title","item"]});const Ty=t=>{const{Title:e,Item:n,data:r,gap:i=10,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=re(o),u=fg(o),f=Q(d(q,{indexes:[0]})),p=Q(d(n,{indexes:[0],data:r,datum:l[0],positionH:"normal"})),g=[],y=[],m=[],b=10,v=b+70+10,x=v+30,w=6;if(l.length>1){const _=p.height/2+w,$=(l.length-1)*(p.height+i)+p.height/2-w,P=`M ${v} ${_} L ${v} ${$}`,O="gradient-timeline-line",T=$-_,I=l.map((S,H)=>{const A=(H*(p.height+i)+p.height/2-_)/T*100,B=Ct(o,[H]);return d("stop",{offset:`${A}%`,stopColor:B||h})});m.push(E(Rt,{children:[d(zt,{children:d("linearGradient",{id:O,x1:v,y1:_,x2:v,y2:$,gradientUnits:"userSpaceOnUse",children:I})}),d(ht,{d:P,stroke:`url(#${O})`,strokeWidth:2,width:1,height:$-_})]}))}if(l.forEach((_,$)=>{const P=$*(p.height+i),O=P+p.height/2,T=[$];m.push(d(Et,{x:b,y:O,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:u[$%u.length],children:`STEP ${$+1}`})),y.push(d(n,{indexes:T,datum:_,data:r,x,y:P,positionH:"normal"})),m.push(d(Lt,{x:v-w,y:O-w,width:w*2,height:w*2,fill:u[$%u.length]})),g.push(d(Ft,{indexes:T,x:x-f.width-10,y:P+(p.height-f.height)/2})),$===0?g.push(d(q,{indexes:T,x:x+(p.width-f.width)/2,y:P-f.height-10})):g.push(d(q,{indexes:T,x:x+(p.width-f.width)/2,y:P-i/2-f.height/2}))}),l.length>0){const _=(l.length-1)*(p.height+i);g.push(d(q,{indexes:[l.length],x:x+(p.width-f.width)/2,y:_+p.height+10}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,E(Y,{children:[d(ne,{children:m}),d(It,{children:y}),d(Ot,{children:g})]})]})};Tt("sequence-timeline",{component:Ty,composites:["title","item"]});const fh=120,ph=108,Zs=30,zR="M4.49144e-05 34.4898C4.49144e-05 37.8786 0.848973 41.152 2.43571 44.2444C4.23516 47.7642 6.98514 51.0472 10.517 54.0009C21.331 63.047 39.4615 68.9814 59.9991 68.9814C80.5385 68.9814 98.6672 63.047 109.483 54.0009C113.013 51.0472 115.765 47.7642 117.564 44.2444C119.149 41.152 120 37.8786 120 34.4898C120 15.4407 93.1364 0 59.9991 0C26.8635 0 4.49144e-05 15.4407 4.49144e-05 34.4898Z",LR="M4.49145e-05 34.4898V53.9991C4.49145e-05 57.3879 0.848973 60.6613 2.43571 63.7556C9.75425 78.0545 32.7562 88.4907 59.999 88.4907C87.2438 88.4907 110.246 78.0545 117.564 63.7556C119.149 60.6613 120 57.3879 120 53.9991V34.4898C120 37.8786 119.149 41.152 117.564 44.2444C115.765 47.7642 113.013 51.0472 109.483 54.0009C98.6672 63.047 80.5385 68.9814 59.999 68.9814C39.4615 68.9814 21.3309 63.047 10.5169 54.0009C6.98509 51.0472 4.23516 47.7642 2.43567 44.2444C0.848928 41.152 4.49145e-05 37.8786 4.49145e-05 34.4898Z",RR="M0 53.9991V73.5102C0 92.5593 26.8634 108 59.999 108C93.1363 108 120 92.5593 120 73.5102V53.9991C120 57.3879 119.149 60.6613 117.564 63.7556C110.246 78.0545 87.2438 88.4907 59.999 88.4907C32.7562 88.4907 9.75425 78.0545 2.43571 63.7556C0.848973 60.6613 0 57.3879 0 53.9991Z",Ay=E("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),d("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),d("feColorMatrix",{in:"blurred",type:"matrix",values:`0 0 0 0 0
|
|
133
|
+
`;return I(V,{children:[d(jt,{children:I(Bt,{children:[I("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),d("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),d("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),I("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),d("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),d("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),I("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),d("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),d("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]})}),d(yt,{id:"base-plate-front",d:v,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),d(yt,{id:"base-plate-side",d:x,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),d(yt,{id:"base-plate-top",d:m,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})},ky=t=>{const{Title:e,Item:n,data:r,options:i,cylinderRx:o=28,cylinderRy:s=18,baseHeight:a=120,heightIncrement:l=40,depthSpacing:c=60,itemVerticalAlign:h="top",itemVerticalOffset:u=-12,firstDecorationWidth:f=90}=t,{title:p,desc:g,items:y=[]}=r,m=e?d(e,{title:p,desc:g}):null,x=et(d(n,{indexes:[0],data:r,datum:y[0],positionH:"center"})),v=et(d(q,{indexes:[0]})),b=ce(i),w=10,_=Math.max(6,c*.15),$=EH(y.length,x,o,a,l,c,f,w),{startY:P,leftItemAlignedX:C,rightItemAlignedX:A,cylinderAreaStartX:E}=$,S=[],R=[];y.forEach((z,M)=>{const H=Tt(i,[M])||b;S.push(...AH(M,H));const B=IH(M,o,a,l,_,P,E),U=kH(M,B,o,s),{itemPos:Y,lineStartX:G,lineEndX:Z,lineY:K}=TH(M,B,x,o,C,A,h,u,w),it=LH(M,G,Z,K,H);U.push(...it);const Q=d(n,{indexes:[M],datum:z,data:r,x:Y.x,y:Y.y,positionH:M%2===0?"flipped":"normal"}),at=[d(Xt,{indexes:[M],x:Y.x+x.width/2-v.width/2,y:Y.y+x.height+10}),d(q,{indexes:[M],x:Y.x+x.width/2-v.width/2,y:Y.y-v.height-10})];R[M]={cylinderNodes:U,itemNode:Q,btnNodes:at,itemX:Y.x,itemY:Y.y}});let O=1/0,T=1/0,F=-1/0,L=-1/0;R.forEach(z=>{const{itemX:M,itemY:H}=z;O=Math.min(O,M),T=Math.min(T,H),F=Math.max(F,M+x.width),L=Math.max(L,H+x.height)});const D=F-O,k=L-T,N=[d(jt,{children:S})],j=[],X=zH(y.length,o,E,P,_);X&&N.push(X);for(let z=y.length-1;z>=0;z--){const M=R[z];M&&(N.push(I(V,{children:[d(V,{children:M.cylinderNodes}),M.itemNode]})),j.push(...M.btnNodes))}if(y.length>0){const z=y.length%2===0,M=Math.floor(y.length/2),H=Us(M,o),B=Zs(z,M,o),U=E+B+H,Y=P-y.length*_;j.push(d(q,{indexes:[y.length],x:U,y:Y-100}))}return I(dt,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,I(V,{width:D,height:k,children:[d(St,{children:N}),d(Et,{children:j})]})]})};kt("sequence-cylinders-3d",{component:ky,composites:["title","item"]});const Gt={WIDTH:160,HEIGHT:260,ARROW_HEIGHT:148,ARROW_WIDTH:100,LINE_X:100,RECT_X:0,RECT_Y:80,RECT_WIDTH:100,RECT_HEIGHT:130},un={SIZE:8,MAX_COUNT:40,MIN_COUNT:5,ARROW_RATIO:.6,MIN_ARROW_COUNT:3};function HH(t,e,n){return(t+e*7+n*13)%100}function RH(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function DH(t,e,n,r,i,o,s,a){const l=Math.max(i,Math.min(t+n,o)),c=Math.max(s,Math.min(e+r,a));return{x:l,y:c}}function Ly({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=un.SIZE/2,{cols:l,rows:c}=RH(t),h=(r-a*2)/(l+1),u=(i-a*2)/(c+1);let f=0;for(let p=0;p<c&&f<t;p++)for(let g=0;g<l&&f<t;g++){const y=HH(o,p,g),m=y%16-8,x=y*3%12-6,v=p%2===1?h/2:0,b=e+a+(g+1)*h+v,w=n+a+(p+1)*u,{x:_,y:$}=DH(b,w,m,x,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function NH(t,e){if(e<=1)return un.MAX_COUNT;const n=t/(e-1),r=un.MAX_COUNT-un.MIN_COUNT;return Math.round(un.MAX_COUNT-r*n)}function jH(){const s={topLeft:{x:40,y:25},topRight:{x:160,y:75},bottomLeft:{x:40,y:205},bottomRight:{x:160,y:255}},a=[];for(let l=0;l<=12;l++){const c=l/12,h={x:s.topLeft.x+(s.bottomLeft.x-s.topLeft.x)*c,y:s.topLeft.y+(s.bottomLeft.y-s.topLeft.y)*c},u={x:s.topRight.x+(s.bottomRight.x-s.topRight.x)*c,y:s.topRight.y+(s.bottomRight.y-s.topRight.y)*c};a.push(`M${h.x} ${h.y}L${u.x} ${u.y}`);const f={x:s.topLeft.x+(s.topRight.x-s.topLeft.x)*c,y:s.topLeft.y+(s.topRight.y-s.topLeft.y)*c},p={x:s.bottomLeft.x+(s.bottomRight.x-s.bottomLeft.x)*c,y:s.bottomLeft.y+(s.bottomRight.y-s.bottomLeft.y)*c};a.push(`M${f.x} ${f.y}L${p.x} ${p.y}`)}return a.join("")}function zy(t,e){return t.map(n=>{const r=Tt(e,[n.colorIndex]);return d(yt,{d:"M4 0L8 4L4 8L0 4Z",fill:r,x:n.x,y:n.y,width:un.SIZE,height:un.SIZE,"data-element-type":"shape"})})}function WH(t,e,n,r,i){return I(V,{x:e,y:0,width:Gt.WIDTH,height:Gt.HEIGHT,children:[I(le,{children:[d(yt,{d:jH(),stroke:"#D9D9D9",strokeWidth:2}),d(yt,{d:`M${Gt.LINE_X} 25V260`,stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),d(Ct,{x:Gt.RECT_X,y:Gt.RECT_Y,width:Gt.RECT_WIDTH,height:Gt.RECT_HEIGHT,fill:"#FFCB0E",fillOpacity:.2})]}),d(Bt,{children:zy(r,i)}),d(Mt,{x:Gt.LINE_X-25,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(t+1).padStart(2,"0")})]})}function FH(t,e){const n=Gt.RECT_Y+Gt.RECT_HEIGHT/2-Gt.ARROW_HEIGHT/2,r=Math.max(Math.round(un.MIN_COUNT*un.ARROW_RATIO),un.MIN_ARROW_COUNT),i=Ly({count:r,rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return I(V,{x:t+Gt.WIDTH,y:n,children:[d(yt,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:Gt.ARROW_WIDTH,height:Gt.ARROW_HEIGHT,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),d(Bt,{children:zy(i,e)})]})}const Hy=t=>{const{Title:e,Item:n,data:r,gap:i=20,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(q,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],width:Gt.WIDTH,positionH:"center"})),f=[],p=[],g=[],y=Gt.HEIGHT+i,m=y+u.height+10;if(l.forEach((x,v)=>{const b=v*Gt.WIDTH,w=[v],_=Tt(o,w),$=NH(v,l.length),P=Ly({count:$,rectX:Gt.RECT_X,rectY:Gt.RECT_Y,rectWidth:Gt.RECT_WIDTH,rectHeight:Gt.RECT_HEIGHT,seed:v*100});f.push(WH(v,b,_,P,o)),v===l.length-1&&f.push(FH(b,o)),p.push(d(n,{indexes:w,datum:x,data:r,width:Gt.WIDTH,x:b+Gt.LINE_X-Gt.WIDTH/2,y,positionH:"center"})),g.push(d(Xt,{indexes:w,x:b+Gt.LINE_X-h.width/2,y:m})),v<l.length-1&&g.push(d(q,{indexes:[v+1],x:b+Gt.WIDTH-h.width/2,y:m}))}),l.length>0){g.unshift(d(q,{indexes:[0],x:-h.width/2,y:m}));const x=(l.length-1)*Gt.WIDTH;g.push(d(q,{indexes:[l.length],x:x+Gt.WIDTH-h.width/2,y:m}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{width:Gt.WIDTH*l.length+Gt.ARROW_WIDTH,height:Gt.HEIGHT+i+u.height,children:[d(V,{children:f}),d(St,{children:p}),d(Et,{children:g})]})]})};kt("sequence-filter-mesh",{component:Hy,composites:["title","item"]});const Ry=t=>{const{Title:e,Item:n,data:r,gap:i=30,cardPadding:o=10,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=ce(s),f=xe({colorPrimary:u},s),p=et(d(q,{indexes:[0]})),g=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),y=[],m=[],x=[],v=g.width+o*2,b=g.height+o*2+30,w=8,_=6,$=Math.max(p.height+20,40),P=40;if(c.forEach((C,A)=>{const E=A%2===0,S=A*(v+i);let R;E?A%4===2?R=$:R=$+P:R=$+P+60;const O=[A],T=Tt(s,O)||u;if(E){const k=T===u?f.colorPrimaryBg||"#E8F3FF":`${T}20`,N=d(Ct,{x:S,y:R,width:v,height:b,fill:k,rx:20,ry:20});x.push(N)}m.push(d(n,{indexes:O,datum:C,data:r,x:S+o,y:R+o,positionH:"center",positionV:"normal"}));const F=c.length*w+(c.length-1)*_,L=S+(v-F)/2,D=R+g.height+20;for(let k=0;k<c.length;k++){const N=L+k*(w+_),j=k===A;x.push(d(Wt,{x:N,y:D,width:w,height:w,fill:j?T:"transparent",stroke:T,strokeWidth:2}))}y.push(d(Xt,{indexes:O,x:S+(v-p.width)/2,y:R+b+10})),A===0?y.push(d(q,{indexes:O,x:S+(v-p.width)/2,y:R-p.height-10})):y.push(d(q,{indexes:O,x:S-i/2-p.width/2,y:$-p.height-10}))}),c.length>0){const C=[],E=i/2,S=6,R=$+P,O=0-E,T=R+b/2;C.push(`M ${O} ${T-S}`),c.forEach((U,Y)=>{const G=Y%2===0,Z=Y*(v+i);let K;G?Y%4===2?K=$:K=$+P:K=$+P+60;const it=Z-E,Q=Z+v+E,at=K-E,ct=K+b+E,nt=K+b/2;G?(C.push(`L ${it} ${at+35}`),C.push(`Q ${it} ${at} ${it+35} ${at}`),C.push(`L ${Q-35} ${at}`),C.push(`Q ${Q} ${at} ${Q} ${at+35}`),C.push(`L ${Q} ${nt-S}`)):(C.push(`L ${it} ${nt}`),C.push(`L ${it} ${ct-35}`),C.push(`Q ${it} ${ct} ${it+35} ${ct}`),C.push(`L ${Q-35} ${ct}`),C.push(`Q ${Q} ${ct} ${Q} ${ct-35}`),C.push(`L ${Q} ${nt+S}`))});const F=c.length-1,L=F%2===0,D=F*(v+i);let k;L?F%4===2?k=$:k=$+P:k=$+P+60;const N=D+v+E,j=k+b/2,X=C.join(" "),z="gradient-zigzag-path",M=Tt(s,[0])||u,H=Tt(s,[c.length-1])||u,B=c.map((U,Y)=>{const G=Y/(c.length-1)*100,Z=Tt(s,[Y])||u;return d("stop",{offset:`${G}%`,stopColor:Z})});x.unshift(I(Bt,{children:[d(jt,{children:d("linearGradient",{id:z,x1:O,y1:T,x2:N,y2:j,gradientUnits:"userSpaceOnUse",children:B})}),d(yt,{d:X,stroke:`url(#${z})`,strokeWidth:2,fill:"none",width:(c.length-1)*(v+i)+v+E*2,height:b+120})]})),x.unshift(d(Wt,{x:O-S,y:T-S,width:S*2,height:S*2,fill:"transparent",stroke:M,strokeWidth:2})),x.unshift(d(Wt,{x:N-S,y:j-S,width:S*2,height:S*2,fill:"transparent",stroke:H,strokeWidth:2}))}if(c.length>0){const A=(c.length-1)*(v+i);y.push(d(q,{indexes:[c.length],x:A+v+(i-p.width)/2,y:$-p.height-10}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{children:[d(le,{children:x}),d(St,{children:m}),d(Et,{children:y})]})]})};kt("sequence-horizontal-zigzag",{component:Ry,composites:["title","item"]});var BH=Object.defineProperty,VH=Object.defineProperties,YH=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertySymbols,XH=Object.prototype.hasOwnProperty,GH=Object.prototype.propertyIsEnumerable,Ny=(t,e,n)=>e in t?BH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ks=(t,e)=>{for(var n in e||(e={}))XH.call(e,n)&&Ny(t,n,e[n]);if(Dy)for(var n of Dy(e))GH.call(e,n)&&Ny(t,n,e[n]);return t},Qs=(t,e)=>VH(t,YH(e));function qH(t){const{width:e,height:n,colorPrimary:r}=t,i=r,o=lt.mix(r,"#000",20).toHexString(),s=lt.mix(r,"#fff",50).toHexString(),a=lt.mix(s,"#000",15).toHexString();function l(P,C){const E=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}],S={x:0,y:C},R={x:P,y:C},O={x:P/2,y:0},T={x:P/2,y:C},F=C*.35,L=F/C,D={x:O.x*(1-L)+S.x*L,y:F},k={x:O.x,y:F},N={x:O.x*(1-L)+R.x*L,y:F},j=E.map(M=>{const H=D.x+(N.x-D.x)*M.position,B=F,U=C*M.offset;return{x:H,y:B+U,position:M.position,offset:M.offset}});j.sort((M,H)=>M.position-H.position);const X=j.filter(M=>M.x<=k.x),z=j.filter(M=>M.x>k.x);return{leftBottom:S,rightBottom:R,peak:O,centerBottom:T,snowLineY:F,leftEdge:D,centerSnow:k,rightEdge:N,leftRipples:X,rightRipples:z}}const{leftRipples:c,rightRipples:h,leftBottom:u,rightBottom:f,peak:p,centerBottom:g,leftEdge:y,centerSnow:m,rightEdge:x}=l(e,n),v=[p,y,...c,m],b=[p,m,...h,x],w=[y,...c,m,g,u],_=[m,...h,x,f,g],$=P=>P.map(C=>`${C.x},${C.y}`).join(" ");return I(le,Qs(Ks({},t),{children:[d("polygon",{points:$(v),fill:s}),d("polygon",{points:$(b),fill:a}),d("polygon",{points:$(w),fill:i}),d("polygon",{points:$(_),fill:o})]}))}function UH(t){const n={tiny:27,small:48,medium:54,large:72}[t]||54,r="#17C76F",i="#139B57",o="#737373",s=n*.7,a=n-s,l=s*.8,c=l,h=c/6,u=(c-h)/2,f=s;return I(le,{width:c,height:n,children:[d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:r,clipPath:"inset(0 50% 0 0)"}),d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:i,clipPath:"inset(0 0 0 50%)"}),d("rect",{x:u,y:f,width:h,height:a,fill:o})]})}function ZH(t){const{width:e,height:n}=t,r=e/2,i=n/2,o=Math.min(e,n)*.28,s=Math.min(e,n)*.14,a=Math.min(e,n)*.07,l=0,c=i-a/2,h=a*.4,u=8,f=Array.from({length:u},(p,g)=>{const y=360/u*g;return d("rect",{x:l,y:c,width:s,height:a,rx:h,ry:h,fill:"#FFCB0E",transform:`rotate(${y}, ${r}, ${i})`})});return I(le,Qs(Ks({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function KH(t){return t.type==="single"?d(le,Qs(Ks({},t),{width:54,height:36,children:d("path",{d:"M10.2635 13.3806C11.0019 9.99045 12.7381 6.91002 15.2405 4.55004C17.743 2.19007 20.8929 0.662716 24.2701 0.171643C27.6473 -0.31943 31.0914 0.24912 34.143 1.80148C37.1946 3.35385 39.7087 5.81625 41.3501 8.86031C44.8835 9.0468 48.1994 10.6544 50.5684 13.3294C52.9373 16.0044 54.1653 19.5277 53.9821 23.1242C53.7989 26.7207 52.2195 30.0959 49.5914 32.5071C46.9634 34.9184 43.5019 36.1683 39.9684 35.9818H11.1517C4.93436 35.9818 0 30.9593 0 24.6309C0.0598447 21.8016 1.13799 19.093 3.02989 17.0192C4.9218 14.9454 7.49584 13.6506 10.2635 13.3806Z",fill:"#70CAF8"})})):I(le,Qs(Ks({},t),{width:73,height:40,children:[d("path",{d:"M61.6461 14.9716C60.8681 11.1875 58.9581 7.73823 56.1763 5.09315C53.3944 2.44806 49.8758 0.735682 46.0992 0.189041C42.3226 -0.357601 38.4714 0.288046 35.0699 2.03812C31.6683 3.7882 28.8815 6.5577 27.0889 9.96971C23.161 10.1687 19.4719 11.9405 16.8333 14.8953C14.1947 17.8502 12.8227 21.746 13.0191 25.7258C13.2155 29.7055 14.9642 33.4433 17.8806 36.1167C20.7969 38.7901 24.642 40.1802 28.5699 39.9812H60.6588C67.5702 39.9812 73.0006 34.4791 73.0006 27.4764C73.0006 20.9739 67.8664 15.4718 61.6461 14.9716Z",fill:"#70CAF8"}),d("path",{d:"M21.9691 6.47136e-09C25.9369 6.47136e-09 29.5264 1.62125 32.0003 4.21094C30.0604 5.7917 28.4423 7.75571 27.2581 10C23.3149 10.1989 19.6111 11.9702 16.9622 14.9238C14.3136 17.8774 12.936 21.772 13.1331 25.75C13.2057 27.2131 13.4902 28.6432 13.9652 30H10.7689C7.96116 29.8907 5.29664 28.7203 3.30402 26.7217C1.31144 24.7231 0.135825 22.0419 0.0110544 19.21C-0.113702 16.378 0.821178 13.6017 2.63019 11.4326C4.43921 9.26356 6.99065 7.8602 9.77766 7.5C11.9582 3.00012 16.6168 8.76701e-05 21.9691 6.47136e-09Z",fill:"#5BA2C6"})]}))}const jy=t=>{const{Title:e,Item:n,data:r,gap:i=20,minHeight:o=100,maxHeight:s=200,minWidth:a=260,maxWidth:l=300,options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null,g=[],y=[],m=[],x=[],v=f.length,b=xe(c.themeConfig),w=60,_={single:{width:54,height:36},double:{width:73,height:40}},$=[],P=[];let C=0,A=0;f.forEach((j,X)=>{const z=v>1?X/(v-1):0,H=(o+(s-o)*z)*1.6,B=Math.max(a,Math.min(l,H));$.push(B);const U=A;P.push(U),A+=B/2,X===v-1&&(C=U+B)});const E=P[0],S=P[v-1]+$[v-1],R=S-E,O=v>1?(R-i*(v-1))/v:R,T=et(d(n,{indexes:[0],data:r,datum:f[0],width:O})),F=32,L=s+i,D=L+F+10;f.forEach((j,X)=>{const z=[X],M=o+(s-o)*(v>1?X/(v-1):0),H=$[X],B=P[X],U=s-M,Y=Tt(c,[X])||b.colorPrimary;m.push(d(qH,{colorPrimary:Y,x:B,y:U,width:H,height:M}));const G=E+X*(O+i);x.push(d(Mt,{x:G,y:L,width:O,height:F,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:Y,backgroundColor:Y,backgroundOpacity:.5,backgroundRadius:4,children:String(X+1).padStart(2,"0")})),g.push(d(n,{indexes:z,datum:j,data:r,x:G,y:D,width:O}))});const k=et(d(q,{indexes:[0]})),N=D+T.height+10;if(f.forEach((j,X)=>{const z=[X],M=E+X*(O+i);y.push(d(Xt,{indexes:z,x:M+O/2-k.width/2,y:N})),X<f.length-1&&y.push(d(q,{indexes:[X+1],x:M+O+i/2-k.width/2,y:N}))}),v>0){const j=E;y.unshift(d(q,{indexes:[0],x:j-i/2-k.width/2,y:N}));const X=E+(v-1)*(O+i);y.push(d(q,{indexes:[v],x:X+O+i/2-k.width/2,y:N})),m.push(d(ZH,{x:C-w-20,y:-35,width:w,height:w}));const z=["tiny","small","medium","large"],M={tiny:27,small:48,medium:54,large:72},H={tiny:14.85,small:26.4,medium:29.7,large:39.6},B=[],U=(G,Z,K=5)=>B.some(it=>!(G+Z+K<it.x||G>it.x+it.width+K));f.forEach((G,Z)=>{const K=P[Z],it=$[Z],at=Z===v-1?3:Z===0?1:2;for(let ct=0;ct<at;ct++){const nt=Z*100+ct*37,J=nt*17%z.length,tt=z[J],st=M[tt],vt=H[tt];let gt=0,ut=0,ot=!1;for(;gt<20&&!ot;){const ft=(nt*13+gt*19)%100/100,mt=K+it*.15,bt=K+it*.85-vt;ut=mt+(bt-mt)*ft,U(ut,vt)||(ot=!0),gt++}if(ot){B.push({x:ut,width:vt});const ft=s-st;m.push(d(V,{x:ut,y:ft,children:UH(tt)}))}}});const Y=Math.max(1,Math.floor(v/1.5));for(let G=0;G<Y;G++){const Z=G*11+v*5+1,K=Z%2===0?"single":"double",it=_[K],Q=S-E-it.width,at=E+Z*7%100/100*Q,ct=Z*13%40;m.push(d(KH,{type:K,x:at,y:ct,width:it.width,height:it.height}))}}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(V,{children:m}),d(V,{children:x}),d(St,{children:g}),d(Et,{children:y})]})]})};kt("sequence-mountain",{component:jy,composites:["title","item"]});const Js=t=>Math.round(t*1e10)/1e10,xh=(t,e)=>Js(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),ta=Math.PI,QH=ta*2,JH=(t,e)=>{const n=e-t;return n>ta&&n<QH||n<0&&n>-ta?-1:1},tR=(t,e,n,r,i,o)=>{const s=Math.atan2(t.y-e.y,t.x-e.x),a=Math.atan2(n.y-e.y,n.x-e.x),l=Math.acos((r*r+o*o-i*i)/(2*r*o)),c=1/Math.tan(l/2),h=JH(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},bh=Math.PI,eR=(t,e,n)=>t.reduce((r,i)=>{const{x:o,y:s,angle:{prev:a,next:l},arc:{x:c,y:h,radius:u}}=i,f=i.angle.dir*-1,p=a+f*bh/2,g=(f*bh+l-a)%bh,y=n-1,m=g/y,x=[];if(!m)return r.concat({x:o,y:s});for(let v=0;v<=y;v++)x.push({x:c+Math.cos(p+m*v)*u,y:h+Math.sin(p+m*v)*u});return r.concat(x)},[]),nR=(t,e=0)=>{const n=t.length,r=[],i=[],o=[];t.forEach((l,c)=>{const h=t[(c-1+n)%n],u=t[(c+1)%n],f=xh(h,l),p=xh(h,u),g=xh(l,u),y=tR(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===ta&&(y.vel=0);const m={x:l.x,y:l.y,angle:y,offset:0,arc:{radius:e,hit:e,lim:Math.min(g/y.vel,f/y.vel,l.r||0)},in:{length:f,rest:f},out:{length:g,rest:g},locked:!1,id:c,get prev(){return r[(c-1+n)%n]},get next(){return r[(c+1)%n]}};isNaN(y.main)&&(y.main=0,y.bis=y.prev||y.next,o.push(m)),typeof l.r=="number"&&(l.r===0?o.push(m):i.push(m)),r.push(m)}),o.forEach(l=>{l.angle.vel=0,l.arc.radius=0,wh(l)}),r.forEach(l=>{l.arc.hit=Math.min(l.out.rest/(l.angle.vel+l.next.angle.vel),l.in.rest/(l.angle.vel+l.prev.angle.vel))});let s=ea(i);for(;s;)rR(s),s=ea(i);for(s=ea(r);s;)iR(s,e),s=ea(r);const a=r.map(l=>{const c=l.arc.radius/Math.sin(l.angle.main/2);return{id:l.id,x:l.x,y:l.y,angle:{main:Js(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:Js(l.offset),arc:{radius:Js(l.arc.radius),x:l.x+(Math.cos(l.angle.bis)*c||0),y:l.y+(Math.sin(l.angle.bis)*c||0)},in:{length:l.in.length,x:l.x+Math.cos(l.angle.prev)*l.offset,y:l.y+Math.sin(l.angle.prev)*l.offset},out:{length:l.out.length,x:l.x+Math.cos(l.angle.next)*l.offset,y:l.y+Math.sin(l.angle.next)*l.offset},get prev(){return a[(l.id-1+n)%n]},get next(){return a[(l.id+1)%n]}}});return a},rR=t=>{const{prev:e,next:n}=t;e.locked&&!n.locked?t.arc.radius=Math.min(Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.in.rest/t.angle.vel,t.arc.lim):n.locked&&!e.locked?t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),t.out.rest/t.angle.vel,t.arc.lim):n.locked&&e.locked?t.arc.radius=Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.lim):t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.arc.lim),wh(t)},iR=(t,e)=>{if(e>t.arc.hit){const{prev:n,next:r}=t;n.locked&&!r.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.length/(t.angle.vel+r.angle.vel),t.arc.radius),0):r.locked&&!n.locked?t.arc.radius=Math.max(Math.min(t.out.rest/t.angle.vel,t.in.length/(t.angle.vel+n.angle.vel),t.arc.radius),0):r.locked&&n.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.radius),0):t.arc.radius=t.arc.hit}wh(t)},wh=t=>{const{prev:e,next:n}=t;t.offset=t.arc.radius*t.angle.vel,e.out.rest-=t.offset,t.in.rest-=t.offset,t.out.rest-=t.offset,n.in.rest-=t.offset,t.locked=!0,e.arc.hit=Math.min(e.in.length/(e.angle.vel+e.prev.angle.vel),e.in.rest/e.angle.vel,e.out.rest/e.angle.vel),n.arc.hit=Math.min(n.out.length/(n.angle.vel+n.next.angle.vel),n.out.rest/n.angle.vel,n.in.rest/n.angle.vel)},ea=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),Wy=t=>{const{Title:e,Item:n,data:r,gap:i=10,width:o=700,pyramidWidth:s,itemHeight:a=60,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null;if(u.length===0)return d(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=5,g=xe(l.themeConfig),y=30,m=[],x=[],v=[],b=[],w=s!=null?s:o*.6,_=o-w,$=a*1.2,P=u.length*$+(u.length-1)*i;return u.forEach((C,A)=>{const E=[A],S=A===0,R=Tt(l,[A])||g.colorPrimary,{points:O,topWidth:T,bottomWidth:F}=oR(w,$,i,u.length,A),L=nR(O,p),D=eR(L,"AMOUNT",10),k=w/2,N=A*($+i),j=($-a)/2,X=N+j,z=k+T/2,M=k+F/2,B=z-p,U=_+p,Y=a,G=B+U,Z=k-y/2,K=N+$/2-y/2+(S?8:0),it=M,Q=G-M,at=X;v.push(d(Ct,{x:B,y:X,width:U,height:Y,ry:"10",fill:g.colorPrimaryBg,"data-element-type":"shape"}));const ct=`${R}-pyramid-${A}`;x.push(d(jt,{children:I("linearGradient",{id:ct,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0","stop-color":R}),d("stop",{offset:"100%","stop-color":lt.mix(R,"#fff",40).toHexString()})]})}),d(Ve,{points:D,fill:`url(#${ct})`,y:N,"data-element-type":"shape"})),b.push(d(Ce,{indexes:E,x:Z,y:K,size:y,fill:"#fff"})),m.push(d(n,{indexes:E,datum:C,data:r,x:it,y:at,width:Q,height:a,positionV:"middle"}))}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(V,{width:o,height:P,children:[d(V,{children:v}),d(V,{children:x}),d(V,{children:b}),d(St,{children:m}),d(Et,{})]})]})};function oR(t,e,n,r,i){const o=t/2,s=r*e+(r-1)*n,a=i*(e+n),l=a+e,c=a/s*t,h=l/s*t;let u;if(i===0){const f={x:o,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e};u=[f,p,g]}else{const f={x:o+c/2,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e},y={x:o-c/2,y:0};u=[f,p,g,y]}return{points:u,topWidth:c,bottomWidth:h}}kt("sequence-pyramid",{component:Wy,composites:["title","item"]});const Xi={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},Fy=(t,e)=>`M ${t} ${e}`,oe=(t,e)=>`L ${t} ${e}`,Vr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,sR=(t,{roadWidth:e,innerRadius:n,outerRadius:r})=>{const i=(e+n*2)*t;return{y1:i,y2:i+e,y3:i+e+n,y4:i+e+n*2,y5:i+r*2}};function aR({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=Xi,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+Xi.spacing:n.x1-Xi.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(or,{indexes:[t],x:f,y:p,size:h,fill:i}),label:d(Mt,{width:40,x:u?f-50:f+h+10,y:p+h/2-15,fontSize:30,fill:i,alignHorizontal:u?"right":"left",children:String(t+1).padStart(2,"0")}),item:d(l,{indexes:[t],data:o,datum:a,x:g,y,positionH:m})}}function lR({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(yH,{x:o?e.x6+10:e.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:r,"data-element-type":"shape"}))}const By=t=>{const{Title:e,Item:n,data:r,spacing:i=Xi.spacing,options:o,flipped:s=!1}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),{roadWidth:f,outerRadius:p,rowWidth:g,colorDefault:y}=Xi,m=f/2,x=p-f,v=(u.width+i)*2+g,b=u.width+i,w=b+p,_=b+g-p,P=_+x+f,C=b+g/2,A=[],E=[],S=[],R=[],O=[],T=[],F=[];for(let k=0;k<c.length;k++){const N=Tt(o,[k])||y,j=k%2===0?"right":"left",X=k===0,z=k===c.length-1,M=sR(k,{roadWidth:f,innerRadius:x,outerRadius:p});if(j==="right"){const Y=X?[P,M.y1]:[_,M.y1],G=[w,M.y1],Z=[w,M.y5],K=X?[P,M.y2]:[_,M.y2],it=[w,M.y2];if(A.push(X?Fy(P,M.y1+m):oe(_,M.y1+m),oe(w,M.y1+m),Vr(p-m,0,w,M.y4+m)),E.push(X?Fy(...Y):oe(...Y),oe(...G),Vr(p,0,...Z)),S.push(oe(...K),oe(...it),Vr(x,1,...it)),z){const Q=f/2;E.push(oe(C,M.y5),oe(C,M.y5+Q),oe(C+f,M.y5-Q),oe(C,M.y4-Q),oe(C,M.y4),oe(w,M.y4)),A.push(oe(C,M.y4+m))}}else{const Y=[w,M.y2],G=[_,M.y2],Z=[_,M.y4],K=[w,M.y1],it=[_,M.y1];if(A.push(oe(_,M.y1+m),Vr(p-m,1,_,M.y4+m)),E.push(oe(...Y),oe(...G),Vr(x,1,...Z)),S.push(oe(...K),oe(...it),Vr(p,0,...it)),z){const Q=f/2;E.push(oe(C,M.y4),oe(C,M.y4-Q),oe(C-f,M.y4+Q),oe(C,M.y5+Q),oe(C,M.y5),oe(_,M.y5)),A.push(oe(C,M.y4+m))}}lR({direction:j,x:{x1:b,x6:P},y:M,color:N,elements:F});const{icon:H,label:B,item:U}=aR({i:k,direction:j,x:{x1:b,x3:w,x4:_,x6:P},y:M,color:N,data:r,itemBounds:u,item:c[k],Item:n,flipped:s});R.push(H),O.push(B),T.push(U)}const L=[...E,...S.reverse(),"Z"],D=c.length*(f+x*2)+f*1.5;return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(V,{width:v,height:u.height<=p*2?D:D+u.height-p*2,children:[d(yt,{width:g,height:D,d:L.join(" "),fill:y,stroke:y,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),d(yt,{d:A.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),I(Bt,{children:[R,O,T,F]})]})]})};kt("sequence-roadmap-vertical",{component:By,composites:["title","item"]});const Vy=t=>{const{Title:e,Item:n,data:r,gap:i=40,itemsPerRow:o=3,rowGap:s=80,options:a}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=ce(a),p=et(d(q,{indexes:[0]})),g=et(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),y=[],m=[],x=[],v=25,b=25;if(h.forEach((w,_)=>{const $=Math.floor(_/o),P=_%o,C=$%2===1,E=(C?o-1-P:P)*(g.width+i),S=$*(g.height+s),R=[_];if(m.push(d(n,{indexes:R,datum:w,data:r,x:E,y:S,positionH:"center"})),y.push(d(Xt,{indexes:R,x:E+(g.width-p.width)/2,y:S+g.height+10})),_===0&&y.push(d(q,{indexes:R,x:E+(g.width-p.width)/2,y:S-p.height-10})),_<h.length-1){const O=Math.floor((_+1)/o),T=(_+1)%o,D=(O%2===1?o-1-T:T)*(g.width+i);if($===O){const N=C,j=N?D+g.width+(i-v)/2:E+g.width+(i-v)/2,X=S+g.height/2-b/2;x.push(d(vh,{x:j,y:X,width:v,height:b,colorPrimary:f,rotation:N?180:0})),y.push(d(q,{indexes:[_+1],x:j+(v-p.width)/2,y:S-p.height-10}))}else{const N=E+g.width/2-v/2,j=S+g.height+(s-b)/2;x.push(d(vh,{x:N,y:j,width:v,height:b,colorPrimary:f,rotation:90})),y.push(d(q,{indexes:[_+1],x:N+(v-p.width)/2,y:j+(b-p.height)/2}))}}}),h.length>0){const w=h.length-1,_=Math.floor(w/o),$=w%o,A=(_%2===1?o-1-$:$)*(g.width+i),E=_*(g.height+s);y.push(d(q,{indexes:[h.length],x:A+(g.width-p.width)/2,y:E+g.height+p.height+20}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,I(V,{children:[d(V,{children:x}),d(St,{children:m}),d(Et,{children:y})]})]})};kt("sequence-snake-steps",{component:Vy,composites:["title","item"]});const Yy=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=16,perspectiveFactor:s=.2,width:a=720}=t,{title:l,desc:c,items:h=[]}=r,u=e,f=u?d(u,{title:l,desc:c}):null;if(h.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=ce(i),g=et(d(q,{indexes:[0]})),y=et(d(n,{indexes:[0],data:r,datum:h[0]||{},positionH:"center"})),m=12,x=Math.min(a*.1,100),v=Math.min(a*.45,Math.max(80,a-y.width-m-x)),b=Math.max(24,v*s*.35),w=56,_=w*.7,$=h.length>1?(w-_)/(h.length-1):0,P=Math.max(g.height+b+20,b+28),C=v/2,A=v+x+m,E=h.map((J,tt)=>w-$*tt),S=h.map((J,tt)=>Math.max(b*(1-tt*.05),b*.7)),R=[],O=[],T=h.length-1;R[T]=P,O[T]=0;for(let J=T-1;J>=0;J-=1)O[J]=O[J+1]+S[J]+o,R[J]=R[J+1]+S[J]+E[J+1]+o;const F=O[0]||S[0]||b,L=v*(.55+s*.1),D=v-L,k=h.map((J,tt)=>{const st=F===0?1:O[tt]/F;return L+D*st}),N=k.map(J=>{const tt=C+J/2;return Math.max(0,A-m-tt)}),j=[],X=[],z=[],M=[],H=[],B=0,U=(R[0]||P)+(E[0]||w),Y=U-B,G=35,K=(k[T]||L)*.8,it=K*.65,Q=(k[0]||v)*.9;H.push(d(Ve,{points:[{x:C,y:B},{x:C+K/2,y:B+G},{x:C+it/2,y:B+G},{x:C+Q/2,y:U},{x:C-Q/2,y:U},{x:C-it/2,y:B+G},{x:C-K/2,y:B+G}],fill:"rgba(0,0,0,0.12)",width:Q,height:Y,"data-element-type":"shape"}));let at=R[T]+E[T]/2;h.forEach((J,tt)=>{const st=[tt],vt=k[tt],gt=S[tt],ut=C-vt/2,ot=E[tt],ft=R[tt],mt=ft-gt,bt=ft+ot/2,pt=Tt(i,st)||p;j.push(d(Ct,{x:ut,y:ft,width:vt,height:ot,fill:pt,"data-element-type":"shape"}),d(Ve,{points:[{x:ut,y:ft},{x:ut+vt,y:ft},{x:ut+vt-gt/2,y:mt},{x:ut+gt/2,y:mt}],fill:pt,opacity:"0.3",width:vt,height:gt,"data-element-type":"shape"}),d(Mt,{x:ut,y:ft,width:vt,height:ot,fontSize:ot/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(tt+1).padStart(2,"0")}));const wt=ut+vt,Rt=bt,Vt=N[tt],ee=wt+Vt;M.push(d(yt,{d:`M ${wt} ${Rt} L ${ee} ${Rt}`,stroke:pt,strokeWidth:2,fill:"none",width:Vt,height:2,"data-element-type":"shape"}),d(yt,{d:`M ${ee} ${Rt} L ${ee} ${Rt}`,stroke:pt,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const Dt=bt-y.height/2;X.push(d(n,{indexes:st,datum:J,data:r,x:A,y:Dt,positionV:"middle"})),z.push(d(Xt,{indexes:st,x:A+y.width+10,y:Dt+y.height/2-g.height/2})),tt===0?z.push(d(q,{indexes:[0],x:A+(y.width-g.width)/2,y:Dt-g.height-12})):z.push(d(q,{indexes:st,x:A+(y.width-g.width)/2,y:(at+bt)/2-g.height/2})),at=bt});const nt=at-y.height/2;return z.push(d(q,{indexes:[h.length],x:A+(y.width-g.width)/2,y:nt+y.height+12})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(V,{children:[d(V,{children:H}),d(V,{children:j}),d(V,{children:M}),d(St,{children:X}),d(Et,{children:z})]})]})};kt("sequence-stairs-front",{component:Yy,composites:["title","item"]});const Xy=t=>{const{Title:e,Item:n,data:r,gap:i=40,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=ce(o),u=et(d(q,{indexes:[0]})),f=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),p=[],g=[],y=[],m=25,x=25,v=Math.max(u.height+20,30);if(l.forEach((b,w)=>{const _=w*(f.width+i),$=[w];if(g.push(d(n,{indexes:$,datum:b,data:r,x:_,y:v,positionH:"center"})),p.push(d(Xt,{indexes:$,x:_+(f.width-u.width)/2,y:v+f.height+10})),w===0?p.push(d(q,{indexes:$,x:_+(f.width-u.width)/2,y:v-u.height-10})):p.push(d(q,{indexes:$,x:_-i/2-u.width/2,y:v-u.height-10})),w<l.length-1){const P=_+f.width+(i-m)/2,C=v+f.height/2-x/2;y.push(d(vh,{x:P,y:C,width:m,height:x,colorPrimary:h}))}}),l.length>0){const b=(l.length-1)*(f.width+i);p.push(d(q,{indexes:[l.length],x:b+f.width+(i-u.width)/2,y:v-u.height-10}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(V,{children:y}),d(St,{children:g}),d(Et,{children:p})]})]})};kt("sequence-steps",{component:Xy,composites:["title","item"]});const Gy=t=>{const{Title:e,Item:n,data:r,gap:i=10,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=ce(o),u=wg(o),f=et(d(q,{indexes:[0]})),p=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"normal"})),g=[],y=[],m=[],x=10,v=x+70+10,b=v+30,w=6;if(l.length>1){const _=p.height/2+w,$=(l.length-1)*(p.height+i)+p.height/2-w,P=`M ${v} ${_} L ${v} ${$}`,C="gradient-timeline-line",A=$-_,E=l.map((S,R)=>{const T=(R*(p.height+i)+p.height/2-_)/A*100,F=Tt(o,[R]);return d("stop",{offset:`${T}%`,stopColor:F||h})});m.push(I(Bt,{children:[d(jt,{children:d("linearGradient",{id:C,x1:v,y1:_,x2:v,y2:$,gradientUnits:"userSpaceOnUse",children:E})}),d(yt,{d:P,stroke:`url(#${C})`,strokeWidth:2,width:1,height:$-_})]}))}if(l.forEach((_,$)=>{const P=$*(p.height+i),C=P+p.height/2,A=[$];m.push(d(Mt,{x,y:C,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:u[$%u.length],children:`STEP ${$+1}`})),y.push(d(n,{indexes:A,datum:_,data:r,x:b,y:P,positionH:"normal"})),m.push(d(Wt,{x:v-w,y:C-w,width:w*2,height:w*2,fill:u[$%u.length]})),g.push(d(Xt,{indexes:A,x:b-f.width-10,y:P+(p.height-f.height)/2})),$===0?g.push(d(q,{indexes:A,x:b+(p.width-f.width)/2,y:P-f.height-10})):g.push(d(q,{indexes:A,x:b+(p.width-f.width)/2,y:P-i/2-f.height/2}))}),l.length>0){const _=(l.length-1)*(p.height+i);g.push(d(q,{indexes:[l.length],x:b+(p.width-f.width)/2,y:_+p.height+10}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(V,{children:[d(le,{children:m}),d(St,{children:y}),d(Et,{children:g})]})]})};kt("sequence-timeline",{component:Gy,composites:["title","item"]});const _h=120,$h=108,na=30,cR="M4.49144e-05 34.4898C4.49144e-05 37.8786 0.848973 41.152 2.43571 44.2444C4.23516 47.7642 6.98514 51.0472 10.517 54.0009C21.331 63.047 39.4615 68.9814 59.9991 68.9814C80.5385 68.9814 98.6672 63.047 109.483 54.0009C113.013 51.0472 115.765 47.7642 117.564 44.2444C119.149 41.152 120 37.8786 120 34.4898C120 15.4407 93.1364 0 59.9991 0C26.8635 0 4.49144e-05 15.4407 4.49144e-05 34.4898Z",hR="M4.49145e-05 34.4898V53.9991C4.49145e-05 57.3879 0.848973 60.6613 2.43571 63.7556C9.75425 78.0545 32.7562 88.4907 59.999 88.4907C87.2438 88.4907 110.246 78.0545 117.564 63.7556C119.149 60.6613 120 57.3879 120 53.9991V34.4898C120 37.8786 119.149 41.152 117.564 44.2444C115.765 47.7642 113.013 51.0472 109.483 54.0009C98.6672 63.047 80.5385 68.9814 59.999 68.9814C39.4615 68.9814 21.3309 63.047 10.5169 54.0009C6.98509 51.0472 4.23516 47.7642 2.43567 44.2444C0.848928 41.152 4.49145e-05 37.8786 4.49145e-05 34.4898Z",dR="M0 53.9991V73.5102C0 92.5593 26.8634 108 59.999 108C93.1363 108 120 92.5593 120 73.5102V53.9991C120 57.3879 119.149 60.6613 117.564 63.7556C110.246 78.0545 87.2438 88.4907 59.999 88.4907C32.7562 88.4907 9.75425 78.0545 2.43571 63.7556C0.848973 60.6613 0 57.3879 0 53.9991Z",qy=I("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),d("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),d("feColorMatrix",{in:"blurred",type:"matrix",values:`0 0 0 0 0
|
|
134
134
|
0 0 0 0 0
|
|
135
135
|
0 0 0 0 0
|
|
136
|
-
0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),ky=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=80}=t,s=fh,a=ph,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=re(i);if(h.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(zt,{children:Ay}),u,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=Q(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),g=Q(d(q,{indexes:[0]})),y=[],m=[],b=[];let v=-1/0;const x=p.height+Zs+a;return h.forEach((w,_)=>{const $=[_],P=Ct(i,$),O=_%2===0,T=_*(s+o),I=O?0:p.height+Zs,S=`puck-gradient-middle-${_}`,H=`puck-gradient-bottom-${_}`;b.push(E(Y,{x:T,y:I,id:`puck-${_}`,width:s,height:a,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[E(zt,{children:[E("linearGradient",{id:S,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:P||f}),d("stop",{offset:"1",stopColor:P||f,stopOpacity:"0.6"})]}),E("linearGradient",{id:H,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:"#F4F4FB"}),d("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),E(ne,{width:fh,height:ph,children:[d(ht,{d:zR,fill:P||f}),d(ht,{d:LR,fill:`url(#${S})`}),d(ht,{d:RR,fill:`url(#${H})`}),d("rect",{fill:"transparent",y:ph,width:fh,height:20})]}),d("text",{x:65,y:40,width:50,height:50,fontSize:40,fontWeight:"bold",fill:"#FFFFFF",textAnchor:"middle",dominantBaseline:"middle",transform:"rotate(-15 65 40) scale(1, 0.8)",children:_+1})]}));const C=T+(s-p.width)/2,A=O?I+a+Zs:I-Zs-p.height;if(v=Math.max(v,A+p.height),m.push(d(n,{indexes:$,datum:w,data:r,x:C,y:A,positionH:"center"})),y.push(d(Ft,{indexes:$,x:C+p.width-g.width/2,y:A+p.height-g.height/2})),_===0&&y.push(d(q,{indexes:[0],x:T+s/2-g.width/2-(o+s)/2,y:I+a/2-g.height/2})),_<h.length-1){const k=(_+1)%2===0?0:x,D=T+s+o/2-g.width/2,z=(I+a/2+k+a/2)/2-g.height/2;y.push(d(q,{indexes:[_+1],x:D,y:z}))}else y.push(d(q,{indexes:[h.length],x:T+s+o/2-g.width/2,y:I+a/2-g.height/2}))}),E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(zt,{children:Ay}),u,E(Y,{x:0,y:0,children:[d(Y,{children:b}),d(It,{children:m}),d(Ot,{children:y})]})]})};Tt("sequence-zigzag-pucks-3d",{component:ky,composites:["title","item"]});const HR=240,DR=130,NR=105,dr=12,jR=120,zy=50,FR=.6,BR="M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z",Ly="M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z",Ry=70+dr/2,Hy=40+dr/2,Dy=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),Ny=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=HR,dy:a=DR,iconSize:l=30}=t,{title:c,desc:h,items:u=[]}=i,f=n?d(n,{title:c,desc:h}):null,p=re(o);if(u.length===0)return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(zt,{children:Dy}),f,d(Y,{children:d(Ot,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=Q(d(r,{indexes:[0],data:i,datum:u[0]})),y=Q(d(q,{indexes:[0]})),m=[],b=[],v=[],x=[],w=[];let _=0,$=0,P="",O=1/0,T=-1/0,I=1/0,S=1/0;const H=[];u.forEach((B,k)=>{const D=_,z=$;H.push({x:D,y:z}),O=Math.min(O,z);const N=D-Ry,j=z-Hy;I=Math.min(I,N),S=Math.min(S,j);const X=k%2===0;k<u.length-1&&(_+=s,$=X?$+a:$-a)});const C=Math.max(0,-I),A=Math.max(0,-S);if(_=0,$=0,u.forEach((B,k)=>{const D=[k],z=H[k],N=z.x+C,j=z.y+A,X=Ct(o,D),L=Math.max(0,N-Ry),M=Math.max(0,j-Hy),R=10,W=zy+10,{colorPrimaryBg:U}=xe({colorPrimary:X});if(x.push(E(ne,{x:L,y:M,width:140,height:110,children:[d(Lt,{x:R,y:W,width:jR,height:zy,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:FR}),d(ht,{d:BR,fill:X||p}),d(ht,{d:Ly,fill:"#fff"}),d(ht,{d:Ly,fill:U||U})]})),B.icon){const Z=Math.max(0,N-l/2-dr/2),K=Math.max(0,j-l/2-dr/2);w.push(d(be,{x:Z,y:K,size:l,indexes:D,fill:X}))}const V=N-g.width/2-dr/2,G=Math.max(0,j+NR-dr/2);if(T=Math.max(T,G+g.height),k===0?P=`M ${N} ${j}`:P+=` L ${N} ${j}`,b.push(d(r,{indexes:D,datum:B,data:i,x:V,y:G})),m.push(d(Ft,{indexes:D,x:Math.max(0,V+g.width-y.width/2),y:Math.max(0,G+g.height-y.height/2)})),k<u.length-1){const Z=H[k+1],K=Z.x+C,nt=Z.y+A,at=Math.max(0,N+(K-N)/2-y.width/2),pt=Math.max(0,j+(nt-j)/2-y.height/2);m.push(d(q,{indexes:[k+1],x:at,y:pt}))}else m.push(d(q,{indexes:[u.length],x:Math.max(0,V+g.width+s/4),y:Math.max(0,G+g.height/2-y.height/2)}))}),P){const B=(((e=H[H.length-1])==null?void 0:e.x)||0)+C;v.push(d(ht,{d:P,stroke:"#f3f2f1",strokeWidth:dr,fill:"none",width:B,height:T-Math.min(O+A,0)}))}return E(lt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(zt,{children:Dy}),f,E(Y,{x:0,y:0,children:[d(Y,{children:[...v,...x,...w]}),d(It,{children:b}),d(Ot,{children:m})]})]})};Tt("sequence-zigzag-steps",{component:Ny,composites:["title","item"]});class Rn{init(e){Object.assign(this,e)}}class jy{constructor(e,n={}){this.clickTimer=null,this.singleClickCallback=null,this.doubleClickCallback=null,this.pointerId=null,this.startX=0,this.startY=0,this.skipClick=!1,this.dragged=!1,this.handlePointerDown=i=>{this.pointerId=i.pointerId,this.startX=i.clientX,this.startY=i.clientY,this.dragged=!1,this.skipClick=!1,window.addEventListener("pointermove",this.handlePointerMove,{passive:!0}),window.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),window.addEventListener("pointercancel",this.handlePointerUp,{passive:!0})},this.handlePointerMove=i=>{if(this.pointerId===null||i.pointerId!==this.pointerId)return;const o=i.clientX-this.startX,s=i.clientY-this.startY;Math.hypot(o,s)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=i=>{this.pointerId!==null&&i.pointerId===this.pointerId&&(this.pointerId=null,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp),this.dragged||(this.skipClick=!1),this.dragged=!1)};var r;this.element=e,this.delay=n.delay||300,this.dragThreshold=(r=n.dragThreshold)!=null?r:4,this.init()}init(){this.element.addEventListener("click",this.handleClick.bind(this)),this.element.addEventListener("dblclick",this.handleDoubleClick.bind(this)),this.element.addEventListener("pointerdown",this.handlePointerDown)}handleClick(e){if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{var n;(n=this.singleClickCallback)==null||n.call(this,e)},this.delay)}handleDoubleClick(e){var n;if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),(n=this.doubleClickCallback)==null||n.call(this,e)}onClick(e){return this.singleClickCallback=e,this}onDoubleClick(e){return this.doubleClickCallback=e,this}destroy(){this.clickTimer&&clearTimeout(this.clickTimer),this.element.removeEventListener("click",this.handleClick),this.element.removeEventListener("dblclick",this.handleDoubleClick),this.element.removeEventListener("pointerdown",this.handlePointerDown),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}function WR(t){return t.getScreenCTM()||new DOMMatrix}function VR(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function ur(t,e,n){return new DOMPoint(e,n).matrixTransform(VR(t))}function cn(t,e){const n=e.getBoundingClientRect(),i=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y+n.height}].map(c=>ur(t,c.x,c.y)),o=Math.min(...i.map(c=>c.x)),s=Math.max(...i.map(c=>c.x)),a=Math.min(...i.map(c=>c.y)),l=Math.max(...i.map(c=>c.y));return new DOMRect(o,a,s-o,l-a)}function Fy(t,e){if(e.length===0)return t.data;const n=Pr(t,e);return n.children||(n.children=[]),n.children}function YR(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function By(t){var e,n;return((n=(e=XR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function XR(t){return Tn(t)?$o(t):t}function Ks(t){if(!t)return null;const e=[GR];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return Wy(n)}function Wy(t){if(!t)return null;const e=[qR,UR];for(const n of e){const r=n(t);if(r)return r}return I4(t)||mn(t)||Tn(t)?t:null}const GR=t=>{var e;const n=r=>r?A4(r)||k4(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},qR=t=>z4(t)&&qu(t.parentElement)?t.parentElement:null,UR=t=>{const e=t.parentElement;return Gu(e)?e:pl(t)?t:null};class Vy{constructor(){this.extensions=new Map}register(e,n,r){if(!(r!=null&&r.override)&&this.extensions.has(e))throw new Error(`Extension "${e}" already registered`);this.extensions.set(e,n)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return this.extensions}forEach(e){this.extensions.forEach((n,r)=>{e(n,r)})}[Symbol.iterator](){return this.extensions.entries()}unregister(e){return this.extensions.delete(e)}destroy(){this.extensions.forEach(e=>{e&&typeof e.dispose=="function"&&e.dispose()}),this.extensions.clear()}}const ZR=t=>{if(!t||!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return e==="input"||e==="textarea"||e==="select"},KR=t=>{const e=t.toLowerCase().split("+").map(r=>r.trim()).filter(Boolean),n={key:""};if(e.forEach(r=>{r==="shift"?n.shift=!0:r==="alt"||r==="option"?n.alt=!0:r==="ctrl"||r==="control"?n.ctrl=!0:r==="meta"||r==="cmd"||r==="command"?n.meta=!0:r==="mod"?n.mod=!0:n.key=r}),!n.key)throw new Error(`Invalid hotkey combo: "${t}"`);return n},QR=(t,e)=>{var n;if(t.key.toLowerCase()!==e.key)return!1;const i=(n=e.mod)!=null?n:!1,o=t.metaKey,s=t.ctrlKey,a=o||s,l=(c,h)=>c===void 0?!h:c===h;return i&&!a?!1:i?!(!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey)||e.meta!==void 0&&!l(e.meta,o)||e.ctrl!==void 0&&!l(e.ctrl,s)):!(!l(e.meta,o)||!l(e.ctrl,s)||!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey))};class JR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!ZR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>QR(i,s))){o.handler(i);break}}};const{target:n=document,filter:r}=e;this.target=n,this.filter=r,this.target.addEventListener("keydown",this.handleKeydown)}bind(e,n){const i={combos:(Array.isArray(e)?e:[e]).map(o=>KR(o)),handler:n};return this.bindings.push(i),()=>this.unbind(i)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(e){this.bindings=this.bindings.filter(n=>n!==e)}}var tH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class Yy extends Rn{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{this.interaction.isActive()&&e.button===0&&(this.isTextSelectionTarget(e.target)||this.hasElementAtStart(e.target)||this.interaction.executeExclusiveInteraction(this,()=>tH(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=ur(r,e.clientX,e.clientY),this.pointerId=e.pointerId,this.shiftKey=e.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})})))},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,r)}e.preventDefault(),e.stopPropagation(),this.updateBrush(this.startPoint,r)},this.handleEnd=e=>{var n,r;if(e.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let i=null;if(this.dragging){e.preventDefault(),e.stopPropagation();const l=this.editor.getDocument(),c=ur(l,e.clientX,e.clientY);i=this.updateBrush(this.startPoint,c),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const o=this.shiftKey;if(this.shiftKey=!1,!i){(n=this.completeInteraction)==null||n.call(this),this.completeInteraction=void 0;return}const s=this.collectSelection(i);if((r=this.completeInteraction)==null||r.call(this),this.completeInteraction=void 0,s.length===0){o||this.interaction.clearSelection();return}const a=o?"add":"replace";this.interaction.select(s,a)}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.clearBrush(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart),window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd)}ensureBrush(){return this.brush?this.brush:(this.brush=this.interaction.appendTransientElement(wt("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"})),this.brush)}updateBrush(e,n){if(!this.brush)return null;const r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),o=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y);return Yt(this.brush,{x:r,y:i,width:o,height:s}),{x:r,y:i,width:o,height:s}}clearBrush(){var e;(e=this.brush)==null||e.remove(),this.brush=void 0}collectSelection(e){const n=this.editor.getDocument(),r=Array.from(n.querySelectorAll("[data-element-type]")),i=(s,a)=>{const l=s.x+s.width,c=s.y+s.height,h=a.x+a.width,u=a.y+a.height;return!(l<a.x||h<s.x||c<a.y||u<s.y)},o=new Set;return r.reduce((s,a)=>{const l=Wy(a);if(!l||o.has(l))return s;const c=cn(n,l),h={x:c.x,y:c.y,width:c.width,height:c.height};return i(e,h)&&(s.push(l),o.add(l)),s},[])}hasElementAtStart(e){var n;return e instanceof Element?Ks(e)?!0:!!((n=e.closest)!=null&&n.call(e,"[data-element-type]")):!1}isTextSelectionTarget(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName.toLowerCase();return n==="input"||n==="textarea"}}var eH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class Xy extends Rn{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=e=>{e.key==="Shift"&&(this.shiftKey=!0)},this.onShiftKeyUp=e=>{e.key==="Shift"&&(this.shiftKey=!1)},this.onEscKeyDown=e=>{e.key==="Escape"&&this.interaction.clearSelection()}}init(e){super.init(e);const{editor:n,interaction:r}=this;this.clickHandler=new jy(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>eH(this,null,function*(){const s=Ks(o.target);Uu(s)||(this.shiftKey?s&&(r.isSelected(s)?r.select([s],"remove"):r.select([s],"add")):s?r.select([s],"replace"):r.clearSelection())}))};this.clickHandler.onClick(i),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){var e;(e=this.clickHandler)==null||e.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}var Gy=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class nH{constructor(e){this.commands=e}apply(e){return Gy(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return Gy(this,null,function*(){for(let n=this.commands.length-1;n>=0;n--)yield this.commands[n].undo(e)})}serialize(){return{type:"batch",commands:this.commands.map(e=>e.serialize())}}}var rH=Object.defineProperty,iH=Object.defineProperties,oH=Object.getOwnPropertyDescriptors,qy=Object.getOwnPropertySymbols,sH=Object.prototype.hasOwnProperty,aH=Object.prototype.propertyIsEnumerable,Uy=(t,e,n)=>e in t?rH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fi=(t,e)=>{for(var n in e||(e={}))sH.call(e,n)&&Uy(t,n,e[n]);if(qy)for(var n of qy(e))aH.call(e,n)&&Uy(t,n,e[n]);return t},Zy=(t,e)=>iH(t,oH(e)),Ky=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class hn{constructor(e,n,r){this.element=e,this.modified=n;const i=lH(e,n);this.original=cH(i,r)}apply(e){return Ky(this,null,function*(){Qy(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return Ky(this,null,function*(){this.original&&(Qy(this.element,this.original),e.updateElement(this.element,this.original))})}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function Qy(t,e){mn(t)?Xu(t,e):Tn(t)?m5(t,void 0,e.attributes):e.attributes&&Yt(t,e.attributes)}function lH(t,e){const n=Object.keys(e.attributes||{}),r=ke(t,n,!1),i=s=>{s&&n.forEach(a=>{a in s&&(r[a]=s[a])})},o=Zy(Fi({},e),{attributes:r});if(mn(t)){const{attributes:s}=fl(t);i(s)}else if(Tn(t)){if(!$o(t))return;i(xl(t))}return o}function cH(t,e){if(!t)return e;if(!e)return t;const n=Fi(Fi({},t.attributes||{}),e.attributes||{});return Zy(Fi(Fi({},t),e),{attributes:Object.keys(n).length?n:void 0})}var hH=Object.defineProperty,Jy=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,uH=Object.prototype.propertyIsEnumerable,t3=(t,e,n)=>e in t?hH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,e3=(t,e)=>{for(var n in e||(e={}))dH.call(e,n)&&t3(t,n,e[n]);if(Jy)for(var n of Jy(e))uH.call(e,n)&&t3(t,n,e[n]);return t},n3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class fH{constructor(e,n){this.options=e,this.original=n}apply(e){return n3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(e3(e3({},n),this.options))})}undo(e){return n3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var r3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class pH{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:dl(e),this.modifiedText=n}apply(e){return r3(this,null,function*(){this.originalText!==this.modifiedText&&(ul(this.element,this.modifiedText),i3(e,this.element,this.modifiedText))})}undo(e){return r3(this,null,function*(){this.originalText!==this.modifiedText&&(ul(this.element,this.originalText),i3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function i3(t,e,n){const r=gl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=By(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var gH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class o3 extends Rn{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(e){super.init(e);const{editor:n,commander:r,interaction:i}=e;this.clickHandler=new jy(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>gH(this,null,function*(){const s=Ks(o.target);if(s&&mn(s)){i.select([s],"replace");const a=dl(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);yH(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new pH(s,l,a))}}))})}destroy(){var e,n;(e=this.clickHandler)==null||e.destroy(),(n=this.detachSelectionListener)==null||n.call(this)}listenSelectionChange(e){const n=({next:r})=>{var i;if(!r.includes(e)){(i=this.detachSelectionListener)==null||i.call(this),this.detachSelectionListener=void 0;const o=Zn(e);o&&o.blur()}};return this.emitter.on("selection:change",n),()=>this.emitter.off("selection:change",n)}}const mH="infographic-inline-text-editor-style",Qs="infographic-inline-text-editor";function yH(t,e){const n=Zn(t);n&&(bH(),new vH(n,e).start())}class vH{constructor(e,n){this.entity=e,this.options=n,this.handlePaste=r=>{r.clipboardData&&(r.preventDefault(),this.insertPlainText(r.clipboardData.getData("text/plain")))},this.handleKeydown=r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.insertPlainText(`
|
|
137
|
-
`))},this.handleInput=()=>{var r,i;this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onInput)==null||i.call(r,this.getText())},this.handleBlur=()=>{var r,i;this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(
|
|
138
|
-
.${
|
|
136
|
+
0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),Uy=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=80}=t,s=_h,a=$h,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=ce(i);if(h.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(jt,{children:qy}),u,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const p=et(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),g=et(d(q,{indexes:[0]})),y=[],m=[],x=[];let v=-1/0;const b=p.height+na+a;return h.forEach((w,_)=>{const $=[_],P=Tt(i,$),C=_%2===0,A=_*(s+o),E=C?0:p.height+na,S=`puck-gradient-middle-${_}`,R=`puck-gradient-bottom-${_}`;x.push(I(V,{x:A,y:E,id:`puck-${_}`,width:s,height:a,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[I(jt,{children:[I("linearGradient",{id:S,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:P||f}),d("stop",{offset:"1",stopColor:P||f,stopOpacity:"0.6"})]}),I("linearGradient",{id:R,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:"#F4F4FB"}),d("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),I(le,{width:_h,height:$h,children:[d(yt,{d:cR,fill:P||f}),d(yt,{d:hR,fill:`url(#${S})`}),d(yt,{d:dR,fill:`url(#${R})`}),d("rect",{fill:"transparent",y:$h,width:_h,height:20})]}),d("text",{x:65,y:40,width:50,height:50,fontSize:40,fontWeight:"bold",fill:"#FFFFFF",textAnchor:"middle",dominantBaseline:"middle",transform:"rotate(-15 65 40) scale(1, 0.8)",children:_+1})]}));const O=A+(s-p.width)/2,T=C?E+a+na:E-na-p.height;if(v=Math.max(v,T+p.height),m.push(d(n,{indexes:$,datum:w,data:r,x:O,y:T,positionH:"center"})),y.push(d(Xt,{indexes:$,x:O+p.width-g.width/2,y:T+p.height-g.height/2})),_===0&&y.push(d(q,{indexes:[0],x:A+s/2-g.width/2-(o+s)/2,y:E+a/2-g.height/2})),_<h.length-1){const L=(_+1)%2===0?0:b,D=A+s+o/2-g.width/2,k=(E+a/2+L+a/2)/2-g.height/2;y.push(d(q,{indexes:[_+1],x:D,y:k}))}else y.push(d(q,{indexes:[h.length],x:A+s+o/2-g.width/2,y:E+a/2-g.height/2}))}),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:qy}),u,I(V,{x:0,y:0,children:[d(V,{children:x}),d(St,{children:m}),d(Et,{children:y})]})]})};kt("sequence-zigzag-pucks-3d",{component:Uy,composites:["title","item"]});const uR=240,fR=130,pR=105,pr=12,gR=120,Zy=50,mR=.6,yR="M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z",Ky="M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z",Qy=70+pr/2,Jy=40+pr/2,t3=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),e3=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=uR,dy:a=fR,iconSize:l=30}=t,{title:c,desc:h,items:u=[]}=i,f=n?d(n,{title:c,desc:h}):null,p=ce(o);if(u.length===0)return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(jt,{children:t3}),f,d(V,{children:d(Et,{children:d(q,{indexes:[0],x:0,y:0})})})]});const g=et(d(r,{indexes:[0],data:i,datum:u[0]})),y=et(d(q,{indexes:[0]})),m=[],x=[],v=[],b=[],w=[];let _=0,$=0,P="",C=1/0,A=-1/0,E=1/0,S=1/0;const R=[];u.forEach((F,L)=>{const D=_,k=$;R.push({x:D,y:k}),C=Math.min(C,k);const N=D-Qy,j=k-Jy;E=Math.min(E,N),S=Math.min(S,j);const X=L%2===0;L<u.length-1&&(_+=s,$=X?$+a:$-a)});const O=Math.max(0,-E),T=Math.max(0,-S);if(_=0,$=0,u.forEach((F,L)=>{const D=[L],k=R[L],N=k.x+O,j=k.y+T,X=Tt(o,D),z=Math.max(0,N-Qy),M=Math.max(0,j-Jy),H=10,B=Zy+10,{colorPrimaryBg:U}=xe({colorPrimary:X});if(b.push(I(le,{x:z,y:M,width:140,height:110,children:[d(Wt,{x:H,y:B,width:gR,height:Zy,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:mR}),d(yt,{d:yR,fill:X||p}),d(yt,{d:Ky,fill:"#fff"}),d(yt,{d:Ky,fill:U||U})]})),F.icon){const Z=Math.max(0,N-l/2-pr/2),K=Math.max(0,j-l/2-pr/2);w.push(d(Ce,{x:Z,y:K,size:l,indexes:D,fill:X}))}const Y=N-g.width/2-pr/2,G=Math.max(0,j+pR-pr/2);if(A=Math.max(A,G+g.height),L===0?P=`M ${N} ${j}`:P+=` L ${N} ${j}`,x.push(d(r,{indexes:D,datum:F,data:i,x:Y,y:G})),m.push(d(Xt,{indexes:D,x:Math.max(0,Y+g.width-y.width/2),y:Math.max(0,G+g.height-y.height/2)})),L<u.length-1){const Z=R[L+1],K=Z.x+O,it=Z.y+T,Q=Math.max(0,N+(K-N)/2-y.width/2),at=Math.max(0,j+(it-j)/2-y.height/2);m.push(d(q,{indexes:[L+1],x:Q,y:at}))}else m.push(d(q,{indexes:[u.length],x:Math.max(0,Y+g.width+s/4),y:Math.max(0,G+g.height/2-y.height/2)}))}),P){const F=(((e=R[R.length-1])==null?void 0:e.x)||0)+O;v.push(d(yt,{d:P,stroke:"#f3f2f1",strokeWidth:pr,fill:"none",width:F,height:A-Math.min(C+T,0)}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:t3}),f,I(V,{x:0,y:0,children:[d(V,{children:[...v,...b,...w]}),d(St,{children:x}),d(Et,{children:m})]})]})};kt("sequence-zigzag-steps",{component:e3,composites:["title","item"]});class jn{init(e){Object.assign(this,e)}}class n3{constructor(e,n={}){this.clickTimer=null,this.singleClickCallback=null,this.doubleClickCallback=null,this.pointerId=null,this.startX=0,this.startY=0,this.skipClick=!1,this.dragged=!1,this.handlePointerDown=i=>{this.pointerId=i.pointerId,this.startX=i.clientX,this.startY=i.clientY,this.dragged=!1,this.skipClick=!1,window.addEventListener("pointermove",this.handlePointerMove,{passive:!0}),window.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),window.addEventListener("pointercancel",this.handlePointerUp,{passive:!0})},this.handlePointerMove=i=>{if(this.pointerId===null||i.pointerId!==this.pointerId)return;const o=i.clientX-this.startX,s=i.clientY-this.startY;Math.hypot(o,s)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=i=>{this.pointerId!==null&&i.pointerId===this.pointerId&&(this.pointerId=null,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp),this.dragged||(this.skipClick=!1),this.dragged=!1)};var r;this.element=e,this.delay=n.delay||300,this.dragThreshold=(r=n.dragThreshold)!=null?r:4,this.init()}init(){this.element.addEventListener("click",this.handleClick.bind(this)),this.element.addEventListener("dblclick",this.handleDoubleClick.bind(this)),this.element.addEventListener("pointerdown",this.handlePointerDown)}handleClick(e){if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{var n;(n=this.singleClickCallback)==null||n.call(this,e)},this.delay)}handleDoubleClick(e){var n;if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),(n=this.doubleClickCallback)==null||n.call(this,e)}onClick(e){return this.singleClickCallback=e,this}onDoubleClick(e){return this.doubleClickCallback=e,this}destroy(){this.clickTimer&&clearTimeout(this.clickTimer),this.element.removeEventListener("click",this.handleClick),this.element.removeEventListener("dblclick",this.handleDoubleClick),this.element.removeEventListener("pointerdown",this.handlePointerDown),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}function vR(t){return t.getScreenCTM()||new DOMMatrix}function xR(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function gr(t,e,n){return new DOMPoint(e,n).matrixTransform(xR(t))}function fn(t,e){const n=e.getBoundingClientRect(),i=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y+n.height}].map(c=>gr(t,c.x,c.y)),o=Math.min(...i.map(c=>c.x)),s=Math.max(...i.map(c=>c.x)),a=Math.min(...i.map(c=>c.y)),l=Math.max(...i.map(c=>c.y));return new DOMRect(o,a,s-o,l-a)}function r3(t,e){if(e.length===0)return t.data;const n=hi(t,e);return n.children||(n.children=[]),n.children}function bR(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function i3(t){var e,n;return((n=(e=wR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function wR(t){return zn(t)?So(t):t}function ra(t){if(!t)return null;const e=[_R];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return o3(n)}function o3(t){if(!t)return null;const e=[$R,PR];for(const n of e){const r=n(t);if(r)return r}return Z6(t)||xn(t)||zn(t)?t:null}const _R=t=>{var e;const n=r=>r?Q6(r)||J6(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},$R=t=>tw(t)&&nf(t.parentElement)?t.parentElement:null,PR=t=>{const e=t.parentElement;return ef(e)?e:xl(t)?t:null};class s3{constructor(){this.extensions=new Map}register(e,n,r){if(!(r!=null&&r.override)&&this.extensions.has(e))throw new Error(`Extension "${e}" already registered`);this.extensions.set(e,n)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return this.extensions}forEach(e){this.extensions.forEach((n,r)=>{e(n,r)})}[Symbol.iterator](){return this.extensions.entries()}unregister(e){return this.extensions.delete(e)}destroy(){this.extensions.forEach(e=>{e&&typeof e.dispose=="function"&&e.dispose()}),this.extensions.clear()}}const CR=t=>{if(!t||!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return e==="input"||e==="textarea"||e==="select"},OR=t=>{const e=t.toLowerCase().split("+").map(r=>r.trim()).filter(Boolean),n={key:""};if(e.forEach(r=>{r==="shift"?n.shift=!0:r==="alt"||r==="option"?n.alt=!0:r==="ctrl"||r==="control"?n.ctrl=!0:r==="meta"||r==="cmd"||r==="command"?n.meta=!0:r==="mod"?n.mod=!0:n.key=r}),!n.key)throw new Error(`Invalid hotkey combo: "${t}"`);return n},MR=(t,e)=>{var n;if(t.key.toLowerCase()!==e.key)return!1;const i=(n=e.mod)!=null?n:!1,o=t.metaKey,s=t.ctrlKey,a=o||s,l=(c,h)=>c===void 0?!h:c===h;return i&&!a?!1:i?!(!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey)||e.meta!==void 0&&!l(e.meta,o)||e.ctrl!==void 0&&!l(e.ctrl,s)):!(!l(e.meta,o)||!l(e.ctrl,s)||!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey))};class SR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!CR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>MR(i,s))){o.handler(i);break}}};const{target:n=document,filter:r}=e;this.target=n,this.filter=r,this.target.addEventListener("keydown",this.handleKeydown)}bind(e,n){const i={combos:(Array.isArray(e)?e:[e]).map(o=>OR(o)),handler:n};return this.bindings.push(i),()=>this.unbind(i)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(e){this.bindings=this.bindings.filter(n=>n!==e)}}var ER=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class a3 extends jn{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{this.interaction.isActive()&&e.button===0&&(this.isTextSelectionTarget(e.target)||this.hasElementAtStart(e.target)||this.interaction.executeExclusiveInteraction(this,()=>ER(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=gr(r,e.clientX,e.clientY),this.pointerId=e.pointerId,this.shiftKey=e.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})})))},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=gr(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,r)}e.preventDefault(),e.stopPropagation(),this.updateBrush(this.startPoint,r)},this.handleEnd=e=>{var n,r;if(e.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let i=null;if(this.dragging){e.preventDefault(),e.stopPropagation();const l=this.editor.getDocument(),c=gr(l,e.clientX,e.clientY);i=this.updateBrush(this.startPoint,c),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const o=this.shiftKey;if(this.shiftKey=!1,!i){(n=this.completeInteraction)==null||n.call(this),this.completeInteraction=void 0;return}const s=this.collectSelection(i);if((r=this.completeInteraction)==null||r.call(this),this.completeInteraction=void 0,s.length===0){o||this.interaction.clearSelection();return}const a=o?"add":"replace";this.interaction.select(s,a)}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.clearBrush(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart),window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd)}ensureBrush(){return this.brush?this.brush:(this.brush=this.interaction.appendTransientElement($t("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"})),this.brush)}updateBrush(e,n){if(!this.brush)return null;const r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),o=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y);return Qt(this.brush,{x:r,y:i,width:o,height:s}),{x:r,y:i,width:o,height:s}}clearBrush(){var e;(e=this.brush)==null||e.remove(),this.brush=void 0}collectSelection(e){const n=this.editor.getDocument(),r=Array.from(n.querySelectorAll("[data-element-type]")),i=(s,a)=>{const l=s.x+s.width,c=s.y+s.height,h=a.x+a.width,u=a.y+a.height;return!(l<a.x||h<s.x||c<a.y||u<s.y)},o=new Set;return r.reduce((s,a)=>{const l=o3(a);if(!l||o.has(l))return s;const c=fn(n,l),h={x:c.x,y:c.y,width:c.width,height:c.height};return i(e,h)&&(s.push(l),o.add(l)),s},[])}hasElementAtStart(e){var n;return e instanceof Element?ra(e)?!0:!!((n=e.closest)!=null&&n.call(e,"[data-element-type]")):!1}isTextSelectionTarget(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName.toLowerCase();return n==="input"||n==="textarea"}}var IR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class l3 extends jn{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=e=>{e.key==="Shift"&&(this.shiftKey=!0)},this.onShiftKeyUp=e=>{e.key==="Shift"&&(this.shiftKey=!1)},this.onEscKeyDown=e=>{e.key==="Escape"&&this.interaction.clearSelection()}}init(e){super.init(e);const{editor:n,interaction:r}=this;this.clickHandler=new n3(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>IR(this,null,function*(){const s=ra(o.target);rf(s)||(this.shiftKey?s&&(r.isSelected(s)?r.select([s],"remove"):r.select([s],"add")):s?r.select([s],"replace"):r.clearSelection())}))};this.clickHandler.onClick(i),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){var e;(e=this.clickHandler)==null||e.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}var c3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class TR{constructor(e){this.commands=e}apply(e){return c3(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return c3(this,null,function*(){for(let n=this.commands.length-1;n>=0;n--)yield this.commands[n].undo(e)})}serialize(){return{type:"batch",commands:this.commands.map(e=>e.serialize())}}}var AR=Object.defineProperty,kR=Object.defineProperties,LR=Object.getOwnPropertyDescriptors,h3=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,HR=Object.prototype.propertyIsEnumerable,d3=(t,e,n)=>e in t?AR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gi=(t,e)=>{for(var n in e||(e={}))zR.call(e,n)&&d3(t,n,e[n]);if(h3)for(var n of h3(e))HR.call(e,n)&&d3(t,n,e[n]);return t},u3=(t,e)=>kR(t,LR(e)),f3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class pn{constructor(e,n,r){this.element=e,this.modified=n;const i=RR(e,n);this.original=DR(i,r)}apply(e){return f3(this,null,function*(){p3(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return f3(this,null,function*(){this.original&&(p3(this.element,this.original),e.updateElement(this.element,this.original))})}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function p3(t,e){xn(t)?tf(t,e):zn(t)?Hw(t,void 0,e.attributes):e.attributes&&Qt(t,e.attributes)}function RR(t,e){const n=Object.keys(e.attributes||{}),r=Re(t,n,!1),i=s=>{s&&n.forEach(a=>{a in s&&(r[a]=s[a])})},o=u3(Gi({},e),{attributes:r});if(xn(t)){const{attributes:s}=vl(t);i(s)}else if(zn(t)){if(!So(t))return;i(Ol(t))}return o}function DR(t,e){if(!t)return e;if(!e)return t;const n=Gi(Gi({},t.attributes||{}),e.attributes||{});return u3(Gi(Gi({},t),e),{attributes:Object.keys(n).length?n:void 0})}var NR=Object.defineProperty,g3=Object.getOwnPropertySymbols,jR=Object.prototype.hasOwnProperty,WR=Object.prototype.propertyIsEnumerable,m3=(t,e,n)=>e in t?NR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y3=(t,e)=>{for(var n in e||(e={}))jR.call(e,n)&&m3(t,n,e[n]);if(g3)for(var n of g3(e))WR.call(e,n)&&m3(t,n,e[n]);return t},v3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class FR{constructor(e,n){this.options=e,this.original=n}apply(e){return v3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(y3(y3({},n),this.options))})}undo(e){return v3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var x3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class BR{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:ml(e),this.modifiedText=n}apply(e){return x3(this,null,function*(){this.originalText!==this.modifiedText&&(yl(this.element,this.modifiedText),b3(e,this.element,this.modifiedText))})}undo(e){return x3(this,null,function*(){this.originalText!==this.modifiedText&&(yl(this.element,this.originalText),b3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function b3(t,e,n){const r=bl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=i3(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var VR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class w3 extends jn{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(e){super.init(e);const{editor:n,commander:r,interaction:i}=e;this.clickHandler=new n3(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>VR(this,null,function*(){const s=ra(o.target);if(s&&xn(s)){i.select([s],"replace");const a=ml(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);XR(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new BR(s,l,a))}}))})}destroy(){var e,n;(e=this.clickHandler)==null||e.destroy(),(n=this.detachSelectionListener)==null||n.call(this)}listenSelectionChange(e){const n=({next:r})=>{var i;if(!r.includes(e)){(i=this.detachSelectionListener)==null||i.call(this),this.detachSelectionListener=void 0;const o=Jn(e);o&&o.blur()}};return this.emitter.on("selection:change",n),()=>this.emitter.off("selection:change",n)}}const YR="infographic-inline-text-editor-style",ia="infographic-inline-text-editor";function XR(t,e){const n=Jn(t);n&&(qR(),new GR(n,e).start())}class GR{constructor(e,n){this.entity=e,this.options=n,this.handlePaste=r=>{r.clipboardData&&(r.preventDefault(),this.insertPlainText(r.clipboardData.getData("text/plain")))},this.handleKeydown=r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.insertPlainText(`
|
|
137
|
+
`))},this.handleInput=()=>{var r,i;this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onInput)==null||i.call(r,this.getText())},this.handleBlur=()=>{var r,i;this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(ia),this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onBlur)==null||i.call(r,this.getText()),this.detachListeners()}}start(){this.entity.setAttribute("contenteditable","true"),this.entity.classList.add(ia),this.entity.focus(),this.placeCaretAtClickPosition(),this.attachListeners()}attachListeners(){this.entity.addEventListener("paste",this.handlePaste),this.entity.addEventListener("keydown",this.handleKeydown),this.entity.addEventListener("input",this.handleInput),this.entity.addEventListener("blur",this.handleBlur,{once:!0})}detachListeners(){this.entity.removeEventListener("paste",this.handlePaste),this.entity.removeEventListener("keydown",this.handleKeydown),this.entity.removeEventListener("input",this.handleInput)}insertPlainText(e){var n,r;const i=window.getSelection();if(!i)return;i.rangeCount||this.placeCaretAtEnd();const o=i.rangeCount?i.getRangeAt(0):document.createRange();o.deleteContents();const s=document.createTextNode(e);o.insertNode(s),o.setStartAfter(s),o.setEndAfter(s),i.removeAllRanges(),i.addRange(o),this.normalizeSpanContent(),(r=(n=this.options)==null?void 0:n.onInput)==null||r.call(n,this.getText())}normalizeSpanContent(){var e;if(this.entity.childNodes.length===1&&((e=this.entity.firstChild)==null?void 0:e.nodeType)===Node.TEXT_NODE)return;const n=this.getText();this.entity.textContent=n}placeCaretAtClickPosition(){const e=window.getSelection();if(!e)return;const n=this.getRangeFromPoint();if(n){e.removeAllRanges(),e.addRange(n);return}this.placeCaretAtEnd()}getRangeFromPoint(){var e,n;const{cursorPosition:r}=this.options||{};if(!r)return null;const{clientX:i,clientY:o}=r,s=document,a=(n=(e=s.caretRangeFromPoint)==null?void 0:e.call(s,i,o))!=null?n:(()=>{var l;const c=(l=s.caretPositionFromPoint)==null?void 0:l.call(s,i,o);if(!c)return null;const h=document.createRange();return h.setStart(c.offsetNode,c.offset),h.collapse(!0),h})();return!a||!this.entity.contains(a.startContainer)?null:a}placeCaretAtEnd(){const e=window.getSelection();if(!e)return;const n=document.createRange();n.selectNodeContents(this.entity),n.collapse(!1),e.removeAllRanges(),e.addRange(n)}getText(){return this.entity.textContent||""}}function qR(){ln(YR,`
|
|
138
|
+
.${ia} {
|
|
139
139
|
margin: 0;
|
|
140
140
|
padding: 0;
|
|
141
141
|
box-sizing: border-box;
|
|
@@ -143,11 +143,11 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
143
143
|
outline: none;
|
|
144
144
|
cursor: text;
|
|
145
145
|
}
|
|
146
|
-
.${
|
|
146
|
+
.${ia}::selection {
|
|
147
147
|
background-color: #b3d4fc;
|
|
148
148
|
}
|
|
149
|
-
`)}var xH=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class s3 extends Rn{constructor(){super(...arguments),this.name="drag-element",this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragItems=[],this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{if(!this.interaction.isActive()||e.pointerType==="mouse"&&e.button!==0)return;const n=Ks(e.target);if(!n||Uu(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=ur(r,e.clientX,e.clientY),this.dragging=!1,this.startTarget=n;const i=this.interaction.isSelected(n);this.selectionForDrag=i?this.interaction.getSelection():[n],this.willReplaceSelection=!i,this.exclusiveStarted=!1,this.startBounds=this.getSelectionBounds(this.selectionForDrag),this.guideCandidates=this.collectGuideCandidates(this.selectionForDrag),window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd),window.addEventListener("pointercancel",this.handleEnd)},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;if(!this.startDrag()){this.reset();return}this.dragging=!0}const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);e.preventDefault(),e.stopPropagation(),this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.emitGeometryChange()},this.handleEnd=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const n=this.editor.getDocument(),r=ur(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if((this.dragging||Math.hypot(i,o)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){e.preventDefault(),e.stopPropagation();const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.commitTranslation(a.dx,a.dy),this.emitGeometryChange()}this.reset()}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.detachPointerListeners(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart)}startDrag(){if(this.exclusiveStarted)return!0;if(!this.startTarget||(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(n=>mn(n)).map(n=>this.createDragItem(n)).filter(Boolean),this.dragItems.length===0))return!1;let e=!1;return this.interaction.executeExclusiveInteraction(this,()=>xH(this,null,function*(){return new Promise(n=>{this.completeInteraction=n,e=!0})})),this.exclusiveStarted=e,e}applyTranslation(e,n){this.dragItems.forEach(r=>{if(r.mode==="attr"){const i=r.startX+e,o=r.startY+n,s={x:i,y:o};r.hasDataX&&(s["data-x"]=i),r.hasDataY&&(s["data-y"]=o),Yt(r.element,s)}else{const i=this.composeTransform(r.startX+e,r.startY+n,r.restTransform);Yt(r.element,{transform:i})}})}commitTranslation(e,n){if(Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return;const r=this.dragItems.map(i=>{if(i.mode==="attr"){const a=i.startX+e,l=i.startY+n,c={x:a,y:l},h={};return i.hasX?h.x=i.startX:h.x=null,i.hasY?h.y=i.startY:h.y=null,i.hasDataX&&(c["data-x"]=a,h["data-x"]=i.startX),i.hasDataY&&(c["data-y"]=l,h["data-y"]=i.startY),new hn(i.element,{attributes:c},{attributes:h})}const o=this.composeTransform(i.startX+e,i.startY+n,i.restTransform),s=i.originalTransform!==void 0?i.originalTransform:null;return new hn(i.element,{attributes:{transform:o}},{attributes:{transform:s}})});r.length&&this.commander.executeBatch(r)}createDragItem(e){const n=this.getTransformInfo(e);if(n)return{element:e,mode:"transform",startX:n.x,startY:n.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:n.rest,originalTransform:n.original};const{x:r,y:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}=this.getAttrInfo(e);return{element:e,mode:"attr",startX:r,startY:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}}getAttrInfo(e){const n=this.editor.getDocument(),{x:r,y:i}=cn(n,e),o=ke(e,["x","y","data-x","data-y"],!1),s=o.x!==null&&o.x!==void 0,a=o.y!==null&&o.y!==void 0,l=o["data-x"]!==null&&o["data-x"]!==void 0,c=o["data-y"]!==null&&o["data-y"]!==void 0,h=(b,v)=>{const x=b!=null?Number(b):NaN;return Number.isFinite(x)?x:v},u=h(o.x,NaN),f=h(o.y,NaN),p=h(o["data-x"],NaN),g=h(o["data-y"],NaN),y=Number.isFinite(u)?u:Number.isFinite(p)?p:r,m=Number.isFinite(f)?f:Number.isFinite(g)?g:i;return{x:y,y:m,hasX:s,hasY:a,hasDataX:l,hasDataY:c}}getTransformInfo(e){const n=e.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:n,original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=n.replace(r[0],"").trim();return{x:i,y:o,rest:s,original:n}}composeTransform(e,n,r){const i=`translate(${e}, ${n})`;return r&&r.length?`${i} ${r}`:i}emitGeometryChange(){var e;const n=(e=this.dragItems[0])==null?void 0:e.element;if(!n)return;const r=cn(this.editor.getDocument(),n);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:n,rect:r})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){var e;this.detachPointerListeners(),this.clearGuides(),this.pointerId=void 0,this.startPoint=void 0,this.dragItems=[],this.startTarget=void 0,this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragging=!1,this.startBounds=void 0,this.guideCandidates=void 0,(e=this.completeInteraction)==null||e.call(this),this.completeInteraction=void 0}getSelectionBounds(e){if(!e.length)return;const n=this.editor.getDocument(),r=e.map(i=>cn(n,i));return kr(r)}collectGuideCandidates(e){const n=this.editor.getDocument(),r=new Set(e),i=Array.from(n.querySelectorAll("[data-element-type]")).filter(a=>!r.has(a)),o=[],s=[];return i.forEach(a=>{const{x:l,y:c,width:h,height:u}=cn(n,a);o.push(l,l+h/2,l+h),s.push(c,c+u/2,c+u)}),{vertical:o,horizontal:s}}getSnappedDelta(e,n){if(!this.startBounds||!this.guideCandidates)return{dx:e,dy:n};const r={x:this.startBounds.x+e,y:this.startBounds.y+n,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([r.x,r.x+r.width/2,r.x+r.width],this.guideCandidates.vertical),o=this.getSnapOffset([r.y,r.y+r.height/2,r.y+r.height],this.guideCandidates.horizontal);return{dx:e+((i==null?void 0:i.offset)||0),dy:n+((o==null?void 0:o.offset)||0),snapX:i,snapY:o}}getSnapOffset(e,n,r=5){let i=null;return e.forEach(o=>{n.forEach(s=>{const a=s-o;Math.abs(a)<=r&&(!i||Math.abs(a)<Math.abs(i.offset))&&(i={offset:a,at:s})})}),i||void 0}ensureGuideLine(e){const n=e==="vertical"?this.guideVertical:this.guideHorizontal;if(n)return n;const r=this.interaction.appendTransientElement(wt("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return e==="vertical"?this.guideVertical=r:this.guideHorizontal=r,r}updateGuides(e){const n=this.editor.getDocument(),{width:r,height:i}=n.viewBox.baseVal;if(e.snapX){const o=this.ensureGuideLine("vertical");Yt(o,{x1:e.snapX.at,y1:0,x2:e.snapX.at,y2:i,visibility:"visible"})}else this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden");if(e.snapY){const o=this.ensureGuideLine("horizontal");Yt(o,{x1:0,y1:e.snapY.at,x2:r,y2:e.snapY.at,visibility:"visible"})}else this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){var e,n;(e=this.guideVertical)==null||e.remove(),(n=this.guideHorizontal)==null||n.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}var a3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class l3 extends Rn{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=e=>a3(this,null,function*(){e.preventDefault(),yield this.commander.undo()}),this.handleRedo=e=>a3(this,null,function*(){e.preventDefault(),yield this.commander.redo()})}init(e){super.init(e),this.hotkey=new JR({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){var e;(e=this.hotkey)==null||e.destroy()}}var wH=Object.defineProperty,_H=Object.defineProperties,$H=Object.getOwnPropertyDescriptors,c3=Object.getOwnPropertySymbols,PH=Object.prototype.hasOwnProperty,OH=Object.prototype.propertyIsEnumerable,h3=(t,e,n)=>e in t?wH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CH=(t,e)=>{for(var n in e||(e={}))PH.call(e,n)&&h3(t,n,e[n]);if(c3)for(var n of c3(e))OH.call(e,n)&&h3(t,n,e[n]);return t},MH=(t,e)=>_H(t,$H(e));class d3 extends Rn{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:e})=>{this.highlightSelection(e)},this.handleGeometryChanged=({target:e})=>{this.interaction.isSelected(e)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChanged),e.off("selection:geometrychange",this.handleGeometryChanged),e.off("history:change",this.handleHistoryChanged)}highlightSelection(e){if(e.length===1&&mn(e[0])){this.clearMasks();return}this.drawElementMasks(e),this.drawCombinedBoundsMask(e)}drawElementMasks(e){let n=0;for(;n<e.length;n++){const{x:r,y:i,width:o,height:s}=cn(this.editor.getDocument(),e[n]),a={x:r,y:i,width:o,height:s,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},l=this.highlightMasks[n];l?Yt(l,a):this.highlightMasks[n]=this.interaction.appendTransientElement(wt("rect",a))}for(;n<this.highlightMasks.length;n++)this.highlightMasks[n].remove();this.highlightMasks=this.highlightMasks.slice(0,e.length)}drawCombinedBoundsMask(e){var n;if(e.length<2){(n=this.combinedBoundsMask)==null||n.remove(),this.combinedBoundsMask=void 0;return}const r=kr(e.map(o=>cn(this.editor.getDocument(),o))),i=MH(CH({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?Yt(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement(wt("rect",i))}clearMasks(){var e;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(e=this.combinedBoundsMask)==null||e.remove(),this.combinedBoundsMask=void 0}}const u3=1,SH=-5e3,EH=5e3;class f3 extends Rn{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=e=>{var n;if(!this.interaction.isActive()||!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const r=e.deltaY>0?1.1:.9,o=(n=this.state.getOptions().padding)!=null?n:0,s=tr(o),l=this.editor.getDocument().getBBox(),c=s.map(b=>N9((b===0?1:b)*r,SH,EH)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=u3||y<=u3)return;const m=new fH({padding:c});this.commander.execute(m)}}init(e){super.init(e),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}class gh{init(e){Object.assign(this,e)}}const fr=({icon:t,onClick:e,activate:n=!1})=>{TH();const r=document.createElement("button");r.type="button",r.classList.add(Bi),n&&r.setAttribute("data-activate","true"),e&&r.addEventListener("click",e);const i=t();return r.appendChild(i),Object.assign(r,{setActivate:(s=>{s?r.setAttribute("data-activate","true"):r.removeAttribute("data-activate")}).bind(r),activate:n})},Bi="infographic-edit-bar-icon-btn",IH="infographic-edit-bar-icon-btn-style";function TH(){rn(IH,`
|
|
150
|
-
.${
|
|
149
|
+
`)}var UR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class _3 extends jn{constructor(){super(...arguments),this.name="drag-element",this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragItems=[],this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{if(!this.interaction.isActive()||e.pointerType==="mouse"&&e.button!==0)return;const n=ra(e.target);if(!n||rf(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=gr(r,e.clientX,e.clientY),this.dragging=!1,this.startTarget=n;const i=this.interaction.isSelected(n);this.selectionForDrag=i?this.interaction.getSelection():[n],this.willReplaceSelection=!i,this.exclusiveStarted=!1,this.startBounds=this.getSelectionBounds(this.selectionForDrag),this.guideCandidates=this.collectGuideCandidates(this.selectionForDrag),window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd),window.addEventListener("pointercancel",this.handleEnd)},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=gr(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;if(!this.startDrag()){this.reset();return}this.dragging=!0}const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);e.preventDefault(),e.stopPropagation(),this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.emitGeometryChange()},this.handleEnd=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const n=this.editor.getDocument(),r=gr(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if((this.dragging||Math.hypot(i,o)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){e.preventDefault(),e.stopPropagation();const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.commitTranslation(a.dx,a.dy),this.emitGeometryChange()}this.reset()}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.detachPointerListeners(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart)}startDrag(){if(this.exclusiveStarted)return!0;if(!this.startTarget||(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(n=>xn(n)).map(n=>this.createDragItem(n)).filter(Boolean),this.dragItems.length===0))return!1;let e=!1;return this.interaction.executeExclusiveInteraction(this,()=>UR(this,null,function*(){return new Promise(n=>{this.completeInteraction=n,e=!0})})),this.exclusiveStarted=e,e}applyTranslation(e,n){this.dragItems.forEach(r=>{if(r.mode==="attr"){const i=r.startX+e,o=r.startY+n,s={x:i,y:o};r.hasDataX&&(s["data-x"]=i),r.hasDataY&&(s["data-y"]=o),Qt(r.element,s)}else{const i=this.composeTransform(r.startX+e,r.startY+n,r.restTransform);Qt(r.element,{transform:i})}})}commitTranslation(e,n){if(Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return;const r=this.dragItems.map(i=>{if(i.mode==="attr"){const a=i.startX+e,l=i.startY+n,c={x:a,y:l},h={};return i.hasX?h.x=i.startX:h.x=null,i.hasY?h.y=i.startY:h.y=null,i.hasDataX&&(c["data-x"]=a,h["data-x"]=i.startX),i.hasDataY&&(c["data-y"]=l,h["data-y"]=i.startY),new pn(i.element,{attributes:c},{attributes:h})}const o=this.composeTransform(i.startX+e,i.startY+n,i.restTransform),s=i.originalTransform!==void 0?i.originalTransform:null;return new pn(i.element,{attributes:{transform:o}},{attributes:{transform:s}})});r.length&&this.commander.executeBatch(r)}createDragItem(e){const n=this.getTransformInfo(e);if(n)return{element:e,mode:"transform",startX:n.x,startY:n.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:n.rest,originalTransform:n.original};const{x:r,y:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}=this.getAttrInfo(e);return{element:e,mode:"attr",startX:r,startY:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}}getAttrInfo(e){const n=this.editor.getDocument(),{x:r,y:i}=fn(n,e),o=Re(e,["x","y","data-x","data-y"],!1),s=o.x!==null&&o.x!==void 0,a=o.y!==null&&o.y!==void 0,l=o["data-x"]!==null&&o["data-x"]!==void 0,c=o["data-y"]!==null&&o["data-y"]!==void 0,h=(x,v)=>{const b=x!=null?Number(x):NaN;return Number.isFinite(b)?b:v},u=h(o.x,NaN),f=h(o.y,NaN),p=h(o["data-x"],NaN),g=h(o["data-y"],NaN),y=Number.isFinite(u)?u:Number.isFinite(p)?p:r,m=Number.isFinite(f)?f:Number.isFinite(g)?g:i;return{x:y,y:m,hasX:s,hasY:a,hasDataX:l,hasDataY:c}}getTransformInfo(e){const n=e.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:n,original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=n.replace(r[0],"").trim();return{x:i,y:o,rest:s,original:n}}composeTransform(e,n,r){const i=`translate(${e}, ${n})`;return r&&r.length?`${i} ${r}`:i}emitGeometryChange(){var e;const n=(e=this.dragItems[0])==null?void 0:e.element;if(!n)return;const r=fn(this.editor.getDocument(),n);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:n,rect:r})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){var e;this.detachPointerListeners(),this.clearGuides(),this.pointerId=void 0,this.startPoint=void 0,this.dragItems=[],this.startTarget=void 0,this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragging=!1,this.startBounds=void 0,this.guideCandidates=void 0,(e=this.completeInteraction)==null||e.call(this),this.completeInteraction=void 0}getSelectionBounds(e){if(!e.length)return;const n=this.editor.getDocument(),r=e.map(i=>fn(n,i));return zr(r)}collectGuideCandidates(e){const n=this.editor.getDocument(),r=new Set(e),i=Array.from(n.querySelectorAll("[data-element-type]")).filter(a=>!r.has(a)),o=[],s=[];return i.forEach(a=>{const{x:l,y:c,width:h,height:u}=fn(n,a);o.push(l,l+h/2,l+h),s.push(c,c+u/2,c+u)}),{vertical:o,horizontal:s}}getSnappedDelta(e,n){if(!this.startBounds||!this.guideCandidates)return{dx:e,dy:n};const r={x:this.startBounds.x+e,y:this.startBounds.y+n,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([r.x,r.x+r.width/2,r.x+r.width],this.guideCandidates.vertical),o=this.getSnapOffset([r.y,r.y+r.height/2,r.y+r.height],this.guideCandidates.horizontal);return{dx:e+((i==null?void 0:i.offset)||0),dy:n+((o==null?void 0:o.offset)||0),snapX:i,snapY:o}}getSnapOffset(e,n,r=5){let i=null;return e.forEach(o=>{n.forEach(s=>{const a=s-o;Math.abs(a)<=r&&(!i||Math.abs(a)<Math.abs(i.offset))&&(i={offset:a,at:s})})}),i||void 0}ensureGuideLine(e){const n=e==="vertical"?this.guideVertical:this.guideHorizontal;if(n)return n;const r=this.interaction.appendTransientElement($t("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return e==="vertical"?this.guideVertical=r:this.guideHorizontal=r,r}updateGuides(e){const n=this.editor.getDocument(),{width:r,height:i}=n.viewBox.baseVal;if(e.snapX){const o=this.ensureGuideLine("vertical");Qt(o,{x1:e.snapX.at,y1:0,x2:e.snapX.at,y2:i,visibility:"visible"})}else this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden");if(e.snapY){const o=this.ensureGuideLine("horizontal");Qt(o,{x1:0,y1:e.snapY.at,x2:r,y2:e.snapY.at,visibility:"visible"})}else this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){var e,n;(e=this.guideVertical)==null||e.remove(),(n=this.guideHorizontal)==null||n.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}var $3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class P3 extends jn{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=e=>$3(this,null,function*(){e.preventDefault(),yield this.commander.undo()}),this.handleRedo=e=>$3(this,null,function*(){e.preventDefault(),yield this.commander.redo()})}init(e){super.init(e),this.hotkey=new SR({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){var e;(e=this.hotkey)==null||e.destroy()}}var ZR=Object.defineProperty,KR=Object.defineProperties,QR=Object.getOwnPropertyDescriptors,C3=Object.getOwnPropertySymbols,JR=Object.prototype.hasOwnProperty,tD=Object.prototype.propertyIsEnumerable,O3=(t,e,n)=>e in t?ZR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eD=(t,e)=>{for(var n in e||(e={}))JR.call(e,n)&&O3(t,n,e[n]);if(C3)for(var n of C3(e))tD.call(e,n)&&O3(t,n,e[n]);return t},nD=(t,e)=>KR(t,QR(e));class M3 extends jn{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:e})=>{this.highlightSelection(e)},this.handleGeometryChanged=({target:e})=>{this.interaction.isSelected(e)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChanged),e.off("selection:geometrychange",this.handleGeometryChanged),e.off("history:change",this.handleHistoryChanged)}highlightSelection(e){if(e.length===1&&xn(e[0])){this.clearMasks();return}this.drawElementMasks(e),this.drawCombinedBoundsMask(e)}drawElementMasks(e){let n=0;for(;n<e.length;n++){const{x:r,y:i,width:o,height:s}=fn(this.editor.getDocument(),e[n]),a={x:r,y:i,width:o,height:s,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},l=this.highlightMasks[n];l?Qt(l,a):this.highlightMasks[n]=this.interaction.appendTransientElement($t("rect",a))}for(;n<this.highlightMasks.length;n++)this.highlightMasks[n].remove();this.highlightMasks=this.highlightMasks.slice(0,e.length)}drawCombinedBoundsMask(e){var n;if(e.length<2){(n=this.combinedBoundsMask)==null||n.remove(),this.combinedBoundsMask=void 0;return}const r=zr(e.map(o=>fn(this.editor.getDocument(),o))),i=nD(eD({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?Qt(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement($t("rect",i))}clearMasks(){var e;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(e=this.combinedBoundsMask)==null||e.remove(),this.combinedBoundsMask=void 0}}const S3=1,rD=-5e3,iD=5e3;class E3 extends jn{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=e=>{var n;if(!this.interaction.isActive()||!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const r=e.deltaY>0?1.1:.9,o=(n=this.state.getOptions().padding)!=null?n:0,s=rr(o),l=this.editor.getDocument().getBBox(),c=s.map(x=>a8((x===0?1:x)*r,rD,iD)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=S3||y<=S3)return;const m=new FR({padding:c});this.commander.execute(m)}}init(e){super.init(e),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}class Ph{init(e){Object.assign(this,e)}}const mr=({icon:t,onClick:e,activate:n=!1})=>{sD();const r=document.createElement("button");r.type="button",r.classList.add(qi),n&&r.setAttribute("data-activate","true"),e&&r.addEventListener("click",e);const i=t();return r.appendChild(i),Object.assign(r,{setActivate:(s=>{s?r.setAttribute("data-activate","true"):r.removeAttribute("data-activate")}).bind(r),activate:n})},qi="infographic-edit-bar-icon-btn",oD="infographic-edit-bar-icon-btn-style";function sD(){ln(oD,`
|
|
150
|
+
.${qi} {
|
|
151
151
|
padding: 0;
|
|
152
152
|
display: flex;
|
|
153
153
|
align-items: center;
|
|
@@ -162,28 +162,28 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
162
162
|
cursor: pointer;
|
|
163
163
|
transition: color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
|
|
164
164
|
}
|
|
165
|
-
.${
|
|
165
|
+
.${qi}:hover {
|
|
166
166
|
background-color: #f5f5f5;
|
|
167
167
|
}
|
|
168
|
-
.${
|
|
168
|
+
.${qi}:active {
|
|
169
169
|
background-color: #d9d9d9;
|
|
170
170
|
}
|
|
171
|
-
.${
|
|
171
|
+
.${qi}[data-activate="true"] {
|
|
172
172
|
background-color: #d9d9d9;
|
|
173
173
|
}
|
|
174
|
-
`)}const
|
|
175
|
-
.${
|
|
174
|
+
`)}const gn="infographic-color-picker",I3=`${gn}__swatches`,oa=`${gn}__swatch`,T3=`${gn}__controls`,sa=`${gn}__input`,A3=`${gn}__format`,yr=`${gn}__format-switch`,Ch=`${gn}__format-switch-knob`,aa=`${gn}__format-switch-label`,aD="infographic-color-picker-style",lD="#1f1f1f",cD=["#000000","#1f1f1f","#434343","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#ffffff","#1677ff","#2f54eb","#91caff","#13c2c2","#36cfc9","#52c41a","#73d13d","#fadb14","#ffd666","#fa8c16","#fa541c","#f5222d","#ff7875","#eb2f96","#ffadd2","#722ed1","#9254de","rgba(0, 0, 0, 0.65)","rgba(255, 255, 255, 0.85)"];function k3(t){var e,n,r;if(typeof document=="undefined")throw new Error("ColorPicker can only be used in the browser.");fD();const i=document.createElement("div");i.classList.add(gn);const o=document.createElement("div");o.classList.add(I3),i.appendChild(o);const s=document.createElement("div");s.classList.add(T3),i.appendChild(s);const a=document.createElement("input");a.type="text",a.spellcheck=!1,a.classList.add(sa),s.appendChild(a);const l=document.createElement("div");l.classList.add(A3),s.appendChild(l);const c=document.createElement("button");c.type="button",c.classList.add(yr),c.appendChild(R3("HEXA"));const h=document.createElement("span");h.classList.add(Ch),c.appendChild(h),c.appendChild(R3("RGBA")),l.appendChild(c);let u="hexa",f=(n=(e=Ui(t.value))!=null?e:Ui(lD))!=null?n:{r:31,g:31,b:31,a:1};const p=[];return((r=t.swatches)!=null&&r.length?t.swatches:cD).forEach($=>{const P=Ui($);if(!P)return;const C=document.createElement("button");C.type="button",C.classList.add(oa),C.style.setProperty("--swatch-color",la(P,"rgba")),C.dataset.colorKey=z3(P),C.addEventListener("click",()=>{v(P)}),o.appendChild(C),p.push(C)}),c.addEventListener("click",()=>x(u==="hexa"?"rgba":"hexa")),a.addEventListener("change",m),a.addEventListener("keydown",$=>{$.key==="Enter"&&m()}),b(),Object.assign(i,{setValue:$=>{const P=Ui($);if(!P){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v(P,!1)},destroy:()=>{i.remove()}});function m(){const $=Ui(a.value);if(!$){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v($)}function x($,P){var C;u!==$&&(u=$,b(),(C=t.onChange)==null||C.call(t,la(f,u)))}function v($,P=!0){var C;if(dD(f,$)){b();return}f=$,b(),P&&((C=t.onChange)==null||C.call(t,la(f,u)))}function b(){a.value=la(f,u),w(),_()}function w(){const $=z3(f);p.forEach(P=>{P.dataset.colorKey===$?P.setAttribute("data-active","true"):P.removeAttribute("data-active")})}function _(){u==="rgba"?c.setAttribute("data-format","rgba"):c.setAttribute("data-format","hexa")}}function Ui(t){var e;if(!t)return;const n=on(t);if(!n||typeof n.r!="number")return;const r=n;return{r:Oh(r.r),g:Oh(r.g),b:Oh(r.b),a:H3((e=r.alpha)!=null?e:1)}}function la(t,e){return e==="rgba"?hD(t):L3(t)}function L3(t){const e=ca(t.r),n=ca(t.g),r=ca(t.b),i=t.a<1?ca(Math.round(t.a*255)):"";return`#${e}${n}${r}${i}`}function hD(t){const e=uD(t.a);return`rgba(${t.r}, ${t.g}, ${t.b}, ${e})`}function z3(t){return L3(t).toLowerCase()}function dD(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function H3(t){return Number.isNaN(t)?0:Math.min(1,Math.max(0,t))}function Oh(t){if(Number.isNaN(t))return 0;const e=t<=1?t*255:t;return Math.round(Math.min(255,Math.max(0,e)))}function ca(t){return t.toString(16).padStart(2,"0")}function uD(t){const e=Math.round(H3(t)*100)/100;return e===1?"1":e===0?"0":e.toString()}function R3(t){const e=document.createElement("span");return e.textContent=t,e.classList.add(aa),e}function fD(){ln(aD,`
|
|
175
|
+
.${gn} {
|
|
176
176
|
width: 240px;
|
|
177
177
|
padding: 10px;
|
|
178
178
|
box-sizing: border-box;
|
|
179
179
|
}
|
|
180
|
-
.${
|
|
180
|
+
.${I3} {
|
|
181
181
|
display: grid;
|
|
182
182
|
grid-template-columns: repeat(auto-fit, 26px);
|
|
183
183
|
gap: 6px;
|
|
184
184
|
margin-bottom: 10px;
|
|
185
185
|
}
|
|
186
|
-
.${
|
|
186
|
+
.${oa} {
|
|
187
187
|
width: 24px;
|
|
188
188
|
height: 24px;
|
|
189
189
|
border-radius: 50%;
|
|
@@ -194,19 +194,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
194
194
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
195
195
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
196
196
|
}
|
|
197
|
-
.${
|
|
197
|
+
.${oa}[data-active="true"] {
|
|
198
198
|
box-shadow: 0 0 0 2px #1677ff;
|
|
199
199
|
transform: translateY(-1px);
|
|
200
200
|
}
|
|
201
|
-
.${
|
|
201
|
+
.${oa}:hover {
|
|
202
202
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
|
|
203
203
|
}
|
|
204
|
-
.${
|
|
204
|
+
.${T3} {
|
|
205
205
|
display: flex;
|
|
206
206
|
align-items: center;
|
|
207
207
|
gap: 6px;
|
|
208
208
|
}
|
|
209
|
-
.${
|
|
209
|
+
.${sa} {
|
|
210
210
|
flex: 1;
|
|
211
211
|
min-width: 0;
|
|
212
212
|
height: 30px;
|
|
@@ -222,19 +222,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
222
222
|
outline: none;
|
|
223
223
|
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
|
224
224
|
}
|
|
225
|
-
.${
|
|
225
|
+
.${sa}:focus {
|
|
226
226
|
border-color: #1677ff;
|
|
227
227
|
background: #ffffff;
|
|
228
228
|
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
|
|
229
229
|
}
|
|
230
|
-
.${
|
|
230
|
+
.${sa}[data-invalid="true"] {
|
|
231
231
|
border-color: #ff4d4f;
|
|
232
232
|
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.12);
|
|
233
233
|
}
|
|
234
|
-
.${
|
|
234
|
+
.${A3} {
|
|
235
235
|
display: inline-flex;
|
|
236
236
|
}
|
|
237
|
-
.${
|
|
237
|
+
.${yr} {
|
|
238
238
|
position: relative;
|
|
239
239
|
display: grid;
|
|
240
240
|
grid-template-columns: 1fr 1fr;
|
|
@@ -249,15 +249,15 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
249
249
|
overflow: hidden;
|
|
250
250
|
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
|
251
251
|
}
|
|
252
|
-
.${
|
|
252
|
+
.${yr}:hover {
|
|
253
253
|
background: #ededed;
|
|
254
254
|
}
|
|
255
|
-
.${
|
|
255
|
+
.${yr}:focus-visible {
|
|
256
256
|
outline: none;
|
|
257
257
|
border-color: #1677ff;
|
|
258
258
|
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
|
|
259
259
|
}
|
|
260
|
-
.${
|
|
260
|
+
.${Ch} {
|
|
261
261
|
position: absolute;
|
|
262
262
|
inset: 0;
|
|
263
263
|
width: 50%;
|
|
@@ -266,10 +266,10 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
266
266
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
267
267
|
transition: transform 0.2s ease;
|
|
268
268
|
}
|
|
269
|
-
.${
|
|
269
|
+
.${yr}[data-format="rgba"] .${Ch} {
|
|
270
270
|
transform: translateX(100%);
|
|
271
271
|
}
|
|
272
|
-
.${
|
|
272
|
+
.${aa} {
|
|
273
273
|
position: relative;
|
|
274
274
|
z-index: 1;
|
|
275
275
|
text-align: center;
|
|
@@ -277,19 +277,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
277
277
|
color: #434343;
|
|
278
278
|
user-select: none;
|
|
279
279
|
}
|
|
280
|
-
.${
|
|
281
|
-
.${
|
|
280
|
+
.${yr}[data-format="hexa"] .${aa}:first-child,
|
|
281
|
+
.${yr}[data-format="rgba"] .${aa}:last-child {
|
|
282
282
|
color: #ffffff;
|
|
283
283
|
}
|
|
284
|
-
`)}const
|
|
284
|
+
`)}const be=(t,{viewBox:e="0 0 1024 1024",size:n="1.5em"}={})=>({fill:r="currentColor"}={})=>{const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e}" width="${n}" height="${n}" fill="${r}">
|
|
285
285
|
${t.trim()}
|
|
286
|
-
</svg>`;return document.createRange().createContextualFragment(i).firstElementChild},
|
|
287
|
-
<path d="M661.333 272.411c17.673 0 32 14.327 32 32V902c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V304.411c0-17.673 14.327-32 32-32z m-32 63.999H394.666V870h234.667V336.41zM896 101.671c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z" />`),alignRight:
|
|
288
|
-
.${
|
|
286
|
+
</svg>`;return document.createRange().createContextualFragment(i).firstElementChild},Pn={fontFamily:be('<path d="M236.992 938.688H145.088L469.312 128h85.376l324.224 810.688h-91.904l-102.4-256H339.392l-102.4 256z m136.512-341.376h276.992L512 251.072l-138.496 346.24z"></path>',{size:"1.2em"}),fontSize:be('<path d="M479.829333 640H202.837333l-85.333333 213.333333H25.6L298.666667 170.666667h85.333333l273.066667 682.666666h-91.904l-85.333334-213.333333z m-34.133333-85.333333L341.333333 293.76 236.970667 554.666667h208.725333zM896 534.826667V512h85.333333v341.333333h-85.333333v-22.826666a170.666667 170.666667 0 1 1 0-295.68zM810.666667 768a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z"></path>',{size:"1.2em"}),align:be('<path d="M832 96c53.02 0 96 42.98 96 96v640c0 53.02-42.98 96-96 96H192c-53.02 0-96-42.98-96-96V192c0-53.02 42.98-96 96-96z m0 64H192c-17.673 0-32 14.327-32 32v640c0 17.673 14.327 32 32 32h640c17.673 0 32-14.327 32-32V192c0-17.673-14.327-32-32-32zM725.333 672c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z"></path>'),alignTop:be('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM512.45 91.003L512 91a32.632 32.632 0 0 1 1.653 0.042l0.134 0.008c3.447 0.189 6.75 0.924 9.82 2.12l0.198 0.078a16.118 16.118 0 0 1 0.485 0.197l0.11 0.046a31.82 31.82 0 0 1 8.546 5.315l0.12 0.105a31.066 31.066 0 0 1 1.189 1.095l0.08 0.078 0.235 0.23 0.062 0.063 128 128.055c12.494 12.5 12.49 32.761-0.01 45.255-12.374 12.37-32.356 12.489-44.877 0.362l-0.377-0.372L544 200.28v413.598c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.471l-0.004-0.53V200.278l-73.368 73.4c-12.369 12.375-32.35 12.503-44.877 0.381l-0.378-0.37c-12.374-12.37-12.502-32.352-0.38-44.878l0.37-0.378 128-128.055 0.181-0.178a31.875 31.875 0 0 1 9.5-6.47l0.105-0.046c0.116-0.051 0.233-0.101 0.35-0.15 0.054-0.024 0.11-0.047 0.165-0.07a28.198 28.198 0 0 1 0.536-0.219l0.157-0.061a31.816 31.816 0 0 1 9.356-2.103l0.113-0.007c0.147-0.01 0.294-0.02 0.442-0.027l0.028-0.001 0.39-0.019 0.144-0.005a23.911 23.911 0 0 1 0.712-0.018c0.3-0.004 0.602-0.004 0.904 0z"></path>'),alignRight:be('<path d="M896 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H298.667c-17.673 0-32-14.327-32-32 0-17.497 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignBottom:be('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM490.505 637.584l-0.127-0.117a32.174 32.174 0 0 1-0.633-0.596l-0.098-0.096-0.217-0.213-0.062-0.063-128-128.055c-12.494-12.499-12.49-32.76 0.01-45.254 12.374-12.37 32.356-12.489 44.877-0.362l0.377 0.371L480 536.598V123c0-17.673 14.327-32 32-32 17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v413.597l73.368-73.398c12.494-12.5 32.755-12.503 45.255-0.01 12.374 12.37 12.502 32.352 0.38 44.878l-0.37 0.377-128 128.055c-0.121 0.12-0.238 0.236-0.356 0.35l0.355-0.35a31.922 31.922 0 0 1-9.68 6.649l-0.09 0.039a29.917 29.917 0 0 1-1.241 0.514 31.816 31.816 0 0 1-9.338 2.095l-0.113 0.008c-0.147 0.01-0.294 0.019-0.442 0.027h-0.028c-0.13 0.008-0.26 0.014-0.39 0.02l-0.144 0.005a23.92 23.92 0 0 1-0.796 0.019 33.927 33.927 0 0 1-0.37 0.002h-0.13l-0.236-0.002 0.366 0.002a32.633 32.633 0 0 1-1.153-0.02l-0.129-0.006a31.108 31.108 0 0 1-0.876-0.046l-0.105-0.008a31.811 31.811 0 0 1-8.926-1.931l-0.089-0.034a21.022 21.022 0 0 1-0.362-0.138l-0.098-0.04a22.132 22.132 0 0 1-0.746-0.304l-0.219-0.093-0.209-0.092a31.812 31.812 0 0 1-8.034-5.094l-0.12-0.105-0.173-0.153-0.151-0.136-0.105-0.093z"></path>'),alignLeft:be('<path d="M725.333 800.339c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 587.113c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM725.333 373.887c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 160.661c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignCenter:be('<path d="M768 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H256c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM768 373.887c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H256c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignMiddle:be('<path d="M534.246 617.448l0.377 0.371 128 127.952c12.5 12.494 12.503 32.755 0.009 45.255-12.37 12.374-32.352 12.501-44.878 0.38l-0.377-0.372-73.38-73.352V939c0 17.673-14.326 32-32 32-17.496 0-31.712-14.042-31.995-31.47l-0.004-0.53-0.001-221.314-73.374 73.348c-12.374 12.37-32.356 12.49-44.878 0.363l-0.377-0.371c-12.37-12.375-12.49-32.356-0.362-44.878l0.37-0.377 128-127.952c12.372-12.366 32.347-12.49 44.87-0.37zM896 480.508c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM511.998 54c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53-0.001 221.314 73.38-73.349c12.499-12.494 32.76-12.49 45.255 0.009 12.37 12.374 12.49 32.356 0.362 44.878l-0.37 0.377-128 127.951c-12.372 12.366-32.347 12.49-44.87 0.371l-0.377-0.37-128-127.952c-12.5-12.495-12.503-32.756-0.009-45.255 12.37-12.374 32.352-12.502 44.878-0.38l0.377 0.371 73.374 73.346V86c0-17.673 14.328-32 32-32z"></path>')},Cn={align:be('<path d="M555.188 715.059c17.673 0 32 14.327 32 32V875c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V747.059c0-17.673 14.327-32 32-32z m-32.001 63.999H203V843h320.187v-63.942zM854 416.529c17.673 0 32 14.327 32 32v127.942c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V448.529c0-17.673 14.327-32 32-32z m-32 64H203v63.941h619v-63.941zM683.25 118c17.673 0 32 14.327 32 32v127.941c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V150c0-17.673 14.327-32 32-32z m-32 64H203v63.941h448.25V182z"></path>'),alignTop:be(`
|
|
287
|
+
<path d="M661.333 272.411c17.673 0 32 14.327 32 32V902c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V304.411c0-17.673 14.327-32 32-32z m-32 63.999H394.666V870h234.667V336.41zM896 101.671c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z" />`),alignRight:be('<path d="M891.329 96c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32z m-170.74 234.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H123c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32 63.999H155v234.667h533.589V394.666z" />'),alignBottom:be('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768zM661.333 91c17.673 0 32 14.327 32 32v597.589c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V123c0-17.673 14.327-32 32-32z m-32 64H394.666v533.589h234.667V155z" />'),alignLeft:be('<path d="M133.671 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32zM902 330.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H304.411c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32.001 63.999H336.41v234.667h533.589V394.666z" />'),alignH:be('<path d="M512.5 96c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v202.666H875c17.496 0 31.713 14.042 31.996 31.471l0.004 0.53v298.666c0 17.673-14.327 32-32 32H544.5V896c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.47l-0.004-0.53V693.333H150c-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V362.667c0-17.673 14.327-32 32-32l330.5-0.001V128c0-17.673 14.327-32 32-32z m-32 298.666H182v234.667h298.5V394.666z m362.5 0H544.5v234.667H843V394.666z" />'),alignV:be('<path d="M661.333 118c17.673 0 32 14.327 32 32v330.5H896c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H693.333V875c0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H362.667c-17.673 0-32-14.327-32-32l-0.001-330.5H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h202.666V150c0-17.496 14.042-31.713 31.471-31.996l0.53-0.004z m-32.001 426.5H394.665l0.001 298.5h234.667l-0.001-298.5z m0.001-362.5H394.666l-0.001 298.5h234.667l0.001-298.5z" />'),distributeH:be('<path d="M853.333 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32z m-682.666 0c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32zM640 181.333c17.673 0 32 14.327 32 32v597.334c0 17.673-14.327 32-32 32H384c-17.673 0-32-14.327-32-32V213.333c0-17.673 14.327-32 32-32z m-32 64H416v533.333h192V245.333z" />'),distributeV:be('<path d="M896 821.333c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM810.667 352c17.673 0 32 14.327 32 32v256c0 17.673-14.327 32-32 32H213.333c-17.673 0-32-14.327-32-32V384c0-17.673 14.327-32 32-32z m-32 64H245.334v192h533.333V416zM896 138.667c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z" />')},ha="infographic-edit-popover",ue=`${ha}__content`,Qe=`${ha}__arrow`,pD="infographic-edit-popover-style";function Yr(t){var e,n,r,i,o,s,a,l;gD();const c=(e=t.placement)!=null?e:"top",h=(n=t.closeOnOutsideClick)!=null?n:!0,u=Array.isArray(t.trigger)?t.trigger:[t.trigger||"hover"],f=(r=t.mouseEnterDelay)!=null?r:50,p=(i=t.mouseLeaveDelay)!=null?i:150,g=(o=t.offset)!=null?o:8,y=8,m=7,x=typeof t.padding=="number"?`${t.padding}px`:(s=t.padding)!=null?s:"4px",v=document.createElement("div");v.classList.add(ha);const b=(a=t.target)!=null?a:document.createElement("div");v.appendChild(b);const w=()=>{const Y=typeof t.getContainer=="function"?t.getContainer():t.getContainer;return Y!=null?Y:document.body},_=document.createElement("div");_.classList.add(ue),di(_,_a),_.dataset.placement=Array.isArray(c)?c[0]:c,_.setAttribute("data-open",String(!!t.open)),_.style.setProperty("--popover-gap",`${g}px`),_.style.setProperty("--popover-arrow-size",`${y}px`),_.style.setProperty("--popover-arrow-inner-size",`${m}px`);const $=w(),P=$!==v,C=document.createElement("div");C.classList.add(Qe),_.appendChild(C);const A=document.createElement("div");A.classList.add(`${ue}-body`),A.style.padding=x,_.appendChild(A),$.appendChild(_);let E=!!t.open,S=Array.isArray(c)?c:[c],R=(l=S[0])!=null?l:"top";const O=()=>{var Y;const G=b.getBoundingClientRect(),Z=_.getBoundingClientRect(),K=window.scrollX||document.documentElement.scrollLeft,it=window.scrollY||document.documentElement.scrollTop,Q=document.documentElement.clientWidth,at=document.documentElement.clientHeight;let ct=0,nt=0;const J=gt=>{switch(gt){case"top":return{left:K+G.left+G.width/2-Z.width/2,top:it+G.top-Z.height-g};case"bottom":return{left:K+G.left+G.width/2-Z.width/2,top:it+G.bottom+g};case"left":return{left:K+G.left-Z.width-g,top:it+G.top+G.height/2-Z.height/2};case"right":default:return{left:K+G.right+g,top:it+G.top+G.height/2-Z.height/2}}},tt=(gt,ut)=>gt>=K&&ut>=it&>+Z.width<=K+Q&&ut+Z.height<=it+at;let st=(Y=S[0])!=null?Y:"top",vt=J(st);for(const gt of S){const ut=J(gt);if(vt=ut,tt(ut.left,ut.top)){st=gt;break}}R=st,_.dataset.placement=R,P&&({left:ct,top:nt}=vt,_.style.left=`${ct}px`,_.style.top=`${nt}px`,_.style.right="auto",_.style.bottom="auto",_.style.transform="translate(0, 0)")};P&&(_.style.position="absolute",window.addEventListener("resize",O),window.addEventListener("scroll",O,!0));const T=Y=>{let G=Y;typeof G=="function"&&(G=G()),A.innerHTML="",G instanceof HTMLElement?A.appendChild(G):A.textContent=G!=null?G:"",O()},F=Y=>{var G;S=Array.isArray(Y)?Y:[Y],R=(G=S[0])!=null?G:"top",O()},L=Y=>{E=Y,_.setAttribute("data-open",String(E)),E&&O(),E&&h?document.addEventListener("click",k,!0):document.removeEventListener("click",k,!0)},D=()=>L(!E),k=Y=>{const G=Y.target;!v.contains(G)&&(!P||!_.contains(G))&&L(!1)};let N,j;const X=u.includes("hover"),z=u.includes("click"),M=()=>{N!==void 0&&(clearTimeout(N),N=void 0),j!==void 0&&(clearTimeout(j),j=void 0)},H=()=>{X&&(M(),N=window.setTimeout(()=>L(!0),f))},B=()=>{X&&(M(),j=window.setTimeout(()=>L(!1),p))};return z&&b.addEventListener("click",D),X&&(v.addEventListener("mouseenter",H),v.addEventListener("mouseleave",B),_.addEventListener("mouseenter",H),_.addEventListener("mouseleave",B)),T(t.content),F(c),L(E),Object.assign(v,{setOpen:L,toggle:D,setContent:T,setPlacement:F,destroy:()=>{document.removeEventListener("click",k,!0),z&&b.removeEventListener("click",D),X&&(v.removeEventListener("mouseenter",H),v.removeEventListener("mouseleave",B),_.removeEventListener("mouseenter",H),_.removeEventListener("mouseleave",B),M()),P&&(window.removeEventListener("resize",O),window.removeEventListener("scroll",O,!0),_.remove()),v.remove()}})}function gD(){ln(pD,`
|
|
288
|
+
.${ha} {
|
|
289
289
|
position: relative;
|
|
290
290
|
display: inline-flex;
|
|
291
291
|
}
|
|
292
|
-
.${
|
|
292
|
+
.${ue} {
|
|
293
293
|
position: absolute;
|
|
294
294
|
z-index: 1200;
|
|
295
295
|
padding: 0;
|
|
@@ -305,34 +305,34 @@ ${t.trim()}
|
|
|
305
305
|
pointer-events: none;
|
|
306
306
|
transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
|
|
307
307
|
}
|
|
308
|
-
.${
|
|
308
|
+
.${ue}-body {
|
|
309
309
|
padding: 4px;
|
|
310
310
|
color: #000000d9;
|
|
311
311
|
font-size: 12px;
|
|
312
312
|
line-height: 1.5;
|
|
313
313
|
}
|
|
314
|
-
.${
|
|
314
|
+
.${ue}[data-open="true"] {
|
|
315
315
|
opacity: 1;
|
|
316
316
|
visibility: visible;
|
|
317
317
|
pointer-events: auto;
|
|
318
318
|
}
|
|
319
|
-
.${
|
|
319
|
+
.${Qe} {
|
|
320
320
|
position: absolute;
|
|
321
321
|
width: 0;
|
|
322
322
|
height: 0;
|
|
323
323
|
}
|
|
324
|
-
.${
|
|
324
|
+
.${Qe}::after {
|
|
325
325
|
content: '';
|
|
326
326
|
position: absolute;
|
|
327
327
|
width: 0;
|
|
328
328
|
height: 0;
|
|
329
329
|
}
|
|
330
|
-
.${
|
|
330
|
+
.${ue}[data-placement="top"] {
|
|
331
331
|
left: 50%;
|
|
332
332
|
bottom: calc(100% + var(--popover-gap));
|
|
333
333
|
transform: translate(-50%, calc(-1 * var(--popover-gap) / 2));
|
|
334
334
|
}
|
|
335
|
-
.${
|
|
335
|
+
.${ue}[data-placement="top"] .${Qe} {
|
|
336
336
|
left: 50%;
|
|
337
337
|
bottom: calc(-1 * var(--popover-arrow-size));
|
|
338
338
|
transform: translateX(-50%);
|
|
@@ -340,7 +340,7 @@ ${t.trim()}
|
|
|
340
340
|
border-right: var(--popover-arrow-size) solid transparent;
|
|
341
341
|
border-top: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
|
|
342
342
|
}
|
|
343
|
-
.${
|
|
343
|
+
.${ue}[data-placement="top"] .${Qe}::after {
|
|
344
344
|
left: 50%;
|
|
345
345
|
bottom: 1px;
|
|
346
346
|
transform: translateX(-50%);
|
|
@@ -348,15 +348,15 @@ ${t.trim()}
|
|
|
348
348
|
border-right: var(--popover-arrow-inner-size) solid transparent;
|
|
349
349
|
border-top: var(--popover-arrow-inner-size) solid #fff;
|
|
350
350
|
}
|
|
351
|
-
.${
|
|
351
|
+
.${ue}[data-placement="top"][data-open="true"] {
|
|
352
352
|
transform: translate(-50%, 0);
|
|
353
353
|
}
|
|
354
|
-
.${
|
|
354
|
+
.${ue}[data-placement="bottom"] {
|
|
355
355
|
left: 50%;
|
|
356
356
|
top: calc(100% + var(--popover-gap));
|
|
357
357
|
transform: translate(-50%, calc(var(--popover-gap) / 2));
|
|
358
358
|
}
|
|
359
|
-
.${
|
|
359
|
+
.${ue}[data-placement="bottom"] .${Qe} {
|
|
360
360
|
left: 50%;
|
|
361
361
|
top: calc(-1 * var(--popover-arrow-size) + 2px);
|
|
362
362
|
transform: translateX(-50%);
|
|
@@ -364,7 +364,7 @@ ${t.trim()}
|
|
|
364
364
|
border-right: var(--popover-arrow-size) solid transparent;
|
|
365
365
|
border-bottom: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
|
|
366
366
|
}
|
|
367
|
-
.${
|
|
367
|
+
.${ue}[data-placement="bottom"] .${Qe}::after {
|
|
368
368
|
left: 50%;
|
|
369
369
|
top: 1px;
|
|
370
370
|
transform: translateX(-50%);
|
|
@@ -372,15 +372,15 @@ ${t.trim()}
|
|
|
372
372
|
border-right: var(--popover-arrow-inner-size) solid transparent;
|
|
373
373
|
border-bottom: var(--popover-arrow-inner-size) solid #fff;
|
|
374
374
|
}
|
|
375
|
-
.${
|
|
375
|
+
.${ue}[data-placement="bottom"][data-open="true"] {
|
|
376
376
|
transform: translate(-50%, 0);
|
|
377
377
|
}
|
|
378
|
-
.${
|
|
378
|
+
.${ue}[data-placement="left"] {
|
|
379
379
|
right: calc(100% + var(--popover-gap));
|
|
380
380
|
top: 50%;
|
|
381
381
|
transform: translate(calc(-1 * var(--popover-gap) / 2), -50%);
|
|
382
382
|
}
|
|
383
|
-
.${
|
|
383
|
+
.${ue}[data-placement="left"] .${Qe} {
|
|
384
384
|
right: calc(-1 * var(--popover-arrow-size) + 1px);
|
|
385
385
|
top: 50%;
|
|
386
386
|
transform: translateY(-50%);
|
|
@@ -389,7 +389,7 @@ ${t.trim()}
|
|
|
389
389
|
border-left: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
|
|
390
390
|
border-right: 0;
|
|
391
391
|
}
|
|
392
|
-
.${
|
|
392
|
+
.${ue}[data-placement="left"] .${Qe}::after {
|
|
393
393
|
right: 1px;
|
|
394
394
|
top: 50%;
|
|
395
395
|
transform: translateY(-50%);
|
|
@@ -398,15 +398,15 @@ ${t.trim()}
|
|
|
398
398
|
border-left: var(--popover-arrow-inner-size) solid #fff;
|
|
399
399
|
border-right: 0;
|
|
400
400
|
}
|
|
401
|
-
.${
|
|
401
|
+
.${ue}[data-placement="left"][data-open="true"] {
|
|
402
402
|
transform: translate(0, -50%);
|
|
403
403
|
}
|
|
404
|
-
.${
|
|
404
|
+
.${ue}[data-placement="right"] {
|
|
405
405
|
left: calc(100% + var(--popover-gap));
|
|
406
406
|
top: 50%;
|
|
407
407
|
transform: translate(calc(var(--popover-gap) / 2), -50%);
|
|
408
408
|
}
|
|
409
|
-
.${
|
|
409
|
+
.${ue}[data-placement="right"] .${Qe} {
|
|
410
410
|
left: calc(-1 * var(--popover-arrow-size) + 1px);
|
|
411
411
|
top: 50%;
|
|
412
412
|
transform: translateY(-50%);
|
|
@@ -415,7 +415,7 @@ ${t.trim()}
|
|
|
415
415
|
border-right: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
|
|
416
416
|
border-left: 0;
|
|
417
417
|
}
|
|
418
|
-
.${
|
|
418
|
+
.${ue}[data-placement="right"] .${Qe}::after {
|
|
419
419
|
left: 1px;
|
|
420
420
|
top: 50%;
|
|
421
421
|
transform: translateY(-50%);
|
|
@@ -423,28 +423,28 @@ ${t.trim()}
|
|
|
423
423
|
border-bottom: var(--popover-arrow-inner-size) solid transparent;
|
|
424
424
|
border-right: var(--popover-arrow-inner-size) solid #fff;
|
|
425
425
|
}
|
|
426
|
-
.${
|
|
426
|
+
.${ue}[data-placement="right"][data-open="true"] {
|
|
427
427
|
transform: translate(0, -50%);
|
|
428
428
|
}
|
|
429
|
-
`)}const
|
|
430
|
-
.${
|
|
429
|
+
`)}const Mh="infographic-align-grid",D3=`${Mh}--compact`,mD="infographic-align-grid-style",yD=`
|
|
430
|
+
.${Mh} {
|
|
431
431
|
display: grid;
|
|
432
432
|
grid-template-columns: repeat(4, 32px);
|
|
433
433
|
grid-auto-rows: 32px;
|
|
434
434
|
gap: 2px;
|
|
435
435
|
}
|
|
436
|
-
.${
|
|
436
|
+
.${D3} {
|
|
437
437
|
grid-template-columns: repeat(3, 32px);
|
|
438
438
|
}
|
|
439
|
-
|
|
440
|
-
.${
|
|
439
|
+
`,N3=[{icon:Cn.alignLeft,action:"LEFT"},{icon:Cn.alignH,action:"H_CENTER"},{icon:Cn.alignRight,action:"RIGHT"},{icon:Cn.distributeH,action:"H_DISTRIBUTE"},{icon:Cn.alignTop,action:"TOP"},{icon:Cn.alignV,action:"V_CENTER"},{icon:Cn.alignBottom,action:"BOTTOM"},{icon:Cn.distributeV,action:"V_DISTRIBUTE"}],vD=(t,e,n,r)=>{var i;ln(mD,yD);const o=(i=r==null?void 0:r.enableDistribution)!=null?i:!0,s=xD(a=>bD(t,a,n),o);return Yr({target:mr({icon:Cn.align}),content:s,placement:"top",offset:12})};function xD(t,e){const n=document.createElement("div");return n.classList.add(Mh),e||n.classList.add(D3),(e?N3:N3.filter(({action:i})=>i!=="H_DISTRIBUTE"&&i!=="V_DISTRIBUTE")).forEach(({icon:i,action:o})=>{const s=mr({icon:i,onClick:()=>t(o)});n.appendChild(s)}),n}function bD(t,e,n){if(!t.length)return;const r=t[0].ownerSVGElement;if(!r)return;const i=t.map(h=>$D(h,r)).filter(Boolean);if(!i.length)return;const o=i.filter(h=>h.movable);if(!o.length)return;const s=i.filter(h=>!h.movable),a=s.length?s:i,l=zr(a.map(h=>h.bounds)),c=[];switch(e){case"LEFT":{const h=l.x;o.forEach(u=>{const f=h-u.bounds.x;Wn(c,u,f,0)});break}case"H_CENTER":{const h=l.x+l.width/2;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width/2);Wn(c,u,f,0)});break}case"RIGHT":{const h=l.x+l.width;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width);Wn(c,u,f,0)});break}case"TOP":{const h=l.y;o.forEach(u=>{const f=h-u.bounds.y;Wn(c,u,0,f)});break}case"V_CENTER":{const h=l.y+l.height/2;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height/2);Wn(c,u,0,f)});break}case"BOTTOM":{const h=l.y+l.height;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height);Wn(c,u,0,f)});break}case"H_DISTRIBUTE":{wD(i,c);break}case"V_DISTRIBUTE":{_D(i,c);break}}c.length&&n.executeBatch(c)}function wD(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.x-o.bounds.x||i.bounds.y-o.bounds.y),r=j3(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.x-(a.bounds.x+a.bounds.width),u=c.reduce((g,y)=>g+y.bounds.width,0),f=(h-u)/(c.length+1);let p=a.bounds.x+a.bounds.width+f;c.forEach(g=>{const y=p-g.bounds.x;Wn(e,g,y,0),p+=g.bounds.width+f})}}function _D(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.y-o.bounds.y||i.bounds.x-o.bounds.x),r=j3(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.y-(a.bounds.y+a.bounds.height),u=c.reduce((g,y)=>g+y.bounds.height,0),f=(h-u)/(c.length+1);let p=a.bounds.y+a.bounds.height+f;c.forEach(g=>{const y=p-g.bounds.y;Wn(e,g,0,y),p+=g.bounds.height+f})}}function j3(t){const e=new Set;return e.add(0),e.add(t.length-1),t.forEach((n,r)=>{n.movable||e.add(r)}),Array.from(e).sort((n,r)=>n-r)}function Wn(t,e,n,r){const i=PD(e,n,r);i&&t.push(i)}function $D(t,e){const n=fn(e,t),r=!zn(t),i=OD(t);if(i)return{element:t,bounds:n,mode:"transform",startX:i.x,startY:i.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:i.rest,originalTransform:i.original,movable:r};const{x:o,y:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h}=CD(t,n);return{element:t,bounds:n,mode:"attr",startX:o,startY:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h,movable:r}}function PD(t,e,n){if(!t.movable||Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return null;if(t.mode==="attr"){const o=t.startX+e,s=t.startY+n,a={x:o,y:s},l={};return l.x=t.hasX?t.startX:null,l.y=t.hasY?t.startY:null,t.hasDataX&&(a["data-x"]=o,l["data-x"]=t.startX),t.hasDataY&&(a["data-y"]=s,l["data-y"]=t.startY),new pn(t.element,{attributes:a},{attributes:l})}const r=MD(t.startX+e,t.startY+n,t.restTransform),i=t.originalTransform!==void 0?t.originalTransform:null;return new pn(t.element,{attributes:{transform:r}},{attributes:{transform:i}})}function CD(t,e){const n=Re(t,["x","y","data-x","data-y"],!1),r=n.x!==null&&n.x!==void 0,i=n.y!==null&&n.y!==void 0,o=n["data-x"]!==null&&n["data-x"]!==void 0,s=n["data-y"]!==null&&n["data-y"]!==void 0,a=(g,y)=>{const m=g!=null?Number(g):NaN;return Number.isFinite(m)?m:y},l=a(n.x,NaN),c=a(n.y,NaN),h=a(n["data-x"],NaN),u=a(n["data-y"],NaN),f=Number.isFinite(l)?l:Number.isFinite(h)?h:e.x,p=Number.isFinite(c)?c:Number.isFinite(u)?u:e.y;return{x:f,y:p,hasX:r,hasY:i,hasDataX:o,hasDataY:s}}function OD(t){var e;const n=t.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:{before:n.trim(),after:""},original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=(e=r.index)!=null?e:0,a=n.slice(0,s).trim(),l=n.slice(s+r[0].length).trim();return{x:i,y:o,rest:{before:a,after:l},original:n}}function MD(t,e,n){const r=`translate(${t}, ${e})`;return[n==null?void 0:n.before,r,n==null?void 0:n.after].filter(o=>o&&o.length).join(" ")}var SD=Object.defineProperty,W3=Object.getOwnPropertySymbols,ED=Object.prototype.hasOwnProperty,ID=Object.prototype.propertyIsEnumerable,F3=(t,e,n)=>e in t?SD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TD=(t,e)=>{for(var n in e||(e={}))ED.call(e,n)&&F3(t,n,e[n]);if(W3)for(var n of W3(e))ID.call(e,n)&&F3(t,n,e[n]);return t};const B3="infographic-font-align-grid",AD="infographic-font-align-grid-style",kD=[{icon:Pn.alignLeft,align:"LEFT"},{icon:Pn.alignCenter,align:"CENTER"},{icon:Pn.alignRight,align:"RIGHT"}],LD=[{icon:Pn.alignTop,align:"TOP"},{icon:Pn.alignMiddle,align:"MIDDLE"},{icon:Pn.alignBottom,align:"BOTTOM"}],zD=`
|
|
440
|
+
.${B3} {
|
|
441
441
|
display: grid;
|
|
442
442
|
grid-template-columns: repeat(3, 32px);
|
|
443
443
|
grid-auto-rows: 32px;
|
|
444
444
|
gap: 2px;
|
|
445
445
|
}
|
|
446
|
-
`,
|
|
447
|
-
.${
|
|
446
|
+
`,V3=(t,e,n)=>{ln(AD,zD);const r={horizontal:e["data-horizontal-align"],vertical:e["data-vertical-align"]},i=mr({icon:Pn.align}),o=HD(r,s=>{const a={};s.horizontal&&(a["data-horizontal-align"]=s.horizontal),s.vertical&&(a["data-vertical-align"]=s.vertical),Object.keys(a).length&&n.executeBatch(t.map(l=>new pn(l,{attributes:a})))});return Yr({target:i,content:o,placement:"top",offset:12})};function HD(t,e){const n=document.createElement("div");n.classList.add(B3);const r={},i=()=>{Object.entries(r).forEach(([s,a])=>{const l=s===t.horizontal||s===t.vertical;a.setActivate(l)})},o=(s,a)=>{s.forEach(({icon:l,align:c})=>{const h=mr({icon:l,onClick:()=>{t[a]!==c&&(Object.assign(t,{[a]:c}),i(),e(TD({},t)))},activate:c===t[a]});r[c]=h,n.appendChild(h)})};return o(kD,"horizontal"),o(LD,"vertical"),n}const da="infographic-font-color-btn",RD="infographic-font-color-style",Sh="#1f1f1f",Y3=(t,e,n)=>{ND();const r=DD(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(da),X3(o,r!=null?r:Sh,i);const s=k3({value:r!=null?r:Sh,onChange:a=>{X3(o,a,!1),n.executeBatch(t.map(l=>new pn(l,{attributes:{fill:a}})))}});return Yr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function DD(t){if(t)return Xn(t)?t:void 0}function X3(t,e,n){t.style.setProperty("--infographic-font-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function ND(){ln(RD,`
|
|
447
|
+
.${da} {
|
|
448
448
|
position: relative;
|
|
449
449
|
width: 32px;
|
|
450
450
|
height: 32px;
|
|
@@ -454,15 +454,15 @@ ${t.trim()}
|
|
|
454
454
|
cursor: pointer;
|
|
455
455
|
transition: box-shadow 0.2s ease, border-color 0.2s ease;
|
|
456
456
|
}
|
|
457
|
-
.${
|
|
457
|
+
.${da}::after {
|
|
458
458
|
content: '';
|
|
459
459
|
position: absolute;
|
|
460
460
|
inset: 6px;
|
|
461
461
|
border-radius: 50%;
|
|
462
|
-
background: var(--infographic-font-color, ${
|
|
462
|
+
background: var(--infographic-font-color, ${Sh});
|
|
463
463
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
464
464
|
}
|
|
465
|
-
.${
|
|
465
|
+
.${da}[data-mixed="true"]::after {
|
|
466
466
|
background: repeating-linear-gradient(
|
|
467
467
|
45deg,
|
|
468
468
|
#d9d9d9 0,
|
|
@@ -471,8 +471,8 @@ ${t.trim()}
|
|
|
471
471
|
#f5f5f5 12px
|
|
472
472
|
);
|
|
473
473
|
}
|
|
474
|
-
`)}const
|
|
475
|
-
.${
|
|
474
|
+
`)}const Eh="infographic-font-family-list",ua=`${Eh}__option`,jD="infographic-font-family-list-style",WD="默认",G3=(t,e,n)=>{BD();const r=Tl(),i=q3(e["font-family"]),o=r.map(h=>({label:h.name||h.fontFamily,value:h.fontFamily}));o.some(h=>q3(h.value)===i)||o.unshift({label:WD,value:i});let s=i;const a=FD(o,s,h=>{s!==h&&(s=h,n.executeBatch(t.map(u=>new pn(u,{attributes:{"font-family":Sr(h)}}))))}),l=mr({icon:Pn.fontFamily});return Yr({target:l,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function FD(t,e,n){const r=document.createElement("div");r.classList.add(Eh);const i={},o=s=>{Object.entries(i).forEach(([a,l])=>{a===s?l.setAttribute("data-activate","true"):l.removeAttribute("data-activate")})};return t.forEach(({label:s,value:a})=>{const l=document.createElement("button");l.type="button",l.classList.add(ua),l.textContent=s,l.style.fontFamily=a,a===e&&l.setAttribute("data-activate","true"),l.addEventListener("click",()=>{e!==a&&(e=a,o(e),n(a))}),i[a]=l,r.appendChild(l)}),r}function q3(t){return t?Array.isArray(t)?Qn(t.join(", ")):Qn(String(t)):""}function BD(){ln(jD,`
|
|
475
|
+
.${Eh} {
|
|
476
476
|
display: flex;
|
|
477
477
|
flex-direction: column;
|
|
478
478
|
gap: 2px;
|
|
@@ -481,7 +481,7 @@ ${t.trim()}
|
|
|
481
481
|
max-height: 220px;
|
|
482
482
|
overflow-y: auto;
|
|
483
483
|
}
|
|
484
|
-
.${
|
|
484
|
+
.${ua} {
|
|
485
485
|
width: 100%;
|
|
486
486
|
text-align: left;
|
|
487
487
|
padding: 6px 10px;
|
|
@@ -493,22 +493,22 @@ ${t.trim()}
|
|
|
493
493
|
color: #000000d9;
|
|
494
494
|
transition: background-color 0.2s ease, color 0.2s ease;
|
|
495
495
|
}
|
|
496
|
-
.${
|
|
496
|
+
.${ua}:hover {
|
|
497
497
|
background: #f5f5f5;
|
|
498
498
|
}
|
|
499
|
-
.${
|
|
499
|
+
.${ua}[data-activate="true"] {
|
|
500
500
|
background: #e6f4ff;
|
|
501
501
|
color: #0958d9;
|
|
502
502
|
}
|
|
503
|
-
`)}const
|
|
504
|
-
.${
|
|
503
|
+
`)}const U3="infographic-font-size-grid",VD="infographic-font-size-grid-style",YD=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],XD=`
|
|
504
|
+
.${U3} {
|
|
505
505
|
display: grid;
|
|
506
506
|
grid-template-columns: repeat(5, 32px);
|
|
507
507
|
grid-auto-rows: 32px;
|
|
508
508
|
gap: 2px;
|
|
509
509
|
}
|
|
510
|
-
`,
|
|
511
|
-
.${
|
|
510
|
+
`,Z3=(t,e,n)=>{ln(VD,XD);const r=mr({icon:Pn.fontSize}),i=UD(e["font-size"]),o=GD(i,s=>{n.executeBatch(t.map(a=>new pn(a,{attributes:{"font-size":s}})))});return Yr({target:r,content:o,placement:"top",offset:12})};function GD(t,e){const n=document.createElement("div");n.classList.add(U3);let r=t;const i={},o=()=>{Object.entries(i).forEach(([s,a])=>{const l=Number(s)===r;a.setActivate(l)})};return YD.forEach(({label:s,value:a})=>{const l=mr({icon:qD(s),onClick:()=>{r!==a&&(r=a,o(),e(a))},activate:a===r});i[String(a)]=l,n.appendChild(l)}),n}function qD(t){return()=>{const e="1.2em",n=document.createElement("span");return n.textContent=t,n.style.display="inline-flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.width=e,n.style.height=e,n.style.fontSize="12px",n}}function UD(t){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?n:12}return 12}const fa="infographic-icon-color-btn",ZD="infographic-icon-color-style",Ih="#1f1f1f",K3=(t,e,n)=>{QD();const r=KD(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(fa),Q3(o,r!=null?r:Ih,i);const s=k3({value:r!=null?r:Ih,onChange:a=>{Q3(o,a,!1),n.executeBatch(t.map(l=>new pn(l,{attributes:{fill:a}})))}});return Yr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function KD(t){if(t)return Xn(t)?t:void 0}function Q3(t,e,n){t.style.setProperty("--infographic-icon-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function QD(){ln(ZD,`
|
|
511
|
+
.${fa} {
|
|
512
512
|
position: relative;
|
|
513
513
|
width: 32px;
|
|
514
514
|
height: 32px;
|
|
@@ -518,15 +518,15 @@ ${t.trim()}
|
|
|
518
518
|
cursor: pointer;
|
|
519
519
|
transition: box-shadow 0.2s ease, border-color 0.2s ease;
|
|
520
520
|
}
|
|
521
|
-
.${
|
|
521
|
+
.${fa}::after {
|
|
522
522
|
content: '';
|
|
523
523
|
position: absolute;
|
|
524
524
|
inset: 6px;
|
|
525
525
|
border-radius: 50%;
|
|
526
|
-
background: var(--infographic-icon-color, ${
|
|
526
|
+
background: var(--infographic-icon-color, ${Ih});
|
|
527
527
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
528
528
|
}
|
|
529
|
-
.${
|
|
529
|
+
.${fa}[data-mixed="true"]::after {
|
|
530
530
|
background: repeating-linear-gradient(
|
|
531
531
|
45deg,
|
|
532
532
|
#d9d9d9 0,
|
|
@@ -535,8 +535,8 @@ ${t.trim()}
|
|
|
535
535
|
#f5f5f5 12px
|
|
536
536
|
);
|
|
537
537
|
}
|
|
538
|
-
`)}var PD=Object.defineProperty,H3=Object.getOwnPropertySymbols,OD=Object.prototype.hasOwnProperty,CD=Object.prototype.propertyIsEnumerable,D3=(t,e,n)=>e in t?PD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MD=(t,e)=>{for(var n in e||(e={}))OD.call(e,n)&&D3(t,n,e[n]);if(H3)for(var n of H3(e))CD.call(e,n)&&D3(t,n,e[n]);return t};class N3 extends gh{constructor(e){super(),this.options=e,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:n})=>{if(this.selection=n,n.length===0){this.container&&j3(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){j3(r);return}SD(r,i),this.placeEditBar(r,n),_h(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),_h(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),_h(this.container))}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged)}destroy(){var e;const{emitter:n}=this;n.off("selection:change",this.handleSelectionChanged),n.off("selection:geometrychange",this.handleGeometryChanged),n.off("history:change",this.handleHistoryChanged),(e=this.container)==null||e.remove()}getEditItems(e){let n=!1,r=!1,i=!1;for(const o of e)if(mn(o)?n=!0:Tn(o)?r=!0:L4(o)&&(i=!0),n&&r&&i)break;return n&&!r&&!i?e.length===1?this.getTextEditItems(e[0]):this.getTextCollectionEditItems(e):!n&&r&&!i?e.length===1?this.getIconEditItems(e):this.getIconCollectionEditItems(e):!n&&!r&&i?e.length===1?this.getGeometryEditItems(e):this.getGeometryCollectionEditItems(e):this.getElementCollectionEditItems(e)}getOrCreateEditBar(){if(this.container)return this.container;const{style:e,className:n}=this.options||{},r=document.createElement("div");Object.assign(r.style,MD({visibility:"hidden",position:"absolute",left:"0",top:"0",display:"flex",flexFlow:"row",justifyContent:"center",alignItems:"center",height:"40px",minWidth:"40px",minHeight:"40px",borderRadius:"8px",padding:"0 4px",backgroundColor:"#fff",border:"1px solid rgba(239, 240, 240, 0.9)",zIndex:"9999",boxShadow:"rgba(0, 0, 0, 0.08) 0px 1px 2px -2px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.02) 0px 4px 8px 1px"},e)),n&&r.classList.add(n),oi(r,ya),this.container=r;const{getContainer:i}=this.options||{},o=typeof i=="function"?i():i,s=o!=null?o:document.body;return s==null||s.appendChild(r),r}getTextEditItems(e){const{attributes:n={}}=fl(e);return[E3,z3,S3,T3].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=id(e.map(o=>fl(o).attributes||{})),r=[E3,z3,S3,T3].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=xl(e[0]);return[L3].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=id(e.map(r=>xl(r)));return[L3].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[WH(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=kr(n.map(w=>cn(i,w))),a=((r=e.offsetParent)!=null?r:document.documentElement).getBoundingClientRect(),l=document.documentElement.clientHeight,c=e.getBoundingClientRect(),h=8,u=WR(i),f=new DOMPoint(o.x+o.width/2,o.y).matrixTransform(u),p=new DOMPoint(o.x+o.width/2,o.y+o.height).matrixTransform(u),g=(w,_,$)=>Math.min(Math.max(w,_),$);let y=f.x-a.left-c.width/2;y=g(y,0,Math.max(a.width-c.width,0));const m=f.y-h,b=l-p.y-h;let x=m>=c.height||m>=b?f.y-a.top-c.height-h:p.y-a.top+h;x=g(x,0,Math.max(a.height-c.height,0)),e.style.left=`${y}px`,e.style.top=`${x}px`}}function _h(t){t.style.visibility="visible"}function j3(t){t.style.visibility="hidden"}function SD(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var ED=Object.defineProperty,F3=Object.getOwnPropertySymbols,ID=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,B3=(t,e,n)=>e in t?ED(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AD=(t,e)=>{for(var n in e||(e={}))ID.call(e,n)&&B3(t,n,e[n]);if(F3)for(var n of F3(e))TD.call(e,n)&&B3(t,n,e[n]);return t};const Vi=class Ke extends gh{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:e})=>{const n=e.length===1?e[0]:null;n&&mn(n)?(this.target=n,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:e})=>{if(!this.target||e!==this.target)return;const n=this.getViewportRect(this.target);this.lastViewportRect=n,this.updateHandles(n)},this.handleHistoryChange=()=>{if(!this.target)return;const e=this.getViewportRect(this.target);this.lastViewportRect=e,this.updateHandles(e)},this.handlePointerMove=e=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.clientToElement(this.target,e.clientX,e.clientY),r=n.x-this.startPointer.x,i=n.y-this.startPointer.y,o=this.clampRect(this.applyDelta(this.startRect,r,i,this.activeHandle),this.activeHandle);this.lastRect=o,this.applyRect(this.target,o),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=e=>{if(this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.lastRect,r=this.startAttrs,i=n&&this.startRect&&this.hasRectChanged(this.startRect,n);if(this.cancelDrag(),i&&this.target&&n&&r)this.commander.execute(new hn(this.target,{attributes:n},{attributes:r})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const o=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(o)}}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChange),n.on("selection:geometrychange",this.handleGeometryChange),n.on("history:change",this.handleHistoryChange),n.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChange),e.off("selection:geometrychange",this.handleGeometryChange),e.off("history:change",this.handleHistoryChange),e.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const e=wt("g",{"pointer-events":"none"});this.overlay=wt("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=wt("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});e.appendChild(this.overlay),e.appendChild(n),this.outline=n;const r=Ke.HANDLE_POSITIONS,i={"top-left":"nwse-resize",top:"ns-resize","top-right":"nesw-resize",right:"ew-resize","bottom-right":"nwse-resize",bottom:"ns-resize","bottom-left":"nesw-resize",left:"ew-resize"};return r.forEach((o,s)=>{const l=o==="top"||o==="right"||o==="bottom"||o==="left"?wt("line",{stroke:"transparent","stroke-width":Ke.LINE_STROKE_WIDTH}):wt("circle",{r:Ke.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});l.style.cursor=i[o],l.style.pointerEvents="all",l.addEventListener("pointerdown",c=>this.handlePointerDown(c,o)),l.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault()}),e.appendChild(l),this.handles[s]=l}),this.editor.getDocument().appendChild(e),this.container=e,e}updateHandles(e){if(!this.target){this.hideHandles();return}const n=e||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!n){this.hideHandles();return}this.lastViewportRect=n;const r=this.ensureContainer();r.style.display="block",this.outline.style.display="block",Yt(this.outline,n),this.overlay&&(this.overlay.style.display="block",Yt(this.overlay,n));const i=this.getHandlePoints(n);this.handles.forEach((o,s)=>{const[a,l]=i[s];if(o.tagName==="circle")Yt(o,{cx:a,cy:l});else{const c=Ke.HANDLE_POSITIONS[s],h=this.getHandleLine(n,c);Yt(o,h)}o.style.display="block"})}hideHandles(){this.container&&(this.container.style.display="none"),this.outline&&(this.outline.style.display="none"),this.overlay&&(this.overlay.style.display="none"),this.handles.forEach(e=>e.style.display="none")}removeContainer(){var e;(e=this.container)==null||e.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(e,n){if(!this.target||e.button!==0&&e.pointerType==="mouse")return;e.stopPropagation(),e.preventDefault();const r=this.clientToElement(this.target,e.clientX,e.clientY);this.activeHandle=n,this.activePointerId=e.pointerId,this.startPointer=r;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs=AD({},i),this.lastRect=i,this.lastViewportRect=this.getViewportRect(this.target),window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}cancelDrag(){this.activeHandle=null,this.activePointerId=null,this.startPointer=void 0,this.startRect=void 0,this.startAttrs=void 0,this.lastRect=void 0,this.lastViewportRect=void 0,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}applyRect(e,n){Yt(e,{x:n.x,y:n.y,width:n.width,height:n.height})}getViewportRect(e){const{x:n,y:r,width:i,height:o}=cn(this.editor.getDocument(),e);return{x:n,y:r,width:i,height:o}}clientToElement(e,n,r){var i,o;const s=((i=e.getScreenCTM())==null?void 0:i.inverse())||((o=this.editor.getDocument().getScreenCTM())==null?void 0:o.inverse())||new DOMMatrix;return new DOMPoint(n,r).matrixTransform(s)}getCurrentAttributes(e){const n=ke(e,["x","y","width","height"],!1),r=this.getViewportRect(e),i=(o,s)=>{const a=o!==null?Number(o):NaN;return Number.isFinite(a)?a:s};return{x:i(n.x,r.x),y:i(n.y,r.y),width:i(n.width,r.width),height:i(n.height,r.height)}}getHandlePoints(e){const{x:n,y:r,width:i,height:o}=e,s=n+i/2,a=r+o/2;return[[n,r],[s,r],[n+i,r],[n+i,a],[n+i,r+o],[s,r+o],[n,r+o],[n,a]]}applyDelta(e,n,r,i){let{x:o,y:s,width:a,height:l}=e;switch(i){case"top-left":o+=n,s+=r,a-=n,l-=r;break;case"top":s+=r,l-=r;break;case"top-right":s+=r,a+=n,l-=r;break;case"right":a+=n;break;case"bottom-right":a+=n,l+=r;break;case"bottom":l+=r;break;case"bottom-left":o+=n,a-=n,l+=r;break;case"left":o+=n,a-=n;break}return{x:o,y:s,width:a,height:l}}clampRect(e,n){let{x:r,y:i,width:o,height:s}=e;if(o<Ke.MIN_SIZE){const a=Ke.MIN_SIZE-o;(n==="top-left"||n==="bottom-left"||n==="left")&&(r-=a),o=Ke.MIN_SIZE}if(s<Ke.MIN_SIZE){const a=Ke.MIN_SIZE-s;(n==="top-left"||n==="top-right"||n==="top")&&(i-=a),s=Ke.MIN_SIZE}return{x:r,y:i,width:o,height:s}}hasRectChanged(e,n){return Math.abs(e.x-n.x)>.5||Math.abs(e.y-n.y)>.5||Math.abs(e.width-n.width)>.5||Math.abs(e.height-n.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(e,n){const{x:r,y:i,width:o,height:s}=e;switch(n){case"top":return{x1:r,y1:i,x2:r+o,y2:i};case"right":return{x1:r+o,y1:i,x2:r+o,y2:i+s};case"bottom":return{x1:r,y1:i+s,x2:r+o,y2:i+s};case"left":default:return{x1:r,y1:i,x2:r,y2:i+s}}}};Vi.HANDLE_SIZE=10,Vi.LINE_STROKE_WIDTH=8,Vi.MIN_SIZE=1,Vi.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let W3=Vi;function V3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $h={exports:{}},Y3;function kD(){return Y3||(Y3=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function o(l,c,h,u,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new i(h,u||l,f),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(n?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=n?n+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var f=0,p=u.length,g=new Array(p);f<p;f++)g[f]=u[f].fn;return g},a.prototype.listenerCount=function(c){var h=n?n+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,f,p,g){var y=n?n+c:c;if(!this._events[y])return!1;var m=this._events[y],b=arguments.length,v,x;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),b){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,f),!0;case 5:return m.fn.call(m.context,h,u,f,p),!0;case 6:return m.fn.call(m.context,h,u,f,p,g),!0}for(x=1,v=new Array(b-1);x<b;x++)v[x-1]=arguments[x];m.fn.apply(m.context,v)}else{var w=m.length,_;for(x=0;x<w;x++)switch(m[x].once&&this.removeListener(c,m[x].fn,void 0,!0),b){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,h);break;case 3:m[x].fn.call(m[x].context,h,u);break;case 4:m[x].fn.call(m[x].context,h,u,f);break;default:if(!v)for(_=1,v=new Array(b-1);_<b;_++)v[_-1]=arguments[_];m[x].fn.apply(m[x].context,v)}}return!0},a.prototype.on=function(c,h,u){return o(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return o(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,f){var p=n?n+c:c;if(!this._events[p])return this;if(!h)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===h&&(!f||g.once)&&(!u||g.context===u)&&s(this,p);else{for(var y=0,m=[],b=g.length;y<b;y++)(g[y].fn!==h||f&&!g[y].once||u&&g[y].context!==u)&&m.push(g[y]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})($h)),$h.exports}var zD=kD();const LD=V3(zD);var la=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class RD{constructor(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return la(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return la(this,null,function*(){if(e.length===0)return;const n=new nH(e);yield this.execute(n)})}undo(){return la(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return la(this,null,function*(){const e=this.redoStack.pop();e&&(yield e.apply(this.state),this.undoStack.push(e),this.emitHistoryChange("redo"))})}serialize(){return this.undoStack.map(e=>e.serialize())}clear(){this.undoStack=[],this.redoStack=[]}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}getHistorySize(){return this.undoStack.length}destroy(){this.clear()}emitHistoryChange(e){var n;(n=this.emitter)==null||n.emit("history:change",{type:"history:change",action:e})}}var X3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class HD{constructor(){this.extensions=new Vy,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=e=>{const n=this.editor.getDocument(),r=e.target;if(!r){this.deactivate();return}n.contains(r)||R4(r)?this.activate():this.deactivate()}}init(e){Object.assign(this,e),document.addEventListener("click",this.handleClick),this.interactions.forEach(n=>{this.extensions.register(n.name,n),n.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",n)})}isActive(){return this.active}select(e,n){const r=this.getSelection(),i=[],o=[];if(n==="replace"){const l=new Set(e);r.forEach(c=>{l.has(c)||o.push(c)}),e.forEach(c=>{this.selection.has(c)||i.push(c)}),this.selection=l}else n==="add"?e.forEach(l=>{this.selection.has(l)||(this.selection.add(l),i.push(l))}):n==="remove"?e.forEach(l=>{this.selection.delete(l)&&o.push(l)}):n==="toggle"&&e.forEach(l=>{this.selection.has(l)?(this.selection.delete(l),o.push(l)):(this.selection.add(l),i.push(l))});const s=this.getSelection(),a={type:"selection:change",previous:r,next:s,added:i,removed:o,mode:n};this.emitter.emit("selection:change",a)}getSelection(){return[...this.selection]}isSelected(e){return this.selection.has(e)}clearSelection(){const e=this.getSelection();this.selection.clear();const n={type:"selection:change",previous:e,next:[],added:[],removed:e,mode:"replace"};this.emitter.emit("selection:change",n)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}executeExclusiveInteraction(e,n){return X3(this,null,function*(){if(!(!this.active||this.running)){this.running=e;try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during exclusive interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.running=null}}})}executeConcurrentInteraction(e,n){return X3(this,null,function*(){if(this.active){this.concurrentInteractions.add(e);try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during concurrent interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.concurrentInteractions.delete(e)}}})}getOrCreateTransientContainer(){const e="transient-container",n=this.editor.getDocument(),r=Sr(n,e);if(r&&r.isConnected)return r;const i=wt("g");return oi(i,e),n.appendChild(i),i}appendTransientElement(e){return this.getOrCreateTransientContainer().appendChild(e),e}destroy(){this.extensions.forEach(e=>{e.destroy(),this.emitter.emit("interaction:destroyed",e)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class DD{constructor(){this.extensions=new Vy}init(e,n=[]){Object.assign(this,e),n.forEach(r=>{this.registerPlugin(r)})}getPlugin(e){return this.extensions.get(e)}getPlugins(){return this.extensions.getAll()}registerPlugin(e){this.extensions.register(e.name,e);const n={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};e.init(n),this.emitter.emit("plugin:registered",e)}unregisterPlugin(e){const n=this.extensions.get(e);n&&(n.destroy(),this.extensions.unregister(e),this.emitter.emit("plugin:unregistered",n))}destroy(){this.extensions.getAll().forEach(e=>{this.unregisterPlugin(e.name),this.emitter.emit("plugin:destroyed",e)}),this.extensions.destroy()}}var ND=Object.defineProperty,G3=Object.getOwnPropertySymbols,jD=Object.prototype.hasOwnProperty,FD=Object.prototype.propertyIsEnumerable,q3=(t,e,n)=>e in t?ND(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U3=(t,e)=>{for(var n in e||(e={}))jD.call(e,n)&&q3(t,n,e[n]);if(G3)for(var n of G3(e))FD.call(e,n)&&q3(t,n,e[n]);return t};class BD{init(e){Object.assign(this,e)}addItemDatum(e,n){const r=e.slice(0,-1),i=e[e.length-1],o=Array.isArray(n)?n:[n];Fy(this.options.data,r).splice(i,0,...o),this.emitter.emit("options:data:item:add",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:e,value:o}]})}updateItemDatum(e,n){const r=Pr(this.options.data,e);Object.assign(r,n),this.emitter.emit("options:data:item:update",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:e,value:n}]})}removeItemDatum(e,n=1){const r=e.slice(0,-1),i=e[e.length-1],s=Fy(this.options.data,r).splice(i,n);this.emitter.emit("options:data:item:remove",{indexes:e,datum:s}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:e,value:s}]})}updateData(e,n){this.options.data[e]=n,this.emitter.emit("options:data:update",{key:e,value:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${e}`,value:n}]})}updateElement(e,n){this.updateBuiltInElement(e,n)}updateOptions(e){this.options=U3(U3({},this.options),e),this.options.padding!==void 0&&np(this.editor.getDocument(),tr(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:e}]})}getOptions(){return this.options}updateBuiltInElement(e,n){var r,i;const{data:o}=this.options,{attributes:s={}}=n,a=gl(e),l=Tn(e)||kt.ItemLabel===a||kt.ItemDesc===a||kt.ItemValue===a||kt.ItemIllus===a,c=l?By(e):void 0;if(l){const h=Pr(o,c),u=a.replace("item-","");h.attributes||(h.attributes={}),(r=h.attributes)[u]||(r[u]={}),Object.assign(h.attributes[u],s)}else(kt.Title===a||kt.Desc===a||kt.Illus===a)&&(o.attributes||(o.attributes={}),(i=o.attributes)[a]||(i[a]={}),Object.assign(o.attributes[a],s));this.emitter.emit("options:element:update",{element:e,props:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:a,indexes:c,path:l?`${YR(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class WD{constructor(e,n,r){if(this.emitter=e,this.document=n,this.options=r,!n.isConnected)throw new Error("The provided document is not connected to the DOM.");n.style.userSelect="none";const i=new RD,o=new BD,s=new DD,a=new HD;i.init({state:o,emitter:e}),o.init({emitter:e,editor:this,commander:i,options:r}),s.init({emitter:e,editor:this,commander:i,state:o},r.plugins),a.init({emitter:e,editor:this,commander:i,state:o,interactions:r.interactions}),this.commander=i,this.state=o,this.plugin=s,this.interaction=a}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}var Ph,Z3;function VD(){if(Z3)return Ph;Z3=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;Ph=function(r,i){i=i||{};var o=1,s=1;function a(L){var M=L.match(/\n/g);M&&(o+=M.length);var R=L.lastIndexOf(`
|
|
539
|
-
`);s=~
|
|
538
|
+
`)}var JD=Object.defineProperty,J3=Object.getOwnPropertySymbols,tN=Object.prototype.hasOwnProperty,eN=Object.prototype.propertyIsEnumerable,tv=(t,e,n)=>e in t?JD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nN=(t,e)=>{for(var n in e||(e={}))tN.call(e,n)&&tv(t,n,e[n]);if(J3)for(var n of J3(e))eN.call(e,n)&&tv(t,n,e[n]);return t};class ev extends Ph{constructor(e){super(),this.options=e,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:n})=>{if(this.selection=n,n.length===0){this.container&&nv(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){nv(r);return}rN(r,i),this.placeEditBar(r,n),Th(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),Th(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),Th(this.container))}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged)}destroy(){var e;const{emitter:n}=this;n.off("selection:change",this.handleSelectionChanged),n.off("selection:geometrychange",this.handleGeometryChanged),n.off("history:change",this.handleHistoryChanged),(e=this.container)==null||e.remove()}getEditItems(e){let n=!1,r=!1,i=!1;for(const o of e)if(xn(o)?n=!0:zn(o)?r=!0:ew(o)&&(i=!0),n&&r&&i)break;return n&&!r&&!i?e.length===1?this.getTextEditItems(e[0]):this.getTextCollectionEditItems(e):!n&&r&&!i?e.length===1?this.getIconEditItems(e):this.getIconCollectionEditItems(e):!n&&!r&&i?e.length===1?this.getGeometryEditItems(e):this.getGeometryCollectionEditItems(e):this.getElementCollectionEditItems(e)}getOrCreateEditBar(){if(this.container)return this.container;const{style:e,className:n}=this.options||{},r=document.createElement("div");Object.assign(r.style,nN({visibility:"hidden",position:"absolute",left:"0",top:"0",display:"flex",flexFlow:"row",justifyContent:"center",alignItems:"center",height:"40px",minWidth:"40px",minHeight:"40px",borderRadius:"8px",padding:"0 4px",backgroundColor:"#fff",border:"1px solid rgba(239, 240, 240, 0.9)",zIndex:"9999",boxShadow:"rgba(0, 0, 0, 0.08) 0px 1px 2px -2px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.02) 0px 4px 8px 1px"},e)),n&&r.classList.add(n),di(r,_a),this.container=r;const{getContainer:i}=this.options||{},o=typeof i=="function"?i():i,s=o!=null?o:document.body;return s==null||s.appendChild(r),r}getTextEditItems(e){const{attributes:n={}}=vl(e);return[Y3,Z3,V3,G3].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=ud(e.map(o=>vl(o).attributes||{})),r=[Y3,Z3,V3,G3].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=Ol(e[0]);return[K3].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=ud(e.map(r=>Ol(r)));return[K3].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[vD(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=zr(n.map(w=>fn(i,w))),a=((r=e.offsetParent)!=null?r:document.documentElement).getBoundingClientRect(),l=document.documentElement.clientHeight,c=e.getBoundingClientRect(),h=8,u=vR(i),f=new DOMPoint(o.x+o.width/2,o.y).matrixTransform(u),p=new DOMPoint(o.x+o.width/2,o.y+o.height).matrixTransform(u),g=(w,_,$)=>Math.min(Math.max(w,_),$);let y=f.x-a.left-c.width/2;y=g(y,0,Math.max(a.width-c.width,0));const m=f.y-h,x=l-p.y-h;let b=m>=c.height||m>=x?f.y-a.top-c.height-h:p.y-a.top+h;b=g(b,0,Math.max(a.height-c.height,0)),e.style.left=`${y}px`,e.style.top=`${b}px`}}function Th(t){t.style.visibility="visible"}function nv(t){t.style.visibility="hidden"}function rN(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var iN=Object.defineProperty,rv=Object.getOwnPropertySymbols,oN=Object.prototype.hasOwnProperty,sN=Object.prototype.propertyIsEnumerable,iv=(t,e,n)=>e in t?iN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aN=(t,e)=>{for(var n in e||(e={}))oN.call(e,n)&&iv(t,n,e[n]);if(rv)for(var n of rv(e))sN.call(e,n)&&iv(t,n,e[n]);return t};const Zi=class en extends Ph{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:e})=>{const n=e.length===1?e[0]:null;n&&xn(n)?(this.target=n,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:e})=>{if(!this.target||e!==this.target)return;const n=this.getViewportRect(this.target);this.lastViewportRect=n,this.updateHandles(n)},this.handleHistoryChange=()=>{if(!this.target)return;const e=this.getViewportRect(this.target);this.lastViewportRect=e,this.updateHandles(e)},this.handlePointerMove=e=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.clientToElement(this.target,e.clientX,e.clientY),r=n.x-this.startPointer.x,i=n.y-this.startPointer.y,o=this.clampRect(this.applyDelta(this.startRect,r,i,this.activeHandle),this.activeHandle);this.lastRect=o,this.applyRect(this.target,o),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=e=>{if(this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.lastRect,r=this.startAttrs,i=n&&this.startRect&&this.hasRectChanged(this.startRect,n);if(this.cancelDrag(),i&&this.target&&n&&r)this.commander.execute(new pn(this.target,{attributes:n},{attributes:r})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const o=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(o)}}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChange),n.on("selection:geometrychange",this.handleGeometryChange),n.on("history:change",this.handleHistoryChange),n.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChange),e.off("selection:geometrychange",this.handleGeometryChange),e.off("history:change",this.handleHistoryChange),e.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const e=$t("g",{"pointer-events":"none"});this.overlay=$t("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=$t("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});e.appendChild(this.overlay),e.appendChild(n),this.outline=n;const r=en.HANDLE_POSITIONS,i={"top-left":"nwse-resize",top:"ns-resize","top-right":"nesw-resize",right:"ew-resize","bottom-right":"nwse-resize",bottom:"ns-resize","bottom-left":"nesw-resize",left:"ew-resize"};return r.forEach((o,s)=>{const l=o==="top"||o==="right"||o==="bottom"||o==="left"?$t("line",{stroke:"transparent","stroke-width":en.LINE_STROKE_WIDTH}):$t("circle",{r:en.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});l.style.cursor=i[o],l.style.pointerEvents="all",l.addEventListener("pointerdown",c=>this.handlePointerDown(c,o)),l.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault()}),e.appendChild(l),this.handles[s]=l}),this.editor.getDocument().appendChild(e),this.container=e,e}updateHandles(e){if(!this.target){this.hideHandles();return}const n=e||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!n){this.hideHandles();return}this.lastViewportRect=n;const r=this.ensureContainer();r.style.display="block",this.outline.style.display="block",Qt(this.outline,n),this.overlay&&(this.overlay.style.display="block",Qt(this.overlay,n));const i=this.getHandlePoints(n);this.handles.forEach((o,s)=>{const[a,l]=i[s];if(o.tagName==="circle")Qt(o,{cx:a,cy:l});else{const c=en.HANDLE_POSITIONS[s],h=this.getHandleLine(n,c);Qt(o,h)}o.style.display="block"})}hideHandles(){this.container&&(this.container.style.display="none"),this.outline&&(this.outline.style.display="none"),this.overlay&&(this.overlay.style.display="none"),this.handles.forEach(e=>e.style.display="none")}removeContainer(){var e;(e=this.container)==null||e.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(e,n){if(!this.target||e.button!==0&&e.pointerType==="mouse")return;e.stopPropagation(),e.preventDefault();const r=this.clientToElement(this.target,e.clientX,e.clientY);this.activeHandle=n,this.activePointerId=e.pointerId,this.startPointer=r;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs=aN({},i),this.lastRect=i,this.lastViewportRect=this.getViewportRect(this.target),window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}cancelDrag(){this.activeHandle=null,this.activePointerId=null,this.startPointer=void 0,this.startRect=void 0,this.startAttrs=void 0,this.lastRect=void 0,this.lastViewportRect=void 0,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}applyRect(e,n){Qt(e,{x:n.x,y:n.y,width:n.width,height:n.height})}getViewportRect(e){const{x:n,y:r,width:i,height:o}=fn(this.editor.getDocument(),e);return{x:n,y:r,width:i,height:o}}clientToElement(e,n,r){var i,o;const s=((i=e.getScreenCTM())==null?void 0:i.inverse())||((o=this.editor.getDocument().getScreenCTM())==null?void 0:o.inverse())||new DOMMatrix;return new DOMPoint(n,r).matrixTransform(s)}getCurrentAttributes(e){const n=Re(e,["x","y","width","height"],!1),r=this.getViewportRect(e),i=(o,s)=>{const a=o!==null?Number(o):NaN;return Number.isFinite(a)?a:s};return{x:i(n.x,r.x),y:i(n.y,r.y),width:i(n.width,r.width),height:i(n.height,r.height)}}getHandlePoints(e){const{x:n,y:r,width:i,height:o}=e,s=n+i/2,a=r+o/2;return[[n,r],[s,r],[n+i,r],[n+i,a],[n+i,r+o],[s,r+o],[n,r+o],[n,a]]}applyDelta(e,n,r,i){let{x:o,y:s,width:a,height:l}=e;switch(i){case"top-left":o+=n,s+=r,a-=n,l-=r;break;case"top":s+=r,l-=r;break;case"top-right":s+=r,a+=n,l-=r;break;case"right":a+=n;break;case"bottom-right":a+=n,l+=r;break;case"bottom":l+=r;break;case"bottom-left":o+=n,a-=n,l+=r;break;case"left":o+=n,a-=n;break}return{x:o,y:s,width:a,height:l}}clampRect(e,n){let{x:r,y:i,width:o,height:s}=e;if(o<en.MIN_SIZE){const a=en.MIN_SIZE-o;(n==="top-left"||n==="bottom-left"||n==="left")&&(r-=a),o=en.MIN_SIZE}if(s<en.MIN_SIZE){const a=en.MIN_SIZE-s;(n==="top-left"||n==="top-right"||n==="top")&&(i-=a),s=en.MIN_SIZE}return{x:r,y:i,width:o,height:s}}hasRectChanged(e,n){return Math.abs(e.x-n.x)>.5||Math.abs(e.y-n.y)>.5||Math.abs(e.width-n.width)>.5||Math.abs(e.height-n.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(e,n){const{x:r,y:i,width:o,height:s}=e;switch(n){case"top":return{x1:r,y1:i,x2:r+o,y2:i};case"right":return{x1:r+o,y1:i,x2:r+o,y2:i+s};case"bottom":return{x1:r,y1:i+s,x2:r+o,y2:i+s};case"left":default:return{x1:r,y1:i,x2:r,y2:i+s}}}};Zi.HANDLE_SIZE=10,Zi.LINE_STROKE_WIDTH=8,Zi.MIN_SIZE=1,Zi.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let ov=Zi;function sv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ah={exports:{}},av;function lN(){return av||(av=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function o(l,c,h,u,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new i(h,u||l,f),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(n?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=n?n+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var f=0,p=u.length,g=new Array(p);f<p;f++)g[f]=u[f].fn;return g},a.prototype.listenerCount=function(c){var h=n?n+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,f,p,g){var y=n?n+c:c;if(!this._events[y])return!1;var m=this._events[y],x=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),x){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,f),!0;case 5:return m.fn.call(m.context,h,u,f,p),!0;case 6:return m.fn.call(m.context,h,u,f,p,g),!0}for(b=1,v=new Array(x-1);b<x;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var w=m.length,_;for(b=0;b<w;b++)switch(m[b].once&&this.removeListener(c,m[b].fn,void 0,!0),x){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,h);break;case 3:m[b].fn.call(m[b].context,h,u);break;case 4:m[b].fn.call(m[b].context,h,u,f);break;default:if(!v)for(_=1,v=new Array(x-1);_<x;_++)v[_-1]=arguments[_];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(c,h,u){return o(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return o(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,f){var p=n?n+c:c;if(!this._events[p])return this;if(!h)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===h&&(!f||g.once)&&(!u||g.context===u)&&s(this,p);else{for(var y=0,m=[],x=g.length;y<x;y++)(g[y].fn!==h||f&&!g[y].once||u&&g[y].context!==u)&&m.push(g[y]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(Ah)),Ah.exports}var cN=lN();const hN=sv(cN);var pa=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class dN{constructor(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return pa(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return pa(this,null,function*(){if(e.length===0)return;const n=new TR(e);yield this.execute(n)})}undo(){return pa(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return pa(this,null,function*(){const e=this.redoStack.pop();e&&(yield e.apply(this.state),this.undoStack.push(e),this.emitHistoryChange("redo"))})}serialize(){return this.undoStack.map(e=>e.serialize())}clear(){this.undoStack=[],this.redoStack=[]}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}getHistorySize(){return this.undoStack.length}destroy(){this.clear()}emitHistoryChange(e){var n;(n=this.emitter)==null||n.emit("history:change",{type:"history:change",action:e})}}var lv=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class uN{constructor(){this.extensions=new s3,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=e=>{const n=this.editor.getDocument(),r=e.target;if(!r){this.deactivate();return}n.contains(r)||nw(r)?this.activate():this.deactivate()}}init(e){Object.assign(this,e),document.addEventListener("click",this.handleClick),this.interactions.forEach(n=>{this.extensions.register(n.name,n),n.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",n)})}isActive(){return this.active}select(e,n){const r=this.getSelection(),i=[],o=[];if(n==="replace"){const l=new Set(e);r.forEach(c=>{l.has(c)||o.push(c)}),e.forEach(c=>{this.selection.has(c)||i.push(c)}),this.selection=l}else n==="add"?e.forEach(l=>{this.selection.has(l)||(this.selection.add(l),i.push(l))}):n==="remove"?e.forEach(l=>{this.selection.delete(l)&&o.push(l)}):n==="toggle"&&e.forEach(l=>{this.selection.has(l)?(this.selection.delete(l),o.push(l)):(this.selection.add(l),i.push(l))});const s=this.getSelection(),a={type:"selection:change",previous:r,next:s,added:i,removed:o,mode:n};this.emitter.emit("selection:change",a)}getSelection(){return[...this.selection]}isSelected(e){return this.selection.has(e)}clearSelection(){const e=this.getSelection();this.selection.clear();const n={type:"selection:change",previous:e,next:[],added:[],removed:e,mode:"replace"};this.emitter.emit("selection:change",n)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}executeExclusiveInteraction(e,n){return lv(this,null,function*(){if(!(!this.active||this.running)){this.running=e;try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during exclusive interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.running=null}}})}executeConcurrentInteraction(e,n){return lv(this,null,function*(){if(this.active){this.concurrentInteractions.add(e);try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during concurrent interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.concurrentInteractions.delete(e)}}})}getOrCreateTransientContainer(){const e="transient-container",n=this.editor.getDocument(),r=Ir(n,e);if(r&&r.isConnected)return r;const i=$t("g");return di(i,e),n.appendChild(i),i}appendTransientElement(e){return this.getOrCreateTransientContainer().appendChild(e),e}destroy(){this.extensions.forEach(e=>{e.destroy(),this.emitter.emit("interaction:destroyed",e)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class fN{constructor(){this.extensions=new s3}init(e,n=[]){Object.assign(this,e),n.forEach(r=>{this.registerPlugin(r)})}getPlugin(e){return this.extensions.get(e)}getPlugins(){return this.extensions.getAll()}registerPlugin(e){this.extensions.register(e.name,e);const n={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};e.init(n),this.emitter.emit("plugin:registered",e)}unregisterPlugin(e){const n=this.extensions.get(e);n&&(n.destroy(),this.extensions.unregister(e),this.emitter.emit("plugin:unregistered",n))}destroy(){this.extensions.getAll().forEach(e=>{this.unregisterPlugin(e.name),this.emitter.emit("plugin:destroyed",e)}),this.extensions.destroy()}}var pN=Object.defineProperty,cv=Object.getOwnPropertySymbols,gN=Object.prototype.hasOwnProperty,mN=Object.prototype.propertyIsEnumerable,hv=(t,e,n)=>e in t?pN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dv=(t,e)=>{for(var n in e||(e={}))gN.call(e,n)&&hv(t,n,e[n]);if(cv)for(var n of cv(e))mN.call(e,n)&&hv(t,n,e[n]);return t};class yN{init(e){Object.assign(this,e)}addItemDatum(e,n){const r=e.slice(0,-1),i=e[e.length-1],o=Array.isArray(n)?n:[n];r3(this.options.data,r).splice(i,0,...o),this.emitter.emit("options:data:item:add",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:e,value:o}]})}updateItemDatum(e,n){const r=hi(this.options.data,e);Object.assign(r,n),this.emitter.emit("options:data:item:update",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:e,value:n}]})}removeItemDatum(e,n=1){const r=e.slice(0,-1),i=e[e.length-1],s=r3(this.options.data,r).splice(i,n);this.emitter.emit("options:data:item:remove",{indexes:e,datum:s}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:e,value:s}]})}updateData(e,n){this.options.data[e]=n,this.emitter.emit("options:data:update",{key:e,value:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${e}`,value:n}]})}updateElement(e,n){this.updateBuiltInElement(e,n)}updateOptions(e){this.options=dv(dv({},this.options),e),this.options.padding!==void 0&&hp(this.editor.getDocument(),rr(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:e}]})}getOptions(){return this.options}updateBuiltInElement(e,n){var r,i;const{data:o}=this.options,{attributes:s={}}=n,a=bl(e),l=zn(e)||zt.ItemLabel===a||zt.ItemDesc===a||zt.ItemValue===a||zt.ItemIllus===a,c=l?i3(e):void 0;if(l){const h=hi(o,c),u=a.replace("item-","");h.attributes||(h.attributes={}),(r=h.attributes)[u]||(r[u]={}),Object.assign(h.attributes[u],s)}else(zt.Title===a||zt.Desc===a||zt.Illus===a)&&(o.attributes||(o.attributes={}),(i=o.attributes)[a]||(i[a]={}),Object.assign(o.attributes[a],s));this.emitter.emit("options:element:update",{element:e,props:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:a,indexes:c,path:l?`${bR(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class vN{constructor(e,n,r){if(this.emitter=e,this.document=n,this.options=r,!n.isConnected)throw new Error("The provided document is not connected to the DOM.");n.style.userSelect="none";const i=new dN,o=new yN,s=new fN,a=new uN;i.init({state:o,emitter:e}),o.init({emitter:e,editor:this,commander:i,options:r}),s.init({emitter:e,editor:this,commander:i,state:o},r.plugins),a.init({emitter:e,editor:this,commander:i,state:o,interactions:r.interactions}),this.commander=i,this.state=o,this.plugin=s,this.interaction=a}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}var kh,uv;function xN(){if(uv)return kh;uv=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;kh=function(r,i){i=i||{};var o=1,s=1;function a(z){var M=z.match(/\n/g);M&&(o+=M.length);var H=z.lastIndexOf(`
|
|
539
|
+
`);s=~H?z.length-H:s+z.length}function l(){var z={line:o,column:s};return function(M){return M.position=new c(z),x(),M}}function c(z){this.start=z,this.end={line:o,column:s},this.source=i.source}c.prototype.content=r;var h=[];function u(z){var M=new Error(i.source+":"+o+":"+s+": "+z);if(M.reason=z,M.filename=i.source,M.line=o,M.column=s,M.source=r,i.silent)h.push(M);else throw M}function f(){var z=y();return{type:"stylesheet",stylesheet:{source:i.source,rules:z,parsingErrors:h}}}function p(){return m(/^{\s*/)}function g(){return m(/^}/)}function y(){var z,M=[];for(x(),v(M);r.length&&r.charAt(0)!="}"&&(z=j()||X());)z!==!1&&(M.push(z),v(M));return M}function m(z){var M=z.exec(r);if(M){var H=M[0];return a(H),r=r.slice(H.length),M}}function x(){m(/^\s*/)}function v(z){var M;for(z=z||[];M=b();)M!==!1&&z.push(M);return z}function b(){var z=l();if(!(r.charAt(0)!="/"||r.charAt(1)!="*")){for(var M=2;r.charAt(M)!=""&&(r.charAt(M)!="*"||r.charAt(M+1)!="/");)++M;if(M+=2,r.charAt(M-1)==="")return u("End of comment missing");var H=r.slice(2,M-2);return s+=2,a(H),r=r.slice(M),s+=2,z({type:"comment",comment:H})}}function w(){var z=m(/^([^{]+)/);if(z)return e(z[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(M){return M.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(M){return M.replace(/\u200C/g,",")})}function _(){var z=l(),M=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(M){if(M=e(M[0]),!m(/^:\s*/))return u("property missing ':'");var H=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),B=z({type:"declaration",property:M.replace(t,""),value:H?e(H[0]).replace(t,""):""});return m(/^[;\s]*/),B}}function $(){var z=[];if(!p())return u("missing '{'");v(z);for(var M;M=_();)M!==!1&&(z.push(M),v(z));return g()?z:u("missing '}'")}function P(){for(var z,M=[],H=l();z=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)M.push(z[1]),m(/^,\s*/);if(M.length)return H({type:"keyframe",values:M,declarations:$()})}function C(){var z=l(),H=m(/^@([-\w]+)?keyframes\s*/);if(H){var M=H[1],H=m(/^([-\w]+)\s*/);if(!H)return u("@keyframes missing name");var B=H[1];if(!p())return u("@keyframes missing '{'");for(var U,Y=v();U=P();)Y.push(U),Y=Y.concat(v());return g()?z({type:"keyframes",name:B,vendor:M,keyframes:Y}):u("@keyframes missing '}'")}}function A(){var z=l(),M=m(/^@supports *([^{]+)/);if(M){var H=e(M[1]);if(!p())return u("@supports missing '{'");var B=v().concat(y());return g()?z({type:"supports",supports:H,rules:B}):u("@supports missing '}'")}}function E(){var z=l(),M=m(/^@host\s*/);if(M){if(!p())return u("@host missing '{'");var H=v().concat(y());return g()?z({type:"host",rules:H}):u("@host missing '}'")}}function S(){var z=l(),M=m(/^@media *([^{]+)/);if(M){var H=e(M[1]);if(!p())return u("@media missing '{'");var B=v().concat(y());return g()?z({type:"media",media:H,rules:B}):u("@media missing '}'")}}function R(){var z=l(),M=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(M)return z({type:"custom-media",name:e(M[1]),media:e(M[2])})}function O(){var z=l(),M=m(/^@page */);if(M){var H=w()||[];if(!p())return u("@page missing '{'");for(var B=v(),U;U=_();)B.push(U),B=B.concat(v());return g()?z({type:"page",selectors:H,declarations:B}):u("@page missing '}'")}}function T(){var z=l(),M=m(/^@([-\w]+)?document *([^{]+)/);if(M){var H=e(M[1]),B=e(M[2]);if(!p())return u("@document missing '{'");var U=v().concat(y());return g()?z({type:"document",document:B,vendor:H,rules:U}):u("@document missing '}'")}}function F(){var z=l(),M=m(/^@font-face\s*/);if(M){if(!p())return u("@font-face missing '{'");for(var H=v(),B;B=_();)H.push(B),H=H.concat(v());return g()?z({type:"font-face",declarations:H}):u("@font-face missing '}'")}}var L=N("import"),D=N("charset"),k=N("namespace");function N(z){var M=new RegExp("^@"+z+"\\s*([^;]+);");return function(){var H=l(),B=m(M);if(B){var U={type:z};return U[z]=B[1].trim(),H(U)}}}function j(){if(r[0]=="@")return C()||S()||R()||A()||L()||D()||k()||T()||O()||E()||F()}function X(){var z=l(),M=w();return M?(v(),z({type:"rule",selectors:M,declarations:$()})):u("selector missing")}return n(f())};function e(r){return r?r.replace(/^\s+|\s+$/g,""):""}function n(r,i){var o=r&&typeof r.type=="string",s=o?r:i;for(var a in r){var l=r[a];Array.isArray(l)?l.forEach(function(c){n(c,s)}):l&&typeof l=="object"&&n(l,s)}return o&&Object.defineProperty(r,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),r}return kh}var bN=xN();const wN=sv(bN);var Xr=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function _N(t,e=!0){return Xr(this,null,function*(){const n=$N(t);if(n.size===0)return;const r=[];yield Promise.all(Array.from(n).map(i=>Xr(null,null,function*(){const o=CN(i);if(!o.length)return;const s=yield PN(i);if(!s.length)return;const a=yield Promise.all(s.map(l=>Xr(null,null,function*(){const c=MN(l),h=c["unicode-range"].replace(/\s/g,"");if(!o.find(y=>y.unicodeRange&&y.unicodeRange.replace(/\s/g,"")===h))return null;const f=Qw(c["font-family"],Qu(c["font-weight"]));if(!f)return null;const p=c.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!(p!=null&&p[1]))return null;const g=Ml(f,p[1]);if(e){const y=yield EN(g);c.src=`url(${y}) format('woff2')`}else c.src=`url(${g}) format('woff2')`;return c})));r.push(...a.filter(Boolean)||[])}))),r.length>0&&SN(t,r)})}function $N(t){const e=new Set,n=i=>{i&&Kn(i).forEach(o=>{const s=Sr(o);s&&e.add(s)})};n(t.getAttribute("font-family"));const r=t.querySelectorAll("foreignObject span");for(const i of r)n(i.style.fontFamily);return e}function PN(t){return Xr(this,null,function*(){const e=Mf(t),n=[];return yield Promise.allSettled(e.map(r=>Xr(null,null,function*(){var i;const o=yield Oo(r).then(s=>s.text()).then(s=>wN(s)).catch(()=>(console.error(`Failed to fetch or parse font CSS: ${r}`),null));(i=o==null?void 0:o.stylesheet)==null||i.rules.forEach(s=>{if(s.type==="font-face"){const a=ON(s);n.push(a)}})}))),n})}function CN(t){const e=[],n=Kn(t).map(r=>Sr(r));return document.fonts.forEach(r=>{n.includes(Sr(r.family))&&r.status==="loaded"&&e.push(r)}),e}function ON(t){const e=t.declarations||[],n={};return e.forEach(r=>{const{property:i,value:o}=r;i&&o&&(n[i]=o)}),n}function MN(t){var e,n,r,i,o,s;return{"font-family":(e=t["font-family"])!=null?e:"",src:(n=t.src)!=null?n:"","font-style":(r=t["font-style"])!=null?r:"normal","font-display":(i=t["font-display"])!=null?i:"swap","font-weight":(o=t["font-weight"])!=null?o:"400","unicode-range":(s=t["unicode-range"])!=null?s:"U+0-FFFF"}}function SN(t,e){const n=[],r=new Set;for(const s of e){const a=[s["font-family"],s["font-weight"],s["font-style"],s["unicode-range"],s.src].join("|");r.has(a)||(r.add(a),n.push(s))}if(n.length===0)return;const i=$t("style",{type:"text/css"});i.innerHTML=n.map(s=>`
|
|
540
540
|
@font-face {
|
|
541
541
|
font-family: ${s["font-family"]};
|
|
542
542
|
src: ${s.src};
|
|
@@ -546,5 +546,5 @@ ${t.trim()}
|
|
|
546
546
|
unicode-range: ${s["unicode-range"]};
|
|
547
547
|
}
|
|
548
548
|
`.trim()).join(`
|
|
549
|
-
`);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function tN(t){return Br(this,null,function*(){const e=yield wo(t);if(!e.ok)throw new Error(`Failed to load font: ${t}`);const n=yield e.blob();return yield new Promise((i,o)=>{const s=new FileReader;s.onloadend=()=>{i(s.result)},s.onerror=o,s.readAsDataURL(n)})})}var Oh=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function eN(t){return Oh(this,arguments,function*(e,n={}){const r=yield K3(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function K3(t){return Oh(this,arguments,function*(e,n={}){const{embedResources:r=!0}=n,i=e.cloneNode(!0),{width:o,height:s}=oc(e);return Yt(i,{width:o,height:s}),yield nN(i),yield GD(i,r),iN(i),i})}function nN(t){return Oh(this,null,function*(){const e=t.querySelectorAll("use"),n=rN(t);e.forEach(r=>{const i=r.getAttribute("href");if(!i)return;if(!t.querySelector(i)){const s=document.querySelector(i);s&&n.appendChild(s.cloneNode(!0))}})})}const Q3="icon-defs";function rN(t){const e=Sr(t,Q3);if(e)return e;const n=wt("defs");return oi(n,Q3),t.prepend(n),n}function iN(t){oN(t),sN(t),aN(t),lN(t)}function oN(t){const e=Sr(t,kt.BtnsGroup);e==null||e.remove();const n=Sr(t,"btn-icon-defs");n==null||n.remove()}function sN(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function aN(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function lN(t){hl(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var cN=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function hN(t){return cN(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield K3(e),{width:s,height:a}=oc(o);return new Promise((l,c)=>{try{const h=document.createElement("canvas");h.width=s*i,h.height=a*i;const u=h.getContext("2d");if(!u){c(new Error("Failed to get canvas context"));return}u.scale(i,i),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",o.setAttribute("width",String(s)),o.setAttribute("height",String(a));const f=new XMLSerializer().serializeToString(o),p="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f),g=new Image;g.onload=function(){u.clearRect(0,0,s,a),u.drawImage(g,0,0,s,a);const y=h.toDataURL("image/png");l(y)},g.onerror=function(y){c(new Error("Image load failed: "+y))},g.src=p}catch(h){c(h)}})})}var dN=Object.defineProperty,uN=Object.defineProperties,fN=Object.getOwnPropertyDescriptors,ca=Object.getOwnPropertySymbols,J3=Object.prototype.hasOwnProperty,tv=Object.prototype.propertyIsEnumerable,ev=(t,e,n)=>e in t?dN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qe=(t,e)=>{for(var n in e||(e={}))J3.call(e,n)&&ev(t,n,e[n]);if(ca)for(var n of ca(e))tv.call(e,n)&&ev(t,n,e[n]);return t},ha=(t,e)=>uN(t,fN(e)),Wr=(t,e)=>{var n={};for(var r in t)J3.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ca)for(var r of ca(t))e.indexOf(r)<0&&tv.call(t,r)&&(n[r]=t[r]);return n};function pN(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=Wr(e,["container","padding","template","design","theme","themeConfig"]),c=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,h=i?Hh(i):void 0,u=ep({},h==null?void 0:h.themeConfig,a),f=s||a||h!=null&&h.themeConfig?vN(s,u):void 0,p={container:c,padding:tr(r)};if(h){const g=h,{design:y}=g,m=Wr(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=gN(qe(qe({},h==null?void 0:h.design),o),f?ha(qe({},t),{themeConfig:f}):t);yu(g)&&(p.design=g)}return s&&(p.theme=s),f&&(p.themeConfig=f),p}function Ch(t){if(typeof t=="string")return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function gN(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=nv(i||(o==null?void 0:o[0]),e);return{structure:mN(n),title:yN(r,e),item:s,items:o?o.map(a=>nv(a,e)):[s]}}function mN(t){if(!t)return null;const e=Ch(t),{type:n}=e,r=Wr(e,["type"]),i=r2(n);if(!i)return null;const{component:o}=i;return ha(qe({},i),{component:s=>o(qe(qe({},s),r))})}function yN(t,e){if(!t)return{component:null};const n=Ch(t),{type:r}=n,i=Wr(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=rv(s,s);return{component:l=>lg(qe(ha(qe({},l),{themeColors:a}),i))}}function nv(t,e){if(!t)return null;const n=Ch(t),{type:r}=n,i=Wr(n,["type"]),o=mg(r);if(!o)return null;const{component:s,options:a}=o;return ha(qe({},o),{component:l=>{var c;const{indexes:h}=l,{data:u,themeConfig:f}=e,p=(f==null?void 0:f.colorBg)||"#fff",g=l,{themeColors:y=rv(Oo(f==null?void 0:f.palette,h,(c=u==null?void 0:u.items)==null?void 0:c.length)||(f==null?void 0:f.colorPrimary)||"#FF356A",p)}=g,m=Wr(g,["themeColors"]);return s(qe(qe({themeColors:y},m),i))},options:a})}function vN(t,e={}){var n;const r=t?cg(t)||{}:{},i=ep({},r,e);return i.palette=e.palette||r.palette,i.stylize=(n=e.stylize)!=null?n:r.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}function rv(t,e="#fff"){return ug({colorPrimary:t,isDarkMode:lu(e),colorBg:e})}function bN(t){return t===" "||t===" "}function xN(t){let e=0,n=0;for(;n<t.length;){const r=t[n];if(r===" "){e+=1,n+=1;continue}if(r===" "){e+=2,n+=1;continue}break}return{indent:e,content:t.slice(n)}}function wN(t){return t.trimEnd()}function iv(t){const e=t.trim();if(!e)return null;const n=e.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);if(n)return{key:n[1],value:n[2].trim()};const r=e.match(/^([^\s]+)\s+(.*)$/);return r?{key:r[1],value:r[2].trim()}:{key:e,value:void 0}}function Mh(t,e){return{kind:"object",line:t,value:e,entries:{}}}function _N(t){return{kind:"array",line:t,items:[]}}function $N(t){const e=[],n=Mh(0),r=[{indent:-1,node:n,parent:null,key:null}];return t.split(/\r?\n/).forEach((o,s)=>{const a=s+1;if(!o.trim())return;const{indent:l,content:c}=xN(o),h=wN(c);if(!h.trim())return;for(;r.length>1&&l<=r[r.length-1].indent;)r.pop();const u=r[r.length-1];let f=u.node;const p=h.trim();if(p.startsWith("-")&&(p.length===1||bN(p[1]))){if(f.kind!=="array")if(f.kind==="object"&&Object.keys(f.entries).length===0&&f.value===void 0&&u.parent&&u.key){const v=_N(f.line);if(u.parent.kind==="object")u.parent.entries[u.key]=v;else if(u.parent.kind==="array"){const x=u.parent.items.indexOf(f);x>=0&&(u.parent.items[x]=v)}u.node=v,f=v}else{e.push({path:"",line:a,code:"bad_list",message:"List item is not under an array container.",raw:p});return}const m=p.slice(1).trim(),b=Mh(a,m||void 0);f.items.push(b),r.push({indent:l,node:b,parent:f});return}const g=iv(p);if(!g){e.push({path:"",line:a,code:"bad_syntax",message:"Invalid syntax line.",raw:p});return}if(f.kind!=="object"){e.push({path:"",line:a,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:p});return}const y=Mh(a,g.value);f.entries[g.key]=y,r.push({indent:l,node:y,parent:f,key:g.key})}),{ast:n,errors:e}}function ov(t){return iv(t)}function da(t,e){return{kind:"value",line:e,value:t}}const PN=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,ON=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function gr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function mr(t){if(t.kind==="value"||t.kind==="object")return t.value}function fe(t,e,n,r,i,o){t.push({path:n,line:e.line,code:r,message:i,raw:o})}function sv(t,e="any"){let n=t.trim();if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1).trim()),!n)return[];let r;e==="comma"?r=n.split(","):e==="space"?r=n.split(/\s+/):r=n.split(/[,\s]+/);const i=[];for(const o of r){const s=o.trim();if(s){if(s==="#"||s==="//")break;i.push(s)}}return i}function CN(t){let e=t.trim();const n=e.search(/\s+#(?![0-9a-f])/i);n>=0&&(e=e.slice(0,n).trimEnd());const r=e.indexOf("//");return r>=0&&(e=e.slice(0,r).trimEnd()),e}function Sh(t){const e=CN(t);if(!e)return;const n=e.match(PN);if(n&&n[0].length===e.length)return e;const r=e.match(ON);if(r&&r[1].length===e.length||ot(e).isValid())return e}function av(t,e,n,r={}){const i=mr(t);if(i===void 0){fe(n,t,e,"schema_mismatch","Expected color value.");return}const o=Sh(i);if(!o){r.soft||fe(n,t,e,"invalid_value","Invalid color value.",i);return}return o}function MN(t,e){return e.length>1||t.startsWith("[")&&t.endsWith("]")?!0:Sh(t)!==void 0}function Eh(t){if(t.kind==="array")return t.items.map(r=>Eh(r));if(t.kind==="value"||!(Object.keys(t.entries).length>0)&&t.value!==void 0)return gr(t.value);const n={};return t.value!==void 0&&(n.value=gr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=Eh(i)}),n}function SN(t,e,n,r){let i,o=null;for(const s of e.variants){const a=[],l=Re(t,s,n,a);(o===null||a.length<o.length)&&(o=a,i=l)}return o&&r.push(...o),i}function Re(t,e,n,r){switch(e.kind){case"union":return SN(t,e,n,r);case"string":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected number value.");return}const s=i.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);if(!s){fe(r,t,n,"invalid_value","Invalid number value.",i);return}return parseFloat(s[1])}case"boolean":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected boolean value.");return}if(i!=="true"&&i!=="false"){fe(r,t,n,"invalid_value","Invalid boolean value.",i);return}return i==="true"}case"enum":{const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected enum value.");return}if(!e.values.includes(i)){fe(r,t,n,"invalid_value","Invalid enum value.",i);return}return i}case"array":{if(t.kind==="array")return t.items.map((a,l)=>Re(a,e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0);if(t.kind==="object"&&Object.keys(t.entries).length>0){fe(r,t,n,"schema_mismatch","Expected array value.");return}const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected array value.");return}const o=i.trim();return o.startsWith("[")&&!o.endsWith("]")?void 0:sv(i,e.split).map((a,l)=>Re(da(a,t.line),e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0)}case"palette":{if(t.kind==="array"){const l=Re(t,{kind:"array",item:{kind:"color"},split:"any"},n,r);return Array.isArray(l)&&l.length>0?l:void 0}if(t.kind==="object"&&Object.keys(t.entries).length>0){fe(r,t,n,"schema_mismatch","Expected palette value.");return}const i=mr(t);if(i===void 0){fe(r,t,n,"schema_mismatch","Expected palette value.");return}const o=i.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;const s=Sh(o);if(s)return[s];const a=sv(i,"any");if(MN(o,a)){const l=a.map((c,h)=>av(da(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return av(t,n,r,{soft:e.soft});case"object":{if(t.kind==="array"){fe(r,t,n,"schema_mismatch","Expected object value.");return}const i={};if(t.kind==="value"){if(e.shorthandKey)return i[e.shorthandKey]=t.value,i;const o=ov(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=Re(da(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);return s!==void 0&&(i[o.key]=s),i}return e.allowUnknown?(i[o.key]=gr(o.value),i):(fe(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=gr(t.value),i;fe(r,t,n,"invalid_value","Expected object value.");return}if(t.value!==void 0)if(e.shorthandKey&&i[e.shorthandKey]===void 0)i[e.shorthandKey]=t.value;else{const o=ov(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=Re(da(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);s!==void 0&&i[o.key]===void 0&&(i[o.key]=s)}else e.allowUnknown?i[o.key]=gr(o.value):fe(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=gr(t.value))}return Object.entries(t.entries).forEach(([o,s])=>{const a=e.fields[o];if(!a){if(e.allowUnknown){i[o]=Eh(s);return}fe(r,s,`${n}.${o}`,"unknown_key","Unknown key in object.",o);return}const l=Re(s,a,`${n}.${o}`,r);l!==void 0&&(i[o]=l)}),i}default:return}}const Ue=()=>({kind:"string"}),Dn=()=>({kind:"number"}),EN=t=>({kind:"enum",values:t}),Vr=(t={})=>({kind:"color",soft:t.soft}),Ih=(t,e="any")=>({kind:"array",item:t,split:e}),Ce=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),Th=(...t)=>({kind:"union",variants:t}),IN=()=>({kind:"palette"}),lv={fill:Vr({soft:!0}),stroke:Vr({soft:!0})},Yr=Ce(lv,{allowUnknown:!0}),Ah=Ce(lv,{allowUnknown:!0}),kh=Ce({},{allowUnknown:!0});kh.fields={label:Ue(),value:Th(Dn(),Ue()),desc:Ue(),icon:Ue(),children:Ih(kh)};const cv=Ce({type:Ue(),colorBg:Vr(),colorPrimary:Vr(),palette:IN(),title:Yr,desc:Yr,shape:Ah,base:Ce({global:Ce({},{allowUnknown:!0}),shape:Ah,text:Yr}),item:Ce({icon:Ce({},{allowUnknown:!0}),label:Yr,desc:Yr,value:Yr,shape:Ah}),stylize:Ce({type:EN(["rough","pattern"]),roughness:Dn(),bowing:Dn(),fillWeight:Dn(),hachureGap:Dn(),pattern:Ue(),backgroundColor:Vr(),foregroundColor:Vr(),scale:Dn()},{shorthandKey:"type"}),elements:Ce({},{allowUnknown:!0})},{shorthandKey:"type"}),ua=Ce({},{allowUnknown:!0,shorthandKey:"type"}),hv=Ce({structure:ua,item:ua,items:Ih(ua),title:ua}),dv=Ce({title:Ue(),desc:Ue(),items:Ih(kh)}),uv=Ce({type:Ue()},{shorthandKey:"type"}),fv=Ce({template:uv,design:hv,data:dv,theme:cv,width:Th(Dn(),Ue()),height:Th(Dn(),Ue())});var TN=Object.defineProperty,fa=Object.getOwnPropertySymbols,pv=Object.prototype.hasOwnProperty,gv=Object.prototype.propertyIsEnumerable,mv=(t,e,n)=>e in t?TN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AN=(t,e)=>{for(var n in e||(e={}))pv.call(e,n)&&mv(t,n,e[n]);if(fa)for(var n of fa(e))gv.call(e,n)&&mv(t,n,e[n]);return t},kN=(t,e)=>{var n={};for(var r in t)pv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fa)for(var r of fa(t))e.indexOf(r)<0&&gv.call(t,r)&&(n[r]=t[r]);return n};function zN(t,e){if(!t)return;const n=Re(t,uv,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function yv(t){const{ast:e,errors:n}=$N(t),r=[],i={},o=AN({},e.entries),s=e.entries.infographic;let a;s&&s.kind==="object"&&(s.value&&(a=s.value),Object.entries(s.entries).forEach(([m,b])=>{m in o||(o[m]=b)}));const l=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(o).forEach(m=>{l.has(m)||n.push({path:m,line:o[m].line,code:"unknown_key",message:"Unknown top-level key.",raw:m})});const c=o.template,h=zN(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=Re(u,hv,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=Re(f,dv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=Re(p,cv,"theme",n);if(m&&typeof m=="object"){const b=m,{type:v}=b,x=kN(b,["type"]);typeof v=="string"&&v&&(i.theme=v),Object.keys(x).length>0&&(i.themeConfig=x)}}const g=o.width;if(g){const m=Re(g,fv.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=Re(y,fv.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const LN=()=>[new N3,new W3],RN=()=>[new o3,new Yy,new Xy,new s3,new l3,new f3,new d3],HN={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return LN()},get interactions(){return RN()}};var DN=Object.defineProperty,vv=Object.getOwnPropertySymbols,NN=Object.prototype.hasOwnProperty,jN=Object.prototype.propertyIsEnumerable,bv=(t,e,n)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$n=(t,e)=>{for(var n in e||(e={}))NN.call(e,n)&&bv(t,n,e[n]);if(vv)for(var n of vv(e))jN.call(e,n)&&bv(t,n,e[n]);return t};function zh(t,e){const n=$n($n({},t),e);return(t.design||e.design)&&(n.design=$n($n({},t.design),e.design)),(t.themeConfig||e.themeConfig)&&(n.themeConfig=$n($n({},t.themeConfig),e.themeConfig)),(t.svg||e.svg)&&(n.svg=$n($n({},t.svg),e.svg)),n}function pa(t){const e=$n({},t);return e.data&&(e.data=J0(e.data)),e.elements&&(e.elements=J0(e.elements)),e}function xv(t){const{design:e,data:n}=t;return!(!e||!yu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var FN=Object.defineProperty,wv=Object.getOwnPropertySymbols,BN=Object.prototype.hasOwnProperty,WN=Object.prototype.propertyIsEnumerable,_v=(t,e,n)=>e in t?FN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VN=(t,e)=>{for(var n in e||(e={}))BN.call(e,n)&&_v(t,n,e[n]);if(wv)for(var n of wv(e))WN.call(e,n)&&_v(t,n,e[n]);return t},YN=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class XN{constructor(e){this.rendered=!1,this.emitter=new LD,this.node=null,this.initialOptions={},this.setOptions(e,"replace",!0)}getOptions(){return this.options}setOptions(e,n="replace",r=!1){const{options:i,errors:o,warnings:s}=GN(e);r&&(this.initialOptions=pa(i));const a=zh(n==="replace"?pa(this.initialOptions||{}):this.options||pa(this.initialOptions||{}),i);this.options=a,this.parsedOptions=pN(zh(HN,this.options)),s.length&&this.emitter.emit("warning",s),o.length&&this.emitter.emit("error",o)}render(e){e?this.setOptions(e,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(e){this.setOptions(e,"merge"),this.performRender()}performRender(){var e;const n=this.parsedOptions;if(!xv(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new w$(n,i);this.node=o.render(),r==null||r.replaceChildren(this.node),(e=this.editor)==null||e.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new WD(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options})}compose(e){const{design:n,data:r}=e,{title:i,item:o,items:s,structure:a}=n,{component:l,props:c}=a,h=i.component,u=o.component,f=s.map(y=>y.component),p=bp(d(l,VN({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Mr(p);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const e=this.parsedOptions;if(!xv(e)){this.emitter.emit("error",new Error("Incomplete options"));return}const n=e.design,r=n.structure.composites||[],i=n.items.map(o=>o.composites||[]);return F4({structure:r,items:i})}toDataURL(e){return YN(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield eN(this.node,e):yield hN(this.node,e)})}on(e,n){this.emitter.on(e,n)}off(e,n){this.emitter.off(e,n)}destroy(){var e,n;(e=this.editor)==null||e.destroy(),(n=this.node)==null||n.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function GN(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=yv(t);return{options:e,errors:n,warnings:r}}return{options:pa(t),errors:[],warnings:[]}}const qN=De.version;F.AlignLayout=wi,F.BadgeCard=bg,F.BrushSelect=Yy,F.BtnAdd=q,F.BtnRemove=Ft,F.BtnsGroup=Ot,F.CandyCardLite=_g,F.CapsuleItem=Ig,F.ChartBar=i2,F.ChartColumn=o2,F.ChartLine=c2,F.ChartPie=h2,F.ChartWordCloud=m2,F.CircleNode=kg,F.CircularProgress=Rg,F.ClickSelect=Xy,F.CompactCard=jg,F.CompareBinaryHorizontal=C2,F.CompareHierarchyLeftRight=I2,F.CompareHierarchyRow=T2,F.DblClickEditText=o3,F.Defs=zt,F.DoneList=Wg,F.DragElement=s3,F.EditBar=N3,F.Ellipse=Lt,F.FlexLayout=lt,F.Fragment=pi,F.Gap=Kt,F.Group=Y,F.HierarchyMindmap=j2,F.HierarchyTree=V2,F.HorizontalIconArrow=Xg,F.HorizontalIconLine=Kg,F.HotkeyHistory=l3,F.IconBadge=t1,F.Illus=Ip,F.IndexedCard=r1,F.Infographic=XN,F.Interaction=Rn,F.ItemDesc=Xt,F.ItemIcon=be,F.ItemIconCircle=nr,F.ItemLabel=$t,F.ItemValue=xi,F.ItemsGroup=It,F.LCornerCard=s1,F.LabelText=v1,F.LetterCard=c1,F.LinedText=u1,F.ListColumn=Y2,F.ListGrid=X2,F.ListPyramid=G2,F.ListRow=q2,F.ListSector=K2,F.ListWaterfall=Q2,F.Path=ht,F.PillBadge=g1,F.Plugin=gh,F.Polygon=Ne,F.ProgressCard=Cm,F.Quadrant=J2,F.QuarterCircular=Em,F.QuarterSimpleCard=Am,F.Rect=St,F.RelationCircle=ty,F.RelationNetwork=ey,F.ResizeElement=W3,F.RibbonCard=Lm,F.RoundedRectNode=Dm,F.SelectHighlight=d3,F.SequenceAscendingStairs3d=dy,F.SequenceAscendingSteps=uy,F.SequenceCircleArrows=py,F.SequenceCircular=gy,F.SequenceColorSnakeSteps=my,F.SequenceFilterMesh=xy,F.SequenceHorizontalZigzag=wy,F.SequenceMountain=Py,F.SequencePyramid=Oy,F.SequenceRoadmapVertical=My,F.SequenceSnakeSteps=Sy,F.SequenceStairsFront=Ey,F.SequenceSteps=Iy,F.SequenceTimeline=Ty,F.SequenceZigzagPucks3d=ky,F.SequenceZigzagSteps=Ny,F.ShapesGroup=ne,F.SimpleHorizontalArrow=Fm,F.SimpleIllusItem=Vm,F.SimpleItem=Gm,F.SimpleVerticalArrow=Zm,F.Text=Et,F.Title=lg,F.UnderlineText=Jm,F.VERSION=qN,F.VerticalIconArrow=n2,F.ZoomWheel=f3,F.cloneElement=kn,F.createFragment=D$,F.createLayout=dc,F.getCombinedBounds=kr,F.getElementBounds=Q,F.getElementsBounds=er,F.getFont=Pl,F.getFonts=Ol,F.getItem=mg,F.getItemProps=Wt,F.getItems=hO,F.getPalette=xf,F.getPaletteColor=Oo,F.getStructure=r2,F.getStructures=uz,F.getTemplate=Hh,F.getTemplates=Cv,F.getTheme=cg,F.getThemeColors=xe,F.getThemes=GP,F.jsx=Go,F.jsxDEV=j$,F.jsxs=N$,F.loadSVGResource=Er,F.parseSVG=Mr,F.parseSyntax=yv,F.registerFont=yf,F.registerItem=Vt,F.registerPalette=Ml,F.registerPattern=Gf,F.registerResourceLoader=J4,F.registerStructure=Tt,F.registerTemplate=Rh,F.registerTheme=gc,F.renderSVG=bp,F.sequenceCylinders3d=yy,F.setDefaultFont=T5,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})}));
|
|
549
|
+
`);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function EN(t){return Xr(this,null,function*(){const e=yield Oo(t);if(!e.ok)throw new Error(`Failed to load font: ${t}`);const n=yield e.blob();return yield new Promise((i,o)=>{const s=new FileReader;s.onloadend=()=>{i(s.result)},s.onerror=o,s.readAsDataURL(n)})})}var Lh=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function IN(t){return Lh(this,arguments,function*(e,n={}){const r=yield fv(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function fv(t){return Lh(this,arguments,function*(e,n={}){const{embedResources:r=!0}=n,i=e.cloneNode(!0),{width:o,height:s}=uc(e);return Qt(i,{width:o,height:s}),yield TN(i),yield _N(i,r),kN(i),i})}function TN(t){return Lh(this,null,function*(){const e=t.querySelectorAll("use"),n=AN(t);e.forEach(r=>{const i=r.getAttribute("href");if(!i)return;if(!t.querySelector(i)){const s=document.querySelector(i);s&&n.appendChild(s.cloneNode(!0))}})})}const pv="icon-defs";function AN(t){const e=Ir(t,pv);if(e)return e;const n=$t("defs");return di(n,pv),t.prepend(n),n}function kN(t){LN(t),zN(t),HN(t),RN(t)}function LN(t){const e=Ir(t,zt.BtnsGroup);e==null||e.remove();const n=Ir(t,"btn-icon-defs");n==null||n.remove()}function zN(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function HN(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function RN(t){gl(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var DN=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function NN(t){return DN(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield fv(e),{width:s,height:a}=uc(o);return new Promise((l,c)=>{try{const h=document.createElement("canvas");h.width=s*i,h.height=a*i;const u=h.getContext("2d");if(!u){c(new Error("Failed to get canvas context"));return}u.scale(i,i),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",o.setAttribute("width",String(s)),o.setAttribute("height",String(a));const f=new XMLSerializer().serializeToString(o),p="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f),g=new Image;g.onload=function(){u.clearRect(0,0,s,a),u.drawImage(g,0,0,s,a);const y=h.toDataURL("image/png");l(y)},g.onerror=function(y){c(new Error("Image load failed: "+y))},g.src=p}catch(h){c(h)}})})}var jN=Object.defineProperty,WN=Object.defineProperties,FN=Object.getOwnPropertyDescriptors,ga=Object.getOwnPropertySymbols,gv=Object.prototype.hasOwnProperty,mv=Object.prototype.propertyIsEnumerable,yv=(t,e,n)=>e in t?jN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))gv.call(e,n)&&yv(t,n,e[n]);if(ga)for(var n of ga(e))mv.call(e,n)&&yv(t,n,e[n]);return t},ma=(t,e)=>WN(t,FN(e)),Gr=(t,e)=>{var n={};for(var r in t)gv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ga)for(var r of ga(t))e.indexOf(r)<0&&mv.call(t,r)&&(n[r]=t[r]);return n};function BN(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=Gr(e,["container","padding","template","design","theme","themeConfig"]),c=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,h=i?Yh(i):void 0,u=cp({},h==null?void 0:h.themeConfig,a),f=s||a||h!=null&&h.themeConfig?GN(s,u):void 0,p={container:c,padding:rr(r)};if(h){const g=h,{design:y}=g,m=Gr(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=VN(Je(Je({},h==null?void 0:h.design),o),f?ma(Je({},t),{themeConfig:f}):t);Cu(g)&&(p.design=g)}return s&&(p.theme=s),f&&(p.themeConfig=f),p}function zh(t){if(typeof t=="string")return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function VN(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=vv(i||(o==null?void 0:o[0]),e);return{structure:YN(n),title:XN(r,e),item:s,items:o?o.map(a=>vv(a,e)):[s]}}function YN(t){if(!t)return null;const e=zh(t),{type:n}=e,r=Gr(e,["type"]),i=d2(n);if(!i)return null;const{component:o}=i;return ma(Je({},i),{component:s=>o(Je(Je({},s),r))})}function XN(t,e){if(!t)return{component:null};const n=zh(t),{type:r}=n,i=Gr(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=xv(s,s);return{component:l=>mg(Je(ma(Je({},l),{themeColors:a}),i))}}function vv(t,e){if(!t)return null;const n=zh(t),{type:r}=n,i=Gr(n,["type"]),o=Pg(r);if(!o)return null;const{component:s,options:a}=o;return ma(Je({},o),{component:l=>{var c;const{indexes:h}=l,{data:u,themeConfig:f}=e,p=(f==null?void 0:f.colorBg)||"#fff",g=l,{themeColors:y=xv(Io(f==null?void 0:f.palette,h,(c=u==null?void 0:u.items)==null?void 0:c.length)||(f==null?void 0:f.colorPrimary)||"#FF356A",p)}=g,m=Gr(g,["themeColors"]);return s(Je(Je({themeColors:y},m),i))},options:a})}function GN(t,e={}){var n;const r=t?yg(t)||{}:{},i=cp({},r,e);return i.palette=e.palette||r.palette,i.stylize=(n=e.stylize)!=null?n:r.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}function xv(t,e="#fff"){return bg({colorPrimary:t,isDarkMode:mu(e),colorBg:e})}function qN(t){return t===" "||t===" "}function UN(t){let e=0,n=0;for(;n<t.length;){const r=t[n];if(r===" "){e+=1,n+=1;continue}if(r===" "){e+=2,n+=1;continue}break}return{indent:e,content:t.slice(n)}}function ZN(t){return t.trimEnd()}function bv(t){const e=t.trim();if(!e)return null;const n=e.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);if(n)return{key:n[1],value:n[2].trim()};const r=e.match(/^([^\s]+)\s+(.*)$/);return r?{key:r[1],value:r[2].trim()}:{key:e,value:void 0}}function Hh(t,e){return{kind:"object",line:t,value:e,entries:{}}}function KN(t){return{kind:"array",line:t,items:[]}}function QN(t){const e=[],n=Hh(0),r=[{indent:-1,node:n,parent:null,key:null}];return t.split(/\r?\n/).forEach((o,s)=>{const a=s+1;if(!o.trim())return;const{indent:l,content:c}=UN(o),h=ZN(c);if(!h.trim())return;for(;r.length>1&&l<=r[r.length-1].indent;)r.pop();const u=r[r.length-1];let f=u.node;const p=h.trim();if(p.startsWith("-")&&(p.length===1||qN(p[1]))){if(f.kind!=="array")if(f.kind==="object"&&Object.keys(f.entries).length===0&&f.value===void 0&&u.parent&&u.key){const v=KN(f.line);if(u.parent.kind==="object")u.parent.entries[u.key]=v;else if(u.parent.kind==="array"){const b=u.parent.items.indexOf(f);b>=0&&(u.parent.items[b]=v)}u.node=v,f=v}else{e.push({path:"",line:a,code:"bad_list",message:"List item is not under an array container.",raw:p});return}const m=p.slice(1).trim(),x=Hh(a,m||void 0);f.items.push(x),r.push({indent:l,node:x,parent:f});return}const g=bv(p);if(!g){e.push({path:"",line:a,code:"bad_syntax",message:"Invalid syntax line.",raw:p});return}if(f.kind!=="object"){e.push({path:"",line:a,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:p});return}const y=Hh(a,g.value);f.entries[g.key]=y,r.push({indent:l,node:y,parent:f,key:g.key})}),{ast:n,errors:e}}function wv(t){return bv(t)}function ya(t,e){return{kind:"value",line:e,value:t}}const JN=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,tj=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function vr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function xr(t){if(t.kind==="value"||t.kind==="object")return t.value}function we(t,e,n,r,i,o){t.push({path:n,line:e.line,code:r,message:i,raw:o})}function _v(t,e="any"){let n=t.trim();if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1).trim()),!n)return[];let r;e==="comma"?r=n.split(","):e==="space"?r=n.split(/\s+/):r=n.split(/[,\s]+/);const i=[];for(const o of r){const s=o.trim();if(s){if(s==="#"||s==="//")break;i.push(s)}}return i}function ej(t){let e=t.trim();const n=e.search(/\s+#(?![0-9a-f])/i);n>=0&&(e=e.slice(0,n).trimEnd());const r=e.indexOf("//");return r>=0&&(e=e.slice(0,r).trimEnd()),e}function Rh(t){const e=ej(t);if(!e)return;const n=e.match(JN);if(n&&n[0].length===e.length)return e;const r=e.match(tj);if(r&&r[1].length===e.length||lt(e).isValid())return e}function $v(t,e,n,r={}){const i=xr(t);if(i===void 0){we(n,t,e,"schema_mismatch","Expected color value.");return}const o=Rh(i);if(!o){r.soft||we(n,t,e,"invalid_value","Invalid color value.",i);return}return o}function nj(t,e){return e.length>1||t.startsWith("[")&&t.endsWith("]")?!0:Rh(t)!==void 0}function Dh(t){if(t.kind==="array")return t.items.map(r=>Dh(r));if(t.kind==="value"||!(Object.keys(t.entries).length>0)&&t.value!==void 0)return vr(t.value);const n={};return t.value!==void 0&&(n.value=vr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=Dh(i)}),n}function rj(t,e,n,r){let i,o=null;for(const s of e.variants){const a=[],l=je(t,s,n,a);(o===null||a.length<o.length)&&(o=a,i=l)}return o&&r.push(...o),i}function je(t,e,n,r){switch(e.kind){case"union":return rj(t,e,n,r);case"string":{const i=xr(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=xr(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected number value.");return}const s=i.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);if(!s){we(r,t,n,"invalid_value","Invalid number value.",i);return}return parseFloat(s[1])}case"boolean":{const i=xr(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected boolean value.");return}if(i!=="true"&&i!=="false"){we(r,t,n,"invalid_value","Invalid boolean value.",i);return}return i==="true"}case"enum":{const i=xr(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected enum value.");return}if(!e.values.includes(i)){we(r,t,n,"invalid_value","Invalid enum value.",i);return}return i}case"array":{if(t.kind==="array")return t.items.map((a,l)=>je(a,e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0);if(t.kind==="object"&&Object.keys(t.entries).length>0){we(r,t,n,"schema_mismatch","Expected array value.");return}const i=xr(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected array value.");return}const o=i.trim();return o.startsWith("[")&&!o.endsWith("]")?void 0:_v(i,e.split).map((a,l)=>je(ya(a,t.line),e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0)}case"palette":{if(t.kind==="array"){const l=je(t,{kind:"array",item:{kind:"color"},split:"any"},n,r);return Array.isArray(l)&&l.length>0?l:void 0}if(t.kind==="object"&&Object.keys(t.entries).length>0){we(r,t,n,"schema_mismatch","Expected palette value.");return}const i=xr(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected palette value.");return}const o=i.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;const s=Rh(o);if(s)return[s];const a=_v(i,"any");if(nj(o,a)){const l=a.map((c,h)=>$v(ya(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return $v(t,n,r,{soft:e.soft});case"object":{if(t.kind==="array"){we(r,t,n,"schema_mismatch","Expected object value.");return}const i={};if(t.kind==="value"){if(e.shorthandKey)return i[e.shorthandKey]=t.value,i;const o=wv(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=je(ya(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);return s!==void 0&&(i[o.key]=s),i}return e.allowUnknown?(i[o.key]=vr(o.value),i):(we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=vr(t.value),i;we(r,t,n,"invalid_value","Expected object value.");return}if(t.value!==void 0)if(e.shorthandKey&&i[e.shorthandKey]===void 0)i[e.shorthandKey]=t.value;else{const o=wv(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=je(ya(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);s!==void 0&&i[o.key]===void 0&&(i[o.key]=s)}else e.allowUnknown?i[o.key]=vr(o.value):we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=vr(t.value))}return Object.entries(t.entries).forEach(([o,s])=>{const a=e.fields[o];if(!a){if(e.allowUnknown){i[o]=Dh(s);return}we(r,s,`${n}.${o}`,"unknown_key","Unknown key in object.",o);return}const l=je(s,a,`${n}.${o}`,r);l!==void 0&&(i[o]=l)}),i}default:return}}const tn=()=>({kind:"string"}),Fn=()=>({kind:"number"}),ij=t=>({kind:"enum",values:t}),qr=(t={})=>({kind:"color",soft:t.soft}),Nh=(t,e="any")=>({kind:"array",item:t,split:e}),Te=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),jh=(...t)=>({kind:"union",variants:t}),oj=()=>({kind:"palette"}),Pv={fill:qr({soft:!0}),stroke:qr({soft:!0})},Ur=Te(Pv,{allowUnknown:!0}),Wh=Te(Pv,{allowUnknown:!0}),Fh=Te({},{allowUnknown:!0});Fh.fields={label:tn(),value:jh(Fn(),tn()),desc:tn(),icon:tn(),children:Nh(Fh)};const Cv=Te({type:tn(),colorBg:qr(),colorPrimary:qr(),palette:oj(),title:Ur,desc:Ur,shape:Wh,base:Te({global:Te({},{allowUnknown:!0}),shape:Wh,text:Ur}),item:Te({icon:Te({},{allowUnknown:!0}),label:Ur,desc:Ur,value:Ur,shape:Wh}),stylize:Te({type:ij(["rough","pattern"]),roughness:Fn(),bowing:Fn(),fillWeight:Fn(),hachureGap:Fn(),pattern:tn(),backgroundColor:qr(),foregroundColor:qr(),scale:Fn()},{shorthandKey:"type"}),elements:Te({},{allowUnknown:!0})},{shorthandKey:"type"}),va=Te({},{allowUnknown:!0,shorthandKey:"type"}),Ov=Te({structure:va,item:va,items:Nh(va),title:va}),Mv=Te({title:tn(),desc:tn(),items:Nh(Fh)}),Sv=Te({type:tn()},{shorthandKey:"type"}),Ev=Te({template:Sv,design:Ov,data:Mv,theme:Cv,width:jh(Fn(),tn()),height:jh(Fn(),tn())});var sj=Object.defineProperty,xa=Object.getOwnPropertySymbols,Iv=Object.prototype.hasOwnProperty,Tv=Object.prototype.propertyIsEnumerable,Av=(t,e,n)=>e in t?sj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aj=(t,e)=>{for(var n in e||(e={}))Iv.call(e,n)&&Av(t,n,e[n]);if(xa)for(var n of xa(e))Tv.call(e,n)&&Av(t,n,e[n]);return t},lj=(t,e)=>{var n={};for(var r in t)Iv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&xa)for(var r of xa(t))e.indexOf(r)<0&&Tv.call(t,r)&&(n[r]=t[r]);return n};function cj(t,e){if(!t)return;const n=je(t,Sv,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function kv(t){const{ast:e,errors:n}=QN(t),r=[],i={},o=aj({},e.entries),s=e.entries.infographic;let a;s&&s.kind==="object"&&(s.value&&(a=s.value),Object.entries(s.entries).forEach(([m,x])=>{m in o||(o[m]=x)}));const l=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(o).forEach(m=>{l.has(m)||n.push({path:m,line:o[m].line,code:"unknown_key",message:"Unknown top-level key.",raw:m})});const c=o.template,h=cj(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=je(u,Ov,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=je(f,Mv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=je(p,Cv,"theme",n);if(m&&typeof m=="object"){const x=m,{type:v}=x,b=lj(x,["type"]);typeof v=="string"&&v&&(i.theme=v),Object.keys(b).length>0&&(i.themeConfig=b)}}const g=o.width;if(g){const m=je(g,Ev.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=je(y,Ev.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const hj=()=>[new ev,new ov],dj=()=>[new w3,new a3,new l3,new _3,new P3,new E3,new M3],uj={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return hj()},get interactions(){return dj()}};var fj=Object.defineProperty,Lv=Object.getOwnPropertySymbols,pj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,zv=(t,e,n)=>e in t?fj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,On=(t,e)=>{for(var n in e||(e={}))pj.call(e,n)&&zv(t,n,e[n]);if(Lv)for(var n of Lv(e))gj.call(e,n)&&zv(t,n,e[n]);return t};function Bh(t,e){const n=On(On({},t),e);return(t.design||e.design)&&(n.design=On(On({},t.design),e.design)),(t.themeConfig||e.themeConfig)&&(n.themeConfig=On(On({},t.themeConfig),e.themeConfig)),(t.svg||e.svg)&&(n.svg=On(On({},t.svg),e.svg)),n}function ba(t){const e=On({},t);return e.data&&(e.data=ap(e.data)),e.elements&&(e.elements=ap(e.elements)),e}function Hv(t){const{design:e,data:n}=t;return!(!e||!Cu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var mj=Object.defineProperty,Rv=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,vj=Object.prototype.propertyIsEnumerable,Dv=(t,e,n)=>e in t?mj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xj=(t,e)=>{for(var n in e||(e={}))yj.call(e,n)&&Dv(t,n,e[n]);if(Rv)for(var n of Rv(e))vj.call(e,n)&&Dv(t,n,e[n]);return t},bj=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class wj{constructor(e){this.rendered=!1,this.emitter=new hN,this.node=null,this.initialOptions={},this.setOptions(e,"replace",!0)}getOptions(){return this.options}setOptions(e,n="replace",r=!1){const{options:i,errors:o,warnings:s}=_j(e);r&&(this.initialOptions=ba(i));const a=Bh(n==="replace"?ba(this.initialOptions||{}):this.options||ba(this.initialOptions||{}),i);this.options=a,this.parsedOptions=BN(Bh(uj,this.options)),s.length&&this.emitter.emit("warning",s),o.length&&this.emitter.emit("error",o)}render(e){e?this.setOptions(e,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(e){this.setOptions(e,"merge"),this.performRender()}performRender(){var e;const n=this.parsedOptions;if(!Hv(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new B$(n,i);this.node=o.render(),r==null||r.replaceChildren(this.node),(e=this.editor)==null||e.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new vN(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options})}compose(e){const{design:n,data:r}=e,{title:i,item:o,items:s,structure:a}=n,{component:l,props:c}=a,h=i.component,u=o.component,f=s.map(y=>y.component),p=Mp(d(l,xj({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Er(p);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const e=this.parsedOptions;if(!Hv(e)){this.emitter.emit("error",new Error("Incomplete options"));return}const n=e.design,r=n.structure.composites||[],i=n.items.map(o=>o.composites||[]);return aw({structure:r,items:i})}toDataURL(e){return bj(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield IN(this.node,e):yield NN(this.node,e)})}on(e,n){this.emitter.on(e,n)}off(e,n){this.emitter.off(e,n)}destroy(){var e,n;(e=this.editor)==null||e.destroy(),(n=this.node)==null||n.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function _j(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=kv(t);return{options:e,errors:n,warnings:r}}return{options:ba(t),errors:[],warnings:[]}}const $j=Be.version;W.AlignLayout=Mi,W.BadgeCard=Mg,W.BrushSelect=a3,W.BtnAdd=q,W.BtnRemove=Xt,W.BtnsGroup=Et,W.CandyCardLite=Ig,W.CapsuleItem=Dg,W.ChartBar=u2,W.ChartColumn=f2,W.ChartLine=y2,W.ChartPie=v2,W.ChartWordCloud=P2,W.CircleNode=Wg,W.CircularProgress=Vg,W.ClickSelect=l3,W.CompactCard=qg,W.CompareBinaryHorizontal=L2,W.CompareHierarchyLeftRight=D2,W.CompareHierarchyRow=N2,W.DblClickEditText=w3,W.Defs=jt,W.DoneList=Kg,W.DragElement=_3,W.EditBar=ev,W.Ellipse=Wt,W.FlexLayout=dt,W.Fragment=bi,W.Gap=ie,W.Group=V,W.HierarchyMindmap=q2,W.HierarchyStructure=Z2,W.HierarchyTree=ty,W.HorizontalIconArrow=t1,W.HorizontalIconLine=o1,W.HotkeyHistory=P3,W.IconBadge=l1,W.Illus=Dp,W.IndexedCard=d1,W.Infographic=wj,W.Interaction=jn,W.ItemDesc=Jt,W.ItemIcon=Ce,W.ItemIconCircle=or,W.ItemLabel=It,W.ItemValue=Oi,W.ItemsGroup=St,W.LCornerCard=p1,W.LabelText=O1,W.LetterCard=y1,W.LinedText=b1,W.ListColumn=ey,W.ListGrid=ny,W.ListPyramid=ry,W.ListRow=iy,W.ListSector=ay,W.ListWaterfall=ly,W.ListZigzagDown=fy,W.ListZigzagUp=py,W.Path=yt,W.PillBadge=$1,W.Plugin=Ph,W.Polygon=Ve,W.ProgressCard=Lm,W.Quadrant=gy,W.QuarterCircular=Rm,W.QuarterSimpleCard=jm,W.Rect=Ct,W.RelationCircle=my,W.RelationNetwork=yy,W.ResizeElement=ov,W.RibbonCard=Bm,W.RoundedRectNode=Xm,W.SelectHighlight=M3,W.SequenceAscendingStairs3d=My,W.SequenceAscendingSteps=Sy,W.SequenceCircleArrows=Iy,W.SequenceCircular=Ty,W.SequenceColorSnakeSteps=Ay,W.SequenceFilterMesh=Hy,W.SequenceHorizontalZigzag=Ry,W.SequenceMountain=jy,W.SequencePyramid=Wy,W.SequenceRoadmapVertical=By,W.SequenceSnakeSteps=Vy,W.SequenceStairsFront=Yy,W.SequenceSteps=Xy,W.SequenceTimeline=Gy,W.SequenceZigzagPucks3d=Uy,W.SequenceZigzagSteps=e3,W.ShapesGroup=le,W.SimpleHorizontalArrow=Um,W.SimpleIllusItem=Qm,W.SimpleItem=e2,W.SimpleVerticalArrow=i2,W.Text=Mt,W.Title=mg,W.UnderlineText=a2,W.VERSION=$j,W.VerticalIconArrow=h2,W.ZoomWheel=E3,W.cloneElement=Rn,W.createFragment=sP,W.createLayout=vc,W.getCombinedBounds=zr,W.getElementBounds=et,W.getElementsBounds=ir,W.getFont=Il,W.getFonts=Tl,W.getItem=Pg,W.getItemProps=Zt,W.getItems=AC,W.getPalette=Sf,W.getPaletteColor=Io,W.getPalettes=e_,W.getStructure=d2,W.getStructures=LL,W.getTemplate=Yh,W.getTemplates=Vv,W.getTheme=yg,W.getThemeColors=xe,W.getThemes=gC,W.jsx=Qo,W.jsxDEV=lP,W.jsxs=aP,W.loadSVGResource=Tr,W.parseSVG=Er,W.parseSyntax=kv,W.registerFont=Of,W.registerItem=Kt,W.registerPalette=Ll,W.registerPattern=e0,W.registerResourceLoader=vw,W.registerStructure=kt,W.registerTemplate=Vh,W.registerTheme=_c,W.renderSVG=Mp,W.sequenceCylinders3d=ky,W.setDefaultFont=Kw,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
|
|
550
550
|
//# sourceMappingURL=infographic.min.js.map
|