@antv/infographic 0.2.5 → 0.2.6
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/dist/infographic.min.js +76 -76
- package/dist/infographic.min.js.map +1 -1
- package/esm/exporter/index.d.ts +1 -1
- package/esm/exporter/index.js +1 -1
- package/esm/exporter/svg.js +223 -2
- package/esm/exporter/types.d.ts +5 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -0
- package/esm/renderer/fonts/loader.js +63 -8
- package/esm/renderer/stylize/gradient.js +1 -1
- package/esm/resource/index.d.ts +1 -1
- package/esm/resource/index.js +1 -1
- package/esm/resource/load-tracker.d.ts +6 -0
- package/esm/resource/load-tracker.js +36 -0
- package/esm/resource/loader.d.ts +1 -0
- package/esm/resource/loader.js +27 -14
- package/esm/runtime/Infographic.js +13 -0
- package/lib/exporter/index.d.ts +1 -1
- package/lib/exporter/index.js +2 -1
- package/lib/exporter/svg.js +223 -2
- package/lib/exporter/types.d.ts +5 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +4 -2
- package/lib/renderer/fonts/loader.js +63 -8
- package/lib/renderer/stylize/gradient.js +1 -1
- package/lib/resource/index.d.ts +1 -1
- package/lib/resource/index.js +3 -1
- package/lib/resource/load-tracker.d.ts +6 -0
- package/lib/resource/load-tracker.js +42 -0
- package/lib/resource/loader.d.ts +1 -0
- package/lib/resource/loader.js +30 -14
- package/lib/runtime/Infographic.js +13 -0
- package/package.json +1 -1
- package/src/exporter/index.ts +1 -1
- package/src/exporter/svg.ts +254 -2
- package/src/exporter/types.ts +5 -0
- package/src/index.ts +6 -0
- package/src/renderer/fonts/loader.ts +82 -9
- package/src/renderer/stylize/gradient.ts +1 -1
- package/src/resource/index.ts +1 -1
- package/src/resource/load-tracker.ts +51 -0
- package/src/resource/loader.ts +27 -12
- package/src/runtime/Infographic.tsx +12 -0
package/dist/infographic.min.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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 Ij=Object.defineProperty,Tj=Object.defineProperties;var Aj=Object.getOwnPropertyDescriptors;var Bv=Object.getOwnPropertySymbols;var kj=Object.prototype.hasOwnProperty,Lj=Object.prototype.propertyIsEnumerable;var Ji=Math.pow,Vv=(W,_e,Be)=>_e in W?Ij(W,_e,{enumerable:!0,configurable:!0,writable:!0,value:Be}):W[_e]=Be,Pe=(W,_e)=>{for(var Be in _e||(_e={}))kj.call(_e,Be)&&Vv(W,Be,_e[Be]);if(Bv)for(var Be of Bv(_e))Lj.call(_e,Be)&&Vv(W,Be,_e[Be]);return W},He=(W,_e)=>Tj(W,Aj(_e));const Be={version:"0.2.5"},_a=new Map;function Vh(t,e){_a.set(t,e)}function Yh(t){return _a.get(t)}function Yv(){return Array.from(_a.keys())}var Xv=Object.defineProperty,Xh=Object.getOwnPropertySymbols,Gv=Object.prototype.hasOwnProperty,qv=Object.prototype.propertyIsEnumerable,Gh=(t,e,n)=>e in t?Xv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qh=(t,e)=>{for(var n in e||(e={}))Gv.call(e,n)&&Gh(t,n,e[n]);if(Xh)for(var n of Xh(e))qv.call(e,n)&&Gh(t,n,e[n]);return t};const Qr={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},Jr={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"},Uv=(t,e)=>qh(qh({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),nn=(t,e,n,r)=>[t,{design:{structure:Uv(e,r),item:n}}],Zv=Object.fromEntries([nn("hierarchy-mindmap-branch-gradient-lined-palette",Qr,Uh,"bottom"),nn("hierarchy-mindmap-level-gradient-lined-palette",Jr,Uh,"bottom"),nn("hierarchy-mindmap-branch-gradient-capsule-item",Qr,Zh),nn("hierarchy-mindmap-level-gradient-capsule-item",Jr,Zh),nn("hierarchy-mindmap-branch-gradient-circle-progress",Qr,Kh,.4),nn("hierarchy-mindmap-level-gradient-circle-progress",Jr,Kh,.4),nn("hierarchy-mindmap-branch-gradient-rounded-rect",Qr,Qh),nn("hierarchy-mindmap-level-gradient-rounded-rect",Jr,Qh),nn("hierarchy-mindmap-branch-gradient-compact-card",Qr,Jh),nn("hierarchy-mindmap-level-gradient-compact-card",Jr,Jh)]),Kv={"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 Qv=Object.defineProperty,td=Object.getOwnPropertySymbols,Jv=Object.prototype.hasOwnProperty,tx=Object.prototype.propertyIsEnumerable,ed=(t,e,n)=>e in t?Qv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nd=(t,e)=>{for(var n in e||(e={}))Jv.call(e,n)&&ed(t,n,e[n]);if(td)for(var n of td(e))tx.call(e,n)&&ed(t,n,e[n]);return t};const ex={"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}},nx=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],rd={},id="hierarchy-tree",rx=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],ix=(t,e,n)=>t?`${id}-${t}-${e}-${n}`:`${id}-${e}-${n}`;for(const t of nx)for(const[e,n]of Object.entries(ex))for(const{key:r,orientation:i}of rx){const o=ix(r,e,t);rd[o]={design:{structure:nd(nd({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const ox={"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"}}},sx={"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}]}}},ax={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var lx=Object.defineProperty,od=Object.getOwnPropertySymbols,cx=Object.prototype.hasOwnProperty,hx=Object.prototype.propertyIsEnumerable,sd=(t,e,n)=>e in t?lx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e)=>{for(var n in e||(e={}))cx.call(e,n)&&sd(t,n,e[n]);if(od)for(var n of od(e))hx.call(e,n)&&sd(t,n,e[n]);return t};const dx=_r(_r(_r(_r(_r(_r({"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),Zv),sx),ax),ox),Kv);Object.entries(dx).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 ux="https://www.weavefox.cn/api/open/v1/icon",Pa=Symbol.for("@antv/infographic/Defs");function jt(t){return{type:Pa,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 fx=Object.defineProperty,ad=Object.getOwnPropertySymbols,px=Object.prototype.hasOwnProperty,gx=Object.prototype.propertyIsEnumerable,ld=(t,e,n)=>e in t?fx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mx=(t,e)=>{for(var n in e||(e={}))px.call(e,n)&&ld(t,n,e[n]);if(ad)for(var n of ad(e))gx.call(e,n)&&ld(t,n,e[n]);return t};function yt(t){const{x:e,y:n}=t,r=mx({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var yx=Object.defineProperty,vx=Object.defineProperties,xx=Object.getOwnPropertyDescriptors,to=Object.getOwnPropertySymbols,cd=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable,dd=(t,e,n)=>e in t?yx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bx=(t,e)=>{for(var n in e||(e={}))cd.call(e,n)&&dd(t,n,e[n]);if(to)for(var n of to(e))hd.call(e,n)&&dd(t,n,e[n]);return t},wx=(t,e)=>vx(t,xx(e)),_x=(t,e)=>{var n={};for(var r in t)cd.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&&hd.call(t,r)&&(n[r]=t[r]);return n};function Ve(t){var e=t,{points:n=[]}=e,r=_x(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=wx(bx({},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},Px=t=>fd($x[t.toLowerCase()],6),Cx=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Ox=t=>{let e;return(e=t.match(Cx))?fd(parseInt(e[1],16),e[1].length):void 0},Sn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ti=`${Sn}%`,Ca=`(?:${Sn}%|${Sn})`,Mx=`(?:${Sn}(deg|grad|rad|turn)|${Sn})`,$r="\\s*,\\s*",Sx=new RegExp(`^rgba?\\(\\s*${Sn}${$r}${Sn}${$r}${Sn}\\s*(?:,\\s*${Ca}\\s*)?\\)$`),Ex=new RegExp(`^rgba?\\(\\s*${ti}${$r}${ti}${$r}${ti}\\s*(?:,\\s*${Ca}\\s*)?\\)$`),Ix=t=>{let e={mode:"rgb"},n;if(n=t.match(Sx))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(Ex))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},Tx=(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,Oa=(t="rgb")=>e=>(e=Tx(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={},eo=[],gd={},Ax=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=Ax)}),pd[t.mode]=t,(t.parse||[]).forEach(e=>{Lx(e,t.mode)}),Oa(t.mode)),kx=t=>pd[t],Lx=(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"&&eo.indexOf(t)<0&&eo.push(t)},Ma=/[^\x00-\x7F]|[a-zA-Z_]/,zx=/[^\x00-\x7F]|[-\w]/,rt={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let _t=0;function no(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 Sa(t){if(_t>=t.length)return!1;let e=t[_t];if(Ma.test(e))return!0;if(e==="-"){if(t.length-_t<2)return!1;let n=t[_t+1];return!!(n==="-"||Ma.test(n))}return!1}const Hx={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ei(t){let e="";if((t[_t]==="-"||t[_t]==="+")&&(e+=t[_t++]),e+=ro(t),t[_t]==="."&&/\d/.test(t[_t+1])&&(e+=t[_t++]+ro(t)),(t[_t]==="e"||t[_t]==="E")&&((t[_t+1]==="-"||t[_t+1]==="+")&&/\d/.test(t[_t+2])?e+=t[_t++]+t[_t++]+ro(t):/\d/.test(t[_t+1])&&(e+=t[_t++]+ro(t))),Sa(t)){let n=io(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:rt.Hue,value:e*Hx[n]}:void 0}return t[_t]==="%"?(_t++,{type:rt.Percentage,value:+e}):{type:rt.Number,value:+e}}function ro(t){let e="";for(;/\d/.test(t[_t]);)e+=t[_t++];return e}function io(t){let e="";for(;_t<t.length&&zx.test(t[_t]);)e+=t[_t++];return e}function Rx(t){let e=io(t);return t[_t]==="("?(_t++,{type:rt.Function,value:e}):e==="none"?{type:rt.None,value:void 0}:{type:rt.Ident,value:e}}function Dx(t=""){let e=t.trim(),n=[],r;for(_t=0;_t<e.length;){if(r=e[_t++],r===`
|
|
2
|
-
`||r===" "||r===" "){for(
|
|
3
|
-
`||e[
|
|
4
|
-
`||e[_t]===" "||e[_t]===" ");)_t++;let i;if(no(e)&&(i=ei(e),i.type!==rt.Hue)){n.push({type:rt.Alpha,value:i});continue}if(Sa(e)&&io(e)==="none"){n.push({type:rt.Alpha,value:{type:rt.None,value:void 0}});continue}return}if(/\d/.test(r)){_t--,n.push(ei(e));continue}if(Ma.test(r)){_t--,n.push(Rx(e));continue}return}return n}function Nx(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=kx(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 jx(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=Dx(t),n=e?jx(e,!0):void 0;let r,i=0,o=eo.length;for(;i<o;)if((r=eo[i++](t,n))!==void 0)return r;return e?Nx(e):void 0};function Wx(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 Fx=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Bx=(t,e,n)=>t+n*(e-t),Vx=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=Vx(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)}})(Bx),pe=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},Pr={mode:"rgb",channels:["r","g","b","alpha"],parse:[Wx,Ox,Ix,Px,Fx,"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}},Ea=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),yd=t=>{let e=Ea(t.r),n=Ea(t.g),r=Ea(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},Ia=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:Ia(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:Ia(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:Ia(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Ta=(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)},Cr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Ta(t),g:Ta(e),b:Ta(n)};return r!==void 0&&(i.alpha=r),i},Bn=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(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},Aa=(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},Or=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Aa(t),g:Aa(e),b:Aa(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=Or({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},Yx=He(Pe({},Pr),{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,Xx=(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=>Xx(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ve=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Gx=Math.PI/180,qx=180/Math.PI;let xd=ve[3]*ve[4],bd=ve[1]*ve[4],wd=ve[1]*ve[2]-ve[0]*ve[3];const Ux=({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)*qx-120),r!==void 0&&(a.alpha=r),a},Zx=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*Gx,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},oo=(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},Kx=(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},so=(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},Qx={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Ux},toMode:{rgb:Zx},interpolate:{h:{use:ht,fixup:mn},s:ht,l:ht,alpha:{use:ht,fixup:pe}},difference:{h:oo},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},Mr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let ka=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:ka(o)*Mr.X,y:ka(i)*Mr.Y,z:ka(s)*Mr.Z};return r!==void 0&&(a.alpha=r),a},ao=t=>Vn(Pd(t)),La=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=La(t/Mr.X),o=La(e/Mr.Y),s=La(n/Mr.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},lo=t=>{let e=Cd(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},co=1,Od=1,ni=26/180*Math.PI,ho=Math.cos(ni),uo=Math.sin(ni),Md=100/Math.log(139/100),za=({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*co/Md)-1)/.0039},o=(Math.exp(.0435*e*Od*co)-1)/.075,s=o*Math.cos(n/180*Math.PI-ni),a=o*Math.sin(n/180*Math.PI-ni);return i.a=s*ho-a/.83*uo,i.b=s*uo+a/.83*ho,r!==void 0&&(i.alpha=r),i},Ha=({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*ho+n*uo,o=.83*(n*ho-e*uo),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:Md/co*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*Od*co)};return a.c&&(a.h=$e((Math.atan2(o,i)+ni)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},Sd=t=>za(En(t,"dlch")),Ed=t=>In(Ha(t),"dlab"),Jx={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Sd,rgb:t=>ao(Sd(t))},fromMode:{lab65:Ed,rgb:t=>Ed(lo(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}}},tb={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:za,dlab:t=>In(t,"dlab"),rgb:t=>ao(za(t))},fromMode:{lab65:Ha,dlab:t=>En(t,"dlch"),rgb:t=>Ha(lo(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:so},average:{h:yn}};function eb({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 nb({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:eb},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:nb},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:oo},average:{h:yn}};function ib({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 ob({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 sb=(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}},ab=new RegExp(`^hsla?\\(\\s*${Mx}${$r}${ti}${$r}${ti}\\s*(?:,\\s*${Ca}\\s*)?\\)$`),lb=t=>{let e=t.match(ab);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=sb(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 cb(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:ib},fromMode:{rgb:ob},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[cb,lb],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:oo},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:oo},average:{h:yn}};function hb({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 db(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 ub(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 fb={mode:"hwb",toMode:{rgb:hb},fromMode:{rgb:db},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[ub],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:Kx},average:{h:yn}},Ld=203,fo=.1593017578125,zd=78.84375,po=.8359375,go=18.8515625,mo=18.6875;function Ra(t){if(t<0)return 0;const e=Math.pow(t,1/zd);return 1e4*Math.pow(Math.max(0,e-po)/(go-mo*e),1/fo)}function Da(t){if(t<0)return 0;const e=Math.pow(t/1e4,fo);return Math.pow((po+go*e)/(1+mo*e),zd)}const Na=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=Ra(t+.008609037037932761*e+.11102962500302593*n),o=Ra(t-.00860903703793275*e-.11102962500302599*n),s=Ra(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:Na(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:Na(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:Na(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},ja=(t=0)=>Math.max(t*Ld,0),Rd=({x:t,y:e,z:n,alpha:r})=>{const i=ja(t),o=ja(e),s=ja(n),a=Da(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Da(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Da(.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},pb={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}}},gb=134.03437499999998,mb=16295499532821565e-27,Wa=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,fo);return Math.pow((po+go*e)/(1+mo*e),gb)},Fa=(t=0)=>Math.max(t*203,0),Dd=({x:t,y:e,z:n,alpha:r})=>{t=Fa(t),e=Fa(e),n=Fa(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=Wa(.41478972*i+.579999*o+.014648*n),a=Wa(-.20151*i+1.120649*o+.0531008*n),l=Wa(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-mb,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},yb=134.03437499999998,Nd=16295499532821565e-27,Ba=t=>{if(t<0)return 0;let e=Math.pow(t,1/yb);return 1e4*Math.pow((po-e)/(mo*e-go),1/fo)},Va=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=Ba(i+.13860504*e+.058047316*n),s=Ba(i-.13860504*e-.058047316*n),a=Ba(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Va(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Va(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Va(-.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)),vb={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},xb={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:so},average:{h:yn}},yo=Math.pow(29,3)/Math.pow(3,3),Ya=Math.pow(6,3)/Math.pow(29,3);let Xa=t=>Math.pow(t,3)>Ya?Math.pow(t,3):(116*t-16)/yo;const Ga=({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:Xa(o)*fe.X,y:Xa(i)*fe.Y,z:Xa(s)*fe.Z};return r!==void 0&&(a.alpha=r),a},ri=({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=Or({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=>ri(Ga(t)),ii=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(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},qa=t=>t>Ya?Math.cbrt(t):(yo*t+16)/116,Ua=({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=qa(t/fe.X),o=qa(e/fe.Y),s=qa(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=Ua(ii(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function bb(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 Za={mode:"lab",toMode:{xyz50:Ga,rgb:Yd},fromMode:{xyz50:Ua,rgb:Xd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[bb],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}}},wb=He(Pe({},Za),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Pd,rgb:ao},fromMode:{xyz65:Cd,rgb:lo},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function _b(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 Ka={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:[_b],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:so},average:{h:yn}},$b=He(Pe({},Ka),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>In(t,"lab65"),rgb:t=>ao(In(t,"lab65"))},fromMode:{rgb:t=>En(lo(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),Pb=Ud(fe.X,fe.Y,fe.Z),Cb=Zd(fe.X,fe.Y,fe.Z),Ob=t=>t<=Ya?yo*t:116*Math.cbrt(t)-16,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=Ob(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-Pb),s=13*i*(s-Cb));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},Mb=(t,e,n)=>4*t/(t+15*e+3*n),Sb=(t,e,n)=>9*e/(t+15*e+3*n),Eb=Mb(fe.X,fe.Y,fe.Z),Ib=Sb(fe.X,fe.Y,fe.Z),Ja=({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)+Eb,o=n/(13*t)+Ib,s=fe.Y*(t<=8?t/yo: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},Tb={mode:"lchuv",toMode:{luv:qd,rgb:t=>ri(Ja(qd(t)))},fromMode:{rgb:t=>Gd(Qa(ii(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:so},average:{h:yn}},Ab=He(Pe({},Pr),{mode:"lrgb",toMode:{rgb:Or},fromMode:{rgb:Cr},parse:["srgb-linear"],serialize:"srgb-linear"}),kb={mode:"luv",toMode:{xyz50:Ja,rgb:t=>ri(Ja(t))},fromMode:{xyz50:Qa,rgb:t=>Qa(ii(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},vo=t=>{let e=Kd(Cr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},oi=({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},xo=t=>Or(oi(t));function tl(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function bo(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function Lb(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 el(t,e){let n=Lb(t,e),r=oi({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 zb(t,e,n,r,i,o=null){o||(o=el(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 nl(t,e,n=null){n||(n=el(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function Qd(t,e,n){let r=el(e,n),i=zb(e,n,t,1,t,r),o=nl(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:tl(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:bo(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 Hb=He(Pe({},Id),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Jd,rgb:t=>Jd(vo(t))},toMode:{oklab:tu,rgb:t=>xo(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]=nl(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=bo(f),y=p*g/f,m=oi({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*tl(e)/e,e=tl(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]=nl(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=bo(u),g=f*p/u,y=oi({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),x=bo(i*u),v=f*x/u;return e.l=x*m,e.a=v*o*m,e.b=v*s*m,e}const Rb=He(Pe({},kd),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:eu,rgb:t=>eu(vo(t))},toMode:{oklab:nu,rgb:t=>xo(nu(t))}});function Db(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 Nb=He(Pe({},Za),{mode:"oklab",toMode:{lrgb:oi,rgb:xo},fromMode:{lrgb:Kd,rgb:vo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Db],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 jb(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({},Ka),{mode:"oklch",toMode:{oklab:t=>In(t,"oklab"),rgb:t=>xo(In(t,"oklab"))},fromMode:{rgb:t=>En(vo(t),"oklch"),oklab:t=>En(t,"oklch")},parse:[jb],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}=Cr(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=Or({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},Wb=He(Pe({},Pr),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>ou(Bn(t)),xyz65:ou},toMode:{rgb:t=>Vn(iu(t)),xyz65:iu}}),rl=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:rl(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:rl(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:rl(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},il=(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=il(t.r),n=il(t.g),r=il(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},Fb=He(Pe({},Pr),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:su,rgb:t=>su(ii(t))},toMode:{xyz50:au,rgb:t=>ri(au(t))}}),lu=1.09929682680944,Bb=.018053968510807,ol=t=>{const e=Math.abs(t);return e>Bb?(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:ol(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:ol(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:ol(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},hu=1.09929682680944,Vb=.018053968510807,sl=(t=0)=>{let e=Math.abs(t);return e<Vb*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+hu-1)/hu,1/.45)},du=t=>{let e=sl(t.r),n=sl(t.g),r=sl(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},Yb=He(Pe({},Pr),{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),al=t=>Math.cbrt(t)-uu,Xb=t=>{const{r:e,g:n,b:r,alpha:i}=Cr(t),o=al(.3*e+.622*n+.078*r+Yn),s=al(.23*e+.692*n+.078*r+Yn),a=al(.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},ll=t=>Math.pow(t+uu,3),Gb={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=ll(t+e)-Yn,o=ll(e-t)-Yn,s=ll(n+e)-Yn,a=Or({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:Xb},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ht,y:ht,b:ht,alpha:{use:ht,fixup:pe}}},qb={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:ri,lab:Ua},fromMode:{rgb:ii,lab:Ga},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}}},Ub={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}}},Zb={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}}},Kb=t=>Math.max(0,Math.min(1,t||0)),wo=t=>Math.round(Kb(t)*255),fu=Oa("rgb"),pu=t=>{if(t===void 0)return;let e=wo(t.r),n=wo(t.g),r=wo(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},Qb=t=>{if(t===void 0)return;let e=wo(t.alpha!==void 0?t.alpha:1);return pu(t)+(256|e).toString(16).slice(1)},si=t=>pu(fu(t)),Jb=t=>Qb(fu(t));function cl(t){let e=Oa("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function hl(t,e){let n=cl(t),r=cl(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Yt(Yx),Yt(Qx),Yt(Jx),Yt(tb),Yt(rb),Yt(Id),Yt(kd),Yt(fb),Yt(pb),Yt(vb),Yt(xb),Yt(Za),Yt(wb),Yt(Ka),Yt($b),Yt(Tb),Yt(Ab),Yt(kb),Yt(Hb),Yt(Rb),Yt(Nb);const gu=Yt(ru);Yt(Wb),Yt(Fb),Yt(Yb),Yt(Pr),Yt(Gb),Yt(qb),Yt(Ub),Yt(Zb);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?cl(e)<.5:!1}var Tn=Array.isArray,yu=typeof global=="object"&&global&&global.Object===Object&&global,t4=typeof self=="object"&&self&&self.Object===Object&&self,sn=yu||t4||Function("return this")(),An=sn.Symbol,vu=Object.prototype,e4=vu.hasOwnProperty,n4=vu.toString,ai=An?An.toStringTag:void 0;function r4(t){var e=e4.call(t,ai),n=t[ai];try{t[ai]=void 0;var r=!0}catch(o){}var i=n4.call(t);return r&&(e?t[ai]=n:delete t[ai]),i}var i4=Object.prototype,o4=i4.toString;function s4(t){return o4.call(t)}var a4="[object Null]",l4="[object Undefined]",xu=An?An.toStringTag:void 0;function Gn(t){return t==null?t===void 0?l4:a4:xu&&xu in Object(t)?r4(t):s4(t)}function kn(t){return t!=null&&typeof t=="object"}var c4="[object Symbol]";function _o(t){return typeof t=="symbol"||kn(t)&&Gn(t)==c4}var h4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d4=/^\w*$/;function u4(t,e){if(Tn(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||_o(t)?!0:d4.test(t)||!h4.test(t)||e!=null&&t in Object(e)}function an(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var f4="[object AsyncFunction]",p4="[object Function]",g4="[object GeneratorFunction]",m4="[object Proxy]";function dl(t){if(!an(t))return!1;var e=Gn(t);return e==p4||e==g4||e==f4||e==m4}var ul=sn["__core-js_shared__"],bu=(function(){var t=/[^.]+$/.exec(ul&&ul.keys&&ul.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function y4(t){return!!bu&&bu in t}var v4=Function.prototype,x4=v4.toString;function qn(t){if(t!=null){try{return x4.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var b4=/[\\^$.*+?()[\]{}|]/g,w4=/^\[object .+?Constructor\]$/,_4=Function.prototype,$4=Object.prototype,P4=_4.toString,C4=$4.hasOwnProperty,O4=RegExp("^"+P4.call(C4).replace(b4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function M4(t){if(!an(t)||y4(t))return!1;var e=dl(t)?O4:w4;return e.test(qn(t))}function S4(t,e){return t==null?void 0:t[e]}function Un(t,e){var n=S4(t,e);return M4(n)?n:void 0}var li=Un(Object,"create");function E4(){this.__data__=li?li(null):{},this.size=0}function I4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var T4="__lodash_hash_undefined__",A4=Object.prototype,k4=A4.hasOwnProperty;function L4(t){var e=this.__data__;if(li){var n=e[t];return n===T4?void 0:n}return k4.call(e,t)?e[t]:void 0}var z4=Object.prototype,H4=z4.hasOwnProperty;function R4(t){var e=this.__data__;return li?e[t]!==void 0:H4.call(e,t)}var D4="__lodash_hash_undefined__";function N4(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=li&&e===void 0?D4: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=E4,Zn.prototype.delete=I4,Zn.prototype.get=L4,Zn.prototype.has=R4,Zn.prototype.set=N4;function j4(){this.__data__=[],this.size=0}function $o(t,e){return t===e||t!==t&&e!==e}function Po(t,e){for(var n=t.length;n--;)if($o(t[n][0],e))return n;return-1}var W4=Array.prototype,F4=W4.splice;function B4(t){var e=this.__data__,n=Po(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():F4.call(e,n,1),--this.size,!0}function V4(t){var e=this.__data__,n=Po(e,t);return n<0?void 0:e[n][1]}function Y4(t){return Po(this.__data__,t)>-1}function X4(t,e){var n=this.__data__,r=Po(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=j4,vn.prototype.delete=B4,vn.prototype.get=V4,vn.prototype.has=Y4,vn.prototype.set=X4;var ci=Un(sn,"Map");function G4(){this.size=0,this.__data__={hash:new Zn,map:new(ci||vn),string:new Zn}}function q4(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Co(t,e){var n=t.__data__;return q4(e)?n[typeof e=="string"?"string":"hash"]:n.map}function U4(t){var e=Co(this,t).delete(t);return this.size-=e?1:0,e}function Z4(t){return Co(this,t).get(t)}function K4(t){return Co(this,t).has(t)}function Q4(t,e){var n=Co(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=G4,Ln.prototype.delete=U4,Ln.prototype.get=Z4,Ln.prototype.has=K4,Ln.prototype.set=Q4;var J4="Expected a function";function fl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(J4);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(fl.Cache||Ln),n}fl.Cache=Ln;var t5=500;function e5(t){var e=fl(t,function(r){return n.size===t5&&n.clear(),r}),n=e.cache;return e}var n5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r5=/\\(\\)?/g,i5=e5(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(n5,function(n,r,i,o){e.push(i?o.replace(r5,"$1"):r||n)}),e});function o5(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 o5(t,$u)+"";if(_o(t))return _u?_u.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function hi(t){return t==null?"":$u(t)}function s5(t,e){return Tn(t)?t:u4(t,e)?[t]:i5(hi(t))}function a5(t){if(typeof t=="string"||_o(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function l5(t,e){e=s5(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[a5(e[n++])];return n&&n==r?t:void 0}function Pu(t,e,n){var r=t==null?void 0:l5(t,e);return r===void 0?n:r}function di(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 c5(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 h5(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:c5(t,e,n)}var d5="\\ud800-\\udfff",u5="\\u0300-\\u036f",f5="\\ufe20-\\ufe2f",p5="\\u20d0-\\u20ff",g5=u5+f5+p5,m5="\\ufe0e\\ufe0f",y5="\\u200d",v5=RegExp("["+y5+d5+g5+m5+"]");function Ou(t){return v5.test(t)}function x5(t){return t.split("")}var Mu="\\ud800-\\udfff",b5="\\u0300-\\u036f",w5="\\ufe20-\\ufe2f",_5="\\u20d0-\\u20ff",$5=b5+w5+_5,P5="\\ufe0e\\ufe0f",C5="["+Mu+"]",pl="["+$5+"]",gl="\\ud83c[\\udffb-\\udfff]",O5="(?:"+pl+"|"+gl+")",Su="[^"+Mu+"]",Eu="(?:\\ud83c[\\udde6-\\uddff]){2}",Iu="[\\ud800-\\udbff][\\udc00-\\udfff]",M5="\\u200d",Tu=O5+"?",Au="["+P5+"]?",S5="(?:"+M5+"(?:"+[Su,Eu,Iu].join("|")+")"+Au+Tu+")*",E5=Au+Tu+S5,I5="(?:"+[Su+pl+"?",pl,Eu,Iu,C5].join("|")+")",T5=RegExp(gl+"(?="+gl+")|"+I5+E5,"g");function A5(t){return t.match(T5)||[]}function k5(t){return Ou(t)?A5(t):x5(t)}function L5(t){return function(e){e=hi(e);var n=Ou(e)?k5(e):void 0,r=n?n[0]:e.charAt(0),i=n?h5(n,1).join(""):e.slice(1);return r[t]()+i}}var z5=L5("toUpperCase");function H5(t){return z5(hi(t).toLowerCase())}function R5(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 D5(t){return function(e){return t==null?void 0:t[e]}}var N5={À:"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"},j5=D5(N5),W5=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,F5="\\u0300-\\u036f",B5="\\ufe20-\\ufe2f",V5="\\u20d0-\\u20ff",Y5=F5+B5+V5,X5="["+Y5+"]",G5=RegExp(X5,"g");function q5(t){return t=hi(t),t&&t.replace(W5,j5).replace(G5,"")}var U5=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Z5(t){return t.match(U5)||[]}var K5=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Q5(t){return K5.test(t)}var ku="\\ud800-\\udfff",J5="\\u0300-\\u036f",t6="\\ufe20-\\ufe2f",e6="\\u20d0-\\u20ff",n6=J5+t6+e6,Lu="\\u2700-\\u27bf",zu="a-z\\xdf-\\xf6\\xf8-\\xff",r6="\\xac\\xb1\\xd7\\xf7",i6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",o6="\\u2000-\\u206f",s6=" \\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",a6="\\ufe0e\\ufe0f",Ru=r6+i6+o6+s6,Du="['’]",Nu="["+Ru+"]",l6="["+n6+"]",ju="\\d+",c6="["+Lu+"]",Wu="["+zu+"]",Fu="[^"+ku+Ru+ju+Lu+zu+Hu+"]",h6="\\ud83c[\\udffb-\\udfff]",d6="(?:"+l6+"|"+h6+")",u6="[^"+ku+"]",Bu="(?:\\ud83c[\\udde6-\\uddff]){2}",Vu="[\\ud800-\\udbff][\\udc00-\\udfff]",Sr="["+Hu+"]",f6="\\u200d",Yu="(?:"+Wu+"|"+Fu+")",p6="(?:"+Sr+"|"+Fu+")",Xu="(?:"+Du+"(?:d|ll|m|re|s|t|ve))?",Gu="(?:"+Du+"(?:D|LL|M|RE|S|T|VE))?",qu=d6+"?",Uu="["+a6+"]?",g6="(?:"+f6+"(?:"+[u6,Bu,Vu].join("|")+")"+Uu+qu+")*",m6="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",y6="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",v6=Uu+qu+g6,x6="(?:"+[c6,Bu,Vu].join("|")+")"+v6,b6=RegExp([Sr+"?"+Wu+"+"+Xu+"(?="+[Nu,Sr,"$"].join("|")+")",p6+"+"+Gu+"(?="+[Nu,Sr+Yu,"$"].join("|")+")",Sr+"?"+Yu+"+"+Xu,Sr+"+"+Gu,y6,m6,ju,x6].join("|"),"g");function w6(t){return t.match(b6)||[]}function _6(t,e,n){return t=hi(t),e=e,e===void 0?Q5(t)?w6(t):Z5(t):t.match(e)||[]}var $6="['’]",P6=RegExp($6,"g");function Zu(t){return function(e){return R5(_6(q5(e).replace(P6,"")),t,"")}}var C6=Zu(function(t,e,n){return e=e.toLowerCase(),t+(n?H5(e):e)});const O6=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 M6(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function S6(t){return/^\d/.test(t)||/\s/.test(t)}function E6(t){const e=t.trim();if(!e||M6(e)||O6.has(e.toLowerCase())||!S6(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Er(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=>E6(n)).join(", "):t.trim()}const I6={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 I6[e]||"regular"}function $t(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Qt(n,e),n}function Ir(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 T6(t,e){e.forEach(n=>{t.removeAttribute(n)})}function ml(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{ml(r,e)})}function Oo(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,A6=Object.prototype.hasOwnProperty,k6=Object.prototype.propertyIsEnumerable,L6=(t,e)=>{var n={};for(var r in t)A6.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&&k6.call(t,r)&&(n[r]=t[r]);return n};function Jn(t){return nf(t)?t.querySelector("span"):null}function z6(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&&vl(t,n),!r)return;const i=Jn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,R6(r)),!o||!s){const p=D6(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,H6(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 H6(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 R6(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=L6(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[C6(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 D6(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 yl(t){var e;return((e=Jn(t))==null?void 0:e.innerText)||""}function vl(t,e){const n=Jn(t);n&&(n.innerText=e)}function xl(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]=N6(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Er(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:yl(t)}}function N6(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},j6=t=>Me(t,"title"),W6=t=>Me(t,"desc"),F6=t=>Me(t,"shape"),B6=t=>Me(t,"shapes-group"),V6=t=>Me(t,"illus"),Y6=t=>t instanceof SVGElement&&t.tagName==="text",X6=t=>t instanceof SVGElement&&t.tagName==="g",bl=t=>Me(t,"item-icon"),ef=t=>Me(t,"item-icon-group"),G6=t=>Me(t,"item-label"),q6=t=>Me(t,"item-desc"),U6=t=>Me(t,"item-value"),Z6=t=>Me(t,"item-illus"),K6=t=>Me(t,"edit-area"),Q6=t=>Me(t,"btns-group"),J6=t=>Me(t,"rough-element"),tw=t=>Me(t,"rough-volume");function nf(t){return t.tagName==="foreignObject"}function ew(t){return t.tagName==="SPAN"}function xn(t){const e=wl(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 nw(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function zn(t){return bl(t)||ef(t)}function rw(t){let e=t;for(;e;){if(Tr(e,$a))return!0;e=e.parentElement}return!1}function ui(t,e){t.setAttribute("data-element-type",e)}function Tr(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function wl(t){return zn(t)?zt.ItemIcon:t.getAttribute("data-element-type")||zt.Unknown}function iw(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,_l=iw(1024),$l=new Map;function ow(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 sw(t){const e=ow(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 aw(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&&_l.set(e,i),i}finally{$l.delete(e)}})}function Mo(t,e){return of(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return sf(n);const r=sw(n);if(_l.has(r))return af(_l.get(r));let i=$l.get(r);i||(i=aw(n,r),$l.set(r,i));const o=yield i;return af(o)})}function lw(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 oW=Object.defineProperty,sW=Object.defineProperties;var aW=Object.getOwnPropertyDescriptors;var Qv=Object.getOwnPropertySymbols;var lW=Object.prototype.hasOwnProperty,cW=Object.prototype.propertyIsEnumerable;var no=Math.pow,Jv=(W,_e,Be)=>_e in W?oW(W,_e,{enumerable:!0,configurable:!0,writable:!0,value:Be}):W[_e]=Be,Pe=(W,_e)=>{for(var Be in _e||(_e={}))lW.call(_e,Be)&&Jv(W,Be,_e[Be]);if(Qv)for(var Be of Qv(_e))cW.call(_e,Be)&&Jv(W,Be,_e[Be]);return W},He=(W,_e)=>sW(W,aW(_e));const Be={version:"0.2.6"},Ma=new Map;function Uh(t,e){Ma.set(t,e)}function Zh(t){return Ma.get(t)}function tx(){return Array.from(Ma.keys())}var ex=Object.defineProperty,Kh=Object.getOwnPropertySymbols,nx=Object.prototype.hasOwnProperty,rx=Object.prototype.propertyIsEnumerable,Qh=(t,e,n)=>e in t?ex(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jh=(t,e)=>{for(var n in e||(e={}))nx.call(e,n)&&Qh(t,n,e[n]);if(Kh)for(var n of Kh(e))rx.call(e,n)&&Qh(t,n,e[n]);return t};const ti={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},ei={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},td={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},ed={type:"capsule-item"},nd={type:"circular-progress"},rd={type:"rounded-rect-node",positionH:"center"},id={type:"compact-card"},ix=(t,e)=>Jh(Jh({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),nn=(t,e,n,r)=>[t,{design:{structure:ix(e,r),item:n}}],ox=Object.fromEntries([nn("hierarchy-mindmap-branch-gradient-lined-palette",ti,td,"bottom"),nn("hierarchy-mindmap-level-gradient-lined-palette",ei,td,"bottom"),nn("hierarchy-mindmap-branch-gradient-capsule-item",ti,ed),nn("hierarchy-mindmap-level-gradient-capsule-item",ei,ed),nn("hierarchy-mindmap-branch-gradient-circle-progress",ti,nd,.4),nn("hierarchy-mindmap-level-gradient-circle-progress",ei,nd,.4),nn("hierarchy-mindmap-branch-gradient-rounded-rect",ti,rd),nn("hierarchy-mindmap-level-gradient-rounded-rect",ei,rd),nn("hierarchy-mindmap-branch-gradient-compact-card",ti,id),nn("hierarchy-mindmap-level-gradient-compact-card",ei,id)]),sx={"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 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,ad=(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={"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}},dx=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],ld={},cd="hierarchy-tree",ux=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],fx=(t,e,n)=>t?`${cd}-${t}-${e}-${n}`:`${cd}-${e}-${n}`;for(const t of dx)for(const[e,n]of Object.entries(hx))for(const{key:r,orientation:i}of ux){const o=fx(r,e,t);ld[o]={design:{structure:ad(ad({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const px={"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"}}},gx={"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}]}}},mx={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var yx=Object.defineProperty,hd=Object.getOwnPropertySymbols,vx=Object.prototype.hasOwnProperty,xx=Object.prototype.propertyIsEnumerable,dd=(t,e,n)=>e in t?yx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e)=>{for(var n in e||(e={}))vx.call(e,n)&&dd(t,n,e[n]);if(hd)for(var n of hd(e))xx.call(e,n)&&dd(t,n,e[n]);return t};const bx=_r(_r(_r(_r(_r(_r({"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"}]}}},ld),ox),gx),mx),px),sx);Object.entries(bx).forEach(([t,e])=>{Uh(t,e)});const Bt=Symbol.for("@antv/infographic/Fragment");function d(t,e={}){return{type:t,props:e}}const I=d,Sa="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 wx="https://www.weavefox.cn/api/open/v1/icon",Ea=Symbol.for("@antv/infographic/Defs");function jt(t){return{type:Ea,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 _x=Object.defineProperty,ud=Object.getOwnPropertySymbols,$x=Object.prototype.hasOwnProperty,Px=Object.prototype.propertyIsEnumerable,fd=(t,e,n)=>e in t?_x(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cx=(t,e)=>{for(var n in e||(e={}))$x.call(e,n)&&fd(t,n,e[n]);if(ud)for(var n of ud(e))Px.call(e,n)&&fd(t,n,e[n]);return t};function yt(t){const{x:e,y:n}=t,r=Cx({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var Ox=Object.defineProperty,Mx=Object.defineProperties,Sx=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,pd=Object.prototype.hasOwnProperty,gd=Object.prototype.propertyIsEnumerable,md=(t,e,n)=>e in t?Ox(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ex=(t,e)=>{for(var n in e||(e={}))pd.call(e,n)&&md(t,n,e[n]);if(ro)for(var n of ro(e))gd.call(e,n)&&md(t,n,e[n]);return t},Ix=(t,e)=>Mx(t,Sx(e)),Ax=(t,e)=>{var n={};for(var r in t)pd.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ro)for(var r of ro(t))e.indexOf(r)<0&&gd.call(t,r)&&(n[r]=t[r]);return n};function Ve(t){var e=t,{points:n=[]}=e,r=Ax(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=Ix(Ex({},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 yd(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 vd=(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}}},Tx={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},kx=t=>vd(Tx[t.toLowerCase()],6),Lx=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,zx=t=>{let e;return(e=t.match(Lx))?vd(parseInt(e[1],16),e[1].length):void 0},Sn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ni=`${Sn}%`,Ia=`(?:${Sn}%|${Sn})`,Hx=`(?:${Sn}(deg|grad|rad|turn)|${Sn})`,$r="\\s*,\\s*",Rx=new RegExp(`^rgba?\\(\\s*${Sn}${$r}${Sn}${$r}${Sn}\\s*(?:,\\s*${Ia}\\s*)?\\)$`),Dx=new RegExp(`^rgba?\\(\\s*${ni}${$r}${ni}${$r}${ni}\\s*(?:,\\s*${Ia}\\s*)?\\)$`),Nx=t=>{let e={mode:"rgb"},n;if(n=t.match(Rx))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(Dx))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},jx=(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,Aa=(t="rgb")=>e=>(e=jx(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={},xd={},io=[],bd={},Wx=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=Wx)}),xd[t.mode]=t,(t.parse||[]).forEach(e=>{Bx(e,t.mode)}),Aa(t.mode)),Fx=t=>xd[t],Bx=(t,e)=>{if(typeof t=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");bd[t]=e}else typeof t=="function"&&io.indexOf(t)<0&&io.push(t)},Ta=/[^\x00-\x7F]|[a-zA-Z_]/,Vx=/[^\x00-\x7F]|[-\w]/,rt={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let $t=0;function oo(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 ka(t){if($t>=t.length)return!1;let e=t[$t];if(Ta.test(e))return!0;if(e==="-"){if(t.length-$t<2)return!1;let n=t[$t+1];return!!(n==="-"||Ta.test(n))}return!1}const Yx={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ri(t){let e="";if((t[$t]==="-"||t[$t]==="+")&&(e+=t[$t++]),e+=so(t),t[$t]==="."&&/\d/.test(t[$t+1])&&(e+=t[$t++]+so(t)),(t[$t]==="e"||t[$t]==="E")&&((t[$t+1]==="-"||t[$t+1]==="+")&&/\d/.test(t[$t+2])?e+=t[$t++]+t[$t++]+so(t):/\d/.test(t[$t+1])&&(e+=t[$t++]+so(t))),ka(t)){let n=ao(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:rt.Hue,value:e*Yx[n]}:void 0}return t[$t]==="%"?($t++,{type:rt.Percentage,value:+e}):{type:rt.Number,value:+e}}function so(t){let e="";for(;/\d/.test(t[$t]);)e+=t[$t++];return e}function ao(t){let e="";for(;$t<t.length&&Vx.test(t[$t]);)e+=t[$t++];return e}function Xx(t){let e=ao(t);return t[$t]==="("?($t++,{type:rt.Function,value:e}):e==="none"?{type:rt.None,value:void 0}:{type:rt.Ident,value:e}}function Gx(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--,oo(e)){n.push(ri(e));continue}return}if(r==="-"){if($t--,oo(e)){n.push(ri(e));continue}if(ka(e)){n.push({type:rt.Ident,value:ao(e)});continue}return}if(r==="."){if($t--,oo(e)){n.push(ri(e));continue}return}if(r==="/"){for(;$t<e.length&&(e[$t]===`
|
|
4
|
+
`||e[$t]===" "||e[$t]===" ");)$t++;let i;if(oo(e)&&(i=ri(e),i.type!==rt.Hue)){n.push({type:rt.Alpha,value:i});continue}if(ka(e)&&ao(e)==="none"){n.push({type:rt.Alpha,value:{type:rt.None,value:void 0}});continue}return}if(/\d/.test(r)){$t--,n.push(ri(e));continue}if(Ta.test(r)){$t--,n.push(Xx(e));continue}return}return n}function qx(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=bd[e.value];if(!n)return;const r={mode:n},i=wd(t,!1);if(!i)return;const o=Fx(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 wd(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 Ux(t,e){t._i=0;let n=t[t._i++];if(!n||n.type!==rt.Function)return;let r=wd(t,e);if(r)return r.unshift(n.value),r}const on=t=>{if(typeof t!="string")return;const e=Gx(t),n=e?Ux(e,!0):void 0;let r,i=0,o=io.length;for(;i<o;)if((r=io[i++](t,n))!==void 0)return r;return e?qx(e):void 0};function Zx(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 Kx=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Qx=(t,e,n)=>t+n*(e-t),Jx=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=Jx(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)}})(Qx),pe=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},Pr={mode:"rgb",channels:["r","g","b","alpha"],parse:[Zx,zx,Nx,kx,Kx,"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}},La=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),_d=t=>{let e=La(t.r),n=La(t.g),r=La(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},za=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),$d=({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:za(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:za(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:za(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Ha=(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)},Cr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Ha(t),g:Ha(e),b:Ha(n)};return r!==void 0&&(i.alpha=r),i},Bn=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(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},Ra=(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},Or=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Ra(t),g:Ra(e),b:Ra(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=Or({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},tb=He(Pe({},Pr),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>$d(Bn(t)),xyz65:$d},toMode:{rgb:t=>Vn(_d(t)),xyz65:_d}}),$e=t=>(t=t%360)<0?t+360:t,eb=(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=>eb(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ve=[-.14861,1.78277,-.29227,-.90649,1.97294,0],nb=Math.PI/180,rb=180/Math.PI;let Pd=ve[3]*ve[4],Cd=ve[1]*ve[4],Od=ve[1]*ve[2]-ve[0]*ve[3];const 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=(Od*n+t*Pd-e*Cd)/(Od+Pd-Cd),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)*rb-120),r!==void 0&&(a.alpha=r),a},ob=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*nb,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},lo=(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},sb=(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},co=(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},ab={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:ib},toMode:{rgb:ob},interpolate:{h:{use:ht,fixup:mn},s:ht,l:ht,alpha:{use:ht,fixup:pe}},difference:{h:lo},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},Md=Math.pow(29,3)/Math.pow(3,3),Sd=Math.pow(6,3)/Math.pow(29,3),fe={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Mr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Da=t=>Math.pow(t,3)>Sd?Math.pow(t,3):(116*t-16)/Md;const Ed=({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:Da(o)*Mr.X,y:Da(i)*Mr.Y,z:Da(s)*Mr.Z};return r!==void 0&&(a.alpha=r),a},ho=t=>Vn(Ed(t)),Na=t=>t>Sd?Math.cbrt(t):(Md*t+16)/116,Id=({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=Na(t/Mr.X),o=Na(e/Mr.Y),s=Na(n/Mr.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},uo=t=>{let e=Id(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},fo=1,Ad=1,ii=26/180*Math.PI,po=Math.cos(ii),go=Math.sin(ii),Td=100/Math.log(139/100),ja=({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*fo/Td)-1)/.0039},o=(Math.exp(.0435*e*Ad*fo)-1)/.075,s=o*Math.cos(n/180*Math.PI-ii),a=o*Math.sin(n/180*Math.PI-ii);return i.a=s*po-a/.83*go,i.b=s*go+a/.83*po,r!==void 0&&(i.alpha=r),i},Wa=({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*po+n*go,o=.83*(n*po-e*go),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:Td/fo*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*Ad*fo)};return a.c&&(a.h=$e((Math.atan2(o,i)+ii)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},kd=t=>ja(En(t,"dlch")),Ld=t=>In(Wa(t),"dlab"),lb={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:kd,rgb:t=>ho(kd(t))},fromMode:{lab65:Ld,rgb:t=>Ld(uo(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}}},cb={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:ja,dlab:t=>In(t,"dlab"),rgb:t=>ho(ja(t))},fromMode:{lab65:Wa,dlab:t=>En(t,"dlch"),rgb:t=>Wa(uo(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:co},average:{h:yn}};function hb({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 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:"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 ub={mode:"hsi",toMode:{rgb:hb},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:db},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:lo},average:{h:yn}};function fb({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 pb({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 gb=(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}},mb=new RegExp(`^hsla?\\(\\s*${Hx}${$r}${ni}${$r}${ni}\\s*(?:,\\s*${Ia}\\s*)?\\)$`),yb=t=>{let e=t.match(mb);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=gb(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 vb(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 zd={mode:"hsl",toMode:{rgb:fb},fromMode:{rgb:pb},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[vb,yb],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:lo},average:{h:yn}};function Hd({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 Rd({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 Dd={mode:"hsv",toMode:{rgb:Hd},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Rd},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:lo},average:{h:yn}};function xb({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 Hd({h:t,s:n===1?1:1-e/(1-n),v:1-n,alpha:r})}function bb(t){let e=Rd(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 wb(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 _b={mode:"hwb",toMode:{rgb:xb},fromMode:{rgb:bb},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[wb],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:sb},average:{h:yn}},Nd=203,mo=.1593017578125,jd=78.84375,yo=.8359375,vo=18.8515625,xo=18.6875;function Fa(t){if(t<0)return 0;const e=Math.pow(t,1/jd);return 1e4*Math.pow(Math.max(0,e-yo)/(vo-xo*e),1/mo)}function Ba(t){if(t<0)return 0;const e=Math.pow(t/1e4,mo);return Math.pow((yo+vo*e)/(1+xo*e),jd)}const Va=t=>Math.max(t/Nd,0),Wd=({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=Fa(t+.008609037037932761*e+.11102962500302593*n),o=Fa(t-.00860903703793275*e-.11102962500302599*n),s=Fa(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:Va(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:Va(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:Va(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},Ya=(t=0)=>Math.max(t*Nd,0),Fd=({x:t,y:e,z:n,alpha:r})=>{const i=Ya(t),o=Ya(e),s=Ya(n),a=Ba(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Ba(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Ba(.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},$b={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Wd,rgb:t=>Vn(Wd(t))},fromMode:{xyz65:Fd,rgb:t=>Fd(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,Cb=16295499532821565e-27,Xa=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,mo);return Math.pow((yo+vo*e)/(1+xo*e),Pb)},Ga=(t=0)=>Math.max(t*203,0),Bd=({x:t,y:e,z:n,alpha:r})=>{t=Ga(t),e=Ga(e),n=Ga(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=Xa(.41478972*i+.579999*o+.014648*n),a=Xa(-.20151*i+1.120649*o+.0531008*n),l=Xa(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-Cb,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},Ob=134.03437499999998,Vd=16295499532821565e-27,qa=t=>{if(t<0)return 0;let e=Math.pow(t,1/Ob);return 1e4*Math.pow((yo-e)/(xo*e-vo),1/mo)},Ua=t=>t/203,Yd=({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+Vd)/(.44+.56*(t+Vd)),o=qa(i+.13860504*e+.058047316*n),s=qa(i-.13860504*e-.058047316*n),a=qa(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Ua(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Ua(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Ua(-.090982811*o-.31272829*s+1.5227666*a)};return r!==void 0&&(l.alpha=r),l},Xd=t=>{let e=Bd(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Gd=t=>Vn(Yd(t)),Mb={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xd,xyz65:Bd},toMode:{rgb:Gd,xyz65:Yd},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ht,a:ht,b:ht,alpha:{use:ht,fixup:pe}}},qd=({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},Ud=({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},Sb={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Ud,rgb:t=>Gd(Ud(t))},fromMode:{rgb:t=>qd(Xd(t)),jab:qd},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:co},average:{h:yn}},bo=Math.pow(29,3)/Math.pow(3,3),Za=Math.pow(6,3)/Math.pow(29,3);let Ka=t=>Math.pow(t,3)>Za?Math.pow(t,3):(116*t-16)/bo;const Qa=({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:Ka(o)*fe.X,y:Ka(i)*fe.Y,z:Ka(s)*fe.Z};return r!==void 0&&(a.alpha=r),a},oi=({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=Or({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},Zd=t=>oi(Qa(t)),si=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(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},Ja=t=>t>Za?Math.cbrt(t):(bo*t+16)/116,tl=({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=Ja(t/fe.X),o=Ja(e/fe.Y),s=Ja(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},Kd=t=>{let e=tl(si(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function Eb(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 el={mode:"lab",toMode:{xyz50:Qa,rgb:Zd},fromMode:{xyz50:tl,rgb:Kd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Eb],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}}},Ib=He(Pe({},el),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Ed,rgb:ho},fromMode:{xyz65:Id,rgb:uo},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function Ab(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 nl={mode:"lch",toMode:{lab:In,rgb:t=>Zd(In(t))},fromMode:{rgb:t=>En(Kd(t)),lab:En},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Ab],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:co},average:{h:yn}},Tb=He(Pe({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>In(t,"lab65"),rgb:t=>ho(In(t,"lab65"))},fromMode:{rgb:t=>En(uo(t),"lch65"),lab65:t=>En(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Qd=({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},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},tu=(t,e,n)=>4*t/(t+15*e+3*n),eu=(t,e,n)=>9*e/(t+15*e+3*n),kb=tu(fe.X,fe.Y,fe.Z),Lb=eu(fe.X,fe.Y,fe.Z),zb=t=>t<=Za?bo*t:116*Math.cbrt(t)-16,rl=({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=zb(e/fe.Y),o=tu(t,e,n),s=eu(t,e,n);!isFinite(o)||!isFinite(s)?i=o=s=0:(o=13*i*(o-kb),s=13*i*(s-Lb));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},Hb=(t,e,n)=>4*t/(t+15*e+3*n),Rb=(t,e,n)=>9*e/(t+15*e+3*n),Db=Hb(fe.X,fe.Y,fe.Z),Nb=Rb(fe.X,fe.Y,fe.Z),il=({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)+Db,o=n/(13*t)+Nb,s=fe.Y*(t<=8?t/bo: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},jb={mode:"lchuv",toMode:{luv:Jd,rgb:t=>oi(il(Jd(t)))},fromMode:{rgb:t=>Qd(rl(si(t))),luv:Qd},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:co},average:{h:yn}},Wb=He(Pe({},Pr),{mode:"lrgb",toMode:{rgb:Or},fromMode:{rgb:Cr},parse:["srgb-linear"],serialize:"srgb-linear"}),Fb={mode:"luv",toMode:{xyz50:il,rgb:t=>oi(il(t))},fromMode:{xyz50:rl,rgb:t=>rl(si(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}}},nu=({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},wo=t=>{let e=nu(Cr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},ai=({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},_o=t=>Or(ai(t));function ol(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function $o(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function Bb(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,T=6*p*p*m,E=a*x+l*v+c*b,S=a*w+l*_+c*$,R=a*P+l*C+c*T;h=h-E*S/(S*S-.5*E*R)}return h}function sl(t,e){let n=Bb(t,e),r=ai({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 Vb(t,e,n,r,i,o=null){o||(o=sl(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,T=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,A=4.0767416621*P-3.3077115913*C+.2309699292*T,F=4.0767416621*E-3.3077115913*S+.2309699292*R,L=A/(A*A-.5*O*F),D=-O*L,k=-1.2684380046*w+2.6097574011*_-.3413193965*$-1,N=-1.2684380046*P+2.6097574011*C-.3413193965*T,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*T,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 al(t,e,n=null){n||(n=sl(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function ru(t,e,n){let r=sl(e,n),i=Vb(e,n,t,1,t,r),o=al(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 iu(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:ol(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]=ru(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 ou(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:$o(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]=ru(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 Yb=He(Pe({},zd),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:iu,rgb:t=>iu(wo(t))},toMode:{oklab:ou,rgb:t=>_o(ou(t))}});function su(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]=al(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=$o(f),y=p*g/f,m=ai({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*ol(e)/e,e=ol(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 au(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]=al(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=$o(u),g=f*p/u,y=ai({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),x=$o(i*u),v=f*x/u;return e.l=x*m,e.a=v*o*m,e.b=v*s*m,e}const Xb=He(Pe({},Dd),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:su,rgb:t=>su(wo(t))},toMode:{oklab:au,rgb:t=>_o(au(t))}});function Gb(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 qb=He(Pe({},el),{mode:"oklab",toMode:{lrgb:ai,rgb:_o},fromMode:{lrgb:nu,rgb:wo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Gb],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 Ub(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 lu=He(Pe({},nl),{mode:"oklch",toMode:{oklab:t=>In(t,"oklab"),rgb:t=>_o(In(t,"oklab"))},fromMode:{rgb:t=>En(wo(t),"oklch"),oklab:t=>En(t,"oklch")},parse:[Ub],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]}}),cu=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(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},hu=({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=Or({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},Zb=He(Pe({},Pr),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>hu(Bn(t)),xyz65:hu},toMode:{rgb:t=>Vn(cu(t)),xyz65:cu}}),ll=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},du=({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:ll(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:ll(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:ll(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},cl=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},uu=t=>{let e=cl(t.r),n=cl(t.g),r=cl(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},Kb=He(Pe({},Pr),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:du,rgb:t=>du(si(t))},toMode:{xyz50:uu,rgb:t=>oi(uu(t))}}),fu=1.09929682680944,Qb=.018053968510807,hl=t=>{const e=Math.abs(t);return e>Qb?(Math.sign(t)||1)*(fu*Math.pow(e,.45)-(fu-1)):4.5*t},pu=({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:hl(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:hl(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:hl(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},gu=1.09929682680944,Jb=.018053968510807,dl=(t=0)=>{let e=Math.abs(t);return e<Jb*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+gu-1)/gu,1/.45)},mu=t=>{let e=dl(t.r),n=dl(t.g),r=dl(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},t4=He(Pe({},Pr),{mode:"rec2020",fromMode:{xyz65:pu,rgb:t=>pu(Bn(t))},toMode:{xyz65:mu,rgb:t=>Vn(mu(t))},parse:["rec2020"],serialize:"rec2020"}),Yn=.0037930732552754493,yu=Math.cbrt(Yn),ul=t=>Math.cbrt(t)-yu,e4=t=>{const{r:e,g:n,b:r,alpha:i}=Cr(t),o=ul(.3*e+.622*n+.078*r+Yn),s=ul(.23*e+.692*n+.078*r+Yn),a=ul(.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},fl=t=>Math.pow(t+yu,3),n4={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=fl(t+e)-Yn,o=fl(e-t)-Yn,s=fl(n+e)-Yn,a=Or({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:e4},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ht,y:ht,b:ht,alpha:{use:ht,fixup:pe}}},r4={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:oi,lab:tl},fromMode:{rgb:si,lab:Qa},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}}},i4={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}}},o4={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}}},s4=t=>Math.max(0,Math.min(1,t||0)),Po=t=>Math.round(s4(t)*255),vu=Aa("rgb"),xu=t=>{if(t===void 0)return;let e=Po(t.r),n=Po(t.g),r=Po(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},a4=t=>{if(t===void 0)return;let e=Po(t.alpha!==void 0?t.alpha:1);return xu(t)+(256|e).toString(16).slice(1)},li=t=>xu(vu(t)),l4=t=>a4(vu(t));function pl(t){let e=Aa("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function gl(t,e){let n=pl(t),r=pl(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Yt(tb),Yt(ab),Yt(lb),Yt(cb),Yt(ub),Yt(zd),Yt(Dd),Yt(_b),Yt($b),Yt(Mb),Yt(Sb),Yt(el),Yt(Ib),Yt(nl),Yt(Tb),Yt(jb),Yt(Wb),Yt(Fb),Yt(Yb),Yt(Xb),Yt(qb);const bu=Yt(lu);Yt(Zb),Yt(Kb),Yt(t4),Yt(Pr),Yt(n4),Yt(r4),Yt(i4),Yt(o4);function Xn(t){if(!t)return!1;const e=t.trim().toLowerCase();return!(e==="none"||e==="transparent"||e==="")}function wu(t){const e=on(t);return e?pl(e)<.5:!1}var An=Array.isArray,_u=typeof global=="object"&&global&&global.Object===Object&&global,c4=typeof self=="object"&&self&&self.Object===Object&&self,sn=_u||c4||Function("return this")(),Tn=sn.Symbol,$u=Object.prototype,h4=$u.hasOwnProperty,d4=$u.toString,ci=Tn?Tn.toStringTag:void 0;function u4(t){var e=h4.call(t,ci),n=t[ci];try{t[ci]=void 0;var r=!0}catch(o){}var i=d4.call(t);return r&&(e?t[ci]=n:delete t[ci]),i}var f4=Object.prototype,p4=f4.toString;function g4(t){return p4.call(t)}var m4="[object Null]",y4="[object Undefined]",Pu=Tn?Tn.toStringTag:void 0;function Gn(t){return t==null?t===void 0?y4:m4:Pu&&Pu in Object(t)?u4(t):g4(t)}function kn(t){return t!=null&&typeof t=="object"}var v4="[object Symbol]";function Co(t){return typeof t=="symbol"||kn(t)&&Gn(t)==v4}var x4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b4=/^\w*$/;function w4(t,e){if(An(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Co(t)?!0:b4.test(t)||!x4.test(t)||e!=null&&t in Object(e)}function an(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var _4="[object AsyncFunction]",$4="[object Function]",P4="[object GeneratorFunction]",C4="[object Proxy]";function ml(t){if(!an(t))return!1;var e=Gn(t);return e==$4||e==P4||e==_4||e==C4}var yl=sn["__core-js_shared__"],Cu=(function(){var t=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function O4(t){return!!Cu&&Cu in t}var M4=Function.prototype,S4=M4.toString;function qn(t){if(t!=null){try{return S4.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var E4=/[\\^$.*+?()[\]{}|]/g,I4=/^\[object .+?Constructor\]$/,A4=Function.prototype,T4=Object.prototype,k4=A4.toString,L4=T4.hasOwnProperty,z4=RegExp("^"+k4.call(L4).replace(E4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function H4(t){if(!an(t)||O4(t))return!1;var e=ml(t)?z4:I4;return e.test(qn(t))}function R4(t,e){return t==null?void 0:t[e]}function Un(t,e){var n=R4(t,e);return H4(n)?n:void 0}var hi=Un(Object,"create");function D4(){this.__data__=hi?hi(null):{},this.size=0}function N4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var j4="__lodash_hash_undefined__",W4=Object.prototype,F4=W4.hasOwnProperty;function B4(t){var e=this.__data__;if(hi){var n=e[t];return n===j4?void 0:n}return F4.call(e,t)?e[t]:void 0}var V4=Object.prototype,Y4=V4.hasOwnProperty;function X4(t){var e=this.__data__;return hi?e[t]!==void 0:Y4.call(e,t)}var G4="__lodash_hash_undefined__";function q4(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hi&&e===void 0?G4: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=D4,Zn.prototype.delete=N4,Zn.prototype.get=B4,Zn.prototype.has=X4,Zn.prototype.set=q4;function U4(){this.__data__=[],this.size=0}function Oo(t,e){return t===e||t!==t&&e!==e}function Mo(t,e){for(var n=t.length;n--;)if(Oo(t[n][0],e))return n;return-1}var Z4=Array.prototype,K4=Z4.splice;function Q4(t){var e=this.__data__,n=Mo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():K4.call(e,n,1),--this.size,!0}function J4(t){var e=this.__data__,n=Mo(e,t);return n<0?void 0:e[n][1]}function t5(t){return Mo(this.__data__,t)>-1}function e5(t,e){var n=this.__data__,r=Mo(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=U4,vn.prototype.delete=Q4,vn.prototype.get=J4,vn.prototype.has=t5,vn.prototype.set=e5;var di=Un(sn,"Map");function n5(){this.size=0,this.__data__={hash:new Zn,map:new(di||vn),string:new Zn}}function r5(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function So(t,e){var n=t.__data__;return r5(e)?n[typeof e=="string"?"string":"hash"]:n.map}function i5(t){var e=So(this,t).delete(t);return this.size-=e?1:0,e}function o5(t){return So(this,t).get(t)}function s5(t){return So(this,t).has(t)}function a5(t,e){var n=So(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=n5,Ln.prototype.delete=i5,Ln.prototype.get=o5,Ln.prototype.has=s5,Ln.prototype.set=a5;var l5="Expected a function";function vl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(l5);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(vl.Cache||Ln),n}vl.Cache=Ln;var c5=500;function h5(t){var e=vl(t,function(r){return n.size===c5&&n.clear(),r}),n=e.cache;return e}var d5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u5=/\\(\\)?/g,f5=h5(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(d5,function(n,r,i,o){e.push(i?o.replace(u5,"$1"):r||n)}),e});function p5(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 Ou=Tn?Tn.prototype:void 0,Mu=Ou?Ou.toString:void 0;function Su(t){if(typeof t=="string")return t;if(An(t))return p5(t,Su)+"";if(Co(t))return Mu?Mu.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ui(t){return t==null?"":Su(t)}function g5(t,e){return An(t)?t:w4(t,e)?[t]:f5(ui(t))}function m5(t){if(typeof t=="string"||Co(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function y5(t,e){e=g5(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[m5(e[n++])];return n&&n==r?t:void 0}function Eu(t,e,n){var r=t==null?void 0:y5(t,e);return r===void 0?n:r}function fi(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 Eu(n,r)}function Iu(t){const{structure:e,item:n,items:r}=t;return!(!e||!n||r.some(i=>!i))}function v5(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 x5(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:v5(t,e,n)}var b5="\\ud800-\\udfff",w5="\\u0300-\\u036f",_5="\\ufe20-\\ufe2f",$5="\\u20d0-\\u20ff",P5=w5+_5+$5,C5="\\ufe0e\\ufe0f",O5="\\u200d",M5=RegExp("["+O5+b5+P5+C5+"]");function Au(t){return M5.test(t)}function S5(t){return t.split("")}var Tu="\\ud800-\\udfff",E5="\\u0300-\\u036f",I5="\\ufe20-\\ufe2f",A5="\\u20d0-\\u20ff",T5=E5+I5+A5,k5="\\ufe0e\\ufe0f",L5="["+Tu+"]",xl="["+T5+"]",bl="\\ud83c[\\udffb-\\udfff]",z5="(?:"+xl+"|"+bl+")",ku="[^"+Tu+"]",Lu="(?:\\ud83c[\\udde6-\\uddff]){2}",zu="[\\ud800-\\udbff][\\udc00-\\udfff]",H5="\\u200d",Hu=z5+"?",Ru="["+k5+"]?",R5="(?:"+H5+"(?:"+[ku,Lu,zu].join("|")+")"+Ru+Hu+")*",D5=Ru+Hu+R5,N5="(?:"+[ku+xl+"?",xl,Lu,zu,L5].join("|")+")",j5=RegExp(bl+"(?="+bl+")|"+N5+D5,"g");function W5(t){return t.match(j5)||[]}function F5(t){return Au(t)?W5(t):S5(t)}function B5(t){return function(e){e=ui(e);var n=Au(e)?F5(e):void 0,r=n?n[0]:e.charAt(0),i=n?x5(n,1).join(""):e.slice(1);return r[t]()+i}}var V5=B5("toUpperCase");function Y5(t){return V5(ui(t).toLowerCase())}function X5(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 G5(t){return function(e){return t==null?void 0:t[e]}}var q5={À:"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"},U5=G5(q5),Z5=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,K5="\\u0300-\\u036f",Q5="\\ufe20-\\ufe2f",J5="\\u20d0-\\u20ff",tw=K5+Q5+J5,ew="["+tw+"]",nw=RegExp(ew,"g");function rw(t){return t=ui(t),t&&t.replace(Z5,U5).replace(nw,"")}var iw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ow(t){return t.match(iw)||[]}var sw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function aw(t){return sw.test(t)}var Du="\\ud800-\\udfff",lw="\\u0300-\\u036f",cw="\\ufe20-\\ufe2f",hw="\\u20d0-\\u20ff",dw=lw+cw+hw,Nu="\\u2700-\\u27bf",ju="a-z\\xdf-\\xf6\\xf8-\\xff",uw="\\xac\\xb1\\xd7\\xf7",fw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pw="\\u2000-\\u206f",gw=" \\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",Wu="A-Z\\xc0-\\xd6\\xd8-\\xde",mw="\\ufe0e\\ufe0f",Fu=uw+fw+pw+gw,Bu="['’]",Vu="["+Fu+"]",yw="["+dw+"]",Yu="\\d+",vw="["+Nu+"]",Xu="["+ju+"]",Gu="[^"+Du+Fu+Yu+Nu+ju+Wu+"]",xw="\\ud83c[\\udffb-\\udfff]",bw="(?:"+yw+"|"+xw+")",ww="[^"+Du+"]",qu="(?:\\ud83c[\\udde6-\\uddff]){2}",Uu="[\\ud800-\\udbff][\\udc00-\\udfff]",Sr="["+Wu+"]",_w="\\u200d",Zu="(?:"+Xu+"|"+Gu+")",$w="(?:"+Sr+"|"+Gu+")",Ku="(?:"+Bu+"(?:d|ll|m|re|s|t|ve))?",Qu="(?:"+Bu+"(?:D|LL|M|RE|S|T|VE))?",Ju=bw+"?",tf="["+mw+"]?",Pw="(?:"+_w+"(?:"+[ww,qu,Uu].join("|")+")"+tf+Ju+")*",Cw="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ow="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Mw=tf+Ju+Pw,Sw="(?:"+[vw,qu,Uu].join("|")+")"+Mw,Ew=RegExp([Sr+"?"+Xu+"+"+Ku+"(?="+[Vu,Sr,"$"].join("|")+")",$w+"+"+Qu+"(?="+[Vu,Sr+Zu,"$"].join("|")+")",Sr+"?"+Zu+"+"+Ku,Sr+"+"+Qu,Ow,Cw,Yu,Sw].join("|"),"g");function Iw(t){return t.match(Ew)||[]}function Aw(t,e,n){return t=ui(t),e=e,e===void 0?aw(t)?Iw(t):ow(t):t.match(e)||[]}var Tw="['’]",kw=RegExp(Tw,"g");function ef(t){return function(e){return X5(Aw(rw(e).replace(kw,"")),t,"")}}var Lw=ef(function(t,e,n){return e=e.toLowerCase(),t+(n?Y5(e):e)});const zw=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 nf(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function Hw(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function Rw(t){return/^\d/.test(t)||/\s/.test(t)}function Dw(t){const e=t.trim();if(!e||Hw(e)||zw.has(e.toLowerCase())||!Rw(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Er(t){const e=Kn(t);return e.length?e.length===1?nf(e[0]):e.map(n=>nf(n)).join(", "):""}function Qn(t){const e=Kn(t);return e.length?e.map(n=>Dw(n)).join(", "):t.trim()}const Nw={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 rf(t){const e=String(t).toLowerCase();return Nw[e]||"regular"}function bt(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Qt(n,e),n}function Ir(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 jw(t,e){e.forEach(n=>{t.removeAttribute(n)})}function Ar(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{Ar(r,e)})}function Eo(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",r=t.querySelector(n);if(r)return r;const i=bt("defs");return e&&(i.id=e),t.prepend(i),i}var of=Object.getOwnPropertySymbols,Ww=Object.prototype.hasOwnProperty,Fw=Object.prototype.propertyIsEnumerable,Bw=(t,e)=>{var n={};for(var r in t)Ww.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&of)for(var r of of(t))e.indexOf(r)<0&&Fw.call(t,r)&&(n[r]=t[r]);return n};function Jn(t){return lf(t)?t.querySelector("span"):null}function Vw(t,e){const n=document.createElement("span"),r=bt("foreignObject",{overflow:"visible"});return r.appendChild(n),sf(r,{textContent:t,attributes:e}),r}function sf(t,e){const{textContent:n,attributes:r}=e;if(n!==void 0&&_l(t,n),!r)return;const i=Jn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,Xw(r)),!o||!s){const p=Gw(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,Yw(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 Yw(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 Xw(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=Bw(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[Lw(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 Gw(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 wl(t){var e;return((e=Jn(t))==null?void 0:e.innerText)||""}function _l(t,e){const n=Jn(t);n&&(n.innerText=e)}function $l(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]=qw(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Er(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:wl(t)}}function qw(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},Uw=t=>Me(t,"title"),Zw=t=>Me(t,"desc"),Kw=t=>Me(t,"shape"),Qw=t=>Me(t,"shapes-group"),Jw=t=>Me(t,"illus"),t6=t=>t instanceof SVGElement&&t.tagName==="text",e6=t=>t instanceof SVGElement&&t.tagName==="g",Pl=t=>Me(t,"item-icon"),af=t=>Me(t,"item-icon-group"),n6=t=>Me(t,"item-label"),r6=t=>Me(t,"item-desc"),i6=t=>Me(t,"item-value"),o6=t=>Me(t,"item-illus"),s6=t=>Me(t,"edit-area"),a6=t=>Me(t,"btns-group"),l6=t=>Me(t,"rough-element"),c6=t=>Me(t,"rough-volume");function lf(t){return t.tagName==="foreignObject"}function h6(t){return t.tagName==="SPAN"}function xn(t){const e=Cl(t);return[zt.Title,zt.Desc,zt.ItemLabel,zt.ItemDesc].includes(e)}function cf(t){if(!t||!xn(t))return!1;const e=Jn(t);return e?e.hasAttribute("contenteditable"):!1}function d6(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function zn(t){return Pl(t)||af(t)}function u6(t){let e=t;for(;e;){if(Tr(e,Sa))return!0;e=e.parentElement}return!1}function pi(t,e){t.setAttribute("data-element-type",e)}function Tr(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function Cl(t){return zn(t)?zt.ItemIcon:t.getAttribute("data-element-type")||zt.Unknown}function f6(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 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 df=globalThis.fetch,Ol=f6(1024),Ml=new Map;function p6(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 g6(t){const e=p6(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}function uf(t){return new Response(t.body.slice(0),t.init)}function m6(t,e){return hf(this,null,function*(){try{const n=yield df(t),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&Ol.set(e,i),i}finally{Ml.delete(e)}})}function Io(t,e){return hf(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return df(n);const r=g6(n);if(Ol.has(r))return uf(Ol.get(r));let i=Ml.get(r);i||(i=m6(n,r),Ml.set(r,i));const o=yield i;return uf(o)})}function y6(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 ff(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 v6=(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 kr=new WeakMap;function x6(t){const e=kr.get(t);return e?Array.from(e.values()):[]}function pf(t,e){var n;return(n=kr.get(t))==null?void 0:n.get(e)}function gf(t,e,n){let r=kr.get(t);return r||(r=new Map,kr.set(t,r)),r.set(e,n),n.finally(()=>{const i=kr.get(t);i&&(i.get(e)===n&&i.delete(e),i.size===0&&kr.delete(t))}),n}function b6(t){return v6(this,null,function*(){for(yield Promise.resolve();;){const e=x6(t);if(!e.length)break;yield Promise.allSettled(e),yield Promise.resolve()}})}var w6=(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 _6(t){return t.startsWith("data:")}function gi(t){return w6(this,null,function*(){var e;if(!t||!_6(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 Ir(`
|
|
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 dw(t){return t.startsWith("<svg")||t.startsWith("<symbol")}function Ar(t){if(!t||!dw(t))return null;const e=t.startsWith("<svg")?t.replace(/<svg/,"<symbol").replace(/svg>/,"symbol>"):t;return Ir(e)}var uw=(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 fw(t){try{return!!new URL(t)}catch(e){return!1}}function pw(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function cf(t,e){return uw(this,null,function*(){if(!t||!fw(t))return null;const n=yield Mo(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(pw(r,e)){const s=yield n.text();return Ar(s)}const i=yield n.blob(),o=yield gw(i);return fi(o)})}function gw(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 mw=t=>hf(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${ux}?${n.toString()}`,i=yield Mo(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 yw(t){return t.startsWith("data:")}function vw(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 mw(t);if(!r)return null;if(vw(r))return Ar(r);if(yw(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 Ar(a)}return fi(r)}return cf(r,e)})}let uf=null;function xw(t){uf=t}function bw(){return uf}function ww(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 _w=new Set(["svg","png","jpg","jpeg","webp","gif"]);function $w(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function Pw(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 Cw(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&&_w.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||Pw(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 So(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=ww(t);if(e)return e;const n=Cw(t);return n||($w(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function Pl(t){const e=typeof t=="string"?So(t):t;return e?"rsc-"+lf(JSON.stringify(e)):null}function ff(t){const e=Pl(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 Ow(t,e,n){return pf(this,null,function*(){const r=So(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=Ar(o):s==="svg"&&c?l=yield fi(o):c||s==="image"?l=yield fi(o):l=Ar(o)}else if(i==="remote")l=yield cf(o,s);else if(i==="search")l=yield df(o,s);else{const c=bw();c&&(l=yield c(r))}}catch(c){l=null}return l||(yield df(Mw(r,t,n),s))})}const gf=new Map,Cl=new WeakMap;function mf(t,e,n,r){return pf(this,null,function*(){if(!t)return null;const i=So(n);if(!i)return null;const o=Pl(i),s=gf.has(o)?gf.get(o)||null:yield Ow(e,i,r);if(!s)return null;Cl.has(t)||Cl.set(t,new Map);const a=Cl.get(t);if(a.has(o))return o;const l=Oo(t);return s.id=o,l.appendChild(s),a.set(o,s),o})}function Mw(t,e,n){const r=e==="illus"?"illustration":"icon",i=Ol(n==null?void 0:n.label)||Ol(n==null?void 0:n.desc);if(i)return i;const o=Ol(t.data);return!o||t.source==="inline"||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?r:o}function Ol(t){if(typeof t!="string")return null;const e=t.trim();return e||null}var Sw=Object.defineProperty,Ew=Object.defineProperties,Iw=Object.getOwnPropertyDescriptors,yf=Object.getOwnPropertySymbols,Tw=Object.prototype.hasOwnProperty,Aw=Object.prototype.propertyIsEnumerable,vf=(t,e,n)=>e in t?Sw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kw=(t,e)=>{for(var n in e||(e={}))Tw.call(e,n)&&vf(t,n,e[n]);if(yf)for(var n of yf(e))Aw.call(e,n)&&vf(t,n,e[n]);return t},Lw=(t,e)=>Ew(t,Iw(e));const zw=new WeakMap;function Hw(t,e={}){const n=$t("use",Lw(kw({},e),{href:ff(t)}));return xf(n),zw.set(n,t),n}function xf(t){const{stroke:e,fill:n}=Re(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function Eo(t){return t.tagName==="use"?t:t.querySelector("use")}function Ml(t){const e=Eo(t);return e?Re(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function Rw(t,e,n){const r=Eo(t);r&&(n&&Qt(r,n),xf(r))}const Dw=",",Nw=(t,e=Dw)=>t.split(e).map(n=>parseInt(n,10)),bf=t=>Nw(t);function Sl(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Io=new Map;let jw="sans-serif";const Ww={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 Fw(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})}Io.has(e)||Io.set(e,new Map);const i=Io.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function Bw(t,e,n){const r=t||jw,i=wf(e),o=_f(n),s=Io.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),Ww;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 Vw(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 Yw(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 Xw(t,e={}){var f;const n=Vw(t,e.textTransform),r=Bw(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=Yw(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const Gw={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 qw=Object.defineProperty,Pf=Object.getOwnPropertySymbols,Uw=Object.prototype.hasOwnProperty,Zw=Object.prototype.propertyIsEnumerable,Cf=(t,e,n)=>e in t?qw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kw=(t,e)=>{for(var n in e||(e={}))Uw.call(e,n)&&Cf(t,n,e[n]);if(Pf)for(var n of Pf(e))Zw.call(e,n)&&Cf(t,n,e[n]);return t};const El=new Map;let Il="Alibaba PuHuiTi";function Tl(t){const e=Kn(t);for(const n of e){const r=El.get(Er(n));if(r)return r}return null}function Al(){return Array.from(El.values())}function Qw(t){Il=Qn(t)}function Of(t){const e=Kw({},t);return El.set(e.fontFamily,e),e.fontFamily=Qn(e.fontFamily),e}function Mf(t){const e=Kn(t).flatMap(n=>{const r=Tl(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>Sl(i,s))});return Array.from(new Set(e))}function Jw(t,e){const n=Kn(t);let r=null;for(const s of n)if(r=Tl(s),r)break;if(!r)return null;const i=Qu(e),o=r.fontWeight[i];return o?Sl(r.baseUrl,o.replace(/\/result.css$/,"")):null}const kl=new WeakMap;function t_(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;kl.has(r)||kl.set(r,new Map);const i=kl.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 e_(t){Al().forEach(n=>t_(t,n.fontFamily))}const pi="https://assets.antv.antgroup.com",kr=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:pi,fontWeight:{regular:kr("AlibabaPuHuiTi-Regular"),bold:kr("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:pi,fontWeight:{regular:kr("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:pi,fontWeight:{regular:kr("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:pi,fontWeight:{regular:kr("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:pi,fontWeight:{regular:kr("851tegakizatsu-Regular")}}].forEach(Of);const Ll=new Map;function zl(t,e){Ll.set(t,e)}function Sf(t){return Ll.get(t)}function n_(){return Object.fromEntries(Ll)}zl("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),zl("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 To=(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 r_(t,e){var n;const r=t.parentElement;r&&(r.style.backgroundColor=e||"none");const i=Tr(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 gi(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 i_(t,e){e&&Object.keys(e).length>0&&ml(t,n=>{const r=gi(n,e);Qt(n,r)})}const If="btn-add-icon",Tf="btn-remove-icon";function o_(t,e){Qt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');a_(t),n.forEach(l_),r.forEach(c_)}const s_="btn-icon-defs";function a_(t){const e=$t("defs");ui(e,s_);const n=Ir(`<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 $6(t){return t.startsWith("<svg")||t.startsWith("<symbol")}function Lr(t){if(!t||!$6(t))return null;const e=t.startsWith("<svg")?t.replace(/<svg/,"<symbol").replace(/svg>/,"symbol>"):t;return Ir(e)}var P6=(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 C6(t){try{return!!new URL(t)}catch(e){return!1}}function O6(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function mf(t,e){return P6(this,null,function*(){if(!t||!C6(t))return null;const n=yield Io(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(O6(r,e)){const s=yield n.text();return Lr(s)}const i=yield n.blob(),o=yield M6(i);return gi(o)})}function M6(t){return new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=n,r.readAsDataURL(t)})}var yf=(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 S6=t=>yf(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${wx}?${n.toString()}`,i=yield Io(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 E6(t){return t.startsWith("data:")}function I6(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function vf(t,e){return yf(this,null,function*(){var n;if(!t)return null;const r=yield S6(t);if(!r)return null;if(I6(r))return Lr(r);if(E6(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 Lr(a)}return gi(r)}return mf(r,e)})}let xf=null;function A6(t){xf=t}function T6(){return xf}function k6(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 L6=new Set(["svg","png","jpg","jpeg","webp","gif"]);function z6(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function H6(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 R6(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&&L6.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||H6(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 Ao(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=k6(t);if(e)return e;const n=R6(t);return n||(z6(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function Sl(t){const e=typeof t=="string"?Ao(t):t;return e?"rsc-"+ff(JSON.stringify(e)):null}function bf(t){const e=Sl(t);return e?`#${e}`:null}var El=(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 D6(t,e,n){return El(this,null,function*(){const r=Ao(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=Lr(o):s==="svg"&&c?l=yield gi(o):c||s==="image"?l=yield gi(o):l=Lr(o)}else if(i==="remote")l=yield mf(o,s);else if(i==="search")l=yield vf(o,s);else{const c=T6();c&&(l=yield c(r))}}catch(c){l=null}return l||(yield vf(N6(r,t,n),s))})}const wf=new Map,To=new WeakMap;function _f(t,e,n,r){return El(this,null,function*(){if(!t)return null;const i=Ao(n);if(!i)return null;const o=Sl(i),s=`resource:${o}`,a=To.get(t);if(a!=null&&a.has(o))return o;const l=pf(t,s);if(l)return yield l;const c=El(null,null,function*(){const h=wf.has(o)?wf.get(o)||null:yield D6(e,i,r);if(!h)return null;To.has(t)||To.set(t,new Map);const u=To.get(t);if(u.has(o))return o;const f=Eo(t);return h.id=o,f.appendChild(h),u.set(o,h),o});return gf(t,s,c),yield c})}function N6(t,e,n){const r=e==="illus"?"illustration":"icon",i=Il(n==null?void 0:n.label)||Il(n==null?void 0:n.desc);if(i)return i;const o=Il(t.data);return!o||t.source==="inline"||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?r:o}function Il(t){if(typeof t!="string")return null;const e=t.trim();return e||null}var j6=Object.defineProperty,W6=Object.defineProperties,F6=Object.getOwnPropertyDescriptors,$f=Object.getOwnPropertySymbols,B6=Object.prototype.hasOwnProperty,V6=Object.prototype.propertyIsEnumerable,Pf=(t,e,n)=>e in t?j6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y6=(t,e)=>{for(var n in e||(e={}))B6.call(e,n)&&Pf(t,n,e[n]);if($f)for(var n of $f(e))V6.call(e,n)&&Pf(t,n,e[n]);return t},X6=(t,e)=>W6(t,F6(e));const G6=new WeakMap;function q6(t,e={}){const n=bt("use",X6(Y6({},e),{href:bf(t)}));return Cf(n),G6.set(n,t),n}function Cf(t){const{stroke:e,fill:n}=Re(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function ko(t){return t.tagName==="use"?t:t.querySelector("use")}function Al(t){const e=ko(t);return e?Re(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function U6(t,e,n){const r=ko(t);r&&(n&&Qt(r,n),Cf(r))}const Z6=",",K6=(t,e=Z6)=>t.split(e).map(n=>parseInt(n,10)),Of=t=>K6(t);function Tl(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Lo=new Map;let Q6="sans-serif";const J6={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 Mf(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 Sf(t){return t||"normal"}function t_(t){const e=t.fontFamily,n=Mf(t.fontWeight),r=Sf(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})}Lo.has(e)||Lo.set(e,new Map);const i=Lo.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function e_(t,e,n){const r=t||Q6,i=Mf(e),o=Sf(n),s=Lo.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),J6;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 n_(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 Ef(t){if(t===void 0)return 14;if(typeof t=="number")return t;const e=parseFloat(t);return isNaN(e)?16:e}function r_(t,e){const n=Ef(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 i_(t,e={}){var f;const n=n_(t,e.textTransform),r=e_(e.fontFamily,e.fontWeight,e.fontStyle),i=Ef(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=r_(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const o_={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 s_=Object.defineProperty,If=Object.getOwnPropertySymbols,a_=Object.prototype.hasOwnProperty,l_=Object.prototype.propertyIsEnumerable,Af=(t,e,n)=>e in t?s_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c_=(t,e)=>{for(var n in e||(e={}))a_.call(e,n)&&Af(t,n,e[n]);if(If)for(var n of If(e))l_.call(e,n)&&Af(t,n,e[n]);return t};const kl=new Map;let Ll="Alibaba PuHuiTi";function zl(t){const e=Kn(t);for(const n of e){const r=kl.get(Er(n));if(r)return r}return null}function Hl(){return Array.from(kl.values())}function h_(t){Ll=Qn(t)}function Tf(t){const e=c_({},t);return kl.set(e.fontFamily,e),e.fontFamily=Qn(e.fontFamily),e}function kf(t){const e=Kn(t).flatMap(n=>{const r=zl(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>Tl(i,s))});return Array.from(new Set(e))}function d_(t,e){const n=Kn(t);let r=null;for(const s of n)if(r=zl(s),r)break;if(!r)return null;const i=rf(e),o=r.fontWeight[i];return o?Tl(r.baseUrl,o.replace(/\/result.css$/,"")):null}const Rl=new WeakMap,mi=new WeakMap;function Lf(t,e,n){let r=mi.get(t);return r||(r=new Map,mi.set(t,r)),r.set(e,n),n.finally(()=>{const i=mi.get(t);i&&(i.get(e)===n&&i.delete(e),i.size===0&&mi.delete(t))}),n}function u_(t){if(t.dataset.infographicFontLoaded==="true")return!0;try{return!!t.sheet}catch(e){return!1}}function f_(t,e,n){var r;const i=(r=mi.get(t))==null?void 0:r.get(e);if(i)return i;if(!n||u_(n))return Lf(t,e,Promise.resolve());const o=new Promise(s=>{const a=()=>{n.dataset.infographicFontLoaded="true",s()};n.addEventListener("load",a,{once:!0}),n.addEventListener("error",a,{once:!0})});return Lf(t,e,o)}function p_(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;Rl.has(r)||Rl.set(r,new Map);const i=Rl.get(r),o=kf(e);if(!o.length)return;const s=[];o.forEach(a=>{const l=`${e}-${a}`,c=`font:${l}`;if(pf(t,c))return;let h=i.get(l);h||(h=n.createElement("link"),h.id=l,h.rel="stylesheet",h.href=a,s.push(h),i.set(l,h));const u=f_(r,l,h);gf(t,c,u)}),s.length&&r.tagName==="HEAD"&&s.forEach(a=>r.appendChild(a))}function g_(t){Hl().forEach(n=>p_(t,n.fontFamily))}const yi="https://assets.antv.antgroup.com",zr=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:yi,fontWeight:{regular:zr("AlibabaPuHuiTi-Regular"),bold:zr("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:yi,fontWeight:{regular:zr("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:yi,fontWeight:{regular:zr("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:yi,fontWeight:{regular:zr("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:yi,fontWeight:{regular:zr("851tegakizatsu-Regular")}}].forEach(Tf);const Dl=new Map;function Nl(t,e){Dl.set(t,e)}function zf(t){return Dl.get(t)}function m_(){return Object.fromEntries(Dl)}Nl("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),Nl("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 zo=(t=[],e,n)=>{var r;const i=typeof t=="string"?zf(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 y_(t,e){var n;const r=t.parentElement;r&&(r.style.backgroundColor=e||"none");const i=Tr(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=bt("rect",{x:o,y:s,width:a,height:l,fill:e,"data-element-type":zt.Background});t.prepend(c)}}function vi(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 Hf(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function v_(t,e){e&&Object.keys(e).length>0&&Ar(t,n=>{const r=vi(n,e);Qt(n,r)})}const Rf="btn-add-icon",Df="btn-remove-icon";function x_(t,e){Qt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');w_(t),n.forEach(__),r.forEach($_)}const b_="btn-icon-defs";function w_(t){const e=bt("defs");pi(e,b_);const n=Ir(`<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",Rf),e.appendChild(n));const r=Ir(`<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",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 l_(t){Af(t,If)}function c_(t){Af(t,Tf)}var h_=Object.defineProperty,kf=Object.getOwnPropertySymbols,d_=Object.prototype.hasOwnProperty,u_=Object.prototype.propertyIsEnumerable,Lf=(t,e,n)=>e in t?h_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hl=(t,e)=>{for(var n in e||(e={}))d_.call(e,n)&&Lf(t,n,e[n]);if(kf)for(var n of kf(e))u_.call(e,n)&&Lf(t,n,e[n]);return t};function f_(t,e,n,r){var i;const o=n.icon;if(!o)return null;const{themeConfig:s}=r,a=Hl({},(i=s.item)==null?void 0:i.icon),l=gi(e,a);return p_(t,e,o,l,n)}function p_(t,e,n,r,i){return mf(t,"icon",n,i),Hw(n,Hl(Hl({},Re(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var g_=Object.defineProperty,m_=Object.defineProperties,y_=Object.getOwnPropertyDescriptors,Ao=Object.getOwnPropertySymbols,zf=Object.prototype.hasOwnProperty,Hf=Object.prototype.propertyIsEnumerable,Rf=(t,e,n)=>e in t?g_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ko=(t,e)=>{for(var n in e||(e={}))zf.call(e,n)&&Rf(t,n,e[n]);if(Ao)for(var n of Ao(e))Hf.call(e,n)&&Rf(t,n,e[n]);return t},Df=(t,e)=>m_(t,y_(e)),v_=(t,e)=>{var n={};for(var r in t)zf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ao)for(var r of Ao(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=So(n);if(!i)return null;const o=Pl(i),s=b_(t,e,o);mf(t,"illus",i,r);const{data:a,color:l}=i;return w_(o,ko(Df(ko({},__(e)),{"clip-path":`url(#${s})`}),l?{color:l}:{}),a)}function x_(t,e,n){const r=n.illus;return Nf(t,e,r,n)}function b_(t,e,n){const r=`clip-${n}-${iP()}`;if(t.querySelector(`#${r}`))return r;const i=Oo(t),o=$t("clipPath",{id:r}),s=e.cloneNode();return T6(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function w_(t,e,n){const r=e,{"clip-path":i}=r,o=v_(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(ko({id:t,fill:"lightgray"},o),{href:ff(n),"data-element-type":zt.Illus}));return u.appendChild(f),u}function __(t){const e=t.getAttribute("data-illus-bounds");if(!e)return ko({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 Lo(t){"@babel/helpers - typeof";return Lo=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},Lo(t)}var $_=/^\s+/,P_=/\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=C_(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 E_(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:W_[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(k_,arguments)},brighten:function(){return this._applyModification(L_,arguments)},darken:function(){return this._applyModification(z_,arguments)},desaturate:function(){return this._applyModification(I_,arguments)},saturate:function(){return this._applyModification(T_,arguments)},greyscale:function(){return this._applyModification(A_,arguments)},spin:function(){return this._applyModification(H_,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(N_,arguments)},complement:function(){return this._applyCombination(R_,arguments)},monochromatic:function(){return this._applyCombination(j_,arguments)},splitcomplement:function(){return this._applyCombination(D_,arguments)},triad:function(){return this._applyCombination(Vf,[3])},tetrad:function(){return this._applyCombination(Vf,[4])}},lt.fromRatio=function(t,e){if(Lo(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=mi(t[r]));t=n}return lt(t,e)};function C_(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=Y_(t)),Lo(t)=="object"&&(bn(t.r)&&bn(t.g)&&bn(t.b)?(e=O_(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=mi(t.s),i=mi(t.v),e=S_(t.h,r,i),s=!0,a="hsv"):bn(t.h)&&bn(t.s)&&bn(t.l)&&(r=mi(t.s),o=mi(t.l),e=M_(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 O_(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 M_(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 S_(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 E_(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 I_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s-=e/100,n.s=zo(n.s),lt(n)}function T_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s+=e/100,n.s=zo(n.s),lt(n)}function A_(t){return lt(t).desaturate(100)}function k_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l+=e/100,n.l=zo(n.l),lt(n)}function L_(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 z_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l-=e/100,n.l=zo(n.l),lt(n)}function H_(t,e){var n=lt(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,lt(n)}function R_(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 D_(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 N_(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 j_(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=X_(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 Rl=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"},W_=lt.hexNames=F_(Rl);function F_(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){B_(t)&&(t="100%");var n=V_(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 zo(t){return Math.min(1,Math.max(0,t))}function De(t){return parseInt(t,16)}function B_(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function V_(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Xe(t){return t.length==1?"0"+t:""+t}function mi(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 Y_(t){t=t.replace($_,"").replace(P_,"").toLowerCase();var e=!1;if(Rl[t])t=Rl[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 X_(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 G_=Object.defineProperty,qf=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,U_=Object.prototype.propertyIsEnumerable,Uf=(t,e,n)=>e in t?G_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z_=(t,e)=>{for(var n in e||(e={}))q_.call(e,n)&&Uf(t,n,e[n]);if(qf)for(var n of qf(e))U_.call(e,n)&&Uf(t,n,e[n]);return t};function Zf(t,e,n,r){const i=t.getAttribute(r),o=K_(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=Q_(n);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,x]]=J_(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=Oo(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function K_(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=lt(t),i=Z_({},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 Q_(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 J_(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 t7=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 e7=Object.defineProperty,Ho=Object.getOwnPropertySymbols,Qf=Object.prototype.hasOwnProperty,Jf=Object.prototype.propertyIsEnumerable,t0=(t,e,n)=>e in t?e7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dl=(t,e)=>{for(var n in e||(e={}))Qf.call(e,n)&&t0(t,n,e[n]);if(Ho)for(var n of Ho(e))Jf.call(e,n)&&t0(t,n,e[n]);return t},n7=(t,e)=>{var n={};for(var r in t)Qf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ho)for(var r of Ho(t))e.indexOf(r)<0&&Jf.call(t,r)&&(n[r]=t[r]);return n};const Nl=new Map;function e0(t,e){Nl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),Nl.set(t,e)}for(const[t,e]of Object.entries(t7))e0(t,e);function r7(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=n7(i,["pattern"]),a=Nl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=Re(t,["fill","stroke"]),c=l,h=Dl({backgroundColor:c&<(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=o7(Dl(Dl({},r),h));i7(e,u,a(h)),Xn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function i7(t,e,n){const r=Oo(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function o7(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return Ef(`pattern-${e}-${n}-${r}-${i}`)}function jl(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 s7(t,e){return t[0]===e[0]&&t[1]===e[1]}function a7(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)jl(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const b=[...v];s7(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)jl(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),jl(f,h,u)})(l,a,-i)}return l}function yi(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),a7(t,i,r,o||1)}class Wl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=yi(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 Ro(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 l7=class extends Wl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=yi(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)Ro([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)}}},c7=class extends Wl{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}},h7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=yi(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=Ro(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}}},d7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=yi(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=Ro(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 u7{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=yi(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=Ro(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 f7=class{constructor(e){this.seed=e}next(){return this.seed?(Ji(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Ji(2,31):Math.random()}};const p7=0,Fl=1,n0=2,Do={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 Bl(t,e){return t.type===e}function Vl(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:p7,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:Fl,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(;!Bl(o,n0);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return Vl("M0,0"+t);i++,s=Do[o.text],r=o.text}else Bl(o,Fl)?s=Do[r]:(i++,s=Do[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(!Bl(c,Fl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Do[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 vi(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]=vi(t,e,-h),[n,r]=vi(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=vi(f[T][0],f[T][1],h),L=vi(f[T+1][0],f[T+1][1],h),D=vi(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 g7={randOffset:function(t,e){return Pt(t,e)},randOffsetWithRange:function(t,e,n){return jo(t,e,n)},ellipse:function(t,e,n,r,i){const o=l0(n,r,i);return Yl(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 No(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 m7(t,e,n,r,i){return(function(o,s){return No(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=Wo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:Wo(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=Wo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:Wo(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 Yl(t,e,n,r){const[i,o]=f0(r.increment,t,e,r.rx,r.ry,1,r.increment*jo(.1,jo(.4,1,n),n),n);let s=Fo(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=Fo(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(Vl(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(...y7(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 Xl(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 Lr(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Ae[i])switch(i){case"zigzag":Ae[i]||(Ae[i]=new l7(r));break;case"cross-hatch":Ae[i]||(Ae[i]=new c7(r));break;case"dots":Ae[i]||(Ae[i]=new h7(r));break;case"dashed":Ae[i]||(Ae[i]=new d7(r));break;case"zigzag-line":Ae[i]||(Ae[i]=new u7(r));break;default:i="hachure",Ae[i]||(Ae[i]=new Wl(r))}return Ae[i]})(e,g7).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 f7(t.seed||0)),t.randomizer.next()}function jo(t,e,n,r=1){return n.roughness*r*(u0(n)*(e-t)+t)}function Pt(t,e,n=1){return jo(-t,t,e,n)}function Hn(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Gl(t,e,n,r,i,!0,!1);if(s)return a;const l=Gl(t,e,n,r,i,!0,!0);return a.concat(l)}function Gl(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 Wo(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 Fo(r,null,n)}function Fo(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(...Gl(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)]),Fo(h,null,l)}function y7(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 xi(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(xi(t[0]),xi(t[1]),xi(t[2]),xi(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(xi(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 Bo(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function v7(t,e,n){const r=Bo(e,n);if(r===0)return Bo(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)),Bo(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 ql(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(Bo(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);ql([l,f,y,x],0,n,i),ql([x,m,g,u],0,n,i)}var o,s;return i}function x7(t,e){return Vo(t,0,t.length,e)}function Vo(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=v7(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(Vo(t,e,c+1,r,o),Vo(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function Ul(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)ql(t,3*o,e,r);return n&&n>0?Vo(r,0,r.length,n):r}const Ne="none";class Yo{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()*Ji(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=m7(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(Xl([c],s)):a.push(Lr([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=Yl(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Yl(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Lr([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",[No(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]),Lr([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(...Ul(g0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...Ul(g0(c),10,(1+r.roughness)/2))}s.length&&i.push(Lr([s],r))}return r.stroke!==Ne&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=No(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Xl([e],r)):i.push(Lr([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(Vl(h))),g=[];let y=[],m=[0,0],x=[];const v=()=>{x.length>=4&&y.push(...Ul(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 $=x7(_,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(Xl(l,r));else i.push(Lr(l,r));return s&&(a?l.forEach((h=>{i.push(No(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 b7{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Yo(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 Xo="http://www.w3.org/2000/svg";class w7{constructor(e,n){this.svg=e,this.gen=new Yo(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Xo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(Xo,"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(Xo,"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(Xo,"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 _7={canvas:(t,e)=>new b7(t,e),svg:(t,e)=>new w7(t,e),generator:t=>new Yo(t),newSeed:()=>Yo.newSeed()},$7=Object.defineProperty,m0=Object.getOwnPropertySymbols,P7=Object.prototype.hasOwnProperty,C7=Object.prototype.propertyIsEnumerable,y0=(t,e,n)=>e in t?$7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,O7=(t,e)=>{for(var n in e||(e={}))P7.call(e,n)&&y0(t,n,e[n]);if(m0)for(var n of m0(e))C7.call(e,n)&&y0(t,n,e[n]);return t};function M7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=_7.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=E7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",S7(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 S7(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 E7(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=O7({},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=I7(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 I7(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",Df),e.appendChild(r)),t.prepend(e)}function Nf(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=bt("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=bt("circle",{cx:c,cy:c,r:c,fill:"#fff",stroke:"transparent"});a.appendChild(h);const u=bt("use",{href:`#${e}`,width:o,height:s});a.appendChild(u),a.style.cursor="pointer",t.replaceWith(a)}function __(t){Nf(t,Rf)}function $_(t){Nf(t,Df)}var P_=Object.defineProperty,jf=Object.getOwnPropertySymbols,C_=Object.prototype.hasOwnProperty,O_=Object.prototype.propertyIsEnumerable,Wf=(t,e,n)=>e in t?P_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jl=(t,e)=>{for(var n in e||(e={}))C_.call(e,n)&&Wf(t,n,e[n]);if(jf)for(var n of jf(e))O_.call(e,n)&&Wf(t,n,e[n]);return t};function M_(t,e,n,r){var i;const o=n.icon;if(!o)return null;const{themeConfig:s}=r,a=jl({},(i=s.item)==null?void 0:i.icon),l=vi(e,a);return S_(t,e,o,l,n)}function S_(t,e,n,r,i){return _f(t,"icon",n,i),q6(n,jl(jl({},Re(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var E_=Object.defineProperty,I_=Object.defineProperties,A_=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,Ff=Object.prototype.hasOwnProperty,Bf=Object.prototype.propertyIsEnumerable,Vf=(t,e,n)=>e in t?E_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ro=(t,e)=>{for(var n in e||(e={}))Ff.call(e,n)&&Vf(t,n,e[n]);if(Ho)for(var n of Ho(e))Bf.call(e,n)&&Vf(t,n,e[n]);return t},Yf=(t,e)=>I_(t,A_(e)),T_=(t,e)=>{var n={};for(var r in t)Ff.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ho)for(var r of Ho(t))e.indexOf(r)<0&&Bf.call(t,r)&&(n[r]=t[r]);return n};function Xf(t,e,n,r){if(!n)return null;const i=Ao(n);if(!i)return null;const o=Sl(i),s=L_(t,e,o);_f(t,"illus",i,r);const{data:a,color:l}=i;return z_(o,Ro(Yf(Ro({},H_(e)),{"clip-path":`url(#${s})`}),l?{color:l}:{}),a)}function k_(t,e,n){const r=n.illus;return Xf(t,e,r,n)}function L_(t,e,n){const r=`clip-${n}-${vP()}`;if(t.querySelector(`#${r}`))return r;const i=Eo(t),o=bt("clipPath",{id:r}),s=e.cloneNode();return jw(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function z_(t,e,n){const r=e,{"clip-path":i}=r,o=T_(r,["clip-path"]),{x:s="0",y:a="0",width:l="0",height:c="0"}=o,h=bt("rect",{id:`${t}-volume`,"data-element-type":zt.IllusVolume,x:s,y:a,width:l,height:c,fill:"transparent"}),u=bt("g",{"data-element-type":zt.IllusGroup,"clip-path":i,id:`${t}-group`});u.appendChild(h);const f=bt("use",Yf(Ro({id:t,fill:"lightgray"},o),{href:bf(n),"data-element-type":zt.Illus}));return u.appendChild(f),u}function H_(t){const e=t.getAttribute("data-illus-bounds");if(!e)return Ro({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 Do(t){"@babel/helpers - typeof";return Do=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},Do(t)}var R_=/^\s+/,D_=/\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=N_(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=Qf(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=qf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=qf(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=Gf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Gf(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 Uf(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return B_(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:e7[Uf(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Zf(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=lt(e);r="#"+Zf(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(G_,arguments)},brighten:function(){return this._applyModification(q_,arguments)},darken:function(){return this._applyModification(U_,arguments)},desaturate:function(){return this._applyModification(V_,arguments)},saturate:function(){return this._applyModification(Y_,arguments)},greyscale:function(){return this._applyModification(X_,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(J_,arguments)},complement:function(){return this._applyCombination(K_,arguments)},monochromatic:function(){return this._applyCombination(t7,arguments)},splitcomplement:function(){return this._applyCombination(Q_,arguments)},triad:function(){return this._applyCombination(Kf,[3])},tetrad:function(){return this._applyCombination(Kf,[4])}},lt.fromRatio=function(t,e){if(Do(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=xi(t[r]));t=n}return lt(t,e)};function N_(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=o7(t)),Do(t)=="object"&&(bn(t.r)&&bn(t.g)&&bn(t.b)?(e=j_(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=xi(t.s),i=xi(t.v),e=F_(t.h,r,i),s=!0,a="hsv"):bn(t.h)&&bn(t.s)&&bn(t.l)&&(r=xi(t.s),o=xi(t.l),e=W_(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Qf(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 j_(t,e,n){return{r:se(t,255)*255,g:se(e,255)*255,b:se(n,255)*255}}function Gf(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 W_(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 qf(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 F_(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 Uf(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 B_(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(Jf(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 Zf(t,e,n,r){var i=[Xe(Jf(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 V_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s-=e/100,n.s=No(n.s),lt(n)}function Y_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s+=e/100,n.s=No(n.s),lt(n)}function X_(t){return lt(t).desaturate(100)}function G_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l+=e/100,n.l=No(n.l),lt(n)}function q_(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 U_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l-=e/100,n.l=No(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 K_(t){var e=lt(t).toHsl();return e.h=(e.h+180)%360,lt(e)}function Kf(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 Q_(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 J_(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 t7(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=s7(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 Wl=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"},e7=lt.hexNames=n7(Wl);function n7(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function Qf(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function se(t,e){r7(t)&&(t="100%");var n=i7(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 No(t){return Math.min(1,Math.max(0,t))}function De(t){return parseInt(t,16)}function r7(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function i7(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Xe(t){return t.length==1?"0"+t:""+t}function xi(t){return t<=1&&(t=t*100+"%"),t}function Jf(t){return Math.round(parseFloat(t)*255).toString(16)}function t0(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 o7(t){t=t.replace(R_,"").replace(D_,"").toLowerCase();var e=!1;if(Wl[t])t=Wl[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:t0(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:t0(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 s7(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 a7=Object.defineProperty,e0=Object.getOwnPropertySymbols,l7=Object.prototype.hasOwnProperty,c7=Object.prototype.propertyIsEnumerable,n0=(t,e,n)=>e in t?a7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h7=(t,e)=>{for(var n in e||(e={}))l7.call(e,n)&&n0(t,n,e[n]);if(e0)for(var n of e0(e))c7.call(e,n)&&n0(t,n,e[n]);return t};function r0(t,e,n,r){const i=t.getAttribute(r),o=d7(i,n),{type:s,colors:a=[]}=o,l=a.length-1,c=a.map((p,g)=>typeof p=="string"?bt("stop",{offset:`${g/l}`,"stop-color":p}):bt("stop",{offset:`${p.offset}`,"stop-color":p.color})),h=u7(o);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,x]]=f7(p),v=bt("linearGradient",{id:h,x1:g,y1:y,x2:m,y2:x});c.forEach(b=>v.appendChild(b)),i0(e,h,v)}else if(s==="radial-gradient"){const p=bt("radialGradient",{id:h});c.forEach(g=>p.appendChild(g)),i0(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 i0(t,e,n){const r=Eo(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function d7(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=lt(t),i=h7({},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 u7(t){const{type:e,colors:n=[]}=t,r=Hf(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 f7(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 p7=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const r=bt("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("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=bt("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("circle",{cx:"5",cy:"5",r:"3",fill:n}),s=bt("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=bt("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("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=bt("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),s=bt("rect",{width:"100%",height:"100%",fill:e}),a=bt("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),l=bt("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=bt("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),l=bt("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=bt("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=bt("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("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 g7=Object.defineProperty,jo=Object.getOwnPropertySymbols,o0=Object.prototype.hasOwnProperty,s0=Object.prototype.propertyIsEnumerable,a0=(t,e,n)=>e in t?g7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fl=(t,e)=>{for(var n in e||(e={}))o0.call(e,n)&&a0(t,n,e[n]);if(jo)for(var n of jo(e))s0.call(e,n)&&a0(t,n,e[n]);return t},m7=(t,e)=>{var n={};for(var r in t)o0.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&&s0.call(t,r)&&(n[r]=t[r]);return n};const Bl=new Map;function l0(t,e){Bl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),Bl.set(t,e)}for(const[t,e]of Object.entries(p7))l0(t,e);function y7(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=m7(i,["pattern"]),a=Bl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=Re(t,["fill","stroke"]),c=l,h=Fl({backgroundColor:c&<(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=x7(Fl(Fl({},r),h));v7(e,u,a(h)),Xn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function v7(t,e,n){const r=Eo(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function x7(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return Hf(`pattern-${e}-${n}-${r}-${i}`)}function Vl(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 b7(t,e){return t[0]===e[0]&&t[1]===e[1]}function w7(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)Vl(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const b=[...v];b7(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)Vl(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Vl(f,h,u)})(l,a,-i)}return l}function bi(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),w7(t,i,r,o||1)}class Yl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=bi(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 Wo(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 _7=class extends Yl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=bi(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)Wo([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)}}},$7=class extends Yl{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}},P7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=bi(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=Wo(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}}},C7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=bi(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=Wo(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 O7{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=bi(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=Wo(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 Te={};let M7=class{constructor(e){this.seed=e}next(){return this.seed?(no(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/no(2,31):Math.random()}};const S7=0,Xl=1,c0=2,Fo={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 Gl(t,e){return t.type===e}function ql(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:S7,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:Xl,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:c0,text:""},a})(t);let r="BOD",i=0,o=n[i];for(;!Gl(o,c0);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return ql("M0,0"+t);i++,s=Fo[o.text],r=o.text}else Gl(o,Xl)?s=Fo[r]:(i++,s=Fo[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(!Gl(c,Xl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Fo[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 h0(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 d0(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)&&(u0(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 wi(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function u0(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]=wi(t,e,-h),[n,r]=wi(n,r,-h);const O=(t-n)/2,A=(e-r)/2;let F=O*O/(i*i)+A*A/(o*o);F>1&&(F=Math.sqrt(F),i*=F,o*=F);const L=i*i,D=o*o,k=L*D-L*A*A-D*O*O,N=L*A*A+D*O*O,j=(a===l?-1:1)*Math.sqrt(Math.abs(k/N));y=j*i*A/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,A=n,F=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=u0(n=y+i*Math.cos(g),r=m+o*Math.sin(g),A,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*$,T=[t,e],E=[t+P*b,e-C*v],S=[n+P*_,r-C*w],R=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],c)return[E,S,R].concat(f);{f=[E,S,R].concat(f);const O=[];for(let A=0;A<f.length;A+=3){const F=wi(f[A][0],f[A][1],h),L=wi(f[A+1][0],f[A+1][1],h),D=wi(f[A+2][0],f[A+2][1],h);O.push([F[0],F[1],L[0],L[1],D[0],D[1]])}return O}}const E7={randOffset:function(t,e){return Pt(t,e)},randOffsetWithRange:function(t,e,n){return Vo(t,e,n)},ellipse:function(t,e,n,r,i){const o=g0(n,r,i);return Ul(t,e,i,o).opset},doubleLineOps:function(t,e,n,r,i){return Hn(t,e,n,r,i,!0)}};function f0(t,e,n,r,i){return{type:"path",ops:Hn(t,e,n,r,i)}}function Bo(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?f0(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function I7(t,e,n,r,i){return(function(o,s){return Bo(o,!0,s)})([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}function p0(t,e){if(t.length){const n=typeof t[0][0]=="number"?[t]:t,r=Yo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:Yo(n[0],1.5*(1+.22*e.roughness),v0(e));for(let o=1;o<n.length;o++){const s=n[o];if(s.length){const a=Yo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:Yo(s,1.5*(1+.22*e.roughness),v0(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 g0(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 Ul(t,e,n,r){const[i,o]=b0(r.increment,t,e,r.rx,r.ry,1,r.increment*Vo(.1,Vo(.4,1,n),n),n);let s=Xo(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=b0(r.increment,t,e,r.rx,r.ry,1.5,0,n),l=Xo(a,null,n);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function m0(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=w0(m,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const v=w0(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 y0(t,e){const n=d0(h0(ql(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(...A7(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 Zl(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 Hr(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Te[i])switch(i){case"zigzag":Te[i]||(Te[i]=new _7(r));break;case"cross-hatch":Te[i]||(Te[i]=new $7(r));break;case"dots":Te[i]||(Te[i]=new P7(r));break;case"dashed":Te[i]||(Te[i]=new C7(r));break;case"zigzag-line":Te[i]||(Te[i]=new O7(r));break;default:i="hachure",Te[i]||(Te[i]=new Yl(r))}return Te[i]})(e,E7).fillPolygons(t,e)}function v0(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function x0(t){return t.randomizer||(t.randomizer=new M7(t.seed||0)),t.randomizer.next()}function Vo(t,e,n,r=1){return n.roughness*r*(x0(n)*(e-t)+t)}function Pt(t,e,n=1){return Vo(-t,t,e,n)}function Hn(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Kl(t,e,n,r,i,!0,!1);if(s)return a;const l=Kl(t,e,n,r,i,!0,!0);return a.concat(l)}function Kl(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*x0(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 Yo(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 Xo(r,null,n)}function Xo(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(...Kl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function b0(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 w0(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)]),Xo(h,null,l)}function A7(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 _i(t){return[...t]}function _0(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(_i(t[0]),_i(t[1]),_i(t[2]),_i(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(_i(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 Go(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function T7(t,e,n){const r=Go(e,n);if(r===0)return Go(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)),Go(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 Ql(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(Go(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);Ql([l,f,y,x],0,n,i),Ql([x,m,g,u],0,n,i)}var o,s;return i}function k7(t,e){return qo(t,0,t.length,e)}function qo(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=T7(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(qo(t,e,c+1,r,o),qo(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function Jl(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)Ql(t,3*o,e,r);return n&&n>0?qo(r,0,r.length,n):r}const Ne="none";class Uo{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()*no(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",[f0(e,n,r,i,s)],s)}rectangle(e,n,r,i,o){const s=this._o(o),a=[],l=I7(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(Zl([c],s)):a.push(Hr([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=g0(r,i,s),c=Ul(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Ul(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Hr([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",[Bo(e,!1,r)],r)}arc(e,n,r,i,o,s,a=!1,l){const c=this._o(l),h=[],u=m0(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=m0(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 T=(C-P)/v.curveStepCount,E=[];for(let S=P;S<=C;S+=T)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]),Hr([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=p0(e,r);if(r.fill&&r.fill!==Ne)if(r.fillStyle==="solid"){const s=p0(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(...Jl(_0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...Jl(_0(c),10,(1+r.roughness)/2))}s.length&&i.push(Hr([s],r))}return r.stroke!==Ne&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=Bo(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Zl([e],r)):i.push(Hr([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=d0(h0(ql(h))),g=[];let y=[],m=[0,0],x=[];const v=()=>{x.length>=4&&y.push(...Jl(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 $=k7(_,f);$.length&&w.push($)}return w})(e,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=y0(e,r);if(o)if(r.fillStyle==="solid")if(l.length===1){const h=y0(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(Zl(l,r));else i.push(Hr(l,r));return s&&(a?l.forEach((h=>{i.push(Bo(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 L7{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Uo(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 Zo="http://www.w3.org/2000/svg";class z7{constructor(e,n){this.svg=e,this.gen=new Uo(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Zo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(Zo,"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(Zo,"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(Zo,"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 H7={canvas:(t,e)=>new L7(t,e),svg:(t,e)=>new z7(t,e),generator:t=>new Uo(t),newSeed:()=>Uo.newSeed()},R7=Object.defineProperty,$0=Object.getOwnPropertySymbols,D7=Object.prototype.hasOwnProperty,N7=Object.prototype.propertyIsEnumerable,P0=(t,e,n)=>e in t?R7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j7=(t,e)=>{for(var n in e||(e={}))D7.call(e,n)&&P0(t,n,e[n]);if($0)for(var n of $0(e))N7.call(e,n)&&P0(t,n,e[n]);return t};function W7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=H7.svg(e,{options:{seed:1e3}}),i=bt("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=B7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",F7(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 F7(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 B7(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=j7({},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=V7(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=C0(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=C0(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 V7(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 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=gi(e,o);return Qt(e,s),A7(e,t,n),e}function T7(t,e){var n;Qt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function A7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return M7(t,e,r);if(i==="pattern")return r7(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 k7(t,e){var n;const{themeConfig:r}=e,{"font-family":i=Il}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var L7=/\s/;function z7(t){for(var e=t.length;e--&&L7.test(t.charAt(e)););return e}var H7=/^\s+/;function R7(t){return t&&t.slice(0,z7(t)+1).replace(H7,"")}var b0=NaN,D7=/^[-+]0x[0-9a-f]+$/i,N7=/^0b[01]+$/i,j7=/^0o[0-7]+$/i,W7=parseInt;function Zl(t){if(typeof t=="number")return t;if(_o(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=R7(t);var n=N7.test(t);return n||j7.test(t)?W7(t.slice(2),n?2:8):D7.test(t)?b0:+t}function w0(t){return t}var Kl=Un(sn,"WeakMap"),_0=Object.create,F7=(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 B7(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 V7(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Y7=800,X7=16,G7=Date.now;function q7(t){var e=0,n=0;return function(){var r=G7(),i=X7-(r-n);if(n=r,i>0){if(++e>=Y7)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function U7(t){return function(){return t}}var Go=(function(){try{var t=Un(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),Z7=Go?function(t,e){return Go(t,"toString",{configurable:!0,enumerable:!1,value:U7(e),writable:!0})}:w0,K7=q7(Z7);function Q7(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var J7=9007199254740991,t9=/^(?:0|[1-9]\d*)$/;function $0(t,e){var n=typeof t;return e=e==null?J7:e,!!e&&(n=="number"||n!="symbol"&&t9.test(t))&&t>-1&&t%1==0&&t<e}function Ql(t,e,n){e=="__proto__"&&Go?Go(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var e9=Object.prototype,n9=e9.hasOwnProperty;function P0(t,e,n){var r=t[e];(!(n9.call(t,e)&&$o(r,n))||n===void 0&&!(e in t))&&Ql(t,e,n)}function r9(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?Ql(n,a,l):P0(n,a,l)}return n}var C0=Math.max;function i9(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),B7(t,this,a)}}function o9(t,e){return K7(i9(t,e,w0),t+"")}var s9=9007199254740991;function O0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=s9}function qo(t){return t!=null&&O0(t.length)&&!dl(t)}function a9(t,e,n){if(!an(n))return!1;var r=typeof e;return(r=="number"?qo(n)&&$0(e,n.length):r=="string"&&e in n)?$o(n[e],t):!1}function l9(t){return o9(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&&a9(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 c9=Object.prototype;function Jl(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||c9;return t===n}function h9(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var d9="[object Arguments]";function M0(t){return kn(t)&&Gn(t)==d9}var S0=Object.prototype,u9=S0.hasOwnProperty,f9=S0.propertyIsEnumerable,tc=M0((function(){return arguments})())?M0:function(t){return kn(t)&&u9.call(t,"callee")&&!f9.call(t,"callee")};function p9(){return!1}var E0=typeof W=="object"&&W&&!W.nodeType&&W,I0=E0&&typeof module=="object"&&module&&!module.nodeType&&module,g9=I0&&I0.exports===E0,T0=g9?sn.Buffer:void 0,m9=T0?T0.isBuffer:void 0,ec=m9||p9,y9="[object Arguments]",v9="[object Array]",x9="[object Boolean]",b9="[object Date]",w9="[object Error]",_9="[object Function]",$9="[object Map]",P9="[object Number]",C9="[object Object]",O9="[object RegExp]",M9="[object Set]",S9="[object String]",E9="[object WeakMap]",I9="[object ArrayBuffer]",T9="[object DataView]",A9="[object Float32Array]",k9="[object Float64Array]",L9="[object Int8Array]",z9="[object Int16Array]",H9="[object Int32Array]",R9="[object Uint8Array]",D9="[object Uint8ClampedArray]",N9="[object Uint16Array]",j9="[object Uint32Array]",re={};re[A9]=re[k9]=re[L9]=re[z9]=re[H9]=re[R9]=re[D9]=re[N9]=re[j9]=!0,re[y9]=re[v9]=re[I9]=re[x9]=re[T9]=re[b9]=re[w9]=re[_9]=re[$9]=re[P9]=re[C9]=re[O9]=re[M9]=re[S9]=re[E9]=!1;function W9(t){return kn(t)&&O0(t.length)&&!!re[Gn(t)]}function nc(t){return function(e){return t(e)}}var A0=typeof W=="object"&&W&&!W.nodeType&&W,bi=A0&&typeof module=="object"&&module&&!module.nodeType&&module,F9=bi&&bi.exports===A0,rc=F9&&yu.process,zr=(function(){try{var t=bi&&bi.require&&bi.require("util").types;return t||rc&&rc.binding&&rc.binding("util")}catch(e){}})(),k0=zr&&zr.isTypedArray,L0=k0?nc(k0):W9,B9=Object.prototype,V9=B9.hasOwnProperty;function z0(t,e){var n=Tn(t),r=!n&&tc(t),i=!n&&!r&&ec(t),o=!n&&!r&&!i&&L0(t),s=n||r||i||o,a=s?h9(t.length,String):[],l=a.length;for(var c in t)(e||V9.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 Y9=H0(Object.keys,Object),X9=Object.prototype,G9=X9.hasOwnProperty;function q9(t){if(!Jl(t))return Y9(t);var e=[];for(var n in Object(t))G9.call(t,n)&&n!="constructor"&&e.push(n);return e}function U9(t){return qo(t)?z0(t):q9(t)}function Z9(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var K9=Object.prototype,Q9=K9.hasOwnProperty;function J9(t){if(!an(t))return Z9(t);var e=Jl(t),n=[];for(var r in t)r=="constructor"&&(e||!Q9.call(t,r))||n.push(r);return n}function R0(t){return qo(t)?z0(t,!0):J9(t)}function t8(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),e8="[object Object]",n8=Function.prototype,r8=Object.prototype,N0=n8.toString,i8=r8.hasOwnProperty,o8=N0.call(Object);function s8(t){if(!kn(t)||Gn(t)!=e8)return!1;var e=D0(t);if(e===null)return!0;var n=i8.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&N0.call(n)==o8}function a8(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function l8(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Zl(n),n=n===n?n:0),e!==void 0&&(e=Zl(e),e=e===e?e:0),a8(Zl(t),e,n)}function c8(){this.__data__=new vn,this.size=0}function h8(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function d8(t){return this.__data__.get(t)}function u8(t){return this.__data__.has(t)}var f8=200;function p8(t,e){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!ci||r.length<f8-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=c8,er.prototype.delete=h8,er.prototype.get=d8,er.prototype.has=u8,er.prototype.set=p8;var j0=typeof W=="object"&&W&&!W.nodeType&&W,W0=j0&&typeof module=="object"&&module&&!module.nodeType&&module,g8=W0&&W0.exports===j0,F0=g8?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 m8(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 y8(){return[]}var v8=Object.prototype,x8=v8.propertyIsEnumerable,Y0=Object.getOwnPropertySymbols,b8=Y0?function(t){return t==null?[]:(t=Object(t),m8(Y0(t),function(e){return x8.call(t,e)}))}:y8;function w8(t,e,n){var r=e(t);return Tn(t)?r:t8(r,n(t))}function _8(t){return w8(t,U9,b8)}var ic=Un(sn,"DataView"),oc=Un(sn,"Promise"),sc=Un(sn,"Set"),X0="[object Map]",$8="[object Object]",G0="[object Promise]",q0="[object Set]",U0="[object WeakMap]",Z0="[object DataView]",P8=qn(ic),C8=qn(ci),O8=qn(oc),M8=qn(sc),S8=qn(Kl),wn=Gn;(ic&&wn(new ic(new ArrayBuffer(1)))!=Z0||ci&&wn(new ci)!=X0||oc&&wn(oc.resolve())!=G0||sc&&wn(new sc)!=q0||Kl&&wn(new Kl)!=U0)&&(wn=function(t){var e=Gn(t),n=e==$8?t.constructor:void 0,r=n?qn(n):"";if(r)switch(r){case P8:return Z0;case C8:return X0;case O8:return G0;case M8:return q0;case S8:return U0}return e});var E8=Object.prototype,I8=E8.hasOwnProperty;function T8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&I8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var K0=sn.Uint8Array;function ac(t){var e=new t.constructor(t.byteLength);return new K0(e).set(new K0(t)),e}function A8(t,e){var n=ac(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var k8=/\w*$/;function L8(t){var e=new t.constructor(t.source,k8.exec(t));return e.lastIndex=t.lastIndex,e}var Q0=An?An.prototype:void 0,J0=Q0?Q0.valueOf:void 0;function z8(t){return J0?Object(J0.call(t)):{}}function tp(t,e){var n=e?ac(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var H8="[object Boolean]",R8="[object Date]",D8="[object Map]",N8="[object Number]",j8="[object RegExp]",W8="[object Set]",F8="[object String]",B8="[object Symbol]",V8="[object ArrayBuffer]",Y8="[object DataView]",X8="[object Float32Array]",G8="[object Float64Array]",q8="[object Int8Array]",U8="[object Int16Array]",Z8="[object Int32Array]",K8="[object Uint8Array]",Q8="[object Uint8ClampedArray]",J8="[object Uint16Array]",t$="[object Uint32Array]";function e$(t,e,n){var r=t.constructor;switch(e){case V8:return ac(t);case H8:case R8:return new r(+t);case Y8:return A8(t);case X8:case G8:case q8:case U8:case Z8:case K8:case Q8:case J8:case t$:return tp(t,n);case D8:return new r;case N8:case F8:return new r(t);case j8:return L8(t);case W8:return new r;case B8:return z8(t)}}function ep(t){return typeof t.constructor=="function"&&!Jl(t)?F7(D0(t)):{}}var n$="[object Map]";function r$(t){return kn(t)&&wn(t)==n$}var np=zr&&zr.isMap,i$=np?nc(np):r$,o$="[object Set]";function s$(t){return kn(t)&&wn(t)==o$}var rp=zr&&zr.isSet,a$=rp?nc(rp):s$,l$=1,ip="[object Arguments]",c$="[object Array]",h$="[object Boolean]",d$="[object Date]",u$="[object Error]",op="[object Function]",f$="[object GeneratorFunction]",p$="[object Map]",g$="[object Number]",sp="[object Object]",m$="[object RegExp]",y$="[object Set]",v$="[object String]",x$="[object Symbol]",b$="[object WeakMap]",w$="[object ArrayBuffer]",_$="[object DataView]",$$="[object Float32Array]",P$="[object Float64Array]",C$="[object Int8Array]",O$="[object Int16Array]",M$="[object Int32Array]",S$="[object Uint8Array]",E$="[object Uint8ClampedArray]",I$="[object Uint16Array]",T$="[object Uint32Array]",te={};te[ip]=te[c$]=te[w$]=te[_$]=te[h$]=te[d$]=te[$$]=te[P$]=te[C$]=te[O$]=te[M$]=te[p$]=te[g$]=te[sp]=te[m$]=te[y$]=te[v$]=te[x$]=te[S$]=te[E$]=te[I$]=te[T$]=!0,te[u$]=te[op]=te[b$]=!1;function Uo(t,e,n,r,i,o){var s,a=e&l$;if(s!==void 0)return s;if(!an(t))return t;var l=Tn(t);if(l)s=T8(t);else{var c=wn(t),h=c==op||c==f$;if(ec(t))return V0(t,a);if(c==sp||c==ip||h&&!i)s=h?{}:ep(t);else{if(!te[c])return i?t:{};s=e$(t,c,a)}}o||(o=new er);var u=o.get(t);if(u)return u;o.set(t,s),a$(t)?t.forEach(function(g){s.add(Uo(g,e,n,g,t,o))}):i$(t)&&t.forEach(function(g,y){s.set(y,Uo(g,e,n,y,t,o))});var f=_8,p=l?void 0:f(t);return Q7(p||t,function(g,y){p&&(y=g,g=t[y]),P0(s,y,Uo(g,e,n,y,t,o))}),s}var A$=1,k$=4;function ap(t){return Uo(t,A$|k$)}function L$(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 z$=L$();function lc(t,e,n){(n!==void 0&&!$o(t[e],n)||n===void 0&&!(e in t))&&Ql(t,e,n)}function H$(t){return kn(t)&&qo(t)}function cc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function R$(t){return r9(t,R0(t))}function D$(t,e,n,r,i,o,s){var a=cc(t,n),l=cc(e,n),c=s.get(l);if(c){lc(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&&ec(l),g=!f&&!p&&L0(l);h=l,f||p||g?Tn(a)?h=a:H$(a)?h=V7(a):p?(u=!1,h=V0(l,!0)):g?(u=!1,h=tp(l,!0)):h=[]:s8(l)||tc(l)?(h=a,tc(a)?h=R$(a):(!an(a)||dl(a))&&(h=ep(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),lc(t,n,h)}function lp(t,e,n,r,i){t!==e&&z$(e,function(o,s){if(i||(i=new er),an(o))D$(t,e,s,n,lp,r,i);else{var a=r?r(cc(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),lc(t,s,a)}},R0)}var N$=Zu(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),cp=l9(function(t,e,n){lp(t,e,n)});function hc(t,e,n={}){if(!e)return null;const r=t,i=gi(r,n);Qt(r,i);const o=F$(e,r);for(const s in r.dataset)o.setAttribute(`data-${N$(s)}`,r.dataset[s]);return o}function j$(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(di(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=gi(o,h);return hc(e,e.textContent||c,u)}function W$(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 Zo=(t,e)=>t?parseFloat(t):e;function F$(t,e){const n=Zo(e.dataset.x,0),r=Zo(e.dataset.y,0),i=Zo(e.getAttribute("width")),o=Zo(e.getAttribute("height")),s=B$(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"}),z6(t,s)}function B$(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 V${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;Y$(e,this.options),e.style.visibility="hidden";const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(q$(this.template,this.options),e_(this.template),n.disconnect(),e.style.visibility="")})})});return n.observe(document,{childList:!0,subtree:!0}),this.rendered=!0,e}}function Y$(t,e){X$(t,e),G$(t,e);const{themeConfig:n}=e;r_(t,n==null?void 0:n.colorBg)}function X$(t,e){var n;const{themeConfig:r,data:i}=e;i_(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(j6(s)){const f=hc(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return nr(s,f)}if(W6(s)){const f=hc(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return nr(s,f)}if(V6(s)){const f=Nf(t,s,(c=i.illus)==null?void 0:c[u]);return nr(s,f)}if(B6(s))return Array.from(s.children).forEach(f=>{x0(t,f,e)});if(F6(s)){const f=x0(t,s,e);return nr(s,f)}if(Q6(s))return o_(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=di(i,f);if(G6(s)||q6(s)||U6(s)){const y=j$(p,s,e);return nr(s,y)}if(!g)return;if(Z6(s)){const y=x_(t,s,g);return nr(s,y)}if(bl(s)){const y=f_(t,s,g,e);return nr(s,y)}}if(Y6(s))return W$(s,e);if(!X6(s))return T7(s,e)}),k7(t,e)}function G$(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 q$(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&dp(t,ir(n))}let rr;function U$(){if(rr!==void 0)return rr;if(typeof window=="undefined"||typeof document=="undefined")return rr=!1,!1;const t=document.body;if(!t)return rr=!1,!1;let e=!1;try{const r=document.createElement("div");r.style.cssText=`
|
|
30
|
+
`.replace(/\s+/g," ").trim()}function C0(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 O0(t,e,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),s=vi(e,o);return Qt(e,s),X7(e,t,n),e}function Y7(t,e){var n;Qt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function X7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return W7(t,e,r);if(i==="pattern")return y7(t,e,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:s}=Re(t,["fill","stroke"]);Xn(o)&&r0(t,e,r,"fill"),Xn(s)&&r0(t,e,r,"stroke");return}}function G7(t,e){var n;const{themeConfig:r}=e,{"font-family":i=Ll}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var q7=/\s/;function U7(t){for(var e=t.length;e--&&q7.test(t.charAt(e)););return e}var Z7=/^\s+/;function K7(t){return t&&t.slice(0,U7(t)+1).replace(Z7,"")}var M0=NaN,Q7=/^[-+]0x[0-9a-f]+$/i,J7=/^0b[01]+$/i,t9=/^0o[0-7]+$/i,e9=parseInt;function tc(t){if(typeof t=="number")return t;if(Co(t))return M0;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=K7(t);var n=J7.test(t);return n||t9.test(t)?e9(t.slice(2),n?2:8):Q7.test(t)?M0:+t}function S0(t){return t}var ec=Un(sn,"WeakMap"),E0=Object.create,n9=(function(){function t(){}return function(e){if(!an(e))return{};if(E0)return E0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function r9(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 i9(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var o9=800,s9=16,a9=Date.now;function l9(t){var e=0,n=0;return function(){var r=a9(),i=s9-(r-n);if(n=r,i>0){if(++e>=o9)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function c9(t){return function(){return t}}var Ko=(function(){try{var t=Un(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),h9=Ko?function(t,e){return Ko(t,"toString",{configurable:!0,enumerable:!1,value:c9(e),writable:!0})}:S0,d9=l9(h9);function u9(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var f9=9007199254740991,p9=/^(?:0|[1-9]\d*)$/;function I0(t,e){var n=typeof t;return e=e==null?f9:e,!!e&&(n=="number"||n!="symbol"&&p9.test(t))&&t>-1&&t%1==0&&t<e}function nc(t,e,n){e=="__proto__"&&Ko?Ko(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var g9=Object.prototype,m9=g9.hasOwnProperty;function A0(t,e,n){var r=t[e];(!(m9.call(t,e)&&Oo(r,n))||n===void 0&&!(e in t))&&nc(t,e,n)}function y9(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?nc(n,a,l):A0(n,a,l)}return n}var T0=Math.max;function v9(t,e,n){return e=T0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=T0(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),r9(t,this,a)}}function x9(t,e){return d9(v9(t,e,S0),t+"")}var b9=9007199254740991;function k0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=b9}function Qo(t){return t!=null&&k0(t.length)&&!ml(t)}function w9(t,e,n){if(!an(n))return!1;var r=typeof e;return(r=="number"?Qo(n)&&I0(e,n.length):r=="string"&&e in n)?Oo(n[e],t):!1}function _9(t){return x9(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&&w9(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 $9=Object.prototype;function rc(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||$9;return t===n}function P9(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var C9="[object Arguments]";function L0(t){return kn(t)&&Gn(t)==C9}var z0=Object.prototype,O9=z0.hasOwnProperty,M9=z0.propertyIsEnumerable,ic=L0((function(){return arguments})())?L0:function(t){return kn(t)&&O9.call(t,"callee")&&!M9.call(t,"callee")};function S9(){return!1}var H0=typeof W=="object"&&W&&!W.nodeType&&W,R0=H0&&typeof module=="object"&&module&&!module.nodeType&&module,E9=R0&&R0.exports===H0,D0=E9?sn.Buffer:void 0,I9=D0?D0.isBuffer:void 0,oc=I9||S9,A9="[object Arguments]",T9="[object Array]",k9="[object Boolean]",L9="[object Date]",z9="[object Error]",H9="[object Function]",R9="[object Map]",D9="[object Number]",N9="[object Object]",j9="[object RegExp]",W9="[object Set]",F9="[object String]",B9="[object WeakMap]",V9="[object ArrayBuffer]",Y9="[object DataView]",X9="[object Float32Array]",G9="[object Float64Array]",q9="[object Int8Array]",U9="[object Int16Array]",Z9="[object Int32Array]",K9="[object Uint8Array]",Q9="[object Uint8ClampedArray]",J9="[object Uint16Array]",t8="[object Uint32Array]",re={};re[X9]=re[G9]=re[q9]=re[U9]=re[Z9]=re[K9]=re[Q9]=re[J9]=re[t8]=!0,re[A9]=re[T9]=re[V9]=re[k9]=re[Y9]=re[L9]=re[z9]=re[H9]=re[R9]=re[D9]=re[N9]=re[j9]=re[W9]=re[F9]=re[B9]=!1;function e8(t){return kn(t)&&k0(t.length)&&!!re[Gn(t)]}function sc(t){return function(e){return t(e)}}var N0=typeof W=="object"&&W&&!W.nodeType&&W,$i=N0&&typeof module=="object"&&module&&!module.nodeType&&module,n8=$i&&$i.exports===N0,ac=n8&&_u.process,Rr=(function(){try{var t=$i&&$i.require&&$i.require("util").types;return t||ac&&ac.binding&&ac.binding("util")}catch(e){}})(),j0=Rr&&Rr.isTypedArray,W0=j0?sc(j0):e8,r8=Object.prototype,i8=r8.hasOwnProperty;function F0(t,e){var n=An(t),r=!n&&ic(t),i=!n&&!r&&oc(t),o=!n&&!r&&!i&&W0(t),s=n||r||i||o,a=s?P9(t.length,String):[],l=a.length;for(var c in t)(e||i8.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||I0(c,l)))&&a.push(c);return a}function B0(t,e){return function(n){return t(e(n))}}var o8=B0(Object.keys,Object),s8=Object.prototype,a8=s8.hasOwnProperty;function l8(t){if(!rc(t))return o8(t);var e=[];for(var n in Object(t))a8.call(t,n)&&n!="constructor"&&e.push(n);return e}function c8(t){return Qo(t)?F0(t):l8(t)}function h8(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var d8=Object.prototype,u8=d8.hasOwnProperty;function f8(t){if(!an(t))return h8(t);var e=rc(t),n=[];for(var r in t)r=="constructor"&&(e||!u8.call(t,r))||n.push(r);return n}function V0(t){return Qo(t)?F0(t,!0):f8(t)}function p8(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Y0=B0(Object.getPrototypeOf,Object),g8="[object Object]",m8=Function.prototype,y8=Object.prototype,X0=m8.toString,v8=y8.hasOwnProperty,x8=X0.call(Object);function b8(t){if(!kn(t)||Gn(t)!=g8)return!1;var e=Y0(t);if(e===null)return!0;var n=v8.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&X0.call(n)==x8}function w8(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function _8(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=tc(n),n=n===n?n:0),e!==void 0&&(e=tc(e),e=e===e?e:0),w8(tc(t),e,n)}function $8(){this.__data__=new vn,this.size=0}function P8(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function C8(t){return this.__data__.get(t)}function O8(t){return this.__data__.has(t)}var M8=200;function S8(t,e){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!di||r.length<M8-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=$8,er.prototype.delete=P8,er.prototype.get=C8,er.prototype.has=O8,er.prototype.set=S8;var G0=typeof W=="object"&&W&&!W.nodeType&&W,q0=G0&&typeof module=="object"&&module&&!module.nodeType&&module,E8=q0&&q0.exports===G0,U0=E8?sn.Buffer:void 0,Z0=U0?U0.allocUnsafe:void 0;function K0(t,e){if(e)return t.slice();var n=t.length,r=Z0?Z0(n):new t.constructor(n);return t.copy(r),r}function I8(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 A8(){return[]}var T8=Object.prototype,k8=T8.propertyIsEnumerable,Q0=Object.getOwnPropertySymbols,L8=Q0?function(t){return t==null?[]:(t=Object(t),I8(Q0(t),function(e){return k8.call(t,e)}))}:A8;function z8(t,e,n){var r=e(t);return An(t)?r:p8(r,n(t))}function H8(t){return z8(t,c8,L8)}var lc=Un(sn,"DataView"),cc=Un(sn,"Promise"),hc=Un(sn,"Set"),J0="[object Map]",R8="[object Object]",tp="[object Promise]",ep="[object Set]",np="[object WeakMap]",rp="[object DataView]",D8=qn(lc),N8=qn(di),j8=qn(cc),W8=qn(hc),F8=qn(ec),wn=Gn;(lc&&wn(new lc(new ArrayBuffer(1)))!=rp||di&&wn(new di)!=J0||cc&&wn(cc.resolve())!=tp||hc&&wn(new hc)!=ep||ec&&wn(new ec)!=np)&&(wn=function(t){var e=Gn(t),n=e==R8?t.constructor:void 0,r=n?qn(n):"";if(r)switch(r){case D8:return rp;case N8:return J0;case j8:return tp;case W8:return ep;case F8:return np}return e});var B8=Object.prototype,V8=B8.hasOwnProperty;function Y8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&V8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var ip=sn.Uint8Array;function dc(t){var e=new t.constructor(t.byteLength);return new ip(e).set(new ip(t)),e}function X8(t,e){var n=dc(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var G8=/\w*$/;function q8(t){var e=new t.constructor(t.source,G8.exec(t));return e.lastIndex=t.lastIndex,e}var op=Tn?Tn.prototype:void 0,sp=op?op.valueOf:void 0;function U8(t){return sp?Object(sp.call(t)):{}}function ap(t,e){var n=e?dc(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Z8="[object Boolean]",K8="[object Date]",Q8="[object Map]",J8="[object Number]",t$="[object RegExp]",e$="[object Set]",n$="[object String]",r$="[object Symbol]",i$="[object ArrayBuffer]",o$="[object DataView]",s$="[object Float32Array]",a$="[object Float64Array]",l$="[object Int8Array]",c$="[object Int16Array]",h$="[object Int32Array]",d$="[object Uint8Array]",u$="[object Uint8ClampedArray]",f$="[object Uint16Array]",p$="[object Uint32Array]";function g$(t,e,n){var r=t.constructor;switch(e){case i$:return dc(t);case Z8:case K8:return new r(+t);case o$:return X8(t);case s$:case a$:case l$:case c$:case h$:case d$:case u$:case f$:case p$:return ap(t,n);case Q8:return new r;case J8:case n$:return new r(t);case t$:return q8(t);case e$:return new r;case r$:return U8(t)}}function lp(t){return typeof t.constructor=="function"&&!rc(t)?n9(Y0(t)):{}}var m$="[object Map]";function y$(t){return kn(t)&&wn(t)==m$}var cp=Rr&&Rr.isMap,v$=cp?sc(cp):y$,x$="[object Set]";function b$(t){return kn(t)&&wn(t)==x$}var hp=Rr&&Rr.isSet,w$=hp?sc(hp):b$,_$=1,dp="[object Arguments]",$$="[object Array]",P$="[object Boolean]",C$="[object Date]",O$="[object Error]",up="[object Function]",M$="[object GeneratorFunction]",S$="[object Map]",E$="[object Number]",fp="[object Object]",I$="[object RegExp]",A$="[object Set]",T$="[object String]",k$="[object Symbol]",L$="[object WeakMap]",z$="[object ArrayBuffer]",H$="[object DataView]",R$="[object Float32Array]",D$="[object Float64Array]",N$="[object Int8Array]",j$="[object Int16Array]",W$="[object Int32Array]",F$="[object Uint8Array]",B$="[object Uint8ClampedArray]",V$="[object Uint16Array]",Y$="[object Uint32Array]",te={};te[dp]=te[$$]=te[z$]=te[H$]=te[P$]=te[C$]=te[R$]=te[D$]=te[N$]=te[j$]=te[W$]=te[S$]=te[E$]=te[fp]=te[I$]=te[A$]=te[T$]=te[k$]=te[F$]=te[B$]=te[V$]=te[Y$]=!0,te[O$]=te[up]=te[L$]=!1;function Jo(t,e,n,r,i,o){var s,a=e&_$;if(s!==void 0)return s;if(!an(t))return t;var l=An(t);if(l)s=Y8(t);else{var c=wn(t),h=c==up||c==M$;if(oc(t))return K0(t,a);if(c==fp||c==dp||h&&!i)s=h?{}:lp(t);else{if(!te[c])return i?t:{};s=g$(t,c,a)}}o||(o=new er);var u=o.get(t);if(u)return u;o.set(t,s),w$(t)?t.forEach(function(g){s.add(Jo(g,e,n,g,t,o))}):v$(t)&&t.forEach(function(g,y){s.set(y,Jo(g,e,n,y,t,o))});var f=H8,p=l?void 0:f(t);return u9(p||t,function(g,y){p&&(y=g,g=t[y]),A0(s,y,Jo(g,e,n,y,t,o))}),s}var X$=1,G$=4;function pp(t){return Jo(t,X$|G$)}function q$(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$=q$();function uc(t,e,n){(n!==void 0&&!Oo(t[e],n)||n===void 0&&!(e in t))&&nc(t,e,n)}function Z$(t){return kn(t)&&Qo(t)}function fc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function K$(t){return y9(t,V0(t))}function Q$(t,e,n,r,i,o,s){var a=fc(t,n),l=fc(e,n),c=s.get(l);if(c){uc(t,n,c);return}var h=o?o(a,l,n+"",t,e,s):void 0,u=h===void 0;if(u){var f=An(l),p=!f&&oc(l),g=!f&&!p&&W0(l);h=l,f||p||g?An(a)?h=a:Z$(a)?h=i9(a):p?(u=!1,h=K0(l,!0)):g?(u=!1,h=ap(l,!0)):h=[]:b8(l)||ic(l)?(h=a,ic(a)?h=K$(a):(!an(a)||ml(a))&&(h=lp(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),uc(t,n,h)}function gp(t,e,n,r,i){t!==e&&U$(e,function(o,s){if(i||(i=new er),an(o))Q$(t,e,s,n,gp,r,i);else{var a=r?r(fc(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),uc(t,s,a)}},V0)}var J$=ef(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),mp=_9(function(t,e,n){gp(t,e,n)});function pc(t,e,n={}){if(!e)return null;const r=t,i=vi(r,n);Qt(r,i);const o=nP(e,r);for(const s in r.dataset)o.setAttribute(`data-${J$(s)}`,r.dataset[s]);return o}function tP(t,e,n){var r,i;const o=e.nodeName==="text"?e:null;if(!o)return null;const{data:s,themeConfig:a}=n,l=Of(e.dataset.indexes||"0"),c=String(Eu(fi(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=vi(o,h);return pc(e,e.textContent||c,u)}function eP(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 ts=(t,e)=>t?parseFloat(t):e;function nP(t,e){const n=ts(e.dataset.x,0),r=ts(e.dataset.y,0),i=ts(e.getAttribute("width")),o=ts(e.getAttribute("height")),s=rP(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"}),Vw(t,s)}function rP(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 iP{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;oP(e,this.options),e.style.visibility="hidden";const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(lP(this.template,this.options),g_(this.template),n.disconnect(),e.style.visibility="")})})});return n.observe(document,{childList:!0,subtree:!0}),this.rendered=!0,e}}function oP(t,e){sP(t,e),aP(t,e);const{themeConfig:n}=e;y_(t,n==null?void 0:n.colorBg)}function sP(t,e){var n;const{themeConfig:r,data:i}=e;v_(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(Uw(s)){const f=pc(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return nr(s,f)}if(Zw(s)){const f=pc(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return nr(s,f)}if(Jw(s)){const f=Xf(t,s,(c=i.illus)==null?void 0:c[u]);return nr(s,f)}if(Qw(s))return Array.from(s.children).forEach(f=>{O0(t,f,e)});if(Kw(s)){const f=O0(t,s,e);return nr(s,f)}if(a6(s))return x_(t,s);if((h=s.dataset.elementType)!=null&&h.startsWith("item-")){const f=Of(s.dataset.indexes||"0"),p=s.dataset.elementType.replace("item-",""),g=fi(i,f);if(n6(s)||r6(s)||i6(s)){const y=tP(p,s,e);return nr(s,y)}if(!g)return;if(o6(s)){const y=k_(t,s,g);return nr(s,y)}if(Pl(s)){const y=M_(t,s,g,e);return nr(s,y)}}if(t6(s))return eP(s,e);if(!e6(s))return Y7(s,e)}),G7(t,e)}function aP(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 lP(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&vp(t,ir(n))}let rr;function cP(){if(rr!==void 0)return rr;if(typeof window=="undefined"||typeof document=="undefined")return rr=!1,!1;const t=document.body;if(!t)return rr=!1,!1;let e=!1;try{const r=document.createElement("div");r.style.cssText=`
|
|
31
31
|
position: absolute;
|
|
32
32
|
left: 11px;
|
|
33
33
|
top: 13px;
|
|
@@ -37,7 +37,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
37
37
|
margin: 0;
|
|
38
38
|
border: 0;
|
|
39
39
|
visibility: hidden;
|
|
40
|
-
`,t.appendChild(r),r.offsetHeight;const i=r.getBoundingClientRect();t.removeChild(r),e=i.width===37&&i.height===19&&i.left!==0&&i.top!==0}catch(r){e=!1}if(!e)return rr=!1,!1;let n=!1;try{const r=document.createElement("canvas");r.width=100,r.height=50;const i=r.getContext("2d");if(!i)return rr=!1,!1;i.font="20px sans-serif";const o=i.measureText("Hello");n=typeof o.width=="number"&&o.width>0&&o.width<1e3}catch(r){n=!1}return rr=n,n}const hp=!!(typeof process!="undefined"&&process.versions&&process.versions.node);let dc=1.01;const Z$=t=>{dc=t};hp&&Fw(Gw);let Ko=null,ke=null;function K$(){return Ko||(Ko=document.createElement("canvas").getContext("2d"),Ko)}function Q$(){return document.body?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):null}function J$(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 tP(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Qn(e),a=r||"normal",l=J$(n,i),c=K$();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=Q$();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 eP(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=Il,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=()=>Xw(a,l),h=U$()&&(n=tP(a,l))!=null?n:c();return{width:Math.ceil(h.width*dc),height:Math.ceil(h.height*dc)}}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 ir(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 dp(t,e){if(hp)nP(t,e);else if(document.contains(t))up(t,e);else{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&(rP(t,()=>{up(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}}function nP(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 up(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 rP(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 iP(){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 oP=Object.defineProperty,sP=Object.defineProperties,aP=Object.getOwnPropertyDescriptors,Qo=Object.getOwnPropertySymbols,fp=Object.prototype.hasOwnProperty,pp=Object.prototype.propertyIsEnumerable,gp=(t,e,n)=>e in t?oP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e)=>{for(var n in e||(e={}))fp.call(e,n)&&gp(t,n,e[n]);if(Qo)for(var n of Qo(e))pp.call(e,n)&&gp(t,n,e[n]);return t},fc=(t,e)=>sP(t,aP(e)),lP=(t,e)=>{var n={};for(var r in t)fp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Qo)for(var r of Qo(t))e.indexOf(r)<0&&pp.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=lP(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=eP(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 wi=Symbol.for("@antv/infographic/Fragment");function Jo(t,e={}){return{type:t,props:e}}function cP(t={}){return Jo(wi,t)}const hP=Jo,dP=Jo;function uP(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===wi}function mp(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function _i(t){return $i(t).filter(mp)}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(uP(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 ts=()=>({x:0,y:0,width:0,height:0});function Hr(t){if(!t||t.length===0)return ts();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 ts();if(Array.isArray(t)){const p=_i(t);return or(p)}if(typeof t!="object")return ts();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=_i(x),b=or(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(mp(x)){const v=x,b=et(v);if(fP(v,s))return b;const w=v.props&&qt(v.props.width)&&qt(v.props.height),P=yp(v).flatMap(S=>_i(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=yp(t).flatMap(p=>_i(p));if(f.length>0){const p=or(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 or(t){if(!t||!Array.isArray(t)||t.length===0)return ts();const e=[];for(const n of t){const r=_i(n);for(const i of r){const o=et(i);o&&e.push(o)}}return Hr(e)}function fP(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 yp(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 pP=Object.defineProperty,es=Object.getOwnPropertySymbols,vp=Object.prototype.hasOwnProperty,xp=Object.prototype.propertyIsEnumerable,bp=(t,e,n)=>e in t?pP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gc=(t,e)=>{for(var n in e||(e={}))vp.call(e,n)&&bp(t,n,e[n]);if(es)for(var n of es(e))xp.call(e,n)&&bp(t,n,e[n]);return t},gP=(t,e)=>{var n={};for(var r in t)vp.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&&xp.call(t,r)&&(n[r]=t[r]);return n};const Rn=(t,e)=>{const n=t,{type:r,props:i}=n,o=gP(n,["type","props"]);return gc({type:r,props:gc(gc({},i),e)},o)},wp=()=>({defs:new Map});function mc(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(t).replace(/[&<>"']/g,n=>e[n])}const _p={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 mP(t){return _p[t]?_p[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=wp()){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 yP=Object.defineProperty,vP=Object.defineProperties,xP=Object.getOwnPropertyDescriptors,ns=Object.getOwnPropertySymbols,Pp=Object.prototype.hasOwnProperty,Cp=Object.prototype.propertyIsEnumerable,Op=(t,e,n)=>e in t?yP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bP=(t,e)=>{for(var n in e||(e={}))Pp.call(e,n)&&Op(t,n,e[n]);if(ns)for(var n of ns(e))Cp.call(e,n)&&Op(t,n,e[n]);return t},wP=(t,e)=>vP(t,xP(e)),Mp=(t,e)=>{var n={};for(var r in t)Pp.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&&Cp.call(t,r)&&(n[r]=t[r]);return n};function Pi(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=>Pi(r,e)).filter(Boolean);if(xc(t)){const r=$p(t,e);return Pi(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return Pi(r,e)}const n=pc(t).map(r=>Pi(r,e)).filter(Boolean);return t.type===wi?n:t.type===Pa?(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 Ci(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===wi)return i.map(l=>Ci(l)).filter(Boolean).join("");if(n===Pa)return"";if(typeof n=="function"||xc(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=Ep(r),s=i.map(l=>Ci(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function Sp(t,e={}){const n=wp(),r=Pi(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>Ci(m)).join(""):Ci(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=Mp(o,["x","y","width","height","style"]),f=wP(bP({},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=Ep(f),g=_P(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>Ci(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function Ep(t){if(!t)return"";const e=t,{children:n}=e,r=Mp(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=mP(i),a=typeof o=="string"?mc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function _P(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 $P=Object.defineProperty,rs=Object.getOwnPropertySymbols,Ip=Object.prototype.hasOwnProperty,Tp=Object.prototype.propertyIsEnumerable,Ap=(t,e,n)=>e in t?$P(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,is=(t,e)=>{for(var n in e||(e={}))Ip.call(e,n)&&Ap(t,n,e[n]);if(rs)for(var n of rs(e))Tp.call(e,n)&&Ap(t,n,e[n]);return t},kp=(t,e)=>{var n={};for(var r in t)Ip.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&&Tp.call(t,r)&&(n[r]=t[r]);return n};const q=t=>{const e=t,{indexes:n}=e,r=kp(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnAdd};return d(Ct,is(is({},i),r))},Xt=t=>{const e=t,{indexes:n}=e,r=kp(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnRemove};return d(Ct,is(is({},i),r))};var PP=Object.defineProperty,CP=Object.defineProperties,OP=Object.getOwnPropertyDescriptors,Lp=Object.getOwnPropertySymbols,MP=Object.prototype.hasOwnProperty,SP=Object.prototype.propertyIsEnumerable,zp=(t,e,n)=>e in t?PP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EP=(t,e)=>{for(var n in e||(e={}))MP.call(e,n)&&zp(t,n,e[n]);if(Lp)for(var n of Lp(e))SP.call(e,n)&&zp(t,n,e[n]);return t},IP=(t,e)=>CP(t,OP(e));const Et=t=>d(V,IP(EP({"data-element-type":zt.BtnsGroup,width:0,height:0},t),{display:"none"})),ie=()=>d(Bt,{});var TP=Object.defineProperty,os=Object.getOwnPropertySymbols,Hp=Object.prototype.hasOwnProperty,Rp=Object.prototype.propertyIsEnumerable,Dp=(t,e,n)=>e in t?TP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bc=(t,e)=>{for(var n in e||(e={}))Hp.call(e,n)&&Dp(t,n,e[n]);if(os)for(var n of os(e))Rp.call(e,n)&&Dp(t,n,e[n]);return t},AP=(t,e)=>{var n={};for(var r in t)Hp.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&&Rp.call(t,r)&&(n[r]=t[r]);return n};const Np=t=>{var e=t,{indexes:n}=e,r=AP(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 kP=Object.defineProperty,LP=Object.defineProperties,zP=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertySymbols,jp=Object.prototype.hasOwnProperty,Wp=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?kP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bp=(t,e)=>{for(var n in e||(e={}))jp.call(e,n)&&Fp(t,n,e[n]);if(ss)for(var n of ss(e))Wp.call(e,n)&&Fp(t,n,e[n]);return t},HP=(t,e)=>LP(t,zP(e)),RP=(t,e)=>{var n={};for(var r in t)jp.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&&Wp.call(t,r)&&(n[r]=t[r]);return n};const Jt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=RP(e,["indexes","lineNumber","children"]),s;if(!i)return null;const a=Bp({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,HP(Bp({},a),{"data-indexes":n,"data-element-type":zt.ItemDesc}))};var DP=Object.defineProperty,NP=Object.defineProperties,jP=Object.getOwnPropertyDescriptors,as=Object.getOwnPropertySymbols,Vp=Object.prototype.hasOwnProperty,Yp=Object.prototype.propertyIsEnumerable,Xp=(t,e,n)=>e in t?DP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oi=(t,e)=>{for(var n in e||(e={}))Vp.call(e,n)&&Xp(t,n,e[n]);if(as)for(var n of as(e))Yp.call(e,n)&&Xp(t,n,e[n]);return t},ls=(t,e)=>NP(t,jP(e)),Gp=(t,e)=>{var n={};for(var r in t)Vp.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&&Yp.call(t,r)&&(n[r]=t[r]);return n};const Ce=t=>{const e=t,{indexes:n,size:r=32}=e,i=Gp(e,["indexes","size"]),o=Oi({fill:"lightgray",width:r,height:r},i);return d(Ct,ls(Oi({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},sr=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=Gp(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=ls(Oi({fill:o},s),{x:l,y:l,width:a,height:a});return I(V,ls(Oi({},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,ls(Oi({},c),{"data-indexes":n,"data-element-type":zt.ItemIcon}))]}))};var WP=Object.defineProperty,FP=Object.defineProperties,BP=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,qp=Object.prototype.hasOwnProperty,Up=Object.prototype.propertyIsEnumerable,Zp=(t,e,n)=>e in t?WP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kp=(t,e)=>{for(var n in e||(e={}))qp.call(e,n)&&Zp(t,n,e[n]);if(cs)for(var n of cs(e))Up.call(e,n)&&Zp(t,n,e[n]);return t},VP=(t,e)=>FP(t,BP(e)),YP=(t,e)=>{var n={};for(var r in t)qp.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&&Up.call(t,r)&&(n[r]=t[r]);return n};const It=t=>{var e=t,{indexes:n,children:r}=e,i=YP(e,["indexes","children"]),o;const s=Kp({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,VP(Kp({},s),{"data-indexes":n,"data-element-type":zt.ItemLabel}))};var XP=Object.defineProperty,Qp=Object.getOwnPropertySymbols,GP=Object.prototype.hasOwnProperty,qP=Object.prototype.propertyIsEnumerable,Jp=(t,e,n)=>e in t?XP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UP=(t,e)=>{for(var n in e||(e={}))GP.call(e,n)&&Jp(t,n,e[n]);if(Qp)for(var n of Qp(e))qP.call(e,n)&&Jp(t,n,e[n]);return t};const St=t=>d(V,UP({"data-element-type":zt.ItemsGroup},t));var ZP=Object.defineProperty,KP=Object.defineProperties,QP=Object.getOwnPropertyDescriptors,hs=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,ng=(t,e,n)=>e in t?ZP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rg=(t,e)=>{for(var n in e||(e={}))tg.call(e,n)&&ng(t,n,e[n]);if(hs)for(var n of hs(e))eg.call(e,n)&&ng(t,n,e[n]);return t},JP=(t,e)=>KP(t,QP(e)),tC=(t,e)=>{var n={};for(var r in t)tg.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&&eg.call(t,r)&&(n[r]=t[r]);return n};const Mi=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=tC(e,["indexes","value","formatter"]),s;const a=rg({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,JP(rg({},a),{"data-indexes":n,"data-element-type":zt.ItemValue}))};var eC=Object.defineProperty,ig=Object.getOwnPropertySymbols,nC=Object.prototype.hasOwnProperty,rC=Object.prototype.propertyIsEnumerable,og=(t,e,n)=>e in t?eC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iC=(t,e)=>{for(var n in e||(e={}))nC.call(e,n)&&og(t,n,e[n]);if(ig)for(var n of ig(e))rC.call(e,n)&&og(t,n,e[n]);return t};const le=t=>d(V,iC({"data-element-type":"shapes-group"},t));var oC=Object.defineProperty,sC=Object.defineProperties,aC=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,sg=Object.prototype.hasOwnProperty,ag=Object.prototype.propertyIsEnumerable,lg=(t,e,n)=>e in t?oC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,us=(t,e)=>{for(var n in e||(e={}))sg.call(e,n)&&lg(t,n,e[n]);if(ds)for(var n of ds(e))ag.call(e,n)&&lg(t,n,e[n]);return t},cg=(t,e)=>sC(t,aC(e)),lC=(t,e)=>{var n={};for(var r in t)sg.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&&ag.call(t,r)&&(n[r]=t[r]);return n};const Si=vc((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=lC(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(V,us({},o));const h=t.map(v=>et(v)),u=or(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],_=us({},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=cg(us({},o),{x:f,y:p,width:g,height:y});return d(V,cg(us({},x),{children:m}))});var cC=Object.defineProperty,hC=Object.defineProperties,dC=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertySymbols,hg=Object.prototype.hasOwnProperty,dg=Object.prototype.propertyIsEnumerable,ug=(t,e,n)=>e in t?cC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ar=(t,e)=>{for(var n in e||(e={}))hg.call(e,n)&&ug(t,n,e[n]);if(fs)for(var n of fs(e))dg.call(e,n)&&ug(t,n,e[n]);return t},fg=(t,e)=>hC(t,dC(e)),uC=(t,e)=>{var n={};for(var r in t)hg.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&&dg.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=uC(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(V,ar({},c));const m=r==="row"||r==="row-reverse",x=r==="row-reverse"||r==="column-reverse",v=t.map(O=>et(O)),b=or(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=ar({},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=ar({},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=ar({},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=ar({},T.props);k.x=(k.x||0)+D,C[F]=Rn(T,k)})}const S=or(C),R=fg(ar({},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,fg(ar({},R),{children:C}))});var fC=Object.defineProperty,pC=Object.defineProperties,gC=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,mC=Object.prototype.hasOwnProperty,yC=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?fC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ps=(t,e)=>{for(var n in e||(e={}))mC.call(e,n)&&gg(t,n,e[n]);if(pg)for(var n of pg(e))yC.call(e,n)&&gg(t,n,e[n]);return t},mg=(t,e)=>pC(t,gC(e));const yg=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,mg(ps(ps({},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,mg(ps(ps({},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 vg(t){return wc.get(t)}function vC(){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 xC=Object.defineProperty,bC=Object.defineProperties,wC=Object.getOwnPropertyDescriptors,xg=Object.getOwnPropertySymbols,_C=Object.prototype.hasOwnProperty,$C=Object.prototype.propertyIsEnumerable,bg=(t,e,n)=>e in t?xC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ei=(t,e)=>{for(var n in e||(e={}))_C.call(e,n)&&bg(t,n,e[n]);if(xg)for(var n of xg(e))$C.call(e,n)&&bg(t,n,e[n]);return t},Ii=(t,e)=>bC(t,wC(e));Yt(ru);const wg=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=on(t),i=on(e),o=EC({primaryColor:r,bgColor:i});return IC(o,{primaryColor:r,bgColor:i,isDarkMode:n})},PC=(t,e)=>Jb(Ii(Ei({},t),{alpha:e?.2:.1}))||"#ffffff",CC=(t,e)=>{if(e)return"#ffffff";const n=on("#262626");return hl(n,t)>=7?si(n):"#000000"},OC=t=>{const e=gu(on(t)),n=Ii(Ei({},e),{l:Math.min(1,e.l+.2)});return si(n)},MC=(t,e)=>{const n=on(t),r=on("#262626"),i=on("#ffffff"),o=hl(r,n);return hl(i,n)>=3?si(i):o>=4.5?si(r):"#ffffff"},SC=(t,e)=>{const n=gu(t);if(e){const r=Ii(Ei({},n),{l:Math.min(1,n.l+.1)});return gs(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=Ii(Ei({},n),{l:Math.min(1,n.l+.05)});return gs(r,"#ffffff")}}},EC=({primaryColor:t,bgColor:e})=>({colorPrimary:gs(t,"#FF356A"),colorBg:gs(e,"#ffffff"),colorWhite:"#ffffff"}),IC=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=CC(n,r),o=PC(e,r);return Ii(Ei({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:OC(i),colorPrimaryText:MC(o,r),colorBgElevated:SC(n,r)})};function gs(t,e="#000000"){var n;return(n=si(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 _g(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)=>To(o,[a],r.items.length)||$c)}function Tt(t,e){var n,r,i;return To((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 wg({colorPrimary:i,isDarkMode:mu(r),colorBg:r})}function Ti(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 TC=Object.defineProperty,$g=Object.getOwnPropertySymbols,AC=Object.prototype.hasOwnProperty,kC=Object.prototype.propertyIsEnumerable,Pg=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,LC=(t,e)=>{for(var n in e||(e={}))AC.call(e,n)&&Pg(t,n,e[n]);if($g)for(var n of $g(e))kC.call(e,n)&&Pg(t,n,e[n]);return t};function Zt(t,e=[]){const n=LC({},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 ms(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 Cg(t){return Pc.get(t)}function zC(){return Array.from(Pc.keys())}var HC=Object.defineProperty,RC=Object.defineProperties,DC=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,NC=Object.prototype.hasOwnProperty,jC=Object.prototype.propertyIsEnumerable,Mg=(t,e,n)=>e in t?HC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WC=(t,e)=>{for(var n in e||(e={}))NC.call(e,n)&&Mg(t,n,e[n]);if(Og)for(var n of Og(e))jC.call(e,n)&&Mg(t,n,e[n]);return t},FC=(t,e)=>RC(t,DC(e));const Sg=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,FC(WC({},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(Mi,{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:Sg,composites:["icon","label","value","desc"]});var BC=Object.defineProperty,VC=Object.defineProperties,YC=Object.getOwnPropertyDescriptors,Eg=Object.getOwnPropertySymbols,XC=Object.prototype.hasOwnProperty,GC=Object.prototype.propertyIsEnumerable,Ig=(t,e,n)=>e in t?BC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qC=(t,e)=>{for(var n in e||(e={}))XC.call(e,n)&&Ig(t,n,e[n]);if(Eg)for(var n of Eg(e))GC.call(e,n)&&Ig(t,n,e[n]);return t},UC=(t,e)=>VC(t,YC(e));const Tg=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Zt(t,["width","height"]);return I(V,UC(qC({},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:Tg,composites:["icon","label","desc"]});var ZC=Object.defineProperty,KC=Object.defineProperties,QC=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,Ag=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Lg=(t,e,n)=>e in t?ZC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JC=(t,e)=>{for(var n in e||(e={}))Ag.call(e,n)&&Lg(t,n,e[n]);if(ys)for(var n of ys(e))kg.call(e,n)&&Lg(t,n,e[n]);return t},tO=(t,e)=>KC(t,QC(e)),eO=(t,e)=>{var n={};for(var r in t)Ag.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ys)for(var r of ys(t))e.indexOf(r)<0&&kg.call(t,r)&&(n[r]=t[r]);return n};const Cc=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=eO(e,["color","opacity"]);return d("filter",tO(JC({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 nO=Object.defineProperty,rO=Object.defineProperties,iO=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,oO=Object.prototype.hasOwnProperty,sO=Object.prototype.propertyIsEnumerable,Hg=(t,e,n)=>e in t?nO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aO=(t,e)=>{for(var n in e||(e={}))oO.call(e,n)&&Hg(t,n,e[n]);if(zg)for(var n of zg(e))sO.call(e,n)&&Hg(t,n,e[n]);return t},lO=(t,e)=>rO(t,iO(e));const Oc=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return I("linearGradient",lO(aO({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 cO=Object.defineProperty,hO=Object.defineProperties,dO=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,uO=Object.prototype.hasOwnProperty,fO=Object.prototype.propertyIsEnumerable,Dg=(t,e,n)=>e in t?cO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ai=(t,e)=>{for(var n in e||(e={}))uO.call(e,n)&&Dg(t,n,e[n]);if(Rg)for(var n of Rg(e))fO.call(e,n)&&Dg(t,n,e[n]);return t},ki=(t,e)=>hO(t,dO(e));const Ng=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,ki(Ai({},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,ki(Ai({},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,ki(Ai({},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(sr,{indexes:n,x:E,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d(It,ki(Ai({x:y,y:C},x),{children:e.label})),e.desc&&d(Jt,ki(Ai({x:y,y:A},b),{children:e.desc}))]}))};Kt("capsule-item",{component:Ng,composites:["icon","label","desc"]});var pO=Object.defineProperty,gO=Object.defineProperties,mO=Object.getOwnPropertyDescriptors,jg=Object.getOwnPropertySymbols,yO=Object.prototype.hasOwnProperty,vO=Object.prototype.propertyIsEnumerable,Wg=(t,e,n)=>e in t?pO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mc=(t,e)=>{for(var n in e||(e={}))yO.call(e,n)&&Wg(t,n,e[n]);if(jg)for(var n of jg(e))vO.call(e,n)&&Wg(t,n,e[n]);return t},Sc=(t,e)=>gO(t,mO(e));const Fg=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=vs(p,80,.2),y=vs(p,20,.8),m=vs(p,75,.32),x=vs(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:Fg,composites:["label"]});function vs(t,e,n){return lt.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var xO=Object.defineProperty,bO=Object.defineProperties,wO=Object.getOwnPropertyDescriptors,Bg=Object.getOwnPropertySymbols,_O=Object.prototype.hasOwnProperty,$O=Object.prototype.propertyIsEnumerable,Vg=(t,e,n)=>e in t?xO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ec=(t,e)=>{for(var n in e||(e={}))_O.call(e,n)&&Vg(t,n,e[n]);if(Bg)for(var n of Bg(e))$O.call(e,n)&&Vg(t,n,e[n]);return t},Ic=(t,e)=>bO(t,wO(e));const Yg=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=PO(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(Mi,{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 PO(t,e,n,r,i){const o=Xg(t,e,n,i),s=Xg(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 Xg(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:Yg,composites:["label","value"]});var CO=Object.defineProperty,OO=Object.defineProperties,MO=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,SO=Object.prototype.hasOwnProperty,EO=Object.prototype.propertyIsEnumerable,qg=(t,e,n)=>e in t?CO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IO=(t,e)=>{for(var n in e||(e={}))SO.call(e,n)&&qg(t,n,e[n]);if(Gg)for(var n of Gg(e))EO.call(e,n)&&qg(t,n,e[n]);return t},TO=(t,e)=>OO(t,MO(e));const Ug=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,TO(IO({},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(Mi,{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:Ug,composites:["icon","label","value","desc"]});var AO=Object.defineProperty,kO=Object.defineProperties,LO=Object.getOwnPropertyDescriptors,Zg=Object.getOwnPropertySymbols,zO=Object.prototype.hasOwnProperty,HO=Object.prototype.propertyIsEnumerable,Kg=(t,e,n)=>e in t?AO(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)&&Kg(t,n,e[n]);if(Zg)for(var n of Zg(e))HO.call(e,n)&&Kg(t,n,e[n]);return t},DO=(t,e)=>kO(t,LO(e));const Qg=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,DO(RO({},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:Qg,composites:["label"]});var NO=Object.defineProperty,jO=Object.defineProperties,WO=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,FO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,t1=(t,e,n)=>e in t?NO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VO=(t,e)=>{for(var n in e||(e={}))FO.call(e,n)&&t1(t,n,e[n]);if(Jg)for(var n of Jg(e))BO.call(e,n)&&t1(t,n,e[n]);return t},YO=(t,e)=>jO(t,WO(e));const e1=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(sr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(GO,{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,YO(VO({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(XO,{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]})]})}))},XO=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"})},GO=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:e1,composites:["icon","label","desc","time"]});var qO=Object.defineProperty,UO=Object.defineProperties,ZO=Object.getOwnPropertyDescriptors,n1=Object.getOwnPropertySymbols,KO=Object.prototype.hasOwnProperty,QO=Object.prototype.propertyIsEnumerable,r1=(t,e,n)=>e in t?qO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i1=(t,e)=>{for(var n in e||(e={}))KO.call(e,n)&&r1(t,n,e[n]);if(n1)for(var n of n1(e))QO.call(e,n)&&r1(t,n,e[n]);return t},o1=(t,e)=>UO(t,ZO(e));const s1=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(sr,{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(Si,{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,o1(i1({},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,o1(i1({},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:s1,composites:["icon","label","desc"]});var JO=Object.defineProperty,tM=Object.defineProperties,eM=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,nM=Object.prototype.hasOwnProperty,rM=Object.prototype.propertyIsEnumerable,l1=(t,e,n)=>e in t?JO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iM=(t,e)=>{for(var n in e||(e={}))nM.call(e,n)&&l1(t,n,e[n]);if(a1)for(var n of a1(e))rM.call(e,n)&&l1(t,n,e[n]);return t},oM=(t,e)=>tM(t,eM(e));const c1=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,oM(iM({},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:c1,composites:["icon","label"]});var sM=Object.defineProperty,aM=Object.defineProperties,lM=Object.getOwnPropertyDescriptors,h1=Object.getOwnPropertySymbols,cM=Object.prototype.hasOwnProperty,hM=Object.prototype.propertyIsEnumerable,d1=(t,e,n)=>e in t?sM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dM=(t,e)=>{for(var n in e||(e={}))cM.call(e,n)&&d1(t,n,e[n]);if(h1)for(var n of h1(e))hM.call(e,n)&&d1(t,n,e[n]);return t},uM=(t,e)=>aM(t,lM(e));const u1=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,uM(dM({},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:u1,composites:["label","desc"]});var fM=Object.defineProperty,pM=Object.defineProperties,gM=Object.getOwnPropertyDescriptors,f1=Object.getOwnPropertySymbols,mM=Object.prototype.hasOwnProperty,yM=Object.prototype.propertyIsEnumerable,p1=(t,e,n)=>e in t?fM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vM=(t,e)=>{for(var n in e||(e={}))mM.call(e,n)&&p1(t,n,e[n]);if(f1)for(var n of f1(e))yM.call(e,n)&&p1(t,n,e[n]);return t},xM=(t,e)=>pM(t,gM(e));const g1=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,xM(vM({},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:g1,composites:["icon","label","desc"]});var bM=Object.defineProperty,wM=Object.defineProperties,_M=Object.getOwnPropertyDescriptors,m1=Object.getOwnPropertySymbols,$M=Object.prototype.hasOwnProperty,PM=Object.prototype.propertyIsEnumerable,y1=(t,e,n)=>e in t?bM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CM=(t,e)=>{for(var n in e||(e={}))$M.call(e,n)&&y1(t,n,e[n]);if(m1)for(var n of m1(e))PM.call(e,n)&&y1(t,n,e[n]);return t},OM=(t,e)=>wM(t,_M(e));const v1=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,OM(CM({},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:v1,composites:["label"]});var MM=Object.defineProperty,SM=Object.defineProperties,EM=Object.getOwnPropertyDescriptors,x1=Object.getOwnPropertySymbols,IM=Object.prototype.hasOwnProperty,TM=Object.prototype.propertyIsEnumerable,b1=(t,e,n)=>e in t?MM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AM=(t,e)=>{for(var n in e||(e={}))IM.call(e,n)&&b1(t,n,e[n]);if(x1)for(var n of x1(e))TM.call(e,n)&&b1(t,n,e[n]);return t},kM=(t,e)=>SM(t,EM(e));const w1=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,kM(AM({},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:w1,composites:["label"]});var LM=Object.defineProperty,zM=Object.defineProperties,HM=Object.getOwnPropertyDescriptors,_1=Object.getOwnPropertySymbols,RM=Object.prototype.hasOwnProperty,DM=Object.prototype.propertyIsEnumerable,$1=(t,e,n)=>e in t?LM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NM=(t,e)=>{for(var n in e||(e={}))RM.call(e,n)&&$1(t,n,e[n]);if(_1)for(var n of _1(e))DM.call(e,n)&&$1(t,n,e[n]);return t},jM=(t,e)=>zM(t,HM(e));const P1=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,jM(NM({},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:P1,composites:["label","desc"]});var WM=Object.defineProperty,FM=Object.defineProperties,BM=Object.getOwnPropertyDescriptors,C1=Object.getOwnPropertySymbols,VM=Object.prototype.hasOwnProperty,YM=Object.prototype.propertyIsEnumerable,O1=(t,e,n)=>e in t?WM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XM=(t,e)=>{for(var n in e||(e={}))VM.call(e,n)&&O1(t,n,e[n]);if(C1)for(var n of C1(e))YM.call(e,n)&&O1(t,n,e[n]);return t},GM=(t,e)=>FM(t,BM(e));const M1=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,GM(XM({},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:M1,composites:["label"]});function xs(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function qM(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function S1(t){let e,n,r;t.length!==2?(e=xs,n=(a,l)=>xs(t(a),l),r=(a,l)=>t(a)-l):(e=t===xs||t===qM?t:UM,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 UM(){return 0}function ZM(t){return t===null?NaN:+t}const KM=S1(xs).right;S1(ZM).center;const QM=Math.sqrt(50),JM=Math.sqrt(10),tS=Math.sqrt(2);function bs(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>=QM?10:o>=JM?5:o>=tS?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?bs(t,e,n*2):[a,l,c]}function eS(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?bs(e,t,n):bs(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,bs(t,e,n)[2]}function nS(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 rS={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 ws(n)}function ws(t){this._=t}function iS(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}})}ws.prototype=Ac.prototype={constructor:ws,on:function(t,e){var n=this._,r=iS(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=oS(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]=E1(n[i],t.name,e);else if(e==null)for(i in n)n[i]=E1(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 ws(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 oS(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function E1(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=rS,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 I1={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 _s(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),I1.hasOwnProperty(e)?{space:I1[e],local:t}:t}function sS(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 aS(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function T1(t){var e=_s(t);return(e.local?aS:sS)(e)}function lS(){}function Lc(t){return t==null?lS:function(){return this.querySelector(t)}}function cS(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 hS(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function dS(){return[]}function A1(t){return t==null?dS:function(){return this.querySelectorAll(t)}}function uS(t){return function(){return hS(t.apply(this,arguments))}}function fS(t){typeof t=="function"?t=uS(t):t=A1(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 k1(t){return function(){return this.matches(t)}}function L1(t){return function(e){return e.matches(t)}}var pS=Array.prototype.find;function gS(t){return function(){return pS.call(this.children,t)}}function mS(){return this.firstElementChild}function yS(t){return this.select(t==null?mS:gS(typeof t=="function"?t:L1(t)))}var vS=Array.prototype.filter;function xS(){return Array.from(this.children)}function bS(t){return function(){return vS.call(this.children,t)}}function wS(t){return this.selectAll(t==null?xS:bS(typeof t=="function"?t:L1(t)))}function _S(t){typeof t!="function"&&(t=k1(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 z1(t){return new Array(t.length)}function $S(){return new qe(this._enter||this._groups.map(z1),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 PS(t){return function(){return t}}function CS(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 OS(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 MS(t){return t.__data__}function SS(t,e){if(!arguments.length)return Array.from(this,MS);var n=e?OS:CS,r=this._parents,i=this._groups;typeof t!="function"&&(t=PS(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=ES(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 ES(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function IS(){return new qe(this._exit||this._groups.map(z1),this._parents)}function TS(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 qe(a,this._parents)}function kS(){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 LS(t){t||(t=zS);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 zS(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function HS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function RS(){return Array.from(this)}function DS(){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 NS(){let t=0;for(const e of this)++t;return t}function jS(){return!this.node()}function WS(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 FS(t){return function(){this.removeAttribute(t)}}function BS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function VS(t,e){return function(){this.setAttribute(t,e)}}function YS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function XS(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function GS(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 qS(t,e){var n=_s(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?BS:FS:typeof e=="function"?n.local?GS:XS:n.local?YS:VS)(n,e))}function H1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function US(t){return function(){this.style.removeProperty(t)}}function ZS(t,e,n){return function(){this.style.setProperty(t,e,n)}}function KS(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function QS(t,e,n){return arguments.length>1?this.each((e==null?US:typeof e=="function"?KS:ZS)(t,e,n==null?"":n)):Rr(this.node(),t)}function Rr(t,e){return t.style.getPropertyValue(e)||H1(t).getComputedStyle(t,null).getPropertyValue(e)}function JS(t){return function(){delete this[t]}}function tE(t,e){return function(){this[t]=e}}function eE(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function nE(t,e){return arguments.length>1?this.each((e==null?JS:typeof e=="function"?eE:tE)(t,e)):this.node()[t]}function R1(t){return t.trim().split(/^|\s+/)}function zc(t){return t.classList||new D1(t)}function D1(t){this._node=t,this._names=R1(t.getAttribute("class")||"")}D1.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 N1(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function j1(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function rE(t){return function(){N1(this,t)}}function iE(t){return function(){j1(this,t)}}function oE(t,e){return function(){(e.apply(this,arguments)?N1:j1)(this,t)}}function sE(t,e){var n=R1(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"?oE:e?rE:iE)(n,e))}function aE(){this.textContent=""}function lE(t){return function(){this.textContent=t}}function cE(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function hE(t){return arguments.length?this.each(t==null?aE:(typeof t=="function"?cE:lE)(t)):this.node().textContent}function dE(){this.innerHTML=""}function uE(t){return function(){this.innerHTML=t}}function fE(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function pE(t){return arguments.length?this.each(t==null?dE:(typeof t=="function"?fE:uE)(t)):this.node().innerHTML}function gE(){this.nextSibling&&this.parentNode.appendChild(this)}function mE(){return this.each(gE)}function yE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vE(){return this.each(yE)}function xE(t){var e=typeof t=="function"?t:T1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function bE(){return null}function wE(t,e){var n=typeof t=="function"?t:T1(t),r=e==null?bE:typeof e=="function"?e:Lc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function _E(){var t=this.parentNode;t&&t.removeChild(this)}function $E(){return this.each(_E)}function PE(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function CE(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function OE(t){return this.select(t?CE:PE)}function ME(t){return arguments.length?this.property("__data__",t):this.node().__data__}function SE(t){return function(e){t.call(this,e,this.__data__)}}function EE(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 IE(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 TE(t,e,n){return function(){var r=this.__on,i,o=SE(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=EE(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?TE:IE,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function W1(t,e,n){var r=H1(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 kE(t,e){return function(){return W1(this,t,e)}}function LE(t,e){return function(){return W1(this,t,e.apply(this,arguments))}}function zE(t,e){return this.each((typeof e=="function"?LE:kE)(t,e))}function*HE(){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 RE=[null];function qe(t,e){this._groups=t,this._parents=e}function Li(){return new qe([[document.documentElement]],RE)}function DE(){return this}qe.prototype=Li.prototype={constructor:qe,select:cS,selectAll:fS,selectChild:yS,selectChildren:wS,filter:_S,data:SS,enter:$S,exit:IS,join:TS,merge:AS,selection:DE,order:kS,sort:LS,call:HS,nodes:RS,node:DS,size:NS,empty:jS,each:WS,attr:qS,style:QS,property:nE,classed:sE,text:hE,html:pE,raise:mE,lower:vE,append:xE,insert:wE,remove:$E,clone:OE,datum:ME,on:AE,dispatch:zE,[Symbol.iterator]:HE};function Hc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function F1(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function zi(){}var Hi=.7,Ps=1/Hi,Dr="\\s*([+-]?\\d+)\\s*",Ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NE=/^#([0-9a-f]{3,8})$/,jE=new RegExp(`^rgb\\(${Dr},${Dr},${Dr}\\)$`),WE=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),FE=new RegExp(`^rgba\\(${Dr},${Dr},${Dr},${Ri}\\)$`),BE=new RegExp(`^rgba\\(${cn},${cn},${cn},${Ri}\\)$`),VE=new RegExp(`^hsl\\(${Ri},${cn},${cn}\\)$`),YE=new RegExp(`^hsla\\(${Ri},${cn},${cn},${Ri}\\)$`),B1={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(zi,lr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:V1,formatHex:V1,formatHex8:XE,formatHsl:GE,formatRgb:Y1,toString:Y1});function V1(){return this.rgb().formatHex()}function XE(){return this.rgb().formatHex8()}function GE(){return Z1(this).formatHsl()}function Y1(){return this.rgb().formatRgb()}function lr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=NE.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?X1(e):n===3?new Le(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Cs(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Cs(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=jE.exec(t))?new Le(e[1],e[2],e[3],1):(e=WE.exec(t))?new Le(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=FE.exec(t))?Cs(e[1],e[2],e[3],e[4]):(e=BE.exec(t))?Cs(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=VE.exec(t))?U1(e[1],e[2]/100,e[3]/100,1):(e=YE.exec(t))?U1(e[1],e[2]/100,e[3]/100,e[4]):B1.hasOwnProperty(t)?X1(B1[t]):t==="transparent"?new Le(NaN,NaN,NaN,0):null}function X1(t){return new Le(t>>16&255,t>>8&255,t&255,1)}function Cs(t,e,n,r){return r<=0&&(t=e=n=NaN),new Le(t,e,n,r)}function qE(t){return t instanceof zi||(t=lr(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?qE(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,F1(zi,{brighter(t){return t=t==null?Ps:Math.pow(Ps,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Hi:Math.pow(Hi,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Le(cr(this.r),cr(this.g),cr(this.b),Os(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:G1,formatHex:G1,formatHex8:UE,formatRgb:q1,toString:q1}));function G1(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}`}function UE(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}${hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function q1(){const t=Os(this.opacity);return`${t===1?"rgb(":"rgba("}${cr(this.r)}, ${cr(this.g)}, ${cr(this.b)}${t===1?")":`, ${t})`}`}function Os(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function cr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hr(t){return t=cr(t),(t<16?"0":"")+t.toString(16)}function U1(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 Z1(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof zi||(t=lr(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 ZE(t,e,n,r){return arguments.length===1?Z1(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,ZE,F1(zi,{brighter(t){return t=t==null?Ps:Math.pow(Ps,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Hi:Math.pow(Hi,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(K1(this.h),Ms(this.s),Ms(this.l),Os(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=Os(this.opacity);return`${t===1?"hsl(":"hsla("}${K1(this.h)}, ${Ms(this.s)*100}%, ${Ms(this.l)*100}%${t===1?")":`, ${t})`}`}}));function K1(t){return t=(t||0)%360,t<0?t+360:t}function Ms(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 KE(t,e){return function(n){return t+n*e}}function QE(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 JE(t){return(t=+t)==1?Q1:function(e,n){return n-e?QE(e,n,t):Nc(isNaN(e)?n:e)}}function Q1(t,e){var n=e-t;return n?KE(t,n):Nc(isNaN(t)?e:t)}const Ss=(function t(e){var n=JE(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=Q1(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 tI(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 eI(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function nI(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 rI(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 iI(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 oI(t){return function(){return t}}function sI(t){return function(e){return t(e)+""}}function J1(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]?sI(l[0].x):oI(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=lr(e))?(e=r,Ss):J1:e instanceof lr?Ss:e instanceof Date?rI:eI(e)?tI:Array.isArray(e)?nI:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?iI:Ze)(t,e)}function aI(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var tm=180/Math.PI,Bc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function em(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)*tm,skewX:Math.atan(l)*tm,scaleX:s,scaleY:a}}var Es;function lI(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Bc:em(e.a,e.b,e.c,e.d,e.e,e.f)}function cI(t){return t==null||(Es||(Es=document.createElementNS("http://www.w3.org/2000/svg","g")),Es.setAttribute("transform",t),!(t=Es.transform.baseVal.consolidate()))?Bc:(t=t.matrix,em(t.a,t.b,t.c,t.d,t.e,t.f))}function nm(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 hI=nm(lI,"px, ","px)","deg)"),dI=nm(cI,", ",")",")"),Nr=0,Di=0,Ni=0,rm=1e3,Is,ji,Ts=0,dr=0,As=0,Wi=typeof performance=="object"&&performance.now?performance:Date,im=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vc(){return dr||(im(uI),dr=Wi.now()+As)}function uI(){dr=0}function ks(){this._call=this._time=this._next=null}ks.prototype=Yc.prototype={constructor:ks,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&&ji!==this&&(ji?ji._next=this:Is=this,ji=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 ks;return r.restart(t,e,n),r}function fI(){Vc(),++Nr;for(var t=Is,e;t;)(e=dr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Nr}function om(){dr=(Ts=Wi.now())+As,Nr=Di=0;try{fI()}finally{Nr=0,gI(),dr=0}}function pI(){var t=Wi.now(),e=t-Ts;e>rm&&(As-=e,Ts=t)}function gI(){for(var t,e=Is,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:Is=n);ji=t,Xc(r)}function Xc(t){if(!Nr){Di&&(Di=clearTimeout(Di));var e=t-dr;e>24?(t<1/0&&(Di=setTimeout(om,t-Wi.now()-As)),Ni&&(Ni=clearInterval(Ni))):(Ni||(Ts=Wi.now(),Ni=setInterval(pI,rm)),Nr=1,im(om))}}function sm(t,e,n){var r=new ks;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var mI=Ac("start","end","cancel","interrupt"),yI=[],am=0,lm=1,Gc=2,Ls=3,cm=4,qc=5,zs=6;function Hs(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;vI(t,n,{name:e,index:r,group:i,on:mI,tween:yI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:am})}function Uc(t,e){var n=Ke(t,e);if(n.state>am)throw new Error("too late; already scheduled");return n}function hn(t,e){var n=Ke(t,e);if(n.state>Ls)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 vI(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Yc(o,0,n.time);function o(c){n.state=lm,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!==lm)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===Ls)return sm(s);p.state===cm?(p.state=zs,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=zs,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(sm(function(){n.state===Ls&&(n.state=cm,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=Ls,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=zs,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function xI(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=zs,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function bI(t){return this.each(function(){xI(this,t)})}function wI(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 _I(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 $I(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?wI:_I)(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 hm(t,e){var n;return(typeof e=="number"?Ze:e instanceof lr?Ss:(n=lr(e))?(e=n,Ss):J1)(t,e)}function PI(t){return function(){this.removeAttribute(t)}}function CI(t){return function(){this.removeAttributeNS(t.space,t.local)}}function OI(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 MI(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 SI(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 EI(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 II(t,e){var n=_s(t),r=n==="transform"?dI:hm;return this.attrTween(t,typeof e=="function"?(n.local?EI:SI)(n,r,Zc(this,"attr."+t,e)):e==null?(n.local?CI:PI)(n):(n.local?MI:OI)(n,r,e))}function TI(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 kI(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 LI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&TI(t,o)),n}return i._value=e,i}function zI(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=_s(t);return this.tween(n,(r.local?kI:LI)(r,e))}function HI(t,e){return function(){Uc(this,t).delay=+e.apply(this,arguments)}}function RI(t,e){return e=+e,function(){Uc(this,t).delay=e}}function DI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?HI:RI)(e,t)):Ke(this.node(),e).delay}function NI(t,e){return function(){hn(this,t).duration=+e.apply(this,arguments)}}function jI(t,e){return e=+e,function(){hn(this,t).duration=e}}function WI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?NI:jI)(e,t)):Ke(this.node(),e).duration}function FI(t,e){if(typeof e!="function")throw new Error;return function(){hn(this,t).ease=e}}function BI(t){var e=this._id;return arguments.length?this.each(FI(e,t)):Ke(this.node(),e).ease}function VI(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;hn(this,t).ease=n}}function YI(t){if(typeof t!="function")throw new Error;return this.each(VI(this._id,t))}function XI(t){typeof t!="function"&&(t=k1(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 GI(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 qI(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 UI(t,e,n){var r,i,o=qI(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 ZI(t,e){var n=this._id;return arguments.length<2?Ke(this.node(),n).on.on(t):this.each(UI(n,t,e))}function KI(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function QI(){return this.on("end.remove",KI(this._id))}function JI(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,Hs(c[f],e,n,f,c,Ke(h,n)));return new _n(o,this._parents,e,n)}function tT(t){var e=this._name,n=this._id;typeof t!="function"&&(t=A1(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])&&Hs(p,e,n,y,f,g);o.push(f),s.push(h)}return new _n(o,s,e,n)}var eT=Li.prototype.constructor;function nT(){return new eT(this._groups,this._parents)}function rT(t,e){var n,r,i;return function(){var o=Rr(this,t),s=(this.style.removeProperty(t),Rr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function dm(t){return function(){this.style.removeProperty(t)}}function iT(t,e,n){var r,i=n+"",o;return function(){var s=Rr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function oT(t,e,n){var r,i,o;return function(){var s=Rr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Rr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function sT(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=dm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function aT(t,e,n){var r=(t+="")=="transform"?hI:hm;return e==null?this.styleTween(t,rT(t,r)).on("end.style."+t,dm(t)):typeof e=="function"?this.styleTween(t,oT(t,r,Zc(this,"style."+t,e))).each(sT(this._id,t)):this.styleTween(t,iT(t,r,e),n).on("end.style."+t,null)}function lT(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function cT(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&lT(t,s,n)),r}return o._value=e,o}function hT(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,cT(t,e,n==null?"":n))}function dT(t){return function(){this.textContent=t}}function uT(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function fT(t){return this.tween("text",typeof t=="function"?uT(Zc(this,"text",t)):dT(t==null?"":t+""))}function pT(t){return function(e){this.textContent=t.call(this,e)}}function gT(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&pT(i)),e}return r._value=t,r}function mT(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,gT(t))}function yT(){for(var t=this._name,e=this._id,n=um(),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);Hs(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 vT(){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 xT=0;function _n(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function um(){return++xT}var $n=Li.prototype;_n.prototype={constructor:_n,select:JI,selectAll:tT,selectChild:$n.selectChild,selectChildren:$n.selectChildren,filter:XI,merge:GI,selection:nT,transition:yT,call:$n.call,nodes:$n.nodes,node:$n.node,size:$n.size,empty:$n.empty,each:$n.each,on:ZI,attr:II,attrTween:zI,style:aT,styleTween:hT,text:fT,textTween:mT,remove:QI,tween:$I,delay:DI,duration:WI,ease:BI,easeVarying:YI,end:vT,[Symbol.iterator]:$n[Symbol.iterator]};function bT(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var wT={time:null,delay:0,duration:250,ease:bT};function _T(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 $T(t){var e,n;t instanceof _n?(e=t._id,t=t._name):(e=um(),(n=wT).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])&&Hs(l,t,e,c,s,n||_T(l,e));return new _n(r,this._parents,t,e)}Li.prototype.interrupt=bI,Li.prototype.transition=$T;const Kc=Math.PI,Qc=2*Kc,ur=1e-6,PT=Qc-ur;function fm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function CT(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return fm;const n=Ji(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 OT{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?fm:CT(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>ur)if(!(Math.abs(u*l-c*h)>ur)||!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)>ur&&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)>ur||Math.abs(this._y1-h)>ur)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%Qc+Qc),f>PT?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>ur&&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 MT(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 ST(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return pm(this.cover(e,n),e,n,t)}function pm(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 ET(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)pm(this,s[n],a[n],t[n]);return this}function IT(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 TT(){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 Ee(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function kT(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 LT(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 zT(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function HT(){return this._root}function RT(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function DT(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 NT(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 jT(t){return t[0]}function WT(t){return arguments.length?(this._x=t,this):this._x}function FT(t){return t[1]}function BT(t){return arguments.length?(this._y=t,this):this._y}function Jc(t,e,n){var r=new th(e==null?jT:e,n==null?FT: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 gm(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=gm(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]=gm(r));return t},Ie.add=ST,Ie.addAll=ET,Ie.cover=IT,Ie.data=TT,Ie.extent=AT,Ie.find=kT,Ie.remove=LT,Ie.removeAll=zT,Ie.root=HT,Ie.size=RT,Ie.visit=DT,Ie.visitAfter=NT,Ie.x=WT,Ie.y=BT;function fr(t){return function(){return t}}function Dn(t){return(t()-.5)*1e-6}function VT(t){return t.x+t.vx}function YT(t){return t.y+t.vy}function XT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=fr(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,VT,YT).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:fr(+c),l(),s):t},s}function GT(t){return t.index}function mm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function qT(t){var e=GT,n=u,r,i=fr(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=mm(b,w.source)),typeof w.target!="object"&&(w.target=mm(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:fr(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:fr(+m),y(),f):i},f}const UT=1664525,ZT=1013904223,ym=4294967296;function KT(){let t=1;return()=>(t=(UT*t+ZT)%ym)/ym}function QT(t){return t.x}function JT(t){return t.y}var tA=10,eA=Math.PI*(3-Math.sqrt(5));function nA(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=KT();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=tA*Math.sqrt(.5+y),b=y*eA;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 rA(){var t,e,n,r,i=fr(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=Jc(t,QT,JT).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:fr(+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 iA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Rs(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 jr(t){return t=Rs(Math.abs(t)),t?t[1]:NaN}function oA(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 sA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var aA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ds(t){if(!(e=aA.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]})}Ds.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 lA(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 vm;function cA(t,e){var n=Rs(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(vm=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")+Rs(t,Math.max(0,e+o-1))[0]}function xm(t,e){var n=Rs(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 bm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:iA,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)=>xm(t*100,e),r:xm,s:cA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function wm(t){return t}var _m=Array.prototype.map,$m=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function hA(t){var e=t.grouping===void 0||t.thousands===void 0?wm:oA(_m.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?wm:sA(_m.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=Ds(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"):bm[_]||(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=bm[_],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=lA(S)),D&&+S==0&&g!=="+"&&(D=!1),R=(D?g==="("?g:a:g==="-"||g==="("?"":g)+R,O=(_==="s"?$m[8+vm/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=Ds(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(jr(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 Ns,Pm,Cm;dA({thousands:",",grouping:[3],currency:["$",""]});function dA(t){return Ns=hA(t),Pm=Ns.format,Cm=Ns.formatPrefix,Ns}function uA(t){return Math.max(0,-jr(Math.abs(t)))}function fA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jr(e)/3)))*3-jr(Math.abs(t)))}function pA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jr(e)-jr(t))+1}function gA(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 mA(){return this.eachAfter(gA)}function yA(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function vA(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 xA(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 bA(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function wA(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 _A(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function $A(t){for(var e=this,n=PA(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 PA(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 CA(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function OA(){return Array.from(this)}function MA(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function SA(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*EA(){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=AA)):e===void 0&&(e=TA);for(var n=new Fi(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 Fi(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(LA)}function IA(){return nh(this).eachBefore(kA)}function TA(t){return t.children}function AA(t){return Array.isArray(t)?t[1]:null}function kA(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function LA(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Fi(t){this.data=t,this.depth=this.height=0,this.parent=null}Fi.prototype=nh.prototype={constructor:Fi,count:mA,each:yA,eachAfter:xA,eachBefore:vA,find:bA,sum:wA,sort:_A,path:$A,ancestors:CA,descendants:OA,leaves:MA,links:SA,copy:IA,[Symbol.iterator]:EA};function zA(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 HA(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 RA(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 DA(t,e,n){return t.a.parent===e.parent?t.a:n}function js(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}js.prototype=Object.create(Fi.prototype);function NA(t){for(var e=new js(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 js(o[s],s)),i.parent=n;return(e.parent=new js(null,0)).children=[e],e}function jA(){var t=zA,e=1,n=1,r=null;function i(c){var h=NA(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){RA(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&&(HA(DA(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 WA(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function FA(t){return function(){return t}}function BA(t){return+t}var Om=[0,1];function Wr(t){return t}function oh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:FA(isNaN(e)?NaN:.5)}function VA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function YA(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 XA(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=KM(t,a,1,r)-1;return o[l](i[l](a))}}function GA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function qA(){var t=Om,e=Om,n=Fc,r,i,o,s=Wr,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==Wr&&(s=VA(t[0],t[f-1])),a=f>2?XA:YA,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,BA),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=aI,h()},u.clamp=function(f){return arguments.length?(s=f?!0:Wr,h()):s!==Wr},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 UA(){return qA()(Wr,Wr)}function ZA(t,e,n,r){var i=nS(t,e,n),o;switch(r=Ds(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=fA(i,s))&&(r.precision=o),Cm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=pA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=uA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Pm(r)}function KA(t){var e=t.domain;return t.ticks=function(n){var r=e();return eS(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return ZA(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 Bi(){var t=UA();return t.copy=function(){return GA(t,Bi())},WA.apply(t,arguments),KA(t)}function de(t){return function(){return t}}const Mm=Math.abs,Oe=Math.atan2,pr=Math.cos,QA=Math.max,sh=Math.min,dn=Math.sin,Fr=Math.sqrt,ze=1e-12,Vi=Math.PI,Ws=Vi/2,Fs=2*Vi;function JA(t){return t>1?0:t<-1?Vi:Math.acos(t)}function Sm(t){return t>=1?Ws:t<=-1?-Ws:Math.asin(t)}function Em(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 OT(e)}function tk(t){return t.innerRadius}function ek(t){return t.outerRadius}function nk(t){return t.startAngle}function rk(t){return t.endAngle}function ik(t){return t&&t.padAngle}function ok(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 Bs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Fr(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)*Fr(QA(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 Yi(){var t=tk,e=ek,n=de(0),r=null,i=nk,o=rk,s=ik,a=null,l=Em(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-Ws,y=o.apply(this,arguments)-Ws,m=Mm(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>Fs-ze)a.moveTo(p*pr(g),p*dn(g)),a.arc(0,0,p,g,y,!x),f>ze&&(a.moveTo(f*pr(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):Fr(f*f+p*p)),E=sh(Mm(p-f)/2,+n.apply(this,arguments)),S=E,R=E,O,T;if(A>ze){var F=Sm(A/f*dn(C)),L=Sm(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*pr(v),k=p*dn(v),N=f*pr(_),j=f*dn(_);if(E>ze){var X=p*pr(b),z=p*dn(b),M=f*pr(w),H=f*dn(w),B;if(m<Vi)if(B=ok(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(JA((U*G+Y*Z)/(Fr(U*U+Y*Y)*Fr(G*G+Z*Z)))/2),it=Fr(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=Bs(M,H,D,k,p,R,x),T=Bs(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=Bs(N,j,X,z,f,-S,x),T=Bs(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-Vi/2;return[pr(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 Im(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Tm(t){this._context=t}Tm.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 Am(t){return new Tm(t)}function sk(t){return t[0]}function ak(t){return t[1]}function lk(t,e){var n=de(!0),r=null,i=Am,o=null,s=Em(a);t=typeof t=="function"?t:t===void 0?sk:de(t),e=typeof e=="function"?e:e===void 0?ak:de(e);function a(l){var c,h=(l=Im(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 ck(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function hk(t){return t}function dk(){var t=hk,e=ck,n=null,r=de(0),i=de(Fs),o=de(0);function s(a){var l,c=(a=Im(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Fs,Math.max(-Fs,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 Xi(t,e,n){this.k=t,this.x=e,this.y=n}Xi.prototype={constructor:Xi,scale:function(t){return t===1?this:new Xi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Xi(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+")"}},Xi.prototype;var uk=Object.defineProperty,fk=Object.defineProperties,pk=Object.getOwnPropertyDescriptors,km=Object.getOwnPropertySymbols,gk=Object.prototype.hasOwnProperty,mk=Object.prototype.propertyIsEnumerable,Lm=(t,e,n)=>e in t?uk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yk=(t,e)=>{for(var n in e||(e={}))gk.call(e,n)&&Lm(t,n,e[n]);if(km)for(var n of km(e))mk.call(e,n)&&Lm(t,n,e[n]);return t},vk=(t,e)=>fk(t,pk(e));const zm=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=Bi().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,vk(yk({},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(Mi,{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:zm,composites:["icon","label","value","desc"]});var xk=Object.defineProperty,bk=Object.defineProperties,wk=Object.getOwnPropertyDescriptors,Hm=Object.getOwnPropertySymbols,_k=Object.prototype.hasOwnProperty,$k=Object.prototype.propertyIsEnumerable,Rm=(t,e,n)=>e in t?xk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pk=(t,e)=>{for(var n in e||(e={}))_k.call(e,n)&&Rm(t,n,e[n]);if(Hm)for(var n of Hm(e))$k.call(e,n)&&Rm(t,n,e[n]);return t},Ck=(t,e)=>bk(t,wk(e));const Dm=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,Ck(Pk({},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:Dm,composites:["icon","label","desc"]});var Ok=Object.defineProperty,Mk=Object.defineProperties,Sk=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,Ek=Object.prototype.hasOwnProperty,Ik=Object.prototype.propertyIsEnumerable,jm=(t,e,n)=>e in t?Ok(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tk=(t,e)=>{for(var n in e||(e={}))Ek.call(e,n)&&jm(t,n,e[n]);if(Nm)for(var n of Nm(e))Ik.call(e,n)&&jm(t,n,e[n]);return t},Ak=(t,e)=>Mk(t,Sk(e));const Wm=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=`
|
|
40
|
+
`,t.appendChild(r),r.offsetHeight;const i=r.getBoundingClientRect();t.removeChild(r),e=i.width===37&&i.height===19&&i.left!==0&&i.top!==0}catch(r){e=!1}if(!e)return rr=!1,!1;let n=!1;try{const r=document.createElement("canvas");r.width=100,r.height=50;const i=r.getContext("2d");if(!i)return rr=!1,!1;i.font="20px sans-serif";const o=i.measureText("Hello");n=typeof o.width=="number"&&o.width>0&&o.width<1e3}catch(r){n=!1}return rr=n,n}const yp=!!(typeof process!="undefined"&&process.versions&&process.versions.node);let gc=1.01;const hP=t=>{gc=t};yp&&t_(o_);let es=null,ke=null;function dP(){return es||(es=document.createElement("canvas").getContext("2d"),es)}function uP(){return document.body?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):null}function fP(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 pP(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Qn(e),a=r||"normal",l=fP(n,i),c=dP();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=uP();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 gP(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=Ll,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=()=>i_(a,l),h=cP()&&(n=pP(a,l))!=null?n:c();return{width:Math.ceil(h.width*gc),height:Math.ceil(h.height*gc)}}function mc(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 ir(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 vp(t,e){if(yp)mP(t,e);else if(document.contains(t))xp(t,e);else{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&(yP(t,()=>{xp(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}}function mP(t,e){const n=mc(t),[r,i,o,s]=e;Qt(t,{viewBox:`${n.x-s} ${n.y-r} ${n.width+s+i} ${n.height+r+o}`})}function xp(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 yP(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 vP(){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 xP=Object.defineProperty,bP=Object.defineProperties,wP=Object.getOwnPropertyDescriptors,ns=Object.getOwnPropertySymbols,bp=Object.prototype.hasOwnProperty,wp=Object.prototype.propertyIsEnumerable,_p=(t,e,n)=>e in t?xP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e)=>{for(var n in e||(e={}))bp.call(e,n)&&_p(t,n,e[n]);if(ns)for(var n of ns(e))wp.call(e,n)&&_p(t,n,e[n]);return t},yc=(t,e)=>bP(t,wP(e)),_P=(t,e)=>{var n={};for(var r in t)bp.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&&wp.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=_P(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,E=s,S=0,R=0;if(!T||!E){const j=gP(c,t);T||(T=j.width),E||(E=j.height)}o&&(S=a==="center"?T/2:a==="right"?T:0),s&&(R=l==="middle"?E/2:l==="bottom"?E:0);const O=Object.entries(Se(Se({width:T,height:E},b!==void 0&&{"line-height":b}),w!==void 0&&{"data-word-wrap":w})).reduce((j,[X,z])=>yc(Se({},j),{[X]:z}),{}),L=Se(Se(Se(Se(Se(Se(Se(Se(Se({"data-element-type":"text",width:T,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(yc(Se({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:T,height:E}),n&&{id:n}),N=_&&_!=="none"?{"data-element-type":"shape",x:0,y:0,width:T,height:E,fill:_,fillOpacity:$,rx:P,ry:P}:void 0;return{type:"g",props:yc(Se({},D),{children:[...N?[{type:"rect",props:N}]:[],{type:"text",props:L}]})}}const Pi=Symbol.for("@antv/infographic/Fragment");function rs(t,e={}){return{type:t,props:e}}function $P(t={}){return rs(Pi,t)}const PP=rs,CP=rs;function OP(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===Pi}function $p(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function Ci(t){return Oi(t).filter($p)}function Oi(t,e=[]){var n;if(!t||typeof t=="boolean")return e;if(Array.isArray(t))t.forEach(r=>Oi(r,e));else if(OP(t)){const r=(n=t.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{Oi(i,e)})}else e.push(t);return e}function qt(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}const is=()=>({x:0,y:0,width:0,height:0});function Dr(t){if(!t||t.length===0)return is();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 is();if(Array.isArray(t)){const p=Ci(t);return or(p)}if(typeof t!="object")return is();const{type:o,props:s={}}=t;if($c(t)){const p=Ip(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=Ci(x),b=or(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($p(x)){const v=x,b=et(v);if(MP(v,s))return b;const w=v.props&&qt(v.props.width)&&qt(v.props.height),P=Pp(v).flatMap(S=>Ci(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 T=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:T,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=Pp(t).flatMap(p=>Ci(p));if(f.length>0){const p=or(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 or(t){if(!t||!Array.isArray(t)||t.length===0)return is();const e=[];for(const n of t){const r=Ci(n);for(const i of r){const o=et(i);o&&e.push(o)}}return Dr(e)}function MP(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 Pp(t){var e;const n=(e=t.props)==null?void 0:e.children;return n?Array.isArray(n)?n:[n]:[]}function vc(t){var e;return t==null||typeof t=="boolean"?[]:Array.isArray(t)?Oi(t):typeof t=="object"?Oi((e=t.props)==null?void 0:e.children):[t]}var SP=Object.defineProperty,os=Object.getOwnPropertySymbols,Cp=Object.prototype.hasOwnProperty,Op=Object.prototype.propertyIsEnumerable,Mp=(t,e,n)=>e in t?SP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xc=(t,e)=>{for(var n in e||(e={}))Cp.call(e,n)&&Mp(t,n,e[n]);if(os)for(var n of os(e))Op.call(e,n)&&Mp(t,n,e[n]);return t},EP=(t,e)=>{var n={};for(var r in t)Cp.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&&Op.call(t,r)&&(n[r]=t[r]);return n};const Rn=(t,e)=>{const n=t,{type:r,props:i}=n,o=EP(n,["type","props"]);return xc({type:r,props:xc(xc({},i),e)},o)},Sp=()=>({defs:new Map});function bc(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(t).replace(/[&<>"']/g,n=>e[n])}const Ep={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 IP(t){return Ep[t]?Ep[t]:t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const wc=new Map;function _c(t){const e=Symbol("layout");return wc.set(e,t),r=>({type:e,props:r})}function $c(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)&&typeof t.type=="symbol"&&wc.has(t.type)}function Ip(t,e=Sp()){const n=wc.get(t.type);if(!n)return console.warn("Layout function not found for symbol:",t.type),t;const r=vc(t).filter(i=>typeof i=="object");return n(r,t.props,e)}var AP=Object.defineProperty,TP=Object.defineProperties,kP=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertySymbols,Ap=Object.prototype.hasOwnProperty,Tp=Object.prototype.propertyIsEnumerable,kp=(t,e,n)=>e in t?AP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,LP=(t,e)=>{for(var n in e||(e={}))Ap.call(e,n)&&kp(t,n,e[n]);if(ss)for(var n of ss(e))Tp.call(e,n)&&kp(t,n,e[n]);return t},zP=(t,e)=>TP(t,kP(e)),Lp=(t,e)=>{var n={};for(var r in t)Ap.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&&Tp.call(t,r)&&(n[r]=t[r]);return n};function Mi(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=>Mi(r,e)).filter(Boolean);if($c(t)){const r=Ip(t,e);return Mi(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return Mi(r,e)}const n=vc(t).map(r=>Mi(r,e)).filter(Boolean);return t.type===Pi?n:t.type===Ea?(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 Si(t,e){if(t==null)return"";if(typeof t=="string")return bc(t);if(typeof t=="number")return String(t);const{type:n,props:r}=t;if(!n)return"";const i=vc(t);if(n===Pi)return i.map(l=>Si(l)).filter(Boolean).join("");if(n===Ea)return"";if(typeof n=="function"||$c(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=Hp(r),s=i.map(l=>Si(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function zp(t,e={}){const n=Sp(),r=Mi(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>Si(m)).join(""):Si(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=Lp(o,["x","y","width","height","style"]),f=zP(LP({},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=Hp(f),g=HP(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>Si(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function Hp(t){if(!t)return"";const e=t,{children:n}=e,r=Lp(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=IP(i),a=typeof o=="string"?bc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function HP(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="${bc(e)}"`}var RP=Object.defineProperty,as=Object.getOwnPropertySymbols,Rp=Object.prototype.hasOwnProperty,Dp=Object.prototype.propertyIsEnumerable,Np=(t,e,n)=>e in t?RP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ls=(t,e)=>{for(var n in e||(e={}))Rp.call(e,n)&&Np(t,n,e[n]);if(as)for(var n of as(e))Dp.call(e,n)&&Np(t,n,e[n]);return t},jp=(t,e)=>{var n={};for(var r in t)Rp.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&&Dp.call(t,r)&&(n[r]=t[r]);return n};const q=t=>{const e=t,{indexes:n}=e,r=jp(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnAdd};return d(Ct,ls(ls({},i),r))},Xt=t=>{const e=t,{indexes:n}=e,r=jp(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnRemove};return d(Ct,ls(ls({},i),r))};var DP=Object.defineProperty,NP=Object.defineProperties,jP=Object.getOwnPropertyDescriptors,Wp=Object.getOwnPropertySymbols,WP=Object.prototype.hasOwnProperty,FP=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?DP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BP=(t,e)=>{for(var n in e||(e={}))WP.call(e,n)&&Fp(t,n,e[n]);if(Wp)for(var n of Wp(e))FP.call(e,n)&&Fp(t,n,e[n]);return t},VP=(t,e)=>NP(t,jP(e));const Et=t=>d(V,VP(BP({"data-element-type":zt.BtnsGroup,width:0,height:0},t),{display:"none"})),ie=()=>d(Bt,{});var YP=Object.defineProperty,cs=Object.getOwnPropertySymbols,Bp=Object.prototype.hasOwnProperty,Vp=Object.prototype.propertyIsEnumerable,Yp=(t,e,n)=>e in t?YP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pc=(t,e)=>{for(var n in e||(e={}))Bp.call(e,n)&&Yp(t,n,e[n]);if(cs)for(var n of cs(e))Vp.call(e,n)&&Yp(t,n,e[n]);return t},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&&cs)for(var r of cs(t))e.indexOf(r)<0&&Vp.call(t,r)&&(n[r]=t[r]);return n};const Xp=t=>{var e=t,{indexes:n}=e,r=XP(e,["indexes"]);const o=Pc(Pc({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=zt.ItemIllus):o["data-element-type"]=zt.Illus,d(Ct,Pc({},o))};var GP=Object.defineProperty,qP=Object.defineProperties,UP=Object.getOwnPropertyDescriptors,hs=Object.getOwnPropertySymbols,Gp=Object.prototype.hasOwnProperty,qp=Object.prototype.propertyIsEnumerable,Up=(t,e,n)=>e in t?GP(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(hs)for(var n of hs(e))qp.call(e,n)&&Up(t,n,e[n]);return t},ZP=(t,e)=>qP(t,UP(e)),KP=(t,e)=>{var n={};for(var r in t)Gp.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&&qp.call(t,r)&&(n[r]=t[r]);return n};const Jt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=KP(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(Mt,ZP(Zp({},a),{"data-indexes":n,"data-element-type":zt.ItemDesc}))};var QP=Object.defineProperty,JP=Object.defineProperties,tC=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,Kp=Object.prototype.hasOwnProperty,Qp=Object.prototype.propertyIsEnumerable,Jp=(t,e,n)=>e in t?QP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ei=(t,e)=>{for(var n in e||(e={}))Kp.call(e,n)&&Jp(t,n,e[n]);if(ds)for(var n of ds(e))Qp.call(e,n)&&Jp(t,n,e[n]);return t},us=(t,e)=>JP(t,tC(e)),tg=(t,e)=>{var n={};for(var r in t)Kp.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&&Qp.call(t,r)&&(n[r]=t[r]);return n};const Ce=t=>{const e=t,{indexes:n,size:r=32}=e,i=tg(e,["indexes","size"]),o=Ei({fill:"lightgray",width:r,height:r},i);return d(Ct,us(Ei({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},sr=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=tg(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=us(Ei({fill:o},s),{x:l,y:l,width:a,height:a});return I(V,us(Ei({},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,us(Ei({},c),{"data-indexes":n,"data-element-type":zt.ItemIcon}))]}))};var eC=Object.defineProperty,nC=Object.defineProperties,rC=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertySymbols,eg=Object.prototype.hasOwnProperty,ng=Object.prototype.propertyIsEnumerable,rg=(t,e,n)=>e in t?eC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ig=(t,e)=>{for(var n in e||(e={}))eg.call(e,n)&&rg(t,n,e[n]);if(fs)for(var n of fs(e))ng.call(e,n)&&rg(t,n,e[n]);return t},iC=(t,e)=>nC(t,rC(e)),oC=(t,e)=>{var n={};for(var r in t)eg.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&&ng.call(t,r)&&(n[r]=t[r]);return n};const It=t=>{var e=t,{indexes:n,children:r}=e,i=oC(e,["indexes","children"]),o;const s=ig({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,iC(ig({},s),{"data-indexes":n,"data-element-type":zt.ItemLabel}))};var sC=Object.defineProperty,og=Object.getOwnPropertySymbols,aC=Object.prototype.hasOwnProperty,lC=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?sC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cC=(t,e)=>{for(var n in e||(e={}))aC.call(e,n)&&sg(t,n,e[n]);if(og)for(var n of og(e))lC.call(e,n)&&sg(t,n,e[n]);return t};const St=t=>d(V,cC({"data-element-type":zt.ItemsGroup},t));var hC=Object.defineProperty,dC=Object.defineProperties,uC=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,ag=Object.prototype.hasOwnProperty,lg=Object.prototype.propertyIsEnumerable,cg=(t,e,n)=>e in t?hC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hg=(t,e)=>{for(var n in e||(e={}))ag.call(e,n)&&cg(t,n,e[n]);if(ps)for(var n of ps(e))lg.call(e,n)&&cg(t,n,e[n]);return t},fC=(t,e)=>dC(t,uC(e)),pC=(t,e)=>{var n={};for(var r in t)ag.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ps)for(var r of ps(t))e.indexOf(r)<0&&lg.call(t,r)&&(n[r]=t[r]);return n};const Ii=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=pC(e,["indexes","value","formatter"]),s;const a=hg({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,fC(hg({},a),{"data-indexes":n,"data-element-type":zt.ItemValue}))};var gC=Object.defineProperty,dg=Object.getOwnPropertySymbols,mC=Object.prototype.hasOwnProperty,yC=Object.prototype.propertyIsEnumerable,ug=(t,e,n)=>e in t?gC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vC=(t,e)=>{for(var n in e||(e={}))mC.call(e,n)&&ug(t,n,e[n]);if(dg)for(var n of dg(e))yC.call(e,n)&&ug(t,n,e[n]);return t};const le=t=>d(V,vC({"data-element-type":"shapes-group"},t));var xC=Object.defineProperty,bC=Object.defineProperties,wC=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,fg=Object.prototype.hasOwnProperty,pg=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?xC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ms=(t,e)=>{for(var n in e||(e={}))fg.call(e,n)&&gg(t,n,e[n]);if(gs)for(var n of gs(e))pg.call(e,n)&&gg(t,n,e[n]);return t},mg=(t,e)=>bC(t,wC(e)),_C=(t,e)=>{var n={};for(var r in t)fg.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&&pg.call(t,r)&&(n[r]=t[r]);return n};const Ai=_c((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=_C(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(V,ms({},o));const h=t.map(v=>et(v)),u=or(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],_=ms({},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=mg(ms({},o),{x:f,y:p,width:g,height:y});return d(V,mg(ms({},x),{children:m}))});var $C=Object.defineProperty,PC=Object.defineProperties,CC=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,yg=Object.prototype.hasOwnProperty,vg=Object.prototype.propertyIsEnumerable,xg=(t,e,n)=>e in t?$C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ar=(t,e)=>{for(var n in e||(e={}))yg.call(e,n)&&xg(t,n,e[n]);if(ys)for(var n of ys(e))vg.call(e,n)&&xg(t,n,e[n]);return t},bg=(t,e)=>PC(t,CC(e)),OC=(t,e)=>{var n={};for(var r in t)yg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ys)for(var r of ys(t))e.indexOf(r)<0&&vg.call(t,r)&&(n[r]=t[r]);return n};const dt=_c((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=OC(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(V,ar({},c));const m=r==="row"||r==="row-reverse",x=r==="row-reverse"||r==="column-reverse",v=t.map(O=>et(O)),b=or(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=[],A=[],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),A.push(k),F+=(O.length>1?l:0)+N):(P.push({children:O,bounds:A}),O=[D],A=[k],F=N)}O.length>0&&P.push({children:O,bounds:A})}else P.push({children:t,bounds:v});const C=[];let T=0;const E=[];if(P.forEach(O=>{const{children:A,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"&&A.length>1&&(j=N/(A.length-1)+l);let X=k;A.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=T;if($)switch(o){case"flex-end":Z=T+D-U;break;case"center":Z=T+(D-U)/2;break;default:Z=T;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}),T+=D+l}),P.length>1&&$){const O=E.reduce((L,D)=>L+D,0)+(P.length-1)*l,A=(m?_:w)-O;let F=0;switch(s){case"flex-end":F=A;break;case"center":F=A/2;break;case"space-between":if(P.length>1){const L=A/(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=ar({},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=ar({},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(A=>A.height));C.forEach((A,F)=>{const L=v[F],D=(O-L.height)/2,k=ar({},A.props);k.y=(k.y||0)+D,C[F]=Rn(A,k)})}else{const O=Math.max(...v.map(A=>A.width));C.forEach((A,F)=>{const L=v[F],D=(O-L.width)/2,k=ar({},A.props);k.x=(k.x||0)+D,C[F]=Rn(A,k)})}const S=or(C),R=bg(ar({},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,bg(ar({},R),{children:C}))});var MC=Object.defineProperty,SC=Object.defineProperties,EC=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,IC=Object.prototype.hasOwnProperty,AC=Object.prototype.propertyIsEnumerable,_g=(t,e,n)=>e in t?MC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vs=(t,e)=>{for(var n in e||(e={}))IC.call(e,n)&&_g(t,n,e[n]);if(wg)for(var n of wg(e))AC.call(e,n)&&_g(t,n,e[n]);return t},$g=(t,e)=>SC(t,EC(e));const Pg=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,$g(vs(vs({},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,$g(vs(vs({},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,{})]})},Cc=new Map;function Oc(t,e){Cc.set(t,e)}function Cg(t){return Cc.get(t)}function TC(){return Array.from(Cc.keys())}Oc("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),Oc("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var kC=Object.defineProperty,LC=Object.defineProperties,zC=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,HC=Object.prototype.hasOwnProperty,RC=Object.prototype.propertyIsEnumerable,Mg=(t,e,n)=>e in t?kC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ti=(t,e)=>{for(var n in e||(e={}))HC.call(e,n)&&Mg(t,n,e[n]);if(Og)for(var n of Og(e))RC.call(e,n)&&Mg(t,n,e[n]);return t},ki=(t,e)=>LC(t,zC(e));Yt(lu);const Sg=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=on(t),i=on(e),o=BC({primaryColor:r,bgColor:i});return VC(o,{primaryColor:r,bgColor:i,isDarkMode:n})},DC=(t,e)=>l4(ki(Ti({},t),{alpha:e?.2:.1}))||"#ffffff",NC=(t,e)=>{if(e)return"#ffffff";const n=on("#262626");return gl(n,t)>=7?li(n):"#000000"},jC=t=>{const e=bu(on(t)),n=ki(Ti({},e),{l:Math.min(1,e.l+.2)});return li(n)},WC=(t,e)=>{const n=on(t),r=on("#262626"),i=on("#ffffff"),o=gl(r,n);return gl(i,n)>=3?li(i):o>=4.5?li(r):"#ffffff"},FC=(t,e)=>{const n=bu(t);if(e){const r=ki(Ti({},n),{l:Math.min(1,n.l+.1)});return xs(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=ki(Ti({},n),{l:Math.min(1,n.l+.05)});return xs(r,"#ffffff")}}},BC=({primaryColor:t,bgColor:e})=>({colorPrimary:xs(t,"#FF356A"),colorBg:xs(e,"#ffffff"),colorWhite:"#ffffff"}),VC=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=NC(n,r),o=DC(e,r);return ki(Ti({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:jC(i),colorPrimaryText:WC(o,r),colorBgElevated:FC(n,r)})};function xs(t,e="#000000"){var n;return(n=li(t))!=null?n:e}const Mc="#FF356A";function ce(t){var e;return((e=t==null?void 0:t.themeConfig)==null?void 0:e.colorPrimary)||Mc}function Eg(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)=>zo(o,[a],r.items.length)||Mc)}function At(t,e){var n,r,i;return zo((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 Sg({colorPrimary:i,isDarkMode:wu(r),colorBg:r})}function Li(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 YC=Object.defineProperty,Ig=Object.getOwnPropertySymbols,XC=Object.prototype.hasOwnProperty,GC=Object.prototype.propertyIsEnumerable,Ag=(t,e,n)=>e in t?YC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qC=(t,e)=>{for(var n in e||(e={}))XC.call(e,n)&&Ag(t,n,e[n]);if(Ig)for(var n of Ig(e))GC.call(e,n)&&Ag(t,n,e[n]);return t};function Zt(t,e=[]){const n=qC({},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 bs(t,e){var n;return t.length===0?()=>null:e===void 0?t[0]:(n=t[e])!=null?n:t[0]}const Sc=new Map;function Kt(t,e){Sc.set(t,e)}function Tg(t){return Sc.get(t)}function UC(){return Array.from(Sc.keys())}var ZC=Object.defineProperty,KC=Object.defineProperties,QC=Object.getOwnPropertyDescriptors,kg=Object.getOwnPropertySymbols,JC=Object.prototype.hasOwnProperty,tO=Object.prototype.propertyIsEnumerable,Lg=(t,e,n)=>e in t?ZC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eO=(t,e)=>{for(var n in e||(e={}))JC.call(e,n)&&Lg(t,n,e[n]);if(kg)for(var n of kg(e))tO.call(e,n)&&Lg(t,n,e[n]);return t},nO=(t,e)=>KC(t,QC(e));const zg=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,nO(eO({},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(Ii,{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:zg,composites:["icon","label","value","desc"]});var rO=Object.defineProperty,iO=Object.defineProperties,oO=Object.getOwnPropertyDescriptors,Hg=Object.getOwnPropertySymbols,sO=Object.prototype.hasOwnProperty,aO=Object.prototype.propertyIsEnumerable,Rg=(t,e,n)=>e in t?rO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lO=(t,e)=>{for(var n in e||(e={}))sO.call(e,n)&&Rg(t,n,e[n]);if(Hg)for(var n of Hg(e))aO.call(e,n)&&Rg(t,n,e[n]);return t},cO=(t,e)=>iO(t,oO(e));const Dg=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Zt(t,["width","height"]);return I(V,cO(lO({},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:Dg,composites:["icon","label","desc"]});var hO=Object.defineProperty,dO=Object.defineProperties,uO=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,Ng=Object.prototype.hasOwnProperty,jg=Object.prototype.propertyIsEnumerable,Wg=(t,e,n)=>e in t?hO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fO=(t,e)=>{for(var n in e||(e={}))Ng.call(e,n)&&Wg(t,n,e[n]);if(ws)for(var n of ws(e))jg.call(e,n)&&Wg(t,n,e[n]);return t},pO=(t,e)=>dO(t,uO(e)),gO=(t,e)=>{var n={};for(var r in t)Ng.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ws)for(var r of ws(t))e.indexOf(r)<0&&jg.call(t,r)&&(n[r]=t[r]);return n};const Ec=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=gO(e,["color","opacity"]);return d("filter",pO(fO({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 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,wO=(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},_O=(t,e)=>yO(t,vO(e));const Ic=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return I("linearGradient",_O(wO({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 $O=Object.defineProperty,PO=Object.defineProperties,CO=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,OO=Object.prototype.hasOwnProperty,MO=Object.prototype.propertyIsEnumerable,Yg=(t,e,n)=>e in t?$O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zi=(t,e)=>{for(var n in e||(e={}))OO.call(e,n)&&Yg(t,n,e[n]);if(Vg)for(var n of Vg(e))MO.call(e,n)&&Yg(t,n,e[n]);return t},Hi=(t,e)=>PO(t,CO(e));const Xg=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,Hi(zi({},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,Hi(zi({},b),{children:e.desc})):null),_=4,$=v.height+_+w.height,C=(i-$)/2,T=C+v.height+_,E=f?r-i+a:a,S=a;return I(V,Hi(zi({},c),{children:[d(jt,{children:d(Ec,{})}),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(sr,{indexes:n,x:E,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d(It,Hi(zi({x:y,y:C},x),{children:e.label})),e.desc&&d(Jt,Hi(zi({x:y,y:T},b),{children:e.desc}))]}))};Kt("capsule-item",{component:Xg,composites:["icon","label","desc"]});var SO=Object.defineProperty,EO=Object.defineProperties,IO=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,AO=Object.prototype.hasOwnProperty,TO=Object.prototype.propertyIsEnumerable,qg=(t,e,n)=>e in t?SO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ac=(t,e)=>{for(var n in e||(e={}))AO.call(e,n)&&qg(t,n,e[n]);if(Gg)for(var n of Gg(e))TO.call(e,n)&&qg(t,n,e[n]);return t},Tc=(t,e)=>EO(t,IO(e));const Ug=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=_s(p,80,.2),y=_s(p,20,.8),m=_s(p,75,.32),x=_s(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,Tc(Ac({},a),{children:[I(jt,{children:[I("linearGradient",Tc(Ac({id:b},_),{children:[d("stop",{offset:"0%",stopColor:g}),d("stop",{offset:"100%",stopColor:y})]})),I("linearGradient",Tc(Ac({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:Ug,composites:["label"]});function _s(t,e,n){return lt.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var kO=Object.defineProperty,LO=Object.defineProperties,zO=Object.getOwnPropertyDescriptors,Zg=Object.getOwnPropertySymbols,HO=Object.prototype.hasOwnProperty,RO=Object.prototype.propertyIsEnumerable,Kg=(t,e,n)=>e in t?kO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kc=(t,e)=>{for(var n in e||(e={}))HO.call(e,n)&&Kg(t,n,e[n]);if(Zg)for(var n of Zg(e))RO.call(e,n)&&Kg(t,n,e[n]);return t},Lc=(t,e)=>LO(t,zO(e));const Qg=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=DO(g,g,p,0,v),w={x:y,y,width:m,height:m};return I(V,Lc(kc({},c),{width:i,height:i+s+20,children:[d(Ct,{width:i,height:i,fill:"none"}),d(Wt,Lc(kc({},w),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),x?d(Wt,Lc(kc({},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(Ii,{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 DO(t,e,n,r,i){const o=Jg(t,e,n,i),s=Jg(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 Jg(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:Qg,composites:["label","value"]});var NO=Object.defineProperty,jO=Object.defineProperties,WO=Object.getOwnPropertyDescriptors,t1=Object.getOwnPropertySymbols,FO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,e1=(t,e,n)=>e in t?NO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VO=(t,e)=>{for(var n in e||(e={}))FO.call(e,n)&&e1(t,n,e[n]);if(t1)for(var n of t1(e))BO.call(e,n)&&e1(t,n,e[n]);return t},YO=(t,e)=>jO(t,WO(e));const n1=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,YO(VO({},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(Ii,{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:n1,composites:["icon","label","value","desc"]});var XO=Object.defineProperty,GO=Object.defineProperties,qO=Object.getOwnPropertyDescriptors,r1=Object.getOwnPropertySymbols,UO=Object.prototype.hasOwnProperty,ZO=Object.prototype.propertyIsEnumerable,i1=(t,e,n)=>e in t?XO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KO=(t,e)=>{for(var n in e||(e={}))UO.call(e,n)&&i1(t,n,e[n]);if(r1)for(var n of r1(e))ZO.call(e,n)&&i1(t,n,e[n]);return t},QO=(t,e)=>GO(t,qO(e));const o1=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,QO(KO({},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:o1,composites:["label"]});var JO=Object.defineProperty,tM=Object.defineProperties,eM=Object.getOwnPropertyDescriptors,s1=Object.getOwnPropertySymbols,nM=Object.prototype.hasOwnProperty,rM=Object.prototype.propertyIsEnumerable,a1=(t,e,n)=>e in t?JO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iM=(t,e)=>{for(var n in e||(e={}))nM.call(e,n)&&a1(t,n,e[n]);if(s1)for(var n of s1(e))rM.call(e,n)&&a1(t,n,e[n]);return t},oM=(t,e)=>tM(t,eM(e));const l1=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(sr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(aM,{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,oM(iM({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(sM,{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]})]})}))},sM=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"})},aM=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:l1,composites:["icon","label","desc","time"]});var lM=Object.defineProperty,cM=Object.defineProperties,hM=Object.getOwnPropertyDescriptors,c1=Object.getOwnPropertySymbols,dM=Object.prototype.hasOwnProperty,uM=Object.prototype.propertyIsEnumerable,h1=(t,e,n)=>e in t?lM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,d1=(t,e)=>{for(var n in e||(e={}))dM.call(e,n)&&h1(t,n,e[n]);if(c1)for(var n of c1(e))uM.call(e,n)&&h1(t,n,e[n]);return t},u1=(t,e)=>cM(t,hM(e));const f1=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(sr,{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(Ai,{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,u1(d1({},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,u1(d1({},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:f1,composites:["icon","label","desc"]});var fM=Object.defineProperty,pM=Object.defineProperties,gM=Object.getOwnPropertyDescriptors,p1=Object.getOwnPropertySymbols,mM=Object.prototype.hasOwnProperty,yM=Object.prototype.propertyIsEnumerable,g1=(t,e,n)=>e in t?fM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vM=(t,e)=>{for(var n in e||(e={}))mM.call(e,n)&&g1(t,n,e[n]);if(p1)for(var n of p1(e))yM.call(e,n)&&g1(t,n,e[n]);return t},xM=(t,e)=>pM(t,gM(e));const m1=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,xM(vM({},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:m1,composites:["icon","label"]});var bM=Object.defineProperty,wM=Object.defineProperties,_M=Object.getOwnPropertyDescriptors,y1=Object.getOwnPropertySymbols,$M=Object.prototype.hasOwnProperty,PM=Object.prototype.propertyIsEnumerable,v1=(t,e,n)=>e in t?bM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CM=(t,e)=>{for(var n in e||(e={}))$M.call(e,n)&&v1(t,n,e[n]);if(y1)for(var n of y1(e))PM.call(e,n)&&v1(t,n,e[n]);return t},OM=(t,e)=>wM(t,_M(e));const x1=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,OM(CM({},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:x1,composites:["label","desc"]});var MM=Object.defineProperty,SM=Object.defineProperties,EM=Object.getOwnPropertyDescriptors,b1=Object.getOwnPropertySymbols,IM=Object.prototype.hasOwnProperty,AM=Object.prototype.propertyIsEnumerable,w1=(t,e,n)=>e in t?MM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TM=(t,e)=>{for(var n in e||(e={}))IM.call(e,n)&&w1(t,n,e[n]);if(b1)for(var n of b1(e))AM.call(e,n)&&w1(t,n,e[n]);return t},kM=(t,e)=>SM(t,EM(e));const _1=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,T=`M ${_} ${C} L ${_} ${P} L ${$} ${P}`,E=c/2,S=_+E,R=P+E,O=8;return I(V,kM(TM({},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:T,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:_1,composites:["icon","label","desc"]});var LM=Object.defineProperty,zM=Object.defineProperties,HM=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,RM=Object.prototype.hasOwnProperty,DM=Object.prototype.propertyIsEnumerable,P1=(t,e,n)=>e in t?LM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NM=(t,e)=>{for(var n in e||(e={}))RM.call(e,n)&&P1(t,n,e[n]);if($1)for(var n of $1(e))DM.call(e,n)&&P1(t,n,e[n]);return t},jM=(t,e)=>zM(t,HM(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]=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)",T="rgba(0, 0, 0, 0.03)",E=`letter-card-${i.join("-")}`,S=`${E}-gradient`,R=`${E}-pattern`,O=`${E}-shade`,A=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,jM(NM({},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:A,height:A,patternTransform:`rotate(${v})`,children:[d("rect",{x:"0",y:"0",width:A,height:A,fill:C}),d("rect",{x:"0",y:"0",width:m,height:A,fill:T})]}),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:C1,composites:["label"]});var WM=Object.defineProperty,FM=Object.defineProperties,BM=Object.getOwnPropertyDescriptors,O1=Object.getOwnPropertySymbols,VM=Object.prototype.hasOwnProperty,YM=Object.prototype.propertyIsEnumerable,M1=(t,e,n)=>e in t?WM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XM=(t,e)=>{for(var n in e||(e={}))VM.call(e,n)&&M1(t,n,e[n]);if(O1)for(var n of O1(e))YM.call(e,n)&&M1(t,n,e[n]);return t},GM=(t,e)=>FM(t,BM(e));const S1=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,T=(r=m.height)!=null?r:P,E=c==="middle"?(T-P)/2:c==="flipped"?T-P:0,S=v==="right"?C-w:v==="center"?(C-w)/2:0,R=E,O=v==="right"?C-$:v==="center"?(C-$)/2:0,A=T;return I(V,GM(XM({},m),{width:C,height:T,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:A-y/2,width:$,height:y,stroke:a.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};Kt("lined-text",{component:S1,composites:["label"]});var qM=Object.defineProperty,UM=Object.defineProperties,ZM=Object.getOwnPropertyDescriptors,E1=Object.getOwnPropertySymbols,KM=Object.prototype.hasOwnProperty,QM=Object.prototype.propertyIsEnumerable,I1=(t,e,n)=>e in t?qM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JM=(t,e)=>{for(var n in e||(e={}))KM.call(e,n)&&I1(t,n,e[n]);if(E1)for(var n of E1(e))QM.call(e,n)&&I1(t,n,e[n]);return t},tS=(t,e)=>UM(t,ZM(e));const A1=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,tS(JM({},c),{children:[I(jt,{children:[d(Ec,{id:x,color:l.colorPrimary}),d(Ic,{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:A1,composites:["label","desc"]});var eS=Object.defineProperty,nS=Object.defineProperties,rS=Object.getOwnPropertyDescriptors,T1=Object.getOwnPropertySymbols,iS=Object.prototype.hasOwnProperty,oS=Object.prototype.propertyIsEnumerable,k1=(t,e,n)=>e in t?eS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sS=(t,e)=>{for(var n in e||(e={}))iS.call(e,n)&&k1(t,n,e[n]);if(T1)for(var n of T1(e))oS.call(e,n)&&k1(t,n,e[n]);return t},aS=(t,e)=>nS(t,rS(e));const L1=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,aS(sS({},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:L1,composites:["label"]});function $s(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lS(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function z1(t){let e,n,r;t.length!==2?(e=$s,n=(a,l)=>$s(t(a),l),r=(a,l)=>t(a)-l):(e=t===$s||t===lS?t:cS,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 cS(){return 0}function hS(t){return t===null?NaN:+t}const dS=z1($s).right;z1(hS).center;const uS=Math.sqrt(50),fS=Math.sqrt(10),pS=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>=uS?10:o>=fS?5:o>=pS?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 gS(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 zc(t,e,n){return e=+e,t=+t,n=+n,Ps(t,e,n)[2]}function mS(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?zc(e,t,n):zc(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var yS={value:()=>{}};function Hc(){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 Cs(n)}function Cs(t){this._=t}function vS(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}})}Cs.prototype=Hc.prototype={constructor:Cs,on:function(t,e){var n=this._,r=vS(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=xS(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]=H1(n[i],t.name,e);else if(e==null)for(i in n)n[i]=H1(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 Cs(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 xS(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function H1(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=yS,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Rc="http://www.w3.org/1999/xhtml";const R1={svg:"http://www.w3.org/2000/svg",xhtml:Rc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Os(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),R1.hasOwnProperty(e)?{space:R1[e],local:t}:t}function bS(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Rc&&e.documentElement.namespaceURI===Rc?e.createElement(t):e.createElementNS(n,t)}}function wS(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function D1(t){var e=Os(t);return(e.local?wS:bS)(e)}function _S(){}function Dc(t){return t==null?_S:function(){return this.querySelector(t)}}function $S(t){typeof t!="function"&&(t=Dc(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 PS(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function CS(){return[]}function N1(t){return t==null?CS:function(){return this.querySelectorAll(t)}}function OS(t){return function(){return PS(t.apply(this,arguments))}}function MS(t){typeof t=="function"?t=OS(t):t=N1(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 j1(t){return function(){return this.matches(t)}}function W1(t){return function(e){return e.matches(t)}}var SS=Array.prototype.find;function ES(t){return function(){return SS.call(this.children,t)}}function IS(){return this.firstElementChild}function AS(t){return this.select(t==null?IS:ES(typeof t=="function"?t:W1(t)))}var TS=Array.prototype.filter;function kS(){return Array.from(this.children)}function LS(t){return function(){return TS.call(this.children,t)}}function zS(t){return this.selectAll(t==null?kS:LS(typeof t=="function"?t:W1(t)))}function HS(t){typeof t!="function"&&(t=j1(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 F1(t){return new Array(t.length)}function RS(){return new qe(this._enter||this._groups.map(F1),this._parents)}function Ms(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ms.prototype={constructor:Ms,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 DS(t){return function(){return t}}function NS(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 Ms(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function jS(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 Ms(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(i[a]=l)}function WS(t){return t.__data__}function FS(t,e){if(!arguments.length)return Array.from(this,WS);var n=e?jS:NS,r=this._parents,i=this._groups;typeof t!="function"&&(t=DS(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=BS(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 BS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function VS(){return new qe(this._exit||this._groups.map(F1),this._parents)}function YS(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 XS(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 GS(){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 qS(t){t||(t=US);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 US(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ZS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function KS(){return Array.from(this)}function QS(){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 JS(){let t=0;for(const e of this)++t;return t}function tE(){return!this.node()}function eE(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 nE(t){return function(){this.removeAttribute(t)}}function rE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function iE(t,e){return function(){this.setAttribute(t,e)}}function oE(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function sE(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function aE(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 lE(t,e){var n=Os(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?rE:nE:typeof e=="function"?n.local?aE:sE:n.local?oE:iE)(n,e))}function B1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function cE(t){return function(){this.style.removeProperty(t)}}function hE(t,e,n){return function(){this.style.setProperty(t,e,n)}}function dE(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function uE(t,e,n){return arguments.length>1?this.each((e==null?cE:typeof e=="function"?dE:hE)(t,e,n==null?"":n)):Nr(this.node(),t)}function Nr(t,e){return t.style.getPropertyValue(e)||B1(t).getComputedStyle(t,null).getPropertyValue(e)}function fE(t){return function(){delete this[t]}}function pE(t,e){return function(){this[t]=e}}function gE(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function mE(t,e){return arguments.length>1?this.each((e==null?fE:typeof e=="function"?gE:pE)(t,e)):this.node()[t]}function V1(t){return t.trim().split(/^|\s+/)}function Nc(t){return t.classList||new Y1(t)}function Y1(t){this._node=t,this._names=V1(t.getAttribute("class")||"")}Y1.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 X1(t,e){for(var n=Nc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function G1(t,e){for(var n=Nc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function yE(t){return function(){X1(this,t)}}function vE(t){return function(){G1(this,t)}}function xE(t,e){return function(){(e.apply(this,arguments)?X1:G1)(this,t)}}function bE(t,e){var n=V1(t+"");if(arguments.length<2){for(var r=Nc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?xE:e?yE:vE)(n,e))}function wE(){this.textContent=""}function _E(t){return function(){this.textContent=t}}function $E(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function PE(t){return arguments.length?this.each(t==null?wE:(typeof t=="function"?$E:_E)(t)):this.node().textContent}function CE(){this.innerHTML=""}function OE(t){return function(){this.innerHTML=t}}function ME(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function SE(t){return arguments.length?this.each(t==null?CE:(typeof t=="function"?ME:OE)(t)):this.node().innerHTML}function EE(){this.nextSibling&&this.parentNode.appendChild(this)}function IE(){return this.each(EE)}function AE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function TE(){return this.each(AE)}function kE(t){var e=typeof t=="function"?t:D1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function LE(){return null}function zE(t,e){var n=typeof t=="function"?t:D1(t),r=e==null?LE:typeof e=="function"?e:Dc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function HE(){var t=this.parentNode;t&&t.removeChild(this)}function RE(){return this.each(HE)}function DE(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function NE(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jE(t){return this.select(t?NE:DE)}function WE(t){return arguments.length?this.property("__data__",t):this.node().__data__}function FE(t){return function(e){t.call(this,e,this.__data__)}}function BE(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 VE(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 YE(t,e,n){return function(){var r=this.__on,i,o=FE(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 XE(t,e,n){var r=BE(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?YE:VE,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function q1(t,e,n){var r=B1(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 GE(t,e){return function(){return q1(this,t,e)}}function qE(t,e){return function(){return q1(this,t,e.apply(this,arguments))}}function UE(t,e){return this.each((typeof e=="function"?qE:GE)(t,e))}function*ZE(){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 KE=[null];function qe(t,e){this._groups=t,this._parents=e}function Ri(){return new qe([[document.documentElement]],KE)}function QE(){return this}qe.prototype=Ri.prototype={constructor:qe,select:$S,selectAll:MS,selectChild:AS,selectChildren:zS,filter:HS,data:FS,enter:RS,exit:VS,join:YS,merge:XS,selection:QE,order:GS,sort:qS,call:ZS,nodes:KS,node:QS,size:JS,empty:tE,each:eE,attr:lE,style:uE,property:mE,classed:bE,text:PE,html:SE,raise:IE,lower:TE,append:kE,insert:zE,remove:RE,clone:jE,datum:WE,on:XE,dispatch:UE,[Symbol.iterator]:ZE};function jc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function U1(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Di(){}var Ni=.7,Ss=1/Ni,jr="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",JE=/^#([0-9a-f]{3,8})$/,tI=new RegExp(`^rgb\\(${jr},${jr},${jr}\\)$`),eI=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),nI=new RegExp(`^rgba\\(${jr},${jr},${jr},${ji}\\)$`),rI=new RegExp(`^rgba\\(${cn},${cn},${cn},${ji}\\)$`),iI=new RegExp(`^hsl\\(${ji},${cn},${cn}\\)$`),oI=new RegExp(`^hsla\\(${ji},${cn},${cn},${ji}\\)$`),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};jc(Di,lr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:K1,formatHex:K1,formatHex8:sI,formatHsl:aI,formatRgb:Q1,toString:Q1});function K1(){return this.rgb().formatHex()}function sI(){return this.rgb().formatHex8()}function aI(){return rm(this).formatHsl()}function Q1(){return this.rgb().formatRgb()}function lr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=JE.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?J1(e):n===3?new Le(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Es(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Es(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=tI.exec(t))?new Le(e[1],e[2],e[3],1):(e=eI.exec(t))?new Le(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=nI.exec(t))?Es(e[1],e[2],e[3],e[4]):(e=rI.exec(t))?Es(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=iI.exec(t))?nm(e[1],e[2]/100,e[3]/100,1):(e=oI.exec(t))?nm(e[1],e[2]/100,e[3]/100,e[4]):Z1.hasOwnProperty(t)?J1(Z1[t]):t==="transparent"?new Le(NaN,NaN,NaN,0):null}function J1(t){return new Le(t>>16&255,t>>8&255,t&255,1)}function Es(t,e,n,r){return r<=0&&(t=e=n=NaN),new Le(t,e,n,r)}function lI(t){return t instanceof Di||(t=lr(t)),t?(t=t.rgb(),new Le(t.r,t.g,t.b,t.opacity)):new Le}function Wc(t,e,n,r){return arguments.length===1?lI(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}jc(Le,Wc,U1(Di,{brighter(t){return t=t==null?Ss:Math.pow(Ss,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ni:Math.pow(Ni,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Le(cr(this.r),cr(this.g),cr(this.b),Is(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:tm,formatHex:tm,formatHex8:cI,formatRgb:em,toString:em}));function tm(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}`}function cI(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}${hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function em(){const t=Is(this.opacity);return`${t===1?"rgb(":"rgba("}${cr(this.r)}, ${cr(this.g)}, ${cr(this.b)}${t===1?")":`, ${t})`}`}function Is(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function cr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hr(t){return t=cr(t),(t<16?"0":"")+t.toString(16)}function nm(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 rm(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof Di||(t=lr(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 hI(t,e,n,r){return arguments.length===1?rm(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}jc(Ue,hI,U1(Di,{brighter(t){return t=t==null?Ss:Math.pow(Ss,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ni:Math.pow(Ni,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(Fc(t>=240?t-240:t+120,i,r),Fc(t,i,r),Fc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ue(im(this.h),As(this.s),As(this.l),Is(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=Is(this.opacity);return`${t===1?"hsl(":"hsla("}${im(this.h)}, ${As(this.s)*100}%, ${As(this.l)*100}%${t===1?")":`, ${t})`}`}}));function im(t){return t=(t||0)%360,t<0?t+360:t}function As(t){return Math.max(0,Math.min(1,t||0))}function Fc(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 Bc=t=>()=>t;function dI(t,e){return function(n){return t+n*e}}function uI(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 fI(t){return(t=+t)==1?om:function(e,n){return n-e?uI(e,n,t):Bc(isNaN(e)?n:e)}}function om(t,e){var n=e-t;return n?dI(t,n):Bc(isNaN(t)?e:t)}const Ts=(function t(e){var n=fI(e);function r(i,o){var s=n((i=Wc(i)).r,(o=Wc(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=om(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 pI(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 gI(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function mI(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]=Xc(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 yI(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 vI(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]=Xc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Vc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yc=new RegExp(Vc.source,"g");function xI(t){return function(){return t}}function bI(t){return function(e){return t(e)+""}}function sm(t,e){var n=Vc.lastIndex=Yc.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=Vc.exec(t))&&(i=Yc.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=Yc.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?bI(l[0].x):xI(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 Xc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Bc(e):(n==="number"?Ze:n==="string"?(r=lr(e))?(e=r,Ts):sm:e instanceof lr?Ts:e instanceof Date?yI:gI(e)?pI:Array.isArray(e)?mI:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?vI:Ze)(t,e)}function wI(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var am=180/Math.PI,Gc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lm(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)*am,skewX:Math.atan(l)*am,scaleX:s,scaleY:a}}var ks;function _I(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Gc:lm(e.a,e.b,e.c,e.d,e.e,e.f)}function $I(t){return t==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",t),!(t=ks.transform.baseVal.consolidate()))?Gc:(t=t.matrix,lm(t.a,t.b,t.c,t.d,t.e,t.f))}function cm(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 PI=cm(_I,"px, ","px)","deg)"),CI=cm($I,", ",")",")"),Wr=0,Wi=0,Fi=0,hm=1e3,Ls,Bi,zs=0,dr=0,Hs=0,Vi=typeof performance=="object"&&performance.now?performance:Date,dm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qc(){return dr||(dm(OI),dr=Vi.now()+Hs)}function OI(){dr=0}function Rs(){this._call=this._time=this._next=null}Rs.prototype=Uc.prototype={constructor:Rs,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qc():+n)+(e==null?0:+e),!this._next&&Bi!==this&&(Bi?Bi._next=this:Ls=this,Bi=this),this._call=t,this._time=n,Zc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zc())}};function Uc(t,e,n){var r=new Rs;return r.restart(t,e,n),r}function MI(){qc(),++Wr;for(var t=Ls,e;t;)(e=dr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Wr}function um(){dr=(zs=Vi.now())+Hs,Wr=Wi=0;try{MI()}finally{Wr=0,EI(),dr=0}}function SI(){var t=Vi.now(),e=t-zs;e>hm&&(Hs-=e,zs=t)}function EI(){for(var t,e=Ls,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:Ls=n);Bi=t,Zc(r)}function Zc(t){if(!Wr){Wi&&(Wi=clearTimeout(Wi));var e=t-dr;e>24?(t<1/0&&(Wi=setTimeout(um,t-Vi.now()-Hs)),Fi&&(Fi=clearInterval(Fi))):(Fi||(zs=Vi.now(),Fi=setInterval(SI,hm)),Wr=1,dm(um))}}function fm(t,e,n){var r=new Rs;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var II=Hc("start","end","cancel","interrupt"),AI=[],pm=0,gm=1,Kc=2,Ds=3,mm=4,Qc=5,Ns=6;function js(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;TI(t,n,{name:e,index:r,group:i,on:II,tween:AI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:pm})}function Jc(t,e){var n=Ke(t,e);if(n.state>pm)throw new Error("too late; already scheduled");return n}function hn(t,e){var n=Ke(t,e);if(n.state>Ds)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 TI(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Uc(o,0,n.time);function o(c){n.state=gm,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!==gm)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===Ds)return fm(s);p.state===mm?(p.state=Ns,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=Ns,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(fm(function(){n.state===Ds&&(n.state=mm,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Kc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Kc){for(n.state=Ds,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=Ns,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function kI(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>Kc&&r.state<Qc,r.state=Ns,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function LI(t){return this.each(function(){kI(this,t)})}function zI(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 HI(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 RI(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?zI:HI)(n,t,e))}function th(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 ym(t,e){var n;return(typeof e=="number"?Ze:e instanceof lr?Ts:(n=lr(e))?(e=n,Ts):sm)(t,e)}function DI(t){return function(){this.removeAttribute(t)}}function NI(t){return function(){this.removeAttributeNS(t.space,t.local)}}function jI(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 WI(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 FI(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 BI(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 VI(t,e){var n=Os(t),r=n==="transform"?CI:ym;return this.attrTween(t,typeof e=="function"?(n.local?BI:FI)(n,r,th(this,"attr."+t,e)):e==null?(n.local?NI:DI)(n):(n.local?WI:jI)(n,r,e))}function YI(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function XI(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function GI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&XI(t,o)),n}return i._value=e,i}function qI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&YI(t,o)),n}return i._value=e,i}function UI(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=Os(t);return this.tween(n,(r.local?GI:qI)(r,e))}function ZI(t,e){return function(){Jc(this,t).delay=+e.apply(this,arguments)}}function KI(t,e){return e=+e,function(){Jc(this,t).delay=e}}function QI(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ZI:KI)(e,t)):Ke(this.node(),e).delay}function JI(t,e){return function(){hn(this,t).duration=+e.apply(this,arguments)}}function tA(t,e){return e=+e,function(){hn(this,t).duration=e}}function eA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?JI:tA)(e,t)):Ke(this.node(),e).duration}function nA(t,e){if(typeof e!="function")throw new Error;return function(){hn(this,t).ease=e}}function rA(t){var e=this._id;return arguments.length?this.each(nA(e,t)):Ke(this.node(),e).ease}function iA(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;hn(this,t).ease=n}}function oA(t){if(typeof t!="function")throw new Error;return this.each(iA(this._id,t))}function sA(t){typeof t!="function"&&(t=j1(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 aA(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 lA(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 cA(t,e,n){var r,i,o=lA(e)?Jc:hn;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function hA(t,e){var n=this._id;return arguments.length<2?Ke(this.node(),n).on.on(t):this.each(cA(n,t,e))}function dA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function uA(){return this.on("end.remove",dA(this._id))}function fA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Dc(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,js(c[f],e,n,f,c,Ke(h,n)));return new _n(o,this._parents,e,n)}function pA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=N1(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])&&js(p,e,n,y,f,g);o.push(f),s.push(h)}return new _n(o,s,e,n)}var gA=Ri.prototype.constructor;function mA(){return new gA(this._groups,this._parents)}function yA(t,e){var n,r,i;return function(){var o=Nr(this,t),s=(this.style.removeProperty(t),Nr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function vm(t){return function(){this.style.removeProperty(t)}}function vA(t,e,n){var r,i=n+"",o;return function(){var s=Nr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function xA(t,e,n){var r,i,o;return function(){var s=Nr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Nr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function bA(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=vm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function wA(t,e,n){var r=(t+="")=="transform"?PI:ym;return e==null?this.styleTween(t,yA(t,r)).on("end.style."+t,vm(t)):typeof e=="function"?this.styleTween(t,xA(t,r,th(this,"style."+t,e))).each(bA(this._id,t)):this.styleTween(t,vA(t,r,e),n).on("end.style."+t,null)}function _A(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $A(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&_A(t,s,n)),r}return o._value=e,o}function PA(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,$A(t,e,n==null?"":n))}function CA(t){return function(){this.textContent=t}}function OA(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function MA(t){return this.tween("text",typeof t=="function"?OA(th(this,"text",t)):CA(t==null?"":t+""))}function SA(t){return function(e){this.textContent=t.call(this,e)}}function EA(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&SA(i)),e}return r._value=t,r}function IA(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,EA(t))}function AA(){for(var t=this._name,e=this._id,n=xm(),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);js(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 TA(){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 kA=0;function _n(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function xm(){return++kA}var $n=Ri.prototype;_n.prototype={constructor:_n,select:fA,selectAll:pA,selectChild:$n.selectChild,selectChildren:$n.selectChildren,filter:sA,merge:aA,selection:mA,transition:AA,call:$n.call,nodes:$n.nodes,node:$n.node,size:$n.size,empty:$n.empty,each:$n.each,on:hA,attr:VI,attrTween:UI,style:wA,styleTween:PA,text:MA,textTween:IA,remove:uA,tween:RI,delay:QI,duration:eA,ease:rA,easeVarying:oA,end:TA,[Symbol.iterator]:$n[Symbol.iterator]};function LA(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var zA={time:null,delay:0,duration:250,ease:LA};function HA(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 RA(t){var e,n;t instanceof _n?(e=t._id,t=t._name):(e=xm(),(n=zA).time=qc(),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])&&js(l,t,e,c,s,n||HA(l,e));return new _n(r,this._parents,t,e)}Ri.prototype.interrupt=LI,Ri.prototype.transition=RA;const eh=Math.PI,nh=2*eh,ur=1e-6,DA=nh-ur;function bm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function NA(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return bm;const n=no(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 jA{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?bm:NA(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>ur)if(!(Math.abs(u*l-c*h)>ur)||!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((eh-Math.acos((y+f-m)/(2*x*v)))/2),w=b/v,_=b/x;Math.abs(w-1)>ur&&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)>ur||Math.abs(this._y1-h)>ur)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%nh+nh),f>DA?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>ur&&this._append`A${r},${r},0,${+(f>=eh)},${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 WA(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 FA(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return wm(this.cover(e,n),e,n,t)}function wm(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 BA(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)wm(this,s[n],a[n],t[n]);return this}function VA(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 YA(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function XA(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 GA(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 qA(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 UA(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function ZA(){return this._root}function KA(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function QA(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 JA(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 tT(t){return t[0]}function eT(t){return arguments.length?(this._x=t,this):this._x}function nT(t){return t[1]}function rT(t){return arguments.length?(this._y=t,this):this._y}function rh(t,e,n){var r=new ih(e==null?tT:e,n==null?nT:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function ih(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 _m(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ie=rh.prototype=ih.prototype;Ie.copy=function(){var t=new ih(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=_m(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]=_m(r));return t},Ie.add=FA,Ie.addAll=BA,Ie.cover=VA,Ie.data=YA,Ie.extent=XA,Ie.find=GA,Ie.remove=qA,Ie.removeAll=UA,Ie.root=ZA,Ie.size=KA,Ie.visit=QA,Ie.visitAfter=JA,Ie.x=eT,Ie.y=rT;function fr(t){return function(){return t}}function Dn(t){return(t()-.5)*1e-6}function iT(t){return t.x+t.vx}function oT(t){return t.y+t.vy}function sT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=fr(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=rh(e,iT,oT).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,T=b.r,E=y+T;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=(T*=T)/(m+T)),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:fr(+c),l(),s):t},s}function aT(t){return t.index}function $m(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function lT(t){var e=aT,n=u,r,i=fr(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,T,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),T=Math.sqrt(P*P+C*C),T=(T-o[b])/T*m*r[b],P*=T,C*=T,$.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=$m(b,w.source)),typeof w.target!="object"&&(w.target=$m(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:fr(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:fr(+m),y(),f):i},f}const cT=1664525,hT=1013904223,Pm=4294967296;function dT(){let t=1;return()=>(t=(cT*t+hT)%Pm)/Pm}function uT(t){return t.x}function fT(t){return t.y}var pT=10,gT=Math.PI*(3-Math.sqrt(5));function mT(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,l=Uc(u),c=Hc("tick","end"),h=dT();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=pT*Math.sqrt(.5+y),b=y*gT;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 yT(){var t,e,n,r,i=fr(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=rh(t,uT,fT).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:fr(+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 vT(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ws(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 Fr(t){return t=Ws(Math.abs(t)),t?t[1]:NaN}function xT(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 bT(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var wT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fs(t){if(!(e=wT.exec(t)))throw new Error("invalid format: "+t);var e;return new oh({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]})}Fs.prototype=oh.prototype;function oh(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+""}oh.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 _T(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 $T(t,e){var n=Ws(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")+Ws(t,Math.max(0,e+o-1))[0]}function Om(t,e){var n=Ws(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 Mm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:vT,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)=>Om(t*100,e),r:Om,s:$T,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Sm(t){return t}var Em=Array.prototype.map,Im=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PT(t){var e=t.grouping===void 0||t.thousands===void 0?Sm:xT(Em.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?Sm:bT(Em.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=Fs(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"):Mm[_]||(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=Mm[_],T=/[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,A,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=_T(S)),D&&+S==0&&g!=="+"&&(D=!1),R=(D?g==="("?g:a:g==="-"||g==="("?"":g)+R,O=(_==="s"?Im[8+Cm/3]:"")+O+(D&&g==="("?")":""),T){for(A=-1,F=S.length;++A<F;)if(L=S.charCodeAt(A),48>L||L>57){O=(L===46?i+S.slice(A+1):S.slice(A))+O,S=S.slice(0,A);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=Fs(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Fr(f)/3)))*3,y=Math.pow(10,-g),m=Im[8+g/3];return function(x){return p(y*x)+m}}return{format:c,formatPrefix:h}}var Bs,Am,Tm;CT({thousands:",",grouping:[3],currency:["$",""]});function CT(t){return Bs=PT(t),Am=Bs.format,Tm=Bs.formatPrefix,Bs}function OT(t){return Math.max(0,-Fr(Math.abs(t)))}function MT(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fr(e)/3)))*3-Fr(Math.abs(t)))}function ST(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fr(e)-Fr(t))+1}function ET(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 IT(){return this.eachAfter(ET)}function AT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function TT(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 kT(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 LT(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 HT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function RT(t){for(var e=this,n=DT(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 DT(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 NT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function jT(){return Array.from(this)}function WT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function FT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*BT(){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 sh(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=XT)):e===void 0&&(e=YT);for(var n=new Yi(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 Yi(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(qT)}function VT(){return sh(this).eachBefore(GT)}function YT(t){return t.children}function XT(t){return Array.isArray(t)?t[1]:null}function GT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qT(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Yi(t){this.data=t,this.depth=this.height=0,this.parent=null}Yi.prototype=sh.prototype={constructor:Yi,count:IT,each:AT,eachAfter:kT,eachBefore:TT,find:LT,sum:zT,sort:HT,path:RT,ancestors:NT,descendants:jT,leaves:WT,links:FT,copy:VT,[Symbol.iterator]:BT};function UT(t,e){return t.parent===e.parent?1:2}function ah(t){var e=t.children;return e?e[0]:t.t}function lh(t){var e=t.children;return e?e[e.length-1]:t.t}function ZT(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 KT(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 QT(t,e,n){return t.a.parent===e.parent?t.a:n}function Vs(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}Vs.prototype=Object.create(Yi.prototype);function JT(t){for(var e=new Vs(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 Vs(o[s],s)),i.parent=n;return(e.parent=new Vs(null,0)).children=[e],e}function tk(){var t=UT,e=1,n=1,r=null;function i(c){var h=JT(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){KT(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=lh(g),f=ah(f),g&&f;)y=ah(y),p=lh(p),p.a=c,w=g.z+v-f.z-m+t(g._,f._),w>0&&(ZT(QT(g,c,u),c,w),m+=w,x+=w),v+=g.m,m+=f.m,b+=y.m,x+=p.m;g&&!lh(p)&&(p.t=g,p.m+=v-x),f&&!ah(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 ek(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function nk(t){return function(){return t}}function rk(t){return+t}var km=[0,1];function Br(t){return t}function ch(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:nk(isNaN(e)?NaN:.5)}function ik(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function ok(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=ch(i,r),o=n(s,o)):(r=ch(r,i),o=n(o,s)),function(a){return o(r(a))}}function sk(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]=ch(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=dS(t,a,1,r)-1;return o[l](i[l](a))}}function ak(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function lk(){var t=km,e=km,n=Xc,r,i,o,s=Br,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==Br&&(s=ik(t[0],t[f-1])),a=f>2?sk:ok,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,rk),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=wI,h()},u.clamp=function(f){return arguments.length?(s=f?!0:Br,h()):s!==Br},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 ck(){return lk()(Br,Br)}function hk(t,e,n,r){var i=mS(t,e,n),o;switch(r=Fs(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=MT(i,s))&&(r.precision=o),Tm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=ST(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=OT(i))&&(r.precision=o-(r.type==="%")*2);break}}return Am(r)}function dk(t){var e=t.domain;return t.ticks=function(n){var r=e();return gS(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return hk(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=zc(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 Xi(){var t=ck();return t.copy=function(){return ak(t,Xi())},ek.apply(t,arguments),dk(t)}function de(t){return function(){return t}}const Lm=Math.abs,Oe=Math.atan2,pr=Math.cos,uk=Math.max,hh=Math.min,dn=Math.sin,Vr=Math.sqrt,ze=1e-12,Gi=Math.PI,Ys=Gi/2,Xs=2*Gi;function fk(t){return t>1?0:t<-1?Gi:Math.acos(t)}function zm(t){return t>=1?Ys:t<=-1?-Ys:Math.asin(t)}function Hm(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 jA(e)}function pk(t){return t.innerRadius}function gk(t){return t.outerRadius}function mk(t){return t.startAngle}function yk(t){return t.endAngle}function vk(t){return t&&t.padAngle}function xk(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 Gs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Vr(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)*Vr(uk(0,_*_*w-$*$)),C=($*b-v*P)/w,T=(-$*v-b*P)/w,E=($*b+v*P)/w,S=(-$*v+b*P)/w,R=C-m,O=T-x,A=E-m,F=S-x;return R*R+O*O>A*A+F*F&&(C=E,T=S),{cx:C,cy:T,x01:-h,y01:-u,x11:C*(i/_-1),y11:T*(i/_-1)}}function qi(){var t=pk,e=gk,n=de(0),r=null,i=mk,o=yk,s=vk,a=null,l=Hm(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-Ys,y=o.apply(this,arguments)-Ys,m=Lm(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>Xs-ze)a.moveTo(p*pr(g),p*dn(g)),a.arc(0,0,p,g,y,!x),f>ze&&(a.moveTo(f*pr(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,T=C>ze&&(r?+r.apply(this,arguments):Vr(f*f+p*p)),E=hh(Lm(p-f)/2,+n.apply(this,arguments)),S=E,R=E,O,A;if(T>ze){var F=zm(T/f*dn(C)),L=zm(T/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*pr(v),k=p*dn(v),N=f*pr(_),j=f*dn(_);if(E>ze){var X=p*pr(b),z=p*dn(b),M=f*pr(w),H=f*dn(w),B;if(m<Gi)if(B=xk(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(fk((U*G+Y*Z)/(Vr(U*U+Y*Y)*Vr(G*G+Z*Z)))/2),it=Vr(B[0]*B[0]+B[1]*B[1]);S=hh(E,(f-it)/(K-1)),R=hh(E,(p-it)/(K+1))}else S=R=0}P>ze?R>ze?(O=Gs(M,H,D,k,p,R,x),A=Gs(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(A.y01,A.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(A.cy+A.y11,A.cx+A.x11),!x),a.arc(A.cx,A.cy,R,Oe(A.y11,A.x11),Oe(A.y01,A.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=Gs(N,j,X,z,f,-S,x),A=Gs(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(A.y01,A.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(A.cy+A.y11,A.cx+A.x11),x),a.arc(A.cx,A.cy,S,Oe(A.y11,A.x11),Oe(A.y01,A.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-Gi/2;return[pr(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 Rm(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Dm(t){this._context=t}Dm.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 Nm(t){return new Dm(t)}function bk(t){return t[0]}function wk(t){return t[1]}function _k(t,e){var n=de(!0),r=null,i=Nm,o=null,s=Hm(a);t=typeof t=="function"?t:t===void 0?bk:de(t),e=typeof e=="function"?e:e===void 0?wk:de(e);function a(l){var c,h=(l=Rm(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 $k(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Pk(t){return t}function Ck(){var t=Pk,e=$k,n=null,r=de(0),i=de(Xs),o=de(0);function s(a){var l,c=(a=Rm(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Xs,Math.max(-Xs,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 Ui(t,e,n){this.k=t,this.x=e,this.y=n}Ui.prototype={constructor:Ui,scale:function(t){return t===1?this:new Ui(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ui(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+")"}},Ui.prototype;var Ok=Object.defineProperty,Mk=Object.defineProperties,Sk=Object.getOwnPropertyDescriptors,jm=Object.getOwnPropertySymbols,Ek=Object.prototype.hasOwnProperty,Ik=Object.prototype.propertyIsEnumerable,Wm=(t,e,n)=>e in t?Ok(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ak=(t,e)=>{for(var n in e||(e={}))Ek.call(e,n)&&Wm(t,n,e[n]);if(jm)for(var n of jm(e))Ik.call(e,n)&&Wm(t,n,e[n]);return t},Tk=(t,e)=>Mk(t,Sk(e));const Fm=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=Xi().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,T=P,E=h==="flipped"?a:s+2*a,S=i-s-3*a,R=T,O=o-a-l,A=g!==void 0;return I(V,Tk(Ak({},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:T,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}),A&&d(Ii,{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+(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(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:Fm,composites:["icon","label","value","desc"]});var kk=Object.defineProperty,Lk=Object.defineProperties,zk=Object.getOwnPropertyDescriptors,Bm=Object.getOwnPropertySymbols,Hk=Object.prototype.hasOwnProperty,Rk=Object.prototype.propertyIsEnumerable,Vm=(t,e,n)=>e in t?kk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dk=(t,e)=>{for(var n in e||(e={}))Hk.call(e,n)&&Vm(t,n,e[n]);if(Bm)for(var n of Bm(e))Rk.call(e,n)&&Vm(t,n,e[n]);return t},Nk=(t,e)=>Lk(t,zk(e));const Ym=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",T=()=>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=T(),R=E(),O=C?u-o/2:i-u-o/2,A=et(d(It,{indexes:n,width:R.contentWidth,children:e.label})),F=x+A.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,Nk(Dk({},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:Ym,composites:["icon","label","desc"]});var jk=Object.defineProperty,Wk=Object.defineProperties,Fk=Object.getOwnPropertyDescriptors,Xm=Object.getOwnPropertySymbols,Bk=Object.prototype.hasOwnProperty,Vk=Object.prototype.propertyIsEnumerable,Gm=(t,e,n)=>e in t?jk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yk=(t,e)=>{for(var n in e||(e={}))Bk.call(e,n)&&Gm(t,n,e[n]);if(Xm)for(var n of Xm(e))Vk.call(e,n)&&Gm(t,n,e[n]);return t},Xk=(t,e)=>Wk(t,Fk(e));const qm=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=`
|
|
41
41
|
M ${$} 0
|
|
42
42
|
L ${r-$} 0
|
|
43
43
|
Q ${r} 0 ${r} ${$}
|
|
@@ -89,32 +89,32 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
89
89
|
L 0 ${$}
|
|
90
90
|
Q 0 0 ${$} 0
|
|
91
91
|
Z
|
|
92
|
-
`,I(V,Ak(Tk({},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:Wm,composites:["icon","label","desc"]});var kk=Object.defineProperty,Lk=Object.defineProperties,zk=Object.getOwnPropertyDescriptors,Fm=Object.getOwnPropertySymbols,Hk=Object.prototype.hasOwnProperty,Rk=Object.prototype.propertyIsEnumerable,Bm=(t,e,n)=>e in t?kk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dk=(t,e)=>{for(var n in e||(e={}))Hk.call(e,n)&&Bm(t,n,e[n]);if(Fm)for(var n of Fm(e))Rk.call(e,n)&&Bm(t,n,e[n]);return t},Nk=(t,e)=>Lk(t,zk(e));const Vm=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,Nk(Dk({},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:Vm,composites:["icon","label","desc"]});var jk=Object.defineProperty,Wk=Object.defineProperties,Fk=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,Bk=Object.prototype.hasOwnProperty,Vk=Object.prototype.propertyIsEnumerable,Xm=(t,e,n)=>e in t?jk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yk=(t,e)=>{for(var n in e||(e={}))Bk.call(e,n)&&Xm(t,n,e[n]);if(Ym)for(var n of Ym(e))Vk.call(e,n)&&Xm(t,n,e[n]);return t},Xk=(t,e)=>Wk(t,Fk(e));const Gm=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,Xk(Yk({},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:Gm,composites:["label"]});var Gk=Object.defineProperty,qk=Object.defineProperties,Uk=Object.getOwnPropertyDescriptors,qm=Object.getOwnPropertySymbols,Zk=Object.prototype.hasOwnProperty,Kk=Object.prototype.propertyIsEnumerable,Um=(t,e,n)=>e in t?Gk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qk=(t,e)=>{for(var n in e||(e={}))Zk.call(e,n)&&Um(t,n,e[n]);if(qm)for(var n of qm(e))Kk.call(e,n)&&Um(t,n,e[n]);return t},Jk=(t,e)=>qk(t,Uk(e));const Zm=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,Jk(Qk({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(Si,{horizontal:"center",vertical:"middle",children:[d(tL,{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]})]})}))},tL=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:Zm,composites:["label","desc","time"]});var eL=Object.defineProperty,nL=Object.defineProperties,rL=Object.getOwnPropertyDescriptors,Km=Object.getOwnPropertySymbols,iL=Object.prototype.hasOwnProperty,oL=Object.prototype.propertyIsEnumerable,Qm=(t,e,n)=>e in t?eL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sL=(t,e)=>{for(var n in e||(e={}))iL.call(e,n)&&Qm(t,n,e[n]);if(Km)for(var n of Km(e))oL.call(e,n)&&Qm(t,n,e[n]);return t},aL=(t,e)=>nL(t,rL(e));const Jm=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,aL(sL({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Np,{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:Jm,composites:["illus","label","desc"]});var lL=Object.defineProperty,cL=Object.defineProperties,hL=Object.getOwnPropertyDescriptors,t2=Object.getOwnPropertySymbols,dL=Object.prototype.hasOwnProperty,uL=Object.prototype.propertyIsEnumerable,e2=(t,e,n)=>e in t?lL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ah=(t,e)=>{for(var n in e||(e={}))dL.call(e,n)&&e2(t,n,e[n]);if(t2)for(var n of t2(e))uL.call(e,n)&&e2(t,n,e[n]);return t},lh=(t,e)=>cL(t,hL(e));const n2=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(sr,{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:n2,composites:["icon","label","desc"]});var fL=Object.defineProperty,pL=Object.defineProperties,gL=Object.getOwnPropertyDescriptors,r2=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,yL=Object.prototype.propertyIsEnumerable,i2=(t,e,n)=>e in t?fL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vL=(t,e)=>{for(var n in e||(e={}))mL.call(e,n)&&i2(t,n,e[n]);if(r2)for(var n of r2(e))yL.call(e,n)&&i2(t,n,e[n]);return t},xL=(t,e)=>pL(t,gL(e));const o2=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,xL(vL({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(Si,{horizontal:"center",vertical:"middle",children:[d(bL,{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]})]})]})}))},bL=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:o2,composites:["label","desc"]});var wL=Object.defineProperty,_L=Object.defineProperties,$L=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,PL=Object.prototype.hasOwnProperty,CL=Object.prototype.propertyIsEnumerable,a2=(t,e,n)=>e in t?wL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OL=(t,e)=>{for(var n in e||(e={}))PL.call(e,n)&&a2(t,n,e[n]);if(s2)for(var n of s2(e))CL.call(e,n)&&a2(t,n,e[n]);return t},ML=(t,e)=>_L(t,$L(e));const ch=80,hh=3,l2=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,ML(OL({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:l2,composites:["label","desc"]});var SL=Object.defineProperty,EL=Object.defineProperties,IL=Object.getOwnPropertyDescriptors,c2=Object.getOwnPropertySymbols,TL=Object.prototype.hasOwnProperty,AL=Object.prototype.propertyIsEnumerable,h2=(t,e,n)=>e in t?SL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kL=(t,e)=>{for(var n in e||(e={}))TL.call(e,n)&&h2(t,n,e[n]);if(c2)for(var n of c2(e))AL.call(e,n)&&h2(t,n,e[n]);return t},LL=(t,e)=>EL(t,IL(e));const d2=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(sr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(HL,{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,LL(kL({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(Si,{horizontal:"center",vertical:"middle",children:[d(zL,{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]})]})]})}))},zL=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"})},HL=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:d2,composites:["icon","label","desc"]});const dh=new Map;function kt(t,e){dh.set(t,e)}function u2(t){return dh.get(t)}function RL(){return Array.from(dh.keys())}const f2=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]=ir(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=Bi().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:f2,composites:["title","item","xTitle","yTitle"]});const p2=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]=ir(s),C=a?24:0,A=10,E=x&&a?C+A:A,S=v+P+_,R=b+w+$+E,O=Bi().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:p2,composites:["title","item"]});var DL=Object.defineProperty,NL=Object.defineProperties,jL=Object.getOwnPropertyDescriptors,g2=Object.getOwnPropertySymbols,WL=Object.prototype.hasOwnProperty,FL=Object.prototype.propertyIsEnumerable,m2=(t,e,n)=>e in t?DL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y2=(t,e)=>{for(var n in e||(e={}))WL.call(e,n)&&m2(t,n,e[n]);if(g2)for(var n of g2(e))FL.call(e,n)&&m2(t,n,e[n]);return t},BL=(t,e)=>NL(t,jL(e));const v2=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]=ir(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=et(d(n,y2({},_))),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=Bi().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,Qi=ne.y-(me.y-ae.y)/6;Ft.push(`C ${ye} ${We} ${Ye} ${Qi} ${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,BL(y2({},_),{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:v2,composites:["title","item","xTitle","yTitle"]});const x2=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=dk().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=Yi().innerRadius(s).outerRadius(b).cornerRadius(2),k=Yi().innerRadius(b).outerRadius(b),N=Yi().innerRadius(b*1.15).outerRadius(b*1.15),j=s+(b-s)*.5,X=Yi().innerRadius(j).outerRadius(j),z=Yi().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:x2,composites:["title","item"]});var VL=Object.defineProperty,YL=Object.defineProperties,XL=Object.getOwnPropertyDescriptors,b2=Object.getOwnPropertySymbols,GL=Object.prototype.hasOwnProperty,qL=Object.prototype.propertyIsEnumerable,w2=(t,e,n)=>e in t?VL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_2=(t,e)=>{for(var n in e||(e={}))GL.call(e,n)&&w2(t,n,e[n]);if(b2)for(var n of b2(e))qL.call(e,n)&&w2(t,n,e[n]);return t},$2=(t,e)=>YL(t,XL(e));const UL=[0,30,-30,60,-60],ZL=Math.PI*(3-Math.sqrt(5));function P2(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 KL(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 QL(t,e,n,r,i){const o=[],s=e?UL:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*ZL;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=P2(l.width,l.height,b),_=x-w.width/2,$=v-w.height/2;if(!KL(_,$,w.width,w.height,o,n)){p=$2(_2({},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=P2(l.width,l.height,g);p=$2(_2({},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 C2=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=QL(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:C2,composites:[]});const O2=new Map,uh=(t,e)=>{O2.set(t,e)},JL=t=>{var e;return t&&(e=O2.get(t))!=null?e:null};var tz=Object.defineProperty,ez=Object.defineProperties,nz=Object.getOwnPropertyDescriptors,M2=Object.getOwnPropertySymbols,rz=Object.prototype.hasOwnProperty,iz=Object.prototype.propertyIsEnumerable,S2=(t,e,n)=>e in t?tz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E2=(t,e)=>{for(var n in e||(e={}))rz.call(e,n)&&S2(t,n,e[n]);if(M2)for(var n of M2(e))iz.call(e,n)&&S2(t,n,e[n]);return t},I2=(t,e)=>ez(t,nz(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,I2(E2({x:40,y:15},l),{children:"Pros"})),d(Mt,I2(E2({x:70,y:85},l),{children:"Cons"}))]})});var oz=Object.defineProperty,sz=Object.defineProperties,az=Object.getOwnPropertyDescriptors,T2=Object.getOwnPropertySymbols,lz=Object.prototype.hasOwnProperty,cz=Object.prototype.propertyIsEnumerable,A2=(t,e,n)=>e in t?oz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k2=(t,e)=>{for(var n in e||(e={}))lz.call(e,n)&&A2(t,n,e[n]);if(T2)for(var n of T2(e))cz.call(e,n)&&A2(t,n,e[n]);return t},L2=(t,e)=>sz(t,az(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,L2(k2({x:153,y:77},l),{children:"PROS"})),d(Mt,L2(k2({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 z2=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]})),_=JL(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:z2,composites:["title","item"]});var hz=Object.defineProperty,H2=Object.getOwnPropertySymbols,dz=Object.prototype.hasOwnProperty,uz=Object.prototype.propertyIsEnumerable,R2=(t,e,n)=>e in t?hz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,D2=(t,e)=>{for(var n in e||(e={}))dz.call(e,n)&&R2(t,n,e[n]);if(H2)for(var n of H2(e))uz.call(e,n)&&R2(t,n,e[n]);return t};const fz={none:5,"dot-line":100,"arc-dot":20,"split-line":5},N2=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=fz[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(pz,D2({},B))):l==="dot-line"&&C.push(d(gz,D2({},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})]})]})},pz=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})`})]})},gz=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:N2,composites:["title","item"]});const j2=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=_g(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:j2,composites:["title","item"]});const fh=Object.assign,mz={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 Vs{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof Vs||"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({},mz,e);const r=new Vs(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 Vs(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class yz{constructor(e,n={}){this.options=n,this.rootNode=ph(e,n)}execute(){throw new Error("please override this method")}}function vz(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"],xz=["LR","RL","H"],bz=Nn[0];function wz(t,e,n){const r=e.direction||bz;if(e.isHorizontal=(o=>xz.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}=vz(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 W2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=W2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function F2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{F2(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 _z={getSubTreeSep:()=>0};function $z(t,e={}){return e=fh({},_z,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,W2(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}}}}),F2(t),t}class Pz extends yz{execute(){return wz(this.rootNode,this.options,$z)}}const Cz={};function Oz(t,e){const n=fh({},Cz,e);return new Pz(t,n).execute()}var Mz=Object.defineProperty,Sz=Object.defineProperties,Ez=Object.getOwnPropertyDescriptors,B2=Object.getOwnPropertySymbols,Iz=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,V2=(t,e,n)=>e in t?Mz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Az=(t,e)=>{for(var n in e||(e={}))Iz.call(e,n)&&V2(t,n,e[n]);if(B2)for(var n of B2(e))Tz.call(e,n)&&V2(t,n,e[n]);return t},kz=(t,e)=>Sz(t,Ez(e));const Lz=60,zz=14,Y2=30,X2="center",Hz="curved",Rz=2,Dz="node",Nz="solid",G2=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return kz(Az({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>G2(s,o,a)))!=null?i:[]})},q2=(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=>q2(a,e,n,t))},jz=(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}`},Wz=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,Fz=(t,e,n,r=X2)=>{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}},U2=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=Lz,nodeGap:a=zz,edgeAlign:l=X2,colorMode:c=Dz,edgeColorMode:h=Nz,edgeType:u=Hz,edgeWidth:f=Rz,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=G2(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,C=(H,B)=>Ti({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=ms(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=Oz(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=[];q2(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=Y2-T,D=Y2-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=ms(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}=Fz(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"?Wz(ct,nt,J,tt):jz(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:U2,composites:["title","item"]});const Br=(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}`},Vr=t=>t==null?"":String(t),Ys=(t,e,n)=>et(d(Mt,{fontSize:e,fontWeight:n,children:t})),Bz=(t,e,n,r=" ")=>{const i=Ys(r,e,n);let o=i.width,s=i.height;return t.forEach(a=>{const l=Ys(a||" ",e,n);o=Math.max(o,l.width),s=Math.max(s,l.height)}),{width:o,height:s}},Z2=(t,e,n,r)=>{const i=Bz(t,e,"normal","Item");return{pillWidth:i.width+n*2,pillHeight:i.height+r*2}},K2=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=Vr(Q.label),ct=Ys(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(Vr(he.label))})});const{pillWidth:wt,pillHeight:Rt}=Z2(pt,b,y,m),Vt=tt.map(Ht=>{const he=Vr(Ht.label),At=Ys(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=>Vr(pt.label)),{pillWidth:gt,pillHeight:ut}=Z2(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:Br(at,L),rowStroke:Br(at,D),groupFill:Br(at,k),groupStroke:Br(at,N),pillFill:Br(at,j),pillStroke:Br(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,Qi=At.columns*Ye+(At.columns-1)*a,Ut=(me-Qi)/2,Fe=Ht+f+Math.max(0,Ut),wr=Ft+f+At.titleHeight+w;At.children.forEach((Mn,Kr)=>{const Mj=[...ge,Kr],Sj=Math.floor(Kr/At.columns),Ej=Kr%At.columns,jv=Fe+Ej*(Ye+a),Wv=wr+Sj*(At.pillHeight+a),Fv=Math.min(P,At.pillHeight/2);O.push(d(Ct,{x:jv,y:Wv,width:Ye,height:At.pillHeight,fill:nt.pillFill,stroke:nt.pillStroke,rx:Fv,ry:Fv,"data-element-type":"shape"})),T.push(d(Mt,{x:jv,y:Wv,width:Ye,height:At.pillHeight,fontSize:b,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":Mj,children:Vr(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:Vr(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:K2,composites:["title"]});var Vz=Object.defineProperty,Yz=Object.defineProperties,Xz=Object.getOwnPropertyDescriptors,Q2=Object.getOwnPropertySymbols,Gz=Object.prototype.hasOwnProperty,qz=Object.prototype.propertyIsEnumerable,J2=(t,e,n)=>e in t?Vz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xs=(t,e)=>{for(var n in e||(e={}))Gz.call(e,n)&&J2(t,n,e[n]);if(Q2)for(var n of Q2(e))qz.call(e,n)&&J2(t,n,e[n]);return t},Gs=(t,e)=>Yz(t,Xz(e));const ty=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},ey=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]=Gs(Xs({},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}
|
|
93
|
-
L ${nt} ${pt-mt*
|
|
94
|
-
Q ${nt} ${pt} ${nt+
|
|
95
|
-
L ${tt-
|
|
96
|
-
Q ${tt} ${pt} ${tt} ${pt+mt*
|
|
92
|
+
`,I(V,Xk(Yk({},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:qm,composites:["icon","label","desc"]});var Gk=Object.defineProperty,qk=Object.defineProperties,Uk=Object.getOwnPropertyDescriptors,Um=Object.getOwnPropertySymbols,Zk=Object.prototype.hasOwnProperty,Kk=Object.prototype.propertyIsEnumerable,Zm=(t,e,n)=>e in t?Gk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qk=(t,e)=>{for(var n in e||(e={}))Zk.call(e,n)&&Zm(t,n,e[n]);if(Um)for(var n of Um(e))Kk.call(e,n)&&Zm(t,n,e[n]);return t},Jk=(t,e)=>qk(t,Uk(e));const Km=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,Jk(Qk({},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:Km,composites:["icon","label","desc"]});var tL=Object.defineProperty,eL=Object.defineProperties,nL=Object.getOwnPropertyDescriptors,Qm=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,iL=Object.prototype.propertyIsEnumerable,Jm=(t,e,n)=>e in t?tL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oL=(t,e)=>{for(var n in e||(e={}))rL.call(e,n)&&Jm(t,n,e[n]);if(Qm)for(var n of Qm(e))iL.call(e,n)&&Jm(t,n,e[n]);return t},sL=(t,e)=>eL(t,nL(e));const t2=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,sL(oL({},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:t2,composites:["label"]});var aL=Object.defineProperty,lL=Object.defineProperties,cL=Object.getOwnPropertyDescriptors,e2=Object.getOwnPropertySymbols,hL=Object.prototype.hasOwnProperty,dL=Object.prototype.propertyIsEnumerable,n2=(t,e,n)=>e in t?aL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uL=(t,e)=>{for(var n in e||(e={}))hL.call(e,n)&&n2(t,n,e[n]);if(e2)for(var n of e2(e))dL.call(e,n)&&n2(t,n,e[n]);return t},fL=(t,e)=>lL(t,cL(e));const r2=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,fL(uL({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(Ai,{horizontal:"center",vertical:"middle",children:[d(pL,{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]})]})}))},pL=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:r2,composites:["label","desc","time"]});var gL=Object.defineProperty,mL=Object.defineProperties,yL=Object.getOwnPropertyDescriptors,i2=Object.getOwnPropertySymbols,vL=Object.prototype.hasOwnProperty,xL=Object.prototype.propertyIsEnumerable,o2=(t,e,n)=>e in t?gL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bL=(t,e)=>{for(var n in e||(e={}))vL.call(e,n)&&o2(t,n,e[n]);if(i2)for(var n of i2(e))xL.call(e,n)&&o2(t,n,e[n]);return t},wL=(t,e)=>mL(t,yL(e));const s2=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,wL(bL({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Xp,{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:s2,composites:["illus","label","desc"]});var _L=Object.defineProperty,$L=Object.defineProperties,PL=Object.getOwnPropertyDescriptors,a2=Object.getOwnPropertySymbols,CL=Object.prototype.hasOwnProperty,OL=Object.prototype.propertyIsEnumerable,l2=(t,e,n)=>e in t?_L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dh=(t,e)=>{for(var n in e||(e={}))CL.call(e,n)&&l2(t,n,e[n]);if(a2)for(var n of a2(e))OL.call(e,n)&&l2(t,n,e[n]);return t},uh=(t,e)=>$L(t,PL(e));const c2=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(sr,{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,uh(dh({},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:A(),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,uh(dh({},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 T=et(C),E=Math.max(r-T.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,uh(dh({},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:A(),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:A(),lineNumber:R,fill:f.colorTextSecondary,children:y})]})]})}));function A(L,D){return"top"}function F(L){return L==="normal"?"flex-start":L==="flipped"?"flex-end":"center"}};Kt("simple",{component:c2,composites:["icon","label","desc"]});var ML=Object.defineProperty,SL=Object.defineProperties,EL=Object.getOwnPropertyDescriptors,h2=Object.getOwnPropertySymbols,IL=Object.prototype.hasOwnProperty,AL=Object.prototype.propertyIsEnumerable,d2=(t,e,n)=>e in t?ML(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TL=(t,e)=>{for(var n in e||(e={}))IL.call(e,n)&&d2(t,n,e[n]);if(h2)for(var n of h2(e))AL.call(e,n)&&d2(t,n,e[n]);return t},kL=(t,e)=>SL(t,EL(e));const u2=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,kL(TL({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(Ai,{horizontal:"center",vertical:"middle",children:[d(LL,{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]})]})]})}))},LL=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:u2,composites:["label","desc"]});var zL=Object.defineProperty,HL=Object.defineProperties,RL=Object.getOwnPropertyDescriptors,f2=Object.getOwnPropertySymbols,DL=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,p2=(t,e,n)=>e in t?zL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jL=(t,e)=>{for(var n in e||(e={}))DL.call(e,n)&&p2(t,n,e[n]);if(f2)for(var n of f2(e))NL.call(e,n)&&p2(t,n,e[n]);return t},WL=(t,e)=>HL(t,RL(e));const fh=80,ph=3,g2=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+ph+(e.desc?i*2+c.height:0),u=0,f=0,p=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-fh)/2:o==="flipped"?r-fh:0,y=f+l.height+i,m=0,x=y+ph+i*2;return I(V,WL(jL({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:fh,height:ph,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:g2,composites:["label","desc"]});var FL=Object.defineProperty,BL=Object.defineProperties,VL=Object.getOwnPropertyDescriptors,m2=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,XL=Object.prototype.propertyIsEnumerable,y2=(t,e,n)=>e in t?FL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,GL=(t,e)=>{for(var n in e||(e={}))YL.call(e,n)&&y2(t,n,e[n]);if(m2)for(var n of m2(e))XL.call(e,n)&&y2(t,n,e[n]);return t},qL=(t,e)=>BL(t,VL(e));const v2=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(sr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(ZL,{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,qL(GL({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(Ai,{horizontal:"center",vertical:"middle",children:[d(UL,{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]})]})]})}))},UL=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"})},ZL=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:v2,composites:["icon","label","desc"]});const gh=new Map;function kt(t,e){gh.set(t,e)}function x2(t){return gh.get(t)}function KL(){return Array.from(gh.keys())}const b2=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,T,E,S]=ir(p),R=(n=w[0])!=null?n:{label:"",value:0},O=et(d(o,{indexes:[0],datum:R,data:s})),A=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=Xi().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+A+f,at=g?80:0,ct=Math.max(8,L*.2),nt=Q+x+at+T,J=it+Y+ct+Z+K+E,tt=xe(y.themeConfig),st=tt.colorText||"#666",vt=ce(y),gt=[],ut=[],ot=[],ft=[],mt=[],wt=[],pt=[],_t=it+Y+ct,Rt=Dt=>Number.isInteger(Dt)?Dt.toString():Dt.toFixed(1);w.forEach((Dt,Ht)=>{var he;const Tt=[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=At(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:Tt,datum:Dt,data:s,x:S,y:ge+(L-F)/2,width:A,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);wt.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} ${_t} L${Ht-.5} ${_t+6}`,stroke:st,"data-element-type":"shape"})),mt.push(d(Mt,{x:Ht,y:_t+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:st,children:Rt(Dt)}))}),ft.push(d(yt,{d:`M${Q} ${_t} L${Q+x} ${_t}`,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+A/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:_t+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:wt}),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:b2,composites:["title","item","xTitle","yTitle"]});const w2=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]=ir(s),C=a?24:0,T=10,E=x&&a?C+T:T,S=v+P+_,R=b+w+$+E,O=Xi().domain([m[0],m[m.length-1]]).range([b,0]),A=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):A,U=Math.abs(O(M)-A),Y=At(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:w2,composites:["title","item"]});var QL=Object.defineProperty,JL=Object.defineProperties,tz=Object.getOwnPropertyDescriptors,_2=Object.getOwnPropertySymbols,ez=Object.prototype.hasOwnProperty,nz=Object.prototype.propertyIsEnumerable,$2=(t,e,n)=>e in t?QL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P2=(t,e)=>{for(var n in e||(e={}))ez.call(e,n)&&$2(t,n,e[n]);if(_2)for(var n of _2(e))nz.call(e,n)&&$2(t,n,e[n]);return t},rz=(t,e)=>JL(t,tz(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=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]=ir(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=et(d(n,P2({},_))),P=$.width,C=$.height,T=Math.max(28,C+14),E=44,S=y?26:0,R=g?22:0,O=P+s,A=p.length>0?(p.length-1)*O+P:0,F=i!==void 0?i:Math.max(200,A||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+T+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=Xi().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=[],wt=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,eo=ne.y-(me.y-ae.y)/6;Ft.push(`C ${ye} ${We} ${Ye} ${eo} ${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,rz(P2({},_),{indexes:[Ft],datum:xt,x:Nt-P/2,y:N+o+4})));const ne=At(c,[Ft])||Q.colorPrimary;mt.push({x:Nt,color:ne})});const pt=mt.length>0?Math.min(...mt.map(xt=>xt.x)):k,_t=mt.length>0?Math.max(...mt.map(xt=>xt.x)):k+D,Rt=Math.max(1,_t-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-${ff([D,o,at,it,mt.map(xt=>`${xt.x.toFixed(2)}-${xt.color}`).join()].join(":"))}`,Ht=`${Dt}-stroke`,he=`${Dt}-area`,Tt=wt(ft);J.push(d(yt,{d:Tt,width:D,height:o,stroke:`url(#${Ht})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const Lt=Tt.includes("C")?Tt.slice(Tt.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=At(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+T+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:C2,composites:["title","item","xTitle","yTitle"]});const O2=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+$,T=a+P,E=C*2,S=T*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:T-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),A=xe(c.themeConfig),L=Ck().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=qi().innerRadius(s).outerRadius(b).cornerRadius(2),k=qi().innerRadius(b).outerRadius(b),N=qi().innerRadius(b*1.15).outerRadius(b*1.15),j=s+(b-s)*.5,X=qi().innerRadius(j).outerRadius(j),z=qi().innerRadius(b*.85).outerRadius(b*.85),M=[],H=[],B=[],U=[],Y=[];return L.forEach(G=>{const Z=G.data,K=G.index,it=At(c,[K])||A.colorPrimary||O,Q=D(G)||"";M.push(d(yt,{d:Q,fill:it,stroke:A.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]} ${T+nt[1]} L${C+J[0]} ${T+J[1]} L${C+st[0]} ${T+st[1]}`,stroke:O,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const vt=C+st[0]+(ct?_:-_-x),gt=T+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),wt=50,pt=20;H.push(d(Mt,{x:C+ot[0]-wt/2,y:T+ot[1]-pt/2,width:wt,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:T+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:T+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:T,children:M}),d(V,{children:B}),d(V,{children:H}),d(St,{children:U}),d(Et,{children:Y})]})]})};kt("chart-pie",{component:O2,composites:["title","item"]});var iz=Object.defineProperty,oz=Object.defineProperties,sz=Object.getOwnPropertyDescriptors,M2=Object.getOwnPropertySymbols,az=Object.prototype.hasOwnProperty,lz=Object.prototype.propertyIsEnumerable,S2=(t,e,n)=>e in t?iz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E2=(t,e)=>{for(var n in e||(e={}))az.call(e,n)&&S2(t,n,e[n]);if(M2)for(var n of M2(e))lz.call(e,n)&&S2(t,n,e[n]);return t},I2=(t,e)=>oz(t,sz(e));const cz=[0,30,-30,60,-60],hz=Math.PI*(3-Math.sqrt(5));function A2(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 dz(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 uz(t,e,n,r,i){const o=[],s=e?cz:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*hz;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=A2(l.width,l.height,b),_=x-w.width/2,$=v-w.height/2;if(!dz(_,$,w.width,w.height,o,n)){p=I2(E2({},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=A2(l.width,l.height,g);p=I2(E2({},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 T2=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,A)=>({datum:O,index:A})).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 A=(O-p)/(g-p||1);return r+A*(i-r)},v=h.map(({datum:O,index:A})=>{const F=x(O.value),L=et(d(Mt,{fontSize:F,fontWeight:"bold",children:O.label})),D=At(n,[A])||ce(n);return{label:O.label,value:O.value,color:D,fontSize:F,width:L.width*1.05,height:L.height}}).sort((O,A)=>A.fontSize-O.fontSize),b=uz(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,T=-_+s,E=$-w+s*2,S=P-_+s*2,R=b.map((O,A)=>{const F=O.centerX-O.width/2+C,L=O.centerY-O.height/2+T,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":A,"data-element-type":zt.ItemLabel,children:O.label})})});return d(St,{id:"infographic-container",width:E,height:S,children:R})};kt("chart-wordcloud",{component:T2,composites:[]});const k2=new Map,mh=(t,e)=>{k2.set(t,e)},fz=t=>{var e;return t&&(e=k2.get(t))!=null?e:null};var pz=Object.defineProperty,gz=Object.defineProperties,mz=Object.getOwnPropertyDescriptors,L2=Object.getOwnPropertySymbols,yz=Object.prototype.hasOwnProperty,vz=Object.prototype.propertyIsEnumerable,z2=(t,e,n)=>e in t?pz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,H2=(t,e)=>{for(var n in e||(e={}))yz.call(e,n)&&z2(t,n,e[n]);if(L2)for(var n of L2(e))vz.call(e,n)&&z2(t,n,e[n]);return t},R2=(t,e)=>gz(t,mz(e));mh("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,R2(H2({x:40,y:15},l),{children:"Pros"})),d(Mt,R2(H2({x:70,y:85},l),{children:"Cons"}))]})});var xz=Object.defineProperty,bz=Object.defineProperties,wz=Object.getOwnPropertyDescriptors,D2=Object.getOwnPropertySymbols,_z=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,N2=(t,e,n)=>e in t?xz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j2=(t,e)=>{for(var n in e||(e={}))_z.call(e,n)&&N2(t,n,e[n]);if(D2)for(var n of D2(e))$z.call(e,n)&&N2(t,n,e[n]);return t},W2=(t,e)=>bz(t,wz(e));mh("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,W2(j2({x:153,y:77},l),{children:"PROS"})),d(Mt,W2(j2({x:2,y:193},l),{children:"CONS"}))]})}),mh("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(Ec,{})]}),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 F2=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]})),_=fz(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=[],T=[],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,A=w.width+R,F=A+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:A,y:X,positionH:D,positionV:"middle"})),C.push(d(Xt,{indexes:z,x:A-w.width-R,y:X+(b.height-w.height)/2})),j<m.length-1&&C.push(d(q,{indexes:[0,j+1],x:A+(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:A+(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:A+(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:A+(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})),_&&T.push(d(_,{x:F,y:O+(S-$.height)/2,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:At(c,[0])||v.colorPrimary,colorNegative:At(c,[1])||v.colorPrimary})),I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(V,{children:[d(V,{children:T}),d(St,{children:P}),d(Et,{children:C})]})]})};kt("compare-binary-horizontal",{component:F2,composites:["title","item"]});var Pz=Object.defineProperty,B2=Object.getOwnPropertySymbols,Cz=Object.prototype.hasOwnProperty,Oz=Object.prototype.propertyIsEnumerable,V2=(t,e,n)=>e in t?Pz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y2=(t,e)=>{for(var n in e||(e={}))Cz.call(e,n)&&V2(t,n,e[n]);if(B2)for(var n of B2(e))Oz.call(e,n)&&V2(t,n,e[n]);return t};const Mz={none:5,"dot-line":100,"arc-dot":20,"split-line":5},X2=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=[],[T,E]=x,S=(T==null?void 0:T.children)||[],R=(E==null?void 0:E.children)||[],O=Math.max(_.height,S.length*($.height+s)-s,R.length*($.height+s)-s),A=Mz[l]||0,F=$.width+A,L=F+_.width+a,D=(O-_.height)/2;T&&P.push(d(p,{indexes:[0],x:F,y:D,data:o,datum:T,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=At(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(Sz,Y2({},B))):l==="dot-line"&&C.push(d(Ez,Y2({},B)))};if(c){const j=(2*_.width+a+$.width)/2+A,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+A;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})]})]})},Sz=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(Ic,{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})`})]})},Ez=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(Ic,{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:X2,composites:["title","item"]});const G2=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=Eg(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:$})),T=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:A=[]}=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-T.width-10,y:D+10})),O===0&&_.push(d(q,{indexes:[O],x:L+P.width/2-T.width/2,y:D-T.height-5}));const k=D+P.height+a;A.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-T.width-10,y:z+(C.height-T.height)/2})),X<A.length-1&&_.push(d(q,{indexes:[O,X+1],x:M+C.width/2-T.width/2,y:z+C.height-T.height/2}))});const N=L+c;if(A.length>0){const j=k+A.length*(C.height+a);_.push(d(q,{indexes:[O,A.length],x:N+C.width/2-T.width/2,y:j-C.height/2-T.height/2}))}else _.push(d(q,{indexes:[O,0],x:N+C.width/2-T.width/2,y:k-a/2-T.height/2}))}),x.length>0){const R=x.length*(l+s);_.push(d(q,{indexes:[x.length],x:R-s/2-T.width/2,y:-T.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:G2,composites:["title","item"]});const yh=Object.assign,Iz={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 qs{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof qs||"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 vh(t,e={},n){e=yh({},Iz,e);const r=new qs(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 qs(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class Az{constructor(e,n={}){this.options=n,this.rootNode=vh(e,n)}execute(){throw new Error("please override this method")}}function Tz(t,e){const n=vh(t.data,e,!0),r=vh(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"],kz=["LR","RL","H"],Lz=Nn[0];function zz(t,e,n){const r=e.direction||Lz;if(e.isHorizontal=(o=>kz.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}=Tz(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 q2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=q2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function U2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{U2(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 Hz={getSubTreeSep:()=>0};function Rz(t,e={}){return e=yh({},Hz,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,q2(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}}}}),U2(t),t}class Dz extends Az{execute(){return zz(this.rootNode,this.options,Rz)}}const Nz={};function jz(t,e){const n=yh({},Nz,e);return new Dz(t,n).execute()}var Wz=Object.defineProperty,Fz=Object.defineProperties,Bz=Object.getOwnPropertyDescriptors,Z2=Object.getOwnPropertySymbols,Vz=Object.prototype.hasOwnProperty,Yz=Object.prototype.propertyIsEnumerable,K2=(t,e,n)=>e in t?Wz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xz=(t,e)=>{for(var n in e||(e={}))Vz.call(e,n)&&K2(t,n,e[n]);if(Z2)for(var n of Z2(e))Yz.call(e,n)&&K2(t,n,e[n]);return t},Gz=(t,e)=>Fz(t,Bz(e));const qz=60,Uz=14,Q2=30,J2="center",Zz="curved",Kz=2,Qz="node",Jz="solid",ty=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return Gz(Xz({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>ty(s,o,a)))!=null?i:[]})},ey=(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=>ey(a,e,n,t))},tH=(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}`},eH=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,nH=(t,e,n,r=J2)=>{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}},ny=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=qz,nodeGap:a=Uz,edgeAlign:l=J2,colorMode:c=Qz,edgeColorMode:h=Jz,edgeType:u=Zz,edgeWidth:f=Kz,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=ty(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,C=(H,B)=>Li({depth:B,originalIndexes:H._indexes,flatIndex:H._flatIndex},c),T=(H,B)=>{const U=P.get(H);if(U)return U;const Y=C(H,B),G=At(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=bs(i,U),G=et(d(Y,{indexes:H._indexes,data:o,datum:H,positionH:"center",positionV:"middle",themeColors:T(H,U)}));return _.set(H,G),G},S=jz(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=[];ey(S,R,O);const A=R.length>0?Math.min(...R.map(H=>H.x)):0,F=R.length>0?Math.min(...R.map(H=>H.y)):0,L=Q2-A,D=Q2-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=bs(i,H.depth),Q=H.depth===0?"center":H.side==="left"?"flipped":"normal",at=T(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}=nH(Q,it,K.side,l),st=(B=$.get(at))!=null?B:At(p,C(at,K.depth)),vt=(U=$.get(Z.data))!=null?U:At(p,C(Z.data,Z.depth)),gt=u==="straight"?eH(ct,nt,J,tt):tH(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,wt=it.y+it.height+8,pt=wt+b.height+6;K.depth>0&&X.push(d(Xt,{indexes:at._indexes,x:mt,y:wt})),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:ny,composites:["title","item"]});const Yr=(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}`},Xr=t=>t==null?"":String(t),Us=(t,e,n)=>et(d(Mt,{fontSize:e,fontWeight:n,children:t})),rH=(t,e,n,r=" ")=>{const i=Us(r,e,n);let o=i.width,s=i.height;return t.forEach(a=>{const l=Us(a||" ",e,n);o=Math.max(o,l.width),s=Math.max(s,l.height)}),{width:o,height:s}},ry=(t,e,n,r)=>{const i=rH(t,e,"normal","Item");return{pillWidth:i.width+n*2,pillHeight:i.height+r*2}},iy=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:T,items:E=[]}=n,S=e?d(e,{title:C,desc:T}):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=[],A=[],F=h==="right",L=.12,D=.55,k=.08,N=.4,j=.06,X=.35,z=E.map(Q=>{const at=Xr(Q.label),ct=Us(at||" ",x,"bold"),nt=ct.width+p*2,J=ct.height+g*2,tt=Q.children||[];if(tt.some(pt=>{var _t;return(((_t=pt.children)==null?void 0:_t.length)||0)>0})){const pt=[];tt.forEach(Ht=>{(Ht.children||[]).forEach(he=>{pt.push(Xr(he.label))})});const{pillWidth:_t,pillHeight:Rt}=ry(pt,b,y,m),Vt=tt.map(Ht=>{const he=Xr(Ht.label),Tt=Us(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*_t+(ge-1)*a:0,Ot=xt>0?xt*Rt+(xt-1)*a:0,ae=Math.max(Tt.width,Ft)+f*2,ne=f*2+Tt.height+(xt>0?w+Ot:0);return{label:he,children:Lt,width:ae,height:ne,titleHeight:Tt.height,columns:ge,contentWidth:Ft,pillWidth:_t,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=>Xr(pt.label)),{pillWidth:gt,pillHeight:ut}=ry(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,wt=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:wt}}),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=At(r,[Q])||R.colorPrimary||"#6c7dff";return{rowFill:Yr(at,L),rowStroke:Yr(at,D),groupFill:Yr(at,k),groupStroke:Yr(at,N),pillFill:Yr(at,j),pillStroke:Yr(at,X)}},U=(Q,at,ct,nt,J,tt,st,vt,gt,ut,ot,ft,mt,wt)=>{O.push(d(Ct,{x:ct,y:st,width:J,height:vt,fill:mt,stroke:wt,rx:_,ry:_,"data-element-type":"shape"})),O.push(d(Ct,{x:gt,y:ut,width:ot,height:ft,fill:mt,stroke:wt,rx:_,ry:_,"data-element-type":"shape"})),A.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,wt=Q.contentInnerWidth+(J.length>0?ot:0)+u*2,pt=ut+u*2,_t=Math.max(gt,pt),Rt=F?0:vt+o,Vt=F?Rt+wt+o:0,ee=ct+(_t-gt)/2,Dt=ct+(_t-pt)/2;U(tt,st,Vt,ee,vt,gt,ct,_t,Rt,Dt,wt,pt,nt.rowFill,nt.rowStroke);let Ht=Rt+u;return J.forEach((Tt,Lt)=>{const ge=[...st,Lt],xt=Tt.width+ft,Ft=Dt+u+(ut-Tt.height)/2;O.push(d(Ct,{x:Ht,y:Ft,width:xt,height:Tt.height,fill:nt.groupFill,stroke:nt.groupStroke,rx:$,ry:$,"data-element-type":"shape"}));const Ot=Tt.children.length>0,Nt=Ot?Ft+f:Ft,ae=Ot?Tt.titleHeight:Tt.height,ne=Ot?"top":"middle";if(A.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:Tt.label})),Tt.columns>0){const me=xt-f*2,ye=me-Tt.contentWidth,We=ye>0?ye/Tt.columns:0,Ye=Tt.pillWidth+We,eo=Tt.columns*Ye+(Tt.columns-1)*a,Ut=(me-eo)/2,Fe=Ht+f+Math.max(0,Ut),wr=Ft+f+Tt.titleHeight+w;Tt.children.forEach((Mn,Jr)=>{const nW=[...ge,Jr],rW=Math.floor(Jr/Tt.columns),iW=Jr%Tt.columns,Uv=Fe+iW*(Ye+a),Zv=wr+rW*(Tt.pillHeight+a),Kv=Math.min(P,Tt.pillHeight/2);O.push(d(Ct,{x:Uv,y:Zv,width:Ye,height:Tt.pillHeight,fill:nt.pillFill,stroke:nt.pillStroke,rx:Kv,ry:Kv,"data-element-type":"shape"})),A.push(d(Mt,{x:Uv,y:Zv,width:Ye,height:Tt.pillHeight,fontSize:b,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":nW,children:Xr(Mn.label)}))})}Ht+=xt+s}),{rowWidth:F?Vt+vt:Rt+wt,rowHeight:_t}},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,wt=ot>0?ut/ot:0,pt=ft+wt,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,Tt=ct+(ee-Vt)/2;if(U(J,tt,Ht,he,st,vt,ct,ee,Dt,Tt,Rt,Vt,nt.rowFill,nt.rowStroke),ot>0){const ge=Dt+u,xt=Tt+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"})),A.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:Xr(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:A})]})]})};kt("hierarchy-structure",{component:iy,composites:["title"]});var iH=Object.defineProperty,oH=Object.defineProperties,sH=Object.getOwnPropertyDescriptors,oy=Object.getOwnPropertySymbols,aH=Object.prototype.hasOwnProperty,lH=Object.prototype.propertyIsEnumerable,sy=(t,e,n)=>e in t?iH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zs=(t,e)=>{for(var n in e||(e={}))aH.call(e,n)&&sy(t,n,e[n]);if(oy)for(var n of oy(e))lH.call(e,n)&&sy(t,n,e[n]);return t},Ks=(t,e)=>oH(t,sH(e));const ay=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},ly=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),T=nt=>{var J;const tt=[...nt];return(J=tt[0])!=null&&J.children||(tt[0]=Ks(Zs({},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),wt=ft===0?1:Math.sign(ft),pt=ut?J+ot/2:nt+ot/2,_t=Math.min(vt,Math.abs(ot)/2,Math.abs(ft)/2);return _t===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}
|
|
93
|
+
L ${nt} ${pt-mt*_t}
|
|
94
|
+
Q ${nt} ${pt} ${nt+wt*_t} ${pt}
|
|
95
|
+
L ${tt-wt*_t} ${pt}
|
|
96
|
+
Q ${tt} ${pt} ${tt} ${pt+mt*_t}
|
|
97
97
|
L ${tt} ${st}`:`M ${nt} ${J}
|
|
98
|
-
L ${pt-mt*
|
|
99
|
-
Q ${pt} ${J} ${pt} ${J+
|
|
100
|
-
L ${pt} ${st-
|
|
101
|
-
Q ${pt} ${st} ${pt+mt*
|
|
102
|
-
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 Gs(Xs({},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):Gs(Xs({},tt),{_originalIndex:[0],_depth:0,children:nt.slice(1).map((vt,gt)=>Gs(Xs({},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=ms(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=ms(n,ut),pt=J.get(ut),wt=R(nt,pt,st),Rt=wt.left,Vt=wt.top,ee={items:[],btns:[],deco:[]},Dt=Ti({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=ty(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=ty(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=Ti({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Fe=Ti({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),wr=Tt(b,Ut),Mn=Tt(b,Fe),Kr=`gradient-${ft.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(I("linearGradient",{id:Kr,x1:Ot,y1:Nt,x2:me,y2:ye,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:wr}),d("stop",{offset:"100%",stopColor:Mn})]})),Ye=`url(#${Kr})`}const Qi=c==="dashed"?h:"";if(ee.deco.push(d(yt,{d:We,stroke:Ye,strokeWidth:l,strokeDasharray:Qi,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=Ti({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 wr=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:wr}))}}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=jA().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:ey,composites:["title","item"]});const ny=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:ny,composites:["title","item"]});const ry=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:ry,composites:["title","item"]});const iy=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:iy,composites:["title","item"]});const oy=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:oy,composites:["title","item"]});var Uz=Object.defineProperty,sy=Object.getOwnPropertySymbols,Zz=Object.prototype.hasOwnProperty,Kz=Object.prototype.propertyIsEnumerable,ay=(t,e,n)=>e in t?Uz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qz=(t,e)=>{for(var n in e||(e={}))Zz.call(e,n)&&ay(t,n,e[n]);if(sy)for(var n of sy(e))Kz.call(e,n)&&ay(t,n,e[n]);return t};const ly=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=`
|
|
98
|
+
L ${pt-mt*_t} ${J}
|
|
99
|
+
Q ${pt} ${J} ${pt} ${J+wt*_t}
|
|
100
|
+
L ${pt} ${st-wt*_t}
|
|
101
|
+
Q ${pt} ${st} ${pt+mt*_t} ${st}
|
|
102
|
+
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 Ks(Zs({},vt),{_originalIndex:mt,_depth:mt.length-1,children:(ft=(ot=vt.children)==null?void 0:ot.map((wt,pt)=>st(wt,mt,pt)))!=null?ft:[]})};return(J=tt.children)!=null&&J.length?st(tt):Ks(Zs({},tt),{_originalIndex:[0],_depth:0,children:nt.slice(1).map((vt,gt)=>Ks(Zs({},vt),{_originalIndex:[gt+1],_depth:1}))})},A=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=bs(n,ot),mt=(J=ut.get(ot))!=null?J:{},wt=(tt=mt._originalIndex)!=null?tt:Array(ot+1).fill(0),pt=et(d(ft,{indexes:wt,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,wt=bs(n,ut),pt=J.get(ut),_t=R(nt,pt,st),Rt=_t.left,Vt=_t.top,ee={items:[],btns:[],deco:[]},Dt=Li({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),Ht=At(b,Dt),he=xe({colorPrimary:Ht},b);if(ee.items.push(d(wt,{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 Tt=J.get(ft.depth),Lt=R(ft,Tt,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=ay(g,Tt.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=ay(g,Tt.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?_t.left:_t.right)-f*_:_t.centerX,ne=w?_t.centerY:(_>0?_t.top:_t.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=Li({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Fe=Li({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),wr=At(b,Ut),Mn=At(b,Fe),Jr=`gradient-${ft.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(I("linearGradient",{id:Jr,x1:Ot,y1:Nt,x2:me,y2:ye,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:wr}),d("stop",{offset:"100%",stopColor:Mn})]})),Ye=`url(#${Jr})`}const eo=c==="dashed"?h:"";if(ee.deco.push(d(yt,{d:We,stroke:Ye,strokeWidth:l,strokeDasharray:eo,fill:"none"})),y==="arrow"){const Ut=a==="gradient"?At(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=Li({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Fe=a==="gradient"?At(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 wr=a==="gradient"?At(b,Dt):ce(b);ee.deco.push(d(Wt,{x:ae-m,y:ne-m,width:m*2,height:m*2,fill:wr}))}}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]),wt=ut[ot].data._originalIndex.slice(0,-1),pt=ut[ot].data._originalIndex.at(-1)+1;if(w){const _t=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:[...wt,pt],x:_t,y:Rt}))}else{const _t=ft.y+tt.y-J.height-5,Rt=(ft.x+mt.x)/2+tt.x-J.width/2;vt.push(d(q,{indexes:[...wt,pt],x:Rt,y:_t}))}}}),vt},D=T(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=sh(j),{levelBounds:z,maxWidth:M,maxHeight:H}=A(X),U=tk().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:ly,composites:["title","item"]});const cy=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:cy,composites:["title","item"]});const hy=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:hy,composites:["title","item"]});const dy=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,T=w-C/2;for(let E=0;E<_&&x<l.length;E++){const S=T+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:dy,composites:["title","item"]});const uy=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:uy,composites:["title","item"]});var cH=Object.defineProperty,fy=Object.getOwnPropertySymbols,hH=Object.prototype.hasOwnProperty,dH=Object.prototype.propertyIsEnumerable,py=(t,e,n)=>e in t?cH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uH=(t,e)=>{for(var n in e||(e={}))hH.call(e,n)&&py(t,n,e[n]);if(fy)for(var n of fy(e))dH.call(e,n)&&py(t,n,e[n]);return t};const gy=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,A)=>{var F;const L=[A],D=o+($+a)*A,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=`
|
|
103
103
|
M ${U} ${Y}
|
|
104
104
|
A ${r} ${r} 0 ${ct} 1 ${G} ${Z}
|
|
105
105
|
L ${Q} ${at}
|
|
106
106
|
A ${i} ${i} 0 ${ct} 0 ${K} ${it}
|
|
107
107
|
Z
|
|
108
|
-
`.trim(),J=
|
|
108
|
+
`.trim(),J=At(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),wt=et(d(e,{indexes:[0],data:n,datum:h[0],positionH:"center",width:ft,height:mt})),pt=m+vt*Math.cos(st)-wt.width/2,_t=x+vt*Math.sin(st)-wt.height/2;g.push(d(e,{indexes:L,datum:O,data:n,x:pt,y:_t,positionH:"center",width:ft,height:mt,themeColors:uH({},xe({colorBg:At(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||A<h.length-1){const Ht=(k+a/2)*Math.PI/180,he=vt,Tt=m+he*Math.cos(Ht)-f.width/2,Lt=x+he*Math.sin(Ht)-f.height/2;p.push(d(q,{indexes:[A+1],x:Tt,y:Lt}))}}),h.length>0){const A=(o-a/2)*Math.PI/180,F=(r+i)/2,L=m+F*Math.cos(A)-f.width/2,D=x+F*Math.sin(A)-f.height/2;p.push(d(q,{indexes:[0],x:L,y:D}))}const P=i*.9;let C=m,T=x,E=P*1.4,S=P*1.4;if(!b){const A=(o+s)/2*Math.PI/180,F=P*.5;C=m+F*Math.cos(A),T=x+F*Math.sin(A);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,A=s*Math.PI/180,F=m+P*Math.cos(O),L=x+P*Math.sin(O),D=m+P*Math.cos(A),k=x+P*Math.sin(A),N=v>180?1:0;R=`
|
|
109
109
|
M ${m} ${x}
|
|
110
110
|
L ${F} ${L}
|
|
111
111
|
A ${P} ${P} 0 ${N} 1 ${D} ${k}
|
|
112
112
|
Z
|
|
113
|
-
`.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:ly,composites:["title","item"]});const cy=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:cy,composites:["title","item"]});const Jz=6,gh=700,hy=330,dy=333,tH={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"}]},eH={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"}]},uy=(t,e,n)=>{const r=e[t];return r?r.map(i=>({x:i.x*gh,y:i.y*n,anchor:i.anchor})):null},nH=(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}},fy=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,Jz),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=uy(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=uy(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}=nH(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})]})]})}},rH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(V,{width:gh,height:hy,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})]})},iH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(V,{width:gh,height:dy,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})]})},py=fy({arrowHeight:hy,presetRatios:tH,Arrow:rH}),gy=fy({arrowHeight:dy,presetRatios:eH,Arrow:iH});kt("list-zigzag-down",{component:py,composites:["title","item"]}),kt("list-zigzag-up",{component:gy,composites:["title","item"]});const yh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},my=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=sH(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=oH(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 oH(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 sH(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:my,composites:["title","item"]});const yy=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:yy,composites:["title","item"]});const vy=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=nA(P).force("link",qT(C).id(E=>E.id).distance(i)).force("charge",rA().strength(-50)).force("center",MT(0,0)).force("collision",XT().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:vy,composites:["title","item"]});var aH=Object.defineProperty,lH=Object.defineProperties,cH=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,xy=Object.prototype.hasOwnProperty,by=Object.prototype.propertyIsEnumerable,wy=(t,e,n)=>e in t?aH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hH=(t,e)=>{for(var n in e||(e={}))xy.call(e,n)&&wy(t,n,e[n]);if(qs)for(var n of qs(e))by.call(e,n)&&wy(t,n,e[n]);return t},dH=(t,e)=>lH(t,cH(e)),uH=(t,e)=>{var n={};for(var r in t)xy.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&&by.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=uH(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,dH(hH({},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"})]})]})]})},fH=({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 pH=Object.defineProperty,gH=Object.defineProperties,mH=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,_y=Object.prototype.hasOwnProperty,$y=Object.prototype.propertyIsEnumerable,Py=(t,e,n)=>e in t?pH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yH=(t,e)=>{for(var n in e||(e={}))_y.call(e,n)&&Py(t,n,e[n]);if(Us)for(var n of Us(e))$y.call(e,n)&&Py(t,n,e[n]);return t},vH=(t,e)=>gH(t,mH(e)),xH=(t,e)=>{var n={};for(var r in t)_y.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&&$y.call(t,r)&&(n[r]=t[r]);return n};const bH=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=xH(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,vH(yH({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},wH=-118,Cy=118,Oy=240,_H=180,$H=40,PH="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",CH="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",OH="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",My=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"})]}),Sy=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=Oy}=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:My}),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/Oy,y=_H*g;return l.forEach((m,x)=>{const v=[x],b=Tt(i,v),w=x*(o+wH),_=(l.length-1-x)*Cy,$=`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:PH,fill:`url(#${$})`}),d(yt,{d:CH,fill:`url(#${P})`}),d(yt,{d:OH,fill:`url(#${C})`})]}),d(fH,{text:x+1,x:115,y:65,fontSize:56})]}));const A=w+o+$H,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))*Cy,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:My}),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:Sy,composites:["title","item"]});const Ey=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:Ey,composites:["title","item"]});const MH=20,Iy=5,Ty=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+MH,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=Iy*2+s,ct=Math.min(Iy,(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=lk().x(Vt=>Math.max(0,Vt.x)).y(Vt=>Math.max(0,Vt.y)).curve(Am)([{x:nt,y:J},{x:tt,y:st}])||"",ot=`fork-arrow-${Y.replace(/[^a-zA-Z0-9]/g,"")}-${L}`,ft=`
|
|
113
|
+
`.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:T-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:gy,composites:["title","item"]});const my=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:my,composites:["title","item"]});const fH=6,xh=700,yy=330,vy=333,pH={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"}]},gH={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"}]},xy=(t,e,n)=>{const r=e[t];return r?r.map(i=>({x:i.x*xh,y:i.y*n,anchor:i.anchor})):null},mH=(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}},bh=(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}},by=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,fH),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=xy(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=[],T=xy(y,e,n);if(!T)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=T,S=E.length>1?bh(E[0],E[E.length-1]):{x:1,y:0},R=E.length>1?bh(E[0],E[1]):S,O=E.length>1?bh(E[E.length-2],E[E.length-1]):S,A=Math.max($.width,$.height)*.45+u,F=L=>{const{x:D,y:k,centerY:N}=mH(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*A-_.width/2,k=L.y-R.y*A-_.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*A-_.width/2,X=N.y+O.y*A-_.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})]})]})}},yH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(V,{width:xh,height:yy,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})]})},vH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(V,{width:xh,height:vy,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})]})},wy=by({arrowHeight:yy,presetRatios:pH,Arrow:yH}),_y=by({arrowHeight:vy,presetRatios:gH,Arrow:vH});kt("list-zigzag-down",{component:wy,composites:["title","item"]}),kt("list-zigzag-up",{component:_y,composites:["title","item"]});const wh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},$y=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+wh.defaultExtraSpacing,y=o!=null?o:p.height+wh.defaultExtraSpacing,m=bH(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=xH(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 xH(t,e,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:s,dashArray:a}=wh,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 bH(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:$y,composites:["title","item"]});const Py=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,T=w+C/2;w+=C;const E=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:E,y:S}));const R=y-Math.max(u.width,u.height)/2-20,O=m+R*Math.cos(T)-h.width/2,A=m+R*Math.sin(T)-h.height/2;f.push(d(Xt,{indexes:[P],x:O,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,C=($+1)%l.length*2*Math.PI/l.length-Math.PI/2;let T;if($===l.length-1){const R=C+2*Math.PI-P;T=P+R/2}else T=(P+C)/2;const E=m+_*Math.cos(T)-h.width/2,S=m+_*Math.sin(T)-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:Py,composites:["title","item"]});const Cy=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})),T=mT(P).force("link",lT(C).id(E=>E.id).distance(i)).force("charge",yT().strength(-50)).force("center",WA(0,0)).force("collision",sT().radius(Math.max(u.width,u.height)/2+10));for(let E=0;E<300;++E)T.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,T=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:T,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),T=typeof P.target=="object"?P.target:_.get(P.target);if(!C||!T||C.x==null||C.y==null||T.x==null||T.y==null)return null;const E=`M ${C.x+x} ${C.y+v} L ${T.x+x} ${T.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:Cy,composites:["title","item"]});var wH=Object.defineProperty,_H=Object.defineProperties,$H=Object.getOwnPropertyDescriptors,Qs=Object.getOwnPropertySymbols,Oy=Object.prototype.hasOwnProperty,My=Object.prototype.propertyIsEnumerable,Sy=(t,e,n)=>e in t?wH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PH=(t,e)=>{for(var n in e||(e={}))Oy.call(e,n)&&Sy(t,n,e[n]);if(Qs)for(var n of Qs(e))My.call(e,n)&&Sy(t,n,e[n]);return t},CH=(t,e)=>_H(t,$H(e)),OH=(t,e)=>{var n={};for(var r in t)Oy.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&&My.call(t,r)&&(n[r]=t[r]);return n};const _h=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=e,s=OH(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,CH(PH({},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"})]})]})]})},MH=({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 SH=Object.defineProperty,EH=Object.defineProperties,IH=Object.getOwnPropertyDescriptors,Js=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ay=(t,e,n)=>e in t?SH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AH=(t,e)=>{for(var n in e||(e={}))Ey.call(e,n)&&Ay(t,n,e[n]);if(Js)for(var n of Js(e))Iy.call(e,n)&&Ay(t,n,e[n]);return t},TH=(t,e)=>EH(t,IH(e)),kH=(t,e)=>{var n={};for(var r in t)Ey.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Js)for(var r of Js(t))e.indexOf(r)<0&&Iy.call(t,r)&&(n[r]=t[r]);return n};const LH=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=kH(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,TH(AH({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},zH=-118,Ty=118,ky=240,HH=180,RH=40,DH="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",NH="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",jH="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",Ly=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"})]}),zy=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=ky}=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:Ly}),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/ky,y=HH*g;return l.forEach((m,x)=>{const v=[x],b=At(i,v),w=x*(o+zH),_=(l.length-1-x)*Ty,$=`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:DH,fill:`url(#${$})`}),d(yt,{d:NH,fill:`url(#${P})`}),d(yt,{d:jH,fill:`url(#${C})`})]}),d(MH,{text:x+1,x:115,y:65,fontSize:56})]}));const T=w+o+RH,E=_+y/2;if(f.push(d(n,{indexes:v,datum:m,data:r,x:T,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))*Ty,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:Ly}),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:zy,composites:["title","item"]});const Hy=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:Hy,composites:["title","item"]});const WH=20,Ry=5,Dy=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+WH,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),T=Math.max(0,-w),E=e?d(e,{title:l,desc:c}):null,S=[],R=[],O=[],A=[],F=v.map(L=>({x:L.x+C,y:L.y+T}));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=At(i,j)||f,G=k.x-D.x,Z=k.y-D.y,K=X,it=G/K,Q=Z/K,at=Ry*2+s,ct=Math.min(Ry,(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=_k().x(Vt=>Math.max(0,Vt.x)).y(Vt=>Math.max(0,Vt.y)).curve(Nm)([{x:nt,y:J},{x:tt,y:st}])||"",ot=`fork-arrow-${Y.replace(/[^a-zA-Z0-9]/g,"")}-${L}`,ft=`
|
|
114
114
|
M ${-s*.6} ${-s*.4}
|
|
115
115
|
L 0 0
|
|
116
116
|
L ${-s*.6} ${s*.4}
|
|
117
|
-
`;
|
|
117
|
+
`;A.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,wt=H+T,pt=xe({colorPrimary:Y},i);O.push(d(Wt,{x:Math.max(0,mt-z/2),y:Math.max(0,wt-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,wt-B/2),width:B,height:B,fill:"#ffffff"})),O.push(d(Ce,{x:Math.max(0,mt-U/2),y:Math.max(0,wt-U/2),size:U,indexes:j,fill:Y}));const _t=Math.max(0,mt-u.width/2),Rt=Math.max(0,wt-u.height/2);S.push(d(q,{indexes:[N],x:_t,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+T);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:A}),d(V,{children:O}),d(St,{children:R}),d(Et,{children:S})]})]})};kt("sequence-circle-arrows",{component:Dy,composites:["title","item"]});const FH=100,BH=50,VH=6,YH="40",Ny=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+FH,o+BH),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=VH,A=(s+o)/2,F=O/A*(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=At(i,z),G=Y+YH,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,wt=x+ft*Math.sin(gt)-v.height/2;b.push(d(Xt,{indexes:z,x:mt,y:wt}));const _t=(M+E+l/2)*Math.PI/180,{x:Rt,y:Vt}=R({centerX:m,outerRadius:o,angleRad:_t,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:Ny,composites:["title","item"]});const jy=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,T=P%2===1,S=(T?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 A=Math.floor(($+1)/s);if(P===A)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;T?(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=At(l,O),M=At(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=T?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,$=At(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:jy,composites:["title","item"]});const ta=(t,e)=>t===0?0:t===1?e/2:e/2+(t-1)*(e/2*3),ea=(t,e,n)=>{if(t)return 0;const o=e===0?2:n;return n*2+o},XH=(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 A=0;A<t;A++){const F=A%2===0,L=Math.floor(A/2),D=ta(L,n),N=0+ea(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}},GH=(t,e,n,r,i,o,s)=>{const a=t%2===0,l=Math.floor(t/2),c=ta(l,e),h=ea(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}},qH=(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}},UH=(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},ZH=(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:`
|
|
118
118
|
M ${i-n} ${o}
|
|
119
119
|
A ${n} ${r} 0 0 0 ${i} ${o+r}
|
|
120
120
|
A ${n} ${r} 0 0 0 ${i+n} ${o}
|
|
@@ -122,7 +122,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
122
122
|
A ${n} ${r} 0 0 1 ${i} ${s+r}
|
|
123
123
|
A ${n} ${r} 0 0 1 ${i-n} ${s}
|
|
124
124
|
Z
|
|
125
|
-
`,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},
|
|
125
|
+
`,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},KH=(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},QH=(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=ta($,e),C=ea(_,$,e),T=n+C+P,E=r-w*i;o.push({x:T,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=`
|
|
126
126
|
M ${h} ${f}
|
|
127
127
|
L ${u} ${f}
|
|
128
128
|
L ${g} ${y}
|
|
@@ -140,12 +140,12 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
140
140
|
L ${u} ${f+l}
|
|
141
141
|
L ${h} ${f+l}
|
|
142
142
|
Z
|
|
143
|
-
`;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})]})},Ly=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),$=AH(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(...zH(M,H));const B=kH(M,o,a,l,_,P,E),U=HH(M,B,o,s),{itemPos:Y,lineStartX:G,lineEndX:Z,lineY:K}=LH(M,B,x,o,C,A,h,u,w),it=RH(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=DH(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=Zs(M,o),B=Ks(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:Ly,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 NH(t,e,n){return(t+e*7+n*13)%100}function jH(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function WH(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 zy({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=un.SIZE/2,{cols:l,rows:c}=jH(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=NH(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:$}=WH(b,w,m,x,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function FH(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 BH(){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 Hy(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 VH(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:BH(),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:Hy(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 YH(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=zy({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:Hy(i,e)})]})}const Ry=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),$=FH(v,l.length),P=zy({count:$,rectX:Gt.RECT_X,rectY:Gt.RECT_Y,rectWidth:Gt.RECT_WIDTH,rectHeight:Gt.RECT_HEIGHT,seed:v*100});f.push(VH(v,b,_,P,o)),v===l.length-1&&f.push(YH(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:Ry,composites:["title","item"]});const Dy=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:Dy,composites:["title","item"]});var XH=Object.defineProperty,GH=Object.defineProperties,qH=Object.getOwnPropertyDescriptors,Ny=Object.getOwnPropertySymbols,UH=Object.prototype.hasOwnProperty,ZH=Object.prototype.propertyIsEnumerable,jy=(t,e,n)=>e in t?XH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qs=(t,e)=>{for(var n in e||(e={}))UH.call(e,n)&&jy(t,n,e[n]);if(Ny)for(var n of Ny(e))ZH.call(e,n)&&jy(t,n,e[n]);return t},Js=(t,e)=>GH(t,qH(e));function KH(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,Js(Qs({},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 QH(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 JH(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,Js(Qs({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function tR(t){return t.type==="single"?d(le,Js(Qs({},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,Js(Qs({},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 Wy=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(KH,{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(JH,{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:QH(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(tR,{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:Wy,composites:["title","item"]});const ta=t=>Math.round(t*1e10)/1e10,xh=(t,e)=>ta(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),ea=Math.PI,eR=ea*2,nR=(t,e)=>{const n=e-t;return n>ea&&n<eR||n<0&&n>-ea?-1:1},rR=(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=nR(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},bh=Math.PI,iR=(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)},[]),oR=(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=rR(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===ea&&(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=na(i);for(;s;)sR(s),s=na(i);for(s=na(r);s;)aR(s,e),s=na(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:ta(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:ta(l.offset),arc:{radius:ta(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),wh(t)},aR=(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)},na=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),Fy=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}=lR(w,$,i,u.length,A),L=oR(O,p),D=iR(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 lR(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:Fy,composites:["title","item"]});const Gi={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},By=(t,e)=>`M ${t} ${e}`,oe=(t,e)=>`L ${t} ${e}`,Yr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,cR=(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 hR({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=Gi,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+Gi.spacing:n.x1-Gi.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(sr,{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 dR({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(bH,{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 Vy=t=>{const{Title:e,Item:n,data:r,spacing:i=Gi.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}=Gi,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=cR(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?By(P,M.y1+m):oe(_,M.y1+m),oe(w,M.y1+m),Yr(p-m,0,w,M.y4+m)),E.push(X?By(...Y):oe(...Y),oe(...G),Yr(p,0,...Z)),S.push(oe(...K),oe(...it),Yr(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),Yr(p-m,1,_,M.y4+m)),E.push(oe(...Y),oe(...G),Yr(x,1,...Z)),S.push(oe(...K),oe(...it),Yr(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))}}dR({direction:j,x:{x1:b,x6:P},y:M,color:N,elements:F});const{icon:H,label:B,item:U}=hR({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:Vy,composites:["title","item"]});const Yy=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:Yy,composites:["title","item"]});const Xy=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:Xy,composites:["title","item"]});const Gy=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:Gy,composites:["title","item"]});const qy=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=_g(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:qy,composites:["title","item"]});const _h=120,$h=108,ra=30,uR="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",fR="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",pR="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",Uy=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
|
|
143
|
+
`;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})]})},Wy=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),$=XH(y.length,x,o,a,l,c,f,w),{startY:P,leftItemAlignedX:C,rightItemAlignedX:T,cylinderAreaStartX:E}=$,S=[],R=[];y.forEach((z,M)=>{const H=At(i,[M])||b;S.push(...UH(M,H));const B=GH(M,o,a,l,_,P,E),U=ZH(M,B,o,s),{itemPos:Y,lineStartX:G,lineEndX:Z,lineY:K}=qH(M,B,x,o,C,T,h,u,w),it=KH(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,A=1/0,F=-1/0,L=-1/0;R.forEach(z=>{const{itemX:M,itemY:H}=z;O=Math.min(O,M),A=Math.min(A,H),F=Math.max(F,M+x.width),L=Math.max(L,H+x.height)});const D=F-O,k=L-A,N=[d(jt,{children:S})],j=[],X=QH(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=ta(M,o),B=ea(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:Wy,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 JH(t,e,n){return(t+e*7+n*13)%100}function tR(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function eR(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 Fy({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=un.SIZE/2,{cols:l,rows:c}=tR(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=JH(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:$}=eR(b,w,m,x,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function nR(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 rR(){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=At(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 iR(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:rR(),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:By(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 oR(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=Fy({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:By(i,e)})]})}const Vy=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],_=At(o,w),$=nR(v,l.length),P=Fy({count:$,rectX:Gt.RECT_X,rectY:Gt.RECT_Y,rectWidth:Gt.RECT_WIDTH,rectHeight:Gt.RECT_HEIGHT,seed:v*100});f.push(iR(v,b,_,P,o)),v===l.length-1&&f.push(oR(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:Vy,composites:["title","item"]});const Yy=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,T)=>{const E=T%2===0,S=T*(v+i);let R;E?T%4===2?R=$:R=$+P:R=$+P+60;const O=[T],A=At(s,O)||u;if(E){const k=A===u?f.colorPrimaryBg||"#E8F3FF":`${A}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===T;x.push(d(Wt,{x:N,y:D,width:w,height:w,fill:j?A:"transparent",stroke:A,strokeWidth:2}))}y.push(d(Xt,{indexes:O,x:S+(v-p.width)/2,y:R+b+10})),T===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,A=R+b/2;C.push(`M ${O} ${A-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=At(s,[0])||u,H=At(s,[c.length-1])||u,B=c.map((U,Y)=>{const G=Y/(c.length-1)*100,Z=At(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:A,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:A-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 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 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:Yy,composites:["title","item"]});var sR=Object.defineProperty,aR=Object.defineProperties,lR=Object.getOwnPropertyDescriptors,Xy=Object.getOwnPropertySymbols,cR=Object.prototype.hasOwnProperty,hR=Object.prototype.propertyIsEnumerable,Gy=(t,e,n)=>e in t?sR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,na=(t,e)=>{for(var n in e||(e={}))cR.call(e,n)&&Gy(t,n,e[n]);if(Xy)for(var n of Xy(e))hR.call(e,n)&&Gy(t,n,e[n]);return t},ra=(t,e)=>aR(t,lR(e));function dR(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},A={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:A,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,ra(na({},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 uR(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 fR(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,ra(na({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function pR(t){return t.type==="single"?d(le,ra(na({},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,ra(na({},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 qy=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,T=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=T;P.push(U),T+=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,A=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=At(c,[X])||b.colorPrimary;m.push(d(dR,{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+A.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(fR,{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,wt=K+it*.85-vt;ut=mt+(wt-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:uR(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(pR,{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:qy,composites:["title","item"]});const ia=t=>Math.round(t*1e10)/1e10,$h=(t,e)=>ia(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),oa=Math.PI,gR=oa*2,mR=(t,e)=>{const n=e-t;return n>oa&&n<gR||n<0&&n>-oa?-1:1},yR=(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=mR(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},Ph=Math.PI,vR=(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*Ph/2,g=(f*Ph+l-a)%Ph,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)},[]),xR=(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=$h(h,l),p=$h(h,u),g=$h(l,u),y=yR(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===oa&&(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,Ch(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=sa(i);for(;s;)bR(s),s=sa(i);for(s=sa(r);s;)wR(s,e),s=sa(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:ia(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:ia(l.offset),arc:{radius:ia(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},bR=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),Ch(t)},wR=(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}Ch(t)},Ch=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)},sa=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),Uy=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,T)=>{const E=[T],S=T===0,R=At(l,[T])||g.colorPrimary,{points:O,topWidth:A,bottomWidth:F}=_R(w,$,i,u.length,T),L=xR(O,p),D=vR(L,"AMOUNT",10),k=w/2,N=T*($+i),j=($-a)/2,X=N+j,z=k+A/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-${T}`;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 _R(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:Uy,composites:["title","item"]});const Zi={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},Zy=(t,e)=>`M ${t} ${e}`,oe=(t,e)=>`L ${t} ${e}`,Gr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,$R=(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 PR({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=Zi,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+Zi.spacing:n.x1-Zi.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(sr,{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 CR({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(LH,{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 Ky=t=>{const{Title:e,Item:n,data:r,spacing:i=Zi.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}=Zi,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,T=[],E=[],S=[],R=[],O=[],A=[],F=[];for(let k=0;k<c.length;k++){const N=At(o,[k])||y,j=k%2===0?"right":"left",X=k===0,z=k===c.length-1,M=$R(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(T.push(X?Zy(P,M.y1+m):oe(_,M.y1+m),oe(w,M.y1+m),Gr(p-m,0,w,M.y4+m)),E.push(X?Zy(...Y):oe(...Y),oe(...G),Gr(p,0,...Z)),S.push(oe(...K),oe(...it),Gr(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)),T.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(T.push(oe(_,M.y1+m),Gr(p-m,1,_,M.y4+m)),E.push(oe(...Y),oe(...G),Gr(x,1,...Z)),S.push(oe(...K),oe(...it),Gr(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)),T.push(oe(C,M.y4+m))}}CR({direction:j,x:{x1:b,x6:P},y:M,color:N,elements:F});const{icon:H,label:B,item:U}=PR({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),A.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:T.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),I(Bt,{children:[R,O,A,F]})]})]})};kt("sequence-roadmap-vertical",{component:Ky,composites:["title","item"]});const Qy=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),A=(_+1)%o,D=(O%2===1?o-1-A:A)*(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(_h,{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(_h,{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,T=(_%2===1?o-1-$:$)*(g.width+i),E=_*(g.height+s);y.push(d(q,{indexes:[h.length],x:T+(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:Qy,composites:["title","item"]});const Jy=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,T=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=[],A=h.length-1;R[A]=P,O[A]=0;for(let J=A-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,T-m-tt)}),j=[],X=[],z=[],M=[],H=[],B=0,U=(R[0]||P)+(E[0]||w),Y=U-B,G=35,K=(k[A]||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[A]+E[A]/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,wt=ft+ot/2,pt=At(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 _t=ut+vt,Rt=wt,Vt=N[tt],ee=_t+Vt;M.push(d(yt,{d:`M ${_t} ${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=wt-y.height/2;X.push(d(n,{indexes:st,datum:J,data:r,x:T,y:Dt,positionV:"middle"})),z.push(d(Xt,{indexes:st,x:T+y.width+10,y:Dt+y.height/2-g.height/2})),tt===0?z.push(d(q,{indexes:[0],x:T+(y.width-g.width)/2,y:Dt-g.height-12})):z.push(d(q,{indexes:st,x:T+(y.width-g.width)/2,y:(at+wt)/2-g.height/2})),at=wt});const nt=at-y.height/2;return z.push(d(q,{indexes:[h.length],x:T+(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:Jy,composites:["title","item"]});const t3=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(_h,{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:t3,composites:["title","item"]});const e3=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=Eg(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",T=$-_,E=l.map((S,R)=>{const A=(R*(p.height+i)+p.height/2-_)/T*100,F=At(o,[R]);return d("stop",{offset:`${A}%`,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,T=[$];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:T,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:T,x:b-f.width-10,y:P+(p.height-f.height)/2})),$===0?g.push(d(q,{indexes:T,x:b+(p.width-f.width)/2,y:P-f.height-10})):g.push(d(q,{indexes:T,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:e3,composites:["title","item"]});const Oh=120,Mh=108,aa=30,OR="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",MR="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",SR="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",n3=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
|
|
144
144
|
0 0 0 0 0
|
|
145
145
|
0 0 0 0 0
|
|
146
|
-
0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),Zy=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:Uy}),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+ra+a;return h.forEach((w,_)=>{const $=[_],P=Tt(i,$),C=_%2===0,A=_*(s+o),E=C?0:p.height+ra,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:uR,fill:P||f}),d(yt,{d:fR,fill:`url(#${S})`}),d(yt,{d:pR,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+ra:E-ra-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:Uy}),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:Zy,composites:["title","item"]});const gR=240,mR=130,yR=105,gr=12,vR=120,Ky=50,xR=.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",Qy="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",Jy=70+gr/2,t3=40+gr/2,e3=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),n3=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=gR,dy:a=mR,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:e3}),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-Jy,j=k-t3;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-Jy),M=Math.max(0,j-t3),H=10,B=Ky+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:vR,height:Ky,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:xR}),d(yt,{d:bR,fill:X||p}),d(yt,{d:Qy,fill:"#fff"}),d(yt,{d:Qy,fill:U||U})]})),F.icon){const Z=Math.max(0,N-l/2-gr/2),K=Math.max(0,j-l/2-gr/2);w.push(d(Ce,{x:Z,y:K,size:l,indexes:D,fill:X}))}const Y=N-g.width/2-gr/2,G=Math.max(0,j+yR-gr/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:gr,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:e3}),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:n3,composites:["title","item"]});class jn{init(e){Object.assign(this,e)}}class r3{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 _R(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function mr(t,e,n){return new DOMPoint(e,n).matrixTransform(_R(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=>mr(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 i3(t,e){if(e.length===0)return t.data;const n=di(t,e);return n.children||(n.children=[]),n.children}function $R(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function o3(t){var e,n;return((n=(e=PR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function PR(t){return zn(t)?Eo(t):t}function ia(t){if(!t)return null;const e=[CR];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return s3(n)}function s3(t){if(!t)return null;const e=[OR,MR];for(const n of e){const r=n(t);if(r)return r}return K6(t)||xn(t)||zn(t)?t:null}const CR=t=>{var e;const n=r=>r?J6(r)||tw(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},OR=t=>ew(t)&&nf(t.parentElement)?t.parentElement:null,MR=t=>{const e=t.parentElement;return ef(e)?e:bl(t)?t:null};class a3{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 SR=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"},ER=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},IR=(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 TR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!SR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>IR(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=>ER(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 AR=(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="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,()=>AR(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=mr(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=mr(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=mr(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=s3(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?ia(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 kR=(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 c3 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 r3(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>kR(this,null,function*(){const s=ia(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 h3=(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 LR{constructor(e){this.commands=e}apply(e){return h3(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return h3(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 zR=Object.defineProperty,HR=Object.defineProperties,RR=Object.getOwnPropertyDescriptors,d3=Object.getOwnPropertySymbols,DR=Object.prototype.hasOwnProperty,NR=Object.prototype.propertyIsEnumerable,u3=(t,e,n)=>e in t?zR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qi=(t,e)=>{for(var n in e||(e={}))DR.call(e,n)&&u3(t,n,e[n]);if(d3)for(var n of d3(e))NR.call(e,n)&&u3(t,n,e[n]);return t},f3=(t,e)=>HR(t,RR(e)),p3=(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=jR(e,n);this.original=WR(i,r)}apply(e){return p3(this,null,function*(){g3(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return p3(this,null,function*(){this.original&&(g3(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 g3(t,e){xn(t)?tf(t,e):zn(t)?Rw(t,void 0,e.attributes):e.attributes&&Qt(t,e.attributes)}function jR(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=f3(qi({},e),{attributes:r});if(xn(t)){const{attributes:s}=xl(t);i(s)}else if(zn(t)){if(!Eo(t))return;i(Ml(t))}return o}function WR(t,e){if(!t)return e;if(!e)return t;const n=qi(qi({},t.attributes||{}),e.attributes||{});return f3(qi(qi({},t),e),{attributes:Object.keys(n).length?n:void 0})}var FR=Object.defineProperty,m3=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,VR=Object.prototype.propertyIsEnumerable,y3=(t,e,n)=>e in t?FR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v3=(t,e)=>{for(var n in e||(e={}))BR.call(e,n)&&y3(t,n,e[n]);if(m3)for(var n of m3(e))VR.call(e,n)&&y3(t,n,e[n]);return t},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 YR{constructor(e,n){this.options=e,this.original=n}apply(e){return x3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(v3(v3({},n),this.options))})}undo(e){return x3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var b3=(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 XR{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:yl(e),this.modifiedText=n}apply(e){return b3(this,null,function*(){this.originalText!==this.modifiedText&&(vl(this.element,this.modifiedText),w3(e,this.element,this.modifiedText))})}undo(e){return b3(this,null,function*(){this.originalText!==this.modifiedText&&(vl(this.element,this.originalText),w3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function w3(t,e,n){const r=wl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=o3(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var GR=(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="dblclick-edit-text"}init(e){super.init(e);const{editor:n,commander:r,interaction:i}=e;this.clickHandler=new r3(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>GR(this,null,function*(){const s=ia(o.target);if(s&&xn(s)){i.select([s],"replace");const a=yl(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);UR(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new XR(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 qR="infographic-inline-text-editor-style",oa="infographic-inline-text-editor";function UR(t,e){const n=Jn(t);n&&(KR(),new ZR(n,e).start())}class ZR{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(`
|
|
147
|
-
`))},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(
|
|
148
|
-
.${
|
|
146
|
+
0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),r3=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=80}=t,s=Oh,a=Mh,{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:n3}),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+aa+a;return h.forEach((w,_)=>{const $=[_],P=At(i,$),C=_%2===0,T=_*(s+o),E=C?0:p.height+aa,S=`puck-gradient-middle-${_}`,R=`puck-gradient-bottom-${_}`;x.push(I(V,{x:T,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:Oh,height:Mh,children:[d(yt,{d:OR,fill:P||f}),d(yt,{d:MR,fill:`url(#${S})`}),d(yt,{d:SR,fill:`url(#${R})`}),d("rect",{fill:"transparent",y:Mh,width:Oh,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=T+(s-p.width)/2,A=C?E+a+aa:E-aa-p.height;if(v=Math.max(v,A+p.height),m.push(d(n,{indexes:$,datum:w,data:r,x:O,y:A,positionH:"center"})),y.push(d(Xt,{indexes:$,x:O+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:E+a/2-g.height/2})),_<h.length-1){const L=(_+1)%2===0?0:b,D=T+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:T+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:n3}),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:r3,composites:["title","item"]});const ER=240,IR=130,AR=105,gr=12,TR=120,i3=50,kR=.6,LR="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",o3="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",s3=70+gr/2,a3=40+gr/2,l3=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),c3=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=ER,dy:a=IR,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:l3}),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,T=-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-s3,j=k-a3;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),A=Math.max(0,-S);if(_=0,$=0,u.forEach((F,L)=>{const D=[L],k=R[L],N=k.x+O,j=k.y+A,X=At(o,D),z=Math.max(0,N-s3),M=Math.max(0,j-a3),H=10,B=i3+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:TR,height:i3,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:kR}),d(yt,{d:LR,fill:X||p}),d(yt,{d:o3,fill:"#fff"}),d(yt,{d:o3,fill:U||U})]})),F.icon){const Z=Math.max(0,N-l/2-gr/2),K=Math.max(0,j-l/2-gr/2);w.push(d(Ce,{x:Z,y:K,size:l,indexes:D,fill:X}))}const Y=N-g.width/2-gr/2,G=Math.max(0,j+AR-gr/2);if(T=Math.max(T,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+A,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:gr,fill:"none",width:F,height:T-Math.min(C+A,0)}))}return I(dt,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:l3}),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:c3,composites:["title","item"]});class jn{init(e){Object.assign(this,e)}}class h3{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 zR(t){return t.getScreenCTM()||new DOMMatrix}function HR(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function mr(t,e,n){return new DOMPoint(e,n).matrixTransform(HR(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=>mr(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 d3(t,e){if(e.length===0)return t.data;const n=fi(t,e);return n.children||(n.children=[]),n.children}function RR(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function u3(t){var e,n;return((n=(e=DR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function DR(t){return zn(t)?ko(t):t}function la(t){if(!t)return null;const e=[NR];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return f3(n)}function f3(t){if(!t)return null;const e=[jR,WR];for(const n of e){const r=n(t);if(r)return r}return s6(t)||xn(t)||zn(t)?t:null}const NR=t=>{var e;const n=r=>r?l6(r)||c6(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},jR=t=>h6(t)&&lf(t.parentElement)?t.parentElement:null,WR=t=>{const e=t.parentElement;return af(e)?e:Pl(t)?t:null};class p3{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 FR=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"},BR=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},VR=(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 YR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!FR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>VR(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=>BR(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 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())});class g3 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,()=>XR(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=mr(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=mr(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=mr(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(bt("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=f3(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?la(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 GR=(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 m3 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 h3(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>GR(this,null,function*(){const s=la(o.target);cf(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 y3=(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 qR{constructor(e){this.commands=e}apply(e){return y3(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return y3(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 UR=Object.defineProperty,ZR=Object.defineProperties,KR=Object.getOwnPropertyDescriptors,v3=Object.getOwnPropertySymbols,QR=Object.prototype.hasOwnProperty,JR=Object.prototype.propertyIsEnumerable,x3=(t,e,n)=>e in t?UR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ki=(t,e)=>{for(var n in e||(e={}))QR.call(e,n)&&x3(t,n,e[n]);if(v3)for(var n of v3(e))JR.call(e,n)&&x3(t,n,e[n]);return t},b3=(t,e)=>ZR(t,KR(e)),w3=(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=tD(e,n);this.original=eD(i,r)}apply(e){return w3(this,null,function*(){_3(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return w3(this,null,function*(){this.original&&(_3(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 _3(t,e){xn(t)?sf(t,e):zn(t)?U6(t,void 0,e.attributes):e.attributes&&Qt(t,e.attributes)}function tD(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=b3(Ki({},e),{attributes:r});if(xn(t)){const{attributes:s}=$l(t);i(s)}else if(zn(t)){if(!ko(t))return;i(Al(t))}return o}function eD(t,e){if(!t)return e;if(!e)return t;const n=Ki(Ki({},t.attributes||{}),e.attributes||{});return b3(Ki(Ki({},t),e),{attributes:Object.keys(n).length?n:void 0})}var nD=Object.defineProperty,$3=Object.getOwnPropertySymbols,rD=Object.prototype.hasOwnProperty,iD=Object.prototype.propertyIsEnumerable,P3=(t,e,n)=>e in t?nD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C3=(t,e)=>{for(var n in e||(e={}))rD.call(e,n)&&P3(t,n,e[n]);if($3)for(var n of $3(e))iD.call(e,n)&&P3(t,n,e[n]);return t},O3=(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 oD{constructor(e,n){this.options=e,this.original=n}apply(e){return O3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(C3(C3({},n),this.options))})}undo(e){return O3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var M3=(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 sD{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:wl(e),this.modifiedText=n}apply(e){return M3(this,null,function*(){this.originalText!==this.modifiedText&&(_l(this.element,this.modifiedText),S3(e,this.element,this.modifiedText))})}undo(e){return M3(this,null,function*(){this.originalText!==this.modifiedText&&(_l(this.element,this.originalText),S3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function S3(t,e,n){const r=Cl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=u3(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var aD=(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 E3 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 h3(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>aD(this,null,function*(){const s=la(o.target);if(s&&xn(s)){i.select([s],"replace");const a=wl(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);cD(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new sD(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 lD="infographic-inline-text-editor-style",ca="infographic-inline-text-editor";function cD(t,e){const n=Jn(t);n&&(dD(),new hD(n,e).start())}class hD{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(`
|
|
147
|
+
`))},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(ca),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(ca),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 dD(){ln(lD,`
|
|
148
|
+
.${ca} {
|
|
149
149
|
margin: 0;
|
|
150
150
|
padding: 0;
|
|
151
151
|
box-sizing: border-box;
|
|
@@ -153,11 +153,11 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
153
153
|
outline: none;
|
|
154
154
|
cursor: text;
|
|
155
155
|
}
|
|
156
|
-
.${
|
|
156
|
+
.${ca}::selection {
|
|
157
157
|
background-color: #b3d4fc;
|
|
158
158
|
}
|
|
159
|
-
`)}var QR=(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=ia(e.target);if(!n||rf(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=mr(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=mr(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=mr(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,()=>QR(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 Hr(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 P3=(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 C3 extends jn{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=e=>P3(this,null,function*(){e.preventDefault(),yield this.commander.undo()}),this.handleRedo=e=>P3(this,null,function*(){e.preventDefault(),yield this.commander.redo()})}init(e){super.init(e),this.hotkey=new TR({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 JR=Object.defineProperty,tD=Object.defineProperties,eD=Object.getOwnPropertyDescriptors,O3=Object.getOwnPropertySymbols,nD=Object.prototype.hasOwnProperty,rD=Object.prototype.propertyIsEnumerable,M3=(t,e,n)=>e in t?JR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iD=(t,e)=>{for(var n in e||(e={}))nD.call(e,n)&&M3(t,n,e[n]);if(O3)for(var n of O3(e))rD.call(e,n)&&M3(t,n,e[n]);return t},oD=(t,e)=>tD(t,eD(e));class S3 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=Hr(e.map(o=>fn(this.editor.getDocument(),o))),i=oD(iD({},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 E3=1,sD=-5e3,aD=5e3;class I3 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=ir(o),l=this.editor.getDocument().getBBox(),c=s.map(x=>l8((x===0?1:x)*r,sD,aD)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=E3||y<=E3)return;const m=new YR({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 yr=({icon:t,onClick:e,activate:n=!1})=>{cD();const r=document.createElement("button");r.type="button",r.classList.add(Ui),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})},Ui="infographic-edit-bar-icon-btn",lD="infographic-edit-bar-icon-btn-style";function cD(){ln(lD,`
|
|
160
|
-
.${
|
|
159
|
+
`)}var uD=(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 I3 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=la(e.target);if(!n||cf(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=mr(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=mr(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=mr(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,()=>uD(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 Dr(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(bt("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 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 T3 extends jn{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 YR({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 fD=Object.defineProperty,pD=Object.defineProperties,gD=Object.getOwnPropertyDescriptors,k3=Object.getOwnPropertySymbols,mD=Object.prototype.hasOwnProperty,yD=Object.prototype.propertyIsEnumerable,L3=(t,e,n)=>e in t?fD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vD=(t,e)=>{for(var n in e||(e={}))mD.call(e,n)&&L3(t,n,e[n]);if(k3)for(var n of k3(e))yD.call(e,n)&&L3(t,n,e[n]);return t},xD=(t,e)=>pD(t,gD(e));class z3 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(bt("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=Dr(e.map(o=>fn(this.editor.getDocument(),o))),i=xD(vD({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?Qt(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement(bt("rect",i))}clearMasks(){var e;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(e=this.combinedBoundsMask)==null||e.remove(),this.combinedBoundsMask=void 0}}const H3=1,bD=-5e3,wD=5e3;class R3 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=ir(o),l=this.editor.getDocument().getBBox(),c=s.map(x=>_8((x===0?1:x)*r,bD,wD)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=H3||y<=H3)return;const m=new oD({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 Sh{init(e){Object.assign(this,e)}}const yr=({icon:t,onClick:e,activate:n=!1})=>{$D();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",_D="infographic-edit-bar-icon-btn-style";function $D(){ln(_D,`
|
|
160
|
+
.${Qi} {
|
|
161
161
|
padding: 0;
|
|
162
162
|
display: flex;
|
|
163
163
|
align-items: center;
|
|
@@ -172,28 +172,28 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
172
172
|
cursor: pointer;
|
|
173
173
|
transition: color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
|
|
174
174
|
}
|
|
175
|
-
.${
|
|
175
|
+
.${Qi}:hover {
|
|
176
176
|
background-color: #f5f5f5;
|
|
177
177
|
}
|
|
178
|
-
.${
|
|
178
|
+
.${Qi}:active {
|
|
179
179
|
background-color: #d9d9d9;
|
|
180
180
|
}
|
|
181
|
-
.${
|
|
181
|
+
.${Qi}[data-activate="true"] {
|
|
182
182
|
background-color: #d9d9d9;
|
|
183
183
|
}
|
|
184
|
-
`)}const gn="infographic-color-picker",
|
|
184
|
+
`)}const gn="infographic-color-picker",D3=`${gn}__swatches`,ha=`${gn}__swatch`,N3=`${gn}__controls`,da=`${gn}__input`,j3=`${gn}__format`,vr=`${gn}__format-switch`,Eh=`${gn}__format-switch-knob`,ua=`${gn}__format-switch-label`,PD="infographic-color-picker-style",CD="#1f1f1f",OD=["#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 W3(t){var e,n,r;if(typeof document=="undefined")throw new Error("ColorPicker can only be used in the browser.");ID();const i=document.createElement("div");i.classList.add(gn);const o=document.createElement("div");o.classList.add(D3),i.appendChild(o);const s=document.createElement("div");s.classList.add(N3),i.appendChild(s);const a=document.createElement("input");a.type="text",a.spellcheck=!1,a.classList.add(da),s.appendChild(a);const l=document.createElement("div");l.classList.add(j3),s.appendChild(l);const c=document.createElement("button");c.type="button",c.classList.add(vr),c.appendChild(Y3("HEXA"));const h=document.createElement("span");h.classList.add(Eh),c.appendChild(h),c.appendChild(Y3("RGBA")),l.appendChild(c);let u="hexa",f=(n=(e=Ji(t.value))!=null?e:Ji(CD))!=null?n:{r:31,g:31,b:31,a:1};const p=[];return((r=t.swatches)!=null&&r.length?t.swatches:OD).forEach($=>{const P=Ji($);if(!P)return;const C=document.createElement("button");C.type="button",C.classList.add(ha),C.style.setProperty("--swatch-color",fa(P,"rgba")),C.dataset.colorKey=B3(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=Ji($);if(!P){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v(P,!1)},destroy:()=>{i.remove()}});function m(){const $=Ji(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,fa(f,u)))}function v($,P=!0){var C;if(SD(f,$)){b();return}f=$,b(),P&&((C=t.onChange)==null||C.call(t,fa(f,u)))}function b(){a.value=fa(f,u),w(),_()}function w(){const $=B3(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 Ji(t){var e;if(!t)return;const n=on(t);if(!n||typeof n.r!="number")return;const r=n;return{r:Ih(r.r),g:Ih(r.g),b:Ih(r.b),a:V3((e=r.alpha)!=null?e:1)}}function fa(t,e){return e==="rgba"?MD(t):F3(t)}function F3(t){const e=pa(t.r),n=pa(t.g),r=pa(t.b),i=t.a<1?pa(Math.round(t.a*255)):"";return`#${e}${n}${r}${i}`}function MD(t){const e=ED(t.a);return`rgba(${t.r}, ${t.g}, ${t.b}, ${e})`}function B3(t){return F3(t).toLowerCase()}function SD(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function V3(t){return Number.isNaN(t)?0:Math.min(1,Math.max(0,t))}function Ih(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 pa(t){return t.toString(16).padStart(2,"0")}function ED(t){const e=Math.round(V3(t)*100)/100;return e===1?"1":e===0?"0":e.toString()}function Y3(t){const e=document.createElement("span");return e.textContent=t,e.classList.add(ua),e}function ID(){ln(PD,`
|
|
185
185
|
.${gn} {
|
|
186
186
|
width: 240px;
|
|
187
187
|
padding: 10px;
|
|
188
188
|
box-sizing: border-box;
|
|
189
189
|
}
|
|
190
|
-
.${
|
|
190
|
+
.${D3} {
|
|
191
191
|
display: grid;
|
|
192
192
|
grid-template-columns: repeat(auto-fit, 26px);
|
|
193
193
|
gap: 6px;
|
|
194
194
|
margin-bottom: 10px;
|
|
195
195
|
}
|
|
196
|
-
.${
|
|
196
|
+
.${ha} {
|
|
197
197
|
width: 24px;
|
|
198
198
|
height: 24px;
|
|
199
199
|
border-radius: 50%;
|
|
@@ -204,19 +204,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
204
204
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
205
205
|
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
206
206
|
}
|
|
207
|
-
.${
|
|
207
|
+
.${ha}[data-active="true"] {
|
|
208
208
|
box-shadow: 0 0 0 2px #1677ff;
|
|
209
209
|
transform: translateY(-1px);
|
|
210
210
|
}
|
|
211
|
-
.${
|
|
211
|
+
.${ha}:hover {
|
|
212
212
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
|
|
213
213
|
}
|
|
214
|
-
.${
|
|
214
|
+
.${N3} {
|
|
215
215
|
display: flex;
|
|
216
216
|
align-items: center;
|
|
217
217
|
gap: 6px;
|
|
218
218
|
}
|
|
219
|
-
.${
|
|
219
|
+
.${da} {
|
|
220
220
|
flex: 1;
|
|
221
221
|
min-width: 0;
|
|
222
222
|
height: 30px;
|
|
@@ -232,16 +232,16 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
232
232
|
outline: none;
|
|
233
233
|
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
|
234
234
|
}
|
|
235
|
-
.${
|
|
235
|
+
.${da}:focus {
|
|
236
236
|
border-color: #1677ff;
|
|
237
237
|
background: #ffffff;
|
|
238
238
|
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
|
|
239
239
|
}
|
|
240
|
-
.${
|
|
240
|
+
.${da}[data-invalid="true"] {
|
|
241
241
|
border-color: #ff4d4f;
|
|
242
242
|
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.12);
|
|
243
243
|
}
|
|
244
|
-
.${
|
|
244
|
+
.${j3} {
|
|
245
245
|
display: inline-flex;
|
|
246
246
|
}
|
|
247
247
|
.${vr} {
|
|
@@ -267,7 +267,7 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
267
267
|
border-color: #1677ff;
|
|
268
268
|
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
|
|
269
269
|
}
|
|
270
|
-
.${
|
|
270
|
+
.${Eh} {
|
|
271
271
|
position: absolute;
|
|
272
272
|
inset: 0;
|
|
273
273
|
width: 50%;
|
|
@@ -276,10 +276,10 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
276
276
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
277
277
|
transition: transform 0.2s ease;
|
|
278
278
|
}
|
|
279
|
-
.${vr}[data-format="rgba"] .${
|
|
279
|
+
.${vr}[data-format="rgba"] .${Eh} {
|
|
280
280
|
transform: translateX(100%);
|
|
281
281
|
}
|
|
282
|
-
.${
|
|
282
|
+
.${ua} {
|
|
283
283
|
position: relative;
|
|
284
284
|
z-index: 1;
|
|
285
285
|
text-align: center;
|
|
@@ -287,15 +287,15 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
|
|
|
287
287
|
color: #434343;
|
|
288
288
|
user-select: none;
|
|
289
289
|
}
|
|
290
|
-
.${vr}[data-format="hexa"] .${
|
|
291
|
-
.${vr}[data-format="rgba"] .${
|
|
290
|
+
.${vr}[data-format="hexa"] .${ua}:first-child,
|
|
291
|
+
.${vr}[data-format="rgba"] .${ua}:last-child {
|
|
292
292
|
color: #ffffff;
|
|
293
293
|
}
|
|
294
294
|
`)}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}">
|
|
295
295
|
${t.trim()}
|
|
296
296
|
</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(`
|
|
297
|
-
<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" />')},
|
|
298
|
-
.${
|
|
297
|
+
<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" />')},ga="infographic-edit-popover",ue=`${ga}__content`,Qe=`${ga}__arrow`,AD="infographic-edit-popover-style";function qr(t){var e,n,r,i,o,s,a,l;TD();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(ga);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),pi(_,Sa),_.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 T=document.createElement("div");T.classList.add(`${ue}-body`),T.style.padding=x,_.appendChild(T),$.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};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 A=Y=>{let G=Y;typeof G=="function"&&(G=G()),T.innerHTML="",G instanceof HTMLElement?T.appendChild(G):T.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)),A(t.content),F(c),L(E),Object.assign(v,{setOpen:L,toggle:D,setContent:A,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 TD(){ln(AD,`
|
|
298
|
+
.${ga} {
|
|
299
299
|
position: relative;
|
|
300
300
|
display: inline-flex;
|
|
301
301
|
}
|
|
@@ -436,25 +436,25 @@ ${t.trim()}
|
|
|
436
436
|
.${ue}[data-placement="right"][data-open="true"] {
|
|
437
437
|
transform: translate(0, -50%);
|
|
438
438
|
}
|
|
439
|
-
`)}const
|
|
440
|
-
.${
|
|
439
|
+
`)}const Ah="infographic-align-grid",X3=`${Ah}--compact`,kD="infographic-align-grid-style",LD=`
|
|
440
|
+
.${Ah} {
|
|
441
441
|
display: grid;
|
|
442
442
|
grid-template-columns: repeat(4, 32px);
|
|
443
443
|
grid-auto-rows: 32px;
|
|
444
444
|
gap: 2px;
|
|
445
445
|
}
|
|
446
|
-
.${
|
|
446
|
+
.${X3} {
|
|
447
447
|
grid-template-columns: repeat(3, 32px);
|
|
448
448
|
}
|
|
449
|
-
`,
|
|
450
|
-
.${
|
|
449
|
+
`,G3=[{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"}],zD=(t,e,n,r)=>{var i;ln(kD,LD);const o=(i=r==null?void 0:r.enableDistribution)!=null?i:!0,s=HD(a=>RD(t,a,n),o);return qr({target:yr({icon:Cn.align}),content:s,placement:"top",offset:12})};function HD(t,e){const n=document.createElement("div");return n.classList.add(Ah),e||n.classList.add(X3),(e?G3:G3.filter(({action:i})=>i!=="H_DISTRIBUTE"&&i!=="V_DISTRIBUTE")).forEach(({icon:i,action:o})=>{const s=yr({icon:i,onClick:()=>t(o)});n.appendChild(s)}),n}function RD(t,e,n){if(!t.length)return;const r=t[0].ownerSVGElement;if(!r)return;const i=t.map(h=>jD(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=Dr(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":{DD(i,c);break}case"V_DISTRIBUTE":{ND(i,c);break}}c.length&&n.executeBatch(c)}function DD(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=q3(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 ND(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=q3(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 q3(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=WD(e,n,r);i&&t.push(i)}function jD(t,e){const n=fn(e,t),r=!zn(t),i=BD(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}=FD(t,n);return{element:t,bounds:n,mode:"attr",startX:o,startY:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h,movable:r}}function WD(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=VD(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 FD(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 BD(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 VD(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 YD=Object.defineProperty,U3=Object.getOwnPropertySymbols,XD=Object.prototype.hasOwnProperty,GD=Object.prototype.propertyIsEnumerable,Z3=(t,e,n)=>e in t?YD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qD=(t,e)=>{for(var n in e||(e={}))XD.call(e,n)&&Z3(t,n,e[n]);if(U3)for(var n of U3(e))GD.call(e,n)&&Z3(t,n,e[n]);return t};const K3="infographic-font-align-grid",UD="infographic-font-align-grid-style",ZD=[{icon:Pn.alignLeft,align:"LEFT"},{icon:Pn.alignCenter,align:"CENTER"},{icon:Pn.alignRight,align:"RIGHT"}],KD=[{icon:Pn.alignTop,align:"TOP"},{icon:Pn.alignMiddle,align:"MIDDLE"},{icon:Pn.alignBottom,align:"BOTTOM"}],QD=`
|
|
450
|
+
.${K3} {
|
|
451
451
|
display: grid;
|
|
452
452
|
grid-template-columns: repeat(3, 32px);
|
|
453
453
|
grid-auto-rows: 32px;
|
|
454
454
|
gap: 2px;
|
|
455
455
|
}
|
|
456
|
-
`,
|
|
457
|
-
.${
|
|
456
|
+
`,Q3=(t,e,n)=>{ln(UD,QD);const r={horizontal:e["data-horizontal-align"],vertical:e["data-vertical-align"]},i=yr({icon:Pn.align}),o=JD(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 qr({target:i,content:o,placement:"top",offset:12})};function JD(t,e){const n=document.createElement("div");n.classList.add(K3);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=yr({icon:l,onClick:()=>{t[a]!==c&&(Object.assign(t,{[a]:c}),i(),e(qD({},t)))},activate:c===t[a]});r[c]=h,n.appendChild(h)})};return o(ZD,"horizontal"),o(KD,"vertical"),n}const ma="infographic-font-color-btn",tN="infographic-font-color-style",Th="#1f1f1f",J3=(t,e,n)=>{nN();const r=eN(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(ma),tv(o,r!=null?r:Th,i);const s=W3({value:r!=null?r:Th,onChange:a=>{tv(o,a,!1),n.executeBatch(t.map(l=>new pn(l,{attributes:{fill:a}})))}});return qr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function eN(t){if(t)return Xn(t)?t:void 0}function tv(t,e,n){t.style.setProperty("--infographic-font-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function nN(){ln(tN,`
|
|
457
|
+
.${ma} {
|
|
458
458
|
position: relative;
|
|
459
459
|
width: 32px;
|
|
460
460
|
height: 32px;
|
|
@@ -464,15 +464,15 @@ ${t.trim()}
|
|
|
464
464
|
cursor: pointer;
|
|
465
465
|
transition: box-shadow 0.2s ease, border-color 0.2s ease;
|
|
466
466
|
}
|
|
467
|
-
.${
|
|
467
|
+
.${ma}::after {
|
|
468
468
|
content: '';
|
|
469
469
|
position: absolute;
|
|
470
470
|
inset: 6px;
|
|
471
471
|
border-radius: 50%;
|
|
472
|
-
background: var(--infographic-font-color, ${
|
|
472
|
+
background: var(--infographic-font-color, ${Th});
|
|
473
473
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
474
474
|
}
|
|
475
|
-
.${
|
|
475
|
+
.${ma}[data-mixed="true"]::after {
|
|
476
476
|
background: repeating-linear-gradient(
|
|
477
477
|
45deg,
|
|
478
478
|
#d9d9d9 0,
|
|
@@ -481,8 +481,8 @@ ${t.trim()}
|
|
|
481
481
|
#f5f5f5 12px
|
|
482
482
|
);
|
|
483
483
|
}
|
|
484
|
-
`)}const
|
|
485
|
-
.${
|
|
484
|
+
`)}const kh="infographic-font-family-list",ya=`${kh}__option`,rN="infographic-font-family-list-style",iN="默认",ev=(t,e,n)=>{sN();const r=Hl(),i=nv(e["font-family"]),o=r.map(h=>({label:h.name||h.fontFamily,value:h.fontFamily}));o.some(h=>nv(h.value)===i)||o.unshift({label:iN,value:i});let s=i;const a=oN(o,s,h=>{s!==h&&(s=h,n.executeBatch(t.map(u=>new pn(u,{attributes:{"font-family":Er(h)}}))))}),l=yr({icon:Pn.fontFamily});return qr({target:l,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function oN(t,e,n){const r=document.createElement("div");r.classList.add(kh);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(ya),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 nv(t){return t?Array.isArray(t)?Qn(t.join(", ")):Qn(String(t)):""}function sN(){ln(rN,`
|
|
485
|
+
.${kh} {
|
|
486
486
|
display: flex;
|
|
487
487
|
flex-direction: column;
|
|
488
488
|
gap: 2px;
|
|
@@ -491,7 +491,7 @@ ${t.trim()}
|
|
|
491
491
|
max-height: 220px;
|
|
492
492
|
overflow-y: auto;
|
|
493
493
|
}
|
|
494
|
-
.${
|
|
494
|
+
.${ya} {
|
|
495
495
|
width: 100%;
|
|
496
496
|
text-align: left;
|
|
497
497
|
padding: 6px 10px;
|
|
@@ -503,22 +503,22 @@ ${t.trim()}
|
|
|
503
503
|
color: #000000d9;
|
|
504
504
|
transition: background-color 0.2s ease, color 0.2s ease;
|
|
505
505
|
}
|
|
506
|
-
.${
|
|
506
|
+
.${ya}:hover {
|
|
507
507
|
background: #f5f5f5;
|
|
508
508
|
}
|
|
509
|
-
.${
|
|
509
|
+
.${ya}[data-activate="true"] {
|
|
510
510
|
background: #e6f4ff;
|
|
511
511
|
color: #0958d9;
|
|
512
512
|
}
|
|
513
|
-
`)}const
|
|
514
|
-
.${
|
|
513
|
+
`)}const rv="infographic-font-size-grid",aN="infographic-font-size-grid-style",lN=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],cN=`
|
|
514
|
+
.${rv} {
|
|
515
515
|
display: grid;
|
|
516
516
|
grid-template-columns: repeat(5, 32px);
|
|
517
517
|
grid-auto-rows: 32px;
|
|
518
518
|
gap: 2px;
|
|
519
519
|
}
|
|
520
|
-
`,
|
|
521
|
-
.${
|
|
520
|
+
`,iv=(t,e,n)=>{ln(aN,cN);const r=yr({icon:Pn.fontSize}),i=uN(e["font-size"]),o=hN(i,s=>{n.executeBatch(t.map(a=>new pn(a,{attributes:{"font-size":s}})))});return qr({target:r,content:o,placement:"top",offset:12})};function hN(t,e){const n=document.createElement("div");n.classList.add(rv);let r=t;const i={},o=()=>{Object.entries(i).forEach(([s,a])=>{const l=Number(s)===r;a.setActivate(l)})};return lN.forEach(({label:s,value:a})=>{const l=yr({icon:dN(s),onClick:()=>{r!==a&&(r=a,o(),e(a))},activate:a===r});i[String(a)]=l,n.appendChild(l)}),n}function dN(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 uN(t){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?n:12}return 12}const va="infographic-icon-color-btn",fN="infographic-icon-color-style",Lh="#1f1f1f",ov=(t,e,n)=>{gN();const r=pN(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(va),sv(o,r!=null?r:Lh,i);const s=W3({value:r!=null?r:Lh,onChange:a=>{sv(o,a,!1),n.executeBatch(t.map(l=>new pn(l,{attributes:{fill:a}})))}});return qr({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function pN(t){if(t)return Xn(t)?t:void 0}function sv(t,e,n){t.style.setProperty("--infographic-icon-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function gN(){ln(fN,`
|
|
521
|
+
.${va} {
|
|
522
522
|
position: relative;
|
|
523
523
|
width: 32px;
|
|
524
524
|
height: 32px;
|
|
@@ -528,15 +528,15 @@ ${t.trim()}
|
|
|
528
528
|
cursor: pointer;
|
|
529
529
|
transition: box-shadow 0.2s ease, border-color 0.2s ease;
|
|
530
530
|
}
|
|
531
|
-
.${
|
|
531
|
+
.${va}::after {
|
|
532
532
|
content: '';
|
|
533
533
|
position: absolute;
|
|
534
534
|
inset: 6px;
|
|
535
535
|
border-radius: 50%;
|
|
536
|
-
background: var(--infographic-icon-color, ${
|
|
536
|
+
background: var(--infographic-icon-color, ${Lh});
|
|
537
537
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
538
538
|
}
|
|
539
|
-
.${
|
|
539
|
+
.${va}[data-mixed="true"]::after {
|
|
540
540
|
background: repeating-linear-gradient(
|
|
541
541
|
45deg,
|
|
542
542
|
#d9d9d9 0,
|
|
@@ -545,8 +545,8 @@ ${t.trim()}
|
|
|
545
545
|
#f5f5f5 12px
|
|
546
546
|
);
|
|
547
547
|
}
|
|
548
|
-
`)}var nN=Object.defineProperty,tv=Object.getOwnPropertySymbols,rN=Object.prototype.hasOwnProperty,iN=Object.prototype.propertyIsEnumerable,ev=(t,e,n)=>e in t?nN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oN=(t,e)=>{for(var n in e||(e={}))rN.call(e,n)&&ev(t,n,e[n]);if(tv)for(var n of tv(e))iN.call(e,n)&&ev(t,n,e[n]);return t};class nv 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&&rv(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){rv(r);return}sN(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:nw(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,oN({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),ui(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={}}=xl(e);return[X3,K3,Y3,q3].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=ud(e.map(o=>xl(o).attributes||{})),r=[X3,K3,Y3,q3].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=Ml(e[0]);return[Q3].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=ud(e.map(r=>Ml(r)));return[Q3].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[wD(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=Hr(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=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,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 rv(t){t.style.visibility="hidden"}function sN(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var aN=Object.defineProperty,iv=Object.getOwnPropertySymbols,lN=Object.prototype.hasOwnProperty,cN=Object.prototype.propertyIsEnumerable,ov=(t,e,n)=>e in t?aN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hN=(t,e)=>{for(var n in e||(e={}))lN.call(e,n)&&ov(t,n,e[n]);if(iv)for(var n of iv(e))cN.call(e,n)&&ov(t,n,e[n]);return t};const Ki=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=hN({},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};default:return{x1:r,y1:i,x2:r,y2:i+s}}}};Ki.HANDLE_SIZE=10,Ki.LINE_STROKE_WIDTH=8,Ki.MIN_SIZE=1,Ki.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let sv=Ki;function av(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ah={exports:{}},lv;function dN(){return lv||(lv=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 uN=dN();const fN=av(uN);var ga=(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(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return ga(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return ga(this,null,function*(){if(e.length===0)return;const n=new LR(e);yield this.execute(n)})}undo(){return ga(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return ga(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 cv=(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 gN{constructor(){this.extensions=new a3,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)||rw(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 cv(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 cv(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=Tr(n,e);if(r&&r.isConnected)return r;const i=$t("g");return ui(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 mN{constructor(){this.extensions=new a3}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 yN=Object.defineProperty,hv=Object.getOwnPropertySymbols,vN=Object.prototype.hasOwnProperty,xN=Object.prototype.propertyIsEnumerable,dv=(t,e,n)=>e in t?yN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uv=(t,e)=>{for(var n in e||(e={}))vN.call(e,n)&&dv(t,n,e[n]);if(hv)for(var n of hv(e))xN.call(e,n)&&dv(t,n,e[n]);return t};class bN{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];i3(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=di(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=i3(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=uv(uv({},this.options),e),this.options.padding!==void 0&&dp(this.editor.getDocument(),ir(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=wl(e),l=zn(e)||zt.ItemLabel===a||zt.ItemDesc===a||zt.ItemValue===a||zt.ItemIllus===a,c=l?o3(e):void 0;if(l){const h=di(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?`${$R(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class wN{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 pN,o=new bN,s=new mN,a=new gN;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,fv;function _N(){if(fv)return kh;fv=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(`
|
|
549
|
-
`);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
|
|
548
|
+
`)}var mN=Object.defineProperty,av=Object.getOwnPropertySymbols,yN=Object.prototype.hasOwnProperty,vN=Object.prototype.propertyIsEnumerable,lv=(t,e,n)=>e in t?mN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xN=(t,e)=>{for(var n in e||(e={}))yN.call(e,n)&&lv(t,n,e[n]);if(av)for(var n of av(e))vN.call(e,n)&&lv(t,n,e[n]);return t};class cv extends Sh{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&&hv(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){hv(r);return}bN(r,i),this.placeEditBar(r,n),zh(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),zh(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),zh(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:d6(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,xN({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),pi(r,Sa),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={}}=$l(e);return[J3,iv,Q3,ev].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=yd(e.map(o=>$l(o).attributes||{})),r=[J3,iv,Q3,ev].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=Al(e[0]);return[ov].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=yd(e.map(r=>Al(r)));return[ov].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[zD(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=Dr(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=zR(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 zh(t){t.style.visibility="visible"}function hv(t){t.style.visibility="hidden"}function bN(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var wN=Object.defineProperty,dv=Object.getOwnPropertySymbols,_N=Object.prototype.hasOwnProperty,$N=Object.prototype.propertyIsEnumerable,uv=(t,e,n)=>e in t?wN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PN=(t,e)=>{for(var n in e||(e={}))_N.call(e,n)&&uv(t,n,e[n]);if(dv)for(var n of dv(e))$N.call(e,n)&&uv(t,n,e[n]);return t};const to=class en extends Sh{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=bt("g",{"pointer-events":"none"});this.overlay=bt("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=bt("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"?bt("line",{stroke:"transparent","stroke-width":en.LINE_STROKE_WIDTH}):bt("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=PN({},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};default:return{x1:r,y1:i,x2:r,y2:i+s}}}};to.HANDLE_SIZE=10,to.LINE_STROKE_WIDTH=8,to.MIN_SIZE=1,to.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let fv=to;function pv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hh,gv;function CN(){if(gv)return Hh;gv=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;Hh=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(`
|
|
549
|
+
`);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 T(){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 A(){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()||T()||L()||D()||k()||A()||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 Hh}var ON=CN();const MN=pv(ON);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())});function SN(t,e=!0){return Ur(this,null,function*(){const n=EN(t);if(n.size===0)return;const r=[];yield Promise.all(Array.from(n).map(i=>Ur(null,null,function*(){const o=AN(i);if(!o.length)return;const s=yield IN(i);if(!s.length)return;const a=yield Promise.all(s.map(l=>Ur(null,null,function*(){const c=kN(l),h=c["unicode-range"].replace(/\s/g,"");if(!o.find(y=>y.unicodeRange&&y.unicodeRange.replace(/\s/g,"")===h))return null;const f=d_(c["font-family"],rf(c["font-weight"]));if(!f)return null;const p=c.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!(p!=null&&p[1]))return null;const g=Tl(f,p[1]);if(e){const y=yield zN(g);c.src=`url(${y}) format('woff2')`}else c.src=`url(${g}) format('woff2')`;return c})));r.push(...a.filter(Boolean)||[])}))),r.length>0&&LN(t,r)})}function EN(t){const e=new Set,n=i=>{i&&Kn(i).forEach(o=>{const s=Er(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 IN(t){return Ur(this,null,function*(){const e=kf(t),n=[];return yield Promise.allSettled(e.map(r=>Ur(null,null,function*(){var i;const o=yield Io(r).then(s=>s.text()).then(s=>MN(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=TN(s);n.push(a)}})}))),n})}function AN(t){const e=[],n=Kn(t).map(r=>Er(r));return document.fonts.forEach(r=>{n.includes(Er(r.family))&&r.status==="loaded"&&e.push(r)}),e}function TN(t){const e=t.declarations||[],n={};return e.forEach(r=>{const{property:i,value:o}=r;i&&o&&(n[i]=o)}),n}function kN(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 LN(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=bt("style",{type:"text/css"});i.innerHTML=n.map(s=>`
|
|
550
550
|
@font-face {
|
|
551
551
|
font-family: ${s["font-family"]};
|
|
552
552
|
src: ${s.src};
|
|
@@ -556,5 +556,5 @@ ${t.trim()}
|
|
|
556
556
|
unicode-range: ${s["unicode-range"]};
|
|
557
557
|
}
|
|
558
558
|
`.trim()).join(`
|
|
559
|
-
`);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function AN(t){return Gr(this,null,function*(){const e=yield Mo(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 kN(t){return Lh(this,arguments,function*(e,n={}){const r=yield pv(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function pv(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 LN(i),yield CN(i,r),HN(i),i})}function LN(t){return Lh(this,null,function*(){const e=t.querySelectorAll("use"),n=zN(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 gv="icon-defs";function zN(t){const e=Tr(t,gv);if(e)return e;const n=$t("defs");return ui(n,gv),t.prepend(n),n}function HN(t){RN(t),DN(t),NN(t),jN(t)}function RN(t){const e=Tr(t,zt.BtnsGroup);e==null||e.remove();const n=Tr(t,"btn-icon-defs");n==null||n.remove()}function DN(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function NN(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function jN(t){ml(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var WN=(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 FN(t){return WN(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield pv(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 BN=Object.defineProperty,VN=Object.defineProperties,YN=Object.getOwnPropertyDescriptors,ma=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,yv=Object.prototype.propertyIsEnumerable,vv=(t,e,n)=>e in t?BN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))mv.call(e,n)&&vv(t,n,e[n]);if(ma)for(var n of ma(e))yv.call(e,n)&&vv(t,n,e[n]);return t},ya=(t,e)=>VN(t,YN(e)),qr=(t,e)=>{var n={};for(var r in t)mv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ma)for(var r of ma(t))e.indexOf(r)<0&&yv.call(t,r)&&(n[r]=t[r]);return n};function XN(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=qr(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?ZN(s,u):void 0,p={container:c,padding:ir(r)};if(h){const g=h,{design:y}=g,m=qr(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=GN(Je(Je({},h==null?void 0:h.design),o),f?ya(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 GN(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=xv(i||(o==null?void 0:o[0]),e);return{structure:qN(n),title:UN(r,e),item:s,items:o?o.map(a=>xv(a,e)):[s]}}function qN(t){if(!t)return null;const e=zh(t),{type:n}=e,r=qr(e,["type"]),i=u2(n);if(!i)return null;const{component:o}=i;return ya(Je({},i),{component:s=>o(Je(Je({},s),r))})}function UN(t,e){if(!t)return{component:null};const n=zh(t),{type:r}=n,i=qr(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=bv(s,s);return{component:l=>yg(Je(ya(Je({},l),{themeColors:a}),i))}}function xv(t,e){if(!t)return null;const n=zh(t),{type:r}=n,i=qr(n,["type"]),o=Cg(r);if(!o)return null;const{component:s,options:a}=o;return ya(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=bv(To(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=qr(g,["themeColors"]);return s(Je(Je({themeColors:y},m),i))},options:a})}function ZN(t,e={}){var n;const r=t?vg(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 bv(t,e="#fff"){return wg({colorPrimary:t,isDarkMode:mu(e),colorBg:e})}function KN(t){return t===" "||t===" "}function QN(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 JN(t){return t.trimEnd()}function wv(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 tj(t){return{kind:"array",line:t,items:[]}}function ej(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}=QN(o),h=JN(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||KN(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=tj(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=wv(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 _v(t){return wv(t)}function va(t,e){return{kind:"value",line:e,value:t}}const nj=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,rj=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function xr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function br(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 ij(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=ij(t);if(!e)return;const n=e.match(nj);if(n&&n[0].length===e.length)return e;const r=e.match(rj);if(r&&r[1].length===e.length||lt(e).isValid())return e}function Pv(t,e,n,r={}){const i=br(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 oj(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 xr(t.value);const n={};return t.value!==void 0&&(n.value=xr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=Dh(i)}),n}function sj(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 sj(t,e,n,r);case"string":{const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=br(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=br(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=br(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=br(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(va(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=br(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(oj(o,a)){const l=a.map((c,h)=>Pv(va(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return Pv(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=_v(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=je(va(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]=xr(o.value),i):(we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=xr(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=_v(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=je(va(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]=xr(o.value):we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=xr(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"}),aj=t=>({kind:"enum",values:t}),Ur=(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}),lj=()=>({kind:"palette"}),Cv={fill:Ur({soft:!0}),stroke:Ur({soft:!0})},Zr=Te(Cv,{allowUnknown:!0}),Wh=Te(Cv,{allowUnknown:!0}),Fh=Te({},{allowUnknown:!0});Fh.fields={label:tn(),value:jh(Fn(),tn()),desc:tn(),icon:tn(),children:Nh(Fh)};const Ov=Te({type:tn(),colorBg:Ur(),colorPrimary:Ur(),palette:lj(),title:Zr,desc:Zr,shape:Wh,base:Te({global:Te({},{allowUnknown:!0}),shape:Wh,text:Zr}),item:Te({icon:Te({},{allowUnknown:!0}),label:Zr,desc:Zr,value:Zr,shape:Wh}),stylize:Te({type:aj(["rough","pattern"]),roughness:Fn(),bowing:Fn(),fillWeight:Fn(),hachureGap:Fn(),pattern:tn(),backgroundColor:Ur(),foregroundColor:Ur(),scale:Fn()},{shorthandKey:"type"}),elements:Te({},{allowUnknown:!0})},{shorthandKey:"type"}),xa=Te({},{allowUnknown:!0,shorthandKey:"type"}),Mv=Te({structure:xa,item:xa,items:Nh(xa),title:xa}),Sv=Te({title:tn(),desc:tn(),items:Nh(Fh)}),Ev=Te({type:tn()},{shorthandKey:"type"}),Iv=Te({template:Ev,design:Mv,data:Sv,theme:Ov,width:jh(Fn(),tn()),height:jh(Fn(),tn())});var cj=Object.defineProperty,ba=Object.getOwnPropertySymbols,Tv=Object.prototype.hasOwnProperty,Av=Object.prototype.propertyIsEnumerable,kv=(t,e,n)=>e in t?cj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hj=(t,e)=>{for(var n in e||(e={}))Tv.call(e,n)&&kv(t,n,e[n]);if(ba)for(var n of ba(e))Av.call(e,n)&&kv(t,n,e[n]);return t},dj=(t,e)=>{var n={};for(var r in t)Tv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ba)for(var r of ba(t))e.indexOf(r)<0&&Av.call(t,r)&&(n[r]=t[r]);return n};function uj(t,e){if(!t)return;const n=je(t,Ev,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function Lv(t){const{ast:e,errors:n}=ej(t),r=[],i={},o=hj({},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=uj(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=je(u,Mv,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=je(f,Sv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=je(p,Ov,"theme",n);if(m&&typeof m=="object"){const x=m,{type:v}=x,b=dj(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,Iv.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=je(y,Iv.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const fj=()=>[new nv,new sv],pj=()=>[new _3,new l3,new c3,new $3,new C3,new I3,new S3],gj={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return fj()},get interactions(){return pj()}};var mj=Object.defineProperty,zv=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,vj=Object.prototype.propertyIsEnumerable,Hv=(t,e,n)=>e in t?mj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,On=(t,e)=>{for(var n in e||(e={}))yj.call(e,n)&&Hv(t,n,e[n]);if(zv)for(var n of zv(e))vj.call(e,n)&&Hv(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 wa(t){const e=On({},t);return e.data&&(e.data=ap(e.data)),e.elements&&(e.elements=ap(e.elements)),e}function Rv(t){const{design:e,data:n}=t;return!(!e||!Cu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var xj=Object.defineProperty,Dv=Object.getOwnPropertySymbols,bj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,Nv=(t,e,n)=>e in t?xj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_j=(t,e)=>{for(var n in e||(e={}))bj.call(e,n)&&Nv(t,n,e[n]);if(Dv)for(var n of Dv(e))wj.call(e,n)&&Nv(t,n,e[n]);return t},$j=(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 Pj{constructor(e){this.rendered=!1,this.emitter=new fN,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}=Cj(e);r&&(this.initialOptions=wa(i));const a=Bh(n==="replace"?wa(this.initialOptions||{}):this.options||wa(this.initialOptions||{}),i);this.options=a,this.parsedOptions=XN(Bh(gj,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(!Rv(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new V$(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 wN(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=Sp(d(l,_j({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Ir(p);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const e=this.parsedOptions;if(!Rv(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 lw({structure:r,items:i})}toDataURL(e){return $j(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield kN(this.node,e):yield FN(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 Cj(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=Lv(t);return{options:e,errors:n,warnings:r}}return{options:wa(t),errors:[],warnings:[]}}const Oj=Be.version;W.AlignLayout=Si,W.BadgeCard=Sg,W.BrushSelect=l3,W.BtnAdd=q,W.BtnRemove=Xt,W.BtnsGroup=Et,W.CandyCardLite=Tg,W.CapsuleItem=Ng,W.ChartBar=f2,W.ChartColumn=p2,W.ChartLine=v2,W.ChartPie=x2,W.ChartWordCloud=C2,W.CircleNode=Fg,W.CircularProgress=Yg,W.ClickSelect=c3,W.CompactCard=Ug,W.CompareBinaryHorizontal=z2,W.CompareHierarchyLeftRight=N2,W.CompareHierarchyRow=j2,W.DblClickEditText=_3,W.Defs=jt,W.DoneList=Qg,W.DragElement=$3,W.EditBar=nv,W.Ellipse=Wt,W.FlexLayout=dt,W.Fragment=wi,W.Gap=ie,W.Group=V,W.HierarchyMindmap=U2,W.HierarchyStructure=K2,W.HierarchyTree=ey,W.HorizontalIconArrow=e1,W.HorizontalIconLine=s1,W.HotkeyHistory=C3,W.IconBadge=c1,W.Illus=Np,W.IndexedCard=u1,W.Infographic=Pj,W.Interaction=jn,W.ItemDesc=Jt,W.ItemIcon=Ce,W.ItemIconCircle=sr,W.ItemLabel=It,W.ItemValue=Mi,W.ItemsGroup=St,W.LCornerCard=g1,W.LabelText=M1,W.LetterCard=v1,W.LinedText=w1,W.ListColumn=ny,W.ListGrid=ry,W.ListPyramid=iy,W.ListRow=oy,W.ListSector=ly,W.ListWaterfall=cy,W.ListZigzagDown=py,W.ListZigzagUp=gy,W.Path=yt,W.PillBadge=P1,W.Plugin=Ph,W.Polygon=Ve,W.ProgressCard=zm,W.Quadrant=my,W.QuarterCircular=Dm,W.QuarterSimpleCard=Wm,W.Rect=Ct,W.RelationCircle=yy,W.RelationNetwork=vy,W.ResizeElement=sv,W.RibbonCard=Vm,W.RoundedRectNode=Gm,W.SelectHighlight=S3,W.SequenceAscendingStairs3d=Sy,W.SequenceAscendingSteps=Ey,W.SequenceCircleArrows=Ty,W.SequenceCircular=Ay,W.SequenceColorSnakeSteps=ky,W.SequenceFilterMesh=Ry,W.SequenceHorizontalZigzag=Dy,W.SequenceMountain=Wy,W.SequencePyramid=Fy,W.SequenceRoadmapVertical=Vy,W.SequenceSnakeSteps=Yy,W.SequenceStairsFront=Xy,W.SequenceSteps=Gy,W.SequenceTimeline=qy,W.SequenceZigzagPucks3d=Zy,W.SequenceZigzagSteps=n3,W.ShapesGroup=le,W.SimpleHorizontalArrow=Zm,W.SimpleIllusItem=Jm,W.SimpleItem=n2,W.SimpleVerticalArrow=o2,W.Text=Mt,W.Title=yg,W.UnderlineText=l2,W.VERSION=Oj,W.VerticalIconArrow=d2,W.ZoomWheel=I3,W.cloneElement=Rn,W.createFragment=cP,W.createLayout=vc,W.getCombinedBounds=Hr,W.getElementBounds=et,W.getElementsBounds=or,W.getFont=Tl,W.getFonts=Al,W.getItem=Cg,W.getItemProps=Zt,W.getItems=zC,W.getPalette=Sf,W.getPaletteColor=To,W.getPalettes=n_,W.getStructure=u2,W.getStructures=RL,W.getTemplate=Yh,W.getTemplates=Yv,W.getTheme=vg,W.getThemeColors=xe,W.getThemes=vC,W.jsx=Jo,W.jsxDEV=dP,W.jsxs=hP,W.loadSVGResource=Ar,W.parseSVG=Ir,W.parseSyntax=Lv,W.registerFont=Of,W.registerItem=Kt,W.registerPalette=zl,W.registerPattern=e0,W.registerResourceLoader=xw,W.registerStructure=kt,W.registerTemplate=Vh,W.registerTheme=_c,W.renderSVG=Sp,W.sequenceCylinders3d=Ly,W.setDefaultFont=Qw,W.setFontExtendFactor=Z$,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
|
|
559
|
+
`);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function zN(t){return Ur(this,null,function*(){const e=yield Io(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 Rh=(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 Rh(this,arguments,function*(e,n={}){const r=yield Dh(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function Dh(t){return Rh(this,arguments,function*(e,n={}){const{embedResources:r=!0,removeIds:i=!1}=n,o=e.cloneNode(!0),{width:s,height:a}=mc(e);return Qt(o,{width:s,height:a}),i?(NN(o),UN(o)):yield RN(o),yield SN(o,r),tj(o),o})}function RN(t){return Rh(this,null,function*(){const e=t.querySelectorAll("use"),n=DN(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 mv="icon-defs";function DN(t){const e=Tr(t,mv);if(e)return e;const n=bt("defs");return pi(n,mv),t.prepend(n),n}function NN(t){const e=Array.from(t.querySelectorAll("use"));e.length&&e.forEach(n=>{const r=jN(n);if(!r||!r.startsWith("#"))return;const i=WN(t,r);if(!i||i===n)return;const o=FN(n,i);o&&n.replaceWith(o)})}function jN(t){var e;return(e=t.getAttribute("href"))!=null?e:t.getAttribute("xlink:href")}function WN(t,e){const n=t.querySelector(e);return n||document.querySelector(e)}function FN(t,e){const n=e.tagName.toLowerCase();return n==="symbol"?BN(t,e):n==="svg"?VN(t,e):YN(t,e)}function BN(t,e){const n=e.cloneNode(!0),r=bt("svg");for(xa(r,n,new Set(["id"])),xa(r,t,new Set(["href","xlink:href"]));n.firstChild;)r.appendChild(n.firstChild);return r}function VN(t,e){const n=e.cloneNode(!0);return n.removeAttribute("id"),xa(n,t,new Set(["href","xlink:href"])),n}function YN(t,e){const n=e.cloneNode(!0);n.removeAttribute("id");const r=bt("g");xa(r,t,new Set(["href","xlink:href","x","y","width","height","transform"]));const i=XN(t);return i&&r.setAttribute("transform",i),r.appendChild(n),r}function XN(t){var e;const n=t.getAttribute("x"),r=t.getAttribute("y"),i=n||r?`translate(${n!=null?n:0} ${r!=null?r:0})`:"",o=(e=t.getAttribute("transform"))!=null?e:"";return i&&o?`${i} ${o}`:i||o||null}function xa(t,e,n=new Set){Array.from(e.attributes).forEach(r=>{if(!n.has(r.name)){if(r.name==="style"){GN(t,r.value);return}if(r.name==="class"){qN(t,r.value);return}t.setAttribute(r.name,r.value)}})}function GN(t,e){const n=t.getAttribute("style");if(!n){t.setAttribute("style",e);return}const r=n.trim().endsWith(";")?"":";";t.setAttribute("style",`${n}${r}${e}`)}function qN(t,e){const n=t.getAttribute("class");if(!n){t.setAttribute("class",e);return}t.setAttribute("class",`${n} ${e}`.trim())}const yv=/url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/g;function UN(t){const e=ZN(t);if(e.size===0){xv(t);return}const n=KN(t,e);n&&(Ar(t,r=>{if(r.tagName.toLowerCase()==="defs")return!1;Array.from(r.attributes).forEach(o=>{const s=o.value;if(!s.includes("url("))return;const a=s.replace(yv,(l,c)=>{const h=encodeURIComponent(c);return`url("${n}#${h}")`});a!==s&&r.setAttribute(o.name,a)})}),xv(t))}function ZN(t){const e=new Set;return Ar(t,n=>{if(n.tagName.toLowerCase()==="defs")return!1;vv(n,r=>e.add(r))}),e}function vv(t,e){for(const n of Array.from(t.attributes)){const r=n.value;if(r.includes("url("))for(const i of r.matchAll(yv))i[1]&&e(i[1]);(n.name==="href"||n.name==="xlink:href")&&r[0]==="#"&&e(r.slice(1))}}function KN(t,e){if(e.size===0)return null;const n=QN(t,e);if(n.size===0)return null;const r=bt("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),i=bt("defs");if(n.forEach(s=>{i.appendChild(s.cloneNode(!0))}),!i.children.length)return null;r.appendChild(i);const o=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o)}function QN(t,e){const n=new Map,r=Array.from(e),i=new Set(r),o=new Set,s=a=>{o.has(a)||i.has(a)||(r.push(a),i.add(a))};for(;r.length;){const a=r.shift();if(o.has(a))continue;o.add(a);const l=`#${JN(a)}`,c=t.querySelector(l);c&&(n.set(a,c),Ar(c,h=>{vv(h,s)}))}return n}function JN(t){return globalThis.CSS&&typeof globalThis.CSS.escape=="function"?globalThis.CSS.escape(t):t.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,"\\$1")}function xv(t){Array.from(t.querySelectorAll("defs")).forEach(n=>n.remove())}function tj(t){ej(t),nj(t),rj(t),ij(t)}function ej(t){const e=Tr(t,zt.BtnsGroup);e==null||e.remove();const n=Tr(t,"btn-icon-defs");n==null||n.remove()}function nj(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function rj(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function ij(t){Ar(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var oj=(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 sj(t){return oj(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield Dh(e),{width:s,height:a}=mc(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 Nh={exports:{}},bv;function aj(){return bv||(bv=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})(Nh)),Nh.exports}var lj=aj();const cj=pv(lj);var ba=(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 hj{constructor(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return ba(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return ba(this,null,function*(){if(e.length===0)return;const n=new qR(e);yield this.execute(n)})}undo(){return ba(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return ba(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 wv=(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 dj{constructor(){this.extensions=new p3,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)||u6(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 wv(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 wv(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=Tr(n,e);if(r&&r.isConnected)return r;const i=bt("g");return pi(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 uj{constructor(){this.extensions=new p3}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 fj=Object.defineProperty,_v=Object.getOwnPropertySymbols,pj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,$v=(t,e,n)=>e in t?fj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pv=(t,e)=>{for(var n in e||(e={}))pj.call(e,n)&&$v(t,n,e[n]);if(_v)for(var n of _v(e))gj.call(e,n)&&$v(t,n,e[n]);return t};class mj{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];d3(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=fi(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=d3(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=Pv(Pv({},this.options),e),this.options.padding!==void 0&&vp(this.editor.getDocument(),ir(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=Cl(e),l=zn(e)||zt.ItemLabel===a||zt.ItemDesc===a||zt.ItemValue===a||zt.ItemIllus===a,c=l?u3(e):void 0;if(l){const h=fi(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?`${RR(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class yj{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 hj,o=new mj,s=new uj,a=new dj;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 vj=Object.defineProperty,xj=Object.defineProperties,bj=Object.getOwnPropertyDescriptors,wa=Object.getOwnPropertySymbols,Cv=Object.prototype.hasOwnProperty,Ov=Object.prototype.propertyIsEnumerable,Mv=(t,e,n)=>e in t?vj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))Cv.call(e,n)&&Mv(t,n,e[n]);if(wa)for(var n of wa(e))Ov.call(e,n)&&Mv(t,n,e[n]);return t},_a=(t,e)=>xj(t,bj(e)),Zr=(t,e)=>{var n={};for(var r in t)Cv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&wa)for(var r of wa(t))e.indexOf(r)<0&&Ov.call(t,r)&&(n[r]=t[r]);return n};function wj(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=Zr(e,["container","padding","template","design","theme","themeConfig"]),c=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,h=i?Zh(i):void 0,u=mp({},h==null?void 0:h.themeConfig,a),f=s||a||h!=null&&h.themeConfig?Cj(s,u):void 0,p={container:c,padding:ir(r)};if(h){const g=h,{design:y}=g,m=Zr(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=_j(Je(Je({},h==null?void 0:h.design),o),f?_a(Je({},t),{themeConfig:f}):t);Iu(g)&&(p.design=g)}return s&&(p.theme=s),f&&(p.themeConfig=f),p}function jh(t){if(typeof t=="string")return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function _j(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=Sv(i||(o==null?void 0:o[0]),e);return{structure:$j(n),title:Pj(r,e),item:s,items:o?o.map(a=>Sv(a,e)):[s]}}function $j(t){if(!t)return null;const e=jh(t),{type:n}=e,r=Zr(e,["type"]),i=x2(n);if(!i)return null;const{component:o}=i;return _a(Je({},i),{component:s=>o(Je(Je({},s),r))})}function Pj(t,e){if(!t)return{component:null};const n=jh(t),{type:r}=n,i=Zr(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=Ev(s,s);return{component:l=>Pg(Je(_a(Je({},l),{themeColors:a}),i))}}function Sv(t,e){if(!t)return null;const n=jh(t),{type:r}=n,i=Zr(n,["type"]),o=Tg(r);if(!o)return null;const{component:s,options:a}=o;return _a(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=Ev(zo(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=Zr(g,["themeColors"]);return s(Je(Je({themeColors:y},m),i))},options:a})}function Cj(t,e={}){var n;const r=t?Cg(t)||{}:{},i=mp({},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 Ev(t,e="#fff"){return Sg({colorPrimary:t,isDarkMode:wu(e),colorBg:e})}function Oj(t){return t===" "||t===" "}function Mj(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 Sj(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 Wh(t,e){return{kind:"object",line:t,value:e,entries:{}}}function Ej(t){return{kind:"array",line:t,items:[]}}function Ij(t){const e=[],n=Wh(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}=Mj(o),h=Sj(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||Oj(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=Ej(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=Wh(a,m||void 0);f.items.push(x),r.push({indent:l,node:x,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=Wh(a,g.value);f.entries[g.key]=y,r.push({indent:l,node:y,parent:f,key:g.key})}),{ast:n,errors:e}}function Av(t){return Iv(t)}function $a(t,e){return{kind:"value",line:e,value:t}}const Aj=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,Tj=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function xr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function br(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 Tv(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 kj(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 Fh(t){const e=kj(t);if(!e)return;const n=e.match(Aj);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 kv(t,e,n,r={}){const i=br(t);if(i===void 0){we(n,t,e,"schema_mismatch","Expected color value.");return}const o=Fh(i);if(!o){r.soft||we(n,t,e,"invalid_value","Invalid color value.",i);return}return o}function Lj(t,e){return e.length>1||t.startsWith("[")&&t.endsWith("]")?!0:Fh(t)!==void 0}function Bh(t){if(t.kind==="array")return t.items.map(r=>Bh(r));if(t.kind==="value"||!(Object.keys(t.entries).length>0)&&t.value!==void 0)return xr(t.value);const n={};return t.value!==void 0&&(n.value=xr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=Bh(i)}),n}function zj(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 zj(t,e,n,r);case"string":{const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=br(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=br(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=br(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=br(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:Tv(i,e.split).map((a,l)=>je($a(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=br(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=Fh(o);if(s)return[s];const a=Tv(i,"any");if(Lj(o,a)){const l=a.map((c,h)=>kv($a(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return kv(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=Av(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=je($a(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]=xr(o.value),i):(we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=xr(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=Av(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=je($a(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]=xr(o.value):we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=xr(t.value))}return Object.entries(t.entries).forEach(([o,s])=>{const a=e.fields[o];if(!a){if(e.allowUnknown){i[o]=Bh(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"}),Hj=t=>({kind:"enum",values:t}),Kr=(t={})=>({kind:"color",soft:t.soft}),Vh=(t,e="any")=>({kind:"array",item:t,split:e}),Ae=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),Yh=(...t)=>({kind:"union",variants:t}),Rj=()=>({kind:"palette"}),Lv={fill:Kr({soft:!0}),stroke:Kr({soft:!0})},Qr=Ae(Lv,{allowUnknown:!0}),Xh=Ae(Lv,{allowUnknown:!0}),Gh=Ae({},{allowUnknown:!0});Gh.fields={label:tn(),value:Yh(Fn(),tn()),desc:tn(),icon:tn(),children:Vh(Gh)};const zv=Ae({type:tn(),colorBg:Kr(),colorPrimary:Kr(),palette:Rj(),title:Qr,desc:Qr,shape:Xh,base:Ae({global:Ae({},{allowUnknown:!0}),shape:Xh,text:Qr}),item:Ae({icon:Ae({},{allowUnknown:!0}),label:Qr,desc:Qr,value:Qr,shape:Xh}),stylize:Ae({type:Hj(["rough","pattern"]),roughness:Fn(),bowing:Fn(),fillWeight:Fn(),hachureGap:Fn(),pattern:tn(),backgroundColor:Kr(),foregroundColor:Kr(),scale:Fn()},{shorthandKey:"type"}),elements:Ae({},{allowUnknown:!0})},{shorthandKey:"type"}),Pa=Ae({},{allowUnknown:!0,shorthandKey:"type"}),Hv=Ae({structure:Pa,item:Pa,items:Vh(Pa),title:Pa}),Rv=Ae({title:tn(),desc:tn(),items:Vh(Gh)}),Dv=Ae({type:tn()},{shorthandKey:"type"}),Nv=Ae({template:Dv,design:Hv,data:Rv,theme:zv,width:Yh(Fn(),tn()),height:Yh(Fn(),tn())});var Dj=Object.defineProperty,Ca=Object.getOwnPropertySymbols,jv=Object.prototype.hasOwnProperty,Wv=Object.prototype.propertyIsEnumerable,Fv=(t,e,n)=>e in t?Dj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Nj=(t,e)=>{for(var n in e||(e={}))jv.call(e,n)&&Fv(t,n,e[n]);if(Ca)for(var n of Ca(e))Wv.call(e,n)&&Fv(t,n,e[n]);return t},jj=(t,e)=>{var n={};for(var r in t)jv.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&&Wv.call(t,r)&&(n[r]=t[r]);return n};function Wj(t,e){if(!t)return;const n=je(t,Dv,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function Bv(t){const{ast:e,errors:n}=Ij(t),r=[],i={},o=Nj({},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=Wj(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=je(u,Hv,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=je(f,Rv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=je(p,zv,"theme",n);if(m&&typeof m=="object"){const x=m,{type:v}=x,b=jj(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,Nv.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=je(y,Nv.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const Fj=()=>[new cv,new fv],Bj=()=>[new E3,new g3,new m3,new I3,new T3,new R3,new z3],Vj={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return Fj()},get interactions(){return Bj()}};var Yj=Object.defineProperty,Vv=Object.getOwnPropertySymbols,Xj=Object.prototype.hasOwnProperty,Gj=Object.prototype.propertyIsEnumerable,Yv=(t,e,n)=>e in t?Yj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,On=(t,e)=>{for(var n in e||(e={}))Xj.call(e,n)&&Yv(t,n,e[n]);if(Vv)for(var n of Vv(e))Gj.call(e,n)&&Yv(t,n,e[n]);return t};function qh(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 Oa(t){const e=On({},t);return e.data&&(e.data=pp(e.data)),e.elements&&(e.elements=pp(e.elements)),e}function Xv(t){const{design:e,data:n}=t;return!(!e||!Iu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var qj=Object.defineProperty,Gv=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Zj=Object.prototype.propertyIsEnumerable,qv=(t,e,n)=>e in t?qj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kj=(t,e)=>{for(var n in e||(e={}))Uj.call(e,n)&&qv(t,n,e[n]);if(Gv)for(var n of Gv(e))Zj.call(e,n)&&qv(t,n,e[n]);return t},Qj=(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 Jj{constructor(e){this.rendered=!1,this.emitter=new cj,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}=tW(e);r&&(this.initialOptions=Oa(i));const a=qh(n==="replace"?Oa(this.initialOptions||{}):this.options||Oa(this.initialOptions||{}),i);this.options=a,this.parsedOptions=wj(qh(Vj,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 iP(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 yj(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options});const s=this.node;return s&&b6(s).then(()=>{this.node===s&&this.emitter.emit("loaded",{node:s,options:this.options})}),!0}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=zp(d(l,Kj({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Ir(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 y6({structure:r,items:i})}toDataURL(e){return Qj(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield HN(this.node,e):yield sj(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 tW(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=Bv(t);return{options:e,errors:n,warnings:r}}return{options:Oa(t),errors:[],warnings:[]}}const eW=Be.version;W.AlignLayout=Ai,W.BadgeCard=zg,W.BrushSelect=g3,W.BtnAdd=q,W.BtnRemove=Xt,W.BtnsGroup=Et,W.CandyCardLite=Dg,W.CapsuleItem=Xg,W.ChartBar=b2,W.ChartColumn=w2,W.ChartLine=C2,W.ChartPie=O2,W.ChartWordCloud=T2,W.CircleNode=Ug,W.CircularProgress=Qg,W.ClickSelect=m3,W.CompactCard=n1,W.CompareBinaryHorizontal=F2,W.CompareHierarchyLeftRight=X2,W.CompareHierarchyRow=G2,W.DblClickEditText=E3,W.Defs=jt,W.DoneList=o1,W.DragElement=I3,W.EditBar=cv,W.Ellipse=Wt,W.FlexLayout=dt,W.Fragment=Pi,W.Gap=ie,W.Group=V,W.HierarchyMindmap=ny,W.HierarchyStructure=iy,W.HierarchyTree=ly,W.HorizontalIconArrow=l1,W.HorizontalIconLine=f1,W.HotkeyHistory=T3,W.IconBadge=m1,W.Illus=Xp,W.IndexedCard=x1,W.Infographic=Jj,W.Interaction=jn,W.ItemDesc=Jt,W.ItemIcon=Ce,W.ItemIconCircle=sr,W.ItemLabel=It,W.ItemValue=Ii,W.ItemsGroup=St,W.LCornerCard=_1,W.LabelText=L1,W.LetterCard=C1,W.LinedText=S1,W.ListColumn=cy,W.ListGrid=hy,W.ListPyramid=dy,W.ListRow=uy,W.ListSector=gy,W.ListWaterfall=my,W.ListZigzagDown=wy,W.ListZigzagUp=_y,W.Path=yt,W.PillBadge=A1,W.Plugin=Sh,W.Polygon=Ve,W.ProgressCard=Fm,W.Quadrant=$y,W.QuarterCircular=Ym,W.QuarterSimpleCard=qm,W.Rect=Ct,W.RelationCircle=Py,W.RelationNetwork=Cy,W.ResizeElement=fv,W.RibbonCard=Km,W.RoundedRectNode=t2,W.SelectHighlight=z3,W.SequenceAscendingStairs3d=zy,W.SequenceAscendingSteps=Hy,W.SequenceCircleArrows=Dy,W.SequenceCircular=Ny,W.SequenceColorSnakeSteps=jy,W.SequenceFilterMesh=Vy,W.SequenceHorizontalZigzag=Yy,W.SequenceMountain=qy,W.SequencePyramid=Uy,W.SequenceRoadmapVertical=Ky,W.SequenceSnakeSteps=Qy,W.SequenceStairsFront=Jy,W.SequenceSteps=t3,W.SequenceTimeline=e3,W.SequenceZigzagPucks3d=r3,W.SequenceZigzagSteps=c3,W.ShapesGroup=le,W.SimpleHorizontalArrow=r2,W.SimpleIllusItem=s2,W.SimpleItem=c2,W.SimpleVerticalArrow=u2,W.Text=Mt,W.Title=Pg,W.UnderlineText=g2,W.VERSION=eW,W.VerticalIconArrow=v2,W.ZoomWheel=R3,W.cloneElement=Rn,W.createFragment=$P,W.createLayout=_c,W.exportToSVG=Dh,W.getCombinedBounds=Dr,W.getElementBounds=et,W.getElementsBounds=or,W.getFont=zl,W.getFonts=Hl,W.getItem=Tg,W.getItemProps=Zt,W.getItems=UC,W.getPalette=zf,W.getPaletteColor=zo,W.getPalettes=m_,W.getStructure=x2,W.getStructures=KL,W.getTemplate=Zh,W.getTemplates=tx,W.getTheme=Cg,W.getThemeColors=xe,W.getThemes=TC,W.jsx=rs,W.jsxDEV=CP,W.jsxs=PP,W.loadSVGResource=Lr,W.parseSVG=Ir,W.parseSyntax=Bv,W.registerFont=Tf,W.registerItem=Kt,W.registerPalette=Nl,W.registerPattern=l0,W.registerResourceLoader=A6,W.registerStructure=kt,W.registerTemplate=Uh,W.registerTheme=Oc,W.renderSVG=zp,W.sequenceCylinders3d=Wy,W.setDefaultFont=h_,W.setFontExtendFactor=hP,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
|
|
560
560
|
//# sourceMappingURL=infographic.min.js.map
|